getnamingo-registry/cp/public/assets/libs/apexcharts/dist/apexcharts.amd.js
2025-01-18 21:04:21 +02:00

2 lines
No EOL
774 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*! For license information please see apexcharts.amd.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ApexCharts=e():t.ApexCharts=e()}(self,(()=>(()=>{var t={532:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r="",i=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),i&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),i&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r})).join("")},e.i=function(t,r,i,n,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(i)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var c=0;c<t.length;c++){var u=[].concat(t[c]);i&&a[u[0]]||(void 0!==o&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),r&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=r):u[2]=r),n&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=n):u[4]="".concat(n)),e.push(u))}},e}},547:t=>{"use strict";t.exports=function(t){return t[1]}},521:()=>{window.TreemapSquared={},function(){"use strict";window.TreemapSquared.generate=function(){function t(e,r,i,n){this.xoffset=e,this.yoffset=r,this.height=n,this.width=i,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(t){var e,r=[],i=this.xoffset,n=this.yoffset,a=o(t)/this.height,s=o(t)/this.width;if(this.width>=this.height)for(e=0;e<t.length;e++)r.push([i,n,i+a,n+t[e]/a]),n+=t[e]/a;else for(e=0;e<t.length;e++)r.push([i,n,i+t[e]/s,n+s]),i+=t[e]/s;return r},this.cutArea=function(e){var r;if(this.width>=this.height){var i=e/this.height,n=this.width-i;r=new t(this.xoffset+i,this.yoffset,n,this.height)}else{var o=e/this.width,a=this.height-o;r=new t(this.xoffset,this.yoffset+o,this.width,a)}return r}}function e(e,i,n,a,s){a=void 0===a?0:a,s=void 0===s?0:s;var l=r(function(t,e){var r,i=[],n=e/o(t);for(r=0;r<t.length;r++)i[r]=t[r]*n;return i}(e,i*n),[],new t(a,s,i,n),[]);return function(t){var e,r,i=[];for(e=0;e<t.length;e++)for(r=0;r<t[e].length;r++)i.push(t[e][r]);return i}(l)}function r(t,e,n,a){var s,l,c;if(0!==t.length)return s=n.shortestEdge(),function(t,e,r){var n;return 0===t.length||((n=t.slice()).push(e),i(t,r)>=i(n,r))}(e,l=t[0],s)?(e.push(l),r(t.slice(1),e,n,a)):(c=n.cutArea(o(e),a),a.push(n.getCoordinates(e)),r(t,[],c,a)),a;a.push(n.getCoordinates(e))}function i(t,e){var r=Math.min.apply(Math,t),i=Math.max.apply(Math,t),n=o(t);return Math.max(Math.pow(e,2)*i/Math.pow(n,2),Math.pow(n,2)/(Math.pow(e,2)*r))}function n(t){return t&&t.constructor===Array}function o(t){var e,r=0;for(e=0;e<t.length;e++)r+=t[e];return r}function a(t){var e,r=0;if(n(t[0]))for(e=0;e<t.length;e++)r+=a(t[e]);else r=o(t);return r}return function t(r,i,o,s,l){s=void 0===s?0:s,l=void 0===l?0:l;var c,u,h=[],f=[];if(n(r[0])){for(u=0;u<r.length;u++)h[u]=a(r[u]);for(c=e(h,i,o,s,l),u=0;u<r.length;u++)f.push(t(r[u],c[u][2]-c[u][0],c[u][3]-c[u][1],c[u][0],c[u][1]))}else f=e(r,i,o,s,l);return f}}()}()},2:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>s});var i=r(547),n=r.n(i),o=r(532),a=r.n(o)()(n());a.push([t.id,'@keyframes opaque {\n 0% {\n opacity: 0\n }\n\n to {\n opacity: 1\n }\n}\n\n@keyframes resizeanim {\n\n 0%,\n to {\n opacity: 0\n }\n}\n\n.apexcharts-canvas {\n position: relative;\n direction: ltr !important;\n user-select: none\n}\n\n.apexcharts-canvas ::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 6px\n}\n\n.apexcharts-canvas ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(0, 0, 0, .5);\n box-shadow: 0 0 1px rgba(255, 255, 255, .5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5)\n}\n\n.apexcharts-inner {\n position: relative\n}\n\n.apexcharts-text tspan {\n font-family: inherit\n}\n\nrect.legend-mouseover-inactive,\n.legend-mouseover-inactive rect,\n.legend-mouseover-inactive path,\n.legend-mouseover-inactive circle,\n.legend-mouseover-inactive line,\n.legend-mouseover-inactive text.apexcharts-yaxis-title-text,\n.legend-mouseover-inactive text.apexcharts-yaxis-label {\n transition: .15s ease all;\n opacity: .2\n}\n\n.apexcharts-legend-text {\n padding-left: 15px;\n margin-left: -15px;\n}\n\n.apexcharts-series-collapsed {\n opacity: 0\n}\n\n.apexcharts-tooltip {\n border-radius: 5px;\n box-shadow: 2px 2px 6px -4px #999;\n cursor: default;\n font-size: 14px;\n left: 62px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n top: 20px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n white-space: nowrap;\n z-index: 12;\n transition: .15s ease all\n}\n\n.apexcharts-tooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-tooltip.apexcharts-theme-light {\n border: 1px solid #e3e3e3;\n background: rgba(255, 255, 255, .96)\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark {\n color: #fff;\n background: rgba(30, 30, 30, .8)\n}\n\n.apexcharts-tooltip * {\n font-family: inherit\n}\n\n.apexcharts-tooltip-title {\n padding: 6px;\n font-size: 15px;\n margin-bottom: 4px\n}\n\n.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {\n background: #eceff1;\n border-bottom: 1px solid #ddd\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {\n background: rgba(0, 0, 0, .7);\n border-bottom: 1px solid #333\n}\n\n.apexcharts-tooltip-text-goals-value,\n.apexcharts-tooltip-text-y-value,\n.apexcharts-tooltip-text-z-value {\n display: inline-block;\n margin-left: 5px;\n font-weight: 600\n}\n\n.apexcharts-tooltip-text-goals-label:empty,\n.apexcharts-tooltip-text-goals-value:empty,\n.apexcharts-tooltip-text-y-label:empty,\n.apexcharts-tooltip-text-y-value:empty,\n.apexcharts-tooltip-text-z-value:empty,\n.apexcharts-tooltip-title:empty {\n display: none\n}\n\n.apexcharts-tooltip-text-goals-label,\n.apexcharts-tooltip-text-goals-value {\n padding: 6px 0 5px\n}\n\n.apexcharts-tooltip-goals-group,\n.apexcharts-tooltip-text-goals-label,\n.apexcharts-tooltip-text-goals-value {\n display: flex\n}\n\n.apexcharts-tooltip-text-goals-label:not(:empty),\n.apexcharts-tooltip-text-goals-value:not(:empty) {\n margin-top: -6px\n}\n\n.apexcharts-tooltip-marker {\n width: 12px;\n height: 12px;\n position: relative;\n top: 0;\n margin-right: 10px;\n border-radius: 50%\n}\n\n.apexcharts-tooltip-series-group {\n padding: 0 10px;\n display: none;\n text-align: left;\n justify-content: left;\n align-items: center\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {\n opacity: 1\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active,\n.apexcharts-tooltip-series-group:last-child {\n padding-bottom: 4px\n}\n\n.apexcharts-tooltip-y-group {\n padding: 6px 0 5px\n}\n\n.apexcharts-custom-tooltip,\n.apexcharts-tooltip-box {\n padding: 4px 8px\n}\n\n.apexcharts-tooltip-boxPlot {\n display: flex;\n flex-direction: column-reverse\n}\n\n.apexcharts-tooltip-box>div {\n margin: 4px 0\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: 700\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: 700;\n display: block;\n margin-bottom: 5px\n}\n\n.apexcharts-xaxistooltip,\n.apexcharts-yaxistooltip {\n opacity: 0;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #eceff1;\n border: 1px solid #90a4ae\n}\n\n.apexcharts-xaxistooltip {\n padding: 9px 10px;\n transition: .15s ease all\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-left: -6px\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-left: -7px\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n top: 100%\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-yaxistooltip {\n padding: 4px 10px\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-top: -6px\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-top: -7px\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n left: 100%\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n right: 100%\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: .15s ease all\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0\n}\n\n.apexcharts-selection-rect {\n cursor: move\n}\n\n.svg_select_shape {\n stroke-width: 1;\n stroke-dasharray: 10 10;\n stroke: black;\n stroke-opacity: 0.1;\n pointer-events: none;\n fill: none;\n}\n\n.svg_select_handle {\n stroke-width: 3;\n stroke: black;\n fill: none;\n}\n\n.svg_select_handle_r {\n cursor: e-resize;\n}\n\n.svg_select_handle_l {\n cursor: w-resize;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-menu-icon,\n.apexcharts-pan-icon,\n.apexcharts-reset-icon,\n.apexcharts-selection-icon,\n.apexcharts-toolbar-custom-icon,\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6e8192;\n text-align: center\n}\n\n.apexcharts-menu-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg {\n fill: #6e8192\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(.76)\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomin-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomout-icon svg {\n fill: #f3f4f5\n}\n\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {\n fill: #008ffb\n}\n\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg,\n.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {\n fill: #333\n}\n\n.apexcharts-menu-icon,\n.apexcharts-selection-icon {\n position: relative\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px\n}\n\n.apexcharts-menu-icon,\n.apexcharts-reset-icon,\n.apexcharts-zoom-icon {\n transform: scale(.85)\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n transform: scale(.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px\n}\n\n.apexcharts-pan-icon {\n transform: scale(.62);\n position: relative;\n left: 1px;\n top: 0\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6e8192;\n stroke-width: 2\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008ffb\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0 6px 2px;\n display: flex;\n justify-content: space-between;\n align-items: center\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: .15s ease all;\n pointer-events: none\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: .15s ease all\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0, 0, 0, .7);\n color: #fff\n}\n\n@media screen and (min-width:768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1\n }\n}\n\n.apexcharts-canvas .apexcharts-element-hidden,\n.apexcharts-datalabel.apexcharts-element-hidden,\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-hidden-element-shown {\n opacity: 1;\n transition: 0.25s ease all;\n}\n\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value,\n.apexcharts-datalabels,\n.apexcharts-pie-label {\n cursor: default;\n pointer-events: none\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: .3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease\n}\n\n.apexcharts-radialbar-label {\n cursor: pointer;\n}\n\n.apexcharts-annotation-rect,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-gridline,\n.apexcharts-line,\n.apexcharts-point-annotation-label,\n.apexcharts-radar-series path:not(.apexcharts-marker),\n.apexcharts-radar-series polygon,\n.apexcharts-toolbar svg,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-xaxis-annotation-label,\n.apexcharts-yaxis-annotation-label,\n.apexcharts-zoom-rect,\n.no-pointer-events {\n pointer-events: none\n}\n\n.apexcharts-tooltip-active .apexcharts-marker {\n transition: .15s ease all\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n height: 100%;\n width: 100%;\n overflow: hidden\n}\n\n.contract-trigger:before,\n.resize-triggers,\n.resize-triggers>div {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0\n}\n\n.resize-triggers>div {\n height: 100%;\n width: 100%;\n background: #eee;\n overflow: auto\n}\n\n.contract-trigger:before {\n overflow: hidden;\n width: 200%;\n height: 200%\n}\n\n.apexcharts-bar-goals-markers {\n pointer-events: none\n}\n\n.apexcharts-bar-shadows {\n pointer-events: none\n}\n\n.apexcharts-rangebar-goals-markers {\n pointer-events: none\n}',""]);const s=a},161:(t,e,r)=>{var i=r(72),n=r(2);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.id,n,""]]);var o=(i(t.id,n,{insert:"head",singleton:!1}),n.locals?n.locals:{});t.exports=o},72:(t,e,r)=>{"use strict";var i,n=function(){var t={};return function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}t[e]=r}return t[e]}}(),o={};function a(t,e,r){for(var i=0;i<e.length;i++){var n={css:e[i][1],media:e[i][2],sourceMap:e[i][3]};o[t][i]?o[t][i](n):o[t].push(p(n,r))}}function s(t){var e=document.createElement("style"),i=t.attributes||{};if(void 0===i.nonce){var o=r.nc;o&&(i.nonce=o)}if(Object.keys(i).forEach((function(t){e.setAttribute(t,i[t])})),"function"==typeof t.insert)t.insert(e);else{var a=n(t.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(e)}return e}var l,c=(l=[],function(t,e){return l[t]=e,l.filter(Boolean).join("\n")});function u(t,e,r,i){var n=r?"":i.css;if(t.styleSheet)t.styleSheet.cssText=c(e,n);else{var o=document.createTextNode(n),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function h(t,e,r){var i=r.css,n=r.media,o=r.sourceMap;if(n?t.setAttribute("media",n):t.removeAttribute("media"),o&&btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}var f=null,d=0;function p(t,e){var r,i,n;if(e.singleton){var o=d++;r=f||(f=s(e)),i=u.bind(null,r,o,!1),n=u.bind(null,r,o,!0)}else r=s(e),i=h.bind(null,r,e),n=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(r)};return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else n()}}t.exports=function(t,e,r){return(r=r||{}).singleton||"boolean"==typeof r.singleton||(r.singleton=(void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i)),t=r.base?t+r.base:t,e=e||[],o[t]||(o[t]=[]),a(t,e,r),function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){o[t]||(o[t]=[]),a(t,e,r);for(var i=e.length;i<o[t].length;i++)o[t][i]();o[t].length=e.length,0===o[t].length&&delete o[t]}}}},955:t=>{t.exports='<svg fill="#000000" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg>'},627:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"></path><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"></path></svg>'},606:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"></path><path d="M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"></path></svg>'},75:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000" viewBox="0 0 24 24"><defs><path d="M0 0h24v24H0z" id="a"></path></defs><clipPath id="b"><use overflow="visible" xlink:href="#a"></use></clipPath><path clip-path="url(#b)" d="M23 5.5V20c0 2.2-1.8 4-4 4h-7.3c-1.08 0-2.1-.43-2.85-1.19L1 14.83s1.26-1.23 1.3-1.25c.22-.19.49-.29.79-.29.22 0 .42.06.6.16.04.01 4.31 2.46 4.31 2.46V4c0-.83.67-1.5 1.5-1.5S11 3.17 11 4v7h1V1.5c0-.83.67-1.5 1.5-1.5S15 .67 15 1.5V11h1V2.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V11h1V5.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5z"></path></svg>'},646:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"></path><path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"></path></svg>'},802:t=>{t.exports='<svg fill="#6E8192" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" fill="none"></path><path d="M3 5h2V3c-1.1 0-2 .9-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2z"></path></svg>'},541:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" fill="#000000" viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"></path></svg>'}},e={};function r(i){var n=e[i];if(void 0!==n)return n.exports;var o=e[i]={id:i,exports:{}};return t[i](o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nc=void 0;var i={};return(()=>{"use strict";r.r(i),r.d(i,{default:()=>Fy});var t={};r.r(t),r.d(t,{cx:()=>Yr,cy:()=>Hr,height:()=>Br,rx:()=>Rr,ry:()=>zr,width:()=>Fr,x:()=>Xr,y:()=>Dr});var e={};r.r(e),r.d(e,{from:()=>si,to:()=>li});var n={};r.r(n),r.d(n,{MorphArray:()=>Vi,height:()=>$i,width:()=>Zi,x:()=>Ui,y:()=>qi});var o={};r.r(o),r.d(o,{array:()=>xo,clear:()=>wo,move:()=>So,plot:()=>ko,size:()=>Ao});var a={};r.r(a),r.d(a,{amove:()=>$a,ax:()=>qa,ay:()=>Za,build:()=>Ja,center:()=>Ua,cx:()=>Ga,cy:()=>Va,length:()=>Fa,move:()=>Wa,plain:()=>Ha,x:()=>Ba,y:()=>Na});var s={};function l(t){return l="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},l(t)}function c(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,u(i.key),i)}}function u(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}r.r(s),r.d(s,{dmove:()=>Xs,dx:()=>Ds,dy:()=>Ys,height:()=>Hs,move:()=>Fs,size:()=>Bs,width:()=>Ns,x:()=>Ws,y:()=>Gs});var h=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,i;return e=t,r=[{key:"shadeRGBColor",value:function(t,e){var r=e.split(","),i=t<0?0:255,n=t<0?-1*t:t,o=parseInt(r[0].slice(4),10),a=parseInt(r[1],10),s=parseInt(r[2],10);return"rgb("+(Math.round((i-o)*n)+o)+","+(Math.round((i-a)*n)+a)+","+(Math.round((i-s)*n)+s)+")"}},{key:"shadeHexColor",value:function(t,e){var r=parseInt(e.slice(1),16),i=t<0?0:255,n=t<0?-1*t:t,o=r>>16,a=r>>8&255,s=255&r;return"#"+(16777216+65536*(Math.round((i-o)*n)+o)+256*(Math.round((i-a)*n)+a)+(Math.round((i-s)*n)+s)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,r){return t.isColorHex(r)?this.shadeHexColor(e,r):this.shadeRGBColor(e,r)}}],i=[{key:"bind",value:function(t,e){return function(){return t.apply(e,arguments)}}},{key:"isObject",value:function(t){return t&&"object"===l(t)&&!Array.isArray(t)&&null!=t}},{key:"is",value:function(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}},{key:"listToArray",value:function(t){var e,r=[];for(e=0;e<t.length;e++)r[e]=t[e];return r}},{key:"extend",value:function(t,e){var r=this;"function"!=typeof Object.assign&&(Object.assign=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),r=1;r<arguments.length;r++){var i=arguments[r];if(null!=i)for(var n in i)i.hasOwnProperty(n)&&(e[n]=i[n])}return e});var i=Object.assign({},t);return this.isObject(t)&&this.isObject(e)&&Object.keys(e).forEach((function(n){r.isObject(e[n])&&n in t?i[n]=r.extend(t[n],e[n]):Object.assign(i,function(t,e,r){return(e=u(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}({},n,e[n]))})),i}},{key:"extendArray",value:function(e,r){var i=[];return e.map((function(e){i.push(t.extend(r,e))})),i}},{key:"monthMod",value:function(t){return t%12}},{key:"clone",value:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new WeakMap;if(null===t||"object"!==l(t))return t;if(r.has(t))return r.get(t);if(Array.isArray(t)){e=[],r.set(t,e);for(var i=0;i<t.length;i++)e[i]=this.clone(t[i],r)}else if(t instanceof Date)e=new Date(t.getTime());else for(var n in e={},r.set(t,e),t)t.hasOwnProperty(n)&&(e[n]=this.clone(t[n],r));return e}},{key:"log10",value:function(t){return Math.log(t)/Math.LN10}},{key:"roundToBase10",value:function(t){return Math.pow(10,Math.floor(Math.log10(t)))}},{key:"roundToBase",value:function(t,e){return Math.pow(e,Math.floor(Math.log(t)/Math.log(e)))}},{key:"parseNumber",value:function(t){return null===t?t:parseFloat(t)}},{key:"stripNumber",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return Number.isInteger(t)?t:parseFloat(t.toPrecision(e))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(t){return t.toString().includes("e")?Math.round(t):t}},{key:"elementExists",value:function(t){return!(!t||!t.isConnected)}},{key:"getDimensions",value:function(t){var e=getComputedStyle(t,null),r=t.clientHeight,i=t.clientWidth;return r-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),[i-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),r]}},{key:"getBoundingClientRect",value:function(t){var e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:t.clientWidth,height:t.clientHeight,x:e.left,y:e.top}}},{key:"getLargestStringFromArr",value:function(t){return t.reduce((function(t,e){return Array.isArray(e)&&(e=e.reduce((function(t,e){return t.length>e.length?t:e}))),t.length>e.length?t:e}),0)}},{key:"hexToRgba",value:function(){var t=arguments.length>0&&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 r=t.replace("#","");r=r.match(new RegExp("(.{"+r.length/3+"})","g"));for(var i=0;i<r.length;i++)r[i]=parseInt(1===r[i].length?r[i]+r[i]:r[i],16);return void 0!==e&&r.push(e),"rgba("+r.join(",")+")"}},{key:"getOpacityFromRGBA",value:function(t){return parseFloat(t.replace(/^.*,(.+)\)/,"$1"))}},{key:"rgb2hex",value:function(t){return(t=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===t.length?"#"+("0"+parseInt(t[1],10).toString(16)).slice(-2)+("0"+parseInt(t[2],10).toString(16)).slice(-2)+("0"+parseInt(t[3],10).toString(16)).slice(-2):""}},{key:"isColorHex",value:function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(t)}},{key:"getPolygonPos",value:function(t,e){for(var r=[],i=2*Math.PI/e,n=0;n<e;n++){var o={};o.x=t*Math.sin(n*i),o.y=-t*Math.cos(n*i),r.push(o)}return r}},{key:"polarToCartesian",value:function(t,e,r,i){var n=(i-90)*Math.PI/180;return{x:t+r*Math.cos(n),y:e+r*Math.sin(n)}}},{key:"escapeString",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",r=t.toString().slice();return r.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,e)}},{key:"negToZero",value:function(t){return t<0?0:t}},{key:"moveIndexInArray",value:function(t,e,r){if(r>=t.length)for(var i=r-t.length+1;i--;)t.push(void 0);return t.splice(r,0,t.splice(e,1)[0]),t}},{key:"extractNumber",value:function(t){return parseFloat(t.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}},{key:"setELstyles",value:function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t.style.key=e[r])}},{key:"preciseAddition",value:function(t,e){var r=(String(t).split(".")[1]||"").length,i=(String(e).split(".")[1]||"").length,n=Math.pow(10,Math.max(r,i));return(Math.round(t*n)+Math.round(e*n))/n}},{key:"isNumber",value:function(t){return!isNaN(t)&&parseFloat(Number(t))===t&&!isNaN(parseInt(t,10))}},{key:"isFloat",value:function(t){return Number(t)===t&&t%1!=0}},{key:"isMsEdge",value:function(){var t=window.navigator.userAgent,e=t.indexOf("Edge/");return e>0&&parseInt(t.substring(e+5,t.indexOf(".",e)),10)}},{key:"getGCD",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,i=Math.pow(10,r-Math.floor(Math.log10(Math.max(t,e))));for(t=Math.round(Math.abs(t)*i),e=Math.round(Math.abs(e)*i);e;){var n=e;e=t%e,t=n}return t/i}},{key:"getPrimeFactors",value:function(t){for(var e=[],r=2;t>=2;)t%r==0?(e.push(r),t/=r):r++;return e}},{key:"mod",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,i=Math.pow(10,r-Math.floor(Math.log10(Math.max(t,e))));return(t=Math.round(Math.abs(t)*i))%(e=Math.round(Math.abs(e)*i))/i}}],r&&c(e.prototype,r),i&&c(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();const f=h;function d(t){return d="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},d(t)}function p(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,g(i.key),i)}}function g(t){var e=function(t){if("object"!=d(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==d(e)?e:e+""}var b=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w}var e,r;return e=t,r=[{key:"animateLine",value:function(t,e,r,i){t.attr(e).animate(i).attr(r)}},{key:"animateMarker",value:function(t,e,r,i){t.attr({opacity:0}).animate(e).attr({opacity:1}).after((function(){i()}))}},{key:"animateRect",value:function(t,e,r,i,n){t.attr(e).animate(i).attr(r).after((function(){return n()}))}},{key:"animatePathsGradually",value:function(t){var e=t.el,r=t.realIndex,i=t.j,n=t.fill,o=t.pathFrom,a=t.pathTo,s=t.speed,l=t.delay,c=this.w,u=0;c.config.chart.animations.animateGradually.enabled&&(u=c.config.chart.animations.animateGradually.delay),c.config.chart.animations.dynamicAnimation.enabled&&c.globals.dataChanged&&"bar"!==c.config.chart.type&&(u=0),this.morphSVG(e,r,i,"line"!==c.config.chart.type||c.globals.comboCharts?n:"stroke",o,a,s,l*u)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach((function(t){var e=t.el;e.classList.remove("apexcharts-element-hidden"),e.classList.add("apexcharts-hidden-element-shown")}))}},{key:"animationCompleted",value:function(t){var e=this.w;e.globals.animationEnded||(e.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof e.config.chart.events.animationEnd&&e.config.chart.events.animationEnd(this.ctx,{el:t,w:e}))}},{key:"morphSVG",value:function(t,e,r,i,n,o,a,s){var l=this,c=this.w;n||(n=t.attr("pathFrom")),o||(o=t.attr("pathTo"));var u=function(t){return"radar"===c.config.chart.type&&(a=1),"M 0 ".concat(c.globals.gridHeight)};(!n||n.indexOf("undefined")>-1||n.indexOf("NaN")>-1)&&(n=u()),(!o.trim()||o.indexOf("undefined")>-1||o.indexOf("NaN")>-1)&&(o=u()),c.globals.shouldAnimate||(a=1),t.plot(n).animate(1,s).plot(n).animate(a,s).plot(o).after((function(){f.isNumber(r)?r===c.globals.series[c.globals.maxValsInArrayIndex].length-2&&c.globals.shouldAnimate&&l.animationCompleted(t):"none"!==i&&c.globals.shouldAnimate&&(!c.globals.comboCharts&&e===c.globals.series.length-1||c.globals.comboCharts)&&l.animationCompleted(t),l.showDelayedElements()}))}}],r&&p(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function y(t){return function(t){if(Array.isArray(t))return x(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||m(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t){return v="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},v(t)}function m(t,e){if(t){if("string"==typeof t)return x(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(t,e):void 0}}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}var w={},S=[];function k(t,e){if(Array.isArray(t)){var r,i=function(t){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=m(t))){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return o=t.done,t},e:function(t){a=!0,n=t},f:function(){try{o||null==e.return||e.return()}finally{if(a)throw n}}}}(t);try{for(i.s();!(r=i.n()).done;)k(r.value,e)}catch(t){i.e(t)}finally{i.f()}}else if("object"!==v(t))O(Object.getOwnPropertyNames(e)),w[t]=Object.assign(w[t]||{},e);else for(var n in t)k(n,t[n])}function A(t){return w[t]||{}}function O(t){S.push.apply(S,y(t))}function P(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function C(t,e,r){return(e=function(t){var e=function(t){if("object"!=T(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=T(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==T(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function T(t){return T="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},T(t)}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function M(t,e){var r,i=t.length,n=[];for(r=0;r<i;r++)n.push(e(t[r]));return n}function L(t){return t%360*Math.PI/180}function I(t){return t.charAt(0).toUpperCase()+t.slice(1)}function _(t,e,r,i){return null!=e&&null!=r||(i=i||t.bbox(),null==e?e=i.width/i.height*r:null==r&&(r=i.height/i.width*e)),{width:e,height:r}}function R(t,e){var r,i,n=t.origin,o=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",a=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";if(null!=n){var s=(r=Array.isArray(n)?n:"object"===T(n)?[n.x,n.y]:[n,n],i=2,function(t){if(Array.isArray(t))return t}(r)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return s}}(r,i)||function(t,e){if(t){if("string"==typeof t)return E(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?E(t,e):void 0}}(r,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());o=s[0],a=s[1]}var l="string"==typeof o,c="string"==typeof a;if(l||c){var u=e.bbox(),h=u.height,f=u.width,d=u.x,p=u.y;l&&(o=o.includes("left")?d:o.includes("right")?d+f:d+f/2),c&&(a=a.includes("top")?p:a.includes("bottom")?p+h:p+h/2)}return[o,a]}var z=new Set(["desc","metadata","title"]),X=function(t){return z.has(t.nodeName)},D=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?P(Object(r),!0).forEach((function(e){C(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e);for(var n in i)i[n].valueOf()===r[n]&&delete i[n];Object.keys(i).length?t.node.setAttribute("data-svgjs",JSON.stringify(i)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},Y="http://www.w3.org/2000/svg",H="http://www.w3.org/2000/xmlns/",F="http://www.w3.org/1999/xlink",B={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};function N(){return B.window}var W=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)};function G(t){return G="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},G(t)}var V={},U="___SYMBOL___ROOT___";function q(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Y;return B.document.createElementNS(e,t)}function Z(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t instanceof W)return t;if("object"===G(t))return Q(t);if(null==t)return new V[U];if("string"==typeof t&&"<"!==t.charAt(0))return Q(B.document.querySelector(t));var r=e?B.document.createElement("div"):q("svg");return r.innerHTML=t,t=Q(r.firstChild),r.removeChild(r.firstChild),t}function $(t,e){return e&&(e instanceof B.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:q(t)}function J(t){if(!t)return null;if(t.instance instanceof W)return t.instance;if("#document-fragment"===t.nodeName)return new V.Fragment(t);var e=I(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":V[e]||(e="Dom"),new V[e](t)}var Q=J;function K(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.name,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return V[e]=t,r&&(V[U]=t),O(Object.getOwnPropertyNames(t.prototype)),t}var tt=1e3;function et(t){return"Svgjs"+I(t)+tt++}function rt(t){for(var e=t.children.length-1;e>=0;e--)rt(t.children[e]);return t.id?(t.id=et(t.nodeName),t):t}function it(t,e){var r,i;for(i=(t=Array.isArray(t)?t:[t]).length-1;i>=0;i--)for(r in e)t[i].prototype[r]=e[r]}function nt(t){return function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];var n=r[r.length-1];return!n||n.constructor!==Object||n instanceof Array?t.apply(this,r):t.apply(this,r.slice(0,-1)).attr(n)}}k("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){var t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){var t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=Z(t)).remove();var e=this.position();return this.parent().add(t,e),this},after:function(t){(t=Z(t)).remove();var e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=Z(t)).before(this),this},insertAfter:function(t){return(t=Z(t)).after(this),this}});var ot=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,at=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,st=/rgb\((\d+),(\d+),(\d+)\)/,lt=/(#[a-z_][a-z0-9\-_]*)/i,ct=/\)\s*,?\s*/,ut=/\s/g,ht=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,ft=/^rgb\(/,dt=/^(\s+)?$/,pt=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,gt=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,bt=/[\s,]+/,yt=/[MLHVCSQTAZ]/i;function vt(t){return vt="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},vt(t)}function mt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function xt(t){return xt="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},xt(t)}function wt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function St(t){return St="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},St(t)}function kt(t){return kt="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},kt(t)}function At(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Ot(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ot(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ot(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function Pt(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Ct(i.key),i)}}function Ct(t){var e=function(t){if("object"!=kt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=kt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==kt(e)?e:e+""}function jt(t){var e=Math.round(t),r=Math.max(0,Math.min(255,e)).toString(16);return 1===r.length?"0"+r:r}function Tt(t,e){for(var r=e.length;r--;)if(null==t[e[r]])return!1;return!0}function Et(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}k("Dom",{classes:function(){var t=this.attr("class");return null==t?[]:t.trim().split(bt)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){var e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),k("Dom",{css:function(t,e){var r={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){var e=t.split(/\s*:\s*/);r[e[0]]=e[1]})),r;if(arguments.length<2){if(Array.isArray(t)){var i,n=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return mt(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mt(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(t);try{for(n.s();!(i=n.n()).done;){var o=i.value,a=o;r[o]=this.node.style.getPropertyValue(a)}}catch(t){n.e(t)}finally{n.f()}return r}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"===vt(t))for(var s in t)this.node.style.setProperty(s,null==t[s]||dt.test(t[s])?"":t[s])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||dt.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),k("Dom",{data:function(t,e,r){if(null==t)return this.data(M(function(t){var e,r=t.length,i=[];for(e=0;e<r;e++)0===t[e].nodeName.indexOf("data-")&&i.push(t[e]);return i}(this.node.attributes),(function(t){return t.nodeName.slice(5)})));if(t instanceof Array){var i,n={},o=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return wt(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?wt(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(t);try{for(o.s();!(i=o.n()).done;){var a=i.value;n[a]=this.data(a)}}catch(t){o.e(t)}finally{o.f()}return n}if("object"===xt(t))for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===r||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),k("Dom",{remember:function(t,e){if("object"===St(arguments[0]))for(var r in t)this.remember(r,t[r]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(var t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});var Mt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.init.apply(this,arguments)}var e,r,i;return e=t,r=[{key:"cmyk",value:function(){var e=this.rgb(),r=At([e._a,e._b,e._c].map((function(t){return t/255})),3),i=r[0],n=r[1],o=r[2],a=Math.min(1-i,1-n,1-o);return 1===a?new t(0,0,0,1,"cmyk"):new t((1-i-a)/(1-a),(1-n-a)/(1-a),(1-o-a)/(1-a),a,"cmyk")}},{key:"hsl",value:function(){var e=this.rgb(),r=At([e._a,e._b,e._c].map((function(t){return t/255})),3),i=r[0],n=r[1],o=r[2],a=Math.max(i,n,o),s=Math.min(i,n,o),l=(a+s)/2,c=a===s,u=a-s;return new t(360*(c?0:a===i?((n-o)/u+(n<o?6:0))/6:a===n?((o-i)/u+2)/6:a===o?((i-n)/u+4)/6:0),100*(c?0:l>.5?u/(2-a-s):u/(a+s)),100*l,"hsl")}},{key:"init",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,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"rgb";if(t=t||0,this.space)for(var o in this.space)delete this[this.space[o]];if("number"==typeof t)n="string"==typeof i?i:n,i="string"==typeof i?0:i,Object.assign(this,{_a:t,_b:e,_c:r,_d:i,space:n});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){var a=function(t,e){var r=Tt(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:Tt(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:Tt(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:Tt(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:Tt(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:Tt(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return r.space=e||r.space,r}(t,e);Object.assign(this,a)}else if("string"==typeof t)if(ft.test(t)){var s=t.replace(ut,""),l=At(st.exec(s).slice(1,4).map((function(t){return parseInt(t)})),3),c=l[0],u=l[1],h=l[2];Object.assign(this,{_a:c,_b:u,_c:h,_d:0,space:"rgb"})}else{if(!ht.test(t))throw Error("Unsupported string format, can't construct Color");var f=at.exec(function(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}(t)).map((function(t){return parseInt(t,16)})),d=At(f,4),p=d[1],g=d[2],b=d[3];Object.assign(this,{_a:p,_b:g,_c:b,_d:0,space:"rgb"})}var y=this._a,v=this._b,m=this._c,x=this._d,w="rgb"===this.space?{r:y,g:v,b:m}:"xyz"===this.space?{x:y,y:v,z:m}:"hsl"===this.space?{h:y,s:v,l:m}:"lab"===this.space?{l:y,a:v,b:m}:"lch"===this.space?{l:y,c:v,h:m}:"cmyk"===this.space?{c:y,m:v,y:m,k:x}:{};Object.assign(this,w)}},{key:"lab",value:function(){var e=this.xyz(),r=e.x,i=e.y;return new t(116*i-16,500*(r-i),200*(i-e.z),"lab")}},{key:"lch",value:function(){var e=this.lab(),r=e.l,i=e.a,n=e.b,o=Math.sqrt(Math.pow(i,2)+Math.pow(n,2)),a=180*Math.atan2(n,i)/Math.PI;return a<0&&(a=360-(a*=-1)),new t(r,o,a,"lch")}},{key:"rgb",value:function(){if("rgb"===this.space)return this;if("lab"===(E=this.space)||"xyz"===E||"lch"===E){var e=this.x,r=this.y,i=this.z;if("lab"===this.space||"lch"===this.space){var n=this.l,o=this.a,a=this.b;if("lch"===this.space){var s=this.c,l=this.h,c=Math.PI/180;o=s*Math.cos(c*l),a=s*Math.sin(c*l)}var u=(n+16)/116,h=o/500+u,f=u-a/200,d=16/116,p=.008856,g=7.787;e=.95047*(Math.pow(h,3)>p?Math.pow(h,3):(h-d)/g),r=1*(Math.pow(u,3)>p?Math.pow(u,3):(u-d)/g),i=1.08883*(Math.pow(f,3)>p?Math.pow(f,3):(f-d)/g)}var b=3.2406*e+-1.5372*r+-.4986*i,y=-.9689*e+1.8758*r+.0415*i,v=.0557*e+-.204*r+1.057*i,m=Math.pow,x=.0031308;return new t(255*(b>x?1.055*m(b,1/2.4)-.055:12.92*b),255*(y>x?1.055*m(y,1/2.4)-.055:12.92*y),255*(v>x?1.055*m(v,1/2.4)-.055:12.92*v))}if("hsl"===this.space){var w=this.h,S=this.s,k=this.l;if(w/=360,k/=100,0==(S/=100))return new t(k*=255,k,k);var A=k<.5?k*(1+S):k+S-k*S,O=2*k-A;return new t(255*Et(O,A,w+1/3),255*Et(O,A,w),255*Et(O,A,w-1/3))}if("cmyk"===this.space){var P=this.c,C=this.m,j=this.y,T=this.k;return new t(255*(1-Math.min(1,P*(1-T)+T)),255*(1-Math.min(1,C*(1-T)+T)),255*(1-Math.min(1,j*(1-T)+T)))}return this;var E}},{key:"toArray",value:function(){return[this._a,this._b,this._c,this._d,this.space]}},{key:"toHex",value:function(){var t=At(this._clamped().map(jt),3),e=t[0],r=t[1],i=t[2];return"#".concat(e).concat(r).concat(i)}},{key:"toRgb",value:function(){var t=At(this._clamped(),3),e=t[0],r=t[1],i=t[2];return"rgb(".concat(e,",").concat(r,",").concat(i,")")}},{key:"toString",value:function(){return this.toHex()}},{key:"xyz",value:function(){var e=this.rgb(),r=At([e._a,e._b,e._c].map((function(t){return t/255})),3),i=r[0],n=r[1],o=r[2],a=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,s=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,l=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92,c=(.4124*a+.3576*s+.1805*l)/.95047,u=(.2126*a+.7152*s+.0722*l)/1,h=(.0193*a+.1192*s+.9505*l)/1.08883;return new t(c>.008856?Math.pow(c,1/3):7.787*c+16/116,u>.008856?Math.pow(u,1/3):7.787*u+16/116,h>.008856?Math.pow(h,1/3):7.787*h+16/116,"xyz")}},{key:"_clamped",value:function(){var t=this.rgb(),e=t._a,r=t._b,i=t._c,n=Math.max,o=Math.min,a=Math.round;return[e,r,i].map((function(t){return n(0,o(a(t),255))}))}}],i=[{key:"isColor",value:function(e){return e&&(e instanceof t||this.isRgb(e)||this.test(e))}},{key:"isRgb",value:function(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}},{key:"random",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"vibrant",r=arguments.length>1?arguments[1]:void 0,i=Math.random,n=Math.round,o=Math.sin,a=Math.PI;if("vibrant"===e)return new t(24*i()+57,38*i()+45,360*i(),"lch");if("sine"===e)return new t(n(80*o(2*a*(r=null==r?i():r)/.5+.01)+150),n(50*o(2*a*r/.5+4.6)+200),n(100*o(2*a*r/.5+2.3)+150));if("pastel"===e)return new t(8*i()+86,17*i()+9,360*i(),"lch");if("dark"===e)return new t(10+10*i(),50*i()+86,360*i(),"lch");if("rgb"===e)return new t(255*i(),255*i(),255*i());if("lab"===e)return new t(100*i(),256*i()-128,256*i()-128,"lab");if("grey"===e){var s=255*i();return new t(s,s,s)}throw new Error("Unsupported random color mode")}},{key:"test",value:function(t){return"string"==typeof t&&(ht.test(t)||ft.test(t))}}],r&&Pt(e.prototype,r),i&&Pt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Lt(t){return Lt="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},Lt(t)}function It(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,_t(i.key),i)}}function _t(t){var e=function(t){if("object"!=Lt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Lt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Lt(e)?e:e+""}var Rt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.init.apply(this,arguments)}var e,r;return e=t,r=[{key:"clone",value:function(){return new t(this)}},{key:"init",value:function(t,e){var r=Array.isArray(t)?{x:t[0],y:t[1]}:"object"===Lt(t)?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==r.x?0:r.x,this.y=null==r.y?0:r.y,this}},{key:"toArray",value:function(){return[this.x,this.y]}},{key:"transform",value:function(t){return this.clone().transformO(t)}},{key:"transformO",value:function(t){Ht.isMatrixLike(t)||(t=new Ht(t));var e=this.x,r=this.y;return this.x=t.a*e+t.c*r+t.e,this.y=t.b*e+t.d*r+t.f,this}}],r&&It(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function zt(t){return zt="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},zt(t)}function Xt(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Dt(i.key),i)}}function Dt(t){var e=function(t){if("object"!=zt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=zt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==zt(e)?e:e+""}function Yt(t,e,r){return Math.abs(e-t)<(r||1e-6)}var Ht=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.init.apply(this,arguments)}var e,r,i;return e=t,r=[{key:"around",value:function(t,e,r){return this.clone().aroundO(t,e,r)}},{key:"aroundO",value:function(t,e,r){var i=t||0,n=e||0;return this.translateO(-i,-n).lmultiplyO(r).translateO(i,n)}},{key:"clone",value:function(){return new t(this)}},{key:"decompose",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,r=this.a,i=this.b,n=this.c,o=this.d,a=this.e,s=this.f,l=r*o-i*n,c=l>0?1:-1,u=c*Math.sqrt(r*r+i*i),h=Math.atan2(c*i,c*r),f=180/Math.PI*h,d=Math.cos(h),p=Math.sin(h),g=(r*n+i*o)/l,b=n*u/(g*r-i)||o*u/(g*i+r);return{scaleX:u,scaleY:b,shear:g,rotate:f,translateX:a-t+t*d*u+e*(g*d*u-p*b),translateY:s-e+t*p*u+e*(g*p*u+d*b),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}},{key:"equals",value:function(e){if(e===this)return!0;var r=new t(e);return Yt(this.a,r.a)&&Yt(this.b,r.b)&&Yt(this.c,r.c)&&Yt(this.d,r.d)&&Yt(this.e,r.e)&&Yt(this.f,r.f)}},{key:"flip",value:function(t,e){return this.clone().flipO(t,e)}},{key:"flipO",value:function(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}},{key:"init",value:function(e){var r=t.fromArray([1,0,0,1,0,0]);return e=e instanceof ar?e.matrixify():"string"==typeof e?t.fromArray(e.split(bt).map(parseFloat)):Array.isArray(e)?t.fromArray(e):"object"===zt(e)&&t.isMatrixLike(e)?e:"object"===zt(e)?(new t).transform(e):6===arguments.length?t.fromArray([].slice.call(arguments)):r,this.a=null!=e.a?e.a:r.a,this.b=null!=e.b?e.b:r.b,this.c=null!=e.c?e.c:r.c,this.d=null!=e.d?e.d:r.d,this.e=null!=e.e?e.e:r.e,this.f=null!=e.f?e.f:r.f,this}},{key:"inverse",value:function(){return this.clone().inverseO()}},{key:"inverseO",value:function(){var t=this.a,e=this.b,r=this.c,i=this.d,n=this.e,o=this.f,a=t*i-e*r;if(!a)throw new Error("Cannot invert "+this);var s=i/a,l=-e/a,c=-r/a,u=t/a,h=-(s*n+c*o),f=-(l*n+u*o);return this.a=s,this.b=l,this.c=c,this.d=u,this.e=h,this.f=f,this}},{key:"lmultiply",value:function(t){return this.clone().lmultiplyO(t)}},{key:"lmultiplyO",value:function(e){var r=e instanceof t?e:new t(e);return t.matrixMultiply(r,this,this)}},{key:"multiply",value:function(t){return this.clone().multiplyO(t)}},{key:"multiplyO",value:function(e){var r=e instanceof t?e:new t(e);return t.matrixMultiply(this,r,this)}},{key:"rotate",value:function(t,e,r){return this.clone().rotateO(t,e,r)}},{key:"rotateO",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t=L(t);var i=Math.cos(t),n=Math.sin(t),o=this.a,a=this.b,s=this.c,l=this.d,c=this.e,u=this.f;return this.a=o*i-a*n,this.b=a*i+o*n,this.c=s*i-l*n,this.d=l*i+s*n,this.e=c*i-u*n+r*n-e*i+e,this.f=u*i+c*n-e*n-r*i+r,this}},{key:"scale",value:function(){var t;return(t=this.clone()).scaleO.apply(t,arguments)}},{key:"scaleO",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;3===arguments.length&&(i=r,r=e,e=t);var n=this.a,o=this.b,a=this.c,s=this.d,l=this.e,c=this.f;return this.a=n*t,this.b=o*e,this.c=a*t,this.d=s*e,this.e=l*t-r*t+r,this.f=c*e-i*e+i,this}},{key:"shear",value:function(t,e,r){return this.clone().shearO(t,e,r)}},{key:"shearO",value:function(t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.a,i=this.b,n=this.c,o=this.d,a=this.e,s=this.f;return this.a=r+i*t,this.c=n+o*t,this.e=a+s*t-e*t,this}},{key:"skew",value:function(){var t;return(t=this.clone()).skewO.apply(t,arguments)}},{key:"skewO",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;3===arguments.length&&(i=r,r=e,e=t),t=L(t),e=L(e);var n=Math.tan(t),o=Math.tan(e),a=this.a,s=this.b,l=this.c,c=this.d,u=this.e,h=this.f;return this.a=a+s*n,this.b=s+a*o,this.c=l+c*n,this.d=c+l*o,this.e=u+h*n-i*n,this.f=h+u*o-r*o,this}},{key:"skewX",value:function(t,e,r){return this.skew(t,0,e,r)}},{key:"skewY",value:function(t,e,r){return this.skew(0,t,e,r)}},{key:"toArray",value:function(){return[this.a,this.b,this.c,this.d,this.e,this.f]}},{key:"toString",value:function(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}},{key:"transform",value:function(e){if(t.isMatrixLike(e))return new t(e).multiplyO(this);var r=t.formatTransforms(e),i=new Rt(r.ox,r.oy).transform(this),n=i.x,o=i.y,a=(new t).translateO(r.rx,r.ry).lmultiplyO(this).translateO(-n,-o).scaleO(r.scaleX,r.scaleY).skewO(r.skewX,r.skewY).shearO(r.shear).rotateO(r.theta).translateO(n,o);if(isFinite(r.px)||isFinite(r.py)){var s=new Rt(n,o).transform(a),l=isFinite(r.px)?r.px-s.x:0,c=isFinite(r.py)?r.py-s.y:0;a.translateO(l,c)}return a.translateO(r.tx,r.ty),a}},{key:"translate",value:function(t,e){return this.clone().translateO(t,e)}},{key:"translateO",value:function(t,e){return this.e+=t||0,this.f+=e||0,this}},{key:"valueOf",value:function(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}],i=[{key:"formatTransforms",value:function(t){var e="both"===t.flip||!0===t.flip,r=t.flip&&(e||"x"===t.flip)?-1:1,i=t.flip&&(e||"y"===t.flip)?-1:1,n=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,o=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,a=t.scale&&t.scale.length?t.scale[0]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleX)?t.scaleX*r:r,s=t.scale&&t.scale.length?t.scale[1]*i:isFinite(t.scale)?t.scale*i:isFinite(t.scaleY)?t.scaleY*i:i,l=t.shear||0,c=t.rotate||t.theta||0,u=new Rt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),h=u.x,f=u.y,d=new Rt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=d.x,g=d.y,b=new Rt(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=b.x,v=b.y,m=new Rt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:a,scaleY:s,skewX:n,skewY:o,shear:l,theta:c,rx:m.x,ry:m.y,tx:y,ty:v,ox:h,oy:f,px:p,py:g}}},{key:"fromArray",value:function(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}},{key:"isMatrixLike",value:function(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}},{key:"matrixMultiply",value:function(t,e,r){var i=t.a*e.a+t.c*e.b,n=t.b*e.a+t.d*e.b,o=t.a*e.c+t.c*e.d,a=t.b*e.c+t.d*e.d,s=t.e+t.a*e.e+t.c*e.f,l=t.f+t.b*e.e+t.d*e.f;return r.a=i,r.b=n,r.c=o,r.d=a,r.e=s,r.f=l,r}}],r&&Xt(e.prototype,r),i&&Xt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ft(){if(!Ft.nodes){var t=Z().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");var e=t.path().node;Ft.nodes={svg:t,path:e}}if(!Ft.nodes.svg.node.parentNode){var r=B.document.body||B.document.documentElement;Ft.nodes.svg.addTo(r)}return Ft.nodes}function Bt(t){return Bt="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},Bt(t)}function Nt(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Wt(i.key),i)}}function Wt(t){var e=function(t){if("object"!=Bt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Bt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Bt(e)?e:e+""}function Gt(t){return!(t.width||t.height||t.x||t.y)}K(Ht,"Matrix");var Vt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.init.apply(this,arguments)}var e,r;return e=t,r=[{key:"addOffset",value:function(){return this.x+=B.window.pageXOffset,this.y+=B.window.pageYOffset,new t(this)}},{key:"init",value:function(t){return t="string"==typeof t?t.split(bt).map(parseFloat):Array.isArray(t)?t:"object"===Bt(t)?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}},{key:"isNulled",value:function(){return Gt(this)}},{key:"merge",value:function(e){var r=Math.min(this.x,e.x),i=Math.min(this.y,e.y);return new t(r,i,Math.max(this.x+this.width,e.x+e.width)-r,Math.max(this.y+this.height,e.y+e.height)-i)}},{key:"toArray",value:function(){return[this.x,this.y,this.width,this.height]}},{key:"toString",value:function(){return this.x+" "+this.y+" "+this.width+" "+this.height}},{key:"transform",value:function(e){e instanceof Ht||(e=new Ht(e));var r=1/0,i=-1/0,n=1/0,o=-1/0;return[new Rt(this.x,this.y),new Rt(this.x2,this.y),new Rt(this.x,this.y2),new Rt(this.x2,this.y2)].forEach((function(t){t=t.transform(e),r=Math.min(r,t.x),i=Math.max(i,t.x),n=Math.min(n,t.y),o=Math.max(o,t.y)})),new t(r,n,i-r,o-n)}}],r&&Nt(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ut(t,e,r){var i,n;try{if(Gt(i=e(t.node))&&(n=t.node)!==B.document&&!(B.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===B.document}).call(B.document.documentElement,n))throw new Error("Element not in the dom")}catch(e){i=r(t)}return i}function qt(t){return qt="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},qt(t)}function Zt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function $t(t,e){if(e&&("object"==qt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Jt(t)}function Jt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Qt(t){var e="function"==typeof Map?new Map:void 0;return Qt=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return function(t,e,r){if(Kt())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,e);var n=new(t.bind.apply(t,i));return r&&te(n,r.prototype),n}(t,arguments,ee(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),te(r,t)},Qt(t)}function Kt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Kt=function(){return!!t})()}function te(t,e){return te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},te(t,e)}function ee(t){return ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ee(t)}k({viewbox:{viewbox:function(t,e,r,i){return null==t?new Vt(this.attr("viewBox")):this.attr("viewBox",new Vt(t,e,r,i))},zoom:function(t,e){var r=this.attr(["width","height"]),i=r.width,n=r.height;if((i||n)&&"string"!=typeof i&&"string"!=typeof n||(i=this.node.clientWidth,n=this.node.clientHeight),!i||!n)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");var o=this.viewbox(),a=i/o.width,s=n/o.height,l=Math.min(a,s);if(null==t)return l;var c=l/t;c===1/0&&(c=Number.MAX_SAFE_INTEGER/100),e=e||new Rt(i/2/a+o.x,n/2/s+o.y);var u=new Vt(o).transform(new Ht({scale:c,origin:e}));return this.viewbox(u)}}}),K(Vt,"Box");var re=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&te(t,e)}(n,t);var e,r,i=(e=n,r=Kt(),function(){var t,i=ee(e);if(r){var n=ee(this).constructor;t=Reflect.construct(i,arguments,n)}else t=i.apply(this,arguments);return $t(this,t)});function n(){var t,e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n);for(var o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];return e=i.call.apply(i,[this,r].concat(a)),"number"==typeof r?$t(e,Jt(e)):(e.length=0,(t=e).push.apply(t,function(t){return function(t){if(Array.isArray(t))return Zt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Zt(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Zt(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(r)),e)}return n}(Qt(Array));const ie=re;it([re],{each:function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return"function"==typeof t?this.map((function(e,r,i){return t.call(e,e,r,i)})):this.map((function(e){return e[t].apply(e,r)}))},toArray:function(){return Array.prototype.concat.apply([],this)}});var ne=["toArray","constructor","each"];function oe(t,e){return new ie(M((e||B.document).querySelectorAll(t),(function(t){return J(t)})))}function ae(t){return ae="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},ae(t)}function se(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function le(t,e,r){return(e=function(t){var e=function(t){if("object"!=ae(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ae(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ae(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}re.extend=function(t){t=t.reduce((function(t,e){return ne.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return this.each.apply(this,[e].concat(r))}),t}),{}),it([re],t)};var ce=0,ue={};function he(t){var e=t.getEventHolder();return e===B.window&&(e=ue),e.events||(e.events={}),e.events}function fe(t){return t.getEventTarget()}function de(t,e,r,i,n){var o=r.bind(i||t),a=Z(t),s=he(a),l=fe(a);e=Array.isArray(e)?e:e.split(bt),r._svgjsListenerId||(r._svgjsListenerId=++ce),e.forEach((function(t){var e=t.split(".")[0],i=t.split(".")[1]||"*";s[e]=s[e]||{},s[e][i]=s[e][i]||{},s[e][i][r._svgjsListenerId]=o,l.addEventListener(e,o,n||!1)}))}function pe(t,e,r,i){var n=Z(t),o=he(n),a=fe(n);("function"!=typeof r||(r=r._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(bt)).forEach((function(t){var e,s,l=t&&t.split(".")[0],c=t&&t.split(".")[1];if(r)o[l]&&o[l][c||"*"]&&(a.removeEventListener(l,o[l][c||"*"][r],i||!1),delete o[l][c||"*"][r]);else if(l&&c){if(o[l]&&o[l][c]){for(s in o[l][c])pe(a,[l,c].join("."),s);delete o[l][c]}}else if(c)for(t in o)for(e in o[t])c===e&&pe(a,[t,c].join("."));else if(l){if(o[l]){for(e in o[l])pe(a,[l,e].join("."));delete o[l]}}else{for(t in o)pe(a,t);!function(t){var e=t.getEventHolder();e===B.window&&(e=ue),e.events&&(e.events={})}(n)}}))}function ge(t){return ge="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},ge(t)}function be(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,ye(i.key),i)}}function ye(t){var e=function(t){if("object"!=ge(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ge(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ge(e)?e:e+""}function ve(t,e){return ve=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ve(t,e)}function me(t){var e=xe();return function(){var r,i=we(t);if(e){var n=we(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==ge(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function xe(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(xe=function(){return!!t})()}function we(t){return we=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},we(t)}var Se=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ve(t,e)}(n,t);var e,r,i=me(n);function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.apply(this,arguments)}return e=n,r=[{key:"addEventListener",value:function(){}},{key:"dispatch",value:function(t,e,r){return function(t,e,r,i){var n=fe(t);return e instanceof B.window.Event||(e=new B.window.CustomEvent(e,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?se(Object(r),!0).forEach((function(e){le(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):se(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({detail:r,cancelable:!0},i))),n.dispatchEvent(e),e}(this,t,e,r)}},{key:"dispatchEvent",value:function(t){var e=this.getEventHolder().events;if(!e)return!0;var r=e[t.type];for(var i in r)for(var n in r[i])r[i][n](t);return!t.defaultPrevented}},{key:"fire",value:function(t,e,r){return this.dispatch(t,e,r),this}},{key:"getEventHolder",value:function(){return this}},{key:"getEventTarget",value:function(){return this}},{key:"off",value:function(t,e,r){return pe(this,t,e,r),this}},{key:"on",value:function(t,e,r,i){return de(this,t,e,r,i),this}},{key:"removeEventListener",value:function(){}}],r&&be(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(W);function ke(){}K(Se,"EventTarget");var Ae={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};function Oe(t){return Oe="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},Oe(t)}function Pe(t){return function(t){if(Array.isArray(t))return Ce(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ce(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ce(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ce(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function je(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Te(i.key),i)}}function Te(t){var e=function(t){if("object"!=Oe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Oe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Oe(e)?e:e+""}function Ee(t){var e="function"==typeof Map?new Map:void 0;return Ee=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return function(t,e,r){if(Me())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,e);var n=new(t.bind.apply(t,i));return r&&Le(n,r.prototype),n}(t,arguments,Ie(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Le(r,t)},Ee(t)}function Me(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Me=function(){return!!t})()}function Le(t,e){return Le=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Le(t,e)}function Ie(t){return Ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ie(t)}var _e=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Le(t,e)}(n,t);var e,r,i=function(t){var e=Me();return function(){var r,i=Ie(t);if(e){var n=Ie(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Oe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}(n);function n(){var t,e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(t=e=i.call.apply(i,[this].concat(o))).init.apply(t,o),e}return e=n,r=[{key:"clone",value:function(){return new this.constructor(this)}},{key:"init",value:function(t){return"number"==typeof t||(this.length=0,this.push.apply(this,Pe(this.parse(t)))),this}},{key:"parse",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t instanceof Array?t:t.trim().split(bt).map(parseFloat)}},{key:"toArray",value:function(){return Array.prototype.concat.apply([],this)}},{key:"toSet",value:function(){return new Set(this)}},{key:"toString",value:function(){return this.join(" ")}},{key:"valueOf",value:function(){var t=[];return t.push.apply(t,Pe(this)),t}}],r&&je(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Ee(Array));function Re(t){return Re="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},Re(t)}function ze(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Xe(i.key),i)}}function Xe(t){var e=function(t){if("object"!=Re(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Re(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Re(e)?e:e+""}var De=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.init.apply(this,arguments)}var e,r;return e=t,(r=[{key:"convert",value:function(e){return new t(this.value,e)}},{key:"divide",value:function(e){return e=new t(e),new t(this/e,this.unit||e.unit)}},{key:"init",value:function(e,r){return r=Array.isArray(e)?e[1]:r,e=Array.isArray(e)?e[0]:e,this.value=0,this.unit=r||"","number"==typeof e?this.value=isNaN(e)?0:isFinite(e)?e:e<0?-34e37:34e37:"string"==typeof e?(r=e.match(ot))&&(this.value=parseFloat(r[1]),"%"===r[5]?this.value/=100:"s"===r[5]&&(this.value*=1e3),this.unit=r[5]):e instanceof t&&(this.value=e.valueOf(),this.unit=e.unit),this}},{key:"minus",value:function(e){return e=new t(e),new t(this-e,this.unit||e.unit)}},{key:"plus",value:function(e){return e=new t(e),new t(this+e,this.unit||e.unit)}},{key:"times",value:function(e){return e=new t(e),new t(this*e,this.unit||e.unit)}},{key:"toArray",value:function(){return[this.value,this.unit]}},{key:"toJSON",value:function(){return this.toString()}},{key:"toString",value:function(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}},{key:"valueOf",value:function(){return this.value}}])&&ze(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ye(t){return Ye="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},Ye(t)}function He(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}var Fe=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Be=[];function Ne(t){return Ne="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},Ne(t)}function We(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Ge(i.key),i)}}function Ge(t){var e=function(t){if("object"!=Ne(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ne(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ne(e)?e:e+""}function Ve(t,e){return Ve=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ve(t,e)}function Ue(t){var e=qe();return function(){var r,i=Ze(t);if(e){var n=Ze(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Ne(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function qe(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(qe=function(){return!!t})()}function Ze(t){return Ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ze(t)}var $e=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ve(t,e)}(n,t);var e,r,i=Ue(n);function n(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(r=i.call(this)).node=t,r.type=t.nodeName,e&&t!==e&&r.attr(e),r}return e=n,r=[{key:"add",value:function(t,e){return(t=Z(t)).removeNamespace&&this.node instanceof B.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}},{key:"addTo",value:function(t,e){return Z(t).put(this,e)}},{key:"children",value:function(){return new ie(M(this.node.children,(function(t){return J(t)})))}},{key:"clear",value:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}},{key:"clone",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.writeDataToDom();var r=this.node.cloneNode(t);return e&&(r=rt(r)),new this.constructor(r)}},{key:"each",value:function(t,e){var r,i,n=this.children();for(r=0,i=n.length;r<i;r++)t.apply(n[r],[r,n]),e&&n[r].each(t,e);return this}},{key:"element",value:function(t,e){return this.put(new n(q(t),e))}},{key:"first",value:function(){return J(this.node.firstChild)}},{key:"get",value:function(t){return J(this.node.childNodes[t])}},{key:"getEventHolder",value:function(){return this.node}},{key:"getEventTarget",value:function(){return this.node}},{key:"has",value:function(t){return this.index(t)>=0}},{key:"html",value:function(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}},{key:"id",value:function(t){return void 0!==t||this.node.id||(this.node.id=et(this.type)),this.attr("id",t)}},{key:"index",value:function(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}},{key:"last",value:function(){return J(this.node.lastChild)}},{key:"matches",value:function(t){var e=this.node,r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return r&&r.call(e,t)}},{key:"parent",value:function(t){var e=this;if(!e.node.parentNode)return null;if(e=J(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=J(e.node.parentNode));return e}},{key:"put",value:function(t,e){return t=Z(t),this.add(t,e),t}},{key:"putIn",value:function(t,e){return Z(t).add(this,e)}},{key:"remove",value:function(){return this.parent()&&this.parent().removeElement(this),this}},{key:"removeElement",value:function(t){return this.node.removeChild(t.node),this}},{key:"replace",value:function(t){return t=Z(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}},{key:"round",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=Math.pow(10,t),i=this.attr(e);for(var n in i)"number"==typeof i[n]&&(i[n]=Math.round(i[n]*r)/r);return this.attr(i),this}},{key:"svg",value:function(t,e){return this.xml(t,e,Y)}},{key:"toString",value:function(){return this.id()}},{key:"words",value:function(t){return this.node.textContent=t,this}},{key:"wrap",value:function(t){var e=this.parent();if(!e)return this.addTo(t);var r=e.index(this);return e.put(t,r).put(this)}},{key:"writeDataToDom",value:function(){return this.each((function(){this.writeDataToDom()})),this}},{key:"xml",value:function(t,e,r){if("boolean"==typeof t&&(r=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();var i=this;if(null!=t){if(i=J(i.node.cloneNode(!0)),e){var n=t(i);if(i=n||i,!1===n)return""}i.each((function(){var e=t(this),r=e||this;!1===e?this.remove():e&&this!==r&&this.replace(r)}),!0)}return e?i.node.outerHTML:i.node.innerHTML}e=null!=e&&e;var o=q("wrapper",r),a=B.document.createDocumentFragment();o.innerHTML=t;for(var s=o.children.length;s--;)a.appendChild(o.firstElementChild);var l=this.parent();return e?this.replace(a)&&l:this.add(a)}}],r&&We(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Se);function Je(t){return Je="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},Je(t)}function Qe(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Ke(i.key),i)}}function Ke(t){var e=function(t){if("object"!=Je(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Je(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Je(e)?e:e+""}function tr(){return tr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var i=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=or(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:r):n.value}},tr.apply(null,arguments)}function er(t,e){return er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},er(t,e)}function rr(t){var e=nr();return function(){var r,i=or(t);if(e){var n=or(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Je(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ir(t)}(this,r)}}function ir(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function nr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(nr=function(){return!!t})()}function or(t){return or=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},or(t)}it($e,{attr:function(t,e,r){var i=this;if(null==t){t={};var n,o=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return He(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?He(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(e=this.node.attributes);try{for(o.s();!(n=o.n()).done;){var a=n.value;t[a.nodeName]=pt.test(a.nodeValue)?parseFloat(a.nodeValue):a.nodeValue}}catch(t){o.e(t)}finally{o.f()}return t}if(t instanceof Array)return t.reduce((function(t,e){return t[e]=i.attr(e),t}),{});if("object"===Ye(t)&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?Ae[t]:pt.test(e)?parseFloat(e):e;"number"==typeof(e=Be.reduce((function(e,r){return r(t,e,i)}),e))?e=new De(e):Fe.has(t)&&Mt.isColor(e)?e=new Mt(e):e.constructor===Array&&(e=new _e(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof r?this.node.setAttributeNS(r,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return oe(t,this.node)},findOne:function(t){return J(this.node.querySelector(t))}}),K($e,"Dom");var ar=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&er(t,e)}(n,t);var e,r,i=rr(n);function n(t,e){var r,o,a;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(r=i.call(this,t,e)).dom={},r.node.instance=ir(r),(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&r.setData(null!==(o=null!==(a=JSON.parse(t.getAttribute("data-svgjs")))&&void 0!==a?a:JSON.parse(t.getAttribute("svgjs:data")))&&void 0!==o?o:{}),r}return e=n,r=[{key:"center",value:function(t,e){return this.cx(t).cy(e)}},{key:"cx",value:function(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}},{key:"cy",value:function(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}},{key:"defs",value:function(){var t=this.root();return t&&t.defs()}},{key:"dmove",value:function(t,e){return this.dx(t).dy(e)}},{key:"dx",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.x(new De(t).plus(this.x()))}},{key:"dy",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.y(new De(t).plus(this.y()))}},{key:"getEventHolder",value:function(){return this}},{key:"height",value:function(t){return this.attr("height",t)}},{key:"move",value:function(t,e){return this.x(t).y(e)}},{key:"parents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.root(),e="string"==typeof t;e||(t=Z(t));for(var r=new ie,i=this;(i=i.parent())&&i.node!==B.document&&"#document-fragment"!==i.nodeName&&(r.push(i),e||i.node!==t.node)&&(!e||!i.matches(t));)if(i.node===this.root().node)return null;return r}},{key:"reference",value:function(t){if(!(t=this.attr(t)))return null;var e=(t+"").match(lt);return e?Z(e[1]):null}},{key:"root",value:function(){var t=this.parent(V[U]);return t&&t.root()}},{key:"setData",value:function(t){return this.dom=t,this}},{key:"size",value:function(t,e){var r=_(this,t,e);return this.width(new De(r.width)).height(new De(r.height))}},{key:"width",value:function(t){return this.attr("width",t)}},{key:"writeDataToDom",value:function(){return D(this,this.dom),tr(or(n.prototype),"writeDataToDom",this).call(this)}},{key:"x",value:function(t){return this.attr("x",t)}},{key:"y",value:function(t){return this.attr("y",t)}}],r&&Qe(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}($e);function sr(t){return sr="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},sr(t)}it(ar,{bbox:function(){var t=Ut(this,(function(t){return t.getBBox()}),(function(t){try{var e=t.clone().addTo(Ft().svg).show(),r=e.node.getBBox();return e.remove(),r}catch(e){throw new Error('Getting bbox of element "'.concat(t.node.nodeName,'" is not possible: ').concat(e.toString()))}}));return new Vt(t)},rbox:function(t){var e=Ut(this,(function(t){return t.getBoundingClientRect()}),(function(t){throw new Error('Getting rbox of element "'.concat(t.node.nodeName,'" is not possible'))})),r=new Vt(e);return t?r.transform(t.screenCTM().inverseO()):r.addOffset()},inside:function(t,e){var r=this.bbox();return t>r.x&&e>r.y&&t<r.x+r.width&&e<r.y+r.height},point:function(t,e){return new Rt(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new Ht(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){var t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new Ht(e)}return new Ht(this.node.getScreenCTM())}catch(t){return console.warn("Cannot get CTM from SVG node ".concat(this.node.nodeName,". Is the element rendered?")),new Ht}}}),K(ar,"Element");var lr={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};function cr(t){return cr="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},cr(t)}function ur(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function hr(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ur(Object(r),!0).forEach((function(e){fr(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ur(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function fr(t,e,r){return(e=function(t){var e=function(t){if("object"!=cr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=cr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==cr(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function dr(t){return dr="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},dr(t)}function pr(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,gr(i.key),i)}}function gr(t){var e=function(t){if("object"!=dr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=dr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==dr(e)?e:e+""}function br(t,e){return br=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},br(t,e)}function yr(t){var e=vr();return function(){var r,i=mr(t);if(e){var n=mr(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==dr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function vr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(vr=function(){return!!t})()}function mr(t){return mr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},mr(t)}["fill","stroke"].forEach((function(t){var e,r={};r[t]=function(r){if(void 0===r)return this.attr(t);if("string"==typeof r||r instanceof Mt||Mt.isRgb(r)||r instanceof ar)this.attr(t,r);else for(e=lr[t].length-1;e>=0;e--)null!=r[lr[t][e]]&&this.attr(lr.prefix(t,lr[t][e]),r[lr[t][e]]);return this},k(["Element","Runner"],r)})),k(["Element","Runner"],{matrix:function(t,e,r,i,n,o){return null==t?new Ht(this):this.attr("transform",new Ht(t,e,r,i,n,o))},rotate:function(t,e,r){return this.transform({rotate:t,ox:e,oy:r},!0)},skew:function(t,e,r,i){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:r},!0):this.transform({skew:[t,e],ox:r,oy:i},!0)},shear:function(t,e,r){return this.transform({shear:t,ox:e,oy:r},!0)},scale:function(t,e,r,i){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:r},!0):this.transform({scale:[t,e],ox:r,oy:i},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"both",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"center";return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),k("radius",{radius:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return"radialGradient"===(this._element||this).type?this.attr("r",new De(t)):this.rx(t).ry(e)}}),k("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new Rt(this.node.getPointAtLength(t))}}),k(["Element","Runner"],{font:function(t,e){if("object"===sr(t)){for(e in t)this.font(e,t[e]);return this}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)}}),k("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),k("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(ct).slice(0,-1).map((function(t){var e=t.trim().split("(");return[e[0],e[1].split(bt).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(Ht.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new Ht)},toParent:function(t,e){if(this===t)return this;if(X(this.node))return this.addTo(t,e);var r=this.screenCTM(),i=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(i.multiply(r)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){var r=new Ht(this).decompose();return null==t?r:r[t]}Ht.isMatrixLike(t)||(t=hr(hr({},t),{},{origin:R(t,this)}));var i=new Ht(!0===e?this:e||!1).transform(t);return this.attr("transform",i)}});var xr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&br(t,e)}(n,t);var e,r,i=yr(n);function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.apply(this,arguments)}return e=n,r=[{key:"flatten",value:function(){return this.each((function(){if(this instanceof n)return this.flatten().ungroup()})),this}},{key:"ungroup",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.parent(),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.index(this);return e=-1===e?t.children().length:e,this.each((function(r,i){return i[i.length-r-1].toParent(t,e)})),this.remove()}}],r&&pr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(ar);function wr(t){return wr="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},wr(t)}function Sr(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,kr(i.key),i)}}function kr(t){var e=function(t){if("object"!=wr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=wr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==wr(e)?e:e+""}function Ar(t,e){return Ar=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ar(t,e)}function Or(t){var e=Pr();return function(){var r,i=Cr(t);if(e){var n=Cr(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==wr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Pr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Pr=function(){return!!t})()}function Cr(t){return Cr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Cr(t)}K(xr,"Container");var jr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ar(t,e)}(n,t);var e,r,i=Or(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("defs",t),e)}return e=n,(r=[{key:"flatten",value:function(){return this}},{key:"ungroup",value:function(){return this}}])&&Sr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function Tr(t){return Tr="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},Tr(t)}function Er(t,e){return Er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Er(t,e)}function Mr(t){var e=Lr();return function(){var r,i=Ir(t);if(e){var n=Ir(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Tr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Lr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Lr=function(){return!!t})()}function Ir(t){return Ir=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ir(t)}K(jr,"Defs");var _r=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Er(t,e)}(r,t);var e=Mr(r);function r(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.apply(this,arguments)}return r}(ar);function Rr(t){return this.attr("rx",t)}function zr(t){return this.attr("ry",t)}function Xr(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Dr(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Yr(t){return this.attr("cx",t)}function Hr(t){return this.attr("cy",t)}function Fr(t){return null==t?2*this.rx():this.rx(new De(t).divide(2))}function Br(t){return null==t?2*this.ry():this.ry(new De(t).divide(2))}function Nr(t){return Nr="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},Nr(t)}function Wr(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Gr(i.key),i)}}function Gr(t){var e=function(t){if("object"!=Nr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Nr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Nr(e)?e:e+""}function Vr(t,e){return Vr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Vr(t,e)}function Ur(t){var e=qr();return function(){var r,i=Zr(t);if(e){var n=Zr(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Nr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function qr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(qr=function(){return!!t})()}function Zr(t){return Zr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Zr(t)}K(_r,"Shape");var $r=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vr(t,e)}(n,t);var e,r,i=Ur(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("ellipse",t),e)}return e=n,r=[{key:"size",value:function(t,e){var r=_(this,t,e);return this.rx(new De(r.width).divide(2)).ry(new De(r.height).divide(2))}}],r&&Wr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function Jr(t){return Jr="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},Jr(t)}function Qr(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Kr(i.key),i)}}function Kr(t){var e=function(t){if("object"!=Jr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Jr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Jr(e)?e:e+""}function ti(){return ti="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var i=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ni(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:r):n.value}},ti.apply(null,arguments)}function ei(t,e){return ei=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ei(t,e)}function ri(t){var e=ii();return function(){var r,i=ni(t);if(e){var n=ni(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Jr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function ii(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ii=function(){return!!t})()}function ni(t){return ni=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ni(t)}it($r,t),k("Container",{ellipse:nt((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return this.put(new $r).size(t,e).move(0,0)}))}),K($r,"Ellipse");var oi=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ei(t,e)}(n,t);var e,r,i=ri(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:B.document.createDocumentFragment();return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,t)}return e=n,(r=[{key:"xml",value:function(t,e,r){if("boolean"==typeof t&&(r=e,e=t,t=null),null==t||"function"==typeof t){var i=new $e(q("wrapper",r));return i.add(this.node.cloneNode(!0)),i.xml(!1,r)}return ti(ni(n.prototype),"xml",this).call(this,t,!1,r)}}])&&Qr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}($e);K(oi,"Fragment");const ai=oi;function si(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new De(t),fy:new De(e)}):this.attr({x1:new De(t),y1:new De(e)})}function li(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new De(t),cy:new De(e)}):this.attr({x2:new De(t),y2:new De(e)})}function ci(t){return ci="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},ci(t)}function ui(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,hi(i.key),i)}}function hi(t){var e=function(t){if("object"!=ci(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ci(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ci(e)?e:e+""}function fi(){return fi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var i=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=bi(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:r):n.value}},fi.apply(null,arguments)}function di(t,e){return di=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},di(t,e)}function pi(t){var e=gi();return function(){var r,i=bi(t);if(e){var n=bi(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==ci(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function gi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(gi=function(){return!!t})()}function bi(t){return bi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},bi(t)}var yi=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&di(t,e)}(n,t);var e,r,i=pi(n);function n(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$(t+"Gradient","string"==typeof t?null:t),e)}return e=n,(r=[{key:"attr",value:function(t,e,r){return"transform"===t&&(t="gradientTransform"),fi(bi(n.prototype),"attr",this).call(this,t,e,r)}},{key:"bbox",value:function(){return new Vt}},{key:"targets",value:function(){return oe("svg [fill*="+this.id()+"]")}},{key:"toString",value:function(){return this.url()}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"url",value:function(){return"url(#"+this.id()+")"}}])&&ui(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function vi(t){return vi="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},vi(t)}function mi(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,xi(i.key),i)}}function xi(t){var e=function(t){if("object"!=vi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=vi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==vi(e)?e:e+""}function wi(){return wi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var i=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Oi(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:r):n.value}},wi.apply(null,arguments)}function Si(t,e){return Si=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Si(t,e)}function ki(t){var e=Ai();return function(){var r,i=Oi(t);if(e){var n=Oi(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==vi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Ai(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ai=function(){return!!t})()}function Oi(t){return Oi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Oi(t)}it(yi,e),k({Container:{gradient:function(){var t;return(t=this.defs()).gradient.apply(t,arguments)}},Defs:{gradient:nt((function(t,e){return this.put(new yi(t)).update(e)}))}}),K(yi,"Gradient");var Pi=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Si(t,e)}(n,t);var e,r,i=ki(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("pattern",t),e)}return e=n,(r=[{key:"attr",value:function(t,e,r){return"transform"===t&&(t="patternTransform"),wi(Oi(n.prototype),"attr",this).call(this,t,e,r)}},{key:"bbox",value:function(){return new Vt}},{key:"targets",value:function(){return oe("svg [fill*="+this.id()+"]")}},{key:"toString",value:function(){return this.url()}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"url",value:function(){return"url(#"+this.id()+")"}}])&&mi(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function Ci(t){return Ci="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},Ci(t)}function ji(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Ti(i.key),i)}}function Ti(t){var e=function(t){if("object"!=Ci(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ci(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ci(e)?e:e+""}function Ei(t,e){return Ei=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ei(t,e)}function Mi(t){var e=Li();return function(){var r,i=Ii(t);if(e){var n=Ii(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Ci(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Li(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Li=function(){return!!t})()}function Ii(t){return Ii=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ii(t)}k({Container:{pattern:function(){var t;return(t=this.defs()).pattern.apply(t,arguments)}},Defs:{pattern:nt((function(t,e,r){return this.put(new Pi).update(r).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),K(Pi,"Pattern");var _i,Ri=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ei(t,e)}(n,t);var e,r,i=Mi(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("image",t),e)}return e=n,r=[{key:"load",value:function(t,e){if(!t)return this;var r=new B.window.Image;return de(r,"load",(function(t){var i=this.parent(Pi);0===this.width()&&0===this.height()&&this.size(r.width,r.height),i instanceof Pi&&0===i.width()&&0===i.height()&&i.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),de(r,"load error",(function(){pe(r)})),this.attr("href",r.src=t,F)}}],r&&ji(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function zi(t){return zi="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},zi(t)}function Xi(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Di(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Di(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Di(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function Yi(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Hi(i.key),i)}}function Hi(t){var e=function(t){if("object"!=zi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=zi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==zi(e)?e:e+""}function Fi(t,e){return Fi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Fi(t,e)}function Bi(t){var e=Ni();return function(){var r,i=Wi(t);if(e){var n=Wi(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==zi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Ni(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ni=function(){return!!t})()}function Wi(t){return Wi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Wi(t)}_i=function(t,e,r){return"fill"!==t&&"stroke"!==t||gt.test(e)&&(e=r.root().defs().image(e)),e instanceof Ri&&(e=r.root().defs().pattern(0,0,(function(t){t.add(e)}))),e},Be.push(_i),k({Container:{image:nt((function(t,e){return this.put(new Ri).size(0,0).load(t,e)}))}}),K(Ri,"Image");var Gi=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fi(t,e)}(n,t);var e,r,i=Bi(n);function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.apply(this,arguments)}return e=n,r=[{key:"bbox",value:function(){var t=-1/0,e=-1/0,r=1/0,i=1/0;return this.forEach((function(n){t=Math.max(n[0],t),e=Math.max(n[1],e),r=Math.min(n[0],r),i=Math.min(n[1],i)})),new Vt(r,i,t-r,e-i)}},{key:"move",value:function(t,e){var r=this.bbox();if(t-=r.x,e-=r.y,!isNaN(t)&&!isNaN(e))for(var i=this.length-1;i>=0;i--)this[i]=[this[i][0]+t,this[i][1]+e];return this}},{key:"parse",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0],e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(bt).map(parseFloat)).length%2!=0&&t.pop();for(var r=0,i=t.length;r<i;r+=2)e.push([t[r],t[r+1]]);return e}},{key:"size",value:function(t,e){var r,i=this.bbox();for(r=this.length-1;r>=0;r--)i.width&&(this[r][0]=(this[r][0]-i.x)*t/i.width+i.x),i.height&&(this[r][1]=(this[r][1]-i.y)*e/i.height+i.y);return this}},{key:"toLine",value:function(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}},{key:"toString",value:function(){for(var t=[],e=0,r=this.length;e<r;e++)t.push(this[e].join(","));return t.join(" ")}},{key:"transform",value:function(t){return this.clone().transformO(t)}},{key:"transformO",value:function(t){Ht.isMatrixLike(t)||(t=new Ht(t));for(var e=this.length;e--;){var r=Xi(this[e],2),i=r[0],n=r[1];this[e][0]=t.a*i+t.c*n+t.e,this[e][1]=t.b*i+t.d*n+t.f}return this}}],r&&Yi(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_e),Vi=Gi;function Ui(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}function qi(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}function Zi(t){var e=this.bbox();return null==t?e.width:this.size(t,e.height)}function $i(t){var e=this.bbox();return null==t?e.height:this.size(e.width,t)}function Ji(t){return Ji="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},Ji(t)}function Qi(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Ki(i.key),i)}}function Ki(t){var e=function(t){if("object"!=Ji(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ji(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ji(e)?e:e+""}function tn(t,e){return tn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},tn(t,e)}function en(t){var e=rn();return function(){var r,i=nn(t);if(e){var n=nn(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Ji(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function rn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(rn=function(){return!!t})()}function nn(t){return nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},nn(t)}var on=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tn(t,e)}(n,t);var e,r,i=en(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("line",t),e)}return e=n,r=[{key:"array",value:function(){return new Gi([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}},{key:"move",value:function(t,e){return this.attr(this.array().move(t,e).toLine())}},{key:"plot",value:function(t,e,r,i){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:r,y2:i}:new Gi(t).toLine(),this.attr(t))}},{key:"size",value:function(t,e){var r=_(this,t,e);return this.attr(this.array().size(r.width,r.height).toLine())}}],r&&Qi(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function an(t){return an="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},an(t)}function sn(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,ln(i.key),i)}}function ln(t){var e=function(t){if("object"!=an(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=an(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==an(e)?e:e+""}function cn(t,e){return cn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},cn(t,e)}function un(t){var e=hn();return function(){var r,i=fn(t);if(e){var n=fn(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==an(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function hn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(hn=function(){return!!t})()}function fn(t){return fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fn(t)}it(on,n),k({Container:{line:nt((function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return on.prototype.plot.apply(this.put(new on),null!=e[0]?e:[0,0,0,0])}))}}),K(on,"Line");var dn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cn(t,e)}(n,t);var e,r,i=un(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("marker",t),e)}return e=n,r=[{key:"height",value:function(t){return this.attr("markerHeight",t)}},{key:"orient",value:function(t){return this.attr("orient",t)}},{key:"ref",value:function(t,e){return this.attr("refX",t).attr("refY",e)}},{key:"toString",value:function(){return"url(#"+this.id()+")"}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"width",value:function(t){return this.attr("markerWidth",t)}}],r&&sn(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function pn(t){return pn="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},pn(t)}function gn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bn(t,e)}function bn(t,e){return bn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},bn(t,e)}function yn(t){var e=vn();return function(){var r,i=mn(t);if(e){var n=mn(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==pn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function vn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(vn=function(){return!!t})()}function mn(t){return mn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},mn(t)}function xn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wn(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,kn(i.key),i)}}function Sn(t,e,r){return e&&wn(t.prototype,e),r&&wn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function kn(t){var e=function(t){if("object"!=pn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=pn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==pn(e)?e:e+""}function An(t,e){return function(r){return null==r?this[t]:(this[t]=r,e&&e.call(this),this)}}k({Container:{marker:function(){var t;return(t=this.defs()).marker.apply(t,arguments)}},Defs:{marker:nt((function(t,e,r){return this.put(new dn).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(r)}))},marker:{marker:function(t,e,r,i){var n=["marker"];return"all"!==t&&n.push(t),n=n.join("-"),t=arguments[1]instanceof dn?arguments[1]:this.defs().marker(e,r,i),this.attr(n,t)}}}),K(dn,"Marker");var On={"-":function(t){return t},"<>":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)},bezier:function(t,e,r,i){return function(n){return n<0?t>0?e/t*n:r>0?i/r*n:0:n>1?r<1?(1-i)/(1-r)*n+(i-r)/(1-r):t<1?(1-e)/(1-t)*n+(e-t)/(1-t):1:3*n*Math.pow(1-n,2)*e+3*Math.pow(n,2)*(1-n)*i+Math.pow(n,3)}},steps:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"end";e=e.split("-").reverse()[0];var r=t;return"none"===e?--r:"both"===e&&++r,function(i){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=Math.floor(i*t),a=i*o%1==0;return"start"!==e&&"both"!==e||++o,n&&a&&--o,i>=0&&o<0&&(o=0),i<=1&&o>r&&(o=r),o/r}}},Pn=function(){function t(){xn(this,t)}return Sn(t,[{key:"done",value:function(){return!1}}]),t}(),Cn=function(t){gn(r,t);var e=yn(r);function r(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:">";return xn(this,r),(t=e.call(this)).ease=On[i]||i,t}return Sn(r,[{key:"step",value:function(t,e,r){return"number"!=typeof t?r<1?t:e:t+(e-t)*this.ease(r)}}]),r}(Pn),jn=function(t){gn(r,t);var e=yn(r);function r(t){var i;return xn(this,r),(i=e.call(this)).stepper=t,i}return Sn(r,[{key:"done",value:function(t){return t.done}},{key:"step",value:function(t,e,r,i){return this.stepper(t,e,r,i)}}]),r}(Pn);function Tn(){var t=(this._duration||500)/1e3,e=this._overshoot||0,r=Math.PI,i=Math.log(e/100+1e-10),n=-i/Math.sqrt(r*r+i*i),o=3.9/(n*t);this.d=2*n*o,this.k=o*o}it(function(t){gn(r,t);var e=yn(r);function r(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return xn(this,r),(t=e.call(this)).duration(i).overshoot(n),t}return Sn(r,[{key:"step",value:function(t,e,r,i){if("string"==typeof t)return t;if(i.done=r===1/0,r===1/0)return e;if(0===r)return t;r>100&&(r=16),r/=1e3;var n=i.velocity||0,o=-this.d*n-this.k*(t-e),a=t+n*r+o*r*r/2;return i.velocity=n+o*r,i.done=Math.abs(e-a)+Math.abs(n)<.002,i.done?e:a}}]),r}(jn),{duration:An("_duration",Tn),overshoot:An("_overshoot",Tn)});var En=function(t){gn(r,t);var e=yn(r);function r(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.01,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e3;return xn(this,r),(t=e.call(this)).p(i).i(n).d(o).windup(a),t}return Sn(r,[{key:"step",value:function(t,e,r,i){if("string"==typeof t)return t;if(i.done=r===1/0,r===1/0)return e;if(0===r)return t;var n=e-t,o=(i.integral||0)+n*r,a=(n-(i.error||0))/r,s=this._windup;return!1!==s&&(o=Math.max(-s,Math.min(o,s))),i.error=n,i.integral=o,i.done=Math.abs(n)<.001,i.done?e:t+(this.P*n+this.I*o+this.D*a)}}]),r}(jn);it(En,{windup:An("_windup"),p:An("P"),i:An("I"),d:An("D")});for(var Mn={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Ln={M:function(t,e,r){return e.x=r.x=t[0],e.y=r.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,r){return e.x=r.x,e.y=r.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]]}},In="mlhvqtcsaz".split(""),_n=0,Rn=In.length;_n<Rn;++_n)Ln[In[_n]]=function(t){return function(e,r,i){if("H"===t)e[0]=e[0]+r.x;else if("V"===t)e[0]=e[0]+r.y;else if("A"===t)e[5]=e[5]+r.x,e[6]=e[6]+r.y;else for(var n=0,o=e.length;n<o;++n)e[n]=e[n]+(n%2?r.y:r.x);return Ln[t](e,r,i)}}(In[_n].toUpperCase());function zn(t){return t.segment.length&&t.segment.length-1===Mn[t.segment[0].toUpperCase()]}function Xn(t,e){t.inNumber&&Dn(t,!1);var r=yt.test(e);if(r)t.segment=[e];else{var i=t.lastCommand,n=i.toLowerCase(),o=i===n;t.segment=["m"===n?o?"l":"L":i]}return t.inSegment=!0,t.lastCommand=t.segment[0],r}function Dn(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,zn(t)&&Yn(t)}function Yn(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){var e=t.segment[0];return Ln[e](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function Hn(t){if(!t.segment.length)return!1;var e="A"===t.segment[0].toUpperCase(),r=t.segment.length;return e&&(4===r||5===r)}function Fn(t){return"E"===t.lastToken.toUpperCase()}var Bn=new Set([" ",",","\t","\n","\r","\f"]);function Nn(t){return Nn="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},Nn(t)}function Wn(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Gn(i.key),i)}}function Gn(t){var e=function(t){if("object"!=Nn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Nn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Nn(e)?e:e+""}function Vn(t,e){return Vn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Vn(t,e)}function Un(t){var e=qn();return function(){var r,i=Zn(t);if(e){var n=Zn(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Nn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function qn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(qn=function(){return!!t})()}function Zn(t){return Zn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Zn(t)}var $n=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vn(t,e)}(n,t);var e,r,i=Un(n);function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.apply(this,arguments)}return e=n,r=[{key:"bbox",value:function(){return Ft().path.setAttribute("d",this.toString()),new Vt(Ft.nodes.path.getBBox())}},{key:"move",value:function(t,e){var r=this.bbox();if(t-=r.x,e-=r.y,!isNaN(t)&&!isNaN(e))for(var i,n=this.length-1;n>=0;n--)"M"===(i=this[n][0])||"L"===i||"T"===i?(this[n][1]+=t,this[n][2]+=e):"H"===i?this[n][1]+=t:"V"===i?this[n][1]+=e:"C"===i||"S"===i||"Q"===i?(this[n][1]+=t,this[n][2]+=e,this[n][3]+=t,this[n][4]+=e,"C"===i&&(this[n][5]+=t,this[n][6]+=e)):"A"===i&&(this[n][6]+=t,this[n][7]+=e);return this}},{key:"parse",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"M0 0";return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t){for(var e=0,r="",i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:!(arguments.length>1&&void 0!==arguments[1])||arguments[1],p0:new Rt,p:new Rt};i.lastToken=r,r=t.charAt(e++);)if(i.inSegment||!Xn(i,r))if("."!==r)if(isNaN(parseInt(r)))if(Bn.has(r))i.inNumber&&Dn(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(yt.test(r)){if(i.inNumber)Dn(i,!1);else{if(!zn(i))throw new Error("parser Error");Yn(i)}--e}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!Fn(i)){Dn(i,!1),--e;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||Hn(i)){i.inNumber=!0,i.number=r,Dn(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){Dn(i,!1),--e;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&Dn(i,!1),i.inSegment&&zn(i)&&Yn(i),i.segments}(t)}},{key:"size",value:function(t,e){var r,i,n=this.bbox();for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)"M"===(i=this[r][0])||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*t/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*e/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y,this[r][3]=(this[r][3]-n.x)*t/n.width+n.x,this[r][4]=(this[r][4]-n.y)*e/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*t/n.width+n.x,this[r][6]=(this[r][6]-n.y)*e/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*t/n.width,this[r][2]=this[r][2]*e/n.height,this[r][6]=(this[r][6]-n.x)*t/n.width+n.x,this[r][7]=(this[r][7]-n.y)*e/n.height+n.y);return this}},{key:"toString",value:function(){return function(t){for(var e="",r=0,i=t.length;r<i;r++)e+=t[r][0],null!=t[r][1]&&(e+=t[r][1],null!=t[r][2]&&(e+=" ",e+=t[r][2],null!=t[r][3]&&(e+=" ",e+=t[r][3],e+=" ",e+=t[r][4],null!=t[r][5]&&(e+=" ",e+=t[r][5],e+=" ",e+=t[r][6],null!=t[r][7]&&(e+=" ",e+=t[r][7])))));return e+" "}(this)}}],r&&Wn(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_e);function Jn(t){return function(t){if(Array.isArray(t))return Qn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Qn(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Qn(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qn(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function Kn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function to(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,ro(i.key),i)}}function eo(t,e,r){return e&&to(t.prototype,e),r&&to(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function ro(t){var e=function(t){if("object"!=io(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=io(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==io(e)?e:e+""}function io(t){return io="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},io(t)}var no=function(t){var e=io(t);return"number"===e?De:"string"===e?Mt.isColor(t)?Mt:bt.test(t)?yt.test(t)?$n:_e:ot.test(t)?De:ao:uo.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?_e:"object"===e?co:ao},oo=function(){function t(e){Kn(this,t),this._stepper=e||new Cn("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}return eo(t,[{key:"at",value:function(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}},{key:"done",value:function(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}},{key:"from",value:function(t){return null==t?this._from:(this._from=this._set(t),this)}},{key:"stepper",value:function(t){return null==t?this._stepper:(this._stepper=t,this)}},{key:"to",value:function(t){return null==t?this._to:(this._to=this._set(t),this)}},{key:"type",value:function(t){return null==t?this._type:(this._type=t,this)}},{key:"_set",value:function(t){this._type||this.type(no(t));var e=new this._type(t);return this._type===Mt&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===co&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}]),t}(),ao=function(){function t(){Kn(this,t),this.init.apply(this,arguments)}return eo(t,[{key:"init",value:function(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}},{key:"toArray",value:function(){return[this.value]}},{key:"valueOf",value:function(){return this.value}}]),t}(),so=function(){function t(){Kn(this,t),this.init.apply(this,arguments)}return eo(t,[{key:"init",value:function(e){return Array.isArray(e)&&(e={scaleX:e[0],scaleY:e[1],shear:e[2],rotate:e[3],translateX:e[4],translateY:e[5],originX:e[6],originY:e[7]}),Object.assign(this,t.defaults,e),this}},{key:"toArray",value:function(){var t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}]),t}();so.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};var lo=function(t,e){return t[0]<e[0]?-1:t[0]>e[0]?1:0},co=function(){function t(){Kn(this,t),this.init.apply(this,arguments)}return eo(t,[{key:"align",value:function(t){for(var e=this.values,r=0,i=e.length;r<i;++r)if(e[r+1]!==t[r+1]){if(!t[r+1])return this;var n=(new t[r+1]).toArray(),o=e[r+2]+3;e.splice.apply(e,[r,o,t[r],t[r+1],t[r+2]].concat(Jn(n))),r+=e[r+2]+2}else{if(e[r+1]===Mt&&t[r+7]!==e[r+7]){var a,s=t[r+7],l=new Mt(this.values.splice(r+3,5))[s]().toArray();(a=this.values).splice.apply(a,[r+3,0].concat(Jn(l)))}r+=e[r+2]+2}return this}},{key:"init",value:function(t){if(this.values=[],!Array.isArray(t)){t=t||{};var e=[];for(var r in t){var i=no(t[r]),n=new i(t[r]).toArray();e.push([r,i,n.length].concat(Jn(n)))}return e.sort(lo),this.values=e.reduce((function(t,e){return t.concat(e)}),[]),this}this.values=t.slice()}},{key:"toArray",value:function(){return this.values}},{key:"valueOf",value:function(){for(var t={},e=this.values;e.length;){var r=e.shift(),i=e.shift(),n=e.shift(),o=e.splice(0,n);t[r]=new i(o)}return t}}]),t}(),uo=[ao,so,co];function ho(t){return ho="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},ho(t)}function fo(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,po(i.key),i)}}function po(t){var e=function(t){if("object"!=ho(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ho(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ho(e)?e:e+""}function go(t,e){return go=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},go(t,e)}function bo(t){var e=yo();return function(){var r,i=vo(t);if(e){var n=vo(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==ho(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function yo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(yo=function(){return!!t})()}function vo(t){return vo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},vo(t)}var mo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&go(t,e)}(n,t);var e,r,i=bo(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("path",t),e)}return e=n,r=[{key:"array",value:function(){return this._array||(this._array=new $n(this.attr("d")))}},{key:"clear",value:function(){return delete this._array,this}},{key:"height",value:function(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}},{key:"move",value:function(t,e){return this.attr("d",this.array().move(t,e))}},{key:"plot",value:function(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new $n(t))}},{key:"size",value:function(t,e){var r=_(this,t,e);return this.attr("d",this.array().size(r.width,r.height))}},{key:"width",value:function(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}},{key:"x",value:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}},{key:"y",value:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}],r&&fo(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function xo(){return this._array||(this._array=new Gi(this.attr("points")))}function wo(){return delete this._array,this}function So(t,e){return this.attr("points",this.array().move(t,e))}function ko(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new Gi(t))}function Ao(t,e){var r=_(this,t,e);return this.attr("points",this.array().size(r.width,r.height))}function Oo(t){return Oo="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},Oo(t)}function Po(t,e){return Po=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Po(t,e)}function Co(t){var e=jo();return function(){var r,i=To(t);if(e){var n=To(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Oo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function jo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(jo=function(){return!!t})()}function To(t){return To=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},To(t)}mo.prototype.MorphArray=$n,k({Container:{path:nt((function(t){return this.put(new mo).plot(t||new $n)}))}}),K(mo,"Path");var Eo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Po(t,e)}(r,t);var e=Co(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("polygon",t),i)}return r}(_r);function Mo(t){return Mo="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},Mo(t)}function Lo(t,e){return Lo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Lo(t,e)}function Io(t){var e=_o();return function(){var r,i=Ro(t);if(e){var n=Ro(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Mo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function _o(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_o=function(){return!!t})()}function Ro(t){return Ro=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ro(t)}k({Container:{polygon:nt((function(t){return this.put(new Eo).plot(t||new Gi)}))}}),it(Eo,n),it(Eo,o),K(Eo,"Polygon");var zo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lo(t,e)}(r,t);var e=Io(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("polyline",t),i)}return r}(_r);function Xo(t){return Xo="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},Xo(t)}function Do(t,e){return Do=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Do(t,e)}function Yo(t){var e=Ho();return function(){var r,i=Fo(t);if(e){var n=Fo(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Xo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Ho(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ho=function(){return!!t})()}function Fo(t){return Fo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fo(t)}k({Container:{polyline:nt((function(t){return this.put(new zo).plot(t||new Gi)}))}}),it(zo,n),it(zo,o),K(zo,"Polyline");var Bo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Do(t,e)}(r,t);var e=Yo(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("rect",t),i)}return r}(_r);function No(t){return No="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},No(t)}function Wo(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Go(i.key),i)}}function Go(t){var e=function(t){if("object"!=No(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=No(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==No(e)?e:e+""}it(Bo,{rx:Rr,ry:zr}),k({Container:{rect:nt((function(t,e){return this.put(new Bo).size(t,e)}))}}),K(Bo,"Rect");var Vo=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._first=null,this._last=null}var e,r;return e=t,(r=[{key:"first",value:function(){return this._first&&this._first.value}},{key:"last",value:function(){return this._last&&this._last.value}},{key:"push",value:function(t){var e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}},{key:"remove",value:function(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}},{key:"shift",value:function(){var t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}])&&Wo(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Uo={nextDraw:null,frames:new Vo,timeouts:new Vo,immediates:new Vo,timer:function(){return B.window.performance||B.window.Date},transforms:[],frame:function(t){var e=Uo.frames.push({run:t});return null===Uo.nextDraw&&(Uo.nextDraw=B.window.requestAnimationFrame(Uo._draw)),e},timeout:function(t,e){e=e||0;var r=Uo.timer().now()+e,i=Uo.timeouts.push({run:t,time:r});return null===Uo.nextDraw&&(Uo.nextDraw=B.window.requestAnimationFrame(Uo._draw)),i},immediate:function(t){var e=Uo.immediates.push(t);return null===Uo.nextDraw&&(Uo.nextDraw=B.window.requestAnimationFrame(Uo._draw)),e},cancelFrame:function(t){null!=t&&Uo.frames.remove(t)},clearTimeout:function(t){null!=t&&Uo.timeouts.remove(t)},cancelImmediate:function(t){null!=t&&Uo.immediates.remove(t)},_draw:function(t){for(var e=null,r=Uo.timeouts.last();(e=Uo.timeouts.shift())&&(t>=e.time?e.run():Uo.timeouts.push(e),e!==r););for(var i=null,n=Uo.frames.last();i!==n&&(i=Uo.frames.shift());)i.run(t);for(var o=null;o=Uo.immediates.shift();)o();Uo.nextDraw=Uo.timeouts.first()||Uo.frames.first()?B.window.requestAnimationFrame(Uo._draw):null}};const qo=Uo;function Zo(t){return Zo="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},Zo(t)}function $o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function Jo(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Qo(i.key),i)}}function Qo(t){var e=function(t){if("object"!=Zo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Zo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Zo(e)?e:e+""}function Ko(t,e){return Ko=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ko(t,e)}function ta(t){var e=ea();return function(){var r,i=ra(t);if(e){var n=ra(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Zo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function ea(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ea=function(){return!!t})()}function ra(t){return ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ra(t)}var ia=function(t){var e=t.start,r=t.runner.duration();return{start:e,duration:r,end:e+r,runner:t.runner}},na=function(){var t=B.window;return(t.performance||t.Date).now()},oa=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ko(t,e)}(n,t);var e,r,i=ta(n);function n(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:na;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(t=i.call(this))._timeSource=e,t.terminate(),t}return e=n,r=[{key:"active",value:function(){return!!this._nextFrame}},{key:"finish",value:function(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}},{key:"getEndTime",value:function(){var t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}},{key:"getEndTimeOfTimeline",value:function(){var t=this._runners.map((function(t){return t.start+t.runner.duration()}));return Math.max.apply(Math,[0].concat(function(t){return function(t){if(Array.isArray(t))return $o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return $o(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$o(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t)))}},{key:"getLastRunnerInfo",value:function(){return this.getRunnerInfoById(this._lastRunnerId)}},{key:"getRunnerInfoById",value:function(t){return this._runners[this._runnerIds.indexOf(t)]||null}},{key:"pause",value:function(){return this._paused=!0,this._continue()}},{key:"persist",value:function(t){return null==t?this._persist:(this._persist=t,this)}},{key:"play",value:function(){return this._paused=!1,this.updateTime()._continue()}},{key:"reverse",value:function(t){var e=this.speed();if(null==t)return this.speed(-e);var r=Math.abs(e);return this.speed(t?-r:r)}},{key:"schedule",value:function(t,e,r){if(null==t)return this._runners.map(ia);var i=0,n=this.getEndTime();if(e=e||0,null==r||"last"===r||"after"===r)i=n;else if("absolute"===r||"start"===r)i=e,e=0;else if("now"===r)i=this._time;else if("relative"===r){var o=this.getRunnerInfoById(t.id);o&&(i=o.start+e,e=0)}else{if("with-last"!==r)throw new Error('Invalid value for the "when" parameter');var a=this.getLastRunnerInfo();i=a?a.start:this._time}t.unschedule(),t.timeline(this);var s=t.persist(),l={persist:null===s?this._persist:s,start:i+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(l),this._runners.sort((function(t,e){return t.start-e.start})),this._runnerIds=this._runners.map((function(t){return t.runner.id})),this.updateTime()._continue(),this}},{key:"seek",value:function(t){return this.time(this._time+t)}},{key:"source",value:function(t){return null==t?this._timeSource:(this._timeSource=t,this)}},{key:"speed",value:function(t){return null==t?this._speed:(this._speed=t,this)}},{key:"stop",value:function(){return this.time(0),this.pause()}},{key:"time",value:function(t){return null==t?this._time:(this._time=t,this._continue(!0))}},{key:"unschedule",value:function(t){var e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}},{key:"updateTime",value:function(){return this.active()||(this._lastSourceTime=this._timeSource()),this}},{key:"_continue",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return qo.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=qo.frame(this._step)),this)}},{key:"_stepFn",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._timeSource(),r=e-this._lastSourceTime;t&&(r=0);var i=this._speed*r+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=i,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(var n=this._runners.length;n--;){var o=this._runners[n],a=o.runner;this._time-o.start<=0&&a.reset()}for(var s=!1,l=0,c=this._runners.length;l<c;l++){var u=this._runners[l],h=u.runner,f=i,d=this._time-u.start;d<=0?s=!0:(d<f&&(f=d),h.active()&&(h.step(f).done?!0!==u.persist&&h.duration()-h.time()+this._time+u.persist<this._time&&(h.unschedule(),--l,--c):s=!0))}return s&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}},{key:"terminate",value:function(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}],r&&Jo(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Se);function aa(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function sa(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function la(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?sa(Object(r),!0).forEach((function(e){ca(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):sa(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ca(t,e,r){return(e=pa(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ua(t){return ua="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},ua(t)}function ha(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fa(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,pa(i.key),i)}}function da(t,e,r){return e&&fa(t.prototype,e),r&&fa(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function pa(t){var e=function(t){if("object"!=ua(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ua(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ua(e)?e:e+""}function ga(t,e){return ga=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ga(t,e)}function ba(t){var e=ya();return function(){var r,i=va(t);if(e){var n=va(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==ua(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function ya(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ya=function(){return!!t})()}function va(t){return va=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},va(t)}k({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new oa,this._timeline):(this._timeline=t,this)}}});var ma=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ga(t,e)}(r,t);var e=ba(r);function r(t){var i;return ha(this,r),(i=e.call(this)).id=r.id++,t="function"==typeof(t=null==t?400:t)?new jn(t):t,i._element=null,i._timeline=null,i.done=!1,i._queue=[],i._duration="number"==typeof t&&t,i._isDeclarative=t instanceof jn,i._stepper=i._isDeclarative?t:new Cn,i._history={},i.enabled=!0,i._time=0,i._lastTime=0,i._reseted=!0,i.transforms=new Ht,i.transformId=1,i._haveReversed=!1,i._reverse=!1,i._loopsDone=0,i._swing=!1,i._wait=0,i._times=1,i._frameId=null,i._persist=!!i._isDeclarative||null,i}return da(r,[{key:"active",value:function(t){return null==t?this.enabled:(this.enabled=t,this)}},{key:"addTransform",value:function(t){return this.transforms.lmultiplyO(t),this}},{key:"after",value:function(t){return this.on("finished",t)}},{key:"animate",value:function(t,e,i){var n=r.sanitise(t,e,i),o=new r(n.duration);return this._timeline&&o.timeline(this._timeline),this._element&&o.element(this._element),o.loop(n).schedule(n.delay,n.when)}},{key:"clearTransform",value:function(){return this.transforms=new Ht,this}},{key:"clearTransformsFromQueue",value:function(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((function(t){return!t.isTransform})))}},{key:"delay",value:function(t){return this.animate(0,t)}},{key:"duration",value:function(){return this._times*(this._wait+this._duration)-this._wait}},{key:"during",value:function(t){return this.queue(null,t)}},{key:"ease",value:function(t){return this._stepper=new Cn(t),this}},{key:"element",value:function(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}},{key:"finish",value:function(){return this.step(1/0)}},{key:"loop",value:function(t,e,r){return"object"===ua(t)&&(e=t.swing,r=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=r||0,!0===this._times&&(this._times=1/0),this}},{key:"loops",value:function(t){var e=this._duration+this._wait;if(null==t){var r=Math.floor(this._time/e),i=(this._time-r*e)/this._duration;return Math.min(r+i,this._times)}var n=t%1,o=e*Math.floor(t)+this._duration*n;return this.time(o)}},{key:"persist",value:function(t){return null==t?this._persist:(this._persist=t,this)}},{key:"position",value:function(t){var e,r=this._time,i=this._duration,n=this._wait,o=this._times,a=this._swing,s=this._reverse;if(null==t){var l=function(t){var e=a*Math.floor(t%(2*(n+i))/(n+i)),r=e&&!s||!e&&s,o=Math.pow(-1,r)*(t%(n+i))/i+r;return Math.max(Math.min(o,1),0)},c=o*(n+i)-n;return e=r<=0?Math.round(l(1e-5)):r<c?l(r):Math.round(l(c-1e-5))}var u=Math.floor(this.loops()),h=a&&u%2==0;return e=u+(h&&!s||s&&h?t:1-t),this.loops(e)}},{key:"progress",value:function(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}},{key:"queue",value:function(t,e,r,i){return this._queue.push({initialiser:t||ke,runner:e||ke,retarget:r,isTransform:i,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}},{key:"reset",value:function(){return this._reseted||(this.time(0),this._reseted=!0),this}},{key:"reverse",value:function(t){return this._reverse=null==t?!this._reverse:t,this}},{key:"schedule",value:function(t,e,r){if(t instanceof oa||(r=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,r),this}},{key:"step",value:function(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;var e=this.position(),r=this._lastPosition!==e&&this._time>=0;this._lastPosition=e;var i=this.duration(),n=this._lastTime<=0&&this._time>0,o=this._lastTime<i&&this._time>=i;this._lastTime=this._time,n&&this.fire("start",this);var a=this._isDeclarative;this.done=!a&&!o&&this._time>=i,this._reseted=!1;var s=!1;return(r||a)&&(this._initialise(r),this.transforms=new Ht,s=this._run(a?t:e),this.fire("step",this)),this.done=this.done||s&&a,o&&this.fire("finished",this),this}},{key:"time",value:function(t){if(null==t)return this._time;var e=t-this._time;return this.step(e),this}},{key:"timeline",value:function(t){return void 0===t?this._timeline:(this._timeline=t,this)}},{key:"unschedule",value:function(){var t=this.timeline();return t&&t.unschedule(this),this}},{key:"_initialise",value:function(t){if(t||this._isDeclarative)for(var e=0,r=this._queue.length;e<r;++e){var i=this._queue[e],n=this._isDeclarative||!i.initialised&&t;t=!i.finished,n&&t&&(i.initialiser.call(this),i.initialised=!0)}}},{key:"_rememberMorpher",value:function(t,e){if(this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){var r=this.timeline();r&&r.play()}}},{key:"_run",value:function(t){for(var e=!0,r=0,i=this._queue.length;r<i;++r){var n=this._queue[r],o=n.runner.call(this,t);n.finished=n.finished||!0===o,e=e&&n.finished}return e}},{key:"_tryRetarget",value:function(t,e,r){if(this._history[t]){if(!this._history[t].caller.initialised){var i=this._queue.indexOf(this._history[t].caller);return this._queue.splice(i,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,e,r):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;var n=this.timeline();return n&&n.play(),!0}return!1}}],[{key:"sanitise",value:function(t,e,r){var i,n,o,a,s,l,c,u=1,h=!1,f=0;return e=null!==(n=e)&&void 0!==n?n:0,r=r||"last","object"!==ua(t=null!==(i=t)&&void 0!==i?i:400)||t instanceof Pn||(e=null!==(o=t.delay)&&void 0!==o?o:e,r=null!==(a=t.when)&&void 0!==a?a:r,h=t.swing||h,u=null!==(s=t.times)&&void 0!==s?s:u,f=null!==(l=t.wait)&&void 0!==l?l:f,t=null!==(c=t.duration)&&void 0!==c?c:400),{duration:t,delay:e,swing:h,times:u,wait:f,when:r}}}]),r}(Se);ma.id=0;var xa=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Ht,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];ha(this,t),this.transforms=e,this.id=r,this.done=i}return da(t,[{key:"clearTransformsFromQueue",value:function(){}}]),t}();it([ma,xa],{mergeWith:function(t){return new xa(t.transforms.lmultiply(this.transforms),t.id)}});var wa=function(t,e){return t.lmultiplyO(e)},Sa=function(t){return t.transforms};function ka(){var t=this._transformationRunners.runners.map(Sa).reduce(wa,new Ht);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}var Aa=function(){function t(){ha(this,t),this.runners=[],this.ids=[]}return da(t,[{key:"add",value:function(t){if(!this.runners.includes(t)){var e=t.id+1;return this.runners.push(t),this.ids.push(e),this}}},{key:"clearBefore",value:function(t){var e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new xa).forEach((function(t){return t.clearTransformsFromQueue()})),this}},{key:"edit",value:function(t,e){var r=this.ids.indexOf(t+1);return this.ids.splice(r,1,t+1),this.runners.splice(r,1,e),this}},{key:"getByID",value:function(t){return this.runners[this.ids.indexOf(t+1)]}},{key:"length",value:function(){return this.ids.length}},{key:"merge",value:function(){for(var t=null,e=0;e<this.runners.length;++e){var r=this.runners[e];if(!(t&&r.done&&t.done)||r._timeline&&r._timeline._runnerIds.includes(r.id)||t._timeline&&t._timeline._runnerIds.includes(t.id))t=r;else{this.remove(r.id);var i=r.mergeWith(t);this.edit(t.id,i),t=i,--e}}return this}},{key:"remove",value:function(t){var e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}}]),t}();function Oa(t){return Oa="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},Oa(t)}function Pa(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Ca(i.key),i)}}function Ca(t){var e=function(t){if("object"!=Oa(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Oa(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Oa(e)?e:e+""}function ja(){return ja="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var i=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=La(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:r):n.value}},ja.apply(null,arguments)}function Ta(t,e){return Ta=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ta(t,e)}function Ea(t){var e=Ma();return function(){var r,i=La(t);if(e){var n=La(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Oa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Ma(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ma=function(){return!!t})()}function La(t){return La=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},La(t)}k({Element:{animate:function(t,e,r){var i=ma.sanitise(t,e,r),n=this.timeline();return new ma(i.duration).loop(i).element(this).timeline(n.play()).schedule(i.delay,i.when)},delay:function(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore:function(t){this._transformationRunners.clearBefore(t.id)},_currentTransform:function(t){return this._transformationRunners.runners.filter((function(e){return e.id<=t.id})).map(Sa).reduce(wa,new Ht)},_addRunner:function(t){this._transformationRunners.add(t),qo.cancelImmediate(this._frameId),this._frameId=qo.immediate(ka.bind(this))},_prepareRunner:function(){null==this._frameId&&(this._transformationRunners=(new Aa).add(new xa(new Ht(this))))}}}),it(ma,{attr:function(t,e){return this.styleAttr("attr",t,e)},css:function(t,e){return this.styleAttr("css",t,e)},styleAttr:function(t,e,r){if("string"==typeof e)return this.styleAttr(t,ca({},e,r));var i=e;if(this._tryRetarget(t,i))return this;var n=new oo(this._stepper).to(i),o=Object.keys(i);return this.queue((function(){n=n.from(this.element()[t](o))}),(function(e){return this.element()[t](n.at(e).valueOf()),n.done()}),(function(e){var r,a=Object.keys(e),s=(r=o,a.filter((function(t){return!r.includes(t)})));if(s.length){var l=this.element()[t](s),c=new co(n.from()).valueOf();Object.assign(c,l),n.from(c)}var u=new co(n.to()).valueOf();Object.assign(u,e),n.to(u),o=a,i=e})),this._rememberMorpher(t,n),this},zoom:function(t,e){if(this._tryRetarget("zoom",t,e))return this;var r=new oo(this._stepper).to(new De(t));return this.queue((function(){r=r.from(this.element().zoom())}),(function(t){return this.element().zoom(r.at(t),e),r.done()}),(function(t,i){e=i,r.to(t)})),this._rememberMorpher("zoom",r),this},transform:function(t,e,r){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;var i=Ht.isMatrixLike(t);r=null!=t.affine?t.affine:null!=r?r:!i;var n,o,a,s,l,c=new oo(this._stepper).type(r?so:Ht);return this.queue((function(){o=o||this.element(),n=n||R(t,o),l=new Ht(e?void 0:o),o._addRunner(this),e||o._clearTransformRunnersBefore(this)}),(function(u){e||this.clearTransform();var h,f=new Rt(n).transform(o._currentTransform(this)),d=f.x,p=f.y,g=new Ht(la(la({},t),{},{origin:[d,p]})),b=this._isDeclarative&&a?a:l;if(r){g=g.decompose(d,p),b=b.decompose(d,p);var y=g.rotate,v=b.rotate,m=[y-360,y,y+360],x=m.map((function(t){return Math.abs(t-v)})),w=Math.min.apply(Math,function(t){if(Array.isArray(t))return aa(t)}(h=x)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(h)||function(t,e){if(t){if("string"==typeof t)return aa(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?aa(t,e):void 0}}(h)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),S=x.indexOf(w);g.rotate=m[S]}e&&(i||(g.rotate=t.rotate||0),this._isDeclarative&&s&&(b.rotate=s)),c.from(b),c.to(g);var k=c.at(u);return s=k.rotate,a=new Ht(k),this.addTransform(a),o._addRunner(this),c.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(n=R(e,o)),t=la(la({},e),{},{origin:n})}),!0),this._isDeclarative&&this._rememberMorpher("transform",c),this},x:function(t){return this._queueNumber("x",t)},y:function(t){return this._queueNumber("y",t)},ax:function(t){return this._queueNumber("ax",t)},ay:function(t){return this._queueNumber("ay",t)},dx:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this._queueNumberDelta("x",t)},dy:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this._queueNumberDelta("y",t)},dmove:function(t,e){return this.dx(t).dy(e)},_queueNumberDelta:function(t,e){if(e=new De(e),this._tryRetarget(t,e))return this;var r=new oo(this._stepper).to(e),i=null;return this.queue((function(){i=this.element()[t](),r.from(i),r.to(i+e)}),(function(e){return this.element()[t](r.at(e)),r.done()}),(function(t){r.to(i+new De(t))})),this._rememberMorpher(t,r),this},_queueObject:function(t,e){if(this._tryRetarget(t,e))return this;var r=new oo(this._stepper).to(e);return this.queue((function(){r.from(this.element()[t]())}),(function(e){return this.element()[t](r.at(e)),r.done()})),this._rememberMorpher(t,r),this},_queueNumber:function(t,e){return this._queueObject(t,new De(e))},cx:function(t){return this._queueNumber("cx",t)},cy:function(t){return this._queueNumber("cy",t)},move:function(t,e){return this.x(t).y(e)},amove:function(t,e){return this.ax(t).ay(e)},center:function(t,e){return this.cx(t).cy(e)},size:function(t,e){var r;return t&&e||(r=this._element.bbox()),t||(t=r.width/r.height*e),e||(e=r.height/r.width*t),this.width(t).height(e)},width:function(t){return this._queueNumber("width",t)},height:function(t){return this._queueNumber("height",t)},plot:function(t,e,r,i){if(4===arguments.length)return this.plot([t,e,r,i]);if(this._tryRetarget("plot",t))return this;var n=new oo(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){n.from(this._element.array())}),(function(t){return this._element.plot(n.at(t)),n.done()})),this._rememberMorpher("plot",n),this},leading:function(t){return this._queueNumber("leading",t)},viewbox:function(t,e,r,i){return this._queueObject("viewbox",new Vt(t,e,r,i))},update:function(t){return"object"!==ua(t)?this.update({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",t.offset),this)}}),it(ma,{rx:Rr,ry:zr,from:si,to:li}),K(ma,"Runner");var Ia=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ta(t,e)}(n,t);var e,r,i=Ea(n);function n(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(e=i.call(this,$("svg",t),r)).namespace(),e}return e=n,(r=[{key:"defs",value:function(){return this.isRoot()?J(this.node.querySelector("defs"))||this.put(new jr):this.root().defs()}},{key:"isRoot",value:function(){return!this.node.parentNode||!(this.node.parentNode instanceof B.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}},{key:"namespace",value:function(){return this.isRoot()?this.attr({xmlns:Y,version:"1.1"}).attr("xmlns:xlink",F,H):this.root().namespace()}},{key:"removeNamespace",value:function(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,H).attr("xmlns:svgjs",null,H)}},{key:"root",value:function(){return this.isRoot()?this:ja(La(n.prototype),"root",this).call(this)}}])&&Pa(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function _a(t){return _a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_a(t)}function Ra(t,e){return Ra=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ra(t,e)}function za(t){var e=Xa();return function(){var r,i=Da(t);if(e){var n=Da(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==_a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Xa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Xa=function(){return!!t})()}function Da(t){return Da=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Da(t)}k({Container:{nested:nt((function(){return this.put(new Ia)}))}}),K(Ia,"Svg",!0);var Ya=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ra(t,e)}(r,t);var e=za(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("symbol",t),i)}return r}(xr);function Ha(t){return!1===this._build&&this.clear(),this.node.appendChild(B.document.createTextNode(t)),this}function Fa(){return this.node.getComputedTextLength()}function Ba(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)}function Na(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}function Wa(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.bbox();return this.x(t,r).y(e,r)}function Ga(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)}function Va(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)}function Ua(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.bbox();return this.cx(t,r).cy(e,r)}function qa(t){return this.attr("x",t)}function Za(t){return this.attr("y",t)}function $a(t,e){return this.ax(t).ay(e)}function Ja(t){return this._build=!!t,this}function Qa(t){return Qa="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},Qa(t)}function Ka(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,ts(i.key),i)}}function ts(t){var e=function(t){if("object"!=Qa(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Qa(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qa(e)?e:e+""}function es(t,e){return es=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},es(t,e)}function rs(t){var e=is();return function(){var r,i=ns(t);if(e){var n=ns(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Qa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function is(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(is=function(){return!!t})()}function ns(t){return ns=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ns(t)}k({Container:{symbol:nt((function(){return this.put(new Ya)}))}}),K(Ya,"Symbol");var os=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&es(t,e)}(n,t);var e,r,i=rs(n);function n(t){var e,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(r=i.call(this,$("text",t),o)).dom.leading=null!==(e=r.dom.leading)&&void 0!==e?e:new De(1.3),r._rebuild=!0,r._build=!1,r}return e=n,r=[{key:"leading",value:function(t){return null==t?this.dom.leading:(this.dom.leading=new De(t),this.rebuild())}},{key:"rebuild",value:function(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){var e=this,r=0,i=this.dom.leading;this.each((function(t){if(!X(this.node)){var n=B.window.getComputedStyle(this.node).getPropertyValue("font-size"),o=i*new De(n);this.dom.newLined&&(this.attr("x",e.attr("x")),"\n"===this.text()?r+=o:(this.attr("dy",t?o+r:0),r=0))}})),this.fire("rebuild")}return this}},{key:"setData",value:function(t){return this.dom=t,this.dom.leading=new De(t.leading||1.3),this}},{key:"writeDataToDom",value:function(){return D(this,this.dom,{leading:1.3}),this}},{key:"text",value:function(t){if(void 0===t){var e=this.node.childNodes,r=0;t="";for(var i=0,n=e.length;i<n;++i)"textPath"===e[i].nodeName||X(e[i])?0===i&&(r=i+1):(i!==r&&3!==e[i].nodeType&&!0===J(e[i]).dom.newLined&&(t+="\n"),t+=e[i].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(var o=0,a=(t=(t+"").split("\n")).length;o<a;o++)this.newLine(t[o]);return this.build(!1).rebuild()}}],r&&Ka(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function as(t){return as="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},as(t)}function ss(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,ls(i.key),i)}}function ls(t){var e=function(t){if("object"!=as(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=as(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==as(e)?e:e+""}function cs(t,e){return cs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},cs(t,e)}function us(t){var e=hs();return function(){var r,i=fs(t);if(e){var n=fs(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==as(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function hs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(hs=function(){return!!t})()}function fs(t){return fs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fs(t)}it(os,a),k({Container:{text:nt((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.put(new os).text(t)})),plain:nt((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.put(new os).plain(t)}))}}),K(os,"Text");var ds=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cs(t,e)}(n,t);var e,r,i=us(n);function n(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(e=i.call(this,$("tspan",t),r))._build=!1,e}return e=n,r=[{key:"dx",value:function(t){return this.attr("dx",t)}},{key:"dy",value:function(t){return this.attr("dy",t)}},{key:"newLine",value:function(){this.dom.newLined=!0;var t=this.parent();if(!(t instanceof os))return this;var e=t.index(this),r=B.window.getComputedStyle(this.node).getPropertyValue("font-size"),i=t.dom.leading*new De(r);return this.dy(e?i:0).attr("x",t.x())}},{key:"text",value:function(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}],r&&ss(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function ps(t){return ps="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},ps(t)}function gs(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,bs(i.key),i)}}function bs(t){var e=function(t){if("object"!=ps(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ps(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ps(e)?e:e+""}function ys(t,e){return ys=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ys(t,e)}function vs(t){var e=ms();return function(){var r,i=xs(t);if(e){var n=xs(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==ps(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function ms(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ms=function(){return!!t})()}function xs(t){return xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xs(t)}it(ds,a),k({Tspan:{tspan:nt((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=new ds;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.tspan(t).newLine()}}}),K(ds,"Tspan");var ws=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ys(t,e)}(n,t);var e,r,i=vs(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("circle",t),e)}return e=n,(r=[{key:"radius",value:function(t){return this.attr("r",t)}},{key:"rx",value:function(t){return this.attr("r",t)}},{key:"ry",value:function(t){return this.rx(t)}},{key:"size",value:function(t){return this.radius(new De(t).divide(2))}}])&&gs(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function Ss(t){return Ss="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},Ss(t)}function ks(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,As(i.key),i)}}function As(t){var e=function(t){if("object"!=Ss(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ss(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ss(e)?e:e+""}function Os(){return Os="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var i=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ts(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:r):n.value}},Os.apply(null,arguments)}function Ps(t,e){return Ps=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ps(t,e)}function Cs(t){var e=js();return function(){var r,i=Ts(t);if(e){var n=Ts(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Ss(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function js(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(js=function(){return!!t})()}function Ts(t){return Ts=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ts(t)}it(ws,{x:Xr,y:Dr,cx:Yr,cy:Hr,width:Fr,height:Br}),k({Container:{circle:nt((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.put(new ws).size(t).move(0,0)}))}}),K(ws,"Circle");var Es=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ps(t,e)}(n,t);var e,r,i=Cs(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("clipPath",t),e)}return e=n,(r=[{key:"remove",value:function(){return this.targets().forEach((function(t){t.unclip()})),Os(Ts(n.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return oe("svg [clip-path*="+this.id()+"]")}}])&&ks(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function Ms(t){return Ms="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},Ms(t)}function Ls(t,e){return Ls=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ls(t,e)}function Is(t){var e=_s();return function(){var r,i=Rs(t);if(e){var n=Rs(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Ms(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function _s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_s=function(){return!!t})()}function Rs(t){return Rs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Rs(t)}k({Container:{clip:nt((function(){return this.defs().put(new Es)}))},Element:{clipper:function(){return this.reference("clip-path")},clipWith:function(t){var e=t instanceof Es?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip:function(){return this.attr("clip-path",null)}}}),K(Es,"ClipPath");var zs=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ls(t,e)}(r,t);var e=Is(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("foreignObject",t),i)}return r}(ar);function Xs(t,e){return this.children().forEach((function(r){var i;try{i=r.node instanceof N().SVGSVGElement?new Vt(r.attr(["x","y","width","height"])):r.bbox()}catch(t){return}var n=new Ht(r),o=n.translate(t,e).transform(n.inverse()),a=new Rt(i.x,i.y).transform(o);r.move(a.x,a.y)})),this}function Ds(t){return this.dmove(t,0)}function Ys(t){return this.dmove(0,t)}function Hs(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.height:this.size(e.width,t,e)}function Fs(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.bbox(),i=t-r.x,n=e-r.y;return this.dmove(i,n)}function Bs(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.bbox(),i=_(this,t,e,r),n=i.width/r.width,o=i.height/r.height;return this.children().forEach((function(t){var e=new Rt(r).transform(new Ht(t).inverse());t.scale(n,o,e.x,e.y)})),this}function Ns(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.width:this.size(t,e.height,e)}function Ws(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.x:this.move(t,e.y,e)}function Gs(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.y:this.move(e.x,t,e)}function Vs(t){return Vs="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},Vs(t)}function Us(t,e){return Us=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Us(t,e)}function qs(t){var e=Zs();return function(){var r,i=$s(t);if(e){var n=$s(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Vs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Zs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Zs=function(){return!!t})()}function $s(t){return $s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$s(t)}k({Container:{foreignObject:nt((function(t,e){return this.put(new zs).size(t,e)}))}}),K(zs,"ForeignObject");var Js=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Us(t,e)}(r,t);var e=qs(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("g",t),i)}return r}(xr);function Qs(t){return Qs="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},Qs(t)}function Ks(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,tl(i.key),i)}}function tl(t){var e=function(t){if("object"!=Qs(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Qs(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qs(e)?e:e+""}function el(t,e){return el=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},el(t,e)}function rl(t){var e=il();return function(){var r,i=nl(t);if(e){var n=nl(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Qs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function il(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(il=function(){return!!t})()}function nl(t){return nl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},nl(t)}it(Js,s),k({Container:{group:nt((function(){return this.put(new Js)}))}}),K(Js,"G");var ol=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&el(t,e)}(n,t);var e,r,i=rl(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("a",t),e)}return e=n,(r=[{key:"target",value:function(t){return this.attr("target",t)}},{key:"to",value:function(t){return this.attr("href",t,F)}}])&&Ks(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function al(t){return al="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},al(t)}function sl(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,ll(i.key),i)}}function ll(t){var e=function(t){if("object"!=al(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=al(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==al(e)?e:e+""}function cl(){return cl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var i=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=dl(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:r):n.value}},cl.apply(null,arguments)}function ul(t,e){return ul=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ul(t,e)}function hl(t){var e=fl();return function(){var r,i=dl(t);if(e){var n=dl(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==al(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function fl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(fl=function(){return!!t})()}function dl(t){return dl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},dl(t)}it(ol,s),k({Container:{link:nt((function(t){return this.put(new ol).to(t)}))},Element:{unlink:function(){var t=this.linker();if(!t)return this;var e=t.parent();if(!e)return this.remove();var r=e.index(t);return e.add(this,r),t.remove(),this},linkTo:function(t){var e=this.linker();return e||(e=new ol,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker:function(){var t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),K(ol,"A");var pl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ul(t,e)}(n,t);var e,r,i=hl(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("mask",t),e)}return e=n,(r=[{key:"remove",value:function(){return this.targets().forEach((function(t){t.unmask()})),cl(dl(n.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return oe("svg [mask*="+this.id()+"]")}}])&&sl(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function gl(t){return gl="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},gl(t)}function bl(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,yl(i.key),i)}}function yl(t){var e=function(t){if("object"!=gl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=gl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==gl(e)?e:e+""}function vl(t,e){return vl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},vl(t,e)}function ml(t){var e=xl();return function(){var r,i=wl(t);if(e){var n=wl(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==gl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function xl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(xl=function(){return!!t})()}function wl(t){return wl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},wl(t)}k({Container:{mask:nt((function(){return this.defs().put(new pl)}))},Element:{masker:function(){return this.reference("mask")},maskWith:function(t){var e=t instanceof pl?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask:function(){return this.attr("mask",null)}}}),K(pl,"Mask");var Sl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vl(t,e)}(n,t);var e,r,i=ml(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("stop",t),e)}return e=n,r=[{key:"update",value:function(t){return("number"==typeof t||t instanceof De)&&(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 De(t.offset)),this}}],r&&bl(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(ar);function kl(t){return kl="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},kl(t)}function Al(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Ol(t,e,r){return(e=Cl(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Pl(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Cl(i.key),i)}}function Cl(t){var e=function(t){if("object"!=kl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=kl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==kl(e)?e:e+""}function jl(t,e){return jl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},jl(t,e)}function Tl(t){var e=El();return function(){var r,i=Ml(t);if(e){var n=Ml(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==kl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function El(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(El=function(){return!!t})()}function Ml(t){return Ml=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ml(t)}k({Gradient:{stop:function(t,e,r){return this.put(new Sl).update(t,e,r)}}}),K(Sl,"Stop");var Ll=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jl(t,e)}(n,t);var e,r,i=Tl(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("style",t),e)}return e=n,r=[{key:"addText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.node.textContent+=t,this}},{key:"font",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.rule("@font-face",function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Al(Object(r),!0).forEach((function(e){Ol(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Al(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({fontFamily:t,src:e},r))}},{key:"rule",value:function(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;var r=t+"{";for(var i in e)r+=i.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[i]+";";return r+"}"}(t,e))}}],r&&Pl(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(ar);function Il(t){return Il="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},Il(t)}function _l(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Rl(i.key),i)}}function Rl(t){var e=function(t){if("object"!=Il(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Il(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Il(e)?e:e+""}function zl(t,e){return zl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zl(t,e)}function Xl(t){var e=Dl();return function(){var r,i=Yl(t);if(e){var n=Yl(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Il(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Dl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Dl=function(){return!!t})()}function Yl(t){return Yl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Yl(t)}k("Dom",{style:function(t,e){return this.put(new Ll).rule(t,e)},fontface:function(t,e,r){return this.put(new Ll).font(t,e,r)}}),K(Ll,"Style");var Hl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zl(t,e)}(n,t);var e,r,i=Xl(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("textPath",t),e)}return e=n,(r=[{key:"array",value:function(){var t=this.track();return t?t.array():null}},{key:"plot",value:function(t){var e=this.track(),r=null;return e&&(r=e.plot(t)),null==t?r:this}},{key:"track",value:function(){return this.reference("href")}}])&&_l(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(os);function Fl(t){return Fl="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},Fl(t)}function Bl(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Nl(i.key),i)}}function Nl(t){var e=function(t){if("object"!=Fl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Fl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Fl(e)?e:e+""}function Wl(t,e){return Wl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Wl(t,e)}function Gl(t){var e=Vl();return function(){var r,i=Ul(t);if(e){var n=Ul(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Fl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Vl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Vl=function(){return!!t})()}function Ul(t){return Ul=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ul(t)}k({Container:{textPath:nt((function(t,e){return t instanceof os||(t=this.text(t)),t.path(e)}))},Text:{path:nt((function(t){var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=new Hl;if(t instanceof mo||(t=this.defs().path(t)),i.attr("href","#"+t,F),r)for(;e=this.node.firstChild;)i.node.appendChild(e);return this.put(i)})),textPath:function(){return this.findOne("textPath")}},Path:{text:nt((function(t){return t instanceof os||(t=(new os).addTo(this.parent()).text(t)),t.path(this)})),targets:function(){var t=this;return oe("svg textPath").filter((function(e){return(e.attr("href")||"").includes(t.id())}))}}}),Hl.prototype.MorphArray=$n,K(Hl,"TextPath");var ql=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wl(t,e)}(n,t);var e,r,i=Gl(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("use",t),e)}return e=n,(r=[{key:"use",value:function(t,e){return this.attr("href",(e||"")+"#"+t,F)}}])&&Bl(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);k({Container:{use:nt((function(t,e){return this.put(new ql).use(t,e)}))}}),K(ql,"Use");var Zl=Z;function $l(t){return $l="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},$l(t)}function Jl(t){return function(t){if(Array.isArray(t))return Ql(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ql(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ql(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ql(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function Kl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tc(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,rc(i.key),i)}}function ec(t,e,r){return e&&tc(t.prototype,e),r&&tc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function rc(t){var e=function(t){if("object"!=$l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=$l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$l(e)?e:e+""}function ic(){return ic="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var i=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=lc(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:r):n.value}},ic.apply(null,arguments)}function nc(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&oc(t,e)}function oc(t,e){return oc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},oc(t,e)}function ac(t){var e=sc();return function(){var r,i=lc(t);if(e){var n=lc(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==$l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function sc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(sc=function(){return!!t})()}function lc(t){return lc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},lc(t)}it([Ia,Ya,Ri,Pi,dn],A("viewbox")),it([on,zo,Eo,mo],A("marker")),it(os,A("Text")),it(mo,A("Path")),it(jr,A("Defs")),it([os,ds],A("Tspan")),it([Bo,$r,yi,ma],A("radius")),it(Se,A("EventTarget")),it($e,A("Dom")),it(ar,A("Element")),it(_r,A("Shape")),it([xr,ai],A("Container")),it(yi,A("Gradient")),it(ma,A("Runner")),ie.extend(y(new Set(S))),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];uo.push.apply(uo,Jn([].concat(t)))}([De,Mt,Vt,Ht,_e,Gi,$n,Rt]),it(uo,{to:function(t){return(new oo).type(this.constructor).from(this.toArray()).to(t)},fromArray:function(t){return this.init(t),this},toConsumable:function(){return this.toArray()},morph:function(t,e,r,i,n){return this.fromArray(t.map((function(t,o){return i.step(t,e[o],r,n[o],n)})))}});var cc=function(t){nc(r,t);var e=ac(r);function r(t){var i;return Kl(this,r),(i=e.call(this,$("filter",t),t)).$source="SourceGraphic",i.$sourceAlpha="SourceAlpha",i.$background="BackgroundImage",i.$backgroundAlpha="BackgroundAlpha",i.$fill="FillPaint",i.$stroke="StrokePaint",i.$autoSetIn=!0,i}return ec(r,[{key:"put",value:function(t,e){return!(t=ic(lc(r.prototype),"put",this).call(this,t,e)).attr("in")&&this.$autoSetIn&&t.attr("in",this.$source),t.attr("result")||t.attr("result",t.id()),t}},{key:"remove",value:function(){return this.targets().each("unfilter"),ic(lc(r.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return oe('svg [filter*="'+this.id()+'"]')}},{key:"toString",value:function(){return"url(#"+this.id()+")"}}]),r}(ar),uc=function(t){nc(r,t);var e=ac(r);function r(t,i){var n;return Kl(this,r),(n=e.call(this,t,i)).result(n.id()),n}return ec(r,[{key:"in",value:function(t){if(null==t){var e=this.attr("in");return this.parent()&&this.parent().find('[result="'.concat(e,'"]'))[0]||e}return this.attr("in",t)}},{key:"result",value:function(t){return this.attr("result",t)}},{key:"toString",value:function(){return this.result()}}]),r}(ar),hc=function(t){return function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];for(var n=t.length;n--;)null!=r[n]&&this.attr(t[n],r[n])}},fc={blend:hc(["in","in2","mode"]),colorMatrix:hc(["type","values"]),composite:hc(["in","in2","operator"]),convolveMatrix:function(t){t=new _e(t).toString(),this.attr({order:Math.sqrt(t.split(" ").length),kernelMatrix:t})},diffuseLighting:hc(["surfaceScale","lightingColor","diffuseConstant","kernelUnitLength"]),displacementMap:hc(["in","in2","scale","xChannelSelector","yChannelSelector"]),dropShadow:hc(["in","dx","dy","stdDeviation"]),flood:hc(["flood-color","flood-opacity"]),gaussianBlur:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;this.attr("stdDeviation",t+" "+e)},image:function(t){this.attr("href",t,F)},morphology:hc(["operator","radius"]),offset:hc(["dx","dy"]),specularLighting:hc(["surfaceScale","lightingColor","diffuseConstant","specularExponent","kernelUnitLength"]),tile:hc([]),turbulence:hc(["baseFrequency","numOctaves","seed","stitchTiles","type"])};["blend","colorMatrix","componentTransfer","composite","convolveMatrix","diffuseLighting","displacementMap","dropShadow","flood","gaussianBlur","image","merge","morphology","offset","specularLighting","tile","turbulence"].forEach((function(t){var e=I(t),r=fc[t];cc[e+"Effect"]=function(t){nc(n,t);var i=ac(n);function n(t){return Kl(this,n),i.call(this,$("fe"+e,t),t)}return ec(n,[{key:"update",value:function(t){return r.apply(this,t),this}}]),n}(uc),cc.prototype[t]=nt((function(t){var r=new cc[e+"Effect"];if(null==t)return this.put(r);for(var i=arguments.length,n=new Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];return"function"==typeof t?t.call(r,r):n.unshift(t),this.put(r).update(n)}))})),it(cc,{merge:function(t){var e=this.put(new cc.MergeEffect);return"function"==typeof t?(t.call(e,e),e):((t instanceof Array?t:Array.prototype.slice.call(arguments)).forEach((function(t){t instanceof cc.MergeNode?e.put(t):e.mergeNode(t)})),e)},componentTransfer:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.put(new cc.ComponentTransferEffect);if("function"==typeof t)return t.call(e,e),e;for(var r in t.r||t.g||t.b||t.a||(t={r:t,g:t,b:t,a:t}),t)e.add(new(cc["Func"+r.toUpperCase()])(t[r]));return e}}),["distantLight","pointLight","spotLight","mergeNode","FuncR","FuncG","FuncB","FuncA"].forEach((function(t){var e=I(t);cc[e]=function(t){nc(i,t);var r=ac(i);function i(t){return Kl(this,i),r.call(this,$("fe"+e,t),t)}return i}(uc)})),["funcR","funcG","funcB","funcA"].forEach((function(t){var e=cc[I(t)],r=nt((function(){return this.put(new e)}));cc.ComponentTransferEffect.prototype[t]=r})),["distantLight","pointLight","spotLight"].forEach((function(t){var e=cc[I(t)],r=nt((function(){return this.put(new e)}));cc.DiffuseLightingEffect.prototype[t]=r,cc.SpecularLightingEffect.prototype[t]=r})),it(cc.MergeEffect,{mergeNode:function(t){return this.put(new cc.MergeNode).attr("in",t)}}),it(jr,{filter:function(t){var e=this.put(new cc);return"function"==typeof t&&t.call(e,e),e}}),it(xr,{filter:function(t){return this.defs().filter(t)}}),it(ar,{filterWith:function(t){var e=t instanceof cc?t:this.defs().filter(t);return this.attr("filter",e)},unfilter:function(t){return this.attr("filter",null)},filterer:function(){return this.reference("filter")}});var dc={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},diffuseLighting:function(t,e,r,i){return this.parent()&&this.parent().diffuseLighting(t,r,i).in(this)},displacementMap:function(t,e,r,i){return this.parent()&&this.parent().displacementMap(this,t,e,r,i)},dropShadow:function(t,e,r){return this.parent()&&this.parent().dropShadow(this,t,e,r).in(this)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(t){var e;return t=t instanceof Array?t:Jl(t),this.parent()&&(e=this.parent()).merge.apply(e,[this].concat(Jl(t)))},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},specularLighting:function(t,e,r,i,n){return this.parent()&&this.parent().specularLighting(t,r,i,n).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,r,i,n){return this.parent()&&this.parent().turbulence(t,e,r,i,n).in(this)}};function pc(t){return pc="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},pc(t)}function gc(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,bc(i.key),i)}}function bc(t){var e=function(t){if("object"!=pc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=pc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==pc(e)?e:e+""}it(uc,dc),it(cc.MergeEffect,{in:function(t){return t instanceof cc.MergeNode?this.add(t,0):this.add((new cc.MergeNode).in(t),0),this}}),it([cc.CompositeEffect,cc.BlendEffect,cc.DisplacementMapEffect],{in2:function(t){if(null==t){var e=this.attr("in2");return this.parent()&&this.parent().find('[result="'.concat(e,'"]'))[0]||e}return this.attr("in2",t)}}),cc.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]};var yc=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w}var e,r;return e=t,r=[{key:"getDefaultFilter",value:function(t,e){var r=this.w;t.unfilter(!0),(new cc).size("120%","180%","-5%","-40%"),r.config.chart.dropShadow.enabled&&this.dropShadow(t,r.config.chart.dropShadow,e)}},{key:"applyFilter",value:function(t,e,r){var i,n=this,o=this.w;if(t.unfilter(!0),"none"!==r){var a,s,l=o.config.chart.dropShadow,c="lighten"===r?2:.3;t.filterWith((function(t){t.colorMatrix({type:"matrix",values:"\n ".concat(c," 0 0 0 0\n 0 ").concat(c," 0 0 0\n 0 0 ").concat(c," 0 0\n 0 0 0 1 0\n "),in:"SourceGraphic",result:"brightness"}),l.enabled&&n.addShadow(t,e,l,"brightness")})),l.noUserSpaceOnUse||null===(a=t.filterer())||void 0===a||null===(s=a.node)||void 0===s||s.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null===(i=t.filterer())||void 0===i?void 0:i.node)}else this.getDefaultFilter(t,e)}},{key:"addShadow",value:function(t,e,r,i){var n,o=this.w,a=r.blur,s=r.top,l=r.left,c=r.color,u=r.opacity;if(c=Array.isArray(c)?c[e]:c,(null===(n=o.config.chart.dropShadow.enabledOnSeries)||void 0===n?void 0:n.length)>0&&-1===o.config.chart.dropShadow.enabledOnSeries.indexOf(e))return t;t.offset({in:i,dx:l,dy:s,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:a,result:"blur"}),t.flood({"flood-color":c,"flood-opacity":u,result:"flood"}),t.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),t.merge(["shadow",i])}},{key:"dropShadow",value:function(t,e){var r,i,n,o,a,s=this,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,c=this.w;return t.unfilter(!0),f.isMsEdge()&&"radialBar"===c.config.chart.type||(null===(r=c.config.chart.dropShadow.enabledOnSeries)||void 0===r?void 0:r.length)>0&&-1===(null===(n=c.config.chart.dropShadow.enabledOnSeries)||void 0===n?void 0:n.indexOf(l))||(t.filterWith((function(t){s.addShadow(t,l,e,"SourceGraphic")})),e.noUserSpaceOnUse||null===(o=t.filterer())||void 0===o||null===(a=o.node)||void 0===a||a.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null===(i=t.filterer())||void 0===i?void 0:i.node)),t}},{key:"setSelectionFilter",value:function(t,e,r){var i=this.w;if(void 0!==i.globals.selectedDataPoints[e]&&i.globals.selectedDataPoints[e].indexOf(r)>-1){t.node.setAttribute("selected",!0);var n=i.config.states.active.filter;"none"!==n&&this.applyFilter(t,e,n.type)}}},{key:"_scaleFilterSize",value:function(t){t&&function(e){for(var r in e)e.hasOwnProperty(r)&&t.setAttribute(r,e[r])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}],r&&gc(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const vc=yc;function mc(t){return mc="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},mc(t)}function xc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function wc(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?xc(Object(r),!0).forEach((function(e){Sc(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xc(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Sc(t,e,r){return(e=Ac(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function kc(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Ac(i.key),i)}}function Ac(t){var e=function(t){if("object"!=mc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=mc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==mc(e)?e:e+""}var Oc=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w}var e,r,i;return e=t,r=[{key:"roundPathCorners",value:function(t,e){function r(t,e,r){var n=e.x-t.x,o=e.y-t.y,a=Math.sqrt(n*n+o*o);return i(t,e,Math.min(1,r/a))}function i(t,e,r){return{x:t.x+(e.x-t.x)*r,y:t.y+(e.y-t.y)*r}}function n(t,e){t.length>2&&(t[t.length-2]=e.x,t[t.length-1]=e.y)}function o(t){return{x:parseFloat(t[t.length-2]),y:parseFloat(t[t.length-1])}}t.indexOf("NaN")>-1&&(t="");var a=t.split(/[,\s]/).reduce((function(t,e){var r=e.match("([a-zA-Z])(.+)");return r?(t.push(r[1]),t.push(r[2])):t.push(e),t}),[]).reduce((function(t,e){return parseFloat(e)==e&&t.length?t[t.length-1].push(e):t.push([e]),t}),[]),s=[];if(a.length>1){var l=o(a[0]),c=null;"Z"==a[a.length-1][0]&&a[0].length>2&&(c=["L",l.x,l.y],a[a.length-1]=c),s.push(a[0]);for(var u=1;u<a.length;u++){var h=s[s.length-1],f=a[u],d=f==c?a[1]:a[u+1];if(d&&h&&h.length>2&&"L"==f[0]&&d.length>2&&"L"==d[0]){var p,g,b=o(h),y=o(f),v=o(d);p=r(y,b,e),g=r(y,v,e),n(f,p),f.origPoint=y,s.push(f);var m=i(p,y,.5),x=i(y,g,.5),w=["C",m.x,m.y,x.x,x.y,g.x,g.y];w.origPoint=y,s.push(w)}else s.push(f)}if(c){var S=o(s[s.length-1]);s.push(["Z"]),n(s[0],S)}}else s=a;return s.reduce((function(t,e){return t+e.join(" ")+" "}),"")}},{key:"drawLine",value:function(t,e,r,i){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:t,y1:e,x2:r,y2:i,stroke:n,"stroke-dasharray":o,"stroke-width":a,"stroke-linecap":s})}},{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,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,u=this.w.globals.dom.Paper.rect();return u.attr({x:t,y:e,width:r>0?r:0,height:i>0?i:0,rx:n,ry:n,opacity:a,"stroke-width":null!==s?s:0,stroke:null!==l?l:"none","stroke-dasharray":c}),u.node.setAttribute("fill",o),u}},{key:"drawPolygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(t).attr({fill:i,stroke:e,"stroke-width":r})}},{key:"drawCircle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t<0&&(t=0);var r=this.w.globals.dom.Paper.circle(2*t);return null!==e&&r.attr(e),r}},{key:"drawPath",value:function(t){var e=t.d,r=void 0===e?"":e,i=t.stroke,n=void 0===i?"#a8a8a8":i,o=t.strokeWidth,a=void 0===o?1:o,s=t.fill,l=t.fillOpacity,c=void 0===l?1:l,u=t.strokeOpacity,h=void 0===u?1:u,f=t.classes,d=t.strokeLinecap,p=void 0===d?null:d,g=t.strokeDashArray,b=void 0===g?0:g,y=this.w;return null===p&&(p=y.config.stroke.lineCap),(r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r="M 0 ".concat(y.globals.gridHeight)),y.globals.dom.Paper.path(r).attr({fill:s,"fill-opacity":c,stroke:n,"stroke-opacity":h,"stroke-linecap":p,"stroke-width":a,"stroke-dasharray":b,class:f})}},{key:"group",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w.globals.dom.Paper.group();return null!==t&&e.attr(t),e}},{key:"move",value:function(t,e){return["M",t,e].join(" ")}},{key:"line",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=null;return null===r?i=[" L",t,e].join(" "):"H"===r?i=[" H",t].join(" "):"V"===r&&(i=[" V",e].join(" ")),i}},{key:"curve",value:function(t,e,r,i,n,o){return["C",t,e,r,i,n,o].join(" ")}},{key:"quadraticCurve",value:function(t,e,r,i){return["Q",t,e,r,i].join(" ")}},{key:"arc",value:function(t,e,r,i,n,o,a){var s="A";return arguments.length>7&&void 0!==arguments[7]&&arguments[7]&&(s="a"),[s,t,e,r,i,n,o,a].join(" ")}},{key:"renderPaths",value:function(t){var e,r=t.j,i=t.realIndex,n=t.pathFrom,o=t.pathTo,a=t.stroke,s=t.strokeWidth,l=t.strokeLinecap,c=t.fill,u=t.animationDelay,h=t.initialSpeed,f=t.dataChangeSpeed,d=t.className,p=t.chartType,g=t.shouldClipToGrid,y=void 0===g||g,v=t.bindEventsOnPaths,m=void 0===v||v,x=t.drawShadow,w=void 0===x||x,S=this.w,k=new vc(this.ctx),A=new b(this.ctx),O=this.w.config.chart.animations.enabled,P=O&&this.w.config.chart.animations.dynamicAnimation.enabled,C=!!(O&&!S.globals.resized||P&&S.globals.dataChanged&&S.globals.shouldAnimate);C?e=n:(e=o,S.globals.animationEnded=!0);var j,T=S.config.stroke.dashArray;j=Array.isArray(T)?T[i]:S.config.stroke.dashArray;var E=this.drawPath({d:e,stroke:a,strokeWidth:s,fill:c,fillOpacity:1,classes:d,strokeLinecap:l,strokeDashArray:j});E.attr("index",i),y&&("bar"===p&&!S.globals.isHorizontal||S.globals.comboCharts?E.attr({"clip-path":"url(#gridRectBarMask".concat(S.globals.cuid,")")}):E.attr({"clip-path":"url(#gridRectMask".concat(S.globals.cuid,")")})),S.config.chart.dropShadow.enabled&&w&&k.dropShadow(E,S.config.chart.dropShadow,i),m&&(E.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,E)),E.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,E)),E.node.addEventListener("mousedown",this.pathMouseDown.bind(this,E))),E.attr({pathTo:o,pathFrom:n});var M={el:E,j:r,realIndex:i,pathFrom:n,pathTo:o,fill:c,strokeWidth:s,delay:u};return!O||S.globals.resized||S.globals.dataChanged?!S.globals.resized&&S.globals.dataChanged||A.showDelayedElements():A.animatePathsGradually(wc(wc({},M),{},{speed:h})),S.globals.dataChanged&&P&&C&&A.animatePathsGradually(wc(wc({},M),{},{speed:f})),E}},{key:"drawPattern",value:function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return this.w.globals.dom.Paper.pattern(e,r,(function(o){"horizontalLines"===t?o.line(0,0,r,0).stroke({color:i,width:n+1}):"verticalLines"===t?o.line(0,0,0,e).stroke({color:i,width:n+1}):"slantedLines"===t?o.line(0,0,e,r).stroke({color:i,width:n}):"squares"===t?o.rect(e,r).fill("none").stroke({color:i,width:n}):"circles"===t&&o.circle(e).fill("none").stroke({color:i,width:n})}))}},{key:"drawGradient",value:function(t,e,r,i,n){var o,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,u=this.w;e.length<9&&0===e.indexOf("#")&&(e=f.hexToRgba(e,i)),r.length<9&&0===r.indexOf("#")&&(r=f.hexToRgba(r,n));var h=0,d=1,p=1,g=null;null!==s&&(h=void 0!==s[0]?s[0]/100:0,d=void 0!==s[1]?s[1]/100:1,p=void 0!==s[2]?s[2]/100:1,g=void 0!==s[3]?s[3]/100:null);var b=!("donut"!==u.config.chart.type&&"pie"!==u.config.chart.type&&"polarArea"!==u.config.chart.type&&"bubble"!==u.config.chart.type);if(o=l&&0!==l.length?u.globals.dom.Paper.gradient(b?"radial":"linear",(function(t){(Array.isArray(l[c])?l[c]:l).forEach((function(e){t.stop(e.offset/100,e.color,e.opacity)}))})):u.globals.dom.Paper.gradient(b?"radial":"linear",(function(t){t.stop(h,e,i),t.stop(d,r,n),t.stop(p,r,n),null!==g&&t.stop(g,e,i)})),b){var y=u.globals.gridWidth/2,v=u.globals.gridHeight/2;"bubble"!==u.config.chart.type?o.attr({gradientUnits:"userSpaceOnUse",cx:y,cy:v,r:a}):o.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?o.from(0,0).to(0,1):"diagonal"===t?o.from(0,0).to(1,1):"horizontal"===t?o.from(0,1).to(1,1):"diagonal2"===t&&o.from(1,0).to(0,1);return o}},{key:"getTextBasedOnMaxWidth",value:function(t){var e=t.text,r=t.maxWidth,i=t.fontSize,n=t.fontFamily,o=this.getTextRects(e,i,n),a=o.width/e.length,s=Math.floor(r/a);return r<o.width?e.slice(0,s-3)+"...":e}},{key:"drawText",value:function(t){var e=this,r=t.x,i=t.y,n=t.text,o=t.textAnchor,a=t.fontSize,s=t.fontFamily,l=t.fontWeight,c=t.foreColor,u=t.opacity,h=t.maxWidth,f=t.cssClass,d=void 0===f?"":f,p=t.isPlainText,g=void 0===p||p,b=t.dominantBaseline,y=void 0===b?"auto":b,v=this.w;void 0===n&&(n="");var m=n;o||(o="start"),c&&c.length||(c=v.config.chart.foreColor),s=s||v.config.chart.fontFamily,l=l||"regular";var x,w={maxWidth:h,fontSize:a=a||"11px",fontFamily:s};return Array.isArray(n)?x=v.globals.dom.Paper.text((function(t){for(var r=0;r<n.length;r++)m=n[r],h&&(m=e.getTextBasedOnMaxWidth(wc({text:n[r]},w))),0===r?t.tspan(m):t.tspan(m).newLine()})):(h&&(m=this.getTextBasedOnMaxWidth(wc({text:n},w))),x=g?v.globals.dom.Paper.plain(n):v.globals.dom.Paper.text((function(t){return t.tspan(m)}))),x.attr({x:r,y:i,"text-anchor":o,"dominant-baseline":y,"font-size":a,"font-family":s,"font-weight":l,fill:c,class:"apexcharts-text "+d}),x.node.style.fontFamily=s,x.node.style.opacity=u,x}},{key:"getMarkerPath",value:function(t,e,r,i){var n="";switch(r){case"cross":n="M ".concat(t-(i/=1.4)," ").concat(e-i," L ").concat(t+i," ").concat(e+i," M ").concat(t-i," ").concat(e+i," L ").concat(t+i," ").concat(e-i);break;case"plus":n="M ".concat(t-(i/=1.12)," ").concat(e," L ").concat(t+i," ").concat(e," M ").concat(t," ").concat(e-i," L ").concat(t," ").concat(e+i);break;case"star":case"sparkle":var o=5;i*=1.15,"sparkle"===r&&(i/=1.1,o=4);for(var a=Math.PI/o,s=0;s<=2*o;s++){var l=s*a,c=s%2==0?i:i/2;n+=(0===s?"M":"L")+(t+c*Math.sin(l))+","+(e-c*Math.cos(l))}n+="Z";break;case"triangle":n="M ".concat(t," ").concat(e-i," \n L ").concat(t+i," ").concat(e+i," \n L ").concat(t-i," ").concat(e+i," \n Z");break;case"square":case"rect":n="M ".concat(t-(i/=1.125)," ").concat(e-i," \n L ").concat(t+i," ").concat(e-i," \n L ").concat(t+i," ").concat(e+i," \n L ").concat(t-i," ").concat(e+i," \n Z");break;case"diamond":i*=1.05,n="M ".concat(t," ").concat(e-i," \n L ").concat(t+i," ").concat(e," \n L ").concat(t," ").concat(e+i," \n L ").concat(t-i," ").concat(e," \n Z");break;case"line":n="M ".concat(t-(i/=1.1)," ").concat(e," \n L ").concat(t+i," ").concat(e);break;default:i*=2,n="M ".concat(t,", ").concat(e," \n m -").concat(i/2,", 0 \n a ").concat(i/2,",").concat(i/2," 0 1,0 ").concat(i,",0 \n a ").concat(i/2,",").concat(i/2," 0 1,0 -").concat(i,",0")}return n}},{key:"drawMarkerShape",value:function(t,e,r,i,n){var o=this.drawPath({d:this.getMarkerPath(t,e,r,i,n),stroke:n.pointStrokeColor,strokeDashArray:n.pointStrokeDashArray,strokeWidth:n.pointStrokeWidth,fill:n.pointFillColor,fillOpacity:n.pointFillOpacity,strokeOpacity:n.pointStrokeOpacity});return o.attr({cx:t,cy:e,shape:n.shape,class:n.class?n.class:""}),o}},{key:"drawMarker",value:function(t,e,r){t=t||0;var i=r.pSize||0;return f.isNumber(e)||(i=0,e=0),this.drawMarkerShape(t,e,null==r?void 0:r.shape,i,wc(wc({},r),"line"===r.shape||"plus"===r.shape||"cross"===r.shape?{pointStrokeColor:r.pointFillColor,pointStrokeOpacity:r.pointFillOpacity}:{}))}},{key:"pathMouseEnter",value:function(t,e){var r=this.w,i=new vc(this.ctx),n=parseInt(t.node.getAttribute("index"),10),o=parseInt(t.node.getAttribute("j"),10);if("function"==typeof r.config.chart.events.dataPointMouseEnter&&r.config.chart.events.dataPointMouseEnter(e,this.ctx,{seriesIndex:n,dataPointIndex:o,w:r}),this.ctx.events.fireEvent("dataPointMouseEnter",[e,this.ctx,{seriesIndex:n,dataPointIndex:o,w:r}]),("none"===r.config.states.active.filter.type||"true"!==t.node.getAttribute("selected"))&&"none"!==r.config.states.hover.filter.type&&!r.globals.isTouchDevice){var a=r.config.states.hover.filter;i.applyFilter(t,n,a.type)}}},{key:"pathMouseLeave",value:function(t,e){var r=this.w,i=new vc(this.ctx),n=parseInt(t.node.getAttribute("index"),10),o=parseInt(t.node.getAttribute("j"),10);"function"==typeof r.config.chart.events.dataPointMouseLeave&&r.config.chart.events.dataPointMouseLeave(e,this.ctx,{seriesIndex:n,dataPointIndex:o,w:r}),this.ctx.events.fireEvent("dataPointMouseLeave",[e,this.ctx,{seriesIndex:n,dataPointIndex:o,w:r}]),"none"!==r.config.states.active.filter.type&&"true"===t.node.getAttribute("selected")||"none"!==r.config.states.hover.filter.type&&i.getDefaultFilter(t,n)}},{key:"pathMouseDown",value:function(t,e){var r=this.w,i=new vc(this.ctx),n=parseInt(t.node.getAttribute("index"),10),o=parseInt(t.node.getAttribute("j"),10),a="false";if("true"===t.node.getAttribute("selected")){if(t.node.setAttribute("selected","false"),r.globals.selectedDataPoints[n].indexOf(o)>-1){var s=r.globals.selectedDataPoints[n].indexOf(o);r.globals.selectedDataPoints[n].splice(s,1)}}else{if(!r.config.states.active.allowMultipleDataPointsSelection&&r.globals.selectedDataPoints.length>0){r.globals.selectedDataPoints=[];var l=r.globals.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),c=r.globals.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),u=function(t){Array.prototype.forEach.call(t,(function(t){t.node.setAttribute("selected","false"),i.getDefaultFilter(t,n)}))};u(l),u(c)}t.node.setAttribute("selected","true"),a="true",void 0===r.globals.selectedDataPoints[n]&&(r.globals.selectedDataPoints[n]=[]),r.globals.selectedDataPoints[n].push(o)}if("true"===a){var h=r.config.states.active.filter;if("none"!==h)i.applyFilter(t,n,h.type);else if("none"!==r.config.states.hover.filter&&!r.globals.isTouchDevice){var f=r.config.states.hover.filter;i.applyFilter(t,n,f.type)}}else"none"!==r.config.states.active.filter.type&&("none"===r.config.states.hover.filter.type||r.globals.isTouchDevice?i.getDefaultFilter(t,n):(f=r.config.states.hover.filter,i.applyFilter(t,n,f.type)));"function"==typeof r.config.chart.events.dataPointSelection&&r.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:r.globals.selectedDataPoints,seriesIndex:n,dataPointIndex:o,w:r}),e&&this.ctx.events.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:r.globals.selectedDataPoints,seriesIndex:n,dataPointIndex:o,w:r}])}},{key:"rotateAroundCenter",value:function(t){var e={};return t&&"function"==typeof t.getBBox&&(e=t.getBBox()),{x:e.x+e.width/2,y:e.y+e.height/2}}},{key:"getTextRects",value:function(t,e,r,i){var n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=this.w,a=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:r,foreColor:"#fff",opacity:0});i&&a.attr("transform",i),o.globals.dom.Paper.add(a);var s=a.bbox();return n||(s=a.node.getBoundingClientRect()),a.remove(),{width:s.width,height:s.height}}},{key:"placeTextWithEllipsis",value:function(t,e,r){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=r/1.1)){for(var i=e.length-3;i>0;i-=3)if(t.getSubStringLength(0,i)<=r/1.1)return void(t.textContent=e.substring(0,i)+"...");t.textContent="."}}}],i=[{key:"setAttrs",value:function(t,e){for(var r in e)e.hasOwnProperty(r)&&t.setAttribute(r,e[r])}}],r&&kc(e.prototype,r),i&&kc(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Pc=Oc;function Cc(t){return Cc="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},Cc(t)}function jc(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Tc(i.key),i)}}function Tc(t){var e=function(t){if("object"!=Cc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Cc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Cc(e)?e:e+""}var Ec=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w}var e,r,i;return e=t,r=[{key:"getStackedSeriesTotals",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=this.w,r=[];if(0===e.globals.series.length)return r;for(var i=0;i<e.globals.series[e.globals.maxValsInArrayIndex].length;i++){for(var n=0,o=0;o<e.globals.series.length;o++)void 0!==e.globals.series[o][i]&&-1===t.indexOf(o)&&(n+=e.globals.series[o][i]);r.push(n)}return r}},{key:"getSeriesTotalByIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return null===t?this.w.config.series.reduce((function(t,e){return t+e}),0):this.w.globals.series[t].reduce((function(t,e){return t+e}),0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var t=this,e=this.w,r=[];return e.globals.seriesGroups.forEach((function(i){var n=[];e.config.series.forEach((function(t,r){i.indexOf(e.globals.seriesNames[r])>-1&&n.push(r)}));var o=e.globals.series.map((function(t,e){return-1===n.indexOf(e)?e:-1})).filter((function(t){return-1!==t}));r.push(t.getStackedSeriesTotals(o))})),r}},{key:"setSeriesYAxisMappings",value:function(){var t=this.w.globals,e=this.w.config,r=[],i=[],n=[],o=t.series.length>e.yaxis.length||e.yaxis.some((function(t){return Array.isArray(t.seriesName)}));e.series.forEach((function(t,e){n.push(e),i.push(null)})),e.yaxis.forEach((function(t,e){r[e]=[]}));var a=[];e.yaxis.forEach((function(t,i){var s=!1;if(t.seriesName){var l=[];Array.isArray(t.seriesName)?l=t.seriesName:l.push(t.seriesName),l.forEach((function(t){e.series.forEach((function(e,a){if(e.name===t){var l=a;i===a||o?!o||n.indexOf(a)>-1?r[i].push([i,a]):console.warn("Series '"+e.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(r[a].push([a,i]),l=i),s=!0,-1!==(l=n.indexOf(l))&&n.splice(l,1)}}))}))}s||a.push(i)})),r=r.map((function(t,e){var r=[];return t.forEach((function(t){i[t[1]]=t[0],r.push(t[1])})),r}));for(var s=e.yaxis.length-1,l=0;l<a.length&&(s=a[l],r[s]=[],n);l++){var c=n[0];n.shift(),r[s].push(c),i[c]=s}n.forEach((function(t){r[s].push(t),i[t]=s})),t.seriesYAxisMap=r.map((function(t){return t})),t.seriesYAxisReverseMap=i.map((function(t){return t})),t.seriesYAxisMap.forEach((function(t,r){t.forEach((function(t){e.series[t]&&void 0===e.series[t].group&&(e.series[t].group="apexcharts-axis-".concat(r.toString()))}))}))}},{key:"isSeriesNull",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===t?this.w.config.series.filter((function(t){return null!==t})):this.w.config.series[t].data.filter((function(t){return null!==t}))).length}},{key:"seriesHaveSameValues",value:function(t){return this.w.globals.series[t].every((function(t,e,r){return t===r[0]}))}},{key:"getCategoryLabels",value:function(t){var e=this.w,r=t.slice();return e.config.xaxis.convertedCatToNumeric&&(r=t.map((function(t,r){return e.config.xaxis.labels.formatter(t-e.globals.minX+1)}))),r}},{key:"getLargestSeries",value:function(){var t=this.w;t.globals.maxValsInArrayIndex=t.globals.series.map((function(t){return t.length})).indexOf(Math.max.apply(Math,t.globals.series.map((function(t){return t.length}))))}},{key:"getLargestMarkerSize",value:function(){var t=this.w,e=0;return t.globals.markers.size.forEach((function(t){e=Math.max(e,t)})),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach((function(t){e=Math.max(e,t.size)})),e>0&&(t.config.markers.hover.size>0?e=t.config.markers.hover.size:e+=t.config.markers.hover.sizeOffset),t.globals.markers.largestSize=e,e}},{key:"getSeriesTotals",value:function(){var t=this.w;t.globals.seriesTotals=t.globals.series.map((function(t,e){var r=0;if(Array.isArray(t))for(var i=0;i<t.length;i++)r+=t[i];else r+=t;return r}))}},{key:"getSeriesTotalsXRange",value:function(t,e){var r=this.w;return r.globals.series.map((function(i,n){for(var o=0,a=0;a<i.length;a++)r.globals.seriesX[n][a]>t&&r.globals.seriesX[n][a]<e&&(o+=i[a]);return o}))}},{key:"getPercentSeries",value:function(){var t=this.w;t.globals.seriesPercent=t.globals.series.map((function(e,r){var i=[];if(Array.isArray(e))for(var n=0;n<e.length;n++){var o=t.globals.stackedSeriesTotals[n],a=0;o&&(a=100*e[n]/o),i.push(a)}else{var s=100*e/t.globals.seriesTotals.reduce((function(t,e){return t+e}),0);i.push(s)}return i}))}},{key:"getCalculatedRatios",value:function(){var t,e,r,i=this,n=this.w,o=n.globals,a=[],s=0,l=[],c=.1,u=0;if(o.yRange=[],o.isMultipleYAxis)for(var h=0;h<o.minYArr.length;h++)o.yRange.push(Math.abs(o.minYArr[h]-o.maxYArr[h])),l.push(0);else o.yRange.push(Math.abs(o.minY-o.maxY));o.xRange=Math.abs(o.maxX-o.minX),o.zRange=Math.abs(o.maxZ-o.minZ);for(var f=0;f<o.yRange.length;f++)a.push(o.yRange[f]/o.gridHeight);if(e=o.xRange/o.gridWidth,t=o.yRange/o.gridWidth,r=o.xRange/o.gridHeight,(s=o.zRange/o.gridHeight*16)||(s=1),o.minY!==Number.MIN_VALUE&&0!==Math.abs(o.minY)&&(o.hasNegs=!0),n.globals.seriesYAxisReverseMap.length>0){var d=function(t,e){var r=n.config.yaxis[n.globals.seriesYAxisReverseMap[e]],o=t<0?-1:1;return t=Math.abs(t),r.logarithmic&&(t=i.getBaseLog(r.logBase,t)),-o*t/a[e]};if(o.isMultipleYAxis){l=[];for(var p=0;p<a.length;p++)l.push(d(o.minYArr[p],p))}else(l=[]).push(d(o.minY,0)),o.minY!==Number.MIN_VALUE&&0!==Math.abs(o.minY)&&(c=-o.minY/t,u=o.minX/e)}else(l=[]).push(0),c=0,u=0;return{yRatio:a,invertedYRatio:t,zRatio:s,xRatio:e,invertedXRatio:r,baseLineInvertedY:c,baseLineY:l,baseLineX:u}}},{key:"getLogSeries",value:function(t){var e=this,r=this.w;return r.globals.seriesLog=t.map((function(t,i){var n=r.globals.seriesYAxisReverseMap[i];return r.config.yaxis[n]&&r.config.yaxis[n].logarithmic?t.map((function(t){return null===t?null:e.getLogVal(r.config.yaxis[n].logBase,t,i)})):t})),r.globals.invalidLogScale?t:r.globals.seriesLog}},{key:"getLogValAtSeriesIndex",value:function(t,e){if(null===t)return null;var r=this.w,i=r.globals.seriesYAxisReverseMap[e];return r.config.yaxis[i]&&r.config.yaxis[i].logarithmic?this.getLogVal(r.config.yaxis[i].logBase,t,e):t}},{key:"getBaseLog",value:function(t,e){return Math.log(e)/Math.log(t)}},{key:"getLogVal",value:function(t,e,r){if(e<=0)return 0;var i=this.w,n=0===i.globals.minYArr[r]?-1:this.getBaseLog(t,i.globals.minYArr[r]),o=(0===i.globals.maxYArr[r]?0:this.getBaseLog(t,i.globals.maxYArr[r]))-n;return e<1?e/o:(this.getBaseLog(t,e)-n)/o}},{key:"getLogYRatios",value:function(t){var e=this,r=this.w,i=this.w.globals;return i.yLogRatio=t.slice(),i.logYRange=i.yRange.map((function(t,n){var o=r.globals.seriesYAxisReverseMap[n];if(r.config.yaxis[o]&&e.w.config.yaxis[o].logarithmic){var a,s=-Number.MAX_VALUE,l=Number.MIN_VALUE;return i.seriesLog.forEach((function(t,e){t.forEach((function(t){r.config.yaxis[e]&&r.config.yaxis[e].logarithmic&&(s=Math.max(t,s),l=Math.min(t,l))}))})),a=Math.pow(i.yRange[n],Math.abs(l-s)/i.yRange[n]),i.yLogRatio[n]=a/i.gridHeight,a}})),i.invalidLogScale?t.slice():i.yLogRatio}},{key:"drawSeriesByGroup",value:function(t,e,r,i){var n=this.w,o=[];return t.series.length>0&&e.forEach((function(e){var a=[],s=[];t.i.forEach((function(r,i){n.config.series[r].group===e&&(a.push(t.series[i]),s.push(r))})),a.length>0&&o.push(i.draw(a,r,s))})),o}}],i=[{key:"checkComboSeries",value:function(t,e){var r=!1,i=0,n=0;return void 0===e&&(e="line"),t.length&&void 0!==t[0].type&&t.forEach((function(t){"bar"!==t.type&&"column"!==t.type&&"candlestick"!==t.type&&"boxPlot"!==t.type||i++,void 0!==t.type&&t.type!==e&&n++})),n>0&&(r=!0),{comboBarCount:i,comboCharts:r}}},{key:"extendArrayProps",value:function(t,e,r){var i,n,o,a,s,l;return null!==(i=e)&&void 0!==i&&i.yaxis&&(e=t.extendYAxis(e,r)),null!==(n=e)&&void 0!==n&&n.annotations&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),null!==(o=e)&&void 0!==o&&null!==(a=o.annotations)&&void 0!==a&&a.xaxis&&(e=t.extendXAxisAnnotations(e)),null!==(s=e)&&void 0!==s&&null!==(l=s.annotations)&&void 0!==l&&l.points&&(e=t.extendPointAnnotations(e))),e}}],r&&jc(e.prototype,r),i&&jc(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Mc=Ec;function Lc(t){return Lc="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},Lc(t)}function Ic(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,_c(i.key),i)}}function _c(t){var e=function(t){if("object"!=Lc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Lc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Lc(e)?e:e+""}var Rc=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.w=e.w,this.annoCtx=e}var e,r;return e=t,r=[{key:"setOrientations",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=this.w;if("vertical"===t.label.orientation){var i=null!==e?e:0,n=r.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(i,"']"));if(null!==n){var o=n.getBoundingClientRect();n.setAttribute("x",parseFloat(n.getAttribute("x"))-o.height+4);var a="top"===t.label.position?o.width:-o.width;n.setAttribute("y",parseFloat(n.getAttribute("y"))+a);var s=this.annoCtx.graphics.rotateAroundCenter(n),l=s.x,c=s.y;n.setAttribute("transform","rotate(-90 ".concat(l," ").concat(c,")"))}}}},{key:"addBackgroundToAnno",value:function(t,e){var r=this.w;if(!t||!e.label.text||!String(e.label.text).trim())return null;var i=r.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),n=t.getBoundingClientRect(),o=e.label.style.padding,a=o.left,s=o.right,l=o.top,c=o.bottom;if("vertical"===e.label.orientation){var u=[a,s,l,c];l=u[0],c=u[1],a=u[2],s=u[3]}var h=n.left-i.left-a,f=n.top-i.top-l,d=this.annoCtx.graphics.drawRect(h-r.globals.barPadForNumericAxis,f,n.width+a+s,n.height+l+c,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&d.node.classList.add(e.id),d}},{key:"annotationsBackground",value:function(){var t=this,e=this.w,r=function(r,i,n){var o=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(n,"-annotations .apexcharts-").concat(n,"-annotation-label[rel='").concat(i,"']"));if(o){var a=o.parentNode,s=t.addBackgroundToAnno(o,r);s&&(a.insertBefore(s.node,o),r.label.mouseEnter&&s.node.addEventListener("mouseenter",r.label.mouseEnter.bind(t,r)),r.label.mouseLeave&&s.node.addEventListener("mouseleave",r.label.mouseLeave.bind(t,r)),r.label.click&&s.node.addEventListener("click",r.label.click.bind(t,r)))}};e.config.annotations.xaxis.forEach((function(t,e){return r(t,e,"xaxis")})),e.config.annotations.yaxis.forEach((function(t,e){return r(t,e,"yaxis")})),e.config.annotations.points.forEach((function(t,e){return r(t,e,"point")}))}},{key:"getY1Y2",value:function(t,e){var r,i=this.w,n="y1"===t?e.y:e.y2,o=!1;if(this.annoCtx.invertAxis){var a=i.config.xaxis.convertedCatToNumeric?i.globals.categoryLabels:i.globals.labels,s=a.indexOf(n),l=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child(".concat(s+1,")"));r=l?parseFloat(l.getAttribute("y")):(i.globals.gridHeight/a.length-1)*(s+1)-i.globals.barHeight,void 0!==e.seriesIndex&&i.globals.barHeight&&(r-=i.globals.barHeight/2*(i.globals.series.length-1)-i.globals.barHeight*e.seriesIndex)}else{var c,u=i.globals.seriesYAxisMap[e.yAxisIndex][0],h=i.config.yaxis[e.yAxisIndex].logarithmic?new Mc(this.annoCtx.ctx).getLogVal(i.config.yaxis[e.yAxisIndex].logBase,n,u)/i.globals.yLogRatio[u]:(n-i.globals.minYArr[u])/(i.globals.yRange[u]/i.globals.gridHeight);r=i.globals.gridHeight-Math.min(Math.max(h,0),i.globals.gridHeight),o=h>i.globals.gridHeight||h<0,!e.marker||void 0!==e.y&&null!==e.y||(r=0),null!==(c=i.config.yaxis[e.yAxisIndex])&&void 0!==c&&c.reversed&&(r=h)}return"string"==typeof n&&n.includes("px")&&(r=parseFloat(n)),{yP:r,clipped:o}}},{key:"getX1X2",value:function(t,e){var r=this.w,i="x1"===t?e.x:e.x2,n=this.annoCtx.invertAxis?r.globals.minY:r.globals.minX,o=this.annoCtx.invertAxis?r.globals.maxY:r.globals.maxX,a=this.annoCtx.invertAxis?r.globals.yRange[0]:r.globals.xRange,s=!1,l=this.annoCtx.inversedReversedAxis?(o-i)/(a/r.globals.gridWidth):(i-n)/(a/r.globals.gridWidth);return"category"!==r.config.xaxis.type&&!r.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||r.globals.dataFormatXNumeric||r.config.chart.sparkline.enabled||(l=this.getStringX(i)),"string"==typeof i&&i.includes("px")&&(l=parseFloat(i)),null==i&&e.marker&&(l=r.globals.gridWidth),void 0!==e.seriesIndex&&r.globals.barWidth&&!this.annoCtx.invertAxis&&(l-=r.globals.barWidth/2*(r.globals.series.length-1)-r.globals.barWidth*e.seriesIndex),l>r.globals.gridWidth?(l=r.globals.gridWidth,s=!0):l<0&&(l=0,s=!0),{x:l,clipped:s}}},{key:"getStringX",value:function(t){var e=this.w,r=t;e.config.xaxis.convertedCatToNumeric&&e.globals.categoryLabels.length&&(t=e.globals.categoryLabels.indexOf(t)+1);var i=e.globals.labels.map((function(t){return Array.isArray(t)?t.join(" "):t})).indexOf(t),n=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child(".concat(i+1,")"));return n&&(r=parseFloat(n.getAttribute("x"))),r}}],r&&Ic(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function zc(t){return zc="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},zc(t)}function Xc(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Dc(i.key),i)}}function Dc(t){var e=function(t){if("object"!=zc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=zc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==zc(e)?e:e+""}var Yc=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Rc(this.annoCtx)}var e,r;return e=t,(r=[{key:"addXaxisAnnotation",value:function(t,e,r){var i,n=this.w,o=this.helpers.getX1X2("x1",t),a=o.x,s=o.clipped,l=!0,c=t.label.text,u=t.strokeDashArray;if(f.isNumber(a)){if(null===t.x2||void 0===t.x2){if(!s){var h=this.annoCtx.graphics.drawLine(a+t.offsetX,0+t.offsetY,a+t.offsetX,n.globals.gridHeight+t.offsetY,t.borderColor,u,t.borderWidth);e.appendChild(h.node),t.id&&h.node.classList.add(t.id)}}else{var d=this.helpers.getX1X2("x2",t);if(i=d.x,l=d.clipped,!s||!l){if(i<a){var p=a;a=i,i=p}var g=this.annoCtx.graphics.drawRect(a+t.offsetX,0+t.offsetY,i-a,n.globals.gridHeight+t.offsetY,0,t.fillColor,t.opacity,1,t.borderColor,u);g.node.classList.add("apexcharts-annotation-rect"),g.attr("clip-path","url(#gridRectMask".concat(n.globals.cuid,")")),e.appendChild(g.node),t.id&&g.node.classList.add(t.id)}}if(!s||!l){var b=this.annoCtx.graphics.getTextRects(c,parseFloat(t.label.style.fontSize)),y="top"===t.label.position?4:"center"===t.label.position?n.globals.gridHeight/2+("vertical"===t.label.orientation?b.width/2:0):n.globals.gridHeight,v=this.annoCtx.graphics.drawText({x:a+t.label.offsetX,y:y+t.label.offsetY-("vertical"===t.label.orientation?"top"===t.label.position?b.width/2-12:-b.width/2:0),text:c,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-xaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});v.attr({rel:r}),e.appendChild(v.node),this.annoCtx.helpers.setOrientations(t,r)}}}},{key:"drawXAxisAnnotations",value:function(){var t=this,e=this.w,r=this.annoCtx.graphics.group({class:"apexcharts-xaxis-annotations"});return e.config.annotations.xaxis.map((function(e,i){t.addXaxisAnnotation(e,r.node,i)})),r}}])&&Xc(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Hc(t){return Hc="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},Hc(t)}function Fc(t){return function(t){if(Array.isArray(t))return Bc(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Bc(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Bc(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bc(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function Nc(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Wc(i.key),i)}}function Wc(t){var e=function(t){if("object"!=Hc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Hc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Hc(e)?e:e+""}var Gc=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}var e,r;return e=t,r=[{key:"isValidDate",value:function(t){return"number"!=typeof t&&!isNaN(this.parseDate(t))}},{key:"getTimeStamp",value:function(t){return Date.parse(t)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toISOString().substr(0,25)).getTime():new Date(t).getTime():t}},{key:"getDate",value:function(t){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toUTCString()):new Date(t)}},{key:"parseDate",value:function(t){var e=Date.parse(t);if(!isNaN(e))return this.getTimeStamp(t);var r=Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "));return this.getTimeStamp(r)}},{key:"parseDateWithTimezone",value:function(t){return Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "))}},{key:"formatDate",value:function(t,e){var r=this.w.globals.locale,i=this.w.config.xaxis.labels.datetimeUTC,n=["\0"].concat(Fc(r.months)),o=[""].concat(Fc(r.shortMonths)),a=[""].concat(Fc(r.days)),s=[""].concat(Fc(r.shortDays));function l(t,e){var r=t+"";for(e=e||2;r.length<e;)r="0"+r;return r}var c=i?t.getUTCFullYear():t.getFullYear();e=(e=(e=e.replace(/(^|[^\\])yyyy+/g,"$1"+c)).replace(/(^|[^\\])yy/g,"$1"+c.toString().substr(2,2))).replace(/(^|[^\\])y/g,"$1"+c);var u=(i?t.getUTCMonth():t.getMonth())+1;e=(e=(e=(e=e.replace(/(^|[^\\])MMMM+/g,"$1"+n[0])).replace(/(^|[^\\])MMM/g,"$1"+o[0])).replace(/(^|[^\\])MM/g,"$1"+l(u))).replace(/(^|[^\\])M/g,"$1"+u);var h=i?t.getUTCDate():t.getDate();e=(e=(e=(e=e.replace(/(^|[^\\])dddd+/g,"$1"+a[0])).replace(/(^|[^\\])ddd/g,"$1"+s[0])).replace(/(^|[^\\])dd/g,"$1"+l(h))).replace(/(^|[^\\])d/g,"$1"+h);var f=i?t.getUTCHours():t.getHours(),d=f>12?f-12:0===f?12:f;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(f))).replace(/(^|[^\\])H/g,"$1"+f)).replace(/(^|[^\\])hh+/g,"$1"+l(d))).replace(/(^|[^\\])h/g,"$1"+d);var p=i?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(p))).replace(/(^|[^\\])m/g,"$1"+p);var g=i?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(g))).replace(/(^|[^\\])s/g,"$1"+g);var b=i?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(b,3)),b=Math.round(b/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(b)),b=Math.round(b/10);var y=f<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+b)).replace(/(^|[^\\])TT+/g,"$1"+y)).replace(/(^|[^\\])T/g,"$1"+y.charAt(0));var v=y.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+v)).replace(/(^|[^\\])t/g,"$1"+v.charAt(0));var m=-t.getTimezoneOffset(),x=i||!m?"Z":m>0?"+":"-";if(!i){var w=(m=Math.abs(m))%60;x+=l(Math.floor(m/60))+":"+l(w)}e=e.replace(/(^|[^\\])K/g,"$1"+x);var S=(i?t.getUTCDay():t.getDay())+1;return(e=(e=(e=(e=e.replace(new RegExp(a[0],"g"),a[S])).replace(new RegExp(s[0],"g"),s[S])).replace(new RegExp(n[0],"g"),n[u])).replace(new RegExp(o[0],"g"),o[u])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e,r){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 n=this.getDate(t),o=this.getDate(e),a=this.formatDate(n,"yyyy MM dd HH mm ss fff").split(" "),s=this.formatDate(o,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(a[6],10),maxMillisecond:parseInt(s[6],10),minSecond:parseInt(a[5],10),maxSecond:parseInt(s[5],10),minMinute:parseInt(a[4],10),maxMinute:parseInt(s[4],10),minHour:parseInt(a[3],10),maxHour:parseInt(s[3],10),minDate:parseInt(a[2],10),maxDate:parseInt(s[2],10),minMonth:parseInt(a[1],10)-1,maxMonth:parseInt(s[1],10)-1,minYear:parseInt(a[0],10),maxYear:parseInt(s[0],10)}}},{key:"isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"calculcateLastDaysOfMonth",value:function(t,e,r){return this.determineDaysOfMonths(t,e)-r}},{key:"determineDaysOfYear",value:function(t){var e=365;return this.isLeapYear(t)&&(e=366),e}},{key:"determineRemainingDaysOfYear",value:function(t,e,r){var i=this.daysCntOfYear[e]+r;return e>1&&this.isLeapYear()&&i++,i}},{key:"determineDaysOfMonths",value:function(t,e){var r=30;switch(t=f.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(r=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:r=31}return r}}],r&&Nc(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Vc=Gc;function Uc(t){return Uc="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},Uc(t)}function qc(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Zc(i.key),i)}}function Zc(t){var e=function(t){if("object"!=Uc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Uc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Uc(e)?e:e+""}var $c=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}var e,r;return e=t,r=[{key:"xLabelFormat",value:function(t,e,r,i){var n=this.w;if("datetime"===n.config.xaxis.type&&void 0===n.config.xaxis.labels.formatter&&void 0===n.config.tooltip.x.formatter){var o=new Vc(this.ctx);return o.formatDate(o.getDate(e),n.config.tooltip.x.format)}return t(e,r,i)}},{key:"defaultGeneralFormatter",value:function(t){return Array.isArray(t)?t.map((function(t){return t})):t}},{key:"defaultYFormatter",value:function(t,e,r){var i=this.w;if(f.isNumber(t))if(0!==i.globals.yValueDecimal)t=t.toFixed(void 0!==e.decimalsInFloat?e.decimalsInFloat:i.globals.yValueDecimal);else{var n=t.toFixed(0);t=t==n?n:t.toFixed(1)}return t}},{key:"setLabelFormatters",value:function(){var t=this,e=this.w;return e.globals.xaxisTooltipFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttKeyFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttZFormatter=function(t){return t},e.globals.legendFormatter=function(e){return t.defaultGeneralFormatter(e)},void 0!==e.config.xaxis.labels.formatter?e.globals.xLabelFormatter=e.config.xaxis.labels.formatter:e.globals.xLabelFormatter=function(t){if(f.isNumber(t)){if(!e.config.xaxis.convertedCatToNumeric&&"numeric"===e.config.xaxis.type){if(f.isNumber(e.config.xaxis.decimalsInFloat))return t.toFixed(e.config.xaxis.decimalsInFloat);var r=e.globals.maxX-e.globals.minX;return r>0&&r<100?t.toFixed(1):t.toFixed(0)}return e.globals.isBarHorizontal&&e.globals.maxY-e.globals.minYArr<4?t.toFixed(1):t.toFixed(0)}return t},"function"==typeof e.config.tooltip.x.formatter?e.globals.ttKeyFormatter=e.config.tooltip.x.formatter:e.globals.ttKeyFormatter=e.globals.xLabelFormatter,"function"==typeof e.config.xaxis.tooltip.formatter&&(e.globals.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||void 0!==e.config.tooltip.y.formatter)&&(e.globals.ttVal=e.config.tooltip.y),void 0!==e.config.tooltip.z.formatter&&(e.globals.ttZFormatter=e.config.tooltip.z.formatter),void 0!==e.config.legend.formatter&&(e.globals.legendFormatter=e.config.legend.formatter),e.config.yaxis.forEach((function(r,i){void 0!==r.labels.formatter?e.globals.yLabelFormatters[i]=r.labels.formatter:e.globals.yLabelFormatters[i]=function(n){return e.globals.xyCharts?Array.isArray(n)?n.map((function(e){return t.defaultYFormatter(e,r,i)})):t.defaultYFormatter(n,r,i):n}})),e.globals}},{key:"heatmapLabelFormatters",value:function(){var t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.globals.seriesNames.slice();var e=t.globals.seriesNames.reduce((function(t,e){return t.length>e.length?t:e}),0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}],r&&qc(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Jc=$c;function Qc(t){return Qc="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},Qc(t)}function Kc(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,tu(i.key),i)}}function tu(t){var e=function(t){if("object"!=Qc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Qc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qc(e)?e:e+""}var eu=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w}var e,r;return e=t,r=[{key:"getLabel",value:function(t,e,r,i){var n,o,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",l=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],c=this.w,u=void 0===t[i]?"":t[i],h=u,f=c.globals.xLabelFormatter,d=c.config.xaxis.labels.formatter,p=!1,g=new Jc(this.ctx),b=u;l&&(h=g.xLabelFormat(f,u,b,{i,dateFormatter:new Vc(this.ctx).formatDate,w:c}),void 0!==d&&(h=d(u,t[i],{i,dateFormatter:new Vc(this.ctx).formatDate,w:c}))),e.length>0?(n=e[i].unit,o=null,e.forEach((function(t){"month"===t.unit?o="year":"day"===t.unit?o="month":"hour"===t.unit?o="day":"minute"===t.unit&&(o="hour")})),p=o===n,r=e[i].position,h=e[i].value):"datetime"===c.config.xaxis.type&&void 0===d&&(h=""),void 0===h&&(h=""),h=Array.isArray(h)?h:h.toString();var y,v=new Pc(this.ctx);y=c.globals.rotateXLabels&&l?v.getTextRects(h,parseInt(s,10),null,"rotate(".concat(c.config.xaxis.labels.rotate," 0 0)"),!1):v.getTextRects(h,parseInt(s,10));var m=!c.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(h)&&("NaN"===String(h)||a.indexOf(h)>=0&&m)&&(h=""),{x:r,text:h,textRect:y,isBold:p}}},{key:"checkLabelBasedOnTickamount",value:function(t,e,r){var i=this.w,n=i.config.xaxis.tickAmount;return"dataPoints"===n&&(n=Math.round(i.globals.gridWidth/120)),n>r||t%Math.round(r/(n+1))==0||(e.text=""),e}},{key:"checkForOverflowingLabels",value:function(t,e,r,i,n){var o=this.w;if(0===t&&o.globals.skipFirstTimelinelabel&&(e.text=""),t===r-1&&o.globals.skipLastTimelinelabel&&(e.text=""),o.config.xaxis.labels.hideOverlappingLabels&&i.length>0){var a=n[n.length-1];e.x<a.textRect.width/(o.globals.rotateXLabels?Math.abs(o.config.xaxis.labels.rotate)/12:1.01)+a.x&&(e.text="")}return e}},{key:"checkForReversedLabels",value:function(t,e){var r=this.w;return r.config.yaxis[t]&&r.config.yaxis[t].reversed&&e.reverse(),e}},{key:"yAxisAllSeriesCollapsed",value:function(t){var e=this.w.globals;return!e.seriesYAxisMap[t].some((function(t){return-1===e.collapsedSeriesIndices.indexOf(t)}))}},{key:"translateYAxisIndex",value:function(t){var e=this.w,r=e.globals,i=e.config.yaxis;return r.series.length>i.length||i.some((function(t){return Array.isArray(t.seriesName)}))?t:r.seriesYAxisReverseMap[t]}},{key:"isYAxisHidden",value:function(t){var e=this.w,r=e.config.yaxis[t];if(!r.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!r.showForNullSeries){var i=e.globals.seriesYAxisMap[t],n=new Mc(this.ctx);return i.every((function(t){return n.isSeriesNull(t)}))}return!1}},{key:"getYAxisForeColor",value:function(t,e){var r=this.w;return Array.isArray(t)&&r.globals.yAxisScale[e]&&this.ctx.theme.pushExtraColors(t,r.globals.yAxisScale[e].result.length,!1),t}},{key:"drawYAxisTicks",value:function(t,e,r,i,n,o,a){var s=this.w,l=new Pc(this.ctx),c=s.globals.translateY+s.config.yaxis[n].labels.offsetY;if(s.globals.isBarHorizontal?c=0:"heatmap"===s.config.chart.type&&(c+=o/2),i.show&&e>0){!0===s.config.yaxis[n].opposite&&(t+=i.width);for(var u=e;u>=0;u--){var h=l.drawLine(t+r.offsetX-i.width+i.offsetX,c+i.offsetY,t+r.offsetX+i.offsetX,c+i.offsetY,i.color);a.add(h),c+=o}}}}],r&&Kc(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ru(t){return ru="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},ru(t)}function iu(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,nu(i.key),i)}}function nu(t){var e=function(t){if("object"!=ru(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ru(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ru(e)?e:e+""}var ou=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Rc(this.annoCtx),this.axesUtils=new eu(this.annoCtx)}var e,r;return e=t,(r=[{key:"addYaxisAnnotation",value:function(t,e,r){var i,n=this.w,o=t.strokeDashArray,a=this.helpers.getY1Y2("y1",t),s=a.yP,l=a.clipped,c=!0,u=!1,h=t.label.text;if(null===t.y2||void 0===t.y2){if(!l){u=!0;var f=this.annoCtx.graphics.drawLine(0+t.offsetX,s+t.offsetY,this._getYAxisAnnotationWidth(t),s+t.offsetY,t.borderColor,o,t.borderWidth);e.appendChild(f.node),t.id&&f.node.classList.add(t.id)}}else{if(i=(a=this.helpers.getY1Y2("y2",t)).yP,c=a.clipped,i>s){var d=s;s=i,i=d}if(!l||!c){u=!0;var p=this.annoCtx.graphics.drawRect(0+t.offsetX,i+t.offsetY,this._getYAxisAnnotationWidth(t),s-i,0,t.fillColor,t.opacity,1,t.borderColor,o);p.node.classList.add("apexcharts-annotation-rect"),p.attr("clip-path","url(#gridRectMask".concat(n.globals.cuid,")")),e.appendChild(p.node),t.id&&p.node.classList.add(t.id)}}if(u){var g="right"===t.label.position?n.globals.gridWidth:"center"===t.label.position?n.globals.gridWidth/2:0,b=this.annoCtx.graphics.drawText({x:g+t.label.offsetX,y:(null!=i?i:s)+t.label.offsetY-3,text:h,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});b.attr({rel:r}),e.appendChild(b.node)}}},{key:"_getYAxisAnnotationWidth",value:function(t){var e=this.w;return e.globals.gridWidth,(t.width.indexOf("%")>-1?e.globals.gridWidth*parseInt(t.width,10)/100:parseInt(t.width,10))+t.offsetX}},{key:"drawYAxisAnnotations",value:function(){var t=this,e=this.w,r=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return e.config.annotations.yaxis.forEach((function(e,i){e.yAxisIndex=t.axesUtils.translateYAxisIndex(e.yAxisIndex),t.axesUtils.isYAxisHidden(e.yAxisIndex)&&t.axesUtils.yAxisAllSeriesCollapsed(e.yAxisIndex)||t.addYaxisAnnotation(e,r.node,i)})),r}}])&&iu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function au(t){return au="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},au(t)}function su(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,lu(i.key),i)}}function lu(t){var e=function(t){if("object"!=au(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=au(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==au(e)?e:e+""}var cu=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Rc(this.annoCtx)}var e,r;return e=t,r=[{key:"addPointAnnotation",value:function(t,e,r){if(!(this.w.globals.collapsedSeriesIndices.indexOf(t.seriesIndex)>-1)){var i=this.helpers.getX1X2("x1",t),n=i.x,o=i.clipped,a=(i=this.helpers.getY1Y2("y1",t)).yP,s=i.clipped;if(f.isNumber(n)&&!s&&!o){var l={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radius,class:"apexcharts-point-annotation-marker ".concat(t.marker.cssClass," ").concat(t.id?t.id:"")},c=this.annoCtx.graphics.drawMarker(n+t.marker.offsetX,a+t.marker.offsetY,l);e.appendChild(c.node);var u=t.label.text?t.label.text:"",h=this.annoCtx.graphics.drawText({x:n+t.label.offsetX,y:a+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:u,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});if(h.attr({rel:r}),e.appendChild(h.node),t.customSVG.SVG){var d=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});d.attr({transform:"translate(".concat(n+t.customSVG.offsetX,", ").concat(a+t.customSVG.offsetY,")")}),d.node.innerHTML=t.customSVG.SVG,e.appendChild(d.node)}if(t.image.path){var p=t.image.width?t.image.width:20,g=t.image.height?t.image.height:20;c=this.annoCtx.addImage({x:n+t.image.offsetX-p/2,y:a+t.image.offsetY-g/2,width:p,height:g,path:t.image.path,appendTo:".apexcharts-point-annotations"})}t.mouseEnter&&c.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&c.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t)),t.click&&c.node.addEventListener("click",t.click.bind(this,t))}}}},{key:"drawPointAnnotations",value:function(){var t=this,e=this.w,r=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return e.config.annotations.points.map((function(e,i){t.addPointAnnotation(e,r.node,i)})),r}}],r&&su(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const uu=JSON.parse('{"name":"en","options":{"months":["January","February","March","April","May","June","July","August","September","October","November","December"],"shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"days":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"shortDays":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"toolbar":{"exportToSVG":"Download SVG","exportToPNG":"Download PNG","exportToCSV":"Download CSV","menu":"Menu","selection":"Selection","selectionZoom":"Selection Zoom","zoomIn":"Zoom In","zoomOut":"Zoom Out","pan":"Panning","reset":"Reset Zoom"}}}');function hu(t){return hu="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},hu(t)}function fu(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,du(i.key),i)}}function du(t){var e=function(t){if("object"!=hu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=hu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==hu(e)?e:e+""}var pu=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}var e,r;return e=t,(r=[{key:"init",value:function(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"",locales:[uu],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:!0,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(t){return t}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(t){return t+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)/t.globals.series.length+"%"}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:function(t){return t},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(t){return t}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(t){return t}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(t){return null!==t?t:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],clusterGroupedSeries:!0,clusterGroupedSeriesOrientation:"vertical",labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten"}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken"}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(t){return t?t+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}])&&fu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function gu(t){return gu="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},gu(t)}function bu(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,yu(i.key),i)}}function yu(t){var e=function(t){if("object"!=gu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=gu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==gu(e)?e:e+""}var vu=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w,this.graphics=new Pc(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new Rc(this),this.xAxisAnnotations=new Yc(this),this.yAxisAnnotations=new ou(this),this.pointsAnnotations=new cu(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}var e,r;return e=t,r=[{key:"drawAxesAnnotations",value:function(){var t=this.w;if(t.globals.axisCharts&&t.globals.dataPoints){for(var e=this.yAxisAnnotations.drawYAxisAnnotations(),r=this.xAxisAnnotations.drawXAxisAnnotations(),i=this.pointsAnnotations.drawPointAnnotations(),n=t.config.chart.animations.enabled,o=[e,r,i],a=[r.node,e.node,i.node],s=0;s<3;s++)t.globals.dom.elGraphical.add(o[s]),!n||t.globals.resized||t.globals.dataChanged||"scatter"!==t.config.chart.type&&"bubble"!==t.config.chart.type&&t.globals.dataPoints>1&&a[s].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:a[s],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var t=this;this.w.config.annotations.images.map((function(e,r){t.addImage(e,r)}))}},{key:"drawTextAnnos",value:function(){var t=this;this.w.config.annotations.texts.map((function(e,r){t.addText(e,r)}))}},{key:"addXaxisAnnotation",value:function(t,e,r){this.xAxisAnnotations.addXaxisAnnotation(t,e,r)}},{key:"addYaxisAnnotation",value:function(t,e,r){this.yAxisAnnotations.addYaxisAnnotation(t,e,r)}},{key:"addPointAnnotation",value:function(t,e,r){this.pointsAnnotations.addPointAnnotation(t,e,r)}},{key:"addText",value:function(t,e){var r=t.x,i=t.y,n=t.text,o=t.textAnchor,a=t.foreColor,s=t.fontSize,l=t.fontFamily,c=t.fontWeight,u=t.cssClass,h=t.backgroundColor,f=t.borderWidth,d=t.strokeDashArray,p=t.borderRadius,g=t.borderColor,b=t.appendTo,y=void 0===b?".apexcharts-svg":b,v=t.paddingLeft,m=void 0===v?4:v,x=t.paddingRight,w=void 0===x?4:x,S=t.paddingBottom,k=void 0===S?2:S,A=t.paddingTop,O=void 0===A?2:A,P=this.w,C=this.graphics.drawText({x:r,y:i,text:n,textAnchor:o||"start",fontSize:s||"12px",fontWeight:c||"regular",fontFamily:l||P.config.chart.fontFamily,foreColor:a||P.config.chart.foreColor,cssClass:u}),j=P.globals.dom.baseEl.querySelector(y);j&&j.appendChild(C.node);var T=C.bbox();if(n){var E=this.graphics.drawRect(T.x-m,T.y-O,T.width+m+w,T.height+k+O,p,h||"transparent",1,f,g,d);j.insertBefore(E.node,C.node)}}},{key:"addImage",value:function(t,e){var r=this.w,i=t.path,n=t.x,o=void 0===n?0:n,a=t.y,s=void 0===a?0:a,l=t.width,c=void 0===l?20:l,u=t.height,h=void 0===u?20:u,f=t.appendTo,d=void 0===f?".apexcharts-svg":f,p=r.globals.dom.Paper.image(i);p.size(c,h).move(o,s);var g=r.globals.dom.baseEl.querySelector(d);return g&&g.appendChild(p.node),p}},{key:"addXaxisAnnotationExternal",value:function(t,e,r){return this.addAnnotationExternal({params:t,pushToMemory:e,context:r,type:"xaxis",contextMethod:r.addXaxisAnnotation}),r}},{key:"addYaxisAnnotationExternal",value:function(t,e,r){return this.addAnnotationExternal({params:t,pushToMemory:e,context:r,type:"yaxis",contextMethod:r.addYaxisAnnotation}),r}},{key:"addPointAnnotationExternal",value:function(t,e,r){return void 0===this.invertAxis&&(this.invertAxis=r.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:r,type:"point",contextMethod:r.addPointAnnotation}),r}},{key:"addAnnotationExternal",value:function(t){var e=t.params,r=t.pushToMemory,i=t.context,n=t.type,o=t.contextMethod,a=i,s=a.w,l=s.globals.dom.baseEl.querySelector(".apexcharts-".concat(n,"-annotations")),c=l.childNodes.length+1,u=new pu,h=Object.assign({},"xaxis"===n?u.xAxisAnnotation:"yaxis"===n?u.yAxisAnnotation:u.pointAnnotation),d=f.extend(h,e);switch(n){case"xaxis":this.addXaxisAnnotation(d,l,c);break;case"yaxis":this.addYaxisAnnotation(d,l,c);break;case"point":this.addPointAnnotation(d,l,c)}var p=s.globals.dom.baseEl.querySelector(".apexcharts-".concat(n,"-annotations .apexcharts-").concat(n,"-annotation-label[rel='").concat(c,"']")),g=this.helpers.addBackgroundToAnno(p,d);return g&&l.insertBefore(g.node,p),r&&s.globals.memory.methodsToExec.push({context:a,id:d.id?d.id:f.randomId(),method:o,label:"addAnnotation",params:e}),i}},{key:"clearAnnotations",value:function(t){for(var e=t.w,r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"),i=e.globals.memory.methodsToExec.length-1;i>=0;i--)"addText"!==e.globals.memory.methodsToExec[i].label&&"addAnnotation"!==e.globals.memory.methodsToExec[i].label||e.globals.memory.methodsToExec.splice(i,1);r=f.listToArray(r),Array.prototype.forEach.call(r,(function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}))}},{key:"removeAnnotation",value:function(t,e){var r=t.w,i=r.globals.dom.baseEl.querySelectorAll(".".concat(e));i&&(r.globals.memory.methodsToExec.map((function(t,i){t.id===e&&r.globals.memory.methodsToExec.splice(i,1)})),Array.prototype.forEach.call(i,(function(t){t.parentElement.removeChild(t)})))}}],r&&bu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function mu(t){return mu="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},mu(t)}function xu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function wu(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?xu(Object(r),!0).forEach((function(e){Su(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xu(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Su(t,e,r){return(e=Au(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ku(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Au(i.key),i)}}function Au(t){var e=function(t){if("object"!=mu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=mu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==mu(e)?e:e+""}var Ou=function(t){var e,r=t.isTimeline,i=t.ctx,n=t.seriesIndex,o=t.dataPointIndex,a=t.y1,s=t.y2,l=t.w,c=l.globals.seriesRangeStart[n][o],u=l.globals.seriesRangeEnd[n][o],h=l.globals.labels[o],f=l.config.series[n].name?l.config.series[n].name:"",d=l.globals.ttKeyFormatter,p=l.config.tooltip.y.title.formatter,g={w:l,seriesIndex:n,dataPointIndex:o,start:c,end:u};"function"==typeof p&&(f=p(f,g)),null!==(e=l.config.series[n].data[o])&&void 0!==e&&e.x&&(h=l.config.series[n].data[o].x),r||"datetime"===l.config.xaxis.type&&(h=new Jc(i).xLabelFormat(l.globals.ttKeyFormatter,h,h,{i:void 0,dateFormatter:new Vc(i).formatDate,w:l})),"function"==typeof d&&(h=d(h,g)),Number.isFinite(a)&&Number.isFinite(s)&&(c=a,u=s);var b="",y="",v=l.globals.colors[n];if(void 0===l.config.tooltip.x.formatter)if("datetime"===l.config.xaxis.type){var m=new Vc(i);b=m.formatDate(m.getDate(c),l.config.tooltip.x.format),y=m.formatDate(m.getDate(u),l.config.tooltip.x.format)}else b=c,y=u;else b=l.config.tooltip.x.formatter(c),y=l.config.tooltip.x.formatter(u);return{start:c,end:u,startVal:b,endVal:y,ylabel:h,color:v,seriesName:f}},Pu=function(t){var e=t.color,r=t.seriesName,i=t.ylabel,n=t.start,o=t.end,a=t.seriesIndex,s=t.dataPointIndex,l=t.ctx.tooltip.tooltipLabels.getFormatters(a);n=l.yLbFormatter(n),o=l.yLbFormatter(o);var c=l.yLbFormatter(t.w.globals.series[a][s]),u='<span class="value start-value">\n '.concat(n,'\n </span> <span class="separator">-</span> <span class="value end-value">\n ').concat(o,"\n </span>");return'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+e+'">'+(r||"")+'</span></div><div> <span class="category">'+i+": </span> "+(t.w.globals.comboCharts?"rangeArea"===t.w.config.series[a].type||"rangeBar"===t.w.config.series[a].type?u:"<span>".concat(c,"</span>"):u)+" </div></div>"},Cu=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.opts=e}var e,r;return e=t,(r=[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(t){return this.hideYAxis(),f.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"slope",value:function(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter:function(t,e){var r=e.w.config.series[e.seriesIndex].name;return null!==t?r+": "+t:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}},{key:"bar",value:function(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),wu(wu({},this.bar()),{},{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var t=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var r=e.seriesIndex,i=e.dataPointIndex,n=e.w;return t._getBoxTooltip(n,r,i,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var t=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var r=e.seriesIndex,i=e.dataPointIndex,n=e.w;return t._getBoxTooltip(n,r,i,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(t,e){e.ctx;var r=e.seriesIndex,i=e.dataPointIndex,n=e.w,o=function(){var t=n.globals.seriesRangeStart[r][i];return n.globals.seriesRangeEnd[r][i]-t};return n.globals.comboCharts?"rangeBar"===n.config.series[r].type||"rangeArea"===n.config.series[r].type?o():t:o()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(t){return t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?function(t){var e=Ou(wu(wu({},t),{},{isTimeline:!0})),r=e.color,i=e.seriesName,n=e.ylabel,o=e.startVal,a=e.endVal;return Pu(wu(wu({},t),{},{color:r,seriesName:i,ylabel:n,start:o,end:a}))}(t):function(t){var e=Ou(t),r=e.color,i=e.seriesName,n=e.ylabel,o=e.start,a=e.end;return Pu(wu(wu({},t),{},{color:r,seriesName:i,ylabel:n,start:o,end:a}))}(t)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(t){var e,r;return null!==(e=t.plotOptions.bar)&&void 0!==e&&e.barHeight||(t.plotOptions.bar.barHeight=2),null!==(r=t.plotOptions.bar)&&void 0!==r&&r.columnWidth||(t.plotOptions.bar.columnWidth=2),t}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(t){return function(t){var e=Ou(t),r=e.color,i=e.seriesName,n=e.ylabel,o=e.start,a=e.end;return Pu(wu(wu({},t),{},{color:r,seriesName:i,ylabel:n,start:o,end:a}))}(t)}}}}},{key:"brush",value:function(t){return f.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;var e=t.dataLabels.formatter;return t.yaxis.forEach((function(e,r){t.yaxis[r].min=0,t.yaxis[r].max=100})),"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}},{key:"stackedBars",value:function(){var t=this.bar();return wu(wu({},t),{},{plotOptions:wu(wu({},t.plotOptions),{},{bar:wu(wu({},t.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(t){return t.xaxis.convertedCatToNumeric=!0,t}},{key:"convertCatToNumericXaxis",value:function(t,e,r){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return f.isNumber(t)?Math.floor(t):t};var i=t.xaxis.labels.formatter,n=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return r&&r.length&&(n=r.map((function(t){return Array.isArray(t)?t:String(t)}))),n&&n.length&&(t.xaxis.labels.formatter=function(t){return f.isNumber(t)?i(n[Math.floor(t)-1]):i(t)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:function(t){return t},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"_getBoxTooltip",value:function(t,e,r,i,n){var o=t.globals.seriesCandleO[e][r],a=t.globals.seriesCandleH[e][r],s=t.globals.seriesCandleM[e][r],l=t.globals.seriesCandleL[e][r],c=t.globals.seriesCandleC[e][r];return t.config.series[e].type&&t.config.series[e].type!==n?'<div class="apexcharts-custom-tooltip">\n '.concat(t.config.series[e].name?t.config.series[e].name:"series-"+(e+1),": <strong>").concat(t.globals.series[e][r],"</strong>\n </div>"):'<div class="apexcharts-tooltip-box apexcharts-tooltip-'.concat(t.config.chart.type,'">')+"<div>".concat(i[0],': <span class="value">')+o+"</span></div>"+"<div>".concat(i[1],': <span class="value">')+a+"</span></div>"+(s?"<div>".concat(i[2],': <span class="value">')+s+"</span></div>":"")+"<div>".concat(i[3],': <span class="value">')+l+"</span></div>"+"<div>".concat(i[4],': <span class="value">')+c+"</span></div></div>"}}])&&ku(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ju(t){return ju="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},ju(t)}function Tu(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Eu(i.key),i)}}function Eu(t){var e=function(t){if("object"!=ju(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ju(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ju(e)?e:e+""}var Mu=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.opts=e}var e,r;return e=t,r=[{key:"init",value:function(t){var e=t.responsiveOverride,r=this.opts,i=new pu,n=new Cu(r);this.chartType=r.chart.type,r=this.extendYAxis(r),r=this.extendAnnotations(r);var o=i.init(),a={};if(r&&"object"===ju(r)){var s,l,c,u,h,d,p,g,b,y,v={};v=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(r.chart.type)?n[r.chart.type]():n.line(),null!==(s=r.plotOptions)&&void 0!==s&&null!==(l=s.bar)&&void 0!==l&&l.isFunnel&&(v=n.funnel()),r.chart.stacked&&"bar"===r.chart.type&&(v=n.stackedBars()),null!==(c=r.chart.brush)&&void 0!==c&&c.enabled&&(v=n.brush(v)),null!==(u=r.plotOptions)&&void 0!==u&&null!==(h=u.line)&&void 0!==h&&h.isSlopeChart&&(v=n.slope()),r.chart.stacked&&"100%"===r.chart.stackType&&(r=n.stacked100(r)),null!==(d=r.plotOptions)&&void 0!==d&&null!==(p=d.bar)&&void 0!==p&&p.isDumbbell&&(r=n.dumbbell(r)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(r),r.xaxis=r.xaxis||window.Apex.xaxis||{},e||(r.xaxis.convertedCatToNumeric=!1),(null!==(g=(r=this.checkForCatToNumericXAxis(this.chartType,v,r)).chart.sparkline)&&void 0!==g&&g.enabled||null!==(b=window.Apex.chart)&&void 0!==b&&null!==(y=b.sparkline)&&void 0!==y&&y.enabled)&&(v=n.sparkline(v)),a=f.extend(o,v)}var m=f.extend(a,window.Apex);return o=f.extend(m,r),this.handleUserInputErrors(o)}},{key:"checkForCatToNumericXAxis",value:function(t,e,r){var i,n,o=new Cu(r),a=("bar"===t||"boxPlot"===t)&&(null===(i=r.plotOptions)||void 0===i||null===(n=i.bar)||void 0===n?void 0:n.horizontal),s="pie"===t||"polarArea"===t||"donut"===t||"radar"===t||"radialBar"===t||"heatmap"===t,l="datetime"!==r.xaxis.type&&"numeric"!==r.xaxis.type,c=r.xaxis.tickPlacement?r.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return a||s||!l||"between"===c||(r=o.convertCatToNumeric(r)),r}},{key:"extendYAxis",value:function(t,e){var r=new pu;(void 0===t.yaxis||!t.yaxis||Array.isArray(t.yaxis)&&0===t.yaxis.length)&&(t.yaxis={}),t.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(t.yaxis=f.extend(t.yaxis,window.Apex.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[f.extend(r.yAxis,t.yaxis)]:t.yaxis=f.extendArray(t.yaxis,r.yAxis);var i=!1;t.yaxis.forEach((function(t){t.logarithmic&&(i=!0)}));var n=t.series;return e&&!n&&(n=e.config.series),i&&n.length!==t.yaxis.length&&n.length&&(t.yaxis=n.map((function(e,i){if(e.name||(n[i].name="series-".concat(i+1)),t.yaxis[i])return t.yaxis[i].seriesName=n[i].name,t.yaxis[i];var o=f.extend(r.yAxis,t.yaxis[0]);return o.show=!1,o}))),i&&n.length>1&&n.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),t}},{key:"extendAnnotations",value:function(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),this.extendPointAnnotations(t)}},{key:"extendYAxisAnnotations",value:function(t){var e=new pu;return t.annotations.yaxis=f.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}},{key:"extendXAxisAnnotations",value:function(t){var e=new pu;return t.annotations.xaxis=f.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}},{key:"extendPointAnnotations",value:function(t){var e=new pu;return t.annotations.points=f.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}},{key:"checkForDarkTheme",value:function(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.theme.palette||(t.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(t){var e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),"candlestick"!==e.chart.type&&"boxPlot"!==e.chart.type||e.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(e.chart.type," chart is not supported.")),e.yaxis[0].reversed=!1),e}}],r&&Tu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Lu(t){return Lu="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},Lu(t)}function Iu(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,_u(i.key),i)}}function _u(t){var e=function(t){if("object"!=Lu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Lu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Lu(e)?e:e+""}var Ru=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"initGlobalVars",value:function(t){t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleM=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesRange=[],t.seriesPercent=[],t.seriesGoals=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.seriesLog=[],t.seriesColors=[],t.stackedSeriesTotals=[],t.seriesXvalues=[],t.seriesYvalues=[],t.labels=[],t.hasXaxisGroups=!1,t.groups=[],t.barGroups=[],t.lineGroups=[],t.areaGroups=[],t.hasSeriesGroups=!1,t.seriesGroups=[],t.categoryLabels=[],t.timescaleLabels=[],t.noLabelsProvided=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.lastWheelExecution=0,t.delayedElements=[],t.pointsArray=[],t.dataLabelsRects=[],t.isXNumeric=!1,t.skipLastTimelinelabel=!1,t.skipFirstTimelinelabel=!1,t.isDataXYZ=!1,t.isMultiLineX=!1,t.isMultipleYAxis=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialMaxX=-Number.MAX_VALUE,t.initialMinX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.yLabelsCoords=[],t.yTitleCoords=[],t.barPadForNumericAxis=0,t.padHorizontal=0,t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0,t.xTickAmount=0,t.multiAxisTickAmount=0}},{key:"globalVars",value:function(t){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],invalidLogScale:!1,ignoreYAxisIndexes:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"zoom"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:"pan"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.pan,selectionEnabled:"selection"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,isSlopeChart:t.plotOptions.line.isSlopeChart,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null,niceScaleAllowedMagMsd:[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],niceScaleDefaultTicks:[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],seriesYAxisMap:[],seriesYAxisReverseMap:[]}}},{key:"init",value:function(t){var e=this.globalVars(t);return this.initGlobalVars(e),e.initialConfig=f.extend({},t),e.initialSeries=f.clone(t.series),e.lastXAxis=f.clone(e.initialConfig.xaxis),e.lastYAxis=f.clone(e.initialConfig.yaxis),e}}],r&&Iu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function zu(t){return zu="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},zu(t)}function Xu(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Du(i.key),i)}}function Du(t){var e=function(t){if("object"!=zu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=zu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==zu(e)?e:e+""}var Yu=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.opts=e}var e,r;return e=t,(r=[{key:"init",value:function(){var t=new Mu(this.opts).init({responsiveOverride:!1});return{config:t,globals:(new Ru).init(t)}}}])&&Xu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Hu(t){return Hu="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},Hu(t)}function Fu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Bu(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Fu(Object(r),!0).forEach((function(e){Nu(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fu(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Nu(t,e,r){return(e=Uu(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Wu(t,e){if(t){if("string"==typeof t)return Gu(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Gu(t,e):void 0}}function Gu(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function Vu(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Uu(i.key),i)}}function Uu(t){var e=function(t){if("object"!=Hu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Hu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Hu(e)?e:e+""}var qu=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}var e,r;return e=t,r=[{key:"clippedImgArea",value:function(t){var e=this.w,r=e.config,i=parseInt(e.globals.gridWidth,10),n=parseInt(e.globals.gridHeight,10),o=i>n?i:n,a=t.image,s=0,l=0;void 0===t.width&&void 0===t.height?void 0!==r.fill.image.width&&void 0!==r.fill.image.height?(s=r.fill.image.width+1,l=r.fill.image.height):(s=o+1,l=o):(s=t.width,l=t.height);var c=document.createElementNS(e.globals.SVGNS,"pattern");Pc.setAttrs(c,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:s+"px",height:l+"px"});var u=document.createElementNS(e.globals.SVGNS,"image");c.appendChild(u),u.setAttributeNS(window.SVG.xlink,"href",a),Pc.setAttrs(u,{x:0,y:0,preserveAspectRatio:"none",width:s+"px",height:l+"px"}),u.style.opacity=t.opacity,e.globals.dom.elDefs.node.appendChild(c)}},{key:"getSeriesIndex",value:function(t){var e=this.w,r=e.config.chart.type;return("bar"===r||"rangeBar"===r)&&e.config.plotOptions.bar.distributed||"heatmap"===r||"treemap"===r?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.globals.series.length,this.seriesIndex}},{key:"computeColorStops",value:function(t,e){var r,i=this.w,n=null,o=null,a=function(t){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=Wu(t))){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return o=t.done,t},e:function(t){a=!0,n=t},f:function(){try{o||null==e.return||e.return()}finally{if(a)throw n}}}}(t);try{for(a.s();!(r=a.n()).done;){var s=r.value;s>=e.threshold?(null===n||s>n)&&(n=s):(null===o||s<o)&&(o=s)}}catch(t){a.e(t)}finally{a.f()}null===n&&(n=e.threshold),null===o&&(o=e.threshold);var l=n-e.threshold+(e.threshold-o);0===l&&(l=1);var c=100-(e.threshold-o)/l*100;return[{offset:c=Math.max(0,Math.min(c,100)),color:e.colorAboveThreshold,opacity:i.config.fill.opacity},{offset:0,color:e.colorBelowThreshold,opacity:i.config.fill.opacity}]}},{key:"fillPath",value:function(t){var e,r,i,n=this.w;this.opts=t;var o,a,s,l=this.w.config;this.seriesIndex=this.getSeriesIndex(t);var c=l.plotOptions.line.colors.colorAboveThreshold&&l.plotOptions.line.colors.colorBelowThreshold,u=this.getFillColors()[this.seriesIndex];void 0!==n.globals.seriesColors[this.seriesIndex]&&(u=n.globals.seriesColors[this.seriesIndex]),"function"==typeof u&&(u=u({seriesIndex:this.seriesIndex,dataPointIndex:t.dataPointIndex,value:t.value,w:n}));var h,d,p,g=t.fillType?t.fillType:this.getFillType(this.seriesIndex),b=Array.isArray(l.fill.opacity)?l.fill.opacity[this.seriesIndex]:l.fill.opacity,y="gradient"===g||c;t.color&&(u=t.color),null!==(e=n.config.series[this.seriesIndex])&&void 0!==e&&null!==(r=e.data)&&void 0!==r&&null!==(i=r[t.dataPointIndex])&&void 0!==i&&i.fillColor&&(u=null===(h=n.config.series[this.seriesIndex])||void 0===h||null===(d=h.data)||void 0===d||null===(p=d[t.dataPointIndex])||void 0===p?void 0:p.fillColor),u||(u="#fff",console.warn("undefined color - ApexCharts"));var v=u;if(-1===u.indexOf("rgb")?-1===u.indexOf("#")?v=u:u.length<9&&(v=f.hexToRgba(u,b)):u.indexOf("rgba")>-1?b=f.getOpacityFromRGBA(u):v=f.hexToRgba(f.rgb2hex(u),b),t.opacity&&(b=t.opacity),"pattern"===g&&(a=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:a,fillColor:u,fillOpacity:b,defaultColor:v})),y){var m=function(t){return function(t){if(Array.isArray(t))return Gu(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Wu(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(l.fill.gradient.colorStops)||[],x=l.fill.gradient.type;c&&(m[this.seriesIndex]=this.computeColorStops(n.globals.series[this.seriesIndex],l.plotOptions.line.colors),x="vertical"),s=this.handleGradientFill({type:x,fillConfig:t.fillConfig,fillColor:u,fillOpacity:b,colorStops:m,i:this.seriesIndex})}if("image"===g){var w=l.fill.image.src,S=t.patternID?t.patternID:"",k="pattern".concat(n.globals.cuid).concat(t.seriesNumber+1).concat(S);-1===this.patternIDs.indexOf(k)&&(this.clippedImgArea({opacity:b,image:Array.isArray(w)?t.seriesNumber<w.length?w[t.seriesNumber]:w[0]:w,width:t.width?t.width:void 0,height:t.height?t.height:void 0,patternUnits:t.patternUnits,patternID:k}),this.patternIDs.push(k)),o="url(#".concat(k,")")}else o=y?s:"pattern"===g?a:v;return t.solid&&(o=v),o}},{key:"getFillType",value:function(t){var e=this.w;return Array.isArray(e.config.fill.type)?e.config.fill.type[t]:e.config.fill.type}},{key:"getFillColors",value:function(){var t=this.w,e=t.config,r=this.opts,i=[];return t.globals.comboCharts?"line"===t.config.series[this.seriesIndex].type?Array.isArray(t.globals.stroke.colors)?i=t.globals.stroke.colors:i.push(t.globals.stroke.colors):Array.isArray(t.globals.fill.colors)?i=t.globals.fill.colors:i.push(t.globals.fill.colors):"line"===e.chart.type?Array.isArray(t.globals.stroke.colors)?i=t.globals.stroke.colors:i.push(t.globals.stroke.colors):Array.isArray(t.globals.fill.colors)?i=t.globals.fill.colors:i.push(t.globals.fill.colors),void 0!==r.fillColors&&(i=[],Array.isArray(r.fillColors)?i=r.fillColors.slice():i.push(r.fillColors)),i}},{key:"handlePatternFill",value:function(t){var e=t.fillConfig,r=(t.patternFill,t.fillColor),i=t.fillOpacity,n=t.defaultColor,o=this.w.config.fill;e&&(o=e);var a=this.opts,s=new Pc(this.ctx),l=Array.isArray(o.pattern.strokeWidth)?o.pattern.strokeWidth[this.seriesIndex]:o.pattern.strokeWidth,c=r;return Array.isArray(o.pattern.style)?void 0!==o.pattern.style[a.seriesNumber]?s.drawPattern(o.pattern.style[a.seriesNumber],o.pattern.width,o.pattern.height,c,l,i):n:s.drawPattern(o.pattern.style,o.pattern.width,o.pattern.height,c,l,i)}},{key:"handleGradientFill",value:function(t){var e=t.type,r=t.fillColor,i=t.fillOpacity,n=t.fillConfig,o=t.colorStops,a=t.i,s=this.w.config.fill;n&&(s=Bu(Bu({},s),n));var l=this.opts,c=new Pc(this.ctx),u=new f;e=e||s.gradient.type;var h,d=r,p=void 0===s.gradient.opacityFrom?i:Array.isArray(s.gradient.opacityFrom)?s.gradient.opacityFrom[a]:s.gradient.opacityFrom;d.indexOf("rgba")>-1&&(p=f.getOpacityFromRGBA(d));var g=void 0===s.gradient.opacityTo?i:Array.isArray(s.gradient.opacityTo)?s.gradient.opacityTo[a]:s.gradient.opacityTo;if(void 0===s.gradient.gradientToColors||0===s.gradient.gradientToColors.length)h="dark"===s.gradient.shade?u.shadeColor(-1*parseFloat(s.gradient.shadeIntensity),r.indexOf("rgb")>-1?f.rgb2hex(r):r):u.shadeColor(parseFloat(s.gradient.shadeIntensity),r.indexOf("rgb")>-1?f.rgb2hex(r):r);else if(s.gradient.gradientToColors[l.seriesNumber]){var b=s.gradient.gradientToColors[l.seriesNumber];h=b,b.indexOf("rgba")>-1&&(g=f.getOpacityFromRGBA(b))}else h=r;if(s.gradient.gradientFrom&&(d=s.gradient.gradientFrom),s.gradient.gradientTo&&(h=s.gradient.gradientTo),s.gradient.inverseColors){var y=d;d=h,h=y}return d.indexOf("rgb")>-1&&(d=f.rgb2hex(d)),h.indexOf("rgb")>-1&&(h=f.rgb2hex(h)),c.drawGradient(e,d,h,p,g,l.size,s.gradient.stops,o,a)}}],r&&Vu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Zu=qu;function $u(t){return $u="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},$u(t)}function Ju(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Qu(i.key),i)}}function Qu(t){var e=function(t){if("object"!=$u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=$u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$u(e)?e:e+""}var Ku=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w}var e,r;return e=t,r=[{key:"setGlobalMarkerSize",value:function(){var t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size:[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length<t.globals.series.length+1)for(var e=0;e<=t.globals.series.length;e++)void 0===t.globals.markers.size[e]&&t.globals.markers.size.push(t.globals.markers.size[0])}else t.globals.markers.size=t.config.series.map((function(e){return t.config.markers.size}))}},{key:"plotChartMarkers",value:function(t,e,r,i){var n=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=this.w,a=e,s=t,l=null,c=new Pc(this.ctx),u=o.config.markers.discrete&&o.config.markers.discrete.length;if(Array.isArray(s.x))for(var h=0;h<s.x.length;h++){var d=void 0,p=r,g=!f.isNumber(s.y[h]);1===r&&0===h&&(p=0),1===r&&1===h&&(p=1);var b="apexcharts-marker";if("line"!==o.config.chart.type&&"area"!==o.config.chart.type||o.globals.comboCharts||o.config.tooltip.intersect||(b+=" no-pointer-events"),(Array.isArray(o.config.markers.size)?o.globals.markers.size[e]>0:o.config.markers.size>0)||n||u){g||(b+=" w".concat(f.randomId()));var y=this.getMarkerConfig({cssClass:b,seriesIndex:e,dataPointIndex:p});o.config.series[a].data[p]&&(o.config.series[a].data[p].fillColor&&(y.pointFillColor=o.config.series[a].data[p].fillColor),o.config.series[a].data[p].strokeColor&&(y.pointStrokeColor=o.config.series[a].data[p].strokeColor)),void 0!==i&&(y.pSize=i),(s.x[h]<-o.globals.markers.largestSize||s.x[h]>o.globals.gridWidth+o.globals.markers.largestSize||s.y[h]<-o.globals.markers.largestSize||s.y[h]>o.globals.gridHeight+o.globals.markers.largestSize)&&(y.pSize=0),g||((o.globals.markers.size[e]>0||n||u)&&!l&&(l=c.group({class:n||u?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(o.globals.cuid,")")),(d=c.drawMarker(s.x[h],s.y[h],y)).attr("rel",p),d.attr("j",p),d.attr("index",e),d.node.setAttribute("default-marker-size",y.pSize),new vc(this.ctx).setSelectionFilter(d,e,p),this.addEvents(d),l&&l.add(d))}else void 0===o.globals.pointsArray[e]&&(o.globals.pointsArray[e]=[]),o.globals.pointsArray[e].push([s.x[h],s.y[h]])}return l}},{key:"getMarkerConfig",value:function(t){var e=t.cssClass,r=t.seriesIndex,i=t.dataPointIndex,n=void 0===i?null:i,o=t.radius,a=void 0===o?null:o,s=t.size,l=void 0===s?null:s,c=t.strokeWidth,u=void 0===c?null:c,h=this.w,f=this.getMarkerStyle(r),d=null===l?h.globals.markers.size[r]:l,p=h.config.markers;return null!==n&&p.discrete.length&&p.discrete.map((function(t){t.seriesIndex===r&&t.dataPointIndex===n&&(f.pointStrokeColor=t.strokeColor,f.pointFillColor=t.fillColor,d=t.size,f.pointShape=t.shape)})),{pSize:null===a?d:a,pRadius:null!==a?a:p.radius,pointStrokeWidth:null!==u?u:Array.isArray(p.strokeWidth)?p.strokeWidth[r]:p.strokeWidth,pointStrokeColor:f.pointStrokeColor,pointFillColor:f.pointFillColor,shape:f.pointShape||(Array.isArray(p.shape)?p.shape[r]:p.shape),class:e,pointStrokeOpacity:Array.isArray(p.strokeOpacity)?p.strokeOpacity[r]:p.strokeOpacity,pointStrokeDashArray:Array.isArray(p.strokeDashArray)?p.strokeDashArray[r]:p.strokeDashArray,pointFillOpacity:Array.isArray(p.fillOpacity)?p.fillOpacity[r]:p.fillOpacity,seriesIndex:r}}},{key:"addEvents",value:function(t){var e=this.w,r=new Pc(this.ctx);t.node.addEventListener("mouseenter",r.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",r.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",r.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",r.pathMouseDown.bind(this.ctx,t),{passive:!0})}},{key:"getMarkerStyle",value:function(t){var e=this.w,r=e.globals.markers.colors,i=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(i)?i[t]:i,pointFillColor:Array.isArray(r)?r[t]:r}}}],r&&Ju(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function th(t){return th="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},th(t)}function eh(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,rh(i.key),i)}}function rh(t){var e=function(t){if("object"!=th(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=th(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==th(e)?e:e+""}var ih=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled}var e,r;return e=t,r=[{key:"draw",value:function(t,e,r){var i=this.w,n=new Pc(this.ctx),o=r.realIndex,a=r.pointsPos,s=r.zRatio,l=r.elParent,c=n.group({class:"apexcharts-series-markers apexcharts-series-".concat(i.config.chart.type)});if(c.attr("clip-path","url(#gridRectMarkerMask".concat(i.globals.cuid,")")),Array.isArray(a.x))for(var u=0;u<a.x.length;u++){var h=e+1,f=!0;0===e&&0===u&&(h=0),0===e&&1===u&&(h=1);var d=i.globals.markers.size[o];if(s!==1/0){var p=i.config.plotOptions.bubble;d=i.globals.seriesZ[o][h],p.zScaling&&(d/=s),p.minBubbleRadius&&d<p.minBubbleRadius&&(d=p.minBubbleRadius),p.maxBubbleRadius&&d>p.maxBubbleRadius&&(d=p.maxBubbleRadius)}var g=a.x[u],b=a.y[u];if(d=d||0,null!==b&&void 0!==i.globals.series[o][h]||(f=!1),f){var y=this.drawPoint(g,b,d,o,h,e);c.add(y)}l.add(c)}}},{key:"drawPoint",value:function(t,e,r,i,n,o){var a=this.w,s=i,l=new b(this.ctx),c=new vc(this.ctx),u=new Zu(this.ctx),h=new Ku(this.ctx),f=new Pc(this.ctx),d=h.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:s,dataPointIndex:n,radius:"bubble"===a.config.chart.type||a.globals.comboCharts&&a.config.series[i]&&"bubble"===a.config.series[i].type?r:null}),p=u.fillPath({seriesNumber:i,dataPointIndex:n,color:d.pointFillColor,patternUnits:"objectBoundingBox",value:a.globals.series[i][o]}),g=f.drawMarker(t,e,d);if(a.config.series[s].data[n]&&a.config.series[s].data[n].fillColor&&(p=a.config.series[s].data[n].fillColor),g.attr({fill:p}),a.config.chart.dropShadow.enabled){var y=a.config.chart.dropShadow;c.dropShadow(g,y,i)}if(!this.initialAnim||a.globals.dataChanged||a.globals.resized)a.globals.animationEnded=!0;else{var v=a.config.chart.animations.speed;l.animateMarker(g,v,a.globals.easing,(function(){window.setTimeout((function(){l.animationCompleted(g)}),100)}))}return g.attr({rel:n,j:n,index:i,"default-marker-size":d.pSize}),c.setSelectionFilter(g,i,n),h.addEvents(g),g.node.classList.add("apexcharts-marker"),g}},{key:"centerTextInBubble",value:function(t){var e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize,10)/4}}}],r&&eh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function nh(t){return nh="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},nh(t)}function oh(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,ah(i.key),i)}}function ah(t){var e=function(t){if("object"!=nh(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=nh(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==nh(e)?e:e+""}var sh=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w}var e,r;return e=t,r=[{key:"dataLabelsCorrection",value:function(t,e,r,i,n,o,a){var s=this.w,l=!1,c=new Pc(this.ctx).getTextRects(r,a),u=c.width,h=c.height;e<0&&(e=0),e>s.globals.gridHeight+h&&(e=s.globals.gridHeight+h/2),void 0===s.globals.dataLabelsRects[i]&&(s.globals.dataLabelsRects[i]=[]),s.globals.dataLabelsRects[i].push({x:t,y:e,width:u,height:h});var f=s.globals.dataLabelsRects[i].length-2,d=void 0!==s.globals.lastDrawnDataLabelsIndexes[i]?s.globals.lastDrawnDataLabelsIndexes[i][s.globals.lastDrawnDataLabelsIndexes[i].length-1]:0;if(void 0!==s.globals.dataLabelsRects[i][f]){var p=s.globals.dataLabelsRects[i][d];(t>p.x+p.width||e>p.y+p.height||e+h<p.y||t+u<p.x)&&(l=!0)}return(0===n||o)&&(l=!0),{x:t,y:e,textRects:c,drawnextLabel:l}}},{key:"drawDataLabel",value:function(t){var e=this,r=t.type,i=t.pos,n=t.i,o=t.j,a=t.isRangeStart,s=t.strokeWidth,l=void 0===s?2:s,c=this.w,u=new Pc(this.ctx),h=c.config.dataLabels,f=0,d=0,p=o,g=null;if(-1!==c.globals.collapsedSeriesIndices.indexOf(n)||!h.enabled||!Array.isArray(i.x))return g;g=u.group({class:"apexcharts-data-labels"});for(var b=0;b<i.x.length;b++)if(f=i.x[b]+h.offsetX,d=i.y[b]+h.offsetY+l,!isNaN(f)){1===o&&0===b&&(p=0),1===o&&1===b&&(p=1);var y=c.globals.series[n][p];"rangeArea"===r&&(y=a?c.globals.seriesRangeStart[n][p]:c.globals.seriesRangeEnd[n][p]);var v="",m=function(t){return c.config.dataLabels.formatter(t,{ctx:e.ctx,seriesIndex:n,dataPointIndex:p,w:c})};"bubble"===c.config.chart.type?(v=m(y=c.globals.seriesZ[n][p]),d=i.y[b],d=new ih(this.ctx).centerTextInBubble(d,n,p).y):void 0!==y&&(v=m(y));var x=c.config.dataLabels.textAnchor;c.globals.isSlopeChart&&(x=0===p?"end":p===c.config.series[n].data.length-1?"start":"middle"),this.plotDataLabelsText({x:f,y:d,text:v,i:n,j:p,parent:g,offsetCorrection:!0,dataLabelsConfig:c.config.dataLabels,textAnchor:x})}return g}},{key:"plotDataLabelsText",value:function(t){var e=this.w,r=new Pc(this.ctx),i=t.x,n=t.y,o=t.i,a=t.j,s=t.text,l=t.textAnchor,c=t.fontSize,u=t.parent,h=t.dataLabelsConfig,f=t.color,d=t.alwaysDrawDataLabel,p=t.offsetCorrection,g=t.className,b=null;if(Array.isArray(e.config.dataLabels.enabledOnSeries)&&e.config.dataLabels.enabledOnSeries.indexOf(o)<0)return b;var y={x:i,y:n,drawnextLabel:!0,textRects:null};p&&(y=this.dataLabelsCorrection(i,n,s,o,a,d,parseInt(h.style.fontSize,10))),e.globals.zoomed||(i=y.x,n=y.y),y.textRects&&(i<-20-y.textRects.width||i>e.globals.gridWidth+y.textRects.width+30)&&(s="");var v=e.globals.dataLabels.style.colors[o];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(v=e.globals.dataLabels.style.colors[a]),"function"==typeof v&&(v=v({series:e.globals.series,seriesIndex:o,dataPointIndex:a,w:e})),f&&(v=f);var m=h.offsetX,x=h.offsetY;if("bar"!==e.config.chart.type&&"rangeBar"!==e.config.chart.type||(m=0,x=0),e.globals.isSlopeChart&&(0!==a&&(m=-2*h.offsetX+5),0!==a&&a!==e.config.series[o].data.length-1&&(m=0)),y.drawnextLabel){if((b=r.drawText({width:100,height:parseInt(h.style.fontSize,10),x:i+m,y:n+x,foreColor:v,textAnchor:l||h.textAnchor,text:s,fontSize:c||h.style.fontSize,fontFamily:h.style.fontFamily,fontWeight:h.style.fontWeight||"normal"})).attr({class:g||"apexcharts-datalabel",cx:i,cy:n}),h.dropShadow.enabled){var w=h.dropShadow;new vc(this.ctx).dropShadow(b,w)}u.add(b),void 0===e.globals.lastDrawnDataLabelsIndexes[o]&&(e.globals.lastDrawnDataLabelsIndexes[o]=[]),e.globals.lastDrawnDataLabelsIndexes[o].push(a)}return b}},{key:"addBackgroundToDataLabel",value:function(t,e){var r=this.w,i=r.config.dataLabels.background,n=i.padding,o=i.padding/2,a=e.width,s=e.height,l=new Pc(this.ctx).drawRect(e.x-n,e.y-o/2,a+2*n,s+o,i.borderRadius,"transparent"!==r.config.chart.background&&r.config.chart.background?r.config.chart.background:"#fff",i.opacity,i.borderWidth,i.borderColor);return i.dropShadow.enabled&&new vc(this.ctx).dropShadow(l,i.dropShadow),l}},{key:"dataLabelsBackground",value:function(){var t=this.w;if("bubble"!==t.config.chart.type)for(var e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),r=0;r<e.length;r++){var i=e[r],n=i.getBBox(),o=null;if(n.width&&n.height&&(o=this.addBackgroundToDataLabel(i,n)),o){i.parentNode.insertBefore(o.node,i);var a=i.getAttribute("fill");!t.config.chart.animations.enabled||t.globals.resized||t.globals.dataChanged?o.attr({fill:a}):o.animate().attr({fill:a}),i.setAttribute("fill",t.config.dataLabels.background.foreColor)}}}},{key:"bringForward",value:function(){for(var t=this.w,e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),r=t.globals.dom.baseEl.querySelector(".apexcharts-plot-series:last-child"),i=0;i<e.length;i++)r&&r.insertBefore(e[i],r.nextSibling)}}],r&&oh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const lh=sh;function ch(t){return ch="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},ch(t)}function uh(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,hh(i.key),i)}}function hh(t){var e=function(t){if("object"!=ch(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ch(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ch(e)?e:e+""}var fh=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w,this.legendInactiveClass="legend-mouseover-inactive"}var e,r;return e=t,r=[{key:"getAllSeriesEls",value:function(){return this.w.globals.dom.baseEl.getElementsByClassName("apexcharts-series")}},{key:"getSeriesByName",value:function(t){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner .apexcharts-series[seriesName='".concat(f.escapeString(t),"']"))}},{key:"isSeriesHidden",value:function(t){var e=this.getSeriesByName(t),r=parseInt(e.getAttribute("data:realIndex"),10);return{isHidden:e.classList.contains("apexcharts-series-collapsed"),realIndex:r}}},{key:"addCollapsedClassToSeries",value:function(t,e){var r=this.w;function i(r){for(var i=0;i<r.length;i++)r[i].index===e&&t.node.classList.add("apexcharts-series-collapsed")}i(r.globals.collapsedSeries),i(r.globals.ancillaryCollapsedSeries)}},{key:"toggleSeries",value:function(t){var e=this.isSeriesHidden(t);return this.ctx.legend.legendHelpers.toggleDataSeries(e.realIndex,e.isHidden),e.isHidden}},{key:"showSeries",value:function(t){var e=this.isSeriesHidden(t);e.isHidden&&this.ctx.legend.legendHelpers.toggleDataSeries(e.realIndex,!0)}},{key:"hideSeries",value:function(t){var e=this.isSeriesHidden(t);e.isHidden||this.ctx.legend.legendHelpers.toggleDataSeries(e.realIndex,!1)}},{key:"resetSeries",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this.w,n=f.clone(i.globals.initialSeries);i.globals.previousPaths=[],r?(i.globals.collapsedSeries=[],i.globals.ancillaryCollapsedSeries=[],i.globals.collapsedSeriesIndices=[],i.globals.ancillaryCollapsedSeriesIndices=[]):n=this.emptyCollapsedSeries(n),i.config.series=n,t&&(e&&(i.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(n,i.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(t){for(var e=this.w,r=0;r<t.length;r++)e.globals.collapsedSeriesIndices.indexOf(r)>-1&&(t[r].data=[]);return t}},{key:"highlightSeries",value:function(t){var e=this.w,r=this.getSeriesByName(t),i=parseInt(null==r?void 0:r.getAttribute("data:realIndex"),10),n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),o=null,a=null,s=null;if(e.globals.axisCharts||"radialBar"===e.config.chart.type)if(e.globals.axisCharts){o=e.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(i,"']")),a=e.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(i,"']"));var l=e.globals.seriesYAxisReverseMap[i];s=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(l,"']"))}else o=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(i+1,"']"));else o=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(i+1,"'] path"));for(var c=0;c<n.length;c++)n[c].classList.add(this.legendInactiveClass);if(o)e.globals.axisCharts||o.parentNode.classList.remove(this.legendInactiveClass),o.classList.remove(this.legendInactiveClass),null!==a&&a.classList.remove(this.legendInactiveClass),null!==s&&s.classList.remove(this.legendInactiveClass);else for(var u=0;u<n.length;u++)n[u].classList.remove(this.legendInactiveClass)}},{key:"toggleSeriesOnHover",value:function(t,e){var r=this.w;e||(e=t.target);var i=r.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis");if("mousemove"===t.type){var n=parseInt(e.getAttribute("rel"),10)-1;this.highlightSeries(r.globals.seriesNames[n])}else if("mouseout"===t.type)for(var o=0;o<i.length;o++)i[o].classList.remove(this.legendInactiveClass)}},{key:"highlightRangeInSeries",value:function(t,e){var r=this,i=this.w,n=i.globals.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),o=function(t){for(var e=0;e<n.length;e++)n[e].classList[t](r.legendInactiveClass)};if("mousemove"===t.type){var a=parseInt(e.getAttribute("rel"),10)-1;o("add");var s=i.config.plotOptions.heatmap.colorScale.ranges;!function(t,e){for(var i=0;i<n.length;i++){var o=Number(n[i].getAttribute("val"));o>=t.from&&(o<t.to||t.to===e&&o===e)&&n[i].classList.remove(r.legendInactiveClass)}}(s[a],s.reduce((function(t,e){return Math.max(t,e.to)}),0))}else"mouseout"===t.type&&o("remove")}},{key:"getActiveConfigSeriesIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"asc",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=this.w,i=0;if(r.config.series.length>1)for(var n=r.config.series.map((function(t,i){return t.data&&t.data.length>0&&-1===r.globals.collapsedSeriesIndices.indexOf(i)&&(!r.globals.comboCharts||0===e.length||e.length&&e.indexOf(r.config.series[i].type)>-1)?i:-1})),o="asc"===t?0:n.length-1;"asc"===t?o<n.length:o>=0;"asc"===t?o++:o--)if(-1!==n[o]){i=n[o];break}return i}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map((function(t,e){return"bar"===t.type||"column"===t.type?e:-1})).filter((function(t){return-1!==t})):this.w.config.series.map((function(t,e){return e}))}},{key:"getPreviousPaths",value:function(){var t=this.w;function e(e,r,i){for(var n=e[r].childNodes,o={type:i,paths:[],realIndex:e[r].getAttribute("data:realIndex")},a=0;a<n.length;a++)if(n[a].hasAttribute("pathTo")){var s=n[a].getAttribute("pathTo");o.paths.push({d:s})}t.globals.previousPaths.push(o)}t.globals.previousPaths=[],["line","area","bar","rangebar","rangeArea","candlestick","radar"].forEach((function(r){for(var i,n=(i=r,t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(i,"-series .apexcharts-series"))),o=0;o<n.length;o++)e(n,o,r)}));var r=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series"));if(r.length>0)for(var i=function(e){for(var r=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(e,"'] rect")),i=[],n=function(t){var e=function(e){return r[t].getAttribute(e)},n={x:parseFloat(e("x")),y:parseFloat(e("y")),width:parseFloat(e("width")),height:parseFloat(e("height"))};i.push({rect:n,color:r[t].getAttribute("color")})},o=0;o<r.length;o++)n(o);t.globals.previousPaths.push(i)},n=0;n<r.length;n++)i(n);t.globals.axisCharts||(t.globals.previousPaths=t.globals.series)}},{key:"clearPreviousPaths",value:function(){var t=this.w;t.globals.previousPaths=[],t.globals.allSeriesCollapsed=!1}},{key:"handleNoData",value:function(){var t=this.w,e=t.config.noData,r=new Pc(this.ctx),i=t.globals.svgWidth/2,n=t.globals.svgHeight/2,o="middle";if(t.globals.noData=!0,t.globals.animationEnded=!0,"left"===e.align?(i=10,o="start"):"right"===e.align&&(i=t.globals.svgWidth-10,o="end"),"top"===e.verticalAlign?n=50:"bottom"===e.verticalAlign&&(n=t.globals.svgHeight-50),i+=e.offsetX,n=n+parseInt(e.style.fontSize,10)+2+e.offsetY,void 0!==e.text&&""!==e.text){var a=r.drawText({x:i,y:n,text:e.text,textAnchor:o,fontSize:e.style.fontSize,fontFamily:e.style.fontFamily,foreColor:e.style.color,opacity:1,class:"apexcharts-text-nodata"});t.globals.dom.Paper.add(a)}}},{key:"setNullSeriesToZeroValues",value:function(t){for(var e=this.w,r=0;r<t.length;r++)if(0===t[r].length)for(var i=0;i<t[e.globals.maxValsInArrayIndex].length;i++)t[r].push(0);return t}},{key:"hasAllSeriesEqualX",value:function(){for(var t=!0,e=this.w,r=this.filteredSeriesX(),i=0;i<r.length-1;i++)if(r[i][0]!==r[i+1][0]){t=!1;break}return e.globals.allSeriesHasEqualX=t,t}},{key:"filteredSeriesX",value:function(){return this.w.globals.seriesX.map((function(t){return t.length>0?t:[]}))}}],r&&uh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function dh(t){return dh="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},dh(t)}function ph(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function gh(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,bh(i.key),i)}}function bh(t){var e=function(t){if("object"!=dh(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=dh(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==dh(e)?e:e+""}var yh=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new Mc(this.ctx)}var e,r;return e=t,r=[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var t=this.w.config.series.slice(),e=new fh(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&null!==t[this.activeSeriesIndex].data[0]&&void 0!==t[this.activeSeriesIndex].data[0].x&&null!==t[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var t=this.w.config.series.slice(),e=new fh(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&void 0!==t[this.activeSeriesIndex].data[0]&&null!==t[this.activeSeriesIndex].data[0]&&t[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(t,e){for(var r=this.w.config,i=this.w.globals,n="boxPlot"===r.chart.type||"boxPlot"===r.series[e].type,o=0;o<t[e].data.length;o++)if(void 0!==t[e].data[o][1]&&(Array.isArray(t[e].data[o][1])&&4===t[e].data[o][1].length&&!n?this.twoDSeries.push(f.parseNumber(t[e].data[o][1][3])):t[e].data[o].length>=5?this.twoDSeries.push(f.parseNumber(t[e].data[o][4])):this.twoDSeries.push(f.parseNumber(t[e].data[o][1])),i.dataFormatXNumeric=!0),"datetime"===r.xaxis.type){var a=new Date(t[e].data[o][0]);a=new Date(a).getTime(),this.twoDSeriesX.push(a)}else this.twoDSeriesX.push(t[e].data[o][0]);for(var s=0;s<t[e].data.length;s++)void 0!==t[e].data[s][2]&&(this.threeDSeries.push(t[e].data[s][2]),i.isDataXYZ=!0)}},{key:"handleFormatXY",value:function(t,e){var r=this.w.config,i=this.w.globals,n=new Vc(this.ctx),o=e;i.collapsedSeriesIndices.indexOf(e)>-1&&(o=this.activeSeriesIndex);for(var a=0;a<t[e].data.length;a++)void 0!==t[e].data[a].y&&(Array.isArray(t[e].data[a].y)?this.twoDSeries.push(f.parseNumber(t[e].data[a].y[t[e].data[a].y.length-1])):this.twoDSeries.push(f.parseNumber(t[e].data[a].y))),void 0!==t[e].data[a].goals&&Array.isArray(t[e].data[a].goals)?(void 0===this.seriesGoals[e]&&(this.seriesGoals[e]=[]),this.seriesGoals[e].push(t[e].data[a].goals)):(void 0===this.seriesGoals[e]&&(this.seriesGoals[e]=[]),this.seriesGoals[e].push(null));for(var s=0;s<t[o].data.length;s++){var l="string"==typeof t[o].data[s].x,c=Array.isArray(t[o].data[s].x),u=!c&&!!n.isValidDate(t[o].data[s].x);if(l||u)if(l||r.xaxis.convertedCatToNumeric){var h=i.isBarHorizontal&&i.isRangeData;"datetime"!==r.xaxis.type||h?(this.fallbackToCategory=!0,this.twoDSeriesX.push(t[o].data[s].x),isNaN(t[o].data[s].x)||"category"===this.w.config.xaxis.type||"string"==typeof t[o].data[s].x||(i.isXNumeric=!0)):this.twoDSeriesX.push(n.parseDate(t[o].data[s].x))}else"datetime"===r.xaxis.type?this.twoDSeriesX.push(n.parseDate(t[o].data[s].x.toString())):(i.dataFormatXNumeric=!0,i.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(t[o].data[s].x)));else c?(this.fallbackToCategory=!0,this.twoDSeriesX.push(t[o].data[s].x)):(i.isXNumeric=!0,i.dataFormatXNumeric=!0,this.twoDSeriesX.push(t[o].data[s].x))}if(t[e].data[0]&&void 0!==t[e].data[0].z){for(var d=0;d<t[e].data.length;d++)this.threeDSeries.push(t[e].data[d].z);i.isDataXYZ=!0}}},{key:"handleRangeData",value:function(t,e){var r=this.w.globals,i={};return this.isFormat2DArray()?i=this.handleRangeDataFormat("array",t,e):this.isFormatXY()&&(i=this.handleRangeDataFormat("xy",t,e)),r.seriesRangeStart.push(void 0===i.start?[]:i.start),r.seriesRangeEnd.push(void 0===i.end?[]:i.end),r.seriesRange.push(i.rangeUniques),r.seriesRange.forEach((function(t,e){t&&t.forEach((function(t,e){t.y.forEach((function(e,r){for(var i=0;i<t.y.length;i++)if(r!==i){var n=e.y1,o=e.y2,a=t.y[i].y1;n<=t.y[i].y2&&a<=o&&(t.overlaps.indexOf(e.rangeName)<0&&t.overlaps.push(e.rangeName),t.overlaps.indexOf(t.y[i].rangeName)<0&&t.overlaps.push(t.y[i].rangeName))}}))}))})),i}},{key:"handleCandleStickBoxData",value:function(t,e){var r=this.w.globals,i={};return this.isFormat2DArray()?i=this.handleCandleStickBoxDataFormat("array",t,e):this.isFormatXY()&&(i=this.handleCandleStickBoxDataFormat("xy",t,e)),r.seriesCandleO[e]=i.o,r.seriesCandleH[e]=i.h,r.seriesCandleM[e]=i.m,r.seriesCandleL[e]=i.l,r.seriesCandleC[e]=i.c,i}},{key:"handleRangeDataFormat",value:function(t,e,r){var i=[],n=[],o=e[r].data.filter((function(t,e,r){return e===r.findIndex((function(e){return e.x===t.x}))})).map((function(t,e){return{x:t.x,overlaps:[],y:[]}}));if("array"===t)for(var a=0;a<e[r].data.length;a++)Array.isArray(e[r].data[a])?(i.push(e[r].data[a][1][0]),n.push(e[r].data[a][1][1])):(i.push(e[r].data[a]),n.push(e[r].data[a]));else if("xy"===t)for(var s=function(t){var a=Array.isArray(e[r].data[t].y),s=f.randomId(),l=e[r].data[t].x,c={y1:a?e[r].data[t].y[0]:e[r].data[t].y,y2:a?e[r].data[t].y[1]:e[r].data[t].y,rangeName:s};e[r].data[t].rangeName=s;var u=o.findIndex((function(t){return t.x===l}));o[u].y.push(c),i.push(c.y1),n.push(c.y2)},l=0;l<e[r].data.length;l++)s(l);return{start:i,end:n,rangeUniques:o}}},{key:"handleCandleStickBoxDataFormat",value:function(t,e,r){var i=this.w,n="boxPlot"===i.config.chart.type||"boxPlot"===i.config.series[r].type,o=[],a=[],s=[],l=[],c=[];if("array"===t)if(n&&6===e[r].data[0].length||!n&&5===e[r].data[0].length)for(var u=0;u<e[r].data.length;u++)o.push(e[r].data[u][1]),a.push(e[r].data[u][2]),n?(s.push(e[r].data[u][3]),l.push(e[r].data[u][4]),c.push(e[r].data[u][5])):(l.push(e[r].data[u][3]),c.push(e[r].data[u][4]));else for(var h=0;h<e[r].data.length;h++)Array.isArray(e[r].data[h][1])&&(o.push(e[r].data[h][1][0]),a.push(e[r].data[h][1][1]),n?(s.push(e[r].data[h][1][2]),l.push(e[r].data[h][1][3]),c.push(e[r].data[h][1][4])):(l.push(e[r].data[h][1][2]),c.push(e[r].data[h][1][3])));else if("xy"===t)for(var f=0;f<e[r].data.length;f++)Array.isArray(e[r].data[f].y)&&(o.push(e[r].data[f].y[0]),a.push(e[r].data[f].y[1]),n?(s.push(e[r].data[f].y[2]),l.push(e[r].data[f].y[3]),c.push(e[r].data[f].y[4])):(l.push(e[r].data[f].y[2]),c.push(e[r].data[f].y[3])));return{o,h:a,m:s,l,c}}},{key:"parseDataAxisCharts",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.ctx,i=this.w.config,n=this.w.globals,o=new Vc(r),a=i.labels.length>0?i.labels.slice():i.xaxis.categories.slice();n.isRangeBar="rangeBar"===i.chart.type&&n.isBarHorizontal,n.hasXaxisGroups="category"===i.xaxis.type&&i.xaxis.group.groups.length>0,n.hasXaxisGroups&&(n.groups=i.xaxis.group.groups),t.forEach((function(t,e){void 0!==t.name?n.seriesNames.push(t.name):n.seriesNames.push("series-"+parseInt(e+1,10))})),this.coreUtils.setSeriesYAxisMappings();var s=[],l=function(t){return function(t){if(Array.isArray(t))return ph(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return ph(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ph(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(new Set(i.series.map((function(t){return t.group}))));i.series.forEach((function(t,e){var r=l.indexOf(t.group);s[r]||(s[r]=[]),s[r].push(n.seriesNames[e])})),n.seriesGroups=s;for(var c=function(){for(var t=0;t<a.length;t++)if("string"==typeof a[t]){if(!o.isValidDate(a[t]))throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");e.twoDSeriesX.push(o.parseDate(a[t]))}else e.twoDSeriesX.push(a[t])},u=0;u<t.length;u++){if(this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],void 0===t[u].data)return void console.error("It is a possibility that you may have not included 'data' property in series.");if("rangeBar"!==i.chart.type&&"rangeArea"!==i.chart.type&&"rangeBar"!==t[u].type&&"rangeArea"!==t[u].type||(n.isRangeData=!0,"rangeBar"!==i.chart.type&&"rangeArea"!==i.chart.type||this.handleRangeData(t,u)),this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(t,u):this.isFormatXY()&&this.handleFormatXY(t,u),"candlestick"!==i.chart.type&&"candlestick"!==t[u].type&&"boxPlot"!==i.chart.type&&"boxPlot"!==t[u].type||this.handleCandleStickBoxData(t,u),n.series.push(this.twoDSeries),n.labels.push(this.twoDSeriesX),n.seriesX.push(this.twoDSeriesX),n.seriesGoals=this.seriesGoals,u!==this.activeSeriesIndex||this.fallbackToCategory||(n.isXNumeric=!0);else{"datetime"===i.xaxis.type?(n.isXNumeric=!0,c(),n.seriesX.push(this.twoDSeriesX)):"numeric"===i.xaxis.type&&(n.isXNumeric=!0,a.length>0&&(this.twoDSeriesX=a,n.seriesX.push(this.twoDSeriesX))),n.labels.push(this.twoDSeriesX);var h=t[u].data.map((function(t){return f.parseNumber(t)}));n.series.push(h)}n.seriesZ.push(this.threeDSeries),void 0!==t[u].color?n.seriesColors.push(t[u].color):n.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(t){var e=this.w.globals,r=this.w.config;e.series=t.slice(),e.seriesNames=r.labels.slice();for(var i=0;i<e.series.length;i++)void 0===e.seriesNames[i]&&e.seriesNames.push("series-"+(i+1));return this.w}},{key:"handleExternalLabelsData",value:function(t){var e=this.w.config,r=this.w.globals;e.xaxis.categories.length>0?r.labels=e.xaxis.categories:e.labels.length>0?r.labels=e.labels.slice():this.fallbackToCategory?(r.labels=r.labels[0],r.seriesRange.length&&(r.seriesRange.map((function(t){t.forEach((function(t){r.labels.indexOf(t.x)<0&&t.x&&r.labels.push(t.x)}))})),r.labels=Array.from(new Set(r.labels.map(JSON.stringify)),JSON.parse)),e.xaxis.convertedCatToNumeric&&(new Cu(e).convertCatToNumericXaxis(e,this.ctx,r.seriesX[0]),this._generateExternalLabels(t))):this._generateExternalLabels(t)}},{key:"_generateExternalLabels",value:function(t){var e=this.w.globals,r=this.w.config,i=[];if(e.axisCharts){if(e.series.length>0)if(this.isFormatXY())for(var n=r.series.map((function(t,e){return t.data.filter((function(t,e,r){return r.findIndex((function(e){return e.x===t.x}))===e}))})),o=n.reduce((function(t,e,r,i){return i[t].length>e.length?t:r}),0),a=0;a<n[o].length;a++)i.push(a+1);else for(var s=0;s<e.series[e.maxValsInArrayIndex].length;s++)i.push(s+1);e.seriesX=[];for(var l=0;l<t.length;l++)e.seriesX.push(i);this.w.globals.isBarHorizontal||(e.isXNumeric=!0)}if(0===i.length){i=e.axisCharts?[]:e.series.map((function(t,e){return e+1}));for(var c=0;c<t.length;c++)e.seriesX.push(i)}e.labels=i,r.xaxis.convertedCatToNumeric&&(e.categoryLabels=i.map((function(t){return r.xaxis.labels.formatter(t)}))),e.noLabelsProvided=!0}},{key:"parseData",value:function(t){var e=this.w,r=e.config,i=e.globals;if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.ctx.core.resetGlobals(),this.ctx.core.isMultipleY(),i.axisCharts?(this.parseDataAxisCharts(t),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(t),r.chart.stacked){var n=new fh(this.ctx);i.series=n.setNullSeriesToZeroValues(i.series)}this.coreUtils.getSeriesTotals(),i.axisCharts&&(i.stackedSeriesTotals=this.coreUtils.getStackedSeriesTotals(),i.stackedSeriesTotalsByGroups=this.coreUtils.getStackedSeriesTotalsByGroups()),this.coreUtils.getPercentSeries(),i.dataFormatXNumeric||i.isXNumeric&&("numeric"!==r.xaxis.type||0!==r.labels.length||0!==r.xaxis.categories.length)||this.handleExternalLabelsData(t);for(var o=this.coreUtils.getCategoryLabels(i.labels),a=0;a<o.length;a++)if(Array.isArray(o[a])){i.isMultiLineX=!0;break}}},{key:"excludeCollapsedSeriesInYAxis",value:function(){var t=this.w,e=[];t.globals.seriesYAxisMap.forEach((function(r,i){var n=0;r.forEach((function(e){-1!==t.globals.collapsedSeriesIndices.indexOf(e)&&n++})),n>0&&n==r.length&&e.push(i)})),t.globals.ignoreYAxisIndexes=e.map((function(t){return t}))}}],r&&gh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function vh(t){return vh="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},vh(t)}function mh(t){return function(t){if(Array.isArray(t))return xh(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return xh(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?xh(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xh(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function wh(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Sh(i.key),i)}}function Sh(t){var e=function(t){if("object"!=vh(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=vh(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==vh(e)?e:e+""}var kh=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w}var e,r;return e=t,r=[{key:"scaleSvgNode",value:function(t,e){var r=parseFloat(t.getAttributeNS(null,"width")),i=parseFloat(t.getAttributeNS(null,"height"));t.setAttributeNS(null,"width",r*e),t.setAttributeNS(null,"height",i*e),t.setAttributeNS(null,"viewBox","0 0 "+r+" "+i)}},{key:"getSvgString",value:function(){var t=this;return new Promise((function(e){var r=t.w,i=r.config.chart.toolbar.export.width,n=r.config.chart.toolbar.export.scale||i/r.globals.svgWidth;n||(n=1);var o=t.w.globals.dom.Paper.svg(),a=t.w.globals.dom.Paper.node.cloneNode(!0);1!==n&&t.scaleSvgNode(a,n),t.convertImagesToBase64(a).then((function(){o=(new XMLSerializer).serializeToString(a),e(o.replace(/&nbsp;/g,"&#160;"))}))}))}},{key:"convertImagesToBase64",value:function(t){var e=this,r=t.getElementsByTagName("image"),i=Array.from(r).map((function(t){var r=t.getAttributeNS("http://www.w3.org/1999/xlink","href");return r&&!r.startsWith("data:")?e.getBase64FromUrl(r).then((function(e){t.setAttributeNS("http://www.w3.org/1999/xlink","href",e)})).catch((function(t){console.error("Error converting image to base64:",t)})):Promise.resolve()}));return Promise.all(i)}},{key:"getBase64FromUrl",value:function(t){return new Promise((function(e,r){var i=new Image;i.crossOrigin="Anonymous",i.onload=function(){var t=document.createElement("canvas");t.width=i.width,t.height=i.height,t.getContext("2d").drawImage(i,0,0),e(t.toDataURL())},i.onerror=r,i.src=t}))}},{key:"cleanup",value:function(){var t=this.w,e=t.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),r=t.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(i,(function(t){t.setAttribute("width",0)})),e&&e[0]&&(e[0].setAttribute("x",-500),e[0].setAttribute("x1",-500),e[0].setAttribute("x2",-500)),r&&r[0]&&(r[0].setAttribute("y",-100),r[0].setAttribute("y1",-100),r[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){var t=this;return new Promise((function(e){t.cleanup(),t.getSvgString().then((function(t){var r=new Blob([t],{type:"image/svg+xml;charset=utf-8"});e(URL.createObjectURL(r))}))}))}},{key:"dataURI",value:function(t){var e=this;return new Promise((function(r){var i=e.w,n=t?t.scale||t.width/i.globals.svgWidth:1;e.cleanup();var o=document.createElement("canvas");o.width=i.globals.svgWidth*n,o.height=parseInt(i.globals.dom.elWrap.style.height,10)*n;var a="transparent"!==i.config.chart.background&&i.config.chart.background?i.config.chart.background:"#fff",s=o.getContext("2d");s.fillStyle=a,s.fillRect(0,0,o.width*n,o.height*n),e.getSvgString().then((function(t){var e="data:image/svg+xml,"+encodeURIComponent(t),i=new Image;i.crossOrigin="anonymous",i.onload=function(){if(s.drawImage(i,0,0),o.msToBlob){var t=o.msToBlob();r({blob:t})}else{var e=o.toDataURL("image/png");r({imgURI:e})}},i.src=e}))}))}},{key:"exportToSVG",value:function(){var t=this;this.svgUrl().then((function(e){t.triggerDownload(e,t.w.config.chart.toolbar.export.svg.filename,".svg")}))}},{key:"exportToPng",value:function(){var t=this,e=this.w.config.chart.toolbar.export.scale,r=this.w.config.chart.toolbar.export.width,i=e?{scale:e}:r?{width:r}:void 0;this.dataURI(i).then((function(e){var r=e.imgURI,i=e.blob;i?navigator.msSaveOrOpenBlob(i,t.w.globals.chartID+".png"):t.triggerDownload(r,t.w.config.chart.toolbar.export.png.filename,".png")}))}},{key:"exportToCSV",value:function(t){var e=this,r=t.series,i=t.fileName,n=t.columnDelimiter,o=void 0===n?",":n,a=t.lineDelimiter,s=void 0===a?"\n":a,l=this.w;r||(r=l.config.series);var c,u,h=[],d=[],p="",g=l.globals.series.map((function(t,e){return-1===l.globals.collapsedSeriesIndices.indexOf(e)?t:[]})),b=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.categoryFormatter?l.config.chart.toolbar.export.csv.categoryFormatter(t):"datetime"===l.config.xaxis.type&&String(t).length>=10?new Date(t).toDateString():f.isNumber(t)?t:t.split(o).join("")},y=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.valueFormatter?l.config.chart.toolbar.export.csv.valueFormatter(t):t},v=Math.max.apply(Math,mh(r.map((function(t){return t.data?t.data.length:0})))),m=new yh(this.ctx),x=new eu(this.ctx),w=function(t){var r="";if(l.globals.axisCharts){if("category"===l.config.xaxis.type||l.config.xaxis.convertedCatToNumeric)if(l.globals.isBarHorizontal){var i=l.globals.yLabelFormatters[0],n=new fh(e.ctx).getActiveConfigSeriesIndex();r=i(l.globals.labels[t],{seriesIndex:n,dataPointIndex:t,w:l})}else r=x.getLabel(l.globals.labels,l.globals.timescaleLabels,0,t).text;"datetime"===l.config.xaxis.type&&(l.config.xaxis.categories.length?r=l.config.xaxis.categories[t]:l.config.labels.length&&(r=l.config.labels[t]))}else r=l.config.labels[t];return null===r?"nullvalue":(Array.isArray(r)&&(r=r.join(" ")),f.isNumber(r)?r:r.split(o).join(""))};h.push(l.config.chart.toolbar.export.csv.headerCategory),"boxPlot"===l.config.chart.type?(h.push("minimum"),h.push("q1"),h.push("median"),h.push("q3"),h.push("maximum")):"candlestick"===l.config.chart.type?(h.push("open"),h.push("high"),h.push("low"),h.push("close")):"rangeBar"===l.config.chart.type?(h.push("minimum"),h.push("maximum")):r.map((function(t,e){var r=(t.name?t.name:"series-".concat(e))+"";l.globals.axisCharts&&h.push(r.split(o).join("")?r.split(o).join(""):"series-".concat(e))})),l.globals.axisCharts||(h.push(l.config.chart.toolbar.export.csv.headerValue),d.push(h.join(o))),l.globals.allSeriesHasEqualX||!l.globals.axisCharts||l.config.xaxis.categories.length||l.config.labels.length?r.map((function(t,e){l.globals.axisCharts?function(t,e){if(h.length&&0===e&&d.push(h.join(o)),t.data){t.data=t.data.length&&t.data||mh(Array(v)).map((function(){return""}));for(var i=0;i<t.data.length;i++){h=[];var n=w(i);if("nullvalue"!==n){if(n||(m.isFormatXY()?n=r[e].data[i].x:m.isFormat2DArray()&&(n=r[e].data[i]?r[e].data[i][0]:"")),0===e){h.push(b(n));for(var a=0;a<l.globals.series.length;a++){var s,c=m.isFormatXY()?null===(s=r[a].data[i])||void 0===s?void 0:s.y:g[a][i];h.push(y(c))}}("candlestick"===l.config.chart.type||t.type&&"candlestick"===t.type)&&(h.pop(),h.push(l.globals.seriesCandleO[e][i]),h.push(l.globals.seriesCandleH[e][i]),h.push(l.globals.seriesCandleL[e][i]),h.push(l.globals.seriesCandleC[e][i])),("boxPlot"===l.config.chart.type||t.type&&"boxPlot"===t.type)&&(h.pop(),h.push(l.globals.seriesCandleO[e][i]),h.push(l.globals.seriesCandleH[e][i]),h.push(l.globals.seriesCandleM[e][i]),h.push(l.globals.seriesCandleL[e][i]),h.push(l.globals.seriesCandleC[e][i])),"rangeBar"===l.config.chart.type&&(h.pop(),h.push(l.globals.seriesRangeStart[e][i]),h.push(l.globals.seriesRangeEnd[e][i])),h.length&&d.push(h.join(o))}}}}(t,e):((h=[]).push(b(l.globals.labels[e])),h.push(y(g[e])),d.push(h.join(o)))})):(c=new Set,u={},r.forEach((function(t,e){null==t||t.data.forEach((function(t){var i,n;if(m.isFormatXY())i=t.x,n=t.y;else{if(!m.isFormat2DArray())return;i=t[0],n=t[1]}u[i]||(u[i]=Array(r.length).fill("")),u[i][e]=y(n),c.add(i)}))})),h.length&&d.push(h.join(o)),Array.from(c).sort().forEach((function(t){d.push([b(t),u[t].join(o)])}))),p+=d.join(s),this.triggerDownload("data:text/csv; charset=utf-8,"+encodeURIComponent("\ufeff"+p),i||l.config.chart.toolbar.export.csv.filename,".csv")}},{key:"triggerDownload",value:function(t,e,r){var i=document.createElement("a");i.href=t,i.download=(e||this.w.globals.chartID)+r,document.body.appendChild(i),i.click(),document.body.removeChild(i)}}],r&&wh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Ah=kh;function Oh(t){return Oh="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},Oh(t)}function Ph(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Ch(i.key),i)}}function Ch(t){var e=function(t){if("object"!=Oh(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Oh(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Oh(e)?e:e+""}var jh=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.elgrid=r,this.w=e.w;var i=this.w;this.axesUtils=new eu(e),this.xaxisLabels=i.globals.labels.slice(),i.globals.timescaleLabels.length>0&&!i.globals.isBarHorizontal&&(this.xaxisLabels=i.globals.timescaleLabels.slice()),i.config.xaxis.overwriteCategories&&(this.xaxisLabels=i.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===i.config.xaxis.position?this.offY=0:this.offY=i.globals.gridHeight,this.offY=this.offY+i.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===i.config.chart.type&&i.config.plotOptions.bar.horizontal,this.xaxisFontSize=i.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=i.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=i.config.xaxis.labels.style.colors,this.xaxisBorderWidth=i.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=i.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=i.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=i.config.xaxis.axisBorder.height,this.yaxis=i.config.yaxis[0]}var e,r;return e=t,r=[{key:"drawXaxis",value:function(){var t=this.w,e=new Pc(this.ctx),r=e.group({class:"apexcharts-xaxis",transform:"translate(".concat(t.config.xaxis.offsetX,", ").concat(t.config.xaxis.offsetY,")")}),i=e.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});r.add(i);for(var n=[],o=0;o<this.xaxisLabels.length;o++)n.push(this.xaxisLabels[o]);if(this.drawXAxisLabelAndGroup(!0,e,i,n,t.globals.isXNumeric,(function(t,e){return e})),t.globals.hasXaxisGroups){var a=t.globals.groups;n=[];for(var s=0;s<a.length;s++)n.push(a[s].title);var l={};t.config.xaxis.group.style&&(l.xaxisFontSize=t.config.xaxis.group.style.fontSize,l.xaxisFontFamily=t.config.xaxis.group.style.fontFamily,l.xaxisForeColors=t.config.xaxis.group.style.colors,l.fontWeight=t.config.xaxis.group.style.fontWeight,l.cssClass=t.config.xaxis.group.style.cssClass),this.drawXAxisLabelAndGroup(!1,e,i,n,!1,(function(t,e){return a[t].cols*e}),l)}if(void 0!==t.config.xaxis.title.text){var c=e.group({class:"apexcharts-xaxis-title"}),u=e.drawText({x:t.globals.gridWidth/2+t.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+("bottom"===t.config.xaxis.position?t.globals.xAxisLabelsHeight:-t.globals.xAxisLabelsHeight-10)+t.config.xaxis.title.offsetY,text:t.config.xaxis.title.text,textAnchor:"middle",fontSize:t.config.xaxis.title.style.fontSize,fontFamily:t.config.xaxis.title.style.fontFamily,fontWeight:t.config.xaxis.title.style.fontWeight,foreColor:t.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+t.config.xaxis.title.style.cssClass});c.add(u),r.add(c)}if(t.config.xaxis.axisBorder.show){var h=t.globals.barPadForNumericAxis,f=e.drawLine(t.globals.padHorizontal+t.config.xaxis.axisBorder.offsetX-h,this.offY,this.xaxisBorderWidth+h,this.offY,t.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(f):r.add(f)}return r}},{key:"drawXAxisLabelAndGroup",value:function(t,e,r,i,n,o){var a,s=this,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},c=[],u=[],h=this.w,f=l.xaxisFontSize||this.xaxisFontSize,d=l.xaxisFontFamily||this.xaxisFontFamily,p=l.xaxisForeColors||this.xaxisForeColors,g=l.fontWeight||h.config.xaxis.labels.style.fontWeight,b=l.cssClass||h.config.xaxis.labels.style.cssClass,y=h.globals.padHorizontal,v=i.length,m="category"===h.config.xaxis.type?h.globals.dataPoints:v;if(0===m&&v>m&&(m=v),n){var x=Math.max(Number(h.config.xaxis.tickAmount)||1,m>1?m-1:m);a=h.globals.gridWidth/Math.min(x,v-1),y=y+o(0,a)/2+h.config.xaxis.labels.offsetX}else a=h.globals.gridWidth/m,y=y+o(0,a)+h.config.xaxis.labels.offsetX;for(var w=function(n){var l=y-o(n,a)/2+h.config.xaxis.labels.offsetX;0===n&&1===v&&a/2===y&&1===m&&(l=h.globals.gridWidth/2);var x=s.axesUtils.getLabel(i,h.globals.timescaleLabels,l,n,c,f,t),w=28;if(h.globals.rotateXLabels&&t&&(w=22),h.config.xaxis.title.text&&"top"===h.config.xaxis.position&&(w+=parseFloat(h.config.xaxis.title.style.fontSize)+2),t||(w=w+parseFloat(f)+(h.globals.xAxisLabelsHeight-h.globals.xAxisGroupLabelsHeight)+(h.globals.rotateXLabels?10:0)),x=void 0!==h.config.xaxis.tickAmount&&"dataPoints"!==h.config.xaxis.tickAmount&&"datetime"!==h.config.xaxis.type?s.axesUtils.checkLabelBasedOnTickamount(n,x,v):s.axesUtils.checkForOverflowingLabels(n,x,v,c,u),h.config.xaxis.labels.show){var S=e.drawText({x:x.x,y:s.offY+h.config.xaxis.labels.offsetY+w-("top"===h.config.xaxis.position?h.globals.xAxisHeight+h.config.xaxis.axisTicks.height-2:0),text:x.text,textAnchor:"middle",fontWeight:x.isBold?600:g,fontSize:f,fontFamily:d,foreColor:Array.isArray(p)?t&&h.config.xaxis.convertedCatToNumeric?p[h.globals.minX+n-1]:p[n]:p,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+b});if(r.add(S),S.on("click",(function(t){if("function"==typeof h.config.chart.events.xAxisLabelClick){var e=Object.assign({},h,{labelIndex:n});h.config.chart.events.xAxisLabelClick(t,s.ctx,e)}})),t){var k=document.createElementNS(h.globals.SVGNS,"title");k.textContent=Array.isArray(x.text)?x.text.join(" "):x.text,S.node.appendChild(k),""!==x.text&&(c.push(x.text),u.push(x))}}n<v-1&&(y+=o(n+1,a))},S=0;S<=v-1;S++)w(S)}},{key:"drawXaxisInversed",value:function(t){var e,r,i=this,n=this.w,o=new Pc(this.ctx),a=n.config.yaxis[0].opposite?n.globals.translateYAxisX[t]:0,s=o.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:t}),l=o.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+a+", 0)"});s.add(l);var c=[];if(n.config.yaxis[t].show)for(var u=0;u<this.xaxisLabels.length;u++)c.push(this.xaxisLabels[u]);e=n.globals.gridHeight/c.length,r=-e/2.2;var h=n.globals.yLabelFormatters[0],f=n.config.yaxis[0].labels;if(f.show)for(var d=function(a){var s=void 0===c[a]?"":c[a];s=h(s,{seriesIndex:t,dataPointIndex:a,w:n});var u=i.axesUtils.getYAxisForeColor(f.style.colors,t),d=0;Array.isArray(s)&&(d=s.length/2*parseInt(f.style.fontSize,10));var p=f.offsetX-15,g="end";i.yaxis.opposite&&(g="start"),"left"===n.config.yaxis[0].labels.align?(p=f.offsetX,g="start"):"center"===n.config.yaxis[0].labels.align?(p=f.offsetX,g="middle"):"right"===n.config.yaxis[0].labels.align&&(g="end");var b=o.drawText({x:p,y:r+e+f.offsetY-d,text:s,textAnchor:g,foreColor:Array.isArray(u)?u[a]:u,fontSize:f.style.fontSize,fontFamily:f.style.fontFamily,fontWeight:f.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+f.style.cssClass,maxWidth:f.maxWidth});l.add(b),b.on("click",(function(t){if("function"==typeof n.config.chart.events.xAxisLabelClick){var e=Object.assign({},n,{labelIndex:a});n.config.chart.events.xAxisLabelClick(t,i.ctx,e)}}));var y=document.createElementNS(n.globals.SVGNS,"title");if(y.textContent=Array.isArray(s)?s.join(" "):s,b.node.appendChild(y),0!==n.config.yaxis[t].labels.rotate){var v=o.rotateAroundCenter(b.node);b.node.setAttribute("transform","rotate(".concat(n.config.yaxis[t].labels.rotate," 0 ").concat(v.y,")"))}r+=e},p=0;p<=c.length-1;p++)d(p);if(void 0!==n.config.yaxis[0].title.text){var g=o.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+a+", 0)"}),b=o.drawText({x:n.config.yaxis[0].title.offsetX,y:n.globals.gridHeight/2+n.config.yaxis[0].title.offsetY,text:n.config.yaxis[0].title.text,textAnchor:"middle",foreColor:n.config.yaxis[0].title.style.color,fontSize:n.config.yaxis[0].title.style.fontSize,fontWeight:n.config.yaxis[0].title.style.fontWeight,fontFamily:n.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+n.config.yaxis[0].title.style.cssClass});g.add(b),s.add(g)}var y=0;this.isCategoryBarHorizontal&&n.config.yaxis[0].opposite&&(y=n.globals.gridWidth);var v=n.config.xaxis.axisBorder;if(v.show){var m=o.drawLine(n.globals.padHorizontal+v.offsetX+y,1+v.offsetY,n.globals.padHorizontal+v.offsetX+y,n.globals.gridHeight+v.offsetY,v.color,0);this.elgrid&&this.elgrid.elGridBorders&&n.config.grid.show?this.elgrid.elGridBorders.add(m):s.add(m)}return n.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(y,c.length,n.config.yaxis[0].axisBorder,n.config.yaxis[0].axisTicks,0,e,s),s}},{key:"drawXaxisTicks",value:function(t,e,r){var i=this.w,n=t;if(!(t<0||t-2>i.globals.gridWidth)){var o=this.offY+i.config.xaxis.axisTicks.offsetY;if(e=e+o+i.config.xaxis.axisTicks.height,"top"===i.config.xaxis.position&&(e=o-i.config.xaxis.axisTicks.height),i.config.xaxis.axisTicks.show){var a=new Pc(this.ctx).drawLine(t+i.config.xaxis.axisTicks.offsetX,o+i.config.xaxis.offsetY,n+i.config.xaxis.axisTicks.offsetX,e+i.config.xaxis.offsetY,i.config.xaxis.axisTicks.color);r.add(a),a.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],r=this.xaxisLabels.length,i=t.globals.padHorizontal;if(t.globals.timescaleLabels.length>0)for(var n=0;n<r;n++)i=this.xaxisLabels[n].position,e.push(i);else for(var o=r,a=0;a<o;a++){var s=o;t.globals.isXNumeric&&"bar"!==t.config.chart.type&&(s-=1),i+=t.globals.gridWidth/s,e.push(i)}return e}},{key:"xAxisLabelCorrections",value:function(){var t=this.w,e=new Pc(this.ctx),r=t.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)"),n=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),o=t.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(t.globals.rotateXLabels||t.config.xaxis.labels.rotateAlways)for(var a=0;a<i.length;a++){var s=e.rotateAroundCenter(i[a]);s.y=s.y-1,s.x=s.x+1,i[a].setAttribute("transform","rotate(".concat(t.config.xaxis.labels.rotate," ").concat(s.x," ").concat(s.y,")")),i[a].setAttribute("text-anchor","end"),r.setAttribute("transform","translate(0, ".concat(-10,")"));var l=i[a].childNodes;t.config.xaxis.labels.trim&&Array.prototype.forEach.call(l,(function(r){e.placeTextWithEllipsis(r,r.textContent,t.globals.xAxisLabelsHeight-("bottom"===t.config.legend.position?20:10))}))}else!function(){for(var r=t.globals.gridWidth/(t.globals.labels.length+1),n=0;n<i.length;n++){var o=i[n].childNodes;t.config.xaxis.labels.trim&&"datetime"!==t.config.xaxis.type&&Array.prototype.forEach.call(o,(function(t){e.placeTextWithEllipsis(t,t.textContent,r)}))}}();if(n.length>0){var c=n[n.length-1].getBBox(),u=n[0].getBBox();c.x<-20&&n[n.length-1].parentNode.removeChild(n[n.length-1]),u.x+u.width>t.globals.gridWidth&&!t.globals.isBarHorizontal&&n[0].parentNode.removeChild(n[0]);for(var h=0;h<o.length;h++)e.placeTextWithEllipsis(o[h],o[h].textContent,t.config.yaxis[0].labels.maxWidth-(t.config.yaxis[0].title.text?2*parseFloat(t.config.yaxis[0].title.style.fontSize):0)-15)}}}],r&&Ph(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Th(t){return Th="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},Th(t)}function Eh(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function Mh(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Lh(i.key),i)}}function Lh(t){var e=function(t){if("object"!=Th(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Th(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Th(e)?e:e+""}var Ih=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w;var r=this.w;this.xaxisLabels=r.globals.labels.slice(),this.axesUtils=new eu(e),this.isRangeBar=r.globals.seriesRange.length&&r.globals.isBarHorizontal,r.globals.timescaleLabels.length>0&&(this.xaxisLabels=r.globals.timescaleLabels.slice())}var e,r;return e=t,r=[{key:"drawGridArea",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,r=new Pc(this.ctx);t||(t=r.group({class:"apexcharts-grid"}));var i=r.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.globals.gridHeight,"transparent"),n=r.drawLine(e.globals.padHorizontal,e.globals.gridHeight,e.globals.gridWidth,e.globals.gridHeight,"transparent");return t.add(n),t.add(i),t}},{key:"drawGrid",value:function(){if(this.w.globals.axisCharts){var t=this.renderGrid();return this.drawGridArea(t.el),t}return null}},{key:"createGridMask",value:function(){var t=this.w,e=t.globals,r=new Pc(this.ctx),i=Array.isArray(t.config.stroke.width)?Math.max.apply(Math,function(t){return function(t){if(Array.isArray(t))return Eh(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Eh(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Eh(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t.config.stroke.width)):t.config.stroke.width,n=function(t){var r=document.createElementNS(e.SVGNS,"clipPath");return r.setAttribute("id",t),r};e.dom.elGridRectMask=n("gridRectMask".concat(e.cuid)),e.dom.elGridRectBarMask=n("gridRectBarMask".concat(e.cuid)),e.dom.elGridRectMarkerMask=n("gridRectMarkerMask".concat(e.cuid)),e.dom.elForecastMask=n("forecastMask".concat(e.cuid)),e.dom.elNonForecastMask=n("nonForecastMask".concat(e.cuid));var o=0,a=0;(["bar","rangeBar","candlestick","boxPlot"].includes(t.config.chart.type)||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&(o=Math.max(t.config.grid.padding.left,e.barPadForNumericAxis),a=Math.max(t.config.grid.padding.right,e.barPadForNumericAxis)),e.dom.elGridRect=r.drawRect(0,0,e.gridWidth,e.gridHeight,0,"#fff"),e.dom.elGridRectBar=r.drawRect(-i/2-o-2,-i/2-2,e.gridWidth+i+a+o+4,e.gridHeight+i+4,0,"#fff");var s=t.globals.markers.largestSize;e.dom.elGridRectMarker=r.drawRect(-s,-s,e.gridWidth+2*s,e.gridHeight+2*s,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectBarMask.appendChild(e.dom.elGridRectBar.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);var l=e.dom.baseEl.querySelector("defs");l.appendChild(e.dom.elGridRectMask),l.appendChild(e.dom.elGridRectBarMask),l.appendChild(e.dom.elGridRectMarkerMask),l.appendChild(e.dom.elForecastMask),l.appendChild(e.dom.elNonForecastMask)}},{key:"_drawGridLines",value:function(t){var e=t.i,r=t.x1,i=t.y1,n=t.x2,o=t.y2,a=t.xCount,s=t.parent,l=this.w;if(!(0===e&&l.globals.skipFirstTimelinelabel||e===a-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type)){l.config.grid.xaxis.lines.show&&this._drawGridLine({i:e,x1:r,y1:i,x2:n,y2:o,xCount:a,parent:s});var c=0;if(l.globals.hasXaxisGroups&&"between"===l.config.xaxis.tickPlacement){var u=l.globals.groups;if(u){for(var h=0,f=0;h<e&&f<u.length;f++)h+=u[f].cols;h===e&&(c=.6*l.globals.xAxisLabelsHeight)}}new jh(this.ctx).drawXaxisTicks(r,c,l.globals.dom.elGraphical)}}},{key:"_drawGridLine",value:function(t){var e=t.i,r=t.x1,i=t.y1,n=t.x2,o=t.y2,a=t.xCount,s=t.parent,l=this.w,c=s.node.classList.contains("apexcharts-gridlines-horizontal"),u=l.globals.barPadForNumericAxis,h=0===i&&0===o||0===r&&0===n||i===l.globals.gridHeight&&o===l.globals.gridHeight||l.globals.isBarHorizontal&&(0===e||e===a-1),f=new Pc(this).drawLine(r-(c?u:0),i,n+(c?u:0),o,l.config.grid.borderColor,l.config.grid.strokeDashArray);f.node.classList.add("apexcharts-gridline"),h&&l.config.grid.show?this.elGridBorders.add(f):s.add(f)}},{key:"_drawGridBandRect",value:function(t){var e=t.c,r=t.x1,i=t.y1,n=t.x2,o=t.y2,a=t.type,s=this.w,l=new Pc(this.ctx),c=s.globals.barPadForNumericAxis,u=s.config.grid[a].colors[e],h=l.drawRect(r-("row"===a?c:0),i,n+("row"===a?2*c:0),o,0,u,s.config.grid[a].opacity);this.elg.add(h),h.attr("clip-path","url(#gridRectMask".concat(s.globals.cuid,")")),h.node.classList.add("apexcharts-grid-".concat(a))}},{key:"_drawXYLines",value:function(t){var e=this,r=t.xCount,i=t.tickAmount,n=this.w;if(n.config.grid.xaxis.lines.show||n.config.xaxis.axisTicks.show){var o,a=n.globals.padHorizontal,s=n.globals.gridHeight;n.globals.timescaleLabels.length?function(t){for(var i=t.xC,n=t.x1,o=t.y1,a=t.x2,s=t.y2,l=0;l<i;l++)n=e.xaxisLabels[l].position,a=e.xaxisLabels[l].position,e._drawGridLines({i:l,x1:n,y1:o,x2:a,y2:s,xCount:r,parent:e.elgridLinesV})}({xC:r,x1:a,y1:0,x2:o,y2:s}):(n.globals.isXNumeric&&(r=n.globals.xAxisScale.result.length),function(t){for(var i=t.xC,o=t.x1,a=t.y1,s=t.x2,l=t.y2,c=0;c<i+(n.globals.isXNumeric?0:1);c++)0===c&&1===i&&1===n.globals.dataPoints&&(s=o=n.globals.gridWidth/2),e._drawGridLines({i:c,x1:o,y1:a,x2:s,y2:l,xCount:r,parent:e.elgridLinesV}),s=o+=n.globals.gridWidth/(n.globals.isXNumeric?i-1:i)}({xC:r,x1:a,y1:0,x2:o,y2:s}))}if(n.config.grid.yaxis.lines.show){var l=0,c=0,u=n.globals.gridWidth,h=i+1;this.isRangeBar&&(h=n.globals.labels.length);for(var f=0;f<h+(this.isRangeBar?1:0);f++)this._drawGridLine({i:f,xCount:h+(this.isRangeBar?1:0),x1:0,y1:l,x2:u,y2:c,parent:this.elgridLinesH}),c=l+=n.globals.gridHeight/(this.isRangeBar?h:i)}}},{key:"_drawInvertedXYLines",value:function(t){var e=t.xCount,r=this.w;if(r.config.grid.xaxis.lines.show||r.config.xaxis.axisTicks.show)for(var i,n=r.globals.padHorizontal,o=r.globals.gridHeight,a=0;a<e+1;a++)r.config.grid.xaxis.lines.show&&this._drawGridLine({i:a,xCount:e+1,x1:n,y1:0,x2:i,y2:o,parent:this.elgridLinesV}),new jh(this.ctx).drawXaxisTicks(n,0,r.globals.dom.elGraphical),i=n+=r.globals.gridWidth/e;if(r.config.grid.yaxis.lines.show)for(var s=0,l=0,c=r.globals.gridWidth,u=0;u<r.globals.dataPoints+1;u++)this._drawGridLine({i:u,xCount:r.globals.dataPoints+1,x1:0,y1:s,x2:c,y2:l,parent:this.elgridLinesH}),l=s+=r.globals.gridHeight/r.globals.dataPoints}},{key:"renderGrid",value:function(){var t=this.w,e=t.globals,r=new Pc(this.ctx);this.elg=r.group({class:"apexcharts-grid"}),this.elgridLinesH=r.group({class:"apexcharts-gridlines-horizontal"}),this.elgridLinesV=r.group({class:"apexcharts-gridlines-vertical"}),this.elGridBorders=r.group({class:"apexcharts-grid-borders"}),this.elg.add(this.elgridLinesH),this.elg.add(this.elgridLinesV),t.config.grid.show||(this.elgridLinesV.hide(),this.elgridLinesH.hide(),this.elGridBorders.hide());for(var i=0;i<e.seriesYAxisMap.length&&e.ignoreYAxisIndexes.includes(i);)i++;i===e.seriesYAxisMap.length&&(i=0);var n,o,a,s,l=e.yAxisScale[i].result.length-1;return!e.isBarHorizontal||this.isRangeBar?(n=this.xaxisLabels.length,this.isRangeBar&&(l=e.labels.length,t.config.xaxis.tickAmount&&t.config.xaxis.labels.formatter&&(n=t.config.xaxis.tickAmount),(null===(o=e.yAxisScale)||void 0===o||null===(a=o[i])||void 0===a||null===(s=a.result)||void 0===s?void 0:s.length)>0&&"datetime"!==t.config.xaxis.type&&(n=e.yAxisScale[i].result.length-1)),this._drawXYLines({xCount:n,tickAmount:l})):(n=l,l=e.xTickAmount,this._drawInvertedXYLines({xCount:n,tickAmount:l})),this.drawGridBands(n,l),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:e.gridWidth/n}}},{key:"drawGridBands",value:function(t,e){var r,i,n=this,o=this.w;if((null===(r=o.config.grid.row.colors)||void 0===r?void 0:r.length)>0&&function(t,r,i,a,s,l){for(var c=0,u=0;c<r;c++,u++)u>=o.config.grid.row.colors.length&&(u=0),n._drawGridBandRect({c:u,x1:0,y1:a,x2:s,y2:l,type:"row"}),a+=o.globals.gridHeight/e}(0,e,0,0,o.globals.gridWidth,o.globals.gridHeight/e),(null===(i=o.config.grid.column.colors)||void 0===i?void 0:i.length)>0){var a=o.globals.isBarHorizontal||"on"!==o.config.xaxis.tickPlacement||"category"!==o.config.xaxis.type&&!o.config.xaxis.convertedCatToNumeric?t:t-1;o.globals.isXNumeric&&(a=o.globals.xAxisScale.result.length-1);for(var s=o.globals.padHorizontal,l=o.globals.padHorizontal+o.globals.gridWidth/a,c=o.globals.gridHeight,u=0,h=0;u<t;u++,h++){var f;h>=o.config.grid.column.colors.length&&(h=0),"datetime"===o.config.xaxis.type&&(s=this.xaxisLabels[u].position,l=((null===(f=this.xaxisLabels[u+1])||void 0===f?void 0:f.position)||o.globals.gridWidth)-this.xaxisLabels[u].position),this._drawGridBandRect({c:h,x1:s,y1:0,x2:l,y2:c,type:"column"}),s+=o.globals.gridWidth/a}}}}],r&&Mh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const _h=Ih;function Rh(t){return Rh="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},Rh(t)}function zh(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Xh(i.key),i)}}function Xh(t){var e=function(t){if("object"!=Rh(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Rh(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Rh(e)?e:e+""}var Dh=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w,this.coreUtils=new Mc(this.ctx)}var e,r;return e=t,r=[{key:"niceScale",value:function(t,e){var r,i,n,o,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=1e-11,l=this.w,c=l.globals;c.isBarHorizontal?(r=l.config.xaxis,i=Math.max((c.svgWidth-100)/25,2)):(r=l.config.yaxis[a],i=Math.max((c.svgHeight-100)/15,2)),f.isNumber(i)||(i=10),n=void 0!==r.min&&null!==r.min,o=void 0!==r.max&&null!==r.min;var u=void 0!==r.stepSize&&null!==r.stepSize,h=void 0!==r.tickAmount&&null!==r.tickAmount,d=h?r.tickAmount:c.niceScaleDefaultTicks[Math.min(Math.round(i/2),c.niceScaleDefaultTicks.length-1)];if(c.isMultipleYAxis&&!h&&c.multiAxisTickAmount>0&&(d=c.multiAxisTickAmount,h=!0),d="dataPoints"===d?c.dataPoints-1:Math.abs(Math.round(d)),(t===Number.MIN_VALUE&&0===e||!f.isNumber(t)&&!f.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=f.isNumber(r.min)?r.min:0,e=f.isNumber(r.max)?r.max:t+d,c.allSeriesCollapsed=!1),t>e){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var p=e;e=t,t=p}else t===e&&(t=0===t?0:t-1,e=0===e?2:e+1);var g=[];d<1&&(d=1);var b=d,y=Math.abs(e-t);!n&&t>0&&t/y<.15&&(t=0,n=!0),!o&&e<0&&-e/y<.15&&(e=0,o=!0);var v=(y=Math.abs(e-t))/b,m=v,x=Math.floor(Math.log10(m)),w=Math.pow(10,x),S=Math.ceil(m/w);if(v=m=(S=c.niceScaleAllowedMagMsd[0===c.yValueDecimal?0:1][S])*w,c.isBarHorizontal&&r.stepSize&&"datetime"!==r.type?(v=r.stepSize,u=!0):u&&(v=r.stepSize),u&&r.forceNiceScale){var k=Math.floor(Math.log10(v));v*=Math.pow(10,x-k)}if(n&&o){var A=y/b;if(h)if(u)if(0!=f.mod(y,v)){var O=f.getGCD(v,A);v=A/O<10?O:A}else 0==f.mod(v,A)?v=A:(A=v,h=!1);else v=A;else if(u)0==f.mod(y,v)?A=v:v=A;else if(0==f.mod(y,v))A=v;else{A=y/(b=Math.ceil(y/v));var P=f.getGCD(y,v);y/P<i&&(A=P),v=A}b=Math.round(y/v)}else{if(n||o){if(o)if(h)t=e-v*b;else{var C=t;t=v*Math.floor(t/v),Math.abs(e-t)/f.getGCD(y,v)>i&&(t=e-v*d,t+=v*Math.floor((C-t)/v))}else if(n)if(h)e=t+v*b;else{var j=e;e=v*Math.ceil(e/v),Math.abs(e-t)/f.getGCD(y,v)>i&&(e=t+v*d,e+=v*Math.ceil((j-e)/v))}}else if(c.isMultipleYAxis&&h){var T=v*Math.floor(t/v),E=T+v*b;E<e&&(v*=2),E=e,e=(t=T)+v*b,y=Math.abs(e-t),t>0&&t<Math.abs(E-e)&&(t=0,e=v*b),e<0&&-e<Math.abs(T-t)&&(e=0,t=-v*b)}else t=v*Math.floor(t/v),e=v*Math.ceil(e/v);y=Math.abs(e-t),v=f.getGCD(y,v),b=Math.round(y/v)}if(h||n||o||(b=Math.ceil((y-s)/(v+s)))>16&&f.getPrimeFactors(b).length<2&&b++,!h&&r.forceNiceScale&&0===c.yValueDecimal&&b>y&&(b=y,v=Math.round(y/b)),b>i&&(!h&&!u||r.forceNiceScale)){var M=f.getPrimeFactors(b),L=M.length-1,I=b;t:for(var _=0;_<L;_++)for(var R=0;R<=L-_;R++){for(var z=Math.min(R+_,L),X=I,D=1,Y=R;Y<=z;Y++)D*=M[Y];if((X/=D)<i){I=X;break t}}v=I===b?y:y/I,b=Math.round(y/v)}c.isMultipleYAxis&&0==c.multiAxisTickAmount&&c.ignoreYAxisIndexes.indexOf(a)<0&&(c.multiAxisTickAmount=b);var H=t-v,F=v*s;do{H+=v,g.push(f.stripNumber(H,7))}while(e-H>F);return{result:g,niceMin:g[0],niceMax:g[g.length-1]}}},{key:"linearScale",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,o=Math.abs(e-t),a=[];if(t===e)return{result:a=[t],niceMin:a[0],niceMax:a[a.length-1]};"dataPoints"===(r=this._adjustTicksForSmallRange(r,i,o))&&(r=this.w.globals.dataPoints-1),n||(n=o/r),n=Math.round(10*(n+Number.EPSILON))/10,r===Number.MAX_VALUE&&(r=5,n=1);for(var s=t;r>=0;)a.push(s),s=f.preciseAddition(s,n),r-=1;return{result:a,niceMin:a[0],niceMax:a[a.length-1]}}},{key:"logarithmicScaleNice",value:function(t,e,r){e<=0&&(e=Math.max(t,r)),t<=0&&(t=Math.min(e,r));for(var i=[],n=Math.ceil(Math.log(e)/Math.log(r)+1),o=Math.floor(Math.log(t)/Math.log(r));o<n;o++)i.push(Math.pow(r,o));return{result:i,niceMin:i[0],niceMax:i[i.length-1]}}},{key:"logarithmicScale",value:function(t,e,r){e<=0&&(e=Math.max(t,r)),t<=0&&(t=Math.min(e,r));for(var i=[],n=Math.log(e)/Math.log(r),o=Math.log(t)/Math.log(r),a=n-o,s=Math.round(a),l=a/s,c=0,u=o;c<s;c++,u+=l)i.push(Math.pow(r,u));return i.push(Math.pow(r,n)),{result:i,niceMin:t,niceMax:e}}},{key:"_adjustTicksForSmallRange",value:function(t,e,r){var i=t;if(void 0!==e&&this.w.config.yaxis[e].labels.formatter&&void 0===this.w.config.yaxis[e].tickAmount){var n=Number(this.w.config.yaxis[e].labels.formatter(1));f.isNumber(n)&&0===this.w.globals.yValueDecimal&&(i=Math.ceil(r))}return i<t?i:t}},{key:"setYScaleForIndex",value:function(t,e,r){var i=this.w.globals,n=this.w.config,o=i.isBarHorizontal?n.xaxis:n.yaxis[t];void 0===i.yAxisScale[t]&&(i.yAxisScale[t]=[]);var a=Math.abs(r-e);o.logarithmic&&a<=5&&(i.invalidLogScale=!0),o.logarithmic&&a>5?(i.allSeriesCollapsed=!1,i.yAxisScale[t]=o.forceNiceScale?this.logarithmicScaleNice(e,r,o.logBase):this.logarithmicScale(e,r,o.logBase)):r!==-Number.MAX_VALUE&&f.isNumber(r)&&e!==Number.MAX_VALUE&&f.isNumber(e)?(i.allSeriesCollapsed=!1,i.yAxisScale[t]=this.niceScale(e,r,t)):i.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t)}},{key:"setXScale",value:function(t,e){var r=this.w,i=r.globals,n=Math.abs(e-t);if(e!==-Number.MAX_VALUE&&f.isNumber(e)){var o=i.xTickAmount;n<10&&n>1&&(o=n),i.xAxisScale=this.linearScale(t,e,o,0,r.config.xaxis.stepSize)}else i.xAxisScale=this.linearScale(0,10,10);return i.xAxisScale}},{key:"scaleMultipleYAxes",value:function(){var t=this,e=this.w.config,r=this.w.globals;this.coreUtils.setSeriesYAxisMappings();var i=r.seriesYAxisMap,n=r.minYArr,o=r.maxYArr;r.allSeriesCollapsed=!0,r.barGroups=[],i.forEach((function(i,a){var s=[];i.forEach((function(t){var r=e.series[t].group;s.indexOf(r)<0&&s.push(r)})),i.length>0?function(){var l,c,u=Number.MAX_VALUE,h=-Number.MAX_VALUE,f=u,d=h;if(e.chart.stacked)!function(){var t=new Array(r.dataPoints).fill(0),n=[],o=[],p=[];s.forEach((function(){n.push(t.map((function(){return Number.MIN_VALUE}))),o.push(t.map((function(){return Number.MIN_VALUE}))),p.push(t.map((function(){return Number.MIN_VALUE})))}));for(var g=function(t){!l&&e.series[i[t]].type&&(l=e.series[i[t]].type);var u=i[t];c=e.series[u].group?e.series[u].group:"axis-".concat(a),!(r.collapsedSeriesIndices.indexOf(u)<0&&r.ancillaryCollapsedSeriesIndices.indexOf(u)<0)||(r.allSeriesCollapsed=!1,s.forEach((function(t,i){if(e.series[u].group===t)for(var a=0;a<r.series[u].length;a++){var s=r.series[u][a];s>=0?o[i][a]+=s:p[i][a]+=s,n[i][a]+=s,f=Math.min(f,s),d=Math.max(d,s)}}))),"bar"!==l&&"column"!==l||r.barGroups.push(c)},b=0;b<i.length;b++)g(b);l||(l=e.chart.type),"bar"===l||"column"===l?s.forEach((function(t,e){u=Math.min(u,Math.min.apply(null,p[e])),h=Math.max(h,Math.max.apply(null,o[e]))})):(s.forEach((function(t,e){f=Math.min(f,Math.min.apply(null,n[e])),d=Math.max(d,Math.max.apply(null,n[e]))})),u=f,h=d),u===Number.MIN_VALUE&&h===Number.MIN_VALUE&&(h=-Number.MAX_VALUE)}();else for(var p=0;p<i.length;p++){var g=i[p];u=Math.min(u,n[g]),h=Math.max(h,o[g]),!(r.collapsedSeriesIndices.indexOf(g)<0&&r.ancillaryCollapsedSeriesIndices.indexOf(g)<0)||(r.allSeriesCollapsed=!1)}void 0!==e.yaxis[a].min&&(u="function"==typeof e.yaxis[a].min?e.yaxis[a].min(u):e.yaxis[a].min),void 0!==e.yaxis[a].max&&(h="function"==typeof e.yaxis[a].max?e.yaxis[a].max(h):e.yaxis[a].max),r.barGroups=r.barGroups.filter((function(t,e,r){return r.indexOf(t)===e})),t.setYScaleForIndex(a,u,h),i.forEach((function(t){n[t]=r.yAxisScale[a].niceMin,o[t]=r.yAxisScale[a].niceMax}))}():t.setYScaleForIndex(a,0,-Number.MAX_VALUE)}))}}],r&&zh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Yh(t){return Yh="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},Yh(t)}function Hh(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function Fh(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Bh(i.key),i)}}function Bh(t){var e=function(t){if("object"!=Yh(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Yh(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Yh(e)?e:e+""}var Nh=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w,this.scales=new Dh(e)}var e,r;return e=t,r=[{key:"init",value:function(){this.setYRange(),this.setXRange(),this.setZRange()}},{key:"getMinYMaxY",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=this.w.config,o=this.w.globals,a=-Number.MAX_VALUE,s=Number.MIN_VALUE;null===i&&(i=t+1);var l=o.series,c=l,u=l;"candlestick"===n.chart.type?(c=o.seriesCandleL,u=o.seriesCandleH):"boxPlot"===n.chart.type?(c=o.seriesCandleO,u=o.seriesCandleC):o.isRangeData&&(c=o.seriesRangeStart,u=o.seriesRangeEnd);var h=!1;if(o.seriesX.length>=i){var d,p=null===(d=o.brushSource)||void 0===d?void 0:d.w.config.chart.brush;(n.chart.zoom.enabled&&n.chart.zoom.autoScaleYaxis||null!=p&&p.enabled&&null!=p&&p.autoScaleYaxis)&&(h=!0)}for(var g=t;g<i;g++){o.dataPoints=Math.max(o.dataPoints,l[g].length);var b=n.series[g].type;o.categoryLabels.length&&(o.dataPoints=o.categoryLabels.filter((function(t){return void 0!==t})).length),o.labels.length&&"datetime"!==n.xaxis.type&&0!==o.series.reduce((function(t,e){return t+e.length}),0)&&(o.dataPoints=Math.max(o.dataPoints,o.labels.length));var y=0,v=l[g].length-1;if(h){if(n.xaxis.min)for(;y<v&&o.seriesX[g][y]<n.xaxis.min;y++);if(n.xaxis.max)for(;v>y&&o.seriesX[g][v]>n.xaxis.max;v--);}for(var m=y;m<=v&&m<o.series[g].length;m++){var x=l[g][m];if(null!==x&&f.isNumber(x)){switch(void 0!==u[g][m]&&(a=Math.max(a,u[g][m]),e=Math.min(e,u[g][m])),void 0!==c[g][m]&&(e=Math.min(e,c[g][m]),r=Math.max(r,c[g][m])),b){case"candlestick":void 0!==o.seriesCandleC[g][m]&&(a=Math.max(a,o.seriesCandleH[g][m]),e=Math.min(e,o.seriesCandleL[g][m]));break;case"boxPlot":void 0!==o.seriesCandleC[g][m]&&(a=Math.max(a,o.seriesCandleC[g][m]),e=Math.min(e,o.seriesCandleO[g][m]))}b&&"candlestick"!==b&&"boxPlot"!==b&&"rangeArea"!==b&&"rangeBar"!==b&&(a=Math.max(a,o.series[g][m]),e=Math.min(e,o.series[g][m])),o.seriesGoals[g]&&o.seriesGoals[g][m]&&Array.isArray(o.seriesGoals[g][m])&&o.seriesGoals[g][m].forEach((function(t){a=Math.max(a,t.value),e=Math.min(e,t.value)})),r=a,f.isFloat(x)&&(x=f.noExponents(x),o.yValueDecimal=Math.max(o.yValueDecimal,x.toString().split(".")[1].length)),s>c[g][m]&&c[g][m]<0&&(s=c[g][m])}else o.hasNullValues=!0}"bar"!==b&&"column"!==b||(s<0&&a<0&&(a=0,r=Math.max(r,0)),s===Number.MIN_VALUE&&(s=0,e=Math.min(e,0)))}return"rangeBar"===n.chart.type&&o.seriesRangeStart.length&&o.isBarHorizontal&&(s=e),"bar"===n.chart.type&&(s<0&&a<0&&(a=0),s===Number.MIN_VALUE&&(s=0)),{minY:s,maxY:a,lowestY:e,highestY:r}}},{key:"setYRange",value:function(){var t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;var r,i=Number.MAX_VALUE;if(t.isMultipleYAxis){i=Number.MAX_VALUE;for(var n=0;n<t.series.length;n++)r=this.getMinYMaxY(n),t.minYArr[n]=r.lowestY,t.maxYArr[n]=r.highestY,i=Math.min(i,r.lowestY)}return r=this.getMinYMaxY(0,i,null,t.series.length),"bar"===e.chart.type?(t.minY=r.minY,t.maxY=r.maxY):(t.minY=r.lowestY,t.maxY=r.highestY),i=r.lowestY,e.chart.stacked&&this._setStackedMinMax(),"line"===e.chart.type||"area"===e.chart.type||"scatter"===e.chart.type||"candlestick"===e.chart.type||"boxPlot"===e.chart.type||"rangeBar"===e.chart.type&&!t.isBarHorizontal?t.minY===Number.MIN_VALUE&&i!==-Number.MAX_VALUE&&i!==t.maxY&&(t.minY=i):t.minY=t.minY!==Number.MIN_VALUE?Math.min(r.minY,t.minY):r.minY,e.yaxis.forEach((function(e,r){void 0!==e.max&&("number"==typeof e.max?t.maxYArr[r]=e.max:"function"==typeof e.max&&(t.maxYArr[r]=e.max(t.isMultipleYAxis?t.maxYArr[r]:t.maxY)),t.maxY=t.maxYArr[r]),void 0!==e.min&&("number"==typeof e.min?t.minYArr[r]=e.min:"function"==typeof e.min&&(t.minYArr[r]=e.min(t.isMultipleYAxis?t.minYArr[r]===Number.MIN_VALUE?0:t.minYArr[r]:t.minY)),t.minY=t.minYArr[r])})),t.isBarHorizontal&&["min","max"].forEach((function(r){void 0!==e.xaxis[r]&&"number"==typeof e.xaxis[r]&&("min"===r?t.minY=e.xaxis[r]:t.maxY=e.xaxis[r])})),t.isMultipleYAxis?(this.scales.scaleMultipleYAxes(),t.minY=i):(this.scales.setYScaleForIndex(0,t.minY,t.maxY),t.minY=t.yAxisScale[0].niceMin,t.maxY=t.yAxisScale[0].niceMax,t.minYArr[0]=t.minY,t.maxYArr[0]=t.maxY),t.barGroups=[],t.lineGroups=[],t.areaGroups=[],e.series.forEach((function(r){switch(r.type||e.chart.type){case"bar":case"column":t.barGroups.push(r.group);break;case"line":t.lineGroups.push(r.group);break;case"area":t.areaGroups.push(r.group)}})),t.barGroups=t.barGroups.filter((function(t,e,r){return r.indexOf(t)===e})),t.lineGroups=t.lineGroups.filter((function(t,e,r){return r.indexOf(t)===e})),t.areaGroups=t.areaGroups.filter((function(t,e,r){return r.indexOf(t)===e})),{minY:t.minY,maxY:t.maxY,minYArr:t.minYArr,maxYArr:t.maxYArr,yAxisScale:t.yAxisScale}}},{key:"setXRange",value:function(){var t=this.w.globals,e=this.w.config,r="numeric"===e.xaxis.type||"datetime"===e.xaxis.type||"category"===e.xaxis.type&&!t.noLabelsProvided||t.noLabelsProvided||t.isXNumeric;if(t.isXNumeric&&function(){for(var e=0;e<t.series.length;e++)if(t.labels[e])for(var r=0;r<t.labels[e].length;r++)null!==t.labels[e][r]&&f.isNumber(t.labels[e][r])&&(t.maxX=Math.max(t.maxX,t.labels[e][r]),t.initialMaxX=Math.max(t.maxX,t.labels[e][r]),t.minX=Math.min(t.minX,t.labels[e][r]),t.initialMinX=Math.min(t.minX,t.labels[e][r]))}(),t.noLabelsProvided&&0===e.xaxis.categories.length&&(t.maxX=t.labels[t.labels.length-1],t.initialMaxX=t.labels[t.labels.length-1],t.minX=1,t.initialMinX=1),t.isXNumeric||t.noLabelsProvided||t.dataFormatXNumeric){var i=10;if(void 0===e.xaxis.tickAmount)i=Math.round(t.svgWidth/150),"numeric"===e.xaxis.type&&t.dataPoints<30&&(i=t.dataPoints-1),i>t.dataPoints&&0!==t.dataPoints&&(i=t.dataPoints-1);else if("dataPoints"===e.xaxis.tickAmount){if(t.series.length>1&&(i=t.series[t.maxValsInArrayIndex].length-1),t.isXNumeric){var n=t.maxX-t.minX;n<30&&(i=n-1)}}else i=e.xaxis.tickAmount;if(t.xTickAmount=i,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!t.dataFormatXNumeric){for(var o=[],a=t.minX-1;a<t.maxX;a++)o.push(a+1);t.xAxisScale={result:o,niceMin:o[0],niceMax:o[o.length-1]}}else t.xAxisScale=this.scales.setXScale(t.minX,t.maxX);else t.xAxisScale=this.scales.linearScale(0,i,i,0,e.xaxis.stepSize),t.noLabelsProvided&&t.labels.length>0&&(t.xAxisScale=this.scales.linearScale(1,t.labels.length,i-1,0,e.xaxis.stepSize),t.seriesX=t.labels.slice());r&&(t.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&t.labels.length&&(t.xTickAmount=t.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}},{key:"setZRange",value:function(){var t=this.w.globals;if(t.isDataXYZ)for(var e=0;e<t.series.length;e++)if(void 0!==t.seriesZ[e])for(var r=0;r<t.seriesZ[e].length;r++)null!==t.seriesZ[e][r]&&f.isNumber(t.seriesZ[e][r])&&(t.maxZ=Math.max(t.maxZ,t.seriesZ[e][r]),t.minZ=Math.min(t.minZ,t.seriesZ[e][r]))}},{key:"_handleSingleDataPoint",value:function(){var t=this.w.globals,e=this.w.config;if(t.minX===t.maxX){var r=new Vc(this.ctx);if("datetime"===e.xaxis.type){var i=r.getDate(t.minX);e.xaxis.labels.datetimeUTC?i.setUTCDate(i.getUTCDate()-2):i.setDate(i.getDate()-2),t.minX=new Date(i).getTime();var n=r.getDate(t.maxX);e.xaxis.labels.datetimeUTC?n.setUTCDate(n.getUTCDate()+2):n.setDate(n.getDate()+2),t.maxX=new Date(n).getTime()}else("numeric"===e.xaxis.type||"category"===e.xaxis.type&&!t.noLabelsProvided)&&(t.minX=t.minX-2,t.initialMinX=t.minX,t.maxX=t.maxX+2,t.initialMaxX=t.maxX)}}},{key:"_getMinXDiff",value:function(){var t=this.w.globals;t.isXNumeric&&t.seriesX.forEach((function(e,r){if(e.length){1===e.length&&e.push(t.seriesX[t.maxValsInArrayIndex][t.seriesX[t.maxValsInArrayIndex].length-1]);var i=e.slice();i.sort((function(t,e){return t-e})),i.forEach((function(e,r){if(r>0){var n=e-i[r-1];n>0&&(t.minXDiff=Math.min(n,t.minXDiff))}})),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}}))}},{key:"_setStackedMinMax",value:function(){var t=this,e=this.w.globals;if(e.series.length){var r=e.seriesGroups;r.length||(r=[this.w.globals.seriesNames.map((function(t){return t}))]);var i={},n={};r.forEach((function(r){i[r]=[],n[r]=[],t.w.config.series.map((function(t,i){return r.indexOf(e.seriesNames[i])>-1?i:null})).filter((function(t){return null!==t})).forEach((function(o){for(var a=0;a<e.series[e.maxValsInArrayIndex].length;a++){var s,l,c,u;void 0===i[r][a]&&(i[r][a]=0,n[r][a]=0),(t.w.config.chart.stacked&&!e.comboCharts||t.w.config.chart.stacked&&e.comboCharts&&(!t.w.config.chart.stackOnlyBar||"bar"===(null===(s=t.w.config.series)||void 0===s||null===(l=s[o])||void 0===l?void 0:l.type)||"column"===(null===(c=t.w.config.series)||void 0===c||null===(u=c[o])||void 0===u?void 0:u.type)))&&null!==e.series[o][a]&&f.isNumber(e.series[o][a])&&(e.series[o][a]>0?i[r][a]+=parseFloat(e.series[o][a])+1e-4:n[r][a]+=parseFloat(e.series[o][a]))}}))})),Object.entries(i).forEach((function(t){var r=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Hh(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Hh(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,1)[0];i[r].forEach((function(t,o){e.maxY=Math.max(e.maxY,i[r][o]),e.minY=Math.min(e.minY,n[r][o])}))}))}}}],r&&Fh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Wh=Nh;function Gh(t){return Gh="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},Gh(t)}function Vh(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Uh(i.key),i)}}function Uh(t){var e=function(t){if("object"!=Gh(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Gh(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Gh(e)?e:e+""}var qh=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.elgrid=r,this.w=e.w;var i=this.w;this.xaxisFontSize=i.config.xaxis.labels.style.fontSize,this.axisFontFamily=i.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=i.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal="bar"===i.config.chart.type&&i.config.plotOptions.bar.horizontal,this.xAxisoffX="bottom"===i.config.xaxis.position?i.globals.gridHeight:0,this.drawnLabels=[],this.axesUtils=new eu(e)}var e,r;return e=t,r=[{key:"drawYaxis",value:function(t){var e=this.w,r=new Pc(this.ctx),i=e.config.yaxis[t].labels.style,n=i.fontSize,o=i.fontFamily,a=i.fontWeight,s=r.group({class:"apexcharts-yaxis",rel:t,transform:"translate(".concat(e.globals.translateYAxisX[t],", 0)")});if(this.axesUtils.isYAxisHidden(t))return s;var l=r.group({class:"apexcharts-yaxis-texts-g"});s.add(l);var c=e.globals.yAxisScale[t].result.length-1,u=e.globals.gridHeight/c,h=e.globals.yLabelFormatters[t],d=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());if(e.config.yaxis[t].labels.show){var p=e.globals.translateY+e.config.yaxis[t].labels.offsetY;e.globals.isBarHorizontal?p=0:"heatmap"===e.config.chart.type&&(p-=u/2),p+=parseInt(n,10)/3;for(var g=c;g>=0;g--){var b=h(d[g],g,e),y=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&0!==e.config.yaxis.length&&(y*=-1);var v=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),m=this.axesUtils.getYAxisForeColor(i.colors,t),x=Array.isArray(m)?m[g]:m,w=f.listToArray(e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-label tspan"))).map((function(t){return t.textContent})),S=r.drawText({x:y,y:p,text:w.includes(b)&&!e.config.yaxis[t].labels.showDuplicates?"":b,textAnchor:v,fontSize:n,fontFamily:o,fontWeight:a,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:x,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(i.cssClass)});l.add(S),this.addTooltip(S,b),0!==e.config.yaxis[t].labels.rotate&&this.rotateLabel(r,S,firstLabel,e.config.yaxis[t].labels.rotate),p+=u}}return this.addYAxisTitle(r,s,t),this.addAxisBorder(r,s,t,c,u),s}},{key:"getTextAnchor",value:function(t,e){return"left"===t?"start":"center"===t?"middle":"right"===t?"end":e?"start":"end"}},{key:"addTooltip",value:function(t,e){var r=document.createElementNS(this.w.globals.SVGNS,"title");r.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(r)}},{key:"rotateLabel",value:function(t,e,r,i){var n=t.rotateAroundCenter(r.node),o=t.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(".concat(i," ").concat(n.x," ").concat(o.y,")"))}},{key:"addYAxisTitle",value:function(t,e,r){var i=this.w;if(void 0!==i.config.yaxis[r].title.text){var n=t.group({class:"apexcharts-yaxis-title"}),o=i.config.yaxis[r].opposite?i.globals.translateYAxisX[r]:0,a=t.drawText({x:o,y:i.globals.gridHeight/2+i.globals.translateY+i.config.yaxis[r].title.offsetY,text:i.config.yaxis[r].title.text,textAnchor:"end",foreColor:i.config.yaxis[r].title.style.color,fontSize:i.config.yaxis[r].title.style.fontSize,fontWeight:i.config.yaxis[r].title.style.fontWeight,fontFamily:i.config.yaxis[r].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text ".concat(i.config.yaxis[r].title.style.cssClass)});n.add(a),e.add(n)}}},{key:"addAxisBorder",value:function(t,e,r,i,n){var o=this.w,a=o.config.yaxis[r].axisBorder,s=31+a.offsetX;if(o.config.yaxis[r].opposite&&(s=-31-a.offsetX),a.show){var l=t.drawLine(s,o.globals.translateY+a.offsetY-2,s,o.globals.gridHeight+o.globals.translateY+a.offsetY+2,a.color,0,a.width);e.add(l)}o.config.yaxis[r].axisTicks.show&&this.axesUtils.drawYAxisTicks(s,i,a,o.config.yaxis[r].axisTicks,r,n,e)}},{key:"drawYaxisInversed",value:function(t){var e=this.w,r=new Pc(this.ctx),i=r.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),n=r.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});i.add(n);var o=e.globals.yAxisScale[t].result.length-1,a=e.globals.gridWidth/o+.1,s=a+e.config.xaxis.labels.offsetX,l=e.globals.xLabelFormatter,c=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice()),u=e.globals.timescaleLabels;if(u.length>0&&(this.xaxisLabels=u.slice(),o=(c=u.slice()).length),e.config.xaxis.labels.show)for(var h=u.length?0:o;u.length?h<u.length:h>=0;u.length?h++:h--){var f=l(c[h],h,e),d=e.globals.gridWidth+e.globals.padHorizontal-(s-a+e.config.xaxis.labels.offsetX);if(u.length){var p=this.axesUtils.getLabel(c,u,d,h,this.drawnLabels,this.xaxisFontSize);d=p.x,f=p.text,this.drawnLabels.push(p.text),0===h&&e.globals.skipFirstTimelinelabel&&(f=""),h===c.length-1&&e.globals.skipLastTimelinelabel&&(f="")}var g=r.drawText({x:d,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.globals.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:f,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label ".concat(e.config.xaxis.labels.style.cssClass)});n.add(g),g.tspan(f),this.addTooltip(g,f),s+=a}return this.inversedYAxisTitleText(i),this.inversedYAxisBorder(i),i}},{key:"inversedYAxisBorder",value:function(t){var e=this.w,r=new Pc(this.ctx),i=e.config.xaxis.axisBorder;if(i.show){var n=0;"bar"===e.config.chart.type&&e.globals.isXNumeric&&(n-=15);var o=r.drawLine(e.globals.padHorizontal+n+i.offsetX,this.xAxisoffX,e.globals.gridWidth,this.xAxisoffX,i.color,0,i.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(o):t.add(o)}}},{key:"inversedYAxisTitleText",value:function(t){var e=this.w,r=new Pc(this.ctx);if(void 0!==e.config.xaxis.title.text){var i=r.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),n=r.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text ".concat(e.config.xaxis.title.style.cssClass)});i.add(n),t.add(i)}}},{key:"yAxisTitleRotate",value:function(t,e){var r=this.w,i=new Pc(this.ctx),n=r.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-texts-g")),o=n?n.getBoundingClientRect():{width:0,height:0},a=r.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-title text")),s=a?a.getBoundingClientRect():{width:0,height:0};if(a){var l=this.xPaddingForYAxisTitle(t,o,s,e);a.setAttribute("x",l.xPos-(e?10:0));var c=i.rotateAroundCenter(a);a.setAttribute("transform","rotate(".concat(e?-1*r.config.yaxis[t].title.rotate:r.config.yaxis[t].title.rotate," ").concat(c.x," ").concat(c.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(t,e,r,i){var n=this.w,o=0,a=10;return void 0===n.config.yaxis[t].title.text||t<0?{xPos:o,padd:0}:(i?o=e.width+n.config.yaxis[t].title.offsetX+r.width/2+a/2:(o=-1*e.width+n.config.yaxis[t].title.offsetX+a/2+r.width/2,n.globals.isBarHorizontal&&(a=25,o=-1*e.width-n.config.yaxis[t].title.offsetX-a)),{xPos:o,padd:a})}},{key:"setYAxisXPosition",value:function(t,e){var r=this.w,i=0,n=0,o=18,a=1;r.config.yaxis.length>1&&(this.multipleYs=!0),r.config.yaxis.forEach((function(s,l){var c=r.globals.ignoreYAxisIndexes.includes(l)||!s.show||s.floating||0===t[l].width,u=t[l].width+e[l].width;s.opposite?r.globals.isBarHorizontal?(n=r.globals.gridWidth+r.globals.translateX-1,r.globals.translateYAxisX[l]=n-s.labels.offsetX):(n=r.globals.gridWidth+r.globals.translateX+a,c||(a+=u+20),r.globals.translateYAxisX[l]=n-s.labels.offsetX+20):(i=r.globals.translateX-o,c||(o+=u+20),r.globals.translateYAxisX[l]=i+s.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var t=this.w;f.listToArray(t.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((function(e,r){var i=t.config.yaxis[r];if(i&&!i.floating&&void 0!==i.labels.align){var n=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(r,"'] .apexcharts-yaxis-texts-g")),o=f.listToArray(t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(r,"'] .apexcharts-yaxis-label"))),a=n.getBoundingClientRect();o.forEach((function(t){t.setAttribute("text-anchor",i.labels.align)})),"left"!==i.labels.align||i.opposite?"center"===i.labels.align?n.setAttribute("transform","translate(".concat(a.width/2*(i.opposite?1:-1),", 0)")):"right"===i.labels.align&&i.opposite&&n.setAttribute("transform","translate(".concat(a.width,", 0)")):n.setAttribute("transform","translate(-".concat(a.width,", 0)"))}}))}}],r&&Vh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Zh(t){return Zh="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},Zh(t)}function $h(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Jh(i.key),i)}}function Jh(t){var e=function(t){if("object"!=Zh(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Zh(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Zh(e)?e:e+""}var Qh=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w,this.documentEvent=f.bind(this.documentEvent,this)}var e,r;return e=t,r=[{key:"addEventListener",value:function(t,e){var r=this.w;r.globals.events.hasOwnProperty(t)?r.globals.events[t].push(e):r.globals.events[t]=[e]}},{key:"removeEventListener",value:function(t,e){var r=this.w;if(r.globals.events.hasOwnProperty(t)){var i=r.globals.events[t].indexOf(e);-1!==i&&r.globals.events[t].splice(i,1)}}},{key:"fireEvent",value:function(t,e){var r=this.w;if(r.globals.events.hasOwnProperty(t)){e&&e.length||(e=[]);for(var i=r.globals.events[t],n=i.length,o=0;o<n;o++)i[o].apply(null,e)}}},{key:"setupEventHandlers",value:function(){var t=this,e=this.w,r=this.ctx,i=e.globals.dom.baseEl.querySelector(e.globals.chartClass);this.ctx.eventList.forEach((function(t){i.addEventListener(t,(function(t){var i=Object.assign({},e,{seriesIndex:e.globals.axisCharts?e.globals.capturedSeriesIndex:0,dataPointIndex:e.globals.capturedDataPointIndex});"mousemove"===t.type||"touchmove"===t.type?"function"==typeof e.config.chart.events.mouseMove&&e.config.chart.events.mouseMove(t,r,i):"mouseleave"===t.type||"touchleave"===t.type?"function"==typeof e.config.chart.events.mouseLeave&&e.config.chart.events.mouseLeave(t,r,i):("mouseup"===t.type&&1===t.which||"touchend"===t.type)&&("function"==typeof e.config.chart.events.click&&e.config.chart.events.click(t,r,i),r.ctx.events.fireEvent("click",[t,r,i]))}),{capture:!1,passive:!0})})),this.ctx.eventList.forEach((function(r){e.globals.dom.baseEl.addEventListener(r,t.documentEvent,{passive:!0})})),this.ctx.core.setupBrushHandler()}},{key:"documentEvent",value:function(t){var e=this.w,r=t.target.className;if("click"===t.type){var i=e.globals.dom.baseEl.querySelector(".apexcharts-menu");i&&i.classList.contains("apexcharts-menu-open")&&"apexcharts-menu-icon"!==r&&i.classList.remove("apexcharts-menu-open")}e.globals.clientX="touchmove"===t.type?t.touches[0].clientX:t.clientX,e.globals.clientY="touchmove"===t.type?t.touches[0].clientY:t.clientY}}],r&&$h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Kh(t){return Kh="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},Kh(t)}function tf(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,ef(i.key),i)}}function ef(t){var e=function(t){if("object"!=Kh(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Kh(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Kh(e)?e:e+""}var rf=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w}var e,r;return e=t,(r=[{key:"setCurrentLocaleValues",value:function(t){var e=this.w.config.chart.locales;window.Apex.chart&&window.Apex.chart.locales&&window.Apex.chart.locales.length>0&&(e=this.w.config.chart.locales.concat(window.Apex.chart.locales));var r=e.filter((function(e){return e.name===t}))[0];if(!r)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var i=f.extend(uu,r);this.w.globals.locale=i.options}}])&&tf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function nf(t){return nf="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},nf(t)}function of(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,af(i.key),i)}}function af(t){var e=function(t){if("object"!=nf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=nf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==nf(e)?e:e+""}var sf=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w}var e,r;return e=t,(r=[{key:"drawAxis",value:function(t,e){var r,i,n=this,o=this.w.globals,a=this.w.config,s=new jh(this.ctx,e),l=new qh(this.ctx,e);o.axisCharts&&"radar"!==t&&(o.isBarHorizontal?(i=l.drawYaxisInversed(0),r=s.drawXaxisInversed(0),o.dom.elGraphical.add(r),o.dom.elGraphical.add(i)):(r=s.drawXaxis(),o.dom.elGraphical.add(r),a.yaxis.map((function(t,e){if(-1===o.ignoreYAxisIndexes.indexOf(e)&&(i=l.drawYaxis(e),o.dom.Paper.add(i),"back"===n.w.config.grid.position)){var r=o.dom.Paper.children()[1];r.remove(),o.dom.Paper.add(r)}}))))}}])&&of(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function lf(t){return lf="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},lf(t)}function cf(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,uf(i.key),i)}}function uf(t){var e=function(t){if("object"!=lf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=lf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==lf(e)?e:e+""}const hf=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w}var e,r;return e=t,(r=[{key:"drawXCrosshairs",value:function(){var t=this.w,e=new Pc(this.ctx),r=new vc(this.ctx),i=t.config.xaxis.crosshairs.fill.gradient,n=t.config.xaxis.crosshairs.dropShadow,o=t.config.xaxis.crosshairs.fill.type,a=i.colorFrom,s=i.colorTo,l=i.opacityFrom,c=i.opacityTo,u=i.stops,h=n.enabled,d=n.left,p=n.top,g=n.blur,b=n.color,y=n.opacity,v=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===o&&(v=e.drawGradient("vertical",a,s,l,c,null,u,null));var m=e.drawRect();1===t.config.xaxis.crosshairs.width&&(m=e.drawLine());var x=t.globals.gridHeight;(!f.isNumber(x)||x<0)&&(x=0);var w=t.config.xaxis.crosshairs.width;(!f.isNumber(w)||w<0)&&(w=0),m.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:x,width:w,height:x,fill:v,filter:"none","fill-opacity":t.config.xaxis.crosshairs.opacity,stroke:t.config.xaxis.crosshairs.stroke.color,"stroke-width":t.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":t.config.xaxis.crosshairs.stroke.dashArray}),h&&(m=r.dropShadow(m,{left:d,top:p,blur:g,color:b,opacity:y})),t.globals.dom.elGraphical.add(m)}}},{key:"drawYCrosshairs",value:function(){var t=this.w,e=new Pc(this.ctx),r=t.config.yaxis[0].crosshairs,i=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){var n=e.drawLine(-i,0,t.globals.gridWidth+i,0,r.stroke.color,r.stroke.dashArray,r.stroke.width);n.attr({class:"apexcharts-ycrosshairs"}),t.globals.dom.elGraphical.add(n)}var o=e.drawLine(-i,0,t.globals.gridWidth+i,0,r.stroke.color,0,0);o.attr({class:"apexcharts-ycrosshairs-hidden"}),t.globals.dom.elGraphical.add(o)}}])&&cf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ff(t){return ff="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},ff(t)}function df(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,pf(i.key),i)}}function pf(t){var e=function(t){if("object"!=ff(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ff(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ff(e)?e:e+""}var gf=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w}var e,r;return e=t,r=[{key:"checkResponsiveConfig",value:function(t){var e=this,r=this.w,i=r.config;if(0!==i.responsive.length){var n=i.responsive.slice();n.sort((function(t,e){return t.breakpoint>e.breakpoint?1:e.breakpoint>t.breakpoint?-1:0})).reverse();var o=new Mu({}),a=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n[0].breakpoint,a=window.innerWidth>0?window.innerWidth:screen.width;if(a>i){var s=f.clone(r.globals.initialConfig);s.series=f.clone(r.config.series);var l=Mc.extendArrayProps(o,s,r);t=f.extend(l,t),t=f.extend(r.config,t),e.overrideResponsiveOptions(t)}else for(var c=0;c<n.length;c++)a<n[c].breakpoint&&(t=Mc.extendArrayProps(o,n[c].options,r),t=f.extend(r.config,t),e.overrideResponsiveOptions(t))};if(t){var s=Mc.extendArrayProps(o,t,r);s=f.extend(r.config,s),a(s=f.extend(s,t))}else a({})}}},{key:"overrideResponsiveOptions",value:function(t){var e=new Mu(t).init({responsiveOverride:!0});this.w.config=e}}],r&&df(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function bf(t){return bf="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},bf(t)}function yf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function vf(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,mf(i.key),i)}}function mf(t){var e=function(t){if("object"!=bf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=bf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==bf(e)?e:e+""}var xf=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w,this.colors=[],this.isColorFn=!1,this.isHeatmapDistributed=this.checkHeatmapDistributed(),this.isBarDistributed=this.checkBarDistributed()}var e,r;return e=t,r=[{key:"checkHeatmapDistributed",value:function(){var t=this.w.config,e=t.chart,r=t.plotOptions;return"treemap"===e.type&&r.treemap&&r.treemap.distributed||"heatmap"===e.type&&r.heatmap&&r.heatmap.distributed}},{key:"checkBarDistributed",value:function(){var t=this.w.config,e=t.chart,r=t.plotOptions;return r.bar&&r.bar.distributed&&("bar"===e.type||"rangeBar"===e.type)}},{key:"init",value:function(){this.setDefaultColors()}},{key:"setDefaultColors",value:function(){var t=this.w,e=new f;t.globals.dom.elWrap.classList.add("apexcharts-theme-".concat(t.config.theme.mode));var r=function(t){return function(t){if(Array.isArray(t))return yf(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return yf(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yf(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t.config.colors||t.config.fill.colors||[]);t.globals.colors=this.getColors(r),this.applySeriesColors(t.globals.seriesColors,t.globals.colors),t.config.theme.monochrome.enabled&&(t.globals.colors=this.getMonochromeColors(t.config.theme.monochrome,t.globals.series,e));var i=t.globals.colors.slice();this.pushExtraColors(t.globals.colors),this.applyColorTypes(["fill","stroke"],i),this.applyDataLabelsColors(i),this.applyRadarPolygonsColors(),this.applyMarkersColors(i)}},{key:"getColors",value:function(t){var e=this,r=this.w;return t&&0!==t.length?Array.isArray(t)&&t.length>0&&"function"==typeof t[0]?(this.isColorFn=!0,r.config.series.map((function(i,n){var o=t[n]||t[0];return"function"==typeof o?o({value:r.globals.axisCharts?r.globals.series[n][0]||0:r.globals.series[n],seriesIndex:n,dataPointIndex:n,w:e.w}):o}))):t:this.predefined()}},{key:"applySeriesColors",value:function(t,e){t.forEach((function(t,r){t&&(e[r]=t)}))}},{key:"getMonochromeColors",value:function(t,e,r){var i=t.color,n=t.shadeIntensity,o=t.shadeTo,a=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,s=1/(a/n),l=0;return Array.from({length:a},(function(){var t="dark"===o?r.shadeColor(-1*l,i):r.shadeColor(l,i);return l+=s,t}))}},{key:"applyColorTypes",value:function(t,e){var r=this,i=this.w;t.forEach((function(t){i.globals[t].colors=void 0===i.config[t].colors?r.isColorFn?i.config.colors:e:i.config[t].colors.slice(),r.pushExtraColors(i.globals[t].colors)}))}},{key:"applyDataLabelsColors",value:function(t){var e=this.w;e.globals.dataLabels.style.colors=void 0===e.config.dataLabels.style.colors?t:e.config.dataLabels.style.colors.slice(),this.pushExtraColors(e.globals.dataLabels.style.colors,50)}},{key:"applyRadarPolygonsColors",value:function(){var t=this.w;t.globals.radarPolygons.fill.colors=void 0===t.config.plotOptions.radar.polygons.fill.colors?["dark"===t.config.theme.mode?"#424242":"none"]:t.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(t.globals.radarPolygons.fill.colors,20)}},{key:"applyMarkersColors",value:function(t){var e=this.w;e.globals.markers.colors=void 0===e.config.markers.colors?t:e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}},{key:"pushExtraColors",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.w,n=e||i.globals.series.length;if(null===r&&(r=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===i.config.chart.type&&i.config.plotOptions.heatmap&&i.config.plotOptions.heatmap.colorScale.inverse),r&&i.globals.series.length&&(n=i.globals.series[i.globals.maxValsInArrayIndex].length*i.globals.series.length),t.length<n)for(var o=n-t.length,a=0;a<o;a++)t.push(t[a])}},{key:"updateThemeOptions",value:function(t){t.chart=t.chart||{},t.tooltip=t.tooltip||{};var e=t.theme.mode,r="dark"===e?"palette4":"light"===e?"palette1":t.theme.palette||"palette1",i="dark"===e?"#f6f7f8":"light"===e?"#373d3f":t.chart.foreColor||"#373d3f";return t.tooltip.theme=e||"light",t.chart.foreColor=i,t.theme.palette=r,t}},{key:"predefined",value:function(){var t={palette1:["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"],palette2:["#3f51b5","#03a9f4","#4caf50","#f9ce1d","#FF9800"],palette3:["#33b2df","#546E7A","#d4526e","#13d8aa","#A5978B"],palette4:["#4ecdc4","#c7f464","#81D4FA","#fd6a6a","#546E7A"],palette5:["#2b908f","#f9a3a4","#90ee7e","#fa4443","#69d2e7"],palette6:["#449DD1","#F86624","#EA3546","#662E9B","#C5D86D"],palette7:["#D7263D","#1B998B","#2E294E","#F46036","#E2C044"],palette8:["#662E9B","#F86624","#F9C80E","#EA3546","#43BCCD"],palette9:["#5C4742","#A5978B","#8D5B4C","#5A2A27","#C4BBAF"],palette10:["#A300D6","#7D02EB","#5653FE","#2983FF","#00B1F2"],default:["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"]};return t[this.w.config.theme.palette]||t.default}}],r&&vf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function wf(t){return wf="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},wf(t)}function Sf(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,kf(i.key),i)}}function kf(t){var e=function(t){if("object"!=wf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=wf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==wf(e)?e:e+""}var Af=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w}var e,r;return e=t,r=[{key:"draw",value:function(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}},{key:"drawTitleSubtitle",value:function(t){var e=this.w,r="title"===t?e.config.title:e.config.subtitle,i=e.globals.svgWidth/2,n=r.offsetY,o="middle";if("left"===r.align?(i=10,o="start"):"right"===r.align&&(i=e.globals.svgWidth-10,o="end"),i+=r.offsetX,n=n+parseInt(r.style.fontSize,10)+r.margin/2,void 0!==r.text){var a=new Pc(this.ctx).drawText({x:i,y:n,text:r.text,textAnchor:o,fontSize:r.style.fontSize,fontFamily:r.style.fontFamily,fontWeight:r.style.fontWeight,foreColor:r.style.color,opacity:1});a.node.setAttribute("class","apexcharts-".concat(t,"-text")),e.globals.dom.Paper.add(a)}}}],r&&Sf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Of(t){return Of="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},Of(t)}function Pf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function Cf(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,jf(i.key),i)}}function jf(t){var e=function(t){if("object"!=Of(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Of(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Of(e)?e:e+""}var Tf=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.w=e.w,this.dCtx=e}var e,r;return e=t,r=[{key:"getTitleSubtitleCoords",value:function(t){var e=this.w,r=0,i=0,n="title"===t?e.config.title.floating:e.config.subtitle.floating,o=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(t,"-text"));if(null!==o&&!n){var a=o.getBoundingClientRect();r=a.width,i=e.globals.axisCharts?a.height+5:a.height}return{width:r,height:i}}},{key:"getLegendsRect",value:function(){var t=this.w,e=t.globals.dom.elLegendWrap;t.config.legend.height||"top"!==t.config.legend.position&&"bottom"!==t.config.legend.position||(e.style.maxHeight=t.globals.svgHeight/2+"px");var r=Object.assign({},f.getBoundingClientRect(e));return null!==e&&!t.config.legend.floating&&t.config.legend.show?this.dCtx.lgRect={x:r.x,y:r.y,height:r.height,width:0===r.height?0:r.width}:this.dCtx.lgRect={x:0,y:0,height:0,width:0},"left"!==t.config.legend.position&&"right"!==t.config.legend.position||1.5*this.dCtx.lgRect.width>t.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getDatalabelsRect",value:function(){var t=this,e=this.w,r=[];e.config.series.forEach((function(n,o){n.data.forEach((function(n,a){var s;s=e.globals.series[o][a],i=e.config.dataLabels.formatter(s,{ctx:t.dCtx.ctx,seriesIndex:o,dataPointIndex:a,w:e}),r.push(i)}))}));var i=f.getLargestStringFromArr(r),n=new Pc(this.dCtx.ctx),o=e.config.dataLabels.style,a=n.getTextRects(i,parseInt(o.fontSize),o.fontFamily);return{width:1.05*a.width,height:a.height}}},{key:"getLargestStringFromMultiArr",value:function(t,e){var r=t;if(this.w.globals.isMultiLineX){var i=e.map((function(t,e){return Array.isArray(t)?t.length:1})),n=Math.max.apply(Math,function(t){return function(t){if(Array.isArray(t))return Pf(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Pf(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Pf(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(i));r=e[i.indexOf(n)]}return r}}],r&&Cf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ef(t){return Ef="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},Ef(t)}function Mf(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Lf(i.key),i)}}function Lf(t){var e=function(t){if("object"!=Ef(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ef(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ef(e)?e:e+""}var If=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.w=e.w,this.dCtx=e}var e,r;return e=t,r=[{key:"getxAxisLabelsCoords",value:function(){var t,e=this.w,r=e.globals.labels.slice();if(e.config.xaxis.convertedCatToNumeric&&0===r.length&&(r=e.globals.categoryLabels),e.globals.timescaleLabels.length>0){var i=this.getxAxisTimeScaleLabelsCoords();t={width:i.width,height:i.height},e.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==e.config.legend.position&&"right"!==e.config.legend.position||e.config.legend.floating?0:this.dCtx.lgRect.width;var n=e.globals.xLabelFormatter,o=f.getLargestStringFromArr(r),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(o,r);e.globals.isBarHorizontal&&(a=o=e.globals.yAxisScale[0].result.reduce((function(t,e){return t.length>e.length?t:e}),0));var s=new Jc(this.dCtx.ctx),l=o;o=s.xLabelFormat(n,o,l,{i:void 0,dateFormatter:new Vc(this.dCtx.ctx).formatDate,w:e}),a=s.xLabelFormat(n,a,l,{i:void 0,dateFormatter:new Vc(this.dCtx.ctx).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&void 0===o||""===String(o).trim())&&(a=o="1");var c=new Pc(this.dCtx.ctx),u=c.getTextRects(o,e.config.xaxis.labels.style.fontSize),h=u;if(o!==a&&(h=c.getTextRects(a,e.config.xaxis.labels.style.fontSize)),(t={width:u.width>=h.width?u.width:h.width,height:u.height>=h.height?u.height:h.height}).width*r.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==e.config.xaxis.labels.rotate||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.globals.rotateXLabels=!0;var d=function(t){return c.getTextRects(t,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,"rotate(".concat(e.config.xaxis.labels.rotate," 0 0)"),!1)};u=d(o),o!==a&&(h=d(a)),t.height=(u.height>h.height?u.height:h.height)/1.5,t.width=u.width>h.width?u.width:h.width}}else e.globals.rotateXLabels=!1}return e.config.xaxis.labels.show||(t={width:0,height:0}),{width:t.width,height:t.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var t,e=this.w;if(!e.globals.hasXaxisGroups)return{width:0,height:0};var r,i=(null===(t=e.config.xaxis.group.style)||void 0===t?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,n=e.globals.groups.map((function(t){return t.title})),o=f.getLargestStringFromArr(n),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(o,n),s=new Pc(this.dCtx.ctx),l=s.getTextRects(o,i),c=l;return o!==a&&(c=s.getTextRects(a,i)),r={width:l.width>=c.width?l.width:c.width,height:l.height>=c.height?l.height:c.height},e.config.xaxis.labels.show||(r={width:0,height:0}),{width:r.width,height:r.height}}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,r=0;if(void 0!==t.config.xaxis.title.text){var i=new Pc(this.dCtx.ctx).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=i.width,r=i.height}return{width:e,height:r}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var t,e=this.w;this.dCtx.timescaleLabels=e.globals.timescaleLabels.slice();var r=this.dCtx.timescaleLabels.map((function(t){return t.value})),i=r.reduce((function(t,e){return void 0===t?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):t.length>e.length?t:e}),0);return 1.05*(t=new Pc(this.dCtx.ctx).getTextRects(i,e.config.xaxis.labels.style.fontSize)).width*r.length>e.globals.gridWidth&&0!==e.config.xaxis.labels.rotate&&(e.globals.overlappingXLabels=!0),t}},{key:"additionalPaddingXLabels",value:function(t){var e=this,r=this.w,i=r.globals,n=r.config,o=n.xaxis.type,a=t.width;i.skipLastTimelinelabel=!1,i.skipFirstTimelinelabel=!1;var s=r.config.yaxis[0].opposite&&r.globals.isBarHorizontal;n.yaxis.forEach((function(t,l){s?(e.dCtx.gridPad.left<a&&(e.dCtx.xPadLeft=a/2+1),e.dCtx.xPadRight=a/2+1):function(t,s){n.yaxis.length>1&&function(t){return-1!==i.collapsedSeriesIndices.indexOf(t)}(s)||function(t){if(e.dCtx.timescaleLabels&&e.dCtx.timescaleLabels.length){var s=e.dCtx.timescaleLabels[0],l=e.dCtx.timescaleLabels[e.dCtx.timescaleLabels.length-1].position+a/1.75-e.dCtx.yAxisWidthRight,c=s.position-a/1.75+e.dCtx.yAxisWidthLeft,u="right"===r.config.legend.position&&e.dCtx.lgRect.width>0?e.dCtx.lgRect.width:0;l>i.svgWidth-i.translateX-u&&(i.skipLastTimelinelabel=!0),c<-(t.show&&!t.floating||"bar"!==n.chart.type&&"candlestick"!==n.chart.type&&"rangeBar"!==n.chart.type&&"boxPlot"!==n.chart.type?10:a/1.75)&&(i.skipFirstTimelinelabel=!0)}else"datetime"===o?e.dCtx.gridPad.right<a&&!i.rotateXLabels&&(i.skipLastTimelinelabel=!0):"datetime"!==o&&e.dCtx.gridPad.right<a/2-e.dCtx.yAxisWidthRight&&!i.rotateXLabels&&!r.config.xaxis.labels.trim&&(e.dCtx.xPadRight=a/2+1)}(t)}(t,l)}))}}],r&&Mf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function _f(t){return _f="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},_f(t)}function Rf(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,zf(i.key),i)}}function zf(t){var e=function(t){if("object"!=_f(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=_f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_f(e)?e:e+""}var Xf=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.w=e.w,this.dCtx=e}var e,r;return e=t,r=[{key:"getyAxisLabelsCoords",value:function(){var t=this,e=this.w,r=[],i=10,n=new eu(this.dCtx.ctx);return e.config.yaxis.map((function(o,a){var s={seriesIndex:a,dataPointIndex:-1,w:e},l=e.globals.yAxisScale[a],c=0;if(!n.isYAxisHidden(a)&&o.labels.show&&void 0!==o.labels.minWidth&&(c=o.labels.minWidth),!n.isYAxisHidden(a)&&o.labels.show&&l.result.length){var u=e.globals.yLabelFormatters[a],h=l.niceMin===Number.MIN_VALUE?0:l.niceMin,d=l.result.reduce((function(t,e){var r,i;return(null===(r=String(u(t,s)))||void 0===r?void 0:r.length)>(null===(i=String(u(e,s)))||void 0===i?void 0:i.length)?t:e}),h),p=d=u(d,s);if(void 0!==d&&0!==d.length||(d=l.niceMax),e.globals.isBarHorizontal){i=0;var g=e.globals.labels.slice();d=f.getLargestStringFromArr(g),d=u(d,{seriesIndex:a,dataPointIndex:-1,w:e}),p=t.dCtx.dimHelpers.getLargestStringFromMultiArr(d,g)}var b=new Pc(t.dCtx.ctx),y="rotate(".concat(o.labels.rotate," 0 0)"),v=b.getTextRects(d,o.labels.style.fontSize,o.labels.style.fontFamily,y,!1),m=v;d!==p&&(m=b.getTextRects(p,o.labels.style.fontSize,o.labels.style.fontFamily,y,!1)),r.push({width:(c>m.width||c>v.width?c:m.width>v.width?m.width:v.width)+i,height:m.height>v.height?m.height:v.height})}else r.push({width:0,height:0})})),r}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=this.w,r=[];return e.config.yaxis.map((function(e,i){if(e.show&&void 0!==e.title.text){var n=new Pc(t.dCtx.ctx),o="rotate(".concat(e.title.rotate," 0 0)"),a=n.getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,o,!1);r.push({width:a.width,height:a.height})}else r.push({width:0,height:0})})),r}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0,r=0,i=0,n=t.globals.yAxisScale.length>1?10:0,o=new eu(this.dCtx.ctx),a=function(a,s){var l=t.config.yaxis[s].floating,c=0;a.width>0&&!l?(c=a.width+n,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(s)&&(c=c-a.width-n)):c=l||o.isYAxisHidden(s)?0:5,t.config.yaxis[s].opposite?i+=c:r+=c,e+=c};return t.globals.yLabelsCoords.map((function(t,e){a(t,e)})),t.globals.yTitleCoords.map((function(t,e){a(t,e)})),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.globals.yLabelsCoords[0].width+t.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=r,this.dCtx.yAxisWidthRight=i,e}}],r&&Rf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Df(t){return Df="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},Df(t)}function Yf(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Hf(i.key),i)}}function Hf(t){var e=function(t){if("object"!=Df(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Df(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Df(e)?e:e+""}var Ff=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.w=e.w,this.dCtx=e}var e,r;return e=t,r=[{key:"gridPadForColumnsInNumericAxis",value:function(t){var e=this.w,r=e.config,i=e.globals;if(i.noData||i.collapsedSeries.length+i.ancillaryCollapsedSeries.length===r.series.length)return 0;var n=function(t){return["bar","rangeBar","candlestick","boxPlot"].includes(t)},o=r.chart.type,a=0,s=n(o)?r.series.length:1;i.comboBarCount>0&&(s=i.comboBarCount),i.collapsedSeries.forEach((function(t){n(t.type)&&(s-=1)})),r.chart.stacked&&(s=1);var l=n(o)||i.comboBarCount>0,c=Math.abs(i.initialMaxX-i.initialMinX);if(l&&i.isXNumeric&&!i.isBarHorizontal&&s>0&&0!==c){c<=3&&(c=i.dataPoints);var u=c/t,h=i.minXDiff&&i.minXDiff/u>0?i.minXDiff/u:0;h>t/2&&(h/=2),(a=h*parseInt(r.plotOptions.bar.columnWidth,10)/100)<1&&(a=1),i.barPadForNumericAxis=a}return a}},{key:"gridPadFortitleSubtitle",value:function(){var t=this,e=this.w,r=e.globals,i=this.dCtx.isSparkline||!r.axisCharts?0:10;["title","subtitle"].forEach((function(n){void 0!==e.config[n].text?i+=e.config[n].margin:i+=t.dCtx.isSparkline||!r.axisCharts?0:5})),!e.config.legend.show||"bottom"!==e.config.legend.position||e.config.legend.floating||r.axisCharts||(i+=10);var n=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),o=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");r.gridHeight-=n.height+o.height+i,r.translateY+=n.height+o.height+i}},{key:"setGridXPosForDualYAxis",value:function(t,e){var r=this.w,i=new eu(this.dCtx.ctx);r.config.yaxis.forEach((function(n,o){-1!==r.globals.ignoreYAxisIndexes.indexOf(o)||n.floating||i.isYAxisHidden(o)||(n.opposite&&(r.globals.translateX-=e[o].width+t[o].width+parseInt(n.labels.style.fontSize,10)/1.2+12),r.globals.translateX<2&&(r.globals.translateX=2))}))}}],r&&Yf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Bf(t){return Bf="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},Bf(t)}function Nf(t,e){if(t){if("string"==typeof t)return Wf(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Wf(t,e):void 0}}function Wf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function Gf(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Vf(i.key),i)}}function Vf(t){var e=function(t){if("object"!=Bf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Bf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Bf(e)?e:e+""}var Uf=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new Tf(this),this.dimYAxis=new Xf(this),this.dimXAxis=new If(this),this.dimGrid=new Ff(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}var e,r;return e=t,r=[{key:"plotCoords",value:function(){var t=this,e=this.w,r=e.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};var i=Array.isArray(e.config.stroke.width)?Math.max.apply(Math,function(t){return function(t){if(Array.isArray(t))return Wf(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Nf(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.config.stroke.width)):e.config.stroke.width;this.isSparkline&&((e.config.markers.discrete.length>0||e.config.markers.size>0)&&Object.entries(this.gridPad).forEach((function(e){var r=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return s}}(t,e)||Nf(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),i=r[0],n=r[1];t.gridPad[i]=Math.max(n,t.w.globals.markers.largestSize/1.5)})),this.gridPad.top=Math.max(i/2,this.gridPad.top),this.gridPad.bottom=Math.max(i/2,this.gridPad.bottom)),r.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),r.gridHeight=r.gridHeight-this.gridPad.top-this.gridPad.bottom,r.gridWidth=r.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var n=this.dimGrid.gridPadForColumnsInNumericAxis(r.gridWidth);r.gridWidth=r.gridWidth-2*n,r.translateX=r.translateX+this.gridPad.left+this.xPadLeft+(n>0?n:0),r.translateY=r.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var t=this,e=this.w,r=e.globals,i=this.dimYAxis.getyAxisLabelsCoords(),n=this.dimYAxis.getyAxisTitleCoords();r.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),e.globals.yLabelsCoords=[],e.globals.yTitleCoords=[],e.config.yaxis.map((function(t,r){e.globals.yLabelsCoords.push({width:i[r].width,index:r}),e.globals.yTitleCoords.push({width:n[r].width,index:r})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var o=this.dimXAxis.getxAxisLabelsCoords(),a=this.dimXAxis.getxAxisGroupLabelsCoords(),s=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(o,s,a),r.translateXAxisY=e.globals.rotateXLabels?this.xAxisHeight/8:-4,r.translateXAxisX=e.globals.rotateXLabels&&e.globals.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(r.rotateXLabels=!1,r.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5*-1),r.translateXAxisY=r.translateXAxisY+e.config.xaxis.labels.offsetY,r.translateXAxisX=r.translateXAxisX+e.config.xaxis.labels.offsetX;var l=this.yAxisWidth,c=this.xAxisHeight;r.xAxisLabelsHeight=this.xAxisHeight-s.height,r.xAxisGroupLabelsHeight=r.xAxisLabelsHeight-o.height,r.xAxisLabelsWidth=this.xAxisWidth,r.xAxisHeight=this.xAxisHeight;var u=10;("radar"===e.config.chart.type||this.isSparkline)&&(l=0,c=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===e.config.chart.type)&&(l=0,c=0,u=0),this.isSparkline||"treemap"===e.config.chart.type||this.dimXAxis.additionalPaddingXLabels(o);var h=function(){r.translateX=l+t.datalabelsCoords.width,r.gridHeight=r.svgHeight-t.lgRect.height-c-(t.isSparkline||"treemap"===e.config.chart.type?0:e.globals.rotateXLabels?10:15),r.gridWidth=r.svgWidth-l-2*t.datalabelsCoords.width};switch("top"===e.config.xaxis.position&&(u=r.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":r.translateY=u,h();break;case"top":r.translateY=this.lgRect.height+u,h();break;case"left":r.translateY=u,r.translateX=this.lgRect.width+l+this.datalabelsCoords.width,r.gridHeight=r.svgHeight-c-12,r.gridWidth=r.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width;break;case"right":r.translateY=u,r.translateX=l+this.datalabelsCoords.width,r.gridHeight=r.svgHeight-c-12,r.gridWidth=r.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(n,i),new qh(this.ctx).setYAxisXPosition(i,n)}},{key:"setDimensionsForNonAxisCharts",value:function(){var t=this.w,e=t.globals,r=t.config,i=0;t.config.legend.show&&!t.config.legend.floating&&(i=20);var n="pie"===r.chart.type||"polarArea"===r.chart.type||"donut"===r.chart.type?"pie":"radialBar",o=r.plotOptions[n].offsetY,a=r.plotOptions[n].offsetX;if(!r.legend.show||r.legend.floating){e.gridHeight=e.svgHeight;var s=e.dom.elWrap.getBoundingClientRect().width;return e.gridWidth=Math.min(s,e.gridHeight),e.translateY=o,void(e.translateX=a+(e.svgWidth-e.gridWidth)/2)}switch(r.legend.position){case"bottom":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=o-10,e.translateX=a+(e.svgWidth-e.gridWidth)/2;break;case"top":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=this.lgRect.height+o+10,e.translateX=a+(e.svgWidth-e.gridWidth)/2;break;case"left":e.gridWidth=e.svgWidth-this.lgRect.width-i,e.gridHeight="auto"!==r.chart.height?e.svgHeight:e.gridWidth,e.translateY=o,e.translateX=a+this.lgRect.width+i;break;case"right":e.gridWidth=e.svgWidth-this.lgRect.width-i-5,e.gridHeight="auto"!==r.chart.height?e.svgHeight:e.gridWidth,e.translateY=o,e.translateX=a+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(t,e,r){var i=this.w,n=i.globals.hasXaxisGroups?2:1,o=r.height+t.height+e.height,a=i.globals.isMultiLineX?1.2:i.globals.LINE_HEIGHT_RATIO,s=i.globals.rotateXLabels?22:10,l=i.globals.rotateXLabels&&"bottom"===i.config.legend.position?10:0;this.xAxisHeight=o*a+n*s+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>i.config.xaxis.labels.maxHeight&&(this.xAxisHeight=i.config.xaxis.labels.maxHeight),i.config.xaxis.labels.minHeight&&this.xAxisHeight<i.config.xaxis.labels.minHeight&&(this.xAxisHeight=i.config.xaxis.labels.minHeight),i.config.xaxis.floating&&(this.xAxisHeight=0);var c=0,u=0;i.config.yaxis.forEach((function(t){c+=t.labels.minWidth,u+=t.labels.maxWidth})),this.yAxisWidth<c&&(this.yAxisWidth=c),this.yAxisWidth>u&&(this.yAxisWidth=u)}}],r&&Gf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function qf(t){return qf="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},qf(t)}function Zf(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,$f(i.key),i)}}function $f(t){var e=function(t){if("object"!=qf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=qf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==qf(e)?e:e+""}var Jf=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.w=e.w,this.lgCtx=e}var e,r;return e=t,(r=[{key:"getLegendStyles",value:function(){var t,e,r,i=document.createElement("style");i.setAttribute("type","text/css");var n=(null===(t=this.lgCtx.ctx)||void 0===t||null===(e=t.opts)||void 0===e||null===(r=e.chart)||void 0===r?void 0:r.nonce)||this.w.config.chart.nonce;n&&i.setAttribute("nonce",n);var o=document.createTextNode("\n .apexcharts-flip-y {\n transform: scaleY(-1) translateY(-100%);\n transform-origin: top;\n transform-box: fill-box;\n }\n .apexcharts-flip-x {\n transform: scaleX(-1);\n transform-origin: center;\n transform-box: fill-box;\n }\n .apexcharts-legend {\n display: flex;\n overflow: auto;\n padding: 0 10px;\n }\n .apexcharts-legend.apexcharts-legend-group-horizontal {\n flex-direction: column;\n }\n .apexcharts-legend-group {\n display: flex;\n }\n .apexcharts-legend-group-vertical {\n flex-direction: column-reverse;\n }\n .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\n flex-wrap: wrap\n }\n .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n flex-direction: column;\n bottom: 0;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n justify-content: flex-start;\n align-items: flex-start;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\n justify-content: center;\n align-items: center;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\n justify-content: flex-end;\n align-items: flex-end;\n }\n .apexcharts-legend-series {\n cursor: pointer;\n line-height: normal;\n display: flex;\n align-items: center;\n }\n .apexcharts-legend-text {\n position: relative;\n font-size: 14px;\n }\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\n pointer-events: none;\n }\n .apexcharts-legend-marker {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin-right: 1px;\n }\n\n .apexcharts-legend-series.apexcharts-no-click {\n cursor: auto;\n }\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\n display: none !important;\n }\n .apexcharts-inactive-legend {\n opacity: 0.45;\n }\n\n ");return i.appendChild(o),i}},{key:"getLegendDimensions",value:function(){var t=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),e=t.width;return{clwh:t.height,clww:e}}},{key:"appendToForeignObject",value:function(){this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles())}},{key:"toggleDataSeries",value:function(t,e){var r=this,i=this.w;if(i.globals.axisCharts||"radialBar"===i.config.chart.type){i.globals.resized=!0;var n=null,o=null;i.globals.risingSeries=[],i.globals.axisCharts?(n=i.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(t,"']")),o=parseInt(n.getAttribute("data:realIndex"),10)):(n=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(t+1,"']")),o=parseInt(n.getAttribute("rel"),10)-1),e?[{cs:i.globals.collapsedSeries,csi:i.globals.collapsedSeriesIndices},{cs:i.globals.ancillaryCollapsedSeries,csi:i.globals.ancillaryCollapsedSeriesIndices}].forEach((function(t){r.riseCollapsedSeries(t.cs,t.csi,o)})):this.hideSeries({seriesEl:n,realIndex:o})}else{var a=i.globals.dom.Paper.findOne(" .apexcharts-series[rel='".concat(t+1,"'] path")),s=i.config.chart.type;if("pie"===s||"polarArea"===s||"donut"===s){var l=i.config.plotOptions.pie.donut.labels;new Pc(this.lgCtx.ctx).pathMouseDown(a,null),this.lgCtx.ctx.pie.printDataLabelsInner(a.node,l)}a.fire("click")}}},{key:"getSeriesAfterCollapsing",value:function(t){var e=t.realIndex,r=this.w,i=r.globals,n=f.clone(r.config.series);if(i.axisCharts){var o=r.config.yaxis[i.seriesYAxisReverseMap[e]],a={index:e,data:n[e].data.slice(),type:n[e].type||r.config.chart.type};if(o&&o.show&&o.showAlways)i.ancillaryCollapsedSeriesIndices.indexOf(e)<0&&(i.ancillaryCollapsedSeries.push(a),i.ancillaryCollapsedSeriesIndices.push(e));else if(i.collapsedSeriesIndices.indexOf(e)<0){i.collapsedSeries.push(a),i.collapsedSeriesIndices.push(e);var s=i.risingSeries.indexOf(e);i.risingSeries.splice(s,1)}}else i.collapsedSeries.push({index:e,data:n[e]}),i.collapsedSeriesIndices.push(e);return i.allSeriesCollapsed=i.collapsedSeries.length+i.ancillaryCollapsedSeries.length===r.config.series.length,this._getSeriesBasedOnCollapsedState(n)}},{key:"hideSeries",value:function(t){for(var e=t.seriesEl,r=t.realIndex,i=this.w,n=this.getSeriesAfterCollapsing({realIndex:r}),o=e.childNodes,a=0;a<o.length;a++)o[a].classList.contains("apexcharts-series-markers-wrap")&&(o[a].classList.contains("apexcharts-hide")?o[a].classList.remove("apexcharts-hide"):o[a].classList.add("apexcharts-hide"));this.lgCtx.ctx.updateHelpers._updateSeries(n,i.config.chart.animations.dynamicAnimation.enabled)}},{key:"riseCollapsedSeries",value:function(t,e,r){var i=this.w,n=f.clone(i.config.series);if(t.length>0){for(var o=0;o<t.length;o++)t[o].index===r&&(i.globals.axisCharts?n[r].data=t[o].data.slice():n[r]=t[o].data,"number"!=typeof n[r]&&(n[r].hidden=!1),t.splice(o,1),e.splice(o,1),i.globals.risingSeries.push(r));n=this._getSeriesBasedOnCollapsedState(n),this.lgCtx.ctx.updateHelpers._updateSeries(n,i.config.chart.animations.dynamicAnimation.enabled)}}},{key:"_getSeriesBasedOnCollapsedState",value:function(t){var e=this.w,r=0;return e.globals.axisCharts?t.forEach((function(i,n){e.globals.collapsedSeriesIndices.indexOf(n)<0&&e.globals.ancillaryCollapsedSeriesIndices.indexOf(n)<0||(t[n].data=[],r++)})):t.forEach((function(i,n){!e.globals.collapsedSeriesIndices.indexOf(n)<0&&(t[n]=0,r++)})),e.globals.allSeriesCollapsed=r===t.length,t}}])&&Zf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Qf(t){return Qf="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},Qf(t)}function Kf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function td(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Kf(Object(r),!0).forEach((function(e){ed(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Kf(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ed(t,e,r){return(e=id(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function rd(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,id(i.key),i)}}function id(t){var e=function(t){if("object"!=Qf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Qf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qf(e)?e:e+""}var nd=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w,this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this),this.isBarsDistributed="bar"===this.w.config.chart.type&&this.w.config.plotOptions.bar.distributed&&1===this.w.config.series.length,this.legendHelpers=new Jf(this)}var e,r;return e=t,r=[{key:"init",value:function(){var t=this.w,e=t.globals,r=t.config,i=r.legend.showForSingleSeries&&1===e.series.length||this.isBarsDistributed||e.series.length>1;if(this.legendHelpers.appendToForeignObject(),(i||!e.axisCharts)&&r.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),"bottom"===r.legend.position||"top"===r.legend.position?this.legendAlignHorizontal():"right"!==r.legend.position&&"left"!==r.legend.position||this.legendAlignVertical()}}},{key:"createLegendMarker",value:function(t){var e=t.i,r=t.fillcolor,i=this.w,n=document.createElement("span");n.classList.add("apexcharts-legend-marker");var o=i.config.legend.markers.shape||i.config.markers.shape,a=o;Array.isArray(o)&&(a=o[e]);var s=Array.isArray(i.config.legend.markers.size)?parseFloat(i.config.legend.markers.size[e]):parseFloat(i.config.legend.markers.size),l=Array.isArray(i.config.legend.markers.offsetX)?parseFloat(i.config.legend.markers.offsetX[e]):parseFloat(i.config.legend.markers.offsetX),c=Array.isArray(i.config.legend.markers.offsetY)?parseFloat(i.config.legend.markers.offsetY[e]):parseFloat(i.config.legend.markers.offsetY),u=Array.isArray(i.config.legend.markers.strokeWidth)?parseFloat(i.config.legend.markers.strokeWidth[e]):parseFloat(i.config.legend.markers.strokeWidth),h=n.style;if(h.height=2*(s+u)+"px",h.width=2*(s+u)+"px",h.left=l+"px",h.top=c+"px",i.config.legend.markers.customHTML)h.background="transparent",h.color=r[e],Array.isArray(i.config.legend.markers.customHTML)?i.config.legend.markers.customHTML[e]&&(n.innerHTML=i.config.legend.markers.customHTML[e]()):n.innerHTML=i.config.legend.markers.customHTML();else{var f=new Ku(this.ctx).getMarkerConfig({cssClass:"apexcharts-legend-marker apexcharts-marker apexcharts-marker-".concat(a),seriesIndex:e,strokeWidth:u,size:s}),d=window.SVG().addTo(n).size("100%","100%"),p=new Pc(this.ctx).drawMarker(0,0,td(td({},f),{},{pointFillColor:Array.isArray(r)?r[e]:f.pointFillColor,shape:a}));i.globals.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach((function(t){t.node.classList.contains("apexcharts-marker-triangle")?t.node.style.transform="translate(50%, 45%)":t.node.style.transform="translate(50%, 50%)"})),d.add(p)}return n}},{key:"drawLegends",value:function(){var t=this,e=this,r=this.w,i=r.config.legend.fontFamily,n=r.globals.seriesNames,o=r.config.legend.markers.fillColors?r.config.legend.markers.fillColors.slice():r.globals.colors.slice();if("heatmap"===r.config.chart.type){var a=r.config.plotOptions.heatmap.colorScale.ranges;n=a.map((function(t){return t.name?t.name:t.from+" - "+t.to})),o=a.map((function(t){return t.color}))}else this.isBarsDistributed&&(n=r.globals.labels.slice());r.config.legend.customLegendItems.length&&(n=r.config.legend.customLegendItems);var s=r.globals.legendFormatter,l=r.config.legend.inverseOrder,c=[];r.globals.seriesGroups.length>1&&r.config.legend.clusterGroupedSeries&&r.globals.seriesGroups.forEach((function(t,e){c[e]=document.createElement("div"),c[e].classList.add("apexcharts-legend-group","apexcharts-legend-group-".concat(e)),"horizontal"===r.config.legend.clusterGroupedSeriesOrientation?r.globals.dom.elLegendWrap.classList.add("apexcharts-legend-group-horizontal"):c[e].classList.add("apexcharts-legend-group-vertical")}));for(var u=function(e){var a,l=s(n[e],{seriesIndex:e,w:r}),u=!1,h=!1;if(r.globals.collapsedSeries.length>0)for(var d=0;d<r.globals.collapsedSeries.length;d++)r.globals.collapsedSeries[d].index===e&&(u=!0);if(r.globals.ancillaryCollapsedSeriesIndices.length>0)for(var p=0;p<r.globals.ancillaryCollapsedSeriesIndices.length;p++)r.globals.ancillaryCollapsedSeriesIndices[p]===e&&(h=!0);var g=t.createLegendMarker({i:e,fillcolor:o});Pc.setAttrs(g,{rel:e+1,"data:collapsed":u||h}),(u||h)&&g.classList.add("apexcharts-inactive-legend");var b=document.createElement("div"),y=document.createElement("span");y.classList.add("apexcharts-legend-text"),y.innerHTML=Array.isArray(l)?l.join(" "):l;var v=r.config.legend.labels.useSeriesColors?r.globals.colors[e]:Array.isArray(r.config.legend.labels.colors)?null===(a=r.config.legend.labels.colors)||void 0===a?void 0:a[e]:r.config.legend.labels.colors;v||(v=r.config.chart.foreColor),y.style.color=v,y.style.fontSize=parseFloat(r.config.legend.fontSize)+"px",y.style.fontWeight=r.config.legend.fontWeight,y.style.fontFamily=i||r.config.chart.fontFamily,Pc.setAttrs(y,{rel:e+1,i:e,"data:default-text":encodeURIComponent(l),"data:collapsed":u||h}),b.appendChild(g),b.appendChild(y);var m=new Mc(t.ctx);r.config.legend.showForZeroSeries||0===m.getSeriesTotalByIndex(e)&&m.seriesHaveSameValues(e)&&!m.isSeriesNull(e)&&-1===r.globals.collapsedSeriesIndices.indexOf(e)&&-1===r.globals.ancillaryCollapsedSeriesIndices.indexOf(e)&&b.classList.add("apexcharts-hidden-zero-series"),r.config.legend.showForNullSeries||m.isSeriesNull(e)&&-1===r.globals.collapsedSeriesIndices.indexOf(e)&&-1===r.globals.ancillaryCollapsedSeriesIndices.indexOf(e)&&b.classList.add("apexcharts-hidden-null-series"),c.length?r.globals.seriesGroups.forEach((function(t,i){var n;t.includes(null===(n=r.config.series[e])||void 0===n?void 0:n.name)&&(r.globals.dom.elLegendWrap.appendChild(c[i]),c[i].appendChild(b))})):r.globals.dom.elLegendWrap.appendChild(b),r.globals.dom.elLegendWrap.classList.add("apexcharts-align-".concat(r.config.legend.horizontalAlign)),r.globals.dom.elLegendWrap.classList.add("apx-legend-position-"+r.config.legend.position),b.classList.add("apexcharts-legend-series"),b.style.margin="".concat(r.config.legend.itemMargin.vertical,"px ").concat(r.config.legend.itemMargin.horizontal,"px"),r.globals.dom.elLegendWrap.style.width=r.config.legend.width?r.config.legend.width+"px":"",r.globals.dom.elLegendWrap.style.height=r.config.legend.height?r.config.legend.height+"px":"",Pc.setAttrs(b,{rel:e+1,seriesName:f.escapeString(n[e]),"data:collapsed":u||h}),(u||h)&&b.classList.add("apexcharts-inactive-legend"),r.config.legend.onItemClick.toggleDataSeries||b.classList.add("apexcharts-no-click")},h=l?n.length-1:0;l?h>=0:h<=n.length-1;l?h--:h++)u(h);r.globals.dom.elWrap.addEventListener("click",e.onLegendClick,!0),r.config.legend.onItemHover.highlightDataSeries&&0===r.config.legend.customLegendItems.length&&(r.globals.dom.elWrap.addEventListener("mousemove",e.onLegendHovered,!0),r.globals.dom.elWrap.addEventListener("mouseout",e.onLegendHovered,!0))}},{key:"setLegendWrapXY",value:function(t,e){var r=this.w,i=r.globals.dom.elLegendWrap,n=i.clientHeight,o=0,a=0;if("bottom"===r.config.legend.position)a=r.globals.svgHeight-Math.min(n,r.globals.svgHeight/2)-5;else if("top"===r.config.legend.position){var s=new Uf(this.ctx),l=s.dimHelpers.getTitleSubtitleCoords("title").height,c=s.dimHelpers.getTitleSubtitleCoords("subtitle").height;a=(l>0?l-10:0)+(c>0?c-10:0)}i.style.position="absolute",o=o+t+r.config.legend.offsetX,a=a+e+r.config.legend.offsetY,i.style.left=o+"px",i.style.top=a+"px","right"===r.config.legend.position&&(i.style.left="auto",i.style.right=25+r.config.legend.offsetX+"px"),["width","height"].forEach((function(t){i.style[t]&&(i.style[t]=parseInt(r.config.legend[t],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var t=this.w;t.globals.dom.elLegendWrap.style.right=0;var e=new Uf(this.ctx),r=e.dimHelpers.getTitleSubtitleCoords("title"),i=e.dimHelpers.getTitleSubtitleCoords("subtitle"),n=0;"top"===t.config.legend.position&&(n=r.height+i.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(20,n)}},{key:"legendAlignVertical",value:function(){var t=this.w,e=this.legendHelpers.getLegendDimensions(),r=0;"left"===t.config.legend.position&&(r=20),"right"===t.config.legend.position&&(r=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(r,20)}},{key:"onLegendHovered",value:function(t){var e=this.w,r=t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker");if("heatmap"===e.config.chart.type||this.isBarsDistributed){if(r){var i=parseInt(t.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,i,this.w]),new fh(this.ctx).highlightRangeInSeries(t,t.target)}}else!t.target.classList.contains("apexcharts-inactive-legend")&&r&&new fh(this.ctx).toggleSeriesOnHover(t,t.target)}},{key:"onLegendClick",value:function(t){var e=this.w;if(!e.config.legend.customLegendItems.length&&(t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker"))){var r=parseInt(t.target.getAttribute("rel"),10)-1,i="true"===t.target.getAttribute("data:collapsed"),n=this.w.config.chart.events.legendClick;"function"==typeof n&&n(this.ctx,r,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,r,this.w]);var o=this.w.config.legend.markers.onClick;"function"==typeof o&&t.target.classList.contains("apexcharts-legend-marker")&&(o(this.ctx,r,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,r,this.w])),"treemap"!==e.config.chart.type&&"heatmap"!==e.config.chart.type&&!this.isBarsDistributed&&e.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(r,i)}}}],r&&rd(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const od=nd;var ad=r(75),sd=r.n(ad),ld=r(541),cd=r.n(ld),ud=r(955),hd=r.n(ud),fd=r(646),dd=r.n(fd),pd=r(606),gd=r.n(pd),bd=r(802),yd=r.n(bd),vd=r(627),md=r.n(vd);function xd(t){return xd="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},xd(t)}function wd(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Sd(i.key),i)}}function Sd(t){var e=function(t){if("object"!=xd(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=xd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xd(e)?e:e+""}var kd=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w;var r=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=r.globals.minX,this.maxX=r.globals.maxX}var e,r;return e=t,r=[{key:"createToolbar",value:function(){var t=this,e=this.w,r=function(){return document.createElement("div")},i=r();if(i.setAttribute("class","apexcharts-toolbar"),i.style.top=e.config.chart.toolbar.offsetY+"px",i.style.right=3-e.config.chart.toolbar.offsetX+"px",e.globals.dom.elWrap.appendChild(i),this.elZoom=r(),this.elZoomIn=r(),this.elZoomOut=r(),this.elPan=r(),this.elSelection=r(),this.elZoomReset=r(),this.elMenuIcon=r(),this.elMenu=r(),this.elCustomIcons=[],this.t=e.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var n=0;n<this.t.customIcons.length;n++)this.elCustomIcons.push(r());var o=[],a=function(r,i,n){var a=r.toLowerCase();t.t[a]&&e.config.chart.zoom.enabled&&o.push({el:i,icon:"string"==typeof t.t[a]?t.t[a]:n,title:t.localeValues[r],class:"apexcharts-".concat(a,"-icon")})};a("zoomIn",this.elZoomIn,dd()),a("zoomOut",this.elZoomOut,gd());var s=function(r){t.t[r]&&e.config.chart[r].enabled&&o.push({el:"zoom"===r?t.elZoom:t.elSelection,icon:"string"==typeof t.t[r]?t.t[r]:"zoom"===r?cd():yd(),title:t.localeValues["zoom"===r?"selectionZoom":"selection"],class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(r,"-icon")})};s("zoom"),s("selection"),this.t.pan&&e.config.chart.zoom.enabled&&o.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:sd(),title:this.localeValues.pan,class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),a("reset",this.elZoomReset,hd()),this.t.download&&o.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:md(),title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var l=0;l<this.elCustomIcons.length;l++)o.push({el:this.elCustomIcons[l],icon:this.t.customIcons[l].icon,title:this.t.customIcons[l].title,index:this.t.customIcons[l].index,class:"apexcharts-toolbar-custom-icon "+this.t.customIcons[l].class});o.forEach((function(t,e){t.index&&f.moveIndexInArray(o,e,t.index)}));for(var c=0;c<o.length;c++)Pc.setAttrs(o[c].el,{class:o[c].class,title:o[c].title}),o[c].el.innerHTML=o[c].icon,i.appendChild(o[c].el);this._createHamburgerMenu(i),e.globals.zoomEnabled?this.elZoom.classList.add(this.selectedClass):e.globals.panEnabled?this.elPan.classList.add(this.selectedClass):e.globals.selectionEnabled&&this.elSelection.classList.add(this.selectedClass),this.addToolbarEventListeners()}},{key:"_createHamburgerMenu",value:function(t){this.elMenuItems=[],t.appendChild(this.elMenu),Pc.setAttrs(this.elMenu,{class:"apexcharts-menu"});for(var e=[{name:"exportSVG",title:this.localeValues.exportToSVG},{name:"exportPNG",title:this.localeValues.exportToPNG},{name:"exportCSV",title:this.localeValues.exportToCSV}],r=0;r<e.length;r++)this.elMenuItems.push(document.createElement("div")),this.elMenuItems[r].innerHTML=e[r].title,Pc.setAttrs(this.elMenuItems[r],{class:"apexcharts-menu-item ".concat(e[r].name),title:e[r].title}),this.elMenu.appendChild(this.elMenuItems[r])}},{key:"addToolbarEventListeners",value:function(){var t=this;this.elZoomReset.addEventListener("click",this.handleZoomReset.bind(this)),this.elSelection.addEventListener("click",this.toggleZoomSelection.bind(this,"selection")),this.elZoom.addEventListener("click",this.toggleZoomSelection.bind(this,"zoom")),this.elZoomIn.addEventListener("click",this.handleZoomIn.bind(this)),this.elZoomOut.addEventListener("click",this.handleZoomOut.bind(this)),this.elPan.addEventListener("click",this.togglePanning.bind(this)),this.elMenuIcon.addEventListener("click",this.toggleMenu.bind(this)),this.elMenuItems.forEach((function(e){e.classList.contains("exportSVG")?e.addEventListener("click",t.handleDownload.bind(t,"svg")):e.classList.contains("exportPNG")?e.addEventListener("click",t.handleDownload.bind(t,"png")):e.classList.contains("exportCSV")&&e.addEventListener("click",t.handleDownload.bind(t,"csv"))}));for(var e=0;e<this.t.customIcons.length;e++)this.elCustomIcons[e].addEventListener("click",this.t.customIcons[e].click.bind(this,this.ctx,this.ctx.w))}},{key:"toggleZoomSelection",value:function(t){this.ctx.getSyncedCharts().forEach((function(e){e.ctx.toolbar.toggleOtherControls();var r="selection"===t?e.ctx.toolbar.elSelection:e.ctx.toolbar.elZoom,i="selection"===t?"selectionEnabled":"zoomEnabled";e.w.globals[i]=!e.w.globals[i],r.classList.contains(e.ctx.toolbar.selectedClass)?r.classList.remove(e.ctx.toolbar.selectedClass):r.classList.add(e.ctx.toolbar.selectedClass)}))}},{key:"getToolbarIconsReference",value:function(){var t=this.w;this.elZoom||(this.elZoom=t.globals.dom.baseEl.querySelector(".apexcharts-zoom-icon")),this.elPan||(this.elPan=t.globals.dom.baseEl.querySelector(".apexcharts-pan-icon")),this.elSelection||(this.elSelection=t.globals.dom.baseEl.querySelector(".apexcharts-selection-icon"))}},{key:"enableZoomPanFromToolbar",value:function(t){this.toggleOtherControls(),"pan"===t?this.w.globals.panEnabled=!0:this.w.globals.zoomEnabled=!0;var e="pan"===t?this.elPan:this.elZoom,r="pan"===t?this.elZoom:this.elPan;e&&e.classList.add(this.selectedClass),r&&r.classList.remove(this.selectedClass)}},{key:"togglePanning",value:function(){this.ctx.getSyncedCharts().forEach((function(t){t.ctx.toolbar.toggleOtherControls(),t.w.globals.panEnabled=!t.w.globals.panEnabled,t.ctx.toolbar.elPan.classList.contains(t.ctx.toolbar.selectedClass)?t.ctx.toolbar.elPan.classList.remove(t.ctx.toolbar.selectedClass):t.ctx.toolbar.elPan.classList.add(t.ctx.toolbar.selectedClass)}))}},{key:"toggleOtherControls",value:function(){var t=this,e=this.w;e.globals.panEnabled=!1,e.globals.zoomEnabled=!1,e.globals.selectionEnabled=!1,this.getToolbarIconsReference(),[this.elPan,this.elSelection,this.elZoom].forEach((function(e){e&&e.classList.remove(t.selectedClass)}))}},{key:"handleZoomIn",value:function(){var t=this.w;t.globals.isRangeBar&&(this.minX=t.globals.minY,this.maxX=t.globals.maxY);var e=(this.minX+this.maxX)/2,r=(this.minX+e)/2,i=(this.maxX+e)/2,n=this._getNewMinXMaxX(r,i);t.globals.disableZoomIn||this.zoomUpdateOptions(n.minX,n.maxX)}},{key:"handleZoomOut",value:function(){var t=this.w;if(t.globals.isRangeBar&&(this.minX=t.globals.minY,this.maxX=t.globals.maxY),!("datetime"===t.config.xaxis.type&&new Date(this.minX).getUTCFullYear()<1e3)){var e=(this.minX+this.maxX)/2,r=this.minX-(e-this.minX),i=this.maxX-(e-this.maxX),n=this._getNewMinXMaxX(r,i);t.globals.disableZoomOut||this.zoomUpdateOptions(n.minX,n.maxX)}}},{key:"_getNewMinXMaxX",value:function(t,e){var r=this.w.config.xaxis.convertedCatToNumeric;return{minX:r?Math.floor(t):t,maxX:r?Math.floor(e):e}}},{key:"zoomUpdateOptions",value:function(t,e){var r=this.w;if(void 0!==t||void 0!==e){if(!(r.config.xaxis.convertedCatToNumeric&&(t<1&&(t=1,e=r.globals.dataPoints),e-t<2))){var i={min:t,max:e},n=this.getBeforeZoomRange(i);n&&(i=n.xaxis);var o={xaxis:i},a=f.clone(r.globals.initialConfig.yaxis);r.config.chart.group||(o.yaxis=a),this.w.globals.zoomed=!0,this.ctx.updateHelpers._updateOptions(o,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(i,a)}}else this.handleZoomReset()}},{key:"zoomCallback",value:function(t,e){"function"==typeof this.ev.zoomed&&this.ev.zoomed(this.ctx,{xaxis:t,yaxis:e})}},{key:"getBeforeZoomRange",value:function(t,e){var r=null;return"function"==typeof this.ev.beforeZoom&&(r=this.ev.beforeZoom(this,{xaxis:t,yaxis:e})),r}},{key:"toggleMenu",value:function(){var t=this;window.setTimeout((function(){t.elMenu.classList.contains("apexcharts-menu-open")?t.elMenu.classList.remove("apexcharts-menu-open"):t.elMenu.classList.add("apexcharts-menu-open")}),0)}},{key:"handleDownload",value:function(t){var e=this.w,r=new Ah(this.ctx);switch(t){case"svg":r.exportToSVG(this.ctx);break;case"png":r.exportToPng(this.ctx);break;case"csv":r.exportToCSV({series:e.config.series,columnDelimiter:e.config.chart.toolbar.export.csv.columnDelimiter})}}},{key:"handleZoomReset",value:function(t){this.ctx.getSyncedCharts().forEach((function(t){var e=t.w;if(e.globals.lastXAxis.min=e.globals.initialConfig.xaxis.min,e.globals.lastXAxis.max=e.globals.initialConfig.xaxis.max,t.updateHelpers.revertDefaultAxisMinMax(),"function"==typeof e.config.chart.events.beforeResetZoom){var r=e.config.chart.events.beforeResetZoom(t,e);r&&t.updateHelpers.revertDefaultAxisMinMax(r)}"function"==typeof e.config.chart.events.zoomed&&t.ctx.toolbar.zoomCallback({min:e.config.xaxis.min,max:e.config.xaxis.max}),e.globals.zoomed=!1;var i=t.ctx.series.emptyCollapsedSeries(f.clone(e.globals.initialSeries));t.updateHelpers._updateSeries(i,e.config.chart.animations.dynamicAnimation.enabled)}))}},{key:"destroy",value:function(){this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elZoomReset=null,this.elMenuIcon=null}}],r&&wd(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ad(t){return Ad="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},Ad(t)}function Od(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Pd(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Od(Object(r),!0).forEach((function(e){Cd(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Od(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Cd(t,e,r){return(e=Td(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function jd(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Td(i.key),i)}}function Td(t){var e=function(t){if("object"!=Ad(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ad(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ad(e)?e:e+""}function Ed(t,e){return Ed=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ed(t,e)}function Md(t){var e=Ld();return function(){var r,i=Id(t);if(e){var n=Id(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Ad(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Ld(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ld=function(){return!!t})()}function Id(t){return Id=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Id(t)}var _d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ed(t,e)}(n,t);var e,r,i=Md(n);function n(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(e=i.call(this,t)).ctx=t,e.w=t.w,e.dragged=!1,e.graphics=new Pc(e.ctx),e.eventList=["mousedown","mouseleave","mousemove","touchstart","touchmove","mouseup","touchend","wheel"],e.clientX=0,e.clientY=0,e.startX=0,e.endX=0,e.dragX=0,e.startY=0,e.endY=0,e.dragY=0,e.moveDirection="none",e.debounceTimer=null,e.debounceDelay=100,e.wheelDelay=400,e}return e=n,r=[{key:"init",value:function(t){var e=this,r=t.xyRatios,i=this.w,n=this;this.xyRatios=r,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.gridRect=i.globals.dom.baseEl.querySelector(".apexcharts-grid"),this.constraints=new Vt(0,0,i.globals.gridWidth,i.globals.gridHeight),this.zoomRect.node.classList.add("apexcharts-zoom-rect"),this.selectionRect.node.classList.add("apexcharts-selection-rect"),i.globals.dom.Paper.add(this.zoomRect),i.globals.dom.Paper.add(this.selectionRect),"x"===i.config.chart.selection.type?this.slDraggableRect=this.selectionRect.draggable({minX:0,minY:0,maxX:i.globals.gridWidth,maxY:i.globals.gridHeight}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):"y"===i.config.chart.selection.type?this.slDraggableRect=this.selectionRect.draggable({minX:0,maxX:i.globals.gridWidth}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):this.slDraggableRect=this.selectionRect.draggable().on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")),this.preselectedSelection(),this.hoverArea=i.globals.dom.baseEl.querySelector("".concat(i.globals.chartClass," .apexcharts-svg")),this.hoverArea.classList.add("apexcharts-zoomable"),this.eventList.forEach((function(t){e.hoverArea.addEventListener(t,n.svgMouseEvents.bind(n,r),{capture:!1,passive:!0})})),i.config.chart.zoom.enabled&&i.config.chart.zoom.allowMouseWheelZoom&&this.hoverArea.addEventListener("wheel",n.mouseWheelEvent.bind(n),{capture:!1,passive:!1})}},{key:"destroy",value:function(){this.slDraggableRect&&(this.slDraggableRect.draggable(!1),this.slDraggableRect.off(),this.selectionRect.off()),this.selectionRect=null,this.zoomRect=null,this.gridRect=null}},{key:"svgMouseEvents",value:function(t,e){var r=this.w,i=this.ctx.toolbar,n=r.globals.zoomEnabled?r.config.chart.zoom.type:r.config.chart.selection.type,o=r.config.chart.toolbar.autoSelected;if(e.shiftKey?(this.shiftWasPressed=!0,i.enableZoomPanFromToolbar("pan"===o?"zoom":"pan")):this.shiftWasPressed&&(i.enableZoomPanFromToolbar(o),this.shiftWasPressed=!1),e.target){var a,s=e.target.classList;if(e.target.parentNode&&null!==e.target.parentNode&&(a=e.target.parentNode.classList),!(s.contains("apexcharts-legend-marker")||s.contains("apexcharts-legend-text")||a&&a.contains("apexcharts-toolbar"))){if(this.clientX="touchmove"===e.type||"touchstart"===e.type?e.touches[0].clientX:"touchend"===e.type?e.changedTouches[0].clientX:e.clientX,this.clientY="touchmove"===e.type||"touchstart"===e.type?e.touches[0].clientY:"touchend"===e.type?e.changedTouches[0].clientY:e.clientY,"mousedown"===e.type&&1===e.which||"touchstart"===e.type){var l=this.gridRect.getBoundingClientRect();this.startX=this.clientX-l.left-r.globals.barPadForNumericAxis,this.startY=this.clientY-l.top,this.dragged=!1,this.w.globals.mousedown=!0}("mousemove"===e.type&&1===e.which||"touchmove"===e.type)&&(this.dragged=!0,r.globals.panEnabled?(r.globals.selection=null,this.w.globals.mousedown&&this.panDragging({context:this,zoomtype:n,xyRatios:t})):(this.w.globals.mousedown&&r.globals.zoomEnabled||this.w.globals.mousedown&&r.globals.selectionEnabled)&&(this.selection=this.selectionDrawing({context:this,zoomtype:n}))),"mouseup"!==e.type&&"touchend"!==e.type&&"mouseleave"!==e.type||this.handleMouseUp({zoomtype:n}),this.makeSelectionRectDraggable()}}}},{key:"handleMouseUp",value:function(t){var e,r=t.zoomtype,i=t.isResized,n=this.w,o=null===(e=this.gridRect)||void 0===e?void 0:e.getBoundingClientRect();o&&(this.w.globals.mousedown||i)&&(this.endX=this.clientX-o.left-n.globals.barPadForNumericAxis,this.endY=this.clientY-o.top,this.dragX=Math.abs(this.endX-this.startX),this.dragY=Math.abs(this.endY-this.startY),(n.globals.zoomEnabled||n.globals.selectionEnabled)&&this.selectionDrawn({context:this,zoomtype:r}),n.globals.panEnabled&&n.config.xaxis.convertedCatToNumeric&&this.delayedPanScrolled()),n.globals.zoomEnabled&&this.hideSelectionRect(this.selectionRect),this.dragged=!1,this.w.globals.mousedown=!1}},{key:"mouseWheelEvent",value:function(t){var e=this,r=this.w;t.preventDefault();var i=Date.now();i-r.globals.lastWheelExecution>this.wheelDelay&&(this.executeMouseWheelZoom(t),r.globals.lastWheelExecution=i),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((function(){i-r.globals.lastWheelExecution>e.wheelDelay&&(e.executeMouseWheelZoom(t),r.globals.lastWheelExecution=i)}),this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(t){var e,r=this.w;this.minX=r.globals.isRangeBar?r.globals.minY:r.globals.minX,this.maxX=r.globals.isRangeBar?r.globals.maxY:r.globals.maxX;var i=null===(e=this.gridRect)||void 0===e?void 0:e.getBoundingClientRect();if(i){var n,o,a,s=(t.clientX-i.left)/i.width,l=this.minX,c=this.maxX,u=c-l;if(t.deltaY<0){var h=l+s*u;o=h-(n=.5*u)/2,a=h+n/2}else o=l-(n=1.5*u)/2,a=c+n/2;if(!r.globals.isRangeBar){o=Math.max(o,r.globals.initialMinX),a=Math.min(a,r.globals.initialMaxX);var f=.01*(r.globals.initialMaxX-r.globals.initialMinX);if(a-o<f){var d=(o+a)/2;o=d-f/2,a=d+f/2}}var p=this._getNewMinXMaxX(o,a);isNaN(p.minX)||isNaN(p.maxX)||this.zoomUpdateOptions(p.minX,p.maxX)}}},{key:"makeSelectionRectDraggable",value:function(){var t=this,e=this.w;if(this.selectionRect){var r=this.selectionRect.node.getBoundingClientRect();r.width>0&&r.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:function(){},updateRot:function(){},createHandle:function(t,e,r,i,n){return"l"===n||"r"===n?t.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):t.circle(0)},updateHandle:function(t,e){return t.center(e[0],e[1])}}).resize().on("resize",(function(){var r=e.globals.zoomEnabled?e.config.chart.zoom.type:e.config.chart.selection.type;t.handleMouseUp({zoomtype:r,isResized:!0})})))}}},{key:"preselectedSelection",value:function(){var t=this.w,e=this.xyRatios;if(!t.globals.zoomEnabled)if(void 0!==t.globals.selection&&null!==t.globals.selection)this.drawSelectionRect(Pd(Pd({},t.globals.selection),{},{translateX:t.globals.translateX,translateY:t.globals.translateY}));else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){var r=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,i=t.globals.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-r;t.globals.isRangeBar&&(r=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/e.invertedYRatio,i=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/e.invertedYRatio);var n={x:r,y:0,width:i,height:t.globals.gridHeight,translateX:t.globals.translateX,translateY:t.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(n),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(t){var e=t.x,r=t.y,i=t.width,n=t.height,o=t.translateX,a=void 0===o?0:o,s=t.translateY,l=void 0===s?0:s,c=this.w,u=this.zoomRect,h=this.selectionRect;if(this.dragged||null!==c.globals.selection){var f={transform:"translate("+a+", "+l+")"};c.globals.zoomEnabled&&this.dragged&&(i<0&&(i=1),u.attr({x:e,y:r,width:i,height:n,fill:c.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":c.config.chart.zoom.zoomedArea.fill.opacity,stroke:c.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":c.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":c.config.chart.zoom.zoomedArea.stroke.opacity}),Pc.setAttrs(u.node,f)),c.globals.selectionEnabled&&(h.attr({x:e,y:r,width:i>0?i:0,height:n>0?n:0,fill:c.config.chart.selection.fill.color,"fill-opacity":c.config.chart.selection.fill.opacity,stroke:c.config.chart.selection.stroke.color,"stroke-width":c.config.chart.selection.stroke.width,"stroke-dasharray":c.config.chart.selection.stroke.dashArray,"stroke-opacity":c.config.chart.selection.stroke.opacity}),Pc.setAttrs(h.node,f))}}},{key:"hideSelectionRect",value:function(t){t&&t.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(t){var e=t.context,r=t.zoomtype,i=this.w,n=e,o=this.gridRect.getBoundingClientRect(),a=n.startX-1,s=n.startY,l=!1,c=!1,u=n.clientX-o.left-i.globals.barPadForNumericAxis,h=n.clientY-o.top,f=u-a,d=h-s,p={translateX:i.globals.translateX,translateY:i.globals.translateY};return Math.abs(f+a)>i.globals.gridWidth?f=i.globals.gridWidth-a:u<0&&(f=a),a>u&&(l=!0,f=Math.abs(f)),s>h&&(c=!0,d=Math.abs(d)),p=Pd(Pd({},p="x"===r?{x:l?a-f:a,y:0,width:f,height:i.globals.gridHeight}:"y"===r?{x:0,y:c?s-d:s,width:i.globals.gridWidth,height:d}:{x:l?a-f:a,y:c?s-d:s,width:f,height:d}),{},{translateX:i.globals.translateX,translateY:i.globals.translateY}),n.drawSelectionRect(p),n.selectionDragging("resizing"),p}},{key:"selectionDragging",value:function(t,e){var r=this,i=this.w;if(e){e.preventDefault();var n=e.detail,o=n.handler,a=n.box,s=a.x,l=a.y;s<this.constraints.x&&(s=this.constraints.x),l<this.constraints.y&&(l=this.constraints.y),a.x2>this.constraints.x2&&(s=this.constraints.x2-a.w),a.y2>this.constraints.y2&&(l=this.constraints.y2-a.h),o.move(s,l);var c=this.xyRatios,u=this.selectionRect,h=0;"resizing"===t&&(h=30);var f=function(t){return parseFloat(u.node.getAttribute(t))},d={x:f("x"),y:f("y"),width:f("width"),height:f("height")};i.globals.selection=d,"function"==typeof i.config.chart.events.selection&&i.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var t,e,n,o,a=r.gridRect.getBoundingClientRect(),s=u.node.getBoundingClientRect();i.globals.isRangeBar?(t=i.globals.yAxisScale[0].niceMin+(s.left-a.left)*c.invertedYRatio,e=i.globals.yAxisScale[0].niceMin+(s.right-a.left)*c.invertedYRatio,n=0,o=1):(t=i.globals.xAxisScale.niceMin+(s.left-a.left)*c.xRatio,e=i.globals.xAxisScale.niceMin+(s.right-a.left)*c.xRatio,n=i.globals.yAxisScale[0].niceMin+(a.bottom-s.bottom)*c.yRatio[0],o=i.globals.yAxisScale[0].niceMax-(s.top-a.top)*c.yRatio[0]);var l={xaxis:{min:t,max:e},yaxis:{min:n,max:o}};i.config.chart.events.selection(r.ctx,l),i.config.chart.brush.enabled&&void 0!==i.config.chart.events.brushScrolled&&i.config.chart.events.brushScrolled(r.ctx,l)}),h))}}},{key:"selectionDrawn",value:function(t){var e=t.context,r=t.zoomtype,i=this.w,n=e,o=this.xyRatios,a=this.ctx.toolbar;if(n.startX>n.endX){var s=n.startX;n.startX=n.endX,n.endX=s}if(n.startY>n.endY){var l=n.startY;n.startY=n.endY,n.endY=l}var c=void 0,u=void 0;i.globals.isRangeBar?(c=i.globals.yAxisScale[0].niceMin+n.startX*o.invertedYRatio,u=i.globals.yAxisScale[0].niceMin+n.endX*o.invertedYRatio):(c=i.globals.xAxisScale.niceMin+n.startX*o.xRatio,u=i.globals.xAxisScale.niceMin+n.endX*o.xRatio);var h=[],d=[];if(i.config.yaxis.forEach((function(t,e){var r=i.globals.seriesYAxisMap[e][0];h.push(i.globals.yAxisScale[e].niceMax-o.yRatio[r]*n.startY),d.push(i.globals.yAxisScale[e].niceMax-o.yRatio[r]*n.endY)})),n.dragged&&(n.dragX>10||n.dragY>10)&&c!==u)if(i.globals.zoomEnabled){var p=f.clone(i.globals.initialConfig.yaxis),g=f.clone(i.globals.initialConfig.xaxis);if(i.globals.zoomed=!0,i.config.xaxis.convertedCatToNumeric&&(c=Math.floor(c),u=Math.floor(u),c<1&&(c=1,u=i.globals.dataPoints),u-c<2&&(u=c+1)),"xy"!==r&&"x"!==r||(g={min:c,max:u}),"xy"!==r&&"y"!==r||p.forEach((function(t,e){p[e].min=d[e],p[e].max=h[e]})),a){var b=a.getBeforeZoomRange(g,p);b&&(g=b.xaxis?b.xaxis:g,p=b.yaxis?b.yaxis:p)}var y={xaxis:g};i.config.chart.group||(y.yaxis=p),n.ctx.updateHelpers._updateOptions(y,!1,n.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof i.config.chart.events.zoomed&&a.zoomCallback(g,p)}else if(i.globals.selectionEnabled){var v,m=null;v={min:c,max:u},"xy"!==r&&"y"!==r||(m=f.clone(i.config.yaxis)).forEach((function(t,e){m[e].min=d[e],m[e].max=h[e]})),i.globals.selection=n.selection,"function"==typeof i.config.chart.events.selection&&i.config.chart.events.selection(n.ctx,{xaxis:v,yaxis:m})}}},{key:"panDragging",value:function(t){var e=t.context,r=this.w,i=e;if(void 0!==r.globals.lastClientPosition.x){var n=r.globals.lastClientPosition.x-i.clientX,o=r.globals.lastClientPosition.y-i.clientY;Math.abs(n)>Math.abs(o)&&n>0?this.moveDirection="left":Math.abs(n)>Math.abs(o)&&n<0?this.moveDirection="right":Math.abs(o)>Math.abs(n)&&o>0?this.moveDirection="up":Math.abs(o)>Math.abs(n)&&o<0&&(this.moveDirection="down")}r.globals.lastClientPosition={x:i.clientX,y:i.clientY};var a=r.globals.isRangeBar?r.globals.minY:r.globals.minX,s=r.globals.isRangeBar?r.globals.maxY:r.globals.maxX;r.config.xaxis.convertedCatToNumeric||i.panScrolled(a,s)}},{key:"delayedPanScrolled",value:function(){var t=this.w,e=t.globals.minX,r=t.globals.maxX,i=(t.globals.maxX-t.globals.minX)/2;"left"===this.moveDirection?(e=t.globals.minX+i,r=t.globals.maxX+i):"right"===this.moveDirection&&(e=t.globals.minX-i,r=t.globals.maxX-i),e=Math.floor(e),r=Math.floor(r),this.updateScrolledChart({xaxis:{min:e,max:r}},e,r)}},{key:"panScrolled",value:function(t,e){var r=this.w,i=this.xyRatios,n=f.clone(r.globals.initialConfig.yaxis),o=i.xRatio,a=r.globals.minX,s=r.globals.maxX;r.globals.isRangeBar&&(o=i.invertedYRatio,a=r.globals.minY,s=r.globals.maxY),"left"===this.moveDirection?(t=a+r.globals.gridWidth/15*o,e=s+r.globals.gridWidth/15*o):"right"===this.moveDirection&&(t=a-r.globals.gridWidth/15*o,e=s-r.globals.gridWidth/15*o),r.globals.isRangeBar||(t<r.globals.initialMinX||e>r.globals.initialMaxX)&&(t=a,e=s);var l={xaxis:{min:t,max:e}};r.config.chart.group||(l.yaxis=n),this.updateScrolledChart(l,t,e)}},{key:"updateScrolledChart",value:function(t,e,r){var i=this.w;this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof i.config.chart.events.scrolled&&i.config.chart.events.scrolled(this.ctx,{xaxis:{min:e,max:r}})}}],r&&jd(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(kd);function Rd(t){return Rd="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},Rd(t)}function zd(t){return function(t){if(Array.isArray(t))return Xd(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Xd(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Xd(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xd(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function Dd(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Yd(i.key),i)}}function Yd(t){var e=function(t){if("object"!=Rd(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Rd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Rd(e)?e:e+""}var Hd=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}var e,r;return e=t,r=[{key:"getNearestValues",value:function(t){var e=t.hoverArea,r=t.elGrid,i=t.clientX,n=t.clientY,o=this.w,a=r.getBoundingClientRect(),s=a.width,l=a.height,c=s/(o.globals.dataPoints-1),u=l/o.globals.dataPoints,h=this.hasBars();!o.globals.comboCharts&&!h||o.config.xaxis.convertedCatToNumeric||(c=s/o.globals.dataPoints);var d=i-a.left-o.globals.barPadForNumericAxis,p=n-a.top;d<0||p<0||d>s||p>l?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):o.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):o.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var g=Math.round(d/c),b=Math.floor(p/u);h&&!o.config.xaxis.convertedCatToNumeric&&(g=Math.ceil(d/c),g-=1);var y=null,v=null,m=o.globals.seriesXvalues.map((function(t){return t.filter((function(t){return f.isNumber(t)}))})),x=o.globals.seriesYvalues.map((function(t){return t.filter((function(t){return f.isNumber(t)}))}));if(o.globals.isXNumeric){var w=this.ttCtx.getElGrid().getBoundingClientRect(),S=d*(w.width/s),k=p*(w.height/l);y=(v=this.closestInMultiArray(S,k,m,x)).index,g=v.j,null!==y&&o.globals.hasNullValues&&(m=o.globals.seriesXvalues[y],g=(v=this.closestInArray(S,m)).j)}return o.globals.capturedSeriesIndex=null===y?-1:y,(!g||g<1)&&(g=0),o.globals.isBarHorizontal?o.globals.capturedDataPointIndex=b:o.globals.capturedDataPointIndex=g,{capturedSeries:y,j:o.globals.isBarHorizontal?b:g,hoverX:d,hoverY:p}}},{key:"getFirstActiveXArray",value:function(t){for(var e=this.w,r=0,i=t.map((function(t,e){return t.length>0?e:-1})),n=0;n<i.length;n++)if(-1!==i[n]&&-1===e.globals.collapsedSeriesIndices.indexOf(n)&&-1===e.globals.ancillaryCollapsedSeriesIndices.indexOf(n)){r=i[n];break}return r}},{key:"closestInMultiArray",value:function(t,e,r,i){for(var n,o=this.w,a=1/0,s=null,l=null,c=0;c<r.length;c++)if(n=c,-1===o.globals.collapsedSeriesIndices.indexOf(n)&&-1===o.globals.ancillaryCollapsedSeriesIndices.indexOf(n))for(var u=r[c],h=i[c],f=Math.min(u.length,h.length),d=0;d<f;d++){var p=t-u[d],g=e-h[d],b=Math.sqrt(p*p+g*g);b<a&&(a=b,s=c,l=d)}return{index:s,j:l}}},{key:"closestInArray",value:function(t,e){for(var r=e[0],i=null,n=Math.abs(t-r),o=0;o<e.length;o++){var a=Math.abs(t-e[o]);a<n&&(n=a,i=o)}return{j:i}}},{key:"isXoverlap",value:function(t){var e=[],r=this.w.globals.seriesX.filter((function(t){return void 0!==t[0]}));if(r.length>0)for(var i=0;i<r.length-1;i++)void 0!==r[i][t]&&void 0!==r[i+1][t]&&r[i][t]!==r[i+1][t]&&e.push("unEqual");return 0===e.length}},{key:"isInitialSeriesSameLen",value:function(){for(var t=!0,e=this.w.globals.initialSeries,r=0;r<e.length-1;r++)if(e[r].data.length!==e[r+1].data.length){t=!1;break}return t}},{key:"getBarsHeight",value:function(t){return zd(t).reduce((function(t,e){return t+e.getBBox().height}),0)}},{key:"getElMarkers",value:function(t){return"number"==typeof t?this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-series-markers-wrap > *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");r=zd(r),e&&(r=r.filter((function(e){var r=Number(e.getAttribute("data:realIndex"));return-1===t.w.globals.collapsedSeriesIndices.indexOf(r)}))),r.sort((function(t,e){var r=Number(t.getAttribute("data:realIndex")),i=Number(e.getAttribute("data:realIndex"));return i<r?1:i>r?-1:0}));var i=[];return r.forEach((function(t){i.push(t.querySelector(".apexcharts-marker"))})),i}},{key:"hasMarkers",value:function(t){return this.getElMarkers(t).length>0}},{key:"getPathFromPoint",value:function(t,e){var r=Number(t.getAttribute("cx")),i=Number(t.getAttribute("cy")),n=t.getAttribute("shape");return new Pc(this.ctx).getMarkerPath(r,i,n,e)}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(t){var e=this.w,r=e.config.markers.hover.size;return void 0===r&&(r=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),r}},{key:"toggleAllTooltipSeriesGroups",value:function(t){var e=this.w,r=this.ttCtx;0===r.allTooltipSeriesGroups.length&&(r.allTooltipSeriesGroups=e.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var i=r.allTooltipSeriesGroups,n=0;n<i.length;n++)"enable"===t?(i[n].classList.add("apexcharts-active"),i[n].style.display=e.config.tooltip.items.display):(i[n].classList.remove("apexcharts-active"),i[n].style.display="none")}}],r&&Dd(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Fd(t){return Fd="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},Fd(t)}function Bd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Nd(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Bd(Object(r),!0).forEach((function(e){Wd(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Bd(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Wd(t,e,r){return(e=Vd(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Gd(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Vd(i.key),i)}}function Vd(t){var e=function(t){if("object"!=Fd(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Fd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Fd(e)?e:e+""}var Ud=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.w=e.w,this.ctx=e.ctx,this.ttCtx=e,this.tooltipUtil=new Hd(e)}var e,r;return e=t,r=[{key:"drawSeriesTexts",value:function(t){var e=t.shared,r=void 0===e||e,i=t.ttItems,n=t.i,o=void 0===n?0:n,a=t.j,s=void 0===a?null:a,l=t.y1,c=t.y2,u=t.e,h=this.w;void 0!==h.config.tooltip.custom?this.handleCustomTooltip({i:o,j:s,y1:l,y2:c,w:h}):this.toggleActiveInactiveSeries(r,o);var f=this.getValuesToPrint({i:o,j:s});this.printLabels({i:o,j:s,values:f,ttItems:i,shared:r,e:u});var d=this.ttCtx.getElTooltip();this.ttCtx.tooltipRect.ttWidth=d.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=d.getBoundingClientRect().height}},{key:"printLabels",value:function(t){var e,r=this,i=t.i,n=t.j,o=t.values,a=t.ttItems,s=t.shared,l=t.e,c=this.w,u=[],h=function(t){return c.globals.seriesGoals[t]&&c.globals.seriesGoals[t][n]&&Array.isArray(c.globals.seriesGoals[t][n])},f=o.xVal,d=o.zVal,p=o.xAxisTTVal,g="",b=c.globals.colors[i];null!==n&&c.config.plotOptions.bar.distributed&&(b=c.globals.colors[n]);for(var y=function(t,o){var y=r.getFormatters(i);g=r.getSeriesName({fn:y.yLbTitleFormatter,index:i,seriesIndex:i,j:n}),"treemap"===c.config.chart.type&&(g=y.yLbTitleFormatter(String(c.config.series[i].data[n].x),{series:c.globals.series,seriesIndex:i,dataPointIndex:n,w:c}));var v=c.config.tooltip.inverseOrder?o:t;if(c.globals.axisCharts){var m=function(t){var e,r,i,o;return c.globals.isRangeData?y.yLbFormatter(null===(e=c.globals.seriesRangeStart)||void 0===e||null===(r=e[t])||void 0===r?void 0:r[n],{series:c.globals.seriesRangeStart,seriesIndex:t,dataPointIndex:n,w:c})+" - "+y.yLbFormatter(null===(i=c.globals.seriesRangeEnd)||void 0===i||null===(o=i[t])||void 0===o?void 0:o[n],{series:c.globals.seriesRangeEnd,seriesIndex:t,dataPointIndex:n,w:c}):y.yLbFormatter(c.globals.series[t][n],{series:c.globals.series,seriesIndex:t,dataPointIndex:n,w:c})};if(s)y=r.getFormatters(v),g=r.getSeriesName({fn:y.yLbTitleFormatter,index:v,seriesIndex:i,j:n}),b=c.globals.colors[v],e=m(v),h(v)&&(u=c.globals.seriesGoals[v][n].map((function(t){return{attrs:t,val:y.yLbFormatter(t.value,{seriesIndex:v,dataPointIndex:n,w:c})}})));else{var x,w=null==l||null===(x=l.target)||void 0===x?void 0:x.getAttribute("fill");w&&(-1!==w.indexOf("url")?-1!==w.indexOf("Pattern")&&(b=c.globals.dom.baseEl.querySelector(w.substr(4).slice(0,-1)).childNodes[0].getAttribute("stroke")):b=w),e=m(i),h(i)&&Array.isArray(c.globals.seriesGoals[i][n])&&(u=c.globals.seriesGoals[i][n].map((function(t){return{attrs:t,val:y.yLbFormatter(t.value,{seriesIndex:i,dataPointIndex:n,w:c})}})))}}null===n&&(e=y.yLbFormatter(c.globals.series[i],Nd(Nd({},c),{},{seriesIndex:i,dataPointIndex:i}))),r.DOMHandling({i,t:v,j:n,ttItems:a,values:{val:e,goalVals:u,xVal:f,xAxisTTVal:p,zVal:d},seriesName:g,shared:s,pColor:b})},v=0,m=c.globals.series.length-1;v<c.globals.series.length;v++,m--)y(v,m)}},{key:"getFormatters",value:function(t){var e,r=this.w,i=r.globals.yLabelFormatters[t];return void 0!==r.globals.ttVal?Array.isArray(r.globals.ttVal)?(i=r.globals.ttVal[t]&&r.globals.ttVal[t].formatter,e=r.globals.ttVal[t]&&r.globals.ttVal[t].title&&r.globals.ttVal[t].title.formatter):(i=r.globals.ttVal.formatter,"function"==typeof r.globals.ttVal.title.formatter&&(e=r.globals.ttVal.title.formatter)):e=r.config.tooltip.y.title.formatter,"function"!=typeof i&&(i=r.globals.yLabelFormatters[0]?r.globals.yLabelFormatters[0]:function(t){return t}),"function"!=typeof e&&(e=function(t){return t?t+": ":""}),{yLbFormatter:i,yLbTitleFormatter:e}}},{key:"getSeriesName",value:function(t){var e=t.fn,r=t.index,i=t.seriesIndex,n=t.j,o=this.w;return e(String(o.globals.seriesNames[r]),{series:o.globals.series,seriesIndex:i,dataPointIndex:n,w:o})}},{key:"DOMHandling",value:function(t){t.i;var e=t.t,r=t.j,i=t.ttItems,n=t.values,o=t.seriesName,a=t.shared,s=t.pColor,l=this.w,c=this.ttCtx,u=n.val,h=n.goalVals,f=n.xVal,d=n.xAxisTTVal,p=n.zVal,g=null;g=i[e].children,l.config.tooltip.fillSeriesColor&&(i[e].style.backgroundColor=s,g[0].style.display="none"),c.showTooltipTitle&&(null===c.tooltipTitle&&(c.tooltipTitle=l.globals.dom.baseEl.querySelector(".apexcharts-tooltip-title")),c.tooltipTitle.innerHTML=f),c.isXAxisTooltipEnabled&&(c.xaxisTooltipText.innerHTML=""!==d?d:f);var b=i[e].querySelector(".apexcharts-tooltip-text-y-label");b&&(b.innerHTML=o||"");var y=i[e].querySelector(".apexcharts-tooltip-text-y-value");y&&(y.innerHTML=void 0!==u?u:""),g[0]&&g[0].classList.contains("apexcharts-tooltip-marker")&&(l.config.tooltip.marker.fillColors&&Array.isArray(l.config.tooltip.marker.fillColors)&&(s=l.config.tooltip.marker.fillColors[e]),g[0].style.backgroundColor=s),l.config.tooltip.marker.show||(g[0].style.display="none");var v=i[e].querySelector(".apexcharts-tooltip-text-goals-label"),m=i[e].querySelector(".apexcharts-tooltip-text-goals-value");if(h.length&&l.globals.seriesGoals[e]){var x=function(){var t="<div >",e="<div>";h.forEach((function(r,i){t+=' <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: '.concat(r.attrs.strokeColor,'; height: 3px; border-radius: 0; top: 5px;"></span> ').concat(r.attrs.name,"</div>"),e+="<div>".concat(r.val,"</div>")})),v.innerHTML=t+"</div>",m.innerHTML=e+"</div>"};a?l.globals.seriesGoals[e][r]&&Array.isArray(l.globals.seriesGoals[e][r])?x():(v.innerHTML="",m.innerHTML=""):x()}else v.innerHTML="",m.innerHTML="";if(null!==p&&(i[e].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,i[e].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==p?p:""),a&&g[0]){if(l.config.tooltip.hideEmptySeries){var w=i[e].querySelector(".apexcharts-tooltip-marker"),S=i[e].querySelector(".apexcharts-tooltip-text");0==parseFloat(u)?(w.style.display="none",S.style.display="none"):(w.style.display="block",S.style.display="block")}null==u||l.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||l.globals.collapsedSeriesIndices.indexOf(e)>-1||Array.isArray(c.tConfig.enabledOnSeries)&&-1===c.tConfig.enabledOnSeries.indexOf(e)?g[0].parentNode.style.display="none":g[0].parentNode.style.display=l.config.tooltip.items.display}else Array.isArray(c.tConfig.enabledOnSeries)&&-1===c.tConfig.enabledOnSeries.indexOf(e)&&(g[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(t,e){var r=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var i=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(e));i&&(i.classList.add("apexcharts-active"),i.style.display=r.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(t){var e=t.i,r=t.j,i=this.w,n=this.ctx.series.filteredSeriesX(),o="",a="",s=null,l=null,c={series:i.globals.series,seriesIndex:e,dataPointIndex:r,w:i},u=i.globals.ttZFormatter;null===r?l=i.globals.series[e]:i.globals.isXNumeric&&"treemap"!==i.config.chart.type?(o=n[e][r],0===n[e].length&&(o=n[this.tooltipUtil.getFirstActiveXArray(n)][r])):o=new yh(this.ctx).isFormatXY()?void 0!==i.config.series[e].data[r]?i.config.series[e].data[r].x:"":void 0!==i.globals.labels[r]?i.globals.labels[r]:"";var h=o;return o=i.globals.isXNumeric&&"datetime"===i.config.xaxis.type?new Jc(this.ctx).xLabelFormat(i.globals.ttKeyFormatter,h,h,{i:void 0,dateFormatter:new Vc(this.ctx).formatDate,w:this.w}):i.globals.isBarHorizontal?i.globals.yLabelFormatters[0](h,c):i.globals.xLabelFormatter(h,c),void 0!==i.config.tooltip.x.formatter&&(o=i.globals.ttKeyFormatter(h,c)),i.globals.seriesZ.length>0&&i.globals.seriesZ[e].length>0&&(s=u(i.globals.seriesZ[e][r],i)),a="function"==typeof i.config.xaxis.tooltip.formatter?i.globals.xaxisTooltipFormatter(h,c):o,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(o)?o.join(" "):o,xAxisTTVal:Array.isArray(a)?a.join(" "):a,zVal:s}}},{key:"handleCustomTooltip",value:function(t){var e=t.i,r=t.j,i=t.y1,n=t.y2,o=t.w,a=this.ttCtx.getElTooltip(),s=o.config.tooltip.custom;Array.isArray(s)&&s[e]&&(s=s[e]);var l=s({ctx:this.ctx,series:o.globals.series,seriesIndex:e,dataPointIndex:r,y1:i,y2:n,w:o});"string"==typeof l?a.innerHTML=l:(l instanceof Element||"string"==typeof l.nodeName)&&(a.innerHTML="",a.appendChild(l))}}],r&&Gd(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function qd(t){return qd="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},qd(t)}function Zd(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,$d(i.key),i)}}function $d(t){var e=function(t){if("object"!=qd(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=qd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==qd(e)?e:e+""}var Jd=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}var e,r;return e=t,r=[{key:"moveXCrosshairs",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=this.ttCtx,i=this.w,n=r.getElXCrosshairs(),o=t-r.xcrosshairsWidth/2,a=i.globals.labels.slice().length;if(null!==e&&(o=i.globals.gridWidth/a*e),null===n||i.globals.isBarHorizontal||(n.setAttribute("x",o),n.setAttribute("x1",o),n.setAttribute("x2",o),n.setAttribute("y2",i.globals.gridHeight),n.classList.add("apexcharts-active")),o<0&&(o=0),o>i.globals.gridWidth&&(o=i.globals.gridWidth),r.isXAxisTooltipEnabled){var s=o;"tickWidth"!==i.config.xaxis.crosshairs.width&&"barWidth"!==i.config.xaxis.crosshairs.width||(s=o+r.xcrosshairsWidth/2),this.moveXAxisTooltip(s)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&Pc.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&Pc.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,r=this.ttCtx;if(null!==r.xaxisTooltip&&0!==r.xcrosshairsWidth){r.xaxisTooltip.classList.add("apexcharts-active");var i,n=r.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1+e.config.xaxis.offsetY;t-=r.xaxisTooltip.getBoundingClientRect().width/2,isNaN(t)||(t+=e.globals.translateX,i=new Pc(this.ctx).getTextRects(r.xaxisTooltipText.innerHTML),r.xaxisTooltipText.style.minWidth=i.width+"px",r.xaxisTooltip.style.left=t+"px",r.xaxisTooltip.style.top=n+"px")}}},{key:"moveYAxisTooltip",value:function(t){var e=this.w,r=this.ttCtx;null===r.yaxisTTEls&&(r.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var i=parseInt(r.ycrosshairsHidden.getAttribute("y1"),10),n=e.globals.translateY+i,o=r.yaxisTTEls[t].getBoundingClientRect().height,a=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(a-=26),n-=o/2,-1===e.globals.ignoreYAxisIndexes.indexOf(t)?(r.yaxisTTEls[t].classList.add("apexcharts-active"),r.yaxisTTEls[t].style.top=n+"px",r.yaxisTTEls[t].style.left=a+e.config.yaxis[t].tooltip.offsetX+"px"):r.yaxisTTEls[t].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.w,n=this.ttCtx,o=n.getElTooltip(),a=n.tooltipRect,s=null!==r?parseFloat(r):1,l=parseFloat(t)+s+5,c=parseFloat(e)+s/2;if(l>i.globals.gridWidth/2&&(l=l-a.ttWidth-s-10),l>i.globals.gridWidth-a.ttWidth-10&&(l=i.globals.gridWidth-a.ttWidth),l<-20&&(l=-20),i.config.tooltip.followCursor){var u=n.getElGrid().getBoundingClientRect();(l=n.e.clientX-u.left)>i.globals.gridWidth/2&&(l-=n.tooltipRect.ttWidth),(c=n.e.clientY+i.globals.translateY-u.top)>i.globals.gridHeight/2&&(c-=n.tooltipRect.ttHeight)}else i.globals.isBarHorizontal||a.ttHeight/2+c>i.globals.gridHeight&&(c=i.globals.gridHeight-a.ttHeight+i.globals.translateY);isNaN(l)||(l+=i.globals.translateX,o.style.left=l+"px",o.style.top=c+"px")}},{key:"moveMarkers",value:function(t,e){var r=this.w,i=this.ttCtx;if(r.globals.markers.size[t]>0)for(var n=r.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-marker")),o=0;o<n.length;o++)parseInt(n[o].getAttribute("rel"),10)===e&&(i.marker.resetPointsSize(),i.marker.enlargeCurrentPoint(e,n[o]));else i.marker.resetPointsSize(),this.moveDynamicPointOnHover(e,t)}},{key:"moveDynamicPointOnHover",value:function(t,e){var r,i,n,o,a=this.w,s=this.ttCtx,l=new Pc(this.ctx),c=a.globals.pointsArray,u=s.tooltipUtil.getHoverMarkerSize(e),h=a.config.series[e].type;if(!h||"column"!==h&&"candlestick"!==h&&"boxPlot"!==h){n=null===(r=c[e][t])||void 0===r?void 0:r[0],o=(null===(i=c[e][t])||void 0===i?void 0:i[1])||0;var f=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-series-markers path"));if(f&&o<a.globals.gridHeight&&o>0){var d=f.getAttribute("shape"),p=l.getMarkerPath(n,o,d,1.5*u);f.setAttribute("d",p)}this.moveXCrosshairs(n),s.fixedTooltip||this.moveTooltip(n,o,u)}}},{key:"moveDynamicPointsOnHover",value:function(t){var e,r=this.ttCtx,i=r.w,n=0,o=0,a=i.globals.pointsArray,s=new fh(this.ctx),l=new Pc(this.ctx);e=s.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var c=r.tooltipUtil.getHoverMarkerSize(e);if(a[e]&&(n=a[e][t][0],o=a[e][t][1]),!isNaN(n)){var u=r.tooltipUtil.getAllMarkers();if(u.length)for(var h=0;h<i.globals.series.length;h++){var f=a[h];if(i.globals.comboCharts&&void 0===f&&u.splice(h,0,null),f&&f.length){var d=a[h][t][1],p=void 0;u[h].setAttribute("cx",n);var g=u[h].getAttribute("shape");if("rangeArea"===i.config.chart.type&&!i.globals.comboCharts){var b=t+i.globals.series[h].length;p=a[h][b][1],d-=Math.abs(d-p)/2}if(null!==d&&!isNaN(d)&&d<i.globals.gridHeight+c&&d+c>0){var y=l.getMarkerPath(n,d,g,c);u[h].setAttribute("d",y)}else u[h].setAttribute("d","")}}this.moveXCrosshairs(n),r.fixedTooltip||this.moveTooltip(n,o||i.globals.gridHeight,c)}}},{key:"moveStickyTooltipOverBars",value:function(t,e){var r=this.w,i=this.ttCtx,n=r.globals.columnSeries?r.globals.columnSeries.length:r.globals.series.length,o=n>=2&&n%2==0?Math.floor(n/2):Math.floor(n/2)+1;r.globals.isBarHorizontal&&(o=new fh(this.ctx).getActiveConfigSeriesIndex("desc")+1);var a=r.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(o,"'] path[j='").concat(t,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(o,"'] path[j='").concat(t,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(o,"'] path[j='").concat(t,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(o,"'] path[j='").concat(t,"']"));a||"number"!=typeof e||(a=r.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"']")));var s=a?parseFloat(a.getAttribute("cx")):0,l=a?parseFloat(a.getAttribute("cy")):0,c=a?parseFloat(a.getAttribute("barWidth")):0,u=i.getElGrid().getBoundingClientRect(),h=a&&(a.classList.contains("apexcharts-candlestick-area")||a.classList.contains("apexcharts-boxPlot-area"));r.globals.isXNumeric?(a&&!h&&(s-=n%2!=0?c/2:0),a&&h&&(s-=c/2)):r.globals.isBarHorizontal||(s=i.xAxisTicksPositions[t-1]+i.dataPointsDividedWidth/2,isNaN(s)&&(s=i.xAxisTicksPositions[t]-i.dataPointsDividedWidth/2)),r.globals.isBarHorizontal?l-=i.tooltipRect.ttHeight:r.config.tooltip.followCursor?l=i.e.clientY-u.top-i.tooltipRect.ttHeight/2:l+i.tooltipRect.ttHeight+15>r.globals.gridHeight&&(l=r.globals.gridHeight),r.globals.isBarHorizontal||this.moveXCrosshairs(s),i.fixedTooltip||this.moveTooltip(s,l||r.globals.gridHeight)}}],r&&Zd(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Qd(t){return Qd="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},Qd(t)}function Kd(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function tp(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,ep(i.key),i)}}function ep(t){var e=function(t){if("object"!=Qd(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Qd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qd(e)?e:e+""}var rp=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new Jd(e)}var e,r;return e=t,r=[{key:"drawDynamicPoints",value:function(){var t=this.w,e=new Pc(this.ctx),r=new Ku(this.ctx),i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series");i=function(t){return function(t){if(Array.isArray(t))return Kd(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Kd(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Kd(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(i),t.config.chart.stacked&&i.sort((function(t,e){return parseFloat(t.getAttribute("data:realIndex"))-parseFloat(e.getAttribute("data:realIndex"))}));for(var n=0;n<i.length;n++){var o=i[n].querySelector(".apexcharts-series-markers-wrap");if(null!==o){var a=void 0,s="apexcharts-marker w".concat((Math.random()+1).toString(36).substring(4));"line"!==t.config.chart.type&&"area"!==t.config.chart.type||t.globals.comboCharts||t.config.tooltip.intersect||(s+=" no-pointer-events");var l=r.getMarkerConfig({cssClass:s,seriesIndex:Number(o.getAttribute("data:realIndex"))});(a=e.drawMarker(0,0,l)).node.setAttribute("default-marker-size",0);var c=document.createElementNS(t.globals.SVGNS,"g");c.classList.add("apexcharts-series-markers"),c.appendChild(a.node),o.appendChild(c)}}}},{key:"enlargeCurrentPoint",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=this.w;"bubble"!==n.config.chart.type&&this.newPointSize(t,e);var o=e.getAttribute("cx"),a=e.getAttribute("cy");if(null!==r&&null!==i&&(o=r,a=i),this.tooltipPosition.moveXCrosshairs(o),!this.fixedTooltip){if("radar"===n.config.chart.type){var s=this.ttCtx.getElGrid().getBoundingClientRect();o=this.ttCtx.e.clientX-s.left}this.tooltipPosition.moveTooltip(o,a,n.config.markers.hover.size)}}},{key:"enlargePoints",value:function(t){for(var e=this.w,r=this,i=this.ttCtx,n=t,o=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),a=e.config.markers.hover.size,s=0;s<o.length;s++){var l=o[s].getAttribute("rel"),c=o[s].getAttribute("index");if(void 0===a&&(a=e.globals.markers.size[c]+e.config.markers.hover.sizeOffset),n===parseInt(l,10)){r.newPointSize(n,o[s]);var u=o[s].getAttribute("cx"),h=o[s].getAttribute("cy");r.tooltipPosition.moveXCrosshairs(u),i.fixedTooltip||r.tooltipPosition.moveTooltip(u,h,a)}else r.oldPointSize(o[s])}}},{key:"newPointSize",value:function(t,e){var r=this.w,i=r.config.markers.hover.size,n=0===t?e.parentNode.firstChild:e.parentNode.lastChild;if("0"!==n.getAttribute("default-marker-size")){var o=parseInt(n.getAttribute("index"),10);void 0===i&&(i=r.globals.markers.size[o]+r.config.markers.hover.sizeOffset),i<0&&(i=0);var a=this.ttCtx.tooltipUtil.getPathFromPoint(e,i);e.setAttribute("d",a)}}},{key:"oldPointSize",value:function(t){var e=parseFloat(t.getAttribute("default-marker-size")),r=this.ttCtx.tooltipUtil.getPathFromPoint(t,e);t.setAttribute("d",r)}},{key:"resetPointsSize",value:function(){for(var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),e=0;e<t.length;e++){var r=parseFloat(t[e].getAttribute("default-marker-size"));if(f.isNumber(r)&&r>0){var i=this.ttCtx.tooltipUtil.getPathFromPoint(t[e],r);t[e].setAttribute("d",i)}else t[e].setAttribute("d","M0,0")}}}],r&&tp(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ip(t){return ip="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},ip(t)}function np(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,op(i.key),i)}}function op(t){var e=function(t){if("object"!=ip(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ip(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ip(e)?e:e+""}var ap=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.w=e.w;var r=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!r.globals.isBarHorizontal&&"rangeBar"===r.config.chart.type&&r.config.plotOptions.bar.rangeBarGroupRows}var e,r;return e=t,r=[{key:"getAttr",value:function(t,e){return parseFloat(t.target.getAttribute(e))}},{key:"handleHeatTreeTooltip",value:function(t){var e=t.e,r=t.opt,i=t.x,n=t.y,o=t.type,a=this.ttCtx,s=this.w;if(e.target.classList.contains("apexcharts-".concat(o,"-rect"))){var l=this.getAttr(e,"i"),c=this.getAttr(e,"j"),u=this.getAttr(e,"cx"),h=this.getAttr(e,"cy"),f=this.getAttr(e,"width"),d=this.getAttr(e,"height");if(a.tooltipLabels.drawSeriesTexts({ttItems:r.ttItems,i:l,j:c,shared:!1,e}),s.globals.capturedSeriesIndex=l,s.globals.capturedDataPointIndex=c,i=u+a.tooltipRect.ttWidth/2+f,n=h+a.tooltipRect.ttHeight/2-d/2,a.tooltipPosition.moveXCrosshairs(u+f/2),i>s.globals.gridWidth/2&&(i=u-a.tooltipRect.ttWidth/2+f),a.w.config.tooltip.followCursor){var p=s.globals.dom.elWrap.getBoundingClientRect();i=s.globals.clientX-p.left-(i>s.globals.gridWidth/2?a.tooltipRect.ttWidth:0),n=s.globals.clientY-p.top-(n>s.globals.gridHeight/2?a.tooltipRect.ttHeight:0)}}return{x:i,y:n}}},{key:"handleMarkerTooltip",value:function(t){var e,r,i=t.e,n=t.opt,o=t.x,a=t.y,s=this.w,l=this.ttCtx;if(i.target.classList.contains("apexcharts-marker")){var c=parseInt(n.paths.getAttribute("cx"),10),u=parseInt(n.paths.getAttribute("cy"),10),h=parseFloat(n.paths.getAttribute("val"));if(r=parseInt(n.paths.getAttribute("rel"),10),e=parseInt(n.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var d=f.findAncestor(n.paths,"apexcharts-series");d&&(e=parseInt(d.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:e,j:r,shared:!l.showOnIntersect&&s.config.tooltip.shared,e:i}),"mouseup"===i.type&&l.markerClick(i,e,r),s.globals.capturedSeriesIndex=e,s.globals.capturedDataPointIndex=r,o=c,a=u+s.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var p=l.getElGrid().getBoundingClientRect();a=l.e.clientY+s.globals.translateY-p.top}h<0&&(a=u),l.marker.enlargeCurrentPoint(r,n.paths,o,a)}return{x:o,y:a}}},{key:"handleBarTooltip",value:function(t){var e,r,i=t.e,n=t.opt,o=this.w,a=this.ttCtx,s=a.getElTooltip(),l=0,c=0,u=0,h=this.getBarTooltipXY({e:i,opt:n});if(null!==h.j||0!==h.barHeight||0!==h.barWidth){e=h.i;var f=h.j;if(o.globals.capturedSeriesIndex=e,o.globals.capturedDataPointIndex=f,o.globals.isBarHorizontal&&a.tooltipUtil.hasBars()||!o.config.tooltip.shared?(c=h.x,u=h.y,r=Array.isArray(o.config.stroke.width)?o.config.stroke.width[e]:o.config.stroke.width,l=c):o.globals.comboCharts||o.config.tooltip.shared||(l/=2),isNaN(u)&&(u=o.globals.svgHeight-a.tooltipRect.ttHeight),parseInt(n.paths.parentNode.getAttribute("data:realIndex"),10),c+a.tooltipRect.ttWidth>o.globals.gridWidth?c-=a.tooltipRect.ttWidth:c<0&&(c=0),a.w.config.tooltip.followCursor){var d=a.getElGrid().getBoundingClientRect();u=a.e.clientY-d.top}null===a.tooltip&&(a.tooltip=o.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),o.config.tooltip.shared||(o.globals.comboBarCount>0?a.tooltipPosition.moveXCrosshairs(l+r/2):a.tooltipPosition.moveXCrosshairs(l)),!a.fixedTooltip&&(!o.config.tooltip.shared||o.globals.isBarHorizontal&&a.tooltipUtil.hasBars())&&(u=u+o.globals.translateY-a.tooltipRect.ttHeight/2,s.style.left=c+o.globals.translateX+"px",s.style.top=u+"px")}}},{key:"getBarTooltipXY",value:function(t){var e=this,r=t.e,i=t.opt,n=this.w,o=null,a=this.ttCtx,s=0,l=0,c=0,u=0,h=0,f=r.target.classList;if(f.contains("apexcharts-bar-area")||f.contains("apexcharts-candlestick-area")||f.contains("apexcharts-boxPlot-area")||f.contains("apexcharts-rangebar-area")){var d=r.target,p=d.getBoundingClientRect(),g=i.elGrid.getBoundingClientRect(),b=p.height;h=p.height;var y=p.width,v=parseInt(d.getAttribute("cx"),10),m=parseInt(d.getAttribute("cy"),10);u=parseFloat(d.getAttribute("barWidth"));var x="touchmove"===r.type?r.touches[0].clientX:r.clientX;o=parseInt(d.getAttribute("j"),10),s=parseInt(d.parentNode.getAttribute("rel"),10)-1;var w=d.getAttribute("data-range-y1"),S=d.getAttribute("data-range-y2");n.globals.comboCharts&&(s=parseInt(d.parentNode.getAttribute("data:realIndex"),10));var k=function(t){return n.globals.isXNumeric?v-y/2:e.isVerticalGroupedRangeBar?v+y/2:v-a.dataPointsDividedWidth+y/2},A=function(){return m-a.dataPointsDividedHeight+b/2-a.tooltipRect.ttHeight/2};a.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:s,j:o,y1:w?parseInt(w,10):null,y2:S?parseInt(S,10):null,shared:!a.showOnIntersect&&n.config.tooltip.shared,e:r}),n.config.tooltip.followCursor?n.globals.isBarHorizontal?(l=x-g.left+15,c=A()):(l=k(),c=r.clientY-g.top-a.tooltipRect.ttHeight/2-15):n.globals.isBarHorizontal?((l=v)<a.xyRatios.baseLineInvertedY&&(l=v-a.tooltipRect.ttWidth),c=A()):(l=k(),c=m)}return{x:l,y:c,barHeight:h,barWidth:u,i:s,j:o}}}],r&&np(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const sp=ap;function lp(t){return lp="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},lp(t)}function cp(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,up(i.key),i)}}function up(t){var e=function(t){if("object"!=lp(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=lp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==lp(e)?e:e+""}var hp=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.w=e.w,this.ttCtx=e}var e,r;return e=t,r=[{key:"drawXaxisTooltip",value:function(){var t=this.w,e=this.ttCtx,r="bottom"===t.config.xaxis.position;e.xaxisOffY=r?t.globals.gridHeight+1:-t.globals.xAxisHeight-t.config.xaxis.axisTicks.height+3;var i=r?"apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom":"apexcharts-xaxistooltip apexcharts-xaxistooltip-top",n=t.globals.dom.elWrap;e.isXAxisTooltipEnabled&&null===t.globals.dom.baseEl.querySelector(".apexcharts-xaxistooltip")&&(e.xaxisTooltip=document.createElement("div"),e.xaxisTooltip.setAttribute("class",i+" apexcharts-theme-"+t.config.tooltip.theme),n.appendChild(e.xaxisTooltip),e.xaxisTooltipText=document.createElement("div"),e.xaxisTooltipText.classList.add("apexcharts-xaxistooltip-text"),e.xaxisTooltipText.style.fontFamily=t.config.xaxis.tooltip.style.fontFamily||t.config.chart.fontFamily,e.xaxisTooltipText.style.fontSize=t.config.xaxis.tooltip.style.fontSize,e.xaxisTooltip.appendChild(e.xaxisTooltipText))}},{key:"drawYaxisTooltip",value:function(){for(var t=this.w,e=this.ttCtx,r=0;r<t.config.yaxis.length;r++){var i=t.config.yaxis[r].opposite||t.config.yaxis[r].crosshairs.opposite;e.yaxisOffX=i?t.globals.gridWidth+1:1;var n="apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(r,i?" apexcharts-yaxistooltip-right":" apexcharts-yaxistooltip-left"),o=t.globals.dom.elWrap;null===t.globals.dom.baseEl.querySelector(".apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(r))&&(e.yaxisTooltip=document.createElement("div"),e.yaxisTooltip.setAttribute("class",n+" apexcharts-theme-"+t.config.tooltip.theme),o.appendChild(e.yaxisTooltip),0===r&&(e.yaxisTooltipText=[]),e.yaxisTooltipText[r]=document.createElement("div"),e.yaxisTooltipText[r].classList.add("apexcharts-yaxistooltip-text"),e.yaxisTooltip.appendChild(e.yaxisTooltipText[r]))}}},{key:"setXCrosshairWidth",value:function(){var t=this.w,e=this.ttCtx,r=e.getElXCrosshairs();if(e.xcrosshairsWidth=parseInt(t.config.xaxis.crosshairs.width,10),t.globals.comboCharts){var i=t.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(null!==i&&"barWidth"===t.config.xaxis.crosshairs.width){var n=parseFloat(i.getAttribute("barWidth"));e.xcrosshairsWidth=n}else if("tickWidth"===t.config.xaxis.crosshairs.width){var o=t.globals.labels.length;e.xcrosshairsWidth=t.globals.gridWidth/o}}else if("tickWidth"===t.config.xaxis.crosshairs.width){var a=t.globals.labels.length;e.xcrosshairsWidth=t.globals.gridWidth/a}else if("barWidth"===t.config.xaxis.crosshairs.width){var s=t.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(null!==s){var l=parseFloat(s.getAttribute("barWidth"));e.xcrosshairsWidth=l}else e.xcrosshairsWidth=1}t.globals.isBarHorizontal&&(e.xcrosshairsWidth=0),null!==r&&e.xcrosshairsWidth>0&&r.setAttribute("width",e.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var t=this.w,e=this.ttCtx;e.ycrosshairs=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(t,e,r){var i=this.ttCtx,n=this.w,o=n.globals,a=o.seriesYAxisMap[t];if(i.yaxisTooltips[t]&&a.length>0){var s=o.yLabelFormatters[t],l=i.getElGrid().getBoundingClientRect(),c=a[0],u=0;r.yRatio.length>1&&(u=c);var h=(e-l.top)*r.yRatio[u],f=o.maxYArr[c]-o.minYArr[c],d=o.minYArr[c]+(f-h);n.config.yaxis[t].reversed&&(d=o.maxYArr[c]-(f-h)),i.tooltipPosition.moveYCrosshairs(e-l.top),i.yaxisTooltipText[t].innerHTML=s(d),i.tooltipPosition.moveYAxisTooltip(t)}}}],r&&cp(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const fp=hp;function dp(t){return dp="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},dp(t)}function pp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function gp(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pp(Object(r),!0).forEach((function(e){bp(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pp(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function bp(t,e,r){return(e=vp(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yp(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,vp(i.key),i)}}function vp(t){var e=function(t){if("object"!=dp(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=dp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==dp(e)?e:e+""}var mp=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w;var r=this.w;this.tConfig=r.config.tooltip,this.tooltipUtil=new Hd(this),this.tooltipLabels=new Ud(this),this.tooltipPosition=new Jd(this),this.marker=new rp(this),this.intersect=new sp(this),this.axesTooltip=new fp(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!r.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}var e,r;return e=t,r=[{key:"getElTooltip",value:function(t){return t||(t=this),t.w.globals.dom.baseEl?t.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(t){var e=this.w;this.xyRatios=t,this.isXAxisTooltipEnabled=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.yaxisTooltips=e.config.yaxis.map((function(t,r){return!!(t.show&&t.tooltip.enabled&&e.globals.axisCharts)})),this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);var r=document.createElement("div");if(r.classList.add("apexcharts-tooltip"),e.config.tooltip.cssClass&&r.classList.add(e.config.tooltip.cssClass),r.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),e.globals.dom.elWrap.appendChild(r),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var i=new jh(this.ctx);this.xAxisTicksPositions=i.getXAxisTicksPositions()}if(!e.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==e.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==e.config.markers.size&&0!==e.globals.markers.largestSize||this.marker.drawDynamicPoints(this),e.globals.collapsedSeries.length!==e.globals.series.length){this.dataPointsDividedHeight=e.globals.gridHeight/e.globals.dataPoints,this.dataPointsDividedWidth=e.globals.gridWidth/e.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,r.appendChild(this.tooltipTitle));var n=e.globals.series.length;(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(n=this.showOnIntersect?1:e.globals.series.length),this.legendLabels=e.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(n),this.addSVGEvents()}}},{key:"createTTElements",value:function(t){for(var e=this,r=this.w,i=[],n=this.getElTooltip(),o=function(o){var a=document.createElement("div");a.classList.add("apexcharts-tooltip-series-group","apexcharts-tooltip-series-group-".concat(o)),a.style.order=r.config.tooltip.inverseOrder?t-o:o+1;var s=document.createElement("span");s.classList.add("apexcharts-tooltip-marker"),s.style.backgroundColor=r.globals.colors[o],a.appendChild(s);var l=document.createElement("div");l.classList.add("apexcharts-tooltip-text"),l.style.fontFamily=e.tConfig.style.fontFamily||r.config.chart.fontFamily,l.style.fontSize=e.tConfig.style.fontSize,["y","goals","z"].forEach((function(t){var e=document.createElement("div");e.classList.add("apexcharts-tooltip-".concat(t,"-group"));var r=document.createElement("span");r.classList.add("apexcharts-tooltip-text-".concat(t,"-label")),e.appendChild(r);var i=document.createElement("span");i.classList.add("apexcharts-tooltip-text-".concat(t,"-value")),e.appendChild(i),l.appendChild(e)})),a.appendChild(l),n.appendChild(a),i.push(a)},a=0;a<t;a++)o(a);return i}},{key:"addSVGEvents",value:function(){var t=this.w,e=t.config.chart.type,r=this.getElTooltip(),i=!("bar"!==e&&"candlestick"!==e&&"boxPlot"!==e&&"rangeBar"!==e),n="area"===e||"line"===e||"scatter"===e||"bubble"===e||"radar"===e,o=t.globals.dom.Paper.node,a=this.getElGrid();a&&(this.seriesBound=a.getBoundingClientRect());var s,l=[],c=[],u={hoverArea:o,elGrid:a,tooltipEl:r,tooltipY:l,tooltipX:c,ttItems:this.ttItems};if(t.globals.axisCharts&&(n?s=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):i?s=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-rangebar-area"):"heatmap"!==e&&"treemap"!==e||(s=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap")),s&&s.length))for(var h=0;h<s.length;h++)l.push(s[h].getAttribute("cy")),c.push(s[h].getAttribute("cx"));if(t.globals.xyCharts&&!this.showOnIntersect||t.globals.comboCharts&&!this.showOnIntersect||i&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([o],u);else if(i&&!t.globals.comboCharts||n&&this.showOnIntersect)this.addDatapointEventsListeners(u);else if(!t.globals.axisCharts||"heatmap"===e||"treemap"===e){var f=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series");this.addPathsEventListeners(f,u)}if(this.showOnIntersect){var d=t.globals.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker");d.length>0&&this.addPathsEventListeners(d,u),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(u)}}},{key:"drawFixedTooltipRect",value:function(){var t=this.w,e=this.getElTooltip(),r=e.getBoundingClientRect(),i=r.width+10,n=r.height+10,o=this.tConfig.fixed.offsetX,a=this.tConfig.fixed.offsetY,s=this.tConfig.fixed.position.toLowerCase();return s.indexOf("right")>-1&&(o=o+t.globals.svgWidth-i+10),s.indexOf("bottom")>-1&&(a=a+t.globals.svgHeight-n-10),e.style.left=o+"px",e.style.top=a+"px",{x:o,y:a,ttWidth:i,ttHeight:n}}},{key:"addDatapointEventsListeners",value:function(t){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(e,t)}},{key:"addPathsEventListeners",value:function(t,e){for(var r=this,i=function(i){var n={paths:t[i],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(e){return t[i].addEventListener(e,r.onSeriesHover.bind(r,n),{capture:!1,passive:!0})}))},n=0;n<t.length;n++)i(n)}},{key:"onSeriesHover",value:function(t,e){var r=this,i=Date.now()-this.lastHoverTime;i>=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout((function(){r.seriesHover(t,e)}),20-i))}},{key:"seriesHover",value:function(t,e){var r=this;this.lastHoverTime=Date.now();var i=[],n=this.w;n.config.chart.group&&(i=this.ctx.getGroupedCharts()),n.globals.axisCharts&&(n.globals.minX===-1/0&&n.globals.maxX===1/0||0===n.globals.dataPoints)||(i.length?i.forEach((function(i){var n=r.getElTooltip(i),o={paths:t.paths,tooltipEl:n,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:i.w.globals.tooltip.ttItems};i.w.globals.minX===r.w.globals.minX&&i.w.globals.maxX===r.w.globals.maxX&&i.w.globals.tooltip.seriesHoverByContext({chartCtx:i,ttCtx:i.w.globals.tooltip,opt:o,e})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e}))}},{key:"seriesHoverByContext",value:function(t){var e=t.chartCtx,r=t.ttCtx,i=t.opt,n=t.e,o=e.w,a=this.getElTooltip(e);a&&(r.tooltipRect={x:0,y:0,ttWidth:a.getBoundingClientRect().width,ttHeight:a.getBoundingClientRect().height},r.e=n,!r.tooltipUtil.hasBars()||o.globals.comboCharts||r.isBarShared||this.tConfig.onDatasetHover.highlightDataSeries&&new fh(e).toggleSeriesOnHover(n,n.target.parentNode),r.fixedTooltip&&r.drawFixedTooltipRect(),o.globals.axisCharts?r.axisChartsTooltips({e:n,opt:i,tooltipRect:r.tooltipRect}):r.nonAxisChartsTooltips({e:n,opt:i,tooltipRect:r.tooltipRect}))}},{key:"axisChartsTooltips",value:function(t){var e,r,i=t.e,n=t.opt,o=this.w,a=n.elGrid.getBoundingClientRect(),s="touchmove"===i.type?i.touches[0].clientX:i.clientX,l="touchmove"===i.type?i.touches[0].clientY:i.clientY;if(this.clientY=l,this.clientX=s,o.globals.capturedSeriesIndex=-1,o.globals.capturedDataPointIndex=-1,l<a.top||l>a.top+a.height)this.handleMouseOut(n);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!o.config.tooltip.shared){var c=parseInt(n.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(c)<0)return void this.handleMouseOut(n)}var u=this.getElTooltip(),h=this.getElXCrosshairs(),f=[];o.config.chart.group&&(f=this.ctx.getSyncedCharts());var d=o.globals.xyCharts||"bar"===o.config.chart.type&&!o.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||o.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===i.type||"touchmove"===i.type||"mouseup"===i.type){if(o.globals.collapsedSeries.length+o.globals.ancillaryCollapsedSeries.length===o.globals.series.length)return;null!==h&&h.classList.add("apexcharts-active");var p=this.yaxisTooltips.filter((function(t){return!0===t}));if(null!==this.ycrosshairs&&p.length&&this.ycrosshairs.classList.add("apexcharts-active"),d&&!this.showOnIntersect||f.length>1)this.handleStickyTooltip(i,s,l,n);else if("heatmap"===o.config.chart.type||"treemap"===o.config.chart.type){var g=this.intersect.handleHeatTreeTooltip({e:i,opt:n,x:e,y:r,type:o.config.chart.type});e=g.x,r=g.y,u.style.left=e+"px",u.style.top=r+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:i,opt:n}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:i,opt:n,x:e,y:r});if(this.yaxisTooltips.length)for(var b=0;b<o.config.yaxis.length;b++)this.axesTooltip.drawYaxisTooltipText(b,l,this.xyRatios);o.globals.dom.baseEl.classList.add("apexcharts-tooltip-active"),n.tooltipEl.classList.add("apexcharts-active")}else"mouseout"!==i.type&&"touchend"!==i.type||this.handleMouseOut(n)}}},{key:"nonAxisChartsTooltips",value:function(t){var e=t.e,r=t.opt,i=t.tooltipRect,n=this.w,o=r.paths.getAttribute("rel"),a=this.getElTooltip(),s=n.globals.dom.elWrap.getBoundingClientRect();if("mousemove"===e.type||"touchmove"===e.type){n.globals.dom.baseEl.classList.add("apexcharts-tooltip-active"),a.classList.add("apexcharts-active"),this.tooltipLabels.drawSeriesTexts({ttItems:r.ttItems,i:parseInt(o,10)-1,shared:!1});var l=n.globals.clientX-s.left-i.ttWidth/2,c=n.globals.clientY-s.top-i.ttHeight-10;if(a.style.left=l+"px",a.style.top=c+"px",n.config.legend.tooltipHoverFormatter){var u=o-1,h=(0,n.config.legend.tooltipHoverFormatter)(this.legendLabels[u].getAttribute("data:default-text"),{seriesIndex:u,dataPointIndex:u,w:n});this.legendLabels[u].innerHTML=h}}else"mouseout"!==e.type&&"touchend"!==e.type||(a.classList.remove("apexcharts-active"),n.globals.dom.baseEl.classList.remove("apexcharts-tooltip-active"),n.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)})))}},{key:"handleStickyTooltip",value:function(t,e,r,i){var n=this.w,o=this.tooltipUtil.getNearestValues({context:this,hoverArea:i.hoverArea,elGrid:i.elGrid,clientX:e,clientY:r}),a=o.j,s=o.capturedSeries;n.globals.collapsedSeriesIndices.includes(s)&&(s=null);var l=i.elGrid.getBoundingClientRect();if(o.hoverX<0||o.hoverX>l.width)this.handleMouseOut(i);else if(null!==s)this.handleStickyCapturedSeries(t,s,i,a);else if(this.tooltipUtil.isXoverlap(a)||n.globals.isBarHorizontal){var c=n.globals.series.findIndex((function(t,e){return!n.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,c,a,i.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(t,e,r,i){var n=this.w;if(this.tConfig.shared||null!==n.globals.series[e][i]){if(void 0!==n.globals.series[e][i])this.tConfig.shared&&this.tooltipUtil.isXoverlap(i)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,i,r.ttItems):this.create(t,this,e,i,r.ttItems,!1);else if(this.tooltipUtil.isXoverlap(i)){var o=n.globals.series.findIndex((function(t,e){return!n.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,o,i,r.ttItems)}}else this.handleMouseOut(r)}},{key:"deactivateHoverFilter",value:function(){for(var t=this.w,e=new Pc(this.ctx),r=t.globals.dom.Paper.find(".apexcharts-bar-area"),i=0;i<r.length;i++)e.pathMouseLeave(r[i])}},{key:"handleMouseOut",value:function(t){var e=this.w,r=this.getElXCrosshairs();if(e.globals.dom.baseEl.classList.remove("apexcharts-tooltip-active"),t.tooltipEl.classList.remove("apexcharts-active"),this.deactivateHoverFilter(),"bubble"!==e.config.chart.type&&this.marker.resetPointsSize(),null!==r&&r.classList.remove("apexcharts-active"),null!==this.ycrosshairs&&this.ycrosshairs.classList.remove("apexcharts-active"),this.isXAxisTooltipEnabled&&this.xaxisTooltip.classList.remove("apexcharts-active"),this.yaxisTooltips.length){null===this.yaxisTTEls&&(this.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));for(var i=0;i<this.yaxisTTEls.length;i++)this.yaxisTTEls[i].classList.remove("apexcharts-active")}e.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}))}},{key:"markerClick",value:function(t,e,r){var i=this.w;"function"==typeof i.config.chart.events.markerClick&&i.config.chart.events.markerClick(t,this.ctx,{seriesIndex:e,dataPointIndex:r,w:i}),this.ctx.events.fireEvent("markerClick",[t,this.ctx,{seriesIndex:e,dataPointIndex:r,w:i}])}},{key:"create",value:function(t,e,r,i,n){var o,a,s,l,c,u,h,f,d,p,g,b,y,v,m,x,w=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,S=this.w,k=e;"mouseup"===t.type&&this.markerClick(t,r,i),null===w&&(w=this.tConfig.shared);var A=this.tooltipUtil.hasMarkers(r),O=this.tooltipUtil.getElBars(),P=function(){S.globals.markers.largestSize>0?k.marker.enlargePoints(i):k.tooltipPosition.moveDynamicPointsOnHover(i)};if(S.config.legend.tooltipHoverFormatter){var C=S.config.legend.tooltipHoverFormatter,j=Array.from(this.legendLabels);j.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}));for(var T=0;T<j.length;T++){var E=j[T],M=parseInt(E.getAttribute("i"),10),L=decodeURIComponent(E.getAttribute("data:default-text")),I=C(L,{seriesIndex:w?M:r,dataPointIndex:i,w:S});if(w)E.innerHTML=S.globals.collapsedSeriesIndices.indexOf(M)<0?I:L;else if(E.innerHTML=M===r?I:L,r===M)break}}var _=gp(gp({ttItems:n,i:r,j:i},void 0!==(null===(o=S.globals.seriesRange)||void 0===o||null===(a=o[r])||void 0===a||null===(s=a[i])||void 0===s||null===(l=s.y[0])||void 0===l?void 0:l.y1)&&{y1:null===(c=S.globals.seriesRange)||void 0===c||null===(u=c[r])||void 0===u||null===(h=u[i])||void 0===h||null===(f=h.y[0])||void 0===f?void 0:f.y1}),void 0!==(null===(d=S.globals.seriesRange)||void 0===d||null===(p=d[r])||void 0===p||null===(g=p[i])||void 0===g||null===(b=g.y[0])||void 0===b?void 0:b.y2)&&{y2:null===(y=S.globals.seriesRange)||void 0===y||null===(v=y[r])||void 0===v||null===(m=v[i])||void 0===m||null===(x=m.y[0])||void 0===x?void 0:x.y2});if(w){if(k.tooltipLabels.drawSeriesTexts(gp(gp({},_),{},{shared:!this.showOnIntersect&&this.tConfig.shared})),A)P();else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(O),this.barSeriesHeight>0)){var R=new Pc(this.ctx),z=S.globals.dom.Paper.find(".apexcharts-bar-area[j='".concat(i,"']"));this.deactivateHoverFilter(),k.tooltipPosition.moveStickyTooltipOverBars(i,r),k.tooltipUtil.getAllMarkers(!0).length&&P();for(var X=0;X<z.length;X++)R.pathMouseEnter(z[X])}}else k.tooltipLabels.drawSeriesTexts(gp({shared:!1},_)),this.tooltipUtil.hasBars()&&k.tooltipPosition.moveStickyTooltipOverBars(i,r),A&&k.tooltipPosition.moveMarkers(r,i)}}],r&&yp(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function xp(t){return xp="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},xp(t)}function wp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Sp(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?wp(Object(r),!0).forEach((function(e){kp(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wp(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function kp(t,e,r){return(e=Op(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ap(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Op(i.key),i)}}function Op(t){var e=function(t){if("object"!=xp(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=xp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xp(e)?e:e+""}var Pp=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.w=e.w,this.barCtx=e,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||(this.totalFormatter=this.w.config.dataLabels.formatter)}var e,r;return e=t,r=[{key:"handleBarDataLabels",value:function(t){var e,r,i=t.x,n=t.y,o=t.y1,a=t.y2,s=t.i,l=t.j,c=t.realIndex,u=t.columnGroupIndex,h=t.series,f=t.barHeight,d=t.barWidth,p=t.barXPosition,g=t.barYPosition,b=t.visibleSeries,y=t.renderedPath,v=this.w,m=new Pc(this.barCtx.ctx),x=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[c]:this.barCtx.strokeWidth;v.globals.isXNumeric&&!v.globals.isBarHorizontal?(e=i+parseFloat(d*(b+1)),r=n+parseFloat(f*(b+1))-x):(e=i+parseFloat(d*b),r=n+parseFloat(f*b));var w,S,k=null,A=i,O=n,P=v.config.dataLabels,C=this.barCtx.barOptions.dataLabels,j=this.barCtx.barOptions.dataLabels.total;void 0!==g&&this.barCtx.isRangeBar&&(r=g,O=g),void 0!==p&&this.barCtx.isVerticalGroupedRangeBar&&(e=p,A=p);var T=P.offsetX,E=P.offsetY,M={width:0,height:0};if(v.config.dataLabels.enabled){var L=v.globals.series[s][l];M=m.getTextRects(v.config.dataLabels.formatter?v.config.dataLabels.formatter(L,Sp(Sp({},v),{},{seriesIndex:s,dataPointIndex:l,w:v})):v.globals.yLabelFormatters[0](L),parseFloat(P.style.fontSize))}var I={x:i,y:n,i:s,j:l,realIndex:c,columnGroupIndex:u,renderedPath:y,bcx:e,bcy:r,barHeight:f,barWidth:d,textRects:M,strokeWidth:x,dataLabelsX:A,dataLabelsY:O,dataLabelsConfig:P,barDataLabelsConfig:C,barTotalDataLabelsConfig:j,offX:T,offY:E};return S=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(I):this.calculateColumnsDataLabelsPosition(I),y.attr({cy:S.bcy,cx:S.bcx,j:l,val:v.globals.series[s][l],barHeight:f,barWidth:d}),w=this.drawCalculatedDataLabels({x:S.dataLabelsX,y:S.dataLabelsY,val:this.barCtx.isRangeBar?[o,a]:"100%"===v.config.chart.stackType?h[c][l]:v.globals.series[c][l],i:c,j:l,barWidth:d,barHeight:f,textRects:M,dataLabelsConfig:P}),v.config.chart.stacked&&j.enabled&&(k=this.drawTotalDataLabels({x:S.totalDataLabelsX,y:S.totalDataLabelsY,barWidth:d,barHeight:f,realIndex:c,textAnchor:S.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:c,j:l}),dataLabelsConfig:P,barTotalDataLabelsConfig:j})),{dataLabels:w,totalDataLabels:k}}},{key:"getStackedTotalDataLabel",value:function(t){var e=t.realIndex,r=t.j,i=this.w,n=this.barCtx.stackedSeriesTotals[r];return this.totalFormatter&&(n=this.totalFormatter(n,Sp(Sp({},i),{},{seriesIndex:e,dataPointIndex:r,w:i}))),n}},{key:"calculateColumnsDataLabelsPosition",value:function(t){var e,r,i=this.w,n=t.i,o=t.j,a=t.realIndex,s=(t.columnGroupIndex,t.y),l=t.bcx,c=t.barWidth,u=t.barHeight,h=t.textRects,f=t.dataLabelsX,d=t.dataLabelsY,p=t.dataLabelsConfig,g=t.barDataLabelsConfig,b=t.barTotalDataLabelsConfig,y=t.strokeWidth,v=t.offX,m=t.offY,x=l;u=Math.abs(u);var w="vertical"===i.config.plotOptions.bar.dataLabels.orientation,S=this.barCtx.barHelpers.getZeroValueEncounters({i:n,j:o}).zeroEncounters;l-=y/2;var k=i.globals.gridWidth/i.globals.dataPoints;this.barCtx.isVerticalGroupedRangeBar?f+=c/2:(f=i.globals.isXNumeric?l-c/2+v:l-k+c/2+v,S>0&&i.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(f-=c*S)),w&&(f=f+h.height/2-y/2-2);var A=i.globals.series[n][o]<0,O=s;switch(this.barCtx.isReversed&&(O=s+(A?u:-u)),g.position){case"center":d=w?A?O-u/2+m:O+u/2-m:A?O-u/2+h.height/2+m:O+u/2+h.height/2-m;break;case"bottom":d=w?A?O-u+m:O+u-m:A?O-u+h.height+y+m:O+u-h.height/2+y-m;break;case"top":d=w?A?O+m:O-m:A?O-h.height/2-m:O+h.height+m}if(this.barCtx.lastActiveBarSerieIndex===a&&b.enabled){var P=new Pc(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:a,j:o}),p.fontSize);e=A?O-P.height/2-m-b.offsetY+18:O+P.height+m+b.offsetY-18;var C=k;r=x+(i.globals.isXNumeric?-c*i.globals.barGroups.length/2:i.globals.barGroups.length*c/2-(i.globals.barGroups.length-1)*c-C)+b.offsetX}return i.config.chart.stacked||(d<0?d=0+y:d+h.height/3>i.globals.gridHeight&&(d=i.globals.gridHeight-y)),{bcx:l,bcy:s,dataLabelsX:f,dataLabelsY:d,totalDataLabelsX:r,totalDataLabelsY:e,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(t){var e=this.w,r=t.x,i=t.i,n=t.j,o=t.realIndex,a=t.bcy,s=t.barHeight,l=t.barWidth,c=t.textRects,u=t.dataLabelsX,h=t.strokeWidth,f=t.dataLabelsConfig,d=t.barDataLabelsConfig,p=t.barTotalDataLabelsConfig,g=t.offX,b=t.offY,y=e.globals.gridHeight/e.globals.dataPoints;l=Math.abs(l);var v,m,x=a-(this.barCtx.isRangeBar?0:y)+s/2+c.height/2+b-3,w="start",S=e.globals.series[i][n]<0,k=r;switch(this.barCtx.isReversed&&(k=r+(S?-l:l),w=S?"start":"end"),d.position){case"center":u=S?k+l/2-g:Math.max(c.width/2,k-l/2)+g;break;case"bottom":u=S?k+l-h-g:k-l+h+g;break;case"top":u=S?k-h-g:k-h+g}if(this.barCtx.lastActiveBarSerieIndex===o&&p.enabled){var A=new Pc(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:n}),f.fontSize);S?(v=k-h-g-p.offsetX,w="end"):v=k+g+p.offsetX+(this.barCtx.isReversed?-(l+h):h),m=x-c.height/2+A.height/2+p.offsetY+h}return e.config.chart.stacked||("start"===f.textAnchor?u-c.width<0?u=S?c.width+h:h:u+c.width>e.globals.gridWidth&&(u=S?e.globals.gridWidth-h:e.globals.gridWidth-c.width-h):"middle"===f.textAnchor?u-c.width/2<0?u=c.width/2+h:u+c.width/2>e.globals.gridWidth&&(u=e.globals.gridWidth-c.width/2-h):"end"===f.textAnchor&&(u<1?u=c.width+h:u+1>e.globals.gridWidth&&(u=e.globals.gridWidth-c.width-h))),{bcx:r,bcy:a,dataLabelsX:u,dataLabelsY:x,totalDataLabelsX:v,totalDataLabelsY:m,totalDataLabelsAnchor:w}}},{key:"drawCalculatedDataLabels",value:function(t){var e=t.x,r=t.y,i=t.val,n=t.i,o=t.j,a=t.textRects,s=t.barHeight,l=t.barWidth,c=t.dataLabelsConfig,u=this.w,h="rotate(0)";"vertical"===u.config.plotOptions.bar.dataLabels.orientation&&(h="rotate(-90, ".concat(e,", ").concat(r,")"));var f=new lh(this.barCtx.ctx),d=new Pc(this.barCtx.ctx),p=c.formatter,g=null,b=u.globals.collapsedSeriesIndices.indexOf(n)>-1;if(c.enabled&&!b){g=d.group({class:"apexcharts-data-labels",transform:h});var y="";void 0!==i&&(y=p(i,Sp(Sp({},u),{},{seriesIndex:n,dataPointIndex:o,w:u}))),!i&&u.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(y="");var v=u.globals.series[n][o]<0,m=u.config.plotOptions.bar.dataLabels.position;"vertical"===u.config.plotOptions.bar.dataLabels.orientation&&("top"===m&&(c.textAnchor=v?"end":"start"),"center"===m&&(c.textAnchor="middle"),"bottom"===m&&(c.textAnchor=v?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&l<d.getTextRects(y,parseFloat(c.style.fontSize)).width&&(y=""),u.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?a.width/1.6>Math.abs(l)&&(y=""):a.height/1.6>Math.abs(s)&&(y=""));var x=Sp({},c);this.barCtx.isHorizontal&&i<0&&("start"===c.textAnchor?x.textAnchor="end":"end"===c.textAnchor&&(x.textAnchor="start")),f.plotDataLabelsText({x:e,y:r,text:y,i:n,j:o,parent:g,dataLabelsConfig:x,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return g}},{key:"drawTotalDataLabels",value:function(t){var e,r=t.x,i=t.y,n=t.val,o=t.realIndex,a=t.textAnchor,s=t.barTotalDataLabelsConfig,l=(this.w,new Pc(this.barCtx.ctx));return s.enabled&&void 0!==r&&void 0!==i&&this.barCtx.lastActiveBarSerieIndex===o&&(e=l.drawText({x:r,y:i,foreColor:s.style.color,text:n,textAnchor:a,fontFamily:s.style.fontFamily,fontSize:s.style.fontSize,fontWeight:s.style.fontWeight})),e}}],r&&Ap(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Cp(t){return Cp="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},Cp(t)}function jp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Tp(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?jp(Object(r),!0).forEach((function(e){Ep(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jp(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ep(t,e,r){return(e=_p(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mp(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return Lp(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Lp(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function Lp(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function Ip(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,_p(i.key),i)}}function _p(t){var e=function(t){if("object"!=Cp(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Cp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Cp(e)?e:e+""}var Rp=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.w=e.w,this.barCtx=e}var e,r;return e=t,r=[{key:"initVariables",value:function(t){var e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var r=0;r<t.length;r++)if(t[r].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[r].length),e.globals.isXNumeric)for(var i=0;i<t[r].length;i++)e.globals.seriesX[r][i]>e.globals.minX&&e.globals.seriesX[r][i]<e.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=e.globals.dataPoints;this.arrBorderRadius=this.createBorderRadiusArr(e.globals.series),0===this.barCtx.seriesLen&&(this.barCtx.seriesLen=1),this.barCtx.zeroSerieses=[],e.globals.comboCharts||this.checkZeroSeries({series:t})}},{key:"initialPositions",value:function(){var t,e,r,i,n,o,a,s,l=this.w,c=l.globals.dataPoints;this.barCtx.isRangeBar&&(c=l.globals.labels.length);var u=this.barCtx.seriesLen;if(l.config.plotOptions.bar.rangeBarGroupRows&&(u=1),this.barCtx.isHorizontal)n=(r=l.globals.gridHeight/c)/u,l.globals.isXNumeric&&(n=(r=l.globals.gridHeight/this.barCtx.totalItems)/this.barCtx.seriesLen),n=n*parseInt(this.barCtx.barOptions.barHeight,10)/100,-1===String(this.barCtx.barOptions.barHeight).indexOf("%")&&(n=parseInt(this.barCtx.barOptions.barHeight,10)),s=this.barCtx.baseLineInvertedY+l.globals.padHorizontal+(this.barCtx.isReversed?l.globals.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),this.barCtx.isFunnel&&(s=l.globals.gridWidth/2),e=(r-n*this.barCtx.seriesLen)/2;else{if(i=l.globals.gridWidth/this.barCtx.visibleItems,l.config.xaxis.convertedCatToNumeric&&(i=l.globals.gridWidth/l.globals.dataPoints),o=i/u*parseInt(this.barCtx.barOptions.columnWidth,10)/100,l.globals.isXNumeric){var h=this.barCtx.xRatio;l.globals.minXDiff&&.5!==l.globals.minXDiff&&l.globals.minXDiff/h>0&&(i=l.globals.minXDiff/h),(o=i/u*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(o=1)}-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(o=parseInt(this.barCtx.barOptions.columnWidth,10)),a=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),t=l.globals.padHorizontal+f.noExponents(i-o*this.barCtx.seriesLen)/2}return l.globals.barHeight=n,l.globals.barWidth=o,{x:t,y:e,yDivision:r,xDivision:i,barHeight:n,barWidth:o,zeroH:a,zeroW:s}}},{key:"initializeStackedPrevVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]}))}},{key:"initializeStackedXYVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]}))}},{key:"getPathFillColor",value:function(t,e,r,i){var n,o,a,s,l=this.w,c=this.barCtx.ctx.fill,u=null,h=this.barCtx.barOptions.distributed?r:e,f=!1;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(i){t[e][r]>=i.from&&t[e][r]<=i.to&&(u=i.color,f=!0)})),{color:c.fillPath({seriesNumber:this.barCtx.barOptions.distributed?h:i,dataPointIndex:r,color:u,value:t[e][r],fillConfig:null===(n=l.config.series[e].data[r])||void 0===n?void 0:n.fill,fillType:null!==(o=l.config.series[e].data[r])&&void 0!==o&&null!==(a=o.fill)&&void 0!==a&&a.type?null===(s=l.config.series[e].data[r])||void 0===s?void 0:s.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[i]:l.config.fill.type}),useRangeColor:f}}},{key:"getStrokeWidth",value:function(t,e,r){var i=0,n=this.w;return this.barCtx.series[t][e]?this.barCtx.isNullValue=!1:this.barCtx.isNullValue=!0,n.config.stroke.show&&(this.barCtx.isNullValue||(i=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[r]:this.barCtx.strokeWidth)),i}},{key:"createBorderRadiusArr",value:function(t){var e,r=this.w,i=!this.w.config.chart.stacked||r.config.plotOptions.bar.borderRadius<=0,n=t.length,o=0|(null===(e=t[0])||void 0===e?void 0:e.length),a=Array.from({length:n},(function(){return Array(o).fill(i?"top":"none")}));if(i)return a;for(var s=0;s<o;s++){for(var l=[],c=[],u=0,h=0;h<n;h++){var f=t[h][s];f>0?(l.push(h),u++):f<0&&(c.push(h),u++)}if(l.length>0&&0===c.length)if(1===l.length)a[l[0]][s]="both";else{var d,p=l[0],g=l[l.length-1],b=Mp(l);try{for(b.s();!(d=b.n()).done;){var y=d.value;a[y][s]=y===p?"bottom":y===g?"top":"none"}}catch(t){b.e(t)}finally{b.f()}}else if(c.length>0&&0===l.length)if(1===c.length)a[c[0]][s]="both";else{var v,m=Math.max.apply(Math,c),x=Math.min.apply(Math,c),w=Mp(c);try{for(w.s();!(v=w.n()).done;){var S=v.value;a[S][s]=S===m?"bottom":S===x?"top":"none"}}catch(t){w.e(t)}finally{w.f()}}else if(l.length>0&&c.length>0){var k,A=l[l.length-1],O=Mp(l);try{for(O.s();!(k=O.n()).done;){var P=k.value;a[P][s]=P===A?"top":"none"}}catch(t){O.e(t)}finally{O.f()}var C,j=Math.max.apply(Math,c),T=Mp(c);try{for(T.s();!(C=T.n()).done;){var E=C.value;a[E][s]=E===j?"bottom":"none"}}catch(t){T.e(t)}finally{T.f()}}else 1===u&&(a[l[0]||c[0]][s]="both")}return a}},{key:"barBackground",value:function(t){var e=t.j,r=t.i,i=t.x1,n=t.x2,o=t.y1,a=t.y2,s=t.elSeries,l=this.w,c=new Pc(this.barCtx.ctx),u=new fh(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&u===r){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);var h=this.barCtx.barOptions.colors.backgroundBarColors[e],f=c.drawRect(void 0!==i?i:0,void 0!==o?o:0,void 0!==n?n:l.globals.gridWidth,void 0!==a?a:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,h,this.barCtx.barOptions.colors.backgroundBarOpacity);s.add(f),f.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(t){var e,r=t.barWidth,i=t.barXPosition,n=t.y1,o=t.y2,a=t.strokeWidth,s=t.isReversed,l=t.series,c=t.seriesGroup,u=t.realIndex,h=t.i,f=t.j,d=t.w,p=new Pc(this.barCtx.ctx);(a=Array.isArray(a)?a[u]:a)||(a=0);var g=r,b=i;null!==(e=d.config.series[u].data[f])&&void 0!==e&&e.columnWidthOffset&&(b=i-d.config.series[u].data[f].columnWidthOffset/2,g=r+d.config.series[u].data[f].columnWidthOffset);var y=a/2,v=b+y,m=b+g-y,x=(l[h][f]>=0?1:-1)*(s?-1:1);n+=.001-y*x,o+=.001+y*x;var w=p.move(v,n),S=p.move(v,n),k=p.line(m,n);if(d.globals.previousPaths.length>0&&(S=this.barCtx.getPreviousPath(u,f,!1)),w=w+p.line(v,o)+p.line(m,o)+k+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[u][f]?" Z":" z"),S=S+p.line(v,n)+k+k+k+k+k+p.line(v,n)+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[u][f]?" Z":" z"),"none"!==this.arrBorderRadius[u][f]&&(w=p.roundPathCorners(w,d.config.plotOptions.bar.borderRadius)),d.config.chart.stacked){var A=this.barCtx;(A=this.barCtx[c]).yArrj.push(o-y*x),A.yArrjF.push(Math.abs(n-o+a*x)),A.yArrjVal.push(this.barCtx.series[h][f])}return{pathTo:w,pathFrom:S}}},{key:"getBarpaths",value:function(t){var e,r=t.barYPosition,i=t.barHeight,n=t.x1,o=t.x2,a=t.strokeWidth,s=t.isReversed,l=t.series,c=t.seriesGroup,u=t.realIndex,h=t.i,f=t.j,d=t.w,p=new Pc(this.barCtx.ctx);(a=Array.isArray(a)?a[u]:a)||(a=0);var g=r,b=i;null!==(e=d.config.series[u].data[f])&&void 0!==e&&e.barHeightOffset&&(g=r-d.config.series[u].data[f].barHeightOffset/2,b=i+d.config.series[u].data[f].barHeightOffset);var y=a/2,v=g+y,m=g+b-y,x=(l[h][f]>=0?1:-1)*(s?-1:1);n+=.001+y*x,o+=.001-y*x;var w=p.move(n,v),S=p.move(n,v);d.globals.previousPaths.length>0&&(S=this.barCtx.getPreviousPath(u,f,!1));var k=p.line(n,m);if(w=w+p.line(o,v)+p.line(o,m)+k+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[u][f]?" Z":" z"),S=S+p.line(n,v)+k+k+k+k+k+p.line(n,v)+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[u][f]?" Z":" z"),"none"!==this.arrBorderRadius[u][f]&&(w=p.roundPathCorners(w,d.config.plotOptions.bar.borderRadius)),d.config.chart.stacked){var A=this.barCtx;(A=this.barCtx[c]).xArrj.push(o+y*x),A.xArrjF.push(Math.abs(n-o-a*x)),A.xArrjVal.push(this.barCtx.series[h][f])}return{pathTo:w,pathFrom:S}}},{key:"checkZeroSeries",value:function(t){for(var e=t.series,r=this.w,i=0;i<e.length;i++){for(var n=0,o=0;o<e[r.globals.maxValsInArrayIndex].length;o++)n+=e[i][o];0===n&&this.barCtx.zeroSerieses.push(i)}}},{key:"getXForValue",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&!arguments[2]?null:e;return null!=t&&(r=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),r}},{key:"getYForValue",value:function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?null:e;return null!=t&&(i=e-t/this.barCtx.yRatio[r]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[r]:0)),i}},{key:"getGoalValues",value:function(t,e,r,i,n,o){var a=this,s=this.w,l=[],c=function(i,n){var s;l.push((Ep(s={},t,"x"===t?a.getXForValue(i,e,!1):a.getYForValue(i,r,o,!1)),Ep(s,"attrs",n),s))};if(s.globals.seriesGoals[i]&&s.globals.seriesGoals[i][n]&&Array.isArray(s.globals.seriesGoals[i][n])&&s.globals.seriesGoals[i][n].forEach((function(t){c(t.value,t)})),this.barCtx.barOptions.isDumbbell&&s.globals.seriesRange.length){var u=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:s.globals.colors,h={strokeHeight:"x"===t?0:s.globals.markers.size[i],strokeWidth:"x"===t?s.globals.markers.size[i]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(u[i])?u[i][0]:u[i]};c(s.globals.seriesRangeStart[i][n],h),c(s.globals.seriesRangeEnd[i][n],Tp(Tp({},h),{},{strokeColor:Array.isArray(u[i])?u[i][1]:u[i]}))}return l}},{key:"drawGoalLine",value:function(t){var e=t.barXPosition,r=t.barYPosition,i=t.goalX,n=t.goalY,o=t.barWidth,a=t.barHeight,s=new Pc(this.barCtx.ctx),l=s.group({className:"apexcharts-bar-goals-groups"});l.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:l.node}),l.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var c=null;return this.barCtx.isHorizontal?Array.isArray(i)&&i.forEach((function(t){if(t.x>=-1&&t.x<=s.w.globals.gridWidth+1){var e=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:a/2,i=r+e+a/2;c=s.drawLine(t.x,i-2*e,t.x,i,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),l.add(c)}})):Array.isArray(n)&&n.forEach((function(t){if(t.y>=-1&&t.y<=s.w.globals.gridHeight+1){var r=void 0!==t.attrs.strokeWidth?t.attrs.strokeWidth:o/2,i=e+r+o/2;c=s.drawLine(i-2*r,t.y,i,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),l.add(c)}})),l}},{key:"drawBarShadow",value:function(t){var e=t.prevPaths,r=t.currPaths,i=t.color,n=this.w,o=e.x,a=e.x1,s=e.barYPosition,l=r.x,c=r.x1,u=r.barYPosition,h=s+r.barHeight,d=new Pc(this.barCtx.ctx),p=new f,g=d.move(a,h)+d.line(o,h)+d.line(l,u)+d.line(c,u)+d.line(a,h)+("around"===n.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[realIndex][j]?" Z":" z");return d.drawPath({d:g,fill:p.shadeColor(.5,f.rgb2hex(i)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}},{key:"getZeroValueEncounters",value:function(t){var e,r=t.i,i=t.j,n=this.w,o=0,a=0;return(n.config.plotOptions.bar.horizontal?n.globals.series.map((function(t,e){return e})):(null===(e=n.globals.columnSeries)||void 0===e?void 0:e.i.map((function(t){return t})))||[]).forEach((function(t){var e=n.globals.seriesPercent[t][i];e&&o++,t<r&&0===e&&a++})),{nonZeroColumns:o,zeroEncounters:a}}},{key:"getGroupIndex",value:function(t){var e=this.w,r=e.globals.seriesGroups.findIndex((function(r){return r.indexOf(e.globals.seriesNames[t])>-1})),i=this.barCtx.columnGroupIndices,n=i.indexOf(r);return n<0&&(i.push(r),n=i.length-1),{groupIndex:r,columnGroupIndex:n}}}],r&&Ip(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function zp(t){return zp="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},zp(t)}function Xp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Dp(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Xp(Object(r),!0).forEach((function(e){Yp(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xp(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Yp(t,e,r){return(e=Fp(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Hp(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Fp(i.key),i)}}function Fp(t){var e=function(t){if("object"!=zp(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=zp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==zp(e)?e:e+""}var Bp=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w;var i=this.w;this.barOptions=i.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=i.config.stroke.width,this.isNullValue=!1,this.isRangeBar=i.globals.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!i.globals.isBarHorizontal&&i.globals.seriesRange.length&&i.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.xyRatios=r,null!==this.xyRatios&&(this.xRatio=r.xRatio,this.yRatio=r.yRatio,this.invertedXRatio=r.invertedXRatio,this.invertedYRatio=r.invertedYRatio,this.baseLineY=r.baseLineY,this.baseLineInvertedY=r.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[];var n=new fh(this.ctx);this.lastActiveBarSerieIndex=n.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var o=n.getBarSeriesIndices(),a=new Mc(this.ctx);this.stackedSeriesTotals=a.getStackedSeriesTotals(this.w.config.series.map((function(t,e){return-1===o.indexOf(e)?e:-1})).filter((function(t){return-1!==t}))),this.barHelpers=new Rp(this)}var e,r;return e=t,r=[{key:"draw",value:function(t,e){var r=this.w,i=new Pc(this.ctx),n=new Mc(this.ctx,r);t=n.getLogSeries(t),this.series=t,this.yRatio=n.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);var o=i.group({class:"apexcharts-bar-series apexcharts-plot-series"});r.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var a=0,s=0;a<t.length;a++,s++){var l,c,u,h,d=void 0,p=void 0,g=[],b=[],y=r.globals.comboCharts?e[a]:a,v=this.barHelpers.getGroupIndex(y).columnGroupIndex,m=i.group({class:"apexcharts-series",rel:a+1,seriesName:f.escapeString(r.globals.seriesNames[y]),"data:realIndex":y});this.ctx.series.addCollapsedClassToSeries(m,y),t[a].length>0&&(this.visibleI=this.visibleI+1);var x=0,w=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[y],this.translationsIndex=y);var S=this.translationsIndex;this.isReversed=r.config.yaxis[this.yaxisIndex]&&r.config.yaxis[this.yaxisIndex].reversed;var k=this.barHelpers.initialPositions();p=k.y,x=k.barHeight,c=k.yDivision,h=k.zeroW,d=k.x,w=k.barWidth,l=k.xDivision,u=k.zeroH,this.isHorizontal||b.push(d+w/2);var A=i.group({class:"apexcharts-datalabels","data:realIndex":y});r.globals.delayedElements.push({el:A.node}),A.node.classList.add("apexcharts-element-hidden");var O=i.group({class:"apexcharts-bar-goals-markers"}),P=i.group({class:"apexcharts-bar-shadows"});r.globals.delayedElements.push({el:P.node}),P.node.classList.add("apexcharts-element-hidden");for(var C=0;C<t[a].length;C++){var j=this.barHelpers.getStrokeWidth(a,C,y),T=null,E={indexes:{i:a,j:C,realIndex:y,translationsIndex:S,bc:s},x:d,y:p,strokeWidth:j,elSeries:m};this.isHorizontal?(T=this.drawBarPaths(Dp(Dp({},E),{},{barHeight:x,zeroW:h,yDivision:c})),w=this.series[a][C]/this.invertedYRatio):(T=this.drawColumnPaths(Dp(Dp({},E),{},{xDivision:l,barWidth:w,zeroH:u})),x=this.series[a][C]/this.yRatio[S]);var M=this.barHelpers.getPathFillColor(t,a,C,y);if(this.isFunnel&&this.barOptions.isFunnel3d&&this.pathArr.length&&C>0){var L,I=this.barHelpers.drawBarShadow({color:"string"==typeof M.color&&-1===(null===(L=M.color)||void 0===L?void 0:L.indexOf("url"))?M.color:f.hexToRgba(r.globals.colors[a]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:T});P.add(I),r.config.chart.dropShadow.enabled&&new vc(this.ctx).dropShadow(I,r.config.chart.dropShadow,y)}this.pathArr.push(T);var _=this.barHelpers.drawGoalLine({barXPosition:T.barXPosition,barYPosition:T.barYPosition,goalX:T.goalX,goalY:T.goalY,barHeight:x,barWidth:w});_&&O.add(_),p=T.y,d=T.x,C>0&&b.push(d+w/2),g.push(p),this.renderSeries(Dp(Dp({realIndex:y,pathFill:M.color},M.useRangeColor?{lineFill:M.color}:{}),{},{j:C,i:a,columnGroupIndex:v,pathFrom:T.pathFrom,pathTo:T.pathTo,strokeWidth:j,elSeries:m,x:d,y:p,series:t,barHeight:Math.abs(T.barHeight?T.barHeight:x),barWidth:Math.abs(T.barWidth?T.barWidth:w),elDataLabelsWrap:A,elGoalsMarkers:O,elBarShadows:P,visibleSeries:this.visibleI,type:"bar"}))}r.globals.seriesXvalues[y]=b,r.globals.seriesYvalues[y]=g,o.add(m)}return o}},{key:"renderSeries",value:function(t){var e=t.realIndex,r=t.pathFill,i=t.lineFill,n=t.j,o=t.i,a=t.columnGroupIndex,s=t.pathFrom,l=t.pathTo,c=t.strokeWidth,u=t.elSeries,h=t.x,f=t.y,d=t.y1,p=t.y2,g=t.series,b=t.barHeight,y=t.barWidth,v=t.barXPosition,m=t.barYPosition,x=t.elDataLabelsWrap,w=t.elGoalsMarkers,S=t.elBarShadows,k=t.visibleSeries,A=t.type,O=t.classes,P=this.w,C=new Pc(this.ctx);if(!i){var j="function"==typeof P.globals.stroke.colors[e]?function(t){var e,r=P.config.stroke.colors;return Array.isArray(r)&&r.length>0&&((e=r[t])||(e=""),"function"==typeof e)?e({value:P.globals.series[t][n],dataPointIndex:n,w:P}):e}(e):P.globals.stroke.colors[e];i=this.barOptions.distributed?P.globals.stroke.colors[n]:j}P.config.series[o].data[n]&&P.config.series[o].data[n].strokeColor&&(i=P.config.series[o].data[n].strokeColor),this.isNullValue&&(r="none");var T=n/P.config.chart.animations.animateGradually.delay*(P.config.chart.animations.speed/P.globals.dataPoints)/2.4,E=C.renderPaths({i:o,j:n,realIndex:e,pathFrom:s,pathTo:l,stroke:i,strokeWidth:c,strokeLineCap:P.config.stroke.lineCap,fill:r,animationDelay:T,initialSpeed:P.config.chart.animations.speed,dataChangeSpeed:P.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(A,"-area ").concat(O),chartType:A});E.attr("clip-path","url(#gridRectBarMask".concat(P.globals.cuid,")"));var M=P.config.forecastDataPoints;M.count>0&&n>=P.globals.dataPoints-M.count&&(E.node.setAttribute("stroke-dasharray",M.dashArray),E.node.setAttribute("stroke-width",M.strokeWidth),E.node.setAttribute("fill-opacity",M.fillOpacity)),void 0!==d&&void 0!==p&&(E.attr("data-range-y1",d),E.attr("data-range-y2",p)),new vc(this.ctx).setSelectionFilter(E,e,n),u.add(E);var L=new Pp(this).handleBarDataLabels({x:h,y:f,y1:d,y2:p,i:o,j:n,series:g,realIndex:e,columnGroupIndex:a,barHeight:b,barWidth:y,barXPosition:v,barYPosition:m,renderedPath:E,visibleSeries:k});return null!==L.dataLabels&&x.add(L.dataLabels),L.totalDataLabels&&x.add(L.totalDataLabels),u.add(x),w&&u.add(w),S&&u.add(S),u}},{key:"drawBarPaths",value:function(t){var e,r=t.indexes,i=t.barHeight,n=t.strokeWidth,o=t.zeroW,a=t.x,s=t.y,l=t.yDivision,c=t.elSeries,u=this.w,h=r.i,f=r.j;if(u.globals.isXNumeric)e=(s=(u.globals.seriesX[h][f]-u.globals.minX)/this.invertedXRatio-i)+i*this.visibleI;else if(u.config.plotOptions.bar.hideZeroBarsWhenGrouped){var d=0,p=0;u.globals.seriesPercent.forEach((function(t,e){t[f]&&d++,e<h&&0===t[f]&&p++})),d>0&&(i=this.seriesLen*i/d),e=s+i*this.visibleI,e-=i*p}else e=s+i*this.visibleI;this.isFunnel&&(o-=(this.barHelpers.getXForValue(this.series[h][f],o)-o)/2),a=this.barHelpers.getXForValue(this.series[h][f],o);var g=this.barHelpers.getBarpaths({barYPosition:e,barHeight:i,x1:o,x2:a,strokeWidth:n,isReversed:this.isReversed,series:this.series,realIndex:r.realIndex,i:h,j:f,w:u});return u.globals.isXNumeric||(s+=l),this.barHelpers.barBackground({j:f,i:h,y1:e-i*this.visibleI,y2:i*this.seriesLen,elSeries:c}),{pathTo:g.pathTo,pathFrom:g.pathFrom,x1:o,x:a,y:s,goalX:this.barHelpers.getGoalValues("x",o,null,h,f),barYPosition:e,barHeight:i}}},{key:"drawColumnPaths",value:function(t){var e,r=t.indexes,i=t.x,n=t.y,o=t.xDivision,a=t.barWidth,s=t.zeroH,l=t.strokeWidth,c=t.elSeries,u=this.w,h=r.realIndex,f=r.translationsIndex,d=r.i,p=r.j,g=r.bc;if(u.globals.isXNumeric){var b=this.getBarXForNumericXAxis({x:i,j:p,realIndex:h,barWidth:a});i=b.x,e=b.barXPosition}else if(u.config.plotOptions.bar.hideZeroBarsWhenGrouped){var y=this.barHelpers.getZeroValueEncounters({i:d,j:p}),v=y.nonZeroColumns,m=y.zeroEncounters;v>0&&(a=this.seriesLen*a/v),e=i+a*this.visibleI,e-=a*m}else e=i+a*this.visibleI;n=this.barHelpers.getYForValue(this.series[d][p],s,f);var x=this.barHelpers.getColumnPaths({barXPosition:e,barWidth:a,y1:s,y2:n,strokeWidth:l,isReversed:this.isReversed,series:this.series,realIndex:h,i:d,j:p,w:u});return u.globals.isXNumeric||(i+=o),this.barHelpers.barBackground({bc:g,j:p,i:d,x1:e-l/2-a*this.visibleI,x2:a*this.seriesLen+l/2,elSeries:c}),{pathTo:x.pathTo,pathFrom:x.pathFrom,x:i,y:n,goalY:this.barHelpers.getGoalValues("y",null,s,d,p,f),barXPosition:e,barWidth:a}}},{key:"getBarXForNumericXAxis",value:function(t){var e=t.x,r=t.barWidth,i=t.realIndex,n=t.j,o=this.w,a=i;return o.globals.seriesX[i].length||(a=o.globals.maxValsInArrayIndex),f.isNumber(o.globals.seriesX[a][n])&&(e=(o.globals.seriesX[a][n]-o.globals.minX)/this.xRatio-r*this.seriesLen/2),{barXPosition:e+r*this.visibleI,x:e}}},{key:"getPreviousPath",value:function(t,e){for(var r,i=this.w,n=0;n<i.globals.previousPaths.length;n++){var o=i.globals.previousPaths[n];o.paths&&o.paths.length>0&&parseInt(o.realIndex,10)===parseInt(t,10)&&void 0!==i.globals.previousPaths[n].paths[e]&&(r=i.globals.previousPaths[n].paths[e].d)}return r}}],r&&Hp(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Np=Bp;function Wp(t){return Wp="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},Wp(t)}function Gp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Vp(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Gp(Object(r),!0).forEach((function(e){Up(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Gp(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Up(t,e,r){return(e=Zp(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qp(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Zp(i.key),i)}}function Zp(t){var e=function(t){if("object"!=Wp(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Wp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Wp(e)?e:e+""}function $p(t,e){return $p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},$p(t,e)}function Jp(t){var e=Qp();return function(){var r,i=Kp(t);if(e){var n=Kp(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Wp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Qp(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Qp=function(){return!!t})()}function Kp(t){return Kp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Kp(t)}var tg=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$p(t,e)}(n,t);var e,r,i=Jp(n);function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.apply(this,arguments)}return e=n,r=[{key:"draw",value:function(t,e){var r=this,i=this.w;this.graphics=new Pc(this.ctx),this.bar=new Np(this.ctx,this.xyRatios);var n=new Mc(this.ctx,i);t=n.getLogSeries(t),this.yRatio=n.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),"100%"===i.config.chart.stackType&&(t=i.globals.comboCharts?e.map((function(t){return i.globals.seriesPercent[t]})):i.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);for(var o=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),a=0,s=0,l=function(n,l){var c=void 0,u=void 0,h=void 0,d=void 0,p=i.globals.comboCharts?e[n]:n,g=r.barHelpers.getGroupIndex(p),b=g.groupIndex,y=g.columnGroupIndex;r.groupCtx=r[i.globals.seriesGroups[b]];var v=[],m=[],x=0;r.yRatio.length>1&&(r.yaxisIndex=i.globals.seriesYAxisReverseMap[p][0],x=p),r.isReversed=i.config.yaxis[r.yaxisIndex]&&i.config.yaxis[r.yaxisIndex].reversed;var w=r.graphics.group({class:"apexcharts-series",seriesName:f.escapeString(i.globals.seriesNames[p]),rel:n+1,"data:realIndex":p});r.ctx.series.addCollapsedClassToSeries(w,p);var S=r.graphics.group({class:"apexcharts-datalabels","data:realIndex":p}),k=r.graphics.group({class:"apexcharts-bar-goals-markers"}),A=0,O=0,P=r.initialPositions(a,s,c,u,h,d,x);s=P.y,A=P.barHeight,u=P.yDivision,d=P.zeroW,a=P.x,O=P.barWidth,c=P.xDivision,h=P.zeroH,i.globals.barHeight=A,i.globals.barWidth=O,r.barHelpers.initializeStackedXYVars(r),1===r.groupCtx.prevY.length&&r.groupCtx.prevY[0].every((function(t){return isNaN(t)}))&&(r.groupCtx.prevY[0]=r.groupCtx.prevY[0].map((function(){return h})),r.groupCtx.prevYF[0]=r.groupCtx.prevYF[0].map((function(){return 0})));for(var C=0;C<i.globals.dataPoints;C++){var j=r.barHelpers.getStrokeWidth(n,C,p),T={indexes:{i:n,j:C,realIndex:p,translationsIndex:x,bc:l},strokeWidth:j,x:a,y:s,elSeries:w,columnGroupIndex:y,seriesGroup:i.globals.seriesGroups[b]},E=null;r.isHorizontal?(E=r.drawStackedBarPaths(Vp(Vp({},T),{},{zeroW:d,barHeight:A,yDivision:u})),O=r.series[n][C]/r.invertedYRatio):(E=r.drawStackedColumnPaths(Vp(Vp({},T),{},{xDivision:c,barWidth:O,zeroH:h})),A=r.series[n][C]/r.yRatio[x]);var M=r.barHelpers.drawGoalLine({barXPosition:E.barXPosition,barYPosition:E.barYPosition,goalX:E.goalX,goalY:E.goalY,barHeight:A,barWidth:O});M&&k.add(M),s=E.y,a=E.x,v.push(a),m.push(s);var L=r.barHelpers.getPathFillColor(t,n,C,p),I="",_=i.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y";("bottom"===r.barHelpers.arrBorderRadius[p][C]&&i.globals.series[p][C]>0||"top"===r.barHelpers.arrBorderRadius[p][C]&&i.globals.series[p][C]<0)&&(I=_),w=r.renderSeries(Vp(Vp({realIndex:p,pathFill:L.color},L.useRangeColor?{lineFill:L.color}:{}),{},{j:C,i:n,columnGroupIndex:y,pathFrom:E.pathFrom,pathTo:E.pathTo,strokeWidth:j,elSeries:w,x:a,y:s,series:t,barHeight:A,barWidth:O,elDataLabelsWrap:S,elGoalsMarkers:k,type:"bar",visibleSeries:y,classes:I}))}i.globals.seriesXvalues[p]=v,i.globals.seriesYvalues[p]=m,r.groupCtx.prevY.push(r.groupCtx.yArrj),r.groupCtx.prevYF.push(r.groupCtx.yArrjF),r.groupCtx.prevYVal.push(r.groupCtx.yArrjVal),r.groupCtx.prevX.push(r.groupCtx.xArrj),r.groupCtx.prevXF.push(r.groupCtx.xArrjF),r.groupCtx.prevXVal.push(r.groupCtx.xArrjVal),o.add(w)},c=0,u=0;c<t.length;c++,u++)l(c,u);return o}},{key:"initialPositions",value:function(t,e,r,i,n,o,a){var s,l,c=this.w;if(this.isHorizontal){i=c.globals.gridHeight/c.globals.dataPoints;var u=c.config.plotOptions.bar.barHeight;s=-1===String(u).indexOf("%")?parseInt(u,10):i*parseInt(u,10)/100,o=c.globals.padHorizontal+(this.isReversed?c.globals.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),e=(i-s)/2}else{l=r=c.globals.gridWidth/c.globals.dataPoints;var h=c.config.plotOptions.bar.columnWidth;c.globals.isXNumeric&&c.globals.dataPoints>1?l=(r=c.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:-1===String(h).indexOf("%")?l=parseInt(h,10):l*=parseInt(h,10)/100,n=this.isReversed?this.baseLineY[a]:c.globals.gridHeight-this.baseLineY[a],t=c.globals.padHorizontal+(r-l)/2}var f=c.globals.barGroups.length||1;return{x:t,y:e,yDivision:i,xDivision:r,barHeight:s/f,barWidth:l/f,zeroH:n,zeroW:o}}},{key:"drawStackedBarPaths",value:function(t){for(var e,r=t.indexes,i=t.barHeight,n=t.strokeWidth,o=t.zeroW,a=t.x,s=t.y,l=t.columnGroupIndex,c=t.seriesGroup,u=t.yDivision,h=t.elSeries,f=this.w,d=s+l*i,p=r.i,g=r.j,b=r.realIndex,y=r.translationsIndex,v=0,m=0;m<this.groupCtx.prevXF.length;m++)v+=this.groupCtx.prevXF[m][g];var x;if((x=c.indexOf(f.config.series[b].name))>0){var w=o;this.groupCtx.prevXVal[x-1][g]<0?w=this.series[p][g]>=0?this.groupCtx.prevX[x-1][g]+v-2*(this.isReversed?v:0):this.groupCtx.prevX[x-1][g]:this.groupCtx.prevXVal[x-1][g]>=0&&(w=this.series[p][g]>=0?this.groupCtx.prevX[x-1][g]:this.groupCtx.prevX[x-1][g]-v+2*(this.isReversed?v:0)),e=w}else e=o;a=null===this.series[p][g]?e:e+this.series[p][g]/this.invertedYRatio-2*(this.isReversed?this.series[p][g]/this.invertedYRatio:0);var S=this.barHelpers.getBarpaths({barYPosition:d,barHeight:i,x1:e,x2:a,strokeWidth:n,isReversed:this.isReversed,series:this.series,realIndex:r.realIndex,seriesGroup:c,i:p,j:g,w:f});return this.barHelpers.barBackground({j:g,i:p,y1:d,y2:i,elSeries:h}),s+=u,{pathTo:S.pathTo,pathFrom:S.pathFrom,goalX:this.barHelpers.getGoalValues("x",o,null,p,g,y),barXPosition:e,barYPosition:d,x:a,y:s}}},{key:"drawStackedColumnPaths",value:function(t){var e=t.indexes,r=t.x,i=t.y,n=t.xDivision,o=t.barWidth,a=t.zeroH,s=t.columnGroupIndex,l=t.seriesGroup,c=t.elSeries,u=this.w,h=e.i,f=e.j,d=e.bc,p=e.realIndex,g=e.translationsIndex;if(u.globals.isXNumeric){var b=u.globals.seriesX[p][f];b||(b=0),r=(b-u.globals.minX)/this.xRatio-o/2*u.globals.barGroups.length}for(var y,v=r+s*o,m=0,x=0;x<this.groupCtx.prevYF.length;x++)m+=isNaN(this.groupCtx.prevYF[x][f])?0:this.groupCtx.prevYF[x][f];var w=h;if(l&&(w=l.indexOf(u.globals.seriesNames[p])),w>0&&!u.globals.isXNumeric||w>0&&u.globals.isXNumeric&&u.globals.seriesX[p-1][f]===u.globals.seriesX[p][f]){var S,k,A,O=Math.min(this.yRatio.length+1,p+1);if(void 0!==this.groupCtx.prevY[w-1]&&this.groupCtx.prevY[w-1].length)for(var P=1;P<O;P++){var C;if(!isNaN(null===(C=this.groupCtx.prevY[w-P])||void 0===C?void 0:C[f])){A=this.groupCtx.prevY[w-P][f];break}}for(var j=1;j<O;j++){var T,E;if((null===(T=this.groupCtx.prevYVal[w-j])||void 0===T?void 0:T[f])<0){k=this.series[h][f]>=0?A-m+2*(this.isReversed?m:0):A;break}if((null===(E=this.groupCtx.prevYVal[w-j])||void 0===E?void 0:E[f])>=0){k=this.series[h][f]>=0?A:A+m-2*(this.isReversed?m:0);break}}void 0===k&&(k=u.globals.gridHeight),y=null!==(S=this.groupCtx.prevYF[0])&&void 0!==S&&S.every((function(t){return 0===t}))&&this.groupCtx.prevYF.slice(1,w).every((function(t){return t.every((function(t){return isNaN(t)}))}))?a:k}else y=a;i=this.series[h][f]?y-this.series[h][f]/this.yRatio[g]+2*(this.isReversed?this.series[h][f]/this.yRatio[g]:0):y;var M=this.barHelpers.getColumnPaths({barXPosition:v,barWidth:o,y1:y,y2:i,yRatio:this.yRatio[g],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:l,realIndex:e.realIndex,i:h,j:f,w:u});return this.barHelpers.barBackground({bc:d,j:f,i:h,x1:v,x2:o,elSeries:c}),{pathTo:M.pathTo,pathFrom:M.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,a,h,f),barXPosition:v,x:u.globals.isXNumeric?r:r+n,y:i}}}],r&&qp(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Np);const eg=tg;function rg(t){return rg="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},rg(t)}function ig(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function ng(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ig(Object(r),!0).forEach((function(e){og(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ig(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function og(t,e,r){return(e=sg(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ag(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,sg(i.key),i)}}function sg(t){var e=function(t){if("object"!=rg(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=rg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==rg(e)?e:e+""}function lg(t,e){return lg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},lg(t,e)}function cg(t){var e=ug();return function(){var r,i=hg(t);if(e){var n=hg(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==rg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function ug(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ug=function(){return!!t})()}function hg(t){return hg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},hg(t)}var fg=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&lg(t,e)}(n,t);var e,r,i=cg(n);function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.apply(this,arguments)}return e=n,r=[{key:"draw",value:function(t,e,r){var i=this,n=this.w,o=new Pc(this.ctx),a=n.globals.comboCharts?e:n.config.chart.type,s=new Zu(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=n.config.plotOptions.bar.horizontal;var l=new Mc(this.ctx,n);t=l.getLogSeries(t),this.series=t,this.yRatio=l.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);for(var c=o.group({class:"apexcharts-".concat(a,"-series apexcharts-plot-series")}),u=function(e){i.isBoxPlot="boxPlot"===n.config.chart.type||"boxPlot"===n.config.series[e].type;var a,l,u,h,d=void 0,p=void 0,g=[],b=[],y=n.globals.comboCharts?r[e]:e,v=i.barHelpers.getGroupIndex(y).columnGroupIndex,m=o.group({class:"apexcharts-series",seriesName:f.escapeString(n.globals.seriesNames[y]),rel:e+1,"data:realIndex":y});i.ctx.series.addCollapsedClassToSeries(m,y),t[e].length>0&&(i.visibleI=i.visibleI+1);var x,w,S=0;i.yRatio.length>1&&(i.yaxisIndex=n.globals.seriesYAxisReverseMap[y][0],S=y);var k=i.barHelpers.initialPositions();p=k.y,x=k.barHeight,l=k.yDivision,h=k.zeroW,d=k.x,w=k.barWidth,a=k.xDivision,u=k.zeroH,b.push(d+w/2);for(var A=o.group({class:"apexcharts-datalabels","data:realIndex":y}),O=o.group({class:"apexcharts-bar-goals-markers"}),P=function(r){var o=i.barHelpers.getStrokeWidth(e,r,y),c=null,f={indexes:{i:e,j:r,realIndex:y,translationsIndex:S},x:d,y:p,strokeWidth:o,elSeries:m};c=i.isHorizontal?i.drawHorizontalBoxPaths(ng(ng({},f),{},{yDivision:l,barHeight:x,zeroW:h})):i.drawVerticalBoxPaths(ng(ng({},f),{},{xDivision:a,barWidth:w,zeroH:u})),p=c.y,d=c.x;var k=i.barHelpers.drawGoalLine({barXPosition:c.barXPosition,barYPosition:c.barYPosition,goalX:c.goalX,goalY:c.goalY,barHeight:x,barWidth:w});k&&O.add(k),r>0&&b.push(d+w/2),g.push(p),c.pathTo.forEach((function(a,l){var u=!i.isBoxPlot&&i.candlestickOptions.wick.useFillColor?c.color[l]:n.globals.stroke.colors[e],h=s.fillPath({seriesNumber:y,dataPointIndex:r,color:c.color[l],value:t[e][r]});i.renderSeries({realIndex:y,pathFill:h,lineFill:u,j:r,i:e,pathFrom:c.pathFrom,pathTo:a,strokeWidth:o,elSeries:m,x:d,y:p,series:t,columnGroupIndex:v,barHeight:x,barWidth:w,elDataLabelsWrap:A,elGoalsMarkers:O,visibleSeries:i.visibleI,type:n.config.chart.type})}))},C=0;C<n.globals.dataPoints;C++)P(C);n.globals.seriesXvalues[y]=b,n.globals.seriesYvalues[y]=g,c.add(m)},h=0;h<t.length;h++)u(h);return c}},{key:"drawVerticalBoxPaths",value:function(t){var e=t.indexes,r=t.x,i=(t.y,t.xDivision),n=t.barWidth,o=t.zeroH,a=t.strokeWidth,s=this.w,l=new Pc(this.ctx),c=e.i,u=e.j,h=s.config.plotOptions.candlestick.colors,f=this.boxOptions.colors,d=e.realIndex,p=function(t){return Array.isArray(t)?t[d]:t},g=p(h.upward),b=p(h.downward),y=this.yRatio[e.translationsIndex],v=this.getOHLCValue(d,u),m=o,x=o,w=v.o<v.c?[g]:[b];this.isBoxPlot&&(w=[p(f.lower),p(f.upper)]);var S=Math.min(v.o,v.c),k=Math.max(v.o,v.c),A=v.m;s.globals.isXNumeric&&(r=(s.globals.seriesX[d][u]-s.globals.minX)/this.xRatio-n/2);var O=r+n*this.visibleI;void 0===this.series[c][u]||null===this.series[c][u]?(S=o,k=o):(S=o-S/y,k=o-k/y,m=o-v.h/y,x=o-v.l/y,A=o-v.m/y);var P=l.move(O,o),C=l.move(O+n/2,S);return s.globals.previousPaths.length>0&&(C=this.getPreviousPath(d,u,!0)),P=this.isBoxPlot?[l.move(O,S)+l.line(O+n/2,S)+l.line(O+n/2,m)+l.line(O+n/4,m)+l.line(O+n-n/4,m)+l.line(O+n/2,m)+l.line(O+n/2,S)+l.line(O+n,S)+l.line(O+n,A)+l.line(O,A)+l.line(O,S+a/2),l.move(O,A)+l.line(O+n,A)+l.line(O+n,k)+l.line(O+n/2,k)+l.line(O+n/2,x)+l.line(O+n-n/4,x)+l.line(O+n/4,x)+l.line(O+n/2,x)+l.line(O+n/2,k)+l.line(O,k)+l.line(O,A)+"z"]:[l.move(O,k)+l.line(O+n/2,k)+l.line(O+n/2,m)+l.line(O+n/2,k)+l.line(O+n,k)+l.line(O+n,S)+l.line(O+n/2,S)+l.line(O+n/2,x)+l.line(O+n/2,S)+l.line(O,S)+l.line(O,k-a/2)],C+=l.move(O,S),s.globals.isXNumeric||(r+=i),{pathTo:P,pathFrom:C,x:r,y:k,goalY:this.barHelpers.getGoalValues("y",null,o,c,u,e.translationsIndex),barXPosition:O,color:w}}},{key:"drawHorizontalBoxPaths",value:function(t){var e=t.indexes,r=(t.x,t.y),i=t.yDivision,n=t.barHeight,o=t.zeroW,a=t.strokeWidth,s=this.w,l=new Pc(this.ctx),c=e.i,u=e.j,h=this.boxOptions.colors.lower;this.isBoxPlot&&(h=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var f=this.invertedYRatio,d=e.realIndex,p=this.getOHLCValue(d,u),g=o,b=o,y=Math.min(p.o,p.c),v=Math.max(p.o,p.c),m=p.m;s.globals.isXNumeric&&(r=(s.globals.seriesX[d][u]-s.globals.minX)/this.invertedXRatio-n/2);var x=r+n*this.visibleI;void 0===this.series[c][u]||null===this.series[c][u]?(y=o,v=o):(y=o+y/f,v=o+v/f,g=o+p.h/f,b=o+p.l/f,m=o+p.m/f);var w=l.move(o,x),S=l.move(y,x+n/2);return s.globals.previousPaths.length>0&&(S=this.getPreviousPath(d,u,!0)),w=[l.move(y,x)+l.line(y,x+n/2)+l.line(g,x+n/2)+l.line(g,x+n/2-n/4)+l.line(g,x+n/2+n/4)+l.line(g,x+n/2)+l.line(y,x+n/2)+l.line(y,x+n)+l.line(m,x+n)+l.line(m,x)+l.line(y+a/2,x),l.move(m,x)+l.line(m,x+n)+l.line(v,x+n)+l.line(v,x+n/2)+l.line(b,x+n/2)+l.line(b,x+n-n/4)+l.line(b,x+n/4)+l.line(b,x+n/2)+l.line(v,x+n/2)+l.line(v,x)+l.line(m,x)+"z"],S+=l.move(y,x),s.globals.isXNumeric||(r+=i),{pathTo:w,pathFrom:S,x:v,y:r,goalX:this.barHelpers.getGoalValues("x",o,null,c,u),barYPosition:x,color:h}}},{key:"getOHLCValue",value:function(t,e){var r=this.w,i=new Mc(this.ctx,r),n=i.getLogValAtSeriesIndex(r.globals.seriesCandleH[t][e],t),o=i.getLogValAtSeriesIndex(r.globals.seriesCandleO[t][e],t),a=i.getLogValAtSeriesIndex(r.globals.seriesCandleM[t][e],t),s=i.getLogValAtSeriesIndex(r.globals.seriesCandleC[t][e],t),l=i.getLogValAtSeriesIndex(r.globals.seriesCandleL[t][e],t);return{o:this.isBoxPlot?n:o,h:this.isBoxPlot?o:n,m:a,l:this.isBoxPlot?s:l,c:this.isBoxPlot?l:s}}}],r&&ag(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Np);const dg=fg;function pg(t){return pg="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},pg(t)}function gg(t){return function(t){if(Array.isArray(t))return bg(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return bg(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bg(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bg(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function yg(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,vg(i.key),i)}}function vg(t){var e=function(t){if("object"!=pg(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=pg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==pg(e)?e:e+""}var mg=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w}var e,r;return e=t,r=[{key:"checkColorRange",value:function(){var t=this.w,e=!1,r=t.config.plotOptions[t.config.chart.type];return r.colorScale.ranges.length>0&&r.colorScale.ranges.map((function(t,r){t.from<=0&&(e=!0)})),e}},{key:"getShadeColor",value:function(t,e,r,i){var n=this.w,o=1,a=n.config.plotOptions[t].shadeIntensity,s=this.determineColor(t,e,r);n.globals.hasNegs||i?o=n.config.plotOptions[t].reverseNegativeShade?s.percent<0?s.percent/100*(1.25*a):(1-s.percent/100)*(1.25*a):s.percent<=0?1-(1+s.percent/100)*a:(1-s.percent/100)*a:(o=1-s.percent/100,"treemap"===t&&(o=(1-s.percent/100)*(1.25*a)));var l=s.color,c=new f;if(n.config.plotOptions[t].enableShades)if("dark"===this.w.config.theme.mode){var u=c.shadeColor(-1*o,s.color);l=f.hexToRgba(f.isColorHex(u)?u:f.rgb2hex(u),n.config.fill.opacity)}else{var h=c.shadeColor(o,s.color);l=f.hexToRgba(f.isColorHex(h)?h:f.rgb2hex(h),n.config.fill.opacity)}return{color:l,colorProps:s}}},{key:"determineColor",value:function(t,e,r){var i=this.w,n=i.globals.series[e][r],o=i.config.plotOptions[t],a=o.colorScale.inverse?r:e;o.distributed&&"treemap"===i.config.chart.type&&(a=r);var s=i.globals.colors[a],l=null,c=Math.min.apply(Math,gg(i.globals.series[e])),u=Math.max.apply(Math,gg(i.globals.series[e]));o.distributed||"heatmap"!==t||(c=i.globals.minY,u=i.globals.maxY),void 0!==o.colorScale.min&&(c=o.colorScale.min<i.globals.minY?o.colorScale.min:i.globals.minY,u=o.colorScale.max>i.globals.maxY?o.colorScale.max:i.globals.maxY);var h=Math.abs(u)+Math.abs(c),f=100*n/(0===h?h-1e-6:h);return o.colorScale.ranges.length>0&&o.colorScale.ranges.map((function(t,e){if(n>=t.from&&n<=t.to){s=t.color,l=t.foreColor?t.foreColor:null,c=t.from,u=t.to;var r=Math.abs(u)+Math.abs(c);f=100*n/(0===r?r-1e-6:r)}})),{color:s,foreColor:l,percent:f}}},{key:"calculateDataLabels",value:function(t){var e=t.text,r=t.x,i=t.y,n=t.i,o=t.j,a=t.colorProps,s=t.fontSize,l=this.w.config.dataLabels,c=new Pc(this.ctx),u=new lh(this.ctx),h=null;if(l.enabled){h=c.group({class:"apexcharts-data-labels"});var f=l.offsetX,d=l.offsetY,p=r+f,g=i+parseFloat(l.style.fontSize)/3+d;u.plotDataLabelsText({x:p,y:g,text:e,i:n,j:o,color:a.foreColor,parent:h,fontSize:s,dataLabelsConfig:l})}return h}},{key:"addListeners",value:function(t){var e=new Pc(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this,t))}}],r&&yg(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function xg(t){return xg="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},xg(t)}function wg(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Sg(i.key),i)}}function Sg(t){var e=function(t){if("object"!=xg(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=xg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xg(e)?e:e+""}var kg=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w,this.xRatio=r.xRatio,this.yRatio=r.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new mg(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}var e,r;return e=t,r=[{key:"draw",value:function(t){var e=this.w,r=new Pc(this.ctx),i=r.group({class:"apexcharts-heatmap"});i.attr("clip-path","url(#gridRectMask".concat(e.globals.cuid,")"));var n=e.globals.gridWidth/e.globals.dataPoints,o=e.globals.gridHeight/e.globals.series.length,a=0,s=!1;this.negRange=this.helpers.checkColorRange();var l=t.slice();e.config.yaxis[0].reversed&&(s=!0,l.reverse());for(var c=s?0:l.length-1;s?c<l.length:c>=0;s?c++:c--){var u=r.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:f.escapeString(e.globals.seriesNames[c]),rel:c+1,"data:realIndex":c});if(this.ctx.series.addCollapsedClassToSeries(u,c),e.config.chart.dropShadow.enabled){var h=e.config.chart.dropShadow;new vc(this.ctx).dropShadow(u,h,c)}for(var d=0,p=e.config.plotOptions.heatmap.shadeIntensity,g=0,b=0;b<e.globals.dataPoints;b++)if(e.globals.seriesX.length&&!e.globals.allSeriesHasEqualX&&e.globals.minX+e.globals.minXDiff*b<e.globals.seriesX[c][g])d+=n;else{if(g>=l[c].length)break;var y=this.helpers.getShadeColor(e.config.chart.type,c,g,this.negRange),v=y.color,m=y.colorProps;"image"===e.config.fill.type&&(v=new Zu(this.ctx).fillPath({seriesNumber:c,dataPointIndex:g,opacity:e.globals.hasNegs?m.percent<0?1-(1+m.percent/100):p+m.percent/100:m.percent/100,patternID:f.randomId(),width:e.config.fill.image.width?e.config.fill.image.width:n,height:e.config.fill.image.height?e.config.fill.image.height:o}));var x=this.rectRadius,w=r.drawRect(d,a,n,o,x);if(w.attr({cx:d,cy:a}),w.node.classList.add("apexcharts-heatmap-rect"),u.add(w),w.attr({fill:v,i:c,index:c,j:g,val:t[c][g],"stroke-width":this.strokeWidth,stroke:e.config.plotOptions.heatmap.useFillColorAsStroke?v:e.globals.stroke.colors[0],color:v}),this.helpers.addListeners(w),e.config.chart.animations.enabled&&!e.globals.dataChanged){var S=1;e.globals.resized||(S=e.config.chart.animations.speed),this.animateHeatMap(w,d,a,n,o,S)}if(e.globals.dataChanged){var k=1;if(this.dynamicAnim.enabled&&e.globals.shouldAnimate){k=this.dynamicAnim.speed;var A=e.globals.previousPaths[c]&&e.globals.previousPaths[c][g]&&e.globals.previousPaths[c][g].color;A||(A="rgba(255, 255, 255, 0)"),this.animateHeatColor(w,f.isColorHex(A)?A:f.rgb2hex(A),f.isColorHex(v)?v:f.rgb2hex(v),k)}}var O=(0,e.config.dataLabels.formatter)(e.globals.series[c][g],{value:e.globals.series[c][g],seriesIndex:c,dataPointIndex:g,w:e}),P=this.helpers.calculateDataLabels({text:O,x:d+n/2,y:a+o/2,i:c,j:g,colorProps:m,series:l});null!==P&&u.add(P),d+=n,g++}a+=o,i.add(u)}var C=e.globals.yAxisScale[0].result.slice();return e.config.yaxis[0].reversed?C.unshift(""):C.push(""),e.globals.yAxisScale[0].result=C,i}},{key:"animateHeatMap",value:function(t,e,r,i,n,o){var a=new b(this.ctx);a.animateRect(t,{x:e+i/2,y:r+n/2,width:0,height:0},{x:e,y:r,width:i,height:n},o,(function(){a.animationCompleted(t)}))}},{key:"animateHeatColor",value:function(t,e,r,i){t.attr({fill:e}).animate(i).attr({fill:r})}}],r&&wg(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ag(t){return Ag="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},Ag(t)}function Og(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Pg(i.key),i)}}function Pg(t){var e=function(t){if("object"!=Ag(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ag(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ag(e)?e:e+""}var Cg=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w}var e,r;return e=t,r=[{key:"drawYAxisTexts",value:function(t,e,r,i){var n=this.w,o=n.config.yaxis[0],a=n.globals.yLabelFormatters[0];return new Pc(this.ctx).drawText({x:t+o.labels.offsetX,y:e+o.labels.offsetY,text:a(i,r),textAnchor:"middle",fontSize:o.labels.style.fontSize,fontFamily:o.labels.style.fontFamily,foreColor:Array.isArray(o.labels.style.colors)?o.labels.style.colors[r]:o.labels.style.colors})}}],r&&Og(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function jg(t){return jg="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},jg(t)}function Tg(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Eg(i.key),i)}}function Eg(t){var e=function(t){if("object"!=jg(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=jg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==jg(e)?e:e+""}var Mg=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w;var r=this.w;this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animBeginArr=[0],this.animDur=0,this.donutDataLabels=this.w.config.plotOptions.pie.donut.labels,this.lineColorArr=void 0!==r.globals.stroke.colors?r.globals.stroke.colors:r.globals.colors,this.defaultSize=Math.min(r.globals.gridWidth,r.globals.gridHeight),this.centerY=this.defaultSize/2,this.centerX=r.globals.gridWidth/2,"radialBar"===r.config.chart.type?this.fullAngle=360:this.fullAngle=Math.abs(r.config.plotOptions.pie.endAngle-r.config.plotOptions.pie.startAngle),this.initialAngle=r.config.plotOptions.pie.startAngle%this.fullAngle,r.globals.radialSize=this.defaultSize/2.05-r.config.stroke.width-(r.config.chart.sparkline.enabled?0:r.config.chart.dropShadow.blur),this.donutSize=r.globals.radialSize*parseInt(r.config.plotOptions.pie.donut.size,10)/100;var i=r.config.plotOptions.pie.customScale,n=r.globals.gridWidth/2,o=r.globals.gridHeight/2;this.translateX=n-n*i,this.translateY=o-o*i,this.dataLabelsGroup=new Pc(this.ctx).group({class:"apexcharts-datalabels-group",transform:"translate(".concat(this.translateX,", ").concat(this.translateY,") scale(").concat(i,")")}),this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSectorAngleArr=[]}var e,r;return e=t,r=[{key:"draw",value:function(t){var e=this,r=this.w,i=new Pc(this.ctx),n=i.group({class:"apexcharts-pie"});if(r.globals.noData)return n;for(var o=0,a=0;a<t.length;a++)o+=f.negToZero(t[a]);var s=[],l=i.group();0===o&&(o=1e-5),t.forEach((function(t){e.maxY=Math.max(e.maxY,t)})),r.config.yaxis[0].max&&(this.maxY=r.config.yaxis[0].max),"back"===r.config.grid.position&&"polarArea"===this.chartType&&this.drawPolarElements(n);for(var c=0;c<t.length;c++){var u=this.fullAngle*f.negToZero(t[c])/o;s.push(u),"polarArea"===this.chartType?(s[c]=this.fullAngle/t.length,this.sliceSizes.push(r.globals.radialSize*t[c]/this.maxY)):this.sliceSizes.push(r.globals.radialSize)}if(r.globals.dataChanged){for(var h,d=0,p=0;p<r.globals.previousPaths.length;p++)d+=f.negToZero(r.globals.previousPaths[p]);for(var g=0;g<r.globals.previousPaths.length;g++)h=this.fullAngle*f.negToZero(r.globals.previousPaths[g])/d,this.prevSectorAngleArr.push(h)}if(this.donutSize<0&&(this.donutSize=0),"donut"===this.chartType){var b=i.drawCircle(this.donutSize);b.attr({cx:this.centerX,cy:this.centerY,fill:r.config.plotOptions.pie.donut.background?r.config.plotOptions.pie.donut.background:"transparent"}),l.add(b)}var y=this.drawArcs(s,t);if(this.sliceLabels.forEach((function(t){y.add(t)})),l.attr({transform:"translate(".concat(this.translateX,", ").concat(this.translateY,") scale(").concat(r.config.plotOptions.pie.customScale,")")}),l.add(y),n.add(l),this.donutDataLabels.show){var v=this.renderInnerDataLabels(this.dataLabelsGroup,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});n.add(v)}return"front"===r.config.grid.position&&"polarArea"===this.chartType&&this.drawPolarElements(n),n}},{key:"drawArcs",value:function(t,e){var r=this.w,i=new vc(this.ctx),n=new Pc(this.ctx),o=new Zu(this.ctx),a=n.group({class:"apexcharts-slices"}),s=this.initialAngle,l=this.initialAngle,c=this.initialAngle,u=this.initialAngle;this.strokeWidth=r.config.stroke.show?r.config.stroke.width:0;for(var h=0;h<t.length;h++){var d=n.group({class:"apexcharts-series apexcharts-pie-series",seriesName:f.escapeString(r.globals.seriesNames[h]),rel:h+1,"data:realIndex":h});a.add(d),l=u,c=(s=c)+t[h],u=l+this.prevSectorAngleArr[h];var p=c<s?this.fullAngle+c-s:c-s,g=o.fillPath({seriesNumber:h,size:this.sliceSizes[h],value:e[h]}),b=this.getChangedPath(l,u),y=n.drawPath({d:b,stroke:Array.isArray(this.lineColorArr)?this.lineColorArr[h]:this.lineColorArr,strokeWidth:0,fill:g,fillOpacity:r.config.fill.opacity,classes:"apexcharts-pie-area apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(h)});if(y.attr({index:0,j:h}),i.setSelectionFilter(y,0,h),r.config.chart.dropShadow.enabled){var v=r.config.chart.dropShadow;i.dropShadow(y,v,h)}this.addListeners(y,this.donutDataLabels),Pc.setAttrs(y.node,{"data:angle":p,"data:startAngle":s,"data:strokeWidth":this.strokeWidth,"data:value":e[h]});var m={x:0,y:0};"pie"===this.chartType||"polarArea"===this.chartType?m=f.polarToCartesian(this.centerX,this.centerY,r.globals.radialSize/1.25+r.config.plotOptions.pie.dataLabels.offset,(s+p/2)%this.fullAngle):"donut"===this.chartType&&(m=f.polarToCartesian(this.centerX,this.centerY,(r.globals.radialSize+this.donutSize)/2+r.config.plotOptions.pie.dataLabels.offset,(s+p/2)%this.fullAngle)),d.add(y);var x=0;if(!this.initialAnim||r.globals.resized||r.globals.dataChanged?this.animBeginArr.push(0):(0==(x=p/this.fullAngle*r.config.chart.animations.speed)&&(x=1),this.animDur=x+this.animDur,this.animBeginArr.push(this.animDur)),this.dynamicAnim&&r.globals.dataChanged?this.animatePaths(y,{size:this.sliceSizes[h],endAngle:c,startAngle:s,prevStartAngle:l,prevEndAngle:u,animateStartingPos:!0,i:h,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:r.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(y,{size:this.sliceSizes[h],endAngle:c,startAngle:s,i:h,totalItems:t.length-1,animBeginArr:this.animBeginArr,dur:x}),r.config.plotOptions.pie.expandOnClick&&"polarArea"!==this.chartType&&y.node.addEventListener("mouseup",this.pieClicked.bind(this,h)),void 0!==r.globals.selectedDataPoints[0]&&r.globals.selectedDataPoints[0].indexOf(h)>-1&&this.pieClicked(h),r.config.dataLabels.enabled){var w=m.x,S=m.y,k=100*p/this.fullAngle+"%";if(0!==p&&r.config.plotOptions.pie.dataLabels.minAngleToShowLabel<t[h]){var A=r.config.dataLabels.formatter;void 0!==A&&(k=A(r.globals.seriesPercent[h][0],{seriesIndex:h,w:r}));var O=r.globals.dataLabels.style.colors[h],P=n.group({class:"apexcharts-datalabels"}),C=n.drawText({x:w,y:S,text:k,textAnchor:"middle",fontSize:r.config.dataLabels.style.fontSize,fontFamily:r.config.dataLabels.style.fontFamily,fontWeight:r.config.dataLabels.style.fontWeight,foreColor:O});if(P.add(C),r.config.dataLabels.dropShadow.enabled){var j=r.config.dataLabels.dropShadow;i.dropShadow(C,j)}C.node.classList.add("apexcharts-pie-label"),r.config.chart.animations.animate&&!1===r.globals.resized&&(C.node.classList.add("apexcharts-pie-label-delay"),C.node.style.animationDelay=r.config.chart.animations.speed/940+"s"),this.sliceLabels.push(P)}}}return a}},{key:"addListeners",value:function(t,e){var r=new Pc(this.ctx);t.node.addEventListener("mouseenter",r.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",r.pathMouseLeave.bind(this,t)),t.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this,t.node,e)),t.node.addEventListener("mousedown",r.pathMouseDown.bind(this,t)),this.donutDataLabels.total.showAlways||(t.node.addEventListener("mouseenter",this.printDataLabelsInner.bind(this,t.node,e)),t.node.addEventListener("mousedown",this.printDataLabelsInner.bind(this,t.node,e)))}},{key:"animatePaths",value:function(t,e){var r=this.w,i=e.endAngle<e.startAngle?this.fullAngle+e.endAngle-e.startAngle:e.endAngle-e.startAngle,n=i,o=e.startAngle,a=e.startAngle;void 0!==e.prevStartAngle&&void 0!==e.prevEndAngle&&(o=e.prevEndAngle,n=e.prevEndAngle<e.prevStartAngle?this.fullAngle+e.prevEndAngle-e.prevStartAngle:e.prevEndAngle-e.prevStartAngle),e.i===r.config.series.length-1&&(i+a>this.fullAngle?e.endAngle=e.endAngle-(i+a):i+a<this.fullAngle&&(e.endAngle=e.endAngle+(this.fullAngle-(i+a)))),i===this.fullAngle&&(i=this.fullAngle-.01),this.animateArc(t,o,a,i,n,e)}},{key:"animateArc",value:function(t,e,r,i,n,o){var a,s=this,l=this.w,c=new b(this.ctx),u=o.size;(isNaN(e)||isNaN(n))&&(e=r,n=i,o.dur=0);var h=i,f=r,d=e<r?this.fullAngle+e-r:e-r;l.globals.dataChanged&&o.shouldSetPrevPaths&&o.prevEndAngle&&(a=s.getPiePath({me:s,startAngle:o.prevStartAngle,angle:o.prevEndAngle<o.prevStartAngle?this.fullAngle+o.prevEndAngle-o.prevStartAngle:o.prevEndAngle-o.prevStartAngle,size:u}),t.attr({d:a})),0!==o.dur?t.animate(o.dur,o.animBeginArr[o.i]).after((function(){"pie"!==s.chartType&&"donut"!==s.chartType&&"polarArea"!==s.chartType||this.animate(l.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":s.strokeWidth}),o.i===l.config.series.length-1&&c.animationCompleted(t)})).during((function(l){h=d+(i-d)*l,o.animateStartingPos&&(h=n+(i-n)*l,f=e-n+(r-(e-n))*l),a=s.getPiePath({me:s,startAngle:f,angle:h,size:u}),t.node.setAttribute("data:pathOrig",a),t.attr({d:a})})):(a=s.getPiePath({me:s,startAngle:f,angle:i,size:u}),o.isTrack||(l.globals.animationEnded=!0),t.node.setAttribute("data:pathOrig",a),t.attr({d:a,"stroke-width":s.strokeWidth}))}},{key:"pieClicked",value:function(t){var e,r=this.w,i=this,n=i.sliceSizes[t]+(r.config.plotOptions.pie.expandOnClick?4:0),o=r.globals.dom.Paper.findOne(".apexcharts-".concat(i.chartType.toLowerCase(),"-slice-").concat(t));if("true"!==o.attr("data:pieClicked")){var a=r.globals.dom.baseEl.getElementsByClassName("apexcharts-pie-area");Array.prototype.forEach.call(a,(function(t){t.setAttribute("data:pieClicked","false");var e=t.getAttribute("data:pathOrig");e&&t.setAttribute("d",e)})),r.globals.capturedDataPointIndex=t,o.attr("data:pieClicked","true");var s=parseInt(o.attr("data:startAngle"),10),l=parseInt(o.attr("data:angle"),10);e=i.getPiePath({me:i,startAngle:s,angle:l,size:n}),360!==l&&o.plot(e)}else{o.attr({"data:pieClicked":"false"}),this.revertDataLabelsInner(o.node,this.donutDataLabels);var c=o.attr("data:pathOrig");o.attr({d:c})}}},{key:"getChangedPath",value:function(t,e){var r="";return this.dynamicAnim&&this.w.globals.dataChanged&&(r=this.getPiePath({me:this,startAngle:t,angle:e-t,size:this.size})),r}},{key:"getPiePath",value:function(t){var e,r=t.me,i=t.startAngle,n=t.angle,o=t.size,a=new Pc(this.ctx),s=i,l=Math.PI*(s-90)/180,c=n+i;Math.ceil(c)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(c=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(c)>this.fullAngle&&(c-=this.fullAngle);var u=Math.PI*(c-90)/180,h=r.centerX+o*Math.cos(l),d=r.centerY+o*Math.sin(l),p=r.centerX+o*Math.cos(u),g=r.centerY+o*Math.sin(u),b=f.polarToCartesian(r.centerX,r.centerY,r.donutSize,c),y=f.polarToCartesian(r.centerX,r.centerY,r.donutSize,s),v=n>180?1:0,m=["M",h,d,"A",o,o,0,v,1,p,g];return e="donut"===r.chartType?[].concat(m,["L",b.x,b.y,"A",r.donutSize,r.donutSize,0,v,0,y.x,y.y,"L",h,d,"z"]).join(" "):"pie"===r.chartType||"polarArea"===r.chartType?[].concat(m,["L",r.centerX,r.centerY,"L",h,d]).join(" "):[].concat(m).join(" "),a.roundPathCorners(e,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(t){var e=this.w,r=new Dh(this.ctx),i=new Pc(this.ctx),n=new Cg(this.ctx),o=i.group(),a=i.group(),s=r.niceScale(0,Math.ceil(this.maxY),0),l=s.result.reverse(),c=s.result.length;this.maxY=s.niceMax;for(var u=e.globals.radialSize,h=u/(c-1),f=0;f<c-1;f++){var d=i.drawCircle(u);if(d.attr({cx:this.centerX,cy:this.centerY,fill:"none","stroke-width":e.config.plotOptions.polarArea.rings.strokeWidth,stroke:e.config.plotOptions.polarArea.rings.strokeColor}),e.config.yaxis[0].show){var p=n.drawYAxisTexts(this.centerX,this.centerY-u+parseInt(e.config.yaxis[0].labels.style.fontSize,10)/2,f,l[f]);a.add(p)}o.add(d),u-=h}this.drawSpokes(t),t.add(o),t.add(a)}},{key:"renderInnerDataLabels",value:function(t,e,r){var i=this.w,n=new Pc(this.ctx),o=e.total.show;t.node.innerHTML="",t.node.style.opacity=r.opacity;var a,s,l=r.centerX,c=this.donutDataLabels.total.label?r.centerY:r.centerY-r.centerY/6;a=void 0===e.name.color?i.globals.colors[0]:e.name.color;var u=e.name.fontSize,h=e.name.fontFamily,f=e.name.fontWeight;s=void 0===e.value.color?i.config.chart.foreColor:e.value.color;var d=e.value.formatter,p="",g="";if(o?(a=e.total.color,u=e.total.fontSize,h=e.total.fontFamily,f=e.total.fontWeight,g=this.donutDataLabels.total.label?e.total.label:"",p=e.total.formatter(i)):1===i.globals.series.length&&(p=d(i.globals.series[0],i),g=i.globals.seriesNames[0]),g&&(g=e.name.formatter(g,e.total.show,i)),e.name.show){var b=n.drawText({x:l,y:c+parseFloat(e.name.offsetY),text:g,textAnchor:"middle",foreColor:a,fontSize:u,fontWeight:f,fontFamily:h});b.node.classList.add("apexcharts-datalabel-label"),t.add(b)}if(e.value.show){var y=e.name.show?parseFloat(e.value.offsetY)+16:e.value.offsetY,v=n.drawText({x:l,y:c+y,text:p,textAnchor:"middle",foreColor:s,fontWeight:e.value.fontWeight,fontSize:e.value.fontSize,fontFamily:e.value.fontFamily});v.node.classList.add("apexcharts-datalabel-value"),t.add(v)}return t}},{key:"printInnerLabels",value:function(t,e,r,i){var n,o=this.w;i?n=void 0===t.name.color?o.globals.colors[parseInt(i.parentNode.getAttribute("rel"),10)-1]:t.name.color:o.globals.series.length>1&&t.total.show&&(n=t.total.color);var a=o.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),s=o.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");r=(0,t.value.formatter)(r,o),i||"function"!=typeof t.total.formatter||(r=t.total.formatter(o));var l=e===t.total.label;e=this.donutDataLabels.total.label?t.name.formatter(e,l,o):"",null!==a&&(a.textContent=e),null!==s&&(s.textContent=r),null!==a&&(a.style.fill=n)}},{key:"printDataLabelsInner",value:function(t,e){var r=this.w,i=t.getAttribute("data:value"),n=r.globals.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];r.globals.series.length>1&&this.printInnerLabels(e,n,i,t);var o=r.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==o&&(o.style.opacity=1)}},{key:"drawSpokes",value:function(t){var e=this,r=this.w,i=new Pc(this.ctx),n=r.config.plotOptions.polarArea.spokes;if(0!==n.strokeWidth){for(var o=[],a=360/r.globals.series.length,s=0;s<r.globals.series.length;s++)o.push(f.polarToCartesian(this.centerX,this.centerY,r.globals.radialSize,r.config.plotOptions.pie.startAngle+a*s));o.forEach((function(r,o){var a=i.drawLine(r.x,r.y,e.centerX,e.centerY,Array.isArray(n.connectorColors)?n.connectorColors[o]:n.connectorColors);t.add(a)}))}}},{key:"revertDataLabelsInner",value:function(){var t=this.w;if(this.donutDataLabels.show){var e=t.globals.dom.Paper.findOne(".apexcharts-datalabels-group"),r=this.renderInnerDataLabels(e,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});t.globals.dom.Paper.findOne(".apexcharts-radialbar, .apexcharts-pie").add(r)}}}],r&&Tg(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Lg=Mg;function Ig(t){return Ig="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},Ig(t)}function _g(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Rg(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?_g(Object(r),!0).forEach((function(e){zg(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_g(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function zg(t,e,r){return(e=Dg(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Xg(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Dg(i.key),i)}}function Dg(t){var e=function(t){if("object"!=Ig(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ig(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ig(e)?e:e+""}var Yg=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0;var r=this.w;this.graphics=new Pc(this.ctx),this.lineColorArr=void 0!==r.globals.stroke.colors?r.globals.stroke.colors:r.globals.colors,this.defaultSize=r.globals.svgHeight<r.globals.svgWidth?r.globals.gridHeight:r.globals.gridWidth,this.isLog=r.config.yaxis[0].logarithmic,this.logBase=r.config.yaxis[0].logBase,this.coreUtils=new Mc(this.ctx),this.maxValue=this.isLog?this.coreUtils.getLogVal(this.logBase,r.globals.maxY,0):r.globals.maxY,this.minValue=this.isLog?this.coreUtils.getLogVal(this.logBase,this.w.globals.minY,0):r.globals.minY,this.polygons=r.config.plotOptions.radar.polygons,this.strokeWidth=r.config.stroke.show?r.config.stroke.width:0,this.size=this.defaultSize/2.1-this.strokeWidth-r.config.chart.dropShadow.blur,r.config.xaxis.labels.show&&(this.size=this.size-r.globals.xAxisLabelsWidth/1.75),void 0!==r.config.plotOptions.radar.size&&(this.size=r.config.plotOptions.radar.size),this.dataRadiusOfPercent=[],this.dataRadius=[],this.angleArr=[],this.yaxisLabelsTextsPos=[]}var e,r;return e=t,r=[{key:"draw",value:function(t){var e=this,r=this.w,i=new Zu(this.ctx),n=[],o=new lh(this.ctx);t.length&&(this.dataPointsLen=t[r.globals.maxValsInArrayIndex].length),this.disAngle=2*Math.PI/this.dataPointsLen;var a=r.globals.gridWidth/2,s=r.globals.gridHeight/2,l=a+r.config.plotOptions.radar.offsetX,c=s+r.config.plotOptions.radar.offsetY,u=this.graphics.group({class:"apexcharts-radar-series apexcharts-plot-series",transform:"translate(".concat(l||0,", ").concat(c||0,")")}),h=[],d=null,p=null;if(this.yaxisLabels=this.graphics.group({class:"apexcharts-yaxis"}),t.forEach((function(t,a){var s=t.length===r.globals.dataPoints,l=e.graphics.group().attr({class:"apexcharts-series","data:longestSeries":s,seriesName:f.escapeString(r.globals.seriesNames[a]),rel:a+1,"data:realIndex":a});e.dataRadiusOfPercent[a]=[],e.dataRadius[a]=[],e.angleArr[a]=[],t.forEach((function(t,r){var i=Math.abs(e.maxValue-e.minValue);t-=e.minValue,e.isLog&&(t=e.coreUtils.getLogVal(e.logBase,t,0)),e.dataRadiusOfPercent[a][r]=t/i,e.dataRadius[a][r]=e.dataRadiusOfPercent[a][r]*e.size,e.angleArr[a][r]=r*e.disAngle})),h=e.getDataPointsPos(e.dataRadius[a],e.angleArr[a]);var c=e.createPaths(h,{x:0,y:0});d=e.graphics.group({class:"apexcharts-series-markers-wrap apexcharts-element-hidden"}),p=e.graphics.group({class:"apexcharts-datalabels","data:realIndex":a}),r.globals.delayedElements.push({el:d.node,index:a});var u={i:a,realIndex:a,animationDelay:a,initialSpeed:r.config.chart.animations.speed,dataChangeSpeed:r.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-radar",shouldClipToGrid:!1,bindEventsOnPaths:!1,stroke:r.globals.stroke.colors[a],strokeLineCap:r.config.stroke.lineCap},g=null;r.globals.previousPaths.length>0&&(g=e.getPreviousPath(a));for(var b=0;b<c.linePathsTo.length;b++){var y=e.graphics.renderPaths(Rg(Rg({},u),{},{pathFrom:null===g?c.linePathsFrom[b]:g,pathTo:c.linePathsTo[b],strokeWidth:Array.isArray(e.strokeWidth)?e.strokeWidth[a]:e.strokeWidth,fill:"none",drawShadow:!1}));l.add(y);var v=i.fillPath({seriesNumber:a}),m=e.graphics.renderPaths(Rg(Rg({},u),{},{pathFrom:null===g?c.areaPathsFrom[b]:g,pathTo:c.areaPathsTo[b],strokeWidth:0,fill:v,drawShadow:!1}));if(r.config.chart.dropShadow.enabled){var x=new vc(e.ctx),w=r.config.chart.dropShadow;x.dropShadow(m,Object.assign({},w,{noUserSpaceOnUse:!0}),a)}l.add(m)}t.forEach((function(t,i){var n=new Ku(e.ctx).getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:a,dataPointIndex:i}),s=e.graphics.drawMarker(h[i].x,h[i].y,n);s.attr("rel",i),s.attr("j",i),s.attr("index",a),s.node.setAttribute("default-marker-size",n.pSize);var c=e.graphics.group({class:"apexcharts-series-markers"});c&&c.add(s),d.add(c),l.add(d);var u=r.config.dataLabels;if(u.enabled){var f=u.formatter(r.globals.series[a][i],{seriesIndex:a,dataPointIndex:i,w:r});o.plotDataLabelsText({x:h[i].x,y:h[i].y,text:f,textAnchor:"middle",i:a,j:a,parent:p,offsetCorrection:!1,dataLabelsConfig:Rg({},u)})}l.add(p)})),n.push(l)})),this.drawPolygons({parent:u}),r.config.xaxis.labels.show){var g=this.drawXAxisTexts();u.add(g)}return n.forEach((function(t){u.add(t)})),u.add(this.yaxisLabels),u}},{key:"drawPolygons",value:function(t){for(var e=this,r=this.w,i=t.parent,n=new Cg(this.ctx),o=r.globals.yAxisScale[0].result.reverse(),a=o.length,s=[],l=this.size/(a-1),c=0;c<a;c++)s[c]=l*c;s.reverse();var u=[],h=[];s.forEach((function(t,r){var i=f.getPolygonPos(t,e.dataPointsLen),n="";i.forEach((function(t,i){if(0===r){var o=e.graphics.drawLine(t.x,t.y,0,0,Array.isArray(e.polygons.connectorColors)?e.polygons.connectorColors[i]:e.polygons.connectorColors);h.push(o)}0===i&&e.yaxisLabelsTextsPos.push({x:t.x,y:t.y}),n+=t.x+","+t.y+" "})),u.push(n)})),u.forEach((function(t,n){var o=e.polygons.strokeColors,a=e.polygons.strokeWidth,s=e.graphics.drawPolygon(t,Array.isArray(o)?o[n]:o,Array.isArray(a)?a[n]:a,r.globals.radarPolygons.fill.colors[n]);i.add(s)})),h.forEach((function(t){i.add(t)})),r.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach((function(t,r){var i=n.drawYAxisTexts(t.x,t.y,r,o[r]);e.yaxisLabels.add(i)}))}},{key:"drawXAxisTexts",value:function(){var t=this,e=this.w,r=e.config.xaxis.labels,i=this.graphics.group({class:"apexcharts-xaxis"}),n=f.getPolygonPos(this.size,this.dataPointsLen);return e.globals.labels.forEach((function(o,a){var s=e.config.xaxis.labels.formatter,l=new lh(t.ctx);if(n[a]){var c=t.getTextPos(n[a],t.size),u=s(o,{seriesIndex:-1,dataPointIndex:a,w:e});l.plotDataLabelsText({x:c.newX,y:c.newY,text:u,textAnchor:c.textAnchor,i:a,j:a,parent:i,className:"apexcharts-xaxis-label",color:Array.isArray(r.style.colors)&&r.style.colors[a]?r.style.colors[a]:"#a8a8a8",dataLabelsConfig:Rg({textAnchor:c.textAnchor,dropShadow:{enabled:!1}},r),offsetCorrection:!1}).on("click",(function(r){if("function"==typeof e.config.chart.events.xAxisLabelClick){var i=Object.assign({},e,{labelIndex:a});e.config.chart.events.xAxisLabelClick(r,t.ctx,i)}}))}})),i}},{key:"createPaths",value:function(t,e){var r=this,i=[],n=[],o=[],a=[];if(t.length){n=[this.graphics.move(e.x,e.y)],a=[this.graphics.move(e.x,e.y)];var s=this.graphics.move(t[0].x,t[0].y),l=this.graphics.move(t[0].x,t[0].y);t.forEach((function(e,i){s+=r.graphics.line(e.x,e.y),l+=r.graphics.line(e.x,e.y),i===t.length-1&&(s+="Z",l+="Z")})),i.push(s),o.push(l)}return{linePathsFrom:n,linePathsTo:i,areaPathsFrom:a,areaPathsTo:o}}},{key:"getTextPos",value:function(t,e){var r="middle",i=t.x,n=t.y;return Math.abs(t.x)>=10?t.x>0?(r="start",i+=10):t.x<0&&(r="end",i-=10):r="middle",Math.abs(t.y)>=e-10&&(t.y<0?n-=10:t.y>0&&(n+=10)),{textAnchor:r,newX:i,newY:n}}},{key:"getPreviousPath",value:function(t){for(var e=this.w,r=null,i=0;i<e.globals.previousPaths.length;i++){var n=e.globals.previousPaths[i];n.paths.length>0&&parseInt(n.realIndex,10)===parseInt(t,10)&&void 0!==e.globals.previousPaths[i].paths[0]&&(r=e.globals.previousPaths[i].paths[0].d)}return r}},{key:"getDataPointsPos",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;t=t||[],e=e||[];for(var i=[],n=0;n<r;n++){var o={};o.x=t[n]*Math.sin(e[n]),o.y=-t[n]*Math.cos(e[n]),i.push(o)}return i}}],r&&Xg(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Hg=Yg;function Fg(t){return Fg="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},Fg(t)}function Bg(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Ng(i.key),i)}}function Ng(t){var e=function(t){if("object"!=Fg(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Fg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Fg(e)?e:e+""}function Wg(t,e){return Wg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Wg(t,e)}function Gg(t){var e=Ug();return function(){var r,i=qg(t);if(e){var n=qg(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Fg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Vg(t)}(this,r)}}function Vg(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ug(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ug=function(){return!!t})()}function qg(t){return qg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},qg(t)}var Zg=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wg(t,e)}(n,t);var e,r,i=Gg(n);function n(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(e=i.call(this,t)).ctx=t,e.w=t.w,e.animBeginArr=[0],e.animDur=0;var r=e.w;return e.startAngle=r.config.plotOptions.radialBar.startAngle,e.endAngle=r.config.plotOptions.radialBar.endAngle,e.totalAngle=Math.abs(r.config.plotOptions.radialBar.endAngle-r.config.plotOptions.radialBar.startAngle),e.trackStartAngle=r.config.plotOptions.radialBar.track.startAngle,e.trackEndAngle=r.config.plotOptions.radialBar.track.endAngle,e.barLabels=e.w.config.plotOptions.radialBar.barLabels,e.donutDataLabels=e.w.config.plotOptions.radialBar.dataLabels,e.radialDataLabels=e.donutDataLabels,e.trackStartAngle||(e.trackStartAngle=e.startAngle),e.trackEndAngle||(e.trackEndAngle=e.endAngle),360===e.endAngle&&(e.endAngle=359.99),e.margin=parseInt(r.config.plotOptions.radialBar.track.margin,10),e.onBarLabelClick=e.onBarLabelClick.bind(Vg(e)),e}return e=n,r=[{key:"draw",value:function(t){var e=this.w,r=new Pc(this.ctx),i=r.group({class:"apexcharts-radialbar"});if(e.globals.noData)return i;var n=r.group(),o=this.defaultSize/2,a=e.globals.gridWidth/2,s=this.defaultSize/2.05;e.config.chart.sparkline.enabled||(s=s-e.config.stroke.width-e.config.chart.dropShadow.blur);var l=e.globals.fill.colors;if(e.config.plotOptions.radialBar.track.show){var c=this.drawTracks({size:s,centerX:a,centerY:o,colorArr:l,series:t});n.add(c)}var u=this.drawArcs({size:s,centerX:a,centerY:o,colorArr:l,series:t}),h=360;e.config.plotOptions.radialBar.startAngle<0&&(h=this.totalAngle);var f=(360-h)/360;if(e.globals.radialSize=s-s*f,this.radialDataLabels.value.show){var d=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);e.globals.radialSize+=d*f}return n.add(u.g),"front"===e.config.plotOptions.radialBar.hollow.position&&(u.g.add(u.elHollow),u.dataLabels&&u.g.add(u.dataLabels)),i.add(n),i}},{key:"drawTracks",value:function(t){var e=this.w,r=new Pc(this.ctx),i=r.group({class:"apexcharts-tracks"}),n=new vc(this.ctx),o=new Zu(this.ctx),a=this.getStrokeWidth(t);t.size=t.size-a/2;for(var s=0;s<t.series.length;s++){var l=r.group({class:"apexcharts-radialbar-track apexcharts-track"});i.add(l),l.attr({rel:s+1}),t.size=t.size-a-this.margin;var c=e.config.plotOptions.radialBar.track,u=o.fillPath({seriesNumber:0,size:t.size,fillColors:Array.isArray(c.background)?c.background[s]:c.background,solid:!0}),h=this.trackStartAngle,f=this.trackEndAngle;Math.abs(f)+Math.abs(h)>=360&&(f=360-Math.abs(this.startAngle)-.1);var d=r.drawPath({d:"",stroke:u,strokeWidth:a*parseInt(c.strokeWidth,10)/100,fill:"none",strokeOpacity:c.opacity,classes:"apexcharts-radialbar-area"});if(c.dropShadow.enabled){var p=c.dropShadow;n.dropShadow(d,p)}l.add(d),d.attr("id","apexcharts-radialbarTrack-"+s),this.animatePaths(d,{centerX:t.centerX,centerY:t.centerY,endAngle:f,startAngle:h,size:t.size,i:s,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return i}},{key:"drawArcs",value:function(t){var e=this.w,r=new Pc(this.ctx),i=new Zu(this.ctx),n=new vc(this.ctx),o=r.group(),a=this.getStrokeWidth(t);t.size=t.size-a/2;var s=e.config.plotOptions.radialBar.hollow.background,l=t.size-a*t.series.length-this.margin*t.series.length-a*parseInt(e.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,c=l-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(s=this.drawHollowImage(t,o,l,s));var u=this.drawHollow({size:c,centerX:t.centerX,centerY:t.centerY,fill:s||"transparent"});if(e.config.plotOptions.radialBar.hollow.dropShadow.enabled){var h=e.config.plotOptions.radialBar.hollow.dropShadow;n.dropShadow(u,h)}var d=1;!this.radialDataLabels.total.show&&e.globals.series.length>1&&(d=0);var p=null;if(this.radialDataLabels.show){var g=e.globals.dom.Paper.findOne(".apexcharts-datalabels-group");p=this.renderInnerDataLabels(g,this.radialDataLabels,{hollowSize:l,centerX:t.centerX,centerY:t.centerY,opacity:d})}"back"===e.config.plotOptions.radialBar.hollow.position&&(o.add(u),p&&o.add(p));var b=!1;e.config.plotOptions.radialBar.inverseOrder&&(b=!0);for(var y=b?t.series.length-1:0;b?y>=0:y<t.series.length;b?y--:y++){var v=r.group({class:"apexcharts-series apexcharts-radial-series",seriesName:f.escapeString(e.globals.seriesNames[y])});o.add(v),v.attr({rel:y+1,"data:realIndex":y}),this.ctx.series.addCollapsedClassToSeries(v,y),t.size=t.size-a-this.margin;var m=i.fillPath({seriesNumber:y,size:t.size,value:t.series[y]}),x=this.startAngle,w=void 0,S=f.negToZero(t.series[y]>100?100:t.series[y])/100,k=Math.round(this.totalAngle*S)+this.startAngle,A=void 0;e.globals.dataChanged&&(w=this.startAngle,A=Math.round(this.totalAngle*f.negToZero(e.globals.previousPaths[y])/100)+w),Math.abs(k)+Math.abs(x)>360&&(k-=.01),Math.abs(A)+Math.abs(w)>360&&(A-=.01);var O=k-x,P=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[y]:e.config.stroke.dashArray,C=r.drawPath({d:"",stroke:m,strokeWidth:a,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+y,strokeDashArray:P});if(Pc.setAttrs(C.node,{"data:angle":O,"data:value":t.series[y]}),e.config.chart.dropShadow.enabled){var j=e.config.chart.dropShadow;n.dropShadow(C,j,y)}if(n.setSelectionFilter(C,0,y),this.addListeners(C,this.radialDataLabels),v.add(C),C.attr({index:0,j:y}),this.barLabels.enabled){var T=f.polarToCartesian(t.centerX,t.centerY,t.size,x),E=this.barLabels.formatter(e.globals.seriesNames[y],{seriesIndex:y,w:e}),M=["apexcharts-radialbar-label"];this.barLabels.onClick||M.push("apexcharts-no-click");var L=this.barLabels.useSeriesColors?e.globals.colors[y]:e.config.chart.foreColor;L||(L=e.config.chart.foreColor);var I=T.x+this.barLabels.offsetX,_=T.y+this.barLabels.offsetY,R=r.drawText({x:I,y:_,text:E,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:L,cssClass:M.join(" ")});R.on("click",this.onBarLabelClick),R.attr({rel:y+1}),0!==x&&R.attr({"transform-origin":"".concat(I," ").concat(_),transform:"rotate(".concat(x," 0 0)")}),v.add(R)}var z=0;!this.initialAnim||e.globals.resized||e.globals.dataChanged||(z=e.config.chart.animations.speed),e.globals.dataChanged&&(z=e.config.chart.animations.dynamicAnimation.speed),this.animDur=z/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(C,{centerX:t.centerX,centerY:t.centerY,endAngle:k,startAngle:x,prevEndAngle:A,prevStartAngle:w,size:t.size,i:y,totalItems:2,animBeginArr:this.animBeginArr,dur:z,shouldSetPrevPaths:!0})}return{g:o,elHollow:u,dataLabels:p}}},{key:"drawHollow",value:function(t){var e=new Pc(this.ctx).drawCircle(2*t.size);return e.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),e}},{key:"drawHollowImage",value:function(t,e,r,i){var n=this.w,o=new Zu(this.ctx),a=f.randomId(),s=n.config.plotOptions.radialBar.hollow.image;if(n.config.plotOptions.radialBar.hollow.imageClipped)o.clippedImgArea({width:r,height:r,image:s,patternID:"pattern".concat(n.globals.cuid).concat(a)}),i="url(#pattern".concat(n.globals.cuid).concat(a,")");else{var l=n.config.plotOptions.radialBar.hollow.imageWidth,c=n.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===c){var u=n.globals.dom.Paper.image(s,(function(e){this.move(t.centerX-e.width/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+n.config.plotOptions.radialBar.hollow.imageOffsetY)}));e.add(u)}else{var h=n.globals.dom.Paper.image(s,(function(e){this.move(t.centerX-l/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-c/2+n.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,c)}));e.add(h)}}return i}},{key:"getStrokeWidth",value:function(t){var e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(t){var e=parseInt(t.target.getAttribute("rel"),10)-1,r=this.barLabels.onClick,i=this.w;r&&r(i.globals.seriesNames[e],{w:i,seriesIndex:e})}}],r&&Bg(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Lg);const $g=Zg;function Jg(t){return Jg="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},Jg(t)}function Qg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Kg(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Qg(Object(r),!0).forEach((function(e){tb(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Qg(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function tb(t,e,r){return(e=rb(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function eb(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,rb(i.key),i)}}function rb(t){var e=function(t){if("object"!=Jg(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Jg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Jg(e)?e:e+""}function ib(t,e){return ib=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ib(t,e)}function nb(t){var e=ob();return function(){var r,i=ab(t);if(e){var n=ab(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Jg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function ob(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ob=function(){return!!t})()}function ab(t){return ab=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ab(t)}var sb=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ib(t,e)}(n,t);var e,r,i=nb(n);function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.apply(this,arguments)}return e=n,r=[{key:"draw",value:function(t,e){var r=this.w,i=new Pc(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=r.globals.seriesRangeStart,this.seriesRangeEnd=r.globals.seriesRangeEnd,this.barHelpers.initVariables(t);for(var n=i.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),o=0;o<t.length;o++){var a,s,l,c,u=void 0,h=void 0,d=r.globals.comboCharts?e[o]:o,p=this.barHelpers.getGroupIndex(d).columnGroupIndex,g=i.group({class:"apexcharts-series",seriesName:f.escapeString(r.globals.seriesNames[d]),rel:o+1,"data:realIndex":d});this.ctx.series.addCollapsedClassToSeries(g,d),t[o].length>0&&(this.visibleI=this.visibleI+1);var b=0,y=0,v=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[d][0],v=d);var m=this.barHelpers.initialPositions();h=m.y,c=m.zeroW,u=m.x,y=m.barWidth,b=m.barHeight,a=m.xDivision,s=m.yDivision,l=m.zeroH;for(var x=i.group({class:"apexcharts-datalabels","data:realIndex":d}),w=i.group({class:"apexcharts-rangebar-goals-markers"}),S=0;S<r.globals.dataPoints;S++){var k=this.barHelpers.getStrokeWidth(o,S,d),A=this.seriesRangeStart[o][S],O=this.seriesRangeEnd[o][S],P=null,C=null,j=null,T={x:u,y:h,strokeWidth:k,elSeries:g},E=this.seriesLen;if(r.config.plotOptions.bar.rangeBarGroupRows&&(E=1),void 0===r.config.series[o].data[S])break;if(this.isHorizontal){j=h+b*this.visibleI;var M=(s-b*E)/2;if(r.config.series[o].data[S].x){var L=this.detectOverlappingBars({i:o,j:S,barYPosition:j,srty:M,barHeight:b,yDivision:s,initPositions:m});b=L.barHeight,j=L.barYPosition}y=(P=this.drawRangeBarPaths(Kg({indexes:{i:o,j:S,realIndex:d},barHeight:b,barYPosition:j,zeroW:c,yDivision:s,y1:A,y2:O},T))).barWidth}else{r.globals.isXNumeric&&(u=(r.globals.seriesX[o][S]-r.globals.minX)/this.xRatio-y/2),C=u+y*this.visibleI;var I=(a-y*E)/2;if(r.config.series[o].data[S].x){var _=this.detectOverlappingBars({i:o,j:S,barXPosition:C,srtx:I,barWidth:y,xDivision:a,initPositions:m});y=_.barWidth,C=_.barXPosition}b=(P=this.drawRangeColumnPaths(Kg({indexes:{i:o,j:S,realIndex:d,translationsIndex:v},barWidth:y,barXPosition:C,zeroH:l,xDivision:a},T))).barHeight}var R=this.barHelpers.drawGoalLine({barXPosition:P.barXPosition,barYPosition:j,goalX:P.goalX,goalY:P.goalY,barHeight:b,barWidth:y});R&&w.add(R),h=P.y,u=P.x;var z=this.barHelpers.getPathFillColor(t,o,S,d);this.renderSeries({realIndex:d,pathFill:z.color,lineFill:z.useRangeColor?z.color:r.globals.stroke.colors[d],j:S,i:o,x:u,y:h,y1:A,y2:O,pathFrom:P.pathFrom,pathTo:P.pathTo,strokeWidth:k,elSeries:g,series:t,barHeight:b,barWidth:y,barXPosition:C,barYPosition:j,columnGroupIndex:p,elDataLabelsWrap:x,elGoalsMarkers:w,visibleSeries:this.visibleI,type:"rangebar"})}n.add(g)}return n}},{key:"detectOverlappingBars",value:function(t){var e=t.i,r=t.j,i=t.barYPosition,n=t.barXPosition,o=t.srty,a=t.srtx,s=t.barHeight,l=t.barWidth,c=t.yDivision,u=t.xDivision,h=t.initPositions,f=this.w,d=[],p=f.config.series[e].data[r].rangeName,g=f.config.series[e].data[r].x,b=Array.isArray(g)?g.join(" "):g,y=f.globals.labels.map((function(t){return Array.isArray(t)?t.join(" "):t})).indexOf(b),v=f.globals.seriesRange[e].findIndex((function(t){return t.x===b&&t.overlaps.length>0}));return this.isHorizontal?(i=f.config.plotOptions.bar.rangeBarGroupRows?o+c*y:o+s*this.visibleI+c*y,v>-1&&!f.config.plotOptions.bar.rangeBarOverlap&&(d=f.globals.seriesRange[e][v].overlaps).indexOf(p)>-1&&(i=(s=h.barHeight/d.length)*this.visibleI+c*(100-parseInt(this.barOptions.barHeight,10))/100/2+s*(this.visibleI+d.indexOf(p))+c*y)):(y>-1&&!f.globals.timescaleLabels.length&&(n=f.config.plotOptions.bar.rangeBarGroupRows?a+u*y:a+l*this.visibleI+u*y),v>-1&&!f.config.plotOptions.bar.rangeBarOverlap&&(d=f.globals.seriesRange[e][v].overlaps).indexOf(p)>-1&&(n=(l=h.barWidth/d.length)*this.visibleI+u*(100-parseInt(this.barOptions.barWidth,10))/100/2+l*(this.visibleI+d.indexOf(p))+u*y)),{barYPosition:i,barXPosition:n,barHeight:s,barWidth:l}}},{key:"drawRangeColumnPaths",value:function(t){var e=t.indexes,r=t.x,i=t.xDivision,n=t.barWidth,o=t.barXPosition,a=t.zeroH,s=this.w,l=e.i,c=e.j,u=e.realIndex,h=e.translationsIndex,f=this.yRatio[h],d=this.getRangeValue(u,c),p=Math.min(d.start,d.end),g=Math.max(d.start,d.end);void 0===this.series[l][c]||null===this.series[l][c]?p=a:(p=a-p/f,g=a-g/f);var b=Math.abs(g-p),y=this.barHelpers.getColumnPaths({barXPosition:o,barWidth:n,y1:p,y2:g,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:u,i:u,j:c,w:s});if(s.globals.isXNumeric){var v=this.getBarXForNumericXAxis({x:r,j:c,realIndex:u,barWidth:n});r=v.x,o=v.barXPosition}else r+=i;return{pathTo:y.pathTo,pathFrom:y.pathFrom,barHeight:b,x:r,y:d.start<0&&d.end<0?p:g,goalY:this.barHelpers.getGoalValues("y",null,a,l,c,h),barXPosition:o}}},{key:"preventBarOverflow",value:function(t){var e=this.w;return t<0&&(t=0),t>e.globals.gridWidth&&(t=e.globals.gridWidth),t}},{key:"drawRangeBarPaths",value:function(t){var e=t.indexes,r=t.y,i=t.y1,n=t.y2,o=t.yDivision,a=t.barHeight,s=t.barYPosition,l=t.zeroW,c=this.w,u=e.realIndex,h=e.j,f=this.preventBarOverflow(l+i/this.invertedYRatio),d=this.preventBarOverflow(l+n/this.invertedYRatio),p=this.getRangeValue(u,h),g=Math.abs(d-f),b=this.barHelpers.getBarpaths({barYPosition:s,barHeight:a,x1:f,x2:d,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:u,realIndex:u,j:h,w:c});return c.globals.isXNumeric||(r+=o),{pathTo:b.pathTo,pathFrom:b.pathFrom,barWidth:g,x:p.start<0&&p.end<0?f:d,goalX:this.barHelpers.getGoalValues("x",l,null,u,h),y:r}}},{key:"getRangeValue",value:function(t,e){var r=this.w;return{start:r.globals.seriesRangeStart[t][e],end:r.globals.seriesRangeEnd[t][e]}}}],r&&eb(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Np);const lb=sb;function cb(t){return cb="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},cb(t)}function ub(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,hb(i.key),i)}}function hb(t){var e=function(t){if("object"!=cb(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=cb(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==cb(e)?e:e+""}var fb=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.w=e.w,this.lineCtx=e}var e,r;return e=t,r=[{key:"sameValueSeriesFix",value:function(t,e){var r=this.w;if(("gradient"===r.config.fill.type||"gradient"===r.config.fill.type[t])&&new Mc(this.lineCtx.ctx,r).seriesHaveSameValues(t)){var i=e[t].slice();i[i.length-1]=i[i.length-1]+1e-6,e[t]=i}return e}},{key:"calculatePoints",value:function(t){var e=t.series,r=t.realIndex,i=t.x,n=t.y,o=t.i,a=t.j,s=t.prevY,l=this.w,c=[],u=[];if(0===a){var h=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;l.globals.isXNumeric&&(h=(l.globals.seriesX[r][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),c.push(h),u.push(f.isNumber(e[o][0])?s+l.config.markers.offsetY:null),c.push(i+l.config.markers.offsetX),u.push(f.isNumber(e[o][a+1])?n+l.config.markers.offsetY:null)}else c.push(i+l.config.markers.offsetX),u.push(f.isNumber(e[o][a+1])?n+l.config.markers.offsetY:null);return{x:c,y:u}}},{key:"checkPreviousPaths",value:function(t){for(var e=t.pathFromLine,r=t.pathFromArea,i=t.realIndex,n=this.w,o=0;o<n.globals.previousPaths.length;o++){var a=n.globals.previousPaths[o];("line"===a.type||"area"===a.type)&&a.paths.length>0&&parseInt(a.realIndex,10)===parseInt(i,10)&&("line"===a.type?(this.lineCtx.appendPathFrom=!1,e=n.globals.previousPaths[o].paths[0].d):"area"===a.type&&(this.lineCtx.appendPathFrom=!1,r=n.globals.previousPaths[o].paths[0].d,n.config.stroke.show&&n.globals.previousPaths[o].paths[1]&&(e=n.globals.previousPaths[o].paths[1].d)))}return{pathFromLine:e,pathFromArea:r}}},{key:"determineFirstPrevY",value:function(t){var e,r,i,n=t.i,o=t.realIndex,a=t.series,s=t.prevY,l=t.lineYPosition,c=t.translationsIndex,u=this.w,h=u.config.chart.stacked&&!u.globals.comboCharts||u.config.chart.stacked&&u.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[o])||void 0===e?void 0:e.type)||"column"===(null===(r=this.w.config.series[o])||void 0===r?void 0:r.type));if(void 0!==(null===(i=a[n])||void 0===i?void 0:i[0]))s=(l=h&&n>0?this.lineCtx.prevSeriesY[n-1][0]:this.lineCtx.zeroY)-a[n][0]/this.lineCtx.yRatio[c]+2*(this.lineCtx.isReversed?a[n][0]/this.lineCtx.yRatio[c]:0);else if(h&&n>0&&void 0===a[n][0])for(var f=n-1;f>=0;f--)if(null!==a[f][0]&&void 0!==a[f][0]){s=l=this.lineCtx.prevSeriesY[f][0];break}return{prevY:s,lineYPosition:l}}}],r&&ub(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),db=function(t){var e=function(t){for(var e,r,i,n,o=function(t){for(var e=[],r=t[0],i=t[1],n=e[0]=gb(r,i),o=1,a=t.length-1;o<a;o++)r=i,i=t[o+1],e[o]=.5*(n+(n=gb(r,i)));return e[o]=n,e}(t),a=t.length-1,s=[],l=0;l<a;l++)i=gb(t[l],t[l+1]),Math.abs(i)<1e-6?o[l]=o[l+1]=0:(n=(e=o[l]/i)*e+(r=o[l+1]/i)*r)>9&&(n=3*i/Math.sqrt(n),o[l]=n*e,o[l+1]=n*r);for(var c=0;c<=a;c++)n=(t[Math.min(a,c+1)][0]-t[Math.max(0,c-1)][0])/(6*(1+o[c]*o[c])),s.push([n||0,o[c]*n||0]);return s}(t),r=t[1],i=t[0],n=[],o=e[1],a=e[0];n.push(i,[i[0]+a[0],i[1]+a[1],r[0]-o[0],r[1]-o[1],r[0],r[1]]);for(var s=2,l=e.length;s<l;s++){var c=t[s],u=e[s];n.push([c[0]-u[0],c[1]-u[1],c[0],c[1]])}return n},pb=function(t,e,r){var i=t.slice(e,r);if(e){if(r-e>1&&i[1].length<6){var n=i[0].length;i[1]=[2*i[0][n-2]-i[0][n-4],2*i[0][n-1]-i[0][n-3]].concat(i[1])}i[0]=i[0].slice(-2)}return i};function gb(t,e){return(e[1]-t[1])/(e[0]-t[0])}function bb(t){return bb="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},bb(t)}function yb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function vb(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?yb(Object(r),!0).forEach((function(e){mb(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yb(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function mb(t,e,r){return(e=wb(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function xb(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,wb(i.key),i)}}function wb(t){var e=function(t){if("object"!=bb(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=bb(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==bb(e)?e:e+""}var Sb=function(){function t(e,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w,this.xyRatios=r,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||i,this.scatter=new ih(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new fb(this),this.markers=new Ku(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}var e,r;return e=t,r=[{key:"draw",value:function(t,e,r,i){var n,o=this.w,a=new Pc(this.ctx),s=o.globals.comboCharts?e:o.config.chart.type,l=a.group({class:"apexcharts-".concat(s,"-series apexcharts-plot-series")}),c=new Mc(this.ctx,o);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,t=c.getLogSeries(t),this.yRatio=c.getLogYRatios(this.yRatio),this.prevSeriesY=[];for(var u=[],h=0;h<t.length;h++){t=this.lineHelpers.sameValueSeriesFix(h,t);var f=o.globals.comboCharts?r[h]:h,d=this.yRatio.length>1?f:0;this._initSerieVariables(t,h,f);var p=[],g=[],b=[],y=o.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,f),o.globals.isXNumeric&&o.globals.seriesX.length>0&&(y=(o.globals.seriesX[f][0]-o.globals.minX)/this.xRatio),b.push(y);var v,m=y,x=void 0,w=m,S=this.zeroY,k=this.zeroY;S=this.lineHelpers.determineFirstPrevY({i:h,realIndex:f,series:t,prevY:S,lineYPosition:0,translationsIndex:d}).prevY,"monotoneCubic"===o.config.stroke.curve&&null===t[h][0]?p.push(null):p.push(S),v=S,"rangeArea"===s&&(x=k=this.lineHelpers.determineFirstPrevY({i:h,realIndex:f,series:i,prevY:k,lineYPosition:0,translationsIndex:d}).prevY,g.push(null!==p[0]?k:null));var A=this._calculatePathsFrom({type:s,series:t,i:h,realIndex:f,translationsIndex:d,prevX:w,prevY:S,prevY2:k}),O=[p[0]],P=[g[0]],C={type:s,series:t,realIndex:f,translationsIndex:d,i:h,x:y,y:1,pX:m,pY:v,pathsFrom:A,linePaths:[],areaPaths:[],seriesIndex:r,lineYPosition:0,xArrj:b,yArrj:p,y2Arrj:g,seriesRangeEnd:i},j=this._iterateOverDataPoints(vb(vb({},C),{},{iterations:"rangeArea"===s?t[h].length-1:void 0,isRangeStart:!0}));if("rangeArea"===s){for(var T=this._calculatePathsFrom({series:i,i:h,realIndex:f,prevX:w,prevY:k}),E=this._iterateOverDataPoints(vb(vb({},C),{},{series:i,xArrj:[y],yArrj:O,y2Arrj:P,pY:x,areaPaths:j.areaPaths,pathsFrom:T,iterations:i[h].length-1,isRangeStart:!1})),M=j.linePaths.length/2,L=0;L<M;L++)j.linePaths[L]=E.linePaths[L+M]+j.linePaths[L];j.linePaths.splice(M),j.pathFromLine=E.pathFromLine+j.pathFromLine}else j.pathFromArea+="z";this._handlePaths({type:s,realIndex:f,i:h,paths:j}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),u.push(this.elSeries)}if(void 0!==(null===(n=o.config.series[0])||void 0===n?void 0:n.zIndex)&&u.sort((function(t,e){return Number(t.node.getAttribute("zIndex"))-Number(e.node.getAttribute("zIndex"))})),o.config.chart.stacked)for(var I=u.length-1;I>=0;I--)l.add(u[I]);else for(var _=0;_<u.length;_++)l.add(u[_]);return l}},{key:"_initSerieVariables",value:function(t,e,r){var i=this.w,n=new Pc(this.ctx);this.xDivision=i.globals.gridWidth/(i.globals.dataPoints-("on"===i.config.xaxis.tickPlacement?1:0)),this.strokeWidth=Array.isArray(i.config.stroke.width)?i.config.stroke.width[r]:i.config.stroke.width;var o=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[r],o=r),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed,this.zeroY=i.globals.gridHeight-this.baseLineY[o]-(this.isReversed?i.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[o]:0),this.areaBottomY=this.zeroY,(this.zeroY>i.globals.gridHeight||"end"===i.config.plotOptions.area.fillTo)&&(this.areaBottomY=i.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=n.group({class:"apexcharts-series",zIndex:void 0!==i.config.series[r].zIndex?i.config.series[r].zIndex:r,seriesName:f.escapeString(i.globals.seriesNames[r])}),this.elPointsMain=n.group({class:"apexcharts-series-markers-wrap","data:realIndex":r}),this.elDataLabelsWrap=n.group({class:"apexcharts-datalabels","data:realIndex":r});var a=t[e].length===i.globals.dataPoints;this.elSeries.attr({"data:longestSeries":a,rel:e+1,"data:realIndex":r}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(t){var e,r,i,n,o=t.type,a=t.series,s=t.i,l=t.realIndex,c=t.translationsIndex,u=t.prevX,h=t.prevY,f=t.prevY2,d=this.w,p=new Pc(this.ctx);if(null===a[s][0]){for(var g=0;g<a[s].length;g++)if(null!==a[s][g]){u=this.xDivision*g,h=this.zeroY-a[s][g]/this.yRatio[c],e=p.move(u,h),r=p.move(u,this.areaBottomY);break}}else e=p.move(u,h),"rangeArea"===o&&(e=p.move(u,f)+p.line(u,h)),r=p.move(u,this.areaBottomY)+p.line(u,h);if(i=p.move(0,this.areaBottomY)+p.line(0,this.areaBottomY),n=p.move(0,this.areaBottomY)+p.line(0,this.areaBottomY),d.globals.previousPaths.length>0){var b=this.lineHelpers.checkPreviousPaths({pathFromLine:i,pathFromArea:n,realIndex:l});i=b.pathFromLine,n=b.pathFromArea}return{prevX:u,prevY:h,linePath:e,areaPath:r,pathFromLine:i,pathFromArea:n}}},{key:"_handlePaths",value:function(t){var e=t.type,r=t.realIndex,i=t.i,n=t.paths,o=this.w,a=new Pc(this.ctx),s=new Zu(this.ctx);this.prevSeriesY.push(n.yArrj),o.globals.seriesXvalues[r]=n.xArrj,o.globals.seriesYvalues[r]=n.yArrj;var l=o.config.forecastDataPoints;if(l.count>0&&"rangeArea"!==e){var c=o.globals.seriesXvalues[r][o.globals.seriesXvalues[r].length-l.count-1],u=a.drawRect(c,0,o.globals.gridWidth,o.globals.gridHeight,0);o.globals.dom.elForecastMask.appendChild(u.node);var h=a.drawRect(0,0,c,o.globals.gridHeight,0);o.globals.dom.elNonForecastMask.appendChild(h.node)}this.pointsChart||o.globals.delayedElements.push({el:this.elPointsMain.node,index:r});var f={i,realIndex:r,animationDelay:i,initialSpeed:o.config.chart.animations.speed,dataChangeSpeed:o.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(e)};if("area"===e)for(var d=s.fillPath({seriesNumber:r}),p=0;p<n.areaPaths.length;p++){var g=a.renderPaths(vb(vb({},f),{},{pathFrom:n.pathFromArea,pathTo:n.areaPaths[p],stroke:"none",strokeWidth:0,strokeLineCap:null,fill:d}));this.elSeries.add(g)}if(o.config.stroke.show&&!this.pointsChart){var b=null;if("line"===e)b=s.fillPath({seriesNumber:r,i});else if("solid"===o.config.stroke.fill.type)b=o.globals.stroke.colors[r];else{var y=o.config.fill;o.config.fill=o.config.stroke.fill,b=s.fillPath({seriesNumber:r,i}),o.config.fill=y}for(var v=0;v<n.linePaths.length;v++){var m=b;"rangeArea"===e&&(m=s.fillPath({seriesNumber:r}));var x=vb(vb({},f),{},{pathFrom:n.pathFromLine,pathTo:n.linePaths[v],stroke:b,strokeWidth:this.strokeWidth,strokeLineCap:o.config.stroke.lineCap,fill:"rangeArea"===e?m:"none"}),w=a.renderPaths(x);if(this.elSeries.add(w),w.attr("fill-rule","evenodd"),l.count>0&&"rangeArea"!==e){var S=a.renderPaths(x);S.node.setAttribute("stroke-dasharray",l.dashArray),l.strokeWidth&&S.node.setAttribute("stroke-width",l.strokeWidth),this.elSeries.add(S),S.attr("clip-path","url(#forecastMask".concat(o.globals.cuid,")")),w.attr("clip-path","url(#nonForecastMask".concat(o.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(t){var e,r,i=this,n=t.type,o=t.series,a=t.iterations,s=t.realIndex,l=t.translationsIndex,c=t.i,u=t.x,h=t.y,d=t.pX,p=t.pY,g=t.pathsFrom,b=t.linePaths,y=t.areaPaths,v=t.seriesIndex,m=t.lineYPosition,x=t.xArrj,w=t.yArrj,S=t.y2Arrj,k=t.isRangeStart,A=t.seriesRangeEnd,O=this.w,P=new Pc(this.ctx),C=this.yRatio,j=g.prevY,T=g.linePath,E=g.areaPath,M=g.pathFromLine,L=g.pathFromArea,I=f.isNumber(O.globals.minYArr[s])?O.globals.minYArr[s]:O.globals.minY;a||(a=O.globals.dataPoints>1?O.globals.dataPoints-1:O.globals.dataPoints);var _=function(t,e){return e-t/C[l]+2*(i.isReversed?t/C[l]:0)},R=h,z=O.config.chart.stacked&&!O.globals.comboCharts||O.config.chart.stacked&&O.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[s])||void 0===e?void 0:e.type)||"column"===(null===(r=this.w.config.series[s])||void 0===r?void 0:r.type)),X=O.config.stroke.curve;Array.isArray(X)&&(X=Array.isArray(v)?X[v[c]]:X[c]);for(var D,Y=0,H=0;H<a&&0!==o[c].length;H++){var F=void 0===o[c][H+1]||null===o[c][H+1];if(O.globals.isXNumeric){var B=O.globals.seriesX[s][H+1];void 0===O.globals.seriesX[s][H+1]&&(B=O.globals.seriesX[s][a-1]),u=(B-O.globals.minX)/this.xRatio}else u+=this.xDivision;m=z&&c>0&&O.globals.collapsedSeries.length<O.config.series.length-1?this.prevSeriesY[function(t){for(var e=t;e>0;e--){if(!(O.globals.collapsedSeriesIndices.indexOf((null==v?void 0:v[e])||e)>-1))return e;e--}return 0}(c-1)][H+1]:this.zeroY,F?h=_(I,m):(h=_(o[c][H+1],m),"rangeArea"===n&&(R=_(A[c][H+1],m))),x.push(null===o[c][H+1]?null:u),!F||"smooth"!==O.config.stroke.curve&&"monotoneCubic"!==O.config.stroke.curve?(w.push(h),S.push(R)):(w.push(null),S.push(null));var N=this.lineHelpers.calculatePoints({series:o,x:u,y:h,realIndex:s,i:c,j:H,prevY:j}),W=this._createPaths({type:n,series:o,i:c,realIndex:s,j:H,x:u,y:h,y2:R,xArrj:x,yArrj:w,y2Arrj:S,pX:d,pY:p,pathState:Y,segmentStartX:D,linePath:T,areaPath:E,linePaths:b,areaPaths:y,curve:X,isRangeStart:k});y=W.areaPaths,b=W.linePaths,d=W.pX,p=W.pY,Y=W.pathState,D=W.segmentStartX,E=W.areaPath,T=W.linePath,!this.appendPathFrom||O.globals.hasNullValues||"monotoneCubic"===X&&"rangeArea"===n||(M+=P.line(u,this.areaBottomY),L+=P.line(u,this.areaBottomY)),this.handleNullDataPoints(o,N,c,H,s),this._handleMarkersAndLabels({type:n,pointsPos:N,i:c,j:H,realIndex:s,isRangeStart:k})}return{yArrj:w,xArrj:x,pathFromArea:L,areaPaths:y,pathFromLine:M,linePaths:b,linePath:T,areaPath:E}}},{key:"_handleMarkersAndLabels",value:function(t){var e=t.type,r=t.pointsPos,i=t.isRangeStart,n=t.i,o=t.j,a=t.realIndex,s=this.w,l=new lh(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,o,{realIndex:a,pointsPos:r,zRatio:this.zRatio,elParent:this.elPointsMain});else{s.globals.series[n].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var c=this.markers.plotChartMarkers(r,a,o+1);null!==c&&this.elPointsMain.add(c)}var u=l.drawDataLabel({type:e,isRangeStart:i,pos:r,i:a,j:o+1});null!==u&&this.elDataLabelsWrap.add(u)}},{key:"_createPaths",value:function(t){var e,r=t.type,i=t.series,n=t.i,o=(t.realIndex,t.j),a=t.x,s=t.y,l=t.xArrj,c=t.yArrj,u=t.y2,h=t.y2Arrj,f=t.pX,d=t.pY,p=t.pathState,g=t.segmentStartX,b=t.linePath,y=t.areaPath,v=t.linePaths,m=t.areaPaths,x=t.curve,w=t.isRangeStart,S=new Pc(this.ctx),k=this.areaBottomY,A="rangeArea"===r,O="rangeArea"===r&&w;switch(x){case"monotoneCubic":var P=w?c:h;switch(p){case 0:if(null===P[o+1])break;p=1;case 1:if(!(A?l.length===i[n].length:o===i[n].length-2))break;case 2:var C=w?l:l.slice().reverse(),j=w?P:P.slice().reverse(),T=(e=j,C.map((function(t,r){return[t,e[r]]})).filter((function(t){return null!==t[1]}))),E=T.length>1?db(T):T,M=[];A&&(O?m=T:M=m.reverse());var L=0,I=0;if(function(t,e){for(var r=function(t){var e=[],r=0;return t.forEach((function(t){null!==t?r++:r>0&&(e.push(r),r=0)})),r>0&&e.push(r),e}(t),i=[],n=0,o=0;n<r.length;o+=r[n++])i[n]=pb(e,o,o+r[n]);return i}(j,E).forEach((function(t){L++;var e=function(t){for(var e="",r=0;r<t.length;r++){var i=t[r],n=i.length;n>4?(e+="C".concat(i[0],", ").concat(i[1]),e+=", ".concat(i[2],", ").concat(i[3]),e+=", ".concat(i[4],", ").concat(i[5])):n>2&&(e+="S".concat(i[0],", ").concat(i[1]),e+=", ".concat(i[2],", ").concat(i[3]))}return e}(t),r=I,i=(I+=t.length)-1;O?b=S.move(T[r][0],T[r][1])+e:A?b=S.move(M[r][0],M[r][1])+S.line(T[r][0],T[r][1])+e+S.line(M[i][0],M[i][1]):(b=S.move(T[r][0],T[r][1])+e,y=b+S.line(T[i][0],k)+S.line(T[r][0],k)+"z",m.push(y)),v.push(b)})),A&&L>1&&!O){var _=v.slice(L).reverse();v.splice(L),_.forEach((function(t){return v.push(t)}))}p=0}break;case"smooth":var R=.35*(a-f);if(null===i[n][o])p=0;else switch(p){case 0:if(g=f,b=O?S.move(f,h[o])+S.line(f,d):S.move(f,d),y=S.move(f,d),null===i[n][o+1]||void 0===i[n][o+1]){v.push(b),m.push(y);break}if(p=1,o<i[n].length-2){var z=S.curve(f+R,d,a-R,s,a,s);b+=z,y+=z;break}case 1:if(null===i[n][o+1])b+=O?S.line(f,u):S.move(f,d),y+=S.line(f,k)+S.line(g,k)+"z",v.push(b),m.push(y),p=-1;else{var X=S.curve(f+R,d,a-R,s,a,s);b+=X,y+=X,o>=i[n].length-2&&(O&&(b+=S.curve(a,s,a,s,a,u)+S.move(a,u)),y+=S.curve(a,s,a,s,a,k)+S.line(g,k)+"z",v.push(b),m.push(y),p=-1)}}f=a,d=s;break;default:var D=function(t,e,r){var i=[];switch(t){case"stepline":i=S.line(e,null,"H")+S.line(null,r,"V");break;case"linestep":i=S.line(null,r,"V")+S.line(e,null,"H");break;case"straight":i=S.line(e,r)}return i};if(null===i[n][o])p=0;else switch(p){case 0:if(g=f,b=O?S.move(f,h[o])+S.line(f,d):S.move(f,d),y=S.move(f,d),null===i[n][o+1]||void 0===i[n][o+1]){v.push(b),m.push(y);break}if(p=1,o<i[n].length-2){var Y=D(x,a,s);b+=Y,y+=Y;break}case 1:if(null===i[n][o+1])b+=O?S.line(f,u):S.move(f,d),y+=S.line(f,k)+S.line(g,k)+"z",v.push(b),m.push(y),p=-1;else{var H=D(x,a,s);b+=H,y+=H,o>=i[n].length-2&&(O&&(b+=S.line(a,u)),y+=S.line(a,k)+S.line(g,k)+"z",v.push(b),m.push(y),p=-1)}}f=a,d=s}return{linePaths:v,areaPaths:m,pX:f,pY:d,pathState:p,segmentStartX:g,linePath:b,areaPath:y}}},{key:"handleNullDataPoints",value:function(t,e,r,i,n){var o=this.w;if(null===t[r][i]&&o.config.markers.showNullDataPoints||1===t[r].length){var a=this.strokeWidth-o.config.markers.strokeWidth/2;a>0||(a=0);var s=this.markers.plotChartMarkers(e,n,i+1,a,!0);null!==s&&this.elPointsMain.add(s)}}}],r&&xb(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const kb=Sb;function Ab(t){return Ab="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},Ab(t)}function Ob(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Pb(i.key),i)}}function Pb(t){var e=function(t){if("object"!=Ab(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ab(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ab(e)?e:e+""}r(521);var Cb=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w,this.strokeWidth=this.w.config.stroke.width,this.helpers=new mg(e),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[]}var e,r;return e=t,r=[{key:"draw",value:function(t){var e=this,r=this.w,i=new Pc(this.ctx),n=new Zu(this.ctx),o=i.group({class:"apexcharts-treemap"});if(r.globals.noData)return o;var a=[];return t.forEach((function(t){var e=t.map((function(t){return Math.abs(t)}));a.push(e)})),this.negRange=this.helpers.checkColorRange(),r.config.series.forEach((function(t,r){t.data.forEach((function(t){Array.isArray(e.labels[r])||(e.labels[r]=[]),e.labels[r].push(t.x)}))})),window.TreemapSquared.generate(a,r.globals.gridWidth,r.globals.gridHeight).forEach((function(a,s){var l=i.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:f.escapeString(r.globals.seriesNames[s]),rel:s+1,"data:realIndex":s});if(r.config.chart.dropShadow.enabled){var c=r.config.chart.dropShadow;new vc(e.ctx).dropShadow(o,c,s)}var u=i.group({class:"apexcharts-data-labels"});a.forEach((function(o,a){var c=o[0],u=o[1],h=o[2],f=o[3],d=i.drawRect(c,u,h-c,f-u,r.config.plotOptions.treemap.borderRadius,"#fff",1,e.strokeWidth,r.config.plotOptions.treemap.useFillColorAsStroke?g:r.globals.stroke.colors[s]);d.attr({cx:c,cy:u,index:s,i:s,j:a,width:h-c,height:f-u});var p=e.helpers.getShadeColor(r.config.chart.type,s,a,e.negRange),g=p.color,b=n.fillPath({color:g,seriesNumber:s,dataPointIndex:a});d.node.classList.add("apexcharts-treemap-rect"),d.attr({fill:b}),e.helpers.addListeners(d);var y={x:c+(h-c)/2,y:u+(f-u)/2,width:0,height:0},v={x:c,y:u,width:h-c,height:f-u};if(r.config.chart.animations.enabled&&!r.globals.dataChanged){var m=1;r.globals.resized||(m=r.config.chart.animations.speed),e.animateTreemap(d,y,v,m)}if(r.globals.dataChanged){var x=1;e.dynamicAnim.enabled&&r.globals.shouldAnimate&&(x=e.dynamicAnim.speed,r.globals.previousPaths[s]&&r.globals.previousPaths[s][a]&&r.globals.previousPaths[s][a].rect&&(y=r.globals.previousPaths[s][a].rect),e.animateTreemap(d,y,v,x))}var w=e.getFontSize(o),S=r.config.dataLabels.formatter(e.labels[s][a],{value:r.globals.series[s][a],seriesIndex:s,dataPointIndex:a,w:r});"truncate"===r.config.plotOptions.treemap.dataLabels.format&&(w=parseInt(r.config.dataLabels.style.fontSize,10),S=e.truncateLabels(S,w,c,u,h,f));var k=null;r.globals.series[s][a]&&(k=e.helpers.calculateDataLabels({text:S,x:(c+h)/2,y:(u+f)/2+e.strokeWidth/2+w/3,i:s,j:a,colorProps:p,fontSize:w,series:t})),r.config.dataLabels.enabled&&k&&e.rotateToFitLabel(k,w,S,c,u,h,f),l.add(d),null!==k&&l.add(k)})),l.add(u),o.add(l)})),o}},{key:"getFontSize",value:function(t){var e=this.w,r=function t(e){var r,i=0;if(Array.isArray(e[0]))for(r=0;r<e.length;r++)i+=t(e[r]);else for(r=0;r<e.length;r++)i+=e[r].length;return i}(this.labels)/function t(e){var r,i=0;if(Array.isArray(e[0]))for(r=0;r<e.length;r++)i+=t(e[r]);else for(r=0;r<e.length;r++)i+=1;return i}(this.labels);return function(t,i){var n=t*i,o=Math.pow(n,.5);return Math.min(o/r,parseInt(e.config.dataLabels.style.fontSize,10))}(t[2]-t[0],t[3]-t[1])}},{key:"rotateToFitLabel",value:function(t,e,r,i,n,o,a){var s=new Pc(this.ctx),l=s.getTextRects(r,e);if(l.width+this.w.config.stroke.width+5>o-i&&l.width<=a-n){var c=s.rotateAroundCenter(t.node);t.node.setAttribute("transform","rotate(-90 ".concat(c.x," ").concat(c.y,") translate(").concat(l.height/3,")"))}}},{key:"truncateLabels",value:function(t,e,r,i,n,o){var a=new Pc(this.ctx),s=a.getTextRects(t,e).width+this.w.config.stroke.width+5>n-r&&o-i>n-r?o-i:n-r,l=a.getTextBasedOnMaxWidth({text:t,maxWidth:s,fontSize:e});return t.length!==l.length&&s/e<5?"":l}},{key:"animateTreemap",value:function(t,e,r,i){var n=new b(this.ctx);n.animateRect(t,{x:e.x,y:e.y,width:e.width,height:e.height},{x:r.x,y:r.y,width:r.width,height:r.height},i,(function(){n.animationCompleted(t)}))}}],r&&Ob(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function jb(t){return jb="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},jb(t)}function Tb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Eb(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Tb(Object(r),!0).forEach((function(e){Mb(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Tb(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Mb(t,e,r){return(e=Ib(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Lb(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Ib(i.key),i)}}function Ib(t){var e=function(t){if("object"!=jb(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=jb(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==jb(e)?e:e+""}var _b=10/86400,Rb=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}var e,r;return e=t,r=[{key:"calculateTimeScaleTicks",value:function(t,e){var r=this,i=this.w;if(i.globals.allSeriesCollapsed)return i.globals.labels=[],i.globals.timescaleLabels=[],[];var n=new Vc(this.ctx),o=(e-t)/864e5;this.determineInterval(o),i.globals.disableZoomIn=!1,i.globals.disableZoomOut=!1,o<_b?i.globals.disableZoomIn=!0:o>5e4&&(i.globals.disableZoomOut=!0);var a=n.getTimeUnitsfromTimestamp(t,e,this.utc),s=i.globals.gridWidth/o,l=s/24,c=l/60,u=c/60,h=Math.floor(24*o),f=Math.floor(1440*o),d=Math.floor(86400*o),p=Math.floor(o),g=Math.floor(o/30),b=Math.floor(o/365),y={minMillisecond:a.minMillisecond,minSecond:a.minSecond,minMinute:a.minMinute,minHour:a.minHour,minDate:a.minDate,minMonth:a.minMonth,minYear:a.minYear},v={firstVal:y,currentMillisecond:y.minMillisecond,currentSecond:y.minSecond,currentMinute:y.minMinute,currentHour:y.minHour,currentMonthDate:y.minDate,currentDate:y.minDate,currentMonth:y.minMonth,currentYear:y.minYear,daysWidthOnXAxis:s,hoursWidthOnXAxis:l,minutesWidthOnXAxis:c,secondsWidthOnXAxis:u,numberOfSeconds:d,numberOfMinutes:f,numberOfHours:h,numberOfDays:p,numberOfMonths:g,numberOfYears:b};switch(this.tickInterval){case"years":this.generateYearScale(v);break;case"months":case"half_year":this.generateMonthScale(v);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(v);break;case"hours":this.generateHourScale(v);break;case"minutes_fives":case"minutes":this.generateMinuteScale(v);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(v)}var m=this.timeScaleArray.map((function(t){var e={position:t.position,unit:t.unit,year:t.year,day:t.day?t.day:1,hour:t.hour?t.hour:0,month:t.month+1};return"month"===t.unit?Eb(Eb({},e),{},{day:1,value:t.value+1}):"day"===t.unit||"hour"===t.unit?Eb(Eb({},e),{},{value:t.value}):"minute"===t.unit?Eb(Eb({},e),{},{value:t.value,minute:t.value}):"second"===t.unit?Eb(Eb({},e),{},{value:t.value,minute:t.minute,second:t.second}):t}));return m.filter((function(t){var e=1,n=Math.ceil(i.globals.gridWidth/120),o=t.value;void 0!==i.config.xaxis.tickAmount&&(n=i.config.xaxis.tickAmount),m.length>n&&(e=Math.floor(m.length/n));var a=!1,s=!1;switch(r.tickInterval){case"years":"year"===t.unit&&(a=!0);break;case"half_year":e=7,"year"===t.unit&&(a=!0);break;case"months":e=1,"year"===t.unit&&(a=!0);break;case"months_fortnight":e=15,"year"!==t.unit&&"month"!==t.unit||(a=!0),30===o&&(s=!0);break;case"months_days":e=10,"month"===t.unit&&(a=!0),30===o&&(s=!0);break;case"week_days":e=8,"month"===t.unit&&(a=!0);break;case"days":e=1,"month"===t.unit&&(a=!0);break;case"hours":"day"===t.unit&&(a=!0);break;case"minutes_fives":case"seconds_fives":o%5!=0&&(s=!0);break;case"seconds_tens":o%10!=0&&(s=!0)}if("hours"===r.tickInterval||"minutes_fives"===r.tickInterval||"seconds_tens"===r.tickInterval||"seconds_fives"===r.tickInterval){if(!s)return!0}else if((o%e==0||a)&&!s)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(t,e){var r=this.w,i=this.formatDates(t),n=this.removeOverlappingTS(i);r.globals.timescaleLabels=n.slice(),new Uf(this.ctx).plotCoords()}},{key:"determineInterval",value:function(t){var e=24*t,r=60*e;switch(!0){case t/365>5:this.tickInterval="years";break;case t>800:this.tickInterval="half_year";break;case t>180:this.tickInterval="months";break;case t>90:this.tickInterval="months_fortnight";break;case t>60:this.tickInterval="months_days";break;case t>30:this.tickInterval="week_days";break;case t>2:this.tickInterval="days";break;case e>2.4:this.tickInterval="hours";break;case r>15:this.tickInterval="minutes_fives";break;case r>5:this.tickInterval="minutes";break;case r>1:this.tickInterval="seconds_tens";break;case 60*r>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(t){var e=t.firstVal,r=t.currentMonth,i=t.currentYear,n=t.daysWidthOnXAxis,o=t.numberOfYears,a=e.minYear,s=0,l=new Vc(this.ctx),c="year";if(e.minDate>1||e.minMonth>0){var u=l.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);s=(l.determineDaysOfYear(e.minYear)-u+1)*n,a=e.minYear+1,this.timeScaleArray.push({position:s,value:a,unit:c,year:a,month:f.monthMod(r+1)})}else 1===e.minDate&&0===e.minMonth&&this.timeScaleArray.push({position:s,value:a,unit:c,year:i,month:f.monthMod(r+1)});for(var h=a,d=s,p=0;p<o;p++)h++,d=l.determineDaysOfYear(h-1)*n+d,this.timeScaleArray.push({position:d,value:h,unit:c,year:h,month:1})}},{key:"generateMonthScale",value:function(t){var e=t.firstVal,r=t.currentMonthDate,i=t.currentMonth,n=t.currentYear,o=t.daysWidthOnXAxis,a=t.numberOfMonths,s=i,l=0,c=new Vc(this.ctx),u="month",h=0;if(e.minDate>1){l=(c.determineDaysOfMonths(i+1,e.minYear)-r+1)*o,s=f.monthMod(i+1);var d=n+h,p=f.monthMod(s),g=s;0===s&&(u="year",g=d,p=1,d+=h+=1),this.timeScaleArray.push({position:l,value:g,unit:u,year:d,month:p})}else this.timeScaleArray.push({position:l,value:s,unit:u,year:n,month:f.monthMod(i)});for(var b=s+1,y=l,v=0,m=1;v<a;v++,m++){0===(b=f.monthMod(b))?(u="year",h+=1):u="month";var x=this._getYear(n,b,h);y=c.determineDaysOfMonths(b,x)*o+y;var w=0===b?x:b;this.timeScaleArray.push({position:y,value:w,unit:u,year:x,month:0===b?1:b}),b++}}},{key:"generateDayScale",value:function(t){var e=t.firstVal,r=t.currentMonth,i=t.currentYear,n=t.hoursWidthOnXAxis,o=t.numberOfDays,a=new Vc(this.ctx),s="day",l=e.minDate+1,c=l,u=function(t,e,r){return t>a.determineDaysOfMonths(e+1,r)?(c=1,s="month",d=e+=1,e):e},h=(24-e.minHour)*n,d=l,p=u(c,r,i);0===e.minHour&&1===e.minDate?(h=0,d=f.monthMod(e.minMonth),s="month",c=e.minDate):1!==e.minDate&&0===e.minHour&&0===e.minMinute&&(h=0,l=e.minDate,d=l,p=u(c=l,r,i),1!==d&&(s="day")),this.timeScaleArray.push({position:h,value:d,unit:s,year:this._getYear(i,p,0),month:f.monthMod(p),day:c});for(var g=h,b=0;b<o;b++){s="day",p=u(c+=1,p,this._getYear(i,p,0));var y=this._getYear(i,p,0);g=24*n+g;var v=1===c?f.monthMod(p):c;this.timeScaleArray.push({position:g,value:v,unit:s,year:y,month:f.monthMod(p),day:v})}}},{key:"generateHourScale",value:function(t){var e=t.firstVal,r=t.currentDate,i=t.currentMonth,n=t.currentYear,o=t.minutesWidthOnXAxis,a=t.numberOfHours,s=new Vc(this.ctx),l="hour",c=function(t,e){return t>s.determineDaysOfMonths(e+1,n)&&(b=1,e+=1),{month:e,date:b}},u=function(t,e){return t>s.determineDaysOfMonths(e+1,n)?e+=1:e},h=60-(e.minMinute+e.minSecond/60),d=h*o,p=e.minHour+1,g=p;60===h&&(d=0,g=p=e.minHour);var b=r;g>=24&&(g=0,l="day",p=b+=1);var y=c(b,i).month;y=u(b,y),p>31&&(p=b=1),this.timeScaleArray.push({position:d,value:p,unit:l,day:b,hour:g,year:n,month:f.monthMod(y)}),g++;for(var v=d,m=0;m<a;m++){l="hour",g>=24&&(g=0,l="day",y=c(b+=1,y).month,y=u(b,y));var x=this._getYear(n,y,0);v=60*o+v;var w=0===g?b:g;this.timeScaleArray.push({position:v,value:w,unit:l,hour:g,day:b,year:x,month:f.monthMod(y)}),g++}}},{key:"generateMinuteScale",value:function(t){for(var e=t.currentMillisecond,r=t.currentSecond,i=t.currentMinute,n=t.currentHour,o=t.currentDate,a=t.currentMonth,s=t.currentYear,l=t.minutesWidthOnXAxis,c=t.secondsWidthOnXAxis,u=t.numberOfMinutes,h=i+1,d=o,p=a,g=s,b=n,y=(60-r-e/1e3)*c,v=0;v<u;v++)h>=60&&(h=0,24===(b+=1)&&(b=0)),this.timeScaleArray.push({position:y,value:h,unit:"minute",hour:b,minute:h,day:d,year:this._getYear(g,p,0),month:f.monthMod(p)}),y+=l,h++}},{key:"generateSecondScale",value:function(t){for(var e=t.currentMillisecond,r=t.currentSecond,i=t.currentMinute,n=t.currentHour,o=t.currentDate,a=t.currentMonth,s=t.currentYear,l=t.secondsWidthOnXAxis,c=t.numberOfSeconds,u=r+1,h=i,d=o,p=a,g=s,b=n,y=(1e3-e)/1e3*l,v=0;v<c;v++)u>=60&&(u=0,++h>=60&&(h=0,24==++b&&(b=0))),this.timeScaleArray.push({position:y,value:u,unit:"second",hour:b,minute:h,second:u,day:d,year:this._getYear(g,p,0),month:f.monthMod(p)}),y+=l,u++}},{key:"createRawDateString",value:function(t,e){var r=t.year;return 0===t.month&&(t.month=1),r+="-"+("0"+t.month.toString()).slice(-2),"day"===t.unit?r+="day"===t.unit?"-"+("0"+e).slice(-2):"-01":r+="-"+("0"+(t.day?t.day:"1")).slice(-2),"hour"===t.unit?r+="hour"===t.unit?"T"+("0"+e).slice(-2):"T00":r+="T"+("0"+(t.hour?t.hour:"0")).slice(-2),"minute"===t.unit?r+=":"+("0"+e).slice(-2):r+=":"+(t.minute?("0"+t.minute).slice(-2):"00"),"second"===t.unit?r+=":"+("0"+e).slice(-2):r+=":00",this.utc&&(r+=".000Z"),r}},{key:"formatDates",value:function(t){var e=this,r=this.w;return t.map((function(t){var i=t.value.toString(),n=new Vc(e.ctx),o=e.createRawDateString(t,i),a=n.getDate(n.parseDate(o));if(e.utc||(a=n.getDate(n.parseDateWithTimezone(o))),void 0===r.config.xaxis.labels.format){var s="dd MMM",l=r.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(s=l.year),"month"===t.unit&&(s=l.month),"day"===t.unit&&(s=l.day),"hour"===t.unit&&(s=l.hour),"minute"===t.unit&&(s=l.minute),"second"===t.unit&&(s=l.second),i=n.formatDate(a,s)}else i=n.formatDate(a,r.config.xaxis.labels.format);return{dateString:o,position:t.position,value:i,unit:t.unit,year:t.year,month:t.month}}))}},{key:"removeOverlappingTS",value:function(t){var e,r=this,i=new Pc(this.ctx),n=!1;t.length>0&&t[0].value&&t.every((function(e){return e.value.length===t[0].value.length}))&&(n=!0,e=i.getTextRects(t[0].value).width);var o=0,a=t.map((function(a,s){if(s>0&&r.w.config.xaxis.labels.hideOverlappingLabels){var l=n?e:i.getTextRects(t[o].value).width,c=t[o].position;return a.position>c+l+10?(o=s,a):null}return a}));return a.filter((function(t){return null!==t}))}},{key:"_getYear",value:function(t,e,r){return t+Math.floor(e/12)+r}}],r&&Lb(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const zb=Rb;function Xb(t){return Xb="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},Xb(t)}function Db(t){return function(t){if(Array.isArray(t))return Yb(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Yb(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Yb(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yb(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function Hb(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Fb(i.key),i)}}function Fb(t){var e=function(t){if("object"!=Xb(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Xb(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Xb(e)?e:e+""}var Bb=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=r,this.w=r.w,this.el=e}var e,r;return e=t,r=[{key:"setupElements",value:function(){var t=this.w,e=t.globals,r=t.config,i=r.chart.type;e.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].includes(i),e.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].includes(i),e.isBarHorizontal=["bar","rangeBar","boxPlot"].includes(i)&&r.plotOptions.bar.horizontal,e.chartClass=".apexcharts".concat(e.chartID),e.dom.baseEl=this.el,e.dom.elWrap=document.createElement("div"),Pc.setAttrs(e.dom.elWrap,{id:e.chartClass.substring(1),class:"apexcharts-canvas ".concat(e.chartClass.substring(1))}),this.el.appendChild(e.dom.elWrap),e.dom.Paper=window.SVG().addTo(e.dom.elWrap),e.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(r.chart.offsetX,", ").concat(r.chart.offsetY,")")}),e.dom.Paper.node.style.background="dark"!==r.theme.mode||r.chart.background?"light"!==r.theme.mode||r.chart.background?r.chart.background:"#fff":"#424242",this.setSVGDimensions(),e.dom.elLegendForeign=document.createElementNS(e.SVGNS,"foreignObject"),Pc.setAttrs(e.dom.elLegendForeign,{x:0,y:0,width:e.svgWidth,height:e.svgHeight}),e.dom.elLegendWrap=document.createElement("div"),e.dom.elLegendWrap.classList.add("apexcharts-legend"),e.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),e.dom.elLegendForeign.appendChild(e.dom.elLegendWrap),e.dom.Paper.node.appendChild(e.dom.elLegendForeign),e.dom.elGraphical=e.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),e.dom.elDefs=e.dom.Paper.defs(),e.dom.Paper.add(e.dom.elGraphical),e.dom.elGraphical.add(e.dom.elDefs)}},{key:"plotChartType",value:function(t,e){var r=this.w,i=this.ctx,n=r.config,o=r.globals,a={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},column:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},s=n.chart.type||"line",l=null,c=0;o.series.forEach((function(e,i){var n=t[i].type||s;a[n]?("rangeArea"===n?(a[n].series.push(o.seriesRangeStart[i]),a[n].seriesRangeEnd.push(o.seriesRangeEnd[i])):a[n].series.push(e),a[n].i.push(i),"column"!==n&&"bar"!==n||(r.globals.columnSeries=a.column)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(n)?l=n:"bar"===n?(a.column.series.push(e),a.column.i.push(i)):console.warn("You have specified an unrecognized series type (".concat(n,").")),s!==n&&"scatter"!==n&&c++})),c>0&&(l&&console.warn("Chart or series type ".concat(l," cannot appear with other chart or series types.")),a.column.series.length>0&&n.plotOptions.bar.horizontal&&(c-=a.column.series.length,a.column={series:[],i:[]},r.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),o.comboCharts||(o.comboCharts=c>0);var u=new kb(i,e),h=new dg(i,e);i.pie=new Lg(i);var f=new $g(i);i.rangeBar=new lb(i,e);var d=new Hg(i),p=[];if(o.comboCharts){var g,b,y=new Mc(i);if(a.area.series.length>0&&(g=p).push.apply(g,Db(y.drawSeriesByGroup(a.area,o.areaGroups,"area",u))),a.column.series.length>0)if(n.chart.stacked){var v=new eg(i,e);p.push(v.draw(a.column.series,a.column.i))}else i.bar=new Np(i,e),p.push(i.bar.draw(a.column.series,a.column.i));if(a.rangeArea.series.length>0&&p.push(u.draw(a.rangeArea.series,"rangeArea",a.rangeArea.i,a.rangeArea.seriesRangeEnd)),a.line.series.length>0&&(b=p).push.apply(b,Db(y.drawSeriesByGroup(a.line,o.lineGroups,"line",u))),a.candlestick.series.length>0&&p.push(h.draw(a.candlestick.series,"candlestick",a.candlestick.i)),a.boxPlot.series.length>0&&p.push(h.draw(a.boxPlot.series,"boxPlot",a.boxPlot.i)),a.rangeBar.series.length>0&&p.push(i.rangeBar.draw(a.rangeBar.series,a.rangeBar.i)),a.scatter.series.length>0){var m=new kb(i,e,!0);p.push(m.draw(a.scatter.series,"scatter",a.scatter.i))}if(a.bubble.series.length>0){var x=new kb(i,e,!0);p.push(x.draw(a.bubble.series,"bubble",a.bubble.i))}}else switch(n.chart.type){case"line":p=u.draw(o.series,"line");break;case"area":p=u.draw(o.series,"area");break;case"bar":n.chart.stacked?p=new eg(i,e).draw(o.series):(i.bar=new Np(i,e),p=i.bar.draw(o.series));break;case"candlestick":p=new dg(i,e).draw(o.series,"candlestick");break;case"boxPlot":p=new dg(i,e).draw(o.series,n.chart.type);break;case"rangeBar":p=i.rangeBar.draw(o.series);break;case"rangeArea":p=u.draw(o.seriesRangeStart,"rangeArea",void 0,o.seriesRangeEnd);break;case"heatmap":p=new kg(i,e).draw(o.series);break;case"treemap":p=new Cb(i,e).draw(o.series);break;case"pie":case"donut":case"polarArea":p=i.pie.draw(o.series);break;case"radialBar":p=f.draw(o.series);break;case"radar":p=d.draw(o.series);break;default:p=u.draw(o.series)}return p}},{key:"setSVGDimensions",value:function(){var t=this.w,e=t.globals,r=t.config;r.chart.width=r.chart.width||"100%",r.chart.height=r.chart.height||"auto",e.svgWidth=r.chart.width,e.svgHeight=r.chart.height;var i=f.getDimensions(this.el),n=r.chart.width.toString().split(/[0-9]+/g).pop();"%"===n?f.isNumber(i[0])&&(0===i[0].width&&(i=f.getDimensions(this.el.parentNode)),e.svgWidth=i[0]*parseInt(r.chart.width,10)/100):"px"!==n&&""!==n||(e.svgWidth=parseInt(r.chart.width,10));var o=String(r.chart.height).toString().split(/[0-9]+/g).pop();if("auto"!==e.svgHeight&&""!==e.svgHeight)if("%"===o){var a=f.getDimensions(this.el.parentNode);e.svgHeight=a[1]*parseInt(r.chart.height,10)/100}else e.svgHeight=parseInt(r.chart.height,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;if(e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),Pc.setAttrs(e.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==o){var s=r.chart.sparkline.enabled?0:e.axisCharts?r.chart.parentHeightOffset:0;e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(e.svgHeight+s,"px")}e.dom.elWrap.style.width="".concat(e.svgWidth,"px"),e.dom.elWrap.style.height="".concat(e.svgHeight,"px")}},{key:"shiftGraphPosition",value:function(){var t=this.w.globals,e=t.translateY,r=t.translateX;Pc.setAttrs(t.dom.elGraphical.node,{transform:"translate(".concat(r,", ").concat(e,")")})}},{key:"resizeNonAxisCharts",value:function(){var t=this.w,e=t.globals,r=0,i=t.config.chart.sparkline.enabled?1:15;i+=t.config.grid.padding.bottom,["top","bottom"].includes(t.config.legend.position)&&t.config.legend.show&&!t.config.legend.floating&&(r=new od(this.ctx).legendHelpers.getLegendDimensions().clwh+7);var n=t.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),o=2.05*t.globals.radialSize;if(n&&!t.config.chart.sparkline.enabled&&0!==t.config.plotOptions.radialBar.startAngle){var a=f.getBoundingClientRect(n);o=a.bottom;var s=a.bottom-a.top;o=Math.max(2.05*t.globals.radialSize,s)}var l=Math.ceil(o+e.translateY+r+i);e.dom.elLegendForeign&&e.dom.elLegendForeign.setAttribute("height",l),t.config.chart.height&&String(t.config.chart.height).includes("%")||(e.dom.elWrap.style.height="".concat(l,"px"),Pc.setAttrs(e.dom.Paper.node,{height:l}),e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(l,"px"))}},{key:"coreCalculations",value:function(){new Wh(this.ctx).init()}},{key:"resetGlobals",value:function(){var t=this,e=function(){return t.w.config.series.map((function(){return[]}))},r=new Ru,i=this.w.globals;r.initGlobalVars(i),i.seriesXvalues=e(),i.seriesYvalues=e()}},{key:"isMultipleY",value:function(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}},{key:"xySettings",value:function(){var t=this.w,e=null;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new hf(this.ctx).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new hf(this.ctx).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new zb(this.ctx);var r=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?r=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(r=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(r)}e=new Mc(this.ctx).getCalculatedRatios()}return e}},{key:"updateSourceChart",value:function(t){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var t=this,e=this.ctx,r=this.w;if(r.config.chart.brush.enabled&&"function"!=typeof r.config.chart.events.selection){var i=Array.isArray(r.config.chart.brush.targets)?r.config.chart.brush.targets:[r.config.chart.brush.target];i.forEach((function(r){var i=e.constructor.getChartByID(r);i.w.globals.brushSource=t.ctx,"function"!=typeof i.w.config.chart.events.zoomed&&(i.w.config.chart.events.zoomed=function(){return t.updateSourceChart(i)}),"function"!=typeof i.w.config.chart.events.scrolled&&(i.w.config.chart.events.scrolled=function(){return t.updateSourceChart(i)})})),r.config.chart.events.selection=function(t,r){i.forEach((function(t){e.constructor.getChartByID(t).ctx.updateHelpers._updateOptions({xaxis:{min:r.xaxis.min,max:r.xaxis.max}},!1,!1,!1,!1)}))}}}}],r&&Hb(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Nb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Wb(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Nb(Object(r),!0).forEach((function(e){Gb(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nb(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Gb(t,e,r){return(e=qb(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Vb(t){return Vb="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},Vb(t)}function Ub(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,qb(i.key),i)}}function qb(t){var e=function(t){if("object"!=Vb(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Vb(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Vb(e)?e:e+""}var Zb=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w}var e,r;return e=t,r=[{key:"_updateOptions",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(a){var s=[e.ctx];n&&(s=e.ctx.getSyncedCharts()),e.ctx.w.globals.isExecCalled&&(s=[e.ctx],e.ctx.w.globals.isExecCalled=!1),s.forEach((function(n,l){var c=n.w;if(c.globals.shouldAnimate=i,r||(c.globals.resized=!0,c.globals.dataChanged=!0,i&&n.series.getPreviousPaths()),t&&"object"===Vb(t)&&(n.config=new Mu(t),t=Mc.extendArrayProps(n.config,t,c),n.w.globals.chartID!==e.ctx.w.globals.chartID&&delete t.series,c.config=f.extend(c.config,t),o&&(c.globals.lastXAxis=t.xaxis?f.clone(t.xaxis):[],c.globals.lastYAxis=t.yaxis?f.clone(t.yaxis):[],c.globals.initialConfig=f.extend({},c.config),c.globals.initialSeries=f.clone(c.config.series),t.series))){for(var u=0;u<c.globals.collapsedSeriesIndices.length;u++){var h=c.config.series[c.globals.collapsedSeriesIndices[u]];c.globals.collapsedSeries[u].data=c.globals.axisCharts?h.data.slice():h}for(var d=0;d<c.globals.ancillaryCollapsedSeriesIndices.length;d++){var p=c.config.series[c.globals.ancillaryCollapsedSeriesIndices[d]];c.globals.ancillaryCollapsedSeries[d].data=c.globals.axisCharts?p.data.slice():p}n.series.emptyCollapsedSeries(c.config.series)}return n.update(t).then((function(){l===s.length-1&&a(n)}))}))}))}},{key:"_updateSeries",value:function(t,e){var r=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return new Promise((function(n){var o,a=r.w;return a.globals.shouldAnimate=e,a.globals.dataChanged=!0,e&&r.ctx.series.getPreviousPaths(),a.globals.axisCharts?(o=t.map((function(t,e){return r._extendSeries(t,e)})),0===o.length&&(o=[{data:[]}]),a.config.series=o):a.config.series=t.slice(),i&&(a.globals.initialConfig.series=f.clone(a.config.series),a.globals.initialSeries=f.clone(a.config.series)),r.ctx.update().then((function(){n(r.ctx)}))}))}},{key:"_extendSeries",value:function(t,e){var r=this.w,i=r.config.series[e];return Wb(Wb({},r.config.series[e]),{},{name:t.name?t.name:null==i?void 0:i.name,color:t.color?t.color:null==i?void 0:i.color,type:t.type?t.type:null==i?void 0:i.type,group:t.group?t.group:null==i?void 0:i.group,hidden:void 0!==t.hidden?t.hidden:null==i?void 0:i.hidden,data:t.data?t.data:null==i?void 0:i.data,zIndex:void 0!==t.zIndex?t.zIndex:e})}},{key:"toggleDataPointSelection",value:function(t,e){var r=this.w,i=null,n=".apexcharts-series[data\\:realIndex='".concat(t,"']");return r.globals.axisCharts?i=r.globals.dom.Paper.findOne("".concat(n," path[j='").concat(e,"'], ").concat(n," circle[j='").concat(e,"'], ").concat(n," rect[j='").concat(e,"']")):void 0===e&&(i=r.globals.dom.Paper.findOne("".concat(n," path[j='").concat(t,"']")),"pie"!==r.config.chart.type&&"polarArea"!==r.config.chart.type&&"donut"!==r.config.chart.type||this.ctx.pie.pieClicked(t)),i?(new Pc(this.ctx).pathMouseDown(i,null),i.node?i.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(t){var e=this.w;if(["min","max"].forEach((function(r){void 0!==t.xaxis[r]&&(e.config.xaxis[r]=t.xaxis[r],e.globals.lastXAxis[r]=t.xaxis[r])})),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric){var r=new Cu(t);t=r.convertCatToNumericXaxis(t,this.ctx)}return t}},{key:"forceYAxisUpdate",value:function(t){return t.chart&&t.chart.stacked&&"100%"===t.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((function(e,r){t.yaxis[r].min=0,t.yaxis[r].max=100})):(t.yaxis.min=0,t.yaxis.max=100)),t}},{key:"revertDefaultAxisMinMax",value:function(t){var e=this,r=this.w,i=r.globals.lastXAxis,n=r.globals.lastYAxis;t&&t.xaxis&&(i=t.xaxis),t&&t.yaxis&&(n=t.yaxis),r.config.xaxis.min=i.min,r.config.xaxis.max=i.max;r.config.yaxis.map((function(t,i){r.globals.zoomed||void 0!==n[i]?function(t){void 0!==n[t]&&(r.config.yaxis[t].min=n[t].min,r.config.yaxis[t].max=n[t].max)}(i):void 0!==e.ctx.opts.yaxis[i]&&(t.min=e.ctx.opts.yaxis[i].min,t.max=e.ctx.opts.yaxis[i].max)}))}}],r&&Ub(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function $b(t){return $b="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},$b(t)}function Jb(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Qb(i.key),i)}}function Qb(t){var e=function(t){if("object"!=$b(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=$b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$b(e)?e:e+""}!function(){function t(){for(var t=arguments.length>0&&arguments[0]!==c?arguments[0]:[],n=arguments.length>1?arguments[1]:c,o=arguments.length>2?arguments[2]:c,a=arguments.length>3?arguments[3]:c,s=arguments.length>4?arguments[4]:c,l=arguments.length>5?arguments[5]:c,c=arguments.length>6?arguments[6]:c,u=t.slice(n,o||c),h=a.slice(s,l||c),f=0,d={pos:[0,0],start:[0,0]},p={pos:[0,0],start:[0,0]};u[f]=e.call(d,u[f]),h[f]=e.call(p,h[f]),u[f][0]!=h[f][0]||"M"==u[f][0]||"A"==u[f][0]&&(u[f][4]!=h[f][4]||u[f][5]!=h[f][5])?(Array.prototype.splice.apply(u,[f,1].concat(i.call(d,u[f]))),Array.prototype.splice.apply(h,[f,1].concat(i.call(p,h[f])))):(u[f]=r.call(d,u[f]),h[f]=r.call(p,h[f])),++f!=u.length||f!=h.length;)f==u.length&&u.push(["C",d.pos[0],d.pos[1],d.pos[0],d.pos[1],d.pos[0],d.pos[1]]),f==h.length&&h.push(["C",p.pos[0],p.pos[1],p.pos[0],p.pos[1],p.pos[0],p.pos[1]]);return{start:u,dest:h}}function e(t){switch(t[0]){case"z":case"Z":t[0]="L",t[1]=this.start[0],t[2]=this.start[1];break;case"H":t[0]="L",t[2]=this.pos[1];break;case"V":t[0]="L",t[2]=t[1],t[1]=this.pos[0];break;case"T":t[0]="Q",t[3]=t[1],t[4]=t[2],t[1]=this.reflection[1],t[2]=this.reflection[0];break;case"S":t[0]="C",t[6]=t[4],t[5]=t[3],t[4]=t[2],t[3]=t[1],t[2]=this.reflection[1],t[1]=this.reflection[0]}return t}function r(t){var e=t.length;return this.pos=[t[e-2],t[e-1]],-1!="SCQT".indexOf(t[0])&&(this.reflection=[2*this.pos[0]-t[e-4],2*this.pos[1]-t[e-3]]),t}function i(t){var e=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],e;case"L":t[5]=t[3]=t[1],t[6]=t[4]=t[2],t[1]=this.pos[0],t[2]=this.pos[1];break;case"Q":t[6]=t[4],t[5]=t[3],t[4]=1*t[4]/3+2*t[2]/3,t[3]=1*t[3]/3+2*t[1]/3,t[2]=1*this.pos[1]/3+2*t[2]/3,t[1]=1*this.pos[0]/3+2*t[1]/3;break;case"A":e=function(t,e){var r,i,n,o,a,s,l,c,u,h,f,d,p,g,b,y,v,m,x,w,S,k,A,O,P,C,j=Math.abs(e[1]),T=Math.abs(e[2]),E=e[3]%360,M=e[4],L=e[5],I=e[6],_=e[7],R=new Rt(t),z=new Rt(I,_),X=[];if(0===j||0===T||R.x===z.x&&R.y===z.y)return[["C",R.x,R.y,z.x,z.y,z.x,z.y]];for((i=(r=new Rt((R.x-z.x)/2,(R.y-z.y)/2).transform((new Ht).rotate(E))).x*r.x/(j*j)+r.y*r.y/(T*T))>1&&(j*=i=Math.sqrt(i),T*=i),n=(new Ht).rotate(E).scale(1/j,1/T).rotate(-E),R=R.transform(n),s=(o=[(z=z.transform(n)).x-R.x,z.y-R.y])[0]*o[0]+o[1]*o[1],a=Math.sqrt(s),o[0]/=a,o[1]/=a,l=s<4?Math.sqrt(1-s/4):0,M===L&&(l*=-1),c=new Rt((z.x+R.x)/2+l*-o[1],(z.y+R.y)/2+l*o[0]),u=new Rt(R.x-c.x,R.y-c.y),h=new Rt(z.x-c.x,z.y-c.y),f=Math.acos(u.x/Math.sqrt(u.x*u.x+u.y*u.y)),u.y<0&&(f*=-1),d=Math.acos(h.x/Math.sqrt(h.x*h.x+h.y*h.y)),h.y<0&&(d*=-1),L&&f>d&&(d+=2*Math.PI),!L&&f<d&&(d-=2*Math.PI),y=[],v=f,p=(d-f)/(g=Math.ceil(2*Math.abs(f-d)/Math.PI)),b=4*Math.tan(p/4)/3,S=0;S<=g;S++)x=Math.cos(v),m=Math.sin(v),w=new Rt(c.x+x,c.y+m),y[S]=[new Rt(w.x+b*m,w.y-b*x),w,new Rt(w.x-b*m,w.y+b*x)],v+=p;for(y[0][0]=y[0][1].clone(),y[y.length-1][2]=y[y.length-1][1].clone(),n=(new Ht).rotate(E).scale(j,T).rotate(-E),S=0,k=y.length;S<k;S++)y[S][0]=y[S][0].transform(n),y[S][1]=y[S][1].transform(n),y[S][2]=y[S][2].transform(n);for(S=1,k=y.length;S<k;S++)A=(w=y[S-1][2]).x,O=w.y,P=(w=y[S][0]).x,C=w.y,I=(w=y[S][1]).x,_=w.y,X.push(["C",A,O,P,C,I,_]);return X}(this.pos,t),t=e[0]}return t[0]="C",this.pos=[t[5],t[6]],this.reflection=[2*t[5]-t[3],2*t[6]-t[4]],e}function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;if(!1===e)return!1;for(var r=e,i=t.length;r<i;++r)if("M"==t[r][0])return r;return!1}it($n,{morph:function(e,r,i,o,a){for(var s=this.parse(e),l=this.parse(r),c=0,u=0,h=!1,f=!1;!1!==c||!1!==u;){var d;h=n(s,!1!==c&&c+1),f=n(l,!1!==u&&u+1),!1===c&&(c=0==(d=new $n(p.start).bbox()).height||0==d.width?s.push(s[0])-1:s.push(["M",d.x+d.width/2,d.y+d.height/2])-1),!1===u&&(u=0==(d=new $n(p.dest).bbox()).height||0==d.width?l.push(l[0])-1:l.push(["M",d.x+d.width/2,d.y+d.height/2])-1);var p=t(s,c,h,l,u,f);s=s.slice(0,c).concat(p.start,!1===h?[]:s.slice(h)),l=l.slice(0,u).concat(p.dest,!1===f?[]:l.slice(f)),c=!1!==h&&c+p.start.length,u=!1!==f&&u+p.dest.length}this._array=s,this.destination=new $n,this.destination._array=l;var g=this.fromArray(s.map((function(t,e){var r=l[e].map((function(r,n){return 0===n?r:o.step(t[n],l[e][n],i,a[e],a)}));return r})));return g}})}();var Kb=function(t){return t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY}},ty=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e.remember("_draggable",this),this.el=e,this.drag=this.drag.bind(this),this.startDrag=this.startDrag.bind(this),this.endDrag=this.endDrag.bind(this)}var e,r;return e=t,r=[{key:"init",value:function(t){t?(this.el.on("mousedown.drag",this.startDrag),this.el.on("touchstart.drag",this.startDrag,{passive:!1})):(this.el.off("mousedown.drag"),this.el.off("touchstart.drag"))}},{key:"startDrag",value:function(t){var e=!t.type.indexOf("mouse");if(!(e&&1!==t.which&&0!==t.buttons||this.el.dispatch("beforedrag",{event:t,handler:this}).defaultPrevented)){t.preventDefault(),t.stopPropagation(),this.init(!1),this.box=this.el.bbox(),this.lastClick=this.el.point(Kb(t));var r=(e?"mouseup":"touchend")+".drag";de(window,(e?"mousemove":"touchmove")+".drag",this.drag,this,{passive:!1}),de(window,r,this.endDrag,this,{passive:!1}),this.el.fire("dragstart",{event:t,handler:this,box:this.box})}}},{key:"drag",value:function(t){var e=this.box,r=this.lastClick,i=this.el.point(Kb(t)),n=i.x-r.x,o=i.y-r.y;if(!n&&!o)return e;var a=e.x+n,s=e.y+o;this.box=new Vt(a,s,e.w,e.h),this.lastClick=i,this.el.dispatch("dragmove",{event:t,handler:this,box:this.box}).defaultPrevented||this.move(a,s)}},{key:"move",value:function(t,e){"svg"===this.el.type?Js.prototype.move.call(this.el,t,e):this.el.move(t,e)}},{key:"endDrag",value:function(t){this.drag(t),this.el.fire("dragend",{event:t,handler:this,box:this.box}),pe(window,"mousemove.drag"),pe(window,"touchmove.drag"),pe(window,"mouseup.drag"),pe(window,"touchend.drag"),this.init(!0)}}],r&&Jb(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ey(t){return ey="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},ey(t)}function ry(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function iy(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,oy(i.key),i)}}function ny(t,e,r){return e&&iy(t.prototype,e),r&&iy(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function oy(t){var e=function(t){if("object"!=ey(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ey(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ey(e)?e:e+""}function ay(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function sy(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return function(n){n.preventDefault(),n.stopPropagation();var o=n.pageX||n.touches[0].pageX,a=n.pageY||n.touches[0].pageY;e.fire(t,{x:o,y:a,event:n,index:i,points:r})}}function ly(t,e){var r,i,n=(i=2,function(t){if(Array.isArray(t))return t}(r=t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return s}}(r,i)||function(t,e){if(t){if("string"==typeof t)return ay(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ay(t,e):void 0}}(r,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],a=n[1],s=e.a,l=e.b,c=e.c,u=e.d;return[o*s+a*c+e.e,o*l+a*u+e.f]}it(ar,{draggable:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return(this.remember("_draggable")||new ty(this)).init(t),this}});var cy=function(){function t(e){ry(this,t),this.el=e,e.remember("_selectHandler",this),this.selection=new Js,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);var r=N();this.observer=new r.MutationObserver(this.mutationHandler)}return ny(t,[{key:"init",value:function(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}},{key:"active",value:function(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}},{key:"createSelection",value:function(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}},{key:"updateSelection",value:function(){this.selection.get(0).plot(this.handlePoints)}},{key:"createResizeHandles",value:function(){var t=this;this.handlePoints.forEach((function(e,r,i){var n=t.order[r];t.createHandle.call(t,t.selection,e,r,i,n),t.selection.get(r+1).addClass("svg_select_handle svg_select_handle_"+n).on("mousedown.selection touchstart.selection",sy(n,t.el,t.handlePoints,r))}))}},{key:"createHandleFn",value:function(t){t.polyline()}},{key:"updateHandleFn",value:function(t,e,r,i){var n=i.at(r-1),o=i[(r+1)%i.length],a=e,s=[a[0]-n[0],a[1]-n[1]],l=[a[0]-o[0],a[1]-o[1]],c=Math.sqrt(s[0]*s[0]+s[1]*s[1]),u=Math.sqrt(l[0]*l[0]+l[1]*l[1]),h=[s[0]/c,s[1]/c],f=[l[0]/u,l[1]/u],d=[a[0]-10*h[0],a[1]-10*h[1]],p=[a[0]-10*f[0],a[1]-10*f[1]];t.plot([d,a,p])}},{key:"updateResizeHandles",value:function(){var t=this;this.handlePoints.forEach((function(e,r,i){var n=t.order[r];t.updateHandle.call(t,t.selection.get(r+1),e,r,i,n)}))}},{key:"createRotFn",value:function(t){t.line(),t.circle(5)}},{key:"getPoint",value:function(t){return this.handlePoints[this.order.indexOf(t)]}},{key:"getPointHandle",value:function(t){return this.selection.get(this.order.indexOf(t)+1)}},{key:"updateRotFn",value:function(t,e){var r=this.getPoint("t");t.get(0).plot(r[0],r[1],e[0],e[1]),t.get(1).center(e[0],e[1])}},{key:"createRotationHandle",value:function(){var t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",sy("rot",this.el,this.handlePoints));this.createRot.call(this,t)}},{key:"updateRotationHandle",value:function(){var t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}},{key:"updatePoints",value:function(){var t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map((function(t){return ly(t,e)})),this.rotationPoint=ly(this.getRotationPoint(t),e)}},{key:"getHandlePoints",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.el.bbox(),e=t.x,r=t.x2,i=t.y,n=t.y2,o=t.cx,a=t.cy;return[[e,i],[o,i],[r,i],[r,a],[r,n],[o,n],[e,n],[e,a]]}},{key:"getRotationPoint",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.el.bbox(),e=t.y;return[t.cx,e-20]}},{key:"mutationHandler",value:function(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}]),t}(),uy=function(){function t(e){ry(this,t),this.el=e,e.remember("_pointSelectHandler",this),this.selection=new Js,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);var r=N();this.observer=new r.MutationObserver(this.mutationHandler)}return ny(t,[{key:"init",value:function(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}},{key:"active",value:function(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}},{key:"createSelection",value:function(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}},{key:"updateSelection",value:function(){this.selection.get(0).plot(this.points)}},{key:"createPointHandles",value:function(){var t=this;this.points.forEach((function(e,r,i){t.createHandle.call(t,t.selection,e,r,i),t.selection.get(r+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",sy("point",t.el,t.points,r))}))}},{key:"createHandleFn",value:function(t){t.circle(5)}},{key:"updateHandleFn",value:function(t,e){t.center(e[0],e[1])}},{key:"updatePointHandles",value:function(){var t=this;this.points.forEach((function(e,r,i){t.updateHandle.call(t,t.selection.get(r+1),e,r,i)}))}},{key:"updatePoints",value:function(){var t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((function(e){return ly(e,t)}))}},{key:"mutationHandler",value:function(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}}]),t}(),hy=function(t){return function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"===ey(e)&&(r=e,e=!0);var i=this.remember("_"+t.name);return i||(e.prototype instanceof cy?(i=new e(this),e=!0):i=new t(this),this.remember("_"+t.name,i)),i.active(e,r),this}};function fy(t){return fy="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},fy(t)}function dy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function py(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,by(i.key),i)}}function gy(t,e,r){return e&&py(t.prototype,e),r&&py(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function by(t){var e=function(t){if("object"!=fy(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=fy(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==fy(e)?e:e+""}function yy(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return vy(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?vy(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vy(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function my(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return function(n){n.preventDefault(),n.stopPropagation();var o=n.pageX||n.touches[0].pageX,a=n.pageY||n.touches[0].pageY;e.fire(t,{x:o,y:a,event:n,index:i,points:r})}}function xy(t,e){var r=yy(t,2),i=r[0],n=r[1],o=e.a,a=e.b,s=e.c,l=e.d;return[i*o+n*s+e.e,i*a+n*l+e.f]}it(ar,{select:hy(cy)}),it([Eo,zo,on],{pointSelect:hy(uy)});var wy=function(){function t(e){dy(this,t),this.el=e,e.remember("_selectHandler",this),this.selection=new Js,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);var r=N();this.observer=new r.MutationObserver(this.mutationHandler)}return gy(t,[{key:"init",value:function(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}},{key:"active",value:function(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}},{key:"createSelection",value:function(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}},{key:"updateSelection",value:function(){this.selection.get(0).plot(this.handlePoints)}},{key:"createResizeHandles",value:function(){var t=this;this.handlePoints.forEach((function(e,r,i){var n=t.order[r];t.createHandle.call(t,t.selection,e,r,i,n),t.selection.get(r+1).addClass("svg_select_handle svg_select_handle_"+n).on("mousedown.selection touchstart.selection",my(n,t.el,t.handlePoints,r))}))}},{key:"createHandleFn",value:function(t){t.polyline()}},{key:"updateHandleFn",value:function(t,e,r,i){var n=i.at(r-1),o=i[(r+1)%i.length],a=e,s=[a[0]-n[0],a[1]-n[1]],l=[a[0]-o[0],a[1]-o[1]],c=Math.sqrt(s[0]*s[0]+s[1]*s[1]),u=Math.sqrt(l[0]*l[0]+l[1]*l[1]),h=[s[0]/c,s[1]/c],f=[l[0]/u,l[1]/u],d=[a[0]-10*h[0],a[1]-10*h[1]],p=[a[0]-10*f[0],a[1]-10*f[1]];t.plot([d,a,p])}},{key:"updateResizeHandles",value:function(){var t=this;this.handlePoints.forEach((function(e,r,i){var n=t.order[r];t.updateHandle.call(t,t.selection.get(r+1),e,r,i,n)}))}},{key:"createRotFn",value:function(t){t.line(),t.circle(5)}},{key:"getPoint",value:function(t){return this.handlePoints[this.order.indexOf(t)]}},{key:"getPointHandle",value:function(t){return this.selection.get(this.order.indexOf(t)+1)}},{key:"updateRotFn",value:function(t,e){var r=this.getPoint("t");t.get(0).plot(r[0],r[1],e[0],e[1]),t.get(1).center(e[0],e[1])}},{key:"createRotationHandle",value:function(){var t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",my("rot",this.el,this.handlePoints));this.createRot.call(this,t)}},{key:"updateRotationHandle",value:function(){var t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}},{key:"updatePoints",value:function(){var t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map((function(t){return xy(t,e)})),this.rotationPoint=xy(this.getRotationPoint(t),e)}},{key:"getHandlePoints",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.el.bbox(),e=t.x,r=t.x2,i=t.y,n=t.y2,o=t.cx,a=t.cy;return[[e,i],[o,i],[r,i],[r,a],[r,n],[o,n],[e,n],[e,a]]}},{key:"getRotationPoint",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.el.bbox(),e=t.y;return[t.cx,e-20]}},{key:"mutationHandler",value:function(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}]),t}(),Sy=function(){function t(e){dy(this,t),this.el=e,e.remember("_pointSelectHandler",this),this.selection=new Js,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);var r=N();this.observer=new r.MutationObserver(this.mutationHandler)}return gy(t,[{key:"init",value:function(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}},{key:"active",value:function(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}},{key:"createSelection",value:function(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}},{key:"updateSelection",value:function(){this.selection.get(0).plot(this.points)}},{key:"createPointHandles",value:function(){var t=this;this.points.forEach((function(e,r,i){t.createHandle.call(t,t.selection,e,r,i),t.selection.get(r+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",my("point",t.el,t.points,r))}))}},{key:"createHandleFn",value:function(t){t.circle(5)}},{key:"updateHandleFn",value:function(t,e){t.center(e[0],e[1])}},{key:"updatePointHandles",value:function(){var t=this;this.points.forEach((function(e,r,i){t.updateHandle.call(t,t.selection.get(r+1),e,r,i)}))}},{key:"updatePoints",value:function(){var t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((function(e){return xy(e,t)}))}},{key:"mutationHandler",value:function(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}}]),t}(),ky=function(t){return function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"===fy(e)&&(r=e,e=!0);var i=this.remember("_"+t.name);return i||(e.prototype instanceof wy?(i=new e(this),e=!0):i=new t(this),this.remember("_"+t.name,i)),i.active(e,r),this}};it(ar,{select:ky(wy)}),it([Eo,zo,on],{pointSelect:ky(Sy)});var Ay=function(t){return t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY}},Oy=function(t){for(var e=1/0,r=1/0,i=-1/0,n=-1/0,o=0;o<t.length;o++){var a=t[o];e=Math.min(e,a[0]),r=Math.min(r,a[1]),i=Math.max(i,a[0]),n=Math.max(n,a[1])}return new Vt(e,r,i-e,n-r)},Py=function(){function t(e){dy(this,t),this.el=e,e.remember("_ResizeHandler",this),this.lastCoordinates=null,this.eventType="",this.lastEvent=null,this.handleResize=this.handleResize.bind(this),this.resize=this.resize.bind(this),this.endResize=this.endResize.bind(this),this.rotate=this.rotate.bind(this),this.movePoint=this.movePoint.bind(this)}return gy(t,[{key:"active",value:function(t,e){var r,i,n,o;this.preserveAspectRatio=null!==(r=e.preserveAspectRatio)&&void 0!==r&&r,this.aroundCenter=null!==(i=e.aroundCenter)&&void 0!==i&&i,this.grid=null!==(n=e.grid)&&void 0!==n?n:0,this.degree=null!==(o=e.degree)&&void 0!==o?o:0,this.el.off(".resize"),t&&(this.el.on(["lt.resize","rt.resize","rb.resize","lb.resize","t.resize","r.resize","b.resize","l.resize","rot.resize","point.resize"],this.handleResize),this.lastEvent&&("rot"===this.eventType?this.rotate(this.lastEvent):"point"===this.eventType?this.movePoint(this.lastEvent):this.resize(this.lastEvent)))}},{key:"handleResize",value:function(t){this.eventType=t.type;var e=t.detail,r=e.event,i=e.index,n=e.points,o=!r.type.indexOf("mouse");if(!(o&&1!==(r.which||r.buttons)||this.el.dispatch("beforeresize",{event:t,handler:this}).defaultPrevented)){this.box=this.el.bbox(),this.startPoint=this.el.point(Ay(r)),this.index=i,this.points=n.slice();var a=(o?"mousemove":"touchmove")+".resize",s=(o?"mouseup":"touchcancel.resize touchend")+".resize";"point"===t.type?de(window,a,this.movePoint):"rot"===t.type?de(window,a,this.rotate):de(window,a,this.resize),de(window,s,this.endResize)}}},{key:"resize",value:function(t){this.lastEvent=t;var e=this.snapToGrid(this.el.point(Ay(t))),r=e.x-this.startPoint.x,i=e.y-this.startPoint.y;this.preserveAspectRatio&&this.aroundCenter&&(r*=2,i*=2);var n=this.box.x+r,o=this.box.y+i,a=this.box.x2+r,s=this.box.y2+i,l=new Vt(this.box);if(this.eventType.includes("l")&&(l.x=Math.min(n,this.box.x2),l.x2=Math.max(n,this.box.x2)),this.eventType.includes("r")&&(l.x=Math.min(a,this.box.x),l.x2=Math.max(a,this.box.x)),this.eventType.includes("t")&&(l.y=Math.min(o,this.box.y2),l.y2=Math.max(o,this.box.y2)),this.eventType.includes("b")&&(l.y=Math.min(s,this.box.y),l.y2=Math.max(s,this.box.y)),l.width=l.x2-l.x,l.height=l.y2-l.y,this.preserveAspectRatio){var c=l.width/this.box.width,u=l.height/this.box.height,h=["lt","t","rt","r","rb","b","lb","l"],f=(h.indexOf(this.eventType)+4)%h.length,d=this.aroundCenter?[this.box.cx,this.box.cy]:this.points[f],p=this.eventType.includes("t")||this.eventType.includes("b")?u:c;p=2===this.eventType.length?Math.max(c,u):p,l=function(t,e,r){var i=[[t.x,t.y],[t.x+t.width,t.y],[t.x+t.width,t.y+t.height],[t.x,t.y+t.height]].map((function(t){var i=yy(t,2),n=i[0],o=i[1],a=n-e[0],s=(o-e[1])*r;return[a*r+e[0],s+e[1]]}));return Oy(i)}(this.box,d,p)}this.el.dispatch("resize",{box:new Vt(l),angle:0,eventType:this.eventType,event:t,handler:this}).defaultPrevented||this.el.size(l.width,l.height).move(l.x,l.y)}},{key:"movePoint",value:function(t){this.lastEvent=t;var e=this.snapToGrid(this.el.point(Ay(t))),r=e.x,i=e.y,n=this.el.array().slice();n[this.index]=[r,i],this.el.dispatch("resize",{box:Oy(n),angle:0,eventType:this.eventType,event:t,handler:this}).defaultPrevented||this.el.plot(n)}},{key:"rotate",value:function(t){this.lastEvent=t;var e=this.startPoint,r=this.el.point(Ay(t)),i=this.box,n=i.cx,o=i.cy,a=e.x-n,s=e.y-o,l=r.x-n,c=r.y-o,u=Math.sqrt(a*a+s*s)*Math.sqrt(l*l+c*c);if(0!==u){var h=Math.acos((a*l+s*c)/u)/Math.PI*180;if(h){r.x<e.x&&(h=-h);var f=new Ht(this.el),d=new Rt(n,o).transformO(f),p=d.x,g=d.y,b=f.decompose().rotate,y=this.snapToAngle(b+h)-b;this.el.dispatch("resize",{box:this.box,angle:y,eventType:this.eventType,event:t,handler:this}).defaultPrevented||this.el.transform(f.rotateO(y,p,g))}}}},{key:"endResize",value:function(t){"rot"!==this.eventType&&"point"!==this.eventType&&this.resize(t),this.lastEvent=null,this.eventType="",pe(window,"mousemove.resize touchmove.resize"),pe(window,"mouseup.resize touchend.resize")}},{key:"snapToGrid",value:function(t){return this.grid&&(t.x=Math.round(t.x/this.grid)*this.grid,t.y=Math.round(t.y/this.grid)*this.grid),t}},{key:"snapToAngle",value:function(t){return this.degree&&(t=Math.round(t/this.degree)*this.degree),t}}]),t}();function Cy(t){return Cy="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},Cy(t)}function jy(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Ty(i.key),i)}}function Ty(t){var e=function(t){if("object"!=Cy(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Cy(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Cy(e)?e:e+""}it(ar,{resize:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"===fy(t)&&(e=t,t=!0);var r=this.remember("_ResizeHandler");return r||(t.prototype instanceof Py?(r=new t(this),t=!0):r=new Py(this),this.remember("_resizeHandler",r)),r.active(t,e),this}}),void 0===window.SVG&&(window.SVG=Zl),void 0===window.Apex&&(window.Apex={});var Ey=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w}var e,r;return e=t,(r=[{key:"initModules",value:function(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","isSeriesHidden","highlightSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","exportToCSV","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend"],this.ctx.animations=new b(this.ctx),this.ctx.axes=new sf(this.ctx),this.ctx.core=new Bb(this.ctx.el,this.ctx),this.ctx.config=new Mu({}),this.ctx.data=new yh(this.ctx),this.ctx.grid=new _h(this.ctx),this.ctx.graphics=new Pc(this.ctx),this.ctx.coreUtils=new Mc(this.ctx),this.ctx.crosshairs=new hf(this.ctx),this.ctx.events=new Qh(this.ctx),this.ctx.exports=new Ah(this.ctx),this.ctx.fill=new Zu(this.ctx),this.ctx.localization=new rf(this.ctx),this.ctx.options=new pu,this.ctx.responsive=new gf(this.ctx),this.ctx.series=new fh(this.ctx),this.ctx.theme=new xf(this.ctx),this.ctx.formatters=new Jc(this.ctx),this.ctx.titleSubtitle=new Af(this.ctx),this.ctx.legend=new od(this.ctx),this.ctx.toolbar=new kd(this.ctx),this.ctx.tooltip=new mp(this.ctx),this.ctx.dimensions=new Uf(this.ctx),this.ctx.updateHelpers=new Zb(this.ctx),this.ctx.zoomPanSelection=new _d(this.ctx),this.ctx.w.globals.tooltip=new mp(this.ctx)}}])&&jy(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function My(t){return My="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},My(t)}function Ly(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Iy(i.key),i)}}function Iy(t){var e=function(t){if("object"!=My(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=My(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==My(e)?e:e+""}var _y=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w}var e,r;return e=t,(r=[{key:"clear",value:function(t){var e=t.isUpdating;this.ctx.zoomPanSelection&&this.ctx.zoomPanSelection.destroy(),this.ctx.toolbar&&this.ctx.toolbar.destroy(),this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx.zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx.toolbar=null,this.ctx.localization=null,this.ctx.w.globals.tooltip=null,this.clearDomElements({isUpdating:e})}},{key:"killSVG",value:function(t){t.each((function(){this.removeClass("*"),this.off()}),!0),t.clear()}},{key:"clearDomElements",value:function(t){var e=this,r=t.isUpdating,i=this.w.globals.dom.Paper.node;i.parentNode&&i.parentNode.parentNode&&!r&&(i.parentNode.parentNode.style.minHeight="unset");var n=this.w.globals.dom.baseEl;n&&this.ctx.eventList.forEach((function(t){n.removeEventListener(t,e.ctx.events.documentEvent)}));var o=this.w.globals.dom;if(null!==this.ctx.el)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(o.Paper),o.Paper.remove(),o.elWrap=null,o.elGraphical=null,o.elLegendWrap=null,o.elLegendForeign=null,o.baseEl=null,o.elGridRect=null,o.elGridRectMask=null,o.elGridRectBarMask=null,o.elGridRectMarkerMask=null,o.elForecastMask=null,o.elNonForecastMask=null,o.elDefs=null}}])&&Ly(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Ry=new WeakMap,zy=r(161),Xy=r.n(zy);function Dy(t){return Dy="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},Dy(t)}function Yy(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Hy(i.key),i)}}function Hy(t){var e=function(t){if("object"!=Dy(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Dy(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Dy(e)?e:e+""}var Fy=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.opts=r,this.ctx=this,this.w=new Yu(r).init(),this.el=e,this.w.globals.cuid=f.randomId(),this.w.globals.chartID=this.w.config.chart.id?f.escapeString(this.w.config.chart.id):this.w.globals.cuid,new Ey(this).initModules(),this.create=f.bind(this.create,this),this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this)}var e,r,i;return e=t,r=[{key:"render",value:function(){var t=this;return new Promise((function(e,r){if(f.elementExists(t.el)){void 0===Apex._chartInstances&&(Apex._chartInstances=[]),t.w.config.chart.id&&Apex._chartInstances.push({id:t.w.globals.chartID,group:t.w.config.chart.group,chart:t}),t.setLocale(t.w.config.chart.defaultLocale);var i=t.w.config.chart.events.beforeMount;"function"==typeof i&&i(t,t.w),t.events.fireEvent("beforeMount",[t,t.w]),window.addEventListener("resize",t.windowResizeHandler),function(t,e){var r=!1;if(t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){var i=t.getBoundingClientRect();"none"!==t.style.display&&0!==i.width||(r=!0)}var n=new ResizeObserver((function(i){r&&e.call(t,i),r=!0}));t.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(t.children).forEach((function(t){return n.observe(t)})):n.observe(t),Ry.set(e,n)}(t.el.parentNode,t.parentResizeHandler);var n=t.el.getRootNode&&t.el.getRootNode(),o=f.is("ShadowRoot",n),a=t.el.ownerDocument,s=o?n.getElementById("apexcharts-css"):a.getElementById("apexcharts-css");if(!s){var l;(s=document.createElement("style")).id="apexcharts-css",s.textContent=Xy();var c=(null===(l=t.opts.chart)||void 0===l?void 0:l.nonce)||t.w.config.chart.nonce;c&&s.setAttribute("nonce",c),o?n.prepend(s):a.head.appendChild(s)}var u=t.create(t.w.config.series,{});if(!u)return e(t);t.mount(u).then((function(){"function"==typeof t.w.config.chart.events.mounted&&t.w.config.chart.events.mounted(t,t.w),t.events.fireEvent("mounted",[t,t.w]),e(u)})).catch((function(t){r(t)}))}else r(new Error("Element not found"))}))}},{key:"create",value:function(t,e){var r=this,i=this.w;new Ey(this).initModules();var n=this.w.globals;if(n.noData=!1,n.animationEnded=!1,!f.elementExists(this.el))return n.animationEnded=!0,this.destroy(),null;if(this.responsive.checkResponsiveConfig(e),i.config.xaxis.convertedCatToNumeric&&new Cu(i.config).convertCatToNumericXaxis(i.config,this.ctx),this.core.setupElements(),"treemap"===i.config.chart.type&&(i.config.grid.show=!1,i.config.yaxis[0].show=!1),0===n.svgWidth)return n.animationEnded=!0,null;var o=t;t.forEach((function(t,e){t.hidden&&(o=r.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:e}))}));var a=Mc.checkComboSeries(o,i.config.chart.type);n.comboCharts=a.comboCharts,n.comboBarCount=a.comboBarCount;var s=o.every((function(t){return t.data&&0===t.data.length}));(0===o.length||s&&n.collapsedSeries.length<1)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(o),this.theme.init(),new Ku(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),n.noData&&n.collapsedSeries.length!==n.series.length&&!i.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),n.axisCharts&&(this.core.coreCalculations(),"category"!==i.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=i.globals.minX,this.ctx.toolbar.maxX=i.globals.maxX),this.formatters.heatmapLabelFormatters(),new Mc(this).getLargestMarkerSize(),this.dimensions.plotCoords();var l=this.core.xySettings();this.grid.createGridMask();var c=this.core.plotChartType(o,l),u=new lh(this);return u.bringForward(),i.config.dataLabels.background.enabled&&u.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:c,xyRatios:l,dimensions:{plot:{left:i.globals.translateX,top:i.globals.translateY,width:i.globals.gridWidth,height:i.globals.gridHeight}}}}},{key:"mount",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=this,i=r.w;return new Promise((function(n,o){if(null===r.el)return o(new Error("Not enough data to display or target element not found"));(null===e||i.globals.allSeriesCollapsed)&&r.series.handleNoData(),r.grid=new _h(r);var a,s,l=r.grid.drawGrid();if(r.annotations=new vu(r),r.annotations.drawImageAnnos(),r.annotations.drawTextAnnos(),"back"===i.config.grid.position&&(l&&i.globals.dom.elGraphical.add(l.el),null!=l&&null!==(a=l.elGridBorders)&&void 0!==a&&a.node&&i.globals.dom.elGraphical.add(l.elGridBorders)),Array.isArray(e.elGraph))for(var c=0;c<e.elGraph.length;c++)i.globals.dom.elGraphical.add(e.elGraph[c]);else i.globals.dom.elGraphical.add(e.elGraph);"front"===i.config.grid.position&&(l&&i.globals.dom.elGraphical.add(l.el),null!=l&&null!==(s=l.elGridBorders)&&void 0!==s&&s.node&&i.globals.dom.elGraphical.add(l.elGridBorders)),"front"===i.config.xaxis.crosshairs.position&&r.crosshairs.drawXCrosshairs(),"front"===i.config.yaxis[0].crosshairs.position&&r.crosshairs.drawYCrosshairs(),"treemap"!==i.config.chart.type&&r.axes.drawAxis(i.config.chart.type,l);var u=new jh(t.ctx,l),h=new qh(t.ctx,l);if(null!==l&&(u.xAxisLabelCorrections(l.xAxisTickWidth),h.setYAxisTextAlignments(),i.config.yaxis.map((function(t,e){-1===i.globals.ignoreYAxisIndexes.indexOf(e)&&h.yAxisTitleRotate(e,t.opposite)}))),r.annotations.drawAxesAnnotations(),!i.globals.noData){if(i.config.tooltip.enabled&&!i.globals.noData&&r.w.globals.tooltip.drawTooltip(e.xyRatios),i.globals.axisCharts&&(i.globals.isXNumeric||i.config.xaxis.convertedCatToNumeric||i.globals.isRangeBar))(i.config.chart.zoom.enabled||i.config.chart.selection&&i.config.chart.selection.enabled||i.config.chart.pan&&i.config.chart.pan.enabled)&&r.zoomPanSelection.init({xyRatios:e.xyRatios});else{var f=i.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach((function(t){f[t]=!1}))}i.config.chart.toolbar.show&&!i.globals.allSeriesCollapsed&&r.toolbar.createToolbar()}i.globals.memory.methodsToExec.length>0&&i.globals.memory.methodsToExec.forEach((function(t){t.method(t.params,!1,t.context)})),i.globals.axisCharts||i.globals.noData||r.core.resizeNonAxisCharts(),n(r)}))}},{key:"destroy",value:function(){window.removeEventListener("resize",this.windowResizeHandler),function(t,e){var r=Ry.get(e);r&&(r.disconnect(),Ry.delete(e))}(this.el.parentNode,this.parentResizeHandler);var t=this.w.config.chart.id;t&&Apex._chartInstances.forEach((function(e,r){e.id===f.escapeString(t)&&Apex._chartInstances.splice(r,1)})),new _y(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=this.w;return a.globals.selection=void 0,t.series&&(this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map((function(t,r){return e.updateHelpers._extendSeries(t,r)}))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),a.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,r,i,n,o)}},{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],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,r)}},{key:"appendSeries",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this.w.config.series.slice();return i.push(t),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(i,e,r)}},{key:"appendData",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this;r.w.globals.dataChanged=!0,r.series.getPreviousPaths();for(var i=r.w.config.series.slice(),n=0;n<i.length;n++)if(null!==t[n]&&void 0!==t[n])for(var o=0;o<t[n].data.length;o++)i[n].data.push(t[n].data[o]);return r.w.config.series=i,e&&(r.w.globals.initialSeries=f.clone(r.w.config.series)),this.update()}},{key:"update",value:function(t){var e=this;return new Promise((function(r,i){new _y(e.ctx).clear({isUpdating:!0});var n=e.create(e.w.config.series,t);if(!n)return r(e);e.mount(n).then((function(){"function"==typeof e.w.config.chart.events.updated&&e.w.config.chart.events.updated(e,e.w),e.events.fireEvent("updated",[e,e.w]),e.w.globals.isDirty=!0,r(e)})).catch((function(t){i(t)}))}))}},{key:"getSyncedCharts",value:function(){var t=this.getGroupedCharts(),e=[this];return t.length&&(e=[],t.forEach((function(t){e.push(t)}))),e}},{key:"getGroupedCharts",value:function(){var t=this;return Apex._chartInstances.filter((function(t){if(t.group)return!0})).map((function(e){return t.w.config.chart.group===e.group?e.chart:t}))}},{key:"toggleSeries",value:function(t){return this.series.toggleSeries(t)}},{key:"highlightSeriesOnLegendHover",value:function(t,e){return this.series.toggleSeriesOnHover(t,e)}},{key:"showSeries",value:function(t){this.series.showSeries(t)}},{key:"hideSeries",value:function(t){this.series.hideSeries(t)}},{key:"highlightSeries",value:function(t){this.series.highlightSeries(t)}},{key:"isSeriesHidden",value:function(t){this.series.isSeriesHidden(t)}},{key:"resetSeries",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.series.resetSeries(t,e)}},{key:"addEventListener",value:function(t,e){this.events.addEventListener(t,e)}},{key:"removeEventListener",value:function(t,e){this.events.removeEventListener(t,e)}},{key:"addXaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=this;r&&(i=r),i.annotations.addXaxisAnnotationExternal(t,e,i)}},{key:"addYaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=this;r&&(i=r),i.annotations.addYaxisAnnotationExternal(t,e,i)}},{key:"addPointAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=this;r&&(i=r),i.annotations.addPointAnnotationExternal(t,e,i)}},{key:"clearAnnotations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=this;t&&(e=t),e.annotations.clearAnnotations(e)}},{key:"removeAnnotation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=this;e&&(r=e),r.annotations.removeAnnotation(r,t)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}},{key:"getHighestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Wh(this.ctx).getMinYMaxY(t).highestY}},{key:"getLowestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Wh(this.ctx).getMinYMaxY(t).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}},{key:"zoomX",value:function(t,e){this.ctx.toolbar.zoomUpdateOptions(t,e)}},{key:"setLocale",value:function(t){this.localization.setCurrentLocaleValues(t)}},{key:"dataURI",value:function(t){return new Ah(this.ctx).dataURI(t)}},{key:"exportToCSV",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Ah(this.ctx).exportToCSV(t)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var t=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout((function(){t.w.globals.resized=!0,t.w.globals.dataChanged=!1,t.ctx.update()}),150)}},{key:"_windowResizeHandler",value:function(){var t=this.w.config.chart.redrawOnWindowResize;"function"==typeof t&&(t=t()),t&&this._windowResize()}}],i=[{key:"getChartByID",value:function(t){var e=f.escapeString(t);if(Apex._chartInstances){var r=Apex._chartInstances.filter((function(t){return t.id===e}))[0];return r&&r.chart}}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),r=0;r<e.length;r++)new t(e[r],JSON.parse(e[r].getAttribute("data-options"))).render()}},{key:"exec",value:function(t,e){var r=this.getChartByID(t);if(r){r.w.globals.isExecCalled=!0;var i=null;if(-1!==r.publicMethods.indexOf(e)){for(var n=arguments.length,o=new Array(n>2?n-2:0),a=2;a<n;a++)o[a-2]=arguments[a];i=r[e].apply(r,o)}return i}}},{key:"merge",value:function(t,e){return f.extend(t,e)}}],r&&Yy(e.prototype,r),i&&Yy(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()})(),i})()));