import"./chunk-Q7L6LLAK.js";var Rs=Object.defineProperty,Fs=Object.defineProperties,Xs=Object.getOwnPropertyDescriptors,ls=Object.getOwnPropertySymbols,_s=Object.prototype.hasOwnProperty,Ys=Object.prototype.propertyIsEnumerable,he=(A,t,e)=>t in A?Rs(A,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):A[t]=e,B=(A,t)=>{for(var e in t||(t={}))_s.call(t,e)&&he(A,e,t[e]);if(ls)for(var e of ls(t))Ys.call(t,e)&&he(A,e,t[e]);return A},$=(A,t)=>Fs(A,Xs(t)),V=(A,t,e)=>he(A,typeof t!="symbol"?t+"":t,e),cs=(A,t,e)=>new Promise((s,i)=>{var a=n=>{try{r(e.next(n))}catch(c){i(c)}},o=n=>{try{r(e.throw(n))}catch(c){i(c)}},r=n=>n.done?s(n.value):Promise.resolve(n.value).then(a,o);r((e=e.apply(A,t)).next())});var N=class{static isSSR(){return typeof window>"u"||typeof document>"u"}static isBrowser(){return!this.isSSR()}static hasAPI(t){return this.isSSR()?!1:typeof window[t]<"u"}static getApex(){return typeof window<"u"&&window.Apex?window.Apex:typeof global<"u"&&global.Apex?global.Apex:{}}},Wt=class A{constructor(t,e=null){this.nodeName=t,this.namespaceURI=e,this.attributes=new Map,this.children=[],this.textContent="",this.style={},this.classList=new de,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){let e=this.children.indexOf(t);e!==-1&&this.children.splice(e,1)}t.parentNode=this,this.children.push(t)}return t}removeChild(t){let e=this.children.indexOf(t);return e!==-1&&(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){let i=this.children.indexOf(t);i!==-1&&this.children.splice(i,1)}let s=this.children.indexOf(e);return s!==-1&&(t.parentNode=this,this.children.splice(s,0,t)),t}cloneNode(t=!1){let e=new A(this.nodeName,this.namespaceURI);return e.textContent=this.textContent,this.attributes.forEach((s,i)=>{e.attributes.set(i,s)}),Object.assign(e.style,this.style),t&&this.children.forEach(s=>{s.cloneNode&&e.appendChild(s.cloneNode(!0))}),e}getBoundingClientRect(){return{width:this._ssrWidth||0,height:this._ssrHeight||0,top:0,left:0,right:this._ssrWidth||0,bottom:this._ssrHeight||0,x:0,y:0}}getRootNode(){let t=this;for(;t.parentNode;)t=t.parentNode;return t}querySelector(){return null}querySelectorAll(){return[]}getElementsByClassName(){return[]}addEventListener(){}removeEventListener(){}get childNodes(){return this.children}toString(){let t="";if(this.attributes.forEach((s,i)=>{t+=` ${i}="${s}"`}),this.children.length===0&&!this.textContent)return`<${this.nodeName}${t}/>`;let e=this.children.map(s=>s.toString()).join("");return`<${this.nodeName}${t}>${this.textContent}${e}`}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}},de=class{constructor(){this.classes=new Set}add(...t){t.forEach(e=>this.classes.add(e))}remove(...t){t.forEach(e=>this.classes.delete(e))}contains(t){return this.classes.has(t)}toggle(t,e){return e===!0?(this.classes.add(t),!0):e===!1?(this.classes.delete(t),!1):this.classes.has(t)?(this.classes.delete(t),!1):(this.classes.add(t),!0)}toString(){return Array.from(this.classes).join(" ")}},ge=class{constructor(){this.SVGNS="http://www.w3.org/2000/svg",this.XLINKNS="http://www.w3.org/1999/xlink"}createElementNS(t,e){return new Wt(e,t)}createTextNode(t){let e={nodeName:"#text",nodeType:3,textContent:t,toString(){return 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){return t.toString?t.toString():""}}}createDOMParser(){return{parseFromString(t,e){let s=new Wt("root");return s.innerHTML=t,{documentElement:s}}}}},K=null,bt=null,mt=null,I=class{static init(){N.isSSR()&&!K&&(K=new ge)}static createElement(t){return N.isSSR()?(K||this.init(),K.createElementNS(null,t)):document.createElement(t)}static createElementNS(t,e){return N.isSSR()?(K||this.init(),K.createElementNS(t,e)):document.createElementNS(t,e)}static createTextNode(t){return N.isSSR()?(K||this.init(),K.createTextNode(t)):document.createTextNode(t)}static querySelector(t){return N.isSSR()?null:document.querySelector(t)}static querySelectorAll(t){return N.isSSR()?[]:document.querySelectorAll(t)}static getComputedStyle(t){return N.isSSR()?{}:window.getComputedStyle(t)}static getBoundingClientRect(t){return N.isSSR()?(K||this.init(),K.getBoundingClientRect(t)):t?t.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}static getXMLSerializer(){return N.isSSR()?(K||this.init(),bt||(bt=K.createXMLSerializer()),bt):(bt||(bt=new XMLSerializer),bt)}static getDOMParser(){return N.isSSR()?(K||this.init(),mt||(mt=K.createDOMParser()),mt):(mt||(mt=new DOMParser),mt)}static addWindowEventListener(t,e,s){N.isBrowser()&&window.addEventListener(t,e,s)}static removeWindowEventListener(t,e,s){N.isBrowser()&&window.removeEventListener(t,e,s)}static requestAnimationFrame(t){return N.isBrowser()?window.requestAnimationFrame(t):(t(0),null)}static cancelAnimationFrame(t){N.isBrowser()&&t&&window.cancelAnimationFrame(t)}static elementExists(t){return t?N.isSSR()?t._ssrMode===!0||t.nodeName!==void 0:t.getRootNode?t.getRootNode({composed:!0})===document||t.isConnected:!1:!1}static getWindow(){return N.isBrowser()?window:null}static getDocument(){return N.isBrowser()?document:null}static _getShim(){return K}static _resetShim(){K=null,bt=null,mt=null}},M=class lt{static isObject(t){return t&&typeof t=="object"&&!Array.isArray(t)}static is(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}static isSafari(){return N.isBrowser()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}static extend(t,e){let s=Object.assign({},t);return this.isObject(t)&&this.isObject(e)&&Object.keys(e).forEach(i=>{this.isObject(e[i])?i in t?s[i]=this.extend(t[i],e[i]):Object.assign(s,{[i]:e[i]}):Object.assign(s,{[i]:e[i]})}),s}static extendArray(t,e){let s=[];return t.map(i=>{s.push(lt.extend(e,i))}),t=s,t}static monthMod(t){return t%12}static clone(t,e=new WeakMap,s=!1){if(t===null||typeof t!="object")return t;if(e.has(t))return e.get(t);let i;if(Array.isArray(t))if(s)i=t.slice();else{i=[],e.set(t,i);for(let a=0;a(Array.isArray(s)&&(s=s.reduce((i,a)=>i.length>a.length?i:a)),e.length>s.length?e:s),0)}static hexToRgba(t="#999999",e=.6){t.substring(0,1)!=="#"&&(t="#999999");let s=t.replace("#",""),i=s.match(new RegExp("(.{"+s.length/3+"})","g"))||[];for(let a=0;as+s).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]){let i=a=>{let o=a/255;return o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4)};return .2126*i(t)+.7152*i(e)+.0722*i(s)}static getContrastRatio(t,e){let s=lt.parseHex(t),i=lt.parseHex(e);if(!s||!i)return 0;let a=lt.relativeLuminance(s),o=lt.relativeLuminance(i),r=Math.max(a,o),n=Math.min(a,o);return(r+.05)/(n+.05)}static rgb2hex(t){return t=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i),t&&t.length===4?"#"+("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){let s=e.split(","),i=t<0?0:255,a=t<0?t*-1:t,o=parseInt(s[0].slice(4),10),r=parseInt(s[1],10),n=parseInt(s[2],10);return"rgb("+(Math.round((i-o)*a)+o)+","+(Math.round((i-r)*a)+r)+","+(Math.round((i-n)*a)+n)+")"}shadeHexColor(t,e){let s=parseInt(e.slice(1),16),i=t<0?0:255,a=t<0?t*-1:t,o=s>>16,r=s>>8&255,n=s&255;return"#"+(16777216+(Math.round((i-o)*a)+o)*65536+(Math.round((i-r)*a)+r)*256+(Math.round((i-n)*a)+n)).toString(16).slice(1)}shadeColor(t,e){return lt.isColorHex(e)?this.shadeHexColor(t,e):this.shadeRGBColor(t,e)}static isColorHex(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(t)}static isCSSVariable(t){if(typeof t!="string")return!1;let e=t.trim();return e.startsWith("var(")&&e.endsWith(")")}static getThemeColor(t){if(!lt.isCSSVariable(t)||N.isSSR())return t;let e=document.createElement("div");e.style.cssText="position:fixed; left: -9999px; visibility:hidden;",e.style.color=t,document.body.appendChild(e);let s;try{s=window.getComputedStyle(e).color}finally{e.parentNode&&e.parentNode.removeChild(e)}return s}static applyOpacityToColor(t,e){let s=Number(e);if(!Number.isFinite(s))return t;if(s<=0)return"transparent";if(s>=1)return t;let i=Math.round(s*100);return`color-mix(in srgb, ${t} ${i}%, transparent)`}static getPolygonPos(t,e){let s=[],i=Math.PI*2/e;for(let a=0;a{}[\]\\/]/gi,e),s}static negToZero(t){return t<0?0:t}static moveIndexInArray(t,e,s){if(s>=t.length){let i=s-t.length+1;for(;i--;)t.push(void 0)}return t.splice(s,0,t.splice(e,1)[0]),t}static extractNumber(t){return parseFloat(t.replace(/[^\d.]*/g,""))}static findAncestor(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}static setELstyles(t,e){for(let s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t.style.key=e[s])}static preciseAddition(t,e){let 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(N.isSSR())return!1;let t=window.navigator.userAgent,e=t.indexOf("Edge/");return e>0?parseInt(t.substring(e+5,t.indexOf(".",e)),10):!1}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;){let a=e;e=t%e,t=a}return t/i}static getPrimeFactors(t){let e=[],s=2;for(;t>=2;)t%s==0?(e.push(s),t=t/s):s++;return e}static mod(t,e,s=7){let 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),t%e/i}},Q=class{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 typeof t=="number"?!1:!isNaN(this.parseDate(t))}getTimeStamp(t){return Date.parse(t)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toISOString().substr(0,25)).getTime():new Date(t).getTime():t}getDate(t){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toUTCString()):new Date(t)}parseDate(t){let 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){let s=this.w.globals.locale,i=this.w.config.xaxis.labels.datetimeUTC,a=["\0",...s.months],o=["",...s.shortMonths],r=["",...s.days],n=["",...s.shortDays];function c(C,k=2){let S=C+"";for(;S.length12?g-12:g===0?12:g;e=e.replace(/(^|[^\\])hh+/g,"$1"+c(p)),e=e.replace(/(^|[^\\])h/g,"$1"+p);let f=i?t.getUTCMinutes():t.getMinutes();e=e.replace(/(^|[^\\])mm+/g,"$1"+c(f)),e=e.replace(/(^|[^\\])m/g,"$1"+f);let u=i?t.getUTCSeconds():t.getSeconds();e=e.replace(/(^|[^\\])ss+/g,"$1"+c(u)),e=e.replace(/(^|[^\\])s/g,"$1"+u);let b=i?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+c(b,3)),b=Math.round(b/10),e=e.replace(/(^|[^\\])ff/g,"$1"+c(b)),b=Math.round(b/10),e=e.replace(/(^|[^\\])f/g,"$1"+b);let x=g<12?"AM":"PM";e=e.replace(/(^|[^\\])TT+/g,"$1"+x),e=e.replace(/(^|[^\\])T/g,"$1"+x.charAt(0));let w=x.toLowerCase();e=e.replace(/(^|[^\\])tt+/g,"$1"+w),e=e.replace(/(^|[^\\])t/g,"$1"+w.charAt(0));let m=-t.getTimezoneOffset(),y=i||!m?"Z":m>0?"+":"-";if(!i){m=Math.abs(m);let C=Math.floor(m/60),k=m%60;y+=c(C)+":"+c(k)}e=e.replace(/(^|[^\\])K/g,"$1"+y);let v=(i?t.getUTCDay():t.getDay())+1;return e=e.replace(new RegExp(r[0],"g"),r[v]),e=e.replace(new RegExp(n[0],"g"),n[v]),e=e.replace(new RegExp(a[0],"g"),a[h]),e=e.replace(new RegExp(o[0],"g"),o[h]),e=e.replace(/\\(.)/g,"$1"),e}getTimeUnitsfromTimestamp(t,e){let s=this.w;s.config.xaxis.min!==void 0&&(t=s.config.xaxis.min),s.config.xaxis.max!==void 0&&(e=s.config.xaxis.max);let i=this.getDate(t),a=this.getDate(e),o=this.formatDate(i,"yyyy MM dd HH mm ss fff").split(" "),r=this.formatDate(a,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(o[6],10),maxMillisecond:parseInt(r[6],10),minSecond:parseInt(o[5],10),maxSecond:parseInt(r[5],10),minMinute:parseInt(o[4],10),maxMinute:parseInt(r[4],10),minHour:parseInt(o[3],10),maxHour:parseInt(r[3],10),minDate:parseInt(o[2],10),maxDate:parseInt(r[2],10),minMonth:parseInt(o[1],10)-1,maxMonth:parseInt(r[1],10)-1,minYear:parseInt(o[0],10),maxYear:parseInt(r[0],10)}}isLeapYear(t){return t%4===0&&t%100!==0||t%400===0}calculcateLastDaysOfMonth(t,e,s){return this.determineDaysOfMonths(t,e)-s}determineDaysOfYear(t){let e=365;return this.isLeapYear(t)&&(e=366),e}determineRemainingDaysOfYear(t,e,s){let i=this.daysCntOfYear[e]+s;return e>1&&this.isLeapYear(t)&&i++,i}determineDaysOfMonths(t,e){let s=30;switch(t=M.monthMod(t),!0){case this.months30.indexOf(t)>-1:t===2&&(this.isLeapYear(e)?s=29:s=28);break;case this.months31.indexOf(t)>-1:s=31;break;default:s=31;break}return s}getDateFields(t,e){let 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){let 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()+s*7);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);break}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()+s*7);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);break}return a.getTime()}ceilToBoundary(t,e,s,i){let a=new Date(t);if(i)switch(e){case"second":{let o=a.getUTCSeconds(),r=Math.ceil(o/s)*s;return r===o&&a.getUTCMilliseconds()===0?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(r),a.getTime())}case"minute":{let o=a.getUTCMinutes(),r=Math.ceil(o/s)*s;return r===o&&a.getUTCSeconds()===0&&a.getUTCMilliseconds()===0?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(r),a.getTime())}case"hour":{let o=a.getUTCHours(),r=Math.ceil(o/s)*s;return r===o&&a.getUTCMinutes()===0&&a.getUTCSeconds()===0&&a.getUTCMilliseconds()===0?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(r),a.getTime())}case"day":return a.getUTCHours()===0&&a.getUTCMinutes()===0&&a.getUTCSeconds()===0&&a.getUTCMilliseconds()===0?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(0),a.setUTCDate(a.getUTCDate()+1),a.getTime());case"week":{let r=Date.UTC(1970,0,5);a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(0);let n=a.getTime(),c=Math.ceil((n-r)/6048e5),l=Math.ceil(c/s)*s,h=r+l*6048e5;return h>=t?h:h+s*6048e5}case"month":{let o=a.getUTCMonth(),r=Math.ceil(o/s)*s;return r===o&&a.getUTCDate()===1&&a.getUTCHours()===0&&a.getUTCMinutes()===0&&a.getUTCSeconds()===0&&a.getUTCMilliseconds()===0?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(0),a.setUTCDate(1),a.setUTCMonth(r),a.getTime())}case"year":{let o=a.getUTCFullYear(),r=Math.ceil(o/s)*s;return r===o&&a.getUTCMonth()===0&&a.getUTCDate()===1&&a.getUTCHours()===0&&a.getUTCMinutes()===0&&a.getUTCSeconds()===0&&a.getUTCMilliseconds()===0?t:Date.UTC(r,0,1)}}else switch(e){case"second":{let o=a.getSeconds(),r=Math.ceil(o/s)*s;return r===o&&a.getMilliseconds()===0?t:(a.setMilliseconds(0),a.setSeconds(r),a.getTime())}case"minute":{let o=a.getMinutes(),r=Math.ceil(o/s)*s;return r===o&&a.getSeconds()===0&&a.getMilliseconds()===0?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(r),a.getTime())}case"hour":{let o=a.getHours(),r=Math.ceil(o/s)*s;return r===o&&a.getMinutes()===0&&a.getSeconds()===0&&a.getMilliseconds()===0?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(r),a.getTime())}case"day":return a.getHours()===0&&a.getMinutes()===0&&a.getSeconds()===0&&a.getMilliseconds()===0?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(0),a.setDate(a.getDate()+1),a.getTime());case"week":{let r=new Date(1970,0,5).getTime();a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(0);let n=a.getTime(),c=Math.ceil((n-r)/6048e5),l=Math.ceil(c/s)*s,h=r+l*6048e5;return h>=t?h:h+s*6048e5}case"month":{let o=a.getMonth(),r=Math.ceil(o/s)*s;return r===o&&a.getDate()===1&&a.getHours()===0&&a.getMinutes()===0&&a.getSeconds()===0&&a.getMilliseconds()===0?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(0),a.setDate(1),a.setMonth(r),a.getTime())}case"year":{let o=a.getFullYear(),r=Math.ceil(o/s)*s;return r===o&&a.getMonth()===0&&a.getDate()===1&&a.getHours()===0&&a.getMinutes()===0&&a.getSeconds()===0&&a.getMilliseconds()===0?t:new Date(r,0,1).getTime()}}return t}isAtBoundary(t,e,s){let i=this.getDateFields(t,s);switch(e){case"year":return i.month===0&&i.date===1&&i.hour===0&&i.minute===0&&i.second===0&&i.ms===0;case"month":return i.date===1&&i.hour===0&&i.minute===0&&i.second===0&&i.ms===0;case"day":return i.hour===0&&i.minute===0&&i.second===0&&i.ms===0;case"hour":return i.minute===0&&i.second===0&&i.ms===0;case"minute":return i.second===0&&i.ms===0;case"second":return i.ms===0}return!1}},vt=class{constructor(t){this.w=t,this.tooltipKeyFormat="dd MMM"}xLabelFormat(t,e,s,i){let a=this.w;if(a.config.xaxis.type==="datetime"&&a.config.xaxis.labels.formatter===void 0&&a.config.tooltip.x.formatter===void 0){let o=new Q(this.w);return o.formatDate(o.getDate(e),a.config.tooltip.x.format)}return t(e,s,i)}defaultGeneralFormatter(t){return Array.isArray(t)?t.map(e=>e):t}defaultYFormatter(t,e){let s=this.w;if(M.isNumber(t))if(s.globals.yValueDecimal!==0)t=t.toFixed(e.decimalsInFloat!==void 0?e.decimalsInFloat:s.globals.yValueDecimal);else{let i=t.toFixed(0);t=Number(i)===t?i:t.toFixed(1)}return t}setLabelFormatters(){let t=this.w,e=t.formatters;return e.xaxisTooltipFormatter=s=>this.defaultGeneralFormatter(s),e.ttKeyFormatter=s=>this.defaultGeneralFormatter(s),e.ttZFormatter=s=>s,e.legendFormatter=s=>this.defaultGeneralFormatter(s),t.config.xaxis.labels.formatter!==void 0?e.xLabelFormatter=t.config.xaxis.labels.formatter:e.xLabelFormatter=s=>{if(M.isNumber(s)){if(!t.config.xaxis.convertedCatToNumeric&&t.config.xaxis.type==="numeric"){if(M.isNumber(t.config.xaxis.decimalsInFloat))return s.toFixed(t.config.xaxis.decimalsInFloat);{let i=t.globals.maxX-t.globals.minX;if(i>0){let a=i/10,o=Math.max(0,-Math.floor(Math.log10(a)));return s.toFixed(o)}return s.toFixed(0)}}return t.globals.isBarHorizontal&&t.globals.maxY-t.globals.minYArr<4?s.toFixed(1):s.toFixed(0)}return s},typeof t.config.tooltip.x.formatter=="function"?e.ttKeyFormatter=t.config.tooltip.x.formatter:e.ttKeyFormatter=e.xLabelFormatter,typeof t.config.xaxis.tooltip.formatter=="function"&&(e.xaxisTooltipFormatter=t.config.xaxis.tooltip.formatter),(Array.isArray(t.config.tooltip.y)||t.config.tooltip.y.formatter!==void 0)&&(e.ttVal=t.config.tooltip.y),t.config.tooltip.z.formatter!==void 0&&(e.ttZFormatter=t.config.tooltip.z.formatter),t.config.legend.formatter!==void 0&&(e.legendFormatter=t.config.legend.formatter),e.yLabelFormatters=[],t.config.yaxis.forEach((s,i)=>{s.labels.formatter!==void 0?e.yLabelFormatters[i]=s.labels.formatter:e.yLabelFormatters[i]=a=>t.globals.xyCharts?Array.isArray(a)?a.map(o=>this.defaultYFormatter(o,s)):this.defaultYFormatter(a,s):a}),t.globals}heatmapLabelFormatters(){let t=this.w;if(t.config.chart.type==="heatmap"){t.globals.yAxisScale[0].result=t.seriesData.seriesNames.slice();let e=t.seriesData.seriesNames.reduce((s,i)=>s.length>i.length?s:i,0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}},ae=({isTimeline:A,seriesIndex:t,dataPointIndex:e,y1:s,y2:i,w:a})=>{var o;let r=a.rangeData.seriesRangeStart[t][e],n=a.rangeData.seriesRangeEnd[t][e],c=a.labelData.labels[e],l=a.config.series[t].name?a.config.series[t].name:"",h=a.formatters.ttKeyFormatter,d=a.config.tooltip.y.title.formatter,g={w:a,seriesIndex:t,dataPointIndex:e,start:r,end:n};typeof d=="function"&&(l=d(l,g)),(o=a.config.series[t].data[e])!=null&&o.x&&(c=a.config.series[t].data[e].x),A||a.config.xaxis.type==="datetime"&&(c=new vt(a).xLabelFormat(a.formatters.ttKeyFormatter,c,c,{i:void 0,dateFormatter:new Q(a).formatDate,w:a})),typeof h=="function"&&(c=h(c,g)),Number.isFinite(s)&&Number.isFinite(i)&&(r=s,n=i);let p="",f="",u=a.globals.colors[t];if(a.config.tooltip.x.formatter===void 0)if(a.config.xaxis.type==="datetime"){let b=new Q(a);p=b.formatDate(b.getDate(r),a.config.tooltip.x.format),f=b.formatDate(b.getDate(n),a.config.tooltip.x.format)}else p=r,f=n;else p=a.config.tooltip.x.formatter(r),f=a.config.tooltip.x.formatter(n);return{start:r,end:n,startVal:p,endVal:f,ylabel:c,color:u,seriesName:l}},oe=A=>{let{color:t,seriesName:e,ylabel:s,start:i,end:a,seriesIndex:o,dataPointIndex:r}=A,n=A.w.globals.tooltip.tooltipLabels.getFormatters(o);i=n.yLbFormatter(i),a=n.yLbFormatter(a);let c=n.yLbFormatter(A.w.seriesData.series[o][r]),l="",h=` ${i} - ${a} `;return A.w.globals.comboCharts?A.w.config.series[o].type==="rangeArea"||A.w.config.series[o].type==="rangeBar"?l=h:l=`${c}`:l=h,'
'+(e||"")+'
'+s+": "+l+"
"},At=class{constructor(t){this.opts=t}hideYAxis(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}line(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}sparkline(t){this.hideYAxis();let e={grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}};return M.extend(t,e)}slope(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter(t,e){let s=e.w.config.series[e.seriesIndex].name;return t!==null?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(),$(B({},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(){let t=this.radialBar();return $(B({},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}}}}})}candlestick(){return{stroke:{width:1},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:({seriesIndex:t,dataPointIndex:e,w:s})=>this._getBoxTooltip(s,t,e,["Open","High","","Low","Close"],"candlestick")},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}boxPlot(){return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:({seriesIndex:t,dataPointIndex:e,w:s})=>this._getBoxTooltip(s,t,e,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}rangeBar(){let t=s=>{let{color:i,seriesName:a,ylabel:o,startVal:r,endVal:n}=ae($(B({},s),{isTimeline:!0}));return oe($(B({},s),{color:i,seriesName:a,ylabel:o,start:r,end:n}))},e=s=>{let{color:i,seriesName:a,ylabel:o,start:r,end:n}=ae(s);return oe($(B({},s),{color:i,seriesName:a,ylabel:o,start:r,end:n}))};return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter(s,{seriesIndex:i,dataPointIndex:a,w:o}){let r=()=>{let n=o.rangeData.seriesRangeStart[i][a];return o.rangeData.seriesRangeEnd[i][a]-n};return o.globals.comboCharts?o.config.series[i].type==="rangeBar"||o.config.series[i].type==="rangeArea"?r():s:r()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom(s){return s.w.config.plotOptions&&s.w.config.plotOptions.bar&&s.w.config.plotOptions.bar.horizontal?t(s):e(s)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}dumbbell(t){var e,s;return(e=t.plotOptions.bar)!=null&&e.barHeight||(t.plotOptions.bar.barHeight=2),(s=t.plotOptions.bar)!=null&&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(){let t=e=>{let{color:s,seriesName:i,ylabel:a,start:o,end:r}=ae(e);return oe($(B({},e),{color:s,seriesName:i,ylabel:a,start:o,end:r}))};return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom(e){return t(e)}}}}brush(t){let e={chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}};return M.extend(t,e)}stacked100(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;let e=t.dataLabels.formatter;return t.yaxis.forEach((i,a)=>{t.yaxis[a].min=0,t.yaxis[a].max=100}),t.chart.type==="bar"&&(t.dataLabels.formatter=e||function(i){return typeof i=="number"?i&&i.toFixed(0)+"%":i}),t}stackedBars(){let t=this.bar();return $(B({},t),{plotOptions:$(B({},t.plotOptions),{bar:$(B({},t.plotOptions.bar),{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}convertCatToNumeric(t){return t.xaxis.convertedCatToNumeric=!0,t}convertCatToNumericXaxis(t,e){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(a){return M.isNumber(a)?Math.floor(a):a};let s=t.xaxis.labels.formatter,i=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return e&&e.length&&(i=e.map(a=>Array.isArray(a)?a:String(a))),i&&i.length&&(t.xaxis.labels.formatter=function(a){return M.isNumber(a)?s(i[Math.floor(a)-1]):s(a)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}bubble(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}scatter(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}heatmap(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}treemap(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}pie(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}donut(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}polarArea(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter(t){return t.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}radar(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:t=>t,style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}radialBar(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}_getBoxTooltip(t,e,s,i,a){let o=t.candleData.seriesCandleO[e][s],r=t.candleData.seriesCandleH[e][s],n=t.candleData.seriesCandleM[e][s],c=t.candleData.seriesCandleL[e][s],l=t.candleData.seriesCandleC[e][s],h=t.config.series[e];return h.type&&h.type!==a?`
${h.name?h.name:"series-"+(e+1)}: ${t.seriesData.series[e][s]}
`:`
${i[0]}: `+o+`
${i[1]}: `+r+"
"+(n?`
${i[2]}: `+n+"
":"")+`
${i[3]}: `+c+`
${i[4]}: `+l+"
"}},Is="en",Ns={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"}},Ss={name:Is,options:Ns},ht=class{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}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}init(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350},respectReducedMotion:!0},background:"",locales:[Ss],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0,keyDown:void 0,keyUp:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,injectStyleSheet:!0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:!0,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}},accessibility:{enabled:!0,description:void 0,announcements:{enabled:!0},keyboard:{enabled:!0,navigation:{enabled:!0,wrapAround:!1}}},dataReducer:{enabled:!1,algorithm:"lttb",targetPoints:250,threshold:500}},parsing:{x:void 0,y:void 0},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},funnel:{shape:"rectangle",lastShape:"flat"},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0},seriesTitle:{show:!0,offsetY:1,offsetX:1,borderColor:"#000",borderWidth:1,borderRadius:2,style:{background:"rgba(0, 0, 0, 0.6)",color:"#fff",fontSize:"12px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:6,right:6,top:2,bottom:2}}}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,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){return 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){return t}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter(t){return t+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter(t){return t.globals.seriesTotals.reduce((e,s)=>e+s,0)/t.seriesData.series.length+"%"}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter(t){return t},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter(t){return t}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter(t){return t}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter(t){return t.globals.seriesTotals.reduce((e,s)=>e+s,0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter(t){return t!==null?t:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",backgroundColor:void 0,borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],clusterGroupedSeries:!0,clusterGroupedSeriesOrientation:"vertical",labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3}},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"}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken"}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,arrow:!0,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){return t?t+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM",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:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65},accessibility:{colorBlindMode:""}}}}},Ct=class{constructor(t){this.opts=t}init({responsiveOverride:t}){var e,s,i,a,o,r,n,c,l,h;let d=this.opts,g=new ht,p=new At(d);d=this.normalizeAliasedChartType(d),this.chartType=d.chart.type,d=this.extendYAxis(d),d=this.extendAnnotations(d);let f=g.init(),u={};if(d&&typeof d=="object"){let x={},w=["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"],m=d.chart.requestedType;m==="funnel"||m==="pyramid"?x=p[m]():m==="gauge"?x=p.gauge():w.indexOf(d.chart.type)!==-1?x=p[d.chart.type]():x=p.line(),(s=(e=d.plotOptions)==null?void 0:e.bar)!=null&&s.isFunnel&&(x=p.funnel()),d.chart.stacked&&d.chart.type==="bar"&&(x=p.stackedBars()),(i=d.chart.brush)!=null&&i.enabled&&(x=p.brush(x)),(o=(a=d.plotOptions)==null?void 0:a.line)!=null&&o.isSlopeChart&&(x=p.slope()),d.chart.stacked&&d.chart.stackType==="100%"&&(d=p.stacked100(d)),(n=(r=d.plotOptions)==null?void 0:r.bar)!=null&&n.isDumbbell&&(d=p.dumbbell(d)),this.checkForDarkTheme(N.getApex()),this.checkForDarkTheme(d),d.xaxis=d.xaxis||N.getApex().xaxis||{},t||(d.xaxis.convertedCatToNumeric=!1),d=this.checkForCatToNumericXAxis(this.chartType,x,d),((c=d.chart.sparkline)!=null&&c.enabled||(h=(l=N.getApex().chart)==null?void 0:l.sparkline)!=null&&h.enabled)&&(x=p.sparkline(x)),u=M.extend(f,x)}let b=M.extend(u,N.getApex());return f=M.extend(b,d),f=this.handleUserInputErrors(f),f}normalizeAliasedChartType(t){if(!t||!t.chart)return t;let e=t.chart.type;return e!=="funnel"&&e!=="pyramid"&&e!=="gauge"||(t.chart.requestedType=e,e==="funnel"||e==="pyramid"?(t.plotOptions=t.plotOptions||{},t.plotOptions.bar=t.plotOptions.bar||{},t.plotOptions.bar.isFunnel=!0,t.plotOptions.bar.horizontal=!0,t.chart.type="bar"):e==="gauge"&&(t.chart.type="radialBar")),t}checkForCatToNumericXAxis(t,e,s){var i,a;let o=new At(s),r=(t==="bar"||t==="boxPlot")&&((a=(i=s.plotOptions)==null?void 0:i.bar)==null?void 0:a.horizontal),n=t==="pie"||t==="polarArea"||t==="donut"||t==="radar"||t==="radialBar"||t==="heatmap",c=s.xaxis.type!=="datetime"&&s.xaxis.type!=="numeric",l=s.xaxis.tickPlacement?s.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return!r&&!n&&c&&l!=="between"&&(s=o.convertCatToNumeric(s)),s}extendYAxis(t,e){let s=new ht;(typeof t.yaxis>"u"||!t.yaxis||Array.isArray(t.yaxis)&&t.yaxis.length===0)&&(t.yaxis={});let i=N.getApex();t.yaxis.constructor!==Array&&i.yaxis&&i.yaxis.constructor!==Array&&(t.yaxis=M.extend(t.yaxis,i.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[M.extend(s.yAxis,t.yaxis)]:t.yaxis=M.extendArray(t.yaxis,s.yAxis);let a=!1;t.yaxis.forEach(r=>{r.logarithmic&&(a=!0)});let o=t.series;return e&&!o&&(o=e.config.series),a&&o.length!==t.yaxis.length&&o.length&&(t.yaxis=o.map((r,n)=>{if(r.name||(o[n].name=`series-${n+1}`),t.yaxis[n])return t.yaxis[n].seriesName=o[n].name,t.yaxis[n];{let c=M.extend(s.yAxis,t.yaxis[0]);return c.show=!1,c}})),a&&o.length>1&&o.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),t}extendAnnotations(t){return typeof t.annotations>"u"&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),t=this.extendPointAnnotations(t),t}extendYAxisAnnotations(t){let e=new ht;return t.annotations.yaxis=M.extendArray(typeof t.annotations.yaxis<"u"?t.annotations.yaxis:[],e.yAxisAnnotation),t}extendXAxisAnnotations(t){let e=new ht;return t.annotations.xaxis=M.extendArray(typeof t.annotations.xaxis<"u"?t.annotations.xaxis:[],e.xAxisAnnotation),t}extendPointAnnotations(t){let e=new ht;return t.annotations.points=M.extendArray(typeof t.annotations.points<"u"?t.annotations.points:[],e.pointAnnotation),t}checkForDarkTheme(t){t.theme&&t.theme.mode==="dark"&&(t.tooltip||(t.tooltip={}),t.tooltip.theme!=="light"&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.theme.palette||(t.theme.palette="palette4"))}handleUserInputErrors(t){let 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(e.chart.type==="bar"&&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(e.chart.type==="bar"||e.chart.type==="rangeBar")&&e.tooltip.shared&&e.xaxis.crosshairs.width==="barWidth"&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),(e.chart.type==="candlestick"||e.chart.type==="boxPlot")&&e.yaxis[0].reversed&&(console.warn(`Reversed y-axis in ${e.chart.type} chart is not supported.`),e.yaxis[0].reversed=!1),e}},ks=1.618,Ls=[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],fe=[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],$t=class{initGlobalVars(t){t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleM=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesRange=[],t.seriesPercent=[],t.seriesGoals=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.seriesLog=[],t.seriesColors=[],t.stackedSeriesTotals=[],t.seriesXvalues=[],t.seriesYvalues=[],t.dataWasParsed=!1,t.originalSeries=null,t.maxValsInArrayIndex=0,t.yValueDecimal=0,t.allSeriesHasEqualX=!0,t.labels=[],t.hasXaxisGroups=!1,t.groups=[],t.barGroups=[],t.lineGroups=[],t.areaGroups=[],t.hasSeriesGroups=!1,t.seriesGroups=[],t.categoryLabels=[],t.timescaleLabels=[],t.noLabelsProvided=!1,t.isXNumeric=!1,t.skipLastTimelinelabel=!1,t.skipFirstTimelinelabel=!1,t.isDataXYZ=!1,t.isMultiLineX=!1,t.isMultipleYAxis=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialMaxX=-Number.MAX_VALUE,t.initialMinX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0,t.xTickAmount=0,t.multiAxisTickAmount=0,t.disableZoomIn=!1,t.disableZoomOut=!1,t.yLabelsCoords=[],t.yTitleCoords=[],t.barPadForNumericAxis=0,t.padHorizontal=0,t.rotateXLabels=!1,t.overlappingXLabels=!1,t.radialSize=0,t.barHeight=0,t.barWidth=0,t.animationEnded=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.lastWheelExecution=0,t.delayedElements=[],t.pointsArray=[],t.dataLabelsRects=[],t.lastDrawnDataLabelsIndexes=[],t.textRectsCache=new Map,t.domCache=new Map,t.dimensionCache={},t.cachedSelectors={},t.seriesNS||this._attachNamespaces(t)}_attachNamespaces(t){let e=(r,n,c=n)=>{Object.defineProperty(r,c,{get(){return t[n]},set(l){t[n]=l},enumerable:!0,configurable:!0})},s={};e(s,"series","data");for(let r of["seriesNames","seriesX","seriesZ","seriesXvalues","seriesYvalues","seriesGoals","seriesLog","seriesColors","seriesPercent","seriesTotals","stackedSeriesTotals","seriesCandleO","seriesCandleH","seriesCandleM","seriesCandleL","seriesCandleC","seriesRangeStart","seriesRangeEnd","seriesRange","seriesYAxisMap","seriesYAxisReverseMap","seriesGroups","barGroups","lineGroups","areaGroups","originalSeries","collapsedSeries","collapsedSeriesIndices","ancillaryCollapsedSeries","ancillaryCollapsedSeriesIndices","allSeriesCollapsed","risingSeries","previousPaths","ignoreYAxisIndexes","labels","categoryLabels","timescaleLabels","groups"])e(s,r);Object.defineProperty(t,"seriesNS",{value:s,writable:!1,enumerable:!1,configurable:!0});let i={};for(let r of["minX","maxX","initialMinX","initialMaxX","minY","maxY","minYArr","maxYArr","minZ","maxZ","minDate","maxDate","minXDiff","xRange","yRange","zRange","xAxisScale","yAxisScale","xAxisTicksPositions","xTickAmount","multiAxisTickAmount","dataPoints","maxValsInArrayIndex","isXNumeric","isMultipleYAxis","isMultiLineX","isDataXYZ","dataFormatXNumeric","allSeriesHasEqualX","hasNullValues","dataWasParsed","hasXaxisGroups","hasSeriesGroups","skipFirstTimelinelabel","skipLastTimelinelabel","yValueDecimal","invalidLogScale","noLabelsProvided"])e(i,r);Object.defineProperty(t,"axes",{value:i,writable:!1,enumerable:!1,configurable:!0});let a={};for(let r of["svgWidth","svgHeight","gridWidth","gridHeight","translateX","translateY","translateXAxisX","translateXAxisY","translateYAxisX","xAxisLabelsHeight","xAxisGroupLabelsHeight","xAxisLabelsWidth","yAxisLabelsWidth","yAxisWidths","yLabelsCoords","yTitleCoords","padHorizontal","barPadForNumericAxis","rotateXLabels","scaleX","scaleY","radialSize","defaultLabels","overlappingXLabels"])e(a,r);Object.defineProperty(t,"layout",{value:a,writable:!1,enumerable:!1,configurable:!0});let o={};for(let r of["domCache","dimensionCache","cachedSelectors","textRectsCache","pointsArray","dataLabelsRects","lastDrawnDataLabelsIndexes","delayedElements","resizeTimer","selectionResizeTimer","resizeObserver"])e(o,r);Object.defineProperty(t,"cache",{value:o,writable:!1,enumerable:!1,configurable:!0})}globalVars(t){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0},LINE_HEIGHT_RATIO:ks,axisCharts:!0,isSlopeChart:t.plotOptions.line.isSlopeChart,comboCharts:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],ignoreYAxisIndexes:[],isDirty:!1,isExecCalled:!1,dataChanged:!1,resized:!1,invalidLogScale:!1,hasNullValues:!1,columnSeries:null,yaxis:null,total:0,shouldAnimate:!0,previousPaths:[],svgWidth:0,svgHeight:0,defaultLabels:!1,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateYAxisX:[],yAxisWidths:[],tooltip:null,resizeObserver:null,locale:{},memory:{methodsToExec:[]},niceScaleAllowedMagMsd:Ls,niceScaleDefaultTicks:fe,seriesYAxisMap:[],seriesYAxisReverseMap:[],noData:!1}}init(t){let e=this.globalVars(t);return this.initGlobalVars(e),e.initialConfig=M.extend({},t),e.initialSeries=M.clone(t.series),e.lastXAxis=M.clone(e.initialConfig.xaxis),e.lastYAxis=M.clone(e.initialConfig.yaxis),e}},pe=class{constructor(t){this.opts=t}init(){let t=new Ct(this.opts).init({responsiveOverride:!1}),e=new $t().init(t),s={config:t,globals:e,dom:{},interact:{zoomEnabled:t.chart.toolbar.autoSelected==="zoom"&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:t.chart.toolbar.autoSelected==="pan"&&t.chart.toolbar.tools.pan,selectionEnabled:t.chart.toolbar.autoSelected==="selection"&&t.chart.toolbar.tools.selection,zoomed:!1,selection:void 0,visibleXRange:void 0,selectedDataPoints:[],mousedown:!1,clientX:null,clientY:null,lastClientPosition:{},lastWheelExecution:0,capturedSeriesIndex:-1,capturedDataPointIndex:-1,disableZoomIn:!1,disableZoomOut:!1,isTouchDevice:N.isBrowser()?"ontouchstart"in window||navigator.maxTouchPoints>0:!1},formatters:{xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,legendFormatter:void 0},candleData:{seriesCandleO:[],seriesCandleH:[],seriesCandleM:[],seriesCandleL:[],seriesCandleC:[]},rangeData:{seriesRangeStart:[],seriesRangeEnd:[],seriesRange:[]},labelData:{labels:[],categoryLabels:[],timescaleLabels:[],hasXaxisGroups:!1,groups:[],seriesGroups:[]},axisFlags:{isXNumeric:!1,dataFormatXNumeric:!1,isDataXYZ:!1,isRangeData:!1,isRangeBar:!1,isMultiLineX:!1,noLabelsProvided:!1,dataWasParsed:!1},seriesData:{series:[],seriesNames:[],seriesX:[],seriesZ:[],seriesColors:[],seriesGoals:[],stackedSeriesTotals:[],stackedSeriesTotalsByGroups:[]},layout:{gridHeight:0,gridWidth:0,translateX:0,translateY:0,translateXAxisX:0,translateXAxisY:0,rotateXLabels:!1,xAxisHeight:0,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yLabelsCoords:[],yTitleCoords:[]}};Object.defineProperty(e,"dom",{get(){return s.dom},set(i){s.dom=i},enumerable:!1,configurable:!0});for(let i of["xLabelFormatter","yLabelFormatters","xaxisTooltipFormatter","ttKeyFormatter","ttVal","ttZFormatter","legendFormatter"])Object.defineProperty(e,i,{get(){return s.formatters[i]},set(a){s.formatters[i]=a},enumerable:!1,configurable:!0});for(let i of["zoomEnabled","panEnabled","selectionEnabled","zoomed","selection","visibleXRange","selectedDataPoints","mousedown","clientX","clientY","lastClientPosition","lastWheelExecution","capturedSeriesIndex","capturedDataPointIndex","disableZoomIn","disableZoomOut","isTouchDevice"])Object.defineProperty(e,i,{get(){return s.interact[i]},set(a){s.interact[i]=a},enumerable:!1,configurable:!0});for(let i of["gridHeight","gridWidth","translateX","translateY","translateXAxisX","translateXAxisY","rotateXLabels","xAxisHeight","xAxisLabelsHeight","xAxisGroupLabelsHeight","xAxisLabelsWidth","yLabelsCoords","yTitleCoords"])Object.defineProperty(e,i,{get(){return s.layout[i]},set(a){s.layout[i]=a},enumerable:!1,configurable:!0});for(let i of["series","seriesNames","seriesX","seriesZ","seriesColors","seriesGoals","stackedSeriesTotals","stackedSeriesTotalsByGroups"])Object.defineProperty(e,i,{get(){return s.seriesData[i]},set(a){s.seriesData[i]=a},enumerable:!1,configurable:!0});for(let i of["isXNumeric","dataFormatXNumeric","isDataXYZ","isRangeData","isRangeBar","isMultiLineX","noLabelsProvided","dataWasParsed"])Object.defineProperty(e,i,{get(){return s.axisFlags[i]},set(a){s.axisFlags[i]=a},enumerable:!1,configurable:!0});for(let i of["labels","categoryLabels","timescaleLabels","hasXaxisGroups","groups","seriesGroups"])Object.defineProperty(e,i,{get(){return s.labelData[i]},set(a){s.labelData[i]=a},enumerable:!1,configurable:!0});for(let i of["seriesRangeStart","seriesRangeEnd","seriesRange"])Object.defineProperty(e,i,{get(){return s.rangeData[i]},set(a){s.rangeData[i]=a},enumerable:!1,configurable:!0});for(let i of["seriesCandleO","seriesCandleH","seriesCandleM","seriesCandleL","seriesCandleC"])Object.defineProperty(e,i,{get(){return s.candleData[i]},set(a){s.candleData[i]=a},enumerable:!1,configurable:!0});return s}},q=class{constructor(t){this.w=t}static checkComboSeries(t,e){let s=!1,i=0,a=0;return e===void 0&&(e="line"),t.length&&typeof t[0].type<"u"&&t.forEach(o=>{(o.type==="bar"||o.type==="column"||o.type==="candlestick"||o.type==="boxPlot")&&i++,typeof o.type<"u"&&o.type!==e&&a++}),a>0&&(s=!0),{comboBarCount:i,comboCharts:s}}getStackedSeriesTotals(t=[]){let e=this.w,s=[];if(e.seriesData.series.length===0)return s;for(let i=0;ie+s,0);{let e=this.w.seriesData.series[t];return Array.isArray(e)?e.reduce((s,i)=>s+i,0):e??0}}getStackedSeriesTotalsByGroups(){let t=this.w,e=[];return t.labelData.seriesGroups.forEach(s=>{let i=[];t.config.series.forEach((o,r)=>{s.indexOf(t.seriesData.seriesNames[r])>-1&&i.push(r)});let a=t.seriesData.series.map((o,r)=>i.indexOf(r)===-1?r:-1).filter(o=>o!==-1);e.push(this.getStackedSeriesTotals(a))}),e}setSeriesYAxisMappings(){let t=this.w.globals,e=this.w.config,s=[],i=[],a=[],o=this.w.seriesData.series.length>e.yaxis.length||e.yaxis.some(c=>Array.isArray(c.seriesName));e.series.forEach((c,l)=>{a.push(l),i.push(null)}),e.yaxis.forEach((c,l)=>{s[l]=[]});let r=[];e.yaxis.forEach((c,l)=>{let h=!1;if(c.seriesName){let d=[];Array.isArray(c.seriesName)?d=c.seriesName:d.push(c.seriesName),d.forEach(g=>{e.series.forEach((p,f)=>{if(p.name===g){let u=f;l===f||o?!o||a.indexOf(f)>-1?s[l].push([l,f]):console.warn("Series '"+p.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(s[f].push([f,l]),u=l),h=!0,u=a.indexOf(u),u!==-1&&a.splice(u,1)}})})}h||r.push(l)}),s=s.map(c=>{let l=[];return c.forEach(h=>{i[h[1]]=h[0],l.push(h[1])}),l});let n=e.yaxis.length-1;for(let c=0;c{s[n].push(c),i[c]=n}),t.seriesYAxisMap=s.map(c=>c),t.seriesYAxisReverseMap=i.map(c=>c),t.seriesYAxisMap.forEach((c,l)=>{c.forEach(h=>{if(e.series[h]&&e.series[h].group===void 0){let d=e.series[h];d.group="apexcharts-axis-".concat(l.toString())}})})}isSeriesNull(t=null){let e=[],s=this.w.config.series;return t===null?e=s.filter(i=>i!==null):s[t]&&Array.isArray(s[t].data)?e=s[t].data.filter(i=>i!==null):e=s[t]!==null&&s[t]!==void 0?[s[t]]:[],e.length===0}seriesHaveSameValues(t){let e=this.w.seriesData.series[t];return Array.isArray(e)?e.every((s,i,a)=>s===a[0]):!0}getCategoryLabels(t){let e=this.w,s=t.slice();return e.config.xaxis.convertedCatToNumeric&&(s=t.map(i=>e.config.xaxis.labels.formatter(i-e.globals.minX+1))),s}getLargestSeries(){let t=this.w;t.globals.maxValsInArrayIndex=t.seriesData.series.map(e=>e.length).indexOf(Math.max.apply(Math,t.seriesData.series.map(e=>e.length)))}getLargestMarkerSize(){let t=this.w,e=0;return t.globals.markers.size.forEach(s=>{e=Math.max(e,s)}),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach(s=>{e=Math.max(e,s.size)}),e>0&&(t.config.markers.hover.size>0?e=t.config.markers.hover.size:e+=t.config.markers.hover.sizeOffset),t.globals.markers.largestSize=e,e}getSeriesTotals(){let t=this.w;t.globals.seriesTotals=t.seriesData.series.map(e=>{let s=0;if(Array.isArray(e))for(let i=0;i{let r=0;for(let n=0;nt&&s.seriesData.seriesX[o][n]{let s=[];if(Array.isArray(e))for(let i=0;io+r,0),a=100*e/i;s.push(a)}return s})}getCalculatedRatios(){let t=this.w,e=t.globals,s=[],i=0,a=0,o=0,r=0,n=[],c=.1,l=0;if(e.yRange=[],e.isMultipleYAxis)for(let h=0;h0){let h=(d,g)=>{let p=t.config.yaxis[t.globals.seriesYAxisReverseMap[g]],f=d<0?-1:1;return d=Math.abs(d),p.logarithmic&&(d=this.getBaseLog(p.logBase,d)),-f*d/s[g]};if(e.isMultipleYAxis){n=[];for(let d=0;d{let a=e.globals.seriesYAxisReverseMap[i];return e.config.yaxis[a]&&e.config.yaxis[a].logarithmic?s.map(o=>o===null?null:this.getLogVal(e.config.yaxis[a].logBase,o,i)):s}),e.globals.invalidLogScale?t:e.globals.seriesLog}getLogValAtSeriesIndex(t,e){if(t===null)return null;let 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;let i=this.w,a=i.globals.minYArr[s]===0?-1:this.getBaseLog(t,i.globals.minYArr[s]),r=(i.globals.maxYArr[s]===0?0:this.getBaseLog(t,i.globals.maxYArr[s]))-a;return e<1?e/r:(this.getBaseLog(t,e)-a)/r}getLogYRatios(t){let e=this.w,s=this.w.globals,i=s;return i.yLogRatio=t.slice(),i.logYRange=s.yRange.map((a,o)=>{let r=e.globals.seriesYAxisReverseMap[o];if(e.config.yaxis[r]&&this.w.config.yaxis[r].logarithmic){let n=-Number.MAX_VALUE,c=Number.MIN_VALUE,l=1;return s.seriesLog.forEach((h,d)=>{h.forEach(g=>{e.config.yaxis[d]&&e.config.yaxis[d].logarithmic&&(n=Math.max(g,n),c=Math.min(g,c))})}),l=Math.pow(s.yRange[o],Math.abs(c-n)/s.yRange[o]),i.yLogRatio[o]=l/this.w.layout.gridHeight,l}}),i.invalidLogScale?t.slice():i.yLogRatio}static extendArrayProps(t,e,s){var i,a;return e?.yaxis&&(e=t.extendYAxis(e,s)),e?.annotations&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),(i=e?.annotations)!=null&&i.xaxis&&(e=t.extendXAxisAnnotations(e)),(a=e?.annotations)!=null&&a.points&&(e=t.extendPointAnnotations(e))),e}drawSeriesByGroup(t,e,s,i){let a=this.w,o=[];return t.series.length>0&&e.forEach(r=>{let n=[],c=[];t.i.forEach((l,h)=>{a.config.series[l].group===r&&(n.push(t.series[h]),c.push(l))}),n.length>0&&o.push(i.draw(n,s,c))}),o}},re="http://www.w3.org/2000/svg";function hs(A){return 1-Math.pow(1-A,3)}function Bs(A){return 1+2.70158*Math.pow(A-1,3)+1.70158*Math.pow(A-1,2)}var ne=null;function Os(){if(!N.isBrowser())return!1;try{return ne||(ne=window.matchMedia("(prefers-reduced-motion: reduce)")),!!ne.matches}catch{return!1}}function dt(A,t,e){if(!N.isBrowser()||e.globals.dataChanged||e.globals.resized)return!1;let s=e.config.chart.animations;if(!s||s.enabled===!1)return!1;let i=e.config.chart.type;if(i!=="line"&&i!=="area"&&i!=="rangeArea"||!(e.layout.gridWidth>0))return!1;let a=(s.speed||800)*2,o=Math.max(0,Math.min(1,t/e.layout.gridWidth)),n=(1-Math.cbrt(1-o))*a,l=A.node.style;l.opacity="0";let h=null,d=g=>{h===null&&(h=g),g-h>=n?l.opacity="1":I.requestAnimationFrame(d)};return I.requestAnimationFrame(d),!0}function zs(A){let t=A.config.chart.animations;t&&t.respectReducedMotion!==!1&&Os()&&(t.enabled=!1,t.dynamicAnimation&&(t.dynamicAnimation.enabled=!1))}function ns(A){let t=A.style,e=A.index||0,s=typeof A.baseDelay=="number"?A.baseDelay:40,i=A.row||0,a=A.col||0,o=A.groupIndex||0,r=A.perGroup||1,n=A.centerDistance||0;switch(t){case"none":return 0;case"diagonal":return(i+a)*s;case"group":return o*s+e%r*(s/4);case"centroid":return n*s*(e+1);default:return e*s}}var ft=class{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}){let a=this.w;if(!N.isBrowser()||!a.globals.shouldAnimate||e<1){i&&i();return}let r=t.node.style;r.transformBox="fill-box",r.transformOrigin="center",r.transform="scale(0)",r.opacity="0";let n=performance.now()+s,c=l=>{let h=Math.max(0,Math.min(1,(l-n)/e));r.transform=`scale(${Bs(h)})`,r.opacity=String(Math.min(1,h*2)),h<1?I.requestAnimationFrame(c):(r.transform="",r.transformOrigin="",r.transformBox="",r.opacity="",i&&i())};I.requestAnimationFrame(c)}animateRect(t,e,s,i,a,o=0){t.attr(e).animate(i,o).attr(s).after(()=>a())}animatePathsGradually(t){let{el:e,realIndex:s,j:i,fill:a,pathFrom:o,pathTo:r,speed:n,delay:c}=t,l=this,h=this.w,d=0;h.config.chart.animations.animateGradually.enabled&&(d=h.config.chart.animations.animateGradually.delay),h.config.chart.animations.dynamicAnimation.enabled&&h.globals.dataChanged&&h.config.chart.type!=="bar"&&(d=0),l.morphSVG(e,s,i,h.config.chart.type==="line"&&!h.globals.comboCharts?"stroke":a,o,r,n,c*d)}showDelayedElements(){this.w.globals.delayedElements.forEach(t=>{let e=t.el;e.classList.remove("apexcharts-element-hidden"),e.classList.add("apexcharts-hidden-element-shown")})}animationCompleted(t){let e=this.w;e.globals.animationEnded||(e.globals.animationEnded=!0,this.showDelayedElements(),typeof e.config.chart.events.animationEnd=="function"&&e.config.chart.events.animationEnd(this.ctx,{el:t,w:e}))}animateDraw(t,{realIndex:e,j:s,isFill:i,isLast:a,speed:o,delay:r,mask:n}){let c=this.w,l=this,h=()=>{a&&c.globals.shouldAnimate&&l.animationCompleted(t),l.showDelayedElements()};if(!N.isBrowser()||!c.globals.shouldAnimate||o<1){h();return}let d=t.node,g=()=>{let u=n&&n.type==="radial",b=c.layout.gridWidth+8,x=n&&n.cx||0,w=n&&n.cy||0,m=(n&&n.r||c.layout.gridWidth/2)+4,y=`apexDrawMask${c.globals.cuid}-${e}-${s??0}-${i?"f":"s"}`,v=I.createElementNS(re,"mask");v.setAttribute("id",y),v.setAttribute("maskUnits","userSpaceOnUse");let C;if(u){let L=m;v.setAttribute("x",String(x-L)),v.setAttribute("y",String(w-L)),v.setAttribute("width",String(L*2)),v.setAttribute("height",String(L*2)),C=I.createElementNS(re,"circle"),C.setAttribute("cx",String(x)),C.setAttribute("cy",String(w)),C.setAttribute("r","0"),C.setAttribute("fill","#fff")}else v.setAttribute("x",String(-4)),v.setAttribute("y",String(-4)),v.setAttribute("width",String(b)),v.setAttribute("height",String(c.layout.gridHeight+8)),C=I.createElementNS(re,"rect"),C.setAttribute("x",String(-4)),C.setAttribute("y",String(-4)),C.setAttribute("width","0"),C.setAttribute("height",String(c.layout.gridHeight+8)),C.setAttribute("fill","#fff");v.appendChild(C),c.dom.elDefs.node.appendChild(v),d.setAttribute("mask",`url(#${y})`);let k=performance.now()+(r||0),S=L=>{let D=Math.max(0,Math.min(1,(L-k)/o)),T=hs(D);u?C.setAttribute("r",String(T*m)):C.setAttribute("width",String(T*b)),D<1?I.requestAnimationFrame(S):(d.removeAttribute("mask"),v.parentNode&&v.parentNode.removeChild(v),h())};I.requestAnimationFrame(S)},p=f=>{d.setAttribute("stroke-dasharray",String(f)),d.setAttribute("stroke-dashoffset",String(f));let u=performance.now()+(r||0),b=x=>{let w=Math.max(0,Math.min(1,(x-u)/o));d.setAttribute("stroke-dashoffset",String(f*(1-hs(w)))),w<1?I.requestAnimationFrame(b):(d.removeAttribute("stroke-dasharray"),d.removeAttribute("stroke-dashoffset"),h())};I.requestAnimationFrame(b)};I.requestAnimationFrame(()=>{if(i){g();return}let f=d.getAttribute("stroke-dasharray");if(!!f&&f!=="0"&&f!==""){g();return}let b=0;try{typeof d.getTotalLength=="function"&&(b=d.getTotalLength())}catch{b=0}if(!b){h();return}p(b)})}morphSVG(t,e,s,i,a,o,r,n){let c=this.w;a||(a=t.attr("pathFrom")),o||(o=t.attr("pathTo"));let l=()=>(c.config.chart.type==="radar"&&(r=1),`M 0 ${c.layout.gridHeight}`);(!a||a.indexOf("undefined")>-1||a.indexOf("NaN")>-1)&&(a=l()),(!o.trim()||o.indexOf("undefined")>-1||o.indexOf("NaN")>-1)&&(o=l()),c.globals.shouldAnimate||(r=1),t.plot(a).animate(1,n).plot(a).animate(r,n).plot(o).after(()=>{M.isNumber(s)?s===c.seriesData.series[c.globals.maxValsInArrayIndex].length-2&&c.globals.shouldAnimate&&this.animationCompleted(t):i!=="none"&&c.globals.shouldAnimate&&(!c.globals.comboCharts&&e===c.seriesData.series.length-1||c.globals.comboCharts)&&this.animationCompleted(t),this.showDelayedElements()})}},j=class{constructor(t){this.w=t}getDefaultFilter(t,e){let s=this.w;t.unfilter&&t.unfilter(!0),s.config.chart.dropShadow.enabled&&this.dropShadow(t,s.config.chart.dropShadow,e)}applyFilter(t,e,s){var i,a,o;let r=this.w;if(t.unfilter&&t.unfilter(!0),s==="none"){this.getDefaultFilter(t,e);return}let n=r.config.chart.dropShadow,c=s==="lighten"?2:.3;t.filterWith&&(t.filterWith(l=>{l.colorMatrix({type:"matrix",values:` ${c} 0 0 0 0 0 ${c} 0 0 0 0 0 ${c} 0 0 0 0 0 1 0 `,in:"SourceGraphic",result:"brightness"}),n.enabled&&this.addShadow(l,e,n,"brightness")}),n.noUserSpaceOnUse||(a=(i=t.filterer())==null?void 0:i.node)==null||a.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize((o=t.filterer())==null?void 0:o.node))}addShadow(t,e,s,i){var a;let o=this.w,{blur:r,top:n,left:c,color:l,opacity:h}=s;if(l=Array.isArray(l)?l[e]:l,((a=o.config.chart.dropShadow.enabledOnSeries)==null?void 0:a.length)>0&&o.config.chart.dropShadow.enabledOnSeries.indexOf(e)===-1)return t;t.offset({in:i,dx:c,dy:n,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:r,result:"blur"}),t.flood({"flood-color":l,"flood-opacity":h,result:"flood"}),t.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),t.merge(["shadow",i])}dropShadow(t,e,s=0){var i,a,o,r,n;let c=this.w;return t.unfilter&&t.unfilter(!0),M.isMsEdge()&&c.config.chart.type==="radialBar"||((i=c.config.chart.dropShadow.enabledOnSeries)==null?void 0:i.length)>0&&((a=c.config.chart.dropShadow.enabledOnSeries)==null?void 0:a.indexOf(s))===-1||t.filterWith&&(t.filterWith(l=>{this.addShadow(l,s,e,"SourceGraphic")}),e.noUserSpaceOnUse||(r=(o=t.filterer())==null?void 0:o.node)==null||r.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize((n=t.filterer())==null?void 0:n.node)),t}setSelectionFilter(t,e,s){let i=this.w;if(typeof i.interact.selectedDataPoints[e]<"u"&&i.interact.selectedDataPoints[e].indexOf(s)>-1){t.node.setAttribute("selected",!0);let a=i.config.states.active.filter;a!=="none"&&this.applyFilter(t,e,a.type)}}_scaleFilterSize(t){if(!t)return;(s=>{for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&t.setAttribute(i,s[i])})({width:"200%",height:"200%",x:"-50%",y:"-50%"})}},F=class A{constructor(t,e=null){this.w=t,this.ctx=e}roundPathCorners(t,e){t.indexOf("NaN")>-1&&(t="");function s(S,L,D){var T=L.x-S.x,E=L.y-S.y,R=Math.sqrt(T*T+E*E);return i(S,L,Math.min(1,D/R))}function i(S,L,D){return{x:S.x+(L.x-S.x)*D,y:S.y+(L.y-S.y)*D}}function a(S,L){S.length>2&&(S[S.length-2]=L.x,S[S.length-1]=L.y)}function o(S){return{x:parseFloat(S[S.length-2]),y:parseFloat(S[S.length-1])}}var r=t.split(/[,\s]/).reduce(function(S,L){var D=L.match(/^([a-zA-Z])(.+)/);return D?(S.push(D[1]),S.push(D[2])):S.push(L),S},[]),n=r.reduce(function(S,L){return parseFloat(L)==L&&S.length?S[S.length-1].push(L):S.push([L]),S},[]),c=[];if(n.length>1){var l=o(n[0]),h=null;n[n.length-1][0]=="Z"&&n[0].length>2&&(h=["L",l.x,l.y],n[n.length-1]=h),c.push(n[0]);for(var d=1;d2&&p[0]=="L"&&f.length>2&&f[0]=="L"){var u=o(g),b=o(p),x=o(f),w,m;w=s(b,u,e),m=s(b,x,e),a(p,w),p.origPoint=b,c.push(p);var y=i(w,b,.5),v=i(b,m,.5),C=["C",y.x,y.y,v.x,v.y,m.x,m.y];C.origPoint=b,c.push(C)}else c.push(p)}if(h){var k=o(c[c.length-1]);c.push(["Z"]),a(c[0],k)}}else c=n;return c.reduce(function(S,L){return S+L.join(" ")+" "},"")}drawLine(t,e,s,i,a="#a8a8a8",o=0,r=null,n="butt"){return this.w.dom.Paper.line().attr({x1:t,y1:e,x2:s,y2:i,stroke:a,"stroke-dasharray":o,"stroke-width":r,"stroke-linecap":n})}drawRect(t=0,e=0,s=0,i=0,a=0,o="#fefefe",r=1,n=null,c=null,l=0){let d=this.w.dom.Paper.rect();return d.attr({x:t,y:e,width:s>0?s:0,height:i>0?i:0,rx:a,ry:a,opacity:r,"stroke-width":n!==null?n:0,stroke:c!==null?c:"none","stroke-dasharray":l}),d.node.setAttribute("fill",o),d}drawPolygon(t,e="#e1e1e1",s=1,i="none"){return this.w.dom.Paper.polygon(t).attr({fill:i,stroke:e,"stroke-width":s})}drawCircle(t,e=null){let s=this.w;t<0&&(t=0);let i=s.dom.Paper.circle(t*2);return e!==null&&i.attr(e),i}drawPath({d:t="",stroke:e="#a8a8a8",strokeWidth:s=1,fill:i,fillOpacity:a=1,strokeOpacity:o=1,classes:r,strokeLinecap:n=null,strokeDashArray:c=0}){let l=this.w;return n===null&&(n=l.config.stroke.lineCap),(t.indexOf("undefined")>-1||t.indexOf("NaN")>-1)&&(t=`M 0 ${l.layout.gridHeight}`),l.dom.Paper.path(t).attr({fill:i,"fill-opacity":a,stroke:e,"stroke-opacity":o,"stroke-linecap":n,"stroke-width":s,"stroke-dasharray":c,class:r})}group(t=null){let s=this.w.dom.Paper.group();return t!==null&&s.attr(t),s}move(t,e){return["M",t,e].join(" ")}line(t,e,s=null){return s==="H"?[" H",t].join(" "):s==="V"?[" V",e].join(" "):[" L",t,e].join(" ")}curve(t,e,s,i,a,o){return["C",t,e,s,i,a,o].join(" ")}quadraticCurve(t,e,s,i){return["Q",t,e,s,i].join(" ")}arc(t,e,s,i,a,o,r,n=!1){let c="A";return n&&(c="a"),[c,t,e,s,i,a,o,r].join(" ")}renderPaths({j:t,realIndex:e,pathFrom:s,pathTo:i,stroke:a,strokeWidth:o,strokeLinecap:r,fill:n,animationDelay:c,initialSpeed:l,dataChangeSpeed:h,className:d,chartType:g,shouldClipToGrid:p=!0,bindEventsOnPaths:f=!0,drawShadow:u=!0,drawMask:b=null}){let x=this.w,w=new j(this.w),m=new ft(this.w,void 0),y=this.w.config.chart.animations.enabled,v=y&&this.w.config.chart.animations.dynamicAnimation.enabled;if(s&&s.startsWith("M 0 0")&&i){let P=i.match(/^M\s+[\d.-]+\s+[\d.-]+/);P&&(s=s.replace(/^M\s+0\s+0/,P[0]))}let C,k=!!(y&&!x.globals.resized||v&&x.globals.dataChanged&&x.globals.shouldAnimate),S=typeof d=="string"&&(d.indexOf("apexcharts-line")>-1||d.indexOf("apexcharts-area")>-1||d.indexOf("apexcharts-rangeArea")>-1||d.indexOf("apexcharts-radar")>-1),L=!!(y&&!x.globals.resized&&!x.globals.dataChanged&&S);k&&!L?C=s:(C=i,k||(x.globals.animationEnded=!0));let D=x.config.stroke.dashArray,T=0;Array.isArray(D)?T=D[e]:T=x.config.stroke.dashArray;let E=this.drawPath({d:C,stroke:a,strokeWidth:o,fill:n,fillOpacity:1,classes:d,strokeLinecap:r,strokeDashArray:T});E.attr("index",e),p&&(g==="bar"&&!x.globals.isBarHorizontal||x.globals.comboCharts?E.attr({"clip-path":`url(#gridRectBarMask${x.globals.cuid})`}):E.attr({"clip-path":`url(#gridRectMask${x.globals.cuid})`})),x.config.chart.dropShadow.enabled&&u&&w.dropShadow(E,x.config.chart.dropShadow,e),f&&(E.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,E)),E.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,E)),E.node.addEventListener("mousedown",this.pathMouseDown.bind(this,E))),E.attr({pathTo:i,pathFrom:s});let R={el:E,j:t,realIndex:e,pathFrom:s,pathTo:i,fill:n,strokeWidth:o,delay:c};if(y&&!x.globals.resized&&!x.globals.dataChanged)if(L){let P=l*2,_=a==="none"||o===0,X=x.seriesData.series.length,z=x.globals.comboCharts?!0:e===X-1;m.animateDraw(E,{realIndex:e,j:t,isFill:_,isLast:z,speed:P,delay:0,mask:b})}else m.animatePathsGradually($(B({},R),{speed:l}));else(x.globals.resized||!x.globals.dataChanged)&&m.showDelayedElements();return x.globals.dataChanged&&v&&k&&m.animatePathsGradually($(B({},R),{speed:h})),E}drawPattern(t,e,s,i="#a8a8a8",a=0){return this.w.dom.Paper.pattern(e,s,n=>{t==="horizontalLines"?n.line(0,0,s,0).stroke({color:i,width:a+1}):t==="verticalLines"?n.line(0,0,0,e).stroke({color:i,width:a+1}):t==="slantedLines"?n.line(0,0,e,s).stroke({color:i,width:a}):t==="squares"?n.rect(e,s).fill("none").stroke({color:i,width:a}):t==="circles"&&n.circle(e).fill("none").stroke({color:i,width:a})})}drawGradient(t,e,s,i,a,o=null,r=null,n=[],c=0){let l=this.w,h;e.length<9&&e.indexOf("#")===0&&(e=M.hexToRgba(e,i)),s.length<9&&s.indexOf("#")===0&&(s=M.hexToRgba(s,a));let d=0,g=1,p=1,f=null;r!==null&&(d=typeof r[0]<"u"?r[0]/100:0,g=typeof r[1]<"u"?r[1]/100:1,p=typeof r[2]<"u"?r[2]/100:1,f=typeof r[3]<"u"?r[3]/100:null);let u=l.config.chart.type==="donut"||l.config.chart.type==="pie"||l.config.chart.type==="polarArea"||l.config.chart.type==="bubble";if(!n||n.length===0?h=l.dom.Paper.gradient(u?"radial":"linear",b=>{b.stop(d,e,i),b.stop(g,s,a),b.stop(p,s,a),f!==null&&b.stop(f,e,i)}):h=l.dom.Paper.gradient(u?"radial":"linear",b=>{(Array.isArray(n[c])?n[c]:n).forEach(w=>{b.stop(w.offset/100,w.color,w.opacity)})}),!u)t==="vertical"?h.from(0,0).to(0,1):t==="diagonal"?h.from(0,0).to(1,1):t==="horizontal"?h.from(0,1).to(1,1):t==="diagonal2"&&h.from(1,0).to(0,1);else{let b=l.layout.gridWidth/2,x=l.layout.gridHeight/2;l.config.chart.type!=="bubble"?h.attr({gradientUnits:"userSpaceOnUse",cx:b,cy:x,r:o}):h.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}return h}getTextBasedOnMaxWidth({text:t,maxWidth:e,fontSize:s,fontFamily:i}){let a=this.getTextRects(t,s,i,""),o=a.width/t.length,r=Math.floor(e/o);return e"u"&&(s="");let f=s;i||(i="start"),(!n||!n.length)&&(n=p.config.chart.foreColor),o=o||p.config.chart.fontFamily,a=a||"11px",r=r||"regular";let u={maxWidth:l,fontSize:a,fontFamily:o},b;return Array.isArray(s)?b=p.dom.Paper.text(x=>{for(let w=0;wx.tspan(f))),b.attr({x:t,y:e,"text-anchor":i,"dominant-baseline":g,"font-size":a,"font-family":o,"font-weight":r,fill:n,class:"apexcharts-text "+h}),b.node.style.fontFamily=o,b.node.style.opacity=c,b}getMarkerPath(t,e,s,i){let a="";switch(s){case"cross":i=i/1.4,a=`M ${t-i} ${e-i} L ${t+i} ${e+i} M ${t-i} ${e+i} L ${t+i} ${e-i}`;break;case"plus":i=i/1.12,a=`M ${t-i} ${e} L ${t+i} ${e} M ${t} ${e-i} L ${t} ${e+i}`;break;case"star":case"sparkle":{let o=5;i=i*1.15,s==="sparkle"&&(i=i/1.1,o=4);let r=Math.PI/o;for(let n=0;n<=2*o;n++){let c=n*r,l=n%2===0?i:i/2,h=t+l*Math.sin(c),d=e-l*Math.cos(c);a+=(n===0?"M":"L")+h+","+d}a+="Z";break}case"triangle":a=`M ${t} ${e-i} L ${t+i} ${e+i} L ${t-i} ${e+i} Z`;break;case"square":case"rect":i=i/1.125,a=`M ${t-i} ${e-i} L ${t+i} ${e-i} L ${t+i} ${e+i} L ${t-i} ${e+i} Z`;break;case"diamond":i=i*1.05,a=`M ${t} ${e-i} L ${t+i} ${e} L ${t} ${e+i} L ${t-i} ${e} Z`;break;case"line":i=i/1.1,a=`M ${t-i} ${e} L ${t+i} ${e}`;break;default:i=i*2,a=`M ${t}, ${e} m -${i/2}, 0 a ${i/2},${i/2} 0 1,0 ${i},0 a ${i/2},${i/2} 0 1,0 -${i},0`;break}return a}drawMarkerShape(t,e,s,i,a){let o=this.drawPath({d:this.getMarkerPath(t,e,s,i),stroke:a.pointStrokeColor,strokeDashArray:a.pointStrokeDashArray,strokeWidth:a.pointStrokeWidth,fill:a.pointFillColor,fillOpacity:a.pointFillOpacity,strokeOpacity:a.pointStrokeOpacity});return o.attr({cx:t,cy:e,shape:a.shape,class:a.class?a.class:""}),o}drawMarker(t,e,s){t=t||0;let i=s.pSize||0;return M.isNumber(e)||(i=0,e=0),this.drawMarkerShape(t,e,s?.shape,i,B(B({},s),s.shape==="line"||s.shape==="plus"||s.shape==="cross"?{pointStrokeColor:s.pointFillColor,pointStrokeOpacity:s.pointFillOpacity}:{}))}pathMouseEnter(t,e){var s,i;let a=this.w,o=new j(this.w),r=parseInt((s=t.node.getAttribute("index"))!=null?s:"",10),n=parseInt((i=t.node.getAttribute("j"))!=null?i:"",10);if(!(isNaN(r)||isNaN(n))&&(typeof a.config.chart.events.dataPointMouseEnter=="function"&&a.config.chart.events.dataPointMouseEnter(e,this.ctx,{seriesIndex:r,dataPointIndex:n,w:a}),A._fireEvent(a,"dataPointMouseEnter",[e,this.ctx,{seriesIndex:r,dataPointIndex:n,w:a}]),!(a.config.states.active.filter.type!=="none"&&t.node.getAttribute("selected")==="true")&&a.config.states.hover.filter.type!=="none"&&!a.interact.isTouchDevice)){let c=a.config.states.hover.filter;o.applyFilter(t,r,c.type)}}pathMouseLeave(t,e){var s,i;let a=this.w,o=new j(this.w),r=parseInt((s=t.node.getAttribute("index"))!=null?s:"",10),n=parseInt((i=t.node.getAttribute("j"))!=null?i:"",10);isNaN(r)||isNaN(n)||(typeof a.config.chart.events.dataPointMouseLeave=="function"&&a.config.chart.events.dataPointMouseLeave(e,this.ctx,{seriesIndex:r,dataPointIndex:n,w:a}),A._fireEvent(a,"dataPointMouseLeave",[e,this.ctx,{seriesIndex:r,dataPointIndex:n,w:a}]),!(a.config.states.active.filter.type!=="none"&&t.node.getAttribute("selected")==="true")&&a.config.states.hover.filter.type!=="none"&&o.getDefaultFilter(t,r))}pathMouseDown(t,e){var s,i;let a=this.w,o=new j(this.w),r=parseInt((s=t.node.getAttribute("index"))!=null?s:"",10),n=parseInt((i=t.node.getAttribute("j"))!=null?i:"",10);if(isNaN(r)||isNaN(n))return;let c="false";if(t.node.getAttribute("selected")==="true"){t.node.setAttribute("selected","false");let l=a.interact.selectedDataPoints[r].indexOf(n);l>-1&&a.interact.selectedDataPoints[r].splice(l,1)}else{if(!a.config.states.active.allowMultipleDataPointsSelection&&a.interact.selectedDataPoints.length>0){a.interact.selectedDataPoints=[];let l=a.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),h=a.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),d=g=>{Array.prototype.forEach.call(g,p=>{p.node.setAttribute("selected","false"),o.getDefaultFilter(p,r)})};d(l),d(h)}t.node.setAttribute("selected","true"),c="true",typeof a.interact.selectedDataPoints[r]>"u"&&(a.interact.selectedDataPoints[r]=[]),a.interact.selectedDataPoints[r].push(n)}if(c==="true"){let l=a.config.states.active.filter;if(l!=="none")o.applyFilter(t,r,l.type);else if(a.config.states.hover.filter!=="none"&&!a.interact.isTouchDevice){let h=a.config.states.hover.filter;o.applyFilter(t,r,h.type)}}else if(a.config.states.active.filter.type!=="none")if(a.config.states.hover.filter.type!=="none"&&!a.interact.isTouchDevice){let l=a.config.states.hover.filter;o.applyFilter(t,r,l.type)}else o.getDefaultFilter(t,r);typeof a.config.chart.events.dataPointSelection=="function"&&a.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:a.interact.selectedDataPoints,seriesIndex:r,dataPointIndex:n,w:a}),e&&A._fireEvent(a,"dataPointSelection",[e,this.ctx,{selectedDataPoints:a.interact.selectedDataPoints,seriesIndex:r,dataPointIndex:n,w:a}])}rotateAroundCenter(t){let e={};t&&typeof t.getBBox=="function"&&(e=t.getBBox());let s=e.x+e.width/2,i=e.y+e.height/2;return{x:s,y:i}}setupEventDelegation(t,e){let s=null;t.node.addEventListener("mouseover",i=>{let a=A._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?A._findDelegateTarget(i.relatedTarget,t.node,e):null)!==s&&(s&&s.instance&&this.pathMouseLeave(s.instance,i),s=null)}),t.node.addEventListener("mousedown",i=>{let a=A._findDelegateTarget(i.target,t.node,e);a&&a.instance&&this.pathMouseDown(a.instance,i)})}static _fireEvent(t,e,s){let i=t.globals.events;if(!i||!Object.prototype.hasOwnProperty.call(i,e))return;let a=i[e];for(let o=0;o0&&t.getComputedTextLength()>=s/1.1)){for(let i=e.length-3;i>0;i-=3)if(t.getSubStringLength(0,i)<=s/1.1){t.textContent=e.substring(0,i)+"...";return}t.textContent="."}}},U="http://www.w3.org/2000/svg",ot=class A{constructor(t,e){typeof t=="object"?(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 A(this.x,this.y)}},_t=class A{constructor(t,e,s,i,a,o){this.a=t??1,this.b=e??0,this.c=s??0,this.d=i??1,this.e=a??0,this.f=o??0}rotate(t){let e=t*Math.PI/180,s=Math.cos(e),i=Math.sin(e);return this.multiply(new A(s,i,-i,s,0,0))}scale(t,e){return this.multiply(new A(t,0,0,e??t,0,0))}multiply(t){return new A(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 ot(this.a*t.x+this.c*t.y+this.e,this.b*t.x+this.d*t.y+this.f)}},ue=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}},it=class{constructor(t){this.w=t,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}clippedImgArea(t){let e=this.w,s=e.config,i=parseInt(String(e.layout.gridWidth),10),a=parseInt(String(e.layout.gridHeight),10),o=i>a?i:a,r=t.image,n=0,c=0;typeof t.width>"u"&&typeof t.height>"u"?s.fill.image.width!==void 0&&s.fill.image.height!==void 0?(n=s.fill.image.width+1,c=s.fill.image.height):(n=o+1,c=o):(n=t.width,c=t.height);let l=I.createElementNS(U,"pattern");F.setAttrs(l,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:n+"px",height:c+"px"});let h=I.createElementNS(U,"image");l.appendChild(h);let d=N.isBrowser()?window.SVG:global.SVG;h.setAttributeNS(d.xlink,"href",r),F.setAttrs(h,{x:0,y:0,preserveAspectRatio:"none",width:n+"px",height:c+"px"}),h.style.opacity=t.opacity,e.dom.elDefs.node.appendChild(l)}getSeriesIndex(t){let e=this.w,s=e.config.chart.type;return(s==="bar"||s==="rangeBar")&&e.config.plotOptions.bar.distributed||s==="heatmap"||s==="treemap"?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.seriesData.series.length,this.seriesIndex}computeColorStops(t,e){let s=this.w,i=null,a=null;for(let c of t)c>=e.threshold?(i===null||c>i)&&(i=c):(a===null||c-1?f=M.getOpacityFromRGBA(g):x=M.hexToRgba(M.rgb2hex(g),f);let w=M.isCSSVariable(g)?M.getThemeColor(g):g;if(p==="pattern"&&(c=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:c,fillColor:w,defaultColor:x})),u){let m=r.fill.gradient.colorStops?[...r.fill.gradient.colorStops]:[],y=r.fill.gradient.type;h&&(m[this.seriesIndex]=this.computeColorStops(o.seriesData.series[this.seriesIndex],r.plotOptions.line.colors),y="vertical"),l=this.handleGradientFill({type:y,fillConfig:t.fillConfig,fillColor:w,fillOpacity:f,colorStops:m,i:this.seriesIndex})}if(p==="image"){let m=r.fill.image.src,y=t.patternID?t.patternID:"",v=`pattern${o.globals.cuid}${t.seriesNumber+1}${y}`;this.patternIDs.indexOf(v)===-1&&(this.clippedImgArea({opacity:f,image:Array.isArray(m)?t.seriesNumber-1&&(g=M.getOpacityFromRGBA(h));let p=r.gradient.opacityTo===void 0?s:Array.isArray(r.gradient.opacityTo)?r.gradient.opacityTo[o]:r.gradient.opacityTo;if(r.gradient.gradientToColors===void 0||r.gradient.gradientToColors.length===0)r.gradient.shade==="dark"?d=l.shadeColor(parseFloat(r.gradient.shadeIntensity)*-1,e.indexOf("rgb")>-1?M.rgb2hex(e):e):d=l.shadeColor(parseFloat(r.gradient.shadeIntensity),e.indexOf("rgb")>-1?M.rgb2hex(e):e);else if(r.gradient.gradientToColors[n.seriesNumber]){let f=r.gradient.gradientToColors[n.seriesNumber];d=f,f.indexOf("rgba")>-1&&(p=M.getOpacityFromRGBA(f))}else d=e;if(r.gradient.gradientFrom&&(h=r.gradient.gradientFrom),r.gradient.gradientTo&&(d=r.gradient.gradientTo),r.gradient.inverseColors){let f=h;h=d,d=f}return h.indexOf("rgb")>-1&&(h=M.rgb2hex(h)),d.indexOf("rgb")>-1&&(d=M.rgb2hex(d)),c.drawGradient(t,h,d,g,p,n.size,r.gradient.stops,a,o)}},pt=class{constructor(t,e){this.w=t,this.ctx=e,this._filters=new j(this.w),this._graphics=new F(this.w,this.ctx)}setGlobalMarkerSize(){let 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"u"&&t.globals.markers.size.push(t.globals.markers.size[0])}else t.globals.markers.size=t.config.series.map(()=>t.config.markers.size)}plotChartMarkers({pointsPos:t,seriesIndex:e,j:s,pSize:i,alwaysDrawMarker:a=!1,isVirtualPoint:o=!1}){let r=this.w,n=e,c=t,l=null,h=new F(this.w),d=r.config.markers.discrete&&r.config.markers.discrete.length;if(Array.isArray(c.x))for(let g=0;g0:r.config.markers.size>0)||a||d){u||(b+=` w${M.randomId()}`);let w=this.getMarkerConfig({cssClass:b,seriesIndex:e,dataPointIndex:f}),m=r.config.series[n];m.data[f]&&(m.data[f].fillColor&&(w.pointFillColor=m.data[f].fillColor),m.data[f].strokeColor&&(w.pointStrokeColor=m.data[f].strokeColor)),typeof i<"u"&&(w.pSize=i),(c.x[g]<-r.globals.markers.largestSize||c.x[g]>r.layout.gridWidth+r.globals.markers.largestSize||c.y[g]<-r.globals.markers.largestSize||c.y[g]>r.layout.gridHeight+r.globals.markers.largestSize)&&(w.pSize=0),u||((r.globals.markers.size[e]>0||a||d)&&!l&&(l=h.group({class:a||d?"":"apexcharts-series-markers"}),l.attr("clip-path",`url(#gridRectMarkerMask${r.globals.cuid})`),this.setupMarkerDelegation(l)),p=h.drawMarker(c.x[g],c.y[g],w),p.attr("rel",f),p.attr("j",f),p.attr("index",e),p.node.setAttribute("default-marker-size",w.pSize),dt(p,c.x[g],r),this._filters.setSelectionFilter(p,e,f),l&&l.add(p))}else typeof r.globals.pointsArray[e]>"u"&&(r.globals.pointsArray[e]=[]),r.globals.pointsArray[e].push([c.x[g],c.y[g]])}return l}getMarkerConfig({cssClass:t,seriesIndex:e,dataPointIndex:s=null,radius:i=null,size:a=null,strokeWidth:o=null}){let r=this.w,n=this.getMarkerStyle(e),c=a===null?r.globals.markers.size[e]:a,l=r.config.markers;return s!==null&&l.discrete.length&&l.discrete.map(h=>{h.seriesIndex===e&&h.dataPointIndex===s&&(n.pointStrokeColor=h.strokeColor,n.pointFillColor=h.fillColor,c=h.size,n.pointShape=h.shape)}),{pSize:i===null?c:i,pRadius:i!==null?i:l.radius,pointStrokeWidth:o!==null?o:Array.isArray(l.strokeWidth)?l.strokeWidth[e]:l.strokeWidth,pointStrokeColor:n.pointStrokeColor,pointFillColor:n.pointFillColor,shape:n.pointShape||(Array.isArray(l.shape)?l.shape[e]:l.shape),class:t,pointStrokeOpacity:Array.isArray(l.strokeOpacity)?l.strokeOpacity[e]:l.strokeOpacity,pointStrokeDashArray:Array.isArray(l.strokeDashArray)?l.strokeDashArray[e]:l.strokeDashArray,pointFillOpacity:Array.isArray(l.fillOpacity)?l.fillOpacity[e]:l.fillOpacity,seriesIndex:e}}setupMarkerDelegation(t){let e=this.w,s=".apexcharts-marker";this._graphics.setupEventDelegation(t,s),t.node.addEventListener("click",i=>{e.config.markers.onClick&&F._findDelegateTarget(i.target,t.node,s)&&e.config.markers.onClick(i)}),t.node.addEventListener("dblclick",i=>{e.config.markers.onDblClick&&F._findDelegateTarget(i.target,t.node,s)&&e.config.markers.onDblClick(i)}),t.node.addEventListener("touchstart",i=>{let a=F._findDelegateTarget(i.target,t.node,s);a&&a.instance&&this._graphics.pathMouseDown(a.instance,i)},{passive:!0})}addEvents(t){let e=this.w;t.node.addEventListener("mouseenter",this._graphics.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",this._graphics.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",this._graphics.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",this._graphics.pathMouseDown.bind(this.ctx,t),{passive:!0})}getMarkerStyle(t){let e=this.w,s=e.globals.markers.colors,i=e.config.markers.strokeColor||e.config.markers.strokeColors,a=Array.isArray(i)?i[t]:i,o=Array.isArray(s)?s[t]:s;return{pointStrokeColor:a,pointFillColor:o}}},Gt=class{constructor(t,e){this.ctx=e,this.w=t,this.initialAnim=this.w.config.chart.animations.enabled,this.anim=new ft(this.w),this.filters=new j(this.w),this.fill=new it(this.w),this.markers=new pt(this.w,this.ctx),this.graphics=new F(this.w)}draw(t,e,s){let i=this.w,a=this.graphics,o=s.realIndex,r=s.pointsPos,n=s.zRatio,c=s.elParent,l=a.group({class:`apexcharts-series-markers apexcharts-series-${i.config.chart.type}`});if(l.attr("clip-path",`url(#gridRectMarkerMask${i.globals.cuid})`),this.markers.setupMarkerDelegation(l),Array.isArray(r.x))for(let h=0;hb.maxBubbleRadius&&(p=b.maxBubbleRadius)}let f=r.x[h],u=r.y[h];if(p=p||0,(u===null||typeof i.seriesData.series[o][d]>"u")&&(g=!1),g){let b=this.drawPoint(f,u,p,o,d,e);l.add(b)}c.add(l)}}drawPoint(t,e,s,i,a,o){let r=this.w,n=i,c=this.anim,l=this.filters,h=this.fill,d=this.markers,g=this.graphics,p=d.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:n,dataPointIndex:a,radius:r.config.chart.type==="bubble"||r.globals.comboCharts&&r.config.series[i]&&r.config.series[i].type==="bubble"?s:null}),f=h.fillPath({seriesNumber:i,dataPointIndex:a,color:p.pointFillColor,patternUnits:"objectBoundingBox",value:r.seriesData.series[i][o]}),u=g.drawMarker(t,e,p),b=r.config.series[n];if(b.data[a]&&b.data[a].fillColor&&(f=b.data[a].fillColor),u.attr({fill:f}),r.config.chart.dropShadow.enabled){let x=r.config.chart.dropShadow;l.dropShadow(u,x,i)}if(this.initialAnim&&!r.globals.dataChanged&&!r.globals.resized){let x=r.config.chart.animations,w=x.speed,m=r.globals.dataPoints||1,y=x.animateGradually,C=y&&y.enabled!==!1?Math.min(20,w*.5/Math.max(1,m)):0,k=ns({style:C>0?"sequential":"none",index:a,baseDelay:C});c.animatePop(u,{speed:w,delay:k,onComplete:()=>c.animationCompleted(u)})}else r.globals.animationEnded=!0;return u.attr({rel:a,j:a,index:i,"default-marker-size":p.pSize}),l.setSelectionFilter(u,i,a),u.node.classList.add("apexcharts-marker"),u}centerTextInBubble(t){let e=this.w;return t=t+parseInt(e.config.dataLabels.style.fontSize,10)/4,{y:t}}},gt=class{constructor(t,e=null){this.w=t,this.ctx=e}dataLabelsCorrection(t,e,s,i,a,o,r){let n=this.w,c=new F(this.w),l=!1,h=c.getTextRects(s,r),d=h.width,g=h.height;e<0&&(e=0),e>n.layout.gridHeight+g&&(e=n.layout.gridHeight+g/2),typeof n.globals.dataLabelsRects[i]>"u"&&(n.globals.dataLabelsRects[i]=[]),n.globals.dataLabelsRects[i].push({x:t,y:e,width:d,height:g});let p=n.globals.dataLabelsRects[i].length-2,f=typeof n.globals.lastDrawnDataLabelsIndexes[i]<"u"?n.globals.lastDrawnDataLabelsIndexes[i][n.globals.lastDrawnDataLabelsIndexes[i].length-1]:0;if(typeof n.globals.dataLabelsRects[i][p]<"u"){let u=n.globals.dataLabelsRects[i][f];(t>u.x+u.width||e>u.y+u.height||e+gr.config.dataLabels.formatter(m,{seriesIndex:s,dataPointIndex:d,w:r});r.config.chart.type==="bubble"?(u=r.seriesData.seriesZ[s][d],b=x(u),h=e.y[f],h=new Gt(this.w,this.ctx).centerTextInBubble(h).y):typeof u<"u"&&(b=x(u));let w=r.config.dataLabels.textAnchor;r.globals.isSlopeChart&&(d===0?w="end":d===r.config.series[s].data.length-1?w="start":w="middle"),this.plotDataLabelsText({x:l,y:h,text:b,i:s,j:d,parent:g,offsetCorrection:!0,dataLabelsConfig:r.config.dataLabels,textAnchor:w})}return g}plotDataLabelsText(t){let e=this.w,s=new F(this.w),{x:i,y:a,i:o,j:r,text:n,textAnchor:c,fontSize:l,parent:h,dataLabelsConfig:d,color:g,alwaysDrawDataLabel:p,offsetCorrection:f,className:u}=t,b=null;if(Array.isArray(e.config.dataLabels.enabledOnSeries)&&e.config.dataLabels.enabledOnSeries.indexOf(o)<0)return b;let x={x:i,y:a,drawnextLabel:!0,textRects:null};if(f&&(x=this.dataLabelsCorrection(i,a,n,o,r,p,parseInt(d.style.fontSize,10).toString())),e.interact.zoomed||(i=x.x,a=x.y),x.textRects){let v=e.globals.barPadForNumericAxis||0;(i<-(v+20)-x.textRects.width||i>e.layout.gridWidth+x.textRects.width+v+30)&&(n="")}let w=e.globals.dataLabels.style.colors[o];((e.config.chart.type==="bar"||e.config.chart.type==="rangeBar")&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(w=e.globals.dataLabels.style.colors[r]),typeof w=="function"&&(w=w({series:e.seriesData.series,seriesIndex:o,dataPointIndex:r,w:e})),g&&(w=g);let m=d.offsetX,y=d.offsetY;if((e.config.chart.type==="bar"||e.config.chart.type==="rangeBar")&&(m=0,y=0),e.globals.isSlopeChart&&(r!==0&&(m=d.offsetX*-2+5),r!==0&&r!==e.config.series[o].data.length-1&&(m=0)),x.drawnextLabel){if(c==="middle"&&i===e.layout.gridWidth&&(c="end"),b=s.drawText({x:i+m,y:a+y,foreColor:w,textAnchor:c||d.textAnchor,text:n,fontSize:l||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"}),b.attr({class:u||"apexcharts-datalabel",cx:i,cy:a}),d.dropShadow.enabled){let v=d.dropShadow;new j(this.w).dropShadow(b,v)}h.add(b),dt(b,i,e),typeof e.globals.lastDrawnDataLabelsIndexes[o]>"u"&&(e.globals.lastDrawnDataLabelsIndexes[o]=[]),e.globals.lastDrawnDataLabelsIndexes[o].push(r)}return b}addBackgroundToDataLabel(t,e){let s=this.w,i=s.config.dataLabels.background,a=i.padding,o=i.padding/2,r=e.width,n=e.height,l=new F(this.w).drawRect(e.x-a,e.y-o/2,r+a*2,n+o,i.borderRadius,s.config.chart.background==="transparent"||!s.config.chart.background?"#fff":s.config.chart.background,i.opacity,i.borderWidth,i.borderColor);return i.dropShadow.enabled&&new j(this.w).dropShadow(l,i.dropShadow),l}dataLabelsBackground(){var t;let e=this.w;if(e.config.chart.type==="bubble")return;let s=e.dom.baseEl.querySelectorAll(".apexcharts-datalabels text");for(let i=0;i"u"?"":t[i],l=c,h=n.formatters.xLabelFormatter,d=n.config.xaxis.labels.formatter,g=new vt(this.w),p=c;r&&(l=g.xLabelFormat(h,c,p,{i,dateFormatter:new Q(this.w).formatDate,w:n}),d!==void 0&&(l=d(c,t[i],{i,dateFormatter:new Q(this.w).formatDate,w:n}))),e.length>0?(s=e[i].position,l=e[i].value):n.config.xaxis.type==="datetime"&&d===void 0&&(l=""),typeof l>"u"&&(l=""),l=Array.isArray(l)?l:l.toString();let f=new F(this.w),u={};n.layout.rotateXLabels&&r?u=f.getTextRects(l,parseInt(o,10).toString(),null,`rotate(${n.config.xaxis.labels.rotate} 0 0)`,!1):u=f.getTextRects(l,parseInt(o,10).toString());let b=!n.config.xaxis.labels.showDuplicates&&this.timeScale;return!Array.isArray(l)&&(String(l)==="NaN"||a.indexOf(l)>=0&&b)&&(l=""),{x:s,text:l,textRect:u}}checkLabelBasedOnTickamount(t,e,s){let i=this.w,a=i.config.xaxis.tickAmount;if(a==="dataPoints"&&(a=Math.round(i.layout.gridWidth/120)),a>s)return e;let o=Math.round(s/(a+1));return t%o===0||(e.text=""),e}checkForOverflowingLabels(t,e,s,i,a){let o=this.w;if(t===0&&o.globals.skipFirstTimelinelabel&&(e.text=""),t===s-1&&o.globals.skipLastTimelinelabel&&(e.text=""),o.config.xaxis.labels.hideOverlappingLabels&&i.length>0){let r=a[a.length-1];if(o.config.xaxis.labels.trim&&o.config.xaxis.type!=="datetime")return e;e.xe.collapsedSeriesIndices.indexOf(s)===-1)}translateYAxisIndex(t){let e=this.w,s=e.globals,i=e.config.yaxis;return e.seriesData.series.length>i.length||i.some(o=>Array.isArray(o.seriesName))?t:s.seriesYAxisReverseMap[t]}isYAxisHidden(t){let e=this.w,s=e.config.yaxis[t];if(!s.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!s.showForNullSeries){let i=e.globals.seriesYAxisMap[t],a=new q(this.w);return i.every(o=>a.isSeriesNull(o))}return!1}getYAxisForeColor(t,e){var s;let i=this.w;return Array.isArray(t)&&i.globals.yAxisScale[e]&&((s=this.theme)==null||s.pushExtraColors(t,i.globals.yAxisScale[e].result.length,!1)),t}drawYAxisTicks(t,e,s,i,a,o,r){let n=this.w,c=new F(this.w),l=n.layout.translateY+n.config.yaxis[a].labels.offsetY;if(n.globals.isBarHorizontal?l=0:n.config.chart.type==="heatmap"&&(l+=o/2),i.show&&e>0){n.config.yaxis[a].opposite===!0&&(t=t+i.width);for(let h=e;h>=0;h--){let d=c.drawLine(t+s.offsetX-i.width+i.offsetX,l+i.offsetY,t+s.offsetX+i.offsetX,l+i.offsetY,i.color);r.add(d),l+=o}}}},St=class{constructor(t,e,s){this.w=t,this.ctx=e,this.elgrid=s,this.axesUtils=new ct(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=[],t.config.xaxis.position==="top"?this.offY=0:this.offY=t.layout.gridHeight,this.offY=this.offY+t.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal=t.config.chart.type==="bar"&&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(){let t=this.w,e=new F(this.w),s=e.group({class:"apexcharts-xaxis",transform:`translate(${t.config.xaxis.offsetX}, ${t.config.xaxis.offsetY})`}),i=e.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${t.layout.translateXAxisX}, ${t.layout.translateXAxisY})`});s.add(i);let a=[];for(let o=0;or),t.labelData.hasXaxisGroups){let o=t.labelData.groups;a=[];for(let n=0;no[n].cols*c,r)}if(t.config.xaxis.title.text!==void 0){let o=e.group({class:"apexcharts-xaxis-title"}),r=e.drawText({x:t.layout.gridWidth/2+t.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+(t.config.xaxis.position==="bottom"?t.layout.xAxisLabelsHeight:-t.layout.xAxisLabelsHeight-10)+t.config.xaxis.title.offsetY,text:t.config.xaxis.title.text,textAnchor:"middle",fontSize:t.config.xaxis.title.style.fontSize,fontFamily:t.config.xaxis.title.style.fontFamily,fontWeight:t.config.xaxis.title.style.fontWeight,foreColor:t.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+t.config.xaxis.title.style.cssClass});o.add(r),s.add(o)}if(t.config.xaxis.axisBorder.show){let o=t.globals.barPadForNumericAxis,r=e.drawLine(t.globals.padHorizontal+t.config.xaxis.axisBorder.offsetX-o,this.offY,this.xaxisBorderWidth+o,this.offY,t.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(r):s.add(r)}return s}drawXAxisLabelAndGroup(t,e,s,i,a,o,r={}){var n,c;let l=[],h=[],d=this.w,g=r.xaxisFontSize||this.xaxisFontSize,p=r.xaxisFontFamily||this.xaxisFontFamily,f=r.xaxisForeColors||this.xaxisForeColors,u=r.fontWeight||d.config.xaxis.labels.style.fontWeight,b=r.cssClass||d.config.xaxis.labels.style.cssClass,x,w=d.globals.padHorizontal,m=i.length,y=d.config.xaxis.type==="category"?d.globals.dataPoints:m;if(y===0&&m>y&&(y=m),a){let v=Math.max(Number(d.config.xaxis.tickAmount)||1,y>1?y-1:y);x=d.layout.gridWidth/Math.min(v,m-1),w=w+o(0,x)/2+d.config.xaxis.labels.offsetX}else x=d.layout.gridWidth/y,w=w+o(0,x)+d.config.xaxis.labels.offsetX;for(let v=0;v<=m-1;v++){let C=w-o(v,x)/2+d.config.xaxis.labels.offsetX;v===0&&m===1&&x/2===w&&y===1&&(C=d.layout.gridWidth/2);let k=this.axesUtils.getLabel(i,d.labelData.timescaleLabels,C,v,l,g,t),S=28;d.layout.rotateXLabels&&t&&(S=22),d.config.xaxis.title.text&&d.config.xaxis.position==="top"&&(S+=parseFloat(d.config.xaxis.title.style.fontSize)+2),t||(S=S+parseFloat(g)+(d.layout.xAxisLabelsHeight-d.layout.xAxisGroupLabelsHeight)+(d.layout.rotateXLabels?10:0)),typeof d.config.xaxis.tickAmount<"u"&&d.config.xaxis.tickAmount!=="dataPoints"&&d.config.xaxis.type!=="datetime"?k=this.axesUtils.checkLabelBasedOnTickamount(v,k,m):k=this.axesUtils.checkForOverflowingLabels(v,k,m,l,h);let D=()=>t&&d.config.xaxis.convertedCatToNumeric?f[d.globals.minX+v-1]:f[v],E=((c=(n=k.textRect)==null?void 0:n.width)!=null?c:0)/2,R=k.x+E<0;if(d.config.xaxis.labels.show&&!R){let P=e.drawText({x:k.x,y:this.offY+d.config.xaxis.labels.offsetY+S-(d.config.xaxis.position==="top"?d.layout.xAxisHeight+d.config.xaxis.axisTicks.height-2:0),text:k.text,textAnchor:"middle",fontWeight:u,fontSize:g,fontFamily:p,foreColor:Array.isArray(f)?D():f,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+b});if(s.add(P),P.on("click",_=>{if(typeof d.config.chart.events.xAxisLabelClick=="function"){let X=Object.assign({},d,{labelIndex:v});d.config.chart.events.xAxisLabelClick(_,this.ctx,X)}}),t){let _=I.createElementNS(U,"title");_.textContent=Array.isArray(k.text)?k.text.join(" "):k.text,P.node.appendChild(_),k.text!==""&&(l.push(k.text),h.push(k))}}v"u"?"":r[p];f=l(f,{seriesIndex:t,dataPointIndex:p,w:e});let u=this.axesUtils.getYAxisForeColor(h.style.colors,t),b=()=>Array.isArray(u)?u[p]:u,x=0;Array.isArray(f)&&(x=f.length/2*parseInt(h.style.fontSize,10));let w=h.offsetX-15,m="end";this.yaxis.opposite&&(m="start"),e.config.yaxis[0].labels.align==="left"?(w=h.offsetX,m="start"):e.config.yaxis[0].labels.align==="center"?(w=h.offsetX,m="middle"):e.config.yaxis[0].labels.align==="right"&&(m="end");let y=s.drawText({x:w,y:c+n+h.offsetY-x,text:f,textAnchor:m,foreColor:b(),fontSize:h.style.fontSize,fontFamily:h.style.fontFamily,fontWeight:h.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+h.style.cssClass,maxWidth:h.maxWidth});o.add(y),y.on("click",C=>{if(typeof e.config.chart.events.xAxisLabelClick=="function"){let k=Object.assign({},e,{labelIndex:p});e.config.chart.events.xAxisLabelClick(C,this.ctx,k)}});let v=I.createElementNS(U,"title");if(v.textContent=Array.isArray(f)?f.join(" "):f,y.node.appendChild(v),e.config.yaxis[t].labels.rotate!==0){let C=s.rotateAroundCenter(y.node);y.node.setAttribute("transform",`rotate(${e.config.yaxis[t].labels.rotate} 0 ${C.y})`)}c=c+n}if(e.config.yaxis[0].title.text!==void 0){let p=s.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+i+", 0)"}),f=s.drawText({x:e.config.yaxis[0].title.offsetX,y:e.layout.gridHeight/2+e.config.yaxis[0].title.offsetY,text:e.config.yaxis[0].title.text,textAnchor:"middle",foreColor:e.config.yaxis[0].title.style.color,fontSize:e.config.yaxis[0].title.style.fontSize,fontWeight:e.config.yaxis[0].title.style.fontWeight,fontFamily:e.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+e.config.yaxis[0].title.style.cssClass});p.add(f),a.add(p)}let d=0;this.isCategoryBarHorizontal&&e.config.yaxis[0].opposite&&(d=e.layout.gridWidth);let g=e.config.xaxis.axisBorder;if(g.show){let p=s.drawLine(e.globals.padHorizontal+g.offsetX+d,1+g.offsetY,e.globals.padHorizontal+g.offsetX+d,e.layout.gridHeight+g.offsetY,g.color,0);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(p):a.add(p)}return e.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(d,r.length,e.config.yaxis[0].axisBorder,e.config.yaxis[0].axisTicks,0,n,a),a}drawXaxisTicks(t,e,s){let i=this.w,a=t;if(t<0||t-2>i.layout.gridWidth)return;let o=this.offY+i.config.xaxis.axisTicks.offsetY;if(e=e+o+i.config.xaxis.axisTicks.height,i.config.xaxis.position==="top"&&(e=o-i.config.xaxis.axisTicks.height),i.config.xaxis.axisTicks.show){let n=new F(this.w).drawLine(t+i.config.xaxis.axisTicks.offsetX,o+i.config.xaxis.offsetY,a+i.config.xaxis.axisTicks.offsetX,e+i.config.xaxis.offsetY,i.config.xaxis.axisTicks.color);s.add(n),n.node.classList.add("apexcharts-xaxis-tick")}}getXAxisTicksPositions(){let t=this.w,e=[],s=this.xaxisLabels.length,i=t.globals.padHorizontal;if(t.labelData.timescaleLabels.length>0)for(let a=0;a{a.placeTextWithEllipsis(g,g.textContent,i.layout.xAxisLabelsHeight-(i.config.legend.position==="bottom"?20:10))})}else{let l=i.layout.gridWidth/(i.labelData.labels.length+1);for(let h=0;h{a.placeTextWithEllipsis(g,g.textContent,l)})}}if(n.length>0){let l=n[n.length-1].getBBox(),h=n[0].getBBox();l.x<-20&&((t=n[n.length-1].parentNode)==null||t.removeChild(n[n.length-1])),h.x+h.width>i.layout.gridWidth&&!i.globals.isBarHorizontal&&((e=n[0].parentNode)==null||e.removeChild(n[0]));for(let d=0;d0&&(this.xaxisLabels=t.labelData.timescaleLabels.slice())}drawGridArea(t=null){let e=this.w,s=new F(this.w);t||(t=s.group({class:"apexcharts-grid"}));let 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){let e=this.renderGrid();return this.drawGridArea(e.el),e}return null}createGridMask(){let t=this.w,e=t.globals,s=new F(this.w),i=Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width,a=h=>{let d=I.createElementNS(U,"clipPath");return d.setAttribute("id",h),d};t.dom.elGridRectMask=a(`gridRectMask${e.cuid}`),t.dom.elGridRectBarMask=a(`gridRectBarMask${e.cuid}`),t.dom.elGridRectMarkerMask=a(`gridRectMarkerMask${e.cuid}`),t.dom.elForecastMask=a(`forecastMask${e.cuid}`),t.dom.elNonForecastMask=a(`nonForecastMask${e.cuid}`);let o=["bar","rangeBar","candlestick","boxPlot"].includes(t.config.chart.type)||t.globals.comboBarCount>0,r=0,n=0;o&&t.axisFlags.isXNumeric&&!t.globals.isBarHorizontal&&(r=Math.max(t.config.grid.padding.left,e.barPadForNumericAxis),n=Math.max(t.config.grid.padding.right,e.barPadForNumericAxis)),t.dom.elGridRect=s.drawRect(-i/2-2,-i/2-2,t.layout.gridWidth+i+4,t.layout.gridHeight+i+4,0,"#fff"),t.dom.elGridRectBar=s.drawRect(-i/2-r-2,-i/2-2,t.layout.gridWidth+i+n+r+4,t.layout.gridHeight+i+4,0,"#fff");let c=t.globals.markers.largestSize;t.dom.elGridRectMarker=s.drawRect(Math.min(-i/2-r-2,-c),-c,t.layout.gridWidth+Math.max(i+n+r+4,c*2),t.layout.gridHeight+c*2,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);let l=t.dom.elDefs.node;l.appendChild(t.dom.elGridRectMask),l.appendChild(t.dom.elGridRectBarMask),l.appendChild(t.dom.elGridRectMarkerMask),l.appendChild(t.dom.elForecastMask),l.appendChild(t.dom.elNonForecastMask)}_drawGridLines({i:t,x1:e,y1:s,x2:i,y2:a,xCount:o,parent:r}){let n=this.w;if(!(t===0&&n.globals.skipFirstTimelinelabel||t===o-1&&n.globals.skipLastTimelinelabel&&!n.config.xaxis.labels.formatter||n.config.chart.type==="radar")){n.config.grid.xaxis.lines.show&&this._drawGridLine({i:t,x1:e,y1:s,x2:i,y2:a,xCount:o,parent:r});let l=0;if(n.labelData.hasXaxisGroups&&n.config.xaxis.tickPlacement==="between"){let d=n.labelData.groups;if(d){let g=0;for(let p=0;g{for(let d=0;d{for(let d=0;d0&&i.config.xaxis.type!=="datetime"&&(c=a.yAxisScale[r].result.length-1)),this._drawXYLines({xCount:c,tickAmount:n})):(c=n,n=a.xTickAmount,this._drawInvertedXYLines({xCount:c,tickAmount:n})),this.drawGridBands(c,n),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:i.layout.gridWidth/c}}drawGridBands(t,e){var s,i,a,o,r;let n=this.w,c=(l,h,d,g,p,f)=>{for(let u=0,b=0;u=n.config.grid[l].colors.length&&(b=0),this._drawGridBandRect({c:b,x1:d,y1:g,x2:p,y2:f,type:l}),g+=n.layout.gridHeight/e};if(((s=n.config.grid.row.colors)==null?void 0:s.length)>0&&c("row",e,0,0,n.layout.gridWidth,n.layout.gridHeight/e),((i=n.config.grid.column.colors)==null?void 0:i.length)>0){let l=!n.globals.isBarHorizontal&&n.config.xaxis.tickPlacement==="on"&&(n.config.xaxis.type==="category"||n.config.xaxis.convertedCatToNumeric)?t-1:t;n.axisFlags.isXNumeric&&(l=((o=(a=n.globals.xAxisScale)==null?void 0:a.result.length)!=null?o:1)-1);let h=n.globals.padHorizontal,d=0,g=n.globals.padHorizontal+n.layout.gridWidth/l,p=n.layout.gridHeight;for(let f=0,u=0;f=n.config.grid.column.colors.length&&(u=0),n.config.xaxis.type==="datetime"&&(h=this.xaxisLabels[f].position,g=(((r=this.xaxisLabels[f+1])==null?void 0:r.position)||n.layout.gridWidth)-this.xaxisLabels[f].position),this._drawGridBandRect({c:u,x1:h,y1:d,x2:g,y2:p,type:"column"}),h+=n.layout.gridWidth/l}}},Ut=class{constructor(t){this.w=t,this.coreUtils=new q(this.w)}niceScale(t,e,s=0){let a=this.w,o=a.globals,r,n,c,l;o.isBarHorizontal?(r=a.config.xaxis,n=Math.max((o.svgWidth-100)/25,2)):(r=a.config.yaxis[s],n=Math.max((o.svgHeight-100)/15,2)),M.isNumber(n)||(n=10),c=r.min!==void 0&&r.min!==null,l=r.max!==void 0&&r.min!==null;let h=r.stepSize!==void 0&&r.stepSize!==null,d=r.tickAmount!==void 0&&r.tickAmount!==null,g=d?r.tickAmount:fe[Math.min(Math.round(n/2),fe.length-1)];if(o.isMultipleYAxis&&!d&&o.multiAxisTickAmount>0&&(g=o.multiAxisTickAmount,d=!0),g==="dataPoints"?g=o.dataPoints-1:g=Math.abs(Math.round(g)),(t===Number.MIN_VALUE&&e===0||!M.isNumber(t)&&!M.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=M.isNumber(r.min)?r.min:0,e=M.isNumber(r.max)?r.max:t+g,o.allSeriesCollapsed=!1),t>e){console.warn("axis.min cannot be greater than axis.max: swapping min and max");let T=e;e=t,t=T}else t===e&&(t=t===0?0:t-1,e=e===0?2:e+1);let p=[];g<1&&(g=1);let f=g,u=Math.abs(e-t),b=.15;!c&&t>0&&t/u0&&tn&&(t=e-x*g,t+=x*Math.floor((T-t)/x))}else if(c)if(d)e=t+x*f;else{let T=e;e=x*Math.ceil(e/x),Math.abs(e-t)/M.getGCD(u,x)>n&&(e=t+x*g,e+=x*Math.ceil((T-e)/x))}u=Math.abs(e-t),x=M.getGCD(u,x),f=Math.round(u/x)}if(!d&&!(c||l)&&(f=Math.ceil((u-1e-11)/(x+1e-11)),f>16&&M.getPrimeFactors(f).length<2&&f++),!d&&r.forceNiceScale&&o.yValueDecimal===0&&f>u&&(f=u,x=Math.round(u/f)),f>n&&(!(d||h)||r.forceNiceScale)){let T=M.getPrimeFactors(f),E=T.length-1,R=f;t:for(var C=0;CD);return{result:p,niceMin:p[0],niceMax:p[p.length-1]}}linearScale(t,e,s=10,i=0,a=void 0){let o=Math.abs(e-t),r=[];if(t===e)return r=[t],{result:r,niceMin:r[0],niceMax:r[r.length-1]};s=this._adjustTicksForSmallRange(s,i,o),s==="dataPoints"&&(s=this.w.globals.dataPoints-1);let n=s;a||(a=o/n);let c=2;if(a!==0&&isFinite(a)){let d=Math.floor(Math.log10(Math.abs(a))),g=Math.max(c,-d+c),p=Math.pow(10,g);a=Math.round((a+Number.EPSILON)*p)/p}let l=s===Number.MAX_VALUE?5:n;s===Number.MAX_VALUE&&(a=1);let h=t;for(;l>=0;)r.push(h),h=M.preciseAddition(h,a),l-=1;return{result:r,niceMin:r[0],niceMax:r[r.length-1]}}logarithmicScaleNice(t,e,s){e<=0&&(e=Math.max(t,s)),t<=0&&(t=Math.min(e,s));let i=[],a=Math.ceil(Math.log(e)/Math.log(s)+1),o=Math.floor(Math.log(t)/Math.log(s));for(let r=o;r"u"&&(i.yAxisScale[t]=[]);let r=Math.abs(s-e);o.logarithmic&&r<=5&&(i.invalidLogScale=!0),o.logarithmic&&r>5?(i.allSeriesCollapsed=!1,i.yAxisScale[t]=o.forceNiceScale?this.logarithmicScaleNice(e,s,o.logBase):this.logarithmicScale(e,s,o.logBase)):s===-Number.MAX_VALUE||!M.isNumber(s)||e===Number.MAX_VALUE||!M.isNumber(e)?i.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t):(i.allSeriesCollapsed=!1,i.yAxisScale[t]=this.niceScale(e,s,t))}setXScale(t,e){let s=this.w,i=s.globals;if(e===-Number.MAX_VALUE||!M.isNumber(e))i.xAxisScale=this.linearScale(0,10,10);else{let a=i.xTickAmount;i.xAxisScale=this.linearScale(t,e,a,0,s.config.xaxis.max===void 0?s.config.xaxis.stepSize:void 0)}return i.xAxisScale}scaleMultipleYAxes(){let t=this.w.config,e=this.w.globals;this.coreUtils.setSeriesYAxisMappings();let s=e.seriesYAxisMap,i=e.minYArr,a=e.maxYArr,o=[],r=!e.isBarHorizontal;if(e.allSeriesCollapsed=!0,e.barGroups=[],s.forEach((n,c)=>{let l=[];if(n.forEach(h=>{var d;let g=(d=t.series[h])==null?void 0:d.group;l.indexOf(g)<0&&l.push(g)}),n.length>0){let h=Number.MAX_VALUE,d=-Number.MAX_VALUE,g=h,p=d,f,u;if(t.chart.stacked){let w=new Array(e.dataPoints).fill(0),m=[],y=[],v=[];l.forEach(()=>{m.push(w.map(()=>Number.MIN_VALUE)),y.push(w.map(()=>Number.MIN_VALUE)),v.push(w.map(()=>Number.MIN_VALUE))});for(let C=0;C{if(t.series[k].group===L)for(let T=0;T=0?y[D][T]+=E:v[D][T]+=E,m[D][T]+=E,g=Math.min(g,E),p=Math.max(p,E)}})),(f==="bar"||f==="column")&&e.barGroups.push(u)}f||(f=t.chart.type),f==="bar"||f==="column"?l.forEach((C,k)=>{h=Math.min(h,Math.min.apply(null,v[k])),d=Math.max(d,Math.max.apply(null,y[k]))}):(l.forEach((C,k)=>{g=Math.min(g,Math.min.apply(null,m[k])),p=Math.max(p,Math.max.apply(null,m[k]))}),h=g,d=p),h===Number.MIN_VALUE&&d===Number.MIN_VALUE&&(d=-Number.MAX_VALUE)}else for(let w=0;wy.indexOf(w)===m);let b=t.yaxis[c];r&&b.alignZero===!0&&!b.logarithmic&&b.min===void 0&&b.max===void 0&&e.ignoreYAxisIndexes.indexOf(c)<0&&M.isNumber(h)&&M.isNumber(d)?o.push({ai:c,minY:h,maxY:d}):(this.setYScaleForIndex(c,h,d),n.forEach(w=>{i[w]=e.yAxisScale[c].niceMin,a[w]=e.yAxisScale[c].niceMax}))}else this.setYScaleForIndex(c,0,-Number.MAX_VALUE)}),o.length>=2){o.forEach(l=>{this.setYScaleForIndex(l.ai,l.minY,l.maxY),s[l.ai].forEach(h=>{i[h]=e.yAxisScale[l.ai].niceMin,a[h]=e.yAxisScale[l.ai].niceMax})});let n=0;o.forEach(l=>{let h=e.yAxisScale[l.ai],d=h.niceMax-h.niceMin;if(d>0){let g=-h.niceMin/d;g>n&&(n=g)}}),n>1&&(n=1),n<0&&(n=0);let c=l=>{if(l<=0)return 1;let h=Math.floor(Math.log10(l)),d=Math.pow(10,h),g=l/d,p;return g<=1+1e-9?p=1:g<=2+1e-9?p=2:g<=2.5+1e-9?p=2.5:g<=5+1e-9?p=5:p=10,p*d};o.forEach(l=>{let h=e.yAxisScale[l.ai];if(!h.result||h.result.length<2)return;let d=h.niceMax-h.niceMin;if(d<=0)return;let g=-h.niceMin/d;if(Math.abs(g-n)<=1e-9)return;let p=gn&&n>1e-9;if(!p&&!f)return;let u=p?-n*h.niceMax/(1-n):h.niceMin,b=f?-h.niceMin*(1-n)/n:h.niceMax,x=b-u;if(x<=0)return;let w=Math.max(h.result.length,5),m=c(x/Math.max(w-1,1));if(m<=0)return;let y,v;if(p){y=Math.floor(u/m+1e-9)*m;let C=n>1e-9?y*(n-1)/n:h.niceMax,k=Math.max(C,h.niceMax);v=Math.ceil(k/m-1e-9)*m}else{v=Math.ceil(b/m-1e-9)*m;let C=n<1-1e-9?-n*v/(1-n):h.niceMin,k=Math.min(C,h.niceMin);y=Math.floor(k/m+1e-9)*m}h.result=[];for(let C=y;C<=v+m*1e-9;C=M.preciseAddition(C,m))h.result.push(M.stripNumber(C,7));h.niceMin=y,h.niceMax=v,s[l.ai].forEach(C=>{i[C]=h.niceMin,a[C]=h.niceMax})})}else if(o.length===1){let n=o[0];this.setYScaleForIndex(n.ai,n.minY,n.maxY),s[n.ai].forEach(c=>{i[c]=e.yAxisScale[n.ai].niceMin,a[c]=e.yAxisScale[n.ai].niceMax})}}},It=class{constructor(t){this.w=t,this.scales=new Ut(this.w)}init(){this.setYRange(),this.setXRange(),this.setZRange()}getMinYMaxY(t,e=Number.MAX_VALUE,s=-Number.MAX_VALUE,i=null){var a,o,r,n,c;let l=this.w.config,h=this.w.globals,d=-Number.MAX_VALUE,g=Number.MIN_VALUE;i===null&&(i=t+1);let p=this.w.seriesData.series,f=p,u=p;l.chart.type==="candlestick"?(f=this.w.candleData.seriesCandleL,u=this.w.candleData.seriesCandleH):l.chart.type==="boxPlot"?(f=this.w.candleData.seriesCandleO,u=this.w.candleData.seriesCandleC):this.w.axisFlags.isRangeData&&(f=this.w.rangeData.seriesRangeStart,u=this.w.rangeData.seriesRangeEnd);let b=!1;if(this.w.seriesData.seriesX.length>=i){let x=(a=h.brushSource)==null?void 0:a.w.config.chart.brush;(l.chart.zoom.enabled&&l.chart.zoom.autoScaleYaxis||x?.enabled&&x?.autoScaleYaxis)&&(b=!0)}for(let x=t;xtypeof v<"u").length),this.w.labelData.labels.length&&l.xaxis.type!=="datetime"&&this.w.seriesData.series.reduce((v,C)=>v+C.length,0)!==0&&(h.dataPoints=Math.max(h.dataPoints,this.w.labelData.labels.length));let m=0,y=p[x].length-1;if(b){if(l.xaxis.min)for(;mm&&this.w.seriesData.seriesX[x][y]>l.xaxis.max;y--);}for(let v=m;v<=y&&v{d=Math.max(d,k.value),e=Math.min(e,k.value)}),s=d,C=M.noExponents(C),M.isFloat(C)&&(h.yValueDecimal=Math.max(h.yValueDecimal,C.toString().split(".")[1].length)),g>((n=f[x])==null?void 0:n[v])&&((c=f[x])==null?void 0:c[v])<0&&(g=f[x][v])}else h.hasNullValues=!0}(w==="bar"||w==="column")&&(g<0&&d<0&&(d=0,s=Math.max(s,0)),g===Number.MIN_VALUE&&(g=0,e=Math.min(e,0)))}return l.chart.type==="rangeBar"&&this.w.rangeData.seriesRangeStart.length&&h.isBarHorizontal&&(g=e),l.chart.type==="bar"&&(g<0&&d<0&&(d=0),g===Number.MIN_VALUE&&(g=0)),{minY:g,maxY:d,lowestY:e,highestY:s}}setYRange(){let t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;let s=Number.MAX_VALUE,i;if(t.isMultipleYAxis){s=Number.MAX_VALUE;for(let a=0;a{a.max!==void 0&&(typeof a.max=="number"?t.maxYArr[o]=a.max:typeof a.max=="function"&&(t.maxYArr[o]=a.max(t.isMultipleYAxis?t.maxYArr[o]:t.maxY)),t.maxY=t.maxYArr[o]),a.min!==void 0&&(typeof a.min=="number"?t.minYArr[o]=a.min:typeof a.min=="function"&&(t.minYArr[o]=a.min(t.isMultipleYAxis?t.minYArr[o]===Number.MIN_VALUE?0:t.minYArr[o]:t.minY)),t.minY=t.minYArr[o])}),t.isBarHorizontal&&["min","max"].forEach(o=>{e.xaxis[o]!==void 0&&typeof e.xaxis[o]=="number"&&(o==="min"?t.minY=e.xaxis[o]:t.maxY=e.xaxis[o])}),t.isMultipleYAxis?(this.scales.scaleMultipleYAxes(),t.minY=s):(this.scales.setYScaleForIndex(0,t.minY,t.maxY),t.minY=t.yAxisScale[0].niceMin,t.maxY=t.yAxisScale[0].niceMax,t.minYArr[0]=t.minY,t.maxYArr[0]=t.maxY),t.barGroups=[],t.lineGroups=[],t.areaGroups=[],e.series.forEach(a=>{let o=a;switch(o.type||e.chart.type){case"bar":case"column":t.barGroups.push(o.group);break;case"line":t.lineGroups.push(o.group);break;case"area":t.areaGroups.push(o.group);break}}),t.barGroups=t.barGroups.filter((a,o,r)=>r.indexOf(a)===o),t.lineGroups=t.lineGroups.filter((a,o,r)=>r.indexOf(a)===o),t.areaGroups=t.areaGroups.filter((a,o,r)=>r.indexOf(a)===o),{minY:t.minY,maxY:t.maxY,minYArr:t.minYArr,maxYArr:t.maxYArr,yAxisScale:t.yAxisScale}}setXRange(){let t=this.w.globals,e=this.w.config,s=e.xaxis.type==="numeric"||e.xaxis.type==="datetime"||e.xaxis.type==="category"&&!this.w.axisFlags.noLabelsProvided||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.isXNumeric,i=()=>{for(let a=0;at.dataPoints&&t.dataPoints!==0&&(a=t.dataPoints-1);else if(e.xaxis.tickAmount==="dataPoints"){if(this.w.seriesData.series.length>1&&(a=this.w.seriesData.series[t.maxValsInArrayIndex].length-1),this.w.axisFlags.isXNumeric){let o=Math.round(t.maxX-t.minX);o<30&&(a=o)}}else a=e.xaxis.tickAmount;if(t.xTickAmount=a,e.xaxis.max!==void 0&&typeof e.xaxis.max=="number"&&(t.maxX=e.xaxis.max),e.xaxis.min!==void 0&&typeof e.xaxis.min=="number"&&(t.minX=e.xaxis.min),e.xaxis.range!==void 0&&(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){let o=[];for(let r=t.minX-1;r0&&(t.xAxisScale=this.scales.linearScale(1,this.w.labelData.labels.length,a-1,0,e.xaxis.stepSize),this.w.seriesData.seriesX=this.w.labelData.labels.slice());s&&(this.w.labelData.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&this.w.labelData.labels.length&&(t.xTickAmount=this.w.labelData.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}setZRange(){let t=this.w.globals;if(this.w.axisFlags.isDataXYZ){for(let e=0;e{if(e.length){e.length===1&&e.push(this.w.seriesData.seriesX[t.maxValsInArrayIndex][this.w.seriesData.seriesX[t.maxValsInArrayIndex].length-1]);let s=e.slice();s.sort((i,a)=>i-a),s.forEach((i,a)=>{if(a>0){let o=i-s[a-1];o>0&&(t.minXDiff=Math.min(o,t.minXDiff))}}),(t.dataPoints===1||t.minXDiff===Number.MAX_VALUE)&&(t.minXDiff=.5)}})}_setStackedMinMax(){let t=this.w.globals;if(!this.w.seriesData.series.length)return;let e=this.w.labelData.seriesGroups;e.length||(e=[this.w.seriesData.seriesNames.map(a=>a)]);let s={},i={};e.forEach(a=>{s[a]=[],i[a]=[],this.w.config.series.map((r,n)=>a.indexOf(this.w.seriesData.seriesNames[n])>-1?n:null).filter(r=>r!==null).forEach(r=>{var n,c,l,h;for(let d=0;d"u"&&(s[a][d]=0,i[a][d]=0),(this.w.config.chart.stacked&&!t.comboCharts||this.w.config.chart.stacked&&t.comboCharts&&(!this.w.config.chart.stackOnlyBar||((c=(n=this.w.config.series)==null?void 0:n[r])==null?void 0:c.type)==="bar"||((h=(l=this.w.config.series)==null?void 0:l[r])==null?void 0:h.type)==="column"))&&this.w.seriesData.series[r][d]!==null&&M.isNumber(this.w.seriesData.series[r][d])&&(this.w.seriesData.series[r][d]>0?s[a][d]+=parseFloat(String(this.w.seriesData.series[r][d]))+1e-4:i[a][d]+=parseFloat(String(this.w.seriesData.series[r][d])))})}),Object.entries(s).forEach(([a])=>{s[a].forEach((o,r)=>{t.maxY=Math.max(t.maxY,s[a][r]),t.minY=Math.min(t.minY,i[a][r])})})}};function xe(){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"]}}var Nt=class{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=t.config.chart.type==="bar"&&t.config.plotOptions.bar.horizontal,this.xAxisoffX=t.config.xaxis.position==="bottom"?t.layout.gridHeight:0,this.drawnLabels=[],this.axesUtils=new ct(t,{theme:e,timeScale:s})}drawYaxis(t){let e=this.w,s=new F(this.w),i=e.config.yaxis[t].labels.style,{fontSize:a,fontFamily:o,fontWeight:r}=i,n=s.group({class:"apexcharts-yaxis",rel:t,transform:`translate(${e.globals.translateYAxisX[t]}, 0)`});if(this.axesUtils.isYAxisHidden(t))return n;let c=s.group({class:"apexcharts-yaxis-texts-g"});n.add(c);let l=e.globals.yAxisScale[t].result.length-1,h=e.layout.gridHeight/l,d=e.formatters.yLabelFormatters[t],g=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());if(e.config.yaxis[t].labels.show){let p=e.layout.translateY+e.config.yaxis[t].labels.offsetY;e.globals.isBarHorizontal?p=0:e.config.chart.type==="heatmap"&&(p-=h/2),p+=parseInt(a,10)/3;let f=null;for(let u=l;u>=0;u--){let b=d(g[u],u,e),x=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&e.config.yaxis.length!==0&&(x*=-1);let w=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),m=this.axesUtils.getYAxisForeColor(i.colors,t),y=Array.isArray(m)?m[u]:m,v=Array.from(e.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-label tspan`)).map(k=>k.textContent),C=s.drawText({x,y:p,text:v.includes(b)&&!e.config.yaxis[t].labels.showDuplicates?"":b,textAnchor:w,fontSize:a,fontFamily:o,fontWeight:r,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:y,isPlainText:!1,cssClass:`apexcharts-yaxis-label ${i.cssClass}`});c.add(C),this.addTooltip(C,b),f===null&&(f=C),e.config.yaxis[t].labels.rotate!==0&&this.rotateLabel(s,C,f,e.config.yaxis[t].labels.rotate),p+=h}}return this.addYAxisTitle(s,n,t),this.addAxisBorder(s,n,t,l,h),n}getTextAnchor(t,e){return t==="left"?"start":t==="center"?"middle":t==="right"?"end":e?"start":"end"}addTooltip(t,e){let s=I.createElementNS(U,"title");s.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(s)}rotateLabel(t,e,s,i){let a=t.rotateAroundCenter(s.node),o=t.rotateAroundCenter(e.node);e.node.setAttribute("transform",`rotate(${i} ${a.x} ${o.y})`)}addYAxisTitle(t,e,s){let i=this.w;if(i.config.yaxis[s].title.text!==void 0){let a=t.group({class:"apexcharts-yaxis-title"}),o=i.config.yaxis[s].opposite?i.globals.translateYAxisX[s]:0,r=t.drawText({x:o,y:i.layout.gridHeight/2+i.layout.translateY+i.config.yaxis[s].title.offsetY,text:i.config.yaxis[s].title.text,textAnchor:"end",foreColor:i.config.yaxis[s].title.style.color,fontSize:i.config.yaxis[s].title.style.fontSize,fontWeight:i.config.yaxis[s].title.style.fontWeight,fontFamily:i.config.yaxis[s].title.style.fontFamily,cssClass:`apexcharts-yaxis-title-text ${i.config.yaxis[s].title.style.cssClass}`});a.add(r),e.add(a)}}addAxisBorder(t,e,s,i,a){let o=this.w,r=o.config.yaxis[s].axisBorder,n=31+r.offsetX;if(o.config.yaxis[s].opposite&&(n=-31-r.offsetX),r.show){let c=t.drawLine(n,o.layout.translateY+r.offsetY-2,n,o.layout.gridHeight+o.layout.translateY+r.offsetY+2,r.color,0,r.width);e.add(c)}o.config.yaxis[s].axisTicks.show&&this.axesUtils.drawYAxisTicks(n,i,r,o.config.yaxis[s].axisTicks,s,a,e)}drawYaxisInversed(t){let e=this.w,s=new F(this.w),i=s.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),a=s.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${e.layout.translateXAxisX}, ${e.layout.translateXAxisY})`});i.add(a);let o=e.globals.yAxisScale[t].result.length-1,r=e.layout.gridWidth/o+.1,n=r+e.config.xaxis.labels.offsetX,c=e.formatters.xLabelFormatter,l=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice()),h=e.labelData.timescaleLabels;if(h.length>0&&(this.xaxisLabels=h.slice(),l=h.slice(),o=l.length),e.config.xaxis.labels.show)for(let d=h.length?0:o;h.length?d=0;h.length?d++:d--){let g=c?.(l[d],d,e),p=e.layout.gridWidth+e.globals.padHorizontal-(n-r+e.config.xaxis.labels.offsetX);if(h.length){let u=this.axesUtils.getLabel(l,h,p,d,this.drawnLabels,this.xaxisFontSize);p=u.x,g=u.text,this.drawnLabels.push(u.text),d===0&&e.globals.skipFirstTimelinelabel&&(g=""),d===l.length-1&&e.globals.skipLastTimelinelabel&&(g="")}let f=s.drawText({x:p,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-(e.config.xaxis.position==="top"?e.layout.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:g,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(f),this.addTooltip(f,g),n+=r}return this.inversedYAxisTitleText(i),this.inversedYAxisBorder(i),i}inversedYAxisBorder(t){let e=this.w,s=new F(this.w),i=e.config.xaxis.axisBorder;if(i.show){let a=0;e.config.chart.type==="bar"&&e.axisFlags.isXNumeric&&(a-=15);let o=s.drawLine(e.globals.padHorizontal+a+i.offsetX,this.xAxisoffX,e.layout.gridWidth,this.xAxisoffX,i.color,0,i.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(o):t.add(o)}}inversedYAxisTitleText(t){let e=this.w,s=new F(this.w);if(e.config.xaxis.title.text!==void 0){let 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){let s=this.w,i=new F(this.w),a=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-texts-g`),o=a?a.getBoundingClientRect():{width:0,height:0},r=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-title text`),n=r?r.getBoundingClientRect():{width:0,height:0};if(r){let c=this.xPaddingForYAxisTitle(t,o,n,e);r.setAttribute("x",String(c.xPos-(e?10:0)));let l=i.rotateAroundCenter(r);r.setAttribute("transform",`rotate(${e?s.config.yaxis[t].title.rotate*-1:s.config.yaxis[t].title.rotate} ${l.x} ${l.y})`)}}xPaddingForYAxisTitle(t,e,s,i){let a=this.w,o=0,r=10;return a.config.yaxis[t].title.text===void 0||t<0?{xPos:o,padd:0}:(i?o=e.width+a.config.yaxis[t].title.offsetX+s.width/2+r/2:(o=e.width*-1+a.config.yaxis[t].title.offsetX+r/2+s.width/2,a.globals.isBarHorizontal&&(r=25,o=e.width*-1-a.config.yaxis[t].title.offsetX-r)),{xPos:o,padd:r})}setYAxisXPosition(t,e){let s=this.w,i=0,a=0,o=18,r=1;s.config.yaxis.length>1&&(this.multipleYs=!0),s.config.yaxis.forEach((n,c)=>{let l=s.globals.ignoreYAxisIndexes.includes(c)||!n.show||n.floating||t[c].width===0,h=t[c].width+e[c].width;n.opposite?s.globals.isBarHorizontal?(a=s.layout.gridWidth+s.layout.translateX-1,s.globals.translateYAxisX[c]=a-n.labels.offsetX):(a=s.layout.gridWidth+s.layout.translateX+r,l||(r+=h+20),s.globals.translateYAxisX[c]=a-n.labels.offsetX+20):(i=s.layout.translateX-o,l||(o+=h+20),s.globals.translateYAxisX[c]=i+n.labels.offsetX)})}setYAxisTextAlignments(){let t=this.w;Array.from(t.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((s,i)=>{let a=t.config.yaxis[i];if(a&&!a.floating&&a.labels.align!==void 0){let o=t.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${i}'] .apexcharts-yaxis-texts-g`),r=Array.from(t.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${i}'] .apexcharts-yaxis-label`)),n=o.getBoundingClientRect();r.forEach(c=>{c.setAttribute("text-anchor",a.labels.align)}),a.labels.align==="left"&&!a.opposite?o.setAttribute("transform",`translate(-${n.width}, 0)`):a.labels.align==="center"?o.setAttribute("transform",`translate(${n.width/2*(a.opposite?1:-1)}, 0)`):a.labels.align==="right"&&a.opposite&&o.setAttribute("transform",`translate(${n.width}, 0)`)}})}},be=class{constructor(t,e){this.w=t,this.ctx=e,this.documentEvent=this.documentEvent.bind(this)}addEventListener(t,e){let 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){let s=this.w;if(!Object.prototype.hasOwnProperty.call(s.globals.events,t))return;let i=s.globals.events[t].indexOf(e);i!==-1&&s.globals.events[t].splice(i,1)}fireEvent(t,e){let s=this.w;if(!Object.prototype.hasOwnProperty.call(s.globals.events,t))return;(!e||!e.length)&&(e=[]);let i=s.globals.events[t],a=i.length;for(let o=0;o{s?.addEventListener(i,a=>{let o=a.target.getAttribute("i")===null&&t.interact.capturedSeriesIndex!==-1?t.interact.capturedSeriesIndex:a.target.getAttribute("i"),r=a.target.getAttribute("j")===null&&t.interact.capturedDataPointIndex!==-1?t.interact.capturedDataPointIndex:a.target.getAttribute("j"),n=Object.assign({},t,{seriesIndex:t.globals.axisCharts?o:0,dataPointIndex:r});a.type==="keydown"?t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&(e.ctx.keyboardNavigation&&e.ctx.keyboardNavigation.handleKey(a),typeof t.config.chart.events.keyDown=="function"&&t.config.chart.events.keyDown(a,e,n),e.ctx.events.fireEvent("keydown",[a,e,n])):a.type==="keyup"?t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&(typeof t.config.chart.events.keyUp=="function"&&t.config.chart.events.keyUp(a,e,n),e.ctx.events.fireEvent("keyup",[a,e,n])):a.type==="mousemove"||a.type==="touchmove"?typeof t.config.chart.events.mouseMove=="function"&&t.config.chart.events.mouseMove(a,e,n):a.type==="mouseleave"||a.type==="touchleave"?typeof t.config.chart.events.mouseLeave=="function"&&t.config.chart.events.mouseLeave(a,e,n):(a.type==="mouseup"&&a.which===1||a.type==="touchend")&&(typeof t.config.chart.events.click=="function"&&t.config.chart.events.click(a,e,n),e.ctx.events.fireEvent("click",[a,e,n]))},{capture:!1,passive:!0})}),this.ctx.eventList.forEach(i=>{t.dom.baseEl.addEventListener(i,this.documentEvent,{passive:!0})}),this.ctx.core.setupBrushHandler()}documentEvent(t){let e=this.w,s=t.target.className;if(t.type==="click"){let i=e.dom.baseEl.querySelector(".apexcharts-menu");i&&i.classList.contains("apexcharts-menu-open")&&s!=="apexcharts-menu-icon"&&i.classList.remove("apexcharts-menu-open")}e.interact.clientX=t.type==="touchmove"?t.touches[0].clientX:t.clientX,e.interact.clientY=t.type==="touchmove"?t.touches[0].clientY:t.clientY}},me=class{constructor(t){this.w=t}setCurrentLocaleValues(t){let e=this.w.config.chart.locales,s=N.getApex();s.chart&&s.chart.locales&&s.chart.locales.length>0&&(e=this.w.config.chart.locales.concat(s.chart.locales));let i=e.filter(a=>a.name===t)[0];if(i){let a=M.extend(Ss,i);this.w.globals.locale=a.options}else throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options")}},ye=class{constructor(t,e){this.w=t,this.ctx=e}drawAxis(t,e){let s=this.w.globals,i=this.w.config,a=new St(this.w,this.ctx,e),o=new Nt(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale},e);if(s.axisCharts&&t!=="radar"){let r,n;s.isBarHorizontal?(n=o.drawYaxisInversed(0),r=a.drawXaxisInversed(0),this.w.dom.elGraphical.add(r),this.w.dom.elGraphical.add(n)):(r=a.drawXaxis(),this.w.dom.elGraphical.add(r),i.yaxis.map((c,l)=>{if(s.ignoreYAxisIndexes.indexOf(l)===-1&&(n=o.drawYaxis(l),this.w.dom.Paper.add(n),this.w.config.grid.position==="back")){let h=this.w.dom.Paper.children()[1];h&&(h.remove(),this.w.dom.Paper.add(h))}}))}}},Bt=class{constructor(t){this.w=t}drawXCrosshairs(){let t=this.w,e=new F(this.w),s=new j(this.w),i=t.config.xaxis.crosshairs.fill.gradient,a=t.config.xaxis.crosshairs.dropShadow,o=t.config.xaxis.crosshairs.fill.type,r=i.colorFrom,n=i.colorTo,c=i.opacityFrom,l=i.opacityTo,h=i.stops,d="none",g=a.enabled,p=a.left,f=a.top,u=a.blur,b=a.color,x=a.opacity,w=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){o==="gradient"&&(w=e.drawGradient("vertical",r,n,c,l,null,h,[]));let m=e.drawRect();t.config.xaxis.crosshairs.width===1&&(m=e.drawLine(0,0,0,0));let y=t.layout.gridHeight;(!M.isNumber(y)||y<0)&&(y=0);let v=t.config.xaxis.crosshairs.width;(!M.isNumber(v)||Number(v)<0)&&(v=0),m.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:y,width:v,height:y,fill:w,filter:d,"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}),g&&(m=s.dropShadow(m,{left:p,top:f,blur:u,color:b,opacity:x})),t.dom.elGraphical.add(m)}}drawYCrosshairs(){let t=this.w,e=new F(this.w),s=t.config.yaxis[0].crosshairs,i=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){let o=e.drawLine(-i,0,t.layout.gridWidth+i,0,s.stroke.color,s.stroke.dashArray,s.stroke.width);o.attr({class:"apexcharts-ycrosshairs"}),t.dom.elGraphical.add(o)}let 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 Ds(A,t){if(!M.isObject(A)||!M.isObject(t))return t!==void 0?t:A;let e=B({},A);for(let s of Object.keys(t)){let i=t[s];i!==void 0&&(M.isObject(i)&&M.isObject(A[s])?e[s]=Ds(A[s],i):e[s]=i)}return e}var we=class{constructor(t){this.w=t,this._activeBreakpoint=null}checkResponsiveConfig(t){let e=this.w,s=e.config;if(s.responsive.length===0)return;let i=s.responsive.slice();i.sort((r,n)=>r.breakpoint>n.breakpoint?1:n.breakpoint>r.breakpoint?-1:0).reverse();let a=new Ct({}),o=(r={})=>{var n;let c=i[0].breakpoint,l=N.isBrowser()?window.innerWidth>0?window.innerWidth:screen.width:0;if(l>c){if(this._activeBreakpoint!==null){if(!e.globals.initialConfig)return;let h=M.clone(e.globals.initialConfig);h.series=M.clone(e.config.series);let d=q.extendArrayProps(a,h,e);r=M.extend(d,r),this.overrideResponsiveOptions(r),this._activeBreakpoint=null}}else for(let h=0;hDs(p,g[f]))})}this.overrideResponsiveOptions(r),this._activeBreakpoint=i[h].breakpoint}};if(t){let r=q.extendArrayProps(a,t,e);r=M.extend(e.config,r),r=M.extend(r,t),o(r)}else o({})}overrideResponsiveOptions(t){let e=new Ct(t).init({responsiveOverride:!0});this.w.config=e}},Z=class A{constructor(t,{toggleDataSeries:e=void 0,revertDefaultAxisMinMax:s=void 0,updateSeries:i=void 0}={}){this.w=t,this._toggleDataSeries=e||null,this._revertDefaultAxisMinMax=s||null,this._updateSeries=i||null,this.legendInactiveClass="legend-mouseover-inactive"}clearSeriesCache(){let t=this.w;t.globals.cachedSelectors&&(delete t.globals.cachedSelectors.allSeriesEls,delete t.globals.cachedSelectors.highlightSeriesEls)}getAllSeriesEls(){let 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='${M.escapeString(t)}']`)}isSeriesHidden(t){var e;let i=this.getSeriesByName(t),a=parseInt((e=i.getAttribute("data:realIndex"))!=null?e:"0",10);return{isHidden:i.classList.contains("apexcharts-series-collapsed"),realIndex:a}}addCollapsedClassToSeries(t,e){A.addCollapsedClassToSeries(this.w,t,e)}static addCollapsedClassToSeries(t,e,s){function i(a){for(let o=0;o-1&&(t[s].data=[]);return t}highlightSeries(t){var e;let s=this.w,i=this.getSeriesByName(t),a=parseInt((e=i?.getAttribute("data:realIndex"))!=null?e:"",10),o="highlightSeriesEls",r=s.globals.cachedSelectors[o];r||(r=s.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),s.globals.cachedSelectors[o]=r);let n=null,c=null,l=null;if(s.globals.axisCharts||s.config.chart.type==="radialBar")if(s.globals.axisCharts){n=s.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${a}']`),c=s.dom.baseEl.querySelector(`.apexcharts-datalabels[data\\:realIndex='${a}']`);let h=s.globals.seriesYAxisReverseMap[a];l=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${h}']`)}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 h=0;h{for(let n=0;n{for(let c=0;c=r.from&&(lMath.max(h,d.to),0);o(c,l)}else t.type==="mouseout"&&a("remove")}getActiveConfigSeriesIndex(t="asc",e=[]){let s=this.w,i=0;if(s.config.series.length>1){let a=s.config.series.map((o,r)=>{let n=()=>s.globals.comboCharts?e.length===0||e.length&&e.indexOf(s.config.series[r].type)>-1:!0;return o.data&&o.data.length>0&&s.globals.collapsedSeriesIndices.indexOf(r)===-1&&n()?r:-1});for(let o=t==="asc"?0:a.length-1;t==="asc"?o=0;t==="asc"?o++:o--)if(a[o]!==-1){i=a[o];break}}return i}getBarSeriesIndices(){return this.w.globals.comboCharts?this.w.config.series.map((e,s)=>e.type==="bar"||e.type==="column"?s:-1).filter(e=>e!==-1):this.w.config.series.map((e,s)=>s)}getPreviousPaths(){var t,e,s,i;let a=this.w;if(!a.globals.axisCharts){a.globals.previousPaths=a.seriesData.series;return}a.globals.previousPaths=[];function o(l,h,d){let g=l[h].childNodes,p={type:d,paths:[],realIndex:l[h].getAttribute("data:realIndex")};for(let f=0;fa.dom.baseEl.querySelectorAll(`.apexcharts-${l}-series .apexcharts-series`);["line","area","bar","rangebar","rangeArea","candlestick","radar"].forEach(l=>{let h=r(l);for(let d=0;d0)for(let l=0;lh[g].getAttribute(u),f={x:parseFloat((t=p("x"))!=null?t:"0"),y:parseFloat((e=p("y"))!=null?e:"0"),width:parseFloat((s=p("width"))!=null?s:"0"),height:parseFloat((i=p("height"))!=null?i:"0")};d.push({rect:f,color:h[g].getAttribute("color")})}a.globals.previousPaths.push(d)}}clearPreviousPaths(){let t=this.w;t.globals.previousPaths=[],t.globals.allSeriesCollapsed=!1}handleNoData(){let t=this.w,e=this,s=t.config.noData,i=new F(e.w),a=t.globals.svgWidth/2,o=t.globals.svgHeight/2,r="middle";if(t.globals.noData=!0,t.globals.animationEnded=!0,s.align==="left"?(a=10,r="start"):s.align==="right"&&(a=t.globals.svgWidth-10,r="end"),s.verticalAlign==="top"?o=50:s.verticalAlign==="bottom"&&(o=t.globals.svgHeight-50),a=a+s.offsetX,o=o+parseInt(s.style.fontSize,10)+2+s.offsetY,s.text!==void 0&&s.text!==""){let n=i.drawText({x:a,y:o,text:s.text,textAnchor:r,fontSize:s.style.fontSize,fontFamily:s.style.fontFamily,foreColor:s.style.color,opacity:1,cssClass:"apexcharts-text-nodata"});t.dom.Paper.add(n)}}setNullSeriesToZeroValues(t){let e=this.w;for(let s=0;ss.length>0?s:[])}},ve=class{constructor(t){this.w=t,this.colors=[],this.isColorFn=!1,this.isHeatmapDistributed=this.checkHeatmapDistributed(),this.isBarDistributed=this.checkBarDistributed()}checkHeatmapDistributed(){let{chart:t,plotOptions:e}=this.w.config;return t.type==="treemap"&&e.treemap&&e.treemap.distributed||t.type==="heatmap"&&e.heatmap&&e.heatmap.distributed}checkBarDistributed(){let{chart:t,plotOptions:e}=this.w.config;return e.bar&&e.bar.distributed&&(t.type==="bar"||t.type==="rangeBar")}init(){this.setDefaultColors()}setDefaultColors(){var t;let e=this.w,s=new M;e.dom.elWrap.classList.add(`apexcharts-theme-${e.config.theme.mode||"light"}`);let i=(t=e.config.theme.accessibility)==null?void 0:t.colorBlindMode;if(i){e.globals.colors=this.getColorBlindColors(i),this.applySeriesColors(e.seriesData.seriesColors,e.globals.colors);let r=e.globals.colors.slice();this.pushExtraColors(e.globals.colors),this.applyColorTypes(["fill","stroke"],r),this.applyDataLabelsColors(r),this.applyRadarPolygonsColors(),this.applyMarkersColors(r),i==="highContrast"&&e.dom.elWrap.classList.add("apexcharts-high-contrast");return}let a=[...e.config.colors||e.config.fill.colors||[]];e.globals.colors=this.getColors(a),this.applySeriesColors(e.seriesData.seriesColors,e.globals.colors),e.config.theme.monochrome.enabled&&(e.globals.colors=this.getMonochromeColors(e.config.theme.monochrome,e.seriesData.series,s));let o=e.globals.colors.slice();this.pushExtraColors(e.globals.colors),this.applyColorTypes(["fill","stroke"],o),this.applyDataLabelsColors(o),this.applyRadarPolygonsColors(),this.applyMarkersColors(o)}getColors(t){let e=this.w;return!t||t.length===0?this.predefined():Array.isArray(t)&&t.length>0&&typeof t[0]=="function"?(this.isColorFn=!0,e.config.series.map((s,i)=>{let a=t[i]||t[0];return typeof a=="function"?a({value:e.globals.axisCharts?e.seriesData.series[i][0]||0:e.seriesData.series[i],seriesIndex:i,dataPointIndex:i,w:this.w}):a})):t}applySeriesColors(t,e){t.forEach((s,i)=>{s&&(e[i]=s)})}getMonochromeColors(t,e,s){let{color:i,shadeIntensity:a,shadeTo:o}=t,r=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,n=1/(r/a),c=0;return Array.from({length:r},()=>{let l=o==="dark"?s.shadeColor(c*-1,i):s.shadeColor(c,i);return c+=n,l})}applyColorTypes(t,e){let s=this.w;t.forEach(i=>{s.globals[i].colors=s.config[i].colors===void 0?this.isColorFn?s.config.colors:e:s.config[i].colors.slice(),this.pushExtraColors(s.globals[i].colors)})}applyDataLabelsColors(t){let e=this.w;e.globals.dataLabels.style.colors=e.config.dataLabels.style.colors===void 0?t:e.config.dataLabels.style.colors.slice(),this.pushExtraColors(e.globals.dataLabels.style.colors,50)}applyRadarPolygonsColors(){let t=this.w;t.globals.radarPolygons.fill.colors=t.config.plotOptions.radar.polygons.fill.colors===void 0?[t.config.theme.mode==="dark"?"#343A3F":"none"]:t.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(t.globals.radarPolygons.fill.colors,20)}applyMarkersColors(t){let e=this.w;e.globals.markers.colors=e.config.markers.colors===void 0?t:e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}pushExtraColors(t,e,s=null){let i=this.w,a=e||i.seriesData.series.length;if(s===null&&(s=this.isBarDistributed||this.isHeatmapDistributed||i.config.chart.type==="heatmap"&&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.lengtht.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}getDatalabelsRect(){let t=this.w,e=[];t.config.series.forEach((r,n)=>{r.data.forEach((c,l)=>{let d=(g=>t.config.dataLabels.formatter(g,{seriesIndex:n,dataPointIndex:l,w:t}))(t.seriesData.series[n][l]);e.push(d)})});let s=M.getLargestStringFromArr(e),i=new F(this.w),a=t.config.dataLabels.style,o=i.getTextRects(s,parseInt(a.fontSize).toString(),a.fontFamily);return{width:o.width*1.05,height:o.height}}getLargestStringFromMultiArr(t,e){let s=this.w,i=t;if(s.axisFlags.isMultiLineX){let a=e.map(n=>Array.isArray(n)?n.length:1),o=Math.max(...a),r=a.indexOf(o);i=e[r]}return i}},Ce=class{constructor(t){this.w=t.w,this.dCtx=t}getxAxisLabelsCoords(){let t=this.w,e=t.labelData.labels.slice();t.config.xaxis.convertedCatToNumeric&&e.length===0&&(e=t.labelData.categoryLabels);let s;if(t.labelData.timescaleLabels.length>0){let i=this.getxAxisTimeScaleLabelsCoords();s={width:i.width,height:i.height},t.layout.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends=(t.config.legend.position==="left"||t.config.legend.position==="right")&&!t.config.legend.floating?this.dCtx.lgRect.width:0;let i=t.formatters.xLabelFormatter,a=M.getLargestStringFromArr(e),o=this.dCtx.dimHelpers.getLargestStringFromMultiArr(a,e);t.globals.isBarHorizontal&&(a=t.globals.yAxisScale[0].result.reduce((d,g)=>d.length>g.length?d:g,0),o=a);let r=new vt(this.w),n=a;a=r.xLabelFormat(i,a,n,{i:void 0,dateFormatter:new Q(this.w).formatDate,w:t}),o=r.xLabelFormat(i,o,n,{i:void 0,dateFormatter:new Q(this.w).formatDate,w:t}),(t.config.xaxis.convertedCatToNumeric&&typeof a>"u"||String(a).trim()==="")&&(a="1",o=a);let c=new F(this.w),l=c.getTextRects(a,t.config.xaxis.labels.style.fontSize),h=l;if(a!==o&&(h=c.getTextRects(o,t.config.xaxis.labels.style.fontSize)),s={width:l.width>=h.width?l.width:h.width,height:l.height>=h.height?l.height:h.height},s.width*e.length>t.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&t.config.xaxis.labels.rotate!==0||t.config.xaxis.labels.rotateAlways){if(!t.globals.isBarHorizontal){t.layout.rotateXLabels=!0;let d=g=>c.getTextRects(g,t.config.xaxis.labels.style.fontSize,t.config.xaxis.labels.style.fontFamily,`rotate(${t.config.xaxis.labels.rotate} 0 0)`,!1);l=d(a),a!==o&&(h=d(o)),s.height=(l.height>h.height?l.height:h.height)/1.5,s.width=l.width>h.width?l.width:h.width}}else t.layout.rotateXLabels=!1}return t.config.xaxis.labels.show||(s={width:0,height:0}),{width:s.width,height:s.height}}getxAxisGroupLabelsCoords(){var t;let e=this.w;if(!e.labelData.hasXaxisGroups)return{width:0,height:0};let s=((t=e.config.xaxis.group.style)==null?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,i=e.labelData.groups.map(h=>h.title),a,o=M.getLargestStringFromArr(i),r=this.dCtx.dimHelpers.getLargestStringFromMultiArr(o,i),n=new F(this.w),c=n.getTextRects(o,s),l=c;return o!==r&&(l=n.getTextRects(r,s)),a={width:c.width>=l.width?c.width:l.width,height:c.height>=l.height?c.height:l.height},e.config.xaxis.labels.show||(a={width:0,height:0}),{width:a.width,height:a.height}}getxAxisTitleCoords(){let t=this.w,e=0,s=0;if(t.config.xaxis.title.text!==void 0){let a=new F(this.w).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=a.width,s=a.height}return{width:e,height:s}}getxAxisTimeScaleLabelsCoords(){let t=this.w;this.dCtx.timescaleLabels=t.labelData.timescaleLabels.slice();let e=this.dCtx.timescaleLabels.map(r=>r.value),s=e.reduce((r,n)=>typeof r>"u"?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):r.length>n.length?r:n,0),a=new F(this.w).getTextRects(s,t.config.xaxis.labels.style.fontSize);return a.width*1.05*e.length>t.layout.gridWidth&&t.config.xaxis.labels.rotate!==0&&(t.globals.overlappingXLabels=!0),a}additionalPaddingXLabels(t){let e=this.w,s=e.globals,i=e.config,a=i.xaxis.type,o=t.width;s.skipLastTimelinelabel=!1,s.skipFirstTimelinelabel=!1;let r=e.config.yaxis[0].opposite&&e.globals.isBarHorizontal,n=h=>s.collapsedSeriesIndices.indexOf(h)!==-1,c=h=>{if(this.dCtx.timescaleLabels&&this.dCtx.timescaleLabels.length){let d=this.dCtx.timescaleLabels[0],p=this.dCtx.timescaleLabels[this.dCtx.timescaleLabels.length-1].position+o/1.75-this.dCtx.yAxisWidthRight,f=d.position-o/1.75+this.dCtx.yAxisWidthLeft,u=e.config.legend.position==="right"&&this.dCtx.lgRect.width>0?this.dCtx.lgRect.width:0;p>s.svgWidth-e.layout.translateX-u&&(s.skipLastTimelinelabel=!0),f<-((!h.show||h.floating)&&(i.chart.type==="bar"||i.chart.type==="candlestick"||i.chart.type==="rangeBar"||i.chart.type==="boxPlot")?o/1.75:10)&&(s.skipFirstTimelinelabel=!0)}else a==="datetime"?this.dCtx.gridPad.right{i.yaxis.length>1&&n(d)||c(h)};i.yaxis.forEach((h,d)=>{r?(this.dCtx.gridPad.left{let c={seriesIndex:n,dataPointIndex:-1,w:t},l=t.globals.yAxisScale[n],h=0;if(!o.isYAxisHidden(n)&&r.labels.show&&r.labels.minWidth!==void 0&&(h=r.labels.minWidth),!o.isYAxisHidden(n)&&r.labels.show&&l.result.length){let d=t.formatters.yLabelFormatters[n],g=l.niceMin===Number.MIN_VALUE?0:l.niceMin,p=l.result.reduce((m,y)=>{var v,C;return((v=String(d(m,c)))==null?void 0:v.length)>((C=String(d(y,c)))==null?void 0:C.length)?m:y},g);p=d(p,c);let f=p;if((typeof p>"u"||p.length===0)&&(p=l.niceMax),String(p).length===1&&(p=p+".0",f=p),t.globals.isBarHorizontal){a=0;let m=t.labelData.labels.slice();p=M.getLargestStringFromArr(m),p=d(p,{seriesIndex:n,dataPointIndex:-1,w:t}),f=this.dCtx.dimHelpers.getLargestStringFromMultiArr(p,m)}let u=new F(this.w),b="rotate(".concat(r.labels.rotate," 0 0)"),x=u.getTextRects(p,r.labels.style.fontSize,r.labels.style.fontFamily,b,!1),w=x;p!==f&&(w=u.getTextRects(f,r.labels.style.fontSize,r.labels.style.fontFamily,b,!1)),i.push({width:(h>w.width||h>x.width?h:w.width>x.width?w.width:x.width)+a,height:w.height>x.height?w.height:x.height})}else i.push({width:e,height:s})}),i}getyAxisTitleCoords(){let t=this.w,e=[];return t.config.yaxis.map(s=>{if(s.show&&s.title.text!==void 0){let i=new F(this.w),a="rotate(".concat(s.title.rotate," 0 0)"),o=i.getTextRects(s.title.text,s.title.style.fontSize,s.title.style.fontFamily,a,!1);e.push({width:o.width,height:o.height})}else e.push({width:0,height:0})}),e}getTotalYAxisWidth(){let t=this.w,e=0,s=0,i=0,a=t.globals.yAxisScale.length>1?10:0,o=new ct(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale}),r=function(c){return t.globals.ignoreYAxisIndexes.indexOf(c)>-1},n=(c,l)=>{let h=t.config.yaxis[l].floating,d=0;c.width>0&&!h?(d=c.width+a,r(l)&&(d=d-c.width-a)):d=h||o.isYAxisHidden(l)?0:5,t.config.yaxis[l].opposite?i=i+d:s=s+d,e=e+d};return t.layout.yLabelsCoords.map((c,l)=>{n(c,l)}),t.layout.yTitleCoords.map((c,l)=>{n(c,l)}),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.layout.yLabelsCoords[0].width+t.layout.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=s,this.dCtx.yAxisWidthRight=i,e}},ke=class{constructor(t){this.w=t.w,this.dCtx=t}gridPadForColumnsInNumericAxis(t){let{w:e}=this,{config:s,globals:i}=e;if(i.noData||i.collapsedSeries.length+i.ancillaryCollapsedSeries.length===s.series.length)return 0;let a=h=>["bar","rangeBar","candlestick","boxPlot"].includes(h),o=s.chart.type,r=0,n=a(o)?s.series.length:1;i.comboBarCount>0&&(n=i.comboBarCount),i.collapsedSeries.forEach(h=>{a(h.type)&&(n-=1)}),s.chart.stacked&&(n=1);let c=a(o)||i.comboBarCount>0,l=Math.abs(i.initialMaxX-i.initialMinX);if(c&&e.axisFlags.isXNumeric&&!i.isBarHorizontal&&n>0&&l!==0){l<=3&&(l=i.dataPoints);let h=l/t,d=i.minXDiff&&i.minXDiff/h>0?i.minXDiff/h:0;d>t/2&&(d/=2),r=d*parseInt(s.plotOptions.bar.columnWidth,10)/100,r<1&&(r=1),i.barPadForNumericAxis=r}return r}gridPadFortitleSubtitle(){let{w:t}=this,{globals:e}=t,s=this.dCtx.isSparkline||!e.axisCharts?0:10;["title","subtitle"].forEach(r=>{t.config[r].text!==void 0?s+=t.config[r].margin:s+=this.dCtx.isSparkline||!e.axisCharts?0:5}),t.config.legend.show&&t.config.legend.position==="bottom"&&!t.config.legend.floating&&!e.axisCharts&&(s+=10);let a=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),o=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");t.layout.gridHeight-=a.height+o.height+s,t.layout.translateY+=a.height+o.height+s}setGridXPosForDualYAxis(t,e){let{w:s}=this,i=new ct(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});s.config.yaxis.forEach((a,o)=>{s.globals.ignoreYAxisIndexes.indexOf(o)===-1&&!a.floating&&!i.isYAxisHidden(o)&&(a.opposite&&(s.layout.translateX-=e[o].width+t[o].width+parseInt(a.labels.style.fontSize,10)/1.2+12),s.layout.translateX<2&&(s.layout.translateX=2))})}},Dt=class{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 Hs(this),this.dimYAxis=new Se(this),this.dimXAxis=new Ce(this),this.dimGrid=new ke(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0,this.datalabelsCoords={width:0,height:0},this.xAxisWidth=0,this.timescaleLabels=[]}plotCoords(){let t=this.w,e=t.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};let s=Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width;this.isSparkline&&((t.config.markers.discrete.length>0||t.config.markers.size>0)&&Object.entries(this.gridPad).forEach(([a,o])=>{this.gridPad[a]=Math.max(o,this.w.globals.markers.largestSize/1.5)}),this.gridPad.top=Math.max(s/2,this.gridPad.top),this.gridPad.bottom=Math.max(s/2,this.gridPad.bottom)),e.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),t.layout.gridHeight=t.layout.gridHeight-this.gridPad.top-this.gridPad.bottom,t.layout.gridWidth=t.layout.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;let i=this.dimGrid.gridPadForColumnsInNumericAxis(t.layout.gridWidth);return t.layout.gridWidth=t.layout.gridWidth-i*2,t.layout.translateX=t.layout.translateX+this.gridPad.left+this.xPadLeft+(i>0?i:0),t.layout.translateY=t.layout.translateY+this.gridPad.top,{layout:{gridHeight:t.layout.gridHeight,gridWidth:t.layout.gridWidth,translateX:t.layout.translateX,translateY:t.layout.translateY,translateXAxisX:t.layout.translateXAxisX,translateXAxisY:t.layout.translateXAxisY,rotateXLabels:t.layout.rotateXLabels,xAxisHeight:t.layout.xAxisHeight,xAxisLabelsHeight:t.layout.xAxisLabelsHeight,xAxisGroupLabelsHeight:t.layout.xAxisGroupLabelsHeight,xAxisLabelsWidth:t.layout.xAxisLabelsWidth,yLabelsCoords:t.layout.yLabelsCoords,yTitleCoords:t.layout.yTitleCoords}}}setDimensionsForAxisCharts(){let 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((g,p)=>{t.layout.yLabelsCoords.push({width:s[p].width,index:p}),t.layout.yTitleCoords.push({width:i[p].width,index:p})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();let a=this.dimXAxis.getxAxisLabelsCoords(),o=this.dimXAxis.getxAxisGroupLabelsCoords(),r=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(a,r,o),t.layout.translateXAxisY=t.layout.rotateXLabels?this.xAxisHeight/8:-4,t.layout.translateXAxisX=t.layout.rotateXLabels&&t.axisFlags.isXNumeric&&t.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,t.globals.isBarHorizontal&&(t.layout.rotateXLabels=!1,t.layout.translateXAxisY=-1*(parseInt(t.config.xaxis.labels.style.fontSize,10)/1.5)),t.layout.translateXAxisY=t.layout.translateXAxisY+t.config.xaxis.labels.offsetY,t.layout.translateXAxisX=t.layout.translateXAxisX+t.config.xaxis.labels.offsetX;let n=this.yAxisWidth,c=this.xAxisHeight;t.layout.xAxisLabelsHeight=this.xAxisHeight-r.height,t.layout.xAxisGroupLabelsHeight=t.layout.xAxisLabelsHeight-a.height,t.layout.xAxisLabelsWidth=this.xAxisWidth,t.layout.xAxisHeight=this.xAxisHeight;let l=10;(t.config.chart.type==="radar"||this.isSparkline)&&(n=0,c=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||t.config.chart.type==="treemap")&&(n=0,c=0,l=0),!this.isSparkline&&t.config.chart.type!=="treemap"&&this.dimXAxis.additionalPaddingXLabels(a);let h=()=>{t.layout.translateX=n+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-this.lgRect.height-c-(!this.isSparkline&&t.config.chart.type!=="treemap"?t.layout.rotateXLabels?10:15:0),t.layout.gridWidth=e.svgWidth-n-this.datalabelsCoords.width*2};switch(t.config.xaxis.position==="top"&&(l=t.layout.xAxisHeight-t.config.xaxis.axisTicks.height-5),t.config.legend.position){case"bottom":t.layout.translateY=l,h();break;case"top":t.layout.translateY=this.lgRect.height+l,h();break;case"left":t.layout.translateY=l,t.layout.translateX=this.lgRect.width+n+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-c-12,t.layout.gridWidth=e.svgWidth-this.lgRect.width-n-this.datalabelsCoords.width*2;break;case"right":t.layout.translateY=l,t.layout.translateX=n+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-c-12,t.layout.gridWidth=e.svgWidth-this.lgRect.width-n-this.datalabelsCoords.width*2-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(i,s),new Nt(this.w,{theme:this.theme,timeScale:this.timeScale}).setYAxisXPosition(s,i)}setDimensionsForNonAxisCharts(){let t=this.w,e=t.globals,s=t.config,i=0;t.config.legend.show&&!t.config.legend.floating&&(i=20);let a=s.chart.type==="pie"||s.chart.type==="polarArea"||s.chart.type==="donut"?"pie":"radialBar",o=s.plotOptions[a].offsetY,r=s.plotOptions[a].offsetX;if(!s.legend.show||s.legend.floating){t.layout.gridHeight=e.svgHeight;let n=t.dom.elWrap.getBoundingClientRect().width;t.layout.gridWidth=Math.min(n,t.layout.gridHeight),t.layout.translateY=o,t.layout.translateX=r+(e.svgWidth-t.layout.gridWidth)/2;return}switch(s.legend.position){case"bottom":t.layout.gridHeight=e.svgHeight-this.lgRect.height,t.layout.gridWidth=e.svgWidth,t.layout.translateY=o-10,t.layout.translateX=r+(e.svgWidth-t.layout.gridWidth)/2;break;case"top":t.layout.gridHeight=e.svgHeight-this.lgRect.height,t.layout.gridWidth=e.svgWidth,t.layout.translateY=this.lgRect.height+o+10,t.layout.translateX=r+(e.svgWidth-t.layout.gridWidth)/2;break;case"left":t.layout.gridWidth=e.svgWidth-this.lgRect.width-i,t.layout.gridHeight=s.chart.height!=="auto"?e.svgHeight:t.layout.gridWidth,t.layout.translateY=o,t.layout.translateX=r+this.lgRect.width+i;break;case"right":t.layout.gridWidth=e.svgWidth-this.lgRect.width-i-5,t.layout.gridHeight=s.chart.height!=="auto"?e.svgHeight:t.layout.gridWidth,t.layout.translateY=o,t.layout.translateX=r+10;break;default:throw new Error("Legend position not supported")}}conditionalChecksForAxisCoords(t,e,s){let i=this.w,a=i.labelData.hasXaxisGroups?2:1,o=s.height+t.height+e.height,r=i.axisFlags.isMultiLineX?1.2:ks,n=i.layout.rotateXLabels?22:10,l=i.layout.rotateXLabels&&i.config.legend.position==="bottom"?10:0;this.xAxisHeight=o*r+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{h+=g.labels.minWidth,d+=g.labels.maxWidth}),this.yAxisWidthd&&(this.yAxisWidth=d)}},Rt=1e3,Ft=60*Rt,Xt=60*Ft,Mt=24*Xt,ds=7*Mt,le=30*Mt,yt=365*Mt,Ws=10/(1440*60),ce=[{unit:"second",step:1,approxMs:Rt},{unit:"second",step:5,approxMs:5*Rt},{unit:"second",step:15,approxMs:15*Rt},{unit:"second",step:30,approxMs:30*Rt},{unit:"minute",step:1,approxMs:Ft},{unit:"minute",step:5,approxMs:5*Ft},{unit:"minute",step:15,approxMs:15*Ft},{unit:"minute",step:30,approxMs:30*Ft},{unit:"hour",step:1,approxMs:Xt},{unit:"hour",step:3,approxMs:3*Xt},{unit:"hour",step:6,approxMs:6*Xt},{unit:"hour",step:12,approxMs:12*Xt},{unit:"day",step:1,approxMs:Mt},{unit:"day",step:2,approxMs:2*Mt},{unit:"week",step:1,approxMs:ds},{unit:"week",step:2,approxMs:2*ds},{unit:"month",step:1,approxMs:le},{unit:"month",step:3,approxMs:3*le},{unit:"month",step:6,approxMs:6*le},{unit:"year",step:1,approxMs:yt},{unit:"year",step:2,approxMs:2*yt},{unit:"year",step:5,approxMs:5*yt},{unit:"year",step:10,approxMs:10*yt},{unit:"year",step:25,approxMs:25*yt},{unit:"year",step:50,approxMs:50*yt},{unit:"year",step:100,approxMs:100*yt}],Ms=10,Le=class{constructor(t,e){this.w=t,this.ctx=e,this.tickInterval=null,this.timeScaleArray=[],this.utc=t.config.xaxis.labels.datetimeUTC}calculateTimeScaleTicks(t,e){let s=this.w;if(s.globals.allSeriesCollapsed)return s.labelData.labels=[],s.labelData.timescaleLabels=[],this.timeScaleArray=[],[];let i=e-t,a=i/Mt;s.interact.disableZoomIn=!1,s.interact.disableZoomOut=!1,a5e4&&(s.interact.disableZoomOut=!0);let o=Number.isFinite(s.config.xaxis.tickAmount)?s.config.xaxis.tickAmount:Ms;this.tickInterval=$s(i,o);let r=this.generateBaseTicks(t,e,this.tickInterval);return this.timeScaleArray=r,r}generateBaseTicks(t,e,s){let i=this.w,a=new Q(i),o=this.utc,r=i.layout.gridWidth,n=e-t,c=[],l=a.ceilToBoundary(t,s.unit,s.step,o),h=0,d=5e3;for(;l<=e&&h0?(l-t)/n*r:0;c.push({timestamp:l,position:p,unit:s.unit,year:g.year,month:g.month+1,day:g.date,hour:g.hour,minute:g.minute,second:g.second,value:l}),l=a.addInterval(l,s.unit,s.step,o),h++}return c}recalcDimensionsBasedOnFormat(t){let e=this.w,s=this.formatDates(t),i=this.removeOverlappingTS(s);e.labelData.timescaleLabels=i.slice();let o=new Dt(this.w,this.ctx).plotCoords();this.ctx._writeLayoutCoords(o.layout)}formatDates(t){let e=this.w,s=new Q(e),i=e.config.xaxis.labels.format,a=e.config.xaxis.labels.datetimeFormatter,o=this.utc,r=(c,l=2)=>String(c).padStart(l,"0"),n=i||this._effectiveFormat(t,a);return t.map(c=>{let l=s.getDate(c.timestamp),h=s.formatDate(l,n);return{dateString:`${c.year}-${r(c.month)}-${r(c.day)}T${r(c.hour)}:${r(c.minute)}:${r(c.second)}.000${o?"Z":""}`,position:c.position,value:h,unit:c.unit,year:c.year,month:c.month}})}_effectiveFormat(t,e){if(t.length===0)return e.day||"dd MMM";let s=this.tickInterval&&this.tickInterval.unit||t[0].unit,i=e[s==="week"?"day":s]||e.day||"dd MMM",a=t[0],o=t[t.length-1],r=a.year!==o.year,c=r||a.month!==o.month||a.day!==o.day,l=/y/i.test(i),h=/M/.test(i),d=/d/i.test(i);return s==="month"||s==="week"||s==="day"?r&&!l?i+" yyyy":i:(s==="hour"||s==="minute"||s==="second")&&c&&!d&&!h?(r?"dd MMM yyyy":"dd MMM")+" "+i:i}removeOverlappingTS(t){if(t.length===0)return[];let e=this.w,s=new F(e),i=!1,a;t[0].value&&t.every(n=>n.value.length===t[0].value.length)&&(i=!0,a=s.getTextRects(t[0].value,e.config.xaxis.labels.style.fontSize).width);let o=0;return t.map((n,c)=>{if(c===0||!e.config.xaxis.labels.hideOverlappingLabels)return n;let l=i?a:s.getTextRects(t[o].value,e.config.xaxis.labels.style.fontSize).width,h=t[o].position;return n.position>h+l+10?(o=c,n):null}).filter(n=>n!==null)}};function $s(A,t){if((!Number.isFinite(t)||t<=0)&&(t=Ms),A<=0)return ce[0];let e=A/t,s=ce[0],i=1/0;for(let a of ce){let o=Math.abs(Math.log(a.approxMs/e));o{var m,y;let v=((m=t[w])==null?void 0:m.type)==="column"?"bar":((y=t[w])==null?void 0:y.type)||(n==="column"?"bar":n),C=r;C[v]?(v==="rangeArea"?(C[v].series.push(this.w.rangeData.seriesRangeStart[w]),C[v].seriesRangeEnd.push(this.w.rangeData.seriesRangeEnd[w])):C[v].series.push(x),C[v].i.push(w),v==="bar"&&(s.globals.columnSeries=r.bar)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(v)?c=v:console.warn(`You have specified an unrecognized series type (${v}).`),n!==v&&v!=="scatter"&&l++}),l>0&&(c&&console.warn(`Chart or series type ${c} cannot appear with other chart or series types.`),r.bar.series.length>0&&a.plotOptions.bar.horizontal&&(l-=r.bar.series.length,r.bar={series:[],i:[]},s.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),o.comboCharts||(o.comboCharts=l>0);let d=r.line.series.length>0||r.area.series.length>0||r.scatter.series.length>0||r.bubble.series.length>0||r.rangeArea.series.length>0||!o.comboCharts&&["line","area","scatter","bubble","rangeArea"].includes(a.chart.type)?new(et("line"))(i.w,i,e):null,p=r.candlestick.series.length>0||r.boxPlot.series.length>0||!o.comboCharts&&["candlestick","boxPlot"].includes(a.chart.type)?new(et("candlestick"))(i.w,i,e):null,f=!o.comboCharts&&["pie","donut","polarArea"].includes(a.chart.type);i.pie=f?new(et("pie"))(i.w,i):null;let u=r.rangeBar.series.length>0||!o.comboCharts&&a.chart.type==="rangeBar";i.rangeBar=u?new(et("rangeBar"))(i.w,i,e):null;let b=[];if(o.comboCharts){let x=new q(this.w);if(r.area.series.length>0&&b.push(...x.drawSeriesByGroup(r.area,o.areaGroups,"area",d)),r.bar.series.length>0)if(a.chart.stacked){let w=new(et("barStacked"))(i.w,i,e);b.push(w.draw(r.bar.series,r.bar.i))}else i.bar=new(et("bar"))(i.w,i,e),b.push(i.bar.draw(r.bar.series,r.bar.i));if(r.rangeArea.series.length>0&&b.push(d.draw(r.rangeArea.series,"rangeArea",r.rangeArea.i,r.rangeArea.seriesRangeEnd)),r.line.series.length>0&&b.push(...x.drawSeriesByGroup(r.line,o.lineGroups,"line",d)),r.candlestick.series.length>0&&b.push(p.draw(r.candlestick.series,"candlestick",r.candlestick.i)),r.boxPlot.series.length>0&&b.push(p.draw(r.boxPlot.series,"boxPlot",r.boxPlot.i)),r.rangeBar.series.length>0&&b.push(i.rangeBar.draw(r.rangeBar.series,r.rangeBar.i)),r.scatter.series.length>0){let w=new(et("line"))(i.w,i,e,!0);b.push(w.draw(r.scatter.series,"scatter",r.scatter.i))}if(r.bubble.series.length>0){let w=new(et("line"))(i.w,i,e,!0);b.push(w.draw(r.bubble.series,"bubble",r.bubble.i))}}else{let x=a.chart.type;switch(x){case"line":b=d.draw(this.w.seriesData.series,"line");break;case"area":b=d.draw(this.w.seriesData.series,"area");break;case"bar":a.chart.stacked?b=new(et("barStacked"))(i.w,i,e).draw(this.w.seriesData.series):(i.bar=new(et("bar"))(i.w,i,e),b=i.bar.draw(this.w.seriesData.series));break;case"candlestick":b=p.draw(this.w.seriesData.series,"candlestick");break;case"boxPlot":b=p.draw(this.w.seriesData.series,x);break;case"rangeBar":b=i.rangeBar.draw(this.w.seriesData.series);break;case"rangeArea":b=d.draw(this.w.rangeData.seriesRangeStart,"rangeArea",void 0,this.w.rangeData.seriesRangeEnd);break;case"heatmap":{b=new(et("heatmap"))(i.w,i,e).draw(this.w.seriesData.series);break}case"treemap":{b=new(et("treemap"))(i.w,i).draw(this.w.seriesData.series);break}case"pie":case"donut":case"polarArea":b=i.pie.draw(this.w.seriesData.series);break;case"radialBar":{b=new(et("radialBar"))(i.w,i).draw(this.w.seriesData.series);break}case"radar":{b=new(et("radar"))(i.w,i).draw(this.w.seriesData.series);break}default:b=d.draw(this.w.seriesData.series)}}return b}setSVGDimensions(){var t;let{globals:e,config:s}=this.w;s.chart.width=s.chart.width||"100%",s.chart.height=s.chart.height||"auto";let i=s.chart.width,a=s.chart.height;e.svgWidth=NaN,e.svgHeight=NaN;let o=M.getDimensions(this.el),r=i.toString().split(/[0-9]+/g).pop();r==="%"?M.isNumber(o[0])&&(o[0].width===0&&(o=M.getDimensions(this.el.parentNode)),e.svgWidth=o[0]*parseInt(i,10)/100):(r==="px"||r==="")&&(e.svgWidth=parseInt(i,10));let n=String(a).toString().split(/[0-9]+/g).pop();if(a!=="auto"&&a!=="")if(n==="%"){let c=M.getDimensions(this.el.parentNode);e.svgHeight=c[1]*parseInt(a,10)/100}else e.svgHeight=parseInt(a,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;if(e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),F.setAttrs(this.w.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),n!=="%"&&N.isBrowser()){let c=s.chart.sparkline.enabled?0:e.axisCharts?s.chart.parentHeightOffset:0,l=this.w.dom.Paper.node;(t=l.parentNode)!=null&&t.parentNode&&(l.parentNode.parentNode.style.minHeight=`${e.svgHeight+c}px`)}this.w.dom.elWrap.style.width=`${e.svgWidth}px`,this.w.dom.elWrap.style.height=`${e.svgHeight}px`}shiftGraphPosition(){let{globals:t}=this.w,{translateY:e,translateX:s}=t;F.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${s}, ${e})`})}resizeNonAxisCharts(){var t,e,s,i,a,o;let{w:r}=this,n=0,c=r.config.chart.sparkline.enabled?1:15;c+=r.config.grid.padding.bottom,["top","bottom"].includes(r.config.legend.position)&&r.config.legend.show&&!r.config.legend.floating&&(n=((e=(t=this.ctx.legend)==null?void 0:t.legendHelpers.getLegendDimensions().clwh)!=null?e:0)+7);let l=r.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),h=r.globals.radialSize*2.05,d=Math.abs(r.config.plotOptions.radialBar.endAngle-r.config.plotOptions.radialBar.startAngle);if(l&&!r.config.chart.sparkline.enabled&&d<360){let p=M.getBoundingClientRect(this.w.dom.Paper.node),f=1/0,u=-1/0,b=k=>{var S,L,D,T;if((S=k.classList)!=null&&S.contains("apexcharts-radialbar-hollow"))return;let E=(D=(L=k.tagName)==null?void 0:L.toLowerCase)==null?void 0:D.call(L);if(E==="text"||E==="tspan")return;let R=Array.from((T=k.children)!=null?T:[]);if(R.length>0){R.forEach(X=>b(X));return}let P=M.getBoundingClientRect(k);if(P.bottom-P.top>0){let X=P.top-p.top,z=P.bottom-p.top;Xu&&(u=z)}};Array.from((s=l.children)!=null?s:[]).forEach(k=>b(k)),Number.isFinite(f)||(f=0),Number.isFinite(u)||(u=M.getBoundingClientRect(l).bottom-p.top);let x=Math.max(c,r.globals.radialSize*.2),w=Math.max(x-f,0);w!==0&&(r.layout.translateY=((i=r.layout.translateY)!=null?i:0)+w,F.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${(a=r.layout.translateX)!=null?a:0}, ${r.layout.translateY})`}),u+=w),h=u>0?u:r.globals.radialSize*2.05;let m=Math.max(x,f),y=Math.ceil(h+n+m),v=(o=r.config.chart.offsetY)!=null?o:0,C=y+Math.max(v,0);this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(C)),r.config.chart.height&&String(r.config.chart.height).includes("%")||(this.w.dom.elWrap.style.height=`${C}px`,F.setAttrs(this.w.dom.Paper.node,{height:y}),N.isBrowser()&&(this.w.dom.Paper.node.parentNode.parentNode.style.minHeight=`${C}px`));return}let g=Math.ceil(h+this.w.layout.translateY+n+c);this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(g)),!(r.config.chart.height&&String(r.config.chart.height).includes("%"))&&(this.w.dom.elWrap.style.height=`${g}px`,F.setAttrs(this.w.dom.Paper.node,{height:g}),N.isBrowser()&&(this.w.dom.Paper.node.parentNode.parentNode.style.minHeight=`${g}px`))}coreCalculations(){new It(this.w).init()}resetGlobals(){let t=()=>this.w.config.series.map(()=>[]),e=new $t,{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):!1}xySettings(){let{w:t}=this,e=null;if(t.globals.axisCharts){if(t.config.xaxis.crosshairs.position==="back"&&new Bt(this.w).drawXCrosshairs(),t.config.yaxis[0].crosshairs.position==="back"&&new Bt(this.w).drawYCrosshairs(),t.config.xaxis.type==="datetime"&&t.config.xaxis.labels.formatter===void 0){this.ctx.timeScale=new Le(this.w,this.ctx);let i=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}e=new q(this.w).getCalculatedRatios()}return e}updateSourceChart(t){this.ctx.w.interact.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}setupBrushHandler(){let{ctx:t,w:e}=this;if(e.config.chart.brush.enabled&&typeof e.config.chart.events.selection!="function"){let s=Array.isArray(e.config.chart.brush.targets)?e.config.chart.brush.targets:[e.config.chart.brush.target];s.forEach(i=>{let a=t.constructor.getChartByID(i);a.w.globals.brushSource=this.ctx,typeof a.w.config.chart.events.zoomed!="function"&&(a.w.config.chart.events.zoomed=()=>this.updateSourceChart(a)),typeof a.w.config.chart.events.scrolled!="function"&&(a.w.config.chart.events.scrolled=()=>this.updateSourceChart(a))}),e.config.chart.events.selection=(i,a)=>{s.forEach(o=>{t.constructor.getChartByID(o).ctx.updateHelpers._updateOptions({xaxis:{min:a.xaxis.min,max:a.xaxis.max}},!1,!1,!1,!1)})}}}getAccessibleChartLabel(){let t=this.w,e=t.config;if(e.chart.accessibility&&e.chart.accessibility.description)return e.chart.accessibility.description;let 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{let a=Array.isArray(t.seriesData.seriesNames)&&t.seriesData.seriesNames.length?t.seriesData.seriesNames.filter(Boolean):Array.isArray(e.series)?e.series.map(r=>typeof r=="object"&&r!==null?r.name:null).filter(Boolean):[],o=t.seriesData.series.length||(e.series?e.series.length:0);a.length?i.push(`${s} chart with ${o} data series: ${a.join(", ")}`):i.push(`${s} chart with ${o} data series`)}return i.join(". ")}},Ot=class A{constructor(t,{resetGlobals:e=()=>{},isMultipleY:s=()=>{}}={}){this.w=t,this.resetGlobals=e,this.isMultipleY=s,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new q(this.w),this.activeSeriesIndex=0}getFirstDataPoint(){let t=this.w.config.series,e=new Z(this.w);this.activeSeriesIndex=e.getActiveConfigSeriesIndex();let s=t[this.activeSeriesIndex];return s&&s.data&&s.data.length>0&&s.data[0]!==null&&typeof s.data[0]<"u"?s.data[0]:null}isMultiFormat(){return this.isFormatXY()||this.isFormat2DArray()}isFormatXY(){var t;let e=this.getFirstDataPoint();if(!e||typeof e.x>"u")return!1;let s=(t=this.w.config.series[this.activeSeriesIndex])==null?void 0:t.data;if(s){let i=a=>a&&typeof a.x<"u";for(let a=1;a=5?this.twoDSeries.push(M.parseNumber(r[4])):this.twoDSeries.push(M.parseNumber(c)),this.w.axisFlags.dataFormatXNumeric=!0),s.xaxis.type==="datetime"){let h=new Date(n).getTime();this.twoDSeriesX.push(h)}else this.twoDSeriesX.push(n);typeof l<"u"&&(this.threeDSeries.push(l),this.w.axisFlags.isDataXYZ=!0)}}handleFormatXY(t,e){let s=this.w.config,i=this.w.globals,a=new Q(this.w),o=t[e].data,r=e;i.collapsedSeriesIndices.indexOf(e)>-1&&(r=this.activeSeriesIndex);let n=t[r].data;for(let c=0;c"u"&&(this.seriesGoals[e]=[]),typeof l.goals<"u"&&Array.isArray(l.goals)?this.seriesGoals[e].push(l.goals):this.seriesGoals[e].push(null),typeof l.z<"u"&&(this.threeDSeries.push(l.z),this.w.axisFlags.isDataXYZ=!0)}for(let c=0;c{i&&i.forEach(a=>{let o=a.y,r=o.length;if(!(r<=1))for(let n=0;n{if(!o.has(n.x)){let c={x:n.x,overlaps:new Set,y:[]};o.set(n.x,c),r.push(c)}}),t==="array")for(let n=0;np.slice(1):d=p=>Array.isArray(p[1])?p[1]:[]:d=g=>Array.isArray(g.y)?g.y:[];for(let g=0;g=2&&(o.push(p[0]),r.push(p[1]),a?(n.push(p[2]),c.push(p[3]),l.push(p[4])):(c.push(p[2]),l.push(p[3])))}return{o,h:r,m:n,l:c,c:l}}parseDataAxisCharts(t){var e,s,i,a;let o=this.w.config,r=this.w.globals,n=new Q(this.w),c=o.labels.length>0?o.labels.slice():o.xaxis.categories.slice();this.w.axisFlags.isRangeBar=o.chart.type==="rangeBar"&&r.isBarHorizontal,this.w.labelData.hasXaxisGroups=o.xaxis.type==="category"&&o.xaxis.group.groups.length>0,this.w.labelData.hasXaxisGroups&&(this.w.labelData.groups=o.xaxis.group.groups),t.forEach((g,p)=>{g.name!==void 0?this.w.seriesData.seriesNames.push(g.name):this.w.seriesData.seriesNames.push("series-"+parseInt(String(p+1),10))}),this.coreUtils.setSeriesYAxisMappings();let l=[],h=[...new Set(o.series.map(g=>g.group))];o.series.forEach((g,p)=>{let f=h.indexOf(g.group);l[f]||(l[f]=[]),l[f].push(this.w.seriesData.seriesNames[p])}),this.w.labelData.seriesGroups=l;let d=()=>{for(let g=0;g"u"){console.error("It is a possibility that you may have not included 'data' property in series.");return}let p=o.chart.dataReducer,f=(s=(e=r.dataReducerRawSeries)==null?void 0:e[g])==null?void 0:s.data;if(p?.enabled&&this.isMultiFormat()&&Array.isArray(f)&&f.length>((i=p.threshold)!=null?i:500)){let u=(a=p.targetPoints)!=null?a:250,b=o.xaxis.min,x=o.xaxis.max,w=b==null&&x==null?f:A.sliceByXRange(f,b,x),m=w.length>u?A.lttbDownsample(w,u):w;t[g]=$(B({},t[g]),{data:m})}if((o.chart.type==="rangeBar"||o.chart.type==="rangeArea"||t[g].type==="rangeBar"||t[g].type==="rangeArea")&&(this.w.axisFlags.isRangeData=!0,this.handleRangeData(t,g)),this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(t,g):this.isFormatXY()&&this.handleFormatXY(t,g),(o.chart.type==="candlestick"||t[g].type==="candlestick"||o.chart.type==="boxPlot"||t[g].type==="boxPlot")&&this.handleCandleStickBoxData(t,g),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,g===this.activeSeriesIndex&&!this.fallbackToCategory&&(this.w.axisFlags.isXNumeric=!0);else{o.xaxis.type==="datetime"?(this.w.axisFlags.isXNumeric=!0,d(),this.w.seriesData.seriesX.push(this.twoDSeriesX)):o.xaxis.type==="numeric"&&(this.w.axisFlags.isXNumeric=!0,c.length>0&&(this.twoDSeriesX=c,this.w.seriesData.seriesX.push(this.twoDSeriesX))),this.w.labelData.labels.push(this.twoDSeriesX);let u=t[g].data.map(b=>M.parseNumber(b));this.w.seriesData.series.push(u)}this.w.seriesData.seriesZ.push(this.threeDSeries),t[g].color!==void 0?this.w.seriesData.seriesColors.push(t[g].color):this.w.seriesData.seriesColors.push(void 0)}return this.w}parseDataNonAxisCharts(t){let e=this.w.config,s=Array.isArray(t)&&t.every(o=>typeof o=="number")&&e.labels.length>0,i=Array.isArray(t)&&t.some(o=>o&&typeof o=="object"&&o.data||o&&typeof o=="object"&&o.parsing);if(s&&i&&console.warn("ApexCharts: Both old format (numeric series + labels) and new format (series objects with data/parsing) detected. Using old format for backward compatibility."),s){this.w.seriesData.series=t.slice(),this.w.seriesData.seriesNames=e.labels.slice();for(let o=0;otypeof o=="number")){this.w.seriesData.series=t.slice(),this.w.seriesData.seriesNames=[];for(let o=0;o{let r=M.parseNumber(o);return r>100&&console.warn(`ApexCharts: RadialBar value ${r} > 100, consider using percentage values (0-100)`),r}));for(let o=0;o{e.__apexParsed&&delete e.__apexParsed})}extractPieDataFromSeries(t){let e=[],s=[];if(!Array.isArray(t))return console.warn("ApexCharts: Expected array for series data"),{values:[],labels:[]};if(t.length===0)return console.warn("ApexCharts: Empty series array"),{values:[],labels:[]};let i=t[0];if(typeof i=="object"&&i!==null&&i.data)this.extractPieDataFromSeriesObjects(t,e,s);else return console.warn("ApexCharts: Unsupported series format for pie/donut/radialBar. Expected series objects with data property."),{values:[],labels:[]};return{values:e,labels:s}}extractPieDataFromSeriesObjects(t,e,s){t.forEach((i,a)=>{if(!i.data||!Array.isArray(i.data)){console.warn(`ApexCharts: Series ${a} has no valid data array`);return}i.data.forEach(o=>{typeof o=="object"&&o!==null?o.x!==void 0&&o.y!==void 0?(s.push(String(o.x)),e.push(M.parseNumber(o.y))):console.warn("ApexCharts: Invalid data point format for pie chart. Expected {x, y} format:",o):console.warn("ApexCharts: Expected object data point, got:",typeof o)})})}handleExternalLabelsData(t){let e=this.w.config;if(e.xaxis.categories.length>0)this.w.labelData.labels=e.xaxis.categories;else if(e.labels.length>0)this.w.labelData.labels=e.labels.slice();else if(this.fallbackToCategory){if(this.w.labelData.labels=this.w.labelData.labels[0],this.w.rangeData.seriesRange.length){this.w.rangeData.seriesRange.map(i=>{i.forEach(a=>{this.w.labelData.labels.indexOf(a.x)<0&&a.x&&this.w.labelData.labels.push(a.x)})});let s=this.w.labelData.labels;if(s.length>0&&(typeof s[0]=="number"||typeof s[0]=="string"))this.w.labelData.labels=[...new Set(s)];else{let i=new Map;for(let a of s){let o=JSON.stringify(a);i.has(o)||i.set(o,a)}this.w.labelData.labels=Array.from(i.values())}}e.xaxis.convertedCatToNumeric&&(new At(e).convertCatToNumericXaxis(e,this.w.seriesData.seriesX[0]),this._generateExternalLabels(t))}else this._generateExternalLabels(t)}_generateExternalLabels(t){let e=this.w.globals,s=this.w.config,i=[];if(e.axisCharts){if(this.w.seriesData.series.length>0)if(this.isFormatXY()){let a=s.series.map(r=>{let n=new Map;for(let c of r.data)n.has(c.x)||n.set(c.x,c);return Array.from(n.values())}),o=a.reduce((r,n,c,l)=>l[r].length>n.length?r:c,0);for(let r=0;ro+1);for(let a=0;as.xaxis.labels.formatter(a))),this.w.axisFlags.noLabelsProvided=!0}parseRawDataIfNeeded(t){let e=this.w.config,s=this.w.globals,i=e.parsing;if(this.w.axisFlags.dataWasParsed||!i&&!t.some(o=>o.parsing))return t;let a=t.map((o,r)=>{var n,c,l;if(!o.data||!Array.isArray(o.data)||o.data.length===0)return o;let h={x:((n=o.parsing)==null?void 0:n.x)||i?.x,y:((c=o.parsing)==null?void 0:c.y)||i?.y,z:((l=o.parsing)==null?void 0:l.z)||i?.z};if(!h.x&&!h.y)return o;let d=o.data[0];if(typeof d=="object"&&d!==null&&(Object.prototype.hasOwnProperty.call(d,"x")||Object.prototype.hasOwnProperty.call(d,"y"))||Array.isArray(d))return o;if(!h.x||!h.y||Array.isArray(h.y)&&h.y.length===0)return console.warn(`ApexCharts: Series ${r} has parsing config but missing x or y field specification`),o;let g=o.data.map((p,f)=>{if(typeof p!="object"||p===null)return console.warn(`ApexCharts: Series ${r}, data point ${f} is not an object, skipping parsing`),p;let u=this.getNestedValue(p,h.x),b,x;if(Array.isArray(h.y)){let m=h.y.map(y=>this.getNestedValue(p,y));this.w.config.chart.type==="bubble"?(m.length<2&&console.warn(`ApexCharts: series[${r}] bubble chart requires parseData.y to have at least 2 fields (y and z). Got: ${JSON.stringify(h.y)}`),b=m[0]):b=m}else b=this.getNestedValue(p,h.y);h.z&&(x=this.getNestedValue(p,h.z)),u===void 0&&console.warn(`ApexCharts: Series ${r}, data point ${f} missing field '${h.x}'`),b===void 0&&console.warn(`ApexCharts: Series ${r}, data point ${f} missing field '${h.y}'`);let w={x:u,y:b,z:void 0};if(this.w.config.chart.type==="bubble"&&Array.isArray(h.y)&&h.y.length===2){let m=this.getNestedValue(p,h.y[1]);m!==void 0&&(w.z=m)}return x!==void 0&&(w.z=x),w});return $(B({},o),{data:g,__apexParsed:!0})});return this.w.axisFlags.dataWasParsed=!0,s.originalSeries||(s.originalSeries=M.clone(t)),a}getNestedValue(t,e){if(!t||typeof t!="object"||!e)return;if(e.indexOf(".")===-1)return t[e];let s=e.split("."),i=t;for(let a=0;a({data:Array.isArray(p?.data)?p.data.slice():p?.data}));let d=1/0,g=-1/0;for(let p of t){let f=p?.data;if(!Array.isArray(f)||f.length===0)continue;let u=!Array.isArray(f[0]),b=u?(s=f[0])==null?void 0:s.x:(i=f[0])==null?void 0:i[0],x=u?(a=f[f.length-1])==null?void 0:a.x:(o=f[f.length-1])==null?void 0:o[0];typeof b=="number"&&(d=Math.min(d,b)),typeof x=="number"&&(g=Math.max(g,x))}d!==1/0&&(l.dataReducerRawMinX=d,l.dataReducerRawMaxX=g)}if(c.series=t,l.dataReducerRawSeries&&((r=c.chart.dataReducer)!=null&&r.enabled)){let d=l.dataReducerRawSeries;l.initialSeries=t.map((g,p)=>{var f,u,b;return $(B({},g),{data:(b=(u=(f=d[p])==null?void 0:f.data)==null?void 0:u.slice())!=null?b:g.data})})}else l.initialSeries=M.clone(t);if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.resetGlobals(),this.isMultipleY(),l.axisCharts?(this.parseDataAxisCharts(t),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(t),c.chart.stacked){let d=new Z(this.w);this.w.seriesData.series=d.setNullSeriesToZeroValues(this.w.seriesData.series)}this.coreUtils.getSeriesTotals(),l.axisCharts&&(this.w.seriesData.stackedSeriesTotals=this.coreUtils.getStackedSeriesTotals(),this.w.seriesData.stackedSeriesTotalsByGroups=this.coreUtils.getStackedSeriesTotalsByGroups()),this.coreUtils.getPercentSeries(),!this.w.axisFlags.dataFormatXNumeric&&(!this.w.axisFlags.isXNumeric||c.xaxis.type==="numeric"&&c.labels.length===0&&c.xaxis.categories.length===0)&&this.handleExternalLabelsData(t);let h=this.coreUtils.getCategoryLabels(this.w.labelData.labels);for(let d=0;dc.x:c=>c[0],r=0;if(e!=null){let c=0,l=i-1;for(;c<=l;){let h=c+l>>1;o(t[h])>1;o(t[h])>s?l=h-1:c=h+1}n=Math.min(i,c+1)}return r===0&&n===i?t.slice():t.slice(r,n)}static lttbDownsample(t,e){let s=t.length;if(e>=s||e<3)return t;let i=!Array.isArray(t[0]),a=i?l=>l.x:l=>l[0],o=i?l=>l.y:l=>l[1],r=[];r.push(t[0]);let n=(s-2)/(e-2),c=0;for(let l=0;lm&&(m=C,y=v)}r.push(t[y]),c=y}return r.push(t[s-1]),r}excludeCollapsedSeriesInYAxis(){let t=this.w,e=[];t.globals.seriesYAxisMap.forEach((s,i)=>{let a=0;s.forEach(o=>{t.globals.collapsedSeriesIndices.indexOf(o)!==-1&&a++}),a>0&&a==s.length&&e.push(i)}),t.globals.ignoreYAxisIndexes=e.map(s=>s)}},Te=class{constructor(t,e){this.w=t,this.ctx=e}_updateOptions(t,e=!1,s=!0,i=!0,a=!1){return new Promise(o=>{let r=[this.ctx];i&&(r=this.ctx.getSyncedCharts()),this.w.globals.isExecCalled&&(r=[this.ctx],this.w.globals.isExecCalled=!1),r.forEach((n,c)=>{let l=n.w;if(l.globals.shouldAnimate=s,e||(l.globals.resized=!0,l.globals.dataChanged=!0,s&&n.series.getPreviousPaths()),t&&typeof t=="object"&&(n.config=new Ct(t),t=q.extendArrayProps(n.config,t,l),n.w.globals.chartID!==this.w.globals.chartID&&delete t.series,l.config=M.extend(l.config,t),a&&(l.globals.lastXAxis=t.xaxis?M.clone(t.xaxis):[],l.globals.lastYAxis=t.yaxis?M.clone(t.yaxis):[],l.globals.initialConfig=M.extend({},l.config),l.globals.initialSeries=M.clone(l.config.series),t.series))){for(let h=0;h{c===r.length-1&&o(n)})})})}_updateSeries(t,e,s=!1){return new Promise(i=>{let a=this.w;a.globals.shouldAnimate=e,a.globals.dataChanged=!0,Yt.invalidateSelectors(a),e&&this.ctx.series.getPreviousPaths();let o=a.config.series.length;a.globals.dataReducerRawSeries=null,this.ctx.data.resetParsingFlags();let r=this.ctx.data.parseData(t);return this.ctx._writeParsedSeriesData(r.seriesData),this.ctx._writeParsedRangeData(r.rangeData),this.ctx._writeParsedCandleData(r.candleData),this.ctx._writeParsedLabelData(r.labelData),this.ctx._writeParsedAxisFlags(r.axisFlags),s&&(a.globals.initialConfig&&(a.globals.initialConfig.series=M.clone(a.config.series)),a.globals.initialSeries=M.clone(a.config.series)),this._canUseFastPath(t,o,a)?this.ctx.fastUpdate(e).then(()=>{i(this.ctx)}):this.ctx.update().then(()=>{i(this.ctx)})})}_canUseFastPath(t,e,s){return!(!s.dom.elGraphical||!s.globals.axisCharts||t.length!==e||s.globals.collapsedSeries.length>0||s.globals.ancillaryCollapsedSeries.length>0||s.globals.risingSeries.length>0||s.globals.comboCharts||s.interact.zoomed)}_extendSeries(t,e){let s=this.w,i=s.config.series[e];return $(B({},s.config.series[e]),{name:t.name?t.name:i?.name,color:t.color?t.color:i?.color,type:t.type?t.type:i?.type,group:t.group?t.group:i?.group,hidden:typeof t.hidden<"u"?t.hidden:i?.hidden,data:t.data?t.data:i?.data,zIndex:typeof t.zIndex<"u"?t.zIndex:e})}toggleDataPointSelection(t,e){let s=this.w,i=null,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}']`):typeof e>"u"&&(i=s.dom.Paper.findOne(`${a} path[j='${t}']`),(s.config.chart.type==="pie"||s.config.chart.type==="polarArea"||s.config.chart.type==="donut")&&this.ctx.pie.pieClicked(t)),i)new F(this.w).pathMouseDown(i,null);else return console.warn("toggleDataPointSelection: Element not found"),null;return i.node?i.node:null}forceXAxisUpdate(t){let e=this.w;return["min","max"].forEach(i=>{typeof t.xaxis[i]<"u"&&(e.config.xaxis[i]=t.xaxis[i],e.globals.lastXAxis[i]=t.xaxis[i])}),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric&&(t=new At(t).convertCatToNumericXaxis(t,this.ctx)),t}forceYAxisUpdate(t){return t.chart&&t.chart.stacked&&t.chart.stackType==="100%"&&(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){let e=this.w,s=e.globals.lastXAxis,i=e.globals.lastYAxis;t&&t.xaxis&&(s=t.xaxis),t&&t.yaxis&&(i=t.yaxis);let a=s;e.config.xaxis.min=a.min,e.config.xaxis.max=a.max;let o=r=>{if(typeof i[r]<"u"){let n=i[r];e.config.yaxis[r].min=n.min,e.config.yaxis[r].max=n.max}};e.config.yaxis.map((r,n)=>{e.interact.zoomed||typeof i[n]<"u"?o(n):typeof this.ctx.opts.yaxis[n]<"u"&&(r.min=this.ctx.opts.yaxis[n].min,r.max=this.ctx.opts.yaxis[n].max)})}},qt=class{constructor(t){this.w=t.w,this.ttCtx=t}getNearestValues({hoverArea:t,elGrid:e,clientX:s,clientY:i}){var a,o;let r=this.w,n=e.getBoundingClientRect(),c=n.width,l=n.height,h=c/(r.globals.dataPoints-1),d=l/r.globals.dataPoints,g=this.hasBars();(r.globals.comboCharts||g)&&!r.config.xaxis.convertedCatToNumeric&&(h=c/r.globals.dataPoints);let p=s-n.left-r.globals.barPadForNumericAxis,f=i-n.top;p<0||f<0||p>c||f>l?(t.classList.remove("hovering-zoom"),t.classList.remove("hovering-pan")):r.interact.zoomEnabled?(t.classList.remove("hovering-pan"),t.classList.add("hovering-zoom")):r.interact.panEnabled&&(t.classList.remove("hovering-zoom"),t.classList.add("hovering-pan"));let b=Math.round(p/h),x=Math.floor(f/d);g&&!r.config.xaxis.convertedCatToNumeric&&(b=Math.ceil(p/h),b=b-1);let w=null,m=null,y=r.globals.seriesXvalues.map(C=>C.filter(k=>M.isNumber(k))),v=r.globals.seriesYvalues.map(C=>C.filter(k=>M.isNumber(k)));if(r.axisFlags.isXNumeric){let C=this.ttCtx.getElGrid();if(!C)return{hoverX:p,hoverY:f};let k=C.getBoundingClientRect(),S=p*(k.width/c),L=f*(k.height/l);m=this.closestInMultiArray(S,L,y,v),w=m.index,b=(a=m.j)!=null?a:0,w!==null&&r.globals.hasNullValues&&(y=r.globals.seriesXvalues[w],m=this.closestInArray(S,y),b=(o=m.j)!=null?o:0)}return r.interact.capturedSeriesIndex=w===null?-1:w,(!b||b<1)&&(b=0),r.globals.isBarHorizontal?r.interact.capturedDataPointIndex=x:r.interact.capturedDataPointIndex=b,{capturedSeries:w,j:r.globals.isBarHorizontal?x:b,hoverX:p,hoverY:f}}getFirstActiveXArray(t){let e=this.w,s=0,i=t.map((a,o)=>a.length>0?o:-1);for(let a=0;aa.globals.collapsedSeriesIndices.indexOf(d)===-1&&a.globals.ancillaryCollapsedSeriesIndices.indexOf(d)===-1,r=a.config.chart.type,n=!a.globals.comboCharts&&(r==="line"||r==="area"),c=1/0,l=null,h=null;if(a.globals.allSeriesHasEqualX){let d=1/0;for(let g=0;g=2){for(let u=0;u1&&(l=1);let h=s+l*r,d=i+l*n,g=t-h,p=e-d;return{dist:Math.sqrt(g*g+p*p),t:l}}closestInArray(t,e){let s=e[0],i=null,a=Math.abs(t-s);for(let o=0;otypeof a[0]<"u");if(i.length>0)for(let a=0;a{var n;return!((n=this.w.globals.collapsedSeriesIndices)!=null&&n.includes(r))}))||[];for(let o=0;oi+a.getBBox().height,0)}getElMarkers(t){return typeof t=="number"?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(i=>{let a=Number(i.getAttribute("data:realIndex"));return this.w.globals.collapsedSeriesIndices.indexOf(a)===-1})),e.sort((i,a)=>{var o=Number(i.getAttribute("data:realIndex")),r=Number(a.getAttribute("data:realIndex"));return ro?-1:0});let s=[];return e.forEach(i=>{s.push(i.querySelector(".apexcharts-marker"))}),s}hasMarkers(t){return this.getElMarkers(t).length>0}getPathFromPoint(t,e){let s=Number(t.getAttribute("cx")),i=Number(t.getAttribute("cy")),a=t.getAttribute("shape");return new F(this.w).getMarkerPath(s,i,a,e)}getElBars(){return this.w.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}hasBars(){return this.getElBars().length>0}getHoverMarkerSize(t){let e=this.w,s=e.config.markers.hover.size;return s===void 0&&(s=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),s}toggleAllTooltipSeriesGroups(t){let e=this.w,s=this.ttCtx;s.allTooltipSeriesGroups.length===0&&(s.allTooltipSeriesGroups=e.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));let i=s.allTooltipSeriesGroups;for(let a=0;a({attrs:r,val:t.yLbFormatter(r.value,{seriesIndex:e,dataPointIndex:s,w:a})})):[]}resolvePatternColor(t,e){var s,i,a;let o=this.w,r=(s=t?.target)==null?void 0:s.getAttribute("fill");if(!r)return e;if(r.indexOf("url")===-1)return r;if(r.indexOf("Pattern")===-1)return e;let n=o.dom.baseEl.querySelector(r.substr(4).slice(0,-1));return(a=(i=n?.childNodes[0])==null?void 0:i.getAttribute("stroke"))!=null?a:e}getFormatters(t){let e=this.w,s=e.formatters.yLabelFormatters[t],i;return e.formatters.ttVal!==void 0?Array.isArray(e.formatters.ttVal)?(s=e.formatters.ttVal[t]&&e.formatters.ttVal[t].formatter,i=e.formatters.ttVal[t]&&e.formatters.ttVal[t].title&&e.formatters.ttVal[t].title.formatter):(s=e.formatters.ttVal.formatter,typeof e.formatters.ttVal.title.formatter=="function"&&(i=e.formatters.ttVal.title.formatter)):i=e.config.tooltip.y.title.formatter,typeof s!="function"&&(e.formatters.yLabelFormatters[0]?s=e.formatters.yLabelFormatters[0]:s=function(a){return a}),typeof i!="function"&&(i=function(a){return a?a+": ":""}),{yLbFormatter:s,yLbTitleFormatter:i}}getSeriesName({fn:t,index:e,seriesIndex:s,j:i}){let a=this.w;return t(String(a.seriesData.seriesNames[e]),{series:a.seriesData.series,seriesIndex:s,dataPointIndex:i,w:a})}DOMHandling({t,j:e,ttItems:s,values:i,seriesName:a,shared:o,pColor:r}){let n=this.w,c=this.ttCtx,{val:l,goalVals:h,xVal:d,xAxisTTVal:g,zVal:p}=i,f=null;f=s[t].children,n.config.tooltip.fillSeriesColor&&(s[t].style.backgroundColor=r,f[0].style.display="none"),c.showTooltipTitle&&(c.tooltipTitle===null&&(c.tooltipTitle=n.dom.baseEl.querySelector(".apexcharts-tooltip-title")),c.tooltipTitle&&(c.tooltipTitle.innerHTML=d)),c.isXAxisTooltipEnabled&&c.xaxisTooltipText&&(c.xaxisTooltipText.innerHTML=g!==""?g:d);let u=s[t].querySelector(".apexcharts-tooltip-text-y-label");u&&(u.innerHTML=a||"");let b=s[t].querySelector(".apexcharts-tooltip-text-y-value");b&&(b.innerHTML=typeof l<"u"?l:""),f[0]&&f[0].classList.contains("apexcharts-tooltip-marker")&&(n.config.tooltip.marker.fillColors&&Array.isArray(n.config.tooltip.marker.fillColors)&&(r=n.config.tooltip.marker.fillColors[t]),n.config.tooltip.fillSeriesColor?f[0].style.backgroundColor=r:f[0].style.color=r),n.config.tooltip.marker.show||(f[0].style.display="none");let x=s[t].querySelector(".apexcharts-tooltip-text-goals-label"),w=s[t].querySelector(".apexcharts-tooltip-text-goals-value");if(h.length&&n.seriesData.seriesGoals[t]){let m=()=>{let y="
",v="
";h.forEach(C=>{y+=`
${C.attrs.name}
`,v+=`
${C.val}
`}),x.innerHTML=y+"
",w.innerHTML=v+"
"};o?n.seriesData.seriesGoals[t][e]&&Array.isArray(n.seriesData.seriesGoals[t][e])?m():(x.innerHTML="",w.innerHTML=""):m()}else x.innerHTML="",w.innerHTML="";if(p!==null){let m=s[t].querySelector(".apexcharts-tooltip-text-z-label");m.innerHTML=n.config.tooltip.z.title;let y=s[t].querySelector(".apexcharts-tooltip-text-z-value");y.innerHTML=typeof p<"u"?p:""}if(o&&f[0]){if(n.config.tooltip.hideEmptySeries){let m=s[t].querySelector(".apexcharts-tooltip-marker"),y=s[t].querySelector(".apexcharts-tooltip-text");parseFloat(l)==0?(m.style.display="none",y.style.display="none"):(m.style.display="block",y.style.display="block")}typeof l>"u"||l===null||n.globals.ancillaryCollapsedSeriesIndices.indexOf(t)>-1||n.globals.collapsedSeriesIndices.indexOf(t)>-1||Array.isArray(c.tConfig.enabledOnSeries)&&c.tConfig.enabledOnSeries.indexOf(t)===-1?f[0].parentNode.style.display="none":f[0].parentNode.style.display=n.config.tooltip.items.display}else Array.isArray(c.tConfig.enabledOnSeries)&&c.tConfig.enabledOnSeries.indexOf(t)===-1&&(f[0].parentNode.style.display="none")}toggleActiveInactiveSeries(t,e){let s=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");let i=s.dom.baseEl.querySelector(`.apexcharts-tooltip-series-group-${e}`);if(i){let a=i;a.classList.add("apexcharts-active"),a.style.display=s.config.tooltip.items.display}}}getValuesToPrint({i:t,j:e}){var s,i,a,o,r,n,c,l;let h=this.w,d=h.seriesData.seriesX.map(m=>m.length>0?m:[]),g="",p="",f=null,u=null,b={series:h.seriesData.series,seriesIndex:t,dataPointIndex:e,w:h},x=h.formatters.ttZFormatter;if(e===null)u=h.seriesData.series[t];else if(h.axisFlags.isXNumeric&&h.config.chart.type!=="treemap"){if(g=d[t][e],d[t].length===0){let m=this.tooltipUtil.getFirstActiveXArray(d);g=d[m][e]}}else new Ot(this.w).isFormatXY()?g=typeof h.config.series[t].data[e]<"u"?h.config.series[t].data[e].x:"":g=typeof h.labelData.labels[e]<"u"?h.labelData.labels[e]:"";let w=g;return h.axisFlags.isXNumeric&&h.config.xaxis.type==="datetime"?g=new vt(this.w).xLabelFormat(h.formatters.ttKeyFormatter,w,w,{i:void 0,dateFormatter:new Q(this.w).formatDate,w:this.w}):h.globals.isBarHorizontal?g=h.formatters.yLabelFormatters[0](w,b):g=(a=(i=(s=h.formatters).xLabelFormatter)==null?void 0:i.call(s,w,b))!=null?a:w,h.config.tooltip.x.formatter!==void 0&&(g=(n=(r=(o=h.formatters).ttKeyFormatter)==null?void 0:r.call(o,w,b))!=null?n:w),h.seriesData.seriesZ.length>0&&h.seriesData.seriesZ[t].length>0&&(f=x?.(h.seriesData.seriesZ[t][e],h)),typeof h.config.xaxis.tooltip.formatter=="function"?p=(l=(c=h.formatters).xaxisTooltipFormatter)==null?void 0:l.call(c,w,b):p=g,{val:Array.isArray(u)?u.join(" "):u,xVal:Array.isArray(g)?g.join(" "):g,xAxisTTVal:Array.isArray(p)?p.join(" "):p,zVal:f}}handleCustomTooltip({i:t,j:e,y1:s,y2:i,w:a}){let o=this.ttCtx.getElTooltip(),r=a.config.tooltip.custom;Array.isArray(r)&&r[t]&&(r=r[t]);let n=r({series:a.seriesData.series,seriesIndex:t,dataPointIndex:e,y1:s,y2:i,w:a});o&&(typeof n=="string"||typeof n=="number"?o.innerHTML=String(n):(n instanceof Element||typeof n.nodeName=="string")&&(o.innerHTML="",o.appendChild(n.cloneNode(!0))))}},Zt=class{constructor(t){this.ttCtx=t,this.w=t.w}moveXCrosshairs(t,e=null){let s=this.ttCtx,i=this.w,a=s.getElXCrosshairs(),o=t-s.xcrosshairsWidth/2,r=i.labelData.labels.slice().length;if(e!==null&&(o=i.layout.gridWidth/r*e),a!==null&&!i.globals.isBarHorizontal&&(a.setAttribute("x",String(o)),a.setAttribute("x1",String(o)),a.setAttribute("x2",String(o)),a.setAttribute("y2",String(i.layout.gridHeight)),a.classList.add("apexcharts-active")),o<0&&(o=0),o>i.layout.gridWidth&&(o=i.layout.gridWidth),s.isXAxisTooltipEnabled){let n=o;(i.config.xaxis.crosshairs.width==="tickWidth"||i.config.xaxis.crosshairs.width==="barWidth")&&(n=o+s.xcrosshairsWidth/2),this.moveXAxisTooltip(n)}}moveYCrosshairs(t){let e=this.ttCtx;e.ycrosshairs!==null&&F.setAttrs(e.ycrosshairs,{y1:t,y2:t}),e.ycrosshairsHidden!==null&&F.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}moveXAxisTooltip(t){var e,s;let i=this.w,a=this.ttCtx;if(a.xaxisTooltip!==null&&a.xcrosshairsWidth!==0){a.xaxisTooltip.classList.add("apexcharts-active");let o=a.xaxisOffY+i.config.xaxis.tooltip.offsetY+i.layout.translateY+5+i.config.xaxis.offsetY,n=a.xaxisTooltip.getBoundingClientRect().width;if(t=t-n/2,!isNaN(t)){t=t+i.layout.translateX;let l=new F(this.w).getTextRects((s=(e=a.xaxisTooltipText)==null?void 0:e.innerHTML)!=null?s:"",i.config.xaxis.labels.style.fontSize);a.xaxisTooltipText&&(a.xaxisTooltipText.style.minWidth=l.width+"px"),a.xaxisTooltip.style.left=t+"px",a.xaxisTooltip.style.top=o+"px"}}}moveYAxisTooltip(t){var e,s;let i=this.w,a=this.ttCtx;a.yaxisTTEls===null&&(a.yaxisTTEls=[...i.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip")]);let o=parseInt((s=(e=a.ycrosshairsHidden)==null?void 0:e.getAttribute("y1"))!=null?s:"0",10),r=i.layout.translateY+o;if(a.yaxisTTEls){let n=a.yaxisTTEls[t].getBoundingClientRect(),c=n.height,l,h=i.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-texts-g`),d=i.dom.elWrap.getBoundingClientRect();if(h){let g=h.getBoundingClientRect();g.width>0&&(l=g.left+g.width/2-d.left-n.width/2)}l==null&&(l=i.config.yaxis[t].opposite?i.globals.translateYAxisX[t]+4:i.globals.translateYAxisX[t]-n.width-4),r=r-c/2,i.globals.ignoreYAxisIndexes.indexOf(t)===-1&&r>0&&rh.layout.gridWidth/2&&(m=m-b-f-10,C="left"),m>h.layout.gridWidth-b-10&&(m=h.layout.gridWidth-b),m<-20&&(m=-20),h.config.tooltip.followCursor){let L=d.getElGrid();if(!L)return null;let D=L.getBoundingClientRect();m=d.e.clientX-D.left,m>h.layout.gridWidth/2?(m=m-b,C="left"):C="right",v=d.e.clientY+h.layout.translateY-D.top,v>h.layout.gridHeight/2&&(v=v-u)}else if(!h.globals.isBarHorizontal)if(p){let L=h.layout.translateY,D=h.layout.translateY+h.layout.gridHeight;v+u>D&&(v=D-u),vh.layout.gridHeight&&(v=h.layout.gridHeight-u+h.layout.translateY);if(isNaN(m))return null;m=m+h.layout.translateX;let k=(a=(i=h.config)==null?void 0:i.chart)==null?void 0:a.accessibility;if(k?.enabled&&((r=(o=k?.keyboard)==null?void 0:o.navigation)!=null&&r.enabled)&&((l=(c=(n=h.dom)==null?void 0:n.baseEl)==null?void 0:c.querySelector)!=null&&l.call(c,".apexcharts-keyboard-focused"))){let L=p?y:w,D=(f||1)+12,T=v,E=v+u;!isNaN(L)&&u>0&&TL-D&&(v=L-u-D,v<0&&(v=L+D))}let S=null;if(p&&u>0){let L=y-v,D=10,T=u-10;S=Math.max(D,Math.min(T,L))}return{x:m,y:v,placement:C,arrowY:S}}applyTooltipPosition(t,e){if(!t)return;let s=t.dataset.positioned!=="true";s&&(t.style.transitionProperty="none"),t.style.left=e.x+"px",t.style.top=e.y+"px",e.placement&&(t.dataset.placement=e.placement),e.arrowY!=null&&t.style.setProperty("--apx-tt-arrow-y",e.arrowY+"px"),e.arrowX!=null&&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;let i=this.w,a=this.ttCtx;if(i.globals.markers.size[t]>0){let o=i.dom.baseEl.querySelectorAll(` .apexcharts-series[data\\:realIndex='${t}'] .apexcharts-marker`);for(let r=0;r0){let b=(r=u.getAttribute("shape"))!=null?r:"circle",x=d.getMarkerPath(l,h,b,p*1.5);u.setAttribute("d",x)}this.moveXCrosshairs(l),c.fixedTooltip||this.moveTooltip(l,h,p)}moveDynamicPointsOnHover(t){var e,s;let i=this.ttCtx,a=i.w,o=0,r=0,n=0,c=a.globals.pointsArray,l=new Z(this.w),h=new F(this.w);n=l.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);let d=i.tooltipUtil.getHoverMarkerSize(n);if((e=c[n])!=null&&e[t]&&(o=c[n][t][0],r=c[n][t][1]),isNaN(o))return;let g=i.tooltipUtil.getAllMarkers();if(g.length)for(let p=0;p"u"&&g.splice(p,0,null),f&&f.length){let u=c[p][t][1],b;g[p].setAttribute("cx",o);let x=(s=g[p].getAttribute("shape"))!=null?s:"circle";if(a.config.chart.type==="rangeArea"&&!a.globals.comboCharts){let w=t+a.seriesData.series[p].length;b=c[p][w][1];let m=Math.abs(u-b)/2;u=u-m}if(u!==null&&!isNaN(u)&&u0){let w=h.getMarkerPath(o,u,x,d);g[p].setAttribute("d",w)}else g[p].setAttribute("d","")}}this.moveXCrosshairs(o),i.fixedTooltip||this.moveTooltip(o,r||a.layout.gridHeight,d)}moveStickyTooltipOverBars(t,e){var s,i,a;let o=this.w,r=this.ttCtx,n=o.globals.columnSeries?o.globals.columnSeries.length:o.seriesData.series.length;o.config.chart.stacked&&(n=o.globals.barGroups.length);let c=n>=2&&n%2===0?Math.floor(n/2):Math.floor(n/2)+1;o.globals.isBarHorizontal&&(c=new Z(this.w).getActiveConfigSeriesIndex("desc")+1);let l=o.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[rel='${c}'] path[j='${t}'], .apexcharts-candlestick-series .apexcharts-series[rel='${c}'] path[j='${t}'], .apexcharts-boxPlot-series .apexcharts-series[rel='${c}'] path[j='${t}'], .apexcharts-rangebar-series .apexcharts-series[rel='${c}'] path[j='${t}']`);!l&&typeof e=="number"&&(l=o.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}'], .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}'], .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}'], .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}']`));let h=l?parseFloat((s=l.getAttribute("cx"))!=null?s:"0"):0,d=l?parseFloat((i=l.getAttribute("cy"))!=null?i:"0"):0,g=l?parseFloat((a=l.getAttribute("barWidth"))!=null?a:"0"):0,p=r.getElGrid();if(!p)return;let f=p.getBoundingClientRect(),u=l&&(l.classList.contains("apexcharts-candlestick-area")||l.classList.contains("apexcharts-boxPlot-area"));if(o.axisFlags.isXNumeric){if(l&&!u){let b=this._datapointCenterXFromBars(t,f);b!=null?h=b:h=h-(n%2!==0?g/2:0)}l&&u&&(h=h-g/2)}else o.globals.isBarHorizontal||(h=r.xAxisTicksPositions[t-1]+r.dataPointsDividedWidth/2,isNaN(h)&&(h=r.xAxisTicksPositions[t]-r.dataPointsDividedWidth/2));if(o.globals.isBarHorizontal?d=d-r.tooltipRect.ttHeight:o.config.tooltip.followCursor?d=r.e.clientY-f.top-r.tooltipRect.ttHeight/2:d+r.tooltipRect.ttHeight+15>o.layout.gridHeight&&(d=o.layout.gridHeight),o.globals.isBarHorizontal||this.moveXCrosshairs(h),!r.fixedTooltip){if(o.globals.isBarHorizontal&&!o.config.tooltip.followCursor&&this.placeHorizontalSharedTooltip(t))return;this.moveTooltip(h,d||o.layout.gridHeight)}}_datapointCenterXFromBars(t,e){var s,i;let o=this.w.dom.baseEl.querySelectorAll(`.apexcharts-bar-series path[j='${t}'],.apexcharts-rangebar-series path[j='${t}']`);if(!o.length)return null;let r=1/0,n=-1/0;for(let c of o){let l=c.parentNode;if((i=(s=l?.classList)==null?void 0:s.contains)!=null&&i.call(s,"apexcharts-series-collapsed"))continue;let h=c.getBoundingClientRect();h.width===0&&h.height===0||(h.leftn&&(n=h.right))}return isFinite(r)?(r+n)/2-e.left:null}placeHorizontalSharedTooltip(t){var e,s;let i=this.w,a=this.ttCtx,o=a.getElTooltip();if(!o)return!1;let r=a.getElGrid();if(!r)return!1;let n=r.getBoundingClientRect(),c=i.dom.baseEl.querySelectorAll(`.apexcharts-bar-series path[j='${t}'],.apexcharts-rangebar-series path[j='${t}'],.apexcharts-boxPlot-series path[j='${t}']`);if(!c.length)return!1;let l=1/0,h=-1/0,d=1/0,g=-1/0;for(let T of c){let E=T.parentNode;if((s=(e=E?.classList)==null?void 0:e.contains)!=null&&s.call(e,"apexcharts-series-collapsed"))continue;let R=T.getBoundingClientRect();R.width===0&&R.height===0||(R.lefth&&(h=R.right),R.topg&&(g=R.bottom))}if(!isFinite(l))return!1;let p=a.tooltipRect.ttWidth||0,f=a.tooltipRect.ttHeight||0,u=7,b=(l+h)/2-n.left+i.layout.translateX,x=d-n.top+i.layout.translateY,w=g-n.top+i.layout.translateY,m=i.layout.translateY,y=i.layout.translateY+i.layout.gridHeight,v=i.layout.translateX,C=i.layout.translateX+i.layout.gridWidth,k="top",S=x-f-u;if(SC&&(L=C-p);let D=Math.max(10,Math.min(p-10,b-L));return this.applyTooltipPosition(o,{x:L,y:S,placement:k,arrowY:null,arrowX:D}),!0}};function Vs(A){let t=e=>``;switch(A){case"square":case"rect":return t('');case"line":return t('');case"diamond":return t('');case"triangle":return t('');case"cross":return t('');case"plus":return t('');case"star":return t('');case"sparkle":return t('');default:return t('')}}var Ee=class{constructor(t){this.w=t.w,this.ttCtx=t,this.ctx=t.ctx,this.tooltipPosition=new Zt(t)}drawDynamicPoints(){let t=this.w,e=new F(this.w),s=new pt(this.w,this.ctx),i=[...t.dom.baseEl.querySelectorAll(".apexcharts-series")];t.config.chart.stacked&&i.sort((a,o)=>parseFloat(a.getAttribute("data:realIndex"))-parseFloat(o.getAttribute("data:realIndex")));for(let a=0;a0){let o=this.ttCtx.tooltipUtil.getPathFromPoint(s[i],a);s[i].setAttribute("d",o)}else s[i].setAttribute("d","M0,0")}}},Re=class{constructor(t){this.w=t.w;let e=this.w;this.ttCtx=t,this.isVerticalGroupedRangeBar=!e.globals.isBarHorizontal&&e.config.chart.type==="rangeBar"&&e.config.plotOptions.bar.rangeBarGroupRows}getAttr(t,e){var s;return parseFloat((s=t.target.getAttribute(e))!=null?s:"")}handleHeatTreeTooltip({e:t,opt:e,x:s,y:i,type:a}){var o,r;let n=this.ttCtx,c=this.w;if(t.target.classList.contains(`apexcharts-${a}-rect`)){let l=this.getAttr(t,"i"),h=this.getAttr(t,"j"),d=this.getAttr(t,"cx"),g=this.getAttr(t,"cy"),p=this.getAttr(t,"width"),f=this.getAttr(t,"height");if(n.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:l,j:h,shared:!1,e:t}),c.interact.capturedSeriesIndex=l,c.interact.capturedDataPointIndex=h,s=d+n.tooltipRect.ttWidth/2+p,i=g+n.tooltipRect.ttHeight/2-f/2,n.tooltipPosition.moveXCrosshairs(d+p/2),s>c.layout.gridWidth/2&&(s=d-n.tooltipRect.ttWidth/2+p),n.w.config.tooltip.followCursor){let u=c.dom.elWrap.getBoundingClientRect();s=((o=c.interact.clientX)!=null?o:0)-u.left-(s>c.layout.gridWidth/2?n.tooltipRect.ttWidth:0),i=((r=c.interact.clientY)!=null?r:0)-u.top-(i>c.layout.gridHeight/2?n.tooltipRect.ttHeight:0)}}return{x:s,y:i}}handleMarkerTooltip({e:t,opt:e,x:s,y:i}){let a=this.w,o=this.ttCtx,r,n;if(t.target.classList.contains("apexcharts-marker")){let c=parseInt(e.paths.getAttribute("cx"),10),l=parseInt(e.paths.getAttribute("cy"),10),h=parseFloat(e.paths.getAttribute("val"));if(n=parseInt(e.paths.getAttribute("rel"),10),r=parseInt(e.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,o.intersect){let g=M.findAncestor(e.paths,"apexcharts-series");g&&(r=parseInt(g.getAttribute("data:realIndex"),10))}o.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:r,j:n,shared:o.showOnIntersect?!1:a.config.tooltip.shared,e:t}),t.type==="mouseup"&&o.markerClick(t,r,n),a.interact.capturedSeriesIndex=r,a.interact.capturedDataPointIndex=n;let d=!!a.config.tooltip.arrow;if(s=c,d?i=l:(i=l+a.layout.translateY-o.tooltipRect.ttHeight*1.4,h<0&&(i=l)),o.w.config.tooltip.followCursor){let g=o.getElGrid();if(!g)return{x:s,y:i};let p=g.getBoundingClientRect();i=o.e.clientY+a.layout.translateY-p.top}o.marker.enlargeCurrentPoint(n,e.paths,s,i)}return{x:s,y:i}}handleBarTooltip({e:t,opt:e}){var s,i,a;let o=this.w,r=this.ttCtx,n=r.getElTooltip(),c=0,l=0,h=0,d=0,g,p=this.getBarTooltipXY({e:t,opt:e});if(p.j===null&&p.barHeight===0&&p.barWidth===0)return;d=p.i;let f=p.j;if(o.interact.capturedSeriesIndex=d,o.interact.capturedDataPointIndex=f!==null?f:o.interact.capturedDataPointIndex,o.globals.isBarHorizontal&&r.tooltipUtil.hasBars()||!o.config.tooltip.shared?(l=p.x,h=p.y,g=Array.isArray(o.config.stroke.width)?o.config.stroke.width[d]:o.config.stroke.width,c=l):!o.globals.comboCharts&&!o.config.tooltip.shared&&(c=c/2),isNaN(h)&&(h=o.globals.svgHeight-r.tooltipRect.ttHeight),l+r.tooltipRect.ttWidth>o.layout.gridWidth?l=l-r.tooltipRect.ttWidth:l<0&&(l=0),!(r.w.config.tooltip.followCursor&&!r.getElGrid())&&(r.tooltip===null&&(r.tooltip=o.dom.baseEl.querySelector(".apexcharts-tooltip")),o.config.tooltip.shared||(o.globals.comboBarCount>0?r.tooltipPosition.moveXCrosshairs(c+g/2):r.tooltipPosition.moveXCrosshairs(c)),!r.fixedTooltip&&(!o.config.tooltip.shared||o.globals.isBarHorizontal&&r.tooltipUtil.hasBars())&&(h=h+o.layout.translateY-r.tooltipRect.ttHeight/2,n))){let u=r.tooltipRect.ttWidth||0,b=r.tooltipRect.ttHeight||0,x=!!o.config.tooltip.arrow,{barAnchorXInGrid:w,barAnchorYInGrid:m,barRectInGrid:y}=p,v=7,C=(s=r.getElGrid())==null?void 0:s.getBoundingClientRect(),k=o.dom.elWrap.getBoundingClientRect(),S=C?C.left-k.left:o.layout.translateX,L,D=null,T=null,E=l+S,R=h;if(x&&o.globals.isBarHorizontal&&y!=null){let P=o.layout.translateY,_=o.layout.translateY+o.layout.gridHeight,X=S,z=S+o.layout.gridWidth,Y=(y.left+y.right)/2+S,H=y.top+o.layout.translateY,W=y.bottom+o.layout.translateY,O=H-b-v;if(L="top",Oz&&(E=z-u),T=Math.max(10,Math.min(u-10,Y-E))}else if(x&&w!=null&&m!=null){let P=w+S,_=S+o.layout.gridWidth/2,X=((i=y?.left)!=null?i:w)+S,z=((a=y?.right)!=null?a:w)+S;if(P<_?(L="right",E=z+v):(L="left",E=X-u-v),y){R=(y.top+y.bottom)/2+o.layout.translateY-b/2;let H=o.layout.translateY,W=o.layout.translateY+o.layout.gridHeight;RW&&(R=W-b)}if(b>0&&y){let Y=(y.top+y.bottom)/2+o.layout.translateY;D=Math.max(10,Math.min(b-10,Y-R))}}r.tooltipPosition.applyTooltipPosition(n,{x:E,y:R,placement:L,arrowY:D,arrowX:T})}}getBarTooltipXY({e:t,opt:e}){let s=this.w,i=null,a=this.ttCtx,o=0,r=0,n=0,c=0,l=0,h=null,d=null,g=null,p=null,f=null,u=t.target.classList;if(u.contains("apexcharts-bar-area")||u.contains("apexcharts-candlestick-area")||u.contains("apexcharts-boxPlot-area")||u.contains("apexcharts-rangebar-area")){let b=t.target,x=b.getBoundingClientRect(),w=e.elGrid.getBoundingClientRect(),m=x.height;l=x.height;let y=x.width,v=parseInt(b.getAttribute("cx"),10),C=parseInt(b.getAttribute("cy"),10);h=v,d=C,c=parseFloat(b.getAttribute("barWidth"));let k=x.left-w.left,S=x.top-w.top,L=k+y/2,D=S+m/2;g=L,p=s.globals.isBarHorizontal?D:S,f={left:k,top:S,right:k+y,bottom:S+m};let T=t.type==="touchmove"?t.touches[0].clientX:t.clientX;i=parseInt(b.getAttribute("j"),10),o=parseInt(b.parentNode.getAttribute("rel"),10)-1;let E=b.getAttribute("data-range-y1"),R=b.getAttribute("data-range-y2");s.globals.comboCharts&&(o=parseInt(b.parentNode.getAttribute("data:realIndex"),10));let P=X=>(s.axisFlags.isXNumeric?X=v-y/2:this.isVerticalGroupedRangeBar?X=v+y/2:X=v-a.dataPointsDividedWidth+y/2,X),_=()=>C-a.dataPointsDividedHeight+m/2-a.tooltipRect.ttHeight/2;a.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:o,j:i,y1:E?parseInt(E,10):null,y2:R?parseInt(R,10):null,shared:a.showOnIntersect?!1:s.config.tooltip.shared,e:t}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(r=T-w.left+15,n=_()):(r=P(r),n=t.clientY-w.top-a.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?(r=v,a.xyRatios&&r0&&a.setAttribute("width",String(i.xcrosshairsWidth))}handleYCrosshair(){let 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){let i=this.ttCtx,a=this.w,o=a.globals,r=o.seriesYAxisMap[t];if(i.yaxisTooltips[t]&&r.length>0){let n=a.formatters.yLabelFormatters[t],c=i.getElGrid();if(!c)return;let l=c.getBoundingClientRect(),h=r[0],d=0;s.yRatio.length>1&&(d=h);let g=(e-l.top)*s.yRatio[d],p=o.maxYArr[h]-o.minYArr[h],f=o.minYArr[h]+(p-g);a.config.yaxis[t].reversed&&(f=o.maxYArr[h]-(p-g)),i.tooltipPosition.moveYCrosshairs(e-l.top),i.yaxisTooltipText[t].innerHTML=n(f),i.tooltipPosition.moveYAxisTooltip(t)}}},Xe=class{constructor(t,e){this.w=t,this.ctx=e,this.tConfig=t.config.tooltip,this.tooltipUtil=new qt(this),this.tooltipLabels=new Pe(this),this.tooltipPosition=new Zt(this),this.marker=new Ee(this),this.intersect=new Re(this),this.axesTooltip=new Fe(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(){let t=this.w,e=this.getElTooltip();e&&(this.updateDimensionCache(),typeof ResizeObserver<"u"&&!t.globals.resizeObserver&&(t.globals.resizeObserver=new ResizeObserver(()=>{this.dimensionUpdateScheduled||(this.dimensionUpdateScheduled=!0,requestAnimationFrame(()=>{this.updateDimensionCache(),this.dimensionUpdateScheduled=!1}))}),t.globals.resizeObserver.observe(e)))}updateDimensionCache(){let t=this.w,e=this.getElTooltip();if(!e)return;let s=e.getBoundingClientRect();t.globals.dimensionCache.tooltip={width:s.width,height:s.height,lastUpdate:Date.now()}}getCachedDimensions(){let t=this.w;if(t.globals.dimensionCache.tooltip){let s=t.globals.dimensionCache.tooltip;if(Date.now()-s.lastUpdate<1e3)return{ttWidth:s.width,ttHeight:s.height}}this.updateDimensionCache();let e=t.globals.dimensionCache.tooltip;return e?{ttWidth:e.width,ttHeight:e.height}:{ttWidth:0,ttHeight:0}}getElTooltip(t){return t||(t=this),t.w.dom.baseEl?t.w.dom.baseEl.querySelector(".apexcharts-tooltip"):null}getElXCrosshairs(){return this.w.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}getElGrid(){return this.w.dom.baseEl.querySelector(".apexcharts-grid")}drawTooltip(t){let e=this.w;this.xyRatios=t,this.isXAxisTooltipEnabled=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.yaxisTooltips=e.config.yaxis.map(n=>!!(n.show&&n.tooltip.enabled&&e.globals.axisCharts)),this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);let s=this.getElTooltip();s?.parentNode&&s.parentNode.removeChild(s),this.tooltipTitle=null;let i=I.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.style&&this.tConfig.style.background&&i.style.setProperty("--apx-tt-bg",this.tConfig.style.background);let a=this.tConfig.shared&&e.config.series.length>1&&!e.globals.isBarHorizontal;if(this.tConfig.arrow&&!this.tConfig.followCursor&&!this.tConfig.fixed.enabled&&!a&&!this.tConfig.fillSeriesColor&&e.globals.axisCharts){let n=I.createElementNS("http://www.w3.org/1999/xhtml","div");n.classList.add("apexcharts-tooltip-arrow"),i.appendChild(n)}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();let n=new St(this.w,this.ctx,void 0);this.xAxisTicksPositions=n.getXAxisTicksPositions()}if((e.globals.comboCharts||this.tConfig.intersect||e.config.chart.type==="rangeBar")&&!this.tConfig.shared&&(this.showOnIntersect=!0),(e.config.markers.size===0||e.globals.markers.largestSize===0)&&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=I.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&&(this.showOnIntersect?r=1:r=e.seriesData.series.length),this.legendLabels=e.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(r),this.addSVGEvents(),this.setupDimensionCache()}createTTElements(t){let e=this.w,s=[],i=this.getElTooltip();if(!i)return s;for(let a=0;a{let d=I.createElementNS("http://www.w3.org/1999/xhtml","div");d.classList.add(`apexcharts-tooltip-${h}-group`);let g=I.createElementNS("http://www.w3.org/1999/xhtml","span");g.classList.add(`apexcharts-tooltip-text-${h}-label`),d.appendChild(g);let p=I.createElementNS("http://www.w3.org/1999/xhtml","span");p.classList.add(`apexcharts-tooltip-text-${h}-value`),d.appendChild(p),l.appendChild(d)}),o.appendChild(l),i.appendChild(o),s.push(o)}return s}addSVGEvents(){let t=this.w,e=t.config.chart.type,s=this.getElTooltip();if(!s)return;let i=e==="bar"||e==="candlestick"||e==="boxPlot"||e==="rangeBar",a=e==="area"||e==="line"||e==="scatter"||e==="bubble"||e==="radar",o=t.dom.Paper.node,r=this.getElGrid();r&&(this.seriesBound=r.getBoundingClientRect());let n=[],c=[],l={hoverArea:o,elGrid:r,tooltipEl:s,tooltipY:n,tooltipX:c,ttItems:this.ttItems},h;if(t.globals.axisCharts&&(a?h=t.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):i?h=t.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-rangebar-area"):(e==="heatmap"||e==="treemap")&&(h=t.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap")),h&&h.length))for(let g=0;g0&&this.addPathsEventListeners(g,l),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(l)}}drawFixedTooltipRect(){let t=this.w,e=this.getElTooltip();if(!e)return{x:0,y:0,ttWidth:0,ttHeight:0};let s=e.getBoundingClientRect(),i=s.width+10,a=s.height+10,o=this.tConfig.fixed.offsetX,r=this.tConfig.fixed.offsetY,n=this.tConfig.fixed.position.toLowerCase();return n.indexOf("right")>-1&&(o=o+t.globals.svgWidth-i+10),n.indexOf("bottom")>-1&&(r=r+t.globals.svgHeight-a-10),this.tooltipPosition.applyTooltipPosition(e,{x:o,y:r}),{x:o,y:r,ttWidth:i,ttHeight:a}}addDatapointEventsListeners(t){let s=this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(s,t)}addPathsEventListeners(t,e){let s=this;for(let i=0;it[i].addEventListener(r,s.onSeriesHover.bind(s,a),{capture:!1,passive:!0}))}}onSeriesHover(t,e){let i=Date.now()-this.lastHoverTime;i>=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(()=>{this.seriesHover(t,e)},20-i))}seriesHover(t,e){this.lastHoverTime=Date.now();let s=[],i=this.w;i.config.chart.group&&(s=this.ctx.getGroupedCharts()),!(i.globals.axisCharts&&(i.globals.minX===-1/0&&i.globals.maxX===1/0||i.globals.dataPoints===0))&&(s.length?s.forEach(a=>{let o=this.getElTooltip(a),r={paths:t.paths,tooltipEl:o,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:a.w.globals.tooltip.ttItems};a.w.globals.minX===this.w.globals.minX&&a.w.globals.maxX===this.w.globals.maxX&&a.w.globals.tooltip.seriesHoverByContext({chartCtx:a,ttCtx:a.w.globals.tooltip,opt:r,e})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e}))}seriesHoverByContext({chartCtx:t,ttCtx:e,opt:s,e:i}){let a=t.w;if(!this.getElTooltip(t))return;let r=e.getCachedDimensions();e.tooltipRect={x:0,y:0,ttWidth:r.ttWidth,ttHeight:r.ttHeight},e.e=i,e.tooltipUtil.hasBars()&&!a.globals.comboCharts&&!e.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new Z(t.w).toggleSeriesOnHover(i,i.target.parentNode),a.globals.axisCharts?e.axisChartsTooltips({e:i,opt:s,tooltipRect:e.tooltipRect}):e.nonAxisChartsTooltips({e:i,opt:s,tooltipRect:e.tooltipRect}),e.fixedTooltip&&e.drawFixedTooltipRect()}axisChartsTooltips({e:t,opt:e}){var s;let i=this.w,a,o,r=e.elGrid.getBoundingClientRect(),n=t.type==="touchmove"?t.touches[0].clientX:t.clientX,c=t.type==="touchmove"?t.touches[0].clientY:t.clientY;if(this.clientY=c,this.clientX=n,i.interact.capturedSeriesIndex=-1,i.interact.capturedDataPointIndex=-1,cr.top+r.height){this.handleMouseOut(e);return}if(Array.isArray(this.tConfig.enabledOnSeries)&&!i.config.tooltip.shared){let p=parseInt(e.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(p)<0){this.handleMouseOut(e);return}}let l=this.getElTooltip();if(!l)return;let h=this.getElXCrosshairs(),d=[];i.config.chart.group&&(d=this.ctx.getSyncedCharts());let g=i.globals.xyCharts||i.config.chart.type==="bar"&&!i.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||i.globals.comboCharts&&this.tooltipUtil.hasBars();if(t.type==="mousemove"||t.type==="touchmove"||t.type==="mouseup"){if(i.globals.collapsedSeries.length+i.globals.ancillaryCollapsedSeries.length===i.seriesData.series.length)return;h!==null&&h.classList.add("apexcharts-active");let p=(s=this.yaxisTooltips)==null?void 0:s.filter(u=>u===!0),f=this.ycrosshairs;if(f!==null&&p?.length&&f.classList.add("apexcharts-active"),g&&!this.showOnIntersect||d.length>1)this.handleStickyTooltip(t,n,c,e);else if(i.config.chart.type==="heatmap"||i.config.chart.type==="treemap"){let u=this.intersect.handleHeatTreeTooltip({e:t,opt:e,x:a,y:o,type:i.config.chart.type});a=u.x,o=u.y,l.style.left=a+"px",l.style.top=o+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:t,opt:e}),this.tooltipUtil.hasMarkers(0)&&this.intersect.handleMarkerTooltip({e:t,opt:e,x:a,y:o});if(this.yaxisTooltips&&this.yaxisTooltips.length)for(let u=0;u{let g=d.getAttribute("data:default-text");d.innerHTML=decodeURIComponent(g??"")})))}handleStickyTooltip(t,e,s,i){let a=this.w,o=this.tooltipUtil.getNearestValues({context:this,hoverArea:i.hoverArea,elGrid:i.elGrid,clientX:e,clientY:s}),r=o.j,n=o.capturedSeries;n!==null&&a.globals.collapsedSeriesIndices.includes(n??-1)&&(n=null);let c=i.elGrid.getBoundingClientRect();if(o.hoverX<0||o.hoverX>c.width){this.handleMouseOut(i);return}if(n!==null)this.handleStickyCapturedSeries(t,n??-1,i,r??0);else if(this.tooltipUtil.isXoverlap(r??0)||a.globals.isBarHorizontal){let l=a.seriesData.series.findIndex((h,d)=>!a.globals.collapsedSeriesIndices.includes(d));this.create(t,this,l,r??0,i.ttItems)}}handleStickyCapturedSeries(t,e,s,i){let a=this.w;if(!this.tConfig.shared&&a.seriesData.series[e][i]===null){this.handleMouseOut(s);return}if(typeof a.seriesData.series[e][i]<"u")this.tConfig.shared&&this.tooltipUtil.isXoverlap(i)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,i,s.ttItems):this.create(t,this,e,i,s.ttItems,!1);else if(this.tooltipUtil.isXoverlap(i)){let o=a.seriesData.series.findIndex((r,n)=>!a.globals.collapsedSeriesIndices.includes(n));this.create(t,this,o,i,s.ttItems)}}deactivateHoverFilter(){let t=this.w,e=new F(this.w,this.ctx),s=t.dom.Paper.find(".apexcharts-bar-area");for(let i=0;i{let n=r.getAttribute("data:default-text");r.innerHTML=decodeURIComponent(n??"")}))}markerClick(t,e,s){let i=this.w;typeof i.config.chart.events.markerClick=="function"&&i.config.chart.events.markerClick(t,this.ctx,{seriesIndex:e,dataPointIndex:s,w:i}),this.ctx.events.fireEvent("markerClick",[t,this.ctx,{seriesIndex:e,dataPointIndex:s,w:i}])}create(t,e,s,i,a,o=null){var r,n,c,l,h,d,g,p,f,u,b,x,w,m,y,v,C,k,S;let L=this.w,D=e;t.type==="mouseup"&&this.markerClick(t,s,i),o===null&&(o=this.tConfig.shared);let T=this.tooltipUtil.hasMarkers(s),E=this.tooltipUtil.getElBars(),R=()=>{L.globals.markers.largestSize>0?D.marker.enlargePoints(i):D.tooltipPosition.moveDynamicPointsOnHover(i)};if(L.config.legend.tooltipHoverFormatter){let X=L.config.legend.tooltipHoverFormatter,z=Array.from((r=this.legendLabels)!=null?r:[]);z.forEach(Y=>{let H=Y.getAttribute("data:default-text");Y.innerHTML=decodeURIComponent(H??"")});for(let Y=0;Y0)){let X=new F(this.w,this.ctx),z=L.dom.Paper.find(`.apexcharts-bar-area[j='${i}']`);this.deactivateHoverFilter(),D.tooltipUtil.getAllMarkers(!0).length&&!this.barSeriesHeight&&R(),D.tooltipPosition.moveStickyTooltipOverBars(i,s);for(let H=0;He.instance||new kt(e))}findOne(t){let e=this.node.querySelector(t);return e?e.instance||new kt(e):null}on(t,e){let 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)this._listeners.forEach(s=>{this.node.removeEventListener(s.eventType,s.handler)}),this._listeners=[];else if(t&&!e){let s=t.split(".")[0];this._listeners=this._listeners.filter(i=>i.eventType===s?(this.node.removeEventListener(i.eventType,i.handler),!1):!0)}else{let s=t.split(".")[0];this._listeners=this._listeners.filter(i=>i.eventType===s&&i.handler===e?(this.node.removeEventListener(i.eventType,i.handler),!1):!0)}return this}each(t,e){return Array.from(this.node.children).forEach(i=>{let a=i.instance||new kt(i);t.call(a),e&&a.each(t,e)}),this}removeClass(t){return t==="*"?this.node.removeAttribute("class"):this.node.classList.remove(t),this}children(){return Array.from(this.node.childNodes).filter(t=>t.nodeType===1).map(t=>t.instance||new kt(t))}hide(){return this.node.style.display="none",this}show(){return this.node.style.display="",this}bbox(){if(typeof this.node.getBBox=="function")try{return this.node.getBBox()}catch{}return{x:0,y:0,width:0,height:0}}tspan(t){let e=I.createElementNS("http://www.w3.org/2000/svg","tspan");return e.textContent=t,this.node.appendChild(e),new kt(e)}plot(t){return typeof t=="string"&&this.attr("d",t),this}animate(){throw new Error("Animation module not loaded")}filterWith(){throw new Error("Filter module not loaded")}unfilter(t){return this._filter&&(this.node.removeAttribute("filter"),t&&this._filter.node&&this._filter.node.parentNode&&this._filter.node.parentNode.removeChild(this._filter.node),this._filter=null),this}filterer(){return this._filter}},Us=0,_e=class extends st{constructor(t,e,s){let i=e==="radial"?"radialGradient":"linearGradient",a=I.createElementNS(U,i);super(a),this._id="SvgjsGradient"+ ++Us,this.attr("id",this._id),typeof s=="function"&&s(new Ye(this));let o=t.node.querySelector("defs");o||(o=I.createElementNS(U,"defs"),t.node.appendChild(o)),o.appendChild(this.node)}stop(t,e,s){let i=I.createElementNS(U,"stop");return i.setAttribute("offset",t),i.setAttribute("stop-color",e),s!==void 0&&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()}},Ye=class{constructor(t){this.gradient=t}stop(t,e,s){return this.gradient.stop(t,e,s),this}},qs=0,Ie=class extends st{constructor(t,e,s,i){let a=I.createElementNS(U,"pattern");if(super(a),this._id="SvgjsPattern"+ ++qs,this.attr({id:this._id,width:e,height:s,patternUnits:"userSpaceOnUse"}),typeof i=="function"){let r=new zt(this.node);i(r)}let o=t.node.querySelector("defs");o||(o=I.createElementNS(U,"defs"),t.node.appendChild(o)),o.appendChild(this.node)}url(){return"url(#"+this._id+")"}toString(){return this.url()}valueOf(){return this.url()}fill(){return this.url()}},zt=class A extends st{line(t,e,s,i){let a=this._make("line");return t!==void 0&&a.attr({x1:t,y1:e,x2:s,y2:i}),a}rect(t,e){let s=this._make("rect");return t!==void 0&&s.attr({width:t,height:e}),s}circle(t){let e=this._make("circle");return t!==void 0&&e.attr({r:t/2,cx:t/2,cy:t/2}),e}path(t){let e=this._make("path");return t&&e.attr("d",t),e}polygon(t){let e=this._make("polygon");return t&&e.attr("points",t),e}group(){return this._makeContainer("g")}defs(){return this._makeContainer("defs")}plain(t){let e=I.createElementNS(U,"text");e.textContent=t;let s=new st(e);return this.node.appendChild(e),s}text(t){let e=I.createElementNS(U,"text"),s=new st(e);return this.node.appendChild(e),typeof t=="function"&&t(new Ne(e)),s}image(t,e){let s=I.createElementNS(U,"image");s.setAttributeNS("http://www.w3.org/1999/xlink","href",t);let i=new st(s);if(this.node.appendChild(s),typeof e=="function"){let a=new Image;a.onload=function(){i.size(a.width,a.height),e.call(i,{width:a.width,height:a.height})},a.src=t}return i}gradient(t,e){return new _e(this,t,e)}pattern(t,e,s){return new Ie(this,t,e,s)}_make(t){let e=I.createElementNS(U,t);return this.node.appendChild(e),new st(e)}_makeContainer(t){let e=I.createElementNS(U,t);return this.node.appendChild(e),new A(e)}},Ne=class{constructor(t){this.textNode=t}tspan(t){let e=I.createElementNS(U,"tspan");return e.textContent=t,this.textNode.appendChild(e),new Be(e,this.textNode)}},Be=class{constructor(t,e){this.node=t,this.textNode=e}newLine(){return this.node.setAttribute("dy","1.1em"),this.node.dataset.newline="1",this}},Zs=0,Oe=class extends st{constructor(){let t=I.createElementNS(U,"filter");super(t),this._id="SvgjsFilter"+ ++Zs,this.attr("id",this._id)}size(t,e,s,i){return this.attr({width:t,height:e,x:s,y:i})}},ze=class{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){let e=I.createElementNS(U,"feMerge");return t.forEach(s=>{let i=I.createElementNS(U,"feMergeNode");i.setAttribute("in",s),e.appendChild(i)}),this.filter.node.appendChild(e),new st(e)}_primitive(t,e){let s=I.createElementNS(U,t);for(let i in e)s.setAttribute(i,e[i]);return this.filter.node.appendChild(s),new st(s)}};function js(A){A.prototype.filterWith=function(t){let e=new Oe;this._filter=e;let s=this.node;for(;s&&s.nodeName!=="svg";)s=s.parentNode;if(s){let i=s.querySelector("defs");i||(i=I.createElementNS(U,"defs"),s.insertBefore(i,s.firstChild)),i.appendChild(e.node)}return t(new ze(e)),this.attr("filter","url(#"+e._id+")"),this},A.prototype.unfilter=function(t){return this._filter&&(this.node.removeAttribute("filter"),t&&this._filter.node&&this._filter.node.parentNode&&this._filter.node.parentNode.removeChild(this._filter.node),this._filter=null),this},A.prototype.filterer=function(){return this._filter}}function gs(A){if(!A||typeof A!="string")return[["M",0,0]];let t=[],e=/([MmLlHhVvCcSsQqTtAaZz])\s*/g,s=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi,i,a=[],o=[];for(;(i=e.exec(A))!==null;)a.push(i[1]),o.push(i.index);for(let r=0;r{for(let o=1;os&&(s=r),ni&&(i=n))}}),t===1/0?{x:0,y:0,width:0,height:0}:{x:t,y:e,width:s-t,height:i-e}}function Ks(A){return A.map(t=>t.join(" ")).join(" ")}function ps(A){switch(A[0]){case"z":case"Z":A[0]="L",A[1]=this.start[0],A[2]=this.start[1];break;case"H":A[0]="L",A[2]=this.pos[1];break;case"V":A[0]="L",A[2]=A[1],A[1]=this.pos[0];break;case"T":A[0]="Q",A[3]=A[1],A[4]=A[2],A[1]=this.reflection[1],A[2]=this.reflection[0];break;case"S":A[0]="C",A[6]=A[4],A[5]=A[3],A[4]=A[2],A[3]=A[1],A[2]=this.reflection[1],A[1]=this.reflection[0];break}return A}function us(A){var t=A.length;return this.pos=[A[t-2],A[t-1]],"SCQT".indexOf(A[0])!=-1&&(this.reflection=[2*this.pos[0]-A[t-4],2*this.pos[1]-A[t-3]]),A}function xs(A){var t,e=[A];switch(A[0]){case"M":return this.pos=this.start=[A[1],A[2]],e;case"L":A[5]=A[3]=A[1],A[6]=A[4]=A[2],A[1]=this.pos[0],A[2]=this.pos[1];break;case"Q":A[6]=A[4],A[5]=A[3],A[4]=A[4]*1/3+A[2]*2/3,A[3]=A[3]*1/3+A[1]*2/3,A[2]=this.pos[1]*1/3+A[2]*2/3,A[1]=this.pos[0]*1/3+A[1]*2/3;break;case"A":e=Js((t=this.pos)!=null?t:[],A),A=e[0];break}return A[0]="C",this.pos=[A[5],A[6]],this.reflection=[2*A[5]-A[3],2*A[6]-A[4]],e}function bs(A,t){if(t===!1)return!1;for(var e=t,s=A.length;e1&&(d=Math.sqrt(d),e=d*e,s=d*s),g=new _t(0,0,0,0,0,0).rotate(i).scale(1/e,1/s).rotate(-i),c=c.transform(g),l=l.transform(g),p=[l.x-c.x,l.y-c.y],u=p[0]*p[0]+p[1]*p[1],f=Math.sqrt(u),p[0]/=f,p[1]/=f,b=u<4?Math.sqrt(1-u/4):0,a===o&&(b*=-1),x=new ot((l.x+c.x)/2+b*-p[1],(l.y+c.y)/2+b*p[0]),w=new ot(c.x-x.x,c.y-x.y),m=new ot(l.x-x.x,l.y-x.y),y=Math.acos(w.x/Math.sqrt(w.x*w.x+w.y*w.y)),w.y<0&&(y*=-1),v=Math.acos(m.x/Math.sqrt(m.x*m.x+m.y*m.y)),m.y<0&&(v*=-1),o&&y>v&&(v+=2*Math.PI),!o&&y>16&255,s>>8&255,s&255,1]}let t=A.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/);return t?[+t[1],+t[2],+t[3],t[4]!==void 0?+t[4]:1]:null}function ii(A,t,e){return`rgba(${Math.round(A[0]+(t[0]-A[0])*e)},${Math.round(A[1]+(t[1]-A[1])*e)},${Math.round(A[2]+(t[2]-A[2])*e)},${A[3]+(t[3]-A[3])*e})`}var He=class A{constructor(t,e,s){this.el=t,this.duration=e??300,this.delay=s||0,this._attrTarget=null,this._plotTarget=null,this._afterCb=null,this._duringCb=null,this._next=null,this._root=null,this._scheduled=!1}attr(t){return this._attrTarget=t,this._schedule(),this}plot(t){return this._plotTarget=t,this._schedule(),this}after(t){return this._afterCb=t,this._schedule(),this}during(t){return this._duringCb=t,this._schedule(),this}animate(t,e){let s=new A(this.el,t,e);return this._next=s,s._root=this._root||this,s}_schedule(){let t=this._root||this;t._scheduled||(t._scheduled=!0,queueMicrotask(()=>t._executeChain()))}_executeChain(){let t=[],e=this;for(;e;)t.push(e),e=e._next;let s=0;t.forEach(i=>{s+=i.delay,i._execute(s),s+=i.duration})}_execute(t){let e=this.el,s=this.duration;if(s<=1){let a=()=>{this._attrTarget&&e.attr(this._attrTarget),this._plotTarget&&e.plot(this._plotTarget),this._afterCb&&this._afterCb.call(e)};t>0?setTimeout(a,t):a();return}let i=()=>{let a={},o={},r={};if(this._attrTarget)for(let h of Object.keys(this._attrTarget)){let d=e.attr(h);a[h]=d;let g=ms(d),p=ms(String(this._attrTarget[h]));g&&p&&(o[h]=g,r[h]=p)}let n=null;if(this._plotTarget){let h=e.attr("d")||"";try{n=ei(h,this._plotTarget)}catch{n=null}}let c=performance.now(),l=h=>{let d=h-c,g=Math.min(d/s,1),p=si(g);if(this._attrTarget)if(g>=1)e.attr(this._attrTarget);else{let f={};for(let u of Object.keys(this._attrTarget))if(o[u]&&r[u])f[u]=ii(o[u],r[u],p);else{let b=parseFloat(a[u]),x=parseFloat(this._attrTarget[u]);!isNaN(b)&&!isNaN(x)&&(f[u]=b+(x-b)*p)}e.attr(f)}n&&g<1&&e.attr("d",n(p)),this._duringCb&&this._duringCb(p),g<1?I.requestAnimationFrame(l):(this._plotTarget&&e.attr("d",this._plotTarget),this._afterCb&&this._afterCb.call(e))};I.requestAnimationFrame(l)};t>0?setTimeout(i,t):i()}};function ai(A){A.prototype.animate=function(t,e){return new He(this,t,e)}}function oi(A){A.prototype.draggable=function(t){if(t===!1)return this._dragCleanup&&(this._dragCleanup(),this._dragCleanup=null),this;let e=this,s=t||{},i=a=>{if(a.button&&a.button!==0)return;a.stopPropagation();let r=a.type==="touchstart"?a.touches[0]:a,n=e.node,c=parseFloat(n.getAttribute("x"))||0,l=parseFloat(n.getAttribute("y"))||0,h=r.clientX,d=r.clientY,g=n.ownerSVGElement,p=null;g&&(p=g.getScreenCTM());let f=b=>{let x=b.type==="touchmove"?b.touches[0]:b,w=x.clientX-h,m=x.clientY-d;p&&(w=w/p.a,m=m/p.d);let y=c+w,v=l+m,C=parseFloat(n.getAttribute("width"))||0,k=parseFloat(n.getAttribute("height"))||0;s.minX!==void 0&&ys.maxX&&(y=s.maxX-C),s.maxY!==void 0&&v+k>s.maxY&&(v=s.maxY-k);let S={x:y,y:v,w:C,h:k,x2:y+C,y2:v+k},L=new CustomEvent("dragmove",{detail:{handler:{move:function(D,T){n.setAttribute("x",D),n.setAttribute("y",T)}},box:S}});n.dispatchEvent(L)},u=()=>{N.isBrowser()&&(document.removeEventListener("mousemove",f),document.removeEventListener("touchmove",f),document.removeEventListener("mouseup",u),document.removeEventListener("touchend",u))};N.isBrowser()&&(document.addEventListener("mousemove",f),document.addEventListener("touchmove",f),document.addEventListener("mouseup",u),document.addEventListener("touchend",u))};return e.node.addEventListener("mousedown",i),e.node.addEventListener("touchstart",i),e._dragCleanup=()=>{e.node.removeEventListener("mousedown",i),e.node.removeEventListener("touchstart",i)},e}}function ri(A){A.prototype.select=function(t){if(t===!1)return this._selectCleanup&&(this._selectCleanup(),this._selectCleanup=null),this;let e=this,{createHandle:s,updateHandle:i}=t,a=document.createElementNS(U,"g");a.setAttribute("class","svg_select_points");let o=e.node.parentNode;o&&o.appendChild(a);let r={},n=["t","b","l","r","lt","rt","lb","rb"];n.forEach((l,h)=>{let d=new zt(document.createElementNS(U,"g"));a.appendChild(d.node);let g=s(d,[0,0],h,[],l);r[l]={group:d,handle:g}});let c=()=>{let l=parseFloat(e.attr("x"))||0,h=parseFloat(e.attr("y"))||0,d=parseFloat(e.attr("width"))||0,g=parseFloat(e.attr("height"))||0,p=e.node.getAttribute("transform");p?a.setAttribute("transform",p):a.removeAttribute("transform");let f={t:[l+d/2,h],b:[l+d/2,h+g],l:[l,h+g/2],r:[l+d,h+g/2],lt:[l,h],rt:[l+d,h],lb:[l,h+g],rb:[l+d,h+g]};n.forEach(u=>{r[u]&&f[u]&&i(r[u].group,f[u])})};return c(),e._selectHandles=a,e._selectHandlesMap=r,e._updateSelectPositions=c,e._selectCleanup=()=>{a.parentNode&&a.parentNode.removeChild(a),e._selectHandles=null,e._selectHandlesMap=null,e._updateSelectPositions=null},e},A.prototype.resize=function(t){if(t===!1)return this._resizeCleanup&&(this._resizeCleanup(),this._resizeCleanup=null),this;let e=this,s=e._selectHandlesMap;if(!s)return e;let i=[],a=o=>{let r=s[o];if(!r||!r.group||!r.group.node)return;let n=r.group.node,c=l=>{if(l.button&&l.button!==0)return;l.stopPropagation();let g=(l.type==="touchstart"?l.touches[0]:l).clientX,p=e.node.ownerSVGElement,f=null;p&&(f=p.getScreenCTM());let u=parseFloat(e.attr("x"))||0,b=parseFloat(e.attr("width"))||0,x=m=>{let v=(m.type==="touchmove"?m.touches[0]:m).clientX-g;f&&(v=v/f.a);let C=u,k=b;o==="l"?(C=u+v,k=b-v):o==="r"&&(k=b+v),k<0&&(k=0),e.attr({x:C,width:k}),e._updateSelectPositions&&e._updateSelectPositions();let S=new CustomEvent("resize",{detail:{el:e}});e.node.dispatchEvent(S)},w=()=>{N.isBrowser()&&(document.removeEventListener("mousemove",x),document.removeEventListener("touchmove",x),document.removeEventListener("mouseup",w),document.removeEventListener("touchend",w));let m=new CustomEvent("resize",{detail:{el:e}});e.node.dispatchEvent(m)};N.isBrowser()&&(document.addEventListener("mousemove",x),document.addEventListener("touchmove",x),document.addEventListener("mouseup",w),document.addEventListener("touchend",w))};n.addEventListener("mousedown",c),n.addEventListener("touchstart",c),i.push(()=>{n.removeEventListener("mousedown",c),n.removeEventListener("touchstart",c)})};return a("l"),a("r"),e._resizeCleanup=()=>{i.forEach(o=>o())},e}}js(st);ai(st);oi(st);ri(st);function jt(){let A=I.createElementNS(U,"svg"),t=new zt(A);return t.attr({xmlns:U}),t}jt.xlink="http://www.w3.org/1999/xlink";N.isBrowser()&&typeof window.SVG>"u"&&(window.SVG=jt);N.isBrowser()?(typeof window.SVG>"u"&&(window.SVG=jt),typeof window.Apex>"u"&&(window.Apex={})):typeof global<"u"&&(typeof global.Apex>"u"&&(global.Apex={}),typeof global.SVG>"u"&&(global.SVG=jt));var Ps=class We{static registerFeatures(t){for(let[e,s]of Object.entries(t))We._featureRegistry.set(e,s)}constructor(t){this.ctx=t,this.w=t.w}initModules(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","isSeriesHidden","highlightSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","exportToCSV","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend","keydown","keyup"],this.ctx.animations=new ft(this.w,this.ctx),this.ctx.axes=new ye(this.w,this.ctx),this.ctx.core=new Me(this.ctx.el,this.w,this.ctx),this.ctx.config=new Ct({}),this.ctx.data=new Ot(this.w,{resetGlobals:()=>this.ctx.core.resetGlobals(),isMultipleY:()=>this.ctx.core.isMultipleY()}),this.ctx.grid=new Vt(this.w,this.ctx),this.ctx.graphics=new F(this.w,this.ctx),this.ctx.coreUtils=new q(this.w),this.ctx.crosshairs=new Bt(this.w),this.ctx.events=new be(this.w,this.ctx),this.ctx.fill=new it(this.w),this.ctx.localization=new me(this.w),this.ctx.options=new ht,this.ctx.responsive=new we(this.w),this.ctx.series=new Z(this.w,{toggleDataSeries:(...e)=>{var s;return(s=this.ctx.legend)==null?void 0:s.legendHelpers.toggleDataSeries(...e)},revertDefaultAxisMinMax:()=>this.ctx.updateHelpers.revertDefaultAxisMinMax(),updateSeries:(...e)=>this.ctx.updateHelpers._updateSeries(...e)}),this.ctx.theme=new ve(this.w),this.ctx.formatters=new vt(this.w),this.ctx.titleSubtitle=new Ae(this.w),this.ctx.dimensions=new Dt(this.w,this.ctx),this.ctx.updateHelpers=new Te(this.w,this.ctx);let t=new Xe(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(){let t=We._featureRegistry,e=this.w,s=this.ctx,i=t.get("exports");s.exports=i?new i(e,s):null;let a=t.get("legend");s.legend=a?new a(e,s):null;let o=t.get("toolbar");Object.defineProperty(s,"toolbar",{get(){var c;return!this._toolbar&&o&&(this._toolbar=new o(e,this)),(c=this._toolbar)!=null?c:null},configurable:!0});let r=t.get("zoomPanSelection");Object.defineProperty(s,"zoomPanSelection",{get(){var c;return!this._zoomPanSelection&&r&&(this._zoomPanSelection=new r(e,this)),(c=this._zoomPanSelection)!=null?c:null},configurable:!0});let n=t.get("keyboardNavigation");Object.defineProperty(s,"keyboardNavigation",{get(){var c;return!this._keyboardNavigation&&n&&(this._keyboardNavigation=new n(e,this)),(c=this._keyboardNavigation)!=null?c:null},configurable:!0})}};V(Ps,"_featureRegistry",new Map);var Ht=Ps,Kt=class{constructor(t){this.ctx=t,this.w=t.w}clear({isUpdating:t}){this.ctx._zoomPanSelection&&this.ctx._zoomPanSelection.destroy(),this.ctx._toolbar&&this.ctx._toolbar.destroy(),this.w.globals.resizeObserver&&typeof this.w.globals.resizeObserver.disconnect=="function"&&(this.w.globals.resizeObserver.disconnect(),this.w.globals.resizeObserver=null),Yt.invalidateAll(this.w),t?(this.ctx._zoomPanSelection=null,this.ctx._toolbar=null,this.ctx._keyboardNavigation=null):(this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx._zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx._toolbar=null,this.ctx.localization=null,this.ctx._keyboardNavigation=null,this.ctx.w.globals.tooltip=null),this.clearDomElements({isUpdating:t})}killSVG(t){t.each(function(){this.removeClass("*"),this.off()},!0),t.clear()}clearDomElements({isUpdating:t}){let e=this.w.dom;if(N.isBrowser()){let s=e.Paper.node;s.parentNode&&s.parentNode.parentNode&&!t&&(s.parentNode.parentNode.style.minHeight="unset");let i=e.baseEl;if(i&&this.ctx.eventList.forEach(a=>{i.removeEventListener(a,this.ctx.events.documentEvent)}),this.ctx.el!==null)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(e.Paper),e.Paper.remove()}e.elWrap=null,e.elGraphical=null,e.elLegendWrap=null,e.elLegendForeign=null,e.baseEl=null,e.elGridRect=null,e.elGridRectMask=null,e.elGridRectBarMask=null,e.elGridRectMarkerMask=null,e.elForecastMask=null,e.elNonForecastMask=null,e.elDefs=null}},$e=new WeakMap;function ni(A,t){if(N.isSSR())return;let e=!1;if(A.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){let i=A.getBoundingClientRect();(A.style.display==="none"||i.width===0)&&(e=!0)}let s=new ResizeObserver(i=>{e&&t.call(A,i),e=!0});A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(A.children).forEach(i=>s.observe(i)):s.observe(A),$e.set(t,s)}function li(A,t){if(N.isSSR())return;let e=$e.get(t);e&&(e.disconnect(),$e.delete(t))}var ci=`@keyframes opaque { 0% { opacity: 0 } to { opacity: 1 } } @keyframes resizeanim { 0%, to { opacity: 0 } } .apexcharts-canvas { position: relative; direction: ltr !important; user-select: none; /* Focus indicator colour. Themes override below. */ --apexcharts-focus-color: #008FFB; } /* Dark theme & high-contrast: brighter focus colour for sufficient contrast. */ .apexcharts-canvas .apexcharts-theme-dark, .apexcharts-theme-dark.apexcharts-canvas { --apexcharts-focus-color: #FFD500; } .apexcharts-canvas.apexcharts-high-contrast, .apexcharts-high-contrast.apexcharts-canvas { --apexcharts-focus-color: #FFFF00; } /* Visually-hidden aria-live status region (WCAG 4.1.3 Status Messages). */ .apexcharts-sr-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } /* Respect OS-level reduced-motion preference (WCAG 2.3.3). */ @media (prefers-reduced-motion: reduce) { .apexcharts-canvas *, .apexcharts-canvas *::before, .apexcharts-canvas *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } } .apexcharts-canvas ::-webkit-scrollbar { -webkit-appearance: none; width: 6px } .apexcharts-canvas ::-webkit-scrollbar-thumb { border-radius: 4px; background-color: rgba(0, 0, 0, .5); box-shadow: 0 0 1px rgba(255, 255, 255, .5); -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5) } .apexcharts-inner { position: relative } .apexcharts-text tspan { font-family: inherit } rect.legend-mouseover-inactive, .legend-mouseover-inactive rect, .legend-mouseover-inactive path, .legend-mouseover-inactive circle, .legend-mouseover-inactive line, .legend-mouseover-inactive text.apexcharts-yaxis-title-text, .legend-mouseover-inactive text.apexcharts-yaxis-label { transition: .15s ease all; opacity: .2 } .apexcharts-legend-text { padding-left: 15px; margin-left: -15px; } .apexcharts-legend-series[role="button"]:focus { outline: 2px solid var(--apexcharts-focus-color, #008FFB); outline-offset: 2px; } .apexcharts-legend-series[role="button"]:focus:not(:focus-visible) { outline: none; } .apexcharts-legend-series[role="button"]:focus-visible { outline: 2px solid var(--apexcharts-focus-color, #008FFB); outline-offset: 2px; } .apexcharts-series-collapsed { opacity: 0 } .apexcharts-canvas svg:focus:not(:focus-visible) { outline: none; } /* Keyboard navigation focus indicator on SVG data elements. SVG elements don't support CSS outline, so we use stroke. */ .apexcharts-bar-area.apexcharts-keyboard-focused, .apexcharts-candlestick-area.apexcharts-keyboard-focused, .apexcharts-boxPlot-area.apexcharts-keyboard-focused, .apexcharts-rangebar-area.apexcharts-keyboard-focused, .apexcharts-pie-area.apexcharts-keyboard-focused, .apexcharts-heatmap-rect.apexcharts-keyboard-focused, .apexcharts-treemap-rect.apexcharts-keyboard-focused { stroke: var(--apexcharts-focus-color, #008FFB); stroke-width: 2; stroke-opacity: 1; } .apexcharts-tooltip { --apx-tt-bg: #ffffff; --apx-tt-border: rgba(15, 23, 42, 0.06); /* Layered shadow: tight inner contact + soft outer drop. The two Y * offsets are exposed as variables so they flip in sync with the * arrow when the tooltip is below the data point \u2014 see the * \`[data-placement="bottom"]\` rule further down. */ --apx-tt-shadow-y-mid: 8px; --apx-tt-shadow-y-far: 16px; --apx-tt-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04), 0 var(--apx-tt-shadow-y-mid) 16px -6px rgba(15, 23, 42, 0.12), 0 var(--apx-tt-shadow-y-far) 36px -12px rgba(15, 23, 42, 0.18); --apx-tt-arrow-bg: var(--apx-tt-bg); /* Two stacked drop-shadows: the first is a tight contact halo for * edge definition against light chart backgrounds; the second is a * softer directional drop that lifts the arrow off the surface. * \`--apx-tt-arrow-drop-y\` is the Y offset of the directional drop; * a per-placement rule below flips it to negative when the tooltip * is below the data point (arrow on top) so the shadow always * casts outward instead of into the tooltip body. */ --apx-tt-arrow-drop-y: 2px; --apx-tt-arrow-shadow: drop-shadow(0 0 0.5px rgba(15, 23, 42, 0.2)) drop-shadow(0 var(--apx-tt-arrow-drop-y) 4px rgba(15, 23, 42, 0.2)); --apx-tt-color: #0f172a; --apx-tt-color-muted: rgba(15, 23, 42, 0.55); border-radius: 8px; background: var(--apx-tt-bg); border: 1px solid var(--apx-tt-border); box-shadow: var(--apx-tt-shadow); color: var(--apx-tt-color); cursor: default; font-size: 13px; left: 0; top: 0; opacity: 0; pointer-events: none; position: absolute; display: flex; flex-direction: column; padding: 2px 0; white-space: nowrap; z-index: 12; transition: opacity .12s ease } /* While the tooltip is visible, smoothly animate position changes * between data points. Kept short (160 ms) and ease-out so it stays * responsive \u2014 too long would feel laggy when sweeping across many * points fast. The position transition is only attached after the * first paint (Position.applyTooltipPosition flips \`data-positioned\` * once the tooltip has been placed) so the *first* show doesn't slide * the tooltip in from the previously-stale (0,0) coordinates. */ .apexcharts-tooltip.apexcharts-active { opacity: 1; transition: opacity .12s ease } .apexcharts-tooltip.apexcharts-active[data-positioned="true"] { transition: opacity .12s ease, left .16s ease-out, top .16s ease-out } .apexcharts-tooltip.apexcharts-theme-light { /* defaults already set above; class kept for backward-compat selectors */ } .apexcharts-tooltip.apexcharts-theme-dark { --apx-tt-bg: #1c1c1f; --apx-tt-border: rgba(255, 255, 255, 0.08); --apx-tt-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 var(--apx-tt-shadow-y-mid) 16px -6px rgba(0, 0, 0, 0.45), 0 var(--apx-tt-shadow-y-far) 36px -12px rgba(0, 0, 0, 0.55); --apx-tt-arrow-shadow: drop-shadow(0 0 0.5px rgba(0, 0, 0, 0.55)) drop-shadow(0 var(--apx-tt-arrow-drop-y) 4px rgba(0, 0, 0, 0.45)); --apx-tt-color: #f3f4f6; --apx-tt-color-muted: rgba(243, 244, 246, 0.55); } .apexcharts-tooltip * { font-family: inherit } .apexcharts-tooltip-title { padding: 8px 12px 4px; font-size: 12px; font-weight: 600; letter-spacing: 0.01em; color: var(--apx-tt-color-muted); background: transparent; border-bottom: none; margin-bottom: 0 } .apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title, .apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title { background: transparent; border-bottom: none } /* \`fillSeriesColor\`: each series-group already paints itself with the * series colour. Drop the glass body entirely (transparent bg, no * border, no backdrop-filter, no padding) and clip the coloured * series-group(s) to the tooltip's rounded corners so they fill the * shell edge-to-edge. Text inside the coloured group is forced to * white for contrast. */ .apexcharts-tooltip.apexcharts-tooltip-fill-series { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; border: none; padding: 0; overflow: hidden; color: #fff } .apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-title { background: rgba(0, 0, 0, 0.22); color: #fff; opacity: 1; padding: 6px 12px } .apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-series-group { color: #fff } /* Arrow connector \u2014 sits *entirely outside* the tooltip body. Shares * the body's solid fill so it reads as a single shape. \`filter: * drop-shadow\` traces the clipped triangle outline (a regular * \`box-shadow\` would be erased by the \`clip-path\`). */ .apexcharts-tooltip-arrow { position: absolute; width: 7px; height: 14px; background: var(--apx-tt-arrow-bg); /* The variable already contains the full \`drop-shadow(...) ...\` filter * chain (stacked shadows) so it's applied raw. */ -webkit-filter: var(--apx-tt-arrow-shadow); filter: var(--apx-tt-arrow-shadow); pointer-events: none; top: calc(var(--apx-tt-arrow-y, 50%) - 7px) } .apexcharts-tooltip[data-placement="right"] .apexcharts-tooltip-arrow { left: -7px; clip-path: polygon(0 50%, 100% 0, 100% 100%) } .apexcharts-tooltip[data-placement="left"] .apexcharts-tooltip-arrow { right: -7px; clip-path: polygon(100% 50%, 0 0, 0 100%) } /* Vertical arrow variants: tooltip is above/below the data point and the * arrow points down/up. The base rule above uses \`--apx-tt-arrow-y\` for * left/right placement; for top/bottom we re-orient the rectangle and * use \`--apx-tt-arrow-x\` (set by applyTooltipPosition). */ .apexcharts-tooltip[data-placement="top"] .apexcharts-tooltip-arrow, .apexcharts-tooltip[data-placement="bottom"] .apexcharts-tooltip-arrow { width: 14px; height: 7px; top: auto; left: calc(var(--apx-tt-arrow-x, 50%) - 7px) } .apexcharts-tooltip[data-placement="top"] .apexcharts-tooltip-arrow { bottom: -7px; clip-path: polygon(50% 100%, 0 0, 100% 0) } .apexcharts-tooltip[data-placement="bottom"] .apexcharts-tooltip-arrow { top: -7px; clip-path: polygon(50% 0, 0 100%, 100% 100%) } /* When the tooltip is flipped below the data point (arrow on top * pointing up), the default downward-biased shadows leave the top * edge of both the body *and* the arrow undefined. Flipping every * Y offset to negative casts the entire elevation upward so the * shadow falls between the tooltip and the bar above. */ .apexcharts-tooltip[data-placement="bottom"] { --apx-tt-shadow-y-mid: -8px; --apx-tt-shadow-y-far: -16px; --apx-tt-arrow-drop-y: -2px } .apexcharts-tooltip-text-goals-value, .apexcharts-tooltip-text-y-value, .apexcharts-tooltip-text-z-value { display: inline-block; margin-left: 5px; font-weight: 600 } .apexcharts-tooltip-text-goals-label:empty, .apexcharts-tooltip-text-goals-value:empty, .apexcharts-tooltip-text-y-label:empty, .apexcharts-tooltip-text-y-value:empty, .apexcharts-tooltip-text-z-value:empty, .apexcharts-tooltip-title:empty { display: none } .apexcharts-tooltip-text-goals-label, .apexcharts-tooltip-text-goals-value { padding: 6px 0 5px } .apexcharts-tooltip-goals-group, .apexcharts-tooltip-text-goals-label, .apexcharts-tooltip-text-goals-value { display: flex } .apexcharts-tooltip-text-goals-label:not(:empty), .apexcharts-tooltip-text-goals-value:not(:empty) { margin-top: -6px } .apexcharts-tooltip-marker { display: inline-flex; align-items: center; justify-content: center; position: relative; width: 12px; height: 12px; margin-right: 6px; vertical-align: middle; color: inherit; } .apexcharts-tooltip-marker svg { width: 100%; height: 100%; display: block; } .apexcharts-tooltip-series-group { padding: 4px 12px; display: none; gap: 8px; text-align: left; justify-content: left; align-items: center } .apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker { opacity: 1 } .apexcharts-tooltip-series-group.apexcharts-active:last-child, .apexcharts-tooltip-series-group:last-child { padding-bottom: 8px } .apexcharts-tooltip-y-group { padding: 6px 0 5px } .apexcharts-custom-tooltip, .apexcharts-tooltip-box { padding: 4px 8px } .apexcharts-tooltip-boxPlot { display: flex; flex-direction: column-reverse } .apexcharts-tooltip-box>div { margin: 4px 0 } .apexcharts-tooltip-box span.value { font-weight: 700 } .apexcharts-tooltip-rangebar { padding: 5px 8px } .apexcharts-tooltip-rangebar .category { font-weight: 600; color: #777 } .apexcharts-tooltip-rangebar .series-name { font-weight: 700; display: block; margin-bottom: 5px } /* X/Y axis tooltips \u2014 small popovers that label the crosshair on the * axes. Restyled to match the modern data-tooltip palette: solid white * body with a subtle border + soft drop-shadow, smaller font, rounded * corners. The arrows still use the CSS border-triangle technique * (cheap, crisp at small sizes); their colours flow from CSS variables * so light/dark themes only need one override per axis. */ .apexcharts-xaxistooltip, .apexcharts-yaxistooltip { --apx-axt-bg: #ffffff; --apx-axt-border: rgba(15, 23, 42, 0.08); --apx-axt-color: #0f172a; --apx-axt-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.18), 0 1px 3px -1px rgba(15, 23, 42, 0.12); opacity: 0; pointer-events: none; color: var(--apx-axt-color); font-size: 12px; font-weight: 500; text-align: center; border-radius: 6px; position: absolute; z-index: 10; background: var(--apx-axt-bg); border: 1px solid var(--apx-axt-border); box-shadow: var(--apx-axt-shadow) } .apexcharts-xaxistooltip.apexcharts-theme-dark, .apexcharts-yaxistooltip.apexcharts-theme-dark { --apx-axt-bg: #1c1c1f; --apx-axt-border: rgba(255, 255, 255, 0.1); --apx-axt-color: #f3f4f6; --apx-axt-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.55), 0 1px 3px -1px rgba(0, 0, 0, 0.45) } .apexcharts-xaxistooltip { padding: 4px 8px; transition: .15s ease all } .apexcharts-xaxistooltip:after, .apexcharts-xaxistooltip:before { left: 50%; border: solid transparent; content: " "; height: 0; width: 0; position: absolute; pointer-events: none } /* :before paints the 1px border outline of the triangle (slightly larger * than :after); :after sits inside and paints the fill \u2014 leaves a 1px * ring of :before visible at the edges. */ .apexcharts-xaxistooltip:after { border-color: transparent; border-width: 5px; margin-left: -5px } .apexcharts-xaxistooltip:before { border-color: transparent; border-width: 6px; margin-left: -6px } .apexcharts-xaxistooltip-bottom:after, .apexcharts-xaxistooltip-bottom:before { bottom: 100% } .apexcharts-xaxistooltip-top:after, .apexcharts-xaxistooltip-top:before { top: 100% } .apexcharts-xaxistooltip-bottom:after { border-bottom-color: var(--apx-axt-bg) } .apexcharts-xaxistooltip-bottom:before { border-bottom-color: var(--apx-axt-border) } .apexcharts-xaxistooltip-top:after { border-top-color: var(--apx-axt-bg) } .apexcharts-xaxistooltip-top:before { border-top-color: var(--apx-axt-border) } .apexcharts-xaxistooltip.apexcharts-active { opacity: 1; transition: .15s ease all } .apexcharts-yaxistooltip { padding: 3px 8px } .apexcharts-yaxistooltip:after, .apexcharts-yaxistooltip:before { top: 50%; border: solid transparent; content: " "; height: 0; width: 0; position: absolute; pointer-events: none } .apexcharts-yaxistooltip:after { border-color: transparent; border-width: 5px; margin-top: -5px } .apexcharts-yaxistooltip:before { border-color: transparent; border-width: 6px; margin-top: -6px } .apexcharts-yaxistooltip-left:after, .apexcharts-yaxistooltip-left:before { left: 100% } .apexcharts-yaxistooltip-right:after, .apexcharts-yaxistooltip-right:before { right: 100% } .apexcharts-yaxistooltip-left:after { border-left-color: var(--apx-axt-bg) } .apexcharts-yaxistooltip-left:before { border-left-color: var(--apx-axt-border) } .apexcharts-yaxistooltip-right:after { border-right-color: var(--apx-axt-bg) } .apexcharts-yaxistooltip-right:before { border-right-color: var(--apx-axt-border) } .apexcharts-yaxistooltip.apexcharts-active { opacity: 1 } .apexcharts-yaxistooltip-hidden { display: none } .apexcharts-xcrosshairs, .apexcharts-ycrosshairs { pointer-events: none; opacity: 0; transition: .15s ease all } .apexcharts-xcrosshairs.apexcharts-active, .apexcharts-ycrosshairs.apexcharts-active { opacity: 1; transition: .15s ease all } .apexcharts-ycrosshairs-hidden { opacity: 0 } .apexcharts-selection-rect { cursor: move } .svg_select_shape { stroke-width: 1; stroke-dasharray: 10 10; stroke: black; stroke-opacity: 0.1; pointer-events: none; fill: none; } .svg_select_handle { stroke-width: 3; stroke: black; fill: none; } .svg_select_handle_r { cursor: e-resize; } .svg_select_handle_l { cursor: w-resize; } .apexcharts-svg.apexcharts-zoomable.hovering-zoom { cursor: crosshair } .apexcharts-svg.apexcharts-zoomable.hovering-pan { cursor: move } .apexcharts-menu-icon, .apexcharts-pan-icon, .apexcharts-reset-icon, .apexcharts-selection-icon, .apexcharts-toolbar-custom-icon, .apexcharts-zoom-icon, .apexcharts-zoomin-icon, .apexcharts-zoomout-icon { cursor: pointer; /* WCAG 2.5.8 Target Size (Minimum): 24\xD724 CSS px hit target. */ width: 26px; height: 24px; line-height: 24px; color: #6e8192; text-align: center; /* Reset native