UNPKG

apexcharts

Version:

A JavaScript Chart Library

6 lines 487 kB
/*!
 * ApexCharts v7.0.0
 * (c) 2018-2026 ApexCharts
 */
"use strict";var t=Object.defineProperty,e=Object.defineProperties,s=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,o=(e,s,i)=>s in e?t(e,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[s]=i,n=(t,e)=>{for(var s in e||(e={}))a.call(e,s)&&o(t,s,e[s]);if(i)for(var s of i(e))r.call(e,s)&&o(t,s,e[s]);return t},l=(t,i)=>e(t,s(i)),c=(t,e,s)=>o(t,"symbol"!=typeof e?e+"":e,s);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});class h{static isSSR(){return"undefined"==typeof window||"undefined"==typeof document}static isBrowser(){return!this.isSSR()}static hasAPI(t){return!this.isSSR()&&void 0!==window[t]}static getApex(){return"undefined"!=typeof window&&window.Apex?window.Apex:"undefined"!=typeof global&&global.Apex?global.Apex:{}}}class d{constructor(t,e=null){this.nodeName=t,this.namespaceURI=e,this.attributes=new Map,this.children=[],this.textContent="",this.style={},this.classList=new p,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 e=this.children.indexOf(t);-1!==e&&this.children.splice(e,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 d(this.nodeName,this.namespaceURI);return e.textContent=this.textContent,this.attributes.forEach((t,s)=>{e.attributes.set(s,t)}),Object.assign(e.style,this.style),t&&this.children.forEach(t=>{t.cloneNode&&e.appendChild(t.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((e,s)=>{t+=` ${s}="${e}"`}),0===this.children.length&&!this.textContent)return`<${this.nodeName}${t}/>`;const e=this.children.map(t=>t.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 p{constructor(){this.classes=new Set}add(...t){t.forEach(t=>this.classes.add(t))}remove(...t){t.forEach(t=>this.classes.delete(t))}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 g{constructor(){this.SVGNS="http://www.w3.org/2000/svg",this.XLINKNS="http://www.w3.org/1999/xlink"}createElementNS(t,e){return new d(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 d("root");return s.innerHTML=t,{documentElement:s}}}}}let u=null,x=null,f=null;class m{static init(){h.isSSR()&&!u&&(u=new g)}static createElement(t){return h.isSSR()?(u||this.init(),u.createElementNS(null,t)):document.createElement(t)}static createElementNS(t,e){return h.isSSR()?(u||this.init(),u.createElementNS(t,e)):document.createElementNS(t,e)}static createTextNode(t){return h.isSSR()?(u||this.init(),u.createTextNode(t)):document.createTextNode(t)}static querySelector(t){return h.isSSR()?null:document.querySelector(t)}static querySelectorAll(t){return h.isSSR()?[]:document.querySelectorAll(t)}static getComputedStyle(t){return h.isSSR()?{}:window.getComputedStyle(t)}static matchMedia(t){if(h.isSSR()||"function"!=typeof window.matchMedia)return null;try{return window.matchMedia(t)}catch(t){return null}}static getBoundingClientRect(t){return h.isSSR()?(u||this.init(),u.getBoundingClientRect(t)):t?t.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}static getXMLSerializer(){return h.isSSR()?(u||this.init(),x||(x=u.createXMLSerializer()),x):(x||(x=new XMLSerializer),x)}static getDOMParser(){return h.isSSR()?(u||this.init(),f||(f=u.createDOMParser()),f):(f||(f=new DOMParser),f)}static addWindowEventListener(t,e,s){h.isBrowser()&&window.addEventListener(t,e,s)}static removeWindowEventListener(t,e,s){h.isBrowser()&&window.removeEventListener(t,e,s)}static requestAnimationFrame(t){return h.isBrowser()?window.requestAnimationFrame(t):(t(0),null)}static cancelAnimationFrame(t){h.isBrowser()&&t&&window.cancelAnimationFrame(t)}static elementExists(t){return!!t&&(h.isSSR()?!0===t._ssrMode||void 0!==t.nodeName:!!t.getRootNode&&(t.getRootNode({composed:!0})===document||t.isConnected))}static getWindow(){return h.isBrowser()?window:null}static getDocument(){return h.isBrowser()?document:null}static _getShim(){return u}static _resetShim(){u=null,x=null,f=null}}const b=new WeakMap;let y=0,w=class t{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 h.isBrowser()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}static extend(t,e){if(!this.isObject(t)&&this.isObject(e))return this.clone(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(e,s){const i=[];return e.map(e=>{i.push(t.extend(s,e))}),e=i}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 s=0;s<t.length;s++)i[s]=this.clone(t[s],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 s in t)Object.prototype.hasOwnProperty.call(t,s)&&(i[s]=this.clone(t[s],e,!1))}return i}static shallowClone(t){return null===t||"object"!=typeof t?t:Array.isArray(t)?t.slice():Object.assign({},t)}static stringifyForCompare(t){return JSON.stringify(t,(t,e)=>{if("function"!=typeof e)return e;let s=b.get(e);return void 0===s&&(s=++y,b.set(e,s)),`__apx_fn_${s}`})}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 i of s)if(t[i]!==e[i])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 getDimensions(t){if(!t)return[0,0];if(h.isSSR())return[t._ssrWidth||400,t._ssrHeight||300];let e;try{e=getComputedStyle(t,null)}catch(e){return[t.clientWidth||0,t.clientHeight||0]}let s=t.clientWidth,i=t.clientHeight;if(!s||!i){const e=t.getBoundingClientRect();s=s||e.width,i=i||e.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(h.isSSR())return m.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((t,e)=>(Array.isArray(e)&&(e=e.reduce((t,e)=>t.length>e.length?t:e)),t.length>e.length?t:e),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 t=0;t<i.length;t++)i[t]=parseInt(1===i[t].length?i[t]+i[t]:i[t],16);return void 0!==e&&i.push(e),"rgba("+i.join(",")+")"}static getOpacityFromRGBA(t){return parseFloat(t.replace(/^.*,(.+)\)/,"$1"))}static parseHex(t){if("string"!=typeof t)return null;let e=t.trim().replace("#","");return 3===e.length&&(e=e.split("").map(t=>t+t).join("")),/^[0-9a-fA-F]{6}$/.test(e)?[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]:null}static relativeLuminance([t,e,s]){const i=t=>{const e=t/255;return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)};return.2126*i(t)+.7152*i(e)+.0722*i(s)}static getContrastRatio(e,s){const i=t.parseHex(e),a=t.parseHex(s);if(!i||!a)return 0;const r=t.relativeLuminance(i),o=t.relativeLuminance(a);return(Math.max(r,o)+.05)/(Math.min(r,o)+.05)}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,r=parseInt(s[0].slice(4),10),o=parseInt(s[1],10),n=parseInt(s[2],10);return"rgb("+(Math.round((i-r)*a)+r)+","+(Math.round((i-o)*a)+o)+","+(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,r=s>>16,o=s>>8&255,n=255&s;return"#"+(16777216+65536*(Math.round((i-r)*a)+r)+256*(Math.round((i-o)*a)+o)+(Math.round((i-n)*a)+n)).toString(16).slice(1)}shadeColor(e,s){return t.isColorHex(s)?this.shadeHexColor(e,s):this.shadeRGBColor(e,s)}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(e){if(!t.isCSSVariable(e))return e;if(h.isSSR())return e;const s=document.createElement("div");let i;s.style.cssText="position:fixed; left: -9999px; visibility:hidden;",s.style.color=e,document.body.appendChild(s);try{i=window.getComputedStyle(s).color}finally{s.parentNode&&s.parentNode.removeChild(s)}return i}static applyOpacityToColor(t,e){const s=Number(e);if(!Number.isFinite(s))return t;if(s<=0)return"transparent";if(s>=1)return t;return`color-mix(in srgb, ${t} ${Math.round(100*s)}%, transparent)`}static getPolygonPos(t,e){const s=[],i=2*Math.PI/e;for(let a=0;a<e;a++){const e={};e.x=t*Math.sin(a*i),e.y=-t*Math.cos(a*i),s.push(e)}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 e=s-t.length+1;for(;e--;)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[s]=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(h.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 s=e;e=t%e,t=s}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 v{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){if(isNaN(Date.parse(t)))return t;return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toISOString().substr(0,25)).getTime():new Date(t).getTime()}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],r=["\x01",...s.shortMonths],o=["\x02",...s.days],n=["\x03",...s.shortDays];function l(t,e=2){let s=t+"";for(;s.length<e;)s="0"+s;return s}const c=i?t.getUTCFullYear():t.getFullYear();e=(e=(e=e.replace(/(^|[^\\])yyyy+/g,"$1"+c)).replace(/(^|[^\\])yy/g,"$1"+c.toString().substr(2,2))).replace(/(^|[^\\])y/g,"$1"+c);const h=(i?t.getUTCMonth():t.getMonth())+1;e=(e=(e=(e=e.replace(/(^|[^\\])MMMM+/g,"$1"+a[0])).replace(/(^|[^\\])MMM/g,"$1"+r[0])).replace(/(^|[^\\])MM/g,"$1"+l(h))).replace(/(^|[^\\])M/g,"$1"+h);const d=i?t.getUTCDate():t.getDate();e=(e=(e=(e=e.replace(/(^|[^\\])dddd+/g,"$1"+o[0])).replace(/(^|[^\\])ddd/g,"$1"+n[0])).replace(/(^|[^\\])dd/g,"$1"+l(d))).replace(/(^|[^\\])d/g,"$1"+d);const p=i?t.getUTCHours():t.getHours(),g=p>12?p-12:0===p?12:p;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(p))).replace(/(^|[^\\])H/g,"$1"+p)).replace(/(^|[^\\])hh+/g,"$1"+l(g))).replace(/(^|[^\\])h/g,"$1"+g);const u=i?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(u))).replace(/(^|[^\\])m/g,"$1"+u);const x=i?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(x))).replace(/(^|[^\\])s/g,"$1"+x);let f=i?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(f,3)),f=Math.round(f/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(f)),f=Math.round(f/10);const m=p<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+f)).replace(/(^|[^\\])TT+/g,"$1"+m)).replace(/(^|[^\\])T/g,"$1"+m.charAt(0));const b=m.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+b)).replace(/(^|[^\\])t/g,"$1"+b.charAt(0));let y=-t.getTimezoneOffset(),w=i||!y?"Z":y>0?"+":"-";if(!i){y=Math.abs(y);const t=y%60;w+=l(Math.floor(y/60))+":"+l(t)}e=e.replace(/(^|[^\\])K/g,"$1"+w);const v=(i?t.getUTCDay():t.getDay())+1;return e=(e=(e=(e=(e=e.replace(new RegExp(o[0],"g"),o[v])).replace(new RegExp(n[0],"g"),n[v])).replace(new RegExp(a[0],"g"),a[h])).replace(new RegExp(r[0],"g"),r[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),r=this.formatDate(i,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(a,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(r[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(r[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(r[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(r[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(r[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(r[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(r[0],10),maxYear:parseInt(o[0],10)}}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=w.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}getDateFields(t,e){const s=new Date(t);return e?{year:s.getUTCFullYear(),month:s.getUTCMonth(),date:s.getUTCDate(),hour:s.getUTCHours(),minute:s.getUTCMinutes(),second:s.getUTCSeconds(),ms:s.getUTCMilliseconds(),weekday:s.getUTCDay()}:{year:s.getFullYear(),month:s.getMonth(),date:s.getDate(),hour:s.getHours(),minute:s.getMinutes(),second:s.getSeconds(),ms:s.getMilliseconds(),weekday:s.getDay()}}addInterval(t,e,s,i){const a=new Date(t);if(i)switch(e){case"year":a.setUTCFullYear(a.getUTCFullYear()+s);break;case"month":a.setUTCMonth(a.getUTCMonth()+s);break;case"week":a.setUTCDate(a.getUTCDate()+7*s);break;case"day":a.setUTCDate(a.getUTCDate()+s);break;case"hour":a.setUTCHours(a.getUTCHours()+s);break;case"minute":a.setUTCMinutes(a.getUTCMinutes()+s);break;case"second":a.setUTCSeconds(a.getUTCSeconds()+s)}else switch(e){case"year":a.setFullYear(a.getFullYear()+s);break;case"month":a.setMonth(a.getMonth()+s);break;case"week":a.setDate(a.getDate()+7*s);break;case"day":a.setDate(a.getDate()+s);break;case"hour":a.setHours(a.getHours()+s);break;case"minute":a.setMinutes(a.getMinutes()+s);break;case"second":a.setSeconds(a.getSeconds()+s)}return a.getTime()}ceilToBoundary(t,e,s,i){const a=new Date(t);if(i)switch(e){case"second":{const e=a.getUTCSeconds(),i=Math.ceil(e/s)*s;return i===e&&0===a.getUTCMilliseconds()?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(i),a.getTime())}case"minute":{const e=a.getUTCMinutes(),i=Math.ceil(e/s)*s;return i===e&&0===a.getUTCSeconds()&&0===a.getUTCMilliseconds()?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(i),a.getTime())}case"hour":{const e=a.getUTCHours(),i=Math.ceil(e/s)*s;return i===e&&0===a.getUTCMinutes()&&0===a.getUTCSeconds()&&0===a.getUTCMilliseconds()?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(i),a.getTime())}case"day":return 0===a.getUTCHours()&&0===a.getUTCMinutes()&&0===a.getUTCSeconds()&&0===a.getUTCMilliseconds()?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(0),a.setUTCDate(a.getUTCDate()+1),a.getTime());case"week":{const e=6048e5,i=Date.UTC(1970,0,5);a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(0);const r=a.getTime(),o=Math.ceil((r-i)/e),n=i+Math.ceil(o/s)*s*e;return n>=t?n:n+s*e}case"month":{const e=a.getUTCMonth(),i=Math.ceil(e/s)*s;return i===e&&1===a.getUTCDate()&&0===a.getUTCHours()&&0===a.getUTCMinutes()&&0===a.getUTCSeconds()&&0===a.getUTCMilliseconds()?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(0),a.setUTCDate(1),a.setUTCMonth(i),a.getTime())}case"year":{const e=a.getUTCFullYear(),i=Math.ceil(e/s)*s;return i===e&&0===a.getUTCMonth()&&1===a.getUTCDate()&&0===a.getUTCHours()&&0===a.getUTCMinutes()&&0===a.getUTCSeconds()&&0===a.getUTCMilliseconds()?t:Date.UTC(i,0,1)}}else switch(e){case"second":{const e=a.getSeconds(),i=Math.ceil(e/s)*s;return i===e&&0===a.getMilliseconds()?t:(a.setMilliseconds(0),a.setSeconds(i),a.getTime())}case"minute":{const e=a.getMinutes(),i=Math.ceil(e/s)*s;return i===e&&0===a.getSeconds()&&0===a.getMilliseconds()?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(i),a.getTime())}case"hour":{const e=a.getHours(),i=Math.ceil(e/s)*s;return i===e&&0===a.getMinutes()&&0===a.getSeconds()&&0===a.getMilliseconds()?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(i),a.getTime())}case"day":return 0===a.getHours()&&0===a.getMinutes()&&0===a.getSeconds()&&0===a.getMilliseconds()?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(0),a.setDate(a.getDate()+1),a.getTime());case"week":{const e=6048e5,i=new Date(1970,0,5).getTime();a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(0);const r=a.getTime(),o=Math.ceil((r-i)/e),n=i+Math.ceil(o/s)*s*e;return n>=t?n:n+s*e}case"month":{const e=a.getMonth(),i=Math.ceil(e/s)*s;return i===e&&1===a.getDate()&&0===a.getHours()&&0===a.getMinutes()&&0===a.getSeconds()&&0===a.getMilliseconds()?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(0),a.setDate(1),a.setMonth(i),a.getTime())}case"year":{const e=a.getFullYear(),i=Math.ceil(e/s)*s;return i===e&&0===a.getMonth()&&1===a.getDate()&&0===a.getHours()&&0===a.getMinutes()&&0===a.getSeconds()&&0===a.getMilliseconds()?t:new Date(i,0,1).getTime()}}return t}isAtBoundary(t,e,s){const i=this.getDateFields(t,s);switch(e){case"year":return 0===i.month&&1===i.date&&0===i.hour&&0===i.minute&&0===i.second&&0===i.ms;case"month":return 1===i.date&&0===i.hour&&0===i.minute&&0===i.second&&0===i.ms;case"day":return 0===i.hour&&0===i.minute&&0===i.second&&0===i.ms;case"hour":return 0===i.minute&&0===i.second&&0===i.ms;case"minute":return 0===i.second&&0===i.ms;case"second":return 0===i.ms}return!1}}class A{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 t=new v(this.w);return t.formatDate(t.getDate(e),a.config.tooltip.x.format)}return t(e,s,i)}defaultGeneralFormatter(t){return Array.isArray(t)?t.map(t=>t):t}defaultYFormatter(t,e){const s=this.w;if(w.isNumber(t))if(0!==s.globals.yValueDecimal)t=t.toFixed(void 0!==e.decimalsInFloat?e.decimalsInFloat:s.globals.yValueDecimal);else{const e=t.toFixed(0);t=Number(e)===t?e:t.toFixed(1)}return t}setLabelFormatters(){const t=this.w,e=t.formatters;return e.xaxisTooltipFormatter=t=>this.defaultGeneralFormatter(t),e.ttKeyFormatter=t=>this.defaultGeneralFormatter(t),e.ttZFormatter=t=>t,e.legendFormatter=t=>this.defaultGeneralFormatter(t),void 0!==t.config.xaxis.labels.formatter?e.xLabelFormatter=t.config.xaxis.labels.formatter:e.xLabelFormatter=e=>{if(w.isNumber(e)){if(!t.config.xaxis.convertedCatToNumeric&&"numeric"===t.config.xaxis.type){if(w.isNumber(t.config.xaxis.decimalsInFloat))return e.toFixed(t.config.xaxis.decimalsInFloat);{const s=t.globals.maxX-t.globals.minX;if(s>0){const t=s/10,i=Math.max(0,-Math.floor(Math.log10(t)));return e.toFixed(i)}return e.toFixed(0)}}if(t.globals.isBarHorizontal){if(t.globals.maxY-t.globals.minY<4)return e.toFixed(1)}return e.toFixed(0)}return e},"function"==typeof t.config.tooltip.x.formatter?e.ttKeyFormatter=t.config.tooltip.x.formatter:e.ttKeyFormatter=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)=>{if(void 0!==s.labels.formatter)e.yLabelFormatters[i]=s.labels.formatter;else if("violin"===t.config.chart.type){const s=t=>"number"==typeof t&&isFinite(t)?""+Math.round(100*t)/100:t;e.yLabelFormatters[i]=e=>t.globals.xyCharts?Array.isArray(e)?e.map(s):s(e):e}else e.yLabelFormatters[i]=e=>t.globals.xyCharts?Array.isArray(e)?e.map(t=>this.defaultYFormatter(t,s)):this.defaultYFormatter(e,s):e}),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((t,e)=>t.length>e.length?t:e,0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}const S={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom",measure:"Measure"}}};class C{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,alignZero:!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},tooltip:{enabled:!1,text:void 0,formatter:void 0,theme:void 0,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:[]},plugins:[],trellis:{by:void 0,row:void 0,column:void 0,emptyPanels:"placeholder",data:void 0,x:void 0,y:void 0,seriesBy:void 0,columns:"auto",minPanelWidth:220,gap:12,aspectRatio:1.6,panelHeight:void 0,order:"first-seen",limit:void 0,virtualize:"auto",scales:{x:"shared",y:"shared",color:"shared",size:"shared"},header:{show:!0,formatter:void 0,style:{fontSize:void 0,fontWeight:void 0,color:void 0}},axes:{labels:"edges"},legend:"shared",toolbar:"shared",tooltip:"panel",zoom:"sync",promote:!0,radiusByTotal:!1,targetTicks:3,panel:void 0},chart:{animations:{enabled:!0,speed:800,easing:"easeInOutSine",animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350,easing:void 0},chartTypeMorph:{enabled:!0,speed:600},respectReducedMotion:!0,largeDatasetThreshold:1e3},background:"",locales:[S],defaultLocale:"en",perspectives:{serializeOptions:["theme","xaxis","yaxis","title","subtitle"]},history:{enabled:!1,maxDepth:100,coalesceMs:250,keyboard:!0},renderer:"svg",rendererThreshold:8e3,layers:{series:"auto",grid:"svg",annotations:"svg",dataLabels:"svg"},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,crossFilter:void 0,filterChange:void 0,annotationDragged:void 0,annotationEdited:void 0,annotationCreated:void 0,annotationStyled:void 0,annotationDeleted:void 0,measured: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,license: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},link:{enabled:!1,mode:"highlight",dimOpacity:.2,id:void 0,dimension:void 0,reduce:void 0,type:void 0,bins:void 0,order:void 0,seriesName:void 0},ink:{enabled:!1,palette:!1,snap:!1,noteColors:void 0},measure:{enabled:!1,mode:"span",key:"m",pinOnRelease:!0,colors:{up:void 0,down:void 0,neutral:void 0,guide:void 0},band:!0,guides:!0,markers:!0,format:{x:void 0,y:void 0,percent:void 0},label:void 0},contextMenu:{enabled:!1,items:["annotate","xline","yline","measure"],labels:{annotate:void 0,xline:void 0,yline:void 0,measure:void 0},noteText:"Note",line:{text:"",strokeDashArray:4,color:void 0}},stacked:!1,stackOnlyBar:!0,stackType:"normal",streaming:{enabled:!1,maxPoints:void 0},toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,measure:!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,embedFonts:!0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:"auto",pinch:"auto",zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}},pan:{inertia:!0,friction:.92},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",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,minZ:void 0,maxZ:void 0},scatter:{jitter:{enabled:!1,x:0,y:0,distributed:!1,maxPoints:5e3}},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"},whiskers:"minmax",points:{show:!1,shape:"circle",size:2.5,jitter:.5,maxPoints:3e3,opacity:.9,fillColor:"series-dark",strokeColor:"#fff",strokeWidth:1}},violin:{bandwidthScale:1,kde:{bandwidth:void 0,resolution:64},normalize:"individual",points:{show:!0,shape:"circle",size:2.5,jitter:.5,constrainToViolin:!0,maxPoints:3e3,opacity:.9,fillColor:"series-dark",strokeColor:"#fff",strokeWidth:1}},histogram:{bins:"auto",binWidth:void 0,range:void 0,normalize:"count",cumulative:!1,overlap:!0},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0,gradientLegend:{enabled:!1,width:"70%",height:"70%",thickness:12,align:"center",stops:16,showLabels:!0,showHoverValue:!0,labelStyle:{fontSize:"11px",fontFamily:void 0,colors:void 0},arrow:{size:8,color:void 0},formatter:void 0}}},funnel:{shape:"rectangle",lastShape:"flat"},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale",minFontSize:4},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0,colorValue:void 0,gradient:{enabled:void 0,min:void 0,max:void 0,midpoint:void 0,symmetric:!0,colors:void 0,stops:void 0},gradientLegend:{enabled:!1,width:"70%",height:"70%",thickness:12,align:"center",stops:16,showLabels:!0,showHoverValue:!0,labelStyle:{fontSize:"11px",fontFamily:void 0,colors:void 0},arrow:{size:8,color:void 0},formatter:void 0}},nested:{enabled:void 0,drilldownAsLevels:!1},parents:{show:"auto",padding:4,fill:void 0,fillOpacity:1,borderColor:void 0,borderWidth:1,borderRadius:void 0,hover:{show:!0,color:void 0,width:2},header:{show:!0,height:22,minWidth:40,align:"left",offsetX:0,offsetY:0,showValue:!1,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,color:void 0,background:void 0,cssClass:""}},tooltip:{formatter:void 0}},levels:[],zoom:{enabled:!1,breadcrumb: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}}}},unit:{layout:"grouped",positions:void 0,transition:"group",shape:"circle",image:{src:void 0,width:20,height:20,tint:!1},pictogram:{mark:void 0,fit:"contain",scale:1,padding:0,fallback:"circle"},size:"auto",columns:{size:"inherit"},grid:{columns:10,total:void 0,fillFrom:"bottom",split:!1,tileColumns:void 0,max:void 0,trackColor:void 0},scatter:{y:"lanes",spread:"swarm",orientation:"horizontal",tickAmount:5,xMin:void 0,xMax:void 0,xTitle:void 0,xFormatter:void 0,yTickAmount:5,yMin:void 0,yMax:void 0,yTitle:void 0,yFormatter:void 0,sizeField:"z",sizeRange:void 0,laneLabelWidth:void 0,gridlines:!0},sizeByValue:{enabled:!1,maxRadius:"auto",minRadius:void 0,scale:"area"},spacing:1.05,borderRadius:0,gather:{motion:"auto",spring:"crisp",easing:"outCubic",overshoot:1.70158,enter:"burst"},arc:{startAngle:-90,endAngle:90,innerRadiusRatio:.4,rows:"auto"},unitValue:1,maxUnits:5e3,sortByGroup:!0,clusterLabels:{show:!0,position:"top",curved:!0,fontSize:"13px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:void 0,external:{show:!1,connector:{show:!0,width:1.5,color:void 0,gap:8,length:22},offsetX:0,offsetY:0}},tooltip:{formatter:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,shape:"arc",min:0,max:100,bands:[],bandsStyle:{strokeWidth:"40%",gap:0,hideTrackWhenPresent:!0},ticks:{show:!1,major:{count:11,length:10,width:2,color:"#666",placement:"outside"},minor:{count:4,length:5,width:1,color:"#999",placement:"outside"},labels:{show:!1,offset:6,fontSize:"11px",fontFamily:void 0,fontWeight:400,color:"#666",formatter:t=>String(t)}},needle:{color:"#333",length:"85%",baseWidth:4,tipWidth:1,offsetY:0,showValueArc:!1,animation:{enabled:!0,duration:800,easing:"ease-out"}},hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",stroke:void 0,strokeWidth:1,strokeDasharray:void 0,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((t,e)=>t+e,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,expandOffset:10,hoverOutline:{show:!0,size:8,gap:0,opacity:.3,color:void 0},borderRadius:0,spacing:0,dataLabels:{offset:0,minAngleToShowLabel:10,external:{show:!1,offsetX:0,offsetY:0,fontSize:void 0,fontFamily:void 0,fontWeight:void 0,color:void 0,formatter:void 0,connector:{show:!0,width:1,color:void 0,length:16,gap:6}}},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((t,e)=>t+e,0)}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},sunburst:{offsetX:0,offsetY:0,startAngle:0,endAngle:360,innerSize:"15%",borderRadius:0,spacing:1,leaf:"extend",partition:"normalize",tint:.14,zoomOnClick:!0,dataLabels:{show:!0,minAngleToShow:8,style:{fontSize:"12px",fontFamily:void 0,fontWeight:400,colors:void 0}}},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},animate:{enabled:!0},countUp:{enabled:!1}},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:[],drilldown:{enabled:!1,series:[],breadcrumb:{show:!0,position:"top-left",separator:" / ",rootLabel:"All",offsetX:0,offsetY:0},animation:{enabled:!0,zoomFromPoint:!1,speed:260},loading:{show:!0},cache:!0,marker:{show:!0,size:6,strokeColor:"#fff"}},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},largeDatasetThreshold:0},noData:{text:void 0,align:"center",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten",value:.15}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken",value:.35}}},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,arrow:!0,compact:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0,background: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",day:"dd MMM",hour:"HH:mm",minute:"HH:mm",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:!1,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",tokens:!0,follow:!1,name:"",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65},accessibility:{colorBlindMode:""}}}}}const k="_apexOwnedByType",D=(t,e)=>(e[k]=t,e),M=["tooltip.custom","tooltip.shared","tooltip.intersect","tooltip.followCursor","dataLabels.enabled","dataLabels.formatter","plotOptions.bar.dataLabels.position","markers.size","states.hover.filter.type","states.active.filter.type","xaxis.crosshairs.width","xaxis.tickPlacement","xaxis.tooltip.enabled","chart.zoom.enabled","chart.animations.dynamicAnimation.enabled"],T=(t,e)=>{let s=t;for(const t of e.split(".")){if(null==s||"object"!=typeof s)return;s=s[t]}return s},_=(t,e,s)=>{const i=e.split("."),a=i.pop();let r=t;for(const t of i)null!=r[t]&&"object"==typeof r[t]||(r[t]={}),r=r[t];void 0===s?delete r[a]:r[a]=s},L={funnel:"bar",pyramid:"bar",gauge:"radialBar",waffle:"unit",histogram:"bar"},F=(t,e)=>{var s,i;const a=L[t];return{chart:{type:a||t,requestedType:a?t:void 0,stacked:null==(s=e.chart)?void 0:s.stacked},plotOptions:{bar:{isFunnel:"funnel"===t||"pyramid"===t},histogram:null==(i=e.plotOptions)?void 0:i.histogram},series:e.series,yaxis:[{title:{},labels:{},axisBorder:{},axisTicks:{}}]}},E=(t,e)=>{if("function"==typeof t)return!!Array.isArray(t[k])||"function"==typeof e&&String(t)===String(e);if("function"==typeof e)return void 0===t;if(t===e)return!0;try{return JSON.stringify(t)===JSON.stringify(e)}catch(t){return!1}},P=({isTimeline:t,seriesIndex:e,dataPointIndex:s,y1:i,y2:a,w:r})=>{var o;let n=r.rangeData.seriesRangeStart[e][s],l=r.rangeData.seriesRangeEnd[e][s],c=r.labelData.labels[s],h=r.config.series[e].name?r.config.series[e].name:"";const d=r.formatters.ttKeyFormatter,p=r.config.tooltip.y.title.formatter,g={w:r,seriesIndex:e,dataPointIndex:s,start:n,end:l};if("function"==typeof p&&(h=p(h,g)),(null==(o=r.config.series[e].data[s])?void 0:o.x)&&(c=r.config.series[e].data[s].x),!t&&"datetime"===r.config.xaxis.type){c=new A(r).xLabelFormat(r.formatters.ttKeyFormatter,c,c,{i:void 0,dateFormatter:new v(r).formatDate,w:r})}"function"==typeof d&&(c=d(c,g)),Number.isFinite(i)&&Number.isFinite(a)&&(n=i,l=a);let u="",x="";const f=r.globals.colors[e];if(void 0===r.config.tooltip.x.formatter)if("datetime"===r.config.xaxis.type){const t=new v(r);u=t.formatDate(t.getDate(n),r.config.tooltip.x.format),x=t.formatDate(t.getDate(l),r.config.tooltip.x.format)}else u=n,x=l;else u=r.config.tooltip.x.formatter(n),x=r.config.tooltip.x.formatter(l);return{start:n,end:l,startVal:u,endVal:x,ylabel:c,color:f,seriesName:h}},B=t=>{let{color:e,seriesName:s,ylabel:i,start:a,end:r,seriesIndex:o,dataPointIndex:n}=t;const l=t.w.globals.tooltip.tooltipLabels.getFormatters(o);a=l.yLbFormatter(a),r=l.yLbFormatter(r);const c=l.yLbFormatter(t.w.seriesData.series[o][n]);let h="";const d=`<span class="value start-value">\n  ${a}\n  </span> <span class="separator">-</span> <span class="value end-value">\n  ${r}\n  </span>`;return h=t.w.globals.comboCharts?"rangeArea"===t.w.config.series[o].type||"rangeBar"===t.w.config.series[o].type?d:`<span>${c}</span>`:d,'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+e+'">'+(s||"")+'</span></div><div> <span class="category">'+i+": </span> "+h+" </div></div>"};class N{constructor(t){this.opts=t}static forType(t){var e,s;const i=new N(t),a=t.chart.requestedType;let r;return r="funnel"===a||"pyramid"===a?i[a]():"gauge"===a?i.gauge():"histogram"===a?i.histogram():-1!==["line","area","bar","candlestick","boxPlot","violin","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","unit","sunburst","pie","polarArea","donut","radar","radialBar"].indexOf(t.chart.type)?i[t.chart.type]():i.line(),(null==(s=null==(e=t.plotOptions)?void 0:e.bar)?void 0:s.isFunnel)&&(r=i.funnel()),t.chart.stacked&&"bar"===t.chart.type&&(r=i.stackedBars()),r}static handOverTypeDefaults(t,e,s){const i=t.chart.requestedType||t.chart.type;if(!e||e===i)return;const a=(new C).init(),r=w.extend(a,N.forType(F(e,t))),o=w.extend(a,N.forType(F(i,t)));for(const e of M){if(s&&void 0!==T(s,e))continue;const i=T(r,e),a=T(o,e);void 0===i&&void 0===a||E(T(t,e),i)&&_(t,e,a)}}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){this.hideYAxis();return w.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){const s=e.w.config.series[e.seriesIndex].name;return null!==t?s+": "+t:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}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(),l(n({},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}}})}pyramid(){return this.funnel()}gauge(){const t=this.radialBar();return l(n({},t),{plotOptions:{radialBar:{startAngle:-135,endAngle:135,hollow:{margin:0,size:"60%"},track:{background:"#e7e7e7",strokeWidth:"100%",margin:5},dataLabels:{name:{show:!1},value:{show:!0,fontSize:"32px",fontWeight:600,offsetY:8}}}}})}histogram(){var t,e,s,i;const a=Array.isArray(null==(t=this.opts)?void 0:t.series)&&this.opts.series.length>1&&!1!==(null==(i=null==(s=null==(e=this.opts)?void 0:e.plotOptions)?void 0:s.histogram)?void 0:i.overlap);return l(n({},this.bar()),{chart:{stacked:!1,zoom:{enabled:!1},animations:{animateGradually:{enabled:!1}}},plotOptions:{bar:{columnWidth:"100%",borderRadius:0,dataLabels:{position:"top"}}},dataLabels:{enabled:!1},fill:a?{opacity:.65}:{},stroke:a?{show:!1}:{show:!0,width:1,colors:["#fff"]},xaxis:{type:"numeric",tooltip:{enabled:!1}},tooltip:{shared:a,intersect:!1,x:{formatter:(t,e)=>{var s,i;const a=null==(i=null==(s=null==e?void 0:e.w)?void 0:s.histogramData)?void 0:i.edges,r=null==e?void 0:e.dataPointIndex;if(!Array.isArray(a)||"number"!=typeof r||r<0)return String(t);const o=a[r],n=a[r+1];if(void 0===o||void 0===n)return String(t);const l=t=>Number.isInteger(t)?String(t):t.toFixed(2);return`${l(o)} to ${l(n)}`}}}})}candlestick(){return{stroke:{width:1},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:D(["candlestick"],({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:D(["boxPlot"],({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}}}}violin(){return{chart:{zoom:{enabled:!1},animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},fill:{opacity:.7},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:D(["violin"],({seriesIndex:t,dataPointIndex:e,w:s})=>this._getViolinTooltip(s,t,e))},states:{active:{filter:{type:"none"}}},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(t,{seriesIndex:e,dataPointIndex:s,w:i}){const a=()=>{const t=i.rangeData.seriesRangeStart[e][s];return i.rangeData.seriesRangeEnd[e][s]-t};return i.globals.comboCharts?"rangeBar"===i.config.series[e].type||"rangeArea"===i.config.series[e].type?a():t:a()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:D(["rangeBar"],t=>t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?(t=>{const{color:e,seriesName:s,ylabel:i,startVal:a,endVal:r}=P(l(n({},t),{isTimeline:!0}));return B(l(n({},t),{color:e,seriesName:s,ylabel:i,start:a,end:r}))})(t):(t=>{const{color:e,seriesName:s,ylabel:i,start:a,end:r}=P(t);return B(l(n({},t),{color:e,seriesName:s,ylabel:i,start:a,end:r}))})(t))},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}dumbbell(t){var e,s;return(null==(e=t.plotOptions.bar)?void 0:e.barHeight)||(t.plotOptions.bar.barHeight=2),(null==(s=t.plotOptions.bar)?void 0: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:D(["rangeArea"],t=>(t=>{const{color:e,seriesName:s,ylabel:i,start:a,end:r}=P(t);return B(l(n({},t),{color:e,seriesName:s,ylabel:i,start:a,end:r}))})(t))}}}brush(t){return w.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;t.yaxis.forEach((e,s)=>{t.yaxis[s].min=0,t.yaxis[s].max=100});return"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}stackedBars(){const t=this.bar();return l(n({},t),{plotOptions:l(n({},t.plotOptions),{bar:l(n({},t.plotOptions.bar),{borderRadiusApplication:"end"})})})}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(t){return w.isNumber(t)?Math.floor(t):t};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(t=>Array.isArray(t)?t:String(t))),i&&i.length&&(t.xaxis.labels.formatter=function(t){return w.isNumber(t)?s(i[Math.floor(t)-1]):s(t)}),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,zoom:{enabled:!1}},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!1,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},axisTicks:{show:!1}}}}unit(){return{chart:{toolbar:{show:!1}},dataLabels:{enabled:!1},stroke:{show:!1,width:0},fill:{opacity:1},tooltip:{followCursor:!0,x:{show:!1}},legend:{show:!0,position:"bottom"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}sunburst(){return{chart:{toolbar:{show:!1}},dataLabels:{style:{colors:["#fff"]},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}pie(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:t=>"number"==typeof t?t.toFixed(1)+"%":t,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=>"number"==typeof t?t.toFixed(1)+"%":t,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=>"number"==typeof t?t.toFixed(1)+"%":t,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}},stroke:{lineCap:"butt"},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 r=t.candleData.seriesCandleO[e][s],o=t.candleData.seriesCandleH[e][s],n=t.candleData.seriesCandleM[e][s],l=t.candleData.seriesCandleL[e][s],c=t.candleData.seriesCandleC[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">`+r+`</span></div><div>${i[1]}: <span class="value">`+o+"</span></div>"+(n?`<div>${i[2]}: <span class="value">`+n+"</span></div>":"")+`<div>${i[3]}: <span class="value">`+l+`</span></div><div>${i[4]}: <span class="value">`+c+"</span></div></div>"}_getViolinTooltip(t,e,s){var i,a,r;const o=null==(i=t.violinData.seriesViolinMin[e])?void 0:i[s],n=null==(a=t.violinData.seriesViolinMax[e])?void 0:a[s],l=(null==(r=t.violinData.seriesViolinPoints[e])?void 0:r[s])||[],c=t.config.series[e].name||"series-"+(e+1);return`<div class="apexcharts-tooltip-box apexcharts-tooltip-${t.config.chart.type}"><div class="apexcharts-tooltip-violin-name">${c}</div><div>Min: <span class="value">${o}</span></div><div>Max: <span class="value">${n}</span></div><div>Observations: <span class="value">${l.length}</span></div></div>`}}class R{constructor(t){this.opts=t}init({responsiveOverride:t}){var e,s,i,a,r,o,n,l;let c=this.opts;const d=new C,p=new N(c);c=this.normalizeAliasedChartType(c),this.chartType=c.chart.type,c=this.extendYAxis(c),c=this.extendAnnotations(c);let g=d.init(),u={};if(c&&"object"==typeof c){let d=N.forType(c);(null==(e=c.chart.brush)?void 0:e.enabled)&&(d=p.brush(d)),(null==(i=null==(s=c.plotOptions)?void 0:s.line)?void 0:i.isSlopeChart)&&(d=p.slope()),c.chart.stacked&&"100%"===c.chart.stackType&&(c=p.stacked100(c)),(null==(r=null==(a=c.plotOptions)?void 0:a.bar)?void 0:r.isDumbbell)&&(c=p.dumbbell(c)),this.checkForDarkTheme(h.getApex()),this.checkForDarkTheme(c),c.xaxis=c.xaxis||h.getApex().xaxis||{},t||(c.xaxis.convertedCatToNumeric=!1),c=this.checkForCatToNumericXAxis(this.chartType,d,c),((null==(o=c.chart.sparkline)?void 0:o.enabled)||(null==(l=null==(n=h.getApex().chart)?void 0:n.sparkline)?void 0:l.enabled))&&(d=p.sparkline(d)),u=w.extend(g,d)}const x=w.extend(u,h.getApex());return g=w.extend(x,c),g=this.handleUserInputErrors(g),g}normalizeAliasedChartType(t){if(!t||!t.chart)return t;const e=t.chart.type;return"funnel"!==e&&"pyramid"!==e&&"gauge"!==e&&"waffle"!==e&&"histogram"!==e||(t.chart.requestedType=e,"waffle"===e?(t.plotOptions=t.plotOptions||{},t.plotOptions.unit=t.plotOptions.unit||{},null==t.plotOptions.unit.layout&&(t.plotOptions.unit.layout="grid"),null==t.plotOptions.unit.shape&&(t.plotOptions.unit.shape="square"),t.chart.type="unit"):"funnel"===e||"pyramid"===e?(t.plotOptions=t.plotOptions||{},t.plotOptions.bar=t.plotOptions.bar||{},t.plotOptions.bar.isFunnel=!0,t.plotOptions.bar.horizontal=!0,t.chart.type="bar",t.plotOptions.bar.isPyramid="pyramid"===e):"gauge"===e?t.chart.type="radialBar":"histogram"===e&&(t.xaxis=t.xaxis||{},null==t.xaxis.type&&(t.xaxis.type="numeric"),t.chart.type="bar")),t}checkForCatToNumericXAxis(t,e,s){var i,a,r,o,n;const l=new N(s),c=("bar"===t||"boxPlot"===t||"violin"===t)&&(null==(a=null==(i=s.plotOptions)?void 0:i.bar)?void 0:a.horizontal),h="pie"===t||"polarArea"===t||"donut"===t||"radar"===t||"radialBar"===t||"heatmap"===t||"unit"===t||"sunburst"===t,d="datetime"!==s.xaxis.type&&"numeric"!==s.xaxis.type,p=("scatter"===t||"bubble"===t)&&(null==(n=null==(o=null==(r=s.plotOptions)?void 0:r.scatter)?void 0:o.jitter)?void 0:n.enabled),g=s.xaxis.tickPlacement?s.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return c||h||p||!d||"between"===g||(s=l.convertCatToNumeric(s)),s}extendYAxis(t,e){const s=new C;(void 0===t.yaxis||!t.yaxis||Array.isArray(t.yaxis)&&0===t.yaxis.length)&&(t.yaxis={});const i=h.getApex();t.yaxis.constructor!==Array&&i.yaxis&&i.yaxis.constructor!==Array&&(t.yaxis=w.extend(t.yaxis,i.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[w.extend(s.yAxis,t.yaxis)]:t.yaxis=w.extendArray(t.yaxis,s.yAxis);let a=!1;t.yaxis.forEach(t=>{t.logarithmic&&(a=!0)});let r=t.series;return e&&!r&&(r=e.config.series),a&&r.length!==t.yaxis.length&&r.length&&(t.yaxis=r.map((e,i)=>{if(e.name||(r[i].name=`series-${i+1}`),t.yaxis[i])return t.yaxis[i].seriesName=r[i].name,t.yaxis[i];{const e=w.extend(s.yAxis,t.yaxis[0]);return e.show=!1,e}})),a&&r.length>1&&(r.length,t.yaxis.length),t}extendAnnotations(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),t=this.extendPointAnnotations(t)}extendYAxisAnnotations(t){const e=new C;return t.annotations.yaxis=w.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}extendXAxisAnnotations(t){const e=new C;return t.annotations.xaxis=w.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}extendPointAnnotations(t){const e=new C;return t.annotations.points=w.extendArray(void 0!==t.annotations.points?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&&(e.yaxis[0].reversed=!1),e}}const I=1.618,X=[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],z=[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 O{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.hasNullValues=!1,t.invalidLogScale=!1,t.seriesRangeName={},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.isDestroyed=!1,t.bulkRevealScheduled=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.delayedElements=[],t.pointsArray=[],t.barCanvasCoords=null,t.activeRenderer=null,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=(e,s,i=s)=>{Object.defineProperty(e,i,{get:()=>t[s],set(e){t[s]=e},enumerable:!0,configurable:!0})},s={};e(s,"series","data");for(const t 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","collapsingSeriesIndices","allSeriesCollapsed","risingSeries","previousPaths","ignoreYAxisIndexes","labels","categoryLabels","timescaleLabels","groups"])e(s,t);Object.defineProperty(t,"seriesNS",{value:s,writable:!1,enumerable:!1,configurable:!0});const i={};for(const t 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,t);Object.defineProperty(t,"axes",{value:i,writable:!1,enumerable:!1,configurable:!0});const a={};for(const t 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,t);Object.defineProperty(t,"layout",{value:a,writable:!1,enumerable:!1,configurable:!0});const r={};for(const t of["domCache","dimensionCache","cachedSelectors","textRectsCache","pointsArray","dataLabelsRects","lastDrawnDataLabelsIndexes","delayedElements","resizeTimer","selectionResizeTimer","resizeObserver"])e(r,t);Object.defineProperty(t,"cache",{value:r,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:[]},radialNeedleRAF:null,unitGatherRAF:null,unitExitRAF:null,stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0,batched:!1},LINE_HEIGHT_RATIO:I,axisCharts:!0,isSlopeChart:t.plotOptions.line.isSlopeChart,comboCharts:!1,initialConfig:null,initialSeries:[],tokenSurface:void 0,lastXAxis:[],lastYAxis:[],allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],collapsingSeriesIndices:[],risingSeries:[],ignoreYAxisIndexes:[],isDirty:!1,isExecCalled:!1,dataChanged:!1,resized:!1,columnSeries:null,yaxis:null,total:0,shouldAnimate:!0,previousPaths:[],prevPolarAngles:null,prevStreamFrame:null,streamScrolled:!1,prevChromeFrame:null,svgWidth:0,svgHeight:0,lastResizeSignature:null,defaultLabels:!1,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateYAxisX:[],yAxisWidths:[],tooltip:null,resizeObserver:null,locale:{},memory:{methodsToExec:[]},niceScaleAllowedMagMsd:X,niceScaleDefaultTicks:z,seriesYAxisMap:[],seriesYAxisReverseMap:[],noData:!1}}defineLazyInitialSeries(t){let e=[],s=null;Object.defineProperty(t,"initialSeries",{configurable:!0,enumerable:!0,get:()=>(null===s&&(s=w.clone(e)),s),set(i){e=Array.isArray(i)?i.map(t=>t&&"object"==typeof t&&!Array.isArray(t)?n({},t):t):i,s=null,t._initialSeriesPeek=e}}),t._initialSeriesPeek=e}init(t){const e=this.globalVars(t);return this.initGlobalVars(e),this.defineLazyInitialSeries(e),e.initialConfig=w.extend({},t),e.initialSeries=t.series,e.lastXAxis=w.clone(e.initialConfig.xaxis),e.lastYAxis=w.clone(e.initialConfig.yaxis),e}}class Y{constructor(t){this.opts=t}init(){const t=new R(this.opts).init({responsiveOverride:!1}),e=(new O).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,measureEnabled:"measure"===t.chart.toolbar.autoSelected&&!!t.chart.toolbar.tools.measure&&!(!t.chart.measure||!t.chart.measure.enabled),zoomed:!1,selection:void 0,visibleXRange:void 0,selectedDataPoints:[],mousedown:!1,clientX:null,clientY:null,lastClientPosition:{},capturedSeriesIndex:-1,capturedDataPointIndex:-1,disableZoomIn:!1,disableZoomOut:!1,isTouchDevice:!!h.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:[],seriesBoxPoints:[]},rangeData:{seriesRangeStart:[],seriesRangeEnd:[],seriesRange:[]},violinData:{seriesViolinDensity:[],seriesViolinPoints:[],seriesViolinMin:[],seriesViolinMax:[]},histogramData:{edges:[],binWidth:0,counts:[],rule:"",capped:!1},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:[],unitData:[]},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:[],gridPad:{top:0,right:0,bottom:0,left:0}}};Object.defineProperty(e,"dom",{get:()=>s.dom,set(t){s.dom=t},enumerable:!1,configurable:!0});for(const t of["xLabelFormatter","yLabelFormatters","xaxisTooltipFormatter","ttKeyFormatter","ttVal","ttZFormatter","legendFormatter"])Object.defineProperty(e,t,{get:()=>s.formatters[t],set(e){s.formatters[t]=e},enumerable:!1,configurable:!0});for(const t of["zoomEnabled","panEnabled","selectionEnabled","zoomed","selection","visibleXRange","selectedDataPoints","mousedown","clientX","clientY","lastClientPosition","capturedSeriesIndex","capturedDataPointIndex","disableZoomIn","disableZoomOut","isTouchDevice"])Object.defineProperty(e,t,{get:()=>s.interact[t],set(e){s.interact[t]=e},enumerable:!1,configurable:!0});for(const t of["gridHeight","gridWidth","translateX","translateY","translateXAxisX","translateXAxisY","rotateXLabels","xAxisHeight","xAxisLabelsHeight","xAxisGroupLabelsHeight","xAxisLabelsWidth","yLabelsCoords","yTitleCoords","gridPad"])Object.defineProperty(e,t,{get:()=>s.layout[t],set(e){s.layout[t]=e},enumerable:!1,configurable:!0});for(const t of["series","seriesNames","seriesX","seriesZ","seriesColors","seriesGoals","stackedSeriesTotals","stackedSeriesTotalsByGroups"])Object.defineProperty(e,t,{get:()=>s.seriesData[t],set(e){s.seriesData[t]=e},enumerable:!1,configurable:!0});for(const t of["isXNumeric","dataFormatXNumeric","isDataXYZ","isRangeData","isRangeBar","isMultiLineX","noLabelsProvided","dataWasParsed"])Object.defineProperty(e,t,{get:()=>s.axisFlags[t],set(e){s.axisFlags[t]=e},enumerable:!1,configurable:!0});for(const t of["labels","categoryLabels","timescaleLabels","hasXaxisGroups","groups","seriesGroups"])Object.defineProperty(e,t,{get:()=>s.labelData[t],set(e){s.labelData[t]=e},enumerable:!1,configurable:!0});for(const t of["seriesRangeStart","seriesRangeEnd","seriesRange"])Object.defineProperty(e,t,{get:()=>s.rangeData[t],set(e){s.rangeData[t]=e},enumerable:!1,configurable:!0});for(const t of["seriesCandleO","seriesCandleH","seriesCandleM","seriesCandleL","seriesCandleC"])Object.defineProperty(e,t,{get:()=>s.candleData[t],set(e){s.candleData[t]=e},enumerable:!1,configurable:!0});for(const t of["seriesViolinDensity","seriesViolinPoints","seriesViolinMin","seriesViolinMax"])Object.defineProperty(e,t,{get:()=>s.violinData[t],set(e){s.violinData[t]=e},enumerable:!1,configurable:!0});return s}}class H{constructor(t){this.w=t}static checkComboSeries(t,e){let s=!1,i=0,a=0;return void 0===e&&(e="line"),t.length&&void 0!==t[0].type&&t.forEach(t=>{"bar"!==t.type&&"column"!==t.type&&"candlestick"!==t.type&&"boxPlot"!==t.type&&"violin"!==t.type||i++,void 0!==t.type&&t.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 s=0;s<e.seriesData.series.length;s++)void 0!==e.seriesData.series[s][i]&&-1===t.indexOf(s)&&(a+=e.seriesData.series[s][i]);s.push(a)}return s}getSeriesTotalByIndex(t=null){if(null===t)return this.w.config.series.reduce((t,e)=>t+e,0);{const e=this.w.seriesData.series[t];return Array.isArray(e)?e.reduce((t,e)=>t+e,0):null!=e?e:0}}getStackedSeriesTotalsByGroups(){const t=this.w,e=[];return t.labelData.seriesGroups.forEach(s=>{const i=[];t.config.series.forEach((e,a)=>{s.indexOf(t.seriesData.seriesNames[a])>-1&&i.push(a)});const a=t.seriesData.series.map((t,e)=>-1===i.indexOf(e)?e:-1).filter(t=>-1!==t);e.push(this.getStackedSeriesTotals(a))}),e}setSeriesYAxisMappings(){const t=this.w.globals,e=this.w.config;let s=[];const i=[],a=[],r=this.w.seriesData.series.length>e.yaxis.length||e.yaxis.some(t=>Array.isArray(t.seriesName));e.series.forEach((t,e)=>{a.push(e),i.push(null)}),e.yaxis.forEach((t,e)=>{s[e]=[]});const o=[];e.yaxis.forEach((t,i)=>{let n=!1;if(t.seriesName){let o=[];Array.isArray(t.seriesName)?o=t.seriesName:o.push(t.seriesName),o.forEach(t=>{e.series.forEach((e,o)=>{if(e.name===t){let t=o;i===o||r?(!r||a.indexOf(o)>-1)&&s[i].push([i,o]):(s[o].push([o,i]),t=i),n=!0,t=a.indexOf(t),-1!==t&&a.splice(t,1)}})})}n||o.push(i)}),s=s.map(t=>{const e=[];return t.forEach(t=>{i[t[1]]=t[0],e.push(t[1])}),e});let n=e.yaxis.length-1;for(let t=0;t<o.length&&(n=o[t],s[n]=[],a);t++){const t=a[0];a.shift(),s[n].push(t),i[t]=n}a.forEach(t=>{s[n].push(t),i[t]=n}),t.seriesYAxisMap=s.map(t=>t),t.seriesYAxisReverseMap=i.map(t=>t),t.seriesYAxisMap.forEach((t,s)=>{t.forEach(t=>{if(e.series[t]&&void 0===e.series[t].group){e.series[t].group="apexcharts-axis-".concat(s.toString())}})})}isSeriesNull(t=null){let e=[];const s=this.w.config.series;return e=null===t?s.filter(t=>null!==t):s[t]&&Array.isArray(s[t].data)?s[t].data.filter(t=>null!==t):null!==s[t]&&void 0!==s[t]?[s[t]]:[],0===e.length}seriesHaveSameValues(t){const e=this.w.seriesData.series[t];return!Array.isArray(e)||e.every((t,e,s)=>t===s[0])}getCategoryLabels(t){const e=this.w;let s=t.slice();return e.config.xaxis.convertedCatToNumeric&&(s=t.map(t=>e.config.xaxis.labels.formatter(t-e.globals.minX+1))),s}getLargestSeries(){const t=this.w;t.globals.maxValsInArrayIndex=t.seriesData.series.map(t=>t.length).indexOf(Math.max.apply(Math,t.seriesData.series.map(t=>t.length)))}getLargestMarkerSize(){const t=this.w;let e=0;return t.globals.markers.size.forEach(t=>{e=Math.max(e,t)}),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach(t=>{e=Math.max(e,t.size)}),e>0&&(t.config.markers.hover.size>0?e=t.config.markers.hover.size:e+=t.config.markers.hover.sizeOffset),t.globals.markers.largestSize=e,e}getSeriesTotals(){const t=this.w;t.globals.seriesTotals=t.seriesData.series.map(t=>{let e=0;if(Array.isArray(t))for(let s=0;s<t.length;s++)e+=t[s];else e+=t;return e})}getSeriesTotalsXRange(t,e){const s=this.w;return s.seriesData.series.map((i,a)=>{let r=0;for(let o=0;o<i.length;o++)s.seriesData.seriesX[a][o]>t&&s.seriesData.seriesX[a][o]<e&&(r+=i[o]);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 r=0;a&&(r=100*e[i]/a),s.push(r)}else{const i=100*e/t.globals.seriesTotals.reduce((t,e)=>t+e,0);s.push(i)}return s})}getCalculatedRatios(){const t=this.w,e=t.globals,s=[];let i=0,a=0,r=0,o=0,n=[],l=.1,c=0;if(e.yRange=[],e.isMultipleYAxis)for(let t=0;t<e.minYArr.length;t++)e.yRange.push(Math.abs(e.minYArr[t]-e.maxYArr[t])),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 t=0;t<e.yRange.length;t++)s.push(e.yRange[t]/this.w.layout.gridHeight);if(a=e.xRange/this.w.layout.gridWidth,i=e.yRange/this.w.layout.gridWidth,r=e.xRange/this.w.layout.gridHeight,o=e.zRange/this.w.layout.gridHeight*16,o||(o=1),e.minY!==Number.MIN_VALUE&&0!==Math.abs(e.minY)){e.hasNegs=!0}if(t.globals.seriesYAxisReverseMap.length>0){const r=(e,i)=>{const a=t.config.yaxis[t.globals.seriesYAxisReverseMap[i]];if(!a)return 0;if(a.logarithmic)return 0;return-(e<0?-1:1)*(e=Math.abs(e))/s[i]};if(e.isMultipleYAxis){n=[];for(let t=0;t<s.length;t++)n.push(r(e.minYArr[t],t))}else n=[],n.push(r(e.minY,0)),e.minY!==Number.MIN_VALUE&&0!==Math.abs(e.minY)&&(l=-e.minY/i,c=e.minX/a)}else n=[],n.push(0),l=0,c=0;return{yRatio:s,invertedYRatio:i,zRatio:o,xRatio:a,invertedXRatio:r,baseLineInvertedY:l,baseLineY:n,baseLineX:c}}getLogSeries(t){const e=this.w;return e.globals.seriesLog=t.map((t,s)=>{const i=e.globals.seriesYAxisReverseMap[s];return e.config.yaxis[i]&&e.config.yaxis[i].logarithmic?t.map(t=>null===t?null:this.getLogVal(e.config.yaxis[i].logBase,t,s)):t}),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(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((t,a)=>{const r=e.globals.seriesYAxisReverseMap[a];if(e.config.yaxis[r]&&this.w.config.yaxis[r].logarithmic){const t=1;return i.yLogRatio[a]=t/this.w.layout.gridHeight,t}return s.yRange[a]}),i.invalidLogScale?t.slice():i.yLogRatio}static extendArrayProps(t,e,s){var i,a;return(null==e?void 0:e.yaxis)&&(e=t.extendYAxis(e,s)),(null==e?void 0:e.annotations)&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),(null==(i=null==e?void 0:e.annotations)?void 0:i.xaxis)&&(e=t.extendXAxisAnnotations(e)),(null==(a=null==e?void 0:e.annotations)?void 0:a.points)&&(e=t.extendPointAnnotations(e))),e}drawSeriesByGroup(t,e,s,i){const a=this.w,r=[];return t.series.length>0&&e.forEach(e=>{const o=[],n=[];t.i.forEach((s,i)=>{a.config.series[s].group===e&&(o.push(t.series[i]),n.push(s))}),o.length>0&&r.push(i.draw(o,s,n))}),r}}const W="http://www.w3.org/2000/svg";class G{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 G(this.x,this.y)}}class U{constructor(t,e,s,i,a,r){this.a=null!=t?t:1,this.b=null!=e?e:0,this.c=null!=s?s:0,this.d=null!=i?i:1,this.e=null!=a?a:0,this.f=null!=r?r:0}rotate(t){const e=t*Math.PI/180,s=Math.cos(e),i=Math.sin(e);return this.multiply(new U(s,i,-i,s,0,0))}scale(t,e){return this.multiply(new U(t,0,0,null!=e?e:t,0,0))}multiply(t){return new U(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)}apply(t){return new G(this.a*t.x+this.c*t.y+this.e,this.b*t.x+this.d*t.y+this.f)}}class ${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}}function V(t){if(!t||"string"!=typeof t)return[["M",0,0]];const e=[],s=/([MmLlHhVvCcSsQqTtAaZz])\s*/g,i=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;let a;const r=[],o=[];for(;null!==(a=s.exec(t));)r.push(a[1]),o.push(a.index);for(let s=0;s<r.length;s++){const a=o[s]+r[s].length,n=s+1<o.length?o[s+1]:t.length,l=t.substring(a,n),c=[];let h;for(i.lastIndex=0;null!==(h=i.exec(l));)c.push(parseFloat(h[0]));const d=r[s].toUpperCase();if("Z"===d)e.push(["Z"]);else if("M"===d||"L"===d||"T"===d)for(let t=0;t<c.length;t+=2)e.push([d,c[t],c[t+1]]);else if("H"===d)for(let t=0;t<c.length;t++)e.push([d,c[t]]);else if("V"===d)for(let t=0;t<c.length;t++)e.push([d,c[t]]);else if("C"===d)for(let t=0;t<c.length;t+=6)e.push([d,c[t],c[t+1],c[t+2],c[t+3],c[t+4],c[t+5]]);else if("S"===d||"Q"===d)for(let t=0;t<c.length;t+=4)e.push([d,c[t],c[t+1],c[t+2],c[t+3]]);else if("A"===d)for(let t=0;t<c.length;t+=7)e.push([d,c[t],c[t+1],c[t+2],c[t+3],c[t+4],c[t+5],c[t+6]])}return 0===e.length&&e.push(["M",0,0]),e}function j(t){let e=1/0,s=1/0,i=-1/0,a=-1/0;return t.forEach(t=>{for(let r=1;r<t.length;r+=2)if(r+1<=t.length){const o=t[r],n=t[r+1];"number"==typeof o&&"number"==typeof n&&(o<e&&(e=o),o>i&&(i=o),n<s&&(s=n),n>a&&(a=n))}}),e===1/0?{x:0,y:0,width:0,height:0}:{x:e,y:s,width:i-e,height:a-s}}function q(t){return t.map(t=>t.join(" ")).join(" ")}function Z(t){switch(t[0]){case"z":case"Z":t[0]="L",t[1]=this.start[0],t[2]=this.start[1];break;case"H":t[0]="L",t[2]=this.pos[1];break;case"V":t[0]="L",t[2]=t[1],t[1]=this.pos[0];break;case"T":t[0]="Q",t[3]=t[1],t[4]=t[2],t[1]=this.reflection[1],t[2]=this.reflection[0];break;case"S":t[0]="C",t[6]=t[4],t[5]=t[3],t[4]=t[2],t[3]=t[1],t[2]=this.reflection[1],t[1]=this.reflection[0]}return t}function K(t){var e=t.length;return this.pos=[t[e-2],t[e-1]],-1!="SCQT".indexOf(t[0])&&(this.reflection=[2*this.pos[0]-t[e-4],2*this.pos[1]-t[e-3]]),t}function J(t){var e,s=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],s;case"L":t[5]=t[3]=t[1],t[6]=t[4]=t[2],t[1]=this.pos[0],t[2]=this.pos[1];break;case"Q":t[6]=t[4],t[5]=t[3],t[4]=1*t[4]/3+2*t[2]/3,t[3]=1*t[3]/3+2*t[1]/3,t[2]=1*this.pos[1]/3+2*t[2]/3,t[1]=1*this.pos[0]/3+2*t[1]/3;break;case"A":s=function(t,e){var s,i,a,r,o,n,l,c,h,d,p,g,u,x,f,m,b,y,w,v,A,S,C,k,D,M,T=Math.abs(e[1]),_=Math.abs(e[2]),L=e[3]%360,F=e[4],E=e[5],P=e[6],B=e[7],N=new G(t[0],t[1]),R=new G(P,B),I=[];if(0===T||0===_||N.x===R.x&&N.y===R.y)return[["C",N.x,N.y,R.x,R.y,R.x,R.y]];s=new G((N.x-R.x)/2,(N.y-R.y)/2).transform((new U).rotate(L)),(i=s.x*s.x/(T*T)+s.y*s.y/(_*_))>1&&(T*=i=Math.sqrt(i),_*=i);a=(new U).rotate(L).scale(1/T,1/_).rotate(-L),N=N.transform(a),R=R.transform(a),r=[R.x-N.x,R.y-N.y],n=r[0]*r[0]+r[1]*r[1],o=Math.sqrt(n),r[0]/=o,r[1]/=o,l=n<4?Math.sqrt(1-n/4):0,F===E&&(l*=-1);c=new G((R.x+N.x)/2+l*-r[1],(R.y+N.y)/2+l*r[0]),h=new G(N.x-c.x,N.y-c.y),d=new G(R.x-c.x,R.y-c.y),p=Math.acos(h.x/Math.sqrt(h.x*h.x+h.y*h.y)),h.y<0&&(p*=-1);g=Math.acos(d.x/Math.sqrt(d.x*d.x+d.y*d.y)),d.y<0&&(g*=-1);E&&p>g&&(g+=2*Math.PI);!E&&p<g&&(g-=2*Math.PI);for(x=Math.ceil(2*Math.abs(p-g)/Math.PI),m=[],b=p,u=(g-p)/x,f=4*Math.tan(u/4)/3,A=0;A<=x;A++)w=Math.cos(b),y=Math.sin(b),v=new G(c.x+w,c.y+y),m[A]=[new G(v.x+f*y,v.y-f*w),v,new G(v.x-f*y,v.y+f*w)],b+=u;for(m[0][0]=m[0][1].clone(),m[m.length-1][2]=m[m.length-1][1].clone(),a=(new U).rotate(L).scale(T,_).rotate(-L),A=0,S=m.length;A<S;A++)m[A][0]=m[A][0].transform(a),m[A][1]=m[A][1].transform(a),m[A][2]=m[A][2].transform(a);for(A=1,S=m.length;A<S;A++)C=(v=m[A-1][2]).x,k=v.y,D=(v=m[A][0]).x,M=v.y,P=(v=m[A][1]).x,B=v.y,I.push(["C",C,k,D,M,P,B]);return I}(null!=(e=this.pos)?e:[],t),t=s[0]}return t[0]="C",this.pos=[t[5],t[6]],this.reflection=[2*t[5]-t[3],2*t[6]-t[4]],s}function Q(t,e){if(!1===e)return!1;for(var s=e,i=t.length;s<i;++s)if("M"==t[s][0])return s;return!1}function tt(t,e,s,i,a,r){for(var o=t.slice(e,s||void 0),n=i.slice(a,r||void 0),l=0,c={pos:[0,0],start:[0,0]},h={pos:[0,0],start:[0,0]};o[l]=Z.call(c,o[l]),n[l]=Z.call(h,n[l]),o[l][0]!=n[l][0]||"M"==o[l][0]||"A"==o[l][0]&&(o[l][4]!=n[l][4]||o[l][5]!=n[l][5])?(Array.prototype.splice.apply(o,[l,1].concat(J.call(c,o[l]))),Array.prototype.splice.apply(n,[l,1].concat(J.call(h,n[l])))):(o[l]=K.call(c,o[l]),n[l]=K.call(h,n[l])),++l!=o.length||l!=n.length;)l==o.length&&o.push(["C",c.pos[0],c.pos[1],c.pos[0],c.pos[1],c.pos[0],c.pos[1]]),l==n.length&&n.push(["C",h.pos[0],h.pos[1],h.pos[0],h.pos[1],h.pos[0],h.pos[1]]);return{start:o,dest:n}}function et(t,e){var s=function(t,e){for(var s,i=V(t),a=V(e),r=0,o=0,n=!1,l=!1;!1!==r||!1!==o;){if(n=Q(i,!1!==r&&r+1),l=Q(a,!1!==o&&o+1),!1===r){const t=j(s.start);r=0==t.height||0==t.width?i.push(i[0])-1:i.push(["M",t.x+t.width/2,t.y+t.height/2])-1}if(!1===o){const t=j(s.dest);o=0==t.height||0==t.width?a.push(a[0])-1:a.push(["M",t.x+t.width/2,t.y+t.height/2])-1}s=tt(i,r,n,a,o,l),i=i.slice(0,r).concat(s.start,!1===n?[]:i.slice(n)),a=a.slice(0,o).concat(s.dest,!1===l?[]:a.slice(l)),r=!1!==n&&r+s.start.length,o=!1!==l&&o+s.dest.length}return{start:i,dest:a}}(t,e),i=s.start,a=s.dest;return function(t){return q(i.map(function(e,s){return a[s].map(function(i,r){return 0===r?i:e[r]+(a[s][r]-e[r])*t})}))}}let st=null,it=null;function at(t,e){const s=new Array(e);if(!h.isBrowser()){const i=j(V(t)),a=i.x+i.width/2,r=i.y+i.height/2;for(let t=0;t<e;t++)s[t]={x:a,y:r};return s}st||(st=document.createElementNS("http://www.w3.org/2000/svg","svg"),st.setAttribute("width","0"),st.setAttribute("height","0"),st.setAttribute("style","position:absolute;width:0;height:0;visibility:hidden;pointer-events:none;"),it=document.createElementNS("http://www.w3.org/2000/svg","path"),st.appendChild(it),document.body.appendChild(st)),it.setAttribute("d",t||"M0 0");let i=0;try{i=it.getTotalLength()}catch(t){i=0}if(!i||!isFinite(i)){const i=j(V(t)),a=i.x+i.width/2,r=i.y+i.height/2;for(let t=0;t<e;t++)s[t]={x:a,y:r};return s}for(let t=0;t<e;t++)try{const a=it.getPointAtLength(t/e*i);s[t]={x:a.x,y:a.y}}catch(e){s[t]={x:0,y:0}}return s}function rt(t){return-Math.cos(t*Math.PI)/2+.5}let ot=rt;function nt(t){if(!t||"string"!=typeof t)return null;if("#"===t[0]){let e=t.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 e=t.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/);return e?[+e[1],+e[2],+e[3],void 0!==e[4]?+e[4]:1]:null}function lt(t,e,s){return`rgba(${Math.round(t[0]+(e[0]-t[0])*s)},${Math.round(t[1]+(e[1]-t[1])*s)},${Math.round(t[2]+(e[2]-t[2])*s)},${t[3]+(e[3]-t[3])*s})`}class ct{constructor(t,e,s){this.el=t,this.duration=null!=e?e:300,this.delay=s||0,this._attrTarget=null,this._plotTarget=null,this._plotSnap=null,this._plotAlgorithm="commands",this._afterCb=null,this._duringCb=null,this._easing=null,this._next=null,this._root=null,this._scheduled=!1}ease(t){return"function"==typeof t&&(this._easing=t),this._schedule(),this}attr(t){return this._attrTarget=t,this._schedule(),this}plot(t,e,s){return this._plotTarget=t,e&&(this._plotAlgorithm=e),this._plotSnap=s||null,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 ct(this.el,t,e);return this._next=s,s._root=this._root||this,s}_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(t=>{s+=t.delay,t._execute(s),s+=t.duration})}_execute(t){const e=this.el,s=this.duration;if(s<=1){const s=()=>{this._attrTarget&&e.attr(this._attrTarget),this._plotTarget&&e.plot(this._plotSnap||this._plotTarget),this._afterCb&&this._afterCb.call(e)};return void(t>0?setTimeout(s,t):s())}const i=()=>{const t={},i={},a={};if(this._attrTarget)for(const s of Object.keys(this._attrTarget)){const r=e.attr(s);t[s]=r;const o=nt(r),n=nt(String(this._attrTarget[s]));o&&n&&(i[s]=o,a[s]=n)}let r=null;if(this._plotTarget){const t=e.attr("d")||"";try{r="polygons"===this._plotAlgorithm?function(t,e,s=96){const i=at(t,s),a=at(e,s);let r=0,o=1/0;for(let t=0;t<s;t++){let e=0;for(let r=0;r<s;r++){const n=i[(r+t)%s],l=a[r],c=n.x-l.x,h=n.y-l.y;if(e+=c*c+h*h,e>=o)break}e<o&&(o=e,r=t)}const n=new Array(s);for(let t=0;t<s;t++)n[t]=i[(t+r)%s];return function(t){let e="";for(let i=0;i<s;i++){const s=n[i],r=a[i],o=s.x+(r.x-s.x)*t,l=s.y+(r.y-s.y)*t;e+=(0===i?"M":"L")+o.toFixed(3)+" "+l.toFixed(3)+" "}return e+"Z"}}(t,this._plotTarget):et(t,this._plotTarget)}catch(t){r=null}}const o=performance.now(),n=this._easing||ot,l=c=>{const h=c-o,d=Math.min(h/s,1),p=n(d);if(this._attrTarget)if(d>=1)e.attr(this._attrTarget);else{const s={};for(const e of Object.keys(this._attrTarget))if(i[e]&&a[e])s[e]=lt(i[e],a[e],p);else{const i=parseFloat(t[e]),a=parseFloat(this._attrTarget[e]);isNaN(i)||isNaN(a)||(s[e]=i+(a-i)*p)}e.attr(s)}r&&d<1&&e.attr("d",r(p)),this._duringCb&&this._duringCb(p),d<1?m.requestAnimationFrame(l):(this._plotTarget&&e.attr("d",this._plotSnap||this._plotTarget),this._afterCb&&this._afterCb.call(e))};m.requestAnimationFrame(l)};t>0?setTimeout(i,t):i()}}function ht(t){t.prototype.animate=function(t,e){return new ct(this,t,e)}}function dt(t){return-Math.cos(t*Math.PI)/2+.5}function pt(t,e,s,i){t=Math.min(Math.max(t,0),1),s=Math.min(Math.max(s,0),1);const a=3*t,r=3*(s-t)-a,o=1-a-r,n=3*e,l=3*(i-e)-n,c=1-n-l,h=t=>((o*t+r)*t+a)*t;return t=>t<=0?0:t>=1?1:(t=>((c*t+l)*t+n)*t)((t=>{let e=0,s=1,i=t;if(i<e)return e;if(i>s)return s;for(;e<s;){const a=h(i);if(Math.abs(a-t)<1e-4)return i;t>a?e=i:s=i,i=(e+s)/2}return i})(t))}const gt=new Map;function ut(t){return"function"==typeof t?xt(t):(e=t,Array.isArray(e)&&4===e.length&&e.every(t=>"number"==typeof t)?pt(t[0],t[1],t[2],t[3]):"string"==typeof t&&gt.has(t)?xt(gt.get(t)):dt);var e}function xt(t){return e=>{const s=t(e);return"number"==typeof s&&isFinite(s)?s:e}}gt.set("linear",t=>t),gt.set("easeInOutSine",dt),gt.set("easeInSine",t=>1-Math.cos(t*Math.PI/2)),gt.set("easeOutSine",t=>Math.sin(t*Math.PI/2)),gt.set("easeInQuad",t=>t*t),gt.set("easeOutQuad",t=>1-(1-t)*(1-t)),gt.set("easeInOutQuad",t=>t<.5?2*t*t:1-Math.pow(-2*t+2,2)/2),gt.set("easeInCubic",t=>t*t*t),gt.set("easeOutCubic",t=>1-Math.pow(1-t,3)),gt.set("easeInOutCubic",t=>t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2),gt.set("easeOutBack",t=>{const e=1.70158;return 1+2.70158*Math.pow(t-1,3)+e*Math.pow(t-1,2)}),gt.set("easeInOutBack",t=>{const e=2.5949095;return t<.5?Math.pow(2*t,2)*(7.189819*t-e)/2:(Math.pow(2*t-2,2)*((e+1)*(2*t-2)+e)+2)/2});const ft="http://www.w3.org/2000/svg";function mt(t){return 1-Math.pow(1-t,3)}let bt=null;function yt(){if(!h.isBrowser())return!1;try{return bt||(bt=window.matchMedia("(prefers-reduced-motion: reduce)")),!!bt.matches}catch(t){return!1}}function wt(t,e,s){if(!h.isBrowser())return!1;if(s.globals.dataChanged||s.globals.resized)return!1;const i=s.config.chart.animations;if(!i||!1===i.enabled)return!1;const a=s.config.chart.type;if("line"!==a&&"area"!==a&&"rangeArea"!==a)return!1;if(!(s.layout.gridWidth>0))return!1;const r=2*(i.speed||800),o=Math.max(0,Math.min(1,e/s.layout.gridWidth)),n=(1-Math.cbrt(1-o))*r,l=t.node.style;l.opacity="0";let c=null;const d=t=>{null===c&&(c=t),t-c>=n?l.opacity="":m.requestAnimationFrame(d)};return m.requestAnimationFrame(d),!0}function vt(t){const e=t.config.chart.animations;var s;e&&(!1!==e.respectReducedMotion&&yt()&&(e.enabled=!1,e.dynamicAnimation&&(e.dynamicAnimation.enabled=!1)),s=ut(e.easing),ot="function"==typeof s?s:rt)}function At(t){const e=t.style,s=t.index||0,i="number"==typeof t.baseDelay?t.baseDelay:40,a=t.row||0,r=t.col||0,o=t.groupIndex||0,n=t.perGroup||1,l=t.centerDistance||0;switch(e){case"none":return 0;case"diagonal":return(a+r)*i;case"group":return o*i+s%n*(i/4);case"centroid":return l*i*(s+1);default:return s*i}}class St{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()})}animatePop(t,{speed:e,delay:s=0,onComplete:i}){const a=this.w;if(!h.isBrowser()||!a.globals.shouldAnimate||e<1)return void(i&&i());const r=t.node.style;r.transformBox="fill-box",r.transformOrigin="center",r.transform="scale(0)",r.opacity="0";const o=performance.now()+s,n=t=>{if(a.globals.isDestroyed)return;const s=Math.max(0,Math.min(1,(t-o)/e));r.transform=`scale(${function(t){const e=1.70158;return 1+2.70158*Math.pow(t-1,3)+e*Math.pow(t-1,2)}(s)})`,r.opacity=String(Math.min(1,2*s)),s<1?m.requestAnimationFrame(n):(r.transform="",r.transformOrigin="",r.transformBox="",r.opacity="",i&&i())};m.requestAnimationFrame(n)}animateRect(t,e,s,i,a,r=0){t.attr(e).animate(i,r).attr(s).after(()=>a())}animatePathsGradually(t){const{el:e,realIndex:s,j:i,fill:a,pathFrom:r,pathTo:o,pathToInterp:n,speed:l,delay:c,scrollMorph:h}=t,d=this.w;let p=0;d.config.chart.animations.animateGradually.enabled&&(p=d.config.chart.animations.animateGradually.delay),d.config.chart.animations.dynamicAnimation.enabled&&d.globals.dataChanged&&"bar"!==d.config.chart.type&&(p=0),this.morphSVG(e,s,i,"line"!==d.config.chart.type||d.globals.comboCharts?a:"stroke",r,o,l,c*p,h,n)}revealBulk(t){const e=this.w;t.node.classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:t.node}),h.isBrowser()&&e.globals.shouldAnimate?e.globals.bulkRevealScheduled||(e.globals.bulkRevealScheduled=!0,m.requestAnimationFrame(()=>{e.globals.isDestroyed||(e.globals.bulkRevealScheduled=!1,this.animationCompleted(t))})):this.animationCompleted(t)}showDelayedElements(){this.w.globals.delayedElements.forEach(t=>{if(t.holdUntilComplete&&!this.w.globals.animationEnded)return;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}))}animateDraw(t,{realIndex:e,j:s,isFill:i,isLast:a,speed:r,delay:o,mask:n}){const l=this.w,c=this,d=()=>{a&&l.globals.shouldAnimate&&c.animationCompleted(t),c.showDelayedElements()};if(!h.isBrowser()||!l.globals.shouldAnimate||r<1)return void d();const p=t.node,g=()=>{const t=n&&"radial"===n.type,a=l.layout.gridWidth+8,c=n&&n.cx||0,h=n&&n.cy||0,g=(n&&n.r||l.layout.gridWidth/2)+4,u=`apexDrawMask${l.globals.cuid}-${e}-${null!=s?s:0}-${i?"f":"s"}`,x=m.createElementNS(ft,"mask");let f;if(x.setAttribute("id",u),x.setAttribute("maskUnits","userSpaceOnUse"),t){const t=g;x.setAttribute("x",String(c-t)),x.setAttribute("y",String(h-t)),x.setAttribute("width",String(2*t)),x.setAttribute("height",String(2*t)),f=m.createElementNS(ft,"circle"),f.setAttribute("cx",String(c)),f.setAttribute("cy",String(h)),f.setAttribute("r","0"),f.setAttribute("fill","#fff")}else x.setAttribute("x",String(-4)),x.setAttribute("y",String(-4)),x.setAttribute("width",String(a)),x.setAttribute("height",String(l.layout.gridHeight+8)),f=m.createElementNS(ft,"rect"),f.setAttribute("x",String(-4)),f.setAttribute("y",String(-4)),f.setAttribute("width","0"),f.setAttribute("height",String(l.layout.gridHeight+8)),f.setAttribute("fill","#fff");x.appendChild(f),l.dom.elDefs.node.appendChild(x),p.setAttribute("mask",`url(#${u})`);const b=performance.now()+(o||0),y=e=>{if(l.globals.isDestroyed)return;const s=Math.max(0,Math.min(1,(e-b)/r)),i=mt(s);t?f.setAttribute("r",String(i*g)):f.setAttribute("width",String(i*a)),s<1?m.requestAnimationFrame(y):(p.removeAttribute("mask"),x.parentNode&&x.parentNode.removeChild(x),d())};m.requestAnimationFrame(y)};m.requestAnimationFrame(()=>{if(l.globals.isDestroyed)return;if(i)return void g();const t=p.getAttribute("stroke-dasharray");if(!!t&&"0"!==t&&""!==t)return void g();let e=0;try{"function"==typeof p.getTotalLength&&(e=p.getTotalLength())}catch(t){e=0}e?(t=>{p.setAttribute("stroke-dasharray",String(t)),p.setAttribute("stroke-dashoffset",String(t));const e=performance.now()+(o||0),s=i=>{if(l.globals.isDestroyed)return;const a=Math.max(0,Math.min(1,(i-e)/r));p.setAttribute("stroke-dashoffset",String(t*(1-mt(a)))),a<1?m.requestAnimationFrame(s):(p.removeAttribute("stroke-dasharray"),p.removeAttribute("stroke-dashoffset"),d())};m.requestAnimationFrame(s)})(e):d()})}morphSVG(t,e,s,i,a,r,o,n,l,c){var h,d;const p=this.w;a||(a=t.attr("pathFrom")),r||(r=t.attr("pathTo"));const g=()=>("radar"===p.config.chart.type&&(o=1),`M 0 ${p.layout.gridHeight}`);(!a||a.indexOf("undefined")>-1||a.indexOf("NaN")>-1)&&(a=g()),(!r.trim()||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=g(),c=void 0),c&&(!c.trim()||c.indexOf("undefined")>-1||c.indexOf("NaN")>-1)&&(c=void 0),p.globals.shouldAnimate||(o=1);const u=!0===(null==(d=null==(h=this.ctx)?void 0:h.morphTypeChange)?void 0:d.isActive())?"polygons":"commands";let x=null;if(p.globals.dataChanged){const t=p.config.chart.animations.dynamicAnimation.easing;null!=t?x=ut(t):l&&(x=ut("linear"))}const f=t.plot(a).animate(o,n);x&&f.ease(x),f.plot(c||r,u,c?r:void 0).after(()=>{if(w.isNumber(s)){const e=p.seriesData.series[p.globals.maxValsInArrayIndex];e&&s===e.length-2&&p.globals.shouldAnimate&&this.animationCompleted(t)}else"none"!==i&&p.globals.shouldAnimate&&(!p.globals.comboCharts&&e===p.seriesData.series.length-1||p.globals.comboCharts)&&this.animationCompleted(t);this.showDelayedElements()})}}const Ct=.15,kt=.35;class Dt{constructor(t){this.w=t}static isSliceChart(t){const e=t.config.chart.type;return"pie"===e||"donut"===e||"polarArea"===e}static hoverOutlineOwnsHoverState(t){var e;return Dt.isSliceChart(t)&&"none"!==t.config.states.hover.filter.type&&!0===(null==(e=t.config.plotOptions.pie.hoverOutline)?void 0:e.show)}static sliceOffsetOwnsActiveState(t){return Dt.isSliceChart(t)&&"polarArea"!==t.config.chart.type&&!0===t.config.plotOptions.pie.expandOnClick&&t.config.plotOptions.pie.expandOffset>0&&!Dt.drilldownBlocksSliceOffset(t)}static drilldownBlocksSliceOffset(t){var e;return Dt.isSliceChart(t)&&!0===(null==(e=t.config.drilldown)?void 0:e.enabled)}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,i){var a,r,o;const n=this.w;if(t.unfilter&&t.unfilter(!0),"none"===s)return void this.getDefaultFilter(t,e);const l=n.config.chart.dropShadow,c="lighten"===s?Ct:kt,h=Math.max(0,Math.min(1,"number"==typeof i?i:c)),d=1-h,p="lighten"===s?h:0;t.filterWith&&(t.filterWith(t=>{t.colorMatrix({type:"matrix",values:`\n            ${d} 0 0 0 ${p}\n            0 ${d} 0 0 ${p}\n            0 0 ${d} 0 ${p}\n            0 0 0 1 0\n          `,in:"SourceGraphic",result:"brightness"}),l.enabled&&this.addShadow(t,e,l,"brightness")}),l.noUserSpaceOnUse||null==(r=null==(a=t.filterer())?void 0:a.node)||r.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null==(o=t.filterer())?void 0:o.node))}addShadow(t,e,s,i){var a;const r=this.w;let{blur:o,top:n,left:l,color:c,opacity:h}=s;if(c=Array.isArray(c)?c[e]:c,(null==(a=r.config.chart.dropShadow.enabledOnSeries)?void 0:a.length)>0&&-1===r.config.chart.dropShadow.enabledOnSeries.indexOf(e))return t;t.offset({in:i,dx:l,dy:n,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:o,result:"blur"}),t.flood({"flood-color":c,"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,r,o,n;const l=this.w;return t.unfilter&&t.unfilter(!0),w.isMsEdge()&&"radialBar"===l.config.chart.type||(null==(i=l.config.chart.dropShadow.enabledOnSeries)?void 0:i.length)>0&&-1===(null==(a=l.config.chart.dropShadow.enabledOnSeries)?void 0:a.indexOf(s))||t.filterWith&&(t.filterWith(t=>{this.addShadow(t,s,e,"SourceGraphic")}),e.noUserSpaceOnUse||null==(o=null==(r=t.filterer())?void 0:r.node)||o.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null==(n=t.filterer())?void 0:n.node)),t}setSelectionFilter(t,e,s){const i=this.w;if(void 0!==i.interact.selectedDataPoints[e]&&i.interact.selectedDataPoints[e].indexOf(s)>-1){if(t.node.setAttribute("selected",!0),Dt.sliceOffsetOwnsActiveState(i))return;const s=i.config.states.active.filter;"none"!==s.type&&this.applyFilter(t,e,s.type,s.value)}}_scaleFilterSize(t){if(!t)return;(e=>{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.setAttribute(s,e[s])})({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}class Mt{constructor(t,e=null){this.w=t,this.ctx=e}roundPathCorners(t,e){function s(t,e,s){var a=e.x-t.x,r=e.y-t.y,o=Math.sqrt(a*a+r*r);return o?i(t,e,Math.min(1,s/o)):{x:t.x,y:t.y}}function i(t,e,s){return{x:t.x+(e.x-t.x)*s,y:t.y+(e.y-t.y)*s}}function a(t,e){t.length>2&&(t[t.length-2]=e.x,t[t.length-1]=e.y)}function r(t){return{x:parseFloat(t[t.length-2]),y:parseFloat(t[t.length-1])}}t.indexOf("NaN")>-1&&(t="");var o=t.split(/[,\s]/).reduce(function(t,e){var s=e.match(/^([a-zA-Z])(.+)/);return s?(t.push(s[1]),t.push(s[2])):t.push(e),t},[]).reduce(function(t,e){return parseFloat(e)==e&&t.length?t[t.length-1].push(e):t.push([e]),t},[]),n=[];if(o.length>1){var l=r(o[0]),c=null;"Z"==o[o.length-1][0]&&o[0].length>2&&(c=["L",l.x,l.y],o[o.length-1]=c),n.push(o[0]);for(var h=1;h<o.length;h++){var d=n[n.length-1],p=o[h],g=p==c?o[1]:o[h+1];if(g&&d&&d.length>2&&"L"==p[0]&&g.length>2&&"L"==g[0]){var u,x,f=r(d),m=r(p),b=r(g);u=s(m,f,e),x=s(m,b,e),a(p,u),p.origPoint=m,n.push(p);var y=i(u,m,.5),w=i(m,x,.5),v=["C",y.x,y.y,w.x,w.y,x.x,x.y];v.origPoint=m,n.push(v)}else n.push(p)}if(c){var A=r(n[n.length-1]);n.push(["Z"]),a(n[0],A)}}else n=o;return n.reduce(function(t,e){return t+e.join(" ")+" "},"")}drawLine(t,e,s,i,a="#a8a8a8",r=0,o=null,n="butt"){return this.w.dom.Paper.line().attr({x1:t,y1:e,x2:s,y2:i,stroke:a,"stroke-dasharray":r,"stroke-width":o,"stroke-linecap":n})}drawRect(t=0,e=0,s=0,i=0,a=0,r="#fefefe",o=1,n=null,l=null,c=0){const h=this.w.dom.Paper.rect();return h.attr({x:t,y:e,width:s>0?s:0,height:i>0?i:0,rx:a,ry:a,opacity:o,"stroke-width":null!==n?n:0,stroke:null!==l?l:"none","stroke-dasharray":c}),h.node.setAttribute("fill",r),h}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 s=this.w.dom.Paper.circle(2*t);return null!==e&&s.attr(e),s}drawPath({d:t="",stroke:e="#a8a8a8",strokeWidth:s=1,fill:i,fillOpacity:a=1,strokeOpacity:r=1,classes:o,strokeLinecap:n=null,strokeDashArray:l=0}){const c=this.w;null===n&&(n=c.config.stroke.lineCap),(t.indexOf("undefined")>-1||t.indexOf("NaN")>-1)&&(t=`M 0 ${c.layout.gridHeight}`);return c.dom.Paper.path(t).attr({fill:i,"fill-opacity":a,stroke:e,"stroke-opacity":r,"stroke-linecap":n,"stroke-width":s,"stroke-dasharray":l,class:o})}group(t=null){const e=this.w.dom.Paper.group();return null!==t&&e.attr(t),e}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,r){return["C",t,e,s,i,a,r].join(" ")}quadraticCurve(t,e,s,i){return["Q",t,e,s,i].join(" ")}arc(t,e,s,i,a,r,o,n=!1){let l="A";n&&(l="a");return[l,t,e,s,i,a,r,o].join(" ")}renderPaths({j:t,realIndex:e,pathFrom:s,pathTo:i,pathToInterp:a,stroke:r,strokeWidth:o,strokeLinecap:c,fill:h,animationDelay:d,initialSpeed:p,dataChangeSpeed:g,className:u,chartType:x,shouldClipToGrid:f=!0,bindEventsOnPaths:m=!0,drawShadow:b=!0,drawMask:y=null,scrollMorph:w=!1}){var v,A,S,C;const k=this.w,D=new Dt(this.w),M=new St(this.w,null!=(v=this.ctx)?v:void 0),T=this.w.config.chart.animations.enabled,_=T&&this.w.config.chart.animations.dynamicAnimation.enabled;if(s&&s.startsWith("M 0 0 ")&&i){const t=i.match(/^M\s+[\d.-]+\s+[\d.-]+/);t&&(s=s.replace(/^M\s+0\s+0/,t[0]))}let L;const F=!0===(null==(S=null==(A=this.ctx)?void 0:A.morphTypeChange)?void 0:S.isActive()),E=!!(T&&!k.globals.resized||_&&k.globals.dataChanged&&k.globals.shouldAnimate||F&&T&&k.globals.shouldAnimate),P="string"==typeof u&&(u.indexOf("apexcharts-line")>-1||u.indexOf("apexcharts-area")>-1||u.indexOf("apexcharts-rangeArea")>-1||u.indexOf("apexcharts-radar")>-1),B=!(!T||k.globals.resized||k.globals.dataChanged||!P),N=null!=(C=k.config.chart.animations.largeDatasetThreshold)?C:0,R=!!(E&&!B&&N>0&&k.globals.dataPoints>N),I=!(!("candlestick"===x||"boxPlot"===x)||!E||B||!k.globals.dataChanged||F),X=R||I;!E||B||X?(L=i,E||(k.globals.animationEnded=!0)):L=s;const z=k.config.stroke.dashArray;let O=0;O=Array.isArray(z)?z[e]:k.config.stroke.dashArray;const Y=this.drawPath({d:L,stroke:r,strokeWidth:o,fill:h,fillOpacity:1,classes:u,strokeLinecap:c,strokeDashArray:O});Y.attr("index",e),f&&("bar"===x&&!k.globals.isBarHorizontal||k.globals.comboCharts?Y.attr({"clip-path":`url(#gridRectBarMask${k.globals.cuid})`}):Y.attr({"clip-path":`url(#gridRectMask${k.globals.cuid})`})),k.config.chart.dropShadow.enabled&&b&&D.dropShadow(Y,k.config.chart.dropShadow,e),m&&(Y.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,Y)),Y.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,Y)),Y.node.addEventListener("mousedown",this.pathMouseDown.bind(this,Y))),Y.attr({pathTo:i,pathFrom:s});const H={el:Y,j:t,realIndex:e,pathFrom:s,pathTo:i,pathToInterp:a,fill:h,strokeWidth:o,delay:d,scrollMorph:w};if(!T||k.globals.resized||k.globals.dataChanged)!k.globals.resized&&k.globals.dataChanged||X||M.showDelayedElements();else if(B){const s=2*p,i="none"===r||0===o,a=k.seriesData.series.length,n=!!k.globals.comboCharts||e===a-1;M.animateDraw(Y,{realIndex:e,j:t,isFill:i,isLast:n,speed:s,delay:0,mask:y})}else X||M.animatePathsGradually(l(n({},H),{speed:p}));return E&&!X&&(k.globals.dataChanged&&_||F)&&M.animatePathsGradually(l(n({},H),{speed:g})),X&&M.revealBulk(Y),Y}drawPattern(t,e,s,i="#a8a8a8",a=0){return this.w.dom.Paper.pattern(e,s,r=>{"horizontalLines"===t?r.line(0,0,s,0).stroke({color:i,width:a+1}):"verticalLines"===t?r.line(0,0,0,e).stroke({color:i,width:a+1}):"slantedLines"===t?r.line(0,0,e,s).stroke({color:i,width:a}):"squares"===t?r.rect(e,s).fill("none").stroke({color:i,width:a}):"circles"===t&&r.circle(e).fill("none").stroke({color:i,width:a})})}drawGradient(t,e,s,i,a,r=null,o=null,n=[],l=0,c=!1){const h=this.w;let d;e.length<9&&0===e.indexOf("#")&&(e=w.hexToRgba(e,i)),s.length<9&&0===s.indexOf("#")&&(s=w.hexToRgba(s,a));let p=0,g=1,u=1,x=null;null!==o&&(p=void 0!==o[0]?o[0]/100:0,g=void 0!==o[1]?o[1]/100:1,u=void 0!==o[2]?o[2]/100:1,x=void 0!==o[3]?o[3]/100:null);const f=!("donut"!==h.config.chart.type&&"pie"!==h.config.chart.type&&"polarArea"!==h.config.chart.type&&"bubble"!==h.config.chart.type);if(d=n&&0!==n.length?h.dom.Paper.gradient(f?"radial":"linear",t=>{(Array.isArray(n[l])?n[l]:Array.isArray(n[0])?n[0]||[]:n).forEach(e=>{t.stop(e.offset/100,e.color,e.opacity)})}):h.dom.Paper.gradient(f?"radial":"linear",t=>{t.stop(p,e,i),t.stop(g,s,a),t.stop(u,s,a),null!==x&&t.stop(x,e,i)}),f){const t=h.layout.gridWidth/2,e=h.layout.gridHeight/2;"bubble"!==h.config.chart.type?d.attr({gradientUnits:"userSpaceOnUse",cx:t,cy:e,r:r}):d.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?c?(d.attr({gradientUnits:"userSpaceOnUse"}),d.from(0,0).to(0,h.layout.gridHeight)):d.from(0,0).to(0,1):"diagonal"===t?d.from(0,0).to(1,1):"horizontal"===t?d.from(0,1).to(1,1):"diagonal2"===t&&d.from(1,0).to(0,1);return d}getTextBasedOnMaxWidth({text:t,maxWidth:e,fontSize:s,fontFamily:i}){const a=this.getTextRects(t,s,i,""),r=a.width/t.length,o=Math.floor(e/r);return e<a.width?t.slice(0,o-3)+"...":t}drawText({x:t,y:e,text:s,textAnchor:i,fontSize:a,fontFamily:r,fontWeight:o,foreColor:l,opacity:c,maxWidth:h,cssClass:d="",isPlainText:p=!0,dominantBaseline:g="auto"}){const u=this.w;void 0===s&&(s="");let x=s;i||(i="start"),l&&l.length||(l=u.config.chart.foreColor),r=r||u.config.chart.fontFamily,o=o||"regular";const f={maxWidth:h,fontSize:a=a||"11px",fontFamily:r};let m;return Array.isArray(s)?m=u.dom.Paper.text(t=>{for(let e=0;e<s.length;e++)x=s[e],h&&(x=this.getTextBasedOnMaxWidth(n({text:s[e]},f))),0===e?t.tspan(x):t.tspan(x).newLine()}):(h&&(x=this.getTextBasedOnMaxWidth(n({text:s},f))),m=p?u.dom.Paper.plain(s):u.dom.Paper.text(t=>t.tspan(x))),m.attr({x:t,y:e,"text-anchor":i,"dominant-baseline":g,"font-size":a,"font-family":r,"font-weight":o,fill:l,class:"apexcharts-text "+d}),m.node.style.fontFamily=r,m.node.style.opacity=c,m}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 r=5;i*=1.15,"sparkle"===s&&(i/=1.1,r=4);const o=Math.PI/r;for(let s=0;s<=2*r;s++){const r=s*o,n=s%2==0?i:i/2;a+=(0===s?"M":"L")+(t+n*Math.sin(r))+","+(e-n*Math.cos(r))}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 r=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 r.attr({cx:t,cy:e,shape:a.shape,class:a.class?a.class:""}),r}drawMarker(t,e,s){t=t||0;let i=s.pSize||0;return w.isNumber(e)||(i=0,e=0),this.drawMarkerShape(t,e,null==s?void 0:s.shape,i,n(n({},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,r=new Dt(this.w),o=parseInt(null!=(s=t.node.getAttribute("index"))?s:"",10),n=parseInt(null!=(i=t.node.getAttribute("j"))?i:"",10);if(!(isNaN(o)||isNaN(n)||("function"==typeof a.config.chart.events.dataPointMouseEnter&&a.config.chart.events.dataPointMouseEnter(e,this.ctx,{seriesIndex:o,dataPointIndex:n,w:a}),Mt._fireEvent(a,"dataPointMouseEnter",[e,this.ctx,{seriesIndex:o,dataPointIndex:n,w:a}]),"none"!==a.config.states.active.filter.type&&"true"===t.node.getAttribute("selected")||Dt.hoverOutlineOwnsHoverState(a)||"none"===a.config.states.hover.filter.type||a.interact.isTouchDevice))){const e=a.config.states.hover.filter;r.applyFilter(t,o,e.type,e.value)}}pathMouseLeave(t,e){var s,i;const a=this.w,r=new Dt(this.w),o=parseInt(null!=(s=t.node.getAttribute("index"))?s:"",10),n=parseInt(null!=(i=t.node.getAttribute("j"))?i:"",10);isNaN(o)||isNaN(n)||("function"==typeof a.config.chart.events.dataPointMouseLeave&&a.config.chart.events.dataPointMouseLeave(e,this.ctx,{seriesIndex:o,dataPointIndex:n,w:a}),Mt._fireEvent(a,"dataPointMouseLeave",[e,this.ctx,{seriesIndex:o,dataPointIndex:n,w:a}]),"none"!==a.config.states.active.filter.type&&"true"===t.node.getAttribute("selected")||Dt.hoverOutlineOwnsHoverState(a)||"none"!==a.config.states.hover.filter.type&&r.getDefaultFilter(t,o))}_clearAllDataPointSelections(t,e){const s=this.w;s.interact.selectedDataPoints=[];const i=s.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),a=s.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),r=s=>{Array.prototype.forEach.call(s,s=>{s.node.setAttribute("selected","false"),t.getDefaultFilter(s,e)})};r(i),r(a)}_togglePointSelection(t,e,s,i){const a=this.w;if("true"===t.node.getAttribute("selected")){t.node.setAttribute("selected","false");const e=a.interact.selectedDataPoints[s].indexOf(i);return e>-1&&a.interact.selectedDataPoints[s].splice(e,1),"false"}return!a.config.states.active.allowMultipleDataPointsSelection&&a.interact.selectedDataPoints.length>0&&this._clearAllDataPointSelections(e,s),t.node.setAttribute("selected","true"),void 0===a.interact.selectedDataPoints[s]&&(a.interact.selectedDataPoints[s]=[]),a.interact.selectedDataPoints[s].push(i),"true"}_applyPointSelectionFilter(t,e,s,i){const a=this.w;if(!Dt.sliceOffsetOwnsActiveState(a))if("true"===i){const i=a.config.states.active.filter;if("none"!==i)e.applyFilter(t,s,i.type,i.value);else if("none"!==a.config.states.hover.filter&&!a.interact.isTouchDevice){const i=a.config.states.hover.filter;e.applyFilter(t,s,i.type,i.value)}}else if("none"!==a.config.states.active.filter.type)if("none"===a.config.states.hover.filter.type||a.interact.isTouchDevice)e.getDefaultFilter(t,s);else{const i=a.config.states.hover.filter;e.applyFilter(t,s,i.type,i.value)}}pathMouseDown(t,e){var s,i;const a=this.w,r=new Dt(this.w),o=parseInt(null!=(s=t.node.getAttribute("index"))?s:"",10),n=parseInt(null!=(i=t.node.getAttribute("j"))?i:"",10);if(isNaN(o)||isNaN(n))return;const l=a.config.chart.link;if(!!(!l||"function"!=typeof l.dimension&&!l.enabled)){const e=this._togglePointSelection(t,r,o,n);this._applyPointSelectionFilter(t,r,o,e)}"function"==typeof a.config.chart.events.dataPointSelection&&a.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:a.interact.selectedDataPoints,seriesIndex:o,dataPointIndex:n,w:a}),e&&Mt._fireEvent(a,"dataPointSelection",[e,this.ctx,{selectedDataPoints:a.interact.selectedDataPoints,seriesIndex:o,dataPointIndex:n,w:a}])}rotateAroundCenter(t){let e={};t&&"function"==typeof t.getBBox&&(e=t.getBBox());return{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=Mt._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=>{if(!s)return;(i.relatedTarget?Mt._findDelegateTarget(i.relatedTarget,t.node,e):null)!==s&&(s&&s.instance&&this.pathMouseLeave(s.instance,i),s=null)}),t.node.addEventListener("mousedown",s=>{const i=Mt._findDelegateTarget(s.target,t.node,e);i&&i.instance&&this.pathMouseDown(i.instance,s)})}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 t=0;t<a.length;t++)a[t].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,r){const o=this.w,n=[t,e,s,i,a,r].join("\0"),l=o.globals.textRectsCache;if(l&&l.has(n))return l.get(n);const c=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:s,fontWeight:r,foreColor:"#fff",opacity:0});i&&c.attr("transform",i),o.dom.Paper.add(c);let h=c.bbox();const d=h.y;a||(h=c.node.getBoundingClientRect()),c.remove();const p={width:h.width,height:h.height,centerOffset:a?d+h.height/2- -200:0};return l&&l.set(n,p),p}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="."}}}class Tt{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),r=i>a?i:a,o=t.image;let n=0,l=0;void 0===t.width&&void 0===t.height?void 0!==s.fill.image.width&&void 0!==s.fill.image.height?(n=s.fill.image.width+1,l=s.fill.image.height):(n=r+1,l=r):(n=t.width,l=t.height);const c=m.createElementNS(W,"pattern");Mt.setAttrs(c,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:n+"px",height:l+"px"});const d=m.createElementNS(W,"image");c.appendChild(d);const p=h.isBrowser()?window.SVG:global.SVG;d.setAttributeNS(p.xlink,"href",o),Mt.setAttrs(d,{x:0,y:0,preserveAspectRatio:"none",width:n+"px",height:l+"px"}),d.style.opacity=t.opacity,e.dom.elDefs.node.appendChild(c)}getSeriesIndex(t){const e=this.w,s=e.config.chart.type;return("bar"===s||"rangeBar"===s)&&e.config.plotOptions.bar.distributed||"heatmap"===s||"treemap"===s?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.seriesData.series.length,this.seriesIndex}getSeriesAxisRange(t){var e,s,i;const a=this.w,r=null!=(s=null==(e=a.globals.seriesYAxisReverseMap)?void 0:e[t])?s:0;return{minY:w.isNumber(a.globals.minYArr[t])?a.globals.minYArr[t]:a.globals.minY,maxY:w.isNumber(a.globals.maxYArr[t])?a.globals.maxYArr[t]:a.globals.maxY,reversed:!!(null==(i=a.config.yaxis[r])?void 0:i.reversed)}}computeColorStops(t,e){const s=this.w,{threshold:i,colorAboveThreshold:a,colorBelowThreshold:r}=e,{minY:o,maxY:n}=t,l=n-o;let c=0===l?i>n?0:100:(n-i)/l*100;t.reversed&&(c=100-c),c=Math.max(0,Math.min(c,100));const h=Array.isArray(s.config.fill.opacity)?s.config.fill.opacity[this.seriesIndex]:s.config.fill.opacity,d={offset:c,color:a,opacity:h},p={offset:c,color:r,opacity:h};return t.reversed?[p,d]:[d,p]}fillPath(t){var e,s,i,a;const r=this.w;this.opts=t;const o=this.w.config;let n,l,c;this.seriesIndex=this.getSeriesIndex(t);const h=o.plotOptions.line.colors.colorAboveThreshold&&o.plotOptions.line.colors.colorBelowThreshold;let d=this.getFillColors()[this.seriesIndex];void 0!==r.seriesData.seriesColors[this.seriesIndex]&&(d=r.seriesData.seriesColors[this.seriesIndex]),"function"==typeof d&&(d=d({seriesIndex:this.seriesIndex,dataPointIndex:t.dataPointIndex,value:t.value,w:r}));const p=t.fillType?t.fillType:this.getFillType(this.seriesIndex);let g=Array.isArray(o.fill.opacity)?o.fill.opacity[this.seriesIndex]:o.fill.opacity;const u="gradient"===p||h;t.color&&(d=t.color);const x=r.config.series[this.seriesIndex];(null==(s=null==(e=null==x?void 0:x.data)?void 0:e[t.dataPointIndex])?void 0:s.fillColor)&&(d=null==(a=null==(i=null==x?void 0:x.data)?void 0:i[t.dataPointIndex])?void 0:a.fillColor),d||(d="#fff"),void 0!==t.opacity&&null!==t.opacity&&(g=t.opacity);let f=d;w.isCSSVariable(d)?f=w.applyOpacityToColor(d,g):-1===d.indexOf("rgb")?-1===d.indexOf("#")?f=d:d.length<9&&(f=w.hexToRgba(d,g)):d.indexOf("rgba")>-1?g=w.getOpacityFromRGBA(d):f=w.hexToRgba(w.rgb2hex(d),g);const m=w.isCSSVariable(d)?w.getThemeColor(d):d;if("pattern"===p&&(l=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:l,fillColor:m,defaultColor:f})),u){const e=o.fill.gradient.colorStops?[...o.fill.gradient.colorStops]:[];let s=o.fill.gradient.type;h&&(e[this.seriesIndex]=this.computeColorStops(this.getSeriesAxisRange(this.seriesIndex),o.plotOptions.line.colors),s="vertical"),c=this.handleGradientFill({type:s,fillConfig:t.fillConfig,fillColor:m,fillOpacity:g,colorStops:e,i:this.seriesIndex,verticalUserSpace:h})}if("image"===p){const e=o.fill.image.src,s=t.patternID?t.patternID:"",i=`pattern${r.globals.cuid}${t.seriesNumber+1}${s}`;-1===this.patternIDs.indexOf(i)&&(this.clippedImgArea({opacity:g,image:Array.isArray(e)?t.seriesNumber<e.length?e[t.seriesNumber]:e[0]:e,width:t.width?t.width:void 0,height:t.height?t.height:void 0,patternUnits:t.patternUnits,patternID:i}),this.patternIDs.push(i)),n=`url(#${i})`}else n=u?c:"pattern"===p?l:f;return t.solid&&(n=f),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),void 0!==s.fillColors&&(i=[],Array.isArray(s.fillColors)?i=s.fillColors.slice():i.push(s.fillColors)),i}handlePatternFill({fillConfig:t,patternFill:e,fillColor:s,defaultColor:i}){let a=this.w.config.fill;t&&(a=t);const r=this.opts,o=new Mt(this.w),n=Array.isArray(a.pattern.strokeWidth)?a.pattern.strokeWidth[this.seriesIndex]:a.pattern.strokeWidth,l=s;if(Array.isArray(a.pattern.style))if(void 0!==a.pattern.style[r.seriesNumber]){e=o.drawPattern(a.pattern.style[r.seriesNumber],a.pattern.width,a.pattern.height,l,n)}else e=i;else e=o.drawPattern(a.pattern.style,a.pattern.width,a.pattern.height,l,n);return e}handleGradientFill({type:t,fillColor:e,fillOpacity:s,fillConfig:i,colorStops:a,i:r,verticalUserSpace:o=!1}){let l=this.w.config.fill;i&&(l=n(n({},l),i));const c=this.opts,h=new Mt(this.w),d=new w;t=t||l.gradient.type;let p,g=e,u=void 0===l.gradient.opacityFrom?s:Array.isArray(l.gradient.opacityFrom)?l.gradient.opacityFrom[r]:l.gradient.opacityFrom;g.indexOf("rgba")>-1&&(u=w.getOpacityFromRGBA(g));let x=void 0===l.gradient.opacityTo?s:Array.isArray(l.gradient.opacityTo)?l.gradient.opacityTo[r]:l.gradient.opacityTo;if(void 0===l.gradient.gradientToColors||0===l.gradient.gradientToColors.length)p="dark"===l.gradient.shade?d.shadeColor(-1*parseFloat(l.gradient.shadeIntensity),e.indexOf("rgb")>-1?w.rgb2hex(e):e):d.shadeColor(parseFloat(l.gradient.shadeIntensity),e.indexOf("rgb")>-1?w.rgb2hex(e):e);else if(l.gradient.gradientToColors[c.seriesNumber]){const t=l.gradient.gradientToColors[c.seriesNumber];p=t,t.indexOf("rgba")>-1&&(x=w.getOpacityFromRGBA(t))}else p=e;if(l.gradient.gradientFrom&&(g=l.gradient.gradientFrom),l.gradient.gradientTo&&(p=l.gradient.gradientTo),l.gradient.inverseColors){const t=g;g=p,p=t}return g.indexOf("rgb")>-1&&(g=w.rgb2hex(g)),p.indexOf("rgb")>-1&&(p=w.rgb2hex(p)),h.drawGradient(t,g,p,u,x,c.size,l.gradient.stops,a,r,o)}}const _t=["none","lighten","darken"];function Lt(t,e){const s=t&&t.renderer;return s&&s.kind&&"svg"!==s.kind?s:e}function Ft(t){var e,s;const i=t.config.fill&&t.config.fill.type,a=t=>"pattern"===t||"image"===t||"gradient"===t;if(Array.isArray(i)?i.some(a):a(i))return!0;const r=null==(s=null==(e=t.config.plotOptions)?void 0:e.line)?void 0:s.colors;if(r&&r.colorAboveThreshold&&r.colorBelowThreshold)return!0;const o=t.config.states||{},n=o.hover&&o.hover.filter&&o.hover.filter.type,l=o.active&&o.active.filter&&o.active.filter.type;return!(!n||_t.includes(n))||!(!l||_t.includes(l))}class Et{constructor(t,e){this.w=t,this.ctx=e,this._filters=new Dt(this.w),this._graphics=new Mt(this.w,this.ctx),this._seriesWrap=null,this._seriesWrapIndex=-1,this._batch=null}resetSeriesWrapCache(){this._seriesWrap=null,this._seriesWrapIndex=-1,this._batch=null}static markersAreInert(t){const e=t.config.chart.type;return!("line"!==e&&"area"!==e||t.globals.comboCharts||t.config.tooltip.intersect)}_shouldBatch(){var t,e,s,i,a;const r=this.w,o=r.config.markers,n=null!=(t=o.largeDatasetThreshold)?t:0;if(n<=0)return!1;if("canvas"===(null==(s=null==(e=this.ctx)?void 0:e.renderer)?void 0:s.kind))return!1;if(!Et.markersAreInert(r))return!1;if(o.discrete&&o.discrete.length)return!1;if(o.onClick||o.onDblClick)return!1;if(null==(i=r.config.chart.events)?void 0:i.dataPointSelection)return!1;const l=r.seriesData.series;if(!Array.isArray(l)||!l.length)return!1;let c=!1;for(let t=0;t<l.length;t++){if(!Array.isArray(l[t]))return!1;let e=!1,s=!1;const i=null==(a=r.config.series[t])?void 0:a.data;for(let a=0;a<l[t].length;a++){null===l[t][a]&&(e=!0);const r=Array.isArray(i)?i[a]:null;if(r&&(r.fillColor||r.strokeColor)){s=!0;break}}if(s)return!1;(r.globals.markers.size[t]>0||e&&o.showNullDataPoints)&&(l[t].length>n&&(c=!0))}return c}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++)void 0===t.globals.markers.size[e]&&t.globals.markers.size.push(t.globals.markers.size[0])}else t.globals.markers.size=t.config.series.map(()=>t.config.markers.size);t.globals.markers.batched=this._shouldBatch()}plotChartMarkers({pointsPos:t,seriesIndex:e,j:s,pSize:i,alwaysDrawMarker:a=!1,isVirtualPoint:r=!1}){const o=this.w,n=e,l=t;let c=null;const h=new Mt(this.w),d=Lt(this.ctx,h),p=o.config.markers.discrete&&o.config.markers.discrete.length;if(Array.isArray(l.x))for(let t=0;t<l.x.length;t++){let g,u=s,x=!w.isNumber(l.y[t]);0===o.globals.markers.largestSize&&o.globals.hasNullValues&&null!==o.seriesData.series[n][s+1]&&!r&&(x=!0),1===s&&0===t&&(u=0),1===s&&1===t&&(u=1);let f="apexcharts-marker";Et.markersAreInert(o)&&(f+=" no-pointer-events");const m=Array.isArray(o.config.markers.size)?o.globals.markers.size[e]>0:o.config.markers.size>0;if(o.globals.markers.batched&&(m||a)&&!p&&!r)this._batchPoint(e,u,l.x[t],l.y[t],{invalid:x,graphics:h,pSize:a?i:void 0,trackPoint:!a});else if(m||a||p){"canvas"===d.kind&&(void 0===o.globals.pointsArray[e]&&(o.globals.pointsArray[e]=[]),o.globals.pointsArray[e][u]=[l.x[t],l.y[t]]),x||(f+=` w${w.randomId()}`);const s=this.getMarkerConfig({cssClass:f,seriesIndex:e,dataPointIndex:u}),r=o.config.series[n];if(r.data[u]&&(r.data[u].fillColor&&(s.pointFillColor=r.data[u].fillColor),r.data[u].strokeColor&&(s.pointStrokeColor=r.data[u].strokeColor)),void 0!==i&&(s.pSize=i),(l.x[t]<-o.globals.markers.largestSize||l.x[t]>o.layout.gridWidth+o.globals.markers.largestSize||l.y[t]<-o.globals.markers.largestSize||l.y[t]>o.layout.gridHeight+o.globals.markers.largestSize)&&(s.pSize=0),!x){if((o.globals.markers.size[e]>0||a||p)&&!c){const t=!a&&!p;t&&this._seriesWrap&&this._seriesWrapIndex===e?c=this._seriesWrap:(c=d.group({class:t?"apexcharts-series-markers":""}),c.attr("clip-path",`url(#gridRectMarkerMask${o.globals.cuid})`),this.setupMarkerDelegation(c),t&&(this._seriesWrap=c,this._seriesWrapIndex=e))}g=d.drawMarker(l.x[t],l.y[t],s),g.attr("rel",u),g.attr("j",u),g.attr("index",e),g.node.setAttribute("default-marker-size",s.pSize),wt(g,l.x[t],o),this._filters.setSelectionFilter(g,e,u),c&&c.add(g)}}else void 0===o.globals.pointsArray[e]&&(o.globals.pointsArray[e]=[]),o.globals.pointsArray[e].push([l.x[t],l.y[t]])}return c}_batchPoint(t,e,s,i,{invalid:a,graphics:r,pSize:o,trackPoint:n}){const l=this.w;if(n&&(void 0===l.globals.pointsArray[t]&&(l.globals.pointsArray[t]=[]),l.globals.pointsArray[t][e]=[s,i]),a)return;this._batch&&this._batch.seriesIndex===t||(this._batch={seriesIndex:t,opts:this.getMarkerConfig({cssClass:"",seriesIndex:t}),sizes:new Map});const c=void 0===o?this._batch.opts.pSize:o;if(!(c>0))return;const h=l.globals.markers.largestSize;if(s<-h||s>l.layout.gridWidth+h||i<-h||i>l.layout.gridHeight+h)return;let d=this._batch.sizes.get(c);d||(d=[],this._batch.sizes.set(c,d)),d.push(r.getMarkerPath(s,i,this._batch.opts.shape,c))}flushBatch(t,e){const s=this._batch;if(this._batch=null,!s||s.seriesIndex!==e||!s.sizes.size)return[];const i=this.w,a=new Mt(this.w),r=s.opts,o="line"===r.shape||"plus"===r.shape||"cross"===r.shape,n=o?r.pointFillColor:r.pointStrokeColor,l=o?r.pointFillOpacity:r.pointStrokeOpacity,c=[];return s.sizes.forEach((s,o)=>{if(!s.length)return;const h=a.drawPath({d:s.join(" "),fill:r.pointFillColor,fillOpacity:r.pointFillOpacity,stroke:n,strokeOpacity:l,strokeWidth:r.pointStrokeWidth,strokeDashArray:r.pointStrokeDashArray});h.attr({class:"apexcharts-marker-batch"+(Et.markersAreInert(i)?" no-pointer-events":""),"clip-path":`url(#gridRectMarkerMask${i.globals.cuid})`,shape:r.shape,index:e,"default-marker-size":o}),t.add(h),c.push(h)}),c}getMarkerConfig({cssClass:t,seriesIndex:e,dataPointIndex:s=null,radius:i=null,size:a=null,strokeWidth:r=null}){const o=this.w,n=this.getMarkerStyle(e);let l=null===a?o.globals.markers.size[e]:a;const c=o.config.markers;return null!==s&&c.discrete.length&&c.discrete.map(t=>{t.seriesIndex===e&&t.dataPointIndex===s&&(void 0!==t.strokeColor&&(n.pointStrokeColor=t.strokeColor),void 0!==t.fillColor&&(n.pointFillColor=t.fillColor),void 0!==t.size&&(l=t.size),void 0!==t.shape&&(n.pointShape=t.shape))}),{pSize:null===i?l:i,pRadius:null!==i?i:c.radius,pointStrokeWidth:null!==r?r:Array.isArray(c.strokeWidth)?c.strokeWidth[e]:c.strokeWidth,pointStrokeColor:n.pointStrokeColor,pointFillColor:n.pointFillColor,shape:n.pointShape||(Array.isArray(c.shape)?c.shape[e]:c.shape),class:t,pointStrokeOpacity:Array.isArray(c.strokeOpacity)?c.strokeOpacity[e]:c.strokeOpacity,pointStrokeDashArray:Array.isArray(c.strokeDashArray)?c.strokeDashArray[e]:c.strokeDashArray,pointFillOpacity:Array.isArray(c.fillOpacity)?c.fillOpacity[e]:c.fillOpacity,seriesIndex:e}}setupMarkerDelegation(t){const e=this.w,s=".apexcharts-marker";this._graphics.setupEventDelegation(t,s),t.node.addEventListener("click",i=>{if(e.config.markers.onClick){Mt._findDelegateTarget(i.target,t.node,s)&&e.config.markers.onClick(i)}}),t.node.addEventListener("dblclick",i=>{if(e.config.markers.onDblClick){Mt._findDelegateTarget(i.target,t.node,s)&&e.config.markers.onDblClick(i)}}),t.node.addEventListener("touchstart",e=>{const i=Mt._findDelegateTarget(e.target,t.node,s);i&&i.instance&&this._graphics.pathMouseDown(i.instance,e)},{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 Pt{constructor(t,e){this.ctx=e,this.w=t,this.initialAnim=this.w.config.chart.animations.enabled,this.anim=new St(this.w),this.filters=new Dt(this.w),this.fill=new Tt(this.w),this.markers=new Et(this.w,this.ctx),this.graphics=new Mt(this.w),this._elPointsWrap=null,this._elPointsWrapParent=null,this._perSeries=null}draw(t,e,s){const i=this.w,a=this.graphics,r=Lt(this.ctx,a),o=s.realIndex,n=s.pointsPos,l=s.zRatio,c=s.elParent;let h=this._elPointsWrap;if(h&&this._elPointsWrapParent===c||(h=r.group({class:`apexcharts-series-markers apexcharts-series-${i.config.chart.type}`}),h.attr("clip-path",`url(#gridRectMarkerMask${i.globals.cuid})`),this.markers.setupMarkerDelegation(h),c.add(h),this._elPointsWrap=h,this._elPointsWrapParent=c,this._perSeries=this._buildPerSeriesCache(o,r)),Array.isArray(n.x))for(let t=0;t<n.x.length;t++){let s=e+1,a=!0;0===e&&0===t&&(s=0),0===e&&1===t&&(s=1);let c=i.globals.markers.size[o];if(l!==1/0){const t=i.config.plotOptions.bubble;c=i.seriesData.seriesZ[o][s],t.zScaling&&(c/=l),t.minBubbleRadius&&c<t.minBubbleRadius&&(c=t.minBubbleRadius),t.maxBubbleRadius&&c>t.maxBubbleRadius&&(c=t.maxBubbleRadius)}const d=n.x[t],p=n.y[t];if(c=c||0,null!==p&&void 0!==i.seriesData.series[o][s]||(a=!1),a){const t=this.drawPoint(d,p,c,o,s,e);h.add(t),"canvas"===r.kind&&(void 0===i.globals.pointsArray[o]&&(i.globals.pointsArray[o]=[]),i.globals.pointsArray[o][s]=[d,p])}}}_buildPerSeriesCache(t,e){var s;const i=this.w;return{realIndex:t,emit:e,isBubble:"bubble"===i.config.chart.type||i.globals.comboCharts&&i.config.series[t]&&"bubble"===i.config.series[t].type,canCacheConfig:!i.config.markers.discrete.length,markerConfig:null,fillCacheable:void 0,fillCircle:void 0,dropShadowEnabled:i.config.chart.dropShadow.enabled,doInitialAnim:this.initialAnim&&!i.globals.dataChanged&&!i.globals.resized,jitter:null==(s=i.config.plotOptions.scatter)?void 0:s.jitter,anim:null}}drawPoint(t,e,s,i,a,r){var o;const n=this.w,l=i,c=this.anim,h=this.filters,d=this.fill,p=this.markers;let g=this._perSeries;g&&g.realIndex===i||(g=this._perSeries=this._buildPerSeriesCache(i,Lt(this.ctx,this.graphics)));const u=g.emit;let x;g.canCacheConfig?(g.markerConfig||(g.markerConfig=p.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:a,radius:g.isBubble?s:null})),x=g.markerConfig,g.isBubble&&(x.pSize=s,x.pRadius=s)):x=p.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:a,radius:g.isBubble?s:null});const f=n.config.series[l].data[a];let m;void 0!==g.fillCircle?m=g.fillCircle:(m=d.fillPath({seriesNumber:i,dataPointIndex:a,color:x.pointFillColor,patternUnits:"objectBoundingBox",value:n.seriesData.series[i][r]}),void 0===g.fillCacheable&&(g.fillCacheable=g.canCacheConfig&&"solid"===d.getFillType(i)&&"string"==typeof x.pointFillColor&&!!x.pointFillColor),g.fillCacheable&&!(null==f?void 0:f.fillColor)&&(g.fillCircle=m));const b=u.drawMarker(t,e,x);(null==f?void 0:f.fillColor)&&(m=f.fillColor);const y=g.jitter;if((null==y?void 0:y.enabled)&&y.distributed&&n.globals.colors.length){const t=Math.round(null==(o=n.seriesData.seriesX[i])?void 0:o[a]);isNaN(t)||(m=n.globals.colors[t%n.globals.colors.length])}if(b.attr({fill:m}),g.dropShadowEnabled){const t=n.config.chart.dropShadow;h.dropShadow(b,t,i)}if(g.doInitialAnim){if(!g.anim){const t=n.config.chart.animations,e=n.globals.dataPoints||1,s=t.animateGradually,i=s&&!1!==s.enabled;g.anim={popSpeed:t.speed,baseDelay:i?Math.min(20,.5*t.speed/Math.max(1,e)):0}}const t=At({style:g.anim.baseDelay>0?"sequential":"none",index:a,baseDelay:g.anim.baseDelay});c.animatePop(b,{speed:g.anim.popSpeed,delay:t,onComplete:()=>c.animationCompleted(b)})}else n.globals.animationEnded=!0;return b.attr({rel:a,j:a,index:i,"default-marker-size":x.pSize}),h.setSelectionFilter(b,i,a),b}centerTextInBubble(t){const e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize,10)/4}}}const Bt=(t,e,s,i)=>{if("function"!=typeof t)return t;const a=t({series:e.seriesData.series,seriesIndex:s,dataPointIndex:i,w:e});return Number.isFinite(a)?a:0};class Nt{constructor(t,e=null){this.w=t,this.ctx=e}dataLabelsCorrection(t,e,s,i,a,r,o){const n=this.w;let l=!1;const c=new Mt(this.w).getTextRects(s,o),h=c.width,d=c.height;e<0&&(e=0),e>n.layout.gridHeight+d&&(e=n.layout.gridHeight+d/2),void 0===n.globals.dataLabelsRects[i]&&(n.globals.dataLabelsRects[i]=[]),n.globals.dataLabelsRects[i].push({x:t,y:e,width:h,height:d});const p=n.globals.dataLabelsRects[i].length-2,g=void 0!==n.globals.lastDrawnDataLabelsIndexes[i]?n.globals.lastDrawnDataLabelsIndexes[i][n.globals.lastDrawnDataLabelsIndexes[i].length-1]:0;if(void 0!==n.globals.dataLabelsRects[i][p]){const s=n.globals.dataLabelsRects[i][g];(t>s.x+s.width||e>s.y+s.height||e+d<s.y||t+h<s.x)&&(l=!0)}return(0===a||r)&&(l=!0),{x:t,y:e,textRects:c,drawnextLabel:l}}drawDataLabel({type:t,pos:e,i:s,j:i,isRangeStart:a,strokeWidth:r=2}){const o=this.w,n=new Mt(this.w),l=o.config.dataLabels;let c=0,h=0,d=i,p=null;if(-1!==o.globals.collapsedSeriesIndices.indexOf(s)||!l.enabled||!Array.isArray(e.x))return p;p=n.group({class:"apexcharts-data-labels"});for(let n=0;n<e.x.length;n++)if(1===i&&0===n&&(d=0),1===i&&1===n&&(d=1),c=e.x[n]+Bt(l.offsetX,o,s,d),h=e.y[n]+Bt(l.offsetY,o,s,d)+r,!isNaN(c)){let i=o.seriesData.series[s][d];"rangeArea"===t&&(i=a?o.rangeData.seriesRangeStart[s][d]:o.rangeData.seriesRangeEnd[s][d]);let r="";const l=t=>o.config.dataLabels.formatter(t,{seriesIndex:s,dataPointIndex:d,w:o});if("bubble"===o.config.chart.type){i=o.seriesData.seriesZ[s][d],r=l(i),h=e.y[n];h=new Pt(this.w,this.ctx).centerTextInBubble(h).y}else void 0!==i&&(r=l(i));let g=o.config.dataLabels.textAnchor;o.globals.isSlopeChart&&(g=0===d?"end":d===o.config.series[s].data.length-1?"start":"middle"),this.plotDataLabelsText({x:c,y:h,text:r,i:s,j:d,parent:p,offsetCorrection:!0,dataLabelsConfig:o.config.dataLabels,textAnchor:g})}return p}plotDataLabelsText(t){const e=this.w,s=new Mt(this.w);let{x:i,y:a,i:r,j:o,text:n,textAnchor:l,fontSize:c,parent:h,dataLabelsConfig:d,color:p,alwaysDrawDataLabel:g,offsetCorrection:u,className:x,seriesIndex:f=r,dataPointIndex:m=o}=t,b=null;if(Array.isArray(e.config.dataLabels.enabledOnSeries)&&e.config.dataLabels.enabledOnSeries.indexOf(r)<0)return b;let y={x:i,y:a,drawnextLabel:!0,textRects:null};if(u&&(y=this.dataLabelsCorrection(i,a,n,r,o,g,parseInt(d.style.fontSize,10).toString())),e.interact.zoomed||(i=y.x,a=y.y),y.textRects){const t=e.globals.barPadForNumericAxis||0;(i<-(t+20)-y.textRects.width||i>e.layout.gridWidth+y.textRects.width+t+30)&&(n="")}let w=e.globals.dataLabels.style.colors[r];(("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[o]),"function"==typeof w&&(w=w({series:e.seriesData.series,seriesIndex:r,dataPointIndex:o,w:e})),p&&(w=p);const v="bar"===e.config.chart.type||"rangeBar"===e.config.chart.type,A=v?0:Bt(d.offsetX,e,f,m);let S=A;const C=v?0:Bt(d.offsetY,e,f,m);if(e.globals.isSlopeChart&&(0!==o&&(S=-2*A+5),0!==o&&o!==e.config.series[r].data.length-1&&(S=0)),y.drawnextLabel){if("middle"===l&&i===e.layout.gridWidth&&(l="end"),b=s.drawText({x:i+S,y:a+C,foreColor:w,textAnchor:l||d.textAnchor,text:n,fontSize:c||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"}),b.attr({class:x||"apexcharts-datalabel",cx:i,cy:a}),d.dropShadow.enabled){const t=d.dropShadow;new Dt(this.w).dropShadow(b,t)}h.add(b),wt(b,i,e),void 0===e.globals.lastDrawnDataLabelsIndexes[r]&&(e.globals.lastDrawnDataLabelsIndexes[r]=[]),e.globals.lastDrawnDataLabelsIndexes[r].push(o)}return b}addBackgroundToDataLabel(t,e){const s=this.w,i=s.config.dataLabels.background,a=i.padding,r=i.padding/2,o=e.width,n=e.height,l=new Mt(this.w).drawRect(e.x-a,e.y-r/2,o+2*a,n+r,i.borderRadius,"transparent"!==s.config.chart.background&&s.config.chart.background?s.config.chart.background:"#fff",i.opacity,i.borderWidth,i.borderColor);if(i.dropShadow.enabled){new Dt(this.w).dropShadow(l,i.dropShadow)}return 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],r=a.getBBox();let o=null;if(r.width&&r.height&&(o=this.addBackgroundToDataLabel(a,r)),o){null==(t=a.parentNode)||t.insertBefore(o.node,a);const s=e.config.dataLabels.background.backgroundColor||a.getAttribute("fill");e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged?o.animate().attr({fill:s}):o.attr({fill:s}),a.setAttribute("fill",e.config.dataLabels.background.foreColor);const i=a.getAttribute("cx");null!==i&&wt(o,parseFloat(i),e)}}}bringForward(){const t=this.w,e=t.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),s=t.dom.baseEl.querySelector(".apexcharts-plot-series:last-child");for(let t=0;t<e.length;t++)s&&s.insertBefore(e[t],s.nextSibling)}}class Rt{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],r=Date.now();if(a&&a.lastUpdate&&r-a.lastUpdate<i)return a.value;const o=s();return t.globals.dimensionCache[e]={value:o,lastUpdate:r},o}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 It{constructor(t,{theme:e=null,timeScale:s=null}={}){this.w=t,this.theme=e,this.timeScale=s}getLabel(t,e,s,i,a=[],r="12px",o=!0){const n=this.w,l=void 0===t[i]?"":t[i];let c=l;const h=n.formatters.xLabelFormatter,d=n.config.xaxis.labels.formatter,p=new A(this.w),g=l;o&&(c=p.xLabelFormat(h,l,g,{i:i,dateFormatter:new v(this.w).formatDate,w:n}),void 0!==d&&(c=d(l,t[i],{i:i,dateFormatter:new v(this.w).formatDate,w:n}))),e.length>0?(s=e[i].position,c=e[i].value):"datetime"===n.config.xaxis.type&&void 0===d&&(c=""),void 0===c&&(c=""),c=Array.isArray(c)?c:c.toString();const u=new Mt(this.w);let x={};x=n.layout.rotateXLabels&&o?u.getTextRects(c,parseInt(r,10).toString(),null,`rotate(${n.config.xaxis.labels.rotate} 0 0)`,!1):u.getTextRects(c,parseInt(r,10).toString());const f=!n.config.xaxis.labels.showDuplicates&&this.timeScale;return!Array.isArray(c)&&("NaN"===String(c)||a.indexOf(c)>=0&&f)&&(c=""),{x:s,text:c,textRect:x}}checkLabelBasedOnTickamount(t,e,s){const i=this.w;let a=i.config.xaxis.tickAmount;if("dataPoints"===a&&(a=Math.round(i.layout.gridWidth/120)),a>s)return e;return t%Math.round(s/(a+1))===0||(e.text=""),e}checkForOverflowingLabels(t,e,s,i,a){const r=this.w;if(0===t&&r.globals.skipFirstTimelinelabel&&(e.text=""),t===s-1&&r.globals.skipLastTimelinelabel&&(e.text=""),r.config.xaxis.labels.hideOverlappingLabels&&i.length>0){const t=a[a.length-1];if(r.config.xaxis.labels.trim&&"datetime"!==r.config.xaxis.type)return e;e.x<t.textRect.width/(r.layout.rotateXLabels?Math.max(Math.abs(r.config.xaxis.labels.rotate),1)/12:1.01)+t.x&&(e.text="")}return e}checkForReversedLabels(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(t=>-1===e.collapsedSeriesIndices.indexOf(t))}translateYAxisIndex(t){const e=this.w,s=e.globals,i=e.config.yaxis;return e.seriesData.series.length>i.length||i.some(t=>Array.isArray(t.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 s=e.globals.seriesYAxisMap[t],i=new H(this.w);return s.every(t=>i.isSeriesNull(t))}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,r,o){const n=this.w,l=new Mt(this.w);let c=n.layout.translateY+n.config.yaxis[a].labels.offsetY;if(n.globals.isBarHorizontal?c=0:"heatmap"===n.config.chart.type&&(c+=r/2),i.show&&e>0){!0===n.config.yaxis[a].opposite&&(t+=i.width);for(let a=e;a>=0;a--){const e=l.drawLine(t+s.offsetX-i.width+i.offsetX,c+i.offsetY,t+s.offsetX+i.offsetX,c+i.offsetY,i.color);o.add(e),c+=r}}}}class Xt{constructor(t,e,s){this.w=t,this.ctx=e,this.elgrid=s,this.axesUtils=new It(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=[],"top"===t.config.xaxis.position?this.offY=0:this.offY=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()),String(this.xaxisBorderWidth).indexOf("%")>-1?this.xaxisBorderWidth=t.layout.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=t.config.xaxis.axisBorder.height,this.yaxis=t.config.yaxis[0]}drawXaxis(){const t=this.w,e=new Mt(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 t=0;t<this.xaxisLabels.length;t++)a.push(this.xaxisLabels[t]);if(this.drawXAxisLabelAndGroup(!0,e,i,a,t.axisFlags.isXNumeric,(t,e)=>e),t.labelData.hasXaxisGroups){const s=t.labelData.groups;a=[];for(let t=0;t<s.length;t++)a.push(s[t].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,(t,e)=>s[t].cols*e,r)}if(void 0!==t.config.xaxis.title.text){const i=e.group({class:"apexcharts-xaxis-title"}),a=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});i.add(a),s.add(i)}if(t.config.xaxis.axisBorder.show){const i=t.globals.barPadForNumericAxis,a=e.drawLine(t.globals.padHorizontal+t.config.xaxis.axisBorder.offsetX-i,this.offY,this.xaxisBorderWidth+i,this.offY,t.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(a):s.add(a)}return s}drawXAxisLabelAndGroup(t,e,s,i,a,r,o={}){var n,l;const c=[],h=[],d=this.w,p=o.xaxisFontSize||this.xaxisFontSize,g=o.xaxisFontFamily||this.xaxisFontFamily,u=o.xaxisForeColors||this.xaxisForeColors,x=o.fontWeight||d.config.xaxis.labels.style.fontWeight,f=o.cssClass||d.config.xaxis.labels.style.cssClass;let b,y=d.globals.padHorizontal;const w=i.length;let v="category"===d.config.xaxis.type?d.globals.dataPoints:w;if(0===v&&w>v&&(v=w),a){const t=Math.max(Number(d.config.xaxis.tickAmount)||1,v>1?v-1:v);b=d.layout.gridWidth/Math.min(t,w-1),y=y+r(0,b)/2+d.config.xaxis.labels.offsetX}else b=d.layout.gridWidth/v,y=y+r(0,b)+d.config.xaxis.labels.offsetX;for(let a=0;a<=w-1;a++){let o=y-r(a,b)/2+d.config.xaxis.labels.offsetX;0===a&&1===w&&b/2===y&&1===v&&(o=d.layout.gridWidth/2);let A=this.axesUtils.getLabel(i,d.labelData.timescaleLabels,o,a,c,p,t),S=28;d.layout.rotateXLabels&&t&&(S=22),d.config.xaxis.title.text&&"top"===d.config.xaxis.position&&(S+=parseFloat(d.config.xaxis.title.style.fontSize)+2),t||(S=S+parseFloat(p)+(d.layout.xAxisLabelsHeight-d.layout.xAxisGroupLabelsHeight)+(d.layout.rotateXLabels?10:0));A=void 0!==d.config.xaxis.tickAmount&&"dataPoints"!==d.config.xaxis.tickAmount&&"datetime"!==d.config.xaxis.type?this.axesUtils.checkLabelBasedOnTickamount(a,A,w):this.axesUtils.checkForOverflowingLabels(a,A,w,c,h);const C=()=>t&&d.config.xaxis.convertedCatToNumeric?u[d.globals.minX+a-1]:u[a],k=(null!=(l=null==(n=A.textRect)?void 0:n.width)?l:0)/2,D=A.x+k<0;if(d.config.xaxis.labels.show&&!D){const i=e.drawText({x:A.x,y:this.offY+d.config.xaxis.labels.offsetY+S-("top"===d.config.xaxis.position?d.layout.xAxisHeight+d.config.xaxis.axisTicks.height-2:0),text:A.text,textAnchor:"middle",fontWeight:x,fontSize:p,fontFamily:g,foreColor:Array.isArray(u)?C():u,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+f});if(s.add(i),i.on("click",t=>{if("function"==typeof d.config.chart.events.xAxisLabelClick){const e=Object.assign({},d,{labelIndex:a});d.config.chart.events.xAxisLabelClick(t,this.ctx,e)}}),t){const t=m.createElementNS(W,"title");t.textContent=Array.isArray(A.text)?A.text.join(" "):A.text,i.node.appendChild(t),""!==A.text&&(c.push(A.text),h.push(A))}}a<w-1&&(y+=r(a+1,b))}}drawXaxisInversed(t){const e=this.w,s=new Mt(this.w),i=e.config.yaxis[0].opposite?e.globals.translateYAxisX[t]:0,a=s.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:t}),r=s.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+i+", 0)"});a.add(r);const o=[];if(e.config.yaxis[t].show)for(let t=0;t<this.xaxisLabels.length;t++)o.push(this.xaxisLabels[t]);const n=e.layout.gridHeight/o.length;let l=-n/2.2;const c=e.formatters.yLabelFormatters[0],h=e.config.yaxis[0].labels;if(h.show)for(let i=0;i<=o.length-1;i++){let a=void 0===o[i]?"":o[i];a=c(a,{seriesIndex:t,dataPointIndex:i,w:e});const d=this.axesUtils.getYAxisForeColor(h.style.colors,t),p=()=>Array.isArray(d)?d[i]:d;let g=0;Array.isArray(a)&&(g=a.length/2*parseInt(h.style.fontSize,10));let u=h.offsetX-15,x="end";this.yaxis.opposite&&(x="start"),"left"===e.config.yaxis[0].labels.align?(u=h.offsetX,x="start"):"center"===e.config.yaxis[0].labels.align?(u=h.offsetX,x="middle"):"right"===e.config.yaxis[0].labels.align&&(x="end");const f=s.drawText({x:u,y:l+n+h.offsetY-g,text:a,textAnchor:x,foreColor:p(),fontSize:h.style.fontSize,fontFamily:h.style.fontFamily,fontWeight:h.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+h.style.cssClass,maxWidth:h.maxWidth});r.add(f),f.on("click",t=>{if("function"==typeof e.config.chart.events.xAxisLabelClick){const s=Object.assign({},e,{labelIndex:i});e.config.chart.events.xAxisLabelClick(t,this.ctx,s)}});const b=m.createElementNS(W,"title");if(b.textContent=Array.isArray(a)?a.join(" "):a,f.node.appendChild(b),0!==e.config.yaxis[t].labels.rotate){const i=s.rotateAroundCenter(f.node);f.node.setAttribute("transform",`rotate(${e.config.yaxis[t].labels.rotate} 0 ${i.y})`)}l+=n}if(void 0!==e.config.yaxis[0].title.text){const t=s.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+i+", 0)"}),r=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});t.add(r),a.add(t)}let d=0;this.isCategoryBarHorizontal&&e.config.yaxis[0].opposite&&(d=e.layout.gridWidth);const p=e.config.xaxis.axisBorder;if(p.show){const t=s.drawLine(e.globals.padHorizontal+p.offsetX+d,1+p.offsetY,e.globals.padHorizontal+p.offsetX+d,e.layout.gridHeight+p.offsetY,p.color,0);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(t):a.add(t)}return e.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(d,o.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 r=this.offY+i.config.xaxis.axisTicks.offsetY;if(e=e+r+i.config.xaxis.axisTicks.height,"top"===i.config.xaxis.position&&(e=r-i.config.xaxis.axisTicks.height),i.config.xaxis.axisTicks.show){const o=new Mt(this.w).drawLine(t+i.config.xaxis.axisTicks.offsetX,r+i.config.xaxis.offsetY,a+i.config.xaxis.axisTicks.offsetX,e+i.config.xaxis.offsetY,i.config.xaxis.axisTicks.color);s.add(o),o.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 t=0;t<s;t++)i=this.xaxisLabels[t].position,e.push(i);else{const a=s;for(let s=0;s<a;s++){let s=a;t.axisFlags.isXNumeric&&"bar"!==t.config.chart.type&&(s-=1),i+=t.layout.gridWidth/s,e.push(i)}}return e}xAxisLabelCorrections(){var t,e,s;const i=this.w,a=new Mt(this.w),r=i.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),o=i.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)"),n=i.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),l=i.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(i.layout.rotateXLabels||i.config.xaxis.labels.rotateAlways)for(let t=0;t<o.length;t++){const e=a.rotateAroundCenter(o[t]);e.y=e.y-1,e.x=e.x+1,o[t].setAttribute("transform",`rotate(${i.config.xaxis.labels.rotate} ${e.x} ${e.y})`),o[t].setAttribute("text-anchor","end"),null==r||r.setAttribute("transform","translate(0, -10)");const s=o[t].childNodes;i.config.xaxis.labels.trim&&Array.prototype.forEach.call(s,t=>{a.placeTextWithEllipsis(t,t.textContent,i.layout.xAxisLabelsHeight-("bottom"===i.config.legend.position?20:10))})}else{const t=i.layout.gridWidth/(i.labelData.labels.length+1);for(let e=0;e<o.length;e++){const s=o[e].childNodes;i.config.xaxis.labels.trim&&"datetime"!==i.config.xaxis.type&&Array.prototype.forEach.call(s,e=>{a.placeTextWithEllipsis(e,e.textContent,t)})}}if(n.length>0){const r=n[n.length-1].getBBox(),o=n[0].getBBox();r.x<-20&&(null==(t=n[n.length-1].parentNode)||t.removeChild(n[n.length-1])),o.x+o.width>i.layout.gridWidth&&!i.globals.isBarHorizontal&&(null==(e=n[0].parentNode)||e.removeChild(n[0]));for(let t=0;t<l.length;t++)a.placeTextWithEllipsis(l[t],null!=(s=l[t].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 zt{constructor(t,e){this.w=t,this.ctx=e,this.xaxisLabels=t.labelData.labels.slice(),this.axesUtils=new It(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 Mt(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 t=this.renderGrid();return this.drawGridArea(t.el),t}return null}createGridMask(){const t=this.w,e=t.globals,s=new Mt(this.w),i=Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width,a=t=>{const e=m.createElementNS(W,"clipPath");return e.setAttribute("id",t),e};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,o=0;(["bar","rangeBar","candlestick","boxPlot","violin"].includes(t.config.chart.type)||t.globals.comboBarCount>0)&&t.axisFlags.isXNumeric&&!t.globals.isBarHorizontal&&(r=Math.max(t.layout.gridPad.left,e.barPadForNumericAxis),o=Math.max(t.layout.gridPad.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+o+r+4,t.layout.gridHeight+i+4,0,"#fff");const n=t.globals.markers.largestSize;t.dom.elGridRectMarker=s.drawRect(Math.min(-i/2-r-2,-n),-n,t.layout.gridWidth+Math.max(i+o+r+4,2*n),t.layout.gridHeight+2*n,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:r,parent:o}){const n=this.w;if(!(0===t&&n.globals.skipFirstTimelinelabel||t===r-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:r,parent:o});let l=0;if(n.labelData.hasXaxisGroups&&"between"===n.config.xaxis.tickPlacement){const e=n.labelData.groups;if(e){let s=0;for(let i=0;s<t&&i<e.length;i++)s+=e[i].cols;s===t&&(l=.6*n.layout.xAxisLabelsHeight)}}new Xt(this.w,this.ctx).drawXaxisTicks(e,l,n.dom.elGraphical)}}_drawGridLine({i:t,x1:e,y1:s,x2:i,y2:a,xCount:r,parent:o}){const n=this.w,l=o.node.classList.contains("apexcharts-gridlines-horizontal"),c=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===r-1),d=new Mt(this.w).drawLine(e-(l?c:0),s,i+(l?c:0),a,n.config.grid.borderColor,n.config.grid.strokeDashArray);d.node.classList.add("apexcharts-gridline"),h&&n.config.grid.show?this.elGridBorders.add(d):o.add(d)}_drawGridBandRect({c:t,x1:e,y1:s,x2:i,y2:a,type:r}){const o=this.w,n=new Mt(this.w),l=o.globals.barPadForNumericAxis,c=o.config.grid[r].colors[t],h=n.drawRect(e-("row"===r?l:0),s,i+("row"===r?2*l:0),a,0,c,o.config.grid[r].opacity);this.elg.add(h),h.attr("clip-path",`url(#gridRectMask${o.globals.cuid})`),h.node.classList.add(`apexcharts-grid-${r}`)}_drawXYLines({xCount:t,tickAmount:e}){var s;const i=this.w,a=({xC:e,x1:s,y1:a,x2:r,y2:o})=>{for(let n=0;n<e;n++)s=this.xaxisLabels[n].position,r=this.xaxisLabels[n].position,s<0||s-2>i.layout.gridWidth||this._drawGridLines({i:n,x1:s,y1:a,x2:r,y2:o,xCount:t,parent:this.elgridLinesV})},r=({xC:e,x1:s,y1:a,x2:r,y2:o})=>{for(let n=0;n<e+(i.axisFlags.isXNumeric?0:1);n++)0===n&&1===e&&1===i.globals.dataPoints&&(r=s=i.layout.gridWidth/2),this._drawGridLines({i:n,x1:s,y1:a,x2:r,y2:o,xCount:t,parent:this.elgridLinesV}),r=s+=i.layout.gridWidth/(i.axisFlags.isXNumeric?e-1:e)};if(i.config.grid.xaxis.lines.show||i.config.xaxis.axisTicks.show){const e=i.globals.padHorizontal,o=0;let n;const l=i.layout.gridHeight;i.labelData.timescaleLabels.length?a({xC:t,x1:e,y1:o,x2:n,y2:l}):(i.axisFlags.isXNumeric&&(t=null==(s=i.globals.xAxisScale)?void 0:s.result.length),r({xC:t,x1:e,y1:o,x2:n,y2:l}))}if(i.config.grid.yaxis.lines.show){const t=0;let s=0,a=0;const r=i.layout.gridWidth;let o=e+1;this.isRangeBar&&(o=i.labelData.labels.length);for(let n=0;n<o+(this.isRangeBar?1:0);n++)this._drawGridLine({i:n,xCount:o+(this.isRangeBar?1:0),x1:t,y1:s,x2:r,y2:a,parent:this.elgridLinesH}),s+=i.layout.gridHeight/(this.isRangeBar?o:e),a=s}}_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 r=e.layout.gridHeight;for(let o=0;o<t+1;o++){e.config.grid.xaxis.lines.show&&this._drawGridLine({i:o,xCount:t+1,x1:s,y1:i,x2:a,y2:r,parent:this.elgridLinesV});new Xt(this.w,this.ctx).drawXaxisTicks(s,0,e.dom.elGraphical),s+=e.layout.gridWidth/t,a=s}}if(e.config.grid.yaxis.lines.show){const t=0;let s=0,i=0;const a=e.layout.gridWidth;for(let r=0;r<e.globals.dataPoints+1;r++)this._drawGridLine({i:r,xCount:e.globals.dataPoints+1,x1:t,y1:s,x2:a,y2:i,parent:this.elgridLinesH}),s+=e.layout.gridHeight/e.globals.dataPoints,i=s}}renderGrid(){var t,e,s;const i=this.w,a=i.globals,r=new Mt(this.w);this.elg=r.group({class:"apexcharts-grid"}),this.elgridLinesH=r.group({class:"apexcharts-gridlines-horizontal"}),this.elgridLinesV=r.group({class:"apexcharts-gridlines-vertical"}),this.elGridBorders=r.group({class:"apexcharts-grid-borders"}),this.elg.add(this.elgridLinesH),this.elg.add(this.elgridLinesV),i.config.grid.show||(this.elgridLinesV.hide(),this.elgridLinesH.hide(),this.elGridBorders.hide());let o=0;for(;o<a.seriesYAxisMap.length&&a.ignoreYAxisIndexes.includes(o);)o++;o===a.seriesYAxisMap.length&&(o=0);let n,l=a.yAxisScale[o].result.length-1;return!a.isBarHorizontal||this.isRangeBar?(n=this.xaxisLabels.length,this.isRangeBar&&(l=i.labelData.labels.length,i.config.xaxis.tickAmount&&i.config.xaxis.labels.formatter&&(n=i.config.xaxis.tickAmount),(null==(s=null==(e=null==(t=a.yAxisScale)?void 0:t[o])?void 0:e.result)?void 0:s.length)>0&&"datetime"!==i.config.xaxis.type&&(n=a.yAxisScale[o].result.length-1)),this._drawXYLines({xCount:n,tickAmount:l})):(n=l,l=a.xTickAmount,this._drawInvertedXYLines({xCount:n,tickAmount:l})),this.drawGridBands(n,l),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:i.layout.gridWidth/n}}drawGridBands(t,e){var s,i,a,r,o;const n=this.w,l=(t,s,i,a,r,o)=>{for(let l=0,c=0;l<s;l++,c++)c>=n.config.grid[t].colors.length&&(c=0),this._drawGridBandRect({c:c,x1:i,y1:a,x2:r,y2:o,type:t}),a+=n.layout.gridHeight/e};if((null==(s=n.config.grid.row.colors)?void 0:s.length)>0&&l("row",e,0,0,n.layout.gridWidth,n.layout.gridHeight/e),(null==(i=n.config.grid.column.colors)?void 0:i.length)>0){let e=n.globals.isBarHorizontal||"on"!==n.config.xaxis.tickPlacement||"category"!==n.config.xaxis.type&&!n.config.xaxis.convertedCatToNumeric?t:t-1;n.axisFlags.isXNumeric&&(e=(null!=(r=null==(a=n.globals.xAxisScale)?void 0:a.result.length)?r:1)-1);let s=n.globals.padHorizontal;const i=0;let l=n.globals.padHorizontal+n.layout.gridWidth/e;const c=n.layout.gridHeight;for(let a=0,r=0;a<t;a++,r++)r>=n.config.grid.column.colors.length&&(r=0),"datetime"===n.config.xaxis.type&&(s=this.xaxisLabels[a].position,l=((null==(o=this.xaxisLabels[a+1])?void 0:o.position)||n.layout.gridWidth)-this.xaxisLabels[a].position),this._drawGridBandRect({c:r,x1:s,y1:i,x2:l,y2:c,type:"column"}),s+=n.layout.gridWidth/e}}}class Ot{constructor(t){this.w=t,this.coreUtils=new H(this.w)}niceScale(t,e,s=0){const i=1e-11,a=this.w,r=a.globals;let o,n,l,c;r.isBarHorizontal?(o=a.config.xaxis,n=Math.max((r.svgWidth-100)/25,2)):(o=a.config.yaxis[s],n=Math.max((r.svgHeight-100)/15,2)),w.isNumber(n)||(n=10),l=void 0!==o.min&&null!==o.min,c=void 0!==o.max&&null!==o.max;let h=void 0!==o.stepSize&&null!==o.stepSize,d=void 0!==o.tickAmount&&null!==o.tickAmount,p=d?o.tickAmount:z[Math.min(Math.round(n/2),z.length-1)];if(r.isMultipleYAxis&&!d&&r.multiAxisTickAmount>0&&(p=r.multiAxisTickAmount,d=!0),p="dataPoints"===p?r.dataPoints-1:Math.abs(Math.round(p)),(t===Number.MIN_VALUE&&0===e||!w.isNumber(t)&&!w.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=w.isNumber(o.min)?o.min:0,e=w.isNumber(o.max)?o.max:t+p,r.allSeriesCollapsed=!1),t>e){const s=e;e=t,t=s}else t===e&&(t=0===t?0:t-1,e=0===e?2:e+1);const g=[];p<1&&(p=1);let u=p,x=Math.abs(e-t);!l&&t>0&&t/x<.15&&(t=0,l=!0),!c&&e<0&&-e/x<.15&&(e=0,c=!0),x=Math.abs(e-t);let f=x/u,m=f;const b=Math.floor(Math.log10(m)),y=Math.pow(10,b);let v=Math.ceil(m/y);if(v=X[0===r.yValueDecimal?0:1][v],m=v*y,f=m,r.isBarHorizontal&&o.stepSize&&"datetime"!==o.type?(f=o.stepSize,h=!0):h&&(f=o.stepSize),h&&o.forceNiceScale){const t=Math.floor(Math.log10(f));f*=Math.pow(10,b-t)}if(l&&c){let t=x/u;if(d)if(h)if(0!=w.mod(x,f)){const e=w.getGCD(f,t);f=t/e<10?e:t}else 0==w.mod(f,t)?f=t:(t=f,d=!1);else f=t;else if(h)0==w.mod(x,f)?t=f:f=t;else if(0==w.mod(x,f))t=f;else{u=Math.ceil(x/f),t=x/u;const e=w.getGCD(x,f);x/e<n&&(t=e),f=t}u=Math.round(x/f)}else{if(l||c){if(c)if(d)t=e-f*u;else{const s=t;t=f*Math.floor(t/f),Math.abs(e-t)/w.getGCD(x,f)>n&&(t=e-f*p,t+=f*Math.floor((s-t)/f))}else if(l)if(d)e=t+f*u;else{const s=e;e=f*Math.ceil(e/f),Math.abs(e-t)/w.getGCD(x,f)>n&&(e=t+f*p,e+=f*Math.ceil((s-e)/f))}}else if(r.isMultipleYAxis&&d){const s=f*Math.floor(t/f);let i=s+f*u;i<e&&(f*=2),i=e,e=(t=s)+f*u,x=Math.abs(e-t),t>0&&t<Math.abs(i-e)&&(t=0,e=f*u),e<0&&-e<Math.abs(s-t)&&(e=0,t=-f*u)}else t=f*Math.floor(t/f),e=f*Math.ceil(e/f);x=Math.abs(e-t),f=w.getGCD(x,f),u=Math.round(x/f)}if(d||l||c||(u=Math.ceil((x-i)/(f+i)),u>16&&w.getPrimeFactors(u).length<2&&u++),!d&&o.forceNiceScale&&0===r.yValueDecimal&&u>x&&(u=x,f=Math.round(x/u)),u>n&&(!d&&!h||o.forceNiceScale)){const t=w.getPrimeFactors(u),e=t.length-1;let s=u;t:for(var A=0;A<e;A++)for(var S=0;S<=e-A;S++){const i=Math.min(S+A,e);let a=s,r=1;for(var C=S;C<=i;C++)r*=t[C];if(a/=r,a<n){s=a;break t}}f=s===u?x:x/s,u=Math.round(x/f)}r.isMultipleYAxis&&0==r.multiAxisTickAmount&&r.ignoreYAxisIndexes.indexOf(s)<0&&(r.multiAxisTickAmount=u);let k=t-f;const D=f*i;do{k+=f,g.push(w.stripNumber(k,7))}while(e-k>D);return{result:g,niceMin:g[0],niceMax:g[g.length-1]}}linearScale(t,e,s=10,i=0,a=void 0){const r=Math.abs(e-t);let o=[];if(t===e)return o=[t],{result:o,niceMin:o[0],niceMax:o[o.length-1]};"dataPoints"===(s=this._adjustTicksForSmallRange(s,i,r))&&(s=this.w.globals.dataPoints-1);const n=s;a||(a=r/n);if(0!==a&&isFinite(a)){const t=Math.floor(Math.log10(Math.abs(a))),e=Math.max(2,2-t),s=Math.pow(10,e);a=Math.round((a+Number.EPSILON)*s)/s}let l=s===Number.MAX_VALUE?5:n;s===Number.MAX_VALUE&&(a=1);let c=t;for(;l>=0;)o.push(c),c=w.preciseAddition(c,a),l-=1;return{result:o,niceMin:o[0],niceMax:o[o.length-1]}}_resolveLogTickAmount(t){let e=t.tickAmount;return"dataPoints"===e&&(e=this.w.globals.dataPoints-1),w.isNumber(e)&&e>=1?Number(e):null}_thinToTickAmount(t,e){if(null===e||!w.isNumber(e)||e<1)return t;const s=e+1;if(t.length<=s)return t;const i=t.length-1;let a=null;for(let t=1;t<=i;t++){if(i%t!==0)continue;const e=i/t+1;e>s||(null===a||e>a.count)&&(a={stride:t,count:e})}if(!a)return[t[0],t[t.length-1]];const r=[];for(let e=0;e<t.length;e+=a.stride)r.push(t[e]);return r}logarithmicScaleNice(t,e,s,i=null){e<=0&&(e=Math.max(t,s)),t<=0&&(t=Math.min(e,s));const a=[],r=Math.ceil(Math.log(e)/Math.log(s)+1);for(let e=Math.floor(Math.log(t)/Math.log(s));e<r;e++)a.push(Math.pow(s,e));const o=this._thinToTickAmount(a,i);return{result:o,niceMin:o[0],niceMax:o[o.length-1]}}_logDomainSpan(t,e,s){return s||(s=10),s<=1?0:(e<=0&&(e=Math.max(t,s)),t<=0&&(t=Math.min(e,s)),t<=0||e<=0?0:Math.abs(Math.log(e)/Math.log(s)-Math.log(t)/Math.log(s)))}logarithmicScale(t,e,s,i=null){e<=0&&(e=Math.max(t,s)),t<=0&&(t=Math.min(e,s));const a=[],r=Math.log(e)/Math.log(s),o=Math.log(t)/Math.log(s),n=r-o,l=null!==i?i:Math.max(1,Math.round(n)),c=n/l;for(let t=0,e=o;t<l;t++,e+=c)a.push(Math.pow(s,e));return a.push(Math.pow(s,r)),{result:a,niceMin:t,niceMax:e}}_adjustTicksForSmallRange(t,e,s){let i=t;if(void 0!==e&&this.w.config.yaxis[e].labels.formatter&&void 0===this.w.config.yaxis[e].tickAmount){const t=Number(this.w.config.yaxis[e].labels.formatter(1));w.isNumber(t)&&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,r=i.isBarHorizontal?a.xaxis:a.yaxis[t];void 0===i.yAxisScale[t]&&(i.yAxisScale[t]=[]);const o=Math.abs(s-e),n=r.logarithmic&&this._logDomainSpan(e,s,r.logBase)>=1,l=r.logarithmic&&(n||o>5);if(r.logarithmic&&!l&&(i.invalidLogScale=!0),l){i.allSeriesCollapsed=!1;const a=this._resolveLogTickAmount(r);i.yAxisScale[t]=r.forceNiceScale?this.logarithmicScaleNice(e,s,r.logBase,a):this.logarithmicScale(e,s,r.logBase,a)}else s!==-Number.MAX_VALUE&&w.isNumber(s)&&e!==Number.MAX_VALUE&&w.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;if(e!==-Number.MAX_VALUE&&w.isNumber(e)){const a=i.xTickAmount;i.xAxisScale=this.linearScale(t,e,a,0,void 0===s.config.xaxis.max?s.config.xaxis.stepSize:void 0)}else i.xAxisScale=this.linearScale(0,10,10);return 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,r=[],o=!e.isBarHorizontal;if(e.allSeriesCollapsed=!0,e.barGroups=[],s.forEach((s,n)=>{const l=[];if(s.forEach(e=>{var s;const i=null==(s=t.series[e])?void 0:s.group;l.indexOf(i)<0&&l.push(i)}),s.length>0){let c,h,d=Number.MAX_VALUE,p=-Number.MAX_VALUE,g=d,u=p;if(t.chart.stacked){const i=new Array(e.dataPoints).fill(0),a=[],r=[],o=[];l.forEach(()=>{a.push(i.map(()=>Number.MIN_VALUE)),r.push(i.map(()=>Number.MIN_VALUE)),o.push(i.map(()=>Number.MIN_VALUE))});for(let i=0;i<s.length;i++){!c&&t.series[s[i]].type&&(c=t.series[s[i]].type);const d=s[i];h=t.series[d].group?t.series[d].group:"axis-".concat(n.toString());!(e.collapsedSeriesIndices.indexOf(d)<0&&e.ancillaryCollapsedSeriesIndices.indexOf(d)<0)||(e.allSeriesCollapsed=!1,l.forEach((e,s)=>{if(t.series[d].group===e)for(let t=0;t<this.w.seriesData.series[d].length;t++){const e=this.w.seriesData.series[d][t];e>=0?r[s][t]+=e:o[s][t]+=e,a[s][t]+=e,g=Math.min(g,e),u=Math.max(u,e)}})),"bar"!==c&&"column"!==c||e.barGroups.push(h)}c||(c=t.chart.type),"bar"===c||"column"===c?l.forEach((t,e)=>{d=Math.min(d,Math.min.apply(null,o[e])),p=Math.max(p,Math.max.apply(null,r[e]))}):(l.forEach((t,e)=>{g=Math.min(g,Math.min.apply(null,a[e])),u=Math.max(u,Math.max.apply(null,a[e]))}),d=g,p=u),d===Number.MIN_VALUE&&p===Number.MIN_VALUE&&(p=-Number.MAX_VALUE)}else for(let t=0;t<s.length;t++){const r=s[t];d=Math.min(d,i[r]),p=Math.max(p,a[r]);!(e.collapsedSeriesIndices.indexOf(r)<0&&e.ancillaryCollapsedSeriesIndices.indexOf(r)<0)||(e.allSeriesCollapsed=!1)}void 0!==t.yaxis[n].min&&(d="function"==typeof t.yaxis[n].min?t.yaxis[n].min(d):t.yaxis[n].min),void 0!==t.yaxis[n].max&&(p="function"==typeof t.yaxis[n].max?t.yaxis[n].max(p):t.yaxis[n].max),e.barGroups=e.barGroups.filter((t,e,s)=>s.indexOf(t)===e);const x=t.yaxis[n];o&&!0===x.alignZero&&!x.logarithmic&&void 0===x.min&&void 0===x.max&&e.ignoreYAxisIndexes.indexOf(n)<0&&w.isNumber(d)&&w.isNumber(p)?r.push({ai:n,minY:d,maxY:p}):(this.setYScaleForIndex(n,d,p),s.forEach(t=>{i[t]=e.yAxisScale[n].niceMin,a[t]=e.yAxisScale[n].niceMax}))}else this.setYScaleForIndex(n,0,-Number.MAX_VALUE)}),r.length>=2){r.forEach(t=>{this.setYScaleForIndex(t.ai,t.minY,t.maxY),s[t.ai].forEach(s=>{i[s]=e.yAxisScale[t.ai].niceMin,a[s]=e.yAxisScale[t.ai].niceMax})});let t=0;r.forEach(s=>{const i=e.yAxisScale[s.ai],a=i.niceMax-i.niceMin;if(a>0){const e=-i.niceMin/a;e>t&&(t=e)}}),t>1&&(t=1),t<0&&(t=0);const o=t=>{if(t<=0)return 1;const e=Math.floor(Math.log10(t)),s=Math.pow(10,e),i=t/s;let a;return a=i<=1+1e-9?1:i<=2+1e-9?2:i<=2.5+1e-9?2.5:i<=5+1e-9?5:10,a*s};r.forEach(r=>{const n=e.yAxisScale[r.ai];if(!n.result||n.result.length<2)return;const l=n.niceMax-n.niceMin;if(l<=0)return;const c=-n.niceMin/l;if(Math.abs(c-t)<=1e-9)return;const h=c<t&&t<1-1e-9,d=!h&&c>t&&t>1e-9;if(!h&&!d)return;const p=h?-t*n.niceMax/(1-t):n.niceMin,g=d?-n.niceMin*(1-t)/t:n.niceMax,u=g-p;if(u<=0)return;const x=Math.max(n.result.length,5),f=o(u/Math.max(x-1,1));if(f<=0)return;let m,b;if(h){m=Math.floor(p/f+1e-9)*f;const e=t>1e-9?m*(t-1)/t:n.niceMax,s=Math.max(e,n.niceMax);b=Math.ceil(s/f-1e-9)*f}else{b=Math.ceil(g/f-1e-9)*f;const e=t<1-1e-9?-t*b/(1-t):n.niceMin,s=Math.min(e,n.niceMin);m=Math.floor(s/f+1e-9)*f}n.result=[];for(let t=m;t<=b+1e-9*f;t=w.preciseAddition(t,f))n.result.push(w.stripNumber(t,7));n.niceMin=m,n.niceMax=b,s[r.ai].forEach(t=>{i[t]=n.niceMin,a[t]=n.niceMax})})}else if(1===r.length){const t=r[0];this.setYScaleForIndex(t.ai,t.minY,t.maxY),s[t.ai].forEach(s=>{i[s]=e.yAxisScale[t.ai].niceMin,a[s]=e.yAxisScale[t.ai].niceMax})}}}class Yt{constructor(t){this.w=t,this.scales=new Ot(this.w)}init(){this.setYRange(),this.setXRange(),this.setZRange()}_xPixelTolerance(t){const e=this.w.layout.gridWidth;if(!e||!t||!t.length)return 0;const s=this.w.config.xaxis,i="number"==typeof s.min?s.min:t[0],a="number"==typeof s.max?s.max:t[t.length-1];return a>i?(a-i)/e:0}getMinYMaxY(t,e=Number.MAX_VALUE,s=-Number.MAX_VALUE,i=null){var a,r,o,n,l,c,h,d,p;const g=this.w.config,u=this.w.globals;let x=-Number.MAX_VALUE,f=Number.MIN_VALUE;null===i&&(i=t+1);const m=this.w.seriesData.series;let b=m,y=m;"candlestick"===g.chart.type?(b=this.w.candleData.seriesCandleL,y=this.w.candleData.seriesCandleH):"boxPlot"===g.chart.type?(b=this.w.candleData.seriesCandleO,y=this.w.candleData.seriesCandleC):"violin"===g.chart.type?(b=this.w.violinData.seriesViolinMin,y=this.w.violinData.seriesViolinMax):this.w.axisFlags.isRangeData&&(b=this.w.rangeData.seriesRangeStart,y=this.w.rangeData.seriesRangeEnd);let v=!1;if(this.w.seriesData.seriesX.length>=i){const t=null==(a=u.brushSource)?void 0:a.w.config.chart.brush;(g.chart.zoom.enabled&&g.chart.zoom.autoScaleYaxis||(null==t?void 0:t.enabled)&&(null==t?void 0:t.autoScaleYaxis))&&(v=!0)}for(let a=t;a<i;a++){u.dataPoints=Math.max(u.dataPoints,m[a].length);const t=g.series[a].type;this.w.labelData.categoryLabels.length&&(u.dataPoints=this.w.labelData.categoryLabels.filter(t=>void 0!==t).length),this.w.labelData.labels.length&&"datetime"!==g.xaxis.type&&0!==this.w.seriesData.series.reduce((t,e)=>t+e.length,0)&&(u.dataPoints=Math.max(u.dataPoints,this.w.labelData.labels.length));let i=0,A=m[a].length-1;if(v){const t=this._xPixelTolerance(this.w.seriesData.seriesX[a]);if(g.xaxis.min){const e=g.xaxis.min-t;for(;i<A&&this.w.seriesData.seriesX[a][i]<e;i++);}if(g.xaxis.max){const e=g.xaxis.max+t;for(;A>i&&this.w.seriesData.seriesX[a][A]>e;A--);}}if(b===m&&y===m&&"boxPlot"!==g.chart.type&&"candlestick"!==t&&"boxPlot"!==t&&"violin"!==t&&"rangeArea"!==t&&"rangeBar"!==t&&!(this.w.seriesData.seriesGoals[a]&&this.w.seriesData.seriesGoals[a].length)){const o=m[a],n=Math.min(A,o.length-1),l=null==(r=this.w.seriesData._parsedExtrema)?void 0:r[a];if(l&&l.ref===o&&l.len===o.length&&0===i&&n===o.length-1)l.maxY>x&&(x=l.maxY),l.lowestY<e&&(e=l.lowestY),l.negMinY<0&&l.negMinY<f&&(f=l.negMinY),l.yDec>u.yValueDecimal&&(u.yValueDecimal=l.yDec),l.hasNulls&&(u.hasNullValues=!0);else{let t=u.yValueDecimal,s=!1;for(let a=i;a<=n;a++){const i=o[a];if(null!==i&&"number"==typeof i&&i==i&&i!==1/0&&i!==-1/0){if(i>x&&(x=i),i<e&&(e=i),f>i&&i<0&&(f=i),!Number.isInteger(i)){const e=i<0?-i:i;if(e>=1e-6&&e<1e21){const e=""+i,s=e.indexOf("."),a=-1===s?0:e.length-s-1;a>t&&(t=a)}else{const e=w.noExponents(i);w.isFloat(e)&&(t=Math.max(t,e.toString().split(".")[1].length))}}}else s=!0}u.yValueDecimal=t,s&&(u.hasNullValues=!0)}s=x,"bar"!==t&&"column"!==t||(f<0&&x<0&&(x=0,s=Math.max(s,0)),f===Number.MIN_VALUE&&(f=0,e=Math.min(e,0)));continue}for(let r=i;r<=A&&r<this.w.seriesData.series[a].length;r++){let i=m[a][r];if(null!==i&&w.isNumber(i)){switch(void 0!==(null==(o=y[a])?void 0:o[r])&&(x=Math.max(x,y[a][r]),e=Math.min(e,y[a][r])),void 0!==(null==(n=b[a])?void 0:n[r])&&(e=Math.min(e,b[a][r]),s=Math.max(s,b[a][r])),t){case"candlestick":void 0!==this.w.candleData.seriesCandleC[a][r]&&(x=Math.max(x,this.w.candleData.seriesCandleH[a][r]),e=Math.min(e,this.w.candleData.seriesCandleL[a][r]));break;case"boxPlot":void 0!==this.w.candleData.seriesCandleC[a][r]&&(x=Math.max(x,this.w.candleData.seriesCandleC[a][r]),e=Math.min(e,this.w.candleData.seriesCandleO[a][r]));break;case"violin":void 0!==(null==(l=this.w.violinData.seriesViolinMax[a])?void 0:l[r])&&(x=Math.max(x,this.w.violinData.seriesViolinMax[a][r]),e=Math.min(e,this.w.violinData.seriesViolinMin[a][r]))}if(t&&"candlestick"!==t&&"boxPlot"!==t&&"violin"!==t&&"rangeArea"!==t&&"rangeBar"!==t&&(x=Math.max(x,this.w.seriesData.series[a][r]),e=Math.min(e,this.w.seriesData.series[a][r])),this.w.seriesData.seriesGoals[a]&&this.w.seriesData.seriesGoals[a][r]&&Array.isArray(this.w.seriesData.seriesGoals[a][r])&&this.w.seriesData.seriesGoals[a][r].forEach(t=>{x=Math.max(x,t.value),e=Math.min(e,t.value)}),"boxPlot"===this.w.config.chart.type||"boxPlot"===t){const t=null==(h=null==(c=this.w.candleData.seriesBoxPoints)?void 0:c[a])?void 0:h[r];if(t)for(let s=0;s<t.length;s++){const i=t[s];"number"==typeof i&&(x=Math.max(x,i),e=Math.min(e,i))}}s=x,i=w.noExponents(i),w.isFloat(i)&&(u.yValueDecimal=Math.max(u.yValueDecimal,i.toString().split(".")[1].length)),f>(null==(d=b[a])?void 0:d[r])&&(null==(p=b[a])?void 0:p[r])<0&&(f=b[a][r])}else u.hasNullValues=!0}"bar"!==t&&"column"!==t||(f<0&&x<0&&(x=0,s=Math.max(s,0)),f===Number.MIN_VALUE&&(f=0,e=Math.min(e,0)))}return"rangeBar"===g.chart.type&&this.w.rangeData.seriesRangeStart.length&&u.isBarHorizontal&&(f=e),"bar"===g.chart.type&&(f<0&&x<0&&(x=0),f===Number.MIN_VALUE&&(f=0)),{minY:f,maxY:x,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 s,i=Number.MAX_VALUE;if(t.isMultipleYAxis){i=Number.MAX_VALUE;for(let e=0;e<this.w.seriesData.series.length;e++)s=this.getMinYMaxY(e),t.minYArr[e]=s.lowestY,t.maxYArr[e]=s.highestY,i=Math.min(i,s.lowestY)}if(s=this.getMinYMaxY(0,i,void 0,this.w.seriesData.series.length),"bar"===e.chart.type?(t.minY=s.minY,t.maxY=s.maxY):(t.minY=s.lowestY,t.maxY=s.highestY),i=s.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||"violin"===e.chart.type||"rangeBar"===e.chart.type&&!t.isBarHorizontal?t.minY===Number.MIN_VALUE&&i!==-Number.MAX_VALUE&&i!==t.maxY&&(t.minY=i):t.minY=t.minY!==Number.MIN_VALUE?Math.min(s.minY,t.minY):s.minY,e.yaxis.forEach((e,s)=>{void 0!==e.max&&("number"==typeof e.max?t.maxYArr[s]=e.max:"function"==typeof e.max&&(t.maxYArr[s]=e.max(t.isMultipleYAxis?t.maxYArr[s]:t.maxY)),t.maxY=t.maxYArr[s]),void 0!==e.min&&("number"==typeof e.min?t.minYArr[s]=e.min:"function"==typeof e.min&&(t.minYArr[s]=e.min(t.isMultipleYAxis?t.minYArr[s]===Number.MIN_VALUE?0:t.minYArr[s]:t.minY)),t.minY=t.minYArr[s])}),t.isBarHorizontal){["min","max"].forEach(s=>{void 0!==e.xaxis[s]&&"number"==typeof e.xaxis[s]&&("min"===s?t.minY=e.xaxis[s]:t.maxY=e.xaxis[s])})}return t.isMultipleYAxis?(this.scales.scaleMultipleYAxes(),t.minY=i):(this.scales.setYScaleForIndex(0,t.minY,t.maxY),t.minY=t.yAxisScale[0].niceMin,t.maxY=t.yAxisScale[0].niceMax,t.minYArr[0]=t.minY,t.maxYArr[0]=t.maxY),t.barGroups=[],t.lineGroups=[],t.areaGroups=[],e.series.forEach(s=>{const i=s;switch(i.type||e.chart.type){case"bar":case"column":t.barGroups.push(i.group);break;case"line":t.lineGroups.push(i.group);break;case"area":t.areaGroups.push(i.group)}}),t.barGroups=t.barGroups.filter((t,e,s)=>s.indexOf(t)===e),t.lineGroups=t.lineGroups.filter((t,e,s)=>s.indexOf(t)===e),t.areaGroups=t.areaGroups.filter((t,e,s)=>s.indexOf(t)===e),{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,i=()=>{var e;let s=t.minX,i=t.maxX;for(let t=0;t<this.w.seriesData.series.length;t++){const a=this.w.labelData.labels[t];if(!a)continue;const r=null==(e=this.w.seriesData._parsedExtrema)?void 0:e[t];if(r&&r.xNumeric&&r.xref===a&&r.len===a.length)r.maxX>i&&(i=r.maxX),r.minX<s&&(s=r.minX);else for(let t=0;t<a.length;t++){const e=a[t];null!==e&&"number"==typeof e&&e==e&&(e>i&&(i=e),e<s&&(s=e))}}t.maxX=i,t.initialMaxX=i,t.minX=s,t.initialMinX=s};if(this.w.axisFlags.isXNumeric&&i(),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 i=10;if(void 0===e.xaxis.tickAmount)i=Math.round(t.svgWidth/150),"numeric"===e.xaxis.type&&t.dataPoints<30&&(i=t.dataPoints-1),i>t.dataPoints&&0!==t.dataPoints&&(i=t.dataPoints-1);else if("dataPoints"===e.xaxis.tickAmount){if(this.w.seriesData.series.length>1&&(i=this.w.seriesData.series[t.maxValsInArrayIndex].length-1),this.w.axisFlags.isXNumeric){const e=Math.round(t.maxX-t.minX);e<30&&(i=e)}}else i=e.xaxis.tickAmount;if(t.xTickAmount=i,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!this.w.axisFlags.dataFormatXNumeric){const e=[];for(let s=t.minX-1;s<t.maxX;s++)e.push(s+1);t.xAxisScale={result:e,niceMin:e[0],niceMax:e[e.length-1]}}else t.xAxisScale=this.scales.setXScale(t.minX,t.maxX);else t.xAxisScale=this.scales.linearScale(0,i,i,0,e.xaxis.stepSize),this.w.axisFlags.noLabelsProvided&&this.w.labelData.labels.length>0&&(t.xAxisScale=this.scales.linearScale(1,this.w.labelData.labels.length,i-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(){var t;const e=this.w.globals;if(!this.w.axisFlags.isDataXYZ)return;for(let t=0;t<this.w.seriesData.series.length;t++)if(void 0!==this.w.seriesData.seriesZ[t])for(let s=0;s<this.w.seriesData.seriesZ[t].length;s++)null!==this.w.seriesData.seriesZ[t][s]&&w.isNumber(this.w.seriesData.seriesZ[t][s])&&(e.maxZ=Math.max(e.maxZ,this.w.seriesData.seriesZ[t][s]),e.minZ=Math.min(e.minZ,this.w.seriesData.seriesZ[t][s]));const s=(null==(t=this.w.config.plotOptions)?void 0:t.bubble)||{};w.isNumber(s.minZ)&&s.minZ<e.minZ&&(e.minZ=s.minZ),w.isNumber(s.maxZ)&&s.maxZ>e.maxZ&&(e.maxZ=s.maxZ)}_handleSingleDataPoint(){const t=this.w.globals,e=this.w.config;if(t.minX===t.maxX){const s=new v(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,s)=>{var i;if(e.length){1===e.length&&e.push(this.w.seriesData.seriesX[t.maxValsInArrayIndex][this.w.seriesData.seriesX[t.maxValsInArrayIndex].length-1]);const a=null==(i=this.w.seriesData._parsedExtrema)?void 0:i[s];if(a&&a.xNumeric&&a.xSorted&&a.xref===e&&a.len===e.length)return a.minXDiff<t.minXDiff&&(t.minXDiff=a.minXDiff),void(1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5));let r=!0,o=t.minXDiff;for(let t=1;t<e.length;t++){const s=e[t]-e[t-1];if(s>0)s<o&&(o=s);else if(s<0){r=!1;break}}if(r)return t.minXDiff=o,void(1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5));const n=e.slice();n.sort((t,e)=>t-e),n.forEach((e,s)=>{if(s>0){const i=e-n[s-1];i>0&&(t.minXDiff=Math.min(i,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(t=>t)]);const s={},i={};e.forEach(e=>{s[e]=[],i[e]=[];this.w.config.series.map((t,s)=>e.indexOf(this.w.seriesData.seriesNames[s])>-1?s:null).filter(t=>null!==t).forEach(a=>{var r,o,n,l;for(let c=0;c<this.w.seriesData.series[t.maxValsInArrayIndex].length;c++){void 0===s[e][c]&&(s[e][c]=0,i[e][c]=0);(this.w.config.chart.stacked&&!t.comboCharts||this.w.config.chart.stacked&&t.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null==(o=null==(r=this.w.config.series)?void 0:r[a])?void 0:o.type)||"column"===(null==(l=null==(n=this.w.config.series)?void 0:n[a])?void 0:l.type)))&&null!==this.w.seriesData.series[a][c]&&w.isNumber(this.w.seriesData.series[a][c])&&(this.w.seriesData.series[a][c]>0?s[e][c]+=parseFloat(String(this.w.seriesData.series[a][c]))+1e-4:i[e][c]+=parseFloat(String(this.w.seriesData.series[a][c])))}})}),Object.entries(s).forEach(([e])=>{s[e].forEach((a,r)=>{t.maxY=Math.max(t.maxY,s[e][r]),t.minY=Math.min(t.minY,i[e][r])})})}}function Ht(){return{palette1:["#008FFB","#00A86F","#CA8501","#FF4560","#846DD5"],palette2:["#6978CB","#039DE2","#49A84D","#B39105","#D68000"],palette3:["#209FCC","#648291","#D4526E","#0FA783","#A19285"],palette4:["#2FA59D","#73A20B","#099DE1","#FD5D5D","#648291"],palette5:["#2B908F","#F56566","#2EAB16","#FA4443","#1EA2BD"],palette6:["#449DD1","#F86624","#EA3A4A","#9C63D1","#899E2A"],palette7:["#DF475B","#1B998B","#7E75B7","#F46036","#B1911B"],palette8:["#9C63D1","#F86624","#B38F04","#EA3A4A","#2FA2B3"],palette9:["#98776F","#A19285","#A8705E","#BA6560","#A0927F"],palette10:["#C91EFF","#A94BFD","#6C6AFE","#2983FF","#009ED8"],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"]}}class Wt{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 It(t,{theme:e,timeScale:s})}drawYaxis(t){const e=this.w,s=new Mt(this.w),i=e.config.yaxis[t].labels.style,{fontSize:a,fontFamily:r,fontWeight:o}=i,n=s.group({class:"apexcharts-yaxis",rel:t,transform:`translate(${e.globals.translateYAxisX[t]}, 0)`});if(this.axesUtils.isYAxisHidden(t))return n;const l=s.group({class:"apexcharts-yaxis-texts-g"});n.add(l);const c=e.globals.yAxisScale[t].result.length-1,h=e.layout.gridHeight/c,d=e.formatters.yLabelFormatters[t],p=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());let g=1;if("heatmap"===e.config.chart.type&&!e.config.yaxis[t].labels.formatter){const t=parseInt(a,10)||11,s=Math.max(1,Math.floor(e.layout.gridHeight/(1.4*t))),i=c+1;i>s&&(g=Math.ceil(i/s))}if(e.config.yaxis[t].labels.show){let n=e.layout.translateY+e.config.yaxis[t].labels.offsetY;e.globals.isBarHorizontal?n=0:"heatmap"===e.config.chart.type&&(n-=h/2),n+=parseInt(a,10)/3;let u=null;for(let x=c;x>=0;x--){const c=g>1&&x%g!==0?"":d(p[x],x,e);let f=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&0!==e.config.yaxis.length&&(f*=-1);const m=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),b=this.axesUtils.getYAxisForeColor(i.colors,t),y=Array.isArray(b)?b[x]:b,w=Array.from(e.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-label tspan`)).map(t=>t.textContent),v=s.drawText({x:f,y:n,text:w.includes(c)&&!e.config.yaxis[t].labels.showDuplicates?"":c,textAnchor:m,fontSize:a,fontFamily:r,fontWeight:o,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:y,isPlainText:!1,cssClass:`apexcharts-yaxis-label ${i.cssClass}`});l.add(v),this.addTooltip(v,c),null===u&&(u=v),0!==e.config.yaxis[t].labels.rotate&&this.rotateLabel(s,v,u,e.config.yaxis[t].labels.rotate),n+=h}}return this.addYAxisTitle(s,n,t),this.addAxisBorder(s,n,t,c,h),n}getTextAnchor(t,e){return"left"===t?"start":"center"===t?"middle":"right"===t?"end":e?"start":"end"}addTooltip(t,e){const s=m.createElementNS(W,"title");s.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(s)}rotateLabel(t,e,s,i){const a=t.rotateAroundCenter(s.node),r=t.rotateAroundCenter(e.node);e.node.setAttribute("transform",`rotate(${i} ${a.x} ${r.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=i.config.yaxis[s].opposite?i.globals.translateYAxisX[s]:0,o=t.drawText({x:r,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(o),e.add(a)}}addAxisBorder(t,e,s,i,a){const r=this.w,o=r.config.yaxis[s].axisBorder;let n=31+o.offsetX;if(r.config.yaxis[s].opposite&&(n=-31-o.offsetX),o.show){const s=t.drawLine(n,r.layout.translateY+o.offsetY-2,n,r.layout.gridHeight+r.layout.translateY+o.offsetY+2,o.color,0,o.width);e.add(s)}r.config.yaxis[s].axisTicks.show&&this.axesUtils.drawYAxisTicks(n,i,o,r.config.yaxis[s].axisTicks,s,a,e)}drawYaxisInversed(t){const e=this.w,s=new Mt(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 r=e.globals.yAxisScale[t].result.length-1;const o=e.layout.gridWidth/r+.1;let n=o+e.config.xaxis.labels.offsetX;const l=e.formatters.xLabelFormatter;let c=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());const h=e.labelData.timescaleLabels;if(h.length>0&&(this.xaxisLabels=h.slice(),c=h.slice(),r=c.length),e.config.xaxis.labels.show)for(let i=h.length?0:r;h.length?i<h.length:i>=0;h.length?i++:i--){let r=null==l?void 0:l(c[i],i,e),d=e.layout.gridWidth+e.globals.padHorizontal-(n-o+e.config.xaxis.labels.offsetX);if(h.length){const t=this.axesUtils.getLabel(c,h,d,i,this.drawnLabels,this.xaxisFontSize);d=t.x,r=t.text,this.drawnLabels.push(t.text),0===i&&e.globals.skipFirstTimelinelabel&&(r=""),i===c.length-1&&e.globals.skipLastTimelinelabel&&(r="")}const p=s.drawText({x:d,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:r,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(p),this.addTooltip(p,r),n+=o}return this.inversedYAxisTitleText(i),this.inversedYAxisBorder(i),i}inversedYAxisBorder(t){const e=this.w,s=new Mt(this.w),i=e.config.xaxis.axisBorder;if(i.show){let a=0;"bar"===e.config.chart.type&&e.axisFlags.isXNumeric&&(a-=15);const r=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(r):t.add(r)}}inversedYAxisTitleText(t){const e=this.w,s=new Mt(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 Mt(this.w),a=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-texts-g`),r=a?a.getBoundingClientRect():{width:0,height:0},o=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-title text`),n=o?o.getBoundingClientRect():{width:0,height:0};if(o){const a=this.xPaddingForYAxisTitle(t,r,n,e);o.setAttribute("x",String(a.xPos-(e?10:0)));const l=i.rotateAroundCenter(o);o.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 r=0,o=10;return void 0===a.config.yaxis[t].title.text||t<0?{xPos:r,padd:0}:(i?r=e.width+a.config.yaxis[t].title.offsetX+s.width/2+o/2:(r=-1*e.width+a.config.yaxis[t].title.offsetX+o/2+s.width/2,a.globals.isBarHorizontal&&(o=25,r=-1*e.width-a.config.yaxis[t].title.offsetX-o)),{xPos:r,padd:o})}setYAxisXPosition(t,e){const s=this.w;let i=0,a=0,r=18,o=1;s.config.yaxis.length>1&&(this.multipleYs=!0),s.config.yaxis.forEach((n,l)=>{const c=s.globals.ignoreYAxisIndexes.includes(l)||!n.show||n.floating||0===t[l].width,h=t[l].width+e[l].width;n.opposite?s.globals.isBarHorizontal?(a=s.layout.gridWidth+s.layout.translateX-1,s.globals.translateYAxisX[l]=a-n.labels.offsetX):(a=s.layout.gridWidth+s.layout.translateX+o,c||(o+=h+20),s.globals.translateYAxisX[l]=a-n.labels.offsetX+20):(i=s.layout.translateX-r,c||(r+=h+20),s.globals.translateYAxisX[l]=i+n.labels.offsetX)})}setYAxisTextAlignments(){const t=this.w;Array.from(t.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((e,s)=>{const i=t.config.yaxis[s];if(i&&!i.floating&&void 0!==i.labels.align){const e=t.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${s}'] .apexcharts-yaxis-texts-g`),a=Array.from(t.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${s}'] .apexcharts-yaxis-label`)),r=e.getBoundingClientRect();a.forEach(t=>{t.setAttribute("text-anchor",i.labels.align)}),"left"!==i.labels.align||i.opposite?"center"===i.labels.align?e.setAttribute("transform",`translate(${r.width/2*(i.opposite?1:-1)}, 0)`):"right"===i.labels.align&&i.opposite&&e.setAttribute("transform",`translate(${r.width}, 0)`):e.setAttribute("transform",`translate(-${r.width}, 0)`)}})}}class Gt{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 t=0;t<a;t++)i[t].apply(null,e)}setupEventHandlers(){const t=this.w,e=this.ctx,s=t.dom.baseEl.querySelector(t.globals.chartClass);this.ctx.eventList.forEach(i=>{null==s||s.addEventListener(i,s=>{const i=null===s.target.getAttribute("i")&&-1!==t.interact.capturedSeriesIndex?t.interact.capturedSeriesIndex:s.target.getAttribute("i"),a=null===s.target.getAttribute("j")&&-1!==t.interact.capturedDataPointIndex?t.interact.capturedDataPointIndex:s.target.getAttribute("j"),r=Object.assign({},t,{seriesIndex:t.globals.axisCharts?i:0,dataPointIndex:a});"keydown"===s.type?t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&(e.ctx.keyboardNavigation&&e.ctx.keyboardNavigation.handleKey(s),"function"==typeof t.config.chart.events.keyDown&&t.config.chart.events.keyDown(s,e,r),e.ctx.events.fireEvent("keydown",[s,e,r])):"keyup"===s.type?t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&("function"==typeof t.config.chart.events.keyUp&&t.config.chart.events.keyUp(s,e,r),e.ctx.events.fireEvent("keyup",[s,e,r])):"mousemove"===s.type||"touchmove"===s.type?"function"==typeof t.config.chart.events.mouseMove&&t.config.chart.events.mouseMove(s,e,r):"mouseleave"===s.type||"touchleave"===s.type?"function"==typeof t.config.chart.events.mouseLeave&&t.config.chart.events.mouseLeave(s,e,r):("mouseup"===s.type&&1===s.which||"touchend"===s.type)&&("function"==typeof t.config.chart.events.click&&t.config.chart.events.click(s,e,r),e.ctx.events.fireEvent("click",[s,e,r]))},{capture:!1,passive:!0})}),this.ctx.eventList.forEach(e=>{t.dom.baseEl.addEventListener(e,this.documentEvent,{passive:!0})}),this.ctx.core.setupBrushHandler()}documentEvent(t){const e=this.w,s=t.target.className;if("click"===t.type){const t=e.dom.baseEl.querySelector(".apexcharts-menu");t&&t.classList.contains("apexcharts-menu-open")&&"apexcharts-menu-icon"!==s&&t.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 Ut{constructor(t){this.w=t}setCurrentLocaleValues(t){let e=this.w.config.chart.locales;const s=h.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(e=>e.name===t)[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");{const t=w.extend(S,i);this.w.globals.locale=t.options}}}class $t{constructor(t,e){this.w=t,this.ctx=e}drawAxis(t,e){const s=this.w.globals,i=this.w.config,a=new Xt(this.w,this.ctx,e),r=new Wt(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale},e);if(s.axisCharts&&"radar"!==t){let t,e;s.isBarHorizontal?(e=r.drawYaxisInversed(0),t=a.drawXaxisInversed(0),this.w.dom.elGraphical.add(t),this.w.dom.elGraphical.add(e)):(t=a.drawXaxis(),this.w.dom.elGraphical.add(t),i.yaxis.map((t,i)=>{if(-1===s.ignoreYAxisIndexes.indexOf(i)&&(e=r.drawYaxis(i),this.w.dom.Paper.add(e),"back"===this.w.config.grid.position)){const t=this.w.dom.Paper.children()[1];t&&(t.remove(),this.w.dom.Paper.add(t))}}))}}}class Vt{constructor(t){this.w=t}drawXCrosshairs(){const t=this.w;t.dom.elGraphical.node.querySelectorAll(":scope > .apexcharts-xcrosshairs").forEach(t=>t.remove());const e=new Mt(this.w),s=new Dt(this.w),i=t.config.xaxis.crosshairs.fill.gradient,a=t.config.xaxis.crosshairs.dropShadow,r=t.config.xaxis.crosshairs.fill.type,o=i.colorFrom,n=i.colorTo,l=i.opacityFrom,c=i.opacityTo,h=i.stops,d=a.enabled,p=a.left,g=a.top,u=a.blur,x=a.color,f=a.opacity;let m=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===r&&(m=e.drawGradient("vertical",o,n,l,c,null,h,[]));let i=1===t.config.xaxis.crosshairs.width?e.drawLine(0,0,0,0):e.drawRect(),a=t.layout.gridHeight;(!w.isNumber(a)||a<0)&&(a=0);let b=t.config.xaxis.crosshairs.width;(!w.isNumber(b)||Number(b)<0)&&(b=0),i.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:a,width:b,height:a,fill:m,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}),d&&(i=s.dropShadow(i,{left:p,top:g,blur:u,color:x,opacity:f})),t.dom.elGraphical.add(i)}}drawYCrosshairs(){const t=this.w;t.dom.elGraphical.node.querySelectorAll(":scope > .apexcharts-ycrosshairs, :scope > .apexcharts-ycrosshairs-hidden").forEach(t=>t.remove());const e=new Mt(this.w),s=t.config.yaxis[0].crosshairs,i=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){const a=e.drawLine(-i,0,t.layout.gridWidth+i,0,s.stroke.color,s.stroke.dashArray,s.stroke.width);a.attr({class:"apexcharts-ycrosshairs"}),t.dom.elGraphical.add(a)}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)}}function jt(t,e){if(!w.isObject(t)||!w.isObject(e))return void 0!==e?e:t;const s=n({},t);for(const i of Object.keys(e)){const a=e[i];void 0!==a&&(w.isObject(a)&&w.isObject(t[i])?s[i]=jt(t[i],a):s[i]=a)}return s}class qt{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((t,e)=>t.breakpoint>e.breakpoint?1:e.breakpoint>t.breakpoint?-1:0).reverse();const a=new R({}),r=(t={})=>{var s;const r=i[0].breakpoint,o=h.isBrowser()?window.innerWidth>0?window.innerWidth:screen.width:0;if(o>r){if(null!==this._activeBreakpoint){if(!e.globals.initialConfig)return;const s=w.clone(e.globals.initialConfig);s.series=w.clone(e.config.series);const i=H.extendArrayProps(a,s,e);t=w.extend(i,t),this.overrideResponsiveOptions(t),this._activeBreakpoint=null}}else for(let r=0;r<i.length;r++)if(o<i[r].breakpoint){const o=(null==(s=i[r].options)?void 0:s.yaxis)?w.clone(i[r].options.yaxis):null;if(t=H.extendArrayProps(a,i[r].options,e),t=w.extend(e.config,t),Array.isArray(e.config.yaxis)&&o){const s=Array.isArray(o)?o:[o];t=l(n({},t),{yaxis:e.config.yaxis.map((t,e)=>jt(t,s[e]))})}this.overrideResponsiveOptions(t),this._activeBreakpoint=i[r].breakpoint}};if(t){let s=H.extendArrayProps(a,t,e);s=w.extend(e.config,s),s=w.extend(s,t),r(s)}else r({})}overrideResponsiveOptions(t){const e=new R(t).init({responsiveOverride:!0});this.w.config=e}}function Zt(t){var e;const s=t.config.chart.animations;if(!s||!1===s.enabled)return!1;if(!s.dynamicAnimation||!1===s.dynamicAnimation.enabled)return!1;const i=null!=(e=s.largeDatasetThreshold)?e:0;return!(i>0&&t.globals.dataPoints>i)&&!!(h.isBrowser()&&t.globals.dataChanged&&t.globals.shouldAnimate)}function Kt(t){const e=new Map;return t.map(t=>{const s=e.get(t)||0;return e.set(t,s+1),0===s?t:`${t}#${s}`})}function Jt(t,e,s=!1,i=!1){var a,r;if(!Zt(t))return null;const o=t.globals.prevStreamFrame;if(!o)return null;const n=null==(a=o.seriesY)?void 0:a[e],l=null==(r=t.seriesData.series)?void 0:r[e];if(!Array.isArray(n)||!Array.isArray(l))return null;if(!n.length||!l.length)return null;const c=Kt(n.map((t,s)=>function(t,e,s){var i,a;if(t.isXNumeric){const a=null==(i=t.seriesX)?void 0:i[e];if(a&&a.length&&null!=a[s])return"x:"+a[s]}const r=null==(a=t.labels)?void 0:a[s];return null!=r&&""!==String(r)?"c:"+(Array.isArray(r)?r.join(" "):String(r)):"j:"+s}(o,e,s))),h=Kt(l.map((s,i)=>function(t,e,s){var i,a,r,o;if(null==(i=t.axisFlags)?void 0:i.isXNumeric){const i=null==(r=null==(a=t.seriesData)?void 0:a.seriesX)?void 0:r[e];if(i&&i.length&&null!=i[s])return"x:"+i[s]}const n=null==(o=t.globals.labels)?void 0:o[s];return null!=n&&""!==String(n)?"c:"+(Array.isArray(n)?n.join(" "):String(n)):"j:"+s}(t,e,i))),d=function(t,e){const s=new Map;t.forEach((t,e)=>{s.has(t)||s.set(t,e)});const i=new Array(e.length),a=new Set;let r=-1,o=!0,n=t.length===e.length;e.forEach((t,e)=>{const l=s.has(t)&&!a.has(s.get(t))?s.get(t):-1;i[e]=l,-1!==l&&(a.add(l),l<r&&(o=!1),r=l),l!==e&&(n=!1)});const l=[];for(let e=0;e<t.length;e++)a.has(e)||l.push(e);return{toOld:i,exits:l,ordered:o,changed:!n}}(c,h);return(d.ordered||i)&&(d.changed||s)?{join:d,oldKeys:c,newKeys:h}:null}function Qt(t){var e,s;const i=t.config.chart.animations;return ut(null!=(s=null==(e=i.dynamicAnimation)?void 0:e.easing)?s:i.easing)}function te(t,e,s,i,a){const r=performance.now(),o=n=>{if(t.globals.isDestroyed)return;const l=Math.max(0,Math.min(1,(n-r)/e));i(s(l),l),l<1?m.requestAnimationFrame(o):a&&a()};m.requestAnimationFrame(o)}function ee(t,e,s){return[...t.querySelectorAll(e)].map(t=>{var e,i,a;return{text:t.textContent||"",display:null!=(a=null!=(i=null==(e=t.querySelector("tspan"))?void 0:e.textContent)?i:t.textContent)?a:"",pos:parseFloat(t.getAttribute(s)||""),transform:t.getAttribute("transform")}})}function se(t,e,s){return[...t.querySelectorAll(e)].map(t=>parseFloat(t.getAttribute(s)||""))}const ie=":not(.apexcharts-tick-ghost)",ae=`.apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)${ie}`,re=`.apexcharts-yaxis-texts-g text${ie}`,oe=`.apexcharts-gridlines-vertical line${ie}`,ne=`.apexcharts-gridlines-horizontal line${ie}`;function le(t){var e,s;const i=t.globals;if(!(null==(e=t.axisFlags)?void 0:e.isXNumeric)||i.isBarHorizontal)return null;if(null==(s=t.config.xaxis)?void 0:s.reversed)return null;const a=i.minX,r=i.maxX,o=t.layout.gridWidth;return isFinite(a)&&isFinite(r)&&r>a&&o>0?{min:a,max:r,width:o}:null}function ce(t,e){var s;const i=t.globals;if(i.isBarHorizontal)return null;if(!Array.isArray(t.config.yaxis)||1!==t.config.yaxis.length)return null;if(null==(s=t.config.yaxis[0])?void 0:s.logarithmic)return null;const a=i.minY,r=i.maxY;if(!(isFinite(a)&&isFinite(r)&&r>a))return null;const o=e.map(t=>t.pos).filter(t=>isFinite(t));return o.length<2?null:{min:a,max:r,pLo:Math.max(...o),pHi:Math.min(...o)}}function he(t,e){if(!t||!e)return null;const s=t.pHi-t.pLo,i=e.pHi-e.pLo,a=t.max-t.min,r=e.max-e.min;if(!(s&&i&&a>0&&r>0))return null;return{toNew:o=>e.pLo+((e=>t.min+(e-t.pLo)/s*a)(o)-e.min)/r*i,toOld:o=>t.pLo+((t=>e.min+(t-e.pLo)/i*r)(o)-t.min)/a*s}}function de(t,e,s,i){const a=e.style;a.opacity="0",te(t,s,i,t=>{a.opacity=String(t)},()=>{a.opacity=""})}function pe(t,e,s,i,a,r,o){s.forEach(t=>e.setAttribute(t,String(i))),te(t,r,o,t=>{const r=String(i+(a-i)*t);s.forEach(t=>e.setAttribute(t,r))},()=>{s.forEach(t=>e.setAttribute(t,String(a)))})}function ge(t,{template:e,display:s,attrs:i,from:a,to:r,duration:o,ease:n}){const l=e.parentNode;if(!l)return;const c=e.cloneNode(!0);if(c.classList.add("apexcharts-tick-ghost"),c.setAttribute("pointer-events","none"),c.removeAttribute("id"),void 0!==s){const t=c.querySelector("tspan");t?t.textContent=s:c.textContent=s;const e=c.querySelector("title");e&&(e.textContent=s)}i.forEach(t=>c.setAttribute(t,String(a)));const h=c.style;h.opacity="1",l.appendChild(c),te(t,o,n,t=>{const e=String(a+(r-a)*t);i.forEach(t=>c.setAttribute(t,e)),h.opacity=String(1-t)},()=>{c.parentNode&&c.parentNode.removeChild(c)})}function ue(t,{newLabels:e,oldLabels:s,posAttr:i,newLines:a,oldLines:r,lineAttrs:o,duration:c,ease:h,project:d}){const p=new Map;s.forEach((t,e)=>{p.has(t.text)||p.set(t.text,l(n({},t),{i:e}))});const g=new Set,u=a.length===e.length,x=r.length===s.length,f=s.map(t=>t.pos).concat(e.map(t=>parseFloat(t.getAttribute(i)||""))).filter(t=>isFinite(t)),m=Math.min(...f),b=Math.max(...f),y=Math.max(40,.25*(b-m)),w=t=>Math.max(m-y,Math.min(b+y,t)),v=(e,s)=>{if(!e)return;const i=parseFloat(e.getAttribute(o[0])||""),a=r[s.i];isFinite(i)&&isFinite(a)&&pe(t,e,o,a,i,c,h)};if(e.forEach((e,s)=>{const r=parseFloat(e.getAttribute(i)||""),n=p.get(e.textContent||""),l=u?a[s]:null;n&&g.add(n.i);const x=e.getAttribute("transform");if(n&&isFinite(n.pos)){if(isFinite(r)&&!(Math.abs(n.pos-r)<.5)){if(x||n.transform){const s=n.pos-r;if(isFinite(s)){const a=x||"";te(t,c,h,t=>{const r=s*(1-t),o="x"===i?`translate(${r} 0)`:`translate(0 ${r})`;e.setAttribute("transform",`${o} ${a}`.trim())},()=>{a?e.setAttribute("transform",a):e.removeAttribute("transform")})}return void v(l,n)}pe(t,e,[i],n.pos,r,c,h),v(l,n)}}else if(!n){if(d&&isFinite(r)&&!x){const s=isFinite(d.toOld(r))?w(d.toOld(r)):NaN;isFinite(s)&&Math.abs(s-r)>.5&&(pe(t,e,[i],s,r,c,h),l&&pe(t,l,o,s,r,c,h))}de(t,e,c,h),l&&de(t,l,c,h)}}),!d||!e.length)return;let A=0;s.forEach((s,n)=>{if(g.has(n))return;if(!isFinite(s.pos)||s.transform)return;if(A>=20)return;const l=d.toNew(s.pos);!isFinite(l)||Math.abs(l-s.pos)<.5||(A++,ge(t,{template:e[0],display:s.display,attrs:[i],from:s.pos,to:w(l),duration:c,ease:h}),x&&a.length&&isFinite(r[n])&&ge(t,{template:a[0],attrs:o,from:r[n],to:w(d.toNew(r[n])),duration:c,ease:h}))})}function xe(t){const e=t.globals,s=e.prevChromeFrame;if(e.prevChromeFrame=null,!s||!e.axisCharts||!h.isBrowser())return;if(!Zt(t))return;if(!(t.seriesData.series||[]).some((e,s)=>null!==Jt(t,s,!0,!0)))return;const i=t.dom.baseEl;if(!w.elementExists(i))return;const a=Math.max(1,t.config.chart.animations.dynamicAnimation.speed||1),r=Qt(t);try{const e=[...i.querySelectorAll(re)],o=function(t,e){if(!t||!e)return null;const s=t.max-t.min,i=e.max-e.min;return s>0&&i>0&&t.width>0&&e.width>0?{toNew:a=>(t.min+a/t.width*s-e.min)/i*e.width,toOld:a=>(e.min+a/e.width*i-t.min)/s*t.width}:null}(s.xScale,le(t)),n=he(s.yAnchors,ce(t,e.map(t=>({pos:parseFloat(t.getAttribute("y")||"")}))));ue(t,{newLabels:[...i.querySelectorAll(ae)],oldLabels:s.xLabels,posAttr:"x",newLines:[...i.querySelectorAll(oe)],oldLines:s.vGrid,lineAttrs:["x1","x2"],duration:a,ease:r,project:o}),ue(t,{newLabels:e,oldLabels:s.yLabels,posAttr:"y",newLines:[...i.querySelectorAll(ne)],oldLines:s.hGrid,lineAttrs:["y1","y2"],duration:a,ease:r,project:n})}catch(t){}}const fe=".apexcharts-data-labels[data\\:dlKey]",me=".apexcharts-datalabel",be=".apexcharts-datalabel-total[data\\:dlTotalKey]";function ye(t){var e,s;const i=t.config.dataLabels;return!(!(null==(e=null==i?void 0:i.animate)?void 0:e.enabled)&&!(null==(s=null==i?void 0:i.countUp)?void 0:s.enabled))}function we(t){if(!isFinite(t))return 0;const e=String(Math.abs(t)),s=e.indexOf("e");if(-1!==s){const t=e.slice(0,s),i=parseInt(e.slice(s+1),10),a=t.indexOf("."),r=-1===a?0:t.length-a-1;return Math.min(6,Math.max(0,r-i))}const i=e.indexOf(".");return-1===i?0:Math.min(6,e.length-i-1)}function ve(t,e){const s=t.querySelector("tspan");s?s.textContent=e:t.textContent=e}function Ae(t,{el:e,oldCx:s,oldCy:i,duration:a,ease:r,delay:o=0}){const n=e.hasAttribute("cx")?e:e.querySelector(me);if(!n)return;const l=s-parseFloat(n.getAttribute("cx")||""),c=i-parseFloat(n.getAttribute("cy")||"");if(!isFinite(l)||!isFinite(c))return;if(Math.abs(l)+Math.abs(c)<=.5)return;const h=e.getAttribute("transform")||"",d=()=>te(t,a,r,t=>{const s=1-t;e.setAttribute("transform",`translate(${l*s} ${c*s}) ${h}`.trim())},()=>{h?e.setAttribute("transform",h):e.removeAttribute("transform")});o>0?(e.setAttribute("transform",`translate(${l} ${c}) ${h}`.trim()),setTimeout(()=>{t.globals.isDestroyed||d()},o)):d()}function Se(t,{el:e,from:s,to:i,formatter:a,fmtOpts:r,duration:o,ease:n,delay:l=0}){if(!isFinite(s)||!isFinite(i))return;if(Math.abs(i-s)<=1e-9)return;const c=Math.max(we(s),we(i)),h=t=>{const e=Number(t.toFixed(c));let s=e;if("function"==typeof a)try{s=a(e,r)}catch(t){s=e}return String(s)},d=()=>te(t,o,n,t=>{ve(e,h(s+(i-s)*t))},()=>{ve(e,h(i))});l>0?(ve(e,h(s)),setTimeout(()=>{t.globals.isDestroyed||d()},l)):d()}function Ce(t){var e,s;const i=t.globals,a=i.prevDataLabels;if(i.prevDataLabels=null,!a||!i.axisCharts||!h.isBrowser())return;if(!ye(t))return;if(!Zt(t))return;const r=t.dom.baseEl;if(!w.elementExists(r))return;const o=t.config.dataLabels,c=!!(null==(e=o.animate)?void 0:e.enabled),d=!!(null==(s=o.countUp)?void 0:s.enabled),p=o.formatter,g=Math.max(1,t.config.chart.animations.dynamicAnimation.speed||1),u=Qt(t);try{r.querySelectorAll(fe).forEach(e=>{const s=e.getAttribute("data:dlKey");if(!s)return;const i=e.querySelector(me);if(!i)return;const r=a.get(s),o=parseInt(e.getAttribute("data:dlDelay")||"0",10)||0;if(c&&(r&&isFinite(r.cx)&&isFinite(r.cy)?Ae(t,{el:e,oldCx:r.cx,oldCy:r.cy,duration:g,ease:u,delay:o}):r||function(t,e,s,i){const a=e.style;a.opacity="0",te(t,s,i,t=>{a.opacity=String(t)},()=>{a.opacity=""})}(t,e,g,u)),d&&r){const a=parseInt(s,10),c=parseInt(e.getAttribute("data:dlJ")||"",10);Se(t,{el:i,from:r.val,to:parseFloat(e.getAttribute("data:dlVal")||""),formatter:p,fmtOpts:l(n({},t),{seriesIndex:a,dataPointIndex:isFinite(c)?c:0,w:t}),duration:g,ease:u,delay:o})}});const e=t.config.plotOptions.bar.dataLabels.total.formatter||p;r.querySelectorAll(be).forEach(s=>{const i=s.getAttribute("data:dlTotalKey");if(!i)return;const r=a.get(`total::${i}`);if(!r)return;const o=parseInt(s.getAttribute("data:dlDelay")||"0",10)||0;if(c&&isFinite(r.cx)&&isFinite(r.cy)&&Ae(t,{el:s,oldCx:r.cx,oldCy:r.cy,duration:g,ease:u,delay:o}),d){const a=parseInt(s.getAttribute("data:dlTotalSeries")||i,10);Se(t,{el:s,from:r.val,to:parseFloat(s.getAttribute("data:dlTotalVal")||""),formatter:e,fmtOpts:l(n({},t),{seriesIndex:a,dataPointIndex:0,w:t}),duration:g,ease:u,delay:o})}})}catch(t){}}class ke{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='${w.escapeString(t)}']`)}isSeriesHidden(t){var e;const s=this.getSeriesByName(t),i=parseInt(null!=(e=s.getAttribute("data:realIndex"))?e:"0",10);return{isHidden:s.classList.contains("apexcharts-series-collapsed"),realIndex:i}}addCollapsedClassToSeries(t,e){ke.addCollapsedClassToSeries(this.w,t,e)}static addCollapsedClassToSeries(t,e,s){let i=!1;function a(t){for(let a=0;a<t.length;a++)t[a].index===s&&(e.node.classList.add("apexcharts-series-collapsed"),i=!0)}if(a(t.globals.collapsedSeries),a(t.globals.ancillaryCollapsedSeries),!i)return;if(-1===(t.globals.collapsingSeriesIndices||[]).indexOf(s))return;if(e.node.classList.add("apexcharts-series-collapsing"),!h.isBrowser())return;const r=t.config.chart.animations,o=(r.dynamicAnimation.speed||0)+(r.speed||0)+100;setTimeout(()=>{t.globals.isDestroyed||e.node.classList.remove("apexcharts-series-collapsing")},o)}toggleSeries(t){var e;const s=this.isSeriesHidden(t);return 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)}prepareDataUpdate(){const t=this.w;this.clearSeriesCache(),t.globals.previousPaths=[],t.globals.collapsedSeries=[],t.globals.ancillaryCollapsedSeries=[],t.globals.collapsedSeriesIndices=[],t.globals.ancillaryCollapsedSeriesIndices=[]}resetSeries(t=!0,e=!0,s=!0){var i,a;const r=this.w;this.clearSeriesCache();let o=w.clone(r.globals.initialSeries);Array.isArray(o)||(o=w.clone(r.config.series)||[]),r.globals.previousPaths=[],s?(r.globals.collapsedSeries=[],r.globals.ancillaryCollapsedSeries=[],r.globals.collapsedSeriesIndices=[],r.globals.ancillaryCollapsedSeriesIndices=[]):o=this.emptyCollapsedSeries(o),r.config.series=o,t&&(e&&(r.interact.zoomed=!1,null==(i=this._revertDefaultAxisMinMax)||i.call(this)),null==(a=this._updateSeries)||a.call(this,o,r.config.chart.animations.dynamicAnimation.enabled))}emptyCollapsedSeries(t){const e=this.w;if(!Array.isArray(t))return t;for(let s=0;s<t.length;s++)e.globals.collapsedSeriesIndices.indexOf(s)>-1&&(t[s]&&"object"==typeof t[s]?t[s].data=[]:t[s]=0);return t}_deriveSeriesNames(){const t=this.w,e=t.config.series||[],s=t.config.labels||[];return e.map((t,e)=>t&&"object"==typeof t&&null!=t.name?String(t.name):null!=s[e]?String(s[e]):`series-${e+1}`)}reconcileCollapsedByName(){const t=this.w,e=t.globals,s=this._deriveSeriesNames(),i=i=>{const a=[],r=[];return i.forEach(i=>{const o=i&&null!=i.name?s.indexOf(i.name):i.index;if(null==o||o<0||o>=t.config.series.length)return;const n=t.config.series[o];i.index=o,i.data=e.axisCharts?n&&n.data?n.data.slice():[]:n,a.push(i),r.push(o)}),{records:a,indices:r}},a=i(e.collapsedSeries);e.collapsedSeries=a.records,e.collapsedSeriesIndices=a.indices;const r=i(e.ancillaryCollapsedSeries);e.ancillaryCollapsedSeries=r.records,e.ancillaryCollapsedSeriesIndices=r.indices,e.allSeriesCollapsed=e.collapsedSeries.length+e.ancillaryCollapsedSeries.length===t.config.series.length,this.emptyCollapsedSeries(t.config.series)}canvasRestyle(t){const e=this.w.globals.activeRenderer;e&&"canvas"===e.kind&&"function"==typeof e.restyle&&e.restyle(t)}highlightSeries(t){var e;const s=this.w,i=this.getSeriesByName(t),a=parseInt(null!=(e=null==i?void 0:i.getAttribute("data:realIndex"))?e:"",10),r="highlightSeriesEls";let o=s.globals.cachedSelectors[r];o||(o=s.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),s.globals.cachedSelectors[r]=o);let n=null,l=null,c=null;if(s.globals.axisCharts||"radialBar"===s.config.chart.type)if(s.globals.axisCharts){n=s.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${a}']`),l=s.dom.baseEl.querySelector(`.apexcharts-datalabels[data\\:realIndex='${a}']`);const t=s.globals.seriesYAxisReverseMap[a];c=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}']`)}else n=s.dom.baseEl.querySelector(`.apexcharts-series[rel='${a+1}']`);else n=s.dom.baseEl.querySelector(`.apexcharts-series[rel='${a+1}'] path`);for(let t=0;t<o.length;t++){o[t].classList.add(this.legendInactiveClass)}if(n){if(!s.globals.axisCharts){const t=n.parentNode;null==t||t.classList.remove(this.legendInactiveClass)}n.classList.remove(this.legendInactiveClass),null!==l&&l.classList.remove(this.legendInactiveClass),null!==c&&c.classList.remove(this.legendInactiveClass)}else for(let t=0;t<o.length;t++){o[t].classList.remove(this.legendInactiveClass)}this.canvasRestyle(n&&!Number.isNaN(a)?{active:a,opacity:.2}:null)}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 t=parseInt(e.getAttribute("rel"),10)-1;this.highlightSeries(s.seriesData.seriesNames[t])}else if("mouseout"===t.type){for(let t=0;t<i.length;t++)i[t].classList.remove(this.legendInactiveClass);this.canvasRestyle(null)}}highlightRangeInSeries(t,e){const s=this.w,i=s.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),a=t=>{for(let e=0;e<i.length;e++){const s=i[e].classList;"function"==typeof s[t]&&s[t](this.legendInactiveClass)}};if("reset"===e)return void a("remove");const r=s.config.plotOptions.heatmap.colorScale.ranges,o=r&&r[t];if(o){a("add");for(let t=0;t<i.length;t++){const e=Number(i[t].getAttribute("val"));e>=o.from&&e<=o.to&&i[t].classList.remove(this.legendInactiveClass)}}}getActiveConfigSeriesIndex(t="asc",e=[]){const s=this.w;let i=0;if(s.config.series.length>1){const a=s.config.series.map((t,i)=>t.data&&t.data.length>0&&-1===s.globals.collapsedSeriesIndices.indexOf(i)&&(!s.globals.comboCharts||0===e.length||e.length&&e.indexOf(s.config.series[i].type)>-1)?i:-1);for(let e="asc"===t?0:a.length-1;"asc"===t?e<a.length:e>=0;"asc"===t?e++:e--)if(-1!==a[e]){i=a[e];break}}return i}getActiveConfigSeriesIndexByGroup(t=[]){const e=this.w;return(e.labelData.seriesGroups||[]).map(s=>{let i=-1;return e.config.series.forEach((a,r)=>{if(-1===s.indexOf(e.seriesData.seriesNames[r]))return;if(e.globals.comboCharts&&t.length&&-1===t.indexOf(a.type))return;a.data&&a.data.length>0&&-1===e.globals.collapsedSeriesIndices.indexOf(r)&&(i=r)}),i})}getBarSeriesIndices(){return this.w.globals.comboCharts?this.w.config.series.map((t,e)=>"bar"===t.type||"column"===t.type?e:-1).filter(t=>-1!==t):this.w.config.series.map((t,e)=>e)}getPreviousPaths(){var t,e,s,i;const a=this.w;if(function(t){var e,s,i;const a=t.globals;if(a.streamScrolled=!1,!a.axisCharts||!t.seriesData||!Array.isArray(t.seriesData.series)||0===t.seriesData.series.length)return void(a.prevStreamFrame=null);const r=[];(null==(s=null==(e=t.dom)?void 0:e.baseEl)?void 0:s.querySelectorAll)&&t.dom.baseEl.querySelectorAll(".apexcharts-marker").forEach(t=>{var e,s,i,a,o;const n=parseInt(null!=(e=t.getAttribute("index"))?e:"",10),l=parseInt(null!=(i=null!=(s=t.getAttribute("j"))?s:t.getAttribute("rel"))?i:"",10),c=parseFloat(null!=(o=null!=(a=t.getAttribute("r"))?a:t.getAttribute("default-marker-size"))?o:"");isFinite(n)&&isFinite(l)&&isFinite(c)&&((r[n]=r[n]||[])[l]=c)}),a.prevStreamFrame={seriesX:(t.seriesData.seriesX||[]).slice(),seriesY:t.seriesData.series.slice(),xPixels:(a.seriesXvalues||[]).slice(),yPixels:(a.seriesYvalues||[]).slice(),rPixels:r,labels:(a.labels||[]).slice(),isXNumeric:!!(null==(i=t.axisFlags)?void 0:i.isXNumeric)}}(a),function(t){const e=t.globals;if(e.prevChromeFrame=null,!e.axisCharts||!h.isBrowser())return;const s=t.dom.baseEl;if(w.elementExists(s))try{const i=ee(s,re,"y");e.prevChromeFrame={xLabels:ee(s,ae,"x"),yLabels:i,vGrid:se(s,oe,"x1"),hGrid:se(s,ne,"y1"),xScale:le(t),yAnchors:ce(t,i)}}catch(t){e.prevChromeFrame=null}}(a),function(t){const e=t.globals;if(e.prevDataLabels=null,!e.axisCharts||!h.isBrowser())return;if(!ye(t))return;const s=t.dom.baseEl;if(w.elementExists(s))try{const t=new Map;s.querySelectorAll(fe).forEach(e=>{const s=e.getAttribute("data:dlKey");if(!s)return;const i=e.querySelector(me);i&&t.set(s,{cx:parseFloat(i.getAttribute("cx")||""),cy:parseFloat(i.getAttribute("cy")||""),val:parseFloat(e.getAttribute("data:dlVal")||"")})}),s.querySelectorAll(be).forEach(e=>{const s=e.getAttribute("data:dlTotalKey");s&&t.set(`total::${s}`,{cx:parseFloat(e.getAttribute("cx")||""),cy:parseFloat(e.getAttribute("cy")||""),val:parseFloat(e.getAttribute("data:dlTotalVal")||"")})}),e.prevDataLabels=t.size?t:null}catch(t){e.prevDataLabels=null}}(a),!a.globals.axisCharts)return void(a.globals.previousPaths=a.seriesData.series);if(!w.elementExists(a.dom.baseEl))return void(a.globals.previousPaths=[]);function r(t,e,s){const i=t[e].childNodes,r={type:s,paths:[],realIndex:t[e].getAttribute("data:realIndex")};for(let t=0;t<i.length;t++)if(i[t].hasAttribute("pathTo")){const e=i[t].getAttribute("pathTo");r.paths.push({d:e,key:i[t].getAttribute("data:pathKey"),fill:i[t].getAttribute("fill"),flip:i[t].classList.contains("apexcharts-flip-y")||i[t].classList.contains("apexcharts-flip-x")})}a.globals.previousPaths.push(r)}a.globals.previousPaths=[];["line","area","bar","rangebar","rangeArea","candlestick","radar"].forEach(t=>{const e=(s=t,a.dom.baseEl.querySelectorAll(`.apexcharts-${s}-series .apexcharts-series`));var s;for(let s=0;s<e.length;s++)r(e,s,t)});const o=a.dom.baseEl.querySelectorAll(`.apexcharts-${a.config.chart.type} .apexcharts-series`);if(o.length>0)for(let r=0;r<o.length;r++){const o=a.dom.baseEl.querySelectorAll(`.apexcharts-${a.config.chart.type} .apexcharts-series[data\\:realIndex='${r}'] rect`),n=[];for(let a=0;a<o.length;a++){const r=t=>o[a].getAttribute(t),l={x:parseFloat(null!=(t=r("x"))?t:"0"),y:parseFloat(null!=(e=r("y"))?e:"0"),width:parseFloat(null!=(s=r("width"))?s:"0"),height:parseFloat(null!=(i=r("height"))?i:"0")};n.push({rect:l,color:o[a].getAttribute("color")})}a.globals.previousPaths.push(n)}}clearPreviousPaths(){const t=this.w;t.globals.previousPaths=[],t.globals.allSeriesCollapsed=!1}handleNoData(){const t=this.w,e=t.config.noData,s=new Mt(this.w);let i=t.globals.svgWidth/2,a=t.globals.svgHeight/2,r="middle";if(t.globals.noData=!0,t.globals.animationEnded=!0,"left"===e.align?(i=10,r="start"):"right"===e.align&&(i=t.globals.svgWidth-10,r="end"),"top"===e.verticalAlign?a=50:"bottom"===e.verticalAlign&&(a=t.globals.svgHeight-50),i+=e.offsetX,a=a+parseInt(e.style.fontSize,10)+2+e.offsetY,void 0!==e.text&&""!==e.text){const o=s.drawText({x:i,y:a,text:e.text,textAnchor:r,fontSize:e.style.fontSize,fontFamily:e.style.fontFamily,foreColor:e.style.color,opacity:1,cssClass:"apexcharts-text-nodata"});t.dom.Paper.add(o)}}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 e=0;e<s.length-1;e++)if(s[e][0]!==s[e+1][0]){t=!1;break}return e.globals.allSeriesHasEqualX=t,t}filteredSeriesX(){return this.w.seriesData.seriesX.map(t=>t.length>0?t:[])}}const De={accent:"--apx-accent",fore:"--apx-fore",grid:"--apx-grid",surface:"--apx-surface"};const Me="__apexcharts_themes__";function Te(){return globalThis[Me]}globalThis[Me]||(globalThis[Me]={});const _e="#373d3f",Le="#f6f7f8",Fe="#e0e0e0";class Ee{constructor(t){this.w=t,this.colors=[],this.isColorFn=!1,this.isHeatmapDistributed=this.checkHeatmapDistributed(),this.isBarDistributed=this.checkBarDistributed(),this._tokens={},this._namedTheme=null}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 w;var i;this._namedTheme=(i=e.config.theme.name)&&Te()[i]||null,this._applyNamedThemeMode(),e.dom.elWrap.classList.add(`apexcharts-theme-${e.config.theme.mode||"light"}`),this._applyModeDefaults(),this._tokens=this._resolveTokens(),this.applyTokenChrome(this._tokens);const a=null==(t=e.config.theme.accessibility)?void 0:t.colorBlindMode;if(a){e.globals.colors=this.getColorBlindColors(a),this.applySeriesColors(e.seriesData.seriesColors,e.globals.colors);const t=e.globals.colors.slice();return this.pushExtraColors(e.globals.colors),this.applyColorTypes(["fill","stroke"],t),this.applyDataLabelsColors(t),this.applyRadarPolygonsColors(),this.applyMarkersColors(t),void("highContrast"===a&&e.dom.elWrap.classList.add("apexcharts-high-contrast"))}const r=[...e.config.colors||e.config.fill.colors||[]];e.globals.colors=this.getColors(r),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)}_applyModeDefaults(){const t=this.w,e=t.config.theme.mode;"dark"===e?(t.config.chart.foreColor===_e&&(t.config.chart.foreColor=Le),"palette1"===t.config.theme.palette&&(t.config.theme.palette="palette4"),t.config.tooltip&&"light"!==t.config.tooltip.theme&&(t.config.tooltip.theme="dark")):"light"===e&&(t.config.chart.foreColor===Le&&(t.config.chart.foreColor=_e),"palette4"===t.config.theme.palette&&(t.config.theme.palette="palette1"))}_applyNamedThemeMode(){const t=this._namedTheme;if(!t)return;const e=this.w.config.theme;t.mode&&!e.mode&&(e.mode=t.mode),!t.accessibility||!t.accessibility.colorBlindMode||e.accessibility&&e.accessibility.colorBlindMode||(e.accessibility=e.accessibility||{},e.accessibility.colorBlindMode=t.accessibility.colorBlindMode),t.monochrome&&t.monochrome.enabled&&!e.monochrome.enabled&&(e.monochrome=n(n({},e.monochrome),t.monochrome))}_resolveTokens(){const t=this._namedTheme&&this._namedTheme.tokens||{},e=this._shouldUseTokens()?function(t){if(!h.isBrowser())return{};const e=t.dom&&(t.dom.elWrap||t.dom.baseEl)||null;if(!e)return{};const s=m.getComputedStyle(e);if(!s||"function"!=typeof s.getPropertyValue)return{};const i=t=>{const e=s.getPropertyValue(t);return e?String(e).trim():""},a={};for(const t in De){const e=i(De[t]);e&&(a[t]=e)}const r=[];for(let t=1;t<=24;t++){const e=i(`--apx-series-${t}`);if(!e)break;r.push(e)}return r.length&&(a.series=r),a}(this.w):{};return n(n({},t),e)}_shouldUseTokens(){return!1!==this.w.config.theme.tokens}applyTokenChrome(t){if(!t)return;const e=this.w;if(!t.fore||e.config.chart.foreColor!==_e&&e.config.chart.foreColor!==Le||(e.config.chart.foreColor=t.fore),t.grid){e.config.grid.borderColor===Fe&&(e.config.grid.borderColor=t.grid);const s=e=>{e&&(e.axisBorder&&e.axisBorder.color===Fe&&(e.axisBorder.color=t.grid),e.axisTicks&&e.axisTicks.color===Fe&&(e.axisTicks.color=t.grid))};s(e.config.xaxis),Array.isArray(e.config.yaxis)?e.config.yaxis.forEach(s):s(e.config.yaxis)}const s=e.globals.tokenSurface,i=e.config.chart.background,a=!i||i===s;if(t.surface){if(a){e.config.chart.background=t.surface,e.globals.tokenSurface=t.surface;const s=e.dom.Paper&&e.dom.Paper.node;s&&s.style&&(s.style.background=t.surface)}}else if(s&&i===s){e.config.chart.background="",e.globals.tokenSurface=void 0;const t=e.dom.Paper&&e.dom.Paper.node;t&&t.style&&(t.style.background="")}}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((t,s)=>{t&&(e[s]=t)})}getMonochromeColors(t,e,s){const{color:i,shadeIntensity:a,shadeTo:r}=t,o=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,n=1/(o/a);let l=0;return Array.from({length:o},()=>{const t="dark"===r?s.shadeColor(-1*l,i):s.shadeColor(l,i);return l+=n,t})}applyColorTypes(t,e){const s=this.w;t.forEach(t=>{s.globals[t].colors=void 0===s.config[t].colors?this.isColorFn?s.config.colors:e:s.config[t].colors.slice(),this.pushExtraColors(s.globals[t].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.config.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 e=a-t.length;for(let s=0;s<e;s++)t.push(t[s])}}getColorBlindColors(t){const e={palette1:["#008FFB","#00A86F","#CA8501","#FF4560","#846DD5"],palette2:["#6978CB","#039DE2","#49A84D","#B39105","#D68000"],palette3:["#209FCC","#648291","#D4526E","#0FA783","#A19285"],palette4:["#2FA59D","#73A20B","#099DE1","#FD5D5D","#648291"],palette5:["#2B908F","#F56566","#2EAB16","#FA4443","#1EA2BD"],palette6:["#449DD1","#F86624","#EA3A4A","#9C63D1","#899E2A"],palette7:["#DF475B","#1B998B","#7E75B7","#F46036","#B1911B"],palette8:["#9C63D1","#F86624","#B38F04","#EA3A4A","#2FA2B3"],palette9:["#98776F","#A19285","#A8705E","#BA6560","#A0927F"],palette10:["#C91EFF","#A94BFD","#6C6AFE","#2983FF","#009ED8"],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({deuteranopia:e.cvdDeuteranopia,protanopia:e.cvdProtanopia,tritanopia:e.cvdTritanopia,highContrast:e.highContrast}[t]||e.palette1).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 t={palette1:["#008FFB","#00A86F","#CA8501","#FF4560","#846DD5"],palette2:["#6978CB","#039DE2","#49A84D","#B39105","#D68000"],palette3:["#209FCC","#648291","#D4526E","#0FA783","#A19285"],palette4:["#2FA59D","#73A20B","#099DE1","#FD5D5D","#648291"],palette5:["#2B908F","#F56566","#2EAB16","#FA4443","#1EA2BD"],palette6:["#449DD1","#F86624","#EA3A4A","#9C63D1","#899E2A"],palette7:["#DF475B","#1B998B","#7E75B7","#F46036","#B1911B"],palette8:["#9C63D1","#F86624","#B38F04","#EA3A4A","#2FA2B3"],palette9:["#98776F","#A19285","#A8705E","#BA6560","#A0927F"],palette10:["#C91EFF","#A94BFD","#6C6AFE","#2983FF","#009ED8"],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"]},e=t[this.w.config.theme.palette]||t.palette1,s=this._tokens||{};if(Array.isArray(s.series)&&s.series.length)return s.series.slice();if(s.accent)return[s.accent,...e];const i=this._namedTheme;return i&&Array.isArray(i.palette)&&i.palette.length?i.palette.slice():e}}class Pe{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,r="middle";if("left"===s.align?(i=10,r="start"):"right"===s.align&&(i=e.globals.svgWidth-10,r="end"),i+=s.offsetX,a=a+parseInt(s.style.fontSize,10)+s.margin/2,void 0!==s.text){const o=new Mt(this.w).drawText({x:i,y:a,text:s.text,textAnchor:r,fontSize:s.style.fontSize,fontFamily:s.style.fontFamily,fontWeight:s.style.fontWeight,foreColor:s.style.color,opacity:1});o.node.setAttribute("class",`apexcharts-${t}-text`),e.dom.Paper.add(o)}}}class Be{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,r=e.dom.baseEl.querySelector(`.apexcharts-${t}-text`);if(null!==r&&!a){const t=r.getBoundingClientRect();s=t.width,i=e.globals.axisCharts?t.height+5:t.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({},w.getBoundingClientRect(e));return null!==e&&!t.config.legend.floating&&t.config.legend.show?this.dCtx.lgRect={x:s.x,y:s.y,height:s.height,width:0===s.height?0:s.width}:this.dCtx.lgRect={x:0,y:0,height:0,width:0},"left"!==t.config.legend.position&&"right"!==t.config.legend.position||1.5*this.dCtx.lgRect.width>t.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}getDatalabelsRect(){const t=this.w,e=[];t.config.series.forEach((s,i)=>{s.data.forEach((s,a)=>{const r=(o=t.seriesData.series[i][a],t.config.dataLabels.formatter(o,{seriesIndex:i,dataPointIndex:a,w:t}));var o;e.push(r)})});const s=w.getLargestStringFromArr(e),i=new Mt(this.w),a=t.config.dataLabels.style,r=i.getTextRects(s,parseInt(a.fontSize).toString(),a.fontFamily);return{width:1.05*r.width,height:r.height}}getLargestStringFromMultiArr(t,e){let s=t;if(this.w.axisFlags.isMultiLineX){const t=e.map(t=>Array.isArray(t)?t.length:1),i=Math.max(...t);s=e[t.indexOf(i)]}return s}getSparklineStrokeInset(){const t=this.w,e=Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width,s=e/2;if(!(t.config.stroke.show&&s>0))return{top:0,bottom:0};const i=t.globals.maxY-t.globals.minY,a=this._getSeriesYExtremes();if(!(this._strokeTracesDataPoints()&&i>0&&a))return{top:s,bottom:s};const r=Math.max(t.globals.svgHeight-e,0),o=r*(t.globals.maxY-a.max)/i,n=r*(a.min-t.globals.minY)/i;return{top:Math.min(Math.max(s-o,0),s),bottom:Math.min(Math.max(s-n,0),s)}}_strokeTracesDataPoints(){const t=this.w;if(!t.globals.axisCharts||t.config.chart.stacked)return!1;const e=["line","area","scatter"];return t.config.series.every(s=>e.includes(s.type||t.config.chart.type))}_getSeriesYExtremes(){let t=1/0,e=-1/0;return this.w.seriesData.series.forEach(s=>{Array.isArray(s)&&s.forEach(s=>{Number.isFinite(s)&&(s<t&&(t=s),s>e&&(e=s))})}),t===1/0?null:{min:t,max:e}}}class Ne{constructor(t){this.w=t.w,this.dCtx=t}getxAxisLabelsCoords(){const t=this.w;let e,s=t.labelData.labels.slice();if(t.config.xaxis.convertedCatToNumeric&&0===s.length&&(s=t.labelData.categoryLabels),t.labelData.timescaleLabels.length>0){const s=this.getxAxisTimeScaleLabelsCoords();e={width:s.width,height:s.height},t.layout.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==t.config.legend.position&&"right"!==t.config.legend.position||t.config.legend.floating?0:this.dCtx.lgRect.width;const i=t.formatters.xLabelFormatter;let a=w.getLargestStringFromArr(s),r=this.dCtx.dimHelpers.getLargestStringFromMultiArr(a,s);t.globals.isBarHorizontal&&(a=t.globals.yAxisScale[0].result.reduce((t,e)=>t.length>e.length?t:e,0),r=a);const o=new A(this.w),n=a;a=o.xLabelFormat(i,a,n,{i:void 0,dateFormatter:new v(this.w).formatDate,w:t}),r=o.xLabelFormat(i,r,n,{i:void 0,dateFormatter:new v(this.w).formatDate,w:t}),(t.config.xaxis.convertedCatToNumeric&&void 0===a||""===String(a).trim())&&(a="1",r=a);const l=new Mt(this.w);let c=l.getTextRects(a,t.config.xaxis.labels.style.fontSize),h=c;if(a!==r&&(h=l.getTextRects(r,t.config.xaxis.labels.style.fontSize)),e={width:c.width>=h.width?c.width:h.width,height:c.height>=h.height?c.height:h.height},e.width*s.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 s=e=>l.getTextRects(e,t.config.xaxis.labels.style.fontSize,t.config.xaxis.labels.style.fontFamily,`rotate(${t.config.xaxis.labels.rotate} 0 0)`,!1);c=s(a),a!==r&&(h=s(r)),e.height=(c.height>h.height?c.height:h.height)/1.5,e.width=c.width>h.width?c.width:h.width}}else t.layout.rotateXLabels=!1}return t.config.xaxis.labels.show||(e={width:0,height:0}),{width:e.width,height:e.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(t=>t.title);let a;const r=w.getLargestStringFromArr(i),o=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,i),n=new Mt(this.w),l=n.getTextRects(r,s);let c=l;return r!==o&&(c=n.getTextRects(o,s)),a={width:l.width>=c.width?l.width:c.width,height:l.height>=c.height?l.height:c.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 i=new Mt(this.w).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=i.width,s=i.height}return{width:e,height:s}}getxAxisTimeScaleLabelsCoords(){const t=this.w;this.dCtx.timescaleLabels=t.labelData.timescaleLabels.slice();const e=this.dCtx.timescaleLabels.map(t=>t.value),s=e.reduce((t,e)=>void 0===t?0:t.length>e.length?t:e,0),i=new Mt(this.w).getTextRects(s,t.config.xaxis.labels.style.fontSize);return 1.05*i.width*e.length>t.layout.gridWidth&&0!==t.config.xaxis.labels.rotate&&(t.globals.overlappingXLabels=!0),i}additionalPaddingXLabels(t){const e=this.w,s=e.globals,i=e.config,a=i.xaxis.type,r=t.width;s.skipLastTimelinelabel=!1,s.skipFirstTimelinelabel=!1;const o=e.config.yaxis[0].opposite&&e.globals.isBarHorizontal,n=t=>{if(this.dCtx.timescaleLabels&&this.dCtx.timescaleLabels.length){const a=this.dCtx.timescaleLabels[0],o=this.dCtx.timescaleLabels[this.dCtx.timescaleLabels.length-1].position+r/1.75-this.dCtx.yAxisWidthRight,n=a.position-r/1.75+this.dCtx.yAxisWidthLeft,l="right"===e.config.legend.position&&this.dCtx.lgRect.width>0?this.dCtx.lgRect.width:0;o>s.svgWidth-e.layout.translateX-l&&(s.skipLastTimelinelabel=!0),n<-(t.show&&!t.floating||"bar"!==i.chart.type&&"candlestick"!==i.chart.type&&"rangeBar"!==i.chart.type&&"boxPlot"!==i.chart.type&&"violin"!==i.chart.type?10:r/1.75)&&(s.skipFirstTimelinelabel=!0)}else"datetime"===a?this.dCtx.gridPad.right<r&&!e.layout.rotateXLabels&&(s.skipLastTimelinelabel=!0):"datetime"!==a&&this.dCtx.gridPad.right<r/2-this.dCtx.yAxisWidthRight&&!e.layout.rotateXLabels&&!e.config.xaxis.labels.trim&&(this.dCtx.xPadRight=r/2+1)},l=(t,e)=>{i.yaxis.length>1&&(t=>-1!==s.collapsedSeriesIndices.indexOf(t))(e)||n(t)};i.yaxis.forEach((t,e)=>{o?(this.dCtx.gridPad.left<r&&(this.dCtx.xPadLeft=r/2+1),this.dCtx.xPadRight=r/2+1):l(t,e)})}}class Re{constructor(t){this.w=t.w,this.dCtx=t}getyAxisLabelsCoords(){const t=this.w,e=[];let s=10;const i=new It(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});return t.config.yaxis.map((a,r)=>{const o={seriesIndex:r,dataPointIndex:-1,w:t},n=t.globals.yAxisScale[r];let l=0;if(!i.isYAxisHidden(r)&&a.labels.show&&void 0!==a.labels.minWidth&&(l=a.labels.minWidth),!i.isYAxisHidden(r)&&a.labels.show&&n.result.length){const i=t.formatters.yLabelFormatters[r],c=n.niceMin===Number.MIN_VALUE?0:n.niceMin;let h=n.result.reduce((t,e)=>{var s,a;return(null==(s=String(i(t,o)))?void 0:s.length)>(null==(a=String(i(e,o)))?void 0:a.length)?t:e},c);h=i(h,o);let d=h;if(void 0!==h&&0!==h.length||(h=n.niceMax),1===String(h).length&&(h+=".0",d=h),t.globals.isBarHorizontal){s=0;const e=t.labelData.labels.slice();h=w.getLargestStringFromArr(e),h=i(h,{seriesIndex:r,dataPointIndex:-1,w:t}),d=this.dCtx.dimHelpers.getLargestStringFromMultiArr(h,e)}const p=new Mt(this.w),g="rotate(".concat(a.labels.rotate," 0 0)"),u=p.getTextRects(h,a.labels.style.fontSize,a.labels.style.fontFamily,g,!1);let x=u;h!==d&&(x=p.getTextRects(d,a.labels.style.fontSize,a.labels.style.fontFamily,g,!1)),e.push({width:(l>x.width||l>u.width?l:x.width>u.width?x.width:u.width)+s,height:x.height>u.height?x.height:u.height})}else e.push({width:0,height:0})}),e}getyAxisTitleCoords(){const t=this.w,e=[];return t.config.yaxis.map(t=>{if(t.show&&void 0!==t.title.text){const s=new Mt(this.w),i="rotate(".concat(t.title.rotate," 0 0)"),a=s.getTextRects(t.title.text,t.title.style.fontSize,t.title.style.fontFamily,i,!1);e.push({width:a.width,height:a.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,r=new It(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale}),o=(o,n)=>{const l=t.config.yaxis[n].floating;let c=0;o.width>0&&!l?(c=o.width+a,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(n)&&(c=c-o.width-a)):c=l||r.isYAxisHidden(n)?0:5,t.config.yaxis[n].opposite?i+=c:s+=c,e+=c};return t.layout.yLabelsCoords.map((t,e)=>{o(t,e)}),t.layout.yTitleCoords.map((t,e)=>{o(t,e)}),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 Ie{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=t=>["bar","rangeBar","candlestick","boxPlot","violin"].includes(t),r=s.chart.type;let o=0,n=a(r)?s.series.length:1;i.comboBarCount>0&&(n=i.comboBarCount),i.collapsedSeries.forEach(t=>{a(t.type)&&(n-=1)}),s.chart.stacked&&(n=1);const l=a(r)||i.comboBarCount>0;let c=Math.abs(i.initialMaxX-i.initialMinX);if(l&&e.axisFlags.isXNumeric&&!i.isBarHorizontal&&n>0&&0!==c){c<=3&&(c=i.dataPoints);const e=c/t;let a=i.minXDiff&&i.minXDiff/e>0?i.minXDiff/e:0;a>t/2&&(a/=2),o=a*parseInt(s.plotOptions.bar.columnWidth,10)/100,o<1&&(o=1),i.barPadForNumericAxis=o}return o}gridPadForStackedTotalDataLabels(){const{w:t}=this,e=t.config.plotOptions.bar.dataLabels.total;if(!t.globals.isBarHorizontal||!t.config.chart.stacked||"100%"!==t.config.chart.stackType||!e.enabled)return;const s=t.seriesData.stackedSeriesTotals||[];if(!s.length)return;const i=e.formatter||t.config.dataLabels.formatter,a=s.map((e,s)=>String(i?i(e,l(n({},t),{seriesIndex:0,dataPointIndex:s,w:t})):e)),r=new Mt(t).getTextRects(w.getLargestStringFromArr(a),parseFloat(e.style.fontSize).toString(),e.style.fontFamily).width+Math.abs(e.offsetX||0)+2;this.dCtx.xPadRight=Math.max(this.dCtx.xPadRight,r)}gridPadFortitleSubtitle(){const{w:t}=this,{globals:e}=t;let s=this.dCtx.isSparkline||!e.axisCharts?0:10;["title","subtitle"].forEach(i=>{void 0!==t.config[i].text?s+=t.config[i].margin:s+=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 i=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),a=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");this.dCtx.titleBlockPad=s,t.layout.gridHeight-=i.height+a.height+s,t.layout.translateY+=i.height+a.height+s}setGridXPosForDualYAxis(t,e){const{w:s}=this,i=new It(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});s.config.yaxis.forEach((a,r)=>{-1!==s.globals.ignoreYAxisIndexes.indexOf(r)||a.floating||i.isYAxisHidden(r)||(a.opposite&&(s.layout.translateX-=e[r].width+t[r].width+parseInt(a.labels.style.fontSize,10)/1.2+12),s.layout.translateX<2&&(s.layout.translateX=2))})}}function Xe(t,e){const s=t.config.drilldown&&t.config.drilldown.breadcrumb||{};return n(n({show:!0,position:"top-left",separator:" / ",rootLabel:"All",offsetX:0,offsetY:0,formatter:void 0},s),e||{})}class ze{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 Be(this),this.dimYAxis=new Re(this),this.dimXAxis=new Ne(this),this.dimGrid=new Ie(this),this.lgWidthForSideLegends=0,this.gridPad=n({},this.w.config.grid.padding),this.xPadRight=0,this.titleBlockPad=0,this.xPadLeft=0,this.datalabelsCoords={width:0,height:0},this.xAxisWidth=0,this.timescaleLabels=[]}plotCoords(){const t=this.w,e=t.globals;if(this.gridPad=n({},t.config.grid.padding),this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0},this.isSparkline){this.w.globals.markers.largestSize>0&&Object.entries(this.gridPad).forEach(([t,e])=>{this.gridPad[t]=Math.max(e,this.w.globals.markers.largestSize/1.5)});const t=this.dimHelpers.getSparklineStrokeInset();this.gridPad.top=Math.max(t.top,this.gridPad.top),this.gridPad.bottom=Math.max(t.bottom,this.gridPad.bottom)}e.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),this.gridPadForBreadcrumb(),this.dimGrid.gridPadForStackedTotalDataLabels(),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 s=this.dimGrid.gridPadForColumnsInNumericAxis(t.layout.gridWidth);return t.layout.gridWidth=t.layout.gridWidth-2*s,t.layout.translateX=t.layout.translateX+this.gridPad.left+this.xPadLeft+(s>0?s: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,gridPad:n({},this.gridPad)}}}gridPadForBreadcrumb(){var t,e,s,i,a,r;const o=this.w,n="treemap"===o.config.chart.type;if(n){const s=null==(e=null==(t=o.config.plotOptions)?void 0:t.treemap)?void 0:e.zoom;if(s&&s.enabled){if(!1===Xe(o,s.breadcrumb).show)return;return void(this.gridPad.top+=22)}}if(!o.globals.axisCharts)return;if(!this.ctx.drilldown)return;if(!o.config.drilldown||!o.config.drilldown.enabled)return;if(!1===Xe(o).show)return;const l=parseFloat(String(null==(r=null==(a=null==(i=null==(s=o.config.yaxis)?void 0:s[0])?void 0:i.labels)?void 0:a.style)?void 0:r.fontSize))||11,c=24+(n?0:Math.ceil(l*I/2)),h=n?0:this.titleBlockPad||0;this.gridPad.top+=Math.max(0,c-h)}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((e,a)=>{t.layout.yLabelsCoords.push({width:s[a].width,index:a}),t.layout.yTitleCoords.push({width:i[a].width,index:a})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();const a=this.dimXAxis.getxAxisLabelsCoords(),r=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(a,o,r),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)||12)/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,l=this.xAxisHeight;t.layout.xAxisLabelsHeight=this.xAxisHeight-o.height,t.layout.xAxisGroupLabelsHeight=t.layout.xAxisLabelsHeight-a.height,t.layout.xAxisLabelsWidth=this.xAxisWidth,t.layout.xAxisHeight=this.xAxisHeight;let c=10;("radar"===t.config.chart.type||this.isSparkline)&&(n=0,l=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===t.config.chart.type)&&(n=0,l=0,c=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-l-(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&&(c=t.layout.xAxisHeight-t.config.xaxis.axisTicks.height-5),t.config.legend.position){case"bottom":t.layout.translateY=c,h();break;case"top":t.layout.translateY=this.lgRect.height+c,h();break;case"left":t.layout.translateY=c,t.layout.translateX=this.lgRect.width+n+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-l-12,t.layout.gridWidth=e.svgWidth-this.lgRect.width-n-2*this.datalabelsCoords.width;break;case"right":t.layout.translateY=c,t.layout.translateX=n+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-l-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 Wt(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;if(t.config.legend.show&&!t.config.legend.floating&&(i=20),"unit"===s.chart.type){const a=s.legend.show&&!s.legend.floating,r=s.legend.position;let o=0,n=0;return a&&("bottom"===r||"top"===r?o=this.lgRect.height:n=this.lgRect.width+i),t.layout.gridWidth=e.svgWidth-n,t.layout.gridHeight=e.svgHeight-o,t.layout.translateX="left"===r?n:0,void(t.layout.translateY="top"===r?o:0)}const a="sunburst"===s.chart.type?"sunburst":"pie"===s.chart.type||"polarArea"===s.chart.type||"donut"===s.chart.type?"pie":"radialBar",r=s.plotOptions[a].offsetY,o=s.plotOptions[a].offsetX;if(!s.legend.show||s.legend.floating){t.layout.gridHeight=e.svgHeight;const s=t.dom.elWrap.getBoundingClientRect().width;return t.layout.gridWidth=Math.min(s,t.layout.gridHeight),t.layout.translateY=r,void(t.layout.translateX=o+(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=r-10,t.layout.translateX=o+(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+r+10,t.layout.translateX=o+(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=r,t.layout.translateX=o+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=r,t.layout.translateX=o+10;break;default:throw new Error("Legend position not supported")}}conditionalChecksForAxisCoords(t,e,s){const i=this.w,a=i.labelData.hasXaxisGroups?2:1,r=s.height+t.height+e.height,o=i.axisFlags.isMultiLineX?1.2:I,n=i.layout.rotateXLabels?22:10,l=i.layout.rotateXLabels&&"bottom"===i.config.legend.position?10:0;this.xAxisHeight=r*o+a*n+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>i.config.xaxis.labels.maxHeight&&(this.xAxisHeight=i.config.xaxis.labels.maxHeight),i.config.xaxis.labels.minHeight&&this.xAxisHeight<i.config.xaxis.labels.minHeight&&(this.xAxisHeight=i.config.xaxis.labels.minHeight),i.config.xaxis.floating&&(this.xAxisHeight=0);let c=0,h=0;i.config.yaxis.forEach(t=>{c+=t.labels.minWidth,h+=t.labels.maxWidth}),this.yAxisWidth<c&&(this.yAxisWidth=c),this.yAxisWidth>h&&(this.yAxisWidth=h)}}const Oe=1e3,Ye=6e4,He=36e5,We=24*He,Ge=7*We,Ue=30*We,$e=365*We,Ve=10/86400,je=[{unit:"second",step:1,approxMs:Oe},{unit:"second",step:5,approxMs:5e3},{unit:"second",step:15,approxMs:15e3},{unit:"second",step:30,approxMs:3e4},{unit:"minute",step:1,approxMs:Ye},{unit:"minute",step:5,approxMs:3e5},{unit:"minute",step:15,approxMs:9e5},{unit:"minute",step:30,approxMs:18e5},{unit:"hour",step:1,approxMs:He},{unit:"hour",step:3,approxMs:3*He},{unit:"hour",step:6,approxMs:6*He},{unit:"hour",step:12,approxMs:12*He},{unit:"day",step:1,approxMs:We},{unit:"day",step:2,approxMs:2*We},{unit:"week",step:1,approxMs:Ge},{unit:"week",step:2,approxMs:2*Ge},{unit:"month",step:1,approxMs:Ue},{unit:"month",step:3,approxMs:7776e6},{unit:"month",step:6,approxMs:15552e6},{unit:"year",step:1,approxMs:$e},{unit:"year",step:2,approxMs:63072e6},{unit:"year",step:5,approxMs:15768e7},{unit:"year",step:10,approxMs:31536e7},{unit:"year",step:25,approxMs:7884e8},{unit:"year",step:50,approxMs:15768e8},{unit:"year",step:100,approxMs:31536e8}];class qe{constructor(t,e){this.w=t,this.ctx=e,this.tickInterval=null,this.timeScaleArray=[],this.utc=t.config.xaxis.labels.datetimeUTC}calculateTimeScaleTicks(t,e){const s=this.w;if(s.globals.allSeriesCollapsed)return s.labelData.labels=[],s.labelData.timescaleLabels=[],this.timeScaleArray=[],[];const i=e-t,a=i/We;s.interact.disableZoomIn=!1,s.interact.disableZoomOut=!1,a<Ve?s.interact.disableZoomIn=!0:a>5e4&&(s.interact.disableZoomOut=!0);const r=Number.isFinite(s.config.xaxis.tickAmount)?s.config.xaxis.tickAmount:10;this.tickInterval=function(t,e){(!Number.isFinite(e)||e<=0)&&(e=10);if(t<=0)return je[0];const s=t/e;let i=je[0],a=1/0;for(const t of je){const e=Math.abs(Math.log(t.approxMs/s));e<a&&(a=e,i=t)}return i}(i,r);const o=this.generateBaseTicks(t,e,this.tickInterval);return this.timeScaleArray=o,o}generateBaseTicks(t,e,s){const i=this.w,a=new v(i),r=this.utc,o=i.layout.gridWidth,n=e-t,l=[];let c=a.ceilToBoundary(t,s.unit,s.step,r),h=0;for(;c<=e&&h<5e3;){const e=a.getDateFields(c,r),i=n>0?(c-t)/n*o:0;l.push({timestamp:c,position:i,unit:s.unit,year:e.year,month:e.month+1,day:e.date,hour:e.hour,minute:e.minute,second:e.second,value:c}),c=a.addInterval(c,s.unit,s.step,r),h++}return l}recalcDimensionsBasedOnFormat(t){const e=this.w,s=this.formatDates(t),i=this.removeOverlappingTS(s);e.labelData.timescaleLabels=i.slice();const a=new ze(this.w,this.ctx).plotCoords();this.ctx._writeLayoutCoords(a.layout)}formatDates(t){const e=this.w,s=new v(e),i=e.config.xaxis.labels.format,a=e.config.xaxis.labels.datetimeFormatter,r=this.utc,o=(t,e=2)=>String(t).padStart(e,"0"),n=i||this._effectiveFormat(t,a);return t.map(t=>{const e=s.getDate(t.timestamp),i=s.formatDate(e,n);return{dateString:`${t.year}-${o(t.month)}-${o(t.day)}T${o(t.hour)}:${o(t.minute)}:${o(t.second)}.000${r?"Z":""}`,position:t.position,value:i,unit:t.unit,year:t.year,month:t.month}})}_effectiveFormat(t,e){if(0===t.length)return e.day||"dd MMM";const s=this.tickInterval&&this.tickInterval.unit||t[0].unit,i=e["week"===s?"day":s]||e.day||"dd MMM",a=t[0],r=t[t.length-1],o=a.year!==r.year,n=o||a.month!==r.month||a.day!==r.day,l=/y/i.test(i),c=/M/.test(i),h=/d/i.test(i);if("month"===s||"week"===s)return o&&!l?i+" yyyy":i;if("day"===s)return o&&!l?i+" yyyy":i;if("hour"===s||"minute"===s||"second"===s){if(n&&!h&&!c){return(o?"dd MMM yyyy":"dd MMM")+" "+i}return i}return i}removeOverlappingTS(t){if(0===t.length)return[];const e=this.w,s=new Mt(e);let i,a=!1;t[0].value&&t.every(e=>e.value.length===t[0].value.length)&&(a=!0,i=s.getTextRects(t[0].value,e.config.xaxis.labels.style.fontSize).width);let r=0;return t.map((o,n)=>{if(0===n)return o;if(!e.config.xaxis.labels.hideOverlappingLabels)return o;const l=a?i:s.getTextRects(t[r].value,e.config.xaxis.labels.style.fontSize).width,c=t[r].position;return o.position>c+l+10?(r=n,o):null}).filter(t=>null!==t)}}const Ze="__apexcharts_registry__",Ke="__apexcharts_custom_types__";function Je(){return globalThis[Ze]}function Qe(){return globalThis[Ke]}function ts(t){return Qe().has(t)}function es(t){Object.assign(Je(),t)}function ss(t){const e=Je()[t];if(!e)throw new Error(`ApexCharts: chart type "${t}" is not registered. Bundler: import 'apexcharts/${t}'. Script tag: add <script src=".../dist/${t}.js"> after apexcharts.core.js, or load the full apexcharts.js instead.`);return e}globalThis[Ze]||(globalThis[Ze]={}),globalThis[Ke]||(globalThis[Ke]=new Set);class is{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","violin","scatter","bubble"],a=[...i,"radar","heatmap","treemap"],r=!a.includes(s)&&!["pie","donut","polarArea","radialBar"].includes(s)&&ts(s);t.axisCharts=a.includes(s)||r,t.xyCharts=i.includes(s)||r,t.isBarHorizontal=["bar","rangeBar","boxPlot","violin"].includes(s)&&e.plotOptions.bar.horizontal,t.chartClass=`.apexcharts${t.chartID}`,this.w.dom.baseEl=this.el,this.w.dom.elWrap=m.createElementNS("http://www.w3.org/1999/xhtml","div"),Mt.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=globalThis.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=m.createElementNS(W,"foreignObject"),Mt.setAttrs(this.w.dom.elLegendForeign,{x:0,y:0,width:t.svgWidth,height:t.svgHeight}),this.w.dom.elLegendWrap=m.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&&e.chart.accessibility.announcements.enabled){const t=m.createElement("div");t.className="apexcharts-sr-status",t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),this.w.dom.elWrap.appendChild(t)}if(e.chart.accessibility.enabled){const t=this.getAccessibleChartLabel(),s=e.chart.accessibility.keyboard.enabled&&e.chart.accessibility.keyboard.navigation.enabled?"application":"img";if(this.w.dom.Paper.attr({role:s,"aria-label":t}),e.chart.accessibility.description){const t=m.createElementNS(W,"desc");t.textContent=e.chart.accessibility.description,this.w.dom.Paper.node.insertBefore(t,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)}_classifySeriesByType(t){const{w:e}=this,{config:s,globals:i}=e,a={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},bar:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},violin:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},r={},o=s.chart.type||"line";let n=null,l=0;return this.w.seriesData.series.forEach((s,i)=>{var c,h;const d="column"===(null==(c=t[i])?void 0:c.type)?"bar":(null==(h=t[i])?void 0:h.type)||("column"===o?"bar":o),p=a;p[d]?("rangeArea"===d?(p[d].series.push(this.w.rangeData.seriesRangeStart[i]),p[d].seriesRangeEnd.push(this.w.rangeData.seriesRangeEnd[i])):p[d].series.push(s),p[d].i.push(i),"bar"===d&&(e.globals.columnSeries=a.bar)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar","unit","sunburst"].includes(d)?n=d:ts(d)&&(r[d]||(r[d]={series:[],i:[]}),r[d].series.push(s),r[d].i.push(i)),o!==d&&"scatter"!==d&&l++}),l>0&&a.bar.series.length>0&&s.plotOptions.bar.horizontal&&(l-=a.bar.series.length,a.bar={series:[],i:[]},e.globals.columnSeries={series:[],i:[]}),i.comboCharts||(i.comboCharts=l>0),{seriesTypes:a,customBuckets:r}}plotChartType(t,e){const{w:s,ctx:i}=this,a=i.renderer&&"canvas"===i.renderer.kind;a&&i.renderer.beginSeries();const{seriesTypes:r,customBuckets:o}=this._classifySeriesByType(t),n=this._instantiateSeriesRenderers(r,e),l=this._assembleSeriesGraphics(r,o,n,e);if(a){const t=i.renderer;if(t&&t._repaintHostInPlace){t._repaintHostInPlace=!1;const e=this.w.dom.elGraphical.node.querySelector(".apexcharts-canvas-series-wrap");if(e&&t.canRepaintInPlace&&t.canRepaintInPlace()){t.repaintInPlace();return(Array.isArray(l)?l:[l]).forEach(t=>{t&&t.node&&e.appendChild(t.node)}),[]}}const e=i.renderer.present();if(e){const t=new Mt(s).group({class:"apexcharts-canvas-series-wrap"});t.add(e);return(Array.isArray(l)?l:[l]).forEach(e=>{e&&t.add(e)}),t}}return l}_instantiateSeriesRenderers(t,e){const{w:s,ctx:i}=this,{config:a,globals:r}=s,o=t.line.series.length>0||t.area.series.length>0||t.scatter.series.length>0||t.bubble.series.length>0||t.rangeArea.series.length>0||!r.comboCharts&&["line","area","scatter","bubble","rangeArea"].includes(a.chart.type)?new(ss("line"))(i.w,i,e):null,n=t.candlestick.series.length>0||t.boxPlot.series.length>0||!r.comboCharts&&["candlestick","boxPlot"].includes(a.chart.type)?new(ss("candlestick"))(i.w,i,e):null,l=t.violin.series.length>0||!r.comboCharts&&"violin"===a.chart.type?new(ss("violin"))(i.w,i,e):null,c=!r.comboCharts&&["pie","donut","polarArea"].includes(a.chart.type);i.pie=c?new(ss("pie"))(i.w,i):null;const h=t.rangeBar.series.length>0||!r.comboCharts&&"rangeBar"===a.chart.type;return i.rangeBar=h?new(ss("rangeBar"))(i.w,i,e):null,{line:o,boxCandlestick:n,violin:l}}_assembleSeriesGraphics(t,e,s,i){const{w:a,ctx:r}=this,{config:o,globals:n}=a,{line:l,boxCandlestick:c,violin:h}=s;let d=[];if(n.comboCharts){const s=new H(this.w);if(t.area.series.length>0&&d.push(...s.drawSeriesByGroup(t.area,n.areaGroups,"area",l)),t.bar.series.length>0)if(o.chart.stacked){const e=new(ss("barStacked"))(r.w,r,i);d.push(e.draw(t.bar.series,t.bar.i))}else r.bar=new(ss("bar"))(r.w,r,i),d.push(r.bar.draw(t.bar.series,t.bar.i));if(t.rangeArea.series.length>0&&d.push(l.draw(t.rangeArea.series,"rangeArea",t.rangeArea.i,t.rangeArea.seriesRangeEnd)),t.line.series.length>0&&d.push(...s.drawSeriesByGroup(t.line,n.lineGroups,"line",l)),t.candlestick.series.length>0&&d.push(c.draw(t.candlestick.series,"candlestick",t.candlestick.i)),t.boxPlot.series.length>0&&d.push(c.draw(t.boxPlot.series,"boxPlot",t.boxPlot.i)),t.violin.series.length>0&&d.push(h.draw(t.violin.series,"violin",t.violin.i)),t.rangeBar.series.length>0&&d.push(r.rangeBar.draw(t.rangeBar.series,t.rangeBar.i)),t.scatter.series.length>0){const e=new(ss("line"))(r.w,r,i,!0);d.push(e.draw(t.scatter.series,"scatter",t.scatter.i))}if(t.bubble.series.length>0){const e=new(ss("line"))(r.w,r,i,!0);d.push(e.draw(t.bubble.series,"bubble",t.bubble.i))}Object.keys(e).forEach(t=>{const s=e[t];if(s.series.length>0){const e=new(ss(t))(r.w,r,i);d.push(e.draw(s.series,t,s.i))}})}else{const t=o.chart.type;switch(t){case"line":d=l.draw(this.w.seriesData.series,"line");break;case"area":d=l.draw(this.w.seriesData.series,"area");break;case"bar":if(o.chart.stacked){const t=new(ss("barStacked"))(r.w,r,i);d=t.draw(this.w.seriesData.series)}else r.bar=new(ss("bar"))(r.w,r,i),d=r.bar.draw(this.w.seriesData.series);break;case"candlestick":d=c.draw(this.w.seriesData.series,"candlestick");break;case"boxPlot":d=c.draw(this.w.seriesData.series,t);break;case"violin":d=h.draw(this.w.seriesData.series,"violin");break;case"rangeBar":d=r.rangeBar.draw(this.w.seriesData.series);break;case"rangeArea":d=l.draw(this.w.rangeData.seriesRangeStart,"rangeArea",void 0,this.w.rangeData.seriesRangeEnd);break;case"heatmap":{const t=new(ss("heatmap"))(r.w,r,i);d=t.draw(this.w.seriesData.series);break}case"treemap":{const t=new(ss("treemap"))(r.w,r);d=t.draw(this.w.seriesData.series);break}case"unit":{const t=new(ss("unit"))(r.w,r);d=t.draw(this.w.seriesData.series);break}case"sunburst":{const t=new(ss("sunburst"))(r.w,r);d=t.draw(this.w.seriesData.series);break}case"pie":case"donut":case"polarArea":d=r.pie.draw(this.w.seriesData.series);break;case"radialBar":{const t=new(ss("radialBar"))(r.w,r);d=t.draw(this.w.seriesData.series);break}case"radar":{const t=new(ss("radar"))(r.w,r);d=t.draw(this.w.seriesData.series);break}default:if(ts(t)){const e=new(ss(t))(r.w,r,i);d=e.draw(this.w.seriesData.series,t)}else d=l.draw(this.w.seriesData.series)}}return d}_extractDimensionUnit(t){return String(t).split(/[0-9]+/g).pop()}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 r=w.getDimensions(this.el);const o=this._extractDimensionUnit(i);"%"===o?w.isNumber(r[0])&&(0===r[0].width&&(r=w.getDimensions(this.el.parentNode)),e.svgWidth=r[0]*parseInt(i,10)/100):"px"!==o&&""!==o||(e.svgWidth=parseInt(i,10));const n=this._extractDimensionUnit(a);if("auto"!==a&&""!==a)if("%"===n){const t=w.getDimensions(this.el.parentNode);e.svgHeight=t[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),Mt.setAttrs(this.w.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==n&&h.isBrowser()){const i=e.axisCharts&&(s.grid.show||s.dataLabels.enabled||s.xaxis.labels.show||s.xaxis.axisBorder.show||s.xaxis.axisTicks.show||s.yaxis.some(t=>t.show&&(t.labels.show||t.axisBorder.show||t.axisTicks.show))),a=s.chart.sparkline.enabled||!i?0:s.chart.parentHeightOffset,r=this.w.dom.Paper.node;(null==(t=r.parentNode)?void 0:t.parentNode)&&(r.parentNode.parentNode.style.minHeight=`${e.svgHeight+a}px`)}this.w.dom.elWrap.style.width=`${e.svgWidth}px`,this.w.dom.elWrap.style.height=`${e.svgHeight}px`,e.lastResizeSignature=this.getResizeSignature()}getResizeSignature(){const{config:t}=this.w,e=(t.chart.width||"100%").toString().trim(),s=(t.chart.height||"auto").toString().trim();let i=0,a=0;if(e.endsWith("%")){let t=w.getDimensions(this.el);t[0]||(t=w.getDimensions(this.el.parentNode)),i=t[0]||0}s.endsWith("%")&&(a=w.getDimensions(this.el.parentNode)[1]||0);const r={w:Math.round(i),h:Math.round(a)};return t.responsive&&t.responsive.length&&h.isBrowser()&&(r.iw=window.innerWidth),r}shiftGraphPosition(){const{globals:t}=this.w,{translateY:e,translateX:s}=t;Mt.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${s}, ${e})`})}resizeNonAxisCharts(){var t,e,s,i,a,r,o,n,l;const{w:c}=this,d=c.config.chart.height?String(c.config.chart.height):"",p=""!==d&&"auto"!==d,g=d.includes("%");let u=0,x=c.config.chart.sparkline.enabled?1:15;x+=c.layout.gridPad.bottom,["top","bottom"].includes(c.config.legend.position)&&c.config.legend.show&&!c.config.legend.floating&&(u=(null!=(e=null==(t=this.ctx.legend)?void 0:t.legendHelpers.getLegendDimensions().clwh)?e:0)+7);const f=c.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie, .apexcharts-sunburst"),m=c.globals.pieExternalLabelMarginY||0;let b=m>0?2*c.globals.radialSize+2*m:2.05*c.globals.radialSize;const y="sunburst"===c.config.chart.type?"sunburst":"pie"===c.config.chart.type||"donut"===c.config.chart.type||"polarArea"===c.config.chart.type?"pie":"radialBar",v=Math.abs(c.config.plotOptions[y].endAngle-c.config.plotOptions[y].startAngle);if(f&&!c.config.chart.sparkline.enabled&&v<360){const t=w.getBoundingClientRect(this.w.dom.Paper.node);let e=1/0,l=-1/0;const d=s=>{var i,a,r,o;if(null==(i=s.classList)?void 0:i.contains("apexcharts-radialbar-hollow"))return;const n=null==(r=null==(a=s.tagName)?void 0:a.toLowerCase)?void 0:r.call(a);if("text"===n||"tspan"===n)return;const c=Array.from(null!=(o=s.children)?o:[]);if(c.length>0)return void c.forEach(t=>d(t));const h=w.getBoundingClientRect(s);if(h.bottom-h.top>0){const s=h.top-t.top,i=h.bottom-t.top;s<e&&(e=s),i>l&&(l=i)}};if(Array.from(null!=(s=f.children)?s:[]).forEach(t=>d(t)),Number.isFinite(e)||(e=0),!Number.isFinite(l)){const e=w.getBoundingClientRect(f);l=e.bottom-t.top}const p=Math.max(x,.2*c.globals.radialSize),m=Math.max(p-e,0);0!==m&&(c.layout.translateY=(null!=(i=c.layout.translateY)?i:0)+m,Mt.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${null!=(a=c.layout.translateX)?a:0}, ${c.layout.translateY})`}),l+=m),b=l>0?l:2.05*c.globals.radialSize;const y=Math.max(p,e),v=Math.ceil(b+u+y),A=null!=(r=c.config.chart.offsetY)?r:0,S=v+Math.max(A,0);if(!g){if(this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(S)),this.w.dom.elWrap.style.height=`${S}px`,Mt.setAttrs(this.w.dom.Paper.node,{height:v}),h.isBrowser()){const t=null==(o=this.w.dom.Paper.node.parentNode)?void 0:o.parentNode;t&&(t.style.minHeight=`${S}px`)}c.globals.svgHeight=v,"bottom"===c.config.legend.position&&c.config.legend.show&&!c.config.legend.floating&&(null==(n=this.ctx.legend)||n.setLegendWrapXY(20,0))}return}const A=Math.ceil(b+this.w.layout.translateY+u+x);if(!p&&(this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(A)),this.w.dom.elWrap.style.height=`${A}px`,Mt.setAttrs(this.w.dom.Paper.node,{height:A}),h.isBrowser())){const t=null==(l=this.w.dom.Paper.node.parentNode)?void 0:l.parentNode;t&&(t.style.minHeight=`${A}px`)}}coreCalculations(){new Yt(this.w).init()}resetGlobals(){const t=()=>this.w.config.series.map(()=>[]),e=new O,{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 Vt(this.w).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new Vt(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 e=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?e=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(e=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(e)}e=new H(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];s.forEach(e=>{const s=t.constructor.getChartByID(e);s&&(s.w.globals.brushSource=this.ctx,"function"!=typeof s.w.config.chart.events.zoomed&&(s.w.config.chart.events.zoomed=()=>this.updateSourceChart(s)),"function"!=typeof s.w.config.chart.events.scrolled&&(s.w.config.chart.events.scrolled=()=>this.updateSourceChart(s)))}),e.config.chart.events.selection=(e,i)=>{s.forEach(e=>{const s=t.constructor.getChartByID(e);s&&s.ctx.updateHelpers._updateOptions({xaxis:{min:i.xaxis.min,max:i.xaxis.max}},!1,!1,!1,!1)})}}}getAccessibleChartLabel(){const t=this.w,e=t.config;if(e.chart.accessibility&&e.chart.accessibility.description)return e.chart.accessibility.description;const s=e.chart.type,i=[];if(e.title.text)i.push(`${e.title.text}. ${s} chart`),e.subtitle.text&&i.push(e.subtitle.text);else{const a=Array.isArray(t.seriesData.seriesNames)&&t.seriesData.seriesNames.length?t.seriesData.seriesNames.filter(Boolean):Array.isArray(e.series)?e.series.map(t=>"object"==typeof t&&null!==t?t.name:null).filter(Boolean):[],r=t.seriesData.series.length||(e.series?e.series.length:0);a.length?i.push(`${s} chart with ${r} data series: ${a.join(", ")}`):i.push(`${s} chart with ${r} data series`)}return i.join(". ")}}const as="__apexcharts_series_transforms__";function rs(t){return t&&globalThis[as][t]||null}function os(t,e,s,i,a,r=null,o={}){var n,l,c;const h=e&&"object"==typeof e,d=h&&null!=(l=null!=(n=e.x)?n:e.name)?l:"",p=Number(h?null!=(c=e.y)?c:e.value:e),g={name:String(d),value:isNaN(p)?null:p,color:h&&e.color?e.color:void 0,_key:`${a}/${s}:${d}`};if(i&&!g.color&&(g.color=i[s%i.length]),o.keepDatum&&(g._datum=e),h&&Array.isArray(e.children)&&e.children.length)g.children=e.children.map((e,s)=>os(t,e,s,null,g._key,r,o));else if(h&&null!=e.drilldown&&!1!==o.expandDrilldown){const s=r||new Set;if(!s.has(e.drilldown)){const i=function(t,e){const s=t.config.drilldown;return(s&&Array.isArray(s.series)?s.series:[]).find(t=>t&&t.id===e)}(t,e.drilldown);if(i&&Array.isArray(i.data)&&i.data.length){const a=new Set(s);a.add(e.drilldown);const r=Array.isArray(i.colors)?i.colors:null;g.children=i.data.map((e,s)=>os(t,e,s,r,g._key,a,o))}}}return g}function ns(t){t.children&&t.children.length&&(t.children.forEach(t=>ns(t)),(null==t.value||isNaN(t.value))&&(t.value=t.children.reduce((t,e)=>t+Math.max(0,e.value||0),0))),(null==t.value||isNaN(t.value))&&(t.value=0)}function ls(t){var e,s,i,a;return!!(null==(a=null==(i=null==(s=null==(e=null==t?void 0:t.config)?void 0:e.plotOptions)?void 0:s.treemap)?void 0:i.nested)?void 0:a.drilldownAsLevels)}function cs(t,e){var s,i,a;const r=null==(a=null==(i=null==(s=null==t?void 0:t.config)?void 0:s.plotOptions)?void 0:i.treemap)?void 0:a.nested;return(!r||!1!==r.enabled)&&function(t,e={}){if(!Array.isArray(t))return!1;const s=!1!==e.drilldown;for(let e=0;e<t.length;e++){const i=t[e]&&t[e].data;if(Array.isArray(i))for(let t=0;t<i.length;t++){const e=i[t];if(e&&"object"==typeof e){if(Array.isArray(e.children)&&e.children.length)return!0;if(s&&null!=e.drilldown)return!0}}}return!1}(e,{drilldown:ls(t)})}function hs(t){const e=t._datum;if(e&&"object"==typeof e){const s=l(n({},e),{x:t.name,y:t.value});return delete s.children,s}return{x:t.name,y:t.value}}function ds(t,e){const s=function(t,e,s={}){const i=e||t.config.series;return Array.isArray(i)?i.map((e,i)=>{var a,r;const o=e&&Array.isArray(e.data)?e.data:[],n=`${i}:${null!=(a=null==e?void 0:e.name)?a:""}`;return{name:String(null!=(r=null==e?void 0:e.name)?r:""),value:null,color:(null==e?void 0:e.color)||void 0,_key:n,_seriesIndex:i,children:o.map((e,i)=>os(t,e,i,null,n,null,s))}}):[]}(t,e,{keepDatum:!0,expandDrilldown:ls(t)});s.forEach(ns);const{leaves:i,maxDepth:a}=function(t){const e=[];let s=0;return t.forEach((t,i)=>{const a=[],r=(t,e,o)=>{t._parent=o,t._depth=e,t._si=i,t._leaf=!(t.children&&t.children.length),e>s&&(s=e),t._leaf?(t._di=a.length,a.push(t)):(t._di=-1,t.children.forEach(s=>r(s,e+1,t)))};r(t,0,null),e.push(a)}),{leaves:e,maxDepth:s}}(s);return{roots:s,leafSeries:e.map((t,e)=>l(n({},t),{data:(i[e]||[]).map(hs)})),maxDepth:a}}globalThis[as]||(globalThis[as]={});const ps=["histogram"];class gs{constructor(t,{resetGlobals:e=()=>{},isMultipleY:s=()=>{}}={}){this.w=t,this.resetGlobals=e,this.isMultipleY=s,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this._warnedMissingTransform=!1,this.coreUtils=new H(this.w),this.activeSeriesIndex=0}getFirstDataPoint(){const t=this.w.config.series,e=new ke(this.w);this.activeSeriesIndex=e.getActiveConfigSeriesIndex();const s=t[this.activeSeriesIndex];return s&&s.data&&s.data.length>0&&null!==s.data[0]&&void 0!==s.data[0]?s.data[0]:null}isMultiFormat(){return this.isFormatXY()||this.isFormat2DArray()}isFormatXY(){var t;const e=this.getFirstDataPoint();if(!e||void 0===e.x)return!1;const s=null==(t=this.w.config.series[this.activeSeriesIndex])?void 0:t.data;if(s){const t=t=>t&&void 0!==t.x;for(let e=1;e<Math.min(3,s.length)&&!0===t(s[e]);e++);}return!0}isFormat2DArray(){const t=this.getFirstDataPoint();return t&&Array.isArray(t)}_fast2DArrayParse(t,e){var s,i;const a=t.length;if(0===a)return!1;const r=new Array(a),o=new Array(a);let n=-Number.MAX_VALUE,l=Number.MAX_VALUE,c=1/0,h=!1,d=0,p=!0,g=1/0,u=-1/0,x=!0,f=1/0,m=NaN;for(let e=0;e<a;e++){const s=t[e];if(!Array.isArray(s)||s.length>2)return!1;const i=s[0],a=s[1];if(p)if("number"==typeof i){i==i&&(i<g&&(g=i),i>u&&(u=i));const t=i-m;t>0?t<f&&(f=t):t<0&&(x=!1),m=i}else p=!1;if("number"==typeof a)if(a==a&&a!==1/0&&a!==-1/0){if(a>n&&(n=a),a<l&&(l=a),a<0&&a<c&&(c=a),!Number.isInteger(a)){const t=a<0?-a:a;if(t>=1e-6&&t<1e21){const t=""+a,e=t.indexOf("."),s=-1===e?0:t.length-e-1;s>d&&(d=s)}else{const t=w.noExponents(a);w.isFloat(t)&&(d=Math.max(d,t.toString().split(".")[1].length))}}}else h=!0;else{if(null!==a)return!1;h=!0}r[e]=a,o[e]=i}this.twoDSeries=r,this.twoDSeriesX=o,this.w.axisFlags.dataFormatXNumeric=!0;return(null!=(i=(s=this.w.seriesData)._parsedExtrema)?i:s._parsedExtrema=[])[e]={ref:r,len:a,maxY:n,lowestY:l,negMinY:c,hasNulls:h,yDec:d,xref:o,xNumeric:p,minX:g,maxX:u,xSorted:x,minXDiff:f},!0}handleFormat2DArray(t,e){const s=this.w.config,i=t[e].data,a="boxPlot"===s.chart.type||"boxPlot"===s.series[e].type;if(a||"datetime"===s.xaxis.type||!this._fast2DArrayParse(i,e))for(let t=0;t<i.length;t++){const e=i[t],r=e[0],o=e[1],n=e[2];if(void 0!==o&&(Array.isArray(o)&&4===o.length&&!a?this.twoDSeries.push(w.parseNumber(o[3])):e.length>=5?this.twoDSeries.push(w.parseNumber(e[4])):this.twoDSeries.push(w.parseNumber(o)),this.w.axisFlags.dataFormatXNumeric=!0),"datetime"===s.xaxis.type){const t=new Date(r).getTime();this.twoDSeriesX.push(t)}else this.twoDSeriesX.push(r);void 0!==n&&(this.threeDSeries.push(n),this.w.axisFlags.isDataXYZ=!0)}}handleFormatXY(t,e){const s=this.w.config,i=this.w.globals,a=new v(this.w),r=t[e].data;let o=e;i.collapsedSeriesIndices.indexOf(e)>-1&&(o=this.activeSeriesIndex);const n=t[o].data;for(let t=0;t<r.length;t++){const s=r[t];if(void 0!==s.y){const t=Array.isArray(s.y)?w.parseNumber(s.y[s.y.length-1]):w.parseNumber(s.y);this.twoDSeries.push(t)}void 0===this.seriesGoals[e]&&(this.seriesGoals[e]=[]),void 0!==s.goals&&Array.isArray(s.goals)?this.seriesGoals[e].push(s.goals):this.seriesGoals[e].push(null),void 0!==s.z&&(this.threeDSeries.push(s.z),this.w.axisFlags.isDataXYZ=!0)}for(let t=0;t<n.length;t++){const e=n[t].x,r="string"==typeof e,o=Array.isArray(e),l=!o&&!!a.isValidDate(e);if(r||l)if(r||s.xaxis.convertedCatToNumeric){const t=i.isBarHorizontal&&this.w.axisFlags.isRangeData;"datetime"!==s.xaxis.type||t?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e),isNaN(e)||"category"===this.w.config.xaxis.type||"string"==typeof e||(this.w.axisFlags.isXNumeric=!0)):this.twoDSeriesX.push(a.parseDate(e))}else"datetime"===s.xaxis.type?this.twoDSeriesX.push(e instanceof Date?e.getTime():a.parseDate(e.toString())):(this.w.axisFlags.dataFormatXNumeric=!0,this.w.axisFlags.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(e)));else o?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e)):(this.w.axisFlags.isXNumeric=!0,this.w.axisFlags.dataFormatXNumeric=!0,this.twoDSeriesX.push(e))}}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(t=>{t&&t.forEach(t=>{const e=t.y,s=e.length;if(!(s<=1))for(let i=0;i<s;i++){const a=e[i],r=a.y1,o=a.y2;for(let n=i+1;n<s;n++){const s=e[n],i=s.y1;if(r<=s.y2&&i<=o){const e=t;e.overlaps.add(a.rangeName),e.overlaps.add(s.rangeName)}}}})}),s}handleCustomRangeData(t,e,s){const i=t[e].data||[],a=[],r=[];for(let t=0;t<i.length;t++){const e=i[t];let o,n;if("function"==typeof s){let i=s(e,t);Array.isArray(i)||(i=[i]);const a=i.map(t=>w.parseNumber(t)).filter(t=>null!==t&&!isNaN(t));o=a.length?Math.min(...a):null,n=a.length?Math.max(...a):null}else{const t=null==e?null:e.y;Array.isArray(t)?(o=w.parseNumber(t[0]),n=w.parseNumber(t[t.length-1])):o=n=w.parseNumber(t)}a.push(o),r.push(n)}this.w.rangeData.seriesRangeStart[e]=a,this.w.rangeData.seriesRangeEnd[e]=r}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,this.w.candleData.seriesBoxPoints[e]=s.points||[],s}handleViolinData(t,e){var s,i,a,r,o,n;const l=this.w,c=t[e].data,h=[],d=[],p=[],g=[],u=[];for(let t=0;t<c.length;t++){const e=c[t],l=null!=(a=null!=(i=null==(s=null==e?void 0:e.y)?void 0:s.density)?i:null==e?void 0:e[1])?a:[],x=null!=(n=null!=(o=null==(r=null==e?void 0:e.y)?void 0:r.points)?o:null==e?void 0:e[2])?n:[],f=[],m=[];let b=0,y=null,v=1/0,A=-1/0;for(let t=0;t<l.length;t++){const e=w.parseNumber(l[t][0]),s=w.parseNumber(l[t][1]);null!==e&&null!==s&&(f.push(e),m.push(s),s>b&&(b=s,y=e),e<v&&(v=e),e>A&&(A=e))}const S=[];for(let t=0;t<x.length;t++){const e=w.parseNumber(x[t]);null!==e&&(S.push(e),e<v&&(v=e),e>A&&(A=e))}h.push({values:f,weights:m,maxWeight:b}),d.push(S),p.push(v===1/0?0:v),g.push(A===-1/0?0:A),u.push(null!==y?y:S.length?S[Math.floor(S.length/2)]:0)}l.violinData.seriesViolinDensity[e]=h,l.violinData.seriesViolinPoints[e]=d,l.violinData.seriesViolinMin[e]=p,l.violinData.seriesViolinMax[e]=g,this.twoDSeries=u}handleRangeDataFormat(t,e,s){const i=[],a=[],r=new Map,o=[];if(e[s].data.forEach(t=>{if(!r.has(t.x)){const e={x:t.x,overlaps:new Set,y:[]};r.set(t.x,e),o.push(e)}}),"array"===t)for(let t=0;t<e[s].data.length;t++)Array.isArray(e[s].data[t])?(i.push(e[s].data[t][1][0]),a.push(e[s].data[t][1][1])):(i.push(e[s].data[t]),a.push(e[s].data[t]));else if("xy"===t)for(let t=0;t<e[s].data.length;t++){const o=Array.isArray(e[s].data[t].y),n=w.randomId(),l=e[s].data[t].x,c={y1:o?e[s].data[t].y[0]:e[s].data[t].y,y2:o?e[s].data[t].y[1]:e[s].data[t].y,rangeName:n},h=this.w.globals;h.seriesRangeName||(h.seriesRangeName={}),h.seriesRangeName[s]||(h.seriesRangeName[s]={}),h.seriesRangeName[s][t]=n;const d=r.get(l);d&&d.y.push(c),i.push(c.y1),a.push(c.y2)}return{start:i,end:a,rangeUniques:o}}handleCandleStickBoxDataFormat(t,e,s){const i=this.w,a="boxPlot"===i.config.chart.type||"boxPlot"===i.config.series[s].type,r=[],o=[],n=[],l=[],c=[],h=[],d=e[s].data;let p;if("array"===t){const t=d[0];p=a&&t&&6===t.length||!a&&t&&5===t.length?t=>t.slice(1):t=>Array.isArray(t[1])?t[1]:[]}else p=t=>Array.isArray(t.y)?t.y:[];for(let t=0;t<d.length;t++){const e=p(d[t]);e&&e.length>=2&&(r.push(e[0]),o.push(e[1]),a?(n.push(e[2]),l.push(e[3]),c.push(e[4])):(l.push(e[2]),c.push(e[3])));const s=d[t]&&d[t].points;h.push(Array.isArray(s)?s:[])}return{o:r,h:o,m:n,l:l,c:c,points:h}}parseDataAxisCharts(t){var e,s,i,a,r,o;const c=this.w.config,h=this.w.globals,d=new v(this.w);this.w.seriesData._parsedExtrema=[];const p=c.labels.length>0?c.labels.slice():c.xaxis.categories.slice();this.w.axisFlags.isRangeBar="rangeBar"===c.chart.type&&h.isBarHorizontal,this.w.labelData.hasXaxisGroups="category"===c.xaxis.type&&c.xaxis.group.groups.length>0,this.w.labelData.hasXaxisGroups&&(this.w.labelData.groups=c.xaxis.group.groups),t.forEach((t,e)=>{void 0!==t.name?this.w.seriesData.seriesNames.push(t.name):this.w.seriesData.seriesNames.push("series-"+parseInt(String(e+1),10))}),this.coreUtils.setSeriesYAxisMappings();const g=[],u=[...new Set(c.series.map(t=>t.group))];c.series.forEach((t,e)=>{const s=u.indexOf(t.group);g[s]||(g[s]=[]),g[s].push(this.w.seriesData.seriesNames[e])}),this.w.labelData.seriesGroups=g;const x=()=>{for(let t=0;t<p.length;t++)if("string"==typeof p[t]){if(!d.isValidDate(p[t]))throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");this.twoDSeriesX.push(d.parseDate(p[t]))}else this.twoDSeriesX.push(p[t])};for(let d=0;d<t.length;d++){this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],void 0===t[d].data&&(t[d]=l(n({},t[d]),{data:[]}));const g=c.chart.dataReducer,u=null==(s=null==(e=h.dataReducerRawSeries)?void 0:e[d])?void 0:s.data;if((null==g?void 0:g.enabled)&&this.isMultiFormat()&&Array.isArray(u)&&u.length>(null!=(i=g.threshold)?i:500)){const e=null!=(a=g.targetPoints)?a:250,s=c.xaxis.min,i=c.xaxis.max,h=null==s&&null==i?u:gs.sliceByXRange(u,s,i);let p=h;if(h.length>e){const t=Array.isArray(h[0])?null==(o=h[0])?void 0:o[1]:null==(r=h[0])?void 0:r.y;Array.isArray(t)?4===t.length?p=gs.ohlcAggregate(h,e):2===t.length&&(p=gs.rangeAggregate(h,e)):p=gs.lttbDownsample(h,e)}t[d]=l(n({},t[d]),{data:p})}"rangeBar"!==c.chart.type&&"rangeArea"!==c.chart.type&&"rangeBar"!==t[d].type&&"rangeArea"!==t[d].type||(this.w.axisFlags.isRangeData=!0,this.handleRangeData(t,d));const f=t[d].type||c.chart.type;if(ts(f)){const e=ss(f),s=e&&e.yExtent;(e&&"rangeXY"===e.dataType||"function"==typeof s)&&(this.w.axisFlags.isRangeData=!0,this.handleCustomRangeData(t,d,s))}if(this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(t,d):this.isFormatXY()&&this.handleFormatXY(t,d),"candlestick"!==c.chart.type&&"candlestick"!==t[d].type&&"boxPlot"!==c.chart.type&&"boxPlot"!==t[d].type||this.handleCandleStickBoxData(t,d),"violin"!==c.chart.type&&"violin"!==t[d].type||this.handleViolinData(t,d),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,d!==this.activeSeriesIndex||this.fallbackToCategory||(this.w.axisFlags.isXNumeric=!0);else{"datetime"===c.xaxis.type?(this.w.axisFlags.isXNumeric=!0,x(),this.w.seriesData.seriesX.push(this.twoDSeriesX)):"numeric"===c.xaxis.type&&(this.w.axisFlags.isXNumeric=!0,p.length>0&&(this.twoDSeriesX=p,this.w.seriesData.seriesX.push(this.twoDSeriesX))),this.w.labelData.labels.push(this.twoDSeriesX);const e=t[d].data.map(t=>w.parseNumber(t));this.w.seriesData.series.push(e)}this.w.seriesData.seriesZ.push(this.threeDSeries),void 0!==t[d].color?this.w.seriesData.seriesColors.push(t[d].color):this.w.seriesData.seriesColors.push(void 0)}return this.w}parseDataNonAxisCharts(t){const e=this.w.config;this.w.seriesData.unitData=[];const s=Array.isArray(t)&&t.every(t=>"number"==typeof t)&&e.labels.length>0,i=Array.isArray(t)&&t.some(t=>t&&"object"==typeof t&&t.data||t&&"object"==typeof t&&t.parsing);if("unit"===e.chart.type&&i&&!s)return this.parseUnitSeries(t);if(s){this.w.seriesData.series=t.slice(),this.w.seriesData.seriesNames=e.labels.slice();for(let t=0;t<this.w.seriesData.series.length;t++)void 0===this.w.seriesData.seriesNames[t]&&this.w.seriesData.seriesNames.push("series-"+(t+1));return this.w}if(Array.isArray(t)&&t.every(t=>"number"==typeof t)){this.w.seriesData.series=t.slice(),this.w.seriesData.seriesNames=[];for(let t=0;t<this.w.seriesData.series.length;t++)this.w.seriesData.seriesNames.push(e.labels[t]||`series-${t+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(t=>{const e=w.parseNumber(t);return e}));for(let t=0;t<this.w.seriesData.series.length;t++)void 0===this.w.seriesData.seriesNames[t]&&this.w.seriesData.seriesNames.push("series-"+(t+1));return this.w}parseUnitSeries(t){const e=this.w.config,s=[],i=[],a=[];return t.forEach((t,r)=>{var o;const n=t&&Array.isArray(t.data)?t.data:[];s.push(n.length);const l=t&&void 0!==t.name&&null!==t.name?t.name:void 0;i.push(null!=(o=null!=l?l:e.labels[r])?o:`series-${r+1}`),a.push(n.slice())}),this.w.seriesData.series=s,this.w.seriesData.seriesNames=i,this.w.seriesData.unitData=a,this.w}resetParsingFlags(){const t=this.w;t.axisFlags.dataWasParsed=!1,t.globals.originalSeries=null,t.config.series&&t.config.series.forEach(t=>{t.__apexParsed&&delete t.__apexParsed})}extractPieDataFromSeries(t){const e=[],s=[];if(!Array.isArray(t))return{values:[],labels:[]};if(0===t.length)return{values:[],labels:[]};const i=t[0];return"object"==typeof i&&null!==i&&i.data?(this.extractPieDataFromSeriesObjects(t,e,s),{values:e,labels:s}):{values:[],labels:[]}}extractPieDataFromSeriesObjects(t,e,s){t.forEach((t,i)=>{t.data&&Array.isArray(t.data)&&t.data.forEach(t=>{"object"==typeof t&&null!==t&&void 0!==t.x&&void 0!==t.y&&(s.push(String(t.x)),e.push(w.parseNumber(t.y)))})})}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(t=>{t.forEach(t=>{this.w.labelData.labels.indexOf(t.x)<0&&t.x&&this.w.labelData.labels.push(t.x)})});const t=this.w.labelData.labels;if(t.length>0&&("number"==typeof t[0]||"string"==typeof t[0]))this.w.labelData.labels=[...new Set(t)];else{const e=new Map;for(const s of t){const t=JSON.stringify(s);e.has(t)||e.set(t,s)}this.w.labelData.labels=Array.from(e.values())}}if(e.xaxis.convertedCatToNumeric){new N(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 t=s.series.map(t=>{const e=new Map;for(const s of t.data)e.has(s.x)||e.set(s.x,s);return Array.from(e.values())}),e=t.reduce((t,e,s,i)=>i[t].length>e.length?t:s,0);for(let s=0;s<t[e].length;s++)i.push(s+1)}else for(let t=0;t<this.w.seriesData.series[e.maxValsInArrayIndex].length;t++)i.push(t+1);this.w.seriesData.seriesX=[];for(let e=0;e<t.length;e++)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((t,e)=>e+1);for(let e=0;e<t.length;e++)this.w.seriesData.seriesX.push(i)}this.w.labelData.labels=i,s.xaxis.convertedCatToNumeric&&(this.w.labelData.categoryLabels=i.map(t=>s.xaxis.labels.formatter(t))),this.w.axisFlags.noLabelsProvided=!0}parseRawDataIfNeeded(t){const e=this.w.config,s=this.w.globals,i=e.parsing;if(this.w.axisFlags.dataWasParsed)return t;const a=!(!i||!(i.x||i.y||i.z)),r=t.some(t=>t.parsing&&(t.parsing.x||t.parsing.y||t.parsing.z));if(!a&&!r)return t;const o=t.map((t,e)=>{var s,a,r,o;if(!t.data||!Array.isArray(t.data)||0===t.data.length)return t;const c={x:(null==(s=t.parsing)?void 0:s.x)||(null==i?void 0:i.x),y:(null==(a=t.parsing)?void 0:a.y)||(null==i?void 0:i.y),z:(null==(r=t.parsing)?void 0:r.z)||(null==i?void 0:i.z)};if(!c.x&&!c.y)return t;const h=t.data[0];if("object"==typeof h&&null!==h&&(Object.prototype.hasOwnProperty.call(h,"x")||Object.prototype.hasOwnProperty.call(h,"y"))||Array.isArray(h))return t;if(!c.x||!c.y||Array.isArray(c.y)&&0===c.y.length){const e=[];c.x||e.push("x"),(!c.y||Array.isArray(c.y)&&0===c.y.length)&&e.push("y");o=t.name;return t}const d=t.data.map((t,e)=>{if("object"!=typeof t||null===t)return t;const s=this.getNestedValue(t,c.x);let i,a;if(Array.isArray(c.y)){const e=c.y.map(e=>this.getNestedValue(t,e));"bubble"===this.w.config.chart.type?(e.length,i=e[0]):i=e}else i=this.getNestedValue(t,c.y);c.z&&(a=this.getNestedValue(t,c.z));const r={x:s,y:i,z:void 0};if("bubble"===this.w.config.chart.type&&Array.isArray(c.y)&&2===c.y.length){const e=this.getNestedValue(t,c.y[1]);void 0!==e&&(r.z=e)}return void 0!==a&&(r.z=a),r});return l(n({},t),{data:d,__apexParsed:!0})});return this.w.axisFlags.dataWasParsed=!0,s.originalSeries||(s.originalSeries=w.clone(t)),o}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 t=0;t<s.length;t++){if(null==i||"object"!=typeof i)return;i=i[s[t]]}return i}applySeriesTransform(t){const e=this.w.config,s=e.chart.requestedType||e.chart.type,i=rs(s);return i?i(t,this.w):Array.isArray(t)&&-1!==ps.indexOf(s)?(this._warnedMissingTransform||(this._warnedMissingTransform=!0),t.map(t=>l(n({},t),{data:[]}))):t}flattenTreemapHierarchy(t){const e=this.w,s=e.globals;if("treemap"!==e.config.chart.type||!Array.isArray(t))return t;if(!s.treemapRawSeries){if(!cs(e,t))return s.treemapRoots=null,t;s.treemapRawSeries=t.map(t=>l(n({},t),{data:Array.isArray(null==t?void 0:t.data)?t.data.slice():null==t?void 0:t.data}))}const{roots:i,leafSeries:a,maxDepth:r}=ds(e,s.treemapRawSeries);return s.treemapRoots=i,s.treemapMaxDepth=r,a}expandScatterJitterData(t){var e,s;const i=this.w.config,a="scatter"===i.chart.type||"bubble"===i.chart.type,r=null==(s=null==(e=i.plotOptions)?void 0:e.scatter)?void 0:s.jitter;if(!(a&&r&&r.enabled&&Array.isArray(t)))return t;if(!t.some(t=>Array.isArray(null==t?void 0:t.data)&&t.data.some(t=>t&&!Array.isArray(t)&&Array.isArray(t.y))))return"datetime"!==i.xaxis.type&&(Array.isArray(i.xaxis.categories)&&i.xaxis.categories.length?this._applyBandAxis(i.xaxis.categories.slice()):Array.isArray(i.xaxis._scatterBandLabels)&&i.xaxis._scatterBandLabels.length&&this._applyBandAxis(i.xaxis._scatterBandLabels)),t;const o=[],c=new Map;t.forEach(t=>{Array.isArray(null==t?void 0:t.data)&&t.data.forEach(t=>{if(t&&Array.isArray(t.y)){const e=String(t.x);c.has(e)||(c.set(e,o.length),o.push(t.x))}})});const h=r.maxPoints||5e3,d=t.map(t=>{if(!Array.isArray(null==t?void 0:t.data))return t;const e=[];return t.data.forEach(t=>{if(t&&Array.isArray(t.y)){const s=c.get(String(t.x)),i=t.y,a=i.length>h?Math.ceil(i.length/h):1;for(let t=0;t<i.length;t+=a){const a=w.parseNumber(i[t]);null!==a&&e.push({x:s,y:a})}}else if(t&&"object"==typeof t&&!Array.isArray(t)){const s=String(t.x);e.push({x:c.has(s)?c.get(s):t.x,y:t.y})}else e.push(t)}),l(n({},t),{data:e})});return this._applyBandAxis(o),d}_applyBandAxis(t){var e;const s=this.w.config.xaxis,i=t.length;if(!i)return;const a=s._scatterBand=s._scatterBand||{};if(s._scatterBandLabels=t.slice(),s.type="numeric",(null==(e=this.w.interact)?void 0:e.zoomed)&&"number"==typeof s.min&&"number"==typeof s.max&&isFinite(s.min)&&isFinite(s.max)){const t=t=>Math.max(0,Math.min(i-1,t));let e=t(Math.round(s.min+.49)),r=t(Math.round(s.max-.49));r<e&&(e=r=t(Math.round((s.min+s.max)/2))),s.min=e-1,s.max=r+1,s.tickAmount=r-e+2,a.min=!0,a.max=!0,a.tick=!0}else(null==s.min||a.min)&&(s.min=-1,a.min=!0),(null==s.max||a.max)&&(s.max=i,a.max=!0),(null==s.tickAmount||"dataPoints"===s.tickAmount||a.tick)&&(s.tickAmount=i+1,a.tick=!0);s.labels=s.labels||{};const r=s.labels.formatter;if("function"!=typeof r||r._scatterBand){const e=e=>{const s=Math.round(e);return Math.abs(e-s)<1e-6&&void 0!==t[s]?t[s]:""};e._scatterBand=!0,s.labels.formatter=e}}parseData(t){var e,s,i,a,r,o,c;const h=this.w,d=h.config,p=h.globals;if(t=this.parseRawDataIfNeeded(t),t=this.applySeriesTransform(t),t=this.expandScatterJitterData(t),t=this.flattenTreemapHierarchy(t),(null==(e=d.chart.dataReducer)?void 0:e.enabled)&&p.axisCharts&&!p.dataReducerRawSeries){p.dataReducerRawSeries=t.map(t=>({data:Array.isArray(null==t?void 0:t.data)?t.data.slice():null==t?void 0:t.data}));let e=1/0,o=-1/0;for(const n of t){const t=null==n?void 0:n.data;if(!Array.isArray(t)||0===t.length)continue;const l=!Array.isArray(t[0]),c=l?null==(s=t[0])?void 0:s.x:null==(i=t[0])?void 0:i[0],h=l?null==(a=t[t.length-1])?void 0:a.x:null==(r=t[t.length-1])?void 0:r[0];"number"==typeof c&&(e=Math.min(e,c)),"number"==typeof h&&(o=Math.max(o,h))}e!==1/0&&(p.dataReducerRawMinX=e,p.dataReducerRawMaxX=o)}if(p.dataReducerRawSeries&&(null==(o=d.chart.dataReducer)?void 0:o.enabled)&&(t=t.map(t=>n({},t))),d.series=t,p.dataReducerRawSeries&&(null==(c=d.chart.dataReducer)?void 0:c.enabled)){const e=p.dataReducerRawSeries;p.initialSeries=t.map((t,s)=>{var i,a,r;return l(n({},t),{data:null!=(r=null==(a=null==(i=e[s])?void 0:i.data)?void 0:a.slice())?r:t.data})})}else p.histogramRawSeries?p.initialSeries=p.histogramRawSeries:p.treemapRawSeries?p.initialSeries=p.treemapRawSeries:p.initialSeries=t;if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.resetGlobals(),this.isMultipleY(),p.axisCharts?(this.parseDataAxisCharts(t),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(t),d.chart.stacked){const t=new ke(this.w);this.w.seriesData.series=t.setNullSeriesToZeroValues(this.w.seriesData.series)}this.coreUtils.getSeriesTotals(),p.axisCharts?(gs._defineLazyResult(this.w.seriesData,"stackedSeriesTotals",()=>this.coreUtils.getStackedSeriesTotals()),gs._defineLazyResult(this.w.seriesData,"stackedSeriesTotalsByGroups",()=>this.coreUtils.getStackedSeriesTotalsByGroups()),gs._defineLazyResult(p,"seriesPercent",()=>(this.coreUtils.getPercentSeries(),p.seriesPercent))):this.coreUtils.getPercentSeries(),this.w.axisFlags.dataFormatXNumeric||this.w.axisFlags.isXNumeric&&("numeric"!==d.xaxis.type||0!==d.labels.length||0!==d.xaxis.categories.length)||this.handleExternalLabelsData(t);const g=this.coreUtils.getCategoryLabels(this.w.labelData.labels);for(let t=0;t<g.length;t++)if(Array.isArray(g[t])){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,unitData:this.w.seriesData.unitData,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,seriesBoxPoints:this.w.candleData.seriesBoxPoints},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 _defineLazyResult(t,e,s){let i,a=!1;Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:()=>(a||(a=!0,i=s()),i),set(t){a=!0,i=t}})}static sliceByXRange(t,e,s){const i=t.length;if(0===i)return t;const a=!Array.isArray(t[0])?t=>t.x:t=>t[0];let r=0;if(null!=e){let s=0,o=i-1;for(;s<=o;){const i=s+o>>1;a(t[i])<e?s=i+1:o=i-1}r=Math.max(0,s-1)}let o=i;if(null!=s){let e=0,r=i-1;for(;e<=r;){const i=e+r>>1;a(t[i])>s?r=i-1:e=i+1}o=Math.min(i,e+1)}return 0===r&&o===i?t.slice():t.slice(r,o)}static lttbDownsample(t,e){const s=t.length;if(e>=s||e<3)return t;const i=!Array.isArray(t[0]),a=i?t=>t.x:t=>t[0],r=i?t=>t.y:t=>t[1],o=[];o.push(t[0]);const n=(s-2)/(e-2);let l=0;for(let i=0;i<e-2;i++){const e=Math.floor((i+1)*n)+1,c=Math.min(Math.floor((i+2)*n)+1,s);let h=0,d=0;const p=c-e;for(let s=e;s<c;s++)h+=a(t[s]),d+=r(t[s]);h/=p,d/=p;const g=Math.floor(i*n)+1,u=Math.min(Math.floor((i+1)*n)+1,s),x=a(t[l]),f=r(t[l]);let m=-1,b=g;for(let e=g;e<u;e++){const s=.5*Math.abs((x-h)*(r(t[e])-f)-(x-a(t[e]))*(d-f));s>m&&(m=s,b=e)}o.push(t[b]),l=b}return o.push(t[s-1]),o}static ohlcAggregate(t,e){const s=t.length;if(e>=s||e<1)return t;const i=!Array.isArray(t[0]),a=i?t=>t.x:t=>t[0],r=i?t=>t.y:t=>t[1],o=i?(t,e)=>({x:t,y:e}):(t,e)=>[t,e],n=[],l=s/e;for(let i=0;i<e;i++){const c=Math.floor(i*l),h=i===e-1?s:Math.floor((i+1)*l);if(h<=c)continue;const d=r(t[c]),p=d[0];let g=d[1],u=d[2],x=d[3];for(let e=c+1;e<h;e++){const s=r(t[e]);s[1]>g&&(g=s[1]),s[2]<u&&(u=s[2]),x=s[3]}n.push(o(a(t[c]),[p,g,u,x]))}return n}static rangeAggregate(t,e){const s=t.length;if(e>=s||e<1)return t;const i=!Array.isArray(t[0]),a=i?t=>t.x:t=>t[0],r=i?t=>t.y:t=>t[1],o=i?(t,e)=>({x:t,y:e}):(t,e)=>[t,e],n=[],l=s/e;for(let i=0;i<e;i++){const c=Math.floor(i*l),h=i===e-1?s:Math.floor((i+1)*l);if(h<=c)continue;let d=1/0,p=-1/0;for(let e=c;e<h;e++){const s=r(t[e]);if(null!=s)for(let t=0;t<2;t++){const e=s[t];null!=e&&isFinite(e)&&(e<d&&(d=e),e>p&&(p=e))}}n.push(o(a(t[c]),d===1/0?[null,null]:[d,p]))}return n}excludeCollapsedSeriesInYAxis(){const t=this.w,e=[];t.globals.seriesYAxisMap.forEach((s,i)=>{let a=0;s.forEach(e=>{-1!==t.globals.collapsedSeriesIndices.indexOf(e)&&a++}),a>0&&a==s.length&&e.push(i)}),t.globals.ignoreYAxisIndexes=e.map(t=>t)}}class us{constructor(t,e){this.w=t,this.ctx=e}_updateOptions(t,e=!1,s=!0,i=!0,a=!1){return new Promise((r,o)=>{let n=[this.ctx];i&&(n=this.ctx.getSyncedCharts()),this.w.globals.isExecCalled&&(n=[this.ctx],this.w.globals.isExecCalled=!1),n.forEach((i,l)=>{var c,h;const d=i.w;d.globals.shouldAnimate=s,e||(d.globals.resized=!0,d.globals.dataChanged=!0,s&&d.config.chart.animations.enabled&&i.series.getPreviousPaths());const p=d.config.chart.requestedType||d.config.chart.type;if(s&&t&&"object"==typeof t){const e=null==(c=null==t?void 0:t.chart)?void 0:c.type;e&&e!==p&&(null==(h=i.morphTypeChange)||h.captureBeforeDestroy({fromType:p,toType:e,newSeries:t.series||d.config.series}))}if(t&&"object"==typeof t){i.config=new R(t);const e=t.chart&&t.chart.type,s="funnel"===e||"pyramid"===e||"gauge"===e,r=!!d.config.chart.requestedType;if(e&&!s&&r){t.chart=t.chart||{},t.chart.requestedType=e;const s=d.config.chart.requestedType;"funnel"!==s&&"pyramid"!==s||(t.plotOptions=t.plotOptions||{},t.plotOptions.bar=t.plotOptions.bar||{},void 0===t.plotOptions.bar.isFunnel&&(t.plotOptions.bar.isFunnel=!1),void 0===t.plotOptions.bar.isPyramid&&(t.plotOptions.bar.isPyramid=!1))}i.config.normalizeAliasedChartType(t),t=H.extendArrayProps(i.config,t,d),i.w.globals.chartID!==this.w.globals.chartID&&(delete t.series,delete t.yaxis),d.config=w.extend(d.config,t),N.handOverTypeDefaults(d.config,p,t),a&&(d.globals.lastXAxis=t.xaxis?w.clone(t.xaxis):[],d.globals.lastYAxis=t.yaxis?w.clone(t.yaxis):[],d.globals.initialConfig=w.extend({},d.config),d.globals.initialSeries=d.config.series),t.series&&(d.globals.collapsedSeriesIndices.length>0||d.globals.ancillaryCollapsedSeriesIndices.length>0)&&i.series.reconcileCollapsedByName()}return i.update(t).then(()=>{l===n.length-1&&r(i)}).catch(o)})})}_updateSeries(t,e,s=!1){return new Promise((i,a)=>{const r=this.w;r.globals.shouldAnimate=e,r.globals.dataChanged=!0;const o=JSON.stringify({y:(r.globals.yAxisScale||[]).map(t=>t?t.result:null),xMin:r.globals.minX,xMax:r.globals.maxX});Rt.invalidateSelectors(r),e&&r.config.chart.animations.enabled&&this.ctx.series.getPreviousPaths();const n=r.config.series.length,l=r.config.series.map(t=>{var e,s;return null!=(s=null==(e=null==t?void 0:t.data)?void 0:e.length)?s:0});s&&(r.globals.dataReducerRawSeries=null,r.globals.histogramRawSeries=null,r.globals.treemapRawSeries=null),this.ctx.data.resetParsingFlags();const c=this.ctx.data.parseData(t);return this.ctx._writeParsedSeriesData(c.seriesData),this.ctx._writeParsedRangeData(c.rangeData),this.ctx._writeParsedCandleData(c.candleData),this.ctx._writeParsedLabelData(c.labelData),this.ctx._writeParsedAxisFlags(c.axisFlags),s&&(r.globals.initialConfig&&(r.globals.initialConfig.series=r.config.series),r.globals.initialSeries=r.config.series),this._canUseFastPath(t,n,l,r)?this.ctx.fastUpdate(e,o).then(()=>{i(this.ctx)}).catch(a):(this.ctx._updateStats&&this.ctx._updateStats.full++,this.ctx.update().then(()=>{i(this.ctx)}).catch(a))})}_canUseFastPath(t,e,s,i){return!!i.dom.elGraphical&&(!!i.globals.axisCharts&&(t.length===e&&(!t.some((t,e)=>{var i,a;return(null!=(a=null==(i=null==t?void 0:t.data)?void 0:i.length)?a:0)!==s[e]})&&(!(i.globals.collapsedSeries.length>0)&&(!(i.globals.ancillaryCollapsedSeries.length>0)&&(!(i.globals.risingSeries.length>0)&&(!i.globals.comboCharts&&!i.interact.zoomed)))))))}_extendSeries(t,e){const s=this.w,i=s.config.series[e];return l(n({},s.config.series[e]),{name:t.name?t.name:null==i?void 0:i.name,color:t.color?t.color:null==i?void 0:i.color,type:t.type?t.type:null==i?void 0:i.type,group:t.group?t.group:null==i?void 0:i.group,hidden:void 0!==t.hidden?t.hidden:null==i?void 0:i.hidden,data:t.data?t.data:null==i?void 0:i.data,zIndex:void 0!==t.zIndex?t.zIndex:e})}toggleDataPointSelection(t,e){const s=this.w;let i=null;const a=`.apexcharts-series[data\\:realIndex='${t}']`;if(s.globals.axisCharts?i=s.dom.Paper.findOne(`${a} path[j='${e}'], ${a} circle[j='${e}'], ${a} rect[j='${e}']`):void 0===e&&(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)return null;new Mt(this.w).pathMouseDown(i,null);return i.node?i.node:null}forceXAxisUpdate(t){const e=this.w;if(["min","max"].forEach(s=>{void 0!==t.xaxis[s]&&(e.config.xaxis[s]=t.xaxis[s],e.globals.lastXAxis[s]=t.xaxis[s])}),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric){const e=new N(t);t=e.convertCatToNumericXaxis(t,this.ctx)}return 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;const r=t=>{if(void 0!==i[t]){const s=i[t];e.config.yaxis[t].min=s.min,e.config.yaxis[t].max=s.max}};e.config.yaxis.map((t,s)=>{e.interact.zoomed||void 0!==i[s]?r(s):void 0!==this.ctx.opts.yaxis[s]&&(t.min=this.ctx.opts.yaxis[s].min,t.max=this.ctx.opts.yaxis[s].max)})}}class xs{static xRatio(t){const e=t.layout.gridWidth||1;return(t.globals.maxX-t.globals.minX)/e}static dataXToPx(t,e){return(e-t.globals.minX)/xs.xRatio(t)}static pxToDataX(t,e){return t.globals.minX+e*xs.xRatio(t)}static screenXToPlotPx(t,e){const s=t.dom.baseEl,i=s&&s.querySelector(".apexcharts-svg");if(!i)return e-t.layout.translateX;const a=i.getBoundingClientRect(),r=t.globals.svgWidth?a.width/t.globals.svgWidth:1;return(e-a.left)/(r||1)-t.layout.translateX}}class fs{constructor(t){this.w=t.w,this.ttCtx=t}static hoverTarget(t){return t?(t.eventPhase&&t.target&&(t.apexHoverTarget=t.target),t.apexHoverTarget||t.target):null}getNearestValues({hoverArea:t,elGrid:e,clientX:s,clientY:i}){var a,r;const o=this.w,n=e.getBoundingClientRect(),l=o.layout.gridWidth,c=n.height;let h=l/(o.globals.dataPoints-1);const d=c/o.globals.dataPoints,p=this.hasBars();!o.globals.comboCharts&&!p||o.config.xaxis.convertedCatToNumeric||(h=l/o.globals.dataPoints);const g=xs.screenXToPlotPx(o,s),u=i-n.top,x=o.globals.barPadForNumericAxis||0;g<-x||u<0||g>l+x||u>c?(t.classList.remove("hovering-zoom"),t.classList.remove("hovering-pan")):o.interact.zoomEnabled?(t.classList.remove("hovering-pan"),t.classList.add("hovering-zoom")):o.interact.panEnabled&&(t.classList.remove("hovering-zoom"),t.classList.add("hovering-pan"));let f=Math.round(g/h);const m=Math.floor(u/d);p&&!o.config.xaxis.convertedCatToNumeric&&(f=Math.ceil(g/h),f-=1);let b=null,y=null,v=o.globals.seriesXvalues.map(t=>t.filter(t=>w.isNumber(t)));const A=o.globals.seriesYvalues.map(t=>t.filter(t=>w.isNumber(t)));return o.axisFlags.isXNumeric&&(y=this.closestInMultiArray(g,u,v,A),b=y.index,f=null!=(a=y.j)?a:0,null!==b&&o.globals.hasNullValues&&(v=o.globals.seriesXvalues[b],y=this.closestInArray(g,v),f=null!=(r=y.j)?r:0)),o.interact.capturedSeriesIndex=null===b?-1:b,(!f||f<1)&&(f=0),o.globals.isBarHorizontal?o.interact.capturedDataPointIndex=m:o.interact.capturedDataPointIndex=f,{capturedSeries:b,j:o.globals.isBarHorizontal?m:f,hoverX:g,hoverY:u}}getFirstActiveXArray(t){const e=this.w;let s=0;const i=t.map((t,e)=>t.length>0?e:-1);for(let t=0;t<i.length;t++)if(-1!==i[t]&&-1===e.globals.collapsedSeriesIndices.indexOf(t)&&-1===e.globals.ancillaryCollapsedSeriesIndices.indexOf(t)){s=i[t];break}return s}closestInMultiArray(t,e,s,i){const a=this.w,r=t=>-1===a.globals.collapsedSeriesIndices.indexOf(t)&&-1===a.globals.ancillaryCollapsedSeriesIndices.indexOf(t),o=a.config.chart.type,n=!a.globals.comboCharts&&("line"===o||"area"===o);let l=1/0,c=null,h=null;if(a.globals.allSeriesHasEqualX){let a=1/0;for(let e=0;e<s.length;e++){if(!r(e))continue;const o=s[e],n=i[e],l=Math.min(o.length,n.length);for(let e=0;e<l;e++){const s=Math.abs(t-o[e]);s<a&&(a=s,h=e)}}if(null!==h)if(n){let a=1/0;for(let o=0;o<s.length;o++){if(!r(o))continue;const n=s[o],l=i[o],d=Math.min(n.length,l.length);if(d<2){const t=l[h];if("number"!=typeof t)continue;const s=Math.abs(e-t);s<a&&(a=s,c=o);continue}for(let s=0;s<d-1;s++){const i=this._distanceToSegment(t,e,n[s],l[s],n[s+1],l[s+1]);i.dist<a&&(a=i.dist,c=o)}}}else{let t=1/0;for(let a=0;a<s.length;a++){if(!r(a))continue;const s=i[a][h];if("number"!=typeof s)continue;const o=Math.abs(e-s);o<t&&(t=o,c=a)}}return{index:c,j:h}}for(let a=0;a<s.length;a++){if(!r(a))continue;const o=s[a],d=i[a],p=Math.min(o.length,d.length);if(n&&p>=2)for(let s=0;s<p-1;s++){const i=this._distanceToSegment(t,e,o[s],d[s],o[s+1],d[s+1]);i.dist<l&&(l=i.dist,c=a,h=i.t<.5?s:s+1)}else for(let s=0;s<p;s++){const i=t-o[s],r=e-d[s],n=Math.sqrt(i*i+r*r);n<l&&(l=n,c=a,h=s)}}return{index:c,j:h}}_distanceToSegment(t,e,s,i,a,r){const o=a-s,n=r-i,l=o*o+n*n;let c=0===l?0:((t-s)*o+(e-i)*n)/l;c<0?c=0:c>1&&(c=1);const h=t-(s+c*o),d=e-(i+c*n);return{dist:Math.sqrt(h*h+d*d),t:c}}closestInArray(t,e){const s=e[0];let i=null,a=Math.abs(t-s);for(let s=0;s<e.length;s++){const r=Math.abs(t-e[s]);r<a&&(a=r,i=s)}return{j:i}}isXoverlap(t){const e=[],s=this.w.seriesData.seriesX.filter(t=>void 0!==t[0]);if(s.length>0)for(let i=0;i<s.length-1;i++)void 0!==s[i][t]&&void 0!==s[i+1][t]&&s[i][t]!==s[i+1][t]&&e.push("unEqual");return 0===e.length}isInitialSeriesSameLen(){var t,e,s,i;let a=!0;const r=(null==(e=null!=(t=this.w.globals._initialSeriesPeek)?t:this.w.globals.initialSeries)?void 0:e.filter((t,e)=>{var s;return!(null==(s=this.w.globals.collapsedSeriesIndices)?void 0:s.includes(e))}))||[];for(let t=0;t<r.length-1;t++){if(!(null==(s=r[t])?void 0:s.data)||!(null==(i=r[t+1])?void 0:i.data))return!0;if(r[t].data.length!==r[t+1].data.length){a=!1;break}}return a}getBarsHeight(t){return[...t].reduce((t,e)=>t+e.getBBox().height,0)}getElMarkers(t){return"number"==typeof t?this.w.dom.baseEl.querySelectorAll(`.apexcharts-series[data\\:realIndex='${t}'] .apexcharts-series-markers-wrap > *`):this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}getAllMarkers(t=!1){let e=[...this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap")];t&&(e=e.filter(t=>{const e=Number(t.getAttribute("data:realIndex"));return-1===this.w.globals.collapsedSeriesIndices.indexOf(e)})),e.sort((t,e)=>{var s=Number(t.getAttribute("data:realIndex")),i=Number(e.getAttribute("data:realIndex"));return i<s?1:i>s?-1:0});const s=[];return e.forEach(t=>{s.push(t.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 Mt(this.w).getMarkerPath(s,i,a,e)}getElBars(){return this.w.dom.baseEl.querySelectorAll(".apexcharts-bar-series,  .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-violin-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 s=0;s<i.length;s++)"enable"===t?(i[s].classList.add("apexcharts-active"),i[s].style.display=e.config.tooltip.items.display):(i[s].classList.remove("apexcharts-active"),i[s].style.display="none")}}class ms{constructor(t){this.w=t.w,this.ttCtx=t,this.tooltipUtil=new fs(t)}drawSeriesTexts({shared:t=!0,ttItems:e,i:s=0,j:i=null,y1:a,y2:r,e:o}){const n=this.w;void 0!==n.config.tooltip.custom?this.handleCustomTooltip({i:s,j:i,y1:a,y2:r,w:n}):this.toggleActiveInactiveSeries(t,s);const l=this.getValuesToPrint({i:s,j:i});this.printLabels({i:s,j:i,values:l,ttItems:e,shared:t,e:o});const c=this.ttCtx.getElTooltip();c&&(this.ttCtx.tooltipRect.ttWidth=c.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=c.getBoundingClientRect().height)}printLabels({i:t,j:e,values:s,ttItems:i,shared:a,e:r}){const o=this.w,{xVal:n,zVal:l,xAxisTTVal:c}=s,h=o.seriesData.series.length,d=null!==e&&o.config.plotOptions.bar.distributed?o.globals.colors[e]:o.globals.colors[t];for(let s=0;s<h;s++){const p=o.config.tooltip.inverseOrder?h-1-s:s,g=this.computeSeriesRow({i:t,j:e,t:s,tIndex:p,shared:a,e:r,basePColor:d});this.DOMHandling({i:t,t:p,j:e,ttItems:i,values:{val:g.val,goalVals:g.goalVals,xVal:n,xAxisTTVal:c,zVal:l},seriesName:g.seriesName,shared:a,pColor:g.pColor})}}computeSeriesRow({i:t,j:e,tIndex:s,shared:i,e:a,basePColor:r}){const o=this.w;let c,h=this.getFormatters(t),d=r,p=[],g="treemap"===o.config.chart.type?h.yLbTitleFormatter(String(o.config.series[t].data[e].x),{series:o.seriesData.series,seriesIndex:t,dataPointIndex:e,w:o}):this.getSeriesName({fn:h.yLbTitleFormatter,index:t,seriesIndex:t,j:e});return o.globals.axisCharts&&(i?(h=this.getFormatters(s),g=this.getSeriesName({fn:h.yLbTitleFormatter,index:s,seriesIndex:t,j:e}),d=o.globals.colors[s],c=this.formatYValue(h,s,e),p=this.formatGoalVals(h,s,e)):(d=this.resolvePatternColor(a,d),c=this.formatYValue(h,t,e),p=this.formatGoalVals(h,t,e))),null===e&&(c=h.yLbFormatter(o.seriesData.series[t],l(n({},o),{seriesIndex:t,dataPointIndex:t}))),{seriesName:g,val:c,goalVals:p,pColor:d}}formatYValue(t,e,s){var i,a,r,o;const n=this.w;return n.axisFlags.isRangeData?t.yLbFormatter(null==(a=null==(i=n.rangeData.seriesRangeStart)?void 0:i[e])?void 0:a[s],{series:n.rangeData.seriesRangeStart,seriesIndex:e,dataPointIndex:s,w:n})+" - "+t.yLbFormatter(null==(o=null==(r=n.rangeData.seriesRangeEnd)?void 0:r[e])?void 0:o[s],{series:n.rangeData.seriesRangeEnd,seriesIndex:e,dataPointIndex:s,w:n}):t.yLbFormatter(n.seriesData.series[e][s],{series:n.seriesData.series,seriesIndex:e,dataPointIndex:s,w:n})}formatGoalVals(t,e,s){var i;const a=this.w,r=null==(i=a.seriesData.seriesGoals[e])?void 0:i[s];return Array.isArray(r)?r.map(i=>({attrs:i,val:t.yLbFormatter(i.value,{seriesIndex:e,dataPointIndex:s,w:a})})):[]}resolvePatternColor(t,e){var s,i,a,r;const o=this.w,n=null==(i=null==(s=fs.hoverTarget(t))?void 0:s.getAttribute)?void 0:i.call(s,"fill");if(!n)return e;if(-1===n.indexOf("url"))return n;if(-1===n.indexOf("Pattern"))return e;const l=o.dom.baseEl.querySelector(n.substr(4).slice(0,-1));return null!=(r=null==(a=null==l?void 0:l.childNodes[0])?void 0:a.getAttribute("stroke"))?r:e}getFormatters(t){const e=this.w;let s,i=e.formatters.yLabelFormatters[t];return void 0!==e.formatters.ttVal?Array.isArray(e.formatters.ttVal)?(i=e.formatters.ttVal[t]&&e.formatters.ttVal[t].formatter,s=e.formatters.ttVal[t]&&e.formatters.ttVal[t].title&&e.formatters.ttVal[t].title.formatter):(i=e.formatters.ttVal.formatter,"function"==typeof e.formatters.ttVal.title.formatter&&(s=e.formatters.ttVal.title.formatter)):s=e.config.tooltip.y.title.formatter,"function"!=typeof i&&(i=e.formatters.yLabelFormatters[0]?e.formatters.yLabelFormatters[0]:function(t){return t}),"function"!=typeof s&&(s=function(t){return t?t+": ":""}),{yLbFormatter:i,yLbTitleFormatter:s}}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:t,j:e,ttItems:s,values:i,seriesName:a,shared:r,pColor:o}){const n=this.w,l=this.ttCtx,{val:c,goalVals:h,xVal:d,xAxisTTVal:p,zVal:g}=i;if(!s||!s[t])return;let u=null;u=s[t].children,n.config.tooltip.fillSeriesColor&&(s[t].style.backgroundColor=o,u[0].style.display="none"),l.showTooltipTitle&&(null===l.tooltipTitle&&(l.tooltipTitle=n.dom.baseEl.querySelector(".apexcharts-tooltip-title")),l.tooltipTitle&&(l.tooltipTitle.innerHTML=d)),l.isXAxisTooltipEnabled&&l.xaxisTooltipText&&(l.xaxisTooltipText.innerHTML=""!==p?p:d);const x=s[t].querySelector(".apexcharts-tooltip-text-y-label");x&&(x.innerHTML=a||"");const f=s[t].querySelector(".apexcharts-tooltip-text-y-value");f&&(f.innerHTML=void 0!==c?c:""),u[0]&&u[0].classList.contains("apexcharts-tooltip-marker")&&(n.config.tooltip.marker.fillColors&&Array.isArray(n.config.tooltip.marker.fillColors)&&(o=n.config.tooltip.marker.fillColors[t]),n.config.tooltip.fillSeriesColor?u[0].style.backgroundColor=o:u[0].style.color=o),n.config.tooltip.marker.show||(u[0].style.display="none");const m=s[t].querySelector(".apexcharts-tooltip-text-goals-label"),b=s[t].querySelector(".apexcharts-tooltip-text-goals-value");if(h.length&&n.seriesData.seriesGoals[t]){const s=()=>{let t="<div>",e="<div>";h.forEach(s=>{t+=` <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: ${s.attrs.strokeColor}; height: 3px; border-radius: 0; top: 5px;"></span> ${s.attrs.name}</div>`,e+=`<div>${s.val}</div>`}),m.innerHTML=t+"</div>",b.innerHTML=e+"</div>"};r?n.seriesData.seriesGoals[t][e]&&Array.isArray(n.seriesData.seriesGoals[t][e])?s():(m.innerHTML="",b.innerHTML=""):s()}else m.innerHTML="",b.innerHTML="";if(null!==g){s[t].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=n.config.tooltip.z.title;s[t].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==g?g:""}if(r&&u[0]){if(n.config.tooltip.hideEmptySeries){const e=s[t].querySelector(".apexcharts-tooltip-marker"),i=s[t].querySelector(".apexcharts-tooltip-text");0==parseFloat(c)?(e.style.display="none",i.style.display="none"):(e.style.display="block",i.style.display="block")}null==c||n.globals.ancillaryCollapsedSeriesIndices.indexOf(t)>-1||n.globals.collapsedSeriesIndices.indexOf(t)>-1||Array.isArray(l.tConfig.enabledOnSeries)&&-1===l.tConfig.enabledOnSeries.indexOf(t)?u[0].parentNode.style.display="none":u[0].parentNode.style.display=n.config.tooltip.items.display}else Array.isArray(l.tConfig.enabledOnSeries)&&-1===l.tConfig.enabledOnSeries.indexOf(t)&&(u[0].parentNode.style.display="none")}toggleActiveInactiveSeries(t,e){const s=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");const t=s.dom.baseEl.querySelector(`.apexcharts-tooltip-series-group-${e}`);if(t){const e=t;e.classList.add("apexcharts-active"),e.style.display=s.config.tooltip.items.display}}}getValuesToPrint({i:t,j:e}){var s,i,a,r,o,n,l,c;const h=this.w,d=h.seriesData.seriesX.map(t=>t.length>0?t:[]);let p="",g="",u=null,x=null;const f={series:h.seriesData.series,seriesIndex:t,dataPointIndex:e,w:h},m=h.formatters.ttZFormatter;if(null===e)x=h.seriesData.series[t];else if(h.axisFlags.isXNumeric&&"treemap"!==h.config.chart.type){if(p=d[t][e],0===d[t].length){p=d[this.tooltipUtil.getFirstActiveXArray(d)][e]}}else{p=new gs(this.w).isFormatXY()?void 0!==h.config.series[t].data[e]?h.config.series[t].data[e].x:"":void 0!==h.labelData.labels[e]?h.labelData.labels[e]:""}const b=p;if(h.axisFlags.isXNumeric&&"datetime"===h.config.xaxis.type){p=new A(this.w).xLabelFormat(h.formatters.ttKeyFormatter,b,b,{i:void 0,dateFormatter:new v(this.w).formatDate,w:this.w})}else p=h.globals.isBarHorizontal?h.formatters.yLabelFormatters[0](b,f):null!=(a=null==(i=(s=h.formatters).xLabelFormatter)?void 0:i.call(s,b,f))?a:b;return void 0!==h.config.tooltip.x.formatter&&(p=null!=(n=null==(o=(r=h.formatters).ttKeyFormatter)?void 0:o.call(r,b,f))?n:b),h.seriesData.seriesZ.length>0&&h.seriesData.seriesZ[t].length>0&&(u=null==m?void 0:m(h.seriesData.seriesZ[t][e],h)),g="function"==typeof h.config.xaxis.tooltip.formatter?null==(c=(l=h.formatters).xaxisTooltipFormatter)?void 0:c.call(l,b,f):p,{val:Array.isArray(x)?x.join(" "):x,xVal:Array.isArray(p)?p.join(" "):p,xAxisTTVal:Array.isArray(g)?g.join(" "):g,zVal:u}}handleCustomTooltip({i:t,j:e,y1:s,y2:i,w:a}){const r=this.ttCtx.getElTooltip();let o=a.config.tooltip.custom;if(Array.isArray(o)&&(o=o[t]),"function"!=typeof o)return;const n=o({series:a.seriesData.series,seriesIndex:t,dataPointIndex:e,y1:s,y2:i,w:a});if(r){const t=r.querySelector(".apexcharts-tooltip-arrow");"string"==typeof n||"number"==typeof n?r.innerHTML=String(n):null!=n&&(n instanceof Element||"string"==typeof n.nodeName)&&(r.innerHTML="",r.appendChild(n.cloneNode(!0))),t&&r.appendChild(t)}}}class bs{constructor(t){this.ttCtx=t,this.w=t.w}moveXCrosshairs(t,e=null){const s=this.ttCtx,i=this.w,a=s.getElXCrosshairs();let r=t-s.xcrosshairsWidth/2;const o=i.labelData.labels.slice().length;if(null!==e&&(r=i.layout.gridWidth/o*e),null===a||i.globals.isBarHorizontal||(a.setAttribute("x",String(r)),a.setAttribute("x1",String(r)),a.setAttribute("x2",String(r)),a.setAttribute("y2",String(i.layout.gridHeight)),a.classList.add("apexcharts-active")),r<0&&(r=0),r>i.layout.gridWidth&&(r=i.layout.gridWidth),s.isXAxisTooltipEnabled){let t=r;"tickWidth"!==i.config.xaxis.crosshairs.width&&"barWidth"!==i.config.xaxis.crosshairs.width||(t=r+s.xcrosshairsWidth/2),this.moveXAxisTooltip(t)}}moveYCrosshairs(t){const e=this.ttCtx;null!==e.ycrosshairs&&Mt.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&Mt.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 r=a.xaxisOffY+i.config.xaxis.tooltip.offsetY+i.layout.translateY+5+i.config.xaxis.offsetY;if(t-=a.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(t)){t+=i.layout.translateX;const o=new Mt(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=o.width+"px"),a.xaxisTooltip.style.left=t+"px",a.xaxisTooltip.style.top=r+"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 r=parseInt(null!=(s=null==(e=a.ycrosshairsHidden)?void 0:e.getAttribute("y1"))?s:"0",10);let o=i.layout.translateY+r;if(a.yaxisTTEls){const e=a.yaxisTTEls[t].getBoundingClientRect(),s=e.height;let r;const n=i.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-texts-g`),l=i.dom.elWrap.getBoundingClientRect();if(n){const t=n.getBoundingClientRect();if(t.width>0){r=t.left+t.width/2-l.left-e.width/2}}if(null==r){const s=4;r=i.config.yaxis[t].opposite?i.globals.translateYAxisX[t]+s:i.globals.translateYAxisX[t]-e.width-s}o-=s/2,-1===i.globals.ignoreYAxisIndexes.indexOf(t)&&o>0&&o<i.layout.gridHeight?(a.yaxisTTEls[t].classList.add("apexcharts-active"),a.yaxisTTEls[t].style.top=o+"px",a.yaxisTTEls[t].style.left=r+i.config.yaxis[t].tooltip.offsetX+"px"):a.yaxisTTEls[t].classList.remove("apexcharts-active")}}moveTooltip(t,e,s=null){const i=this.ttCtx.getElTooltip();if(!i)return;const a=this.computeTooltipPosition(t,e,s);null!==a&&this.applyTooltipPosition(i,a)}computeTooltipPosition(t,e,s=null){var i,a,r,o,n,l,c;const h=this.w,d=this.ttCtx,p=d.tooltipRect,g=!!h.config.tooltip.arrow,u=null!==s?parseFloat(String(s)):1,x=p.ttHeight||0,f=p.ttWidth||0,m=parseFloat(String(t)),b=parseFloat(String(e));if(isNaN(m)||isNaN(b))return null;const y=u+(g?7:0)+0;let w=m+y;const v=b+h.layout.translateY;let A=g?v-x/2+u/2:b+u/2,S="right";if(w>h.layout.gridWidth/2&&(w=m-f-y,S="left"),w>h.layout.gridWidth-f-10&&(w="left"===S?Math.min(h.layout.gridWidth-f,w):h.layout.gridWidth-f),w<-20&&(w=-20),h.config.tooltip.followCursor){const t=d.getElGrid();if(!t)return null;const e=t.getBoundingClientRect();w=d.e.clientX-e.left,w>h.layout.gridWidth/2?(w-=f,S="left"):S="right",A=d.e.clientY+h.layout.translateY-e.top,A>h.layout.gridHeight/2&&(A-=x)}else if(!h.globals.isBarHorizontal)if(g){const t=h.layout.translateY,e=h.layout.translateY+h.layout.gridHeight;A+x>e&&(A=e-x),A<t&&(A=t)}else x/2+A>h.layout.gridHeight&&(A=h.layout.gridHeight-x+h.layout.translateY);if(isNaN(w))return null;w+=h.layout.translateX;const C=null==(a=null==(i=h.config)?void 0:i.chart)?void 0:a.accessibility;if((null==C?void 0:C.enabled)&&(null==(o=null==(r=null==C?void 0:C.keyboard)?void 0:r.navigation)?void 0:o.enabled)&&(null==(c=null==(l=null==(n=h.dom)?void 0:n.baseEl)?void 0:l.querySelector)?void 0:c.call(l,".apexcharts-keyboard-focused"))){const t=g?v:b,e=(u||1)+12,s=A,i=A+x;!isNaN(t)&&x>0&&s<t+e&&i>t-e&&(A=t-x-e,A<0&&(A=t+e))}let k=null;if(g&&x>0){const t=v-A,e=10,s=x-10;k=Math.max(e,Math.min(s,t))}return{x:w,y:A,placement:S,arrowY:k}}applyTooltipPosition(t,e){if(!t)return;const s="true"!==t.dataset.positioned;s&&(t.style.transitionProperty="none"),t.style.left=e.x+"px",t.style.top=e.y+"px",e.placement&&(t.dataset.placement=e.placement),null!=e.arrowY&&t.style.setProperty("--apx-tt-arrow-y",e.arrowY+"px"),null!=e.arrowX&&t.style.setProperty("--apx-tt-arrow-x",e.arrowX+"px"),s&&(t.offsetWidth,t.dataset.positioned="true",requestAnimationFrame(()=>{t.style.transitionProperty=""}))}moveMarkers(t,e){var s;const i=this.w,a=this.ttCtx;if(i.globals.markers.size[t]>0&&!i.globals.markers.batched){const r=i.dom.baseEl.querySelectorAll(` .apexcharts-series[data\\:realIndex='${t}'] .apexcharts-marker`);for(let t=0;t<r.length;t++)parseInt(null!=(s=r[t].getAttribute("rel"))?s:"0",10)===e&&(a.marker.resetPointsSize(),a.marker.enlargeCurrentPoint(e,r[t]))}else a.marker.resetPointsSize(),this.moveDynamicPointOnHover(e,t)}moveDynamicPointOnHover(t,e){var s,i,a,r,o;const n=this.w,l=this.ttCtx;let c=0,h=0;const d=new Mt(this.w),p=n.globals.pointsArray,g=l.tooltipUtil.getHoverMarkerSize(e),u=n.config.series[e].type;if(u&&("column"===u||"candlestick"===u||"boxPlot"===u||"violin"===u))return;c=null==(i=null==(s=p[e])?void 0:s[t])?void 0:i[0],h=(null==(r=null==(a=p[e])?void 0:a[t])?void 0:r[1])||0;const x=n.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${e}'] .apexcharts-series-markers path`);if(x&&h<n.layout.gridHeight&&h>0){const t=null!=(o=x.getAttribute("shape"))?o:"circle",e=d.getMarkerPath(c,h,t,1.5*g);x.setAttribute("d",e)}this.moveXCrosshairs(c),l.fixedTooltip||this.moveTooltip(c,h,g)}moveDynamicPointsOnHover(t){var e,s;const i=this.ttCtx,a=i.w;let r=0,o=0,n=0;const l=a.globals.pointsArray,c=new ke(this.w),h=new Mt(this.w);n=c.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);const d=i.tooltipUtil.getHoverMarkerSize(n);if((null==(e=l[n])?void 0:e[t])&&(r=l[n][t][0],o=l[n][t][1]),isNaN(r))return;const p=i.tooltipUtil.getAllMarkers();if(p.length)for(let e=0;e<a.seriesData.series.length;e++){const i=l[e];if(a.globals.comboCharts&&void 0===i&&p.splice(e,0,null),p[e]&&i&&i.length){let i,o=l[e][t][1];p[e].setAttribute("cx",r);const n=null!=(s=p[e].getAttribute("shape"))?s:"circle";if("rangeArea"===a.config.chart.type&&!a.globals.comboCharts){const s=t+a.seriesData.series[e].length;i=l[e][s][1];o-=Math.abs(o-i)/2}if(null!==o&&!isNaN(o)&&o<a.layout.gridHeight+d&&o+d>0){const t=h.getMarkerPath(r,o,n,d);p[e].setAttribute("d",t)}else p[e].setAttribute("d","")}}this.moveXCrosshairs(r),i.fixedTooltip||this.moveTooltip(r,o||a.layout.gridHeight,d)}moveStickyTooltipOverBars(t,e){var s,i,a,r,o;const n=this.w,l=this.ttCtx;let c=n.globals.columnSeries?n.globals.columnSeries.length:n.seriesData.series.length;n.config.chart.stacked&&(c=n.globals.barGroups.length);let h=c>=2&&c%2==0?Math.floor(c/2):Math.floor(c/2)+1;if(n.globals.isBarHorizontal){h=new ke(this.w).getActiveConfigSeriesIndex("desc")+1}let d=n.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[rel='${h}'] path[j='${t}'], .apexcharts-candlestick-series .apexcharts-series[rel='${h}'] path[j='${t}'], .apexcharts-boxPlot-series .apexcharts-series[rel='${h}'] path[j='${t}'], .apexcharts-violin-series .apexcharts-series[rel='${h}'] path[j='${t}'], .apexcharts-rangebar-series .apexcharts-series[rel='${h}'] path[j='${t}']`);d||"number"!=typeof e||(d=n.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-violin-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}'],\n        .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}']`));let p=null;const g=n.globals.barCanvasCoords;if(!d&&g&&(p="number"==typeof e&&(null==(s=g[e])?void 0:s[t])||null,!p))for(const e in g)if(null==(i=g[e])?void 0:i[t]){p=g[e][t];break}let u=d?parseFloat(null!=(a=d.getAttribute("cx"))?a:"0"):p?p.cx:0,x=d?parseFloat(null!=(r=d.getAttribute("cy"))?r:"0"):p?p.cy:0;const f=d?parseFloat(null!=(o=d.getAttribute("barWidth"))?o:"0"):p?p.barWidth:0,m=l.getElGrid();if(!m)return;const b=m.getBoundingClientRect(),y=d&&(d.classList.contains("apexcharts-candlestick-area")||d.classList.contains("apexcharts-boxPlot-area"));if(n.axisFlags.isXNumeric){if(d&&!y){const e=this._datapointCenterXFromBars(t);null!=e?u=e:u-=c%2!=0?f/2:0}d&&y&&(u-=f/2)}else n.globals.isBarHorizontal||p||(u=l.xAxisTicksPositions[t-1]+l.dataPointsDividedWidth/2,isNaN(u)&&(u=l.xAxisTicksPositions[t]-l.dataPointsDividedWidth/2));if(n.globals.isBarHorizontal?x-=l.tooltipRect.ttHeight:n.config.tooltip.followCursor?x=l.e.clientY-b.top-l.tooltipRect.ttHeight/2:x+l.tooltipRect.ttHeight+15>n.layout.gridHeight&&(x=n.layout.gridHeight),n.globals.isBarHorizontal||this.moveXCrosshairs(u),!l.fixedTooltip){if(n.globals.isBarHorizontal&&!n.config.tooltip.followCursor){if(this.placeHorizontalSharedTooltip(t))return}this.moveTooltip(u,x||n.layout.gridHeight)}}_datapointCenterXFromBars(t){var e,s;const i=this.w,a=i.dom.baseEl.querySelectorAll(`.apexcharts-bar-series path[j='${t}'],.apexcharts-rangebar-series path[j='${t}']`);if(!a.length)return null;let r=1/0,o=-1/0;for(const t of a){const i=t.parentNode;if(null==(s=null==(e=null==i?void 0:i.classList)?void 0:e.contains)?void 0:s.call(e,"apexcharts-series-collapsed"))continue;const a=t.getBoundingClientRect();0===a.width&&0===a.height||(a.left<r&&(r=a.left),a.right>o&&(o=a.right))}return isFinite(r)?xs.screenXToPlotPx(i,(r+o)/2):null}placeHorizontalSharedTooltip(t){var e,s;const i=this.w,a=this.ttCtx,r=a.getElTooltip();if(!r)return!1;const o=a.getElGrid();if(!o)return!1;const n=o.getBoundingClientRect(),l=i.dom.baseEl.querySelectorAll(`.apexcharts-bar-series path[j='${t}'],.apexcharts-rangebar-series path[j='${t}'],.apexcharts-boxPlot-series path[j='${t}']`);if(!l.length)return!1;let c=1/0,h=-1/0,d=1/0,p=-1/0;for(const t of l){const i=t.parentNode;if(null==(s=null==(e=null==i?void 0:i.classList)?void 0:e.contains)?void 0:s.call(e,"apexcharts-series-collapsed"))continue;const a=t.getBoundingClientRect();0===a.width&&0===a.height||(a.left<c&&(c=a.left),a.right>h&&(h=a.right),a.top<d&&(d=a.top),a.bottom>p&&(p=a.bottom))}if(!isFinite(c))return!1;const g=a.tooltipRect.ttWidth||0,u=a.tooltipRect.ttHeight||0,x=(c+h)/2-n.left+i.layout.translateX,f=d-n.top+i.layout.translateY,m=p-n.top+i.layout.translateY,b=i.layout.translateY,y=i.layout.translateY+i.layout.gridHeight,w=i.layout.translateX,v=i.layout.translateX+i.layout.gridWidth;let A="top",S=f-u-7;if(S<b){const t=m+7;t+u<=y&&(A="bottom",S=t)}let C=x-g/2;C<w&&(C=w),C+g>v&&(C=v-g);const k=Math.max(10,Math.min(g-10,x-C));return this.applyTooltipPosition(r,{x:C,y:S,placement:A,arrowY:null,arrowX:k}),!0}}function ys(t){const e=t=>`<svg viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">${t}</svg>`;switch(t){case"square":case"rect":return e('<rect x="1" y="1" width="10" height="10" rx="1" fill="currentColor"/>');case"line":return e('<rect x="0" y="5" width="12" height="2" rx="1" fill="currentColor"/>');case"diamond":return e('<path d="M6 0.5 L11.5 6 L6 11.5 L0.5 6 Z" fill="currentColor"/>');case"triangle":return e('<path d="M6 1 L11.2 10.5 L0.8 10.5 Z" fill="currentColor"/>');case"cross":return e('<path d="M2 2 L10 10 M10 2 L2 10" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>');case"plus":return e('<path d="M6 1 L6 11 M1 6 L11 6" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>');case"star":return e('<path d="M6 0.5 L7.5 4.4 L11.5 4.7 L8.4 7.2 L9.5 11.1 L6 8.9 L2.5 11.1 L3.6 7.2 L0.5 4.7 L4.5 4.4 Z" fill="currentColor"/>');case"sparkle":return e('<path d="M6 0.5 L7 5 L11.5 6 L7 7 L6 11.5 L5 7 L0.5 6 L5 5 Z" fill="currentColor"/>');default:return e('<circle cx="6" cy="6" r="5" fill="currentColor"/>')}}class ws{constructor(t){this.w=t.w,this.ttCtx=t,this.ctx=t.ctx,this.tooltipPosition=new bs(t)}drawDynamicPoints(){const t=this.w,e=new Mt(this.w),s=new Et(this.w,this.ctx),i=[...t.dom.baseEl.querySelectorAll(".apexcharts-series")];t.config.chart.stacked&&i.sort((t,e)=>parseFloat(t.getAttribute("data:realIndex"))-parseFloat(e.getAttribute("data:realIndex")));for(let a=0;a<i.length;a++){const r=i[a].querySelector(".apexcharts-series-markers-wrap");if(null!==r){let i=`apexcharts-marker w${(Math.random()+1).toString(36).substring(4)}`;Et.markersAreInert(t)&&(i+=" no-pointer-events");const a=s.getMarkerConfig({cssClass:i,seriesIndex:Number(r.getAttribute("data:realIndex"))}),o=e.drawMarker(0,0,a);o.node.setAttribute("default-marker-size",0);const n=m.createElementNS(W,"g");n.classList.add("apexcharts-series-markers"),n.appendChild(o.node),r.appendChild(n)}}}enlargeCurrentPoint(t,e,s=null,i=null){const a=this.w;let r=a.config.markers.hover.size;"bubble"!==a.config.chart.type&&(r=this.newPointSize(t,e));let o=e.getAttribute("cx"),n=e.getAttribute("cy");if(null!==s&&null!==i&&(o=s,n=i),this.tooltipPosition.moveXCrosshairs(o),!this.fixedTooltip){if("radar"===a.config.chart.type){const t=this.ttCtx.getElGrid();if(!t)return;const e=t.getBoundingClientRect();o=this.ttCtx.e.clientX-e.left}this.tooltipPosition.moveTooltip(o,n,r)}}enlargePoints(t){var e,s;const i=this.w,a=this,r=this.ttCtx,o=t,n=i.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker");let l=i.config.markers.hover.size;for(let t=0;t<n.length;t++){const c=n[t].getAttribute("rel"),h=n[t].getAttribute("index");if(void 0===l&&(l=i.globals.markers.size[h]+i.config.markers.hover.sizeOffset),o===parseInt(null!=c?c:"0",10)){a.newPointSize(o,n[t]);const i=null!=(e=n[t].getAttribute("cx"))?e:"0",c=null!=(s=n[t].getAttribute("cy"))?s:"0";a.tooltipPosition.moveXCrosshairs(parseFloat(i)),r.fixedTooltip||a.tooltipPosition.moveTooltip(parseFloat(i),parseFloat(c),l)}else a.oldPointSize(n[t])}}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 t=parseInt(a.getAttribute("index"),10);void 0===i&&(i=s.globals.markers.size[t]+s.config.markers.hover.sizeOffset),i<0&&(i=0);const r=this.ttCtx.tooltipUtil.getPathFromPoint(e,i);return e.setAttribute("d",r),i}}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 e=this.w.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker");for(let s=0;s<e.length;s++){const i=parseFloat(null!=(t=e[s].getAttribute("default-marker-size"))?t:"0");if(w.isNumber(i)&&i>0){const t=this.ttCtx.tooltipUtil.getPathFromPoint(e[s],i);e[s].setAttribute("d",t)}else e[s].setAttribute("d","M0,0")}}}class vs{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=fs.hoverTarget(t).getAttribute(e))?s:"")}handleHeatTreeTooltip({e:t,opt:e,x:s,y:i,type:a}){var r,o;const n=this.ttCtx,l=this.w,c=l.globals.activeRenderer,h="heatmap"===a&&c&&"canvas"===c.kind&&"function"==typeof c.hitTest,d=fs.hoverTarget(t);let p,g,u,x,f,m;if(h){const a=e.elGrid.getBoundingClientRect(),r="touchmove"===t.type?t.touches[0].clientX:t.clientX,o="touchmove"===t.type?t.touches[0].clientY:t.clientY,n=c.hitTest(r-a.left,o-a.top);if(!n)return{x:s,y:i,noHit:!0};p=n.seriesIndex,g=n.dataPointIndex,u=n.x,x=n.y,f=n.width,m=n.height}else{if(!d.classList.contains(`apexcharts-${a}-rect`))return{x:s,y:i};p=this.getAttr(t,"i"),g=this.getAttr(t,"j"),u=this.getAttr(t,"cx"),x=this.getAttr(t,"cy"),f=this.getAttr(t,"width"),m=this.getAttr(t,"height")}n.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:p,j:g,shared:!1,e:t}),l.interact.capturedSeriesIndex=p,l.interact.capturedDataPointIndex=g,n.tooltipPosition.moveXCrosshairs(u+f/2);const b=n.getElTooltip();if("heatmap"===a&&l.config.tooltip.arrow&&!l.config.tooltip.followCursor&&b){const t=e.elGrid.getBoundingClientRect(),s=l.dom.elWrap.getBoundingClientRect(),i=t.left-s.left;let a,r,o,c;if(h)a=u,r=x,o=u+f,c=x+m;else{const e=d.getBoundingClientRect();a=e.left-t.left,r=e.top-t.top,o=e.right-t.left,c=e.bottom-t.top}const p=n.tooltipRect.ttWidth||0,g=n.tooltipRect.ttHeight||0,y=(a+o)/2+i,w=r+l.layout.translateY,v=c+l.layout.translateY,A=l.layout.translateY,S=l.layout.translateY+l.layout.gridHeight,C=i,k=i+l.layout.gridWidth;let D="top",M=w-g-7;if(M<A){const t=v+7;t+g<=S?(D="bottom",M=t):M=A}let T=y-p/2;T<C&&(T=C),T+p>k&&(T=k-p);const _=Math.max(10,Math.min(p-10,y-T));return n.tooltipPosition.applyTooltipPosition(b,{x:T,y:M,placement:D,arrowY:null,arrowX:_}),{x:T,y:M,positioned:!0}}if(s=u+n.tooltipRect.ttWidth/2+f,i=x+n.tooltipRect.ttHeight/2-m/2,s>l.layout.gridWidth/2&&(s=u-n.tooltipRect.ttWidth/2+f),n.w.config.tooltip.followCursor){const t=l.dom.elWrap.getBoundingClientRect();s=(null!=(r=l.interact.clientX)?r:0)-t.left-(s>l.layout.gridWidth/2?n.tooltipRect.ttWidth:0),i=(null!=(o=l.interact.clientY)?o:0)-t.top-(i>l.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,r=this.ttCtx;let o,n;if(fs.hoverTarget(t).classList.contains("apexcharts-marker")){const l=parseInt(e.paths.getAttribute("cx"),10),c=parseInt(e.paths.getAttribute("cy"),10),h=parseFloat(e.paths.getAttribute("val"));if(n=parseInt(e.paths.getAttribute("rel"),10),o=parseInt(e.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,r.intersect){const t=w.findAncestor(e.paths,"apexcharts-series");t&&(o=parseInt(t.getAttribute("data:realIndex"),10))}r.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:o,j:n,shared:!r.showOnIntersect&&a.config.tooltip.shared,e:t}),"mouseup"===t.type&&r.markerClick(t,o,n),a.interact.capturedSeriesIndex=o,a.interact.capturedDataPointIndex=n;if(s=l,!!a.config.tooltip.arrow?i=c:(i=c+a.layout.translateY-1.4*r.tooltipRect.ttHeight,h<0&&(i=c)),r.w.config.tooltip.followCursor){const t=r.getElGrid();if(!t)return{x:s,y:i};const e=t.getBoundingClientRect();i=r.e.clientY+a.layout.translateY-e.top}r.marker.enlargeCurrentPoint(n,e.paths,s,i)}return{x:s,y:i}}handleBarTooltip({e:t,opt:e}){var s,i,a;const r=this.w,o=this.ttCtx,n=o.getElTooltip();let l,c=0,h=0,d=0,p=0;const g=this.getBarTooltipXY({e:t,opt:e});if(null===g.j&&0===g.barHeight&&0===g.barWidth)return;p=g.i;const u=g.j;if(r.interact.capturedSeriesIndex=p,r.interact.capturedDataPointIndex=null!==u?u:r.interact.capturedDataPointIndex,r.globals.isBarHorizontal&&o.tooltipUtil.hasBars()||!r.config.tooltip.shared?(h=g.x,d=g.y,l=Array.isArray(r.config.stroke.width)?r.config.stroke.width[p]:r.config.stroke.width,c=h):r.globals.comboCharts||r.config.tooltip.shared||(c/=2),isNaN(d)&&(d=r.globals.svgHeight-o.tooltipRect.ttHeight),h+o.tooltipRect.ttWidth>r.layout.gridWidth?h-=o.tooltipRect.ttWidth:h<0&&(h=0),o.w.config.tooltip.followCursor){if(!o.getElGrid())return}if(null===o.tooltip&&(o.tooltip=r.dom.baseEl.querySelector(".apexcharts-tooltip:not(.apexcharts-annotation-tooltip)")),r.config.tooltip.shared||(r.globals.comboBarCount>0?o.tooltipPosition.moveXCrosshairs(c+l/2):o.tooltipPosition.moveXCrosshairs(c)),!o.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&o.tooltipUtil.hasBars())&&(d=d+r.layout.translateY-o.tooltipRect.ttHeight/2,n)){const t=o.tooltipRect.ttWidth||0,e=o.tooltipRect.ttHeight||0,l=!!r.config.tooltip.arrow,{barAnchorXInGrid:c,barAnchorYInGrid:p,barRectInGrid:u}=g,x=null==(s=o.getElGrid())?void 0:s.getBoundingClientRect(),f=r.dom.elWrap.getBoundingClientRect(),m=x?x.left-f.left:r.layout.translateX;let b,y=null,w=null,v=h+m,A=d;if(l&&r.globals.isBarHorizontal&&null!=u){const s=r.layout.translateY,i=r.layout.translateY+r.layout.gridHeight,a=m,o=m+r.layout.gridWidth,n=(u.left+u.right)/2+m,l=u.top+r.layout.translateY,c=u.bottom+r.layout.translateY;let h=l-e-7;if(b="top",h<s){const t=c+7;t+e<=i&&(b="bottom",h=t)}A=h,v=n-t/2,v<a&&(v=a),v+t>o&&(v=o-t),w=Math.max(10,Math.min(t-10,n-v))}else if(l&&null!=c&&null!=p){const s=c+m,o=m+r.layout.gridWidth/2,n=(null!=(i=null==u?void 0:u.left)?i:c)+m,l=(null!=(a=null==u?void 0:u.right)?a:c)+m;if(s<o?(b="right",v=l+7):(b="left",v=n-t-7),u){A=(u.top+u.bottom)/2+r.layout.translateY-e/2;const t=r.layout.translateY,s=r.layout.translateY+r.layout.gridHeight;A<t&&(A=t),A+e>s&&(A=s-e)}if(e>0&&u){const t=(u.top+u.bottom)/2+r.layout.translateY;y=Math.max(10,Math.min(e-10,t-A))}}o.tooltipPosition.applyTooltipPosition(n,{x:v,y:A,placement:b,arrowY:y,arrowX:w})}}getBarTooltipXY({e:t,opt:e}){const s=this.w;let i=null;const a=this.ttCtx;let r=0,o=0,n=0,l=0,c=0,h=null,d=null,p=null,g=null,u=null;const x=fs.hoverTarget(t),f=x.classList;if(f.contains("apexcharts-bar-area")||f.contains("apexcharts-candlestick-area")||f.contains("apexcharts-boxPlot-area")||f.contains("apexcharts-rangebar-area")){const f=x,m=f.getBoundingClientRect(),b=e.elGrid.getBoundingClientRect(),y=m.height;c=m.height;const w=m.width,v=parseInt(f.getAttribute("cx"),10),A=parseInt(f.getAttribute("cy"),10);h=v,d=A,l=parseFloat(f.getAttribute("barWidth"));const S=m.left-b.left,C=m.top-b.top,k=C+y/2;p=S+w/2,g=s.globals.isBarHorizontal?k:C,u={left:S,top:C,right:S+w,bottom:C+y};const D="touchmove"===t.type?t.touches[0].clientX:t.clientX;i=parseInt(f.getAttribute("j"),10),r=parseInt(f.parentNode.getAttribute("rel"),10)-1;const M=f.getAttribute("data-range-y1"),T=f.getAttribute("data-range-y2");s.globals.comboCharts&&(r=parseInt(f.parentNode.getAttribute("data:realIndex"),10));const _=t=>s.axisFlags.isXNumeric?v-w/2:this.isVerticalGroupedRangeBar?v+w/2:v-a.dataPointsDividedWidth+w/2,L=()=>A-a.dataPointsDividedHeight+y/2-a.tooltipRect.ttHeight/2;a.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:r,j:i,y1:M?parseInt(M,10):null,y2:T?parseInt(T,10):null,shared:!a.showOnIntersect&&s.config.tooltip.shared,e:t}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(o=D-b.left+15,n=L()):(o=_(o),n=t.clientY-b.top-a.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?(o=v,a.xyRatios&&o<a.xyRatios.baseLineInvertedY&&(o=v-a.tooltipRect.ttWidth),n=L()):(o=_(o),n=A)}return{x:o,y:n,barHeight:c,barWidth:l,i:r,j:i,barCx:h,barCy:d,barAnchorXInGrid:p,barAnchorYInGrid:g,barRectInGrid:u}}}class As{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;if(e.isXAxisTooltipEnabled){null===t.dom.baseEl.querySelector(".apexcharts-xaxistooltip")&&(e.xaxisTooltip=m.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=m.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`,r=t.dom.elWrap;null===t.dom.baseEl.querySelector(`.apexcharts-yaxistooltip.apexcharts-yaxistooltip-${s}`)&&(e.yaxisTooltip=m.createElementNS("http://www.w3.org/1999/xhtml","div"),e.yaxisTooltip.setAttribute("class",a+" apexcharts-theme-"+t.config.tooltip.theme),r.appendChild(e.yaxisTooltip),0===s&&(e.yaxisTooltipText=[]),e.yaxisTooltipText[s]=m.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 t=s.dom.baseEl.querySelector(".apexcharts-bar-area");if(null!==t&&"barWidth"===s.config.xaxis.crosshairs.width){const s=parseFloat(null!=(e=t.getAttribute("barWidth"))?e:"0");i.xcrosshairsWidth=s}else if("tickWidth"===s.config.xaxis.crosshairs.width){const t=s.labelData.labels.length;i.xcrosshairsWidth=s.layout.gridWidth/t}}else if("tickWidth"===s.config.xaxis.crosshairs.width){const t=s.labelData.labels.length;i.xcrosshairsWidth=s.layout.gridWidth/t}else if("barWidth"===s.config.xaxis.crosshairs.width){const e=s.dom.baseEl.querySelector(".apexcharts-bar-area");if(null!==e){const s=parseFloat(null!=(t=e.getAttribute("barWidth"))?t:"0");i.xcrosshairsWidth=s}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,r=a.globals,o=r.seriesYAxisMap[t];if(i.yaxisTooltips[t]&&o.length>0){const n=a.formatters.yLabelFormatters[t],l=i.getElGrid();if(!l)return;const c=l.getBoundingClientRect(),h=o[0];let d=0;s.yRatio.length>1&&(d=h);const p=(e-c.top)*s.yRatio[d],g=r.maxYArr[h]-r.minYArr[h];let u=r.minYArr[h]+(g-p);a.config.yaxis[t].reversed&&(u=r.maxYArr[h]-(g-p)),i.tooltipPosition.moveYCrosshairs(e-c.top),i.yaxisTooltipText[t].innerHTML=n(u),i.tooltipPosition.moveYAxisTooltip(t)}}}class Ss{constructor(t,e){this.w=t,this.ctx=e,this.tConfig=t.config.tooltip,this.tooltipUtil=new fs(this),this.tooltipLabels=new ms(this),this.tooltipPosition=new bs(this),this.marker=new ws(this),this.intersect=new vs(this),this.axesTooltip=new As(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(),"undefined"==typeof ResizeObserver||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 e=t.globals.dimensionCache.tooltip;if(Date.now()-e.lastUpdate<1e3)return{ttWidth:e.width,ttHeight:e.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:not(.apexcharts-annotation-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(t=>!!(t.show&&t.tooltip.enabled&&e.globals.axisCharts)),this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);const s=this.getElTooltip();(null==s?void 0:s.parentNode)&&s.parentNode.removeChild(s),this.tooltipTitle=null;const i=m.createElementNS("http://www.w3.org/1999/xhtml","div");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"}`),this.tConfig.fillSeriesColor&&i.classList.add("apexcharts-tooltip-fill-series"),this.tConfig.compact&&(i.classList.add("apexcharts-tooltip-compact"),1===e.config.series.length&&i.classList.add("apexcharts-tooltip-value-only")),this.tConfig.style&&this.tConfig.style.background&&i.style.setProperty("--apx-tt-bg",this.tConfig.style.background);const a=this.tConfig.shared&&e.config.series.length>1&&!e.globals.isBarHorizontal&&"heatmap"!==e.config.chart.type;if(this.tConfig.arrow&&!this.tConfig.followCursor&&!this.tConfig.fixed.enabled&&!a&&!this.tConfig.fillSeriesColor&&e.globals.axisCharts){const t=m.createElementNS("http://www.w3.org/1999/xhtml","div");t.classList.add("apexcharts-tooltip-arrow"),i.appendChild(t)}if(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 t=new Xt(this.w,this.ctx,void 0);this.xAxisTicksPositions=t.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||e.globals.markers.batched)&&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=m.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 r=e.seriesData.series.length;(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(r=this.showOnIntersect?1:e.seriesData.series.length),this.legendLabels=e.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(r),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 r=m.createElementNS("http://www.w3.org/1999/xhtml","div");r.classList.add("apexcharts-tooltip-series-group",`apexcharts-tooltip-series-group-${a}`),r.style.order=String(e.config.tooltip.inverseOrder?t-a:a+1);const o=m.createElementNS("http://www.w3.org/1999/xhtml","span");o.classList.add("apexcharts-tooltip-marker"),e.config.tooltip.fillSeriesColor?o.style.backgroundColor=e.globals.colors[a]:o.style.color=e.globals.colors[a];const n=e.config.markers.shape;let l=n;Array.isArray(n)&&(l=n[a]),o.setAttribute("shape",l),o.innerHTML=ys(l),r.appendChild(o);const c=m.createElementNS("http://www.w3.org/1999/xhtml","div");c.classList.add("apexcharts-tooltip-text"),c.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,c.style.fontSize=this.tConfig.style.fontSize,["y","goals","z"].forEach(t=>{const e=m.createElementNS("http://www.w3.org/1999/xhtml","div");e.classList.add(`apexcharts-tooltip-${t}-group`);const s=m.createElementNS("http://www.w3.org/1999/xhtml","span");s.classList.add(`apexcharts-tooltip-text-${t}-label`),e.appendChild(s);const i=m.createElementNS("http://www.w3.org/1999/xhtml","span");i.classList.add(`apexcharts-tooltip-text-${t}-value`),e.appendChild(i),c.appendChild(e)}),r.appendChild(c),i.appendChild(r),s.push(r)}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&&"violin"!==e&&"rangeBar"!==e),a="area"===e||"line"===e||"scatter"===e||"bubble"===e||"radar"===e,r=a&&!t.globals.xyCharts,o=t.dom.Paper.node,n=this.getElGrid();n&&(this.seriesBound=n.getBoundingClientRect());const l=[],c=[],h={hoverArea:o,elGrid:n,tooltipEl:s,tooltipY:l,tooltipX:c,ttItems:this.ttItems};let d;if(t.globals.axisCharts&&(a?d=t.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):i?d=t.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-violin-area, .apexcharts-series .apexcharts-rangebar-area"):"heatmap"!==e&&"treemap"!==e||(d=t.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap")),d&&d.length))for(let t=0;t<d.length;t++)l.push(d[t].getAttribute("cy")),c.push(d[t].getAttribute("cx"));if(t.globals.xyCharts&&!this.showOnIntersect||t.globals.comboCharts&&!this.showOnIntersect||i&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([o],h);else if(i&&!t.globals.comboCharts||a&&this.showOnIntersect||r)this.addDatapointEventsListeners(h);else if("heatmap"===e&&t.globals.activeRenderer&&"canvas"===t.globals.activeRenderer.kind)this.addPathsEventListeners([o],h);else if(!t.globals.axisCharts||"heatmap"===e||"treemap"===e){const e=t.dom.baseEl.querySelectorAll(".apexcharts-series");this.addPathsEventListeners(e,h)}if(this.showOnIntersect){const e=t.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker");e.length>0&&this.addPathsEventListeners(e,h),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(h)}}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 r=this.tConfig.fixed.offsetX,o=this.tConfig.fixed.offsetY;const n=this.tConfig.fixed.position.toLowerCase();return n.indexOf("right")>-1&&(r=r+t.globals.svgWidth-i+10),n.indexOf("bottom")>-1&&(o=o+t.globals.svgHeight-a-10),this.tooltipPosition.applyTooltipPosition(e,{x:r,y:o}),{x:r,y:o,ttWidth:i,ttHeight:a}}addDatapointEventsListeners(t){const e=this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(e,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(e=>t[i].addEventListener(e,s.onSeriesHover.bind(s,a),{capture:!1,passive:!0}))}}onSeriesHover(t,e){fs.hoverTarget(e);const s=Date.now()-this.lastHoverTime;s>=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(()=>{this.seriesHover(t,e)},20-s))}seriesHover(t,e){if(this.w.globals.isDestroyed)return;this.lastHoverTime=Date.now();let s=[];const i=this.w,a=t=>{var e,s,i;const a=null==(i=null==(s=null==(e=null==t?void 0:t.w)?void 0:e.config)?void 0:s.chart)?void 0:i.link;return!(!a||"function"!=typeof a.dimension)};i.config.chart.group&&!a(this.ctx)&&(s=this.ctx.getSyncedCharts().filter(t=>!a(t))),i.globals.axisCharts&&(i.globals.minX===-1/0&&i.globals.maxX===1/0||0===i.globals.dataPoints)||(s.length?s.forEach(s=>{const i=this.getElTooltip(s),a={paths:t.paths,tooltipEl:i,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:s.w.globals.tooltip.ttItems};s.w.globals.minX===this.w.globals.minX&&s.w.globals.maxX===this.w.globals.maxX&&s.w.globals.tooltip.seriesHoverByContext({chartCtx:s,ttCtx:s.w.globals.tooltip,opt:a,e:e})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e:e}))}seriesHoverByContext({chartCtx:t,ttCtx:e,opt:s,e:i}){var a;const r=t.w;if(!this.getElTooltip(t))return;const o=e.getCachedDimensions();if(e.tooltipRect={x:0,y:0,ttWidth:o.ttWidth,ttHeight:o.ttHeight},e.e=i,e.tooltipUtil.hasBars()&&!r.globals.comboCharts&&!e.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries){new ke(t.w).toggleSeriesOnHover(i,null==(a=fs.hoverTarget(i))?void 0:a.parentNode)}r.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,r;if(!e.elGrid)return;const o=e.elGrid.getBoundingClientRect(),n="touchmove"===t.type?t.touches[0].clientX:t.clientX,l="touchmove"===t.type?t.touches[0].clientY:t.clientY;if(this.clientY=l,this.clientX=n,i.interact.capturedSeriesIndex=-1,i.interact.capturedDataPointIndex=-1,l<o.top||l>o.top+o.height)return void this.handleMouseOut(e);if(i.dom.elWrap.querySelector(".apexcharts-annotation-tooltip.apexcharts-active"))return void this.handleMouseOut(e);if(Array.isArray(this.tConfig.enabledOnSeries)&&!i.config.tooltip.shared){const t=parseInt(e.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(t)<0)return void this.handleMouseOut(e)}const c=this.getElTooltip();if(!c)return;const h=this.getElXCrosshairs(),d=["heatmap","treemap"].includes(i.config.chart.type);let p=[];i.config.chart.group&&!d&&(p=this.ctx.getSyncedCharts());const g=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 o=null==(s=this.yaxisTooltips)?void 0:s.filter(t=>!0===t),u=this.ycrosshairs;if(null!==u&&(null==o?void 0:o.length)&&u.classList.add("apexcharts-active"),!d&&(g&&!this.showOnIntersect||p.length>1))this.handleStickyTooltip(t,n,l,e);else if("heatmap"===i.config.chart.type||"treemap"===i.config.chart.type){const s=this.intersect.handleHeatTreeTooltip({e:t,opt:e,x:a,y:r,type:i.config.chart.type});if(s.noHit)return void this.handleMouseOut(e);a=s.x,r=s.y,s.positioned||(c.style.left=a+"px",c.style.top=r+"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:r});if(this.yaxisTooltips&&this.yaxisTooltips.length)for(let t=0;t<i.config.yaxis.length;t++)this.axesTooltip.drawYaxisTooltipText(t,l,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)}getSliceAnchor(t){var e,s;const i=this.w,a=parseFloat(null!=(e=null==t?void 0:t.getAttribute("data:cx"))?e:""),r=parseFloat(null!=(s=null==t?void 0:t.getAttribute("data:cy"))?s:"");if(isNaN(a)||isNaN(r))return null;const o=i.dom.elWrap.getBoundingClientRect(),n="function"==typeof t.getScreenCTM?t.getScreenCTM():null;if(!n){const t=i.dom.Paper.node.getBoundingClientRect();return{x:t.left-o.left+a,y:t.top-o.top+r}}return{x:n.a*a+n.c*r+n.e-o.left,y:n.b*a+n.d*r+n.f-o.top}}nonAxisChartsTooltips({e:t,opt:e,tooltipRect:s}){var i,a,r,o;const n=this.w,l=e.paths.getAttribute("rel"),c=this.getElTooltip();if(!c)return;const h=n.dom.elWrap.getBoundingClientRect();if("mousemove"===t.type||"touchmove"===t.type){if(n.dom.baseEl.classList.add("apexcharts-tooltip-active"),c.classList.add("apexcharts-active"),n.config.chart.accessibility.enabled&&n.config.chart.accessibility.announcements.enabled&&c.removeAttribute("aria-hidden"),"unit"===n.config.chart.type){const e=fs.hoverTarget(t),s=e&&"function"==typeof e.closest?e.closest(".apexcharts-unit-area"):null;if(!s)return;this.renderUnitTooltip(s)}else this.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:parseInt(l,10)-1,shared:!1});let o,d;const p=e.paths.querySelector("path[data\\:cx]")||e.paths,g=n.config.tooltip.intersect?this.getSliceAnchor(p):null;if(g?(o=g.x-s.ttWidth/2,d=g.y-s.ttHeight-10):(o=(null!=(i=n.interact.clientX)?i:0)-h.left-s.ttWidth/2,d=(null!=(a=n.interact.clientY)?a:0)-h.top-s.ttHeight-10),c.style.left=o+"px",c.style.top=d+"px",n.config.legend.tooltipHoverFormatter){const t=n.config.legend.tooltipHoverFormatter,e=l-1,s=null==(r=this.legendLabels)?void 0:r[e];if(!s)return;const i=t(s.getAttribute("data:default-text"),{seriesIndex:e,dataPointIndex:e,w:n});s.innerHTML=i}}else"mouseout"!==t.type&&"touchend"!==t.type||(c.classList.remove("apexcharts-active"),n.dom.baseEl.classList.remove("apexcharts-tooltip-active"),n.config.legend.tooltipHoverFormatter&&(null==(o=this.legendLabels)||o.forEach(t=>{const e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(null!=e?e:"")})))}renderUnitTooltip(t){var e,s,i,a,r;const o=this.w,n=this.getElTooltip();if(!n)return;const l=parseInt(t.getAttribute("i")||"0",10),c=parseInt(t.getAttribute("j")||"0",10);if("function"==typeof o.config.tooltip.custom)return void this.tooltipLabels.handleCustomTooltip({i:l,j:c,y1:null,y2:null,w:o});const h=o.seriesData.seriesNames[l]||`series-${l+1}`,d=Math.round(Number(o.seriesData.series[l])||0),p=t.parentNode,g=p&&p.querySelectorAll?p.querySelectorAll(".apexcharts-unit-area").length:d,u=o.config.plotOptions.unit||{},x=u.unitValue>0?u.unitValue:1,f=o.seriesData.unitData&&o.seriesData.unitData[l],m=f?f[c]:void 0,b=m&&"object"==typeof m?m:null,y=b&&b.fillColor||o.globals.colors&&o.globals.colors[l]||"#008FFB";let w;const v=u.tooltip&&u.tooltip.formatter;if("function"==typeof v)w=v({seriesName:h,seriesIndex:l,dataPointIndex:c,count:g,value:d,unitValue:x,datum:m,color:y,w:o});else if(null!=m){const t=b&&null!=(i=null!=(s=null!=(e=b.name)?e:b.label)?s:b.x)?i:null,o=b?null!=(r=null!=(a=b.value)?a:b.y)?r:null:m;w=null!=t&&null!=o?`${t}: ${o}`:null!=t?String(t):null!=o?String(o):`#${(c+1).toLocaleString()} of ${g.toLocaleString()}`}else w=`#${(c+1).toLocaleString()} of ${g.toLocaleString()}`,1!==x&&(w+=` &middot; ${x.toLocaleString()} per dot`);const A=o.config.chart.fontFamily||"inherit",S=o.config.tooltip.style&&o.config.tooltip.style.fontSize||"12px",C=n.querySelector(".apexcharts-tooltip-arrow");n.innerHTML=`<div class="apexcharts-tooltip-title" style="font-family: ${A}; font-size: ${S};">${h}</div><div class="apexcharts-tooltip-series-group apexcharts-active" style="display: flex;"><span class="apexcharts-tooltip-marker" style="background-color: ${y};"></span><div class="apexcharts-tooltip-text" style="font-family: ${A}; font-size: ${S};"><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-value">${w}</span></div></div></div>`,C&&n.appendChild(C);const k=n.getBoundingClientRect();this.tooltipRect.ttWidth=k.width,this.tooltipRect.ttHeight=k.height}handleStickyTooltip(t,e,s,i){const a=this.w,r=this.tooltipUtil.getNearestValues({context:this,hoverArea:i.hoverArea,elGrid:i.elGrid,clientX:e,clientY:s}),o=r.j;let n=r.capturedSeries;null!==n&&a.globals.collapsedSeriesIndices.includes(null!=n?n:-1)&&(n=null);const l=a.globals.barPadForNumericAxis||0;if(r.hoverX<-l||r.hoverX>a.layout.gridWidth+l)this.handleMouseOut(i);else if(null!==n)this.handleStickyCapturedSeries(t,null!=n?n:-1,i,null!=o?o:0);else if(this.tooltipUtil.isXoverlap(null!=o?o:0)||a.globals.isBarHorizontal){const e=a.seriesData.series.findIndex((t,e)=>!a.globals.collapsedSeriesIndices.includes(e));this.create(t,this,e,null!=o?o:0,i.ttItems)}}handleStickyCapturedSeries(t,e,s,i){const a=this.w;if(!this.tConfig.shared){if(null===a.seriesData.series[e][i])return void this.handleMouseOut(s)}if(void 0!==a.seriesData.series[e][i])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 e=a.seriesData.series.findIndex((t,e)=>!a.globals.collapsedSeriesIndices.includes(e));this.create(t,this,e,i,s.ttItems)}}deactivateHoverFilter(){const t=this.w,e=new Mt(this.w,this.ctx),s=t.dom.Paper.find(".apexcharts-bar-area");for(let t=0;t<s.length;t++)e.pathMouseLeave(s[t],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"),delete t.tooltipEl.dataset.positioned,i.config.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 r=this.ycrosshairs;if(null!==r&&r.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 t=0;t<this.yaxisTTEls.length;t++)this.yaxisTTEls[t].classList.remove("apexcharts-active")}i.config.legend.tooltipHoverFormatter&&(null==(s=this.legendLabels)||s.forEach(t=>{const e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(null!=e?e:"")}))}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}])}_hasCustomSeries(){const t=this.w;if(ts(t.config.chart.type))return!0;return(t.config.series||[]).some(t=>t&&t.type&&ts(t.type))}create(t,e,s,i,a,r=null){var o,c,h,d,p,g,u,x,f,m,b,y,w,v,A,S,C,k,D,M,T;const _=this.w,L=e;"mouseup"===t.type&&this.markerClick(t,s,i),null===r&&(r=this.tConfig.shared);const F=this.tooltipUtil.hasMarkers(s),E="canvas"===(null==(c=null==(o=this.ctx)?void 0:o.renderer)?void 0:c.kind),P=E&&!this.tooltipUtil.hasBars(),B=!E&&!F&&!this.tooltipUtil.hasBars()&&this._hasCustomSeries(),N=P||B,R=this.tooltipUtil.getElBars(),I=()=>{_.globals.markers.largestSize>0&&!E&&!_.globals.markers.batched?L.marker.enlargePoints(i):L.tooltipPosition.moveDynamicPointsOnHover(i)};if(_.config.legend.tooltipHoverFormatter){const t=_.config.legend.tooltipHoverFormatter,e=Array.from(null!=(h=this.legendLabels)?h:[]);e.forEach(t=>{const e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(null!=e?e:"")});for(let a=0;a<e.length;a++){const o=e[a],n=parseInt(null!=(d=o.getAttribute("i"))?d:"",10),l=decodeURIComponent(null!=(p=o.getAttribute("data:default-text"))?p:""),c=t(l,{seriesIndex:r?n:s,dataPointIndex:i,w:_});if(r)o.innerHTML=_.globals.collapsedSeriesIndices.indexOf(n)<0?c:l;else if(o.innerHTML=n===s?c:l,s===n)break}}const X=_.rangeData,z=n(n({ttItems:a,i:s,j:i},void 0!==(null==(f=null==(x=null==(u=null==(g=X.seriesRange)?void 0:g[s])?void 0:u[i])?void 0:x.y[0])?void 0:f.y1)&&{y1:null==(w=null==(y=null==(b=null==(m=X.seriesRange)?void 0:m[s])?void 0:b[i])?void 0:y.y[0])?void 0:w.y1}),void 0!==(null==(C=null==(S=null==(A=null==(v=X.seriesRange)?void 0:v[s])?void 0:A[i])?void 0:S.y[0])?void 0:C.y2)&&{y2:null==(T=null==(M=null==(D=null==(k=X.seriesRange)?void 0:k[s])?void 0:D[i])?void 0:M.y[0])?void 0:T.y2});if(r){if(L.tooltipLabels.drawSeriesTexts(l(n({},z),{shared:!this.showOnIntersect&&this.tConfig.shared})),F||N)I();else if(this.tooltipUtil.hasBars()&&(E&&L.tooltipPosition.moveStickyTooltipOverBars(i,s),this.barSeriesHeight=this.tooltipUtil.getBarsHeight([...R]),this.barSeriesHeight>0)){const t=new Mt(this.w,this.ctx),e=_.dom.Paper.find(`.apexcharts-bar-area[j='${i}']`);this.deactivateHoverFilter();L.tooltipUtil.getAllMarkers(!0).length&&!this.barSeriesHeight&&I(),L.tooltipPosition.moveStickyTooltipOverBars(i,s);for(let s=0;s<e.length;s++)t.pathMouseEnter(e[s],void 0)}}else L.tooltipLabels.drawSeriesTexts(n({shared:!1},z)),this.tooltipUtil.hasBars()&&L.tooltipPosition.moveStickyTooltipOverBars(i,s),F?L.tooltipPosition.moveMarkers(s,i):N&&L.tooltipPosition.moveDynamicPointOnHover(i,s)}}class Cs{constructor(t,e){this.w=t,this.ctx=e,this.kind="svg"}beginSeries(){}present(){return null}clear(){}group(t){return this.ctx.graphics.group(t)}drawPath(t){return this.ctx.graphics.drawPath(t)}drawLine(...t){return this.ctx.graphics.drawLine(...t)}drawRect(...t){return this.ctx.graphics.drawRect(...t)}drawCircle(t,e){return this.ctx.graphics.drawCircle(t,e)}drawText(t){return this.ctx.graphics.drawText(t)}renderPaths(t){return this.ctx.graphics.renderPaths(t)}drawMarker(t,e,s={}){return this.ctx.graphics.drawMarker(t,e,s)}supports(t){return!0}hitTest(){return null}restyle(){}toBitmap(){return null}destroy(){}}const ks="__apexcharts_renderers__";function Ds(){const t=globalThis;return t[ks]||(t[ks]=new Map),t[ks]}class Ms{static get _rendererRegistry(){return Ds()}static registerRenderer(t,e){Ds().set(t,e)}static unregisterRenderer(t){Ds().delete(t)}constructor(t,e){this.w=t,this.ctx=e,this.svg=new Cs(t,e),this.active=this.svg,this._activeKind="svg",this._instances={}}_desiredKind(){const t=this.w.config.chart,e=t.renderer||"svg";if(!h.isBrowser())return"svg";if("svg"===e)return"svg";if(Ft(this.w))return"svg";if("canvas"===e)return"canvas";return function(t){const e=t.config.series||[],s=t.config.chart.type,i="scatter"===s||"bubble"===s,a=t.config.markers&&t.config.markers.size,r=Array.isArray(a)?a.some(t=>t>0):(a||0)>0,o=!(!t.config.dataLabels||!t.config.dataLabels.enabled),n="heatmap"===s;let l=0,c=0;return e.forEach(t=>{const e=Array.isArray(t.data)?t.data.length:0;e>c&&(c=e),(i||r||n)&&(l+=e),o&&(l+=e)}),c>=5e4&&(l=Math.max(l,c)),l}(this.w)>=(t.rendererThreshold||8e3)?"canvas":"svg"}resolve(){const t=this.w.config.chart.renderer||"svg",e=this._desiredKind();if("svg"!==e){const t=Ds().get(e);if(t)return this._instances[e]||(this._instances[e]=t(this.w,this.ctx)),this.active=this._instances[e],this._activeKind=e,this.ctx.renderer=this.active,this.w.globals.activeRenderer=this.active,this._activeKind}else"canvas"===t&&Ft(this.w);return this.active=this.svg,this._activeKind="svg",this.ctx.renderer=this.active,this.w.globals.activeRenderer=this.active,this._activeKind}getActiveKind(){return this._activeKind}teardown(){for(const t in this._instances){const e=this._instances[t];e&&"function"==typeof e.destroy&&e.destroy()}this._instances={},this.active=this.svg,this._activeKind="svg"}}class Ts{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 t in s){let e=s[t];null===e?this.node.removeAttribute(t):void 0!==e&&("number"==typeof e&&isNaN(e)&&(e=0),this.node.setAttribute(t,e))}if("text"===this.node.nodeName&&null!=s.x){const t=this.node.querySelectorAll("tspan[data-newline]");for(let e=0;e<t.length;e++)t[e].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(),i=t-(s.x+s.width/2),a=e-(s.y+s.height/2);return this.attr("transform",`translate(${i}, ${a})`)}return this.attr({cx:t,cy:e})}add(t){return t&&t.__isCanvasMark||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(t=>t.instance||new Ts(t))}findOne(t){const e=this.node.querySelector(t);return e?e.instance||new Ts(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 e=t.split(".")[0];this._listeners=this._listeners.filter(t=>t.eventType!==e||(this.node.removeEventListener(t.eventType,t.handler),!1))}else{const s=t.split(".")[0];this._listeners=this._listeners.filter(t=>t.eventType!==s||t.handler!==e||(this.node.removeEventListener(t.eventType,t.handler),!1))}else this._listeners.forEach(t=>{this.node.removeEventListener(t.eventType,t.handler)}),this._listeners=[];return this}each(t,e){return Array.from(this.node.children).forEach(s=>{const i=s.instance||new Ts(s);t.call(i),e&&i.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 Ts(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(t){}return{x:0,y:0,width:0,height:0}}tspan(t){const e=m.createElementNS("http://www.w3.org/2000/svg","tspan");return e.textContent=t,this.node.appendChild(e),new Ts(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")}}let _s=0;class Ls extends Ts{constructor(t,e,s){const i="radial"===e?"radialGradient":"linearGradient";super(m.createElementNS(W,i)),this._id="SvgjsGradient"+ ++_s,this.attr("id",this._id),"function"==typeof s&&s(new Fs(this));let a=t.node.querySelector("defs");a||(a=m.createElementNS(W,"defs"),t.node.appendChild(a)),a.appendChild(this.node)}stop(t,e,s){const i=m.createElementNS(W,"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 Fs{constructor(t){this.gradient=t}stop(t,e,s){return this.gradient.stop(t,e,s),this}}let Es=0;class Ps extends Ts{constructor(t,e,s,i){if(super(m.createElementNS(W,"pattern")),this._id="SvgjsPattern"+ ++Es,this.attr({id:this._id,width:e,height:s,patternUnits:"userSpaceOnUse"}),"function"==typeof i){i(new Bs(this.node))}let a=t.node.querySelector("defs");a||(a=m.createElementNS(W,"defs"),t.node.appendChild(a)),a.appendChild(this.node)}url(){return"url(#"+this._id+")"}toString(){return this.url()}valueOf(){return this.url()}fill(){return this.url()}}class Bs extends Ts{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=m.createElementNS(W,"text");e.textContent=t;const s=new Ts(e);return this.node.appendChild(e),s}text(t){const e=m.createElementNS(W,"text"),s=new Ts(e);return this.node.appendChild(e),"function"==typeof t&&t(new Ns(e)),s}image(t,e){const s=m.createElementNS(W,"image");s.setAttributeNS("http://www.w3.org/1999/xlink","href",t);const i=new Ts(s);if(this.node.appendChild(s),"function"==typeof e&&h.isBrowser()){const s=new Image;s.onload=function(){i.size(s.width,s.height),e.call(i,{width:s.width,height:s.height})},s.src=t}return i}gradient(t,e){return new Ls(this,t,e)}pattern(t,e,s){return new Ps(this,t,e,s)}_make(t){const e=m.createElementNS(W,t);return this.node.appendChild(e),new Ts(e)}_makeContainer(t){const e=m.createElementNS(W,t);return this.node.appendChild(e),new Bs(e)}}class Ns{constructor(t){this.textNode=t}tspan(t){const e=m.createElementNS(W,"tspan");return e.textContent=t,this.textNode.appendChild(e),new Rs(e,this.textNode)}}class Rs{constructor(t,e){this.node=t,this.textNode=e}newLine(){return this.node.setAttribute("dy","1.1em"),this.node.dataset.newline="1",this}}let Is=0;class Xs extends Ts{constructor(){super(m.createElementNS(W,"filter")),this._id="SvgjsFilter"+ ++Is,this.attr("id",this._id)}}class zs{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=m.createElementNS(W,"feMerge");return t.forEach(t=>{const s=m.createElementNS(W,"feMergeNode");s.setAttribute("in",t),e.appendChild(s)}),this.filter.node.appendChild(e),new Ts(e)}_primitive(t,e){const s=m.createElementNS(W,t);for(const t in e)s.setAttribute(t,e[t]);return this.filter.node.appendChild(s),new Ts(s)}}function Os(t){t.prototype.filterWith=function(t){const e=new Xs;this._filter=e;let s=this.node;for(;s&&"svg"!==s.nodeName;)s=s.parentNode;if(s){let t=s.querySelector("defs");t||(t=m.createElementNS(W,"defs"),s.insertBefore(t,s.firstChild)),t.appendChild(e.node)}return t(new zs(e)),this.attr("filter","url(#"+e._id+")"),this},t.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},t.prototype.filterer=function(){return this._filter}}function Ys(t){t.prototype.draggable=function(t){if(!1===t)return this._dragCleanup&&(this._dragCleanup(),this._dragCleanup=null),this;const e=this,s=t||{},i=t=>{if(t.button&&0!==t.button)return;t.stopPropagation();const i="touchstart"===t.type?t.touches[0]:t,a=e.node,r=parseFloat(a.getAttribute("x"))||0,o=parseFloat(a.getAttribute("y"))||0,n=i.clientX,l=i.clientY,c=a.ownerSVGElement;let d=null;c&&(d=c.getScreenCTM());const p=t=>{const e="touchmove"===t.type?t.touches[0]:t;let i=e.clientX-n,c=e.clientY-l;d&&(i/=d.a,c/=d.d);let h=r+i,p=o+c;const g=parseFloat(a.getAttribute("width"))||0,u=parseFloat(a.getAttribute("height"))||0;void 0!==s.minX&&h<s.minX&&(h=s.minX),void 0!==s.minY&&p<s.minY&&(p=s.minY),void 0!==s.maxX&&h+g>s.maxX&&(h=s.maxX-g),void 0!==s.maxY&&p+u>s.maxY&&(p=s.maxY-u);const x=new CustomEvent("dragmove",{detail:{handler:{move:function(t,e){a.setAttribute("x",t),a.setAttribute("y",e)}},box:{x:h,y:p,w:g,h:u,x2:h+g,y2:p+u}}});a.dispatchEvent(x)},g=()=>{h.isBrowser()&&(document.removeEventListener("mousemove",p),document.removeEventListener("touchmove",p),document.removeEventListener("mouseup",g),document.removeEventListener("touchend",g)),e._activeDrag=null};h.isBrowser()&&(document.addEventListener("mousemove",p),document.addEventListener("touchmove",p),document.addEventListener("mouseup",g),document.addEventListener("touchend",g),e._activeDrag={onMove:p,onUp:g})};return e.node.addEventListener("mousedown",i),e.node.addEventListener("touchstart",i),e._dragCleanup=()=>{e.node.removeEventListener("mousedown",i),e.node.removeEventListener("touchstart",i),e._activeDrag&&h.isBrowser()&&(document.removeEventListener("mousemove",e._activeDrag.onMove),document.removeEventListener("touchmove",e._activeDrag.onMove),document.removeEventListener("mouseup",e._activeDrag.onUp),document.removeEventListener("touchend",e._activeDrag.onUp),e._activeDrag=null)},e}}function Hs(t){t.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(W,"g");a.setAttribute("class","svg_select_points");const r=e.node.parentNode;r&&r.appendChild(a);const o={},n=["t","b","l","r","lt","rt","lb","rb"];n.forEach((t,e)=>{const i=new Bs(document.createElementNS(W,"g"));a.appendChild(i.node);const r=s(i,[0,0],e,[],t);o[t]={group:i,handle:r}});const l=()=>{const t=parseFloat(e.attr("x"))||0,s=parseFloat(e.attr("y"))||0,r=parseFloat(e.attr("width"))||0,l=parseFloat(e.attr("height"))||0,c=e.node.getAttribute("transform");c?a.setAttribute("transform",c):a.removeAttribute("transform");const h={t:[t+r/2,s],b:[t+r/2,s+l],l:[t,s+l/2],r:[t+r,s+l/2],lt:[t,s],rt:[t+r,s],lb:[t,s+l],rb:[t+r,s+l]};n.forEach(t=>{o[t]&&h[t]&&i(o[t].group,h[t])})};return l(),e._selectHandles=a,e._selectHandlesMap=o,e._updateSelectPositions=l,e._selectCleanup=()=>{a.parentNode&&a.parentNode.removeChild(a),e._selectHandles=null,e._selectHandlesMap=null,e._updateSelectPositions=null},e},t.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=t=>{const a=s[t];if(!a||!a.group||!a.group.node)return;const r=a.group.node,o=s=>{if(s.button&&0!==s.button)return;s.stopPropagation();const i=("touchstart"===s.type?s.touches[0]:s).clientX,a=e.node.ownerSVGElement;let r=null;a&&(r=a.getScreenCTM());const o=parseFloat(e.attr("x"))||0,n=parseFloat(e.attr("width"))||0,l=s=>{let a=("touchmove"===s.type?s.touches[0]:s).clientX-i;r&&(a/=r.a);let l=o,c=n;"l"===t?(l=o+a,c=n-a):"r"===t&&(c=n+a),c<0&&(c=0),e.attr({x:l,width:c}),e._updateSelectPositions&&e._updateSelectPositions();const h=new CustomEvent("resize",{detail:{el:e}});e.node.dispatchEvent(h)},c=()=>{h.isBrowser()&&(document.removeEventListener("mousemove",l),document.removeEventListener("touchmove",l),document.removeEventListener("mouseup",c),document.removeEventListener("touchend",c));const t=new CustomEvent("resize",{detail:{el:e}});e.node.dispatchEvent(t)};h.isBrowser()&&(document.addEventListener("mousemove",l),document.addEventListener("touchmove",l),document.addEventListener("mouseup",c),document.addEventListener("touchend",c))};r.addEventListener("mousedown",o),r.addEventListener("touchstart",o),i.push(()=>{r.removeEventListener("mousedown",o),r.removeEventListener("touchstart",o)})};return a("l"),a("r"),e._resizeCleanup=()=>{i.forEach(t=>t())},e}}function Ws(){const t=m.createElementNS(W,"svg"),e=new Bs(t);return e.attr({xmlns:W}),e}Os(Ts),ht(Ts),Ys(Ts),Hs(Ts),Ws.xlink="http://www.w3.org/1999/xlink",h.isBrowser()&&void 0===window.SVG&&(window.SVG=Ws),h.isBrowser()?(void 0===window.SVG&&(window.SVG=Ws),void 0===window.Apex&&(window.Apex={})):"undefined"!=typeof global&&(void 0===global.Apex&&(global.Apex={}),void 0===global.SVG&&(global.SVG=Ws));const Gs="__apexcharts_features_v1__";globalThis[Gs]||(globalThis[Gs]=new Map);class Us{static get _featureRegistry(){return globalThis[Gs]}static registerFeatures(t){for(const[e,s]of Object.entries(t))Us._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","drillDown","drillUp","drillToRoot","clearDrilldownCache","paper","getActiveRenderer","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend","keydown","keyup"],this.ctx.animations=new St(this.w,this.ctx),this.ctx.axes=new $t(this.w,this.ctx),this.ctx.core=new is(this.ctx.el,this.w,this.ctx),this.ctx.config=new R({}),this.ctx.data=new gs(this.w,{resetGlobals:()=>this.ctx.core.resetGlobals(),isMultipleY:()=>this.ctx.core.isMultipleY()}),this.ctx.grid=new zt(this.w,this.ctx),this.ctx.graphics=new Mt(this.w,this.ctx),this.ctx.coreUtils=new H(this.w),this.ctx.crosshairs=new Vt(this.w),this.ctx.events=new Gt(this.w,this.ctx),this.ctx.fill=new Tt(this.w),this.ctx.localization=new Ut(this.w),this.ctx.options=new C,this.ctx.responsive=new qt(this.w),this.ctx.series=new ke(this.w,{toggleDataSeries:(...t)=>{var e;return null==(e=this.ctx.legend)?void 0:e.legendHelpers.toggleDataSeries(...t)},revertDefaultAxisMinMax:()=>this.ctx.updateHelpers.revertDefaultAxisMinMax(),updateSeries:(...t)=>this.ctx.updateHelpers._updateSeries(...t)}),this.ctx.theme=new Ee(this.w),this.ctx.formatters=new A(this.w),this.ctx.titleSubtitle=new Pe(this.w),this.ctx.dimensions=new ze(this.w,this.ctx),this.ctx.updateHelpers=new us(this.w,this.ctx),this.ctx.rendererController=new Ms(this.w,this.ctx),this.ctx.renderer=this.ctx.rendererController.active;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=Us._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 r=t.get("morphTypeChange");s.morphTypeChange=r?new r(e,s):null;const o=t.get("drilldown");s.drilldown=o?new o(e,s):null;const n=t.get("perspectives");s.perspectives=n?new n(e,s):null;const l=t.get("storyboard");s.storyboard=l?new l(e,s):null;const c=t.get("history");s.history=c?new c(e,s):null;const h=t.get("linkedViews");s.linkedViews=h?new h(e,s):null;const d=t.get("ink");s.ink=d?new d(e,s):null;const p=t.get("measure");s.measure=p?new p(e,s):null;const g=t.get("contextMenu");s.contextMenu=g?new g(e,s):null;const u=t.get("weave");s.weave=u?new u(e,s):null;const x=t.get("trellis");s.trellis=x?new x(e,s):null;const f=t.get("osThemeWatcher");s.osThemeWatcher=f?new f(e,s):null;const m=t.get("toolbar");Object.defineProperty(s,"toolbar",{get(){var t;return!this._toolbar&&m&&(this._toolbar=new m(e,this)),null!=(t=this._toolbar)?t:null},configurable:!0});const b=t.get("zoomPanSelection");Object.defineProperty(s,"zoomPanSelection",{get(){var t;return!this._zoomPanSelection&&b&&(this._zoomPanSelection=new b(e,this)),null!=(t=this._zoomPanSelection)?t:null},configurable:!0});const y=t.get("keyboardNavigation");Object.defineProperty(s,"keyboardNavigation",{get(){var t;return!this._keyboardNavigation&&y&&(this._keyboardNavigation=new y(e,this)),null!=(t=this._keyboardNavigation)?t:null},configurable:!0})}}class $s{constructor(t){this.ctx=t,this.w=t.w}clear({isUpdating:t}){var e,s,i,a,r,o,n,l,c,h,d,p,g;null==(e=this.ctx.weave)||e.teardown(t),t||(this.w.globals.isDestroyed=!0),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),Rt.invalidateAll(this.w),t?(this.ctx._zoomPanSelection=null,this.ctx._toolbar=null,null==(s=this.ctx._keyboardNavigation)||s.destroy(),this.ctx._keyboardNavigation=null):(null==(i=this.ctx.perspectives)||i.teardown(),this.ctx.perspectives=null,null==(a=this.ctx.storyboard)||a.teardown(),this.ctx.storyboard=null,null==(r=this.ctx.history)||r.teardown(),this.ctx.history=null,null==(o=this.ctx.linkedViews)||o.teardown(),this.ctx.linkedViews=null,null==(n=this.ctx.trellis)||n.teardown(),this.ctx.trellis=null,null==(l=this.ctx.ink)||l.teardown(),this.ctx.ink=null,null==(c=this.ctx.measure)||c.teardown(),this.ctx.measure=null,null==(h=this.ctx.contextMenu)||h.teardown(),this.ctx.contextMenu=null,null==(d=this.ctx.osThemeWatcher)||d.teardown(),this.ctx.osThemeWatcher=null,this.ctx.weave=null,null==(g=null==(p=this.ctx.rendererController)?void 0:p.teardown)||g.call(p),this.ctx.rendererController=null,this.ctx.renderer=null,this.ctx.drilldown=null,this.ctx.morphTypeChange=null,this.ctx.exports=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(h.isBrowser()&&e.Paper){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(t=>{i.removeEventListener(t,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.Paper=null,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 Vs="__apexcharts_unit_layouts__";function js(){return globalThis[Vs]}globalThis[Vs]||(globalThis[Vs]={});const qs="__apexcharts_unit_marks__";function Zs(){return globalThis[qs]}function Ks(t,e){if(!t||"string"!=typeof t)return;const s=function(t,e){if("string"==typeof t){const s=t.trim();return s?Object.freeze({name:e||"anonymous",path:s,viewBox:[0,0,100,100]}):null}if(!t||"object"!=typeof t)return null;if("string"!=typeof t.path||!t.path.trim())return null;const s=Array.isArray(t.viewBox)&&4===t.viewBox.length?t.viewBox.map(Number):[0,0,100,100];return!s.every(t=>isFinite(t))||s[2]<=0||s[3]<=0?null:Object.freeze(l(n({},t),{name:e||t.name||"anonymous",path:t.path.trim(),viewBox:s,fillRule:"evenodd"===t.fillRule?"evenodd":void 0}))}(e,t);s&&(Zs()[t]=s)}globalThis[qs]||(globalThis[qs]={});const Js="__apexcharts_row_sources__";function Qs(){return globalThis[Js]}function ti(t){return t&&Qs()[t]||null}globalThis[Js]||(globalThis[Js]={});const ei="__apexcharts_plugins__";function si(){const t=globalThis;return t[ei]||(t[ei]={}),t[ei]}const ii=new WeakMap;function ai(t,e){if(h.isSSR())return;let s=!1;if(t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){const e=t.getBoundingClientRect();"none"!==t.style.display&&0!==e.width||(s=!0)}const i=new ResizeObserver(i=>{s&&e.call(t,i),s=!0});t.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(t.children).forEach(t=>i.observe(t)):i.observe(t),ii.set(e,i)}function ri(t,e){if(h.isSSR())return;const s=ii.get(e);s&&(s.disconnect(),ii.delete(e))}const oi=globalThis.console;function ni(t){oi.error(t)}function li(t){oi.warn(t)}const ci="APEX-",hi=new Date("2027-07-31T00:00:00Z"),di="__apex_license_v1__";function pi(){const t=globalThis;let e=t[di];return e||(e={key:null,listeners:new Set,result:null},t[di]=e),e}const gi=class{static get licenseKey(){return pi().key}static set licenseKey(t){pi().key=t}static get listeners(){return pi().listeners}static get validationResult(){return pi().result}static set validationResult(t){pi().result=t}static getKey(){return this.licenseKey}static getLicenseStatus(){return this.licenseKey?(this.validationResult=this.validateKey(this.licenseKey),this.validationResult):{expired:!1,signatureVerified:!1,valid:!1}}static isKeyValid(t){return!!t&&this.validateKey(t).valid}static isLicenseValid(){return this.getLicenseStatus().valid}static onChange(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}static setLicense(t){var e,s;if(!t)return this.licenseKey=null,void this.publish({expired:!1,signatureVerified:!1,valid:!1});const i=this.validateKey(t);i.valid||t===this.licenseKey||!(null==(s=this.validationResult)?void 0:s.valid)?(this.licenseKey=t,this.publish(i),i.valid||ni(`[Apex] ${i.message}`)):li(`[Apex] Ignoring license key: ${null!=(e=i.message)?e:"it is not valid"} A valid license is already active on this page.`)}static validateKey(t){const e=this.parseKey(t),s=this.validateStructure(t,e);if(!s.valid||!(null==e?void 0:e.signature))return s;const i=this.verdicts.get(t);return!1===i?{data:e.data,expired:!1,message:"Invalid license key. The license signature does not verify.",signatureVerified:!0,valid:!1}:(void 0===i&&this.verifySignature(t,e,s),l(n({},s),{signatureVerified:!0===i}))}static _resetSignatureState(){this.verdicts.clear(),this.verifying.clear(),this.warnedUnverifiable=!1,this.epoch++}static base64ToBytes(t){const e=t.replace(/-/g,"+").replace(/_/g,"/"),s=e.padEnd(4*Math.ceil(e.length/4),"="),i=globalThis.atob;if("function"!=typeof i)throw new Error("no base64 decoder available");const a=i(s),r=new Uint8Array(a.length);for(let t=0;t<a.length;t++)r[t]=a.charCodeAt(t);return r}static canonicalPayload(t){const e=t.domains&&t.domains.length>0?t.domains.join(","):"";return`v1|${t.issueDate}|${t.expiryDate}|${t.plan}|${e}`}static notify(t){for(const e of this.listeners)try{e(t)}catch(t){}}static parseKey(t){if("string"!=typeof t||!t.startsWith(ci))return null;const e=t.slice(5);if(!e)return null;try{const t=(new TextDecoder).decode(this.base64ToBytes(e)),s=JSON.parse(t);return s.issueDate&&s.expiryDate&&s.plan?{data:{domains:Array.isArray(s.domains)?s.domains:void 0,expiryDate:s.expiryDate,issueDate:s.issueDate,plan:s.plan,valid:!0},signature:"string"==typeof s.sig&&s.sig?s.sig:null}:null}catch(t){return null}}static publish(t){this.validationResult=t,this.notify(t)}static validateStructure(t,e){const s=t=>({expired:!1,message:t,signatureVerified:!1,valid:!1});if("string"!=typeof t||!t.startsWith(ci))return s('Invalid license key format. License key must start with "APEX-".');if(!e)return s("Invalid license key. Unable to decode license data.");const{data:i,signature:a}=e;if(!a&&new Date>=hi)return s("This license key is in the old unsigned format, which is no longer accepted. Please request a replacement key.");if(new Date(i.expiryDate)<new Date)return{data:i,expired:!0,message:`License expired on ${i.expiryDate}. Please renew your license.`,signatureVerified:!1,valid:!1};if(i.domains&&i.domains.length>0){const t="undefined"==typeof location?"":location.hostname;if(!i.domains.some(e=>t===e||t.endsWith(`.${e}`)))return{data:i,expired:!1,message:`License is not valid for this domain (${t}). Allowed domains: ${i.domains.join(", ")}.`,signatureVerified:!1,valid:!1}}return{data:i,expired:!1,signatureVerified:!1,valid:!0}}static verifySignature(t,e,s){return i=this,a=null,r=function*(){var i;if(this.verifying.has(t)||this.verdicts.has(t))return;this.verifying.add(t);const a=this.epoch,r=null==(i=globalThis.crypto)?void 0:i.subtle;if(!r||0===this.publicKeysSpki.length)return this.verifying.delete(t),void(this.warnedUnverifiable||(this.warnedUnverifiable=!0,li(r?"[Apex] No license signing key is configured in this build, so license signatures cannot be verified.":"[Apex] Web Crypto is unavailable (a secure context is required), so the license signature cannot be verified.")));const o=(new TextEncoder).encode(this.canonicalPayload(e.data));let c=!1;for(const t of this.publicKeysSpki){try{const s=yield r.importKey("spki",this.base64ToBytes(t),{name:"ECDSA",namedCurve:"P-256"},!1,["verify"]);c=yield r.verify({hash:"SHA-256",name:"ECDSA"},s,this.base64ToBytes(e.signature),o)}catch(t){c=!1}if(c)break}if(this.verifying.delete(t),this.epoch!==a)return;if(this.verdicts.set(t,c),c){const e=l(n({},s),{signatureVerified:!0});return void(this.licenseKey===t?this.publish(e):this.notify(e))}const h="Invalid license key. The license signature does not verify.",d={data:e.data,expired:!1,message:h,signatureVerified:!0,valid:!1};this.licenseKey===t?this.publish(d):this.notify(d),ni(`[Apex] ${h}`)},new Promise((t,e)=>{var s=t=>{try{n(r.next(t))}catch(t){e(t)}},o=t=>{try{n(r.throw(t))}catch(t){e(t)}},n=e=>e.done?t(e.value):Promise.resolve(e.value).then(s,o);n((r=r.apply(i,a)).next())});var i,a,r}};gi.publicKeysSpki=["MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEQIaK9UMD6n0oR/FIy8QdL0uSzKMQlf1BB+tOrji4/WuHsyRNxeDhVykoSsNURozMi1xhmqWvBH1L//xIfugTPA=="],gi.verdicts=new Map,gi.verifying=new Set,gi.warnedUnverifiable=!1,gi.epoch=0;let ui=gi;const xi=class{static applyStyles(t){Object.assign(t.style,this.CRITICAL_STYLES,{backgroundImage:this.createWatermarkPattern(),backgroundRepeat:"repeat"})}static node(t){return t?t.querySelector(`[${this.WATERMARK_ATTR}]`):null}static add(t,e){return t&&"undefined"!=typeof document?(this.setManaged(t,e),this.paint(t)):null}static exists(t){return!!this.node(t)}static remove(t,e){t&&(this.setManaged(t,e),this.erase(t))}static untrack(t){this.managed.delete(t)}static createWatermarkPattern(){const t=this.WATERMARK_TEXT;return`url("data:image/svg+xml,${encodeURIComponent(`\n      <svg xmlns="http://www.w3.org/2000/svg" width="300" height="200">\n        <text\n          x="50%"\n          y="50%"\n          dominant-baseline="middle"\n          text-anchor="middle"\n          font-family="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Arial, sans-serif"\n          font-size="18"\n          font-weight="600"\n          fill="rgba(134, 134, 134, 0.1)"\n          transform="rotate(-35, 100, 60)"\n        >${t}</text>\n      </svg>\n    `.trim())}")`}static erase(t){var e;null==(e=this.node(t))||e.remove()}static paint(t){let e=this.node(t);return e||(e=document.createElement("div"),e.setAttribute(this.WATERMARK_ATTR,""),t.appendChild(e)),this.applyStyles(e),"function"==typeof getComputedStyle&&"static"===getComputedStyle(t).position&&(t.style.position="relative"),e}static reconcile(){const t=ui.isLicenseValid();for(const e of this.managed)e.isConnected?t?this.erase(e):this.paint(e):this.managed.delete(e)}static setManaged(t,e){!1!==(null==e?void 0:e.manage)?this.track(t):this.managed.delete(t)}static track(t){this.managed.add(t),this.subscribed||(this.subscribed=!0,ui.onChange(()=>{this.reconcile()}))}};xi.WATERMARK_ATTR="data-apexcharts-watermark",xi.WATERMARK_TEXT="APEXCHARTS",xi.ATTR="data-apexcharts-watermark",xi.CRITICAL_STYLES={bottom:"0",display:"block",left:"0",msUserSelect:"none",opacity:"1",pointerEvents:"none",position:"absolute",right:"0",top:"0",userSelect:"none",visibility:"visible",webkitUserSelect:"none",zIndex:"10000"},xi.managed=new Set,xi.subscribed=!1;let fi=xi;const mi=new Set;const bi=new Set(["premium","enterprise"]);function yi(t,e){const s=fi.add(e,{manage:!1});if(!s||"undefined"==typeof MutationObserver)return;if(t._wmNodeObserver&&t._wmObservedNode===s)return;t._wmNodeObserver&&t._wmNodeObserver.disconnect();const i=new MutationObserver(()=>{const t=fi.node(e);t&&(i.disconnect(),fi.applyStyles(t),i.takeRecords(),i.observe(t,{attributes:!0,attributeFilter:["style"]}))});i.observe(s,{attributes:!0,attributeFilter:["style"]}),t._wmNodeObserver=i,t._wmObservedNode=s}function wi(t,e){t._wmWrapObserver&&(t._wmWrapObserver.disconnect(),t._wmWrapObserver=null),t._wmNodeObserver&&(t._wmNodeObserver.disconnect(),t._wmNodeObserver=null),t._wmObservedNode=null;const s=e||t.w&&t.w.dom&&t.w.dom.elWrap;s&&fi.remove(s,{manage:!1})}function vi(t,e){try{if(!h.isBrowser())return;if(t&&t.globals&&t.globals.isDestroyed)return void mi.delete(e);const s=t&&t.dom&&t.dom.elWrap;if(!s)return;const i=function(t,e){const s=t&&t.config&&t.config.chart||{},i=[];"unit"===s.type&&i.push("unit"),e.trellis&&"function"==typeof e.trellis.isActive&&e.trellis.isActive()&&i.push("trellis"),e.storyboard&&e.storyboard._used&&i.push("storyboard");const a=s.link;return e.linkedViews&&a&&(!0===a.enabled||"function"==typeof a.dimension)&&i.push("link"),e.ink&&s.ink&&!0===s.ink.enabled&&i.push("ink"),e.measure&&s.measure&&!0===s.measure.enabled&&i.push("measure"),e.contextMenu&&s.contextMenu&&!0===s.contextMenu.enabled&&i.push("context-menu"),e.perspectives&&e.perspectives._used&&i.push("perspectives"),e.history&&s.history&&!0===s.history.enabled&&i.push("history"),i}(t,e);if(0===i.length)return mi.delete(e),void wi(e,s);mi.add(e);const a=function(t){const e=t&&t.config&&t.config.chart&&t.config.chart.license;if(e)return e;const s=ui.getKey();if(s)return s;const i=h.getApex();return i&&i.license?i.license:null}(t);if(function(t){if(!t)return!1;const e=ui.validateKey(t);if(!e.valid)return!1;const s=e.data&&e.data.plan;return"string"==typeof s&&bi.has(s.toLowerCase())}(a))return void wi(e,s);!function(t,e){if(yi(t,e),"undefined"==typeof MutationObserver||t._wmWrapObserver)return;const s=new MutationObserver(()=>{fi.node(e)||yi(t,e)});s.observe(e,{childList:!0}),t._wmWrapObserver=s}(e,s),function(t,e,s){if(t._premiumLicenseNotified)return;if(t._premiumLicenseNotified=!0,s.length,!e)return;const i=ui.validateKey(e);if(i.valid)return void(i.data&&i.data.plan);ui.getKey()}(e,a,i)}catch(t){}}function Ai(){if(!h.isBrowser())return;const t=new Set,e=h.getApex(),s=e&&e._chartInstances;Array.isArray(s)&&s.forEach(e=>{const s=e&&e.chart;s&&s.w&&!s.w.globals.isDestroyed&&(t.add(s),vi(s.w,s))}),Array.from(mi).forEach(e=>{const s=e&&e.w,i=s&&s.dom&&s.dom.elWrap;s&&!s.globals.isDestroyed&&i&&!1!==i.isConnected?t.has(e)||vi(s,e):mi.delete(e)})}ui.onChange(Ai);const Si=class t{constructor(t,e){c(this,"core"),c(this,"responsive"),c(this,"axes"),c(this,"grid"),c(this,"graphics"),c(this,"coreUtils"),c(this,"crosshairs"),c(this,"events"),c(this,"fill"),c(this,"localization"),c(this,"options"),c(this,"series"),c(this,"theme"),c(this,"formatters"),c(this,"titleSubtitle"),c(this,"dimensions"),c(this,"updateHelpers"),c(this,"tooltip"),c(this,"data"),c(this,"animations"),c(this,"exports"),c(this,"legend"),c(this,"toolbar"),c(this,"zoomPanSelection"),c(this,"keyboardNavigation"),c(this,"annotations"),c(this,"morphTypeChange"),c(this,"timeScale"),c(this,"_keyboardNavigation"),c(this,"_zoomPanSelection"),c(this,"windowResizeHandler"),c(this,"parentResizeHandler"),c(this,"publicMethods",[]),c(this,"eventList",[]),c(this,"_renderPromise",null),c(this,"config"),c(this,"perspectives"),c(this,"storyboard"),c(this,"history"),c(this,"linkedViews"),c(this,"trellis"),c(this,"ink"),c(this,"measure"),c(this,"contextMenu"),c(this,"weave"),c(this,"renderer"),c(this,"rendererController"),this.opts=e,this.ctx=this,this.w=new Y(e).init(),this.el=t,this.w.globals.cuid=w.randomId(),this.w.globals.chartID=this.w.config.chart.id?w.escapeString(this.w.config.chart.id):this.w.globals.cuid,vt(this.w);new Us(this).initModules(),this.lastUpdateOptions=null,this._updateStats={fast:0,fastWithAxes:0,full:0},this.create=this.create.bind(this),h.isBrowser()&&(this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this))}render(){var t,e;if(!(null==(e=null==(t=this.w)?void 0:t.config)?void 0:e.chart))return Promise.reject(new Error("ApexCharts: chart configuration is missing or invalid. Ensure the options object includes a `chart` property."));if(this._renderPromise)return this._renderPromise;const s=new Promise((t,e)=>{var s,i,a,r,o,n,l,c,d,p,g,u,x;if(w.elementExists(this.el)){void 0===Apex._chartInstances&&(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 f=this.w.config.chart.events.beforeMount;"function"==typeof f&&f(this,this.w),this.events.fireEvent("beforeMount",[this,this.w]);const b=this.w.config.trellis,y=!(!b||!(b.by||b.row||b.column)),v=!!(y&&this.trellis&&this.trellis.isActive());if(y&&this.trellis,(null==(i=null==(s=this.w.config.chart)?void 0:s.measure)?void 0:i.enabled)&&this.measure,(null==(r=null==(a=this.w.config.chart)?void 0:a.link)?void 0:r.enabled)&&this.linkedViews,!this.ink){null==(n=null==(o=this.w.config.chart)?void 0:o.ink)||n.enabled,(null!=(c=null==(l=this.w.config.annotations)?void 0:l.points)?c:[]).some(t=>t&&t.draggable)}if((null==(p=null==(d=this.w.config.chart)?void 0:d.contextMenu)?void 0:p.enabled)&&this.contextMenu,(null==(u=null==(g=this.w.config.chart)?void 0:g.history)?void 0:u.enabled)&&this.history,h.isBrowser()){v||(window.addEventListener("resize",this.windowResizeHandler),ai(this.el.parentNode,this.parentResizeHandler));const t=this.el.getRootNode&&this.el.getRootNode(),e=w.is("ShadowRoot",t),s=this.el.ownerDocument;let i=e?t.getElementById("apexcharts-css"):s.getElementById("apexcharts-css");if(!i){i=m.createElementNS("http://www.w3.org/1999/xhtml","style"),i.id="apexcharts-css",i.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  /* Focus indicator colour. Themes override below. */\n  --apexcharts-focus-color: #008FFB;\n}\n\n/* Dark theme & high-contrast: brighter focus colour for sufficient contrast. */\n.apexcharts-canvas .apexcharts-theme-dark,\n.apexcharts-theme-dark.apexcharts-canvas {\n  --apexcharts-focus-color: #FFD500;\n}\n.apexcharts-canvas.apexcharts-high-contrast,\n.apexcharts-high-contrast.apexcharts-canvas {\n  --apexcharts-focus-color: #FFFF00;\n}\n\n/* Visually-hidden aria-live status region (WCAG 4.1.3 Status Messages). */\n.apexcharts-sr-status {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  padding: 0;\n  margin: -1px;\n  overflow: hidden;\n  clip: rect(0, 0, 0, 0);\n  white-space: nowrap;\n  border: 0;\n}\n\n/* Respect OS-level reduced-motion preference (WCAG 2.3.3). */\n@media (prefers-reduced-motion: reduce) {\n  .apexcharts-canvas *,\n  .apexcharts-canvas *::before,\n  .apexcharts-canvas *::after {\n    animation-duration: 0.01ms !important;\n    animation-iteration-count: 1 !important;\n    transition-duration: 0.01ms !important;\n  }\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/* Linked Views (#4): per-mark crossfilter dim. Applied to individual data\n   marks (not whole series) whose x is outside the brushed range. Opacity is\n   overridable per chart via the --apx-cf-dim custom property. */\n.apexcharts-crossfilter-dimmed {\n  transition: opacity .25s ease;\n  opacity: var(--apx-cf-dim, .2)\n}\n\n/* Linked Views (#4): default styling for the built-in crossfilter data table\n   (cf.dataTable). Deliberately light so host styles can override. */\n.apexcharts-cf-table {\n  border-collapse: collapse;\n  width: 100%;\n  font-size: 13px;\n}\n.apexcharts-cf-table caption {\n  caption-side: bottom;\n  text-align: right;\n  padding: 6px 2px;\n  font-size: 12px;\n  opacity: .7\n}\n.apexcharts-cf-table th,\n.apexcharts-cf-table td {\n  padding: 6px 10px;\n  text-align: left;\n  border-bottom: 1px solid rgba(0, 0, 0, .08)\n}\n.apexcharts-cf-table th {\n  font-weight: 600;\n  border-bottom-width: 2px\n}\n.apexcharts-cf-table tbody tr:hover {\n  background: rgba(99, 102, 241, .06)\n}\n\n/* Measure ruler (#18): measure / delta ruler.\n   Theme via these classes or the --apx-measure-* custom properties below\n   (config `chart.measure.colors` overrides both). The ruler group also carries\n   a direction class: apexcharts-measure-up | -down | -flat.\n   Element classes:\n     .apexcharts-measure-band     shaded span band\n     .apexcharts-measure-vline    vertical guide lines\n     .apexcharts-measure-line     free-mode diagonal line\n     .apexcharts-measure-label-bg readout box     .apexcharts-measure-label text\n   Colors are applied as SVG presentation attributes, so any rule you write on\n   these classes overrides them. */\n.apexcharts-canvas {\n  --apx-measure-up: #16a34a;\n  --apx-measure-down: #dc2626;\n  --apx-measure-neutral: #64748b;\n  --apx-measure-guide: #94a3b8;\n}\n.apexcharts-measure-capture {\n  cursor: crosshair;\n}\n\n/* Radial Actions (#chrome): right-click context menu. Theme via these classes\n   or the --apx-menu-* custom properties. */\n.apexcharts-canvas {\n  --apx-menu-bg: #ffffff;\n  --apx-menu-fg: #1e293b;\n  --apx-menu-border: #e2e8f0;\n  --apx-menu-hover: #f1f5f9;\n  --apx-menu-shadow: rgba(15, 23, 42, 0.18);\n}\n.apexcharts-context-menu {\n  min-width: 168px;\n  padding: 4px;\n  border-radius: 8px;\n  background: var(--apx-menu-bg);\n  border: 1px solid var(--apx-menu-border);\n  box-shadow: 0 6px 22px var(--apx-menu-shadow);\n  font-family: Helvetica, Arial, sans-serif;\n  font-size: 13px;\n  z-index: 20;\n  user-select: none;\n}\n.apexcharts-context-menu-item {\n  display: block;\n  width: 100%;\n  box-sizing: border-box;\n  text-align: left;\n  padding: 7px 12px;\n  border: 0;\n  border-radius: 5px;\n  background: transparent;\n  color: var(--apx-menu-fg);\n  font: inherit;\n  cursor: pointer;\n}\n.apexcharts-context-menu-item:hover,\n.apexcharts-context-menu-item--active {\n  background: var(--apx-menu-hover);\n}\n.apexcharts-context-menu-item:focus {\n  outline: none;\n}\n\n/* Ink Layer (#7): the floating note editor card, opened by clicking an\n   ink-managed annotation. Theme via these classes or the --apx-ink-* vars. */\n.apexcharts-canvas {\n  --apx-ink-card-bg: #ffffff;\n  --apx-ink-card-fg: #1e293b;\n  --apx-ink-card-border: #e2e8f0;\n  --apx-ink-card-hover: #f1f5f9;\n  --apx-ink-card-accent: #6366f1;\n  --apx-ink-card-shadow: rgba(15, 23, 42, 0.18);\n}\n.apexcharts-ink-card {\n  position: absolute;\n  z-index: 25;\n  display: flex;\n  flex-direction: column;\n  gap: 6px;\n  padding: 8px;\n  border-radius: 8px;\n  background: var(--apx-ink-card-bg);\n  border: 1px solid var(--apx-ink-card-border);\n  box-shadow: 0 6px 22px var(--apx-ink-card-shadow);\n  font-family: Helvetica, Arial, sans-serif;\n  font-size: 12px;\n  color: var(--apx-ink-card-fg);\n  user-select: none;\n}\n.apexcharts-ink-card-row {\n  display: flex;\n  align-items: center;\n  gap: 4px;\n}\n.apexcharts-ink-card input.apexcharts-ink-editor {\n  flex: 1 1 auto;\n  width: 150px;\n  min-width: 0;\n  box-sizing: border-box;\n  padding: 4px 6px;\n  font: inherit;\n  color: inherit;\n  background: transparent;\n  border: 1px solid var(--apx-ink-card-border);\n  border-radius: 5px;\n}\n.apexcharts-ink-card input.apexcharts-ink-editor:focus {\n  outline: none;\n  border-color: var(--apx-ink-card-accent);\n}\n.apexcharts-ink-btn {\n  flex: 0 0 auto;\n  width: 24px;\n  height: 24px;\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  padding: 0;\n  border: 0;\n  border-radius: 5px;\n  background: transparent;\n  color: inherit;\n  font: inherit;\n  font-size: 12px;\n  line-height: 1;\n  cursor: pointer;\n}\n.apexcharts-ink-btn:hover,\n.apexcharts-ink-btn--active {\n  background: var(--apx-ink-card-hover);\n}\n.apexcharts-ink-btn:focus-visible,\n.apexcharts-ink-swatch:focus-visible {\n  outline: 2px solid var(--apx-ink-card-accent);\n  outline-offset: 1px;\n}\n.apexcharts-ink-btn--bold {\n  font-weight: 700;\n}\n.apexcharts-ink-btn--delete:hover {\n  color: #dc2626;\n}\n.apexcharts-ink-swatch {\n  flex: 0 0 auto;\n  width: 16px;\n  height: 16px;\n  padding: 0;\n  border: 1px solid rgba(100, 116, 139, 0.45);\n  border-radius: 50%;\n  cursor: pointer;\n}\n.apexcharts-ink-swatch--active {\n  box-shadow:\n    0 0 0 2px var(--apx-ink-card-bg),\n    0 0 0 4px var(--apx-ink-card-accent);\n}\n.apexcharts-ink-sep {\n  flex: 0 0 auto;\n  width: 1px;\n  height: 16px;\n  margin: 0 2px;\n  background: var(--apx-ink-card-border);\n}\n.apexcharts-ink-cardlabel {\n  flex: 0 0 auto;\n  font-size: 10px;\n  letter-spacing: 0.4px;\n  text-transform: uppercase;\n  opacity: 0.65;\n  margin-right: 2px;\n}\n.apexcharts-ink-marker-size {\n  flex: 0 0 auto;\n  min-width: 16px;\n  text-align: center;\n  font-variant-numeric: tabular-nums;\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 var(--apexcharts-focus-color, #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 var(--apexcharts-focus-color, #008FFB);\n  outline-offset: 2px;\n}\n\n.apexcharts-series-collapsed {\n  opacity: 0\n}\n\n/* A series still playing its exit tween stays painted so it can visibly shrink\n   away, hiding it on the first frame leaves a hole in a stacked chart for the\n   length of the animation. Dropped once the tween lands. */\n.apexcharts-series-collapsed.apexcharts-series-collapsing {\n  opacity: 1\n}\n\n/* Its labels ride the shrinking marks, but a mark runs out of room for its text\n   well before it reaches zero, so fade them across the exit instead of holding\n   them crisp over a sliver. Duration is set inline from dynamicAnimation.speed. */\n.apexcharts-datalabels.apexcharts-series-collapsing {\n  animation: apexcharts-datalabels-exit var(--apexcharts-dl-exit, 400ms) ease-in\n    forwards;\n}\n\n@keyframes apexcharts-datalabels-exit {\n  from {\n    opacity: 1\n  }\n  to {\n    opacity: 0\n  }\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: var(--apexcharts-focus-color, #008FFB);\n  stroke-width: 2;\n  stroke-opacity: 1;\n}\n\n.apexcharts-tooltip {\n  --apx-tt-bg: #ffffff;\n  /* Shared by the body and the arrow's two outward facets, so the\n   * hairline reads as one continuous outline around the whole shape.\n   * Keep it strong enough to survive on its own: the shadow below is\n   * elevation, not edge definition. */\n  --apx-tt-border: rgba(15, 23, 42, 0.12);\n  /* Elevation, in three layers: a tight contact shadow that anchors the\n   * bottom edge, a directional key shadow for the lift, and a wide\n   * ambient one that grounds the whole box. Each is weaker and more\n   * diffuse than the last.\n   *\n   * A tooltip is unusual in that it floats over *data*, so reach costs\n   * more than it does on a page: every pixel the shadow travels tints a\n   * bar or a line the reader is trying to compare. These numbers are\n   * tuned to keep the near-edge contrast that reads as elevation while\n   * dropping the long low haze that only muddies the plot.\n   *\n   * Note there is deliberately no `0 0 0 1px` ring layer. That used to\n   * stand in for edge definition back when --apx-tt-border was barely\n   * visible; now that the border is a real hairline (and the arrow\n   * shares it) a ring only double-draws the outline, and being spread\n   * rather than offset it leaked ink upward too, flattening the lift.\n   *\n   * `--apx-tt-shadow-dir` flips the whole stack's Y in one place \u2014 see\n   * the `[data-placement=\"bottom\"]` rule further down. */\n  --apx-tt-shadow-dir: 1;\n  --apx-tt-shadow: 0 calc(var(--apx-tt-shadow-dir) * 1px) 2px rgba(15, 23, 42, 0.06), 0 calc(var(--apx-tt-shadow-dir) * 4px) 8px -2px rgba(15, 23, 42, 0.10), 0 calc(var(--apx-tt-shadow-dir) * 12px) 20px -8px rgba(15, 23, 42, 0.14);\n  --apx-tt-arrow-bg: var(--apx-tt-bg);\n  --apx-tt-color: #0f172a;\n  --apx-tt-color-muted: rgba(15, 23, 42, 0.55);\n  border-radius: 8px;\n  background: var(--apx-tt-bg);\n  border: 1px solid var(--apx-tt-border);\n  box-shadow: var(--apx-tt-shadow);\n  color: var(--apx-tt-color);\n  cursor: default;\n  font-size: 13px;\n  left: 0;\n  top: 0;\n  opacity: 0;\n  pointer-events: none;\n  position: absolute;\n  display: flex;\n  flex-direction: column;\n  padding: 2px 0;\n  white-space: nowrap;\n  z-index: 12;\n  transition: opacity .12s ease\n}\n\n/* While the tooltip is visible, smoothly animate position changes\n * between data points. Kept short (160 ms) and ease-out so it stays\n * responsive \u2014 too long would feel laggy when sweeping across many\n * points fast. The position transition is only attached after the\n * first paint (Position.applyTooltipPosition flips `data-positioned`\n * once the tooltip has been placed) so the *first* show doesn't slide\n * the tooltip in from the previously-stale (0,0) coordinates. */\n.apexcharts-tooltip.apexcharts-active {\n  opacity: 1;\n  transition: opacity .12s ease\n}\n.apexcharts-tooltip.apexcharts-active[data-positioned=\"true\"] {\n  transition: opacity .12s ease, left .16s ease-out, top .16s ease-out\n}\n\n.apexcharts-tooltip.apexcharts-theme-light {\n  /* defaults already set above; class kept for backward-compat selectors */\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark {\n  --apx-tt-bg: #1c1c1f;\n  --apx-tt-border: rgba(255, 255, 255, 0.16);\n  /* Dark needs more alpha than light to register at all, but not as much\n   * as it used to: the light rim above now carries the edge, so the\n   * shadow is free to be pure elevation instead of doubling as an\n   * outline. Same geometry as light, heavier ink. */\n  --apx-tt-shadow: 0 calc(var(--apx-tt-shadow-dir) * 1px) 2px rgba(0, 0, 0, 0.24), 0 calc(var(--apx-tt-shadow-dir) * 4px) 8px -2px rgba(0, 0, 0, 0.30), 0 calc(var(--apx-tt-shadow-dir) * 12px) 20px -8px rgba(0, 0, 0, 0.38);\n  --apx-tt-color: #f3f4f6;\n  --apx-tt-color-muted: rgba(243, 244, 246, 0.55);\n}\n\n.apexcharts-tooltip * {\n  font-family: inherit\n}\n\n/* Point-annotation hover tooltip (apexcharts/apexcharts.js#2424). Reuses the\n * glass body/border/shadow from `.apexcharts-tooltip` but holds free-form\n * content, so it needs its own padding, wrapping and a sane max width. */\n.apexcharts-tooltip.apexcharts-annotation-tooltip {\n  padding: 6px 10px;\n  max-width: 240px;\n  white-space: normal;\n  line-height: 1.4;\n  pointer-events: none;\n  z-index: 13\n}\n\n.apexcharts-tooltip-title {\n  padding: 8px 12px 4px;\n  font-size: 12px;\n  font-weight: 600;\n  letter-spacing: 0.01em;\n  color: var(--apx-tt-color-muted);\n  background: transparent;\n  border-bottom: none;\n  margin-bottom: 0\n}\n\n.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title,\n.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {\n  background: transparent;\n  border-bottom: none\n}\n\n/* `fillSeriesColor`: each series-group already paints itself with the\n * series colour. Drop the glass body entirely (transparent bg, no\n * border, no backdrop-filter, no padding) and clip the coloured\n * series-group(s) to the tooltip's rounded corners so they fill the\n * shell edge-to-edge. Text inside the coloured group is forced to\n * white for contrast. */\n.apexcharts-tooltip.apexcharts-tooltip-fill-series {\n  background: transparent;\n  -webkit-backdrop-filter: none;\n  backdrop-filter: none;\n  border: none;\n  padding: 0;\n  overflow: hidden;\n  color: #fff\n}\n\n.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-title {\n  background: rgba(0, 0, 0, 0.22);\n  color: #fff;\n  opacity: 1;\n  padding: 6px 12px\n}\n\n.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-series-group {\n  color: #fff\n}\n\n/* Arrow connector \u2014 a 45\xb0-rotated square straddling the body's edge, so\n * the body's 1px border runs continuously out across the arrow and back.\n * The two facets that face away from the tooltip carry the border; the\n * two that face into it carry none, and the square's opaque fill covers\n * the segment of the body's own border it sits on, hiding the seam.\n *\n * This is why it's a rotated square and not a triangle: `clip-path`\n * erases `border` and `box-shadow` along with everything outside the\n * polygon, which left `filter: drop-shadow` as the only way to suggest\n * an edge \u2014 and a drop-shadow can only ever blur one, never draw a\n * hairline. Nothing here needs a filter.\n *\n * Geometry: a square of side S rotated 45\xb0 reaches S/\u221a2 from its centre\n * to each corner, so S = 10px gives the ~7px tip overhang that\n * ARROW_TIP_OVERHANG assumes (tooltip/constants.js) over a ~14px base.\n * The offsets park the square's *centre* 1px outside the padding box\n * (-6px = -1px border - 10px/2), i.e. exactly on the body's border line,\n * so the two borders meet end to end instead of overlapping or gapping.\n * `box-sizing` must be border-box or the bordered sides would grow the\n * square asymmetrically and knock its centre off that line. */\n.apexcharts-tooltip-arrow {\n  position: absolute;\n  box-sizing: border-box;\n  width: 10px;\n  height: 10px;\n  background: var(--apx-tt-arrow-bg);\n  transform: rotate(45deg);\n  pointer-events: none;\n  top: calc(var(--apx-tt-arrow-y, 50%) - 5px)\n}\n\n/* Which two sides face outward depends on the placement. Under\n * `rotate(45deg)` the square's bottom-left corner swings to the left,\n * top-right to the right, top-left to the top and bottom-right to the\n * bottom \u2014 so the pair of borders below is always the two sharing the\n * corner that ends up as the tip. */\n.apexcharts-tooltip[data-placement=\"right\"] .apexcharts-tooltip-arrow {\n  left: -6px;\n  border-left: 1px solid var(--apx-tt-border);\n  border-bottom: 1px solid var(--apx-tt-border)\n}\n\n.apexcharts-tooltip[data-placement=\"left\"] .apexcharts-tooltip-arrow {\n  right: -6px;\n  border-top: 1px solid var(--apx-tt-border);\n  border-right: 1px solid var(--apx-tt-border)\n}\n\n/* Vertical arrow variants: tooltip is above/below the data point and the\n * arrow points down/up. The base rule above uses `--apx-tt-arrow-y` for\n * left/right placement; for top/bottom we centre on `--apx-tt-arrow-x`\n * instead (set by applyTooltipPosition). */\n.apexcharts-tooltip[data-placement=\"top\"] .apexcharts-tooltip-arrow,\n.apexcharts-tooltip[data-placement=\"bottom\"] .apexcharts-tooltip-arrow {\n  top: auto;\n  left: calc(var(--apx-tt-arrow-x, 50%) - 5px)\n}\n\n.apexcharts-tooltip[data-placement=\"top\"] .apexcharts-tooltip-arrow {\n  bottom: -6px;\n  border-right: 1px solid var(--apx-tt-border);\n  border-bottom: 1px solid var(--apx-tt-border)\n}\n\n.apexcharts-tooltip[data-placement=\"bottom\"] .apexcharts-tooltip-arrow {\n  top: -6px;\n  border-top: 1px solid var(--apx-tt-border);\n  border-left: 1px solid var(--apx-tt-border)\n}\n\n/* When the tooltip is flipped below the data point, the default\n * downward-biased shadow leaves its top edge undefined. Negating the\n * direction casts the whole elevation upward instead, so the shadow\n * falls between the tooltip and the mark above it. One multiplier flips\n * all three layers together; the arrow needs no counterpart, since its\n * border doesn't depend on light direction. */\n.apexcharts-tooltip[data-placement=\"bottom\"] {\n  --apx-tt-shadow-dir: -1\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-flex;\n  align-items: center;\n  justify-content: center;\n  position: relative;\n  width: 12px;\n  height: 12px;\n  margin-right: 6px;\n  vertical-align: middle;\n  color: inherit;\n}\n\n.apexcharts-tooltip-marker svg {\n  width: 100%;\n  height: 100%;\n  display: block;\n}\n\n.apexcharts-tooltip-series-group {\n  padding: 4px 12px;\n  display: none;\n  gap: 8px;\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:last-child,\n.apexcharts-tooltip-series-group:last-child {\n  padding-bottom: 8px\n}\n\n.apexcharts-tooltip-y-group {\n  padding: 6px 0 5px\n}\n\n/* `tooltip.compact`: a tight box instead of a card, for panels a normal card\n   would cover (small multiples, sparklines, tiles). Only the box shrinks, so\n   the arrow and every anchor rule still apply. Rows stay stacked when there\n   are several series (the names are what tells them apart); a one-series\n   chart collapses to a single line, see `-value-only` below. */\n.apexcharts-tooltip.apexcharts-tooltip-compact {\n  padding: 3px 8px;\n  font-size: 11px;\n  line-height: 1.35\n}\n\n.apexcharts-tooltip-compact .apexcharts-tooltip-title {\n  padding: 0;\n  font-size: 11px;\n  white-space: nowrap\n}\n\n.apexcharts-tooltip-compact .apexcharts-tooltip-series-group,\n.apexcharts-tooltip-compact .apexcharts-tooltip-series-group.apexcharts-active:last-child,\n.apexcharts-tooltip-compact .apexcharts-tooltip-series-group:last-child {\n  padding: 0;\n  gap: 5px\n}\n\n.apexcharts-tooltip-compact .apexcharts-tooltip-y-group {\n  padding: 0\n}\n\n.apexcharts-tooltip-compact .apexcharts-tooltip-marker {\n  width: 8px;\n  height: 8px\n}\n\n/* A one-series panel: the series name repeats what the panel header already\n   says, so the value stands alone and the x label becomes its prefix on one\n   line (\"Aug 2024  6.59\"). */\n.apexcharts-tooltip.apexcharts-tooltip-compact.apexcharts-tooltip-value-only {\n  /* The tooltip body is a flex COLUMN by default (title row, then series\n     rows); one series needs no column, so the same box turns into one line. */\n  flex-direction: row;\n  align-items: baseline;\n  gap: 6px\n}\n\n.apexcharts-tooltip-value-only .apexcharts-tooltip-marker {\n  display: none\n}\n\n.apexcharts-tooltip-value-only .apexcharts-tooltip-text-y-label {\n  display: none\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/* X/Y axis tooltips \u2014 small popovers that label the crosshair on the\n * axes. Restyled to match the modern data-tooltip palette: solid white\n * body with a subtle border + soft drop-shadow, smaller font, rounded\n * corners. The arrows still use the CSS border-triangle technique\n * (cheap, crisp at small sizes); their colours flow from CSS variables\n * so light/dark themes only need one override per axis. */\n.apexcharts-xaxistooltip,\n.apexcharts-yaxistooltip {\n  --apx-axt-bg: #ffffff;\n  --apx-axt-border: rgba(15, 23, 42, 0.08);\n  --apx-axt-color: #0f172a;\n  --apx-axt-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.18), 0 1px 3px -1px rgba(15, 23, 42, 0.12);\n  opacity: 0;\n  pointer-events: none;\n  color: var(--apx-axt-color);\n  font-size: 12px;\n  font-weight: 500;\n  text-align: center;\n  border-radius: 6px;\n  position: absolute;\n  z-index: 10;\n  background: var(--apx-axt-bg);\n  border: 1px solid var(--apx-axt-border);\n  box-shadow: var(--apx-axt-shadow)\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark,\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n  --apx-axt-bg: #1c1c1f;\n  --apx-axt-border: rgba(255, 255, 255, 0.1);\n  --apx-axt-color: #f3f4f6;\n  --apx-axt-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.55), 0 1px 3px -1px rgba(0, 0, 0, 0.45)\n}\n\n.apexcharts-xaxistooltip {\n  padding: 4px 8px;\n  transition: .15s ease all\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/* :before paints the 1px border outline of the triangle (slightly larger\n * than :after); :after sits inside and paints the fill \u2014 leaves a 1px\n * ring of :before visible at the edges. */\n.apexcharts-xaxistooltip:after {\n  border-color: transparent;\n  border-width: 5px;\n  margin-left: -5px\n}\n\n.apexcharts-xaxistooltip:before {\n  border-color: transparent;\n  border-width: 6px;\n  margin-left: -6px\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: var(--apx-axt-bg)\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n  border-bottom-color: var(--apx-axt-border)\n}\n\n.apexcharts-xaxistooltip-top:after {\n  border-top-color: var(--apx-axt-bg)\n}\n\n.apexcharts-xaxistooltip-top:before {\n  border-top-color: var(--apx-axt-border)\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n  opacity: 1;\n  transition: .15s ease all\n}\n\n.apexcharts-yaxistooltip {\n  padding: 3px 8px\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: 5px;\n  margin-top: -5px\n}\n\n.apexcharts-yaxistooltip:before {\n  border-color: transparent;\n  border-width: 6px;\n  margin-top: -6px\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: var(--apx-axt-bg)\n}\n\n.apexcharts-yaxistooltip-left:before {\n  border-left-color: var(--apx-axt-border)\n}\n\n.apexcharts-yaxistooltip-right:after {\n  border-right-color: var(--apx-axt-bg)\n}\n\n.apexcharts-yaxistooltip-right:before {\n  border-right-color: var(--apx-axt-border)\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n  opacity: 1\n}\n\n.apexcharts-yaxistooltip-hidden {\n  display: none\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n  pointer-events: none;\n  opacity: 0;\n  transition: .15s ease all\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n  opacity: 1;\n  transition: .15s ease all\n}\n\n.apexcharts-ycrosshairs-hidden {\n  opacity: 0\n}\n\n.apexcharts-selection-rect {\n  cursor: move\n}\n\n.svg_select_shape {\n  stroke-width: 1;\n  stroke-dasharray: 10 10;\n  stroke: black;\n  stroke-opacity: 0.1;\n  pointer-events: none;\n  fill: none;\n}\n\n.svg_select_handle {\n  stroke-width: 3;\n  stroke: black;\n  fill: none;\n}\n\n.svg_select_handle_r {\n  cursor: e-resize;\n}\n\n.svg_select_handle_l {\n  cursor: w-resize;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n  cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n  cursor: move\n}\n\n.apexcharts-menu-icon,\n.apexcharts-measure-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  /* WCAG 2.5.8 Target Size (Minimum): 24\xd724 CSS px hit target. */\n  width: 26px;\n  height: 24px;\n  line-height: 24px;\n  color: #6e8192;\n  text-align: center;\n  /* Reset native <button> chrome \u2014 these are styled via SVG icons. */\n  padding: 0;\n  margin: 0;\n  background: transparent;\n  border: 0;\n  border-radius: 5px;\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  transition: background-color .12s ease, color .12s ease;\n}\n\n.apexcharts-menu-icon svg,\n.apexcharts-measure-icon svg,\n.apexcharts-pan-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-selection-icon svg,\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg {\n  width: 18px;\n  height: 18px;\n  fill: none;\n  stroke: currentColor;\n  stroke-width: 2;\n  stroke-linecap: round;\n  stroke-linejoin: round\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon,\n.apexcharts-theme-dark .apexcharts-measure-icon,\n.apexcharts-theme-dark .apexcharts-pan-icon,\n.apexcharts-theme-dark .apexcharts-reset-icon,\n.apexcharts-theme-dark .apexcharts-selection-icon,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon,\n.apexcharts-theme-dark .apexcharts-zoom-icon,\n.apexcharts-theme-dark .apexcharts-zoomin-icon,\n.apexcharts-theme-dark .apexcharts-zoomout-icon {\n  color: #d4d6dc\n}\n\n.apexcharts-canvas .apexcharts-measure-icon.apexcharts-selected,\n.apexcharts-canvas .apexcharts-pan-icon.apexcharts-selected,\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected,\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected {\n  background: rgba(0, 143, 251, 0.12);\n  color: #008ffb\n}\n\n.apexcharts-theme-light .apexcharts-menu-icon:hover,\n.apexcharts-theme-light .apexcharts-measure-icon:not(.apexcharts-selected):hover,\n.apexcharts-theme-light .apexcharts-pan-icon:not(.apexcharts-selected):hover,\n.apexcharts-theme-light .apexcharts-reset-icon:hover,\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover {\n  background: rgba(15, 23, 42, 0.06);\n  color: #1f2937\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon:hover,\n.apexcharts-theme-dark .apexcharts-measure-icon:not(.apexcharts-selected):hover,\n.apexcharts-theme-dark .apexcharts-pan-icon:not(.apexcharts-selected):hover,\n.apexcharts-theme-dark .apexcharts-reset-icon:hover,\n.apexcharts-theme-dark .apexcharts-selection-icon:not(.apexcharts-selected):hover,\n.apexcharts-theme-dark .apexcharts-zoom-icon:not(.apexcharts-selected):hover,\n.apexcharts-theme-dark .apexcharts-zoomin-icon:hover,\n.apexcharts-theme-dark .apexcharts-zoomout-icon:hover {\n  background: rgba(255, 255, 255, 0.08);\n  color: #fff\n}\n\n.apexcharts-menu-icon,\n.apexcharts-selection-icon {\n  position: relative\n}\n\n.apexcharts-toolbar {\n  position: absolute;\n  z-index: 11;\n  display: inline-flex;\n  align-items: center;\n  gap: 1px;\n  padding: 3px;\n  border-radius: 8px;\n  background: rgba(255, 255, 255, 0.85);\n  backdrop-filter: blur(8px);\n  -webkit-backdrop-filter: blur(8px);\n}\n\n.apexcharts-theme-dark .apexcharts-toolbar {\n  background: rgba(28, 28, 31, 0.82);\n}\n\n.apexcharts-menu {\n  background: rgba(255, 255, 255, 0.95);\n  backdrop-filter: blur(8px);\n  -webkit-backdrop-filter: blur(8px);\n  position: absolute;\n  top: calc(100% + 4px);\n  border: 1px solid rgba(15, 23, 42, 0.08);\n  border-radius: 8px;\n  padding: 4px;\n  right: 0;\n  opacity: 0;\n  min-width: 120px;\n  transition: opacity .15s ease, transform .15s ease;\n  transform: translateY(-2px);\n  pointer-events: none;\n  box-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.12), 0 2px 4px -1px rgba(15, 23, 42, 0.06)\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n  opacity: 1;\n  transform: translateY(0);\n  pointer-events: all\n}\n\n.apexcharts-menu-item {\n  padding: 6px 9px;\n  font-size: 12px;\n  border-radius: 5px;\n  cursor: pointer\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n  background: rgba(15, 23, 42, 0.06)\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n  background: rgba(28, 28, 31, 0.92);\n  border-color: rgba(255, 255, 255, 0.08);\n  color: #f3f4f6;\n  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.4)\n}\n\n.apexcharts-theme-dark .apexcharts-menu-item:hover {\n  background: rgba(255, 255, 255, 0.08)\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-measure-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 var(--apexcharts-focus-color, #008FFB);\n  outline-offset: 1px;\n  border-radius: 5px\n}\n\n/* Focus indicator for hamburger menu items */\n.apexcharts-menu-item:focus-visible {\n  outline: 2px solid var(--apexcharts-focus-color, #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.apexcharts-pie-name-label,\n.apexcharts-pie-name-label-group,\n.apexcharts-pie-label-connector,\n.apexcharts-unit-outer-label,\n.apexcharts-unit-outer-label-group,\n.apexcharts-unit-label-connector {\n  cursor: default;\n  pointer-events: none\n}\n\n.apexcharts-pie-label-connector,\n.apexcharts-unit-label-connector {\n  fill: none\n}\n\n.apexcharts-pie-label-delay,\n.apexcharts-unit-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/* Slower than the pie's, on purpose: these come in while the dots are still\n   easing into place, so a longer fade reads as arriving WITH the crowd. */\n.apexcharts-unit-label-delay {\n  animation-duration: .5s\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>div {\n  content: \" \";\n  display: block;\n  position: absolute;\n  top: 0;\n  left: 0\n}\n\n.resize-triggers>div {\n  height: 100%;\n  width: 100%;\n  background: #eee;\n  overflow: auto\n}\n\n.contract-trigger:before {\n  overflow: hidden;\n  width: 200%;\n  height: 200%\n}\n\n.apexcharts-bar-goals-markers {\n  pointer-events: none\n}\n\n.apexcharts-bar-shadows {\n  pointer-events: none\n}\n\n.apexcharts-rangebar-goals-markers {\n  pointer-events: none\n}\n\n.apexcharts-drilldown-target {\n  cursor: pointer\n}\n\n.apexcharts-breadcrumb {\n  position: absolute;\n  z-index: 11;\n  display: inline-flex;\n  align-items: center;\n  gap: 2px;\n  font-size: 12px;\n  font-family: inherit;\n  padding: 2px 4px\n}\n\n.apexcharts-breadcrumb-item {\n  background: transparent;\n  border: none;\n  padding: 2px 6px;\n  border-radius: 3px;\n  font: inherit;\n  color: inherit;\n  cursor: pointer;\n  line-height: 1.2\n}\n\n.apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current) {\n  background: rgba(0, 0, 0, 0.08)\n}\n\n.apexcharts-breadcrumb-arrow {\n  margin-right: 4px;\n  font-weight: 600;\n  user-select: none\n}\n\n.apexcharts-breadcrumb-current {\n  cursor: default;\n  font-weight: 600;\n  opacity: 0.85\n}\n\n.apexcharts-breadcrumb-separator {\n  opacity: 0.5;\n  user-select: none\n}\n\n.apexcharts-theme-dark .apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current) {\n  background: rgba(255, 255, 255, 0.12)\n}\n\n.apexcharts-drilldown-loading {\n  position: absolute;\n  inset: 0;\n  z-index: 12;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  gap: 10px;\n  font-size: 13px;\n  font-family: inherit;\n  color: inherit;\n  background: rgba(255, 255, 255, 0.62);\n  /* The chart underneath stays interactive-looking but must not take clicks\n     while a level is resolving, or a second drill can start mid-fetch. */\n  cursor: progress\n}\n\n.apexcharts-drilldown-loading-spinner {\n  width: 26px;\n  height: 26px;\n  border-radius: 50%;\n  border: 2.5px solid rgba(0, 0, 0, 0.16);\n  border-top-color: rgba(0, 0, 0, 0.55);\n  animation: apexcharts-drilldown-spin 0.7s linear infinite\n}\n\n.apexcharts-drilldown-loading-text {\n  opacity: 0.8\n}\n\n.apexcharts-theme-dark .apexcharts-drilldown-loading {\n  background: rgba(30, 30, 30, 0.62)\n}\n\n.apexcharts-theme-dark .apexcharts-drilldown-loading-spinner {\n  border-color: rgba(255, 255, 255, 0.22);\n  border-top-color: rgba(255, 255, 255, 0.7)\n}\n\n@keyframes apexcharts-drilldown-spin {\n  to {\n    transform: rotate(360deg)\n  }\n}\n\n@media (prefers-reduced-motion: reduce) {\n  .apexcharts-drilldown-loading-spinner {\n    animation: apexcharts-drilldown-pulse 1.4s ease-in-out infinite\n  }\n\n  @keyframes apexcharts-drilldown-pulse {\n    0%, 100% {\n      opacity: 0.35\n    }\n\n    50% {\n      opacity: 1\n    }\n  }\n}\n\n.apexcharts-disable-transitions * {\n  transition: none !important;\n}\n/* \u2500\u2500 Trellis (#22): small multiples \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.apexcharts-trellis {\n  position: relative;\n}\n.apexcharts-trellis-grid {\n  display: grid;\n}\n.apexcharts-trellis-cell {\n  min-width: 0;\n  position: relative;\n}\n.apexcharts-trellis-header {\n  font-size: 12px;\n  font-weight: 600;\n  line-height: 22px;\n  height: 22px;\n  text-align: center;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  color: var(--apx-fore, #373d3f);\n}\n.apexcharts-trellis-title {\n  font-size: 14px;\n  font-weight: 700;\n  padding: 2px 0 6px;\n  color: var(--apx-fore, #373d3f);\n}\n/* Edge-label policy: a muted cell hides its axis-label INK, never the label\n   SPACE \u2014 every panel keeps the identical plot rectangle, and flipping the\n   policy on a resize is a class toggle, not a re-render. */\n.apexcharts-trellis-mute-y .apexcharts-yaxis {\n  opacity: 0;\n}\n.apexcharts-trellis-mute-x .apexcharts-xaxis {\n  opacity: 0;\n}\n/* The shared toolbar floats at the top-right, so a grid that has one starts\n   below it: from four columns on, the last cell's header (or a 2-D column\n   strip label) would otherwise run under the buttons. One band for the whole\n   grid, not per panel. */\n.apexcharts-trellis-has-toolbar {\n  padding-top: 24px;\n}\n/* 2-D faceting (P4): column labels once across the top, row labels once\n   down the left. The row strip column is auto-sized; panel columns stay\n   equal fractions, so panel alignment is independent of the strip width. */\n.apexcharts-trellis-strip {\n  font-size: 12px;\n  font-weight: 600;\n  color: var(--apx-fore, #373d3f);\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n.apexcharts-trellis-strip-column {\n  text-align: center;\n  line-height: 22px;\n  height: 22px;\n  align-self: end;\n}\n.apexcharts-trellis-strip-row {\n  align-self: center;\n  max-width: 140px;\n  padding-right: 6px;\n}\n/* Empty (row, column) combinations. 'placeholder' keeps a REAL panel with a\n   quiet label; 'skip' shows the tinted skeleton; 'hide' shows nothing while\n   keeping the grid slot. */\n.apexcharts-trellis-cell-empty {\n  position: relative;\n}\n.apexcharts-trellis-empty-label {\n  position: absolute;\n  inset: 0;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  font-size: 12px;\n  color: var(--apx-fore, #373d3f);\n  opacity: 0.45;\n  pointer-events: none;\n}\n.apexcharts-trellis-cell-hidden > * {\n  visibility: hidden;\n}\n/* P5: one shared gradient strip is a heatmap grid's legend. The slot is\n   content-sized inline (the strip svg's own box); centering is its own. */\n.apexcharts-trellis-gradient-legend {\n  margin: 10px auto 0;\n}\n/* Virtualization (P2): an unmounted panel's mount div reserves the exact\n   panel height (inline min-height) so page height and scroll position never\n   shift; the skeleton itself is a quiet tinted block. Deliberately not\n   animated: a shimmering grid of 200 placeholders is noise. */\n.apexcharts-trellis-panel.apexcharts-trellis-skeleton {\n  background: var(--apx-fore, #373d3f);\n  opacity: 0.05;\n  border-radius: 4px;\n}\n/* tooltip: 'panel' \u2014 the group still syncs every panel's crosshair, but only\n   the hovered cell shows its tooltip cards. */\n.apexcharts-trellis[data-tooltip-mode='panel'] .apexcharts-trellis-cell:not(:hover) .apexcharts-tooltip,\n.apexcharts-trellis[data-tooltip-mode='panel'] .apexcharts-trellis-cell:not(:hover) .apexcharts-xaxistooltip,\n.apexcharts-trellis[data-tooltip-mode='panel'] .apexcharts-trellis-cell:not(:hover) .apexcharts-yaxistooltip {\n  opacity: 0 !important;\n}\n/* tooltip: 'grid' (P3) \u2014 ALL per-panel tooltip ink is hidden (the group\n   still computes it; the trellis card reads it) and one trellis-owned card\n   follows the cursor with one row per panel. */\n.apexcharts-trellis[data-tooltip-mode='grid'] .apexcharts-trellis-cell .apexcharts-tooltip,\n.apexcharts-trellis[data-tooltip-mode='grid'] .apexcharts-trellis-cell .apexcharts-xaxistooltip,\n.apexcharts-trellis[data-tooltip-mode='grid'] .apexcharts-trellis-cell .apexcharts-yaxistooltip {\n  opacity: 0 !important;\n}\n.apexcharts-trellis-tooltip {\n  position: absolute;\n  top: 0;\n  left: 0;\n  z-index: 14;\n  pointer-events: none;\n  opacity: 0;\n  transition: opacity 0.1s ease;\n  background: var(--apx-bg, #fff);\n  color: var(--apx-fore, #373d3f);\n  border: 1px solid rgba(120, 120, 120, 0.25);\n  border-radius: 5px;\n  box-shadow: 2px 2px 6px -4px rgba(0, 0, 0, 0.4);\n  font-size: 12px;\n  min-width: 140px;\n  max-width: 320px;\n}\n.apexcharts-trellis-tooltip-active {\n  opacity: 1;\n}\n.apexcharts-trellis-tooltip .apexcharts-tooltip-title {\n  padding: 5px 10px;\n  font-weight: 600;\n  background: rgba(120, 120, 120, 0.08);\n  border-bottom: 1px solid rgba(120, 120, 120, 0.18);\n  margin-bottom: 2px;\n}\n.apexcharts-trellis-tooltip-row {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 14px;\n  padding: 2px 10px;\n  line-height: 1.6;\n}\n.apexcharts-trellis-tooltip-row-active {\n  background: rgba(120, 120, 120, 0.1);\n  font-weight: 600;\n}\n.apexcharts-trellis-tooltip-key {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n.apexcharts-trellis-tooltip-vals {\n  display: flex;\n  gap: 10px;\n  white-space: nowrap;\n}\n.apexcharts-trellis-tooltip-val {\n  display: inline-flex;\n  align-items: center;\n  gap: 5px;\n}\n.apexcharts-trellis-tooltip-marker {\n  width: 8px;\n  height: 8px;\n  border-radius: 50%;\n  display: inline-block;\n  flex: none;\n}\n/* Panel promotion (P3): the promoted cell spans the grid; the rest park.\n   The promoted panel is the only visible one, so both its axes unmute. */\n.apexcharts-trellis-cell-promoted {\n  grid-column: 1 / -1;\n}\n.apexcharts-trellis-cell-parked {\n  display: none;\n}\n.apexcharts-trellis-cell-promoted.apexcharts-trellis-mute-y .apexcharts-yaxis,\n.apexcharts-trellis-cell-promoted.apexcharts-trellis-mute-x .apexcharts-xaxis {\n  opacity: 1;\n}\n.apexcharts-trellis-header-clickable {\n  cursor: pointer;\n}\n.apexcharts-trellis-header-clickable:hover {\n  text-decoration: underline;\n  text-underline-offset: 3px;\n}\n.apexcharts-trellis-breadcrumb {\n  display: flex;\n  align-items: center;\n  gap: 6px;\n  font-size: 12px;\n  padding: 2px 0 6px;\n  color: var(--apx-fore, #373d3f);\n}\n.apexcharts-trellis-breadcrumb-back {\n  border: none;\n  background: none;\n  padding: 0;\n  font-size: 12px;\n  cursor: pointer;\n  color: var(--apx-accent, #008ffb);\n}\n.apexcharts-trellis-breadcrumb-back:hover {\n  text-decoration: underline;\n}\n.apexcharts-trellis-breadcrumb-sep {\n  opacity: 0.5;\n}\n.apexcharts-trellis-breadcrumb-current {\n  font-weight: 600;\n}\n/* The toolbar download menu (P3). */\n.apexcharts-trellis-menu {\n  position: absolute;\n  top: 26px;\n  right: 0;\n  display: none;\n  flex-direction: column;\n  min-width: 132px;\n  background: var(--apx-bg, #fff);\n  border: 1px solid rgba(120, 120, 120, 0.25);\n  border-radius: 5px;\n  box-shadow: 2px 2px 6px -4px rgba(0, 0, 0, 0.4);\n  padding: 4px;\n  z-index: 15;\n}\n.apexcharts-trellis-menu-open {\n  display: flex;\n}\n.apexcharts-trellis-menu-item {\n  border: none;\n  background: none;\n  text-align: left;\n  font-size: 12px;\n  padding: 5px 8px;\n  border-radius: 3px;\n  cursor: pointer;\n  color: var(--apx-fore, #373d3f);\n}\n.apexcharts-trellis-menu-item:hover {\n  background: rgba(120, 120, 120, 0.12);\n}\n.apexcharts-trellis-toolbar {\n  position: absolute;\n  top: 0;\n  right: 0;\n  display: flex;\n  gap: 2px;\n  z-index: 12;\n}\n.apexcharts-trellis-tool {\n  border: 0;\n  background: transparent;\n  padding: 2px;\n  cursor: pointer;\n  border-radius: 3px;\n  color: #6e8192;\n  line-height: 0;\n}\n.apexcharts-trellis-tool:hover {\n  color: var(--apx-fore, #373d3f);\n}\n.apexcharts-trellis-tool.apexcharts-selected {\n  color: var(--apx-accent, #008ffb);\n}\n.apexcharts-trellis-legend {\n  display: flex;\n  flex-wrap: wrap;\n  justify-content: center;\n  gap: 4px 14px;\n  padding: 8px 10px 2px;\n}\n.apexcharts-trellis-legend-item {\n  display: flex;\n  align-items: center;\n  gap: 6px;\n  cursor: pointer;\n  line-height: 1;\n}\n.apexcharts-trellis-legend-item .apexcharts-legend-marker {\n  width: 12px;\n  height: 12px;\n  border-radius: 50%;\n  display: inline-block;\n}\n.apexcharts-trellis-legend-item .apexcharts-legend-text {\n  font-size: 12px;\n  color: var(--apx-fore, #373d3f);\n}\n.apexcharts-trellis-legend-item.apexcharts-inactive-legend {\n  opacity: 0.45;\n}\n";const a=(null==(x=this.opts.chart)?void 0:x.nonce)||this.w.config.chart.nonce;a&&i.setAttribute("nonce",a),e?t.prepend(i):!1!==this.w.config.chart.injectStyleSheet&&s.head.appendChild(i)}}if(v)return void this.trellis.render().then(()=>{vi(this.w,this),"function"==typeof this.w.config.chart.events.mounted&&this.w.config.chart.events.mounted(this,this.w),this.events.fireEvent("mounted",[this,this.w]),t(this)}).catch(t=>{var s,i;const a=t instanceof Error?t:new Error(String(t)),r=a;r.chartId=null==(i=null==(s=this.w)?void 0:s.globals)?void 0:i.chartID,r.el=this.el,e(a)});const A=this.create(this.w.config.series,{});if(!A)return t(this);this.mount(A).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]),t(A)}).catch(t=>{var s,i;const a=t instanceof Error?t:new Error(String(t)),r=a;r.chartId=null==(i=null==(s=this.w)?void 0:s.globals)?void 0:i.chartID,r.el=this.el,e(a)})}else e(new Error("Element not found"))});return this._renderPromise=s,s.catch(()=>{this._renderPromise===s&&(this._renderPromise=null)}),s}create(t,e){var s,i,a,r,o,n;const l=this.w;if(!this.core){new Us(this).initModules()}const c=this.w.globals;if(c.noData=!1,c.animationEnded=!1,!w.elementExists(this.el))return c.animationEnded=!0,null;if(this.responsive.checkResponsiveConfig(e),vt(l),l.config.xaxis.convertedCatToNumeric){new N(l.config).convertCatToNumericXaxis(l.config,this.ctx)}if(this.core.setupElements(),"treemap"===l.config.chart.type&&(l.config.grid.show=!1,l.config.yaxis[0].show=!1),0===c.svgWidth)return c.animationEnded=!0,null;let d=t;t.forEach((t,e)=>{t.hidden&&(d=this.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:e}))});const p=H.checkComboSeries(d,l.config.chart.type);c.comboCharts=p.comboCharts,c.comboBarCount=p.comboBarCount;const g=d.every(t=>t.data&&0===t.data.length);(0===d.length||g&&c.collapsedSeries.length<1)&&this.series.handleNoData(),h.isBrowser()&&this.events.setupEventHandlers();const u=this.data.parseData(d);this._writeParsedSeriesData(u.seriesData),this._writeParsedRangeData(u.rangeData),this._writeParsedCandleData(u.candleData),this._writeParsedLabelData(u.labelData),this._writeParsedAxisFlags(u.axisFlags),null==(s=this.rendererController)||s.resolve(),null==(i=this.weave)||i.dispatch("afterParse"),this.theme.init();new Et(this.w,this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),c.noData&&c.collapsedSeries.length!==l.seriesData.series.length&&!l.config.legend.showForSingleSeries||null==(a=this.legend)||a.init(),this.series.hasAllSeriesEqualX(),c.axisCharts&&(this.core.coreCalculations(),"category"!==l.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar&&(this.ctx.toolbar.minX=l.globals.minX,this.ctx.toolbar.maxX=l.globals.maxX)),this.formatters.heatmapLabelFormatters();new H(this.w).getLargestMarkerSize();const x=this.dimensions.plotCoords();this._writeLayoutCoords(x.layout);const f=this.core.xySettings();null==(r=this.weave)||r.dispatch("afterScales",{xyRatios:f}),this.grid.createGridMask();const m=this.core.plotChartType(d,f),b=new Nt(this.w,this);b.bringForward(),l.config.dataLabels.background.enabled&&b.dataLabelsBackground(),this.core.shiftGraphPosition(),null==(n=null==(o=this.legend)?void 0:o.heatmapGradientLegend)||n.repositionToPlot(),l.globals.dataPoints>50&&l.dom.elWrap.classList.add("apexcharts-disable-transitions");return{elGraph:m,xyRatios:f,dimensions:{plot:{left:l.layout.translateX,top:l.layout.translateY,width:l.layout.gridWidth,height:l.layout.gridHeight}}}}mount(t=null){const e=this,s=e.w;return new Promise((i,a)=>{var r,o,n,l,c,d,p,g,u,x;if(null===e.el)return a(new Error("Not enough data to display or target element not found"));s.globals.allSeriesCollapsed&&e.series.handleNoData(),e.grid=new zt(e.w,e);const f=e.grid.drawGrid(),m=Us._featureRegistry.get("annotations");if(e.annotations=m?new m(e.w,{theme:e.theme,timeScale:e.timeScale}):null,null==(r=e.annotations)||r.drawImageAnnos(),null==(o=e.annotations)||o.drawTextAnnos(),"back"===s.config.grid.position&&(f&&s.dom.elGraphical.add(f.el),(null==(n=null==f?void 0:f.elGridBorders)?void 0:n.node)&&s.dom.elGraphical.add(f.elGridBorders)),Array.isArray(t.elGraph))for(let e=0;e<t.elGraph.length;e++)s.dom.elGraphical.add(t.elGraph[e]);else s.dom.elGraphical.add(t.elGraph);"front"===s.config.grid.position&&(f&&s.dom.elGraphical.add(f.el),(null==(l=null==f?void 0:f.elGridBorders)?void 0:l.node)&&s.dom.elGraphical.add(f.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,f);const b=new Xt(this.w,this.ctx,f),y=new Wt(this.w,{theme:this.theme,timeScale:this.timeScale},f);if(null!==f&&(b.xAxisLabelCorrections(),y.setYAxisTextAlignments(),s.config.yaxis.map((t,e)=>{-1===s.globals.ignoreYAxisIndexes.indexOf(e)&&y.yAxisTitleRotate(e,t.opposite)})),null==(c=e.annotations)||c.drawAxesAnnotations(),!s.globals.noData){if(h.isBrowser()&&s.config.tooltip.enabled&&!s.globals.noData&&(null==(d=e.w.globals.tooltip)||d.drawTooltip(t.xyRatios)),s.config.chart.accessibility.enabled&&s.config.chart.accessibility.keyboard.enabled&&s.config.chart.accessibility.keyboard.navigation.enabled&&(null==(p=e.keyboardNavigation)||p.init()),h.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.config.chart.pan.enabled)&&(null==(g=e.zoomPanSelection)||g.init({xyRatios:t.xyRatios}));else{const t=s.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach(e=>{t[e]=!1})}s.config.chart.toolbar.show&&!s.globals.allSeriesCollapsed&&(null==(u=e.toolbar)||u.createToolbar())}null==(x=e.weave)||x.dispatch("draw",{pass:"full",xyRatios:null==t?void 0:t.xyRatios}),s.globals.memory.methodsToExec.length>0&&s.globals.memory.methodsToExec.forEach(t=>{t.method(t.params,!1,t.context)}),s.globals.axisCharts||s.globals.noData||e.core.resizeNonAxisCharts(),vi(s,e),i(e)})}destroy(){var t;this.trellis&&this.trellis.teardown(),this._renderPromise=null,h.isBrowser()&&(window.removeEventListener("resize",this.windowResizeHandler),ri(this.el.parentNode,this.parentResizeHandler),clearTimeout(null!=(t=this.w.globals.resizeTimer)?t:void 0));const e=this.w.config.chart.id;var s;e&&Array.isArray(Apex._chartInstances)&&Apex._chartInstances.forEach((t,s)=>{t.id===w.escapeString(e)&&Apex._chartInstances.splice(s,1)}),this._keyboardNavigation&&this._keyboardNavigation.destroy(),wi(this),s=this,mi.delete(s),new $s(this.ctx).clear({isUpdating:!1})}updateOptions(e,s=!1,i=!0,a=!0,r=!0){const o=this.w;if(e&&"series"in e&&!Array.isArray(e.series)&&delete(e=n({},e)).series,this.trellis&&this.trellis._mounted)return this.opts=w.extend(this.opts||{},e||{}),this.w.config=w.extend(o.config,e||{}),this.trellis.teardown(),this.render();if(o.interact.selection=void 0,this.lastUpdateOptions){if(w.shallowEqual(this.lastUpdateOptions,e))return Promise.resolve(this);if(e.series&&this.lastUpdateOptions.series&&!t._optionsTooBigToCompare(e)&&w.stringifyForCompare(this.lastUpdateOptions.series)===w.stringifyForCompare(e.series)){const t=n({},e),s=n({},this.lastUpdateOptions);if(delete t.series,delete s.series,w.shallowEqual(t,s))return Promise.resolve(this)}}return e.series&&(this.data.resetParsingFlags(),this.series.resetSeries(!1,!0,!1),e.series.length&&e.series[0].data&&(e.series=e.series.map((t,e)=>this.updateHelpers._extendSeries(t,e))),this.updateHelpers.revertDefaultAxisMinMax()),e.xaxis&&(e=this.updateHelpers.forceXAxisUpdate(e)),e.yaxis&&(e=this.updateHelpers.forceYAxisUpdate(e)),o.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),e.theme&&(e=this.theme.updateThemeOptions(e)),this.updateHelpers._updateOptions(e,s,i,a,r)}updateSeries(t=[],e=!0,s=!0){return Array.isArray(t)?this.trellis&&this.trellis._mounted?this.trellis.updateSeries(t,e):(this.data.resetParsingFlags(),this.series.prepareDataUpdate(),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,s)):Promise.resolve(this)}appendSeries(t,e=!0,s=!0){this.data.resetParsingFlags();const i=this.w.config.series.slice();return i.push(t),this.series.prepareDataUpdate(),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.w.config.chart.animations.enabled&&s.series.getPreviousPaths();const i=s.w.globals.histogramRawSeries;if(i){for(let e=0;e<i.length;e++){const s=t[e];if(s&&Array.isArray(s.data)&&Array.isArray(i[e].data))for(let t=0;t<s.data.length;t++)i[e].data.push(s.data[t])}return this.update()}const a=s.w.config.series.slice();for(let e=0;e<a.length;e++)if(null!==t[e]&&void 0!==t[e]){const s=t[e],i=a[e];for(let t=0;t<s.data.length;t++)i.data.push(s.data[t])}return function(t,e){const s=e.config.chart.streaming;if(!s||!s.enabled)return;const i=s.maxPoints,a=e.config.xaxis.range,r=t=>null==t?null:Array.isArray(t)?"number"==typeof t[0]?t[0]:null:"object"==typeof t&&"number"==typeof t.x?t.x:null;t.forEach(t=>{var e;const s=null==t?void 0:t.data;if(!Array.isArray(s)||s.length<2)return;if("number"==typeof i&&i>0)return void(s.length>i&&(t.data=s.slice(s.length-i)));if(!a)return;const o=r(s[s.length-1]),n=r(s[0]);if(null==o||null==n||o<=n)return;const l=(o-n)/(s.length-1),c=o-a-2*l;let h=0;for(;h<s.length&&(null!=(e=r(s[h]))?e:c)<c;)h++;h>0&&(t.data=s.slice(h))})}(a,s.w),s.w.config.series=a,e&&(s.w.globals.initialSeries=s.w.config.series),this.update()}static _optionsTooBigToCompare(t){const e=t&&t.series;if(!Array.isArray(e))return!1;let s=0;for(let t=0;t<e.length;t++){const i=e[t]&&e[t].data;if(s+=Array.isArray(i)?i.length:1,s>1e3)return!0}return!1}update(e){return new Promise((s,i)=>{if(e&&this.lastUpdateOptions&&!t._optionsTooBigToCompare(e)&&w.stringifyForCompare(this.lastUpdateOptions)===w.stringifyForCompare(e))return s(this);this.lastUpdateOptions=e&&!t._optionsTooBigToCompare(e)?w.clone(e):null,new $s(this.ctx).clear({isUpdating:!0});const a=this.create(this.w.config.series,null!=e?e:{});if(!a)return s(this);this.mount(a).then(()=>{var t;null==(t=this.morphTypeChange)||t.applyChromeFade(),xe(this.w),Ce(this.w),"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,s(this)}).catch(t=>{i(t)})})}_fastAxisChromeRefresh(t){const e=this.w,s=e.globals;this._fastAxisBailReason="";try{if(s.isBarHorizontal)return this._fastAxisBailReason="barHorizontal",!1;if(e.config.chart.sparkline.enabled)return!0;const t=e.config.annotations;if(t&&(t.yaxis&&t.yaxis.length||t.xaxis&&t.xaxis.length||t.points&&t.points.length||t.texts&&t.texts.length||t.images&&t.images.length))return this._fastAxisBailReason="annotations",!1;if(e.config.chart.ink&&e.config.chart.ink.enabled)return this._fastAxisBailReason="ink",!1;const i=this.dimensions;if(!i||!i.dimYAxis)return this._fastAxisBailReason="noDimensions",!1;const a=e.layout.yLabelsCoords,r=e.layout.yTitleCoords,o=i.dimYAxis.getyAxisLabelsCoords(),n=i.dimYAxis.getyAxisTitleCoords();e.layout.yLabelsCoords=[],e.layout.yTitleCoords=[],e.config.yaxis.map((t,s)=>{e.layout.yLabelsCoords.push({width:o[s].width,index:s}),e.layout.yTitleCoords.push({width:n[s].width,index:s})});const l=i.dimYAxis.getTotalYAxisWidth();if(l>i.yAxisWidth+2)return e.layout.yLabelsCoords=a,e.layout.yTitleCoords=r,this._fastAxisBailReason=`labelWidth ${l} > ${i.yAxisWidth}`,!1;const c=e.dom.elGraphical.node,h=c.querySelector(".apexcharts-grid"),d=c.querySelector(".apexcharts-grid-borders");if(!h)return this._fastAxisBailReason="missingGridNode",!1;const p=h.parentNode,g=d?d.nextSibling:h.nextSibling;h.remove(),d&&d.remove(),c.querySelectorAll(".apexcharts-xaxis-tick").forEach(t=>t.remove()),this.grid=new zt(e,this);const u=this.grid.drawGrid();u&&u.el&&(p.insertBefore(u.el.node,g),u.elGridBorders&&u.elGridBorders.node&&p.insertBefore(u.elGridBorders.node,g));const x=new Xt(this.w,this.ctx,u),f=c.querySelector(".apexcharts-xaxis");if(f){const t=f.parentNode,e=f.nextSibling;f.remove();const s=x.drawXaxis();t.insertBefore(s.node,e)}const m=new Wt(this.w,{theme:this.theme,timeScale:this.timeScale},u);for(let t=0;t<e.config.yaxis.length;t++){if(-1!==s.ignoreYAxisIndexes.indexOf(t))continue;const i=e.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}']`);if(!i)return this._fastAxisBailReason="missingYAxisNode",!1;const a=i.parentNode;if(!a)return this._fastAxisBailReason="missingYAxisParent",!1;const r=i.nextSibling;i.remove();const o=m.drawYaxis(t);a.insertBefore(o.node,r)}return null!==u&&(x.xAxisLabelCorrections(),m.setYAxisTextAlignments(),e.config.yaxis.map((t,e)=>{-1===s.ignoreYAxisIndexes.indexOf(e)&&m.yAxisTitleRotate(e,t.opposite)})),!0}catch(t){return this._fastAxisBailReason="error: "+(t&&t.message),!1}}fastUpdate(t,e){return new Promise((s,i)=>{var a,r,o;try{const n=this.w,l=n.globals;l.shouldAnimate=t,l.dataChanged=!0,l.animationEnded=!1,Rt.invalidateSelectors(n);const c=n.globals;c.maxY=-Number.MAX_VALUE,c.minY=Number.MIN_VALUE,c.minYArr=[],c.maxYArr=[],c.maxX=-Number.MAX_VALUE,c.minX=Number.MAX_VALUE,c.initialMaxX=-Number.MAX_VALUE,c.initialMinX=Number.MAX_VALUE,c.yAxisScale=[],c.xAxisScale=null,c.xAxisTicksPositions=[],c.xRange=0,c.yRange=[],c.zRange=0,c.xTickAmount=0,c.multiAxisTickAmount=0,c.pointsArray=[],c.barCanvasCoords=null,c.dataLabelsRects=[],c.lastDrawnDataLabelsIndexes=[],c.textRectsCache=new Map,c.domCache=new Map,c.cachedSelectors={},c.disableZoomIn=!1,c.disableZoomOut=!1,l.axisCharts&&(this.core.coreCalculations(),"category"!==n.config.xaxis.type&&this.formatters.setLabelFormatters()),this.formatters.heatmapLabelFormatters();const d=this.core.xySettings();this._zoomPanSelection&&(this._zoomPanSelection.xyRatios=d);const p=JSON.stringify({y:(l.yAxisScale||[]).map(t=>t?t.result:null),xMin:l.minX,xMax:l.maxX}),g=l.axisCharts&&null!=e&&p!==e;if(g&&!this._fastAxisChromeRefresh(d))return this._updateStats.full++,this.update().then(()=>s(this)).catch(i);g?this._updateStats.fastWithAxes++:this._updateStats.fast++,null==(a=this.weave)||a.dispatch("afterScales",{pass:"fast",xyRatios:d});const u=this.ctx.renderer,x=!!(u&&"canvas"===u.kind&&u.canRepaintInPlace&&u.canRepaintInPlace());x&&(u._repaintHostInPlace=!0);const f=n.dom.elGraphical.node;f.querySelectorAll((x?"":".apexcharts-canvas-series-wrap, ")+".apexcharts-plot-series, .apexcharts-series, .apexcharts-datalabels, .apexcharts-datalabels-background").forEach(t=>{var e;return null==(e=t.parentNode)?void 0:e.removeChild(t)});const m=this.core.plotChartType(n.config.series,d),b=f.querySelector(".apexcharts-grid"),y=f.querySelector(".apexcharts-xaxis"),w=Array.isArray(m)?m:[m],v=b&&"front"===n.config.grid.position?b:y;v?w.forEach(t=>{const e=t&&t.node?t.node:t;e&&f.insertBefore(e,v)}):w.forEach(t=>{n.dom.elGraphical.add(t)});const A=new Nt(n,this);A.bringForward(),n.config.dataLabels.background.enabled&&A.dataLabelsBackground(),l.streamScrolled||xe(n),Ce(n),h.isBrowser()&&n.config.tooltip.enabled&&!l.noData&&(null==(r=n.globals.tooltip)||r.drawTooltip(d)),null==(o=this.weave)||o.dispatch("draw",{pass:"fast",xyRatios:d}),"function"==typeof n.config.chart.events.updated&&n.config.chart.events.updated(this,n),this.events.fireEvent("updated",[this,n]),vi(n,this),l.isDirty=!0,s(this)}catch(t){i(t)}})}getSyncedCharts(){const t=this.getGroupedCharts();return t.splice(0,0,this),t}getPanels(){return this.trellis?this.trellis.getPanels():[]}getPanel(t){return this.trellis?this.trellis.getPanel(t):null}getGroupedCharts(){return Apex._chartInstances.filter(t=>this!==t.chart&&!!this.w.config.chart.group&&this.w.config.chart.group===t.group).map(t=>t.chart)}static getChartByID(t){const e=w.escapeString(t);if(!Apex._chartInstances)return;const s=Apex._chartInstances.filter(t=>t.id===e)[0];return s&&s.chart}static trellis(e,s){if(!Us._featureRegistry.get("trellis"))return null;const i=new t(e,s);return i.render(),i}static initOnLoad(){var e;const s=document.querySelectorAll("[data-apexcharts]");for(let i=0;i<s.length;i++){const a=s[i],r=JSON.parse(null!=(e=s[i].getAttribute("data-options"))?e:"");new t(a,r).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 w.extend(t,e)}static getThemePalettes(){return{palette1:["#008FFB","#00A86F","#CA8501","#FF4560","#846DD5"],palette2:["#6978CB","#039DE2","#49A84D","#B39105","#D68000"],palette3:["#209FCC","#648291","#D4526E","#0FA783","#A19285"],palette4:["#2FA59D","#73A20B","#099DE1","#FD5D5D","#648291"],palette5:["#2B908F","#F56566","#2EAB16","#FA4443","#1EA2BD"],palette6:["#449DD1","#F86624","#EA3A4A","#9C63D1","#899E2A"],palette7:["#DF475B","#1B998B","#7E75B7","#F46036","#B1911B"],palette8:["#9C63D1","#F86624","#B38F04","#EA3A4A","#2FA2B3"],palette9:["#98776F","#A19285","#A8705E","#BA6560","#A0927F"],palette10:["#C91EFF","#A94BFD","#6C6AFE","#2983FF","#009ED8"],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){es(t)}static registerFeatures(t){Us.registerFeatures(t)}static setLicense(e){return ui.setLicense(e),Ai(),t}static registerPlugin(e){return function(t){t&&"string"==typeof t.name&&"function"==typeof t.setup&&(si()[t.name]=t)}(e),t}static unregisterPlugin(e){return function(t){delete si()[t]}(e),t}static registerRenderer(t,e){Ms.registerRenderer(t,e)}static registerSeriesType(e,s){const i=t._customSeriesFactory;return i&&s&&"function"==typeof s.renderItem?(a=e,Je()[a]&&!ts(e)||(es({[e]:i(e,s)}),function(t){Qe().add(t)}(e)),t):t;var a}static unregisterSeriesType(e){return ts(e)&&function(t){delete Je()[t],Qe().delete(t)}(e),t}static registerTheme(e,s){return function(t,e){t&&"string"==typeof t&&(null==e||"object"==typeof e&&!Array.isArray(e))&&(Te()[t]=e||{})}(e,s),t}static unregisterTheme(e){return function(t){t&&delete Te()[t]}(e),t}static registerEasing(e,s){return function(t,e){"string"==typeof t&&t&&"function"==typeof e&&gt.set(t,e)}(e,s),t}static registerUnitLayout(e,s){return function(t,e){t&&"string"==typeof t&&"function"==typeof e&&(js()[t]=e)}(e,s),t}static unregisterUnitLayout(e){return function(t){delete js()[t]}(e),t}static registerUnitMark(e,s){return Ks(e,s),t}static unregisterUnitMark(e){return function(t){delete Zs()[t]}(e),t}static registerRowSource(e,s){return function(t,e){t&&"string"==typeof t&&"function"==typeof e&&(Qs()[t]=e)}(e,s),t}static unregisterRowSource(e){return function(t){delete Qs()[t]}(e),t}rowSeries(t){const e=function(t){const e=t&&t.config&&t.config.chart;return e?ti(e.requestedType)||ti(e.type):null}(this.w);return e&&e(this.w,t)||null}static crossfilter(e){if(!e||"string"!=typeof e.id)throw new Error("ApexCharts.crossfilter requires an { id } string.");const s=t._crossfilterFactory;if(!s)return null;const i=s(e);return Ai(),i}static getCrossfilter(e){const s=t._crossfilterGet;return s?s(e):null}clearCrossfilter(){var t;null==(t=this.linkedViews)||t.clearGroup()}startMeasure(){var t;null==(t=this.measure)||t.startMeasure()}stopMeasure(){var t;null==(t=this.measure)||t.stopMeasure()}clearMeasures(){var t;null==(t=this.measure)||t.clearMeasures()}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),s.lastUpdateOptions=null,null==(e=s.annotations)||e.clearAnnotations(s)}removeAnnotation(t,e=void 0){var s;let i=this;e&&(i=e),i.lastUpdateOptions=null,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 Yt(this.w).getMinYMaxY(t).highestY}getLowestValueInSeries(t=0){return new Yt(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)}dataURI(t){if(!this.ctx.exports)throw new Error("apexcharts: Exports feature is not registered. Import apexcharts/features/exports.");return this.trellis&&this.trellis._mounted?this.trellis.exports.dataURI(t):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.trellis&&this.trellis._mounted?this.trellis.exports.svgString():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.trellis&&this.trellis._mounted?this.trellis.exports.download("csv"):this.ctx.exports.exportToCSV(t)}promotePanel(t){return this.trellis&&this.trellis._mounted?this.trellis.promote(t):Promise.resolve()}restorePanels(){return this.trellis&&this.trellis._mounted?this.trellis.restorePromotion():Promise.resolve()}paper(){return this.w.dom.Paper}getActiveRenderer(){return this.rendererController?this.rendererController.getActiveKind():"svg"}refreshTokens(){return this.lastUpdateOptions=null,this.update()}drillDown(t){if(!this.ctx.drilldown)throw new Error("apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.");return this.ctx.drilldown.drillDown(t)}drillUp(){if(!this.ctx.drilldown)throw new Error("apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.");return this.ctx.drilldown.drillUp()}drillToRoot(){if(!this.ctx.drilldown)throw new Error("apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.");return this.ctx.drilldown.drillToRoot()}clearDrilldownCache(t){if(!this.ctx.drilldown)throw new Error("apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.");return this.ctx.drilldown.clearCache(t)}static _writeDataProps(t,e){for(const s of Object.keys(e)){const i=Object.getOwnPropertyDescriptor(e,s);i&&"value"in i&&(t[s]=i.value)}}_writeParsedSeriesData(e){t._writeDataProps(this.w.seriesData,e)}_writeParsedRangeData(e){t._writeDataProps(this.w.rangeData,e)}_writeParsedCandleData(e){t._writeDataProps(this.w.candleData,e)}_writeParsedLabelData(e){t._writeDataProps(this.w.labelData,e)}_writeParsedAxisFlags(e){t._writeDataProps(this.w.axisFlags,e)}_writeLayoutCoords(e){t._writeDataProps(this.w.layout,e)}_parentResizeCallback(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}_windowResize(){this.w.globals.resizeTimer=window.setTimeout(()=>{const t=this.w.globals;if(this.core&&t.lastResizeSignature){const e=this.core.getResizeSignature();if(e.w===t.lastResizeSignature.w&&e.h===t.lastResizeSignature.h&&e.iw===t.lastResizeSignature.iw)return}t.resized=!0,t.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()}};c(Si,"perspectives",null);let Ci=Si;exports.__apex_Animations=St,exports.__apex_Animations_applyAnimationPolicy=vt,exports.__apex_Animations_applyProgressiveReveal=wt,exports.__apex_Animations_computeStagger=At,exports.__apex_Animations_prefersReducedMotion=yt,exports.__apex_Base=Y,exports.__apex_BrowserAPIs_BrowserAPIs=m,exports.__apex_ChartFactory_getChartClass=ss,exports.__apex_ChartFactory_isCustom=ts,exports.__apex_ChartFactory_register=es,exports.__apex_Config=R,exports.__apex_Constants_LINE_HEIGHT_RATIO=I,exports.__apex_Constants_NICE_SCALE_ALLOWED_MAG_MSD=X,exports.__apex_Constants_NICE_SCALE_DEFAULT_TICKS=z,exports.__apex_Core=is,exports.__apex_CoreUtils=H,exports.__apex_Crosshairs=Vt,exports.__apex_DOMShim_SSRClassList=p,exports.__apex_DOMShim_SSRDOMShim=g,exports.__apex_DOMShim_SSRElement=d,exports.__apex_Data=gs,exports.__apex_DataLabels=Nt,exports.__apex_DateTime=v,exports.__apex_Defaults=N,exports.__apex_Environment_Environment=h,exports.__apex_Events=Gt,exports.__apex_Fill=Tt,exports.__apex_Filters=Dt,exports.__apex_Formatters=A,exports.__apex_Globals=O,exports.__apex_Graphics=Mt,exports.__apex_Markers=Et,exports.__apex_Options=C,exports.__apex_PathMorphing_arrayToPath=q,exports.__apex_PathMorphing_morphPaths=et,exports.__apex_PathMorphing_parsePath=V,exports.__apex_PathMorphing_pathBbox=j,exports.__apex_PerformanceCache=Rt,exports.__apex_Range=Yt,exports.__apex_Resize_addResizeListener=ai,exports.__apex_Resize_removeResizeListener=ri,exports.__apex_Responsive=qt,exports.__apex_SVGAnimation_SVGAnimationRunner=ct,exports.__apex_SVGAnimation_installAnimationMethods=ht,exports.__apex_SVGContainer=Bs,exports.__apex_SVGDraggable_installDraggable=Ys,exports.__apex_SVGElement=Ts,exports.__apex_SVGFilter_FilterBuilder=zs,exports.__apex_SVGFilter_SVGFilter=Xs,exports.__apex_SVGFilter_installFilterMethods=Os,exports.__apex_SVGGradient_SVGGradient=Ls,exports.__apex_SVGPattern_SVGPattern=Ps,exports.__apex_SVGSelectable_installSelectable=Hs,exports.__apex_Scales=Ot,exports.__apex_Series=ke,exports.__apex_Theme=Ee,exports.__apex_ThemePalettes_getThemePalettes=Ht,exports.__apex_TimeScale=qe,exports.__apex_TitleSubtitle=Pe,exports.__apex_Utils=w,exports.__apex_axes_Axes=$t,exports.__apex_axes_AxesUtils=It,exports.__apex_axes_Grid=zt,exports.__apex_axes_XAxis=Xt,exports.__apex_axes_YAxis=Wt,exports.__apex_charts_Scatter=Pt,exports.__apex_dimensions_Dimensions=ze,exports.__apex_dimensions_Grid=Ie,exports.__apex_dimensions_Helpers=Be,exports.__apex_dimensions_XAxis=Ne,exports.__apex_dimensions_YAxis=Re,exports.__apex_helpers_Destroy=$s,exports.__apex_helpers_InitCtxVariables=Us,exports.__apex_helpers_Localization=Ut,exports.__apex_helpers_UpdateHelpers=us,exports.__apex_index_Box=$,exports.__apex_index_SVG=Ws,exports.__apex_math_Box=$,exports.__apex_math_Matrix=U,exports.__apex_math_Point=G,exports.__apex_math_SVGNS=W,exports.__apex_tooltip_AxesTooltip=As,exports.__apex_tooltip_Intersect=vs,exports.__apex_tooltip_Labels=ms,exports.__apex_tooltip_Marker=ws,exports.__apex_tooltip_Position=bs,exports.__apex_tooltip_Tooltip=Ss,exports.__apex_tooltip_Utils=fs,exports.default=Ci;