-
Notifications
You must be signed in to change notification settings - Fork 0
/
955.9133a3a180ba74de.js
1 lines (1 loc) · 481 KB
/
955.9133a3a180ba74de.js
1
"use strict";(self.webpackChunkath=self.webpackChunkath||[]).push([[955],{6596:(Ce,de,N)=>{N.d(de,{bk:()=>R,L3:()=>V,Cj:()=>C});var se=N(5620);const re=ee=>ee.account,R=(0,se.P1)(re,ee=>ee.account),V=(0,se.P1)(re,ee=>ee.accounts),C=(0,se.P1)(re,ee=>ee.operations)},3955:(Ce,de,N)=>{N.r(de),N.d(de,{DashboardModule:()=>Se});var se=N(5357),R=(N(3101),N(3597)),V=N.n(R),C=N(5e3);window.ApexCharts=V();let ge=(()=>{class F{}return F.\u0275fac=function(I){return new(I||F)},F.\u0275mod=C.\u0275\u0275defineNgModule({type:F}),F.\u0275inj=C.\u0275\u0275defineInjector({imports:[[]]}),F})();var xe=N(2455),Ye=N(7078),Oe=N(9646),De=N(7579),Ae=N(6596),ne=N(7810),Pe=N(8966),me=N(5620),be=N(9808),he=N(7423),Te=N(7238),Ie=N(5245);function Ne(F,G){if(1&F){const I=C.\u0275\u0275getCurrentView();C.\u0275\u0275elementContainerStart(0),C.\u0275\u0275elementStart(1,"div",9),C.\u0275\u0275elementStart(2,"div",10),C.\u0275\u0275elementStart(3,"div",11),C.\u0275\u0275text(4),C.\u0275\u0275elementEnd(),C.\u0275\u0275elementEnd(),C.\u0275\u0275elementStart(5,"div",12),C.\u0275\u0275elementStart(6,"div",13),C.\u0275\u0275text(7),C.\u0275\u0275pipe(8,"number"),C.\u0275\u0275elementEnd(),C.\u0275\u0275elementEnd(),C.\u0275\u0275elementStart(9,"div",14),C.\u0275\u0275elementStart(10,"button",15),C.\u0275\u0275listener("click",function(){const q=C.\u0275\u0275restoreView(I).$implicit;return C.\u0275\u0275nextContext(2).navigateToStatement(q._id)}),C.\u0275\u0275element(11,"mat-icon",16),C.\u0275\u0275elementEnd(),C.\u0275\u0275elementStart(12,"button",17),C.\u0275\u0275listener("click",function(){const q=C.\u0275\u0275restoreView(I).$implicit;return C.\u0275\u0275nextContext(2).navigateToAccount(q._id)}),C.\u0275\u0275element(13,"mat-icon",16),C.\u0275\u0275elementEnd(),C.\u0275\u0275elementStart(14,"button",18),C.\u0275\u0275listener("click",function(){const q=C.\u0275\u0275restoreView(I).$implicit;return C.\u0275\u0275nextContext(2).createOperation("Cr\xe9dito",q)}),C.\u0275\u0275element(15,"mat-icon",16),C.\u0275\u0275elementEnd(),C.\u0275\u0275elementStart(16,"button",19),C.\u0275\u0275listener("click",function(){const q=C.\u0275\u0275restoreView(I).$implicit;return C.\u0275\u0275nextContext(2).createOperation("D\xe9bito",q)}),C.\u0275\u0275element(17,"mat-icon",16),C.\u0275\u0275elementEnd(),C.\u0275\u0275elementStart(18,"button",20),C.\u0275\u0275listener("click",function(){const q=C.\u0275\u0275restoreView(I).$implicit;return C.\u0275\u0275nextContext(2).createOperation("Transfer",q)}),C.\u0275\u0275element(19,"mat-icon",16),C.\u0275\u0275elementEnd(),C.\u0275\u0275elementEnd(),C.\u0275\u0275elementEnd(),C.\u0275\u0275elementContainerEnd()}if(2&F){const I=G.$implicit;C.\u0275\u0275advance(4),C.\u0275\u0275textInterpolate1(" ",I.name," "),C.\u0275\u0275advance(3),C.\u0275\u0275textInterpolate2(" ",I.currency," ",C.\u0275\u0275pipeBind2(8,8,I.balance,"1.0-0"),""),C.\u0275\u0275advance(4),C.\u0275\u0275property("svgIcon","heroicons_solid:scale"),C.\u0275\u0275advance(2),C.\u0275\u0275property("svgIcon","heroicons_solid:eye"),C.\u0275\u0275advance(2),C.\u0275\u0275property("svgIcon","heroicons_solid:plus"),C.\u0275\u0275advance(2),C.\u0275\u0275property("svgIcon","heroicons_solid:minus-sm"),C.\u0275\u0275advance(2),C.\u0275\u0275property("svgIcon","heroicons_solid:switch-horizontal")}}function We(F,G){if(1&F&&(C.\u0275\u0275elementContainerStart(0),C.\u0275\u0275elementStart(1,"div",7),C.\u0275\u0275template(2,Ne,20,11,"ng-container",8),C.\u0275\u0275pipe(3,"async"),C.\u0275\u0275elementEnd(),C.\u0275\u0275elementContainerEnd()),2&F){const I=C.\u0275\u0275nextContext();C.\u0275\u0275advance(2),C.\u0275\u0275property("ngForOf",C.\u0275\u0275pipeBind1(3,1,I.accounts$))}}function Be(F,G){if(1&F){const I=C.\u0275\u0275getCurrentView();C.\u0275\u0275elementStart(0,"div",21),C.\u0275\u0275elementStart(1,"div",22),C.\u0275\u0275text(2,"Agregue la primera cuenta!"),C.\u0275\u0275elementEnd(),C.\u0275\u0275elementStart(3,"div",23),C.\u0275\u0275listener("click",function(){return C.\u0275\u0275restoreView(I),C.\u0275\u0275nextContext().navigateToAccounts()}),C.\u0275\u0275element(4,"mat-icon",24),C.\u0275\u0275elementEnd(),C.\u0275\u0275elementEnd()}2&F&&(C.\u0275\u0275advance(4),C.\u0275\u0275property("svgIcon","heroicons_outline:plus"))}let Me=(()=>{class F{constructor(I,H,B,q){this._accountDialog=I,this._changeDetectorRef=H,this._router=B,this.store=q,this.accounts$=(0,Oe.of)([]),this._unsubscribeAll=new De.x}ngOnInit(){this.accounts$=this.store.select(Ae.L3)}ngOnDestroy(){this._unsubscribeAll.next(null),this._unsubscribeAll.complete()}navigateToAccount(I){this._router.navigateByUrl(`/accounts/${I}`)}navigateToAccounts(){this._router.navigateByUrl("/accounts")}navigateToStatement(I){this._router.navigateByUrl(`/accounts/${I}/statement`)}createOperation(I,H){this.store.dispatch((0,Ye.hv)({account:H})),this.openDialog("add","90%",H,null,I)}trackByFn(I,H){return H.id||I}openDialog(I,H,B,q,oe){this._accountDialog.open(ne.Q,{data:{account:B,operation:q,dialogMode:I,actionType:oe},width:H,panelClass:"ath-dialog-panel"})}}return F.\u0275fac=function(I){return new(I||F)(C.\u0275\u0275directiveInject(Pe.uw),C.\u0275\u0275directiveInject(C.ChangeDetectorRef),C.\u0275\u0275directiveInject(se.F0),C.\u0275\u0275directiveInject(me.yh))},F.\u0275cmp=C.\u0275\u0275defineComponent({type:F,selectors:[["ath-dashboard"]],decls:12,vars:4,consts:[[1,"flex","flex-col","flex-auto","w-full","bg-mine-200"],[1,"flex","flex-wrap","w-full","max-w-screen-xl","p-6","mx-auto","md:p-8"],[1,"flex","items-center","justify-between","w-full"],[1,"text-3xl","font-semibold","leading-8","tracking-tight"],[1,"font-medium","tracking-tight","text-secondary"],[4,"ngIf","ngIfElse"],["noAccounts",""],[1,"grid","w-full","grid-cols-1","gap-8","mt-8","sm:grid-cols-2","lg:grid-cols-3"],[4,"ngFor","ngForOf"],[1,"flex","flex-col","flex-auto","overflow-hidden","pb-6","shadow","bg-card","rounded-md","cursor-pointer","hover:shadow-lg"],[1,"flex","items-start","justify-between","m-6","mb-0"],[1,"text-2xl","font-medium","leading-6","tracking-tight","truncate"],[1,"flex","mx-6","mt-3","flex-row","lg:items-center"],[1,"font-bold","leading-tight","tracking-tighter","text-5xl","xl:text-7xl"],[1,"flex","justify-start","mx-6","gap-2","flex-row","flex-wrap","mt-5"],["mat-stroked-button","","matTooltip","Estado de cuentas",1,"px-2","rounded-sm","leading-6","min-w-10","sm:min-w-13","min-h-7","sm:min-h-10","h-7","sm:h-10",3,"click"],[1,"icon-size-5","sm:icon-size-7",3,"svgIcon"],["mat-stroked-button","","matTooltip","Ver detalles de la cuenta",1,"px-2","rounded-sm","leading-6","min-w-10","sm:min-w-13","min-h-7","sm:min-h-10","h-7","sm:h-10",3,"click"],["mat-stroked-button","","matTooltip","Acreditar fondos",1,"px-2","rounded-sm","leading-6","min-w-10","sm:min-w-13","min-h-7","sm:min-h-10","h-7","sm:h-10",3,"click"],["mat-stroked-button","","matTooltip","Debitar fondos",1,"px-2","rounded-sm","leading-6","min-w-10","sm:min-w-13","min-h-7","sm:min-h-10","h-7","sm:h-10",3,"click"],["mat-stroked-button","","matTooltip","Transferir fondos a otra cuenta",1,"px-2","rounded-sm","leading-6","min-w-10","sm:min-w-13","min-h-7","sm:min-h-10","h-7","sm:h-10",3,"click"],[1,"flex","flex-col","justify-center","items-center","w-full"],[1,"p-8","text-4xl","font-semibold","tracking-tight","text-center","border-t","sm:p-16"],[1,"flex","flex-col","items-center","justify-center","w-56","rounded-sm","min-h-40","cursor-pointer","border-2","border-mine-900","border-dashed","hover:bg-primary-50","transition-colors","duration-150","ease-in-out",3,"click"],[1,"icon-size-12","text-mine-900",3,"svgIcon"]],template:function(I,H){if(1&I&&(C.\u0275\u0275elementStart(0,"div",0),C.\u0275\u0275elementStart(1,"div",1),C.\u0275\u0275elementStart(2,"div",2),C.\u0275\u0275elementStart(3,"div"),C.\u0275\u0275elementStart(4,"div",3),C.\u0275\u0275text(5,"Resumen de las cuentas"),C.\u0275\u0275elementEnd(),C.\u0275\u0275elementStart(6,"div",4),C.\u0275\u0275text(7,"Vista r\xe1pida del comportamiento de las cuentas en el tiempo."),C.\u0275\u0275elementEnd(),C.\u0275\u0275elementEnd(),C.\u0275\u0275elementEnd(),C.\u0275\u0275template(8,We,4,3,"ng-container",5),C.\u0275\u0275pipe(9,"async"),C.\u0275\u0275elementEnd(),C.\u0275\u0275elementEnd(),C.\u0275\u0275template(10,Be,5,1,"ng-template",null,6,C.\u0275\u0275templateRefExtractor)),2&I){const B=C.\u0275\u0275reference(11);C.\u0275\u0275advance(8),C.\u0275\u0275property("ngIf",C.\u0275\u0275pipeBind1(9,2,H.accounts$).length>0)("ngIfElse",B)}},directives:[be.O5,be.sg,he.lW,Te.gM,Ie.Hw],pipes:[be.Ov,be.JJ],encapsulation:2,changeDetection:0}),F})();var Ve=N(7681),Ge=N(1135),_e=N(8505),je=N(520);let Ue=(()=>{class F{constructor(I){this._httpClient=I,this._data=new Ge.X(null)}get data$(){return this._data.asObservable()}getData(){return this._httpClient.get("api/dashboards/analytics").pipe((0,_e.b)(I=>{this._data.next(I)}))}}return F.\u0275fac=function(I){return new(I||F)(C.\u0275\u0275inject(je.eN))},F.\u0275prov=C.\u0275\u0275defineInjectable({token:F,factory:F.\u0275fac,providedIn:"root"}),F})();const qe=[{path:"",component:Me,resolve:{data:(()=>{class F{constructor(I){this._dashboardService=I}resolve(I,H){return this._dashboardService.getData()}}return F.\u0275fac=function(I){return new(I||F)(C.\u0275\u0275inject(Ue))},F.\u0275prov=C.\u0275\u0275defineInjectable({token:F,factory:F.\u0275fac,providedIn:"root"}),F})(),accounts:Ve.$c}}];let Se=(()=>{class F{}return F.\u0275fac=function(I){return new(I||F)},F.\u0275mod=C.\u0275\u0275defineNgModule({type:F}),F.\u0275inj=C.\u0275\u0275defineInjector({imports:[[se.Bz.forChild(qe),ge,xe.m]]}),F})()},3597:(Ce,de,N)=>{var se;function re(w,e){var t=Object.keys(w);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(w);e&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(w,a).enumerable})),t.push.apply(t,i)}return t}function R(w){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?re(Object(t),!0).forEach(function(i){Le(w,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(t)):re(Object(t)).forEach(function(i){Object.defineProperty(w,i,Object.getOwnPropertyDescriptor(t,i))})}return w}function V(w){return(V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(w)}function C(w,e){if(!(w instanceof e))throw new TypeError("Cannot call a class as a function")}function ee(w,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(w,i.key,i)}}function Y(w,e,t){return e&&ee(w.prototype,e),t&&ee(w,t),w}function Le(w,e,t){return e in w?Object.defineProperty(w,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):w[e]=t,w}function ge(w,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");w.prototype=Object.create(e&&e.prototype,{constructor:{value:w,writable:!0,configurable:!0}}),e&&Fe(w,e)}function Ee(w){return(Ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(w)}function Fe(w,e){return(Fe=Object.setPrototypeOf||function(t,i){return t.__proto__=i,t})(w,e)}function it(w,e){if(e&&("object"==typeof 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}(w)}function ye(w){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,i=Ee(w);if(e){var a=Ee(this).constructor;t=Reflect.construct(i,arguments,a)}else t=i.apply(this,arguments);return it(this,t)}}function te(w){return function(e){if(Array.isArray(e))return ze(e)}(w)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(w)||function(e,t){if(e){if("string"==typeof e)return ze(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);if("Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return ze(e,t)}}(w)||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 ze(w,e){(null==e||e>w.length)&&(e=w.length);for(var t=0,i=new Array(e);t<e;t++)i[t]=w[t];return i}var P=function(){function w(){C(this,w)}return Y(w,[{key:"shadeRGBColor",value:function(e,t){var i=t.split(","),a=e<0?0:255,s=e<0?-1*e:e,n=parseInt(i[0].slice(4),10),r=parseInt(i[1],10),o=parseInt(i[2],10);return"rgb("+(Math.round((a-n)*s)+n)+","+(Math.round((a-r)*s)+r)+","+(Math.round((a-o)*s)+o)+")"}},{key:"shadeHexColor",value:function(e,t){var i=parseInt(t.slice(1),16),a=e<0?0:255,s=e<0?-1*e:e,n=i>>16,r=i>>8&255,o=255&i;return"#"+(16777216+65536*(Math.round((a-n)*s)+n)+256*(Math.round((a-r)*s)+r)+(Math.round((a-o)*s)+o)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,t){return w.isColorHex(t)?this.shadeHexColor(e,t):this.shadeRGBColor(e,t)}}],[{key:"bind",value:function(e,t){return function(){return e.apply(t,arguments)}}},{key:"isObject",value:function(e){return e&&"object"===V(e)&&!Array.isArray(e)&&null!=e}},{key:"is",value:function(e,t){return Object.prototype.toString.call(t)==="[object "+e+"]"}},{key:"listToArray",value:function(e){var t,i=[];for(t=0;t<e.length;t++)i[t]=e[t];return i}},{key:"extend",value:function(e,t){var i=this;"function"!=typeof Object.assign&&(Object.assign=function(s){if(null==s)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(s),r=1;r<arguments.length;r++){var o=arguments[r];if(null!=o)for(var h in o)o.hasOwnProperty(h)&&(n[h]=o[h])}return n});var a=Object.assign({},e);return this.isObject(e)&&this.isObject(t)&&Object.keys(t).forEach(function(s){i.isObject(t[s])&&s in e?a[s]=i.extend(e[s],t[s]):Object.assign(a,Le({},s,t[s]))}),a}},{key:"extendArray",value:function(e,t){var i=[];return e.map(function(a){i.push(w.extend(t,a))}),i}},{key:"monthMod",value:function(e){return e%12}},{key:"clone",value:function(e){if(w.is("Array",e)){for(var t=[],i=0;i<e.length;i++)t[i]=this.clone(e[i]);return t}if(w.is("Null",e))return null;if(w.is("Date",e))return e;if("object"===V(e)){var a={};for(var s in e)e.hasOwnProperty(s)&&(a[s]=this.clone(e[s]));return a}return e}},{key:"log10",value:function(e){return Math.log(e)/Math.LN10}},{key:"roundToBase10",value:function(e){return Math.pow(10,Math.floor(Math.log10(e)))}},{key:"roundToBase",value:function(e,t){return Math.pow(t,Math.floor(Math.log(e)/Math.log(t)))}},{key:"parseNumber",value:function(e){return null===e?e:parseFloat(e)}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(e){var t=String(e).split(/[eE]/);if(1===t.length)return t[0];var i="",a=e<0?"-":"",s=t[0].replace(".",""),n=Number(t[1])+1;if(n<0){for(i=a+"0.";n++;)i+="0";return i+s.replace(/^-/,"")}for(n-=s.length;n--;)i+="0";return s+i}},{key:"getDimensions",value:function(e){var t=getComputedStyle(e,null),i=e.clientHeight,a=e.clientWidth;return i-=parseFloat(t.paddingTop)+parseFloat(t.paddingBottom),[a-=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight),i]}},{key:"getBoundingClientRect",value:function(e){var t=e.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:e.clientWidth,height:e.clientHeight,x:t.left,y:t.top}}},{key:"getLargestStringFromArr",value:function(e){return e.reduce(function(t,i){return Array.isArray(i)&&(i=i.reduce(function(a,s){return a.length>s.length?a:s})),t.length>i.length?t:i},0)}},{key:"hexToRgba",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==e.substring(0,1)&&(e="#999999");var i=e.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var a=0;a<i.length;a++)i[a]=parseInt(1===i[a].length?i[a]+i[a]:i[a],16);return void 0!==t&&i.push(t),"rgba("+i.join(",")+")"}},{key:"getOpacityFromRGBA",value:function(e){return parseFloat(e.replace(/^.*,(.+)\)/,"$1"))}},{key:"rgb2hex",value:function(e){return(e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):""}},{key:"isColorHex",value:function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(e)}},{key:"getPolygonPos",value:function(e,t){for(var i=[],a=2*Math.PI/t,s=0;s<t;s++){var n={};n.x=e*Math.sin(s*a),n.y=-e*Math.cos(s*a),i.push(n)}return i}},{key:"polarToCartesian",value:function(e,t,i,a){var s=(a-90)*Math.PI/180;return{x:e+i*Math.cos(s),y:t+i*Math.sin(s)}}},{key:"escapeString",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",i=e.toString().slice();return i.replace(/[` ~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/gi,t)}},{key:"negToZero",value:function(e){return e<0?0:e}},{key:"moveIndexInArray",value:function(e,t,i){if(i>=e.length)for(var a=i-e.length+1;a--;)e.push(void 0);return e.splice(i,0,e.splice(t,1)[0]),e}},{key:"extractNumber",value:function(e){return parseFloat(e.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e}},{key:"setELstyles",value:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e.style.key=t[i])}},{key:"isNumber",value:function(e){return!isNaN(e)&&parseFloat(Number(e))===e&&!isNaN(parseInt(e,10))}},{key:"isFloat",value:function(e){return Number(e)===e&&e%1!=0}},{key:"isSafari",value:function(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}},{key:"isFirefox",value:function(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1}},{key:"isIE11",value:function(){if(-1!==window.navigator.userAgent.indexOf("MSIE")||window.navigator.appVersion.indexOf("Trident/")>-1)return!0}},{key:"isIE",value:function(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);if(e.indexOf("Trident/")>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}var a=e.indexOf("Edge/");return a>0&&parseInt(e.substring(a+5,e.indexOf(".",a)),10)}}]),w}(),ue=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w,this.setEasingFunctions()}return Y(w,[{key:"setEasingFunctions",value:function(){var e;if(!this.w.globals.easing){switch(this.w.config.chart.animations.easing){case"linear":e="-";break;case"easein":e="<";break;case"easeout":e=">";break;case"easeinout":default:e="<>";break;case"swing":e=function(t){var i=1.70158;return(t-=1)*t*((i+1)*t+i)+1};break;case"bounce":e=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375};break;case"elastic":e=function(t){return t===!!t?t:Math.pow(2,-10*t)*Math.sin((t-.075)*(2*Math.PI)/.3)+1}}this.w.globals.easing=e}}},{key:"animateLine",value:function(e,t,i,a){e.attr(t).animate(a).attr(i)}},{key:"animateMarker",value:function(e,t,i,a,s,n){t||(t=0),e.attr({r:t,width:t,height:t}).animate(a,s).attr({r:i,width:i.width,height:i.height}).afterAll(function(){n()})}},{key:"animateCircle",value:function(e,t,i,a,s){e.attr({r:t.r,cx:t.cx,cy:t.cy}).animate(a,s).attr({r:i.r,cx:i.cx,cy:i.cy})}},{key:"animateRect",value:function(e,t,i,a,s){e.attr(t).animate(a).attr(i).afterAll(function(){return s()})}},{key:"animatePathsGradually",value:function(e){var c=this.w,d=0;c.config.chart.animations.animateGradually.enabled&&(d=c.config.chart.animations.animateGradually.delay),c.config.chart.animations.dynamicAnimation.enabled&&c.globals.dataChanged&&"bar"!==c.config.chart.type&&(d=0),this.morphSVG(e.el,e.realIndex,e.j,"line"!==c.config.chart.type||c.globals.comboCharts?e.fill:"stroke",e.pathFrom,e.pathTo,e.speed,e.delay*d)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach(function(e){e.el.classList.remove("apexcharts-element-hidden")})}},{key:"animationCompleted",value:function(e){var t=this.w;t.globals.animationEnded||(t.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof t.config.chart.events.animationEnd&&t.config.chart.events.animationEnd(this.ctx,{el:e,w:t}))}},{key:"morphSVG",value:function(e,t,i,a,s,n,r,o){var h=this,c=this.w;s||(s=e.attr("pathFrom")),n||(n=e.attr("pathTo"));var d=function(u){return"radar"===c.config.chart.type&&(r=1),"M 0 ".concat(c.globals.gridHeight)};(!s||s.indexOf("undefined")>-1||s.indexOf("NaN")>-1)&&(s=d()),(!n||n.indexOf("undefined")>-1||n.indexOf("NaN")>-1)&&(n=d()),c.globals.shouldAnimate||(r=1),e.plot(s).animate(1,c.globals.easing,o).plot(s).animate(r,c.globals.easing,o).plot(n).afterAll(function(){P.isNumber(i)?i===c.globals.series[c.globals.maxValsInArrayIndex].length-2&&c.globals.shouldAnimate&&h.animationCompleted(e):"none"!==a&&c.globals.shouldAnimate&&(!c.globals.comboCharts&&t===c.globals.series.length-1||c.globals.comboCharts)&&h.animationCompleted(e),h.showDelayedElements()})}}]),w}(),j=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w}return Y(w,[{key:"getDefaultFilter",value:function(e,t){var i=this.w;e.unfilter(!0),(new window.SVG.Filter).size("120%","180%","-5%","-40%"),"none"!==i.config.states.normal.filter?this.applyFilter(e,t,i.config.states.normal.filter.type,i.config.states.normal.filter.value):i.config.chart.dropShadow.enabled&&this.dropShadow(e,i.config.chart.dropShadow,t)}},{key:"addNormalFilter",value:function(e,t){var i=this.w;i.config.chart.dropShadow.enabled&&!e.node.classList.contains("apexcharts-marker")&&this.dropShadow(e,i.config.chart.dropShadow,t)}},{key:"addLightenFilter",value:function(e,t,i){var a=this,s=this.w,n=i.intensity;e.unfilter(!0),new window.SVG.Filter,e.filter(function(r){var o=s.config.chart.dropShadow;(o.enabled?a.addShadow(r,t,o):r).componentTransfer({rgb:{type:"linear",slope:1.5,intercept:n}})}),e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)}},{key:"addDarkenFilter",value:function(e,t,i){var a=this,s=this.w,n=i.intensity;e.unfilter(!0),new window.SVG.Filter,e.filter(function(r){var o=s.config.chart.dropShadow;(o.enabled?a.addShadow(r,t,o):r).componentTransfer({rgb:{type:"linear",slope:n}})}),e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)}},{key:"applyFilter",value:function(e,t,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;switch(i){case"none":this.addNormalFilter(e,t);break;case"lighten":this.addLightenFilter(e,t,{intensity:a});break;case"darken":this.addDarkenFilter(e,t,{intensity:a})}}},{key:"addShadow",value:function(e,t,i){var a=i.blur,s=i.top,n=i.left,r=i.color,o=i.opacity,h=e.flood(Array.isArray(r)?r[t]:r,o).composite(e.sourceAlpha,"in").offset(n,s).gaussianBlur(a).merge(e.source);return e.blend(e.source,h)}},{key:"dropShadow",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=t.top,s=t.left,n=t.blur,r=t.color,o=t.opacity,h=t.noUserSpaceOnUse,c=this.w;return e.unfilter(!0),P.isIE()&&"radialBar"===c.config.chart.type||(r=Array.isArray(r)?r[i]:r,e.filter(function(d){var u;u=P.isSafari()||P.isFirefox()||P.isIE()?d.flood(r,o).composite(d.sourceAlpha,"in").offset(s,a).gaussianBlur(n):d.flood(r,o).composite(d.sourceAlpha,"in").offset(s,a).gaussianBlur(n).merge(d.source),d.blend(d.source,u)}),h||e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)),e}},{key:"setSelectionFilter",value:function(e,t,i){var a=this.w;if(void 0!==a.globals.selectedDataPoints[t]&&a.globals.selectedDataPoints[t].indexOf(i)>-1){e.node.setAttribute("selected",!0);var s=a.config.states.active.filter;"none"!==s&&this.applyFilter(e,t,s.type,s.value)}}},{key:"_scaleFilterSize",value:function(e){!function(t){for(var i in t)t.hasOwnProperty(i)&&e.setAttribute(i,t[i])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}]),w}(),M=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w}return Y(w,[{key:"drawLine",value:function(e,t,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt",h=this.w,c=h.globals.dom.Paper.line().attr({x1:e,y1:t,x2:i,y2:a,stroke:s,"stroke-dasharray":n,"stroke-width":r,"stroke-linecap":o});return c}},{key:"drawRect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,h=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,d=this.w,u=d.globals.dom.Paper.rect();return u.attr({x:e,y:t,width:i>0?i:0,height:a>0?a:0,rx:s,ry:s,opacity:r,"stroke-width":null!==o?o:0,stroke:null!==h?h:"none","stroke-dasharray":c}),u.node.setAttribute("fill",n),u}},{key:"drawPolygon",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none",s=this.w,n=s.globals.dom.Paper.polygon(e).attr({fill:a,stroke:t,"stroke-width":i});return n}},{key:"drawCircle",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w;e<0&&(e=0);var a=i.globals.dom.Paper.circle(2*e);return null!==t&&a.attr(t),a}},{key:"drawPath",value:function(e){var t=e.d,i=void 0===t?"":t,a=e.stroke,s=void 0===a?"#a8a8a8":a,n=e.strokeWidth,r=void 0===n?1:n,o=e.fill,h=e.fillOpacity,c=void 0===h?1:h,d=e.strokeOpacity,u=void 0===d?1:d,p=e.classes,x=e.strokeLinecap,f=void 0===x?null:x,b=e.strokeDashArray,y=void 0===b?0:b,k=this.w;return null===f&&(f=k.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 ".concat(k.globals.gridHeight)),k.globals.dom.Paper.path(i).attr({fill:o,"fill-opacity":c,stroke:s,"stroke-opacity":u,"stroke-linecap":f,"stroke-width":r,"stroke-dasharray":y,class:p})}},{key:"group",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.w,i=t.globals.dom.Paper.group();return null!==e&&i.attr(e),i}},{key:"move",value:function(e,t){return["M",e,t].join(" ")}},{key:"line",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=null;return null===i?a=["L",e,t].join(" "):"H"===i?a=["H",e].join(" "):"V"===i&&(a=["V",t].join(" ")),a}},{key:"curve",value:function(e,t,i,a,s,n){return["C",e,t,i,a,s,n].join(" ")}},{key:"quadraticCurve",value:function(e,t,i,a){return["Q",e,t,i,a].join(" ")}},{key:"arc",value:function(e,t,i,a,s,n,r){var o=arguments.length>7&&void 0!==arguments[7]&&arguments[7],h="A";o&&(h="a");var c=[h,e,t,i,a,s,n,r].join(" ");return c}},{key:"renderPaths",value:function(e){var t,i=e.j,a=e.realIndex,s=e.pathFrom,n=e.pathTo,r=e.stroke,o=e.strokeWidth,h=e.strokeLinecap,c=e.fill,d=e.animationDelay,u=e.initialSpeed,p=e.dataChangeSpeed,x=e.className,f=e.shouldClipToGrid,b=void 0===f||f,y=e.bindEventsOnPaths,k=void 0===y||y,A=e.drawShadow,l=void 0===A||A,g=this.w,m=new j(this.ctx),v=new ue(this.ctx),S=this.w.config.chart.animations.enabled,T=S&&this.w.config.chart.animations.dynamicAnimation.enabled,L=!!(S&&!g.globals.resized||T&&g.globals.dataChanged&&g.globals.shouldAnimate);L?t=s:(t=n,g.globals.animationEnded=!0);var E,z=g.config.stroke.dashArray;E=Array.isArray(z)?z[a]:g.config.stroke.dashArray;var X=this.drawPath({d:t,stroke:r,strokeWidth:o,fill:c,fillOpacity:1,classes:x,strokeLinecap:h,strokeDashArray:E});X.attr("index",a),b&&X.attr({"clip-path":"url(#gridRectMask".concat(g.globals.cuid,")")}),"none"!==g.config.states.normal.filter.type?m.getDefaultFilter(X,a):g.config.chart.dropShadow.enabled&&l&&(!g.config.chart.dropShadow.enabledOnSeries||g.config.chart.dropShadow.enabledOnSeries&&-1!==g.config.chart.dropShadow.enabledOnSeries.indexOf(a))&&m.dropShadow(X,g.config.chart.dropShadow,a),k&&(X.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,X)),X.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,X)),X.node.addEventListener("mousedown",this.pathMouseDown.bind(this,X))),X.attr({pathTo:n,pathFrom:s});var W={el:X,j:i,realIndex:a,pathFrom:s,pathTo:n,fill:c,strokeWidth:o,delay:d};return!S||g.globals.resized||g.globals.dataChanged?!g.globals.resized&&g.globals.dataChanged||v.showDelayedElements():v.animatePathsGradually(R(R({},W),{},{speed:u})),g.globals.dataChanged&&T&&L&&v.animatePathsGradually(R(R({},W),{},{speed:p})),X}},{key:"drawPattern",value:function(e,t,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,n=this.w,r=n.globals.dom.Paper.pattern(t,i,function(o){"horizontalLines"===e?o.line(0,0,i,0).stroke({color:a,width:s+1}):"verticalLines"===e?o.line(0,0,0,t).stroke({color:a,width:s+1}):"slantedLines"===e?o.line(0,0,t,i).stroke({color:a,width:s}):"squares"===e?o.rect(t,i).fill("none").stroke({color:a,width:s}):"circles"===e&&o.circle(t).fill("none").stroke({color:a,width:s})});return r}},{key:"drawGradient",value:function(e,t,i,a,s){var n,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,h=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,d=this.w;t.length<9&&0===t.indexOf("#")&&(t=P.hexToRgba(t,a)),i.length<9&&0===i.indexOf("#")&&(i=P.hexToRgba(i,s));var u=0,p=1,x=1,f=null;null!==o&&(u=void 0!==o[0]?o[0]/100:0,p=void 0!==o[1]?o[1]/100:1,x=void 0!==o[2]?o[2]/100:1,f=void 0!==o[3]?o[3]/100:null);var b=!("donut"!==d.config.chart.type&&"pie"!==d.config.chart.type&&"polarArea"!==d.config.chart.type&&"bubble"!==d.config.chart.type);if(n=d.globals.dom.Paper.gradient(b?"radial":"linear",null===h||0===h.length?function(A){A.at(u,t,a),A.at(p,i,s),A.at(x,i,s),null!==f&&A.at(f,t,a)}:function(A){(Array.isArray(h[c])?h[c]:h).forEach(function(l){A.at(l.offset/100,l.color,l.opacity)})}),b){var y=d.globals.gridWidth/2,k=d.globals.gridHeight/2;n.attr("bubble"!==d.config.chart.type?{gradientUnits:"userSpaceOnUse",cx:y,cy:k,r}:{cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===e?n.from(0,0).to(0,1):"diagonal"===e?n.from(0,0).to(1,1):"horizontal"===e?n.from(0,1).to(1,1):"diagonal2"===e&&n.from(1,0).to(0,1);return n}},{key:"drawText",value:function(e){var t,i=e.x,a=e.y,s=e.text,n=e.textAnchor,r=e.fontSize,o=e.fontFamily,h=e.fontWeight,c=e.foreColor,d=e.opacity,u=e.cssClass,p=void 0===u?"":u,x=e.isPlainText,f=void 0===x||x,b=this.w;return void 0===s&&(s=""),n||(n="start"),c&&c.length||(c=b.config.chart.foreColor),o=o||b.config.chart.fontFamily,h=h||"regular",(t=Array.isArray(s)?b.globals.dom.Paper.text(function(y){for(var k=0;k<s.length;k++)0===k?y.tspan(s[k]):y.tspan(s[k]).newLine()}):f?b.globals.dom.Paper.plain(s):b.globals.dom.Paper.text(function(y){return y.tspan(s)})).attr({x:i,y:a,"text-anchor":n,"dominant-baseline":"auto","font-size":r,"font-family":o,"font-weight":h,fill:c,class:"apexcharts-text "+p}),t.node.style.fontFamily=o,t.node.style.opacity=d,t}},{key:"drawMarker",value:function(e,t,i){e=e||0;var a=i.pSize||0,s=null;if("square"===i.shape||"rect"===i.shape){var n=void 0===i.pRadius?a/2:i.pRadius;null!==t&&a||(a=0,n=0);var r=1.2*a+n,o=this.drawRect(r,r,r,r,n);o.attr({x:e-r/2,y:t-r/2,cx:e,cy:t,class:i.class?i.class:"",fill:i.pointFillColor,"fill-opacity":i.pointFillOpacity?i.pointFillOpacity:1,stroke:i.pointStrokeColor,"stroke-width":i.pointStrokeWidth?i.pointStrokeWidth:0,"stroke-opacity":i.pointStrokeOpacity?i.pointStrokeOpacity:1}),s=o}else"circle"!==i.shape&&i.shape||(P.isNumber(t)||(a=0,t=0),s=this.drawCircle(a,{cx:e,cy:t,class:i.class?i.class:"",stroke:i.pointStrokeColor,fill:i.pointFillColor,"fill-opacity":i.pointFillOpacity?i.pointFillOpacity:1,"stroke-width":i.pointStrokeWidth?i.pointStrokeWidth:0,"stroke-opacity":i.pointStrokeOpacity?i.pointStrokeOpacity:1}));return s}},{key:"pathMouseEnter",value:function(e,t){var i=this.w,a=new j(this.ctx),s=parseInt(e.node.getAttribute("index"),10),n=parseInt(e.node.getAttribute("j"),10);if("function"==typeof i.config.chart.events.dataPointMouseEnter&&i.config.chart.events.dataPointMouseEnter(t,this.ctx,{seriesIndex:s,dataPointIndex:n,w:i}),this.ctx.events.fireEvent("dataPointMouseEnter",[t,this.ctx,{seriesIndex:s,dataPointIndex:n,w:i}]),("none"===i.config.states.active.filter.type||"true"!==e.node.getAttribute("selected"))&&"none"!==i.config.states.hover.filter.type&&!i.globals.isTouchDevice){var r=i.config.states.hover.filter;a.applyFilter(e,s,r.type,r.value)}}},{key:"pathMouseLeave",value:function(e,t){var i=this.w,a=new j(this.ctx),s=parseInt(e.node.getAttribute("index"),10),n=parseInt(e.node.getAttribute("j"),10);"function"==typeof i.config.chart.events.dataPointMouseLeave&&i.config.chart.events.dataPointMouseLeave(t,this.ctx,{seriesIndex:s,dataPointIndex:n,w:i}),this.ctx.events.fireEvent("dataPointMouseLeave",[t,this.ctx,{seriesIndex:s,dataPointIndex:n,w:i}]),"none"!==i.config.states.active.filter.type&&"true"===e.node.getAttribute("selected")||"none"!==i.config.states.hover.filter.type&&a.getDefaultFilter(e,s)}},{key:"pathMouseDown",value:function(e,t){var i=this.w,a=new j(this.ctx),s=parseInt(e.node.getAttribute("index"),10),n=parseInt(e.node.getAttribute("j"),10),r="false";if("true"===e.node.getAttribute("selected")){if(e.node.setAttribute("selected","false"),i.globals.selectedDataPoints[s].indexOf(n)>-1){var o=i.globals.selectedDataPoints[s].indexOf(n);i.globals.selectedDataPoints[s].splice(o,1)}}else{if(!i.config.states.active.allowMultipleDataPointsSelection&&i.globals.selectedDataPoints.length>0){i.globals.selectedDataPoints=[];var h=i.globals.dom.Paper.select(".apexcharts-series path").members,c=i.globals.dom.Paper.select(".apexcharts-series circle, .apexcharts-series rect").members,d=function(p){Array.prototype.forEach.call(p,function(x){x.node.setAttribute("selected","false"),a.getDefaultFilter(x,s)})};d(h),d(c)}e.node.setAttribute("selected","true"),r="true",void 0===i.globals.selectedDataPoints[s]&&(i.globals.selectedDataPoints[s]=[]),i.globals.selectedDataPoints[s].push(n)}if("true"===r){var u=i.config.states.active.filter;"none"!==u&&a.applyFilter(e,s,u.type,u.value)}else"none"!==i.config.states.active.filter.type&&a.getDefaultFilter(e,s);"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(t,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:n,w:i}),t&&this.ctx.events.fireEvent("dataPointSelection",[t,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:n,w:i}])}},{key:"rotateAroundCenter",value:function(e){var t={};return e&&"function"==typeof e.getBBox&&(t=e.getBBox()),{x:t.x+t.width/2,y:t.y+t.height/2}}},{key:"getTextRects",value:function(e,t,i,a){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=this.w,r=this.drawText({x:-200,y:-200,text:e,textAnchor:"start",fontSize:t,fontFamily:i,foreColor:"#fff",opacity:0});a&&r.attr("transform",a),n.globals.dom.Paper.add(r);var o=r.bbox();return s||(o=r.node.getBoundingClientRect()),r.remove(),{width:o.width,height:o.height}}},{key:"placeTextWithEllipsis",value:function(e,t,i){if("function"==typeof e.getComputedTextLength&&(e.textContent=t,t.length>0&&e.getComputedTextLength()>=i/1.1)){for(var a=t.length-3;a>0;a-=3)if(e.getSubStringLength(0,a)<=i/1.1)return void(e.textContent=t.substring(0,a)+"...");e.textContent="."}}}],[{key:"setAttrs",value:function(e,t){for(var i in t)t.hasOwnProperty(i)&&e.setAttribute(i,t[i])}}]),w}(),at=function(){function w(e){C(this,w),this.w=e.w,this.annoCtx=e}return Y(w,[{key:"setOrientations",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w;if("vertical"===e.label.orientation){var a=null!==t?t:0,s=i.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(a,"']"));if(null!==s){var n=s.getBoundingClientRect();s.setAttribute("x",parseFloat(s.getAttribute("x"))-n.height+4),s.setAttribute("y","top"===e.label.position?parseFloat(s.getAttribute("y"))+n.width:parseFloat(s.getAttribute("y"))-n.width);var r=this.annoCtx.graphics.rotateAroundCenter(s),o=r.x,h=r.y;s.setAttribute("transform","rotate(-90 ".concat(o," ").concat(h,")"))}}}},{key:"addBackgroundToAnno",value:function(e,t){var i=this.w;if(!e||void 0===t.label.text||void 0!==t.label.text&&!String(t.label.text).trim())return null;var a=i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),s=e.getBoundingClientRect(),n=t.label.style.padding.left,r=t.label.style.padding.right,o=t.label.style.padding.top,h=t.label.style.padding.bottom;"vertical"===t.label.orientation&&(o=t.label.style.padding.left,h=t.label.style.padding.right,n=t.label.style.padding.top,r=t.label.style.padding.bottom);var u=this.annoCtx.graphics.drawRect(s.left-a.left-n-i.globals.barPadForNumericAxis,s.top-a.top-o,s.width+n+r,s.height+o+h,t.label.borderRadius,t.label.style.background,1,t.label.borderWidth,t.label.borderColor,0);return t.id&&u.node.classList.add(P.escapeString(t.id)),u}},{key:"annotationsBackground",value:function(){var e=this,t=this.w,i=function(a,s,n){var r=t.globals.dom.baseEl.querySelector(".apexcharts-".concat(n,"-annotations .apexcharts-").concat(n,"-annotation-label[rel='").concat(s,"']"));if(r){var o=r.parentNode,h=e.addBackgroundToAnno(r,a);h&&(o.insertBefore(h.node,r),a.label.mouseEnter&&h.node.addEventListener("mouseenter",a.label.mouseEnter.bind(e,a)),a.label.mouseLeave&&h.node.addEventListener("mouseleave",a.label.mouseLeave.bind(e,a)))}};t.config.annotations.xaxis.map(function(a,s){i(a,s,"xaxis")}),t.config.annotations.yaxis.map(function(a,s){i(a,s,"yaxis")}),t.config.annotations.points.map(function(a,s){i(a,s,"point")})}},{key:"getStringX",value:function(e){var t=this.w,i=e;t.config.xaxis.convertedCatToNumeric&&t.globals.categoryLabels.length&&(e=t.globals.categoryLabels.indexOf(e)+1);var a=t.globals.labels.indexOf(e),s=t.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child("+(a+1)+")");return s&&(i=parseFloat(s.getAttribute("x"))),i}}]),w}(),st=function(){function w(e){C(this,w),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis}return Y(w,[{key:"addXaxisAnnotation",value:function(e,t,i){var a=this.w,s=this.invertAxis?a.globals.minY:a.globals.minX,n=this.invertAxis?a.globals.maxY:a.globals.maxX,r=this.invertAxis?a.globals.yRange[0]:a.globals.xRange,o=(e.x-s)/(r/a.globals.gridWidth);this.annoCtx.inversedReversedAxis&&(o=(n-e.x)/(r/a.globals.gridWidth));var h=e.label.text;"category"!==a.config.xaxis.type&&!a.config.xaxis.convertedCatToNumeric||this.invertAxis||a.globals.dataFormatXNumeric||(o=this.annoCtx.helpers.getStringX(e.x));var c=e.strokeDashArray;if(P.isNumber(o)){if(null==e.x2){var d=this.annoCtx.graphics.drawLine(o+e.offsetX,0+e.offsetY,o+e.offsetX,a.globals.gridHeight+e.offsetY,e.borderColor,c,e.borderWidth);t.appendChild(d.node),e.id&&d.node.classList.add(e.id)}else{var u=(e.x2-s)/(r/a.globals.gridWidth);if(this.annoCtx.inversedReversedAxis&&(u=(n-e.x2)/(r/a.globals.gridWidth)),"category"!==a.config.xaxis.type&&!a.config.xaxis.convertedCatToNumeric||this.invertAxis||a.globals.dataFormatXNumeric||(u=this.annoCtx.helpers.getStringX(e.x2)),u<o){var p=o;o=u,u=p}var x=this.annoCtx.graphics.drawRect(o+e.offsetX,0+e.offsetY,u-o,a.globals.gridHeight+e.offsetY,0,e.fillColor,e.opacity,1,e.borderColor,c);x.node.classList.add("apexcharts-annotation-rect"),x.attr("clip-path","url(#gridRectMask".concat(a.globals.cuid,")")),t.appendChild(x.node),e.id&&x.node.classList.add(e.id)}var f="top"===e.label.position?4:a.globals.gridHeight,b=this.annoCtx.graphics.getTextRects(h,parseFloat(e.label.style.fontSize)),y=this.annoCtx.graphics.drawText({x:o+e.label.offsetX,y:f+e.label.offsetY-("vertical"===e.label.orientation?"top"===e.label.position?b.width/2-12:-b.width/2:0),text:h,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-xaxis-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});y.attr({rel:i}),t.appendChild(y.node),this.annoCtx.helpers.setOrientations(e,i)}}},{key:"drawXAxisAnnotations",value:function(){var e=this,t=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-xaxis-annotations"});return t.config.annotations.xaxis.map(function(a,s){e.addXaxisAnnotation(a,i.node,s)}),i}}]),w}(),_=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w}return Y(w,[{key:"getStackedSeriesTotals",value:function(){var e=this.w,t=[];if(0===e.globals.series.length)return t;for(var i=0;i<e.globals.series[e.globals.maxValsInArrayIndex].length;i++){for(var a=0,s=0;s<e.globals.series.length;s++)void 0!==e.globals.series[s][i]&&(a+=e.globals.series[s][i]);t.push(a)}return e.globals.stackedSeriesTotals=t,t}},{key:"getSeriesTotalByIndex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return null===e?this.w.config.series.reduce(function(t,i){return t+i},0):this.w.globals.series[e].reduce(function(t,i){return t+i},0)}},{key:"isSeriesNull",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===e?this.w.config.series.filter(function(t){return null!==t}):this.w.config.series[e].data.filter(function(t){return null!==t})).length}},{key:"seriesHaveSameValues",value:function(e){return this.w.globals.series[e].every(function(t,i,a){return t===a[0]})}},{key:"getCategoryLabels",value:function(e){var t=this.w,i=e.slice();return t.config.xaxis.convertedCatToNumeric&&(i=e.map(function(a,s){return t.config.xaxis.labels.formatter(a-t.globals.minX+1)})),i}},{key:"getLargestSeries",value:function(){var e=this.w;e.globals.maxValsInArrayIndex=e.globals.series.map(function(t){return t.length}).indexOf(Math.max.apply(Math,e.globals.series.map(function(t){return t.length})))}},{key:"getLargestMarkerSize",value:function(){var e=this.w,t=0;return e.globals.markers.size.forEach(function(i){t=Math.max(t,i)}),e.globals.markers.largestSize=t,t}},{key:"getSeriesTotals",value:function(){var e=this.w;e.globals.seriesTotals=e.globals.series.map(function(t,i){var a=0;if(Array.isArray(t))for(var s=0;s<t.length;s++)a+=t[s];else a+=t;return a})}},{key:"getSeriesTotalsXRange",value:function(e,t){var i=this.w;return i.globals.series.map(function(a,s){for(var n=0,r=0;r<a.length;r++)i.globals.seriesX[s][r]>e&&i.globals.seriesX[s][r]<t&&(n+=a[r]);return n})}},{key:"getPercentSeries",value:function(){var e=this.w;e.globals.seriesPercent=e.globals.series.map(function(t,i){var a=[];if(Array.isArray(t))for(var s=0;s<t.length;s++){var n=e.globals.stackedSeriesTotals[s],r=0;n&&(r=100*t[s]/n),a.push(r)}else{var o=100*t/e.globals.seriesTotals.reduce(function(h,c){return h+c},0);a.push(o)}return a})}},{key:"getCalculatedRatios",value:function(){var e,t,i,a,s=this.w.globals,n=[],r=0,o=[],h=.1,c=0;if(s.yRange=[],s.isMultipleYAxis)for(var d=0;d<s.minYArr.length;d++)s.yRange.push(Math.abs(s.minYArr[d]-s.maxYArr[d])),o.push(0);else s.yRange.push(Math.abs(s.minY-s.maxY));s.xRange=Math.abs(s.maxX-s.minX),s.zRange=Math.abs(s.maxZ-s.minZ);for(var u=0;u<s.yRange.length;u++)n.push(s.yRange[u]/s.gridHeight);if(t=s.xRange/s.gridWidth,i=Math.abs(s.initialMaxX-s.initialMinX)/s.gridWidth,e=s.yRange/s.gridWidth,a=s.xRange/s.gridHeight,(r=s.zRange/s.gridHeight*16)||(r=1),s.minY!==Number.MIN_VALUE&&0!==Math.abs(s.minY)&&(s.hasNegs=!0),s.isMultipleYAxis){o=[];for(var p=0;p<n.length;p++)o.push(-s.minYArr[p]/n[p])}else o.push(-s.minY/n[0]),s.minY!==Number.MIN_VALUE&&0!==Math.abs(s.minY)&&(h=-s.minY/e,c=s.minX/t);return{yRatio:n,invertedYRatio:e,zRatio:r,xRatio:t,initialXRatio:i,invertedXRatio:a,baseLineInvertedY:h,baseLineY:o,baseLineX:c}}},{key:"getLogSeries",value:function(e){var t=this,i=this.w;return i.globals.seriesLog=e.map(function(a,s){return i.config.yaxis[s]&&i.config.yaxis[s].logarithmic?a.map(function(n){return null===n?null:t.getLogVal(n,s)}):a}),i.globals.invalidLogScale?e:i.globals.seriesLog}},{key:"getLogVal",value:function(e,t){var i=this.w,a=(Math.log(e)-Math.log(i.globals.minYArr[t]))/(Math.log(i.globals.maxYArr[t])-Math.log(i.globals.minYArr[t]));return isNaN(a)?e:a}},{key:"getLogYRatios",value:function(e){var t=this,i=this.w,a=this.w.globals;return a.yLogRatio=e.slice(),a.logYRange=a.yRange.map(function(s,n){if(i.config.yaxis[n]&&t.w.config.yaxis[n].logarithmic){var r,o=-Number.MAX_VALUE,h=Number.MIN_VALUE;return a.seriesLog.forEach(function(c,d){c.forEach(function(u){i.config.yaxis[d]&&i.config.yaxis[d].logarithmic&&(o=Math.max(u,o),h=Math.min(u,h))})}),r=Math.pow(a.yRange[n],Math.abs(h-o)/a.yRange[n]),a.yLogRatio[n]=r/a.gridHeight,r}}),a.invalidLogScale?e.slice():a.yLogRatio}}],[{key:"checkComboSeries",value:function(e){var t=!1,i=0,a=0;return e.length&&void 0!==e[0].type&&e.forEach(function(s){"bar"!==s.type&&"column"!==s.type&&"candlestick"!==s.type&&"boxPlot"!==s.type||i++,void 0!==s.type&&a++}),a>0&&(t=!0),{comboBarCount:i,comboCharts:t}}},{key:"extendArrayProps",value:function(e,t,i){return t.yaxis&&(t=e.extendYAxis(t,i)),t.annotations&&(t.annotations.yaxis&&(t=e.extendYAxisAnnotations(t)),t.annotations.xaxis&&(t=e.extendXAxisAnnotations(t)),t.annotations.points&&(t=e.extendPointAnnotations(t))),t}}]),w}(),rt=function(){function w(e){C(this,w),this.w=e.w,this.annoCtx=e}return Y(w,[{key:"addYaxisAnnotation",value:function(e,t,i){var a,s=this.w,n=e.strokeDashArray,r=this._getY1Y2("y1",e),o=e.label.text;if(null==e.y2){var h=this.annoCtx.graphics.drawLine(0+e.offsetX,r+e.offsetY,this._getYAxisAnnotationWidth(e),r+e.offsetY,e.borderColor,n,e.borderWidth);t.appendChild(h.node),e.id&&h.node.classList.add(e.id)}else{if((a=this._getY1Y2("y2",e))>r){var c=r;r=a,a=c}var d=this.annoCtx.graphics.drawRect(0+e.offsetX,a+e.offsetY,this._getYAxisAnnotationWidth(e),r-a,0,e.fillColor,e.opacity,1,e.borderColor,n);d.node.classList.add("apexcharts-annotation-rect"),d.attr("clip-path","url(#gridRectMask".concat(s.globals.cuid,")")),t.appendChild(d.node),e.id&&d.node.classList.add(e.id)}var p=this.annoCtx.graphics.drawText({x:("right"===e.label.position?s.globals.gridWidth:0)+e.label.offsetX,y:(null!=a?a:r)+e.label.offsetY-3,text:o,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});p.attr({rel:i}),t.appendChild(p.node)}},{key:"_getY1Y2",value:function(e,t){var i,a="y1"===e?t.y:t.y2,s=this.w;if(this.annoCtx.invertAxis){var n=s.globals.labels.indexOf(a);s.config.xaxis.convertedCatToNumeric&&(n=s.globals.categoryLabels.indexOf(a));var r=s.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child("+(n+1)+")");r&&(i=parseFloat(r.getAttribute("y")))}else{var o;o=s.config.yaxis[t.yAxisIndex].logarithmic?(a=new _(this.annoCtx.ctx).getLogVal(a,t.yAxisIndex))/s.globals.yLogRatio[t.yAxisIndex]:(a-s.globals.minYArr[t.yAxisIndex])/(s.globals.yRange[t.yAxisIndex]/s.globals.gridHeight),i=s.globals.gridHeight-o,s.config.yaxis[t.yAxisIndex]&&s.config.yaxis[t.yAxisIndex].reversed&&(i=o)}return i}},{key:"_getYAxisAnnotationWidth",value:function(e){var t=this.w;return(e.width.indexOf("%")>-1?t.globals.gridWidth*parseInt(e.width,10)/100:parseInt(e.width,10))+e.offsetX}},{key:"drawYAxisAnnotations",value:function(){var e=this,t=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return t.config.annotations.yaxis.map(function(a,s){e.addYaxisAnnotation(a,i.node,s)}),i}}]),w}(),nt=function(){function w(e){C(this,w),this.w=e.w,this.annoCtx=e}return Y(w,[{key:"addPointAnnotation",value:function(e,t,i){var a=this.w,s=0,n=0,r=0;this.annoCtx.invertAxis&&console.warn("Point annotation is not supported in horizontal bar charts.");var o=parseFloat(e.y);if("string"==typeof e.x||"category"===a.config.xaxis.type||a.config.xaxis.convertedCatToNumeric){var h=a.globals.labels.indexOf(e.x);a.config.xaxis.convertedCatToNumeric&&(h=a.globals.categoryLabels.indexOf(e.x)),s=this.annoCtx.helpers.getStringX(e.x),null===e.y&&(o=a.globals.series[e.seriesIndex][h])}else s=(e.x-a.globals.minX)/(a.globals.xRange/a.globals.gridWidth);for(var c,d=[],u=0,p=0;p<=e.seriesIndex;p++){var x=a.config.yaxis[p].seriesName;if(x)for(var f=p+1;f<=e.seriesIndex;f++)a.config.yaxis[f].seriesName===x&&-1===d.indexOf(x)&&(u++,d.push(x))}if(a.config.yaxis[e.yAxisIndex].logarithmic)c=(o=new _(this.annoCtx.ctx).getLogVal(o,e.yAxisIndex))/a.globals.yLogRatio[e.yAxisIndex];else{var b=e.yAxisIndex+u;c=(o-a.globals.minYArr[b])/(a.globals.yRange[b]/a.globals.gridHeight)}if(n=a.globals.gridHeight-c-parseFloat(e.label.style.fontSize)-e.marker.size,r=a.globals.gridHeight-c,a.config.yaxis[e.yAxisIndex]&&a.config.yaxis[e.yAxisIndex].reversed&&(n=c+parseFloat(e.label.style.fontSize)+e.marker.size,r=c),P.isNumber(s)){var y={pSize:e.marker.size,pointStrokeWidth:e.marker.strokeWidth,pointFillColor:e.marker.fillColor,pointStrokeColor:e.marker.strokeColor,shape:e.marker.shape,pRadius:e.marker.radius,class:"apexcharts-point-annotation-marker ".concat(e.marker.cssClass," ").concat(e.id?e.id:"")},k=this.annoCtx.graphics.drawMarker(s+e.marker.offsetX,r+e.marker.offsetY,y);t.appendChild(k.node);var l=this.annoCtx.graphics.drawText({x:s+e.label.offsetX,y:n+e.label.offsetY,text:e.label.text?e.label.text:"",textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});if(l.attr({rel:i}),t.appendChild(l.node),e.customSVG.SVG){var g=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+e.customSVG.cssClass});g.attr({transform:"translate(".concat(s+e.customSVG.offsetX,", ").concat(n+e.customSVG.offsetY,")")}),g.node.innerHTML=e.customSVG.SVG,t.appendChild(g.node)}if(e.image.path){var m=e.image.width?e.image.width:20,v=e.image.height?e.image.height:20;k=this.annoCtx.addImage({x:s+e.image.offsetX-m/2,y:n+e.image.offsetY-v/2,width:m,height:v,path:e.image.path,appendTo:".apexcharts-point-annotations"})}e.mouseEnter&&k.node.addEventListener("mouseenter",e.mouseEnter.bind(this,e)),e.mouseLeave&&k.node.addEventListener("mouseleave",e.mouseLeave.bind(this,e))}}},{key:"drawPointAnnotations",value:function(){var e=this,t=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return t.config.annotations.points.map(function(a,s){e.addPointAnnotation(a,i.node,s)}),i}}]),w}(),Re={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},le=function(){function w(){C(this,w),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:0,mouseEnter:void 0,mouseLeave:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,radius:2,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,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,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,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return Y(w,[{key:"init",value:function(){return{annotations:{position:"front",yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,easing:"easeinout",speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"transparent",locales:[Re],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.35},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0},stacked:!1,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",dateFormatter:function(e){return new Date(e).toDateString()}},png:{filename:void 0},svg:{filename:void 0}},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,rangeBarOverlap:!0,rangeBarGroupRows:!1,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal"}},bubble:{minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(e){return e}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(e){return e+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce(function(t,i){return t+i},0)/e.globals.series.length+"%"}}}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(e){return e}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(e){return e}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce(function(t,i){return t+i},0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(e){return null!==e?e:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],labels:{colors:void 0,useSeriesColors:!1},markers:{width:12,height:12,strokeWidth:0,fillColors:void 0,strokeColor:"#fff",radius:12,customHTML:void 0,offsetX:0,offsetY:0,onClick:void 0},itemMargin:{horizontal:5,vertical:2},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",width:8,height:8,radius:2,offsetX:0,offsetY:0,onClick:void 0,onDblClick:void 0,showNullDataPoints:!0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{normal:{filter:{type:"none",value:0}},hover:{filter:{type:"lighten",value:.1}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken",value:.5}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(e){return e?e+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.4}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"light",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),w}(),ot=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w,this.graphics=new M(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new at(this),this.xAxisAnnotations=new st(this),this.yAxisAnnotations=new rt(this),this.pointsAnnotations=new nt(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return Y(w,[{key:"drawAxesAnnotations",value:function(){var e=this.w;if(e.globals.axisCharts){for(var t=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),a=this.pointsAnnotations.drawPointAnnotations(),s=e.config.chart.animations.enabled,n=[t,i,a],r=[i.node,t.node,a.node],o=0;o<3;o++)e.globals.dom.elGraphical.add(n[o]),!s||e.globals.resized||e.globals.dataChanged||"scatter"!==e.config.chart.type&&"bubble"!==e.config.chart.type&&e.globals.dataPoints>1&&r[o].classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:r[o],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var e=this;this.w.config.annotations.images.map(function(t,i){e.addImage(t,i)})}},{key:"drawTextAnnos",value:function(){var e=this;this.w.config.annotations.texts.map(function(t,i){e.addText(t,i)})}},{key:"addXaxisAnnotation",value:function(e,t,i){this.xAxisAnnotations.addXaxisAnnotation(e,t,i)}},{key:"addYaxisAnnotation",value:function(e,t,i){this.yAxisAnnotations.addYaxisAnnotation(e,t,i)}},{key:"addPointAnnotation",value:function(e,t,i){this.pointsAnnotations.addPointAnnotation(e,t,i)}},{key:"addText",value:function(e,t){var s=e.text,u=e.backgroundColor,p=e.borderWidth,x=e.strokeDashArray,f=e.borderRadius,b=e.borderColor,y=e.appendTo,k=void 0===y?".apexcharts-annotations":y,A=e.paddingLeft,l=void 0===A?4:A,g=e.paddingRight,m=void 0===g?4:g,v=e.paddingBottom,S=void 0===v?2:v,T=e.paddingTop,L=void 0===T?2:T,z=this.w,E=this.graphics.drawText({x:e.x,y:e.y,text:s,textAnchor:e.textAnchor||"start",fontSize:e.fontSize||"12px",fontWeight:e.fontWeight||"regular",fontFamily:e.fontFamily||z.config.chart.fontFamily,foreColor:e.foreColor||z.config.chart.foreColor,cssClass:e.cssClass}),X=z.globals.dom.baseEl.querySelector(k);X&&X.appendChild(E.node);var D=E.bbox();if(s){var W=this.graphics.drawRect(D.x-l,D.y-L,D.width+l+m,D.height+S+L,f,u||"transparent",1,p,b,x);X.insertBefore(W.node,E.node)}}},{key:"addImage",value:function(e,t){var i=this.w,s=e.x,n=void 0===s?0:s,r=e.y,o=void 0===r?0:r,h=e.width,c=void 0===h?20:h,d=e.height,u=void 0===d?20:d,p=e.appendTo,x=void 0===p?".apexcharts-annotations":p,f=i.globals.dom.Paper.image(e.path);f.size(c,u).move(n,o);var b=i.globals.dom.baseEl.querySelector(x);return b&&b.appendChild(f.node),f}},{key:"addXaxisAnnotationExternal",value:function(e,t,i){return this.addAnnotationExternal({params:e,pushToMemory:t,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(e,t,i){return this.addAnnotationExternal({params:e,pushToMemory:t,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addPointAnnotationExternal",value:function(e,t,i){return void 0===this.invertAxis&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:e,pushToMemory:t,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addAnnotationExternal",value:function(e){var t=e.params,i=e.pushToMemory,a=e.context,s=e.type,n=e.contextMethod,r=a,o=r.w,h=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations")),c=h.childNodes.length+1,d=new le,u=Object.assign({},"xaxis"===s?d.xAxisAnnotation:"yaxis"===s?d.yAxisAnnotation:d.pointAnnotation),p=P.extend(u,t);switch(s){case"xaxis":this.addXaxisAnnotation(p,h,c);break;case"yaxis":this.addYaxisAnnotation(p,h,c);break;case"point":this.addPointAnnotation(p,h,c)}var x=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(c,"']")),f=this.helpers.addBackgroundToAnno(x,p);return f&&h.insertBefore(f.node,x),i&&o.globals.memory.methodsToExec.push({context:r,id:p.id?p.id:P.randomId(),method:n,label:"addAnnotation",params:t}),a}},{key:"clearAnnotations",value:function(e){var t=e.w,i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations");t.globals.memory.methodsToExec.map(function(a,s){"addText"!==a.label&&"addAnnotation"!==a.label||t.globals.memory.methodsToExec.splice(s,1)}),i=P.listToArray(i),Array.prototype.forEach.call(i,function(a){for(;a.firstChild;)a.removeChild(a.firstChild)})}},{key:"removeAnnotation",value:function(e,t){var i=e.w,a=i.globals.dom.baseEl.querySelectorAll(".".concat(t));a&&(i.globals.memory.methodsToExec.map(function(s,n){s.id===t&&i.globals.memory.methodsToExec.splice(n,1)}),Array.prototype.forEach.call(a,function(s){s.parentElement.removeChild(s)}))}}]),w}(),ie=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0}return Y(w,[{key:"clippedImgArea",value:function(e){var t=this.w,i=t.config,a=parseInt(t.globals.gridWidth,10),s=parseInt(t.globals.gridHeight,10),n=a>s?a:s,r=e.image,o=0,h=0;void 0===e.width&&void 0===e.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(o=i.fill.image.width+1,h=i.fill.image.height):(o=n+1,h=n):(o=e.width,h=e.height);var c=document.createElementNS(t.globals.SVGNS,"pattern");M.setAttrs(c,{id:e.patternID,patternUnits:e.patternUnits?e.patternUnits:"userSpaceOnUse",width:o+"px",height:h+"px"});var d=document.createElementNS(t.globals.SVGNS,"image");c.appendChild(d),d.setAttributeNS(window.SVG.xlink,"href",r),M.setAttrs(d,{x:0,y:0,preserveAspectRatio:"none",width:o+"px",height:h+"px"}),d.style.opacity=e.opacity,t.globals.dom.elDefs.node.appendChild(c)}},{key:"getSeriesIndex",value:function(e){var t=this.w;return this.seriesIndex=("bar"===t.config.chart.type||"rangeBar"===t.config.chart.type)&&t.config.plotOptions.bar.distributed||"heatmap"===t.config.chart.type||"treemap"===t.config.chart.type?e.seriesNumber:e.seriesNumber%t.globals.series.length,this.seriesIndex}},{key:"fillPath",value:function(e){var t=this.w;this.opts=e;var i,a,s,n=this.w.config;this.seriesIndex=this.getSeriesIndex(e);var r=this.getFillColors()[this.seriesIndex];void 0!==t.globals.seriesColors[this.seriesIndex]&&(r=t.globals.seriesColors[this.seriesIndex]),"function"==typeof r&&(r=r({seriesIndex:this.seriesIndex,dataPointIndex:e.dataPointIndex,value:e.value,w:t}));var o=this.getFillType(this.seriesIndex),h=Array.isArray(n.fill.opacity)?n.fill.opacity[this.seriesIndex]:n.fill.opacity;e.color&&(r=e.color);var c=r;if(-1===r.indexOf("rgb")?r.length<9&&(c=P.hexToRgba(r,h)):r.indexOf("rgba")>-1&&(h=P.getOpacityFromRGBA(r)),e.opacity&&(h=e.opacity),"pattern"===o&&(a=this.handlePatternFill(a,r,h,c)),"gradient"===o&&(s=this.handleGradientFill(r,h,this.seriesIndex)),"image"===o){var d=n.fill.image.src,u=e.patternID?e.patternID:"";this.clippedImgArea({opacity:h,image:Array.isArray(d)?e.seriesNumber<d.length?d[e.seriesNumber]:d[0]:d,width:e.width?e.width:void 0,height:e.height?e.height:void 0,patternUnits:e.patternUnits,patternID:"pattern".concat(t.globals.cuid).concat(e.seriesNumber+1).concat(u)}),i="url(#pattern".concat(t.globals.cuid).concat(e.seriesNumber+1).concat(u,")")}else i="gradient"===o?s:"pattern"===o?a:c;return e.solid&&(i=c),i}},{key:"getFillType",value:function(e){var t=this.w;return Array.isArray(t.config.fill.type)?t.config.fill.type[e]:t.config.fill.type}},{key:"getFillColors",value:function(){var e=this.w,t=e.config,i=this.opts,a=[];return e.globals.comboCharts?"line"===e.config.series[this.seriesIndex].type?Array.isArray(e.globals.stroke.colors)?a=e.globals.stroke.colors:a.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?a=e.globals.fill.colors:a.push(e.globals.fill.colors):"line"===t.chart.type?Array.isArray(e.globals.stroke.colors)?a=e.globals.stroke.colors:a.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?a=e.globals.fill.colors:a.push(e.globals.fill.colors),void 0!==i.fillColors&&(a=[],Array.isArray(i.fillColors)?a=i.fillColors.slice():a.push(i.fillColors)),a}},{key:"handlePatternFill",value:function(e,t,i,a){var s=this.w.config,n=this.opts,r=new M(this.ctx),o=void 0===s.fill.pattern.strokeWidth?Array.isArray(s.stroke.width)?s.stroke.width[this.seriesIndex]:s.stroke.width:Array.isArray(s.fill.pattern.strokeWidth)?s.fill.pattern.strokeWidth[this.seriesIndex]:s.fill.pattern.strokeWidth,h=t;return Array.isArray(s.fill.pattern.style)?void 0!==s.fill.pattern.style[n.seriesNumber]?r.drawPattern(s.fill.pattern.style[n.seriesNumber],s.fill.pattern.width,s.fill.pattern.height,h,o,i):a:r.drawPattern(s.fill.pattern.style,s.fill.pattern.width,s.fill.pattern.height,h,o,i)}},{key:"handleGradientFill",value:function(e,t,i){var a,s=this.w.config,n=this.opts,r=new M(this.ctx),o=new P,h=s.fill.gradient.type,c=e,d=void 0===s.fill.gradient.opacityFrom?t:Array.isArray(s.fill.gradient.opacityFrom)?s.fill.gradient.opacityFrom[i]:s.fill.gradient.opacityFrom;c.indexOf("rgba")>-1&&(d=P.getOpacityFromRGBA(c));var u=void 0===s.fill.gradient.opacityTo?t:Array.isArray(s.fill.gradient.opacityTo)?s.fill.gradient.opacityTo[i]:s.fill.gradient.opacityTo;if(void 0===s.fill.gradient.gradientToColors||0===s.fill.gradient.gradientToColors.length)a=o.shadeColor("dark"===s.fill.gradient.shade?-1*parseFloat(s.fill.gradient.shadeIntensity):parseFloat(s.fill.gradient.shadeIntensity),e.indexOf("rgb")>-1?P.rgb2hex(e):e);else if(s.fill.gradient.gradientToColors[n.seriesNumber]){var p=s.fill.gradient.gradientToColors[n.seriesNumber];a=p,p.indexOf("rgba")>-1&&(u=P.getOpacityFromRGBA(p))}else a=e;if(s.fill.gradient.inverseColors){var x=c;c=a,a=x}return c.indexOf("rgb")>-1&&(c=P.rgb2hex(c)),a.indexOf("rgb")>-1&&(a=P.rgb2hex(a)),r.drawGradient(h,c,a,d,u,n.size,s.fill.gradient.stops,s.fill.gradient.colorStops,i)}}]),w}(),we=function(){function w(e,t){C(this,w),this.ctx=e,this.w=e.w}return Y(w,[{key:"setGlobalMarkerSize",value:function(){var e=this.w;if(e.globals.markers.size=Array.isArray(e.config.markers.size)?e.config.markers.size:[e.config.markers.size],e.globals.markers.size.length>0){if(e.globals.markers.size.length<e.globals.series.length+1)for(var t=0;t<=e.globals.series.length;t++)void 0===e.globals.markers.size[t]&&e.globals.markers.size.push(e.globals.markers.size[0])}else e.globals.markers.size=e.config.series.map(function(i){return e.config.markers.size})}},{key:"plotChartMarkers",value:function(e,t,i,a){var s,n=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r=this.w,o=t,h=e,c=null,d=new M(this.ctx);if((r.globals.markers.size[t]>0||n)&&(c=d.group({class:n?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(r.globals.cuid,")")),Array.isArray(h.x))for(var u=0;u<h.x.length;u++){var p=i;1===i&&0===u&&(p=0),1===i&&1===u&&(p=1);var x="apexcharts-marker";"line"!==r.config.chart.type&&"area"!==r.config.chart.type||r.globals.comboCharts||r.config.tooltip.intersect||(x+=" no-pointer-events");var f=Array.isArray(r.config.markers.size)?r.globals.markers.size[t]>0:r.config.markers.size>0;if(f||n){P.isNumber(h.y[u])?x+=" w".concat(P.randomId()):x="apexcharts-nullpoint";var b=this.getMarkerConfig({cssClass:x,seriesIndex:t,dataPointIndex:p});r.config.series[o].data[p]&&(r.config.series[o].data[p].fillColor&&(b.pointFillColor=r.config.series[o].data[p].fillColor),r.config.series[o].data[p].strokeColor&&(b.pointStrokeColor=r.config.series[o].data[p].strokeColor)),a&&(b.pSize=a),(s=d.drawMarker(h.x[u],h.y[u],b)).attr("rel",p),s.attr("j",p),s.attr("index",t),s.node.setAttribute("default-marker-size",b.pSize);var y=new j(this.ctx);y.setSelectionFilter(s,t,p),this.addEvents(s),c&&c.add(s)}else void 0===r.globals.pointsArray[t]&&(r.globals.pointsArray[t]=[]),r.globals.pointsArray[t].push([h.x[u],h.y[u]])}return c}},{key:"getMarkerConfig",value:function(e){var t=e.cssClass,i=e.seriesIndex,a=e.dataPointIndex,s=void 0===a?null:a,n=e.finishRadius,r=void 0===n?null:n,o=this.w,h=this.getMarkerStyle(i),c=o.globals.markers.size[i],d=o.config.markers;return null!==s&&d.discrete.length&&d.discrete.map(function(u){u.seriesIndex===i&&u.dataPointIndex===s&&(h.pointStrokeColor=u.strokeColor,h.pointFillColor=u.fillColor,c=u.size,h.pointShape=u.shape)}),{pSize:null===r?c:r,pRadius:d.radius,width:Array.isArray(d.width)?d.width[i]:d.width,height:Array.isArray(d.height)?d.height[i]:d.height,pointStrokeWidth:Array.isArray(d.strokeWidth)?d.strokeWidth[i]:d.strokeWidth,pointStrokeColor:h.pointStrokeColor,pointFillColor:h.pointFillColor,shape:h.pointShape||(Array.isArray(d.shape)?d.shape[i]:d.shape),class:t,pointStrokeOpacity:Array.isArray(d.strokeOpacity)?d.strokeOpacity[i]:d.strokeOpacity,pointStrokeDashArray:Array.isArray(d.strokeDashArray)?d.strokeDashArray[i]:d.strokeDashArray,pointFillOpacity:Array.isArray(d.fillOpacity)?d.fillOpacity[i]:d.fillOpacity,seriesIndex:i}}},{key:"addEvents",value:function(e){var t=this.w,i=new M(this.ctx);e.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this.ctx,e)),e.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this.ctx,e)),e.node.addEventListener("mousedown",i.pathMouseDown.bind(this.ctx,e)),e.node.addEventListener("click",t.config.markers.onClick),e.node.addEventListener("dblclick",t.config.markers.onDblClick),e.node.addEventListener("touchstart",i.pathMouseDown.bind(this.ctx,e),{passive:!0})}},{key:"getMarkerStyle",value:function(e){var t=this.w,i=t.globals.markers.colors,a=t.config.markers.strokeColor||t.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(a)?a[e]:a,pointFillColor:Array.isArray(i)?i[e]:i}}}]),w}(),He=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled}return Y(w,[{key:"draw",value:function(e,t,i){var a=this.w,s=new M(this.ctx),n=i.realIndex,r=i.pointsPos,o=i.zRatio,h=i.elParent,c=s.group({class:"apexcharts-series-markers apexcharts-series-".concat(a.config.chart.type)});if(c.attr("clip-path","url(#gridRectMarkerMask".concat(a.globals.cuid,")")),Array.isArray(r.x))for(var d=0;d<r.x.length;d++){var u=t+1,p=!0;0===t&&0===d&&(u=0),0===t&&1===d&&(u=1);var x=0,f=a.globals.markers.size[n];if(o!==1/0){f=a.globals.seriesZ[n][u]/o;var b=a.config.plotOptions.bubble;b.minBubbleRadius&&f<b.minBubbleRadius&&(f=b.minBubbleRadius),b.maxBubbleRadius&&f>b.maxBubbleRadius&&(f=b.maxBubbleRadius)}a.config.chart.animations.enabled||(x=f);var k=r.y[d];if(x=x||0,null!==k&&void 0!==a.globals.series[n][u]||(p=!1),p){var A=this.drawPoint(r.x[d],k,x,f,n,u,t);c.add(A)}h.add(c)}}},{key:"drawPoint",value:function(e,t,i,a,s,n,r){var o=this.w,h=s,c=new ue(this.ctx),d=new j(this.ctx),u=new ie(this.ctx),p=new we(this.ctx),x=new M(this.ctx),f=p.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:h,dataPointIndex:n,finishRadius:"bubble"===o.config.chart.type||o.globals.comboCharts&&o.config.series[s]&&"bubble"===o.config.series[s].type?a:null});a=f.pSize;var b,y=u.fillPath({seriesNumber:s,dataPointIndex:n,color:f.pointFillColor,patternUnits:"objectBoundingBox",value:o.globals.series[s][r]});if("circle"===f.shape?b=x.drawCircle(i):"square"!==f.shape&&"rect"!==f.shape||(b=x.drawRect(0,0,f.width-f.pointStrokeWidth/2,f.height-f.pointStrokeWidth/2,f.pRadius)),o.config.series[h].data[n]&&o.config.series[h].data[n].fillColor&&(y=o.config.series[h].data[n].fillColor),b.attr({x:e-f.width/2-f.pointStrokeWidth/2,y:t-f.height/2-f.pointStrokeWidth/2,cx:e,cy:t,fill:y,"fill-opacity":f.pointFillOpacity,stroke:f.pointStrokeColor,r:a,"stroke-width":f.pointStrokeWidth,"stroke-dasharray":f.pointStrokeDashArray,"stroke-opacity":f.pointStrokeOpacity}),o.config.chart.dropShadow.enabled&&d.dropShadow(b,o.config.chart.dropShadow,s),!this.initialAnim||o.globals.dataChanged||o.globals.resized?o.globals.animationEnded=!0:c.animateMarker(b,0,"circle"===f.shape?a:{width:f.width,height:f.height},o.config.chart.animations.speed,o.globals.easing,function(){window.setTimeout(function(){c.animationCompleted(b)},100)}),o.globals.dataChanged&&"circle"===f.shape)if(this.dynamicAnim){var l,g,m,v,S=o.config.chart.animations.dynamicAnimation.speed;null!=(v=o.globals.previousPaths[s]&&o.globals.previousPaths[s][r])&&(l=v.x,g=v.y,m=void 0!==v.r?v.r:a);for(var T=0;T<o.globals.collapsedSeries.length;T++)o.globals.collapsedSeries[T].index===s&&(S=1,a=0);0===e&&0===t&&(a=0),c.animateCircle(b,{cx:l,cy:g,r:m},{cx:e,cy:t,r:a},S,o.globals.easing)}else b.attr({r:a});return b.attr({rel:n,j:n,index:s,"default-marker-size":a}),d.setSelectionFilter(b,s,n),p.addEvents(b),b.node.classList.add("apexcharts-marker"),b}},{key:"centerTextInBubble",value:function(e){return{y:e+=parseInt(this.w.config.dataLabels.style.fontSize,10)/4}}}]),w}(),pe=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w}return Y(w,[{key:"dataLabelsCorrection",value:function(e,t,i,a,s,n,r){var o=this.w,h=!1,c=new M(this.ctx).getTextRects(i,r),d=c.width,u=c.height;if(t<0&&(t=0),t>o.globals.gridHeight+u&&(t=o.globals.gridHeight+u/2),void 0===o.globals.dataLabelsRects[a]&&(o.globals.dataLabelsRects[a]=[]),o.globals.dataLabelsRects[a].push({x:e,y:t,width:d,height:u}),void 0!==o.globals.dataLabelsRects[a][o.globals.dataLabelsRects[a].length-2]){var f=o.globals.dataLabelsRects[a][void 0!==o.globals.lastDrawnDataLabelsIndexes[a]?o.globals.lastDrawnDataLabelsIndexes[a][o.globals.lastDrawnDataLabelsIndexes[a].length-1]:0];(e>f.x+f.width+2||t>f.y+f.height+2||e+d<f.x)&&(h=!0)}return(0===s||n)&&(h=!0),{x:e,y:t,textRects:c,drawnextLabel:h}}},{key:"drawDataLabel",value:function(e,t,i){var a=this,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2,n=this.w,r=new M(this.ctx),o=n.config.dataLabels,h=0,c=0,d=i,u=null;if(!o.enabled||!Array.isArray(e.x))return u;u=r.group({class:"apexcharts-data-labels"});for(var p=0;p<e.x.length;p++)if(h=e.x[p]+o.offsetX,c=e.y[p]+o.offsetY+s,!isNaN(h)){1===i&&0===p&&(d=0),1===i&&1===p&&(d=1);var x=n.globals.series[t][d],f="",b=function(A){return n.config.dataLabels.formatter(A,{ctx:a.ctx,seriesIndex:t,dataPointIndex:d,w:n})};if("bubble"===n.config.chart.type){f=b(x=n.globals.seriesZ[t][d]),c=e.y[p];var y=new He(this.ctx),k=y.centerTextInBubble(c,t,d);c=k.y}else void 0!==x&&(f=b(x));this.plotDataLabelsText({x:h,y:c,text:f,i:t,j:d,parent:u,offsetCorrection:!0,dataLabelsConfig:n.config.dataLabels})}return u}},{key:"plotDataLabelsText",value:function(e){var t=this.w,i=new M(this.ctx),a=e.x,s=e.y,n=e.i,r=e.j,o=e.text,h=e.textAnchor,c=e.fontSize,d=e.parent,u=e.dataLabelsConfig,p=e.color,x=e.alwaysDrawDataLabel,f=e.offsetCorrection;if(!(Array.isArray(t.config.dataLabels.enabledOnSeries)&&t.config.dataLabels.enabledOnSeries.indexOf(n)<0)){var b={x:a,y:s,drawnextLabel:!0,textRects:null};f&&(b=this.dataLabelsCorrection(a,s,o,n,r,x,parseInt(u.style.fontSize,10))),t.globals.zoomed||(a=b.x,s=b.y),b.textRects&&(a<-10-b.textRects.width||a>t.globals.gridWidth+b.textRects.width+10)&&(o="");var y=t.globals.dataLabels.style.colors[n];(("bar"===t.config.chart.type||"rangeBar"===t.config.chart.type)&&t.config.plotOptions.bar.distributed||t.config.dataLabels.distributed)&&(y=t.globals.dataLabels.style.colors[r]),"function"==typeof y&&(y=y({series:t.globals.series,seriesIndex:n,dataPointIndex:r,w:t})),p&&(y=p);var k=u.offsetX,A=u.offsetY;if("bar"!==t.config.chart.type&&"rangeBar"!==t.config.chart.type||(k=0,A=0),b.drawnextLabel){var l=i.drawText({width:100,height:parseInt(u.style.fontSize,10),x:a+k,y:s+A,foreColor:y,textAnchor:h||u.textAnchor,text:o,fontSize:c||u.style.fontSize,fontFamily:u.style.fontFamily,fontWeight:u.style.fontWeight||"normal"});if(l.attr({class:"apexcharts-datalabel",cx:a,cy:s}),u.dropShadow.enabled){var g=u.dropShadow;new j(this.ctx).dropShadow(l,g)}d.add(l),void 0===t.globals.lastDrawnDataLabelsIndexes[n]&&(t.globals.lastDrawnDataLabelsIndexes[n]=[]),t.globals.lastDrawnDataLabelsIndexes[n].push(r)}}}},{key:"addBackgroundToDataLabel",value:function(e,t){var i=this.w,a=i.config.dataLabels.background,s=a.padding,n=a.padding/2,r=t.width,o=t.height,h=new M(this.ctx).drawRect(t.x-s,t.y-n/2,r+2*s,o+n,a.borderRadius,"transparent"===i.config.chart.background?"#fff":i.config.chart.background,a.opacity,a.borderWidth,a.borderColor);return a.dropShadow.enabled&&new j(this.ctx).dropShadow(h,a.dropShadow),h}},{key:"dataLabelsBackground",value:function(){var e=this.w;if("bubble"!==e.config.chart.type)for(var t=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;i<t.length;i++){var a=t[i],s=a.getBBox(),n=null;if(s.width&&s.height&&(n=this.addBackgroundToDataLabel(a,s)),n){a.parentNode.insertBefore(n.node,a);var r=a.getAttribute("fill");!e.config.chart.animations.enabled||e.globals.resized||e.globals.dataChanged?n.attr({fill:r}):n.animate().attr({fill:r}),a.setAttribute("fill",e.config.dataLabels.background.foreColor)}}}},{key:"bringForward",value:function(){for(var e=this.w,t=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),i=e.globals.dom.baseEl.querySelector(".apexcharts-plot-series:last-child"),a=0;a<t.length;a++)i&&i.insertBefore(t[a],i.nextSibling)}}]),w}(),lt=function(){function w(e){C(this,w),this.w=e.w,this.barCtx=e}return Y(w,[{key:"handleBarDataLabels",value:function(e){var t=e.x,i=e.y,a=e.y1,s=e.y2,n=e.i,r=e.j,o=e.realIndex,h=e.series,c=e.barHeight,d=e.barWidth,u=e.barYPosition,p=e.visibleSeries,x=e.renderedPath,f=this.w,b=new M(this.barCtx.ctx),y=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[o]:this.barCtx.strokeWidth,k=t+parseFloat(d*p),A=i+parseFloat(c*p);f.globals.isXNumeric&&!f.globals.isBarHorizontal&&(k=t+parseFloat(d*(p+1)),A=i+parseFloat(c*(p+1))-y);var m,l=t,g=i,v=f.config.dataLabels,S=this.barCtx.barOptions.dataLabels;void 0!==u&&this.barCtx.isRangeBar&&(A=u,g=u);var T=v.offsetX,L=v.offsetY,z={width:0,height:0};f.config.dataLabels.enabled&&(z=b.getTextRects(f.globals.yLabelFormatters[0](this.barCtx.series[n][r]),parseFloat(v.style.fontSize)));var X={x:t,y:i,i:n,j:r,renderedPath:x,bcx:k,bcy:A,barHeight:c,barWidth:d,textRects:z,strokeWidth:y,dataLabelsX:l,dataLabelsY:g,barDataLabelsConfig:S,offX:T,offY:L};return m=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(X):this.calculateColumnsDataLabelsPosition(X),x.attr({cy:m.bcy,cx:m.bcx,j:r,val:h[n][r],barHeight:c,barWidth:d}),this.drawCalculatedDataLabels({x:m.dataLabelsX,y:m.dataLabelsY,val:this.barCtx.isRangeBar?[a,s]:h[n][r],i:o,j:r,barWidth:d,barHeight:c,textRects:z,dataLabelsConfig:v})}},{key:"calculateColumnsDataLabelsPosition",value:function(e){var t,i=this.w,a=e.i,s=e.j,n=e.y,r=e.bcx,o=e.barWidth,h=e.barHeight,c=e.textRects,d=e.dataLabelsY,u=e.barDataLabelsConfig,p=e.strokeWidth,x=e.offX,f=e.offY;h=Math.abs(h);var b="vertical"===i.config.plotOptions.bar.dataLabels.orientation;r-=p/2,t=i.globals.isXNumeric?r-o/2+x:r-i.globals.gridWidth/i.globals.dataPoints+o/2+x,b&&(t=t+c.height/2-p/2-2);var k=this.barCtx.series[a][s]<0,A=n;switch(this.barCtx.isReversed&&(A=n-h+(k?2*h:0),n-=h),u.position){case"center":d=b?k?A+h/2+f:A+h/2-f:k?A-h/2+c.height/2+f:A+h/2+c.height/2-f;break;case"bottom":d=b?k?A+h+f:A+h-f:k?A-h+c.height+p+f:A+h-c.height/2+p-f;break;case"top":d=b?k?A+f:A-f:k?A-c.height/2-f:A+c.height+f}return i.config.chart.stacked||(d<0?d=0+p:d+c.height/3>i.globals.gridHeight&&(d=i.globals.gridHeight-p)),{bcx:r,bcy:n,dataLabelsX:t,dataLabelsY:d}}},{key:"calculateBarsDataLabelsPosition",value:function(e){var t=this.w,i=e.x,a=e.i,s=e.j,n=e.bcy,r=e.barHeight,o=e.barWidth,h=e.textRects,c=e.dataLabelsX,d=e.strokeWidth,u=e.barDataLabelsConfig,p=e.offX,x=e.offY,f=t.globals.gridHeight/t.globals.dataPoints;o=Math.abs(o);var b=n-(this.barCtx.isRangeBar?0:f)+r/2+h.height/2+x-3,y=this.barCtx.series[a][s]<0,k=i;switch(this.barCtx.isReversed&&(k=i+o-(y?2*o:0),i=t.globals.gridWidth-o),u.position){case"center":c=y?k+o/2-p:Math.max(h.width/2,k-o/2)+p;break;case"bottom":c=y?k+o-d-Math.round(h.width/2)-p:k-o+d+Math.round(h.width/2)+p;break;case"top":c=y?k-d+Math.round(h.width/2)-p:k-d-Math.round(h.width/2)+p}return t.config.chart.stacked||(c<0?c=c+h.width+d:c+h.width/2>t.globals.gridWidth&&(c=t.globals.gridWidth-h.width-d)),{bcx:i,bcy:n,dataLabelsX:c,dataLabelsY:b}}},{key:"drawCalculatedDataLabels",value:function(e){var t=e.x,i=e.y,a=e.val,s=e.i,n=e.j,r=e.textRects,o=e.barHeight,h=e.barWidth,c=e.dataLabelsConfig,d=this.w,u="rotate(0)";"vertical"===d.config.plotOptions.bar.dataLabels.orientation&&(u="rotate(-90, ".concat(t,", ").concat(i,")"));var p=new pe(this.barCtx.ctx),x=new M(this.barCtx.ctx),f=c.formatter,b=null,y=d.globals.collapsedSeriesIndices.indexOf(s)>-1;if(c.enabled&&!y){b=x.group({class:"apexcharts-data-labels",transform:u});var k="";void 0!==a&&(k=f(a,{seriesIndex:s,dataPointIndex:n,w:d}));var A=d.globals.series[s][n]<0,l=d.config.plotOptions.bar.dataLabels.position;"vertical"===d.config.plotOptions.bar.dataLabels.orientation&&("top"===l&&(c.textAnchor=A?"end":"start"),"center"===l&&(c.textAnchor="middle"),"bottom"===l&&(c.textAnchor=A?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&h<x.getTextRects(k,parseFloat(c.style.fontSize)).width&&(k=""),d.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?r.width/1.6>Math.abs(h)&&(k=""):r.height/1.6>Math.abs(o)&&(k=""));var g=R({},c);this.barCtx.isHorizontal&&a<0&&("start"===c.textAnchor?g.textAnchor="end":"end"===c.textAnchor&&(g.textAnchor="start")),p.plotDataLabelsText({x:t,y:i,text:k,i:s,j:n,parent:b,dataLabelsConfig:g,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return b}}]),w}(),K=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w,this.legendInactiveClass="legend-mouseover-inactive"}return Y(w,[{key:"getAllSeriesEls",value:function(){return this.w.globals.dom.baseEl.getElementsByClassName("apexcharts-series")}},{key:"getSeriesByName",value:function(e){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner .apexcharts-series[seriesName='".concat(P.escapeString(e),"']"))}},{key:"isSeriesHidden",value:function(e){var t=this.getSeriesByName(e),i=parseInt(t.getAttribute("data:realIndex"),10);return{isHidden:t.classList.contains("apexcharts-series-collapsed"),realIndex:i}}},{key:"addCollapsedClassToSeries",value:function(e,t){var i=this.w;function a(s){for(var n=0;n<s.length;n++)s[n].index===t&&e.node.classList.add("apexcharts-series-collapsed")}a(i.globals.collapsedSeries),a(i.globals.ancillaryCollapsedSeries)}},{key:"toggleSeries",value:function(e){var t=this.isSeriesHidden(e);return this.ctx.legend.legendHelpers.toggleDataSeries(t.realIndex,t.isHidden),t.isHidden}},{key:"showSeries",value:function(e){var t=this.isSeriesHidden(e);t.isHidden&&this.ctx.legend.legendHelpers.toggleDataSeries(t.realIndex,!0)}},{key:"hideSeries",value:function(e){var t=this.isSeriesHidden(e);t.isHidden||this.ctx.legend.legendHelpers.toggleDataSeries(t.realIndex,!1)}},{key:"resetSeries",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w,s=P.clone(a.globals.initialSeries);a.globals.previousPaths=[],i?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):s=this.emptyCollapsedSeries(s),a.config.series=s,e&&(t&&(a.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(e){for(var t=this.w,i=0;i<e.length;i++)t.globals.collapsedSeriesIndices.indexOf(i)>-1&&(e[i].data=[]);return e}},{key:"toggleSeriesOnHover",value:function(e,t){var i=this.w;t||(t=e.target);var a=i.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels");if("mousemove"===e.type){var s=parseInt(t.getAttribute("rel"),10)-1,n=null,r=null;i.globals.axisCharts||"radialBar"===i.config.chart.type?i.globals.axisCharts?(n=i.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(s,"']")),r=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(s,"']"))):n=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(s+1,"']")):n=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(s+1,"'] path"));for(var o=0;o<a.length;o++)a[o].classList.add(this.legendInactiveClass);null!==n&&(i.globals.axisCharts||n.parentNode.classList.remove(this.legendInactiveClass),n.classList.remove(this.legendInactiveClass),null!==r&&r.classList.remove(this.legendInactiveClass))}else if("mouseout"===e.type)for(var h=0;h<a.length;h++)a[h].classList.remove(this.legendInactiveClass)}},{key:"highlightRangeInSeries",value:function(e,t){var i=this,a=this.w,s=a.globals.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),n=function(o){for(var h=0;h<s.length;h++)s[h].classList[o](i.legendInactiveClass)};if("mousemove"===e.type){var r=parseInt(t.getAttribute("rel"),10)-1;n("add"),function(o){for(var h=0;h<s.length;h++){var c=parseInt(s[h].getAttribute("val"),10);c>=o.from&&c<=o.to&&s[h].classList.remove(i.legendInactiveClass)}}(a.config.plotOptions.heatmap.colorScale.ranges[r])}else"mouseout"===e.type&&n("remove")}},{key:"getActiveConfigSeriesIndex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc",i=this.w,a=0;if(i.config.series.length>1)for(var s=i.config.series.map(function(r,o){var h=!1;return e&&(h="bar"===i.config.series[o].type||"column"===i.config.series[o].type),r.data&&r.data.length>0&&!h?o:-1}),n="asc"===t?0:s.length-1;"asc"===t?n<s.length:n>=0;"asc"===t?n++:n--)if(-1!==s[n]){a=s[n];break}return a}},{key:"getPreviousPaths",value:function(){var e=this.w;function t(n,r,o){for(var h=n[r].childNodes,c={type:o,paths:[],realIndex:n[r].getAttribute("data:realIndex")},d=0;d<h.length;d++)if(h[d].hasAttribute("pathTo")){var u=h[d].getAttribute("pathTo");c.paths.push({d:u})}e.globals.previousPaths.push(c)}e.globals.previousPaths=[],["line","area","bar","rangebar","candlestick","radar"].forEach(function(n){for(var o=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(n,"-series .apexcharts-series")),h=0;h<o.length;h++)t(o,h,n)}),this.handlePrevBubbleScatterPaths("bubble"),this.handlePrevBubbleScatterPaths("scatter");var i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series"));if(i.length>0)for(var a=function(n){for(var r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(n,"'] rect")),o=[],h=function(d){var u=function(x){return r[d].getAttribute(x)},p={x:parseFloat(u("x")),y:parseFloat(u("y")),width:parseFloat(u("width")),height:parseFloat(u("height"))};o.push({rect:p,color:r[d].getAttribute("color")})},c=0;c<r.length;c++)h(c);e.globals.previousPaths.push(o)},s=0;s<i.length;s++)a(s);e.globals.axisCharts||(e.globals.previousPaths=e.globals.series)}},{key:"handlePrevBubbleScatterPaths",value:function(e){var t=this.w,i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e,"-series .apexcharts-series"));if(i.length>0)for(var a=0;a<i.length;a++){for(var s=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e,"-series .apexcharts-series[data\\:realIndex='").concat(a,"'] circle")),n=[],r=0;r<s.length;r++)n.push({x:s[r].getAttribute("cx"),y:s[r].getAttribute("cy"),r:s[r].getAttribute("r")});t.globals.previousPaths.push(n)}}},{key:"clearPreviousPaths",value:function(){var e=this.w;e.globals.previousPaths=[],e.globals.allSeriesCollapsed=!1}},{key:"handleNoData",value:function(){var e=this.w,t=e.config.noData,i=new M(this.ctx),a=e.globals.svgWidth/2,s=e.globals.svgHeight/2,n="middle";if(e.globals.noData=!0,e.globals.animationEnded=!0,"left"===t.align?(a=10,n="start"):"right"===t.align&&(a=e.globals.svgWidth-10,n="end"),"top"===t.verticalAlign?s=50:"bottom"===t.verticalAlign&&(s=e.globals.svgHeight-50),a+=t.offsetX,s=s+parseInt(t.style.fontSize,10)+2+t.offsetY,void 0!==t.text&&""!==t.text){var r=i.drawText({x:a,y:s,text:t.text,textAnchor:n,fontSize:t.style.fontSize,fontFamily:t.style.fontFamily,foreColor:t.style.color,opacity:1,class:"apexcharts-text-nodata"});e.globals.dom.Paper.add(r)}}},{key:"setNullSeriesToZeroValues",value:function(e){for(var t=this.w,i=0;i<e.length;i++)if(0===e[i].length)for(var a=0;a<e[t.globals.maxValsInArrayIndex].length;a++)e[i].push(0);return e}},{key:"hasAllSeriesEqualX",value:function(){for(var e=!0,t=this.w,i=this.filteredSeriesX(),a=0;a<i.length-1;a++)if(i[a][0]!==i[a+1][0]){e=!1;break}return t.globals.allSeriesHasEqualX=e,e}},{key:"filteredSeriesX",value:function(){return this.w.globals.seriesX.map(function(t){return t.length>0?t:[]})}}]),w}(),ht=function(){function w(e){C(this,w),this.w=e.w,this.barCtx=e}return Y(w,[{key:"initVariables",value:function(e){var t=this.w;this.barCtx.series=e,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var i=0;i<e.length;i++)if(e[i].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=e[i].length),t.globals.isXNumeric)for(var a=0;a<e[i].length;a++)t.globals.seriesX[i][a]>t.globals.minX&&t.globals.seriesX[i][a]<t.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=t.globals.dataPoints;0===this.barCtx.seriesLen&&(this.barCtx.seriesLen=1),this.barCtx.zeroSerieses=[],this.barCtx.radiusOnSeriesNumber=e.length-1,t.globals.comboCharts||this.checkZeroSeries({series:e})}},{key:"initialPositions",value:function(){var e,t,i,a,s,n,r,o,h=this.w,c=h.globals.dataPoints;this.barCtx.isRangeBar&&(c=h.globals.labels.length);var d=this.barCtx.seriesLen;if(h.config.plotOptions.bar.rangeBarGroupRows&&(d=1),this.barCtx.isHorizontal)s=(i=h.globals.gridHeight/c)/d,h.globals.isXNumeric&&(s=(i=h.globals.gridHeight/this.barCtx.totalItems)/this.barCtx.seriesLen),s=s*parseInt(this.barCtx.barOptions.barHeight,10)/100,o=this.barCtx.baseLineInvertedY+h.globals.padHorizontal+(this.barCtx.isReversed?h.globals.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),t=(i-s*this.barCtx.seriesLen)/2;else{if(a=h.globals.gridWidth/this.barCtx.visibleItems,h.config.xaxis.convertedCatToNumeric&&(a=h.globals.gridWidth/h.globals.dataPoints),n=a/this.barCtx.seriesLen*parseInt(this.barCtx.barOptions.columnWidth,10)/100,h.globals.isXNumeric){var u=this.barCtx.xRatio;h.config.xaxis.convertedCatToNumeric&&(u=this.barCtx.initialXRatio),h.globals.minXDiff&&.5!==h.globals.minXDiff&&h.globals.minXDiff/u>0&&(a=h.globals.minXDiff/u),(n=a/this.barCtx.seriesLen*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(n=1)}r=h.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.yaxisIndex]-(this.barCtx.isReversed?h.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.yaxisIndex]:0),e=h.globals.padHorizontal+(a-n*this.barCtx.seriesLen)/2}return{x:e,y:t,yDivision:i,xDivision:a,barHeight:s,barWidth:n,zeroH:r,zeroW:o}}},{key:"getPathFillColor",value:function(e,t,i,a){var s=this.w,n=new ie(this.barCtx.ctx),r=null,o=this.barCtx.barOptions.distributed?i:t;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(function(h){e[t][i]>=h.from&&e[t][i]<=h.to&&(r=h.color)}),s.config.series[t].data[i]&&s.config.series[t].data[i].fillColor&&(r=s.config.series[t].data[i].fillColor),n.fillPath({seriesNumber:this.barCtx.barOptions.distributed?o:a,dataPointIndex:i,color:r,value:e[t][i]})}},{key:"getStrokeWidth",value:function(e,t,i){var a=0,s=this.w;return this.barCtx.isNullValue=null==this.barCtx.series[e][t],s.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),a}},{key:"barBackground",value:function(e){var t=e.j,i=e.i,a=e.x1,s=e.x2,n=e.y1,r=e.y2,o=e.elSeries,h=this.w,c=new M(this.barCtx.ctx),d=new K(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&d===i){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t-=this.barCtx.barOptions.colors.backgroundBarColors.length);var p=c.drawRect(void 0!==a?a:0,void 0!==n?n:0,void 0!==s?s:h.globals.gridWidth,void 0!==r?r:h.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,this.barCtx.barOptions.colors.backgroundBarColors[t],this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(p),p.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(e){var t=e.barWidth,i=e.barXPosition,a=e.yRatio,s=e.y1,n=e.y2,r=e.strokeWidth,o=e.series,h=e.realIndex,c=e.i,d=e.j,u=e.w,p=new M(this.barCtx.ctx);(r=Array.isArray(r)?r[h]:r)||(r=0);var f=this.getRoundedBars(u,{barWidth:t,strokeWidth:r,yRatio:a,barXPosition:i,y1:s,y2:n},o,c,d),b=i,y=i+t,k=p.move(b,s),A=p.move(b,s),l=p.line(y-r,s);return u.globals.previousPaths.length>0&&(A=this.barCtx.getPreviousPath(h,d,!1)),k=k+p.line(b,f.y2)+f.pathWithRadius+p.line(y-r,f.y2)+l+l+"z",A=A+p.line(b,s)+l+l+l+l+l+p.line(b,s),u.config.chart.stacked&&(this.barCtx.yArrj.push(f.y2),this.barCtx.yArrjF.push(Math.abs(s-f.y2)),this.barCtx.yArrjVal.push(this.barCtx.series[c][d])),{pathTo:k,pathFrom:A}}},{key:"getBarpaths",value:function(e){var t=e.barYPosition,i=e.barHeight,a=e.x1,s=e.x2,n=e.strokeWidth,r=e.series,o=e.realIndex,h=e.i,c=e.j,d=e.w,u=new M(this.barCtx.ctx);(n=Array.isArray(n)?n[o]:n)||(n=0);var x=this.getRoundedBars(d,{barHeight:i,strokeWidth:n,barYPosition:t,x2:s,x1:a},r,h,c),f=u.move(a,t),b=u.move(a,t);d.globals.previousPaths.length>0&&(b=this.barCtx.getPreviousPath(o,c,!1));var y=t,k=t+i,A=u.line(a,k-n);return f=f+u.line(x.x2,y)+x.pathWithRadius+u.line(x.x2,k-n)+A+A+"z",b=b+u.line(a,y)+A+A+A+A+A+u.line(a,y),d.config.chart.stacked&&(this.barCtx.xArrj.push(x.x2),this.barCtx.xArrjF.push(Math.abs(a-x.x2)),this.barCtx.xArrjVal.push(this.barCtx.series[h][c])),{pathTo:f,pathFrom:b}}},{key:"getRoundedBars",value:function(e,t,i,a,s){var n=new M(this.barCtx.ctx),r=0,o=e.config.plotOptions.bar.borderRadius,h=Array.isArray(o);if(r=h?o[a>o.length-1?o.length-1:a]:o,e.config.chart.stacked&&i.length>1&&a!==this.barCtx.radiusOnSeriesNumber&&!h&&(r=0),this.barCtx.isHorizontal){var c="",d=t.x2;if(Math.abs(t.x1-t.x2)<r&&(r=Math.abs(t.x1-t.x2)),void 0!==i[a][s]||null!==i[a][s]){var u=this.barCtx.isReversed?i[a][s]>0:i[a][s]<0;u&&(r*=-1),c=n.quadraticCurve((d-=r)+r,t.barYPosition,d+r,t.barYPosition+(u?-1*r:r))+n.line(d+r,t.barYPosition+t.barHeight-t.strokeWidth-(u?-1*r:r))+n.quadraticCurve(d+r,t.barYPosition+t.barHeight-t.strokeWidth,d,t.barYPosition+t.barHeight-t.strokeWidth)}return{pathWithRadius:c,x2:d}}var p="",x=t.y2;if(Math.abs(t.y1-t.y2)<r&&(r=Math.abs(t.y1-t.y2)),void 0!==i[a][s]||null!==i[a][s]){var f=i[a][s]<0;f&&(r*=-1),p=n.quadraticCurve(t.barXPosition,(x+=r)-r,t.barXPosition+(f?-1*r:r),x-r)+n.line(t.barXPosition+t.barWidth-t.strokeWidth-(f?-1*r:r),x-r)+n.quadraticCurve(t.barXPosition+t.barWidth-t.strokeWidth,x-r,t.barXPosition+t.barWidth-t.strokeWidth,x)}return{pathWithRadius:p,y2:x}}},{key:"checkZeroSeries",value:function(e){for(var t=e.series,i=this.w,a=0;a<t.length;a++){for(var s=0,n=0;n<t[i.globals.maxValsInArrayIndex].length;n++)s+=t[a][n];0===s&&this.barCtx.zeroSerieses.push(a)}for(var r=t.length-1;r>=0;r--)this.barCtx.zeroSerieses.indexOf(r)>-1&&r===this.radiusOnSeriesNumber&&(this.barCtx.radiusOnSeriesNumber-=1);for(var o=t.length-1;o>=0;o--)i.globals.collapsedSeriesIndices.indexOf(this.barCtx.radiusOnSeriesNumber)>-1&&(this.barCtx.radiusOnSeriesNumber-=1)}},{key:"getXForValue",value:function(e,t){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=i?t:null;return null!=e&&(a=t+e/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?e/this.barCtx.invertedYRatio:0)),a}},{key:"getYForValue",value:function(e,t){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=i?t:null;return null!=e&&(a=t-e/this.barCtx.yRatio[this.barCtx.yaxisIndex]+2*(this.barCtx.isReversed?e/this.barCtx.yRatio[this.barCtx.yaxisIndex]:0)),a}},{key:"getGoalValues",value:function(e,t,i,a,s){var n=this,r=this.w,o=[];return r.globals.seriesGoals[a]&&r.globals.seriesGoals[a][s]&&Array.isArray(r.globals.seriesGoals[a][s])&&r.globals.seriesGoals[a][s].forEach(function(h){var c;o.push((Le(c={},e,"x"===e?n.getXForValue(h.value,t,!1):n.getYForValue(h.value,i,!1)),Le(c,"attrs",h),c))}),o}},{key:"drawGoalLine",value:function(e){var t=e.barXPosition,i=e.barYPosition,a=e.goalX,s=e.goalY,n=e.barWidth,r=e.barHeight,o=new M(this.barCtx.ctx),h=o.group({className:"apexcharts-bar-goals-groups"}),c=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach(function(d){var u=void 0!==d.attrs.strokeHeight?d.attrs.strokeHeight:r/2,p=i+u+r/2;c=o.drawLine(d.x,p-2*u,d.x,p,d.attrs.strokeColor?d.attrs.strokeColor:void 0,d.attrs.strokeDashArray,d.attrs.strokeWidth?d.attrs.strokeWidth:2,d.attrs.strokeLineCap),h.add(c)}):Array.isArray(s)&&s.forEach(function(d){var u=void 0!==d.attrs.strokeWidth?d.attrs.strokeWidth:n/2,p=t+u+n/2;c=o.drawLine(p-2*u,d.y,p,d.y,d.attrs.strokeColor?d.attrs.strokeColor:void 0,d.attrs.strokeDashArray,d.attrs.strokeHeight?d.attrs.strokeHeight:2,d.attrs.strokeLineCap),h.add(c)}),h}}]),w}(),fe=function(){function w(e,t){C(this,w),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.seriesRangeBar.length&&this.isHorizontal,this.xyRatios=t,null!==this.xyRatios&&(this.xRatio=t.xRatio,this.initialXRatio=t.initialXRatio,this.yRatio=t.yRatio,this.invertedXRatio=t.invertedXRatio,this.invertedYRatio=t.invertedYRatio,this.baseLineY=t.baseLineY,this.baseLineInvertedY=t.baseLineInvertedY),this.yaxisIndex=0,this.seriesLen=0,this.barHelpers=new ht(this)}return Y(w,[{key:"draw",value:function(e,t){var i=this.w,a=new M(this.ctx),s=new _(this.ctx,i);e=s.getLogSeries(e),this.series=e,this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);var n=a.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering.");for(var r=0,o=0;r<e.length;r++,o++){var h,c,d,u,p=void 0,x=void 0,f=[],b=[],y=i.globals.comboCharts?t[r]:r,k=a.group({class:"apexcharts-series",rel:r+1,seriesName:P.escapeString(i.globals.seriesNames[y]),"data:realIndex":y});this.ctx.series.addCollapsedClassToSeries(k,y),e[r].length>0&&(this.visibleI=this.visibleI+1);var A=0,l=0;this.yRatio.length>1&&(this.yaxisIndex=y),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var g=this.barHelpers.initialPositions();x=g.y,A=g.barHeight,c=g.yDivision,u=g.zeroW,p=g.x,l=g.barWidth,h=g.xDivision,d=g.zeroH,this.horizontal||b.push(p+l/2);for(var m=a.group({class:"apexcharts-datalabels","data:realIndex":y}),v=a.group({class:"apexcharts-bar-goals-markers",style:"pointer-events: none"}),S=0;S<i.globals.dataPoints;S++){var T=this.barHelpers.getStrokeWidth(r,S,y),L=null,z={indexes:{i:r,j:S,realIndex:y,bc:o},x:p,y:x,strokeWidth:T,elSeries:k};this.isHorizontal?(L=this.drawBarPaths(R(R({},z),{},{barHeight:A,zeroW:u,yDivision:c})),l=this.series[r][S]/this.invertedYRatio):(L=this.drawColumnPaths(R(R({},z),{},{xDivision:h,barWidth:l,zeroH:d})),A=this.series[r][S]/this.yRatio[this.yaxisIndex]);var E=this.barHelpers.drawGoalLine({barXPosition:L.barXPosition,barYPosition:L.barYPosition,goalX:L.goalX,goalY:L.goalY,barHeight:A,barWidth:l});E&&v.add(E),x=L.y,p=L.x,S>0&&b.push(p+l/2),f.push(x);var X=this.barHelpers.getPathFillColor(e,r,S,y);this.renderSeries({realIndex:y,pathFill:X,j:S,i:r,pathFrom:L.pathFrom,pathTo:L.pathTo,strokeWidth:T,elSeries:k,x:p,y:x,series:e,barHeight:A,barWidth:l,elDataLabelsWrap:m,elGoalsMarkers:v,visibleSeries:this.visibleI,type:"bar"})}i.globals.seriesXvalues[y]=b,i.globals.seriesYvalues[y]=f,n.add(k)}return n}},{key:"renderSeries",value:function(e){var t=e.realIndex,i=e.pathFill,a=e.lineFill,s=e.j,n=e.i,r=e.pathFrom,o=e.pathTo,h=e.strokeWidth,c=e.elSeries,d=e.x,u=e.y,p=e.y1,x=e.y2,f=e.series,b=e.barHeight,y=e.barWidth,k=e.barYPosition,A=e.elDataLabelsWrap,l=e.elGoalsMarkers,g=e.visibleSeries,m=e.type,v=this.w,S=new M(this.ctx);a||(a=this.barOptions.distributed?v.globals.stroke.colors[s]:v.globals.stroke.colors[t]),v.config.series[n].data[s]&&v.config.series[n].data[s].strokeColor&&(a=v.config.series[n].data[s].strokeColor),this.isNullValue&&(i="none");var L=S.renderPaths({i:n,j:s,realIndex:t,pathFrom:r,pathTo:o,stroke:a,strokeWidth:h,strokeLineCap:v.config.stroke.lineCap,fill:i,animationDelay:s/v.config.chart.animations.animateGradually.delay*(v.config.chart.animations.speed/v.globals.dataPoints)/2.4,initialSpeed:v.config.chart.animations.speed,dataChangeSpeed:v.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(m,"-area")});L.attr("clip-path","url(#gridRectMask".concat(v.globals.cuid,")"));var z=v.config.forecastDataPoints;z.count>0&&s>=v.globals.dataPoints-z.count&&(L.node.setAttribute("stroke-dasharray",z.dashArray),L.node.setAttribute("stroke-width",z.strokeWidth),L.node.setAttribute("fill-opacity",z.fillOpacity)),void 0!==p&&void 0!==x&&(L.attr("data-range-y1",p),L.attr("data-range-y2",x)),new j(this.ctx).setSelectionFilter(L,t,s),c.add(L);var E=new lt(this).handleBarDataLabels({x:d,y:u,y1:p,y2:x,i:n,j:s,series:f,realIndex:t,barHeight:b,barWidth:y,barYPosition:k,renderedPath:L,visibleSeries:g});return null!==E&&A.add(E),c.add(A),l&&c.add(l),c}},{key:"drawBarPaths",value:function(e){var n,t=e.indexes,i=e.barHeight,a=e.strokeWidth,s=e.zeroW,r=e.y,o=e.yDivision,h=e.elSeries,c=this.w,d=t.i,u=t.j;c.globals.isXNumeric&&(r=(c.globals.seriesX[d][u]-c.globals.minX)/this.invertedXRatio-i);var p=r+i*this.visibleI;n=this.barHelpers.getXForValue(this.series[d][u],s);var x=this.barHelpers.getBarpaths({barYPosition:p,barHeight:i,x1:s,x2:n,strokeWidth:a,series:this.series,realIndex:t.realIndex,i:d,j:u,w:c});return c.globals.isXNumeric||(r+=o),this.barHelpers.barBackground({j:u,i:d,y1:p-i*this.visibleI,y2:i*this.seriesLen,elSeries:h}),{pathTo:x.pathTo,pathFrom:x.pathFrom,x:n,y:r,goalX:this.barHelpers.getGoalValues("x",s,null,d,u),barYPosition:p}}},{key:"drawColumnPaths",value:function(e){var a,t=e.indexes,i=e.x,s=e.xDivision,n=e.barWidth,r=e.zeroH,o=e.strokeWidth,h=e.elSeries,c=this.w,d=t.realIndex,u=t.i,p=t.j,x=t.bc;if(c.globals.isXNumeric){var f=d;c.globals.seriesX[d].length||(f=c.globals.maxValsInArrayIndex),i=(c.globals.seriesX[f][p]-c.globals.minX)/this.xRatio-n*this.seriesLen/2}var b=i+n*this.visibleI;a=this.barHelpers.getYForValue(this.series[u][p],r);var y=this.barHelpers.getColumnPaths({barXPosition:b,barWidth:n,y1:r,y2:a,strokeWidth:o,series:this.series,realIndex:t.realIndex,i:u,j:p,w:c});return c.globals.isXNumeric||(i+=s),this.barHelpers.barBackground({bc:x,j:p,i:u,x1:b-o/2-n*this.visibleI,x2:n*this.seriesLen+o/2,elSeries:h}),{pathTo:y.pathTo,pathFrom:y.pathFrom,x:i,y:a,goalY:this.barHelpers.getGoalValues("y",null,r,u,p),barXPosition:b}}},{key:"getPreviousPath",value:function(e,t){for(var i,a=this.w,s=0;s<a.globals.previousPaths.length;s++){var n=a.globals.previousPaths[s];n.paths&&n.paths.length>0&&parseInt(n.realIndex,10)===parseInt(e,10)&&void 0!==a.globals.previousPaths[s].paths[t]&&(i=a.globals.previousPaths[s].paths[t].d)}return i}}]),w}(),U=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}return Y(w,[{key:"isValidDate",value:function(e){return!isNaN(this.parseDate(e))}},{key:"getTimeStamp",value:function(e){return Date.parse(e)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toISOString().substr(0,25)).getTime():new Date(e).getTime():e}},{key:"getDate",value:function(e){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toUTCString()):new Date(e)}},{key:"parseDate",value:function(e){var t=Date.parse(e);if(!isNaN(t))return this.getTimeStamp(e);var i=Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "));return this.getTimeStamp(i)}},{key:"parseDateWithTimezone",value:function(e){return Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "))}},{key:"formatDate",value:function(e,t){var i=this.w.globals.locale,a=this.w.config.xaxis.labels.datetimeUTC,s=["\0"].concat(te(i.months)),n=["\x01"].concat(te(i.shortMonths)),r=["\x02"].concat(te(i.days)),o=["\x03"].concat(te(i.shortDays));function h(S,T){var L=S+"";for(T=T||2;L.length<T;)L="0"+L;return L}var c=a?e.getUTCFullYear():e.getFullYear();t=(t=(t=t.replace(/(^|[^\\])yyyy+/g,"$1"+c)).replace(/(^|[^\\])yy/g,"$1"+c.toString().substr(2,2))).replace(/(^|[^\\])y/g,"$1"+c);var d=(a?e.getUTCMonth():e.getMonth())+1;t=(t=(t=(t=t.replace(/(^|[^\\])MMMM+/g,"$1"+s[0])).replace(/(^|[^\\])MMM/g,"$1"+n[0])).replace(/(^|[^\\])MM/g,"$1"+h(d))).replace(/(^|[^\\])M/g,"$1"+d);var u=a?e.getUTCDate():e.getDate();t=(t=(t=(t=t.replace(/(^|[^\\])dddd+/g,"$1"+r[0])).replace(/(^|[^\\])ddd/g,"$1"+o[0])).replace(/(^|[^\\])dd/g,"$1"+h(u))).replace(/(^|[^\\])d/g,"$1"+u);var p=a?e.getUTCHours():e.getHours(),x=p>12?p-12:0===p?12:p;t=(t=(t=(t=t.replace(/(^|[^\\])HH+/g,"$1"+h(p))).replace(/(^|[^\\])H/g,"$1"+p)).replace(/(^|[^\\])hh+/g,"$1"+h(x))).replace(/(^|[^\\])h/g,"$1"+x);var f=a?e.getUTCMinutes():e.getMinutes();t=(t=t.replace(/(^|[^\\])mm+/g,"$1"+h(f))).replace(/(^|[^\\])m/g,"$1"+f);var b=a?e.getUTCSeconds():e.getSeconds();t=(t=t.replace(/(^|[^\\])ss+/g,"$1"+h(b))).replace(/(^|[^\\])s/g,"$1"+b);var y=a?e.getUTCMilliseconds():e.getMilliseconds();t=t.replace(/(^|[^\\])fff+/g,"$1"+h(y,3)),y=Math.round(y/10),t=t.replace(/(^|[^\\])ff/g,"$1"+h(y)),y=Math.round(y/10);var k=p<12?"AM":"PM";t=(t=(t=t.replace(/(^|[^\\])f/g,"$1"+y)).replace(/(^|[^\\])TT+/g,"$1"+k)).replace(/(^|[^\\])T/g,"$1"+k.charAt(0));var A=k.toLowerCase();t=(t=t.replace(/(^|[^\\])tt+/g,"$1"+A)).replace(/(^|[^\\])t/g,"$1"+A.charAt(0));var l=-e.getTimezoneOffset(),g=a||!l?"Z":l>0?"+":"-";if(!a){var m=(l=Math.abs(l))%60;g+=h(Math.floor(l/60))+":"+h(m)}t=t.replace(/(^|[^\\])K/g,"$1"+g);var v=(a?e.getUTCDay():e.getDay())+1;return(t=(t=(t=(t=t.replace(new RegExp(r[0],"g"),r[v])).replace(new RegExp(o[0],"g"),o[v])).replace(new RegExp(s[0],"g"),s[d])).replace(new RegExp(n[0],"g"),n[d])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(e,t,i){var a=this.w;void 0!==a.config.xaxis.min&&(e=a.config.xaxis.min),void 0!==a.config.xaxis.max&&(t=a.config.xaxis.max);var s=this.getDate(e),n=this.getDate(t),r=this.formatDate(s,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(n,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(r[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(r[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(r[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(r[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(r[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(r[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(r[0],10),maxYear:parseInt(o[0],10)}}},{key:"isLeapYear",value:function(e){return e%4==0&&e%100!=0||e%400==0}},{key:"calculcateLastDaysOfMonth",value:function(e,t,i){return this.determineDaysOfMonths(e,t)-i}},{key:"determineDaysOfYear",value:function(e){var t=365;return this.isLeapYear(e)&&(t=366),t}},{key:"determineRemainingDaysOfYear",value:function(e,t,i){var a=this.daysCntOfYear[t]+i;return t>1&&this.isLeapYear()&&a++,a}},{key:"determineDaysOfMonths",value:function(e,t){var i=30;switch(e=P.monthMod(e),!0){case this.months30.indexOf(e)>-1:2===e&&(i=this.isLeapYear(t)?29:28);break;case this.months31.indexOf(e)>-1:default:i=31}return i}}]),w}(),Xe=function(w){ge(t,fe);var e=ye(t);function t(){return C(this,t),e.apply(this,arguments)}return Y(t,[{key:"draw",value:function(i,a){var s=this.w,n=new M(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=i,this.seriesRangeStart=s.globals.seriesRangeStart,this.seriesRangeEnd=s.globals.seriesRangeEnd,this.barHelpers.initVariables(i);for(var r=n.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),o=0;o<i.length;o++){var h,c,d,u=void 0,p=void 0,x=void 0,f=s.globals.comboCharts?a[o]:o,b=n.group({class:"apexcharts-series",seriesName:P.escapeString(s.globals.seriesNames[f]),rel:o+1,"data:realIndex":f});this.ctx.series.addCollapsedClassToSeries(b,f),i[o].length>0&&(this.visibleI=this.visibleI+1);var y=0,k=0;this.yRatio.length>1&&(this.yaxisIndex=f);var A=this.barHelpers.initialPositions();p=A.y,d=A.zeroW,u=A.x,k=A.barWidth,h=A.xDivision,c=A.zeroH;for(var l=n.group({class:"apexcharts-datalabels","data:realIndex":f}),g=n.group({class:"apexcharts-rangebar-goals-markers",style:"pointer-events: none"}),m=0;m<s.globals.dataPoints;m++){var v=this.barHelpers.getStrokeWidth(o,m,f),S=this.seriesRangeStart[o][m],T=this.seriesRangeEnd[o][m],L=null,z=null,E={x:u,y:p,strokeWidth:v,elSeries:b};if(x=A.yDivision,y=A.barHeight,this.isHorizontal){z=p+y*this.visibleI;var X=this.seriesLen;s.config.plotOptions.bar.rangeBarGroupRows&&(X=1);var D=(x-y*X)/2;if(void 0===s.config.series[o].data[m])break;if(s.config.series[o].data[m].x){var W=this.detectOverlappingBars({i:o,j:m,barYPosition:z,srty:D,barHeight:y,yDivision:x,initPositions:A});y=W.barHeight,z=W.barYPosition}k=(L=this.drawRangeBarPaths(R({indexes:{i:o,j:m,realIndex:f},barHeight:y,barYPosition:z,zeroW:d,yDivision:x,y1:S,y2:T},E))).barWidth}else y=(L=this.drawRangeColumnPaths(R({indexes:{i:o,j:m,realIndex:f},zeroH:c,barWidth:k,xDivision:h},E))).barHeight;var O=this.barHelpers.drawGoalLine({barXPosition:L.barXPosition,barYPosition:z,goalX:L.goalX,goalY:L.goalY,barHeight:y,barWidth:k});O&&g.add(O),p=L.y,u=L.x;var Z=this.barHelpers.getPathFillColor(i,o,m,f);this.renderSeries({realIndex:f,pathFill:Z,lineFill:s.globals.stroke.colors[f],j:m,i:o,x:u,y:p,y1:S,y2:T,pathFrom:L.pathFrom,pathTo:L.pathTo,strokeWidth:v,elSeries:b,series:i,barHeight:y,barYPosition:z,barWidth:k,elDataLabelsWrap:l,elGoalsMarkers:g,visibleSeries:this.visibleI,type:"rangebar"})}r.add(b)}return r}},{key:"detectOverlappingBars",value:function(i){var a=i.i,s=i.j,n=i.barYPosition,r=i.srty,o=i.barHeight,h=i.yDivision,c=i.initPositions,d=this.w,u=[],p=d.config.series[a].data[s].rangeName,x=d.config.series[a].data[s].x,f=d.globals.labels.indexOf(x),b=d.globals.seriesRangeBar[a].findIndex(function(y){return y.x===x&&y.overlaps.length>0});return n=d.config.plotOptions.bar.rangeBarGroupRows?r+h*f:r+o*this.visibleI+h*f,b>-1&&!d.config.plotOptions.bar.rangeBarOverlap&&(u=d.globals.seriesRangeBar[a][b].overlaps).indexOf(p)>-1&&(n=(o=c.barHeight/u.length)*this.visibleI+h*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+u.indexOf(p))+h*f),{barYPosition:n,barHeight:o}}},{key:"drawRangeColumnPaths",value:function(i){var a=i.indexes,s=i.x,n=i.xDivision,r=i.barWidth,o=i.zeroH,h=this.w,c=a.i,d=a.j,u=this.yRatio[this.yaxisIndex],p=a.realIndex,x=this.getRangeValue(p,d),f=Math.min(x.start,x.end),b=Math.max(x.start,x.end);h.globals.isXNumeric&&(s=(h.globals.seriesX[c][d]-h.globals.minX)/this.xRatio-r/2);var y=s+r*this.visibleI;null==this.series[c][d]?f=o:(f=o-f/u,b=o-b/u);var k=Math.abs(b-f),A=this.barHelpers.getColumnPaths({barXPosition:y,barWidth:r,y1:f,y2:b,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:a.realIndex,i:p,j:d,w:h});return h.globals.isXNumeric||(s+=n),{pathTo:A.pathTo,pathFrom:A.pathFrom,barHeight:k,x:s,y:b,goalY:this.barHelpers.getGoalValues("y",null,o,c,d),barXPosition:y}}},{key:"drawRangeBarPaths",value:function(i){var a=i.indexes,s=i.y,o=i.yDivision,h=i.barHeight,c=i.barYPosition,d=i.zeroW,u=this.w,p=d+i.y1/this.invertedYRatio,x=d+i.y2/this.invertedYRatio,f=Math.abs(x-p),b=this.barHelpers.getBarpaths({barYPosition:c,barHeight:h,x1:p,x2:x,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:a.realIndex,realIndex:a.realIndex,j:a.j,w:u});return u.globals.isXNumeric||(s+=o),{pathTo:b.pathTo,pathFrom:b.pathFrom,barWidth:f,x,goalX:this.barHelpers.getGoalValues("x",d,null,a.realIndex,a.j),y:s}}},{key:"getRangeValue",value:function(i,a){var s=this.w;return{start:s.globals.seriesRangeStart[i][a],end:s.globals.seriesRangeEnd[i][a]}}},{key:"getTooltipValues",value:function(i){var a=i.ctx,s=i.seriesIndex,n=i.dataPointIndex,r=i.y1,o=i.y2,h=i.w,c=h.globals.seriesRangeStart[s][n],d=h.globals.seriesRangeEnd[s][n],u=h.globals.labels[n],p=h.config.series[s].name?h.config.series[s].name:"",x=h.config.tooltip.y.formatter,f=h.config.tooltip.y.title.formatter,b={w:h,seriesIndex:s,dataPointIndex:n,start:c,end:d};"function"==typeof f&&(p=f(p,b)),Number.isFinite(r)&&Number.isFinite(o)&&(c=r,d=o,h.config.series[s].data[n].x&&(u=h.config.series[s].data[n].x+":"),"function"==typeof x&&(u=x(u,b)));var y="",k="",A=h.globals.colors[s];if(void 0===h.config.tooltip.x.formatter)if("datetime"===h.config.xaxis.type){var l=new U(a);y=l.formatDate(l.getDate(c),h.config.tooltip.x.format),k=l.formatDate(l.getDate(d),h.config.tooltip.x.format)}else y=c,k=d;else y=h.config.tooltip.x.formatter(c),k=h.config.tooltip.x.formatter(d);return{start:c,end:d,startVal:y,endVal:k,ylabel:u,color:A,seriesName:p}}},{key:"buildCustomTooltipHTML",value:function(i){return'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+i.color+'">'+(i.seriesName||"")+'</span></div><div> <span class="category">'+i.ylabel+' </span> <span class="value start-value">'+i.start+'</span> <span class="separator">-</span> <span class="value end-value">'+i.end+"</span></div></div>"}}]),t}(),ke=function(){function w(e){C(this,w),this.opts=e}return Y(w,[{key:"line",value:function(){return{chart:{animations:{easing:"swing"}},dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(e){return this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0,P.extend(e,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"bar",value:function(){return{chart:{stacked:!1,animations:{easing:"swing"}},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square",radius:2,size:8}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"candlestick",value:function(){var e=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(t){return e._getBoxTooltip(t.w,t.seriesIndex,t.dataPointIndex,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var e=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(t){return e._getBoxTooltip(t.w,t.seriesIndex,t.dataPointIndex,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:5,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(e,t){var i=t.seriesIndex,a=t.dataPointIndex,s=t.w;return s.globals.seriesRangeEnd[i][a]-s.globals.seriesRangeStart[i][a]},background:{enabled:!1},style:{colors:["#fff"]}},tooltip:{shared:!1,followCursor:!0,custom:function(e){return e.w.config.plotOptions&&e.w.config.plotOptions.bar&&e.w.config.plotOptions.bar.horizontal?(a=(i=new Xe((t=e).ctx,null)).getTooltipValues(t),i.buildCustomTooltipHTML({color:a.color,seriesName:a.seriesName,ylabel:a.ylabel,start:a.startVal,end:a.endVal})):function(t){var i=new Xe(t.ctx,null),a=i.getTooltipValues(t);return i.buildCustomTooltipHTML({color:a.color,seriesName:a.seriesName,ylabel:a.ylabel,start:a.start,end:a.end})}(e);var t,i,a}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"area",value:function(){return{stroke:{width:4},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"brush",value:function(e){return P.extend(e,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(e){e.dataLabels=e.dataLabels||{},e.dataLabels.formatter=e.dataLabels.formatter||void 0;var t=e.dataLabels.formatter;return e.yaxis.forEach(function(i,a){e.yaxis[a].min=0,e.yaxis[a].max=100}),"bar"===e.chart.type&&(e.dataLabels.formatter=t||function(i){return"number"==typeof i&&i?i.toFixed(0)+"%":i}),e}},{key:"convertCatToNumeric",value:function(e){return e.xaxis.convertedCatToNumeric=!0,e}},{key:"convertCatToNumericXaxis",value:function(e,t,i){e.xaxis.type="numeric",e.xaxis.labels=e.xaxis.labels||{},e.xaxis.labels.formatter=e.xaxis.labels.formatter||function(n){return P.isNumber(n)?Math.floor(n):n};var a=e.xaxis.labels.formatter,s=e.xaxis.categories&&e.xaxis.categories.length?e.xaxis.categories:e.labels;return i&&i.length&&(s=i.map(function(n){return Array.isArray(n)?n:String(n)})),s&&s.length&&(e.xaxis.labels.formatter=function(n){return P.isNumber(n)?a(s[Math.floor(n)-1]):a(n)}),e.xaxis.categories=[],e.labels=[],e.xaxis.tickAmount=e.xaxis.tickAmount||"dataPoints",e}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square",size:10,offsetY:2}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"polarArea",value:function(){return this.opts.yaxis[0].tickAmount=this.opts.yaxis[0].tickAmount?this.opts.yaxis[0].tickAmount:6,{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:3,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1},xaxis:{labels:{formatter:function(e){return e},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0}}}},{key:"_getBoxTooltip",value:function(e,t,i,a,s){var n=e.globals.seriesCandleO[t][i],r=e.globals.seriesCandleH[t][i],o=e.globals.seriesCandleM[t][i],h=e.globals.seriesCandleL[t][i],c=e.globals.seriesCandleC[t][i];return e.config.series[t].type&&e.config.series[t].type!==s?'<div class="apexcharts-custom-tooltip">\n '.concat(e.config.series[t].name?e.config.series[t].name:"series-"+(t+1),": <strong>").concat(e.globals.series[t][i],"</strong>\n </div>"):'<div class="apexcharts-tooltip-box apexcharts-tooltip-'.concat(e.config.chart.type,'">')+"<div>".concat(a[0],': <span class="value">')+n+"</span></div>"+"<div>".concat(a[1],': <span class="value">')+r+"</span></div>"+(o?"<div>".concat(a[2],': <span class="value">')+o+"</span></div>":"")+"<div>".concat(a[3],': <span class="value">')+h+"</span></div>"+"<div>".concat(a[4],': <span class="value">')+c+"</span></div></div>"}}]),w}(),xe=function(){function w(e){C(this,w),this.opts=e}return Y(w,[{key:"init",value:function(e){var t=e.responsiveOverride,i=this.opts,a=new le,s=new ke(i);this.chartType=i.chart.type,"histogram"===this.chartType&&(i.chart.type="bar",i=P.extend({plotOptions:{bar:{columnWidth:"99.99%"}}},i)),i=this.extendYAxis(i),i=this.extendAnnotations(i);var n=a.init(),r={};if(i&&"object"===V(i)){var o={};o=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","histogram","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(i.chart.type)?s[i.chart.type]():s.line(),i.chart.brush&&i.chart.brush.enabled&&(o=s.brush(o)),i.chart.stacked&&"100%"===i.chart.stackType&&(i=s.stacked100(i)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(i),i.xaxis=i.xaxis||window.Apex.xaxis||{},t||(i.xaxis.convertedCatToNumeric=!1),((i=this.checkForCatToNumericXAxis(this.chartType,o,i)).chart.sparkline&&i.chart.sparkline.enabled||window.Apex.chart&&window.Apex.chart.sparkline&&window.Apex.chart.sparkline.enabled)&&(o=s.sparkline(o)),r=P.extend(n,o)}var h=P.extend(r,window.Apex);return n=P.extend(h,i),this.handleUserInputErrors(n)}},{key:"checkForCatToNumericXAxis",value:function(e,t,i){var a=new ke(i);return("bar"===e||"boxPlot"===e)&&i.plotOptions&&i.plotOptions.bar&&i.plotOptions.bar.horizontal||"pie"===e||"polarArea"===e||"donut"===e||"radar"===e||"radialBar"===e||"heatmap"===e||!("datetime"!==i.xaxis.type&&"numeric"!==i.xaxis.type)||"between"===(i.xaxis.tickPlacement?i.xaxis.tickPlacement:t.xaxis&&t.xaxis.tickPlacement)||(i=a.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(e,t){var i=new le;(void 0===e.yaxis||!e.yaxis||Array.isArray(e.yaxis)&&0===e.yaxis.length)&&(e.yaxis={}),e.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(e.yaxis=P.extend(e.yaxis,window.Apex.yaxis)),e.yaxis=e.yaxis.constructor!==Array?[P.extend(i.yAxis,e.yaxis)]:P.extendArray(e.yaxis,i.yAxis);var a=!1;e.yaxis.forEach(function(n){n.logarithmic&&(a=!0)});var s=e.series;return t&&!s&&(s=t.config.series),a&&s.length!==e.yaxis.length&&s.length&&(e.yaxis=s.map(function(n,r){if(n.name||(s[r].name="series-".concat(r+1)),e.yaxis[r])return e.yaxis[r].seriesName=s[r].name,e.yaxis[r];var o=P.extend(i.yAxis,e.yaxis[0]);return o.show=!1,o})),a&&s.length>1&&s.length!==e.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes. Please make sure to equalize both."),e}},{key:"extendAnnotations",value:function(e){return void 0===e.annotations&&(e.annotations={},e.annotations.yaxis=[],e.annotations.xaxis=[],e.annotations.points=[]),e=this.extendYAxisAnnotations(e),e=this.extendXAxisAnnotations(e),this.extendPointAnnotations(e)}},{key:"extendYAxisAnnotations",value:function(e){var t=new le;return e.annotations.yaxis=P.extendArray(void 0!==e.annotations.yaxis?e.annotations.yaxis:[],t.yAxisAnnotation),e}},{key:"extendXAxisAnnotations",value:function(e){var t=new le;return e.annotations.xaxis=P.extendArray(void 0!==e.annotations.xaxis?e.annotations.xaxis:[],t.xAxisAnnotation),e}},{key:"extendPointAnnotations",value:function(e){var t=new le;return e.annotations.points=P.extendArray(void 0!==e.annotations.points?e.annotations.points:[],t.pointAnnotation),e}},{key:"checkForDarkTheme",value:function(e){e.theme&&"dark"===e.theme.mode&&(e.tooltip||(e.tooltip={}),"light"!==e.tooltip.theme&&(e.tooltip.theme="dark"),e.chart.foreColor||(e.chart.foreColor="#f6f7f8"),e.chart.background||(e.chart.background="#424242"),e.theme.palette||(e.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(e){var t=e;if(t.tooltip.shared&&t.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===t.chart.type&&t.plotOptions.bar.horizontal){if(t.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");t.yaxis[0].reversed&&(t.yaxis[0].opposite=!0),t.xaxis.tooltip.enabled=!1,t.yaxis[0].tooltip.enabled=!1,t.chart.zoom.enabled=!1}return"bar"!==t.chart.type&&"rangeBar"!==t.chart.type||t.tooltip.shared&&"barWidth"===t.xaxis.crosshairs.width&&t.series.length>1&&(t.xaxis.crosshairs.width="tickWidth"),"candlestick"!==t.chart.type&&"boxPlot"!==t.chart.type||t.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(t.chart.type," chart is not supported.")),t.yaxis[0].reversed=!1),Array.isArray(t.stroke.width)&&"line"!==t.chart.type&&"area"!==t.chart.type&&(console.warn("stroke.width option accepts array only for line and area charts. Reverted back to Number"),t.stroke.width=t.stroke.width[0]),t}}]),w}(),Ye=function(){function w(){C(this,w)}return Y(w,[{key:"initGlobalVars",value:function(e){e.series=[],e.seriesCandleO=[],e.seriesCandleH=[],e.seriesCandleM=[],e.seriesCandleL=[],e.seriesCandleC=[],e.seriesRangeStart=[],e.seriesRangeEnd=[],e.seriesRangeBar=[],e.seriesPercent=[],e.seriesGoals=[],e.seriesX=[],e.seriesZ=[],e.seriesNames=[],e.seriesTotals=[],e.seriesLog=[],e.seriesColors=[],e.stackedSeriesTotals=[],e.seriesXvalues=[],e.seriesYvalues=[],e.labels=[],e.categoryLabels=[],e.timescaleLabels=[],e.noLabelsProvided=!1,e.resizeTimer=null,e.selectionResizeTimer=null,e.delayedElements=[],e.pointsArray=[],e.dataLabelsRects=[],e.isXNumeric=!1,e.xaxisLabelsCount=0,e.skipLastTimelinelabel=!1,e.skipFirstTimelinelabel=!1,e.isDataXYZ=!1,e.isMultiLineX=!1,e.isMultipleYAxis=!1,e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE,e.minYArr=[],e.maxYArr=[],e.maxX=-Number.MAX_VALUE,e.minX=Number.MAX_VALUE,e.initialMaxX=-Number.MAX_VALUE,e.initialMinX=Number.MAX_VALUE,e.maxDate=0,e.minDate=Number.MAX_VALUE,e.minZ=Number.MAX_VALUE,e.maxZ=-Number.MAX_VALUE,e.minXDiff=Number.MAX_VALUE,e.yAxisScale=[],e.xAxisScale=null,e.xAxisTicksPositions=[],e.yLabelsCoords=[],e.yTitleCoords=[],e.barPadForNumericAxis=0,e.padHorizontal=0,e.xRange=0,e.yRange=[],e.zRange=0,e.dataPoints=0,e.xTickAmount=0}},{key:"globalVars",value:function(e){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:e.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],goldenPadding:35,invalidLogScale:!1,ignoreYAxisIndexes:[],yAxisSameScaleIndices:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"zoom"===e.chart.toolbar.autoSelected&&e.chart.toolbar.tools.zoom&&e.chart.zoom.enabled,panEnabled:"pan"===e.chart.toolbar.autoSelected&&e.chart.toolbar.tools.pan,selectionEnabled:"selection"===e.chart.toolbar.autoSelected&&e.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,easing:null,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null}}},{key:"init",value:function(e){var t=this.globalVars(e);return this.initGlobalVars(t),t.initialConfig=P.extend({},e),t.initialSeries=P.clone(e.series),t.lastXAxis=P.clone(t.initialConfig.xaxis),t.lastYAxis=P.clone(t.initialConfig.yaxis),t}}]),w}(),Oe=function(){function w(e){C(this,w),this.opts=e}return Y(w,[{key:"init",value:function(){var e=new xe(this.opts).init({responsiveOverride:!1});return{config:e,globals:(new Ye).init(e)}}}]),w}(),De=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new _(this.ctx)}return Y(w,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var e=this.w.config.series.slice(),t=new K(this.ctx);if(this.activeSeriesIndex=t.getActiveConfigSeriesIndex(),void 0!==e[this.activeSeriesIndex].data&&e[this.activeSeriesIndex].data.length>0&&null!==e[this.activeSeriesIndex].data[0]&&void 0!==e[this.activeSeriesIndex].data[0].x&&null!==e[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var e=this.w.config.series.slice(),t=new K(this.ctx);if(this.activeSeriesIndex=t.getActiveConfigSeriesIndex(),void 0!==e[this.activeSeriesIndex].data&&e[this.activeSeriesIndex].data.length>0&&null!=e[this.activeSeriesIndex].data[0]&&e[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(e,t){for(var i=this.w.config,a=this.w.globals,s="boxPlot"===i.chart.type||"boxPlot"===i.series[t].type,n=0;n<e[t].data.length;n++)if(void 0!==e[t].data[n][1]&&(Array.isArray(e[t].data[n][1])&&4===e[t].data[n][1].length&&!s?this.twoDSeries.push(P.parseNumber(e[t].data[n][1][3])):this.twoDSeries.push(P.parseNumber(e[t].data[n].length>=5?e[t].data[n][4]:e[t].data[n][1])),a.dataFormatXNumeric=!0),"datetime"===i.xaxis.type){var r=new Date(e[t].data[n][0]);r=new Date(r).getTime(),this.twoDSeriesX.push(r)}else this.twoDSeriesX.push(e[t].data[n][0]);for(var o=0;o<e[t].data.length;o++)void 0!==e[t].data[o][2]&&(this.threeDSeries.push(e[t].data[o][2]),a.isDataXYZ=!0)}},{key:"handleFormatXY",value:function(e,t){var i=this.w.config,a=this.w.globals,s=new U(this.ctx),n=t;a.collapsedSeriesIndices.indexOf(t)>-1&&(n=this.activeSeriesIndex);for(var r=0;r<e[t].data.length;r++)void 0!==e[t].data[r].y&&(Array.isArray(e[t].data[r].y)?this.twoDSeries.push(P.parseNumber(e[t].data[r].y[e[t].data[r].y.length-1])):this.twoDSeries.push(P.parseNumber(e[t].data[r].y))),void 0!==e[t].data[r].goals&&Array.isArray(e[t].data[r].goals)?(void 0===this.seriesGoals[t]&&(this.seriesGoals[t]=[]),this.seriesGoals[t].push(e[t].data[r].goals)):(void 0===this.seriesGoals[t]&&(this.seriesGoals[t]=[]),this.seriesGoals[t].push(null));for(var o=0;o<e[n].data.length;o++){var h="string"==typeof e[n].data[o].x,c=Array.isArray(e[n].data[o].x),d=!c&&!!s.isValidDate(e[n].data[o].x.toString());h||d?h||i.xaxis.convertedCatToNumeric?"datetime"!==i.xaxis.type||a.isBarHorizontal&&a.isRangeData?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e[n].data[o].x)):this.twoDSeriesX.push(s.parseDate(e[n].data[o].x)):"datetime"===i.xaxis.type?this.twoDSeriesX.push(s.parseDate(e[n].data[o].x.toString())):(a.dataFormatXNumeric=!0,a.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(e[n].data[o].x))):c?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e[n].data[o].x)):(a.isXNumeric=!0,a.dataFormatXNumeric=!0,this.twoDSeriesX.push(e[n].data[o].x))}if(e[t].data[0]&&void 0!==e[t].data[0].z){for(var p=0;p<e[t].data.length;p++)this.threeDSeries.push(e[t].data[p].z);a.isDataXYZ=!0}}},{key:"handleRangeData",value:function(e,t){var i=this.w.globals,a={};return this.isFormat2DArray()?a=this.handleRangeDataFormat("array",e,t):this.isFormatXY()&&(a=this.handleRangeDataFormat("xy",e,t)),i.seriesRangeStart.push(a.start),i.seriesRangeEnd.push(a.end),i.seriesRangeBar.push(a.rangeUniques),i.seriesRangeBar.forEach(function(s,n){s&&s.forEach(function(r,o){r.y.forEach(function(h,c){for(var d=0;d<r.y.length;d++)c!==d&&h.y1<=r.y[d].y2&&r.y[d].y1<=h.y2&&(r.overlaps.indexOf(h.rangeName)<0&&r.overlaps.push(h.rangeName),r.overlaps.indexOf(r.y[d].rangeName)<0&&r.overlaps.push(r.y[d].rangeName))})})}),a}},{key:"handleCandleStickBoxData",value:function(e,t){var i=this.w.globals,a={};return this.isFormat2DArray()?a=this.handleCandleStickBoxDataFormat("array",e,t):this.isFormatXY()&&(a=this.handleCandleStickBoxDataFormat("xy",e,t)),i.seriesCandleO[t]=a.o,i.seriesCandleH[t]=a.h,i.seriesCandleM[t]=a.m,i.seriesCandleL[t]=a.l,i.seriesCandleC[t]=a.c,a}},{key:"handleRangeDataFormat",value:function(e,t,i){var a=[],s=[],n=t[i].data.filter(function(u,p,x){return p===x.findIndex(function(f){return f.x===u.x})}).map(function(u,p){return{x:u.x,overlaps:[],y:[]}}),r="Please provide [Start, End] values in valid format. Read more https://apexcharts.com/docs/series/#rangecharts",o=new K(this.ctx).getActiveConfigSeriesIndex();if("array"===e){if(2!==t[o].data[0][1].length)throw new Error(r);for(var h=0;h<t[i].data.length;h++)a.push(t[i].data[h][1][0]),s.push(t[i].data[h][1][1])}else if("xy"===e){if(2!==t[o].data[0].y.length)throw new Error(r);for(var c=function(u){var p=P.randomId(),x=t[i].data[u].x,f={y1:t[i].data[u].y[0],y2:t[i].data[u].y[1],rangeName:p};t[i].data[u].rangeName=p;var b=n.findIndex(function(y){return y.x===x});n[b].y.push(f),a.push(f.y1),s.push(f.y2)},d=0;d<t[i].data.length;d++)c(d)}return{start:a,end:s,rangeUniques:n}}},{key:"handleCandleStickBoxDataFormat",value:function(e,t,i){var a=this.w,s="boxPlot"===a.config.chart.type||"boxPlot"===a.config.series[i].type,n=[],r=[],o=[],h=[],c=[];if("array"===e)if(s&&6===t[i].data[0].length||!s&&5===t[i].data[0].length)for(var d=0;d<t[i].data.length;d++)n.push(t[i].data[d][1]),r.push(t[i].data[d][2]),s?(o.push(t[i].data[d][3]),h.push(t[i].data[d][4]),c.push(t[i].data[d][5])):(h.push(t[i].data[d][3]),c.push(t[i].data[d][4]));else for(var u=0;u<t[i].data.length;u++)Array.isArray(t[i].data[u][1])&&(n.push(t[i].data[u][1][0]),r.push(t[i].data[u][1][1]),s?(o.push(t[i].data[u][1][2]),h.push(t[i].data[u][1][3]),c.push(t[i].data[u][1][4])):(h.push(t[i].data[u][1][2]),c.push(t[i].data[u][1][3])));else if("xy"===e)for(var p=0;p<t[i].data.length;p++)Array.isArray(t[i].data[p].y)&&(n.push(t[i].data[p].y[0]),r.push(t[i].data[p].y[1]),s?(o.push(t[i].data[p].y[2]),h.push(t[i].data[p].y[3]),c.push(t[i].data[p].y[4])):(h.push(t[i].data[p].y[2]),c.push(t[i].data[p].y[3])));return{o:n,h:r,m:o,l:h,c}}},{key:"parseDataAxisCharts",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.ctx,a=this.w.config,s=this.w.globals,n=new U(i),r=a.labels.length>0?a.labels.slice():a.xaxis.categories.slice();s.isRangeBar="rangeBar"===a.chart.type&&s.isBarHorizontal;for(var o=function(){for(var d=0;d<r.length;d++)if("string"==typeof r[d]){if(!n.isValidDate(r[d]))throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");t.twoDSeriesX.push(n.parseDate(r[d]))}else t.twoDSeriesX.push(r[d])},h=0;h<e.length;h++){if(this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],void 0===e[h].data)return void console.error("It is a possibility that you may have not included 'data' property in series.");if("rangeBar"!==a.chart.type&&"rangeArea"!==a.chart.type&&"rangeBar"!==e[h].type&&"rangeArea"!==e[h].type||(s.isRangeData=!0,this.handleRangeData(e,h)),this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(e,h):this.isFormatXY()&&this.handleFormatXY(e,h),"candlestick"!==a.chart.type&&"candlestick"!==e[h].type&&"boxPlot"!==a.chart.type&&"boxPlot"!==e[h].type||this.handleCandleStickBoxData(e,h),s.series.push(this.twoDSeries),s.labels.push(this.twoDSeriesX),s.seriesX.push(this.twoDSeriesX),s.seriesGoals=this.seriesGoals,h!==this.activeSeriesIndex||this.fallbackToCategory||(s.isXNumeric=!0);else{"datetime"===a.xaxis.type?(s.isXNumeric=!0,o(),s.seriesX.push(this.twoDSeriesX)):"numeric"===a.xaxis.type&&(s.isXNumeric=!0,r.length>0&&(this.twoDSeriesX=r,s.seriesX.push(this.twoDSeriesX))),s.labels.push(this.twoDSeriesX);var c=e[h].data.map(function(d){return P.parseNumber(d)});s.series.push(c)}s.seriesZ.push(this.threeDSeries),s.seriesNames.push(void 0!==e[h].name?e[h].name:"series-"+parseInt(h+1,10)),s.seriesColors.push(void 0!==e[h].color?e[h].color:void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(e){var t=this.w.globals,i=this.w.config;t.series=e.slice(),t.seriesNames=i.labels.slice();for(var a=0;a<t.series.length;a++)void 0===t.seriesNames[a]&&t.seriesNames.push("series-"+(a+1));return this.w}},{key:"handleExternalLabelsData",value:function(e){var t=this.w.config,i=this.w.globals;t.xaxis.categories.length>0?i.labels=t.xaxis.categories:t.labels.length>0?i.labels=t.labels.slice():this.fallbackToCategory?(i.labels=i.labels[0],i.seriesRangeBar.length&&(i.seriesRangeBar.map(function(a){a.forEach(function(s){i.labels.indexOf(s.x)<0&&s.x&&i.labels.push(s.x)})}),i.labels=i.labels.filter(function(a,s,n){return n.indexOf(a)===s})),t.xaxis.convertedCatToNumeric&&(new ke(t).convertCatToNumericXaxis(t,this.ctx,i.seriesX[0]),this._generateExternalLabels(e))):this._generateExternalLabels(e)}},{key:"_generateExternalLabels",value:function(e){var t=this.w.globals,i=this.w.config,a=[];if(t.axisCharts){if(t.series.length>0)for(var s=0;s<t.series[t.maxValsInArrayIndex].length;s++)a.push(s+1);t.seriesX=[];for(var n=0;n<e.length;n++)t.seriesX.push(a);t.isXNumeric=!0}if(0===a.length){a=t.axisCharts?[]:t.series.map(function(o,h){return h+1});for(var r=0;r<e.length;r++)t.seriesX.push(a)}t.labels=a,i.xaxis.convertedCatToNumeric&&(t.categoryLabels=a.map(function(o){return i.xaxis.labels.formatter(o)})),t.noLabelsProvided=!0}},{key:"parseData",value:function(e){var t=this.w,i=t.config,a=t.globals;if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.ctx.core.resetGlobals(),this.ctx.core.isMultipleY(),a.axisCharts?this.parseDataAxisCharts(e):this.parseDataNonAxisCharts(e),this.coreUtils.getLargestSeries(),"bar"===i.chart.type&&i.chart.stacked){var s=new K(this.ctx);a.series=s.setNullSeriesToZeroValues(a.series)}this.coreUtils.getSeriesTotals(),a.axisCharts&&this.coreUtils.getStackedSeriesTotals(),this.coreUtils.getPercentSeries(),a.dataFormatXNumeric||a.isXNumeric&&("numeric"!==i.xaxis.type||0!==i.labels.length||0!==i.xaxis.categories.length)||this.handleExternalLabelsData(e);for(var n=this.coreUtils.getCategoryLabels(a.labels),r=0;r<n.length;r++)if(Array.isArray(n[r])){a.isMultiLineX=!0;break}}},{key:"excludeCollapsedSeriesInYAxis",value:function(){var e=this,t=this.w;t.globals.ignoreYAxisIndexes=t.globals.collapsedSeries.map(function(i,a){if(e.w.globals.isMultipleYAxis&&!t.config.chart.stacked)return i.index})}}]),w}(),Ae=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return Y(w,[{key:"xLabelFormat",value:function(e,t,i,a){var s=this.w;if("datetime"===s.config.xaxis.type&&void 0===s.config.xaxis.labels.formatter&&void 0===s.config.tooltip.x.formatter){var n=new U(this.ctx);return n.formatDate(n.getDate(t),s.config.tooltip.x.format)}return e(t,i,a)}},{key:"defaultGeneralFormatter",value:function(e){return Array.isArray(e)?e.map(function(t){return t}):e}},{key:"defaultYFormatter",value:function(e,t,i){var a=this.w;return P.isNumber(e)&&(e=e.toFixed(0!==a.globals.yValueDecimal?void 0!==t.decimalsInFloat?t.decimalsInFloat:a.globals.yValueDecimal:a.globals.maxYArr[i]-a.globals.minYArr[i]<5?1:0)),e}},{key:"setLabelFormatters",value:function(){var e=this,t=this.w;return t.globals.xaxisTooltipFormatter=function(i){return e.defaultGeneralFormatter(i)},t.globals.ttKeyFormatter=function(i){return e.defaultGeneralFormatter(i)},t.globals.ttZFormatter=function(i){return i},t.globals.legendFormatter=function(i){return e.defaultGeneralFormatter(i)},t.globals.xLabelFormatter=void 0!==t.config.xaxis.labels.formatter?t.config.xaxis.labels.formatter:function(i){if(P.isNumber(i)){if(!t.config.xaxis.convertedCatToNumeric&&"numeric"===t.config.xaxis.type){if(P.isNumber(t.config.xaxis.decimalsInFloat))return i.toFixed(t.config.xaxis.decimalsInFloat);var a=t.globals.maxX-t.globals.minX;return i.toFixed(a>0&&a<100?1:0)}return i.toFixed(t.globals.isBarHorizontal&&t.globals.maxY-t.globals.minYArr<4?1:0)}return i},t.globals.ttKeyFormatter="function"==typeof t.config.tooltip.x.formatter?t.config.tooltip.x.formatter:t.globals.xLabelFormatter,"function"==typeof t.config.xaxis.tooltip.formatter&&(t.globals.xaxisTooltipFormatter=t.config.xaxis.tooltip.formatter),(Array.isArray(t.config.tooltip.y)||void 0!==t.config.tooltip.y.formatter)&&(t.globals.ttVal=t.config.tooltip.y),void 0!==t.config.tooltip.z.formatter&&(t.globals.ttZFormatter=t.config.tooltip.z.formatter),void 0!==t.config.legend.formatter&&(t.globals.legendFormatter=t.config.legend.formatter),t.config.yaxis.forEach(function(i,a){t.globals.yLabelFormatters[a]=void 0!==i.labels.formatter?i.labels.formatter:function(s){return t.globals.xyCharts?Array.isArray(s)?s.map(function(n){return e.defaultYFormatter(n,i,a)}):e.defaultYFormatter(s,i,a):s}}),t.globals}},{key:"heatmapLabelFormatters",value:function(){var e=this.w;if("heatmap"===e.config.chart.type){e.globals.yAxisScale[0].result=e.globals.seriesNames.slice();var t=e.globals.seriesNames.reduce(function(i,a){return i.length>a.length?i:a},0);e.globals.yAxisScale[0].niceMax=t,e.globals.yAxisScale[0].niceMin=t}}}]),w}(),ne=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w}return Y(w,[{key:"getLabel",value:function(e,t,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",r=this.w,o=void 0===e[a]?"":e[a],h=o,c=r.globals.xLabelFormatter,d=r.config.xaxis.labels.formatter,u=!1,p=new Ae(this.ctx),x=o;h=p.xLabelFormat(c,o,x,{i:a,dateFormatter:new U(this.ctx).formatDate,w:r}),void 0!==d&&(h=d(o,e[a],{i:a,dateFormatter:new U(this.ctx).formatDate,w:r}));var f=function(A){var l=null;return t.forEach(function(g){"month"===g.unit?l="year":"day"===g.unit?l="month":"hour"===g.unit?l="day":"minute"===g.unit&&(l="hour")}),l===A};t.length>0?(u=f(t[a].unit),i=t[a].position,h=t[a].value):"datetime"===r.config.xaxis.type&&void 0===d&&(h=""),void 0===h&&(h=""),h=Array.isArray(h)?h:h.toString();var b=new M(this.ctx),y={};y=r.globals.rotateXLabels?b.getTextRects(h,parseInt(n,10),null,"rotate(".concat(r.config.xaxis.labels.rotate," 0 0)"),!1):b.getTextRects(h,parseInt(n,10));var k=!r.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(h)&&(0===h.indexOf("NaN")||0===h.toLowerCase().indexOf("invalid")||h.toLowerCase().indexOf("infinity")>=0||s.indexOf(h)>=0&&k)&&(h=""),{x:i,text:h,textRect:y,isBold:u}}},{key:"checkLabelBasedOnTickamount",value:function(e,t,i){var a=this.w,s=a.config.xaxis.tickAmount;return"dataPoints"===s&&(s=Math.round(a.globals.gridWidth/120)),s>i||e%Math.round(i/(s+1))==0||(t.text=""),t}},{key:"checkForOverflowingLabels",value:function(e,t,i,a,s){var n=this.w;if(0===e&&n.globals.skipFirstTimelinelabel&&(t.text=""),e===i-1&&n.globals.skipLastTimelinelabel&&(t.text=""),n.config.xaxis.labels.hideOverlappingLabels&&a.length>0){var r=s[s.length-1];t.x<r.textRect.width/(n.globals.rotateXLabels?Math.abs(n.config.xaxis.labels.rotate)/12:1.01)+r.x&&(t.text="")}return t}},{key:"checkForReversedLabels",value:function(e,t){var i=this.w;return i.config.yaxis[e]&&i.config.yaxis[e].reversed&&t.reverse(),t}},{key:"isYAxisHidden",value:function(e){var t=this.w,i=new _(this.ctx);return!t.config.yaxis[e].show||!t.config.yaxis[e].showForNullSeries&&i.isSeriesNull(e)&&-1===t.globals.collapsedSeriesIndices.indexOf(e)}},{key:"getYAxisForeColor",value:function(e,t){var i=this.w;return Array.isArray(e)&&i.globals.yAxisScale[t]&&this.ctx.theme.pushExtraColors(e,i.globals.yAxisScale[t].result.length,!1),e}},{key:"drawYAxisTicks",value:function(e,t,i,a,s,n,r){var o=this.w,h=new M(this.ctx),c=o.globals.translateY;if(a.show&&t>0){!0===o.config.yaxis[s].opposite&&(e+=a.width);for(var d=t;d>=0;d--){var u=c+t/10+o.config.yaxis[s].labels.offsetY-1;o.globals.isBarHorizontal&&(u=n*d),"heatmap"===o.config.chart.type&&(u+=n/2);var p=h.drawLine(e+i.offsetX-a.width+a.offsetX,u+a.offsetY,e+i.offsetX+a.offsetX,u+a.offsetY,a.color);r.add(p),c+=n}}}}]),w}(),Pe=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w}return Y(w,[{key:"scaleSvgNode",value:function(e,t){var i=parseFloat(e.getAttributeNS(null,"width")),a=parseFloat(e.getAttributeNS(null,"height"));e.setAttributeNS(null,"width",i*t),e.setAttributeNS(null,"height",a*t),e.setAttributeNS(null,"viewBox","0 0 "+i+" "+a)}},{key:"fixSvgStringForIe11",value:function(e){if(!P.isIE11())return e.replace(/ /g," ");var t=0,i=e.replace(/xmlns="http:\/\/www.w3.org\/2000\/svg"/g,function(a){return 2==++t?'xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.dev"':a});return(i=i.replace(/xmlns:NS\d+=""/g,"")).replace(/NS\d+:(\w+:\w+=")/g,"$1")}},{key:"getSvgString",value:function(e){var t=this.w.globals.dom.Paper.svg();if(1!==e){var i=this.w.globals.dom.Paper.node.cloneNode(!0);this.scaleSvgNode(i,e),t=(new XMLSerializer).serializeToString(i)}return this.fixSvgStringForIe11(t)}},{key:"cleanup",value:function(){var e=this.w,t=e.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),i=e.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(a,function(s){s.setAttribute("width",0)}),t&&t[0]&&(t[0].setAttribute("x",-500),t[0].setAttribute("x1",-500),t[0].setAttribute("x2",-500)),i&&i[0]&&(i[0].setAttribute("y",-100),i[0].setAttribute("y1",-100),i[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){this.cleanup();var e=this.getSvgString(),t=new Blob([e],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(t)}},{key:"dataURI",value:function(e){var t=this;return new Promise(function(i){var a=t.w,s=e?e.scale||e.width/a.globals.svgWidth:1;t.cleanup();var n=document.createElement("canvas");n.width=a.globals.svgWidth*s,n.height=parseInt(a.globals.dom.elWrap.style.height,10)*s;var r="transparent"===a.config.chart.background?"#fff":a.config.chart.background,o=n.getContext("2d");o.fillStyle=r,o.fillRect(0,0,n.width*s,n.height*s);var h=t.getSvgString(s);if(window.canvg&&P.isIE11()){var c=window.canvg.Canvg.fromString(o,h,{ignoreClear:!0,ignoreDimensions:!0});c.start();var d=n.msToBlob();c.stop(),i({blob:d})}else{var u="data:image/svg+xml,"+encodeURIComponent(h),p=new Image;p.crossOrigin="anonymous",p.onload=function(){if(o.drawImage(p,0,0),n.msToBlob){var x=n.msToBlob();i({blob:x})}else{var f=n.toDataURL("image/png");i({imgURI:f})}},p.src=u}})}},{key:"exportToSVG",value:function(){this.triggerDownload(this.svgUrl(),this.w.config.chart.toolbar.export.svg.filename,".svg")}},{key:"exportToPng",value:function(){var e=this;this.dataURI().then(function(t){var i=t.imgURI,a=t.blob;a?navigator.msSaveOrOpenBlob(a,e.w.globals.chartID+".png"):e.triggerDownload(i,e.w.config.chart.toolbar.export.png.filename,".png")})}},{key:"exportToCSV",value:function(e){var t=this,i=e.series,a=e.columnDelimiter,s=e.lineDelimiter,n=void 0===s?"\n":s,r=this.w,o=[],h=[],c="",d=new De(this.ctx),u=new ne(this.ctx),p=function(x){var f="";if(r.globals.axisCharts){if("category"===r.config.xaxis.type||r.config.xaxis.convertedCatToNumeric)if(r.globals.isBarHorizontal){var b=r.globals.yLabelFormatters[0],y=new K(t.ctx).getActiveConfigSeriesIndex();f=b(r.globals.labels[x],{seriesIndex:y,dataPointIndex:x,w:r})}else f=u.getLabel(r.globals.labels,r.globals.timescaleLabels,0,x).text;"datetime"===r.config.xaxis.type&&(r.config.xaxis.categories.length?f=r.config.xaxis.categories[x]:r.config.labels.length&&(f=r.config.labels[x]))}else f=r.config.labels[x];return Array.isArray(f)&&(f=f.join(" ")),P.isNumber(f)?f:f.split(a).join("")};o.push(r.config.chart.toolbar.export.csv.headerCategory),i.map(function(x,f){var b=x.name?x.name:"series-".concat(f);r.globals.axisCharts&&o.push(b.split(a).join("")?b.split(a).join(""):"series-".concat(f))}),r.globals.axisCharts||(o.push(r.config.chart.toolbar.export.csv.headerValue),h.push(o.join(a))),i.map(function(x,f){r.globals.axisCharts?function(b,y){if(o.length&&0===y&&h.push(o.join(a)),b.data&&b.data.length)for(var k=0;k<b.data.length;k++){o=[];var A=p(k);if(A||(d.isFormatXY()?A=i[y].data[k].x:d.isFormat2DArray()&&(A=i[y].data[k]?i[y].data[k][0]:"")),0===y){o.push("datetime"===r.config.xaxis.type&&String(A).length>=10?r.config.chart.toolbar.export.csv.dateFormatter(A):P.isNumber(A)?A:A.split(a).join(""));for(var l=0;l<r.globals.series.length;l++)o.push(r.globals.series[l][k])}("candlestick"===r.config.chart.type||b.type&&"candlestick"===b.type)&&(o.pop(),o.push(r.globals.seriesCandleO[y][k]),o.push(r.globals.seriesCandleH[y][k]),o.push(r.globals.seriesCandleL[y][k]),o.push(r.globals.seriesCandleC[y][k])),("boxPlot"===r.config.chart.type||b.type&&"boxPlot"===b.type)&&(o.pop(),o.push(r.globals.seriesCandleO[y][k]),o.push(r.globals.seriesCandleH[y][k]),o.push(r.globals.seriesCandleM[y][k]),o.push(r.globals.seriesCandleL[y][k]),o.push(r.globals.seriesCandleC[y][k])),"rangeBar"===r.config.chart.type&&(o.pop(),o.push(r.globals.seriesRangeStart[y][k]),o.push(r.globals.seriesRangeEnd[y][k])),o.length&&h.push(o.join(a))}}(x,f):((o=[]).push(r.globals.labels[f].split(a).join("")),o.push(r.globals.series[f]),h.push(o.join(a)))}),c+=h.join(n),this.triggerDownload("data:text/csv; charset=utf-8,"+encodeURIComponent("\ufeff"+c),r.config.chart.toolbar.export.csv.filename,".csv")}},{key:"triggerDownload",value:function(e,t,i){var a=document.createElement("a");a.href=e,a.download=(t||this.w.globals.chartID)+i,document.body.appendChild(a),a.click(),document.body.removeChild(a)}}]),w}(),me=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w;var t=this.w;this.axesUtils=new ne(e),this.xaxisLabels=t.globals.labels.slice(),t.globals.timescaleLabels.length>0&&!t.globals.isBarHorizontal&&(this.xaxisLabels=t.globals.timescaleLabels.slice()),t.config.xaxis.overwriteCategories&&(this.xaxisLabels=t.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],this.offY="top"===t.config.xaxis.position?0:t.globals.gridHeight+1,this.offY=this.offY+t.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===t.config.chart.type&&t.config.plotOptions.bar.horizontal,this.xaxisFontSize=t.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=t.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=t.config.xaxis.labels.style.colors,this.xaxisBorderWidth=t.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=t.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth=this.xaxisBorderWidth.indexOf("%")>-1?t.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=t.config.xaxis.axisBorder.height,this.yaxis=t.config.yaxis[0]}return Y(w,[{key:"drawXaxis",value:function(){var e,t=this,i=this.w,a=new M(this.ctx),s=a.group({class:"apexcharts-xaxis",transform:"translate(".concat(i.config.xaxis.offsetX,", ").concat(i.config.xaxis.offsetY,")")}),n=a.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(i.globals.translateXAxisX,", ").concat(i.globals.translateXAxisY,")")});s.add(n);for(var r=i.globals.padHorizontal,o=[],h=0;h<this.xaxisLabels.length;h++)o.push(this.xaxisLabels[h]);var c=o.length;r=i.globals.isXNumeric?r+(e=i.globals.gridWidth/(c>1?c-1:c))/2+i.config.xaxis.labels.offsetX:r+(e=i.globals.gridWidth/o.length)+i.config.xaxis.labels.offsetX;for(var u=function(k){var A=r-e/2+i.config.xaxis.labels.offsetX;0===k&&1===c&&e/2===r&&1===i.globals.dataPoints&&(A=i.globals.gridWidth/2);var l=t.axesUtils.getLabel(o,i.globals.timescaleLabels,A,k,t.drawnLabels,t.xaxisFontSize),g=28;if(i.globals.rotateXLabels&&(g=22),(l=void 0!==i.config.xaxis.tickAmount&&"dataPoints"!==i.config.xaxis.tickAmount&&"datetime"!==i.config.xaxis.type?t.axesUtils.checkLabelBasedOnTickamount(k,l,c):t.axesUtils.checkForOverflowingLabels(k,l,c,t.drawnLabels,t.drawnLabelsRects)).text&&i.globals.xaxisLabelsCount++,i.config.xaxis.labels.show){var m=a.drawText({x:l.x,y:t.offY+i.config.xaxis.labels.offsetY+g-("top"===i.config.xaxis.position?i.globals.xAxisHeight+i.config.xaxis.axisTicks.height-2:0),text:l.text,textAnchor:"middle",fontWeight:l.isBold?600:i.config.xaxis.labels.style.fontWeight,fontSize:t.xaxisFontSize,fontFamily:t.xaxisFontFamily,foreColor:Array.isArray(t.xaxisForeColors)?i.config.xaxis.convertedCatToNumeric?t.xaxisForeColors[i.globals.minX+k-1]:t.xaxisForeColors[k]:t.xaxisForeColors,isPlainText:!1,cssClass:"apexcharts-xaxis-label "+i.config.xaxis.labels.style.cssClass});n.add(m);var v=document.createElementNS(i.globals.SVGNS,"title");v.textContent=Array.isArray(l.text)?l.text.join(" "):l.text,m.node.appendChild(v),""!==l.text&&(t.drawnLabels.push(l.text),t.drawnLabelsRects.push(l))}r+=e},p=0;p<=c-1;p++)u(p);if(void 0!==i.config.xaxis.title.text){var x=a.group({class:"apexcharts-xaxis-title"}),f=a.drawText({x:i.globals.gridWidth/2+i.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+i.globals.xAxisLabelsHeight+i.config.xaxis.title.offsetY,text:i.config.xaxis.title.text,textAnchor:"middle",fontSize:i.config.xaxis.title.style.fontSize,fontFamily:i.config.xaxis.title.style.fontFamily,fontWeight:i.config.xaxis.title.style.fontWeight,foreColor:i.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+i.config.xaxis.title.style.cssClass});x.add(f),s.add(x)}if(i.config.xaxis.axisBorder.show){var b=i.globals.barPadForNumericAxis,y=a.drawLine(i.globals.padHorizontal+i.config.xaxis.axisBorder.offsetX-b,this.offY,this.xaxisBorderWidth+b,this.offY,i.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);s.add(y)}return s}},{key:"drawXaxisInversed",value:function(e){var t,i,a=this,s=this.w,n=new M(this.ctx),r=s.config.yaxis[0].opposite?s.globals.translateYAxisX[e]:0,o=n.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:e}),h=n.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+r+", 0)"});o.add(h);var c=[];if(s.config.yaxis[e].show)for(var d=0;d<this.xaxisLabels.length;d++)c.push(this.xaxisLabels[d]);i=-(t=s.globals.gridHeight/c.length)/2.2;var u=s.globals.yLabelFormatters[0],p=s.config.yaxis[0].labels;if(p.show)for(var x=function(g){var m=void 0===c[g]?"":c[g];m=u(m,{seriesIndex:e,dataPointIndex:g,w:s});var v=a.axesUtils.getYAxisForeColor(p.style.colors,e),S=0;Array.isArray(m)&&(S=m.length/2*parseInt(p.style.fontSize,10));var T=n.drawText({x:p.offsetX-15,y:i+t+p.offsetY-S,text:m,textAnchor:a.yaxis.opposite?"start":"end",foreColor:Array.isArray(v)?v[g]:v,fontSize:p.style.fontSize,fontFamily:p.style.fontFamily,fontWeight:p.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+p.style.cssClass});h.add(T);var L=document.createElementNS(s.globals.SVGNS,"title");if(L.textContent=Array.isArray(m)?m.join(" "):m,T.node.appendChild(L),0!==s.config.yaxis[e].labels.rotate){var z=n.rotateAroundCenter(T.node);T.node.setAttribute("transform","rotate(".concat(s.config.yaxis[e].labels.rotate," 0 ").concat(z.y,")"))}i+=t},f=0;f<=c.length-1;f++)x(f);if(void 0!==s.config.yaxis[0].title.text){var b=n.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+r+", 0)"}),y=n.drawText({x:0,y:s.globals.gridHeight/2,text:s.config.yaxis[0].title.text,textAnchor:"middle",foreColor:s.config.yaxis[0].title.style.color,fontSize:s.config.yaxis[0].title.style.fontSize,fontWeight:s.config.yaxis[0].title.style.fontWeight,fontFamily:s.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+s.config.yaxis[0].title.style.cssClass});b.add(y),o.add(b)}var k=0;this.isCategoryBarHorizontal&&s.config.yaxis[0].opposite&&(k=s.globals.gridWidth);var A=s.config.xaxis.axisBorder;if(A.show){var l=n.drawLine(s.globals.padHorizontal+A.offsetX+k,1+A.offsetY,s.globals.padHorizontal+A.offsetX+k,s.globals.gridHeight+A.offsetY,A.color,0);o.add(l)}return s.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(k,c.length,s.config.yaxis[0].axisBorder,s.config.yaxis[0].axisTicks,0,t,o),o}},{key:"drawXaxisTicks",value:function(e,t){var i=this.w,a=e;if(!(e<0||e-2>i.globals.gridWidth)){var s=this.offY+i.config.xaxis.axisTicks.offsetY,n=s+i.config.xaxis.axisTicks.height;if("top"===i.config.xaxis.position&&(n=s-i.config.xaxis.axisTicks.height),i.config.xaxis.axisTicks.show){var r=new M(this.ctx).drawLine(e+i.config.xaxis.axisTicks.offsetX,s+i.config.xaxis.offsetY,a+i.config.xaxis.axisTicks.offsetX,n+i.config.xaxis.offsetY,i.config.xaxis.axisTicks.color);t.add(r),r.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var e=this.w,t=[],i=this.xaxisLabels.length,a=e.globals.padHorizontal;if(e.globals.timescaleLabels.length>0)for(var s=0;s<i;s++)t.push(a=this.xaxisLabels[s].position);else for(var n=i,r=0;r<n;r++){var o=n;e.globals.isXNumeric&&"bar"!==e.config.chart.type&&(o-=1),t.push(a+=e.globals.gridWidth/o)}return t}},{key:"xAxisLabelCorrections",value:function(){var e=this.w,t=new M(this.ctx),i=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text"),s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(e.globals.rotateXLabels||e.config.xaxis.labels.rotateAlways)for(var r=0;r<a.length;r++){var o=t.rotateAroundCenter(a[r]);o.y=o.y-1,o.x=o.x+1,a[r].setAttribute("transform","rotate(".concat(e.config.xaxis.labels.rotate," ").concat(o.x," ").concat(o.y,")")),a[r].setAttribute("text-anchor","end"),i.setAttribute("transform","translate(0, ".concat(-10,")")),e.config.xaxis.labels.trim&&Array.prototype.forEach.call(a[r].childNodes,function(p){t.placeTextWithEllipsis(p,p.textContent,e.globals.xAxisLabelsHeight-("bottom"===e.config.legend.position?20:10))})}else!function(){for(var p=e.globals.gridWidth/(e.globals.labels.length+1),x=0;x<a.length;x++)e.config.xaxis.labels.trim&&"datetime"!==e.config.xaxis.type&&Array.prototype.forEach.call(a[x].childNodes,function(b){t.placeTextWithEllipsis(b,b.textContent,p)})}();if(s.length>0){var c=s[s.length-1].getBBox(),d=s[0].getBBox();c.x<-20&&s[s.length-1].parentNode.removeChild(s[s.length-1]),d.x+d.width>e.globals.gridWidth&&!e.globals.isBarHorizontal&&s[0].parentNode.removeChild(s[0]);for(var u=0;u<n.length;u++)t.placeTextWithEllipsis(n[u],n[u].textContent,e.config.yaxis[0].labels.maxWidth-2*parseFloat(e.config.yaxis[0].title.style.fontSize)-20)}}}]),w}(),be=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w;var t=this.w;this.xaxisLabels=t.globals.labels.slice(),this.axesUtils=new ne(e),this.isRangeBar=t.globals.seriesRangeBar.length,t.globals.timescaleLabels.length>0&&(this.xaxisLabels=t.globals.timescaleLabels.slice())}return Y(w,[{key:"drawGridArea",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.w,i=new M(this.ctx);null===e&&(e=i.group({class:"apexcharts-grid"}));var a=i.drawLine(t.globals.padHorizontal,1,t.globals.padHorizontal,t.globals.gridHeight,"transparent"),s=i.drawLine(t.globals.padHorizontal,t.globals.gridHeight,t.globals.gridWidth,t.globals.gridHeight,"transparent");return e.add(s),e.add(a),e}},{key:"drawGrid",value:function(){var e=null;return this.w.globals.axisCharts&&(e=this.renderGrid(),this.drawGridArea(e.el)),e}},{key:"createGridMask",value:function(){var e=this.w,t=e.globals,i=new M(this.ctx),a=Array.isArray(e.config.stroke.width)?0:e.config.stroke.width;if(Array.isArray(e.config.stroke.width)){var s=0;e.config.stroke.width.forEach(function(d){s=Math.max(s,d)}),a=s}t.dom.elGridRectMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elGridRectMask.setAttribute("id","gridRectMask".concat(t.cuid)),t.dom.elGridRectMarkerMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elGridRectMarkerMask.setAttribute("id","gridRectMarkerMask".concat(t.cuid)),t.dom.elForecastMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elForecastMask.setAttribute("id","forecastMask".concat(t.cuid)),t.dom.elNonForecastMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elNonForecastMask.setAttribute("id","nonForecastMask".concat(t.cuid));var n=e.config.chart.type,r=0,o=0;("bar"===n||"rangeBar"===n||"candlestick"===n||"boxPlot"===n||e.globals.comboBarCount>0)&&e.globals.isXNumeric&&!e.globals.isBarHorizontal&&(o=e.config.grid.padding.right,t.barPadForNumericAxis>(r=e.config.grid.padding.left)&&(r=t.barPadForNumericAxis,o=t.barPadForNumericAxis)),t.dom.elGridRect=i.drawRect(-a/2-r-2,-a/2,t.gridWidth+a+o+r+4,t.gridHeight+a,0,"#fff"),new _(this).getLargestMarkerSize();var h=e.globals.markers.largestSize+1;t.dom.elGridRectMarker=i.drawRect(2*-h,2*-h,t.gridWidth+4*h,t.gridHeight+4*h,0,"#fff"),t.dom.elGridRectMask.appendChild(t.dom.elGridRect.node),t.dom.elGridRectMarkerMask.appendChild(t.dom.elGridRectMarker.node);var c=t.dom.baseEl.querySelector("defs");c.appendChild(t.dom.elGridRectMask),c.appendChild(t.dom.elForecastMask),c.appendChild(t.dom.elNonForecastMask),c.appendChild(t.dom.elGridRectMarkerMask)}},{key:"_drawGridLines",value:function(e){var t=e.i,i=e.x1,h=this.w;0===t&&h.globals.skipFirstTimelinelabel||t===e.xCount-1&&h.globals.skipLastTimelinelabel&&!h.config.xaxis.labels.formatter||"radar"===h.config.chart.type||(h.config.grid.xaxis.lines.show&&this._drawGridLine({x1:i,y1:e.y1,x2:e.x2,y2:e.y2,parent:e.parent}),new me(this.ctx).drawXaxisTicks(i,this.elg))}},{key:"_drawGridLine",value:function(e){var t=e.x1,i=e.y1,a=e.x2,s=e.y2,n=e.parent,r=this.w,o=n.node.classList.contains("apexcharts-gridlines-horizontal"),h=r.config.grid.strokeDashArray,c=r.globals.barPadForNumericAxis,d=new M(this).drawLine(t-(o?c:0),i,a+(o?c:0),s,r.config.grid.borderColor,h);d.node.classList.add("apexcharts-gridline"),n.add(d)}},{key:"_drawGridBandRect",value:function(e){var t=e.c,i=e.x1,a=e.y1,s=e.x2,n=e.y2,r=e.type,o=this.w,h=new M(this.ctx),c=o.globals.barPadForNumericAxis;if("column"!==r||"datetime"!==o.config.xaxis.type){var u=h.drawRect(i-("row"===r?c:0),a,s+("row"===r?2*c:0),n,0,o.config.grid[r].colors[t],o.config.grid[r].opacity);this.elg.add(u),u.attr("clip-path","url(#gridRectMask".concat(o.globals.cuid,")")),u.node.classList.add("apexcharts-grid-".concat(r))}}},{key:"_drawXYLines",value:function(e){var t=this,i=e.xCount,a=e.tickAmount,s=this.w;if(s.config.grid.xaxis.lines.show||s.config.xaxis.axisTicks.show){var n,r=s.globals.padHorizontal,o=s.globals.gridHeight;s.globals.timescaleLabels.length?function(x){for(var f=x.xC,y=x.y1,A=x.y2,l=0;l<f;l++)t._drawGridLines({i:l,x1:t.xaxisLabels[l].position,y1:y,x2:t.xaxisLabels[l].position,y2:A,xCount:i,parent:t.elgridLinesV})}({xC:i,x1:r,y1:0,x2:n,y2:o}):(s.globals.isXNumeric&&(i=s.globals.xAxisScale.result.length),s.config.xaxis.convertedCatToNumeric&&(i=s.globals.xaxisLabelsCount),function(x){var f=x.xC,b=x.x1,y=x.y1,k=x.x2,A=x.y2;if(void 0!==s.config.xaxis.tickAmount&&"dataPoints"!==s.config.xaxis.tickAmount)s.globals.dom.baseEl.querySelectorAll(".apexcharts-text.apexcharts-xaxis-label tspan:not(:empty)").forEach(function(g,m){var v=g.getBBox();t._drawGridLines({i:m,x1:v.x+v.width/2,y1:y,x2:v.x+v.width/2,y2:A,xCount:i,parent:t.elgridLinesV})});else for(var l=0;l<f+(s.globals.isXNumeric?0:1);l++)0===l&&1===f&&1===s.globals.dataPoints&&(k=b=s.globals.gridWidth/2),t._drawGridLines({i:l,x1:b,y1:y,x2:k,y2:A,xCount:i,parent:t.elgridLinesV}),k=b+=s.globals.gridWidth/(s.globals.isXNumeric?f-1:f)}({xC:i,x1:r,y1:0,x2:n,y2:o}))}if(s.config.grid.yaxis.lines.show){var h=0,c=0,d=s.globals.gridWidth,u=a+1;this.isRangeBar&&(u=s.globals.labels.length);for(var p=0;p<u+(this.isRangeBar?1:0);p++)this._drawGridLine({x1:0,y1:h,x2:d,y2:c,parent:this.elgridLinesH}),c=h+=s.globals.gridHeight/(this.isRangeBar?u:a)}}},{key:"_drawInvertedXYLines",value:function(e){var t=e.xCount,i=this.w;if(i.config.grid.xaxis.lines.show||i.config.xaxis.axisTicks.show)for(var a,s=i.globals.padHorizontal,n=i.globals.gridHeight,r=0;r<t+1;r++)i.config.grid.xaxis.lines.show&&this._drawGridLine({x1:s,y1:0,x2:a,y2:n,parent:this.elgridLinesV}),new me(this.ctx).drawXaxisTicks(s,this.elg),a=s=s+i.globals.gridWidth/t+.3;if(i.config.grid.yaxis.lines.show)for(var o=0,h=0,c=i.globals.gridWidth,d=0;d<i.globals.dataPoints+1;d++)this._drawGridLine({x1:0,y1:o,x2:c,y2:h,parent:this.elgridLinesH}),h=o+=i.globals.gridHeight/i.globals.dataPoints}},{key:"renderGrid",value:function(){var e=this.w,t=new M(this.ctx);this.elg=t.group({class:"apexcharts-grid"}),this.elgridLinesH=t.group({class:"apexcharts-gridlines-horizontal"}),this.elgridLinesV=t.group({class:"apexcharts-gridlines-vertical"}),this.elg.add(this.elgridLinesH),this.elg.add(this.elgridLinesV),e.config.grid.show||(this.elgridLinesV.hide(),this.elgridLinesH.hide());for(var i,a=e.globals.yAxisScale.length?e.globals.yAxisScale[0].result.length-1:5,s=0;s<e.globals.series.length&&(void 0!==e.globals.yAxisScale[s]&&(a=e.globals.yAxisScale[s].result.length-1),!(a>2));s++);return!e.globals.isBarHorizontal||this.isRangeBar?(i=this.xaxisLabels.length,this.isRangeBar&&(a=e.globals.labels.length,e.config.xaxis.tickAmount&&e.config.xaxis.labels.formatter&&(i=e.config.xaxis.tickAmount)),this._drawXYLines({xCount:i,tickAmount:a})):this._drawInvertedXYLines({xCount:i=a,tickAmount:a=e.globals.xTickAmount}),this.drawGridBands(i,a),{el:this.elg,xAxisTickWidth:e.globals.gridWidth/i}}},{key:"drawGridBands",value:function(e,t){var i=this.w;if(void 0!==i.config.grid.row.colors&&i.config.grid.row.colors.length>0)for(var a=0,s=i.globals.gridHeight/t,n=i.globals.gridWidth,r=0,o=0;r<t;r++,o++)o>=i.config.grid.row.colors.length&&(o=0),this._drawGridBandRect({c:o,x1:0,y1:a,x2:n,y2:s,type:"row"}),a+=i.globals.gridHeight/t;if(void 0!==i.config.grid.column.colors&&i.config.grid.column.colors.length>0)for(var h=i.globals.isBarHorizontal||"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric?e:e-1,c=i.globals.padHorizontal,d=i.globals.padHorizontal+i.globals.gridWidth/h,u=i.globals.gridHeight,p=0,x=0;p<e;p++,x++)x>=i.config.grid.column.colors.length&&(x=0),this._drawGridBandRect({c:x,x1:c,y1:0,x2:d,y2:u,type:"column"}),c+=i.globals.gridWidth/h}}]),w}(),he=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w}return Y(w,[{key:"niceScale",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4?arguments[4]:void 0,n=this.w,r=Math.abs(t-e);if("dataPoints"===(i=this._adjustTicksForSmallRange(i,a,r))&&(i=n.globals.dataPoints-1),e===Number.MIN_VALUE&&0===t||!P.isNumber(e)&&!P.isNumber(t)||e===Number.MIN_VALUE&&t===-Number.MAX_VALUE){var o=this.linearScale(e=0,t=i,i);return o}e>t?(console.warn("axis.min cannot be greater than axis.max"),t=e+.1):e===t&&(e=0===e?0:e-.5,t=0===t?2:t+.5);var h=[];r<1&&s&&("candlestick"===n.config.chart.type||"candlestick"===n.config.series[a].type||"boxPlot"===n.config.chart.type||"boxPlot"===n.config.series[a].type||n.globals.isRangeData)&&(t*=1.01);var c=i+1;c<2?c=2:c>2&&(c-=2);var d=r/c,u=Math.floor(P.log10(d)),p=Math.pow(10,u),x=Math.round(d/p);x<1&&(x=1);var f=x*p,b=f*Math.floor(e/f),y=f*Math.ceil(t/f),k=b;if(s&&r>2){for(;h.push(k),!((k+=f)>y););return{result:h,niceMin:h[0],niceMax:h[h.length-1]}}var A=e;(h=[]).push(A);for(var l=Math.abs(t-e)/i,g=0;g<=i;g++)h.push(A+=l);return h[h.length-2]>=t&&h.pop(),{result:h,niceMin:h[0],niceMax:h[h.length-1]}}},{key:"linearScale",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=arguments.length>3?arguments[3]:void 0,s=Math.abs(t-e);"dataPoints"===(i=this._adjustTicksForSmallRange(i,a,s))&&(i=this.w.globals.dataPoints-1);var n=s/i;i===Number.MAX_VALUE&&(i=10,n=1);for(var r=[],o=e;i>=0;)r.push(o),o+=n,i-=1;return{result:r,niceMin:r[0],niceMax:r[r.length-1]}}},{key:"logarithmicScale",value:function(e,t,i){for(var a=[],s=Math.ceil(Math.log(t)/Math.log(i))+1,n=0;n<s;n++)a.push(Math.pow(i,n));return 0===e&&a.unshift(e),{result:a,niceMin:a[0],niceMax:a[a.length-1]}}},{key:"_adjustTicksForSmallRange",value:function(e,t,i){var a=e;if(void 0!==t&&this.w.config.yaxis[t].labels.formatter&&void 0===this.w.config.yaxis[t].tickAmount){var s=this.w.config.yaxis[t].labels.formatter(1);P.isNumber(Number(s))&&!P.isFloat(s)&&(a=Math.ceil(i))}return a<e?a:e}},{key:"setYScaleForIndex",value:function(e,t,i){var a=this.w.globals,s=this.w.config,n=a.isBarHorizontal?s.xaxis:s.yaxis[e];void 0===a.yAxisScale[e]&&(a.yAxisScale[e]=[]);var r=Math.abs(i-t);n.logarithmic&&r<=5&&(a.invalidLogScale=!0),n.logarithmic&&r>5?(a.allSeriesCollapsed=!1,a.yAxisScale[e]=this.logarithmicScale(t,i,n.logBase)):i!==-Number.MAX_VALUE&&P.isNumber(i)?(a.allSeriesCollapsed=!1,a.yAxisScale[e]=void 0===n.min&&void 0===n.max||n.forceNiceScale?this.niceScale(t,i,n.tickAmount?n.tickAmount:r<5&&r>1?r+1:5,e,void 0===s.yaxis[e].max&&void 0===s.yaxis[e].min||s.yaxis[e].forceNiceScale):this.linearScale(t,i,n.tickAmount,e)):a.yAxisScale[e]=this.linearScale(0,5,5)}},{key:"setXScale",value:function(e,t){var i=this.w,a=i.globals,s=i.config.xaxis,n=Math.abs(t-e);return a.xAxisScale=t!==-Number.MAX_VALUE&&P.isNumber(t)?this.linearScale(e,t,s.tickAmount?s.tickAmount:n<5&&n>1?n+1:5,0):this.linearScale(0,5,5),a.xAxisScale}},{key:"setMultipleYScales",value:function(){var e=this,t=this.w.globals,i=this.w.config,a=t.minYArr.concat([]),s=t.maxYArr.concat([]),n=[];i.yaxis.forEach(function(r,o){var h=o;i.series.forEach(function(u,p){u.name===r.seriesName&&(h=p,n.push(o!==p?{index:p,similarIndex:o,alreadyExists:!0}:{index:p}))}),e.setYScaleForIndex(o,a[h],s[h])}),this.sameScaleInMultipleAxes(a,s,n)}},{key:"sameScaleInMultipleAxes",value:function(e,t,i){var a=this,s=this.w.config,n=this.w.globals,r=[];i.forEach(function(f){f.alreadyExists&&(void 0===r[f.index]&&(r[f.index]=[]),r[f.index].push(f.index),r[f.index].push(f.similarIndex))}),n.yAxisSameScaleIndices=r,r.forEach(function(f,b){r.forEach(function(y,k){var A,l;b!==k&&(A=f,l=y,A.filter(function(g){return-1!==l.indexOf(g)})).length>0&&(r[b]=r[b].concat(r[k]))})});var o=r.map(function(f){return f.filter(function(b,y){return f.indexOf(b)===y})}).map(function(f){return f.sort()});r=r.filter(function(f){return!!f});var h=o.slice(),c=h.map(function(f){return JSON.stringify(f)});h=h.filter(function(f,b){return c.indexOf(JSON.stringify(f))===b});var d=[],u=[];e.forEach(function(f,b){h.forEach(function(y,k){y.indexOf(b)>-1&&(void 0===d[k]&&(d[k]=[],u[k]=[]),d[k].push({key:b,value:f}),u[k].push({key:b,value:t[b]}))})});var p=Array.apply(null,Array(h.length)).map(Number.prototype.valueOf,Number.MIN_VALUE),x=Array.apply(null,Array(h.length)).map(Number.prototype.valueOf,-Number.MAX_VALUE);d.forEach(function(f,b){f.forEach(function(y,k){p[b]=Math.min(y.value,p[b])})}),u.forEach(function(f,b){f.forEach(function(y,k){x[b]=Math.max(y.value,x[b])})}),e.forEach(function(f,b){u.forEach(function(y,k){var A=p[k],l=x[k];s.chart.stacked&&(l=0,y.forEach(function(g,m){g.value!==-Number.MAX_VALUE&&(l+=g.value),A!==Number.MIN_VALUE&&(A+=d[k][m].value)})),y.forEach(function(g,m){y[m].key===b&&(void 0!==s.yaxis[b].min&&(A="function"==typeof s.yaxis[b].min?s.yaxis[b].min(n.minY):s.yaxis[b].min),void 0!==s.yaxis[b].max&&(l="function"==typeof s.yaxis[b].max?s.yaxis[b].max(n.maxY):s.yaxis[b].max),a.setYScaleForIndex(b,A,l))})})})}},{key:"autoScaleY",value:function(e,t,i){e||(e=this);var a=e.w;if(a.globals.isMultipleYAxis||a.globals.collapsedSeries.length)return console.warn("autoScaleYaxis is not supported in a multi-yaxis chart."),t;var s=a.globals.seriesX[0],n=a.config.chart.stacked;return t.forEach(function(r,o){for(var h=0,c=0;c<s.length;c++)if(s[c]>=i.xaxis.min){h=c;break}var d,u,p=a.globals.minYArr[o],x=a.globals.maxYArr[o],f=a.globals.stackedSeriesTotals;a.globals.series.forEach(function(b,y){var k=b[h];n?(d=u=k=f[h],f.forEach(function(A,l){s[l]<=i.xaxis.max&&s[l]>=i.xaxis.min&&(A>u&&null!==A&&(u=A),b[l]<d&&null!==b[l]&&(d=b[l]))})):(d=u=k,b.forEach(function(A,l){if(s[l]<=i.xaxis.max&&s[l]>=i.xaxis.min){var g=A,m=A;a.globals.series.forEach(function(v,S){null!==A&&(g=Math.min(v[l],g),m=Math.max(v[l],m))}),m>u&&null!==m&&(u=m),g<d&&null!==g&&(d=g)}})),void 0===d&&void 0===u&&(d=p,u=x),(u*=u<0?.9:1.1)<0&&u<x&&(u=x),(d*=d<0?1.1:.9)<0&&d>p&&(d=p),t.length>1?(t[y].min=void 0===r.min?d:r.min,t[y].max=void 0===r.max?u:r.max):(t[0].min=void 0===r.min?d:r.min,t[0].max=void 0===r.max?u:r.max)})}),t}}]),w}(),Te=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w,this.scales=new he(e)}return Y(w,[{key:"init",value:function(){this.setYRange(),this.setXRange(),this.setZRange()}},{key:"getMinYMaxY",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w.config,n=this.w.globals,r=-Number.MAX_VALUE,o=Number.MIN_VALUE;null===a&&(a=e+1);var h=n.series,c=h,d=h;"candlestick"===s.chart.type?(c=n.seriesCandleL,d=n.seriesCandleH):"boxPlot"===s.chart.type?(c=n.seriesCandleO,d=n.seriesCandleC):n.isRangeData&&(c=n.seriesRangeStart,d=n.seriesRangeEnd);for(var u=e;u<a;u++){n.dataPoints=Math.max(n.dataPoints,h[u].length);for(var p=0;p<n.series[u].length;p++){var x=h[u][p];null!==x&&P.isNumber(x)?(void 0!==d[u][p]&&(r=Math.max(r,d[u][p]),t=Math.min(t,d[u][p])),void 0!==c[u][p]&&(t=Math.min(t,c[u][p]),i=Math.max(i,c[u][p])),"candlestick"!==this.w.config.chart.type&&"boxPlot"!==this.w.config.chart.type||(void 0!==n.seriesCandleC[u][p]&&(r=Math.max(r,n.seriesCandleO[u][p]),r=Math.max(r,n.seriesCandleH[u][p]),r=Math.max(r,n.seriesCandleL[u][p]),r=Math.max(r,n.seriesCandleC[u][p]),"boxPlot"===this.w.config.chart.type&&(r=Math.max(r,n.seriesCandleM[u][p]))),!s.series[u].type||"candlestick"===s.series[u].type&&"boxPlot"===s.series[u].type||(r=Math.max(r,n.series[u][p]),t=Math.min(t,n.series[u][p])),i=r),n.seriesGoals[u]&&n.seriesGoals[u][p]&&Array.isArray(n.seriesGoals[u][p])&&n.seriesGoals[u][p].forEach(function(f){o!==Number.MIN_VALUE&&(o=Math.min(o,f.value),t=o),r=Math.max(r,f.value),i=r}),P.isFloat(x)&&(x=P.noExponents(x),n.yValueDecimal=Math.max(n.yValueDecimal,x.toString().split(".")[1].length)),o>c[u][p]&&c[u][p]<0&&(o=c[u][p])):n.hasNullValues=!0}}return"rangeBar"===s.chart.type&&n.seriesRangeStart.length&&n.isBarHorizontal&&(o=t),"bar"===s.chart.type&&(o<0&&r<0&&(r=0),o===Number.MIN_VALUE&&(o=0)),{minY:o,maxY:r,lowestY:t,highestY:i}}},{key:"setYRange",value:function(){var e=this.w.globals,t=this.w.config;e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE;var i=Number.MAX_VALUE;if(e.isMultipleYAxis)for(var a=0;a<e.series.length;a++){var s=this.getMinYMaxY(a,i,null,a+1);e.minYArr.push(s.minY),e.maxYArr.push(s.maxY),i=s.lowestY}var n=this.getMinYMaxY(0,i,null,e.series.length);if(e.minY=n.minY,e.maxY=n.maxY,i=n.lowestY,t.chart.stacked&&this._setStackedMinMax(),("line"===t.chart.type||"area"===t.chart.type||"candlestick"===t.chart.type||"boxPlot"===t.chart.type||"rangeBar"===t.chart.type&&!e.isBarHorizontal)&&e.minY===Number.MIN_VALUE&&i!==-Number.MAX_VALUE&&i!==e.maxY){var r=e.maxY-i;(i>=0&&i<=10||void 0!==t.yaxis[0].min||void 0!==t.yaxis[0].max)&&(r=0),e.minY=i-5*r/100,i>0&&e.minY<0&&(e.minY=0),e.maxY=e.maxY+5*r/100}return t.yaxis.forEach(function(o,h){void 0!==o.max&&("number"==typeof o.max?e.maxYArr[h]=o.max:"function"==typeof o.max&&(e.maxYArr[h]=o.max(e.isMultipleYAxis?e.maxYArr[h]:e.maxY)),e.maxY=e.maxYArr[h]),void 0!==o.min&&("number"==typeof o.min?e.minYArr[h]=o.min:"function"==typeof o.min&&(e.minYArr[h]=o.min(e.isMultipleYAxis?e.minYArr[h]===Number.MIN_VALUE?0:e.minYArr[h]:e.minY)),e.minY=e.minYArr[h])}),e.isBarHorizontal&&["min","max"].forEach(function(o){void 0!==t.xaxis[o]&&"number"==typeof t.xaxis[o]&&("min"===o?e.minY=t.xaxis[o]:e.maxY=t.xaxis[o])}),e.isMultipleYAxis?(this.scales.setMultipleYScales(),e.minY=i,e.yAxisScale.forEach(function(o,h){e.minYArr[h]=o.niceMin,e.maxYArr[h]=o.niceMax})):(this.scales.setYScaleForIndex(0,e.minY,e.maxY),e.minY=e.yAxisScale[0].niceMin,e.maxY=e.yAxisScale[0].niceMax,e.minYArr[0]=e.yAxisScale[0].niceMin,e.maxYArr[0]=e.yAxisScale[0].niceMax),{minY:e.minY,maxY:e.maxY,minYArr:e.minYArr,maxYArr:e.maxYArr,yAxisScale:e.yAxisScale}}},{key:"setXRange",value:function(){var e=this.w.globals,t=this.w.config,i="numeric"===t.xaxis.type||"datetime"===t.xaxis.type||"category"===t.xaxis.type&&!e.noLabelsProvided||e.noLabelsProvided||e.isXNumeric;if(e.isXNumeric&&function(){for(var r=0;r<e.series.length;r++)if(e.labels[r])for(var o=0;o<e.labels[r].length;o++)null!==e.labels[r][o]&&P.isNumber(e.labels[r][o])&&(e.maxX=Math.max(e.maxX,e.labels[r][o]),e.initialMaxX=Math.max(e.maxX,e.labels[r][o]),e.minX=Math.min(e.minX,e.labels[r][o]),e.initialMinX=Math.min(e.minX,e.labels[r][o]))}(),e.noLabelsProvided&&0===t.xaxis.categories.length&&(e.maxX=e.labels[e.labels.length-1],e.initialMaxX=e.labels[e.labels.length-1],e.minX=1,e.initialMinX=1),e.isXNumeric||e.noLabelsProvided||e.dataFormatXNumeric){var a;if(void 0===t.xaxis.tickAmount?(a=Math.round(e.svgWidth/150),"numeric"===t.xaxis.type&&e.dataPoints<30&&(a=e.dataPoints-1),a>e.dataPoints&&0!==e.dataPoints&&(a=e.dataPoints-1)):"dataPoints"===t.xaxis.tickAmount?(e.series.length>1&&(a=e.series[e.maxValsInArrayIndex].length-1),e.isXNumeric&&(a=e.maxX-e.minX-1)):a=t.xaxis.tickAmount,e.xTickAmount=a,void 0!==t.xaxis.max&&"number"==typeof t.xaxis.max&&(e.maxX=t.xaxis.max),void 0!==t.xaxis.min&&"number"==typeof t.xaxis.min&&(e.minX=t.xaxis.min),void 0!==t.xaxis.range&&(e.minX=e.maxX-t.xaxis.range),e.minX!==Number.MAX_VALUE&&e.maxX!==-Number.MAX_VALUE)if(t.xaxis.convertedCatToNumeric&&!e.dataFormatXNumeric){for(var s=[],n=e.minX-1;n<e.maxX;n++)s.push(n+1);e.xAxisScale={result:s,niceMin:s[0],niceMax:s[s.length-1]}}else e.xAxisScale=this.scales.setXScale(e.minX,e.maxX);else e.xAxisScale=this.scales.linearScale(1,a,a),e.noLabelsProvided&&e.labels.length>0&&(e.xAxisScale=this.scales.linearScale(1,e.labels.length,a-1),e.seriesX=e.labels.slice());i&&(e.labels=e.xAxisScale.result.slice())}return e.isBarHorizontal&&e.labels.length&&(e.xTickAmount=e.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:e.minX,maxX:e.maxX}}},{key:"setZRange",value:function(){var e=this.w.globals;if(e.isDataXYZ)for(var t=0;t<e.series.length;t++)if(void 0!==e.seriesZ[t])for(var i=0;i<e.seriesZ[t].length;i++)null!==e.seriesZ[t][i]&&P.isNumber(e.seriesZ[t][i])&&(e.maxZ=Math.max(e.maxZ,e.seriesZ[t][i]),e.minZ=Math.min(e.minZ,e.seriesZ[t][i]))}},{key:"_handleSingleDataPoint",value:function(){var e=this.w.globals,t=this.w.config;if(e.minX===e.maxX){var i=new U(this.ctx);if("datetime"===t.xaxis.type){var a=i.getDate(e.minX);t.xaxis.labels.datetimeUTC?a.setUTCDate(a.getUTCDate()-2):a.setDate(a.getDate()-2),e.minX=new Date(a).getTime();var s=i.getDate(e.maxX);t.xaxis.labels.datetimeUTC?s.setUTCDate(s.getUTCDate()+2):s.setDate(s.getDate()+2),e.maxX=new Date(s).getTime()}else("numeric"===t.xaxis.type||"category"===t.xaxis.type&&!e.noLabelsProvided)&&(e.minX=e.minX-2,e.initialMinX=e.minX,e.maxX=e.maxX+2,e.initialMaxX=e.maxX)}}},{key:"_getMinXDiff",value:function(){var e=this.w.globals;e.isXNumeric&&e.seriesX.forEach(function(t,i){1===t.length&&t.push(e.seriesX[e.maxValsInArrayIndex][e.seriesX[e.maxValsInArrayIndex].length-1]);var a=t.slice();a.sort(function(s,n){return s-n}),a.forEach(function(s,n){if(n>0){var r=s-a[n-1];r>0&&(e.minXDiff=Math.min(r,e.minXDiff))}}),1===e.dataPoints&&e.minXDiff===Number.MAX_VALUE&&(e.minXDiff=.5)})}},{key:"_setStackedMinMax",value:function(){var e=this.w.globals,t=[],i=[];if(e.series.length)for(var a=0;a<e.series[e.maxValsInArrayIndex].length;a++)for(var s=0,n=0,r=0;r<e.series.length;r++)null!==e.series[r][a]&&P.isNumber(e.series[r][a])&&(e.series[r][a]>0?s=s+parseFloat(e.series[r][a])+1e-4:n+=parseFloat(e.series[r][a])),r===e.series.length-1&&(t.push(s),i.push(n));for(var o=0;o<t.length;o++)e.maxY=Math.max(e.maxY,t[o]),e.minY=Math.min(e.minY,i[o])}}]),w}(),Ie=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w;var t=this.w;this.xaxisFontSize=t.config.xaxis.labels.style.fontSize,this.axisFontFamily=t.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=t.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal="bar"===t.config.chart.type&&t.config.plotOptions.bar.horizontal,this.xAxisoffX=0,"bottom"===t.config.xaxis.position&&(this.xAxisoffX=t.globals.gridHeight),this.drawnLabels=[],this.axesUtils=new ne(e)}return Y(w,[{key:"drawYaxis",value:function(e){var t=this,i=this.w,a=new M(this.ctx),s=i.config.yaxis[e].labels.style,n=s.fontSize,r=s.fontFamily,o=s.fontWeight,h=a.group({class:"apexcharts-yaxis",rel:e,transform:"translate("+i.globals.translateYAxisX[e]+", 0)"});if(this.axesUtils.isYAxisHidden(e))return h;var c=a.group({class:"apexcharts-yaxis-texts-g"});h.add(c);var d=i.globals.yAxisScale[e].result.length-1,u=i.globals.gridHeight/d,p=i.globals.translateY,x=i.globals.yLabelFormatters[e],f=i.globals.yAxisScale[e].result.slice();f=this.axesUtils.checkForReversedLabels(e,f);var b="";if(i.config.yaxis[e].labels.show)for(var y=function(T){var L=f[T];L=x(L,T,i);var z=i.config.yaxis[e].labels.padding;i.config.yaxis[e].opposite&&0!==i.config.yaxis.length&&(z*=-1);var E=t.axesUtils.getYAxisForeColor(s.colors,e),X=a.drawText({x:z,y:p+d/10+i.config.yaxis[e].labels.offsetY+1,text:L,textAnchor:i.config.yaxis[e].opposite?"start":"end",fontSize:n,fontFamily:r,fontWeight:o,foreColor:Array.isArray(E)?E[T]:E,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+s.cssClass});T===d&&(b=X),c.add(X);var D=document.createElementNS(i.globals.SVGNS,"title");if(D.textContent=Array.isArray(L)?L.join(" "):L,X.node.appendChild(D),0!==i.config.yaxis[e].labels.rotate){var W=a.rotateAroundCenter(b.node),O=a.rotateAroundCenter(X.node);X.node.setAttribute("transform","rotate(".concat(i.config.yaxis[e].labels.rotate," ").concat(W.x," ").concat(O.y,")"))}p+=u},k=d;k>=0;k--)y(k);if(void 0!==i.config.yaxis[e].title.text){var A=a.group({class:"apexcharts-yaxis-title"}),l=0;i.config.yaxis[e].opposite&&(l=i.globals.translateYAxisX[e]);var g=a.drawText({x:l,y:i.globals.gridHeight/2+i.globals.translateY+i.config.yaxis[e].title.offsetY,text:i.config.yaxis[e].title.text,textAnchor:"end",foreColor:i.config.yaxis[e].title.style.color,fontSize:i.config.yaxis[e].title.style.fontSize,fontWeight:i.config.yaxis[e].title.style.fontWeight,fontFamily:i.config.yaxis[e].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+i.config.yaxis[e].title.style.cssClass});A.add(g),h.add(A)}var m=i.config.yaxis[e].axisBorder,v=31+m.offsetX;if(i.config.yaxis[e].opposite&&(v=-31-m.offsetX),m.show){var S=a.drawLine(v,i.globals.translateY+m.offsetY-2,v,i.globals.gridHeight+i.globals.translateY+m.offsetY+2,m.color,0,m.width);h.add(S)}return i.config.yaxis[e].axisTicks.show&&this.axesUtils.drawYAxisTicks(v,d,m,i.config.yaxis[e].axisTicks,e,u,h),h}},{key:"drawYaxisInversed",value:function(e){var t=this.w,i=new M(this.ctx),a=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),s=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});a.add(s);var n=t.globals.yAxisScale[e].result.length-1,r=t.globals.gridWidth/n+.1,o=r+t.config.xaxis.labels.offsetX,h=t.globals.xLabelFormatter,c=t.globals.yAxisScale[e].result.slice(),d=t.globals.timescaleLabels;d.length>0&&(this.xaxisLabels=d.slice(),n=(c=d.slice()).length),c=this.axesUtils.checkForReversedLabels(e,c);var u=d.length;if(t.config.xaxis.labels.show)for(var p=u?0:n;u?p<u:p>=0;u?p++:p--){var x=c[p];x=h(x,p,t);var f=t.globals.gridWidth+t.globals.padHorizontal-(o-r+t.config.xaxis.labels.offsetX);if(d.length){var b=this.axesUtils.getLabel(c,d,f,p,this.drawnLabels,this.xaxisFontSize);f=b.x,x=b.text,this.drawnLabels.push(b.text),0===p&&t.globals.skipFirstTimelinelabel&&(x=""),p===c.length-1&&t.globals.skipLastTimelinelabel&&(x="")}var y=i.drawText({x:f,y:this.xAxisoffX+t.config.xaxis.labels.offsetY+30-("top"===t.config.xaxis.position?t.globals.xAxisHeight+t.config.xaxis.axisTicks.height-2:0),text:x,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[e]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:t.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label "+t.config.xaxis.labels.style.cssClass});s.add(y),y.tspan(x);var k=document.createElementNS(t.globals.SVGNS,"title");k.textContent=x,y.node.appendChild(k),o+=r}return this.inversedYAxisTitleText(a),this.inversedYAxisBorder(a),a}},{key:"inversedYAxisBorder",value:function(e){var t=this.w,i=new M(this.ctx),a=t.config.xaxis.axisBorder;if(a.show){var s=0;"bar"===t.config.chart.type&&t.globals.isXNumeric&&(s-=15);var n=i.drawLine(t.globals.padHorizontal+s+a.offsetX,this.xAxisoffX,t.globals.gridWidth,this.xAxisoffX,a.color,0,a.height);e.add(n)}}},{key:"inversedYAxisTitleText",value:function(e){var t=this.w,i=new M(this.ctx);if(void 0!==t.config.xaxis.title.text){var a=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),s=i.drawText({x:t.globals.gridWidth/2+t.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(t.config.xaxis.title.style.fontSize)+t.config.xaxis.title.offsetY+20,text:t.config.xaxis.title.text,textAnchor:"middle",fontSize:t.config.xaxis.title.style.fontSize,fontFamily:t.config.xaxis.title.style.fontFamily,fontWeight:t.config.xaxis.title.style.fontWeight,foreColor:t.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+t.config.xaxis.title.style.cssClass});a.add(s),e.add(a)}}},{key:"yAxisTitleRotate",value:function(e,t){var i=this.w,a=new M(this.ctx),s={width:0,height:0},n={width:0,height:0},r=i.globals.dom.baseEl.querySelector(" .apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-texts-g"));null!==r&&(s=r.getBoundingClientRect());var o=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-title text"));if(null!==o&&(n=o.getBoundingClientRect()),null!==o){var h=this.xPaddingForYAxisTitle(e,s,n,t);o.setAttribute("x",h.xPos-(t?10:0))}if(null!==o){var c=a.rotateAroundCenter(o);o.setAttribute("transform","rotate(".concat(t?-1*i.config.yaxis[e].title.rotate:i.config.yaxis[e].title.rotate," ").concat(c.x," ").concat(c.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(e,t,i,a){var s=this.w,n=0,r=0,o=10;return void 0===s.config.yaxis[e].title.text||e<0?{xPos:r,padd:0}:(a?(r=t.width+s.config.yaxis[e].title.offsetX+i.width/2+o/2,0===(n+=1)&&(r-=o/2)):(r=-1*t.width+s.config.yaxis[e].title.offsetX+o/2+i.width/2,s.globals.isBarHorizontal&&(r=-1*t.width-s.config.yaxis[e].title.offsetX-(o=25))),{xPos:r,padd:o})}},{key:"setYAxisXPosition",value:function(e,t){var i=this.w,a=0,s=0,n=18,r=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.map(function(o,h){var c=i.globals.ignoreYAxisIndexes.indexOf(h)>-1||!o.show||o.floating||0===e[h].width,d=e[h].width+t[h].width;o.opposite?i.globals.isBarHorizontal?i.globals.translateYAxisX[h]=(s=i.globals.gridWidth+i.globals.translateX-1)-o.labels.offsetX:(s=i.globals.gridWidth+i.globals.translateX+r,c||(r=r+d+20),i.globals.translateYAxisX[h]=s-o.labels.offsetX+20):(a=i.globals.translateX-n,c||(n=n+d+20),i.globals.translateYAxisX[h]=a+o.labels.offsetX)})}},{key:"setYAxisTextAlignments",value:function(){var e=this.w,t=e.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis");(t=P.listToArray(t)).forEach(function(i,a){var s=e.config.yaxis[a];if(s&&void 0!==s.labels.align){var n=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(a,"'] .apexcharts-yaxis-texts-g")),r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(a,"'] .apexcharts-yaxis-label"));r=P.listToArray(r);var o=n.getBoundingClientRect();"left"===s.labels.align?(r.forEach(function(h,c){h.setAttribute("text-anchor","start")}),s.opposite||n.setAttribute("transform","translate(-".concat(o.width,", 0)"))):"center"===s.labels.align?(r.forEach(function(h,c){h.setAttribute("text-anchor","middle")}),n.setAttribute("transform","translate(".concat(o.width/2*(s.opposite?1:-1),", 0)"))):"right"===s.labels.align&&(r.forEach(function(h,c){h.setAttribute("text-anchor","end")}),s.opposite&&n.setAttribute("transform","translate(".concat(o.width,", 0)")))}})}}]),w}(),Ne=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w,this.documentEvent=P.bind(this.documentEvent,this)}return Y(w,[{key:"addEventListener",value:function(e,t){var i=this.w;i.globals.events.hasOwnProperty(e)?i.globals.events[e].push(t):i.globals.events[e]=[t]}},{key:"removeEventListener",value:function(e,t){var i=this.w;if(i.globals.events.hasOwnProperty(e)){var a=i.globals.events[e].indexOf(t);-1!==a&&i.globals.events[e].splice(a,1)}}},{key:"fireEvent",value:function(e,t){var i=this.w;if(i.globals.events.hasOwnProperty(e)){t&&t.length||(t=[]);for(var a=i.globals.events[e],s=a.length,n=0;n<s;n++)a[n].apply(null,t)}}},{key:"setupEventHandlers",value:function(){var e=this,t=this.w,i=this.ctx,a=t.globals.dom.baseEl.querySelector(t.globals.chartClass);this.ctx.eventList.forEach(function(s){a.addEventListener(s,function(n){var r=Object.assign({},t,{seriesIndex:t.globals.capturedSeriesIndex,dataPointIndex:t.globals.capturedDataPointIndex});"mousemove"===n.type||"touchmove"===n.type?"function"==typeof t.config.chart.events.mouseMove&&t.config.chart.events.mouseMove(n,i,r):"mouseleave"===n.type||"touchleave"===n.type?"function"==typeof t.config.chart.events.mouseLeave&&t.config.chart.events.mouseLeave(n,i,r):("mouseup"===n.type&&1===n.which||"touchend"===n.type)&&("function"==typeof t.config.chart.events.click&&t.config.chart.events.click(n,i,r),i.ctx.events.fireEvent("click",[n,i,r]))},{capture:!1,passive:!0})}),this.ctx.eventList.forEach(function(s){t.globals.dom.baseEl.addEventListener(s,e.documentEvent,{passive:!0})}),this.ctx.core.setupBrushHandler()}},{key:"documentEvent",value:function(e){var t=this.w,i=e.target.className;if("click"===e.type){var a=t.globals.dom.baseEl.querySelector(".apexcharts-menu");a&&a.classList.contains("apexcharts-menu-open")&&"apexcharts-menu-icon"!==i&&a.classList.remove("apexcharts-menu-open")}t.globals.clientX="touchmove"===e.type?e.touches[0].clientX:e.clientX,t.globals.clientY="touchmove"===e.type?e.touches[0].clientY:e.clientY}}]),w}(),We=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w}return Y(w,[{key:"setCurrentLocaleValues",value:function(e){var t=this.w.config.chart.locales;window.Apex.chart&&window.Apex.chart.locales&&window.Apex.chart.locales.length>0&&(t=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=t.filter(function(s){return s.name===e})[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var a=P.extend(Re,i);this.w.globals.locale=a.options}}]),w}(),Be=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w}return Y(w,[{key:"drawAxis",value:function(e,t){var i,a,s=this.w.globals,n=this.w.config,r=new me(this.ctx),o=new Ie(this.ctx);s.axisCharts&&"radar"!==e&&(s.isBarHorizontal?(a=o.drawYaxisInversed(0),i=r.drawXaxisInversed(0),s.dom.elGraphical.add(i),s.dom.elGraphical.add(a)):(i=r.drawXaxis(),s.dom.elGraphical.add(i),n.yaxis.map(function(h,c){-1===s.ignoreYAxisIndexes.indexOf(c)&&(a=o.drawYaxis(c),s.dom.Paper.add(a))})))}}]),w}(),Me=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w}return Y(w,[{key:"drawXCrosshairs",value:function(){var e=this.w,t=new M(this.ctx),i=new j(this.ctx),a=e.config.xaxis.crosshairs.fill.gradient,s=e.config.xaxis.crosshairs.dropShadow,u=s.enabled,p=s.left,x=s.top,f=s.blur,b=s.color,y=s.opacity,k=e.config.xaxis.crosshairs.fill.color;if(e.config.xaxis.crosshairs.show){"gradient"===e.config.xaxis.crosshairs.fill.type&&(k=t.drawGradient("vertical",a.colorFrom,a.colorTo,a.opacityFrom,a.opacityTo,null,a.stops,null));var A=t.drawRect();1===e.config.xaxis.crosshairs.width&&(A=t.drawLine());var l=e.globals.gridHeight;(!P.isNumber(l)||l<0)&&(l=0);var g=e.config.xaxis.crosshairs.width;(!P.isNumber(g)||g<0)&&(g=0),A.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:l,width:g,height:l,fill:k,filter:"none","fill-opacity":e.config.xaxis.crosshairs.opacity,stroke:e.config.xaxis.crosshairs.stroke.color,"stroke-width":e.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":e.config.xaxis.crosshairs.stroke.dashArray}),u&&(A=i.dropShadow(A,{left:p,top:x,blur:f,color:b,opacity:y})),e.globals.dom.elGraphical.add(A)}}},{key:"drawYCrosshairs",value:function(){var e=this.w,t=new M(this.ctx),i=e.config.yaxis[0].crosshairs,a=e.globals.barPadForNumericAxis;if(e.config.yaxis[0].crosshairs.show){var s=t.drawLine(-a,0,e.globals.gridWidth+a,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);s.attr({class:"apexcharts-ycrosshairs"}),e.globals.dom.elGraphical.add(s)}var n=t.drawLine(-a,0,e.globals.gridWidth+a,0,i.stroke.color,0,0);n.attr({class:"apexcharts-ycrosshairs-hidden"}),e.globals.dom.elGraphical.add(n)}}]),w}(),Ve=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w}return Y(w,[{key:"checkResponsiveConfig",value:function(e){var t=this,i=this.w,a=i.config;if(0!==a.responsive.length){var s=a.responsive.slice();s.sort(function(h,c){return h.breakpoint>c.breakpoint?1:c.breakpoint>h.breakpoint?-1:0}).reverse();var n=new xe({}),r=function(){var h=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=s[0].breakpoint,d=window.innerWidth>0?window.innerWidth:screen.width;if(d>c){var u=_.extendArrayProps(n,i.globals.initialConfig,i);h=P.extend(u,h),h=P.extend(i.config,h),t.overrideResponsiveOptions(h)}else for(var p=0;p<s.length;p++)d<s[p].breakpoint&&(h=_.extendArrayProps(n,s[p].options,i),h=P.extend(i.config,h),t.overrideResponsiveOptions(h))};if(e){var o=_.extendArrayProps(n,e,i);o=P.extend(i.config,o),r(o=P.extend(o,e))}else r({})}}},{key:"overrideResponsiveOptions",value:function(e){var t=new xe(e).init({responsiveOverride:!0});this.w.config=t}}]),w}(),Ge=function(){function w(e){C(this,w),this.ctx=e,this.colors=[],this.w=e.w;var t=this.w;this.isColorFn=!1,this.isHeatmapDistributed="treemap"===t.config.chart.type&&t.config.plotOptions.treemap.distributed||"heatmap"===t.config.chart.type&&t.config.plotOptions.heatmap.distributed,this.isBarDistributed=t.config.plotOptions.bar.distributed&&("bar"===t.config.chart.type||"rangeBar"===t.config.chart.type)}return Y(w,[{key:"init",value:function(){this.setDefaultColors()}},{key:"setDefaultColors",value:function(){var e=this,t=this.w,i=new P;if(t.globals.dom.elWrap.classList.add("apexcharts-theme-".concat(t.config.theme.mode)),void 0===t.config.colors?t.globals.colors=this.predefined():(t.globals.colors=t.config.colors,Array.isArray(t.config.colors)&&t.config.colors.length>0&&"function"==typeof t.config.colors[0]&&(t.globals.colors=t.config.series.map(function(p,x){var f=t.config.colors[x];return f||(f=t.config.colors[0]),"function"==typeof f?(e.isColorFn=!0,f({value:t.globals.axisCharts?t.globals.series[x][0]?t.globals.series[x][0]:0:t.globals.series[x],seriesIndex:x,dataPointIndex:x,w:t})):f}))),t.globals.seriesColors.map(function(p,x){p&&(t.globals.colors[x]=p)}),t.config.theme.monochrome.enabled){var a=[],s=t.globals.series.length;(this.isBarDistributed||this.isHeatmapDistributed)&&(s=t.globals.series[0].length*t.globals.series.length);for(var n=t.config.theme.monochrome.color,r=1/(s/t.config.theme.monochrome.shadeIntensity),o=t.config.theme.monochrome.shadeTo,h=0,c=0;c<s;c++){var d=void 0;"dark"===o?(d=i.shadeColor(-1*h,n),h+=r):(d=i.shadeColor(h,n),h+=r),a.push(d)}t.globals.colors=a.slice()}var u=t.globals.colors.slice();this.pushExtraColors(t.globals.colors),["fill","stroke"].forEach(function(p){t.globals[p].colors=void 0===t.config[p].colors?e.isColorFn?t.config.colors:u:t.config[p].colors.slice(),e.pushExtraColors(t.globals[p].colors)}),t.globals.dataLabels.style.colors=void 0===t.config.dataLabels.style.colors?u:t.config.dataLabels.style.colors.slice(),this.pushExtraColors(t.globals.dataLabels.style.colors,50),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),t.globals.markers.colors=void 0===t.config.markers.colors?u:t.config.markers.colors.slice(),this.pushExtraColors(t.globals.markers.colors)}},{key:"pushExtraColors",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=t||a.globals.series.length;if(null===i&&(i=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===a.config.chart.type&&a.config.plotOptions.heatmap.colorScale.inverse),i&&a.globals.series.length&&(s=a.globals.series[a.globals.maxValsInArrayIndex].length*a.globals.series.length),e.length<s)for(var n=s-e.length,r=0;r<n;r++)e.push(e[r])}},{key:"updateThemeOptions",value:function(e){e.chart=e.chart||{},e.tooltip=e.tooltip||{};var t=e.theme.mode||"light",i=e.theme.palette?e.theme.palette:"dark"===t?"palette4":"palette1",a=e.chart.foreColor?e.chart.foreColor:"dark"===t?"#f6f7f8":"#373d3f";return e.tooltip.theme=t,e.chart.foreColor=a,e.theme.palette=i,e}},{key:"predefined",value:function(){switch(this.w.config.theme.palette){case"palette1":default:this.colors=["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"];break;case"palette2":this.colors=["#3f51b5","#03a9f4","#4caf50","#f9ce1d","#FF9800"];break;case"palette3":this.colors=["#33b2df","#546E7A","#d4526e","#13d8aa","#A5978B"];break;case"palette4":this.colors=["#4ecdc4","#c7f464","#81D4FA","#fd6a6a","#546E7A"];break;case"palette5":this.colors=["#2b908f","#f9a3a4","#90ee7e","#fa4443","#69d2e7"];break;case"palette6":this.colors=["#449DD1","#F86624","#EA3546","#662E9B","#C5D86D"];break;case"palette7":this.colors=["#D7263D","#1B998B","#2E294E","#F46036","#E2C044"];break;case"palette8":this.colors=["#662E9B","#F86624","#F9C80E","#EA3546","#43BCCD"];break;case"palette9":this.colors=["#5C4742","#A5978B","#8D5B4C","#5A2A27","#C4BBAF"];break;case"palette10":this.colors=["#A300D6","#7D02EB","#5653FE","#2983FF","#00B1F2"]}return this.colors}}]),w}(),_e=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w}return Y(w,[{key:"draw",value:function(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}},{key:"drawTitleSubtitle",value:function(e){var t=this.w,i="title"===e?t.config.title:t.config.subtitle,a=t.globals.svgWidth/2,s=i.offsetY,n="middle";if("left"===i.align?(a=10,n="start"):"right"===i.align&&(a=t.globals.svgWidth-10,n="end"),a+=i.offsetX,s=s+parseInt(i.style.fontSize,10)+i.margin/2,void 0!==i.text){var r=new M(this.ctx).drawText({x:a,y:s,text:i.text,textAnchor:n,fontSize:i.style.fontSize,fontFamily:i.style.fontFamily,fontWeight:i.style.fontWeight,foreColor:i.style.color,opacity:1});r.node.setAttribute("class","apexcharts-".concat(e,"-text")),t.globals.dom.Paper.add(r)}}}]),w}(),je=function(){function w(e){C(this,w),this.w=e.w,this.dCtx=e}return Y(w,[{key:"getTitleSubtitleCoords",value:function(e){var t=this.w,i=0,a=0,s="title"===e?t.config.title.floating:t.config.subtitle.floating,n=t.globals.dom.baseEl.querySelector(".apexcharts-".concat(e,"-text"));if(null!==n&&!s){var r=n.getBoundingClientRect();i=r.width,a=t.globals.axisCharts?r.height+5:r.height}return{width:i,height:a}}},{key:"getLegendsRect",value:function(){var e=this.w,t=e.globals.dom.baseEl.querySelector(".apexcharts-legend");e.config.legend.height||"top"!==e.config.legend.position&&"bottom"!==e.config.legend.position||(t.style.maxHeight=e.globals.svgHeight/2+"px");var i=Object.assign({},P.getBoundingClientRect(t));return this.dCtx.lgRect=null!==t&&!e.config.legend.floating&&e.config.legend.show?{x:i.x,y:i.y,height:i.height,width:0===i.height?0:i.width}:{x:0,y:0,height:0,width:0},"left"!==e.config.legend.position&&"right"!==e.config.legend.position||1.5*this.dCtx.lgRect.width>e.globals.svgWidth&&(this.dCtx.lgRect.width=e.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getLargestStringFromMultiArr",value:function(e,t){var i=e;if(this.w.globals.isMultiLineX){var a=t.map(function(n,r){return Array.isArray(n)?n.length:1}),s=Math.max.apply(Math,te(a));i=t[a.indexOf(s)]}return i}}]),w}(),Ue=function(){function w(e){C(this,w),this.w=e.w,this.dCtx=e}return Y(w,[{key:"getxAxisLabelsCoords",value:function(){var e,t=this.w,i=t.globals.labels.slice();if(t.config.xaxis.convertedCatToNumeric&&0===i.length&&(i=t.globals.categoryLabels),t.globals.timescaleLabels.length>0){var a=this.getxAxisTimeScaleLabelsCoords();e={width:a.width,height:a.height},t.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==t.config.legend.position&&"right"!==t.config.legend.position||t.config.legend.floating?0:this.dCtx.lgRect.width;var s=t.globals.xLabelFormatter,n=P.getLargestStringFromArr(i),r=this.dCtx.dimHelpers.getLargestStringFromMultiArr(n,i);t.globals.isBarHorizontal&&(r=n=t.globals.yAxisScale[0].result.reduce(function(x,f){return x.length>f.length?x:f},0));var o=new Ae(this.dCtx.ctx),h=n;n=o.xLabelFormat(s,n,h,{i:void 0,dateFormatter:new U(this.dCtx.ctx).formatDate,w:t}),r=o.xLabelFormat(s,r,h,{i:void 0,dateFormatter:new U(this.dCtx.ctx).formatDate,w:t}),(t.config.xaxis.convertedCatToNumeric&&void 0===n||""===String(n).trim())&&(r=n="1");var c=new M(this.dCtx.ctx),d=c.getTextRects(n,t.config.xaxis.labels.style.fontSize),u=d;if(n!==r&&(u=c.getTextRects(r,t.config.xaxis.labels.style.fontSize)),(e={width:d.width>=u.width?d.width:u.width,height:d.height>=u.height?d.height:u.height}).width*i.length>t.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==t.config.xaxis.labels.rotate||t.config.xaxis.labels.rotateAlways){if(!t.globals.isBarHorizontal){t.globals.rotateXLabels=!0;var p=function(x){return c.getTextRects(x,t.config.xaxis.labels.style.fontSize,t.config.xaxis.labels.style.fontFamily,"rotate(".concat(t.config.xaxis.labels.rotate," 0 0)"),!1)};d=p(n),n!==r&&(u=p(r)),e.height=(d.height>u.height?d.height:u.height)/1.5,e.width=d.width>u.width?d.width:u.width}}else t.globals.rotateXLabels=!1}return t.config.xaxis.labels.show||(e={width:0,height:0}),{width:e.width,height:e.height}}},{key:"getxAxisTitleCoords",value:function(){var e=this.w,t=0,i=0;if(void 0!==e.config.xaxis.title.text){var a=new M(this.dCtx.ctx).getTextRects(e.config.xaxis.title.text,e.config.xaxis.title.style.fontSize);t=a.width,i=a.height}return{width:t,height:i}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var e,t=this.w;this.dCtx.timescaleLabels=t.globals.timescaleLabels.slice();var i=this.dCtx.timescaleLabels.map(function(s){return s.value}),a=i.reduce(function(s,n){return void 0===s?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):s.length>n.length?s:n},0);return 1.05*(e=new M(this.dCtx.ctx).getTextRects(a,t.config.xaxis.labels.style.fontSize)).width*i.length>t.globals.gridWidth&&0!==t.config.xaxis.labels.rotate&&(t.globals.overlappingXLabels=!0),e}},{key:"additionalPaddingXLabels",value:function(e){var t=this,i=this.w,a=i.globals,s=i.config,n=s.xaxis.type,r=e.width;a.skipLastTimelinelabel=!1,a.skipFirstTimelinelabel=!1;var o=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal;s.yaxis.forEach(function(c,d){o?(t.dCtx.gridPad.left<r&&(t.dCtx.xPadLeft=r/2+1),t.dCtx.xPadRight=r/2+1):function(c,d){-1!==a.collapsedSeriesIndices.indexOf(d)||function(u){if(t.dCtx.timescaleLabels&&t.dCtx.timescaleLabels.length){var f=t.dCtx.timescaleLabels[0].position-r/1.75+t.dCtx.yAxisWidthLeft;t.dCtx.timescaleLabels[t.dCtx.timescaleLabels.length-1].position+r/1.75-t.dCtx.yAxisWidthRight>a.svgWidth-a.translateX-("right"===i.config.legend.position&&t.dCtx.lgRect.width>0?t.dCtx.lgRect.width:0)&&(a.skipLastTimelinelabel=!0),f<-(u.show&&!u.floating||"bar"!==s.chart.type&&"candlestick"!==s.chart.type&&"rangeBar"!==s.chart.type&&"boxPlot"!==s.chart.type?10:r/1.75)&&(a.skipFirstTimelinelabel=!0)}else"datetime"===n?t.dCtx.gridPad.right<r&&!a.rotateXLabels&&(a.skipLastTimelinelabel=!0):"datetime"!==n&&t.dCtx.gridPad.right<r/2-t.dCtx.yAxisWidthRight&&!a.rotateXLabels&&!i.config.xaxis.labels.trim&&("between"!==i.config.xaxis.tickPlacement||i.globals.isBarHorizontal)&&(t.dCtx.xPadRight=r/2+1)}(c)}(c,d)})}}]),w}(),ct=function(){function w(e){C(this,w),this.w=e.w,this.dCtx=e}return Y(w,[{key:"getyAxisLabelsCoords",value:function(){var e=this,t=this.w,i=[],a=10,s=new ne(this.dCtx.ctx);return t.config.yaxis.map(function(n,r){var o=t.globals.yAxisScale[r],h=0;if(!s.isYAxisHidden(r)&&n.labels.show&&void 0!==n.labels.minWidth&&(h=n.labels.minWidth),!s.isYAxisHidden(r)&&n.labels.show&&o.result.length){var c=t.globals.yLabelFormatters[r],d=o.niceMin===Number.MIN_VALUE?0:o.niceMin,u=String(d).length>String(o.niceMax).length?d:o.niceMax,p=c(u,{seriesIndex:r,dataPointIndex:-1,w:t}),x=p;if(void 0!==p&&0!==p.length||(p=u),t.globals.isBarHorizontal){a=0;var f=t.globals.labels.slice();p=c(p=P.getLargestStringFromArr(f),{seriesIndex:r,dataPointIndex:-1,w:t}),x=e.dCtx.dimHelpers.getLargestStringFromMultiArr(p,f)}var b=new M(e.dCtx.ctx),y="rotate(".concat(n.labels.rotate," 0 0)"),k=b.getTextRects(p,n.labels.style.fontSize,n.labels.style.fontFamily,y,!1),A=k;p!==x&&(A=b.getTextRects(x,n.labels.style.fontSize,n.labels.style.fontFamily,y,!1)),i.push({width:(h>A.width||h>k.width?h:A.width>k.width?A.width:k.width)+a,height:A.height>k.height?A.height:k.height})}else i.push({width:0,height:0})}),i}},{key:"getyAxisTitleCoords",value:function(){var e=this,i=[];return this.w.config.yaxis.map(function(a,s){if(a.show&&void 0!==a.title.text){var n=new M(e.dCtx.ctx),r="rotate(".concat(a.title.rotate," 0 0)"),o=n.getTextRects(a.title.text,a.title.style.fontSize,a.title.style.fontFamily,r,!1);i.push({width:o.width,height:o.height})}else i.push({width:0,height:0})}),i}},{key:"getTotalYAxisWidth",value:function(){var e=this.w,t=0,i=0,a=0,s=e.globals.yAxisScale.length>1?10:0,n=new ne(this.dCtx.ctx),r=function(o,h){var c=e.config.yaxis[h].floating,d=0;o.width>0&&!c?(d=o.width+s,e.globals.ignoreYAxisIndexes.indexOf(h)>-1&&(d=d-o.width-s)):d=c||n.isYAxisHidden(h)?0:5,e.config.yaxis[h].opposite?a+=d:i+=d,t+=d};return e.globals.yLabelsCoords.map(function(o,h){r(o,h)}),e.globals.yTitleCoords.map(function(o,h){r(o,h)}),e.globals.isBarHorizontal&&!e.config.yaxis[0].floating&&(t=e.globals.yLabelsCoords[0].width+e.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=a,t}}]),w}(),qe=function(){function w(e){C(this,w),this.w=e.w,this.dCtx=e}return Y(w,[{key:"gridPadForColumnsInNumericAxis",value:function(e){var t=this.w;if(t.globals.noData||t.globals.allSeriesCollapsed)return 0;var i=function(c){return"bar"===c||"rangeBar"===c||"candlestick"===c||"boxPlot"===c},a=t.config.chart.type,s=0,n=i(a)?t.config.series.length:1;if(t.globals.comboBarCount>0&&(n=t.globals.comboBarCount),t.globals.collapsedSeries.forEach(function(c){i(c.type)&&(n-=1)}),t.config.chart.stacked&&(n=1),(i(a)||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&n>0){var r,o,h=Math.abs(t.globals.initialMaxX-t.globals.initialMinX);h<=3&&(h=t.globals.dataPoints),r=h/e,t.globals.minXDiff&&t.globals.minXDiff/r>0&&(o=t.globals.minXDiff/r),o>e/2&&(o/=2),(s=o/n*parseInt(t.config.plotOptions.bar.columnWidth,10)/100)<1&&(s=1),t.globals.barPadForNumericAxis=s=s/(n>1?1:1.5)+5}return s}},{key:"gridPadFortitleSubtitle",value:function(){var e=this,t=this.w,i=t.globals,a=this.dCtx.isSparkline||!t.globals.axisCharts?0:10;["title","subtitle"].forEach(function(r){a+=void 0!==t.config[r].text?t.config[r].margin:e.dCtx.isSparkline||!t.globals.axisCharts?0:5}),!t.config.legend.show||"bottom"!==t.config.legend.position||t.config.legend.floating||t.globals.axisCharts||(a+=10);var s=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),n=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight=i.gridHeight-s.height-n.height-a,i.translateY=i.translateY+s.height+n.height+a}},{key:"setGridXPosForDualYAxis",value:function(e,t){var i=this.w,a=new ne(this.dCtx.ctx);i.config.yaxis.map(function(s,n){-1!==i.globals.ignoreYAxisIndexes.indexOf(n)||s.floating||a.isYAxisHidden(n)||(s.opposite&&(i.globals.translateX=i.globals.translateX-(t[n].width+e[n].width)-parseInt(i.config.yaxis[n].labels.style.fontSize,10)/1.2-12),i.globals.translateX<2&&(i.globals.translateX=2))})}}]),w}(),Se=function(){function w(e){C(this,w),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 je(this),this.dimYAxis=new ct(this),this.dimXAxis=new Ue(this),this.dimGrid=new qe(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return Y(w,[{key:"plotCoords",value:function(){var e=this.w.globals;this.lgRect=this.dimHelpers.getLegendsRect(),e.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),e.gridHeight=e.gridHeight-this.gridPad.top-this.gridPad.bottom,e.gridWidth=e.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var t=this.dimGrid.gridPadForColumnsInNumericAxis(e.gridWidth);e.gridWidth=e.gridWidth-2*t,e.translateX=e.translateX+this.gridPad.left+this.xPadLeft+(t>0?t+4:0),e.translateY=e.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var e=this,t=this.w,i=t.globals,a=this.dimYAxis.getyAxisLabelsCoords(),s=this.dimYAxis.getyAxisTitleCoords();t.globals.yLabelsCoords=[],t.globals.yTitleCoords=[],t.config.yaxis.map(function(u,p){t.globals.yLabelsCoords.push({width:a[p].width,index:p}),t.globals.yTitleCoords.push({width:s[p].width,index:p})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var n=this.dimXAxis.getxAxisLabelsCoords(),r=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(n,r),i.translateXAxisY=t.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=t.globals.rotateXLabels&&t.globals.isXNumeric&&t.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,t.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(t.config.xaxis.labels.style.fontSize,10)/1.5*-1),i.translateXAxisY=i.translateXAxisY+t.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+t.config.xaxis.labels.offsetX;var o=this.yAxisWidth,h=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-r.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var c=10;("radar"===t.config.chart.type||this.isSparkline)&&(o=0,h=i.goldenPadding),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===t.config.chart.type)&&(o=0,h=0,c=0),this.isSparkline||this.dimXAxis.additionalPaddingXLabels(n);var d=function(){i.translateX=o,i.gridHeight=i.svgHeight-e.lgRect.height-h-(e.isSparkline||"treemap"===t.config.chart.type?0:t.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-o};switch("top"===t.config.xaxis.position&&(c=i.xAxisHeight-t.config.xaxis.axisTicks.height-5),t.config.legend.position){case"bottom":i.translateY=c,d();break;case"top":i.translateY=this.lgRect.height+c,d();break;case"left":i.translateY=c,i.translateX=this.lgRect.width+o,i.gridHeight=i.svgHeight-h-12,i.gridWidth=i.svgWidth-this.lgRect.width-o;break;case"right":i.translateY=c,i.translateX=o,i.gridHeight=i.svgHeight-h-12,i.gridWidth=i.svgWidth-this.lgRect.width-o-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(s,a),new Ie(this.ctx).setYAxisXPosition(a,s)}},{key:"setDimensionsForNonAxisCharts",value:function(){var e=this.w,t=e.globals,i=e.config,a=0;e.config.legend.show&&!e.config.legend.floating&&(a=20);var s="pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",n=i.plotOptions[s].offsetY,r=i.plotOptions[s].offsetX;if(!i.legend.show||i.legend.floating)return t.gridHeight=t.svgHeight-i.grid.padding.left+i.grid.padding.right,t.gridWidth=t.gridHeight,t.translateY=n,void(t.translateX=r+(t.svgWidth-t.gridWidth)/2);switch(i.legend.position){case"bottom":t.gridHeight=t.svgHeight-this.lgRect.height-t.goldenPadding,t.gridWidth=t.svgWidth,t.translateY=n-10,t.translateX=r+(t.svgWidth-t.gridWidth)/2;break;case"top":t.gridHeight=t.svgHeight-this.lgRect.height-t.goldenPadding,t.gridWidth=t.svgWidth,t.translateY=this.lgRect.height+n+10,t.translateX=r+(t.svgWidth-t.gridWidth)/2;break;case"left":t.gridWidth=t.svgWidth-this.lgRect.width-a,t.gridHeight="auto"!==i.chart.height?t.svgHeight:t.gridWidth,t.translateY=n,t.translateX=r+this.lgRect.width+a;break;case"right":t.gridWidth=t.svgWidth-this.lgRect.width-a-5,t.gridHeight="auto"!==i.chart.height?t.svgHeight:t.gridWidth,t.translateY=n,t.translateX=r+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(e,t){var i=this.w;this.xAxisHeight=(e.height+t.height)*(i.globals.isMultiLineX?1.2:i.globals.LINE_HEIGHT_RATIO)+(i.globals.rotateXLabels?22:10)+(i.globals.rotateXLabels&&"bottom"===i.config.legend.position?10:0),this.xAxisWidth=e.width,this.xAxisHeight-t.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 o=0,h=0;i.config.yaxis.forEach(function(c){o+=c.labels.minWidth,h+=c.labels.maxWidth}),this.yAxisWidth<o&&(this.yAxisWidth=o),this.yAxisWidth>h&&(this.yAxisWidth=h)}}]),w}(),F=function(){function w(e){C(this,w),this.w=e.w,this.lgCtx=e}return Y(w,[{key:"getLegendStyles",value:function(){var e=document.createElement("style");e.setAttribute("type","text/css");var t=document.createTextNode("\t\n \t\n .apexcharts-legend {\t\n display: flex;\t\n overflow: auto;\t\n padding: 0 10px;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\t\n flex-wrap: wrap\t\n }\t\n .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\t\n flex-direction: column;\t\n bottom: 0;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\t\n justify-content: flex-start;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\t\n justify-content: center; \t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\t\n justify-content: flex-end;\t\n }\t\n .apexcharts-legend-series {\t\n cursor: pointer;\t\n line-height: normal;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom .apexcharts-legend-series, .apexcharts-legend.apx-legend-position-top .apexcharts-legend-series{\t\n display: flex;\t\n align-items: center;\t\n }\t\n .apexcharts-legend-text {\t\n position: relative;\t\n font-size: 14px;\t\n }\t\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\t\n pointer-events: none;\t\n }\t\n .apexcharts-legend-marker {\t\n position: relative;\t\n display: inline-block;\t\n cursor: pointer;\t\n margin-right: 3px;\t\n border-style: solid;\n }\t\n \t\n .apexcharts-legend.apexcharts-align-right .apexcharts-legend-series, .apexcharts-legend.apexcharts-align-left .apexcharts-legend-series{\t\n display: inline-block;\t\n }\t\n .apexcharts-legend-series.apexcharts-no-click {\t\n cursor: auto;\t\n }\t\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\t\n display: none !important;\t\n }\t\n .apexcharts-inactive-legend {\t\n opacity: 0.45;\t\n }");return e.appendChild(t),e}},{key:"getLegendBBox",value:function(){var e=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect();return{clwh:e.height,clww:e.width}}},{key:"appendToForeignObject",value:function(){var e=this.w.globals;e.dom.elLegendForeign=document.createElementNS(e.SVGNS,"foreignObject");var t=e.dom.elLegendForeign;t.setAttribute("x",0),t.setAttribute("y",0),t.setAttribute("width",e.svgWidth),t.setAttribute("height",e.svgHeight),e.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),t.appendChild(e.dom.elLegendWrap),t.appendChild(this.getLegendStyles()),e.dom.Paper.node.insertBefore(t,e.dom.elGraphical.node)}},{key:"toggleDataSeries",value:function(e,t){var i=this,a=this.w;if(a.globals.axisCharts||"radialBar"===a.config.chart.type){a.globals.resized=!0;var s=null,n=null;a.globals.risingSeries=[],a.globals.axisCharts?(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(e,"']")),n=parseInt(s.getAttribute("data:realIndex"),10)):(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(e+1,"']")),n=parseInt(s.getAttribute("rel"),10)-1),t?[{cs:a.globals.collapsedSeries,csi:a.globals.collapsedSeriesIndices},{cs:a.globals.ancillaryCollapsedSeries,csi:a.globals.ancillaryCollapsedSeriesIndices}].forEach(function(c){i.riseCollapsedSeries(c.cs,c.csi,n)}):this.hideSeries({seriesEl:s,realIndex:n})}else{var r=a.globals.dom.Paper.select(" .apexcharts-series[rel='".concat(e+1,"'] path")),o=a.config.chart.type;if("pie"===o||"polarArea"===o||"donut"===o){var h=a.config.plotOptions.pie.donut.labels;new M(this.lgCtx.ctx).pathMouseDown(r.members[0],null),this.lgCtx.ctx.pie.printDataLabelsInner(r.members[0].node,h)}r.fire("click")}}},{key:"hideSeries",value:function(e){var t=e.seriesEl,i=e.realIndex,a=this.w,s=P.clone(a.config.series);if(a.globals.axisCharts){var n=!1;if(a.config.yaxis[i]&&a.config.yaxis[i].show&&a.config.yaxis[i].showAlways&&(n=!0,a.globals.ancillaryCollapsedSeriesIndices.indexOf(i)<0&&(a.globals.ancillaryCollapsedSeries.push({index:i,data:s[i].data.slice(),type:t.parentNode.className.baseVal.split("-")[1]}),a.globals.ancillaryCollapsedSeriesIndices.push(i))),!n){a.globals.collapsedSeries.push({index:i,data:s[i].data.slice(),type:t.parentNode.className.baseVal.split("-")[1]}),a.globals.collapsedSeriesIndices.push(i);var r=a.globals.risingSeries.indexOf(i);a.globals.risingSeries.splice(r,1)}}else a.globals.collapsedSeries.push({index:i,data:s[i]}),a.globals.collapsedSeriesIndices.push(i);for(var o=t.childNodes,h=0;h<o.length;h++)o[h].classList.contains("apexcharts-series-markers-wrap")&&(o[h].classList.contains("apexcharts-hide")?o[h].classList.remove("apexcharts-hide"):o[h].classList.add("apexcharts-hide"));a.globals.allSeriesCollapsed=a.globals.collapsedSeries.length===a.config.series.length,s=this._getSeriesBasedOnCollapsedState(s),this.lgCtx.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled)}},{key:"riseCollapsedSeries",value:function(e,t,i){var a=this.w,s=P.clone(a.config.series);if(e.length>0){for(var n=0;n<e.length;n++)e[n].index===i&&(a.globals.axisCharts?(s[i].data=e[n].data.slice(),e.splice(n,1),t.splice(n,1),a.globals.risingSeries.push(i)):(s[i]=e[n].data,e.splice(n,1),t.splice(n,1),a.globals.risingSeries.push(i)));s=this._getSeriesBasedOnCollapsedState(s),this.lgCtx.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled)}}},{key:"_getSeriesBasedOnCollapsedState",value:function(e){var t=this.w;return e.forEach(t.globals.axisCharts?function(i,a){t.globals.collapsedSeriesIndices.indexOf(a)>-1&&(e[a].data=[])}:function(i,a){t.globals.collapsedSeriesIndices.indexOf(a)>-1&&(e[a]=0)}),e}}]),w}(),G=function(){function w(e,t){C(this,w),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 F(this)}return Y(w,[{key:"init",value:function(){var e=this.w,t=e.globals,i=e.config;if((i.legend.showForSingleSeries&&1===t.series.length||this.isBarsDistributed||t.series.length>1||!t.axisCharts)&&i.legend.show){for(;t.dom.elLegendWrap.firstChild;)t.dom.elLegendWrap.removeChild(t.dom.elLegendWrap.firstChild);this.drawLegends(),P.isIE11()?document.getElementsByTagName("head")[0].appendChild(this.legendHelpers.getLegendStyles()):this.legendHelpers.appendToForeignObject(),"bottom"===i.legend.position||"top"===i.legend.position?this.legendAlignHorizontal():"right"!==i.legend.position&&"left"!==i.legend.position||this.legendAlignVertical()}}},{key:"drawLegends",value:function(){var e=this,t=this.w,i=t.config.legend.fontFamily,a=t.globals.seriesNames,s=t.globals.colors.slice();if("heatmap"===t.config.chart.type){var n=t.config.plotOptions.heatmap.colorScale.ranges;a=n.map(function(E){return E.name?E.name:E.from+" - "+E.to}),s=n.map(function(E){return E.color})}else this.isBarsDistributed&&(a=t.globals.labels.slice());t.config.legend.customLegendItems.length&&(a=t.config.legend.customLegendItems);for(var r=t.globals.legendFormatter,o=t.config.legend.inverseOrder,h=o?a.length-1:0;o?h>=0:h<=a.length-1;o?h--:h++){var c=r(a[h],{seriesIndex:h,w:t}),d=!1,u=!1;if(t.globals.collapsedSeries.length>0)for(var p=0;p<t.globals.collapsedSeries.length;p++)t.globals.collapsedSeries[p].index===h&&(d=!0);if(t.globals.ancillaryCollapsedSeriesIndices.length>0)for(var x=0;x<t.globals.ancillaryCollapsedSeriesIndices.length;x++)t.globals.ancillaryCollapsedSeriesIndices[x]===h&&(u=!0);var f=document.createElement("span");f.classList.add("apexcharts-legend-marker");var b=t.config.legend.markers.offsetX,y=t.config.legend.markers.offsetY,k=t.config.legend.markers.height,A=t.config.legend.markers.width,l=t.config.legend.markers.strokeWidth,g=t.config.legend.markers.strokeColor,m=t.config.legend.markers.radius,v=f.style;v.background=s[h],v.color=s[h],v.setProperty("background",s[h],"important"),t.config.legend.markers.fillColors&&t.config.legend.markers.fillColors[h]&&(v.background=t.config.legend.markers.fillColors[h]),void 0!==t.globals.seriesColors[h]&&(v.background=t.globals.seriesColors[h],v.color=t.globals.seriesColors[h]),v.height=Array.isArray(k)?parseFloat(k[h])+"px":parseFloat(k)+"px",v.width=Array.isArray(A)?parseFloat(A[h])+"px":parseFloat(A)+"px",v.left=(Array.isArray(b)?parseFloat(b[h]):parseFloat(b))+"px",v.top=(Array.isArray(y)?parseFloat(y[h]):parseFloat(y))+"px",v.borderWidth=Array.isArray(l)?l[h]:l,v.borderColor=Array.isArray(g)?g[h]:g,v.borderRadius=Array.isArray(m)?parseFloat(m[h])+"px":parseFloat(m)+"px",t.config.legend.markers.customHTML&&(Array.isArray(t.config.legend.markers.customHTML)?t.config.legend.markers.customHTML[h]&&(f.innerHTML=t.config.legend.markers.customHTML[h]()):f.innerHTML=t.config.legend.markers.customHTML()),M.setAttrs(f,{rel:h+1,"data:collapsed":d||u}),(d||u)&&f.classList.add("apexcharts-inactive-legend");var S=document.createElement("div"),T=document.createElement("span");T.classList.add("apexcharts-legend-text"),T.innerHTML=Array.isArray(c)?c.join(" "):c;var L=t.config.legend.labels.useSeriesColors?t.globals.colors[h]:t.config.legend.labels.colors;L||(L=t.config.chart.foreColor),T.style.color=L,T.style.fontSize=parseFloat(t.config.legend.fontSize)+"px",T.style.fontWeight=t.config.legend.fontWeight,T.style.fontFamily=i||t.config.chart.fontFamily,M.setAttrs(T,{rel:h+1,i:h,"data:default-text":encodeURIComponent(c),"data:collapsed":d||u}),S.appendChild(f),S.appendChild(T);var z=new _(this.ctx);t.config.legend.showForZeroSeries||0===z.getSeriesTotalByIndex(h)&&z.seriesHaveSameValues(h)&&!z.isSeriesNull(h)&&-1===t.globals.collapsedSeriesIndices.indexOf(h)&&-1===t.globals.ancillaryCollapsedSeriesIndices.indexOf(h)&&S.classList.add("apexcharts-hidden-zero-series"),t.config.legend.showForNullSeries||z.isSeriesNull(h)&&-1===t.globals.collapsedSeriesIndices.indexOf(h)&&-1===t.globals.ancillaryCollapsedSeriesIndices.indexOf(h)&&S.classList.add("apexcharts-hidden-null-series"),t.globals.dom.elLegendWrap.appendChild(S),t.globals.dom.elLegendWrap.classList.add("apexcharts-align-".concat(t.config.legend.horizontalAlign)),t.globals.dom.elLegendWrap.classList.add("apx-legend-position-"+t.config.legend.position),S.classList.add("apexcharts-legend-series"),S.style.margin="".concat(t.config.legend.itemMargin.vertical,"px ").concat(t.config.legend.itemMargin.horizontal,"px"),t.globals.dom.elLegendWrap.style.width=t.config.legend.width?t.config.legend.width+"px":"",t.globals.dom.elLegendWrap.style.height=t.config.legend.height?t.config.legend.height+"px":"",M.setAttrs(S,{rel:h+1,seriesName:P.escapeString(a[h]),"data:collapsed":d||u}),(d||u)&&S.classList.add("apexcharts-inactive-legend"),t.config.legend.onItemClick.toggleDataSeries||S.classList.add("apexcharts-no-click")}t.globals.dom.elWrap.addEventListener("click",e.onLegendClick,!0),t.config.legend.onItemHover.highlightDataSeries&&0===t.config.legend.customLegendItems.length&&(t.globals.dom.elWrap.addEventListener("mousemove",e.onLegendHovered,!0),t.globals.dom.elWrap.addEventListener("mouseout",e.onLegendHovered,!0))}},{key:"setLegendWrapXY",value:function(e,t){var i=this.w,a=i.globals.dom.baseEl.querySelector(".apexcharts-legend"),s=a.getBoundingClientRect(),n=0,r=0;if("bottom"===i.config.legend.position)r+=i.globals.svgHeight-s.height/2;else if("top"===i.config.legend.position){var o=new Se(this.ctx),h=o.dimHelpers.getTitleSubtitleCoords("title").height,c=o.dimHelpers.getTitleSubtitleCoords("subtitle").height;r=r+(h>0?h-10:0)+(c>0?c-10:0)}a.style.position="absolute",r=r+t+i.config.legend.offsetY,a.style.left=(n=n+e+i.config.legend.offsetX)+"px",a.style.top=r+"px","bottom"===i.config.legend.position?(a.style.top="auto",a.style.bottom=5-i.config.legend.offsetY+"px"):"right"===i.config.legend.position&&(a.style.left="auto",a.style.right=25+i.config.legend.offsetX+"px"),["width","height"].forEach(function(d){a.style[d]&&(a.style[d]=parseInt(i.config.legend[d],10)+"px")})}},{key:"legendAlignHorizontal",value:function(){var e=this.w;e.globals.dom.baseEl.querySelector(".apexcharts-legend").style.right=0;var t=this.legendHelpers.getLegendBBox(),i=new Se(this.ctx),a=i.dimHelpers.getTitleSubtitleCoords("title"),s=i.dimHelpers.getTitleSubtitleCoords("subtitle"),n=0;"bottom"===e.config.legend.position?n=-t.clwh/1.8:"top"===e.config.legend.position&&(n=a.height+s.height+e.config.title.margin+e.config.subtitle.margin-10),this.setLegendWrapXY(20,n)}},{key:"legendAlignVertical",value:function(){var e=this.w,t=this.legendHelpers.getLegendBBox(),i=0;"left"===e.config.legend.position&&(i=20),"right"===e.config.legend.position&&(i=e.globals.svgWidth-t.clww-10),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(e){var t=this.w,i=e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker");if("heatmap"===t.config.chart.type||this.isBarsDistributed){if(i){var a=parseInt(e.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,a,this.w]),new K(this.ctx).highlightRangeInSeries(e,e.target)}}else!e.target.classList.contains("apexcharts-inactive-legend")&&i&&new K(this.ctx).toggleSeriesOnHover(e,e.target)}},{key:"onLegendClick",value:function(e){var t=this.w;if(!t.config.legend.customLegendItems.length&&(e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker"))){var i=parseInt(e.target.getAttribute("rel"),10)-1,a="true"===e.target.getAttribute("data:collapsed"),s=this.w.config.chart.events.legendClick;"function"==typeof s&&s(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var n=this.w.config.legend.markers.onClick;"function"==typeof n&&e.target.classList.contains("apexcharts-legend-marker")&&(n(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),"treemap"!==t.config.chart.type&&"heatmap"!==t.config.chart.type&&!this.isBarsDistributed&&t.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,a)}}}]),w}(),I=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w;var t=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=t.globals.minX,this.maxX=t.globals.maxX}return Y(w,[{key:"createToolbar",value:function(){var e=this,t=this.w,i=function(){return document.createElement("div")},a=i();if(a.setAttribute("class","apexcharts-toolbar"),a.style.top=t.config.chart.toolbar.offsetY+"px",a.style.right=3-t.config.chart.toolbar.offsetX+"px",t.globals.dom.elWrap.appendChild(a),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=i(),this.elCustomIcons=[],this.t=t.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var s=0;s<this.t.customIcons.length;s++)this.elCustomIcons.push(i());var n=[],r=function(d,u,p){var x=d.toLowerCase();e.t[x]&&t.config.chart.zoom.enabled&&n.push({el:u,icon:"string"==typeof e.t[x]?e.t[x]:p,title:e.localeValues[d],class:"apexcharts-".concat(x,"-icon")})};r("zoomIn",this.elZoomIn,'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path d="M0 0h24v24H0z" fill="none"/>\n <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"/>\n</svg>\n'),r("zoomOut",this.elZoomOut,'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path d="M0 0h24v24H0z" fill="none"/>\n <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"/>\n</svg>\n');var o=function(d){e.t[d]&&t.config.chart[d].enabled&&n.push({el:"zoom"===d?e.elZoom:e.elSelection,icon:"string"==typeof e.t[d]?e.t[d]:"zoom"===d?'<svg xmlns="http://www.w3.org/2000/svg" fill="#000000" height="24" viewBox="0 0 24 24" width="24">\n <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"/>\n <path d="M0 0h24v24H0V0z" fill="none"/>\n <path d="M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"/>\n</svg>':'<svg fill="#6E8192" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">\n <path d="M0 0h24v24H0z" fill="none"/>\n <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"/>\n</svg>',title:e.localeValues["zoom"===d?"selectionZoom":"selection"],class:t.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(d,"-icon")})};o("zoom"),o("selection"),this.t.pan&&t.config.chart.zoom.enabled&&n.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000" height="24" viewBox="0 0 24 24" width="24">\n <defs>\n <path d="M0 0h24v24H0z" id="a"/>\n </defs>\n <clipPath id="b">\n <use overflow="visible" xlink:href="#a"/>\n </clipPath>\n <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"/>\n</svg>',title:this.localeValues.pan,class:t.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),r("reset",this.elZoomReset,'<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">\n <path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>\n <path d="M0 0h24v24H0z" fill="none"/>\n</svg>'),this.t.download&&n.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var h=0;h<this.elCustomIcons.length;h++)n.push({el:this.elCustomIcons[h],icon:this.t.customIcons[h].icon,title:this.t.customIcons[h].title,index:this.t.customIcons[h].index,class:"apexcharts-toolbar-custom-icon "+this.t.customIcons[h].class});n.forEach(function(d,u){d.index&&P.moveIndexInArray(n,u,d.index)});for(var c=0;c<n.length;c++)M.setAttrs(n[c].el,{class:n[c].class,title:n[c].title}),n[c].el.innerHTML=n[c].icon,a.appendChild(n[c].el);this._createHamburgerMenu(a),t.globals.zoomEnabled?this.elZoom.classList.add(this.selectedClass):t.globals.panEnabled?this.elPan.classList.add(this.selectedClass):t.globals.selectionEnabled&&this.elSelection.classList.add(this.selectedClass),this.addToolbarEventListeners()}},{key:"_createHamburgerMenu",value:function(e){this.elMenuItems=[],e.appendChild(this.elMenu),M.setAttrs(this.elMenu,{class:"apexcharts-menu"});var t=[{name:"exportSVG",title:this.localeValues.exportToSVG},{name:"exportPNG",title:this.localeValues.exportToPNG},{name:"exportCSV",title:this.localeValues.exportToCSV}];this.w.globals.allSeriesHasEqualX||t.splice(2,1);for(var i=0;i<t.length;i++)this.elMenuItems.push(document.createElement("div")),this.elMenuItems[i].innerHTML=t[i].title,M.setAttrs(this.elMenuItems[i],{class:"apexcharts-menu-item ".concat(t[i].name),title:t[i].title}),this.elMenu.appendChild(this.elMenuItems[i])}},{key:"addToolbarEventListeners",value:function(){var e=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(i){i.classList.contains("exportSVG")?i.addEventListener("click",e.handleDownload.bind(e,"svg")):i.classList.contains("exportPNG")?i.addEventListener("click",e.handleDownload.bind(e,"png")):i.classList.contains("exportCSV")&&i.addEventListener("click",e.handleDownload.bind(e,"csv"))});for(var t=0;t<this.t.customIcons.length;t++)this.elCustomIcons[t].addEventListener("click",this.t.customIcons[t].click.bind(this,this.ctx,this.ctx.w))}},{key:"toggleZoomSelection",value:function(e){this.ctx.getSyncedCharts().forEach(function(t){t.ctx.toolbar.toggleOtherControls();var i="selection"===e?t.ctx.toolbar.elSelection:t.ctx.toolbar.elZoom,a="selection"===e?"selectionEnabled":"zoomEnabled";t.w.globals[a]=!t.w.globals[a],i.classList.contains(t.ctx.toolbar.selectedClass)?i.classList.remove(t.ctx.toolbar.selectedClass):i.classList.add(t.ctx.toolbar.selectedClass)})}},{key:"getToolbarIconsReference",value:function(){var e=this.w;this.elZoom||(this.elZoom=e.globals.dom.baseEl.querySelector(".apexcharts-zoom-icon")),this.elPan||(this.elPan=e.globals.dom.baseEl.querySelector(".apexcharts-pan-icon")),this.elSelection||(this.elSelection=e.globals.dom.baseEl.querySelector(".apexcharts-selection-icon"))}},{key:"enableZoomPanFromToolbar",value:function(e){this.toggleOtherControls(),"pan"===e?this.w.globals.panEnabled=!0:this.w.globals.zoomEnabled=!0;var t="pan"===e?this.elPan:this.elZoom,i="pan"===e?this.elZoom:this.elPan;t&&t.classList.add(this.selectedClass),i&&i.classList.remove(this.selectedClass)}},{key:"togglePanning",value:function(){this.ctx.getSyncedCharts().forEach(function(e){e.ctx.toolbar.toggleOtherControls(),e.w.globals.panEnabled=!e.w.globals.panEnabled,e.ctx.toolbar.elPan.classList.contains(e.ctx.toolbar.selectedClass)?e.ctx.toolbar.elPan.classList.remove(e.ctx.toolbar.selectedClass):e.ctx.toolbar.elPan.classList.add(e.ctx.toolbar.selectedClass)})}},{key:"toggleOtherControls",value:function(){var e=this,t=this.w;t.globals.panEnabled=!1,t.globals.zoomEnabled=!1,t.globals.selectionEnabled=!1,this.getToolbarIconsReference(),[this.elPan,this.elSelection,this.elZoom].forEach(function(i){i&&i.classList.remove(e.selectedClass)})}},{key:"handleZoomIn",value:function(){var e=this.w;e.globals.isRangeBar&&(this.minX=e.globals.minY,this.maxX=e.globals.maxY);var t=(this.minX+this.maxX)/2,s=this._getNewMinXMaxX((this.minX+t)/2,(this.maxX+t)/2);e.globals.disableZoomIn||this.zoomUpdateOptions(s.minX,s.maxX)}},{key:"handleZoomOut",value:function(){var e=this.w;if(e.globals.isRangeBar&&(this.minX=e.globals.minY,this.maxX=e.globals.maxY),!("datetime"===e.config.xaxis.type&&new Date(this.minX).getUTCFullYear()<1e3)){var t=(this.minX+this.maxX)/2,s=this._getNewMinXMaxX(this.minX-(t-this.minX),this.maxX-(t-this.maxX));e.globals.disableZoomOut||this.zoomUpdateOptions(s.minX,s.maxX)}}},{key:"_getNewMinXMaxX",value:function(e,t){var i=this.w.config.xaxis.convertedCatToNumeric;return{minX:i?Math.floor(e):e,maxX:i?Math.floor(t):t}}},{key:"zoomUpdateOptions",value:function(e,t){var i=this.w;if(void 0!==e||void 0!==t){if(!(i.config.xaxis.convertedCatToNumeric&&(e<1&&(e=1,t=i.globals.dataPoints),t-e<2))){var a={min:e,max:t},s=this.getBeforeZoomRange(a);s&&(a=s.xaxis);var n={xaxis:a},r=P.clone(i.globals.initialConfig.yaxis);i.config.chart.zoom.autoScaleYaxis&&(r=new he(this.ctx).autoScaleY(this.ctx,r,{xaxis:a})),i.config.chart.group||(n.yaxis=r),this.w.globals.zoomed=!0,this.ctx.updateHelpers._updateOptions(n,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(a,r)}}else this.handleZoomReset()}},{key:"zoomCallback",value:function(e,t){"function"==typeof this.ev.zoomed&&this.ev.zoomed(this.ctx,{xaxis:e,yaxis:t})}},{key:"getBeforeZoomRange",value:function(e,t){var i=null;return"function"==typeof this.ev.beforeZoom&&(i=this.ev.beforeZoom(this,{xaxis:e,yaxis:t})),i}},{key:"toggleMenu",value:function(){var e=this;window.setTimeout(function(){e.elMenu.classList.contains("apexcharts-menu-open")?e.elMenu.classList.remove("apexcharts-menu-open"):e.elMenu.classList.add("apexcharts-menu-open")},0)}},{key:"handleDownload",value:function(e){var t=this.w,i=new Pe(this.ctx);switch(e){case"svg":i.exportToSVG(this.ctx);break;case"png":i.exportToPng(this.ctx);break;case"csv":i.exportToCSV({series:t.config.series,columnDelimiter:t.config.chart.toolbar.export.csv.columnDelimiter})}}},{key:"handleZoomReset",value:function(e){this.ctx.getSyncedCharts().forEach(function(t){var i=t.w;if(i.globals.lastXAxis.min=void 0,i.globals.lastXAxis.max=void 0,t.updateHelpers.revertDefaultAxisMinMax(),"function"==typeof i.config.chart.events.beforeResetZoom){var a=i.config.chart.events.beforeResetZoom(t,i);a&&t.updateHelpers.revertDefaultAxisMinMax(a)}"function"==typeof i.config.chart.events.zoomed&&t.ctx.toolbar.zoomCallback({min:i.config.xaxis.min,max:i.config.xaxis.max}),i.globals.zoomed=!1;var s=t.ctx.series.emptyCollapsedSeries(P.clone(i.globals.initialSeries));t.updateHelpers._updateSeries(s,i.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}}]),w}(),H=function(w){ge(t,I);var e=ye(t);function t(i){var a;return C(this,t),(a=e.call(this,i)).ctx=i,a.w=i.w,a.dragged=!1,a.graphics=new M(a.ctx),a.eventList=["mousedown","mouseleave","mousemove","touchstart","touchmove","mouseup","touchend"],a.clientX=0,a.clientY=0,a.startX=0,a.endX=0,a.dragX=0,a.startY=0,a.endY=0,a.dragY=0,a.moveDirection="none",a}return Y(t,[{key:"init",value:function(i){var a=this,s=i.xyRatios,n=this.w,r=this;this.xyRatios=s,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.gridRect=n.globals.dom.baseEl.querySelector(".apexcharts-grid"),this.zoomRect.node.classList.add("apexcharts-zoom-rect"),this.selectionRect.node.classList.add("apexcharts-selection-rect"),n.globals.dom.elGraphical.add(this.zoomRect),n.globals.dom.elGraphical.add(this.selectionRect),this.slDraggableRect="x"===n.config.chart.selection.type?this.selectionRect.draggable({minX:0,minY:0,maxX:n.globals.gridWidth,maxY:n.globals.gridHeight}).on("dragmove",this.selectionDragging.bind(this,"dragging")):"y"===n.config.chart.selection.type?this.selectionRect.draggable({minX:0,maxX:n.globals.gridWidth}).on("dragmove",this.selectionDragging.bind(this,"dragging")):this.selectionRect.draggable().on("dragmove",this.selectionDragging.bind(this,"dragging")),this.preselectedSelection(),this.hoverArea=n.globals.dom.baseEl.querySelector("".concat(n.globals.chartClass," .apexcharts-svg")),this.hoverArea.classList.add("apexcharts-zoomable"),this.eventList.forEach(function(o){a.hoverArea.addEventListener(o,r.svgMouseEvents.bind(r,s),{capture:!1,passive:!0})})}},{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(i,a){var s=this.w,n=this,r=this.ctx.toolbar,o=s.globals.zoomEnabled?s.config.chart.zoom.type:s.config.chart.selection.type,h=s.config.chart.toolbar.autoSelected;if(a.shiftKey?(this.shiftWasPressed=!0,r.enableZoomPanFromToolbar("pan"===h?"zoom":"pan")):this.shiftWasPressed&&(r.enableZoomPanFromToolbar(h),this.shiftWasPressed=!1),a.target){var c,d=a.target.classList;if(a.target.parentNode&&null!==a.target.parentNode&&(c=a.target.parentNode.classList),!(d.contains("apexcharts-selection-rect")||d.contains("apexcharts-legend-marker")||d.contains("apexcharts-legend-text")||c&&c.contains("apexcharts-toolbar"))){if(n.clientX="touchmove"===a.type||"touchstart"===a.type?a.touches[0].clientX:"touchend"===a.type?a.changedTouches[0].clientX:a.clientX,n.clientY="touchmove"===a.type||"touchstart"===a.type?a.touches[0].clientY:"touchend"===a.type?a.changedTouches[0].clientY:a.clientY,"mousedown"===a.type&&1===a.which){var u=n.gridRect.getBoundingClientRect();n.startX=n.clientX-u.left,n.startY=n.clientY-u.top,n.dragged=!1,n.w.globals.mousedown=!0}if(("mousemove"===a.type&&1===a.which||"touchmove"===a.type)&&(n.dragged=!0,s.globals.panEnabled?(s.globals.selection=null,n.w.globals.mousedown&&n.panDragging({context:n,zoomtype:o,xyRatios:i})):(n.w.globals.mousedown&&s.globals.zoomEnabled||n.w.globals.mousedown&&s.globals.selectionEnabled)&&(n.selection=n.selectionDrawing({context:n,zoomtype:o}))),"mouseup"===a.type||"touchend"===a.type||"mouseleave"===a.type){var p=n.gridRect.getBoundingClientRect();n.w.globals.mousedown&&(n.endX=n.clientX-p.left,n.endY=n.clientY-p.top,n.dragX=Math.abs(n.endX-n.startX),n.dragY=Math.abs(n.endY-n.startY),(s.globals.zoomEnabled||s.globals.selectionEnabled)&&n.selectionDrawn({context:n,zoomtype:o}),s.globals.panEnabled&&s.config.xaxis.convertedCatToNumeric&&n.delayedPanScrolled()),s.globals.zoomEnabled&&n.hideSelectionRect(this.selectionRect),n.dragged=!1,n.w.globals.mousedown=!1}this.makeSelectionRectDraggable()}}}},{key:"makeSelectionRectDraggable",value:function(){var i=this.w;if(this.selectionRect){var a=this.selectionRect.node.getBoundingClientRect();a.width>0&&a.height>0&&this.slDraggableRect.selectize({points:"l, r",pointSize:8,pointType:"rect"}).resize({constraint:{minX:0,minY:0,maxX:i.globals.gridWidth,maxY:i.globals.gridHeight}}).on("resizing",this.selectionDragging.bind(this,"resizing"))}}},{key:"preselectedSelection",value:function(){var i=this.w,a=this.xyRatios;if(!i.globals.zoomEnabled)if(null!=i.globals.selection)this.drawSelectionRect(i.globals.selection);else if(void 0!==i.config.chart.selection.xaxis.min&&void 0!==i.config.chart.selection.xaxis.max){var s=(i.config.chart.selection.xaxis.min-i.globals.minX)/a.xRatio;this.drawSelectionRect({x:s,y:0,width:i.globals.gridWidth-(i.globals.maxX-i.config.chart.selection.xaxis.max)/a.xRatio-s,height:i.globals.gridHeight,translateX:0,translateY:0,selectionEnabled:!0}),this.makeSelectionRectDraggable(),"function"==typeof i.config.chart.events.selection&&i.config.chart.events.selection(this.ctx,{xaxis:{min:i.config.chart.selection.xaxis.min,max:i.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(i){var a=i.x,s=i.y,n=i.width,r=i.height,o=i.translateX,c=i.translateY,u=this.w,p=this.zoomRect,x=this.selectionRect;if(this.dragged||null!==u.globals.selection){var f={transform:"translate("+(void 0===o?0:o)+", "+(void 0===c?0:c)+")"};u.globals.zoomEnabled&&this.dragged&&(n<0&&(n=1),p.attr({x:a,y:s,width:n,height:r,fill:u.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":u.config.chart.zoom.zoomedArea.fill.opacity,stroke:u.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":u.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":u.config.chart.zoom.zoomedArea.stroke.opacity}),M.setAttrs(p.node,f)),u.globals.selectionEnabled&&(x.attr({x:a,y:s,width:n>0?n:0,height:r>0?r:0,fill:u.config.chart.selection.fill.color,"fill-opacity":u.config.chart.selection.fill.opacity,stroke:u.config.chart.selection.stroke.color,"stroke-width":u.config.chart.selection.stroke.width,"stroke-dasharray":u.config.chart.selection.stroke.dashArray,"stroke-opacity":u.config.chart.selection.stroke.opacity}),M.setAttrs(x.node,f))}}},{key:"hideSelectionRect",value:function(i){i&&i.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(i){var f,s=i.zoomtype,n=this.w,r=i.context,o=this.gridRect.getBoundingClientRect(),h=r.startX-1,c=r.startY,d=!1,u=!1,p=r.clientX-o.left-h,x=r.clientY-o.top-c;return Math.abs(p+h)>n.globals.gridWidth?p=n.globals.gridWidth-h:r.clientX-o.left<0&&(p=h),h>r.clientX-o.left&&(d=!0,p=Math.abs(p)),c>r.clientY-o.top&&(u=!0,x=Math.abs(x)),r.drawSelectionRect(f="x"===s?{x:d?h-p:h,y:0,width:p,height:n.globals.gridHeight}:"y"===s?{x:0,y:u?c-x:c,width:n.globals.gridWidth,height:x}:{x:d?h-p:h,y:u?c-x:c,width:p,height:x}),r.selectionDragging("resizing"),f}},{key:"selectionDragging",value:function(i,a){var s=this,n=this.w,r=this.xyRatios,o=this.selectionRect,h=0;"resizing"===i&&(h=30);var c=function(u){return parseFloat(o.node.getAttribute(u))},d={x:c("x"),y:c("y"),width:c("width"),height:c("height")};n.globals.selection=d,"function"==typeof n.config.chart.events.selection&&n.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout(function(){var u=s.gridRect.getBoundingClientRect(),p=o.node.getBoundingClientRect(),x={xaxis:{min:n.globals.xAxisScale.niceMin+(p.left-u.left)*r.xRatio,max:n.globals.xAxisScale.niceMin+(p.right-u.left)*r.xRatio},yaxis:{min:n.globals.yAxisScale[0].niceMin+(u.bottom-p.bottom)*r.yRatio[0],max:n.globals.yAxisScale[0].niceMax-(p.top-u.top)*r.yRatio[0]}};n.config.chart.events.selection(s.ctx,x),n.config.chart.brush.enabled&&void 0!==n.config.chart.events.brushScrolled&&n.config.chart.events.brushScrolled(s.ctx,x)},h))}},{key:"selectionDrawn",value:function(i){var s=i.zoomtype,n=this.w,r=i.context,o=this.xyRatios,h=this.ctx.toolbar;if(r.startX>r.endX){var c=r.startX;r.startX=r.endX,r.endX=c}if(r.startY>r.endY){var d=r.startY;r.startY=r.endY,r.endY=d}var u=void 0,p=void 0;n.globals.isRangeBar?(u=n.globals.yAxisScale[0].niceMin+r.startX*o.invertedYRatio,p=n.globals.yAxisScale[0].niceMin+r.endX*o.invertedYRatio):(u=n.globals.xAxisScale.niceMin+r.startX*o.xRatio,p=n.globals.xAxisScale.niceMin+r.endX*o.xRatio);var x=[],f=[];if(n.config.yaxis.forEach(function(v,S){x.push(n.globals.yAxisScale[S].niceMax-o.yRatio[S]*r.startY),f.push(n.globals.yAxisScale[S].niceMax-o.yRatio[S]*r.endY)}),r.dragged&&(r.dragX>10||r.dragY>10)&&u!==p)if(n.globals.zoomEnabled){var b=P.clone(n.globals.initialConfig.yaxis),y=P.clone(n.globals.initialConfig.xaxis);if(n.globals.zoomed=!0,n.config.xaxis.convertedCatToNumeric&&(u=Math.floor(u),p=Math.floor(p),u<1&&(u=1,p=n.globals.dataPoints),p-u<2&&(p=u+1)),"xy"!==s&&"x"!==s||(y={min:u,max:p}),"xy"!==s&&"y"!==s||b.forEach(function(v,S){b[S].min=f[S],b[S].max=x[S]}),n.config.chart.zoom.autoScaleYaxis){var k=new he(r.ctx);b=k.autoScaleY(r.ctx,b,{xaxis:y})}if(h){var A=h.getBeforeZoomRange(y,b);A&&(y=A.xaxis?A.xaxis:y,b=A.yaxis?A.yaxis:b)}var l={xaxis:y};n.config.chart.group||(l.yaxis=b),r.ctx.updateHelpers._updateOptions(l,!1,r.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof n.config.chart.events.zoomed&&h.zoomCallback(y,b)}else if(n.globals.selectionEnabled){var g,m=null;g={min:u,max:p},"xy"!==s&&"y"!==s||(m=P.clone(n.config.yaxis)).forEach(function(v,S){m[S].min=f[S],m[S].max=x[S]}),n.globals.selection=r.selection,"function"==typeof n.config.chart.events.selection&&n.config.chart.events.selection(r.ctx,{xaxis:g,yaxis:m})}}},{key:"panDragging",value:function(i){var s=this.w,n=i.context;if(void 0!==s.globals.lastClientPosition.x){var r=s.globals.lastClientPosition.x-n.clientX,o=s.globals.lastClientPosition.y-n.clientY;Math.abs(r)>Math.abs(o)&&r>0?this.moveDirection="left":Math.abs(r)>Math.abs(o)&&r<0?this.moveDirection="right":Math.abs(o)>Math.abs(r)&&o>0?this.moveDirection="up":Math.abs(o)>Math.abs(r)&&o<0&&(this.moveDirection="down")}s.globals.lastClientPosition={x:n.clientX,y:n.clientY},s.config.xaxis.convertedCatToNumeric||n.panScrolled(s.globals.isRangeBar?s.globals.minY:s.globals.minX,s.globals.isRangeBar?s.globals.maxY:s.globals.maxX)}},{key:"delayedPanScrolled",value:function(){var i=this.w,a=i.globals.minX,s=i.globals.maxX,n=(i.globals.maxX-i.globals.minX)/2;"left"===this.moveDirection?(a=i.globals.minX+n,s=i.globals.maxX+n):"right"===this.moveDirection&&(a=i.globals.minX-n,s=i.globals.maxX-n),a=Math.floor(a),s=Math.floor(s),this.updateScrolledChart({xaxis:{min:a,max:s}},a,s)}},{key:"panScrolled",value:function(i,a){var s=this.w,n=this.xyRatios,r=P.clone(s.globals.initialConfig.yaxis),o=n.xRatio,h=s.globals.minX,c=s.globals.maxX;s.globals.isRangeBar&&(o=n.invertedYRatio,h=s.globals.minY,c=s.globals.maxY),"left"===this.moveDirection?(i=h+s.globals.gridWidth/15*o,a=c+s.globals.gridWidth/15*o):"right"===this.moveDirection&&(i=h-s.globals.gridWidth/15*o,a=c-s.globals.gridWidth/15*o),s.globals.isRangeBar||(i<s.globals.initialMinX||a>s.globals.initialMaxX)&&(i=h,a=c);var d={min:i,max:a};s.config.chart.zoom.autoScaleYaxis&&(r=new he(this.ctx).autoScaleY(this.ctx,r,{xaxis:d}));var u={xaxis:{min:i,max:a}};s.config.chart.group||(u.yaxis=r),this.updateScrolledChart(u,i,a)}},{key:"updateScrolledChart",value:function(i,a,s){var n=this.w;this.ctx.updateHelpers._updateOptions(i,!1,!1),"function"==typeof n.config.chart.events.scrolled&&n.config.chart.events.scrolled(this.ctx,{xaxis:{min:a,max:s}})}}]),t}(),B=function(){function w(e){C(this,w),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return Y(w,[{key:"getNearestValues",value:function(e){var t=e.hoverArea,a=e.clientX,s=e.clientY,n=this.w,r=e.elGrid.getBoundingClientRect(),o=r.width,h=r.height,c=o/(n.globals.dataPoints-1),d=h/n.globals.dataPoints,u=this.hasBars();!n.globals.comboCharts&&!u||n.config.xaxis.convertedCatToNumeric||(c=o/n.globals.dataPoints);var p=a-r.left-n.globals.barPadForNumericAxis,x=s-r.top;p<0||x<0||p>o||x>h?(t.classList.remove("hovering-zoom"),t.classList.remove("hovering-pan")):n.globals.zoomEnabled?(t.classList.remove("hovering-pan"),t.classList.add("hovering-zoom")):n.globals.panEnabled&&(t.classList.remove("hovering-zoom"),t.classList.add("hovering-pan"));var f=Math.round(p/c),b=Math.floor(x/d);u&&!n.config.xaxis.convertedCatToNumeric&&(f=Math.ceil(p/c),f-=1);for(var y,k=null,A=null,l=[],g=0;g<n.globals.seriesXvalues.length;g++)l.push([n.globals.seriesXvalues[g][0]-1e-6].concat(n.globals.seriesXvalues[g]));if(l=l.map(function(T){return T.filter(function(L){return L})}),y=n.globals.seriesYvalues.map(function(T){return T.filter(function(L){return P.isNumber(L)})}),n.globals.isXNumeric){var m=this.ttCtx.getElGrid().getBoundingClientRect(),v=p*(m.width/o);k=(A=this.closestInMultiArray(v,x*(m.height/h),l,y)).index,f=A.j,null!==k&&(f=(A=this.closestInArray(v,l=n.globals.seriesXvalues[k])).index)}return n.globals.capturedSeriesIndex=null===k?-1:k,(!f||f<1)&&(f=0),n.globals.capturedDataPointIndex=n.globals.isBarHorizontal?b:f,{capturedSeries:k,j:n.globals.isBarHorizontal?b:f,hoverX:p,hoverY:x}}},{key:"closestInMultiArray",value:function(e,t,i,a){var n=0,r=null,o=-1;this.w.globals.series.length>1?n=this.getFirstActiveXArray(i,a):r=0;var h=a[n][0],d=Math.abs(e-i[n][0]),u=Math.abs(t-h),p=u+d;return a.map(function(x,f){x.map(function(b,y){var k=Math.abs(t-a[f][y]),A=Math.abs(e-i[f][y]),l=A+k;l<p&&(p=l,d=A,u=k,r=f,o=y)})}),{index:r,j:o}}},{key:"getFirstActiveXArray",value:function(e,t){for(var i=0,a=e.map(function(n,r){return n.length>0&&t[r].length>0?r:-1}),s=0;s<a.length;s++)if(-1!==a[s]){i=a[s];break}return i}},{key:"closestInArray",value:function(e,t){for(var a=null,s=Math.abs(e-t[0]),n=0;n<t.length;n++){var r=Math.abs(e-t[n]);r<s&&(s=r,a=n)}return{index:a}}},{key:"isXoverlap",value:function(e){var t=[],i=this.w.globals.seriesX.filter(function(s){return void 0!==s[0]});if(i.length>0)for(var a=0;a<i.length-1;a++)void 0!==i[a][e]&&void 0!==i[a+1][e]&&i[a][e]!==i[a+1][e]&&t.push("unEqual");return 0===t.length}},{key:"isInitialSeriesSameLen",value:function(){for(var e=!0,t=this.w.globals.initialSeries,i=0;i<t.length-1;i++)if(t[i].data.length!==t[i+1].data.length){e=!1;break}return e}},{key:"getBarsHeight",value:function(e){return te(e).reduce(function(t,i){return t+i.getBBox().height},0)}},{key:"getElMarkers",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(" .apexcharts-series-markers")}},{key:"getAllMarkers",value:function(){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(e=te(e)).sort(function(i,a){return Number(a.getAttribute("data:realIndex"))<Number(i.getAttribute("data:realIndex"))?0:-1});var t=[];return e.forEach(function(i){t.push(i.querySelector(".apexcharts-marker"))}),t}},{key:"hasMarkers",value:function(){return this.getElMarkers().length>0}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(e){var t=this.w,i=t.config.markers.hover.size;return void 0===i&&(i=t.globals.markers.size[e]+t.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(e){var t=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=t.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=i.allTooltipSeriesGroups,s=0;s<a.length;s++)"enable"===e?(a[s].classList.add("apexcharts-active"),a[s].style.display=t.config.tooltip.items.display):(a[s].classList.remove("apexcharts-active"),a[s].style.display="none")}}]),w}(),q=function(){function w(e){C(this,w),this.w=e.w,this.ctx=e.ctx,this.ttCtx=e,this.tooltipUtil=new B(e)}return Y(w,[{key:"drawSeriesTexts",value:function(e){var t=e.shared,i=void 0===t||t,a=e.ttItems,s=e.i,n=void 0===s?0:s,r=e.j,o=void 0===r?null:r,d=e.e,u=this.w;void 0!==u.config.tooltip.custom?this.handleCustomTooltip({i:n,j:o,y1:e.y1,y2:e.y2,w:u}):this.toggleActiveInactiveSeries(i);var p=this.getValuesToPrint({i:n,j:o});this.printLabels({i:n,j:o,values:p,ttItems:a,shared:i,e:d});var x=this.ttCtx.getElTooltip();this.ttCtx.tooltipRect.ttWidth=x.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=x.getBoundingClientRect().height}},{key:"printLabels",value:function(e){var t,i=this,a=e.i,s=e.j,n=e.values,r=e.ttItems,o=e.shared,h=e.e,c=this.w,d=[],u=function(g){return c.globals.seriesGoals[g]&&c.globals.seriesGoals[g][s]&&Array.isArray(c.globals.seriesGoals[g][s])},p=n.xVal,x=n.zVal,f=n.xAxisTTVal,b="",y=c.globals.colors[a];null!==s&&c.config.plotOptions.bar.distributed&&(y=c.globals.colors[s]);for(var k=function(g,m){var v=i.getFormatters(a);b=i.getSeriesName({fn:v.yLbTitleFormatter,index:a,seriesIndex:a,j:s}),"treemap"===c.config.chart.type&&(b=v.yLbTitleFormatter(String(c.config.series[a].data[s].x),{series:c.globals.series,seriesIndex:a,dataPointIndex:s,w:c}));var S=c.config.tooltip.inverseOrder?m:g;if(c.globals.axisCharts){var T=function(L){return v.yLbFormatter(c.globals.series[L][s],{series:c.globals.series,seriesIndex:L,dataPointIndex:s,w:c})};o?(v=i.getFormatters(S),b=i.getSeriesName({fn:v.yLbTitleFormatter,index:S,seriesIndex:a,j:s}),y=c.globals.colors[S],t=T(S),u(S)&&(d=c.globals.seriesGoals[S][s].map(function(L){return{attrs:L,val:v.yLbFormatter(L.value,{seriesIndex:S,dataPointIndex:s,w:c})}}))):(h&&h.target&&h.target.getAttribute("fill")&&(y=h.target.getAttribute("fill")),t=T(a),u(a)&&Array.isArray(c.globals.seriesGoals[a][s])&&(d=c.globals.seriesGoals[a][s].map(function(L){return{attrs:L,val:v.yLbFormatter(L.value,{seriesIndex:a,dataPointIndex:s,w:c})}})))}null===s&&(t=v.yLbFormatter(c.globals.series[a],R(R({},c),{},{seriesIndex:a,dataPointIndex:a}))),i.DOMHandling({i:a,t:S,j:s,ttItems:r,values:{val:t,goalVals:d,xVal:p,xAxisTTVal:f,zVal:x},seriesName:b,shared:o,pColor:y})},A=0,l=c.globals.series.length-1;A<c.globals.series.length;A++,l--)k(A,l)}},{key:"getFormatters",value:function(e){var t,i=this.w,a=i.globals.yLabelFormatters[e];return void 0!==i.globals.ttVal?Array.isArray(i.globals.ttVal)?(a=i.globals.ttVal[e]&&i.globals.ttVal[e].formatter,t=i.globals.ttVal[e]&&i.globals.ttVal[e].title&&i.globals.ttVal[e].title.formatter):(a=i.globals.ttVal.formatter,"function"==typeof i.globals.ttVal.title.formatter&&(t=i.globals.ttVal.title.formatter)):t=i.config.tooltip.y.title.formatter,"function"!=typeof a&&(a=i.globals.yLabelFormatters[0]?i.globals.yLabelFormatters[0]:function(s){return s}),"function"!=typeof t&&(t=function(s){return s}),{yLbFormatter:a,yLbTitleFormatter:t}}},{key:"getSeriesName",value:function(e){var a=e.seriesIndex,s=e.j,n=this.w;return(0,e.fn)(String(n.globals.seriesNames[e.index]),{series:n.globals.series,seriesIndex:a,dataPointIndex:s,w:n})}},{key:"DOMHandling",value:function(e){var t=e.t,i=e.j,a=e.ttItems,s=e.values,n=e.seriesName,r=e.shared,o=e.pColor,h=this.w,c=this.ttCtx,d=s.val,u=s.goalVals,p=s.xVal,x=s.xAxisTTVal,f=s.zVal,b=null;b=a[t].children,h.config.tooltip.fillSeriesColor&&(a[t].style.backgroundColor=o,b[0].style.display="none"),c.showTooltipTitle&&(null===c.tooltipTitle&&(c.tooltipTitle=h.globals.dom.baseEl.querySelector(".apexcharts-tooltip-title")),c.tooltipTitle.innerHTML=p),c.isXAxisTooltipEnabled&&(c.xaxisTooltipText.innerHTML=""!==x?x:p);var y=a[t].querySelector(".apexcharts-tooltip-text-y-label");y&&(y.innerHTML=n||"");var k=a[t].querySelector(".apexcharts-tooltip-text-y-value");k&&(k.innerHTML=void 0!==d?d:""),b[0]&&b[0].classList.contains("apexcharts-tooltip-marker")&&(h.config.tooltip.marker.fillColors&&Array.isArray(h.config.tooltip.marker.fillColors)&&(o=h.config.tooltip.marker.fillColors[t]),b[0].style.backgroundColor=o),h.config.tooltip.marker.show||(b[0].style.display="none");var A=a[t].querySelector(".apexcharts-tooltip-text-goals-label"),l=a[t].querySelector(".apexcharts-tooltip-text-goals-value");if(u.length&&h.globals.seriesGoals[t]){var g=function(){var m="<div >",v="<div>";u.forEach(function(S,T){m+=' <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: '.concat(S.attrs.strokeColor,'; height: 3px; border-radius: 0; top: 5px;"></span> ').concat(S.attrs.name,"</div>"),v+="<div>".concat(S.val,"</div>")}),A.innerHTML=m+"</div>",l.innerHTML=v+"</div>"};r?h.globals.seriesGoals[t][i]&&Array.isArray(h.globals.seriesGoals[t][i])?g():(A.innerHTML="",l.innerHTML=""):g()}else A.innerHTML="",l.innerHTML="";null!==f&&(a[t].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=h.config.tooltip.z.title,a[t].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==f?f:""),r&&b[0]&&(b[0].parentNode.style.display=null==d||h.globals.collapsedSeriesIndices.indexOf(t)>-1?"none":h.config.tooltip.items.display)}},{key:"toggleActiveInactiveSeries",value:function(e){var t=this.w;if(e)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var i=t.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group");i&&(i.classList.add("apexcharts-active"),i.style.display=t.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(e){var t=e.i,i=e.j,a=this.w,s=this.ctx.series.filteredSeriesX(),n="",r="",o=null,h=null,c={series:a.globals.series,seriesIndex:t,dataPointIndex:i,w:a},d=a.globals.ttZFormatter;null===i?h=a.globals.series[t]:a.globals.isXNumeric&&"treemap"!==a.config.chart.type?(n=s[t][i],0===s[t].length&&(n=s[this.tooltipUtil.getFirstActiveXArray(s)][i])):n=void 0!==a.globals.labels[i]?a.globals.labels[i]:"";var u=n;return n=a.globals.isXNumeric&&"datetime"===a.config.xaxis.type?new Ae(this.ctx).xLabelFormat(a.globals.ttKeyFormatter,u,u,{i:void 0,dateFormatter:new U(this.ctx).formatDate,w:this.w}):a.globals.isBarHorizontal?a.globals.yLabelFormatters[0](u,c):a.globals.xLabelFormatter(u,c),void 0!==a.config.tooltip.x.formatter&&(n=a.globals.ttKeyFormatter(u,c)),a.globals.seriesZ.length>0&&a.globals.seriesZ[t].length>0&&(o=d(a.globals.seriesZ[t][i],a)),r="function"==typeof a.config.xaxis.tooltip.formatter?a.globals.xaxisTooltipFormatter(u,c):n,{val:Array.isArray(h)?h.join(" "):h,xVal:Array.isArray(n)?n.join(" "):n,xAxisTTVal:Array.isArray(r)?r.join(" "):r,zVal:o}}},{key:"handleCustomTooltip",value:function(e){var t=e.i,i=e.j,a=e.y1,s=e.y2,n=e.w,r=this.ttCtx.getElTooltip(),o=n.config.tooltip.custom;Array.isArray(o)&&o[t]&&(o=o[t]),r.innerHTML=o({ctx:this.ctx,series:n.globals.series,seriesIndex:t,dataPointIndex:i,y1:a,y2:s,w:n})}}]),w}(),oe=function(){function w(e){C(this,w),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return Y(w,[{key:"moveXCrosshairs",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,a=this.w,s=i.getElXCrosshairs(),n=e-i.xcrosshairsWidth/2,r=a.globals.labels.slice().length;if(null!==t&&(n=a.globals.gridWidth/r*t),null===s||a.globals.isBarHorizontal||(s.setAttribute("x",n),s.setAttribute("x1",n),s.setAttribute("x2",n),s.setAttribute("y2",a.globals.gridHeight),s.classList.add("apexcharts-active")),n<0&&(n=0),n>a.globals.gridWidth&&(n=a.globals.gridWidth),i.isXAxisTooltipEnabled){var o=n;"tickWidth"!==a.config.xaxis.crosshairs.width&&"barWidth"!==a.config.xaxis.crosshairs.width||(o=n+i.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}},{key:"moveYCrosshairs",value:function(e){var t=this.ttCtx;null!==t.ycrosshairs&&M.setAttrs(t.ycrosshairs,{y1:e,y2:e}),null!==t.ycrosshairsHidden&&M.setAttrs(t.ycrosshairsHidden,{y1:e,y2:e})}},{key:"moveXAxisTooltip",value:function(e){var t=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip&&0!==i.xcrosshairsWidth){i.xaxisTooltip.classList.add("apexcharts-active");var s,a=i.xaxisOffY+t.config.xaxis.tooltip.offsetY+t.globals.translateY+1+t.config.xaxis.offsetY;e-=i.xaxisTooltip.getBoundingClientRect().width/2,isNaN(e)||(e+=t.globals.translateX,s=new M(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=s.width+"px",i.xaxisTooltip.style.left=e+"px",i.xaxisTooltip.style.top=a+"px")}}},{key:"moveYAxisTooltip",value:function(e){var t=this.w,i=this.ttCtx;null===i.yaxisTTEls&&(i.yaxisTTEls=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var a=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),s=t.globals.translateY+a,n=i.yaxisTTEls[e].getBoundingClientRect().height,r=t.globals.translateYAxisX[e]-2;t.config.yaxis[e].opposite&&(r-=26),s-=n/2,-1===t.globals.ignoreYAxisIndexes.indexOf(e)?(i.yaxisTTEls[e].classList.add("apexcharts-active"),i.yaxisTTEls[e].style.top=s+"px",i.yaxisTTEls[e].style.left=r+t.config.yaxis[e].tooltip.offsetX+"px"):i.yaxisTTEls[e].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=this.ttCtx,n=s.getElTooltip(),r=s.tooltipRect,o=null!==i?parseFloat(i):1,h=parseFloat(e)+o+5,c=parseFloat(t)+o/2;if(h>a.globals.gridWidth/2&&(h=h-r.ttWidth-o-15),h>a.globals.gridWidth-r.ttWidth-10&&(h=a.globals.gridWidth-r.ttWidth),h<-20&&(h=-20),a.config.tooltip.followCursor){var d=s.getElGrid(),u=d.getBoundingClientRect();c=s.e.clientY+a.globals.translateY-u.top-r.ttHeight/2}else a.globals.isBarHorizontal?c-=r.ttHeight:(r.ttHeight/2+c>a.globals.gridHeight&&(c=a.globals.gridHeight-r.ttHeight+a.globals.translateY),c<0&&(c=0));isNaN(h)||(n.style.left=(h+=a.globals.translateX)+"px",n.style.top=c+"px")}},{key:"moveMarkers",value:function(e,t){var i=this.w,a=this.ttCtx;if(i.globals.markers.size[e]>0)for(var s=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-marker")),n=0;n<s.length;n++)parseInt(s[n].getAttribute("rel"),10)===t&&(a.marker.resetPointsSize(),a.marker.enlargeCurrentPoint(t,s[n]));else a.marker.resetPointsSize(),this.moveDynamicPointOnHover(t,e)}},{key:"moveDynamicPointOnHover",value:function(e,t){var i,a,s=this.w,n=this.ttCtx,r=s.globals.pointsArray,o=n.tooltipUtil.getHoverMarkerSize(t),h=s.config.series[t].type;if(!h||"column"!==h&&"candlestick"!==h&&"boxPlot"!==h){i=r[t][e][0],a=r[t][e][1]?r[t][e][1]:0;var c=s.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-series-markers circle"));c&&a<s.globals.gridHeight&&a>0&&(c.setAttribute("r",o),c.setAttribute("cx",i),c.setAttribute("cy",a)),this.moveXCrosshairs(i),n.fixedTooltip||this.moveTooltip(i,a,o)}}},{key:"moveDynamicPointsOnHover",value:function(e){var t,i=this.ttCtx,a=i.w,s=0,n=0,r=a.globals.pointsArray;t=new K(this.ctx).getActiveConfigSeriesIndex(!0);var o=i.tooltipUtil.getHoverMarkerSize(t);r[t]&&(s=r[t][e][0],n=r[t][e][1]);var h=i.tooltipUtil.getAllMarkers();if(null!==h)for(var c=0;c<a.globals.series.length;c++){var d=r[c];if(a.globals.comboCharts&&void 0===d&&h.splice(c,0,null),d&&d.length){var u=r[c][e][1];h[c].setAttribute("cx",s),null!==u&&!isNaN(u)&&u<a.globals.gridHeight&&u>0?(h[c]&&h[c].setAttribute("r",o),h[c]&&h[c].setAttribute("cy",u)):h[c]&&h[c].setAttribute("r",0)}}this.moveXCrosshairs(s),i.fixedTooltip||this.moveTooltip(s,n||a.globals.gridHeight,o)}},{key:"moveStickyTooltipOverBars",value:function(e){var t=this.w,i=this.ttCtx,a=t.globals.columnSeries?t.globals.columnSeries.length:t.globals.series.length,s=a>=2&&a%2==0?Math.floor(a/2):Math.floor(a/2)+1;t.globals.isBarHorizontal&&(s=new K(this.ctx).getActiveConfigSeriesIndex(!1,"desc")+1);var n=t.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(s,"'] path[j='").concat(e,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(s,"'] path[j='").concat(e,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(s,"'] path[j='").concat(e,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(s,"'] path[j='").concat(e,"']")),r=n?parseFloat(n.getAttribute("cx")):0,o=n?parseFloat(n.getAttribute("cy")):0,h=n?parseFloat(n.getAttribute("barWidth")):0,c=n?parseFloat(n.getAttribute("barHeight")):0,d=i.getElGrid().getBoundingClientRect(),u=n.classList.contains("apexcharts-candlestick-area")||n.classList.contains("apexcharts-boxPlot-area");t.globals.isXNumeric?(n&&!u&&(r-=a%2!=0?h/2:0),n&&u&&t.globals.comboCharts&&(r-=h/2)):t.globals.isBarHorizontal||(r=i.xAxisTicksPositions[e-1]+i.dataPointsDividedWidth/2,isNaN(r)&&(r=i.xAxisTicksPositions[e]-i.dataPointsDividedWidth/2)),t.globals.isBarHorizontal?o+=c/3:o=i.e.clientY-d.top-i.tooltipRect.ttHeight/2,t.globals.isBarHorizontal||this.moveXCrosshairs(r),i.fixedTooltip||this.moveTooltip(r,o||t.globals.gridHeight)}}]),w}(),vt=function(){function w(e){C(this,w),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new oe(e)}return Y(w,[{key:"drawDynamicPoints",value:function(){var e=this.w,t=new M(this.ctx),i=new we(this.ctx),a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");a=te(a),e.config.chart.stacked&&a.sort(function(d,u){return parseFloat(d.getAttribute("data:realIndex"))-parseFloat(u.getAttribute("data:realIndex"))});for(var s=0;s<a.length;s++){var n=a[s].querySelector(".apexcharts-series-markers-wrap");if(null!==n){var r=void 0,o="apexcharts-marker w".concat((Math.random()+1).toString(36).substring(4));"line"!==e.config.chart.type&&"area"!==e.config.chart.type||e.globals.comboCharts||e.config.tooltip.intersect||(o+=" no-pointer-events");var h=i.getMarkerConfig({cssClass:o,seriesIndex:Number(n.getAttribute("data:realIndex"))});(r=t.drawMarker(0,0,h)).node.setAttribute("default-marker-size",0);var c=document.createElementNS(e.globals.SVGNS,"g");c.classList.add("apexcharts-series-markers"),c.appendChild(r.node),n.appendChild(c)}}}},{key:"enlargeCurrentPoint",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w;"bubble"!==s.config.chart.type&&this.newPointSize(e,t);var n=t.getAttribute("cx"),r=t.getAttribute("cy");if(null!==i&&null!==a&&(n=i,r=a),this.tooltipPosition.moveXCrosshairs(n),!this.fixedTooltip){if("radar"===s.config.chart.type){var o=this.ttCtx.getElGrid(),h=o.getBoundingClientRect();n=this.ttCtx.e.clientX-h.left}this.tooltipPosition.moveTooltip(n,r,s.config.markers.hover.size)}}},{key:"enlargePoints",value:function(e){for(var t=this.w,i=this,a=this.ttCtx,s=e,n=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),r=t.config.markers.hover.size,o=0;o<n.length;o++){var h=n[o].getAttribute("rel"),c=n[o].getAttribute("index");if(void 0===r&&(r=t.globals.markers.size[c]+t.config.markers.hover.sizeOffset),s===parseInt(h,10)){i.newPointSize(s,n[o]);var d=n[o].getAttribute("cx"),u=n[o].getAttribute("cy");i.tooltipPosition.moveXCrosshairs(d),a.fixedTooltip||i.tooltipPosition.moveTooltip(d,u,r)}else i.oldPointSize(n[o])}}},{key:"newPointSize",value:function(e,t){var i=this.w,a=i.config.markers.hover.size,s=0===e?t.parentNode.firstChild:t.parentNode.lastChild;if("0"!==s.getAttribute("default-marker-size")){var n=parseInt(s.getAttribute("index"),10);void 0===a&&(a=i.globals.markers.size[n]+i.config.markers.hover.sizeOffset),a<0&&(a=0),s.setAttribute("r",a)}}},{key:"oldPointSize",value:function(e){var t=parseFloat(e.getAttribute("default-marker-size"));e.setAttribute("r",t)}},{key:"resetPointsSize",value:function(){for(var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),t=0;t<e.length;t++){var i=parseFloat(e[t].getAttribute("default-marker-size"));P.isNumber(i)&&i>=0?e[t].setAttribute("r",i):e[t].setAttribute("r",0)}}}]),w}(),yt=function(){function w(e){C(this,w),this.w=e.w,this.ttCtx=e}return Y(w,[{key:"getAttr",value:function(e,t){return parseFloat(e.target.getAttribute(t))}},{key:"handleHeatTreeTooltip",value:function(e){var t=e.e,i=e.opt,a=e.x,s=e.y,r=this.ttCtx,o=this.w;if(t.target.classList.contains("apexcharts-".concat(e.type,"-rect"))){var h=this.getAttr(t,"i"),c=this.getAttr(t,"j"),d=this.getAttr(t,"cx"),u=this.getAttr(t,"cy"),p=this.getAttr(t,"width"),x=this.getAttr(t,"height");if(r.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:h,j:c,shared:!1,e:t}),o.globals.capturedSeriesIndex=h,o.globals.capturedDataPointIndex=c,a=d+r.tooltipRect.ttWidth/2+p,s=u+r.tooltipRect.ttHeight/2-x/2,r.tooltipPosition.moveXCrosshairs(d+p/2),a>o.globals.gridWidth/2&&(a=d-r.tooltipRect.ttWidth/2+p),r.w.config.tooltip.followCursor){var f=o.globals.dom.elWrap.getBoundingClientRect();a=o.globals.clientX-f.left-r.tooltipRect.ttWidth/2,s=o.globals.clientY-f.top-r.tooltipRect.ttHeight-5}}return{x:a,y:s}}},{key:"handleMarkerTooltip",value:function(e){var t,i,a=e.e,s=e.opt,n=e.x,r=e.y,o=this.w,h=this.ttCtx;if(a.target.classList.contains("apexcharts-marker")){var c=parseInt(s.paths.getAttribute("cx"),10),d=parseInt(s.paths.getAttribute("cy"),10),u=parseFloat(s.paths.getAttribute("val"));if(i=parseInt(s.paths.getAttribute("rel"),10),t=parseInt(s.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,h.intersect){var p=P.findAncestor(s.paths,"apexcharts-series");p&&(t=parseInt(p.getAttribute("data:realIndex"),10))}if(h.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:t,j:i,shared:!h.showOnIntersect&&o.config.tooltip.shared,e:a}),"mouseup"===a.type&&h.markerClick(a,t,i),o.globals.capturedSeriesIndex=t,o.globals.capturedDataPointIndex=i,n=c,r=d+o.globals.translateY-1.4*h.tooltipRect.ttHeight,h.w.config.tooltip.followCursor){var x=h.getElGrid().getBoundingClientRect();r=h.e.clientY+o.globals.translateY-x.top}u<0&&(r=d),h.marker.enlargeCurrentPoint(i,s.paths,n,r)}return{x:n,y:r}}},{key:"handleBarTooltip",value:function(e){var t,i,a=e.e,s=e.opt,n=this.w,r=this.ttCtx,o=r.getElTooltip(),h=0,c=0,d=0,u=this.getBarTooltipXY({e:a,opt:s}),p=u.barHeight,x=u.j;n.globals.capturedSeriesIndex=t=u.i,n.globals.capturedDataPointIndex=x,n.globals.isBarHorizontal&&r.tooltipUtil.hasBars()||!n.config.tooltip.shared?(c=u.x,d=u.y,i=Array.isArray(n.config.stroke.width)?n.config.stroke.width[t]:n.config.stroke.width,h=c):n.globals.comboCharts||n.config.tooltip.shared||(h/=2),isNaN(d)?d=n.globals.svgHeight-r.tooltipRect.ttHeight:d<0&&(d=0);var f=parseInt(s.paths.parentNode.getAttribute("data:realIndex"),10),b=n.globals.isMultipleYAxis?n.config.yaxis[f]&&n.config.yaxis[f].reversed:n.config.yaxis[0].reversed;if(c+r.tooltipRect.ttWidth>n.globals.gridWidth&&!b?c-=r.tooltipRect.ttWidth:c<0&&(c=0),r.w.config.tooltip.followCursor){var y=r.getElGrid().getBoundingClientRect();d=r.e.clientY-y.top}null===r.tooltip&&(r.tooltip=n.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),n.config.tooltip.shared||r.tooltipPosition.moveXCrosshairs(n.globals.comboBarCount>0?h+i/2:h),!r.fixedTooltip&&(!n.config.tooltip.shared||n.globals.isBarHorizontal&&r.tooltipUtil.hasBars())&&(b&&(c-=r.tooltipRect.ttWidth)<0&&(c=0),!b||n.globals.isBarHorizontal&&r.tooltipUtil.hasBars()||(d=d+p-2*(n.globals.series[t][x]<0?p:0)),r.tooltipRect.ttHeight+d>n.globals.gridHeight?d=n.globals.gridHeight-r.tooltipRect.ttHeight+n.globals.translateY:(d=d+n.globals.translateY-r.tooltipRect.ttHeight/2)<0&&(d=0),o.style.left=c+n.globals.translateX+"px",o.style.top=d+"px")}},{key:"getBarTooltipXY",value:function(e){var t=e.e,i=e.opt,a=this.w,s=null,n=this.ttCtx,r=0,o=0,h=0,c=0,d=0,u=t.target.classList;if(u.contains("apexcharts-bar-area")||u.contains("apexcharts-candlestick-area")||u.contains("apexcharts-boxPlot-area")||u.contains("apexcharts-rangebar-area")){var p=t.target,x=p.getBoundingClientRect(),f=i.elGrid.getBoundingClientRect(),b=x.height;d=x.height;var y=x.width,k=parseInt(p.getAttribute("cx"),10),A=parseInt(p.getAttribute("cy"),10);c=parseFloat(p.getAttribute("barWidth"));var l="touchmove"===t.type?t.touches[0].clientX:t.clientX;s=parseInt(p.getAttribute("j"),10),r=parseInt(p.parentNode.getAttribute("rel"),10)-1;var g=p.getAttribute("data-range-y1"),m=p.getAttribute("data-range-y2");a.globals.comboCharts&&(r=parseInt(p.parentNode.getAttribute("data:realIndex"),10)),n.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:r,j:s,y1:g?parseInt(g,10):null,y2:m?parseInt(m,10):null,shared:!n.showOnIntersect&&a.config.tooltip.shared,e:t}),a.config.tooltip.followCursor?a.globals.isBarHorizontal?(o=l-f.left+15,h=A-n.dataPointsDividedHeight+b/2-n.tooltipRect.ttHeight/2):(o=a.globals.isXNumeric?k-y/2:k-n.dataPointsDividedWidth+y/2,h=t.clientY-f.top-n.tooltipRect.ttHeight/2-15):a.globals.isBarHorizontal?((o=k)<n.xyRatios.baseLineInvertedY&&(o=k-n.tooltipRect.ttWidth),h=A-n.dataPointsDividedHeight+b/2-n.tooltipRect.ttHeight/2):(o=a.globals.isXNumeric?k-y/2:k-n.dataPointsDividedWidth+y/2,h=A)}return{x:o,y:h,barHeight:d,barWidth:c,i:r,j:s}}}]),w}(),wt=function(){function w(e){C(this,w),this.w=e.w,this.ttCtx=e}return Y(w,[{key:"drawXaxisTooltip",value:function(){var e=this.w,t=this.ttCtx,i="bottom"===e.config.xaxis.position;t.xaxisOffY=i?e.globals.gridHeight+1:-e.globals.xAxisHeight-e.config.xaxis.axisTicks.height+3;var a=i?"apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom":"apexcharts-xaxistooltip apexcharts-xaxistooltip-top",s=e.globals.dom.elWrap;t.isXAxisTooltipEnabled&&null===e.globals.dom.baseEl.querySelector(".apexcharts-xaxistooltip")&&(t.xaxisTooltip=document.createElement("div"),t.xaxisTooltip.setAttribute("class",a+" apexcharts-theme-"+e.config.tooltip.theme),s.appendChild(t.xaxisTooltip),t.xaxisTooltipText=document.createElement("div"),t.xaxisTooltipText.classList.add("apexcharts-xaxistooltip-text"),t.xaxisTooltipText.style.fontFamily=e.config.xaxis.tooltip.style.fontFamily||e.config.chart.fontFamily,t.xaxisTooltipText.style.fontSize=e.config.xaxis.tooltip.style.fontSize,t.xaxisTooltip.appendChild(t.xaxisTooltipText))}},{key:"drawYaxisTooltip",value:function(){for(var e=this.w,t=this.ttCtx,i=function(s){var n=e.config.yaxis[s].opposite||e.config.yaxis[s].crosshairs.opposite;t.yaxisOffX=n?e.globals.gridWidth+1:1;var r="apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(s,n?" apexcharts-yaxistooltip-right":" apexcharts-yaxistooltip-left");e.globals.yAxisSameScaleIndices.map(function(h,c){h.map(function(d,u){u===s&&(r+=e.config.yaxis[u].show?" ":" apexcharts-yaxistooltip-hidden")})});var o=e.globals.dom.elWrap;null===e.globals.dom.baseEl.querySelector(".apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(s))&&(t.yaxisTooltip=document.createElement("div"),t.yaxisTooltip.setAttribute("class",r+" apexcharts-theme-"+e.config.tooltip.theme),o.appendChild(t.yaxisTooltip),0===s&&(t.yaxisTooltipText=[]),t.yaxisTooltipText[s]=document.createElement("div"),t.yaxisTooltipText[s].classList.add("apexcharts-yaxistooltip-text"),t.yaxisTooltip.appendChild(t.yaxisTooltipText[s]))},a=0;a<e.config.yaxis.length;a++)i(a)}},{key:"setXCrosshairWidth",value:function(){var e=this.w,t=this.ttCtx,i=t.getElXCrosshairs();if(t.xcrosshairsWidth=parseInt(e.config.xaxis.crosshairs.width,10),e.globals.comboCharts){var a=e.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(null!==a&&"barWidth"===e.config.xaxis.crosshairs.width){var s=parseFloat(a.getAttribute("barWidth"));t.xcrosshairsWidth=s}else"tickWidth"===e.config.xaxis.crosshairs.width&&(t.xcrosshairsWidth=e.globals.gridWidth/e.globals.labels.length)}else if("tickWidth"===e.config.xaxis.crosshairs.width)t.xcrosshairsWidth=e.globals.gridWidth/e.globals.labels.length;else if("barWidth"===e.config.xaxis.crosshairs.width){var o=e.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(null!==o){var h=parseFloat(o.getAttribute("barWidth"));t.xcrosshairsWidth=h}else t.xcrosshairsWidth=1}e.globals.isBarHorizontal&&(t.xcrosshairsWidth=0),null!==i&&t.xcrosshairsWidth>0&&i.setAttribute("width",t.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var e=this.w,t=this.ttCtx;t.ycrosshairs=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),t.ycrosshairsHidden=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(e,t,i){var a=this.ttCtx,s=this.w,n=s.globals.yLabelFormatters[e];if(a.yaxisTooltips[e]){var r=a.getElGrid().getBoundingClientRect(),c=s.globals.minYArr[e]+(s.globals.maxYArr[e]-s.globals.minYArr[e]-(t-r.top)*i.yRatio[e]);a.tooltipPosition.moveYCrosshairs(t-r.top),a.yaxisTooltipText[e].innerHTML=n(c),a.tooltipPosition.moveYAxisTooltip(e)}}}]),w}(),kt=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w;var t=this.w;this.tConfig=t.config.tooltip,this.tooltipUtil=new B(this),this.tooltipLabels=new q(this),this.tooltipPosition=new oe(this),this.marker=new vt(this),this.intersect=new yt(this),this.axesTooltip=new wt(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!t.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return Y(w,[{key:"getElTooltip",value:function(e){return e||(e=this),e.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip")}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(e){var t=this.w;this.xyRatios=e,this.isXAxisTooltipEnabled=t.config.xaxis.tooltip.enabled&&t.globals.axisCharts,this.yaxisTooltips=t.config.yaxis.map(function(n,r){return!!(n.show&&n.tooltip.enabled&&t.globals.axisCharts)}),this.allTooltipSeriesGroups=[],t.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),t.globals.dom.elWrap.appendChild(i),t.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var a=new me(this.ctx);this.xAxisTicksPositions=a.getXAxisTicksPositions()}if(!t.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==t.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==t.config.markers.size&&0!==t.globals.markers.largestSize||this.marker.drawDynamicPoints(this),t.globals.collapsedSeries.length!==t.globals.series.length){this.dataPointsDividedHeight=t.globals.gridHeight/t.globals.dataPoints,this.dataPointsDividedWidth=t.globals.gridWidth/t.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||t.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var s=t.globals.series.length;(t.globals.xyCharts||t.globals.comboCharts)&&this.tConfig.shared&&(s=this.showOnIntersect?1:t.globals.series.length),this.legendLabels=t.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(s),this.addSVGEvents()}}},{key:"createTTElements",value:function(e){for(var t=this,i=this.w,a=[],s=this.getElTooltip(),n=function(o){var h=document.createElement("div");h.classList.add("apexcharts-tooltip-series-group"),h.style.order=i.config.tooltip.inverseOrder?e-o:o+1,t.tConfig.shared&&t.tConfig.enabledOnSeries&&Array.isArray(t.tConfig.enabledOnSeries)&&t.tConfig.enabledOnSeries.indexOf(o)<0&&h.classList.add("apexcharts-tooltip-series-group-hidden");var c=document.createElement("span");c.classList.add("apexcharts-tooltip-marker"),c.style.backgroundColor=i.globals.colors[o],h.appendChild(c);var d=document.createElement("div");d.classList.add("apexcharts-tooltip-text"),d.style.fontFamily=t.tConfig.style.fontFamily||i.config.chart.fontFamily,d.style.fontSize=t.tConfig.style.fontSize,["y","goals","z"].forEach(function(u){var p=document.createElement("div");p.classList.add("apexcharts-tooltip-".concat(u,"-group"));var x=document.createElement("span");x.classList.add("apexcharts-tooltip-text-".concat(u,"-label")),p.appendChild(x);var f=document.createElement("span");f.classList.add("apexcharts-tooltip-text-".concat(u,"-value")),p.appendChild(f),d.appendChild(p)}),h.appendChild(d),s.appendChild(h),a.push(h)},r=0;r<e;r++)n(r);return a}},{key:"addSVGEvents",value:function(){var e=this.w,t=e.config.chart.type,i=this.getElTooltip(),a=!("bar"!==t&&"candlestick"!==t&&"boxPlot"!==t&&"rangeBar"!==t),s="area"===t||"line"===t||"scatter"===t||"bubble"===t||"radar"===t,n=e.globals.dom.Paper.node,r=this.getElGrid();r&&(this.seriesBound=r.getBoundingClientRect());var o,h=[],c=[],d={hoverArea:n,elGrid:r,tooltipEl:i,tooltipY:h,tooltipX:c,ttItems:this.ttItems};if(e.globals.axisCharts&&(s?o=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):a?o=e.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"!==t&&"treemap"!==t||(o=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap")),o&&o.length))for(var u=0;u<o.length;u++)h.push(o[u].getAttribute("cy")),c.push(o[u].getAttribute("cx"));if(e.globals.xyCharts&&!this.showOnIntersect||e.globals.comboCharts&&!this.showOnIntersect||a&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([n],d);else if(a&&!e.globals.comboCharts||s&&this.showOnIntersect)this.addDatapointEventsListeners(d);else if(!e.globals.axisCharts||"heatmap"===t||"treemap"===t){var p=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");this.addPathsEventListeners(p,d)}if(this.showOnIntersect){var x=e.globals.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker");x.length>0&&this.addPathsEventListeners(x,d),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(d)}}},{key:"drawFixedTooltipRect",value:function(){var e=this.w,t=this.getElTooltip(),i=t.getBoundingClientRect(),a=i.width+10,s=i.height+10,n=this.tConfig.fixed.offsetX,r=this.tConfig.fixed.offsetY,o=this.tConfig.fixed.position.toLowerCase();return o.indexOf("right")>-1&&(n=n+e.globals.svgWidth-a+10),o.indexOf("bottom")>-1&&(r=r+e.globals.svgHeight-s-10),t.style.left=n+"px",t.style.top=r+"px",{x:n,y:r,ttWidth:a,ttHeight:s}}},{key:"addDatapointEventsListeners",value:function(e){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(t,e)}},{key:"addPathsEventListeners",value:function(e,t){for(var i=this,a=function(n){var r={paths:e[n],tooltipEl:t.tooltipEl,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:t.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map(function(o){return e[n].addEventListener(o,i.onSeriesHover.bind(i,r),{capture:!1,passive:!0})})},s=0;s<e.length;s++)a(s)}},{key:"onSeriesHover",value:function(e,t){var i=this,a=Date.now()-this.lastHoverTime;a>=100?this.seriesHover(e,t):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(function(){i.seriesHover(e,t)},100-a))}},{key:"seriesHover",value:function(e,t){var i=this;this.lastHoverTime=Date.now();var a=[],s=this.w;s.config.chart.group&&(a=this.ctx.getGroupedCharts()),s.globals.axisCharts&&(s.globals.minX===-1/0&&s.globals.maxX===1/0||0===s.globals.dataPoints)||(a.length?a.forEach(function(n){var r=i.getElTooltip(n);n.w.globals.minX===i.w.globals.minX&&n.w.globals.maxX===i.w.globals.maxX&&n.w.globals.tooltip.seriesHoverByContext({chartCtx:n,ttCtx:n.w.globals.tooltip,opt:{paths:e.paths,tooltipEl:r,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:n.w.globals.tooltip.ttItems},e:t})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:e,e:t}))}},{key:"seriesHoverByContext",value:function(e){var t=e.chartCtx,i=e.ttCtx,a=e.opt,s=e.e,n=t.w,r=this.getElTooltip();i.tooltipRect={x:0,y:0,ttWidth:r.getBoundingClientRect().width,ttHeight:r.getBoundingClientRect().height},i.e=s,!i.tooltipUtil.hasBars()||n.globals.comboCharts||i.isBarShared||this.tConfig.onDatasetHover.highlightDataSeries&&new K(t).toggleSeriesOnHover(s,s.target.parentNode),i.fixedTooltip&&i.drawFixedTooltipRect(),n.globals.axisCharts?i.axisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect})}},{key:"axisChartsTooltips",value:function(e){var t,i,a=e.e,s=e.opt,n=this.w,r=s.elGrid.getBoundingClientRect(),o="touchmove"===a.type?a.touches[0].clientX:a.clientX,h="touchmove"===a.type?a.touches[0].clientY:a.clientY;if(this.clientY=h,this.clientX=o,n.globals.capturedSeriesIndex=-1,n.globals.capturedDataPointIndex=-1,h<r.top||h>r.top+r.height)this.handleMouseOut(s);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!n.config.tooltip.shared){var c=parseInt(s.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(c)<0)return void this.handleMouseOut(s)}var d=this.getElTooltip(),u=this.getElXCrosshairs(),p=n.globals.xyCharts||"bar"===n.config.chart.type&&!n.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||n.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===a.type||"touchmove"===a.type||"mouseup"===a.type){null!==u&&u.classList.add("apexcharts-active");var x=this.yaxisTooltips.filter(function(y){return!0===y});if(null!==this.ycrosshairs&&x.length&&this.ycrosshairs.classList.add("apexcharts-active"),p&&!this.showOnIntersect)this.handleStickyTooltip(a,o,h,s);else if("heatmap"===n.config.chart.type||"treemap"===n.config.chart.type){var f=this.intersect.handleHeatTreeTooltip({e:a,opt:s,x:t,y:i,type:n.config.chart.type});i=f.y,d.style.left=(t=f.x)+"px",d.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:a,opt:s}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:a,opt:s,x:t,y:i});if(this.yaxisTooltips.length)for(var b=0;b<n.config.yaxis.length;b++)this.axesTooltip.drawYaxisTooltipText(b,h,this.xyRatios);s.tooltipEl.classList.add("apexcharts-active")}else"mouseout"!==a.type&&"touchend"!==a.type||this.handleMouseOut(s)}}},{key:"nonAxisChartsTooltips",value:function(e){var t=e.e,i=e.opt,a=e.tooltipRect,s=this.w,n=i.paths.getAttribute("rel"),r=this.getElTooltip(),o=s.globals.dom.elWrap.getBoundingClientRect();if("mousemove"===t.type||"touchmove"===t.type){r.classList.add("apexcharts-active"),this.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:parseInt(n,10)-1,shared:!1});var c=s.globals.clientY-o.top-a.ttHeight-10;if(r.style.left=s.globals.clientX-o.left-a.ttWidth/2+"px",r.style.top=c+"px",s.config.legend.tooltipHoverFormatter){var d=n-1,u=(0,s.config.legend.tooltipHoverFormatter)(this.legendLabels[d].getAttribute("data:default-text"),{seriesIndex:d,dataPointIndex:d,w:s});this.legendLabels[d].innerHTML=u}}else"mouseout"!==t.type&&"touchend"!==t.type||(r.classList.remove("apexcharts-active"),s.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach(function(p){var x=p.getAttribute("data:default-text");p.innerHTML=decodeURIComponent(x)}))}},{key:"handleStickyTooltip",value:function(e,t,i,a){var s=this.w,n=this.tooltipUtil.getNearestValues({context:this,hoverArea:a.hoverArea,elGrid:a.elGrid,clientX:t,clientY:i}),r=n.j,o=n.capturedSeries,h=a.elGrid.getBoundingClientRect();n.hoverX<0||n.hoverX>h.width?this.handleMouseOut(a):null!==o?this.handleStickyCapturedSeries(e,o,a,r):(this.tooltipUtil.isXoverlap(r)||s.globals.isBarHorizontal)&&this.create(e,this,0,r,a.ttItems)}},{key:"handleStickyCapturedSeries",value:function(e,t,i,a){var s=this.w;this.tConfig.shared||null!==s.globals.series[t][a]?void 0!==s.globals.series[t][a]?this.tConfig.shared&&this.tooltipUtil.isXoverlap(a)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(e,this,t,a,i.ttItems):this.create(e,this,t,a,i.ttItems,!1):this.tooltipUtil.isXoverlap(a)&&this.create(e,this,0,a,i.ttItems):this.handleMouseOut(i)}},{key:"deactivateHoverFilter",value:function(){for(var e=this.w,t=new M(this.ctx),i=e.globals.dom.Paper.select(".apexcharts-bar-area"),a=0;a<i.length;a++)t.pathMouseLeave(i[a])}},{key:"handleMouseOut",value:function(e){var t=this.w,i=this.getElXCrosshairs();if(e.tooltipEl.classList.remove("apexcharts-active"),this.deactivateHoverFilter(),"bubble"!==t.config.chart.type&&this.marker.resetPointsSize(),null!==i&&i.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=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));for(var a=0;a<this.yaxisTTEls.length;a++)this.yaxisTTEls[a].classList.remove("apexcharts-active")}t.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach(function(s){var n=s.getAttribute("data:default-text");s.innerHTML=decodeURIComponent(n)})}},{key:"markerClick",value:function(e,t,i){var a=this.w;"function"==typeof a.config.chart.events.markerClick&&a.config.chart.events.markerClick(e,this.ctx,{seriesIndex:t,dataPointIndex:i,w:a}),this.ctx.events.fireEvent("markerClick",[e,this.ctx,{seriesIndex:t,dataPointIndex:i,w:a}])}},{key:"create",value:function(e,t,i,a,s){var n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,r=this.w,o=t;"mouseup"===e.type&&this.markerClick(e,i,a),null===n&&(n=this.tConfig.shared);var h=this.tooltipUtil.hasMarkers(),c=this.tooltipUtil.getElBars();if(r.config.legend.tooltipHoverFormatter){var d=r.config.legend.tooltipHoverFormatter,u=Array.from(this.legendLabels);u.forEach(function(g){var m=g.getAttribute("data:default-text");g.innerHTML=decodeURIComponent(m)});for(var p=0;p<u.length;p++){var x=u[p],f=parseInt(x.getAttribute("i"),10),b=decodeURIComponent(x.getAttribute("data:default-text")),y=d(b,{seriesIndex:n?f:i,dataPointIndex:a,w:r});if(n)x.innerHTML=r.globals.collapsedSeriesIndices.indexOf(f)<0?y:b;else if(x.innerHTML=f===i?y:b,i===f)break}}if(n){if(o.tooltipLabels.drawSeriesTexts({ttItems:s,i,j:a,shared:!this.showOnIntersect&&this.tConfig.shared}),h&&(r.globals.markers.largestSize>0?o.marker.enlargePoints(a):o.tooltipPosition.moveDynamicPointsOnHover(a)),this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(c),this.barSeriesHeight>0)){var k=new M(this.ctx),A=r.globals.dom.Paper.select(".apexcharts-bar-area[j='".concat(a,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(a);for(var l=0;l<A.length;l++)k.pathMouseEnter(A[l])}}else o.tooltipLabels.drawSeriesTexts({shared:!1,ttItems:s,i,j:a}),this.tooltipUtil.hasBars()&&o.tooltipPosition.moveStickyTooltipOverBars(a),h&&o.tooltipPosition.moveMarkers(i,a)}}]),w}(),dt=function(w){ge(t,fe);var e=ye(t);function t(){return C(this,t),e.apply(this,arguments)}return Y(t,[{key:"draw",value:function(i,a){var s=this,n=this.w;this.graphics=new M(this.ctx),this.bar=new fe(this.ctx,this.xyRatios);var r=new _(this.ctx,n);i=r.getLogSeries(i),this.yRatio=r.getLogYRatios(this.yRatio),this.barHelpers.initVariables(i),"100%"===n.config.chart.stackType&&(i=n.globals.seriesPercent.slice()),this.series=i,this.totalItems=0,this.prevY=[],this.prevX=[],this.prevYF=[],this.prevXF=[],this.prevYVal=[],this.prevXVal=[],this.xArrj=[],this.xArrjF=[],this.xArrjVal=[],this.yArrj=[],this.yArrjF=[],this.yArrjVal=[];for(var o=0;o<i.length;o++)i[o].length>0&&(this.totalItems+=i[o].length);for(var h=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),c=0,d=0,u=function(f,b){var y=void 0,k=void 0,A=void 0,l=void 0,g=[],m=[],v=n.globals.comboCharts?a[f]:f;s.yRatio.length>1&&(s.yaxisIndex=v),s.isReversed=n.config.yaxis[s.yaxisIndex]&&n.config.yaxis[s.yaxisIndex].reversed;var S=s.graphics.group({class:"apexcharts-series",seriesName:P.escapeString(n.globals.seriesNames[v]),rel:f+1,"data:realIndex":v});s.ctx.series.addCollapsedClassToSeries(S,v);var T=s.graphics.group({class:"apexcharts-datalabels","data:realIndex":v}),L=0,z=0,E=s.initialPositions(c,d,y,k,A,l);d=E.y,L=E.barHeight,k=E.yDivision,l=E.zeroW,c=E.x,z=E.barWidth,y=E.xDivision,A=E.zeroH,s.yArrj=[],s.yArrjF=[],s.yArrjVal=[],s.xArrj=[],s.xArrjF=[],s.xArrjVal=[],1===s.prevY.length&&s.prevY[0].every(function(J){return isNaN(J)})&&(s.prevY[0]=s.prevY[0].map(function(J){return A}),s.prevYF[0]=s.prevYF[0].map(function(J){return 0}));for(var X=0;X<n.globals.dataPoints;X++){var D=s.barHelpers.getStrokeWidth(f,X,v),W={indexes:{i:f,j:X,realIndex:v,bc:b},strokeWidth:D,x:c,y:d,elSeries:S},O=null;s.isHorizontal?(O=s.drawStackedBarPaths(R(R({},W),{},{zeroW:l,barHeight:L,yDivision:k})),z=s.series[f][X]/s.invertedYRatio):(O=s.drawStackedColumnPaths(R(R({},W),{},{xDivision:y,barWidth:z,zeroH:A})),L=s.series[f][X]/s.yRatio[s.yaxisIndex]),d=O.y,g.push(c=O.x),m.push(d);var Z=s.barHelpers.getPathFillColor(i,f,X,v);S=s.renderSeries({realIndex:v,pathFill:Z,j:X,i:f,pathFrom:O.pathFrom,pathTo:O.pathTo,strokeWidth:D,elSeries:S,x:c,y:d,series:i,barHeight:L,barWidth:z,elDataLabelsWrap:T,type:"bar",visibleSeries:0})}n.globals.seriesXvalues[v]=g,n.globals.seriesYvalues[v]=m,s.prevY.push(s.yArrj),s.prevYF.push(s.yArrjF),s.prevYVal.push(s.yArrjVal),s.prevX.push(s.xArrj),s.prevXF.push(s.xArrjF),s.prevXVal.push(s.xArrjVal),h.add(S)},p=0,x=0;p<i.length;p++,x++)u(p,x);return h}},{key:"initialPositions",value:function(i,a,s,n,r,o){var h,c,d=this.w;return this.isHorizontal?(h=(h=n=d.globals.gridHeight/d.globals.dataPoints)*parseInt(d.config.plotOptions.bar.barHeight,10)/100,o=this.baseLineInvertedY+d.globals.padHorizontal+(this.isReversed?d.globals.gridWidth:0)-(this.isReversed?2*this.baseLineInvertedY:0),a=(n-h)/2):(c=s=d.globals.gridWidth/d.globals.dataPoints,c=d.globals.isXNumeric&&d.globals.dataPoints>1?(s=d.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:c*parseInt(d.config.plotOptions.bar.columnWidth,10)/100,r=this.baseLineY[this.yaxisIndex]+(this.isReversed?d.globals.gridHeight:0)-(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),i=d.globals.padHorizontal+(s-c)/2),{x:i,y:a,yDivision:n,xDivision:s,barHeight:h,barWidth:c,zeroH:r,zeroW:o}}},{key:"drawStackedBarPaths",value:function(i){for(var a,h,s=i.indexes,n=i.barHeight,r=i.strokeWidth,o=i.zeroW,c=i.y,d=i.yDivision,u=i.elSeries,p=this.w,x=c,f=s.i,b=s.j,y=0,k=0;k<this.prevXF.length;k++)y+=this.prevXF[k][b];if(f>0){var A=o;this.prevXVal[f-1][b]<0?A=this.series[f][b]>=0?this.prevX[f-1][b]+y-2*(this.isReversed?y:0):this.prevX[f-1][b]:this.prevXVal[f-1][b]>=0&&(A=this.series[f][b]>=0?this.prevX[f-1][b]:this.prevX[f-1][b]-y+2*(this.isReversed?y:0)),a=A}else a=o;var l=this.barHelpers.getBarpaths({barYPosition:x,barHeight:n,x1:a,x2:h=null===this.series[f][b]?a:a+this.series[f][b]/this.invertedYRatio-2*(this.isReversed?this.series[f][b]/this.invertedYRatio:0),strokeWidth:r,series:this.series,realIndex:s.realIndex,i:f,j:b,w:p});return this.barHelpers.barBackground({j:b,i:f,y1:x,y2:n,elSeries:u}),{pathTo:l.pathTo,pathFrom:l.pathFrom,x:h,y:c+=d}}},{key:"drawStackedColumnPaths",value:function(i){var n,a=i.indexes,s=i.x,r=i.xDivision,o=i.barWidth,h=i.zeroH,c=i.elSeries,d=this.w,u=a.i,p=a.j,x=a.bc;if(d.globals.isXNumeric){var f=d.globals.seriesX[u][p];f||(f=0),s=(f-d.globals.minX)/this.xRatio-o/2}for(var b,y=s,k=0,A=0;A<this.prevYF.length;A++)k+=isNaN(this.prevYF[A][p])?0:this.prevYF[A][p];if(u>0&&!d.globals.isXNumeric||u>0&&d.globals.isXNumeric&&d.globals.seriesX[u-1][p]===d.globals.seriesX[u][p]){var l,g,m=Math.min(this.yRatio.length+1,u+1);if(void 0!==this.prevY[u-1])for(var v=1;v<m;v++)if(!isNaN(this.prevY[u-v][p])){g=this.prevY[u-v][p];break}for(var S=1;S<m;S++){if(this.prevYVal[u-S][p]<0){l=this.series[u][p]>=0?g-k+2*(this.isReversed?k:0):g;break}if(this.prevYVal[u-S][p]>=0){l=this.series[u][p]>=0?g:g+k-2*(this.isReversed?k:0);break}}void 0===l&&(l=d.globals.gridHeight),b=this.prevYF[0].every(function(L){return 0===L})&&this.prevYF.slice(1,u).every(function(L){return L.every(function(z){return isNaN(z)})})?d.globals.gridHeight-h:l}else b=d.globals.gridHeight-h;var T=this.barHelpers.getColumnPaths({barXPosition:y,barWidth:o,y1:b,y2:n=b-this.series[u][p]/this.yRatio[this.yaxisIndex]+2*(this.isReversed?this.series[u][p]/this.yRatio[this.yaxisIndex]:0),yRatio:this.yRatio[this.yaxisIndex],strokeWidth:this.strokeWidth,series:this.series,realIndex:a.realIndex,i:u,j:p,w:d});return this.barHelpers.barBackground({bc:x,j:p,i:u,x1:y,x2:o,elSeries:c}),s+=r,{pathTo:T.pathTo,pathFrom:T.pathFrom,x:d.globals.isXNumeric?s-r:s,y:n}}}]),t}(),Ze=function(w){ge(t,fe);var e=ye(t);function t(){return C(this,t),e.apply(this,arguments)}return Y(t,[{key:"draw",value:function(i,a){var s=this,n=this.w,r=new M(this.ctx),o=new ie(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=n.config.plotOptions.bar.horizontal;var h=new _(this.ctx,n);i=h.getLogSeries(i),this.series=i,this.yRatio=h.getLogYRatios(this.yRatio),this.barHelpers.initVariables(i);for(var c=r.group({class:"apexcharts-".concat(n.config.chart.type,"-series apexcharts-plot-series")}),d=function(p){s.isBoxPlot="boxPlot"===n.config.chart.type||"boxPlot"===n.config.series[p].type;var x,f,b,y,S,T,k=void 0,A=void 0,l=[],g=[],m=n.globals.comboCharts?a[p]:p,v=r.group({class:"apexcharts-series",seriesName:P.escapeString(n.globals.seriesNames[m]),rel:p+1,"data:realIndex":m});s.ctx.series.addCollapsedClassToSeries(v,m),i[p].length>0&&(s.visibleI=s.visibleI+1),s.yRatio.length>1&&(s.yaxisIndex=m);var L=s.barHelpers.initialPositions();A=L.y,S=L.barHeight,f=L.yDivision,y=L.zeroW,x=L.xDivision,b=L.zeroH,g.push((k=L.x)+(T=L.barWidth)/2);for(var z=r.group({class:"apexcharts-datalabels","data:realIndex":m}),E=function(D){var W=s.barHelpers.getStrokeWidth(p,D,m),O=null,Z={indexes:{i:p,j:D,realIndex:m},x:k,y:A,strokeWidth:W,elSeries:v};O=s.isHorizontal?s.drawHorizontalBoxPaths(R(R({},Z),{},{yDivision:f,barHeight:S,zeroW:y})):s.drawVerticalBoxPaths(R(R({},Z),{},{xDivision:x,barWidth:T,zeroH:b})),A=O.y,k=O.x,D>0&&g.push(k+T/2),l.push(A),O.pathTo.forEach(function(J,ae){var ce=!s.isBoxPlot&&s.candlestickOptions.wick.useFillColor?O.color[ae]:n.globals.stroke.colors[p],ve=o.fillPath({seriesNumber:m,dataPointIndex:D,color:O.color[ae],value:i[p][D]});s.renderSeries({realIndex:m,pathFill:ve,lineFill:ce,j:D,i:p,pathFrom:O.pathFrom,pathTo:J,strokeWidth:W,elSeries:v,x:k,y:A,series:i,barHeight:S,barWidth:T,elDataLabelsWrap:z,visibleSeries:s.visibleI,type:n.config.chart.type})})},X=0;X<n.globals.dataPoints;X++)E(X);n.globals.seriesXvalues[m]=g,n.globals.seriesYvalues[m]=l,c.add(v)},u=0;u<i.length;u++)d(u);return c}},{key:"drawVerticalBoxPaths",value:function(i){var a=i.indexes,s=i.x,n=i.xDivision,r=i.barWidth,o=i.zeroH,h=i.strokeWidth,c=this.w,d=new M(this.ctx),u=a.i,p=a.j,x=!0,f=c.config.plotOptions.candlestick.colors.upward,b=c.config.plotOptions.candlestick.colors.downward,y="";this.isBoxPlot&&(y=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var k=this.yRatio[this.yaxisIndex],A=a.realIndex,l=this.getOHLCValue(A,p),g=o,m=o;l.o>l.c&&(x=!1);var v=Math.min(l.o,l.c),S=Math.max(l.o,l.c),T=l.m;c.globals.isXNumeric&&(s=(c.globals.seriesX[A][p]-c.globals.minX)/this.xRatio-r/2);var L=s+r*this.visibleI;null==this.series[u][p]?(v=o,S=o):(v=o-v/k,S=o-S/k,g=o-l.h/k,m=o-l.l/k,T=o-l.m/k);var z=d.move(L,o),E=d.move(L+r/2,v);return c.globals.previousPaths.length>0&&(E=this.getPreviousPath(A,p,!0)),z=this.isBoxPlot?[d.move(L,v)+d.line(L+r/2,v)+d.line(L+r/2,g)+d.line(L+r/4,g)+d.line(L+r-r/4,g)+d.line(L+r/2,g)+d.line(L+r/2,v)+d.line(L+r,v)+d.line(L+r,T)+d.line(L,T)+d.line(L,v+h/2),d.move(L,T)+d.line(L+r,T)+d.line(L+r,S)+d.line(L+r/2,S)+d.line(L+r/2,m)+d.line(L+r-r/4,m)+d.line(L+r/4,m)+d.line(L+r/2,m)+d.line(L+r/2,S)+d.line(L,S)+d.line(L,T)+"z"]:[d.move(L,S)+d.line(L+r/2,S)+d.line(L+r/2,g)+d.line(L+r/2,S)+d.line(L+r,S)+d.line(L+r,v)+d.line(L+r/2,v)+d.line(L+r/2,m)+d.line(L+r/2,v)+d.line(L,v)+d.line(L,S-h/2)],E+=d.move(L,v),c.globals.isXNumeric||(s+=n),{pathTo:z,pathFrom:E,x:s,y:S,barXPosition:L,color:this.isBoxPlot?y:x?[f]:[b]}}},{key:"drawHorizontalBoxPaths",value:function(i){var a=i.indexes,s=i.y,n=i.yDivision,r=i.barHeight,o=i.zeroW,h=i.strokeWidth,c=this.w,d=new M(this.ctx),u=a.i,p=a.j,x=this.boxOptions.colors.lower;this.isBoxPlot&&(x=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var f=this.invertedYRatio,b=a.realIndex,y=this.getOHLCValue(b,p),k=o,A=o,l=Math.min(y.o,y.c),g=Math.max(y.o,y.c),m=y.m;c.globals.isXNumeric&&(s=(c.globals.seriesX[b][p]-c.globals.minX)/this.invertedXRatio-r/2);var v=s+r*this.visibleI;null==this.series[u][p]?(l=o,g=o):(l=o+l/f,g=o+g/f,k=o+y.h/f,A=o+y.l/f,m=o+y.m/f);var S=d.move(o,v),T=d.move(l,v+r/2);return c.globals.previousPaths.length>0&&(T=this.getPreviousPath(b,p,!0)),S=[d.move(l,v)+d.line(l,v+r/2)+d.line(k,v+r/2)+d.line(k,v+r/2-r/4)+d.line(k,v+r/2+r/4)+d.line(k,v+r/2)+d.line(l,v+r/2)+d.line(l,v+r)+d.line(m,v+r)+d.line(m,v)+d.line(l+h/2,v),d.move(m,v)+d.line(m,v+r)+d.line(g,v+r)+d.line(g,v+r/2)+d.line(A,v+r/2)+d.line(A,v+r-r/4)+d.line(A,v+r/4)+d.line(A,v+r/2)+d.line(g,v+r/2)+d.line(g,v)+d.line(m,v)+"z"],T+=d.move(l,v),c.globals.isXNumeric||(s+=n),{pathTo:S,pathFrom:T,x:g,y:s,barYPosition:v,color:x}}},{key:"getOHLCValue",value:function(i,a){var s=this.w;return{o:this.isBoxPlot?s.globals.seriesCandleH[i][a]:s.globals.seriesCandleO[i][a],h:this.isBoxPlot?s.globals.seriesCandleO[i][a]:s.globals.seriesCandleH[i][a],m:s.globals.seriesCandleM[i][a],l:this.isBoxPlot?s.globals.seriesCandleC[i][a]:s.globals.seriesCandleL[i][a],c:this.isBoxPlot?s.globals.seriesCandleL[i][a]:s.globals.seriesCandleC[i][a]}}}]),t}(),gt=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w}return Y(w,[{key:"checkColorRange",value:function(){var e=this.w,t=!1,i=e.config.plotOptions[e.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map(function(a,s){a.from<=0&&(t=!0)}),t}},{key:"getShadeColor",value:function(e,t,i,a){var s=this.w,n=1,r=s.config.plotOptions[e].shadeIntensity,o=this.determineColor(e,t,i);s.globals.hasNegs||a?n=s.config.plotOptions[e].reverseNegativeShade?o.percent<0?o.percent/100*(1.25*r):1.25*r*(1-o.percent/100):o.percent<=0?1-(1+o.percent/100)*r:(1-o.percent/100)*r:(n=1-o.percent/100,"treemap"===e&&(n=1.25*r*(1-o.percent/100)));var h=o.color,c=new P;return s.config.plotOptions[e].enableShades&&(h=P.hexToRgba(c.shadeColor("dark"===this.w.config.theme.mode?-1*n:n,o.color),s.config.fill.opacity)),{color:h,colorProps:o}}},{key:"determineColor",value:function(e,t,i){var a=this.w,s=a.globals.series[t][i],n=a.config.plotOptions[e],r=n.colorScale.inverse?i:t;n.distributed&&"treemap"===a.config.chart.type&&(r=i);var o=a.globals.colors[r],h=null,c=Math.min.apply(Math,te(a.globals.series[t])),d=Math.max.apply(Math,te(a.globals.series[t]));n.distributed||"heatmap"!==e||(c=a.globals.minY,d=a.globals.maxY),void 0!==n.colorScale.min&&(c=n.colorScale.min<a.globals.minY?n.colorScale.min:a.globals.minY,d=n.colorScale.max>a.globals.maxY?n.colorScale.max:a.globals.maxY);var u=Math.abs(d)+Math.abs(c),p=100*s/(0===u?u-1e-6:u);return n.colorScale.ranges.length>0&&n.colorScale.ranges.map(function(x,f){if(s>=x.from&&s<=x.to){o=x.color,h=x.foreColor?x.foreColor:null,c=x.from,d=x.to;var b=Math.abs(d)+Math.abs(c);p=100*s/(0===b?b-1e-6:b)}}),{color:o,foreColor:h,percent:p}}},{key:"calculateDataLabels",value:function(e){var t=e.text,i=e.x,a=e.y,s=e.i,n=e.j,r=e.colorProps,o=e.fontSize,h=this.w.config.dataLabels,c=new M(this.ctx),d=new pe(this.ctx),u=null;if(h.enabled){u=c.group({class:"apexcharts-data-labels"});var x=h.offsetY,f=i+h.offsetX,b=a+parseFloat(h.style.fontSize)/3+x;d.plotDataLabelsText({x:f,y:b,text:t,i:s,j:n,color:r.foreColor,parent:u,fontSize:o,dataLabelsConfig:h})}return u}},{key:"addListeners",value:function(e){var t=new M(this.ctx);e.node.addEventListener("mouseenter",t.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",t.pathMouseLeave.bind(this,e)),e.node.addEventListener("mousedown",t.pathMouseDown.bind(this,e))}}]),w}(),At=function(){function w(e,t){C(this,w),this.ctx=e,this.w=e.w,this.xRatio=t.xRatio,this.yRatio=t.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new gt(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return Y(w,[{key:"draw",value:function(e){var t=this.w,i=new M(this.ctx),a=i.group({class:"apexcharts-heatmap"});a.attr("clip-path","url(#gridRectMask".concat(t.globals.cuid,")"));var s=t.globals.gridWidth/t.globals.dataPoints,n=t.globals.gridHeight/t.globals.series.length,r=0,o=!1;this.negRange=this.helpers.checkColorRange();var h=e.slice();t.config.yaxis[0].reversed&&(o=!0,h.reverse());for(var c=o?0:h.length-1;o?c<h.length:c>=0;o?c++:c--){var d=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:P.escapeString(t.globals.seriesNames[c]),rel:c+1,"data:realIndex":c});if(this.ctx.series.addCollapsedClassToSeries(d,c),t.config.chart.dropShadow.enabled){var u=t.config.chart.dropShadow;new j(this.ctx).dropShadow(d,u,c)}for(var p=0,x=t.config.plotOptions.heatmap.shadeIntensity,f=0;f<h[c].length;f++){var b=this.helpers.getShadeColor(t.config.chart.type,c,f,this.negRange),y=b.color,k=b.colorProps;"image"===t.config.fill.type&&(y=new ie(this.ctx).fillPath({seriesNumber:c,dataPointIndex:f,opacity:t.globals.hasNegs?k.percent<0?1-(1+k.percent/100):x+k.percent/100:k.percent/100,patternID:P.randomId(),width:t.config.fill.image.width?t.config.fill.image.width:s,height:t.config.fill.image.height?t.config.fill.image.height:n}));var l=i.drawRect(p,r,s,n,this.rectRadius);if(l.attr({cx:p,cy:r}),l.node.classList.add("apexcharts-heatmap-rect"),d.add(l),l.attr({fill:y,i:c,index:c,j:f,val:h[c][f],"stroke-width":this.strokeWidth,stroke:t.config.plotOptions.heatmap.useFillColorAsStroke?y:t.globals.stroke.colors[0],color:y}),this.helpers.addListeners(l),t.config.chart.animations.enabled&&!t.globals.dataChanged){var g=1;t.globals.resized||(g=t.config.chart.animations.speed),this.animateHeatMap(l,p,r,s,n,g)}if(t.globals.dataChanged){var m=1;if(this.dynamicAnim.enabled&&t.globals.shouldAnimate){m=this.dynamicAnim.speed;var v=t.globals.previousPaths[c]&&t.globals.previousPaths[c][f]&&t.globals.previousPaths[c][f].color;v||(v="rgba(255, 255, 255, 0)"),this.animateHeatColor(l,P.isColorHex(v)?v:P.rgb2hex(v),P.isColorHex(y)?y:P.rgb2hex(y),m)}}var S=(0,t.config.dataLabels.formatter)(t.globals.series[c][f],{value:t.globals.series[c][f],seriesIndex:c,dataPointIndex:f,w:t}),T=this.helpers.calculateDataLabels({text:S,x:p+s/2,y:r+n/2,i:c,j:f,colorProps:k,series:h});null!==T&&d.add(T),p+=s}r+=n,a.add(d)}var L=t.globals.yAxisScale[0].result.slice();return t.config.yaxis[0].reversed?L.unshift(""):L.push(""),t.globals.yAxisScale[0].result=L,t.config.yaxis[0].labels.offsetY=-t.globals.gridHeight/t.globals.series.length/2,a}},{key:"animateHeatMap",value:function(e,t,i,a,s,n){var r=new ue(this.ctx);r.animateRect(e,{x:t+a/2,y:i+s/2,width:0,height:0},{x:t,y:i,width:a,height:s},n,function(){r.animationCompleted(e)})}},{key:"animateHeatColor",value:function(e,t,i,a){e.attr({fill:t}).animate(a).attr({fill:i})}}]),w}(),ut=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w}return Y(w,[{key:"drawYAxisTexts",value:function(e,t,i,a){var s=this.w,n=s.config.yaxis[0],r=s.globals.yLabelFormatters[0];return new M(this.ctx).drawText({x:e+n.labels.offsetX,y:t+n.labels.offsetY,text:r(a,i),textAnchor:"middle",fontSize:n.labels.style.fontSize,fontFamily:n.labels.style.fontFamily,foreColor:Array.isArray(n.labels.style.colors)?n.labels.style.colors[i]:n.labels.style.colors})}}]),w}(),pt=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w;var t=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!==t.globals.stroke.colors?t.globals.stroke.colors:t.globals.colors,this.defaultSize=Math.min(t.globals.gridWidth,t.globals.gridHeight),this.centerY=this.defaultSize/2,this.centerX=t.globals.gridWidth/2,this.fullAngle="radialBar"===t.config.chart.type?360:Math.abs(t.config.plotOptions.pie.endAngle-t.config.plotOptions.pie.startAngle),this.initialAngle=t.config.plotOptions.pie.startAngle%this.fullAngle,t.globals.radialSize=this.defaultSize/2.05-t.config.stroke.width-(t.config.chart.sparkline.enabled?0:t.config.chart.dropShadow.blur),this.donutSize=t.globals.radialSize*parseInt(t.config.plotOptions.pie.donut.size,10)/100,this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSectorAngleArr=[]}return Y(w,[{key:"draw",value:function(e){var t=this,i=this.w,a=new M(this.ctx);if(this.ret=a.group({class:"apexcharts-pie"}),i.globals.noData)return this.ret;for(var s=0,n=0;n<e.length;n++)s+=P.negToZero(e[n]);var r=[],o=a.group();0===s&&(s=1e-5),e.forEach(function(v){t.maxY=Math.max(t.maxY,v)}),i.config.yaxis[0].max&&(this.maxY=i.config.yaxis[0].max),"back"===i.config.grid.position&&"polarArea"===this.chartType&&this.drawPolarElements(this.ret);for(var h=0;h<e.length;h++){var c=this.fullAngle*P.negToZero(e[h])/s;r.push(c),"polarArea"===this.chartType?(r[h]=this.fullAngle/e.length,this.sliceSizes.push(i.globals.radialSize*e[h]/this.maxY)):this.sliceSizes.push(i.globals.radialSize)}if(i.globals.dataChanged){for(var d,u=0,p=0;p<i.globals.previousPaths.length;p++)u+=P.negToZero(i.globals.previousPaths[p]);for(var x=0;x<i.globals.previousPaths.length;x++)d=this.fullAngle*P.negToZero(i.globals.previousPaths[x])/u,this.prevSectorAngleArr.push(d)}this.donutSize<0&&(this.donutSize=0);var f=i.config.plotOptions.pie.customScale,k=i.globals.gridWidth/2-i.globals.gridWidth/2*f,A=i.globals.gridHeight/2-i.globals.gridHeight/2*f;if("donut"===this.chartType){var l=a.drawCircle(this.donutSize);l.attr({cx:this.centerX,cy:this.centerY,fill:i.config.plotOptions.pie.donut.background?i.config.plotOptions.pie.donut.background:"transparent"}),o.add(l)}var g=this.drawArcs(r,e);if(this.sliceLabels.forEach(function(v){g.add(v)}),o.attr({transform:"translate(".concat(k,", ").concat(A,") scale(").concat(f,")")}),o.add(g),this.ret.add(o),this.donutDataLabels.show){var m=this.renderInnerDataLabels(this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show,translateX:k,translateY:A});this.ret.add(m)}return"front"===i.config.grid.position&&"polarArea"===this.chartType&&this.drawPolarElements(this.ret),this.ret}},{key:"drawArcs",value:function(e,t){var i=this.w,a=new j(this.ctx),s=new M(this.ctx),n=new ie(this.ctx),r=s.group({class:"apexcharts-slices"}),o=this.initialAngle,h=this.initialAngle,c=this.initialAngle,d=this.initialAngle;this.strokeWidth=i.config.stroke.show?i.config.stroke.width:0;for(var u=0;u<e.length;u++){var p=s.group({class:"apexcharts-series apexcharts-pie-series",seriesName:P.escapeString(i.globals.seriesNames[u]),rel:u+1,"data:realIndex":u});r.add(p),c=(o=c)+e[u],d=(h=d)+this.prevSectorAngleArr[u];var x=c<o?this.fullAngle+c-o:c-o,f=n.fillPath({seriesNumber:u,size:this.sliceSizes[u],value:t[u]}),b=this.getChangedPath(h,d),y=s.drawPath({d:b,stroke:Array.isArray(this.lineColorArr)?this.lineColorArr[u]:this.lineColorArr,strokeWidth:0,fill:f,fillOpacity:i.config.fill.opacity,classes:"apexcharts-pie-area apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(u)});y.attr({index:0,j:u}),a.setSelectionFilter(y,0,u),i.config.chart.dropShadow.enabled&&a.dropShadow(y,i.config.chart.dropShadow,u),this.addListeners(y,this.donutDataLabels),M.setAttrs(y.node,{"data:angle":x,"data:startAngle":o,"data:strokeWidth":this.strokeWidth,"data:value":t[u]});var A={x:0,y:0};"pie"===this.chartType||"polarArea"===this.chartType?A=P.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize/1.25+i.config.plotOptions.pie.dataLabels.offset,(o+x/2)%this.fullAngle):"donut"===this.chartType&&(A=P.polarToCartesian(this.centerX,this.centerY,(i.globals.radialSize+this.donutSize)/2+i.config.plotOptions.pie.dataLabels.offset,(o+x/2)%this.fullAngle)),p.add(y);var l=0;if(!this.initialAnim||i.globals.resized||i.globals.dataChanged?this.animBeginArr.push(0):(0==(l=x/this.fullAngle*i.config.chart.animations.speed)&&(l=1),this.animDur=l+this.animDur,this.animBeginArr.push(this.animDur)),this.animatePaths(y,this.dynamicAnim&&i.globals.dataChanged?{size:this.sliceSizes[u],endAngle:c,startAngle:o,prevStartAngle:h,prevEndAngle:d,animateStartingPos:!0,i:u,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:i.config.chart.animations.dynamicAnimation.speed}:{size:this.sliceSizes[u],endAngle:c,startAngle:o,i:u,totalItems:e.length-1,animBeginArr:this.animBeginArr,dur:l}),i.config.plotOptions.pie.expandOnClick&&"polarArea"!==this.chartType&&y.click(this.pieClicked.bind(this,u)),void 0!==i.globals.selectedDataPoints[0]&&i.globals.selectedDataPoints[0].indexOf(u)>-1&&this.pieClicked(u),i.config.dataLabels.enabled){var g=A.x,m=A.y,v=100*x/this.fullAngle+"%";if(0!==x&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabel<e[u]){var S=i.config.dataLabels.formatter;void 0!==S&&(v=S(i.globals.seriesPercent[u][0],{seriesIndex:u,w:i}));var T=i.globals.dataLabels.style.colors[u],L=s.group({class:"apexcharts-datalabels"}),z=s.drawText({x:g,y:m,text:v,textAnchor:"middle",fontSize:i.config.dataLabels.style.fontSize,fontFamily:i.config.dataLabels.style.fontFamily,fontWeight:i.config.dataLabels.style.fontWeight,foreColor:T});L.add(z),i.config.dataLabels.dropShadow.enabled&&a.dropShadow(z,i.config.dataLabels.dropShadow),z.node.classList.add("apexcharts-pie-label"),i.config.chart.animations.animate&&!1===i.globals.resized&&(z.node.classList.add("apexcharts-pie-label-delay"),z.node.style.animationDelay=i.config.chart.animations.speed/940+"s"),this.sliceLabels.push(L)}}}return r}},{key:"addListeners",value:function(e,t){var i=new M(this.ctx);e.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this,e)),e.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this,e.node,t)),e.node.addEventListener("mousedown",i.pathMouseDown.bind(this,e)),this.donutDataLabels.total.showAlways||(e.node.addEventListener("mouseenter",this.printDataLabelsInner.bind(this,e.node,t)),e.node.addEventListener("mousedown",this.printDataLabelsInner.bind(this,e.node,t)))}},{key:"animatePaths",value:function(e,t){var a=t.endAngle<t.startAngle?this.fullAngle+t.endAngle-t.startAngle:t.endAngle-t.startAngle,s=a,n=t.startAngle,r=t.startAngle;void 0!==t.prevStartAngle&&void 0!==t.prevEndAngle&&(n=t.prevEndAngle,s=t.prevEndAngle<t.prevStartAngle?this.fullAngle+t.prevEndAngle-t.prevStartAngle:t.prevEndAngle-t.prevStartAngle),t.i===this.w.config.series.length-1&&(a+r>this.fullAngle?t.endAngle=t.endAngle-(a+r):a+r<this.fullAngle&&(t.endAngle=t.endAngle+(this.fullAngle-(a+r)))),a===this.fullAngle&&(a=this.fullAngle-.01),this.animateArc(e,n,r,a,s,t)}},{key:"animateArc",value:function(e,t,i,a,s,n){var r,o=this,h=this.w,c=new ue(this.ctx),d=n.size;(isNaN(t)||isNaN(s))&&(t=i,s=a,n.dur=0);var u=a,p=i,x=t<i?this.fullAngle+t-i:t-i;h.globals.dataChanged&&n.shouldSetPrevPaths&&n.prevEndAngle&&(r=o.getPiePath({me:o,startAngle:n.prevStartAngle,angle:n.prevEndAngle<n.prevStartAngle?this.fullAngle+n.prevEndAngle-n.prevStartAngle:n.prevEndAngle-n.prevStartAngle,size:d}),e.attr({d:r})),0!==n.dur?e.animate(n.dur,h.globals.easing,n.animBeginArr[n.i]).afterAll(function(){"pie"!==o.chartType&&"donut"!==o.chartType&&"polarArea"!==o.chartType||this.animate(h.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":o.strokeWidth}),n.i===h.config.series.length-1&&c.animationCompleted(e)}).during(function(f){u=x+(a-x)*f,n.animateStartingPos&&(u=s+(a-s)*f,p=t-s+(i-(t-s))*f),r=o.getPiePath({me:o,startAngle:p,angle:u,size:d}),e.node.setAttribute("data:pathOrig",r),e.attr({d:r})}):(r=o.getPiePath({me:o,startAngle:p,angle:a,size:d}),n.isTrack||(h.globals.animationEnded=!0),e.node.setAttribute("data:pathOrig",r),e.attr({d:r,"stroke-width":o.strokeWidth}))}},{key:"pieClicked",value:function(e){var t,i=this.w,a=this,s=a.sliceSizes[e]+(i.config.plotOptions.pie.expandOnClick?4:0),n=i.globals.dom.Paper.select(".apexcharts-".concat(a.chartType.toLowerCase(),"-slice-").concat(e)).members[0];if("true"!==n.attr("data:pieClicked")){var r=i.globals.dom.baseEl.getElementsByClassName("apexcharts-pie-area");Array.prototype.forEach.call(r,function(d){d.setAttribute("data:pieClicked","false");var u=d.getAttribute("data:pathOrig");d.setAttribute("d",u)}),n.attr("data:pieClicked","true");var o=parseInt(n.attr("data:startAngle"),10),h=parseInt(n.attr("data:angle"),10);t=a.getPiePath({me:a,startAngle:o,angle:h,size:s}),360!==h&&n.plot(t)}else{n.attr({"data:pieClicked":"false"}),this.revertDataLabelsInner(n.node,this.donutDataLabels);var c=n.attr("data:pathOrig");n.attr({d:c})}}},{key:"getChangedPath",value:function(e,t){var i="";return this.dynamicAnim&&this.w.globals.dataChanged&&(i=this.getPiePath({me:this,startAngle:e,angle:t-e,size:this.size})),i}},{key:"getPiePath",value:function(e){var t=e.me,i=e.startAngle,a=e.angle,s=e.size,n=i,r=Math.PI*(n-90)/180,o=a+i;Math.ceil(o)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(o=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(o)>this.fullAngle&&(o-=this.fullAngle);var h=Math.PI*(o-90)/180,c=t.centerX+s*Math.cos(r),d=t.centerY+s*Math.sin(r),u=t.centerX+s*Math.cos(h),p=t.centerY+s*Math.sin(h),x=P.polarToCartesian(t.centerX,t.centerY,t.donutSize,o),f=P.polarToCartesian(t.centerX,t.centerY,t.donutSize,n),b=a>180?1:0,y=["M",c,d,"A",s,s,0,b,1,u,p];return"donut"===t.chartType?[].concat(y,["L",x.x,x.y,"A",t.donutSize,t.donutSize,0,b,0,f.x,f.y,"L",c,d,"z"]).join(" "):"pie"===t.chartType||"polarArea"===t.chartType?[].concat(y,["L",t.centerX,t.centerY,"L",c,d]).join(" "):[].concat(y).join(" ")}},{key:"drawPolarElements",value:function(e){var t=this.w,i=new he(this.ctx),a=new M(this.ctx),s=new ut(this.ctx),n=a.group(),r=a.group(),o=i.niceScale(0,Math.ceil(this.maxY),t.config.yaxis[0].tickAmount,0,!0),h=o.result.reverse(),c=o.result.length;this.maxY=o.niceMax;for(var d=t.globals.radialSize,u=d/(c-1),p=0;p<c-1;p++){var x=a.drawCircle(d);if(x.attr({cx:this.centerX,cy:this.centerY,fill:"none","stroke-width":t.config.plotOptions.polarArea.rings.strokeWidth,stroke:t.config.plotOptions.polarArea.rings.strokeColor}),t.config.yaxis[0].show){var f=s.drawYAxisTexts(this.centerX,this.centerY-d+parseInt(t.config.yaxis[0].labels.style.fontSize,10)/2,p,h[p]);r.add(f)}n.add(x),d-=u}this.drawSpokes(e),e.add(n),e.add(r)}},{key:"renderInnerDataLabels",value:function(e,t){var i=this.w,a=new M(this.ctx),s=a.group({class:"apexcharts-datalabels-group",transform:"translate(".concat(t.translateX?t.translateX:0,", ").concat(t.translateY?t.translateY:0,") scale(").concat(i.config.plotOptions.pie.customScale,")")}),n=e.total.show;s.node.style.opacity=t.opacity;var r,o,h=t.centerX,c=t.centerY;r=void 0===e.name.color?i.globals.colors[0]:e.name.color;var d=e.name.fontSize,u=e.name.fontFamily,p=e.name.fontWeight;o=void 0===e.value.color?i.config.chart.foreColor:e.value.color;var x=e.value.formatter,f="",b="";if(n?(r=e.total.color,d=e.total.fontSize,u=e.total.fontFamily,p=e.total.fontWeight,b=e.total.label,f=e.total.formatter(i)):1===i.globals.series.length&&(f=x(i.globals.series[0],i),b=i.globals.seriesNames[0]),b&&(b=e.name.formatter(b,e.total.show,i)),e.name.show){var y=a.drawText({x:h,y:c+parseFloat(e.name.offsetY),text:b,textAnchor:"middle",foreColor:r,fontSize:d,fontWeight:p,fontFamily:u});y.node.classList.add("apexcharts-datalabel-label"),s.add(y)}if(e.value.show){var k=e.name.show?parseFloat(e.value.offsetY)+16:e.value.offsetY,A=a.drawText({x:h,y:c+k,text:f,textAnchor:"middle",foreColor:o,fontWeight:e.value.fontWeight,fontSize:e.value.fontSize,fontFamily:e.value.fontFamily});A.node.classList.add("apexcharts-datalabel-value"),s.add(A)}return s}},{key:"printInnerLabels",value:function(e,t,i,a){var s,n=this.w;a?s=void 0===e.name.color?n.globals.colors[parseInt(a.parentNode.getAttribute("rel"),10)-1]:e.name.color:n.globals.series.length>1&&e.total.show&&(s=e.total.color);var r=n.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=n.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,e.value.formatter)(i,n),a||"function"!=typeof e.total.formatter||(i=e.total.formatter(n)),t=e.name.formatter(t,t===e.total.label,n),null!==r&&(r.textContent=t),null!==o&&(o.textContent=i),null!==r&&(r.style.fill=s)}},{key:"printDataLabelsInner",value:function(e,t){var i=this.w,a=e.getAttribute("data:value"),s=i.globals.seriesNames[parseInt(e.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(t,s,a,e);var n=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==n&&(n.style.opacity=1)}},{key:"drawSpokes",value:function(e){var t=this,i=this.w,a=new M(this.ctx),s=i.config.plotOptions.polarArea.spokes;if(0!==s.strokeWidth){for(var n=[],r=360/i.globals.series.length,o=0;o<i.globals.series.length;o++)n.push(P.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize,i.config.plotOptions.pie.startAngle+r*o));n.forEach(function(h,c){var d=a.drawLine(h.x,h.y,t.centerX,t.centerY,Array.isArray(s.connectorColors)?s.connectorColors[c]:s.connectorColors);e.add(d)})}}},{key:"revertDataLabelsInner",value:function(e,t,i){var a=this,s=this.w,n=s.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group"),r=!1,o=s.globals.dom.baseEl.getElementsByClassName("apexcharts-pie-area"),h=function(u){var p=u.makeSliceOut,x=u.printLabel;Array.prototype.forEach.call(o,function(f){"true"===f.getAttribute("data:pieClicked")&&(p&&(r=!0),x&&a.printDataLabelsInner(f,t))})};if(h({makeSliceOut:!0,printLabel:!1}),t.total.show&&s.globals.series.length>1)r&&!t.total.showAlways?h({makeSliceOut:!1,printLabel:!0}):this.printInnerLabels(t,t.total.label,t.total.formatter(s));else if(h({makeSliceOut:!1,printLabel:!0}),!r)if(s.globals.selectedDataPoints.length&&s.globals.series.length>1)if(s.globals.selectedDataPoints[0].length>0){var c=s.globals.selectedDataPoints[0],d=s.globals.dom.baseEl.querySelector(".apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(c));this.printDataLabelsInner(d,t)}else n&&s.globals.selectedDataPoints.length&&0===s.globals.selectedDataPoints[0].length&&(n.style.opacity=0);else n&&s.globals.series.length>1&&(n.style.opacity=0)}}]),w}(),St=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0;var t=this.w;this.graphics=new M(this.ctx),this.lineColorArr=void 0!==t.globals.stroke.colors?t.globals.stroke.colors:t.globals.colors,this.defaultSize=t.globals.svgHeight<t.globals.svgWidth?t.globals.gridHeight+1.5*t.globals.goldenPadding:t.globals.gridWidth,this.isLog=t.config.yaxis[0].logarithmic,this.coreUtils=new _(this.ctx),this.maxValue=this.isLog?this.coreUtils.getLogVal(t.globals.maxY,0):t.globals.maxY,this.minValue=this.isLog?this.coreUtils.getLogVal(this.w.globals.minY,0):t.globals.minY,this.polygons=t.config.plotOptions.radar.polygons,this.strokeWidth=t.config.stroke.show?t.config.stroke.width:0,this.size=this.defaultSize/2.1-this.strokeWidth-t.config.chart.dropShadow.blur,t.config.xaxis.labels.show&&(this.size=this.size-t.globals.xAxisLabelsWidth/1.75),void 0!==t.config.plotOptions.radar.size&&(this.size=t.config.plotOptions.radar.size),this.dataRadiusOfPercent=[],this.dataRadius=[],this.angleArr=[],this.yaxisLabelsTextsPos=[]}return Y(w,[{key:"draw",value:function(e){var t=this,i=this.w,a=new ie(this.ctx),s=[],n=new pe(this.ctx);e.length&&(this.dataPointsLen=e[i.globals.maxValsInArrayIndex].length),this.disAngle=2*Math.PI/this.dataPointsLen;var c=i.globals.gridHeight/2+i.config.plotOptions.radar.offsetY,d=this.graphics.group({class:"apexcharts-radar-series apexcharts-plot-series",transform:"translate(".concat(i.globals.gridWidth/2+i.config.plotOptions.radar.offsetX||0,", ").concat(c||0,")")}),u=[],p=null,x=null;if(this.yaxisLabels=this.graphics.group({class:"apexcharts-yaxis"}),e.forEach(function(b,y){var k=b.length===i.globals.dataPoints,A=t.graphics.group().attr({class:"apexcharts-series","data:longestSeries":k,seriesName:P.escapeString(i.globals.seriesNames[y]),rel:y+1,"data:realIndex":y});t.dataRadiusOfPercent[y]=[],t.dataRadius[y]=[],t.angleArr[y]=[],b.forEach(function(X,D){var W=Math.abs(t.maxValue-t.minValue);X+=Math.abs(t.minValue),t.isLog&&(X=t.coreUtils.getLogVal(X,0)),t.dataRadiusOfPercent[y][D]=X/W,t.dataRadius[y][D]=t.dataRadiusOfPercent[y][D]*t.size,t.angleArr[y][D]=D*t.disAngle}),u=t.getDataPointsPos(t.dataRadius[y],t.angleArr[y]);var l=t.createPaths(u,{x:0,y:0});p=t.graphics.group({class:"apexcharts-series-markers-wrap apexcharts-element-hidden"}),x=t.graphics.group({class:"apexcharts-datalabels","data:realIndex":y}),i.globals.delayedElements.push({el:p.node,index:y});var g={i:y,realIndex:y,animationDelay:y,initialSpeed:i.config.chart.animations.speed,dataChangeSpeed:i.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-radar",shouldClipToGrid:!1,bindEventsOnPaths:!1,stroke:i.globals.stroke.colors[y],strokeLineCap:i.config.stroke.lineCap},m=null;i.globals.previousPaths.length>0&&(m=t.getPreviousPath(y));for(var v=0;v<l.linePathsTo.length;v++){var S=t.graphics.renderPaths(R(R({},g),{},{pathFrom:null===m?l.linePathsFrom[v]:m,pathTo:l.linePathsTo[v],strokeWidth:Array.isArray(t.strokeWidth)?t.strokeWidth[y]:t.strokeWidth,fill:"none",drawShadow:!1}));A.add(S);var T=a.fillPath({seriesNumber:y}),L=t.graphics.renderPaths(R(R({},g),{},{pathFrom:null===m?l.areaPathsFrom[v]:m,pathTo:l.areaPathsTo[v],strokeWidth:0,fill:T,drawShadow:!1}));i.config.chart.dropShadow.enabled&&new j(t.ctx).dropShadow(L,Object.assign({},i.config.chart.dropShadow,{noUserSpaceOnUse:!0}),y),A.add(L)}b.forEach(function(X,D){var W=new we(t.ctx).getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:y,dataPointIndex:D}),O=t.graphics.drawMarker(u[D].x,u[D].y,W);O.attr("rel",D),O.attr("j",D),O.attr("index",y),O.node.setAttribute("default-marker-size",W.pSize);var Z=t.graphics.group({class:"apexcharts-series-markers"});Z&&Z.add(O),p.add(Z),A.add(p);var J=i.config.dataLabels;if(J.enabled){var ae=J.formatter(i.globals.series[y][D],{seriesIndex:y,dataPointIndex:D,w:i});n.plotDataLabelsText({x:u[D].x,y:u[D].y,text:ae,textAnchor:"middle",i:y,j:y,parent:x,offsetCorrection:!1,dataLabelsConfig:R({},J)})}A.add(x)}),s.push(A)}),this.drawPolygons({parent:d}),i.config.xaxis.labels.show){var f=this.drawXAxisTexts();d.add(f)}return s.forEach(function(b){d.add(b)}),d.add(this.yaxisLabels),d}},{key:"drawPolygons",value:function(e){for(var t=this,i=this.w,a=e.parent,s=new ut(this.ctx),n=i.globals.yAxisScale[0].result.reverse(),r=n.length,o=[],h=this.size/(r-1),c=0;c<r;c++)o[c]=h*c;o.reverse();var d=[],u=[];o.forEach(function(p,x){var f=P.getPolygonPos(p,t.dataPointsLen),b="";f.forEach(function(y,k){if(0===x){var A=t.graphics.drawLine(y.x,y.y,0,0,Array.isArray(t.polygons.connectorColors)?t.polygons.connectorColors[k]:t.polygons.connectorColors);u.push(A)}0===k&&t.yaxisLabelsTextsPos.push({x:y.x,y:y.y}),b+=y.x+","+y.y+" "}),d.push(b)}),d.forEach(function(p,x){var f=t.polygons.strokeColors,b=t.polygons.strokeWidth,y=t.graphics.drawPolygon(p,Array.isArray(f)?f[x]:f,Array.isArray(b)?b[x]:b,i.globals.radarPolygons.fill.colors[x]);a.add(y)}),u.forEach(function(p){a.add(p)}),i.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach(function(p,x){var f=s.drawYAxisTexts(p.x,p.y,x,n[x]);t.yaxisLabels.add(f)})}},{key:"drawXAxisTexts",value:function(){var e=this,t=this.w,i=t.config.xaxis.labels,a=this.graphics.group({class:"apexcharts-xaxis"}),s=P.getPolygonPos(this.size,this.dataPointsLen);return t.globals.labels.forEach(function(n,r){var o=t.config.xaxis.labels.formatter,h=new pe(e.ctx);if(s[r]){var c=e.getTextPos(s[r],e.size),d=o(n,{seriesIndex:-1,dataPointIndex:r,w:t});h.plotDataLabelsText({x:c.newX,y:c.newY,text:d,textAnchor:c.textAnchor,i:r,j:r,parent:a,color:Array.isArray(i.style.colors)&&i.style.colors[r]?i.style.colors[r]:"#a8a8a8",dataLabelsConfig:R({textAnchor:c.textAnchor,dropShadow:{enabled:!1}},i),offsetCorrection:!1})}}),a}},{key:"createPaths",value:function(e,t){var i=this,a=[],s=[],n=[],r=[];if(e.length){s=[this.graphics.move(t.x,t.y)],r=[this.graphics.move(t.x,t.y)];var o=this.graphics.move(e[0].x,e[0].y),h=this.graphics.move(e[0].x,e[0].y);e.forEach(function(c,d){o+=i.graphics.line(c.x,c.y),h+=i.graphics.line(c.x,c.y),d===e.length-1&&(o+="Z",h+="Z")}),a.push(o),n.push(h)}return{linePathsFrom:s,linePathsTo:a,areaPathsFrom:r,areaPathsTo:n}}},{key:"getTextPos",value:function(e,t){var i="middle",a=e.x,s=e.y;return Math.abs(e.x)>=10?e.x>0?(i="start",a+=10):e.x<0&&(i="end",a-=10):i="middle",Math.abs(e.y)>=t-10&&(e.y<0?s-=10:e.y>0&&(s+=10)),{textAnchor:i,newX:a,newY:s}}},{key:"getPreviousPath",value:function(e){for(var t=this.w,i=null,a=0;a<t.globals.previousPaths.length;a++){var s=t.globals.previousPaths[a];s.paths.length>0&&parseInt(s.realIndex,10)===parseInt(e,10)&&void 0!==t.globals.previousPaths[a].paths[0]&&(i=t.globals.previousPaths[a].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;e=e||[],t=t||[];for(var a=[],s=0;s<i;s++){var n={};n.x=e[s]*Math.sin(t[s]),n.y=-e[s]*Math.cos(t[s]),a.push(n)}return a}}]),w}(),Ct=function(w){ge(t,pt);var e=ye(t);function t(i){var a;C(this,t),(a=e.call(this,i)).ctx=i,a.w=i.w,a.animBeginArr=[0],a.animDur=0;var s=a.w;return a.startAngle=s.config.plotOptions.radialBar.startAngle,a.endAngle=s.config.plotOptions.radialBar.endAngle,a.totalAngle=Math.abs(s.config.plotOptions.radialBar.endAngle-s.config.plotOptions.radialBar.startAngle),a.trackStartAngle=s.config.plotOptions.radialBar.track.startAngle,a.trackEndAngle=s.config.plotOptions.radialBar.track.endAngle,a.donutDataLabels=a.w.config.plotOptions.radialBar.dataLabels,a.radialDataLabels=a.donutDataLabels,a.trackStartAngle||(a.trackStartAngle=a.startAngle),a.trackEndAngle||(a.trackEndAngle=a.endAngle),360===a.endAngle&&(a.endAngle=359.99),a.margin=parseInt(s.config.plotOptions.radialBar.track.margin,10),a}return Y(t,[{key:"draw",value:function(i){var a=this.w,s=new M(this.ctx),n=s.group({class:"apexcharts-radialbar"});if(a.globals.noData)return n;var r=s.group(),o=this.defaultSize/2,h=a.globals.gridWidth/2,c=this.defaultSize/2.05;a.config.chart.sparkline.enabled||(c=c-a.config.stroke.width-a.config.chart.dropShadow.blur);var d=a.globals.fill.colors;if(a.config.plotOptions.radialBar.track.show){var u=this.drawTracks({size:c,centerX:h,centerY:o,colorArr:d,series:i});r.add(u)}var p=this.drawArcs({size:c,centerX:h,centerY:o,colorArr:d,series:i}),x=360;a.config.plotOptions.radialBar.startAngle<0&&(x=this.totalAngle);var f=(360-x)/360;if(a.globals.radialSize=c-c*f,this.radialDataLabels.value.show){var b=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);a.globals.radialSize+=b*f}return r.add(p.g),"front"===a.config.plotOptions.radialBar.hollow.position&&(p.g.add(p.elHollow),p.dataLabels&&p.g.add(p.dataLabels)),n.add(r),n}},{key:"drawTracks",value:function(i){var a=this.w,s=new M(this.ctx),n=s.group({class:"apexcharts-tracks"}),r=new j(this.ctx),o=new ie(this.ctx),h=this.getStrokeWidth(i);i.size=i.size-h/2;for(var c=0;c<i.series.length;c++){var d=s.group({class:"apexcharts-radialbar-track apexcharts-track"});n.add(d),d.attr({rel:c+1}),i.size=i.size-h-this.margin;var u=a.config.plotOptions.radialBar.track,p=o.fillPath({seriesNumber:0,size:i.size,fillColors:Array.isArray(u.background)?u.background[c]:u.background,solid:!0}),x=this.trackStartAngle,f=this.trackEndAngle;Math.abs(f)+Math.abs(x)>=360&&(f=360-Math.abs(this.startAngle)-.1);var b=s.drawPath({d:"",stroke:p,strokeWidth:h*parseInt(u.strokeWidth,10)/100,fill:"none",strokeOpacity:u.opacity,classes:"apexcharts-radialbar-area"});u.dropShadow.enabled&&r.dropShadow(b,u.dropShadow),d.add(b),b.attr("id","apexcharts-radialbarTrack-"+c),this.animatePaths(b,{centerX:i.centerX,centerY:i.centerY,endAngle:f,startAngle:x,size:i.size,i:c,totalItems:2,animBeginArr:0,dur:0,isTrack:!0,easing:a.globals.easing})}return n}},{key:"drawArcs",value:function(i){var a=this.w,s=new M(this.ctx),n=new ie(this.ctx),r=new j(this.ctx),o=s.group(),h=this.getStrokeWidth(i);i.size=i.size-h/2;var c=a.config.plotOptions.radialBar.hollow.background,d=i.size-h*i.series.length-this.margin*i.series.length-h*parseInt(a.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,u=d-a.config.plotOptions.radialBar.hollow.margin;void 0!==a.config.plotOptions.radialBar.hollow.image&&(c=this.drawHollowImage(i,o,d,c));var p=this.drawHollow({size:u,centerX:i.centerX,centerY:i.centerY,fill:c||"transparent"});a.config.plotOptions.radialBar.hollow.dropShadow.enabled&&r.dropShadow(p,a.config.plotOptions.radialBar.hollow.dropShadow);var f=1;!this.radialDataLabels.total.show&&a.globals.series.length>1&&(f=0);var b=null;this.radialDataLabels.show&&(b=this.renderInnerDataLabels(this.radialDataLabels,{hollowSize:d,centerX:i.centerX,centerY:i.centerY,opacity:f})),"back"===a.config.plotOptions.radialBar.hollow.position&&(o.add(p),b&&o.add(b));var y=!1;a.config.plotOptions.radialBar.inverseOrder&&(y=!0);for(var k=y?i.series.length-1:0;y?k>=0:k<i.series.length;y?k--:k++){var A=s.group({class:"apexcharts-series apexcharts-radial-series",seriesName:P.escapeString(a.globals.seriesNames[k])});o.add(A),A.attr({rel:k+1,"data:realIndex":k}),this.ctx.series.addCollapsedClassToSeries(A,k),i.size=i.size-h-this.margin;var l=n.fillPath({seriesNumber:k,size:i.size,value:i.series[k]}),g=this.startAngle,m=void 0,v=P.negToZero(i.series[k]>100?100:i.series[k])/100,S=Math.round(this.totalAngle*v)+this.startAngle,T=void 0;a.globals.dataChanged&&(m=this.startAngle,T=Math.round(this.totalAngle*P.negToZero(a.globals.previousPaths[k])/100)+m),Math.abs(S)+Math.abs(g)>=360&&(S-=.01),Math.abs(T)+Math.abs(m)>=360&&(T-=.01);var L=S-g,z=Array.isArray(a.config.stroke.dashArray)?a.config.stroke.dashArray[k]:a.config.stroke.dashArray,E=s.drawPath({d:"",stroke:l,strokeWidth:h,fill:"none",fillOpacity:a.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+k,strokeDashArray:z});M.setAttrs(E.node,{"data:angle":L,"data:value":i.series[k]}),a.config.chart.dropShadow.enabled&&r.dropShadow(E,a.config.chart.dropShadow,k),r.setSelectionFilter(E,0,k),this.addListeners(E,this.radialDataLabels),A.add(E),E.attr({index:0,j:k});var D=0;!this.initialAnim||a.globals.resized||a.globals.dataChanged||(this.animDur=(D=(S-g)/360*a.config.chart.animations.speed)/(1.2*i.series.length)+this.animDur,this.animBeginArr.push(this.animDur)),a.globals.dataChanged&&(this.animDur=(D=(S-g)/360*a.config.chart.animations.dynamicAnimation.speed)/(1.2*i.series.length)+this.animDur,this.animBeginArr.push(this.animDur)),this.animatePaths(E,{centerX:i.centerX,centerY:i.centerY,endAngle:S,startAngle:g,prevEndAngle:T,prevStartAngle:m,size:i.size,i:k,totalItems:2,animBeginArr:this.animBeginArr,dur:D,shouldSetPrevPaths:!0,easing:a.globals.easing})}return{g:o,elHollow:p,dataLabels:b}}},{key:"drawHollow",value:function(i){var a=new M(this.ctx).drawCircle(2*i.size);return a.attr({class:"apexcharts-radialbar-hollow",cx:i.centerX,cy:i.centerY,r:i.size,fill:i.fill}),a}},{key:"drawHollowImage",value:function(i,a,s,n){var r=this.w,o=new ie(this.ctx),h=P.randomId(),c=r.config.plotOptions.radialBar.hollow.image;if(r.config.plotOptions.radialBar.hollow.imageClipped)o.clippedImgArea({width:s,height:s,image:c,patternID:"pattern".concat(r.globals.cuid).concat(h)}),n="url(#pattern".concat(r.globals.cuid).concat(h,")");else{var d=r.config.plotOptions.radialBar.hollow.imageWidth,u=r.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===d&&void 0===u){var p=r.globals.dom.Paper.image(c).loaded(function(f){this.move(i.centerX-f.width/2+r.config.plotOptions.radialBar.hollow.imageOffsetX,i.centerY-f.height/2+r.config.plotOptions.radialBar.hollow.imageOffsetY)});a.add(p)}else{var x=r.globals.dom.Paper.image(c).loaded(function(f){this.move(i.centerX-d/2+r.config.plotOptions.radialBar.hollow.imageOffsetX,i.centerY-u/2+r.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(d,u)});a.add(x)}}return n}},{key:"getStrokeWidth",value:function(i){return i.size*(100-parseInt(this.w.config.plotOptions.radialBar.hollow.size,10))/100/(i.series.length+1)-this.margin}}]),t}(),Lt=function(){function w(e){C(this,w),this.w=e.w,this.lineCtx=e}return Y(w,[{key:"sameValueSeriesFix",value:function(e,t){var i=this.w;if("line"===i.config.chart.type&&("gradient"===i.config.fill.type||"gradient"===i.config.fill.type[e])&&new _(this.lineCtx.ctx,i).seriesHaveSameValues(e)){var a=t[e].slice();a[a.length-1]=a[a.length-1]+1e-6,t[e]=a}return t}},{key:"calculatePoints",value:function(e){var t=e.series,a=e.x,s=e.y,n=e.i,r=e.j,o=e.prevY,h=this.w,c=[],d=[];if(0===r){var u=this.lineCtx.categoryAxisCorrection+h.config.markers.offsetX;h.globals.isXNumeric&&(u=(h.globals.seriesX[e.realIndex][0]-h.globals.minX)/this.lineCtx.xRatio+h.config.markers.offsetX),c.push(u),d.push(P.isNumber(t[n][0])?o+h.config.markers.offsetY:null),c.push(a+h.config.markers.offsetX),d.push(P.isNumber(t[n][r+1])?s+h.config.markers.offsetY:null)}else c.push(a+h.config.markers.offsetX),d.push(P.isNumber(t[n][r+1])?s+h.config.markers.offsetY:null);return{x:c,y:d}}},{key:"checkPreviousPaths",value:function(e){for(var t=e.pathFromLine,i=e.pathFromArea,a=e.realIndex,s=this.w,n=0;n<s.globals.previousPaths.length;n++){var r=s.globals.previousPaths[n];("line"===r.type||"area"===r.type)&&r.paths.length>0&&parseInt(r.realIndex,10)===parseInt(a,10)&&("line"===r.type?(this.lineCtx.appendPathFrom=!1,t=s.globals.previousPaths[n].paths[0].d):"area"===r.type&&(this.lineCtx.appendPathFrom=!1,i=s.globals.previousPaths[n].paths[0].d,s.config.stroke.show&&s.globals.previousPaths[n].paths[1]&&(t=s.globals.previousPaths[n].paths[1].d)))}return{pathFromLine:t,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(e){var t=e.i,i=e.series,a=e.prevY,s=e.lineYPosition,n=this.w;if(void 0!==i[t][0])a=(s=n.config.chart.stacked&&t>0?this.lineCtx.prevSeriesY[t-1][0]:this.lineCtx.zeroY)-i[t][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]+2*(this.lineCtx.isReversed?i[t][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]:0);else if(n.config.chart.stacked&&t>0&&void 0===i[t][0])for(var r=t-1;r>=0;r--)if(null!=i[r][0]){a=s=this.lineCtx.prevSeriesY[r][0];break}return{prevY:a,lineYPosition:s}}}]),w}(),$e=function(){function w(e,t,i){C(this,w),this.ctx=e,this.w=e.w,this.xyRatios=t,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||i,this.scatter=new He(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Lt(this),this.markers=new we(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return Y(w,[{key:"draw",value:function(e,t,i){var a=this.w,s=new M(this.ctx),n=a.globals.comboCharts?t:a.config.chart.type,r=s.group({class:"apexcharts-".concat(n,"-series apexcharts-plot-series")}),o=new _(this.ctx,a);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=o.getLogSeries(e),this.yRatio=o.getLogYRatios(this.yRatio);for(var h=[],c=0;c<e.length;c++){e=this.lineHelpers.sameValueSeriesFix(c,e);var d=a.globals.comboCharts?i[c]:c;this._initSerieVariables(e,c,d);var u=[],p=[],x=a.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,d),a.globals.isXNumeric&&a.globals.seriesX.length>0&&(x=(a.globals.seriesX[d][0]-a.globals.minX)/this.xRatio),p.push(x);var f,b=x,y=b,k=this.zeroY;k=this.lineHelpers.determineFirstPrevY({i:c,series:e,prevY:k,lineYPosition:0}).prevY,u.push(k),f=k;var A=this._calculatePathsFrom({series:e,i:c,realIndex:d,prevX:y,prevY:k}),l=this._iterateOverDataPoints({series:e,realIndex:d,i:c,x,y:1,pX:b,pY:f,pathsFrom:A,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:p,yArrj:u});this._handlePaths({type:n,realIndex:d,i:c,paths:l}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),h.push(this.elSeries)}if(a.config.chart.stacked)for(var g=h.length;g>0;g--)r.add(h[g-1]);else for(var m=0;m<h.length;m++)r.add(h[m]);return r}},{key:"_initSerieVariables",value:function(e,t,i){var a=this.w,s=new M(this.ctx);this.xDivision=a.globals.gridWidth/(a.globals.dataPoints-("on"===a.config.xaxis.tickPlacement?1:0)),this.strokeWidth=Array.isArray(a.config.stroke.width)?a.config.stroke.width[i]:a.config.stroke.width,this.yRatio.length>1&&(this.yaxisIndex=i),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.zeroY=a.globals.gridHeight-this.baseLineY[this.yaxisIndex]-(this.isReversed?a.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),this.areaBottomY=this.zeroY,(this.zeroY>a.globals.gridHeight||"end"===a.config.plotOptions.area.fillTo)&&(this.areaBottomY=a.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=s.group({class:"apexcharts-series",seriesName:P.escapeString(a.globals.seriesNames[i])}),this.elPointsMain=s.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=s.group({class:"apexcharts-datalabels","data:realIndex":i}),this.elSeries.attr({"data:longestSeries":e[t].length===a.globals.dataPoints,rel:t+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(e){var t,i,a,s,n=e.series,r=e.i,o=e.realIndex,h=e.prevX,c=e.prevY,d=this.w,u=new M(this.ctx);if(null===n[r][0]){for(var p=0;p<n[r].length;p++)if(null!==n[r][p]){t=u.move(h=this.xDivision*p,c=this.zeroY-n[r][p]/this.yRatio[this.yaxisIndex]),i=u.move(h,this.areaBottomY);break}}else t=u.move(h,c),i=u.move(h,this.areaBottomY)+u.line(h,c);if(a=u.move(-1,this.zeroY)+u.line(-1,this.zeroY),s=u.move(-1,this.zeroY)+u.line(-1,this.zeroY),d.globals.previousPaths.length>0){var x=this.lineHelpers.checkPreviousPaths({pathFromLine:a,pathFromArea:s,realIndex:o});a=x.pathFromLine,s=x.pathFromArea}return{prevX:h,prevY:c,linePath:t,areaPath:i,pathFromLine:a,pathFromArea:s}}},{key:"_handlePaths",value:function(e){var t=e.type,i=e.realIndex,a=e.i,s=e.paths,n=this.w,r=new M(this.ctx),o=new ie(this.ctx);this.prevSeriesY.push(s.yArrj),n.globals.seriesXvalues[i]=s.xArrj,n.globals.seriesYvalues[i]=s.yArrj;var h=n.config.forecastDataPoints;if(h.count>0){var c=n.globals.seriesXvalues[i][n.globals.seriesXvalues[i].length-h.count-1],d=r.drawRect(c,0,n.globals.gridWidth,n.globals.gridHeight,0);n.globals.dom.elForecastMask.appendChild(d.node);var u=r.drawRect(0,0,c,n.globals.gridHeight,0);n.globals.dom.elNonForecastMask.appendChild(u.node)}this.pointsChart||n.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var p={i:a,realIndex:i,animationDelay:a,initialSpeed:n.config.chart.animations.speed,dataChangeSpeed:n.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(t)};if("area"===t)for(var x=o.fillPath({seriesNumber:i}),f=0;f<s.areaPaths.length;f++){var b=r.renderPaths(R(R({},p),{},{pathFrom:s.pathFromArea,pathTo:s.areaPaths[f],stroke:"none",strokeWidth:0,strokeLineCap:null,fill:x}));this.elSeries.add(b)}if(n.config.stroke.show&&!this.pointsChart){var y;y="line"===t?o.fillPath({seriesNumber:i,i:a}):n.globals.stroke.colors[i];for(var k=0;k<s.linePaths.length;k++){var A=R(R({},p),{},{pathFrom:s.pathFromLine,pathTo:s.linePaths[k],stroke:y,strokeWidth:this.strokeWidth,strokeLineCap:n.config.stroke.lineCap,fill:"none"}),l=r.renderPaths(A);if(this.elSeries.add(l),h.count>0){var g=r.renderPaths(A);g.node.setAttribute("stroke-dasharray",h.dashArray),h.strokeWidth&&g.node.setAttribute("stroke-width",h.strokeWidth),this.elSeries.add(g),g.attr("clip-path","url(#forecastMask".concat(n.globals.cuid,")")),l.attr("clip-path","url(#nonForecastMask".concat(n.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(e){for(var t=e.series,i=e.realIndex,a=e.i,s=e.x,n=e.y,r=e.pX,o=e.pY,h=e.pathsFrom,c=e.linePaths,d=e.areaPaths,u=e.seriesIndex,p=e.lineYPosition,x=e.xArrj,f=e.yArrj,b=this.w,y=new M(this.ctx),k=this.yRatio,A=h.prevY,l=h.linePath,g=h.areaPath,m=h.pathFromLine,v=h.pathFromArea,S=P.isNumber(b.globals.minYArr[i])?b.globals.minYArr[i]:b.globals.minY,T=b.globals.dataPoints>1?b.globals.dataPoints-1:b.globals.dataPoints,L=0;L<T;L++){var z=null==t[a][L+1];if(b.globals.isXNumeric){var E=b.globals.seriesX[i][L+1];void 0===b.globals.seriesX[i][L+1]&&(E=b.globals.seriesX[i][T-1]),s=(E-b.globals.minX)/this.xRatio}else s+=this.xDivision;p=b.config.chart.stacked&&a>0&&b.globals.collapsedSeries.length<b.config.series.length-1?this.prevSeriesY[function(W){for(var O=W,Z=0;Z<b.globals.series.length;Z++)if(b.globals.collapsedSeriesIndices.indexOf(W)>-1){O--;break}return O>=0?O:0}(a-1)][L+1]:this.zeroY,n=z?p-S/k[this.yaxisIndex]+2*(this.isReversed?S/k[this.yaxisIndex]:0):p-t[a][L+1]/k[this.yaxisIndex]+2*(this.isReversed?t[a][L+1]/k[this.yaxisIndex]:0),x.push(s),f.push(n);var X=this.lineHelpers.calculatePoints({series:t,x:s,y:n,realIndex:i,i:a,j:L,prevY:A}),D=this._createPaths({series:t,i:a,realIndex:i,j:L,x:s,y:n,pX:r,pY:o,linePath:l,areaPath:g,linePaths:c,areaPaths:d,seriesIndex:u});d=D.areaPaths,c=D.linePaths,r=D.pX,o=D.pY,g=D.areaPath,l=D.linePath,this.appendPathFrom&&(m+=y.line(s,this.zeroY),v+=y.line(s,this.zeroY)),this.handleNullDataPoints(t,X,a,L,i),this._handleMarkersAndLabels({pointsPos:X,series:t,x:s,y:n,prevY:A,i:a,j:L,realIndex:i})}return{yArrj:f,xArrj:x,pathFromArea:v,areaPaths:d,pathFromLine:m,linePaths:c}}},{key:"_handleMarkersAndLabels",value:function(e){var t=e.pointsPos,i=e.i,a=e.j,s=e.realIndex,n=this.w,r=new pe(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,a,{realIndex:s,pointsPos:t,zRatio:this.zRatio,elParent:this.elPointsMain});else{n.globals.series[i].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var o=this.markers.plotChartMarkers(t,s,a+1);null!==o&&this.elPointsMain.add(o)}var h=r.drawDataLabel(t,s,a+1,null);null!==h&&this.elDataLabelsWrap.add(h)}},{key:"_createPaths",value:function(e){var t=e.series,i=e.i,a=e.realIndex,s=e.j,n=e.x,r=e.y,o=e.pX,h=e.pY,c=e.linePath,d=e.areaPath,u=e.linePaths,p=e.areaPaths,x=e.seriesIndex,f=this.w,b=new M(this.ctx),y=f.config.stroke.curve,k=this.areaBottomY;if(Array.isArray(f.config.stroke.curve)&&(y=Array.isArray(x)?f.config.stroke.curve[x[i]]:f.config.stroke.curve[i]),"smooth"===y){var A=.35*(n-o);f.globals.hasNullValues?(null!==t[i][s]&&(null!==t[i][s+1]?(c=b.move(o,h)+b.curve(o+A,h,n-A,r,n+1,r),d=b.move(o+1,h)+b.curve(o+A,h,n-A,r,n+1,r)+b.line(n,k)+b.line(o,k)+"z"):(c=b.move(o,h),d=b.move(o,h)+"z")),u.push(c),p.push(d)):(c+=b.curve(o+A,h,n-A,r,n,r),d+=b.curve(o+A,h,n-A,r,n,r)),o=n,h=r,s===t[i].length-2&&(d=d+b.curve(o,h,n,r,n,k)+b.move(n,r)+"z",f.globals.hasNullValues||(u.push(c),p.push(d)))}else null===t[i][s+1]&&(c+=b.move(n,r),d=d+b.line(f.globals.isXNumeric?(f.globals.seriesX[a][s]-f.globals.minX)/this.xRatio:n-this.xDivision,k)+b.move(n,r)+"z"),null===t[i][s]&&(c+=b.move(n,r),d+=b.move(n,k)),"stepline"===y?(c=c+b.line(n,null,"H")+b.line(null,r,"V"),d=d+b.line(n,null,"H")+b.line(null,r,"V")):"straight"===y&&(c+=b.line(n,r),d+=b.line(n,r)),s===t[i].length-2&&(d=d+b.line(n,k)+b.move(n,r)+"z",u.push(c),p.push(d));return{linePaths:u,areaPaths:p,pX:o,pY:h,linePath:c,areaPath:d}}},{key:"handleNullDataPoints",value:function(e,t,i,a,s){var n=this.w;if(null===e[i][a]&&n.config.markers.showNullDataPoints||1===e[i].length){var r=this.markers.plotChartMarkers(t,s,a+1,this.strokeWidth-n.config.markers.strokeWidth/2,!0);null!==r&&this.elPointsMain.add(r)}}}]),w}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function w(r,o,h,c){this.xoffset=r,this.yoffset=o,this.height=c,this.width=h,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(d){var u,p=[],x=this.xoffset,f=this.yoffset,b=s(d)/this.height,y=s(d)/this.width;if(this.width>=this.height)for(u=0;u<d.length;u++)p.push([x,f,x+b,f+d[u]/b]),f+=d[u]/b;else for(u=0;u<d.length;u++)p.push([x,f,x+d[u]/y,f+y]),x+=d[u]/y;return p},this.cutArea=function(d){var u;if(this.width>=this.height){var p=d/this.height;u=new w(this.xoffset+p,this.yoffset,this.width-p,this.height)}else{var f=d/this.width;u=new w(this.xoffset,this.yoffset+f,this.width,this.height-f)}return u}}function e(r,o,h,c,d){return c=void 0===c?0:c,d=void 0===d?0:d,function(u){var p,x,f=[];for(p=0;p<u.length;p++)for(x=0;x<u[p].length;x++)f.push(u[p][x]);return f}(t(function(u,p){var x,f=[],b=p/s(u);for(x=0;x<u.length;x++)f[x]=u[x]*b;return f}(r,o*h),[],new w(c,d,o,h),[]))}function t(r,o,h,c){var d,u,p,x,f,b,y;if(0!==r.length)return d=h.shortestEdge(),f=u=r[0],b=d,0===(x=o).length||((y=x.slice()).push(f),i(x,b)>=i(y,b))?(o.push(u),t(r.slice(1),o,h,c)):(p=h.cutArea(s(o),c),c.push(h.getCoordinates(o)),t(r,[],p,c)),c;c.push(h.getCoordinates(o))}function i(r,o){var h=Math.min.apply(Math,r),c=Math.max.apply(Math,r),d=s(r);return Math.max(Math.pow(o,2)*c/Math.pow(d,2),Math.pow(d,2)/(Math.pow(o,2)*h))}function a(r){return r&&r.constructor===Array}function s(r){var o,h=0;for(o=0;o<r.length;o++)h+=r[o];return h}function n(r){var o,h=0;if(a(r[0]))for(o=0;o<r.length;o++)h+=n(r[o]);else h=s(r);return h}return function r(o,h,c,d,u){d=void 0===d?0:d,u=void 0===u?0:u;var p,x,f=[],b=[];if(a(o[0])){for(x=0;x<o.length;x++)f[x]=n(o[x]);for(p=e(f,h,c,d,u),x=0;x<o.length;x++)b.push(r(o[x],p[x][2]-p[x][0],p[x][3]-p[x][1],p[x][0],p[x][1]))}else b=e(o,h,c,d,u);return b}}();var Je,ft,Pt=function(){function w(e,t){C(this,w),this.ctx=e,this.w=e.w,this.strokeWidth=this.w.config.stroke.width,this.helpers=new gt(e),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[]}return Y(w,[{key:"draw",value:function(e){var t=this,i=this.w,a=new M(this.ctx),s=new ie(this.ctx),n=a.group({class:"apexcharts-treemap"});if(i.globals.noData)return n;var r=[];return e.forEach(function(o){var h=o.map(function(c){return Math.abs(c)});r.push(h)}),this.negRange=this.helpers.checkColorRange(),i.config.series.forEach(function(o,h){o.data.forEach(function(c){Array.isArray(t.labels[h])||(t.labels[h]=[]),t.labels[h].push(c.x)})}),window.TreemapSquared.generate(r,i.globals.gridWidth,i.globals.gridHeight).forEach(function(o,h){var c=a.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:P.escapeString(i.globals.seriesNames[h]),rel:h+1,"data:realIndex":h});if(i.config.chart.dropShadow.enabled){var d=i.config.chart.dropShadow;new j(t.ctx).dropShadow(n,d,h)}var u=a.group({class:"apexcharts-data-labels"});o.forEach(function(p,x){var f=p[0],b=p[1],y=p[2],k=p[3],A=a.drawRect(f,b,y-f,k-b,0,"#fff",1,t.strokeWidth,i.config.plotOptions.treemap.useFillColorAsStroke?g:i.globals.stroke.colors[h]);A.attr({cx:f,cy:b,index:h,i:h,j:x,width:y-f,height:k-b});var l=t.helpers.getShadeColor(i.config.chart.type,h,x,t.negRange),g=l.color;void 0!==i.config.series[h].data[x]&&i.config.series[h].data[x].fillColor&&(g=i.config.series[h].data[x].fillColor);var m=s.fillPath({color:g,seriesNumber:h,dataPointIndex:x});A.node.classList.add("apexcharts-treemap-rect"),A.attr({fill:m}),t.helpers.addListeners(A);var v={x:f+(y-f)/2,y:b+(k-b)/2,width:0,height:0},S={x:f,y:b,width:y-f,height:k-b};if(i.config.chart.animations.enabled&&!i.globals.dataChanged){var T=1;i.globals.resized||(T=i.config.chart.animations.speed),t.animateTreemap(A,v,S,T)}i.globals.dataChanged&&t.dynamicAnim.enabled&&i.globals.shouldAnimate&&(i.globals.previousPaths[h]&&i.globals.previousPaths[h][x]&&i.globals.previousPaths[h][x].rect&&(v=i.globals.previousPaths[h][x].rect),t.animateTreemap(A,v,S,t.dynamicAnim.speed));var z=t.getFontSize(p),E=i.config.dataLabels.formatter(t.labels[h][x],{value:i.globals.series[h][x],seriesIndex:h,dataPointIndex:x,w:i}),X=t.helpers.calculateDataLabels({text:E,x:(f+y)/2,y:(b+k)/2+t.strokeWidth/2+z/3,i:h,j:x,colorProps:l,fontSize:z,series:e});i.config.dataLabels.enabled&&X&&t.rotateToFitLabel(X,E,f,b,y,k),c.add(A),null!==X&&c.add(X)}),c.add(u),n.add(c)}),n}},{key:"getFontSize",value:function(e){var n,t=this.w,r=function o(h){var c,d=0;if(Array.isArray(h[0]))for(c=0;c<h.length;c++)d+=o(h[c]);else for(c=0;c<h.length;c++)d+=h[c].length;return d}(this.labels)/function o(h){var c,d=0;if(Array.isArray(h[0]))for(c=0;c<h.length;c++)d+=o(h[c]);else for(c=0;c<h.length;c++)d+=1;return d}(this.labels);return n=Math.pow((e[2]-e[0])*(e[3]-e[1]),.5),Math.min(n/r,parseInt(t.config.dataLabels.style.fontSize,10))}},{key:"rotateToFitLabel",value:function(e,t,i,a,s,n){var r=new M(this.ctx),o=r.getTextRects(t);if(o.width+5>s-i&&o.width<=n-a){var h=r.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(-90 ".concat(h.x," ").concat(h.y,")"))}}},{key:"animateTreemap",value:function(e,t,i,a){var s=new ue(this.ctx);s.animateRect(e,{x:t.x,y:t.y,width:t.width,height:t.height},{x:i.x,y:i.y,width:i.width,height:i.height},a,function(){s.animationCompleted(e)})}}]),w}(),Tt=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return Y(w,[{key:"calculateTimeScaleTicks",value:function(e,t){var i=this,a=this.w;if(a.globals.allSeriesCollapsed)return a.globals.labels=[],a.globals.timescaleLabels=[],[];var s=new U(this.ctx),n=(t-e)/864e5;this.determineInterval(n),a.globals.disableZoomIn=!1,a.globals.disableZoomOut=!1,n<.00011574074074074075?a.globals.disableZoomIn=!0:n>5e4&&(a.globals.disableZoomOut=!0);var r=s.getTimeUnitsfromTimestamp(e,t,this.utc),o=a.globals.gridWidth/n,h=o/24,c=h/60,d=c/60,u=Math.floor(24*n),p=Math.floor(1440*n),x=Math.floor(86400*n),f=Math.floor(n),b=Math.floor(n/30),y=Math.floor(n/365),k={minMillisecond:r.minMillisecond,minSecond:r.minSecond,minMinute:r.minMinute,minHour:r.minHour,minDate:r.minDate,minMonth:r.minMonth,minYear:r.minYear},A={firstVal:k,currentMillisecond:k.minMillisecond,currentSecond:k.minSecond,currentMinute:k.minMinute,currentHour:k.minHour,currentMonthDate:k.minDate,currentDate:k.minDate,currentMonth:k.minMonth,currentYear:k.minYear,daysWidthOnXAxis:o,hoursWidthOnXAxis:h,minutesWidthOnXAxis:c,secondsWidthOnXAxis:d,numberOfSeconds:x,numberOfMinutes:p,numberOfHours:u,numberOfDays:f,numberOfMonths:b,numberOfYears:y};switch(this.tickInterval){case"years":this.generateYearScale(A);break;case"months":case"half_year":this.generateMonthScale(A);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(A);break;case"hours":this.generateHourScale(A);break;case"minutes_fives":case"minutes":this.generateMinuteScale(A);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(A)}var l=this.timeScaleArray.map(function(g){var m={position:g.position,unit:g.unit,year:g.year,day:g.day?g.day:1,hour:g.hour?g.hour:0,month:g.month+1};return"month"===g.unit?R(R({},m),{},{day:1,value:g.value+1}):"day"===g.unit||"hour"===g.unit?R(R({},m),{},{value:g.value}):"minute"===g.unit?R(R({},m),{},{value:g.value,minute:g.value}):"second"===g.unit?R(R({},m),{},{value:g.value,minute:g.minute,second:g.second}):g});return l.filter(function(g){var m=1,v=Math.ceil(a.globals.gridWidth/120),S=g.value;void 0!==a.config.xaxis.tickAmount&&(v=a.config.xaxis.tickAmount),l.length>v&&(m=Math.floor(l.length/v));var T=!1,L=!1;switch(i.tickInterval){case"years":"year"===g.unit&&(T=!0);break;case"half_year":m=7,"year"===g.unit&&(T=!0);break;case"months":m=1,"year"===g.unit&&(T=!0);break;case"months_fortnight":m=15,"year"!==g.unit&&"month"!==g.unit||(T=!0),30===S&&(L=!0);break;case"months_days":m=10,"month"===g.unit&&(T=!0),30===S&&(L=!0);break;case"week_days":m=8,"month"===g.unit&&(T=!0);break;case"days":m=1,"month"===g.unit&&(T=!0);break;case"hours":"day"===g.unit&&(T=!0);break;case"minutes_fives":case"seconds_fives":S%5!=0&&(L=!0);break;case"seconds_tens":S%10!=0&&(L=!0)}if("hours"===i.tickInterval||"minutes_fives"===i.tickInterval||"seconds_tens"===i.tickInterval||"seconds_fives"===i.tickInterval){if(!L)return!0}else if((S%m==0||T)&&!L)return!0})}},{key:"recalcDimensionsBasedOnFormat",value:function(e,t){var i=this.w,a=this.formatDates(e),s=this.removeOverlappingTS(a);i.globals.timescaleLabels=s.slice(),new Se(this.ctx).plotCoords()}},{key:"determineInterval",value:function(e){var t=24*e,i=60*t;switch(!0){case e/365>5:this.tickInterval="years";break;case e>800:this.tickInterval="half_year";break;case e>180:this.tickInterval="months";break;case e>90:this.tickInterval="months_fortnight";break;case e>60:this.tickInterval="months_days";break;case e>30:this.tickInterval="week_days";break;case e>2:this.tickInterval="days";break;case t>2.4:this.tickInterval="hours";break;case i>15:this.tickInterval="minutes_fives";break;case i>5:this.tickInterval="minutes";break;case i>1:this.tickInterval="seconds_tens";break;case 60*i>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(e){var t=e.firstVal,i=e.currentMonth,a=e.currentYear,s=e.daysWidthOnXAxis,n=e.numberOfYears,r=t.minYear,o=0,h=new U(this.ctx),c="year";if(t.minDate>1||t.minMonth>0){var d=h.determineRemainingDaysOfYear(t.minYear,t.minMonth,t.minDate);o=(h.determineDaysOfYear(t.minYear)-d+1)*s,this.timeScaleArray.push({position:o,value:r=t.minYear+1,unit:c,year:r,month:P.monthMod(i+1)})}else 1===t.minDate&&0===t.minMonth&&this.timeScaleArray.push({position:o,value:r,unit:c,year:a,month:P.monthMod(i+1)});for(var u=r,p=o,x=0;x<n;x++)u++,p=h.determineDaysOfYear(u-1)*s+p,this.timeScaleArray.push({position:p,value:u,unit:c,year:u,month:1})}},{key:"generateMonthScale",value:function(e){var t=e.firstVal,i=e.currentMonthDate,a=e.currentMonth,s=e.currentYear,n=e.daysWidthOnXAxis,r=e.numberOfMonths,o=a,h=0,c=new U(this.ctx),d="month",u=0;if(t.minDate>1){h=(c.determineDaysOfMonths(a+1,t.minYear)-i+1)*n,o=P.monthMod(a+1);var p=s+u,x=P.monthMod(o),f=o;0===o&&(d="year",f=p,x=1,p+=u+=1),this.timeScaleArray.push({position:h,value:f,unit:d,year:p,month:x})}else this.timeScaleArray.push({position:h,value:o,unit:d,year:s,month:P.monthMod(a)});for(var b=o+1,y=h,k=0,A=1;k<r;k++,A++){0===(b=P.monthMod(b))?(d="year",u+=1):d="month";var l=this._getYear(s,b,u);y=c.determineDaysOfMonths(b,l)*n+y,this.timeScaleArray.push({position:y,value:0===b?l:b,unit:d,year:l,month:0===b?1:b}),b++}}},{key:"generateDayScale",value:function(e){var t=e.firstVal,i=e.currentMonth,a=e.currentYear,s=e.hoursWidthOnXAxis,n=e.numberOfDays,r=new U(this.ctx),o="day",h=t.minDate+1,c=h,d=function(A,l,g){return A>r.determineDaysOfMonths(l+1,g)&&(c=1,o="month",p=l+=1),l},u=(24-t.minHour)*s,p=h,x=d(c,i,a);0===t.minHour&&1===t.minDate?(u=0,p=P.monthMod(t.minMonth),o="month",c=t.minDate,n++):1!==t.minDate&&0===t.minHour&&0===t.minMinute&&(u=0,p=h=t.minDate,x=d(c=h,i,a)),this.timeScaleArray.push({position:u,value:p,unit:o,year:this._getYear(a,x,0),month:P.monthMod(x),day:c});for(var f=u,b=0;b<n;b++){o="day",x=d(c+=1,x,this._getYear(a,x,0));var y=this._getYear(a,x,0);f=24*s+f;var k=1===c?P.monthMod(x):c;this.timeScaleArray.push({position:f,value:k,unit:o,year:y,month:P.monthMod(x),day:k})}}},{key:"generateHourScale",value:function(e){var t=e.firstVal,i=e.currentDate,a=e.currentMonth,s=e.currentYear,n=e.minutesWidthOnXAxis,r=e.numberOfHours,o=new U(this.ctx),h="hour",d=function(m,v){return m>o.determineDaysOfMonths(v+1,s)?v+=1:v},u=60-(t.minMinute+t.minSecond/60),p=u*n,x=t.minHour+1,f=x+1;60===u&&(p=0,f=(x=t.minHour)+1);var m,v,b=i,y=d(b,a);this.timeScaleArray.push({position:p,value:x,unit:h,day:b,hour:f,year:s,month:P.monthMod(y)});for(var k=p,A=0;A<r;A++){h="hour",f>=24&&(f=0,h="day",y=(m=b+=1,v=y,m>o.determineDaysOfMonths(v+1,s)&&(b=1,v+=1),{month:v,date:b}).month,y=d(b,y));var l=this._getYear(s,y,0);this.timeScaleArray.push({position:k=0===f&&0===A?u*n:60*n+k,value:0===f?b:f,unit:h,hour:f,day:b,year:l,month:P.monthMod(y)}),f++}}},{key:"generateMinuteScale",value:function(e){for(var h=e.minutesWidthOnXAxis,d=e.numberOfMinutes,u=e.currentMinute+1,p=e.currentDate,x=e.currentMonth,f=e.currentYear,b=e.currentHour,y=(60-e.currentSecond-e.currentMillisecond/1e3)*e.secondsWidthOnXAxis,k=0;k<d;k++)u>=60&&(u=0,24===(b+=1)&&(b=0)),this.timeScaleArray.push({position:y,value:u,unit:"minute",hour:b,minute:u,day:p,year:this._getYear(f,x,0),month:P.monthMod(x)}),y+=h,u++}},{key:"generateSecondScale",value:function(e){for(var h=e.secondsWidthOnXAxis,c=e.numberOfSeconds,d=e.currentSecond+1,u=e.currentMinute,p=e.currentDate,x=e.currentMonth,f=e.currentYear,b=e.currentHour,y=(1e3-e.currentMillisecond)/1e3*h,k=0;k<c;k++)d>=60&&(d=0,++u>=60&&(u=0,24==++b&&(b=0))),this.timeScaleArray.push({position:y,value:d,unit:"second",hour:b,minute:u,second:d,day:p,year:this._getYear(f,x,0),month:P.monthMod(x)}),y+=h,d++}},{key:"createRawDateString",value:function(e,t){var i=e.year;return 0===e.month&&(e.month=1),i+="-"+("0"+e.month.toString()).slice(-2),i+="day"===e.unit?"day"===e.unit?"-"+("0"+t).slice(-2):"-01":"-"+("0"+(e.day?e.day:"1")).slice(-2),i+="hour"===e.unit?"hour"===e.unit?"T"+("0"+t).slice(-2):"T00":"T"+("0"+(e.hour?e.hour:"0")).slice(-2),i+="minute"===e.unit?":"+("0"+t).slice(-2):":"+(e.minute?("0"+e.minute).slice(-2):"00"),i+="second"===e.unit?":"+("0"+t).slice(-2):":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(e){var t=this,i=this.w;return e.map(function(a){var s=a.value.toString(),n=new U(t.ctx),r=t.createRawDateString(a,s),o=n.getDate(n.parseDate(r));if(t.utc||(o=n.getDate(n.parseDateWithTimezone(r))),void 0===i.config.xaxis.labels.format){var h="dd MMM",c=i.config.xaxis.labels.datetimeFormatter;"year"===a.unit&&(h=c.year),"month"===a.unit&&(h=c.month),"day"===a.unit&&(h=c.day),"hour"===a.unit&&(h=c.hour),"minute"===a.unit&&(h=c.minute),"second"===a.unit&&(h=c.second),s=n.formatDate(o,h)}else s=n.formatDate(o,i.config.xaxis.labels.format);return{dateString:r,position:a.position,value:s,unit:a.unit,year:a.year,month:a.month}})}},{key:"removeOverlappingTS",value:function(e){var t,i=this,a=new M(this.ctx),s=!1;e.length>0&&e[0].value&&e.every(function(o){return o.value.length===e[0].value.length})&&(s=!0,t=a.getTextRects(e[0].value).width);var n=0;return e.map(function(o,h){if(h>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var c=s?t:a.getTextRects(e[n].value).width;return o.position>e[n].position+c+10?(n=h,o):null}return o}).filter(function(o){return null!==o})}},{key:"_getYear",value:function(e,t,i){return e+Math.floor(t/12)+i}}]),w}(),It=function(){function w(e,t){C(this,w),this.ctx=t,this.w=t.w,this.el=e}return Y(w,[{key:"setupElements",value:function(){var e=this.w.globals,t=this.w.config,i=t.chart.type;e.axisCharts=["line","area","bar","rangeBar","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].indexOf(i)>-1,e.xyCharts=["line","area","bar","rangeBar","candlestick","boxPlot","scatter","bubble"].indexOf(i)>-1,e.isBarHorizontal=("bar"===t.chart.type||"rangeBar"===t.chart.type||"boxPlot"===t.chart.type)&&t.plotOptions.bar.horizontal,e.chartClass=".apexcharts"+e.chartID,e.dom.baseEl=this.el,e.dom.elWrap=document.createElement("div"),M.setAttrs(e.dom.elWrap,{id:e.chartClass.substring(1),class:"apexcharts-canvas "+e.chartClass.substring(1)}),this.el.appendChild(e.dom.elWrap),e.dom.Paper=new window.SVG.Doc(e.dom.elWrap),e.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(t.chart.offsetX,", ").concat(t.chart.offsetY,")")}),e.dom.Paper.node.style.background=t.chart.background,this.setSVGDimensions(),e.dom.elGraphical=e.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),e.dom.elAnnotations=e.dom.Paper.group().attr({class:"apexcharts-annotations"}),e.dom.elDefs=e.dom.Paper.defs(),e.dom.elLegendWrap=document.createElement("div"),e.dom.elLegendWrap.classList.add("apexcharts-legend"),e.dom.elWrap.appendChild(e.dom.elLegendWrap),e.dom.Paper.add(e.dom.elGraphical),e.dom.elGraphical.add(e.dom.elDefs)}},{key:"plotChartType",value:function(e,t){var i=this.w,a=i.config,s=i.globals,n={series:[],i:[]},r={series:[],i:[]},o={series:[],i:[]},h={series:[],i:[]},c={series:[],i:[]},d={series:[],i:[]},u={series:[],i:[]};s.series.map(function(g,m){var v=0;void 0!==e[m].type?("column"===e[m].type||"bar"===e[m].type?(s.series.length>1&&a.plotOptions.bar.horizontal&&console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"),c.series.push(g),c.i.push(m),v++,i.globals.columnSeries=c.series):"area"===e[m].type?(r.series.push(g),r.i.push(m),v++):"line"===e[m].type?(n.series.push(g),n.i.push(m),v++):"scatter"===e[m].type?(o.series.push(g),o.i.push(m)):"bubble"===e[m].type?(h.series.push(g),h.i.push(m),v++):"candlestick"===e[m].type?(d.series.push(g),d.i.push(m),v++):"boxPlot"===e[m].type?(u.series.push(g),u.i.push(m),v++):console.warn("You have specified an unrecognized chart type. Available types for this property are line/area/column/bar/scatter/bubble"),v>1&&(s.comboCharts=!0)):(n.series.push(g),n.i.push(m))});var p=new $e(this.ctx,t),x=new Ze(this.ctx,t);this.ctx.pie=new pt(this.ctx);var f=new Ct(this.ctx);this.ctx.rangeBar=new Xe(this.ctx,t);var b=new St(this.ctx),y=[];if(s.comboCharts){if(r.series.length>0&&y.push(p.draw(r.series,"area",r.i)),c.series.length>0)if(i.config.chart.stacked){var k=new dt(this.ctx,t);y.push(k.draw(c.series,c.i))}else this.ctx.bar=new fe(this.ctx,t),y.push(this.ctx.bar.draw(c.series,c.i));if(n.series.length>0&&y.push(p.draw(n.series,"line",n.i)),d.series.length>0&&y.push(x.draw(d.series,d.i)),u.series.length>0&&y.push(x.draw(u.series,u.i)),o.series.length>0){var A=new $e(this.ctx,t,!0);y.push(A.draw(o.series,"scatter",o.i))}if(h.series.length>0){var l=new $e(this.ctx,t,!0);y.push(l.draw(h.series,"bubble",h.i))}}else switch(a.chart.type){case"line":y=p.draw(s.series,"line");break;case"area":y=p.draw(s.series,"area");break;case"bar":a.chart.stacked?y=new dt(this.ctx,t).draw(s.series):(this.ctx.bar=new fe(this.ctx,t),y=this.ctx.bar.draw(s.series));break;case"candlestick":case"boxPlot":y=new Ze(this.ctx,t).draw(s.series);break;case"rangeBar":y=this.ctx.rangeBar.draw(s.series);break;case"heatmap":y=new At(this.ctx,t).draw(s.series);break;case"treemap":y=new Pt(this.ctx,t).draw(s.series);break;case"pie":case"donut":case"polarArea":y=this.ctx.pie.draw(s.series);break;case"radialBar":y=f.draw(s.series);break;case"radar":y=b.draw(s.series);break;default:y=p.draw(s.series)}return y}},{key:"setSVGDimensions",value:function(){var e=this.w.globals,t=this.w.config;e.svgWidth=t.chart.width,e.svgHeight=t.chart.height;var i=P.getDimensions(this.el),a=t.chart.width.toString().split(/[0-9]+/g).pop();"%"===a?P.isNumber(i[0])&&(0===i[0].width&&(i=P.getDimensions(this.el.parentNode)),e.svgWidth=i[0]*parseInt(t.chart.width,10)/100):"px"!==a&&""!==a||(e.svgWidth=parseInt(t.chart.width,10));var s=t.chart.height.toString().split(/[0-9]+/g).pop();if("auto"!==e.svgHeight&&""!==e.svgHeight)if("%"===s){var n=P.getDimensions(this.el.parentNode);e.svgHeight=n[1]*parseInt(t.chart.height,10)/100}else e.svgHeight=parseInt(t.chart.height,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;e.svgWidth<0&&(e.svgWidth=0),e.svgHeight<0&&(e.svgHeight=0),M.setAttrs(e.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==s&&(e.dom.Paper.node.parentNode.parentNode.style.minHeight=e.svgHeight+(t.chart.sparkline.enabled?0:e.axisCharts?t.chart.parentHeightOffset:0)+"px"),e.dom.elWrap.style.width=e.svgWidth+"px",e.dom.elWrap.style.height=e.svgHeight+"px"}},{key:"shiftGraphPosition",value:function(){var e=this.w.globals;M.setAttrs(e.dom.elGraphical.node,{transform:"translate("+e.translateX+", "+e.translateY+")"})}},{key:"resizeNonAxisCharts",value:function(){var e=this.w,t=e.globals,i=0,a=e.config.chart.sparkline.enabled?1:15;a+=e.config.grid.padding.bottom,"top"!==e.config.legend.position&&"bottom"!==e.config.legend.position||!e.config.legend.show||e.config.legend.floating||(i=new G(this.ctx).legendHelpers.getLegendBBox().clwh+10);var s=e.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),n=2.05*e.globals.radialSize;if(s&&!e.config.chart.sparkline.enabled&&0!==e.config.plotOptions.radialBar.startAngle){var r=P.getBoundingClientRect(s);n=r.bottom,n=Math.max(2.05*e.globals.radialSize,r.bottom-r.top)}var h=n+t.translateY+i+a;t.dom.elLegendForeign&&t.dom.elLegendForeign.setAttribute("height",h),t.dom.elWrap.style.height=h+"px",M.setAttrs(t.dom.Paper.node,{height:h}),t.dom.Paper.node.parentNode.parentNode.style.minHeight=h+"px"}},{key:"coreCalculations",value:function(){new Te(this.ctx).init()}},{key:"resetGlobals",value:function(){var e=this,t=function(){return e.w.config.series.map(function(s){return[]})},i=new Ye,a=this.w.globals;i.initGlobalVars(a),a.seriesXvalues=t(),a.seriesYvalues=t()}},{key:"isMultipleY",value:function(){if(this.w.config.yaxis.constructor===Array&&this.w.config.yaxis.length>1)return this.w.globals.isMultipleYAxis=!0,!0}},{key:"xySettings",value:function(){var e=null,t=this.w;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new Me(this.ctx).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new Me(this.ctx).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new Tt(this.ctx);var i=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}e=new _(this.ctx).getCalculatedRatios()}return e}},{key:"updateSourceChart",value:function(e){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:e.w.globals.minX,max:e.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var e=this,t=this.w;if(t.config.chart.brush.enabled&&"function"!=typeof t.config.chart.events.selection){var i=t.config.chart.brush.targets||[t.config.chart.brush.target];i.forEach(function(a){var s=ApexCharts.getChartByID(a);s.w.globals.brushSource=e.ctx,"function"!=typeof s.w.config.chart.events.zoomed&&(s.w.config.chart.events.zoomed=function(){e.updateSourceChart(s)}),"function"!=typeof s.w.config.chart.events.scrolled&&(s.w.config.chart.events.scrolled=function(){e.updateSourceChart(s)})}),t.config.chart.events.selection=function(a,s){i.forEach(function(n){var r=ApexCharts.getChartByID(n),o=P.clone(t.config.yaxis);if(t.config.chart.brush.autoScaleYaxis&&1===r.w.globals.series.length){var h=new he(r);o=h.autoScaleY(r,o,s)}var c=r.w.config.yaxis.reduce(function(d,u,p){return[].concat(te(d),[R(R({},r.w.config.yaxis[p]),{},{min:o[0].min,max:o[0].max})])},[]);r.ctx.updateHelpers._updateOptions({xaxis:{min:s.xaxis.min,max:s.xaxis.max},yaxis:c},!1,!1,!1,!1)})}}}}]),w}(),Mt=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w}return Y(w,[{key:"_updateOptions",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],n=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise(function(r){var o=[t.ctx];s&&(o=t.ctx.getSyncedCharts()),t.ctx.w.globals.isExecCalled&&(o=[t.ctx],t.ctx.w.globals.isExecCalled=!1),o.forEach(function(h,c){var d=h.w;return d.globals.shouldAnimate=a,i||(d.globals.resized=!0,d.globals.dataChanged=!0,a&&h.series.getPreviousPaths()),e&&"object"===V(e)&&(h.config=new xe(e),e=_.extendArrayProps(h.config,e,d),h.w.globals.chartID!==t.ctx.w.globals.chartID&&delete e.series,d.config=P.extend(d.config,e),n&&(d.globals.lastXAxis=e.xaxis?P.clone(e.xaxis):[],d.globals.lastYAxis=e.yaxis?P.clone(e.yaxis):[],d.globals.initialConfig=P.extend({},d.config),d.globals.initialSeries=P.clone(d.config.series))),h.update(e).then(function(){c===o.length-1&&r(h)})})})}},{key:"_updateSeries",value:function(e,t){var i=this,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return new Promise(function(s){var n,r=i.w;return r.globals.shouldAnimate=t,r.globals.dataChanged=!0,t&&i.ctx.series.getPreviousPaths(),r.globals.axisCharts?(0===(n=e.map(function(o,h){return i._extendSeries(o,h)})).length&&(n=[{data:[]}]),r.config.series=n):r.config.series=e.slice(),a&&(r.globals.initialSeries=P.clone(r.config.series)),i.ctx.update().then(function(){s(i.ctx)})})}},{key:"_extendSeries",value:function(e,t){var i=this.w,a=i.config.series[t];return R(R({},i.config.series[t]),{},{name:e.name?e.name:a&&a.name,color:e.color?e.color:a&&a.color,type:e.type?e.type:a&&a.type,data:e.data?e.data:a&&a.data})}},{key:"toggleDataPointSelection",value:function(e,t){var i=this.w,a=null,s=".apexcharts-series[data\\:realIndex='".concat(e,"']");return i.globals.axisCharts?a=i.globals.dom.Paper.select("".concat(s," path[j='").concat(t,"'], ").concat(s," circle[j='").concat(t,"'], ").concat(s," rect[j='").concat(t,"']")).members[0]:void 0===t&&(a=i.globals.dom.Paper.select("".concat(s," path[j='").concat(e,"']")).members[0],"pie"!==i.config.chart.type&&"polarArea"!==i.config.chart.type&&"donut"!==i.config.chart.type||this.ctx.pie.pieClicked(e)),a?(new M(this.ctx).pathMouseDown(a,null),a.node?a.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(e){var t=this.w;if(["min","max"].forEach(function(a){void 0!==e.xaxis[a]&&(t.config.xaxis[a]=e.xaxis[a],t.globals.lastXAxis[a]=e.xaxis[a])}),e.xaxis.categories&&e.xaxis.categories.length&&(t.config.xaxis.categories=e.xaxis.categories),t.config.xaxis.convertedCatToNumeric){var i=new ke(e);e=i.convertCatToNumericXaxis(e,this.ctx)}return e}},{key:"forceYAxisUpdate",value:function(e){var t=this.w;return t.config.chart.stacked&&"100%"===t.config.chart.stackType&&(Array.isArray(e.yaxis)?e.yaxis.forEach(function(i,a){e.yaxis[a].min=0,e.yaxis[a].max=100}):(e.yaxis.min=0,e.yaxis.max=100)),e}},{key:"revertDefaultAxisMinMax",value:function(e){var t=this,i=this.w,a=i.globals.lastXAxis,s=i.globals.lastYAxis;e&&e.xaxis&&(a=e.xaxis),e&&e.yaxis&&(s=e.yaxis),i.config.xaxis.min=a.min,i.config.xaxis.max=a.max,i.config.yaxis.map(function(r,o){i.globals.zoomed||void 0!==s[o]?function(r){void 0!==s[r]&&(i.config.yaxis[r].min=s[r].min,i.config.yaxis[r].max=s[r].max)}(o):void 0!==t.ctx.opts.yaxis[o]&&(r.min=t.ctx.opts.yaxis[o].min,r.max=t.ctx.opts.yaxis[o].max)})}}]),w}();Je="undefined"!=typeof window?window:void 0,ft=function(w,e){var t=(void 0!==this?this:w).SVG=function(l){if(t.supported)return l=new t.Doc(l),t.parser.draw||t.prepare(),l};if(t.ns="http://www.w3.org/2000/svg",t.xmlns="http://www.w3.org/2000/xmlns/",t.xlink="http://www.w3.org/1999/xlink",t.svgjs="http://svgjs.dev",t.supported=!0,!t.supported)return!1;t.did=1e3,t.eid=function(l){return"Svgjs"+c(l)+t.did++},t.create=function(l){var g=e.createElementNS(this.ns,l);return g.setAttribute("id",this.eid(l)),g},t.extend=function(){var l,g;g=(l=[].slice.call(arguments)).pop();for(var m=l.length-1;m>=0;m--)if(l[m])for(var v in g)l[m].prototype[v]=g[v];t.Set&&t.Set.inherit&&t.Set.inherit()},t.invent=function(l){var g="function"==typeof l.create?l.create:function(){this.constructor.call(this,t.create(l.create))};return l.inherit&&(g.prototype=new l.inherit),l.extend&&t.extend(g,l.extend),l.construct&&t.extend(l.parent||t.Container,l.construct),g},t.adopt=function(l){return l?l.instance?l.instance:((g="svg"==l.nodeName?l.parentNode instanceof w.SVGElement?new t.Nested:new t.Doc:"linearGradient"==l.nodeName?new t.Gradient("linear"):"radialGradient"==l.nodeName?new t.Gradient("radial"):t[c(l.nodeName)]?new(t[c(l.nodeName)]):new t.Element(l)).type=l.nodeName,g.node=l,l.instance=g,g instanceof t.Doc&&g.namespace().defs(),g.setData(JSON.parse(l.getAttribute("svgjs:data"))||{}),g):null;var g},t.prepare=function(){var l=e.getElementsByTagName("body")[0],g=(l?new t.Doc(l):t.adopt(e.documentElement).nested()).size(2,0);t.parser={body:l||e.documentElement,draw:g.style("opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden").node,poly:g.polyline().node,path:g.path().node,native:t.create("svg")}},t.parser={native:t.create("svg")},e.addEventListener("DOMContentLoaded",function(){t.parser.draw||t.prepare()},!1),t.regex={numberAndUnit:/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,hex:/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,rgb:/rgb\((\d+),(\d+),(\d+)\)/,reference:/#([a-z0-9\-_]+)/i,transforms:/\)\s*,?\s*/,whitespace:/\s/g,isHex:/^#[a-f0-9]{3,6}$/i,isRgb:/^rgb\(/,isCss:/[^:]+:[^;]+;?/,isBlank:/^(\s+)?$/,isNumber:/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,isPercent:/^-?[\d\.]+%$/,isImage:/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,delimiter:/[\s,]+/,hyphen:/([^e])\-/gi,pathLetters:/[MLHVCSQTAZ]/gi,isPathLetter:/[MLHVCSQTAZ]/i,numbersWithDots:/((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi,dots:/\./g},t.utils={map:function(l,g){for(var m=l.length,v=[],S=0;S<m;S++)v.push(g(l[S]));return v},filter:function(l,g){for(var m=l.length,v=[],S=0;S<m;S++)g(l[S])&&v.push(l[S]);return v},filterSVGElements:function(l){return this.filter(l,function(g){return g instanceof w.SVGElement})}},t.defaults={attrs:{"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","font-size":16,"font-family":"Helvetica, Arial, sans-serif","text-anchor":"start"}},t.Color=function(l){var g,m;this.r=0,this.g=0,this.b=0,l&&("string"==typeof l?t.regex.isRgb.test(l)?(g=t.regex.rgb.exec(l.replace(t.regex.whitespace,"")),this.r=parseInt(g[1]),this.g=parseInt(g[2]),this.b=parseInt(g[3])):t.regex.isHex.test(l)&&(g=t.regex.hex.exec(4==(m=l).length?["#",m.substring(1,2),m.substring(1,2),m.substring(2,3),m.substring(2,3),m.substring(3,4),m.substring(3,4)].join(""):m),this.r=parseInt(g[1],16),this.g=parseInt(g[2],16),this.b=parseInt(g[3],16)):"object"===V(l)&&(this.r=l.r,this.g=l.g,this.b=l.b))},t.extend(t.Color,{toString:function(){return this.toHex()},toHex:function(){return"#"+d(this.r)+d(this.g)+d(this.b)},toRgb:function(){return"rgb("+[this.r,this.g,this.b].join()+")"},brightness:function(){return this.r/255*.3+this.g/255*.59+this.b/255*.11},morph:function(l){return this.destination=new t.Color(l),this},at:function(l){return this.destination?new t.Color({r:~~(this.r+(this.destination.r-this.r)*(l=l<0?0:l>1?1:l)),g:~~(this.g+(this.destination.g-this.g)*l),b:~~(this.b+(this.destination.b-this.b)*l)}):this}}),t.Color.test=function(l){return t.regex.isHex.test(l+="")||t.regex.isRgb.test(l)},t.Color.isRgb=function(l){return l&&"number"==typeof l.r&&"number"==typeof l.g&&"number"==typeof l.b},t.Color.isColor=function(l){return t.Color.isRgb(l)||t.Color.test(l)},t.Array=function(l,g){0==(l=(l||[]).valueOf()).length&&g&&(l=g.valueOf()),this.value=this.parse(l)},t.extend(t.Array,{toString:function(){return this.value.join(" ")},valueOf:function(){return this.value},parse:function(l){return l=l.valueOf(),Array.isArray(l)?l:this.split(l)}}),t.PointArray=function(l,g){t.Array.call(this,l,g||[[0,0]])},t.PointArray.prototype=new t.Array,t.PointArray.prototype.constructor=t.PointArray;for(var i={M:function(l,g,m){return g.x=m.x=l[0],g.y=m.y=l[1],["M",g.x,g.y]},L:function(l,g){return g.x=l[0],g.y=l[1],["L",l[0],l[1]]},H:function(l,g){return g.x=l[0],["H",l[0]]},V:function(l,g){return g.y=l[0],["V",l[0]]},C:function(l,g){return g.x=l[4],g.y=l[5],["C",l[0],l[1],l[2],l[3],l[4],l[5]]},Q:function(l,g){return g.x=l[2],g.y=l[3],["Q",l[0],l[1],l[2],l[3]]},Z:function(l,g,m){return g.x=m.x,g.y=m.y,["Z"]}},a="mlhvqtcsaz".split(""),s=0,n=a.length;s<n;++s)i[a[s]]=function(l){return function(g,m,v){if("H"==l)g[0]=g[0]+m.x;else if("V"==l)g[0]=g[0]+m.y;else if("A"==l)g[5]=g[5]+m.x,g[6]=g[6]+m.y;else for(var S=0,T=g.length;S<T;++S)g[S]=g[S]+(S%2?m.y:m.x);if(i&&"function"==typeof i[l])return i[l](g,m,v)}}(a[s].toUpperCase());t.PathArray=function(l,g){t.Array.call(this,l,g||[["M",0,0]])},t.PathArray.prototype=new t.Array,t.PathArray.prototype.constructor=t.PathArray,t.extend(t.PathArray,{toString:function(){return function(l){for(var g=0,m=l.length,v="";g<m;g++)v+=l[g][0],null!=l[g][1]&&(v+=l[g][1],null!=l[g][2]&&(v+=" ",v+=l[g][2],null!=l[g][3]&&(v+=" ",v+=l[g][3],v+=" ",v+=l[g][4],null!=l[g][5]&&(v+=" ",v+=l[g][5],v+=" ",v+=l[g][6],null!=l[g][7]&&(v+=" ",v+=l[g][7])))));return v+" "}(this.value)},move:function(l,g){return this.bbox(),this},at:function(l){if(!this.destination)return this;for(var g=this.value,m=this.destination.value,v=[],S=new t.PathArray,T=0,L=g.length;T<L;T++){v[T]=[g[T][0]];for(var z=1,E=g[T].length;z<E;z++)v[T][z]=g[T][z]+(m[T][z]-g[T][z])*l;"A"===v[T][0]&&(v[T][4]=+(0!=v[T][4]),v[T][5]=+(0!=v[T][5]))}return S.value=v,S},parse:function(l){if(l instanceof t.PathArray)return l.valueOf();var g,m={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0};l="string"==typeof l?l.replace(t.regex.numbersWithDots,o).replace(t.regex.pathLetters," $& ").replace(t.regex.hyphen,"$1 -").trim().split(t.regex.delimiter):l.reduce(function(E,X){return[].concat.call(E,X)},[]);var v=[],S=new t.Point,T=new t.Point,L=0,z=l.length;do{t.regex.isPathLetter.test(l[L])?(g=l[L],++L):"M"==g?g="L":"m"==g&&(g="l"),v.push(i[g].call(null,l.slice(L,L+=m[g.toUpperCase()]).map(parseFloat),S,T))}while(z>L);return v},bbox:function(){return t.parser.draw||t.prepare(),t.parser.path.setAttribute("d",this.toString()),t.parser.path.getBBox()}}),t.Number=t.invent({create:function(l,g){this.value=0,this.unit=g||"","number"==typeof l?this.value=isNaN(l)?0:isFinite(l)?l:l<0?-34e37:34e37:"string"==typeof l?(g=l.match(t.regex.numberAndUnit))&&(this.value=parseFloat(g[1]),"%"==g[5]?this.value/=100:"s"==g[5]&&(this.value*=1e3),this.unit=g[5]):l instanceof t.Number&&(this.value=l.valueOf(),this.unit=l.unit)},extend:{toString:function(){return("%"==this.unit?~~(1e8*this.value)/1e6:"s"==this.unit?this.value/1e3:this.value)+this.unit},toJSON:function(){return this.toString()},valueOf:function(){return this.value},plus:function(l){return l=new t.Number(l),new t.Number(this+l,this.unit||l.unit)},minus:function(l){return l=new t.Number(l),new t.Number(this-l,this.unit||l.unit)},times:function(l){return l=new t.Number(l),new t.Number(this*l,this.unit||l.unit)},divide:function(l){return l=new t.Number(l),new t.Number(this/l,this.unit||l.unit)},to:function(l){var g=new t.Number(this);return"string"==typeof l&&(g.unit=l),g},morph:function(l){return this.destination=new t.Number(l),l.relative&&(this.destination.value+=this.value),this},at:function(l){return this.destination?new t.Number(this.destination).minus(this).times(l).plus(this):this}}}),t.Element=t.invent({create:function(l){this._stroke=t.defaults.attrs.stroke,this._event=null,this.dom={},(this.node=l)&&(this.type=l.nodeName,this.node.instance=this,this._stroke=l.getAttribute("stroke")||this._stroke)},extend:{x:function(l){return this.attr("x",l)},y:function(l){return this.attr("y",l)},cx:function(l){return null==l?this.x()+this.width()/2:this.x(l-this.width()/2)},cy:function(l){return null==l?this.y()+this.height()/2:this.y(l-this.height()/2)},move:function(l,g){return this.x(l).y(g)},center:function(l,g){return this.cx(l).cy(g)},width:function(l){return this.attr("width",l)},height:function(l){return this.attr("height",l)},size:function(l,g){var m=u(this,l,g);return this.width(new t.Number(m.width)).height(new t.Number(m.height))},clone:function(l){this.writeDataToDom();var g=f(this.node.cloneNode(!0));return l?l.add(g):this.after(g),g},remove:function(){return this.parent()&&this.parent().removeElement(this),this},replace:function(l){return this.after(l).remove(),l},addTo:function(l){return l.put(this)},putIn:function(l){return l.add(this)},id:function(l){return this.attr("id",l)},show:function(){return this.style("display","")},hide:function(){return this.style("display","none")},visible:function(){return"none"!=this.style("display")},toString:function(){return this.attr("id")},classes:function(){var l=this.attr("class");return null==l?[]:l.trim().split(t.regex.delimiter)},hasClass:function(l){return-1!=this.classes().indexOf(l)},addClass:function(l){if(!this.hasClass(l)){var g=this.classes();g.push(l),this.attr("class",g.join(" "))}return this},removeClass:function(l){return this.hasClass(l)&&this.attr("class",this.classes().filter(function(g){return g!=l}).join(" ")),this},toggleClass:function(l){return this.hasClass(l)?this.removeClass(l):this.addClass(l)},reference:function(l){return t.get(this.attr(l))},parent:function(l){var g=this;if(!g.node.parentNode)return null;if(g=t.adopt(g.node.parentNode),!l)return g;for(;g&&g.node instanceof w.SVGElement;){if("string"==typeof l?g.matches(l):g instanceof l)return g;if(!g.node.parentNode||"#document"==g.node.parentNode.nodeName)return null;g=t.adopt(g.node.parentNode)}},doc:function(){return this instanceof t.Doc?this:this.parent(t.Doc)},parents:function(l){var g=[],m=this;do{if(!(m=m.parent(l))||!m.node)break;g.push(m)}while(m.parent);return g},matches:function(l){return((g=this.node).matches||g.matchesSelector||g.msMatchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.oMatchesSelector).call(g,l);var g},native:function(){return this.node},svg:function(l){var g=e.createElement("svg");if(!(l&&this instanceof t.Parent))return g.appendChild(l=e.createElement("svg")),this.writeDataToDom(),l.appendChild(this.node.cloneNode(!0)),g.innerHTML.replace(/^<svg>/,"").replace(/<\/svg>$/,"");g.innerHTML="<svg>"+l.replace(/\n/,"").replace(/<([\w:-]+)([^<]+?)\/>/g,"<$1$2></$1>")+"</svg>";for(var m=0,v=g.firstChild.childNodes.length;m<v;m++)this.node.appendChild(g.firstChild.firstChild);return this},writeDataToDom:function(){return(this.each||this.lines)&&(this.each?this:this.lines()).each(function(){this.writeDataToDom()}),this.node.removeAttribute("svgjs:data"),Object.keys(this.dom).length&&this.node.setAttribute("svgjs:data",JSON.stringify(this.dom)),this},setData:function(l){return this.dom=l,this},is:function(l){return this instanceof l}}}),t.easing={"-":function(l){return l},"<>":function(l){return-Math.cos(l*Math.PI)/2+.5},">":function(l){return Math.sin(l*Math.PI/2)},"<":function(l){return 1-Math.cos(l*Math.PI/2)}},t.morph=function(l){return function(g,m){return new t.MorphObj(g,m).at(l)}},t.Situation=t.invent({create:function(l){this.init=!1,this.reversed=!1,this.reversing=!1,this.duration=new t.Number(l.duration).valueOf(),this.delay=new t.Number(l.delay).valueOf(),this.start=+new Date+this.delay,this.finish=this.start+this.duration,this.ease=l.ease,this.loop=0,this.loops=!1,this.animations={},this.attrs={},this.styles={},this.transforms=[],this.once={}}}),t.FX=t.invent({create:function(l){this._target=l,this.situations=[],this.active=!1,this.situation=null,this.paused=!1,this.lastPos=0,this.pos=0,this.absPos=0,this._speed=1},extend:{animate:function(l,g,m){"object"===V(l)&&(g=l.ease,m=l.delay,l=l.duration);var v=new t.Situation({duration:l||1e3,delay:m||0,ease:t.easing[g||"-"]||g});return this.queue(v),this},target:function(l){return l&&l instanceof t.Element?(this._target=l,this):this._target},timeToAbsPos:function(l){return(l-this.situation.start)/(this.situation.duration/this._speed)},absPosToTime:function(l){return this.situation.duration/this._speed*l+this.situation.start},startAnimFrame:function(){this.stopAnimFrame(),this.animationFrame=w.requestAnimationFrame(function(){this.step()}.bind(this))},stopAnimFrame:function(){w.cancelAnimationFrame(this.animationFrame)},start:function(){return!this.active&&this.situation&&(this.active=!0,this.startCurrent()),this},startCurrent:function(){return this.situation.start=+new Date+this.situation.delay/this._speed,this.situation.finish=this.situation.start+this.situation.duration/this._speed,this.initAnimations().step()},queue:function(l){return("function"==typeof l||l instanceof t.Situation)&&this.situations.push(l),this.situation||(this.situation=this.situations.shift()),this},dequeue:function(){return this.stop(),this.situation=this.situations.shift(),this.situation&&(this.situation instanceof t.Situation?this.start():this.situation.call(this)),this},initAnimations:function(){var l,g=this.situation;if(g.init)return this;for(var m in g.animations){l=this.target()[m](),Array.isArray(l)||(l=[l]),Array.isArray(g.animations[m])||(g.animations[m]=[g.animations[m]]);for(var v=l.length;v--;)g.animations[m][v]instanceof t.Number&&(l[v]=new t.Number(l[v])),g.animations[m][v]=l[v].morph(g.animations[m][v])}for(var m in g.attrs)g.attrs[m]=new t.MorphObj(this.target().attr(m),g.attrs[m]);for(var m in g.styles)g.styles[m]=new t.MorphObj(this.target().style(m),g.styles[m]);return g.initialTransformation=this.target().matrixify(),g.init=!0,this},clearQueue:function(){return this.situations=[],this},clearCurrent:function(){return this.situation=null,this},stop:function(l,g){var m=this.active;return this.active=!1,g&&this.clearQueue(),l&&this.situation&&(!m&&this.startCurrent(),this.atEnd()),this.stopAnimFrame(),this.clearCurrent()},after:function(l){var g=this.last();return this.target().on("finished.fx",function m(v){v.detail.situation==g&&(l.call(this,g),this.off("finished.fx",m))}),this._callStart()},during:function(l){var g=this.last(),m=function(v){v.detail.situation==g&&l.call(this,v.detail.pos,t.morph(v.detail.pos),v.detail.eased,g)};return this.target().off("during.fx",m).on("during.fx",m),this.after(function(){this.off("during.fx",m)}),this._callStart()},afterAll:function(l){var g=function m(v){l.call(this),this.off("allfinished.fx",m)};return this.target().off("allfinished.fx",g).on("allfinished.fx",g),this._callStart()},last:function(){return this.situations.length?this.situations[this.situations.length-1]:this.situation},add:function(l,g,m){return this.last()[m||"animations"][l]=g,this._callStart()},step:function(l){var g,m,v;l||(this.absPos=this.timeToAbsPos(+new Date)),!1!==this.situation.loops?(g=Math.max(this.absPos,0),m=Math.floor(g),!0===this.situation.loops||m<this.situation.loops?(this.pos=g-m,v=this.situation.loop,this.situation.loop=m):(this.absPos=this.situation.loops,this.pos=1,v=this.situation.loop-1,this.situation.loop=this.situation.loops),this.situation.reversing&&(this.situation.reversed=this.situation.reversed!=Boolean((this.situation.loop-v)%2))):(this.absPos=Math.min(this.absPos,1),this.pos=this.absPos),this.pos<0&&(this.pos=0),this.situation.reversed&&(this.pos=1-this.pos);var S=this.situation.ease(this.pos);for(var T in this.situation.once)T>this.lastPos&&T<=S&&(this.situation.once[T].call(this.target(),this.pos,S),delete this.situation.once[T]);return this.active&&this.target().fire("during",{pos:this.pos,eased:S,fx:this,situation:this.situation}),this.situation?(this.eachAt(),1==this.pos&&!this.situation.reversed||this.situation.reversed&&0==this.pos?(this.stopAnimFrame(),this.target().fire("finished",{fx:this,situation:this.situation}),this.situations.length||(this.target().fire("allfinished"),this.situations.length||(this.target().off(".fx"),this.active=!1)),this.active?this.dequeue():this.clearCurrent()):!this.paused&&this.active&&this.startAnimFrame(),this.lastPos=S,this):this},eachAt:function(){var l,g=this,m=this.target(),v=this.situation;for(var S in v.animations)l=[].concat(v.animations[S]).map(function(z){return"string"!=typeof z&&z.at?z.at(v.ease(g.pos),g.pos):z}),m[S].apply(m,l);for(var S in v.attrs)l=[S].concat(v.attrs[S]).map(function(E){return"string"!=typeof E&&E.at?E.at(v.ease(g.pos),g.pos):E}),m.attr.apply(m,l);for(var S in v.styles)l=[S].concat(v.styles[S]).map(function(E){return"string"!=typeof E&&E.at?E.at(v.ease(g.pos),g.pos):E}),m.style.apply(m,l);if(v.transforms.length){l=v.initialTransformation,S=0;for(var T=v.transforms.length;S<T;S++){var L=v.transforms[S];L instanceof t.Matrix?l=L.relative?l.multiply((new t.Matrix).morph(L).at(v.ease(this.pos))):l.morph(L).at(v.ease(this.pos)):(L.relative||L.undo(l.extract()),l=l.multiply(L.at(v.ease(this.pos))))}m.matrix(l)}return this},once:function(l,g,m){var v=this.last();return m||(l=v.ease(l)),v.once[l]=g,this},_callStart:function(){return setTimeout(function(){this.start()}.bind(this),0),this}},parent:t.Element,construct:{animate:function(l,g,m){return(this.fx||(this.fx=new t.FX(this))).animate(l,g,m)},delay:function(l){return(this.fx||(this.fx=new t.FX(this))).delay(l)},stop:function(l,g){return this.fx&&this.fx.stop(l,g),this},finish:function(){return this.fx&&this.fx.finish(),this}}}),t.MorphObj=t.invent({create:function(l,g){return t.Color.isColor(g)?new t.Color(l).morph(g):t.regex.delimiter.test(l)?t.regex.pathLetters.test(l)?new t.PathArray(l).morph(g):new t.Array(l).morph(g):t.regex.numberAndUnit.test(g)?new t.Number(l).morph(g):(this.value=l,void(this.destination=g))},extend:{at:function(l,g){return g<1?this.value:this.destination},valueOf:function(){return this.value}}}),t.extend(t.FX,{attr:function(l,g,m){if("object"===V(l))for(var v in l)this.attr(v,l[v]);else this.add(l,g,"attrs");return this},plot:function(l,g,m,v){return 4==arguments.length?this.plot([l,g,m,v]):this.add("plot",new(this.target().morphArray)(l))}}),t.Box=t.invent({create:function(l,g,m,v){if(!("object"!==V(l)||l instanceof t.Element))return t.Box.call(this,null!=l.left?l.left:l.x,null!=l.top?l.top:l.y,l.width,l.height);4==arguments.length&&(this.x=l,this.y=g,this.width=m,this.height=v),b(this)}}),t.BBox=t.invent({create:function(l){if(t.Box.apply(this,[].slice.call(arguments)),l instanceof t.Element){var g;try{if(!e.documentElement.contains){for(var m=l.node;m.parentNode;)m=m.parentNode;if(m!=e)throw new Error("Element not in the dom")}g=l.node.getBBox()}catch(S){if(l instanceof t.Shape){t.parser.draw||t.prepare();var v=l.clone(t.parser.draw.instance).show();v&&v.node&&"function"==typeof v.node.getBBox&&(g=v.node.getBBox()),v&&"function"==typeof v.remove&&v.remove()}else g={x:l.node.clientLeft,y:l.node.clientTop,width:l.node.clientWidth,height:l.node.clientHeight}}t.Box.call(this,g)}},inherit:t.Box,parent:t.Element,construct:{bbox:function(){return new t.BBox(this)}}}),t.BBox.prototype.constructor=t.BBox,t.Matrix=t.invent({create:function(l){var g=x([1,0,0,1,0,0]);l=null===l?g:l instanceof t.Element?l.matrixify():"string"==typeof l?x(l.split(t.regex.delimiter).map(parseFloat)):6==arguments.length?x([].slice.call(arguments)):Array.isArray(l)?x(l):l&&"object"===V(l)?l:g;for(var m=k.length-1;m>=0;--m)this[k[m]]=null!=l[k[m]]?l[k[m]]:g[k[m]]},extend:{extract:function(){var l=p(this,0,1);p(this,1,0);var g=180/Math.PI*Math.atan2(l.y,l.x)-90;return{x:this.e,y:this.f,transformedX:(this.e*Math.cos(g*Math.PI/180)+this.f*Math.sin(g*Math.PI/180))/Math.sqrt(this.a*this.a+this.b*this.b),transformedY:(this.f*Math.cos(g*Math.PI/180)+this.e*Math.sin(-g*Math.PI/180))/Math.sqrt(this.c*this.c+this.d*this.d),rotation:g,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f,matrix:new t.Matrix(this)}},clone:function(){return new t.Matrix(this)},morph:function(l){return this.destination=new t.Matrix(l),this},multiply:function(l){return new t.Matrix(this.native().multiply((g=l,g instanceof t.Matrix||(g=new t.Matrix(g)),g).native()));var g},inverse:function(){return new t.Matrix(this.native().inverse())},translate:function(l,g){return new t.Matrix(this.native().translate(l||0,g||0))},native:function(){for(var l=t.parser.native.createSVGMatrix(),g=k.length-1;g>=0;g--)l[k[g]]=this[k[g]];return l},toString:function(){return"matrix("+y(this.a)+","+y(this.b)+","+y(this.c)+","+y(this.d)+","+y(this.e)+","+y(this.f)+")"}},parent:t.Element,construct:{ctm:function(){return new t.Matrix(this.node.getCTM())},screenCTM:function(){if(this instanceof t.Nested){var l=this.rect(1,1),g=l.node.getScreenCTM();return l.remove(),new t.Matrix(g)}return new t.Matrix(this.node.getScreenCTM())}}}),t.Point=t.invent({create:function(l,g){var m;m=Array.isArray(l)?{x:l[0],y:l[1]}:"object"===V(l)?{x:l.x,y:l.y}:null!=l?{x:l,y:null!=g?g:l}:{x:0,y:0},this.x=m.x,this.y=m.y},extend:{clone:function(){return new t.Point(this)},morph:function(l,g){return this.destination=new t.Point(l,g),this}}}),t.extend(t.Element,{point:function(l,g){return new t.Point(l,g).transform(this.screenCTM().inverse())}}),t.extend(t.Element,{attr:function(l,g,m){if(null==l){for(l={},m=(g=this.node.attributes).length-1;m>=0;m--)l[g[m].nodeName]=t.regex.isNumber.test(g[m].nodeValue)?parseFloat(g[m].nodeValue):g[m].nodeValue;return l}if("object"===V(l))for(var v in l)this.attr(v,l[v]);else if(null===g)this.node.removeAttribute(l);else{if(null==g)return null==(g=this.node.getAttribute(l))?t.defaults.attrs[l]:t.regex.isNumber.test(g)?parseFloat(g):g;"stroke-width"==l?this.attr("stroke",parseFloat(g)>0?this._stroke:null):"stroke"==l&&(this._stroke=g),"fill"!=l&&"stroke"!=l||(t.regex.isImage.test(g)&&(g=this.doc().defs().image(g,0,0)),g instanceof t.Image&&(g=this.doc().defs().pattern(0,0,function(){this.add(g)}))),"number"==typeof g?g=new t.Number(g):t.Color.isColor(g)?g=new t.Color(g):Array.isArray(g)&&(g=new t.Array(g)),"leading"==l?this.leading&&this.leading(g):"string"==typeof m?this.node.setAttributeNS(m,l,g.toString()):this.node.setAttribute(l,g.toString()),!this.rebuild||"font-size"!=l&&"x"!=l||this.rebuild(l,g)}return this}}),t.extend(t.Element,{transform:function(l,g){var m;return"object"!==V(l)?(m=new t.Matrix(this).extract(),"string"==typeof l?m[l]:m):(m=new t.Matrix(this),g=!!g||!!l.relative,null!=l.a&&(m=g?m.multiply(new t.Matrix(l)):new t.Matrix(l)),this.attr("transform",m))}}),t.extend(t.Element,{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(t.regex.transforms).slice(0,-1).map(function(l){var g=l.trim().split("(");return[g[0],g[1].split(t.regex.delimiter).map(function(m){return parseFloat(m)})]}).reduce(function(l,g){return"matrix"==g[0]?l.multiply(x(g[1])):l[g[0]].apply(l,g[1])},new t.Matrix)},toParent:function(l){if(this==l)return this;var g=this.screenCTM(),m=l.screenCTM().inverse();return this.addTo(l).untransform().transform(m.multiply(g)),this},toDoc:function(){return this.toParent(this.doc())}}),t.Transformation=t.invent({create:function(l,g){if(arguments.length>1&&"boolean"!=typeof g)return this.constructor.call(this,[].slice.call(arguments));if(Array.isArray(l))for(var m=0,v=this.arguments.length;m<v;++m)this[this.arguments[m]]=l[m];else if(l&&"object"===V(l))for(m=0,v=this.arguments.length;m<v;++m)this[this.arguments[m]]=l[this.arguments[m]];this.inversed=!1,!0===g&&(this.inversed=!0)}}),t.Translate=t.invent({parent:t.Matrix,inherit:t.Transformation,create:function(l,g){this.constructor.apply(this,[].slice.call(arguments))},extend:{arguments:["transformedX","transformedY"],method:"translate"}}),t.extend(t.Element,{style:function(l,g){if(0==arguments.length)return this.node.style.cssText||"";if(arguments.length<2)if("object"===V(l))for(var m in l)this.style(m,l[m]);else{if(!t.regex.isCss.test(l))return this.node.style[h(l)];for(l=l.split(/\s*;\s*/).filter(function(v){return!!v}).map(function(v){return v.split(/\s*:\s*/)});g=l.pop();)this.style(g[0],g[1])}else this.node.style[h(l)]=null===g||t.regex.isBlank.test(g)?"":g;return this}}),t.Parent=t.invent({create:function(l){this.constructor.call(this,l)},inherit:t.Element,extend:{children:function(){return t.utils.map(t.utils.filterSVGElements(this.node.childNodes),function(l){return t.adopt(l)})},add:function(l,g){return null==g?this.node.appendChild(l.node):l.node!=this.node.childNodes[g]&&this.node.insertBefore(l.node,this.node.childNodes[g]),this},put:function(l,g){return this.add(l,g),l},has:function(l){return this.index(l)>=0},index:function(l){return[].slice.call(this.node.childNodes).indexOf(l.node)},get:function(l){return t.adopt(this.node.childNodes[l])},first:function(){return this.get(0)},last:function(){return this.get(this.node.childNodes.length-1)},each:function(l,g){for(var m=this.children(),v=0,S=m.length;v<S;v++)m[v]instanceof t.Element&&l.apply(m[v],[v,m]),g&&m[v]instanceof t.Container&&m[v].each(l,g);return this},removeElement:function(l){return this.node.removeChild(l.node),this},clear:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return delete this._defs,this},defs:function(){return this.doc().defs()}}}),t.extend(t.Parent,{ungroup:function(l,g){return 0===g||this instanceof t.Defs||this.node==t.parser.draw||(l=l||(this instanceof t.Doc?this:this.parent(t.Parent)),g=g||1/0,this.each(function(){return this instanceof t.Defs?this:this instanceof t.Parent?this.ungroup(l,g-1):this.toParent(l)}),this.node.firstChild||this.remove()),this},flatten:function(l,g){return this.ungroup(l,g)}}),t.Container=t.invent({create:function(l){this.constructor.call(this,l)},inherit:t.Parent}),t.ViewBox=t.invent({parent:t.Container,construct:{}}),["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","touchstart","touchmove","touchleave","touchend","touchcancel"].forEach(function(l){t.Element.prototype[l]=function(g){return t.on(this.node,l,g),this}}),t.listeners=[],t.handlerMap=[],t.listenerId=0,t.on=function(l,g,m,v,S){var T=m.bind(v||l.instance||l),L=(t.handlerMap.indexOf(l)+1||t.handlerMap.push(l))-1,z=g.split(".")[0],E=g.split(".")[1]||"*";t.listeners[L]=t.listeners[L]||{},t.listeners[L][z]=t.listeners[L][z]||{},t.listeners[L][z][E]=t.listeners[L][z][E]||{},m._svgjsListenerId||(m._svgjsListenerId=++t.listenerId),t.listeners[L][z][E][m._svgjsListenerId]=T,l.addEventListener(z,T,S||{passive:!0})},t.off=function(l,g,m){var v=t.handlerMap.indexOf(l),S=g&&g.split(".")[0],T=g&&g.split(".")[1],L="";if(-1!=v)if(m){if("function"==typeof m&&(m=m._svgjsListenerId),!m)return;t.listeners[v][S]&&t.listeners[v][S][T||"*"]&&(l.removeEventListener(S,t.listeners[v][S][T||"*"][m],!1),delete t.listeners[v][S][T||"*"][m])}else if(T&&S){if(t.listeners[v][S]&&t.listeners[v][S][T]){for(var z in t.listeners[v][S][T])t.off(l,[S,T].join("."),z);delete t.listeners[v][S][T]}}else if(T)for(var E in t.listeners[v])for(var L in t.listeners[v][E])T===L&&t.off(l,[E,T].join("."));else if(S){if(t.listeners[v][S]){for(var L in t.listeners[v][S])t.off(l,[S,L].join("."));delete t.listeners[v][S]}}else{for(var E in t.listeners[v])t.off(l,E);delete t.listeners[v],delete t.handlerMap[v]}},t.extend(t.Element,{on:function(l,g,m,v){return t.on(this.node,l,g,m,v),this},off:function(l,g){return t.off(this.node,l,g),this},fire:function(l,g){return this.node.dispatchEvent(l instanceof w.Event?l:l=new t.CustomEvent(l,{detail:g,cancelable:!0})),this._event=l,this},event:function(){return this._event}}),t.Defs=t.invent({create:"defs",inherit:t.Container}),t.G=t.invent({create:"g",inherit:t.Container,extend:{x:function(l){return null==l?this.transform("x"):this.transform({x:l-this.x()},!0)}},construct:{group:function(){return this.put(new t.G)}}}),t.Doc=t.invent({create:function(l){l&&("svg"==(l="string"==typeof l?e.getElementById(l):l).nodeName?this.constructor.call(this,l):(this.constructor.call(this,t.create("svg")),l.appendChild(this.node),this.size("100%","100%")),this.namespace().defs())},inherit:t.Container,extend:{namespace:function(){return this.attr({xmlns:t.ns,version:"1.1"}).attr("xmlns:xlink",t.xlink,t.xmlns).attr("xmlns:svgjs",t.svgjs,t.xmlns)},defs:function(){var l;return this._defs||(this._defs=(l=this.node.getElementsByTagName("defs")[0])?t.adopt(l):new t.Defs,this.node.appendChild(this._defs.node)),this._defs},parent:function(){return this.node.parentNode&&"#document"!=this.node.parentNode.nodeName?this.node.parentNode:null},remove:function(){return this.parent()&&this.parent().removeChild(this.node),this},clear:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return delete this._defs,t.parser.draw&&!t.parser.draw.parentNode&&this.node.appendChild(t.parser.draw),this},clone:function(l){this.writeDataToDom();var g=this.node,m=f(g.cloneNode(!0));return l?(l.node||l).appendChild(m.node):g.parentNode.insertBefore(m.node,g.nextSibling),m}}}),t.extend(t.Element,{}),t.Gradient=t.invent({create:function(l){this.constructor.call(this,t.create(l+"Gradient")),this.type=l},inherit:t.Container,extend:{at:function(l,g,m){return this.put(new t.Stop).update(l,g,m)},update:function(l){return this.clear(),"function"==typeof l&&l.call(this,this),this},fill:function(){return"url(#"+this.id()+")"},toString:function(){return this.fill()},attr:function(l,g,m){return"transform"==l&&(l="gradientTransform"),t.Container.prototype.attr.call(this,l,g,m)}},construct:{gradient:function(l,g){return this.defs().gradient(l,g)}}}),t.extend(t.Gradient,t.FX,{from:function(l,g){return this.attr("radial"==(this._target||this).type?{fx:new t.Number(l),fy:new t.Number(g)}:{x1:new t.Number(l),y1:new t.Number(g)})},to:function(l,g){return this.attr("radial"==(this._target||this).type?{cx:new t.Number(l),cy:new t.Number(g)}:{x2:new t.Number(l),y2:new t.Number(g)})}}),t.extend(t.Defs,{gradient:function(l,g){return this.put(new t.Gradient(l)).update(g)}}),t.Stop=t.invent({create:"stop",inherit:t.Element,extend:{update:function(l){return("number"==typeof l||l instanceof t.Number)&&(l={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=l.opacity&&this.attr("stop-opacity",l.opacity),null!=l.color&&this.attr("stop-color",l.color),null!=l.offset&&this.attr("offset",new t.Number(l.offset)),this}}}),t.Pattern=t.invent({create:"pattern",inherit:t.Container,extend:{fill:function(){return"url(#"+this.id()+")"},update:function(l){return this.clear(),"function"==typeof l&&l.call(this,this),this},toString:function(){return this.fill()},attr:function(l,g,m){return"transform"==l&&(l="patternTransform"),t.Container.prototype.attr.call(this,l,g,m)}},construct:{pattern:function(l,g,m){return this.defs().pattern(l,g,m)}}}),t.extend(t.Defs,{pattern:function(l,g,m){return this.put(new t.Pattern).update(m).attr({x:0,y:0,width:l,height:g,patternUnits:"userSpaceOnUse"})}}),t.Shape=t.invent({create:function(l){this.constructor.call(this,l)},inherit:t.Element}),t.Symbol=t.invent({create:"symbol",inherit:t.Container,construct:{symbol:function(){return this.put(new t.Symbol)}}}),t.Use=t.invent({create:"use",inherit:t.Shape,extend:{element:function(l,g){return this.attr("href",(g||"")+"#"+l,t.xlink)}},construct:{use:function(l,g){return this.put(new t.Use).element(l,g)}}}),t.Rect=t.invent({create:"rect",inherit:t.Shape,construct:{rect:function(l,g){return this.put(new t.Rect).size(l,g)}}}),t.Circle=t.invent({create:"circle",inherit:t.Shape,construct:{circle:function(l){return this.put(new t.Circle).rx(new t.Number(l).divide(2)).move(0,0)}}}),t.extend(t.Circle,t.FX,{rx:function(l){return this.attr("r",l)},ry:function(l){return this.rx(l)}}),t.Ellipse=t.invent({create:"ellipse",inherit:t.Shape,construct:{ellipse:function(l,g){return this.put(new t.Ellipse).size(l,g).move(0,0)}}}),t.extend(t.Ellipse,t.Rect,t.FX,{rx:function(l){return this.attr("rx",l)},ry:function(l){return this.attr("ry",l)}}),t.extend(t.Circle,t.Ellipse,{x:function(l){return null==l?this.cx()-this.rx():this.cx(l+this.rx())},y:function(l){return null==l?this.cy()-this.ry():this.cy(l+this.ry())},cx:function(l){return null==l?this.attr("cx"):this.attr("cx",l)},cy:function(l){return null==l?this.attr("cy"):this.attr("cy",l)},width:function(l){return null==l?2*this.rx():this.rx(new t.Number(l).divide(2))},height:function(l){return null==l?2*this.ry():this.ry(new t.Number(l).divide(2))},size:function(l,g){var m=u(this,l,g);return this.rx(new t.Number(m.width).divide(2)).ry(new t.Number(m.height).divide(2))}}),t.Line=t.invent({create:"line",inherit:t.Shape,extend:{array:function(){return new t.PointArray([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])},plot:function(l,g,m,v){return null==l?this.array():(l=void 0!==g?{x1:l,y1:g,x2:m,y2:v}:new t.PointArray(l).toLine(),this.attr(l))},move:function(l,g){return this.attr(this.array().move(l,g).toLine())},size:function(l,g){var m=u(this,l,g);return this.attr(this.array().size(m.width,m.height).toLine())}},construct:{line:function(l,g,m,v){return t.Line.prototype.plot.apply(this.put(new t.Line),null!=l?[l,g,m,v]:[0,0,0,0])}}}),t.Polyline=t.invent({create:"polyline",inherit:t.Shape,construct:{polyline:function(l){return this.put(new t.Polyline).plot(l||new t.PointArray)}}}),t.Polygon=t.invent({create:"polygon",inherit:t.Shape,construct:{polygon:function(l){return this.put(new t.Polygon).plot(l||new t.PointArray)}}}),t.extend(t.Polyline,t.Polygon,{array:function(){return this._array||(this._array=new t.PointArray(this.attr("points")))},plot:function(l){return null==l?this.array():this.clear().attr("points","string"==typeof l?l:this._array=new t.PointArray(l))},clear:function(){return delete this._array,this},move:function(l,g){return this.attr("points",this.array().move(l,g))},size:function(l,g){var m=u(this,l,g);return this.attr("points",this.array().size(m.width,m.height))}}),t.extend(t.Line,t.Polyline,t.Polygon,{morphArray:t.PointArray,x:function(l){return null==l?this.bbox().x:this.move(l,this.bbox().y)},y:function(l){return null==l?this.bbox().y:this.move(this.bbox().x,l)},width:function(l){var g=this.bbox();return null==l?g.width:this.size(l,g.height)},height:function(l){var g=this.bbox();return null==l?g.height:this.size(g.width,l)}}),t.Path=t.invent({create:"path",inherit:t.Shape,extend:{morphArray:t.PathArray,array:function(){return this._array||(this._array=new t.PathArray(this.attr("d")))},plot:function(l){return null==l?this.array():this.clear().attr("d","string"==typeof l?l:this._array=new t.PathArray(l))},clear:function(){return delete this._array,this}},construct:{path:function(l){return this.put(new t.Path).plot(l||new t.PathArray)}}}),t.Image=t.invent({create:"image",inherit:t.Shape,extend:{load:function(l){if(!l)return this;var g=this,m=new w.Image;return t.on(m,"load",function(){t.off(m);var v=g.parent(t.Pattern);null!==v&&(0==g.width()&&0==g.height()&&g.size(m.width,m.height),v&&0==v.width()&&0==v.height()&&v.size(g.width(),g.height()),"function"==typeof g._loaded&&g._loaded.call(g,{width:m.width,height:m.height,ratio:m.width/m.height,url:l}))}),t.on(m,"error",function(v){t.off(m),"function"==typeof g._error&&g._error.call(g,v)}),this.attr("href",m.src=this.src=l,t.xlink)},loaded:function(l){return this._loaded=l,this},error:function(l){return this._error=l,this}},construct:{image:function(l,g,m){return this.put(new t.Image).load(l).size(g||0,m||g||0)}}}),t.Text=t.invent({create:function(){this.constructor.call(this,t.create("text")),this.dom.leading=new t.Number(1.3),this._rebuild=!0,this._build=!1,this.attr("font-family",t.defaults.attrs["font-family"])},inherit:t.Shape,extend:{x:function(l){return null==l?this.attr("x"):this.attr("x",l)},text:function(l){if(void 0===l){l="";for(var g=this.node.childNodes,m=0,v=g.length;m<v;++m)0!=m&&3!=g[m].nodeType&&1==t.adopt(g[m]).dom.newLined&&(l+="\n"),l+=g[m].textContent;return l}if(this.clear().build(!0),"function"==typeof l)l.call(this,this);else{m=0;for(var S=(l=l.split("\n")).length;m<S;m++)this.tspan(l[m]).newLine()}return this.build(!1).rebuild()},size:function(l){return this.attr("font-size",l).rebuild()},leading:function(l){return null==l?this.dom.leading:(this.dom.leading=new t.Number(l),this.rebuild())},lines:function(){var l=(this.textPath&&this.textPath()||this).node,g=t.utils.map(t.utils.filterSVGElements(l.childNodes),function(m){return t.adopt(m)});return new t.Set(g)},rebuild:function(l){if("boolean"==typeof l&&(this._rebuild=l),this._rebuild){var g=this,m=0,v=this.dom.leading*new t.Number(this.attr("font-size"));this.lines().each(function(){this.dom.newLined&&(g.textPath()||this.attr("x",g.attr("x")),"\n"==this.text()?m+=v:(this.attr("dy",v+m),m=0))}),this.fire("rebuild")}return this},build:function(l){return this._build=!!l,this},setData:function(l){return this.dom=l,this.dom.leading=new t.Number(l.leading||1.3),this}},construct:{text:function(l){return this.put(new t.Text).text(l)},plain:function(l){return this.put(new t.Text).plain(l)}}}),t.Tspan=t.invent({create:"tspan",inherit:t.Shape,extend:{text:function(l){return null==l?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof l?l.call(this,this):this.plain(l),this)},dx:function(l){return this.attr("dx",l)},dy:function(l){return this.attr("dy",l)},newLine:function(){var l=this.parent(t.Text);return this.dom.newLined=!0,this.dy(l.dom.leading*l.attr("font-size")).attr("x",l.x())}}}),t.extend(t.Text,t.Tspan,{plain:function(l){return!1===this._build&&this.clear(),this.node.appendChild(e.createTextNode(l)),this},tspan:function(l){var g=(this.textPath&&this.textPath()||this).node,m=new t.Tspan;return!1===this._build&&this.clear(),g.appendChild(m.node),m.text(l)},clear:function(){for(var l=(this.textPath&&this.textPath()||this).node;l.hasChildNodes();)l.removeChild(l.lastChild);return this},length:function(){return this.node.getComputedTextLength()}}),t.TextPath=t.invent({create:"textPath",inherit:t.Parent,parent:t.Text,construct:{morphArray:t.PathArray,array:function(){var l=this.track();return l?l.array():null},plot:function(l){var g=this.track(),m=null;return g&&(m=g.plot(l)),null==l?m:this},track:function(){var l=this.textPath();if(l)return l.reference("href")},textPath:function(){if(this.node.firstChild&&"textPath"==this.node.firstChild.nodeName)return t.adopt(this.node.firstChild)}}}),t.Nested=t.invent({create:function(){this.constructor.call(this,t.create("svg")),this.style("overflow","visible")},inherit:t.Container,construct:{nested:function(){return this.put(new t.Nested)}}});var r={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(l,g){return"color"==g?l:l+"-"+g}};function o(l,g,m,v){return m+v.replace(t.regex.dots," .")}function h(l){return l.toLowerCase().replace(/-(.)/g,function(g,m){return m.toUpperCase()})}function c(l){return l.charAt(0).toUpperCase()+l.slice(1)}function d(l){var g=l.toString(16);return 1==g.length?"0"+g:g}function u(l,g,m){if(null==g||null==m){var v=l.bbox();null==g?g=v.width/v.height*m:null==m&&(m=v.height/v.width*g)}return{width:g,height:m}}function p(l,g,m){return{x:g*l.a+m*l.c+0,y:g*l.b+m*l.d+0}}function x(l){return{a:l[0],b:l[1],c:l[2],d:l[3],e:l[4],f:l[5]}}function f(l){for(var g=l.childNodes.length-1;g>=0;g--)l.childNodes[g]instanceof w.SVGElement&&f(l.childNodes[g]);return t.adopt(l).id(t.eid(l.nodeName))}function b(l){return null==l.x&&(l.x=0,l.y=0,l.width=0,l.height=0),l.w=l.width,l.h=l.height,l.x2=l.x+l.width,l.y2=l.y+l.height,l.cx=l.x+l.width/2,l.cy=l.y+l.height/2,l}function y(l){return Math.abs(l)>1e-37?l:0}["fill","stroke"].forEach(function(l){var g={};g[l]=function(m){if(void 0===m)return this;if("string"==typeof m||t.Color.isRgb(m)||m&&"function"==typeof m.fill)this.attr(l,m);else for(var v=r[l].length-1;v>=0;v--)null!=m[r[l][v]]&&this.attr(r.prefix(l,r[l][v]),m[r[l][v]]);return this},t.extend(t.Element,t.FX,g)}),t.extend(t.Element,t.FX,{translate:function(l,g){return this.transform({x:l,y:g})},matrix:function(l){return this.attr("transform",new t.Matrix(6==arguments.length?[].slice.call(arguments):l))},opacity:function(l){return this.attr("opacity",l)},dx:function(l){return this.x(new t.Number(l).plus(this instanceof t.FX?0:this.x()),!0)},dy:function(l){return this.y(new t.Number(l).plus(this instanceof t.FX?0:this.y()),!0)}}),t.extend(t.Path,{length:function(){return this.node.getTotalLength()},pointAt:function(l){return this.node.getPointAtLength(l)}}),t.Set=t.invent({create:function(l){Array.isArray(l)?this.members=l:this.clear()},extend:{add:function(){for(var l=[].slice.call(arguments),g=0,m=l.length;g<m;g++)this.members.push(l[g]);return this},remove:function(l){var g=this.index(l);return g>-1&&this.members.splice(g,1),this},each:function(l){for(var g=0,m=this.members.length;g<m;g++)l.apply(this.members[g],[g,this.members]);return this},clear:function(){return this.members=[],this},length:function(){return this.members.length},has:function(l){return this.index(l)>=0},index:function(l){return this.members.indexOf(l)},get:function(l){return this.members[l]},first:function(){return this.get(0)},last:function(){return this.get(this.members.length-1)},valueOf:function(){return this.members}},construct:{set:function(l){return new t.Set(l)}}}),t.FX.Set=t.invent({create:function(l){this.set=l}}),t.Set.inherit=function(){var l=[];for(var g in t.Shape.prototype)"function"==typeof t.Shape.prototype[g]&&"function"!=typeof t.Set.prototype[g]&&l.push(g);for(var g in l.forEach(function(v){t.Set.prototype[v]=function(){for(var S=0,T=this.members.length;S<T;S++)this.members[S]&&"function"==typeof this.members[S][v]&&this.members[S][v].apply(this.members[S],arguments);return"animate"==v?this.fx||(this.fx=new t.FX.Set(this)):this}}),l=[],t.FX.prototype)"function"==typeof t.FX.prototype[g]&&"function"!=typeof t.FX.Set.prototype[g]&&l.push(g);l.forEach(function(m){t.FX.Set.prototype[m]=function(){for(var v=0,S=this.set.members.length;v<S;v++)this.set.members[v].fx[m].apply(this.set.members[v].fx,arguments);return this}})},t.extend(t.Element,{}),t.extend(t.Element,{remember:function(l,g){if("object"===V(arguments[0]))for(var m in l)this.remember(m,l[m]);else{if(1==arguments.length)return this.memory()[l];this.memory()[l]=g}return this},forget:function(){if(0==arguments.length)this._memory={};else for(var l=arguments.length-1;l>=0;l--)delete this.memory()[arguments[l]];return this},memory:function(){return this._memory||(this._memory={})}}),t.get=function(l){var g=e.getElementById(function(m){var v=(m||"").toString().match(t.regex.reference);if(v)return v[1]}(l)||l);return t.adopt(g)},t.select=function(l,g){return new t.Set(t.utils.map((g||e).querySelectorAll(l),function(m){return t.adopt(m)}))},t.extend(t.Parent,{select:function(l){return t.select(l,this.node)}});var k="abcdef".split("");if("function"!=typeof w.CustomEvent){var A=function(l,g){g=g||{bubbles:!1,cancelable:!1,detail:void 0};var m=e.createEvent("CustomEvent");return m.initCustomEvent(l,g.bubbles,g.cancelable,g.detail),m};A.prototype=w.Event.prototype,t.CustomEvent=A}else t.CustomEvent=w.CustomEvent;return t},void 0!==(se=function(){return ft(Je,Je.document)}.call(de,N,de,Ce))&&(Ce.exports=se),function(){SVG.Filter=SVG.invent({create:"filter",inherit:SVG.Parent,extend:{source:"SourceGraphic",sourceAlpha:"SourceAlpha",background:"BackgroundImage",backgroundAlpha:"BackgroundAlpha",fill:"FillPaint",stroke:"StrokePaint",autoSetIn:!0,put:function(r,o){return this.add(r,o),!r.attr("in")&&this.autoSetIn&&r.attr("in",this.source),r.attr("result")||r.attr("result",r),r},blend:function(r,o,h){return this.put(new SVG.BlendEffect(r,o,h))},colorMatrix:function(r,o){return this.put(new SVG.ColorMatrixEffect(r,o))},convolveMatrix:function(r){return this.put(new SVG.ConvolveMatrixEffect(r))},componentTransfer:function(r){return this.put(new SVG.ComponentTransferEffect(r))},composite:function(r,o,h){return this.put(new SVG.CompositeEffect(r,o,h))},flood:function(r,o){return this.put(new SVG.FloodEffect(r,o))},offset:function(r,o){return this.put(new SVG.OffsetEffect(r,o))},image:function(r){return this.put(new SVG.ImageEffect(r))},merge:function(){var r=[void 0];for(var o in arguments)r.push(arguments[o]);return this.put(new(SVG.MergeEffect.bind.apply(SVG.MergeEffect,r)))},gaussianBlur:function(r,o){return this.put(new SVG.GaussianBlurEffect(r,o))},morphology:function(r,o){return this.put(new SVG.MorphologyEffect(r,o))},diffuseLighting:function(r,o,h){return this.put(new SVG.DiffuseLightingEffect(r,o,h))},displacementMap:function(r,o,h,c,d){return this.put(new SVG.DisplacementMapEffect(r,o,h,c,d))},specularLighting:function(r,o,h,c){return this.put(new SVG.SpecularLightingEffect(r,o,h,c))},tile:function(){return this.put(new SVG.TileEffect)},turbulence:function(r,o,h,c,d){return this.put(new SVG.TurbulenceEffect(r,o,h,c,d))},toString:function(){return"url(#"+this.attr("id")+")"}}}),SVG.extend(SVG.Defs,{filter:function(r){var o=this.put(new SVG.Filter);return"function"==typeof r&&r.call(o,o),o}}),SVG.extend(SVG.Container,{filter:function(r){return this.defs().filter(r)}}),SVG.extend(SVG.Element,SVG.G,SVG.Nested,{filter:function(r){return this.filterer=r instanceof SVG.Element?r:this.doc().filter(r),this.doc()&&this.filterer.doc()!==this.doc()&&this.doc().defs().add(this.filterer),this.attr("filter",this.filterer),this.filterer},unfilter:function(r){return this.filterer&&!0===r&&this.filterer.remove(),delete this.filterer,this.attr("filter",null)}}),SVG.Effect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(r){return null==r?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",r)},result:function(r){return null==r?this.attr("result"):this.attr("result",r)},toString:function(){return this.result()}}}),SVG.ParentEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Parent,extend:{in:function(r){return null==r?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",r)},result:function(r){return null==r?this.attr("result"):this.attr("result",r)},toString:function(){return this.result()}}});var w={blend:function(r,o){return this.parent()&&this.parent().blend(this,r,o)},colorMatrix:function(r,o){return this.parent()&&this.parent().colorMatrix(r,o).in(this)},convolveMatrix:function(r){return this.parent()&&this.parent().convolveMatrix(r).in(this)},componentTransfer:function(r){return this.parent()&&this.parent().componentTransfer(r).in(this)},composite:function(r,o){return this.parent()&&this.parent().composite(this,r,o)},flood:function(r,o){return this.parent()&&this.parent().flood(r,o)},offset:function(r,o){return this.parent()&&this.parent().offset(r,o).in(this)},image:function(r){return this.parent()&&this.parent().image(r)},merge:function(){return this.parent()&&this.parent().merge.apply(this.parent(),[this].concat(arguments))},gaussianBlur:function(r,o){return this.parent()&&this.parent().gaussianBlur(r,o).in(this)},morphology:function(r,o){return this.parent()&&this.parent().morphology(r,o).in(this)},diffuseLighting:function(r,o,h){return this.parent()&&this.parent().diffuseLighting(r,o,h).in(this)},displacementMap:function(r,o,h,c){return this.parent()&&this.parent().displacementMap(this,r,o,h,c)},specularLighting:function(r,o,h,c){return this.parent()&&this.parent().specularLighting(r,o,h,c).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(r,o,h,c,d){return this.parent()&&this.parent().turbulence(r,o,h,c,d).in(this)}};SVG.extend(SVG.Effect,w),SVG.extend(SVG.ParentEffect,w),SVG.ChildEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(r){this.attr("in",r)}}});var e={blend:function(r,o,h){this.attr({in:r,in2:o,mode:h||"normal"})},colorMatrix:function(r,o){"matrix"==r&&(o=a(o)),this.attr({type:r,values:void 0===o?null:o})},convolveMatrix:function(r){r=a(r),this.attr({order:Math.sqrt(r.split(" ").length),kernelMatrix:r})},composite:function(r,o,h){this.attr({in:r,in2:o,operator:h})},flood:function(r,o){this.attr("flood-color",r),null!=o&&this.attr("flood-opacity",o)},offset:function(r,o){this.attr({dx:r,dy:o})},image:function(r){this.attr("href",r,SVG.xlink)},displacementMap:function(r,o,h,c,d){this.attr({in:r,in2:o,scale:h,xChannelSelector:c,yChannelSelector:d})},gaussianBlur:function(r,o){this.attr("stdDeviation",null!=r||null!=o?s(Array.prototype.slice.call(arguments)):"0 0")},morphology:function(r,o){this.attr({operator:r,radius:o})},tile:function(){},turbulence:function(r,o,h,c,d){this.attr({numOctaves:o,seed:h,stitchTiles:c,baseFrequency:r,type:d})}},t={merge:function(){var r;if(arguments[0]instanceof SVG.Set){var o=this;arguments[0].each(function(c){this instanceof SVG.MergeNode?o.put(this):(this instanceof SVG.Effect||this instanceof SVG.ParentEffect)&&o.put(new SVG.MergeNode(this))})}else{r=Array.isArray(arguments[0])?arguments[0]:arguments;for(var h=0;h<r.length;h++)r[h]instanceof SVG.MergeNode?this.put(r[h]):this.put(new SVG.MergeNode(r[h]))}},componentTransfer:function(r){if(this.rgb=new SVG.Set,["r","g","b","a"].forEach(function(h){this[h]=new(SVG["Func"+h.toUpperCase()])("identity"),this.rgb.add(this[h]),this.node.appendChild(this[h].node)}.bind(this)),r)for(var o in r.rgb&&(["r","g","b"].forEach(function(h){this[h].attr(r.rgb)}.bind(this)),delete r.rgb),r)this[o].attr(r[o])},diffuseLighting:function(r,o,h){this.attr({surfaceScale:r,diffuseConstant:o,kernelUnitLength:h})},specularLighting:function(r,o,h,c){this.attr({surfaceScale:r,diffuseConstant:o,specularExponent:h,kernelUnitLength:c})}},i={distantLight:function(r,o){this.attr({azimuth:r,elevation:o})},pointLight:function(r,o,h){this.attr({x:r,y:o,z:h})},spotLight:function(r,o,h,c,d,u){this.attr({x:r,y:o,z:h,pointsAtX:c,pointsAtY:d,pointsAtZ:u})},mergeNode:function(r){this.attr("in",r)}};function a(r){return Array.isArray(r)&&(r=new SVG.Array(r)),r.toString().replace(/^\s+/,"").replace(/\s+$/,"").replace(/\s+/g," ")}function s(r){if(!Array.isArray(r))return r;for(var o=0,h=r.length,c=[];o<h;o++)c.push(r[o]);return c.join(" ")}function n(){var r=function(){};for(var o in"function"==typeof arguments[arguments.length-1]&&(r=arguments[arguments.length-1],Array.prototype.splice.call(arguments,arguments.length-1,1)),arguments)for(var h in arguments[o])r(arguments[o][h],h,arguments[o])}["r","g","b","a"].forEach(function(r){i["Func"+r.toUpperCase()]=function(o){switch(this.attr("type",o),o){case"table":this.attr("tableValues",arguments[1]);break;case"linear":this.attr("slope",arguments[1]),this.attr("intercept",arguments[2]);break;case"gamma":this.attr("amplitude",arguments[1]),this.attr("exponent",arguments[2]),this.attr("offset",arguments[2])}}}),n(e,function(r,o){var h=o.charAt(0).toUpperCase()+o.slice(1);SVG[h+"Effect"]=SVG.invent({create:function(){this.constructor.call(this,SVG.create("fe"+h)),r.apply(this,arguments),this.result(this.attr("id")+"Out")},inherit:SVG.Effect,extend:{}})}),n(t,function(r,o){var h=o.charAt(0).toUpperCase()+o.slice(1);SVG[h+"Effect"]=SVG.invent({create:function(){this.constructor.call(this,SVG.create("fe"+h)),r.apply(this,arguments),this.result(this.attr("id")+"Out")},inherit:SVG.ParentEffect,extend:{}})}),n(i,function(r,o){var h=o.charAt(0).toUpperCase()+o.slice(1);SVG[h]=SVG.invent({create:function(){this.constructor.call(this,SVG.create("fe"+h)),r.apply(this,arguments)},inherit:SVG.ChildEffect,extend:{}})}),SVG.extend(SVG.MergeEffect,{in:function(r){return r instanceof SVG.MergeNode?this.add(r,0):this.add(new SVG.MergeNode(r),0),this}}),SVG.extend(SVG.CompositeEffect,SVG.BlendEffect,SVG.DisplacementMapEffect,{in2:function(r){return null==r?this.parent()&&this.parent().select('[result="'+this.attr("in2")+'"]').get(0)||this.attr("in2"):this.attr("in2",r)}}),SVG.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]}}.call(void 0),function(){function w(s,n,r,o,h,c,d){for(var u=s.slice(n,r||d),p=o.slice(h,c||d),x=0,f={pos:[0,0],start:[0,0]},b={pos:[0,0],start:[0,0]};u[x]=e.call(f,u[x]),p[x]=e.call(b,p[x]),u[x][0]!=p[x][0]||"M"==u[x][0]||"A"==u[x][0]&&(u[x][4]!=p[x][4]||u[x][5]!=p[x][5])?(Array.prototype.splice.apply(u,[x,1].concat(i.call(f,u[x]))),Array.prototype.splice.apply(p,[x,1].concat(i.call(b,p[x])))):(u[x]=t.call(f,u[x]),p[x]=t.call(b,p[x])),++x!=u.length||x!=p.length;)x==u.length&&u.push(["C",f.pos[0],f.pos[1],f.pos[0],f.pos[1],f.pos[0],f.pos[1]]),x==p.length&&p.push(["C",b.pos[0],b.pos[1],b.pos[0],b.pos[1],b.pos[0],b.pos[1]]);return{start:u,dest:p}}function e(s){switch(s[0]){case"z":case"Z":s[0]="L",s[1]=this.start[0],s[2]=this.start[1];break;case"H":s[0]="L",s[2]=this.pos[1];break;case"V":s[0]="L",s[2]=s[1],s[1]=this.pos[0];break;case"T":s[0]="Q",s[3]=s[1],s[4]=s[2],s[1]=this.reflection[1],s[2]=this.reflection[0];break;case"S":s[0]="C",s[6]=s[4],s[5]=s[3],s[4]=s[2],s[3]=s[1],s[2]=this.reflection[1],s[1]=this.reflection[0]}return s}function t(s){var n=s.length;return this.pos=[s[n-2],s[n-1]],-1!="SCQT".indexOf(s[0])&&(this.reflection=[2*this.pos[0]-s[n-4],2*this.pos[1]-s[n-3]]),s}function i(s){var n=[s];switch(s[0]){case"M":return this.pos=this.start=[s[1],s[2]],n;case"L":s[5]=s[3]=s[1],s[6]=s[4]=s[2],s[1]=this.pos[0],s[2]=this.pos[1];break;case"Q":s[6]=s[4],s[5]=s[3],s[4]=1*s[4]/3+2*s[2]/3,s[3]=1*s[3]/3+2*s[1]/3,s[2]=1*this.pos[1]/3+2*s[2]/3,s[1]=1*this.pos[0]/3+2*s[1]/3;break;case"A":s=(n=function(r,o){var h,c,d,u,p,x,f,b,y,k,A,l,g,m,v,S,T,L,z,E,X,D,W,O,Z,J,ae=Math.abs(o[1]),ce=Math.abs(o[2]),ve=o[3]%360,zt=o[4],Ke=o[5],et=o[6],tt=o[7],Q=new SVG.Point(r),$=new SVG.Point(et,tt),bt=[];if(0===ae||0===ce||Q.x===$.x&&Q.y===$.y)return[["C",Q.x,Q.y,$.x,$.y,$.x,$.y]];for((c=(h=new SVG.Point((Q.x-$.x)/2,(Q.y-$.y)/2).transform((new SVG.Matrix).rotate(ve))).x*h.x/(ae*ae)+h.y*h.y/(ce*ce))>1&&(ae*=c=Math.sqrt(c),ce*=c),d=(new SVG.Matrix).rotate(ve).scale(1/ae,1/ce).rotate(-ve),Q=Q.transform(d),x=(u=[($=$.transform(d)).x-Q.x,$.y-Q.y])[0]*u[0]+u[1]*u[1],p=Math.sqrt(x),u[0]/=p,u[1]/=p,f=x<4?Math.sqrt(1-x/4):0,zt===Ke&&(f*=-1),b=new SVG.Point(($.x+Q.x)/2+f*-u[1],($.y+Q.y)/2+f*u[0]),y=new SVG.Point(Q.x-b.x,Q.y-b.y),k=new SVG.Point($.x-b.x,$.y-b.y),A=Math.acos(y.x/Math.sqrt(y.x*y.x+y.y*y.y)),y.y<0&&(A*=-1),l=Math.acos(k.x/Math.sqrt(k.x*k.x+k.y*k.y)),k.y<0&&(l*=-1),Ke&&A>l&&(l+=2*Math.PI),!Ke&&A<l&&(l-=2*Math.PI),S=[],T=A,g=(l-A)/(m=Math.ceil(2*Math.abs(A-l)/Math.PI)),v=4*Math.tan(g/4)/3,X=0;X<=m;X++)z=Math.cos(T),L=Math.sin(T),E=new SVG.Point(b.x+z,b.y+L),S[X]=[new SVG.Point(E.x+v*L,E.y-v*z),E,new SVG.Point(E.x-v*L,E.y+v*z)],T+=g;for(S[0][0]=S[0][1].clone(),S[S.length-1][2]=S[S.length-1][1].clone(),d=(new SVG.Matrix).rotate(ve).scale(ae,ce).rotate(-ve),X=0,D=S.length;X<D;X++)S[X][0]=S[X][0].transform(d),S[X][1]=S[X][1].transform(d),S[X][2]=S[X][2].transform(d);for(X=1,D=S.length;X<D;X++)W=(E=S[X-1][2]).x,O=E.y,Z=(E=S[X][0]).x,J=E.y,et=(E=S[X][1]).x,bt.push(["C",W,O,Z,J,et,tt=E.y]);return bt}(this.pos,s))[0]}return s[0]="C",this.pos=[s[5],s[6]],this.reflection=[2*s[5]-s[3],2*s[6]-s[4]],n}function a(s,n){if(!1===n)return!1;for(var r=n,o=s.length;r<o;++r)if("M"==s[r][0])return r;return!1}SVG.extend(SVG.PathArray,{morph:function(s){for(var n=this.value,r=this.parse(s),o=0,h=0,c=!1,d=!1;!1!==o||!1!==h;){var u;c=a(n,!1!==o&&o+1),d=a(r,!1!==h&&h+1),!1===o&&(o=0==(u=new SVG.PathArray(p.start).bbox()).height||0==u.width?n.push(n[0])-1:n.push(["M",u.x+u.width/2,u.y+u.height/2])-1),!1===h&&(h=0==(u=new SVG.PathArray(p.dest).bbox()).height||0==u.width?r.push(r[0])-1:r.push(["M",u.x+u.width/2,u.y+u.height/2])-1);var p=w(n,o,c,r,h,d);n=n.slice(0,o).concat(p.start,!1===c?[]:n.slice(c)),r=r.slice(0,h).concat(p.dest,!1===d?[]:r.slice(d)),o=!1!==c&&o+p.start.length,h=!1!==d&&h+p.dest.length}return this.value=n,this.destination=new SVG.PathArray,this.destination.value=r,this}})}(),function(){function w(e){e.remember("_draggable",this),this.el=e}w.prototype.init=function(e,t){var i=this;this.constraint=e,this.value=t,this.el.on("mousedown.drag",function(a){i.start(a)}),this.el.on("touchstart.drag",function(a){i.start(a)})},w.prototype.transformPoint=function(e,t){var i=(e=e||window.event).changedTouches&&e.changedTouches[0]||e;return this.p.x=i.clientX-(t||0),this.p.y=i.clientY,this.p.matrixTransform(this.m)},w.prototype.getBBox=function(){var e=this.el.bbox();return this.el instanceof SVG.Nested&&(e=this.el.rbox()),(this.el instanceof SVG.G||this.el instanceof SVG.Use||this.el instanceof SVG.Nested)&&(e.x=this.el.x(),e.y=this.el.y()),e},w.prototype.start=function(e){if("click"!=e.type&&"mousedown"!=e.type&&"mousemove"!=e.type||1==(e.which||e.buttons)){var t=this;if(this.el.fire("beforedrag",{event:e,handler:this}),!this.el.event().defaultPrevented){e.preventDefault(),e.stopPropagation(),this.parent=this.parent||this.el.parent(SVG.Nested)||this.el.parent(SVG.Doc),this.p=this.parent.node.createSVGPoint(),this.m=this.el.node.getScreenCTM().inverse();var i,a=this.getBBox();if(this.el instanceof SVG.Text)switch(i=this.el.node.getComputedTextLength(),this.el.attr("text-anchor")){case"middle":i/=2;break;case"start":i=0}this.startPoints={point:this.transformPoint(e,i),box:a,transform:this.el.transform()},SVG.on(window,"mousemove.drag",function(s){t.drag(s)}),SVG.on(window,"touchmove.drag",function(s){t.drag(s)}),SVG.on(window,"mouseup.drag",function(s){t.end(s)}),SVG.on(window,"touchend.drag",function(s){t.end(s)}),this.el.fire("dragstart",{event:e,p:this.startPoints.point,m:this.m,handler:this})}}},w.prototype.drag=function(e){var t=this.getBBox(),i=this.transformPoint(e),a=this.startPoints.box.x+i.x-this.startPoints.point.x,s=this.startPoints.box.y+i.y-this.startPoints.point.y,n=this.constraint,r=i.x-this.startPoints.point.x,o=i.y-this.startPoints.point.y;if(this.el.fire("dragmove",{event:e,p:i,m:this.m,handler:this}),this.el.event().defaultPrevented)return i;if("function"==typeof n){var h=n.call(this.el,a,s,this.m);"boolean"==typeof h&&(h={x:h,y:h}),!0===h.x?this.el.x(a):!1!==h.x&&this.el.x(h.x),!0===h.y?this.el.y(s):!1!==h.y&&this.el.y(h.y)}else"object"==typeof n&&(null!=n.minX&&a<n.minX?r=(a=n.minX)-this.startPoints.box.x:null!=n.maxX&&a>n.maxX-t.width&&(r=(a=n.maxX-t.width)-this.startPoints.box.x),null!=n.minY&&s<n.minY?o=(s=n.minY)-this.startPoints.box.y:null!=n.maxY&&s>n.maxY-t.height&&(o=(s=n.maxY-t.height)-this.startPoints.box.y),null!=n.snapToGrid&&(a-=a%n.snapToGrid,s-=s%n.snapToGrid,r-=r%n.snapToGrid,o-=o%n.snapToGrid),this.el instanceof SVG.G?this.el.matrix(this.startPoints.transform).transform({x:r,y:o},!0):this.el.move(a,s));return i},w.prototype.end=function(e){var t=this.drag(e);this.el.fire("dragend",{event:e,p:t,m:this.m,handler:this}),SVG.off(window,"mousemove.drag"),SVG.off(window,"touchmove.drag"),SVG.off(window,"mouseup.drag"),SVG.off(window,"touchend.drag")},SVG.extend(SVG.Element,{draggable:function(e,t){"function"!=typeof e&&"object"!=typeof e||(t=e,e=!0);var i=this.remember("_draggable")||new w(this);return(e=void 0===e||e)?i.init(t||{},e):(this.off("mousedown.drag"),this.off("touchstart.drag")),this}})}.call(void 0),function(){function w(e){this.el=e,e.remember("_selectHandler",this),this.pointSelection={isSelected:!1},this.rectSelection={isSelected:!1},this.pointsList={lt:[0,0],rt:["width",0],rb:["width","height"],lb:[0,"height"],t:["width",0],r:["width","height"],b:["width","height"],l:[0,"height"]},this.pointCoord=function(t,i,a){var s="string"!=typeof t?t:i[t];return a?s/2:s},this.pointCoords=function(t,i){var a=this.pointsList[t];return{x:this.pointCoord(a[0],i,"t"===t||"b"===t),y:this.pointCoord(a[1],i,"r"===t||"l"===t)}}}w.prototype.init=function(e,t){var i=this.el.bbox();this.options={};var a=this.el.selectize.defaults.points;for(var s in this.el.selectize.defaults)this.options[s]=this.el.selectize.defaults[s],void 0!==t[s]&&(this.options[s]=t[s]);var n=["points","pointsExclude"];for(var s in n){var r=this.options[n[s]];"string"==typeof r?r=r.length>0?r.split(/\s*,\s*/i):[]:"boolean"==typeof r&&"points"===n[s]&&(r=r?a:[]),this.options[n[s]]=r}this.options.points=[a,this.options.points].reduce(function(o,h){return o.filter(function(c){return h.indexOf(c)>-1})}),this.options.points=[this.options.points,this.options.pointsExclude].reduce(function(o,h){return o.filter(function(c){return h.indexOf(c)<0})}),this.parent=this.el.parent(),this.nested=this.nested||this.parent.group(),this.nested.matrix(new SVG.Matrix(this.el).translate(i.x,i.y)),this.options.deepSelect&&-1!==["line","polyline","polygon"].indexOf(this.el.type)?this.selectPoints(e):this.selectRect(e),this.observe(),this.cleanup()},w.prototype.selectPoints=function(e){return this.pointSelection.isSelected=e,this.pointSelection.set||(this.pointSelection.set=this.parent.set(),this.drawPoints()),this},w.prototype.getPointArray=function(){var e=this.el.bbox();return this.el.array().valueOf().map(function(t){return[t[0]-e.x,t[1]-e.y]})},w.prototype.drawPoints=function(){for(var e=this,t=this.getPointArray(),i=0,a=t.length;i<a;++i){var s=function(r){return function(o){(o=o||window.event).preventDefault?o.preventDefault():o.returnValue=!1,o.stopPropagation(),e.el.fire("point",{x:o.pageX||o.touches[0].pageX,y:o.pageY||o.touches[0].pageY,i:r,event:o})}}(i),n=this.drawPoint(t[i][0],t[i][1]).addClass(this.options.classPoints).addClass(this.options.classPoints+"_point").on("touchstart",s).on("mousedown",s);this.pointSelection.set.add(n)}},w.prototype.drawPoint=function(e,t){var i=this.options.pointType;switch(i){case"circle":return this.drawCircle(e,t);case"rect":return this.drawRect(e,t);default:if("function"==typeof i)return i.call(this,e,t);throw new Error("Unknown "+i+" point type!")}},w.prototype.drawCircle=function(e,t){return this.nested.circle(this.options.pointSize).center(e,t)},w.prototype.drawRect=function(e,t){return this.nested.rect(this.options.pointSize,this.options.pointSize).center(e,t)},w.prototype.updatePointSelection=function(){var e=this.getPointArray();this.pointSelection.set.each(function(t){this.cx()===e[t][0]&&this.cy()===e[t][1]||this.center(e[t][0],e[t][1])})},w.prototype.updateRectSelection=function(){var e=this,t=this.el.bbox();if(this.rectSelection.set.get(0).attr({width:t.width,height:t.height}),this.options.points.length&&this.options.points.map(function(a,s){var n=e.pointCoords(a,t);e.rectSelection.set.get(s+1).center(n.x,n.y)}),this.options.rotationPoint){var i=this.rectSelection.set.length();this.rectSelection.set.get(i-1).center(t.width/2,20)}},w.prototype.selectRect=function(e){var t=this,i=this.el.bbox();function a(r){return function(o){(o=o||window.event).preventDefault?o.preventDefault():o.returnValue=!1,o.stopPropagation(),t.el.fire(r,{x:o.pageX||o.touches[0].pageX,y:o.pageY||o.touches[0].pageY,event:o})}}if(this.rectSelection.isSelected=e,this.rectSelection.set=this.rectSelection.set||this.parent.set(),this.rectSelection.set.get(0)||this.rectSelection.set.add(this.nested.rect(i.width,i.height).addClass(this.options.classRect)),this.options.points.length&&this.rectSelection.set.length()<2&&(this.options.points.map(function(r,o){var h=t.pointCoords(r,i),c=t.drawPoint(h.x,h.y).attr("class",t.options.classPoints+"_"+r).on("mousedown",a(r)).on("touchstart",a(r));t.rectSelection.set.add(c)}),this.rectSelection.set.each(function(){this.addClass(t.options.classPoints)})),this.options.rotationPoint&&(this.options.points&&!this.rectSelection.set.get(9)||!this.options.points&&!this.rectSelection.set.get(1))){var s=function(r){(r=r||window.event).preventDefault?r.preventDefault():r.returnValue=!1,r.stopPropagation(),t.el.fire("rot",{x:r.pageX||r.touches[0].pageX,y:r.pageY||r.touches[0].pageY,event:r})},n=this.drawPoint(i.width/2,20).attr("class",this.options.classPoints+"_rot").on("touchstart",s).on("mousedown",s);this.rectSelection.set.add(n)}},w.prototype.handler=function(){var e=this.el.bbox();this.nested.matrix(new SVG.Matrix(this.el).translate(e.x,e.y)),this.rectSelection.isSelected&&this.updateRectSelection(),this.pointSelection.isSelected&&this.updatePointSelection()},w.prototype.observe=function(){var e=this;if(MutationObserver)if(this.rectSelection.isSelected||this.pointSelection.isSelected)this.observerInst=this.observerInst||new MutationObserver(function(){e.handler()}),this.observerInst.observe(this.el.node,{attributes:!0});else try{this.observerInst.disconnect(),delete this.observerInst}catch(t){}else this.el.off("DOMAttrModified.select"),(this.rectSelection.isSelected||this.pointSelection.isSelected)&&this.el.on("DOMAttrModified.select",function(){e.handler()})},w.prototype.cleanup=function(){!this.rectSelection.isSelected&&this.rectSelection.set&&(this.rectSelection.set.each(function(){this.remove()}),this.rectSelection.set.clear(),delete this.rectSelection.set),!this.pointSelection.isSelected&&this.pointSelection.set&&(this.pointSelection.set.each(function(){this.remove()}),this.pointSelection.set.clear(),delete this.pointSelection.set),this.pointSelection.isSelected||this.rectSelection.isSelected||(this.nested.remove(),delete this.nested)},SVG.extend(SVG.Element,{selectize:function(e,t){return"object"==typeof e&&(t=e,e=!0),(this.remember("_selectHandler")||new w(this)).init(void 0===e||e,t||{}),this}}),SVG.Element.prototype.selectize.defaults={points:["lt","rt","rb","lb","t","r","b","l"],pointsExclude:[],classRect:"svg_select_boundingRect",classPoints:"svg_select_points",pointSize:7,rotationPoint:!0,deepSelect:!1,pointType:"circle"}}(),function(){(function(){function w(e){e.remember("_resizeHandler",this),this.el=e,this.parameters={},this.lastUpdateCall=null,this.p=e.doc().node.createSVGPoint()}w.prototype.transformPoint=function(e,t,i){return this.p.x=e-(this.offset.x-window.pageXOffset),this.p.y=t-(this.offset.y-window.pageYOffset),this.p.matrixTransform(i||this.m)},w.prototype._extractPosition=function(e){return{x:null!=e.clientX?e.clientX:e.touches[0].clientX,y:null!=e.clientY?e.clientY:e.touches[0].clientY}},w.prototype.init=function(e){var t=this;if(this.stop(),"stop"!==e){for(var i in this.options={},this.el.resize.defaults)this.options[i]=this.el.resize.defaults[i],void 0!==e[i]&&(this.options[i]=e[i]);this.el.on("lt.resize",function(a){t.resize(a||window.event)}),this.el.on("rt.resize",function(a){t.resize(a||window.event)}),this.el.on("rb.resize",function(a){t.resize(a||window.event)}),this.el.on("lb.resize",function(a){t.resize(a||window.event)}),this.el.on("t.resize",function(a){t.resize(a||window.event)}),this.el.on("r.resize",function(a){t.resize(a||window.event)}),this.el.on("b.resize",function(a){t.resize(a||window.event)}),this.el.on("l.resize",function(a){t.resize(a||window.event)}),this.el.on("rot.resize",function(a){t.resize(a||window.event)}),this.el.on("point.resize",function(a){t.resize(a||window.event)}),this.update()}},w.prototype.stop=function(){return this.el.off("lt.resize"),this.el.off("rt.resize"),this.el.off("rb.resize"),this.el.off("lb.resize"),this.el.off("t.resize"),this.el.off("r.resize"),this.el.off("b.resize"),this.el.off("l.resize"),this.el.off("rot.resize"),this.el.off("point.resize"),this},w.prototype.resize=function(e){var t=this;this.m=this.el.node.getScreenCTM().inverse(),this.offset={x:window.pageXOffset,y:window.pageYOffset};var i=this._extractPosition(e.detail.event);if(this.parameters={type:this.el.type,p:this.transformPoint(i.x,i.y),x:e.detail.x,y:e.detail.y,box:this.el.bbox(),rotation:this.el.transform().rotation},"text"===this.el.type&&(this.parameters.fontSize=this.el.attr()["font-size"]),void 0!==e.detail.i){var a=this.el.array().valueOf();this.parameters.i=e.detail.i,this.parameters.pointCoords=[a[e.detail.i][0],a[e.detail.i][1]]}switch(e.type){case"lt":this.calc=function(s,n){var r=this.snapToGrid(s,n);if(this.parameters.box.width-r[0]>0&&this.parameters.box.height-r[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x+r[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-r[0]);r=this.checkAspectRatio(r),this.el.move(this.parameters.box.x+r[0],this.parameters.box.y+r[1]).size(this.parameters.box.width-r[0],this.parameters.box.height-r[1])}};break;case"rt":this.calc=function(s,n){var r=this.snapToGrid(s,n,2);if(this.parameters.box.width+r[0]>0&&this.parameters.box.height-r[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x-r[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+r[0]);r=this.checkAspectRatio(r,!0),this.el.move(this.parameters.box.x,this.parameters.box.y+r[1]).size(this.parameters.box.width+r[0],this.parameters.box.height-r[1])}};break;case"rb":this.calc=function(s,n){var r=this.snapToGrid(s,n,0);if(this.parameters.box.width+r[0]>0&&this.parameters.box.height+r[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x-r[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+r[0]);r=this.checkAspectRatio(r),this.el.move(this.parameters.box.x,this.parameters.box.y).size(this.parameters.box.width+r[0],this.parameters.box.height+r[1])}};break;case"lb":this.calc=function(s,n){var r=this.snapToGrid(s,n,1);if(this.parameters.box.width-r[0]>0&&this.parameters.box.height+r[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x+r[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-r[0]);r=this.checkAspectRatio(r,!0),this.el.move(this.parameters.box.x+r[0],this.parameters.box.y).size(this.parameters.box.width-r[0],this.parameters.box.height+r[1])}};break;case"t":this.calc=function(s,n){var r=this.snapToGrid(s,n,2);if(this.parameters.box.height-r[1]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y+r[1]).height(this.parameters.box.height-r[1])}};break;case"r":this.calc=function(s,n){var r=this.snapToGrid(s,n,0);if(this.parameters.box.width+r[0]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y).width(this.parameters.box.width+r[0])}};break;case"b":this.calc=function(s,n){var r=this.snapToGrid(s,n,0);if(this.parameters.box.height+r[1]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y).height(this.parameters.box.height+r[1])}};break;case"l":this.calc=function(s,n){var r=this.snapToGrid(s,n,1);if(this.parameters.box.width-r[0]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x+r[0],this.parameters.box.y).width(this.parameters.box.width-r[0])}};break;case"rot":this.calc=function(s,n){var r=s+this.parameters.p.x,o=n+this.parameters.p.y,h=Math.atan2(this.parameters.p.y-this.parameters.box.y-this.parameters.box.height/2,this.parameters.p.x-this.parameters.box.x-this.parameters.box.width/2),c=Math.atan2(o-this.parameters.box.y-this.parameters.box.height/2,r-this.parameters.box.x-this.parameters.box.width/2),d=this.parameters.rotation+180*(c-h)/Math.PI+this.options.snapToAngle/2;this.el.center(this.parameters.box.cx,this.parameters.box.cy).rotate(d-d%this.options.snapToAngle,this.parameters.box.cx,this.parameters.box.cy)};break;case"point":this.calc=function(s,n){var r=this.snapToGrid(s,n,this.parameters.pointCoords[0],this.parameters.pointCoords[1]),o=this.el.array().valueOf();o[this.parameters.i][0]=this.parameters.pointCoords[0]+r[0],o[this.parameters.i][1]=this.parameters.pointCoords[1]+r[1],this.el.plot(o)}}this.el.fire("resizestart",{dx:this.parameters.x,dy:this.parameters.y,event:e}),SVG.on(window,"touchmove.resize",function(s){t.update(s||window.event)}),SVG.on(window,"touchend.resize",function(){t.done()}),SVG.on(window,"mousemove.resize",function(s){t.update(s||window.event)}),SVG.on(window,"mouseup.resize",function(){t.done()})},w.prototype.update=function(e){if(e){var t=this._extractPosition(e),i=this.transformPoint(t.x,t.y),a=i.x-this.parameters.p.x,s=i.y-this.parameters.p.y;this.lastUpdateCall=[a,s],this.calc(a,s),this.el.fire("resizing",{dx:a,dy:s,event:e})}else this.lastUpdateCall&&this.calc(this.lastUpdateCall[0],this.lastUpdateCall[1])},w.prototype.done=function(){this.lastUpdateCall=null,SVG.off(window,"mousemove.resize"),SVG.off(window,"mouseup.resize"),SVG.off(window,"touchmove.resize"),SVG.off(window,"touchend.resize"),this.el.fire("resizedone")},w.prototype.snapToGrid=function(e,t,i,a){var s;return s=void 0!==a?[(i+e)%this.options.snapToGrid,(a+t)%this.options.snapToGrid]:[(this.parameters.box.x+e+(1&(i=null==i?3:i)?0:this.parameters.box.width))%this.options.snapToGrid,(this.parameters.box.y+t+(2&i?0:this.parameters.box.height))%this.options.snapToGrid],e<0&&(s[0]-=this.options.snapToGrid),t<0&&(s[1]-=this.options.snapToGrid),e-=Math.abs(s[0])<this.options.snapToGrid/2?s[0]:s[0]-(e<0?-this.options.snapToGrid:this.options.snapToGrid),t-=Math.abs(s[1])<this.options.snapToGrid/2?s[1]:s[1]-(t<0?-this.options.snapToGrid:this.options.snapToGrid),this.constraintToBox(e,t,i,a)},w.prototype.constraintToBox=function(e,t,i,a){var s,n,r=this.options.constraint||{};return void 0!==a?(s=i,n=a):(s=this.parameters.box.x+(1&i?0:this.parameters.box.width),n=this.parameters.box.y+(2&i?0:this.parameters.box.height)),void 0!==r.minX&&s+e<r.minX&&(e=r.minX-s),void 0!==r.maxX&&s+e>r.maxX&&(e=r.maxX-s),void 0!==r.minY&&n+t<r.minY&&(t=r.minY-n),void 0!==r.maxY&&n+t>r.maxY&&(t=r.maxY-n),[e,t]},w.prototype.checkAspectRatio=function(e,t){if(!this.options.saveAspectRatio)return e;var i=e.slice(),a=this.parameters.box.width/this.parameters.box.height,s=this.parameters.box.width+e[0],n=this.parameters.box.height-e[1],r=s/n;return r<a?(i[1]=s/a-this.parameters.box.height,t&&(i[1]=-i[1])):r>a&&(i[0]=this.parameters.box.width-n*a,t&&(i[0]=-i[0])),i},SVG.extend(SVG.Element,{resize:function(e){return(this.remember("_resizeHandler")||new w(this)).init(e||{}),this}}),SVG.Element.prototype.resize.defaults={snapToAngle:.1,snapToGrid:1,constraint:{},saveAspectRatio:!1}}).call(this)}(),void 0===window.Apex&&(window.Apex={});var xt=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w}return Y(w,[{key:"initModules",value:function(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend"],this.ctx.animations=new ue(this.ctx),this.ctx.axes=new Be(this.ctx),this.ctx.core=new It(this.ctx.el,this.ctx),this.ctx.config=new xe({}),this.ctx.data=new De(this.ctx),this.ctx.grid=new be(this.ctx),this.ctx.graphics=new M(this.ctx),this.ctx.coreUtils=new _(this.ctx),this.ctx.crosshairs=new Me(this.ctx),this.ctx.events=new Ne(this.ctx),this.ctx.exports=new Pe(this.ctx),this.ctx.localization=new We(this.ctx),this.ctx.options=new le,this.ctx.responsive=new Ve(this.ctx),this.ctx.series=new K(this.ctx),this.ctx.theme=new Ge(this.ctx),this.ctx.formatters=new Ae(this.ctx),this.ctx.titleSubtitle=new _e(this.ctx),this.ctx.legend=new G(this.ctx),this.ctx.toolbar=new I(this.ctx),this.ctx.dimensions=new Se(this.ctx),this.ctx.updateHelpers=new Mt(this.ctx),this.ctx.zoomPanSelection=new H(this.ctx),this.ctx.w.globals.tooltip=new kt(this.ctx)}}]),w}(),mt=function(){function w(e){C(this,w),this.ctx=e,this.w=e.w}return Y(w,[{key:"clear",value:function(e){var t=e.isUpdating;this.ctx.zoomPanSelection&&this.ctx.zoomPanSelection.destroy(),this.ctx.toolbar&&this.ctx.toolbar.destroy(),this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx.zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx.toolbar=null,this.ctx.localization=null,this.ctx.w.globals.tooltip=null,this.clearDomElements({isUpdating:t})}},{key:"killSVG",value:function(e){e.each(function(t,i){this.removeClass("*"),this.off(),this.stop()},!0),e.ungroup(),e.clear()}},{key:"clearDomElements",value:function(e){var t=this,a=this.w.globals.dom.Paper.node;a.parentNode&&a.parentNode.parentNode&&!e.isUpdating&&(a.parentNode.parentNode.style.minHeight="unset");var s=this.w.globals.dom.baseEl;s&&this.ctx.eventList.forEach(function(r){s.removeEventListener(r,t.ctx.events.documentEvent)});var n=this.w.globals.dom;if(null!==this.ctx.el)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(n.Paper),n.Paper.remove(),n.elWrap=null,n.elGraphical=null,n.elAnnotations=null,n.elLegendWrap=null,n.baseEl=null,n.elGridRect=null,n.elGridRectMask=null,n.elGridRectMarkerMask=null,n.elForecastMask=null,n.elNonForecastMask=null,n.elDefs=null}}]),w}(),Qe=new WeakMap,Et=function(){function w(e,t){C(this,w),this.opts=t,this.ctx=this,this.w=new Oe(t).init(),this.el=e,this.w.globals.cuid=P.randomId(),this.w.globals.chartID=this.w.config.chart.id?P.escapeString(this.w.config.chart.id):this.w.globals.cuid,new xt(this).initModules(),this.create=P.bind(this.create,this),this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this)}return Y(w,[{key:"render",value:function(){var e=this;return new Promise(function(t,i){if(null!==e.el){void 0===Apex._chartInstances&&(Apex._chartInstances=[]),e.w.config.chart.id&&Apex._chartInstances.push({id:e.w.globals.chartID,group:e.w.config.chart.group,chart:e}),e.setLocale(e.w.config.chart.defaultLocale);var a=e.w.config.chart.events.beforeMount;if("function"==typeof a&&a(e,e.w),e.events.fireEvent("beforeMount",[e,e.w]),window.addEventListener("resize",e.windowResizeHandler),c=e.el.parentNode,d=e.parentResizeHandler,u=!1,p=new ResizeObserver(function(x){u&&d.call(c,x),u=!0}),c.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(c.children).forEach(function(x){return p.observe(x)}):p.observe(c),Qe.set(d,p),!e.css){var s=e.el.getRootNode&&e.el.getRootNode(),n=P.is("ShadowRoot",s),r=e.el.ownerDocument,o=r.getElementById("apexcharts-css");!n&&o||(e.css=document.createElement("style"),e.css.id="apexcharts-css",e.css.textContent='.apexcharts-canvas {\n position: relative;\n user-select: none;\n /* cannot give overflow: hidden as it will crop tooltips which overflow outside chart area */\n}\n\n\n/* scrollbar is not visible by default for legend, hence forcing the visibility */\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\n.apexcharts-inner {\n position: relative;\n}\n\n.apexcharts-text tspan {\n font-family: inherit;\n}\n\n.legend-mouseover-inactive {\n transition: 0.15s ease all;\n opacity: 0.20;\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: 0.15s ease all;\n}\n\n.apexcharts-tooltip.apexcharts-active {\n opacity: 1;\n transition: 0.15s ease all;\n}\n\n.apexcharts-tooltip.apexcharts-theme-light {\n border: 1px solid #e3e3e3;\n background: rgba(255, 255, 255, 0.96);\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark {\n color: #fff;\n background: rgba(30, 30, 30, 0.8);\n}\n\n.apexcharts-tooltip * {\n font-family: inherit;\n}\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, 0.7);\n border-bottom: 1px solid #333;\n}\n\n.apexcharts-tooltip-text-y-value,\n.apexcharts-tooltip-text-goals-value,\n.apexcharts-tooltip-text-z-value {\n display: inline-block;\n font-weight: 600;\n margin-left: 5px;\n}\n\n.apexcharts-tooltip-text-y-label:empty,\n.apexcharts-tooltip-text-y-value:empty,\n.apexcharts-tooltip-text-goals-label:empty,\n.apexcharts-tooltip-text-goals-value:empty,\n.apexcharts-tooltip-text-z-value:empty {\n display: none;\n}\n\n.apexcharts-tooltip-text-y-value,\n.apexcharts-tooltip-text-goals-value,\n.apexcharts-tooltip-text-z-value {\n font-weight: 600;\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.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: 0px;\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-series-group-hidden {\n opacity: 0;\n height: 0;\n line-height: 0;\n padding: 0 !important;\n}\n\n.apexcharts-tooltip-y-group {\n padding: 6px 0 5px;\n}\n\n.apexcharts-tooltip-box, .apexcharts-custom-tooltip {\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: bold;\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: bold;\n display: block;\n margin-bottom: 5px;\n}\n\n.apexcharts-xaxistooltip {\n opacity: 0;\n padding: 9px 10px;\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 transition: 0.15s ease all;\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, 0.7);\n border: 1px solid rgba(0, 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: rgba(236, 239, 241, 0);\n border-width: 6px;\n margin-left: -6px;\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: rgba(144, 164, 174, 0);\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 border-bottom-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0, 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 border-top-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: 0.15s ease all;\n}\n\n.apexcharts-yaxistooltip {\n opacity: 0;\n padding: 4px 10px;\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-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, 0.7);\n border: 1px solid rgba(0, 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: rgba(236, 239, 241, 0);\n border-width: 6px;\n margin-top: -6px;\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: rgba(144, 164, 174, 0);\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 border-left-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0, 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 border-right-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0, 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: 0.15s ease all;\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: 0.15s ease all;\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0;\n}\n\n.apexcharts-selection-rect {\n cursor: move;\n}\n\n.svg_select_boundingRect, .svg_select_points_rot {\n pointer-events: none;\n opacity: 0;\n visibility: hidden;\n}\n.apexcharts-selection-rect + g .svg_select_boundingRect,\n.apexcharts-selection-rect + g .svg_select_points_rot {\n opacity: 0;\n visibility: hidden;\n}\n\n.apexcharts-selection-rect + g .svg_select_points_l,\n.apexcharts-selection-rect + g .svg_select_points_r {\n cursor: ew-resize;\n opacity: 1;\n visibility: visible;\n}\n\n.svg_select_points {\n fill: #efefef;\n stroke: #333;\n rx: 2;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon,\n.apexcharts-reset-icon,\n.apexcharts-pan-icon,\n.apexcharts-selection-icon,\n.apexcharts-menu-icon,\n.apexcharts-toolbar-custom-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-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-menu-icon svg {\n fill: #6E8192;\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(0.76)\n}\n\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.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg {\n fill: #f3f4f5;\n}\n\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg {\n fill: #008FFB;\n}\n\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.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg {\n fill: #333;\n}\n\n.apexcharts-selection-icon,\n.apexcharts-menu-icon {\n position: relative;\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px;\n}\n\n.apexcharts-zoom-icon,\n.apexcharts-reset-icon,\n.apexcharts-menu-icon {\n transform: scale(0.85);\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n transform: scale(0.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px;\n}\n\n.apexcharts-pan-icon {\n transform: scale(0.62);\n position: relative;\n left: 1px;\n top: 0px;\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: 0px 6px 2px 6px;\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: 0.15s ease all;\n pointer-events: none;\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: 0.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, 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-datalabel.apexcharts-element-hidden {\n opacity: 0;\n}\n\n.apexcharts-pie-label,\n.apexcharts-datalabels,\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value {\n cursor: default;\n pointer-events: none;\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: 0.3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease;\n}\n\n.apexcharts-canvas .apexcharts-element-hidden {\n opacity: 0;\n}\n\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-gridline,\n.apexcharts-annotation-rect,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-line,\n.apexcharts-zoom-rect,\n.apexcharts-toolbar svg,\n.apexcharts-area-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,\n.apexcharts-line-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,\n.apexcharts-radar-series path,\n.apexcharts-radar-series polygon {\n pointer-events: none;\n}\n\n\n/* markers */\n\n.apexcharts-marker {\n transition: 0.15s ease all;\n}\n\n@keyframes opaque {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n\n/* Resize generated styles */\n\n@keyframes resizeanim {\n from {\n opacity: 0;\n }\n to {\n opacity: 0;\n }\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n}\n\n.resize-triggers,\n.resize-triggers>div,\n.contract-trigger:before {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n overflow: hidden;\n}\n\n.resize-triggers>div {\n background: #eee;\n overflow: auto;\n}\n\n.contract-trigger:before {\n width: 200%;\n height: 200%;\n}',n?s.prepend(e.css):r.head.appendChild(e.css))}var h=e.create(e.w.config.series,{});if(!h)return t(e);e.mount(h).then(function(){"function"==typeof e.w.config.chart.events.mounted&&e.w.config.chart.events.mounted(e,e.w),e.events.fireEvent("mounted",[e,e.w]),t(h)}).catch(function(x){i(x)})}else i(new Error("Element not found"));var c,d,u,p})}},{key:"create",value:function(e,t){var i=this.w;new xt(this).initModules();var a=this.w.globals;if(a.noData=!1,a.animationEnded=!1,this.responsive.checkResponsiveConfig(t),i.config.xaxis.convertedCatToNumeric&&new ke(i.config).convertCatToNumericXaxis(i.config,this.ctx),null===this.el||(this.core.setupElements(),"treemap"===i.config.chart.type&&(i.config.grid.show=!1,i.config.yaxis[0].show=!1),0===a.svgWidth))return a.animationEnded=!0,null;var s=_.checkComboSeries(e);a.comboCharts=s.comboCharts,a.comboBarCount=s.comboBarCount;var n=e.every(function(d){return d.data&&0===d.data.length});(0===e.length||n)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(e),this.theme.init(),new we(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),a.noData&&a.collapsedSeries.length!==a.series.length&&!i.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),a.axisCharts&&(this.core.coreCalculations(),"category"!==i.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=i.globals.minX,this.ctx.toolbar.maxX=i.globals.maxX),this.formatters.heatmapLabelFormatters(),this.dimensions.plotCoords();var r=this.core.xySettings();this.grid.createGridMask();var o=this.core.plotChartType(e,r),h=new pe(this);return h.bringForward(),i.config.dataLabels.background.enabled&&h.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:o,xyRatios:r,elInner:i.globals.dom.elGraphical,dimensions:{plot:{left:i.globals.translateX,top:i.globals.translateY,width:i.globals.gridWidth,height:i.globals.gridHeight}}}}},{key:"mount",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=this,a=i.w;return new Promise(function(s,n){if(null===i.el)return n(new Error("Not enough data to display or target element not found"));(null===t||a.globals.allSeriesCollapsed)&&i.series.handleNoData(),"treemap"!==a.config.chart.type&&i.axes.drawAxis(a.config.chart.type,t.xyRatios),i.grid=new be(i);var r=i.grid.drawGrid();i.annotations=new ot(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),"back"===a.config.grid.position&&r&&a.globals.dom.elGraphical.add(r.el);var o=new me(e.ctx),h=new Ie(e.ctx);if(null!==r&&(o.xAxisLabelCorrections(r.xAxisTickWidth),h.setYAxisTextAlignments(),a.config.yaxis.map(function(u,p){-1===a.globals.ignoreYAxisIndexes.indexOf(p)&&h.yAxisTitleRotate(p,u.opposite)})),"back"===a.config.annotations.position&&(a.globals.dom.Paper.add(a.globals.dom.elAnnotations),i.annotations.drawAxesAnnotations()),Array.isArray(t.elGraph))for(var c=0;c<t.elGraph.length;c++)a.globals.dom.elGraphical.add(t.elGraph[c]);else a.globals.dom.elGraphical.add(t.elGraph);if("front"===a.config.grid.position&&r&&a.globals.dom.elGraphical.add(r.el),"front"===a.config.xaxis.crosshairs.position&&i.crosshairs.drawXCrosshairs(),"front"===a.config.yaxis[0].crosshairs.position&&i.crosshairs.drawYCrosshairs(),"front"===a.config.annotations.position&&(a.globals.dom.Paper.add(a.globals.dom.elAnnotations),i.annotations.drawAxesAnnotations()),!a.globals.noData){if(a.config.tooltip.enabled&&!a.globals.noData&&i.w.globals.tooltip.drawTooltip(t.xyRatios),a.globals.axisCharts&&(a.globals.isXNumeric||a.config.xaxis.convertedCatToNumeric||a.globals.isRangeBar))(a.config.chart.zoom.enabled||a.config.chart.selection&&a.config.chart.selection.enabled||a.config.chart.pan&&a.config.chart.pan.enabled)&&i.zoomPanSelection.init({xyRatios:t.xyRatios});else{var d=a.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach(function(u){d[u]=!1})}a.config.chart.toolbar.show&&!a.globals.allSeriesCollapsed&&i.toolbar.createToolbar()}a.globals.memory.methodsToExec.length>0&&a.globals.memory.methodsToExec.forEach(function(u){u.method(u.params,!1,u.context)}),a.globals.axisCharts||a.globals.noData||i.core.resizeNonAxisCharts(),s(i)})}},{key:"destroy",value:function(){var e,t;window.removeEventListener("resize",this.windowResizeHandler),(t=Qe.get(e=this.parentResizeHandler))&&(t.disconnect(),Qe.delete(e));var i=this.w.config.chart.id;i&&Apex._chartInstances.forEach(function(a,s){a.id===P.escapeString(i)&&Apex._chartInstances.splice(s,1)}),new mt(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=this.w;return r.globals.selection=void 0,e.series&&(this.series.resetSeries(!1,!0,!1),e.series.length&&e.series[0].data&&(e.series=e.series.map(function(o,h){return t.updateHelpers._extendSeries(o,h)})),this.updateHelpers.revertDefaultAxisMinMax()),e.xaxis&&(e=this.updateHelpers.forceXAxisUpdate(e)),e.yaxis&&(e=this.updateHelpers.forceYAxisUpdate(e)),r.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),e.theme&&(e=this.theme.updateThemeOptions(e)),this.updateHelpers._updateOptions(e,i,a,s,n)}},{key:"updateSeries",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(e,t,i)}},{key:"appendSeries",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w.config.series.slice();return a.push(e),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(a,t,i)}},{key:"appendData",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var a=i.w.config.series.slice(),s=0;s<a.length;s++)if(null!=e[s])for(var n=0;n<e[s].data.length;n++)a[s].data.push(e[s].data[n]);return i.w.config.series=a,t&&(i.w.globals.initialSeries=P.clone(i.w.config.series)),this.update()}},{key:"update",value:function(e){var t=this;return new Promise(function(i,a){new mt(t.ctx).clear({isUpdating:!0});var s=t.create(t.w.config.series,e);if(!s)return i(t);t.mount(s).then(function(){"function"==typeof t.w.config.chart.events.updated&&t.w.config.chart.events.updated(t,t.w),t.events.fireEvent("updated",[t,t.w]),t.w.globals.isDirty=!0,i(t)}).catch(function(n){a(n)})})}},{key:"getSyncedCharts",value:function(){var e=this.getGroupedCharts(),t=[this];return e.length&&(t=[],e.forEach(function(i){t.push(i)})),t}},{key:"getGroupedCharts",value:function(){var e=this;return Apex._chartInstances.filter(function(t){if(t.group)return!0}).map(function(t){return e.w.config.chart.group===t.group?t.chart:e})}},{key:"toggleSeries",value:function(e){return this.series.toggleSeries(e)}},{key:"highlightSeriesOnLegendHover",value:function(e,t){return this.series.toggleSeriesOnHover(e,t)}},{key:"showSeries",value:function(e){this.series.showSeries(e)}},{key:"hideSeries",value:function(e){this.series.hideSeries(e)}},{key:"resetSeries",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.series.resetSeries(e,t)}},{key:"addEventListener",value:function(e,t){this.events.addEventListener(e,t)}},{key:"removeEventListener",value:function(e,t){this.events.removeEventListener(e,t)}},{key:"addXaxisAnnotation",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addXaxisAnnotationExternal(e,t,a)}},{key:"addYaxisAnnotation",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addYaxisAnnotationExternal(e,t,a)}},{key:"addPointAnnotation",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addPointAnnotationExternal(e,t,a)}},{key:"clearAnnotations",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=this;e&&(t=e),t.annotations.clearAnnotations(t)}},{key:"removeAnnotation",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=this;t&&(i=t),i.annotations.removeAnnotation(i,e)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(e,t){return this.coreUtils.getSeriesTotalsXRange(e,t)}},{key:"getHighestValueInSeries",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=new Te(this.ctx);return t.getMinYMaxY(e).highestY}},{key:"getLowestValueInSeries",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=new Te(this.ctx);return t.getMinYMaxY(e).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(e,t){return this.updateHelpers.toggleDataPointSelection(e,t)}},{key:"zoomX",value:function(e,t){this.ctx.toolbar.zoomUpdateOptions(e,t)}},{key:"setLocale",value:function(e){this.localization.setCurrentLocaleValues(e)}},{key:"dataURI",value:function(e){return new Pe(this.ctx).dataURI(e)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var e=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout(function(){e.w.globals.resized=!0,e.w.globals.dataChanged=!1,e.ctx.update()},150)}},{key:"_windowResizeHandler",value:function(){var e=this.w.config.chart.redrawOnWindowResize;"function"==typeof e&&(e=e()),e&&this._windowResize()}}],[{key:"getChartByID",value:function(e){var t=P.escapeString(e),i=Apex._chartInstances.filter(function(a){return a.id===t})[0];return i&&i.chart}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),t=0;t<e.length;t++)new w(e[t],JSON.parse(e[t].getAttribute("data-options"))).render()}},{key:"exec",value:function(e,t){var i=this.getChartByID(e);if(i){i.w.globals.isExecCalled=!0;var a=null;if(-1!==i.publicMethods.indexOf(t)){for(var s=arguments.length,n=new Array(s>2?s-2:0),r=2;r<s;r++)n[r-2]=arguments[r];a=i[t].apply(i,n)}return a}}},{key:"merge",value:function(e,t){return P.extend(e,t)}}]),w}();Ce.exports=Et}}]);