vendor: 5,713 bytes, line 1
1"use strict";(self.webpackChunkwebclient_webpack=self.webpackChunkwebclient_webpack||[]).push([[4356],{84356(ii,qt,Zt){Zt.r(qt),Zt.d(qt,{default:()=>ot});var Te=Object.defineProperty,Me=Object.defineProperties,Pe=Object.getOwnPropertyDescriptors,jt=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,Xt=(A,t,e)=>t in A?Te(A,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):A[t]=e,I=(A,t)=>{for(var e in t||(t={}))Fe.call(t,e)&&Xt(A,e,t[e]);if(jt)for(var e of jt(t))Ee.call(t,e)&&Xt(A,e,t[e]);return A},H=(A,t)=>Me(A,Pe(t)),$=(A,t,e)=>Xt(A,"symbol"!=typeof t?t+"":t,e);class _{static isSSR(){return typeof window>"u"||typeof document>"u"}static isBrowser(){return!this.isSSR()}static hasAPI(t){return!this.isSSR()&&typeof window[t]<"u"}static getApex(){return typeof window<"u"&&window.Apex?window.Apex:typeof global<"u"&&global.Apex?global.Apex:{}}}class Dt{constructor(t,e=null){this.nodeName=t,this.namespaceURI=e,this.attributes=new Map,this.children=[],this.textContent="",this.style={},this.classList=new Xe,this.parentNode=null,this._ssrWidth=void 0,this._ssrHeight=void 0,this._ssrMode=void 0}setAttribute(t,e){this.attributes.set(t,e)}getAttribute(t){return this.attributes.get(t)}removeAttribute(t){this.attributes.delete(t)}hasAttribute(t){return this.attributes.has(t)}appendChild(t){if(t&&t!==this){if(t.parentNode&&t.parentNode!==this)t.parentNode.removeChild(t);else if(t.parentNode===this){const e=this.children.indexOf(t);-1!==e&&this.children.splice(e,1)}t.parentNode=this,this.children.push(t)}return t}removeChild(t){const e=this.children.indexOf(t);return-1!==e&&(this.children.splice(e,1),t.parentNode=null),t}insertBefore(t,e){if(!e)return this.appendChild(t);if(t.parentNode&&t.parentNode!==this)t.parentNode.removeChild(t);else if(t.parentNode===this){const i=this.children.indexOf(t);-1!==i&&this.children.splice(i,1)}const s=this.children.indexOf(e);return-1!==s&&(t.parentNode=this,this.children.splice(s,0,t)),t}cloneNode(t=!1){const e=new Dt(this.nodeName,this.namespaceURI);return e.textContent=this.textContent,this.attributes.forEach((s,i)=>{e.attributes.set(i,s)}),Object.assign(e.style,this.style),t&&this.children.forEach(s=>{s.cloneNode&&e.appendChild(s.cloneNode(!0))}),e}getBoundingClientRect(){return{width:this._ssrWidth||0,height:this._ssrHeight||0,top:0,left:0,right:this._ssrWidth||0,bottom:this._ssrHeight||0,x:0,y:0}}getRootNode(){let t=this;for(;t.parentNode;)t=t.parentNode;return t}querySelector(){return null}querySelectorAll(){return[]}getElementsByClassName(){return[]}addEventListener(){}removeEventListener(){}get childNodes(){return this.children}toString(){let t="";if(this.attributes.forEach((s,i)=>{t+=` ${i}="${s}"`}),0===this.children.length&&!this.textContent)return`<${this.nodeName}${t}/>`;const e=this.children.map(s=>s.toString()).join("");return`<${this.nodeName}${t}>${this.textContent}${e}</${this.nodeName}>`}get innerHTML(){return this.children.map(t=>t.toString()).join("")}set innerHTML(t){this.children=[],this.textContent=t}get outerHTML(){return this.toString()}get isConnected(){return!0}}class Xe{constructor(){this.classes=new Set}add(...t){t.forEach(e=>this.classes.add(e))}remove(...t){t.forEach(e=>this.classes.delete(e))}contains(t){return this.classes.has(t)}toggle(t,e){return!0===e?(this.classes.add(t),!0):!1===e||this.classes.has(t)?(this.classes.delete(t),!1):(this.classes.add(t),!0)}toString(){return Array.from(this.classes).join(" ")}}class Re{constructor(){this.SVGNS="http://www.w3.org/2000/svg",this.XLINKNS="http://www.w3.org/1999/xlink"}createElementNS(t,e){return new Dt(e,t)}createTextNode(t){const e={nodeName:"#text",nodeType:3,textContent:t,toString:()=>e.textContent};return e}querySelector(){return null}querySelectorAll(){return[]}getComputedStyle(){return{}}getBoundingClientRect(t){return t&&t.getBoundingClientRect?t.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}createXMLSerializer(){return{serializeToString:t=>t.toString?t.toString():""}}createDOMParser(){return{parseFromString(t,e){const s=new Dt("root");return s.innerHTML=t,{documentElement:s}}}}}let Q=null,nt=null,lt=null;class B{static init(){_.isSSR()&&!Q&&(Q=new Re)}static createElement(t){return _.isSSR()?(Q||this.init(),Q.createElementNS(null,t)):document.createElement(t)}static createElementNS(t,e){return _.isSSR()?(Q||this.init(),Q.createElementNS(t,e)):document.createElementNS(t,e)}static createTextNode(t){return _.isSSR()?(Q||this.init(),Q.createTextNode(t)):document.createTextNode(t)}static querySelector(t){return _.isSSR()?null:document.querySelector(t)}static querySelectorAll(t){return _.isSSR()?[]:document.querySelectorAll(t)}static getComputedStyle(t){return _.isSSR()?{}:window.getComputedStyle(t)}static getBoundingClientRect(t){return _.isSSR()?(Q||this.init(),Q.getBoundingClientRect(t)):t?t.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}static getXMLSerializer(){return _.isSSR()?(Q||this.init(),nt||(nt=Q.createXMLSerializer()),nt):(nt||(nt=new XMLSerializer),nt)}static getDOMParser(){return _.isSSR()?(Q||this.init(),lt||(lt=Q.createDOMParser()),lt):(lt||(lt=new DOMParser),lt)}static addWindowEventListener(t,e,s){_.isBrowser()&&window.addEventListener(t,e,s)}static removeWindowEventListener(t,e,s){_.isBrowser()&&window.removeEventListener(t,e,s)}static requestAnimationFrame(t){return _.isBrowser()?window.requestAnimationFrame(t):(t(0),null)}static cancelAnimationFrame(t){_.isBrowser()&&t&&window.cancelAnimationFrame(t)}static elementExists(t){return!!t&&(_.isSSR()?!0===t._ssrMode||void 0!==t.nodeName:!!t.getRootNode&&(t.getRootNode({composed:!0})===document||t.isConnected))}
vendor: 10,119 bytes, line 1
1static getWindow(){return _.isBrowser()?window:null}static getDocument(){return _.isBrowser()?document:null}static _getShim(){return Q}static _resetShim(){Q=null,nt=null,lt=null}}let D=class xt{static isObject(t){return t&&"object"==typeof t&&!Array.isArray(t)}static is(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}static isSafari(){return _.isBrowser()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}static extend(t,e){const s=Object.assign({},t);return this.isObject(t)&&this.isObject(e)&&Object.keys(e).forEach(i=>{this.isObject(e[i])?i in t?s[i]=this.extend(t[i],e[i]):Object.assign(s,{[i]:e[i]}):Object.assign(s,{[i]:e[i]})}),s}static extendArray(t,e){const s=[];return t.map(i=>{s.push(xt.extend(e,i))}),s}static monthMod(t){return t%12}static clone(t,e=new WeakMap,s=!1){if(null===t||"object"!=typeof t)return t;if(e.has(t))return e.get(t);let i;if(Array.isArray(t))if(s)i=t.slice();else{i=[],e.set(t,i);for(let a=0;a<t.length;a++)i[a]=this.clone(t[a],e,!1)}else if(t instanceof Date)i=new Date(t.getTime());else if(s)i=Object.assign({},t);else{i={},e.set(t,i);for(const a in t)Object.prototype.hasOwnProperty.call(t,a)&&(i[a]=this.clone(t[a],e,!1))}return i}static shallowClone(t){return null===t||"object"!=typeof t?t:Array.isArray(t)?t.slice():Object.assign({},t)}static shallowEqual(t,e){if(t===e)return!0;if(!t||!e)return!1;if("object"!=typeof t||"object"!=typeof e)return t===e;const s=Object.keys(t),i=Object.keys(e);if(s.length!==i.length)return!1;for(const a of s)if(t[a]!==e[a])return!1;return!0}static log10(t){return Math.log(t)/Math.LN10}static roundToBase10(t){return Math.pow(10,Math.floor(Math.log10(t)))}static roundToBase(t,e){return Math.pow(e,Math.floor(Math.log(t)/Math.log(e)))}static parseNumber(t){return"number"==typeof t||null===t?t:parseFloat(t)}static stripNumber(t,e=2){return Number.isInteger(t)?t:parseFloat(t.toPrecision(e))}static randomId(){return(Math.random()+1).toString(36).substring(4)}static noExponents(t){return t.toString().includes("e")?Math.round(t):t}static elementExists(t){return!(!t||!t.isConnected)}static isInShadowDOM(t){if(!t||!t.getRootNode)return!1;const e=t.getRootNode();return e&&e!==document&&xt.is("ShadowRoot",e)}static getShadowRootHost(t){return xt.isInShadowDOM(t)&&t.getRootNode().host||null}static getDimensions(t){if(!t)return[0,0];if(_.isSSR())return[t._ssrWidth||400,t._ssrHeight||300];let e;try{e=getComputedStyle(t,null)}catch{return[t.clientWidth||0,t.clientHeight||0]}let s=t.clientWidth,i=t.clientHeight;if(!s||!i){const a=t.getBoundingClientRect();s=s||a.width,i=i||a.height}return i-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),s-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),[s,i]}static getBoundingClientRect(t){if(!t)return{top:0,right:0,bottom:0,left:0,width:0,height:0,x:0,y:0};if(_.isSSR())return B.getBoundingClientRect(t);const e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:t.clientWidth,height:t.clientHeight,x:e.left,y:e.top}}static getLargestStringFromArr(t){return t.reduce((e,s)=>(Array.isArray(s)&&(s=s.reduce((i,a)=>i.length>a.length?i:a)),e.length>s.length?e:s),0)}static hexToRgba(t="#999999",e=.6){"#"!==t.substring(0,1)&&(t="#999999");const s=t.replace("#",""),i=s.match(new RegExp("(.{"+s.length/3+"})","g"))||[];for(let a=0;a<i.length;a++)i[a]=parseInt(1===i[a].length?i[a]+i[a]:i[a],16);return typeof e<"u"&&i.push(e),"rgba("+i.join(",")+")"}static getOpacityFromRGBA(t){return parseFloat(t.replace(/^.*,(.+)\)/,"$1"))}static rgb2hex(t){return(t=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===t.length?"#"+("0"+parseInt(t[1],10).toString(16)).slice(-2)+("0"+parseInt(t[2],10).toString(16)).slice(-2)+("0"+parseInt(t[3],10).toString(16)).slice(-2):""}shadeRGBColor(t,e){const s=e.split(","),i=t<0?0:255,a=t<0?-1*t:t,o=parseInt(s[0].slice(4),10),r=parseInt(s[1],10),n=parseInt(s[2],10);return"rgb("+(Math.round((i-o)*a)+o)+","+(Math.round((i-r)*a)+r)+","+(Math.round((i-n)*a)+n)+")"}shadeHexColor(t,e){const s=parseInt(e.slice(1),16),i=t<0?0:255,a=t<0?-1*t:t,o=s>>16,r=s>>8&255,n=255&s;return"#"+(16777216+65536*(Math.round((i-o)*a)+o)+256*(Math.round((i-r)*a)+r)+(Math.round((i-n)*a)+n)).toString(16).slice(1)}shadeColor(t,e){return xt.isColorHex(e)?this.shadeHexColor(t,e):this.shadeRGBColor(t,e)}static isColorHex(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(t)}static isCSSVariable(t){if("string"!=typeof t)return!1;const e=t.trim();return e.startsWith("var(")&&e.endsWith(")")}static getThemeColor(t){if(!xt.isCSSVariable(t)||_.isSSR())return t;const e=document.createElement("div");let s;e.style.cssText="position:fixed; left: -9999px; visibility:hidden;",e.style.color=t,document.body.appendChild(e);try{s=window.getComputedStyle(e).color}finally{e.parentNode&&e.parentNode.removeChild(e)}return s}static applyOpacityToColor(t,e){const s=Number(e);return Number.isFinite(s)?s<=0?"transparent":s>=1?t:`color-mix(in srgb, ${t} ${Math.round(100*s)}%, transparent)`:t}static getPolygonPos(t,e){const s=[],i=2*Math.PI/e;for(let a=0;a<e;a++){const o={};o.x=t*Math.sin(a*i),o.y=-t*Math.cos(a*i),s.push(o)}return s}static polarToCartesian(t,e,s,i){const a=(i-90)*Math.PI/180;return{x:t+s*Math.cos(a),y:e+s*Math.sin(a)}}static escapeString(t,e="x"){let s=t.toString().slice();return s=s.replace(/[` ~!@#$%^&*()|+=?;:'",.<>{}[\]\\/]/gi,e),s}static negToZero(t){return t<0?0:t}static moveIndexInArray(t,e,s){if(s>=t.length){let i=s-t.length+1;for(;i--;)t.push(void 0)}return t.splice(s,0,t.splice(e,1)[0]),t}static extractNumber(t){return parseFloat(t.replace(/[^\d.]*/g,""))}static findAncestor(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}static setELstyles(t,e){for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t.style.key=e[s])}static preciseAddition(t,e){const s=(String(t).split(".")[1]||"").length,i=(String(e).split(".")[1]||"").length,a=Math.pow(10,Math.max(s,i));return(Math.round(t*a)+Math.round(e*a))/a}static isNumber(t){return!isNaN(t)&&parseFloat(String(Number(t)))===t&&!isNaN(parseInt(t,10))}static isFloat(t){return Number(t)===t&&t%1!=0}static isMsEdge(){if(_.isSSR())return!1;const t=window.navigator.userAgent,e=t.indexOf("Edge/");return e>0&&parseInt(t.substring(e+5,t.indexOf(".",e)),10)}static getGCD(t,e,s=7){let i=Math.pow(10,s-Math.floor(Math.log10(Math.max(t,e))));for(i>1?(t=Math.round(Math.abs(t)*i),e=Math.round(Math.abs(e)*i)):i=1;e;){const a=e;e=t%e,t=a}return t/i}static getPrimeFactors(t){const e=[];let s=2;for(;t>=2;)t%s==0?(e.push(s),t/=s):s++;return e}static mod(t,e,s=7){const i=Math.pow(10,s-Math.floor(Math.log10(Math.max(t,e))));return(t=Math.round(Math.abs(t)*i))%(e=Math.round(Math.abs(e)*i))/i}};class K{constructor(t){this.w=t,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]}isValidDate(t){return"number"!=typeof t&&!isNaN(this.parseDate(t))}getTimeStamp(t){return Date.parse(t)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toISOString().substr(0,25)).getTime():new Date(t).getTime():t}getDate(t){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toUTCString()):new Date(t)}parseDate(t){const e=Date.parse(t);if(!isNaN(e))return this.getTimeStamp(t);let s=Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "));return s=this.getTimeStamp(s),s}parseDateWithTimezone(t){return Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "))}formatDate(t,e){const s=this.w.globals.locale,i=this.w.config.xaxis.labels.datetimeUTC,a=["\0",...s.months],o=["\x01",...s.shortMonths],r=["\x02",...s.days],n=["\x03",...s.shortDays];function c(C,L=2){let k=C+"";for(;k.length<L;)k="0"+k;return k}const l=i?t.getUTCFullYear():t.getFullYear();e=(e=(e=e.replace(/(^|[^\\])yyyy+/g,"$1"+l)).replace(/(^|[^\\])yy/g,"$1"+l.toString().substr(2,2))).replace(/(^|[^\\])y/g,"$1"+l);const h=(i?t.getUTCMonth():t.getMonth())+1;e=(e=(e=(e=e.replace(/(^|[^\\])MMMM+/g,"$1"+a[0])).replace(/(^|[^\\])MMM/g,"$1"+o[0])).replace(/(^|[^\\])MM/g,"$1"+c(h))).replace(/(^|[^\\])M/g,"$1"+h);const d=i?t.getUTCDate():t.getDate();e=(e=(e=(e=e.replace(/(^|[^\\])dddd+/g,"$1"+r[0])).replace(/(^|[^\\])ddd/g,"$1"+n[0])).replace(/(^|[^\\])dd/g,"$1"+c(d))).replace(/(^|[^\\])d/g,"$1"+d);const f=i?t.getUTCHours():t.getHours(),p=f>12?f-12:0===f?12:f;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+c(f))).replace(/(^|[^\\])H/g,"$1"+f)).replace(/(^|[^\\])hh+/g,"$1"+c(p))).replace(/(^|[^\\])h/g,"$1"+p);const g=i?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+c(g))).replace(/(^|[^\\])m/g,"$1"+g);const u=i?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+c(u))).replace(/(^|[^\\])s/g,"$1"+u);let b=i?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+c(b,3)),b=Math.round(b/10),e=e.replace(/(^|[^\\])ff/g,"$1"+c(b)),b=Math.round(b/10);const x=f<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+b)).replace(/(^|[^\\])TT+/g,"$1"+x)).replace(/(^|[^\\])T/g,"$1"+x.charAt(0));const w=x.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+w)).replace(/(^|[^\\])t/g,"$1"+w.charAt(0));let m=-t.getTimezoneOffset(),y=i||!m?"Z":m>0?"+":"-";if(!i){m=Math.abs(m);const L=m%60;y+=c(Math.floor(m/60))+":"+c(L)}e=e.replace(/(^|[^\\])K/g,"$1"+y);const v=(i?t.getUTCDay():t.getDay())+1;return(e=(e=(e=(e=e.replace(new RegExp(r[0],"g"),r[v])).replace(new RegExp(n[0],"g"),n[v])).replace(new RegExp(a[0],"g"),a[h])).replace(new RegExp(o[0],"g"),o[h])).replace(/\\(.)/g,"$1")}getTimeUnitsfromTimestamp(t,e){const s=this.w;void 0!==s.config.xaxis.min&&(t=s.config.xaxis.min),void 0!==s.config.xaxis.max&&(e=s.config.xaxis.max);const i=this.getDate(t),a=this.getDate(e),o=this.formatDate(i,"yyyy MM dd HH mm ss fff").split(" "),r=this.formatDate(a,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(o[6],10),maxMillisecond:parseInt(r[6],10),minSecond:parseInt(o[5],10),maxSecond:parseInt(r[5],10),minMinute:parseInt(o[4],10),maxMinute:parseInt(r[4],10),minHour:parseInt(o[3],10),maxHour:parseInt(r[3],10),minDate:parseInt(o[2],10),maxDate:parseInt(r[2],10),minMonth:
1parseInt(o[1],10)-1,maxMonth:parseInt(r[1],10)-1,minYear:parseInt(o[0],10),maxYear:parseInt(r[0],10)}}isLeapYear(t){return t%4==0&&t%100!=0||t%400==0}calculcateLastDaysOfMonth(t,e,s){return this.determineDaysOfMonths(t,e)-s}determineDaysOfYear(t){let e=365;return this.isLeapYear(t)&&(e=366),e}determineRemainingDaysOfYear(t,e,s){let i=this.daysCntOfYear[e]+s;return e>1&&this.isLeapYear(t)&&i++,i}determineDaysOfMonths(t,e){let s=30;switch(t=D.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(s=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:s=31}return s}}class bt{constructor(t){this.w=t,this.tooltipKeyFormat="dd MMM"}xLabelFormat(t,e,s,i){const a=this.w;if("datetime"===a.config.xaxis.type&&void 0===a.config.xaxis.labels.formatter&&void 0===a.config.tooltip.x.formatter){const o=new K(this.w);return o.formatDate(o.getDate(e),a.config.tooltip.x.format)}return t(e,s,i)}defaultGeneralFormatter(t){return Array.isArray(t)?t.map(e=>e):t}defaultYFormatter(t,e){const s=this.w;if(D.isNumber(t))if(0!==s.globals.yValueDecimal)t=t.toFixed(void 0!==e.decimalsInFloat?e.decimalsInFloat:s.globals.yValueDecimal);else{const i=t.toFixed(0);t=Number(i)===t?i:t.toFixed(1)}return t}setLabelFormatters(){const t=this.w,e=t.formatters;return e.xaxisTooltipFormatter=s=>this.defaultGeneralFormatter(s),e.ttKeyFormatter=s=>this.defaultGeneralFormatter(s),e.ttZFormatter=s=>s,e.legendFormatter=s=>this.defaultGeneralFormatter(s),e.xLabelFormatter=void 0!==t.config.xaxis.labels.formatter?t.config.xaxis.labels.formatter:s=>{if(D.isNumber(s)){if(!t.config.xaxis.convertedCatToNumeric&&"numeric"===t.config.xaxis.type){if(D.isNumber(t.config.xaxis.decimalsInFloat))return s.toFixed(t.config.xaxis.decimalsInFloat);{const i=t.globals.maxX-t.globals.minX;return s.toFixed(i>0&&i<100?1:0)}}return s.toFixed(t.globals.isBarHorizontal&&t.globals.maxY-t.globals.minYArr<4?1:0)}return s},e.ttKeyFormatter="function"==typeof t.config.tooltip.x.formatter?t.config.tooltip.x.formatter:e.xLabelFormatter,"function"==typeof t.config.xaxis.tooltip.formatter&&(e.xaxisTooltipFormatter=t.config.xaxis.tooltip.formatter),(Array.isArray(t.config.tooltip.y)||void 0!==t.config.tooltip.y.formatter)&&(e.ttVal=t.config.tooltip.y),void 0!==t.config.tooltip.z.formatter&&(e.ttZFormatter=t.config.tooltip.z.formatter),void 0!==t.config.legend.formatter&&(e.legendFormatter=t.config.legend.formatter),e.yLabelFormatters=[],t.config.yaxis.forEach((s,i)=>{e.yLabelFormatters[i]=void 0!==s.labels.formatter?s.labels.formatter:a=>t.globals.xyCharts?Array.isArray(a)?a.map(o=>this.defaultYFormatter(o,s)):this.defaultYFormatter(a,s):a}),t.globals}heatmapLabelFormatters(){const t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.seriesData.seriesNames.slice();const e=t.seriesData.seriesNames.reduce((s,i)=>s.length>i.length?s:i,0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}const Rt=({isTimeline:A,seriesIndex:t,dataPointIndex:e,y1:s,y2:i,w:a})=>{var o;let r=a.rangeData.seriesRangeStart[t][e],n=a.rangeData.seriesRangeEnd[t][e],c=a.labelData.labels[e],l=a.config.series[t].name?a.config.series[t].name:"";const h=a.formatters.ttKeyFormatter,d=a.config.tooltip.y.title.formatter,f={w:a,seriesIndex:t,dataPointIndex:e,start:r,end:n};"function"==typeof d&&(l=d(l,f)),null!=(o=a.config.series[t].data[e])&&o.x&&(c=a.config.series[t].data[e].x),A||"datetime"===a.config.xaxis.type&&(c=new bt(a).xLabelFormat(a.formatters.ttKeyFormatter,c,c,{i:void 0,dateFormatter:new K(a).formatDate,w:a})),"function"==typeof h&&(c=h(c,f)),Number.isFinite(s)&&Number.isFinite(i)&&(r=s,n=i);let p="",g="";const u=a.globals.colors[t];if(void 0===a.config.tooltip.x.formatter)if("datetime"===a.config.xaxis.type){const b=new K(a);p=b.formatDate(b.getDate(r),a.config.tooltip.x.format),g=b.formatDate(b.getDate(n),a.config.tooltip.x.format)}else p=r,g=n;else p=a.config.tooltip.x.formatter(r),g=a.config.tooltip.x.formatter(n);return{start:r,end:n,startVal:p,endVal:g,ylabel:c,color:u,seriesName:l}},Yt=A=>{let{color:t,seriesName:e,ylabel:s,start:i,end:a,seriesIndex:o,dataPointIndex:r}=A;const n=A.w.globals.tooltip.tooltipLabels.getFormatters(o);i=n.yLbFormatter(i),a=n.yLbFormatter(a);const c=n.yLbFormatter(A.w.seriesData.series[o][r]);let l="";const h=`<span class="value start-value">\n ${i}\n </span> <span class="separator">-</span> <span class="value end-value">\n ${a}\n </span>`;return l=A.w.globals.comboCharts?"rangeArea"===A.w.config.series[o].type||"rangeBar"===A.w.config.series[o].type?h:`<span>${c}</span>`:h,'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+t+'">'+(e||"")+'</span></div><div> <span class="category">'+s+": </span> "+l+" </div></div>"};class mt{constructor(t){this.opts=t}hideYAxis(){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}line(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}sparkline(t){return this.hideYAxis(),D.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}slope(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter:(t,e)=>null!==t?e.w.config.series[e.seriesIndex].name+": "+t:"",background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}}
1,markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}bar(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"square"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}funnel(){return this.hideYAxis(),H(I({},this.bar()),{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}candlestick(){return{stroke:{width:1},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:({seriesIndex:t,dataPointIndex:e,w:s})=>this._getBoxTooltip(s,t,e,["Open","High","","Low","Close"],"candlestick")},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}boxPlot(){return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:({seriesIndex:t,dataPointIndex:e,w:s})=>this._getBoxTooltip(s,t,e,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}rangeBar(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter(s,{seriesIndex:i,dataPointIndex:a,w:o}){const r=()=>o.rangeData.seriesRangeEnd[i][a]-o.rangeData.seriesRangeStart[i][a];return o.globals.comboCharts?"rangeBar"===o.config.series[i].type||"rangeArea"===o.config.series[i].type?r():s:r()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:s=>s.w.config.plotOptions&&s.w.config.plotOptions.bar&&s.w.config.plotOptions.bar.horizontal?(s=>{const{color:i,seriesName:a,ylabel:o,startVal:r,endVal:n}=Rt(H(I({},s),{isTimeline:!0}));return Yt(H(I({},s),{color:i,seriesName:a,ylabel:o,start:r,end:n}))})(s):(s=>{const{color:i,seriesName:a,ylabel:o,start:r,end:n}=Rt(s);return Yt(H(I({},s),{color:i,seriesName:a,ylabel:o,start:r,end:n}))})(s)},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}dumbbell(t){var e,s;return null!=(e=t.plotOptions.bar)&&e.barHeight||(t.plotOptions.bar.barHeight=2),null!=(s=t.plotOptions.bar)&&s.columnWidth||(t.plotOptions.bar.columnWidth=2),t}area(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}rangeArea(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:e=>(e=>{const{color:s,seriesName:i,ylabel:a,start:o,end:r}=Rt(e);return Yt(H(I({},e),{color:s,seriesName:i,ylabel:a,start:o,end:r}))})(e)}}}brush(t){return D.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}stacked100(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;const e=t.dataLabels.formatter;return t.yaxis.forEach((i,a)=>{t.yaxis[a].min=0,t.yaxis[a].max=100}),"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(i){return"number"==typeof i?i&&i.toFixed(0)+"%":i}),t}stackedBars(){const t=this.bar();return H(I({},t),{plotOptions:H(I({},t.plotOptions),{bar:H(I({},t.plotOptions.bar),{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}convertCatToNumeric(t){return t.xaxis.convertedCatToNumeric=!0,t}convertCatToNumericXaxis(t,e){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(a){return D.isNumber(a)?Math.floor(a):a};const s=t.xaxis.labels.formatter;let i=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return e&&e.length&&(i=e.map(a=>Array.isArray(a)?a:String(a))),i&&i.length&&(t.xaxis.labels.formatter=function(a){return D.isNumber(a)?s(i[Math.floor(a)-1]):s(a)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}bubble(){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}}}}scatter(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}heatmap(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}treemap(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}pie(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:t=>t.toFixed(1)+"%",style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}donut(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:t=>t.toFixed(1)+"%",style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}polarArea(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:t=>t.toFixed(1)+"%",enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}radar(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:t=>t,style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}radialBar(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}_getBoxTooltip(t,e,s,i,a){const n=t.candleData.seriesCandleM[e][s],h=t.config.series[e];return h.type&&h.type!==a?`<div class="apexcharts-custom-tooltip">\n ${h.name?h.name:"series-"+(e+1)}: <strong>${t.seriesData.series[e][s]}</strong>\n </div>`:`<div class="apexcharts-tooltip-box apexcharts-tooltip-${t.config.chart.type}"><div>${i[0]}: <span class="value">`+t.candleData.seriesCandleO[e][s]+`</span></div><div>${i[1]}: <span class="value">`+t.candleData.seriesCandleH[e][s]+"</span></div>"+(n?`<div>${i[2]}: <span class="value">`+n+"</span></div>":"")+`<div>${i[3]}: <span class="value">`+t.candleData.seriesCandleL[e][s]+`</span></div><div>${i[4]}: <span class="value">`+t.candleData.seriesCandleC[e][s]+"</span></div></div>"}}const Kt={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","Frid
1ay","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"}}};class ct{constructor(){this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}init(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"",locales:[Kt],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0,keyDown:void 0,keyUp:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,injectStyleSheet:!0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:!0,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}},accessibility:{enabled:!0,description:void 0,announcements:{enabled:!0},keyboard:{enabled:!0,navigation:{enabled:!0,wrapAround:!1}}},dataReducer:{enabled:!1,algorithm:"lttb",targetPoints:250,threshold:500}},parsing:{x:void 0,y:void 0},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}}
vendor: 4,450 bytes, line 1
1,heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0},seriesTitle:{show:!0,offsetY:1,offsetX:1,borderColor:"#000",borderWidth:1,borderRadius:2,style:{background:"rgba(0, 0, 0, 0.6)",color:"#fff",fontSize:"12px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:6,right:6,top:2,bottom:2}}}},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:t=>t},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:t=>t+"%"},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:t=>t.globals.seriesTotals.reduce((e,s)=>e+s,0)/t.seriesData.series.length+"%"}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:t=>t,onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:t=>t},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:t=>t},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:t=>t.globals.seriesTotals.reduce((e,s)=>e+s,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:t=>null!==t?t:"",textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",backgroundColor:void 0,borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],clusterGroupedSeries:!0,clusterGroupedSeriesOrientation:"vertical",labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3}}
1,noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten"}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken"}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:t=>t?t+": ":""}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65},accessibility:{colorBlindMode:""}}}}}class yt{constructor(t){this.opts=t}init({responsiveOverride:t}){var e,s,i,a,o,r,n,c,l,h;let d=this.opts;const f=new ct,p=new mt(d);this.chartType=d.chart.type,d=this.extendYAxis(d),d=this.extendAnnotations(d);let g=f.init(),u={};if(d&&"object"==typeof d){let x={};x=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(d.chart.type)?p[d.chart.type]():p.line(),null!=(s=null==(e=d.plotOptions)?void 0:e.bar)&&s.isFunnel&&(x=p.funnel()),d.chart.stacked&&"bar"===d.chart.type&&(x=p.stackedBars()),null!=(i=d.chart.brush)&&i.enabled&&(x=p.brush(x)),null!=(o=null==(a=d.plotOptions)?void 0:a.line)&&o.isSlopeChart&&(x=p.slope()),d.chart.stacked&&"100%"===d.chart.stackType&&(d=p.stacked100(d)),null!=(n=null==(r=d.plotOptions)?void 0:r.bar)&&n.isDumbbell&&(d=p.dumbbell(d)),this.checkForDarkTheme(_.getApex()),this.checkForDarkTheme(d),d.xaxis=d.xaxis||_.getApex().xaxis||{},t||(d.xaxis.convertedCatToNumeric=!1),d=this.checkForCatToNumericXAxis(this.chartType,x,d),(null!=(c=d.chart.sparkline)&&c.enabled||null!=(h=null==(l=_.getApex().chart)?void 0:l.sparkline)&&h.enabled)&&(x=p.sparkline(x)),u=D.extend(g,x)}const b=D.extend(u,_.getApex());return g=D.extend(b,d),g=this.handleUserInputErrors(g),g}checkForCatToNumericXAxis(t,e,s){var i,a;const o=new mt(s);return!(("bar"===t||"boxPlot"===t)&&(null==(a=null==(i=s.plotOptions)?void 0:i.bar)?void 0:a.horizontal))&&!("pie"===t||"polarArea"===t||"donut"===t||"radar"===t||"radialBar"===t||"heatmap"===t)&&"datetime"!==s.xaxis.type&&"numeric"!==s.xaxis.type&&"between"!==(s.xaxis.tickPlacement?s.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement)&&(s=o.convertCatToNumeric(s)),s}extendYAxis(t,e){const s=new ct;(typeof t.yaxis>"u"||!t.yaxis||Array.isArray(t.yaxis)&&0===t.yaxis.length)&&(t.yaxis={});const i=_.getApex();
1t.yaxis.constructor!==Array&&i.yaxis&&i.yaxis.constructor!==Array&&(t.yaxis=D.extend(t.yaxis,i.yaxis)),t.yaxis=t.yaxis.constructor!==Array?[D.extend(s.yAxis,t.yaxis)]:D.extendArray(t.yaxis,s.yAxis);let a=!1;t.yaxis.forEach(r=>{r.logarithmic&&(a=!0)});let o=t.series;return e&&!o&&(o=e.config.series),a&&o.length!==t.yaxis.length&&o.length&&(t.yaxis=o.map((r,n)=>{if(r.name||(o[n].name=`series-${n+1}`),t.yaxis[n])return t.yaxis[n].seriesName=o[n].name,t.yaxis[n];{const c=D.extend(s.yAxis,t.yaxis[0]);return c.show=!1,c}})),a&&o.length>1&&o.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),t}extendAnnotations(t){return typeof t.annotations>"u"&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),this.extendPointAnnotations(t)}extendYAxisAnnotations(t){const e=new ct;return t.annotations.yaxis=D.extendArray(typeof t.annotations.yaxis<"u"?t.annotations.yaxis:[],e.yAxisAnnotation),t}extendXAxisAnnotations(t){const e=new ct;return t.annotations.xaxis=D.extendArray(typeof t.annotations.xaxis<"u"?t.annotations.xaxis:[],e.xAxisAnnotation),t}extendPointAnnotations(t){const e=new ct;return t.annotations.points=D.extendArray(typeof t.annotations.points<"u"?t.annotations.points:[],e.pointAnnotation),t}checkForDarkTheme(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.theme.palette||(t.theme.palette="palette4"))}handleUserInputErrors(t){const e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return("bar"===e.chart.type||"rangeBar"===e.chart.type)&&e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),("candlestick"===e.chart.type||"boxPlot"===e.chart.type)&&e.yaxis[0].reversed&&(console.warn(`Reversed y-axis in ${e.chart.type} chart is not supported.`),e.yaxis[0].reversed=!1),e}}const Qt=[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],It=[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24];class te{initGlobalVars(t){t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleM=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesRange=[],t.seriesPercent=[],t.seriesGoals=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.seriesLog=[],t.seriesColors=[],t.stackedSeriesTotals=[],t.seriesXvalues=[],t.seriesYvalues=[],t.dataWasParsed=!1,t.originalSeries=null,t.maxValsInArrayIndex=0,t.yValueDecimal=0,t.allSeriesHasEqualX=!0,t.labels=[],t.hasXaxisGroups=!1,t.groups=[],t.barGroups=[],t.lineGroups=[],t.areaGroups=[],t.hasSeriesGroups=!1,t.seriesGroups=[],t.categoryLabels=[],t.timescaleLabels=[],t.noLabelsProvided=!1,t.isXNumeric=!1,t.skipLastTimelinelabel=!1,t.skipFirstTimelinelabel=!1,t.isDataXYZ=!1,t.isMultiLineX=!1,t.isMultipleYAxis=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialMaxX=-Number.MAX_VALUE,t.initialMinX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0,t.xTickAmount=0,t.multiAxisTickAmount=0,t.disableZoomIn=!1,t.disableZoomOut=!1,t.yLabelsCoords=[],t.yTitleCoords=[],t.barPadForNumericAxis=0,t.padHorizontal=0,t.rotateXLabels=!1,t.overlappingXLabels=!1,t.radialSize=0,t.barHeight=0,t.barWidth=0,t.animationEnded=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.lastWheelExecution=0,t.delayedElements=[],t.pointsArray=[],t.dataLabelsRects=[],t.lastDrawnDataLabelsIndexes=[],t.textRectsCache=new Map,t.domCache=new Map,t.dimensionCache={},t.cachedSelectors={},t.seriesNS||this._attachNamespaces(t)}_attachNamespaces(t){const e=(r,n,c=n)=>{Object.defineProperty(r,c,{get:()=>t[n],set(l){t[n]=l},enumerable:!0,configurable:!0})},s={};e(s,"series","data");for(const r of["seriesNames","seriesX","seriesZ","seriesXvalues","seriesYvalues","seriesGoals","seriesLog","seriesColors","seriesPercent","seriesTotals","stackedSeriesTotals","seriesCandleO","seriesCandleH","seriesCandleM","seriesCandleL","seriesCandleC","seriesRangeStart","seriesRangeEnd","seriesRange","seriesYAxisMap","seriesYAxisReverseMap","seriesGroups","barGroups","lineGroups","areaGroups","originalSeries","collapsedSeries","collapsedSeriesIndices","ancillaryCollapsedSeries","ancillaryCollapsedSeriesIndices","allSeriesCollapsed","risingSeries","previousPaths","ignoreYAxisIndexes","labels","categoryLabels","timescaleLabels","groups"])e(s,r);Object.defineProperty(t,"seriesNS",{value:s,writable:!1,enumerable:!1,
1configurable:!0});const i={};for(const r of["minX","maxX","initialMinX","initialMaxX","minY","maxY","minYArr","maxYArr","minZ","maxZ","minDate","maxDate","minXDiff","xRange","yRange","zRange","xAxisScale","yAxisScale","xAxisTicksPositions","xTickAmount","multiAxisTickAmount","dataPoints","maxValsInArrayIndex","isXNumeric","isMultipleYAxis","isMultiLineX","isDataXYZ","dataFormatXNumeric","allSeriesHasEqualX","hasNullValues","dataWasParsed","hasXaxisGroups","hasSeriesGroups","skipFirstTimelinelabel","skipLastTimelinelabel","yValueDecimal","invalidLogScale","noLabelsProvided"])e(i,r);Object.defineProperty(t,"axes",{value:i,writable:!1,enumerable:!1,configurable:!0});const a={};for(const r of["svgWidth","svgHeight","gridWidth","gridHeight","translateX","translateY","translateXAxisX","translateXAxisY","translateYAxisX","xAxisLabelsHeight","xAxisGroupLabelsHeight","xAxisLabelsWidth","yAxisLabelsWidth","yAxisWidths","yLabelsCoords","yTitleCoords","padHorizontal","barPadForNumericAxis","rotateXLabels","scaleX","scaleY","radialSize","defaultLabels","overlappingXLabels"])e(a,r);Object.defineProperty(t,"layout",{value:a,writable:!1,enumerable:!1,configurable:!0});const o={};for(const r of["domCache","dimensionCache","cachedSelectors","textRectsCache","pointsArray","dataLabelsRects","lastDrawnDataLabelsIndexes","delayedElements","resizeTimer","selectionResizeTimer","resizeObserver"])e(o,r);Object.defineProperty(t,"cache",{value:o,writable:!1,enumerable:!1,configurable:!0})}globalVars(t){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0},LINE_HEIGHT_RATIO:1.618,axisCharts:!0,isSlopeChart:t.plotOptions.line.isSlopeChart,comboCharts:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],ignoreYAxisIndexes:[],isDirty:!1,isExecCalled:!1,dataChanged:!1,resized:!1,invalidLogScale:!1,hasNullValues:!1,columnSeries:null,yaxis:null,total:0,shouldAnimate:!0,previousPaths:[],svgWidth:0,svgHeight:0,defaultLabels:!1,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateYAxisX:[],yAxisWidths:[],tooltip:null,resizeObserver:null,locale:{},memory:{methodsToExec:[]},niceScaleAllowedMagMsd:Qt,niceScaleDefaultTicks:It,seriesYAxisMap:[],seriesYAxisReverseMap:[],noData:!1}}init(t){const e=this.globalVars(t);return this.initGlobalVars(e),e.initialConfig=D.extend({},t),e.initialSeries=D.clone(t.series),e.lastXAxis=D.clone(e.initialConfig.xaxis),e.lastYAxis=D.clone(e.initialConfig.yaxis),e}}class Ye{constructor(t){this.opts=t}init(){const t=new yt(this.opts).init({responsiveOverride:!1}),e=(new te).init(t),s={config:t,globals:e,dom:{},interact:{zoomEnabled:"zoom"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:"pan"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.pan,selectionEnabled:"selection"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.selection,zoomed:!1,selection:void 0,visibleXRange:void 0,selectedDataPoints:[],mousedown:!1,clientX:null,clientY:null,lastClientPosition:{},lastWheelExecution:0,capturedSeriesIndex:-1,capturedDataPointIndex:-1,disableZoomIn:!1,disableZoomOut:!1,isTouchDevice:!!_.isBrowser()&&("ontouchstart"in window||navigator.maxTouchPoints>0)},formatters:{xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,legendFormatter:void 0},candleData:{seriesCandleO:[],seriesCandleH:[],seriesCandleM:[],seriesCandleL:[],seriesCandleC:[]},rangeData:{seriesRangeStart:[],seriesRangeEnd:[],seriesRange:[]},labelData:{labels:[],categoryLabels:[],timescaleLabels:[],hasXaxisGroups:!1,groups:[],seriesGroups:[]},axisFlags:{isXNumeric:!1,dataFormatXNumeric:!1,isDataXYZ:!1,isRangeData:!1,isRangeBar:!1,isMultiLineX:!1,noLabelsProvided:!1,dataWasParsed:!1},seriesData:{series:[],seriesNames:[],seriesX:[],seriesZ:[],seriesColors:[],seriesGoals:[],stackedSeriesTotals:[],stackedSeriesTotalsByGroups:[]},layout:{gridHeight:0,gridWidth:0,translateX:0,translateY:0,translateXAxisX:0,translateXAxisY:0,rotateXLabels:!1,xAxisHeight:0,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yLabelsCoords:[],yTitleCoords:[]}};Object.defineProperty(e,"dom",{get:()=>s.dom,set(i){s.dom=i}
1,enumerable:!1,configurable:!0});for(const i of["xLabelFormatter","yLabelFormatters","xaxisTooltipFormatter","ttKeyFormatter","ttVal","ttZFormatter","legendFormatter"])Object.defineProperty(e,i,{get:()=>s.formatters[i],set(a){s.formatters[i]=a},enumerable:!1,configurable:!0});for(const i of["zoomEnabled","panEnabled","selectionEnabled","zoomed","selection","visibleXRange","selectedDataPoints","mousedown","clientX","clientY","lastClientPosition","lastWheelExecution","capturedSeriesIndex","capturedDataPointIndex","disableZoomIn","disableZoomOut","isTouchDevice"])Object.defineProperty(e,i,{get:()=>s.interact[i],set(a){s.interact[i]=a},enumerable:!1,configurable:!0});for(const i of["gridHeight","gridWidth","translateX","translateY","translateXAxisX","translateXAxisY","rotateXLabels","xAxisHeight","xAxisLabelsHeight","xAxisGroupLabelsHeight","xAxisLabelsWidth","yLabelsCoords","yTitleCoords"])Object.defineProperty(e,i,{get:()=>s.layout[i],set(a){s.layout[i]=a},enumerable:!1,configurable:!0});for(const i of["series","seriesNames","seriesX","seriesZ","seriesColors","seriesGoals","stackedSeriesTotals","stackedSeriesTotalsByGroups"])Object.defineProperty(e,i,{get:()=>s.seriesData[i],set(a){s.seriesData[i]=a},enumerable:!1,configurable:!0});for(const i of["isXNumeric","dataFormatXNumeric","isDataXYZ","isRangeData","isRangeBar","isMultiLineX","noLabelsProvided","dataWasParsed"])Object.defineProperty(e,i,{get:()=>s.axisFlags[i],set(a){s.axisFlags[i]=a},enumerable:!1,configurable:!0});for(const i of["labels","categoryLabels","timescaleLabels","hasXaxisGroups","groups","seriesGroups"])Object.defineProperty(e,i,{get:()=>s.labelData[i],set(a){s.labelData[i]=a},enumerable:!1,configurable:!0});for(const i of["seriesRangeStart","seriesRangeEnd","seriesRange"])Object.defineProperty(e,i,{get:()=>s.rangeData[i],set(a){s.rangeData[i]=a},enumerable:!1,configurable:!0});for(const i of["seriesCandleO","seriesCandleH","seriesCandleM","seriesCandleL","seriesCandleC"])Object.defineProperty(e,i,{get:()=>s.candleData[i],set(a){s.candleData[i]=a},enumerable:!1,configurable:!0});return s}}class q{constructor(t){this.w=t}static checkComboSeries(t,e){let s=!1,i=0,a=0;return void 0===e&&(e="line"),t.length&&typeof t[0].type<"u"&&t.forEach(o=>{("bar"===o.type||"column"===o.type||"candlestick"===o.type||"boxPlot"===o.type)&&i++,typeof o.type<"u"&&o.type!==e&&a++}),a>0&&(s=!0),{comboBarCount:i,comboCharts:s}}getStackedSeriesTotals(t=[]){const e=this.w,s=[];if(0===e.seriesData.series.length)return s;for(let i=0;i<e.seriesData.series[e.globals.maxValsInArrayIndex].length;i++){let a=0;for(let o=0;o<e.seriesData.series.length;o++)typeof e.seriesData.series[o][i]<"u"&&-1===t.indexOf(o)&&(a+=e.seriesData.series[o][i]);s.push(a)}return s}getSeriesTotalByIndex(t=null){return null===t?this.w.config.series.reduce((e,s)=>e+s,0):this.w.seriesData.series[t].reduce((e,s)=>e+s,0)}getStackedSeriesTotalsByGroups(){const t=this.w,e=[];return t.labelData.seriesGroups.forEach(s=>{const i=[];t.config.series.forEach((o,r)=>{s.indexOf(t.seriesData.seriesNames[r])>-1&&i.push(r)});const a=t.seriesData.series.map((o,r)=>-1===i.indexOf(r)?r:-1).filter(o=>-1!==o);e.push(this.getStackedSeriesTotals(a))}),e}setSeriesYAxisMappings(){const t=this.w.globals,e=this.w.config;let s=[];const i=[],a=[],o=this.w.seriesData.series.length>e.yaxis.length||e.yaxis.some(c=>Array.isArray(c.seriesName));e.series.forEach((c,l)=>{a.push(l),i.push(null)}),e.yaxis.forEach((c,l)=>{s[l]=[]});const r=[];e.yaxis.forEach((c,l)=>{let h=!1;if(c.seriesName){let d=[];Array.isArray(c.seriesName)?d=c.seriesName:d.push(c.seriesName),d.forEach(f=>{e.series.forEach((p,g)=>{if(p.name===f){let u=g;l===g||o?!o||a.indexOf(g)>-1?s[l].push([l,g]):console.warn("Series '"+p.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(s[g].push([g,l]),u=l),h=!0,u=a.indexOf(u),-1!==u&&a.splice(u,1)}})})}h||r.push(l)}),s=s.map(c=>{const l=[];return c.forEach(h=>{i[h[1]]=h[0],l.push(h[1])}),l});let n=e.yaxis.length-1;for(let c=0;c<r.length&&(n=r[c],s[n]=[],a);c++){const l=a[0];a.shift(),s[n].push(l),i[l]=n}
1a.forEach(c=>{s[n].push(c),i[c]=n}),t.seriesYAxisMap=s.map(c=>c),t.seriesYAxisReverseMap=i.map(c=>c),t.seriesYAxisMap.forEach((c,l)=>{c.forEach(h=>{e.series[h]&&void 0===e.series[h].group&&(e.series[h].group="apexcharts-axis-".concat(l.toString()))})})}isSeriesNull(t=null){let e=[];return e=null===t?this.w.config.series.filter(s=>null!==s):this.w.config.series[t].data.filter(s=>null!==s),0===e.length}seriesHaveSameValues(t){return this.w.seriesData.series[t].every((e,s,i)=>e===i[0])}getCategoryLabels(t){const e=this.w;let s=t.slice();return e.config.xaxis.convertedCatToNumeric&&(s=t.map(i=>e.config.xaxis.labels.formatter(i-e.globals.minX+1))),s}getLargestSeries(){const t=this.w;t.globals.maxValsInArrayIndex=t.seriesData.series.map(e=>e.length).indexOf(Math.max.apply(Math,t.seriesData.series.map(e=>e.length)))}getLargestMarkerSize(){const t=this.w;let e=0;return t.globals.markers.size.forEach(s=>{e=Math.max(e,s)}),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach(s=>{e=Math.max(e,s.size)}),e>0&&(t.config.markers.hover.size>0?e=t.config.markers.hover.size:e+=t.config.markers.hover.sizeOffset),t.globals.markers.largestSize=e,e}getSeriesTotals(){const t=this.w;t.globals.seriesTotals=t.seriesData.series.map(e=>{let s=0;if(Array.isArray(e))for(let i=0;i<e.length;i++)s+=e[i];else s+=e;return s})}getSeriesTotalsXRange(t,e){const s=this.w;return s.seriesData.series.map((a,o)=>{let r=0;for(let n=0;n<a.length;n++)s.seriesData.seriesX[o][n]>t&&s.seriesData.seriesX[o][n]<e&&(r+=a[n]);return r})}getPercentSeries(){const t=this.w;t.globals.seriesPercent=t.seriesData.series.map(e=>{const s=[];if(Array.isArray(e))for(let i=0;i<e.length;i++){const a=t.seriesData.stackedSeriesTotals[i];let o=0;a&&(o=100*e[i]/a),s.push(o)}else{const i=t.globals.seriesTotals.reduce((o,r)=>o+r,0);s.push(100*e/i)}return s})}getCalculatedRatios(){const t=this.w,e=t.globals,s=[];let i=0,a=0,o=0,r=0,n=[],c=.1,l=0;if(e.yRange=[],e.isMultipleYAxis)for(let h=0;h<e.minYArr.length;h++)e.yRange.push(Math.abs(e.minYArr[h]-e.maxYArr[h])),n.push(0);else e.yRange.push(Math.abs(e.minY-e.maxY));e.xRange=Math.abs(e.maxX-e.minX),e.zRange=Math.abs(e.maxZ-e.minZ);for(let h=0;h<e.yRange.length;h++)s.push(e.yRange[h]/this.w.layout.gridHeight);if(a=e.xRange/this.w.layout.gridWidth,i=e.yRange/this.w.layout.gridWidth,o=e.xRange/this.w.layout.gridHeight,r=e.zRange/this.w.layout.gridHeight*16,r||(r=1),e.minY!==Number.MIN_VALUE&&0!==Math.abs(e.minY)&&(e.hasNegs=!0),t.globals.seriesYAxisReverseMap.length>0){const h=(d,f)=>{const p=t.config.yaxis[t.globals.seriesYAxisReverseMap[f]],g=d<0?-1:1;return d=Math.abs(d),p.logarithmic&&(d=this.getBaseLog(p.logBase,d)),-g*d/s[f]};if(e.isMultipleYAxis){n=[];for(let d=0;d<s.length;d++)n.push(h(e.minYArr[d],d))}else n=[],n.push(h(e.minY,0)),e.minY!==Number.MIN_VALUE&&0!==Math.abs(e.minY)&&(c=-e.minY/i,l=e.minX/a)}else n=[],n.push(0),c=0,l=0;return{yRatio:s,invertedYRatio:i,zRatio:r,xRatio:a,invertedXRatio:o,baseLineInvertedY:c,baseLineY:n,baseLineX:l}}getLogSeries(t){const e=this.w;return e.globals.seriesLog=t.map((s,i)=>{const a=e.globals.seriesYAxisReverseMap[i];return e.config.yaxis[a]&&e.config.yaxis[a].logarithmic?s.map(o=>null===o?null:this.getLogVal(e.config.yaxis[a].logBase,o,i)):s}),e.globals.invalidLogScale?t:e.globals.seriesLog}getLogValAtSeriesIndex(t,e){if(null===t)return null;const s=this.w,i=s.globals.seriesYAxisReverseMap[e];return s.config.yaxis[i]&&s.config.yaxis[i].logarithmic?this.getLogVal(s.config.yaxis[i].logBase,t,e):t}getBaseLog(t,e){return Math.log(e)/Math.log(t)}getLogVal(t,e,s){if(e<=0)return 0;const i=this.w,a=0===i.globals.minYArr[s]?-1:this.getBaseLog(t,i.globals.minYArr[s]),r=(0===i.globals.maxYArr[s]?0:this.getBaseLog(t,i.globals.maxYArr[s]))-a;return e<1?e/r:(this.getBaseLog(t,e)-a)/r}getLogYRatios(t){const e=this.w,s=this.w.globals,i=s;return i.yLogRatio=t.slice(),i.logYRange=s.yRange.map((a,o)=>{const r=e.globals.seriesYAxisReverseMap[o];if(e.config.yaxis[r]&&this.w.config.yaxis[r].logarithmic){let n=-Number.MAX_VALUE,c=Number.MIN_VALUE,l=1;return s.seriesLog.forEach((h,d)=>{h.forEach(f=>{e.config.yaxis[d]&&e.config.yaxis[d].logarithmic&&(n=Math.max(f,n),c=Math.min(f,c))})}),l=Math.pow(s.yRange[o],Math.abs(c-n)/s.yRange[o]),i.yLogRatio[o]=l/this.w.layout.gridHeight,l}}),i.invalidLogScale?t.slice():i.yLogRatio}static extendArrayProps(t,e,s){var i,a;return e?.yaxis&&(e=t.extendYAxis(e,s)),e?.annotations&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),null!=(i=e?.annotations)&&i.xaxis&&(e=t.extendXAxisAnnotations(e)),null!=(a=e?.annotations)&&a.points&&(e=t.extendPointAnnotations(e))),e}drawSeriesByGroup(t,e,s,i){const a=this.w,o=[];return t.series.length>0&&e.forEach(r=>{const n=[],c=[];
1t.i.forEach((l,h)=>{a.config.series[l].group===r&&(n.push(t.series[h]),c.push(l))}),n.length>0&&o.push(i.draw(n,s,c))}),o}}class ft{constructor(t,e){this.w=t,this.ctx=e}animateLine(t,e,s,i){t.attr(e).animate(i).attr(s)}animateMarker(t,e,s,i){t.attr({opacity:0}).animate(e).attr({opacity:1}).after(()=>{i()})}animateRect(t,e,s,i,a){t.attr(e).animate(i).attr(s).after(()=>a())}animatePathsGradually(t){const{el:e,realIndex:s,j:i,fill:a,pathFrom:o,pathTo:r,speed:n,delay:c}=t,h=this.w;let d=0;h.config.chart.animations.animateGradually.enabled&&(d=h.config.chart.animations.animateGradually.delay),h.config.chart.animations.dynamicAnimation.enabled&&h.globals.dataChanged&&"bar"!==h.config.chart.type&&(d=0),this.morphSVG(e,s,i,"line"!==h.config.chart.type||h.globals.comboCharts?a:"stroke",o,r,n,c*d)}showDelayedElements(){this.w.globals.delayedElements.forEach(t=>{const e=t.el;e.classList.remove("apexcharts-element-hidden"),e.classList.add("apexcharts-hidden-element-shown")})}animationCompleted(t){const e=this.w;e.globals.animationEnded||(e.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof e.config.chart.events.animationEnd&&e.config.chart.events.animationEnd(this.ctx,{el:t,w:e}))}morphSVG(t,e,s,i,a,o,r,n){const c=this.w;a||(a=t.attr("pathFrom")),o||(o=t.attr("pathTo"));const l=()=>("radar"===c.config.chart.type&&(r=1),`M 0 ${c.layout.gridHeight}`);(!a||a.indexOf("undefined")>-1||a.indexOf("NaN")>-1)&&(a=l()),(!o.trim()||o.indexOf("undefined")>-1||o.indexOf("NaN")>-1)&&(o=l()),c.globals.shouldAnimate||(r=1),t.plot(a).animate(1,n).plot(a).animate(r,n).plot(o).after(()=>{D.isNumber(s)?s===c.seriesData.series[c.globals.maxValsInArrayIndex].length-2&&c.globals.shouldAnimate&&this.animationCompleted(t):"none"!==i&&c.globals.shouldAnimate&&(!c.globals.comboCharts&&e===c.seriesData.series.length-1||c.globals.comboCharts)&&this.animationCompleted(t),this.showDelayedElements()})}}class J{constructor(t){this.w=t}getDefaultFilter(t,e){const s=this.w;t.unfilter&&t.unfilter(!0),s.config.chart.dropShadow.enabled&&this.dropShadow(t,s.config.chart.dropShadow,e)}applyFilter(t,e,s){var i,a,o;const r=this.w;if(t.unfilter&&t.unfilter(!0),"none"===s)return void this.getDefaultFilter(t,e);const n=r.config.chart.dropShadow,c="lighten"===s?2:.3;t.filterWith&&(t.filterWith(l=>{l.colorMatrix({type:"matrix",values:`\n ${c} 0 0 0 0\n 0 ${c} 0 0 0\n 0 0 ${c} 0 0\n 0 0 0 1 0\n `,in:"SourceGraphic",result:"brightness"}),n.enabled&&this.addShadow(l,e,n,"brightness")}),n.noUserSpaceOnUse||null==(a=null==(i=t.filterer())?void 0:i.node)||a.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null==(o=t.filterer())?void 0:o.node))}addShadow(t,e,s,i){var a;const o=this.w;let{blur:r,top:n,left:c,color:l,opacity:h}=s;if(l=Array.isArray(l)?l[e]:l,(null==(a=o.config.chart.dropShadow.enabledOnSeries)?void 0:a.length)>0&&-1===o.config.chart.dropShadow.enabledOnSeries.indexOf(e))return t;t.offset({in:i,dx:c,dy:n,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:r,result:"blur"}),t.flood({"flood-color":l,"flood-opacity":h,result:"flood"}),t.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),t.merge(["shadow",i])}dropShadow(t,e,s=0){var i,a,o,r,n;const c=this.w;return t.unfilter&&t.unfilter(!0),D.isMsEdge()&&"radialBar"===c.config.chart.type||(null==(i=c.config.chart.dropShadow.enabledOnSeries)?void 0:i.length)>0&&-1===(null==(a=c.config.chart.dropShadow.enabledOnSeries)?void 0:a.indexOf(s))||t.filterWith&&(t.filterWith(l=>{this.addShadow(l,s,e,"SourceGraphic")}),e.noUserSpaceOnUse||null==(r=null==(o=t.filterer())?void 0:o.node)||r.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null==(n=t.filterer())?void 0:n.node)),t}setSelectionFilter(t,e,s){const i=this.w;if(typeof i.interact.selectedDataPoints[e]<"u"&&i.interact.selectedDataPoints[e].indexOf(s)>-1){t.node.setAttribute("selected",!0);const a=i.config.states.active.filter;"none"!==a&&this.applyFilter(t,e,a.type)}}_scaleFilterSize(t){t&&(s=>{for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&t.setAttribute(i,s[i])})({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}class E{constructor(t,e=null){this.w=t,this.ctx=e}roundPathCorners(t,e){function s(k,S,T){var P=S.x-k.x,M=S.y-k.y,F=Math.sqrt(P*P+M*M);return i(k,S,Math.min(1,T/F))}function i(k,S,T){return{x:k.x+(S.x-k.x)*T,y:k.y+(S.y-k.y)*T}}function a(k,S){k.length>2&&(k[k.length-2]=S.x,k[k.length-1]=S.y)}function o(k){return{x:parseFloat(k[k.length-2]),y:parseFloat(k[k.length-1])}}t.indexOf("NaN")>-1&&(t="");var n=t.split(/[,\s]/).reduce(function(k,S){var T=S.match(/^([a-zA-Z])(.+)/);return T?(k.push(T[1]),k.push(T[2])):k.push(S),k},[]).reduce(function(k,S){return parseFloat(S)==S&&k.length?k[k.length-1].push(S):k.push([S]),k},[]),c=[];if(n.length>1){var l=o(n[0]),h=null;"Z"==n[n.length-1][0]&&n[0].length>2&&(n[n.length-1]=h=["L",l.x,l.y]),c.push(n[0]);for(var d=1;d<n.length;d++){var f=c[c.length-1],p=n[d],g=p==h?n[1]:n[d+1];if(g&&f&&f.length>2&&"L"==p[0]&&g.length>2&&"L"==g[0]){var w,m,u=o(f),b=o(p),x=o(g);w=s(b,u,e),m=s(b,x,e),a(p,w),p.origPoint=b,c.push(p);var y=i(w,b,.5),v=i(b,m,.5),C=["C",y.x,y.y,v.x,v.y,m.x,m.y];C.origPoint=b,c.push(C)}else c.push(p)}if(h){var L=o(c[c.length-1]);c.push(["Z"]),a(c[0],L)}}else c=n;return c.reduce(function(k,S){return k+S.join(" ")+" "},"")}drawLine(t,e,s,i,a="#a8a8a8",o=0,r=null,n="butt"){return this.w.dom.Paper.line().attr({x1:t,y1:e,x2:s,y2:i,stroke:a,"stroke-dasharray":o,"stroke-width":r,"stroke-linecap":n})}drawRect(t=0,e=0,s=0,i=0,a=0,o="#fefefe",r=1,n=null,c=null,l=0){const d=this.w.dom.Paper.rect();return d.attr({x:t,y:e,width:s>0?s:0,height:i>0?i:0,rx:a,ry:a,opacity:r,"stroke-width":null!==n?n:0,stroke:null!==c?c:"none","stroke-dasharray":l}),d.node.setAttribute("fill",o),d}drawPolygon(t,e="#e1e1e1",s=1,i="none"){return this.w.dom.Paper.polygon(t).attr({fill:i,stroke:e,"stroke-width":s})}drawCircle(t,e=null){t<0&&(t=0);const i=this.w.dom.Paper.circle(2*t);return null!==e&&i.attr(e),i}drawPath({d:t="",stroke:e="#a8a8a8",strokeWidth:s=1,fill:i,fillOpacity:a=1,strokeOpacity:o=1,classes:r,strokeLinecap:n=null,strokeDashArray:c=0}){const l=this.w;return null===n&&(n=l.config.stroke.lineCap),(t.indexOf("undefined")>-1||t.indexOf("NaN")>-1)&&(t=`M 0 ${l.layout.gridHeight}`),l.dom.Paper.path(t).attr({fill:i,"fill-opacity":a,stroke:e,"stroke-opacity":o,"stroke-linecap":n,"stroke-width":s,"stroke-dasharray":c,class:r})}group(t=null){const s=this.w.dom.Paper.group();return null!==t&&s.attr(t),s}move(t,e){return["M",t,e].join(" ")}line(t,e,s=null){return"H"===s?[" H",t].join(" "):"V"===s?[" V",e].join(" "):[" L",t,e].join(" ")}curve(t,e,s,i,a,o){return["C",t,e,s,i,a,o].join(" ")}quadraticCurve(t,e,s,i){return["Q",t,e,s,i].join(" ")}arc(t,e,s,i,a,o,r,n=!1){let c="A";return n&&(c="a"),[c,t,e,s,i,a,o,r].join(" ")}renderPaths({j:t,realIndex:e,pathFrom:s,pathTo:i,stroke:a,strokeWidth:o,strokeLinecap:r,fill:n,animationDelay:c,initialSpeed:l,dataChangeSpeed:h,className:d,chartType:f,shouldClipToGrid:p=!0,bindEventsOnPaths:g=!0,drawShadow:u=!0}){const b=this.w,x=new J(this.w),w=new ft(this.w,void 0),m=this.w.config.chart.animations.enabled,y=m&&this.w.config.chart.animations.dynamicAnimation.enabled;if(s&&s.startsWith("M 0 0")&&i){const P=i.match(/^M\s+[\d.-]+\s+[\d.-]+/);P&&(s=s.replace(/^M\s+0\s+0/,P[0]))}let v;const C=!!(m&&!b.globals.resized||y&&b.globals.dataChanged&&b.globals.shouldAnimate);C?v=s:(v=i,b.globals.animationEnded=!0);const L=b.config.stroke.dashArray;let k=0;k=Array.isArray(L)?L[e]:b.config.stroke.dashArray;const S=this.drawPath({d:v,stroke:a,strokeWidth:o,fill:n,fillOpacity:1,classes:d,strokeLinecap:r,strokeDashArray:k});S.attr("index",e),p&&S.attr("bar"===f&&!b.globals.isBarHorizontal||b.globals.comboCharts?{"clip-path":`url(#gridRectBarMask${b.globals.cuid})`}:{"clip-path":`url(#gridRectMask${b.globals.cuid})`}),b.config.chart.dropShadow.enabled&&u&&x.dropShadow(S,b.config.chart.dropShadow,e),g&&(S.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,S)),S.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,S)),S.node.addEventListener("mousedown",this.pathMouseDown.bind(this,S))),S.attr({pathTo:i,pathFrom:s});const T={el:S,j:t,realIndex:e,pathFrom:s,pathTo:i,fill:n,strokeWidth:o,delay:c};return!m||b.globals.resized||b.globals.dataChanged?(b.globals.resized||!b.globals.dataChanged)&&w.showDelayedElements():w.animatePathsGradually(H(I({},T),{speed:l})),b.globals.dataChanged&&y&&C&&w.animatePathsGradually(H(I({},T),{speed:h}
1)),S}drawPattern(t,e,s,i="#a8a8a8",a=0){return this.w.dom.Paper.pattern(e,s,n=>{"horizontalLines"===t?n.line(0,0,s,0).stroke({color:i,width:a+1}):"verticalLines"===t?n.line(0,0,0,e).stroke({color:i,width:a+1}):"slantedLines"===t?n.line(0,0,e,s).stroke({color:i,width:a}):"squares"===t?n.rect(e,s).fill("none").stroke({color:i,width:a}):"circles"===t&&n.circle(e).fill("none").stroke({color:i,width:a})})}drawGradient(t,e,s,i,a,o=null,r=null,n=[],c=0){const l=this.w;let h;e.length<9&&0===e.indexOf("#")&&(e=D.hexToRgba(e,i)),s.length<9&&0===s.indexOf("#")&&(s=D.hexToRgba(s,a));let d=0,f=1,p=1,g=null;null!==r&&(d=typeof r[0]<"u"?r[0]/100:0,f=typeof r[1]<"u"?r[1]/100:1,p=typeof r[2]<"u"?r[2]/100:1,g=typeof r[3]<"u"?r[3]/100:null);const u="donut"===l.config.chart.type||"pie"===l.config.chart.type||"polarArea"===l.config.chart.type||"bubble"===l.config.chart.type;return h=l.dom.Paper.gradient(u?"radial":"linear",n&&0!==n.length?b=>{(Array.isArray(n[c])?n[c]:n).forEach(w=>{b.stop(w.offset/100,w.color,w.opacity)})}:b=>{b.stop(d,e,i),b.stop(f,s,a),b.stop(p,s,a),null!==g&&b.stop(g,e,i)}),u?h.attr("bubble"!==l.config.chart.type?{gradientUnits:"userSpaceOnUse",cx:l.layout.gridWidth/2,cy:l.layout.gridHeight/2,r:o}:{cx:.5,cy:.5,r:.8,fx:.2,fy:.2}):"vertical"===t?h.from(0,0).to(0,1):"diagonal"===t?h.from(0,0).to(1,1):"horizontal"===t?h.from(0,1).to(1,1):"diagonal2"===t&&h.from(1,0).to(0,1),h}getTextBasedOnMaxWidth({text:t,maxWidth:e,fontSize:s,fontFamily:i}){const a=this.getTextRects(t,s,i,""),r=Math.floor(e/(a.width/t.length));return e<a.width?t.slice(0,r-3)+"...":t}drawText({x:t,y:e,text:s,textAnchor:i,fontSize:a,fontFamily:o,fontWeight:r,foreColor:n,opacity:c,maxWidth:l,cssClass:h="",isPlainText:d=!0,dominantBaseline:f="auto"}){const p=this.w;typeof s>"u"&&(s="");let g=s;i||(i="start"),(!n||!n.length)&&(n=p.config.chart.foreColor),r=r||"regular";const u={maxWidth:l,fontSize:a=a||"11px",fontFamily:o=o||p.config.chart.fontFamily};let b;return Array.isArray(s)?b=p.dom.Paper.text(x=>{for(let w=0;w<s.length;w++)g=s[w],l&&(g=this.getTextBasedOnMaxWidth(I({text:s[w]},u))),0===w?x.tspan(g):x.tspan(g).newLine()}):(l&&(g=this.getTextBasedOnMaxWidth(I({text:s},u))),b=d?p.dom.Paper.plain(s):p.dom.Paper.text(x=>x.tspan(g))),b.attr({x:t,y:e,"text-anchor":i,"dominant-baseline":f,"font-size":a,"font-family":o,"font-weight":r,fill:n,class:"apexcharts-text "+h}),b.node.style.fontFamily=o,b.node.style.opacity=c,b}getMarkerPath(t,e,s,i){let a="";switch(s){case"cross":a=`M ${t-(i/=1.4)} ${e-i} L ${t+i} ${e+i} M ${t-i} ${e+i} L ${t+i} ${e-i}`;break;case"plus":a=`M ${t-(i/=1.12)} ${e} L ${t+i} ${e} M ${t} ${e-i} L ${t} ${e+i}`;break;case"star":case"sparkle":{let o=5;i*=1.15,"sparkle"===s&&(i/=1.1,o=4);const r=Math.PI/o;for(let n=0;n<=2*o;n++){const c=n*r,l=n%2==0?i:i/2;a+=(0===n?"M":"L")+(t+l*Math.sin(c))+","+(e-l*Math.cos(c))}a+="Z";break}case"triangle":a=`M ${t} ${e-i} \n L ${t+i} ${e+i} \n L ${t-i} ${e+i} \n Z`;break;case"square":case"rect":a=`M ${t-(i/=1.125)} ${e-i} \n L ${t+i} ${e-i} \n L ${t+i} ${e+i} \n L ${t-i} ${e+i} \n Z`;break;case"diamond":a=`M ${t} ${e-(i*=1.05)} \n L ${t+i} ${e} \n L ${t} ${e+i} \n L ${t-i} ${e} \n Z`;break;case"line":a=`M ${t-(i/=1.1)} ${e} \n L ${t+i} ${e}`;break;default:a=`M ${t}, ${e} \n m -${(i*=2)/2}, 0 \n a ${i/2},${i/2} 0 1,0 ${i},0 \n a ${i/2},${i/2} 0 1,0 -${i},0`}return a}drawMarkerShape(t,e,s,i,a){const o=this.drawPath({d:this.getMarkerPath(t,e,s,i),stroke:a.pointStrokeColor,strokeDashArray:a.pointStrokeDashArray,strokeWidth:a.pointStrokeWidth,fill:a.pointFillColor,fillOpacity:a.pointFillOpacity,strokeOpacity:a.pointStrokeOpacity});return o.attr({cx:t,cy:e,shape:a.shape,class:a.class?a.class:""}),o}drawMarker(t,e,s){t=t||0;let i=s.pSize||0;return D.isNumber(e)||(i=0,e=0),this.drawMarkerShape(t,e,s?.shape,i,I(I({},s),"line"===s.shape||"plus"===s.shape||"cross"===s.shape?{pointStrokeColor:s.pointFillColor,pointStrokeOpacity:s.pointFillOpacity}:{}))}pathMouseEnter(t,e){var s,i;const a=this.w,o=new J(this.w),r=parseInt(null!=(s=t.node.getAttribute("index"))?s:"",10),n=parseInt(null!=(i=t.node.getAttribute("j"))?i:"",10);isNaN(r)||isNaN(n)||("function"==typeof a.config.chart.events.dataPointMouseEnter&&a.config.chart.events.dataPointMouseEnter(e,this.ctx,{seriesIndex:r,dataPointIndex:n,w:a}),E._fireEvent(a,"dataPointMouseEnter",[e,this.ctx,{seriesIndex:r,dataPointIndex:n,w:a}]),"none"!==a.config.states.active.filter.type&&"true"===t.node.getAttribute("selected")||"none"===a.config.states.hover.f
1ilter.type||a.interact.isTouchDevice)||o.applyFilter(t,r,a.config.states.hover.filter.type)}pathMouseLeave(t,e){var s,i;const a=this.w,o=new J(this.w),r=parseInt(null!=(s=t.node.getAttribute("index"))?s:"",10),n=parseInt(null!=(i=t.node.getAttribute("j"))?i:"",10);isNaN(r)||isNaN(n)||("function"==typeof a.config.chart.events.dataPointMouseLeave&&a.config.chart.events.dataPointMouseLeave(e,this.ctx,{seriesIndex:r,dataPointIndex:n,w:a}),E._fireEvent(a,"dataPointMouseLeave",[e,this.ctx,{seriesIndex:r,dataPointIndex:n,w:a}]),("none"===a.config.states.active.filter.type||"true"!==t.node.getAttribute("selected"))&&"none"!==a.config.states.hover.filter.type&&o.getDefaultFilter(t,r))}pathMouseDown(t,e){var s,i;const a=this.w,o=new J(this.w),r=parseInt(null!=(s=t.node.getAttribute("index"))?s:"",10),n=parseInt(null!=(i=t.node.getAttribute("j"))?i:"",10);if(isNaN(r)||isNaN(n))return;let c="false";if("true"===t.node.getAttribute("selected")){t.node.setAttribute("selected","false");const l=a.interact.selectedDataPoints[r].indexOf(n);l>-1&&a.interact.selectedDataPoints[r].splice(l,1)}else{if(!a.config.states.active.allowMultipleDataPointsSelection&&a.interact.selectedDataPoints.length>0){a.interact.selectedDataPoints=[];const l=a.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),h=a.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),d=f=>{Array.prototype.forEach.call(f,p=>{p.node.setAttribute("selected","false"),o.getDefaultFilter(p,r)})};d(l),d(h)}t.node.setAttribute("selected","true"),c="true",typeof a.interact.selectedDataPoints[r]>"u"&&(a.interact.selectedDataPoints[r]=[]),a.interact.selectedDataPoints[r].push(n)}if("true"===c){const l=a.config.states.active.filter;"none"!==l?o.applyFilter(t,r,l.type):"none"===a.config.states.hover.filter||a.interact.isTouchDevice||o.applyFilter(t,r,a.config.states.hover.filter.type)}else"none"!==a.config.states.active.filter.type&&("none"===a.config.states.hover.filter.type||a.interact.isTouchDevice?o.getDefaultFilter(t,r):o.applyFilter(t,r,a.config.states.hover.filter.type));"function"==typeof a.config.chart.events.dataPointSelection&&a.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:a.interact.selectedDataPoints,seriesIndex:r,dataPointIndex:n,w:a}),e&&E._fireEvent(a,"dataPointSelection",[e,this.ctx,{selectedDataPoints:a.interact.selectedDataPoints,seriesIndex:r,dataPointIndex:n,w:a}])}rotateAroundCenter(t){let e={};return t&&"function"==typeof t.getBBox&&(e=t.getBBox()),{x:e.x+e.width/2,y:e.y+e.height/2}}setupEventDelegation(t,e){let s=null;t.node.addEventListener("mouseover",i=>{const a=E._findDelegateTarget(i.target,t.node,e);!a||a===s||(s&&s.instance&&this.pathMouseLeave(s.instance,i),s=a,a.instance&&this.pathMouseEnter(a.instance,i))}),t.node.addEventListener("mouseout",i=>{s&&(i.relatedTarget?E._findDelegateTarget(i.relatedTarget,t.node,e):null)!==s&&(s&&s.instance&&this.pathMouseLeave(s.instance,i),s=null)}),t.node.addEventListener("mousedown",i=>{const a=E._findDelegateTarget(i.target,t.node,e);a&&a.instance&&this.pathMouseDown(a.instance,i)})}static _fireEvent(t,e,s){const i=t.globals.events;if(!i||!Object.prototype.hasOwnProperty.call(i,e))return;const a=i[e];for(let o=0;o<a.length;o++)a[o].apply(null,s)}static _findDelegateTarget(t,e,s){for(;t&&t!==e&&t!==document;){if(t.matches&&t.matches(s))return t;t=t.parentNode}return null}static setAttrs(t,e){for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.setAttribute(s,e[s])}getTextRects(t,e,s,i,a=!0){const o=this.w,r=[t,e,s,i,a].join("\0"),n=o.globals.textRectsCache;if(n&&n.has(r))return n.get(r);const c=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:s,foreColor:"#fff",opacity:0});i&&c.attr("transform",i),o.dom.Paper.add(c);let l=c.bbox();a||(l=c.node.getBoundingClientRect()),c.remove();const h={width:l.width,height:l.height};return n&&n.set(r,h),h}placeTextWithEllipsis(t,e,s){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=s/1.1)){for(let i=e.length-3;i>0;i-=3)if(t.getSubStringLength(0,i)<=s/1.1)return void(t.textContent=e.substring(0,i)+"...");t.textContent="."}}}const V="http://www.w3.org/2000/svg";class et{constructor(t,e){"object"==typeof t?(this.x=t.x,this.y=t.y):(this.x=t||0,this.y=e||0)}transform(t){return t.apply(this)}clone(){return new et(this.x,this.y)}}class ht{constructor(t,e,s,i,a,o){this.a=t??1,this.b=e??0,this.c=s??0,this.d=i??1,this.e=a??0,this.f=o??0}rotate(t){const e=t*Math.PI/180,s=Math.cos(e),i=Math.sin(e);return this.multiply(new ht(s,i,-i,s,0,0))}scale(t,e){return this.multiply(new ht(t,0,0,e??t,0,0))}multiply(t){return new ht(this.a*t.a+this.c*t.b,this.b*t.a+this.d*t.b,this.a*t.c+this.c*t.d,this.b*t.c+this.d*t.d,this.a*t.e+this.c*t.f+this.e,this.b*t.e+this.d*t.f+this.f)}
1apply(t){return new et(this.a*t.x+this.c*t.y+this.e,this.b*t.x+this.d*t.y+this.f)}}class Ie{constructor(t,e,s,i){this.x=t,this.y=e,this.w=s,this.h=i,this.width=s,this.height=i,this.x2=t+s,this.y2=e+i}}class st{constructor(t){this.w=t,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}clippedImgArea(t){const e=this.w,s=e.config,i=parseInt(String(e.layout.gridWidth),10),a=parseInt(String(e.layout.gridHeight),10),o=i>a?i:a,r=t.image;let n=0,c=0;typeof t.width>"u"&&typeof t.height>"u"?void 0!==s.fill.image.width&&void 0!==s.fill.image.height?(n=s.fill.image.width+1,c=s.fill.image.height):(n=o+1,c=o):(n=t.width,c=t.height);const l=B.createElementNS(V,"pattern");E.setAttrs(l,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:n+"px",height:c+"px"});const h=B.createElementNS(V,"image");l.appendChild(h);const d=_.isBrowser()?window.SVG:global.SVG;h.setAttributeNS(d.xlink,"href",r),E.setAttrs(h,{x:0,y:0,preserveAspectRatio:"none",width:n+"px",height:c+"px"}),h.style.opacity=t.opacity,e.dom.elDefs.node.appendChild(l)}getSeriesIndex(t){const e=this.w,s=e.config.chart.type;return this.seriesIndex=("bar"===s||"rangeBar"===s)&&e.config.plotOptions.bar.distributed||"heatmap"===s||"treemap"===s?t.seriesNumber:t.seriesNumber%e.seriesData.series.length,this.seriesIndex}computeColorStops(t,e){const s=this.w;let i=null,a=null;for(const c of t)c>=e.threshold?(null===i||c>i)&&(i=c):(null===a||c<a)&&(a=c);null===i&&(i=e.threshold),null===a&&(a=e.threshold);let o=i-e.threshold+(e.threshold-a);0===o&&(o=1);let n=100-(e.threshold-a)/o*100;return n=Math.max(0,Math.min(n,100)),[{offset:n,color:e.colorAboveThreshold,opacity:s.config.fill.opacity},{offset:0,color:e.colorBelowThreshold,opacity:s.config.fill.opacity}]}fillPath(t){var e,s,i,a;const o=this.w;this.opts=t;const r=this.w.config;let n,c,l;this.seriesIndex=this.getSeriesIndex(t);const h=r.plotOptions.line.colors.colorAboveThreshold&&r.plotOptions.line.colors.colorBelowThreshold;let f=this.getFillColors()[this.seriesIndex];void 0!==o.seriesData.seriesColors[this.seriesIndex]&&(f=o.seriesData.seriesColors[this.seriesIndex]),"function"==typeof f&&(f=f({seriesIndex:this.seriesIndex,dataPointIndex:t.dataPointIndex,value:t.value,w:o}));const p=t.fillType?t.fillType:this.getFillType(this.seriesIndex);let g=Array.isArray(r.fill.opacity)?r.fill.opacity[this.seriesIndex]:r.fill.opacity;const u="gradient"===p||h;t.color&&(f=t.color);const b=o.config.series[this.seriesIndex];null!=(s=null==(e=b?.data)?void 0:e[t.dataPointIndex])&&s.fillColor&&(f=null==(a=null==(i=b?.data)?void 0:i[t.dataPointIndex])?void 0:a.fillColor),f||(f="#fff",console.warn("undefined color - ApexCharts")),null!=t.opacity&&(g=t.opacity);let x=f;D.isCSSVariable(f)?x=D.applyOpacityToColor(f,g):-1===f.indexOf("rgb")?-1===f.indexOf("#")?x=f:f.length<9&&(x=D.hexToRgba(f,g)):f.indexOf("rgba")>-1?g=D.getOpacityFromRGBA(f):x=D.hexToRgba(D.rgb2hex(f),g);const w=D.isCSSVariable(f)?D.getThemeColor(f):f;if("pattern"===p&&(c=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:c,fillColor:w,defaultColor:x})),u){const m=r.fill.gradient.colorStops?[...r.fill.gradient.colorStops]:[];let y=r.fill.gradient.type;h&&(m[this.seriesIndex]=this.computeColorStops(o.seriesData.series[this.seriesIndex],r.plotOptions.line.colors),y="vertical"),l=this.handleGradientFill({type:y,fillConfig:t.fillConfig,fillColor:w,fillOpacity:g,colorStops:m,i:this.seriesIndex})}if("image"===p){const m=r.fill.image.src,v=`pattern${o.globals.cuid}${t.seriesNumber+1}${t.patternID?t.patternID:""}`;-1===this.patternIDs.indexOf(v)&&(this.clippedImgArea({opacity:g,image:Array.isArray(m)?t.seriesNumber<m.length?m[t.seriesNumber]:m[0]:m,width:t.width?t.width:void 0,height:t.height?t.height:void 0,patternUnits:t.patternUnits,patternID:v}),this.patternIDs.push(v)),n=`url(#${v})`}else n=u?l:"pattern"===p?c:x;return t.solid&&(n=x),n}getFillType(t){const e=this.w;return Array.isArray(e.config.fill.type)?e.config.fill.type[t]:e.config.fill.type}getFillColors(){const t=this.w,e=t.config,s=this.opts;let i=[];return t.globals.comboCharts?"line"===t.config.series[this.seriesIndex].type?Array.isArray(t.globals.stroke.colors)?i=t.globals.stroke.colors:i.push(t.globals.stroke.colors):Array.isArray(t.globals.fill.colors)?i=t.globals.fill.colors:i.push(t.globals.fill.colors):"line"===e.chart.type?Array.isArray(t.globals.stroke.colors)?i=t.globals.stroke.colors:i.push(t.globals.stroke.colors):Array.isArray(t.globals.fill.colors)?i=t.globals.fill.colors:i.push(t.globals.fill.colors),typeof s.fillColors<"u"&&(i=[],Array.isArray(s.fillColors)?i=s.fillColors.slice():i.push(s.fillColors)),i}handlePatternFill({fillConfig:t,fillColor:s,defaultColor:i}){let a=this.w.config.fill;t&&(a=t);const o=this.opts,r=new E(this.w),n=Array.isArray(a.pattern.strokeWidth)?a.pattern.strokeWidth[this.seriesIndex]:a.pattern.strokeWidth,c=s;return Array.isArray(a.pattern.style)?typeof a.pattern.style[o.seriesNumber]<"u"?r.drawPattern(a.pattern.style[o.seriesNumber],a.pattern.width,a.pattern.height,c,n):i:r.drawPattern(a.pattern.style,a.pattern.width,a.pattern.height,c,n)}handleGradientFill({type:t,fillColor:e,fillOpacity:s,fillConfig:i,colorStops:a,i:o}){let r=this.w.config.fill;
1i&&(r=I(I({},r),i));const n=this.opts,c=new E(this.w),l=new D;t=t||r.gradient.type;let d,h=e,f=void 0===r.gradient.opacityFrom?s:Array.isArray(r.gradient.opacityFrom)?r.gradient.opacityFrom[o]:r.gradient.opacityFrom;h.indexOf("rgba")>-1&&(f=D.getOpacityFromRGBA(h));let p=void 0===r.gradient.opacityTo?s:Array.isArray(r.gradient.opacityTo)?r.gradient.opacityTo[o]:r.gradient.opacityTo;if(void 0===r.gradient.gradientToColors||0===r.gradient.gradientToColors.length)d=l.shadeColor("dark"===r.gradient.shade?-1*parseFloat(r.gradient.shadeIntensity):parseFloat(r.gradient.shadeIntensity),e.indexOf("rgb")>-1?D.rgb2hex(e):e);else if(r.gradient.gradientToColors[n.seriesNumber]){const g=r.gradient.gradientToColors[n.seriesNumber];d=g,g.indexOf("rgba")>-1&&(p=D.getOpacityFromRGBA(g))}else d=e;if(r.gradient.gradientFrom&&(h=r.gradient.gradientFrom),r.gradient.gradientTo&&(d=r.gradient.gradientTo),r.gradient.inverseColors){const g=h;h=d,d=g}return h.indexOf("rgb")>-1&&(h=D.rgb2hex(h)),d.indexOf("rgb")>-1&&(d=D.rgb2hex(d)),c.drawGradient(t,h,d,f,p,n.size,r.gradient.stops,a,o)}}class pt{constructor(t,e){this.w=t,this.ctx=e,this._filters=new J(this.w),this._graphics=new E(this.w,this.ctx)}setGlobalMarkerSize(){const t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size:[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length<t.seriesData.series.length+1)for(let e=0;e<=t.seriesData.series.length;e++)typeof t.globals.markers.size[e]>"u"&&t.globals.markers.size.push(t.globals.markers.size[0])}else t.globals.markers.size=t.config.series.map(()=>t.config.markers.size)}plotChartMarkers({pointsPos:t,seriesIndex:e,j:s,pSize:i,alwaysDrawMarker:a=!1,isVirtualPoint:o=!1}){const r=this.w,n=e,c=t;let l=null;const h=new E(this.w),d=r.config.markers.discrete&&r.config.markers.discrete.length;if(Array.isArray(c.x))for(let f=0;f<c.x.length;f++){let p,g=s,u=!D.isNumber(c.y[f]);0===r.globals.markers.largestSize&&r.globals.hasNullValues&&null!==r.seriesData.series[n][s+1]&&!o&&(u=!0),1===s&&0===f&&(g=0),1===s&&1===f&&(g=1);let b="apexcharts-marker";if(("line"===r.config.chart.type||"area"===r.config.chart.type)&&!r.globals.comboCharts&&!r.config.tooltip.intersect&&(b+=" no-pointer-events"),(Array.isArray(r.config.markers.size)?r.globals.markers.size[e]>0:r.config.markers.size>0)||a||d){u||(b+=` w${D.randomId()}`);const w=this.getMarkerConfig({cssClass:b,seriesIndex:e,dataPointIndex:g}),m=r.config.series[n];m.data[g]&&(m.data[g].fillColor&&(w.pointFillColor=m.data[g].fillColor),m.data[g].strokeColor&&(w.pointStrokeColor=m.data[g].strokeColor)),typeof i<"u"&&(w.pSize=i),(c.x[f]<-r.globals.markers.largestSize||c.x[f]>r.layout.gridWidth+r.globals.markers.largestSize||c.y[f]<-r.globals.markers.largestSize||c.y[f]>r.layout.gridHeight+r.globals.markers.largestSize)&&(w.pSize=0),u||((r.globals.markers.size[e]>0||a||d)&&!l&&(l=h.group({class:a||d?"":"apexcharts-series-markers"}),l.attr("clip-path",`url(#gridRectMarkerMask${r.globals.cuid})`),this.setupMarkerDelegation(l)),p=h.drawMarker(c.x[f],c.y[f],w),p.attr("rel",g),p.attr("j",g),p.attr("index",e),p.node.setAttribute("default-marker-size",w.pSize),this._filters.setSelectionFilter(p,e,g),l&&l.add(p))}else typeof r.globals.pointsArray[e]>"u"&&(r.globals.pointsArray[e]=[]),r.globals.pointsArray[e].push([c.x[f],c.y[f]])}return l}getMarkerConfig({cssClass:t,seriesIndex:e,dataPointIndex:s=null,radius:i=null,size:a=null,strokeWidth:o=null}){const r=this.w,n=this.getMarkerStyle(e);let c=null===a?r.globals.markers.size[e]:a;const l=r.config.markers;return null!==s&&l.discrete.length&&l.discrete.map(h=>{h.seriesIndex===e&&h.dataPointIndex===s&&(n.pointStrokeColor=h.strokeColor,n.pointFillColor=h.fillColor,c=h.size,n.pointShape=h.shape)}),{pSize:null===i?c:i,pRadius:null!==i?i:l.radius,pointStrokeWidth:null!==o?o:Array.isArray(l.strokeWidth)?l.strokeWidth[e]:l.strokeWidth,pointStrokeColor:n.pointStrokeColor,pointFillColor:n.pointFillColor,shape:n.pointShape||(Array.isArray(l.shape)?l.shape[e]:l.shape),class:t,pointStrokeOpacity:Array.isArray(l.strokeOpacity)?l.strokeOpacity[e]:l.strokeOpacity,pointStrokeDashArray:Array.isArray(l.strokeDashArray)?l.strokeDashArray[e]:l.strokeDashArray,pointFillOpacity:Array.isArray(l.fillOpacity)?l.fillOpacity[e]:l.fillOpacity,seriesIndex:e}}
1setupMarkerDelegation(t){const e=this.w,s=".apexcharts-marker";this._graphics.setupEventDelegation(t,s),t.node.addEventListener("click",i=>{e.config.markers.onClick&&E._findDelegateTarget(i.target,t.node,s)&&e.config.markers.onClick(i)}),t.node.addEventListener("dblclick",i=>{e.config.markers.onDblClick&&E._findDelegateTarget(i.target,t.node,s)&&e.config.markers.onDblClick(i)}),t.node.addEventListener("touchstart",i=>{const a=E._findDelegateTarget(i.target,t.node,s);a&&a.instance&&this._graphics.pathMouseDown(a.instance,i)},{passive:!0})}addEvents(t){const e=this.w;t.node.addEventListener("mouseenter",this._graphics.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",this._graphics.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",this._graphics.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",this._graphics.pathMouseDown.bind(this.ctx,t),{passive:!0})}getMarkerStyle(t){const e=this.w,s=e.globals.markers.colors,i=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(i)?i[t]:i,pointFillColor:Array.isArray(s)?s[t]:s}}}class ee{constructor(t,e){this.ctx=e,this.w=t,this.initialAnim=this.w.config.chart.animations.enabled,this.anim=new ft(this.w),this.filters=new J(this.w),this.fill=new st(this.w),this.markers=new pt(this.w,this.ctx),this.graphics=new E(this.w)}draw(t,e,s){const i=this.w,o=s.realIndex,r=s.pointsPos,n=s.zRatio,c=s.elParent,l=this.graphics.group({class:`apexcharts-series-markers apexcharts-series-${i.config.chart.type}`});if(l.attr("clip-path",`url(#gridRectMarkerMask${i.globals.cuid})`),this.markers.setupMarkerDelegation(l),Array.isArray(r.x))for(let h=0;h<r.x.length;h++){let d=e+1,f=!0;0===e&&0===h&&(d=0),0===e&&1===h&&(d=1);let p=i.globals.markers.size[o];if(n!==1/0){const b=i.config.plotOptions.bubble;p=i.seriesData.seriesZ[o][d],b.zScaling&&(p/=n),b.minBubbleRadius&&p<b.minBubbleRadius&&(p=b.minBubbleRadius),b.maxBubbleRadius&&p>b.maxBubbleRadius&&(p=b.maxBubbleRadius)}const u=r.y[h];if(p=p||0,(null===u||typeof i.seriesData.series[o][d]>"u")&&(f=!1),f){const b=this.drawPoint(r.x[h],u,p,o,d,e);l.add(b)}c.add(l)}}drawPoint(t,e,s,i,a,o){const r=this.w,n=i,c=this.anim,l=this.filters,h=this.fill,f=this.graphics,p=this.markers.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:n,dataPointIndex:a,radius:"bubble"===r.config.chart.type||r.globals.comboCharts&&r.config.series[i]&&"bubble"===r.config.series[i].type?s:null});let g=h.fillPath({seriesNumber:i,dataPointIndex:a,color:p.pointFillColor,patternUnits:"objectBoundingBox",value:r.seriesData.series[i][o]});const u=f.drawMarker(t,e,p),b=r.config.series[n];return b.data[a]&&b.data[a].fillColor&&(g=b.data[a].fillColor),u.attr({fill:g}),r.config.chart.dropShadow.enabled&&l.dropShadow(u,r.config.chart.dropShadow,i),!this.initialAnim||r.globals.dataChanged||r.globals.resized?r.globals.animationEnded=!0:c.animateMarker(u,r.config.chart.animations.speed,r.globals.easing,()=>{window.setTimeout(()=>{c.animationCompleted(u)},100)}),u.attr({rel:a,j:a,index:i,"default-marker-size":p.pSize}),l.setSelectionFilter(u,i,a),u.node.classList.add("apexcharts-marker"),u}centerTextInBubble(t){return{y:t+=parseInt(this.w.config.dataLabels.style.fontSize,10)/4}}}class dt{constructor(t,e=null){this.w=t,this.ctx=e}dataLabelsCorrection(t,e,s,i,a,o,r){const n=this.w;let l=!1;const h=new E(this.w).getTextRects(s,r),d=h.width,f=h.height;if(e<0&&(e=0),e>n.layout.gridHeight+f&&(e=n.layout.gridHeight+f/2),typeof n.globals.dataLabelsRects[i]>"u"&&(n.globals.dataLabelsRects[i]=[]),n.globals.dataLabelsRects[i].push({x:t,y:e,width:d,height:f}),typeof n.globals.dataLabelsRects[i][n.globals.dataLabelsRects[i].length-2]<"u"){const u=n.globals.dataLabelsRects[i][typeof n.globals.lastDrawnDataLabelsIndexes[i]<"u"?n.globals.lastDrawnDataLabelsIndexes[i][n.globals.lastDrawnDataLabelsIndexes[i].length-1]:0];(t>u.x+u.width||e>u.y+u.height||e+f<u.y||t+d<u.x)&&(l=!0)}return(0===a||o)&&(l=!0),{x:t,y:e,textRects:h,drawnextLabel:l}}drawDataLabel({type:t,pos:e,i:s,j:i,isRangeStart:a,strokeWidth:o=2}){const r=this.w,n=new E(this.w),c=r.config.dataLabels;let l=0,h=0,d=i,f=null;if(-1!==r.globals.collapsedSeriesIndices.indexOf(s)||!c.enabled||!Array.isArray(e.x))return f;f=n.group({class:"apexcharts-data-labels"});for(let g=0;g<e.x.length;g++)if(l=e.x[g]+c.offsetX,h=e.y[g]+c.offsetY+o,!isNaN(l)){1===i&&0===g&&(d=0),1===i&&1===g&&(d=1);let u=r.seriesData.series[s][d];"rangeArea"===t&&(u=a?r.rangeData.seriesRangeStart[s][d]:r.rangeData.seriesRangeEnd[s][d]);let b="";const x=m=>r.config.dataLabels.formatter(m,{seriesIndex:s,dataPointIndex:d,w:r});"bubble"===r.config.chart.type?(u=r.seriesData.seriesZ[s][d],b=x(u),h=e.y[g],h=new ee(this.w,this.ctx).centerTextInBubble(h).y):typeof u<"u"&&(b=x(u));let w=r.config.dataLabels.textAnchor;r.globals.isSlopeChart&&(w=0===d?"end":d===r.config.series[s].data.length-1?"start":"middle"),this.plotDataLabelsText({x:l,y:h,text:b,i:s,j:d,parent:f,offsetCorrection:!0,dataLabelsConfig:r.config.dataLabels,textAnchor:w})}return f}plotDataLabelsText(t){const e=this.w,s=new E(this.w);let{x:i,y:a,i:o,j:r,text:n,textAnchor:c,fontSize:l,parent:h,dataLabelsConfig:d,color:f,alwaysDrawDataLabel:p,offsetCorrection:g,className:u}=t,b=null;if(Array.isArray(e.config.dataLabels.enabledOnSeries)&&e.config.dataLabels.enabledOnSeries.indexOf(o)<0)return b;let x={x:i,y:a,drawnextLabel:!0,textRects:null};if(g&&(x=this.dataLabelsCorrection(i,a,n,o,r,p,parseInt(d.style.fontSize,10).toString())),e.interact.zoomed||(i=x.x,a=x.y),x.textRects){const v=e.globals.barPadForNumericAxis||
10;(i<-(v+20)-x.textRects.width||i>e.layout.gridWidth+x.textRects.width+v+30)&&(n="")}let w=e.globals.dataLabels.style.colors[o];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(w=e.globals.dataLabels.style.colors[r]),"function"==typeof w&&(w=w({series:e.seriesData.series,seriesIndex:o,dataPointIndex:r,w:e})),f&&(w=f);let m=d.offsetX,y=d.offsetY;if(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&(m=0,y=0),e.globals.isSlopeChart&&(0!==r&&(m=-2*d.offsetX+5),0!==r&&r!==e.config.series[o].data.length-1&&(m=0)),x.drawnextLabel){if("middle"===c&&i===e.layout.gridWidth&&(c="end"),b=s.drawText({x:i+m,y:a+y,foreColor:w,textAnchor:c||d.textAnchor,text:n,fontSize:l||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"}),b.attr({class:u||"apexcharts-datalabel",cx:i,cy:a}),d.dropShadow.enabled){const v=d.dropShadow;new J(this.w).dropShadow(b,v)}h.add(b),typeof e.globals.lastDrawnDataLabelsIndexes[o]>"u"&&(e.globals.lastDrawnDataLabelsIndexes[o]=[]),e.globals.lastDrawnDataLabelsIndexes[o].push(r)}return b}addBackgroundToDataLabel(t,e){const s=this.w,i=s.config.dataLabels.background,a=i.padding,o=i.padding/2,r=e.width,n=e.height,l=new E(this.w).drawRect(e.x-a,e.y-o/2,r+2*a,n+o,i.borderRadius,"transparent"!==s.config.chart.background&&s.config.chart.background?s.config.chart.background:"#fff",i.opacity,i.borderWidth,i.borderColor);return i.dropShadow.enabled&&new J(this.w).dropShadow(l,i.dropShadow),l}dataLabelsBackground(){var t;const e=this.w;if("bubble"===e.config.chart.type)return;const s=e.dom.baseEl.querySelectorAll(".apexcharts-datalabels text");for(let i=0;i<s.length;i++){const a=s[i],o=a.getBBox();let r=null;if(o.width&&o.height&&(r=this.addBackgroundToDataLabel(a,o)),r){null==(t=a.parentNode)||t.insertBefore(r.node,a);const n=e.config.dataLabels.background.backgroundColor||a.getAttribute("fill");!e.config.chart.animations.enabled||e.globals.resized||e.globals.dataChanged?r.attr({fill:n}):r.animate().attr({fill:n}),a.setAttribute("fill",e.config.dataLabels.background.foreColor)}}}bringForward(){const t=this.w,e=t.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),s=t.dom.baseEl.querySelector(".apexcharts-plot-series:last-child");for(let i=0;i<e.length;i++)s&&s.insertBefore(e[i],s.nextSibling)}}class _t{static invalidateAll(t){!t||!t.globals||(t.globals.cachedSelectors&&(t.globals.cachedSelectors={}),t.globals.domCache&&t.globals.domCache.clear(),t.globals.dimensionCache={})}static invalidateDimensions(t){!t||!t.globals||(t.globals.dimensionCache={})}static invalidateSelectors(t){!t||!t.globals||t.globals.cachedSelectors&&(t.globals.cachedSelectors={})}static getCachedSelector(t,e,s){return t&&t.globals?(t.globals.cachedSelectors||(t.globals.cachedSelectors={}),t.globals.cachedSelectors[e]||(t.globals.cachedSelectors[e]=s()),t.globals.cachedSelectors[e]):s()}static getCachedDimension(t,e,s,i=1e3){if(!t||!t.globals)return s();t.globals.dimensionCache||(t.globals.dimensionCache={});const a=t.globals.dimensionCache[e],o=Date.now();if(a&&a.lastUpdate&&o-a.lastUpdate<i)return a.value;const r=s();return t.globals.dimensionCache[e]={value:r,lastUpdate:o},r}static cacheDOMElement(t,e,s){!t||!t.globals||(t.globals.domCache||(t.globals.domCache=new Map),t.globals.domCache.set(e,s))}static getCachedDOMElement(t,e){return t&&t.globals&&t.globals.domCache&&t.globals.domCache.get(e)||null}}class rt{constructor(t,{theme:e=null,timeScale:s=null}={}){this.w=t,this.theme=e,this.timeScale=s}getLabel(t,e,s,i,a=[],o="12px",r=!0){const n=this.w,c=typeof t[i]>"u"?"":t[i];let l=c;const h=n.formatters.xLabelFormatter,d=n.config.xaxis.labels.formatter;let f=!1;const p=new bt(this.w);r&&(l=p.xLabelFormat(h,c,c,{i,dateFormatter:new K(this.w).formatDate,w:n}),void 0!==d&&(l=d(c,t[i],{i,dateFormatter:new K(this.w).formatDate,w:n}))),e.length>0?(f=(m=>{let y=null;return e.forEach(v=>{"month"===v.unit?y="year":"day"===v.unit?y="month":"hour"===v.unit?y="day":"minute"===v.unit&&(y="hour")}),y===m})(e[i].unit),s=e[i].position,l=e[i].value):"datetime"===n.config.xaxis.type&&void 0===d&&(l=""),typeof l>"u"&&(l=""),l=Array.isArray(l)?l:l.toString();const b=new E(this.w);let x={};x=n.layout.rotateXLabels&&r?b.getTextRects(l,parseInt(o,10).toString(),null,`rotate(${n.config.xaxis.labels.rotate} 0 0)`,!1):b.getTextRects(l,parseInt(o,10).toString());const w=!n.config.xaxis.labels.showDuplicates&&this.timeScale;return!Array.isArray(l)&&("NaN"===String(l)||a.indexOf(l)>=0&&w)&&(l=""),{x:s,text:l,textRect:x,isBold:f}}checkLabelBasedOnTickamount(t,e,s){const i=this.w;let a=i.config.xaxis.tickAmount;return"dataPoints"===a&&(a=Math.round(i.layout.gridWidth/120)),a>s||t%Math.round(s/(a+1))===0||(e.text=""),e}checkForOverflowingLabels(t,e,s,i,a){const o=this.w;if(0===t&&o.globals.skipFirstTimelinelabel&&(e.text=""),t===s-1&&o.globals.skipLastTimelinelabel&&(e.text=""),o.config.xaxis.labels.hideOverlappingLabels&&i.length>0){const r=a[a.length-1];if(o.config.xaxis.labels.trim&&"datetime"!==o.config.xaxis.type)return e;e.x<r.textRect.width/(o.layout.rotateXLabels?Math.abs(o.config.xaxis.labels.rotate)/12:1.01)+r.x&&(e.text="")}return e}
vendor: 6,084 bytes, line 1
1checkForReversedLabels(t,e){const s=this.w;return s.config.yaxis[t]&&s.config.yaxis[t].reversed&&e.reverse(),e}yAxisAllSeriesCollapsed(t){const e=this.w.globals;return!e.seriesYAxisMap[t].some(s=>-1===e.collapsedSeriesIndices.indexOf(s))}translateYAxisIndex(t){const e=this.w,s=e.globals,i=e.config.yaxis;return e.seriesData.series.length>i.length||i.some(o=>Array.isArray(o.seriesName))?t:s.seriesYAxisReverseMap[t]}isYAxisHidden(t){const e=this.w,s=e.config.yaxis[t];if(!s.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!s.showForNullSeries){const i=e.globals.seriesYAxisMap[t],a=new q(this.w);return i.every(o=>a.isSeriesNull(o))}return!1}getYAxisForeColor(t,e){var s;const i=this.w;return Array.isArray(t)&&i.globals.yAxisScale[e]&&(null==(s=this.theme)||s.pushExtraColors(t,i.globals.yAxisScale[e].result.length,!1)),t}drawYAxisTicks(t,e,s,i,a,o,r){const n=this.w,c=new E(this.w);let l=n.layout.translateY+n.config.yaxis[a].labels.offsetY;if(n.globals.isBarHorizontal?l=0:"heatmap"===n.config.chart.type&&(l+=o/2),i.show&&e>0){!0===n.config.yaxis[a].opposite&&(t+=i.width);for(let h=e;h>=0;h--){const d=c.drawLine(t+s.offsetX-i.width+i.offsetX,l+i.offsetY,t+s.offsetX+i.offsetX,l+i.offsetY,i.color);r.add(d),l+=o}}}}class wt{constructor(t,e,s){this.w=t,this.ctx=e,this.elgrid=s,this.axesUtils=new rt(t,{theme:e.theme,timeScale:e.timeScale}),this.xaxisLabels=t.labelData.labels.slice(),t.labelData.timescaleLabels.length>0&&!t.globals.isBarHorizontal&&(this.xaxisLabels=t.labelData.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.layout.gridHeight,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=String(this.xaxisBorderWidth).indexOf("%")>-1?t.layout.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=t.config.xaxis.axisBorder.height,this.yaxis=t.config.yaxis[0]}drawXaxis(){const t=this.w,e=new E(this.w),s=e.group({class:"apexcharts-xaxis",transform:`translate(${t.config.xaxis.offsetX}, ${t.config.xaxis.offsetY})`}),i=e.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${t.layout.translateXAxisX}, ${t.layout.translateXAxisY})`});s.add(i);let a=[];for(let o=0;o<this.xaxisLabels.length;o++)a.push(this.xaxisLabels[o]);if(this.drawXAxisLabelAndGroup(!0,e,i,a,t.axisFlags.isXNumeric,(o,r)=>r),t.labelData.hasXaxisGroups){const o=t.labelData.groups;a=[];for(let n=0;n<o.length;n++)a.push(o[n].title);const r={};t.config.xaxis.group.style&&(r.xaxisFontSize=t.config.xaxis.group.style.fontSize,r.xaxisFontFamily=t.config.xaxis.group.style.fontFamily,r.xaxisForeColors=t.config.xaxis.group.style.colors,r.fontWeight=t.config.xaxis.group.style.fontWeight,r.cssClass=t.config.xaxis.group.style.cssClass),this.drawXAxisLabelAndGroup(!1,e,i,a,!1,(n,c)=>o[n].cols*c,r)}if(void 0!==t.config.xaxis.title.text){const o=e.group({class:"apexcharts-xaxis-title"}),r=e.drawText({x:t.layout.gridWidth/2+t.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+("bottom"===t.config.xaxis.position?t.layout.xAxisLabelsHeight:-t.layout.xAxisLabelsHeight-10)+t.config.xaxis.title.offsetY,text:t.config.xaxis.title.text,textAnchor:"middle",fontSize:t.config.xaxis.title.style.fontSize,fontFamily:t.config.xaxis.title.style.fontFamily,fontWeight:t.config.xaxis.title.style.fontWeight,foreColor:t.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+t.config.xaxis.title.style.cssClass});o.add(r),s.add(o)}if(t.config.xaxis.axisBorder.show){const o=t.globals.barPadForNumericAxis,r=e.drawLine(t.globals.padHorizontal+t.config.xaxis.axisBorder.offsetX-o,this.offY,this.xaxisBorderWidth+o,this.offY,t.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(r):s.add(r)}return s}drawXAxisLabelAndGroup(t,e,s,i,a,o,r={}){const n=[],c=[],l=this.w,h=r.xaxisFontSize||this.xaxisFontSize,d=r.xaxisFontFamily||this.xaxisFontFamily,f=r.xaxisForeColors||this.xaxisForeColors,p=r.fontWeight||l.config.xaxis.labels.style.fontWeight,g=r.cssClass||l.config.xaxis.labels.style.cssClass;let u,b=l.globals.padHorizontal;const x=i.length;let w="category"===l.config.xaxis.type?l.globals.dataPoints:x;if(0===w&&x>w&&(w=x),a){const m=Math.max(Number(l.config.xaxis.tickAmount)||1,w>1?w-1:w);u=l.layout.gridWidth/Math.min(m,x-1),b=b+o(0,u)/2+l.config.xaxis.labels.offsetX}else u=l.layout.gridWidth/w,b=b+o(0,u)+l.config.xaxis.labels.offsetX;for(let m=0;m<=x-1;m++){let y=b-o(m,u)/2+l.config.xaxis.labels.offsetX;0===m&&1===x&&u/2===b&&1===w&&(y=l.layout.gridWidth/2);let v=this.axesUtils.getLabel(i,l.labelData.timescaleLabels,y,m,n,h,t),C=28;l.layout.rotateXLabels&&t&&(C=22),l.config.xaxis.title.text&&"top"===l.config.xaxis.position&&(C+=parseFloat(l.config.xaxis.title.style.fontSize)+2),t||(C=C+parseFloat(h)+(l.layout.xAxisLabelsHeight-l.layout.xAxisGroupLabelsHeight)+(l.layout.rotateXLabels?10:0)),v=typeof l.config.xaxis.tickAmount<"u"&&"dataPoints"!==l.config.xaxis.tickAmount&&"datetime"!==l.config.xaxis.type?this.axesUtils.checkLabelBasedOnTickamount(m,v,x):this.axesUtils.checkForOverflowingLabels(m,v,x,n,c);const k=()=>t&&l.config.xaxis.convertedCatToNumeric?f[l.globals.minX+m-1]:f[m];if(l.config.xaxis.labels.show){const S=e.drawText({x:v.x,y:this.offY+l.config.xaxis.labels.offsetY+C-("top"===l.config.xaxis.position?l.layout.xAxisHeight+l.config.xaxis.axisTicks.height-2:0),text:v.text,textAnchor:"middle",fontWeight:v.isBold?600:p,fontSize:h,fontFamily:d,foreColor:Array.isArray(f)?k():f,isPlainText:!1,
vendor: 8,862 bytes, line 1
1cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+g});if(s.add(S),S.on("click",T=>{if("function"==typeof l.config.chart.events.xAxisLabelClick){const P=Object.assign({},l,{labelIndex:m});l.config.chart.events.xAxisLabelClick(T,this.ctx,P)}}),t){const T=B.createElementNS(V,"title");T.textContent=Array.isArray(v.text)?v.text.join(" "):v.text,S.node.appendChild(T),""!==v.text&&(n.push(v.text),c.push(v))}}m<x-1&&(b+=o(m+1,u))}}drawXaxisInversed(t){const e=this.w,s=new E(this.w),i=e.config.yaxis[0].opposite?e.globals.translateYAxisX[t]:0,a=s.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:t}),o=s.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+i+", 0)"});a.add(o);const r=[];if(e.config.yaxis[t].show)for(let p=0;p<this.xaxisLabels.length;p++)r.push(this.xaxisLabels[p]);const n=e.layout.gridHeight/r.length;let c=-n/2.2;const l=e.formatters.yLabelFormatters[0],h=e.config.yaxis[0].labels;if(h.show)for(let p=0;p<=r.length-1;p++){let g=typeof r[p]>"u"?"":r[p];g=l(g,{seriesIndex:t,dataPointIndex:p,w:e});const u=this.axesUtils.getYAxisForeColor(h.style.colors,t),b=()=>Array.isArray(u)?u[p]:u;let x=0;Array.isArray(g)&&(x=g.length/2*parseInt(h.style.fontSize,10));let w=h.offsetX-15,m="end";this.yaxis.opposite&&(m="start"),"left"===e.config.yaxis[0].labels.align?(w=h.offsetX,m="start"):"center"===e.config.yaxis[0].labels.align?(w=h.offsetX,m="middle"):"right"===e.config.yaxis[0].labels.align&&(m="end");const y=s.drawText({x:w,y:c+n+h.offsetY-x,text:g,textAnchor:m,foreColor:b(),fontSize:h.style.fontSize,fontFamily:h.style.fontFamily,fontWeight:h.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+h.style.cssClass,maxWidth:h.maxWidth});o.add(y),y.on("click",C=>{if("function"==typeof e.config.chart.events.xAxisLabelClick){const L=Object.assign({},e,{labelIndex:p});e.config.chart.events.xAxisLabelClick(C,this.ctx,L)}});const v=B.createElementNS(V,"title");if(v.textContent=Array.isArray(g)?g.join(" "):g,y.node.appendChild(v),0!==e.config.yaxis[t].labels.rotate){const C=s.rotateAroundCenter(y.node);y.node.setAttribute("transform",`rotate(${e.config.yaxis[t].labels.rotate} 0 ${C.y})`)}c+=n}if(void 0!==e.config.yaxis[0].title.text){const p=s.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+i+", 0)"}),g=s.drawText({x:e.config.yaxis[0].title.offsetX,y:e.layout.gridHeight/2+e.config.yaxis[0].title.offsetY,text:e.config.yaxis[0].title.text,textAnchor:"middle",foreColor:e.config.yaxis[0].title.style.color,fontSize:e.config.yaxis[0].title.style.fontSize,fontWeight:e.config.yaxis[0].title.style.fontWeight,fontFamily:e.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+e.config.yaxis[0].title.style.cssClass});p.add(g),a.add(p)}let d=0;this.isCategoryBarHorizontal&&e.config.yaxis[0].opposite&&(d=e.layout.gridWidth);const f=e.config.xaxis.axisBorder;if(f.show){const p=s.drawLine(e.globals.padHorizontal+f.offsetX+d,1+f.offsetY,e.globals.padHorizontal+f.offsetX+d,e.layout.gridHeight+f.offsetY,f.color,0);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(p):a.add(p)}return e.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(d,r.length,e.config.yaxis[0].axisBorder,e.config.yaxis[0].axisTicks,0,n,a),a}drawXaxisTicks(t,e,s){const i=this.w,a=t;if(t<0||t-2>i.layout.gridWidth)return;const o=this.offY+i.config.xaxis.axisTicks.offsetY;if(e=e+o+i.config.xaxis.axisTicks.height,"top"===i.config.xaxis.position&&(e=o-i.config.xaxis.axisTicks.height),i.config.xaxis.axisTicks.show){const n=new E(this.w).drawLine(t+i.config.xaxis.axisTicks.offsetX,o+i.config.xaxis.offsetY,a+i.config.xaxis.axisTicks.offsetX,e+i.config.xaxis.offsetY,i.config.xaxis.axisTicks.color);s.add(n),n.node.classList.add("apexcharts-xaxis-tick")}}getXAxisTicksPositions(){const t=this.w,e=[],s=this.xaxisLabels.length;let i=t.globals.padHorizontal;if(t.labelData.timescaleLabels.length>0)for(let a=0;a<s;a++)i=this.xaxisLabels[a].position,e.push(i);else{const a=s;for(let o=0;o<a;o++){let r=a;t.axisFlags.isXNumeric&&"bar"!==t.config.chart.type&&(r-=1),i+=t.layout.gridWidth/r,e.push(i)}}return e}xAxisLabelCorrections(){var t,e,s;const i=this.w,a=new E(this.w),o=i.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),r=i.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)"),n=i.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),c=i.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(i.layout.rotateXLabels||i.config.xaxis.labels.rotateAlways)for(let l=0;l<r.length;l++){const h=a.rotateAroundCenter(r[l]);h.y=h.y-1,h.x=h.x+1,r[l].setAttribute("transform",`rotate(${i.config.xaxis.labels.rotate} ${h.x} ${h.y})`),r[l].setAttribute("text-anchor","end"),o?.setAttribute("transform","translate(0, -10)"),i.config.xaxis.labels.trim&&Array.prototype.forEach.call(r[l].childNodes,f=>{a.placeTextWithEllipsis(f,f.textContent,i.layout.xAxisLabelsHeight-("bottom"===i.config.legend.position?20:10))})}else{const l=i.layout.gridWidth/(i.labelData.labels.length+1);for(let h=0;h<r.length;h++)i.config.xaxis.labels.trim&&"datetime"!==i.config.xaxis.type&&Array.prototype.forEach.call(r[h].childNodes,f=>{a.placeTextWithEllipsis(f,f.textContent,l)})}if(n.length>0){const l=n[n.length-1].getBBox(),h=n[0].getBBox();l.x<-20&&(null==(t=n[n.length-1].parentNode)||t.removeChild(n[n.length-1])),h.x+h.width>i.layout.gridWidth&&!i.globals.isBarHorizontal&&(null==(e=n[0].parentNode)||e.removeChild(n[0]));for(let d=0;d<c.length;d++)a.placeTextWithEllipsis(c[d],null!=(s=c[d].textContent)?s:"",i.config.yaxis[0].labels.maxWidth-(i.config.yaxis[0].title.text?2*parseFloat(i.config.yaxis[0].title.style.fontSize):0)-15)}}}class se{constructor(t,e){this.w=t,this.ctx=e,this.xaxisLabels=t.labelData.labels.slice(),this.axesUtils=new rt(e.w,{theme:e.theme,timeScale:e.timeScale}),this.isRangeBar=t.rangeData.seriesRange.length&&t.globals.isBarHorizontal,t.labelData.timescaleLabels.length>0&&(this.xaxisLabels=t.labelData.timescaleLabels.slice())}drawGridArea(t=null){const e=this.w,s=new E(this.w);t||(t=s.group({class:"apexcharts-grid"}));const i=s.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.layout.gridHeight,"transparent"),a=s.drawLine(e.globals.padHorizontal,e.layout.gridHeight,e.layout.gridWidth,e.layout.gridHeight,"transparent");return t.add(a),t.add(i),t}drawGrid(){if(this.w.globals.axisCharts){const e=this.renderGrid();return this.drawGridArea(e.el),e}return null}createGridMask(){const t=this.w,e=t.globals,s=new E(this.w),i=Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width,a=h=>{const d=B.createElementNS(V,"clipPath");return d.setAttribute("id",h),d};t.dom.elGridRectMask=a(`gridRectMask${e.cuid}`),t.dom.elGridRectBarMask=a(`gridRectBarMask${e.cuid}`),t.dom.elGridRectMarkerMask=a(`gridRectMarkerMask${e.cuid}`),t.dom.elForecastMask=a(`forecastMask${e.cuid}`),t.dom.elNonForecastMask=a(`nonForecastMask${e.cuid}`);let r=0,n=0;(["bar","rangeBar","candlestick","boxPlot"].includes(t.config.chart.type)||t.globals.comboBarCount>0)&&t.axisFlags.isXNumeric&&!t.globals.isBarHorizontal&&(r=Math.max(t.config.grid.padding.left,e.barPadForNumericAxis),n=Math.max(t.config.grid.padding.right,e.barPadForNumericAxis)),t.dom.elGridRect=s.drawRect(-i/2-2,-i/2-2,t.layout.gridWidth+i+4,t.layout.gridHeight+i+4,0,"#fff"),t.dom.elGridRectBar=s.drawRect(-i/2-r-2,-i/2-2,t.layout.gridWidth+i+n+r+4,t.layout.gridHeight+i+4,0,"#fff");const c=t.globals.markers.largestSize;t.dom.elGridRectMarker=s.drawRect(Math.min(-i/2-r-2,-c),-c,t.layout.gridWidth+Math.max(i+n+r+4,2*c),t.layout.gridHeight+2*c,0,"#fff"),t.dom.elGridRectMask.appendChild(t.dom.elGridRect.node),t.dom.elGridRectBarMask.appendChild(t.dom.elGridRectBar.node),t.dom.elGridRectMarkerMask.appendChild(t.dom.elGridRectMarker.node);const l=t.dom.elDefs.node;l.appendChild(t.dom.elGridRectMask),l.appendChild(t.dom.elGridRectBarMask),l.appendChild(t.dom.elGridRectMarkerMask),l.appendChild(t.dom.elForecastMask),l.appendChild(t.dom.elNonForecastMask)}_drawGridLines({i:t,x1:e,y1:s,x2:i,y2:a,xCount:o,parent:r}){const n=this.w;if(!(0===t&&n.globals.skipFirstTimelinelabel||t===o-1&&n.globals.skipLastTimelinelabel&&!n.config.xaxis.labels.formatter||"radar"===n.config.chart.type)){n.config.grid.xaxis.lines.show&&this._drawGridLine({i:t,x1:e,y1:s,x2:i,y2:a,xCount:o,parent:r});let l=0;if(n.labelData.hasXaxisGroups&&"between"===n.config.xaxis.tickPlacement){const d=n.labelData.groups;if(d){let f=0;for(let p=0;f<t&&p<d.length;p++)f+=d[p].cols;f===t&&(l=.6*n.layout.xAxisLabelsHeight)}}new wt(this.w,this.ctx).drawXaxisTicks(e,l,n.dom.elGraphical)}}_drawGridLine({i:t,x1:e,y1:s,x2:i,y2:a,xCount:o,parent:r}){const n=this.w,c=r.node.classList.contains("apexcharts-gridlines-h
1orizontal"),l=n.globals.barPadForNumericAxis,h=0===s&&0===a||0===e&&0===i||s===n.layout.gridHeight&&a===n.layout.gridHeight||n.globals.isBarHorizontal&&(0===t||t===o-1),f=new E(this.w).drawLine(e-(c?l:0),s,i+(c?l:0),a,n.config.grid.borderColor,n.config.grid.strokeDashArray);f.node.classList.add("apexcharts-gridline"),h&&n.config.grid.show?this.elGridBorders.add(f):r.add(f)}_drawGridBandRect({c:t,x1:e,y1:s,x2:i,y2:a,type:o}){const r=this.w,n=new E(this.w),c=r.globals.barPadForNumericAxis,h=n.drawRect(e-("row"===o?c:0),s,i+("row"===o?2*c:0),a,0,r.config.grid[o].colors[t],r.config.grid[o].opacity);this.elg.add(h),h.attr("clip-path",`url(#gridRectMask${r.globals.cuid})`),h.node.classList.add(`apexcharts-grid-${o}`)}_drawXYLines({xCount:t,tickAmount:e}){var s;const i=this.w,a=({xC:r,y1:c,y2:h})=>{for(let d=0;d<r;d++)this._drawGridLines({i:d,x1:this.xaxisLabels[d].position,y1:c,x2:this.xaxisLabels[d].position,y2:h,xCount:t,parent:this.elgridLinesV})},o=({xC:r,x1:n,y1:c,x2:l,y2:h})=>{for(let d=0;d<r+(i.axisFlags.isXNumeric?0:1);d++)0===d&&1===r&&1===i.globals.dataPoints&&(l=n=i.layout.gridWidth/2),this._drawGridLines({i:d,x1:n,y1:c,x2:l,y2:h,xCount:t,parent:this.elgridLinesV}),l=n+=i.layout.gridWidth/(i.axisFlags.isXNumeric?r-1:r)};if(i.config.grid.xaxis.lines.show||i.config.xaxis.axisTicks.show){const r=i.globals.padHorizontal,n=0;let c;const l=i.layout.gridHeight;i.labelData.timescaleLabels.length?a({xC:t,x1:r,y1:n,x2:c,y2:l}):(i.axisFlags.isXNumeric&&(t=null==(s=i.globals.xAxisScale)?void 0:s.result.length),o({xC:t,x1:r,y1:n,x2:c,y2:l}))}if(i.config.grid.yaxis.lines.show){let n=0,c=0;const l=i.layout.gridWidth;let h=e+1;this.isRangeBar&&(h=i.labelData.labels.length);for(let d=0;d<h+(this.isRangeBar?1:0);d++)this._drawGridLine({i:d,xCount:h+(this.isRangeBar?1:0),x1:0,y1:n,x2:l,y2:c,parent:this.elgridLinesH}),n+=i.layout.gridHeight/(this.isRangeBar?h:e),c=n}}_drawInvertedXYLines({xCount:t}){const e=this.w;if(e.config.grid.xaxis.lines.show||e.config.xaxis.axisTicks.show){let s=e.globals.padHorizontal;const i=0;let a;const o=e.layout.gridHeight;for(let r=0;r<t+1;r++)e.config.grid.xaxis.lines.show&&this._drawGridLine({i:r,xCount:t+1,x1:s,y1:i,x2:a,y2:o,parent:this.elgridLinesV}),new wt(this.w,this.ctx).drawXaxisTicks(s,0,e.dom.elGraphical),s+=e.layout.gridWidth/t,a=s}if(e.config.grid.yaxis.lines.show){let i=0,a=0;const o=e.layout.gridWidth;for(let r=0;r<e.globals.dataPoints+1;r++)this._drawGridLine({i:r,xCount:e.globals.dataPoints+1,x1:0,y1:i,x2:o,y2:a,parent:this.elgridLinesH}),i+=e.layout.gridHeight/e.globals.dataPoints,a=i}}renderGrid(){var t,e,s;const i=this.w,a=i.globals,o=new E(this.w);this.elg=o.group({class:"apexcharts-grid"}),this.elgridLinesH=o.group({class:"apexcharts-gridlines-horizontal"}),this.elgridLinesV=o.group({class:"apexcharts-gridlines-vertical"}),this.elGridBorders=o.group({class:"apexcharts-grid-borders"}),this.elg.add(this.elgridLinesH),this.elg.add(this.elgridLinesV),i.config.grid.show||(this.elgridLinesV.hide(),this.elgridLinesH.hide(),this.elGridBorders.hide());let r=0;for(;r<a.seriesYAxisMap.length&&a.ignoreYAxisIndexes.includes(r);)r++;r===a.seriesYAxisMap.length&&(r=0);let c,n=a.yAxisScale[r].result.length-1;return!a.isBarHorizontal||this.isRangeBar?(c=this.xaxisLabels.length,this.isRangeBar&&(n=i.labelData.labels.length,i.config.xaxis.tickAmount&&i.config.xaxis.labels.formatter&&(c=i.config.xaxis.tickAmount),(null==(s=null==(e=null==(t=a.yAxisScale)?void 0:t[r])?void 0:e.result)?void 0:s.length)>0&&"datetime"!==i.config.xaxis.type&&(c=a.yAxisScale[r].result.length-1)),this._drawXYLines({xCount:c,tickAmount:n})):(c=n,n=a.xTickAmount,this._drawInvertedXYLines({xCount:c,tickAmount:n})),this.drawGridBands(c,n),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:i.layout.gridWidth/c}}drawGridBands(t,e){var s,i,a,o,r;const n=this.w;if((null==(s=n.config.grid.row.colors)?void 0:s.length)>0&&((l,h,d,f,p,g)=>{for(let u=0,b=0;u<h;u++,b++)b>=n.config.grid.row.colors.length&&(b=0),this._drawGridBandRect({c:b,x1:0,y1:f,x2:p,y2:g,type:"row"}),f+=n.layout.gridHeight/e})(0,e,0,0,n.layout.gridWidth,n.layout.gridHeight/e),(null==(i=n.config.grid.column.colors)?void 0:i.length)>0){let l=n.globals.isBarHorizontal||"on"!==n.config.xaxis.tickPlacement||"category"!==n.config.xaxis.type&&!n.config.xaxis.convertedCatToNumeric?t:t-1;n.axisFlags.isXNumeric&&(l=(null!=(o=null==(a=n.globals.xAxisScale)?void 0:a.result.length)?o:1)-1);let h=n.globals.padHorizontal;const d=0;let f=n.globals.padHorizontal+n.layout.gridWidth/l;const p=n.layout.gridHeight;for(let g=0,u=0;g<t;g++,u++)u>=n.config.grid.column.colors.length&&(u=0),"datetime"===n.config.xaxis.type&&(h=this.xaxisLabels[g].position,f=((null==(r=this.xaxisLabels[g+1])?void 0:r.position)||n.layout.gridWidth)-this.xaxisLabels[g].position),this._drawGri
1dBandRect({c:u,x1:h,y1:d,x2:f,y2:p,type:"column"}),h+=n.layout.gridWidth/l}}}class ie{constructor(t){this.w=t,this.coreUtils=new q(this.w)}niceScale(t,e,s=0){const a=this.w,o=a.globals;let r,n,c,l;o.isBarHorizontal?(r=a.config.xaxis,n=Math.max((o.svgWidth-100)/25,2)):(r=a.config.yaxis[s],n=Math.max((o.svgHeight-100)/15,2)),D.isNumber(n)||(n=10),c=null!=r.min,l=void 0!==r.max&&null!==r.min;let h=null!=r.stepSize,d=null!=r.tickAmount,f=d?r.tickAmount:It[Math.min(Math.round(n/2),It.length-1)];if(o.isMultipleYAxis&&!d&&o.multiAxisTickAmount>0&&(f=o.multiAxisTickAmount,d=!0),f="dataPoints"===f?o.dataPoints-1:Math.abs(Math.round(f)),(t===Number.MIN_VALUE&&0===e||!D.isNumber(t)&&!D.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=D.isNumber(r.min)?r.min:0,e=D.isNumber(r.max)?r.max:t+f,o.allSeriesCollapsed=!1),t>e){console.warn("axis.min cannot be greater than axis.max: swapping min and max");const P=e;e=t,t=P}else t===e&&(t=0===t?0:t-1,e=0===e?2:e+1);const p=[];f<1&&(f=1);let g=f,u=Math.abs(e-t);!c&&t>0&&t/u<.15&&(t=0,c=!0),!l&&e<0&&-e/u<.15&&(e=0,l=!0),u=Math.abs(e-t);let x=u/g,w=x;const m=Math.floor(Math.log10(w)),y=Math.pow(10,m);let v=Math.ceil(w/y);if(v=Qt[0===o.yValueDecimal?0:1][v],w=v*y,x=w,o.isBarHorizontal&&r.stepSize&&"datetime"!==r.type?(x=r.stepSize,h=!0):h&&(x=r.stepSize),h&&r.forceNiceScale){const P=Math.floor(Math.log10(x));x*=Math.pow(10,m-P)}if(c&&l){let P=u/g;if(d)if(h)if(0!=D.mod(u,x)){const M=D.getGCD(x,P);x=P/M<10?M:P}else 0==D.mod(x,P)?x=P:(P=x,d=!1);else x=P;else if(h)0==D.mod(u,x)?P=x:x=P;else if(0==D.mod(u,x))P=x;else{g=Math.ceil(u/x),P=u/g;const M=D.getGCD(u,x);u/M<n&&(P=M),x=P}g=Math.round(u/x)}else{if(c||l){if(l)if(d)t=e-x*g;else{const P=t;t=x*Math.floor(t/x),Math.abs(e-t)/D.getGCD(u,x)>n&&(t=e-x*f,t+=x*Math.floor((P-t)/x))}else if(c)if(d)e=t+x*g;else{const P=e;e=x*Math.ceil(e/x),Math.abs(e-t)/D.getGCD(u,x)>n&&(e=t+x*f,e+=x*Math.ceil((P-e)/x))}}else if(o.isMultipleYAxis&&d){const P=x*Math.floor(t/x);let M=P+x*g;M<e&&(x*=2),M=e,e=(t=P)+x*g,u=Math.abs(e-t),t>0&&t<Math.abs(M-e)&&(t=0,e=x*g),e<0&&-e<Math.abs(P-t)&&(e=0,t=-x*g)}else t=x*Math.floor(t/x),e=x*Math.ceil(e/x);u=Math.abs(e-t),x=D.getGCD(u,x),g=Math.round(u/x)}if(!d&&!(c||l)&&(g=Math.ceil((u-1e-11)/(x+1e-11)),g>16&&D.getPrimeFactors(g).length<2&&g++),!d&&r.forceNiceScale&&0===o.yValueDecimal&&g>u&&(g=u,x=Math.round(u/g)),g>n&&(!d&&!h||r.forceNiceScale)){const P=D.getPrimeFactors(g),M=P.length-1;let F=g;t:for(var C=0;C<M;C++)for(var L=0;L<=M-C;L++){const X=Math.min(L+C,M);let Y=F,R=1;for(var k=L;k<=X;k++)R*=P[k];if(Y/=R,Y<n){F=Y;break t}}x=F===g?u:u/F,g=Math.round(u/x)}o.isMultipleYAxis&&0==o.multiAxisTickAmount&&o.ignoreYAxisIndexes.indexOf(s)<0&&(o.multiAxisTickAmount=g);let S=t-x;const T=1e-11*x;do{S+=x,p.push(D.stripNumber(S,7))}while(e-S>T);return{result:p,niceMin:p[0],niceMax:p[p.length-1]}}linearScale(t,e,s=10,i=0,a=void 0){const o=Math.abs(e-t);let r=[];if(t===e)return r=[t],{result:r,niceMin:r[0],niceMax:r[r.length-1]};"dataPoints"===(s=this._adjustTicksForSmallRange(s,i,o))&&(s=this.w.globals.dataPoints-1);const n=s;if(a||(a=o/n),0!==a&&isFinite(a)){const d=Math.floor(Math.log10(Math.abs(a))),f=Math.max(2,2-d),p=Math.pow(10,f);a=Math.round((a+Number.EPSILON)*p)/p}let l=s===Number.MAX_VALUE?5:n;s===Number.MAX_VALUE&&(a=1);let h=t;for(;l>=0;)r.push(h),h=D.preciseAddition(h,a),l-=1;return{result:r,niceMin:r[0],niceMax:r[r.length-1]}}logarithmicScaleNice(t,e,s){e<=0&&(e=Math.max(t,s)),t<=0&&(t=Math.min(e,s));const i=[],a=Math.ceil(Math.log(e)/Math.log(s)+1);for(let r=Math.floor(Math.log(t)/Math.log(s));r<a;r++)i.push(Math.pow(s,r));return{result:i,niceMin:i[0],niceMax:i[i.length-1]}}logarithmicScale(t,e,s){e<=0&&(e=Math.max(t,s)),t<=0&&(t=Math.min(e,s));const i=[],a=Math.log(e)/Math.log(s),o=Math.log(t)/Math.log(s),r=a-o,n=Math.round(r),c=r/n;for(let l=0,h=o;l<n;l++,h+=c)i.push(Math.pow(s,h));return i.push(Math.pow(s,a)),{result:i,niceMin:t,niceMax:e}}_adjustTicksForSmallRange(t,e,s){let i=t;if(typeof e<"u"&&this.w.config.yaxis[e].labels.formatter&&void 0===this.w.config.yaxis[e].tickAmount){const a=Number(this.w.config.yaxis[e].labels.formatter(1));D.isNumber(a)&&0===this.w.globals.yValueDecimal&&(i=Math.ceil(s))}return i<t?i:t}setYScaleForIndex(t,e,s){const i=this.w.globals,a=this.w.config,o=i.isBarHorizontal?a.xaxis:a.yaxis[t];typeof i.yAxisScale[t]>"u"&&(i.yAxisScale[t]=[]);const r=Math.abs(s-e);o.logarithmic&&r<=5&&(i.invalidLogScale=!0),o.logarithmic&&r>5?(i.allSeriesCollapsed=!1,i.yAxisScale[t]=o.forceNiceScale?this.logarithmicScaleNice(e,s,o.logBase):this.logarithmicScale(e,s,o.logBase)):s!==-Number.MAX_VALUE&&D.isNumber(s)&&e!==Number.MAX_VALUE&&D.isNumber(e)?(i.allSeriesCollapsed=!1,i.yAxisScale[t]=this.niceScale(e,s,t)):i.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t)}setXScale(t,e){const s=this.w,i=s.globals;return i.xAxisScale=e!==-Number.MAX_VALUE&&D.isNumber(e)?this.linearScale(t,e,i.xTickAmount,0,void 0===s.config.xaxis.max?s.config.xaxis.stepSize:void 0):this.linearScale(0,10,10),i.xAxisScale}scaleMultipleYAxes(){const t=this.w.config,e=this.w.globals;this.coreUtils.setSeriesYAxisMappings();const s=e.seriesYAxisMap,i=e.minYArr,a=e.maxYArr;
1e.allSeriesCollapsed=!0,e.barGroups=[],s.forEach((o,r)=>{const n=[];if(o.forEach(c=>{var l;const h=null==(l=t.series[c])?void 0:l.group;n.indexOf(h)<0&&n.push(h)}),o.length>0){let f,p,c=Number.MAX_VALUE,l=-Number.MAX_VALUE,h=c,d=l;if(t.chart.stacked){const g=new Array(e.dataPoints).fill(0),u=[],b=[],x=[];n.forEach(()=>{u.push(g.map(()=>Number.MIN_VALUE)),b.push(g.map(()=>Number.MIN_VALUE)),x.push(g.map(()=>Number.MIN_VALUE))});for(let w=0;w<o.length;w++){!f&&t.series[o[w]].type&&(f=t.series[o[w]].type);const m=o[w];p=t.series[m].group?t.series[m].group:"axis-".concat(r.toString()),!(e.collapsedSeriesIndices.indexOf(m)<0&&e.ancillaryCollapsedSeriesIndices.indexOf(m)<0)||(e.allSeriesCollapsed=!1,n.forEach((v,C)=>{if(t.series[m].group===v)for(let L=0;L<this.w.seriesData.series[m].length;L++){const k=this.w.seriesData.series[m][L];k>=0?b[C][L]+=k:x[C][L]+=k,u[C][L]+=k,h=Math.min(h,k),d=Math.max(d,k)}})),("bar"===f||"column"===f)&&e.barGroups.push(p)}f||(f=t.chart.type),"bar"===f||"column"===f?n.forEach((w,m)=>{c=Math.min(c,Math.min.apply(null,x[m])),l=Math.max(l,Math.max.apply(null,b[m]))}):(n.forEach((w,m)=>{h=Math.min(h,Math.min.apply(null,u[m])),d=Math.max(d,Math.max.apply(null,u[m]))}),c=h,l=d),c===Number.MIN_VALUE&&l===Number.MIN_VALUE&&(l=-Number.MAX_VALUE)}else for(let g=0;g<o.length;g++){const u=o[g];c=Math.min(c,i[u]),l=Math.max(l,a[u]),!(e.collapsedSeriesIndices.indexOf(u)<0&&e.ancillaryCollapsedSeriesIndices.indexOf(u)<0)||(e.allSeriesCollapsed=!1)}void 0!==t.yaxis[r].min&&(c="function"==typeof t.yaxis[r].min?t.yaxis[r].min(c):t.yaxis[r].min),void 0!==t.yaxis[r].max&&(l="function"==typeof t.yaxis[r].max?t.yaxis[r].max(l):t.yaxis[r].max),e.barGroups=e.barGroups.filter((g,u,b)=>b.indexOf(g)===u),this.setYScaleForIndex(r,c,l),o.forEach(g=>{i[g]=e.yAxisScale[r].niceMin,a[g]=e.yAxisScale[r].niceMax})}else this.setYScaleForIndex(r,0,-Number.MAX_VALUE)})}}class Nt{constructor(t){this.w=t,this.scales=new ie(this.w)}init(){this.setYRange(),this.setXRange(),this.setZRange()}getMinYMaxY(t,e=Number.MAX_VALUE,s=-Number.MAX_VALUE,i=null){var a,o,r,n,c;const l=this.w.config,h=this.w.globals;let d=-Number.MAX_VALUE,f=Number.MIN_VALUE;null===i&&(i=t+1);const p=this.w.seriesData.series;let g=p,u=p;"candlestick"===l.chart.type?(g=this.w.candleData.seriesCandleL,u=this.w.candleData.seriesCandleH):"boxPlot"===l.chart.type?(g=this.w.candleData.seriesCandleO,u=this.w.candleData.seriesCandleC):this.w.axisFlags.isRangeData&&(g=this.w.rangeData.seriesRangeStart,u=this.w.rangeData.seriesRangeEnd);let b=!1;if(this.w.seriesData.seriesX.length>=i){const x=null==(a=h.brushSource)?void 0:a.w.config.chart.brush;(l.chart.zoom.enabled&&l.chart.zoom.autoScaleYaxis||x?.enabled&&x?.autoScaleYaxis)&&(b=!0)}for(let x=t;x<i;x++){h.dataPoints=Math.max(h.dataPoints,p[x].length);const w=l.series[x].type;this.w.labelData.categoryLabels.length&&(h.dataPoints=this.w.labelData.categoryLabels.filter(v=>typeof v<"u").length),this.w.labelData.labels.length&&"datetime"!==l.xaxis.type&&0!==this.w.seriesData.series.reduce((v,C)=>v+C.length,0)&&(h.dataPoints=Math.max(h.dataPoints,this.w.labelData.labels.length));let m=0,y=p[x].length-1;if(b){if(l.xaxis.min)for(;m<y&&this.w.seriesData.seriesX[x][m]<l.xaxis.min;m++);if(l.xaxis.max)for(;y>m&&this.w.seriesData.seriesX[x][y]>l.xaxis.max;y--);}for(let v=m;v<=y&&v<this.w.seriesData.series[x].length;v++){let C=p[x][v];if(null!==C&&D.isNumber(C)){switch(typeof(null==(o=u[x])?void 0:o[v])<"u"&&(d=Math.max(d,u[x][v]),e=Math.min(e,u[x][v])),typeof(null==(r=g[x])?void 0:r[v])<"u"&&(e=Math.min(e,g[x][v]),s=Math.max(s,g[x][v])),w){case"candlestick":typeof this.w.candleData.seriesCandleC[x][v]<"u"&&(d=Math.max(d,this.w.candleData.seriesCandleH[x][v]),e=Math.min(e,this.w.candleData.seriesCandleL[x][v]));break;case"boxPlot":typeof this.w.candleData.seriesCandleC[x][v]<"u"&&(d=Math.max(d,this.w.candleData.seriesCandleC[x][v]),e=Math.min(e,this.w.candleData.seriesCandleO[x][v]))}w&&"candlestick"!==w&&"boxPlot"!==w&&"rangeArea"!==w&&"rangeBar"!==w&&(d=Math.max(d,this.w.seriesData.series[x][v]),e=Math.min(e,this.w.seriesData.series[x][v])),this.w.seriesData.seriesGoals[x]&&this.w.seriesData.seriesGoals[x][v]&&Array.isArray(this.w.seriesData.seriesGoals[x][v])&&this.w.seriesData.seriesGoals[x][v].forEach(L=>{d=Math.max(d,L.value),e=Math.min(e,L.value)}),s=d,C=D.noExponents(C),D.isFloat(C)&&(h.yValueDecimal=Math.max(h.yValueDecimal,C.toString().split(".")[1].length)),f>(null==(n=g[x])?void 0:n[v])&&(null==(c=g[x])?void 0:c[v])<0&&(f=g[x][v])}else h.hasNullValues=!0}("bar"===w||"column"===w)&&(f<0&&d<0&&(d=0,s=Math.max(s,0)),f===Number.MIN_VALUE&&(f=0,e=Math.min(e,0)))}return"rangeBar"===l.chart.type&&this.w.rangeData.seriesRangeStart.length&&h.isBarHorizontal&&(f=e),"bar"===l.chart.type&&(f<0&&d<0&&(d=0),f===Number.MIN_VALUE&&(f=0)),{minY:f,maxY:d,lowestY:e,highestY:s}}setYRange(){const t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;let i,s=Number.MAX_VALUE;if(t.isMultipleYAxis){s=Number.MAX_VALUE;for(let a=0;a<this.w.seriesData.series.length;a++)i=this.getMinYMaxY(a),t.minYArr[a]=i.lowestY,t.maxYArr[a]=i.highestY,s=Math.min(s,i.lowestY)}return i=this.getMinYMaxY(0,s,void 0,this.w.seriesData.series.length),"bar"===e.chart.type?(t.minY=i.minY,t.maxY=i.maxY):(t.minY=i.lowestY,t.maxY=i.highestY),s=i.lowestY,e.chart.stacked&&this._setStackedMinMax(),"line"===e.chart.type||"area"===e.chart.type||"scatter"===e.chart.type||"candlestick"===e.chart.type||"boxPlot"===e.chart.type||"rangeBar"===e.chart.type&&!t.isBarHorizontal?t.minY===Number.MIN_VALUE&&s!==-Number.MAX_VALUE&&s!==t.maxY&&(t.minY=s):t.minY=t.minY!==Number.MIN_VALUE?Math.min(i.minY,t.minY):i.minY,e.yaxis.forEach((a,o)=>{void 0!==a.max&&("number"==typeof a.max?t.maxYArr[o]=a.max:"function"==typeof a.max&&(t.maxYArr[o]=a.max(t.isMultipleYAxis?t.maxYArr[o]:t.maxY)),t.maxY=t.maxYArr[o]),void 0!==a.min&&("number"==typeof a.min?t.minYArr[o]=a.min:"function"==typeof a.min&&(t.minYArr[o]=a.min(t.isMultipleYAxis?t.minYArr[o]===Number.MIN_VALUE?0:t.minYArr[o]:t.minY)),t.minY=t.minYArr[o])}),t.isBarHorizontal&&["min","max"].forEach(o=>{void 0!==e.xaxis[o]&&"number"==typeof e.xaxis[o]&&("min"===o?t.minY=e.xaxis[o]:t.maxY=e.xaxis[o])}),t.isMultipleYAxis?(this.scales.scaleMultipleYAxes(),t.minY=s):(this.scales.setYScaleForIndex(0,t.minY,t.maxY),t.minY=t.yAxisScale[0].niceMin,t.maxY=t.yAxisScale[0].niceMax,t.minYArr[0]=t.minY,t.maxYArr[0]=t.maxY),t.barGroups=[],t.lineGroups=[],t.areaGroups=[],e.series.forEac
1h(a=>{const o=a;switch(o.type||e.chart.type){case"bar":case"column":t.barGroups.push(o.group);break;case"line":t.lineGroups.push(o.group);break;case"area":t.areaGroups.push(o.group)}}),t.barGroups=t.barGroups.filter((a,o,r)=>r.indexOf(a)===o),t.lineGroups=t.lineGroups.filter((a,o,r)=>r.indexOf(a)===o),t.areaGroups=t.areaGroups.filter((a,o,r)=>r.indexOf(a)===o),{minY:t.minY,maxY:t.maxY,minYArr:t.minYArr,maxYArr:t.maxYArr,yAxisScale:t.yAxisScale}}setXRange(){const t=this.w.globals,e=this.w.config,s="numeric"===e.xaxis.type||"datetime"===e.xaxis.type||"category"===e.xaxis.type&&!this.w.axisFlags.noLabelsProvided||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.isXNumeric;if(this.w.axisFlags.isXNumeric&&(()=>{for(let a=0;a<this.w.seriesData.series.length;a++)if(this.w.labelData.labels[a])for(let o=0;o<this.w.labelData.labels[a].length;o++)null!==this.w.labelData.labels[a][o]&&D.isNumber(this.w.labelData.labels[a][o])&&(t.maxX=Math.max(t.maxX,this.w.labelData.labels[a][o]),t.initialMaxX=Math.max(t.maxX,this.w.labelData.labels[a][o]),t.minX=Math.min(t.minX,this.w.labelData.labels[a][o]),t.initialMinX=Math.min(t.minX,this.w.labelData.labels[a][o]))})(),this.w.axisFlags.noLabelsProvided&&0===e.xaxis.categories.length&&(t.maxX=this.w.labelData.labels[this.w.labelData.labels.length-1],t.initialMaxX=this.w.labelData.labels[this.w.labelData.labels.length-1],t.minX=1,t.initialMinX=1),this.w.axisFlags.isXNumeric||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.dataFormatXNumeric){let a=10;if(void 0===e.xaxis.tickAmount)a=Math.round(t.svgWidth/150),"numeric"===e.xaxis.type&&t.dataPoints<30&&(a=t.dataPoints-1),a>t.dataPoints&&0!==t.dataPoints&&(a=t.dataPoints-1);else if("dataPoints"===e.xaxis.tickAmount){if(this.w.seriesData.series.length>1&&(a=this.w.seriesData.series[t.maxValsInArrayIndex].length-1),this.w.axisFlags.isXNumeric){const o=Math.round(t.maxX-t.minX);o<30&&(a=o)}}else a=e.xaxis.tickAmount;if(t.xTickAmount=a,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!this.w.axisFlags.dataFormatXNumeric){const o=[];for(let r=t.minX-1;r<t.maxX;r++)o.push(r+1);t.xAxisScale={result:o,niceMin:o[0],niceMax:o[o.length-1]}}else t.xAxisScale=this.scales.setXScale(t.minX,t.maxX);else t.xAxisScale=this.scales.linearScale(0,a,a,0,e.xaxis.stepSize),this.w.axisFlags.noLabelsProvided&&this.w.labelData.labels.length>0&&(t.xAxisScale=this.scales.linearScale(1,this.w.labelData.labels.length,a-1,0,e.xaxis.stepSize),this.w.seriesData.seriesX=this.w.labelData.labels.slice());s&&(this.w.labelData.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&this.w.labelData.labels.length&&(t.xTickAmount=this.w.labelData.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}setZRange(){const t=this.w.globals;if(this.w.axisFlags.isDataXYZ)for(let e=0;e<this.w.seriesData.series.length;e++)if(typeof this.w.seriesData.seriesZ[e]<"u")for(let s=0;s<this.w.seriesData.seriesZ[e].length;s++)null!==this.w.seriesData.seriesZ[e][s]&&D.isNumber(this.w.seriesData.seriesZ[e][s])&&(t.maxZ=Math.max(t.maxZ,this.w.seriesData.seriesZ[e][s]),t.minZ=Math.min(t.minZ,this.w.seriesData.seriesZ[e][s]))}_handleSingleDataPoint(){const t=this.w.globals,e=this.w.config;if(t.minX===t.maxX){const s=new K(this.w);if("datetime"===e.xaxis.type){const i=s.getDate(t.minX);e.xaxis.labels.datetimeUTC?i.setUTCDate(i.getUTCDate()-2):i.setDate(i.getDate()-2),t.minX=new Date(i).getTime();const a=s.getDate(t.maxX);e.xaxis.labels.datetimeUTC?a.setUTCDate(a.getUTCDate()+2):a.setDate(a.getDate()+2),t.maxX=new Date(a).getTime()}else("numeric"===e.xaxis.type||"category"===e.xaxis.type&&!this.w.axisFlags.noLabelsProvided)&&(t.minX=t.minX-2,t.initialMinX=t.minX,t.maxX=t.maxX+2,t.initialMaxX=t.maxX)}}_getMinXDiff(){const t=this.w.globals;this.w.axisFlags.isXNumeric&&this.w.seriesData.seriesX.forEach(e=>{if(e.length){1===e.length&&e.push(this.w.seriesData.seriesX[t.maxValsInArrayIndex][this.w.seriesData.seriesX[t.maxValsInArrayIndex].length-1]);const s=e.slice();s.sort((i,a)=>
1i-a),s.forEach((i,a)=>{if(a>0){const o=i-s[a-1];o>0&&(t.minXDiff=Math.min(o,t.minXDiff))}}),(1===t.dataPoints||t.minXDiff===Number.MAX_VALUE)&&(t.minXDiff=.5)}})}_setStackedMinMax(){const t=this.w.globals;if(!this.w.seriesData.series.length)return;let e=this.w.labelData.seriesGroups;e.length||(e=[this.w.seriesData.seriesNames.map(a=>a)]);const s={},i={};e.forEach(a=>{s[a]=[],i[a]=[],this.w.config.series.map((r,n)=>a.indexOf(this.w.seriesData.seriesNames[n])>-1?n:null).filter(r=>null!==r).forEach(r=>{var n,c,l,h;for(let d=0;d<this.w.seriesData.series[t.maxValsInArrayIndex].length;d++)typeof s[a][d]>"u"&&(s[a][d]=0,i[a][d]=0),(this.w.config.chart.stacked&&!t.comboCharts||this.w.config.chart.stacked&&t.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null==(c=null==(n=this.w.config.series)?void 0:n[r])?void 0:c.type)||"column"===(null==(h=null==(l=this.w.config.series)?void 0:l[r])?void 0:h.type)))&&null!==this.w.seriesData.series[r][d]&&D.isNumber(this.w.seriesData.series[r][d])&&(this.w.seriesData.series[r][d]>0?s[a][d]+=parseFloat(String(this.w.seriesData.series[r][d]))+1e-4:i[a][d]+=parseFloat(String(this.w.seriesData.series[r][d])))})}),Object.entries(s).forEach(([a])=>{s[a].forEach((o,r)=>{t.maxY=Math.max(t.maxY,s[a][r]),t.minY=Math.min(t.minY,i[a][r])})})}}class zt{constructor(t,{theme:e=null,timeScale:s=null}={},i){this.w=t,this.elgrid=i,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="bottom"===t.config.xaxis.position?t.layout.gridHeight:0,this.drawnLabels=[],this.axesUtils=new rt(t,{theme:e,timeScale:s})}drawYaxis(t){const e=this.w,s=new E(this.w),i=e.config.yaxis[t].labels.style,{fontSize:a,fontFamily:o,fontWeight:r}=i,n=s.group({class:"apexcharts-yaxis",rel:t,transform:`translate(${e.globals.translateYAxisX[t]}, 0)`});if(this.axesUtils.isYAxisHidden(t))return n;const c=s.group({class:"apexcharts-yaxis-texts-g"});n.add(c);const l=e.globals.yAxisScale[t].result.length-1,h=e.layout.gridHeight/l,d=e.formatters.yLabelFormatters[t],f=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());if(e.config.yaxis[t].labels.show){let p=e.layout.translateY+e.config.yaxis[t].labels.offsetY;e.globals.isBarHorizontal?p=0:"heatmap"===e.config.chart.type&&(p-=h/2),p+=parseInt(a,10)/3;let g=null;for(let u=l;u>=0;u--){const b=d(f[u],u,e);let x=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&0!==e.config.yaxis.length&&(x*=-1);const w=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),m=this.axesUtils.getYAxisForeColor(i.colors,t),y=Array.isArray(m)?m[u]:m,v=Array.from(e.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-label tspan`)).map(L=>L.textContent),C=s.drawText({x,y:p,text:v.includes(b)&&!e.config.yaxis[t].labels.showDuplicates?"":b,textAnchor:w,fontSize:a,fontFamily:o,fontWeight:r,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:y,isPlainText:!1,cssClass:`apexcharts-yaxis-label ${i.cssClass}`});c.add(C),this.addTooltip(C,b),null===g&&(g=C),0!==e.config.yaxis[t].labels.rotate&&this.rotateLabel(s,C,g,e.config.yaxis[t].labels.rotate),p+=h}}return this.addYAxisTitle(s,n,t),this.addAxisBorder(s,n,t,l,h),n}getTextAnchor(t,e){return"left"===t?"start":"center"===t?"middle":"right"===t?"end":e?"start":"end"}addTooltip(t,e){const s=B.createElementNS(V,"title");s.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(s)}rotateLabel(t,e,s,i){const a=t.rotateAroundCenter(s.node),o=t.rotateAroundCenter(e.node);e.node.setAttribute("transform",`rotate(${i} ${a.x} ${o.y})`)}addYAxisTitle(t,e,s){const i=this.w;if(void 0!==i.config.yaxis[s].title.text){const a=t.group({class:"apexcharts-yaxis-title"}),r=t.drawText({x:i.config.yaxis[s].opposite?i.globals.translateYAxisX[s]:0,y:i.layout.gridHeight/2+i.layout.translateY+i.config.yaxis[s].title.offsetY,text:i.config.yaxis[s].title.text,textAnchor:"end",foreColor:i.config.yaxis[s].title.style.color,fontSize:i.config.yaxis[s].title.style.fontSize,fontWeight:i.config.yaxis[s].title.style.fontWeight,fontFamily:i.config.yaxis[s].title.style.fontFamily,cssClass:`apexcharts-yaxis-title-text ${i.config.yaxis[s].title.style.cssClass}`});a.add(r),e.add(a)}}addAxisBorder(t,e,s,i,a){const o=this.w,r=o.config.yaxis[s].axisBorder;let n=31+r.offsetX;if(o.config.yaxis[s].opposite&&(n=-31-r.offsetX),r.show){const c=t.drawLine(n,o.layout.translateY+r.offsetY-2,n,o.layout.gridHeight+o.layout.translateY+r.offsetY+2,r.color,0,r.width);e.add(c)}o.config.yaxis[s].axisTicks.show&&this.axesUtils.drawYAxisTicks(n,i,r,o.config.yaxis[s].axisTicks,s,a,e)}drawYaxisInversed(t){const e=this.w,s=new E(this.w),i=s.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),a=s.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${e.layout.translateXAxisX}, ${e.layout.translateXAxisY})`});i.add(a);let o=e.globals.yAxisScale[t].result.length-1;const r=e.layout.gridWidth/o+.1;let n=r+e.config.xaxis.labels.offsetX;const c=e.formatters.xLabelFormatter;
vendor: 12,128 bytes, line 1
1let l=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());const h=e.labelData.timescaleLabels;if(h.length>0&&(this.xaxisLabels=h.slice(),l=h.slice(),o=l.length),e.config.xaxis.labels.show)for(let d=h.length?0:o;h.length?d<h.length:d>=0;h.length?d++:d--){let f=c?.(l[d],d,e),p=e.layout.gridWidth+e.globals.padHorizontal-(n-r+e.config.xaxis.labels.offsetX);if(h.length){const u=this.axesUtils.getLabel(l,h,p,d,this.drawnLabels,this.xaxisFontSize);p=u.x,f=u.text,this.drawnLabels.push(u.text),0===d&&e.globals.skipFirstTimelinelabel&&(f=""),d===l.length-1&&e.globals.skipLastTimelinelabel&&(f="")}const g=s.drawText({x:p,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.layout.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:f,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.axisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:`apexcharts-xaxis-label ${e.config.xaxis.labels.style.cssClass}`});a.add(g),this.addTooltip(g,f),n+=r}return this.inversedYAxisTitleText(i),this.inversedYAxisBorder(i),i}inversedYAxisBorder(t){const e=this.w,s=new E(this.w),i=e.config.xaxis.axisBorder;if(i.show){let a=0;"bar"===e.config.chart.type&&e.axisFlags.isXNumeric&&(a-=15);const o=s.drawLine(e.globals.padHorizontal+a+i.offsetX,this.xAxisoffX,e.layout.gridWidth,this.xAxisoffX,i.color,0,i.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(o):t.add(o)}}inversedYAxisTitleText(t){const e=this.w,s=new E(this.w);if(void 0!==e.config.xaxis.title.text){const i=s.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),a=s.drawText({x:e.layout.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:`apexcharts-xaxis-title-text ${e.config.xaxis.title.style.cssClass}`});i.add(a),t.add(i)}}yAxisTitleRotate(t,e){const s=this.w,i=new E(this.w),a=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-texts-g`),o=a?a.getBoundingClientRect():{width:0,height:0},r=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-title text`),n=r?r.getBoundingClientRect():{width:0,height:0};if(r){const c=this.xPaddingForYAxisTitle(t,o,n,e);r.setAttribute("x",String(c.xPos-(e?10:0)));const l=i.rotateAroundCenter(r);r.setAttribute("transform",`rotate(${e?-1*s.config.yaxis[t].title.rotate:s.config.yaxis[t].title.rotate} ${l.x} ${l.y})`)}}xPaddingForYAxisTitle(t,e,s,i){const a=this.w;let o=0,r=10;return void 0===a.config.yaxis[t].title.text||t<0?{xPos:o,padd:0}:(i?o=e.width+a.config.yaxis[t].title.offsetX+s.width/2+r/2:(o=-1*e.width+a.config.yaxis[t].title.offsetX+r/2+s.width/2,a.globals.isBarHorizontal&&(r=25,o=-1*e.width-a.config.yaxis[t].title.offsetX-r)),{xPos:o,padd:r})}setYAxisXPosition(t,e){const s=this.w;let i=0,a=0,o=18,r=1;s.config.yaxis.length>1&&(this.multipleYs=!0),s.config.yaxis.forEach((n,c)=>{const l=s.globals.ignoreYAxisIndexes.includes(c)||!n.show||n.floating||0===t[c].width,h=t[c].width+e[c].width;n.opposite?s.globals.isBarHorizontal?(a=s.layout.gridWidth+s.layout.translateX-1,s.globals.translateYAxisX[c]=a-n.labels.offsetX):(a=s.layout.gridWidth+s.layout.translateX+r,l||(r+=h+20),s.globals.translateYAxisX[c]=a-n.labels.offsetX+20):(i=s.layout.translateX-o,l||(o+=h+20),s.globals.translateYAxisX[c]=i+n.labels.offsetX)})}setYAxisTextAlignments(){const t=this.w;Array.from(t.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((s,i)=>{const a=t.config.yaxis[i];if(a&&!a.floating&&void 0!==a.labels.align){const o=t.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${i}'] .apexcharts-yaxis-texts-g`),r=Array.from(t.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${i}'] .apexcharts-yaxis-label`)),n=o.getBoundingClientRect();r.forEach(c=>{c.setAttribute("text-anchor",a.labels.align)}),"left"!==a.labels.align||a.opposite?"center"===a.labels.align?o.setAttribute("transform",`translate(${n.width/2*(a.opposite?1:-1)}, 0)`):"right"===a.labels.align&&a.opposite&&o.setAttribute("transform",`translate(${n.width}, 0)`):o.setAttribute("transform",`translate(-${n.width}, 0)`)}})}}class _e{constructor(t,e){this.w=t,this.ctx=e,this.documentEvent=this.documentEvent.bind(this)}addEventListener(t,e){const s=this.w;Object.prototype.hasOwnProperty.call(s.globals.events,t)?s.globals.events[t].push(e):s.globals.events[t]=[e]}removeEventListener(t,e){const s=this.w;if(!Object.prototype.hasOwnProperty.call(s.globals.events,t))return;const i=s.globals.events[t].indexOf(e);-1!==i&&s.globals.events[t].splice(i,1)}fireEvent(t,e){const s=this.w;if(!Object.prototype.hasOwnProperty.call(s.globals.events,t))return;(!e||!e.length)&&(e=[]);const i=s.globals.events[t],a=i.length;for(let o=0;o<a;o++)i[o].apply(null,e)}setupEventHandlers(){const t=this.w,e=this.ctx,s=t.dom.baseEl.querySelector(t.globals.chartClass);this.ctx.eventList.forEach(i=>{s?.addEventListener(i,a=>{const o=null===a.target.getAttribute("i")&&-1!==t.interact.capturedSeriesIndex?t.interact.capturedSeriesIndex:a.target.getAttribute("i"),r=null===a.target.getAttribute("j")&&-1!==t.interact.capturedDataPointIndex?t.interact.capturedDataPointIndex:a.target.getAttribute("j"),n=Object.assign({},t,{seriesIndex:t.globals.axisCharts?o:0,dataPointIndex:r});"keydown"===a.type?t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&(e.ctx.keyboardNavigation&&e.ctx.keyboardNavigation.handleKey(a),"function"==typeof t.config.chart.events.keyDown&&t.config.chart.events.keyDown(a,e,n),e.ctx.events.fireEvent("keydown",[a,e,n])):"keyup"===a.type?t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&("function"==typeof t.config.chart.events.keyUp&&t.config.chart.events.keyUp(a,e,n),e.ctx.events.fireEvent("keyup",[a,e,n])):"mousemove"===a.type||"touchmove"===a.type?"function"==typeof t.config.chart.events.mouseMove&&t.config.chart.events.mouseMove(a,e,n):"mouseleave"===a.type||"touchleave"===a.type?"function"==typeof t.config.chart.events.mouseLeave&&t.config.chart.events.mouseLeave(a,e,n):("mouseup"===a.type&&1===a.which||"touchend"===a.type)&&("function"==typeof t.config.chart.events.click&&t.config.chart.events.click(a,e,n),e.ctx.events.fireEvent("click",[a,e,n]))},{capture:!1,passive:!0})}),this.ctx.eventList.forEach(i=>{t.dom.baseEl.addEventListener(i,this.documentEvent,{passive:!0})}),this.ctx.core.setupBrushHandler()}documentEvent(t){const e=this.w,s=t.target.className;if("click"===t.type){const i=e.dom.baseEl.querySelector(".apexcharts-menu");i&&i.classList.contains("apexcharts-menu-open")&&"apexcharts-menu-icon"!==s&&i.classList.remove("apexcharts-menu-open")}e.interact.clientX="touchmove"===t.type?t.touches[0].clientX:t.clientX,e.interact.clientY="touchmove"===t.type?t.touches[0].clientY:t.clientY}}class Ne{constructor(t){this.w=t}setCurrentLocaleValues(t){let e=this.w.config.chart.locales;const s=_.getApex();s.chart&&s.chart.locales&&s.chart.locales.length>0&&(e=this.w.config.chart.locales.concat(s.chart.locales));const i=e.filter(a=>a.name===t)[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");{const a=D.extend(Kt,i);this.w.globals.locale=a.options}}}class Be{constructor(t,e){this.w=t,this.ctx=e}drawAxis(t,e){const s=this.w.globals,i=this.w.config,a=new wt(this.w,this.ctx,e),o=new zt(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale},e);if(s.axisCharts&&"radar"!==t){let r,n;s.isBarHorizontal?(n=o.drawYaxisInversed(0),r=a.drawXaxisInversed(0),this.w.dom.elGraphical.add(r),this.w.dom.elGraphical.add(n)):(r=a.drawXaxis(),this.w.dom.elGraphical.add(r),i.yaxis.map((c,l)=>{if(-1===s.ignoreYAxisIndexes.indexOf(l)&&(n=o.drawYaxis(l),this.w.dom.Paper.add(n),"back"===this.w.config.grid.position)){const h=this.w.dom.Paper.children()[1];h&&(h.remove(),this.w.dom.Paper.add(h))}}))}}}class Ot{constructor(t){this.w=t}drawXCrosshairs(){const t=this.w,e=new E(this.w),s=new J(this.w),i=t.config.xaxis.crosshairs.fill.gradient,a=t.config.xaxis.crosshairs.dropShadow,f=a.enabled,p=a.left,g=a.top,u=a.blur,b=a.color,x=a.opacity;let w=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===t.config.xaxis.crosshairs.fill.type&&(w=e.drawGradient("vertical",i.colorFrom,i.colorTo,i.opacityFrom,i.opacityTo,null,i.stops,[]));let m=e.drawRect();1===t.config.xaxis.crosshairs.width&&(m=e.drawLine(0,0,0,0));let y=t.layout.gridHeight;(!D.isNumber(y)||y<0)&&(y=0);let v=t.config.xaxis.crosshairs.width;(!D.isNumber(v)||Number(v)<0)&&(v=0),m.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:y,width:v,height:y,fill:w,filter:"none","fill-opacity":t.config.xaxis.crosshairs.opacity,stroke:t.config.xaxis.crosshairs.stroke.color,"stroke-width":t.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":t.config.xaxis.crosshairs.stroke.dashArray}),f&&(m=s.dropShadow(m,{left:p,top:g,blur:u,color:b,opacity:x})),t.dom.elGraphical.add(m)}}drawYCrosshairs(){const t=this.w,e=new E(this.w),s=t.config.yaxis[0].crosshairs,i=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){const o=e.drawLine(-i,0,t.layout.gridWidth+i,0,s.stroke.color,s.stroke.dashArray,s.stroke.width);o.attr({class:"apexcharts-ycrosshairs"}),t.dom.elGraphical.add(o)}const a=e.drawLine(-i,0,t.layout.gridWidth+i,0,s.stroke.color,0,0);a.attr({class:"apexcharts-ycrosshairs-hidden"}),t.dom.elGraphical.add(a)}}class ze{constructor(t){this.w=t,this._activeBreakpoint=null}checkResponsiveConfig(t){const e=this.w,s=e.config;if(0===s.responsive.length)return;const i=s.responsive.slice();i.sort((r,n)=>r.breakpoint>n.breakpoint?1:n.breakpoint>r.breakpoint?-1:0).reverse();const a=new yt({}),o=(r={})=>{const n=i[0].breakpoint,c=_.isBrowser()?window.innerWidth>0?window.innerWidth:screen.width:0;if(c>n){if(null!==this._activeBreakpoint){if(!e.globals.initialConfig)return;const l=D.clone(e.globals.initialConfig);l.series=D.clone(e.config.series);const h=q.extendArrayProps(a,l,e);r=D.extend(h,r),this.overrideResponsiveOptions(r),this._activeBreakpoint=null}}else for(let l=0;l<i.length;l++)c<i[l].breakpoint&&(r=q.extendArrayProps(a,i[l].options,e),r=D.extend(e.config,r),this.overrideResponsiveOptions(r),this._activeBreakpoint=i[l].breakpoint)};if(t){let r=q.extendArrayProps(a,t,e);r=D.extend(e.config,r),r=D.extend(r,t),o(r)}else o({})}overrideResponsiveOptions(t){const e=new yt(t).init({responsiveOverride:!0});this.w.config=e}}class Z{constructor(t,{toggleDataSeries:e,revertDefaultAxisMinMax:s,updateSeries:i}={}){this.w=t,this._toggleDataSeries=e||null,this._revertDefaultAxisMinMax=s||null,this._updateSeries=i||null,this.legendInactiveClass="legend-mouseover-inactive"}clearSeriesCache(){const t=this.w;t.globals.cachedSelectors&&(delete t.globals.cachedSelectors.allSeriesEls,delete t.globals.cachedSelectors.highlightSeriesEls)}getAllSeriesEls(){const t=this.w,e="allSeriesEls";return t.globals.cachedSelectors[e]||(t.globals.cachedSelectors[e]=t.dom.baseEl.getElementsByClassName("apexcharts-series")),t.globals.cachedSelectors[e]}getSeriesByName(t){return this.w.dom.baseEl.querySelector(`.apexcharts-inner .apexcharts-series[seriesName='${D.escapeString(t)}']`)}isSeriesHidden(t){var e;const i=this.getSeriesByName(t),a=parseInt(null!=(e=i.getAttribute("data:realIndex"))?e:"0",10);return{isHidden:i.classList.contains("apexcharts-series-collapsed"),realIndex:a}}addCollapsedClassToSeries(t,e){Z.addCollapsedClassToSeries(this.w,t,e)}static addCollapsedClassToSeries(t,e,s){function i(a){for(let o=0;o<a.length;o++)a[o].index===s&&e.node.classList.add("apexcharts-series-collapsed")}i(t.globals.collapsedSeries),i(t.globals.ancillaryCollapsedSeries)}toggleSeries(t){var e;const s=this.isSeriesHidden(t);
1return null==(e=this._toggleDataSeries)||e.call(this,s.realIndex,s.isHidden),s.isHidden}showSeries(t){var e;const s=this.isSeriesHidden(t);s.isHidden&&(null==(e=this._toggleDataSeries)||e.call(this,s.realIndex,!0))}hideSeries(t){var e;const s=this.isSeriesHidden(t);s.isHidden||null==(e=this._toggleDataSeries)||e.call(this,s.realIndex,!1)}resetSeries(t=!0,e=!0,s=!0){var i,a;const o=this.w;this.clearSeriesCache();let r=D.clone(o.globals.initialSeries);o.globals.previousPaths=[],s?(o.globals.collapsedSeries=[],o.globals.ancillaryCollapsedSeries=[],o.globals.collapsedSeriesIndices=[],o.globals.ancillaryCollapsedSeriesIndices=[]):r=this.emptyCollapsedSeries(r),o.config.series=r,t&&(e&&(o.interact.zoomed=!1,null==(i=this._revertDefaultAxisMinMax)||i.call(this)),null==(a=this._updateSeries)||a.call(this,r,o.config.chart.animations.dynamicAnimation.enabled))}emptyCollapsedSeries(t){const e=this.w;for(let s=0;s<t.length;s++)e.globals.collapsedSeriesIndices.indexOf(s)>-1&&(t[s].data=[]);return t}highlightSeries(t){var e;const s=this.w,i=this.getSeriesByName(t),a=parseInt(null!=(e=i?.getAttribute("data:realIndex"))?e:"",10),o="highlightSeriesEls";let r=s.globals.cachedSelectors[o];r||(r=s.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),s.globals.cachedSelectors[o]=r);let n=null,c=null,l=null;s.globals.axisCharts||"radialBar"===s.config.chart.type?s.globals.axisCharts?(n=s.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${a}']`),c=s.dom.baseEl.querySelector(`.apexcharts-datalabels[data\\:realIndex='${a}']`),l=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${s.globals.seriesYAxisReverseMap[a]}']`)):n=s.dom.baseEl.querySelector(`.apexcharts-series[rel='${a+1}']`):n=s.dom.baseEl.querySelector(`.apexcharts-series[rel='${a+1}'] path`);for(let h=0;h<r.length;h++)r[h].classList.add(this.legendInactiveClass);if(n){if(!s.globals.axisCharts){const h=n.parentNode;h?.classList.remove(this.legendInactiveClass)}n.classList.remove(this.legendInactiveClass),null!==c&&c.classList.remove(this.legendInactiveClass),null!==l&&l.classList.remove(this.legendInactiveClass)}else for(let h=0;h<r.length;h++)r[h].classList.remove(this.legendInactiveClass)}toggleSeriesOnHover(t,e){const s=this.w;e||(e=t.target);const i=s.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis");if("mousemove"===t.type){const a=parseInt(e.getAttribute("rel"),10)-1;this.highlightSeries(s.seriesData.seriesNames[a])}else if("mouseout"===t.type)for(let a=0;a<i.length;a++)i[a].classList.remove(this.legendInactiveClass)}highlightRangeInSeries(t,e){const s=this.w,i=s.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),a=r=>{for(let n=0;n<i.length;n++){const c=i[n].classList[r];"function"==typeof c&&c.call(i[n].classList,this.legendInactiveClass)}},o=(r,n)=>{for(let c=0;c<i.length;c++){const l=Number(i[c].getAttribute("val"));l>=r.from&&(l<r.to||r.to===n&&l===n)&&i[c].classList.remove(this.legendInactiveClass)}};if("mousemove"===t.type){const r=parseInt(e.getAttribute("rel"),10)-1;a("add");const n=s.config.plotOptions.heatmap.colorScale.ranges;o(n[r],n.reduce((h,d)=>Math.max(h,d.to),0))}else"mouseout"===t.type&&a("remove")}getActiveConfigSeriesIndex(t="asc",e=[]){const s=this.w;let i=0;if(s.config.series.length>1){const a=s.config.series.map((o,r)=>o.data&&o.data.length>0&&-1===s.globals.collapsedSeriesIndices.indexOf(r)&&(!s.globals.comboCharts||0===e.length||e.length&&e.indexOf(s.config.series[r].type)>-1)?r:-1);for(let o="asc"===t?0:a.length-1;"asc"===t?o<a.length:o>=0;"asc"===t?o++:o--)if(-1!==a[o]){i=a[o];break}}return i}getBarSeriesIndices(){return this.w.globals.comboCharts?this.w.config.series.map((e,s)=>"bar"===e.type||"column"===e.type?s:-1).filter(e=>-1!==e):this.w.config.series.map((e,s)=>s)}getPreviousPaths(){var t,e,s,i;const a=this.w;function o(l,h,d){const f=l[h].childNodes,p={type:d,paths:[],realIndex:l[h].getAttribute("data:realIndex")};for(let g=0;g<f.length;g++)if(f[g].hasAttribute("pathTo")){const u=f[g].getAttribute("pathTo");p.paths.push({d:u})}a.globals.previousPaths.push(p)}a.globals.previousPaths=[],["line","area","bar","rangebar","rangeArea","candlestick","radar"].forEach(l=>{const h=(l=>a.dom.baseEl.querySelectorAll(`.apexcharts-${l}-series .apexcharts-series`))(l);for(let d=0;d<h.length;d++)o(h,d,l)});const c=a.dom.baseEl.querySelectorAll(`.apexcharts-${a.config.chart.type} .apexcharts-series`);
vendor: 5,090 bytes, line 1
1if(c.length>0)for(let l=0;l<c.length;l++){const h=a.dom.baseEl.querySelectorAll(`.apexcharts-${a.config.chart.type} .apexcharts-series[data\\:realIndex='${l}'] rect`),d=[];for(let f=0;f<h.length;f++){const p=u=>h[f].getAttribute(u),g={x:parseFloat(null!=(t=p("x"))?t:"0"),y:parseFloat(null!=(e=p("y"))?e:"0"),width:parseFloat(null!=(s=p("width"))?s:"0"),height:parseFloat(null!=(i=p("height"))?i:"0")};d.push({rect:g,color:h[f].getAttribute("color")})}a.globals.previousPaths.push(d)}a.globals.axisCharts||(a.globals.previousPaths=a.seriesData.series)}clearPreviousPaths(){const t=this.w;t.globals.previousPaths=[],t.globals.allSeriesCollapsed=!1}handleNoData(){const t=this.w,s=t.config.noData,i=new E(this.w);let a=t.globals.svgWidth/2,o=t.globals.svgHeight/2,r="middle";if(t.globals.noData=!0,t.globals.animationEnded=!0,"left"===s.align?(a=10,r="start"):"right"===s.align&&(a=t.globals.svgWidth-10,r="end"),"top"===s.verticalAlign?o=50:"bottom"===s.verticalAlign&&(o=t.globals.svgHeight-50),a+=s.offsetX,o=o+parseInt(s.style.fontSize,10)+2+s.offsetY,void 0!==s.text&&""!==s.text){const n=i.drawText({x:a,y:o,text:s.text,textAnchor:r,fontSize:s.style.fontSize,fontFamily:s.style.fontFamily,foreColor:s.style.color,opacity:1,cssClass:"apexcharts-text-nodata"});t.dom.Paper.add(n)}}setNullSeriesToZeroValues(t){const e=this.w;for(let s=0;s<t.length;s++)if(0===t[s].length)for(let i=0;i<t[e.globals.maxValsInArrayIndex].length;i++)t[s].push(0);return t}hasAllSeriesEqualX(){let t=!0;const e=this.w,s=this.filteredSeriesX();for(let i=0;i<s.length-1;i++)if(s[i][0]!==s[i+1][0]){t=!1;break}return e.globals.allSeriesHasEqualX=t,t}filteredSeriesX(){return this.w.seriesData.seriesX.map(s=>s.length>0?s:[])}}class Oe{constructor(t){this.w=t,this.colors=[],this.isColorFn=!1,this.isHeatmapDistributed=this.checkHeatmapDistributed(),this.isBarDistributed=this.checkBarDistributed()}checkHeatmapDistributed(){const{chart:t,plotOptions:e}=this.w.config;return"treemap"===t.type&&e.treemap&&e.treemap.distributed||"heatmap"===t.type&&e.heatmap&&e.heatmap.distributed}checkBarDistributed(){const{chart:t,plotOptions:e}=this.w.config;return e.bar&&e.bar.distributed&&("bar"===t.type||"rangeBar"===t.type)}init(){this.setDefaultColors()}setDefaultColors(){var t;const e=this.w,s=new D;e.dom.elWrap.classList.add(`apexcharts-theme-${e.config.theme.mode||"light"}`);const i=null==(t=e.config.theme.accessibility)?void 0:t.colorBlindMode;if(i){e.globals.colors=this.getColorBlindColors(i),this.applySeriesColors(e.seriesData.seriesColors,e.globals.colors);const r=e.globals.colors.slice();return this.pushExtraColors(e.globals.colors),this.applyColorTypes(["fill","stroke"],r),this.applyDataLabelsColors(r),this.applyRadarPolygonsColors(),this.applyMarkersColors(r),void("highContrast"===i&&e.dom.elWrap.classList.add("apexcharts-high-contrast"))}const a=[...e.config.colors||e.config.fill.colors||[]];e.globals.colors=this.getColors(a),this.applySeriesColors(e.seriesData.seriesColors,e.globals.colors),e.config.theme.monochrome.enabled&&(e.globals.colors=this.getMonochromeColors(e.config.theme.monochrome,e.seriesData.series,s));const o=e.globals.colors.slice();this.pushExtraColors(e.globals.colors),this.applyColorTypes(["fill","stroke"],o),this.applyDataLabelsColors(o),this.applyRadarPolygonsColors(),this.applyMarkersColors(o)}getColors(t){const e=this.w;return t&&0!==t.length?Array.isArray(t)&&t.length>0&&"function"==typeof t[0]?(this.isColorFn=!0,e.config.series.map((s,i)=>{const a=t[i]||t[0];return"function"==typeof a?a({value:e.globals.axisCharts?e.seriesData.series[i][0]||0:e.seriesData.series[i],seriesIndex:i,dataPointIndex:i,w:this.w}):a})):t:this.predefined()}applySeriesColors(t,e){t.forEach((s,i)=>{s&&(e[i]=s)})}getMonochromeColors(t,e,s){const{color:i,shadeIntensity:a,shadeTo:o}=t,r=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,n=1/(r/a);let c=0;return Array.from({length:r},()=>{const l=s.shadeColor("dark"===o?-1*c:c,i);return c+=n,l})}applyColorTypes(t,e){const s=this.w;t.forEach(i=>{s.globals[i].colors=void 0===s.config[i].colors?this.isColorFn?s.config.colors:e:s.config[i].colors.slice(),this.pushExtraColors(s.globals[i].colors)})}applyDataLabelsColors(t){const e=this.w;e.globals.dataLabels.style.colors=void 0===e.config.dataLabels.style.colors?t:e.config.dataLabels.style.colors.slice(),this.pushExtraColors(e.globals.dataLabels.style.colors,50)}applyRadarPolygonsColors(){const t=this.w;t.globals.radarPolygons.fill.colors=void 0===t.config.plotOptions.radar.polygons.fill.colors?["dark"===t.config.theme.mode?"#343A3F":"none"]:t.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(t.globals.radarPolygons.fill.colors,20)}applyMarkersColors(t){const e=this.w;e.globals.markers.colors=void 0===e.config.markers.colors?t:e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}pushExtraColors(t,e,s=null){const i=this.w;let a=e||i.seriesData.series.length;if(null===s&&(s=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===i.config.chart.type&&i.config.plotOptions.heatmap&&i.c
1onfig.plotOptions.heatmap.colorScale.inverse),s&&i.seriesData.series.length&&(a=i.seriesData.series[i.globals.maxValsInArrayIndex].length*i.seriesData.series.length),t.length<a){const o=a-t.length;for(let r=0;r<o;r++)t.push(t[r])}}getColorBlindColors(t){return({deuteranopia:["#0072B2","#E69F00","#56B4E9","#009E73","#F0E442","#D55E00","#CC79A7"],protanopia:["#0077BB","#EE7733","#009988","#EE3377","#BBBBBB","#33BBEE","#CC3311"],tritanopia:["#CC3311","#009988","#EE7733","#0077BB","#EE3377","#BBBBBB","#33BBEE"],highContrast:["#005A9C","#C00000","#007A33","#6C3483","#7B3F00","#0097A7","#4A235A"]}[t]||["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"]).slice()}updateThemeOptions(t){t.chart=t.chart||{},t.tooltip=t.tooltip||{};const e=t.theme.mode,s="dark"===e?"palette4":"light"===e?"palette1":t.theme.palette||"palette1",i="dark"===e?"#f6f7f8":"light"===e?"#373d3f":t.chart.foreColor||"#373d3f";return t.tooltip.theme=e||"light",t.chart.foreColor=i,t.theme.palette=s,t}predefined(){const e={palette1:["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"],palette2:["#3F51B5","#03A9F4","#4CAF50","#F9CE1D","#FF9800"],palette3:["#33B2DF","#546E7A","#D4526E","#13D8AA","#A5978B"],palette4:["#4ECDC4","#C7F464","#81D4FA","#FD6A6A","#546E7A"],palette5:["#2B908F","#F9A3A4","#90EE7E","#FA4443","#69D2E7"],palette6:["#449DD1","#F86624","#EA3546","#662E9B","#C5D86D"],palette7:["#D7263D","#1B998B","#2E294E","#F46036","#E2C044"],palette8:["#662E9B","#F86624","#F9C80E","#EA3546","#43BCCD"],palette9:["#5C4742","#A5978B","#8D5B4C","#5A2A27","#C4BBAF"],palette10:["#A300D6","#7D02EB","#5653FE","#2983FF","#00B1F2"],cvdDeuteranopia:["#0072B2","#E69F00","#56B4E9","#009E73","#F0E442","#D55E00","#CC79A7"],cvdProtanopia:["#0077BB","#EE7733","#009988","#EE3377","#BBBBBB","#33BBEE","#CC3311"],cvdTritanopia:["#CC3311","#009988","#EE7733","#0077BB","#EE3377","#BBBBBB","#33BBEE"],highContrast:["#005A9C","#C00000","#007A33","#6C3483","#7B3F00","#0097A7","#4A235A"]};return e[this.w.config.theme.palette]||e.palette1}}class He{constructor(t){this.w=t}draw(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}drawTitleSubtitle(t){const e=this.w,s="title"===t?e.config.title:e.config.subtitle;let i=e.globals.svgWidth/2,a=s.offsetY,o="middle";if("left"===s.align?(i=10,o="start"):"right"===s.align&&(i=e.globals.svgWidth-10,o="end"),i+=s.offsetX,a=a+parseInt(s.style.fontSize,10)+s.margin/2,void 0!==s.text){const n=new E(this.w).drawText({x:i,y:a,text:s.text,textAnchor:o,fontSize:s.style.fontSize,fontFamily:s.style.fontFamily,fontWeight:s.style.fontWeight,foreColor:s.style.color,opacity:1});n.node.setAttribute("class",`apexcharts-${t}-text`),e.dom.Paper.add(n)}}}let We=class{constructor(t){this.w=t.w,this.dCtx=t}getTitleSubtitleCoords(t){const e=this.w;let s=0,i=0;const a="title"===t?e.config.title.floating:e.config.subtitle.floating,o=e.dom.baseEl.querySelector(`.apexcharts-${t}-text`);if(null!==o&&!a){const r=o.getBoundingClientRect();s=r.width,i=e.globals.axisCharts?r.height+5:r.height}return{width:s,height:i}}getLegendsRect(){const t=this.w,e=t.dom.elLegendWrap;!t.config.legend.height&&("top"===t.config.legend.position||"bottom"===t.config.legend.position)&&e&&(e.style.maxHeight=t.globals.svgHeight/2+"px");const s=Object.assign({},D.getBoundingClientRect(e));return this.dCtx.lgRect=null!==e&&!t.config.legend.floating&&t.config.legend.show?{x:s.x,y:s.y,height:s.height,width:0===s.height?0:s.width}:{x:0,y:0,height:0,width:0},("left"===t.config.legend.position||"right"===t.config.legend.position)&&1.5*this.dCtx.lgRect.width>t.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}getDatalabelsRect(){const t=this.w,e=[];t.config.series.forEach((r,n)=>{r.data.forEach((c,l)=>{const d=t.config.dataLabels.formatter(t.seriesData.series[n][l],{seriesIndex:n,dataPointIndex:l,w:t});e.push(d)})});const s=D.getLargestStringFromArr(e),i=new E(this.w),a=t.config.dataLabels.style,o=i.getTextRects(s,parseInt(a.fontSize).toString(),a.fontFamily);return{width:1.05*o.width,height:o.height}}getLargestStringFromMultiArr(t,e){let i=t;if(this.w.axisFlags.isMultiLineX){const a=e.map(n=>Array.isArray(n)?n.length:1),o=Math.max(...a);i=e[a.indexOf(o)]}return i}};class Ge{constructor(t){this.w=t.w,this.dCtx=t}getxAxisLabelsCoords(){const t=this.w;let s,e=t.labelData.labels.slice();if(t.config.xaxis.convertedCatToNumeric&&0===e.length&&(e=t.labelData.categoryLabels),t.labelData.timescaleLabels.length>0){const i=this.getxAxisTimeScaleLabelsCoords();s={width:i.width,height:i.height},t.layout.rotateXLabels=!1}
vendor: 6,826 bytes, line 1
1else{this.dCtx.lgWidthForSideLegends="left"!==t.config.legend.position&&"right"!==t.config.legend.position||t.config.legend.floating?0:this.dCtx.lgRect.width;const i=t.formatters.xLabelFormatter;let a=D.getLargestStringFromArr(e),o=this.dCtx.dimHelpers.getLargestStringFromMultiArr(a,e);t.globals.isBarHorizontal&&(a=t.globals.yAxisScale[0].result.reduce((d,f)=>d.length>f.length?d:f,0),o=a);const r=new bt(this.w),n=a;a=r.xLabelFormat(i,a,n,{i:void 0,dateFormatter:new K(this.w).formatDate,w:t}),o=r.xLabelFormat(i,o,n,{i:void 0,dateFormatter:new K(this.w).formatDate,w:t}),(t.config.xaxis.convertedCatToNumeric&&typeof a>"u"||""===String(a).trim())&&(a="1",o=a);const c=new E(this.w);let l=c.getTextRects(a,t.config.xaxis.labels.style.fontSize),h=l;if(a!==o&&(h=c.getTextRects(o,t.config.xaxis.labels.style.fontSize)),s={width:l.width>=h.width?l.width:h.width,height:l.height>=h.height?l.height:h.height},s.width*e.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.layout.rotateXLabels=!0;const d=f=>c.getTextRects(f,t.config.xaxis.labels.style.fontSize,t.config.xaxis.labels.style.fontFamily,`rotate(${t.config.xaxis.labels.rotate} 0 0)`,!1);l=d(a),a!==o&&(h=d(o)),s.height=(l.height>h.height?l.height:h.height)/1.5,s.width=l.width>h.width?l.width:h.width}}else t.layout.rotateXLabels=!1}return t.config.xaxis.labels.show||(s={width:0,height:0}),{width:s.width,height:s.height}}getxAxisGroupLabelsCoords(){var t;const e=this.w;if(!e.labelData.hasXaxisGroups)return{width:0,height:0};const s=(null==(t=e.config.xaxis.group.style)?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,i=e.labelData.groups.map(h=>h.title);let a;const o=D.getLargestStringFromArr(i),r=this.dCtx.dimHelpers.getLargestStringFromMultiArr(o,i),n=new E(this.w),c=n.getTextRects(o,s);let l=c;return o!==r&&(l=n.getTextRects(r,s)),a={width:c.width>=l.width?c.width:l.width,height:c.height>=l.height?c.height:l.height},e.config.xaxis.labels.show||(a={width:0,height:0}),{width:a.width,height:a.height}}getxAxisTitleCoords(){const t=this.w;let e=0,s=0;if(void 0!==t.config.xaxis.title.text){const a=new E(this.w).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=a.width,s=a.height}return{width:e,height:s}}getxAxisTimeScaleLabelsCoords(){const t=this.w;this.dCtx.timescaleLabels=t.labelData.timescaleLabels.slice();const e=this.dCtx.timescaleLabels.map(r=>r.value),s=e.reduce((r,n)=>typeof r>"u"?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):r.length>n.length?r:n,0),a=new E(this.w).getTextRects(s,t.config.xaxis.labels.style.fontSize);return 1.05*a.width*e.length>t.layout.gridWidth&&0!==t.config.xaxis.labels.rotate&&(t.globals.overlappingXLabels=!0),a}additionalPaddingXLabels(t){const e=this.w,s=e.globals,i=e.config,a=i.xaxis.type,o=t.width;s.skipLastTimelinelabel=!1,s.skipFirstTimelinelabel=!1;const r=e.config.yaxis[0].opposite&&e.globals.isBarHorizontal,c=h=>{if(this.dCtx.timescaleLabels&&this.dCtx.timescaleLabels.length){const g=this.dCtx.timescaleLabels[0].position-o/1.75+this.dCtx.yAxisWidthLeft;this.dCtx.timescaleLabels[this.dCtx.timescaleLabels.length-1].position+o/1.75-this.dCtx.yAxisWidthRight>s.svgWidth-e.layout.translateX-("right"===e.config.legend.position&&this.dCtx.lgRect.width>0?this.dCtx.lgRect.width:0)&&(s.skipLastTimelinelabel=!0),g<-(h.show&&!h.floating||"bar"!==i.chart.type&&"candlestick"!==i.chart.type&&"rangeBar"!==i.chart.type&&"boxPlot"!==i.chart.type?10:o/1.75)&&(s.skipFirstTimelinelabel=!0)}else"datetime"===a?this.dCtx.gridPad.right<o&&!e.layout.rotateXLabels&&(s.skipLastTimelinelabel=!0):"datetime"!==a&&this.dCtx.gridPad.right<o/2-this.dCtx.yAxisWidthRight&&!e.layout.rotateXLabels&&!e.config.xaxis.labels.trim&&(this.dCtx.xPadRight=o/2+1)};i.yaxis.forEach((h,d)=>{r?(this.dCtx.gridPad.left<o&&(this.dCtx.xPadLeft=o/2+1),this.dCtx.xPadRight=o/2+1):((h,d)=>{i.yaxis.length>1&&(h=>-1!==s.collapsedSeriesIndices.indexOf(h))(d)||c(h)})(h,d)})}}class $e{constructor(t){this.w=t.w,this.dCtx=t}getyAxisLabelsCoords(){const t=this.w,i=[];let a=10;const o=new rt(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});return t.config.yaxis.map((r,n)=>{const c={seriesIndex:n,dataPointIndex:-1,w:t},l=t.globals.yAxisScale[n];let h=0;if(!o.isYAxisHidden(n)&&r.labels.show&&void 0!==r.labels.minWidth&&(h=r.labels.minWidth),!o.isYAxisHidden(n)&&r.labels.show&&l.result.length){const d=t.formatters.yLabelFormatters[n];let p=l.result.reduce((m,y)=>{var v,C;return(null==(v=String(d(m,c)))?void 0:v.length)>(null==(C=String(d(y,c)))?void 0:C.length)?m:y},l.niceMin===Number.MIN_VALUE?0:l.niceMin);p=d(p,c);let g=p;if((typeof p>"u"||0===p.length)&&(p=l.niceMax),1===String(p).length&&(p+=".0",g=p),t.globals.isBarHorizontal){a=0;const m=t.labelData.labels.slice();p=D.getLargestStringFromArr(m),p=d(p,{seriesIndex:n,dataPointIndex:-1,w:t}),g=this.dCtx.dimHelpers.getLargestStringFromMultiArr(p,m)}const u=new E(this.w),b="rotate(".concat(r.labels.rotate," 0 0)"),x=u.getTextRects(p,r.labels.style.fontSize,r.labels.style.fontFamily,b,!1);let w=x;p!==g&&(w=u.getTextRects(g,r.labels.style.fontSize,r.labels.style.fontFamily,b,!1)),i.push({width:(h>w.width||h>x.width?h:w.width>x.width?w.width:x.width)+a,height:w.height>x.height?w.height:x.height})}else i.push({width:0,height:0})}),i}getyAxisTitleCoords(){const e=[];return this.w.config.yaxis.map(s=>{if(s.show&&void 0!==s.title.text){const i=new E(this.w),a="rotate(".concat(s.title.rotate," 0 0)"),o=i.getTextRects(s.title.text,s.title.style.fontSize,s.title.style.fontFamily,a,!1);e.push({width:o.width,height:o.height})}else e.push({width:0,height:0})}),e}getTotalYAxisWidth(){const t=this.w;let e=0,s=0,i=0;const a=t.globals.yAxisScale.length>1?10:0,o=new rt(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale}),n=(c,l)=>{const h=t.config.yaxis[l].floating;let d=0;c.width>0&&!h?(d=c.width+a,function(c){return t.globals.ignoreYAxisIndexes.indexOf(c)>-1}(l)&&(d=d-c.width-a)):d=h||o.isYAxisHidden(l)?0:5,t.config.yaxis[l].opposite?i+=d:s+=d,e+=d};return t.layout.yLabelsCoords.map((c,l)=>{n(c,l)}),t.layout.yTitleCoords.map((c,l)=>{n(c,l)}),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.layout.yLabelsCoords[0].width+t.layout.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=s,this.dCtx.yAxisWidthRight=i,e}}class Ve{constructor(t){this.w=t.w,this.dCtx=t}gridPadForColumnsInNumericAxis(t){const{w:e}=this,{config:s,globals:i}=e;if(i.noData||i.collapsedSeries.length+i.ancillaryCollapsedSeries.length===s.series.length)return 0;const a=h=>["bar","rangeBar","candlestick","boxPlot"].includes(h),o=s.chart.type;let r=0,n=a(o)?s.series.length:1;i.comboBarCount>
10&&(n=i.comboBarCount),i.collapsedSeries.forEach(h=>{a(h.type)&&(n-=1)}),s.chart.stacked&&(n=1);const c=a(o)||i.comboBarCount>0;let l=Math.abs(i.initialMaxX-i.initialMinX);if(c&&e.axisFlags.isXNumeric&&!i.isBarHorizontal&&n>0&&0!==l){l<=3&&(l=i.dataPoints);const h=l/t;let d=i.minXDiff&&i.minXDiff/h>0?i.minXDiff/h:0;d>t/2&&(d/=2),r=d*parseInt(s.plotOptions.bar.columnWidth,10)/100,r<1&&(r=1),i.barPadForNumericAxis=r}return r}gridPadFortitleSubtitle(){const{w:t}=this,{globals:e}=t;let s=this.dCtx.isSparkline||!e.axisCharts?0:10;["title","subtitle"].forEach(r=>{s+=void 0!==t.config[r].text?t.config[r].margin:this.dCtx.isSparkline||!e.axisCharts?0:5}),t.config.legend.show&&"bottom"===t.config.legend.position&&!t.config.legend.floating&&!e.axisCharts&&(s+=10);const a=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),o=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");t.layout.gridHeight-=a.height+o.height+s,t.layout.translateY+=a.height+o.height+s}setGridXPosForDualYAxis(t,e){const{w:s}=this,i=new rt(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});s.config.yaxis.forEach((a,o)=>{-1===s.globals.ignoreYAxisIndexes.indexOf(o)&&!a.floating&&!i.isYAxisHidden(o)&&(a.opposite&&(s.layout.translateX-=e[o].width+t[o].width+parseInt(a.labels.style.fontSize,10)/1.2+12),s.layout.translateX<2&&(s.layout.translateX=2))})}}class Tt{constructor(t,e){this.w=t,this.ctx=e,this.theme=e.theme,this.timeScale=e.timeScale,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 We(this),this.dimYAxis=new $e(this),this.dimXAxis=new Ge(this),this.dimGrid=new Ve(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0,this.datalabelsCoords={width:0,height:0},this.xAxisWidth=0,this.timescaleLabels=[]}plotCoords(){const t=this.w,e=t.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};const s=Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width;this.isSparkline&&((t.config.markers.discrete.length>0||t.config.markers.size>0)&&Object.entries(this.gridPad).forEach(([a,o])=>{this.gridPad[a]=Math.max(o,this.w.globals.markers.largestSize/1.5)}),this.gridPad.top=Math.max(s/2,this.gridPad.top),this.gridPad.bottom=Math.max(s/2,this.gridPad.bottom)),e.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),t.layout.gridHeight=t.layout.gridHeight-this.gridPad.top-this.gridPad.bottom,t.layout.gridWidth=t.layout.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;const i=this.dimGrid.gridPadForColumnsInNumericAxis(t.layout.gridWidth);return t.layout.gridWidth=t.layout.gridWidth-2*i,t.layout.translateX=t.layout.translateX+this.gridPad.left+this.xPadLeft+(i>0?i:0),t.layout.translateY=t.layout.translateY+this.gridPad.top,{layout:{gridHeight:t.layout.gridHeight,gridWidth:t.layout.gridWidth,translateX:t.layout.translateX,translateY:t.layout.translateY,translateXAxisX:t.layout.translateXAxisX,translateXAxisY:t.layout.translateXAxisY,rotateXLabels:t.layout.rotateXLabels,xAxisHeight:t.layout.xAxisHeight,xAxisLabelsHeight:t.layout.xAxisLabelsHeight,xAxisGroupLabelsHeight:t.layout.xAxisGroupLabelsHeight,xAxisLabelsWidth:t.layout.xAxisLabelsWidth,yLabelsCoords:t.layout.yLabelsCoords,yTitleCoords:t.layout.yTitleCoords}}}setDimensionsForAxisCharts(){const t=this.w,e=t.globals,s=this.dimYAxis.getyAxisLabelsCoords(),i=this.dimYAxis.getyAxisTitleCoords();e.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),t.layout.yLabelsCoords=[],t.layout.yTitleCoords=[],t.config.yaxis.map((f,p)=>{t.layout.yLabelsCoords.push({width:s[p].width,index:p}),t.layout.yTitleCoords.push({width:i[p].width,index:p})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();const a=this.dimXAxis.getxAxisLabelsCoords(),o=this.dimXAxis.getxAxisGroupLabelsCoords(),r=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(a,r,o),t.layout.translateXAxisY=t.layout.rotateXLabels?this.xAxisHeight/8:-4,t.layout.translateXAxisX=t.layout.rotateXLabels&&t.axisFlags.isXNumeric&&t.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,t.globals.isBarHorizontal&&(t.layout.rotateXLabels=!1,t.layout.translateXAxisY=parseInt(t.config.xaxis.labels.style.fontSize,10)/1.5*-1),t.layout.translateXAxisY=t.layout.translateXAxisY+t.config.xaxis.labels.offsetY,t.layout.translateXAxisX=t.layout.translateXAxisX+t.config.xaxis.labels.offsetX;let n=this.yAxisWidth,c=this.xAxisHeight;t.layout.xAxisLabelsHeight=this.xAxisHeight-r.height,t.layout.xAxisGroupLabelsHeight=t.layout.xAxisLabelsHeight-a.height,t.layout.xAxisLabelsWidth=this.xAxisWidth,t.layout.xAxisHeight=this.xAxisHeight;let l=10;("radar"===t.config.chart.type||this.isSparkline)&&(n=0,c=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===t.config.chart.type)&&(n=0,c=0,l=0),!this.isSparkline&&"treemap"!==t.config.chart.type&&this.dimXAxis.additionalPaddingXLabels(a);const h=()=>{t.layout.translateX=n+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-this.lgRect.height-c-(this.isSparkline||"treemap"===t.config.chart.type?0:t.layout.rotateXLabels?10:15),t.layout.gridWidth=e.svgWidth-n-2*this.datalabelsCoords.width};switch("top"===t.config.xaxis.position&&(l=t.layout.xAxisHeight-t.config.xaxis.axisTicks.height-5),t.config.legend.position){case"bottom":t.layout.translateY=l,h();break;case"top":t.layout.translateY=this.lgRect.height+l,h();break;case"left":t.layout.translateY=l,t.layout.translateX=this.lgRect.width+n+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-c-12,t.layout.gridWidth=e.svgWidth-this.lgRect.width-n-2*this.datalabelsCoords.width;break;case"right":t.layout.translateY=l,t.layout.translateX=n+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-c-12,t.layout.gridWidth=e.svgWidth-this.lgRect.width-n-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(i,s),new zt(this.w,{theme:this.theme,timeScale:this.timeScale}).setYAxisXPosition(s,i)}setDimensionsForNonAxisCharts(){const t=this.w,e=t.globals,s=t.config;let i=0;t.config.legend.show&&!t.config.legend.floating&&(i=20);const a="pie"===s.chart.type||"polarArea"===s.chart.type||"donut"===s.chart.type?"pie":"radialBar",o=s.plotOptions[a].offsetY,r=s.plotOptions[a].offsetX;if(!s.legend.show||s.legend.floating){t.layout.gridHeight=e.svgHeight;const n=t.dom.elWrap.getBoundingClientRect().width;return t.layout.gridWidth=Math.min(n,t.layout.gridHeight),t.layout.translateY=o,void(t.layout.translateX=r+(e.svgWidth-t.layout.gridWidth)/2)}switch(s.legend.position){case"bottom":t.layout.gridHeight=e.svgHeight-this.lgRect.height,t.layout.gridWidth=e.svgWidth,t.layout.translateY=o-10,t.layout.translateX=r+(e.svgWidth-t.layout.gridWidth)/2;break;case"top":t.layout.gridHeight=e.svgHeight-this.lgRect.height,t.layout.gridWidth=e.svgWidth,t.layout.translateY=this.lgRect.height+o+10,t.layout.translateX=r+(e.svgWidth-t.layout.gridWidth)/2;break;case"left":t.layout.gridWidth=e.svgWidth-this.lgRect.width-i,t.layout.gridHeight="auto"!==s.chart.height?e.svgHeight:t.layout.gridWidth,t.layout.translateY=o,t.layout.translateX=r+this.lgRect.width+i;break;case"right":t.layout.gridWidth=e.svgWidth-this.lgRect.width-i-5,t.layout.gridHeight="auto"!==s.chart.height?e.svgHeight:t.layout.gridWidth,t.layout.translateY=o,t.layout.translateX=r+10;break;default:throw new Error("Legend position not supported")}}conditionalChecksForAxisCoords(t,e,s){const i=this.w;this.xAxisHeight=(s.height+t.height+e.height)*(i.axisFlags.isMultiLineX?1.2:1.618)+(i.labelData.hasXaxisGroups?2:1)*(i.layout.rotateXLabels?22:10)+(i.layout.rotateXLabels&&"bottom"===i.config.legend.position?10:0),this.xAxisWidth=t.width,this.xAxisHeight-e.height>i.config.xaxis.labels.maxHeight&&(this.xAxisHeight=i.config.xaxis.labels.maxHeight),i.config.xaxis.labels.minHeight&&this.xAxisHeight<i.config.xaxis.labels.minHeight&&(this.xAxisHeight=i.config.xaxis.labels.minHeight),i.config.xaxis.floating&&(this.xAxisHeight=0);let h=0,d=0;i.config.yaxis.forEach(f=>{h+=f.labels.minWidth,d+=f.labels.maxWidth}),this.yAxisWidth<h&&(this.yAxisWidth=h),this.yAxisWidth>d&&(this.yAxisWidth=d)}}const Ue=10/86400;class qe{constructor(t,e){this.w=t,this.ctx=e,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}calculateTimeScaleTicks(t,e){const s=this.w;if(s.globals.allSeriesCollapsed)return s.labelData.labels=[],s.labelData.timescaleLabels=[],[];const i=new K(this.w),a=(e-t)/864e5;this.determineInterval(a),s.interact.disableZoomIn=!1,s.interact.disableZoomOut=!1,a<Ue?s.interact.disableZoomIn=!0:a>5e4&&(s.interact.disableZoomOut=!0);const o=i.getTimeUnitsfromTimestamp(t,e),r=s.layout.gridWidth/a,n=r/24,c=n/60,l=c/60,h=Math.floor(24*a),d=Math.floor(1440*a),f=Math.floor(86400*a),p=Math.floor(a),g=Math.floor(a/30),u=Math.floor(a/365),b={minMillisecond:o.minMillisecond,minSecond:o.minSecond,minMinute:o.minMinute,minHour:o.minHour,minDate:o.minDate,minMonth:o.minMonth,minYear:o.minYear},S={firstVal:b,currentMillisecond:b.minMillisecond,currentSecond:b.minSecond,currentMinute:b.minMinute,currentHour:b.minHour,currentMonthDate:b.minDate,currentDate:b.minDate,currentMonth:b.minMonth,currentYear:b.minYear,daysWidthOnXAxis:r,hoursWidthOnXAxis:n,minutesWidthOnXAxis:c,secondsWidthOnXAxis:l,numberOfSeconds:f,numberOfMinutes:d,numberOfHours:h,numberOfDays:p,numberOfMonths:g,numberOfYears:u};switch(this.tickInterval){case"years":this.generateYearScale(S);break;case"months":case"half_year":this.generateMonthScale(S);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(S);break;case"hours":this.generateHourScale(S);break;case"minutes_fives":case"minutes":this.generateMinuteScale(S);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(S)}const T=this.timeScaleArray.map(M=>{const F={position:M.position,unit:M.unit,year:M.year,day:M.day?M.day:1,hour:M.hour?M.hour:0,month:M.month+1};return"month"===M.unit?H(I({},F),{day:1,value:M.value+1}):"day"===M.unit||"hour"===M.unit?H(I({},F),{value:M.value}):"minute"===M.unit?H(I({},F),{value:M.value,minute:M.value}):"second"===M.unit?H(I({},F),{value:M.value,minute:M.minute,second:M.second}):M});return T.filter(M=>{let F=1,X=Math.ceil(s.layout.gridWidth/120);const Y=M.value;void 0!==s.config.xaxis.tickAmount&&(X=s.config.xaxis.tickAmount),T.length>X&&(F=Math.floor(T.length/X));let R=!1,N=!1;switch(this.tickInterval){case"years":"year"===M.unit&&(R=!0);break;case"half_year":F=7,"year"===M.unit&&(R=!0);break;case"months":F=1,"year"===M.unit&&(R=!0);break;case"months_fortnight":F=15,("year"===M.unit||"month"===M.unit)&&(R=!0),30===Y&&(N=!0);break;case"months_days":F=10,"month"===M.unit&&(R=!0),30===Y&&(N=!0);break;case"week_days":F=8,"month"===M.unit&&(R=!0);break;case"days":F=1,"month"===M.unit&&(R=!0);break;case"hours":"day"===M.unit&&(R=!0);break;case"minutes_fives":case"seconds_fives":Y%5!=0&&(N=!0);break;case"seconds_tens":Y%10!=0&&(N=!0)}if("hours"===this.tickInterval||"minutes_fives"===this.tickInterval||"seconds_tens"===this.tickInterval||"seconds_fives"===this.tickInterval){if(!N)return!0}else if((Y%F===0||R)&&!N)return!0})}recalcDimensionsBasedOnFormat(t){const e=this.w,s=this.formatDates(t),i=this.removeOverlappingTS(s);e.labelData.timescaleLabels=i.slice();const o=new Tt(this.w,this.ctx).plotCoords();this.ctx._writeLayoutCoords(o.layout)}determineInterval(t){const s=24*t,i=60*s;switch(!0){case t/365>5:this.tickInterval="years";break;case t>800:this.tickInterval="half_year";break;case t>180:this.tickInterval="months";break;case t>90:this.tickInterval="months_fortnight";break;case t>60:this.tickInterval="months_days";break;case t>30:this.tickInterval="week_days";break;case t>2:this.tickInterval="days";break;case s>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"}}generateYearScale({firstVal:t,currentMonth:e,currentYear:s,daysWidthOnXAxis:i,numberOfYears:a}){let o=t.minYear,r=0;const n=new K(this.w),c="year";if(t.minDate>1||t.minMonth>0){const d=n.determineRemainingDaysOfYear(t.minYear,t.minMonth,t.minDate);r=(n.determineDaysOfYear(t.minYear)-d+1)*i,o=t.minYear+1,this.timeScaleArray.push({position:r,value:o,unit:c,year:o,month:1})}else 1===t.minDate&&0===t.minMonth&&this.timeScaleArray.push({position:r,value:o,unit:c,year:s,month:D.monthMod(e+1)});let l=o,h=r;for(let d=0;d<a;d++)l++,h=n.determineDaysOfYear(l-1)*i+h,this.timeScaleArray.push({position:h,value:l,unit:c,year:l,month:1})}generateMonthScale({firstVal:t,currentMonthDate:e,currentMonth:s,currentYear:i,daysWidthOnXAxis:a,numberOfMonths:o}){let r=s,n=0;const c=new K(this.w);let l="month",h=0;if(t.minDate>1){n=(c.determineDaysOfMonths(s+1,t.minYear)-e+1)*a,r=D.monthMod(s+1);let g=i+h,u=D.monthMod(r),b=r;0===r&&(l="year",b=g,u=1,h+=1,g+=h),this.timeScaleArray.push({position:n,value:b,unit:l,year:g,month:u})}else this.timeScaleArray.push({position:n,value:r,unit:l,year:i,month:D.monthMod(s)});let d=r+1,f=n;for(let p=0,g=1;p<o;p++,g++){d=D.monthMod(d),0===d?(l="year",h+=1):l="month";const u=this._getYear(i,d,h);f=c.determineDaysOfMonths(d,u)*a+f,this.timeScaleArray.push({position:f,value:0===d?u:d,unit:l,year:u,month:0===d?1:d}),d++}}generateDayScale({firstVal:t,currentMonth:e,currentYear:s,hoursWidthOnXAxis:i,numberOfDays:a}){const o=new K(this.w);let r="day",n=t.minDate+1,c=n;const l=(b,x,w)=>(b>o.determineDaysOfMonths(x+1,w)&&(c=1,r="month",p=x+=1),x);let f=(24-t.minHour)*i,p=n,g=l(c,e,s);0===t.minHour&&1===t.minDate?(f=0,p=D.monthMod(t.minMonth),r="month",c=t.minDate):1!==t.minDate&&0===t.minHour&&0===t.minMinute&&(f=0,n=t.minDate,c=n,p=n,g=l(c,e,s),1!==p&&(r="day")),this.timeScaleArray.push({position:f,value:p,unit:r,year:this._getYear(s,g,0),month:D.monthMod(g),day:c});let u=f;for(let b=0;b<a;b++){c+=1,r="day",g=l(c,g,this._getYear(s,g,0));const x=this._getYear(s,g,0);u=24*i+u;const w=1===c?D.monthMod(g):c;this.timeScaleArray.push({position:u,value:w,unit:r,year:x,month:D.monthMod(g),day:w})}}generateHourScale({firstVal:t,currentDate:e,currentMonth:s,currentYear:i,minutesWidthOnXAxis:a,numberOfHours:o}){const r=new K(this.w);let c="hour";const l=(m,y)=>(m>r.determineDaysOfMonths(y+1,i)&&(u=1,y+=1),{month:y,date:u}),h=(m,y)=>(m>r.determineDaysOfMonths(y+1,i)&&(y+=1),y),d=60-(t.minMinute+t.minSecond/60);let f=d*a,p=t.minHour+1,g=p;60===d&&(f=0,p=t.minHour,g=p);let u=e;g>=24&&(g=0,u+=1,c="day",p=u);let x=l(u,s).month;x=h(u,x),"day"===c&&(p=u),this.timeScaleArray.push({position:f,value:p,unit:c,day:u,hour:g,year:i,month:D.monthMod(x)}),g++;let w=f;for(let m=0;m<o;m++){c="hour",g>=24&&(g=0,u+=1,c="day",x=l(u,x).month,x=h(u,x));const y=this._getYear(i,x,0);w=60*a+w,this.timeScaleArray.push({position:w,value:0===g?u:g,unit:c,hour:g,day:u,year:y,month:D.monthMod(x)}),g++}}generateMinuteScale({currentMillisecond:t,currentSecond:e,currentMinute:s,currentHour:i,currentDate:a,currentMonth:o,currentYear:r,minutesWidthOnXAxis:n,secondsWidthOnXAxis:c,numberOfMinutes:l}){const h=new K(this.w);let g=(60-e-t/1e3)*c,u=s+1;0===e&&0===t&&(g=0,u=s);let b=a,x=o;const w=r;let m=i,y=g;for(let v=0;v<l;v++)u>=60&&(u=0,m+=1,24===m)&&(m=0,b+=1,b>h.determineDaysOfMonths(x+1,this._getYear(w,x,0))&&(b=1,x+=1)),this.timeScaleArray.push({position:y,value:u,unit:"minute",hour:m,minute:u,day:b,year:this._getYear(w,x,0),month:D.monthMod(x)}),y+=n,u++}generateSecondScale({currentMillisecond:t,currentSecond:e,currentMinute:s,currentHour:i,currentDate:a,currentMonth:o,currentYear:r,secondsWidthOnXAxis:n,numberOfSeconds:c}){let f=(1e3-t)/1e3*n,p=e+1;0===t&&(f=0,p=e);let g=s;const u=a,b=o,x=r;let w=i,m=f;for(let y=0;y<c;y++)p>=60&&(g++,p=0,g>=60&&(w++,g=0,24===w&&(w=0))),this.timeScaleArray.push({position:m,value:p,unit:"second",hour:w,minute:g,second:p,day:u,year:this._getYear(x,b,0),month:D.monthMod(b)}),m+=n,p++}createRawDateString(t,e){let s=t.year;return 0===t.month&&(t.month=1),s+="-"+("0"+t.month.toString()).slice(-2),s+="day"===t.unit?"-"+("0"+e).slice(-2):"-"+("0"+(t.day?t.day:"1")).slice(-2)
1,s+="hour"===t.unit?"T"+("0"+e).slice(-2):"T"+("0"+(t.hour?t.hour:"0")).slice(-2),s+="minute"===t.unit?":"+("0"+e).slice(-2):":"+(t.minute?("0"+t.minute).slice(-2):"00"),s+="second"===t.unit?":"+("0"+e).slice(-2):":00",this.utc&&(s+=".000Z"),s}formatDates(t){const e=this.w;return t.map(i=>{let a=i.value.toString();const o=new K(this.w),r=this.createRawDateString(i,a);let n=o.getDate(o.parseDate(r));if(this.utc||(n=o.getDate(o.parseDateWithTimezone(r))),void 0===e.config.xaxis.labels.format){let c="dd MMM";const l=e.config.xaxis.labels.datetimeFormatter;"year"===i.unit&&(c=l.year),"month"===i.unit&&(c=l.month),"day"===i.unit&&(c=l.day),"hour"===i.unit&&(c=l.hour),"minute"===i.unit&&(c=l.minute),"second"===i.unit&&(c=l.second),a=o.formatDate(n,c)}else a=o.formatDate(n,e.config.xaxis.labels.format);return{dateString:r,position:i.position,value:a,unit:i.unit,year:i.year,month:i.month}})}removeOverlappingTS(t){const e=new E(this.w);let i,s=!1;t.length>0&&t[0].value&&t.every(r=>r.value.length===t[0].value.length)&&(s=!0,i=e.getTextRects(t[0].value,this.w.config.xaxis.labels.style.fontSize).width);let a=0,o=t.map((r,n)=>{if(n>0&&this.w.config.xaxis.labels.hideOverlappingLabels){const c=s?i:e.getTextRects(t[a].value,this.w.config.xaxis.labels.style.fontSize).width;return r.position>t[a].position+c+10?(a=n,r):null}return r});return o=o.filter(r=>null!==r),o}_getYear(t,e,s){return t+Math.floor(e/12)+s}}const Wt="__apexcharts_registry__";function oe(){return globalThis[Wt]}function tt(A){const t=oe()[A];if(!t)throw new Error(`ApexCharts: chart type "${A}" is not registered. Import it via ApexCharts.use() or use the full apexcharts bundle.`);return t}globalThis[Wt]||(globalThis[Wt]={});class je{constructor(t,e,s){this.w=e,this.ctx=s,this.el=t}setupElements(){const{globals:t,config:e}=this.w,s=e.chart.type,i=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"],a=[...i,"radar","heatmap","treemap"];t.axisCharts=a.includes(s),t.xyCharts=i.includes(s),t.isBarHorizontal=["bar","rangeBar","boxPlot"].includes(s)&&e.plotOptions.bar.horizontal,t.chartClass=`.apexcharts${t.chartID}`,this.w.dom.baseEl=this.el,this.w.dom.elWrap=B.createElementNS("http://www.w3.org/1999/xhtml","div"),E.setAttrs(this.w.dom.elWrap,{id:t.chartClass.substring(1),class:`apexcharts-canvas ${t.chartClass.substring(1)}`}),this.el.appendChild(this.w.dom.elWrap);const o=_.isBrowser()?window.SVG:global.SVG;if(this.w.dom.Paper=o().addTo(this.w.dom.elWrap),this.w.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:`translate(${e.chart.offsetX}, ${e.chart.offsetY})`}),this.w.dom.Paper.node.style.background="dark"!==e.theme.mode||e.chart.background?"light"!==e.theme.mode||e.chart.background?e.chart.background:"#fff":"#343A3F",this.setSVGDimensions(),this.w.dom.elLegendForeign=B.createElementNS(V,"foreignObject"),E.setAttrs(this.w.dom.elLegendForeign,{x:0,y:0,width:t.svgWidth,height:t.svgHeight}),this.w.dom.elLegendWrap=B.createElementNS("http://www.w3.org/1999/xhtml","div"),this.w.dom.elLegendWrap.classList.add("apexcharts-legend"),this.w.dom.elWrap.appendChild(this.w.dom.elLegendWrap),this.w.dom.Paper.node.appendChild(this.w.dom.elLegendForeign),e.chart.accessibility.enabled){const r=this.getAccessibleChartLabel();if(this.w.dom.Paper.attr({role:e.chart.accessibility.keyboard.enabled&&e.chart.accessibility.keyboard.navigation.enabled?"application":"img","aria-label":r}),e.chart.accessibility.description){const c=B.createElementNS(V,"desc");c.textContent=e.chart.accessibility.description,this.w.dom.Paper.node.insertBefore(c,this.w.dom.elLegendForeign.nextSibling)}}this.w.dom.elGraphical=this.w.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),this.w.dom.elDefs=this.w.dom.Paper.defs(),this.w.dom.Paper.add(this.w.dom.elGraphical),this.w.dom.elGraphical.add(this.w.dom.elDefs)}plotChartType(t,e){const{w:s,ctx:i}=this,{config:a,globals:o}=s,r={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},bar:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},n=a.chart.type||"line";let c=null,l=0;
1this.w.seriesData.series.forEach((x,w)=>{var m,y;const v="column"===(null==(m=t[w])?void 0:m.type)?"bar":(null==(y=t[w])?void 0:y.type)||("column"===n?"bar":n);r[v]?("rangeArea"===v?(r[v].series.push(this.w.rangeData.seriesRangeStart[w]),r[v].seriesRangeEnd.push(this.w.rangeData.seriesRangeEnd[w])):r[v].series.push(x),r[v].i.push(w),"bar"===v&&(s.globals.columnSeries=r.bar)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(v)?c=v:console.warn(`You have specified an unrecognized series type (${v}).`),n!==v&&"scatter"!==v&&l++}),l>0&&(c&&console.warn(`Chart or series type ${c} cannot appear with other chart or series types.`),r.bar.series.length>0&&a.plotOptions.bar.horizontal&&(l-=r.bar.series.length,r.bar={series:[],i:[]},s.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),o.comboCharts||(o.comboCharts=l>0);const d=r.line.series.length>0||r.area.series.length>0||r.scatter.series.length>0||r.bubble.series.length>0||r.rangeArea.series.length>0||!o.comboCharts&&["line","area","scatter","bubble","rangeArea"].includes(a.chart.type)?new(tt("line"))(i.w,i,e):null,p=r.candlestick.series.length>0||r.boxPlot.series.length>0||!o.comboCharts&&["candlestick","boxPlot"].includes(a.chart.type)?new(tt("candlestick"))(i.w,i,e):null,g=!o.comboCharts&&["pie","donut","polarArea"].includes(a.chart.type);i.pie=g?new(tt("pie"))(i.w,i):null,i.rangeBar=r.rangeBar.series.length>0||!o.comboCharts&&"rangeBar"===a.chart.type?new(tt("rangeBar"))(i.w,i,e):null;let b=[];if(o.comboCharts){const x=new q(this.w);if(r.area.series.length>0&&b.push(...x.drawSeriesByGroup(r.area,o.areaGroups,"area",d)),r.bar.series.length>0)if(a.chart.stacked){const w=new(tt("barStacked"))(i.w,i,e);b.push(w.draw(r.bar.series,r.bar.i))}else i.bar=new(tt("bar"))(i.w,i,e),b.push(i.bar.draw(r.bar.series,r.bar.i));if(r.rangeArea.series.length>0&&b.push(d.draw(r.rangeArea.series,"rangeArea",r.rangeArea.i,r.rangeArea.seriesRangeEnd)),r.line.series.length>0&&b.push(...x.drawSeriesByGroup(r.line,o.lineGroups,"line",d)),r.candlestick.series.length>0&&b.push(p.draw(r.candlestick.series,"candlestick",r.candlestick.i)),r.boxPlot.series.length>0&&b.push(p.draw(r.boxPlot.series,"boxPlot",r.boxPlot.i)),r.rangeBar.series.length>0&&b.push(i.rangeBar.draw(r.rangeBar.series,r.rangeBar.i)),r.scatter.series.length>0){const w=new(tt("line"))(i.w,i,e,!0);b.push(w.draw(r.scatter.series,"scatter",r.scatter.i))}if(r.bubble.series.length>0){const w=new(tt("line"))(i.w,i,e,!0);b.push(w.draw(r.bubble.series,"bubble",r.bubble.i))}}else{const x=a.chart.type;switch(x){case"line":b=d.draw(this.w.seriesData.series,"line");break;case"area":b=d.draw(this.w.seriesData.series,"area");break;case"bar":a.chart.stacked?b=new(tt("barStacked"))(i.w,i,e).draw(this.w.seriesData.series):(i.bar=new(tt("bar"))(i.w,i,e),b=i.bar.draw(this.w.seriesData.series));break;case"candlestick":b=p.draw(this.w.seriesData.series,"candlestick");break;case"boxPlot":b=p.draw(this.w.seriesData.series,x);break;case"rangeBar":b=i.rangeBar.draw(this.w.seriesData.series);break;case"rangeArea":b=d.draw(this.w.rangeData.seriesRangeStart,"rangeArea",void 0,this.w.rangeData.seriesRangeEnd);break;case"heatmap":b=new(tt("heatmap"))(i.w,i,e).draw(this.w.seriesData.series);break;case"treemap":b=new(tt("treemap"))(i.w,i).draw(this.w.seriesData.series);break;case"pie":case"donut":case"polarArea":b=i.pie.draw(this.w.seriesData.series);break;case"radialBar":b=new(tt("radialBar"))(i.w,i).draw(this.w.seriesData.series);break;case"radar":b=new(tt("radar"))(i.w,i).draw(this.w.seriesData.series);break;default:b=d.draw(this.w.seriesData.series)}}return b}setSVGDimensions(){var t;const{globals:e,config:s}=this.w;s.chart.width=s.chart.width||"100%",s.chart.height=s.chart.height||"auto";const i=s.chart.width,a=s.chart.height;e.svgWidth=NaN,e.svgHeight=NaN;let o=D.getDimensions(this.el);const r=i.toString().split(/[0-9]+/g).pop();"%"===r?D.isNumber(o[0])&&(0===o[0].width&&(o=D.getDimensions(this.el.parentNode)),e.svgWidth=o[0]*parseInt(i,10)/100):("px"===r||""===r)&&(e.svgWidth=parseInt(i,10));const n=String(a).toString().split(/[0-9]+/g).pop();if("auto"!==a&&""!==a)if("%"===n){const c=D.getDimensions(this.el.parentNode);e.svgHeight=c[1]*parseInt(a,10)/100}else e.svgHeight=parseInt(a,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;if(e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),E.setAttrs(this.w.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==n&&_.isBrowser()){const l=this.w.dom.Paper.node;null!=(t=l.parentNode)&&t.parentNode&&(l.parentNode.parentNode.style.minHeight=`${e.svgHeight+(s.chart.sparkline.enabled?0:e.axisCharts?s.chart.parentHeightOffset:0)}px`)}this.w.dom.elWrap.style.width=`${e.svgWidth}px`,this.w.dom.elWrap.style.height=`${e.svgHeight}px`}shiftGraphPosition(){const{globals:t}=this.w,{translateY:e,translateX:s}=t;E.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${s}, ${e})`})}resizeNonAxisCharts(){var t,e;const{w:s}=this;let i=0,a=s.config.chart.sparkline.enabled?1:15;a+=s.config.grid.padding.bottom,["top","bottom"].includes(s.config.legend.position)&&s.config.legend.show&&!s.config.legend.floating&&(i=(null!=(e=null==(t=this.ctx.legend)?void 0:t.legendHelpers.getLegendDimensions().clwh)?e:0)+7);const o=s.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie");let r=2.05*s.globals.radialSize;if(o&&!s.config.chart.sparkline.enabled&&0!==s.config.plotOptions.radialBar.startAngle){const c=D.getBoundingClientRect(o);r=c.bottom,r=Math.max(2.05*s.globals.radialSize,c.bottom-c.top)}const n=Math.ceil(r+this.w.layout.translateY+i+a);this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(n)),(!s.config.chart.height||!String(s.config.chart.height).includes("%"))&&(this.w.dom.elWrap.style.height=`${n}px`,E.setAttrs(this.w.dom.Paper.node,{height:n}),_.isBrowser()&&(this.w.dom.Paper.node.parentNode.parentNode.style.minHeight=`${n}px`))}coreCalculations(){new Nt(this.w).init()}resetGlobals(){const t=()=>this.w.config.series.map(()=>[]),e=new te,{globals:s}=this.w,i={dataWasParsed:this.w.axisFlags.dataWasParsed,originalSeries:s.originalSeries};e.initGlobalVars(s),s.seriesXvalues=t(),s.seriesYvalues=t(),i.dataWasParsed&&(this.w.axisFlags.dataWasParsed=i.dataWasParsed,s.originalSeries=i.originalSeries)}isMultipleY(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}xySettings(){const{w:t}=this;let e=null;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new Ot(this.w).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new Ot(this.w).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new qe(this.w,this.ctx);let 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 q(this.w).getCalculatedRatios()}return e}updateSourceChart(t){this.ctx.w.interact.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}setupBrushHandler(){const{ctx:t,w:e}=this;if(e.config.chart.brush.enabled&&"function"!=typeof e.config.chart.events.selection){const s=Array.isArray(e.config.chart.brush.targets)?e.config.chart.brush.targets:[e.config.chart.brush.target];
1s.forEach(i=>{const a=t.constructor.getChartByID(i);a.w.globals.brushSource=this.ctx,"function"!=typeof a.w.config.chart.events.zoomed&&(a.w.config.chart.events.zoomed=()=>this.updateSourceChart(a)),"function"!=typeof a.w.config.chart.events.scrolled&&(a.w.config.chart.events.scrolled=()=>this.updateSourceChart(a))}),e.config.chart.events.selection=(i,a)=>{s.forEach(o=>{t.constructor.getChartByID(o).ctx.updateHelpers._updateOptions({xaxis:{min:a.xaxis.min,max:a.xaxis.max}},!1,!1,!1,!1)})}}}getAccessibleChartLabel(){const t=this.w,e=t.config;let s="";return e.chart.accessibility&&e.chart.accessibility.description?s=e.chart.accessibility.description:e.title.text?(s=`${e.title.text}. ${e.chart.type} chart`,e.subtitle.text&&(s+=`. ${e.subtitle.text}`)):s=`${e.chart.type} chart with ${t.seriesData.series.length||(e.series?e.series.length:0)} data series`,s}}class vt{constructor(t,{resetGlobals:e=()=>{},isMultipleY:s=()=>{}}={}){this.w=t,this.resetGlobals=e,this.isMultipleY=s,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new q(this.w),this.activeSeriesIndex=0}getFirstDataPoint(){const t=this.w.config.series,e=new Z(this.w);this.activeSeriesIndex=e.getActiveConfigSeriesIndex();const s=t[this.activeSeriesIndex];return s&&s.data&&s.data.length>0&&null!==s.data[0]&&typeof s.data[0]<"u"?s.data[0]:null}isMultiFormat(){return this.isFormatXY()||this.isFormat2DArray()}isFormatXY(){var t;const e=this.getFirstDataPoint();if(!e||typeof e.x>"u")return!1;const s=null==(t=this.w.config.series[this.activeSeriesIndex])?void 0:t.data;if(s){const i=a=>a&&typeof a.x<"u";for(let a=1;a<Math.min(3,s.length);a++)if(!0!==i(s[a])){console.warn(`ApexCharts: series data has mixed formats starting at index ${a}`);break}}return!0}isFormat2DArray(){const t=this.getFirstDataPoint();return t&&Array.isArray(t)}handleFormat2DArray(t,e){const s=this.w.config,i=t[e].data,a="boxPlot"===s.chart.type||"boxPlot"===s.series[e].type;for(let o=0;o<i.length;o++){const r=i[o],n=r[0],c=r[1],l=r[2];if(typeof c<"u"&&(Array.isArray(c)&&4===c.length&&!a?this.twoDSeries.push(D.parseNumber(c[3])):this.twoDSeries.push(D.parseNumber(r.length>=5?r[4]:c)),this.w.axisFlags.dataFormatXNumeric=!0),"datetime"===s.xaxis.type){const h=new Date(n).getTime();this.twoDSeriesX.push(h)}else this.twoDSeriesX.push(n);typeof l<"u"&&(this.threeDSeries.push(l),this.w.axisFlags.isDataXYZ=!0)}}handleFormatXY(t,e){const s=this.w.config,i=this.w.globals,a=new K(this.w),o=t[e].data;let r=e;i.collapsedSeriesIndices.indexOf(e)>-1&&(r=this.activeSeriesIndex);const n=t[r].data;for(let c=0;c<o.length;c++){const l=o[c];if(typeof l.y<"u"){const h=Array.isArray(l.y)?D.parseNumber(l.y[l.y.length-1]):D.parseNumber(l.y);this.twoDSeries.push(h)}typeof this.seriesGoals[e]>"u"&&(this.seriesGoals[e]=[]),typeof l.goals<"u"&&Array.isArray(l.goals)?this.seriesGoals[e].push(l.goals):this.seriesGoals[e].push(null),typeof l.z<"u"&&(this.threeDSeries.push(l.z),this.w.axisFlags.isDataXYZ=!0)}for(let c=0;c<n.length;c++){const h=n[c].x,d="string"==typeof h,f=Array.isArray(h),p=!f&&!!a.isValidDate(h);d||p?d||s.xaxis.convertedCatToNumeric?"datetime"!==s.xaxis.type||i.isBarHorizontal&&this.w.axisFlags.isRangeData?(this.fallbackToCategory=!0,this.twoDSeriesX.push(h),!isNaN(h)&&"category"!==this.w.config.xaxis.type&&"string"!=typeof h&&(this.w.axisFlags.isXNumeric=!0)):this.twoDSeriesX.push(a.parseDate(h)):"datetime"===s.xaxis.type?this.twoDSeriesX.push(a.parseDate(h.toString())):(this.w.axisFlags.dataFormatXNumeric=!0,this.w.axisFlags.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(h))):f?(this.fallbackToCategory=!0,this.twoDSeriesX.push(h)):(this.w.axisFlags.isXNumeric=!0,this.w.axisFlags.dataFormatXNumeric=!0,this.twoDSeriesX.push(h))}}handleRangeData(t,e){let s={start:[],end:[],rangeUniques:[]};return this.isFormat2DArray()?s=this.handleRangeDataFormat("array",t,e):this.isFormatXY()&&(s=this.handleRangeDataFormat("xy",t,e)),this.w.rangeData.seriesRangeStart[e]=void 0===s.start?[]:s.start,this.w.rangeData.seriesRangeEnd[e]=void 0===s.end?[]:s.end,this.w.rangeData.seriesRange[e]=s.rangeUniques,this.w.rangeData.seriesRange.forEach(i=>
1{i&&i.forEach(a=>{const o=a.y,r=o.length;if(!(r<=1))for(let n=0;n<r;n++){const c=o[n],l=c.y1,h=c.y2;for(let d=n+1;d<r;d++){const f=o[d];if(l<=f.y2&&f.y1<=h){const u=a;u.overlaps.add(c.rangeName),u.overlaps.add(f.rangeName)}}}})}),s}handleCandleStickBoxData(t,e){let s={o:[],h:[],m:[],l:[],c:[]};return this.isFormat2DArray()?s=this.handleCandleStickBoxDataFormat("array",t,e):this.isFormatXY()&&(s=this.handleCandleStickBoxDataFormat("xy",t,e)),this.w.candleData.seriesCandleO[e]=s.o,this.w.candleData.seriesCandleH[e]=s.h,this.w.candleData.seriesCandleM[e]=s.m,this.w.candleData.seriesCandleL[e]=s.l,this.w.candleData.seriesCandleC[e]=s.c,s}handleRangeDataFormat(t,e,s){const i=[],a=[],o=new Map,r=[];if(e[s].data.forEach(n=>{if(!o.has(n.x)){const c={x:n.x,overlaps:new Set,y:[]};o.set(n.x,c),r.push(c)}}),"array"===t)for(let n=0;n<e[s].data.length;n++)Array.isArray(e[s].data[n])?(i.push(e[s].data[n][1][0]),a.push(e[s].data[n][1][1])):(i.push(e[s].data[n]),a.push(e[s].data[n]));else if("xy"===t)for(let n=0;n<e[s].data.length;n++){const c=Array.isArray(e[s].data[n].y),l=D.randomId(),h=e[s].data[n].x,d={y1:c?e[s].data[n].y[0]:e[s].data[n].y,y2:c?e[s].data[n].y[1]:e[s].data[n].y,rangeName:l};e[s].data[n].rangeName=l;const f=o.get(h);f&&f.y.push(d),i.push(d.y1),a.push(d.y2)}return{start:i,end:a,rangeUniques:r}}handleCandleStickBoxDataFormat(t,e,s){const i=this.w,a="boxPlot"===i.config.chart.type||"boxPlot"===i.config.series[s].type,o=[],r=[],n=[],c=[],l=[],h=e[s].data;let d;d="array"===t?a&&6===h[0].length||!a&&5===h[0].length?p=>p.slice(1):p=>Array.isArray(p[1])?p[1]:[]:f=>Array.isArray(f.y)?f.y:[];for(let f=0;f<h.length;f++){const p=d(h[f]);p&&p.length>=2&&(o.push(p[0]),r.push(p[1]),a?(n.push(p[2]),c.push(p[3]),l.push(p[4])):(c.push(p[2]),l.push(p[3])))}return{o,h:r,m:n,l:c,c:l}}parseDataAxisCharts(t){var e,s;const i=this.w.config,a=this.w.globals,o=new K(this.w),r=i.labels.length>0?i.labels.slice():i.xaxis.categories.slice();this.w.axisFlags.isRangeBar="rangeBar"===i.chart.type&&a.isBarHorizontal,this.w.labelData.hasXaxisGroups="category"===i.xaxis.type&&i.xaxis.group.groups.length>0,this.w.labelData.hasXaxisGroups&&(this.w.labelData.groups=i.xaxis.group.groups),t.forEach((h,d)=>{this.w.seriesData.seriesNames.push(void 0!==h.name?h.name:"series-"+parseInt(String(d+1),10))}),this.coreUtils.setSeriesYAxisMappings();const n=[],c=[...new Set(i.series.map(h=>h.group))];i.series.forEach((h,d)=>{const f=c.indexOf(h.group);n[f]||(n[f]=[]),n[f].push(this.w.seriesData.seriesNames[d])}),this.w.labelData.seriesGroups=n;const l=()=>{for(let h=0;h<r.length;h++)if("string"==typeof r[h]){if(!o.isValidDate(r[h]))throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");this.twoDSeriesX.push(o.parseDate(r[h]))}else this.twoDSeriesX.push(r[h])};for(let h=0;h<t.length;h++){if(this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],typeof t[h].data>"u")return void console.error("It is a possibility that you may have not included 'data' property in series.");const d=i.chart.dataReducer;if(d?.enabled&&this.isMultiFormat()&&t[h].data.length>(null!=(e=d.threshold)?e:500)&&(t[h]=H(I({},t[h]),{data:vt.lttbDownsample(t[h].data,null!=(s=d.targetPoints)?s:250)})),("rangeBar"===i.chart.type||"rangeArea"===i.chart.type||"rangeBar"===t[h].type||"rangeArea"===t[h].type)&&(this.w.axisFlags.isRangeData=!0,this.handleRangeData(t,h)),this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(t,h):this.isFormatXY()&&this.handleFormatXY(t,h),("candlestick"===i.chart.type||"candlestick"===t[h].type||"boxPlot"===i.chart.type||"boxPlot"===t[h].type)&&this.handleCandleStickBoxData(t,h),this.w.seriesData.series.push(this.twoDSeries),this.w.labelData.labels.push(this.twoDSeriesX),this.w.seriesData.seriesX.push(this.twoDSeriesX),this.w.seriesData.seriesGoals=this.seriesGoals,h===this.activeSeriesIndex&&!this.fallbackToCategory&&(this.w.axisFlags.isXNumeric=!0);else{"datetime"===i.xaxis.type?(this.w.axisFlags.isXNumeric=!0,l(),this.w.seriesData.seriesX.push(this.twoDSeriesX)):"numeric"===i.xaxis.type&&(this.w.axisFlags.isXNumeric=!0,r.length>0&&(this.twoDSeriesX=r,this.w.seriesData.seriesX.push(this.twoDSeriesX))),this.w.labelData.labels.push(this.twoDSeriesX);const f=t[h].data.map(p=>D.parseNumber(p));this.w.seriesData.series.push(f)}
vendor: 4,398 bytes, line 1
1this.w.seriesData.seriesZ.push(this.threeDSeries),this.w.seriesData.seriesColors.push(void 0!==t[h].color?t[h].color:void 0)}return this.w}parseDataNonAxisCharts(t){const e=this.w.config,s=Array.isArray(t)&&t.every(o=>"number"==typeof o)&&e.labels.length>0,i=Array.isArray(t)&&t.some(o=>o&&"object"==typeof o&&o.data||o&&"object"==typeof o&&o.parsing);if(s&&i&&console.warn("ApexCharts: Both old format (numeric series + labels) and new format (series objects with data/parsing) detected. Using old format for backward compatibility."),s){this.w.seriesData.series=t.slice(),this.w.seriesData.seriesNames=e.labels.slice();for(let o=0;o<this.w.seriesData.series.length;o++)void 0===this.w.seriesData.seriesNames[o]&&this.w.seriesData.seriesNames.push("series-"+(o+1));return this.w}if(Array.isArray(t)&&t.every(o=>"number"==typeof o)){this.w.seriesData.series=t.slice(),this.w.seriesData.seriesNames=[];for(let o=0;o<this.w.seriesData.series.length;o++)this.w.seriesData.seriesNames.push(e.labels[o]||`series-${o+1}`);return this.w}const a=this.extractPieDataFromSeries(t);this.w.seriesData.series=a.values,this.w.seriesData.seriesNames=a.labels,"radialBar"===e.chart.type&&(this.w.seriesData.series=this.w.seriesData.series.map(o=>{const r=D.parseNumber(o);return r>100&&console.warn(`ApexCharts: RadialBar value ${r} > 100, consider using percentage values (0-100)`),r}));for(let o=0;o<this.w.seriesData.series.length;o++)void 0===this.w.seriesData.seriesNames[o]&&this.w.seriesData.seriesNames.push("series-"+(o+1));return this.w}resetParsingFlags(){const t=this.w;t.axisFlags.dataWasParsed=!1,t.globals.originalSeries=null,t.config.series&&t.config.series.forEach(e=>{e.__apexParsed&&delete e.__apexParsed})}extractPieDataFromSeries(t){const e=[],s=[];if(!Array.isArray(t))return console.warn("ApexCharts: Expected array for series data"),{values:[],labels:[]};if(0===t.length)return console.warn("ApexCharts: Empty series array"),{values:[],labels:[]};const i=t[0];return"object"==typeof i&&null!==i&&i.data?(this.extractPieDataFromSeriesObjects(t,e,s),{values:e,labels:s}):(console.warn("ApexCharts: Unsupported series format for pie/donut/radialBar. Expected series objects with data property."),{values:[],labels:[]})}extractPieDataFromSeriesObjects(t,e,s){t.forEach((i,a)=>{i.data&&Array.isArray(i.data)?i.data.forEach(o=>{"object"==typeof o&&null!==o?void 0!==o.x&&void 0!==o.y?(s.push(String(o.x)),e.push(D.parseNumber(o.y))):console.warn("ApexCharts: Invalid data point format for pie chart. Expected {x, y} format:",o):console.warn("ApexCharts: Expected object data point, got:",typeof o)}):console.warn(`ApexCharts: Series ${a} has no valid data array`)})}handleExternalLabelsData(t){const e=this.w.config;if(e.xaxis.categories.length>0)this.w.labelData.labels=e.xaxis.categories;else if(e.labels.length>0)this.w.labelData.labels=e.labels.slice();else if(this.fallbackToCategory){if(this.w.labelData.labels=this.w.labelData.labels[0],this.w.rangeData.seriesRange.length){this.w.rangeData.seriesRange.map(i=>{i.forEach(a=>{this.w.labelData.labels.indexOf(a.x)<0&&a.x&&this.w.labelData.labels.push(a.x)})});const s=this.w.labelData.labels;if(s.length>0&&("number"==typeof s[0]||"string"==typeof s[0]))this.w.labelData.labels=[...new Set(s)];else{const i=new Map;for(const a of s){const o=JSON.stringify(a);i.has(o)||i.set(o,a)}this.w.labelData.labels=Array.from(i.values())}}e.xaxis.convertedCatToNumeric&&(new mt(e).convertCatToNumericXaxis(e,this.w.seriesData.seriesX[0]),this._generateExternalLabels(t))}else this._generateExternalLabels(t)}_generateExternalLabels(t){const e=this.w.globals,s=this.w.config;let i=[];if(e.axisCharts){if(this.w.seriesData.series.length>0)if(this.isFormatXY()){const a=s.series.map(r=>{const n=new Map;for(const c of r.data)n.has(c.x)||n.set(c.x,c);return Array.from(n.values())}),o=a.reduce((r,n,c,l)=>l[r].length>n.length?r:c,0);for(let r=0;r<a[o].length;r++)i.push(r+1)}else for(let a=0;a<this.w.seriesData.series[e.maxValsInArrayIndex].length;a++)i.push(a+1);this.w.seriesData.seriesX=[];for(let a=0;a<t.length;a++)this.w.seriesData.seriesX.push(i);this.w.globals.isBarHorizontal||(this.w.axisFlags.isXNumeric=!0)}if(0===i.length){i=e.axisCharts?[]:this.w.seriesData.series.map((a,o)=>o+1);for(let a=0;a<t.length;a++)this.w.seriesData.seriesX.push(i)}this.w.labelData.labels=i,s.xaxis.convertedCatToNumeric&&(this.w.labelData.categoryLabels=i.map(a=>
1s.xaxis.labels.formatter(a))),this.w.axisFlags.noLabelsProvided=!0}parseRawDataIfNeeded(t){const s=this.w.globals,i=this.w.config.parsing;if(this.w.axisFlags.dataWasParsed||!i&&!t.some(o=>o.parsing))return t;const a=t.map((o,r)=>{var n,c,l;if(!o.data||!Array.isArray(o.data)||0===o.data.length)return o;const h={x:(null==(n=o.parsing)?void 0:n.x)||i?.x,y:(null==(c=o.parsing)?void 0:c.y)||i?.y,z:(null==(l=o.parsing)?void 0:l.z)||i?.z};if(!h.x&&!h.y)return o;const d=o.data[0];if("object"==typeof d&&null!==d&&(Object.prototype.hasOwnProperty.call(d,"x")||Object.prototype.hasOwnProperty.call(d,"y"))||Array.isArray(d))return o;if(!h.x||!h.y||Array.isArray(h.y)&&0===h.y.length)return console.warn(`ApexCharts: Series ${r} has parsing config but missing x or y field specification`),o;const f=o.data.map((p,g)=>{if("object"!=typeof p||null===p)return console.warn(`ApexCharts: Series ${r}, data point ${g} is not an object, skipping parsing`),p;const u=this.getNestedValue(p,h.x);let b,x;if(Array.isArray(h.y)){const m=h.y.map(y=>this.getNestedValue(p,y));"bubble"===this.w.config.chart.type?(m.length<2&&console.warn(`ApexCharts: series[${r}] bubble chart requires parseData.y to have at least 2 fields (y and z). Got: ${JSON.stringify(h.y)}`),b=m[0]):b=m}else b=this.getNestedValue(p,h.y);h.z&&(x=this.getNestedValue(p,h.z)),void 0===u&&console.warn(`ApexCharts: Series ${r}, data point ${g} missing field '${h.x}'`),void 0===b&&console.warn(`ApexCharts: Series ${r}, data point ${g} missing field '${h.y}'`);const w={x:u,y:b,z:void 0};if("bubble"===this.w.config.chart.type&&Array.isArray(h.y)&&2===h.y.length){const m=this.getNestedValue(p,h.y[1]);void 0!==m&&(w.z=m)}return void 0!==x&&(w.z=x),w});return H(I({},o),{data:f,__apexParsed:!0})});return this.w.axisFlags.dataWasParsed=!0,s.originalSeries||(s.originalSeries=D.clone(t)),a}getNestedValue(t,e){if(!t||"object"!=typeof t||!e)return;if(-1===e.indexOf("."))return t[e];const s=e.split(".");let i=t;for(let a=0;a<s.length;a++){if(null==i||"object"!=typeof i)return;i=i[s[a]]}return i}parseData(t){const e=this.w,s=e.config,i=e.globals;if(t=this.parseRawDataIfNeeded(t),s.series=t,i.initialSeries=D.clone(t),this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.resetGlobals(),this.isMultipleY(),i.axisCharts?(this.parseDataAxisCharts(t),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(t),s.chart.stacked){const o=new Z(this.w);this.w.seriesData.series=o.setNullSeriesToZeroValues(this.w.seriesData.series)}this.coreUtils.getSeriesTotals(),i.axisCharts&&(this.w.seriesData.stackedSeriesTotals=this.coreUtils.getStackedSeriesTotals(),this.w.seriesData.stackedSeriesTotalsByGroups=this.coreUtils.getStackedSeriesTotalsByGroups()),this.coreUtils.getPercentSeries(),!this.w.axisFlags.dataFormatXNumeric&&(!this.w.axisFlags.isXNumeric||"numeric"===s.xaxis.type&&0===s.labels.length&&0===s.xaxis.categories.length)&&this.handleExternalLabelsData(t);const a=this.coreUtils.getCategoryLabels(this.w.labelData.labels);for(let o=0;o<a.length;o++)if(Array.isArray(a[o])){this.w.axisFlags.isMultiLineX=!0;break}return{seriesData:{series:this.w.seriesData.series,seriesNames:this.w.seriesData.seriesNames,seriesX:this.w.seriesData.seriesX,seriesZ:this.w.seriesData.seriesZ,seriesColors:this.w.seriesData.seriesColors,seriesGoals:this.w.seriesData.seriesGoals,initialSeries:i.initialSeries,originalSeries:i.originalSeries,stackedSeriesTotals:this.w.seriesData.stackedSeriesTotals,stackedSeriesTotalsByGroups:this.w.seriesData.stackedSeriesTotalsByGroups,noLabelsProvided:this.w.axisFlags.noLabelsProvided},rangeData:{seriesRangeStart:this.w.rangeData.seriesRangeStart,seriesRangeEnd:this.w.rangeData.seriesRangeEnd,seriesRange:this.w.rangeData.seriesRange},candleData:{seriesCandleO:this.w.candleData.seriesCandleO,seriesCandleH:this.w.candleData.seriesCandleH,seriesCandleM:this.w.candleData.seriesCandleM,seriesCandleL:this.w.candleData.seriesCandleL,seriesCandleC:this.w.candleData.seriesCandleC},labelData:{labels:this.w.labelData.labels,categoryLabels:this.w.labelData.categoryLabels},axisFlags:{isXNumeric:this.w.axisFlags.isXNumeric,dataFormatXNumeric:this.w.axisFlags.dataFormatXNumeric,isDataXYZ:this.w.axisFlags.isDataXYZ,isRangeData:this.w.axisFlags.isRangeData,isRangeBar:this.w.axisFlags.isRangeBar,isMultiLineX:this.w.axisFlags.isMultiLineX,dataWasParsed:this.w.axisFlags.dataWasParsed,hasXaxisGroups:this.w.labelData.hasXaxisGroups,groups:this.w.labelData.groups,seriesGroups:this.w.labelData.seriesGroups}}}static lttbDownsample(t,e){const s=t.length;if(e>=s||e<3)return t;const i=!Array.isArray(t[0]),a=i?l=>l.x:l=>l[0],o=i?l=>l.y:l=>l[1],r=[];r.push(t[0]);const n=(s-2)/(e-2);let c=0;for(let l=0;l<e-2;l++){const h=Math.floor((l+1)*n)+1,d=Math.min(Math.floor((l+2)*n)+1,s);let f=0,p=0;const g=d-h;for(let v=h;v<d;v++)f+=a(t[v]),p+=o(t[v]);f/=g,p/=g;const u=Math.floor(l*n)+1,b=Math.min(Math.floor((l+1)*n)+1,s),x=a(t[c]),w=o(t[c]);let m=-1,y=u;for(let v=u;v<b;v++){const C=.5*Math.abs((x-f)*(o(t[v])-w)-(x-a(t[v]))*(p-w));C>m&&(m=C,y=v)}r.push(t[y]),c=y}return r.push(t[s-1]),r}excludeCollapsedSeriesInYAxis(){const t=this.w,e=[];
1t.globals.seriesYAxisMap.forEach((s,i)=>{let a=0;s.forEach(o=>{-1!==t.globals.collapsedSeriesIndices.indexOf(o)&&a++}),a>0&&a==s.length&&e.push(i)}),t.globals.ignoreYAxisIndexes=e.map(s=>s)}}class Ke{constructor(t,e){this.w=t,this.ctx=e}_updateOptions(t,e=!1,s=!0,i=!0,a=!1){return new Promise(o=>{let r=[this.ctx];i&&(r=this.ctx.getSyncedCharts()),this.w.globals.isExecCalled&&(r=[this.ctx],this.w.globals.isExecCalled=!1),r.forEach((n,c)=>{const l=n.w;if(l.globals.shouldAnimate=s,e||(l.globals.resized=!0,l.globals.dataChanged=!0,s&&n.series.getPreviousPaths()),t&&"object"==typeof t&&(n.config=new yt(t),t=q.extendArrayProps(n.config,t,l),n.w.globals.chartID!==this.w.globals.chartID&&delete t.series,l.config=D.extend(l.config,t),a&&(l.globals.lastXAxis=t.xaxis?D.clone(t.xaxis):[],l.globals.lastYAxis=t.yaxis?D.clone(t.yaxis):[],l.globals.initialConfig=D.extend({},l.config),l.globals.initialSeries=D.clone(l.config.series),t.series))){for(let h=0;h<l.globals.collapsedSeriesIndices.length;h++){const d=l.config.series[l.globals.collapsedSeriesIndices[h]];l.globals.collapsedSeries[h].data=l.globals.axisCharts?d.data.slice():d}for(let h=0;h<l.globals.ancillaryCollapsedSeriesIndices.length;h++){const d=l.config.series[l.globals.ancillaryCollapsedSeriesIndices[h]];l.globals.ancillaryCollapsedSeries[h].data=l.globals.axisCharts?d.data.slice():d}n.series.emptyCollapsedSeries(l.config.series)}return n.update(t).then(()=>{c===r.length-1&&o(n)})})})}_updateSeries(t,e,s=!1){return new Promise(i=>{const a=this.w;a.globals.shouldAnimate=e,a.globals.dataChanged=!0,_t.invalidateSelectors(a),e&&this.ctx.series.getPreviousPaths();const o=a.config.series.length;this.ctx.data.resetParsingFlags();const r=this.ctx.data.parseData(t);return this.ctx._writeParsedSeriesData(r.seriesData),this.ctx._writeParsedRangeData(r.rangeData),this.ctx._writeParsedCandleData(r.candleData),this.ctx._writeParsedLabelData(r.labelData),this.ctx._writeParsedAxisFlags(r.axisFlags),s&&(a.globals.initialConfig&&(a.globals.initialConfig.series=D.clone(a.config.series)),a.globals.initialSeries=D.clone(a.config.series)),this._canUseFastPath(t,o,a)?this.ctx.fastUpdate(e).then(()=>{i(this.ctx)}):this.ctx.update().then(()=>{i(this.ctx)})})}_canUseFastPath(t,e,s){return!(!s.dom.elGraphical||!s.globals.axisCharts||t.length!==e||s.globals.collapsedSeries.length>0||s.globals.ancillaryCollapsedSeries.length>0||s.globals.risingSeries.length>0||s.globals.comboCharts||s.interact.zoomed)}_extendSeries(t,e){const s=this.w,i=s.config.series[e];return H(I({},s.config.series[e]),{name:t.name?t.name:i?.name,color:t.color?t.color:i?.color,type:t.type?t.type:i?.type,group:t.group?t.group:i?.group,hidden:typeof t.hidden<"u"?t.hidden:i?.hidden,data:t.data?t.data:i?.data,zIndex:typeof t.zIndex<"u"?t.zIndex:e})}toggleDataPointSelection(t,e){const s=this.w;let i=null;const a=`.apexcharts-series[data\\:realIndex='${t}']`;return s.globals.axisCharts?i=s.dom.Paper.findOne(`${a} path[j='${e}'], ${a} circle[j='${e}'], ${a} rect[j='${e}']`):typeof e>"u"&&(i=s.dom.Paper.findOne(`${a} path[j='${t}']`),("pie"===s.config.chart.type||"polarArea"===s.config.chart.type||"donut"===s.config.chart.type)&&this.ctx.pie.pieClicked(t)),i?(new E(this.w).pathMouseDown(i,null),i.node?i.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}forceXAxisUpdate(t){const e=this.w;return["min","max"].forEach(i=>{typeof t.xaxis[i]<"u"&&(e.config.xaxis[i]=t.xaxis[i],e.globals.lastXAxis[i]=t.xaxis[i])}),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric&&(t=new mt(t).convertCatToNumericXaxis(t,this.ctx)),t}forceYAxisUpdate(t){return t.chart&&t.chart.stacked&&"100%"===t.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((e,s)=>{t.yaxis[s].min=0,t.yaxis[s].max=100}):(t.yaxis.min=0,t.yaxis.max=100)),t}revertDefaultAxisMinMax(t){const e=this.w;let s=e.globals.lastXAxis,i=e.globals.lastYAxis;t&&t.xaxis&&(s=t.xaxis),t&&t.yaxis&&(i=t.yaxis);const a=s;e.config.xaxis.min=a.min,e.config.xaxis.max=a.max,e.config.yaxis.map((r,n)=>{e.interact.zoomed||typeof i[n]<"u"?(r=>{if(typeof i[r]<"u"){const n=i[r];e.config.yaxis[r].min=n.min,e.config.yaxis[r].max=n.max}})(n):typeof this.ctx.opts.yaxis[n]<"u"&&(r.min=this.ctx.opts.yaxis[n].min,r.max=this.ctx.opts.yaxis[n].max)})}}class re{constructor(t){this.w=t.w,this.ttCtx=t}getNearestValues({hoverArea:t,elGrid:e,clientX:s,clientY:i}){var a,o;const r=this.w,n=e.getBoundingClientRect(),c=n.width,l=n.height;let h=c/(r.globals.dataPoints-1);const d=l/r.globals.dataPoints,f=this.hasBars();(r.globals.comboCharts||f)&&!r.config.xaxis.convertedCatToNumeric&&(h=c/r.globals.dataPoints);const p=s-n.left-r.globals.barPadForNumericAxis,g=i-n.top;p<0||g<0||p>c||g>l?(t.classList.remove("hovering-zoom"),t.classList.remove("hovering-pan")):r.interact.zoomEnabled?(t.classList.remove("hovering-pan"),t.classList.add("hovering-zoom")):r.interact.panEnabled&&(t.classList.remove("hovering-zoom"),t.classList.add("hovering-pan"));let b=Math.round(p/h);const x=Math.floor(g/d);f&&!r.config.xaxis.convertedCatToNumeric&&(b=Math.ceil(p/h),b-=1);let w=null,m=null,y=r.globals.seriesXvalues.map(C=>C.filter(L=>D.isNumber(L)));const v=r.globals.seriesYvalues.map(C=>C.filter(L=>D.isNumber(L)));if(r.axisFlags.isXNumeric){const C=this.ttCtx.getElGrid();if(!C)return{hoverX:p,hoverY:g};const L=C.getBoundingClientRect(),k=p*(L.width/c);m=this.closestInMultiArray(k,g*(L.height/l),y,v),w=m.index,b=null!=(a=m.j)?a:0,null!==w&&r.globals.hasNullValues&&(y=r.globals.seriesXvalues[w],m=this.closestInArray(k,y),b=null!=(o=m.j)?o:0)}return r.interact.capturedSeriesIndex=null===w?-1:w,(!b||b<1)&&(b=0),r.interact.capturedDataPointIndex=r.globals.isBarHorizontal?x:b,{capturedSeries:w,j:r.globals.isBarHorizontal?x:b,hoverX:p,hoverY:g}}getFirstActiveXArray(t){const e=this.w;let s=0;const i=t.map((a,o)=>a.length>0?o:-1);for(let a=0;a<i.length;a++)if(-1!==i[a]&&-1===e.globals.collapsedSeriesIndices.indexOf(a)&&-1===e.globals.ancillaryCollapsedSeriesIndices.indexOf(a)){s=i[a];break}return s}closestInMultiArray(t,e,s,i){const a=this.w,o=l=>-1===a.globals.collapsedSeriesIndices.indexOf(l)&&-1===a.globals.ancillaryCollapsedSeriesIndices.indexOf(l);let r=1/0,n=null,c=null;for(let l=0;l<s.length;l++){if(!o(l))continue;const h=s[l],d=i[l],f=Math.min(h.length,d.length);for(let p=0;p<f;p++){const u=t-h[p];let b=Math.sqrt(u*u);
1if(!a.globals.allSeriesHasEqualX){const w=e-d[p];b=Math.sqrt(u*u+w*w)}b<r&&(r=b,n=l,c=p)}}return{index:n,j:c}}closestInArray(t,e){let i=null,a=Math.abs(t-e[0]);for(let o=0;o<e.length;o++){const r=Math.abs(t-e[o]);r<a&&(a=r,i=o)}return{j:i}}isXoverlap(t){const s=[],i=this.w.seriesData.seriesX.filter(a=>typeof a[0]<"u");if(i.length>0)for(let a=0;a<i.length-1;a++)typeof i[a][t]<"u"&&typeof i[a+1][t]<"u"&&i[a][t]!==i[a+1][t]&&s.push("unEqual");return 0===s.length}isInitialSeriesSameLen(){var t,e,s;let i=!0;const a=(null==(t=this.w.globals.initialSeries)?void 0:t.filter((o,r)=>{var n;return!(null!=(n=this.w.globals.collapsedSeriesIndices)&&n.includes(r))}))||[];for(let o=0;o<a.length-1;o++){if(null==(e=a[o])||!e.data||null==(s=a[o+1])||!s.data)return!0;if(a[o].data.length!==a[o+1].data.length){i=!1;break}}return i}getBarsHeight(t){return[...t].reduce((i,a)=>i+a.getBBox().height,0)}getElMarkers(t){return this.w.dom.baseEl.querySelectorAll("number"==typeof t?`.apexcharts-series[data\\:realIndex='${t}'] .apexcharts-series-markers-wrap > *`:".apexcharts-series-markers-wrap > *")}getAllMarkers(t=!1){let e=[...this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap")];t&&(e=e.filter(i=>{const a=Number(i.getAttribute("data:realIndex"));return-1===this.w.globals.collapsedSeriesIndices.indexOf(a)})),e.sort((i,a)=>{var o=Number(i.getAttribute("data:realIndex")),r=Number(a.getAttribute("data:realIndex"));return r<o?1:r>o?-1:0});const s=[];return e.forEach(i=>{s.push(i.querySelector(".apexcharts-marker"))}),s}hasMarkers(t){return this.getElMarkers(t).length>0}getPathFromPoint(t,e){const s=Number(t.getAttribute("cx")),i=Number(t.getAttribute("cy")),a=t.getAttribute("shape");return new E(this.w).getMarkerPath(s,i,a,e)}getElBars(){return this.w.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}hasBars(){return this.getElBars().length>0}getHoverMarkerSize(t){const e=this.w;let s=e.config.markers.hover.size;return void 0===s&&(s=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),s}toggleAllTooltipSeriesGroups(t){const e=this.w,s=this.ttCtx;0===s.allTooltipSeriesGroups.length&&(s.allTooltipSeriesGroups=e.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));const i=s.allTooltipSeriesGroups;for(let a=0;a<i.length;a++)"enable"===t?(i[a].classList.add("apexcharts-active"),i[a].style.display=e.config.tooltip.items.display):(i[a].classList.remove("apexcharts-active"),i[a].style.display="none")}}class Je{constructor(t){this.w=t.w,this.ttCtx=t,this.tooltipUtil=new re(t)}drawSeriesTexts({shared:t=!0,ttItems:e,i:s=0,j:i=null,y1:a,y2:o,e:r}){const n=this.w;void 0!==n.config.tooltip.custom?this.handleCustomTooltip({i:s,j:i,y1:a,y2:o,w:n}):this.toggleActiveInactiveSeries(t,s);const c=this.getValuesToPrint({i:s,j:i});this.printLabels({i:s,j:i,values:c,ttItems:e,shared:t,e:r});const l=this.ttCtx.getElTooltip();l&&(this.ttCtx.tooltipRect.ttWidth=l.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=l.getBoundingClientRect().height)}printLabels({i:t,j:e,values:s,ttItems:i,shared:a,e:o}){var r;const n=this.w;let c,l=[];const h=b=>n.seriesData.seriesGoals[b]&&n.seriesData.seriesGoals[b][e]&&Array.isArray(n.seriesData.seriesGoals[b][e]),{xVal:d,zVal:f,xAxisTTVal:p}=s;let g="",u=n.globals.colors[t];null!==e&&n.config.plotOptions.bar.distributed&&(u=n.globals.colors[e]);for(let b=0,x=n.seriesData.series.length-1;b<n.seriesData.series.length;b++,x--){let w=this.getFormatters(t);g=this.getSeriesName({fn:w.yLbTitleFormatter,index:t,seriesIndex:t,j:e}),"treemap"===n.config.chart.type&&(g=w.yLbTitleFormatter(String(n.config.series[t].data[e].x),{series:n.seriesData.series,seriesIndex:t,dataPointIndex:e,w:n}));const m=n.config.tooltip.inverseOrder?x:b;if(n.globals.axisCharts){const y=v=>{var C,L,k,S;return n.axisFlags.isRangeData?w.yLbFormatter(null==(L=null==(C=n.rangeData.seriesRangeStart)?void 0:C[v])?void 0:L[e],{series:n.rangeData.seriesRangeStart,seriesIndex:v,dataPointIndex:e,w:n})+" - "+w.yLbFormatter(null==(S=null==(k=n.rangeData.seriesRangeEnd)?void 0:k[v])?void 0:S[e],{series:n.rangeData.seriesRangeEnd,seriesIndex:v,dataPointIndex:e,w:n}):w.yLbFormatter(n.seriesData.series[v][e],{series:n.seriesData.series,seriesIndex:v,dataPointIndex:e,w:n})};
1if(a)w=this.getFormatters(m),g=this.getSeriesName({fn:w.yLbTitleFormatter,index:m,seriesIndex:t,j:e}),u=n.globals.colors[m],c=y(m),h(m)&&(l=n.seriesData.seriesGoals[m][e].map(v=>({attrs:v,val:w.yLbFormatter(v.value,{seriesIndex:m,dataPointIndex:e,w:n})})));else{const v=null==(r=o?.target)?void 0:r.getAttribute("fill");v&&(-1!==v.indexOf("url")?-1!==v.indexOf("Pattern")&&(u=n.dom.baseEl.querySelector(v.substr(4).slice(0,-1)).childNodes[0].getAttribute("stroke")):u=v),c=y(t),h(t)&&Array.isArray(n.seriesData.seriesGoals[t][e])&&(l=n.seriesData.seriesGoals[t][e].map(C=>({attrs:C,val:w.yLbFormatter(C.value,{seriesIndex:t,dataPointIndex:e,w:n})})))}}null===e&&(c=w.yLbFormatter(n.seriesData.series[t],H(I({},n),{seriesIndex:t,dataPointIndex:t}))),this.DOMHandling({i:t,t:m,j:e,ttItems:i,values:{val:c,goalVals:l,xVal:d,xAxisTTVal:p,zVal:f},seriesName:g,shared:a,pColor:u})}}getFormatters(t){const e=this.w;let i,s=e.formatters.yLabelFormatters[t];return void 0!==e.formatters.ttVal?Array.isArray(e.formatters.ttVal)?(s=e.formatters.ttVal[t]&&e.formatters.ttVal[t].formatter,i=e.formatters.ttVal[t]&&e.formatters.ttVal[t].title&&e.formatters.ttVal[t].title.formatter):(s=e.formatters.ttVal.formatter,"function"==typeof e.formatters.ttVal.title.formatter&&(i=e.formatters.ttVal.title.formatter)):i=e.config.tooltip.y.title.formatter,"function"!=typeof s&&(s=e.formatters.yLabelFormatters[0]?e.formatters.yLabelFormatters[0]:function(a){return a}),"function"!=typeof i&&(i=function(a){return a?a+": ":""}),{yLbFormatter:s,yLbTitleFormatter:i}}getSeriesName({fn:t,index:e,seriesIndex:s,j:i}){const a=this.w;return t(String(a.seriesData.seriesNames[e]),{series:a.seriesData.series,seriesIndex:s,dataPointIndex:i,w:a})}DOMHandling({t,j:e,ttItems:s,values:i,seriesName:a,shared:o,pColor:r}){const n=this.w,c=this.ttCtx,{val:l,goalVals:h,xVal:d,xAxisTTVal:f,zVal:p}=i;let g=null;g=s[t].children,n.config.tooltip.fillSeriesColor&&(s[t].style.backgroundColor=r,g[0].style.display="none"),c.showTooltipTitle&&(null===c.tooltipTitle&&(c.tooltipTitle=n.dom.baseEl.querySelector(".apexcharts-tooltip-title")),c.tooltipTitle&&(c.tooltipTitle.innerHTML=d)),c.isXAxisTooltipEnabled&&c.xaxisTooltipText&&(c.xaxisTooltipText.innerHTML=""!==f?f:d);const u=s[t].querySelector(".apexcharts-tooltip-text-y-label");u&&(u.innerHTML=a||"");const b=s[t].querySelector(".apexcharts-tooltip-text-y-value");b&&(b.innerHTML=typeof l<"u"?l:""),g[0]&&g[0].classList.contains("apexcharts-tooltip-marker")&&(n.config.tooltip.marker.fillColors&&Array.isArray(n.config.tooltip.marker.fillColors)&&(r=n.config.tooltip.marker.fillColors[t]),n.config.tooltip.fillSeriesColor?g[0].style.backgroundColor=r:g[0].style.color=r),n.config.tooltip.marker.show||(g[0].style.display="none");const x=s[t].querySelector(".apexcharts-tooltip-text-goals-label"),w=s[t].querySelector(".apexcharts-tooltip-text-goals-value");if(h.length&&n.seriesData.seriesGoals[t]){const m=()=>{let y="<div>",v="<div>";h.forEach(C=>{y+=` <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: ${C.attrs.strokeColor}; height: 3px; border-radius: 0; top: 5px;"></span> ${C.attrs.name}</div>`,v+=`<div>${C.val}</div>`}),x.innerHTML=y+"</div>",w.innerHTML=v+"</div>"};o?n.seriesData.seriesGoals[t][e]&&Array.isArray(n.seriesData.seriesGoals[t][e])?m():(x.innerHTML="",w.innerHTML=""):m()}else x.innerHTML="",w.innerHTML="";if(null!==p&&(s[t].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=n.config.tooltip.z.title,s[t].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=typeof p<"u"?p:""),o&&g[0]){if(n.config.tooltip.hideEmptySeries){const m=s[t].querySelector(".apexcharts-tooltip-marker"),y=s[t].querySelector(".apexcharts-tooltip-text");0==parseFloat(l)?(m.style.display="none",y.style.display="none"):(m.style.display="block",y.style.display="block")}g[0].parentNode.style.display=typeof l>"u"||null===l||n.globals.ancillaryCollapsedSeriesIndices.indexOf(t)>-1||n.globals.collapsedSeriesIndices.indexOf(t)>-1||Array.isArray(c.tConfig.enabledOnSeries)&&-1===c.tConfig.enabledOnSeries.indexOf(t)?"none":n.config.tooltip.items.display}else Array.isArray(c.tConfig.enabledOnSeries)&&-1===c.tConfig.enabledOnSeries.indexOf(t)&&(g[0].parentNode.style.display="none")}toggleActiveInactiveSeries(t,e){const s=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");const i=s.dom.baseEl.querySelector(`.apexcharts-tooltip-series-group-${e}`);if(i){const a=i;a.classList.add("apexcharts-active"),a.style.display=s.config.tooltip.items.display}}}getValuesToPrint({i:t,j:e}){var s,i,a,o,r,n,c,l;const h=this.w,d=h.seriesData.seriesX.map(m=>m.length>0?m:[]);let f="",p="",g=null,u=null;const b={series:h.seriesData.series,seriesIndex:t,dataPointIndex:e,w:h},x=h.formatters.ttZFormatter;null===e?u=h.seriesData.series[t]:h.axisFlags.isXNumeric&&"treemap"!==h.config.chart.type?(f=d[t][e],0===d[t].length&&(f=d[this.tooltipUtil.getFirstActiveXArray(d)][e])):f=new vt(this.w).isFormatXY()?typeof h.config.series[t].data[e]<"u"?h.config.series[t].data[e].x:"":typeof h.labelData.labels[e]<"u"?h.labelData.labels[e]:"";const w=f;return f=h.axisFlags.isXNumeric&&"datetime"===h.config.xaxis.type?new bt(this.w).xLabelFormat(h.formatters.ttKeyFormatter,w,w,{i:void 0,dateFormatter:new K(this.w).formatDate,w:this.w}
1):h.globals.isBarHorizontal?h.formatters.yLabelFormatters[0](w,b):null!=(a=null==(i=(s=h.formatters).xLabelFormatter)?void 0:i.call(s,w,b))?a:w,void 0!==h.config.tooltip.x.formatter&&(f=null!=(n=null==(r=(o=h.formatters).ttKeyFormatter)?void 0:r.call(o,w,b))?n:w),h.seriesData.seriesZ.length>0&&h.seriesData.seriesZ[t].length>0&&(g=x?.(h.seriesData.seriesZ[t][e],h)),p="function"==typeof h.config.xaxis.tooltip.formatter?null==(l=(c=h.formatters).xaxisTooltipFormatter)?void 0:l.call(c,w,b):f,{val:Array.isArray(u)?u.join(" "):u,xVal:Array.isArray(f)?f.join(" "):f,xAxisTTVal:Array.isArray(p)?p.join(" "):p,zVal:g}}handleCustomTooltip({i:t,j:e,y1:s,y2:i,w:a}){const o=this.ttCtx.getElTooltip();let r=a.config.tooltip.custom;Array.isArray(r)&&r[t]&&(r=r[t]);const n=r({series:a.seriesData.series,seriesIndex:t,dataPointIndex:e,y1:s,y2:i,w:a});o&&("string"==typeof n||"number"==typeof n?o.innerHTML=String(n):(n instanceof Element||"string"==typeof n.nodeName)&&(o.innerHTML="",o.appendChild(n.cloneNode(!0))))}}class ne{constructor(t){this.ttCtx=t,this.w=t.w}moveXCrosshairs(t,e=null){const s=this.ttCtx,i=this.w,a=s.getElXCrosshairs();let o=t-s.xcrosshairsWidth/2;const r=i.labelData.labels.slice().length;if(null!==e&&(o=i.layout.gridWidth/r*e),null!==a&&!i.globals.isBarHorizontal&&(a.setAttribute("x",String(o)),a.setAttribute("x1",String(o)),a.setAttribute("x2",String(o)),a.setAttribute("y2",String(i.layout.gridHeight)),a.classList.add("apexcharts-active")),o<0&&(o=0),o>i.layout.gridWidth&&(o=i.layout.gridWidth),s.isXAxisTooltipEnabled){let n=o;("tickWidth"===i.config.xaxis.crosshairs.width||"barWidth"===i.config.xaxis.crosshairs.width)&&(n=o+s.xcrosshairsWidth/2),this.moveXAxisTooltip(n)}}moveYCrosshairs(t){const e=this.ttCtx;null!==e.ycrosshairs&&E.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&E.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}moveXAxisTooltip(t){var e,s;const i=this.w,a=this.ttCtx;if(null!==a.xaxisTooltip&&0!==a.xcrosshairsWidth){a.xaxisTooltip.classList.add("apexcharts-active");const o=a.xaxisOffY+i.config.xaxis.tooltip.offsetY+i.layout.translateY+1+i.config.xaxis.offsetY;if(t-=a.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(t)){t+=i.layout.translateX;const l=new E(this.w).getTextRects(null!=(s=null==(e=a.xaxisTooltipText)?void 0:e.innerHTML)?s:"",i.config.xaxis.labels.style.fontSize);a.xaxisTooltipText&&(a.xaxisTooltipText.style.minWidth=l.width+"px"),a.xaxisTooltip.style.left=t+"px",a.xaxisTooltip.style.top=o+"px"}}}moveYAxisTooltip(t){var e,s;const i=this.w,a=this.ttCtx;null===a.yaxisTTEls&&(a.yaxisTTEls=[...i.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip")]);const o=parseInt(null!=(s=null==(e=a.ycrosshairsHidden)?void 0:e.getAttribute("y1"))?s:"0",10);let r=i.layout.translateY+o;if(a.yaxisTTEls){const n=a.yaxisTTEls[t].getBoundingClientRect();let l=i.globals.translateYAxisX[t]-2;i.config.yaxis[t].opposite&&(l-=n.width),r-=n.height/2,-1===i.globals.ignoreYAxisIndexes.indexOf(t)&&r>0&&r<i.layout.gridHeight?(a.yaxisTTEls[t].classList.add("apexcharts-active"),a.yaxisTTEls[t].style.top=r+"px",a.yaxisTTEls[t].style.left=l+i.config.yaxis[t].tooltip.offsetX+"px"):a.yaxisTTEls[t].classList.remove("apexcharts-active")}}moveTooltip(t,e,s=null){const i=this.w,a=this.ttCtx,o=a.getElTooltip(),r=a.tooltipRect,n=null!==s?parseFloat(String(s)):1;let c=parseFloat(String(t))+n+5,l=parseFloat(String(e))+n/2;if(c>i.layout.gridWidth/2&&(c=c-r.ttWidth-n-10),c>i.layout.gridWidth-r.ttWidth-10&&(c=i.layout.gridWidth-r.ttWidth),c<-20&&(c=-20),i.config.tooltip.followCursor){const h=a.getElGrid();if(!h)return;const d=h.getBoundingClientRect();c=a.e.clientX-d.left,c>i.layout.gridWidth/2&&(c-=a.tooltipRect.ttWidth),l=a.e.clientY+i.layout.translateY-d.top,l>i.layout.gridHeight/2&&(l-=a.tooltipRect.ttHeight)}else i.globals.isBarHorizontal||r.ttHeight/2+l>i.layout.gridHeight&&(l=i.layout.gridHeight-r.ttHeight+i.layout.translateY);isNaN(c)||(c+=i.layout.translateX,o&&(o.style.left=c+"px",o.style.top=l+"px"))}moveMarkers(t,e){var s;const i=this.w,a=this.ttCtx;if(i.globals.markers.size[t]>0){const o=i.dom.baseEl.querySelectorAll(` .apexcharts-series[data\\:realIndex='${t}'] .apexcharts-marker`);for(let r=0;r<o.length;r++)parseInt(null!=(s=o[r].getAttribute("rel"))?s:"0",10)===e&&(a.marker.resetPointsSize(),a.marker.enlargeCurrentPoint(e,o[r]))}else a.marker.resetPointsSize(),this.moveDynamicPointOnHover(e,t)}moveDynamicPointOnHover(t,e){var s,i,a,o,r;const n=this.w,c=this.ttCtx;let l=0,h=0;const d=new E(this.w),f=n.globals.pointsArray,p=c.tooltipUtil.getHoverMarkerSize(e),g=n.config.series[e].type;if(g&&("column"===g||"candlestick"===g||"boxPlot"===g))return;l=null==(i=null==(s=f[e])?void 0:s[t])?void 0:i[0],h=(null==(o=null==(a=f[e])?void 0:a[t])?void 0:o[1])||0;const u=n.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${e}'] .apexcharts-series-markers path`);if(u&&h<n.layout.gridHeight&&h>0){const b=null!=(r=u.getAttribute("shape"))?r:"circle",x=d.getMarkerPath(l,h,b,1.5*p);u.setAttribute("d",x)}this.moveXCrosshairs(l),c.fixedTooltip||this.moveTooltip(l,h,p)}moveDynamicPointsOnHover(t){var e,s;const i=this.ttCtx,a=i.w;let o=0,r=0,n=0;const c=a.globals.pointsArray,l=new Z(this.w),h=new E(this.w);n=l.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);const d=i.tooltipUtil.getHoverMarkerSize(n);if(null!=(e=c[n])&&e[t]&&(o=c[n][t][0],r=c[n][t][1]),isNaN(o))return;const f=i.tooltipUtil.getAllMarkers();if(f.length)for(let p=0;p<a.seriesData.series.length;p++){const g=c[p];if(a.globals.comboCharts&&typeof g>"u"&&f.splice(p,0,null),g&&g.length){let b,u=c[p][t][1];f[p].setAttribute("cx",o);const x=null!=(s=f[p].getAttribute("shape"))?s:"circle";if("rangeArea"!==a.config.chart.type||a.globals.comboCharts||(b=c[p][t+a.seriesData.series[p].length][1],u-=Math.abs(u-b)/2),null!==u&&!isNaN(u)&&u<a.layout.gridHeight+d&&u+d>0){const w=h.getMarkerPath(o,u,x,d);f[p].setAttribute("d",w)}else f[p].setAttribute("d","")}}this.moveXCrosshairs(o),i.fixedTooltip||this.moveTooltip(o,r||a.layout.gridHeight,d)}moveStickyTooltipOverBars(t,e){var s,i,a;const o=this.w,r=this.ttCtx;let n=o.globals.columnSeries?o.globals.columnSeries.length:o.seriesData.series.length;o.config.chart.stacked&&(n=o.globals.barGroups.length);let c=n>=2&&n%2==0?Math.floor(n/2):Math.floor(n/2)+1;o.globals.isBarHorizontal&&(c=new Z(this.w).getActiveConfigSeriesIndex("desc")+1);let l=o.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[rel='${c}'] path[j='${t}'], .apexcharts-candlestick-series .apexcharts-series[rel='${c}'] path[j='${t}'], .apexcharts-boxPlot-series .apexcharts-series[rel='${c}'] path[j='${t}'], .apexcharts-rangebar-series .apexcharts-series[rel='${c}'] path[j='${t}']`);!l&&"number"==typeof e&&(l=o.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}'],\n .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}'],\n .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}'],\n .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}']`));let h=l?parseFloat(null!=(s=l.getAttribute("cx"))?s:"0"):0,d=l?parseFloat(null!=(i=l.getAttribute("cy"))?i:"0"):0;const f=l?parseFloat(null!=(a=l.getAttribute("barWidth"))?a:"0"):0,p=r.getElGrid();if(!p)return;const g=p.getBoundingClientRect(),u=l&&(l.classList.contains("apexcharts-candlestick-area")||l.classList.contains("apexcharts-boxPlot-area"));o.axisFlags.isXNumeric?(l&&!u&&(h-=n%2!=0?f/2:0),l&&u&&(h-=f/2)):o.globals.isBarHorizontal||(h=r.xAxisTicksPositions[t
1-1]+r.dataPointsDividedWidth/2,isNaN(h)&&(h=r.xAxisTicksPositions[t]-r.dataPointsDividedWidth/2)),o.globals.isBarHorizontal?d-=r.tooltipRect.ttHeight:o.config.tooltip.followCursor?d=r.e.clientY-g.top-r.tooltipRect.ttHeight/2:d+r.tooltipRect.ttHeight+15>o.layout.gridHeight&&(d=o.layout.gridHeight),o.globals.isBarHorizontal||this.moveXCrosshairs(h),r.fixedTooltip||this.moveTooltip(h,d||o.layout.gridHeight)}}class Qe{constructor(t){this.w=t.w,this.ttCtx=t,this.ctx=t.ctx,this.tooltipPosition=new ne(t)}drawDynamicPoints(){const t=this.w,e=new E(this.w),s=new pt(this.w,this.ctx),i=[...t.dom.baseEl.querySelectorAll(".apexcharts-series")];t.config.chart.stacked&&i.sort((a,o)=>parseFloat(a.getAttribute("data:realIndex"))-parseFloat(o.getAttribute("data:realIndex")));for(let a=0;a<i.length;a++){const o=i[a].querySelector(".apexcharts-series-markers-wrap");if(null!==o){let r=`apexcharts-marker w${(Math.random()+1).toString(36).substring(4)}`;("line"===t.config.chart.type||"area"===t.config.chart.type)&&!t.globals.comboCharts&&!t.config.tooltip.intersect&&(r+=" no-pointer-events");const n=s.getMarkerConfig({cssClass:r,seriesIndex:Number(o.getAttribute("data:realIndex"))}),c=e.drawMarker(0,0,n);c.node.setAttribute("default-marker-size",0);const l=B.createElementNS(V,"g");l.classList.add("apexcharts-series-markers"),l.appendChild(c.node),o.appendChild(l)}}}enlargeCurrentPoint(t,e,s=null,i=null){const a=this.w;"bubble"!==a.config.chart.type&&this.newPointSize(t,e);let o=e.getAttribute("cx"),r=e.getAttribute("cy");if(null!==s&&null!==i&&(o=s,r=i),this.tooltipPosition.moveXCrosshairs(o),!this.fixedTooltip){if("radar"===a.config.chart.type){const n=this.ttCtx.getElGrid();if(!n)return;const c=n.getBoundingClientRect();o=this.ttCtx.e.clientX-c.left}this.tooltipPosition.moveTooltip(o,r,a.config.markers.hover.size)}}enlargePoints(t){var e,s;const i=this.w,a=this,o=this.ttCtx,r=t,n=i.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker");let c=i.config.markers.hover.size;for(let l=0;l<n.length;l++){const h=n[l].getAttribute("rel"),d=n[l].getAttribute("index");if(void 0===c&&(c=i.globals.markers.size[d]+i.config.markers.hover.sizeOffset),r===parseInt(h??"0",10)){a.newPointSize(r,n[l]);const f=null!=(e=n[l].getAttribute("cx"))?e:"0",p=null!=(s=n[l].getAttribute("cy"))?s:"0";a.tooltipPosition.moveXCrosshairs(parseFloat(f)),o.fixedTooltip||a.tooltipPosition.moveTooltip(parseFloat(f),parseFloat(p),c)}else a.oldPointSize(n[l])}}newPointSize(t,e){const s=this.w;let i=s.config.markers.hover.size;const a=0===t?e.parentNode.firstChild:e.parentNode.lastChild;if("0"!==a.getAttribute("default-marker-size")){const o=parseInt(a.getAttribute("index"),10);void 0===i&&(i=s.globals.markers.size[o]+s.config.markers.hover.sizeOffset),i<0&&(i=0);const r=this.ttCtx.tooltipUtil.getPathFromPoint(e,i);e.setAttribute("d",r)}}oldPointSize(t){const e=parseFloat(t.getAttribute("default-marker-size")),s=this.ttCtx.tooltipUtil.getPathFromPoint(t,e);t.setAttribute("d",s)}resetPointsSize(){var t;const s=this.w.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker");for(let i=0;i<s.length;i++){const a=parseFloat(null!=(t=s[i].getAttribute("default-marker-size"))?t:"0");if(D.isNumber(a)&&a>0){const o=this.ttCtx.tooltipUtil.getPathFromPoint(s[i],a);s[i].setAttribute("d",o)}else s[i].setAttribute("d","M0,0")}}}class ts{constructor(t){this.w=t.w;const e=this.w;this.ttCtx=t,this.isVerticalGroupedRangeBar=!e.globals.isBarHorizontal&&"rangeBar"===e.config.chart.type&&e.config.plotOptions.bar.rangeBarGroupRows}getAttr(t,e){var s;return parseFloat(null!=(s=t.target.getAttribute(e))?s:"")}handleHeatTreeTooltip({e:t,opt:e,x:s,y:i,type:a}){var o,r;const n=this.ttCtx,c=this.w;if(t.target.classList.contains(`apexcharts-${a}-rect`)){const l=this.getAttr(t,"i"),h=this.getAttr(t,"j"),d=this.getAttr(t,"cx"),f=this.getAttr(t,"cy"),p=this.getAttr(t,"width"),g=this.getAttr(t,"height");if(n.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:l,j:h,shared:!1,e:t}),c.interact.capturedSeriesIndex=l,c.interact.capturedDataPointIndex=h,s=d+n.tooltipRect.ttWidth/2+p,i=f+n.tooltipRect.ttHeight/2-g/2,n.tooltipPosition.moveXCrosshairs(d+p/2),s>c.layout.gridWidth/2&&(s=d-n.tooltipRect.ttWidth/2+p),n.w.config.tooltip.followCursor){const u=c.dom.elWrap.getBoundingClientRect();s=(null!=(o=c.interact.clientX)?o:0)-u.left-(s>c.layout.gridWidth/2?n.tooltipRect.ttWidth:0),i=(null!=(r=c.interact.clientY)?r:0)-u.top-(i>c.layout.gridHeight/2?n.tooltipRect.ttHeight:0)}}return{x:s,y:i}}handleMarkerTooltip({e:t,opt:e,x:s,y:i}){const a=this.w,o=this.ttCtx;let r,n;if(t.target.classList.contains("apexcharts-marker")){const c=parseInt(e.paths.getAttribute("cx"),10),l=parseInt(e.paths.getAttribute("cy"),10),h=
1parseFloat(e.paths.getAttribute("val"));if(n=parseInt(e.paths.getAttribute("rel"),10),r=parseInt(e.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,o.intersect){const d=D.findAncestor(e.paths,"apexcharts-series");d&&(r=parseInt(d.getAttribute("data:realIndex"),10))}if(o.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:r,j:n,shared:!o.showOnIntersect&&a.config.tooltip.shared,e:t}),"mouseup"===t.type&&o.markerClick(t,r,n),a.interact.capturedSeriesIndex=r,a.interact.capturedDataPointIndex=n,s=c,i=l+a.layout.translateY-1.4*o.tooltipRect.ttHeight,o.w.config.tooltip.followCursor){const d=o.getElGrid();if(!d)return{x:s,y:i};const f=d.getBoundingClientRect();i=o.e.clientY+a.layout.translateY-f.top}h<0&&(i=l),o.marker.enlargeCurrentPoint(n,e.paths,s,i)}return{x:s,y:i}}handleBarTooltip({e:t,opt:e}){const s=this.w,i=this.ttCtx,a=i.getElTooltip();let l,o=0,r=0,n=0,c=0;const h=this.getBarTooltipXY({e:t,opt:e});if(null===h.j&&0===h.barHeight&&0===h.barWidth)return;c=h.i;const d=h.j;s.interact.capturedSeriesIndex=c,s.interact.capturedDataPointIndex=null!==d?d:s.interact.capturedDataPointIndex,s.globals.isBarHorizontal&&i.tooltipUtil.hasBars()||!s.config.tooltip.shared?(r=h.x,n=h.y,l=Array.isArray(s.config.stroke.width)?s.config.stroke.width[c]:s.config.stroke.width,o=r):!s.globals.comboCharts&&!s.config.tooltip.shared&&(o/=2),isNaN(n)&&(n=s.globals.svgHeight-i.tooltipRect.ttHeight),r+i.tooltipRect.ttWidth>s.layout.gridWidth?r-=i.tooltipRect.ttWidth:r<0&&(r=0),(!i.w.config.tooltip.followCursor||i.getElGrid())&&(null===i.tooltip&&(i.tooltip=s.dom.baseEl.querySelector(".apexcharts-tooltip")),s.config.tooltip.shared||i.tooltipPosition.moveXCrosshairs(s.globals.comboBarCount>0?o+l/2:o),!i.fixedTooltip&&(!s.config.tooltip.shared||s.globals.isBarHorizontal&&i.tooltipUtil.hasBars())&&(n=n+s.layout.translateY-i.tooltipRect.ttHeight/2,a&&(a.style.left=r+s.layout.translateX+"px",a.style.top=n+"px")))}getBarTooltipXY({e:t,opt:e}){const s=this.w;let i=null;const a=this.ttCtx;let o=0,r=0,n=0,c=0,l=0;const h=t.target.classList;if(h.contains("apexcharts-bar-area")||h.contains("apexcharts-candlestick-area")||h.contains("apexcharts-boxPlot-area")||h.contains("apexcharts-rangebar-area")){const d=t.target,f=d.getBoundingClientRect(),p=e.elGrid.getBoundingClientRect(),g=f.height;l=f.height;const u=f.width,b=parseInt(d.getAttribute("cx"),10),x=parseInt(d.getAttribute("cy"),10);c=parseFloat(d.getAttribute("barWidth"));const w="touchmove"===t.type?t.touches[0].clientX:t.clientX;i=parseInt(d.getAttribute("j"),10),o=parseInt(d.parentNode.getAttribute("rel"),10)-1;const m=d.getAttribute("data-range-y1"),y=d.getAttribute("data-range-y2");s.globals.comboCharts&&(o=parseInt(d.parentNode.getAttribute("data:realIndex"),10));const v=L=>s.axisFlags.isXNumeric?b-u/2:this.isVerticalGroupedRangeBar?b+u/2:b-a.dataPointsDividedWidth+u/2,C=()=>x-a.dataPointsDividedHeight+g/2-a.tooltipRect.ttHeight/2;a.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:o,j:i,y1:m?parseInt(m,10):null,y2:y?parseInt(y,10):null,shared:!a.showOnIntersect&&s.config.tooltip.shared,e:t}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(r=w-p.left+15,n=C()):(r=v(r),n=t.clientY-p.top-a.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?(r=b,a.xyRatios&&r<a.xyRatios.baseLineInvertedY&&(r=b-a.tooltipRect.ttWidth),n=C()):(r=v(r),n=x)}return{x:r,y:n,barHeight:l,barWidth:c,i:o,j:i}}}class es{constructor(t){this.w=t.w,this.ttCtx=t}drawXaxisTooltip(){const t=this.w,e=this.ttCtx,s="bottom"===t.config.xaxis.position;e.xaxisOffY=s?t.layout.gridHeight+1:-t.layout.xAxisHeight-t.config.xaxis.axisTicks.height+3;const i=s?"apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom":"apexcharts-xaxistooltip apexcharts-xaxistooltip-top",a=t.dom.elWrap;e.isXAxisTooltipEnabled&&null===t.dom.baseEl.querySelector(".apexcharts-xaxistooltip")&&(e.xaxisTooltip=B.createElementNS("http://www.w3.org/1999/xhtml","div"),e.xaxisTooltip.setAttribute("class",i+" apexcharts-theme-"+t.config.tooltip.theme),a.appendChild(e.xaxisTooltip),e.xaxisTooltipText=B.createElementNS("http://www.w3.org/1999/xhtml","div"),e.xaxisTooltipText.classList.add("apexcharts-xaxistooltip-text"),e.xaxisTooltipText.style.fontFamily=t.config.xaxis.tooltip.style.fontFamily||t.config.chart.fontFamily,e.xaxisTooltipText.style.fontSize=t.config.xaxis.tooltip.style.fontSize,e.xaxisTooltip.appendChild(e.xaxisTooltipText))}drawYaxisTooltip(){const t=this.w,e=this.ttCtx;for(let s=0;s<t.config.yaxis.length;s++){const i=t.config.yaxis[s].opposite||t.config.yaxis[s].crosshairs.opposite;e.yaxisOffX=i?t.layout.gridWidth+1:1;const a=i?`apexcharts-yaxistooltip apexcharts-yaxistooltip-${s} apexcharts-yaxistooltip-right`:`apexcharts-yaxistooltip apexcharts-yaxistooltip-${s} apexcharts-yaxistooltip-left`,o=t.dom.elWrap;null===t.dom.baseEl.querySelector(`.apexcharts-yaxistooltip apexcharts-yaxistooltip-${s}`)&&(e.yaxisTooltip=B.createElementNS("http://www.w3.org/1999/xhtml","div"),e.yaxisTooltip.setAttribute("class",a+" apexcharts-theme-"+t.config.tooltip.theme),o.appendChild(e.yaxisTooltip),0===s&&(e.yaxisTooltipText=[]),e.yaxisTooltipText[s]=B.createElementNS("http://www.w3.org/1999/xhtml","div"),e.yaxisTooltipText[s].classList.add("apexcharts-yaxistooltip-text"),e.yaxisTooltip.appendChild(e.yaxisTooltipText[s]))}}setXCrosshairWidth(){var t,e;const s=this.w,i=this.ttCtx,a=i.getElXCrosshairs();if(i.xcrosshairsWidth=parseInt(s.config.xaxis.crosshairs.width,10),s.globals.comboCharts){const o=s.dom.baseEl.querySelector(".apexcharts-bar-area");if(null!==o&&"barWidth"===s.config.xaxis.crosshairs.width){const r=parseFloat(null!=(e=o.getAttribute("barWidth"))?e:"0");i.xcrosshairsWidth=r}else"tickWidth"===s.config.xaxis.crosshairs.width&&(i.xcrosshairsWidth=s.layout.gridWidth/s.labelData.labels.length)}else if("tickWidth"===s.config.xaxis.crosshairs.width)i.xcrosshairsWidth=s.layout.gridWidth/s.labelData.labels.length;else if("barWidth"===s.config.xaxis.crosshairs.width){const o=s.dom.baseEl.querySelector(".apexcharts-bar-area");if(null!==o){const r=parseFloat(null!=(t=o.getAttribute("barWidth"))?t:"0");i.xcrosshairsWidth=r}else i.xcrosshairsWidth=1}s.globals.isBarHorizontal&&(i.xcrosshairsWidth=0),null!==a&&i.xcrosshairsWidth>0&&a.setAttribute("width",String(i.xcrosshairsWidth))}handleYCrosshair(){const t=this.w,e=this.ttCtx;e.ycrosshairs=t.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}drawYaxisTooltipText(t,e,s){const i=this.ttCtx,a=this.w,o=a.globals,r=o.seriesYAxisMap[t];if(i.yaxisTooltips[t]&&r.length>0){const n=a.formatters.yLabelFormatters[t],c=i.getElGrid();if(!c)return;const l=c.getBoundingClientRect(),h=r[0];let d=0;s.yRatio.length>1&&(d=h);const f=(e-l.top)*s.yRatio[d],p=o.maxYArr[h]-o.minYArr[h];let g=o.minYArr[h]+(p-f);a.config.yaxis[t].reversed&&(g=o.maxYArr[h]-(p-f)),i.tooltipPosition.moveYCrosshairs(e-l.top),i.yaxisTooltipText[t].innerHTML=n(g),i.tooltipPosition.moveYAxisTooltip(t)}}}class ss{constructor(t,e){this.w=t,this.ctx=e,this.tConfig=t.config.tooltip,this.tooltipUtil=new re(this),this.tooltipLabels=new Je(this),this.tooltipPosition=new ne(this),this.marker=new Qe(this),this.intersect=ne
1w ts(this),this.axesTooltip=new es(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.xaxisTooltipText=null,this.yaxisTooltip=null,this.yaxisTooltipText=null,this.yaxisTTEls=null,this.xaxisOffY=0,this.yaxisOffX=0,this.xcrosshairsWidth=0,this.ycrosshairs=null,this.ycrosshairsHidden=null,this.tooltip=null,this.e=null,this.isBarShared=!t.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now(),this.dimensionUpdateScheduled=!1,this.xyRatios=null,this.isXAxisTooltipEnabled=!1,this.yaxisTooltips=[],this.allTooltipSeriesGroups=[],this.xAxisTicksPositions=null,this.dataPointsDividedHeight=0,this.dataPointsDividedWidth=0,this.tooltipTitle=null,this.legendLabels=null,this.ttItems=null,this.seriesBound=null,this.seriesHoverTimeout=void 0,this.clientX=0,this.clientY=0,this.barSeriesHeight=0,this.tooltipRect={x:0,y:0,ttWidth:0,ttHeight:0}}setupDimensionCache(){const t=this.w,e=this.getElTooltip();e&&(this.updateDimensionCache(),typeof ResizeObserver<"u"&&!t.globals.resizeObserver&&(t.globals.resizeObserver=new ResizeObserver(()=>{this.dimensionUpdateScheduled||(this.dimensionUpdateScheduled=!0,requestAnimationFrame(()=>{this.updateDimensionCache(),this.dimensionUpdateScheduled=!1}))}),t.globals.resizeObserver.observe(e)))}updateDimensionCache(){const t=this.w,e=this.getElTooltip();if(!e)return;const s=e.getBoundingClientRect();t.globals.dimensionCache.tooltip={width:s.width,height:s.height,lastUpdate:Date.now()}}getCachedDimensions(){const t=this.w;if(t.globals.dimensionCache.tooltip){const s=t.globals.dimensionCache.tooltip;if(Date.now()-s.lastUpdate<1e3)return{ttWidth:s.width,ttHeight:s.height}}this.updateDimensionCache();const e=t.globals.dimensionCache.tooltip;return e?{ttWidth:e.width,ttHeight:e.height}:{ttWidth:0,ttHeight:0}}getElTooltip(t){return t||(t=this),t.w.dom.baseEl?t.w.dom.baseEl.querySelector(".apexcharts-tooltip"):null}getElXCrosshairs(){return this.w.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}getElGrid(){return this.w.dom.baseEl.querySelector(".apexcharts-grid")}drawTooltip(t){const e=this.w;this.xyRatios=t,this.isXAxisTooltipEnabled=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.yaxisTooltips=e.config.yaxis.map(o=>!!(o.show&&o.tooltip.enabled&&e.globals.axisCharts)),this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);const s=this.getElTooltip();s?.parentNode&&s.parentNode.removeChild(s),this.tooltipTitle=null;const i=B.createElementNS("http://www.w3.org/1999/xhtml","div");if(i.classList.add("apexcharts-tooltip"),e.config.tooltip.cssClass&&i.classList.add(e.config.tooltip.cssClass),i.classList.add(`apexcharts-theme-${this.tConfig.theme||"light"}`),e.config.chart.accessibility.enabled&&e.config.chart.accessibility.announcements.enabled&&(i.setAttribute("role","tooltip"),i.setAttribute("aria-live","polite"),i.setAttribute("aria-atomic","true"),i.setAttribute("aria-hidden","true")),e.dom.elWrap.appendChild(i),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();const o=new wt(this.w,this.ctx,void 0);this.xAxisTicksPositions=o.getXAxisTicksPositions()}if((e.globals.comboCharts||this.tConfig.intersect||"rangeBar"===e.config.chart.type)&&!this.tConfig.shared&&(this.showOnIntersect=!0),(0===e.config.markers.size||0===e.globals.markers.largestSize)&&this.marker.drawDynamicPoints(),e.globals.collapsedSeries.length===e.seriesData.series.length)return;this.dataPointsDividedHeight=e.layout.gridHeight/e.globals.dataPoints,this.dataPointsDividedWidth=e.layout.gridWidth/e.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=B.createElementNS("http://www.w3.org/1999/xhtml","div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));let a=e.seriesData.series.length;
1(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(a=this.showOnIntersect?1:e.seriesData.series.length),this.legendLabels=e.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(a),this.addSVGEvents(),this.setupDimensionCache()}createTTElements(t){const e=this.w,s=[],i=this.getElTooltip();if(!i)return s;for(let a=0;a<t;a++){const o=B.createElementNS("http://www.w3.org/1999/xhtml","div");o.classList.add("apexcharts-tooltip-series-group",`apexcharts-tooltip-series-group-${a}`),o.style.order=String(e.config.tooltip.inverseOrder?t-a:a+1);const r=B.createElementNS("http://www.w3.org/1999/xhtml","span");r.classList.add("apexcharts-tooltip-marker"),e.config.tooltip.fillSeriesColor?r.style.backgroundColor=e.globals.colors[a]:r.style.color=e.globals.colors[a];const n=e.config.markers.shape;let c=n;Array.isArray(n)&&(c=n[a]),r.setAttribute("shape",c),o.appendChild(r);const l=B.createElementNS("http://www.w3.org/1999/xhtml","div");l.classList.add("apexcharts-tooltip-text"),l.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,l.style.fontSize=this.tConfig.style.fontSize,["y","goals","z"].forEach(h=>{const d=B.createElementNS("http://www.w3.org/1999/xhtml","div");d.classList.add(`apexcharts-tooltip-${h}-group`);const f=B.createElementNS("http://www.w3.org/1999/xhtml","span");f.classList.add(`apexcharts-tooltip-text-${h}-label`),d.appendChild(f);const p=B.createElementNS("http://www.w3.org/1999/xhtml","span");p.classList.add(`apexcharts-tooltip-text-${h}-value`),d.appendChild(p),l.appendChild(d)}),o.appendChild(l),i.appendChild(o),s.push(o)}return s}addSVGEvents(){const t=this.w,e=t.config.chart.type,s=this.getElTooltip();if(!s)return;const i="bar"===e||"candlestick"===e||"boxPlot"===e||"rangeBar"===e,a="area"===e||"line"===e||"scatter"===e||"bubble"===e||"radar"===e,o=t.dom.Paper.node,r=this.getElGrid();r&&(this.seriesBound=r.getBoundingClientRect());const n=[],c=[],l={hoverArea:o,elGrid:r,tooltipEl:s,tooltipY:n,tooltipX:c,ttItems:this.ttItems};let h;if(t.globals.axisCharts&&(a?h=t.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):i?h=t.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-rangebar-area"):("heatmap"===e||"treemap"===e)&&(h=t.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap")),h&&h.length))for(let f=0;f<h.length;f++)n.push(h[f].getAttribute("cy")),c.push(h[f].getAttribute("cx"));if(t.globals.xyCharts&&!this.showOnIntersect||t.globals.comboCharts&&!this.showOnIntersect||i&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([o],l);else if(i&&!t.globals.comboCharts||a&&this.showOnIntersect)this.addDatapointEventsListeners(l);else if(!t.globals.axisCharts||"heatmap"===e||"treemap"===e){const f=t.dom.baseEl.querySelectorAll(".apexcharts-series");this.addPathsEventListeners(f,l)}if(this.showOnIntersect){const f=t.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker");f.length>0&&this.addPathsEventListeners(f,l),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(l)}}drawFixedTooltipRect(){const t=this.w,e=this.getElTooltip();if(!e)return{x:0,y:0,ttWidth:0,ttHeight:0};const s=e.getBoundingClientRect(),i=s.width+10,a=s.height+10;let o=this.tConfig.fixed.offsetX,r=this.tConfig.fixed.offsetY;const n=this.tConfig.fixed.position.toLowerCase();return n.indexOf("right")>-1&&(o=o+t.globals.svgWidth-i+10),n.indexOf("bottom")>-1&&(r=r+t.globals.svgHeight-a-10),e.style.left=o+"px",e.style.top=r+"px",{x:o,y:r,ttWidth:i,ttHeight:a}}addDatapointEventsListeners(t){const s=this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(s,t)}addPathsEventListeners(t,e){const s=this;for(let i=0;i<t.length;i++){const a={paths:t[i],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map(r=>t[i].addEventListener(r,s.onSeriesHover.bind(s,a),{capture:!1,passive:!0}))}}onSeriesHover(t,e){const i=Date.now()-this.lastHoverTime;i>=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(()=>{this.seriesHover(t,e)},20-i))}seriesHover(t,e){this.lastHoverTime=Date.now();let s=[];const i=this.w;i.config.chart.group&&(s=this.ctx.getGroupedCharts()),(!i.globals.axisCharts||(i.globals.minX!==-1/0||i.globals.maxX!==1/0)&&0!==i.globals.dataPoints)&&(s.length?s.forEac
1h(a=>{const o=this.getElTooltip(a);a.w.globals.minX===this.w.globals.minX&&a.w.globals.maxX===this.w.globals.maxX&&a.w.globals.tooltip.seriesHoverByContext({chartCtx:a,ttCtx:a.w.globals.tooltip,opt:{paths:t.paths,tooltipEl:o,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:a.w.globals.tooltip.ttItems},e})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e}))}seriesHoverByContext({chartCtx:t,ttCtx:e,opt:s,e:i}){const a=t.w;if(!this.getElTooltip(t))return;const r=e.getCachedDimensions();e.tooltipRect={x:0,y:0,ttWidth:r.ttWidth,ttHeight:r.ttHeight},e.e=i,e.tooltipUtil.hasBars()&&!a.globals.comboCharts&&!e.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new Z(t.w).toggleSeriesOnHover(i,i.target.parentNode),a.globals.axisCharts?e.axisChartsTooltips({e:i,opt:s,tooltipRect:e.tooltipRect}):e.nonAxisChartsTooltips({e:i,opt:s,tooltipRect:e.tooltipRect}),e.fixedTooltip&&e.drawFixedTooltipRect()}axisChartsTooltips({e:t,opt:e}){var s;const i=this.w;let a,o;const r=e.elGrid.getBoundingClientRect(),n="touchmove"===t.type?t.touches[0].clientX:t.clientX,c="touchmove"===t.type?t.touches[0].clientY:t.clientY;if(this.clientY=c,this.clientX=n,i.interact.capturedSeriesIndex=-1,i.interact.capturedDataPointIndex=-1,c<r.top||c>r.top+r.height)return void this.handleMouseOut(e);if(Array.isArray(this.tConfig.enabledOnSeries)&&!i.config.tooltip.shared){const p=parseInt(e.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(p)<0)return void this.handleMouseOut(e)}const l=this.getElTooltip();if(!l)return;const h=this.getElXCrosshairs();let d=[];i.config.chart.group&&(d=this.ctx.getSyncedCharts());const f=i.globals.xyCharts||"bar"===i.config.chart.type&&!i.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||i.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===t.type||"touchmove"===t.type||"mouseup"===t.type){if(i.globals.collapsedSeries.length+i.globals.ancillaryCollapsedSeries.length===i.seriesData.series.length)return;null!==h&&h.classList.add("apexcharts-active");const p=null==(s=this.yaxisTooltips)?void 0:s.filter(u=>!0===u),g=this.ycrosshairs;if(null!==g&&p?.length&&g.classList.add("apexcharts-active"),f&&!this.showOnIntersect||d.length>1)this.handleStickyTooltip(t,n,c,e);else if("heatmap"===i.config.chart.type||"treemap"===i.config.chart.type){const u=this.intersect.handleHeatTreeTooltip({e:t,opt:e,x:a,y:o,type:i.config.chart.type});a=u.x,o=u.y,l.style.left=a+"px",l.style.top=o+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:t,opt:e}),this.tooltipUtil.hasMarkers(0)&&this.intersect.handleMarkerTooltip({e:t,opt:e,x:a,y:o});if(this.yaxisTooltips&&this.yaxisTooltips.length)for(let u=0;u<i.config.yaxis.length;u++)this.axesTooltip.drawYaxisTooltipText(u,c,this.xyRatios);i.dom.baseEl.classList.add("apexcharts-tooltip-active"),e.tooltipEl.classList.add("apexcharts-active"),i.config.chart.accessibility.enabled&&i.config.chart.accessibility.announcements.enabled&&e.tooltipEl.removeAttribute("aria-hidden")}else("mouseout"===t.type||"touchend"===t.type)&&this.handleMouseOut(e)}nonAxisChartsTooltips({e:t,opt:e,tooltipRect:s}){var i,a,o,r;const n=this.w,c=e.paths.getAttribute("rel"),l=this.getElTooltip();if(!l)return;const h=n.dom.elWrap.getBoundingClientRect();if("mousemove"===t.type||"touchmove"===t.type){let d,f;n.dom.baseEl.classList.add("apexcharts-tooltip-active"),l.classList.add("apexcharts-active"),n.config.chart.accessibility.enabled&&n.config.chart.accessibility.announcements.enabled&&l.removeAttribute("aria-hidden"),this.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:parseInt(c,10)-1,shared:!1});const p=e.paths.querySelector("path[data\\:cx]")||e.paths;if(n.config.tooltip.intersect&&p.hasAttribute("data:cx")&&p.hasAttribute("data:cy")){const g=n.dom.Paper.node.getBoundingClientRect();d=g.left-h.left+parseFloat(p.getAttribute("data:cx"))-s.ttWidth/2,f=g.top-h.top+parseFloat(p.getAttribute("data:cy"))-s.ttHeight-10}else d=(null!=(i=n.interact.clientX)?i:0)-h.left-s.ttWidth/2,f=(null!=(a=n.interact.clientY)?a:0)-h.top-s.ttHeight-10;if(l.style.left=d+"px",l.style.top=f+"px",n.config.legend.tooltipHoverFormatter){const u=c-1,b=null==(o=this.legendLabels)?void 0:o[u];if(!b)return;const w=(0,n.config.legend.tooltipHoverFormatter)(b.getAttribute("data:default-text"),{seriesIndex:u,dataPointIndex:u,w:n});b.innerHTML=w}}else("mouseout"===t.type||"touchend"===t.type)&&(l.classList.remove("apexcharts-active"),n.dom.baseEl.classList.remove("apexcharts-tooltip-active"),n.config.legend.tooltipHoverFormatter&&(null==(r=this.legendLabels)||r.forEach(d=>{const f=d.getAttribute("data:default-text");d.innerHTML=decodeURIComponent(f??"")})))}handleStickyTooltip(t,e,s,i){const a=this.w,o=this.tooltipUtil.getNearestValues({context:this,hoverArea:i.hoverArea,elGrid:i.elGrid,clientX:e,clientY:s}),r=o.j;let n=o.capturedSeries;null!==n&&a.globals.collapsedSeriesIndices.includes(n??-1)&&(n=null);const c=i.elGrid.getBoundingClientRect();if(o.hoverX<0||o.hoverX>c.width)this.handleMouseOut(i);else if(null!==n)this.handleStickyCapturedSeries(t,n??-1,i,r??0);else if(this.tooltipUtil.isXoverlap(r??0)||a.globals.isBarHorizontal){const l=a.seriesData.series.findIndex((h,d)=>!a.globals.collapsedSeriesIndices.includes(d));this.create(t,this,l,r??0,i.ttItems)}}handleStickyCapturedSeries(t,e,s,i){const a=this.w;if(this.tConfig.shared||null!==a.seriesData.series[e][i]){if(typeof a.seriesData.series[e][i]<"u")this.tConfig.shared&&this.tooltipUtil.isXoverlap(i)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,i,s.ttItems):this.create(t,this,e,i,s.ttItems,!1);else if(this.tooltipUtil.isXoverlap(i)){const o=a.seriesData.series.findIndex((r,n)=>!a.globals.collapsedSeriesIndices.includes(n));this.create(t,this,o,i,s.ttItems)}}else this.handleMouseOut(s)}deactivateHoverFilter(){const t=this.w,e=new E(this.w,this.ctx),s=t.dom.Paper.find(".apexcharts-bar-area");for(let i=0;i<s.length;i++)e.pathMouseLeave(s[i],void 0)}handleMouseOut(t){var e,s;const i=this.w,a=this.getElXCrosshairs();i.dom.baseEl.classList.remove("apexcharts-tooltip-active"),t.tooltipEl.classList.remove("apexcharts-active"),i.c
vendor: 5,385 bytes, line 1
1onfig.chart.accessibility.enabled&&i.config.chart.accessibility.announcements.enabled&&t.tooltipEl.setAttribute("aria-hidden","true"),this.deactivateHoverFilter(),"bubble"!==i.config.chart.type&&this.marker.resetPointsSize(),null!==a&&a.classList.remove("apexcharts-active");const o=this.ycrosshairs;if(null!==o&&o.classList.remove("apexcharts-active"),this.isXAxisTooltipEnabled&&(null==(e=this.xaxisTooltip)||e.classList.remove("apexcharts-active")),this.yaxisTooltips&&this.yaxisTooltips.length){null===this.yaxisTTEls&&(this.yaxisTTEls=[...i.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip")]);for(let r=0;r<this.yaxisTTEls.length;r++)this.yaxisTTEls[r].classList.remove("apexcharts-active")}i.config.legend.tooltipHoverFormatter&&(null==(s=this.legendLabels)||s.forEach(r=>{const n=r.getAttribute("data:default-text");r.innerHTML=decodeURIComponent(n??"")}))}markerClick(t,e,s){const i=this.w;"function"==typeof i.config.chart.events.markerClick&&i.config.chart.events.markerClick(t,this.ctx,{seriesIndex:e,dataPointIndex:s,w:i}),this.ctx.events.fireEvent("markerClick",[t,this.ctx,{seriesIndex:e,dataPointIndex:s,w:i}])}create(t,e,s,i,a,o=null){var r,n,c,l,h,d,f,p,g,u,b,x,w,m,y,v,C,L,k;const S=this.w,T=e;"mouseup"===t.type&&this.markerClick(t,s,i),null===o&&(o=this.tConfig.shared);const P=this.tooltipUtil.hasMarkers(s),M=this.tooltipUtil.getElBars(),F=()=>{S.globals.markers.largestSize>0?T.marker.enlargePoints(i):T.tooltipPosition.moveDynamicPointsOnHover(i)};if(S.config.legend.tooltipHoverFormatter){const R=S.config.legend.tooltipHoverFormatter,N=Array.from(null!=(r=this.legendLabels)?r:[]);N.forEach(z=>{const O=z.getAttribute("data:default-text");z.innerHTML=decodeURIComponent(O??"")});for(let z=0;z<N.length;z++){const O=N[z],G=parseInt(null!=(n=O.getAttribute("i"))?n:"",10),W=decodeURIComponent(null!=(c=O.getAttribute("data:default-text"))?c:""),U=R(W,{seriesIndex:o?G:s,dataPointIndex:i,w:S});if(o)O.innerHTML=S.globals.collapsedSeriesIndices.indexOf(G)<0?U:W;else if(O.innerHTML=G===s?U:W,s===G)break}}const X=S.rangeData,Y=I(I({ttItems:a,i:s,j:i},void 0!==(null==(f=null==(d=null==(h=null==(l=X.seriesRange)?void 0:l[s])?void 0:h[i])?void 0:d.y[0])?void 0:f.y1)&&{y1:null==(b=null==(u=null==(g=null==(p=X.seriesRange)?void 0:p[s])?void 0:g[i])?void 0:u.y[0])?void 0:b.y1}),void 0!==(null==(y=null==(m=null==(w=null==(x=X.seriesRange)?void 0:x[s])?void 0:w[i])?void 0:m.y[0])?void 0:y.y2)&&{y2:null==(k=null==(L=null==(C=null==(v=X.seriesRange)?void 0:v[s])?void 0:C[i])?void 0:L.y[0])?void 0:k.y2});if(o){if(T.tooltipLabels.drawSeriesTexts(H(I({},Y),{shared:!this.showOnIntersect&&this.tConfig.shared})),P)F();else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight([...M]),this.barSeriesHeight>0)){const R=new E(this.w,this.ctx),N=S.dom.Paper.find(`.apexcharts-bar-area[j='${i}']`);this.deactivateHoverFilter(),T.tooltipUtil.getAllMarkers(!0).length&&!this.barSeriesHeight&&F(),T.tooltipPosition.moveStickyTooltipOverBars(i,s);for(let O=0;O<N.length;O++)R.pathMouseEnter(N[O],void 0)}}else T.tooltipLabels.drawSeriesTexts(I({shared:!1},Y)),this.tooltipUtil.hasBars()&&T.tooltipPosition.moveStickyTooltipOverBars(i,s),P&&T.tooltipPosition.moveMarkers(s,i)}}class j{constructor(t){this.node=t,t&&(t.instance=this),this._listeners=[],this._filter=null}attr(t,e){if("string"==typeof t&&void 0===e)return this.node.getAttribute(t);const s="string"==typeof t?{[t]:e}:t;for(const i in s){let a=s[i];null===a?this.node.removeAttribute(i):void 0!==a&&("number"==typeof a&&isNaN(a)&&(a=0),this.node.setAttribute(i,a))}if("text"===this.node.nodeName&&null!=s.x){const i=this.node.querySelectorAll("tspan[data-newline]");for(let a=0;a<i.length;a++)i[a].setAttribute("x",s.x)}return this}css(t){for(const e in t)this.node.style[e]=t[e];return this}fill(t){return"object"==typeof t?this.attr(t):this.attr("fill",t)}stroke(t){return"object"==typeof t?(void 0!==t.color&&this.attr("stroke",t.color),void 0!==t.width&&this.attr("stroke-width",t.width),void 0!==t.dasharray&&this.attr("stroke-dasharray",t.dasharray),void 0!==t.linecap&&this.attr("stroke-linecap",t.linecap),void 0!==t.opacity&&this.attr("stroke-opacity",t.opacity),this):this.attr("stroke",t)}size(t,e){return this.attr({width:t,height:e})}move(t,e){return this.attr({x:t,y:e})}center(t,e){if("g"===this.node.nodeName){const s=this.bbox();return this.attr("transform",`translate(${t-(s.x+s.width/2)}, ${e-(s.y+s.height/2)})`)}return this.attr({cx:t,cy:e})}add(t){return this.node.appendChild(t.node||t),this}addTo(t){return(t.node||t).appendChild(this.node),this}remove(){return this.node.parentNode&&this.node.parentNode.removeChild(this.node),this}clear(){for(;this.node.firstChild;)this.node.removeChild(this.node.firstChild);return this}find(t){return Array.from(this.node.querySelectorAll(t)).map(e=>e.instance||new j(e))}findOne(t){const e=this.node.querySelector(t);return e?e.instance||new j(e):null}on(t,e){const s=t.split(".")[0];return this._listeners.push({event:t,eventType:s,handler:e}),this.node.addEventListener(s,e),this}off(t,e){if(t||e)if(t&&!e){const s=t.split(".")[0];this._listeners=this._listeners.filter(i=>i.eventType!==s||(this.node.removeEventListener(i.eventType,i.handler),!1))}else{const s=t.split(".")[0];this._listeners=this._listeners.filter(i=>i.eventType!==s||i.handler!==e||(this.node.removeEventListener(i.eventType,i.handler),!1))}
1else this._listeners.forEach(s=>{this.node.removeEventListener(s.eventType,s.handler)}),this._listeners=[];return this}each(t,e){return Array.from(this.node.children).forEach(i=>{const a=i.instance||new j(i);t.call(a),e&&a.each(t,e)}),this}removeClass(t){return"*"===t?this.node.removeAttribute("class"):this.node.classList.remove(t),this}children(){return Array.from(this.node.childNodes).filter(t=>1===t.nodeType).map(t=>t.instance||new j(t))}hide(){return this.node.style.display="none",this}show(){return this.node.style.display="",this}bbox(){if("function"==typeof this.node.getBBox)try{return this.node.getBBox()}catch{}return{x:0,y:0,width:0,height:0}}tspan(t){const e=B.createElementNS("http://www.w3.org/2000/svg","tspan");return e.textContent=t,this.node.appendChild(e),new j(e)}plot(t){return"string"==typeof t&&this.attr("d",t),this}animate(){throw new Error("Animation module not loaded")}filterWith(){throw new Error("Filter module not loaded")}unfilter(t){return this._filter&&(this.node.removeAttribute("filter"),t&&this._filter.node&&this._filter.node.parentNode&&this._filter.node.parentNode.removeChild(this._filter.node),this._filter=null),this}filterer(){return this._filter}}let is=0;class as extends j{constructor(t,e,s){super(B.createElementNS(V,"radial"===e?"radialGradient":"linearGradient")),this._id="SvgjsGradient"+ ++is,this.attr("id",this._id),"function"==typeof s&&s(new os(this));let o=t.node.querySelector("defs");o||(o=B.createElementNS(V,"defs"),t.node.appendChild(o)),o.appendChild(this.node)}stop(t,e,s){const i=B.createElementNS(V,"stop");return i.setAttribute("offset",t),i.setAttribute("stop-color",e),void 0!==s&&i.setAttribute("stop-opacity",String(s)),this.node.appendChild(i),this}from(t,e){return this.attr({x1:t,y1:e})}to(t,e){return this.attr({x2:t,y2:e})}url(){return"url(#"+this._id+")"}toString(){return this.url()}valueOf(){return this.url()}fill(){return this.url()}}class os{constructor(t){this.gradient=t}stop(t,e,s){return this.gradient.stop(t,e,s),this}}let rs=0;class ns extends j{constructor(t,e,s,i){super(B.createElementNS(V,"pattern")),this._id="SvgjsPattern"+ ++rs,this.attr({id:this._id,width:e,height:s,patternUnits:"userSpaceOnUse"}),"function"==typeof i&&i(new At(this.node));let o=t.node.querySelector("defs");o||(o=B.createElementNS(V,"defs"),t.node.appendChild(o)),o.appendChild(this.node)}url(){return"url(#"+this._id+")"}toString(){return this.url()}valueOf(){return this.url()}fill(){return this.url()}}class At extends j{line(t,e,s,i){const a=this._make("line");return void 0!==t&&a.attr({x1:t,y1:e,x2:s,y2:i}),a}rect(t,e){const s=this._make("rect");return void 0!==t&&s.attr({width:t,height:e}),s}circle(t){const e=this._make("circle");return void 0!==t&&e.attr({r:t/2,cx:t/2,cy:t/2}),e}path(t){const e=this._make("path");return t&&e.attr("d",t),e}polygon(t){const e=this._make("polygon");return t&&e.attr("points",t),e}group(){return this._makeContainer("g")}defs(){return this._makeContainer("defs")}plain(t){const e=B.createElementNS(V,"text");e.textContent=t;const s=new j(e);return this.node.appendChild(e),s}text(t){const e=B.createElementNS(V,"text"),s=new j(e);return this.node.appendChild(e),"function"==typeof t&&t(new ls(e)),s}image(t,e){const s=B.createElementNS(V,"image");s.setAttributeNS("http://www.w3.org/1999/xlink","href",t);const i=new j(s);if(this.node.appendChild(s),"function"==typeof e){const a=new Image;a.onload=function(){i.size(a.width,a.height),e.call(i,{width:a.width,height:a.height})},a.src=t}return i}gradient(t,e){return new as(this,t,e)}pattern(t,e,s){return new ns(this,t,e,s)}_make(t){const e=B.createElementNS(V,t);return this.node.appendChild(e),new j(e)}_makeContainer(t){const e=B.createElementNS(V,t);return this.node.appendChild(e),new At(e)}}class ls{constructor(t){this.textNode=t}tspan(t){const e=B.createElementNS(V,"tspan");return e.textContent=t,this.textNode.appendChild(e),new cs(e,this.textNode)}}class cs{constructor(t,e){this.node=t,this.textNode=e}newLine(){return this.node.setAttribute("dy","1.1em"),this.node.dataset.newline="1",this}}let hs=0;class ds extends j{constructor(){super(B.createElementNS(V,"filter")),this._id="SvgjsFilter"+ ++hs,this.attr("id",this._id)}size(t,e,s,i){return this.attr({width:t,height:e,x:s,y:i})}}class gs{constructor(t){this.filter=t}colorMatrix(t){return this._primitive("feColorMatrix",t)}offset(t){return this._primitive("feOffset",t)}gaussianBlur(t){return this._primitive("feGaussianBlur",t)}flood(t){return this._primitive("feFlood",t)}composite(t){return this._primitive("feComposite",t)}merge(t){const e=B.createElementNS(V,"feMerge");return t.forEach(s=>{const i=B.createElementNS(V,"feMergeNode");i.setAttribute("in",s),e.appendChild(i)}),this.filter.node.appendChild(e),new j(e)}_primitive(t,e){const s=B.createElementNS(V,t);for(const i in e)s.setAttribute(i,e[i]);return this.filter.node.appendChild(s),new j(s)}}function le(A){if(!A||"string"!=typeof A)return[["M",0,0]];const t=[],e=/([MmLlHhVvCcSsQqTtAaZz])\s*/g,s=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;let i;const a=[],o=[];for(;null!==(i=e.exec(A));)a.push(i[1]),o.push(i.index);for(let r=0;r<a.length;r++){const l=A.substring(o[r]+a[r].length,r+1<o.length?o[r+1]:A.length),h=[];let d;for(s.lastIndex=0;null!==(d=s.exec(l));)h.push(parseFloat(d[0]));const f=a[r].toUpperCase();if("Z"===f)t.push(["Z"]);else if("M"===f||"L"===f||"T"===f)for(let p=0;p<h.length;p+=2)t.push([f,h[p],h[p+1]]);else if("H"===f)for(let p=0;p<h.length;p++)t.push([f,h[p]]);
1else if("V"===f)for(let p=0;p<h.length;p++)t.push([f,h[p]]);else if("C"===f)for(let p=0;p<h.length;p+=6)t.push([f,h[p],h[p+1],h[p+2],h[p+3],h[p+4],h[p+5]]);else if("S"===f||"Q"===f)for(let p=0;p<h.length;p+=4)t.push([f,h[p],h[p+1],h[p+2],h[p+3]]);else if("A"===f)for(let p=0;p<h.length;p+=7)t.push([f,h[p],h[p+1],h[p+2],h[p+3],h[p+4],h[p+5],h[p+6]])}return 0===t.length&&t.push(["M",0,0]),t}function ce(A){let t=1/0,e=1/0,s=-1/0,i=-1/0;return A.forEach(a=>{for(let o=1;o<a.length;o+=2)if(o+1<=a.length){const r=a[o],n=a[o+1];"number"==typeof r&&"number"==typeof n&&(r<t&&(t=r),r>s&&(s=r),n<e&&(e=n),n>i&&(i=n))}}),t===1/0?{x:0,y:0,width:0,height:0}:{x:t,y:e,width:s-t,height:i-e}}function he(A){switch(A[0]){case"z":case"Z":A[0]="L",A[1]=this.start[0],A[2]=this.start[1];break;case"H":A[0]="L",A[2]=this.pos[1];break;case"V":A[0]="L",A[2]=A[1],A[1]=this.pos[0];break;case"T":A[0]="Q",A[3]=A[1],A[4]=A[2],A[1]=this.reflection[1],A[2]=this.reflection[0];break;case"S":A[0]="C",A[6]=A[4],A[5]=A[3],A[4]=A[2],A[3]=A[1],A[2]=this.reflection[1],A[1]=this.reflection[0]}return A}function de(A){var t=A.length;return this.pos=[A[t-2],A[t-1]],-1!="SCQT".indexOf(A[0])&&(this.reflection=[2*this.pos[0]-A[t-4],2*this.pos[1]-A[t-3]]),A}function ge(A){var t,e=[A];switch(A[0]){case"M":return this.pos=this.start=[A[1],A[2]],e;case"L":A[5]=A[3]=A[1],A[6]=A[4]=A[2],A[1]=this.pos[0],A[2]=this.pos[1];break;case"Q":A[6]=A[4],A[5]=A[3],A[4]=1*A[4]/3+2*A[2]/3,A[3]=1*A[3]/3+2*A[1]/3,A[2]=1*this.pos[1]/3+2*A[2]/3,A[1]=1*this.pos[0]/3+2*A[1]/3;break;case"A":e=function us(A,t){var h,d,f,p,g,u,b,x,w,m,y,v,C,L,k,S,T,P,M,F,X,Y,e=Math.abs(t[1]),s=Math.abs(t[2]),i=t[3]%360,a=t[4],o=t[5],r=t[6],n=t[7],c=new et(A[0],A[1]),l=new et(r,n),R=[];if(0===e||0===s||c.x===l.x&&c.y===l.y)return[["C",c.x,c.y,l.x,l.y,l.x,l.y]];for((d=(h=new et((c.x-l.x)/2,(c.y-l.y)/2).transform(new ht(0,0,0,0,0,0).rotate(i))).x*h.x/(e*e)+h.y*h.y/(s*s))>1&&(e*=d=Math.sqrt(d),s*=d),f=new ht(0,0,0,0,0,0).rotate(i).scale(1/e,1/s).rotate(-i),c=c.transform(f),u=(p=[(l=l.transform(f)).x-c.x,l.y-c.y])[0]*p[0]+p[1]*p[1],g=Math.sqrt(u),p[0]/=g,p[1]/=g,b=u<4?Math.sqrt(1-u/4):0,a===o&&(b*=-1),x=new et((l.x+c.x)/2+b*-p[1],(l.y+c.y)/2+b*p[0]),w=new et(c.x-x.x,c.y-x.y),m=new et(l.x-x.x,l.y-x.y),y=Math.acos(w.x/Math.sqrt(w.x*w.x+w.y*w.y)),w.y<0&&(y*=-1),v=Math.acos(m.x/Math.sqrt(m.x*m.x+m.y*m.y)),m.y<0&&(v*=-1),o&&y>v&&(v+=2*Math.PI),!o&&y<v&&(v-=2*Math.PI),S=[],T=y,C=(v-y)/(L=Math.ceil(2*Math.abs(y-v)/Math.PI)),k=4*Math.tan(C/4)/3,X=0;X<=L;X++)M=Math.cos(T),P=Math.sin(T),F=new et(x.x+M,x.y+P),S[X]=[new et(F.x+k*P,F.y-k*M),F,new et(F.x-k*P,F.y+k*M)],T+=C;for(S[0][0]=S[0][1].clone(),S[S.length-1][2]=S[S.length-1][1].clone(),f=new ht(0,0,0,0,0,0).rotate(i).scale(e,s).rotate(-i),X=0,Y=S.length;X<Y;X++)S[X][0]=S[X][0].transform(f),S[X][1]=S[X][1].transform(f),S[X][2]=S[X][2].transform(f);for(X=1,Y=S.length;X<Y;X++)R.push(["C",(F=S[X-1][2]).x,F.y,(F=S[X][0]).x,F.y,r=(F=S[X][1]).x,n=F.y]);return R}(null!=(t=this.pos)?t:[],A),A=e[0]}return A[0]="C",this.pos=[A[5],A[6]],this.reflection=[2*A[5]-A[3],2*A[6]-A[4]],e}function fe(A,t){if(!1===t)return!1;for(var e=t,s=A.length;e<s;++e)if("M"==A[e][0])return e;return!1}function xs(A,t,e,s,i,a){for(var o=A.slice(t,e||void 0),r=s.slice(i,a||void 0),n=0,c={pos:[0,0],start:[0,0]},l={pos:[0,0],start:[0,0]};o[n]=he.call(c,o[n]),r[n]=he.call(l,r[n]),o[n][0]!=r[n][0]||"M"==o[n][0]||"A"==o[n][0]&&(o[n][4]!=r[n][4]||o[n][5]!=r[n][5])?(Array.prototype.splice.apply(o,[n,1].concat(ge.call(c,o[n]))),Array.prototype.splice.apply(r,[n,1].concat(ge.call(l,r[n])))):(o[n]=de.call(c,o[n]),r[n]=de.call(l,r[n])),++n!=o.length||n!=r.length;)n==o.length&&o.push(["C",c.pos[0],c.pos[1],c.pos[0],c.pos[1],c.pos[0],c.pos[1]]),n==r.length&&r.push(["C",l.pos[0],l.pos[1],l.pos[0],l.pos[1],l.pos[0],l.pos[1]]);return{start:o,dest:r}}function pe(A){if(!A||"string"!=typeof A)return null;if("#"===A[0]){let e=A.slice(1);3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const s=parseInt(e,16);return[s>>16&255,s>>8&255,255&s,1]}const t=A.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/);return t?[+t[1],+t[2],+t[3],void 0!==t[4]?+t[4]:1]:null}function ws(A,t,e){return`rgba(${Math.round(A[0]+(t[0]-A[0])*e)},${Math.round(A[1]+(t[1]-A[1])*e)},${Math.round(A[2]+(t[2]-A[2])*e)},${A[3]+(t[3]-A[3])*e})`}class Gt{constructor(t,e,s){this.el=t,this.duration=e??300,this.delay=s||0,this._attrTarget=null,this._plotTarget=null,this._afterCb=null,this._duringCb=null,this._next=null,this._root=null,this._scheduled=!1}attr(t){return this._attrTarget=t,this._schedule(),this}plot(t){return this._plotTarget=t,this._schedule(),this}after(t){return this._afterCb=t,this._schedule(),this}during(t){return this._duringCb=t,this._schedule(),this}animate(t,e){const s=new Gt(this.el,t,e);return this._next=s,s._root=this._root||this,s}
1_schedule(){const t=this._root||this;t._scheduled||(t._scheduled=!0,queueMicrotask(()=>t._executeChain()))}_executeChain(){const t=[];let e=this;for(;e;)t.push(e),e=e._next;let s=0;t.forEach(i=>{s+=i.delay,i._execute(s),s+=i.duration})}_execute(t){const e=this.el,s=this.duration;if(s<=1){const a=()=>{this._attrTarget&&e.attr(this._attrTarget),this._plotTarget&&e.plot(this._plotTarget),this._afterCb&&this._afterCb.call(e)};return void(t>0?setTimeout(a,t):a())}const i=()=>{const a={},o={},r={};if(this._attrTarget)for(const h of Object.keys(this._attrTarget)){const d=e.attr(h);a[h]=d;const f=pe(d),p=pe(String(this._attrTarget[h]));f&&p&&(o[h]=f,r[h]=p)}let n=null;if(this._plotTarget){const h=e.attr("d")||"";try{n=function ms(A,t){var e=function bs(A,t){for(var n,e=le(A),s=le(t),i=0,a=0,o=!1,r=!1;!1!==i||!1!==a;){if(o=fe(e,!1!==i&&i+1),r=fe(s,!1!==a&&a+1),!1===i){const c=ce(n.start);i=0==c.height||0==c.width?e.push(e[0])-1:e.push(["M",c.x+c.width/2,c.y+c.height/2])-1}if(!1===a){const c=ce(n.dest);a=0==c.height||0==c.width?s.push(s[0])-1:s.push(["M",c.x+c.width/2,c.y+c.height/2])-1}n=xs(e,i,o,s,a,r),e=e.slice(0,i).concat(n.start,!1===o?[]:e.slice(o)),s=s.slice(0,a).concat(n.dest,!1===r?[]:s.slice(r)),i=!1!==o&&i+n.start.length,a=!1!==r&&a+n.dest.length}return{start:e,dest:s}}(A,t),s=e.start,i=e.dest;return function(a){return function ps(A){return A.map(t=>t.join(" ")).join(" ")}(s.map(function(r,n){return i[n].map(function(c,l){return 0===l?c:r[l]+(i[n][l]-r[l])*a})}))}}(h,this._plotTarget)}catch{n=null}}const c=performance.now(),l=h=>{const f=Math.min((h-c)/s,1),p=function ys(A){return-Math.cos(A*Math.PI)/2+.5}(f);if(this._attrTarget)if(f>=1)e.attr(this._attrTarget);else{const g={};for(const u of Object.keys(this._attrTarget))if(o[u]&&r[u])g[u]=ws(o[u],r[u],p);else{const b=parseFloat(a[u]),x=parseFloat(this._attrTarget[u]);!isNaN(b)&&!isNaN(x)&&(g[u]=b+(x-b)*p)}e.attr(g)}n&&f<1&&e.attr("d",n(p)),this._duringCb&&this._duringCb(p),f<1?B.requestAnimationFrame(l):(this._plotTarget&&e.attr("d",this._plotTarget),this._afterCb&&this._afterCb.call(e))};B.requestAnimationFrame(l)};t>0?setTimeout(i,t):i()}}function Mt(){const A=B.createElementNS(V,"svg"),t=new At(A);return t.attr({xmlns:V}),t}(function fs(A){A.prototype.filterWith=function(t){const e=new ds;this._filter=e;let s=this.node;for(;s&&"svg"!==s.nodeName;)s=s.parentNode;if(s){let i=s.querySelector("defs");i||(i=B.createElementNS(V,"defs"),s.insertBefore(i,s.firstChild)),i.appendChild(e.node)}return t(new gs(e)),this.attr("filter","url(#"+e._id+")"),this},A.prototype.unfilter=function(t){return this._filter&&(this.node.removeAttribute("filter"),t&&this._filter.node&&this._filter.node.parentNode&&this._filter.node.parentNode.removeChild(this._filter.node),this._filter=null),this},A.prototype.filterer=function(){return this._filter}})(j),function vs(A){A.prototype.animate=function(t,e){return new Gt(this,t,e)}}(j),function As(A){A.prototype.draggable=function(t){if(!1===t)return this._dragCleanup&&(this._dragCleanup(),this._dragCleanup=null),this;const e=this,s=t||{},i=a=>{if(a.button&&0!==a.button)return;a.stopPropagation();const r="touchstart"===a.type?a.touches[0]:a,n=e.node,c=parseFloat(n.getAttribute("x"))||0,l=parseFloat(n.getAttribute("y"))||0,h=r.clientX,d=r.clientY,f=n.ownerSVGElement;let p=null;f&&(p=f.getScreenCTM());const g=b=>{const x="touchmove"===b.type?b.touches[0]:b;let w=x.clientX-h,m=x.clientY-d;p&&(w/=p.a,m/=p.d);let y=c+w,v=l+m;const C=parseFloat(n.getAttribute("width"))||0,L=parseFloat(n.getAttribute("height"))||0;void 0!==s.minX&&y<s.minX&&(y=s.minX),void 0!==s.minY&&v<s.minY&&(v=s.minY),void 0!==s.maxX&&y+C>s.maxX&&(y=s.maxX-C),void 0!==s.maxY&&v+L>s.maxY&&(v=s.maxY-L);const S=new CustomEvent("dragmove",{detail:{handler:{move:function(T,P){n.setAttribute("x",T),n.setAttribute("y",P)}},box:{x:y,y:v,w:C,h:L,x2:y+C,y2:v+L}}});n.dispatchEvent(S)},u=()=>{_.isBrowser()&&(document.removeEventListener("mousemove",g),document.removeEventListener("touchmove",g),document.removeEventListener("mouseup",u),document.removeEventListener("touchend",u))};_.isBrowser()&&(document.addEventListener("mousemove",g),document.addEventListener("touchmove",g),document.addEventListener("mouseup",u),document.addEventListener("touchend",u))};
1return e.node.addEventListener("mousedown",i),e.node.addEventListener("touchstart",i),e._dragCleanup=()=>{e.node.removeEventListener("mousedown",i),e.node.removeEventListener("touchstart",i)},e}}(j),function Cs(A){A.prototype.select=function(t){if(!1===t)return this._selectCleanup&&(this._selectCleanup(),this._selectCleanup=null),this;const e=this,{createHandle:s,updateHandle:i}=t,a=document.createElementNS(V,"g");a.setAttribute("class","svg_select_points");const o=e.node.parentNode;o&&o.appendChild(a);const r={},n=["t","b","l","r","lt","rt","lb","rb"];n.forEach((l,h)=>{const d=new At(document.createElementNS(V,"g"));a.appendChild(d.node);const f=s(d,[0,0],h,[],l);r[l]={group:d,handle:f}});const c=()=>{const l=parseFloat(e.attr("x"))||0,h=parseFloat(e.attr("y"))||0,d=parseFloat(e.attr("width"))||0,f=parseFloat(e.attr("height"))||0,p=e.node.getAttribute("transform");p?a.setAttribute("transform",p):a.removeAttribute("transform");const g={t:[l+d/2,h],b:[l+d/2,h+f],l:[l,h+f/2],r:[l+d,h+f/2],lt:[l,h],rt:[l+d,h],lb:[l,h+f],rb:[l+d,h+f]};n.forEach(u=>{r[u]&&g[u]&&i(r[u].group,g[u])})};return c(),e._selectHandles=a,e._selectHandlesMap=r,e._updateSelectPositions=c,e._selectCleanup=()=>{a.parentNode&&a.parentNode.removeChild(a),e._selectHandles=null,e._selectHandlesMap=null,e._updateSelectPositions=null},e},A.prototype.resize=function(t){if(!1===t)return this._resizeCleanup&&(this._resizeCleanup(),this._resizeCleanup=null),this;const e=this,s=e._selectHandlesMap;if(!s)return e;const i=[],a=o=>{const r=s[o];if(!r||!r.group||!r.group.node)return;const n=r.group.node,c=l=>{if(l.button&&0!==l.button)return;l.stopPropagation();const f=("touchstart"===l.type?l.touches[0]:l).clientX,p=e.node.ownerSVGElement;let g=null;p&&(g=p.getScreenCTM());const u=parseFloat(e.attr("x"))||0,b=parseFloat(e.attr("width"))||0,x=m=>{let v=("touchmove"===m.type?m.touches[0]:m).clientX-f;g&&(v/=g.a);let C=u,L=b;"l"===o?(C=u+v,L=b-v):"r"===o&&(L=b+v),L<0&&(L=0),e.attr({x:C,width:L}),e._updateSelectPositions&&e._updateSelectPositions();const k=new CustomEvent("resize",{detail:{el:e}});e.node.dispatchEvent(k)},w=()=>{_.isBrowser()&&(document.removeEventListener("mousemove",x),document.removeEventListener("touchmove",x),document.removeEventListener("mouseup",w),document.removeEventListener("touchend",w));const m=new CustomEvent("resize",{detail:{el:e}});e.node.dispatchEvent(m)};_.isBrowser()&&(document.addEventListener("mousemove",x),document.addEventListener("touchmove",x),document.addEventListener("mouseup",w),document.addEventListener("touchend",w))};n.addEventListener("mousedown",c),n.addEventListener("touchstart",c),i.push(()=>{n.removeEventListener("mousedown",c),n.removeEventListener("touchstart",c)})};return a("l"),a("r"),e._resizeCleanup=()=>{i.forEach(o=>o())},e}}(j),Mt.xlink="http://www.w3.org/1999/xlink",_.isBrowser()&&typeof window.SVG>"u"&&(window.SVG=Mt),_.isBrowser()?(typeof window.SVG>"u"&&(window.SVG=Mt),typeof window.Apex>"u"&&(window.Apex={})):typeof global<"u"&&(typeof global.Apex>"u"&&(global.Apex={}),typeof global.SVG>"u"&&(global.SVG=Mt));const ue=class Ut{static registerFeatures(t){for(const[e,s]of Object.entries(t))Ut._featureRegistry.set(e,s)}constructor(t){this.ctx=t,this.w=t.w}initModules(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","isSeriesHidden","highlightSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","exportToCSV","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend","keydown","keyup"],this.ctx.animations=new ft(this.w,this.ctx),this.ctx.axes=new Be(this.w,this.ctx),this.ctx.core=new je(this.ctx.el,this.w,this.ctx),this.ctx.config=new yt({}),this.ctx.data=new vt(this.w,{resetGlobals:()=>this.ctx.core.resetGlobals(),isMultipleY:()=>this.ctx.core.isMultipleY()}),this.ctx.grid=new se(this.w,this.ctx),this.ctx.graphics=new E(this.w,this.ctx),this.ctx.coreUtils=new q(this.w),this.ctx.crosshairs=new Ot(this.w),this.ctx.events=new _e(this.w,this.ctx),this.ctx.fill=new st(this.w),this.ctx.localization=new Ne(this.w),this.ctx.options=new ct,this.ctx.responsive=new ze(this.w),this.ctx.series=new Z(this.w,{toggleDataSeries:(...e)=>{var s;return null==(s=this.ctx.legend)?void 0:s.legendHelpers.toggleDataSeries(...e)},revertDefaultAxisMinMax:()=>this.ctx.updateHelpers.revertDefaultAxisMinMax(),updateSeries:(...e)=>this.ctx.updateHelpers._updateSeries(...e)}),this.ctx.theme=new Oe(this.w),this.ctx.formatters=new bt(this.w),this.ctx.titleSubtitle=new He(this.w),this.ctx.dimensions=new Tt(this.w,this.ctx),this.ctx.updateHelpers=new Ke(this.w,this.ctx);const t=new ss(this.w,this.ctx);this.w.globals.tooltip=t,Object.defineProperty(this.ctx,"tooltip",{get(){return this.w.globals.tooltip},configurable:!0}),this._initOptionalModules()}_initOptionalModules(){const t=Ut._featureRegistry,e=this.w,s=this.ctx,i=t.get("exports");s.exports=i?new i(e,s):null;const a=t.get("legend");s.legend=a?new a(e,s):null;const o=t.get("toolbar");Object.defineProperty(s,"toolbar",{get(){var c;
1return!this._toolbar&&o&&(this._toolbar=new o(e,this)),null!=(c=this._toolbar)?c:null},configurable:!0});const r=t.get("zoomPanSelection");Object.defineProperty(s,"zoomPanSelection",{get(){var c;return!this._zoomPanSelection&&r&&(this._zoomPanSelection=new r(e,this)),null!=(c=this._zoomPanSelection)?c:null},configurable:!0});const n=t.get("keyboardNavigation");Object.defineProperty(s,"keyboardNavigation",{get(){var c;return!this._keyboardNavigation&&n&&(this._keyboardNavigation=new n(e,this)),null!=(c=this._keyboardNavigation)?c:null},configurable:!0})}};$(ue,"_featureRegistry",new Map);let Pt=ue;class xe{constructor(t){this.ctx=t,this.w=t.w}clear({isUpdating:t}){this.ctx._zoomPanSelection&&this.ctx._zoomPanSelection.destroy(),this.ctx._toolbar&&this.ctx._toolbar.destroy(),this.w.globals.resizeObserver&&"function"==typeof this.w.globals.resizeObserver.disconnect&&(this.w.globals.resizeObserver.disconnect(),this.w.globals.resizeObserver=null),_t.invalidateAll(this.w),t?(this.ctx._zoomPanSelection=null,this.ctx._toolbar=null,this.ctx._keyboardNavigation=null):(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._keyboardNavigation=null,this.ctx.w.globals.tooltip=null),this.clearDomElements({isUpdating:t})}killSVG(t){t.each(function(){this.removeClass("*"),this.off()},!0),t.clear()}clearDomElements({isUpdating:t}){const e=this.w.dom;if(_.isBrowser()){const s=e.Paper.node;s.parentNode&&s.parentNode.parentNode&&!t&&(s.parentNode.parentNode.style.minHeight="unset");const i=e.baseEl;if(i&&this.ctx.eventList.forEach(a=>{i.removeEventListener(a,this.ctx.events.documentEvent)}),null!==this.ctx.el)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(e.Paper),e.Paper.remove()}e.elWrap=null,e.elGraphical=null,e.elLegendWrap=null,e.elLegendForeign=null,e.baseEl=null,e.elGridRect=null,e.elGridRectMask=null,e.elGridRectBarMask=null,e.elGridRectMarkerMask=null,e.elForecastMask=null,e.elNonForecastMask=null,e.elDefs=null}}const $t=new WeakMap;class ot{constructor(t,e){$(this,"core"),$(this,"responsive"),$(this,"axes"),$(this,"grid"),$(this,"graphics"),$(this,"coreUtils"),$(this,"crosshairs"),$(this,"events"),$(this,"fill"),$(this,"localization"),$(this,"options"),$(this,"series"),$(this,"theme"),$(this,"formatters"),$(this,"titleSubtitle"),$(this,"dimensions"),$(this,"updateHelpers"),$(this,"tooltip"),$(this,"data"),$(this,"animations"),$(this,"exports"),$(this,"legend"),$(this,"toolbar"),$(this,"zoomPanSelection"),$(this,"keyboardNavigation"),$(this,"annotations"),$(this,"timeScale"),$(this,"_keyboardNavigation"),$(this,"windowResizeHandler"),$(this,"parentResizeHandler"),$(this,"publicMethods",[]),$(this,"eventList",[]),$(this,"config"),this.opts=e,this.ctx=this,this.w=new Ye(e).init(),this.el=t,this.w.globals.cuid=D.randomId(),this.w.globals.chartID=this.w.config.chart.id?D.escapeString(this.w.config.chart.id):this.w.globals.cuid,new Pt(this).initModules(),this.lastUpdateOptions=null,this.create=this.create.bind(this),_.isBrowser()&&(this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this))}render(){var t,e;return null!=(e=null==(t=this.w)?void 0:t.config)&&e.chart?new Promise((s,i)=>{var a;if(D.elementExists(this.el)){typeof Apex._chartInstances>"u"&&(Apex._chartInstances=[]),this.w.config.chart.id&&Apex._chartInstances.push({id:this.w.globals.chartID,group:this.w.config.chart.group,chart:this}),this.setLocale(this.w.config.chart.defaultLocale);const o=this.w.config.chart.events.beforeMount;if("function"==typeof o&&o(this,this.w),this.events.fireEvent("beforeMount",[this,this.w]),_.isBrowser()){window.addEventListener("resize",this.windowResizeHandler),function Ss(A,t){if(_.isSSR())return;let e=!1;if(A.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){const i=A.getBoundingClientRect();("none"===A.style.display||0===i.width)&&(e=!0)}const s=new ResizeObserver(i=>{e&&t.call(A,i),e=!0});A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(A.children).forEac
1h(i=>s.observe(i)):s.observe(A),$t.set(t,s)}(this.el.parentNode,this.parentResizeHandler);const n=this.el.getRootNode&&this.el.getRootNode(),c=D.is("ShadowRoot",n),l=this.el.ownerDocument;let h=c?n.getElementById("apexcharts-css"):l.getElementById("apexcharts-css");if(!h){h=B.createElementNS("http://www.w3.org/1999/xhtml","style"),h.id="apexcharts-css",h.textContent='@keyframes opaque {\n 0% {\n opacity: 0\n }\n\n to {\n opacity: 1\n }\n}\n\n@keyframes resizeanim {\n\n 0%,\n to {\n opacity: 0\n }\n}\n\n.apexcharts-canvas {\n position: relative;\n direction: ltr !important;\n user-select: none\n}\n\n.apexcharts-canvas ::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 6px\n}\n\n.apexcharts-canvas ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(0, 0, 0, .5);\n box-shadow: 0 0 1px rgba(255, 255, 255, .5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5)\n}\n\n.apexcharts-inner {\n position: relative\n}\n\n.apexcharts-text tspan {\n font-family: inherit\n}\n\nrect.legend-mouseover-inactive,\n.legend-mouseover-inactive rect,\n.legend-mouseover-inactive path,\n.legend-mouseover-inactive circle,\n.legend-mouseover-inactive line,\n.legend-mouseover-inactive text.apexcharts-yaxis-title-text,\n.legend-mouseover-inactive text.apexcharts-yaxis-label {\n transition: .15s ease all;\n opacity: .2\n}\n\n.apexcharts-legend-text {\n padding-left: 15px;\n margin-left: -15px;\n}\n\n.apexcharts-legend-series[role="button"]:focus {\n outline: 2px solid #008FFB;\n outline-offset: 2px;\n}\n\n.apexcharts-legend-series[role="button"]:focus:not(:focus-visible) {\n outline: none;\n}\n\n.apexcharts-legend-series[role="button"]:focus-visible {\n outline: 2px solid #008FFB;\n outline-offset: 2px;\n}\n\n.apexcharts-series-collapsed {\n opacity: 0\n}\n\n.apexcharts-canvas svg:focus:not(:focus-visible) {\n outline: none;\n}\n\n/* Keyboard navigation focus indicator on SVG data elements.\n SVG elements don\'t support CSS outline, so we use stroke. */\n.apexcharts-bar-area.apexcharts-keyboard-focused,\n.apexcharts-candlestick-area.apexcharts-keyboard-focused,\n.apexcharts-boxPlot-area.apexcharts-keyboard-focused,\n.apexcharts-rangebar-area.apexcharts-keyboard-focused,\n.apexcharts-pie-area.apexcharts-keyboard-focused,\n.apexcharts-heatmap-rect.apexcharts-keyboard-focused,\n.apexcharts-treemap-rect.apexcharts-keyboard-focused {\n stroke: #008FFB;\n stroke-width: 2;\n stroke-opacity: 1;\n}\n\n.apexcharts-tooltip {\n border-radius: 5px;\n box-shadow: 2px 2px 6px -4px #999;\n cursor: default;\n font-size: 14px;\n left: 62px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n top: 20px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n white-space: nowrap;\n z-index: 12;\n transition: .15s ease all\n}\n\n.apexcharts-tooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-tooltip.apexcharts-theme-light {\n border: 1px solid #e3e3e3;\n background: rgba(255, 255, 255, .96)\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark {\n color: #fff;\n background: rgba(30, 30, 30, .8)\n}\n\n.apexcharts-tooltip * {\n font-family: inherit\n}\n\n.apexcharts-tooltip-title {\n padding: 6px;\n font-size: 15px;\n margin-bottom: 4px\n}\n\n.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {\n background: #eceff1;\n border-bottom: 1px solid #ddd\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {\n background: rgba(0, 0, 0, .7);\n border-bottom: 1px solid #333\n}\n\n.apexcharts-tooltip-text-goals-value,\n.apexcharts-tooltip-text-y-value,\n.apexcharts-tooltip-text-z-value {\n display: inline-block;\n margin-left: 5px;\n font-weight: 600\n}\n\n.apexcharts-tooltip-text-goals-label:empty,\n.apexcharts-tooltip-text-goals-value:empty,\n.apexcharts-tooltip-text-y-label:empty,\n.apexcharts-tooltip-text-y-value:empty,\n.apexcharts-tooltip-text-z-value:empty,\n.apexcharts-tooltip-title:empty {\n display: none\n}\n\n.apexcharts-tooltip-text-goals-label,\n.apexcharts-tooltip-text-goals-value {\n padding: 6px 0 5px\n}\n\n.apexcharts-tooltip-goals-group,\n.apexcharts-tooltip-text-goals-label,\n.apexcharts-tooltip-text-goals-value {\n display: flex\n}\n\n.apexcharts-tooltip-text-goals-label:not(:empty),\n.apexcharts-tooltip-text-goals-value:not(:empty) {\n margin-top: -6px\n}\n\n.apexcharts-tooltip-marker {\n display: inline-block;\n position: relative;\n width: 16px;\n height: 16px;\n font-size: 16px;\n line-height: 16px;\n margin-right: 4px;\n text-align: center;\n vertical-align: middle;\n color: inherit;\n}\n\n.apexcharts-tooltip-marker::before {\n content: "";\n display: inline-block;\n width: 100%;\n text-align: center;
1\n color: currentcolor;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n font-size: 26px;\n font-family: Arial, Helvetica, sans-serif;\n line-height: 14px;\n font-weight: 900;\n}\n\n.apexcharts-tooltip-marker[shape="circle"]::before {\n content: "\\25CF";\n}\n\n.apexcharts-tooltip-marker[shape="square"]::before,\n.apexcharts-tooltip-marker[shape="rect"]::before {\n content: "\\25A0";\n transform: translate(-1px, -2px);\n}\n\n.apexcharts-tooltip-marker[shape="line"]::before {\n content: "\\2500";\n}\n\n.apexcharts-tooltip-marker[shape="diamond"]::before {\n content: "\\25C6";\n font-size: 28px;\n}\n\n.apexcharts-tooltip-marker[shape="triangle"]::before {\n content: "\\25B2";\n font-size: 22px;\n}\n\n.apexcharts-tooltip-marker[shape="cross"]::before {\n content: "\\2715";\n font-size: 18px;\n}\n\n.apexcharts-tooltip-marker[shape="plus"]::before {\n content: "\\2715";\n transform: rotate(45deg) translate(-1px, -1px);\n font-size: 18px;\n}\n\n.apexcharts-tooltip-marker[shape="star"]::before {\n content: "\\2605";\n font-size: 18px;\n}\n\n.apexcharts-tooltip-marker[shape="sparkle"]::before {\n content: "\\2726";\n font-size: 20px;\n}\n\n.apexcharts-tooltip-series-group {\n padding: 0 10px;\n display: none;\n text-align: left;\n justify-content: left;\n align-items: center\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {\n opacity: 1\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active,\n.apexcharts-tooltip-series-group:last-child {\n padding-bottom: 4px\n}\n\n.apexcharts-tooltip-y-group {\n padding: 6px 0 5px\n}\n\n.apexcharts-custom-tooltip,\n.apexcharts-tooltip-box {\n padding: 4px 8px\n}\n\n.apexcharts-tooltip-boxPlot {\n display: flex;\n flex-direction: column-reverse\n}\n\n.apexcharts-tooltip-box>div {\n margin: 4px 0\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: 700\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: 700;\n display: block;\n margin-bottom: 5px\n}\n\n.apexcharts-xaxistooltip,\n.apexcharts-yaxistooltip {\n opacity: 0;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #eceff1;\n border: 1px solid #90a4ae\n}\n\n.apexcharts-xaxistooltip {\n padding: 9px 10px;\n transition: .15s ease all\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-left: -6px\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-left: -7px\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n top: 100%\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-yaxistooltip {\n padding: 4px 10px\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-top: -6px\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-top: -7px\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n left: 100%\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n right: 100%\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none\n}
1\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: .15s ease all\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0\n}\n\n.apexcharts-selection-rect {\n cursor: move\n}\n\n.svg_select_shape {\n stroke-width: 1;\n stroke-dasharray: 10 10;\n stroke: black;\n stroke-opacity: 0.1;\n pointer-events: none;\n fill: none;\n}\n\n.svg_select_handle {\n stroke-width: 3;\n stroke: black;\n fill: none;\n}\n\n.svg_select_handle_r {\n cursor: e-resize;\n}\n\n.svg_select_handle_l {\n cursor: w-resize;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-menu-icon,\n.apexcharts-pan-icon,\n.apexcharts-reset-icon,\n.apexcharts-selection-icon,\n.apexcharts-toolbar-custom-icon,\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6e8192;\n text-align: center\n}\n\n.apexcharts-menu-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg {\n fill: #6e8192\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(.76)\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomin-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomout-icon svg {\n fill: #f3f4f5\n}\n\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {\n fill: #008ffb\n}\n\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg,\n.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {\n fill: #333\n}\n\n.apexcharts-menu-icon,\n.apexcharts-selection-icon {\n position: relative\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px\n}\n\n.apexcharts-menu-icon,\n.apexcharts-reset-icon,\n.apexcharts-zoom-icon {\n transform: scale(.85)\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n transform: scale(.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px\n}\n\n.apexcharts-pan-icon {\n transform: scale(.62);\n position: relative;\n left: 1px;\n top: 0\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6e8192;\n stroke-width: 2\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008ffb\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0 6px 2px;\n display: flex;\n justify-content: space-between;\n align-items: center\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: .15s ease all;\n pointer-events: none\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: .15s ease all\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0, 0, 0, .7);\n color: #fff\n}\n\n@media screen and (min-width:768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1\n }\n}\n\n/* Toolbar keyboard accessibility: show toolbar when any button inside it is focused */\n.apexcharts-toolbar:focus-within {\n opacity: 1\n}\n\n/* Focus indicator for toolbar icon buttons */\n.apexcharts-menu-icon:focus-visible,\n.apexcharts-pan-icon:focus-visible,\n.apexcharts-reset-icon:focus-visible,\n.apexcharts-selection-icon:focus-visible,\n.apexcharts-toolbar-custom-icon:focus-visible,\n.apexcharts-zoom-icon:focus-visible,\n.apexcharts-zoomin-icon:focus-visible,\n.apexcharts-zoomout-icon:focus-visible {\n outline: 2px solid #008FFB;\n outline-offset: 2px;\n border-radius: 2px\n}\n\n/* Focus indicator for hamburger menu items */\n.apexcharts-menu-item:focus-visible {\n outline: 2px solid #008FFB;\n outline-offset: -2px;\n background: #eee\n}\n\n.apexcharts-canvas .apexcharts-element-hidden,\n.apexcharts-datalabel.apexcharts-element-hidden,\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-hidden-element-shown {\n opacity: 1;\n transition: 0.25s ease all;\n}\n\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value,\n.apexcharts-datalabels,\n.apexcharts-pie-label {\n cursor: default;\n pointer-events: none\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: .3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease\n}\n\n.apexcharts-radialbar-label {\n cursor: pointer;\n}\n\n.apexcharts-annotation-rect,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-gridline,\n.apexcharts-line,\n.apexcharts-point-annotation-label,\n.apexcharts-radar-series path:not(.apexcharts-marker),\n.apexcharts-radar-series polygon,\n.apexcharts-toolbar svg,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-xaxis-annotation-label,\n.apexcharts-yaxis-annotation-label,\n.apexcharts-zoom-rect,\n.no-pointer-events {\n pointer-events: none\n}\n\n.apexcharts-tooltip-active .apexcharts-marker {\n transition: .15s ease all\n}\n\n.apexcharts-radar-series .apexcharts-yaxis {\n pointer-events: none;\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n height: 100%;\n width: 100%;\n overflow: hidden\n}\n\n.contract-trigger:before,\n.resize-triggers,\n.resize-triggers>
1div {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0\n}\n\n.resize-triggers>div {\n height: 100%;\n width: 100%;\n background: #eee;\n overflow: auto\n}\n\n.contract-trigger:before {\n overflow: hidden;\n width: 200%;\n height: 200%\n}\n\n.apexcharts-bar-goals-markers {\n pointer-events: none\n}\n\n.apexcharts-bar-shadows {\n pointer-events: none\n}\n\n.apexcharts-rangebar-goals-markers {\n pointer-events: none\n}\n\n.apexcharts-disable-transitions * {\n transition: none !important;\n}';const d=(null==(a=this.opts.chart)?void 0:a.nonce)||this.w.config.chart.nonce;d&&h.setAttribute("nonce",d),c?n.prepend(h):!1!==this.w.config.chart.injectStyleSheet&&l.head.appendChild(h)}}const r=this.create(this.w.config.series,{});if(!r)return s(this);this.mount(r).then(()=>{"function"==typeof this.w.config.chart.events.mounted&&this.w.config.chart.events.mounted(this,this.w),this.events.fireEvent("mounted",[this,this.w]),s(r)}).catch(n=>{var c,l;const h=n instanceof Error?n:new Error(String(n)),d=h;d.chartId=null==(l=null==(c=this.w)?void 0:c.globals)?void 0:l.chartID,d.el=this.el,i(h)})}else i(new Error("Element not found"))}):Promise.reject(new Error("ApexCharts: chart configuration is missing or invalid. Ensure the options object includes a `chart` property."))}create(t,e){var s;const i=this.w;this.core||new Pt(this).initModules();const a=this.w.globals;if(a.noData=!1,a.animationEnded=!1,!D.elementExists(this.el)||(this.responsive.checkResponsiveConfig(e),i.c
1onfig.xaxis.convertedCatToNumeric&&new mt(i.config).convertCatToNumericXaxis(i.config,this.ctx),this.core.setupElements(),"treemap"===i.config.chart.type&&(i.config.grid.show=!1,i.config.yaxis[0].show=!1),0===a.svgWidth))return a.animationEnded=!0,null;let o=t;t.forEach((b,x)=>{b.hidden&&(o=this.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:x}))});const r=q.checkComboSeries(o,i.config.chart.type);a.comboCharts=r.comboCharts,a.comboBarCount=r.comboBarCount;const n=o.every(b=>b.data&&0===b.data.length);(0===o.length||n&&a.collapsedSeries.length<1)&&this.series.handleNoData(),_.isBrowser()&&this.events.setupEventHandlers();const c=this.data.parseData(o);this._writeParsedSeriesData(c.seriesData),this._writeParsedRangeData(c.rangeData),this._writeParsedCandleData(c.candleData),this._writeParsedLabelData(c.labelData),this._writeParsedAxisFlags(c.axisFlags),this.theme.init(),new pt(this.w,this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),(!a.noData||a.collapsedSeries.length===i.seriesData.series.length||i.config.legend.showForSingleSeries)&&(null==(s=this.legend)||s.init()),this.series.hasAllSeriesEqualX(),a.axisCharts&&(this.core.coreCalculations(),"category"!==i.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar&&(this.ctx.toolbar.minX=i.globals.minX,this.ctx.toolbar.maxX=i.globals.maxX)),this.formatters.heatmapLabelFormatters(),new q(this.w).getLargestMarkerSize();const d=this.dimensions.plotCoords();this._writeLayoutCoords(d.layout);const f=this.core.xySettings();this.grid.createGridMask();const p=this.core.plotChartType(o,f),g=new dt(this.w,this);return g.bringForward(),i.config.dataLabels.background.enabled&&g.dataLabelsBackground(),this.core.shiftGraphPosition(),i.globals.dataPoints>50&&i.dom.elWrap.classList.add("apexcharts-disable-transitions"),{elGraph:p,xyRatios:f,dimensions:{plot:{left:i.layout.translateX,top:i.layout.translateY,width:i.layout.gridWidth,height:i.layout.gridHeight}}}}mount(t=null){const e=this,s=e.w;return new Promise((i,a)=>{var o,r,n,c,l,h,d,f,p;if(null===e.el)return a(new Error("Not enough data to display or target element not found"));(null===t||s.globals.allSeriesCollapsed)&&e.series.handleNoData(),e.grid=new se(e.w,e);const g=e.grid.drawGrid(),u=Pt._featureRegistry.get("annotations");if(e.annotations=u?new u(e.w,{theme:e.theme,timeScale:e.timeScale}):null,null==(o=e.annotations)||o.drawImageAnnos(),null==(r=e.annotations)||r.drawTextAnnos(),"back"===s.config.grid.position&&(g&&s.dom.elGraphical.add(g.el),null!=(n=g?.elGridBorders)&&n.node&&s.dom.elGraphical.add(g.elGridBorders)),Array.isArray(t.elGraph))for(let w=0;w<t.elGraph.length;w++)s.dom.elGraphical.add(t.elGraph[w]);else s.dom.elGraphical.add(t.elGraph);"front"===s.config.grid.position&&(g&&s.dom.elGraphical.add(g.el),null!=(c=g?.elGridBorders)&&c.node&&s.dom.elGraphical.add(g.elGridBorders)),"front"===s.config.xaxis.crosshairs.position&&e.crosshairs.drawXCrosshairs(),"front"===s.config.yaxis[0].crosshairs.position&&e.crosshairs.drawYCrosshairs(),"treemap"!==s.config.chart.type&&e.axes.drawAxis(s.config.chart.type,g);const b=new wt(this.w,this.ctx,g),x=new zt(this.w,{theme:this.theme,timeScale:this.timeScale},g);if(null!==g&&(b.xAxisLabelCorrections(),x.setYAxisTextAlignments(),s.config.yaxis.map((w,m)=>{-1===s.globals.ignoreYAxisIndexes.indexOf(m)&&x.yAxisTitleRotate(m,w.opposite)})),null==(l=e.annotations)||l.drawAxesAnnotations(),!s.globals.noData){if(_.isBrowser()&&s.config.tooltip.enabled&&!s.globals.noData&&(null==(h=e.w.globals.tooltip)||h.drawTooltip(t.xyRatios)),s.config.chart.accessibility.enabled&&s.config.chart.accessibility.keyboard.enabled&&s.config.chart.accessibility.keyboard.navigation.enabled&&(null==(d=e.keyboardNavigation)||d.init()),_.isBrowser()&&s.globals.axisCharts&&(s.axisFlags.isXNumeric||s.config.xaxis.convertedCatToNumeric||s.axisFlags.isRangeBar))(s.config.chart.zoom.enabled||s.config.chart.selection&&s.config.chart.selection.enabled||s.config.chart.pan&&s.c
1onfig.chart.pan.enabled)&&(null==(f=e.zoomPanSelection)||f.init({xyRatios:t.xyRatios}));else{const w=s.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach(y=>{w[y]=!1})}s.config.chart.toolbar.show&&!s.globals.allSeriesCollapsed&&(null==(p=e.toolbar)||p.createToolbar())}s.globals.memory.methodsToExec.length>0&&s.globals.memory.methodsToExec.forEach(w=>{w.method(w.params,!1,w.context)}),!s.globals.axisCharts&&!s.globals.noData&&e.core.resizeNonAxisCharts(),i(e)})}destroy(){_.isBrowser()&&(window.removeEventListener("resize",this.windowResizeHandler),function ks(A,t){if(_.isSSR())return;const e=$t.get(t);e&&(e.disconnect(),$t.delete(t))}(0,this.parentResizeHandler));const t=this.w.config.chart.id;t&&Apex._chartInstances.forEach((e,s)=>{e.id===D.escapeString(t)&&Apex._chartInstances.splice(s,1)}),this._keyboardNavigation&&this._keyboardNavigation.destroy(),new xe(this.ctx).clear({isUpdating:!1})}updateOptions(t,e=!1,s=!0,i=!0,a=!0){const o=this.w;if(o.interact.selection=void 0,this.lastUpdateOptions){if(D.shallowEqual(this.lastUpdateOptions,t))return Promise.resolve(this);if(t.series&&this.lastUpdateOptions.series&&JSON.stringify(this.lastUpdateOptions.series)===JSON.stringify(t.series)){const r=I({},t),n=I({},this.lastUpdateOptions);if(delete r.series,delete n.series,D.shallowEqual(r,n))return Promise.resolve(this)}}return t.series&&(this.data.resetParsingFlags(),this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map((r,n)=>this.updateHelpers._extendSeries(r,n))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),o.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,e,s,i,a)}updateSeries(t=[],e=!0,s=!0){return this.data.resetParsingFlags(),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,s)}appendSeries(t,e=!0,s=!0){this.data.resetParsingFlags();const i=this.w.config.series.slice();return i.push(t),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(i,e,s)}appendData(t,e=!0){const s=this;s.data.resetParsingFlags(),s.w.globals.dataChanged=!0,s.series.getPreviousPaths();const i=s.w.config.series.slice();for(let a=0;a<i.length;a++)if(null!==t[a]&&typeof t[a]<"u"){const o=t[a],r=i[a];for(let n=0;n<o.data.length;n++)r.data.push(o.data[n])}return s.w.config.series=i,e&&(s.w.globals.initialSeries=D.clone(s.w.config.series)),this.update()}update(t){return new Promise((e,s)=>{if(this.lastUpdateOptions&&JSON.stringify(this.lastUpdateOptions)===JSON.stringify(t))return e(this);this.lastUpdateOptions=D.clone(t),new xe(this.ctx).clear({isUpdating:!0});const i=this.create(this.w.config.series,t??{});if(!i)return e(this);this.mount(i).then(()=>{"function"==typeof this.w.config.chart.events.updated&&this.w.config.chart.events.updated(this,this.w),this.events.fireEvent("updated",[this,this.w]),this.w.globals.isDirty=!0,e(this)}).catch(a=>{s(a)})})}fastUpdate(t){return new Promise((e,s)=>{var i;try{const a=this.w,o=a.globals;o.shouldAnimate=t,o.dataChanged=!0,o.animationEnded=!1,_t.invalidateSelectors(a);const r=a.globals;r.maxY=-Number.MAX_VALUE,r.minY=Number.MIN_VALUE,r.minYArr=[],r.maxYArr=[],r.maxX=-Number.MAX_VALUE,r.minX=Number.MAX_VALUE,r.initialMaxX=-Number.MAX_VALUE,r.initialMinX=Number.MAX_VALUE,r.yAxisScale=[],r.xAxisScale=null,r.xAxisTicksPositions=[],r.xRange=0,r.yRange=[],r.zRange=0,r.xTickAmount=0,r.multiAxisTickAmount=0,r.pointsArray=[],r.dataLabelsRects=[],r.lastDrawnDataLabelsIndexes=[],r.textRectsCache=new Map,r.domCache=new Map,r.cachedSelectors={},r.disableZoomIn=!1,r.disableZoomOut=!1,o.axisCharts&&(this.core.coreCalculations(),"category"!==a.config.xaxis.type&&this.formatters.setLabelFormatters());const n=this.core.xySettings(),c=a.dom.elGraphical.node;c.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-datalabels-background").forEach(g=>{var u;return null==(u=g.parentNode)?void 0:u.removeChild(g)});const h=this.core.plotChartType(a.config.series,n),d=c.querySelector(".apexcharts-grid");
1(Array.isArray(h)?h:[h]).forEach(d&&"front"===a.config.grid.position?g=>{const u=g&&g.node?g.node:g;u&&c.insertBefore(u,d)}:g=>{a.dom.elGraphical.add(g)});const p=new dt(a,this);p.bringForward(),a.config.dataLabels.background.enabled&&p.dataLabelsBackground(),_.isBrowser()&&a.config.tooltip.enabled&&!o.noData&&(null==(i=a.globals.tooltip)||i.drawTooltip(n)),"function"==typeof a.config.chart.events.updated&&a.config.chart.events.updated(this,a),this.events.fireEvent("updated",[this,a]),o.isDirty=!0,e(this)}catch(a){s(a)}})}getSyncedCharts(){const t=this.getGroupedCharts();let e=[this];return t.length&&(e=[],t.forEach(s=>{e.push(s)})),e}getGroupedCharts(){return Apex._chartInstances.filter(t=>{if(t.group)return!0}).map(t=>this.w.config.chart.group===t.group?t.chart:this)}static getChartByID(t){const e=D.escapeString(t);if(!Apex._chartInstances)return;const s=Apex._chartInstances.filter(i=>i.id===e)[0];return s&&s.chart}static initOnLoad(){var t;const e=document.querySelectorAll("[data-apexcharts]");for(let s=0;s<e.length;s++){const i=e[s],a=JSON.parse(null!=(t=e[s].getAttribute("data-options"))?t:"");new ot(i,a).render()}}static exec(t,e,...s){const i=this.getChartByID(t);if(!i)return;i.w.globals.isExecCalled=!0;let a=null;return-1!==i.publicMethods.indexOf(e)&&(a=i[e](...s)),a}static merge(t,e){return D.extend(t,e)}static getThemePalettes(){return{palette1:["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"],palette2:["#3F51B5","#03A9F4","#4CAF50","#F9CE1D","#FF9800"],palette3:["#33B2DF","#546E7A","#D4526E","#13D8AA","#A5978B"],palette4:["#4ECDC4","#C7F464","#81D4FA","#FD6A6A","#546E7A"],palette5:["#2B908F","#F9A3A4","#90EE7E","#FA4443","#69D2E7"],palette6:["#449DD1","#F86624","#EA3546","#662E9B","#C5D86D"],palette7:["#D7263D","#1B998B","#2E294E","#F46036","#E2C044"],palette8:["#662E9B","#F86624","#F9C80E","#EA3546","#43BCCD"],palette9:["#5C4742","#A5978B","#8D5B4C","#5A2A27","#C4BBAF"],palette10:["#A300D6","#7D02EB","#5653FE","#2983FF","#00B1F2"],cvdDeuteranopia:["#0072B2","#E69F00","#56B4E9","#009E73","#F0E442","#D55E00","#CC79A7"],cvdProtanopia:["#0077BB","#EE7733","#009988","#EE3377","#BBBBBB","#33BBEE","#CC3311"],cvdTritanopia:["#CC3311","#009988","#EE7733","#0077BB","#EE3377","#BBBBBB","#33BBEE"],highContrast:["#005A9C","#C00000","#007A33","#6C3483","#7B3F00","#0097A7","#4A235A"]}}static use(t){!function Ze(A){Object.assign(oe(),A)}(t)}static registerFeatures(t){Pt.registerFeatures(t)}toggleSeries(t){return this.series.toggleSeries(t)}highlightSeriesOnLegendHover(t,e){return this.series.toggleSeriesOnHover(t,e)}showSeries(t){this.series.showSeries(t)}hideSeries(t){this.series.hideSeries(t)}highlightSeries(t){this.series.highlightSeries(t)}isSeriesHidden(t){return this.series.isSeriesHidden(t)}resetSeries(t=!0,e=!0){this.series.resetSeries(t,e)}addEventListener(t,e){this.events.addEventListener(t,e)}removeEventListener(t,e){this.events.removeEventListener(t,e)}addXaxisAnnotation(t,e=!0,s=void 0){var i;let a=this;s&&(a=s),null==(i=a.annotations)||i.addXaxisAnnotationExternal(t,e,a)}addYaxisAnnotation(t,e=!0,s=void 0){var i;let a=this;s&&(a=s),null==(i=a.annotations)||i.addYaxisAnnotationExternal(t,e,a)}addPointAnnotation(t,e=!0,s=void 0){var i;let a=this;s&&(a=s),null==(i=a.annotations)||i.addPointAnnotationExternal(t,e,a)}clearAnnotations(t=void 0){var e;let s=this;t&&(s=t),null==(e=s.annotations)||e.clearAnnotations(s)}removeAnnotation(t,e=void 0){var s;let i=this;e&&(i=e),null==(s=i.annotations)||s.removeAnnotation(i,t)}getChartArea(){return this.w.dom.baseEl.querySelector(".apexcharts-inner")}getSeriesTotalXRange(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}getHighestValueInSeries(t=0){return new Nt(this.w).getMinYMaxY(t).highestY}getLowestValueInSeries(t=0){return new Nt(this.w).getMinYMaxY(t).lowestY}getSeriesTotal(){return this.w.globals.seriesTotals}getState(){const t=this.w,e=t.globals;return{series:t.seriesData.series,seriesNames:t.seriesData.seriesNames,colors:e.colors,labels:t.labelData.labels,seriesTotals:e.seriesTotals,seriesPercent:e.seriesPercent,seriesXvalues:e.seriesXvalues,seriesYvalues:e.seriesYvalues,minX:e.minX,maxX:e.maxX,minY:e.minY,maxY:e.maxY,minYArr:e.minYArr,maxYArr:e.maxYArr,minXDiff:e.minXDiff,dataPoints:e.dataPoints,xAxisScale:e.xAxisScale,yAxisScale:e.yAxisScale,xTickAmount:e.xTickAmount,isXNumeric:t.axisFlags.isXNumeric,seriesYAxisMap:e.seriesYAxisMap,seriesYAxisReverseMap:e.seriesYAxisReverseMap,svgWidth:e.svgWidth,svgHeight:e.svgHeight,gridWidth:t.layout.gridWidth,gridHeight:t.layout.gridHeight,selectedDataPoints:t.interact.selectedDataPoints,collapsedSeriesIndices:e.collapsedSeriesIndices,zoomed:t.interact.zoomed,seriesX:t.seriesData.seriesX,seriesZ:t.seriesData.seriesZ,seriesCandleO:t.candleData.seriesCandleO,seriesCandleH:t.candleData.seriesCandleH,seriesCandleM:t.candleData.seriesCandleM,seriesCandleL:t.candleData.seriesCandleL,seriesCandleC:t.candleData.seriesCandleC,seriesRangeStart:t.rangeData.seriesRangeStart,seriesRangeEnd:t.rangeData.seriesRangeEnd,seriesGoals:t.seriesData.seriesGoals}}toggleDataPointSelection(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}zoomX(t,e){var s;null==(s=this.ctx.toolbar)||s.zoomUpdateOptions(t,e)}setLocale(t){this.localization.setCurrentLocaleValues(t)}
1dataURI(t){if(!this.ctx.exports)throw new Error("apexcharts: Exports feature is not registered. Import apexcharts/features/exports.");return this.ctx.exports.dataURI(t)}getSvgString(t){if(!this.ctx.exports)throw new Error("apexcharts: Exports feature is not registered. Import apexcharts/features/exports.");return this.ctx.exports.getSvgString(t)}exportToCSV(t={}){if(!this.ctx.exports)throw new Error("apexcharts: Exports feature is not registered. Import apexcharts/features/exports.");return this.ctx.exports.exportToCSV(t)}paper(){return this.w.dom.Paper}_writeParsedSeriesData(t){Object.assign(this.w.seriesData,t)}_writeParsedRangeData(t){Object.assign(this.w.rangeData,t)}_writeParsedCandleData(t){Object.assign(this.w.candleData,t)}_writeParsedLabelData(t){Object.assign(this.w.labelData,t)}_writeParsedAxisFlags(t){Object.assign(this.w.axisFlags,t)}_writeLayoutCoords(t){Object.assign(this.w.layout,t)}_parentResizeCallback(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}_windowResize(){this.w.globals.resizeTimer=window.setTimeout(()=>{this.w.globals.resized=!0,this.w.globals.dataChanged=!1,this.ctx.update()},150)}_windowResizeHandler(){var t;clearTimeout(null!=(t=this.w.globals.resizeTimer)?t:void 0);let{redrawOnWindowResize:e}=this.w.config.chart;"function"==typeof e&&(e=e()),e&&this._windowResize()}}const be=".apexcharts-flip-y {\n transform: scaleY(-1) translateY(-100%);\n transform-origin: top;\n transform-box: fill-box;\n}\n.apexcharts-flip-x {\n transform: scaleX(-1);\n transform-origin: center;\n transform-box: fill-box;\n}\n.apexcharts-legend {\n display: flex;\n overflow: auto;\n padding: 0 10px;\n}\n.apexcharts-legend.apexcharts-legend-group-horizontal {\n flex-direction: column;\n}\n.apexcharts-legend-group {\n display: flex;\n}\n.apexcharts-legend-group-vertical {\n flex-direction: column-reverse;\n}\n.apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\n flex-wrap: wrap\n}\n.apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n flex-direction: column;\n bottom: 0;\n}\n.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n justify-content: flex-start;\n align-items: flex-start;\n}\n.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\n justify-content: center;\n align-items: center;\n}\n.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\n justify-content: flex-end;\n align-items: flex-end;\n}\n.apexcharts-legend-series {\n cursor: pointer;\n line-height: normal;\n display: flex;\n align-items: center;\n}\n.apexcharts-legend-text {\n position: relative;\n font-size: 14px;\n}\n.apexcharts-legend-text *, .apexcharts-legend-marker * {\n pointer-events: none;\n}\n.apexcharts-legend-marker {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin-right: 1px;\n}\n\n.apexcharts-legend-series.apexcharts-no-click {\n cursor: auto;\n}\n.apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\n display: none !important;\n}\n.apexcharts-inactive-legend {\n opacity: 0.45;\n} ";class me{constructor(t,e){this.w=t,this.ctx=e}svgStringToNode(t){return(new DOMParser).parseFromString(t,"image/svg+xml").documentElement}scaleSvgNode(t,e){const s=parseFloat(t.getAttributeNS(null,"width")),i=parseFloat(t.getAttributeNS(null,"height"));t.setAttributeNS(null,"width",s*e),t.setAttributeNS(null,"height",i*e),t.setAttributeNS(null,"viewBox","0 0 "+s+" "+i)}getSvgString(t){return new Promise(e=>{const s=this.w;let i=t||s.config.chart.toolbar.export.scale||s.config.chart.toolbar.export.width/s.globals.svgWidth;i||(i=1);const a=s.globals.svgWidth*i,o=s.globals.svgHeight*i,r=s.dom.elWrap.cloneNode(!0);r.style.width=a+"px",r.style.height=o+"px";const n=(new XMLSerializer).serializeToString(r);let l="\n .apexcharts-tooltip, .apexcharts-toolbar, .apexcharts-xaxistooltip, .apexcharts-yaxistooltip, .apexcharts-xcrosshairs, .apexcharts-ycrosshairs, .apexcharts-zoom-rect, .apexcharts-selection-rect {\n display: none;\n }\n ";s.config.legend.show&&s.dom.elLegendWrap&&s.dom.elLegendWrap.children.length>0&&(l+=be);let h=`\n <svg xmlns="http://www.w3.org/2000/svg"\n version="1.1"\n xmlns:xlink="http://www.w3.org/1999/xlink"\n class="apexcharts-svg"\n xmlns:data="ApexChartsNS"\n transform="translate(0, 0)"\n width="${s.globals.svgWidth}px" height="${s.globals.svgHeight}px">\n <foreignObject width="100%" height="100%">\n <div xmlns="http://www.w3.org/1999/xhtml" style="width:${a}px; height:${o}px;">\n <style type="text/css">\n ${l}\n </style>\n ${n}\n </div>\n </foreignObject>\n </svg>\n `;const d=this.svgStringToNode(h);1!==i&&this.scaleSvgNode(d,i),this.convertImagesToBase64(d).then(()=>{h=(new XMLSerializer).serializeToString(d),e(h.replace(/ /g," "))})})}convertImagesToBase64(t){const e=t.getElementsByTagName("image"),s=Array.from(e).map(i=>{const a=i.getAttributeNS("http://www.w3.org/1999/xlink","href");return a&&!a.startsWith("data:")?this.getBase64FromUrl(a).then(o=>{i.setAttributeNS("http://www.w3.org/1999/xlink","href",o)}).catch(o=>{console.error("Error converting image to base64:",o)}):Promise.resolve()});return Promise.all(s)}getBase64FromUrl(t){return _.isSSR()?Promise.resolve(t):new Promise((e,s)=>{const i=new Image;i.crossOrigin="Anonymous",i.onload=()=>{const a=document.createElement("canvas");a.width=i.width,a.height=i.height;const o=a.getContext("2d");o&&o.drawImage(i,0,0),e(a.toDataURL())},i.onerror=s,i.src=t})}svgUrl(){return new Promise(t=>
1{this.getSvgString().then(e=>{const s=new Blob([e],{type:"image/svg+xml;charset=utf-8"});t(URL.createObjectURL(s))})})}dataURI(t){return _.isSSR()?Promise.resolve({imgURI:""}):new Promise(e=>{const s=this.w,i=t?t.scale||t.width/s.globals.svgWidth:1,a=document.createElement("canvas");a.width=s.globals.svgWidth*i,a.height=parseInt(s.dom.elWrap.style.height,10)*i;const o="transparent"!==s.config.chart.background&&s.config.chart.background?s.config.chart.background:"#fff",r=a.getContext("2d");r&&(r.fillStyle=o,r.fillRect(0,0,a.width*i,a.height*i),this.getSvgString(i).then(n=>{const c="data:image/svg+xml,"+encodeURIComponent(n),l=new Image;l.crossOrigin="anonymous",l.onload=()=>{if(r.drawImage(l,0,0),a.msToBlob){const d=a.msToBlob();e({blob:d})}else{const d=a.toDataURL("image/png");e({imgURI:d})}},l.src=c}))})}exportToSVG(){this.svgUrl().then(t=>{this.triggerDownload(t,this.w.config.chart.toolbar.export.svg.filename,".svg")})}exportToPng(){const t=this.w.config.chart.toolbar.export.scale,e=this.w.config.chart.toolbar.export.width;this.dataURI(t?{scale:t}:e?{width:e}:void 0).then(({imgURI:i,blob:a})=>{a?navigator.msSaveOrOpenBlob(a,this.w.globals.chartID+".png"):this.triggerDownload(i,this.w.config.chart.toolbar.export.png.filename,".png")})}exportToCSV({series:t,fileName:e,columnDelimiter:s=",",lineDelimiter:i="\n"}){const a=this.w;t||(t=a.config.series);let o=[];const r=[];let n="";const l=a.seriesData.series.map((m,y)=>-1===a.globals.collapsedSeriesIndices.indexOf(y)?m:[]),h=m=>"function"==typeof a.config.chart.toolbar.export.csv.categoryFormatter?a.config.chart.toolbar.export.csv.categoryFormatter(m):"datetime"===a.config.xaxis.type&&String(m).length>=10?new Date(m).toDateString():D.isNumber(m)?m:m.split(s).join(""),d=m=>"function"==typeof a.config.chart.toolbar.export.csv.valueFormatter?a.config.chart.toolbar.export.csv.valueFormatter(m):m,f=Math.max(...t.map(m=>m.data?m.data.length:0)),p=new vt(this.w),g=new rt(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale}),u=m=>{let y="";if(a.globals.axisCharts){if("category"===a.config.xaxis.type||a.config.xaxis.convertedCatToNumeric)if(a.globals.isBarHorizontal){const v=a.formatters.yLabelFormatters[0],L=new Z(this.ctx.w).getActiveConfigSeriesIndex();y=v(a.labelData.labels[m],{seriesIndex:L,dataPointIndex:m,w:a})}else y=g.getLabel(a.labelData.labels,a.labelData.timescaleLabels,0,m).text;"datetime"===a.config.xaxis.type&&(a.config.xaxis.categories.length?y=a.config.xaxis.categories[m]:a.config.labels.length&&(y=a.config.labels[m]))}else y=a.config.labels[m];return null===y?"nullvalue":(Array.isArray(y)&&(y=y.join(" ")),D.isNumber(y)?y:y.split(s).join(""))};o.push(a.config.chart.toolbar.export.csv.headerCategory),"boxPlot"===a.config.chart.type?(o.push("minimum"),o.push("q1"),o.push("median"),o.push("q3"),o.push("maximum")):"candlestick"===a.config.chart.type?(o.push("open"),o.push("high"),o.push("low"),o.push("close")):"rangeBar"===a.config.chart.type?(o.push("minimum"),o.push("maximum")):t.map((m,y)=>{const v=(m.name?m.name:`series-${y}`)+"";a.globals.axisCharts&&o.push(v.split(s).join("")?v.split(s).join(""):`series-${y}`)}),a.globals.axisCharts||(o.push(a.config.chart.toolbar.export.csv.headerValue),r.push(o.join(s))),a.globals.allSeriesHasEqualX||!a.globals.axisCharts||a.config.xaxis.categories.length||a.config.labels.length?t.map((m,y)=>{a.globals.axisCharts?((m,y)=>{var v;if(o.length&&0===y&&r.push(o.join(s)),m.data){m.data=m.data.length&&m.data||[...Array(f)].map(()=>"");for(let C=0;C<m.data.length;C++){o=[];let L=u(C);if("nullvalue"!==L){if(L||(p.isFormatXY()?L=t[y].data[C].x:p.isFormat2DArray()&&(L=t[y].data[C]?t[y].data[C][0]:"")),0===y){o.push(h(L));for(let k=0;k<a.seriesData.series.length;k++){const S=p.isFormatXY()?null==(v=t[k].data[C])?void 0:v.y:l[k][C];o.push(d(S))}}("candlestick"===a.config.chart.type||m.type&&"candlestick"===m.type)&&(o.pop(),o.push(a.candleData.seriesCandleO[y][C]),o.push(a.candleData.seriesCandleH[y][C]),o.push(a.candleData.seriesCandleL[y][C]),o.push(a.candleData.seriesCandleC[y][C])),("boxPlot"===a.config.chart.type||m.type&&"boxPlot"===m.type)&&(o.pop(),o.push(a.candleData.seriesCandleO[y][C]),o.push(a.candleData.seriesCandleH[y][C]),o.push(a.candleData.seriesCandleM[y][C]),o.push(a.candleData.seriesCandleL[y][C]),o.push(a.candleData.seriesCandleC[y][C])),"rangeBar"===a.config.chart.type&&(o.pop(),o.push(a.rangeData.seriesRangeStart[y][C]),o.push(a.rangeData.seriesRangeEnd[y][C])),o.length&&r.push(o.join(s))}}}})(m,y):(o=[],o.push(h(a.labelData.labels[y])),o.push(d(l[y])),r.push(o.join(s)))}):(()=>{const m=new Set,y={};t.forEach((v,C)=>{v?.data.forEach(L=>{let k,S;if(p.isFormatXY())k=L.x,S=L.y;else{if(!p.isFormat2DArray())return;k=L[0],S=L[1]}y[k]||(y[k]=Array(t.length).fill("")),y[k][C]=d(S),m.add(k)})}
1),o.length&&r.push(o.join(s)),Array.from(m).sort().forEach(v=>{r.push([h(v),y[v].join(s)])})})(),n+=r.join(i),this.triggerDownload("data:text/csv; charset=utf-8,"+encodeURIComponent("\ufeff"+n),e||a.config.chart.toolbar.export.csv.filename,".csv")}triggerDownload(t,e,s){if(_.isSSR())return;const i=document.createElement("a");i.href=t,i.download=(e||this.w.globals.chartID)+s,document.body.appendChild(i),i.click(),document.body.removeChild(i)}}ot.registerFeatures({exports:me});let Ds=class{constructor(t){this.w=t.w,this.lgCtx=t}getLegendStyles(){if(_.isSSR())return null;const t=document.createElement("style");t.setAttribute("type","text/css");const e=this.w.config.chart.nonce;e&&t.setAttribute("nonce",e);const s=document.createTextNode(be);return t.appendChild(s),t}getLegendDimensions(){const e=this.w.dom.baseEl.querySelector(".apexcharts-legend");if(!e)return{clwh:0,clww:0};const{width:s,height:i}=e.getBoundingClientRect();return{clwh:i,clww:s}}appendToForeignObject(){var t;const e=this.getLegendStyles();!1!==this.w.config.chart.injectStyleSheet&&e&&(null==(t=this.w.dom.elLegendForeign)||t.appendChild(e))}toggleDataSeries(t,e){var s,i;const a=this.w;if(a.globals.axisCharts||"radialBar"===a.config.chart.type){a.globals.resized=!0;let o=null,r=null;if(a.globals.risingSeries=[],a.globals.axisCharts){if(o=a.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${t}']`),!o)return;r=parseInt(null!=(s=o.getAttribute("data:realIndex"))?s:"",10)}else{if(o=a.dom.baseEl.querySelector(`.apexcharts-series[rel='${t+1}']`),!o)return;r=parseInt(null!=(i=o.getAttribute("rel"))?i:"",10)-1}if(e?[{cs:a.globals.collapsedSeries,csi:a.globals.collapsedSeriesIndices},{cs:a.globals.ancillaryCollapsedSeries,csi:a.globals.ancillaryCollapsedSeriesIndices}].forEach(c=>{this.riseCollapsedSeries(c.cs,c.csi,r)}):this.hideSeries({seriesEl:o,realIndex:r}),a.config.chart.accessibility.enabled){const n=a.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${t+1}"]`);if(n){const c=a.globals.collapsedSeriesIndices.includes(r)||a.globals.ancillaryCollapsedSeriesIndices.includes(r);n.setAttribute("aria-pressed",c?"true":"false");const l=n.querySelector(".apexcharts-legend-text");n.setAttribute("aria-label",`${l?l.textContent:a.seriesData.seriesNames[t]}, ${c?"hidden":"visible"}. Press Enter or Space to toggle.`)}}}else{const o=a.dom.Paper.findOne(` .apexcharts-series[rel='${t+1}'] path`),r=a.config.chart.type;if("pie"===r||"polarArea"===r||"donut"===r){const n=a.config.plotOptions.pie.donut.labels;new E(this.w).pathMouseDown(o,null),this.lgCtx.printDataLabelsInner(o.node,n)}if(a.config.chart.accessibility.enabled){const n=a.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${t+1}"]`);if(n){const c=a.globals.collapsedSeriesIndices.includes(t);n.setAttribute("aria-pressed",c?"true":"false");const l=n.querySelector(".apexcharts-legend-text");n.setAttribute("aria-label",`${l?l.textContent:a.seriesData.seriesNames[t]}, ${c?"hidden":"visible"}. Press Enter or Space to toggle.`)}}}}getSeriesAfterCollapsing({realIndex:t}){var e;const s=this.w,i=s.globals,a=D.clone(s.config.series);if(i.axisCharts){const o=s.config.yaxis[i.seriesYAxisReverseMap[t]],r={index:t,data:a[t].data.slice(),type:a[t].type||s.config.chart.type};if(o&&o.show&&o.showAlways)i.ancillaryCollapsedSeriesIndices.indexOf(t)<0&&(i.ancillaryCollapsedSeries.push(r),i.ancillaryCollapsedSeriesIndices.push(t));else if(i.collapsedSeriesIndices.indexOf(t)<0){i.collapsedSeries.push(r),i.collapsedSeriesIndices.push(t);const n=i.risingSeries.indexOf(t);i.risingSeries.splice(n,1)}}else i.collapsedSeries.push({index:t,data:a[t],type:null!=(e=s.config.series[t].type)?e:"line"}),i.collapsedSeriesIndices.push(t);return i.allSeriesCollapsed=i.collapsedSeries.length+i.ancillaryCollapsedSeries.length===s.config.series.length,this._getSeriesBasedOnCollapsedState(a)}hideSeries({seriesEl:t,realIndex:e}){const s=this.w,i=this.getSeriesAfterCollapsing({realIndex:e}),a=t.childNodes;for(let o=0;o<a.length;o++)a[o].classList.contains("apexcharts-series-markers-wrap")&&(a[o].classList.contains("apexcharts-hide")?a[o].classList.remove("apexcharts-hide"):a[o].classList.add("apexcharts-hide"));this.lgCtx.updateSeries(i,s.config.chart.animations.dynamicAnimation.enabled)}riseCollapsedSeries(t,e,s){const i=this.w;let a=D.clone(i.config.series);if(t.length>0){for(let o=0;o<t.length;o++)t[o].index===s&&(i.globals.axisCharts?a[s].data=t[o].data.slice():a[s]=t[o].data,"number"!=typeof a[s]&&(a[s].hidden=!1),t.splice(o,1),e.splice(o,1),i.globals.risingSeries.push(s),o--);a=this._getSeriesBasedOnCollapsedState(a),this.lgCtx.updateSeries(a,i.config.chart.animations.dynamicAnimation.enabled)}}_getSeriesBasedOnCollapsedState(t){const e=this.w;let s=0;return t.forEach(e.globals.axisCharts?(i,a)=>{e.globals.collapsedSeriesIndices.indexOf(a)<0&&e.globals.ancillaryCollapsedSeriesIndices.indexOf(a)<0||(t[a].data=[],s++)}:(i,a)=>{e.globals.collapsedSeriesIndices.indexOf(a)<0||(t[a]=0,s++)}),e.globals.allSeriesCollapsed=s===t.length,t}};ot.registerFeatures({legend:class Ts{constructor(t,e){this.w=t,this.ctx=e,this.printDataLabelsInner=(...s)=>{var i;return null==(i=e.pie)?void 0:i.printDataLabelsInner(...s)},this.updateSeries=(...s)=>e.updateHelpers._updateSeries(...s),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 Ds(this)}init(){const t=this.w,e=t.globals,s=t.config,i=s.legend.showForSingleSeries&&1===this.w.seriesData.series.length||this.isBarsDistributed||this.w.seriesData.series.length>1;if(this.legendHelpers.appendToForeignObject(),(i||!e.axisCharts)&&s.legend.show){const a=t.dom.elLegendWrap;for(;a.firstChild;)a.removeChild(a.firstChild);this.drawLegends(),"bottom"===s.legend.position||"top"===s.legend.position?this.legendAlignHorizontal():("right"===s.legend.position||"left"===s.legend.position)&&this.legendAlignVertical()}}
vendor: 4,280 bytes, line 1
1createLegendMarker({i:t,fillcolor:e}){const s=this.w,i=B.createElement("span");i.classList.add("apexcharts-legend-marker");const a=s.config.legend.markers.shape||s.config.markers.shape;let o=a;Array.isArray(a)&&(o=a[t]);const r=Array.isArray(s.config.legend.markers.size)?parseFloat(s.config.legend.markers.size[t]):parseFloat(s.config.legend.markers.size),n=Array.isArray(s.config.legend.markers.offsetX)?parseFloat(s.config.legend.markers.offsetX[t]):parseFloat(s.config.legend.markers.offsetX),c=Array.isArray(s.config.legend.markers.offsetY)?parseFloat(s.config.legend.markers.offsetY[t]):parseFloat(s.config.legend.markers.offsetY),l=Array.isArray(s.config.legend.markers.strokeWidth)?parseFloat(s.config.legend.markers.strokeWidth[t]):parseFloat(s.config.legend.markers.strokeWidth),h=i.style;if(h.height=2*(r+l)+"px",h.width=2*(r+l)+"px",h.left=n+"px",h.top=c+"px",s.config.legend.markers.customHTML)h.background="transparent",h.color=e[t],Array.isArray(s.config.legend.markers.customHTML)?s.config.legend.markers.customHTML[t]&&(i.innerHTML=s.config.legend.markers.customHTML[t]()):i.innerHTML=s.config.legend.markers.customHTML();else{const f=new pt(this.ctx.w,this.ctx).getMarkerConfig({cssClass:`apexcharts-legend-marker apexcharts-marker apexcharts-marker-${o}`,seriesIndex:t,strokeWidth:l,size:r}),g=(_.isBrowser()?window.SVG:global.SVG)().addTo(i).size("100%","100%"),u=new E(this.w).drawMarker(0,0,H(I({},f),{pointFillColor:Array.isArray(e)?e[t]:f.pointFillColor,shape:o}));s.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach(x=>{x.node.style.transform=x.node.classList.contains("apexcharts-marker-triangle")?"translate(50%, 45%)":"translate(50%, 50%)"}),g.add(u)}return i}drawLegends(){var t;const e=this,s=this.w,i=s.dom.elLegendWrap,a=s.config.legend.fontFamily;let o=s.seriesData.seriesNames,r=s.config.legend.markers.fillColors?s.config.legend.markers.fillColors.slice():s.globals.colors.slice();if("heatmap"===s.config.chart.type){const h=s.config.plotOptions.heatmap.colorScale.ranges;o=h.map(d=>d.name?d.name:d.from+" - "+d.to),r=h.map(d=>d.color)}else this.isBarsDistributed&&(o=s.labelData.labels.slice());s.config.legend.customLegendItems.length&&(o=s.config.legend.customLegendItems);const n=s.formatters.legendFormatter,c=s.config.legend.inverseOrder,l=[];s.labelData.seriesGroups.length>1&&s.config.legend.clusterGroupedSeries&&s.labelData.seriesGroups.forEach((h,d)=>{l[d]=B.createElement("div"),l[d].classList.add("apexcharts-legend-group",`apexcharts-legend-group-${d}`),"horizontal"===s.config.legend.clusterGroupedSeriesOrientation?i.classList.add("apexcharts-legend-group-horizontal"):l[d].classList.add("apexcharts-legend-group-vertical")});for(let h=c?o.length-1:0;c?h>=0:h<=o.length-1;c?h--:h++){const d=n(o[h],{seriesIndex:h,w:s});let f=!1,p=!1;if(s.globals.collapsedSeries.length>0)for(let m=0;m<s.globals.collapsedSeries.length;m++)s.globals.collapsedSeries[m].index===h&&(f=!0);if(s.globals.ancillaryCollapsedSeriesIndices.length>0)for(let m=0;m<s.globals.ancillaryCollapsedSeriesIndices.length;m++)s.globals.ancillaryCollapsedSeriesIndices[m]===h&&(p=!0);const g=this.createLegendMarker({i:h,fillcolor:r});E.setAttrs(g,{rel:h+1,"data:collapsed":f||p}),(f||p)&&g.classList.add("apexcharts-inactive-legend");const u=B.createElement("div");if(s.config.chart.accessibility.enabled&&s.config.chart.accessibility.keyboard.enabled){u.setAttribute("role","button"),u.setAttribute("tabindex","0");const m=Array.isArray(d)?d.join(" "):d,y=f||p;u.setAttribute("aria-label",`${m}, ${y?"hidden":"visible"}. Press Enter or Space to toggle.`),u.setAttribute("aria-pressed",y?"true":"false")}const b=B.createElement("span");b.classList.add("apexcharts-legend-text"),b.innerHTML=Array.isArray(d)?d.join(" "):d;let x=s.config.legend.labels.useSeriesColors?s.globals.colors[h]:Array.isArray(s.config.legend.labels.colors)?null==(t=s.config.legend.labels.colors)?void 0:t[h]:s.config.legend.labels.colors;x||(x=s.config.chart.foreColor),b.style.color=x,b.style.fontSize=s.config.legend.fontSize,b.style.fontWeight=s.config.legend.fontWeight,b.style.fontFamily=a||s.config.chart.fontFamily,E.setAttrs(b,{rel:h+1,i:h,"data:default-text":encodeURIComponent(d),"data:collapsed":f||p}),u.appendChild(g),u.appendChild(b);const w=new q(this.w);
vendor: 8,463 bytes, line 1
1s.config.legend.showForZeroSeries||0===w.getSeriesTotalByIndex(h)&&w.seriesHaveSameValues(h)&&!w.isSeriesNull(h)&&-1===s.globals.collapsedSeriesIndices.indexOf(h)&&-1===s.globals.ancillaryCollapsedSeriesIndices.indexOf(h)&&u.classList.add("apexcharts-hidden-zero-series"),s.config.legend.showForNullSeries||w.isSeriesNull(h)&&-1===s.globals.collapsedSeriesIndices.indexOf(h)&&-1===s.globals.ancillaryCollapsedSeriesIndices.indexOf(h)&&u.classList.add("apexcharts-hidden-null-series"),l.length?s.labelData.seriesGroups.forEach((m,y)=>{var v,C;m.includes(null!=(C=null==(v=s.config.series[h])?void 0:v.name)?C:"")&&(i.appendChild(l[y]),l[y].appendChild(u))}):i.appendChild(u),i.classList.add(`apexcharts-align-${s.config.legend.horizontalAlign}`),i.classList.add("apx-legend-position-"+s.config.legend.position),u.classList.add("apexcharts-legend-series"),u.style.margin=`${s.config.legend.itemMargin.vertical}px ${s.config.legend.itemMargin.horizontal}px`,i.style.width=s.config.legend.width?s.config.legend.width+"px":"",i.style.height=s.config.legend.height?s.config.legend.height+"px":"",E.setAttrs(u,{rel:h+1,seriesName:D.escapeString(o[h]),"data:collapsed":f||p}),(f||p)&&u.classList.add("apexcharts-inactive-legend"),s.config.legend.onItemClick.toggleDataSeries||u.classList.add("apexcharts-no-click")}s.dom.elWrap.addEventListener("click",e.onLegendClick,!0),s.config.legend.onItemHover.highlightDataSeries&&0===s.config.legend.customLegendItems.length&&(s.dom.elWrap.addEventListener("mousemove",e.onLegendHovered,!0),s.dom.elWrap.addEventListener("mouseout",e.onLegendHovered,!0)),s.config.chart.accessibility.enabled&&s.config.chart.accessibility.keyboard.enabled&&s.dom.elWrap.addEventListener("keydown",e.onLegendKeyDown.bind(e),!0)}setLegendWrapXY(t,e){const s=this.w,i=s.dom.elLegendWrap;let o=0,r=0;if("bottom"===s.config.legend.position)r=s.globals.svgHeight-Math.min(i.clientHeight,s.globals.svgHeight/2)-5;else if("top"===s.config.legend.position){const c=new Tt(this.w,this.ctx),l=c.dimHelpers.getTitleSubtitleCoords("title").height,h=c.dimHelpers.getTitleSubtitleCoords("subtitle").height;r=(l>0?l-10:0)+(h>0?h-10:0)}i.style.position="absolute",o=o+t+s.config.legend.offsetX,r=r+e+s.config.legend.offsetY,i.style.left=o+"px",i.style.top=r+"px","right"===s.config.legend.position&&(i.style.left="auto",i.style.right=25+s.config.legend.offsetX+"px"),["width","height"].forEach(c=>{i&&i.style[c]&&(i.style[c]=parseInt(String(s.config.legend[c]),10)+"px")})}legendAlignHorizontal(){const t=this.w;t.dom.elLegendWrap.style.right="0";const s=new Tt(this.w,this.ctx),i=s.dimHelpers.getTitleSubtitleCoords("title"),a=s.dimHelpers.getTitleSubtitleCoords("subtitle");let r=0;"top"===t.config.legend.position&&(r=i.height+a.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(20,r)}legendAlignVertical(){const t=this.w,e=this.legendHelpers.getLegendDimensions();let i=0;"left"===t.config.legend.position&&(i=20),"right"===t.config.legend.position&&(i=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(i,20)}onLegendHovered(t){var e;const s=this.w,i=t.target,a=i.classList.contains("apexcharts-legend-series")||i.classList.contains("apexcharts-legend-text")||i.classList.contains("apexcharts-legend-marker");if("heatmap"===s.config.chart.type||this.isBarsDistributed){if(a){const o=parseInt(null!=(e=i.getAttribute("rel"))?e:"0",10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,o,this.w]),new Z(this.ctx.w).highlightRangeInSeries(t,i)}}else!i.classList.contains("apexcharts-inactive-legend")&&a&&new Z(this.ctx.w).toggleSeriesOnHover(t,i)}onLegendKeyDown(t){const e=this,s=this.w,i=t.target;if((i.classList.contains("apexcharts-legend-series")||i.classList.contains("apexcharts-legend-text")||i.classList.contains("apexcharts-legend-marker"))&&("Enter"===t.key||" "===t.key)){t.preventDefault();const o=i.getAttribute("rel");e.onLegendClick(t),null!==o&&s.config.legend.onItemClick.toggleDataSeries&&requestAnimationFrame(()=>{const r=s.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${o}"]`);r&&r.focus()})}}onLegendClick(t){var e;const s=this.w,i=t.target;if(!s.config.legend.customLegendItems.length&&(i.classList.contains("apexcharts-legend-series")||i.classList.contains("apexcharts-legend-text")||i.classList.contains("apexcharts-legend-marker"))){const a=parseInt(null!=(e=i.getAttribute("rel"))?e:"0",10)-1,o="true"===i.getAttribute("data:collapsed"),r=this.w.config.chart.events.legendClick;"function"==typeof r&&r(this.ctx,a,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,a,this.w]);const n=this.w.config.legend.markers.onClick;"function"==typeof n&&i.classList.contains("apexcharts-legend-marker")&&(n(this.ctx,a,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,a,this.w])),"treemap"!==s.config.chart.type&&"heatmap"!==s.config.chart.type&&!this.isBarsDistributed&&s.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(a,o)}}}});class ye{constructor(t,e){this.w=t,this.ctx=e,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,this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elZoomReset=null,this.elMenuIcon=null,this.elMenu=null,this.elMenuItems=[],this.t=null}createToolbar(){const t=this.w,e=()=>B.createElementNS("http://www.w3.org/1999/xhtml","div"),s=e();if(s.setAttribute("class","apexcharts-toolbar"),s.style.top=t.config.chart.toolbar.offsetY+"px",s.style.right=3-t.config.chart.toolbar.offsetX+"px",t.dom.elWrap.appendChild(s),this.elZoom=e(),this.elZoomIn=e(),this.elZoomOut=e(),this.elPan=e(),this.elSelection=e(),this.elZoomReset=e(),this.elMenuIcon=e(),this.elMenu=e(),this.elCustomIcons=[],this.t=t.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(let r=0;r<this.t.customIcons.length;r++)this.elCustomIcons.push(e());const i=[],a=(r,n,c)=>{const l=r.toLowerCase();this.t[l]&&t.config.chart.zoom.enabled&&i.push({el:n,icon:"string"==typeof this.t[l]?this.t[l]:c,title:this.localeValues[r],class:`apexcharts-${l}-icon`})};a("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'),a("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');const o=r=>{this.t[r]&&t.config.chart[r].enabled&&i.push({el:"zoom"===r?this.elZoom:this.elSelection,icon:"string"==typeof this.t[r]?this.t[r]:"zoom"===r?'<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:this.localeValues["zoom"===r?"selectionZoom":"selection"],class:`apexcharts-${r}-icon`})};o("zoom"),o("selection"),this.t.pan&&t.config.chart.zoom.enabled&&i.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
10-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:"apexcharts-pan-icon"}),a("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&&i.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(let r=0;r<this.elCustomIcons.length;r++)i.push({el:this.elCustomIcons[r],icon:this.t.customIcons[r].icon,title:this.t.customIcons[r].title,index:this.t.customIcons[r].index,class:"apexcharts-toolbar-custom-icon "+this.t.customIcons[r].class});i.forEach((r,n)=>{r.index&&D.moveIndexInArray(i,n,r.index)});for(let r=0;r<i.length;r++)E.setAttrs(i[r].el,{class:i[r].class,title:i[r].title,tabindex:"0",role:"button","aria-label":i[r].title}),i[r].el.innerHTML=i[r].icon,s.appendChild(i[r].el);this.elZoom.parentNode&&this.elZoom.setAttribute("aria-pressed",String(!!t.interact.zoomEnabled)),this.elSelection.parentNode&&this.elSelection.setAttribute("aria-pressed",String(!!t.interact.selectionEnabled)),this.elPan.parentNode&&this.elPan.setAttribute("aria-pressed",String(!!t.interact.panEnabled)),this.elMenuIcon.parentNode&&(this.elMenuIcon.setAttribute("aria-haspopup","true"),this.elMenuIcon.setAttribute("aria-expanded","false")),this._createHamburgerMenu(s),t.interact.zoomEnabled?this.elZoom.classList.add(this.selectedClass):t.interact.panEnabled?this.elPan.classList.add(this.selectedClass):t.interact.selectionEnabled&&this.elSelection.classList.add(this.selectedClass),this.addToolbarEventListeners()}_createHamburgerMenu(t){this.elMenuItems=[],t.appendChild(this.elMenu),E.setAttrs(this.elMenu,{class:"apexcharts-menu",role:"menu"});const e=[{name:"exportSVG",title:this.localeValues.exportToSVG},{name:"exportPNG",title:this.localeValues.exportToPNG},{name:"exportCSV",title:this.localeValues.exportToCSV}];for(let s=0;s<e.length;s++)this.elMenuItems.push(B.createElementNS("http://www.w3.org/1999/xhtml","div")),this.elMenuItems[s].innerHTML=e[s].title,E.setAttrs(this.elMenuItems[s],{class:`apexcharts-menu-item ${e[s].name}`,title:e[s].title,role:"menuitem",tabindex:"-1"}),this.elMenu.appendChild(this.elMenuItems[s])}addToolbarEventListeners(){var t,e,s,i,a,o,r,n;null==(t=this.elZoomReset)||t.addEventListener("click",this.handleZoomReset.bind(this)),null==(e=this.elSelection)||e.addEventListener("click",this.toggleZoomSelection.bind(this,"selection")),null==(s=this.elZoom)||s.addEventListener("click",this.toggleZoomSelection.bind(this,"zoom")),null==(i=this.elZoomIn)||i.addEventListener("click",this.handleZoomIn.bind(this)),null==(a=this.elZoomOut)||a.addEventListener("click",this.handleZoomOut.bind(this)),null==(o=this.elPan)||o.addEventListener("click",this.togglePanning.bind(this)),null==(r=this.elMenuIcon)||r.addEventListener("click",this.toggleMenu.bind(this)),this.elMenuItems.forEach(l=>{l.classList.contains("exportSVG")?l.addEventListener("click",this.handleDownload.bind(this,"svg")):l.classList.contains("exportPNG")?l.addEventListener("click",this.handleDownload.bind(this,"png")):l.classList.contains("exportCSV")&&l.addEventListener("click",this.handleDownload.bind(this,"csv"))});for(let l=0;l<this.t.customIcons.length;l++)this.elCustomIcons[l].addEventListener("click",this.t.customIcons[l].click.bind(this,this.ctx,this.ctx.w));[this.elZoomReset,this.elSelection,this.elZoom,this.elZoomIn,this.elZoomOut,this.elPan,this.elMenuIcon,...this.elCustomIcons].forEach(l=>{l.addEventListener("keydown",h=>{if("Enter"===h.key||" "===h.key){h.preventDefault();const d=l.className;l.click(),requestAnimationFrame(()=>{const f=this.w.dom.baseEl;if(!f)return;const p=d.split(" ").find(u=>u.startsWith("apexcharts-"));if(!p)return;const g=f.querySelector(`.${p}`);
1g&&g.focus()})}})}),null==(n=this.elMenuIcon)||n.addEventListener("keydown",l=>{var h;("ArrowDown"===l.key||"ArrowUp"===l.key)&&(l.preventDefault(),null!=(h=this.elMenu)&&h.classList.contains("apexcharts-menu-open")||this.toggleMenu(),window.setTimeout(()=>{const d="ArrowDown"===l.key?0:this.elMenuItems.length-1;this.elMenuItems[d]&&this.elMenuItems[d].focus()},20))}),this.elMenuItems.forEach((l,h)=>{l.addEventListener("keydown",d=>{var f;"ArrowDown"===d.key?(d.preventDefault(),(this.elMenuItems[h+1]||this.elMenuItems[0]).focus()):"ArrowUp"===d.key?(d.preventDefault(),(this.elMenuItems[h-1]||this.elMenuItems[this.elMenuItems.length-1]).focus()):"Escape"===d.key||"Tab"===d.key?(this._closeMenu(),null==(f=this.elMenuIcon)||f.focus(),"Tab"===d.key||d.preventDefault()):("Enter"===d.key||" "===d.key)&&(d.preventDefault(),l.click())})})}toggleZoomSelection(t){this.ctx.getSyncedCharts().forEach(s=>{s.ctx.toolbar.toggleOtherControls();const i="selection"===t?s.ctx.toolbar.elSelection:s.ctx.toolbar.elZoom,a="selection"===t?"selectionEnabled":"zoomEnabled";s.w.globals[a]=!s.w.globals[a],i.classList.contains(s.ctx.toolbar.selectedClass)?i.classList.remove(s.ctx.toolbar.selectedClass):i.classList.add(s.ctx.toolbar.selectedClass),i.setAttribute("aria-pressed",String(s.w.globals[a]))})}getToolbarIconsReference(){const t=this.w;this.elZoom||(this.elZoom=t.dom.baseEl.querySelector(".apexcharts-zoom-icon")),this.elPan||(this.elPan=t.dom.baseEl.querySelector(".apexcharts-pan-icon")),this.elSelection||(this.elSelection=t.dom.baseEl.querySelector(".apexcharts-selection-icon"))}enableZoomPanFromToolbar(t){this.toggleOtherControls(),"pan"===t?this.w.interact.panEnabled=!0:this.w.interact.zoomEnabled=!0;const e="pan"===t?this.elPan:this.elZoom,s="pan"===t?this.elZoom:this.elPan;e&&e.classList.add(this.selectedClass),s&&s.classList.remove(this.selectedClass)}togglePanning(){this.ctx.getSyncedCharts().forEach(e=>{e.ctx.toolbar.toggleOtherControls(),e.w.interact.panEnabled=!e.w.interact.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),e.ctx.toolbar.elPan.setAttribute("aria-pressed",String(e.w.interact.panEnabled))})}toggleOtherControls(){const t=this.w;t.interact.panEnabled=!1,t.interact.zoomEnabled=!1,t.interact.selectionEnabled=!1,this.getToolbarIconsReference(),[this.elPan,this.elSelection,this.elZoom].forEach(s=>{s&&s.classList.remove(this.selectedClass)})}handleZoomIn(){const t=this.w;t.axisFlags.isRangeBar&&(this.minX=t.globals.minY,this.maxX=t.globals.maxY);const e=(this.minX+this.maxX)/2,a=this._getNewMinXMaxX((this.minX+e)/2,(this.maxX+e)/2);t.interact.disableZoomIn||this.zoomUpdateOptions(a.minX,a.maxX)}handleZoomOut(){const t=this.w;if(t.axisFlags.isRangeBar&&(this.minX=t.globals.minY,this.maxX=t.globals.maxY),"datetime"===t.config.xaxis.type&&new Date(this.minX).getUTCFullYear()<1e3)return;const e=(this.minX+this.maxX)/2,a=this._getNewMinXMaxX(this.minX-(e-this.minX),this.maxX-(e-this.maxX));t.interact.disableZoomOut||this.zoomUpdateOptions(a.minX,a.maxX)}_getNewMinXMaxX(t,e){const s=this.w.config.xaxis.convertedCatToNumeric;return{minX:s?Math.floor(t):t,maxX:s?Math.floor(e):e}}zoomUpdateOptions(t,e){const s=this.w;if(void 0===t&&void 0===e)return void this.handleZoomReset();if(s.config.xaxis.convertedCatToNumeric&&(t<1&&(t=1,e=s.globals.dataPoints),e-t<2))return;let i={min:t,max:e};const a=this.getBeforeZoomRange(i,void 0);a&&(i=a.xaxis);const o={xaxis:i};if(!s.globals.initialConfig)return;const r=D.clone(s.globals.initialConfig.yaxis);s.config.chart.group||(o.yaxis=r),this.w.interact.zoomed=!0,this.ctx.updateHelpers._updateOptions(o,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(i,r)}zoomCallback(t,e){"function"==typeof this.ev.zoomed&&(this.ev.zoomed(this.ctx,{xaxis:t,yaxis:e}),this.ctx.events.fireEvent("zoomed",{xaxis:t,yaxis:e}))}getBeforeZoomRange(t,e){let s=null;return"function"==typeof this.ev.beforeZoom&&(s=this.ev.beforeZoom(this,{xaxis:t,yaxis:e})),s}toggleMenu(){window.setTimeout(()=>{var t,e,s;null!=(t=this.elMenu)&&t.classList.contains("apexcharts-menu-open")?this._closeMenu():(null==(e=this.elMenu)||e.classList.add("apexcharts-menu-open"),null==(s=this.elMenuIcon)||s.setAttribute("aria-expanded","true"))},0)}_closeMenu(){var t,e;null==(t=this.elMenu)||t.classList.remove("apexcharts-menu-open"),null==(e=this.elMenuIcon)||e.setAttribute("aria-expanded","fal
1se")}handleDownload(t){const e=this.w,s=new me(this.w,this.ctx);switch(t){case"svg":s.exportToSVG();break;case"png":s.exportToPng();break;case"csv":s.exportToCSV({series:e.config.series,columnDelimiter:e.config.chart.toolbar.export.csv.columnDelimiter})}}handleZoomReset(){this.ctx.getSyncedCharts().forEach(e=>{const s=e.w;if(!s.interact.zoomed)return;if(s.globals.lastXAxis.min=s.globals.initialConfig.xaxis.min,s.globals.lastXAxis.max=s.globals.initialConfig.xaxis.max,e.updateHelpers.revertDefaultAxisMinMax(),"function"==typeof s.config.chart.events.beforeResetZoom){const a=s.config.chart.events.beforeResetZoom(e,s);a&&e.updateHelpers.revertDefaultAxisMinMax(a)}"function"==typeof s.config.chart.events.zoomed&&e.ctx.toolbar.zoomCallback({min:s.config.xaxis.min,max:s.config.xaxis.max});const i=e.ctx.series.emptyCollapsedSeries(D.clone(s.globals.initialSeries));e.updateHelpers._updateSeries(i,s.config.chart.animations.dynamicAnimation.enabled),s.interact.zoomed=!1})}destroy(){this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elZoomReset=null,this.elMenuIcon=null}}ot.registerFeatures({toolbar:ye,zoomPanSelection:class Is extends ye{constructor(t,e){super(t,e),this.w=t,this.ctx=e,this.dragged=!1,this.graphics=new E(this.w),this.eventList=["mousedown","mouseleave","mousemove","touchstart","touchmove","mouseup","touchend","wheel"],this.clientX=0,this.clientY=0,this.startX=0,this.endX=0,this.dragX=0,this.startY=0,this.endY=0,this.dragY=0,this.moveDirection="none",this.debounceTimer=null,this.debounceDelay=100,this.wheelDelay=400}init({xyRatios:t}){const e=this.w,s=this;this.xyRatios=t,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.gridRect=e.dom.baseEl.querySelector(".apexcharts-grid"),this.constraints=new Ie(0,0,e.layout.gridWidth,e.layout.gridHeight),this.zoomRect.node.classList.add("apexcharts-zoom-rect"),this.selectionRect.node.classList.add("apexcharts-selection-rect"),e.dom.Paper.add(this.zoomRect),e.dom.Paper.add(this.selectionRect),this.slDraggableRect="x"===e.config.chart.selection.type?this.selectionRect.draggable({minX:0,minY:0,maxX:e.layout.gridWidth,maxY:e.layout.gridHeight}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):"y"===e.config.chart.selection.type?this.selectionRect.draggable({minX:0,maxX:e.layout.gridWidth}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):this.selectionRect.draggable().on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")),this.preselectedSelection(),this.hoverArea=e.dom.baseEl.querySelector(`${e.globals.chartClass} .apexcharts-svg`),this.hoverArea&&(this.hoverArea.classList.add("apexcharts-zoomable"),this.eventList.forEach(i=>{var a;null==(a=this.hoverArea)||a.addEventListener(i,s.svgMouseEvents.bind(s,t),{capture:!1,passive:!0})}),e.config.chart.zoom.enabled&&e.config.chart.zoom.allowMouseWheelZoom&&this.hoverArea.addEventListener("wheel",s.mouseWheelEvent.bind(s),{capture:!1,passive:!1}))}destroy(){this.slDraggableRect&&(this.slDraggableRect.draggable(!1),this.slDraggableRect.off(),this.selectionRect.off()),this.selectionRect=null,this.zoomRect=null,this.gridRect=null}svgMouseEvents(t,e){var s;const i=this.w,a=this.ctx.toolbar,o=i.interact.zoomEnabled?i.config.chart.zoom.type:i.config.chart.selection.type,r=i.config.chart.toolbar.autoSelected;if(e.shiftKey?(this.shiftWasPressed=!0,a.enableZoomPanFromToolbar("pan"===r?"zoom":"pan")):this.shiftWasPressed&&(a.enableZoomPanFromToolbar(r),this.shiftWasPressed=!1),!e.target)return;const n=e.target.classList;let c;if(e.target.parentNode&&null!==e.target.parentNode&&(c=e.target.parentNode.classList),!(n.contains("apexcharts-legend-marker")||n.contains("apexcharts-legend-text")||c&&c.contains("apexcharts-toolbar"))){if(this.clientX="touchmove"===e.type||"touchstart"===e.type?e.touches[0].clientX:"touchend"===e.type?e.changedTouches[0].clientX:e.clientX,this.clientY="touchmove"===e.type||"touchstart"===e.type?e.touches[0].clientY:"touchend"===e.type?e.changedTouches[0].clientY:e.clientY,"mousedown"===e.type&&1===e.which||"touchstart"===e.type){const h=null==(s=this.gridRect)?void 0:s.getBoundingClientRect();if(!h)return;this.startX=this.clientX-h.left-i.globals.barPadForNumericAxis,this.startY=this.clientY-h.top,this.dragged=!1,this.w.interact.mousedown=!0}("mousemove"===e.type&&1===e.which||"touchmove"===e.type)&&(this.dragged=!0,i.interact.panEnabled?(i.interact.selection=null,this.w.interact.mousedown&&this.panDragging({context:this,zoomtype:o,xyRatios:t})):(this.w.interact.mousedown&&i.interact.zoomEnabled||this.w.interact.mousedown&&i.interact.selectionEnabled)&&(this.selection=this.selectionDrawing({context:this,zoomtype:o}))),("mouseup"===e.type||"touchend"===e.type||"mouseleave"===e.type)&&this.handleMouseUp({zoomtype:o}),this.makeSelectionRectDraggable()}}handleMouseUp({zoomtype:t,isResized:e}){var s;const i=this.w,a=null==(s=this.gridRect)?void 0:s.getBoundingClientRect();a&&(this.w.interact.mousedown||e)&&(this.endX=this.clientX-a.left-i.globals.barPadForNumericAxis,this.endY=this.clientY-a.top,this.dragX=Math.abs(this.endX-this.startX),this.dragY=Math.abs(this.endY-this.startY),(i.interact.zoomEnabled||i.interact.selectionEnabled)&&this.selectionDrawn({context:this,zoomtype:t})),i.interact.zoomEnabled&&this.hideSelectionRect(this.selectionRect),this.dragged=!1,this.w.interact.mousedown=!1}mouseWheelEvent(t){const e=this.w;t.preventDefault();const s=Date.now();s-e.interact.lastWheelExecution>this.wheelDelay&&(this.executeMouseWheelZoom(t),e.interact.lastWheelExecution=s),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{s-e.interact.lastWheelExecution>this.wheelDelay&&(this.executeMouseWheelZoom(t),e.interact.lastWheelExecution=s)},this.debounceDelay)}executeMouseWheelZoom(t){var e;const s=this.w;this.minX=s.axisFlags.isRangeBar?s.globals.minY:s.globals.minX,this.maxX=s.axisFlags.isRangeBar?s.globals.maxY:s.globals.maxX;const i=null==(e=this.gridRect)?void 0:e.getBoundingClientRect();if(!i)return;const o=this.minX,r=this.maxX,n=r-o;let h,d,f;if(t.deltaY<0){h=.5*n;const g=o+(t.clientX-i.left)/i.width*n;d=g-h/2,f=g+h/2}else h=1.5*n,d=o-h/2,f=r+h/2;if(!s.axisFlags.isRangeBar){d=Math.max(d,s.globals.initialMinX),f=Math.min(f,
1s.globals.initialMaxX);const g=.01*(s.globals.initialMaxX-s.globals.initialMinX);if(f-d<g){const u=(d+f)/2;d=u-g/2,f=u+g/2}}const p=this._getNewMinXMaxX(d,f);!isNaN(p.minX)&&!isNaN(p.maxX)&&this.zoomUpdateOptions(p.minX,p.maxX)}makeSelectionRectDraggable(){const t=this.w;if(!this.selectionRect)return;const e=this.selectionRect.node.getBoundingClientRect();e.width>0&&e.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:()=>{},updateRot:()=>{},createHandle:(s,i,a,o,r)=>"l"===r||"r"===r?s.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):s.circle(0),updateHandle:(s,i)=>s.center(i[0],i[1])}).resize().on("resize",()=>{this.handleMouseUp({zoomtype:t.interact.zoomEnabled?t.config.chart.zoom.type:t.config.chart.selection.type,isResized:!0})}))}preselectedSelection(){const t=this.w,e=this.xyRatios;if(!t.interact.zoomEnabled)if(typeof t.interact.selection<"u"&&null!==t.interact.selection)this.drawSelectionRect(H(I({},t.interact.selection),{translateX:t.layout.translateX,translateY:t.layout.translateY}));else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){let s=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,i=t.layout.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-s;t.axisFlags.isRangeBar&&(s=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/e.invertedYRatio,i=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/e.invertedYRatio),this.drawSelectionRect({x:s,y:0,width:i,height:t.layout.gridHeight,translateX:t.layout.translateX,translateY:t.layout.translateY,selectionEnabled:!0}),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}drawSelectionRect({x:t,y:e,width:s,height:i,translateX:a=0,translateY:o=0}){const r=this.w,n=this.zoomRect,c=this.selectionRect;if(this.dragged||null!==r.interact.selection){const l={transform:"translate("+a+", "+o+")"};r.interact.zoomEnabled&&this.dragged&&(s<0&&(s=1),n.attr({x:t,y:e,width:s,height:i,fill:r.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":r.config.chart.zoom.zoomedArea.fill.opacity,stroke:r.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":r.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":r.config.chart.zoom.zoomedArea.stroke.opacity}),E.setAttrs(n.node,l)),r.interact.selectionEnabled&&(c.attr({x:t,y:e,width:s>0?s:0,height:i>0?i:0,fill:r.config.chart.selection.fill.color,"fill-opacity":r.config.chart.selection.fill.opacity,stroke:r.config.chart.selection.stroke.color,"stroke-width":r.config.chart.selection.stroke.width,"stroke-dasharray":r.config.chart.selection.stroke.dashArray,"stroke-opacity":r.config.chart.selection.stroke.opacity}),E.setAttrs(c.node,l))}}hideSelectionRect(t){t&&t.attr({x:0,y:0,width:0,height:0})}selectionDrawing({context:t,zoomtype:e}){var s;const i=this.w,a=t,o=null==(s=this.gridRect)?void 0:s.getBoundingClientRect();if(!o)return;const r=a.startX-1,n=a.startY;let c=!1,l=!1;const h=a.clientX-o.left-i.globals.barPadForNumericAxis,d=a.clientY-o.top;let f=h-r,p=d-n,g={translateX:i.layout.translateX,translateY:i.layout.translateY};return Math.abs(f+r)>i.layout.gridWidth?f=i.layout.gridWidth-r:h<0&&(f=r),r>h&&(c=!0,f=Math.abs(f)),n>d&&(l=!0,p=Math.abs(p)),g="x"===e?{x:c?r-f:r,y:0,width:f,height:i.layout.gridHeight}:"y"===e?{x:0,y:l?n-p:n,width:i.layout.gridWidth,height:p}:{x:c?r-f:r,y:l?n-p:n,width:f,height:p},g=H(I({},g),{translateX:i.layout.translateX,translateY:i.layout.translateY}),a.drawSelectionRect(g),a.selectionDragging("resizing"),g}selectionDragging(t,e){var s;const i=this.w;if(!e)return;e.preventDefault();const{handler:a,box:o}=e.detail,r=this.constraints;let{x:n,y:c}=o;n<r.x&&(n=r.x),c<r.y&&(c=r.y),o.x2>r.x2&&(n=r.x2-o.w),o.y2>r.y2&&(c=r.y2-o.h),a.move(n,c);const l=this.xyRatios,h=this.selectionRect;let d=0;"resizing"===t&&(d=30);const f=g=>parseFloat(h.node.getAttribute(g)),p={x:f("x"),y:f("y"),width:f("width"),height:f("height")};i.interact.selection=p,"function"==typeof i.config.chart.events.selection&&i.interact.selectionEnabled&&(clearTimeout(null!=(s=this.w.globals.selectionResizeTimer)?s:void 0),this.w.globals.selectionResizeTimer=window.setTimeout(()=>{var g;const u=null==(g=this.gridRect)?void 0:g.getBoundingClientRect();if(!u)return;const b=h.node.getBoundingClientRect();let x,w,m,y;if(i.axisFlags.isRangeBar)x=i.globals.yAxisScale[0].niceMin+(b.left-u.left)*l.invertedYRatio,w=i.globals.yAxisScale[0].niceMin+(b.right-u.left)*l.invertedYRatio,m=0,y=1;else{if(!i.globals.xAxisScale)return;x=i.globals.xAxisScale.niceMin+(b.left-u.left)*l.xRatio,w=i.globals.xAxisScale.niceMin+(b.right-u.left)*l.xRatio,m=i.globals.yAxisScale[0].niceMin+(u.bottom-b.bottom)*l.yRatio[0],y=i.globals.yAxisScale[0].niceMax-(b.top-u.top)*l.y
1Ratio[0]}const v={xaxis:{min:x,max:w},yaxis:{min:m,max:y}};i.config.chart.events.selection(this.ctx,v),i.config.chart.brush.enabled&&void 0!==i.config.chart.events.brushScrolled&&i.config.chart.events.brushScrolled(this.ctx,v)},d))}selectionDrawn({context:t,zoomtype:e}){var s,i;const a=this.w,o=t,r=this.xyRatios,n=this.ctx.toolbar,c=a.interact.zoomEnabled?o.zoomRect.node.getBoundingClientRect():o.selectionRect.node.getBoundingClientRect(),l=o.gridRect.getBoundingClientRect(),h=c.left-l.left-a.globals.barPadForNumericAxis,d=c.right-l.left-a.globals.barPadForNumericAxis,f=c.top-l.top,p=c.bottom-l.top;let g,u;if(a.axisFlags.isRangeBar)g=a.globals.yAxisScale[0].niceMin+h*r.invertedYRatio,u=a.globals.yAxisScale[0].niceMin+d*r.invertedYRatio;else{const w=null!=(i=null==(s=a.globals.xAxisScale)?void 0:s.niceMin)?i:0;g=w+h*r.xRatio,u=w+d*r.xRatio}const b=[],x=[];if(a.config.yaxis.forEach((w,m)=>{const y=a.globals.seriesYAxisMap[m][0],C=a.globals.yAxisScale[m].niceMax-r.yRatio[y]*p;b.push(a.globals.yAxisScale[m].niceMax-r.yRatio[y]*f),x.push(C)}),o.dragged&&(o.dragX>10||o.dragY>10)&&g!==u)if(a.interact.zoomEnabled){if(!a.globals.initialConfig)return;let w=D.clone(a.globals.initialConfig.yaxis),m=D.clone(a.globals.initialConfig.xaxis);if(a.interact.zoomed=!0,a.config.xaxis.convertedCatToNumeric&&(g=Math.floor(g),u=Math.floor(u),g<1&&(g=1,u=a.globals.dataPoints),u-g<2&&(u=g+1)),("xy"===e||"x"===e)&&(m={min:g,max:u}
1),("xy"===e||"y"===e)&&w.forEach((v,C)=>{w[C].min=x[C],w[C].max=b[C]}),n){const v=n.getBeforeZoomRange(m,w);v&&(m=v.xaxis?v.xaxis:m,w=v.yaxis?v.yaxis:w)}const y={xaxis:m};a.config.chart.group||(y.yaxis=w),o.ctx.updateHelpers._updateOptions(y,!1,o.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof a.config.chart.events.zoomed&&n.zoomCallback(m,w)}else if(a.interact.selectionEnabled){let w=null,m=null;if(m={min:g,max:u},"xy"===e||"y"===e){const y=D.clone(a.config.yaxis);w=y,y.forEach((v,C)=>{y[C].min=x[C],y[C].max=b[C]})}a.interact.selection=o.selection,"function"==typeof a.config.chart.events.selection&&a.config.chart.events.selection(o.ctx,{xaxis:m,yaxis:w})}}panDragging({context:t}){var e;const s=this.w,i=t;if(typeof s.interact.lastClientPosition.x<"u"){const r=s.interact.lastClientPosition.x-i.clientX,n=(null!=(e=s.interact.lastClientPosition.y)?e:0)-i.clientY;Math.abs(r)>Math.abs(n)&&r>0?this.moveDirection="left":Math.abs(r)>Math.abs(n)&&r<0?this.moveDirection="right":Math.abs(n)>Math.abs(r)&&n>0?this.moveDirection="up":Math.abs(n)>Math.abs(r)&&n<0&&(this.moveDirection="down")}s.interact.lastClientPosition={x:i.clientX,y:i.clientY},i.panScrolled(s.axisFlags.isRangeBar?s.globals.minY:s.globals.minX,s.axisFlags.isRangeBar?s.globals.maxY:s.globals.maxX)}panScrolled(t,e){const s=this.w,i=this.xyRatios;if(!s.globals.initialConfig)return;const a=D.clone(s.globals.initialConfig.yaxis);let o=i.xRatio,r=s.globals.minX,n=s.globals.maxX;s.axisFlags.isRangeBar&&(o=i.invertedYRatio,r=s.globals.minY,n=s.globals.maxY),"left"===this.moveDirection?(t=r+s.layout.gridWidth/15*o,e=n+s.layout.gridWidth/15*o):"right"===this.moveDirection&&(t=r-s.layout.gridWidth/15*o,e=n-s.layout.gridWidth/15*o),s.axisFlags.isRangeBar||(t<s.globals.initialMinX||e>s.globals.initialMaxX)&&(t=r,e=n);const l={xaxis:{min:t,max:e}};s.config.chart.group||(l.yaxis=a),this.updateScrolledChart(l,t,e)}updateScrolledChart(t,e,s){const i=this.w;if(this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof i.config.chart.events.scrolled){const a={xaxis:{min:e,max:s}};i.config.chart.events.scrolled(this.ctx,a),this.ctx.events.fireEvent("scrolled",a)}}}});let Ft=class{constructor(t){this.w=t.w,this.annoCtx=t}setOrientations(t,e=null){var s,i;if("vertical"===t.label.orientation){const r=this.w.dom.baseEl.querySelector(`.apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='${null!==e?e:0}']`);if(null!==r){const n=r.getBBox();r.setAttribute("x",String(parseFloat(null!=(s=r.getAttribute("x"))?s:"0")-n.height+4));const c="top"===t.label.position?n.width:-n.width;r.setAttribute("y",String(parseFloat(null!=(i=r.getAttribute("y"))?i:"0")+c));const{x:l,y:h}=this.annoCtx.graphics.rotateAroundCenter(r);r.setAttribute("transform",`rotate(-90 ${l} ${h})`)}}}addBackgroundToAnno(t,e){const s=this.w;if(!t||!e.label.text||!String(e.label.text).trim())return null;const i=s.dom.baseEl.querySelector(".apexcharts-grid");if(!i)return null;const a=i.getBoundingClientRect(),o=i.getBBox(),r=a.width/o.width||1,n=t.getBoundingClientRect();let{left:c,right:l,top:h,bottom:d}=e.label.style.padding;"vertical"===e.label.orientation&&([h,d,c,l]=[c,l,h,d]);const g=this.annoCtx.graphics.drawRect((n.left-a.left)/r-c-s.globals.barPadForNumericAxis,(n.top-a.top)/r-h,n.width/r+c+l,n.height/r+h+d,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&g.node.classList.add(e.id),g}annotationsBackground(){const t=this.w,e=(s,i,a)=>{const o=t.dom.baseEl.querySelector(`.apexcharts-${a}-annotations .apexcharts-${a}-annotation-label[rel='${i}']`);if(o){const r=o.parentNode,n=this.addBackgroundToAnno(o,s);n&&(r?.insertBefore(n.node,o),s.label.mouseEnter&&n.node.addEventListener("mouseenter",s.label.mouseEnter.bind(this,s)),s.label.mouseLeave&&n.node.addEventListener("mouseleave",s.label.mouseLeave.bind(this,s)),s.label.click&&n.node.addEventListener("click",s.label.click.bind(this,s)))}};t.config.annotations.xaxis.forEach((s,i)=>e(s,i,"xaxis")),t.config.annotations.yaxis.forEach((s,i)=>
1e(s,i,"yaxis")),t.config.annotations.points.forEach((s,i)=>e(s,i,"point"))}getY1Y2(t,e){var s,i;const a=this.w,o="y1"===t?e.y:e.y2;let r,n=!1;if(this.annoCtx.invertAxis){const c=a.config.xaxis.convertedCatToNumeric?a.labelData.categoryLabels:a.labelData.labels,l=c.indexOf(o),h=a.dom.baseEl.querySelector(`.apexcharts-yaxis-texts-g text:nth-child(${l+1})`);r=h?parseFloat(null!=(s=h.getAttribute("y"))?s:"0"):(a.layout.gridHeight/c.length-1)*(l+1)-a.globals.barHeight,void 0!==e.seriesIndex&&a.globals.barHeight&&(r-=a.globals.barHeight/2*(a.seriesData.series.length-1)-a.globals.barHeight*e.seriesIndex)}else{const c=a.globals.seriesYAxisMap[e.yAxisIndex][0],l=a.config.yaxis[e.yAxisIndex].logarithmic?new q(this.w).getLogVal(a.config.yaxis[e.yAxisIndex].logBase,o,c)/a.globals.yLogRatio[c]:(o-a.globals.minYArr[c])/(a.globals.yRange[c]/a.layout.gridHeight);r=a.layout.gridHeight-Math.min(Math.max(l,0),a.layout.gridHeight),n=l>a.layout.gridHeight||l<0,e.marker&&null==e.y&&(r=0),null!=(i=a.config.yaxis[e.yAxisIndex])&&i.reversed&&(r=l)}return"string"==typeof o&&o.includes("px")&&(r=parseFloat(o)),{yP:r,clipped:n}}getX1X2(t,e){const s=this.w,i="x1"===t?e.x:e.x2,r=this.annoCtx.invertAxis?s.globals.yRange[0]:s.globals.xRange;let n=!1,c=this.annoCtx.inversedReversedAxis?((this.annoCtx.invertAxis?s.globals.maxY:s.globals.maxX)-i)/(r/s.layout.gridWidth):(i-(this.annoCtx.invertAxis?s.globals.minY:s.globals.minX))/(r/s.layout.gridWidth);return("category"===s.config.xaxis.type||s.config.xaxis.convertedCatToNumeric)&&!this.annoCtx.invertAxis&&!s.axisFlags.dataFormatXNumeric&&(s.config.chart.sparkline.enabled||(c=this.getStringX(i))),"string"==typeof i&&i.includes("px")&&(c=parseFloat(i)),null==i&&e.marker&&(c=s.layout.gridWidth),void 0!==e.seriesIndex&&s.globals.barWidth&&!this.annoCtx.invertAxis&&(c-=s.globals.barWidth/2*(s.seriesData.series.length-1)-s.globals.barWidth*e.seriesIndex),"number"!=typeof c&&(c=0,n=!0),parseFloat(c.toFixed(10))>parseFloat(s.layout.gridWidth.toFixed(10))?(c=s.layout.gridWidth,n=!0):c<0&&(c=0,n=!0),{x:c,clipped:n}}getStringX(t){var e;const s=this.w;let i=t;if(s.config.xaxis.convertedCatToNumeric&&s.labelData.categoryLabels.length){const r=String(t);t=s.labelData.categoryLabels.findIndex(n=>String(n)===r)+1}const a=s.labelData.labels.map(r=>Array.isArray(r)?r.join(" "):r).indexOf(t),o=s.dom.baseEl.querySelector(`.apexcharts-xaxis-texts-g text:nth-child(${a+1})`);return o&&(i=parseFloat(null!=(e=o.getAttribute("x"))?e:"0")),i}};class _s{constructor(t){this.w=t.w,this.annoCtx=t,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Ft(this.annoCtx)}addXaxisAnnotation(t,e,s){const i=this.w,a=this.helpers.getX1X2("x1",t);let o=a.x;const r=a.clipped;let c,n=!0;const l=t.label.text,h=t.strokeDashArray;if(D.isNumber(o)){if(null===t.x2||typeof t.x2>"u"){if(!r){const d=this.annoCtx.graphics.drawLine(o+t.offsetX,0+t.offsetY,o+t.offsetX,i.layout.gridHeight+t.offsetY,t.borderColor,h,t.borderWidth);e.appendChild(d.node),t.id&&d.node.classList.add(t.id)}}else{const d=this.helpers.getX1X2("x2",t);if(c=d.x,n=d.clipped,c<o){const p=o;o=c,c=p}const f=this.annoCtx.graphics.drawRect(o+t.offsetX,0+t.offsetY,c-o,i.layout.gridHeight+t.offsetY,0,t.fillColor,t.opacity,1,t.borderColor,h);f.node.classList.add("apexcharts-annotation-rect"),f.attr("clip-path",`url(#gridRectMask${i.globals.cuid})`),e.appendChild(f.node),t.id&&f.node.classList.add(t.id)}if(!r||!n){const d=this.annoCtx.graphics.getTextRects(l,t.label.style.fontSize),p=this.annoCtx.graphics.drawText({x:o+t.label.offsetX,y:("top"===t.label.position?4:"center"===t.label.position?i.layout.gridHeight/2+("vertical"===t.label.orientation?d.width/2:0):i.layout.gridHeight)+t.label.offsetY-("vertical"===t.label.orientation?"top"===t.label.position?d.width/2-12:-d.width/2:0),text:l,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:`apexcharts-xaxis-annotation-label ${t.label.style.cssClass} ${t.id?t.id:""}`});p.attr({rel:s}),e.appendChild(p.node),this.annoCtx.helpers.setOrientations(t,s)}}}drawXAxisAnnotations(){const t=this.w,e=this.annoCtx.graphics.group({class:"apexcharts-xaxis-annotations"});return t.config.annotations.xaxis.map((s,i)=>{this.addXaxisAnnotation(s,e.node,i)}),e}}class Ns{constructor(t){this.w=t.w,this.annoCtx=t,this.helpers=new Ft(this.annoCtx),this.axesUtils=new rt(this.annoCtx.w,{theme:this.annoCtx.theme,timeScale:this.annoCtx.timeScale})}addYaxisAnnotation(t,e,s){const i=this.w,a=t.strokeDashArray;let o=this.helpers.getY1Y2("y1",t),r=o.yP;const n=o.clipped;let c,l=!0,h=!1;const d=t.label.text;if(null===t.y2||typeof t.y2>"u"){if(!n){h=!0;const f=this.annoCtx.graphics.drawLine(0+t.offsetX,r+t.offsetY,this._getYAxisAnnotationWidth(t),r+t.offsetY,t.borderColor,a,t.borderWidth);e.appendChild(f.node),t.id&&f.node.classList.add(t.id)}}else{if(o=this.helpers.getY1Y2("y2",t),c=o.yP,l=o.clipped,c>r){const f=r;r=c,c=f}if(!n||!l){h=!0;const f=this.annoCtx.graphics.drawRect(0+t.offsetX,c+t.offsetY,this._getYAxisAnnotationWidth(t),r-c,0,t.fillColor,t.opacity,1,t.borderColor,a);f.node.classList.add("apexcharts-annotation-rect"),f.attr("clip-path",`url(#gridRectMask${i.globals.cuid})`),e.appendChild(f.node),t.id&&f.node.classList.add(t.id)}}if(h){const p=this.annoCtx.graphics.drawText({x:("right"===t.label.position?i.layout.gridWidth:"center"===t.label.position?i.layout.gridWidth/2:0)+t.label.offsetX,y:(c??r)+t.label.offsetY-3,text:d,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:`apexcharts-yaxis-annotation-label ${t.label.style.cssClass} ${t.id?t.id:""}`});p.attr({rel:s}),e.appendChild(p.node)}}_getYAxisAnnotationWidth(t){const e=this.w;let s=e.layout.gridWidth;return s=t.width.indexOf("%")>-1?e.layout.gridWidth*parseInt(t.width,10)/100:parseInt(t.width,10),s+t.offsetX}drawYAxisAnnotations(){const t=this.w,e=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return t.config.annotations.yaxis.forEach((s,i)=>{s.yAxisIndex=this.axesUtils.translateYAxisIndex(s.yAxisIndex),this.axesUtils.isYAxisHidden(s.yAxisIndex)&&this.axesUtils.yAxisAllSeriesCollapsed(s.yAxisIndex)||this.addYaxisAnnotation(s,e.node,i)}),e}}class Bs{constructor(t){this.w=t.w,this.annoCtx=t,this.helpers=new Ft(this.annoCtx)}addPointAnnotation(t,e,s){if(this.w.globals.collapsedSeriesIndices.indexOf(t.seriesIndex)>-1)return;const a=this.helpers.getX1X2("x1",t),o=a.x,r=a.clipped,n=this.helpers.getY1Y2("y1",t),c=n.yP,l=n.clipped;if(D.isNumber(o)&&!l&&!r){let d=this.annoCtx.graphics.drawMarker(o+t.marker.offsetX,c+t.marker.offsetY,{pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radiu
vendor: 4,870 bytes, line 1
1s,class:`apexcharts-point-annotation-marker ${t.marker.cssClass} ${t.id?t.id:""}`});e.appendChild(d.node);const f=t.label.text?t.label.text:"",p=this.annoCtx.graphics.drawText({x:o+t.label.offsetX,y:c+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:f,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:`apexcharts-point-annotation-label ${t.label.style.cssClass} ${t.id?t.id:""}`});if(p.attr({rel:s}),e.appendChild(p.node),t.customSVG.SVG){const g=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});g.attr({transform:`translate(${o+t.customSVG.offsetX}, ${c+t.customSVG.offsetY})`}),g.node.innerHTML=t.customSVG.SVG,e.appendChild(g.node)}if(t.image.path){const g=t.image.width?t.image.width:20,u=t.image.height?t.image.height:20;d=this.annoCtx.addImage({x:o+t.image.offsetX-g/2,y:c+t.image.offsetY-u/2,width:g,height:u,path:t.image.path,appendTo:".apexcharts-point-annotations"})}t.mouseEnter&&d.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&d.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t)),t.click&&d.node.addEventListener("click",t.click.bind(this,t))}}drawPointAnnotations(){const t=this.w,e=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return t.config.annotations.points.map((s,i)=>{this.addPointAnnotation(s,e.node,i)}),e}}ot.registerFeatures({annotations:class zs{constructor(t,{theme:e=null,timeScale:s=null}={}){this.w=t,this.theme=e,this.timeScale=s,this.invertAxis=void 0,this.inversedReversedAxis=void 0,this.graphics=new E(this.w),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new Ft(this),this.xAxisAnnotations=new _s(this),this.yAxisAnnotations=new Ns(this),this.pointsAnnotations=new Bs(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.layout.gridWidth/this.w.globals.dataPoints}drawAxesAnnotations(){const t=this.w;if(t.globals.axisCharts&&t.globals.dataPoints){const e=this.yAxisAnnotations.drawYAxisAnnotations(),s=this.xAxisAnnotations.drawXAxisAnnotations(),i=this.pointsAnnotations.drawPointAnnotations(),a=t.config.chart.animations.enabled,o=[e,s,i],r=[s.node,e.node,i.node];for(let n=0;n<3;n++)t.dom.elGraphical.add(o[n]),a&&!t.globals.resized&&!t.globals.dataChanged&&"scatter"!==t.config.chart.type&&"bubble"!==t.config.chart.type&&t.globals.dataPoints>1&&r[n].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:r[n],index:0});this.helpers.annotationsBackground()}}drawImageAnnos(){this.w.config.annotations.images.map(e=>{this.addImage(e)})}drawTextAnnos(){this.w.config.annotations.texts.map(e=>{this.addText(e)})}addXaxisAnnotation(t,e,s){this.xAxisAnnotations.addXaxisAnnotation(t,e,s)}addYaxisAnnotation(t,e,s){this.yAxisAnnotations.addYaxisAnnotation(t,e,s)}addPointAnnotation(t,e,s){this.pointsAnnotations.addPointAnnotation(t,e,s)}addText(t){const{x:e,y:s,text:i,textAnchor:a,foreColor:o,fontSize:r,fontFamily:n,fontWeight:c,cssClass:l,backgroundColor:h,borderWidth:d,strokeDashArray:f,borderRadius:p,borderColor:g,appendTo:u=".apexcharts-svg",paddingLeft:b=4,paddingRight:x=4,paddingBottom:w=2,paddingTop:m=2}=t,y=this.w,v=this.graphics.drawText({x:e,y:s,text:i,textAnchor:a||"start",fontSize:r||"12px",fontWeight:c||"regular",fontFamily:n||y.config.chart.fontFamily,foreColor:o||y.config.chart.foreColor,cssClass:l}),C=y.dom.baseEl.querySelector(u);C&&C.appendChild(v.node);const L=v.bbox();if(i){const k=this.graphics.drawRect(L.x-b,L.y-m,L.width+b+x,L.height+w+m,p,h||"transparent",1,d,g,f);C.insertBefore(k.node,v.node)}}addImage(t){const e=this.w,{path:s,x:i=0,y:a=0,width:o=20,height:r=20,appendTo:n=".apexcharts-svg"}=t,c=e.dom.Paper.image(s);c.size(o,r).move(i,a);const l=e.dom.baseEl.querySelector(n);return l&&l.appendChild(c.node),c}addXaxisAnnotationExternal(t,e,s){return this.addAnnotationExternal({params:t,pushToMemory:e,context:s,type:"xaxis",contextMethod:s.addXaxisAnnotation}),s}addYaxisAnnotationExternal(t,e,s){return this.addAnnotationExternal({params:t,pushToMemory:e,context:s,type:"yaxis",contextMethod:s.addYaxisAnnotation}),s}addPointAnnotationExternal(t,e,s){return typeof this.invertAxis>"u"&&(this.invertAxis=s.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:s,type:"point",contextMethod:s.addPointAnnotation}),s}addAnnotationExternal({params:t,pushToMemory:e,context:s,type:i,contextMethod:a}){const o=s,r=o.w,n=r.dom.baseEl.querySelector(`.apexcharts-${i}-annotations`),c=n.childNodes.length+1,l=new ct,h=Object.assign({},"xaxis"===i?l.xAxisAnnotation:"yaxis"===i?l.yAxisAnnotation:l.pointAnnotation),d=D.extend(h,t);switch(i){case"xaxis":this.addXaxisAnnotation(d,n,c);break;
1case"yaxis":this.addYaxisAnnotation(d,n,c);break;case"point":this.addPointAnnotation(d,n,c)}const f=r.dom.baseEl.querySelector(`.apexcharts-${i}-annotations .apexcharts-${i}-annotation-label[rel='${c}']`),p=this.helpers.addBackgroundToAnno(f,d);return p&&n.insertBefore(p.node,f),e&&r.globals.memory.methodsToExec.push({context:o,id:d.id?d.id:D.randomId(),method:a,label:"addAnnotation",params:t}),s}clearAnnotations(t){const e=t.w,s=e.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations");for(let i=e.globals.memory.methodsToExec.length-1;i>=0;i--)("addText"===e.globals.memory.methodsToExec[i].label||"addAnnotation"===e.globals.memory.methodsToExec[i].label)&&e.globals.memory.methodsToExec.splice(i,1);Array.prototype.forEach.call(s,i=>{for(;i.firstChild;)i.removeChild(i.firstChild)})}removeAnnotation(t,e){const s=t.w,i=s.dom.baseEl.querySelectorAll(`.${e}`);i&&(s.globals.memory.methodsToExec.map((a,o)=>{a.id===e&&s.globals.memory.methodsToExec.splice(o,1)}),Object.keys(s.config.annotations).forEach(a=>{const o=s.config.annotations[a];Array.isArray(o)&&(s.config.annotations[a]=o.filter(r=>r.id!==e))}),Array.prototype.forEach.call(i,a=>{a.parentElement.removeChild(a)}))}}}),ot.registerFeatures({keyboardNavigation:class Os{constructor(t,e){this.w=t,this.ctx=e,this.seriesIndex=0,this.dataPointIndex=0,this.active=!1,this._focusedEl=null,this._hoveredBarEl=null,this._enlargedScatterMarker=null,this._onKeyDown=this._onKeyDown.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this),this._onLegendClick=this._onLegendClick.bind(this)}init(){const e=this.w.dom.Paper.node;e&&(e.setAttribute("tabindex","0"),e.addEventListener("focus",this._onFocus),e.addEventListener("blur",this._onBlur),e.addEventListener("keydown",this._onKeyDown,{passive:!1}),this.ctx.events.addEventListener("legendClick",this._onLegendClick))}destroy(){const t=this.w,e=t.dom.Paper&&t.dom.Paper.node;e&&(e.removeEventListener("focus",this._onFocus),e.removeEventListener("blur",this._onBlur),e.removeEventListener("keydown",this._onKeyDown),this.ctx.events.removeEventListener("legendClick",this._onLegendClick))}handleKey(t){}_onFocus(){this._isNavEnabled()&&(this.active=!0,this._clampCursor(),this._snapToVisibleRange(),this._showCurrentPoint())}_onBlur(){this.active=!1,this._hideFocus()}_onLegendClick(){this.active&&(this.active=!1,this._hideFocus())}_onKeyDown(t){if(this._isNavEnabled()&&this.active)switch(t.key){case"ArrowRight":t.preventDefault(),this._move(0,1);break;case"ArrowLeft":t.preventDefault(),this._move(0,-1);break;case"ArrowUp":t.preventDefault(),this._move(-1,0);break;case"ArrowDown":t.preventDefault(),this._move(1,0);break;case"Home":t.preventDefault(),this.dataPointIndex=0,this._skipNullForward(),this._showCurrentPoint();break;case"End":t.preventDefault(),this.dataPointIndex=this._getDataPointCount(this.seriesIndex)-1,this._skipNullBackward(),this._showCurrentPoint();break;case"Enter":case" ":t.preventDefault(),this._fireClick();break;case"Escape":t.preventDefault(),this.active=!1,this._hideFocus()}}_move(t,e){const s=this.w,i=s.config.chart.accessibility.keyboard.navigation.wrapAround;if(0!==t){const a=this.w.globals.tooltip;if(a&&a.tConfig&&a.tConfig.shared&&a.tooltipUtil&&a.tooltipUtil.isXoverlap(this.dataPointIndex)&&a.tooltipUtil.isInitialSeriesSameLen())return;const o=this._getSeriesCount();let r=this.seriesIndex+t,n=0;for(;n<o&&(r<0&&(r=i?o-1:0),r>=o&&(r=i?0:o-1),s.globals.collapsedSeriesIndices.includes(r));)r+=t,n++;this.seriesIndex=r;const c=this._getDataPointCount(r);this.dataPointIndex>=c&&(this.dataPointIndex=c-1)}if(0!==e){const a=this._getDataPointCount(this.seriesIndex);let o=this.dataPointIndex+e;o<0&&(o=i?a-1:0),o>=a&&(o=i?0:a-1),this.dataPointIndex=o,e>0?this._skipNullForward():this._skipNullBackward(),this._isDataPointVisible(this.seriesIndex,this.dataPointIndex)||this._snapToVisibleRangeInDirection(e)}this._showCurrentPoint()}_skipNullForward(){const t=this.w,e=this.seriesIndex,s=this._getDataPointCount(e);let i=this.dataPointIndex,a=0;if(Array.isArray(t.seriesData.series[e])){for(;a<s&&null===t.seriesData.series[e][i];)i=(i+1)%s,a++;this.dataPointIndex=i}}_skipNullBackward(){const t=this.w,e=this.seriesIndex,s=this._getDataPointCount(e);let i=this.dataPointIndex,a=0;if(Array.isArray(t.seriesData.series[e])){for(;a<s&&null===t.seriesData.series[e][i];)i=(i-1+s)%s,a++;this.dataPointIndex=i}}_showCurrentPoint(){const{seriesIndex:t,dataPointIndex:e}=this,s=this.w,i=s.globals.tooltip;!i||!i.ttItems||(s.interact.capturedSeriesIndex=t,s.interact.capturedDataPointIndex=e,this._applyFocusClass(t,e),this._showTooltip(t,e,i))}_hideFocus(){const t=this.w,e=t.globals.tooltip;if(this._removeFocusClass(),this._leaveHoveredBar(),!e)return;e.marker&&e.marker.resetPointsSize(),this._enlargedScatterMarker=null;const s=e.getElTooltip();s&&(s.classList.remove("apexcharts-active"),t.config.chart.accessibility.enabled&&t.config.chart.accessibility.announcements.enabled&&s.setAttribute("aria-hidden","true")),t.dom.baseEl.classList.remove("apexcharts-tooltip-active");const i=e.getElXCrosshairs();i&&i.classList.remove("apexcharts-active")}_showTooltip(t,e,s){const i=this.w,a=i.config.chart.type,o=s.getElTooltip();if(!o)return;const r=s.getCachedDimensions();s.tooltipRect={x:0,y:0,ttWidth:r.ttWidth||0,ttHeight:r.ttHeight||0},this._setSyntheticEvent(t,e,s),i.dom.baseEl.classList.add("apexcharts-tooltip-active"),o.classList.add("apexcharts-active"),i.c
1onfig.chart.accessibility.enabled&&i.config.chart.accessibility.announcements.enabled&&o.removeAttribute("aria-hidden"),"pie"===a||"donut"===a||"polarArea"===a?this._showTooltipNonAxis(t,e,s,o):"radialBar"===a?this._showTooltipRadialBar(t,e,s,o):"heatmap"===a||"treemap"===a?this._showTooltipHeatTree(t,e,s,o,a):"bar"===a||"candlestick"===a||"boxPlot"===a||"rangeBar"===a?this._showTooltipBar(t,e,s):this._showTooltipAxisLine(t,e,s)}_setSyntheticEvent(t,e,s){const i=this.w,a=i.config.chart.type;let o=0,r=0;const n=this._getFocusableElement(t,e);if(n){const c=n.getBoundingClientRect();o=c.left+c.width/2,r=c.top+c.height/2}else if(i.globals.pointsArray&&i.globals.pointsArray[t]&&i.globals.pointsArray[t][e]){const c=i.globals.pointsArray[t][e],l=s.getElGrid&&s.getElGrid();if(l){const h=l.getBoundingClientRect();o=h.left+(c[0]||0),r=h.top+(c[1]||0)}}else{const c=i.dom.Paper&&i.dom.Paper.node;if(c){const l=c.getBoundingClientRect();o=l.left+l.width/2,r=l.top+l.height/2}}if(("line"===a||"area"===a||"rangeArea"===a||"scatter"===a||"bubble"===a||"radar"===a)&&i.globals.pointsArray&&i.globals.pointsArray[t]&&i.globals.pointsArray[t][e]){const c=i.globals.pointsArray[t][e],l=s.getElGrid&&s.getElGrid();if(l){const h=l.getBoundingClientRect();o=h.left+(c[0]||0),r=h.top+(c[1]||0)}}s.e={type:"mousemove",clientX:o,clientY:r}}_showTooltipBar(t,e,s){var i,a,o,r;const n=this.w,c=s.tConfig.shared&&(s.tooltipUtil.isXoverlap(e)||n.globals.isBarHorizontal)&&s.tooltipUtil.isInitialSeriesSameLen(),l=null==(r=null==(o=null==(a=null==(i=n.rangeData.seriesRange)?void 0:i[t])?void 0:a[e])?void 0:o.y)?void 0:r[0];s.tooltipLabels.drawSeriesTexts(H(I(I({ttItems:s.ttItems,i:t,j:e},void 0!==l?.y1&&{y1:l.y1}),void 0!==l?.y2&&{y2:l.y2}),{shared:c}));const h=`.apexcharts-series[data\\:realIndex='${t}']`,d=n.dom.Paper.findOne(`${h} path[j='${e}'], ${h} circle[j='${e}'], ${h} rect[j='${e}']`);if(d&&(this._leaveHoveredBar(),new E(this.w,this.ctx).pathMouseEnter(d,null),this._hoveredBarEl=d),n.globals.isBarHorizontal){const f=d&&d.node;if(f){const p=n.dom.elWrap.getBoundingClientRect(),g=f.getBoundingClientRect(),u=g.left-p.left,v=g.top-p.top+g.height/2-(s.tooltipRect.ttHeight||0)/2;let C=u+g.width;u<(s.xyRatios&&null!=s.xyRatios.baseLineInvertedY?s.xyRatios.baseLineInvertedY:p.width/2)&&(C=u-(s.tooltipRect.ttWidth||0));const k=s.getElTooltip();k&&(k.style.left=C+"px",k.style.top=v+"px")}}else s.tooltipPosition.moveStickyTooltipOverBars(e,t)}_showTooltipAxisLine(t,e,s){const i=this.w,a=i.config.chart.type,r=s.tConfig.shared&&s.tooltipUtil.isXoverlap(e)&&s.tooltipUtil.isInitialSeriesSameLen();s.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:t,j:e,shared:r});const c=i.globals.markers.largestSize>0;"scatter"===a||"bubble"===a?this._showScatterBubblePoint(t,e,s):c?r?s.marker.enlargePoints(e):s.tooltipPosition.moveDynamicPointOnHover(e,t):r?s.tooltipPosition.moveDynamicPointsOnHover(e):s.tooltipPosition.moveDynamicPointOnHover(e,t)}_showScatterBubblePoint(t,e,s){const i=this.w.dom.baseEl;this._enlargedScatterMarker&&(s.marker.oldPointSize(this._enlargedScatterMarker),this._enlargedScatterMarker=null);const a=i.querySelector(`.apexcharts-series[data\\:realIndex='${t}']`);if(!a)return;const o=a.querySelector(`.apexcharts-marker[rel='${e}']`);o&&(s.marker.enlargeCurrentPoint(e,o),this._enlargedScatterMarker=o)}_showTooltipNonAxis(t,e,s,i){var a,o;const r=this.w;s.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:e,shared:!1});const n=i.getBoundingClientRect(),c=n.width||s.tooltipRect.ttWidth||0,l=n.height||s.tooltipRect.ttHeight||0,h=r.dom.baseEl.querySelector(`.apexcharts-pie-area[j='${e}']`);if(h){const d=parseFloat(null!=(a=h.getAttribute("data:cx"))?a:""),f=parseFloat(null!=(o=h.getAttribute("data:cy"))?o:"");if(!isNaN(d)&&!isNaN(f)){const p=r.dom.Paper.node.getBoundingClientRect(),g=r.dom.elWrap.getBoundingClientRect(),b=p.top-g.top;i.style.left=p.left-g.left+d-c/2+"px",i.style.top=b+f-l-10+"px"}}}_showTooltipRadialBar(t,e,s,i){var a;const o=this.w;s.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:t,shared:!1});const{ttWidth:r=0,ttHeight:n=0}=s.getCachedDimensions(),c=o.dom.baseEl.querySelector(`.apexcharts-radialbar-series[data\\:realIndex='${t}'] path`);if(c){const l=parseFloat(null!=(a=c.getAttribute("data:angle"))?a:"")||0,d=(o.config.plotOptions.radialBar.startAngle||0)+l/2,f=o.layout.gridWidth/2,p=o.layout.gridHeight/2,g=o.globals.radialSize||Math.min(o.layout.gridWidth,o.layout.gridHeight)/2,b=g/Math.max(o.seriesData.series.length,1),x=g-t*b,y=D.polarToCartesian(f,p,(x+(x-b))/2,d),C=y.y+(o.layout.translateY||0);i.style.left=y.x+(o.layout.translateX||0)-r/2+"px",i.style.top=C-n-10+"px"}}_showTooltipHeatTree(t,e,s,i,a){var o,r;const n=this.w;s.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:t,j:e,shared:!1});const c=i.getBoundingClientRect(),l=c.width||s.tooltipRect.ttWidth||0,h=c.height||s.tooltipRect.ttHeight||0,f=n.dom.baseEl.querySelector(`.${"heatmap"===a?"apexcharts-heatmap-rect":"apexcharts-treemap-rect"}[i='${t}'][j='${e}']`);if(f){const p=n.dom.elWrap.getBoundingClientRect(),g=f.getBoundingClientRect(),u=g.left-p.left,b=g.top-p.top,x=g.width,w=g.height,m=parseFloat(null!=(o=f.getAttribute("cx"))?o:""),y=parseFloat(null!=(r=f.getAttribute("width"))?r:"");s.tooltipPosition.moveXCrosshairs(m+y/2);let v=u+x+l/2;const C=b+w/2-h/2;u+x>n.layout.gridWidth/2&&(v=u-l/2),i.style.left=v+"px",i.style.top=C+"px"}}_applyFocusClass(t,e){this._removeFocusClass();const s=this._getFocusableElement(t,e);s&&(s.classList.add("apexcharts-keyboard-focused"),this._focusedEl=s)}_removeFocusClass(){this._focusedEl&&(this._focusedEl.classList.remove("apexcharts-keyboard-focused"),this._focusedEl=null)}_leaveHoveredBar(){this._hoveredBarEl&&(new E(this.w,this.ctx).pathMouseLeave(this._hoveredBarEl,null),this._hoveredBarEl=null)}_getFocusableElement(t,e){const s=this.w,i=s.config.chart.type,a=s.dom.baseEl;return"pie"===i||"donut"===i||"polarArea"===i?a.querySelector(`.apexcharts-pie-area[j='${e}']`):"heatmap"===i?a.querySelector(`.apexcharts-heatmap-rect[i='${t}'][j='${e}']`):"treemap"===i?a.querySelector(`.apexcharts-treemap-rect[i='${t}'][j='${e}']`):"radialBar"===i?a.querySelector(`.apexcharts-radialbar-series[data\\:realIndex='${t}'] path`):"bar"===i||"candlestick"===i||"boxPlot"===i||"rangeBar"===i?a.querySelector(`.apexcharts-series[data\\:realIndex='${t}'] path[j='${e}']`):a.querySelector(`.apexcharts-series[data\\:realIndex='${t}'] .apexcharts-marker[rel='${e}']`)||null}_fireClick(){const e=this.w.globals.tooltip;e&&e.markerClick({type:"mouseup",clientX:0,clientY:0},this.seriesIndex,this.dataPointIndex)}_isNavEnabled(){const t=this.w.config.chart.accessibility;return t.enabled&&t.keyboard.enabled&&t.keyboard.navigation.enabled}_getSeriesCount(){const t=this.w,e=t.config.chart.type;return"pie"===e||"donut"===e||"polarArea"===e?1:t.seriesData.series.length}_getDataPointCount(t){const e=this.w,s=e.config.chart.type;if("pie"===s||"donut"===s||"polarArea"===s)return e.seriesData.series.length;const i=e.seriesData.series;return i[t]&&Array.isArray(i[t])?i[t].length:0}_clampCursor(){const t=this._getSeriesCount();this.seriesIndex>=t&&(this.seriesIndex=t-1),this.seriesIndex<0&&(this.seriesIndex=0);const e=this._getDataPointCount(this.seriesIndex);this.dataPointIndex>=e&&(this.dataPointIndex=e-1),this.dataPointIndex<0&&(this.dataPointIndex=0)}_snapToVisibleRange(){const t=this.w,e=t.globals;if(!t.interact.zoomed)return;const i=t.seriesData.seriesX&&t.seriesData.seriesX[this.seriesIndex];if(!i||!i.length)return;const a=e.minX,o=e.maxX;if(void 0===a||void 0===o)return;const r=i[this.dataPointIndex];if(r>=a&&r<=o)return;const n=i.length;for(let c=0;c<n;c++)if(i[c]>=a&&i[c]<=o)return void(this.dataPointIndex=c)}_snapToVisibleRangeInDirection(t){const e=this.w,s=e.globals,a=e.seriesData.seriesX&&e.seriesData.seriesX[this.seriesIndex];if(!a||!a.length)return;const o=s.minX,r=s.maxX;if(void 0===o||void 0===r)return;const n=a.length;if(t>=0){for(let c=0;c<n;c++)if(a[c]>=o&&a[c]<=r)return void(this.dataPointIndex=c)}else for(let c=n-1;c>=0;c--)if(a[c]>=o&&a[c]<=r)return void(this.dataPointIndex=c)}_isDataPointVisible(t,e){const s=this.w,i=s.globals;if(!s.interact.zoomed)return!0;const a=s.seriesData.seriesX&&s.seriesData.seriesX[t];if(!a)return!0;const o=a[e];return void 0===o||o>=i.minX&&o<=i.maxX}}});class Hs{constructor(t){this.w=t.w,this.barCtx=t,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||(this.totalFormatter=this.w.config.dataLabels.formatter)}handleBarDataLabels(t){const{x:e,y:s,y1:i,y2:a,i:o,j:r,realIndex:n,columnGroupIndex:c,series:l,barHeight:h,barWidth:d,barXPosition:f,barYPosition:p,visibleSeries:g}=t,u=this.w,b=new E(this.barCtx.w),x=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[n]:this.barCtx.strokeWidth;let w,m;u.axisFlags.isXNumeric&&!u.globals.isBarHorizontal?(w=e+d*(g+1),m=s+h*(g
1+1)-x):(w=e+d*g,m=s+h*g);let y=null,v=null,C=e,L=s,k={};const S=u.config.dataLabels,T=this.barCtx.barOptions.dataLabels,P=this.barCtx.barOptions.dataLabels.total;typeof p<"u"&&this.barCtx.isRangeBar&&(m=p,L=p),typeof f<"u"&&this.barCtx.isVerticalGroupedRangeBar&&(w=f,C=f);const M=S.offsetX,F=S.offsetY;let X={width:0,height:0};if(u.config.dataLabels.enabled){const R=u.seriesData.series[o][r];X=b.getTextRects(u.config.dataLabels.formatter?u.config.dataLabels.formatter(R,H(I({},u),{seriesIndex:o,dataPointIndex:r,w:u})):u.formatters.yLabelFormatters[0](R),parseFloat(S.style.fontSize).toString())}const Y={x:e,y:s,i:o,j:r,realIndex:n,columnGroupIndex:c,bcx:w,bcy:m,barHeight:h,barWidth:d,textRects:X,strokeWidth:x,dataLabelsX:C,dataLabelsY:L,dataLabelsConfig:S,barDataLabelsConfig:T,barTotalDataLabelsConfig:P,offX:M,offY:F};return k=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(Y):this.calculateColumnsDataLabelsPosition(Y),y=this.drawCalculatedDataLabels({x:k.dataLabelsX,y:k.dataLabelsY,val:this.barCtx.isRangeBar?[i,a]:"100%"===u.config.chart.stackType?l[n][r]:u.seriesData.series[n][r],i:n,j:r,barWidth:d,barHeight:h,textRects:X,dataLabelsConfig:S}),u.config.chart.stacked&&P.enabled&&(v=this.drawTotalDataLabels({x:k.totalDataLabelsX,y:k.totalDataLabelsY,barWidth:d,barHeight:h,realIndex:n,textAnchor:k.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:n,j:r}),dataLabelsConfig:S,barTotalDataLabelsConfig:P})),{dataLabelsPos:k,dataLabels:y,totalDataLabels:v}}getStackedTotalDataLabel({realIndex:t,j:e}){const s=this.w;let i=this.barCtx.stackedSeriesTotals[e];return this.totalFormatter&&(i=this.totalFormatter(i,H(I({},s),{seriesIndex:t,dataPointIndex:e,w:s}))),i}calculateColumnsDataLabelsPosition(t){const e=this.w;let w,m,{i:s,j:i,realIndex:a,y:o,bcx:r,barWidth:n,barHeight:c,textRects:l,dataLabelsX:h,dataLabelsY:d,dataLabelsConfig:f,barDataLabelsConfig:p,barTotalDataLabelsConfig:g,strokeWidth:u,offX:b,offY:x}=t;const v=r;c=Math.abs(c);const C="vertical"===e.config.plotOptions.bar.dataLabels.orientation,{zeroEncounters:L}=this.barCtx.barHelpers.getZeroValueEncounters({i:s,j:i});r-=u/2;const k=e.layout.gridWidth/e.globals.dataPoints;this.barCtx.isVerticalGroupedRangeBar?h+=n/2:(h=e.axisFlags.isXNumeric?r-n/2+b:r-k+n/2+b,!e.config.chart.stacked&&L>0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(h-=n*L)),C&&(h=h+l.height/2-u/2-2);const S=e.seriesData.series[s][i]<0;let T=o;switch(this.barCtx.isReversed&&(T=o+(S?c:-c)),p.position){case"center":d=C?S?T-c/2+x:T+c/2-x:S?T-c/2+l.height/2+x:T+c/2+l.height/2-x;break;case"bottom":d=C?S?T-c+x:T+c-x:S?T-c+l.height+u+x:T+c-l.height/2+u-x;break;case"top":d=C?S?T+x:T-x:S?T-l.height/2-x:T+l.height+x}let P=T;if(e.labelData.seriesGroups.forEach(M=>{var F;null==(F=this.barCtx[M.join(",")])||F.prevY.forEach(X=>{P=S?Math.max(X[i],P):Math.min(X[i],P)}
1)}),this.barCtx.lastActiveBarSerieIndex===a&&g.enabled){const X=new E(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:a,j:i}),f.fontSize);w=S?P-X.height/2-x-g.offsetY+18:P+X.height+x+g.offsetY-18,m=v+(e.axisFlags.isXNumeric?-n*e.globals.barGroups.length/2:e.globals.barGroups.length*n/2-(e.globals.barGroups.length-1)*n-k)+g.offsetX}return e.config.chart.stacked||(d<0?d=0+u:d+l.height/3>e.layout.gridHeight&&(d=e.layout.gridHeight-u)),{bcx:r,bcy:o,dataLabelsX:h,dataLabelsY:d,totalDataLabelsX:m,totalDataLabelsY:w,totalDataLabelsAnchor:"middle"}}calculateBarsDataLabelsPosition(t){const e=this.w;let{x:s,i,j:a,realIndex:o,bcy:r,barHeight:n,barWidth:c,textRects:l,dataLabelsX:h,strokeWidth:d,dataLabelsConfig:f,barDataLabelsConfig:p,barTotalDataLabelsConfig:g,offX:u,offY:b}=t;const x=e.layout.gridHeight/e.globals.dataPoints,{zeroEncounters:w}=this.barCtx.barHelpers.getZeroValueEncounters({i,j:a});c=Math.abs(c);let m=r-(this.barCtx.isRangeBar?0:x)+n/2+l.height/2+b-3;!e.config.chart.stacked&&w>0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(m-=n*w);let y,v,C="start";const L=e.seriesData.series[i][a]<0;let k=s;switch(this.barCtx.isReversed&&(k=s+(L?-c:c),C=L?"start":"end"),p.position){case"center":h=L?k+c/2-u:Math.max(l.width/2,k-c/2)+u;break;case"bottom":h=L?k+c-d-u:k-c+d+u;break;case"top":h=L?k-d-u:k-d+u}let S=k;if(e.labelData.seriesGroups.forEach(T=>{var P;null==(P=this.barCtx[T.join(",")])||P.prevX.forEach(M=>{S=L?Math.min(M[a],S):Math.max(M[a],S)})}),this.barCtx.lastActiveBarSerieIndex===o&&g.enabled){const P=new E(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:a}),f.fontSize);L?(y=S-d-u-g.offsetX,C="end"):y=S+u+g.offsetX+(this.barCtx.isReversed?-(c+d):d),v=m-l.height/2+P.height/2+g.offsetY+d,e.globals.barGroups.length>1&&(v-=e.globals.barGroups.length/2*(n/2))}return e.config.chart.stacked||("start"===f.textAnchor?h-l.width<0?h=L?l.width+d:d:h+l.width>e.layout.gridWidth&&(h=L?e.layout.gridWidth-d:e.layout.gridWidth-l.width-d):"middle"===f.textAnchor?h-l.width/2<0?h=l.width/2+d:h+l.width/2>e.layout.gridWidth&&(h=e.layout.gridWidth-l.width/2-d):"end"===f.textAnchor&&(h<1?h=l.width+d:h+1>e.layout.gridWidth&&(h=e.layout.gridWidth-l.width-d))),{bcx:s,bcy:r,dataLabelsX:h,dataLabelsY:m,totalDataLabelsX:y,totalDataLabelsY:v,totalDataLabelsAnchor:C}}drawCalculatedDataLabels({x:t,y:e,val:s,i,j:a,textRects:o,barHeight:r,barWidth:n,dataLabelsConfig:c}){const l=this.w;let h="rotate(0)";"vertical"===l.config.plotOptions.bar.dataLabels.orientation&&(h=`rotate(-90, ${t}, ${e})`);const d=new dt(this.barCtx.w,this.barCtx.ctx),f=new E(this.barCtx.w),p=c.formatter;let g=null;const u=l.globals.collapsedSeriesIndices.indexOf(i)>-1;if(c.enabled&&!u){g=f.group({class:"apexcharts-data-labels",transform:h});let b="";typeof s<"u"&&(b=p(s,H(I({},l),{seriesIndex:i,dataPointIndex:a,w:l}))),!s&&l.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(b="");const x=l.seriesData.series[i][a]<0,w=l.config.plotOptions.bar.dataLabels.position;"vertical"===l.config.plotOptions.bar.dataLabels.orientation&&("top"===w&&(c.textAnchor=x?"end":"start"),"center"===w&&(c.textAnchor="middle"),"bottom"===w&&(c.textAnchor=x?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&n<f.getTextRects(b,parseFloat(c.style.fontSize).toString()).width&&(b=""),l.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?o.width/1.6>Math.abs(n)&&(b=""):o.height/1.6>Math.abs(r)&&(b=""));const m=I({},c);this.barCtx.isHorizontal&&s<0&&("start"===c.textAnchor?m.textAnchor="end":"end"===c.textAnchor&&(m.textAnchor="start")),d.plotDataLabelsText({x:t,y:e,text:b,i,j:a,parent:g,dataLabelsConfig:m,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return g}drawTotalDataLabels({x:t,y:e,val:s,realIndex:i,textAnchor:a,barTotalDataLabelsConfig:o}){const r=new E(this.barCtx.w);let n;return o.enabled&&typeof t<"u"&&typeof e<"u"&&this.barCtx.lastActiveBarSerieIndex===i&&(n=r.drawText({x:t,y:e,foreColor:o.style.color,text:s,textAnchor:a,fontFamily:o.style.fontFamily,fontSize:o.style.fontSize,fontWeight:o.style.fontWeight})),n}}let Ws=class{constructor(t){this.w=t.w,this.barCtx=t}initVariables(t){const e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(let s=0;s<t.length;s++)if(t[s].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[s].length),e.axisFlags.isXNumeric)for(let i=0;i<t[s].length;i++)e.seriesData.seriesX[s][i]>e.globals.minX&&e.seriesData.seriesX[s][i]<e.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=e.globals.dataPoints;this.arrBorderRadius=this.createBorderRadiusArr(e.seriesData.series),D.isSafari()&&(this.arrBorderRadius=this.arrBorderRadius.map(s=>s.map(i=>"none"))),0===this.barCtx.seriesLen&&(this.barCtx.seriesLen=1),this.barCtx.zeroSerieses=[],e.globals.comboCharts||this.checkZeroSeries({series:t})}initialPositions(t){const e=this.w;let s,i,a,o,r,n,c,l,h=e.globals.dataPoints;this.barCtx.isRangeBar&&(h=e.labelData.labels.length);let d=this.barCtx.seriesLen;if(e.config.plotOptions.bar.rangeBarGroupRows&&(d=1),this.barCtx.isHorizontal)a=e.layout.gridHeight/h,r=a/d,e.axisFlags.isXNumeric&&(a=e.layout.gridHeight/this.barCtx.totalItems,r=a/this.barCtx.seriesLen),r=r*parseInt(this.barCtx.barOptions.barHeight,10)/100,-1===String(this.barCtx.barOptions.barHeight).indexOf("%")&&(r=parseInt(this.barCtx.barOptions.barHeight,10)),l=this.barCtx.baseLineInvertedY+e.globals.padHorizontal+(this.barCtx.isReversed?e.layout.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),this.barCtx.isFunnel&&(l=e.layout.gridWidth/2),i=(a-r*this.barCtx.seriesLen)/2;else{if(o=e.layout.gridWidth/this.barCtx.visibleItems,e.config.xaxis.convertedCatToNumeric&&(o=e.layout.gridWidth/e.globals.dataPoints),n=o/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100,e.axisFlags.isXNumeric){const f=this.barCtx.xRatio;e.globals.minXDiff&&.5!==e.globals.minXDiff&&e.globals.minXDiff/f>0&&(o=e.globals.minXDiff/f),n=o/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100,n<1&&(n=1)}-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(n=parseInt(this.barCtx.barOptions.columnWidth,10)),c=e.layout.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?e.layout.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),s=e.axisFlags.isXNumeric?this.barCtx.getBarXForNumericXAxis({x:s,j:0,realIndex:t,barWidth:n}).x:e.globals.padHorizontal+D.noExponents(o-n*this.barCtx.seriesLen)/2}return e.globals.barHeight=r,e.globals.barWidth=n,{x:s,y:i,yDivision:a,xDivision:o,barHeight:r,barWidth:n,zeroH:c,zeroW:l}}initializeStackedPrevVars(t){t.w.labelData.seriesGroups.forEach(s=>{t[s]||(t[s]={}),t[s].prevY=[],t[s].prevX=[],t[s].prevYF=[],t[s].prevXF=[],t[s].prevYVal=[],t[s].prevXVal=[]})}initializeStackedXYVars(t){t.w.labelData.seriesGroups.forEach(s=>{t[s]||(t[s]={}),t[s].xArrj=[],t[s].xArrjF=[],t[s].xArrjVal=[],t[s].yArrj=[],t[s].yArrjF=[],t[s].yArrjVal=[]})}getPathFillColor(t,e,s,i){var a,o,r,n;const c=this.w,l=new st(this.barCtx.w);let h=null;const d=this.barCtx.barOptions.distributed?s:e;let f=!1;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(u=>{t[e][s]>=u.from&&t[e][s]<=u.to&&(h=u.color,f=!0)}),{color:l.fillPath({seriesNumber:this.barCtx.barOptions.distributed?d:i,dataPointIndex:s,color:h,value:t[e][s],fillConfig:null==(a=c.config.series[e].data[s])?void 0:a.fill,fillType:null!=(r=null==(o=c.config.series[e].data[s])?void 0:o.fill)&&r.type?null==(n=c.config.series[e].data[s])?void 0:n.fill.type:Array.isArray(c.config.fill.type)?c.config.fill.type[i]:c.config.fill.type}),useRangeColor:f}}getStrokeWidth(t,e,s){let i=0;const a=this.w;return this.barCtx.isNullValue=typeof this.barCtx.series[t][e]>"u"||null===this.barCtx.series[t][e]||"bar"===a.config.chart.type&&!this.barCtx.series[t][e],a.config.stroke.show&&(this.barCtx.isNullValue||(i=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[s]:this.barCtx.strokeWidth)),i}createBorderRadiusArr(t){var e;const i=!this.w.config.chart.stacked||this.w.config.plotOptions.bar.borderRadius<=0,a=t.length,o=0|(null==(e=t[0])?void 0:e.length),r=Array.from({length:a},()=>Array(o).fill(i?"top":"none"));if(i)return r;const n=this.w.config.chart.type;for(let c=0;c<o;c++){const l=[],h=[];let d=0;for(let f=0;f<a;f++){const p=t[f][c];p>0?(l.push(f),d++):p<0&&(h.push(f),d++)}if(l.length>0&&0===h.length)if(1===l.length)r[l[0]][c]="bar"===n&&1===o?"top":"both";else{const f=l[0],p=l[l.length-1];for(const g of l)r[g][c]=g===f?"bar"===n&&1===o?"top":"bottom":g===p?"to
1p":"none"}else if(h.length>0&&0===l.length)if(1===h.length)r[h[0]][c]="both";else{const f=Math.max(...h),p=Math.min(...h);for(const g of h)r[g][c]=g===f?"bottom":g===p?"top":"none"}else if(l.length>0&&h.length>0){const f=l[l.length-1];for(const g of l)r[g][c]=g===f?"top":"none";const p=Math.max(...h);for(const g of h)r[g][c]=g===p?"bottom":"none"}else 1===d&&(r[l[0]||h[0]][c]="both")}return r}barBackground({j:t,i:e,x1:s,x2:i,y1:a,y2:o,elSeries:r}){const n=this.w,c=new E(this.barCtx.w),h=new Z(this.barCtx.w).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&h===e){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t%=this.barCtx.barOptions.colors.backgroundBarColors.length);const f=c.drawRect(typeof s<"u"?s:0,typeof a<"u"?a:0,typeof i<"u"?i:n.layout.gridWidth,typeof o<"u"?o:n.layout.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,this.barCtx.barOptions.colors.backgroundBarColors[t],this.barCtx.barOptions.colors.backgroundBarOpacity);r.add(f),f.node.classList.add("apexcharts-backgroundBar")}}getColumnPaths({barWidth:t,barXPosition:e,y1:s,y2:i,strokeWidth:a,isReversed:o,series:r,seriesGroup:n,realIndex:c,i:l,j:h,w:d}){var f;const p=new E(this.barCtx.w);(a=Array.isArray(a)?a[c]:a)||(a=0);let g=t,u=e;null!=(f=d.config.series[c].data[h])&&f.columnWidthOffset&&(u=e-d.config.series[c].data[h].columnWidthOffset/2,g=t+d.config.series[c].data[h].columnWidthOffset);const b=a/2,x=u+b,w=u+g-b,m=(r[l][h]>=0?1:-1)*(o?-1:1);i+=.001+b*m;let y=p.move(x,s+=.001-b*m),v=p.move(x,s);const C=p.line(w,s);if(d.globals.previousPaths.length>0&&(v=this.barCtx.getPreviousPath(c,h,!1)),y=y+p.line(x,i)+p.line(w,i)+C+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][h]?" Z":" z"),v=v+p.line(x,s)+C+C+C+C+C+p.line(x,s)+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][h]?" Z":" z"),"none"!==this.arrBorderRadius[c][h]&&(y=p.roundPathCorners(y,d.config.plotOptions.bar.borderRadius)),d.config.chart.stacked){let L=this.barCtx;L=this.barCtx[n],L.yArrj.push(i-b*m),L.yArrjF.push(Math.abs(s-i+a*m)),L.yArrjVal.push(this.barCtx.series[l][h])}return{pathTo:y,pathFrom:v}}getBarpaths({barYPosition:t,barHeight:e,x1:s,x2:i,strokeWidth:a,isReversed:o,series:r,seriesGroup:n,realIndex:c,i:l,j:h,w:d}){var f;const p=new E(this.barCtx.w);(a=Array.isArray(a)?a[c]:a)||(a=0);let g=t,u=e;null!=(f=d.config.series[c].data[h])&&f.barHeightOffset&&(g=t-d.config.series[c].data[h].barHeightOffset/2,u=e+d.config.series[c].data[h].barHeightOffset);const b=a/2,x=g+b,w=g+u-b,m=(r[l][h]>=0?1:-1)*(o?-1:1);i+=.001-b*m;let y=p.move(s+=.001+b*m,x),v=p.move(s,x);d.globals.previousPaths.length>0&&(v=this.barCtx.getPreviousPath(c,h,!1));const C=p.line(s,w);if(y=y+p.line(i,x)+p.line(i,w)+C+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][h]?" Z":" z"),v=v+p.line(s,x)+C+C+C+C+C+p.line(s,x)+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][h]?" Z":" z"),"none"!==this.arrBorderRadius[c][h]&&(y=p.roundPathCorners(y,d.config.plotOptions.bar.borderRadius)),d.config.chart.stacked){let L=this.barCtx;L=this.barCtx[n],L.xArrj.push(i+b*m),L.xArrjF.push(Math.abs(s-i-a*m)),L.xArrjVal.push(this.barCtx.series[l][h])}return{pathTo:y,pathFrom:v}}checkZeroSeries({series:t}){const e=this.w;for(let s=0;s<t.length;s++){let i=0;for(let a=0;a<t[e.globals.maxValsInArrayIndex].length;a++)i+=t[s][a];0===i&&this.barCtx.zeroSerieses.push(s)}}getXForValue(t,e,s=!0){let i=s?e:null;return typeof t<"u"&&null!==t&&(i=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),i}getYForValue(t,e,s,i=!0){let a=i?e:null;return typeof t<"u"&&null!==t&&(a=e-t/this.barCtx.yRatio[s]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[s]:0)),a}getGoalValues(t,e,s,i,a,o){const r=this.w,n=[],c=(l,h)=>{n.push({[t]:"x"===t?this.getXForValue(l,e,!1):this.getYForValue(l,s,o,!1),attrs:h})};if(r.seriesData.seriesGoals[i]&&r.seriesData.seriesGoals[i][a]&&Array.isArray(r.seriesData.seriesGoals[i][a])&&r.seriesData.seriesGoals[i][a].forEac
vendor: 6,066 bytes, line 1
1h(l=>{c(l.value,l)}),this.barCtx.barOptions.isDumbbell&&r.rangeData.seriesRange.length){const l=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:r.globals.colors,h={strokeHeight:"x"===t?0:r.globals.markers.size[i],strokeWidth:"x"===t?r.globals.markers.size[i]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(l[i])?l[i][0]:l[i]};c(r.rangeData.seriesRangeStart[i][a],h),c(r.rangeData.seriesRangeEnd[i][a],H(I({},h),{strokeColor:Array.isArray(l[i])?l[i][1]:l[i]}))}return n}drawGoalLine({barXPosition:t,barYPosition:e,goalX:s,goalY:i,barWidth:a,barHeight:o}){const r=new E(this.barCtx.w),n=r.group({className:"apexcharts-bar-goals-groups"});n.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:n.node}),n.attr("clip-path",`url(#gridRectMarkerMask${this.barCtx.w.globals.cuid})`);let c=null;return this.barCtx.isHorizontal?Array.isArray(s)&&s.forEach(l=>{if(l.x>=-1&&l.x<=r.w.layout.gridWidth+1){const h=typeof l.attrs.strokeHeight<"u"?l.attrs.strokeHeight:o/2,d=e+h+o/2;c=r.drawLine(l.x,d-2*h,l.x,d,l.attrs.strokeColor?l.attrs.strokeColor:void 0,l.attrs.strokeDashArray,l.attrs.strokeWidth?l.attrs.strokeWidth:2,l.attrs.strokeLineCap),n.add(c)}}):Array.isArray(i)&&i.forEach(l=>{if(l.y>=-1&&l.y<=r.w.layout.gridHeight+1){const h=typeof l.attrs.strokeWidth<"u"?l.attrs.strokeWidth:a/2,d=t+h+a/2;c=r.drawLine(d-2*h,l.y,d,l.y,l.attrs.strokeColor?l.attrs.strokeColor:void 0,l.attrs.strokeDashArray,l.attrs.strokeHeight?l.attrs.strokeHeight:2,l.attrs.strokeLineCap),n.add(c)}}),n}drawBarShadow({prevPaths:t,currPaths:e,color:s,realIndex:i,j:a}){const o=this.w,{x:r,x1:n,barYPosition:c}=t,{x:l,x1:h,barYPosition:d}=e,f=c+e.barHeight,p=new E(this.barCtx.w),g=new D,u=p.move(n,f)+p.line(r,f)+p.line(l,d)+p.line(h,d)+p.line(n,f)+("around"===o.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[i][a]?" Z":" z");return p.drawPath({d:u,fill:g.shadeColor(.5,D.rgb2hex(s)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}getZeroValueEncounters({i:t,j:e}){var s;const i=this.w;let a=0,o=0;return(i.config.plotOptions.bar.horizontal?i.seriesData.series.map((n,c)=>c):(null==(s=i.globals.columnSeries)?void 0:s.i.map(n=>n))||[]).forEach(n=>{const c=i.globals.seriesPercent[n][e];c&&a++,n<t&&0===c&&o++}),{nonZeroColumns:a,zeroEncounters:o}}getGroupIndex(t){const e=this.w,s=e.labelData.seriesGroups.findIndex(o=>o.indexOf(e.seriesData.seriesNames[t])>-1),i=this.barCtx.columnGroupIndices;let a=i.indexOf(s);return a<0&&(i.push(s),a=i.length-1),{groupIndex:s,columnGroupIndex:a}}};class ut{constructor(t,e,s){this.ctx=e,this.w=t,this.barOptions=t.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=t.config.stroke.width,this.isNullValue=!1,this.isRangeBar=t.rangeData.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!t.globals.isBarHorizontal&&t.rangeData.seriesRange.length&&t.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.xyRatios=s,this.xRatio=0,this.yRatio=[],this.invertedXRatio=0,this.invertedYRatio=0,this.baseLineY=[],this.baseLineInvertedY=0,null!==this.xyRatios&&(this.xRatio=s.xRatio,this.yRatio=s.yRatio,this.invertedXRatio=s.invertedXRatio,this.invertedYRatio=s.invertedYRatio,this.baseLineY=s.baseLineY,this.baseLineInvertedY=s.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[],this.series=[],this.elSeries=null,this.visibleI=0,this.isReversed=!1;const i=new Z(this.w);this.lastActiveBarSerieIndex=i.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];const a=i.getBarSeriesIndices(),o=new q(this.w);this.stackedSeriesTotals=o.getStackedSeriesTotals(this.w.config.series.map((r,n)=>-1===a.indexOf(n)?n:-1).filter(r=>-1!==r)),this.barHelpers=new Ws(this)}draw(t,e){var s;const i=this.w,a=new E(this.w),o=new q(this.w);t=o.getLogSeries(t),this.series=t,this.yRatio=o.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);const r=a.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(let n=0,c=0;n<t.length;n++,c++){let l,h;const d=[],f=[],p=i.globals.comboCharts?e[n]:n,{columnGroupIndex:g}=this.barHelpers.getGroupIndex(p),u=a.group({class:"apexcharts-series",rel:n+1,seriesName:D.escapeString(i.seriesData.seriesNames[p]),"data:realIndex":p});Z.addCollapsedClassToSeries(this.w,u,p),t[n].length>0&&(this.visibleI=this.visibleI+1),this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[p],this.translationsIndex=p);const b=this.translationsIndex;this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;const x=this.barHelpers.initialPositions(p),{y:w,yDivision:m,zeroW:y,x:v,xDivision:C,zeroH:L}=x;let k=x.barHeight,S=x.barWidth;h=w,l=v,this.isHorizontal||f.push(l+(S??0)/2);const T=a.group({class:"apexcharts-datalabels","data:realIndex":p});i.globals.delayedElements.push({el:T.node}),T.node.classList.add("apexcharts-element-hidden");const P=a.group({class:"apexcharts-bar-goals-markers"}),M=a.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:M.node}),M.node.classList.add("apexcharts-element-hidden");for(let F=0;F<t[n].length;F++){const X=this.barHelpers.getStrokeWidth(n,F,p);let Y=null;const R={indexes:{i:n,j:F,realIndex:p,translationsIndex:b,bc:c},x:l,y:h,strokeWidth:X,elSeries:u};this.isHorizontal?(Y=this.drawBarPaths(H(I({},R),{barHeight:k,zeroW:y,yDivision:m})),S=this.series[n][F]/this.invertedYRatio):(Y=this.drawColumnPaths(H(I({},R),{xDivision:C,barWidth:S,zeroH:L})),k=this.series[n][F]/this.yRatio[b]);const N=this.barHelpers.getPathFillColor(t,n,F,p);if(this.isFunnel&&this.barOptions.isFunnel3d&&this.pathArr.length&&F>0){const O=this.barHelpers.drawBarShadow({color:"string"==typeof N.c
1olor&&-1===(null==(s=N.color)?void 0:s.indexOf("url"))?N.color:D.hexToRgba(i.globals.colors[n]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:Y,realIndex:p,j:F});M.add(O),i.config.chart.dropShadow.enabled&&new J(this.w).dropShadow(O,i.config.chart.dropShadow,p)}this.pathArr.push(Y);const z=this.barHelpers.drawGoalLine({barXPosition:Y.barXPosition,barYPosition:Y.barYPosition,goalX:Y.goalX,goalY:Y.goalY,barHeight:k,barWidth:S});z&&P.add(z),h=Y.y,l=Y.x,F>0&&f.push(l+(S??0)/2),d.push(h),this.renderSeries(H(I({realIndex:p,pathFill:N.color},N.useRangeColor?{lineFill:N.color}:{}),{j:F,i:n,columnGroupIndex:g,pathFrom:Y.pathFrom,pathTo:Y.pathTo,strokeWidth:X,elSeries:u,x:l,y:h,series:t,barHeight:Math.abs(Y.barHeight?Y.barHeight:k),barWidth:Math.abs(Y.barWidth?Y.barWidth:S),elDataLabelsWrap:T,elGoalsMarkers:P,elBarShadows:M,visibleSeries:this.visibleI,type:"bar"}))}i.globals.seriesXvalues[p]=f,i.globals.seriesYvalues[p]=d,r.add(u)}return r}renderSeries({realIndex:t,pathFill:e,lineFill:s,j:i,i:a,columnGroupIndex:o,pathFrom:r,pathTo:n,strokeWidth:c,elSeries:l,x:h,y:d,y1:f,y2:p,series:g,barHeight:u,barWidth:b,barXPosition:x,barYPosition:w,elDataLabelsWrap:m,elGoalsMarkers:y,elBarShadows:v,visibleSeries:C,type:L,classes:k}){const S=this.w,T=new E(this.w,this.ctx);let P=!1;if(l._bindingsDelegated||(l._bindingsDelegated=!0,T.setupEventDelegation(l,`.apexcharts-${L}-area`)),!s){const R="function"==typeof S.globals.stroke.colors[t]?function(N){const z=S.config.stroke.colors;let O;return Array.isArray(z)&&z.length>0&&(O=z[N],O||(O=""),"function"==typeof O)?O({value:S.seriesData.series[N][i],dataPointIndex:i,w:S}):O}(t):S.globals.stroke.colors[t];s=this.barOptions.distributed?S.globals.stroke.colors[i]:R}const F=new Hs(this).handleBarDataLabels({x:h,y:d,y1:f,y2:p,i:a,j:i,series:g,realIndex:t,columnGroupIndex:o,barHeight:u,barWidth:b,barXPosition:x,barYPosition:w,visibleSeries:C});if(S.globals.isBarHorizontal||(F.dataLabelsPos.dataLabelsX+Math.max(b,S.globals.barPadForNumericAxis)<0||F.dataLabelsPos.dataLabelsX-Math.max(b,S.globals.barPadForNumericAxis)>S.layout.gridWidth)&&(P=!0),S.config.series[a].data[i]&&S.config.series[a].data[i].strokeColor&&(s=S.config.series[a].data[i].strokeColor),this.isNullValue&&(e="none"),!P){const Y=T.renderPaths({i:a,j:i,realIndex:t,pathFrom:r,pathTo:n,stroke:s,strokeWidth:c,strokeLineCap:S.config.stroke.lineCap,fill:e,animationDelay:i/S.config.chart.animations.animateGradually.delay*(S.config.chart.animations.speed/S.globals.dataPoints)/2.4,initialSpeed:S.config.chart.animations.speed,dataChangeSpeed:S.config.chart.animations.dynamicAnimation.speed,className:`apexcharts-${L}-area ${k}`,chartType:L,bindEventsOnPaths:!1});Y.attr("clip-path",`url(#gridRectBarMask${S.globals.cuid})`);const R=S.config.forecastDataPoints;R.count>0&&i>=S.globals.dataPoints-R.count&&(Y.node.setAttribute("stroke-dasharray",R.dashArray),Y.node.setAttribute("stroke-width",R.strokeWidth),Y.node.setAttribute("fill-opacity",R.fillOpacity)),typeof f<"u"&&typeof p<"u"&&(Y.attr("data-range-y1",f),Y.attr("data-range-y2",p)),new J(this.w).setSelectionFilter(Y,t,i),l.add(Y),Y.attr({cy:F.dataLabelsPos.bcy,cx:F.dataLabelsPos.bcx,j:i,val:S.seriesData.series[a][i],barHeight:u,barWidth:b}),null!==F.dataLabels&&m.add(F.dataLabels),F.totalDataLabels&&m.add(F.totalDataLabels),l.add(m),y&&l.add(y),v&&l.add(v)}return l}drawBarPaths({indexes:t,barHeight:e,strokeWidth:s,zeroW:i,x:a,y:o,yDivision:r,elSeries:n}){const c=this.w,l=t.i,h=t.j;let d;if(c.axisFlags.isXNumeric)d=(o=(c.seriesData.seriesX[l][h]-c.globals.minX)/this.invertedXRatio-e)+e*this.visibleI;else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:p,zeroEncounters:g}=this.barHelpers.getZeroValueEncounters({i:l,j:h});p>0&&(e=this.seriesLen*e/p),d=o+e*this.visibleI,d-=e*g}else d=o+e*this.visibleI;if(this.isFunnel){const p=i??0;i=p-(this.barHelpers.getXForValue(this.series[l][h],p)-p)/2}a=this.barHelpers.getXForValue(this.series[l][h],i??0);const f=this.barHelpers.getBarpaths({barYPosition:d,barHeight:e,x1:i,x2:a,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,i:l,j:h,w:c});return c.axisFlags.isXNumeric||(o+=r),this.barHelpers.barBackgroun
1d({j:h,i:l,y1:d-e*this.visibleI,y2:e*this.seriesLen,elSeries:n}),{pathTo:f.pathTo,pathFrom:f.pathFrom,x1:i,x:a,y:o,goalX:this.barHelpers.getGoalValues("x",i,null,l,h,0),barYPosition:d,barHeight:e}}drawColumnPaths({indexes:t,x:e,y:s,xDivision:i,barWidth:a,zeroH:o,strokeWidth:r,elSeries:n}){const c=this.w,l=t.realIndex,h=t.translationsIndex,d=t.i,f=t.j,p=t.bc;let g;if(c.axisFlags.isXNumeric){const b=this.getBarXForNumericXAxis({x:e,j:f,realIndex:l,barWidth:a});e=b.x,g=b.barXPosition}else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:b,zeroEncounters:x}=this.barHelpers.getZeroValueEncounters({i:d,j:f});b>0&&(a=this.seriesLen*a/b),g=e+a*this.visibleI,g-=a*x}else g=e+a*this.visibleI;s=this.barHelpers.getYForValue(this.series[d][f],o,h);const u=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:a,y1:o,y2:s,strokeWidth:r,isReversed:this.isReversed,series:this.series,realIndex:l,i:d,j:f,w:c});return c.axisFlags.isXNumeric||(e+=i),this.barHelpers.barBackground({bc:p,j:f,i:d,x1:g-r/2-a*this.visibleI,x2:a*this.seriesLen+r/2,elSeries:n}),{pathTo:u.pathTo,pathFrom:u.pathFrom,x:e,y:s,goalY:this.barHelpers.getGoalValues("y",null,o,d,f,h),barXPosition:g,barWidth:a}}getBarXForNumericXAxis({x:t,barWidth:e,realIndex:s,j:i}){const a=this.w;let o=s;return a.seriesData.seriesX[s].length||(o=a.globals.maxValsInArrayIndex),D.isNumber(a.seriesData.seriesX[o][i])&&(t=(a.seriesData.seriesX[o][i]-a.globals.minX)/this.xRatio-e*this.seriesLen/2),{barXPosition:t+e*this.visibleI,x:t}}getPreviousPath(t,e){const s=this.w;let i="M 0 0";for(let a=0;a<s.globals.previousPaths.length;a++){const o=s.globals.previousPaths[a];o.paths&&o.paths.length>0&&parseInt(o.realIndex,10)===parseInt(String(t),10)&&typeof s.globals.previousPaths[a].paths[e]<"u"&&(i=s.globals.previousPaths[a].paths[e].d)}return i}}class we extends ut{draw(t,e,s){const i=this.w,a=new E(this.w),o=i.globals.comboCharts?e:i.config.chart.type,r=new st(this.w);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=i.config.plotOptions.bar.horizontal,this.isOHLC=this.candlestickOptions&&"ohlc"===this.candlestickOptions.type,this.coreUtils=new q(this.w),t=this.coreUtils.getLogSeries(t),this.series=t,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);const n=a.group({class:`apexcharts-${o}-series apexcharts-plot-series`});for(let c=0;c<t.length;c++){let l,h;this.isBoxPlot="boxPlot"===i.config.chart.type||"boxPlot"===i.config.series[c].type;const d=[],f=[],p=i.globals.comboCharts?s[c]:c,{columnGroupIndex:g}=this.barHelpers.getGroupIndex(p),u=a.group({class:"apexcharts-series",seriesName:D.escapeString(i.seriesData.seriesNames[p]),rel:c+1,"data:realIndex":p});Z.addCollapsedClassToSeries(this.w,u,p),t[c].length>0&&(this.visibleI=this.visibleI+1);let b=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[p][0],b=p);const x=this.barHelpers.initialPositions(p),{y:w,barHeight:m,yDivision:y,zeroW:v,x:C,barWidth:L,xDivision:k,zeroH:S}=x;h=w,l=C,f.push(l+(L??0)/2);const T=a.group({class:"apexcharts-datalabels","data:realIndex":p}),P=a.group({class:"apexcharts-bar-goals-markers"});for(let M=0;M<i.globals.dataPoints;M++){const F=this.barHelpers.getStrokeWidth(c,M,p);let X=null;const Y={indexes:{i:c,j:M,realIndex:p,translationsIndex:b},x:l,y:h,strokeWidth:F,elSeries:u};X=this.isHorizontal?this.drawHorizontalBoxPaths(H(I({},Y),{yDivision:y,barHeight:m,zeroW:v})):this.drawVerticalBoxPaths(H(I({},Y),{xDivision:k,barWidth:L,zeroH:S})),h=X.y,l=X.x;const R=this.barHelpers.drawGoalLine({barXPosition:X.barXPosition,barYPosition:X.barYPosition,goalX:X.goalX,goalY:X.goalY,barHeight:m,barWidth:L});R&&P.add(R),M>0&&f.push(l+(L??0)/2),d.push(h),X.pathTo.forEach((N,z)=>{const O=!this.isBoxPlot&&this.candlestickOptions.wick.useFillColor?X.color[z]:i.globals.stroke.colors[c],G=r.fillPath({seriesNumber:p,dataPointIndex:M,color:X.color[z],value:t[c][M]});this.renderSeries({realIndex:p,pathFill:G,lineFill:O,j:M,i:c,pathFrom:X.pathFrom,pathTo:N,strokeWidth:F,elSeries:u,x:l,y:h,series:t,columnGroupIndex:g,barHeight:m,barWidth:L,elDataLabelsWrap:T,elGoalsMarkers:P,visibleSeries:this.visibleI,type:i.config.chart.type})})}i.globals.seriesXvalues[p]=f,i.globals.seriesYvalues[p]=d,n.add(u)}return n}drawVerticalBoxPaths({indexes:t,x:e,xDivision:s,barWidth:i,zeroH:a,strokeWidth:o}){var r,n;const c=this.w,l=new E(this.w),h=t.i,d=t.j,{colors:f}=c.config.plotOptions.candlestick,{colors:p}=this.boxOptions,g=t.realIndex,u=F=>Array.isArray(F)?F[g]:F,b=u(f.upward),x=u(f.downward),w=this.yRatio[t.translationsIndex],m=this.getOHLCValue(g,d);let y=a,v=a,C=m.o<m.c?[b]:[x];this.isBoxPlot&&(C=[u(p.lower),u(p.upper)]);let L=Math.min(m.o,m.c),k=Math.max(m.o,m.c),S=m.m;c.axisFlags.isXNumeric&&(e=(c.seriesData.seriesX[g][d]-c.globals.minX)/this.xRatio-i/2);const T=e+i*this.visibleI;typeof(null==(r=this.series[h])?void 0:r[d])>"u"||null===(null==(n=this.series[h])?void 0:n[d])?(L=a,k=a):(L=a-L/w,k=a-k/w,y=a-m.h/w,v=a-m.l/w,S=a-m.m/w);let P,M=l.move(T+i/2,L);if(c.globals.previousPaths.length>0&&(M=this.getPreviousPath(g,d)),this.isOHLC){const F=T+i/2,X=a-m.o/w,Y=a-m.c/w;P=[l.move(F,y)+l.line(F,v)+l.move(F,X)+l.line(T,X)+l.move(F,Y)+l.line(T+i,Y)]}else P=this.isBoxPlot?[l.move(T,L)+l.line(T+i/2,L)+l.line(T+i/2,y)+l.line(T+i/4,y)+l.line(T+i-i/4,y)+l.line(T+i/2,y)+l.line(T+i/2,L)+l.line(T+i,L)+l.line(T+i,S)+l.line(T,S)+l.line(T,L+o/2),l.move(T,S)+l.line(T+i,S)+l.line(T+i,k)+l.line(T+i/2,k)+l.line(T+i/2,v)+l.line(T+i-i/4,v)+l.line(T+i/4,v)+l.line(T+i/2,v)+l.line(T+i/2,k)+l.line(T,k)+l.line(T,S)+"z"]:[l.move(T,k)+l.line(T+i/2,k)+l.line(T+i/2,y)+l.line(T+i/2,k)+l.line(T+i,k)+l.line(T+i,L)+l.line(T+i/2,L)+l.line(T+i/2,v)+l.line(T+i/2,L)+l.line(T,L)+l.line(T,k-o/2)];return M+=l.move(T,L),c.axisFlags.isXNumeric||(e+=s),{pathTo:P,pathFrom:M,x:e,y:k,goalY:this.barHelpers.getGoalValues("y",null,a,h,d,t.translationsIndex),barXPosition:T,color:C}}drawHorizontalBoxPaths({indexes:t,y:e,yDivision:s,barHeight:i,zeroW:a,strokeWidth:o}){var r,n;const c=this.w,l=new E(this.w),h=t.i,d=t.j,f=t.realIndex,{colors:p}=c.config.plotOptions.candlestick,{colors:g}=this.boxOptions,u=P=>Array.isArray(P)?P[f]:P,b=this.invertedYRatio,x=this.getOHLCValue(f,d);let w=x.o<x.c?[u(p.upward)]:[u(p.downward)];this.isBoxPlot&&(w=[u(g.lower),u(g.upper)]);let m=a,y=a,v=Math.min(x.o,x.c),C=Math.max(x.o,x.c),L=x.m;c.axisFlags.isXNumeric&&(e=(c.seriesData.seriesX[f][d]-c.globals.minX)/this.invertedXRatio-i/2);const k=e+i*this.visibleI;typeof(null==(r=this.series[h])?void 0:r[d])>"u"||null===(null==(n=this.series[h])?void 0:n[d])?(v=a,C=a):(v=a+v/b,C=a+C/b,m=a+x.h/b,y=a+x.l/b,L=a+x.m/b);let S=l.move(v,k+i/2);c.globals.previousPaths.length>0&&(S=this.getPreviousPath(f,d));const T=[l.move(v,k)+l.line(v,k+i/2)+l.line(m,k+i/2)+l.line(m,k+i/2-i/4)+l.line(m,k+i/2+i/4)+l.line(m,k+i/2)+l.line(v,k+i/2)+l.line(v,k+i)+l.line(L,k+i)+l.line(L,k)+l.line(v+o/2,k),l.move(L,k)+l.line(L,k+i)+l.line(C,k+i)+l.line(C,k+i/2)+l.line(y,k+i/2)+l.line(y,k+i-i/4)+l.line(y,k+i/4)+l.line(y,k+i/2)+l.line(C,k+i/2)+l.line(C,k)+l.line(L,k)+"z"];return S+=l.move(v,k),c.axisFlags.isXNumeric||(e+=s),{pathTo:T,pathFrom:S,x:C,y:e,goalX:this.barHelpers.getGoalValues("x",a,null,h,d,0),barYPosition:k,color:w}}getOHLCValue(t,e){const s=this.w,i=this.coreUtils,a=h=>h[t]&&null!=h[t][e]?i.getLogValAtSeriesIndex(h[t][e],t):0,o=a(s.candleData.seriesCandleH),r=a(s.candleData.seriesCandleO),n=a(s.candleData.seriesCandleM),c=a(s.candleData.seriesCandleC),l=a(s.candleData.seriesCandleL);return{o:this.isBoxPlot?o:r,h:this.isBoxPlot?r:o,m:n,l:this.isBoxPlot?c:l,c:this.isBoxPlot?l:c}}}class ve{constructor(t,e){this.ctx=e,this.w=t}checkColorRange(){const t=this.w;let e=!1;const s=t.config.plotOptions[t.config.chart.type];return s.colorScale.ranges.length>0&&s.colorScale.ranges.map(i=>{i.from<=0&&(e=!0)}),e}getShadeColor(t,e,s,i){const a=this.w;let o=1;const r=a.config.plotOptions[t].shadeIntensity,n=this.determineColor(t,e,s);a.globals.hasNegs||i?o=a.config.plotOptions[t].reverseNegativeShade?n.percent<0?n.percent/100*(1.25*r):1.25*r*(1-n.percent/100):n.percent<=0?1-(1+n.percent/100)*r:(1-n.percent/100)*r:(o=1-n.percent/100,"treemap"===t&&(o=1.25*r*(1-n.percent/100)));let c=n.color;const l=new D;if(a.config.plotOptions[t].enableShades)if("dark"===this.w.config.theme.mode){const h=l.shadeColor(-1*o,n.color);c=D.hexToRgba(D.isColorHex(h)?h:D.rgb2hex(h),a.config.fill.opacity)}else{const h=l.shadeColor(o,n.color);c=D.hexToRgba(D.isColorHex(h)?h:D.rgb2hex(h),a.config.fill.opacity)}return{color:c,colorProps:n}}determineColor(t,e,s){const i=this.w,a=i.seriesData.series[e][s],o=i.config.plotOptions[t];let r=o.colorScale.inverse?s:e;o.distributed&&"treemap"===i.config.chart.type&&(r=s);let n=i.globals.colors[r],c=null,l=Math.min(...i.seriesData.series[e]),h=Math.max(...i.seriesData.series[e]);!o.distributed&&"heatmap"===t&&(l=i.globals.minY,h=i.globals.maxY),typeof o.colorScale.min<"u"&&(l=o.colorScale.min<i.globals.minY?o.colorScale.min:i.globals.minY,h=o.colorScale.max>i.globals.maxY?o.colorScale.max:i.globals.maxY);const d=Math.abs(h)+Math.abs(l);let f=100*a/(0===d?d-1e-6:d);return o.colorScale.ranges.length>0&&o.colorScale.ranges.map(g=>{if(a>=g.from&&a<=g.to){n=g.color,c=g.foreColor?g.foreColor:null,l=g.from,h=g.to;const u=Math.abs(h)+Math.abs(l);f=100*a/(0===u?u-1e-6:u)}}),{color:n,foreColor:c,percent:f}}calculateDataLabels({text:t,x:e,y:s,i,j:a,colorProps:o,fontSize:r}){const c=this.w.config.dataLabels,l=new E(this.w),h=new dt(this.w,this.ctx);let d=null;if(c.enabled){d=l.group({class:"apexcharts-data-labels"});const p=c.offsetY,g=e+c.offsetX,u=s+parseFloat(c.style.fontSize)/3+p;h.plotDataLabelsText({x:g,y:u,text:t,i,j:a,color:o.foreColor,parent:d,fontSize:r,dataLabelsConfig:c}
1)}return d}}class Vs{constructor(t){this.w=t.w,this.lineCtx=t}sameValueSeriesFix(t,e){const s=this.w;if(("gradient"===s.config.fill.type||"gradient"===s.config.fill.type[t])&&new q(this.lineCtx.w).seriesHaveSameValues(t)){const a=e[t].slice();a[a.length-1]=a[a.length-1]+1e-6,e[t]=a}return e}calculatePoints({series:t,realIndex:e,x:s,y:i,i:a,j:o,prevY:r}){const n=this.w,c=[],l=[];let h=this.lineCtx.categoryAxisCorrection+n.config.markers.offsetX;return n.axisFlags.isXNumeric&&(h=(n.seriesData.seriesX[e][0]-n.globals.minX)/this.lineCtx.xRatio+n.config.markers.offsetX),0===o&&(c.push(h),l.push(D.isNumber(t[a][0])?r+n.config.markers.offsetY:null)),c.push(s+n.config.markers.offsetX),l.push(D.isNumber(t[a][o+1])?i+n.config.markers.offsetY:null),{x:c,y:l}}checkPreviousPaths({pathFromLine:t,pathFromArea:e,realIndex:s}){const i=this.w;for(let a=0;a<i.globals.previousPaths.length;a++){const o=i.globals.previousPaths[a];("line"===o.type||"area"===o.type)&&o.paths.length>0&&parseInt(o.realIndex,10)===parseInt(s,10)&&("line"===o.type?(this.lineCtx.appendPathFrom=!1,t=i.globals.previousPaths[a].paths[0].d):"area"===o.type&&(this.lineCtx.appendPathFrom=!1,e=i.globals.previousPaths[a].paths[0].d,i.config.stroke.show&&i.globals.previousPaths[a].paths[1]&&(t=i.globals.previousPaths[a].paths[1].d)))}return{pathFromLine:t,pathFromArea:e}}determineFirstPrevY({i:t,realIndex:e,series:s,prevY:i,lineYPosition:a,translationsIndex:o}){var r,n,c;const l=this.w,h=l.config.chart.stacked&&!l.globals.comboCharts||l.config.chart.stacked&&l.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null==(r=this.w.config.series[e])?void 0:r.type)||"column"===(null==(n=this.w.config.series[e])?void 0:n.type));if(typeof(null==(c=s[t])?void 0:c[0])<"u")i=(a=h&&t>
10?this.lineCtx.prevSeriesY[t-1][0]:this.lineCtx.zeroY)-s[t][0]/this.lineCtx.yRatio[o]+2*(this.lineCtx.isReversed?s[t][0]/this.lineCtx.yRatio[o]:0);else if(h&&t>0&&typeof s[t][0]>"u")for(let d=t-1;d>=0;d--)if(null!==s[d][0]&&typeof s[d][0]<"u"){i=a=this.lineCtx.prevSeriesY[d][0];break}return{prevY:i,lineYPosition:a}}}const Ae={points(A){const t=(A=>{const t=function Zs(A){const t=[];let e=A[0],s=A[1],i=t[0]=Vt(e,s),a=1;for(let o=A.length-1;a<o;a++)e=s,s=A[a+1],t[a]=.5*(i+(i=Vt(e,s)));return t[a]=i,t}(A),e=A.length-1,i=[];let a,o,r,n;for(let c=0;c<e;c++)r=Vt(A[c],A[c+1]),Math.abs(r)<1e-6?t[c]=t[c+1]=0:(a=t[c]/r,o=t[c+1]/r,n=a*a+o*o,n>9&&(n=3*r/Math.sqrt(n),t[c]=n*a,t[c+1]=n*o));for(let c=0;c<=e;c++)n=(A[Math.min(e,c+1)][0]-A[Math.max(0,c-1)][0])/(6*(1+t[c]*t[c])),i.push([n||0,t[c]*n||0]);return i})(A),e=A[1],s=A[0],i=[],a=t[1],o=t[0];i.push(s,[s[0]+o[0],s[1]+o[1],e[0]-a[0],e[1]-a[1],e[0],e[1]]);for(let r=2,n=t.length;r<n;r++){const c=A[r],l=t[r];i.push([c[0]-l[0],c[1]-l[1],c[0],c[1]])}return i},slice(A,t,e){const s=A.slice(t,e);if(t){if(e-t>1&&s[1].length<6){const i=s[0].length;s[1]=[2*s[0][i-2]-s[0][i-4],2*s[0][i-1]-s[0][i-3]].concat(s[1])}s[0]=s[0].slice(-2)}return s}};function Vt(A,t){return(t[1]-A[1])/(t[0]-A[0])}class Ct{constructor(t,e,s,i){this.ctx=e,this.w=t,this.xyRatios=s,this.xRatio=0,this.yRatio=[],this.zRatio=0,this.baseLineY=[],this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||i,this.scatter=new ee(this.w,this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Vs(this),this.markers=new pt(this.w,this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0,this.xDivision=0,this.zeroY=0,this.areaBottomY=0,this.strokeWidth=0,this.isReversed=!1,this.appendPathFrom=!1,this.elSeries=null,this.elPointsMain=null,this.elDataLabelsWrap=null}draw(t,e,s,i){var a;const o=this.w,r=new E(this.w),n=o.globals.comboCharts?e:o.config.chart.type,c=r.group({class:`apexcharts-${n}-series apexcharts-plot-series`}),l=new q(this.w);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,t=l.getLogSeries(t),this.yRatio=l.getLogYRatios(this.yRatio),this.prevSeriesY=[];const h=[];for(let d=0;d<t.length;d++){t=this.lineHelpers.sameValueSeriesFix(d,t);const f=o.globals.comboCharts?s[d]:d,p=this.yRatio.length>1?f:0;this._initSerieVariables(t,d,f);const g=[],u=[],b=[];let x=o.globals.padHorizontal+this.categoryAxisCorrection;const w=1,m=[],y=[];Z.addCollapsedClassToSeries(this.w,this.elSeries,f),o.axisFlags.isXNumeric&&o.seriesData.seriesX.length>0&&(x=(o.seriesData.seriesX[f][0]-o.globals.minX)/this.xRatio),b.push(x);const v=x;let C;const L=v;let k=this.zeroY,S=this.zeroY;const T=0;k=this.lineHelpers.determineFirstPrevY({i:d,realIndex:f,series:t,prevY:k,lineYPosition:T,translationsIndex:p}).prevY,g.push("monotoneCubic"===o.config.stroke.curve&&null===t[d][0]?null:k);const M=k;let F;"rangeArea"===n&&(F=this.lineHelpers.determineFirstPrevY({i:d,realIndex:f,series:i,prevY:S,lineYPosition:T,translationsIndex:p}),S=F.prevY,C=S,u.push(null!==g[0]?S:null));const X=this._calculatePathsFrom({type:n,series:t,i:d,realIndex:f,translationsIndex:p,prevX:L,prevY:k,prevY2:S}),Y=[g[0]],R=[u[0]],N={type:n,series:t,realIndex:f,translationsIndex:p,i:d,x,y:w,pX:v,pY:M,pathsFrom:X,linePaths:m,areaPaths:y,seriesIndex:s,lineYPosition:T,xArrj:b,yArrj:g,y2Arrj:u,seriesRangeEnd:i},z=this._iterateOverDataPoints(H(I({},N),{iterations:"rangeArea"===n?t[d].length-1:void 0,isRangeStart:!0}));if("rangeArea"===n){const O=this._calculatePathsFrom({series:i,i:d,realIndex:f,prevX:L,prevY:S}),G=this._iterateOverDataPoints(H(I({},N),{series:i,xArrj:[x],yArrj:Y,y2Arrj:R,pY:C,areaPaths:z.areaPaths,pathsFrom:O,iterations:i[d].length-1,isRangeStart:!1})),W=z.linePaths.length/2;for(let U=0;U<W;U++)z.linePaths[U]=G.linePaths[U+W]+z.linePaths[U];z.linePaths.splice(W),z.pathFromLine=G.pathFromLine+z.pathFromLine}else z.pathFromArea+="z";this._handlePaths({type:n,realIndex:f,i:d,paths:z}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),h.push(this.elSeries)}if(typeof(null==(a=o.config.series[0])?void 0:a.zIndex)<"u"&&h.sort((d,f)=>Number(d.node.getAttribute("zIndex"))-Number(f.node.getAttribute("zIndex"))),o.config.chart.stacked)for(let d=h.length-1;d>=0;d--)c.add(h[d]);else for(let d=0;d<h.length;d++)c.add(h[d]);return c}_initSerieVariables(t,e,s){const i=this.w,a=new E(this.w);this.xDivision=i.layout.gridWidth/(i.globals.dataPoints-("on"===i.config.xaxis.tickPlacement?1:0)),this.strokeWidth=Array.isArray(i.config.stroke.width)?i.config.stroke.width[s]:i.config.stroke.width;let o=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[s],o=s),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed,this.zeroY=i.layout.gridHeight-this.baseLineY[o]-(this.isReversed?i.layout.gridHeight:0)+(this.isReversed?2*this.baseLineY[o]:0),this.areaBottomY=this.zeroY,(this.zeroY>i.layout.gridHeight||"end"===i.config.plotOptions.area.fillTo)&&(this.areaBottomY=i.layout.gridHeight),this.categoryAxisCorrection=this.xDivision/2;const r=i.config.series[s];if(this.elSeries=a.group({class:"apexcharts-series",zIndex:typeof r.zIndex<"u"?r.zIndex:s,seriesName:D.escapeString(i.seriesData.seriesNames[s])}),this.elPointsMain=a.group({class:"apexcharts-series-markers-wrap","data:realIndex":s}),i.globals.hasNullValues){const c=this.markers.plotChartMarkers({pointsPos:{x:[0],y:[i.layout.gridHeight+i.globals.markers.largestSize]}
1,seriesIndex:e,j:0,pSize:.1,alwaysDrawMarker:!0,isVirtualPoint:!0});null!==c&&this.elPointsMain.add(c)}this.elDataLabelsWrap=a.group({class:"apexcharts-datalabels","data:realIndex":s}),this.elSeries.attr({"data:longestSeries":t[e].length===i.globals.dataPoints,rel:e+1,"data:realIndex":s}),this.appendPathFrom=!0}_calculatePathsFrom({type:t,series:e,i:s,realIndex:i,translationsIndex:a,prevX:o,prevY:r,prevY2:n}){const c=this.w,l=new E(this.w);let h,d,f,p;if(null===e[s][0]){for(let g=0;g<e[s].length;g++)if(null!==e[s][g]){h=l.move(o=this.xDivision*g,r=this.zeroY-e[s][g]/this.yRatio[a]),d=l.move(o,this.areaBottomY);break}}else h=l.move(o,r),"rangeArea"===t&&(h=l.move(o,n)+l.line(o,r)),d=l.move(o,this.areaBottomY)+l.line(o,r);if(f=l.move(0,this.areaBottomY)+l.line(0,this.areaBottomY),p=l.move(0,this.areaBottomY)+l.line(0,this.areaBottomY),c.globals.previousPaths.length>0){const g=this.lineHelpers.checkPreviousPaths({pathFromLine:f,pathFromArea:p,realIndex:i});f=g.pathFromLine,p=g.pathFromArea}return{prevX:o,prevY:r,linePath:h,areaPath:d,pathFromLine:f,pathFromArea:p}}_handlePaths({type:t,realIndex:e,i:s,paths:i}){const a=this.w,o=new E(this.w),r=new st(this.w);this.prevSeriesY.push(i.yArrj),a.globals.seriesXvalues[e]=i.xArrj,a.globals.seriesYvalues[e]=i.yArrj;const n=a.config.forecastDataPoints;if(n.count>0&&"rangeArea"!==t){const l=a.globals.seriesXvalues[e][a.globals.seriesXvalues[e].length-n.count-1],h=o.drawRect(l,0,a.layout.gridWidth,a.layout.gridHeight,0);a.dom.elForecastMask.appendChild(h.node);const d=o.drawRect(0,0,l,a.layout.gridHeight,0);a.dom.elNonForecastMask.appendChild(d.node)}this.pointsChart||a.globals.delayedElements.push({el:this.elPointsMain.node,index:e});const c={i:s,realIndex:e,animationDelay:s,initialSpeed:a.config.chart.animations.speed,dataChangeSpeed:a.config.chart.animations.dynamicAnimation.speed,className:`apexcharts-${t}`};if("area"===t){const l=r.fillPath({seriesNumber:e});for(let h=0;h<i.areaPaths.length;h++){const d=o.renderPaths(H(I({},c),{pathFrom:i.pathFromArea,pathTo:i.areaPaths[h],stroke:"none",strokeWidth:0,strokeLineCap:null,fill:l}));this.elSeries.add(d)}}if(a.config.stroke.show&&!this.pointsChart){let l=null;if("line"===t)l=r.fillPath({seriesNumber:e,i:s});else if("solid"===a.config.stroke.fill.type)l=a.globals.stroke.colors[e];else{const h=a.config.fill;a.config.fill=a.config.stroke.fill,l=r.fillPath({seriesNumber:e,i:s}),a.config.fill=h}for(let h=0;h<i.linePaths.length;h++){let d=l;"rangeArea"===t&&(d=r.fillPath({seriesNumber:e}));const f=H(I({},c),{pathFrom:i.pathFromLine,pathTo:i.linePaths[h],stroke:l,strokeWidth:this.strokeWidth,strokeLineCap:a.config.stroke.lineCap,fill:"rangeArea"===t?d:"none"}),p=o.renderPaths(f);if(this.elSeries.add(p),p.attr("fill-rule","evenodd"),n.count>0&&"rangeArea"!==t){const g=o.renderPaths(f);g.node.setAttribute("stroke-dasharray",n.dashArray),n.strokeWidth&&g.node.setAttribute("stroke-width",n.strokeWidth),this.elSeries.add(g),g.attr("clip-path",`url(#forecastMask${a.globals.cuid})`),p.attr("clip-path",`url(#nonForecastMask${a.globals.cuid})`)}}}}_iterateOverDataPoints({type:t,series:e,iterations:s,realIndex:i,translationsIndex:a,i:o,x:r,y:n,pX:c,pY:l,pathsFrom:h,linePaths:d,areaPaths:f,seriesIndex:p,lineYPosition:g,xArrj:u,yArrj:b,y2Arrj:x,isRangeStart:w,seriesRangeEnd:m}){var y,v;const C=this.w,L=new E(this.w),k=this.yRatio;let{prevY:S,linePath:T,areaPath:P,pathFromLine:M,pathFromArea:F}=h;const X=D.isNumber(C.globals.minYArr[i])?C.globals.minYArr[i]:C.globals.minY;s||(s=C.globals.dataPoints>1?C.globals.dataPoints-1:C.globals.dataPoints);const Y=(W,U)=>U-W/k[a]+2*(this.isReversed?W/k[a]:0);let R=n;const N=C.config.chart.stacked&&!C.globals.comboCharts||C.config.chart.stacked&&C.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null==(y=this.w.config.series[i])?void 0:y.type)||"column"===(null==(v=this.w.config.series[i])?void 0:v.type));let z=C.config.stroke.curve;Array.isArray(z)&&(z=Array.isArray(p)?z[p[o]]:z[o]);let G,O=0;for(let W=0;W<s&&0!==e[o].length;W++){const U=typeof e[o][W+1]>"u"||null===e[o][W+1];if(C.axisFlags.isXNumeric){let gt=C.seriesData.seriesX[i][W+1];typeof C.seriesData.seriesX[i][W+1]>"u"&&(gt=C.seriesData.seriesX[i][s-1]),r=(gt-C.globals.minX)/this.xRatio}else r+=this.xDivision;g=N&&o>0&&C.globals.collapsedSeries.length<C.config.series.length-1?this.prevSeriesY[(kt=>{for(let at=kt;at>0;at--){if(!(C.globals.collapsedSeriesIndices.indexOf(p?.[at]||at)>-1))return at;at--}return 0})(o-1)][W+1]:this.zeroY,U?n=Y(X,g):(n=Y(e[o][W+1],g),"rangeArea"===t&&(R=Y(m[o][W+1],g))),u.push(null===e[o][W+1]?null:r),!U||"smooth"!==C.config.stroke.curve&&"monotoneCubic"!==C.config.stroke.curve?(b.push(n),x.push(R)):(b.push(null),x.push(null));const St=this.lineHelpers.calculatePoints({series:e,x:r,y:n,realIndex:i,i:o,j:W,prevY:S}),it=this._createPaths({type:t,series:e,i:o,j:W,x:r,y:n,y2:R,xArrj:u,yArrj:b,y2Arrj:x,pX:c,pY:l,pathState:O,segmentStartX:G,linePath:T,areaPath:P,linePaths:d,areaPaths:f,curve:z,isRangeStart:w});f=it.areaPaths,d=it.linePaths,c=it.pX,l=it.pY,O=it.pathState,G=it.segmentStartX,P=it.areaPath,T=it.linePath,this.appendPathFrom&&!C.globals.hasNullValues&&!("monotoneCubic"===z&&"rangeArea"===t)&&(M+=L.line(r,this.areaBottomY),F+=L.line(r,this.areaBottomY)),this.handleNullDataPoints(e,St,o,W,i),this._handleMarkersAndLabels({type:t,pointsPos:St,i:o,j:W,realIndex:i,isRangeStart:w})}return{yArrj:b,xArrj:u,pathFromArea:F,areaPaths:f,pathFromLine:M,linePaths:d,linePath:T,areaPath:P}}_handleMarkersAndLabels({type:t,pointsPos:e,isRangeStart:s,i,j:a,realIndex:o}){const r=this.w,n=new dt(this.w,this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,a,{realIndex:o,pointsPos:e,zRatio:this.zRatio,elParent:this.elPointsMain});else{r.seriesData.series[i].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");const l=this.markers.plotChartMarkers({pointsPos:e,seriesIndex:o,j:a+1});null!==l&&this.elPointsMain.add(l)}const c=n.drawDataLabel({type:t,isRangeStart:s,pos:e,i:o,j:a+1});null!==c&&this.elDataLabelsWrap.add(c)}_createPaths({type:t,series:e,i:s,j:i,x:a,y:o,xArrj:r,yArrj:n,y2:c,y2Arrj:l,pX:h,pY:d,pathState:f,segmentStartX:p,linePath:g,areaPath:u,linePaths:b,areaPaths:x,curve:w,isRangeStart:m}){const y=new E(this.w),v=this.areaBottomY,C="rangeArea"===t,L="rangeArea"===t&&m;switch(w){case"monotoneCubic":{const k=m?n:l,S=(M,F)=>M.map((X,Y)=>[X,F[Y]]).filter(X=>null!==X[1]),T=M=>{const F=[];let X=0;return M.forEach(Y=>{null!==Y?X++:X>0&&(F.push(X),X=0)}),X>0&&F.push(X),F},P=(M,F)=>{const X=T(M),Y=[];for(let R=0,N=0;R<X.length;N+=X[R++])Y[R]=Ae.slice(F,N,N+X[R]);return Y};
vendor: 5,451 bytes, line 1
1switch(f){case 0:if(null===k[i+1])break;f=1;case 1:if(!(C?r.length===e[s].length:i===e[s].length-2))break;case 2:{const M=m?r:r.slice().reverse(),F=m?k:k.slice().reverse(),X=S(M,F),Y=X.length>1?Ae.points(X):X;let R=[];C&&(L?x=X:R=x.reverse());let N=0,z=0;if(P(F,Y).forEach(O=>{N++;const G=(A=>{let t="";for(let e=0;e<A.length;e++){const s=A[e],i=s.length;i>4?(t+=`C${s[0]}, ${s[1]}`,t+=`, ${s[2]}, ${s[3]}`,t+=`, ${s[4]}, ${s[5]}`):i>2&&(t+=`S${s[0]}, ${s[1]}`,t+=`, ${s[2]}, ${s[3]}`)}return t})(O),W=z;z+=O.length;const U=z-1;L?g=y.move(X[W][0],X[W][1])+G:C?g=y.move(R[W][0],R[W][1])+y.line(X[W][0],X[W][1])+G+y.line(R[U][0],R[U][1]):(g=y.move(X[W][0],X[W][1])+G,u=g+y.line(X[U][0],v)+y.line(X[W][0],v)+"z",x.push(u)),b.push(g)}),C&&N>1&&!L){const O=b.slice(N).reverse();b.splice(N),O.forEach(G=>b.push(G))}f=0;break}}break}case"smooth":{const k=.35*(a-h);if(null===e[s][i])f=0;else switch(f){case 0:if(p=h,g=L?y.move(h,l[i])+y.line(h,d):y.move(h,d),u=y.move(h,d),null===e[s][i+1]||typeof e[s][i+1]>"u"){b.push(g),x.push(u);break}if(f=1,i<e[s].length-2){const S=y.curve(h+k,d,a-k,o,a,o);g+=S,u+=S;break}case 1:if(null===e[s][i+1])g+=L?y.line(h,c):y.move(h,d),u+=y.line(h,v)+y.line(p,v)+"z",b.push(g),x.push(u),f=-1;else{const S=y.curve(h+k,d,a-k,o,a,o);g+=S,u+=S,i>=e[s].length-2&&(L&&(g+=y.curve(a,o,a,o,a,c)+y.move(a,c)),u+=y.curve(a,o,a,o,a,v)+y.line(p,v)+"z",b.push(g),x.push(u),f=-1)}}h=a,d=o;break}default:{const k=(S,T,P)=>{let M="";switch(S){case"stepline":M=y.line(T,null,"H")+y.line(null,P,"V");break;case"linestep":M=y.line(null,P,"V")+y.line(T,null,"H");break;case"straight":M=y.line(T,P)}return M};if(null===e[s][i])f=0;else switch(f){case 0:if(p=h,g=L?y.move(h,l[i])+y.line(h,d):y.move(h,d),u=y.move(h,d),null===e[s][i+1]||typeof e[s][i+1]>"u"){b.push(g),x.push(u);break}if(f=1,i<e[s].length-2){const S=k(w,a,o);g+=S,u+=S;break}case 1:if(null===e[s][i+1])g+=L?y.line(h,c):y.move(h,d),u+=y.line(h,v)+y.line(p,v)+"z",b.push(g),x.push(u),f=-1;else{const S=k(w,a,o);g+=S,u+=S,i>=e[s].length-2&&(L&&(g+=y.line(a,c)),u+=y.line(a,v)+y.line(p,v)+"z",b.push(g),x.push(u),f=-1)}}h=a,d=o;break}}return{linePaths:b,areaPaths:x,pX:h,pY:d,pathState:f,segmentStartX:p,linePath:g,areaPath:u}}handleNullDataPoints(t,e,s,i,a){const o=this.w;if(null===t[s][i]&&o.config.markers.showNullDataPoints||1===t[s].length){let r=this.strokeWidth-o.config.markers.strokeWidth/2;r>0||(r=0);const n=this.markers.plotChartMarkers({pointsPos:e,seriesIndex:a,j:i+1,pSize:r,alwaysDrawMarker:!0});null!==n&&this.elPointsMain.add(n)}}}class Ce{constructor(t){this.w=t}drawYAxisTexts(t,e,s,i){const a=this.w,o=a.config.yaxis[0],r=a.formatters.yLabelFormatters[0];return new E(this.w).drawText({x:t+o.labels.offsetX,y:e+o.labels.offsetY,text:r(i,s),textAnchor:"middle",fontSize:o.labels.style.fontSize,fontFamily:o.labels.style.fontFamily,foreColor:Array.isArray(o.labels.style.colors)?o.labels.style.colors[s]:o.labels.style.colors})}}class Et{constructor(t,e){this.ctx=e,this.w=t,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.layout.gridWidth,t.layout.gridHeight),this.centerY=this.defaultSize/2,this.centerX=t.layout.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;const s=t.config.plotOptions.pie.customScale,i=t.layout.gridWidth/2,a=t.layout.gridHeight/2;this.translateX=i-i*s,this.translateY=a-a*s,this.dataLabelsGroup=new E(this.w).group({class:"apexcharts-datalabels-group",transform:`translate(${this.translateX}, ${this.translateY}) scale(${s})`}),this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSectorAngleArr=[]}draw(t){const s=this.w,i=new E(this.w),a=i.group({class:"apexcharts-pie"});if(s.globals.noData)return a;let o=0;for(let l=0;l<t.length;l++)o+=D.negToZero(t[l]);const r=[],n=i.group();0===o&&(o=1e-5),t.forEach(l=>{this.maxY=Math.max(this.maxY,l)}),s.config.yaxis[0].max&&(this.maxY=s.config.yaxis[0].max),"back"===s.config.grid.position&&"polarArea"===this.chartType&&this.drawPolarElements(a);for(let l=0;l<t.length;l++){const h=this.fullAngle*D.negToZero(t[l])/o;r.push(h),"polarArea"===this.chartType?(r[l]=this.fullAngle/t.length,this.sliceSizes.push(s.globals.radialSize*t[l]/this.maxY)):this.sliceSizes.push(s.globals.radialSize)}if(s.globals.dataChanged){let h,l=0;for(let d=0;d<s.globals.previousPaths.length;d++)l+=D.negToZero(s.globals.previousPaths[d]);for(let d=0;d<s.globals.previousPaths.length;d++)h=this.fullAngle*D.negToZero(s.globals.previousPaths[d])/l,this.prevSectorAngleArr.push(h)}if(this.donutSize<0&&(this.donutSize=0),"donut"===this.chartType){const l=i.drawCircle(this.donutSize);l.attr({cx:this.centerX,cy:this.centerY,fill:s.config.plotOptions.pie.donut.background?s.config.plotOptions.pie.donut.background:"transparent"}),n.add(l)}const c=this.drawArcs(r,t);
1if(this.sliceLabels.forEach(l=>{c.add(l)}),n.attr({transform:`translate(${this.translateX}, ${this.translateY}) scale(${s.config.plotOptions.pie.customScale})`}),n.add(c),a.add(n),this.donutDataLabels.show){const l=this.renderInnerDataLabels(this.dataLabelsGroup,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});a.add(l)}return"front"===s.config.grid.position&&"polarArea"===this.chartType&&this.drawPolarElements(a),a}drawArcs(t,e){const s=this.w,i=new J(this.w),a=new E(this.w),o=new st(this.w),r=a.group({class:"apexcharts-slices"});let n=this.initialAngle,c=this.initialAngle,l=this.initialAngle,h=this.initialAngle;this.strokeWidth=s.config.stroke.show?s.config.stroke.width:0;for(let d=0;d<t.length;d++){const f=a.group({class:"apexcharts-series apexcharts-pie-series",seriesName:D.escapeString(s.seriesData.seriesNames[d]),rel:d+1,"data:realIndex":d});r.add(f),n=l,c=h,l=n+t[d],h=c+this.prevSectorAngleArr[d];const p=l<n?this.fullAngle+l-n:l-n,g=o.fillPath({seriesNumber:d,size:this.sliceSizes[d],value:e[d]}),u=this.getChangedPath(c,h),b=a.drawPath({d:u,stroke:Array.isArray(this.lineColorArr)?this.lineColorArr[d]:this.lineColorArr,strokeWidth:0,fill:g,fillOpacity:s.config.fill.opacity,classes:`apexcharts-pie-area apexcharts-${this.chartType.toLowerCase()}-slice-${d}`});b.attr({index:0,j:d}),i.setSelectionFilter(b,0,d),s.config.chart.dropShadow.enabled&&i.dropShadow(b,s.config.chart.dropShadow,d),this.addListeners(b,this.donutDataLabels);let x={x:0,y:0};const w=(n+p/2)%this.fullAngle;let m={x:this.centerX,y:this.centerY};"pie"===this.chartType||"polarArea"===this.chartType?(x=D.polarToCartesian(this.centerX,this.centerY,s.globals.radialSize/1.25+s.config.plotOptions.pie.dataLabels.offset,w),m=D.polarToCartesian(this.centerX,this.centerY,s.globals.radialSize/2,w)):"donut"===this.chartType&&(x=D.polarToCartesian(this.centerX,this.centerY,(s.globals.radialSize+this.donutSize)/2+s.config.plotOptions.pie.dataLabels.offset,w),m=D.polarToCartesian(this.centerX,this.centerY,(s.globals.radialSize+this.donutSize)/2,w)),E.setAttrs(b.node,{"data:angle":p,"data:startAngle":n,"data:strokeWidth":this.strokeWidth,"data:value":e[d],"data:cx":m.x,"data:cy":m.y}),f.add(b);let y=0;if(!this.initialAnim||s.globals.resized||s.globals.dataChanged?this.animBeginArr.push(0):(y=p/this.fullAngle*s.config.chart.animations.speed,0===y&&(y=1),this.animDur=y+this.animDur,this.animBeginArr.push(this.animDur)),this.animatePaths(b,this.dynamicAnim&&s.globals.dataChanged?{size:this.sliceSizes[d],endAngle:l,startAngle:n,prevStartAngle:c,prevEndAngle:h,animateStartingPos:!0,i:d,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:s.config.chart.animations.dynamicAnimation.speed}:{size:this.sliceSizes[d],endAngle:l,startAngle:n,i:d,totalItems:t.length-1,animBeginArr:this.animBeginArr,dur:y}),s.config.plotOptions.pie.expandOnClick&&"polarArea"!==this.chartType&&b.node.addEventListener("mouseup",this.pieClicked.bind(this,d)),typeof s.interact.selectedDataPoints[0]<"u"&&s.interact.selectedDataPoints[0].indexOf(d)>-1&&this.pieClicked(d),s.config.dataLabels.enabled){const v=x.x,C=x.y;let L=100*p/this.fullAngle+"%";if(0!==p&&s.config.plotOptions.pie.dataLabels.minAngleToShowLabel<t[d]){const k=s.config.dataLabels.formatter;
1void 0!==k&&(L=k(s.globals.seriesPercent[d][0],{seriesIndex:d,w:s}));const S=s.globals.dataLabels.style.colors[d],T=a.group({class:"apexcharts-datalabels"}),P=a.drawText({x:v,y:C,text:L,textAnchor:"middle",fontSize:s.config.dataLabels.style.fontSize,fontFamily:s.config.dataLabels.style.fontFamily,fontWeight:s.config.dataLabels.style.fontWeight,foreColor:S});T.add(P),s.config.dataLabels.dropShadow.enabled&&i.dropShadow(P,s.config.dataLabels.dropShadow),P.node.classList.add("apexcharts-pie-label"),s.config.chart.animations.animate&&!1===s.globals.resized&&(P.node.classList.add("apexcharts-pie-label-delay"),P.node.style.animationDelay=s.config.chart.animations.speed/940+"s"),this.sliceLabels.push(T)}}}return r}addListeners(t,e){const s=new E(this.w);t.node.addEventListener("mouseenter",s.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",s.pathMouseLeave.bind(this,t)),t.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this)),t.node.addEventListener("mousedown",s.pathMouseDown.bind(this,t)),this.donutDataLabels.total.showAlways||(t.node.addEventListener("mouseenter",this.printDataLabelsInner.bind(this,t.node,e)),t.node.addEventListener("mousedown",this.printDataLabelsInner.bind(this,t.node,e)))}animatePaths(t,e){let a=e.endAngle<e.startAngle?this.fullAngle+e.endAngle-e.startAngle:e.endAngle-e.startAngle,o=a,r=e.startAngle;const n=e.startAngle;void 0!==e.prevStartAngle&&void 0!==e.prevEndAngle&&(r=e.prevEndAngle,o=e.prevEndAngle<e.prevStartAngle?this.fullAngle+e.prevEndAngle-e.prevStartAngle:e.prevEndAngle-e.prevStartAngle),e.i===this.w.config.series.length-1&&(a+n>this.fullAngle?e.endAngle=e.endAngle-(a+n):a+n<this.fullAngle&&(e.endAngle=e.endAngle+(this.fullAngle-(a+n)))),a===this.fullAngle&&(a=this.fullAngle-.01),this.animateArc(t,r,n,a,o,e)}animateArc(t,e,s,i,a,o){const r=this,n=this.w,c=new ft(this.w),l=o.size;let h;(isNaN(e)||isNaN(a))&&(e=s,a=i,o.dur=0);let d=i,f=s;const p=e<s?this.fullAngle+e-s:e-s;n.globals.dataChanged&&o.shouldSetPrevPaths&&o.prevEndAngle&&(h=r.getPiePath({me:r,startAngle:o.prevStartAngle,angle:o.prevEndAngle<o.prevStartAngle?this.fullAngle+o.prevEndAngle-o.prevStartAngle:o.prevEndAngle-o.prevStartAngle,size:l}),t.attr({d:h})),0!==o.dur?t.animate(o.dur,o.animBeginArr[o.i]).after(function(){("pie"===r.chartType||"donut"===r.chartType||"polarArea"===r.chartType)&&this.animate(n.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":r.strokeWidth}),o.i===n.config.series.length-1&&c.animationCompleted(t)}).during(g=>{d=p+(i-p)*g,o.animateStartingPos&&(d=a+(i-a)*g,f=e-a+(s-(e-a))*g),h=r.getPiePath({me:r,startAngle:f,angle:d,size:l}),t.node.setAttribute("data:pathOrig",h),t.attr({d:h})}):(h=r.getPiePath({me:r,startAngle:f,angle:i,size:l}),o.isTrack||(n.globals.animationEnded=!0),t.node.setAttribute("data:pathOrig",h),t.attr({d:h,"stroke-width":r.strokeWidth}))}pieClicked(t){const e=this.w,s=this,i=s.sliceSizes[t]+(e.config.plotOptions.pie.expandOnClick?4:0),a=e.dom.Paper.findOne(`.apexcharts-${s.chartType.toLowerCase()}-slice-${t}`);if("true"===a.attr("data:pieClicked")){a.attr({"data:pieClicked":"false"}),this.revertDataLabelsInner();const c=a.attr("data:pathOrig");return void a.attr({d:c})}{const c=e.dom.baseEl.getElementsByClassName("apexcharts-pie-area");Array.prototype.forEach.call(c,l=>{l.setAttribute("data:pieClicked","false");const h=l.getAttribute("data:pathOrig");h&&l.setAttribute("d",h)}),e.interact.capturedDataPointIndex=t,a.attr("data:pieClicked","true")}const o=parseInt(a.attr("data:startAngle"),10),r=parseInt(a.attr("data:angle"),10),n=s.getPiePath({me:s,startAngle:o,angle:r,size:i});360!==r&&a.plot(n)}getChangedPath(t,e){let s="";return this.dynamicAnim&&this.w.globals.dataChanged&&(s=this.getPiePath({me:this,startAngle:t,angle:e-t,size:this.size})),s}getPiePath({me:t,startAngle:e,angle:s,size:i}){let a;const o=new E(this.w),r=e,n=Math.PI*(r-90)/180;let c=s+e;Math.ceil(c)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(c=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(c)>this.fullAngle&&(c-=this.fullAngle);const l=Math.PI*(c-90)/180,h=t.centerX+i*Math.cos(n),d=t.centerY+i*Math.sin(n),f=t.centerX+i*Math.cos(l),p=t.centerY+i*Math.sin(l),g=D.polarToCartesian(t.centerX,t.centerY,t.donutSize,c),u=D.polarToCartesian(t.centerX,t.centerY,t.donutSize,r),b=s>180?1:0,x=["M",h,d,"A",i,i,0,b,1,f,p];return a="donut"===t.chartType?[...x,"L",g.x,g.y,"A",t.donutSize,t.donutSize,0,b,0,u.x,u.y,"L",h,d,"z"].join(" "):"pie"===t.chartType||"polarArea"===t.chartType?[...x,"L",t.centerX,t.centerY,"L",h,d].join(" "):[...x].join(" "),o.roundPathCorners(a,2*this.strokeWidth)}drawPolarElements(t){const e=this.w,s=new ie(this.w),i=new E(this.w),a=new Ce(this.w),o=i.group(),r=i.group(),n=s.niceScale(0,Math.ceil(this.maxY),0),c=n.result.reverse(),l=n.result.length;this.maxY=n.niceMax;let h=e.globals.radialSize;const d=h/(l-1);for(let f=0;f<l-1;f++){const p=i.drawCircle(h);if(p.attr({cx:this.centerX,cy:this.centerY,fill:"none","stroke-width":e.config.plotOptions.polarArea.r
vendor: 4,655 bytes, line 1
1ings.strokeWidth,stroke:e.config.plotOptions.polarArea.rings.strokeColor}),e.config.yaxis[0].show){const g=a.drawYAxisTexts(this.centerX,this.centerY-h+parseInt(e.config.yaxis[0].labels.style.fontSize,10)/2,f,c[f]);r.add(g)}o.add(p),h-=d}this.drawSpokes(t),t.add(o),t.add(r)}renderInnerDataLabels(t,e,s){const i=this.w,a=new E(this.w),o=e.total.show;t.node.innerHTML="",t.node.style.opacity=s.opacity;const r=s.centerX,n=this.donutDataLabels.total.label?s.centerY:s.centerY-s.centerY/6;let c,l;c=void 0===e.name.color?i.globals.colors[0]:e.name.color;let h=e.name.fontSize,d=e.name.fontFamily,f=e.name.fontWeight;l=void 0===e.value.color?i.config.chart.foreColor:e.value.color;const p=e.value.formatter;let g="",u="";if(o?(c=e.total.color,h=e.total.fontSize,d=e.total.fontFamily,f=e.total.fontWeight,u=this.donutDataLabels.total.label?e.total.label:"",g=e.total.formatter(i)):1===i.seriesData.series.length&&(g=p(i.seriesData.series[0],i),u=i.seriesData.seriesNames[0]),u&&(u=e.name.formatter(u,e.total.show,i)),e.name.show){const b=a.drawText({x:r,y:n+parseFloat(e.name.offsetY),text:u,textAnchor:"middle",foreColor:c,fontSize:h,fontWeight:f,fontFamily:d});b.node.classList.add("apexcharts-datalabel-label"),t.add(b)}if(e.value.show){const b=e.name.show?parseFloat(e.value.offsetY)+16:e.value.offsetY,x=a.drawText({x:r,y:n+b,text:g,textAnchor:"middle",foreColor:l,fontWeight:e.value.fontWeight,fontSize:e.value.fontSize,fontFamily:e.value.fontFamily});x.node.classList.add("apexcharts-datalabel-value"),t.add(x)}return t}printInnerLabels(t,e,s,i){const a=this.w;let o;i?o=void 0===t.name.color?a.globals.colors[parseInt(i.parentNode.getAttribute("rel"),10)-1]:t.name.color:a.seriesData.series.length>1&&t.total.show&&(o=t.total.color);const r=a.dom.baseEl.querySelector(".apexcharts-datalabel-label"),n=a.dom.baseEl.querySelector(".apexcharts-datalabel-value");s=(0,t.value.formatter)(s,a),!i&&"function"==typeof t.total.formatter&&(s=t.total.formatter(a)),e=this.donutDataLabels.total.label?t.name.formatter(e,e===t.total.label,a):"",null!==r&&(r.textContent=e),null!==n&&(n.textContent=s),null!==r&&(r.style.fill=o)}printDataLabelsInner(t,e){const s=this.w,i=t.getAttribute("data:value"),a=s.seriesData.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];s.seriesData.series.length>1&&this.printInnerLabels(e,a,i,t);const o=s.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==o&&(o.style.opacity="1")}drawSpokes(t){const e=this.w,s=new E(this.w),i=e.config.plotOptions.polarArea.spokes;if(0===i.strokeWidth)return;const a=[],o=360/e.seriesData.series.length;for(let r=0;r<e.seriesData.series.length;r++)a.push(D.polarToCartesian(this.centerX,this.centerY,e.globals.radialSize,e.config.plotOptions.pie.startAngle+o*r));a.forEach((r,n)=>{const c=s.drawLine(r.x,r.y,this.centerX,this.centerY,Array.isArray(i.connectorColors)?i.connectorColors[n]:i.connectorColors);t.add(c)})}revertDataLabelsInner(){const t=this.w;if(this.donutDataLabels.show){const e=t.dom.Paper.findOne(".apexcharts-datalabels-group"),s=this.renderInnerDataLabels(e,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});t.dom.Paper.findOne(".apexcharts-radialbar, .apexcharts-pie").add(s)}}}function Se(A,t){let e=0;for(let a=0;a<A.length;a++)e+=A[a];const s=t/e,i=new Array(A.length);for(let a=0;a<A.length;a++)i[a]=A[a]*s;return i}function ke(A,t,e,s){const i=s*s,a=e*e;return Math.max(i*t/a,a/(i*A))}function Qs(A,t,e,s,i,a){return 0===A||ke(t,e,s,a)>=ke(Math.min(t,i),Math.max(e,i),s+i,a)}function Le(A,t,e,s,i,a,o,r){if(o>=r){const n=s/r;let c=a;for(let l=0;l<e;l++){const h=t[l]/n;A.push([i,c,i+n,c+h]),c+=h}}else{const n=s/o;let c=i;for(let l=0;l<e;l++){const h=t[l]/n;A.push([c,a,c+h,a+n]),c+=h}}}function De(A,t,e,s,i){const a=[],o=A.length;if(0===o)return a;const r=new Array(o);let n=0,c=0,l=1/0,h=-1/0,d=0;for(;d<o;){const f=Math.min(s,i),p=A[d];if(Qs(n,l,h,c,p,f))r[n]=p,n++,c+=p,p<l&&(l=p),p>h&&(h=p),d++;else{if(Le(a,r,n,c,t,e,s,i),s>=i){const g=c/i;t+=g,s-=g}else{const g=c/s;e+=g,i-=g}n=0,c=0,l=1/0,h=-1/0}}return n>0&&Le(a,r,n,c,t,e,s,i),a}const ei_generate=function ti(A,t,e){const s=A.length,i=new Array(s);for(let r=0;r<s;r++){let n=0;const c=A[r];for(let l=0;l<c.length;l++)n+=c[l];i[r]=n}const a=De(Se(i,t*e),0,0,t,e),o=new Array(s);for(let r=0;r<s;r++){const n=a[r],c=n[0],l=n[1],h=n[2]-c,d=n[3]-l;o[r]=De(Se(A[r],h*d),c,l,h,d)}return o};ot.use({line:Ct,area:Ct,scatter:Ct,bubble:Ct,rangeArea:Ct,bar:ut,column:ut,barStacked:class Gs extends ut{draw(t,e){const s=this.w;this.graphics=new E(this.w),this.bar=new ut(this.w,this.ctx,this.xyRatios);const i=new q(this.w);
vendor: 4,201 bytes, line 1
1t=i.getLogSeries(t),this.yRatio=i.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),"100%"===s.config.chart.stackType&&(t=s.globals.comboCharts?e.map(n=>s.globals.seriesPercent[n]):s.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);const a=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"});let o=0,r=0;for(let n=0,c=0;n<t.length;n++,c++){const l=s.globals.comboCharts?e[n]:n,{groupIndex:h,columnGroupIndex:d}=this.barHelpers.getGroupIndex(l);this.groupCtx=this[s.labelData.seriesGroups[h]];const f=[],p=[];let g=0;this.yRatio.length>1&&(this.yaxisIndex=s.globals.seriesYAxisReverseMap[l][0],g=l),this.isReversed=s.config.yaxis[this.yaxisIndex]&&s.config.yaxis[this.yaxisIndex].reversed;let u=this.graphics.group({class:"apexcharts-series",seriesName:D.escapeString(s.seriesData.seriesNames[l]),rel:n+1,"data:realIndex":l});Z.addCollapsedClassToSeries(this.w,u,l);const b=this.graphics.group({class:"apexcharts-datalabels","data:realIndex":l}),x=this.graphics.group({class:"apexcharts-bar-goals-markers"}),w=this.initialPositions(o,r,void 0,void 0,void 0,void 0,g),{xDivision:m,yDivision:y,zeroH:v,zeroW:C}=w;let L=w.barHeight,k=w.barWidth;r=w.y,o=w.x,s.globals.barHeight=L,s.globals.barWidth=k,this.barHelpers.initializeStackedXYVars(this),1===this.groupCtx.prevY.length&&this.groupCtx.prevY[0].every(S=>isNaN(S))&&(this.groupCtx.prevY[0]=this.groupCtx.prevY[0].map(()=>v),this.groupCtx.prevYF[0]=this.groupCtx.prevYF[0].map(()=>0));for(let S=0;S<s.globals.dataPoints;S++){const T=this.barHelpers.getStrokeWidth(n,S,l),P={indexes:{i:n,j:S,realIndex:l,translationsIndex:g,bc:c},strokeWidth:T,x:o,y:r,elSeries:u,columnGroupIndex:d,seriesGroup:s.labelData.seriesGroups[h]};let M=null;this.isHorizontal?(M=this.drawStackedBarPaths(H(I({},P),{zeroW:C,barHeight:L,yDivision:y})),k=this.series[n][S]/this.invertedYRatio):(M=this.drawStackedColumnPaths(H(I({},P),{xDivision:m,barWidth:k,zeroH:v})),L=this.series[n][S]/this.yRatio[g]);const F=this.barHelpers.drawGoalLine({barXPosition:M.barXPosition,barYPosition:M.barYPosition,goalX:M.goalX,goalY:M.goalY,barHeight:L,barWidth:k});F&&x.add(F),r=M.y,o=M.x,f.push(o),p.push(r);const X=this.barHelpers.getPathFillColor(t,n,S,l);let Y="";("bottom"===this.barHelpers.arrBorderRadius[l][S]&&s.seriesData.series[l][S]>0||"top"===this.barHelpers.arrBorderRadius[l][S]&&s.seriesData.series[l][S]<0)&&(Y=s.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y"),u=this.renderSeries(H(I({realIndex:l,pathFill:X.color},X.useRangeColor?{lineFill:X.color}:{}),{j:S,i:n,columnGroupIndex:d,pathFrom:M.pathFrom,pathTo:M.pathTo,strokeWidth:T,elSeries:u,x:o,y:r,series:t,barHeight:L,barWidth:k,elDataLabelsWrap:b,elGoalsMarkers:x,type:"bar",visibleSeries:d,classes:Y}))}s.globals.seriesXvalues[l]=f,s.globals.seriesYvalues[l]=p,this.groupCtx.prevY.push(this.groupCtx.yArrj),this.groupCtx.prevYF.push(this.groupCtx.yArrjF),this.groupCtx.prevYVal.push(this.groupCtx.yArrjVal),this.groupCtx.prevX.push(this.groupCtx.xArrj),this.groupCtx.prevXF.push(this.groupCtx.xArrjF),this.groupCtx.prevXVal.push(this.groupCtx.xArrjVal),a.add(u)}return a}initialPositions(t,e,s,i,a,o,r){const n=this.w;let c,l;if(this.isHorizontal){i=n.layout.gridHeight/n.globals.dataPoints;const d=n.config.plotOptions.bar.barHeight;c=-1===String(d).indexOf("%")?parseInt(d,10):i*parseInt(d,10)/100,o=n.globals.padHorizontal+(this.isReversed?n.layout.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),e=(i-c)/2}else{l=s=n.layout.gridWidth/n.globals.dataPoints;const d=n.config.plotOptions.bar.columnWidth;n.axisFlags.isXNumeric&&n.globals.dataPoints>1?l=(s=n.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:-1===String(d).indexOf("%")?l=parseInt(d,10):l*=parseInt(d,10)/100,a=this.isReversed?this.baseLineY[r]:n.layout.gridHeight-this.baseLineY[r],t=n.globals.padHorizontal+(s-l)/2}const h=n.globals.barGroups.length||1;return{x:t,y:e,yDivision:i,xDivision:s,barHeight:(c??0)/h,barWidth:(l??0)/h,zeroH:a,zeroW:o}}drawStackedBarPaths({indexes:t,barHeight:e,strokeWidth:s,zeroW:i,x:a,y:o,columnGroupIndex:r,seriesGroup:n,yDivision:c,elSeries:l}){var h,d,f,p,g;const u=this.w,b=o+r*e;let x;
1const w=t.i,m=t.j,y=t.realIndex,v=t.translationsIndex;let C=0;for(let S=0;S<this.groupCtx.prevXF.length;S++)C+=this.groupCtx.prevXF[S][m];let L=w;if(u.config.series[y].name&&(L=n.indexOf(u.config.series[y].name)),L>0){let S=i;this.groupCtx.prevXVal[L-1][m]<0?S=(null==(h=this.series[w])?void 0:h[m])>=0?this.groupCtx.prevX[L-1][m]+C-2*(this.isReversed?C:0):this.groupCtx.prevX[L-1][m]:this.groupCtx.prevXVal[L-1][m]>=0&&(S=(null==(d=this.series[w])?void 0:d[m])>=0?this.groupCtx.prevX[L-1][m]:this.groupCtx.prevX[L-1][m]-C+2*(this.isReversed?C:0)),x=S}else x=i;a=null===(null==(f=this.series[w])?void 0:f[m])?x:x+(null==(p=this.series[w])?void 0:p[m])/this.invertedYRatio-2*(this.isReversed?(null==(g=this.series[w])?void 0:g[m])/this.invertedYRatio:0);const k=this.barHelpers.getBarpaths({barYPosition:b,barHeight:e,x1:x,x2:a,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,seriesGroup:n,i:w,j:m,w:u});return this.barHelpers.barBackground({j:m,i:w,y1:b,y2:e,elSeries:l}),o+=c,{pathTo:k.pathTo,pathFrom:k.pathFrom,goalX:this.barHelpers.getGoalValues("x",i,null,w,m,v),barXPosition:x,barYPosition:b,x:a,y:o}}drawStackedColumnPaths({indexes:t,x:e,y:s,xDivision:i,barWidth:a,zeroH:o,columnGroupIndex:r,seriesGroup:n,elSeries:c}){var l,h,d,f,p,g,u,b,x;const w=this.w,m=t.i,y=t.j,v=t.bc,C=t.realIndex,L=t.translationsIndex;if(w.axisFlags.isXNumeric){let F=w.seriesData.seriesX[C][y];F||(F=0),e=(F-w.globals.minX)/this.xRatio-a/2*w.globals.barGroups.length}const k=e+r*a;let S,T=0;for(let F=0;F<this.groupCtx.prevYF.length;F++)T+=isNaN(this.groupCtx.prevYF[F][y])?0:this.groupCtx.prevYF[F][y];let P=m;if(n&&(P=n.indexOf(w.seriesData.seriesNames[C])),P>0&&!w.axisFlags.isXNumeric||P>0&&w.axisFlags.isXNumeric&&w.seriesData.seriesX[C-1][y]===w.seriesData.seriesX[C][y]){let F,X;const Y=Math.min(this.yRatio.length+1,C+1);if(void 0!==this.groupCtx.prevY[P-1]&&this.groupCtx.prevY[P-1].length)for(let R=1;R<Y;R++)if(!isNaN(null==(l=this.groupCtx.prevY[P-R])?void 0:l[y])){X=this.groupCtx.prevY[P-R][y];break}for(let R=1;R<Y;R++){if((null==(h=this.groupCtx.prevYVal[P-R])?void 0:h[y])<0){F=(null==(d=this.series[m])?void 0:d[y])>=0?X-T+2*(this.isReversed?T:0):X;break}if((null==(f=this.groupCtx.prevYVal[P-R])?void 0:f[y])>=0){F=(null==(p=this.series[m])?void 0:p[y])>=0?X:X+T-2*(this.isReversed?T:0);break}}typeof F>"u"&&(F=w.layout.gridHeight),S=null!=(g=this.groupCtx.prevYF[0])&&g.every(R=>0===R)&&this.groupCtx.prevYF.slice(1,P).every(R=>R.every(N=>isNaN(N)))?o:F}else S=o;s=null!=(u=this.series[m])&&u[y]?S-(null==(b=this.series[m])?void 0:b[y])/this.yRatio[L]+2*(this.isReversed?(null==(x=this.series[m])?void 0:x[y])/this.yRatio[L]:0):S;const M=this.barHelpers.getColumnPaths({barXPosition:k,barWidth:a,y1:S,y2:s,yRatio:this.yRatio[L],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:n,realIndex:t.realIndex,i:m,j:y,w});return this.barHelpers.barBackground({bc:v,j:y,i:m,x1:k,x2:a,elSeries:c}),{pathTo:M.pathTo,pathFrom:M.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,o,m,y,0),barXPosition:k,x:w.axisFlags.isXNumeric?e:e+i,y:s}}},rangeBar:class Js extends ut{draw(t,e){var s,i,a,o,r,n,c,l,h;const d=this.w,f=new E(this.w);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=d.rangeData.seriesRangeStart,this.seriesRangeEnd=d.rangeData.seriesRangeEnd,this.barHelpers.initVariables(t);const p=f.group({class:"apexcharts-rangebar-series apexcharts-plot-series"});for(let g=0;g<t.length;g++){let u,b;const x=d.globals.comboCharts?e[g]:g,{columnGroupIndex:w}=this.barHelpers.getGroupIndex(x),m=f.group({class:"apexcharts-series",seriesName:D.escapeString(d.seriesData.seriesNames[x]),rel:g+1,"data:realIndex":x});Z.addCollapsedClassToSeries(this.w,m,x),t[g].length>0&&(this.visibleI=this.visibleI+1);let y=0;this.yRatio.length>1&&(this.yaxisIndex=d.globals.seriesYAxisReverseMap[x][0],y=x);const v=this.barHelpers.initialPositions(x),{y:C,zeroW:L,x:k,zeroH:S}=v;let T=null!=(s=v.barWidth)?s:0,P=null!=(i=v.barHeight)?i:0;const M=null!=(a=v.yDivision)?a:0,F=null!=(o=v.xDivision)?o:0;b=C,u=k;const X=f.group({class:"apexcharts-datalabels","data:realIndex":x}),Y=f.group({class:"apexcharts-rangebar-goals-markers"});for(let R=0;R<d.globals.dataPoints;R++){const N=this.barHelpers.getStrokeWidth(g,R,x),z=this.seriesRangeStart[g][R],O=this.seriesRangeEnd[g][R];let G=null,W=null,U=null;const St={x:u,y:b,strokeWidth:N,elSeries:m};let it=this.seriesLen;if(d.config.plotOptions.bar.rangeBarGroupRows&&(it=1),typeof(null==(r=d.config.series[g].data)?void 0:r[R])>"u")break;if(this.isHorizontal){if(U=b+P*this.visibleI,null!=(c=null==(n=d.config.series[g].data)?void 0:n[R]
vendor: 4,184 bytes, line 1
1)&&c.x){const Lt=this.detectOverlappingBars({i:g,j:R,barYPosition:U,srty:(M-P*it)/2,barHeight:P,yDivision:M,initPositions:v});P=Lt.barHeight,U=Lt.barYPosition}G=this.drawRangeBarPaths(I({indexes:{i:g,j:R,realIndex:x},barHeight:P,barYPosition:U,zeroW:L,yDivision:M,y1:z,y2:O},St)),T=G.barWidth}else{if(d.axisFlags.isXNumeric&&(u=(d.seriesData.seriesX[g][R]-d.globals.minX)/this.xRatio-T/2),W=u+T*this.visibleI,null!=(h=null==(l=d.config.series[g].data)?void 0:l[R])&&h.x){const Lt=this.detectOverlappingBars({i:g,j:R,barXPosition:W,srtx:(F-T*it)/2,barWidth:T,xDivision:F,initPositions:v});T=Lt.barWidth,W=Lt.barXPosition}G=this.drawRangeColumnPaths(I({indexes:{i:g,j:R,realIndex:x,translationsIndex:y},barWidth:T,barXPosition:W,zeroH:S,xDivision:F},St)),P=G.barHeight}const gt=this.barHelpers.drawGoalLine({barXPosition:G.barXPosition,barYPosition:U,goalX:G.goalX,goalY:G.goalY,barHeight:P,barWidth:T});gt&&Y.add(gt),b=G.y,u=G.x;const kt=this.barHelpers.getPathFillColor(t,g,R,x);this.renderSeries({realIndex:x,pathFill:kt.color,lineFill:kt.useRangeColor?kt.color:d.globals.stroke.colors[x],j:R,i:g,x:u,y:b,y1:z,y2:O,pathFrom:G.pathFrom,pathTo:G.pathTo,strokeWidth:N,elSeries:m,series:t,barHeight:P,barWidth:T,barXPosition:W,barYPosition:U,columnGroupIndex:w,elDataLabelsWrap:X,elGoalsMarkers:Y,visibleSeries:this.visibleI,type:"rangebar"})}p.add(m)}return p}detectOverlappingBars({i:t,j:e,barYPosition:s,barXPosition:i,srty:a,srtx:o,barHeight:r,barWidth:n,yDivision:c,xDivision:l,initPositions:h}){var d,f,p,g;const u=this.w;let b=[];const x=null==(f=null==(d=u.config.series[t].data)?void 0:d[e])?void 0:f.rangeName,w=null==(g=null==(p=u.config.series[t].data)?void 0:p[e])?void 0:g.x,m=Array.isArray(w)?w.join(" "):w,y=u.labelData.labels.map(C=>Array.isArray(C)?C.join(" "):C).indexOf(m),v=u.rangeData.seriesRange[t].findIndex(C=>{var L;return C.x===m&&(null==(L=C.overlaps)?void 0:L.size)>0});return this.isHorizontal?(s=u.config.plotOptions.bar.rangeBarGroupRows?a+c*y:a+r*this.visibleI+c*y,v>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(b=Array.from(u.rangeData.seriesRange[t][v].overlaps),b.indexOf(x)>-1&&(s=(r=h.barHeight/b.length)*this.visibleI+c*(100-parseInt(this.barOptions.barHeight,10))/100/2+r*(this.visibleI+b.indexOf(x))+c*y))):(y>-1&&!u.labelData.timescaleLabels.length&&(i=u.config.plotOptions.bar.rangeBarGroupRows?o+l*y:o+n*this.visibleI+l*y),v>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(b=Array.from(u.rangeData.seriesRange[t][v].overlaps),b.indexOf(x)>-1&&(i=(n=h.barWidth/b.length)*this.visibleI+l*(100-parseInt(this.barOptions.barWidth,10))/100/2+n*(this.visibleI+b.indexOf(x))+l*y))),{barYPosition:s,barXPosition:i,barHeight:r,barWidth:n}}drawRangeColumnPaths({indexes:t,x:e,xDivision:s,barWidth:i,barXPosition:a,zeroH:o}){var r,n;const c=this.w,{i:l,j:h,realIndex:d,translationsIndex:f}=t,p=this.yRatio[f],g=this.getRangeValue(d,h);let u=Math.min(g.start,g.end),b=Math.max(g.start,g.end);typeof(null==(r=this.series[l])?void 0:r[h])>"u"||null===(null==(n=this.series[l])?void 0:n[h])?u=o:(u=o-u/p,b=o-b/p);const x=Math.abs(b-u),w=this.barHelpers.getColumnPaths({barXPosition:a,barWidth:i,y1:u,y2:b,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:d,i:d,j:h,w:c});if(c.axisFlags.isXNumeric){const m=this.getBarXForNumericXAxis({x:e,j:h,realIndex:d,barWidth:i});e=m.x,a=m.barXPosition}else e+=s;return{pathTo:w.pathTo,pathFrom:w.pathFrom,barHeight:x,x:e,y:g.start<0&&g.end<0?u:b,goalY:this.barHelpers.getGoalValues("y",null,o,l,h,f),barXPosition:a}}preventBarOverflow(t){const e=this.w;return t<0&&(t=0),t>e.layout.gridWidth&&(t=e.layout.gridWidth),t}drawRangeBarPaths({indexes:t,y:e,y1:s,y2:i,yDivision:a,barHeight:o,barYPosition:r,zeroW:n}){const c=this.w,{realIndex:l,j:h}=t,d=this.preventBarOverflow(n+s/this.invertedYRatio),f=this.preventBarOverflow(n+i/this.invertedYRatio),p=this.getRangeValue(l,h),g=Math.abs(f-d),u=this.barHelpers.getBarpaths({barYPosition:r,barHeight:o,x1:d,x2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:l,realIndex:l,j:h,w:c});return c.axisFlags.isXNumeric||(e+=a),{pathTo:u.pathTo,pathFrom:u.pathFrom,barWidth:g,x:p.start<0&&p.end<0?d:f,goalX:this.barHelpers.getGoalValues("x",n,null,l,h,
vendor: 11,717 bytes, line 1
10),y:e}}getRangeValue(t,e){const s=this.w;return{start:s.rangeData.seriesRangeStart[t][e],end:s.rangeData.seriesRangeEnd[t][e]}}},candlestick:we,boxPlot:we,pie:Et,donut:Et,polarArea:Et,radialBar:class Ks extends Et{constructor(t,e){super(t,e),this.ctx=e,this.w=t,this.animBeginArr=[0],this.animDur=0,this.startAngle=t.config.plotOptions.radialBar.startAngle,this.endAngle=t.config.plotOptions.radialBar.endAngle,this.totalAngle=Math.abs(t.config.plotOptions.radialBar.endAngle-t.config.plotOptions.radialBar.startAngle),this.trackStartAngle=t.config.plotOptions.radialBar.track.startAngle,this.trackEndAngle=t.config.plotOptions.radialBar.track.endAngle,this.barLabels=this.w.config.plotOptions.radialBar.barLabels,this.donutDataLabels=this.w.config.plotOptions.radialBar.dataLabels,this.radialDataLabels=this.donutDataLabels,this.trackStartAngle||(this.trackStartAngle=this.startAngle),this.trackEndAngle||(this.trackEndAngle=this.endAngle),360===this.endAngle&&(this.endAngle=359.99),this.margin=parseInt(t.config.plotOptions.radialBar.track.margin,10),this.onBarLabelClick=this.onBarLabelClick.bind(this)}draw(t){const e=this.w,s=new E(this.w),i=s.group({class:"apexcharts-radialbar"});if(e.globals.noData)return i;const a=s.group(),o=this.defaultSize/2,r=e.layout.gridWidth/2;let n=this.defaultSize/2.05;e.config.chart.sparkline.enabled||(n=n-e.config.stroke.width-e.config.chart.dropShadow.blur);const c=e.globals.fill.colors;if(e.config.plotOptions.radialBar.track.show){const f=this.drawTracks({size:n,centerX:r,centerY:o,colorArr:c,series:t});a.add(f)}const l=this.drawArcs({size:n,centerX:r,centerY:o,colorArr:c,series:t});let h=360;e.config.plotOptions.radialBar.startAngle<0&&(h=this.totalAngle);const d=(360-h)/360;if(e.globals.radialSize=n-n*d,this.radialDataLabels.value.show){const f=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);e.globals.radialSize+=f*d}return a.add(l.g),"front"===e.config.plotOptions.radialBar.hollow.position&&(l.g.add(l.elHollow),l.dataLabels&&l.g.add(l.dataLabels)),i.add(a),i}drawTracks(t){const e=this.w,s=new E(this.w),i=s.group({class:"apexcharts-tracks"}),a=new J(this.w),o=new st(this.w),r=this.getStrokeWidth(t);t.size=t.size-r/2;for(let n=0;n<t.series.length;n++){const c=s.group({class:"apexcharts-radialbar-track apexcharts-track"});i.add(c),c.attr({rel:n+1}),t.size=t.size-r-this.margin;const l=e.config.plotOptions.radialBar.track,h=o.fillPath({seriesNumber:0,size:t.size,fillColors:Array.isArray(l.background)?l.background[n]:l.background,solid:!0}),d=this.trackStartAngle;let f=this.trackEndAngle;Math.abs(f)+Math.abs(d)>=360&&(f=360-Math.abs(this.startAngle)-.1);const p=s.drawPath({d:"",stroke:h,strokeWidth:r*parseInt(l.strokeWidth,10)/100,fill:"none",strokeOpacity:l.opacity,classes:"apexcharts-radialbar-area"});l.dropShadow.enabled&&a.dropShadow(p,l.dropShadow),c.add(p),p.attr("id","apexcharts-radialbarTrack-"+n),this.animatePaths(p,{centerX:t.centerX,centerY:t.centerY,endAngle:f,startAngle:d,size:t.size,i:n,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return i}drawArcs(t){const e=this.w,s=new E(this.w),i=new st(this.w),a=new J(this.w),o=s.group(),r=this.getStrokeWidth(t);t.size=t.size-r/2;let n=e.config.plotOptions.radialBar.hollow.background;const c=t.size-r*t.series.length-this.margin*t.series.length-r*parseInt(e.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,l=c-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(n=this.drawHollowImage(t,o,c,n));const h=this.drawHollow({size:l,centerX:t.centerX,centerY:t.centerY,fill:n||"transparent"});e.config.plotOptions.radialBar.hollow.dropShadow.enabled&&a.dropShadow(h,e.config.plotOptions.radialBar.hollow.dropShadow);let d=1;!this.radialDataLabels.total.show&&e.seriesData.series.length>1&&(d=0);let f=null;if(this.radialDataLabels.show){const g=e.dom.Paper.findOne(".apexcharts-datalabels-group");f=this.renderInnerDataLabels(g,this.radialDataLabels,{hollowSize:c,centerX:t.centerX,centerY:t.centerY,opacity:d})}"back"===e.config.plotOptions.radialBar.hollow.position&&(o.add(h),f&&o.add(f));let p=!1;e.config.plotOptions.radialBar.inverseOrder&&(p=!0);for(let g=p?t.series.length-1:0;p?g>=0:g<t.series.length;p?g--:g++){const u=s.group({class:"apexcharts-series apexcharts-radial-series",seriesName:D.escapeString(e.seriesData.seriesNames[g])});o.add(u),u.attr({rel:g+1,"data:realIndex":g}),Z.addCollapsedClassToSeries(this.w,u,g),t.size=t.size-r-this.margin;const b=i.fillPath({seriesNumber:g,size:t.size,value:t.series[g]}),x=this.startAngle;let w;const m=D.negToZero(t.series[g]>100?100:t.series[g])/100;let v,y=Math.round(this.totalAngle*m)+this.startAngle;e.globals.dataChanged&&(w=this.startAngle,v=Math.round(this.totalAngle*D.negToZero(e.globals.previousPaths[g])/100)+w),Math.abs(y)+Math.abs(x)>360&&(y-=.01),Math.abs(v)+Math.abs(w)>360&&(v-=.01);const k=y-x,S=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[g]:e.config.stroke.dashArray,T=s.drawPath({d:"",stroke:b,strokeWidth:r,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+g,strokeDashArray:S}),M=D.polarToCartesian(t.centerX,t.centerY,t.size,x+k/2);if(E.setAttrs(T.node,{"data:angle":k,"data:value":t.series[g],"data:cx":M.x,"data:cy":M.y}),e.config.chart.dropShadow.enabled&&a.dropShadow(T,e.config.chart.dropShadow,g),a.setSelectionFilter(T,0,g),this.addListeners(T,this.radialDataLabels),u.add(T),T.attr({index:0,j:g}),this.barLabels.enabled){const X=D.polarToCartesian(t.centerX,t.centerY,t.size,x),Y=this.barLabels.formatter(e.seriesData.seriesNames[g],{seriesIndex:g,w:e}),R=["apexcharts-radialbar-label"];this.barLabels.onClick||R.push("apexcharts-no-click");let N=this.barLabels.useSeriesColors?e.globals.colors[g]:e.config.chart.foreColor;N||(N=e.config.chart.foreColor);const z=X.x+this.barLabels.offsetX,O=X.y+this.barLabels.offsetY,G=s.drawText({x:z,y:O,text:Y,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:N,cssClass:R.join(" ")});G.on("click",this.onBarLabelClick),G.attr({rel:g+1}),0!==x&&G.attr({"transform-origin":`${z} ${O}`,transform:`rotate(${x} 0 0)`}),u.add(G)}let F=0;this.initialAnim&&!e.globals.resized&&!e.globals.dataChanged&&(F=e.config.chart.animations.speed),e.globals.dataChanged&&(F=e.config.chart.animations.dynamicAnimation.speed),this.animDur=F/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(T,{centerX:t.centerX,centerY:t.centerY,endAngle:y,startAngle:x,prevEndAngle:v,prevStartAngle:w,size:t.size,i:g,totalItems:2,animBeginArr:this.animBeginArr,dur:F,shouldSetPrevPaths:!0})}return{g:o,elHollow:h,dataLabels:f}}drawHollow(t){const s=new E(this.w).drawCircle(2*t.size);return s.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),s}drawHollowImage(t,e,s,i){const a=this.w,o=new st(this.w),r=D.randomId(),n=a.config.plotOptions.radialBar.hollow.image;if(a.config.plotOptions.radialBar.hollow.imageClipped)o.clippedImgArea({width:s,height:s,image:n,patternID:`pattern${a.globals.cuid}${r}`}),i=`url(#pattern${a.globals.cuid}${r})`;else{const c=a.config.plotOptions.radialBar.hollow.imageWidth,l=a.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===c&&void 0===l){const h=a.dom.Paper.image(n,function(d){this.move(t.centerX-d.width/2+a.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-d.height/2+a.config.plotOptions.radialBar.hollow.imageOffsetY)});e.add(h)}else{const h=a.dom.Paper.image(n,function(){this.move(t.centerX-c/2+a.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-l/2+a.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(c,l)});e.add(h)}}return i}getStrokeWidth(t){return t.size*(100-parseInt(this.w.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}onBarLabelClick(t){var e;const i=parseInt(null!=(e=t.target.getAttribute("rel"))?e:"",10)-1,a=this.barLabels.onClick,o=this.w;a&&a(o.seriesData.seriesNames[i],{w:o,seriesIndex:i})}},radar:class js{constructor(t,e){this.ctx=e,this.w=t,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,this.graphics=new E(this.w),this.lineColorArr=void 0!==t.globals.stroke.colors?t.globals.stroke.colors:t.globals.colors,this.defaultSize=t.globals.svgHeight<t.globals.svgWidth?t.layout.gridHeight:t.layout.gridWidth,this.isLog=t.config.yaxis[0].logarithmic,this.logBase=t.config.yaxis[0].logBase,this.coreUtils=new q(this.w),this.maxValue=this.isLog?this.coreUtils.getLogVal(this.logBase,t.globals.maxY,0):t.globals.maxY,this.minValue=this.isLog?this.coreUtils.getLogVal(this.logBase,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.layout.xAxisLabelsWidth/1.75),void 0!==t.config.plotOptions.radar.size&&(this.size=t.config.plotOptions.radar.size),this.dataRadiusOfPercent=[],this.dataRadius=[],this.angleArr=[],this.dataPointsLen=0,this.disAngle=0,this.yaxisLabelsTextsPos=[]}draw(t){const e=this.w,s=new st(this.w),i=[],a=new dt(this.w,this.ctx);t.length&&(this.dataPointsLen=t[e.globals.maxValsInArrayIndex].length),this.disAngle=2*Math.PI/this.dataPointsLen;const l=this.graphics.group({class:"apexcharts-radar-series apexcharts-plot-series",transform:`translate(${e.layout.gridWidth/2+e.config.plotOptions.radar.offsetX||0}, ${e.layout.gridHeight/2+e.config.plotOptions.radar.offsetY||0})`});let h=[],d=null,f=null;if(this.yaxisLabels=this.graphics.group({class:"apexcharts-yaxis"}),t.forEach((p,g)=>{const u=p.length===e.globals.dataPoints,b=this.graphics.group().attr({class:"apexcharts-series","data:longestSeries":u,seriesName:D.escapeString(e.seriesData.seriesNames[g]),rel:g+1,"data:realIndex":g});this.dataRadiusOfPercent[g]=[],this.dataRadius[g]=[],this.angleArr[g]=[],p.forEach((y,v)=>{const C=Math.abs(this.maxValue-this.minValue);y-=this.minValue,this.isLog&&(y=this.coreUtils.getLogVal(this.logBase,y,0)),this.dataRadiusOfPercent[g][v]=y/C,this.dataRadius[g][v]=this.dataRadiusOfPercent[g][v]*this.size,this.angleArr[g][v]=v*this.disAngle}),h=this.getDataPointsPos(this.dataRadius[g],this.angleArr[g]);const x=this.createPaths(h,{x:0,y:0});d=this.graphics.group({class:"apexcharts-series-markers-wrap apexcharts-element-hidden"}),f=this.graphics.group({class:"apexcharts-datalabels","data:realIndex":g}),e.globals.delayedElements.push({el:d.node,index:g});const w={i:g,realIndex:g,animationDelay:g,initialSpeed:e.config.chart.animations.speed,dataChangeSpeed:e.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-radar",shouldClipToGrid:!1,bindEventsOnPaths:!1,stroke:e.globals.stroke.colors[g],strokeLineCap:e.config.stroke.lineCap};let m=null;e.globals.previousPaths.length>0&&(m=this.getPreviousPath(g));for(let y=0;y<x.linePathsTo.length;y++){const v=this.graphics.renderPaths(H(I({},w),{pathFrom:null===m?x.linePathsFrom[y]:m,pathTo:x.linePathsTo[y],strokeWidth:Array.isArray(this.strokeWidth)?this.strokeWidth[g]:this.strokeWidth,fill:"none",drawShadow:!1}));b.add(v);const C=s.fillPath({seriesNumber:g}),L=this.graphics.renderPaths(H(I({},w),{pathFrom:null===m?x.areaPathsFrom[y]:m,pathTo:x.areaPathsTo[y],strokeWidth:0,fill:C,drawShadow:!1}));e.config.chart.dropShadow.enabled&&new J(this.w).dropShadow(L,Object.assign({},e.config.chart.dropShadow,{noUserSpaceOnUse:!0}),g),b.add(L)}
vendor: 6,679 bytes, line 1
1p.forEach((y,v)=>{const L=new pt(this.w,this.ctx).getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:g,dataPointIndex:v}),k=this.graphics.drawMarker(h[v].x,h[v].y,L);k.attr("rel",v),k.attr("j",v),k.attr("index",g),k.node.setAttribute("default-marker-size",L.pSize);const S=this.graphics.group({class:"apexcharts-series-markers"});S&&S.add(k),d.add(S),b.add(d);const T=e.config.dataLabels;if(T.enabled){const P=T.formatter(e.seriesData.series[g][v],{seriesIndex:g,dataPointIndex:v,w:e});a.plotDataLabelsText({x:h[v].x,y:h[v].y,text:P,textAnchor:"middle",i:g,j:g,parent:f,offsetCorrection:!1,dataLabelsConfig:I({},T)})}b.add(f)}),i.push(b)}),this.drawPolygons({parent:l}),e.config.xaxis.labels.show){const p=this.drawXAxisTexts();l.add(p)}return i.forEach(p=>{l.add(p)}),l.add(this.yaxisLabels),l}drawPolygons(t){const e=this.w,{parent:s}=t,i=new Ce(this.w),a=e.globals.yAxisScale[0].result.reverse(),o=a.length,r=[],n=this.size/(o-1);for(let h=0;h<o;h++)r[h]=n*h;r.reverse();const c=[],l=[];r.forEach((h,d)=>{const f=D.getPolygonPos(h,this.dataPointsLen);let p="";f.forEach((g,u)=>{if(0===d){const b=this.graphics.drawLine(g.x,g.y,0,0,Array.isArray(this.polygons.connectorColors)?this.polygons.connectorColors[u]:this.polygons.connectorColors);l.push(b)}0===u&&this.yaxisLabelsTextsPos.push({x:g.x,y:g.y}),p+=g.x+","+g.y+" "}),c.push(p)}),c.forEach((h,d)=>{const f=this.polygons.strokeColors,p=this.polygons.strokeWidth,g=this.graphics.drawPolygon(h,Array.isArray(f)?f[d]:f,Array.isArray(p)?p[d]:p,e.globals.radarPolygons.fill.colors[d]);s.add(g)}),l.forEach(h=>{s.add(h)}),e.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach((h,d)=>{const f=i.drawYAxisTexts(h.x,h.y,d,a[d]);this.yaxisLabels.add(f)})}drawXAxisTexts(){const t=this.w,e=t.config.xaxis.labels,s=this.graphics.group({class:"apexcharts-xaxis"}),i=D.getPolygonPos(this.size,this.dataPointsLen);return t.labelData.labels.forEach((a,o)=>{const r=t.config.xaxis.labels.formatter,n=new dt(this.w,this.ctx);if(i[o]){const c=this.getTextPos(i[o],this.size),l=r(a,{seriesIndex:-1,dataPointIndex:o,w:t});n.plotDataLabelsText({x:c.newX,y:c.newY,text:l,textAnchor:c.textAnchor,i:o,j:o,parent:s,className:"apexcharts-xaxis-label",color:Array.isArray(e.style.colors)&&e.style.colors[o]?e.style.colors[o]:"#a8a8a8",dataLabelsConfig:I({textAnchor:c.textAnchor,dropShadow:{enabled:!1}},e),offsetCorrection:!1}).on("click",d=>{if("function"==typeof t.config.chart.events.xAxisLabelClick){const f=Object.assign({},t,{labelIndex:o});t.config.chart.events.xAxisLabelClick(d,this.ctx,f)}})}}),s}createPaths(t,e){const s=[];let i=[];const a=[];let o=[];if(t.length){i=[this.graphics.move(e.x,e.y)],o=[this.graphics.move(e.x,e.y)];let r=this.graphics.move(t[0].x,t[0].y),n=this.graphics.move(t[0].x,t[0].y);t.forEach((c,l)=>{r+=this.graphics.line(c.x,c.y),n+=this.graphics.line(c.x,c.y),l===t.length-1&&(r+="Z",n+="Z")}),s.push(r),a.push(n)}return{linePathsFrom:i,linePathsTo:s,areaPathsFrom:o,areaPathsTo:a}}getTextPos(t,e){let i="middle",a=t.x,o=t.y;return Math.abs(t.x)>=10?t.x>0?(i="start",a+=10):t.x<0&&(i="end",a-=10):i="middle",Math.abs(t.y)>=e-10&&(t.y<0?o-=10:t.y>0&&(o+=10)),{textAnchor:i,newX:a,newY:o}}getPreviousPath(t){const e=this.w;let s=null;for(let i=0;i<e.globals.previousPaths.length;i++){const a=e.globals.previousPaths[i];a.paths.length>0&&parseInt(a.realIndex,10)===parseInt(String(t),10)&&typeof e.globals.previousPaths[i].paths[0]<"u"&&(s=e.globals.previousPaths[i].paths[0].d)}return s}getDataPointsPos(t,e,s=this.dataPointsLen){t=t||[],e=e||[];const i=[];for(let a=0;a<s;a++){const o={};o.x=t[a]*Math.sin(e[a]),o.y=-t[a]*Math.cos(e[a]),i.push(o)}return i}},heatmap:class $s{constructor(t,e,s){this.ctx=e,this.w=t,this.xRatio=s.xRatio,this.yRatio=s.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new ve(t,e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}draw(t){const e=this.w,s=new E(this.w,this.ctx),i=s.group({class:"apexcharts-heatmap"});i.attr("clip-path",`url(#gridRectMask${e.globals.cuid})`);const a=e.layout.gridWidth/e.globals.dataPoints,o=e.layout.gridHeight/e.seriesData.series.length;let r=0,n=!1;this.negRange=this.helpers.checkColorRange();const c=t.slice();e.config.yaxis[0].reversed&&(n=!0,c.reverse());for(let h=n?0:c.length-1;n?h<c.length:h>=0;n?h++:h--){const d=s.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:D.escapeString(e.seriesData.seriesNames[h]),rel:h+1,"data:realIndex":h});if(Z.addCollapsedClassToSeries(this.w,d,h),s.setupEventDelegation(d,".apexcharts-heatmap-rect"),e.config.chart.dropShadow.enabled){const u=e.config.chart.dropShadow;new J(this.w).dropShadow(d,u,h)}let f=0;const p=e.config.plotOptions.heatmap.shadeIntensity;let g=0;for(let u=0;u<e.globals.dataPoints;u++){if(e.seriesData.seriesX.length&&!e.globals.allSeriesHasEqualX&&e.globals.minX+e.globals.minXDiff*u<e.seriesData.seriesX[h][g]){f+=a;continue}if(g>=c[h].length)break;const b=this.helpers.getShadeColor(e.config.chart.type,h,g,this.negRange);let x=b.color;const w=b.colorProps;"image"===e.config.fill.type&&(x=new st(this.w).fillPath({seriesNumber:h,dataPointIndex:g,opacity:e.globals.hasNegs?w.percent<0?1-(1+w.percent/100):p+w.percent/100:w.percent/100,patternID:D.randomId(),width:e.config.fill.image.width?e.config.fill.image.width:a,height:e.config.fill.image.height?e.config.fill.image.height:o}));const y=s.drawRect(f,r,a,o,this.rectRadius);if(y.attr({cx:f,cy:r}),y.node.classList.add("apexcharts-heatmap-rect"),d.add(y),y.attr({fill:x,i:h,index:h,j:g,val:t[h][g],"stroke-width":this.strokeWidth,stroke:e.config.plotOptions.heatmap.useFillColorAsStroke?x:e.globals.stroke.colors[0],color:x}),e.config.chart.animations.enabled&&!e.globals.dataChanged){let k=1;e.globals.resized||(k=e.config.chart.animations.speed),this.animateHeatMap(y,f,r,a,o,k)}if(e.globals.dataChanged){let k=1;if(this.dynamicAnim.enabled&&e.globals.shouldAnimate){k=this.dynamicAnim.speed;let S=e.globals.previousPaths[h]&&e.globals.previousPaths[h][g]&&e.globals.previousPaths[h][g].color;S||(S="rgba(255, 255, 255, 0)"),this.animateHeatColor(y,D.isColorHex(S)?S:D.rgb2hex(S),D.isColorHex(x)?x:D.rgb2hex(x),k)}}const C=(0,e.config.dataLabels.formatter)(e.seriesData.series[h][g],{value:e.seriesData.series[h][g],seriesIndex:h,dataPointIndex:g,w:e}),L=this.helpers.calculateDataLabels({text:C,x:f+a/2,y:r+o/2,i:h,j:g,colorProps:w,series:c});null!==L&&d.add(L),f+=a,g++}r+=o,i.add(d)}const l=e.globals.yAxisScale[0].result.slice();return e.config.yaxis[0].reversed?l.unshift(""):l.push(""),e.globals.yAxisScale[0].result=l,i}animateHeatMap(t,e,s,i,a,o){const r=new ft(this.w);
1r.animateRect(t,{x:e+i/2,y:s+a/2,width:0,height:0},{x:e,y:s,width:i,height:a},o,()=>{r.animationCompleted(t)})}animateHeatColor(t,e,s,i){t.attr({fill:e}).animate(i).attr({fill:s})}},treemap:class si{constructor(t,e){this.ctx=e,this.w=t,this.strokeWidth=this.w.config.stroke.width,this.helpers=new ve(t,e),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[]}draw(t){const e=this.w,s=new E(this.w,this.ctx),i=new st(this.w),a=s.group({class:"apexcharts-treemap"});if(e.globals.noData)return a;const o=[];return t.forEach(n=>{const c=n.map(l=>Math.abs(l));o.push(c)}),this.negRange=this.helpers.checkColorRange(),e.config.series.forEach((n,c)=>{n.data.forEach(l=>{Array.isArray(this.labels[c])||(this.labels[c]=[]),this.labels[c].push(l.x)})}),ei_generate(o,e.layout.gridWidth,e.layout.gridHeight).forEach((n,c)=>{var l;const h=s.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:D.escapeString(e.seriesData.seriesNames[c]),rel:c+1,"data:realIndex":c});if(s.setupEventDelegation(h,".apexcharts-treemap-rect"),e.config.chart.dropShadow.enabled){const g=e.config.chart.dropShadow;new J(this.w).dropShadow(a,g,c)}const d=s.group({class:"apexcharts-data-labels"}),f={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0};n.forEach((g,u)=>{const b=g[0],x=g[1],w=g[2],m=g[3];f.xMin=Math.min(f.xMin,b),f.yMin=Math.min(f.yMin,x),f.xMax=Math.max(f.xMax,w),f.yMax=Math.max(f.yMax,m);const y=this.helpers.getShadeColor(e.config.chart.type,c,u,this.negRange),v=y.color,C=i.fillPath({color:v,seriesNumber:c,dataPointIndex:u}),L=s.drawRect(b,x,w-b,m-x,e.config.plotOptions.treemap.borderRadius,"#fff",1,this.strokeWidth,e.config.plotOptions.treemap.useFillColorAsStroke?v:e.globals.stroke.colors[c]);L.attr({cx:b,cy:x,index:c,i:c,j:u,width:w-b,height:m-x,fill:C}),L.node.classList.add("apexcharts-treemap-rect");let k={x:b+(w-b)/2,y:x+(m-x)/2,width:0,height:0};const S={x:b,y:x,width:w-b,height:m-x};if(e.config.chart.animations.enabled&&!e.globals.dataChanged){let F=1;e.globals.resized||(F=e.config.chart.animations.speed),this.animateTreemap(L,k,S,F)}if(e.globals.dataChanged){let F=1;this.dynamicAnim.enabled&&e.globals.shouldAnimate&&(F=this.dynamicAnim.speed,e.globals.previousPaths[c]&&e.globals.previousPaths[c][u]&&e.globals.previousPaths[c][u].rect&&(k=e.globals.previousPaths[c][u].rect),this.animateTreemap(L,k,S,F))}let T=this.getFontSize(g),P=e.config.dataLabels.formatter(this.labels[c][u],{value:e.seriesData.series[c][u],seriesIndex:c,dataPointIndex:u,w:e});"truncate"===e.config.plotOptions.treemap.dataLabels.format&&(T=parseInt(String(e.config.dataLabels.style.fontSize),10),P=this.truncateLabels(String(P),T,b,x,w,m));let M=null;e.seriesData.series[c][u]&&(M=this.helpers.calculateDataLabels({text:P,x:(b+w)/2,y:(x+m)/2+this.strokeWidth/2+T/3,i:c,j:u,colorProps:y,fontSize:T,series:t})),e.config.dataLabels.enabled&&M&&this.rotateToFitLabel(M,T,P,b,x,w,m),h.add(L),null!==M&&h.add(M)});const p=e.config.plotOptions.treemap.seriesTitle;if(e.config.series.length>1&&p&&p.show){const g=e.config.series[c].name||"";if(g&&f.xMin<1/0&&f.yMin<1/0){const{offsetX:u,offsetY:b,borderColor:x,borderWidth:w,borderRadius:m,style:y}=p,v=y.color||e.config.chart.foreColor,C={left:y.padding.left,right:y.padding.right,top:y.padding.top,bottom:y.padding.bottom},L=s.getTextRects(g,y.fontSize,y.fontFamily),T=f.xMin+(u||0),P=f.yMin+(b||0),M=s.drawRect(T,P,L.width+C.left+C.right,L.height+C.top+C.bottom,m,y.background,1,w,x),F=s.drawText({x:T+C.left,y:P+C.top+.75*(null!=(l=L?.height)?l:0),text:g,fontSize:y.fontSize,fontFamily:y.fontFamily,fontWeight:y.fontWeight,foreColor:v,cssClass:y.cssClass||""});h.add(M),h.add(F)}}h.add(d),a.add(h)}),a}getFontSize(t){const e=this.w,a=function s(r){let n,c=0;if(Array.isArray(r[0]))for(n=0;n<r.length;n++)c+=s(r[n]);else for(n=0;n<r.length;n++)c+=r[n].length;return c}(this.labels)/function i(r){let n,c=0;if(Array.isArray(r[0]))for(n=0;n<r.length;n++)c+=i(r[n]);else for(n=0;n<r.length;n++)c+=1;return c}(this.labels);return function o(r,n){const l=Math.pow(r*n,.5);return Math.min(l/a,parseInt(e.config.dataLabels.style.fontSize,10))}(t[2]-t[0],t[3]-t[1])}rotateToFitLabel(t,e,s,i,a,o,r){const n=new E(this.w),c=n.getTextRects(s,String(e));if(c.width+this.w.config.stroke.width+5>
1o-i&&c.width<=r-a){const l=n.rotateAroundCenter(t.node);t.node.setAttribute("transform",`rotate(-90 ${l.x} ${l.y}) translate(${c.height/3})`)}}truncateLabels(t,e,s,i,a,o){const r=new E(this.w),c=r.getTextRects(t,String(e)).width+this.w.config.stroke.width+5>a-s&&o-i>a-s?o-i:a-s,l=r.getTextBasedOnMaxWidth({text:t,maxWidth:c,fontSize:e});return t.length!==l.length&&c/e<5?"":l}animateTreemap(t,e,s,i){const a=new ft(this.w);a.animateRect(t,e,s,i,()=>{a.animationCompleted(t)})}}})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.