vendor: 5,443 bytes, lines 1-4
1var Lt=Object.defineProperty,Pt=Object.defineProperties,Mt=Object.getOwnPropertyDescriptors,je=Object.getOwnPropertySymbols,It=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable,Xe=(x,e,t)=>e in x?Lt(x,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):x[e]=t,R=(x,e)=>{for(var t in e||(e={}))It.call(e,t)&&Xe(x,t,e[t]);if(je)for(var t of je(e))Et.call(e,t)&&Xe(x,t,e[t]);return x},O=(x,e)=>Pt(x,Mt(e)),Tt=(x,e,t)=>Xe(x,e+"",t),Ve=(x,e,t)=>new Promise((s,a)=>{var i=l=>{try{o(t.next(l))}catch(n){a(n)}},r=l=>{try{o(t.throw(l))}catch(n){a(n)}},o=l=>l.done?s(l.value):Promise.resolve(l.value).then(i,r);o((t=t.apply(x,e)).next())});/*! 2 * ApexCharts v5.10.0 3 * (c) 2018-2026 ApexCharts 4 */class z{static isSSR(){return typeof window>"u"||typeof document>"u"}static isBrowser(){return!this.isSSR()}static hasAPI(e){return this.isSSR()?!1:typeof window[e]<"u"}static getApex(){return typeof window<"u"&&window.Apex?window.Apex:typeof global<"u"&&global.Apex?global.Apex:{}}}class De{constructor(e,t=null){this.nodeName=e,this.namespaceURI=t,this.attributes=new Map,this.children=[],this.textContent="",this.style={},this.classList=new Xt,this.parentNode=null}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return e&&e!==this&&(e.parentNode=this,this.children.push(e)),e}removeChild(e){const t=this.children.indexOf(e);return t!==-1&&(this.children.splice(t,1),e.parentNode=null),e}insertBefore(e,t){if(!t)return this.appendChild(e);const s=this.children.indexOf(t);return s!==-1&&(e.parentNode=this,this.children.splice(s,0,e)),e}cloneNode(e=!1){const t=new De(this.nodeName,this.namespaceURI);return t.textContent=this.textContent,this.attributes.forEach((s,a)=>{t.attributes.set(a,s)}),Object.assign(t.style,this.style),e&&this.children.forEach(s=>{s.cloneNode&&t.appendChild(s.cloneNode(!0))}),t}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 e=this;for(;e.parentNode;)e=e.parentNode;return e}querySelector(){return null}querySelectorAll(){return[]}getElementsByClassName(){return[]}addEventListener(){}removeEventListener(){}get childNodes(){return this.children}toString(){let e="";if(this.attributes.forEach((s,a)=>{e+=` ${a}="${s}"`}),this.children.length===0&&!this.textContent)return`<${this.nodeName}${e}/>`;const t=this.children.map(s=>s.toString()).join("");return`<${this.nodeName}${e}>${this.textContent}${t}</${this.nodeName}>`}get innerHTML(){return this.children.map(e=>e.toString()).join("")}set innerHTML(e){this.children=[],this.textContent=e}get outerHTML(){return this.toString()}get isConnected(){return!0}}class Xt{constructor(){this.classes=new Set}add(...e){e.forEach(t=>this.classes.add(t))}remove(...e){e.forEach(t=>this.classes.delete(t))}contains(e){return this.classes.has(e)}toggle(e,t){return t===!0?(this.classes.add(e),!0):t===!1?(this.classes.delete(e),!1):this.classes.has(e)?(this.classes.delete(e),!1):(this.classes.add(e),!0)}toString(){return Array.from(this.classes).join(" ")}}class Ft{constructor(){this.SVGNS="http://www.w3.org/2000/svg",this.XLINKNS="http://www.w3.org/1999/xlink"}createElementNS(e,t){return new De(t,e)}createTextNode(e){return{nodeName:"#text",nodeType:3,textContent:e,toString(){return this.textContent}}}querySelector(){return null}querySelectorAll(){return[]}getComputedStyle(){return{}}getBoundingClientRect(e){return e&&e.getBoundingClientRect?e.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}createXMLSerializer(){return{serializeToString(e){return e.toString?e.toString():""}}}createDOMParser(){return{parseFromString(e,t){const s=new De("root");return s.innerHTML=e,{documentElement:s}}}}}let Z=null,re=null,oe=null;class H{static init(){z.isSSR()&&!Z&&(Z=new Ft)}static createElement(e){return z.isSSR()?(Z||this.init(),Z.createElementNS(null,e)):document.createElement(e)}static createElementNS(e,t){return z.isSSR()?(Z||this.init(),Z.createElementNS(e,t)):document.createElementNS(e,t)}static createTextNode(e){return z.isSSR()?(Z||this.init(),Z.createTextNode(e)):document.createTextNode(e)}static querySelector(e){return z.isSSR()?null:document.querySelector(e)}static querySelectorAll(e){return z.isSSR()?[]:document.querySelectorAll(e)}static getComputedStyle(e){return z.isSSR()?{}:window.getComputedStyle(e)}static getBoundingClientRect(e){return z.isSSR()?(Z||this.init(),Z.getBoundingClientRect(e)):e?e.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}static getXMLSerializer(){return z.isSSR()?(Z||this.init(),re||(re=Z.createXMLSerializer()),re):(re||(re=new XMLSerializer),re)}static getDOMParser(){return z.isSSR()?(Z||this.init(),oe||(oe=Z.createDOMParser()),oe):(oe||(oe=new DOMParser),oe)}static addWindowEventListener(e,t,s){z.isBrowser()&&window.addEventListener(e,t,s)}static removeWindowEventListener(e,t,s){z.isBrowser()&&window.removeEventListener(e,t,s)}static requestAnimationFrame(e){return z.isBrowser()?window.requestAnimationFrame(e):(e(),null)}static cancelAnimationFrame(e){z.isBrowser()&&e&&window.cancelAnimationFrame(e)}static elementExists(e){return e?z.isSSR()?e._ssrMode===!0||e.nodeName!==void 0:e.getRootNode?e.getRootNode({composed:!0})===document||e.isConnected:!1:!1}
4static getWindow(){return z.isBrowser()?window:null}static getDocument(){return z.isBrowser()?document:null}static _getShim(){return Z}static _resetShim(){Z=null,re=null,oe=null}}let D=class ce{static isObject(e){return e&&typeof e=="object"&&!Array.isArray(e)}static is(e,t){return Object.prototype.toString.call(t)==="[object "+e+"]"}static isSafari(){return z.isBrowser()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}static extend(e,t){const s=Object.assign({},e);return this.isObject(e)&&this.isObject(t)&&Object.keys(t).forEach(a=>{this.isObject(t[a])?a in e?s[a]=this.extend(e[a],t[a]):Object.assign(s,{[a]:t[a]}):Object.assign(s,{[a]:t[a]})}),s}static extendArray(e,t){const s=[];return e.map(a=>{s.push(ce.extend(t,a))}),e=s,e}static monthMod(e){return e%12}static clone(e,t=new WeakMap,s=!1){if(e===null||typeof e!="object")return e;if(t.has(e))return t.get(e);let a;if(Array.isArray(e))if(s)a=e.slice();else{a=[],t.set(e,a);for(let i=0;i<e.length;i++)a[i]=this.clone(e[i],t,!1)}else if(e instanceof Date)a=new Date(e.getTime());else if(s)a=Object.assign({},e);else{a={},t.set(e,a);for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(a[i]=this.clone(e[i],t,!1))}return a}static shallowClone(e){return e===null||typeof e!="object"?e:Array.isArray(e)?e.slice():Object.assign({},e)}static shallowEqual(e,t){if(e===t)return!0;if(!e||!t)return!1;if(typeof e!="object"||typeof t!="object")return e===t;const s=Object.keys(e),a=Object.keys(t);if(s.length!==a.length)return!1;for(const i of s)if(e[i]!==t[i])return!1;return!0}static log10(e){return Math.log(e)/Math.LN10}static roundToBase10(e){return Math.pow(10,Math.floor(Math.log10(e)))}static roundToBase(e,t){return Math.pow(t,Math.floor(Math.log(e)/Math.log(t)))}static parseNumber(e){return typeof e=="number"||e===null?e:parseFloat(e)}static stripNumber(e,t=2){return Number.isInteger(e)?e:parseFloat(e.toPrecision(t))}static randomId(){return(Math.random()+1).toString(36).substring(4)}static noExponents(e){return e.toString().includes("e")?Math.round(e):e}static elementExists(e){return!(!e||!e.isConnected)}static isInShadowDOM(e){if(!e||!e.getRootNode)return!1;const t=e.getRootNode();return t&&t!==document&&ce.is("ShadowRoot",t)}static getShadowRootHost(e){return ce.isInShadowDOM(e)&&e.getRootNode().host||null}static getDimensions(e){if(!e)return[0,0];if(z.isSSR())return[e._ssrWidth||400,e._ssrHeight||300];const t=e.getRootNode&&e.getRootNode();if(t&&t!==document&&t.host){const r=t.host.getBoundingClientRect();return[r.width,r.height]}let s;try{s=getComputedStyle(e,null)}catch{return[e.clientWidth||0,e.clientHeight||0]}let a=e.clientHeight,i=e.clientWidth;return a-=parseFloat(s.paddingTop)+parseFloat(s.paddingBottom),i-=parseFloat(s.paddingLeft)+parseFloat(s.paddingRight),[i,a]}static getBoundingClientRect(e){if(!e)return{top:0,right:0,bottom:0,left:0,width:0,height:0,x:0,y:0};if(z.isSSR())return H.getBoundingClientRect(e);const t=e.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:e.clientWidth,height:e.clientHeight,x:t.left,y:t.top}}static getLargestStringFromArr(e){return e.reduce((t,s)=>(Array.isArray(s)&&(s=s.reduce((a,i)=>a.length>i.length?a:i)),t.length>s.length?t:s),0)}static hexToRgba(e="#999999",t=.6){e.substring(0,1)!=="#"&&(e="#999999");let s=e.replace("#","");s=s.match(new RegExp("(.{"+s.length/3+"})","g"));for(let a=0;a<s.length;a++)s[a]=parseInt(s[a].length===1?s[a]+s[a]:s[a],16);return typeof t<"u"&&s.push(t),"rgba("+s.join(",")+")"}static getOpacityFromRGBA(e){return parseFloat(e.replace(/^.*,(.+)\)/,"$1"))}static rgb2hex(e){return e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i),e&&e.length===4?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):""}shadeRGBColor(e,t){const s=t.split(","),a=e<0?0:255,i=e<0?e*-1:e,r=parseInt(s[0].slice(4),10),o=parseInt(s[1],10),l=parseInt(s[2],10);return"rgb("+(Math.round((a-r)*i)+r)+","+(Math.round((a-o)*i)+o)+","+(Math.round((a-l)*i)+l)+")"}shadeHexColor(e,t){const s=parseInt(t.slice(1),16),a=e<0?0:255,i=e<0?e*-1:e,r=s>>16,o=s>>8&255,l=s&255;return"#"+(16777216+(Math.round((a-r)*i)+r)*65536+(Math.round((a-o)*i)+o)*256+(Math.round((a-l)*i)+l)).toString(16).slice(1)}shadeColor(e,t){return ce.isColorHex(t)?this.shadeHexColor(e,t):this.shadeRGBColor(e,t)}static isColorHex(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(e)}static isCSSVariable(e){if(typeof e!="string")return!1;const t=e.trim();return t.startsWith("var(")&&t.endsWith(")")}static getThemeColor(e){if(!ce.isCSSVariable(e)||z.isSSR())return e;const t=document.createElement("div");t.style.cssText="position:fixed; left: -9999px; visibility:hidden;",t.style.color=e,document.body.appendChild(t);let s;try{s=window.getComputedStyle(t).color}finally{t.parentNode&&t.parentNode.removeChild(t)}return s}static getPolygonPos(e,t){const s=[],a=Math.PI*2/t;
4for(let i=0;i<t;i++){const r={};r.x=e*Math.sin(i*a),r.y=-e*Math.cos(i*a),s.push(r)}return s}static polarToCartesian(e,t,s,a){const i=(a-90)*Math.PI/180;return{x:e+s*Math.cos(i),y:t+s*Math.sin(i)}}static escapeString(e,t="x"){let s=e.toString().slice();return s=s.replace(/[` ~!@#$%^&*()|+=?;:'",.<>{}[\]\\/]/gi,t),s}static negToZero(e){return e<0?0:e}static moveIndexInArray(e,t,s){if(s>=e.length){let a=s-e.length+1;for(;a--;)e.push(void 0)}return e.splice(s,0,e.splice(t,1)[0]),e}static extractNumber(e){return parseFloat(e.replace(/[^\d.]*/g,""))}static findAncestor(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e}static setELstyles(e,t){for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e.style.key=t[s])}static preciseAddition(e,t){const s=(String(e).split(".")[1]||"").length,a=(String(t).split(".")[1]||"").length,i=Math.pow(10,Math.max(s,a));return(Math.round(e*i)+Math.round(t*i))/i}static isNumber(e){return!isNaN(e)&&parseFloat(Number(e))===e&&!isNaN(parseInt(e,10))}static isFloat(e){return Number(e)===e&&e%1!==0}static isMsEdge(){if(z.isSSR())return!1;const e=window.navigator.userAgent,t=e.indexOf("Edge/");return t>0?parseInt(e.substring(t+5,e.indexOf(".",t)),10):!1}static getGCD(e,t,s=7){let a=Math.pow(10,s-Math.floor(Math.log10(Math.max(e,t))));for(a>1?(e=Math.round(Math.abs(e)*a),t=Math.round(Math.abs(t)*a)):a=1;t;){const i=t;t=e%t,e=i}return e/a}static getPrimeFactors(e){const t=[];let s=2;for(;e>=2;)e%s==0?(t.push(s),e=e/s):s++;return t}static mod(e,t,s=7){const a=Math.pow(10,s-Math.floor(Math.log10(Math.max(e,t))));return e=Math.round(Math.abs(e)*a),t=Math.round(Math.abs(t)*a),e%t/a}};class U{constructor(e){this.w=e,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(e){return typeof e=="number"?!1:!isNaN(this.parseDate(e))}getTimeStamp(e){return Date.parse(e)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toISOString().substr(0,25)).getTime():new Date(e).getTime():e}getDate(e){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toUTCString()):new Date(e)}parseDate(e){const t=Date.parse(e);if(!isNaN(t))return this.getTimeStamp(e);let s=Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "));return s=this.getTimeStamp(s),s}parseDateWithTimezone(e){return Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "))}formatDate(e,t){const s=this.w.globals.locale,a=this.w.config.xaxis.labels.datetimeUTC,i=["\0",...s.months],r=["�",...s.shortMonths],o=["�",...s.days],l=["�",...s.shortDays];function n(A,L){let S=A+"";for(L=L||2;S.length<L;)S="0"+S;return S}const h=a?e.getUTCFullYear():e.getFullYear();t=t.replace(/(^|[^\\])yyyy+/g,"$1"+h),t=t.replace(/(^|[^\\])yy/g,"$1"+h.toString().substr(2,2)),t=t.replace(/(^|[^\\])y/g,"$1"+h);const c=(a?e.getUTCMonth():e.getMonth())+1;t=t.replace(/(^|[^\\])MMMM+/g,"$1"+i[0]),t=t.replace(/(^|[^\\])MMM/g,"$1"+r[0]),t=t.replace(/(^|[^\\])MM/g,"$1"+n(c)),t=t.replace(/(^|[^\\])M/g,"$1"+c);const d=a?e.getUTCDate():e.getDate();t=t.replace(/(^|[^\\])dddd+/g,"$1"+o[0]),t=t.replace(/(^|[^\\])ddd/g,"$1"+l[0]),t=t.replace(/(^|[^\\])dd/g,"$1"+n(d)),t=t.replace(/(^|[^\\])d/g,"$1"+d);const u=a?e.getUTCHours():e.getHours();t=t.replace(/(^|[^\\])HH+/g,"$1"+n(u)),t=t.replace(/(^|[^\\])H/g,"$1"+u);const g=u>12?u-12:u===0?12:u;t=t.replace(/(^|[^\\])hh+/g,"$1"+n(g)),t=t.replace(/(^|[^\\])h/g,"$1"+g);const p=a?e.getUTCMinutes():e.getMinutes();t=t.replace(/(^|[^\\])mm+/g,"$1"+n(p)),t=t.replace(/(^|[^\\])m/g,"$1"+p);const b=a?e.getUTCSeconds():e.getSeconds();t=t.replace(/(^|[^\\])ss+/g,"$1"+n(b)),t=t.replace(/(^|[^\\])s/g,"$1"+b);let f=a?e.getUTCMilliseconds():e.getMilliseconds();t=t.replace(/(^|[^\\])fff+/g,"$1"+n(f,3)),f=Math.round(f/10),t=t.replace(/(^|[^\\])ff/g,"$1"+n(f)),f=Math.round(f/10),t=t.replace(/(^|[^\\])f/g,"$1"+f);const m=u<12?"AM":"PM";t=t.replace(/(^|[^\\])TT+/g,"$1"+m),t=t.replace(/(^|[^\\])T/g,"$1"+m.charAt(0));const v=m.toLowerCase();t=t.replace(/(^|[^\\])tt+/g,"$1"+v),t=t.replace(/(^|[^\\])t/g,"$1"+v.charAt(0));let y=-e.getTimezoneOffset(),w=a||!y?"Z":y>0?"+":"-";if(!a){y=Math.abs(y);const A=Math.floor(y/60),L=y%60;w+=n(A)+":"+n(L)}t=t.replace(/(^|[^\\])K/g,"$1"+w);const C=(a?e.getUTCDay():e.getDay())+1;return t=t.replace(new RegExp(o[0],"g"),o[C]),t=t.replace(new RegExp(l[0],"g"),l[C]),t=t.replace(new RegExp(i[0],"g"),i[c]),t=t.replace(new RegExp(r[0],"g"),r[c]),t=t.replace(/\\(.)/g,"$1"),t}getTimeUnitsfromTimestamp(e,t){const s=this.w;s.config.xaxis.min!==void 0&&(e=s.config.xaxis.min),s.config.xaxis.max!==void 0&&(t=s.config.xaxis.max);const a=this.getDate(e),i=this.getDate(t),r=this.formatDate(a,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(i,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(r[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(r[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(r[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(r[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(r[2],10),maxDate:parseInt(o[2],10),minMonth:
4parseInt(r[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(r[0],10),maxYear:parseInt(o[0],10)}}isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}calculcateLastDaysOfMonth(e,t,s){return this.determineDaysOfMonths(e,t)-s}determineDaysOfYear(e){let t=365;return this.isLeapYear(e)&&(t=366),t}determineRemainingDaysOfYear(e,t,s){let a=this.daysCntOfYear[t]+s;return t>1&&this.isLeapYear()&&a++,a}determineDaysOfMonths(e,t){let s=30;switch(e=D.monthMod(e),!0){case this.months30.indexOf(e)>-1:e===2&&(this.isLeapYear(t)?s=29:s=28);break;case this.months31.indexOf(e)>-1:s=31;break;default:s=31;break}return s}}class ve{constructor(e){this.w=e,this.tooltipKeyFormat="dd MMM"}xLabelFormat(e,t,s,a){const i=this.w;if(i.config.xaxis.type==="datetime"&&i.config.xaxis.labels.formatter===void 0&&i.config.tooltip.x.formatter===void 0){const r=new U(this.w);return r.formatDate(r.getDate(t),i.config.tooltip.x.format)}return e(t,s,a)}defaultGeneralFormatter(e){return Array.isArray(e)?e.map(t=>t):e}defaultYFormatter(e,t){const s=this.w;if(D.isNumber(e))if(s.globals.yValueDecimal!==0)e=e.toFixed(t.decimalsInFloat!==void 0?t.decimalsInFloat:s.globals.yValueDecimal);else{const a=e.toFixed(0);e=e==a?a:e.toFixed(1)}return e}setLabelFormatters(){const e=this.w,t=e.formatters;return t.xaxisTooltipFormatter=s=>this.defaultGeneralFormatter(s),t.ttKeyFormatter=s=>this.defaultGeneralFormatter(s),t.ttZFormatter=s=>s,t.legendFormatter=s=>this.defaultGeneralFormatter(s),e.config.xaxis.labels.formatter!==void 0?t.xLabelFormatter=e.config.xaxis.labels.formatter:t.xLabelFormatter=s=>{if(D.isNumber(s)){if(!e.config.xaxis.convertedCatToNumeric&&e.config.xaxis.type==="numeric"){if(D.isNumber(e.config.xaxis.decimalsInFloat))return s.toFixed(e.config.xaxis.decimalsInFloat);{const a=e.globals.maxX-e.globals.minX;return a>0&&a<100?s.toFixed(1):s.toFixed(0)}}return e.globals.isBarHorizontal&&e.globals.maxY-e.globals.minYArr<4?s.toFixed(1):s.toFixed(0)}return s},typeof e.config.tooltip.x.formatter=="function"?t.ttKeyFormatter=e.config.tooltip.x.formatter:t.ttKeyFormatter=t.xLabelFormatter,typeof e.config.xaxis.tooltip.formatter=="function"&&(t.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||e.config.tooltip.y.formatter!==void 0)&&(t.ttVal=e.config.tooltip.y),e.config.tooltip.z.formatter!==void 0&&(t.ttZFormatter=e.config.tooltip.z.formatter),e.config.legend.formatter!==void 0&&(t.legendFormatter=e.config.legend.formatter),t.yLabelFormatters=[],e.config.yaxis.forEach((s,a)=>{s.labels.formatter!==void 0?t.yLabelFormatters[a]=s.labels.formatter:t.yLabelFormatters[a]=i=>e.globals.xyCharts?Array.isArray(i)?i.map(r=>this.defaultYFormatter(r,s,a)):this.defaultYFormatter(i,s,a):i}),e.globals}heatmapLabelFormatters(){const e=this.w;if(e.config.chart.type==="heatmap"){e.globals.yAxisScale[0].result=e.seriesData.seriesNames.slice();const t=e.seriesData.seriesNames.reduce((s,a)=>s.length>a.length?s:a,0);e.globals.yAxisScale[0].niceMax=t,e.globals.yAxisScale[0].niceMin=t}}}const Ee=({isTimeline:x,seriesIndex:e,dataPointIndex:t,y1:s,y2:a,w:i})=>{var r;let o=i.rangeData.seriesRangeStart[e][t],l=i.rangeData.seriesRangeEnd[e][t],n=i.labelData.labels[t],h=i.config.series[e].name?i.config.series[e].name:"";const c=i.formatters.ttKeyFormatter,d=i.config.tooltip.y.title.formatter,u={w:i,seriesIndex:e,dataPointIndex:t,start:o,end:l};typeof d=="function"&&(h=d(h,u)),(r=i.config.series[e].data[t])!=null&&r.x&&(n=i.config.series[e].data[t].x),x||i.config.xaxis.type==="datetime"&&(n=new ve(i).xLabelFormat(i.formatters.ttKeyFormatter,n,n,{i:void 0,dateFormatter:new U(i).formatDate,w:i})),typeof c=="function"&&(n=c(n,u)),Number.isFinite(s)&&Number.isFinite(a)&&(o=s,l=a);let g="",p="";const b=i.globals.colors[e];if(i.config.tooltip.x.formatter===void 0)if(i.config.xaxis.type==="datetime"){const f=new U(i);g=f.formatDate(f.getDate(o),i.config.tooltip.x.format),p=f.formatDate(f.getDate(l),i.config.tooltip.x.format)}else g=o,p=l;else g=i.config.tooltip.x.formatter(o),p=i.config.tooltip.x.formatter(l);return{start:o,end:l,startVal:g,endVal:p,ylabel:n,color:b,seriesName:h}},Te=x=>{let{color:e,seriesName:t,ylabel:s,start:a,end:i,seriesIndex:r,dataPointIndex:o}=x;const l=x.w.globals.tooltip.tooltipLabels.getFormatters(r);a=l.yLbFormatter(a),i=l.yLbFormatter(i);const n=l.yLbFormatter(x.w.seriesData.series[r][o]);let h="";const c=`<span class="value start-value"> 5 ${a} 6 </span> <span class="separator">-</span> <span class="value end-value"> 7 ${i} 8 </span>`;return x.w.globals.comboCharts?x.w.config.series[r].type==="rangeArea"||x.w.c
8onfig.series[r].type==="rangeBar"?h=c:h=`<span>${n}</span>`:h=c,'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+e+'">'+(t||"")+'</span></div><div> <span class="category">'+s+": </span> "+h+" </div></div>"};class me{constructor(e){this.opts=e}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(e){this.hideYAxis();const t={grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}};return D.extend(e,t)}slope(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter(e,t){const s=t.w.config.series[t.seriesIndex].name;return e!==null?s+": "+e:""},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(),O(R({},this.bar()),{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}candlestick(){return{stroke:{width:1},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:({seriesIndex:e,dataPointIndex:t,w:s})=>this._getBoxTooltip(s,e,t,["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:e,dataPointIndex:t,w:s})=>this._getBoxTooltip(s,e,t,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}rangeBar(){const e=s=>{const{color:a,seriesName:i,ylabel:r,startVal:o,endVal:l}=Ee(O(R({},s),{isTimeline:!0}));return Te(O(R({},s),{color:a,seriesName:i,ylabel:r,start:o,end:l}))},t=s=>{const{color:a,seriesName:i,ylabel:r,start:o,end:l}=Ee(s);return Te(O(R({},s),{color:a,seriesName:i,ylabel:r,start:o,end:l}))};return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter(s,{seriesIndex:a,dataPointIndex:i,w:r}){const o=()=>{const l=r.rangeData.seriesRangeStart[a][i];return r.rangeData.seriesRangeEnd[a][i]-l};return r.globals.comboCharts?r.config.series[a].type==="rangeBar"||r.config.series[a].type==="rangeArea"?o():s:o()},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?e(s):t(s)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}dumbbell(e){var t,s;return(t=e.plotOptions.bar)!=null&&t.barHeight||(e.plotOptions.bar.barHeight=2),(s=e.plotOptions.bar)!=null&&s.columnWidth||(e.plotOptions.bar.columnWidth=2),e}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(){const e=t=>{const{color:s,seriesName:a,ylabel:i,start:r,end:o}=Ee(t);return Te(O(R({},t),{color:s,seriesName:a,ylabel:i,start:r,end:o}))};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(t){return e(t)}}}}brush(e){const t={chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}};return D.extend(e,t)}stacked100(e){e.dataLabels=e.dataLabels||{},e.dataLabels.formatter=e.dataLabels.formatter||void 0;const t=e.dataLabels.formatter;return e.yaxis.forEach((s,a)=>{e.yaxis[a].min=0,e.yaxis[a].max=100}),e.chart.type==="bar"&&(e.dataLabels.formatter=t||function(s){return typeof s=="number"?s&&s.toFixed(0)+"%":s}),e}stackedBars(){const e=this.bar();return O(R({},e),{plotOptions:O(R({},e.plotOptions),{bar:O(R({},e.plotOptions.bar),{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}
vendor: 4,528 bytes, lines 8-10
8convertCatToNumeric(e){return e.xaxis.convertedCatToNumeric=!0,e}convertCatToNumericXaxis(e,t){e.xaxis.type="numeric",e.xaxis.labels=e.xaxis.labels||{},e.xaxis.labels.formatter=e.xaxis.labels.formatter||function(i){return D.isNumber(i)?Math.floor(i):i};const s=e.xaxis.labels.formatter;let a=e.xaxis.categories&&e.xaxis.categories.length?e.xaxis.categories:e.labels;return t&&t.length&&(a=t.map(i=>Array.isArray(i)?i:String(i))),a&&a.length&&(e.xaxis.labels.formatter=function(i){return D.isNumber(i)?s(a[Math.floor(i)-1]):s(i)}),e.xaxis.categories=[],e.labels=[],e.xaxis.tickAmount=e.xaxis.tickAmount||"dataPoints",e}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(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}donut(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}polarArea(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter(e){return e.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:e=>e,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(e,t,s,a,i){const r=e.candleData.seriesCandleO[t][s],o=e.candleData.seriesCandleH[t][s],l=e.candleData.seriesCandleM[t][s],n=e.candleData.seriesCandleL[t][s],h=e.candleData.seriesCandleC[t][s];return e.config.series[t].type&&e.config.series[t].type!==i?`<div class="apexcharts-custom-tooltip"> 9 ${e.config.series[t].name?e.config.series[t].name:"series-"+(t+1)}: <strong>${e.seriesData.series[t][s]}</strong> 10 </div>`:`<div class="apexcharts-tooltip-box apexcharts-tooltip-${e.config.chart.type}"><div>${a[0]}: <span class="value">`+r+`</span></div><div>${a[1]}: <span class="value">`+o+"</span></div>"+(l?`<div>${a[2]}: <span class="value">`+l+"</span></div>":"")+`<div>${a[3]}: <span class="value">`+n+`</span></div><div>${a[4]}: <span class="value">`+h+"</span></div></div>"}}const Rt="en",zt={months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
10ay","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"}},nt={name:Rt,options:zt};class le{constructor(){this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}init(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"",locales:[nt],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}}}},parsing:{x:void 0,y:void 0},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}}
vendor: 4,514 bytes, line 10
10,heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0},seriesTitle:{show:!0,offsetY:1,offsetX:1,borderColor:"#000",borderWidth:1,borderRadius:2,style:{background:"rgba(0, 0, 0, 0.6)",color:"#fff",fontSize:"12px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:6,right:6,top:2,bottom:2}}}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter(e){return e}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter(e){return e+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter(e){return e.globals.seriesTotals.reduce((t,s)=>t+s,0)/e.seriesData.series.length+"%"}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter(e){return e},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(e){return e}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter(e){return e}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter(e){return e.globals.seriesTotals.reduce((t,s)=>t+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(e){return e!==null?e:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",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}}
10,noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten"}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken"}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter(e){return e?e+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65},accessibility:{colorBlindMode:""}}}}}class ye{constructor(e){this.opts=e}init({responsiveOverride:e}){var t,s,a,i,r,o,l,n,h,c;let d=this.opts;const u=new le,g=new me(d);this.chartType=d.chart.type,d=this.extendYAxis(d),d=this.extendAnnotations(d);let p=u.init(),b={};if(d&&typeof d=="object"){let m={};["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(d.chart.type)!==-1?m=g[d.chart.type]():m=g.line(),(s=(t=d.plotOptions)==null?void 0:t.bar)!=null&&s.isFunnel&&(m=g.funnel()),d.chart.stacked&&d.chart.type==="bar"&&(m=g.stackedBars()),(a=d.chart.brush)!=null&&a.enabled&&(m=g.brush(m)),(r=(i=d.plotOptions)==null?void 0:i.line)!=null&&r.isSlopeChart&&(m=g.slope()),d.chart.stacked&&d.chart.stackType==="100%"&&(d=g.stacked100(d)),(l=(o=d.plotOptions)==null?void 0:o.bar)!=null&&l.isDumbbell&&(d=g.dumbbell(d)),this.checkForDarkTheme(z.getApex()),this.checkForDarkTheme(d),d.xaxis=d.xaxis||z.getApex().xaxis||{},e||(d.xaxis.convertedCatToNumeric=!1),d=this.checkForCatToNumericXAxis(this.chartType,m,d),((n=d.chart.sparkline)!=null&&n.enabled||(c=(h=z.getApex().chart)==null?void 0:h.sparkline)!=null&&c.enabled)&&(m=g.sparkline(m)),b=D.extend(p,m)}const f=D.extend(b,z.getApex());return p=D.extend(f,d),p=this.handleUserInputErrors(p),p}checkForCatToNumericXAxis(e,t,s){var a,i;const r=new me(s),o=(e==="bar"||e==="boxPlot")&&((i=(a=s.plotOptions)==null?void 0:a.bar)==null?void 0:i.horizontal),l=e==="pie"||e==="polarArea"||e==="donut"||e==="radar"||e==="radialBar"||e==="heatmap",n=s.xaxis.type!=="datetime"&&s.xaxis.type!=="numeric",h=s.xaxis.tickPlacement?s.xaxis.tickPlacement:t.xaxis&&t.xaxis.tickPlacement;return!o&&!l&&n&&h!=="between"&&(s=r.convertCatToNumeric(s)),s}extendYAxis(e,t){const s=new le;(typeof e.yaxis>"u"||!e.yaxis||Array.isArray(e.yaxis)&&e.yaxis.length===0)&&(e.yaxis={});const a=z.getApex();
vendor: 5,317 bytes, line 10
10e.yaxis.constructor!==Array&&a.yaxis&&a.yaxis.constructor!==Array&&(e.yaxis=D.extend(e.yaxis,a.yaxis)),e.yaxis.constructor!==Array?e.yaxis=[D.extend(s.yAxis,e.yaxis)]:e.yaxis=D.extendArray(e.yaxis,s.yAxis);let i=!1;e.yaxis.forEach(o=>{o.logarithmic&&(i=!0)});let r=e.series;return t&&!r&&(r=t.config.series),i&&r.length!==e.yaxis.length&&r.length&&(e.yaxis=r.map((o,l)=>{if(o.name||(r[l].name=`series-${l+1}`),e.yaxis[l])return e.yaxis[l].seriesName=r[l].name,e.yaxis[l];{const n=D.extend(s.yAxis,e.yaxis[0]);return n.show=!1,n}})),i&&r.length>1&&r.length!==e.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),e}extendAnnotations(e){return typeof e.annotations>"u"&&(e.annotations={},e.annotations.yaxis=[],e.annotations.xaxis=[],e.annotations.points=[]),e=this.extendYAxisAnnotations(e),e=this.extendXAxisAnnotations(e),e=this.extendPointAnnotations(e),e}extendYAxisAnnotations(e){const t=new le;return e.annotations.yaxis=D.extendArray(typeof e.annotations.yaxis<"u"?e.annotations.yaxis:[],t.yAxisAnnotation),e}extendXAxisAnnotations(e){const t=new le;return e.annotations.xaxis=D.extendArray(typeof e.annotations.xaxis<"u"?e.annotations.xaxis:[],t.xAxisAnnotation),e}extendPointAnnotations(e){const t=new le;return e.annotations.points=D.extendArray(typeof e.annotations.points<"u"?e.annotations.points:[],t.pointAnnotation),e}checkForDarkTheme(e){e.theme&&e.theme.mode==="dark"&&(e.tooltip||(e.tooltip={}),e.tooltip.theme!=="light"&&(e.tooltip.theme="dark"),e.chart.foreColor||(e.chart.foreColor="#f6f7f8"),e.theme.palette||(e.theme.palette="palette4"))}handleUserInputErrors(e){const t=e;if(t.tooltip.shared&&t.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if(t.chart.type==="bar"&&t.plotOptions.bar.horizontal){if(t.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");t.yaxis[0].reversed&&(t.yaxis[0].opposite=!0),t.xaxis.tooltip.enabled=!1,t.yaxis[0].tooltip.enabled=!1,t.chart.zoom.enabled=!1}return(t.chart.type==="bar"||t.chart.type==="rangeBar")&&t.tooltip.shared&&t.xaxis.crosshairs.width==="barWidth"&&t.series.length>1&&(t.xaxis.crosshairs.width="tickWidth"),(t.chart.type==="candlestick"||t.chart.type==="boxPlot")&&t.yaxis[0].reversed&&(console.warn(`Reversed y-axis in ${t.chart.type} chart is not supported.`),t.yaxis[0].reversed=!1),t}}const ht=1.618,ct=[[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];class dt{initGlobalVars(e){e.series=[],e.seriesCandleO=[],e.seriesCandleH=[],e.seriesCandleM=[],e.seriesCandleL=[],e.seriesCandleC=[],e.seriesRangeStart=[],e.seriesRangeEnd=[],e.seriesRange=[],e.seriesPercent=[],e.seriesGoals=[],e.seriesX=[],e.seriesZ=[],e.seriesNames=[],e.seriesTotals=[],e.seriesLog=[],e.seriesColors=[],e.stackedSeriesTotals=[],e.seriesXvalues=[],e.seriesYvalues=[],e.dataWasParsed=!1,e.originalSeries=null,e.maxValsInArrayIndex=0,e.yValueDecimal=0,e.allSeriesHasEqualX=!0,e.labels=[],e.hasXaxisGroups=!1,e.groups=[],e.barGroups=[],e.lineGroups=[],e.areaGroups=[],e.hasSeriesGroups=!1,e.seriesGroups=[],e.categoryLabels=[],e.timescaleLabels=[],e.noLabelsProvided=!1,e.isXNumeric=!1,e.skipLastTimelinelabel=!1,e.skipFirstTimelinelabel=!1,e.isDataXYZ=!1,e.isMultiLineX=!1,e.isMultipleYAxis=!1,e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE,e.minYArr=[],e.maxYArr=[],e.maxX=-Number.MAX_VALUE,e.minX=Number.MAX_VALUE,e.initialMaxX=-Number.MAX_VALUE,e.initialMinX=Number.MAX_VALUE,e.maxDate=0,e.minDate=Number.MAX_VALUE,e.minZ=Number.MAX_VALUE,e.maxZ=-Number.MAX_VALUE,e.minXDiff=Number.MAX_VALUE,e.yAxisScale=[],e.xAxisScale=null,e.xAxisTicksPositions=[],e.xRange=0,e.yRange=[],e.zRange=0,e.dataPoints=0,e.xTickAmount=0,e.multiAxisTickAmount=0,e.disableZoomIn=!1,e.disableZoomOut=!1,e.yLabelsCoords=[],e.yTitleCoords=[],e.barPadForNumericAxis=0,e.padHorizontal=0,e.rotateXLabels=!1,e.overlappingXLabels=!1,e.radialSize=0,e.barHeight=0,e.barWidth=0,e.animationEnded=!1,e.resizeTimer=null,e.selectionResizeTimer=null,e.lastWheelExecution=0,e.delayedElements=[],e.pointsArray=[],e.dataLabelsRects=[],e.lastDrawnDataLabelsIndexes=[],e.textRectsCache=new Map,e.domCache=new Map,e.dimensionCache={},e.cachedSelectors={},e.seriesNS||this._attachNamespaces(e)}_attachNamespaces(e){const t=(o,l,n=l)=>{Object.defineProperty(o,n,{get(){return e[l]},set(h){e[l]=h},enumerable:!0,configurable:!0})},s={};t(s,"series","data");for(const o 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"])t(s,o);Object.defineProperty(e,"seriesNS",{value:s,writable:!1,enumerable:!1,
10configurable:!0});const a={};for(const o 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"])t(a,o);Object.defineProperty(e,"axes",{value:a,writable:!1,enumerable:!1,configurable:!0});const i={};for(const o 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"])t(i,o);Object.defineProperty(e,"layout",{value:i,writable:!1,enumerable:!1,configurable:!0});const r={};for(const o of["domCache","dimensionCache","cachedSelectors","textRectsCache","pointsArray","dataLabelsRects","lastDrawnDataLabelsIndexes","delayedElements","resizeTimer","selectionResizeTimer","resizeObserver"])t(r,o);Object.defineProperty(e,"cache",{value:r,writable:!1,enumerable:!1,configurable:!0})}globalVars(e){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:e.markers.size,largestSize:0},LINE_HEIGHT_RATIO:ht,axisCharts:!0,isSlopeChart:e.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:ct,niceScaleDefaultTicks:Fe,seriesYAxisMap:[],seriesYAxisReverseMap:[],noData:!1}}init(e){const t=this.globalVars(e);return this.initGlobalVars(t),t.initialConfig=D.extend({},e),t.initialSeries=D.clone(e.series),t.lastXAxis=D.clone(t.initialConfig.xaxis),t.lastYAxis=D.clone(t.initialConfig.yaxis),t}}class Yt{constructor(e){this.opts=e}init(){const e=new ye(this.opts).init({responsiveOverride:!1}),t=new dt().init(e),s={config:e,globals:t,dom:{},interact:{zoomEnabled:e.chart.toolbar.autoSelected==="zoom"&&e.chart.toolbar.tools.zoom&&e.chart.zoom.enabled,panEnabled:e.chart.toolbar.autoSelected==="pan"&&e.chart.toolbar.tools.pan,selectionEnabled:e.chart.toolbar.autoSelected==="selection"&&e.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:z.isBrowser()?"ontouchstart"in window||navigator.msMaxTouchPoints>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(t,"dom",{get(){return s.dom},set(a){s.dom=a}
10,enumerable:!1,configurable:!0});for(const a of["xLabelFormatter","yLabelFormatters","xaxisTooltipFormatter","ttKeyFormatter","ttVal","ttZFormatter","legendFormatter"])Object.defineProperty(t,a,{get(){return s.formatters[a]},set(i){s.formatters[a]=i},enumerable:!1,configurable:!0});for(const a of["zoomEnabled","panEnabled","selectionEnabled","zoomed","selection","visibleXRange","selectedDataPoints","mousedown","clientX","clientY","lastClientPosition","lastWheelExecution","capturedSeriesIndex","capturedDataPointIndex","disableZoomIn","disableZoomOut","isTouchDevice"])Object.defineProperty(t,a,{get(){return s.interact[a]},set(i){s.interact[a]=i},enumerable:!1,configurable:!0});for(const a of["gridHeight","gridWidth","translateX","translateY","translateXAxisX","translateXAxisY","rotateXLabels","xAxisHeight","xAxisLabelsHeight","xAxisGroupLabelsHeight","xAxisLabelsWidth","yLabelsCoords","yTitleCoords"])Object.defineProperty(t,a,{get(){return s.layout[a]},set(i){s.layout[a]=i},enumerable:!1,configurable:!0});for(const a of["series","seriesNames","seriesX","seriesZ","seriesColors","seriesGoals","stackedSeriesTotals","stackedSeriesTotalsByGroups"])Object.defineProperty(t,a,{get(){return s.seriesData[a]},set(i){s.seriesData[a]=i},enumerable:!1,configurable:!0});for(const a of["isXNumeric","dataFormatXNumeric","isDataXYZ","isRangeData","isRangeBar","isMultiLineX","noLabelsProvided","dataWasParsed"])Object.defineProperty(t,a,{get(){return s.axisFlags[a]},set(i){s.axisFlags[a]=i},enumerable:!1,configurable:!0});for(const a of["labels","categoryLabels","timescaleLabels","hasXaxisGroups","groups","seriesGroups"])Object.defineProperty(t,a,{get(){return s.labelData[a]},set(i){s.labelData[a]=i},enumerable:!1,configurable:!0});for(const a of["seriesRangeStart","seriesRangeEnd","seriesRange"])Object.defineProperty(t,a,{get(){return s.rangeData[a]},set(i){s.rangeData[a]=i},enumerable:!1,configurable:!0});for(const a of["seriesCandleO","seriesCandleH","seriesCandleM","seriesCandleL","seriesCandleC"])Object.defineProperty(t,a,{get(){return s.candleData[a]},set(i){s.candleData[a]=i},enumerable:!1,configurable:!0});return s}}class ${constructor(e){this.w=e}static checkComboSeries(e,t){let s=!1,a=0,i=0;return t===void 0&&(t="line"),e.length&&typeof e[0].type<"u"&&e.forEach(r=>{(r.type==="bar"||r.type==="column"||r.type==="candlestick"||r.type==="boxPlot")&&a++,typeof r.type<"u"&&r.type!==t&&i++}),i>0&&(s=!0),{comboBarCount:a,comboCharts:s}}getStackedSeriesTotals(e=[]){const t=this.w,s=[];if(t.seriesData.series.length===0)return s;for(let a=0;a<t.seriesData.series[t.globals.maxValsInArrayIndex].length;a++){let i=0;for(let r=0;r<t.seriesData.series.length;r++)typeof t.seriesData.series[r][a]<"u"&&e.indexOf(r)===-1&&(i+=t.seriesData.series[r][a]);s.push(i)}return s}getSeriesTotalByIndex(e=null){return e===null?this.w.config.series.reduce((t,s)=>t+s,0):this.w.seriesData.series[e].reduce((t,s)=>t+s,0)}getStackedSeriesTotalsByGroups(){const e=this.w,t=[];return e.labelData.seriesGroups.forEach(s=>{const a=[];e.config.series.forEach((r,o)=>{s.indexOf(e.seriesData.seriesNames[o])>-1&&a.push(o)});const i=e.seriesData.series.map((r,o)=>a.indexOf(o)===-1?o:-1).filter(r=>r!==-1);t.push(this.getStackedSeriesTotals(i))}),t}setSeriesYAxisMappings(){const e=this.w.globals,t=this.w.config;let s=[];const a=[],i=[],r=this.w.seriesData.series.length>t.yaxis.length||t.yaxis.some(n=>Array.isArray(n.seriesName));t.series.forEach((n,h)=>{i.push(h),a.push(null)}),t.yaxis.forEach((n,h)=>{s[h]=[]});const o=[];t.yaxis.forEach((n,h)=>{let c=!1;if(n.seriesName){let d=[];Array.isArray(n.seriesName)?d=n.seriesName:d.push(n.seriesName),d.forEach(u=>{t.series.forEach((g,p)=>{if(g.name===u){let b=p;h===p||r?!r||i.indexOf(p)>-1?s[h].push([h,p]):console.warn("Series '"+g.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[p].push([p,h]),b=h),c=!0,b=i.indexOf(b),b!==-1&&i.splice(b,1)}})})}c||o.push(h)}),s=s.map(n=>{const h=[];return n.forEach(c=>{a[c[1]]=c[0],h.push(c[1])}),h});let l=t.yaxis.length-1;for(let n=0;n<o.length&&(l=o[n],s[l]=[],i);n++){const h=i[0];i.shift(),s[l].push(h),a[h]=l}i.forEach(n=>{s[l].push(n),a[n]=l}),e.seriesYAxisMap=s.map(n=>n),e.seriesYAxisReverseMap=a.map(n=>
10n),e.seriesYAxisMap.forEach((n,h)=>{n.forEach(c=>{t.series[c]&&t.series[c].group===void 0&&(t.series[c].group="apexcharts-axis-".concat(h.toString()))})})}isSeriesNull(e=null){let t=[];return e===null?t=this.w.config.series.filter(s=>s!==null):t=this.w.config.series[e].data.filter(s=>s!==null),t.length===0}seriesHaveSameValues(e){return this.w.seriesData.series[e].every((t,s,a)=>t===a[0])}getCategoryLabels(e){const t=this.w;let s=e.slice();return t.config.xaxis.convertedCatToNumeric&&(s=e.map(a=>t.config.xaxis.labels.formatter(a-t.globals.minX+1))),s}getLargestSeries(){const e=this.w;e.globals.maxValsInArrayIndex=e.seriesData.series.map(t=>t.length).indexOf(Math.max.apply(Math,e.seriesData.series.map(t=>t.length)))}getLargestMarkerSize(){const e=this.w;let t=0;return e.globals.markers.size.forEach(s=>{t=Math.max(t,s)}),e.config.markers.discrete&&e.config.markers.discrete.length&&e.config.markers.discrete.forEach(s=>{t=Math.max(t,s.size)}),t>0&&(e.config.markers.hover.size>0?t=e.config.markers.hover.size:t+=e.config.markers.hover.sizeOffset),e.globals.markers.largestSize=t,t}getSeriesTotals(){const e=this.w;e.globals.seriesTotals=e.seriesData.series.map(t=>{let s=0;if(Array.isArray(t))for(let a=0;a<t.length;a++)s+=t[a];else s+=t;return s})}getSeriesTotalsXRange(e,t){const s=this.w;return s.seriesData.series.map((a,i)=>{let r=0;for(let o=0;o<a.length;o++)s.seriesData.seriesX[i][o]>e&&s.seriesData.seriesX[i][o]<t&&(r+=a[o]);return r})}getPercentSeries(){const e=this.w;e.globals.seriesPercent=e.seriesData.series.map(t=>{const s=[];if(Array.isArray(t))for(let a=0;a<t.length;a++){const i=e.seriesData.stackedSeriesTotals[a];let r=0;i&&(r=100*t[a]/i),s.push(r)}else{const a=e.globals.seriesTotals.reduce((r,o)=>r+o,0),i=100*t/a;s.push(i)}return s})}getCalculatedRatios(){const e=this.w,t=e.globals,s=[];let a=0,i=0,r=0,o=0,l=[],n=.1,h=0;if(t.yRange=[],t.isMultipleYAxis)for(let c=0;c<t.minYArr.length;c++)t.yRange.push(Math.abs(t.minYArr[c]-t.maxYArr[c])),l.push(0);else t.yRange.push(Math.abs(t.minY-t.maxY));t.xRange=Math.abs(t.maxX-t.minX),t.zRange=Math.abs(t.maxZ-t.minZ);for(let c=0;c<t.yRange.length;c++)s.push(t.yRange[c]/this.w.layout.gridHeight);if(i=t.xRange/this.w.layout.gridWidth,a=t.yRange/this.w.layout.gridWidth,r=t.xRange/this.w.layout.gridHeight,o=t.zRange/this.w.layout.gridHeight*16,o||(o=1),t.minY!==Number.MIN_VALUE&&Math.abs(t.minY)!==0&&(t.hasNegs=!0),e.globals.seriesYAxisReverseMap.length>0){const c=(d,u)=>{const g=e.config.yaxis[e.globals.seriesYAxisReverseMap[u]],p=d<0?-1:1;return d=Math.abs(d),g.logarithmic&&(d=this.getBaseLog(g.logBase,d)),-p*d/s[u]};if(t.isMultipleYAxis){l=[];for(let d=0;d<s.length;d++)l.push(c(t.minYArr[d],d))}else l=[],l.push(c(t.minY,0)),t.minY!==Number.MIN_VALUE&&Math.abs(t.minY)!==0&&(n=-t.minY/a,h=t.minX/i)}else l=[],l.push(0),n=0,h=0;return{yRatio:s,invertedYRatio:a,zRatio:o,xRatio:i,invertedXRatio:r,baseLineInvertedY:n,baseLineY:l,baseLineX:h}}getLogSeries(e){const t=this.w;return t.globals.seriesLog=e.map((s,a)=>{const i=t.globals.seriesYAxisReverseMap[a];return t.config.yaxis[i]&&t.config.yaxis[i].logarithmic?s.map(r=>r===null?null:this.getLogVal(t.config.yaxis[i].logBase,r,a)):s}),t.globals.invalidLogScale?e:t.globals.seriesLog}getLogValAtSeriesIndex(e,t){if(e===null)return null;const s=this.w,a=s.globals.seriesYAxisReverseMap[t];return s.config.yaxis[a]&&s.config.yaxis[a].logarithmic?this.getLogVal(s.config.yaxis[a].logBase,e,t):e}getBaseLog(e,t){return Math.log(t)/Math.log(e)}getLogVal(e,t,s){if(t<=0)return 0;const a=this.w,i=a.globals.minYArr[s]===0?-1:this.getBaseLog(e,a.globals.minYArr[s]),r=(a.globals.maxYArr[s]===0?0:this.getBaseLog(e,a.globals.maxYArr[s]))-i;return t<1?t/r:(this.getBaseLog(e,t)-i)/r}getLogYRatios(e){const t=this.w,s=this.w.globals;return s.yLogRatio=e.slice(),s.logYRange=s.yRange.map((a,i)=>{const r=t.globals.seriesYAxisReverseMap[i];if(t.config.yaxis[r]&&this.w.config.yaxis[r].logarithmic){let o=-Number.MAX_VALUE,l=Number.MIN_VALUE,n=1;return s.seriesLog.forEach((h,c)=>{h.forEach(d=>{t.config.yaxis[c]&&t.config.yaxis[c].logarithmic&&(o=Math.max(d,o),l=Math.min(d,l))})}),n=Math.pow(s.yRange[i],Math.abs(l-o)/s.yRange[i]),s.yLogRatio[i]=n/this.w.layout.gridHeight,n}}),s.invalidLogScale?e.slice():s.yLogRatio}static extendArrayProps(e,t,s){var a,i;return t!=null&&t.yaxis&&(t=e.extendYAxis(t,s)),t!=null&&t.annotations&&(t.annotations.yaxis&&(t=e.extendYAxisAnnotations(t)),(a=t==null?void 0:t.annotations)!=null&&a.xaxis&&(t=e.extendXAxisAnnotations(t)),(i=t==null?void 0:t.annotations)!=null&&i.points&&(t=e.extendPointAnnotations(t))),t}drawSeriesByGroup(e,t,s,a){const i=this.w,r=[];return e.series.length>0&&t.forEach(o=>{const l=[],n=[];
10e.i.forEach((h,c)=>{i.config.series[h].group===o&&(l.push(e.series[c]),n.push(h))}),l.length>0&&r.push(a.draw(l,s,n))}),r}}class xe{constructor(e,t){this.w=e,this.ctx=t}animateLine(e,t,s,a){e.attr(t).animate(a).attr(s)}animateMarker(e,t,s,a){e.attr({opacity:0}).animate(t).attr({opacity:1}).after(()=>{a()})}animateRect(e,t,s,a,i){e.attr(t).animate(a).attr(s).after(()=>i())}animatePathsGradually(e){const{el:t,realIndex:s,j:a,fill:i,pathFrom:r,pathTo:o,speed:l,delay:n}=e,h=this,c=this.w;let d=0;c.config.chart.animations.animateGradually.enabled&&(d=c.config.chart.animations.animateGradually.delay),c.config.chart.animations.dynamicAnimation.enabled&&c.globals.dataChanged&&c.config.chart.type!=="bar"&&(d=0),h.morphSVG(t,s,a,c.config.chart.type==="line"&&!c.globals.comboCharts?"stroke":i,r,o,l,n*d)}showDelayedElements(){this.w.globals.delayedElements.forEach(e=>{const t=e.el;t.classList.remove("apexcharts-element-hidden"),t.classList.add("apexcharts-hidden-element-shown")})}animationCompleted(e){const t=this.w;t.globals.animationEnded||(t.globals.animationEnded=!0,this.showDelayedElements(),typeof t.config.chart.events.animationEnd=="function"&&t.config.chart.events.animationEnd(this.ctx,{el:e,w:t}))}morphSVG(e,t,s,a,i,r,o,l){const n=this.w;i||(i=e.attr("pathFrom")),r||(r=e.attr("pathTo"));const h=()=>(n.config.chart.type==="radar"&&(o=1),`M 0 ${n.layout.gridHeight}`);(!i||i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i=h()),(!r.trim()||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=h()),n.globals.shouldAnimate||(o=1),e.plot(i).animate(1,l).plot(i).animate(o,l).plot(r).after(()=>{D.isNumber(s)?s===n.seriesData.series[n.globals.maxValsInArrayIndex].length-2&&n.globals.shouldAnimate&&this.animationCompleted(e):a!=="none"&&n.globals.shouldAnimate&&(!n.globals.comboCharts&&t===n.seriesData.series.length-1||n.globals.comboCharts)&&this.animationCompleted(e),this.showDelayedElements()})}}class q{constructor(e){this.w=e}getDefaultFilter(e,t){const s=this.w;e.unfilter&&e.unfilter(!0),s.config.chart.dropShadow.enabled&&this.dropShadow(e,s.config.chart.dropShadow,t)}applyFilter(e,t,s){var a,i,r;const o=this.w;if(e.unfilter&&e.unfilter(!0),s==="none"){this.getDefaultFilter(e,t);return}const l=o.config.chart.dropShadow,n=s==="lighten"?2:.3;e.filterWith&&(e.filterWith(h=>{h.colorMatrix({type:"matrix",values:` 11 ${n} 0 0 0 0 12 0 ${n} 0 0 0 13 0 0 ${n} 0 0 14 0 0 0 1 0 15 `,in:"SourceGraphic",result:"brightness"}),l.enabled&&this.addShadow(h,t,l,"brightness")}),l.noUserSpaceOnUse||(i=(a=e.filterer())==null?void 0:a.node)==null||i.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize((r=e.filterer())==null?void 0:r.node))}addShadow(e,t,s,a){var i;const r=this.w;let{blur:o,top:l,left:n,color:h,opacity:c}=s;if(h=Array.isArray(h)?h[t]:h,((i=r.config.chart.dropShadow.enabledOnSeries)==null?void 0:i.length)>0&&r.config.chart.dropShadow.enabledOnSeries.indexOf(t)===-1)return e;e.offset({in:a,dx:n,dy:l,result:"offset"}),e.gaussianBlur({in:"offset",stdDeviation:o,result:"blur"}),e.flood({"flood-color":h,"flood-opacity":c,result:"flood"}),e.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),e.merge(["shadow",a])}dropShadow(e,t,s=0){var a,i,r,o,l;const n=this.w;return e.unfilter&&e.unfilter(!0),D.isMsEdge()&&n.config.chart.type==="radialBar"||((a=n.config.chart.dropShadow.enabledOnSeries)==null?void 0:a.length)>0&&((i=n.config.chart.dropShadow.enabledOnSeries)==null?void 0:i.indexOf(s))===-1||e.filterWith&&(e.filterWith(h=>{this.addShadow(h,s,t,"SourceGraphic")}),t.noUserSpaceOnUse||(o=(r=e.filterer())==null?void 0:r.node)==null||o.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize((l=e.filterer())==null?void 0:l.node)),e}setSelectionFilter(e,t,s){const a=this.w;if(typeof a.interact.selectedDataPoints[t]<"u"&&a.interact.selectedDataPoints[t].indexOf(s)>-1){e.node.setAttribute("selected",!0);const i=a.config.states.active.filter;i!=="none"&&this.applyFilter(e,t,i.type)}}_scaleFilterSize(e){e&&(t=>{for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.setAttribute(s,t[s])})({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}class I{constructor(e,t=null){this.w=e,this.ctx=t}roundPathCorners(e,t){e.indexOf("NaN")>-1&&(e="");function s(S,k,M){var P=k.x-S.x,T=k.y-S.y,X=Math.sqrt(P*P+T*T);return a(S,k,Math.min(1,M/X))}function a(S,k,M){return{x:S.x+(k.x-S.x)*M,y:S.y+(k.y-S.y)*M}}function i(S,k){S.length>2&&(S[S.length-2]=k.x,S[S.length-1]=k.y)}function r(S){return{x:parseFloat(S[S.length-2]),y:parseFloat(S[S.length-1])}}var o=e.split(/[,\s]/).reduce(function(S,k){var M=k.match(/^([a-zA-Z])(.+)/);return M?(S.push(M[1]),S.push(M[2])):S.push(k),S},[]),l=o.reduce(function(S,k){return parseFloat(k)==k&&S.length?S[S.length-1].push(k):S.push([k]),S},[]),n=[];if(l.length>1){var h=r(l[0]),c=null;l[l.length-1][0]=="Z"&&l[0].length>2&&(c=["L",h.x,h.y],l[l.length-1]=c),n.push(l[0]);for(var d=1;d<l.length;d++){var u=n[n.length-1],g=l[d],p=g==c?l[1]:l[d+1];if(p&&u&&u.length>2&&g[0]=="L"&&p.length>2&&p[0]=="L"){var b=r(u),f=r(g),m=r(p),v,y;v=s(f,b,t),y=s(f,m,t),i(g,v),g.origPoint=f,n.push(g);var w=a(v,f,.5),C=a(f,y,.5),A=["C",w.x,w.y,C.x,C.y,y.x,y.y];A.origPoint=f,n.push(A)}else n.push(g)}if(c){var L=r(n[n.length-1]);n.push(["Z"]),i(n[0],L)}}else n=l;return n.reduce(function(S,k){return S+k.join(" ")+" "},"")}drawLine(e,t,s,a,i="#a8a8a8",r=0,o=null,l="butt"){return this.w.dom.Paper.line().attr({x1:e,y1:t,x2:s,y2:a,stroke:i,"stroke-dasharray":r,"stroke-width":o,"stroke-linecap":l})}drawRect(e=0,t=0,s=0,a=0,i=0,r="#fefefe",o=1,l=null,n=null,h=0){const c=this.w.dom.Paper.rect();return c.attr({x:e,y:t,width:s>0?s:0,height:a>0?a:0,rx:i,ry:i,opacity:o,"stroke-width":l!==null?l:0,stroke:n!==null?n:"none","stroke-dasharray":h}),c.node.setAttribute("fill",r),c}drawPolygon(e,t="#e1e1e1",s=1,a="none"){return this.w.dom.Paper.polygon(e).attr({fill:a,stroke:t,"stroke-width":s})}drawCircle(e,t=null){const s=this.w;e<0&&(e=0);const a=s.dom.Paper.circle(e*2);return t!==null&&a.attr(t),a}drawPath({d:e="",stroke:t="#a8a8a8",strokeWidth:s=1,fill:a,fillOpacity:i=1,strokeOpacity:r=1,classes:o,strokeLinecap:l=null,strokeDashArray:n=0}){const h=this.w;return l===null&&(l=h.config.stroke.lineCap),(e.indexOf("undefined")>-1||e.indexOf("NaN")>-1)&&(e=`M 0 ${h.layout.gridHeight}`),h.dom.Paper.path(e).attr({fill:a,"fill-opacity":i,stroke:t,"stroke-opacity":r,"stroke-linecap":l,"stroke-width":s,"stroke-dasharray":n,class:o})}group(e=null){const t=this.w.dom.Paper.group();return e!==null&&t.attr(e),t}move(e,t){return["M",e,t].join(" ")}line(e,t,s=null){let a=null;return s===null?a=[" L",e,t].join(" "):s==="H"?a=[" H",e].join(" "):s==="V"&&(a=[" V",t].join(" ")),a}curve(e,t,s,a,i,r){return["C",e,t,s,a,i,r].join(" ")}quadraticCurve(e,t,s,a){return["Q",e,t,s,a].join(" ")}arc(e,t,s,a,i,r,o,l=!1){let n="A";return l&&(n="a"),[n,e,t,s,a,i,r,o].join(" ")}renderPaths({j:e,realIndex:t,pathFrom:s,pathTo:a,stroke:i,strokeWidth:r,strokeLinecap:o,fill:l,animationDelay:n,initialSpeed:h,dataChangeSpeed:c,className:d,chartType:u,shouldClipToGrid:g=!0,bindEventsOnPaths:p=!0,drawShadow:b=!0}){const f=this.w,m=new q(this.w),v=new xe(this.w),y=this.w.config.chart.animations.enabled,w=y&&this.w.config.chart.animations.dynamicAnimation.enabled;if(s&&s.startsWith("M 0 0")&&a){const P=a.match(/^M\s+[\d.-]+\s+[\d.-]+/);P&&(s=s.replace(/^M\s+0\s+0/,P[0]))}let C;const A=!!(y&&!f.globals.resized||w&&f.globals.dataChanged&&f.globals.shouldAnimate);A?C=s:(C=a,f.globals.animationEnded=!0);const L=f.config.stroke.dashArray;let S=0;Array.isArray(L)?S=L[t]:S=f.config.stroke.dashArray;const k=this.drawPath({d:C,stroke:i,strokeWidth:r,fill:l,fillOpacity:1,classes:d,strokeLinecap:o,strokeDashArray:S});k.attr("index",t),g&&(u==="bar"&&!f.globals.isHorizontal||f.globals.comboCharts?k.attr({"clip-path":`url(#gridRectBarMask${f.globals.cuid})`}):k.attr({"clip-path":`url(#gridRectMask${f.globals.cuid})`})),f.config.chart.dropShadow.enabled&&b&&m.dropShadow(k,f.config.chart.dropShadow,t),p&&(k.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,k)),k.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,k)),k.node.addEventListener("mousedown",this.pathMouseDown.bind(this,k))),k.attr({pathTo:a,pathFrom:s});const M={el:k,j:e,realIndex:t,pathFrom:s,pathTo:a,fill:l,strokeWidth:r,delay:n};return y&&!f.globals.resized&&!f.globals.dataChanged?v.animatePathsGradually(O(R({},M),{speed:h}
15)):(f.globals.resized||!f.globals.dataChanged)&&v.showDelayedElements(),f.globals.dataChanged&&w&&A&&v.animatePathsGradually(O(R({},M),{speed:c})),k}drawPattern(e,t,s,a="#a8a8a8",i=0){return this.w.dom.Paper.pattern(t,s,r=>{e==="horizontalLines"?r.line(0,0,s,0).stroke({color:a,width:i+1}):e==="verticalLines"?r.line(0,0,0,t).stroke({color:a,width:i+1}):e==="slantedLines"?r.line(0,0,t,s).stroke({color:a,width:i}):e==="squares"?r.rect(t,s).fill("none").stroke({color:a,width:i}):e==="circles"&&r.circle(t).fill("none").stroke({color:a,width:i})})}drawGradient(e,t,s,a,i,r=null,o=null,l=[],n=0){const h=this.w;let c;t.length<9&&t.indexOf("#")===0&&(t=D.hexToRgba(t,a)),s.length<9&&s.indexOf("#")===0&&(s=D.hexToRgba(s,i));let d=0,u=1,g=1,p=null;o!==null&&(d=typeof o[0]<"u"?o[0]/100:0,u=typeof o[1]<"u"?o[1]/100:1,g=typeof o[2]<"u"?o[2]/100:1,p=typeof o[3]<"u"?o[3]/100:null);const b=h.config.chart.type==="donut"||h.config.chart.type==="pie"||h.config.chart.type==="polarArea"||h.config.chart.type==="bubble";if(!l||l.length===0?c=h.dom.Paper.gradient(b?"radial":"linear",f=>{f.stop(d,t,a),f.stop(u,s,i),f.stop(g,s,i),p!==null&&f.stop(p,t,a)}):c=h.dom.Paper.gradient(b?"radial":"linear",f=>{(Array.isArray(l[n])?l[n]:l).forEach(m=>{f.stop(m.offset/100,m.color,m.opacity)})}),!b)e==="vertical"?c.from(0,0).to(0,1):e==="diagonal"?c.from(0,0).to(1,1):e==="horizontal"?c.from(0,1).to(1,1):e==="diagonal2"&&c.from(1,0).to(0,1);else{const f=h.layout.gridWidth/2,m=h.layout.gridHeight/2;h.config.chart.type!=="bubble"?c.attr({gradientUnits:"userSpaceOnUse",cx:f,cy:m,r}):c.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}return c}getTextBasedOnMaxWidth({text:e,maxWidth:t,fontSize:s,fontFamily:a}){const i=this.getTextRects(e,s,a),r=i.width/e.length,o=Math.floor(t/r);return t<i.width?e.slice(0,o-3)+"...":e}drawText({x:e,y:t,text:s,textAnchor:a,fontSize:i,fontFamily:r,fontWeight:o,foreColor:l,opacity:n,maxWidth:h,cssClass:c="",isPlainText:d=!0,dominantBaseline:u="auto"}){const g=this.w;typeof s>"u"&&(s="");let p=s;a||(a="start"),(!l||!l.length)&&(l=g.config.chart.foreColor),r=r||g.config.chart.fontFamily,i=i||"11px",o=o||"regular";const b={maxWidth:h,fontSize:i,fontFamily:r};let f;return Array.isArray(s)?f=g.dom.Paper.text(m=>{for(let v=0;v<s.length;v++)p=s[v],h&&(p=this.getTextBasedOnMaxWidth(R({text:s[v]},b))),v===0?m.tspan(p):m.tspan(p).newLine()}):(h&&(p=this.getTextBasedOnMaxWidth(R({text:s},b))),f=d?g.dom.Paper.plain(s):g.dom.Paper.text(m=>m.tspan(p))),f.attr({x:e,y:t,"text-anchor":a,"dominant-baseline":u,"font-size":i,"font-family":r,"font-weight":o,fill:l,class:"apexcharts-text "+c}),f.node.style.fontFamily=r,f.node.style.opacity=n,f}getMarkerPath(e,t,s,a){let i="";switch(s){case"cross":a=a/1.4,i=`M ${e-a} ${t-a} L ${e+a} ${t+a} M ${e-a} ${t+a} L ${e+a} ${t-a}`;break;case"plus":a=a/1.12,i=`M ${e-a} ${t} L ${e+a} ${t} M ${e} ${t-a} L ${e} ${t+a}`;break;case"star":case"sparkle":{let r=5;a=a*1.15,s==="sparkle"&&(a=a/1.1,r=4);const o=Math.PI/r;for(let l=0;l<=2*r;l++){const n=l*o,h=l%2===0?a:a/2,c=e+h*Math.sin(n),d=t-h*Math.cos(n);i+=(l===0?"M":"L")+c+","+d}i+="Z";break}case"triangle":i=`M ${e} ${t-a} 16 L ${e+a} ${t+a} 17 L ${e-a} ${t+a} 18 Z`;break;case"square":case"rect":a=a/1.125,i=`M ${e-a} ${t-a} 19 L ${e+a} ${t-a} 20 L ${e+a} ${t+a} 21 L ${e-a} ${t+a} 22 Z`;break;case"diamond":a=a*1.05,i=`M ${e} ${t-a} 23 L ${e+a} ${t} 24 L ${e} ${t+a} 25 L ${e-a} ${t} 26 Z`;break;case"line":a=a/1.1,i=`M ${e-a} ${t} 27 L ${e+a} ${t}`;break;case"circle":default:a=a*2,i=`M ${e}, ${t} 28 m -${a/2}, 0 29 a ${a/2},${a/2} 0 1,0 ${a},0 30 a ${a/2},${a/2} 0 1,0 -${a},0`;break}return i}drawMarkerShape(e,t,s,a,i){const r=this.drawPath({d:this.getMarkerPath(e,t,s,a,i),stroke:i.pointStrokeColor,strokeDashArray:i.pointStrokeDashArray,strokeWidth:i.pointStrokeWidth,fill:i.pointFillColor,fillOpacity:i.pointFillOpacity,strokeOpacity:i.pointStrokeOpacity});return r.attr({cx:e,cy:t,shape:i.shape,class:i.class?i.class:""}),r}drawMarker(e,t,s){e=e||0;let a=s.pSize||0;return D.isNumber(t)||(a=0,t=0),this.drawMarkerShape(e,t,s==null?void 0:s.shape,a,R(R({},s),s.shape==="line"||s.shape==="plus"||s.shape==="cross"?{pointStrokeColor:s.pointFillColor,pointStrokeOpacity:s.pointFillOpacity}:{}))}pathMouseEnter(e,t){const s=this.w,a=new q(this.w),i=parseInt(e.node.getAttribute("index"),10),r=parseInt(e.node.getAttribute("j"),10);if(typeof s.config.chart.events.dataPointMouseEnter=="function"&&s.config.chart.events.dataPointMouseEnter(t,this.ctx,{seriesIndex:i,dataPointIndex:r,w:s}),I._fireEvent(s,"dataPointMouseEnter",[t,this.ctx,{seriesIndex:i,dataPointIndex:r,w:s}]),!(s.config.states.active.filter.type!=="none"&&e.node.getAttribute("selected")==="true")&&s.config.states.hover.f
30ilter.type!=="none"&&!s.interact.isTouchDevice){const o=s.config.states.hover.filter;a.applyFilter(e,i,o.type)}}pathMouseLeave(e,t){const s=this.w,a=new q(this.w),i=parseInt(e.node.getAttribute("index"),10),r=parseInt(e.node.getAttribute("j"),10);typeof s.config.chart.events.dataPointMouseLeave=="function"&&s.config.chart.events.dataPointMouseLeave(t,this.ctx,{seriesIndex:i,dataPointIndex:r,w:s}),I._fireEvent(s,"dataPointMouseLeave",[t,this.ctx,{seriesIndex:i,dataPointIndex:r,w:s}]),!(s.config.states.active.filter.type!=="none"&&e.node.getAttribute("selected")==="true")&&s.config.states.hover.filter.type!=="none"&&a.getDefaultFilter(e,i)}pathMouseDown(e,t){const s=this.w,a=new q(this.w),i=parseInt(e.node.getAttribute("index"),10),r=parseInt(e.node.getAttribute("j"),10);let o="false";if(e.node.getAttribute("selected")==="true"){if(e.node.setAttribute("selected","false"),s.interact.selectedDataPoints[i].indexOf(r)>-1){const l=s.interact.selectedDataPoints[i].indexOf(r);s.interact.selectedDataPoints[i].splice(l,1)}}else{if(!s.config.states.active.allowMultipleDataPointsSelection&&s.interact.selectedDataPoints.length>0){s.interact.selectedDataPoints=[];const l=s.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),n=s.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),h=c=>{Array.prototype.forEach.call(c,d=>{d.node.setAttribute("selected","false"),a.getDefaultFilter(d,i)})};h(l),h(n)}e.node.setAttribute("selected","true"),o="true",typeof s.interact.selectedDataPoints[i]>"u"&&(s.interact.selectedDataPoints[i]=[]),s.interact.selectedDataPoints[i].push(r)}if(o==="true"){const l=s.config.states.active.filter;if(l!=="none")a.applyFilter(e,i,l.type);else if(s.config.states.hover.filter!=="none"&&!s.interact.isTouchDevice){const n=s.config.states.hover.filter;a.applyFilter(e,i,n.type)}}else if(s.config.states.active.filter.type!=="none")if(s.config.states.hover.filter.type!=="none"&&!s.interact.isTouchDevice){const l=s.config.states.hover.filter;a.applyFilter(e,i,l.type)}else a.getDefaultFilter(e,i);typeof s.config.chart.events.dataPointSelection=="function"&&s.config.chart.events.dataPointSelection(t,this.ctx,{selectedDataPoints:s.interact.selectedDataPoints,seriesIndex:i,dataPointIndex:r,w:s}),t&&I._fireEvent(s,"dataPointSelection",[t,this.ctx,{selectedDataPoints:s.interact.selectedDataPoints,seriesIndex:i,dataPointIndex:r,w:s}])}rotateAroundCenter(e){let t={};e&&typeof e.getBBox=="function"&&(t=e.getBBox());const s=t.x+t.width/2,a=t.y+t.height/2;return{x:s,y:a}}setupEventDelegation(e,t){let s=null;e.node.addEventListener("mouseover",a=>{const i=I._findDelegateTarget(a.target,e.node,t);!i||i===s||(s&&s.instance&&this.pathMouseLeave(s.instance,a),s=i,i.instance&&this.pathMouseEnter(i.instance,a))}),e.node.addEventListener("mouseout",a=>{s&&(a.relatedTarget?I._findDelegateTarget(a.relatedTarget,e.node,t):null)!==s&&(s&&s.instance&&this.pathMouseLeave(s.instance,a),s=null)}),e.node.addEventListener("mousedown",a=>{const i=I._findDelegateTarget(a.target,e.node,t);i&&i.instance&&this.pathMouseDown(i.instance,a)})}static _fireEvent(e,t,s){const a=e.globals.events;if(!a||!Object.prototype.hasOwnProperty.call(a,t))return;const i=a[t];for(let r=0;r<i.length;r++)i[r].apply(null,s)}static _findDelegateTarget(e,t,s){for(;e&&e!==t&&e!==document;){if(e.matches&&e.matches(s))return e;e=e.parentNode}return null}static setAttrs(e,t){for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.setAttribute(s,t[s])}getTextRects(e,t,s,a,i=!0){const r=this.w,o=`${e}|${t}|${s}|${a}|${i}`,l=r.globals.textRectsCache;if(l&&l.has(o))return l.get(o);const n=this.drawText({x:-200,y:-200,text:e,textAnchor:"start",fontSize:t,fontFamily:s,foreColor:"#fff",opacity:0});a&&n.attr("transform",a),r.dom.Paper.add(n);let h=n.bbox();i||(h=n.node.getBoundingClientRect()),n.remove();const c={width:h.width,height:h.height};return l&&l.set(o,c),c}placeTextWithEllipsis(e,t,s){if(typeof e.getComputedTextLength=="function"&&(e.textContent=t,t.length>0&&e.getComputedTextLength()>=s/1.1)){for(let a=t.length-3;a>0;a-=3)if(e.getSubStringLength(0,a)<=s/1.1){e.textContent=t.substring(0,a)+"...";return}e.textContent="."}}}const _="http://www.w3.org/2000/svg";class ee{constructor(e,t){typeof e=="object"?(this.x=e.x,this.y=e.y):(this.x=e||0,this.y=t||0)}transform(e){return e.apply(this)}clone(){return new ee(this.x,this.y)}}class ne{constructor(e,t,s,a,i,r){this.a=e??1,this.b=t??0,this.c=s??0,this.d=a??1,this.e=i??0,this.f=r??0}rotate(e){const t=e*Math.PI/180,s=Math.cos(t),a=Math.sin(t);return this.multiply(new ne(s,a,-a,s,0,0))}scale(e,t){return this.multiply(new ne(e,0,0,t??e,0,0))}multiply(e){return new ne(this.a*e.a+this.c*e.b,this.b*e.a+this.d*e.b,this.a*e.c+this.c*e.d,this.b*e.c+this.d*e.d,this.a*e.e+this.c*e.f+this.e,this.b*e.e+this.d*e.f+this.f)}
30apply(e){return new ee(this.a*e.x+this.c*e.y+this.e,this.b*e.x+this.d*e.y+this.f)}}class Ht{constructor(e,t,s,a){this.x=e,this.y=t,this.w=s,this.h=a,this.width=s,this.height=a,this.x2=e+s,this.y2=t+a}}class te{constructor(e){this.w=e,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}clippedImgArea(e){const t=this.w,s=t.config,a=parseInt(t.layout.gridWidth,10),i=parseInt(t.layout.gridHeight,10),r=a>i?a:i,o=e.image;let l=0,n=0;typeof e.width>"u"&&typeof e.height>"u"?s.fill.image.width!==void 0&&s.fill.image.height!==void 0?(l=s.fill.image.width+1,n=s.fill.image.height):(l=r+1,n=r):(l=e.width,n=e.height);const h=H.createElementNS(_,"pattern");I.setAttrs(h,{id:e.patternID,patternUnits:e.patternUnits?e.patternUnits:"userSpaceOnUse",width:l+"px",height:n+"px"});const c=H.createElementNS(_,"image");h.appendChild(c);const d=z.isBrowser()?window.SVG:global.SVG;c.setAttributeNS(d.xlink,"href",o),I.setAttrs(c,{x:0,y:0,preserveAspectRatio:"none",width:l+"px",height:n+"px"}),c.style.opacity=e.opacity,t.dom.elDefs.node.appendChild(h)}getSeriesIndex(e){const t=this.w,s=t.config.chart.type;return(s==="bar"||s==="rangeBar")&&t.config.plotOptions.bar.distributed||s==="heatmap"||s==="treemap"?this.seriesIndex=e.seriesNumber:this.seriesIndex=e.seriesNumber%t.seriesData.series.length,this.seriesIndex}computeColorStops(e,t){const s=this.w;let a=null,i=null;for(const l of e)l>=t.threshold?(a===null||l>a)&&(a=l):(i===null||l<i)&&(i=l);a===null&&(a=t.threshold),i===null&&(i=t.threshold);let r=a-t.threshold+(t.threshold-i);r===0&&(r=1);let o=100-(t.threshold-i)/r*100;return o=Math.max(0,Math.min(o,100)),[{offset:o,color:t.colorAboveThreshold,opacity:s.config.fill.opacity},{offset:0,color:t.colorBelowThreshold,opacity:s.config.fill.opacity}]}fillPath(e){var t,s,a,i,r,o;const l=this.w;this.opts=e;const n=this.w.config;let h,c,d;this.seriesIndex=this.getSeriesIndex(e);const u=n.plotOptions.line.colors.colorAboveThreshold&&n.plotOptions.line.colors.colorBelowThreshold;let g=this.getFillColors()[this.seriesIndex];l.seriesData.seriesColors[this.seriesIndex]!==void 0&&(g=l.seriesData.seriesColors[this.seriesIndex]),typeof g=="function"&&(g=g({seriesIndex:this.seriesIndex,dataPointIndex:e.dataPointIndex,value:e.value,w:l}));const p=e.fillType?e.fillType:this.getFillType(this.seriesIndex);let b=Array.isArray(n.fill.opacity)?n.fill.opacity[this.seriesIndex]:n.fill.opacity;const f=p==="gradient"||u;e.color&&(g=e.color),(a=(s=(t=l.config.series[this.seriesIndex])==null?void 0:t.data)==null?void 0:s[e.dataPointIndex])!=null&&a.fillColor&&(g=(o=(r=(i=l.config.series[this.seriesIndex])==null?void 0:i.data)==null?void 0:r[e.dataPointIndex])==null?void 0:o.fillColor),g||(g="#fff",console.warn("undefined color - ApexCharts")),D.isCSSVariable(g)&&(g=D.getThemeColor(g));let m=g;if(g.indexOf("rgb")===-1?g.indexOf("#")===-1?m=g:g.length<9&&(m=D.hexToRgba(g,b)):g.indexOf("rgba")>-1?b=D.getOpacityFromRGBA(g):m=D.hexToRgba(D.rgb2hex(g),b),e.opacity&&(b=e.opacity),p==="pattern"&&(c=this.handlePatternFill({fillConfig:e.fillConfig,patternFill:c,fillColor:g,fillOpacity:b,defaultColor:m})),f){const v=n.fill.gradient.colorStops?[...n.fill.gradient.colorStops]:[];let y=n.fill.gradient.type;u&&(v[this.seriesIndex]=this.computeColorStops(l.seriesData.series[this.seriesIndex],n.plotOptions.line.colors),y="vertical"),d=this.handleGradientFill({type:y,fillConfig:e.fillConfig,fillColor:g,fillOpacity:b,colorStops:v,i:this.seriesIndex})}if(p==="image"){const v=n.fill.image.src,y=e.patternID?e.patternID:"",w=`pattern${l.globals.cuid}${e.seriesNumber+1}${y}`;this.patternIDs.indexOf(w)===-1&&(this.clippedImgArea({opacity:b,image:Array.isArray(v)?e.seriesNumber<v.length?v[e.seriesNumber]:v[0]:v,width:e.width?e.width:void 0,height:e.height?e.height:void 0,patternUnits:e.patternUnits,patternID:w}),this.patternIDs.push(w)),h=`url(#${w})`}else f?h=d:p==="pattern"?h=c:h=m;return e.solid&&(h=m),h}getFillType(e){const t=this.w;return Array.isArray(t.config.fill.type)?t.config.fill.type[e]:t.config.fill.type}getFillColors(){const e=this.w,t=e.config,s=this.opts;let a=[];return e.globals.comboCharts?e.config.series[this.seriesIndex].type==="line"?Array.isArray(e.globals.stroke.colors)?a=e.globals.stroke.colors:a.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?a=e.globals.fill.colors:a.push(e.globals.fill.colors):t.chart.type==="line"?Array.isArray(e.globals.stroke.colors)?a=e.globals.stroke.colors:a.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?a=e.globals.fill.colors:a.push(e.globals.fill.colors),typeof s.fillColors<"u"&&(a=[],Array.isArray(s.fillColors)?a=s.fillColors.slice():a.push(s.fillColors)),a}handlePatternFill({fillConfig:e,patternFill:t,fillColor:s,fillOpacity:a,defaultColor:i}){let r=this.w.config.fill;e&&(r=e);const o=this.opts,l=new I(this.w),n=Array.isArray(r.pattern.strokeWidth)?r.pattern.strokeWidth[this.seriesIndex]:r.pattern.strokeWidth,h=s;return Array.isArray(r.pattern.style)?typeof r.pattern.style[o.seriesNumber]<"u"?t=l.drawPattern(r.pattern.style[o.seriesNumber],r.pattern.width,r.pattern.height,h,n,a):t=i:t=l.drawPattern(r.pattern.style,r.pattern.width,r.pattern.height,h,n,a),t}handleGradientFill({type:e,fillColor:t,fillOpacity:s,fillConfig:a,colorStops:i,i:r}){let o=this.w.config.fill;a&&(o=R(R({},o),a));const l=this.opts,n=new I(this.w),h=new D;e=e||o.gradient.type;let c=t,d,u=o.gradient.opacityFrom===void 0?s:Array.isArray(o.gradient.opacityFrom)?o.gradient.opacityFrom[r]:o.gradient.opacityFrom;c.indexOf("rgba")>-1&&(u=D.getOpacityFromRGBA(c));let g=o.gradient.opacityTo===void 0?s:Array.isArray(o.gradient.opacityTo)?o.gradient.opacityTo[r]:o.gradient.opacityTo;
30if(o.gradient.gradientToColors===void 0||o.gradient.gradientToColors.length===0)o.gradient.shade==="dark"?d=h.shadeColor(parseFloat(o.gradient.shadeIntensity)*-1,t.indexOf("rgb")>-1?D.rgb2hex(t):t):d=h.shadeColor(parseFloat(o.gradient.shadeIntensity),t.indexOf("rgb")>-1?D.rgb2hex(t):t);else if(o.gradient.gradientToColors[l.seriesNumber]){const p=o.gradient.gradientToColors[l.seriesNumber];d=p,p.indexOf("rgba")>-1&&(g=D.getOpacityFromRGBA(p))}else d=t;if(o.gradient.gradientFrom&&(c=o.gradient.gradientFrom),o.gradient.gradientTo&&(d=o.gradient.gradientTo),o.gradient.inverseColors){const p=c;c=d,d=p}return c.indexOf("rgb")>-1&&(c=D.rgb2hex(c)),d.indexOf("rgb")>-1&&(d=D.rgb2hex(d)),n.drawGradient(e,c,d,u,g,l.size,o.gradient.stops,i,r)}}class fe{constructor(e,t){this.w=e,this.ctx=t,this._filters=new q(this.w),this._graphics=new I(this.w,this.ctx)}setGlobalMarkerSize(){const e=this.w;if(e.globals.markers.size=Array.isArray(e.config.markers.size)?e.config.markers.size:[e.config.markers.size],e.globals.markers.size.length>0){if(e.globals.markers.size.length<e.seriesData.series.length+1)for(let t=0;t<=e.seriesData.series.length;t++)typeof e.globals.markers.size[t]>"u"&&e.globals.markers.size.push(e.globals.markers.size[0])}else e.globals.markers.size=e.config.series.map(()=>e.config.markers.size)}plotChartMarkers({pointsPos:e,seriesIndex:t,j:s,pSize:a,alwaysDrawMarker:i=!1,isVirtualPoint:r=!1}){const o=this.w,l=t,n=e;let h=null;const c=new I(this.w),d=o.config.markers.discrete&&o.config.markers.discrete.length;if(Array.isArray(n.x))for(let u=0;u<n.x.length;u++){let g,p=s,b=!D.isNumber(n.y[u]);o.globals.markers.largestSize===0&&o.globals.hasNullValues&&o.seriesData.series[l][s+1]!==null&&!r&&(b=!0),s===1&&u===0&&(p=0),s===1&&u===1&&(p=1);let f="apexcharts-marker";if((o.config.chart.type==="line"||o.config.chart.type==="area")&&!o.globals.comboCharts&&!o.config.tooltip.intersect&&(f+=" no-pointer-events"),(Array.isArray(o.config.markers.size)?o.globals.markers.size[t]>0:o.config.markers.size>0)||i||d){b||(f+=` w${D.randomId()}`);const m=this.getMarkerConfig({cssClass:f,seriesIndex:t,dataPointIndex:p});o.config.series[l].data[p]&&(o.config.series[l].data[p].fillColor&&(m.pointFillColor=o.config.series[l].data[p].fillColor),o.config.series[l].data[p].strokeColor&&(m.pointStrokeColor=o.config.series[l].data[p].strokeColor)),typeof a<"u"&&(m.pSize=a),(n.x[u]<-o.globals.markers.largestSize||n.x[u]>o.layout.gridWidth+o.globals.markers.largestSize||n.y[u]<-o.globals.markers.largestSize||n.y[u]>o.layout.gridHeight+o.globals.markers.largestSize)&&(m.pSize=0),b||((o.globals.markers.size[t]>0||i||d)&&!h&&(h=c.group({class:i||d?"":"apexcharts-series-markers"}),h.attr("clip-path",`url(#gridRectMarkerMask${o.globals.cuid})`),this.setupMarkerDelegation(h)),g=c.drawMarker(n.x[u],n.y[u],m),g.attr("rel",p),g.attr("j",p),g.attr("index",t),g.node.setAttribute("default-marker-size",m.pSize),this._filters.setSelectionFilter(g,t,p),h&&h.add(g))}else typeof o.globals.pointsArray[t]>"u"&&(o.globals.pointsArray[t]=[]),o.globals.pointsArray[t].push([n.x[u],n.y[u]])}return h}getMarkerConfig({cssClass:e,seriesIndex:t,dataPointIndex:s=null,radius:a=null,size:i=null,strokeWidth:r=null}){const o=this.w,l=this.getMarkerStyle(t);let n=i===null?o.globals.markers.size[t]:i;const h=o.config.markers;return s!==null&&h.discrete.length&&h.discrete.map(c=>{c.seriesIndex===t&&c.dataPointIndex===s&&(l.pointStrokeColor=c.strokeColor,l.pointFillColor=c.fillColor,n=c.size,l.pointShape=c.shape)}),{pSize:a===null?n:a,pRadius:a!==null?a:h.radius,pointStrokeWidth:r!==null?r:Array.isArray(h.strokeWidth)?h.strokeWidth[t]:h.strokeWidth,pointStrokeColor:l.pointStrokeColor,pointFillColor:l.pointFillColor,shape:l.pointShape||(Array.isArray(h.shape)?h.shape[t]:h.shape),class:e,pointStrokeOpacity:Array.isArray(h.strokeOpacity)?h.strokeOpacity[t]:h.strokeOpacity,pointStrokeDashArray:Array.isArray(h.strokeDashArray)?h.strokeDashArray[t]:h.strokeDashArray,pointFillOpacity:Array.isArray(h.fillOpacity)?h.fillOpacity[t]:h.fillOpacity,seriesIndex:t}}setupMarkerDelegation(e){const t=this.w,s=".apexcharts-marker";this._graphics.setupEventDelegation(e,s),e.node.addEventListener("click",a=>{t.config.markers.onClick&&I._findDelegateTarget(a.target,e.node,s)&&t.config.markers.onClick(a)}),e.node.addEventListener("dblclick",a=>{t.config.markers.onDblClick&&I._findDelegateTarget(a.target,e.node,s)&&t.config.markers.onDblClick(a)}),e.node.addEventListener("touchstart",a=>{const i=I._findDelegateTarget(a.target,e.node,s);i&&i.instance&&this._graphics.pathMouseDown(i.instance,a)},{passive:!0})}addEvents(e){const t=this.w;e.node.addEventListener("mouseenter",this._graphics.pathMouseEnter.bind(this.ctx,e)),e.node.addEventListener("mouseleave",this._graphics.pathMouseLeave.bind(this.ctx,e)),e.node.addEventListener("mousedown",this._graphics.pathMouseDown.bind(this.ctx,e)),e.node.addEventListener("click",t.config.markers.onClick),e.node.addEventListener("dblclick",t.config.markers.onDblClick),e.node.addEventListener("touchstart",this._graphics.pathMouseDown.bind(this.ctx,e),{passive:!0})}getMarkerStyle(e){const t=this.w,s=t.globals.markers.colors,a=t.config.markers.strokeColor||t.config.markers.strokeColors,i=Array.isArray(a)?a[e]:a,r=Array.isArray(s)?s[e]:s;return{pointStrokeColor:i,pointFillColor:r}}}class gt{constructor(e,t){this.ctx=t,this.w=e,this.initialAnim=this.w.config.chart.animations.enabled,this.anim=new xe(this.w),this.filters=new q(this.w),this.fill=new te(this.w),this.markers=new fe(this.w,this.ctx),this.graphics=new I(this.w)}draw(e,t,s){const a=this.w,i=this.graphics,r=s.realIndex,o=s.pointsPos,l=s.zRatio,n=s.elParent,h=i.group({class:`apexcharts-series-markers apexcharts-series-${a.config.chart.type}`});if(h.attr("clip-path",`url(#gridRectMarkerMask${a.globals.cuid})`),this.markers.setupMarkerDelegation(h),Array.isArray(o.x))for(let c=0;c<o.x.length;c++){let d=t+1,u=!0;
30t===0&&c===0&&(d=0),t===0&&c===1&&(d=1);let g=a.globals.markers.size[r];if(l!==1/0){const f=a.config.plotOptions.bubble;g=a.seriesData.seriesZ[r][d],f.zScaling&&(g/=l),f.minBubbleRadius&&g<f.minBubbleRadius&&(g=f.minBubbleRadius),f.maxBubbleRadius&&g>f.maxBubbleRadius&&(g=f.maxBubbleRadius)}const p=o.x[c],b=o.y[c];if(g=g||0,(b===null||typeof a.seriesData.series[r][d]>"u")&&(u=!1),u){const f=this.drawPoint(p,b,g,r,d,t);h.add(f)}n.add(h)}}drawPoint(e,t,s,a,i,r){const o=this.w,l=a,n=this.anim,h=this.filters,c=this.fill,d=this.markers,u=this.graphics,g=d.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:i,radius:o.config.chart.type==="bubble"||o.globals.comboCharts&&o.config.series[a]&&o.config.series[a].type==="bubble"?s:null});let p=c.fillPath({seriesNumber:a,dataPointIndex:i,color:g.pointFillColor,patternUnits:"objectBoundingBox",value:o.seriesData.series[a][r]});const b=u.drawMarker(e,t,g);if(o.config.series[l].data[i]&&o.config.series[l].data[i].fillColor&&(p=o.config.series[l].data[i].fillColor),b.attr({fill:p}),o.config.chart.dropShadow.enabled){const f=o.config.chart.dropShadow;h.dropShadow(b,f,a)}if(this.initialAnim&&!o.globals.dataChanged&&!o.globals.resized){const f=o.config.chart.animations.speed;n.animateMarker(b,f,o.globals.easing,()=>{window.setTimeout(()=>{n.animationCompleted(b)},100)})}else o.globals.animationEnded=!0;return b.attr({rel:i,j:i,index:a,"default-marker-size":g.pSize}),h.setSelectionFilter(b,a,i),b.node.classList.add("apexcharts-marker"),b}centerTextInBubble(e){const t=this.w;return e=e+parseInt(t.config.dataLabels.style.fontSize,10)/4,{y:e}}}class ge{constructor(e,t=null){this.w=e,this.ctx=t}dataLabelsCorrection(e,t,s,a,i,r,o){const l=this.w,n=new I(this.w);let h=!1;const c=n.getTextRects(s,o),d=c.width,u=c.height;t<0&&(t=0),t>l.layout.gridHeight+u&&(t=l.layout.gridHeight+u/2),typeof l.globals.dataLabelsRects[a]>"u"&&(l.globals.dataLabelsRects[a]=[]),l.globals.dataLabelsRects[a].push({x:e,y:t,width:d,height:u});const g=l.globals.dataLabelsRects[a].length-2,p=typeof l.globals.lastDrawnDataLabelsIndexes[a]<"u"?l.globals.lastDrawnDataLabelsIndexes[a][l.globals.lastDrawnDataLabelsIndexes[a].length-1]:0;if(typeof l.globals.dataLabelsRects[a][g]<"u"){const b=l.globals.dataLabelsRects[a][p];(e>b.x+b.width||t>b.y+b.height||t+u<b.y||e+d<b.x)&&(h=!0)}return(i===0||r)&&(h=!0),{x:e,y:t,textRects:c,drawnextLabel:h}}drawDataLabel({type:e,pos:t,i:s,j:a,isRangeStart:i,strokeWidth:r=2}){const o=this.w,l=new I(this.w),n=o.config.dataLabels;let h=0,c=0,d=a,u=null;if(o.globals.collapsedSeriesIndices.indexOf(s)!==-1||!n.enabled||!Array.isArray(t.x))return u;u=l.group({class:"apexcharts-data-labels"});for(let g=0;g<t.x.length;g++)if(h=t.x[g]+n.offsetX,c=t.y[g]+n.offsetY+r,!isNaN(h)){a===1&&g===0&&(d=0),a===1&&g===1&&(d=1);let p=o.seriesData.series[s][d];e==="rangeArea"&&(i?p=o.rangeData.seriesRangeStart[s][d]:p=o.rangeData.seriesRangeEnd[s][d]);let b="";const f=v=>o.config.dataLabels.formatter(v,{seriesIndex:s,dataPointIndex:d,w:o});o.config.chart.type==="bubble"?(p=o.seriesData.seriesZ[s][d],b=f(p),c=t.y[g],c=new gt(this.w,this.ctx).centerTextInBubble(c,s,d).y):typeof p<"u"&&(b=f(p));let m=o.config.dataLabels.textAnchor;o.globals.isSlopeChart&&(d===0?m="end":d===o.config.series[s].data.length-1?m="start":m="middle"),this.plotDataLabelsText({x:h,y:c,text:b,i:s,j:d,parent:u,offsetCorrection:!0,dataLabelsConfig:o.config.dataLabels,textAnchor:m})}return u}plotDataLabelsText(e){const t=this.w,s=new I(this.w);let{x:a,y:i,i:r,j:o,text:l,textAnchor:n,fontSize:h,parent:c,dataLabelsConfig:d,color:u,alwaysDrawDataLabel:g,offsetCorrection:p,className:b}=e,f=null;if(Array.isArray(t.config.dataLabels.enabledOnSeries)&&t.config.dataLabels.enabledOnSeries.indexOf(r)<0)return f;let m={x:a,y:i,drawnextLabel:!0,textRects:null};p&&(m=this.dataLabelsCorrection(a,i,l,r,o,g,parseInt(d.style.fontSize,10))),t.interact.zoomed||(a=m.x,i=m.y),m.textRects&&(a<-20-m.textRects.width||a>t.layout.gridWidth+m.textRects.width+30)&&(l="");let v=t.globals.dataLabels.style.colors[r];((t.config.chart.type==="bar"||t.config.chart.type==="rangeBar")&&t.config.plotOptions.bar.distributed||t.config.dataLabels.distributed)&&(v=t.globals.dataLabels.style.colors[o]),typeof v=="function"&&(v=v({series:t.seriesData.series,seriesIndex:r,dataPointIndex:o,w:t})),u&&(v=u);let y=d.offsetX,w=d.offsetY;if((t.config.chart.type==="bar"||t.config.chart.type==="rangeBar")&&(y=0,w=0),t.globals.isSlopeChart&&(o!==0&&(y=d.offsetX*-2+5),o!==0&&o!==t.config.series[r].data.length-1&&(y=0)),m.drawnextLabel){if(n==="middle"&&a===t.layout.gridWidth&&(n="end"),f=s.drawText({width:100,height:parseInt(d.style.fontSize,10),x:a+y,y:i+w,foreColor:v,textAnchor:n||d.textAnchor,text:l,fontSize:h||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"}),f.attr({class:b||"apexcharts-datalabel",cx:a,cy:i}),d.dropShadow.enabled){const C=d.dropShadow;new q(this.w).dropShadow(f,C)}c.add(f),typeof t.globals.lastDrawnDataLabelsIndexes[r]>"u"&&(t.globals.lastDrawnDataLabelsIndexes[r]=[]),t.globals.lastDrawnDataLabelsIndexes[r].push(o)}return f}
30addBackgroundToDataLabel(e,t){const s=this.w,a=s.config.dataLabels.background,i=a.padding,r=a.padding/2,o=t.width,l=t.height,n=new I(this.w).drawRect(t.x-i,t.y-r/2,o+i*2,l+r,a.borderRadius,s.config.chart.background==="transparent"||!s.config.chart.background?"#fff":s.config.chart.background,a.opacity,a.borderWidth,a.borderColor);return a.dropShadow.enabled&&new q(this.w).dropShadow(n,a.dropShadow),n}dataLabelsBackground(){const e=this.w;if(e.config.chart.type==="bubble")return;const t=e.dom.baseEl.querySelectorAll(".apexcharts-datalabels text");for(let s=0;s<t.length;s++){const a=t[s],i=a.getBBox();let r=null;if(i.width&&i.height&&(r=this.addBackgroundToDataLabel(a,i)),r){a.parentNode.insertBefore(r.node,a);const o=e.config.dataLabels.background.backgroundColor||a.getAttribute("fill");e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged?r.animate().attr({fill:o}):r.attr({fill:o}),a.setAttribute("fill",e.config.dataLabels.background.foreColor)}}}bringForward(){const e=this.w,t=e.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),s=e.dom.baseEl.querySelector(".apexcharts-plot-series:last-child");for(let a=0;a<t.length;a++)s&&s.insertBefore(t[a],s.nextSibling)}}class ie{constructor(e,{theme:t=null,timeScale:s=null}={}){this.w=e,this.theme=t,this.timeScale=s}getLabel(e,t,s,a,i=[],r="12px",o=!0){const l=this.w,n=typeof e[a]>"u"?"":e[a];let h=n;const c=l.formatters.xLabelFormatter,d=l.config.xaxis.labels.formatter;let u=!1;const g=new ve(this.w),p=n;o&&(h=g.xLabelFormat(c,n,p,{i:a,dateFormatter:new U(this.w).formatDate,w:l}),d!==void 0&&(h=d(n,e[a],{i:a,dateFormatter:new U(this.w).formatDate,w:l})));const b=y=>{let w=null;return t.forEach(C=>{C.unit==="month"?w="year":C.unit==="day"?w="month":C.unit==="hour"?w="day":C.unit==="minute"&&(w="hour")}),w===y};t.length>0?(u=b(t[a].unit),s=t[a].position,h=t[a].value):l.config.xaxis.type==="datetime"&&d===void 0&&(h=""),typeof h>"u"&&(h=""),h=Array.isArray(h)?h:h.toString();const f=new I(this.w);let m={};l.layout.rotateXLabels&&o?m=f.getTextRects(h,parseInt(r,10),null,`rotate(${l.config.xaxis.labels.rotate} 0 0)`,!1):m=f.getTextRects(h,parseInt(r,10));const v=!l.config.xaxis.labels.showDuplicates&&this.timeScale;return!Array.isArray(h)&&(String(h)==="NaN"||i.indexOf(h)>=0&&v)&&(h=""),{x:s,text:h,textRect:m,isBold:u}}checkLabelBasedOnTickamount(e,t,s){const a=this.w;let i=a.config.xaxis.tickAmount;if(i==="dataPoints"&&(i=Math.round(a.layout.gridWidth/120)),i>s)return t;const r=Math.round(s/(i+1));return e%r===0||(t.text=""),t}checkForOverflowingLabels(e,t,s,a,i){const r=this.w;if(e===0&&r.globals.skipFirstTimelinelabel&&(t.text=""),e===s-1&&r.globals.skipLastTimelinelabel&&(t.text=""),r.config.xaxis.labels.hideOverlappingLabels&&a.length>0){const o=i[i.length-1];if(r.config.xaxis.labels.trim&&r.config.xaxis.type!=="datetime")return t;t.x<o.textRect.width/(r.layout.rotateXLabels?Math.abs(r.config.xaxis.labels.rotate)/12:1.01)+o.x&&(t.text="")}return t}checkForReversedLabels(e,t){const s=this.w;return s.config.yaxis[e]&&s.config.yaxis[e].reversed&&t.reverse(),t}yAxisAllSeriesCollapsed(e){const t=this.w.globals;return!t.seriesYAxisMap[e].some(s=>t.collapsedSeriesIndices.indexOf(s)===-1)}translateYAxisIndex(e){const t=this.w,s=t.globals,a=t.config.yaxis;return t.seriesData.series.length>a.length||a.some(i=>Array.isArray(i.seriesName))?e:s.seriesYAxisReverseMap[e]}isYAxisHidden(e){const t=this.w,s=t.config.yaxis[e];if(!s.show||this.yAxisAllSeriesCollapsed(e))return!0;if(!s.showForNullSeries){const a=t.globals.seriesYAxisMap[e],i=new $(this.w);return a.every(r=>i.isSeriesNull(r))}return!1}getYAxisForeColor(e,t){var s;const a=this.w;return Array.isArray(e)&&a.globals.yAxisScale[t]&&((s=this.theme)==null||s.pushExtraColors(e,a.globals.yAxisScale[t].result.length,!1)),e}drawYAxisTicks(e,t,s,a,i,r,o){const l=this.w,n=new I(this.w);let h=l.layout.translateY+l.config.yaxis[i].labels.offsetY;if(l.globals.isBarHorizontal?h=0:l.config.chart.type==="heatmap"&&(h+=r/2),a.show&&t>0){l.config.yaxis[i].opposite===!0&&(e=e+a.width);for(let c=t;c>=0;c--){const d=n.drawLine(e+s.offsetX-a.width+a.offsetX,h+a.offsetY,e+s.offsetX+a.offsetX,h+a.offsetY,a.color);o.add(d),h+=r}}}}class we{constructor(e,t,s){this.w=e,this.ctx=t,this.elgrid=s,this.axesUtils=new ie(e,{theme:t.theme,timeScale:t.timeScale}),this.xaxisLabels=e.labelData.labels.slice(),e.labelData.timescaleLabels.length>0&&!e.globals.isBarHorizontal&&(this.xaxisLabels=e.labelData.timescaleLabels.slice()),e.config.xaxis.overwriteCategories&&(this.xaxisLabels=e.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],e.config.xaxis.position==="top"?this.offY=0:this.offY=e.layout.gridHeight,this.offY=this.offY+e.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal=e.config.chart.type==="bar"&&e.config.plotOptions.bar.horizontal,this.xaxisFontSize=e.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=e.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=e.config.xaxis.labels.style.colors,this.xaxisBorderWidth=e.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=e.config.yaxis[0].axisBorder.width.toString()),String(this.xaxisBorderWidth).indexOf("%")>-1?this.xaxisBorderWidth=e.layout.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=e.config.xaxis.axisBorder.height,this.yaxis=e.config.yaxis[0]}drawXaxis(){const e=this.w,t=new I(this.w),s=t.group({class:"apexcharts-xaxis",transform:`translate(${e.config.xaxis.offsetX}, ${e.config.xaxis.offsetY})`}),a=t.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${e.layout.translateXAxisX}, ${e.layout.translateXAxisY})`});s.add(a);let i=[];for(let r=0;r<this.xaxisLabels.length;r++)i.push(this.xaxisLabels[r]);if(this.drawXAxisLabelAndGroup(!0,t,a,i,e.axisFlags.isXNumeric,(r,o)=>o),e.labelData.hasXaxisGroups){const r=e.labelData.groups;i=[];for(let l=0;l<r.length;l++)i.push(r[l].title);const o={};e.config.xaxis.group.style&&(o.xaxisFontSize=e.config.xaxis.group.style.fontSize,o.xaxisFontFamily=e.config.xaxis.group.style.fontFamily,o.xaxisForeColors=e.config.xaxis.group.style.colors,o.fontWeight=e.config.xaxis.group.style.fontWeight,o.cssClass=e.config.xaxis.group.style.cssClass),this.drawXAxisLabelAndGroup(!1,t,a,i,!1,(l,n)=>r[l].cols*n,o)}if(e.config.xaxis.title.text!==void 0){const r=t.group({class:"apexcharts-xaxis-title"}),o=t.drawText({x:e.layout.gridWidth/2+e.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+(e.config.xaxis.position==="bottom"?e.layout.xAxisLabelsHeight:-e.layout.xAxisLabelsHeight-10)+e.config.xaxis.title.offsetY,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});r.add(o),s.add(r)}if(e.config.xaxis.axisBorder.show){const r=e.globals.barPadForNumericAxis,o=t.drawLine(e.globals.padHorizontal+e.config.xaxis.axisBorder.offsetX-r,this.offY,this.xaxisBorderWidth+r,this.offY,e.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(o):s.add(o)}return s}drawXAxisLabelAndGroup(e,t,s,a,i,r,o={}){const l=[],n=[],h=this.w,c=o.xaxisFontSize||this.xaxisFontSize,d=o.xaxisFontFamily||this.xaxisFontFamily,u=o.xaxisForeColors||this.xaxisForeColors,g=o.fontWeight||h.config.xaxis.labels.style.fontWeight,p=o.cssClass||h.config.xaxis.labels.style.cssClass;let b,f=h.globals.padHorizontal;const m=a.length;let v=h.config.xaxis.type==="category"?h.globals.dataPoints:m;if(v===0&&m>v&&(v=m),i){const y=Math.max(Number(h.config.xaxis.tickAmount)||1,v>1?v-1:v);b=h.layout.gridWidth/Math.min(y,m-1),f=f+r(0,b)/2+h.config.xaxis.labels.offsetX}else b=h.layout.gridWidth/v,f=f+r(0,b)+h.config.xaxis.labels.offsetX;for(let y=0;y<=m-1;y++){let w=f-r(y,b)/2+h.config.xaxis.labels.offsetX;y===0&&m===1&&b/2===f&&v===1&&(w=h.layout.gridWidth/2);let C=this.axesUtils.getLabel(a,h.labelData.timescaleLabels,w,y,l,c,e),A=28;h.layout.rotateXLabels&&e&&(A=22),h.config.xaxis.title.text&&h.config.xaxis.position==="top"&&(A+=parseFloat(h.config.xaxis.title.style.fontSize)+2),e||(A=A+parseFloat(c)+(h.layout.xAxisLabelsHeight-h.layout.xAxisGroupLabelsHeight)+(h.layout.rotateXLabels?10:0)),typeof h.config.xaxis.tickAmount<"u"&&h.config.xaxis.tickAmount!=="dataPoints"&&h.config.xaxis.type!=="datetime"?C=this.axesUtils.checkLabelBasedOnTickamount(y,C,m):C=this.axesUtils.checkForOverflowingLabels(y,C,m,l,n);const L=()=>e&&h.config.xaxis.convertedCatToNumeric?u[h.globals.minX+y-1]:u[y];if(h.config.xaxis.labels.show){const S=t.drawText({x:C.x,y:this.offY+h.config.xaxis.labels.offsetY+A-(h.config.xaxis.position==="top"?h.layout.xAxisHeight+h.config.xaxis.axisTicks.height-2:0),text:C.text,textAnchor:"middle",fontWeight:C.isBold?600:g,fontSize:c,fontFamily:d,foreColor:Array.isArray(u)?L():u,isPlainText:!1,
30cssClass:(e?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+p});if(s.add(S),S.on("click",k=>{if(typeof h.config.chart.events.xAxisLabelClick=="function"){const M=Object.assign({},h,{labelIndex:y});h.config.chart.events.xAxisLabelClick(k,this.ctx,M)}}),e){const k=H.createElementNS(_,"title");k.textContent=Array.isArray(C.text)?C.text.join(" "):C.text,S.node.appendChild(k),C.text!==""&&(l.push(C.text),n.push(C))}}y<m-1&&(f=f+r(y+1,b))}}drawXaxisInversed(e){const t=this.w,s=new I(this.w),a=t.config.yaxis[0].opposite?t.globals.translateYAxisX[e]:0,i=s.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:e}),r=s.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+a+", 0)"});i.add(r);const o=[];if(t.config.yaxis[e].show)for(let g=0;g<this.xaxisLabels.length;g++)o.push(this.xaxisLabels[g]);const l=t.layout.gridHeight/o.length;let n=-(l/2.2);const h=t.formatters.yLabelFormatters[0],c=t.config.yaxis[0].labels;if(c.show)for(let g=0;g<=o.length-1;g++){let p=typeof o[g]>"u"?"":o[g];p=h(p,{seriesIndex:e,dataPointIndex:g,w:t});const b=this.axesUtils.getYAxisForeColor(c.style.colors,e),f=()=>Array.isArray(b)?b[g]:b;let m=0;Array.isArray(p)&&(m=p.length/2*parseInt(c.style.fontSize,10));let v=c.offsetX-15,y="end";this.yaxis.opposite&&(y="start"),t.config.yaxis[0].labels.align==="left"?(v=c.offsetX,y="start"):t.config.yaxis[0].labels.align==="center"?(v=c.offsetX,y="middle"):t.config.yaxis[0].labels.align==="right"&&(y="end");const w=s.drawText({x:v,y:n+l+c.offsetY-m,text:p,textAnchor:y,foreColor:f(),fontSize:c.style.fontSize,fontFamily:c.style.fontFamily,fontWeight:c.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+c.style.cssClass,maxWidth:c.maxWidth});r.add(w),w.on("click",A=>{if(typeof t.config.chart.events.xAxisLabelClick=="function"){const L=Object.assign({},t,{labelIndex:g});t.config.chart.events.xAxisLabelClick(A,this.ctx,L)}});const C=H.createElementNS(_,"title");if(C.textContent=Array.isArray(p)?p.join(" "):p,w.node.appendChild(C),t.config.yaxis[e].labels.rotate!==0){const A=s.rotateAroundCenter(w.node);w.node.setAttribute("transform",`rotate(${t.config.yaxis[e].labels.rotate} 0 ${A.y})`)}n=n+l}if(t.config.yaxis[0].title.text!==void 0){const g=s.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+a+", 0)"}),p=s.drawText({x:t.config.yaxis[0].title.offsetX,y:t.layout.gridHeight/2+t.config.yaxis[0].title.offsetY,text:t.config.yaxis[0].title.text,textAnchor:"middle",foreColor:t.config.yaxis[0].title.style.color,fontSize:t.config.yaxis[0].title.style.fontSize,fontWeight:t.config.yaxis[0].title.style.fontWeight,fontFamily:t.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+t.config.yaxis[0].title.style.cssClass});g.add(p),i.add(g)}let d=0;this.isCategoryBarHorizontal&&t.config.yaxis[0].opposite&&(d=t.layout.gridWidth);const u=t.config.xaxis.axisBorder;if(u.show){const g=s.drawLine(t.globals.padHorizontal+u.offsetX+d,1+u.offsetY,t.globals.padHorizontal+u.offsetX+d,t.layout.gridHeight+u.offsetY,u.color,0);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(g):i.add(g)}return t.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(d,o.length,t.config.yaxis[0].axisBorder,t.config.yaxis[0].axisTicks,0,l,i),i}drawXaxisTicks(e,t,s){const a=this.w,i=e;if(e<0||e-2>a.layout.gridWidth)return;const r=this.offY+a.config.xaxis.axisTicks.offsetY;if(t=t+r+a.config.xaxis.axisTicks.height,a.config.xaxis.position==="top"&&(t=r-a.config.xaxis.axisTicks.height),a.config.xaxis.axisTicks.show){const o=new I(this.w).drawLine(e+a.config.xaxis.axisTicks.offsetX,r+a.config.xaxis.offsetY,i+a.config.xaxis.axisTicks.offsetX,t+a.config.xaxis.offsetY,a.config.xaxis.axisTicks.color);s.add(o),o.node.classList.add("apexcharts-xaxis-tick")}}getXAxisTicksPositions(){const e=this.w,t=[],s=this.xaxisLabels.length;let a=e.globals.padHorizontal;if(e.labelData.timescaleLabels.length>0)for(let i=0;i<s;i++)a=this.xaxisLabels[i].position,t.push(a);else{const i=s;for(let r=0;r<i;r++){let o=i;e.axisFlags.isXNumeric&&e.config.chart.type!=="bar"&&(o-=1),a=a+e.layout.gridWidth/o,t.push(a)}}return t}xAxisLabelCorrections(){const e=this.w,t=new I(this.w),s=e.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),a=e.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)"),i=e.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),r=e.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(e.layout.rotateXLabels||e.config.xaxis.labels.rotateAlways)for(let o=0;o<a.length;
30o++){const l=t.rotateAroundCenter(a[o]);l.y=l.y-1,l.x=l.x+1,a[o].setAttribute("transform",`rotate(${e.config.xaxis.labels.rotate} ${l.x} ${l.y})`),a[o].setAttribute("text-anchor","end"),s.setAttribute("transform","translate(0, -10)");const n=a[o].childNodes;e.config.xaxis.labels.trim&&Array.prototype.forEach.call(n,h=>{t.placeTextWithEllipsis(h,h.textContent,e.layout.xAxisLabelsHeight-(e.config.legend.position==="bottom"?20:10))})}else{const o=e.layout.gridWidth/(e.labelData.labels.length+1);for(let l=0;l<a.length;l++){const n=a[l].childNodes;e.config.xaxis.labels.trim&&e.config.xaxis.type!=="datetime"&&Array.prototype.forEach.call(n,h=>{t.placeTextWithEllipsis(h,h.textContent,o)})}}if(i.length>0){const o=i[i.length-1].getBBox(),l=i[0].getBBox();o.x<-20&&i[i.length-1].parentNode.removeChild(i[i.length-1]),l.x+l.width>e.layout.gridWidth&&!e.globals.isBarHorizontal&&i[0].parentNode.removeChild(i[0]);for(let n=0;n<r.length;n++)t.placeTextWithEllipsis(r[n],r[n].textContent,e.config.yaxis[0].labels.maxWidth-(e.config.yaxis[0].title.text?parseFloat(e.config.yaxis[0].title.style.fontSize)*2:0)-15)}}}class pt{constructor(e,t){this.w=e,this.ctx=t,this.xaxisLabels=e.labelData.labels.slice(),this.axesUtils=new ie(t.w,{theme:t.theme,timeScale:t.timeScale}),this.isRangeBar=e.rangeData.seriesRange.length&&e.globals.isBarHorizontal,e.labelData.timescaleLabels.length>0&&(this.xaxisLabels=e.labelData.timescaleLabels.slice())}drawGridArea(e=null){const t=this.w,s=new I(this.w);e||(e=s.group({class:"apexcharts-grid"}));const a=s.drawLine(t.globals.padHorizontal,1,t.globals.padHorizontal,t.layout.gridHeight,"transparent"),i=s.drawLine(t.globals.padHorizontal,t.layout.gridHeight,t.layout.gridWidth,t.layout.gridHeight,"transparent");return e.add(i),e.add(a),e}drawGrid(){if(this.w.globals.axisCharts){const e=this.renderGrid();return this.drawGridArea(e.el),e}return null}createGridMask(){const e=this.w,t=e.globals,s=new I(this.w),a=Array.isArray(e.config.stroke.width)?Math.max(...e.config.stroke.width):e.config.stroke.width,i=c=>{const d=H.createElementNS(_,"clipPath");return d.setAttribute("id",c),d};e.dom.elGridRectMask=i(`gridRectMask${t.cuid}`),e.dom.elGridRectBarMask=i(`gridRectBarMask${t.cuid}`),e.dom.elGridRectMarkerMask=i(`gridRectMarkerMask${t.cuid}`),e.dom.elForecastMask=i(`forecastMask${t.cuid}`),e.dom.elNonForecastMask=i(`nonForecastMask${t.cuid}`);const r=["bar","rangeBar","candlestick","boxPlot"].includes(e.config.chart.type)||e.globals.comboBarCount>0;let o=0,l=0;
30r&&e.axisFlags.isXNumeric&&!e.globals.isBarHorizontal&&(o=Math.max(e.config.grid.padding.left,t.barPadForNumericAxis),l=Math.max(e.config.grid.padding.right,t.barPadForNumericAxis)),e.dom.elGridRect=s.drawRect(-a/2-2,-a/2-2,e.layout.gridWidth+a+4,e.layout.gridHeight+a+4,0,"#fff"),e.dom.elGridRectBar=s.drawRect(-a/2-o-2,-a/2-2,e.layout.gridWidth+a+l+o+4,e.layout.gridHeight+a+4,0,"#fff");const n=e.globals.markers.largestSize;e.dom.elGridRectMarker=s.drawRect(Math.min(-a/2-o-2,-n),-n,e.layout.gridWidth+Math.max(a+l+o+4,n*2),e.layout.gridHeight+n*2,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectBarMask.appendChild(e.dom.elGridRectBar.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);const h=e.dom.elDefs.node;h.appendChild(e.dom.elGridRectMask),h.appendChild(e.dom.elGridRectBarMask),h.appendChild(e.dom.elGridRectMarkerMask),h.appendChild(e.dom.elForecastMask),h.appendChild(e.dom.elNonForecastMask)}_drawGridLines({i:e,x1:t,y1:s,x2:a,y2:i,xCount:r,parent:o}){const l=this.w;if(!(e===0&&l.globals.skipFirstTimelinelabel||e===r-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||l.config.chart.type==="radar")){l.config.grid.xaxis.lines.show&&this._drawGridLine({i:e,x1:t,y1:s,x2:a,y2:i,xCount:r,parent:o});let n=0;if(l.labelData.hasXaxisGroups&&l.config.xaxis.tickPlacement==="between"){const h=l.labelData.groups;if(h){let c=0;for(let d=0;c<e&&d<h.length;d++)c+=h[d].cols;c===e&&(n=l.layout.xAxisLabelsHeight*.6)}}new we(this.w,this.ctx).drawXaxisTicks(t,n,l.dom.elGraphical)}}_drawGridLine({i:e,x1:t,y1:s,x2:a,y2:i,xCount:r,parent:o}){const l=this.w,n=o.node.classList.contains("apexcharts-gridlines-horizontal"),h=l.globals.barPadForNumericAxis,c=s===0&&i===0||t===0&&a===0||s===l.layout.gridHeight&&i===l.layout.gridHeight||l.globals.isBarHorizontal&&(e===0||e===r-1),d=new I(this.w).drawLine(t-(n?h:0),s,a+(n?h:0),i,l.config.grid.borderColor,l.config.grid.strokeDashArray);d.node.classList.add("apexcharts-gridline"),c&&l.config.grid.show?this.elGridBorders.add(d):o.add(d)}_drawGridBandRect({c:e,x1:t,y1:s,x2:a,y2:i,type:r}){const o=this.w,l=new I(this.w),n=o.globals.barPadForNumericAxis,h=o.config.grid[r].colors[e],c=l.drawRect(t-(r==="row"?n:0),s,a+(r==="row"?n*2:0),i,0,h,o.config.grid[r].opacity);this.elg.add(c),c.attr("clip-path",`url(#gridRectMask${o.globals.cuid})`),c.node.classList.add(`apexcharts-grid-${r}`)}_drawXYLines({xCount:e,tickAmount:t}){const s=this.w,a=({xC:r,x1:o,y1:l,x2:n,y2:h})=>{for(let c=0;c<r;c++)o=this.xaxisLabels[c].position,n=this.xaxisLabels[c].position,this._drawGridLines({i:c,x1:o,y1:l,x2:n,y2:h,xCount:e,parent:this.elgridLinesV})},i=({xC:r,x1:o,y1:l,x2:n,y2:h})=>{for(let c=0;c<r+(s.axisFlags.isXNumeric?0:1);c++)c===0&&r===1&&s.globals.dataPoints===1&&(o=s.layout.gridWidth/2,n=o),this._drawGridLines({i:c,x1:o,y1:l,x2:n,y2:h,xCount:e,parent:this.elgridLinesV}),o+=s.layout.gridWidth/(s.axisFlags.isXNumeric?r-1:r),n=o};if(s.config.grid.xaxis.lines.show||s.config.xaxis.axisTicks.show){const r=s.globals.padHorizontal,o=0;let l;const n=s.layout.gridHeight;s.labelData.timescaleLabels.length?a({xC:e,x1:r,y1:o,x2:l,y2:n}):(s.axisFlags.isXNumeric&&(e=s.globals.xAxisScale.result.length),i({xC:e,x1:r,y1:o,x2:l,y2:n}))}if(s.config.grid.yaxis.lines.show){let r=0,o=0;const l=s.layout.gridWidth;let n=t+1;this.isRangeBar&&(n=s.labelData.labels.length);for(let h=0;h<n+(this.isRangeBar?1:0);h++)this._drawGridLine({i:h,xCount:n+(this.isRangeBar?1:0),x1:0,y1:r,x2:l,y2:o,parent:this.elgridLinesH}),r+=s.layout.gridHeight/(this.isRangeBar?n:t),o=r}}_drawInvertedXYLines({xCount:e}){const t=this.w;if(t.config.grid.xaxis.lines.show||t.config.xaxis.axisTicks.show){let s=t.globals.padHorizontal;const a=0;let i;const r=t.layout.gridHeight;for(let o=0;o<e+1;o++)t.config.grid.xaxis.lines.show&&this._drawGridLine({i:o,xCount:e+1,x1:s,y1:a,x2:i,y2:r,parent:this.elgridLinesV}),new we(this.w,this.ctx).drawXaxisTicks(s,0,t.dom.elGraphical),s+=t.layout.gridWidth/e,i=s}if(t.config.grid.yaxis.lines.show){let s=0,a=0;const i=t.layout.gridWidth;for(let r=0;r<t.globals.dataPoints+1;
30r++)this._drawGridLine({i:r,xCount:t.globals.dataPoints+1,x1:0,y1:s,x2:i,y2:a,parent:this.elgridLinesH}),s+=t.layout.gridHeight/t.globals.dataPoints,a=s}}renderGrid(){var e,t,s;const a=this.w,i=a.globals,r=new I(this.w);this.elg=r.group({class:"apexcharts-grid"}),this.elgridLinesH=r.group({class:"apexcharts-gridlines-horizontal"}),this.elgridLinesV=r.group({class:"apexcharts-gridlines-vertical"}),this.elGridBorders=r.group({class:"apexcharts-grid-borders"}),this.elg.add(this.elgridLinesH),this.elg.add(this.elgridLinesV),a.config.grid.show||(this.elgridLinesV.hide(),this.elgridLinesH.hide(),this.elGridBorders.hide());let o=0;for(;o<i.seriesYAxisMap.length&&i.ignoreYAxisIndexes.includes(o);)o++;o===i.seriesYAxisMap.length&&(o=0);let l=i.yAxisScale[o].result.length-1,n;return!i.isBarHorizontal||this.isRangeBar?(n=this.xaxisLabels.length,this.isRangeBar&&(l=a.labelData.labels.length,a.config.xaxis.tickAmount&&a.config.xaxis.labels.formatter&&(n=a.config.xaxis.tickAmount),((s=(t=(e=i.yAxisScale)==null?void 0:e[o])==null?void 0:t.result)==null?void 0:s.length)>0&&a.config.xaxis.type!=="datetime"&&(n=i.yAxisScale[o].result.length-1)),this._drawXYLines({xCount:n,tickAmount:l})):(n=l,l=i.xTickAmount,this._drawInvertedXYLines({xCount:n,tickAmount:l})),this.drawGridBands(n,l),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:a.layout.gridWidth/n}}drawGridBands(e,t){var s,a,i;const r=this.w,o=(l,n,h,c,d,u)=>{for(let g=0,p=0;g<n;g++,p++)p>=r.config.grid[l].colors.length&&(p=0),this._drawGridBandRect({c:p,x1:h,y1:c,x2:d,y2:u,type:l}),c+=r.layout.gridHeight/t};if(((s=r.config.grid.row.colors)==null?void 0:s.length)>0&&o("row",t,0,0,r.layout.gridWidth,r.layout.gridHeight/t),((a=r.config.grid.column.colors)==null?void 0:a.length)>0){let l=!r.globals.isBarHorizontal&&r.config.xaxis.tickPlacement==="on"&&(r.config.xaxis.type==="category"||r.config.xaxis.convertedCatToNumeric)?e-1:e;r.axisFlags.isXNumeric&&(l=r.globals.xAxisScale.result.length-1);let n=r.globals.padHorizontal;const h=0;let c=r.globals.padHorizontal+r.layout.gridWidth/l;const d=r.layout.gridHeight;for(let u=0,g=0;u<e;u++,g++)g>=r.config.grid.column.colors.length&&(g=0),r.config.xaxis.type==="datetime"&&(n=this.xaxisLabels[u].position,c=(((i=this.xaxisLabels[u+1])==null?void 0:i.position)||r.layout.gridWidth)-this.xaxisLabels[u].position),this._drawGridBandRect({c:g,x1:n,y1:h,x2:c,y2:d,type:"column"}),n+=r.layout.gridWidth/l}}}class ut{constructor(e){this.w=e,this.coreUtils=new $(this.w)}niceScale(e,t,s=0){const a=this.w,i=a.globals;let r,o,l,n;i.isBarHorizontal?(r=a.config.xaxis,o=Math.max((i.svgWidth-100)/25,2)):(r=a.config.yaxis[s],o=Math.max((i.svgHeight-100)/15,2)),D.isNumber(o)||(o=10),l=r.min!==void 0&&r.min!==null,n=r.max!==void 0&&r.min!==null;let h=r.stepSize!==void 0&&r.stepSize!==null,c=r.tickAmount!==void 0&&r.tickAmount!==null,d=c?r.tickAmount:Fe[Math.min(Math.round(o/2),Fe.length-1)];if(i.isMultipleYAxis&&!c&&i.multiAxisTickAmount>0&&(d=i.multiAxisTickAmount,c=!0),d==="dataPoints"?d=i.dataPoints-1:d=Math.abs(Math.round(d)),(e===Number.MIN_VALUE&&t===0||!D.isNumber(e)&&!D.isNumber(t)||e===Number.MIN_VALUE&&t===-Number.MAX_VALUE)&&(e=D.isNumber(r.min)?r.min:0,t=D.isNumber(r.max)?r.max:e+d,i.allSeriesCollapsed=!1),e>t){console.warn("axis.min cannot be greater than axis.max: swapping min and max");const M=t;t=e,e=M}else e===t&&(e=e===0?0:e-1,t=t===0?2:t+1);const u=[];d<1&&(d=1);let g=d,p=Math.abs(t-e);const b=.15;!l&&e>0&&e/p<b&&(e=0,l=!0),!n&&t<0&&-t/p<b&&(t=0,n=!0),p=Math.abs(t-e);let f=p/g,m=f;const v=Math.floor(Math.log10(m)),y=Math.pow(10,v);let w=Math.ceil(m/y);if(w=ct[i.yValueDecimal===0?0:1][w],m=w*y,f=m,i.isBarHorizontal&&r.stepSize&&r.type!=="datetime"?(f=r.stepSize,h=!0):h&&(f=r.stepSize),h&&r.forceNiceScale){const M=Math.floor(Math.log10(f));f*=Math.pow(10,v-M)}if(l&&n){let M=p/g;if(c)if(h)if(D.mod(p,f)!=0){const P=D.getGCD(f,M);M/P<10?f=P:f=M}else D.mod(f,M)==0?f=M:(M=f,c=!1);else f=M;else if(h)D.mod(p,f)==0?M=f:f=M;else if(D.mod(p,f)==0)M=f;else{g=Math.ceil(p/f),M=p/g;const P=D.getGCD(p,f);p/P<o&&(M=P),f=M}g=Math.round(p/f)}else{if(!l&&!n)if(i.isMultipleYAxis&&c){const M=f*Math.floor(e/f);let P=M+f*g;P<t&&(f*=2),e=M,P=t,t=e+f*g,p=Math.abs(t-e),e>0&&e<Math.abs(P-t)&&(e=0,t=f*g),t<0&&-t<Math.abs(M-e)&&(t=0,e=-f*g)}else e=f*Math.floor(e/f),t=f*Math.ceil(t/f);else if(n)if(c)e=t-f*g;else{const M=e;
30e=f*Math.floor(e/f),Math.abs(t-e)/D.getGCD(p,f)>o&&(e=t-f*d,e+=f*Math.floor((M-e)/f))}else if(l)if(c)t=e+f*g;else{const M=t;t=f*Math.ceil(t/f),Math.abs(t-e)/D.getGCD(p,f)>o&&(t=e+f*d,t+=f*Math.ceil((M-t)/f))}p=Math.abs(t-e),f=D.getGCD(p,f),g=Math.round(p/f)}if(!c&&!(l||n)&&(g=Math.ceil((p-1e-11)/(f+1e-11)),g>16&&D.getPrimeFactors(g).length<2&&g++),!c&&r.forceNiceScale&&i.yValueDecimal===0&&g>p&&(g=p,f=Math.round(p/g)),g>o&&(!(c||h)||r.forceNiceScale)){const M=D.getPrimeFactors(g),P=M.length-1;let T=g;e:for(var C=0;C<P;C++)for(var A=0;A<=P-C;A++){const X=Math.min(A+C,P);let E=T,F=1;for(var L=A;L<=X;L++)F*=M[L];if(E/=F,E<o){T=E;break e}}T===g?f=p:f=p/T,g=Math.round(p/f)}i.isMultipleYAxis&&i.multiAxisTickAmount==0&&i.ignoreYAxisIndexes.indexOf(s)<0&&(i.multiAxisTickAmount=g);let S=e-f;const k=f*1e-11;do S+=f,u.push(D.stripNumber(S,7));while(t-S>k);return{result:u,niceMin:u[0],niceMax:u[u.length-1]}}linearScale(e,t,s=10,a=0,i=void 0){const r=Math.abs(t-e);let o=[];if(e===t)return o=[e],{result:o,niceMin:o[0],niceMax:o[o.length-1]};s=this._adjustTicksForSmallRange(s,a,r),s==="dataPoints"&&(s=this.w.globals.dataPoints-1),i||(i=r/s);const l=2;if(i!==0&&isFinite(i)){const h=Math.floor(Math.log10(Math.abs(i))),c=Math.max(l,-h+l),d=Math.pow(10,c);i=Math.round((i+Number.EPSILON)*d)/d}s===Number.MAX_VALUE&&(s=5,i=1);let n=e;for(;s>=0;)o.push(n),n=D.preciseAddition(n,i),s-=1;return{result:o,niceMin:o[0],niceMax:o[o.length-1]}}logarithmicScaleNice(e,t,s){t<=0&&(t=Math.max(e,s)),e<=0&&(e=Math.min(t,s));const a=[],i=Math.ceil(Math.log(t)/Math.log(s)+1),r=Math.floor(Math.log(e)/Math.log(s));for(let o=r;o<i;o++)a.push(Math.pow(s,o));return{result:a,niceMin:a[0],niceMax:a[a.length-1]}}logarithmicScale(e,t,s){t<=0&&(t=Math.max(e,s)),e<=0&&(e=Math.min(t,s));const a=[],i=Math.log(t)/Math.log(s),r=Math.log(e)/Math.log(s),o=i-r,l=Math.round(o),n=o/l;for(let h=0,c=r;h<l;h++,c+=n)a.push(Math.pow(s,c));return a.push(Math.pow(s,i)),{result:a,niceMin:e,niceMax:t}}_adjustTicksForSmallRange(e,t,s){let a=e;if(typeof t<"u"&&this.w.config.yaxis[t].labels.formatter&&this.w.config.yaxis[t].tickAmount===void 0){const i=Number(this.w.config.yaxis[t].labels.formatter(1));D.isNumber(i)&&this.w.globals.yValueDecimal===0&&(a=Math.ceil(s))}return a<e?a:e}setYScaleForIndex(e,t,s){const a=this.w.globals,i=this.w.config,r=a.isBarHorizontal?i.xaxis:i.yaxis[e];typeof a.yAxisScale[e]>"u"&&(a.yAxisScale[e]=[]);const o=Math.abs(s-t);r.logarithmic&&o<=5&&(a.invalidLogScale=!0),r.logarithmic&&o>5?(a.allSeriesCollapsed=!1,a.yAxisScale[e]=r.forceNiceScale?this.logarithmicScaleNice(t,s,r.logBase):this.logarithmicScale(t,s,r.logBase)):s===-Number.MAX_VALUE||!D.isNumber(s)||t===Number.MAX_VALUE||!D.isNumber(t)?a.yAxisScale[e]=this.niceScale(Number.MIN_VALUE,0,e):(a.allSeriesCollapsed=!1,a.yAxisScale[e]=this.niceScale(t,s,e))}setXScale(e,t){const s=this.w,a=s.globals;if(t===-Number.MAX_VALUE||!D.isNumber(t))a.xAxisScale=this.linearScale(0,10,10);else{const i=a.xTickAmount;a.xAxisScale=this.linearScale(e,t,i,0,s.config.xaxis.max===void 0?s.config.xaxis.stepSize:void 0)}return a.xAxisScale}scaleMultipleYAxes(){const e=this.w.config,t=this.w.globals;this.coreUtils.setSeriesYAxisMappings();const s=t.seriesYAxisMap,a=t.minYArr,i=t.maxYArr;t.allSeriesCollapsed=!0,t.barGroups=[],s.forEach((r,o)=>{const l=[];if(r.forEach(n=>{var h;const c=(h=e.series[n])==null?void 0:h.group;l.indexOf(c)<0&&l.push(c)}),r.length>0){let n=Number.MAX_VALUE,h=-Number.MAX_VALUE,c=n,d=h,u,g;if(e.chart.stacked){const p=new Array(t.dataPoints).fill(0),b=[],f=[],m=[];l.forEach(()=>{b.push(p.map(()=>Number.MIN_VALUE)),f.push(p.map(()=>Number.MIN_VALUE)),m.push(p.map(()=>Number.MIN_VALUE))});for(let v=0;v<r.length;v++){!u&&e.series[r[v]].type&&(u=e.series[r[v]].type);const y=r[v];e.series[y].group?g=e.series[y].group:g="axis-".concat(o),!(t.collapsedSeriesIndices.indexOf(y)<0&&t.ancillaryCollapsedSeriesIndices.indexOf(y)<0)||(t.allSeriesCollapsed=!1,l.forEach((w,C)=>{if(e.series[y].group===w)for(let A=0;A<this.w.seriesData.series[y].length;A++){const L=this.w.seriesData.series[y][A];L>=0?f[C][A]+=L:m[C][A]+=L,b[C][A]+=L,c=Math.min(c,L),d=Math.max(d,L)}})),(u==="bar"||u==="column")&&t.barGroups.push(g)}u||(u=e.chart.type),u==="bar"||u==="column"?l.forEach((v,y)=>{n=Math.min(n,Math.min.apply(null,m[y])),h=Math.max(h,Math.max.apply(null,f[y]))}):(l.forEach((v,y)=>{c=Math.min(c,Math.min.apply(null,b[y])),d=Math.max(d,Math.max.apply(null,b[y]))}),n=c,h=d),n===Number.MIN_VALUE&&h===Number.MIN_VALUE&&(h=-Number.MAX_VALUE)}else for(let p=0;p<r.length;p++){const b=r[p];n=Math.min(n,a[b]),h=Math.max(h,i[b]),!(t.collapsedSeriesIndices.indexOf(b)<0&&t.ancillaryCollapsedSeriesIndices.indexOf(b)<0)||(t.allSeriesCollapsed=!1)}e.yaxis[o].min!==void 0&&(typeof e.yaxis[o].min=="function"?n=e.yaxis[o].min(n):n=e.yaxis[o].min),e.yaxis[o].max!==void 0&&(typeof e.yaxis[o].max=="function"?h=e.yaxis[o].max(h):h=e.yaxis[o].max),t.barGroups=t.barGroups.filter((p,b,f)=>f.indexOf(p)===b),this.setYScaleForIndex(o,n,h),r.forEach(p=>{a[p]=t.yAxisScale[o].niceMin,i[p]=t.yAxisScale[o].niceMax})}else this.setYScaleForIndex(o,0,-Number.MAX_VALUE)})}}class Re{constructor(e){this.w=e,this.scales=new ut(this.w)}init(){this.setYRange(),this.setXRange(),this.setZRange()}getMinYMaxY(e,t=Number.MAX_VALUE,s=-Number.MAX_VALUE,a=null){var i,r,o,l,n;const h=this.w.config,c=this.w.globals;let d=-Number.MAX_VALUE,u=Number.MIN_VALUE;a===null&&(a=e+1);const g=this.w.seriesData.series;let p=g,b=g;h.chart.type==="candlestick"?(p=this.w.candleData.seriesCandleL,b=this.w.candleData.seriesCandleH):h.chart.type==="boxPlot"?(p=this.w.candleData.seriesCandleO,b=this.w.candleData.seriesCandleC):this.w.axisFlags.isRangeData&&(p=this.w.rangeData.seriesRangeStart,b=this.w.rangeData.seriesRangeEnd);let f=!1;if(this.w.seriesData.seriesX.length>=a){const m=(i=c.brushSource)==null?void 0:i.w.config.chart.brush;(h.chart.zoom.enabled&&h.chart.zoom.autoScaleYaxis||m!=null&&m.enabled&&m!=null&&m.autoScaleYaxis)&&(f=!0)}for(let m=e;m<a;m++){c.dataPoints=Math.max(c.dataPoints,g[m].length);const v=h.series[m].type;this.w.labelData.categoryLabels.length&&(c.dataPoints=this.w.labelData.categoryLabels.filter(C=>typeof C<"u").length),this.w.labelData.labels.length&&h.xaxis.type!=="datetime"&&this.w.seriesData.series.reduce((C,A)=>C+A.length,0)!==0&&(c.dataPoints=Math.max(c.dataPoints,this.w.labelData.labels.length));let y=0,w=g[m].length-1;if(f){if(h.xaxis.min)for(;y<w&&this.w.seriesData.seriesX[m][y]<h.xaxis.min;y++);if(h.xaxis.max)for(;w>y&&this.w.seriesData.seriesX[m][w]>h.xaxis.max;w--);}for(let C=y;C<=w&&C<this.w.seriesData.series[m].length;C++){let A=g[m][C];if(A!==null&&D.isNumber(A)){switch(typeof((r=b[m])==null?void 0:r[C])<"u"&&(d=Math.max(d,b[m][C]),t=Math.min(t,b[m][C])),typeof((o=p[m])==null?void 0:o[C])<"u"&&(t=Math.min(t,p[m][C]),s=Math.max(s,p[m][C])),v){case"candlestick":typeof this.w.candleData.seriesCandleC[m][
30C]<"u"&&(d=Math.max(d,this.w.candleData.seriesCandleH[m][C]),t=Math.min(t,this.w.candleData.seriesCandleL[m][C]));break;case"boxPlot":typeof this.w.candleData.seriesCandleC[m][C]<"u"&&(d=Math.max(d,this.w.candleData.seriesCandleC[m][C]),t=Math.min(t,this.w.candleData.seriesCandleO[m][C]));break}v&&v!=="candlestick"&&v!=="boxPlot"&&v!=="rangeArea"&&v!=="rangeBar"&&(d=Math.max(d,this.w.seriesData.series[m][C]),t=Math.min(t,this.w.seriesData.series[m][C])),this.w.seriesData.seriesGoals[m]&&this.w.seriesData.seriesGoals[m][C]&&Array.isArray(this.w.seriesData.seriesGoals[m][C])&&this.w.seriesData.seriesGoals[m][C].forEach(L=>{d=Math.max(d,L.value),t=Math.min(t,L.value)}),s=d,A=D.noExponents(A),D.isFloat(A)&&(c.yValueDecimal=Math.max(c.yValueDecimal,A.toString().split(".")[1].length)),u>((l=p[m])==null?void 0:l[C])&&((n=p[m])==null?void 0:n[C])<0&&(u=p[m][C])}else c.hasNullValues=!0}(v==="bar"||v==="column")&&(u<0&&d<0&&(d=0,s=Math.max(s,0)),u===Number.MIN_VALUE&&(u=0,t=Math.min(t,0)))}return h.chart.type==="rangeBar"&&this.w.rangeData.seriesRangeStart.length&&c.isBarHorizontal&&(u=t),h.chart.type==="bar"&&(u<0&&d<0&&(d=0),u===Number.MIN_VALUE&&(u=0)),{minY:u,maxY:d,lowestY:t,highestY:s}}setYRange(){const e=this.w.globals,t=this.w.config;e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE;let s=Number.MAX_VALUE,a;if(e.isMultipleYAxis){s=Number.MAX_VALUE;for(let i=0;i<this.w.seriesData.series.length;i++)a=this.getMinYMaxY(i),e.minYArr[i]=a.lowestY,e.maxYArr[i]=a.highestY,s=Math.min(s,a.lowestY)}return a=this.getMinYMaxY(0,s,null,this.w.seriesData.series.length),t.chart.type==="bar"?(e.minY=a.minY,e.maxY=a.maxY):(e.minY=a.lowestY,e.maxY=a.highestY),s=a.lowestY,t.chart.stacked&&this._setStackedMinMax(),t.chart.type==="line"||t.chart.type==="area"||t.chart.type==="scatter"||t.chart.type==="candlestick"||t.chart.type==="boxPlot"||t.chart.type==="rangeBar"&&!e.isBarHorizontal?e.minY===Number.MIN_VALUE&&s!==-Number.MAX_VALUE&&s!==e.maxY&&(e.minY=s):e.minY=e.minY!==Number.MIN_VALUE?Math.min(a.minY,e.minY):a.minY,t.yaxis.forEach((i,r)=>{i.max!==void 0&&(typeof i.max=="number"?e.maxYArr[r]=i.max:typeof i.max=="function"&&(e.maxYArr[r]=i.max(e.isMultipleYAxis?e.maxYArr[r]:e.maxY)),e.maxY=e.maxYArr[r]),i.min!==void 0&&(typeof i.min=="number"?e.minYArr[r]=i.min:typeof i.min=="function"&&(e.minYArr[r]=i.min(e.isMultipleYAxis?e.minYArr[r]===Number.MIN_VALUE?0:e.minYArr[r]:e.minY)),e.minY=e.minYArr[r])}),e.isBarHorizontal&&["min","max"].forEach(i=>{t.xaxis[i]!==void 0&&typeof t.xaxis[i]=="number"&&(i==="min"?e.minY=t.xaxis[i]:e.maxY=t.xaxis[i])}),e.isMultipleYAxis?(this.scales.scaleMultipleYAxes(),e.minY=s):(this.scales.setYScaleForIndex(0,e.minY,e.maxY),e.minY=e.yAxisScale[0].niceMin,e.maxY=e.yAxisScale[0].niceMax,e.minYArr[0]=e.minY,e.maxYArr[0]=e.maxY),e.barGroups=[],e.lineGroups=[],e.areaGroups=[],t.series.forEach(i=>{switch(i.type||t.chart.type){case"bar":case"column":e.barGroups.push(i.group);break;case"line":e.lineGroups.push(i.group);break;case"area":e.areaGroups.push(i.group);break}}),e.barGroups=e.barGroups.filter((i,r,o)=>o.indexOf(i)===r),e.lineGroups=e.lineGroups.filter((i,r,o)=>o.indexOf(i)===r),e.areaGroups=e.areaGroups.filter((i,r,o)=>o.indexOf(i)===r),{minY:e.minY,maxY:e.maxY,minYArr:e.minYArr,maxYArr:e.maxYArr,yAxisScale:e.yAxisScale}}setXRange(){const e=this.w.globals,t=this.w.config,s=t.xaxis.type==="numeric"||t.xaxis.type==="datetime"||t.xaxis.type==="category"&&!this.w.axisFlags.noLabelsProvided||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.isXNumeric,a=()=>{for(let i=0;i<this.w.seriesData.series.length;i++)if(this.w.labelData.labels[i])for(let r=0;r<this.w.labelData.labels[i].length;r++)this.w.labelData.labels[i][r]!==null&&D.isNumber(this.w.labelData.labels[i][r])&&(e.maxX=Math.max(e.maxX,this.w.labelData.labels[i][r]),e.initialMaxX=Math.max(e.maxX,this.w.labelData.labels[i][r]),e.minX=Math.min(e.minX,this.w.labelData.labels[i][r]),e.initialMinX=Math.min(e.minX,this.w.labelData.labels[i][r]))};if(this.w.axisFlags.isXNumeric&&a(),this.w.axisFlags.noLabelsProvided&&t.xaxis.categories.length===0&&(e.maxX=this.w.labelData.labels[this.w.labelData.labels.length-1],e.
30initialMaxX=this.w.labelData.labels[this.w.labelData.labels.length-1],e.minX=1,e.initialMinX=1),this.w.axisFlags.isXNumeric||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.dataFormatXNumeric){let i=10;if(t.xaxis.tickAmount===void 0)i=Math.round(e.svgWidth/150),t.xaxis.type==="numeric"&&e.dataPoints<30&&(i=e.dataPoints-1),i>e.dataPoints&&e.dataPoints!==0&&(i=e.dataPoints-1);else if(t.xaxis.tickAmount==="dataPoints"){if(this.w.seriesData.series.length>1&&(i=this.w.seriesData.series[e.maxValsInArrayIndex].length-1),this.w.axisFlags.isXNumeric){const r=Math.round(e.maxX-e.minX);r<30&&(i=r)}}else i=t.xaxis.tickAmount;if(e.xTickAmount=i,t.xaxis.max!==void 0&&typeof t.xaxis.max=="number"&&(e.maxX=t.xaxis.max),t.xaxis.min!==void 0&&typeof t.xaxis.min=="number"&&(e.minX=t.xaxis.min),t.xaxis.range!==void 0&&(e.minX=e.maxX-t.xaxis.range),e.minX!==Number.MAX_VALUE&&e.maxX!==-Number.MAX_VALUE)if(t.xaxis.convertedCatToNumeric&&!this.w.axisFlags.dataFormatXNumeric){const r=[];for(let o=e.minX-1;o<e.maxX;o++)r.push(o+1);e.xAxisScale={result:r,niceMin:r[0],niceMax:r[r.length-1]}}else e.xAxisScale=this.scales.setXScale(e.minX,e.maxX);else e.xAxisScale=this.scales.linearScale(0,i,i,0,t.xaxis.stepSize),this.w.axisFlags.noLabelsProvided&&this.w.labelData.labels.length>0&&(e.xAxisScale=this.scales.linearScale(1,this.w.labelData.labels.length,i-1,0,t.xaxis.stepSize),this.w.seriesData.seriesX=this.w.labelData.labels.slice());s&&(this.w.labelData.labels=e.xAxisScale.result.slice())}return e.isBarHorizontal&&this.w.labelData.labels.length&&(e.xTickAmount=this.w.labelData.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:e.minX,maxX:e.maxX}}setZRange(){const e=this.w.globals;if(this.w.axisFlags.isDataXYZ){for(let t=0;t<this.w.seriesData.series.length;t++)if(typeof this.w.seriesData.seriesZ[t]<"u")for(let s=0;s<this.w.seriesData.seriesZ[t].length;s++)this.w.seriesData.seriesZ[t][s]!==null&&D.isNumber(this.w.seriesData.seriesZ[t][s])&&(e.maxZ=Math.max(e.maxZ,this.w.seriesData.seriesZ[t][s]),e.minZ=Math.min(e.minZ,this.w.seriesData.seriesZ[t][s]))}}_handleSingleDataPoint(){const e=this.w.globals,t=this.w.config;if(e.minX===e.maxX){const s=new U(this.w);if(t.xaxis.type==="datetime"){const a=s.getDate(e.minX);t.xaxis.labels.datetimeUTC?a.setUTCDate(a.getUTCDate()-2):a.setDate(a.getDate()-2),e.minX=new Date(a).getTime();const i=s.getDate(e.maxX);t.xaxis.labels.datetimeUTC?i.setUTCDate(i.getUTCDate()+2):i.setDate(i.getDate()+2),e.maxX=new Date(i).getTime()}else(t.xaxis.type==="numeric"||t.xaxis.type==="category"&&!this.w.axisFlags.noLabelsProvided)&&(e.minX=e.minX-2,e.initialMinX=e.minX,e.maxX=e.maxX+2,e.initialMaxX=e.maxX)}}_getMinXDiff(){const e=this.w.globals;this.w.axisFlags.isXNumeric&&this.w.seriesData.seriesX.forEach(t=>{if(t.length){t.length===1&&t.push(this.w.seriesData.seriesX[e.maxValsInArrayIndex][this.w.seriesData.seriesX[e.maxValsInArrayIndex].length-1]);const s=t.slice();s.sort((a,i)=>
30a-i),s.forEach((a,i)=>{if(i>0){const r=a-s[i-1];r>0&&(e.minXDiff=Math.min(r,e.minXDiff))}}),(e.dataPoints===1||e.minXDiff===Number.MAX_VALUE)&&(e.minXDiff=.5)}})}_setStackedMinMax(){const e=this.w.globals;if(!this.w.seriesData.series.length)return;let t=this.w.labelData.seriesGroups;t.length||(t=[this.w.seriesData.seriesNames.map(i=>i)]);const s={},a={};t.forEach(i=>{s[i]=[],a[i]=[],this.w.config.series.map((r,o)=>i.indexOf(this.w.seriesData.seriesNames[o])>-1?o:null).filter(r=>r!==null).forEach(r=>{var o,l,n,h;for(let c=0;c<this.w.seriesData.series[e.maxValsInArrayIndex].length;c++)typeof s[i][c]>"u"&&(s[i][c]=0,a[i][c]=0),(this.w.config.chart.stacked&&!e.comboCharts||this.w.config.chart.stacked&&e.comboCharts&&(!this.w.config.chart.stackOnlyBar||((l=(o=this.w.config.series)==null?void 0:o[r])==null?void 0:l.type)==="bar"||((h=(n=this.w.config.series)==null?void 0:n[r])==null?void 0:h.type)==="column"))&&this.w.seriesData.series[r][c]!==null&&D.isNumber(this.w.seriesData.series[r][c])&&(this.w.seriesData.series[r][c]>0?s[i][c]+=parseFloat(this.w.seriesData.series[r][c])+1e-4:a[i][c]+=parseFloat(this.w.seriesData.series[r][c]))})}),Object.entries(s).forEach(([i])=>
vendor: 8,109 bytes, line 30
30{s[i].forEach((r,o)=>{e.maxY=Math.max(e.maxY,s[i][o]),e.minY=Math.min(e.minY,a[i][o])})})}}function ze(){return{palette1:["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"],palette2:["#3F51B5","#03A9F4","#4CAF50","#F9CE1D","#FF9800"],palette3:["#33B2DF","#546E7A","#D4526E","#13D8AA","#A5978B"],palette4:["#4ECDC4","#C7F464","#81D4FA","#FD6A6A","#546E7A"],palette5:["#2B908F","#F9A3A4","#90EE7E","#FA4443","#69D2E7"],palette6:["#449DD1","#F86624","#EA3546","#662E9B","#C5D86D"],palette7:["#D7263D","#1B998B","#2E294E","#F46036","#E2C044"],palette8:["#662E9B","#F86624","#F9C80E","#EA3546","#43BCCD"],palette9:["#5C4742","#A5978B","#8D5B4C","#5A2A27","#C4BBAF"],palette10:["#A300D6","#7D02EB","#5653FE","#2983FF","#00B1F2"],cvdDeuteranopia:["#0072B2","#E69F00","#56B4E9","#009E73","#F0E442","#D55E00","#CC79A7"],cvdProtanopia:["#0077BB","#EE7733","#009988","#EE3377","#BBBBBB","#33BBEE","#CC3311"],cvdTritanopia:["#CC3311","#009988","#EE7733","#0077BB","#EE3377","#BBBBBB","#33BBEE"],highContrast:["#005A9C","#C00000","#007A33","#6C3483","#7B3F00","#0097A7","#4A235A"]}}class We{constructor(e,{theme:t=null,timeScale:s=null}={},a){this.w=e,this.elgrid=a,this.xaxisFontSize=e.config.xaxis.labels.style.fontSize,this.axisFontFamily=e.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=e.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal=e.config.chart.type==="bar"&&e.config.plotOptions.bar.horizontal,this.xAxisoffX=e.config.xaxis.position==="bottom"?e.layout.gridHeight:0,this.drawnLabels=[],this.axesUtils=new ie(e,{theme:t,timeScale:s})}drawYaxis(e){const t=this.w,s=new I(this.w),a=t.config.yaxis[e].labels.style,{fontSize:i,fontFamily:r,fontWeight:o}=a,l=s.group({class:"apexcharts-yaxis",rel:e,transform:`translate(${t.globals.translateYAxisX[e]}, 0)`});if(this.axesUtils.isYAxisHidden(e))return l;const n=s.group({class:"apexcharts-yaxis-texts-g"});l.add(n);const h=t.globals.yAxisScale[e].result.length-1,c=t.layout.gridHeight/h,d=t.formatters.yLabelFormatters[e],u=this.axesUtils.checkForReversedLabels(e,t.globals.yAxisScale[e].result.slice());if(t.config.yaxis[e].labels.show){let g=t.layout.translateY+t.config.yaxis[e].labels.offsetY;t.globals.isBarHorizontal?g=0:t.config.chart.type==="heatmap"&&(g-=c/2),g+=parseInt(i,10)/3;let p=null;for(let b=h;b>=0;b--){const f=d(u[b],b,t);let m=t.config.yaxis[e].labels.padding;t.config.yaxis[e].opposite&&t.config.yaxis.length!==0&&(m*=-1);const v=this.getTextAnchor(t.config.yaxis[e].labels.align,t.config.yaxis[e].opposite),y=this.axesUtils.getYAxisForeColor(a.colors,e),w=Array.isArray(y)?y[b]:y,C=Array.from(t.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${e}'] .apexcharts-yaxis-label tspan`)).map(L=>L.textContent),A=s.drawText({x:m,y:g,text:C.includes(f)&&!t.config.yaxis[e].labels.showDuplicates?"":f,textAnchor:v,fontSize:i,fontFamily:r,fontWeight:o,maxWidth:t.config.yaxis[e].labels.maxWidth,foreColor:w,isPlainText:!1,cssClass:`apexcharts-yaxis-label ${a.cssClass}`});n.add(A),this.addTooltip(A,f),p===null&&(p=A),t.config.yaxis[e].labels.rotate!==0&&this.rotateLabel(s,A,p,t.config.yaxis[e].labels.rotate),g+=c}}return this.addYAxisTitle(s,l,e),this.addAxisBorder(s,l,e,h,c),l}getTextAnchor(e,t){return e==="left"?"start":e==="center"?"middle":e==="right"?"end":t?"start":"end"}addTooltip(e,t){const s=H.createElementNS(_,"title");s.textContent=Array.isArray(t)?t.join(" "):t,e.node.appendChild(s)}rotateLabel(e,t,s,a){const i=e.rotateAroundCenter(s.node),r=e.rotateAroundCenter(t.node);t.node.setAttribute("transform",`rotate(${a} ${i.x} ${r.y})`)}addYAxisTitle(e,t,s){const a=this.w;if(a.config.yaxis[s].title.text!==void 0){const i=e.group({class:"apexcharts-yaxis-title"}),r=a.config.yaxis[s].opposite?a.globals.translateYAxisX[s]:0,o=e.drawText({x:r,y:a.layout.gridHeight/2+a.layout.translateY+a.config.yaxis[s].title.offsetY,text:a.config.yaxis[s].title.text,textAnchor:"end",foreColor:a.config.yaxis[s].title.style.color,fontSize:a.config.yaxis[s].title.style.fontSize,fontWeight:a.config.yaxis[s].title.style.fontWeight,fontFamily:a.config.yaxis[s].title.style.fontFamily,cssClass:`apexcharts-yaxis-title-text ${a.config.yaxis[s].title.style.cssClass}`});i.add(o),t.add(i)}}addAxisBorder(e,t,s,a,i){const r=this.w,o=r.config.yaxis[s].axisBorder;let l=31+o.offsetX;if(r.config.yaxis[s].opposite&&(l=-31-o.offsetX),o.show){const n=e.drawLine(l,r.layout.translateY+o.offsetY-2,l,r.layout.gridHeight+r.layout.translateY+o.offsetY+2,o.color,0,o.width);t.add(n)}r.config.yaxis[s].axisTicks.show&&this.axesUtils.drawYAxisTicks(l,a,o,r.config.yaxis[s].axisTicks,s,i,t)}drawYaxisInversed(e){const t=this.w,s=new I(this.w),a=s.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),i=s.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${t.layout.translateXAxisX}, ${t.layout.translateXAxisY})`});a.add(i);let r=t.globals.yAxisScale[e].result.length-1;const o=t.layout.gridWidth/r+.1;let l=o+t.config.xaxis.labels.offsetX;const n=t.formatters.xLabelFormatter;let h=this.axesUtils.checkForReversedLabels(e,t.globals.yAxisScale[e].result.slice());const c=t.labelData.timescaleLabels;if(c.length>0&&(this.xaxisLabels=c.slice(),h=c.slice(),r=h.length),t.config.xaxis.labels.show)for(let d=c.length?0:r;c.length?d<c.length:d>=0;c.length?d++:d--){let u=n(h[d],d,t),g=t.layout.gridWidth+t.globals.padHorizontal-(l-o+t.config.xaxis.labels.offsetX);if(c.length){const b=this.axesUtils.getLabel(h,c,g,d,this.drawnLabels,this.xaxisFontSize);g=b.x,u=b.text,this.drawnLabels.push(b.text),d===0&&t.globals.skipFirstTimelinelabel&&(u=""),d===h.length-1&&t.globals.skipLastTimelinelabel&&(u="")}const p=s.drawText({x:g,y:this.xAxisoffX+t.config.xaxis.labels.offsetY+30-(t.config.xaxis.position==="top"?t.layout.xAxisHeight+t.config.xaxis.axisTicks.height-2:0),text:u,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[e]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:t.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:`apexcharts-xaxis-label ${t.config.xaxis.labels.style.cssClass}`});i.add(p),this.addTooltip(p,u),l+=o}return this.inversedYAxisTitleText(a),this.inversedYAxisBorder(a),a}inversedYAxisBorder(e){const t=this.w,s=new I(this.w),a=t.config.xaxis.axisBorder;if(a.show){let i=0;t.config.chart.type==="bar"&&t.axisFlags.isXNumeric&&(i-=15);const r=s.drawLine(t.globals.padHorizontal+i+a.offsetX,this.xAxisoffX,t.layout.gridWidth,this.xAxisoffX,a.color,0,a.height);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(r):e.add(r)}}inversedYAxisTitleText(e){const t=this.w,s=new I(this.w);if(t.config.xaxis.title.text!==void 0){const a=s.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),i=s.drawText({x:t.layout.gridWidth/2+t.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(t.config.xaxis.title.style.fontSize)+t.config.xaxis.title.offsetY+20,text:t.config.xaxis.title.text,textAnchor:"middle",fontSize:t.config.xaxis.title.style.fontSize,fontFamily:t.config.xaxis.title.style.fontFamily,fontWeight:t.config.xaxis.title.style.fontWeight,foreColor:t.config.xaxis.title.style.color,cssClass:`apexcharts-xaxis-title-text ${t.config.xaxis.title.style.cssClass}`});a.add(i),e.add(a)}}yAxisTitleRotate(e,t){const s=this.w,a=new I(this.w),i=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${e}'] .apexcharts-yaxis-texts-g`),r=i?i.getBoundingClientRect():{width:0,height:0},o=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${e}'] .apexcharts-yaxis-title text`),l=o?o.getBoundingClientRect():{width:0,height:0};if(o){const n=this.xPaddingForYAxisTitle(e,r,l,t);o.setAttribute("x",n.xPos-(t?10:0));const h=a.rotateAroundCenter(o);o.setAttribute("transform",`rotate(${t?s.config.yaxis[e].title.rotate*-1:s.config.yaxis[e].title.rotate} ${h.x} ${h.y})`)}}xPaddingForYAxisTitle(e,t,s,a){const i=this.w;let r=0,o=10;return i.config.yaxis[e].title.text===void 0||e<0?{xPos:r,padd:0}:(a?r=t.width+i.config.yaxis[e].title.offsetX+s.width/2+o/2:(r=t.width*-1+i.config.yaxis[e].title.offsetX+o/2+s.width/2,i.globals.isBarHorizontal&&(
30o=25,r=t.width*-1-i.config.yaxis[e].title.offsetX-o)),{xPos:r,padd:o})}setYAxisXPosition(e,t){const s=this.w;let a=0,i=0,r=18,o=1;s.config.yaxis.length>1&&(this.multipleYs=!0),s.config.yaxis.forEach((l,n)=>{const h=s.globals.ignoreYAxisIndexes.includes(n)||!l.show||l.floating||e[n].width===0,c=e[n].width+t[n].width;l.opposite?s.globals.isBarHorizontal?(i=s.layout.gridWidth+s.layout.translateX-1,s.globals.translateYAxisX[n]=i-l.labels.offsetX):(i=s.layout.gridWidth+s.layout.translateX+o,h||(o+=c+20),s.globals.translateYAxisX[n]=i-l.labels.offsetX+20):(a=s.layout.translateX-r,h||(r+=c+20),s.globals.translateYAxisX[n]=a+l.labels.offsetX)})}setYAxisTextAlignments(){const e=this.w;Array.from(e.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((t,s)=>{const a=e.config.yaxis[s];if(a&&!a.floating&&a.labels.align!==void 0){const i=e.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${s}'] .apexcharts-yaxis-texts-g`),r=Array.from(e.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${s}'] .apexcharts-yaxis-label`)),o=i.getBoundingClientRect();r.forEach(l=>{l.setAttribute("text-anchor",a.labels.align)}),a.labels.align==="left"&&!a.opposite?i.setAttribute("transform",`translate(-${o.width}, 0)`):a.labels.align==="center"?i.setAttribute("transform",`translate(${o.width/2*(a.opposite?1:-1)}, 0)`):a.labels.align==="right"&&a.opposite&&i.setAttribute("transform",`translate(${o.width}, 0)`)}})}}class Bt{constructor(e,t){this.w=e,this.ctx=t,this.documentEvent=this.documentEvent.bind(this)}addEventListener(e,t){const s=this.w;Object.prototype.hasOwnProperty.call(s.globals.events,e)?s.globals.events[e].push(t):s.globals.events[e]=[t]}removeEventListener(e,t){const s=this.w;if(!Object.prototype.hasOwnProperty.call(s.globals.events,e))return;const a=s.globals.events[e].indexOf(t);a!==-1&&s.globals.events[e].splice(a,1)}fireEvent(e,t){const s=this.w;if(!Object.prototype.hasOwnProperty.call(s.globals.events,e))return;(!t||!t.length)&&(t=[]);const a=s.globals.events[e],i=a.length;for(let r=0;r<i;r++)a[r].apply(null,t)}setupEventHandlers(){const e=this.w,t=this.ctx,s=e.dom.baseEl.querySelector(e.globals.chartClass);this.ctx.eventList.forEach(a=>{s.addEventListener(a,i=>{const r=i.target.getAttribute("i")===null&&e.interact.capturedSeriesIndex!==-1?e.interact.capturedSeriesIndex:i.target.getAttribute("i"),o=i.target.getAttribute("j")===null&&e.interact.capturedDataPointIndex!==-1?e.interact.capturedDataPointIndex:i.target.getAttribute("j"),l=Object.assign({},e,{seriesIndex:e.globals.axisCharts?r:0,dataPointIndex:o});i.type==="keydown"?e.config.chart.accessibility.enabled&&e.config.chart.accessibility.keyboard.enabled&&(t.ctx.keyboardNavigation&&t.ctx.keyboardNavigation.handleKey(i),typeof e.config.chart.events.keyDown=="function"&&e.config.chart.events.keyDown(i,t,l),t.ctx.events.fireEvent("keydown",[i,t,l])):i.type==="
30keyup"?e.config.chart.accessibility.enabled&&e.config.chart.accessibility.keyboard.enabled&&(typeof e.config.chart.events.keyUp=="function"&&e.config.chart.events.keyUp(i,t,l),t.ctx.events.fireEvent("keyup",[i,t,l])):i.type==="mousemove"||i.type==="touchmove"?typeof e.config.chart.events.mouseMove=="function"&&e.config.chart.events.mouseMove(i,t,l):i.type==="mouseleave"||i.type==="touchleave"?typeof e.config.chart.events.mouseLeave=="function"&&e.config.chart.events.mouseLeave(i,t,l):(i.type==="mouseup"&&i.which===1||i.type==="touchend")&&(typeof e.config.chart.events.click=="function"&&e.config.chart.events.click(i,t,l),t.ctx.events.fireEvent("click",[i,t,l]))},{capture:!1,passive:!0})}),this.ctx.eventList.forEach(a=>{e.dom.baseEl.addEventListener(a,this.documentEvent,{passive:!0})}),this.ctx.core.setupBrushHandler()}documentEvent(e){const t=this.w,s=e.target.className;if(e.type==="click"){const a=t.dom.baseEl.querySelector(".apexcharts-menu");a&&a.classList.contains("apexcharts-menu-open")&&s!=="apexcharts-menu-icon"&&a.classList.remove("apexcharts-menu-open")}t.interact.clientX=e.type==="touchmove"?e.touches[0].clientX:e.clientX,t.interact.clientY=e.type==="touchmove"?e.touches[0].clientY:e.clientY}}class Ot{constructor(e){this.w=e}setCurrentLocaleValues(e){let t=this.w.config.chart.locales;const s=z.getApex();s.chart&&s.chart.locales&&s.chart.locales.length>0&&(t=this.w.config.chart.locales.concat(s.chart.locales));const a=t.filter(i=>i.name===e)[0];if(a){const i=D.extend(nt,a);this.w.globals.locale=i.options}else throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options")}}class Nt{constructor(e,t){this.w=e,this.ctx=t}drawAxis(e,t){const s=this.w.globals,a=this.w.config,i=new we(this.w,this.ctx,t),r=new We(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale},t);if(s.axisCharts&&e!=="radar"){let o,l;s.isBarHorizontal?(l=r.drawYaxisInversed(0),o=i.drawXaxisInversed(0),this.w.dom.elGraphical.add(o),this.w.dom.elGraphical.add(l)):(o=i.drawXaxis(),this.w.dom.elGraphical.add(o),a.yaxis.map((n,h)=>{if(s.ignoreYAxisIndexes.indexOf(h)===-1&&(l=r.drawYaxis(h),this.w.dom.Paper.add(l),this.w.config.grid.position==="back")){const c=this.w.dom.Paper.children()[1];c&&(c.remove(),this.w.dom.Paper.add(c))}}))}}}class Ye{constructor(e){this.w=e}drawXCrosshairs(){const e=this.w,t=new I(this.w),s=new q(this.w),a=e.config.xaxis.crosshairs.fill.gradient,i=e.config.xaxis.crosshairs.dropShadow,r=e.config.xaxis.crosshairs.fill.type,o=a.colorFrom,l=a.colorTo,n=a.opacityFrom,h=a.opacityTo,c=a.stops,d="none",u=i.enabled,g=i.left,p=i.top,b=i.blur,f=i.color,m=i.opacity;let v=e.config.xaxis.crosshairs.fill.color;if(e.config.xaxis.crosshairs.show){r==="gradient"&&(v=t.drawGradient("vertical",o,l,n,h,null,c,null));let y=t.drawRect();e.config.xaxis.crosshairs.width===1&&(y=t.drawLine());let w=e.layout.gridHeight;(!D.isNumber(w)||w<0)&&(w=0);let C=e.config.xaxis.crosshairs.width;(!D.isNumber(C)||C<0)&&(C=0),y.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:w,width:C,height:w,fill:v,filter:d,"fill-opacity":e.config.xaxis.crosshairs.opacity,stroke:e.config.xaxis.crosshairs.stroke.color,"stroke-width":e.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":e.config.xaxis.crosshairs.stroke.dashArray}),u&&(y=s.dropShadow(y,{left:g,top:p,blur:b,color:f,opacity:m})),e.dom.elGraphical.add(y)}}drawYCrosshairs(){const e=this.w,t=new I(this.w),s=e.config.yaxis[0].crosshairs,a=e.globals.barPadForNumericAxis;if(e.config.yaxis[0].crosshairs.show){const r=t.drawLine(-a,0,e.layout.gridWidth+a,0,s.stroke.color,s.stroke.dashArray,s.stroke.width);r.attr({class:"apexcharts-ycrosshairs"}),e.dom.elGraphical.add(r)}const i=t.drawLine(-a,0,e.layout.gridWidth+a,0,s.stroke.color,0,0);i.attr({class:"apexcharts-ycrosshairs-hidden"}),e.dom.elGraphical.add(i)}}class Wt{constructor(e){this.w=e}checkResponsiveConfig(e){const t=this.w,s=t.config;if(s.responsive.length===0)return;const a=s.responsive.slice();a.sort((o,l)=>o.breakpoint>l.breakpoint?1:l.breakpoint>o.breakpoint?-1:0).reverse();const i=new ye({}),r=(o={})=>{const l=a[0].breakpoint,n=z.isBrowser()?window.innerWidth>0?window.innerWidth:screen.width:0;if(n>l){const h=D.clone(t.globals.initialConfig);h.series=D.clone(t.config.series);const c=$.extendArrayProps(i,h,t);o=D.extend(c,o),o=D.extend(t.config,o),this.overrideResponsiveOptions(o)}else for(let h=0;h<a.length;h++)n<a[h].breakpoint&&(o=$.extendArrayProps(i,a[h].options,t),o=D.extend(t.config,o),this.overrideResponsiveOptions(o))};if(e){let o=$.extendArrayProps(i,e,t);o=D.extend(t.config,o),o=D.extend(o,e),r(o)}else r({})}overrideResponsiveOptions(e){const t=new ye(e).init({responsiveOverride:!0});this.w.config=t}}class j{constructor(e,{toggleDataSeries:t,revertDefaultAxisMinMax:s,updateSeries:a}={}){this.w=e,this._toggleDataSeries=t||null,this._revertDefaultAxisMinMax=s||null,this._updateSeries=a||null,this.legendInactiveClass="legend-mouseover-inactive"}clearSeriesCache(){const e=this.w;e.globals.cachedSelectors&&(delete e.globals.cachedSelectors.allSeriesEls,delete e.globals.cachedSelectors.highlightSeriesEls)}getAllSeriesEls(){const e=this.w,t="allSeriesEls";return e.globals.cachedSelectors[t]||(e.globals.cachedSelectors[t]=e.dom.baseEl.getElementsByClassName("apexcharts-series")),e.globals.cachedSelectors[t]}getSeriesByName(e){return this.w.dom.baseEl.querySelector(`.apexcharts-inner .apexcharts-series[seriesName='${D.escapeString(e)}']`)}isSeriesHidden(e){const t=this.getSeriesByName(e),s=parseInt(t.getAttribute("data:realIndex"),10);return{isHidden:t.classList.contains("apexcharts-series-collapsed"),realIndex:s}}addCollapsedClassToSeries(e,t){j.addCollapsedClassToSeries(this.w,e,t)}static addCollapsedClassToSeries(e,t,s){function a(i){for(let r=0;r<i.length;r++)i[r].index===s&&t.node.classList.add("apexcharts-series-collapsed")}a(e.globals.collapsedSeries),a(e.globals.ancillaryCollapsedSeries)}toggleSeries(e){var t;const s=this.isSeriesHidden(e);
30return(t=this._toggleDataSeries)==null||t.call(this,s.realIndex,s.isHidden),s.isHidden}showSeries(e){var t;const s=this.isSeriesHidden(e);s.isHidden&&((t=this._toggleDataSeries)==null||t.call(this,s.realIndex,!0))}hideSeries(e){var t;const s=this.isSeriesHidden(e);s.isHidden||(t=this._toggleDataSeries)==null||t.call(this,s.realIndex,!1)}resetSeries(e=!0,t=!0,s=!0){var a,i;const r=this.w;this.clearSeriesCache();let o=D.clone(r.globals.initialSeries);r.globals.previousPaths=[],s?(r.globals.collapsedSeries=[],r.globals.ancillaryCollapsedSeries=[],r.globals.collapsedSeriesIndices=[],r.globals.ancillaryCollapsedSeriesIndices=[]):o=this.emptyCollapsedSeries(o),r.config.series=o,e&&(t&&(r.interact.zoomed=!1,(a=this._revertDefaultAxisMinMax)==null||a.call(this)),(i=this._updateSeries)==null||i.call(this,o,r.config.chart.animations.dynamicAnimation.enabled))}emptyCollapsedSeries(e){const t=this.w;for(let s=0;s<e.length;s++)t.globals.collapsedSeriesIndices.indexOf(s)>-1&&(e[s].data=[]);return e}highlightSeries(e){const t=this.w,s=this.getSeriesByName(e),a=parseInt(s==null?void 0:s.getAttribute("data:realIndex"),10),i="highlightSeriesEls";let r=t.globals.cachedSelectors[i];r||(r=t.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),t.globals.cachedSelectors[i]=r);let o=null,l=null,n=null;if(t.globals.axisCharts||t.config.chart.type==="radialBar")if(t.globals.axisCharts){o=t.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${a}']`),l=t.dom.baseEl.querySelector(`.apexcharts-datalabels[data\\:realIndex='${a}']`);const h=t.globals.seriesYAxisReverseMap[a];n=t.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${h}']`)}else o=t.dom.baseEl.querySelector(`.apexcharts-series[rel='${a+1}']`);else o=t.dom.baseEl.querySelector(`.apexcharts-series[rel='${a+1}'] path`);for(let h=0;h<r.length;h++)r[h].classList.add(this.legendInactiveClass);if(o)t.globals.axisCharts||o.parentNode.classList.remove(this.legendInactiveClass),o.classList.remove(this.legendInactiveClass),l!==null&&l.classList.remove(this.legendInactiveClass),n!==null&&n.classList.remove(this.legendInactiveClass);else for(let h=0;h<r.length;h++)r[h].classList.remove(this.legendInactiveClass)}toggleSeriesOnHover(e,t){const s=this.w;t||(t=e.target);const a=s.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis");if(e.type==="mousemove"){const i=parseInt(t.getAttribute("rel"),10)-1;this.highlightSeries(s.seriesData.seriesNames[i])}else if(e.type==="mouseout")for(let i=0;i<a.length;i++)a[i].classList.remove(this.legendInactiveClass)}highlightRangeInSeries(e,t){const s=this.w,a=s.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),i=o=>{for(let l=0;l<a.length;l++)a[l].classList[o](this.legendInactiveClass)},r=(o,l)=>{for(let n=0;n<a.length;n++){const h=Number(a[n].getAttribute("val"));h>=o.from&&(h<o.to||o.to===l&&h===l)&&a[n].classList.remove(this.legendInactiveClass)}};if(e.type==="mousemove"){const o=parseInt(t.getAttribute("rel"),10)-1;i("add");const l=s.config.plotOptions.heatmap.colorScale.ranges,n=l[o],h=l.reduce((c,d)=>Math.max(c,d.to),0);r(n,h)}else e.type==="mouseout"&&i("remove")}getActiveConfigSeriesIndex(e="asc",t=[]){const s=this.w;let a=0;if(s.config.series.length>1){const i=s.config.series.map((r,o)=>{const l=()=>s.globals.comboCharts?t.length===0||t.length&&t.indexOf(s.config.series[o].type)>-1:!0;return r.data&&r.data.length>0&&s.globals.collapsedSeriesIndices.indexOf(o)===-1&&l()?o:-1});for(let r=e==="asc"?0:i.length-1;e==="asc"?r<i.length:r>=0;e==="asc"?r++:r--)if(i[r]!==-1){a=i[r];break}}return a}getBarSeriesIndices(){return this.w.globals.comboCharts?this.w.config.series.map((e,t)=>e.type==="bar"||e.type==="column"?t:-1).filter(e=>e!==-1):this.w.config.series.map((e,t)=>t)}getPreviousPaths(){const e=this.w;e.globals.previousPaths=[];function t(i,r,o){const l=i[r].childNodes,n={type:o,paths:[],realIndex:i[r].getAttribute("data:realIndex")};for(let h=0;h<l.length;h++)if(l[h].hasAttribute("pathTo")){const c=l[h].getAttribute("pathTo");n.paths.push({d:c})}e.globals.previousPaths.push(n)}const s=i=>e.dom.baseEl.querySelectorAll(`.apexcharts-${i}-series .apexcharts-series`);["line","area","bar","rangebar","rangeArea","candlestick","radar"].forEach(i=>
30{const r=s(i);for(let o=0;o<r.length;o++)t(r,o,i)});const a=e.dom.baseEl.querySelectorAll(`.apexcharts-${e.config.chart.type} .apexcharts-series`);if(a.length>0)for(let i=0;i<a.length;i++){const r=e.dom.baseEl.querySelectorAll(`.apexcharts-${e.config.chart.type} .apexcharts-series[data\\:realIndex='${i}'] rect`),o=[];for(let l=0;l<r.length;l++){const n=c=>r[l].getAttribute(c),h={x:parseFloat(n("x")),y:parseFloat(n("y")),width:parseFloat(n("width")),height:parseFloat(n("height"))};o.push({rect:h,color:r[l].getAttribute("color")})}e.globals.previousPaths.push(o)}e.globals.axisCharts||(e.globals.previousPaths=e.seriesData.series)}clearPreviousPaths(){const e=this.w;e.globals.previousPaths=[],e.globals.allSeriesCollapsed=!1}handleNoData(){const e=this.w,t=this,s=e.config.noData,a=new I(t.w);let i=e.globals.svgWidth/2,r=e.globals.svgHeight/2,o="middle";if(e.globals.noData=!0,e.globals.animationEnded=!0,s.align==="left"?(i=10,o="start"):s.align==="right"&&(i=e.globals.svgWidth-10,o="end"),s.verticalAlign==="top"?r=50:s.verticalAlign==="bottom"&&(r=e.globals.svgHeight-50),i=i+s.offsetX,r=r+parseInt(s.style.fontSize,10)+2+s.offsetY,s.text!==void 0&&s.text!==""){const l=a.drawText({x:i,y:r,text:s.text,textAnchor:o,fontSize:s.style.fontSize,fontFamily:s.style.fontFamily,foreColor:s.style.color,opacity:1,class:"apexcharts-text-nodata"});e.dom.Paper.add(l)}}setNullSeriesToZeroValues(e){const t=this.w;for(let s=0;s<e.length;s++)if(e[s].length===0)for(let a=0;a<e[t.globals.maxValsInArrayIndex].length;a++)e[s].push(0);return e}hasAllSeriesEqualX(){let e=!0;const t=this.w,s=this.filteredSeriesX();for(let a=0;a<s.length-1;a++)if(s[a][0]!==s[a+1][0]){e=!1;break}return t.globals.allSeriesHasEqualX=e,e}filteredSeriesX(){return this.w.seriesData.seriesX.map(e=>e.length>0?e:[])}}class _t{constructor(e){this.w=e,this.colors=[],this.isColorFn=!1,this.isHeatmapDistributed=this.checkHeatmapDistributed(),this.isBarDistributed=this.checkBarDistributed()}checkHeatmapDistributed(){const{chart:e,plotOptions:t}=this.w.config;return e.type==="treemap"&&t.treemap&&t.treemap.distributed||e.type==="heatmap"&&t.heatmap&&t.heatmap.distributed}checkBarDistributed(){const{chart:e,plotOptions:t}=this.w.config;return t.bar&&t.bar.distributed&&(e.type==="bar"||e.type==="rangeBar")}init(){this.setDefaultColors()}setDefaultColors(){var e;const t=this.w,s=new D;t.dom.elWrap.classList.add(`apexcharts-theme-${t.config.theme.mode||"light"}`);const a=(e=t.config.theme.accessibility)==null?void 0:e.colorBlindMode;if(a){t.globals.colors=this.getColorBlindColors(a),this.applySeriesColors(t.seriesData.seriesColors,t.globals.colors);const o=t.globals.colors.slice();this.pushExtraColors(t.globals.colors),this.applyColorTypes(["fill","stroke"],o),this.applyDataLabelsColors(o),this.applyRadarPolygonsColors(),this.applyMarkersColors(o),a==="highContrast"&&t.dom.elWrap.classList.add("apexcharts-high-contrast");return}const i=[...t.config.colors||t.config.fill.colors||[]];t.globals.colors=this.getColors(i),this.applySeriesColors(t.seriesData.seriesColors,t.globals.colors),t.config.theme.monochrome.enabled&&(t.globals.colors=this.getMonochromeColors(t.config.theme.monochrome,t.seriesData.series,s));const r=t.globals.colors.slice();this.pushExtraColors(t.globals.colors),this.applyColorTypes(["fill","stroke"],r),this.applyDataLabelsColors(r),this.applyRadarPolygonsColors(),this.applyMarkersColors(r)}getColors(e){const t=this.w;return!e||e.length===0?this.predefined():Array.isArray(e)&&e.length>0&&typeof e[0]=="function"?(this.isColorFn=!0,t.config.series.map((s,a)=>{const i=e[a]||e[0];return typeof i=="function"?i({value:t.globals.axisCharts?t.seriesData.series[a][0]||0:t.seriesData.series[a],seriesIndex:a,dataPointIndex:a,w:this.w}):i})):e}applySeriesColors(e,t){e.forEach((s,a)=>{s&&(t[a]=s)})}getMonochromeColors(e,t,s){const{color:a,shadeIntensity:i,shadeTo:r}=e,o=this.isBarDistributed||this.isHeatmapDistributed?t[0].length*t.length:t.length,l=1/(o/i);let n=0;return Array.from({length:o},()=>{const h=r==="dark"?s.shadeColor(n*-1,a):s.shadeColor(n,a);return n+=l,h})}applyColorTypes(e,t){const s=this.w;e.forEach(a=>{s.globals[a].colors=s.config[a].colors===void 0?this.isColorFn?s.config.colors:t:s.config[a].colors.slice(),this.pushExtraColors(s.globals[a].colors)})}applyDataLabelsColors(e){const t=this.w;t.globals.dataLabels.style.colors=t.config.dataLabels.style.colors===void 0?e:t.config.dataLabels.style.colors.slice(),this.pushExtraColors(t.globals.dataLabels.style.colors,50)}applyRadarPolygonsColors(){const e=this.w;e.globals.radarPolygons.fill.colors=e.config.plotOptions.radar.polygons.fill.colors===void 0?[e.config.theme.mode==="dark"?"#343A3F":"none"]:e.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(e.globals.radarPolygons.fill.colors,20)}applyMarkersColors(e){const t=this.w;t.globals.markers.colors=t.config.markers.colors===void 0?e:t.config.markers.colors.slice(),this.pushExtraColors(t.globals.markers.colors)}pushExtraColors(e,t,s=null){const a=this.w;let i=t||a.seriesData.series.length;if(s===null&&(s=this.isBarDistributed||this.isHeatmapDistributed||a.config.chart.type==="heatmap"&&a.config.plotOptions.heatmap&&a.config.plotOptions.heatmap.colorScale.inverse),s&&a.seriesData.series.length&&(i=a.seriesData.series[a.globals.maxValsInArrayIndex].length*a.seriesData.series.length),e.length<i){const r=i-e.length;for(let o=0;o<r;
30o++)e.push(e[o])}}getColorBlindColors(e){const t=ze();return({deuteranopia:t.cvdDeuteranopia,protanopia:t.cvdProtanopia,tritanopia:t.cvdTritanopia,highContrast:t.highContrast}[e]||t.palette1).slice()}updateThemeOptions(e){e.chart=e.chart||{},e.tooltip=e.tooltip||{};const t=e.theme.mode,s=t==="dark"?"palette4":t==="light"?"palette1":e.theme.palette||"palette1",a=t==="dark"?"#f6f7f8":t==="light"?"#373d3f":e.chart.foreColor||"#373d3f";return e.tooltip.theme=t||"light",e.chart.foreColor=a,e.theme.palette=s,e}predefined(){const e=this.w.config.theme.palette,t=ze();return t[e]||t.palette1}}class Gt{constructor(e){this.w=e}draw(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}drawTitleSubtitle(e){const t=this.w,s=e==="title"?t.config.title:t.config.subtitle;let a=t.globals.svgWidth/2,i=s.offsetY,r="middle";if(s.align==="left"?(a=10,r="start"):s.align==="right"&&(a=t.globals.svgWidth-10,r="end"),a=a+s.offsetX,i=i+parseInt(s.style.fontSize,10)+s.margin/2,s.text!==void 0){const o=new I(this.w).drawText({x:a,y:i,text:s.text,textAnchor:r,fontSize:s.style.fontSize,fontFamily:s.style.fontFamily,fontWeight:s.style.fontWeight,foreColor:s.style.color,opacity:1});o.node.setAttribute("class",`apexcharts-${e}-text`),t.dom.Paper.add(o)}}}let $t=class{constructor(x){this.w=x.w,this.dCtx=x}getTitleSubtitleCoords(x){const e=this.w;let t=0,s=0;const a=x==="title"?e.config.title.floating:e.config.subtitle.floating,i=e.dom.baseEl.querySelector(`.apexcharts-${x}-text`);if(i!==null&&!a){const r=i.getBoundingClientRect();t=r.width,s=e.globals.axisCharts?r.height+5:r.height}return{width:t,height:s}}getLegendsRect(){const x=this.w,e=x.dom.elLegendWrap;!x.config.legend.height&&(x.config.legend.position==="top"||x.config.legend.position==="bottom")&&(e.style.maxHeight=x.globals.svgHeight/2+"px");const t=Object.assign({},D.getBoundingClientRect(e));return e!==null&&!x.config.legend.floating&&x.config.legend.show?this.dCtx.lgRect={x:t.x,y:t.y,height:t.height,width:t.height===0?0:t.width}:this.dCtx.lgRect={x:0,y:0,height:0,width:0},(x.config.legend.position==="left"||x.config.legend.position==="right")&&this.dCtx.lgRect.width*1.5>x.globals.svgWidth&&(this.dCtx.lgRect.width=x.globals.svgWidth/1.5),this.dCtx.lgRect}getDatalabelsRect(){const x=this.w,e=[];x.config.series.forEach((r,o)=>{r.data.forEach((l,n)=>{const h=(c=>x.config.dataLabels.formatter(c,{seriesIndex:o,dataPointIndex:n,w:x}))(x.seriesData.series[o][n]);e.push(h)})});const t=D.getLargestStringFromArr(e),s=new I(this.w),a=x.config.dataLabels.style,i=s.getTextRects(t,parseInt(a.fontSize),a.fontFamily);return{width:i.width*1.05,height:i.height}}getLargestStringFromMultiArr(x,e){const t=this.w;let s=x;if(t.axisFlags.isMultiLineX){const a=e.map(o=>Array.isArray(o)?o.length:1),i=Math.max(...a),r=a.indexOf(i);s=e[r]}return s}};class jt{constructor(e){this.w=e.w,this.dCtx=e}getxAxisLabelsCoords(){const e=this.w;let t=e.labelData.labels.slice();e.config.xaxis.convertedCatToNumeric&&t.length===0&&(t=e.labelData.categoryLabels);let s;if(e.labelData.timescaleLabels.length>0){const a=this.getxAxisTimeScaleLabelsCoords();s={width:a.width,height:a.height},e.layout.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends=(e.config.legend.position==="left"||e.config.legend.position==="right")&&!e.config.legend.floating?this.dCtx.lgRect.width:0;const a=e.formatters.xLabelFormatter;let i=D.getLargestStringFromArr(t),r=this.dCtx.dimHelpers.getLargestStringFromMultiArr(i,t);e.globals.isBarHorizontal&&(i=e.globals.yAxisScale[0].result.reduce((d,u)=>d.length>u.length?d:u,0),r=i);const o=new ve(this.w),l=i;i=o.xLabelFormat(a,i,l,{i:void 0,dateFormatter:new U(this.w).formatDate,w:e}),r=o.xLabelFormat(a,r,l,{i:void 0,dateFormatter:new U(this.w).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&typeof i>"u"||String(i).trim()==="")&&(i="1",r=i);const n=new I(this.w);let h=n.getTextRects(i,e.config.xaxis.labels.style.fontSize),c=h;if(i!==r&&(c=n.getTextRects(r,e.config.xaxis.labels.style.fontSize)),s={width:h.width>=c.width?h.width:c.width,height:h.height>=c.height?h.height:c.height},s.width*t.length>
vendor: 1,124 bytes, line 30
30e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&e.config.xaxis.labels.rotate!==0||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.layout.rotateXLabels=!0;const d=u=>n.getTextRects(u,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,`rotate(${e.config.xaxis.labels.rotate} 0 0)`,!1);h=d(i),i!==r&&(c=d(r)),s.height=(h.height>c.height?h.height:c.height)/1.5,s.width=h.width>c.width?h.width:c.width}}else e.layout.rotateXLabels=!1}return e.config.xaxis.labels.show||(s={width:0,height:0}),{width:s.width,height:s.height}}getxAxisGroupLabelsCoords(){var e;const t=this.w;if(!t.labelData.hasXaxisGroups)return{width:0,height:0};const s=((e=t.config.xaxis.group.style)==null?void 0:e.fontSize)||t.config.xaxis.labels.style.fontSize,a=t.labelData.groups.map(c=>c.title);let i;const r=D.getLargestStringFromArr(a),o=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,a),l=new I(this.w),n=l.getTextRects(r,s);let h=n;return r!==o&&(h=l.getTextRects(o,s)),i={width:n.width>=h.width?n.width:h.width,height:n.height>
30=h.height?n.height:h.height},t.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}getxAxisTitleCoords(){const e=this.w;let t=0,s=0;if(e.config.xaxis.title.text!==void 0){const a=new I(this.w).getTextRects(e.config.xaxis.title.text,e.config.xaxis.title.style.fontSize);t=a.width,s=a.height}return{width:t,height:s}}getxAxisTimeScaleLabelsCoords(){const e=this.w;this.dCtx.timescaleLabels=e.labelData.timescaleLabels.slice();const t=this.dCtx.timescaleLabels.map(i=>i.value),s=t.reduce((i,r)=>typeof i>"u"?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):i.length>r.length?i:r,0),a=new I(this.w).getTextRects(s,e.config.xaxis.labels.style.fontSize);return a.width*1.05*t.length>e.layout.gridWidth&&e.config.xaxis.labels.rotate!==0&&(e.globals.overlappingXLabels=!0),a}additionalPaddingXLabels(e){const t=this.w,s=t.globals,a=t.config,i=a.xaxis.type,r=e.width;s.skipLastTimelinelabel=!1,s.skipFirstTimelinelabel=!1;const o=t.config.yaxis[0].opposite&&t.globals.isBarHorizontal,l=c=>s.collapsedSeriesIndices.indexOf(c)!==-1,n=c=>{if(this.dCtx.timescaleLabels&&this.dCtx.timescaleLabels.length){const d=this.dCtx.timescaleLabels[0],u=this.dCtx.timescaleLabels[this.dCtx.timescaleLabels.length-1].position+r/1.75-this.dCtx.yAxisWidthRight,g=d.position-r/1.75+this.dCtx.yAxisWidthLeft,p=t.config.legend.position==="right"&&this.dCtx.lgRect.width>0?this.dCtx.lgRect.width:0;u>s.svgWidth-t.layout.translateX-p&&(s.skipLastTimelinelabel=!0),g<-((!c.show||c.floating)&&(a.chart.type==="bar"||a.chart.type==="candlestick"||a.chart.type==="rangeBar"||a.chart.type==="boxPlot")?r/1.75:10)&&(s.skipFirstTimelinelabel=!0)}else i==="datetime"?this.dCtx.gridPad.right<r&&!t.layout.rotateXLabels&&(s.skipLastTimelinelabel=!0):i!=="datetime"&&this.dCtx.gridPad.right<r/2-this.dCtx.yAxisWidthRight&&!t.layout.rotateXLabels&&!t.config.xaxis.labels.trim&&(this.dCtx.xPadRight=r/2+1)},h=(c,d)=>{a.yaxis.length>1&&l(d)||n(c)};a.yaxis.forEach((c,d)=>{o?(this.dCtx.gridPad.left<r&&(this.dCtx.xPadLeft=r/2+1),this.dCtx.xPadRight=r/2+1):h(c,d)})}}class Vt{constructor(e){this.w=e.w,this.dCtx=e}getyAxisLabelsCoords(){const e=this.w,t=0,s=0,a=[];let i=10;const r=new ie(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});return e.config.yaxis.map((o,l)=>{const n={seriesIndex:l,dataPointIndex:-1,w:e},h=e.globals.yAxisScale[l];let c=0;if(!r.isYAxisHidden(l)&&o.labels.show&&o.labels.minWidth!==void 0&&(c=o.labels.minWidth),!r.isYAxisHidden(l)&&o.labels.show&&h.result.length){const d=e.formatters.yLabelFormatters[l],u=h.niceMin===Number.MIN_VALUE?0:h.niceMin;let g=h.result.reduce((y,w)=>{var C,A;return((C=String(d(y,n)))==null?void 0:C.length)>((A=String(d(w,n)))==null?void 0:A.length)?y:w},u);g=d(g,n);let p=g;if((typeof g>"u"||g.length===0)&&(g=h.niceMax),String(g).length===1&&(g=g+".0",p=g),e.globals.isBarHorizontal){i=0;const y=e.labelData.labels.slice();g=D.getLargestStringFromArr(y),g=d(g,{seriesIndex:l,dataPointIndex:-1,w:e}),p=this.dCtx.dimHelpers.getLargestStringFromMultiArr(g,y)}const b=new I(this.w),f="rotate(".concat(o.labels.rotate," 0 0)"),m=b.getTextRects(g,o.labels.style.fontSize,o.labels.style.fontFamily,f,!1);let v=m;g!==p&&(v=b.getTextRects(p,o.labels.style.fontSize,o.labels.style.fontFamily,f,!1)),a.push({width:(c>v.width||c>m.width?c:v.width>m.width?v.width:m.width)+i,height:v.height>m.height?v.height:m.height})}else a.push({width:t,height:s})}),a}getyAxisTitleCoords(){const e=this.w,t=[];return e.config.yaxis.map(s=>{if(s.show&&s.title.text!==void 0){const a=new I(this.w),i="rotate(".concat(s.title.rotate," 0 0)"),r=a.getTextRects(s.title.text,s.title.style.fontSize,s.title.style.fontFamily,i,!1);t.push({width:r.width,height:r.height})}else t.push({width:0,height:0})}),t}getTotalYAxisWidth(){const e=this.w;let t=0,s=0,a=0;const i=e.globals.yAxisScale.length>1?10:0,r=new ie(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale}),o=function(n){return e.globals.ignoreYAxisIndexes.indexOf(n)>-1},l=(n,h)=>{const c=e.config.yaxis[h].floating;let d=0;n.width>0&&!c?(d=n.width+i,o(h)&&(d=d-n.width-i)):d=c||r.isYAxisHidden(h)?0:5,e.config.yaxis[h].opposite?a=a+d:s=s+d,t=t+d};return e.layout.yLabelsCoords.map((n,h)=>{l(n,h)}),e.layout.yTitleCoords.map((n,h)=>{l(n,h)}),e.globals.isBarHorizontal&&!e.config.yaxis[0].floating&&(t=e.layout.yLabelsCoords[0].width+e.layout.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=s,this.dCtx.yAxisWidthRight=a,t}}class Ut{constructor(e){this.w=e.w,this.dCtx=e}gridPadForColumnsInNumericAxis(e){const{w:t}=this,{config:s,globals:a}=t;if(a.noData||a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===s.series.length)return 0;const i=c=>["bar","rangeBar","candlestick","boxPlot"].includes(c),r=s.chart.type;let o=0,l=i(r)?s.series.length:1;a.comboBarCount>
300&&(l=a.comboBarCount),a.collapsedSeries.forEach(c=>{i(c.type)&&(l-=1)}),s.chart.stacked&&(l=1);const n=i(r)||a.comboBarCount>0;let h=Math.abs(a.initialMaxX-a.initialMinX);if(n&&t.axisFlags.isXNumeric&&!a.isBarHorizontal&&l>0&&h!==0){h<=3&&(h=a.dataPoints);const c=h/e;let d=a.minXDiff&&a.minXDiff/c>0?a.minXDiff/c:0;d>e/2&&(d/=2),o=d*parseInt(s.plotOptions.bar.columnWidth,10)/100,o<1&&(o=1),a.barPadForNumericAxis=o}return o}gridPadFortitleSubtitle(){const{w:e}=this,{globals:t}=e;let s=this.dCtx.isSparkline||!t.axisCharts?0:10;["title","subtitle"].forEach(r=>{e.config[r].text!==void 0?s+=e.config[r].margin:s+=this.dCtx.isSparkline||!t.axisCharts?0:5}),e.config.legend.show&&e.config.legend.position==="bottom"&&!e.config.legend.floating&&!t.axisCharts&&(s+=10);const a=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),i=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");e.layout.gridHeight-=a.height+i.height+s,e.layout.translateY+=a.height+i.height+s}setGridXPosForDualYAxis(e,t){const{w:s}=this,a=new ie(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});s.config.yaxis.forEach((i,r)=>{s.globals.ignoreYAxisIndexes.indexOf(r)===-1&&!i.floating&&!a.isYAxisHidden(r)&&(i.opposite&&(s.layout.translateX-=t[r].width+e[r].width+parseInt(i.labels.style.fontSize,10)/1.2+12),s.layout.translateX<2&&(s.layout.translateX=2))})}}class Le{constructor(e,t){this.w=e,this.ctx=t,this.theme=t.theme,this.timeScale=t.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 $t(this),this.dimYAxis=new Vt(this),this.dimXAxis=new jt(this),this.dimGrid=new Ut(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}plotCoords(){const e=this.w,t=e.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};const s=Array.isArray(e.config.stroke.width)?Math.max(...e.config.stroke.width):e.config.stroke.width;this.isSparkline&&((e.config.markers.discrete.length>0||e.config.markers.size>0)&&Object.entries(this.gridPad).forEach(([i,r])=>{this.gridPad[i]=Math.max(r,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)),t.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),e.layout.gridHeight=e.layout.gridHeight-this.gridPad.top-this.gridPad.bottom,e.layout.gridWidth=e.layout.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;const a=this.dimGrid.gridPadForColumnsInNumericAxis(e.layout.gridWidth);return e.layout.gridWidth=e.layout.gridWidth-a*2,e.layout.translateX=e.layout.translateX+this.gridPad.left+this.xPadLeft+(a>0?a:0),e.layout.translateY=e.layout.translateY+this.gridPad.top,{layout:{gridHeight:e.layout.gridHeight,gridWidth:e.layout.gridWidth,translateX:e.layout.translateX,translateY:e.layout.translateY,translateXAxisX:e.layout.translateXAxisX,translateXAxisY:e.layout.translateXAxisY,rotateXLabels:e.layout.rotateXLabels,xAxisHeight:e.layout.xAxisHeight,xAxisLabelsHeight:e.layout.xAxisLabelsHeight,xAxisGroupLabelsHeight:e.layout.xAxisGroupLabelsHeight,xAxisLabelsWidth:e.layout.xAxisLabelsWidth,yLabelsCoords:e.layout.yLabelsCoords,yTitleCoords:e.layout.yTitleCoords}}}setDimensionsForAxisCharts(){const e=this.w,t=e.globals,s=this.dimYAxis.getyAxisLabelsCoords(),a=this.dimYAxis.getyAxisTitleCoords();t.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),e.layout.yLabelsCoords=[],e.layout.yTitleCoords=[],e.config.yaxis.map((d,u)=>{e.layout.yLabelsCoords.push({width:s[u].width,index:u}),e.layout.yTitleCoords.push({width:a[u].width,index:u})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();const i=this.dimXAxis.getxAxisLabelsCoords(),r=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(i,o,r),e.layout.translateXAxisY=e.layout.rotateXLabels?this.xAxisHeight/8:-4,e.layout.translateXAxisX=e.layout.rotateXLabels&&e.axisFlags.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(e.layout.rotateXLabels=!1,e.layout.translateXAxisY=-1*(parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5)),e.layout.translateXAxisY=e.layout.translateXAxisY+e.config.xaxis.labels.offsetY,e.layout.translateXAxisX=e.layout.translateXAxisX+e.config.xaxis.labels.offsetX;let l=this.yAxisWidth,n=this.xAxisHeight;e.layout.xAxisLabelsHeight=this.xAxisHeight-o.height,e.layout.xAxisGroupLabelsHeight=e.layout.xAxisLabelsHeight-i.height,e.layout.xAxisLabelsWidth=this.xAxisWidth,e.layout.xAxisHeight=this.xAxisHeight;let h=10;(e.config.chart.type==="radar"||this.isSparkline)&&(l=0,n=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||e.config.chart.type==="treemap")&&(l=0,n=0,h=0),!this.isSparkline&&e.config.chart.type!=="treemap"&&this.dimXAxis.additionalPaddingXLabels(i);const c=()=>{e.layout.translateX=l+this.datalabelsCoords.width,e.layout.gridHeight=t.svgHeight-this.lgRect.height-n-(!this.isSparkline&&e.config.chart.type!=="treemap"?e.layout.rotateXLabels?10:15:0),e.layout.gridWidth=t.svgWidth-l-this.datalabelsCoords.width*2};switch(e.config.xaxis.position==="top"&&(h=e.layout.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":e.layout.translateY=h,c();break;case"top":e.layout.translateY=this.lgRect.height+h,c();break;case"left":e.layout.translateY=h,e.layout.translateX=this.lgRect.width+l+this.datalabelsCoords.width,e.layout.gridHeight=t.svgHeight-n-12,e.layout.gridWidth=t.svgWidth-this.lgRect.width-l-this.datalabelsCoords.width*2;break;case"right":e.layout.translateY=h,e.layout.translateX=l+this.datalabelsCoords.width,e.layout.gridHeight=t.svgHeight-n-12,e.layout.gridWidth=t.svgWidth-this.lgRect.width-l-this.datalabelsCoords.width*2-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(a,s),new We(this.w,{theme:this.theme,timeScale:this.timeScale}).setYAxisXPosition(s,a)}setDimensionsForNonAxisCharts(){const e=this.w,t=e.globals,s=e.config;let a=0;e.config.legend.show&&!e.config.legend.floating&&(a=20);const i=s.chart.type==="pie"||s.chart.type==="polarArea"||s.chart.type==="donut"?"pie":"radialBar",r=s.plotOptions[i].offsetY,o=s.plotOptions[i].offsetX;if(!s.legend.show||s.legend.floating){e.layout.gridHeight=t.svgHeight;const l=e.dom.elWrap.getBoundingClientRect().width;e.layout.gridWidth=Math.min(l,e.layout.gridHeight),e.layout.translateY=r,e.layout.translateX=o+(t.svgWidth-e.layout.gridWidth)/2;return}switch(s.legend.position){case"bottom":e.layout.gridHeight=t.svgHeight-this.lgRect.height,e.layout.gridWidth=t.svgWidth,e.layout.translateY=r-10,e.layout.translateX=o+(t.svgWidth-e.layout.gridWidth)/2;break;case"top":e.layout.gridHeight=t.svgHeight-this.lgRect.height,e.layout.gridWidth=t.svgWidth,e.layout.translateY=this.lgRect.height+r+10,e.layout.translateX=o+(t.svgWidth-e.layout.gridWidth)/2;break;case"left":e.layout.gridWidth=t.svgWidth-this.lgRect.width-a,e.layout.gridHeight=s.chart.height!=="auto"?t.svgHeight:e.layout.gridWidth,e.layout.translateY=r,e.layout.translateX=o+this.lgRect.width+a;break;case"right":e.layout.gridWidth=t.svgWidth-this.lgRect.width-a-5,e.layout.gridHeight=s.chart.height!=="auto"?t.svgHeight:e.layout.gridWidth,e.layout.translateY=r,e.layout.translateX=o+10;break;default:throw new Error("Legend position not supported")}}conditionalChecksForAxisCoords(e,t,s){const a=this.w,i=a.labelData.hasXaxisGroups?2:1,r=s.height+e.height+t.height,o=a.axisFlags.isMultiLineX?1.2:ht,l=a.layout.rotateXLabels?22:10,n=a.layout.rotateXLabels&&a.config.legend.position==="bottom"?10:0;this.xAxisHeight=r*o+i*l+n,this.xAxisWidth=e.width,this.xAxisHeight-t.height>a.config.xaxis.labels.maxHeight&&(this.xAxisHeight=a.config.xaxis.labels.maxHeight),a.config.xaxis.labels.minHeight&&this.xAxisHeight<a.config.xaxis.labels.minHeight&&(this.xAxisHeight=a.config.xaxis.labels.minHeight),a.config.xaxis.floating&&(this.xAxisHeight=0);let h=0,c=0;a.config.yaxis.forEach(d=>{h+=d.labels.minWidth,c+=d.labels.maxWidth}),this.yAxisWidth<h&&(this.yAxisWidth=h),this.yAxisWidth>c&&(this.yAxisWidth=c)}}const xt=24*60,He=xt*60,qt=10/He;class Zt{constructor(e,t){this.w=e,this.ctx=t,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}calculateTimeScaleTicks(e,t){const s=this.w;if(s.globals.allSeriesCollapsed)return s.labelData.labels=[],s.labelData.timescaleLabels=[],[];const a=new U(this.w),i=(t-e)/(1e3*He);this.determineInterval(i),s.interact.disableZoomIn=!1,s.interact.disableZoomOut=!1,i<qt?s.interact.disableZoomIn=!0:i>5e4&&(s.interact.disableZoomOut=!0);const r=a.getTimeUnitsfromTimestamp(e,t,this.utc),o=s.layout.gridWidth/i,l=o/24,n=l/60,h=n/60,c=Math.floor(i*24),d=Math.floor(i*xt),u=Math.floor(i*He),g=Math.floor(i),p=Math.floor(i/30),b=Math.floor(i/365),f={minMillisecond:r.minMillisecond,minSecond:r.minSecond,minMinute:r.minMinute,minHour:r.minHour,minDate:r.minDate,minMonth:r.minMonth,minYear:r.minYear},m=f.minMillisecond,v=f.minSecond,y=f.minMinute,w=f.minHour,C=f.minDate,A=f.minDate,L=f.minMonth,S=f.minYear,k={firstVal:f,currentMillisecond:m,currentSecond:v,currentMinute:y,currentHour:w,currentMonthDate:C,currentDate:A,currentMonth:L,currentYear:S,daysWidthOnXAxis:o,hoursWidthOnXAxis:l,minutesWidthOnXAxis:n,secondsWidthOnXAxis:h,numberOfSeconds:u,numberOfMinutes:d,numberOfHours:c,numberOfDays:g,numberOfMonths:p,numberOfYears:b};switch(this.tickInterval){case"years":{this.generateYearScale(k);break}case"months":case"half_year":{this.generateMonthScale(k);break}case"months_days":case"months_fortnight":case"days":case"week_days":{this.generateDayScale(k);break}case"hours":{this.generateHourScale(k);break}case"minutes_fives":case"minutes":this.generateMinuteScale(k);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(k);break}const M=this.timeScaleArray.map(P=>{const T={position:P.position,unit:P.unit,year:P.year,day:P.day?P.day:1,hour:P.hour?P.hour:0,month:P.month+1};return P.unit==="month"?O(R({},T),{day:1,value:P.value+1}):P.unit==="day"||P.unit==="hour"?O(R({},T),{value:P.value}):P.unit==="minute"?O(R({},T),{value:P.value,minute:P.value}):P.unit==="second"?O(R({},T),{value:P.value,minute:P.minute,second:P.second}):P});return M.filter(P=>{let T=1,X=Math.ceil(s.layout.gridWidth/120);const E=P.value;s.config.xaxis.tickAmount!==void 0&&(X=s.config.xaxis.tickAmount),M.length>X&&(T=Math.floor(M.length/X));let F=!1,Y=!1;switch(this.tickInterval){case"years":P.unit==="year"&&(F=!0);break;case"half_year":T=7,P.unit==="year"&&(F=!0);break;case"months":T=1,P.unit==="year"&&(F=!0);break;case"months_fortnight":T=15,(P.unit==="year"||P.unit==="month")&&(F=!0),E===30&&(Y=!0);break;case"months_days":T=10,P.unit==="month"&&(F=!0),E===30&&(Y=!0);break;case"week_days":T=8,P.unit==="month"&&(F=!0);break;case"days":T=1,P.unit==="month"&&(F=!0);break;case"hours":P.unit==="day"&&(F=!0);break;case"minutes_fives":E%5!==0&&(Y=!0);break;case"seconds_tens":E%10!==0&&(Y=!0);break;case"seconds_fives":E%5!==0&&(Y=!0);break}if(this.tickInterval==="hours"||this.tickInterval==="minutes_fives"||this.tickInterval==="seconds_tens"||this.tickInterval==="seconds_fives"){if(!Y)return!0}else if((E%T===0||F)&&!Y)return!0})}recalcDimensionsBasedOnFormat(e){const t=this.w,s=this.formatDates(e),a=this.removeOverlappingTS(s);t.labelData.timescaleLabels=a.slice();const i=new Le(this.w,this.ctx).plotCoords();this.ctx._writeLayoutCoords(i.layout)}determineInterval(e){const t=e/365,s=e*24,a=s*60,i=a*60;switch(!0){case t>5:this.tickInterval="years";break;case e>800:this.tickInterval="half_year";break;case e>180:this.tickInterval="months";break;case e>90:this.tickInterval="months_fortnight";break;case e>60:this.tickInterval="months_days";break;case e>30:this.tickInterval="week_days";break;case e>2:this.tickInterval="days";break;case s>2.4:this.tickInterval="hours";break;case a>15:this.tickInterval="minutes_fives";break;case a>5:this.tickInterval="minutes";break;case a>1:this.tickInterval="seconds_tens";break;case i>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds";break}}generateYearScale({firstVal:e,currentMonth:t,currentYear:s,daysWidthOnXAxis:a,numberOfYears:i}){let r=e.minYear,o=0;const l=new U(this.w),n="year";if(e.minDate>1||e.minMonth>0){const d=l.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);o=(l.determineDaysOfYear(e.minYear)-d+1)*a,r=e.minYear+1,this.timeScaleArray.push({position:o,value:r,unit:n,year:r,month:D.monthMod(t+1)})}else e.minDate===1&&e.minMonth===0&&this.timeScaleArray.push({position:o,value:r,unit:n,year:s,month:D.monthMod(t+1)});let h=r,c=o;for(let d=0;d<i;d++)h++,c=l.determineDaysOfYear(h-1)*a+c,this.timeScaleArray.push({position:c,value:h,unit:n,year:h,month:1})}generateMonthScale({firstVal:e,currentMonthDate:t,currentMonth:s,currentYear:a,daysWidthOnXAxis:i,numberOfMonths:r}){let o=s,l=0;const n=new U(this.w);let h="month",c=0;if(e.minDate>1){l=(n.determineDaysOfMonths(s+1,e.minYear)-t+1)*i,o=D.monthMod(s+1);let g=a+c,p=D.monthMod(o),b=o;o===0&&(h="year",b=g,p=1,c+=1,g=g+c),this.timeScaleArray.push({position:l,value:b,unit:h,year:g,month:p})}else this.timeScaleArray.push({position:l,value:o,unit:h,year:a,month:D.monthMod(s)});let d=o+1,u=l;for(let g=0,p=1;g<r;g++,p++){d=D.monthMod(d),d===0?(h="year",c+=1):h="month";const b=this._getYear(a,d,c);u=n.determineDaysOfMonths(d,b)*i+u;const f=d===0?b:d;this.timeScaleArray.push({position:u,value:f,unit:h,year:b,month:d===0?1:d}),d++}}generateDayScale({firstVal:e,currentMonth:t,currentYear:s,hoursWidthOnXAxis:a,numberOfDays:i}
30){const r=new U(this.w);let o="day",l=e.minDate+1,n=l;const h=(f,m,v)=>{const y=r.determineDaysOfMonths(m+1,v);return f>y&&(m=m+1,n=1,o="month",g=m),m},c=24-e.minHour,d=0;let u=c*a,g=l,p=h(n,t,s);e.minHour===0&&e.minDate===1?(u=0,g=D.monthMod(e.minMonth),o="month",n=e.minDate):e.minDate!==1&&e.minHour===0&&e.minMinute===0&&(u=0,l=e.minDate,n=l,g=l,p=h(n,t,s),g!==1&&(o="day")),this.timeScaleArray.push({position:u,value:g,unit:o,year:this._getYear(s,p,d),month:D.monthMod(p),day:n});let b=u;for(let f=0;f<i;f++){n+=1,o="day",p=h(n,p,this._getYear(s,p,d));const m=this._getYear(s,p,d);b=24*a+b;const v=n===1?D.monthMod(p):n;this.timeScaleArray.push({position:b,value:v,unit:o,year:m,month:D.monthMod(p),day:v})}}generateHourScale({firstVal:e,currentDate:t,currentMonth:s,currentYear:a,minutesWidthOnXAxis:i,numberOfHours:r}){const o=new U(this.w),l=0;let n="hour";const h=(v,y)=>{const w=o.determineDaysOfMonths(y+1,a);return v>w&&(b=1,y=y+1),{month:y,date:b}},c=(v,y)=>{const w=o.determineDaysOfMonths(y+1,a);return v>w&&(y=y+1),y},d=60-(e.minMinute+e.minSecond/60);let u=d*i,g=e.minHour+1,p=g;d===60&&(u=0,g=e.minHour,p=g);let b=t;p>=24&&(p=0,b+=1,n="day",g=b);let f=h(b,s).month;f=c(b,f),g>31&&(b=1,g=b),this.timeScaleArray.push({position:u,value:g,unit:n,day:b,hour:p,year:a,month:D.monthMod(f)}),p++;let m=u;for(let v=0;v<r;v++){n="hour",p>=24&&(p=0,b+=1,n="day",f=h(b,f).month,f=c(b,f));const y=this._getYear(a,f,l);m=60*i+m;const w=p===0?b:p;this.timeScaleArray.push({position:m,value:w,unit:n,hour:p,day:b,year:y,month:D.monthMod(f)}),p++}}generateMinuteScale({currentMillisecond:e,currentSecond:t,currentMinute:s,currentHour:a,currentDate:i,currentMonth:r,currentYear:o,minutesWidthOnXAxis:l,secondsWidthOnXAxis:n,numberOfMinutes:h}){const c="minute",d=(60-t-e/1e3)*n;let u=s+1;const g=i,p=r,b=o;let f=a,m=d;for(let v=0;v<h;v++)u>=60&&(u=0,f+=1,f===24&&(f=0)),this.timeScaleArray.push({position:m,value:u,unit:c,hour:f,minute:u,day:g,year:this._getYear(b,p,0),month:D.monthMod(p)}),m+=l,u++}generateSecondScale({currentMillisecond:e,currentSecond:t,currentMinute:s,currentHour:a,currentDate:i,currentMonth:r,currentYear:o,secondsWidthOnXAxis:l,numberOfSeconds:n}){const h="second",c=(1e3-e)/1e3*l;let d=t+1,u=s;const g=i,p=r,b=o;let f=a,m=c;for(let v=0;v<n;v++)d>=60&&(u++,d=0,u>=60&&(f++,u=0,f===24&&(f=0))),this.timeScaleArray.push({position:m,value:d,unit:h,hour:f,minute:u,second:d,day:g,year:this._getYear(b,p,0),month:D.monthMod(p)}),m+=l,d++}createRawDateString(e,t){let s=e.year;return e.month===0&&(e.month=1),s+="-"+("0"+e.month.toString()).slice(-2),e.unit==="day"?s+=e.unit==="day"?"-"+("0"+t).slice(-2):"-01":s+="-"+("0"+(e.day?e.day:"1")).slice(-2),e.unit==="hour"?s+=e.unit==="hour"?"T"+("0"+t).slice(-2):"T00":s+="T"+("0"+(e.hour?e.hour:"0")).slice(-2),e.unit==="minute"?s+=":"+("0"+t).slice(-2):s+=":"+(e.minute?("0"+e.minute).slice(-2):"00"),e.unit==="second"?s+=":"+("0"+t).slice(-2):s+=":00",this.utc&&(s+=".000Z"),s}formatDates(e){const t=this.w;return e.map(s=>{let a=s.value.toString();const i=new U(this.w),r=this.createRawDateString(s,a);let o=i.getDate(i.parseDate(r));if(this.utc||(o=i.getDate(i.parseDateWithTimezone(r))),t.config.xaxis.labels.format===void 0){let l="dd MMM";const n=t.config.xaxis.labels.datetimeFormatter;s.unit==="year"&&(l=n.year),s.unit==="month"&&(l=n.month),s.unit==="day"&&(l=n.day),s.unit==="hour"&&(l=n.hour),s.unit==="minute"&&(l=n.minute),s.unit==="second"&&(l=n.second),a=i.formatDate(o,l)}else a=i.formatDate(o,t.config.xaxis.labels.format);return{dateString:r,position:s.position,value:a,unit:s.unit,year:s.year,month:s.month}})}removeOverlappingTS(e){const t=new I(this.w);let s=!1,a;e.length>0&&e[0].value&&e.every(o=>o.value.length===e[0].value.length)&&(s=!0,a=t.getTextRects(e[0].value).width);let i=0,r=e.map((o,l)=>{if(l>0&&this.w.config.xaxis.labels.hideOverlappingLabels){const n=s?a:t.getTextRects(e[i].value).width,h=e[i].position;return o.position>h+n+10?(i=l,o):null}else return o});return r=r.filter(o=>o!==null),r}_getYear(e,t,s){return e+Math.floor(t/12)+s}}const ft={};function Kt(x){Object.assign(ft,x)}function J(x){const e=ft[x];if(!e)throw new Error(`ApexCharts: chart type "${x}" is not registered. Import it via ApexCharts.use() or use the full apexcharts bundle. 31If you already imported the entry (e.g. 'apexcharts/${x}'), your bundler may have created two separate copies of the ApexCharts module so the registration was lost. Add all apexcharts sub-entries to your bundler's deduplication config â for Vite add them to optimizeDeps.include in vite.config.`);return e}class Jt{constructor(e,t,s){this.w=t,this.ctx=s,this.el=e}setupElements(){const{globals:e,config:t}=this.w,s=t.chart.type,a=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"],i=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"];e.axisCharts=a.includes(s),e.xyCharts=i.includes(s),e.isBarHorizontal=["bar","rangeBar","boxPlot"].includes(s)&&t.plotOptions.bar.horizontal,e.chartClass=`.apexcharts${e.chartID}`,this.w.dom.baseEl=this.el,this.w.dom.elWrap=H.createElementNS("http://www.w3.org/1999/xhtml","div"),I.setAttrs(this.w.dom.elWrap,{id:e.chartClass.substring(1),class:`apexcharts-canvas ${e.chartClass.substring(1)}`}),this.el.appendChild(this.w.dom.elWrap);const r=z.isBrowser()?window.SVG:global.SVG;if(this.w.dom.Paper=r().addTo(this.w.dom.elWrap),this.w.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:`translate(${t.chart.offsetX}, ${t.chart.offsetY})`}),this.w.dom.Paper.node.style.background=t.theme.mode==="dark"&&!t.chart.background?"#343A3F":t.theme.mode==="light"&&!t.chart.background?"#fff":t.chart.background,this.setSVGDimensions(),this.w.dom.elLegendForeign=H.createElementNS(_,"foreignObject"),I.setAttrs(this.w.dom.elLegendForeign,{x:0,y:0,width:e.svgWidth,height:e.svgHeight}),this.w.dom.elLegendWrap=H.createElementNS("http://www.w3.org/1999/xhtml","div"),this.w.dom.elLegendWrap.classList.add("apexcharts-legend"),this.w.dom.elWrap.appendChild(this.w.dom.elLegendWrap),this.w.dom.Paper.node.appendChild(this.w.dom.elLegendForeign),t.chart.accessibility.enabled){const o=this.getAccessibleChartLabel(),l=t.chart.accessibility.keyboard.enabled&&t.chart.accessibility.keyboard.navigation.enabled?"application":"img";this.w.dom.Paper.attr({role:l,"aria-label":o});const n=H.createElementNS(_,"title");if(n.textContent=t.title.text||"Chart",this.w.dom.Paper.node.insertBefore(n,this.w.dom.elLegendForeign.nextSibling),t.chart.accessibility.description){const h=H.createElementNS(_,"desc");h.textContent=t.chart.accessibility.description,this.w.dom.Paper.node.insertBefore(h,n.nextSibling)}}this.w.dom.elGraphical=this.w.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}
31),this.w.dom.elDefs=this.w.dom.Paper.defs(),this.w.dom.Paper.add(this.w.dom.elGraphical),this.w.dom.elGraphical.add(this.w.dom.elDefs)}plotChartType(e,t){const{w:s,ctx:a}=this,{config:i,globals:r}=s,o={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},bar:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},l=i.chart.type||"line";let n=null,h=0;this.w.seriesData.series.forEach((b,f)=>{var m,v;const y=((m=e[f])==null?void 0:m.type)==="column"?"bar":((v=e[f])==null?void 0:v.type)||(l==="column"?"bar":l);o[y]?(y==="rangeArea"?(o[y].series.push(this.w.rangeData.seriesRangeStart[f]),o[y].seriesRangeEnd.push(this.w.rangeData.seriesRangeEnd[f])):o[y].series.push(b),o[y].i.push(f),y==="bar"&&(s.globals.columnSeries=o.bar)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(y)?n=y:console.warn(`You have specified an unrecognized series type (${y}).`),l!==y&&y!=="scatter"&&h++}),h>0&&(n&&console.warn(`Chart or series type ${n} cannot appear with other chart or series types.`),o.bar.series.length>0&&i.plotOptions.bar.horizontal&&(h-=o.bar.series.length,o.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`"))),r.comboCharts||(r.comboCharts=h>0);const c=o.line.series.length>0||o.area.series.length>0||o.scatter.series.length>0||o.bubble.series.length>0||o.rangeArea.series.length>0||!r.comboCharts&&["line","area","scatter","bubble","rangeArea"].includes(i.chart.type)?new(J("line"))(a.w,a,t):null,d=o.candlestick.series.length>0||o.boxPlot.series.length>0||!r.comboCharts&&["candlestick","boxPlot"].includes(i.chart.type)?new(J("candlestick"))(a.w,a,t):null,u=!r.comboCharts&&["pie","donut","polarArea"].includes(i.chart.type);a.pie=u?new(J("pie"))(a.w,a):null;const g=o.rangeBar.series.length>0||!r.comboCharts&&i.chart.type==="rangeBar";a.rangeBar=g?new(J("rangeBar"))(a.w,a,t):null;let p=[];if(r.comboCharts){const b=new $(this.w);if(o.area.series.length>0&&p.push(...b.drawSeriesByGroup(o.area,r.areaGroups,"area",c)),o.bar.series.length>0)if(i.chart.stacked){const f=new(J("barStacked"))(a.w,a,t);p.push(f.draw(o.bar.series,o.bar.i))}else a.bar=new(J("bar"))(a.w,a,t),p.push(a.bar.draw(o.bar.series,o.bar.i));if(o.rangeArea.series.length>0&&p.push(c.draw(o.rangeArea.series,"rangeArea",o.rangeArea.i,o.rangeArea.seriesRangeEnd)),o.line.series.length>0&&p.push(...b.drawSeriesByGroup(o.line,r.lineGroups,"line",c)),o.candlestick.series.length>0&&p.push(d.draw(o.candlestick.series,"candlestick",o.candlestick.i)),o.boxPlot.series.length>0&&p.push(d.draw(o.boxPlot.series,"boxPlot",o.boxPlot.i)),o.rangeBar.series.length>0&&p.push(a.rangeBar.draw(o.rangeBar.series,o.rangeBar.i)),o.scatter.series.length>0){const f=new(J("line"))(a.w,a,t,!0);p.push(f.draw(o.scatter.series,"scatter",o.scatter.i))}if(o.bubble.series.length>0){const f=new(J("line"))(a.w,a,t,!0);p.push(f.draw(o.bubble.series,"bubble",o.bubble.i))}}else{const b=i.chart.type;switch(b){case"line":p=c.draw(this.w.seriesData.series,"line");break;case"area":p=c.draw(this.w.seriesData.series,"area");break;case"bar":i.chart.stacked?p=new(J("barStacked"))(a.w,a,t).draw(this.w.seriesData.series):(a.bar=new(J("bar"))(a.w,a,t),p=a.bar.draw(this.w.seriesData.series));break;case"candlestick":p=d.draw(this.w.seriesData.series,"candlestick");break;case"boxPlot":p=d.draw(this.w.seriesData.series,b);break;case"rangeBar":p=a.rangeBar.draw(this.w.seriesData.series);break;case"rangeArea":p=c.draw(this.w.rangeData.seriesRangeStart,"rangeArea",void 0,this.w.rangeData.seriesRangeEnd);break;case"heatmap":{p=new(J("heatmap"))(a.w,a,t).draw(this.w.seriesData.series);break}case"treemap":{p=new(J("treemap"))(a.w,a).draw(this.w.seriesData.series);break}case"pie":case"donut":case"polarArea":p=a.pie.draw(this.w.seriesData.series);break;case"radialBar":{p=new(J("radialBar"))(a.w,a).draw(this.w.seriesData.series);break}case"radar":{p=new(J("radar"))(a.w,a).draw(this.w.seriesData.series);break}default:p=c.draw(this.w.seriesData.series)}}return p}setSVGDimensions(){const{globals:e,config:t}=this.w;t.chart.width=t.chart.width||"100%",t.chart.height=t.chart.height||"auto",e.svgWidth=t.chart.width,e.svgHeight=t.chart.height;let s=D.getDimensions(this.el);const a=t.chart.width.toString().split(/[0-9]+/g).pop();a==="%"?D.isNumber(s[0])&&(s[0].width===0&&(s=D.getDimensions(this.el.parentNode)),e.svgWidth=s[0]*parseInt(t.chart.width,10)/100):(a==="px"||a==="")&&(e.svgWidth=parseInt(t.chart.width,10));const i=String(t.chart.height).toString().split(/[0-9]+/g).pop();if(e.svgHeight!=="auto"&&e.svgHeight!=="")if(i==="%"){const r=D.getDimensions(this.el.parentNode);e.svgHeight=r[1]*parseInt(t.chart.height,10)/100}else e.svgHeight=parseInt(t.chart.height,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;if(e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),I.setAttrs(this.w.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}
31),i!=="%"&&z.isBrowser()){const r=t.chart.sparkline.enabled?0:e.axisCharts?t.chart.parentHeightOffset:0;this.w.dom.Paper.node.parentNode.parentNode.style.minHeight=`${e.svgHeight+r}px`}this.w.dom.elWrap.style.width=`${e.svgWidth}px`,this.w.dom.elWrap.style.height=`${e.svgHeight}px`}shiftGraphPosition(){const{globals:e}=this.w,{translateY:t,translateX:s}=e;I.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${s}, ${t})`})}resizeNonAxisCharts(){var e,t;const{w:s}=this;let a=0,i=s.config.chart.sparkline.enabled?1:15;i+=s.config.grid.padding.bottom,["top","bottom"].includes(s.config.legend.position)&&s.config.legend.show&&!s.config.legend.floating&&(a=((t=(e=this.ctx.legend)==null?void 0:e.legendHelpers.getLegendDimensions().clwh)!=null?t:0)+7);const r=s.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie");let o=s.globals.radialSize*2.05;if(r&&!s.config.chart.sparkline.enabled&&s.config.plotOptions.radialBar.startAngle!==0){const n=D.getBoundingClientRect(r);o=n.bottom;const h=n.bottom-n.top;o=Math.max(s.globals.radialSize*2.05,h)}const l=Math.ceil(o+this.w.layout.translateY+a+i);this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",l),!(s.config.chart.height&&String(s.config.chart.height).includes("%"))&&(this.w.dom.elWrap.style.height=`${l}px`,I.setAttrs(this.w.dom.Paper.node,{height:l}),z.isBrowser()&&(this.w.dom.Paper.node.parentNode.parentNode.style.minHeight=`${l}px`))}coreCalculations(){new Re(this.w).init()}resetGlobals(){const e=()=>this.w.config.series.map(()=>[]),t=new dt,{globals:s}=this.w,a={dataWasParsed:this.w.axisFlags.dataWasParsed,originalSeries:s.originalSeries};t.initGlobalVars(s),s.seriesXvalues=e(),s.seriesYvalues=e(),a.dataWasParsed&&(this.w.axisFlags.dataWasParsed=a.dataWasParsed,s.originalSeries=a.originalSeries)}isMultipleY(){return Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1?(this.w.globals.isMultipleYAxis=!0,!0):!1}xySettings(){const{w:e}=this;let t=null;if(e.globals.axisCharts){if(e.config.xaxis.crosshairs.position==="back"&&new Ye(this.w).drawXCrosshairs(),e.config.yaxis[0].crosshairs.position==="back"&&new Ye(this.w).drawYCrosshairs(),e.config.xaxis.type==="datetime"&&e.config.xaxis.labels.formatter===void 0){this.ctx.timeScale=new Zt(this.w,this.ctx);let s=[];isFinite(e.globals.minX)&&isFinite(e.globals.maxX)&&!e.globals.isBarHorizontal?s=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minX,e.globals.maxX):e.globals.isBarHorizontal&&(s=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minY,e.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(s)}t=new $(this.w).getCalculatedRatios()}return t}updateSourceChart(e){this.ctx.w.interact.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:e.w.globals.minX,max:e.w.globals.maxX}}}},!1,!1)}setupBrushHandler(){const{ctx:e,w:t}=this;if(t.config.chart.brush.enabled&&typeof t.config.chart.events.selection!="function"){const s=Array.isArray(t.config.chart.brush.targets)?t.config.chart.brush.targets:[t.config.chart.brush.target];s.forEach(a=>{const i=e.constructor.getChartByID(a);i.w.globals.brushSource=this.ctx,typeof i.w.config.chart.events.zoomed!="function"&&(i.w.config.chart.events.zoomed=()=>this.updateSourceChart(i)),typeof i.w.config.chart.events.scrolled!="function"&&(i.w.config.chart.events.scrolled=()=>this.updateSourceChart(i))}),t.config.chart.events.selection=(a,i)=>{s.forEach(r=>{e.constructor.getChartByID(r).ctx.updateHelpers._updateOptions({xaxis:{min:i.xaxis.min,max:i.xaxis.max}},!1,!1,!1,!1)})}}}getAccessibleChartLabel(){const e=this.w,t=e.config;let s="";if(t.chart.accessibility&&t.chart.accessibility.description)s=t.chart.accessibility.description;else if(t.title.text){const a=t.chart.type;s=`${t.title.text}. ${a} chart`,t.subtitle.text&&(s+=`. ${t.subtitle.text}`)}else{const a=t.chart.type,i=e.seriesData.series.length||(t.series?t.series.length:0);s=`${a} chart with ${i} data series`}return s}}class _e{constructor(e,{resetGlobals:t=()=>{},isMultipleY:s=()=>{}}={}){this.w=e,this.resetGlobals=t,this.isMultipleY=s,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new $(this.w)}getFirstDataPoint(){const e=this.w.config.series,t=new j(this.w);return this.activeSeriesIndex=t.getActiveConfigSeriesIndex(),e[this.activeSeriesIndex]&&e[this.activeSeriesIndex].data&&e[this.activeSeriesIndex].data.length>0&&e[this.activeSeriesIndex].data[0]!==null&&typeof e[this.activeSeriesIndex].data[0]<"u"?e[this.activeSeriesIndex].data[0]:null}isMultiFormat(){return this.isFormatXY()||this.isFormat2DArray()}isFormatXY(){const e=this.getFirstDataPoint();return e&&typeof e.x<"u"}isFormat2DArray(){const e=this.getFirstDataPoint();return e&&Array.isArray(e)}handleFormat2DArray(e,t){const s=this.w.config,a=e[t].data,i=s.chart.type==="boxPlot"||s.series[t].type==="boxPlot";for(let r=0;r<a.length;r++){const o=a[r],l=o[0],n=o[1],h=o[2];if(typeof n<"u"&&(Array.isArray(n)&&n.length===4&&!i?this.twoDSeries.push(D.parseNumber(n[3])):o.length>=5?this.twoDSeries.push(D.parseNumber(o[4])):this.twoDSeries.push(D.parseNumber(n)),this.w.axisFlags.dataFormatXNumeric=!0),s.xaxis.type==="datetime"){let c=new Date(l);c=c.getTime(),this.twoDSeriesX.push(c)}else this.twoDSeriesX.push(l);typeof h<"u"&&(this.threeDSeries.push(h),this.w.axisFlags.isDataXYZ=!0)}}handleFormatXY(e,t){const s=this.w.config,a=this.w.globals,i=new U(this.w),r=e[t].data;let o=t;a.collapsedSeriesIndices.indexOf(t)>-1&&(o=this.activeSeriesIndex);const l=e[o].data;for(let n=0;n<r.length;n++){const h=r[n];if(typeof h.y<"u"){const c=Array.isArray(h.y)?D.parseNumber(h.y[h.y.length-1]):D.parseNumber(h.y);this.twoDSeries.push(c)}typeof this.seriesGoals[t]>"u"&&(this.seriesGoals[t]=[]),typeof h.goals<"u"&&Array.isArray(h.goals)?this.seriesGoals[t].push(h.goals):this.seriesGoals[t].push(null),typeof h.z<"u"&&(this.threeDSeries.push(h.z),this.w.axisFlags.isDataXYZ=!0)}for(let n=0;n<l.length;n++){const h=l[n].x,c=typeof h=="string",d=Array.isArray(h),u=!d&&!!i.isValidDate(h);if(c||u)if(c||s.xaxis.convertedCatToNumeric){const g=a.isBarHorizontal&&this.w.axisFlags.isRangeData;s.xaxis.type==="datetime"&&!g?this.twoDSeriesX.push(i.parseDate(h)):(this.fallbackToCategory=!0,this.twoDSeriesX.push(h),!isNaN(h)&&this.w.config.xaxis.type!=="category"&&typeof h!="string"&&(this.w.axisFlags.isXNumeric=!0))}else s.xaxis.type==="datetime"?this.twoDSeriesX.push(i.parseDate(h.toString())):(this.w.axisFlags.dataFormatXNumeric=!0,this.w.axisFlags.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(h)));else d?(this.fallbackToCategory=!0,this.twoDSeriesX.push(h)):(this.w.axisFlags.isXNumeric=!0,this.w.axisFlags.dataFormatXNumeric=!0,this.twoDSeriesX.push(h))}}handleRangeData(e,t){let s={};return this.isFormat2DArray()?s=this.handleRangeDataFormat("array",e,t):this.isFormatXY()&&(s=this.handleRangeDataFormat("xy",e,t)),this.w.rangeData.seriesRangeStart[t]=s.start===void 0?[]:s.start,this.w.rangeData.seriesRangeEnd[t]=s.end===void 0?[]:s.end,this.w.rangeData.seriesRange[t]=s.rangeUniques,this.w.rangeData.seriesRange.forEach(a=>{a&&a.forEach(i=>
31{const r=i.y,o=r.length;if(!(o<=1))for(let l=0;l<o;l++){const n=r[l],h=n.y1,c=n.y2;for(let d=l+1;d<o;d++){const u=r[d],g=u.y1,p=u.y2;h<=p&&g<=c&&(i.overlaps.indexOf(n.rangeName)<0&&i.overlaps.push(n.rangeName),i.overlaps.indexOf(u.rangeName)<0&&i.overlaps.push(u.rangeName))}}})}),s}handleCandleStickBoxData(e,t){let s={};return this.isFormat2DArray()?s=this.handleCandleStickBoxDataFormat("array",e,t):this.isFormatXY()&&(s=this.handleCandleStickBoxDataFormat("xy",e,t)),this.w.candleData.seriesCandleO[t]=s.o,this.w.candleData.seriesCandleH[t]=s.h,this.w.candleData.seriesCandleM[t]=s.m,this.w.candleData.seriesCandleL[t]=s.l,this.w.candleData.seriesCandleC[t]=s.c,s}handleRangeDataFormat(e,t,s){const a=[],i=[],r=new Map,o=[];if(t[s].data.forEach(l=>{if(!r.has(l.x)){const n={x:l.x,overlaps:[],y:[]};r.set(l.x,n),o.push(n)}}),e==="array")for(let l=0;l<t[s].data.length;l++)Array.isArray(t[s].data[l])?(a.push(t[s].data[l][1][0]),i.push(t[s].data[l][1][1])):(a.push(t[s].data[l]),i.push(t[s].data[l]));else if(e==="xy")for(let l=0;l<t[s].data.length;l++){const n=Array.isArray(t[s].data[l].y),h=D.randomId(),c=t[s].data[l].x,d={y1:n?t[s].data[l].y[0]:t[s].data[l].y,y2:n?t[s].data[l].y[1]:t[s].data[l].y,rangeName:h};t[s].data[l].rangeName=h;const u=r.get(c);u&&u.y.push(d),a.push(d.y1),i.push(d.y2)}return{start:a,end:i,rangeUniques:o}}
31handleCandleStickBoxDataFormat(e,t,s){const a=this.w,i=a.config.chart.type==="boxPlot"||a.config.series[s].type==="boxPlot",r=[],o=[],l=[],n=[],h=[],c=t[s].data;let d;e==="array"?i&&c[0].length===6||!i&&c[0].length===5?d=u=>u.slice(1):d=u=>Array.isArray(u[1])?u[1]:[]:d=u=>Array.isArray(u.y)?u.y:[];for(let u=0;u<c.length;u++){const g=d(c[u]);g&&g.length>=2&&(r.push(g[0]),o.push(g[1]),i?(l.push(g[2]),n.push(g[3]),h.push(g[4])):(n.push(g[2]),h.push(g[3])))}return{o:r,h:o,m:l,l:n,c:h}}parseDataAxisCharts(e){const t=this.w.config,s=this.w.globals,a=new U(this.w),i=t.labels.length>0?t.labels.slice():t.xaxis.categories.slice();this.w.axisFlags.isRangeBar=t.chart.type==="rangeBar"&&s.isBarHorizontal,this.w.labelData.hasXaxisGroups=t.xaxis.type==="category"&&t.xaxis.group.groups.length>0,this.w.labelData.hasXaxisGroups&&(this.w.labelData.groups=t.xaxis.group.groups),e.forEach((n,h)=>{n.name!==void 0?this.w.seriesData.seriesNames.push(n.name):this.w.seriesData.seriesNames.push("series-"+parseInt(h+1,10))}),this.coreUtils.setSeriesYAxisMappings();const r=[],o=[...new Set(t.series.map(n=>n.group))];t.series.forEach((n,h)=>{const c=o.indexOf(n.group);r[c]||(r[c]=[]),r[c].push(this.w.seriesData.seriesNames[h])}),this.w.labelData.seriesGroups=r;const l=()=>{for(let n=0;n<i.length;n++)if(typeof i[n]=="string")if(a.isValidDate(i[n]))this.twoDSeriesX.push(a.parseDate(i[n]));else throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");else this.twoDSeriesX.push(i[n])};for(let n=0;n<e.length;n++){if(this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],typeof e[n].data>"u"){console.error("It is a possibility that you may have not included 'data' property in series.");return}if((t.chart.type==="rangeBar"||t.chart.type==="rangeArea"||e[n].type==="rangeBar"||e[n].type==="rangeArea")&&(this.w.axisFlags.isRangeData=!0,this.handleRangeData(e,n)),this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(e,n):this.isFormatXY()&&this.handleFormatXY(e,n),(t.chart.type==="candlestick"||e[n].type==="candlestick"||t.chart.type==="boxPlot"||e[n].type==="boxPlot")&&this.handleCandleStickBoxData(e,n),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,n===this.activeSeriesIndex&&!this.fallbackToCategory&&(this.w.axisFlags.isXNumeric=!0);else{t.xaxis.type==="datetime"?(this.w.axisFlags.isXNumeric=!0,l(),this.w.seriesData.seriesX.push(this.twoDSeriesX)):t.xaxis.type==="numeric"&&(this.w.axisFlags.isXNumeric=!0,i.length>0&&(this.twoDSeriesX=i,this.w.seriesData.seriesX.push(this.twoDSeriesX))),this.w.labelData.labels.push(this.twoDSeriesX);const h=e[n].data.map(c=>D.parseNumber(c));this.w.seriesData.series.push(h)}this.w.seriesData.seriesZ.push(this.threeDSeries),e[n].color!==void 0?this.w.seriesData.seriesColors.push(e[n].color):this.w.seriesData.seriesColors.push(void 0)}return this.w}parseDataNonAxisCharts(e){const t=this.w.config,s=Array.isArray(e)&&e.every(r=>typeof r=="number")&&t.labels.length>0,a=Array.isArray(e)&&e.some(r=>r&&typeof r=="object"&&r.data||r&&typeof r=="object"&&r.parsing);if(s&&a&&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=e.slice(),this.w.seriesData.seriesNames=t.labels.slice();for(let r=0;r<this.w.seriesData.series.length;r++)this.w.seriesData.seriesNames[r]===void 0&&this.w.seriesData.seriesNames.push("series-"+(r+1));return this.w}if(Array.isArray(e)&&e.every(r=>typeof r=="number")){this.w.seriesData.series=e.slice(),this.w.seriesData.seriesNames=[];for(let r=0;r<this.w.seriesData.series.length;r++)this.w.seriesData.seriesNames.push(t.labels[r]||`series-${r+1}`);return this.w}const i=this.extractPieDataFromSeries(e);this.w.seriesData.series=i.values,this.w.seriesData.seriesNames=i.labels,t.chart.type==="radialBar"&&(this.w.seriesData.series=this.w.seriesData.series.map(r=>{const o=D.parseNumber(r);return o>100&&console.warn(`ApexCharts: RadialBar value ${o} > 100, consider using percentage values (0-100)`),o}));for(let r=0;r<this.w.seriesData.series.length;r++)this.w.seriesData.seriesNames[r]===void 0&&this.w.seriesData.seriesNames.push("series-"+(r+1));return this.w}resetParsingFlags(){const e=this.w;e.axisFlags.dataWasParsed=!1,e.globals.originalSeries=null,e.config.series&&e.config.series.forEac
31h(t=>{t.__apexParsed&&delete t.__apexParsed})}extractPieDataFromSeries(e){const t=[],s=[];if(!Array.isArray(e))return console.warn("ApexCharts: Expected array for series data"),{values:[],labels:[]};if(e.length===0)return console.warn("ApexCharts: Empty series array"),{values:[],labels:[]};const a=e[0];if(typeof a=="object"&&a!==null&&a.data)this.extractPieDataFromSeriesObjects(e,t,s);else return console.warn("ApexCharts: Unsupported series format for pie/donut/radialBar. Expected series objects with data property."),{values:[],labels:[]};return{values:t,labels:s}}extractPieDataFromSeriesObjects(e,t,s){e.forEach((a,i)=>{if(!a.data||!Array.isArray(a.data)){console.warn(`ApexCharts: Series ${i} has no valid data array`);return}a.data.forEach(r=>{typeof r=="object"&&r!==null?r.x!==void 0&&r.y!==void 0?(s.push(String(r.x)),t.push(D.parseNumber(r.y))):console.warn("ApexCharts: Invalid data point format for pie chart. Expected {x, y} format:",r):console.warn("ApexCharts: Expected object data point, got:",typeof r)})})}handleExternalLabelsData(e){const t=this.w.config;t.xaxis.categories.length>0?this.w.labelData.labels=t.xaxis.categories:t.labels.length>0?this.w.labelData.labels=t.labels.slice():this.fallbackToCategory?(this.w.labelData.labels=this.w.labelData.labels[0],this.w.rangeData.seriesRange.length&&(this.w.rangeData.seriesRange.map(s=>{s.forEach(a=>{this.w.labelData.labels.indexOf(a.x)<0&&a.x&&this.w.labelData.labels.push(a.x)})}),this.w.labelData.labels=Array.from(new Set(this.w.labelData.labels.map(JSON.stringify)),JSON.parse)),t.xaxis.convertedCatToNumeric&&(new me(t).convertCatToNumericXaxis(t,this.w.seriesData.seriesX[0]),this._generateExternalLabels(e))):this._generateExternalLabels(e)}_generateExternalLabels(e){const t=this.w.globals,s=this.w.config;let a=[];if(t.axisCharts){if(this.w.seriesData.series.length>0)if(this.isFormatXY()){const i=s.series.map(o=>o.data.filter((l,n,h)=>h.findIndex(c=>c.x===l.x)===n)),r=i.reduce((o,l,n,h)=>h[o].length>l.length?o:n,0);for(let o=0;o<i[r].length;o++)a.push(o+1)}else for(let i=0;i<this.w.seriesData.series[t.maxValsInArrayIndex].length;i++)a.push(i+1);this.w.seriesData.seriesX=[];for(let i=0;i<e.length;i++)this.w.seriesData.seriesX.push(a);this.w.globals.isBarHorizontal||(this.w.axisFlags.isXNumeric=!0)}if(a.length===0){a=t.axisCharts?[]:this.w.seriesData.series.map((i,r)=>r+1);for(let i=0;i<e.length;i++)this.w.seriesData.seriesX.push(a)}this.w.labelData.labels=a,s.xaxis.convertedCatToNumeric&&(this.w.labelData.categoryLabels=a.map(i=>s.xaxis.labels.formatter(i))),this.w.axisFlags.noLabelsProvided=!0}parseRawDataIfNeeded(e){const t=this.w.config,s=this.w.globals,a=t.parsing;if(this.w.axisFlags.dataWasParsed||!a&&!e.some(r=>r.parsing))return e;const i=e.map((r,o)=>{var l,n,h;if(!r.data||!Array.isArray(r.data)||r.data.length===0)return r;const c={x:((l=r.parsing)==null?void 0:l.x)||(a==null?void 0:a.x),y:((n=r.parsing)==null?void 0:n.y)||(a==null?void 0:a.y),z:((h=r.parsing)==null?void 0:h.z)||(a==null?void 0:a.z)};if(!c.x&&!c.y)return r;const d=r.data[0];if(typeof d=="object"&&d!==null&&(Object.prototype.hasOwnProperty.call(d,"x")||Object.prototype.hasOwnProperty.call(d,"y"))||Array.isArray(d))return r;if(!c.x||!c.y||Array.isArray(c.y)&&c.y.length===0)return console.warn(`ApexCharts: Series ${o} has parsing config but missing x or y field specification`),r;const u=r.data.map((g,p)=>{if(typeof g!="object"||g===null)return console.warn(`ApexCharts: Series ${o}, data point ${p} is not an object, skipping parsing`),g;const b=this.getNestedValue(g,c.x);let f,m;if(Array.isArray(c.y)){const y=c.y.map(w=>this.getNestedValue(g,w));this.w.config.chart.type==="bubble"&&y.length===2?f=y[0]:f=y}else f=this.getNestedValue(g,c.y);c.z&&(m=this.getNestedValue(g,c.z)),b===void 0&&console.warn(`ApexCharts: Series ${o}, data point ${p} missing field '${c.x}'`),f===void 0&&console.warn(`ApexCharts: Series ${o}, data point ${p} missing field '${c.y}'`);const v={x:b,y:f};if(this.w.config.chart.type==="bubble"&&Array.isArray(c.y)&&c.y.length===2){const y=this.getNestedValue(g,c.y[1]);y!==void 0&&(v.z=y)}return m!==void 0&&(v.z=m),v});return O(R({},r),{data:u,__apexParsed:!0})});return this.w.axisFlags.dataWasParsed=!0,s.originalSeries||(s.originalSeries=D.clone(e)),i}getNestedValue(e,t){if(!e||typeof e!="object"||!t)return;if(t.indexOf(".")===-1)return e[t];const s=t.split(".");let a=e;for(let i=0;i<s.length;i++){if(a==null||typeof a!="object")return;a=a[s[i]]}return a}parseData(e){const t=this.w,s=t.config,a=t.globals;if(e=this.parseRawDataIfNeeded(e),s.series=e,a.initialSeries=D.clone(e),this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.resetGlobals(),this.isMultipleY(),a.axisCharts?(this.parseDataAxisCharts(e),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(e),s.chart.stacked){const r=new j(this.w);this.w.seriesData.series=r.setNullSeriesToZeroValues(this.w.seriesData.series)}this.coreUtils.getSeriesTotals(),a.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||s.xaxis.type==="numeric"&&s.labels.length===0&&s.xaxis.categories.length===0)&&this.handleExternalLabelsData(e);const i=this.coreUtils.getCategoryLabels(this.w.labelData.labels);for(let r=0;r<i.length;r++)if(Array.isArray(i[r])){this.w.axisFlags.isMultiLineX=!0;break}return{seriesData:{series:this.w.seriesData.series,seriesNames:this.w.seriesData.seriesNames,seriesX:this.w.seriesData.seriesX,seriesZ:this.w.seriesData.seriesZ,seriesColors:this.w.seriesData.seriesColors,seriesGoals:this.w.seriesData.seriesGoals,initialSeries:a.initialSeries,originalSeries:a.originalSeries,stackedSeriesTotals:this.w.seriesData.stackedSeriesTotals,stackedSeriesTotalsByGroups:this.w.seriesData.stackedSeriesTotalsByGroups,noLabelsProvi
31ded:this.w.axisFlags.noLabelsProvided},rangeData:{seriesRangeStart:this.w.rangeData.seriesRangeStart,seriesRangeEnd:this.w.rangeData.seriesRangeEnd,seriesRange:this.w.rangeData.seriesRange},candleData:{seriesCandleO:this.w.candleData.seriesCandleO,seriesCandleH:this.w.candleData.seriesCandleH,seriesCandleM:this.w.candleData.seriesCandleM,seriesCandleL:this.w.candleData.seriesCandleL,seriesCandleC:this.w.candleData.seriesCandleC},labelData:{labels:this.w.labelData.labels,categoryLabels:this.w.labelData.categoryLabels},axisFlags:{isXNumeric:this.w.axisFlags.isXNumeric,dataFormatXNumeric:this.w.axisFlags.dataFormatXNumeric,isDataXYZ:this.w.axisFlags.isDataXYZ,isRangeData:this.w.axisFlags.isRangeData,isRangeBar:this.w.axisFlags.isRangeBar,isMultiLineX:this.w.axisFlags.isMultiLineX,dataWasParsed:this.w.axisFlags.dataWasParsed,hasXaxisGroups:this.w.labelData.hasXaxisGroups,groups:this.w.labelData.groups,seriesGroups:this.w.labelData.seriesGroups}}}excludeCollapsedSeriesInYAxis(){const e=this.w,t=[];e.globals.seriesYAxisMap.forEach((s,a)=>{let i=0;s.forEach(r=>{e.globals.collapsedSeriesIndices.indexOf(r)!==-1&&i++}),i>0&&i==s.length&&t.push(a)}),e.globals.ignoreYAxisIndexes=t.map(s=>s)}}class bt{static invalidateAll(e){!e||!e.globals||(e.globals.cachedSelectors&&(e.globals.cachedSelectors={}),e.globals.domCache&&e.globals.domCache.clear(),e.globals.dimensionCache={})}static invalidateDimensions(e){!e||!e.globals||(e.globals.dimensionCache={})}static invalidateSelectors(e){!e||!e.globals||e.globals.cachedSelectors&&(e.globals.cachedSelectors={})}static getCachedSelector(e,t,s){return!e||!e.globals?s():(e.globals.cachedSelectors||(e.globals.cachedSelectors={}),e.globals.cachedSelectors[t]||(e.globals.cachedSelectors[t]=s()),e.globals.cachedSelectors[t])}static getCachedDimension(e,t,s,a=1e3){if(!e||!e.globals)return s();e.globals.dimensionCache||(e.globals.dimensionCache={});const i=e.globals.dimensionCache[t],r=Date.now();if(i&&i.lastUpdate&&r-i.lastUpdate<a)return i.value;const o=s();return e.globals.dimensionCache[t]={value:o,lastUpdate:r},o}static cacheDOMElement(e,t,s){!e||!e.globals||(e.globals.domCache||(e.globals.domCache=new Map),e.globals.domCache.set(t,s))}static getCachedDOMElement(e,t){return!e||!e.globals||!e.globals.domCache?null:e.globals.domCache.get(t)||null}}class Qt{constructor(e,t){this.w=e,this.ctx=t}_updateOptions(e,t=!1,s=!0,a=!0,i=!1){return new Promise(r=>{let o=[this.ctx];a&&(o=this.ctx.getSyncedCharts()),this.w.globals.isExecCalled&&(o=[this.ctx],this.w.globals.isExecCalled=!1),o.forEach((l,n)=>{const h=l.w;if(h.globals.shouldAnimate=s,t||(h.globals.resized=!0,h.globals.dataChanged=!0,s&&l.series.getPreviousPaths()),e&&typeof e=="object"&&(l.config=new ye(e),e=$.extendArrayProps(l.config,e,h),l.w.globals.chartID!==this.w.globals.chartID&&delete e.series,h.config=D.extend(h.config,e),i&&(h.globals.lastXAxis=e.xaxis?D.clone(e.xaxis):[],h.globals.lastYAxis=e.yaxis?D.clone(e.yaxis):[],h.globals.initialConfig=D.extend({},h.config),h.globals.initialSeries=D.clone(h.config.series),e.series))){for(let c=0;c<h.globals.collapsedSeriesIndices.length;c++){const d=h.config.series[h.globals.collapsedSeriesIndices[c]];h.globals.collapsedSeries[c].data=h.globals.axisCharts?d.data.slice():d}for(let c=0;c<h.globals.ancillaryCollapsedSeriesIndices.length;c++){const d=h.config.series[h.globals.ancillaryCollapsedSeriesIndices[c]];h.globals.ancillaryCollapsedSeries[c].data=h.globals.axisCharts?d.data.slice():d}l.series.emptyCollapsedSeries(h.config.series)}return l.update(e).then(()=>{n===o.length-1&&r(l)})})})}_updateSeries(e,t,s=!1){return new Promise(a=>{const i=this.w;i.globals.shouldAnimate=t,i.globals.dataChanged=!0,bt.invalidateSelectors(i),t&&this.ctx.series.getPreviousPaths(),this.ctx.data.resetParsingFlags();const r=this.ctx.data.parseData(e);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&&(i.globals.initialConfig.series=D.clone(i.config.series),i.globals.initialSeries=D.clone(i.config.series)),this.ctx.update().then(()=>{a(this.ctx)})})}_extendSeries(e,t){const s=this.w,a=s.config.series[t];return O(R({},s.config.series[t]),{name:e.name?e.name:a==null?void 0:a.name,color:e.color?e.color:a==null?void 0:a.color,type:e.type?e.type:a==null?void 0:a.type,group:e.group?e.group:a==null?void 0:a.group,hidden:typeof e.hidden<"u"?e.hidden:a==null?void 0:a.hidden,data:e.data?e.data:a==null?void 0:a.data,zIndex:typeof e.zIndex<"u"?e.zIndex:t})}toggleDataPointSelection(e,t){const s=this.w;let a=null;const i=`.apexcharts-series[data\\:realIndex='${e}']`;if(s.globals.axisCharts?a=s.dom.Paper.findOne(`${i} path[j='${t}'], ${i} circle[j='${t}'], ${i} rect[j='${t}']`):typeof t>"u"&&(a=s.dom.Paper.findOne(`${i} path[j='${e}']`),(s.config.chart.type==="pie"||s.config.chart.type==="polarArea"||s.config.chart.type==="donut")&&this.ctx.pie.pieClicked(e)),a)new I(this.w).pathMouseDown(a,null);else return console.warn("toggleDataPointSelection: Element not found"),null;return a.node?a.node:null}forceXAxisUpdate(e){const t=this.w;return["min","max"].forEach(s=>{typeof e.xaxis[s]<"u"&&(t.config.xaxis[s]=e.xaxis[s],t.globals.lastXAxis[s]=e.xaxis[s])}),e.xaxis.categories&&e.xaxis.categories.length&&(t.config.xaxis.categories=e.xaxis.categories),t.config.xaxis.convertedCatToNumeric&&(e=new me(e).convertCatToNumericXaxis(e,this.ctx)),e}forceYAxisUpdate(e){return e.chart&&e.chart.stacked&&e.chart.stackType==="100%"&&(Array.isArray(e.yaxis)?e.yaxis.forEach((t,s)=>{e.yaxis[s].min=0,e.yaxis[s].max=100}):(e.yaxis.min=0,e.yaxis.max=100)),e}revertDefaultAxisMinMax(e){const t=this.w;let s=t.globals.lastXAxis,a=t.globals.lastYAxis;e&&e.xaxis&&(s=e.xaxis),e&&e.yaxis&&(a=e.yaxis),t.config.xaxis.min=s.min,t.config.xaxis.max=s.max;const i=r=>{typeof a[r]<"u"&&(t.config.yaxis[r].min=a[r].min,t.config.yaxis[r].max=a[r].max)};t.config.yaxis.map((r,o)=>{t.interact.zoomed||typeof a[o]<"u"?i(o):typeof this.ctx.opts.yaxis[o]<"u"&&(r.min=this.ctx.opts.yaxis[o].min,r.max=this.ctx.opts.yaxis[o].max)})}}class mt{constructor(e){this.w=e.w,this.ttCtx=e}getNearestValues({hoverArea:e,elGrid:t,clientX:s,clientY:a}){const i=this.w,r=t.getBoundingClientRect(),o=r.width,l=r.height;let n=o/(i.globals.dataPoints-1);const h=l/i.globals.dataPoints,c=this.hasBars();(i.globals.comboCharts||c)&&!i.config.xaxis.convertedCatToNumeric&&(n=o/i.globals.dataPoints);const d=s-r.left-i.globals.barPadForNumericAxis,u=a-r.top;d<0||u<0||d>o||u>l?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):i.interact.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):i.interact.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));let g=Math.round(d/n);const p=Math.floor(u/h);c&&!i.config.xaxis.convertedCatToNumeric&&(g=Math.ceil(d/n),g=g-1);let b=null,f=null,m=i.globals.seriesXvalues.map(y=>y.filter(w=>D.isNumber(w)));const v=i.globals.seriesYvalues.map(y=>y.filter(w=>D.isNumber(w)));if(i.axisFlags.isXNumeric){const y=this.ttCtx.getElGrid().getBoundingClientRect(),w=d*(y.width/o),C=u*(y.height/l);f=this.closestInMultiArray(w,C,m,v),b=f.index,g=f.j,b!==null&&i.globals.hasNullValues&&(m=i.globals.seriesXvalues[b],f=this.closestInArray(w,m),g=f.j)}return i.interact.capturedSeriesIndex=b===null?-1:b,(!g||g<1)&&(g=0),i.globals.isBarHorizontal?i.interact.capturedDataPointIndex=p:i.interact.capturedDataPointIndex=g,{capturedSeries:b,j:i.globals.isBarHorizontal?p:g,hoverX:d,hoverY:u}}getFirstActiveXArray(e){const t=this.w;let s=0;const a=e.map((i,r)=>i.length>0?r:-1);for(let i=0;i<a.length;
31i++)if(a[i]!==-1&&t.globals.collapsedSeriesIndices.indexOf(i)===-1&&t.globals.ancillaryCollapsedSeriesIndices.indexOf(i)===-1){s=a[i];break}return s}closestInMultiArray(e,t,s,a){const i=this.w,r=h=>i.globals.collapsedSeriesIndices.indexOf(h)===-1&&i.globals.ancillaryCollapsedSeriesIndices.indexOf(h)===-1;let o=1/0,l=null,n=null;for(let h=0;h<s.length;h++){if(!r(h))continue;const c=s[h],d=a[h],u=Math.min(c.length,d.length);for(let g=0;g<u;g++){const p=c[g],b=e-p;let f=Math.sqrt(b*b);if(!i.globals.allSeriesHasEqualX){const m=d[g],v=t-m;f=Math.sqrt(b*b+v*v)}f<o&&(o=f,l=h,n=g)}}return{index:l,j:n}}closestInArray(e,t){const s=t[0];let a=null,i=Math.abs(e-s);for(let r=0;r<t.length;r++){const o=Math.abs(e-t[r]);o<i&&(i=o,a=r)}return{j:a}}isXoverlap(e){const t=this.w,s=[],a=t.seriesData.seriesX.filter(i=>typeof i[0]<"u");if(a.length>0)for(let i=0;i<a.length-1;i++)typeof a[i][e]<"u"&&typeof a[i+1][e]<"u"&&a[i][e]!==a[i+1][e]&&s.push("unEqual");return s.length===0}isInitialSeriesSameLen(){var e,t,s;let a=!0;const i=((e=this.w.globals.initialSeries)==null?void 0:e.filter((r,o)=>{var l;return!((l=this.w.globals.collapsedSeriesIndices)!=null&&l.includes(o))}))||[];for(let r=0;r<i.length-1;r++){if(!((t=i[r])!=null&&t.data)||!((s=i[r+1])!=null&&s.data))return!0;if(i[r].data.length!==i[r+1].data.length){a=!1;break}}return a}getBarsHeight(e){return[...e].reduce((t,s)=>t+s.getBBox().height,0)}getElMarkers(e){return typeof e=="number"?this.w.dom.baseEl.querySelectorAll(`.apexcharts-series[data\\:realIndex='${e}'] .apexcharts-series-markers-wrap > *`):this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}getAllMarkers(e=!1){let t=this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");t=[...t],e&&(t=t.filter(a=>{const i=Number(a.getAttribute("data:realIndex"));return this.w.globals.collapsedSeriesIndices.indexOf(i)===-1})),t.sort((a,i)=>{var r=Number(a.getAttribute("data:realIndex")),o=Number(i.getAttribute("data:realIndex"));return o<r?1:o>r?-1:0});const s=[];return t.forEach(a=>{s.push(a.querySelector(".apexcharts-marker"))}),s}hasMarkers(e){return this.getElMarkers(e).length>0}getPathFromPoint(e,t){const s=Number(e.getAttribute("cx")),a=Number(e.getAttribute("cy")),i=e.getAttribute("shape");return new I(this.w).getMarkerPath(s,a,i,t)}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(e){const t=this.w;let s=t.config.markers.hover.size;return s===void 0&&(s=t.globals.markers.size[e]+t.config.markers.hover.sizeOffset),s}toggleAllTooltipSeriesGroups(e){const t=this.w,s=this.ttCtx;s.allTooltipSeriesGroups.length===0&&(s.allTooltipSeriesGroups=t.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));const a=s.allTooltipSeriesGroups;for(let i=0;i<a.length;i++)e==="enable"?(a[i].classList.add("apexcharts-active"),a[i].style.display=t.config.tooltip.items.display):(a[i].classList.remove("apexcharts-active"),a[i].style.display="none")}}class es{constructor(e){this.w=e.w,this.ttCtx=e,this.tooltipUtil=new mt(e)}drawSeriesTexts({shared:e=!0,ttItems:t,i:s=0,j:a=null,y1:i,y2:r,e:o}){const l=this.w;l.config.tooltip.custom!==void 0?this.handleCustomTooltip({i:s,j:a,y1:i,y2:r,w:l}):this.toggleActiveInactiveSeries(e,s);const n=this.getValuesToPrint({i:s,j:a});this.printLabels({i:s,j:a,values:n,ttItems:t,shared:e,e:o});const h=this.ttCtx.getElTooltip();this.ttCtx.tooltipRect.ttWidth=h.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=h.getBoundingClientRect().height}printLabels({i:e,j:t,values:s,ttItems:a,shared:i,e:r}){var o;const l=this.w;let n,h=[];const c=f=>l.seriesData.seriesGoals[f]&&l.seriesData.seriesGoals[f][t]&&Array.isArray(l.seriesData.seriesGoals[f][t]),{xVal:d,zVal:u,xAxisTTVal:g}=s;let p="",b=l.globals.colors[e];t!==null&&l.config.plotOptions.bar.distributed&&(b=l.globals.colors[t]);for(let f=0,m=l.seriesData.series.length-1;f<l.seriesData.series.length;f++,m--){let v=this.getFormatters(e);
31p=this.getSeriesName({fn:v.yLbTitleFormatter,index:e,seriesIndex:e,j:t}),l.config.chart.type==="treemap"&&(p=v.yLbTitleFormatter(String(l.config.series[e].data[t].x),{series:l.seriesData.series,seriesIndex:e,dataPointIndex:t,w:l}));const y=l.config.tooltip.inverseOrder?m:f;if(l.globals.axisCharts){const w=C=>{var A,L,S,k;return l.axisFlags.isRangeData?v.yLbFormatter((L=(A=l.rangeData.seriesRangeStart)==null?void 0:A[C])==null?void 0:L[t],{series:l.rangeData.seriesRangeStart,seriesIndex:C,dataPointIndex:t,w:l})+" - "+v.yLbFormatter((k=(S=l.rangeData.seriesRangeEnd)==null?void 0:S[C])==null?void 0:k[t],{series:l.rangeData.seriesRangeEnd,seriesIndex:C,dataPointIndex:t,w:l}):v.yLbFormatter(l.seriesData.series[C][t],{series:l.seriesData.series,seriesIndex:C,dataPointIndex:t,w:l})};if(i)v=this.getFormatters(y),p=this.getSeriesName({fn:v.yLbTitleFormatter,index:y,seriesIndex:e,j:t}),b=l.globals.colors[y],n=w(y),c(y)&&(h=l.seriesData.seriesGoals[y][t].map(C=>({attrs:C,val:v.yLbFormatter(C.value,{seriesIndex:y,dataPointIndex:t,w:l})})));else{const C=(o=r==null?void 0:r.target)==null?void 0:o.getAttribute("fill");C&&(C.indexOf("url")!==-1?C.indexOf("Pattern")!==-1&&(b=l.dom.baseEl.querySelector(C.substr(4).slice(0,-1)).childNodes[0].getAttribute("stroke")):b=C),n=w(e),c(e)&&Array.isArray(l.seriesData.seriesGoals[e][t])&&(h=l.seriesData.seriesGoals[e][t].map(A=>({attrs:A,val:v.yLbFormatter(A.value,{seriesIndex:e,dataPointIndex:t,w:l})})))}}t===null&&(n=v.yLbFormatter(l.seriesData.series[e],O(R({},l),{seriesIndex:e,dataPointIndex:e}))),this.DOMHandling({i:e,t:y,j:t,ttItems:a,values:{val:n,goalVals:h,xVal:d,xAxisTTVal:g,zVal:u},seriesName:p,shared:i,pColor:b})}}getFormatters(e){const t=this.w;let s=t.formatters.yLabelFormatters[e],a;return t.formatters.ttVal!==void 0?Array.isArray(t.formatters.ttVal)?(s=t.formatters.ttVal[e]&&t.formatters.ttVal[e].formatter,a=t.formatters.ttVal[e]&&t.formatters.ttVal[e].title&&t.formatters.ttVal[e].title.formatter):(s=t.formatters.ttVal.formatter,typeof t.formatters.ttVal.title.formatter=="function"&&(a=t.formatters.ttVal.title.formatter)):a=t.config.tooltip.y.title.formatter,typeof s!="function"&&(t.formatters.yLabelFormatters[0]?s=t.formatters.yLabelFormatters[0]:s=function(i){return i}),typeof a!="function"&&(a=function(i){return i?i+": ":""}),{yLbFormatter:s,yLbTitleFormatter:a}}getSeriesName({fn:e,index:t,seriesIndex:s,j:a}){const i=this.w;return e(String(i.seriesData.seriesNames[t]),{series:i.seriesData.series,seriesIndex:s,dataPointIndex:a,w:i})}DOMHandling({t:e,j:t,ttItems:s,values:a,seriesName:i,shared:r,pColor:o}){const l=this.w,n=this.ttCtx,{val:h,goalVals:c,xVal:d,xAxisTTVal:u,zVal:g}=a;let p=null;p=s[e].children,l.config.tooltip.fillSeriesColor&&(s[e].style.backgroundColor=o,p[0].style.display="none"),n.showTooltipTitle&&(n.tooltipTitle===null&&(n.tooltipTitle=l.dom.baseEl.querySelector(".apexcharts-tooltip-title")),n.tooltipTitle.innerHTML=d),n.isXAxisTooltipEnabled&&(n.xaxisTooltipText.innerHTML=u!==""?u:d);const b=s[e].querySelector(".apexcharts-tooltip-text-y-label");b&&(b.innerHTML=i||"");const f=s[e].querySelector(".apexcharts-tooltip-text-y-value");f&&(f.innerHTML=typeof h<"u"?h:""),p[0]&&p[0].classList.contains("apexcharts-tooltip-marker")&&(l.config.tooltip.marker.fillColors&&Array.isArray(l.config.tooltip.marker.fillColors)&&(o=l.config.tooltip.marker.fillColors[e]),l.config.tooltip.fillSeriesColor?p[0].style.backgroundColor=o:p[0].style.color=o),l.config.tooltip.marker.show||(p[0].style.display="none");const m=s[e].querySelector(".apexcharts-tooltip-text-goals-label"),v=s[e].querySelector(".apexcharts-tooltip-text-goals-value");if(c.length&&l.seriesData.seriesGoals[e]){const y=()=>{let w="<div>",C="<div>";c.forEach(A=>{w+=` <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: ${A.attrs.strokeColor}; height: 3px; border-radius: 0; top: 5px;"></span> ${A.attrs.name}</div>`,C+=`<div>${A.val}</div>`}),m.innerHTML=w+"</div>",v.innerHTML=C+"</div>"};r?l.seriesData.seriesGoals[e][t]&&Array.isArray(l.seriesData.seriesGoals[e][t])?y():(m.innerHTML="",v.innerHTML=""):y()}
31else m.innerHTML="",v.innerHTML="";if(g!==null){const y=s[e].querySelector(".apexcharts-tooltip-text-z-label");y.innerHTML=l.config.tooltip.z.title;const w=s[e].querySelector(".apexcharts-tooltip-text-z-value");w.innerHTML=typeof g<"u"?g:""}if(r&&p[0]){if(l.config.tooltip.hideEmptySeries){const y=s[e].querySelector(".apexcharts-tooltip-marker"),w=s[e].querySelector(".apexcharts-tooltip-text");parseFloat(h)==0?(y.style.display="none",w.style.display="none"):(y.style.display="block",w.style.display="block")}typeof h>"u"||h===null||l.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||l.globals.collapsedSeriesIndices.indexOf(e)>-1||Array.isArray(n.tConfig.enabledOnSeries)&&n.tConfig.enabledOnSeries.indexOf(e)===-1?p[0].parentNode.style.display="none":p[0].parentNode.style.display=l.config.tooltip.items.display}else Array.isArray(n.tConfig.enabledOnSeries)&&n.tConfig.enabledOnSeries.indexOf(e)===-1&&(p[0].parentNode.style.display="none")}toggleActiveInactiveSeries(e,t){const s=this.w;if(e)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");const a=s.dom.baseEl.querySelector(`.apexcharts-tooltip-series-group-${t}`);a&&(a.classList.add("apexcharts-active"),a.style.display=s.config.tooltip.items.display)}}getValuesToPrint({i:e,j:t}){const s=this.w,a=s.seriesData.seriesX.map(d=>d.length>0?d:[]);let i="",r="",o=null,l=null;const n={series:s.seriesData.series,seriesIndex:e,dataPointIndex:t,w:s},h=s.formatters.ttZFormatter;if(t===null)l=s.seriesData.series[e];else if(s.axisFlags.isXNumeric&&s.config.chart.type!=="treemap"){if(i=a[e][t],a[e].length===0){const d=this.tooltipUtil.getFirstActiveXArray(a);i=a[d][t]}}else new _e(this.w).isFormatXY()?i=typeof s.config.series[e].data[t]<"u"?s.config.series[e].data[t].x:"":i=typeof s.labelData.labels[t]<"u"?s.labelData.labels[t]:"";const c=i;return s.axisFlags.isXNumeric&&s.config.xaxis.type==="datetime"?i=new ve(this.w).xLabelFormat(s.formatters.ttKeyFormatter,c,c,{i:void 0,dateFormatter:new U(this.w).formatDate,w:this.w}):s.globals.isBarHorizontal?i=s.formatters.yLabelFormatters[0](c,n):i=s.formatters.xLabelFormatter(c,n),s.config.tooltip.x.formatter!==void 0&&(i=s.formatters.ttKeyFormatter(c,n)),s.seriesData.seriesZ.length>0&&s.seriesData.seriesZ[e].length>0&&(o=h(s.seriesData.seriesZ[e][t],s)),typeof s.config.xaxis.tooltip.formatter=="function"?r=s.formatters.xaxisTooltipFormatter(c,n):r=i,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(i)?i.join(" "):i,xAxisTTVal:Array.isArray(r)?r.join(" "):r,zVal:o}}handleCustomTooltip({i:e,j:t,y1:s,y2:a,w:i}){const r=this.ttCtx.getElTooltip();let o=i.config.tooltip.custom;Array.isArray(o)&&o[e]&&(o=o[e]);const l=o({series:i.seriesData.series,seriesIndex:e,dataPointIndex:t,y1:s,y2:a,w:i});typeof l=="string"||typeof l=="number"?r.innerHTML=l:(l instanceof Element||typeof l.nodeName=="string")&&(r.innerHTML="",r.appendChild(l.cloneNode(!0)))}}class yt{constructor(e){this.ttCtx=e,this.w=e.w}moveXCrosshairs(e,t=null){const s=this.ttCtx,a=this.w,i=s.getElXCrosshairs();let r=e-s.xcrosshairsWidth/2;const o=a.labelData.labels.slice().length;if(t!==null&&(r=a.layout.gridWidth/o*t),i!==null&&!a.globals.isBarHorizontal&&(i.setAttribute("x",r),i.setAttribute("x1",r),i.setAttribute("x2",r),i.setAttribute("y2",a.layout.gridHeight),i.classList.add("apexcharts-active")),r<0&&(r=0),r>a.layout.gridWidth&&(r=a.layout.gridWidth),s.isXAxisTooltipEnabled){let l=r;(a.config.xaxis.crosshairs.width==="tickWidth"||a.config.xaxis.crosshairs.width==="barWidth")&&(l=r+s.xcrosshairsWidth/2),this.moveXAxisTooltip(l)}}moveYCrosshairs(e){const t=this.ttCtx;t.ycrosshairs!==null&&I.setAttrs(t.ycrosshairs,{y1:e,y2:e}),t.ycrosshairsHidden!==null&&I.setAttrs(t.ycrosshairsHidden,{y1:e,y2:e})}moveXAxisTooltip(e){const t=this.w,s=this.ttCtx;if(s.xaxisTooltip!==null&&s.xcrosshairsWidth!==0){s.xaxisTooltip.classList.add("apexcharts-active");const a=s.xaxisOffY+t.config.xaxis.tooltip.offsetY+t.layout.translateY+1+t.config.xaxis.offsetY,i=s.xaxisTooltip.getBoundingClientRect().width;if(e=e-i/2,!isNaN(e)){e=e+t.layout.translateX;let r=0;r=new I(this.w).getTextRects(s.xaxisTooltipText.innerHTML),s.xaxisTooltipText.style.minWidth=r.width+"px",s.xaxisTooltip.style.left=e+"px",s.xaxisTooltip.style.top=a+"px"}}}moveYAxisTooltip(e){const t=this.w,s=this.ttCtx;s.yaxisTTEls===null&&(s.yaxisTTEls=t.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));const a=parseInt(s.ycrosshairsHidden.getAttribute("y1"),10);let i=t.layout.translateY+a;const r=s.yaxisTTEls[e].getBoundingClientRect(),o=r.height;let l=t.globals.translateYAxisX[e]-2;t.config.yaxis[e].opposite&&(l=l-r.width),i=i-o/2,t.globals.ignoreYAxisIndexes.indexOf(e)===-1&&i>0&&i<t.layout.gridHeight?(s.yaxisTTEls[e].classList.add("apexcharts-active"),s.yaxisTTEls[e].style.top=i+"px",s.yaxisTTEls[e].style.left=l+t.config.yaxis[e].tooltip.offsetX+"px"):s.yaxisTTEls[e].classList.remove("apexcharts-active")}moveTooltip(e,t,s=null){const a=this.w,i=this.ttCtx,r=i.getElTooltip(),o=i.tooltipRect,l=s!==null?parseFloat(s):1;let n=parseFloat(e)+l+5,h=parseFloat(t)+l/2;if(n>a.layout.gridWidth/2&&(n=n-o.ttWidth-l-10),n>a.layout.gridWidth-o.ttWidth-10&&(n=a.layout.gridWidth-o.ttWidth),n<-20&&(n=-20),a.config.tooltip.followCursor){const c=i.getElGrid().getBoundingClientRect();n=i.e.clientX-c.left,n>a.layout.gridWidth/2&&(n=n-i.tooltipRect.ttWidth),h=i.e.clientY+a.layout.translateY-c.top,h>a.layout.gridHeight/2&&(h=h-i.tooltipRect.ttHeight)}else a.globals.isBarHorizontal||o.ttHeight/2+h>a.layout.gridHeight&&(h=a.layout.gridHeight-o.ttHeight+a.layout.translateY);isNaN(n)||(n=n+a.layout.translateX,r.style.left=n+"px",r.style.top=h+"px")}moveMarkers(e,t){const s=this.w,a=this.ttCtx;if(s.globals.markers.size[e]>0){const i=s.dom.baseEl.querySelectorAll(` .apexcharts-series[data\\:realIndex='${e}'] .apexcharts-marker`);for(let r=0;r<i.length;r++)parseInt(i[r].getAttribute("rel"),10)===t&&(a.marker.resetPointsSize(),a.marker.enlargeCurrentPoint(t,i[r]))}else a.marker.resetPointsSize(),this.moveDynamicPointOnHover(t,e)}moveDynamicPointOnHover(e,t){var s,a,i,r;const o=this.w,l=this.ttCtx;let n=0,h=0;const c=new I(this.w),d=o.globals.pointsArray,u=l.tooltipUtil.getHoverMarkerSize(t),g=o.config.series[t].type;if(g&&(g==="column"||g==="candlestick"||g==="boxPlot"))return;n=(a=(s=d[t])==null?void 0:s[e])==null?void 0:a[0],h=((r=(i=d[t])==null?void 0:i[e])==null?void 0:r[1])||0;const p=o.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${t}'] .apexcharts-series-markers path`);if(p&&h<o.layout.gridHeight&&h>0){const b=p.getAttribute("shape"),f=c.getMarkerPath(n,h,b,u*1.5);p.setAttribute("d",f)}this.moveXCrosshairs(n),l.fixedTooltip||this.moveTooltip(n,h,u)}moveDynamicPointsOnHover(e){var t;const s=this.ttCtx,a=s.w;let i=0,r=0,o=0;const l=a.globals.pointsArray,n=new j(this.w),h=new I(this.w);o=n.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);const c=s.tooltipUtil.getHoverMarkerSize(o);if((t=l[o])!=null&&t[e]&&(i=l[o][e][0],r=l[o][e][1]),isNaN(i))return;const d=s.tooltipUtil.getAllMarkers();if(d.length)for(let u=0;u<a.seriesData.series.length;u++){const g=l[u];if(a.globals.comboCharts&&typeof g>"u"&&d.splice(u,0,null),g&&g.length){let p=l[u][e][1],b;d[u].setAttribute("cx",i);const f=d[u].getAttribute("shape");if(a.config.chart.type==="rangeArea"&&!a.globals.comboCharts){const m=e+a.seriesData.series[u].length;b=l[u][m][1];const v=Math.abs(p-b)/2;p=p-v}if(p!==null&&!isNaN(p)&&p<a.layout.gridHeight+c&&p+c>0){const m=h.getMarkerPath(i,p,f,c);d[u].setAttribute("d",m)}else d[u].setAttribute("d","")}}this.moveXCrosshairs(i),s.fixedTooltip||this.moveTooltip(i,r||a.layout.gridHeight,c)}moveStickyTooltipOverBars(e,t){const s=this.w,a=this.ttCtx;let i=s.globals.columnSeries?s.globals.columnSeries.length:s.seriesData.series.length;s.config.chart.stacked&&(i=s.globals.barGroups.length);let r=i>=2&&i%2===0?Math.floor(i/2):Math.floor(i/2)+1;s.globals.isBarHorizontal&&(r=new j(this.w).getActiveConfigSeriesIndex("desc")+1);let o=s.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[rel='${r}'] path[j='${e}'], .apexcharts-candlestick-series .apexcharts-series[rel='${r}'] path[j='${e}'], .apexcharts-boxPlot-series .apexcharts-series[rel='${r}'] path[j='${e}'], .apexcharts-rangebar-series .apexcharts-series[rel='${r}'] path[j='${e}']`);!o&&typeof t=="number"&&(o=s.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[data\\:realIndex='${t}'] path[j='${e}'], 32 .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='${t}'] path[j='${e}'], 33 .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='${t}'] path[j='${e}'], 34 .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='${t}'] path[j='${e}']`));let l=o?parseFloat(o.getAttribute("cx")):0,n=o?parseFloat(o.getAttribute("cy")):0;const h=o?parseFloat(o.getAttribute("barWidth")):0,c=a.getElGrid().getBoundingClientRect(),d=o&&(o.classList.contains("apexcharts-candlestick-area")||o.classList.contains("apexcharts-boxPlot-area"));s.axisFlags.isXNumeric?(o&&!d&&(l=l-(i%2!==0?h/2:0)),o&&d&&(l=l-h/2)):s.globals.isBarHorizontal||(l=
34a.xAxisTicksPositions[e-1]+a.dataPointsDividedWidth/2,isNaN(l)&&(l=a.xAxisTicksPositions[e]-a.dataPointsDividedWidth/2)),s.globals.isBarHorizontal?n=n-a.tooltipRect.ttHeight:s.config.tooltip.followCursor?n=a.e.clientY-c.top-a.tooltipRect.ttHeight/2:n+a.tooltipRect.ttHeight+15>s.layout.gridHeight&&(n=s.layout.gridHeight),s.globals.isBarHorizontal||this.moveXCrosshairs(l),a.fixedTooltip||this.moveTooltip(l,n||s.layout.gridHeight)}}class ts{constructor(e){this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new yt(e)}drawDynamicPoints(){const e=this.w,t=new I(this.w),s=new fe(this.w,this.ctx);let a=e.dom.baseEl.querySelectorAll(".apexcharts-series");a=[...a],e.config.chart.stacked&&a.sort((i,r)=>parseFloat(i.getAttribute("data:realIndex"))-parseFloat(r.getAttribute("data:realIndex")));for(let i=0;i<a.length;i++){const r=a[i].querySelector(".apexcharts-series-markers-wrap");if(r!==null){let o=`apexcharts-marker w${(Math.random()+1).toString(36).substring(4)}`;(e.config.chart.type==="line"||e.config.chart.type==="area")&&!e.globals.comboCharts&&!e.config.tooltip.intersect&&(o+=" no-pointer-events");const l=s.getMarkerConfig({cssClass:o,seriesIndex:Number(r.getAttribute("data:realIndex"))}),n=t.drawMarker(0,0,l);n.node.setAttribute("default-marker-size",0);const h=H.createElementNS(_,"g");h.classList.add("apexcharts-series-markers"),h.appendChild(n.node),r.appendChild(h)}}}enlargeCurrentPoint(e,t,s=null,a=null){const i=this.w;i.config.chart.type!=="bubble"&&this.newPointSize(e,t);let r=t.getAttribute("cx"),o=t.getAttribute("cy");if(s!==null&&a!==null&&(r=s,o=a),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if(i.config.chart.type==="radar"){const l=this.ttCtx.getElGrid().getBoundingClientRect();r=this.ttCtx.e.clientX-l.left}this.tooltipPosition.moveTooltip(r,o,i.config.markers.hover.size)}}enlargePoints(e){const t=this.w,s=this,a=this.ttCtx,i=e,r=t.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker");let o=t.config.markers.hover.size;for(let l=0;l<r.length;l++){const n=r[l].getAttribute("rel"),h=r[l].getAttribute("index");if(o===void 0&&(o=t.globals.markers.size[h]+t.config.markers.hover.sizeOffset),i===parseInt(n,10)){s.newPointSize(i,r[l]);const c=r[l].getAttribute("cx"),d=r[l].getAttribute("cy");s.tooltipPosition.moveXCrosshairs(c),a.fixedTooltip||s.tooltipPosition.moveTooltip(c,d,o)}else s.oldPointSize(r[l])}}newPointSize(e,t){const s=this.w;let a=s.config.markers.hover.size;const i=e===0?t.parentNode.firstChild:t.parentNode.lastChild;if(i.getAttribute("default-marker-size")!=="0"){const r=parseInt(i.getAttribute("index"),10);a===void 0&&(a=s.globals.markers.size[r]+s.config.markers.hover.sizeOffset),a<0&&(a=0);const o=this.ttCtx.tooltipUtil.getPathFromPoint(t,a);t.setAttribute("d",o)}}oldPointSize(e){const t=parseFloat(e.getAttribute("default-marker-size")),s=this.ttCtx.tooltipUtil.getPathFromPoint(e,t);e.setAttribute("d",s)}resetPointsSize(){const e=this.w.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker");for(let t=0;t<e.length;t++){const s=parseFloat(e[t].getAttribute("default-marker-size"));if(D.isNumber(s)&&s>0){const a=this.ttCtx.tooltipUtil.getPathFromPoint(e[t],s);e[t].setAttribute("d",a)}else e[t].setAttribute("d","M0,0")}}}class ss{constructor(e){this.w=e.w;const t=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!t.globals.isBarHorizontal&&t.config.chart.type==="rangeBar"&&t.config.plotOptions.bar.rangeBarGroupRows}getAttr(e,t){return parseFloat(e.target.getAttribute(t))}handleHeatTreeTooltip({e,opt:t,x:s,y:a,type:i}){const r=this.ttCtx,o=this.w;if(e.target.classList.contains(`apexcharts-${i}-rect`)){const l=this.getAttr(e,"i"),n=this.getAttr(e,"j"),h=this.getAttr(e,"cx"),c=this.getAttr(e,"cy"),d=this.getAttr(e,"width"),u=this.getAttr(e,"height");if(r.tooltipLabels.drawSeriesTexts({ttItems:t.ttItems,i:l,j:n,shared:!1,e}),o.interact.capturedSeriesIndex=l,o.interact.capturedDataPointIndex=n,s=h+r.tooltipRect.ttWidth/2+d,a=c+r.tooltipRect.ttHeight/2-u/2,r.tooltipPosition.moveXCrosshairs(h+d/2),s>o.layout.gridWidth/2&&(s=h-r.tooltipRect.ttWidth/2+d),r.w.config.tooltip.followCursor){const g=o.dom.elWrap.getBoundingClientRect();s=o.interact.clientX-g.left-(s>o.layout.gridWidth/2?r.tooltipRect.ttWidth:0),a=o.interact.clientY-g.top-(a>o.layout.gridHeight/2?r.tooltipRect.ttHeight:0)}}return{x:s,y:a}}handleMarkerTooltip({e,opt:t,x:s,y:a}){const i=this.w,r=this.ttCtx;let o,l;if(e.target.classList.contains("apexcharts-marker")){const n=parseInt(t.paths.getAttribute("cx"),10),h=
34parseInt(t.paths.getAttribute("cy"),10),c=parseFloat(t.paths.getAttribute("val"));if(l=parseInt(t.paths.getAttribute("rel"),10),o=parseInt(t.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,r.intersect){const d=D.findAncestor(t.paths,"apexcharts-series");d&&(o=parseInt(d.getAttribute("data:realIndex"),10))}if(r.tooltipLabels.drawSeriesTexts({ttItems:t.ttItems,i:o,j:l,shared:r.showOnIntersect?!1:i.config.tooltip.shared,e}),e.type==="mouseup"&&r.markerClick(e,o,l),i.interact.capturedSeriesIndex=o,i.interact.capturedDataPointIndex=l,s=n,a=h+i.layout.translateY-r.tooltipRect.ttHeight*1.4,r.w.config.tooltip.followCursor){const d=r.getElGrid().getBoundingClientRect();a=r.e.clientY+i.layout.translateY-d.top}c<0&&(a=h),r.marker.enlargeCurrentPoint(l,t.paths,s,a)}return{x:s,y:a}}handleBarTooltip({e,opt:t}){const s=this.w,a=this.ttCtx,i=a.getElTooltip();let r=0,o=0,l=0,n=0,h;const c=this.getBarTooltipXY({e,opt:t});if(c.j===null&&c.barHeight===0&&c.barWidth===0)return;n=c.i;const d=c.j;if(s.interact.capturedSeriesIndex=n,s.interact.capturedDataPointIndex=d,s.globals.isBarHorizontal&&a.tooltipUtil.hasBars()||!s.config.tooltip.shared?(o=c.x,l=c.y,h=Array.isArray(s.config.stroke.width)?s.config.stroke.width[n]:s.config.stroke.width,r=o):!s.globals.comboCharts&&!s.config.tooltip.shared&&(r=r/2),isNaN(l)&&(l=s.globals.svgHeight-a.tooltipRect.ttHeight),o+a.tooltipRect.ttWidth>s.layout.gridWidth?o=o-a.tooltipRect.ttWidth:o<0&&(o=0),a.w.config.tooltip.followCursor){const u=a.getElGrid().getBoundingClientRect();l=a.e.clientY-u.top}a.tooltip===null&&(a.tooltip=s.dom.baseEl.querySelector(".apexcharts-tooltip")),s.config.tooltip.shared||(s.globals.comboBarCount>0?a.tooltipPosition.moveXCrosshairs(r+h/2):a.tooltipPosition.moveXCrosshairs(r)),!a.fixedTooltip&&(!s.config.tooltip.shared||s.globals.isBarHorizontal&&a.tooltipUtil.hasBars())&&(l=l+s.layout.translateY-a.tooltipRect.ttHeight/2,i.style.left=o+s.layout.translateX+"px",i.style.top=l+"px")}getBarTooltipXY({e,opt:t}){const s=this.w;let a=null;const i=this.ttCtx;let r=0,o=0,l=0,n=0,h=0;const c=e.target.classList;if(c.contains("apexcharts-bar-area")||c.contains("apexcharts-candlestick-area")||c.contains("apexcharts-boxPlot-area")||c.contains("apexcharts-rangebar-area")){const d=e.target,u=d.getBoundingClientRect(),g=t.elGrid.getBoundingClientRect(),p=u.height;h=u.height;const b=u.width,f=parseInt(d.getAttribute("cx"),10),m=parseInt(d.getAttribute("cy"),10);n=parseFloat(d.getAttribute("barWidth"));const v=e.type==="touchmove"?e.touches[0].clientX:e.clientX;a=parseInt(d.getAttribute("j"),10),r=parseInt(d.parentNode.getAttribute("rel"),10)-1;const y=d.getAttribute("data-range-y1"),w=d.getAttribute("data-range-y2");s.globals.comboCharts&&(r=parseInt(d.parentNode.getAttribute("data:realIndex"),10));const C=L=>(s.axisFlags.isXNumeric?L=f-b/2:this.isVerticalGroupedRangeBar?L=f+b/2:L=f-i.dataPointsDividedWidth+b/2,L),A=()=>m-i.dataPointsDividedHeight+p/2-i.tooltipRect.ttHeight/2;i.tooltipLabels.drawSeriesTexts({ttItems:t.ttItems,i:r,j:a,y1:y?parseInt(y,10):null,y2:w?parseInt(w,10):null,shared:i.showOnIntersect?!1:s.config.tooltip.shared,e}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(o=v-g.left+15,l=A()):(o=C(o),l=e.clientY-g.top-i.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?(o=f,o<i.xyRatios.baseLineInvertedY&&(o=f-i.tooltipRect.ttWidth),l=A()):(o=C(o),l=m)}return{x:o,y:l,barHeight:h,barWidth:n,i:r,j:a}}}class as{constructor(e){this.w=e.w,this.ttCtx=e}drawXaxisTooltip(){const e=this.w,t=this.ttCtx,s=e.config.xaxis.position==="bottom";t.xaxisOffY=s?e.layout.gridHeight+1:-e.layout.xAxisHeight-e.config.xaxis.axisTicks.height+3;const a=s?"apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom":"apexcharts-xaxistooltip apexcharts-xaxistooltip-top",i=e.dom.elWrap;t.isXAxisTooltipEnabled&&e.dom.baseEl.querySelector(".apexcharts-xaxistooltip")===null&&(t.xaxisTooltip=H.createElementNS("http://www.w3.org/1999/xhtml","div"),t.xaxisTooltip.setAttribute("class",a+" apexcharts-theme-"+e.config.tooltip.theme),i.appendChild(t.xaxisTooltip),t.xaxisTooltipText=H.createElementNS("http://www.w3.org/1999/xhtml","div"),t.xaxisTooltipText.classList.add("apexcharts-xaxistooltip-text"),t.xaxisTooltipText.style.fontFamily=e.config.xaxis.tooltip.style.fontFamily||e.config.chart.fontFamily,t.xaxisTooltipText.style.fontSize=e.config.xaxis.tooltip.style.fontSize,t.xaxisTooltip.appendChild(t.xaxisTooltipText))}drawYaxisTooltip(){const e=this.w,t=this.ttCtx;for(let s=0;s<e.config.yaxis.length;s++){const a=e.config.yaxis[s].opposite||e.config.yaxis[s].crosshairs.opposite;t.yaxisOffX=a?e.layout.gridWidth+1:1;const i=a?`apexcharts-yaxistooltip apexcharts-yaxistooltip-${s} apexcharts-yaxistooltip-right`:`apexcharts-yaxistooltip apexcharts-yaxistooltip-${s} apexcharts-yaxistooltip-left`,r=e.dom.elWrap;e.dom.baseEl.querySelector(`.apexcharts-yaxistooltip apexcharts-yaxistooltip-${s}
34`)===null&&(t.yaxisTooltip=H.createElementNS("http://www.w3.org/1999/xhtml","div"),t.yaxisTooltip.setAttribute("class",i+" apexcharts-theme-"+e.config.tooltip.theme),r.appendChild(t.yaxisTooltip),s===0&&(t.yaxisTooltipText=[]),t.yaxisTooltipText[s]=H.createElementNS("http://www.w3.org/1999/xhtml","div"),t.yaxisTooltipText[s].classList.add("apexcharts-yaxistooltip-text"),t.yaxisTooltip.appendChild(t.yaxisTooltipText[s]))}}setXCrosshairWidth(){const e=this.w,t=this.ttCtx,s=t.getElXCrosshairs();if(t.xcrosshairsWidth=parseInt(e.config.xaxis.crosshairs.width,10),e.globals.comboCharts){const a=e.dom.baseEl.querySelector(".apexcharts-bar-area");if(a!==null&&e.config.xaxis.crosshairs.width==="barWidth"){const i=parseFloat(a.getAttribute("barWidth"));t.xcrosshairsWidth=i}else if(e.config.xaxis.crosshairs.width==="tickWidth"){const i=e.labelData.labels.length;t.xcrosshairsWidth=e.layout.gridWidth/i}}else if(e.config.xaxis.crosshairs.width==="tickWidth"){const a=e.labelData.labels.length;t.xcrosshairsWidth=e.layout.gridWidth/a}else if(e.config.xaxis.crosshairs.width==="barWidth"){const a=e.dom.baseEl.querySelector(".apexcharts-bar-area");if(a!==null){const i=parseFloat(a.getAttribute("barWidth"));t.xcrosshairsWidth=i}else t.xcrosshairsWidth=1}e.globals.isBarHorizontal&&(t.xcrosshairsWidth=0),s!==null&&t.xcrosshairsWidth>0&&s.setAttribute("width",t.xcrosshairsWidth)}handleYCrosshair(){const e=this.w,t=this.ttCtx;t.ycrosshairs=e.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),t.ycrosshairsHidden=e.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}drawYaxisTooltipText(e,t,s){const a=this.ttCtx,i=this.w,r=i.globals,o=r.seriesYAxisMap[e];if(a.yaxisTooltips[e]&&o.length>0){const l=i.formatters.yLabelFormatters[e],n=a.getElGrid().getBoundingClientRect(),h=o[0];let c=0;s.yRatio.length>1&&(c=h);const d=(t-n.top)*s.yRatio[c],u=r.maxYArr[h]-r.minYArr[h];let g=r.minYArr[h]+(u-d);i.config.yaxis[e].reversed&&(g=r.maxYArr[h]-(u-d)),a.tooltipPosition.moveYCrosshairs(t-n.top),a.yaxisTooltipText[e].innerHTML=l(g),a.tooltipPosition.moveYAxisTooltip(e)}}}class is{constructor(e,t){this.w=e,this.ctx=t,this.tConfig=e.config.tooltip,this.tooltipUtil=new mt(this),this.tooltipLabels=new es(this),this.tooltipPosition=new yt(this),this.marker=new ts(this),this.intersect=new ss(this),this.axesTooltip=new as(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!e.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now(),this.dimensionUpdateScheduled=!1}setupDimensionCache(){const e=this.w,t=this.getElTooltip();t&&(this.updateDimensionCache(),typeof ResizeObserver<"u"&&!e.globals.resizeObserver&&(e.globals.resizeObserver=new ResizeObserver(()=>{this.dimensionUpdateScheduled||(this.dimensionUpdateScheduled=!0,requestAnimationFrame(()=>{this.updateDimensionCache(),this.dimensionUpdateScheduled=!1}))}),e.globals.resizeObserver.observe(t)))}updateDimensionCache(){const e=this.w,t=this.getElTooltip();if(!t)return;const s=t.getBoundingClientRect();e.globals.dimensionCache.tooltip={width:s.width,height:s.height,lastUpdate:Date.now()}}getCachedDimensions(){const e=this.w;if(e.globals.dimensionCache.tooltip){const s=e.globals.dimensionCache.tooltip;if(Date.now()-s.lastUpdate<1e3)return{ttWidth:s.width,ttHeight:s.height}}this.updateDimensionCache();const t=e.globals.dimensionCache.tooltip;return t?{ttWidth:t.width,ttHeight:t.height}:{ttWidth:0,ttHeight:0}}getElTooltip(e){return e||(e=this),e.w.dom.baseEl?e.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(e){const t=this.w;this.xyRatios=e,this.isXAxisTooltipEnabled=t.config.xaxis.tooltip.enabled&&t.globals.axisCharts,this.yaxisTooltips=t.config.yaxis.map(i=>!!(i.show&&i.tooltip.enabled&&t.globals.axisCharts)),this.allTooltipSeriesGroups=[],t.globals.axisCharts||(this.showTooltipTitle=!1);const s=H.createElementNS("http://www.w3.org/1999/xhtml","div");if(s.classList.add("apexcharts-tooltip"),t.config.tooltip.cssClass&&s.classList.add(t.config.tooltip.cssClass),s.classList.add(`apexcharts-theme-${this.tConfig.theme||"light"}`),t.config.chart.accessibility.enabled&&t.config.chart.accessibility.announcements.enabled&&(s.setAttribute("role","tooltip"),s.setAttribute("aria-live","polite"),s.setAttribute("aria-atomic","true"),s.setAttribute("aria-hidden","true")),t.dom.elWrap.appendChild(s),t.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();const i=new we(this.w,this.ctx);this.xAxisTicksPositions=i.getXAxisTicksPositions()}if((t.globals.comboCharts||this.tConfig.intersect||t.config.chart.type==="rangeBar")&&!this.tConfig.shared&&(this.showOnIntersect=!0),(t.config.markers.size===0||t.globals.markers.largestSize===0)&&this.marker.drawDynamicPoints(this),t.globals.collapsedSeries.length===t.seriesData.series.length)return;this.dataPointsDividedHeight=t.layout.gridHeight/t.globals.dataPoints,this.dataPointsDividedWidth=t.layout.gridWidth/t.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=H.createElementNS("http://www.w3.org/1999/xhtml","div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||t.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,s.appendChild(this.tooltipTitle));let a=t.seriesData.series.length;
vendor: 4,264 bytes, line 34
34(t.globals.xyCharts||t.globals.comboCharts)&&this.tConfig.shared&&(this.showOnIntersect?a=1:a=t.seriesData.series.length),this.legendLabels=t.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(a),this.addSVGEvents(),this.setupDimensionCache()}createTTElements(e){const t=this.w,s=[],a=this.getElTooltip();for(let i=0;i<e;i++){const r=H.createElementNS("http://www.w3.org/1999/xhtml","div");r.classList.add("apexcharts-tooltip-series-group",`apexcharts-tooltip-series-group-${i}`),r.style.order=t.config.tooltip.inverseOrder?e-i:i+1;const o=H.createElementNS("http://www.w3.org/1999/xhtml","span");o.classList.add("apexcharts-tooltip-marker"),t.config.tooltip.fillSeriesColor?o.style.backgroundColor=t.globals.colors[i]:o.style.color=t.globals.colors[i];const l=t.config.markers.shape;let n=l;Array.isArray(l)&&(n=l[i]),o.setAttribute("shape",n),r.appendChild(o);const h=H.createElementNS("http://www.w3.org/1999/xhtml","div");h.classList.add("apexcharts-tooltip-text"),h.style.fontFamily=this.tConfig.style.fontFamily||t.config.chart.fontFamily,h.style.fontSize=this.tConfig.style.fontSize,["y","goals","z"].forEach(c=>{const d=H.createElementNS("http://www.w3.org/1999/xhtml","div");d.classList.add(`apexcharts-tooltip-${c}-group`);const u=H.createElementNS("http://www.w3.org/1999/xhtml","span");u.classList.add(`apexcharts-tooltip-text-${c}-label`),d.appendChild(u);const g=H.createElementNS("http://www.w3.org/1999/xhtml","span");g.classList.add(`apexcharts-tooltip-text-${c}-value`),d.appendChild(g),h.appendChild(d)}),r.appendChild(h),a.appendChild(r),s.push(r)}return s}addSVGEvents(){const e=this.w,t=e.config.chart.type,s=this.getElTooltip(),a=t==="bar"||t==="candlestick"||t==="boxPlot"||t==="rangeBar",i=t==="area"||t==="line"||t==="scatter"||t==="bubble"||t==="radar",r=e.dom.Paper.node,o=this.getElGrid();o&&(this.seriesBound=o.getBoundingClientRect());const l=[],n=[],h={hoverArea:r,elGrid:o,tooltipEl:s,tooltipY:l,tooltipX:n,ttItems:this.ttItems};let c;if(e.globals.axisCharts&&(i?c=e.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):a?c=e.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-rangebar-area"):(t==="heatmap"||t==="treemap")&&(c=e.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap")),c&&c.length))for(let d=0;d<c.length;d++)l.push(c[d].getAttribute("cy")),n.push(c[d].getAttribute("cx"));if(e.globals.xyCharts&&!this.showOnIntersect||e.globals.comboCharts&&!this.showOnIntersect||a&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([r],h);else if(a&&!e.globals.comboCharts||i&&this.showOnIntersect)this.addDatapointEventsListeners(h);else if(!e.globals.axisCharts||t==="heatmap"||t==="treemap"){const d=e.dom.baseEl.querySelectorAll(".apexcharts-series");this.addPathsEventListeners(d,h)}if(this.showOnIntersect){const d=e.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker");d.length>0&&this.addPathsEventListeners(d,h),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(h)}}drawFixedTooltipRect(){const e=this.w,t=this.getElTooltip(),s=t.getBoundingClientRect(),a=s.width+10,i=s.height+10;let r=this.tConfig.fixed.offsetX,o=this.tConfig.fixed.offsetY;const l=this.tConfig.fixed.position.toLowerCase();return l.indexOf("right")>-1&&(r=r+e.globals.svgWidth-a+10),l.indexOf("bottom")>-1&&(o=o+e.globals.svgHeight-i-10),t.style.left=r+"px",t.style.top=o+"px",{x:r,y:o,ttWidth:a,ttHeight:i}}addDatapointEventsListeners(e){const t=this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(t,e)}addPathsEventListeners(e,t){const s=this;for(let a=0;a<e.length;a++){const i={paths:e[a],tooltipEl:t.tooltipEl,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:t.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map(r=>
34e[a].addEventListener(r,s.onSeriesHover.bind(s,i),{capture:!1,passive:!0}))}}onSeriesHover(e,t){const s=Date.now()-this.lastHoverTime;s>=20?this.seriesHover(e,t):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(()=>{this.seriesHover(e,t)},20-s))}seriesHover(e,t){this.lastHoverTime=Date.now();let s=[];const a=this.w;a.config.chart.group&&(s=this.ctx.getGroupedCharts()),!(a.globals.axisCharts&&(a.globals.minX===-1/0&&a.globals.maxX===1/0||a.globals.dataPoints===0))&&(s.length?s.forEach(i=>{const r=this.getElTooltip(i),o={paths:e.paths,tooltipEl:r,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:i.w.globals.tooltip.ttItems};i.w.globals.minX===this.w.globals.minX&&i.w.globals.maxX===this.w.globals.maxX&&i.w.globals.tooltip.seriesHoverByContext({chartCtx:i,ttCtx:i.w.globals.tooltip,opt:o,e:t})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:e,e:t}))}seriesHoverByContext({chartCtx:e,ttCtx:t,opt:s,e:a}){const i=e.w;if(!this.getElTooltip(e))return;const r=t.getCachedDimensions();t.tooltipRect={x:0,y:0,ttWidth:r.ttWidth,ttHeight:r.ttHeight},t.e=a,t.tooltipUtil.hasBars()&&!i.globals.comboCharts&&!t.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new j(e.w).toggleSeriesOnHover(a,a.target.parentNode),i.globals.axisCharts?t.axisChartsTooltips({e:a,opt:s,tooltipRect:t.tooltipRect}):t.nonAxisChartsTooltips({e:a,opt:s,tooltipRect:t.tooltipRect}),t.fixedTooltip&&t.drawFixedTooltipRect()}axisChartsTooltips({e,opt:t}){const s=this.w;let a,i;const r=t.elGrid.getBoundingClientRect(),o=e.type==="touchmove"?e.touches[0].clientX:e.clientX,l=e.type==="touchmove"?e.touches[0].clientY:e.clientY;if(this.clientY=l,this.clientX=o,s.interact.capturedSeriesIndex=-1,s.interact.capturedDataPointIndex=-1,l<r.top||l>r.top+r.height){this.handleMouseOut(t);return}if(Array.isArray(this.tConfig.enabledOnSeries)&&!s.config.tooltip.shared){const u=parseInt(t.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(u)<0){this.handleMouseOut(t);return}}const n=this.getElTooltip(),h=this.getElXCrosshairs();let c=[];s.config.chart.group&&(c=this.ctx.getSyncedCharts());const d=s.globals.xyCharts||s.config.chart.type==="bar"&&!s.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||s.globals.comboCharts&&this.tooltipUtil.hasBars();if(e.type==="mousemove"||e.type==="touchmove"||e.type==="mouseup"){if(s.globals.collapsedSeries.length+s.globals.ancillaryCollapsedSeries.length===s.seriesData.series.length)return;h!==null&&h.classList.add("apexcharts-active");const u=this.yaxisTooltips.filter(g=>g===!0);if(this.ycrosshairs!==null&&u.length&&this.ycrosshairs.classList.add("apexcharts-active"),d&&!this.showOnIntersect||c.length>1)this.handleStickyTooltip(e,o,l,t);else if(s.config.chart.type==="heatmap"||s.config.chart.type==="treemap"){const g=this.intersect.handleHeatTreeTooltip({e,opt:t,x:a,y:i,type:s.config.chart.type});a=g.x,i=g.y,n.style.left=a+"px",n.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e,opt:t}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e,opt:t,x:a,y:i});if(this.yaxisTooltips.length)for(let g=0;g<s.config.yaxis.length;g++)this.axesTooltip.drawYaxisTooltipText(g,l,this.xyRatios);s.dom.baseEl.classList.add("apexcharts-tooltip-active"),t.tooltipEl.classList.add("apexcharts-active"),s.config.chart.accessibility.enabled&&s.config.chart.accessibility.announcements.enabled&&t.tooltipEl.removeAttribute("aria-hidden")}else(e.type==="mouseout"||e.type==="touchend")&&this.handleMouseOut(t)}nonAxisChartsTooltips({e,opt:t,tooltipRect:s}){const a=this.w,i=t.paths.getAttribute("rel"),r=this.getElTooltip(),o=a.dom.elWrap.getBoundingClientRect();if(e.type==="mousemove"||e.type==="touchmove"){a.dom.baseEl.classList.add("apexcharts-tooltip-active"),r.classList.add("apexcharts-active"),a.config.chart.accessibility.enabled&&a.config.chart.accessibility.announcements.enabled&&r.removeAttribute("aria-hidden"),this.tooltipLabels.drawSeriesTexts({ttItems:t.ttItems,i:parseInt(i,10)-1,shared:!1});let l,n;const h=t.paths.querySelector("path[data\\:cx]")||t.paths;if(a.config.tooltip.intersect&&h.hasAttribute("data:cx")&&h.hasAttribute("data:cy")){const c=a.dom.Paper.node.getBoundingClientRect();
34l=c.left-o.left+parseFloat(h.getAttribute("data:cx"))-s.ttWidth/2,n=c.top-o.top+parseFloat(h.getAttribute("data:cy"))-s.ttHeight-10}else l=a.interact.clientX-o.left-s.ttWidth/2,n=a.interact.clientY-o.top-s.ttHeight-10;if(r.style.left=l+"px",r.style.top=n+"px",a.config.legend.tooltipHoverFormatter){const c=a.config.legend.tooltipHoverFormatter,d=i-1,u=this.legendLabels[d].getAttribute("data:default-text"),g=c(u,{seriesIndex:d,dataPointIndex:d,w:a});this.legendLabels[d].innerHTML=g}}else(e.type==="mouseout"||e.type==="touchend")&&(r.classList.remove("apexcharts-active"),a.dom.baseEl.classList.remove("apexcharts-tooltip-active"),a.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach(l=>{const n=l.getAttribute("data:default-text");l.innerHTML=decodeURIComponent(n)}))}handleStickyTooltip(e,t,s,a){const i=this.w,r=this.tooltipUtil.getNearestValues({context:this,hoverArea:a.hoverArea,elGrid:a.elGrid,clientX:t,clientY:s}),o=r.j;let l=r.capturedSeries;i.globals.collapsedSeriesIndices.includes(l)&&(l=null);const n=a.elGrid.getBoundingClientRect();if(r.hoverX<0||r.hoverX>n.width){this.handleMouseOut(a);return}if(l!==null)this.handleStickyCapturedSeries(e,l,a,o);else if(this.tooltipUtil.isXoverlap(o)||i.globals.isBarHorizontal){const h=i.seriesData.series.findIndex((c,d)=>!i.globals.collapsedSeriesIndices.includes(d));this.create(e,this,h,o,a.ttItems)}}handleStickyCapturedSeries(e,t,s,a){const i=this.w;if(!this.tConfig.shared&&i.seriesData.series[t][a]===null){this.handleMouseOut(s);return}if(typeof i.seriesData.series[t][a]<"u")this.tConfig.shared&&this.tooltipUtil.isXoverlap(a)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(e,this,t,a,s.ttItems):this.create(e,this,t,a,s.ttItems,!1);else if(this.tooltipUtil.isXoverlap(a)){const r=i.seriesData.series.findIndex((o,l)=>!i.globals.collapsedSeriesIndices.includes(l));this.create(e,this,r,a,s.ttItems)}}deactivateHoverFilter(){const e=this.w,t=new I(this.w,this.ctx),s=e.dom.Paper.find(".apexcharts-bar-area");for(let a=0;a<s.length;a++)t.pathMouseLeave(s[a])}handleMouseOut(e){const t=this.w,s=this.getElXCrosshairs();if(t.dom.baseEl.classList.remove("apexcharts-tooltip-active"),e.tooltipEl.classList.remove("apexcharts-active"),t.config.chart.accessibility.enabled&&t.config.chart.accessibility.announcements.enabled&&e.tooltipEl.setAttribute("aria-hidden","true"),this.deactivateHoverFilter(),t.config.chart.type!=="bubble"&&this.marker.resetPointsSize(),s!==null&&s.classList.remove("apexcharts-active"),this.ycrosshairs!==null&&this.ycrosshairs.classList.remove("apexcharts-active"),this.isXAxisTooltipEnabled&&this.xaxisTooltip.classList.remove("apexcharts-active"),this.yaxisTooltips.length){this.yaxisTTEls===null&&(this.yaxisTTEls=t.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));for(let a=0;a<this.yaxisTTEls.length;a++)this.yaxisTTEls[a].classList.remove("apexcharts-active")}
34t.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach(a=>{const i=a.getAttribute("data:default-text");a.innerHTML=decodeURIComponent(i)})}markerClick(e,t,s){const a=this.w;typeof a.config.chart.events.markerClick=="function"&&a.config.chart.events.markerClick(e,this.ctx,{seriesIndex:t,dataPointIndex:s,w:a}),this.ctx.events.fireEvent("markerClick",[e,this.ctx,{seriesIndex:t,dataPointIndex:s,w:a}])}create(e,t,s,a,i,r=null){var o,l,n,h,c,d,u,g,p,b,f,m,v,y,w,C;const A=this.w,L=t;e.type==="mouseup"&&this.markerClick(e,s,a),r===null&&(r=this.tConfig.shared);const S=this.tooltipUtil.hasMarkers(s),k=this.tooltipUtil.getElBars(),M=()=>{A.globals.markers.largestSize>0?L.marker.enlargePoints(a):L.tooltipPosition.moveDynamicPointsOnHover(a)};if(A.config.legend.tooltipHoverFormatter){const T=A.config.legend.tooltipHoverFormatter,X=Array.from(this.legendLabels);X.forEach(E=>{const F=E.getAttribute("data:default-text");E.innerHTML=decodeURIComponent(F)});for(let E=0;E<X.length;E++){const F=X[E],Y=parseInt(F.getAttribute("i"),10),B=decodeURIComponent(F.getAttribute("data:default-text")),N=T(B,{seriesIndex:r?Y:s,dataPointIndex:a,w:A});if(r)F.innerHTML=A.globals.collapsedSeriesIndices.indexOf(Y)<0?N:B;else if(F.innerHTML=Y===s?N:B,s===Y)break}}const P=R(R({ttItems:i,i:s,j:a},typeof((h=(n=(l=(o=A.rangeData.seriesRange)==null?void 0:o[s])==null?void 0:l[a])==null?void 0:n.y[0])==null?void 0:h.y1)<"u"&&{y1:(g=(u=(d=(c=A.rangeData.seriesRange)==null?void 0:c[s])==null?void 0:d[a])==null?void 0:u.y[0])==null?void 0:g.y1}),typeof((m=(f=(b=(p=A.rangeData.seriesRange)==null?void 0:p[s])==null?void 0:b[a])==null?void 0:f.y[0])==null?void 0:m.y2)<"u"&&{y2:(C=(w=(y=(v=A.rangeData.seriesRange)==null?void 0:v[s])==null?void 0:y[a])==null?void 0:w.y[0])==null?void 0:C.y2});if(r){if(L.tooltipLabels.drawSeriesTexts(O(R({},P),{shared:this.showOnIntersect?!1:this.tConfig.shared})),S)M();else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(k),this.barSeriesHeight>0)){const T=new I(this.w,this.ctx),X=A.dom.Paper.find(`.apexcharts-bar-area[j='${a}']`);this.deactivateHoverFilter(),L.tooltipUtil.getAllMarkers(!0).length&&!this.barSeriesHeight&&M(),L.tooltipPosition.moveStickyTooltipOverBars(a,s);for(let E=0;E<X.length;E++)T.pathMouseEnter(X[E])}}else L.tooltipLabels.drawSeriesTexts(R({shared:!1},P)),this.tooltipUtil.hasBars()&&L.tooltipPosition.moveStickyTooltipOverBars(a,s),S&&L.tooltipPosition.moveMarkers(s,a)}}let Q=class de{constructor(e){this.node=e,e&&(e.instance=this),this._listeners=[],this._filter=null}attr(e,t){if(typeof e=="string"&&t===void 0)return this.node.getAttribute(e);const s=typeof e=="string"?{[e]:t}:e;for(const a in s){let i=s[a];i===null?this.node.removeAttribute(a):i!==void 0&&(typeof i=="number"&&isNaN(i)&&(i=0),this.node.setAttribute(a,i))}if(this.node.nodeName==="text"&&s.x!=null){const a=this.node.querySelectorAll("tspan[data-newline]");for(let i=0;i<a.length;i++)a[i].setAttribute("x",s.x)}return this}css(e){for(const t in e)this.node.style[t]=e[t];return this}fill(e){return typeof e=="object"?this.attr(e):this.attr("fill",e)}stroke(e){return typeof e=="object"?(e.color!==void 0&&this.attr("stroke",e.color),e.width!==void 0&&this.attr("stroke-width",e.width),e.dasharray!==void 0&&this.attr("stroke-dasharray",e.dasharray),e.linecap!==void 0&&this.attr("stroke-linecap",e.linecap),e.opacity!==void 0&&this.attr("stroke-opacity",e.opacity),this):this.attr("stroke",e)}size(e,t){return this.attr({width:e,height:t})}move(e,t){return this.attr({x:e,y:t})}center(e,t){if(this.node.nodeName==="g"){const s=this.bbox(),a=e-(s.x+s.width/2),i=t-(s.y+s.height/2);return this.attr("transform",`translate(${a}, ${i})`)}return this.attr({cx:e,cy:t})}add(e){return this.node.appendChild(e.node||e),this}addTo(e){return(e.node||e).appendChild(this.node),this}remove(){return this.node.parentNode&&this.node.parentNode.removeChild(this.node),this}clear(){for(;this.node.firstChild;)this.node.removeChild(this.node.firstChild);return this}find(e){return Array.from(this.node.querySelectorAll(e)).map(t=>t.instance||new de(t))}findOne(e){const t=this.node.querySelector(e);return t?t.instance||new de(t):null}on(e,t){const s=e.split(".")[0];return this._listeners.push({event:e,eventType:s,handler:t}),this.node.addEventListener(s,t),this}
34off(e,t){if(!e&&!t)this._listeners.forEach(s=>{this.node.removeEventListener(s.eventType,s.handler)}),this._listeners=[];else if(e&&!t){const s=e.split(".")[0];this._listeners=this._listeners.filter(a=>a.eventType===s?(this.node.removeEventListener(a.eventType,a.handler),!1):!0)}else{const s=e.split(".")[0];this._listeners=this._listeners.filter(a=>a.eventType===s&&a.handler===t?(this.node.removeEventListener(a.eventType,a.handler),!1):!0)}return this}each(e,t){return Array.from(this.node.children).forEach(s=>{const a=s.instance||new de(s);e.call(a),t&&a.each(e,t)}),this}removeClass(e){return e==="*"?this.node.removeAttribute("class"):this.node.classList.remove(e),this}children(){return Array.from(this.node.childNodes).filter(e=>e.nodeType===1).map(e=>e.instance||new de(e))}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(e){const t=H.createElementNS("http://www.w3.org/2000/svg","tspan");return t.textContent=e,this.node.appendChild(t),new de(t)}plot(e){return typeof e=="string"&&this.attr("d",e),this}animate(){throw new Error("Animation module not loaded")}filterWith(){throw new Error("Filter module not loaded")}unfilter(e){return this._filter&&(this.node.removeAttribute("filter"),e&&this._filter.node&&this._filter.node.parentNode&&this._filter.node.parentNode.removeChild(this._filter.node),this._filter=null),this}filterer(){return this._filter}},rs=0;class os extends Q{constructor(e,t,s){const a=t==="radial"?"radialGradient":"linearGradient",i=H.createElementNS(_,a);super(i),this._id="SvgjsGradient"+ ++rs,this.attr("id",this._id),typeof s=="function"&&s(new ls(this));let r=e.node.querySelector("defs");r||(r=H.createElementNS(_,"defs"),e.node.appendChild(r)),r.appendChild(this.node)}stop(e,t,s){const a=H.createElementNS(_,"stop");return a.setAttribute("offset",e),a.setAttribute("stop-color",t),s!==void 0&&a.setAttribute("stop-opacity",s),this.node.appendChild(a),this}from(e,t){return this.attr({x1:e,y1:t})}to(e,t){return this.attr({x2:e,y2:t})}url(){return"url(#"+this._id+")"}toString(){return this.url()}valueOf(){return this.url()}fill(){return this.url()}}class ls{constructor(e){this.gradient=e}stop(e,t,s){return this.gradient.stop(e,t,s),this}}let ns=0;class hs extends Q{constructor(e,t,s,a){const i=H.createElementNS(_,"pattern");if(super(i),this._id="SvgjsPattern"+ ++ns,this.attr({id:this._id,width:t,height:s,patternUnits:"userSpaceOnUse"}),typeof a=="function"){const o=new Ce(this.node);a(o)}let r=e.node.querySelector("defs");r||(r=H.createElementNS(_,"defs"),e.node.appendChild(r)),r.appendChild(this.node)}url(){return"url(#"+this._id+")"}toString(){return this.url()}valueOf(){return this.url()}fill(){return this.url()}}class Ce extends Q{line(e,t,s,a){const i=this._make("line");return e!==void 0&&i.attr({x1:e,y1:t,x2:s,y2:a}),i}rect(e,t){const s=this._make("rect");return e!==void 0&&s.attr({width:e,height:t}),s}circle(e){const t=this._make("circle");return e!==void 0&&t.attr({r:e/2,cx:e/2,cy:e/2}),t}path(e){const t=this._make("path");return e&&t.attr("d",e),t}polygon(e){const t=this._make("polygon");return e&&t.attr("points",e),t}group(){return this._makeContainer("g")}defs(){return this._makeContainer("defs")}plain(e){const t=H.createElementNS(_,"text");t.textContent=e;const s=new Q(t);return this.node.appendChild(t),s}text(e){const t=H.createElementNS(_,"text"),s=new Q(t);return this.node.appendChild(t),typeof e=="function"&&e(new cs(t)),s}image(e,t){const s=H.createElementNS(_,"image");s.setAttributeNS("http://www.w3.org/1999/xlink","href",e);const a=new Q(s);if(this.node.appendChild(s),typeof t=="function"){const i=new Image;i.onload=function(){a.size(i.width,i.height),t.call(a,{width:i.width,height:i.height})},i.src=e}return a}gradient(e,t){return new os(this,e,t)}pattern(e,t,s){return new hs(this,e,t,s)}_make(e){const t=H.createElementNS(_,e);return this.node.appendChild(t),new Q(t)}_makeContainer(e){const t=H.createElementNS(_,e);return this.node.appendChild(t),new Ce(t)}}class cs{constructor(e){this.textNode=e}tspan(e){const t=H.createElementNS(_,"tspan");return t.textContent=e,this.textNode.appendChild(t),new ds(t,this.textNode)}}class ds{constructor(e,t){this.node=e,this.textNode=t}newLine(){return this.node.setAttribute("dy","1.1em"),this.node.dataset.newline="1",this}}let gs=0;class ps extends Q{constructor(){const e=H.createElementNS(_,"filter");super(e),this._id="SvgjsFilter"+ ++gs,this.attr("id",this._id)}size(e,t,s,a){return this.attr({width:e,height:t,x:s,y:a})}}class us{constructor(e){this.filter=e}colorMatrix(e){return this._primitive("feColorMatrix",e)}offset(e){return this._primitive("feOffset",e)}gaussianBlur(e){return this._primitive("feGaussianBlur",e)}flood(e){return this._primitive("feFlood",e)}composite(e){return this._primitive("feComposite",e)}merge(e){const t=H.createElementNS(_,"feMerge");return e.forEach(s=>{const a=H.createElementNS(_,"feMergeNode");a.setAttribute("in",s),t.appendChild(a)}),this.filter.node.appendChild(t),new Q(t)}_primitive(e,t){const s=H.createElementNS(_,e);for(const a in t)s.setAttribute(a,t[a]);return this.filter.node.appendChild(s),new Q(s)}}function xs(x){x.prototype.filterWith=function(e){const t=new ps;this._filter=t;let s=this.node;for(;s&&s.nodeName!=="svg";)s=s.parentNode;if(s){let a=s.querySelector("defs");a||(a=H.createElementNS(_,"defs"),s.insertBefore(a,s.firstChild)),a.appendChild(t.node)}return e(new us(t)),this.attr("filter","url(#"+t._id+")"),this},x.prototype.unfilter=function(e){return this._filter&&(this.node.removeAttribute("filter"),e&&this._filter.node&&this._filter.node.parentNode&&this._filter.node.parentNode.removeChild(this._filter.node),this._filter=null),this},x.prototype.filterer=function(){return this._filter}}/*! 35 * Path morphing for SVG path animations 36 * Based on svg.pathmorphing.js by Ulrich-Matthias Schäfer (MIT License) 37 * Refactored to be standalone (no SVG.js dependency) 38 */function Ue(x){if(!x||typeof x!="string")return[["M",0,0]];const e=[],t=/([MmLlHhVvCcSsQqTtAaZz])\s*/g,s=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;let a;const i=[],r=[];for(;(a=t.exec(x))!==null;)i.push(a[1]),r.push(a.index);for(let o=0;o<i.length;
38o++){const l=r[o]+i[o].length,n=o+1<r.length?r[o+1]:x.length,h=x.substring(l,n),c=[];let d;for(s.lastIndex=0;(d=s.exec(h))!==null;)c.push(parseFloat(d[0]));const u=i[o].toUpperCase();if(u==="Z")e.push(["Z"]);else if(u==="M"||u==="L"||u==="T")for(let g=0;g<c.length;g+=2)e.push([u,c[g],c[g+1]]);else if(u==="H")for(let g=0;g<c.length;g++)e.push([u,c[g]]);else if(u==="V")for(let g=0;g<c.length;g++)e.push([u,c[g]]);else if(u==="C")for(let g=0;g<c.length;g+=6)e.push([u,c[g],c[g+1],c[g+2],c[g+3],c[g+4],c[g+5]]);else if(u==="S"||u==="Q")for(let g=0;g<c.length;g+=4)e.push([u,c[g],c[g+1],c[g+2],c[g+3]]);else if(u==="A")for(let g=0;g<c.length;g+=7)e.push([u,c[g],c[g+1],c[g+2],c[g+3],c[g+4],c[g+5],c[g+6]])}return e.length===0&&e.push(["M",0,0]),e}function qe(x){let e=1/0,t=1/0,s=-1/0,a=-1/0;return x.forEach(i=>{for(let r=1;r<i.length;r+=2)if(r+1<=i.length){const o=i[r],l=i[r+1];typeof o=="number"&&typeof l=="number"&&(o<e&&(e=o),o>s&&(s=o),l<t&&(t=l),l>a&&(a=l))}}),e===1/0?{x:0,y:0,width:0,height:0}:{x:e,y:t,width:s-e,height:a-t}}function fs(x){return x.map(e=>e.join(" ")).join(" ")}function Ze(x){switch(x[0]){case"z":case"Z":x[0]="L",x[1]=this.start[0],x[2]=this.start[1];break;case"H":x[0]="L",x[2]=this.pos[1];break;case"V":x[0]="L",x[2]=x[1],x[1]=this.pos[0];break;case"T":x[0]="Q",x[3]=x[1],x[4]=x[2],x[1]=this.reflection[1],x[2]=this.reflection[0];break;case"S":x[0]="C",x[6]=x[4],x[5]=x[3],x[4]=x[2],x[3]=x[1],x[2]=this.reflection[1],x[1]=this.reflection[0];break}return x}function Ke(x){var e=x.length;return this.pos=[x[e-2],x[e-1]],"SCQT".indexOf(x[0])!=-1&&(this.reflection=[2*this.pos[0]-x[e-4],2*this.pos[1]-x[e-3]]),x}function Je(x){var e=[x];switch(x[0]){case"M":return this.pos=this.start=[x[1],x[2]],e;case"L":x[5]=x[3]=x[1],x[6]=x[4]=x[2],x[1]=this.pos[0],x[2]=this.pos[1];break;case"Q":x[6]=x[4],x[5]=x[3],x[4]=x[4]*1/3+x[2]*2/3,x[3]=x[3]*1/3+x[1]*2/3,x[2]=this.pos[1]*1/3+x[2]*2/3,x[1]=this.pos[0]*1/3+x[1]*2/3;break;case"A":e=bs(this.pos,x),x=e[0];break}return x[0]="C",this.pos=[x[5],x[6]],this.reflection=[2*x[5]-x[3],2*x[6]-x[4]],e}function Qe(x,e){if(e===!1)return!1;for(var t=e,s=x.length;t<s;++t)if(x[t][0]=="M")return t;return!1}function bs(x,e){var t=Math.abs(e[1]),s=Math.abs(e[2]),a=e[3]%360,i=e[4],r=e[5],o=e[6],l=e[7],n=new ee(x[0],x[1]),h=new ee(o,l),c,d,u,g,p,b,f,m,v,y,w,C,A,L,S,k,M,P,T,X,E,F,Y=[],B,N,G,V;if(t===0||s===0||n.x===h.x&&n.y===h.y)return[["C",n.x,n.y,h.x,h.y,h.x,h.y]];for(c=new ee((n.x-h.x)/2,(n.y-h.y)/2).transform(new ne().rotate(a)),d=c.x*c.x/(t*t)+c.y*c.y/(s*s),d>1&&(d=Math.sqrt(d),t=d*t,s=d*s),u=new ne().rotate(a).scale(1/t,1/s).rotate(-a),n=n.transform(u),h=h.transform(u),g=[h.x-n.x,h.y-n.y],b=g[0]*g[0]+g[1]*g[1],p=Math.sqrt(b),g[0]/=p,g[1]/=p,f=b<4?Math.sqrt(1-b/4):0,i===r&&(f*=-1),m=new ee((h.x+n.x)/2+f*-g[1],(h.y+n.y)/2+f*g[0]),v=new ee(n.x-m.x,n.y-m.y),y=new ee(h.x-m.x,h.y-m.y),w=Math.acos(v.x/Math.sqrt(v.x*v.x+v.y*v.y)),v.y<0&&(w*=-1),C=Math.acos(y.x/Math.sqrt(y.x*y.x+y.y*y.y)),y.y<0&&(C*=-1),r&&w>C&&(C+=2*Math.PI),!r&&w<C&&(C-=2*Math.PI),L=Math.ceil(Math.abs(w-C)*2/Math.PI),k=[],M=w,A=(C-w)/L,S=4*Math.tan(A/4)/3,E=0;E<=L;E++)T=Math.cos(M),P=Math.sin(M),X=new ee(m.x+T,m.y+P),k[E]=[new ee(X.x+S*P,X.y-S*T),X,new ee(X.x-S*P,X.y+S*T)],M+=A;for(k[0][0]=k[0][1].clone(),k[k.length-1][2]=k[k.length-1][1].clone(),u=new ne().rotate(a).scale(t,s).rotate(-a),E=0,F=k.length;E<F;E++)k[E][0]=k[E][0].transform(u),k[E][1]=k[E][1].transform(u),k[E][2]=k[E][2].transform(u);for(E=1,F=k.length;E<F;E++)X=k[E-1][2],B=X.x,N=X.y,X=k[E][0],G=X.x,V=X.y,X=k[E][1],o=X.x,l=X.y,Y.push(["C",B,N,G,V,o,l]);return Y}function ms(x,e,t,s,a,i){for(var r=x.slice(e,t||void 0),o=s.slice(a,i||void 0),l=0,n={pos:[0,0],start:[0,0]},h={pos:[0,0],start:[0,0]};r[l]=Ze.call(n,r[l]),o[l]=Ze.call(h,o[l]),r[l][0]!=o[l][0]||r[l][0]=="M"||r[l][0]=="A"&&(r[l][4]!=o[l][4]||r[l][5]!=o[l][5])?(Array.prototype.splice.apply(r,[l,1].concat(Je.call(n,r[l]))),Array.prototype.splice.apply(o,[l,1].concat(Je.call(h,o[l])))):(r[l]=Ke.call(n,r[l]),o[l]=Ke.call(h,o[l])),!(++l==r.length&&l==o.length);)l==r.length&&r.push(["C",n.pos[0],n.pos[1],n.pos[0],n.pos[1],n.pos[0],n.pos[1]]),l==o.length&&o.push(["C",h.pos[0],h.pos[1],h.pos[0],h.pos[1],h.pos[0],h.pos[1]]);return{start:r,dest:o}}function ys(x,e){for(var t=Ue(x),s=Ue(e),a=0,i=0,r=!1,o=!1,l;!(a===!1&&i===!1);){if(r=Qe(t,a===!1?!1:a+1),o=Qe(s,i===!1?!1:i+1),a===!1){const n=qe(l.start);n.height==0||n.width==0?a=t.push(t[0])-1:a=t.push(["M",n.x+n.width/2,n.y+n.height/2])-1}if(i===!1){const n=qe(l.dest);n.height==0||n.width==0?i=s.push(s[0])-1:i=s.push(["M",n.x+n.width/2,n.y+n.height/2])-1}l=ms(t,a,r,s,i,o),t=t.slice(0,a).concat(l.start,r===!1?[]:t.slice(r)),s=s.slice(0,i).concat(l.dest,o===!1?[]:s.slice(o)),a=r===!1?!1:a+l.start.length,i=o===!1?!1:i+l.dest.length}return{start:t,dest:s}}function ws(x,e){var t=ys(x,e),s=t.start,a=t.dest;return function(i){var r=s.map(function(o,l){return a[l].map(function(n,h){return h===0?n:o[h]+(a[l][h]-o[h])*i})});return fs(r)}}function vs(x){return-Math.cos(x*Math.PI)/2+.5}function et(x){if(!x||typeof x!="string")return null;if(x[0]==="#"){let t=x.slice(1);t.length===3&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]);const s=parseInt(t,16);return[s>>16&255,s>>8&255,s&255,1]}const e=x.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/);return e?[+e[1],+e[2],+e[3],e[4]!==void 0?+e[4]:1]:null}function Cs(x,e,t){return`rgba(${Math.round(x[0]+(e[0]-x[0])*t)},${Math.round(x[1]+(e[1]-x[1])*t)},${Math.round(x[2]+(e[2]-x[2])*t)},${x[3]+(e[3]-x[3])*t})`}class Ge{constructor(e,t,s){this.el=e,this.duration=t??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(e){return this._attrTarget=e,this._schedule(),this}plot(e){return this._plotTarget=e,this._schedule(),this}after(e){return this._afterCb=e,this._schedule(),this}during(e){return this._duringCb=e,this._schedule(),this}animate(e,t){const s=new Ge(this.el,e,t);return this._next=s,s._root=this._root||this,s}
38_schedule(){const e=this._root||this;e._scheduled||(e._scheduled=!0,queueMicrotask(()=>e._executeChain()))}_executeChain(){const e=[];let t=this;for(;t;)e.push(t),t=t._next;let s=0;e.forEach(a=>{s+=a.delay,a._execute(s),s+=a.duration})}_execute(e){const t=this.el,s=this.duration;if(s<=1){const i=()=>{this._attrTarget&&t.attr(this._attrTarget),this._plotTarget&&t.plot(this._plotTarget),this._afterCb&&this._afterCb.call(t)};e>0?setTimeout(i,e):i();return}const a=()=>{const i={},r={},o={};if(this._attrTarget)for(const c of Object.keys(this._attrTarget)){const d=t.attr(c);i[c]=d;const u=et(d),g=et(String(this._attrTarget[c]));u&&g&&(r[c]=u,o[c]=g)}let l=null;if(this._plotTarget){const c=t.attr("d")||"";try{l=ws(c,this._plotTarget)}catch{l=null}}const n=performance.now(),h=c=>{const d=c-n,u=Math.min(d/s,1),g=vs(u);if(this._attrTarget)if(u>=1)t.attr(this._attrTarget);else{const p={};for(const b of Object.keys(this._attrTarget))if(r[b]&&o[b])p[b]=Cs(r[b],o[b],g);else{const f=parseFloat(i[b]),m=parseFloat(this._attrTarget[b]);!isNaN(f)&&!isNaN(m)&&(p[b]=f+(m-f)*g)}t.attr(p)}l&&u<1&&t.attr("d",l(g)),this._duringCb&&this._duringCb(g),u<1?H.requestAnimationFrame(h):(this._plotTarget&&t.attr("d",this._plotTarget),this._afterCb&&this._afterCb.call(t))};H.requestAnimationFrame(h)};e>0?setTimeout(a,e):a()}}function As(x){x.prototype.animate=function(e,t){return new Ge(this,e,t)}}function Ss(x){x.prototype.draggable=function(e){if(e===!1)return this._dragCleanup&&(this._dragCleanup(),this._dragCleanup=null),this;const t=this,s=e||{},a=i=>{if(i.button&&i.button!==0)return;i.stopPropagation();const r=i.type==="touchstart"?i.touches[0]:i,o=t.node,l=parseFloat(o.getAttribute("x"))||0,n=parseFloat(o.getAttribute("y"))||0,h=r.clientX,c=r.clientY,d=o.ownerSVGElement;let u=null;d&&(u=d.getScreenCTM());const g=b=>{const f=b.type==="touchmove"?b.touches[0]:b;let m=f.clientX-h,v=f.clientY-c;u&&(m=m/u.a,v=v/u.d);let y=l+m,w=n+v;const C=parseFloat(o.getAttribute("width"))||0,A=parseFloat(o.getAttribute("height"))||0;s.minX!==void 0&&y<s.minX&&(y=s.minX),s.minY!==void 0&&w<s.minY&&(w=s.minY),s.maxX!==void 0&&y+C>s.maxX&&(y=s.maxX-C),s.maxY!==void 0&&w+A>s.maxY&&(w=s.maxY-A);const L={x:y,y:w,w:C,h:A,x2:y+C,y2:w+A},S=new CustomEvent("dragmove",{detail:{handler:{move:function(k,M){o.setAttribute("x",k),o.setAttribute("y",M)}},box:L}});o.dispatchEvent(S)},p=()=>{z.isBrowser()&&(document.removeEventListener("mousemove",g),document.removeEventListener("touchmove",g),document.removeEventListener("mouseup",p),document.removeEventListener("touchend",p))};z.isBrowser()&&(document.addEventListener("mousemove",g),document.addEventListener("touchmove",g),document.addEventListener("mouseup",p),document.addEventListener("touchend",p))};return t.node.addEventListener("mousedown",a),t.node.addEventListener("touchstart",a),t._dragCleanup=()=>{t.node.removeEventListener("mousedown",a),t.node.removeEventListener("touchstart",a)},t}}function ks(x){x.prototype.select=function(e){if(e===!1)return this._selectCleanup&&(this._selectCleanup(),this._selectCleanup=null),this;const t=this,{createHandle:s,updateHandle:a}=e,i=document.createElementNS(_,"g");i.setAttribute("class","svg_select_points");const r=t.node.parentNode;r&&r.appendChild(i);const o={},l=["t","b","l","r","lt","rt","lb","rb"];l.forEach((h,c)=>{const d=new Ce(document.createElementNS(_,"g"));i.appendChild(d.node);const u=s(d,[0,0],c,[],h);o[h]={group:d,handle:u}});const n=()=>{const h=parseFloat(t.attr("x"))||0,c=parseFloat(t.attr("y"))||0,d=parseFloat(t.attr("width"))||0,u=parseFloat(t.attr("height"))||0,g=t.node.getAttribute("transform");g?i.setAttribute("transform",g):i.removeAttribute("transform");const p={t:[h+d/2,c],b:[h+d/2,c+u],l:[h,c+u/2],r:[h+d,c+u/2],lt:[h,c],rt:[h+d,c],lb:[h,c+u],rb:[h+d,c+u]};l.forEach(b=>{o[b]&&p[b]&&a(o[b].group,p[b])})};return n(),t._selectHandles=i,t._selectHandlesMap=o,t._updateSelectPositions=n,t._selectCleanup=()=>{i.parentNode&&i.parentNode.removeChild(i),t._selectHandles=null,t._selectHandlesMap=null,t._updateSelectPositions=null},t},x.prototype.resize=function(e){if(e===!1)return this._resizeCleanup&&(this._resizeCleanup(),this._resizeCleanup=null),this;const t=this,s=t._selectHandlesMap;if(!s)return t;const a=[],i=r=>{const o=s[r];if(!o||!o.group||!o.group.node)return;const l=o.group.node,n=h=>{if(h.button&&h.button!==0)return;h.stopPropagation();const c=(h.type==="touchstart"?h.touches[0]:h).clientX,d=t.node.ownerSVGElement;let u=null;d&&(u=d.getScreenCTM());const g=parseFloat(t.attr("x"))||0,p=parseFloat(t.attr("width"))||0,b=m=>{let v=(m.type==="touchmove"?m.touches[0]:m).clientX-c;u&&(v=v/u.a);let y=g,w=p;r==="l"?(y=g+v,w=p-v):r==="r"&&(w=p+v),w<0&&(w=0),t.attr({x:y,width:w}),t._updateSelectPositions&&t._updateSelectPositions();const C=new CustomEvent("resize",{detail:{el:t}});t.node.dispatchEvent(C)},f=()=>{z.isBrowser()&&(document.removeEventListener("mousemove",b),document.removeEventListener("touchmove",b),document.removeEventListener("mouseup",f),document.removeEventListener("touchend",f));const m=new CustomEvent("resize",{detail:{el:t}});t.node.dispatchEvent(m)};z.isBrowser()&&(document.addEventListener("mousemove",b),document.addEventListener("touchmove",b),document.addEventListener("mouseup",f),document.addEventListener("touchend",f))};l.addEventListener("mousedown",n),l.addEventListener("touchstart",n),a.push(()=>{l.removeEventListener("mousedown",n),l.removeEventListener("touchstart",n)})};return i("l"),i("r"),t._resizeCleanup=()=>{a.forEach(r=>r())},t}}xs(Q);
38As(Q);Ss(Q);ks(Q);function Pe(){const x=H.createElementNS(_,"svg"),e=new Ce(x);return e.attr({xmlns:_}),e}Pe.xlink="http://www.w3.org/1999/xlink";z.isBrowser()&&typeof window.SVG>"u"&&(window.SVG=Pe);z.isBrowser()?(typeof window.SVG>"u"&&(window.SVG=Pe),typeof window.Apex>"u"&&(window.Apex={})):typeof global<"u"&&(typeof global.Apex>"u"&&(global.Apex={}),typeof global.SVG>"u"&&(global.SVG=Pe));const wt=class Be{static registerFeatures(e){for(const[t,s]of Object.entries(e))Be._featureRegistry.set(t,s)}constructor(e){this.ctx=e,this.w=e.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 xe(this.w,this.ctx),this.ctx.axes=new Nt(this.w,this.ctx),this.ctx.core=new Jt(this.ctx.el,this.w,this.ctx),this.ctx.config=new ye({}),this.ctx.data=new _e(this.w,{resetGlobals:()=>this.ctx.core.resetGlobals(),isMultipleY:()=>this.ctx.core.isMultipleY()}),this.ctx.grid=new pt(this.w,this.ctx),this.ctx.graphics=new I(this.w,this.ctx),this.ctx.coreUtils=new $(this.w),this.ctx.crosshairs=new Ye(this.w),this.ctx.events=new Bt(this.w,this.ctx),this.ctx.fill=new te(this.w),this.ctx.localization=new Ot(this.w),this.ctx.options=new le,this.ctx.responsive=new Wt(this.w),this.ctx.series=new j(this.w,{toggleDataSeries:(...t)=>{var s;return(s=this.ctx.legend)==null?void 0:s.legendHelpers.toggleDataSeries(...t)},revertDefaultAxisMinMax:()=>this.ctx.updateHelpers.revertDefaultAxisMinMax(),updateSeries:(...t)=>this.ctx.updateHelpers._updateSeries(...t)}),this.ctx.theme=new _t(this.w),this.ctx.formatters=new ve(this.w),this.ctx.titleSubtitle=new Gt(this.w),this.ctx.dimensions=new Le(this.w,this.ctx),this.ctx.updateHelpers=new Qt(this.w,this.ctx);const e=new is(this.w,this.ctx);this.w.globals.tooltip=e,Object.defineProperty(this.ctx,"tooltip",{get(){return this.w.globals.tooltip},configurable:!0}),this._initOptionalModules()}_initOptionalModules(){const e=Be._featureRegistry,t=this.w,s=this.ctx,a=e.get("exports");s.exports=a?new a(t,s):null;const i=e.get("legend");s.legend=i?new i(t,s):null;const r=e.get("toolbar");Object.defineProperty(s,"toolbar",{get(){var n;return!this._toolbar&&r&&(this._toolbar=new r(t,this)),(n=this._toolbar)!=null?n:null},configurable:!0});const o=e.get("zoomPanSelection");Object.defineProperty(s,"zoomPanSelection",{get(){var n;return!this._zoomPanSelection&&o&&(this._zoomPanSelection=new o(t,this)),(n=this._zoomPanSelection)!=null?n:null},configurable:!0});const l=e.get("keyboardNavigation");Object.defineProperty(s,"keyboardNavigation",{get(){var n;return!this._keyboardNavigation&&l&&(this._keyboardNavigation=new l(t,this)),(n=this._keyboardNavigation)!=null?n:null},configurable:!0})}};Tt(wt,"_featureRegistry",new Map);let Se=wt;class tt{constructor(e){this.ctx=e,this.w=e.w}clear({isUpdating:e}){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),bt.invalidateAll(this.w),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:e})}killSVG(e){e.each(function(){this.removeClass("*"),this.off()},!0),e.clear()}clearDomElements({isUpdating:e}){const t=this.w.dom;if(z.isBrowser()){const s=t.Paper.node;s.parentNode&&s.parentNode.parentNode&&!e&&(s.parentNode.parentNode.style.minHeight="unset");const a=t.baseEl;if(a&&this.ctx.eventList.forEach(i=>
38{a.removeEventListener(i,this.ctx.events.documentEvent)}),this.ctx.el!==null)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(t.Paper),t.Paper.remove()}t.elWrap=null,t.elGraphical=null,t.elLegendWrap=null,t.elLegendForeign=null,t.baseEl=null,t.elGridRect=null,t.elGridRectMask=null,t.elGridRectBarMask=null,t.elGridRectMarkerMask=null,t.elForecastMask=null,t.elNonForecastMask=null,t.elDefs=null}}const Oe=new WeakMap;function Ds(x,e){if(z.isSSR())return;let t=!1;if(x.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){const a=x.getBoundingClientRect();(x.style.display==="none"||a.width===0)&&(t=!0)}const s=new ResizeObserver(a=>{t&&e.call(x,a),t=!0});x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(x.children).forEach(a=>s.observe(a)):s.observe(x),Oe.set(e,s)}function Ls(x,e){if(z.isSSR())return;const t=Oe.get(e);t&&(t.disconnect(),Oe.delete(e))}const Ps=`@keyframes opaque { 39 0% { 40 opacity: 0 41 } 42 43 to { 44 opacity: 1 45 } 46} 47 48@keyframes resizeanim { 49 50 0%, 51 to { 52 opacity: 0 53 } 54} 55 56.apexcharts-canvas { 57 position: relative; 58 direction: ltr !important; 59 user-select: none 60} 61 62.apexcharts-canvas ::-webkit-scrollbar {
63 -webkit-appearance: none; 64 width: 6px 65} 66 67.apexcharts-canvas ::-webkit-scrollbar-thumb { 68 border-radius: 4px; 69 background-color: rgba(0, 0, 0, .5); 70 box-shadow: 0 0 1px rgba(255, 255, 255, .5); 71 -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5) 72} 73 74.apexcharts-inner { 75 position: relative 76} 77 78.apexcharts-text tspan { 79 font-family: inherit 80} 81 82rect.legend-mouseover-inactive, 83.legend-mouseover-inactive rect, 84.legend-mouseover-inactive path, 85.legend-mouseover-inactive circle, 86.legend-mouseover-inactive line, 87.legend-mouseover-inactive text.apexcharts-yaxis-title-text, 88.legend-mouseover-inactive text.apexcharts-yaxis-label { 89 transition: .15s ease all; 90 opacity: .2 91} 92 93.apexcharts-legend-text { 94 padding-left: 15px; 95 margin-left: -15px; 96} 97 98.apexcharts-legend-series[role="button"]:focus { 99 outline: 2px solid #008FFB; 100 outline-offset: 2px; 101} 102 103.apexcharts-legend-series[role="button"]:focus:not(:focus-visible) { 104 outline: none; 105} 106 107.apexcharts-legend-series[role="button"]:focus-visible { 108 outline: 2px solid #008FFB; 109 outline-offset: 2px; 110} 111 112.apexcharts-series-collapsed { 113 opacity: 0 114} 115 116/* Keyboard navigation focus indicator on SVG data elements. 117 SVG elements don't support CSS outline, so we use stroke. */ 118.apexcharts-bar-area.apexcharts-keyboard-focused, 119.apexcharts-candlestick-area.apexcharts-keyboard-focused, 120.apexcharts-boxPlot-area.apexcharts-keyboard-focused, 121.apexcharts-rangebar-area.apexcharts-keyboard-focused, 122.apexcharts-pie-area.apexcharts-keyboard-focused, 123.apexcharts-heatmap-rect.apexcharts-keyboard-focused, 124.apexcharts-treemap-rect.apexcharts-keyboard-focused { 125 stroke: #008FFB; 126 stroke-width: 2; 127 stroke-opacity: 1; 128} 129 130.apexcharts-tooltip { 131 border-radius: 5px; 132 box-shadow: 2px 2px 6px -4px #999; 133 cursor: default; 134 font-size: 14px; 135 left: 62px; 136 opacity: 0; 137 pointer-events: none; 138 position: absolute; 139 top: 20px; 140 display: flex; 141 flex-direction: column; 142 overflow: hidden; 143 white-space: nowrap; 144 z-index: 12; 145 transition: .15s ease all 146} 147 148.apexcharts-tooltip.apexcharts-active { 149 opacity: 1; 150 transition: .15s ease all 151} 152 153.apexcharts-tooltip.apexcharts-theme-light { 154 border: 1px solid #e3e3e3; 155 background: rgba(255, 255, 255, .96) 156} 157 158.apexcharts-tooltip.apexcharts-theme-dark { 159 color: #fff; 160 background: rgba(30, 30, 30, .8) 161} 162 163.apexcharts-tooltip * { 164 font-family: inherit 165} 166 167.apexcharts-tooltip-title { 168 padding: 6px; 169 font-size: 15px; 170 margin-bottom: 4px 171} 172 173.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title { 174 background: #eceff1; 175 border-bottom: 1px solid #ddd 176} 177 178.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title { 179 background: rgba(0, 0, 0, .7); 180 border-bottom: 1px solid #333 181} 182 183.apexcharts-tooltip-text-goals-value, 184.apexcharts-tooltip-text-y-value, 185.apexcharts-tooltip-text-z-value { 186 display: inline-block; 187 margin-left: 5px; 188 font-weight: 600 189} 190 191.apexcharts-tooltip-text-goals-label:empty, 192.apexcharts-tooltip-text-goals-value:empty, 193.apexcharts-tooltip-text-y-label:empty, 194.apexcharts-tooltip-text-y-value:empty, 195.apexcharts-tooltip-text-z-value:empty, 196.apexcharts-tooltip-title:empty { 197 display: none 198} 199 200.apexcharts-tooltip-text-goals-label, 201.apexcharts-tooltip-text-goals-value { 202 padding: 6px 0 5px 203} 204 205.apexcharts-tooltip-goals-group, 206.apexcharts-tooltip-text-goals-label, 207.apexcharts-tooltip-text-goals-value { 208 display: flex 209} 210 211.apexcharts-tooltip-text-goals-label:not(:empty), 212.apexcharts-tooltip-text-goals-value:not(:empty) { 213 margin-top: -6px 214} 215 216.apexcharts-tooltip-marker { 217 display: inline-block; 218 position: relative; 219 width: 16px; 220 height: 16px; 221 font-size: 16px; 222 line-height: 16px; 223 margin-right: 4px; 224 text-align: center; 225 vertical-align: middle; 226 color: inherit; 227} 228 229.apexcharts-tooltip-marker::before { 230 content: ""; 231 display: inline-block; 232 width: 100%; 233 text-align: center; 234 color: currentcolor; 235 text-rendering: optimizeLegibility; 236 -webkit-font-smoothing: antialiased; 237 font-size: 26px; 238 font-family: Arial, Helvetica, sans-serif; 239 line-height: 14px; 240 font-weight: 900; 241} 242 243.apexcharts-tooltip-marker[shape="circle"]::before { 244 content: "\\25CF"; 245} 246 247.apexcharts-tooltip-marker[shape="square"]::before, 248.apexcharts-tooltip-marker[shape="rect"]::before { 249 content: "\\25A0"; 250 transform: translate(-1px, -2px); 251} 252 253.apexcharts-tooltip-marker[shape="line"]::before { 254 content: "\\2500"; 255} 256 257.apexcharts-tooltip-marker[shape="diamond"]::before { 258 content: "\\25C6"; 259 font-size: 28px; 260} 261 262.apexcharts-tooltip-marker[shape="triangle"]::before { 263 content: "\\25B2"; 264 font-size: 22px; 265} 266 267.apexcharts-tooltip-marker[shape="cross"]::before { 268 content: "\\2715"; 269 font-size: 18px; 270} 271 272.apexcharts-tooltip-marker[shape="plus"]::before { 273 content: "\\2715"; 274 transform: rotate(45deg) translate(-1px, -1px); 275 font-size: 18px; 276} 277 278.apexcharts-tooltip-marker[shape="star"]::before { 279 content: "\\2605"; 280 font-size: 18px; 281} 282 283.apexcharts-tooltip-marker[shape="sparkle"]::before { 284 content: "\\2726"; 285 font-size: 20px; 286} 287 288.apexcharts-tooltip-series-group { 289 padding: 0 10px; 290 display: none; 291 text-align: left; 292 justify-content: left; 293 align-items: center 294} 295 296.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker { 297 opacity: 1 298} 299 300.apexcharts-tooltip-series-group.apexcharts-active, 301.apexcharts-tooltip-series-group:last-child { 302 padding-bottom: 4px 303} 304 305.apexcharts-tooltip-y-group { 306 padding: 6px 0 5px 307} 308 309.apexcharts-custom-tooltip, 310.apexcharts-tooltip-box { 311 padding: 4px 8px 312} 313 314.apexcharts-tooltip-boxPlot { 315 display: flex; 316 flex-direction: column-reverse 317} 318 319.apexcharts-tooltip-box>div { 320 margin: 4px 0 321} 322 323.apexcharts-tooltip-box span.value { 324 font-weight: 700 325} 326 327.apexcharts-tooltip-rangebar { 328 padding: 5px 8px 329} 330 331.apexcharts-tooltip-rangebar .category { 332 font-weight: 600; 333 color: #777 334} 335 336.apexcharts-tooltip-rangebar .series-name { 337 font-weight: 700; 338 display: block; 339 margin-bottom: 5px 340} 341 342.apexcharts-xaxistooltip, 343.apexcharts-yaxistooltip { 344 opacity: 0; 345 pointer-events: none; 346 color: #373d3f; 347 font-size: 13px; 348 text-align: center; 349 border-radius: 2px; 350 position: absolute; 351 z-index: 10; 352 background: #eceff1; 353 border: 1px solid #90a4ae 354} 355 356.apexcharts-xaxistooltip { 357 padding: 9px 10px; 358 transition: .15s ease all 359} 360 361.apexcharts-xaxistooltip.apexcharts-theme-dark { 362 background: rgba(0, 0, 0, .7); 363 border: 1px solid rgba(0, 0, 0, .5); 364 color: #fff 365} 366 367.apexcharts-xaxistooltip:after, 368.apexcharts-xaxistooltip:before { 369 left: 50%; 370 border: solid transparent; 371 content: " "; 372 height: 0; 373 width: 0; 374 position: absolute; 375 pointer-events: none 376} 377 378.apexcharts-xaxistooltip:after { 379 border-color: transparent; 380 border-width: 6px; 381 margin-left: -6px 382} 383 384.apexcharts-xaxistooltip:before { 385 border-color: transparent; 386 border-width: 7px; 387 margin-left: -7px 388} 389 390.apexcharts-xaxistooltip-bottom:after, 391.apexcharts-xaxistooltip-bottom:before { 392 bottom: 100% 393} 394 395.apexcharts-xaxistooltip-top:after, 396.apexcharts-xaxistooltip-top:before { 397 top: 100% 398} 399 400.apexcharts-xaxistooltip-bottom:after { 401 border-bottom-color: #eceff1 402} 403 404.apexcharts-xaxistooltip-bottom:before { 405 border-bottom-color: #90a4ae 406} 407 408.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after, 409.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before { 410 border-bottom-color: rgba(0, 0, 0, .5) 411} 412 413.apexcharts-xaxistooltip-top:after { 414 border-top-color: #eceff1 415} 416 417.apexcharts-xaxistooltip-top:before { 418 border-top-color: #90a4ae 419} 420 421.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after, 422.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before { 423 border-top-color: rgba(0, 0, 0, .5) 424} 425 426.apexcharts-xaxistooltip.apexcharts-active { 427 opacity: 1; 428 transition: .15s ease all 429} 430 431.apexcharts-yaxistooltip { 432 padding: 4px 10px 433} 434 435.apexcharts-yaxistooltip.apexcharts-theme-dark { 436 background: rgba(0, 0, 0, .7); 437 border: 1px solid rgba(0, 0, 0, .5); 438 color: #fff 439} 440 441.apexcharts-yaxistooltip:after, 442.apexcharts-yaxistooltip:before { 443 top: 50%; 444 border: solid transparent; 445 content: " "; 446 height: 0; 447 width: 0; 448 position: absolute; 449 pointer-events: none 450} 451 452.apexcharts-yaxistooltip:after { 453 border-color: transparent; 454 border-width: 6px; 455 margin-top: -6px 456} 457 458.apexcharts-yaxistooltip:before { 459 border-color: transparent; 460 border-width: 7px; 461 margin-top: -7px 462} 463 464.apexcharts-yaxistooltip-left:after, 465.apexcharts-yaxistooltip-left:before { 466 left: 100% 467} 468 469.apexcharts-yaxistooltip-right:after, 470.apexcharts-yaxistooltip-right:before { 471 right: 100% 472}
472 473 474.apexcharts-yaxistooltip-left:after { 475 border-left-color: #eceff1 476} 477 478.apexcharts-yaxistooltip-left:before { 479 border-left-color: #90a4ae 480} 481 482.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after, 483.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before { 484 border-left-color: rgba(0, 0, 0, .5) 485} 486 487.apexcharts-yaxistooltip-right:after { 488 border-right-color: #eceff1 489} 490 491.apexcharts-yaxistooltip-right:before { 492 border-right-color: #90a4ae 493} 494 495.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after, 496.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before { 497 border-right-color: rgba(0, 0, 0, .5) 498} 499 500.apexcharts-yaxistooltip.apexcharts-active { 501 opacity: 1 502} 503 504.apexcharts-yaxistooltip-hidden { 505 display: none 506} 507 508.apexcharts-xcrosshairs, 509.apexcharts-ycrosshairs { 510 pointer-events: none; 511 opacity: 0; 512 transition: .15s ease all 513} 514 515.apexcharts-xcrosshairs.apexcharts-active, 516.apexcharts-ycrosshairs.apexcharts-active { 517 opacity: 1; 518 transition: .15s ease all 519} 520 521.apexcharts-ycrosshairs-hidden { 522 opacity: 0 523} 524 525.apexcharts-selection-rect { 526 cursor: move 527} 528 529.svg_select_shape { 530 stroke-width: 1; 531 stroke-dasharray: 10 10; 532 stroke: black; 533 stroke-opacity: 0.1; 534 pointer-events: none; 535 fill: none; 536} 537 538.svg_select_handle { 539 stroke-width: 3; 540 stroke: black; 541 fill: none; 542} 543 544.svg_select_handle_r { 545 cursor: e-resize; 546} 547 548.svg_select_handle_l { 549 cursor: w-resize; 550} 551 552.apexcharts-svg.apexcharts-zoomable.hovering-zoom { 553 cursor: crosshair 554} 555 556.apexcharts-svg.apexcharts-zoomable.hovering-pan { 557 cursor: move 558} 559 560.apexcharts-menu-icon, 561.apexcharts-pan-icon, 562.apexcharts-reset-icon, 563.apexcharts-selection-icon, 564.apexcharts-toolbar-custom-icon, 565.apexcharts-zoom-icon, 566.apexcharts-zoomin-icon, 567.apexcharts-zoomout-icon { 568 cursor: pointer; 569 width: 20px; 570 height: 20px; 571 line-height: 24px; 572 color: #6e8192; 573 text-align: center 574} 575 576.apexcharts-menu-icon svg, 577.apexcharts-reset-icon svg, 578.apexcharts-zoom-icon svg, 579.apexcharts-zoomin-icon svg, 580.apexcharts-zoomout-icon svg { 581 fill: #6e8192 582} 583 584.apexcharts-selection-icon svg { 585 fill: #444; 586 transform: scale(.76) 587} 588 589.apexcharts-theme-dark .apexcharts-menu-icon svg, 590.apexcharts-theme-dark .apexcharts-pan-icon svg, 591.apexcharts-theme-dark .apexcharts-reset-icon svg, 592.apexcharts-theme-dark .apexcharts-selection-icon svg, 593.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg, 594.apexcharts-theme-dark .apexcharts-zoom-icon svg, 595.apexcharts-theme-dark .apexcharts-zoomin-icon svg, 596.apexcharts-theme-dark .apexcharts-zoomout-icon svg { 597 fill: #f3f4f5 598} 599 600.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg, 601.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg, 602.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg { 603 fill: #008ffb 604} 605 606.apexcharts-theme-light .apexcharts-menu-icon:hover svg, 607.apexcharts-theme-light .apexcharts-reset-icon:hover svg, 608.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg, 609.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg, 610.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg, 611.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg { 612 fill: #333 613} 614 615.apexcharts-menu-icon, 616.apexcharts-selection-icon { 617 position: relative 618} 619 620.apexcharts-reset-icon { 621 margin-left: 5px 622} 623 624.apexcharts-menu-icon, 625.apexcharts-reset-icon, 626.apexcharts-zoom-icon { 627 transform: scale(.85) 628} 629 630.apexcharts-zoomin-icon, 631.apexcharts-zoomout-icon { 632 transform: scale(.7) 633} 634 635.apexcharts-zoomout-icon { 636 margin-right: 3px 637} 638 639.apexcharts-pan-icon { 640 transform: scale(.62); 641 position: relative; 642 left: 1px; 643 top: 0 644} 645 646.apexcharts-pan-icon svg { 647 fill: #fff; 648 stroke: #6e8192; 649 stroke-width: 2 650} 651 652.apexcharts-pan-icon.apexcharts-selected svg { 653 stroke: #008ffb 654} 655 656.apexcharts-pan-icon:not(.apexcharts-selected):hover svg { 657 stroke: #333 658} 659 660.apexcharts-toolbar { 661 position: absolute; 662 z-index: 11; 663 max-width: 176px; 664 text-align: right; 665 border-radius: 3px; 666 padding: 0 6px 2px; 667 display: flex; 668 justify-content: space-between; 669 align-items: center 670} 671 672.apexcharts-menu { 673 background: #fff; 674 position: absolute; 675 top: 100%; 676 border: 1px solid #ddd; 677 border-radius: 3px; 678 padding: 3px; 679 right: 10px; 680 opacity: 0; 681 min-width: 110px; 682 transition: .15s ease all; 683 pointer-events: none 684} 685 686.apexcharts-menu.apexcharts-menu-open { 687 opacity: 1; 688 pointer-events: all; 689 transition: .15s ease all 690} 691 692.apexcharts-menu-item { 693 padding: 6px 7px; 694 font-size: 12px; 695 cursor: pointer 696} 697 698.apexcharts-theme-light .apexcharts-menu-item:hover { 699 background: #eee 700} 701 702.apexcharts-theme-dark .apexcharts-menu { 703 background: rgba(0, 0, 0, .7); 704 color: #fff 705} 706 707@media screen and (min-width:768px) { 708 .apexcharts-canvas:hover .apexcharts-toolbar { 709 opacity: 1 710 } 711} 712 713/* Toolbar keyboard accessibility: show toolbar when any button inside it is focused */ 714.apexcharts-toolbar:focus-within { 715 opacity: 1 716} 717 718/* Focus indicator for toolbar icon buttons */ 719.apexcharts-menu-icon:focus-visible, 720.apexcharts-pan-icon:focus-visible, 721.apexcharts-reset-icon:focus-visible, 722.apexcharts-selection-icon:focus-visible, 723.apexcharts-toolbar-custom-icon:focus-visible, 724.apexcharts-zoom-icon:focus-visible, 725.apexcharts-zoomin-icon:focus-visible, 726.apexcharts-zoomout-icon:focus-visible { 727 outline: 2px solid #008FFB; 728 outline-offset: 2px; 729 border-radius: 2px 730} 731 732/* Focus indicator for hamburger menu items */ 733.apexcharts-menu-item:focus-visible { 734 outline: 2px solid #008FFB; 735 outline-offset: -2px; 736 background: #eee 737} 738 739.apexcharts-canvas .apexcharts-element-hidden, 740.apexcharts-datalabel.apexcharts-element-hidden, 741.apexcharts-hide .apexcharts-series-points { 742 opacity: 0; 743} 744 745.apexcharts-hidden-element-shown { 746 opacity: 1; 747 transition: 0.25s ease all; 748} 749 750.apexcharts-datalabel, 751.apexcharts-datalabel-label, 752.apexcharts-datalabel-value, 753.apexcharts-datalabels, 754.apexcharts-pie-label { 755 cursor: default; 756 pointer-events: none 757} 758 759.apexcharts-pie-label-delay { 760 opacity: 0; 761 animation-name: opaque; 762 animation-duration: .3s; 763 animation-fill-mode: forwards; 764 animation-timing-function: ease 765} 766 767.apexcharts-radialbar-label { 768 cursor: pointer; 769} 770 771.apexcharts-annotation-rect, 772.apexcharts-area-series .apexcharts-area, 773.apexcharts-gridline, 774.apexcharts-line, 775.apexcharts-point-annotation-label, 776.apexcharts-radar-series path:not(.apexcharts-marker), 777.apexcharts-radar-series polygon, 778.apexcharts-toolbar svg, 779.apexcharts-tooltip .apexcharts-marker, 780.apexcharts-xaxis-annotation-label, 781.apexcharts-yaxis-annotation-label, 782.apexcharts-zoom-rect, 783.no-pointer-events { 784 pointer-events: none 785} 786 787.apexcharts-tooltip-active .apexcharts-marker { 788 transition: .15s ease all 789} 790 791.apexcharts-radar-series .apexcharts-yaxis { 792 pointer-events: none; 793} 794 795.resize-triggers { 796 animation: 1ms resizeanim; 797 visibility: hidden; 798 opacity: 0; 799 height: 100%; 800 width: 100%; 801 overflow: hidden 802} 803 804.contract-trigger:before, 805.resize-triggers, 806.resize-triggers>div {
807 content: " "; 808 display: block; 809 position: absolute; 810 top: 0; 811 left: 0 812} 813 814.resize-triggers>div { 815 height: 100%; 816 width: 100%; 817 background: #eee; 818 overflow: auto 819} 820 821.contract-trigger:before { 822 overflow: hidden; 823 width: 200%; 824 height: 200% 825} 826 827.apexcharts-bar-goals-markers { 828 pointer-events: none 829} 830 831.apexcharts-bar-shadows { 832 pointer-events: none 833} 834 835.apexcharts-rangebar-goals-markers { 836 pointer-events: none 837} 838 839.apexcharts-disable-transitions * { 840 transition: none !important; 841}`;class K{constructor(e,t){this.opts=t,this.ctx=this,this.w=new Yt(t).init(),this.el=e,this.w.globals.cuid=D.randomId(),this.w.globals.chartID=this.w.config.chart.id?D.escapeString(this.w.config.chart.id):this.w.globals.cuid,new Se(this).initModules(),this.lastUpdateOptions=null,this.create=this.create.bind(this),z.isBrowser()&&(this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this))}render(){return new Promise((e,t)=>{var s;if(D.elementExists(this.el)){typeof Apex._chartInstances>"u"&&(Apex._chartInstances=[]),this.w.config.chart.id&&Apex._chartInstances.push({id:this.w.globals.chartID,group:this.w.config.chart.group,chart:this}),this.setLocale(this.w.config.chart.defaultLocale);const a=this.w.config.chart.events.beforeMount;if(typeof a=="function"&&a(this,this.w),this.events.fireEvent("beforeMount",[this,this.w]),z.isBrowser()){window.addEventListener("resize",this.windowResizeHandler),Ds(this.el.parentNode,this.parentResizeHandler);const r=this.el.getRootNode&&this.el.getRootNode(),o=D.is("ShadowRoot",r),l=this.el.ownerDocument;let n=o?r.getElementById("apexcharts-css"):l.getElementById("apexcharts-css");if(!n){n=H.createElementNS("http://www.w3.org/1999/xhtml","style"),n.id="apexcharts-css",n.textContent=Ps;const h=((s=this.opts.chart)==null?void 0:s.nonce)||this.w.config.chart.nonce;h&&n.setAttribute("nonce",h),o?r.prepend(n):this.w.config.chart.injectStyleSheet!==!1&&l.head.appendChild(n)}}const i=this.create(this.w.config.series,{});if(!i)return e(this);this.mount(i).then(()=>{typeof this.w.config.chart.events.mounted=="function"&&this.w.config.chart.events.mounted(this,this.w),this.events.fireEvent("mounted",[this,this.w]),e(i)}).catch(r=>{t(r)})}else t(new Error("Element not found"))})}create(e,t){var s;const a=this.w;new Se(this).initModules();const i=this.w.globals;if(i.noData=!1,i.animationEnded=!1,!D.elementExists(this.el)||(this.responsive.checkResponsiveConfig(t),a.config.xaxis.convertedCatToNumeric&&new me(a.config).convertCatToNumericXaxis(a.config,this.ctx),this.core.setupElements(),a.config.chart.type==="treemap"&&(a.config.grid.show=!1,a.config.yaxis[0].show=!1),i.svgWidth===0))return i.animationEnded=!0,null;let r=e;e.forEach((p,b)=>{p.hidden&&(r=this.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:b}))});const o=$.checkComboSeries(r,a.config.chart.type);i.comboCharts=o.comboCharts,i.comboBarCount=o.comboBarCount;const l=r.every(p=>p.data&&p.data.length===0);(r.length===0||l&&i.collapsedSeries.length<1)&&this.series.handleNoData(),z.isBrowser()&&this.events.setupEventHandlers();const n=this.data.parseData(r);this._writeParsedSeriesData(n.seriesData),this._writeParsedRangeData(n.rangeData),this._writeParsedCandleData(n.candleData),this._writeParsedLabelData(n.labelData),this._writeParsedAxisFlags(n.axisFlags),this.theme.init(),new fe(this.w,this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),(!i.noData||i.collapsedSeries.length===a.seriesData.series.length||a.config.legend.showForSingleSeries)&&((s=this.legend)==null||s.init()),this.series.hasAllSeriesEqualX(),i.axisCharts&&(this.core.coreCalculations(),a.config.xaxis.type!=="category"&&this.formatters.setLabelFormatters(),this.ctx.toolbar&&(this.ctx.toolbar.minX=a.globals.minX,this.ctx.toolbar.maxX=a.globals.maxX)),this.formatters.heatmapLabelFormatters(),new $(this.w).getLargestMarkerSize();const h=this.dimensions.plotCoords();this._writeLayoutCoords(h.layout);const c=this.core.xySettings();this.grid.createGridMask();const d=this.core.plotChartType(r,c),u=new ge(this.w,this);u.bringForward(),a.config.dataLabels.background.enabled&&u.dataLabelsBackgroun
841d(),this.core.shiftGraphPosition(),a.globals.dataPoints>50&&a.dom.elWrap.classList.add("apexcharts-disable-transitions");const g={plot:{left:a.layout.translateX,top:a.layout.translateY,width:a.layout.gridWidth,height:a.layout.gridHeight}};return{elGraph:d,xyRatios:c,dimensions:g}}mount(e=null){const t=this,s=t.w;return new Promise((a,i)=>{var r,o,l,n,h,c,d,u;if(t.el===null)return i(new Error("Not enough data to display or target element not found"));(e===null||s.globals.allSeriesCollapsed)&&t.series.handleNoData(),t.grid=new pt(t.w,t);const g=t.grid.drawGrid(),p=Se._featureRegistry.get("annotations");if(t.annotations=p?new p(t.w,{theme:t.theme,timeScale:t.timeScale}):null,(r=t.annotations)==null||r.drawImageAnnos(),(o=t.annotations)==null||o.drawTextAnnos(),s.config.grid.position==="back"&&(g&&s.dom.elGraphical.add(g.el),(l=g==null?void 0:g.elGridBorders)!=null&&l.node&&s.dom.elGraphical.add(g.elGridBorders)),Array.isArray(e.elGraph))for(let m=0;m<e.elGraph.length;m++)s.dom.elGraphical.add(e.elGraph[m]);else s.dom.elGraphical.add(e.elGraph);s.config.grid.position==="front"&&(g&&s.dom.elGraphical.add(g.el),(n=g==null?void 0:g.elGridBorders)!=null&&n.node&&s.dom.elGraphical.add(g.elGridBorders)),s.config.xaxis.crosshairs.position==="front"&&t.crosshairs.drawXCrosshairs(),s.config.yaxis[0].crosshairs.position==="front"&&t.crosshairs.drawYCrosshairs(),s.config.chart.type!=="treemap"&&t.axes.drawAxis(s.config.chart.type,g);const b=new we(this.w,this.ctx,g),f=new We(this.w,{theme:this.theme,timeScale:this.timeScale},g);if(g!==null&&(b.xAxisLabelCorrections(g.xAxisTickWidth),f.setYAxisTextAlignments(),s.config.yaxis.map((m,v)=>{s.globals.ignoreYAxisIndexes.indexOf(v)===-1&&f.yAxisTitleRotate(v,m.opposite)})),(h=t.annotations)==null||h.drawAxesAnnotations(),!s.globals.noData){if(z.isBrowser()&&s.config.tooltip.enabled&&!s.globals.noData&&t.w.globals.tooltip.drawTooltip(e.xyRatios),s.config.chart.accessibility.enabled&&s.config.chart.accessibility.keyboard.enabled&&s.config.chart.accessibility.keyboard.navigation.enabled&&((c=t.keyboardNavigation)==null||c.init()),z.isBrowser()&&s.globals.axisCharts&&(s.axisFlags.isXNumeric||s.config.xaxis.convertedCatToNumeric||s.axisFlags.isRangeBar))(s.config.chart.zoom.enabled||s.config.chart.selection&&s.config.chart.selection.enabled||s.config.chart.pan&&s.c
841onfig.chart.pan.enabled)&&((d=t.zoomPanSelection)==null||d.init({xyRatios:e.xyRatios}));else{const m=s.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach(v=>{m[v]=!1})}s.config.chart.toolbar.show&&!s.globals.allSeriesCollapsed&&((u=t.toolbar)==null||u.createToolbar())}s.globals.memory.methodsToExec.length>0&&s.globals.memory.methodsToExec.forEach(m=>{m.method(m.params,!1,m.context)}),!s.globals.axisCharts&&!s.globals.noData&&t.core.resizeNonAxisCharts(),a(t)})}destroy(){z.isBrowser()&&(window.removeEventListener("resize",this.windowResizeHandler),Ls(this.el.parentNode,this.parentResizeHandler));const e=this.w.config.chart.id;e&&Apex._chartInstances.forEach((t,s)=>{t.id===D.escapeString(e)&&Apex._chartInstances.splice(s,1)}),this._keyboardNavigation&&this._keyboardNavigation.destroy(),new tt(this.ctx).clear({isUpdating:!1})}updateOptions(e,t=!1,s=!0,a=!0,i=!0){const r=this.w;if(r.interact.selection=void 0,this.lastUpdateOptions){if(D.shallowEqual(this.lastUpdateOptions,e))return this;if(e.series&&this.lastUpdateOptions.series&&JSON.stringify(this.lastUpdateOptions.series)===JSON.stringify(e.series)){const o=R({},e),l=R({},this.lastUpdateOptions);if(delete o.series,delete l.series,D.shallowEqual(o,l))return this}}return e.series&&(this.data.resetParsingFlags(),this.series.resetSeries(!1,!0,!1),e.series.length&&e.series[0].data&&(e.series=e.series.map((o,l)=>this.updateHelpers._extendSeries(o,l))),this.updateHelpers.revertDefaultAxisMinMax()),e.xaxis&&(e=this.updateHelpers.forceXAxisUpdate(e)),e.yaxis&&(e=this.updateHelpers.forceYAxisUpdate(e)),r.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),e.theme&&(e=this.theme.updateThemeOptions(e)),this.updateHelpers._updateOptions(e,t,s,a,i)}updateSeries(e=[],t=!0,s=!0){return this.data.resetParsingFlags(),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(e,t,s)}appendSeries(e,t=!0,s=!0){this.data.resetParsingFlags();const a=this.w.config.series.slice();return a.push(e),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(a,t,s)}appendData(e,t=!0){const s=this;s.data.resetParsingFlags(),s.w.globals.dataChanged=!0,s.series.getPreviousPaths();const a=s.w.config.series.slice();for(let i=0;i<a.length;i++)if(e[i]!==null&&typeof e[i]<"u")for(let r=0;r<e[i].data.length;r++)a[i].data.push(e[i].data[r]);return s.w.config.series=a,t&&(s.w.globals.initialSeries=D.clone(s.w.config.series)),this.update()}update(e){return new Promise((t,s)=>{if(this.lastUpdateOptions&&JSON.stringify(this.lastUpdateOptions)===JSON.stringify(e))return t(this);this.lastUpdateOptions=D.clone(e),new tt(this.ctx).clear({isUpdating:!0});const a=this.create(this.w.config.series,e);if(!a)return t(this);this.mount(a).then(()=>{typeof this.w.config.chart.events.updated=="function"&&this.w.config.chart.events.updated(this,this.w),this.events.fireEvent("updated",[this,this.w]),this.w.globals.isDirty=!0,t(this)}).catch(i=>{s(i)})})}getSyncedCharts(){const e=this.getGroupedCharts();let t=[this];return e.length&&(t=[],e.forEach(s=>{t.push(s)})),t}getGroupedCharts(){return Apex._chartInstances.filter(e=>{if(e.group)return!0}).map(e=>this.w.config.chart.group===e.group?e.chart:this)}static getChartByID(e){const t=D.escapeString(e);if(!Apex._chartInstances)return;const s=Apex._chartInstances.filter(a=>a.id===t)[0];return s&&s.chart}static initOnLoad(){const e=document.querySelectorAll("[data-apexcharts]");for(let t=0;t<e.length;t++){const s=e[t],a=JSON.parse(e[t].getAttribute("data-options"));new K(s,a).render()}}static exec(e,t,...s){const a=this.getChartByID(e);if(!a)return;a.w.globals.isExecCalled=!0;let i=null;return a.publicMethods.indexOf(t)!==-1&&(i=a[t](...s)),i}static merge(e,t){return D.extend(e,t)}static getThemePalettes(){return ze()}static use(e){Kt(e)}static registerFeatures(e){Se.registerFeatures(e)}toggleSeries(e){return this.series.toggleSeries(e)}highlightSeriesOnLegendHover(e,t){return this.series.toggleSeriesOnHover(e,t)}showSeries(e){this.series.showSeries(e)}hideSeries(e){this.series.hideSeries(e)}highlightSeries(e){this.series.highlightSeries(e)}isSeriesHidden(e){this.series.isSeriesHidden(e)}resetSeries(e=!0,t=!0){this.series.resetSeries(e,t)}addEventListener(e,t){this.events.addEventListener(e,t)}removeEventListener(e,t){this.events.removeEventListener(e,t)}addXaxisAnnotation(e,t=!0,s=void 0){var a;let i=this;s&&(i=s),(a=i.annotations)==null||a.addXaxisAnnotationExternal(e,t,i)}addYaxisAnnotation(e,t=!0,s=void 0){var a;let i=this;s&&(i=s),(a=i.annotations)==null||a.addYaxisAnnotationExternal(e,t,i)}addPointAnnotation(e,t=!0,s=void 0){var a;let i=this;s&&(i=s),(a=i.annotations)==null||a.addPointAnnotationExternal(e,t,i)}clearAnnotations(e=void 0){var t;let s=this;e&&(s=e),(t=s.annotations)==null||t.clearAnnotations(s)}removeAnnotation(e,t=void 0){var s;let a=this;t&&(a=t),(s=a.annotations)==null||s.removeAnnotation(a,e)}getChartArea(){return this.w.dom.baseEl.querySelector(".apexcharts-inner")}getSeriesTotalXRange(e,t){return this.coreUtils.getSeriesTotalsXRange(e,t)}getHighestValueInSeries(e=0){return new Re(this.w).getMinYMaxY(e).highestY}getLowestValueInSeries(e=0){return new Re(this.w).getMinYMaxY(e).lowestY}getSeriesTotal(){return this.w.globals.seriesTotals}getState(){const e=this.w,t=e.globals;return{series:e.seriesData.series,seriesNames:e.seriesData.seriesNames,colors:t.colors,labels:e.labelData.labels,seriesTotals:t.seriesTotals,seriesPercent:t.seriesPercent,seriesXvalues:t.seriesXvalues,seriesYvalues:t.seriesYvalues,minX:t.minX,maxX:t.maxX,minY:t.minY,maxY:t.maxY,minYArr:t.minYArr,maxYArr:t.maxYArr,minXDiff:t.minXDiff,dataPoints:t.dataPoints,xAxisScale:t.xAxisScale,yAxisScale:t.yAxisScale,xTickAmount:t.xT
841ickAmount,isXNumeric:e.axisFlags.isXNumeric,seriesYAxisMap:t.seriesYAxisMap,seriesYAxisReverseMap:t.seriesYAxisReverseMap,svgWidth:t.svgWidth,svgHeight:t.svgHeight,gridWidth:e.layout.gridWidth,gridHeight:e.layout.gridHeight,selectedDataPoints:e.interact.selectedDataPoints,collapsedSeriesIndices:t.collapsedSeriesIndices,zoomed:e.interact.zoomed,seriesX:e.seriesData.seriesX,seriesZ:e.seriesData.seriesZ,seriesCandleO:e.candleData.seriesCandleO,seriesCandleH:e.candleData.seriesCandleH,seriesCandleM:e.candleData.seriesCandleM,seriesCandleL:e.candleData.seriesCandleL,seriesCandleC:e.candleData.seriesCandleC,seriesRangeStart:e.rangeData.seriesRangeStart,seriesRangeEnd:e.rangeData.seriesRangeEnd,seriesGoals:e.seriesData.seriesGoals}}toggleDataPointSelection(e,t){return this.updateHelpers.toggleDataPointSelection(e,t)}zoomX(e,t){var s;(s=this.ctx.toolbar)==null||s.zoomUpdateOptions(e,t)}setLocale(e){this.localization.setCurrentLocaleValues(e)}dataURI(e){if(!this.ctx.exports)throw new Error("apexcharts: Exports feature is not registered. Import apexcharts/features/exports.");return this.ctx.exports.dataURI(e)}getSvgString(e){if(!this.ctx.exports)throw new Error("apexcharts: Exports feature is not registered. Import apexcharts/features/exports.");return this.ctx.exports.getSvgString(e)}exportToCSV(e={}){if(!this.ctx.exports)throw new Error("apexcharts: Exports feature is not registered. Import apexcharts/features/exports.");return this.ctx.exports.exportToCSV(e)}paper(){return this.w.dom.Paper}_writeParsedSeriesData(e){Object.assign(this.w.seriesData,e)}_writeParsedRangeData(e){Object.assign(this.w.rangeData,e)}_writeParsedCandleData(e){Object.assign(this.w.candleData,e)}_writeParsedLabelData(e){Object.assign(this.w.labelData,e)}_writeParsedAxisFlags(e){Object.assign(this.w.axisFlags,e)}_writeLayoutCoords(e){Object.assign(this.w.layout,e)}_parentResizeCallback(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}_windowResize(){clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout(()=>{this.w.globals.resized=!0,this.w.globals.dataChanged=!1,this.ctx.update()},150)}_windowResizeHandler(){let{redrawOnWindowResize:e}=this.w.config.chart;typeof e=="function"&&(e=e()),e&&this._windowResize()}}const vt=`.apexcharts-flip-y { 842 transform: scaleY(-1) translateY(-100%); 843 transform-origin: top; 844 transform-box: fill-box; 845} 846.apexcharts-flip-x { 847 transform: scaleX(-1); 848 transform-origin: center; 849 transform-box: fill-box; 850} 851.apexcharts-legend { 852 display: flex; 853 overflow: auto; 854 padding: 0 10px; 855} 856.apexcharts-legend.apexcharts-legend-group-horizontal { 857 flex-direction: column; 858} 859.apexcharts-legend-group { 860 display: flex; 861} 862.apexcharts-legend-group-vertical { 863 flex-direction: column-reverse; 864} 865.apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top { 866 flex-wrap: wrap 867} 868.apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left { 869 flex-direction: column; 870 bottom: 0; 871} 872.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left { 873 justify-content: flex-start; 874 align-items: flex-start; 875} 876.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center { 877 justify-content: center; 878 align-items: center; 879} 880.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right { 881 justify-content: flex-end; 882 align-items: flex-end; 883} 884.apexcharts-legend-series { 885 cursor: pointer; 886 line-height: normal; 887 display: flex; 888 align-items: center; 889} 890.apexcharts-legend-text { 891 position: relative; 892 font-size: 14px; 893} 894.apexcharts-legend-text *, .apexcharts-legend-marker * { 895 pointer-events: none; 896} 897.apexcharts-legend-marker { 898 position: relative; 899 display: flex; 900 align-items: center; 901 justify-content: center; 902 cursor: pointer; 903 margin-right: 1px; 904} 905 906.apexcharts-legend-series.apexcharts-no-click { 907 cursor: auto; 908} 909.apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series { 910 display: none !important; 911} 912.apexcharts-inactive-legend { 913 opacity: 0.45; 914} `;class Ct{constructor(e,t){this.w=e,this.ctx=t}svgStringToNode(e){return new DOMParser().parseFromString(e,"image/svg+xml").documentElement}scaleSvgNode(e,t){const s=parseFloat(e.getAttributeNS(null,"width")),a=parseFloat(e.getAttributeNS(null,"height"));e.setAttributeNS(null,"width",s*t),e.setAttributeNS(null,"height",a*t),e.setAttributeNS(null,"viewBox","0 0 "+s+" "+a)}getSvgString(e){return new Promise(t=>{const s=this.w;let a=e||s.config.chart.toolbar.export.scale||s.config.chart.toolbar.export.width/s.globals.svgWidth;a||(a=1);const i=s.globals.svgWidth*a,r=s.globals.svgHeight*a,o=s.dom.elWrap.cloneNode(!0);o.style.width=i+"px",o.style.height=r+"px";const l=new XMLSerializer().serializeToString(o),n=s.config.legend.show&&s.dom.elLegendWrap&&s.dom.elLegendWrap.children.length>0;let h=` 915 .apexcharts-tooltip, .apexcharts-toolbar, .apexcharts-xaxistooltip, .apexcharts-yaxistooltip, .apexcharts-xcrosshairs, .apexcharts-ycrosshairs, .apexcharts-zoom-rect, .apexcharts-selection-rect { 916 display: none; 917 } 918 `;n&&(h+=vt);let c=` 919 <svg xmlns="http://www.w3.org/2000/svg" 920 version="1.1" 921 xmlns:xlink="http://www.w3.org/1999/xlink" 922 class="apexcharts-svg" 923 xmlns:data="ApexChartsNS" 924 transform="translate(0, 0)" 925 width="${s.globals.svgWidth}px" height="${s.globals.svgHeight}px"> 926 <foreignObject width="100%" height="100%"> 927 <div xmlns="http://www.w3.org/1999/xhtml" style="width:${i}px; height:${r}px;"> 928 <style type="text/css"> 929 ${h} 930 </style> 931 ${l} 932 </div> 933 </foreignObject> 934 </svg> 935 `;const d=this.svgStringToNode(c);a!==1&&this.scaleSvgNode(d,a),this.convertImagesToBase64(d).then(()=>{c=new XMLSerializer().serializeToString(d),t(c.replace(/ /g," "))})})}convertImagesToBase64(e){const t=e.getElementsByTagName("image"),s=Array.from(t).map(a=>{const i=a.getAttributeNS("http://www.w3.org/1999/xlink","href");return i&&!i.startsWith("data:")?this.getBase64FromUrl(i).then(r=>{a.setAttributeNS("http://www.w3.org/1999/xlink","href",r)}).catch(r=>{console.error("Error converting image to base64:",r)}):Promise.resolve()});return Promise.all(s)}getBase64FromUrl(e){return z.isSSR()?Promise.resolve(e):new Promise((t,s)=>{const a=new Image;a.crossOrigin="Anonymous",a.onload=()=>{const i=document.createElement("canvas");i.width=a.width,i.height=a.height,i.getContext("2d").drawImage(a,0,0),t(i.toDataURL())},a.onerror=s,a.src=e})}svgUrl(){return new Promise(e=>
935{this.getSvgString().then(t=>{const s=new Blob([t],{type:"image/svg+xml;charset=utf-8"});e(URL.createObjectURL(s))})})}dataURI(e){return z.isSSR()?Promise.resolve({imgURI:""}):new Promise(t=>{const s=this.w,a=e?e.scale||e.width/s.globals.svgWidth:1,i=document.createElement("canvas");i.width=s.globals.svgWidth*a,i.height=parseInt(s.dom.elWrap.style.height,10)*a;const r=s.config.chart.background==="transparent"||!s.config.chart.background?"#fff":s.config.chart.background,o=i.getContext("2d");o.fillStyle=r,o.fillRect(0,0,i.width*a,i.height*a),this.getSvgString(a).then(l=>{const n="data:image/svg+xml,"+encodeURIComponent(l),h=new Image;h.crossOrigin="anonymous",h.onload=()=>{if(o.drawImage(h,0,0),i.msToBlob){const c=i.msToBlob();t({blob:c})}else{const c=i.toDataURL("image/png");t({imgURI:c})}},h.src=n})})}exportToSVG(){this.svgUrl().then(e=>{this.triggerDownload(e,this.w.config.chart.toolbar.export.svg.filename,".svg")})}exportToPng(){const e=this.w.config.chart.toolbar.export.scale,t=this.w.config.chart.toolbar.export.width,s=e?{scale:e}:t?{width:t}:void 0;this.dataURI(s).then(({imgURI:a,blob:i})=>{i?navigator.msSaveOrOpenBlob(i,this.w.globals.chartID+".png"):this.triggerDownload(a,this.w.config.chart.toolbar.export.png.filename,".png")})}exportToCSV({series:e,fileName:t,columnDelimiter:s=",",lineDelimiter:a=` 936`}){const i=this.w;e||(e=i.config.series);let r=[];const o=[];let l="";const n="\uFEFF",h=i.seriesData.series.map((y,w)=>i.globals.collapsedSeriesIndices.indexOf(w)===-1?y:[]),c=y=>typeof i.config.chart.toolbar.export.csv.categoryFormatter=="function"?i.config.chart.toolbar.export.csv.categoryFormatter(y):i.config.xaxis.type==="datetime"&&String(y).length>=10?new Date(y).toDateString():D.isNumber(y)?y:y.split(s).join(""),d=y=>typeof i.config.chart.toolbar.export.csv.valueFormatter=="function"?i.config.chart.toolbar.export.csv.valueFormatter(y):y,u=Math.max(...e.map(y=>y.data?y.data.length:0)),g=new _e(this.w),p=new ie(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale}),b=y=>{let w="";if(!i.globals.axisCharts)w=i.config.labels[y];else{if(i.config.xaxis.type==="category"||i.config.xaxis.convertedCatToNumeric)if(i.globals.isBarHorizontal){const C=i.formatters.yLabelFormatters[0],A=new j(this.ctx.w).getActiveConfigSeriesIndex();w=C(i.labelData.labels[y],{seriesIndex:A,dataPointIndex:y,w:i})}else w=p.getLabel(i.labelData.labels,i.labelData.timescaleLabels,0,y).text;i.config.xaxis.type==="datetime"&&(i.config.xaxis.categories.length?w=i.config.xaxis.categories[y]:i.config.labels.length&&(w=i.config.labels[y]))}return w===null?"nullvalue":(Array.isArray(w)&&(w=w.join(" ")),D.isNumber(w)?w:w.split(s).join(""))},f=()=>[...Array(u)].map(()=>""),m=(y,w)=>{var C;if(r.length&&w===0&&o.push(r.join(s)),y.data){y.data=y.data.length&&y.data||f();for(let A=0;A<y.data.length;A++){r=[];let L=b(A);if(L!=="nullvalue"){if(L||(g.isFormatXY()?L=e[w].data[A].x:g.isFormat2DArray()&&(L=e[w].data[A]?e[w].data[A][0]:"")),w===0){r.push(c(L));for(let S=0;S<i.seriesData.series.length;S++){const k=g.isFormatXY()?(C=e[S].data[A])==null?void 0:C.y:h[S][A];r.push(d(k))}}(i.config.chart.type==="candlestick"||y.type&&y.type==="candlestick")&&(r.pop(),r.push(i.candleData.seriesCandleO[w][A]),r.push(i.candleData.seriesCandleH[w][A]),r.push(i.candleData.seriesCandleL[w][A]),r.push(i.candleData.seriesCandleC[w][A])),(i.config.chart.type==="boxPlot"||y.type&&y.type==="boxPlot")&&(r.pop(),r.push(i.candleData.seriesCandleO[w][A]),r.push(i.candleData.seriesCandleH[w][A]),r.push(i.candleData.seriesCandleM[w][A]),r.push(i.candleData.seriesCandleL[w][A]),r.push(i.candleData.seriesCandleC[w][A])),i.config.chart.type==="rangeBar"&&(r.pop(),r.push(i.rangeData.seriesRangeStart[w][A]),r.push(i.rangeData.seriesRangeEnd[w][A])),r.length&&o.push(r.join(s))}}}},v=()=>{const y=new Set,w={};e.forEach((C,A)=>{C==null||C.data.forEach(L=>{let S,k;if(g.isFormatXY())S=L.x,k=L.y;else if(g.isFormat2DArray())S=L[0],k=L[1];else return;w[S]||(w[S]=Array(e.length).fill("")),w[S][A]=d(k),y.add(S)})}),r.length&&o.push(r.join(s)),Array.from(y).sort().forEach(C=>{o.push([c(C),w[C].join(s)])})};r.push(i.config.chart.toolbar.export.csv.headerCategory),i.config.chart.type==="boxPlot"?(r.push("minimum"),r.push("q1"),r.push("median"),r.push("q3"),r.push("maximum")):i.config.chart.type==="candlestick"?(r.push("open"),r.push("high"),r.push("low"),r.push("close")):i.config.chart.type==="rangeBar"?(r.push("minimum"),r.push("maximum")):e.map((y,w)=>{const C=(y.name?y.name:`series-${w}`)+"";i.globals.axisCharts&&r.push(C.split(s).join("")?C.split(s).join(""):`series-${w}`)}),i.globals.axisCharts||(r.push(i.config.chart.toolbar.export.csv.headerValue),o.push(r.join(s))),!i.globals.allSeriesHasEqualX&&i.globals.axisCharts&&!i.config.xaxis.categories.length&&!i.config.labels.length?v():e.map((y,w)=>{i.globals.axisCharts?m(y,w):(r=[],r.push(c(i.labelData.labels[w])),r.push(d(h[w])),o.push(r.join(s)))}),l+=o.join(a),this.triggerDownload("data:text/csv; charset=utf-8,"+encodeURIComponent(n+l),t||i.config.chart.toolbar.export.csv.filename,".csv")}triggerDownload(e,t,s){if(z.isSSR())return;const a=document.createElement("a");a.href=e,a.download=(t||this.w.globals.chartID)+s,document.body.appendChild(a),a.click(),document.body.removeChild(a)}}K.registerFeatures({exports:Ct});
936let Ms=class{constructor(x){this.w=x.w,this.lgCtx=x}getLegendStyles(){if(z.isSSR())return null;const x=document.createElement("style");x.setAttribute("type","text/css");const e=this.w.config.chart.nonce;e&&x.setAttribute("nonce",e);const t=document.createTextNode(vt);return x.appendChild(t),x}getLegendDimensions(){const x=this.w.dom.baseEl.querySelector(".apexcharts-legend");if(!x)return{clwh:0,clww:0};const{width:e,height:t}=x.getBoundingClientRect();return{clwh:t,clww:e}}appendToForeignObject(){const x=this.getLegendStyles();this.w.config.chart.injectStyleSheet!==!1&&x&&this.w.dom.elLegendForeign.appendChild(x)}toggleDataSeries(x,e){const t=this.w;if(t.globals.axisCharts||t.config.chart.type==="radialBar"){t.globals.resized=!0;let s=null,a=null;if(t.globals.risingSeries=[],t.globals.axisCharts){if(s=t.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${x}']`),!s)return;a=parseInt(s.getAttribute("data:realIndex"),10)}else{if(s=t.dom.baseEl.querySelector(`.apexcharts-series[rel='${x+1}']`),!s)return;a=parseInt(s.getAttribute("rel"),10)-1}if(e?[{cs:t.globals.collapsedSeries,csi:t.globals.collapsedSeriesIndices},{cs:t.globals.ancillaryCollapsedSeries,csi:t.globals.ancillaryCollapsedSeriesIndices}].forEach(i=>{this.riseCollapsedSeries(i.cs,i.csi,a)}):this.hideSeries({seriesEl:s,realIndex:a}),t.config.chart.accessibility.enabled){const i=t.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${x+1}"]`);if(i){const r=t.globals.collapsedSeriesIndices.includes(a)||t.globals.ancillaryCollapsedSeriesIndices.includes(a);i.setAttribute("aria-pressed",r?"true":"false");const o=i.querySelector(".apexcharts-legend-text"),l=o?o.textContent:t.seriesData.seriesNames[x],n=r?"hidden":"visible";i.setAttribute("aria-label",`${l}, ${n}. Press Enter or Space to toggle.`)}}}else{const s=t.dom.Paper.findOne(` .apexcharts-series[rel='${x+1}'] path`),a=t.config.chart.type;if(a==="pie"||a==="polarArea"||a==="donut"){const i=t.config.plotOptions.pie.donut.labels;new I(this.w).pathMouseDown(s,null),this.lgCtx.printDataLabelsInner(s.node,i)}if(t.config.chart.accessibility.enabled){const i=t.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${x+1}"]`);if(i){const r=t.globals.collapsedSeriesIndices.includes(x);i.setAttribute("aria-pressed",r?"true":"false");const o=i.querySelector(".apexcharts-legend-text"),l=o?o.textContent:t.seriesData.seriesNames[x],n=r?"hidden":"visible";i.setAttribute("aria-label",`${l}, ${n}. Press Enter or Space to toggle.`)}}}}getSeriesAfterCollapsing({realIndex:x}){const e=this.w,t=e.globals,s=D.clone(e.config.series);if(t.axisCharts){const a=e.config.yaxis[t.seriesYAxisReverseMap[x]],i={index:x,data:s[x].data.slice(),type:s[x].type||e.config.chart.type};if(a&&a.show&&a.showAlways)t.ancillaryCollapsedSeriesIndices.indexOf(x)<0&&(t.ancillaryCollapsedSeries.push(i),t.ancillaryCollapsedSeriesIndices.push(x));else if(t.collapsedSeriesIndices.indexOf(x)<0){t.collapsedSeries.push(i),t.collapsedSeriesIndices.push(x);const r=t.risingSeries.indexOf(x);t.risingSeries.splice(r,1)}}else t.collapsedSeries.push({index:x,data:s[x]}),t.collapsedSeriesIndices.push(x);return t.allSeriesCollapsed=t.collapsedSeries.length+t.ancillaryCollapsedSeries.length===e.config.series.length,this._getSeriesBasedOnCollapsedState(s)}hideSeries({seriesEl:x,realIndex:e}){const t=this.w,s=this.getSeriesAfterCollapsing({realIndex:e}),a=x.childNodes;for(let i=0;i<a.length;i++)a[i].classList.contains("apexcharts-series-markers-wrap")&&(a[i].classList.contains("apexcharts-hide")?a[i].classList.remove("apexcharts-hide"):a[i].classList.add("apexcharts-hide"));this.lgCtx.updateSeries(s,t.config.chart.animations.dynamicAnimation.enabled)}riseCollapsedSeries(x,e,t){const s=this.w;let a=D.clone(s.config.series);if(x.length>0){for(let i=0;i<x.length;i++)x[i].index===t&&(s.globals.axisCharts?a[t].data=x[i].data.slice():a[t]=x[i].data,typeof a[t]!="number"&&(a[t].hidden=!1),x.splice(i,1),e.splice(i,1),s.globals.risingSeries.push(t),i--);a=this._getSeriesBasedOnCollapsedState(a),this.lgCtx.updateSeries(a,s.config.chart.animations.dynamicAnimation.enabled)}}_getSeriesBasedOnCollapsedState(x){const e=this.w;let t=0;return e.globals.axisCharts?x.forEach((s,a)=>{e.globals.collapsedSeriesIndices.indexOf(a)<0&&e.globals.ancillaryCollapsedSeriesIndices.indexOf(a)<0||(x[a].data=[],t++)}
936):x.forEach((s,a)=>{e.globals.collapsedSeriesIndices.indexOf(a)<0||(x[a]=0,t++)}),e.globals.allSeriesCollapsed=t===x.length,x}};class Is{constructor(e,t){this.w=e,this.ctx=t,this.printDataLabelsInner=(...s)=>{var a;return(a=t.pie)==null?void 0:a.printDataLabelsInner(...s)},this.updateSeries=(...s)=>t.updateHelpers._updateSeries(...s),this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this),this.isBarsDistributed=this.w.config.chart.type==="bar"&&this.w.config.plotOptions.bar.distributed&&this.w.config.series.length===1,this.legendHelpers=new Ms(this)}init(){const e=this.w,t=e.globals,s=e.config,a=s.legend.showForSingleSeries&&this.w.seriesData.series.length===1||this.isBarsDistributed||this.w.seriesData.series.length>1;if(this.legendHelpers.appendToForeignObject(),(a||!t.axisCharts)&&s.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),s.legend.position==="bottom"||s.legend.position==="top"?this.legendAlignHorizontal():(s.legend.position==="right"||s.legend.position==="left")&&this.legendAlignVertical()}}createLegendMarker({i:e,fillcolor:t}){const s=this.w,a=H.createElement("span");a.classList.add("apexcharts-legend-marker");const i=s.config.legend.markers.shape||s.config.markers.shape;let r=i;Array.isArray(i)&&(r=i[e]);const o=Array.isArray(s.config.legend.markers.size)?parseFloat(s.config.legend.markers.size[e]):parseFloat(s.config.legend.markers.size),l=Array.isArray(s.config.legend.markers.offsetX)?parseFloat(s.config.legend.markers.offsetX[e]):parseFloat(s.config.legend.markers.offsetX),n=Array.isArray(s.config.legend.markers.offsetY)?parseFloat(s.config.legend.markers.offsetY[e]):parseFloat(s.config.legend.markers.offsetY),h=Array.isArray(s.config.legend.markers.strokeWidth)?parseFloat(s.config.legend.markers.strokeWidth[e]):parseFloat(s.config.legend.markers.strokeWidth),c=a.style;if(c.height=(o+h)*2+"px",c.width=(o+h)*2+"px",c.left=l+"px",c.top=n+"px",s.config.legend.markers.customHTML)c.background="transparent",c.color=t[e],Array.isArray(s.config.legend.markers.customHTML)?s.config.legend.markers.customHTML[e]&&(a.innerHTML=s.config.legend.markers.customHTML[e]()):a.innerHTML=s.config.legend.markers.customHTML();else{const d=new fe(this.ctx.w,this.ctx).getMarkerConfig({cssClass:`apexcharts-legend-marker apexcharts-marker apexcharts-marker-${r}`,seriesIndex:e,strokeWidth:h,size:o}),u=(z.isBrowser()?window.SVG:global.SVG)().addTo(a).size("100%","100%"),g=new I(this.w).drawMarker(0,0,O(R({},d),{pointFillColor:Array.isArray(t)?t[e]:d.pointFillColor,shape:r}));s.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach(p=>{p.node.classList.contains("apexcharts-marker-triangle")?p.node.style.transform="translate(50%, 45%)":p.node.style.transform="translate(50%, 50%)"}),u.add(g)}return a}drawLegends(){var e;const t=this,s=this.w,a=s.config.legend.fontFamily;let i=s.seriesData.seriesNames,r=s.config.legend.markers.fillColors?s.config.legend.markers.fillColors.slice():s.globals.colors.slice();if(s.config.chart.type==="heatmap"){const h=s.config.plotOptions.heatmap.colorScale.ranges;i=h.map(c=>c.name?c.name:c.from+" - "+c.to),r=h.map(c=>c.color)}else this.isBarsDistributed&&(i=s.labelData.labels.slice());s.config.legend.customLegendItems.length&&(i=s.config.legend.customLegendItems);const o=s.formatters.legendFormatter,l=s.config.legend.inverseOrder,n=[];s.labelData.seriesGroups.length>1&&s.config.legend.clusterGroupedSeries&&s.labelData.seriesGroups.forEach((h,c)=>{n[c]=H.createElement("div"),n[c].classList.add("apexcharts-legend-group",`apexcharts-legend-group-${c}`),s.config.legend.clusterGroupedSeriesOrientation==="horizontal"?s.dom.elLegendWrap.classList.add("apexcharts-legend-group-horizontal"):n[c].classList.add("apexcharts-legend-group-vertical")});for(let h=l?i.length-1:0;l?h>=0:h<=i.length-1;l?h--:h++){const c=o(i[h],{seriesIndex:h,w:s});let d=!1,u=!1;if(s.globals.collapsedSeries.length>0)for(let v=0;v<s.globals.collapsedSeries.length;v++)s.globals.collapsedSeries[v].index===h&&(d=!0);if(s.globals.ancillaryCollapsedSeriesIndices.length>0)for(let v=0;v<s.globals.ancillaryCollapsedSeriesIndices.length;v++)s.globals.ancillaryCollapsedSeriesIndices[v]===h&&(u=!0);const g=this.createLegendMarker({i:h,fillcolor:r});I.setAttrs(g,{rel:h+1,"data:collapsed":d||u}),(d||u)&&g.classList.add("apexcharts-inactive-legend");const p=H.createElement("div");
936if(s.config.chart.accessibility.enabled&&s.config.chart.accessibility.keyboard.enabled){p.setAttribute("role","button"),p.setAttribute("tabindex","0");const v=Array.isArray(c)?c.join(" "):c,y=d||u,w=y?"hidden":"visible";p.setAttribute("aria-label",`${v}, ${w}. Press Enter or Space to toggle.`),p.setAttribute("aria-pressed",y?"true":"false")}const b=H.createElement("span");b.classList.add("apexcharts-legend-text"),b.innerHTML=Array.isArray(c)?c.join(" "):c;let f=s.config.legend.labels.useSeriesColors?s.globals.colors[h]:Array.isArray(s.config.legend.labels.colors)?(e=s.config.legend.labels.colors)==null?void 0:e[h]:s.config.legend.labels.colors;f||(f=s.config.chart.foreColor),b.style.color=f,b.style.fontSize=s.config.legend.fontSize,b.style.fontWeight=s.config.legend.fontWeight,b.style.fontFamily=a||s.config.chart.fontFamily,I.setAttrs(b,{rel:h+1,i:h,"data:default-text":encodeURIComponent(c),"data:collapsed":d||u}),p.appendChild(g),p.appendChild(b);const m=new $(this.w);s.config.legend.showForZeroSeries||m.getSeriesTotalByIndex(h)===0&&m.seriesHaveSameValues(h)&&!m.isSeriesNull(h)&&s.globals.collapsedSeriesIndices.indexOf(h)===-1&&s.globals.ancillaryCollapsedSeriesIndices.indexOf(h)===-1&&p.classList.add("apexcharts-hidden-zero-series"),s.config.legend.showForNullSeries||m.isSeriesNull(h)&&s.globals.collapsedSeriesIndices.indexOf(h)===-1&&s.globals.ancillaryCollapsedSeriesIndices.indexOf(h)===-1&&p.classList.add("apexcharts-hidden-null-series"),n.length?s.labelData.seriesGroups.forEach((v,y)=>{var w;v.includes((w=s.config.series[h])==null?void 0:w.name)&&(s.dom.elLegendWrap.appendChild(n[y]),n[y].appendChild(p))}):s.dom.elLegendWrap.appendChild(p),s.dom.elLegendWrap.classList.add(`apexcharts-align-${s.config.legend.horizontalAlign}`),s.dom.elLegendWrap.classList.add("apx-legend-position-"+s.config.legend.position),p.classList.add("apexcharts-legend-series"),p.style.margin=`${s.config.legend.itemMargin.vertical}px ${s.config.legend.itemMargin.horizontal}px`,s.dom.elLegendWrap.style.width=s.config.legend.width?s.config.legend.width+"px":"",s.dom.elLegendWrap.style.height=s.config.legend.height?s.config.legend.height+"px":"",I.setAttrs(p,{rel:h+1,seriesName:D.escapeString(i[h]),"data:collapsed":d||u}),(d||u)&&p.classList.add("apexcharts-inactive-legend"),s.config.legend.onItemClick.toggleDataSeries||p.classList.add("apexcharts-no-click")}s.dom.elWrap.addEventListener("click",t.onLegendClick,!0),s.config.legend.onItemHover.highlightDataSeries&&s.config.legend.customLegendItems.length===0&&(s.dom.elWrap.addEventListener("mousemove",t.onLegendHovered,!0),s.dom.elWrap.addEventListener("mouseout",t.onLegendHovered,!0)),s.config.chart.accessibility.enabled&&s.config.chart.accessibility.keyboard.enabled&&s.dom.elWrap.addEventListener("keydown",t.onLegendKeyDown.bind(t),!0)}setLegendWrapXY(e,t){const s=this.w,a=s.dom.elLegendWrap,i=a.clientHeight;let r=0,o=0;if(s.config.legend.position==="bottom")o=s.globals.svgHeight-Math.min(i,s.globals.svgHeight/2)-5;else if(s.config.legend.position==="top"){const l=new Le(this.w,this.ctx),n=l.dimHelpers.getTitleSubtitleCoords("title").height,h=l.dimHelpers.getTitleSubtitleCoords("subtitle").height;o=(n>0?n-10:0)+(h>0?h-10:0)}a.style.position="absolute",r=r+e+s.config.legend.offsetX,o=o+t+s.config.legend.offsetY,a.style.left=r+"px",a.style.top=o+"px",s.config.legend.position==="right"&&(a.style.left="auto",a.style.right=25+s.config.legend.offsetX+"px"),["width","height"].forEach(l=>{a.style[l]&&(a.style[l]=parseInt(s.config.legend[l],10)+"px")})}legendAlignHorizontal(){const e=this.w,t=e.dom.elLegendWrap;t.style.right=0;const s=new Le(this.w,this.ctx),a=s.dimHelpers.getTitleSubtitleCoords("title"),i=s.dimHelpers.getTitleSubtitleCoords("subtitle"),r=20;let o=0;e.config.legend.position==="top"&&(o=a.height+i.height+e.config.title.margin+e.config.subtitle.margin-10),this.setLegendWrapXY(r,o)}legendAlignVertical(){const e=this.w,t=this.legendHelpers.getLegendDimensions(),s=20;let a=0;e.config.legend.position==="left"&&(a=20),e.config.legend.position==="right"&&(a=e.globals.svgWidth-t.clww-10),this.setLegendWrapXY(a,s)}onLegendHovered(e){const t=this.w,s=e.target.classList.contains("apexcharts-legend-series")||e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker");if(t.config.chart.type!=="heatmap"&&!this.isBarsDistributed)!e.target.classList.contains("apexcharts-inactive-legend")&&s&&new j(this.ctx.w).toggleSeriesOnHover(e,e.target);else if(s){const a=parseInt(e.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,a,this.w]),new j(this.ctx.w).highlightRangeInSeries(e,e.target)}}onLegendKeyDown(e){const t=this,s=this.w;if((e.target.classList.contains("apexcharts-legend-series")||e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker"))&&(e.key==="Enter"||e.key===" ")){e.preventDefault();const a=e.target.getAttribute("rel");t.onLegendClick(e),a!==null&&s.config.legend.onItemClick.toggleDataSeries&&requestAnimationFrame(()=>{const i=s.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${a}"]`);i&&i.focus()})}}onLegendClick(e){const t=this.w;if(!t.config.legend.customLegendItems.length&&(e.target.classList.contains("apexcharts-legend-series")||e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker"))){const s=parseInt(e.target.getAttribute("rel"),10)-1,a=e.target.getAttribute("data:collapsed")==="true",i=this.w.config.chart.events.legendClick;typeof i=="function"&&i(this.ctx,s,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,s,this.w]);const r=this.w.config.legend.markers.onClick;typeof r=="function"&&e.target.classList.contains("apexcharts-legend-marker")&&(r(this.ctx,s,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,s,this.w])),t.config.chart.type!=="treemap"&&t.config.chart.type!=="heatmap"&&!this.isBarsDistributed&&t.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(s,a)}}}K.registerFeatures({legend:Is});const Es=`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000" height="24" viewBox="0 0 24 24" width="24"> 937 <defs> 938 <path d="M0 0h24v24H0z" id="a"/> 939 </defs> 940 <clipPath id="b"> 941 <use overflow="visible" xlink:href="#a"/> 942 </clipPath> 943 <path clip-path="url(#b)" d="M23 5.5V20c0 2.2-1.8 4-4 4h-7.3c-1.08
9430-2.1-.43-2.85-1.19L1 14.83s1.26-1.23 1.3-1.25c.22-.19.49-.29.79-.29.22 0 .42.06.6.16.04.01 4.31 2.46 4.31 2.46V4c0-.83.67-1.5 1.5-1.5S11 3.17 11 4v7h1V1.5c0-.83.67-1.5 1.5-1.5S15 .67 15 1.5V11h1V2.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V11h1V5.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5z"/> 944</svg>`,Ts=`<svg xmlns="http://www.w3.org/2000/svg" fill="#000000" height="24" viewBox="0 0 24 24" width="24"> 945 <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/> 946 <path d="M0 0h24v24H0V0z" fill="none"/> 947 <path d="M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"/> 948</svg>`,Xs=`<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"> 949 <path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/> 950 <path d="M0 0h24v24H0z" fill="none"/> 951</svg>`,Fs=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> 952 <path d="M0 0h24v24H0z" fill="none"/> 953 <path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/> 954</svg> 955`,Rs=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> 956 <path d="M0 0h24v24H0z" fill="none"/> 957 <path d="M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/> 958</svg> 959`,zs=`<svg fill="#6E8192" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"> 960 <path d="M0 0h24v24H0z" fill="none"/> 961 <path d="M3 5h2V3c-1.1 0-2 .9-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2z"/> 962</svg>`,Ys='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>';class At{constructor(e,t){this.w=e,this.ctx=t,this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=e.globals.minX,this.maxX=e.globals.maxX}createToolbar(){const e=this.w,t=()=>H.createElementNS("http://www.w3.org/1999/xhtml","div"),s=t();if(s.setAttribute("class","apexcharts-toolbar"),s.style.top=e.config.chart.toolbar.offsetY+"px",s.style.right=-e.config.chart.toolbar.offsetX+3+"px",e.dom.elWrap.appendChild(s),this.elZoom=t(),this.elZoomIn=t(),this.elZoomOut=t(),this.elPan=t(),this.elSelection=t(),this.elZoomReset=t(),this.elMenuIcon=t(),this.elMenu=t(),this.elCustomIcons=[],this.t=e.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(let o=0;o<this.t.customIcons.length;o++)this.elCustomIcons.push(t());const a=[],i=(o,l,n)=>{const h=o.toLowerCase();this.t[h]&&e.config.chart.zoom.enabled&&a.push({el:l,icon:typeof this.t[h]=="string"?this.t[h]:n,title:this.localeValues[o],class:`apexcharts-${h}-icon`})};i("zoomIn",this.elZoomIn,Fs),i("zoomOut",this.elZoomOut,Rs);const r=o=>{this.t[o]&&e.config.chart[o].enabled&&a.push({el:o==="zoom"?this.elZoom:this.elSelection,icon:typeof this.t[o]=="string"?this.t[o]:o==="zoom"?Ts:zs,title:this.localeValues[o==="zoom"?"selectionZoom":"selection"],class:`apexcharts-${o}-icon`})};r("zoom"),r("selection"),this.t.pan&&e.config.chart.zoom.enabled&&a.push({el:this.elPan,icon:typeof this.t.pan=="string"?this.t.pan:Es,title:this.localeValues.pan,class:"apexcharts-pan-icon"}),i("reset",this.elZoomReset,Xs),this.t.download&&a.push({el:this.elMenuIcon,icon:typeof this.t.download=="string"?this.t.download:Ys,title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(let o=0;o<this.elCustomIcons.length;o++)a.push({el:this.elCustomIcons[o],icon:this.t.customIcons[o].icon,title:this.t.customIcons[o].title,index:this.t.customIcons[o].index,class:"apexcharts-toolbar-custom-icon "+this.t.customIcons[o].class});a.forEach((o,l)=>{o.index&&D.moveIndexInArray(a,l,o.index)});for(let o=0;o<a.length;o++)I.setAttrs(a[o].el,{class:a[o].class,title:a[o].title,tabindex:"0",role:"button","aria-label":a[o].title}),a[o].el.innerHTML=a[o].icon,s.appendChild(a[o].el);this.elZoom.parentNode&&this.elZoom.setAttribute("aria-pressed",String(!!e.interact.zoomEnabled)),this.elSelection.parentNode&&this.elSelection.setAttribute("aria-pressed",String(!!e.interact.selectionEnabled)),this.elPan.parentNode&&this.elPan.setAttribute("aria-pressed",String(!!e.interact.panEnabled)),this.elMenuIcon.parentNode&&(this.elMenuIcon.setAttribute("aria-haspopup","true"),this.elMenuIcon.setAttribute("aria-expanded","fal
962se")),this._createHamburgerMenu(s),e.interact.zoomEnabled?this.elZoom.classList.add(this.selectedClass):e.interact.panEnabled?this.elPan.classList.add(this.selectedClass):e.interact.selectionEnabled&&this.elSelection.classList.add(this.selectedClass),this.addToolbarEventListeners()}_createHamburgerMenu(e){this.elMenuItems=[],e.appendChild(this.elMenu),I.setAttrs(this.elMenu,{class:"apexcharts-menu",role:"menu"});const t=[{name:"exportSVG",title:this.localeValues.exportToSVG},{name:"exportPNG",title:this.localeValues.exportToPNG},{name:"exportCSV",title:this.localeValues.exportToCSV}];for(let s=0;s<t.length;s++)this.elMenuItems.push(H.createElementNS("http://www.w3.org/1999/xhtml","div")),this.elMenuItems[s].innerHTML=t[s].title,I.setAttrs(this.elMenuItems[s],{class:`apexcharts-menu-item ${t[s].name}`,title:t[s].title,role:"menuitem",tabindex:"-1"}),this.elMenu.appendChild(this.elMenuItems[s])}addToolbarEventListeners(){this.elZoomReset.addEventListener("click",this.handleZoomReset.bind(this)),this.elSelection.addEventListener("click",this.toggleZoomSelection.bind(this,"selection")),this.elZoom.addEventListener("click",this.toggleZoomSelection.bind(this,"zoom")),this.elZoomIn.addEventListener("click",this.handleZoomIn.bind(this)),this.elZoomOut.addEventListener("click",this.handleZoomOut.bind(this)),this.elPan.addEventListener("click",this.togglePanning.bind(this)),this.elMenuIcon.addEventListener("click",this.toggleMenu.bind(this)),this.elMenuItems.forEach(e=>{e.classList.contains("exportSVG")?e.addEventListener("click",this.handleDownload.bind(this,"svg")):e.classList.contains("exportPNG")?e.addEventListener("click",this.handleDownload.bind(this,"png")):e.classList.contains("exportCSV")&&e.addEventListener("click",this.handleDownload.bind(this,"csv"))});for(let e=0;e<this.t.customIcons.length;e++)this.elCustomIcons[e].addEventListener("click",this.t.customIcons[e].click.bind(this,this.ctx,this.ctx.w));[this.elZoomReset,this.elSelection,this.elZoom,this.elZoomIn,this.elZoomOut,this.elPan,this.elMenuIcon,...this.elCustomIcons].forEach(e=>{e.addEventListener("keydown",t=>{if(t.key==="Enter"||t.key===" "){t.preventDefault();const s=e.className;e.click(),requestAnimationFrame(()=>{const a=this.w.dom.baseEl;if(!a)return;const i=s.split(" ").find(o=>o.startsWith("apexcharts-"));if(!i)return;const r=a.querySelector(`.${i}`);r&&r.focus()})}})}),this.elMenuIcon.addEventListener("keydown",e=>{(e.key==="ArrowDown"||e.key==="ArrowUp")&&(e.preventDefault(),this.elMenu.classList.contains("apexcharts-menu-open")||this.toggleMenu(),window.setTimeout(()=>{const t=e.key==="ArrowDown"?0:this.elMenuItems.length-1;this.elMenuItems[t]&&this.elMenuItems[t].focus()},20))}),this.elMenuItems.forEach((e,t)=>{e.addEventListener("keydown",s=>{s.key==="ArrowDown"?(s.preventDefault(),(this.elMenuItems[t+1]||this.elMenuItems[0]).focus()):s.key==="ArrowUp"?(s.preventDefault(),(this.elMenuItems[t-1]||this.elMenuItems[this.elMenuItems.length-1]).focus()):s.key==="Escape"||s.key==="Tab"?(this._closeMenu(),this.elMenuIcon.focus(),s.key==="Tab"||s.preventDefault()):(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),e.click())})})}toggleZoomSelection(e){this.ctx.getSyncedCharts().forEach(t=>{t.ctx.toolbar.toggleOtherControls();const s=e==="selection"?t.ctx.toolbar.elSelection:t.ctx.toolbar.elZoom,a=e==="selection"?"selectionEnabled":"zoomEnabled";t.w.globals[a]=!t.w.globals[a],s.classList.contains(t.ctx.toolbar.selectedClass)?s.classList.remove(t.ctx.toolbar.selectedClass):s.classList.add(t.ctx.toolbar.selectedClass),s.setAttribute("aria-pressed",String(t.w.globals[a]))})}getToolbarIconsReference(){const e=this.w;this.elZoom||(this.elZoom=e.dom.baseEl.querySelector(".apexcharts-zoom-icon")),this.elPan||(this.elPan=e.dom.baseEl.querySelector(".apexcharts-pan-icon")),this.elSelection||(this.elSelection=e.dom.baseEl.querySelector(".apexcharts-selection-icon"))}enableZoomPanFromToolbar(e){this.toggleOtherControls(),e==="pan"?this.w.interact.panEnabled=!0:this.w.interact.zoomEnabled=!0;const t=e==="pan"?this.elPan:this.elZoom,s=e==="pan"?this.elZoom:this.elPan;t&&t.classList.add(this.selectedClass),s&&s.classList.remove(this.selectedClass)}
962togglePanning(){this.ctx.getSyncedCharts().forEach(e=>{e.ctx.toolbar.toggleOtherControls(),e.w.interact.panEnabled=!e.w.interact.panEnabled,e.ctx.toolbar.elPan.classList.contains(e.ctx.toolbar.selectedClass)?e.ctx.toolbar.elPan.classList.remove(e.ctx.toolbar.selectedClass):e.ctx.toolbar.elPan.classList.add(e.ctx.toolbar.selectedClass),e.ctx.toolbar.elPan.setAttribute("aria-pressed",String(e.w.interact.panEnabled))})}toggleOtherControls(){const e=this.w;e.interact.panEnabled=!1,e.interact.zoomEnabled=!1,e.interact.selectionEnabled=!1,this.getToolbarIconsReference(),[this.elPan,this.elSelection,this.elZoom].forEach(t=>{t&&t.classList.remove(this.selectedClass)})}handleZoomIn(){const e=this.w;e.axisFlags.isRangeBar&&(this.minX=e.globals.minY,this.maxX=e.globals.maxY);const t=(this.minX+this.maxX)/2,s=(this.minX+t)/2,a=(this.maxX+t)/2,i=this._getNewMinXMaxX(s,a);e.interact.disableZoomIn||this.zoomUpdateOptions(i.minX,i.maxX)}handleZoomOut(){const e=this.w;if(e.axisFlags.isRangeBar&&(this.minX=e.globals.minY,this.maxX=e.globals.maxY),e.config.xaxis.type==="datetime"&&new Date(this.minX).getUTCFullYear()<1e3)return;const t=(this.minX+this.maxX)/2,s=this.minX-(t-this.minX),a=this.maxX-(t-this.maxX),i=this._getNewMinXMaxX(s,a);e.interact.disableZoomOut||this.zoomUpdateOptions(i.minX,i.maxX)}_getNewMinXMaxX(e,t){const s=this.w.config.xaxis.convertedCatToNumeric;return{minX:s?Math.floor(e):e,maxX:s?Math.floor(t):t}}zoomUpdateOptions(e,t){const s=this.w;if(e===void 0&&t===void 0){this.handleZoomReset();return}if(s.config.xaxis.convertedCatToNumeric&&(e<1&&(e=1,t=s.globals.dataPoints),t-e<2))return;let a={min:e,max:t};const i=this.getBeforeZoomRange(a);i&&(a=i.xaxis);const r={xaxis:a},o=D.clone(s.globals.initialConfig.yaxis);s.config.chart.group||(r.yaxis=o),this.w.interact.zoomed=!0,this.ctx.updateHelpers._updateOptions(r,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(a,o)}zoomCallback(e,t){typeof this.ev.zoomed=="function"&&(this.ev.zoomed(this.ctx,{xaxis:e,yaxis:t}),this.ctx.events.fireEvent("zoomed",{xaxis:e,yaxis:t}))}getBeforeZoomRange(e,t){let s=null;return typeof this.ev.beforeZoom=="function"&&(s=this.ev.beforeZoom(this,{xaxis:e,yaxis:t})),s}toggleMenu(){window.setTimeout(()=>{this.elMenu.classList.contains("apexcharts-menu-open")?this._closeMenu():(this.elMenu.classList.add("apexcharts-menu-open"),this.elMenuIcon.setAttribute("aria-expanded","true"))},0)}_closeMenu(){this.elMenu.classList.remove("apexcharts-menu-open"),this.elMenuIcon.setAttribute("aria-expanded","false")}handleDownload(e){const t=this.w,s=new Ct(this.w,this.ctx);switch(e){case"svg":s.exportToSVG(this.ctx);break;case"png":s.exportToPng(this.ctx);break;case"csv":s.exportToCSV({series:t.config.series,columnDelimiter:t.config.chart.toolbar.export.csv.columnDelimiter});break}}handleZoomReset(){this.ctx.getSyncedCharts().forEach(e=>{const t=e.w;if(t.globals.lastXAxis.min=t.globals.initialConfig.xaxis.min,t.globals.lastXAxis.max=t.globals.initialConfig.xaxis.max,e.updateHelpers.revertDefaultAxisMinMax(),typeof t.config.chart.events.beforeResetZoom=="function"){const a=t.config.chart.events.beforeResetZoom(e,t);a&&e.updateHelpers.revertDefaultAxisMinMax(a)}typeof t.config.chart.events.zoomed=="function"&&e.ctx.toolbar.zoomCallback({min:t.config.xaxis.min,max:t.config.xaxis.max}),t.interact.zoomed=!1;const s=e.ctx.series.emptyCollapsedSeries(D.clone(t.globals.initialSeries));e.updateHelpers._updateSeries(s,t.config.chart.animations.dynamicAnimation.enabled)})}destroy(){this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elZoomReset=null,this.elMenuIcon=null}}class Hs extends At{constructor(e,t){super(e,t),this.w=e,this.ctx=t,this.dragged=!1,this.graphics=new I(this.w),this.eventList=["mousedown","mouseleave","mousemove","touchstart","touchmove","mouseup","touchend","wheel"],this.clientX=0,this.clientY=0,this.startX=0,this.endX=0,this.dragX=0,this.startY=0,this.endY=0,this.dragY=0,this.moveDirection="none",this.debounceTimer=null,this.debounceDelay=100,this.wheelDelay=400}init({xyRatios:e}){const t=this.w,s=this;this.xyRatios=e,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.gridRect=t.dom.baseEl.querySelector(".apexcharts-grid"),this.constraints=new Ht(0,0,t.layout.gridWidth,t.layout.gridHeight),this.zoomRect.node.classList.add("apexcharts-zoom-rect"),this.selectionRect.node.classList.add("apexcharts-selection-rect"),t.dom.Paper.add(this.zoomRect),t.dom.Paper.add(this.selectionRect),t.config.chart.selection.type==="x"?this.slDraggableRect=this.selectionRect.draggable({minX:0,minY:0,maxX:t.layout.gridWidth,maxY:t.layout.gridHeight}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):t.config.chart.selection.type==="y"?this.slDraggableRect=this.selectionRect.draggable({minX:0,maxX:t.layout.gridWidth}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):this.slDraggableRect=this.selectionRect.draggable().on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")),this.preselectedSelection(),this.hoverArea=t.dom.baseEl.querySelector(`${t.globals.chartClass} .apexcharts-svg`),this.hoverArea.classList.add("apexcharts-zoomable"),this.eventList.forEach(a=>{this.hoverArea.addEventListener(a,s.svgMouseEvents.bind(s,e),{capture:!1,passive:!0})}),t.config.chart.zoom.enabled&&t.config.chart.zoom.allowMouseWheelZoom&&this.hoverArea.addEventListener("wheel",s.mouseWheelEvent.bind(s),{capture:!1,passive:!1})}destroy(){this.slDraggableRect&&(this.slDraggableRect.draggable(!1),this.slDraggableRect.off(),this.selectionRect.off()),this.selectionRect=null,this.zoomRect=null,this.gridRect=null}svgMouseEvents(e,t){const s=this.w,a=this.ctx.toolbar,i=s.interact.zoomEnabled?s.config.chart.zoom.type:s.config.chart.selection.type,r=s.config.chart.toolbar.autoSelected;if(t.shiftKey?(this.shiftWasPressed=!0,a.enableZoomPanFromToolbar(r==="pan"?"zoom":"pan")):this.shiftWasPressed&&(a.enableZoomPanFromToolbar(r),this.shiftWasPressed=!1),!t.target)return;const o=t.target.classList;let l;if(t.target.parentNode&&t.target.parentNode!==null&&(l=t.target.parentNode.classList),!(o.contains("apexcharts-legend-marker")||o.contains("apexcharts-legend-text")||l&&l.contains("apexcharts-toolbar"))){if(this.clientX=t.type==="touchmove"||t.type==="touchstart"?t.touches[0].clientX:t.type==="touchend"?t.changedTouches[0].clientX:t.clientX,this.clientY=t.type==="touchmove"||t.type==="touchstart"?t.touches[0].clientY:t.type==="touchend"?t.changedTouches[0].clientY:t.clientY,t.type==="mousedown"&&t.which===1||t.type==="touchstart"){const n=this.gridRect.getBoundingClientRect();this.startX=this.clientX-n.left-s.globals.barPadForNumericAxis,this.startY=this.clientY-n.top,this.dragged=!1,this.w.interact.mousedown=!0}(t.type==="mousemove"&&t.which===1||t.type==="touchmove")&&(this.dragged=!0,s.interact.panEnabled?(s.interact.selection=null,this.w.interact.mousedown&&this.panDragging({context:this,zoomtype:i,xyRatios:e})):(this.w.interact.mousedown&&s.interact.zoomEnabled||this.w.interact.mousedown&&s.interact.selectionEnabled)&&(this.selection=this.selectionDrawing({context:this,zoomtype:i}))),(t.type==="mouseup"||t.type==="touchend"||t.type==="mouseleave")&&this.handleMouseUp({zoomtype:i}),this.makeSelectionRectDraggable()}}handleMouseUp({zoomtype:e,isResized:t}){var s;const a=this.w,i=(s=this.gridRect)==null?void 0:s.getBoundingClientRect();i&&(this.w.interact.mousedown||t)&&(this.endX=this.clientX-i.left-a.globals.barPadForNumericAxis,this.endY=this.clientY-i.top,this.dragX=Math.abs(this.endX-this.startX),this.dragY=Math.abs(this.endY-this.startY),(a.interact.zoomEnabled||a.interact.selectionEnabled)&&this.selectionDrawn({context:this,zoomtype:e})),a.interact.zoomEnabled&&this.hideSelectionRect(this.selectionRect),this.dragged=!1,this.w.interact.mousedown=!1}mouseWheelEvent(e){const t=this.w;e.preventDefault();const s=Date.now();s-t.interact.lastWheelExecution>this.wheelDelay&&(this.executeMouseWheelZoom(e),t.interact.lastWheelExecution=s),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{s-t.interact.lastWheelExecution>this.wheelDelay&&(this.executeMouseWheelZoom(e),t.interact.lastWheelExecution=s)},this.debounceDelay)}executeMouseWheelZoom(e){var t;const s=this.w;this.minX=s.axisFlags.isRangeBar?s.globals.minY:s.globals.minX,this.maxX=s.axisFlags.isRangeBar?s.globals.maxY:s.globals.maxX;const a=(t=this.gridRect)==null?void 0:t.getBoundingClientRect();if(!a)return;const i=(e.clientX-a.left)/a.width,r=this.minX,o=this.maxX,l=o-r,n=.5,h=1.5;let c,d,u;if(e.deltaY<0){c=n*l;const p=r+i*l;d=p-c/2,u=p+c/2}else c=h*l,d=r-c/2,u=o+c/2;if(!s.axisFlags.isRangeBar){d=Math.max(d,s.globals.initialMinX),u=Math.min(u,s.globals.initialMaxX);const p=(s.globals.initialMaxX-s.globals.initialMinX)*.01;if(u-d<p){const b=(d+u)/2;d=b-p/2,u=b+p/2}}const g=this._getNewMinXMaxX(d,u);
962!isNaN(g.minX)&&!isNaN(g.maxX)&&this.zoomUpdateOptions(g.minX,g.maxX)}makeSelectionRectDraggable(){const e=this.w;if(!this.selectionRect)return;const t=this.selectionRect.node.getBoundingClientRect();t.width>0&&t.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:()=>{},updateRot:()=>{},createHandle:(s,a,i,r,o)=>o==="l"||o==="r"?s.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):s.circle(0),updateHandle:(s,a)=>s.center(a[0],a[1])}).resize().on("resize",()=>{const s=e.interact.zoomEnabled?e.config.chart.zoom.type:e.config.chart.selection.type;this.handleMouseUp({zoomtype:s,isResized:!0})}))}preselectedSelection(){const e=this.w,t=this.xyRatios;if(!e.interact.zoomEnabled){if(typeof e.interact.selection<"u"&&e.interact.selection!==null)this.drawSelectionRect(O(R({},e.interact.selection),{translateX:e.layout.translateX,translateY:e.layout.translateY}));else if(e.config.chart.selection.xaxis.min!==void 0&&e.config.chart.selection.xaxis.max!==void 0){let s=(e.config.chart.selection.xaxis.min-e.globals.minX)/t.xRatio,a=e.layout.gridWidth-(e.globals.maxX-e.config.chart.selection.xaxis.max)/t.xRatio-s;e.axisFlags.isRangeBar&&(s=(e.config.chart.selection.xaxis.min-e.globals.yAxisScale[0].niceMin)/t.invertedYRatio,a=(e.config.chart.selection.xaxis.max-e.config.chart.selection.xaxis.min)/t.invertedYRatio);const i={x:s,y:0,width:a,height:e.layout.gridHeight,translateX:e.layout.translateX,translateY:e.layout.translateY,selectionEnabled:!0};this.drawSelectionRect(i),this.makeSelectionRectDraggable(),typeof e.config.chart.events.selection=="function"&&e.config.chart.events.selection(this.ctx,{xaxis:{min:e.config.chart.selection.xaxis.min,max:e.config.chart.selection.xaxis.max},yaxis:{}})}}}drawSelectionRect({x:e,y:t,width:s,height:a,translateX:i=0,translateY:r=0}){const o=this.w,l=this.zoomRect,n=this.selectionRect;if(this.dragged||o.interact.selection!==null){const h={transform:"translate("+i+", "+r+")"};o.interact.zoomEnabled&&this.dragged&&(s<0&&(s=1),l.attr({x:e,y:t,width:s,height:a,fill:o.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":o.config.chart.zoom.zoomedArea.fill.opacity,stroke:o.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":o.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":o.config.chart.zoom.zoomedArea.stroke.opacity}),I.setAttrs(l.node,h)),o.interact.selectionEnabled&&(n.attr({x:e,y:t,width:s>0?s:0,height:a>0?a:0,fill:o.config.chart.selection.fill.color,"fill-opacity":o.config.chart.selection.fill.opacity,stroke:o.config.chart.selection.stroke.color,"stroke-width":o.config.chart.selection.stroke.width,"stroke-dasharray":o.config.chart.selection.stroke.dashArray,"stroke-opacity":o.config.chart.selection.stroke.opacity}),I.setAttrs(n.node,h))}}hideSelectionRect(e){e&&e.attr({x:0,y:0,width:0,height:0})}selectionDrawing({context:e,zoomtype:t}){const s=this.w,a=e,i=this.gridRect.getBoundingClientRect(),r=a.startX-1,o=a.startY;let l=!1,n=!1;const h=a.clientX-i.left-s.globals.barPadForNumericAxis,c=a.clientY-i.top;let d=h-r,u=c-o,g={translateX:s.layout.translateX,translateY:s.layout.translateY};return Math.abs(d+r)>s.layout.gridWidth?d=s.layout.gridWidth-r:h<0&&(d=r),r>h&&(l=!0,d=Math.abs(d)),o>c&&(n=!0,u=Math.abs(u)),t==="x"?g={x:l?r-d:r,y:0,width:d,height:s.layout.gridHeight}:t==="y"?g={x:0,y:n?o-u:o,width:s.layout.gridWidth,height:u}:g={x:l?r-d:r,y:n?o-u:o,width:d,height:u},g=O(R({},g),{translateX:s.layout.translateX,translateY:s.layout.translateY}),a.drawSelectionRect(g),a.selectionDragging("resizing"),g}selectionDragging(e,t){const s=this.w;if(!t)return;t.preventDefault();const{handler:a,box:i}=t.detail;let{x:r,y:o}=i;r<this.constraints.x&&(r=this.constraints.x),o<this.constraints.y&&(o=this.constraints.y),i.x2>this.constraints.x2&&(r=this.constraints.x2-i.w),i.y2>this.constraints.y2&&(o=this.constraints.y2-i.h),a.move(r,o);const l=this.xyRatios,n=this.selectionRect;let h=0;e==="resizing"&&(h=30);const c=u=>parseFloat(n.node.getAttribute(u)),d={x:c("x"),y:c("y"),width:c("width"),height:c("height")};s.interact.selection=d,typeof s.config.chart.events.selection=="function"&&s.interact.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout(()=>{const u=this.gridRect.getBoundingClientRect(),g=n.node.getBoundingClientRect();let p,b,f,m;s.axisFlags.isRangeBar?(p=s.globals.yAxisScale[0].niceMin+(g.left-u.left)*l.invertedYRatio,b=s.globals.yAxisScale[0].niceMin+(g.right-u.left)*l.invertedYRatio,f=0,m=1):(p=s.globals.xAxisScale.niceMin+(g.left-u.left)*l.xRatio,b=s.globals.xAxisScale.niceMin+(g.right-u.left)*l.xRatio,f=s.globals.yAxisScale[0].niceMin+(u.bottom-g.bottom)*l.yRatio[0],m=s.globals.yAxisScale[0].niceMax-(g.top-u.top)*l.y
962Ratio[0]);const v={xaxis:{min:p,max:b},yaxis:{min:f,max:m}};s.config.chart.events.selection(this.ctx,v),s.config.chart.brush.enabled&&s.config.chart.events.brushScrolled!==void 0&&s.config.chart.events.brushScrolled(this.ctx,v)},h))}selectionDrawn({context:e,zoomtype:t}){const s=this.w,a=e,i=this.xyRatios,r=this.ctx.toolbar,o=s.interact.zoomEnabled?a.zoomRect.node.getBoundingClientRect():a.selectionRect.node.getBoundingClientRect(),l=a.gridRect.getBoundingClientRect(),n=o.left-l.left-s.globals.barPadForNumericAxis,h=o.right-l.left-s.globals.barPadForNumericAxis,c=o.top-l.top,d=o.bottom-l.top;let u,g;s.axisFlags.isRangeBar?(u=s.globals.yAxisScale[0].niceMin+n*i.invertedYRatio,g=s.globals.yAxisScale[0].niceMin+h*i.invertedYRatio):(u=s.globals.xAxisScale.niceMin+n*i.xRatio,g=s.globals.xAxisScale.niceMin+h*i.xRatio);const p=[],b=[];if(s.config.yaxis.forEach((f,m)=>{const v=s.globals.seriesYAxisMap[m][0],y=s.globals.yAxisScale[m].niceMax-i.yRatio[v]*c,w=s.globals.yAxisScale[m].niceMax-i.yRatio[v]*d;p.push(y),b.push(w)}),a.dragged&&(a.dragX>10||a.dragY>10)&&u!==g){if(s.interact.zoomEnabled){let f=D.clone(s.globals.initialConfig.yaxis),m=D.clone(s.globals.initialConfig.xaxis);if(s.interact.zoomed=!0,s.config.xaxis.convertedCatToNumeric&&(u=Math.floor(u),g=Math.floor(g),u<1&&(u=1,g=s.globals.dataPoints),g-u<2&&(g=u+1)),(t==="xy"||t==="x")&&(m={min:u,max:g}),(t==="xy"||t==="y")&&f.forEach((y,w)=>{f[w].min=b[w],f[w].max=p[w]}),r){const y=r.getBeforeZoomRange(m,f);y&&(m=y.xaxis?y.xaxis:m,f=y.yaxis?y.yaxis:f)}const v={xaxis:m};s.config.chart.group||(v.yaxis=f),a.ctx.updateHelpers._updateOptions(v,!1,a.w.config.chart.animations.dynamicAnimation.enabled),typeof s.config.chart.events.zoomed=="function"&&r.zoomCallback(m,f)}else if(s.interact.selectionEnabled){let f=null,m=null;m={min:u,max:g},(t==="xy"||t==="y")&&(f=D.clone(s.config.yaxis),f.forEach((v,y)=>{f[y].min=b[y],f[y].max=p[y]})),s.interact.selection=a.selection,typeof s.config.chart.events.selection=="function"&&s.config.chart.events.selection(a.ctx,{xaxis:m,yaxis:f})}}}panDragging({context:e}){const t=this.w,s=e;if(typeof t.interact.lastClientPosition.x<"u"){const r=t.interact.lastClientPosition.x-s.clientX,o=t.interact.lastClientPosition.y-s.clientY;Math.abs(r)>Math.abs(o)&&r>0?this.moveDirection="left":Math.abs(r)>Math.abs(o)&&r<0?this.moveDirection="right":Math.abs(o)>Math.abs(r)&&o>0?this.moveDirection="up":Math.abs(o)>Math.abs(r)&&o<0&&(this.moveDirection="down")}t.interact.lastClientPosition={x:s.clientX,y:s.clientY};const a=t.axisFlags.isRangeBar?t.globals.minY:t.globals.minX,i=t.axisFlags.isRangeBar?t.globals.maxY:t.globals.maxX;s.panScrolled(a,i)}panScrolled(e,t){const s=this.w,a=this.xyRatios,i=D.clone(s.globals.initialConfig.yaxis);let r=a.xRatio,o=s.globals.minX,l=s.globals.maxX;s.axisFlags.isRangeBar&&(r=a.invertedYRatio,o=s.globals.minY,l=s.globals.maxY),this.moveDirection==="left"?(e=o+s.layout.gridWidth/15*r,t=l+s.layout.gridWidth/15*r):this.moveDirection==="right"&&(e=o-s.layout.gridWidth/15*r,t=l-s.layout.gridWidth/15*r),s.axisFlags.isRangeBar||(e<s.globals.initialMinX||t>s.globals.initialMaxX)&&(e=o,t=l);const n={xaxis:{min:e,max:t}};s.config.chart.group||(n.yaxis=i),this.updateScrolledChart(n,e,t)}updateScrolledChart(e,t,s){const a=this.w;if(this.ctx.updateHelpers._updateOptions(e,!1,!1),typeof a.config.chart.events.scrolled=="function"){const i={xaxis:{min:t,max:s}};a.config.chart.events.scrolled(this.ctx,i),this.ctx.events.fireEvent("scrolled",i)}}}K.registerFeatures({toolbar:At,zoomPanSelection:Hs});let Ie=class{constructor(x){this.w=x.w,this.annoCtx=x}setOrientations(x,e=null){const t=this.w;if(x.label.orientation==="vertical"){const s=e!==null?e:0,a=t.dom.baseEl.querySelector(`.apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='${s}']`);if(a!==null){const i=a.getBBox();a.setAttribute("x",parseFloat(a.getAttribute("x"))-i.height+4);const r=x.label.position==="top"?i.width:-i.width;a.setAttribute("y",parseFloat(a.getAttribute("y"))+r);const{x:o,y:l}=this.annoCtx.graphics.rotateAroundCenter(a);a.setAttribute("transform",`rotate(-90 ${o} ${l})`)}}}
962addBackgroundToAnno(x,e){const t=this.w;if(!x||!e.label.text||!String(e.label.text).trim())return null;const s=t.dom.baseEl.querySelector(".apexcharts-grid"),a=s.getBoundingClientRect(),i=s.getBBox(),r=a.width/i.width||1,o=x.getBoundingClientRect();let{left:l,right:n,top:h,bottom:c}=e.label.style.padding;e.label.orientation==="vertical"&&([h,c,l,n]=[l,n,h,c]);const d=(o.left-a.left)/r-l,u=(o.top-a.top)/r-h,g=this.annoCtx.graphics.drawRect(d-t.globals.barPadForNumericAxis,u,o.width/r+l+n,o.height/r+h+c,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&g.node.classList.add(e.id),g}annotationsBackground(){const x=this.w,e=(t,s,a)=>{const i=x.dom.baseEl.querySelector(`.apexcharts-${a}-annotations .apexcharts-${a}-annotation-label[rel='${s}']`);if(i){const r=i.parentNode,o=this.addBackgroundToAnno(i,t);o&&(r.insertBefore(o.node,i),t.label.mouseEnter&&o.node.addEventListener("mouseenter",t.label.mouseEnter.bind(this,t)),t.label.mouseLeave&&o.node.addEventListener("mouseleave",t.label.mouseLeave.bind(this,t)),t.label.click&&o.node.addEventListener("click",t.label.click.bind(this,t)))}};x.config.annotations.xaxis.forEach((t,s)=>e(t,s,"xaxis")),x.config.annotations.yaxis.forEach((t,s)=>e(t,s,"yaxis")),x.config.annotations.points.forEach((t,s)=>e(t,s,"point"))}getY1Y2(x,e){var t;const s=this.w,a=x==="y1"?e.y:e.y2;let i,r=!1;if(this.annoCtx.invertAxis){const o=s.config.xaxis.convertedCatToNumeric?s.labelData.categoryLabels:s.labelData.labels,l=o.indexOf(a),n=s.dom.baseEl.querySelector(`.apexcharts-yaxis-texts-g text:nth-child(${l+1})`);i=n?parseFloat(n.getAttribute("y")):(s.layout.gridHeight/o.length-1)*(l+1)-s.globals.barHeight,e.seriesIndex!==void 0&&s.globals.barHeight&&(i-=s.globals.barHeight/2*(s.seriesData.series.length-1)-s.globals.barHeight*e.seriesIndex)}else{const o=s.globals.seriesYAxisMap[e.yAxisIndex][0],l=s.config.yaxis[e.yAxisIndex].logarithmic?new $(this.w).getLogVal(s.config.yaxis[e.yAxisIndex].logBase,a,o)/s.globals.yLogRatio[o]:(a-s.globals.minYArr[o])/(s.globals.yRange[o]/s.layout.gridHeight);i=s.layout.gridHeight-Math.min(Math.max(l,0),s.layout.gridHeight),r=l>s.layout.gridHeight||l<0,e.marker&&(e.y===void 0||e.y===null)&&(i=0),(t=s.config.yaxis[e.yAxisIndex])!=null&&t.reversed&&(i=l)}return typeof a=="string"&&a.includes("px")&&(i=parseFloat(a)),{yP:i,clipped:r}}getX1X2(x,e){const t=this.w,s=x==="x1"?e.x:e.x2,a=this.annoCtx.invertAxis?t.globals.minY:t.globals.minX,i=this.annoCtx.invertAxis?t.globals.maxY:t.globals.maxX,r=this.annoCtx.invertAxis?t.globals.yRange[0]:t.globals.xRange;let o=!1,l=this.annoCtx.inversedReversedAxis?(i-s)/(r/t.layout.gridWidth):(s-a)/(r/t.layout.gridWidth);return(t.config.xaxis.type==="category"||t.config.xaxis.convertedCatToNumeric)&&!this.annoCtx.invertAxis&&!t.axisFlags.dataFormatXNumeric&&(t.config.chart.sparkline.enabled||(l=this.getStringX(s))),typeof s=="string"&&s.includes("px")&&(l=parseFloat(s)),s==null&&e.marker&&(l=t.layout.gridWidth),e.seriesIndex!==void 0&&t.globals.barWidth&&!this.annoCtx.invertAxis&&(l-=t.globals.barWidth/2*(t.seriesData.series.length-1)-t.globals.barWidth*e.seriesIndex),typeof l!="number"&&(l=0,o=!0),parseFloat(l.toFixed(10))>parseFloat(t.layout.gridWidth.toFixed(10))?(l=t.layout.gridWidth,o=!0):l<0&&(l=0,o=!0),{x:l,clipped:o}}getStringX(x){const e=this.w;let t=x;e.config.xaxis.convertedCatToNumeric&&e.labelData.categoryLabels.length&&(x=e.labelData.categoryLabels.indexOf(x)+1);const s=e.labelData.labels.map(i=>Array.isArray(i)?i.join(" "):i).indexOf(x),a=e.dom.baseEl.querySelector(`.apexcharts-xaxis-texts-g text:nth-child(${s+1})`);return a&&(t=parseFloat(a.getAttribute("x"))),t}};class Bs{constructor(e){this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Ie(this.annoCtx)}addXaxisAnnotation(e,t,s){const a=this.w,i=this.helpers.getX1X2("x1",e);let r=i.x;const o=i.clipped;let l=!0,n;const h=e.label.text,c=e.strokeDashArray;if(D.isNumber(r)){if(e.x2===null||typeof e.x2>"u"){if(!o){const d=this.annoCtx.graphics.drawLine(r+e.offsetX,0+e.offsetY,r+e.offsetX,a.layout.gridHeight+e.offsetY,e.borderColor,c,e.borderWidth);t.appendChild(d.node),e.id&&d.node.classList.add(e.id)}}else{const d=this.helpers.getX1X2("x2",e);if(n=d.x,l=d.clipped,n<r){const g=r;r=n,n=g}const u=this.annoCtx.graphics.drawRect(r+e.offsetX,0+e.offsetY,n-r,a.layout.gridHeight+e.offsetY,0,e.fillColor,e.opacity,1,e.borderColor,c);u.node.classList.add("apexcharts-annotation-rect"),u.attr("clip-path",`url(#gridRectMask${a.globals.cuid})`),t.appendChild(u.node),e.id&&u.node.classList.add(e.id)}if(!(o&&l)){const d=this.annoCtx.graphics.getTextRects(h,parseFloat(e.label.style.fontSize)),u=e.label.position==="top"?4:e.label.position==="center"?a.layout.gridHeight/2+(e.label.orientation==="vertical"?d.width/2:0):a.layout.gridHeight,g
vendor: 5,850 bytes, line 962
962=this.annoCtx.graphics.drawText({x:r+e.label.offsetX,y:u+e.label.offsetY-(e.label.orientation==="vertical"?e.label.position==="top"?d.width/2-12:-d.width/2:0),text:h,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:`apexcharts-xaxis-annotation-label ${e.label.style.cssClass} ${e.id?e.id:""}`});g.attr({rel:s}),t.appendChild(g.node),this.annoCtx.helpers.setOrientations(e,s)}}}drawXAxisAnnotations(){const e=this.w,t=this.annoCtx.graphics.group({class:"apexcharts-xaxis-annotations"});return e.config.annotations.xaxis.map((s,a)=>{this.addXaxisAnnotation(s,t.node,a)}),t}}class Os{constructor(e){this.w=e.w,this.annoCtx=e,this.helpers=new Ie(this.annoCtx),this.axesUtils=new ie(this.annoCtx.w,{theme:this.annoCtx.theme,timeScale:this.annoCtx.timeScale})}addYaxisAnnotation(e,t,s){const a=this.w,i=e.strokeDashArray;let r=this.helpers.getY1Y2("y1",e),o=r.yP;const l=r.clipped;let n,h=!0,c=!1;const d=e.label.text;if(e.y2===null||typeof e.y2>"u"){if(!l){c=!0;const u=this.annoCtx.graphics.drawLine(0+e.offsetX,o+e.offsetY,this._getYAxisAnnotationWidth(e),o+e.offsetY,e.borderColor,i,e.borderWidth);t.appendChild(u.node),e.id&&u.node.classList.add(e.id)}}else{if(r=this.helpers.getY1Y2("y2",e),n=r.yP,h=r.clipped,n>o){const u=o;o=n,n=u}if(!(l&&h)){c=!0;const u=this.annoCtx.graphics.drawRect(0+e.offsetX,n+e.offsetY,this._getYAxisAnnotationWidth(e),o-n,0,e.fillColor,e.opacity,1,e.borderColor,i);u.node.classList.add("apexcharts-annotation-rect"),u.attr("clip-path",`url(#gridRectMask${a.globals.cuid})`),t.appendChild(u.node),e.id&&u.node.classList.add(e.id)}}if(c){const u=e.label.position==="right"?a.layout.gridWidth:e.label.position==="center"?a.layout.gridWidth/2:0,g=this.annoCtx.graphics.drawText({x:u+e.label.offsetX,y:(n??o)+e.label.offsetY-3,text:d,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:`apexcharts-yaxis-annotation-label ${e.label.style.cssClass} ${e.id?e.id:""}`});g.attr({rel:s}),t.appendChild(g.node)}}_getYAxisAnnotationWidth(e){const t=this.w;let s=t.layout.gridWidth;return e.width.indexOf("%")>-1?s=t.layout.gridWidth*parseInt(e.width,10)/100:s=parseInt(e.width,10),s+e.offsetX}drawYAxisAnnotations(){const e=this.w,t=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return e.config.annotations.yaxis.forEach((s,a)=>{s.yAxisIndex=this.axesUtils.translateYAxisIndex(s.yAxisIndex),this.axesUtils.isYAxisHidden(s.yAxisIndex)&&this.axesUtils.yAxisAllSeriesCollapsed(s.yAxisIndex)||this.addYaxisAnnotation(s,t.node,a)}),t}}class Ns{constructor(e){this.w=e.w,this.annoCtx=e,this.helpers=new Ie(this.annoCtx)}addPointAnnotation(e,t,s){if(this.w.globals.collapsedSeriesIndices.indexOf(e.seriesIndex)>-1)return;let a=this.helpers.getX1X2("x1",e);const i=a.x,r=a.clipped;a=this.helpers.getY1Y2("y1",e);const o=a.yP,l=a.clipped;if(D.isNumber(i)&&!(l||r)){const n={pSize:e.marker.size,pointStrokeWidth:e.marker.strokeWidth,pointFillColor:e.marker.fillColor,pointStrokeColor:e.marker.strokeColor,shape:e.marker.shape,pRadius:e.marker.radius,class:`apexcharts-point-annotation-marker ${e.marker.cssClass} ${e.id?e.id:""}`};let h=this.annoCtx.graphics.drawMarker(i+e.marker.offsetX,o+e.marker.offsetY,n);t.appendChild(h.node);const c=e.label.text?e.label.text:"",d=this.annoCtx.graphics.drawText({x:i+e.label.offsetX,y:o+e.label.offsetY-e.marker.size-parseFloat(e.label.style.fontSize)/1.6,text:c,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:`apexcharts-point-annotation-label ${e.label.style.cssClass} ${e.id?e.id:""}`});if(d.attr({rel:s}),t.appendChild(d.node),e.customSVG.SVG){const u=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+e.customSVG.cssClass});u.attr({transform:`translate(${i+e.customSVG.offsetX}, ${o+e.customSVG.offsetY})`}),u.node.innerHTML=e.customSVG.SVG,t.appendChild(u.node)}if(e.image.path){const u=e.image.width?e.image.width:20,g=e.image.height?e.image.height:20;h=this.annoCtx.addImage({x:i+e.image.offsetX-u/2,y:o+e.image.offsetY-g/2,width:u,height:g,path:e.image.path,appendTo:".apexcharts-point-annotations"})}e.mouseEnter&&h.node.addEventListener("mouseenter",e.mouseEnter.bind(this,e)),e.mouseLeave&&h.node.addEventListener("mouseleave",e.mouseLeave.bind(this,e)),e.click&&h.node.addEventListener("click",e.click.bind(this,e))}}drawPointAnnotations(){const e=this.w,t=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return e.config.annotations.points.map((s,a)=>{this.addPointAnnotation(s,t.node,a)}),t}}class Ws{constructor(e,{theme:t=null,timeScale:s=null}={}){this.w=e,this.theme=t,this.timeScale=s,this.graphics=new I(this.w),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new Ie(this),this.xAxisAnnotations=new Bs(this),this.yAxisAnnotations=new Os(this),this.pointsAnnotations=new Ns(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.layout.gridWidth/this.w.globals.dataPoints}drawAxesAnnotations(){const e=this.w;if(e.globals.axisCharts&&e.globals.dataPoints){const t=this.yAxisAnnotations.drawYAxisAnnotations(),s=this.xAxisAnnotations.drawXAxisAnnotations(),a=this.pointsAnnotations.drawPointAnnotations(),i=e.config.chart.animations.enabled,r=[t,s,a],o=[s.node,t.node,a.node];for(let l=0;l<3;l++)e.dom.elGraphical.add(r[l]),i&&!e.globals.resized&&!e.globals.dataChanged&&e.config.chart.type!=="scatter"&&e.config.chart.type!=="bubble"&&e.globals.dataPoints>1&&o[l].classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:o[l],index:0});
962this.helpers.annotationsBackground()}}drawImageAnnos(){this.w.config.annotations.images.map((e,t)=>{this.addImage(e,t)})}drawTextAnnos(){this.w.config.annotations.texts.map((e,t)=>{this.addText(e,t)})}addXaxisAnnotation(e,t,s){this.xAxisAnnotations.addXaxisAnnotation(e,t,s)}addYaxisAnnotation(e,t,s){this.yAxisAnnotations.addYaxisAnnotation(e,t,s)}addPointAnnotation(e,t,s){this.pointsAnnotations.addPointAnnotation(e,t,s)}addText(e){const{x:t,y:s,text:a,textAnchor:i,foreColor:r,fontSize:o,fontFamily:l,fontWeight:n,cssClass:h,backgroundColor:c,borderWidth:d,strokeDashArray:u,borderRadius:g,borderColor:p,appendTo:b=".apexcharts-svg",paddingLeft:f=4,paddingRight:m=4,paddingBottom:v=2,paddingTop:y=2}=e,w=this.w,C=this.graphics.drawText({x:t,y:s,text:a,textAnchor:i||"start",fontSize:o||"12px",fontWeight:n||"regular",fontFamily:l||w.config.chart.fontFamily,foreColor:r||w.config.chart.foreColor,cssClass:"apexcharts-text "+h?h:""}),A=w.dom.baseEl.querySelector(b);A&&A.appendChild(C.node);const L=C.bbox();if(a){const S=this.graphics.drawRect(L.x-f,L.y-y,L.width+f+m,L.height+v+y,g,c||"transparent",1,d,p,u);A.insertBefore(S.node,C.node)}}addImage(e){const t=this.w,{path:s,x:a=0,y:i=0,width:r=20,height:o=20,appendTo:l=".apexcharts-svg"}=e,n=t.dom.Paper.image(s);n.size(r,o).move(a,i);const h=t.dom.baseEl.querySelector(l);return h&&h.appendChild(n.node),n}addXaxisAnnotationExternal(e,t,s){return this.addAnnotationExternal({params:e,pushToMemory:t,context:s,type:"xaxis",contextMethod:s.addXaxisAnnotation}),s}addYaxisAnnotationExternal(e,t,s){return this.addAnnotationExternal({params:e,pushToMemory:t,context:s,type:"yaxis",contextMethod:s.addYaxisAnnotation}),s}addPointAnnotationExternal(e,t,s){return typeof this.invertAxis>"u"&&(this.invertAxis=s.w.globals.isBarHorizontal),this.addAnnotationExternal({params:e,pushToMemory:t,context:s,type:"point",contextMethod:s.addPointAnnotation}),s}addAnnotationExternal({params:e,pushToMemory:t,context:s,type:a,contextMethod:i}){const r=s,o=r.w,l=o.dom.baseEl.querySelector(`.apexcharts-${a}-annotations`),n=l.childNodes.length+1,h=new le,c=Object.assign({},a==="xaxis"?h.xAxisAnnotation:a==="yaxis"?h.yAxisAnnotation:h.pointAnnotation),d=D.extend(c,e);switch(a){case"xaxis":this.addXaxisAnnotation(d,l,n);break;case"yaxis":this.addYaxisAnnotation(d,l,n);break;case"point":this.addPointAnnotation(d,l,n);break}const u=o.dom.baseEl.querySelector(`.apexcharts-${a}-annotations .apexcharts-${a}-annotation-label[rel='${n}']`),g=this.helpers.addBackgroundToAnno(u,d);return g&&l.insertBefore(g.node,u),t&&o.globals.memory.methodsToExec.push({context:r,id:d.id?d.id:D.randomId(),method:i,label:"addAnnotation",params:e}),s}clearAnnotations(e){const t=e.w;let s=t.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations");for(let a=t.globals.memory.methodsToExec.length-1;a>=0;a--)(t.globals.memory.methodsToExec[a].label==="addText"||t.globals.memory.methodsToExec[a].label==="addAnnotation")&&t.globals.memory.methodsToExec.splice(a,1);s=Array.from(s),Array.prototype.forEach.call(s,a=>{for(;a.firstChild;)a.removeChild(a.firstChild)})}removeAnnotation(e,t){const s=e.w,a=s.dom.baseEl.querySelectorAll(`.${t}`);a&&(s.globals.memory.methodsToExec.map((i,r)=>{i.id===t&&s.globals.memory.methodsToExec.splice(r,1)}),Object.keys(s.config.annotations).forEach(i=>{const r=s.config.annotations[i];Array.isArray(r)&&(s.config.annotations[i]=r.filter(o=>o.id!==t))}),Array.prototype.forEach.call(a,i=>{i.parentElement.removeChild(i)}))}}K.registerFeatures({annotations:Ws});class _s{constructor(e,t){this.w=e,this.ctx=t,this.seriesIndex=0,this.dataPointIndex=0,this.active=!1,this._focusedEl=null,this._hoveredBarEl=null,this._enlargedScatterMarker=null,this._onKeyDown=this._onKeyDown.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this),this._onLegendClick=this._onLegendClick.bind(this)}init(){const e=this.w.dom.Paper.node;e&&(e.setAttribute("tabindex","0"),e.addEventListener("focus",this._onFocus),e.addEventListener("blur",this._onBlur),e.addEventListener("keydown",this._onKeyDown,{passive:!1}),this.ctx.events.addEventListener("legendClick",this._onLegendClick))}destroy(){const e=this.w,t=e.dom.Paper&&e.dom.Paper.node;t&&(t.removeEventListener("focus",this._onFocus),t.removeEventListener("blur",this._onBlur),t.removeEventListener("keydown",this._onKeyDown),this.ctx.events.removeEventListener("legendClick",this._onLegendClick))}handleKey(e){}_onFocus(){this._isNavEnabled()&&(this.active=!0,this._clampCursor(),this._snapToVisibleRange(),this._showCurrentPoint())}_onBlur(){this.active=!1,this._hideFocus()}_onLegendClick(){this.active&&(this.active=!1,this._hideFocus())}_onKeyDown(e){if(!(!this._isNavEnabled()||!this.active))switch(e.key){case"ArrowRight":e.preventDefault(),this._move(0,1);break;case"ArrowLeft":e.preventDefault(),this._move(0,-1);break;case"ArrowUp":e.preventDefault(),this._move(-1,0);break;case"ArrowDown":e.preventDefault(),this._move(1,0);break;case"Home":e.preventDefault(),this.dataPointIndex=0,this._skipNullForward(),this._showCurrentPoint();break;case"End":e.preventDefault(),this.dataPointIndex=this._getDataPointCount(this.seriesIndex)-1,this._skipNullBackward(),this._showCurrentPoint();break;case"Enter":case" ":e.preventDefault(),this._fireClick();break;case"Escape":e.preventDefault(),this.active=!1,this._hideFocus();break}}_move(e,t){const s=this.w,a=s.config.chart.accessibility.keyboard.navigation.wrapAround;if(e!==0){const i=this.w.globals.tooltip;if(i&&i.tConfig&&i.tConfig.shared){const h=this.dataPointIndex;if(i.tooltipUtil&&i.tooltipUtil.isXoverlap(h)&&i.tooltipUtil.isInitialSeriesSameLen())return}const r=this._getSeriesCount();let o=this.seriesIndex+e,l=0;for(;l<r&&(o<0&&(o=a?r-1:0),o>=r&&(o=a?0:r-1),!!s.globals.collapsedSeriesIndices.includes(o));)o+=e,l++;this.seriesIndex=o;const n=this._getDataPointCount(o);this.dataPointIndex>=n&&(this.dataPointIndex=n-1)}if(t!==0){const i=this._getDataPointCount(this.seriesIndex);let r=this.dataPointIndex+t;r<0&&(r=a?i-1:0),r>=i&&(r=a?0:i-1),this.dataPointIndex=r,t>0?this._skipNullForward():this._skipNullBackward(),this._isDataPointVisible(this.seriesIndex,this.dataPointIndex)||this._snapToVisibleRangeInDirection(t)}this._showCurrentPoint()}_skipNullForward(){const e=this.w,t=this.seriesIndex,s=this._getDataPointCount(t);let a=this.dataPointIndex,i=0;if(Array.isArray(e.seriesData.series[t])){for(;i<s&&e.seriesData.series[t][a]===null;)a=(a+1)%s,i++;this.dataPointIndex=a}}_skipNullBackward(){const e=this.w,t=this.seriesIndex,s=this._getDataPointCount(t);let a=this.dataPointIndex,i=0;if(Array.isArray(e.seriesData.series[t])){for(;i<s&&e.seriesData.series[t][a]===null;)a=(a-1+s)%s,i++;this.dataPointIndex=a}}_showCurrentPoint(){const{seriesIndex:e,dataPointIndex:t}=this,s=this.w,a=s.globals.tooltip;!a||!a.ttItems||(s.interact.capturedSeriesIndex=e,s.interact.capturedDataPointIndex=t,this._applyFocusClass(e,t),this._showTooltip(e,t,a))}_hideFocus(){const e=this.w,t=e.globals.tooltip;if(this._removeFocusClass(),this._leaveHoveredBar(),!t)return;t.marker&&t.marker.resetPointsSize(),this._enlargedScatterMarker=null;const s=t.getElTooltip();s&&(s.classList.remove("apexcharts-active"),e.config.chart.accessibility.enabled&&e.config.chart.accessibility.announcements.enabled&&s.setAttribute("aria-hidden","true")),e.dom.baseEl.classList.remove("apexcharts-tooltip-active");const a=t.getElXCrosshairs();a&&a.classList.remove("apexcharts-active")}_showTooltip(e,t,s){const a=this.w,i=a.config.chart.type,r=s.getElTooltip();if(!r)return;const o=s.getCachedDimensions();s.tooltipRect={x:0,y:0,ttWidth:o.ttWidth||0,ttHeight:o.ttHeight||0},this._setSyntheticEvent(e,t,s),a.dom.baseEl.classList.add("apexcharts-tooltip-active"),r.classList.add("apexcharts-active"),a.config.chart.accessibility.enabled&&a.config.chart.accessibility.announcements.enabled&&r.removeAttribute("aria-hidden"),i==="pie"||i==="donut"||i==="polarArea"?this._showTooltipNonAxis(e,t,s,r):i==="radialBar"?this._showTooltipRadialBar(e,t,s,r):i==="heatmap"||i==="treemap"?this._showTooltipHeatTree(e,t,s,r,i):i==="bar"||i==="candlestick"||i==="boxPlot"||i==="rangeBar"?this._showTooltipBar(e,t,s
962):this._showTooltipAxisLine(e,t,s)}_setSyntheticEvent(e,t,s){const a=this.w,i=a.config.chart.type;let r=0,o=0;const l=this._getFocusableElement(e,t);if(l){const n=l.getBoundingClientRect();r=n.left+n.width/2,o=n.top+n.height/2}else if(a.globals.pointsArray&&a.globals.pointsArray[e]&&a.globals.pointsArray[e][t]){const n=a.globals.pointsArray[e][t],h=s.getElGrid&&s.getElGrid();if(h){const c=h.getBoundingClientRect();r=c.left+(n[0]||0),o=c.top+(n[1]||0)}}else{const n=a.dom.Paper&&a.dom.Paper.node;if(n){const h=n.getBoundingClientRect();r=h.left+h.width/2,o=h.top+h.height/2}}if((i==="line"||i==="area"||i==="rangeArea"||i==="scatter"||i==="bubble"||i==="radar")&&a.globals.pointsArray&&a.globals.pointsArray[e]&&a.globals.pointsArray[e][t]){const n=a.globals.pointsArray[e][t],h=s.getElGrid&&s.getElGrid();if(h){const c=h.getBoundingClientRect();r=c.left+(n[0]||0),o=c.top+(n[1]||0)}}s.e={type:"mousemove",clientX:r,clientY:o}}_showTooltipBar(e,t,s){var a,i,r,o;const l=this.w,n=s.tConfig.shared&&(s.tooltipUtil.isXoverlap(t)||l.globals.isBarHorizontal)&&s.tooltipUtil.isInitialSeriesSameLen(),h=(o=(r=(i=(a=l.rangeData.seriesRange)==null?void 0:a[e])==null?void 0:i[t])==null?void 0:r.y)==null?void 0:o[0];s.tooltipLabels.drawSeriesTexts(O(R(R({ttItems:s.ttItems,i:e,j:t},(h==null?void 0:h.y1)!==void 0&&{y1:h.y1}),(h==null?void 0:h.y2)!==void 0&&{y2:h.y2}),{shared:n}));const c=`.apexcharts-series[data\\:realIndex='${e}']`,d=l.dom.Paper.findOne(`${c} path[j='${t}'], ${c} circle[j='${t}'], ${c} rect[j='${t}']`);if(d&&(this._leaveHoveredBar(),new I(this.w,this.ctx).pathMouseEnter(d,null),this._hoveredBarEl=d),l.globals.isBarHorizontal){const u=d&&d.node;if(u){const g=l.dom.elWrap.getBoundingClientRect(),p=u.getBoundingClientRect(),b=p.left-g.left,f=p.top-g.top,m=p.height,v=p.width,y=s.tooltipRect.ttWidth||0,w=s.tooltipRect.ttHeight||0,C=f+m/2-w/2;let A=b+v;const L=s.xyRatios&&s.xyRatios.baseLineInvertedY!=null?s.xyRatios.baseLineInvertedY:g.width/2;b<L&&(A=b-y);const S=s.getElTooltip();S&&(S.style.left=A+"px",S.style.top=C+"px")}}else s.tooltipPosition.moveStickyTooltipOverBars(t,e)}_showTooltipAxisLine(e,t,s){const a=this.w,i=a.config.chart.type,r=s.tConfig.shared&&s.tooltipUtil.isXoverlap(t)&&s.tooltipUtil.isInitialSeriesSameLen();s.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:e,j:t,shared:r});const o=i==="scatter"||i==="bubble",l=a.globals.markers.largestSize>0;o?this._showScatterBubblePoint(e,t,s):l?r?s.marker.enlargePoints(t):s.tooltipPosition.moveDynamicPointOnHover(t,e):r?s.tooltipPosition.moveDynamicPointsOnHover(t):s.tooltipPosition.moveDynamicPointOnHover(t,e)}_showScatterBubblePoint(e,t,s){const a=this.w.dom.baseEl;this._enlargedScatterMarker&&(s.marker.oldPointSize(this._enlargedScatterMarker),this._enlargedScatterMarker=null);const i=a.querySelector(`.apexcharts-series[data\\:realIndex='${e}']`);if(!i)return;const r=i.querySelector(`.apexcharts-marker[rel='${t}']`);r&&(s.marker.enlargeCurrentPoint(t,r),this._enlargedScatterMarker=r)}_showTooltipNonAxis(e,t,s,a){const i=this.w;s.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:t,shared:!1});const r=a.getBoundingClientRect(),o=r.width||s.tooltipRect.ttWidth||0,l=r.height||s.tooltipRect.ttHeight||0,n=i.dom.baseEl.querySelector(`.apexcharts-pie-area[j='${t}']`);if(n){const h=parseFloat(n.getAttribute("data:cx")),c=parseFloat(n.getAttribute("data:cy"));if(!isNaN(h)&&!isNaN(c)){const d=i.dom.Paper.node.getBoundingClientRect(),u=i.dom.elWrap.getBoundingClientRect(),g=d.left-u.left,p=d.top-u.top;a.style.left=g+h-o/2+"px",a.style.top=p+c-l-10+"px"}}}_showTooltipRadialBar(e,t,s,a){const i=this.w;s.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:e,shared:!1});const{ttWidth:r=0,ttHeight:o=0}=s.getCachedDimensions(),l=i.dom.baseEl.querySelector(`.apexcharts-radialbar-series[data\\:realIndex='${e}'] path`);if(l){const n=parseFloat(l.getAttribute("data:angle"))||0,h=(i.config.plotOptions.radialBar.startAngle||0)+n/2,c=i.layout.gridWidth/2,d=i.layout.gridHeight/2,u=i.globals.radialSize||Math.min(i.layout.gridWidth,i.layout.gridHeight)/2,g=i.seriesData.series.length,p=u/Math.max(g,1),b=u-e*p,f=b-p,m=(b+f)/2,v=D.polarToCartesian(c,d,m,h),y=v.x+(i.layout.translateX||0),w=v.y+(i.layout.translateY||0);a.style.left=y-r/2+"px",a.style.top=w-o-10+"px"}}_showTooltipHeatTree(e,t,s,a,i){const r=this.w;s.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:e,j:t,shared:!1});const o=a.getBoundingClientRect(),l=o.width||s.tooltipRect.ttWidth||0,n=o.height||s.tooltipRect.ttHeight||0,h=i==="heatmap"?"apexcharts-heatmap-rect":"apexcharts-treemap-rect",c=r.dom.baseEl.querySelector(`.${h}[i='${e}'][j='${t}']`);if(c){const d=r.dom.elWrap.getBoundingClientRect(),u=c.getBoundingClientRect(),g=u.left-d.left,p=u.top-d.top,b=u.width,f=u.height,m=parseFloat(c.getAttribute("cx")),v=parseFloat(c.getAttribute("width"));s.tooltipPosition.moveXCrosshairs(m+v/2);let y=g+b+l/2;const w=p+f/2-n/2;g+b>r.layout.gridWidth/2&&(y=g-l/2),a.style.left=y+"px",a.style.top=w+"px"}}_applyFocusClass(e,t){this._removeFocusClass();const s=this._getFocusableElement(e,t);s&&(s.classList.add("apexcharts-keyboard-focused"),this._focusedEl=s)}_removeFocusClass(){this._focusedEl&&(this._focusedEl.classList.remove("apexcharts-keyboard-focused"),this._focusedEl=null)}_leaveHoveredBar(){this._hoveredBarEl&&(new I(this.w,this.ctx).pathMouseLeave(this._hoveredBarEl,null),this._hoveredBarEl=null)}_getFocusableElement(e,t){const s=this.w,a=s.config.chart.type,i=s.dom.baseEl;return a==="pie"||a==="donut"||a==="polarArea"?i.querySelector(`.apexcharts-pie-area[j='${t}']`):a==="heatmap"?i.querySelector(`.apexcharts-heatmap-rect[i='${e}'][j='${t}']`):a==="treemap"?i.querySelector(`.apexcharts-treemap-rect[i='${e}'][j='${t}']`):a==="radialBar"?i.querySelector(`.apexcharts-radialbar-series[data\\:realIndex='${e}
962'] path`):a==="bar"||a==="candlestick"||a==="boxPlot"||a==="rangeBar"?i.querySelector(`.apexcharts-series[data\\:realIndex='${e}'] path[j='${t}']`):i.querySelector(`.apexcharts-series[data\\:realIndex='${e}'] .apexcharts-marker[rel='${t}']`)||null}_fireClick(){const e=this.w.globals.tooltip;if(!e)return;const t={type:"mouseup",clientX:0,clientY:0};e.markerClick(t,this.seriesIndex,this.dataPointIndex)}_isNavEnabled(){const e=this.w.config.chart.accessibility;return e.enabled&&e.keyboard.enabled&&e.keyboard.navigation.enabled}_getSeriesCount(){const e=this.w,t=e.config.chart.type;return t==="pie"||t==="donut"||t==="polarArea"?1:e.seriesData.series.length}_getDataPointCount(e){const t=this.w,s=t.config.chart.type;if(s==="pie"||s==="donut"||s==="polarArea")return t.seriesData.series.length;const a=t.seriesData.series;return a[e]&&Array.isArray(a[e])?a[e].length:0}_clampCursor(){const e=this._getSeriesCount();this.seriesIndex>=e&&(this.seriesIndex=e-1),this.seriesIndex<0&&(this.seriesIndex=0);const t=this._getDataPointCount(this.seriesIndex);this.dataPointIndex>=t&&(this.dataPointIndex=t-1),this.dataPointIndex<0&&(this.dataPointIndex=0)}_snapToVisibleRange(){const e=this.w,t=e.globals,s=this.seriesIndex;if(!e.interact.zoomed)return;const a=e.seriesData.seriesX&&e.seriesData.seriesX[s];if(!a||!a.length)return;const i=t.minX,r=t.maxX;if(i===void 0||r===void 0)return;const o=a[this.dataPointIndex];if(o>=i&&o<=r)return;const l=a.length;for(let n=0;n<l;n++)if(a[n]>=i&&a[n]<=r){this.dataPointIndex=n;return}}_snapToVisibleRangeInDirection(e){const t=this.w,s=t.globals,a=this.seriesIndex,i=t.seriesData.seriesX&&t.seriesData.seriesX[a];if(!i||!i.length)return;const r=s.minX,o=s.maxX;if(r===void 0||o===void 0)return;const l=i.length;if(e>=0){for(let n=0;n<l;n++)if(i[n]>=r&&i[n]<=o){this.dataPointIndex=n;return}}else for(let n=l-1;n>=0;n--)if(i[n]>=r&&i[n]<=o){this.dataPointIndex=n;return}}_isDataPointVisible(e,t){const s=this.w,a=s.globals;if(!s.interact.zoomed)return!0;const i=s.seriesData.seriesX&&s.seriesData.seriesX[e];if(!i)return!0;const r=i[t];return r===void 0?!0:r>=a.minX&&r<=a.maxX}}K.registerFeatures({keyboardNavigation:_s});class Gs{constructor(e){this.w=e.w,this.barCtx=e,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||(this.totalFormatter=this.w.config.dataLabels.formatter)}handleBarDataLabels(e){const{x:t,y:s,y1:a,y2:i,i:r,j:o,realIndex:l,columnGroupIndex:n,series:h,barHeight:c,barWidth:d,barXPosition:u,barYPosition:g,visibleSeries:p}=e,b=this.w,f=new I(this.barCtx.w),m=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[l]:this.barCtx.strokeWidth;let v,y;b.axisFlags.isXNumeric&&!b.globals.isBarHorizontal?(v=t+parseFloat(d*(p+1)),y=s+parseFloat(c*(p+1))-m):(v=t+parseFloat(d*p),y=s+parseFloat(c*p));let w=null,C=null,A=t,L=s,S={};const k=b.config.dataLabels,M=this.barCtx.barOptions.dataLabels,P=this.barCtx.barOptions.dataLabels.total;typeof g<"u"&&this.barCtx.isRangeBar&&(y=g,L=g),typeof u<"u"&&this.barCtx.isVerticalGroupedRangeBar&&(v=u,A=u);const T=k.offsetX,X=k.offsetY;let E={width:0,height:0};if(b.config.dataLabels.enabled){const Y=b.seriesData.series[r][o];E=f.getTextRects(b.config.dataLabels.formatter?b.config.dataLabels.formatter(Y,O(R({},b),{seriesIndex:r,dataPointIndex:o,w:b})):b.formatters.yLabelFormatters[0](Y),parseFloat(k.style.fontSize))}const F={x:t,y:s,i:r,j:o,realIndex:l,columnGroupIndex:n,bcx:v,bcy:y,barHeight:c,barWidth:d,textRects:E,strokeWidth:m,dataLabelsX:A,dataLabelsY:L,dataLabelsConfig:k,barDataLabelsConfig:M,barTotalDataLabelsConfig:P,offX:T,offY:X};return this.barCtx.isHorizontal?S=this.calculateBarsDataLabelsPosition(F):S=this.calculateColumnsDataLabelsPosition(F),w=this.drawCalculatedDataLabels({x:S.dataLabelsX,y:S.dataLabelsY,val:this.barCtx.isRangeBar?[a,i]:b.config.chart.stackType==="100%"?h[l][o]:b.seriesData.series[l][o],i:l,j:o,barWidth:d,barHeight:c,textRects:E,dataLabelsConfig:k}),b.config.chart.stacked&&P.enabled&&(C=this.drawTotalDataLabels({x:S.totalDataLabelsX,y:S.totalDataLabelsY,barWidth:d,barHeight:c,realIndex:l,textAnchor:S.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:l,j:o}),dataLabelsConfig:k,barTotalDataLabelsConfig:P})),{dataLabelsPos:S,dataLabels:w,totalDataLabels:C}}getStackedTotalDataLabel({realIndex:e,j:t}){const s=this.w;let a=this.barCtx.stackedSeriesTotals[t];return this.totalFormatter&&(a=this.totalFormatter(a,O(R({},s),{seriesIndex:e,dataPointIndex:t,w:s}))),a}calculateColumnsDataLabelsPosition(e){const t=this.w;let{i:s,j:a,realIndex:i,y:r,bcx:o,barWidth:l,barHeight:n,textRects:h,dataLabelsX:c,dataLabelsY:d,dataLabelsConfig:u,barDataLabelsConfig:g,barTotalDataLabelsConfig:p,strokeWidth:b,offX:f,offY:m}=e,v,y;const w="middle",C=o;n=Math.abs(n);const A=t.config.plotOptions.bar.dataLabels.orientation==="vertical",{zeroEncounters:L}=this.barCtx.barHelpers.getZeroValueEncounters({i:s,j:a});o=o-b/2;const S=t.layout.gridWidth/t.globals.dataPoints;this.barCtx.isVerticalGroupedRangeBar?c+=l/2:(t.axisFlags.isXNumeric?c=o-l/2+f:c=o-S+l/2+f,!t.config.chart.stacked&&L>0&&t.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(c-=l*L)),A&&(c=c+h.height/2-b/2-2);const k=t.seriesData.series[s][a]<0;let M=r;switch(this.barCtx.isReversed&&(M=r+(k?n:-n)),g.position){case"center":A?k?d=M-n/2+m:d=M+n/2-m:k?d=M-n/2+h.height/2+m:d=M+n/2+h.height/2-m;break;case"bottom":A?k?d=M-n+m:d=M+n-m:k?d=M-n+h.height+b+m:d=M+n-h.height/2+b-m;break;case"top":A?k?d=M+m:d=M-m:k?d=M-h.height/2-m:d=M+h.height+m;break}let P=M;if(t.labelData.seriesGroups.forEach(T=>{var X;(X=this.barCtx[T.join(",")])==null||X.prevY.forEach(E=>
962{k?P=Math.max(E[a],P):P=Math.min(E[a],P)})}),this.barCtx.lastActiveBarSerieIndex===i&&p.enabled){const T=new I(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:i,j:a}),u.fontSize);k?v=P-T.height/2-m-p.offsetY+18:v=P+T.height+m+p.offsetY-18;const X=S;y=C+(t.axisFlags.isXNumeric?-l*t.globals.barGroups.length/2:t.globals.barGroups.length*l/2-(t.globals.barGroups.length-1)*l-X)+p.offsetX}return t.config.chart.stacked||(d<0?d=0+b:d+h.height/3>t.layout.gridHeight&&(d=t.layout.gridHeight-b)),{bcx:o,bcy:r,dataLabelsX:c,dataLabelsY:d,totalDataLabelsX:y,totalDataLabelsY:v,totalDataLabelsAnchor:w}}calculateBarsDataLabelsPosition(e){const t=this.w;let{x:s,i:a,j:i,realIndex:r,bcy:o,barHeight:l,barWidth:n,textRects:h,dataLabelsX:c,strokeWidth:d,dataLabelsConfig:u,barDataLabelsConfig:g,barTotalDataLabelsConfig:p,offX:b,offY:f}=e;const m=t.layout.gridHeight/t.globals.dataPoints,{zeroEncounters:v}=this.barCtx.barHelpers.getZeroValueEncounters({i:a,j:i});n=Math.abs(n);let y=o-(this.barCtx.isRangeBar?0:m)+l/2+h.height/2+f-3;!t.config.chart.stacked&&v>0&&t.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(y-=l*v);let w,C,A="start";const L=t.seriesData.series[a][i]<0;let S=s;switch(this.barCtx.isReversed&&(S=s+(L?-n:n),A=L?"start":"end"),g.position){case"center":L?c=S+n/2-b:c=Math.max(h.width/2,S-n/2)+b;break;case"bottom":L?c=S+n-d-b:c=S-n+d+b;break;case"top":L?c=S-d-b:c=S-d+b;break}let k=S;if(t.labelData.seriesGroups.forEach(M=>{var P;(P=this.barCtx[M.join(",")])==null||P.prevX.forEach(T=>{L?k=Math.min(T[i],k):k=Math.max(T[i],k)})}),this.barCtx.lastActiveBarSerieIndex===r&&p.enabled){const M=new I(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:i}),u.fontSize);L?(w=k-d-b-p.offsetX,A="end"):w=k+b+p.offsetX+(this.barCtx.isReversed?-(n+d):d),C=y-h.height/2+M.height/2+p.offsetY+d,t.globals.barGroups.length>1&&(C=C-t.globals.barGroups.length/2*(l/2))}return t.config.chart.stacked||(u.textAnchor==="start"?c-h.width<0?c=L?h.width+d:d:c+h.width>t.layout.gridWidth&&(c=L?t.layout.gridWidth-d:t.layout.gridWidth-h.width-d):u.textAnchor==="middle"?c-h.width/2<0?c=h.width/2+d:c+h.width/2>t.layout.gridWidth&&(c=t.layout.gridWidth-h.width/2-d):u.textAnchor==="end"&&(c<1?c=h.width+d:c+1>t.layout.gridWidth&&(c=t.layout.gridWidth-h.width-d))),{bcx:s,bcy:o,dataLabelsX:c,dataLabelsY:y,totalDataLabelsX:w,totalDataLabelsY:C,totalDataLabelsAnchor:A}}drawCalculatedDataLabels({x:e,y:t,val:s,i:a,j:i,textRects:r,barHeight:o,barWidth:l,dataLabelsConfig:n}){const h=this.w;let c="rotate(0)";h.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(c=`rotate(-90, ${e}, ${t})`);const d=new ge(this.barCtx.w,this.barCtx.ctx),u=new I(this.barCtx.w),g=n.formatter;let p=null;const b=h.globals.collapsedSeriesIndices.indexOf(a)>-1;if(n.enabled&&!b){p=u.group({class:"apexcharts-data-labels",transform:c});let f="";typeof s<"u"&&(f=g(s,O(R({},h),{seriesIndex:a,dataPointIndex:i,w:h}))),!s&&h.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(f="");const m=h.seriesData.series[a][i]<0,v=h.config.plotOptions.bar.dataLabels.position;if(h.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(v==="top"&&(m?n.textAnchor="end":n.textAnchor="start"),v==="center"&&(n.textAnchor="middle"),v==="bottom"&&(m?n.textAnchor="end":n.textAnchor="start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels){const w=u.getTextRects(f,parseFloat(n.style.fontSize));l<w.width&&(f="")}h.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?r.width/1.6>Math.abs(l)&&(f=""):r.height/1.6>Math.abs(o)&&(f=""));const y=R({},n);this.barCtx.isHorizontal&&s<0&&(n.textAnchor==="start"?y.textAnchor="end":n.textAnchor==="end"&&(y.textAnchor="start")),d.plotDataLabelsText({x:e,y:t,text:f,i:a,j:i,parent:p,dataLabelsConfig:y,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return p}drawTotalDataLabels({x:e,y:t,val:s,realIndex:a,textAnchor:i,barTotalDataLabelsConfig:r}){const o=new I(this.barCtx.w);let l;return r.enabled&&typeof e<"u"&&typeof t<"u"&&this.barCtx.lastActiveBarSerieIndex===a&&(l=o.drawText({x:e,y:t,foreColor:r.style.color,text:s,textAnchor:i,fontFamily:r.style.fontFamily,fontSize:r.style.fontSize,fontWeight:r.style.fontWeight})),l}}
962let $s=class{constructor(x){this.w=x.w,this.barCtx=x}initVariables(x){const e=this.w;this.barCtx.series=x,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(let t=0;t<x.length;t++)if(x[t].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=x[t].length),e.axisFlags.isXNumeric)for(let s=0;s<x[t].length;s++)e.seriesData.seriesX[t][s]>e.globals.minX&&e.seriesData.seriesX[t][s]<e.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=e.globals.dataPoints;this.arrBorderRadius=this.createBorderRadiusArr(e.seriesData.series),D.isSafari()&&(this.arrBorderRadius=this.arrBorderRadius.map(t=>t.map(s=>"none"))),this.barCtx.seriesLen===0&&(this.barCtx.seriesLen=1),this.barCtx.zeroSerieses=[],e.globals.comboCharts||this.checkZeroSeries({series:x})}initialPositions(x){const e=this.w;let t,s,a,i,r,o,l,n,h=e.globals.dataPoints;this.barCtx.isRangeBar&&(h=e.labelData.labels.length);let c=this.barCtx.seriesLen;if(e.config.plotOptions.bar.rangeBarGroupRows&&(c=1),this.barCtx.isHorizontal)a=e.layout.gridHeight/h,r=a/c,e.axisFlags.isXNumeric&&(a=e.layout.gridHeight/this.barCtx.totalItems,r=a/this.barCtx.seriesLen),r=r*parseInt(this.barCtx.barOptions.barHeight,10)/100,String(this.barCtx.barOptions.barHeight).indexOf("%")===-1&&(r=parseInt(this.barCtx.barOptions.barHeight,10)),n=this.barCtx.baseLineInvertedY+e.globals.padHorizontal+(this.barCtx.isReversed?e.layout.gridWidth:0)-(this.barCtx.isReversed?this.barCtx.baseLineInvertedY*2:0),this.barCtx.isFunnel&&(n=e.layout.gridWidth/2),s=(a-r*this.barCtx.seriesLen)/2;else{if(i=e.layout.gridWidth/this.barCtx.visibleItems,e.config.xaxis.convertedCatToNumeric&&(i=e.layout.gridWidth/e.globals.dataPoints),o=i/c*parseInt(this.barCtx.barOptions.columnWidth,10)/100,e.axisFlags.isXNumeric){const d=this.barCtx.xRatio;e.globals.minXDiff&&e.globals.minXDiff!==.5&&e.globals.minXDiff/d>0&&(i=e.globals.minXDiff/d),o=i/c*parseInt(this.barCtx.barOptions.columnWidth,10)/100,o<1&&(o=1)}String(this.barCtx.barOptions.columnWidth).indexOf("%")===-1&&(o=parseInt(this.barCtx.barOptions.columnWidth,10)),l=e.layout.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?e.layout.gridHeight:0)+(this.barCtx.isReversed?this.barCtx.baseLineY[this.barCtx.translationsIndex]*2:0),e.axisFlags.isXNumeric?t=this.barCtx.getBarXForNumericXAxis({x:t,j:0,realIndex:x,barWidth:o}).x:t=e.globals.padHorizontal+D.noExponents(i-o*this.barCtx.seriesLen)/2}return e.globals.barHeight=r,e.globals.barWidth=o,{x:t,y:s,yDivision:a,xDivision:i,barHeight:r,barWidth:o,zeroH:l,zeroW:n}}initializeStackedPrevVars(x){x.w.labelData.seriesGroups.forEach(e=>{x[e]||(x[e]={}),x[e].prevY=[],x[e].prevX=[],x[e].prevYF=[],x[e].prevXF=[],x[e].prevYVal=[],x[e].prevXVal=[]})}initializeStackedXYVars(x){x.w.labelData.seriesGroups.forEach(e=>{x[e]||(x[e]={}),x[e].xArrj=[],x[e].xArrjF=[],x[e].xArrjVal=[],x[e].yArrj=[],x[e].yArrjF=[],x[e].yArrjVal=[]})}getPathFillColor(x,e,t,s){var a,i,r,o;const l=this.w,n=new te(this.barCtx.w);let h=null;const c=this.barCtx.barOptions.distributed?t:e;let d=!1;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(u=>{x[e][t]>=u.from&&x[e][t]<=u.to&&(h=u.color,d=!0)}),{color:n.fillPath({seriesNumber:this.barCtx.barOptions.distributed?c:s,dataPointIndex:t,color:h,value:x[e][t],fillConfig:(a=l.config.series[e].data[t])==null?void 0:a.fill,fillType:(r=(i=l.config.series[e].data[t])==null?void 0:i.fill)!=null&&r.type?(o=l.config.series[e].data[t])==null?void 0:o.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[s]:l.config.fill.type}),useRangeColor:d}}getStrokeWidth(x,e,t){let s=0;const a=this.w;return typeof this.barCtx.series[x][e]>"u"||this.barCtx.series[x][e]===null||a.config.chart.type==="bar"&&!this.barCtx.series[x][e]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,a.config.stroke.show&&(this.barCtx.isNullValue||(s=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[t]:this.barCtx.strokeWidth)),s}createBorderRadiusArr(x){var e;const t=this.w,s=!this.w.config.chart.stacked||t.config.plotOptions.bar.borderRadius<=0,a=x.length,i=((e=x[0])==null?void 0:e.length)|0,r=Array.from({length:a},()=>Array(i).fill(s?"top":"none"));if(s)return r;const o=this.w.config.chart.type;for(let l=0;l<i;l++){const n=[],h=[];let c=0;for(let d=0;d<a;d++){const u=x[d][l];u>0?(n.push(d),c++):u<0&&(h.push(d),c++)}if(n.length>0&&h.length===0)if(n.length===1)r[n[0]][l]=o==="bar"&&i===1?"top":"both";else{const d=n[0],u=n[n.length-1];for(const g of n)g===d?r[g][l]=o==="bar"&&i===1?"top":"bottom":g===u?r[g][l]="top":r[g][l]="none"}else if(h.length>0&&n.length===0)if(h.length===1)r[h[0]][l]="both";
962else{const d=Math.max(...h),u=Math.min(...h);for(const g of h)g===d?r[g][l]="bottom":g===u?r[g][l]="top":r[g][l]="none"}else if(n.length>0&&h.length>0){const d=n[n.length-1];for(const g of n)g===d?r[g][l]="top":r[g][l]="none";const u=Math.max(...h);for(const g of h)g===u?r[g][l]="bottom":r[g][l]="none"}else if(c===1){const d=n[0]||h[0];r[d][l]="both"}}return r}barBackground({j:x,i:e,x1:t,x2:s,y1:a,y2:i,elSeries:r}){const o=this.w,l=new I(this.barCtx.w),n=new j(this.barCtx.w).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&n===e){x>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(x%=this.barCtx.barOptions.colors.backgroundBarColors.length);const h=this.barCtx.barOptions.colors.backgroundBarColors[x],c=l.drawRect(typeof t<"u"?t:0,typeof a<"u"?a:0,typeof s<"u"?s:o.layout.gridWidth,typeof i<"u"?i:o.layout.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,h,this.barCtx.barOptions.colors.backgroundBarOpacity);r.add(c),c.node.classList.add("apexcharts-backgroundBar")}}getColumnPaths({barWidth:x,barXPosition:e,y1:t,y2:s,strokeWidth:a,isReversed:i,series:r,seriesGroup:o,realIndex:l,i:n,j:h,w:c}){var d;const u=new I(this.barCtx.w);a=Array.isArray(a)?a[l]:a,a||(a=0);let g=x,p=e;(d=c.config.series[l].data[h])!=null&&d.columnWidthOffset&&(p=e-c.config.series[l].data[h].columnWidthOffset/2,g=x+c.config.series[l].data[h].columnWidthOffset);const b=a/2,f=p+b,m=p+g-b,v=(r[n][h]>=0?1:-1)*(i?-1:1);t+=.001-b*v,s+=.001+b*v;let y=u.move(f,t),w=u.move(f,t);const C=u.line(m,t);if(c.globals.previousPaths.length>0&&(w=this.barCtx.getPreviousPath(l,h,!1)),y=y+u.line(f,s)+u.line(m,s)+C+(c.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[l][h]==="both"?" Z":" z"),w=w+u.line(f,t)+C+C+C+C+C+u.line(f,t)+(c.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[l][h]==="both"?" Z":" z"),this.arrBorderRadius[l][h]!=="none"&&(y=u.roundPathCorners(y,c.config.plotOptions.bar.borderRadius)),c.config.chart.stacked){let A=this.barCtx;A=this.barCtx[o],A.yArrj.push(s-b*v),A.yArrjF.push(Math.abs(t-s+a*v)),A.yArrjVal.push(this.barCtx.series[n][h])}return{pathTo:y,pathFrom:w}}getBarpaths({barYPosition:x,barHeight:e,x1:t,x2:s,strokeWidth:a,isReversed:i,series:r,seriesGroup:o,realIndex:l,i:n,j:h,w:c}){var d;const u=new I(this.barCtx.w);a=Array.isArray(a)?a[l]:a,a||(a=0);let g=x,p=e;(d=c.config.series[l].data[h])!=null&&d.barHeightOffset&&(g=x-c.config.series[l].data[h].barHeightOffset/2,p=e+c.config.series[l].data[h].barHeightOffset);const b=a/2,f=g+b,m=g+p-b,v=(r[n][h]>=0?1:-1)*(i?-1:1);t+=.001+b*v,s+=.001-b*v;let y=u.move(t,f),w=u.move(t,f);c.globals.previousPaths.length>0&&(w=this.barCtx.getPreviousPath(l,h,!1));const C=u.line(t,m);if(y=y+u.line(s,f)+u.line(s,m)+C+(c.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[l][h]==="both"?" Z":" z"),w=w+u.line(t,f)+C+C+C+C+C+u.line(t,f)+(c.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[l][h]==="both"?" Z":" z"),this.arrBorderRadius[l][h]!=="none"&&(y=u.roundPathCorners(y,c.config.plotOptions.bar.borderRadius)),c.config.chart.stacked){let A=this.barCtx;A=this.barCtx[o],A.xArrj.push(s+b*v),A.xArrjF.push(Math.abs(t-s-a*v)),A.xArrjVal.push(this.barCtx.series[n][h])}return{pathTo:y,pathFrom:w}}checkZeroSeries({series:x}){const e=this.w;for(let t=0;t<x.length;t++){let s=0;for(let a=0;a<x[e.globals.maxValsInArrayIndex].length;a++)s+=x[t][a];s===0&&this.barCtx.zeroSerieses.push(t)}}getXForValue(x,e,t=!0){let s=t?e:null;return typeof x<"u"&&x!==null&&(s=e+x/this.barCtx.invertedYRatio-(this.barCtx.isReversed?x/this.barCtx.invertedYRatio:0)*2),s}getYForValue(x,e,t,s=!0){let a=s?e:null;return typeof x<"u"&&x!==null&&(a=e-x/this.barCtx.yRatio[t]+(this.barCtx.isReversed?x/this.barCtx.yRatio[t]:0)*2),a}getGoalValues(x,e,t,s,a,i){const r=this.w,o=[],l=(n,h)=>{o.push({[x]:x==="x"?this.getXForValue(n,e,!1):this.getYForValue(n,t,i,!1),attrs:h})};if(r.seriesData.seriesGoals[s]&&r.seriesData.seriesGoals[s][a]&&Array.isArray(r.seriesData.seriesGoals[s][a])&&r.seriesData.seriesGoals[s][a].forEac
962h(n=>{l(n.value,n)}),this.barCtx.barOptions.isDumbbell&&r.rangeData.seriesRange.length){const n=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:r.globals.colors,h={strokeHeight:x==="x"?0:r.globals.markers.size[s],strokeWidth:x==="x"?r.globals.markers.size[s]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(n[s])?n[s][0]:n[s]};l(r.rangeData.seriesRangeStart[s][a],h),l(r.rangeData.seriesRangeEnd[s][a],O(R({},h),{strokeColor:Array.isArray(n[s])?n[s][1]:n[s]}))}return o}drawGoalLine({barXPosition:x,barYPosition:e,goalX:t,goalY:s,barWidth:a,barHeight:i}){const r=new I(this.barCtx.w),o=r.group({className:"apexcharts-bar-goals-groups"});o.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:o.node}),o.attr("clip-path",`url(#gridRectMarkerMask${this.barCtx.w.globals.cuid})`);let l=null;return this.barCtx.isHorizontal?Array.isArray(t)&&t.forEach(n=>{if(n.x>=-1&&n.x<=r.w.layout.gridWidth+1){const h=typeof n.attrs.strokeHeight<"u"?n.attrs.strokeHeight:i/2,c=e+h+i/2;l=r.drawLine(n.x,c-h*2,n.x,c,n.attrs.strokeColor?n.attrs.strokeColor:void 0,n.attrs.strokeDashArray,n.attrs.strokeWidth?n.attrs.strokeWidth:2,n.attrs.strokeLineCap),o.add(l)}}):Array.isArray(s)&&s.forEach(n=>{if(n.y>=-1&&n.y<=r.w.layout.gridHeight+1){const h=typeof n.attrs.strokeWidth<"u"?n.attrs.strokeWidth:a/2,c=x+h+a/2;l=r.drawLine(c-h*2,n.y,c,n.y,n.attrs.strokeColor?n.attrs.strokeColor:void 0,n.attrs.strokeDashArray,n.attrs.strokeHeight?n.attrs.strokeHeight:2,n.attrs.strokeLineCap),o.add(l)}}),o}drawBarShadow({prevPaths:x,currPaths:e,color:t,realIndex:s,j:a}){const i=this.w,{x:r,x1:o,barYPosition:l}=x,{x:n,x1:h,barYPosition:c}=e,d=l+e.barHeight,u=new I(this.barCtx.w),g=new D,p=u.move(o,d)+u.line(r,d)+u.line(n,c)+u.line(h,c)+u.line(o,d)+(i.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[s][a]==="both"?" Z":" z");return u.drawPath({d:p,fill:g.shadeColor(.5,D.rgb2hex(t)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}getZeroValueEncounters({i:x,j:e}){var t;const s=this.w;let a=0,i=0;return(s.config.plotOptions.bar.horizontal?s.seriesData.series.map((r,o)=>o):((t=s.globals.columnSeries)==null?void 0:t.i.map(r=>r))||[]).forEach(r=>{const o=s.globals.seriesPercent[r][e];o&&a++,r<x&&o===0&&i++}),{nonZeroColumns:a,zeroEncounters:i}}getGroupIndex(x){const e=this.w,t=e.labelData.seriesGroups.findIndex(i=>i.indexOf(e.seriesData.seriesNames[x])>-1),s=this.barCtx.columnGroupIndices;let a=s.indexOf(t);return a<0&&(s.push(t),a=s.length-1),{groupIndex:t,columnGroupIndex:a}}};class pe{constructor(e,t,s){this.ctx=t,this.w=e,this.barOptions=e.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=e.config.stroke.width,this.isNullValue=!1,this.isRangeBar=e.rangeData.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!e.globals.isBarHorizontal&&e.rangeData.seriesRange.length&&e.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.xyRatios=s,this.xyRatios!==null&&(this.xRatio=s.xRatio,this.yRatio=s.yRatio,this.invertedXRatio=s.invertedXRatio,this.invertedYRatio=s.invertedYRatio,this.baseLineY=s.baseLineY,this.baseLineInvertedY=s.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[];const a=new j(this.w);this.lastActiveBarSerieIndex=a.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];const i=a.getBarSeriesIndices(),r=new $(this.w);this.stackedSeriesTotals=r.getStackedSeriesTotals(this.w.config.series.map((o,l)=>i.indexOf(l)===-1?l:-1).filter(o=>o!==-1)),this.barHelpers=new $s(this)}draw(e,t){var s;const a=this.w,i=new I(this.w),r=new $(this.w);e=r.getLogSeries(e),this.series=e,this.yRatio=r.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);const o=i.group({class:"apexcharts-bar-series apexcharts-plot-series"});a.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(let l=0,n=0;l<e.length;l++,n++){let h,c;
962const d=[],u=[],g=a.globals.comboCharts?t[l]:l,{columnGroupIndex:p}=this.barHelpers.getGroupIndex(g),b=i.group({class:"apexcharts-series",rel:l+1,seriesName:D.escapeString(a.seriesData.seriesNames[g]),"data:realIndex":g});j.addCollapsedClassToSeries(this.w,b,g),e[l].length>0&&(this.visibleI=this.visibleI+1),this.yRatio.length>1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[g],this.translationsIndex=g);const f=this.translationsIndex;this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed;const m=this.barHelpers.initialPositions(g),{y:v,yDivision:y,zeroW:w,x:C,xDivision:A,zeroH:L}=m;let S=m.barHeight,k=m.barWidth;c=v,h=C,this.isHorizontal||u.push(h+k/2);const M=i.group({class:"apexcharts-datalabels","data:realIndex":g});a.globals.delayedElements.push({el:M.node}),M.node.classList.add("apexcharts-element-hidden");const P=i.group({class:"apexcharts-bar-goals-markers"}),T=i.group({class:"apexcharts-bar-shadows"});a.globals.delayedElements.push({el:T.node}),T.node.classList.add("apexcharts-element-hidden");for(let X=0;X<e[l].length;X++){const E=this.barHelpers.getStrokeWidth(l,X,g);let F=null;const Y={indexes:{i:l,j:X,realIndex:g,translationsIndex:f,bc:n},x:h,y:c,strokeWidth:E,elSeries:b};this.isHorizontal?(F=this.drawBarPaths(O(R({},Y),{barHeight:S,zeroW:w,yDivision:y})),k=this.series[l][X]/this.invertedYRatio):(F=this.drawColumnPaths(O(R({},Y),{xDivision:A,barWidth:k,zeroH:L})),S=this.series[l][X]/this.yRatio[f]);const B=this.barHelpers.getPathFillColor(e,l,X,g);if(this.isFunnel&&this.barOptions.isFunnel3d&&this.pathArr.length&&X>0){const G=this.barHelpers.drawBarShadow({color:typeof B.color=="string"&&((s=B.color)==null?void 0:s.indexOf("url"))===-1?B.color:D.hexToRgba(a.globals.colors[l]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:F,realIndex:g,j:X});T.add(G),a.config.chart.dropShadow.enabled&&new q(this.w).dropShadow(G,a.config.chart.dropShadow,g)}this.pathArr.push(F);const N=this.barHelpers.drawGoalLine({barXPosition:F.barXPosition,barYPosition:F.barYPosition,goalX:F.goalX,goalY:F.goalY,barHeight:S,barWidth:k});N&&P.add(N),c=F.y,h=F.x,X>0&&u.push(h+k/2),d.push(c),this.renderSeries(O(R({realIndex:g,pathFill:B.color},B.useRangeColor?{lineFill:B.color}:{}),{j:X,i:l,columnGroupIndex:p,pathFrom:F.pathFrom,pathTo:F.pathTo,strokeWidth:E,elSeries:b,x:h,y:c,series:e,barHeight:Math.abs(F.barHeight?F.barHeight:S),barWidth:Math.abs(F.barWidth?F.barWidth:k),elDataLabelsWrap:M,elGoalsMarkers:P,elBarShadows:T,visibleSeries:this.visibleI,type:"bar"}))}a.globals.seriesXvalues[g]=u,a.globals.seriesYvalues[g]=d,o.add(b)}return o}renderSeries({realIndex:e,pathFill:t,lineFill:s,j:a,i,columnGroupIndex:r,pathFrom:o,pathTo:l,strokeWidth:n,elSeries:h,x:c,y:d,y1:u,y2:g,series:p,barHeight:b,barWidth:f,barXPosition:m,barYPosition:v,elDataLabelsWrap:y,elGoalsMarkers:w,elBarShadows:C,visibleSeries:A,type:L,classes:S}){const k=this.w,M=new I(this.w,this.ctx);let P=!1;if(h._bindingsDelegated||(h._bindingsDelegated=!0,M.setupEventDelegation(h,`.apexcharts-${L}-area`)),!s){let E=function(Y){const B=k.config.stroke.colors;let N;return Array.isArray(B)&&B.length>0&&(N=B[Y],N||(N=""),typeof N=="function")?N({value:k.seriesData.series[Y][a],dataPointIndex:a,w:k}):N};const F=typeof k.globals.stroke.colors[e]=="function"?E(e):k.globals.stroke.colors[e];s=this.barOptions.distributed?k.globals.stroke.colors[a]:F}const T=new Gs(this).handleBarDataLabels({x:c,y:d,y1:u,y2:g,i,j:a,series:p,realIndex:e,columnGroupIndex:r,barHeight:b,barWidth:f,barXPosition:m,barYPosition:v,visibleSeries:A});k.globals.isBarHorizontal||(T.dataLabelsPos.dataLabelsX+Math.max(f,k.globals.barPadForNumericAxis)<0||T.dataLabelsPos.dataLabelsX-Math.max(f,k.globals.barPadForNumericAxis)>k.layout.gridWidth)&&(P=!0),k.config.series[i].data[a]&&k.config.series[i].data[a].strokeColor&&(s=k.config.series[i].data[a].strokeColor),this.isNullValue&&(t="none");const X=a/k.config.chart.animations.animateGradually.delay*(k.config.chart.animations.speed/k.globals.dataPoints)/2.4;if(!P){const E=M.renderPaths({i,j:a,realIndex:e,pathFrom:o,pathTo:l,stroke:s,strokeWidth:n,strokeLineCap:k.config.stroke.lineCap,fill:t,animationDelay:X,initialSpeed:k.config.chart.animations.speed,dataChangeSpeed:k.config.chart.animations.dynamicAnimation.speed,className:`apexcharts-${L}-area ${S}`,chartType:L,bindEventsOnPaths:!1});E.attr("clip-path",`url(#gridRectBarMask${k.globals.cuid})`);const F=k.config.forecastDataPoints;F.count>0&&a>=k.globals.dataPoints-F.count&&(E.node.setAttribute("stroke-dasharray",F.dashArray),E.node.setAttribute("stroke-width",F.strokeWidth),E.node.setAttribute("fill-opacity",F.fillOpacity)),typeof u<"u"&&typeof g<"u"&&(E.attr("data-range-y1",u),E.attr("data-range-y2",g)),new q(this.w).setSelectionFilter(E,e,a),h.add(E),E.attr({cy:T.dataLabelsPos.bcy,cx:T.dataLabelsPos.bcx,j:a,val:k.seriesData.series[i][a],barHeight:b,barWidth:f}),T.dataLabels!==null&&y.add(T.dataLabels),T.totalDataLabels&&y.add(T.totalDataLabels),h.add(y),w&&h.add(w),C&&h.add(C)}return h}drawBarPaths({indexes:e,barHeight:t,strokeWidth:s,zeroW:a,x:i,y:r,yDivision:o,elSeries:l}){const n=this.w,h=e.i,c=e.j;let d;if(n.axisFlags.isXNumeric)r=(n.seriesData.seriesX[h][c]-n.globals.minX)/this.invertedXRatio-t,d=r+t*this.visibleI;else if(n.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:g,zeroEncounters:p}=this.barHelpers.getZeroValueEncounters({i:h,j:c});g>0&&(t=this.seriesLen*t/g),d=r+t*this.visibleI,d-=t*p}else d=r+t*this.visibleI;this.isFunnel&&(a=a-(this.barHelpers.getXForValue(this.series[h][c],a)-a)/2),i=this.barHelpers.getXForValue(this.series[h][c],a);const u=this.barHelpers.getBarpaths({barYPosition:d,barHeight:t,x1:a,x2:i,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:e.realIndex,i:h,j:c,w:n});return n.axisFlags.isXNumeric||(r=r+o),this.barHelpers.barBackgroun
962d({j:c,i:h,y1:d-t*this.visibleI,y2:t*this.seriesLen,elSeries:l}),{pathTo:u.pathTo,pathFrom:u.pathFrom,x1:a,x:i,y:r,goalX:this.barHelpers.getGoalValues("x",a,null,h,c),barYPosition:d,barHeight:t}}drawColumnPaths({indexes:e,x:t,y:s,xDivision:a,barWidth:i,zeroH:r,strokeWidth:o,elSeries:l}){const n=this.w,h=e.realIndex,c=e.translationsIndex,d=e.i,u=e.j,g=e.bc;let p;if(n.axisFlags.isXNumeric){const f=this.getBarXForNumericXAxis({x:t,j:u,realIndex:h,barWidth:i});t=f.x,p=f.barXPosition}else if(n.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:f,zeroEncounters:m}=this.barHelpers.getZeroValueEncounters({i:d,j:u});f>0&&(i=this.seriesLen*i/f),p=t+i*this.visibleI,p-=i*m}else p=t+i*this.visibleI;s=this.barHelpers.getYForValue(this.series[d][u],r,c);const b=this.barHelpers.getColumnPaths({barXPosition:p,barWidth:i,y1:r,y2:s,strokeWidth:o,isReversed:this.isReversed,series:this.series,realIndex:h,i:d,j:u,w:n});return n.axisFlags.isXNumeric||(t=t+a),this.barHelpers.barBackground({bc:g,j:u,i:d,x1:p-o/2-i*this.visibleI,x2:i*this.seriesLen+o/2,elSeries:l}),{pathTo:b.pathTo,pathFrom:b.pathFrom,x:t,y:s,goalY:this.barHelpers.getGoalValues("y",null,r,d,u,c),barXPosition:p,barWidth:i}}getBarXForNumericXAxis({x:e,barWidth:t,realIndex:s,j:a}){const i=this.w;let r=s;return i.seriesData.seriesX[s].length||(r=i.globals.maxValsInArrayIndex),D.isNumber(i.seriesData.seriesX[r][a])&&(e=(i.seriesData.seriesX[r][a]-i.globals.minX)/this.xRatio-t*this.seriesLen/2),{barXPosition:e+t*this.visibleI,x:e}}getPreviousPath(e,t){const s=this.w;let a="M 0 0";for(let i=0;i<s.globals.previousPaths.length;i++){const r=s.globals.previousPaths[i];r.paths&&r.paths.length>0&&parseInt(r.realIndex,10)===parseInt(e,10)&&typeof s.globals.previousPaths[i].paths[t]<"u"&&(a=s.globals.previousPaths[i].paths[t].d)}return a}}class js extends pe{draw(e,t){const s=this.w;this.graphics=new I(this.w),this.bar=new pe(this.w,this.ctx,this.xyRatios);const a=new $(this.w);e=a.getLogSeries(e),this.yRatio=a.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e),s.config.chart.stackType==="100%"&&(e=s.globals.comboCharts?t.map(l=>s.globals.seriesPercent[l]):s.globals.seriesPercent.slice()),this.series=e,this.barHelpers.initializeStackedPrevVars(this);const i=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"});let r=0,o=0;for(let l=0,n=0;l<e.length;l++,n++){const h=s.globals.comboCharts?t[l]:l,{groupIndex:c,columnGroupIndex:d}=this.barHelpers.getGroupIndex(h);this.groupCtx=this[s.labelData.seriesGroups[c]];const u=[],g=[];let p=0;this.yRatio.length>1&&(this.yaxisIndex=s.globals.seriesYAxisReverseMap[h][0],p=h),this.isReversed=s.config.yaxis[this.yaxisIndex]&&s.config.yaxis[this.yaxisIndex].reversed;let b=this.graphics.group({class:"apexcharts-series",seriesName:D.escapeString(s.seriesData.seriesNames[h]),rel:l+1,"data:realIndex":h});j.addCollapsedClassToSeries(this.w,b,h);const f=this.graphics.group({class:"apexcharts-datalabels","data:realIndex":h}),m=this.graphics.group({class:"apexcharts-bar-goals-markers"}),v=this.initialPositions(r,o,void 0,void 0,void 0,void 0,p),{xDivision:y,yDivision:w,zeroH:C,zeroW:A}=v;let L=v.barHeight,S=v.barWidth;o=v.y,r=v.x,s.globals.barHeight=L,s.globals.barWidth=S,this.barHelpers.initializeStackedXYVars(this),this.groupCtx.prevY.length===1&&this.groupCtx.prevY[0].every(k=>isNaN(k))&&(this.groupCtx.prevY[0]=this.groupCtx.prevY[0].map(()=>C),this.groupCtx.prevYF[0]=this.groupCtx.prevYF[0].map(()=>0));for(let k=0;k<s.globals.dataPoints;k++){const M=this.barHelpers.getStrokeWidth(l,k,h),P={indexes:{i:l,j:k,realIndex:h,translationsIndex:p,bc:n},strokeWidth:M,x:r,y:o,elSeries:b,columnGroupIndex:d,seriesGroup:s.labelData.seriesGroups[c]};let T=null;this.isHorizontal?(T=this.drawStackedBarPaths(O(R({},P),{zeroW:A,barHeight:L,yDivision:w})),S=this.series[l][k]/this.invertedYRatio):(T=this.drawStackedColumnPaths(O(R({},P),{xDivision:y,barWidth:S,zeroH:C})),L=this.series[l][k]/this.yRatio[p]);const X=this.barHelpers.drawGoalLine({barXPosition:T.barXPosition,barYPosition:T.barYPosition,goalX:T.goalX,goalY:T.goalY,barHeight:L,barWidth:S});X&&m.add(X),o=T.y,r=T.x,u.push(r),g.push(o);const E=this.barHelpers.getPathFillColor(e,l,k,h);let F="";const Y=s.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y";(this.barHelpers.arrBorderRadius[h][k]==="bottom"&&s.seriesData.series[h][k]>0||this.barHelpers.arrBorderRadius[h][k]==="top"&&s.seriesData.series[h][k]<0)&&(F=Y),b=this.renderSeries(O(R({realIndex:h,pathFill:E.color},E.useRangeColor?{lineFill:E.color}:{}),{j:k,i:l,columnGroupIndex:d,pathFrom:T.pathFrom,pathTo:T.pathTo,strokeWidth:M,elSeries:b,x:r,y:o,series:e,barHeight:L,barWidth:S,elDataLabelsWrap:f,elGoalsMarkers:m,type:"bar",visibleSeries:d,classes:F}))}s.globals.seriesXvalues[h]=u,s.globals.seriesYvalues[h]=g,this.groupCtx.prevY.push(this.groupCtx.yArrj),this.groupCtx.prevYF.push(this.groupCtx.yArrjF),this.groupCtx.prevYVal.push(this.groupCtx.yArrjVal),this.groupCtx.prevX.push(this.groupCtx.xArrj),this.groupCtx.prevXF.push(this.groupCtx.xArrjF),this.groupCtx.prevXVal.push(this.groupCtx.xArrjVal),i.add(b)}return i}initialPositions(e,t,s,a,i,r,o){const l=this.w;let n,h;if(this.isHorizontal){a=l.layout.gridHeight/l.globals.dataPoints;const d=l.config.plotOptions.bar.barHeight;String(d).indexOf("%")===-1?n=parseInt(d,10):n=a*parseInt(d,10)/100,r=l.globals.padHorizontal+(this.isReversed?l.layout.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),t=(a-n)/2}else{s=l.layout.gridWidth/l.globals.dataPoints,h=s;const d=l.config.plotOptions.bar.columnWidth;l.axisFlags.isXNumeric&&l.globals.dataPoints>1?(s=l.globals.minXDiff/this.xRatio,h=s*parseInt(this.barOptions.columnWidth,10)/100):String(d).indexOf("%")===-1?h=parseInt(d,10):h*=parseInt(d,10)/100,this.isReversed?i=this.baseLineY[o]:i=l.layout.gridHeight-this.baseLineY[o],e=l.globals.padHorizontal+(s-h)/2}const c=l.globals.barGroups.length||1;return{x:e,y:t,yDivision:a,xDivision:s,barHeight:n/c,barWidth:h/c,zeroH:i,zeroW:r}}drawStackedBarPaths({indexes:e,barHeight:t,strokeWidth:s,zeroW:a,x:i,y:r,columnGroupIndex:o,seriesGroup:l,yDivision:n,elSeries:h}){const c=this.w,d=r+o*t;let u;const g=e.i,p=e.j,b=e.realIndex,f=e.translationsIndex;let m=0;for(let w=0;w<this.groupCtx.prevXF.length;w++)m=m+this.groupCtx.prevXF[w][p];let v=g;if(c.config.series[b].name&&(v=l.indexOf(c.config.series[b].name)),v>0){let w=a;this.groupCtx.prevXVal[v-1][p]<0?w=this.series[g][p]>=0?this.groupCtx.prevX[v-1][p]+m-(this.isReversed?m:0)*2:this.groupCtx.prevX[v-1][p]:this.groupCtx.prevXVal[v-1][p]>=0&&(w=this.series[g][p]>=0?this.groupCtx.prevX[v-1][p]:this.groupCtx.prevX[v-1][p]-m+(this.isReversed?m:0)*2),u=w}else u=a;this.series[g][p]===null?i=u:i=u+this.series[g][p]/this.invertedYRatio-(this.isReversed?this.series[g][p]/this.invertedYRatio:0)*2;const y=this.barHelpers.getBarpaths({barYPosition:d,barHeight:t,x1:u,x2:i,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:e.realIndex,seriesGroup:l,i:g,j:p,w:c});
962return this.barHelpers.barBackground({j:p,i:g,y1:d,y2:t,elSeries:h}),r=r+n,{pathTo:y.pathTo,pathFrom:y.pathFrom,goalX:this.barHelpers.getGoalValues("x",a,null,g,p,f),barXPosition:u,barYPosition:d,x:i,y:r}}drawStackedColumnPaths({indexes:e,x:t,y:s,xDivision:a,barWidth:i,zeroH:r,columnGroupIndex:o,seriesGroup:l,elSeries:n}){var h,c,d,u;const g=this.w,p=e.i,b=e.j,f=e.bc,m=e.realIndex,v=e.translationsIndex;if(g.axisFlags.isXNumeric){let S=g.seriesData.seriesX[m][b];S||(S=0),t=(S-g.globals.minX)/this.xRatio-i/2*g.globals.barGroups.length}const y=t+o*i;let w,C=0;for(let S=0;S<this.groupCtx.prevYF.length;S++)C=C+(isNaN(this.groupCtx.prevYF[S][b])?0:this.groupCtx.prevYF[S][b]);let A=p;if(l&&(A=l.indexOf(g.seriesData.seriesNames[m])),A>0&&!g.axisFlags.isXNumeric||A>0&&g.axisFlags.isXNumeric&&g.seriesData.seriesX[m-1][b]===g.seriesData.seriesX[m][b]){let S,k;const M=Math.min(this.yRatio.length+1,m+1);if(this.groupCtx.prevY[A-1]!==void 0&&this.groupCtx.prevY[A-1].length){for(let P=1;P<M;P++)if(!isNaN((h=this.groupCtx.prevY[A-P])==null?void 0:h[b])){k=this.groupCtx.prevY[A-P][b];break}}for(let P=1;P<M;P++)if(((c=this.groupCtx.prevYVal[A-P])==null?void 0:c[b])<0){S=this.series[p][b]>=0?k-C+(this.isReversed?C:0)*2:k;break}else if(((d=this.groupCtx.prevYVal[A-P])==null?void 0:d[b])>=0){S=this.series[p][b]>=0?k:k+C-(this.isReversed?C:0)*2;break}typeof S>"u"&&(S=g.layout.gridHeight),(u=this.groupCtx.prevYF[0])!=null&&u.every(P=>P===0)&&this.groupCtx.prevYF.slice(1,A).every(P=>P.every(T=>isNaN(T)))?w=r:w=S}else w=r;this.series[p][b]?s=w-this.series[p][b]/this.yRatio[v]+(this.isReversed?this.series[p][b]/this.yRatio[v]:0)*2:s=w;const L=this.barHelpers.getColumnPaths({barXPosition:y,barWidth:i,y1:w,y2:s,yRatio:this.yRatio[v],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:l,realIndex:e.realIndex,i:p,j:b,w:g});return this.barHelpers.barBackground({bc:f,j:b,i:p,x1:y,x2:i,elSeries:n}),{pathTo:L.pathTo,pathFrom:L.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,r,p,b),barXPosition:y,x:g.axisFlags.isXNumeric?t:t+a,y:s}}}class st extends pe{draw(e,t,s){const a=this.w,i=new I(this.w),r=a.globals.comboCharts?t:a.config.chart.type,o=new te(this.w);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=a.config.plotOptions.bar.horizontal,this.isOHLC=this.candlestickOptions&&this.candlestickOptions.type==="ohlc",this.coreUtils=new $(this.w),e=this.coreUtils.getLogSeries(e),this.series=e,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);const l=i.group({class:`apexcharts-${r}-series apexcharts-plot-series`});for(let n=0;n<e.length;n++){this.isBoxPlot=a.config.chart.type==="boxPlot"||a.config.series[n].type==="boxPlot";let h,c;const d=[],u=[],g=a.globals.comboCharts?s[n]:n,{columnGroupIndex:p}=this.barHelpers.getGroupIndex(g),b=i.group({class:"apexcharts-series",seriesName:D.escapeString(a.seriesData.seriesNames[g]),rel:n+1,"data:realIndex":g});j.addCollapsedClassToSeries(this.w,b,g),e[n].length>0&&(this.visibleI=this.visibleI+1);let f=0;this.yRatio.length>1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[g][0],f=g);const m=this.barHelpers.initialPositions(g),{y:v,barHeight:y,yDivision:w,zeroW:C,x:A,barWidth:L,xDivision:S,zeroH:k}=m;c=v,h=A,u.push(h+L/2);const M=i.group({class:"apexcharts-datalabels","data:realIndex":g}),P=i.group({class:"apexcharts-bar-goals-markers"});for(let T=0;T<a.globals.dataPoints;T++){const X=this.barHelpers.getStrokeWidth(n,T,g);let E=null;const F={indexes:{i:n,j:T,realIndex:g,translationsIndex:f},x:h,y:c,strokeWidth:X,elSeries:b};this.isHorizontal?E=this.drawHorizontalBoxPaths(O(R({},F),{yDivision:w,barHeight:y,zeroW:C})):E=this.drawVerticalBoxPaths(O(R({},F),{xDivision:S,barWidth:L,zeroH:k})),c=E.y,h=E.x;const Y=this.barHelpers.drawGoalLine({barXPosition:E.barXPosition,barYPosition:E.barYPosition,goalX:E.goalX,goalY:E.goalY,barHeight:y,barWidth:L});Y&&P.add(Y),T>0&&u.push(h+L/2),d.push(c),E.pathTo.forEach((B,N)=>{const G=!this.isBoxPlot&&this.candlestickOptions.wick.useFillColor?E.color[N]:a.globals.stroke.colors[n],V=o.fillPath({seriesNumber:g,dataPointIndex:T,color:E.color[N],value:e[n][T]});this.renderSeries({realIndex:g,pathFill:V,lineFill:G,j:T,i:n,pathFrom:E.pathFrom,pathTo:B,strokeWidth:X,elSeries:b,x:h,y:c,series:e,columnGroupIndex:p,barHeight:y,barWidth:L,elDataLabelsWrap:M,elGoalsMarkers:P,visibleSeries:this.visibleI,type:a.config.chart.type})})}a.globals.seriesXvalues[g]=u,a.globals.seriesYvalues[g]=d,l.add(b)}return l}drawVerticalBoxPaths({indexes:e,x:t,xDivision:s,barWidth:a,zeroH:i,strokeWidth:r}){const o=this.w,l=new I(this.w),n=e.i,h=e.j,{colors:c}=o.config.plotOptions.candlestick,{colors:d}=this.boxOptions,u=e.realIndex,g=P=>Array.isArray(P)?P[u]:P,p=g(c.upward),b=g(c.downward),f=this.yRatio[e.translationsIndex],m=this.getOHLCValue(u,h);let v=i,y=i,w=m.o<m.c?[p]:[b];this.isBoxPlot&&(w=[g(d.lower),g(d.upper)]);let C=Math.min(m.o,m.c),A=Math.max(m.o,m.c),L=m.m;o.axisFlags.isXNumeric&&(t=(o.seriesData.seriesX[u][h]-o.globals.minX)/this.xRatio-a/2);const S=t+a*this.visibleI;typeof this.series[n][h]>"u"||this.series[n][h]===null?(C=i,A=i):(C=i-C/f,A=i-A/f,v=i-m.h/f,y=i-m.l/f,L=i-m.m/f);let k,M=l.move(S+a/2,C);if(o.globals.previousPaths.length>0&&(M=this.getPreviousPath(u,h,!0)),this.isOHLC){const P=S+a/2,T=i-m.o/f,X=i-m.c/f;k=[l.move(P,v)+l.line(P,y)+l.move(P,T)+l.line(S,T)+l.move(P,X)+l.line(S+a,X)]}
962else this.isBoxPlot?k=[l.move(S,C)+l.line(S+a/2,C)+l.line(S+a/2,v)+l.line(S+a/4,v)+l.line(S+a-a/4,v)+l.line(S+a/2,v)+l.line(S+a/2,C)+l.line(S+a,C)+l.line(S+a,L)+l.line(S,L)+l.line(S,C+r/2),l.move(S,L)+l.line(S+a,L)+l.line(S+a,A)+l.line(S+a/2,A)+l.line(S+a/2,y)+l.line(S+a-a/4,y)+l.line(S+a/4,y)+l.line(S+a/2,y)+l.line(S+a/2,A)+l.line(S,A)+l.line(S,L)+"z"]:k=[l.move(S,A)+l.line(S+a/2,A)+l.line(S+a/2,v)+l.line(S+a/2,A)+l.line(S+a,A)+l.line(S+a,C)+l.line(S+a/2,C)+l.line(S+a/2,y)+l.line(S+a/2,C)+l.line(S,C)+l.line(S,A-r/2)];return M=M+l.move(S,C),o.axisFlags.isXNumeric||(t=t+s),{pathTo:k,pathFrom:M,x:t,y:A,goalY:this.barHelpers.getGoalValues("y",null,i,n,h,e.translationsIndex),barXPosition:S,color:w}}drawHorizontalBoxPaths({indexes:e,y:t,yDivision:s,barHeight:a,zeroW:i,strokeWidth:r}){const o=this.w,l=new I(this.w),n=e.i,h=e.j,c=e.realIndex,{colors:d}=o.config.plotOptions.candlestick,{colors:u}=this.boxOptions,g=k=>Array.isArray(k)?k[c]:k,p=this.invertedYRatio,b=this.getOHLCValue(c,h);let f=b.o<b.c?[g(d.upward)]:[g(d.downward)];this.isBoxPlot&&(f=[g(u.lower),g(u.upper)]);let m=i,v=i,y=Math.min(b.o,b.c),w=Math.max(b.o,b.c),C=b.m;o.axisFlags.isXNumeric&&(t=(o.seriesData.seriesX[c][h]-o.globals.minX)/this.invertedXRatio-a/2);const A=t+a*this.visibleI;typeof this.series[n][h]>"u"||this.series[n][h]===null?(y=i,w=i):(y=i+y/p,w=i+w/p,m=i+b.h/p,v=i+b.l/p,C=i+b.m/p);let L=l.move(y,A+a/2);o.globals.previousPaths.length>0&&(L=this.getPreviousPath(c,h,!0));const S=[l.move(y,A)+l.line(y,A+a/2)+l.line(m,A+a/2)+l.line(m,A+a/2-a/4)+l.line(m,A+a/2+a/4)+l.line(m,A+a/2)+l.line(y,A+a/2)+l.line(y,A+a)+l.line(C,A+a)+l.line(C,A)+l.line(y+r/2,A),l.move(C,A)+l.line(C,A+a)+l.line(w,A+a)+l.line(w,A+a/2)+l.line(v,A+a/2)+l.line(v,A+a-a/4)+l.line(v,A+a/4)+l.line(v,A+a/2)+l.line(w,A+a/2)+l.line(w,A)+l.line(C,A)+"z"];return L=L+l.move(y,A),o.axisFlags.isXNumeric||(t=t+s),{pathTo:S,pathFrom:L,x:w,y:t,goalX:this.barHelpers.getGoalValues("x",i,null,n,h),barYPosition:A,color:f}}getOHLCValue(e,t){const s=this.w,a=this.coreUtils,i=c=>c[e]&&c[e][t]!=null?a.getLogValAtSeriesIndex(c[e][t],e):0,r=i(s.candleData.seriesCandleH),o=i(s.candleData.seriesCandleO),l=i(s.candleData.seriesCandleM),n=i(s.candleData.seriesCandleC),h=i(s.candleData.seriesCandleL);return{o:this.isBoxPlot?r:o,h:this.isBoxPlot?o:r,m:l,l:this.isBoxPlot?n:h,c:this.isBoxPlot?h:n}}}class St{constructor(e,t){this.ctx=t,this.w=e}checkColorRange(){const e=this.w;let t=!1;const s=e.config.plotOptions[e.config.chart.type];return s.colorScale.ranges.length>0&&s.colorScale.ranges.map(a=>{a.from<=0&&(t=!0)}),t}getShadeColor(e,t,s,a){const i=this.w;let r=1;const o=i.config.plotOptions[e].shadeIntensity,l=this.determineColor(e,t,s);i.globals.hasNegs||a?i.config.plotOptions[e].reverseNegativeShade?l.percent<0?r=l.percent/100*(o*1.25):r=(1-l.percent/100)*(o*1.25):l.percent<=0?r=1-(1+l.percent/100)*o:r=(1-l.percent/100)*o:(r=1-l.percent/100,e==="treemap"&&(r=(1-l.percent/100)*(o*1.25)));let n=l.color;const h=new D;if(i.config.plotOptions[e].enableShades)if(this.w.config.theme.mode==="dark"){const c=h.shadeColor(r*-1,l.color);n=D.hexToRgba(D.isColorHex(c)?c:D.rgb2hex(c),i.config.fill.opacity)}else{const c=h.shadeColor(r,l.color);n=D.hexToRgba(D.isColorHex(c)?c:D.rgb2hex(c),i.config.fill.opacity)}return{color:n,colorProps:l}}determineColor(e,t,s){const a=this.w,i=a.seriesData.series[t][s],r=a.config.plotOptions[e];let o=r.colorScale.inverse?s:t;r.distributed&&a.config.chart.type==="treemap"&&(o=s);let l=a.globals.colors[o],n=null,h=Math.min(...a.seriesData.series[t]),c=Math.max(...a.seriesData.series[t]);!r.distributed&&e==="heatmap"&&(h=a.globals.minY,c=a.globals.maxY),typeof r.colorScale.min<"u"&&(h=r.colorScale.min<a.globals.minY?r.colorScale.min:a.globals.minY,c=r.colorScale.max>a.globals.maxY?r.colorScale.max:a.globals.maxY);const d=Math.abs(c)+Math.abs(h);let u=100*i/(d===0?d-1e-6:d);return r.colorScale.ranges.length>0&&r.colorScale.ranges.map(g=>{if(i>=g.from&&i<=g.to){l=g.color,n=g.foreColor?g.foreColor:null,h=g.from,c=g.to;const p=Math.abs(c)+Math.abs(h);u=100*i/(p===0?p-1e-6:p)}}),{color:l,foreColor:n,percent:u}}calculateDataLabels({text:e,x:t,y:s,i:a,j:i,colorProps:r,fontSize:o}){const l=this.w.config.dataLabels,n=new I(this.w),h=new ge(this.w,this.ctx);let c=null;if(l.enabled){c=n.group({class:"apexcharts-data-labels"});const d=l.offsetX,u=l.offsetY,g=t+d,p=s+parseFloat(l.style.fontSize)/3+u;h.plotDataLabelsText({x:g,y:p,text:e,i:a,j:i,color:r.foreColor,parent:c,fontSize:o,dataLabelsConfig:l})}return c}}class Vs{constructor(e,t,s){this.ctx=t,this.w=e,this.xRatio=s.xRatio,this.yRatio=s.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new St(e,t),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}draw(e){const t=this.w,s=new I(this.w,this.ctx),a=s.group({class:"apexcharts-heatmap"});a.attr("clip-path",`url(#gridRectMask${t.globals.cuid})`);const i=t.layout.gridWidth/t.globals.dataPoints,r=t.layout.gridHeight/t.seriesData.series.length;let o=0,l=!1;this.negRange=this.helpers.checkColorRange();const n=e.slice();t.config.yaxis[0].reversed&&(l=!0,n.reverse());for(let c=l?0:n.length-1;l?c<n.length:c>=0;l?c++:c--){const d=s.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:D.escapeString(t.seriesData.seriesNames[c]),rel:c+1,"data:realIndex":c});if(j.addCollapsedClassToSeries(this.w,d,c),s.setupEventDelegation(d,".apexcharts-heatmap-rect"),t.config.chart.dropShadow.enabled){const b=t.config.chart.dropShadow;new q(this.w).dropShadow(d,b,c)}let u=0;const g=t.config.plotOptions.heatmap.shadeIntensity;let p=0;for(let b=0;b<t.globals.dataPoints;b++){if(t.seriesData.seriesX.length&&!t.globals.allSeriesHasEqualX&&t.globals.minX+t.globals.minXDiff*b<t.seriesData.seriesX[c][p]){u=u+i;continue}if(p>=n[c].length)break;const f=this.helpers.getShadeColor(t.config.chart.type,c,p,this.negRange);let m=f.color;const v=f.colorProps;t.config.fill.type==="image"&&(m=new te(this.w).fillPath({seriesNumber:c,dataPointIndex:p,opacity:t.globals.hasNegs?v.percent<0?1-(1+v.percent/100):g+v.percent/100:v.percent/100,patternID:D.randomId(),width:t.config.fill.image.width?t.config.fill.image.width:i,height:t.config.fill.image.height?t.config.fill.image.height:r}));const y=this.rectRadius,w=s.drawRect(u,o,i,r,y);if(w.attr({cx:u,cy:o}),w.node.classList.add("apexcharts-heatmap-rect"),d.add(w),w.attr({fill:m,i:c,index:c,j:p,val:e[c][p],"stroke-width":this.strokeWidth,stroke:t.config.plotOptions.heatmap.useFillColorAsStroke?m:t.globals.stroke.colors[0],color:m}),t.config.chart.animations.enabled&&!t.globals.dataChanged){let S=1;t.globals.resized||(S=t.config.chart.animations.speed),this.animateHeatMap(w,u,o,i,r,S)}if(t.globals.dataChanged){let S=1;if(this.dynamicAnim.enabled&&t.globals.shouldAnimate){S=this.dynamicAnim.speed;let k=t.globals.previousPaths[c]&&t.globals.previousPaths[c][p]&&t.globals.previousPaths[c][p].color;k||(k="rgba(255, 255, 255, 0)"),this.animateHeatColor(w,D.isColorHex(k)?k:D.rgb2hex(k),D.isColorHex(m)?m:D.rgb2hex(m),S)}}const C=t.config.dataLabels.formatter,A=C(t.seriesData.series[c][p],{value:t.seriesData.series[c][p],seriesIndex:c,dataPointIndex:p,w:t}),L=this.helpers.calculateDataLabels({text:A,x:u+i/2,y:o+r/2,i:c,j:p,colorProps:v,series:n});L!==null&&d.add(L),u=u+i,p++}o=o+r,a.add(d)}const h=t.globals.yAxisScale[0].result.slice();return t.config.yaxis[0].reversed?h.unshift(""):h.push(""),t.globals.yAxisScale[0].result=h,a}animateHeatMap(e,t,s,a,i,r){const o=new xe(this.w);
962o.animateRect(e,{x:t+a/2,y:s+i/2,width:0,height:0},{x:t,y:s,width:a,height:i},r,()=>{o.animationCompleted(e)})}animateHeatColor(e,t,s,a){e.attr({fill:t}).animate(a).attr({fill:s})}}class Us{constructor(e){this.w=e.w,this.lineCtx=e}sameValueSeriesFix(e,t){const s=this.w;if((s.config.fill.type==="gradient"||s.config.fill.type[e]==="gradient")&&new $(this.lineCtx.w).seriesHaveSameValues(e)){const a=t[e].slice();a[a.length-1]=a[a.length-1]+1e-6,t[e]=a}return t}calculatePoints({series:e,realIndex:t,x:s,y:a,i,j:r,prevY:o}){const l=this.w,n=[],h=[];let c=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;return l.axisFlags.isXNumeric&&(c=(l.seriesData.seriesX[t][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),r===0&&(n.push(c),h.push(D.isNumber(e[i][0])?o+l.config.markers.offsetY:null)),n.push(s+l.config.markers.offsetX),h.push(D.isNumber(e[i][r+1])?a+l.config.markers.offsetY:null),{x:n,y:h}}checkPreviousPaths({pathFromLine:e,pathFromArea:t,realIndex:s}){const a=this.w;for(let i=0;i<a.globals.previousPaths.length;i++){const r=a.globals.previousPaths[i];(r.type==="line"||r.type==="area")&&r.paths.length>0&&parseInt(r.realIndex,10)===parseInt(s,10)&&(r.type==="line"?(this.lineCtx.appendPathFrom=!1,e=a.globals.previousPaths[i].paths[0].d):r.type==="area"&&(this.lineCtx.appendPathFrom=!1,t=a.globals.previousPaths[i].paths[0].d,a.config.stroke.show&&a.globals.previousPaths[i].paths[1]&&(e=a.globals.previousPaths[i].paths[1].d)))}return{pathFromLine:e,pathFromArea:t}}determineFirstPrevY({i:e,realIndex:t,series:s,prevY:a,lineYPosition:i,translationsIndex:r}){var o,l,n;const h=this.w,c=h.config.chart.stacked&&!h.globals.comboCharts||h.config.chart.stacked&&h.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((o=this.w.config.series[t])==null?void 0:o.type)==="bar"||((l=this.w.config.series[t])==null?void 0:l.type)==="column");if(typeof((n=s[e])==null?void 0:n[0])<"u")c?e>0?i=this.lineCtx.prevSeriesY[e-1][0]:i=this.lineCtx.zeroY:i=this.lineCtx.zeroY,a=i-s[e][0]/this.lineCtx.yRatio[r]+(this.lineCtx.isReversed?s[e][0]/this.lineCtx.yRatio[r]:0)*2;else if(c&&e>0&&typeof s[e][0]>"u"){for(let d=e-1;d>=0;d--)if(s[d][0]!==null&&typeof s[d][0]<"u"){i=this.lineCtx.prevSeriesY[d][0],a=i;break}}return{prevY:a,lineYPosition:i}}}const qs=x=>{const e=Ks(x),t=x.length-1,s=1e-6,a=[];let i,r,o,l;for(let n=0;n<t;n++)o=Ne(x[n],x[n+1]),Math.abs(o)<s?e[n]=e[n+1]=0:(i=e[n]/o,r=e[n+1]/o,l=i*i+r*r,l>9&&(l=o*3/Math.sqrt(l),e[n]=l*i,e[n+1]=l*r));for(let n=0;n<=t;n++)l=(x[Math.min(t,n+1)][0]-x[Math.max(0,n-1)][0])/(6*(1+e[n]*e[n])),a.push([l||0,e[n]*l||0]);return a},Zs=x=>{let e="";for(let t=0;t<x.length;t++){const s=x[t],a=s.length;a>4?(e+=`C${s[0]}, ${s[1]}`,e+=`, ${s[2]}, ${s[3]}`,e+=`, ${s[4]}, ${s[5]}`):a>2&&(e+=`S${s[0]}, ${s[1]}`,e+=`, ${s[2]}, ${s[3]}`)}return e},at={points(x){const e=qs(x),t=x[1],s=x[0],a=[],i=e[1],r=e[0];a.push(s,[s[0]+r[0],s[1]+r[1],t[0]-i[0],t[1]-i[1],t[0],t[1]]);for(let o=2,l=e.length;o<l;o++){const n=x[o],h=e[o];a.push([n[0]-h[0],n[1]-h[1],n[0],n[1]])}return a},slice(x,e,t){const s=x.slice(e,t);if(e){if(t-e>1&&s[1].length<6){const a=s[0].length;s[1]=[s[0][a-2]*2-s[0][a-4],s[0][a-1]*2-s[0][a-3]].concat(s[1])}s[0]=s[0].slice(-2)}return s}};function Ne(x,e){return(e[1]-x[1])/(e[0]-x[0])}function Ks(x){const e=[];let t=x[0],s=x[1],a=e[0]=Ne(t,s),i=1;for(let r=x.length-1;i<r;i++)t=s,s=x[i+1],e[i]=(a+(a=Ne(t,s)))*.5;return e[i]=a,e}class be{constructor(e,t,s,a){this.ctx=t,this.w=e,this.xyRatios=s,this.pointsChart=!(this.w.config.chart.type!=="bubble"&&this.w.config.chart.type!=="scatter")||a,this.scatter=new gt(this.w,this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Us(this),this.markers=new fe(this.w,this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}draw(e,t,s,a){var i;const r=this.w,o=new I(this.w),l=r.globals.comboCharts?t:r.config.chart.type,n=o.group({class:`apexcharts-${l}-series apexcharts-plot-series`}),h=new $(this.w);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=h.getLogSeries(e),this.yRatio=h.getLogYRatios(this.yRatio),this.prevSeriesY=[];const c=[];for(let d=0;d<e.length;d++){e=this.lineHelpers.sameValueSeriesFix(d,e);const u=r.globals.comboCharts?s[d]:d,g=this.yRatio.length>1?u:0;this._initSerieVariables(e,d,u);const p=[],b=[],f=[];let m=r.globals.padHorizontal+this.categoryAxisCorrection;const v=1,y=[],w=[];j.addCollapsedClassToSeries(this.w,this.elSeries,u),r.axisFlags.isXNumeric&&r.seriesData.seriesX.length>0&&(m=(r.seriesData.seriesX[u][0]-r.globals.minX)/this.xRatio),f.pu
962sh(m);const C=m;let A;const L=C;let S=this.zeroY,k=this.zeroY;const M=0;S=this.lineHelpers.determineFirstPrevY({i:d,realIndex:u,series:e,prevY:S,lineYPosition:M,translationsIndex:g}).prevY,r.config.stroke.curve==="monotoneCubic"&&e[d][0]===null?p.push(null):p.push(S);const P=S;let T;l==="rangeArea"&&(T=this.lineHelpers.determineFirstPrevY({i:d,realIndex:u,series:a,prevY:k,lineYPosition:M,translationsIndex:g}),k=T.prevY,A=k,b.push(p[0]!==null?k:null));const X=this._calculatePathsFrom({type:l,series:e,i:d,realIndex:u,translationsIndex:g,prevX:L,prevY:S,prevY2:k}),E=[p[0]],F=[b[0]],Y={type:l,series:e,realIndex:u,translationsIndex:g,i:d,x:m,y:v,pX:C,pY:P,pathsFrom:X,linePaths:y,areaPaths:w,seriesIndex:s,lineYPosition:M,xArrj:f,yArrj:p,y2Arrj:b,seriesRangeEnd:a},B=this._iterateOverDataPoints(O(R({},Y),{iterations:l==="rangeArea"?e[d].length-1:void 0,isRangeStart:!0}));if(l==="rangeArea"){const N=this._calculatePathsFrom({series:a,i:d,realIndex:u,prevX:L,prevY:k}),G=this._iterateOverDataPoints(O(R({},Y),{series:a,xArrj:[m],yArrj:E,y2Arrj:F,pY:A,areaPaths:B.areaPaths,pathsFrom:N,iterations:a[d].length-1,isRangeStart:!1})),V=B.linePaths.length/2;for(let W=0;W<V;W++)B.linePaths[W]=G.linePaths[W+V]+B.linePaths[W];B.linePaths.splice(V),B.pathFromLine=G.pathFromLine+B.pathFromLine}else B.pathFromArea+="z";this._handlePaths({type:l,realIndex:u,i:d,paths:B}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),c.push(this.elSeries)}if(typeof((i=r.config.series[0])==null?void 0:i.zIndex)<"u"&&c.sort((d,u)=>Number(d.node.getAttribute("zIndex"))-Number(u.node.getAttribute("zIndex"))),r.config.chart.stacked)for(let d=c.length-1;d>=0;d--)n.add(c[d]);else for(let d=0;d<c.length;d++)n.add(c[d]);return n}_initSerieVariables(e,t,s){const a=this.w,i=new I(this.w);this.xDivision=a.layout.gridWidth/(a.globals.dataPoints-(a.config.xaxis.tickPlacement==="on"?1:0)),this.strokeWidth=Array.isArray(a.config.stroke.width)?a.config.stroke.width[s]:a.config.stroke.width;let r=0;if(this.yRatio.length>1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[s],r=s),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.zeroY=a.layout.gridHeight-this.baseLineY[r]-(this.isReversed?a.layout.gridHeight:0)+(this.isReversed?this.baseLineY[r]*2:0),this.areaBottomY=this.zeroY,(this.zeroY>a.layout.gridHeight||a.config.plotOptions.area.fillTo==="end")&&(this.areaBottomY=a.layout.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=i.group({class:"apexcharts-series",zIndex:typeof a.config.series[s].zIndex<"u"?a.config.series[s].zIndex:s,seriesName:D.escapeString(a.seriesData.seriesNames[s])}),this.elPointsMain=i.group({class:"apexcharts-series-markers-wrap","data:realIndex":s}),a.globals.hasNullValues){const l=this.markers.plotChartMarkers({pointsPos:{x:[0],y:[a.layout.gridHeight+a.globals.markers.largestSize]},seriesIndex:t,j:0,pSize:.1,alwaysDrawMarker:!0,isVirtualPoint:!0});l!==null&&this.elPointsMain.add(l)}this.elDataLabelsWrap=i.group({class:"apexcharts-datalabels","data:realIndex":s});const o=e[t].length===a.globals.dataPoints;this.elSeries.attr({"data:longestSeries":o,rel:t+1,"data:realIndex":s}),this.appendPathFrom=!0}_calculatePathsFrom({type:e,series:t,i:s,realIndex:a,translationsIndex:i,prevX:r,prevY:o,prevY2:l}){const n=this.w,h=new I(this.w);let c,d,u,g;if(t[s][0]===null){for(let p=0;p<t[s].length;p++)if(t[s][p]!==null){r=this.xDivision*p,o=this.zeroY-t[s][p]/this.yRatio[i],c=h.move(r,o),d=h.move(r,this.areaBottomY);break}}else c=h.move(r,o),e==="rangeArea"&&(c=h.move(r,l)+h.line(r,o)),d=h.move(r,this.areaBottomY)+h.line(r,o);if(u=h.move(0,this.areaBottomY)+h.line(0,this.areaBottomY),g=h.move(0,this.areaBottomY)+h.line(0,this.areaBottomY),n.globals.previousPaths.length>0){const p=this.lineHelpers.checkPreviousPaths({pathFromLine:u,pathFromArea:g,realIndex:a});u=p.pathFromLine,g=p.pathFromArea}return{prevX:r,prevY:o,linePath:c,areaPath:d,pathFromLine:u,pathFromArea:g}}_handlePaths({type:e,realIndex:t,i:s,paths:a}){const i=this.w,r=new I(this.w),o=new te(this.w);this.prevSeriesY.push(a.yArrj),i.globals.seriesXvalues[t]=a.xArrj,i.globals.seriesYvalues[t]=a.yArrj;const l=i.config.forecastDataPoints;if(l.count>0&&e!=="rangeArea"){const h=i.globals.seriesXvalues[t][i.globals.seriesXvalues[t].length-l.count-1],c=r.drawRect(h,0,i.layout.gridWidth,i.layout.gridHeight,0);i.dom.elForecastMask.appendChild(c.node);const d=r.drawRect(0,0,h,i.layout.gridHeight,0);i.dom.elNonForecastMask.appendChild(d.node)}this.pointsChart||i.globals.delayedElements.push({el:this.elPointsMain.node,index:t});const n={i:s,realIndex:t,animationDelay:s,initialSpeed:i.config.chart.animations.speed,dataChangeSpeed:i.config.chart.animations.dynamicAnimation.speed,className:`apexcharts-${e}`};if(e==="area"){const h=o.fillPath({seriesNumber:t});for(let c=0;c<a.areaPaths.length;c++){const d=r.renderPaths(O(R({},n),{pathFrom:a.pathFromArea,pathTo:a.areaPaths[c],stroke:"none",strokeWidth:0,strokeLineCap:null,fill:h}));this.elSeries.add(d)}}if(i.config.stroke.show&&!this.pointsChart){let h=null;if(e==="line")h=o.fillPath({seriesNumber:t,i:s});else if(i.config.stroke.fill.type==="solid")h=i.globals.stroke.colors[t];else{const c=i.config.fill;i.config.fill=i.config.stroke.fill,h=o.fillPath({seriesNumber:t,i:s}),i.config.fill=c}for(let c=0;c<a.linePaths.length;c++){let d=h;e==="rangeArea"&&(d=o.fillPath({seriesNumber:t}));const u=O(R({},n),{pathFrom:a.pathFromLine,pathTo:a.linePaths[c],stroke:h,strokeWidth:this.strokeWidth,strokeLineCap:i.config.stroke.lineCap,fill:e==="rangeArea"?d:"none"}),g=r.renderPaths(u);if(this.elSeries.add(g),g.attr("fill-rule","evenodd"),l.count>0&&e!=="rangeArea"){const p=r.renderPaths(u);p.node.setAttribute("stroke-dasharray",l.dashArray),l.strokeWidth&&p.node.setAttribute("stroke-width",l.strokeWidth),this.elSeries.add(p),p.attr("clip-path",`url(#forecastMask${i.globals.cuid})`),g.attr("clip-path",`url(#nonForecastMask${i.globals.cuid})`)}}}}_iterateOverDataPoints({type:e,series:t,iterations:s,realIndex:a,translationsIndex:i,i:r,x:o,y:l,pX:n,pY:h,pathsFrom:c,linePaths:d,areaPaths:u,seriesIndex:g,lineYPosition:p,xArrj:b,yArrj:f,y2Arrj:m,isRangeStart:v,seriesRangeEnd:y}){var w,C;const A=this.w,L=new I(this.w),S=this.yRatio;let{prevY:k,linePath:M,areaPath:P,pathFromLine:T,pathFromArea:X}=c;const E=D.isNumber(A.globals.minYArr[a])?A.globals.minYArr[a]:A.globals.minY;s||(s=A.globals.dataPoints>1?A.globals.dataPoints-1:A.globals.dataPoints);const F=(W,se)=>se-W/S[i]+(this.isReversed?W/S[i]:0)*2;let Y=l;const B=A.config.chart.stacked&&!A.globals.comboCharts||A.config.chart.stacked&&A.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((w=this.w.config.series[a])==null?void 0:w.type)==="bar"||((C=this.w.config.series[a])==null?void 0:C.type)==="column");let N=A.config.stroke.curve;Array.isArray(N)&&(Array.isArray(g)?N=N[g[r]]:N=N[r]);let G=0,V;for(let W=0;W<s&&t[r].length!==0;W++){const se=typeof t[r][W+1]>"u"||t[r][W+1]===null;if(A.axisFlags.isXNumeric){let Ae=A.seriesData.seriesX[a][W+1];typeof A.seriesData.seriesX[a][W+1]>"u"&&(Ae=A.seriesData.seriesX[a][s-1]),o=(Ae-A.globals.minX)/this.xRatio}else o=o+this.xDivision;if(B)if(r>0&&A.globals.collapsedSeries.length<A.config.series.length-1){const Ae=Dt=>{for(let he=Dt;he>0;he--)if(A.globals.collapsedSeriesIndices.indexOf((g==null?void 0:g[he])||he)>-1)he--;else return he;return 0};p=this.prevSeriesY[Ae(r-1)][W+1]}else p=this.zeroY;else p=this.zeroY;se?l=F(E,p):(l=F(t[r][W+1],p),e==="rangeArea"&&(Y=F(y[r][W+1],p))),b.pu
962sh(t[r][W+1]===null?null:o),se&&(A.config.stroke.curve==="smooth"||A.config.stroke.curve==="monotoneCubic")?(f.push(null),m.push(null)):(f.push(l),m.push(Y));const $e=this.lineHelpers.calculatePoints({series:t,x:o,y:l,realIndex:a,i:r,j:W,prevY:k}),ae=this._createPaths({type:e,series:t,i:r,j:W,x:o,y:l,y2:Y,xArrj:b,yArrj:f,y2Arrj:m,pX:n,pY:h,pathState:G,segmentStartX:V,linePath:M,areaPath:P,linePaths:d,areaPaths:u,curve:N,isRangeStart:v});u=ae.areaPaths,d=ae.linePaths,n=ae.pX,h=ae.pY,G=ae.pathState,V=ae.segmentStartX,P=ae.areaPath,M=ae.linePath,this.appendPathFrom&&!A.globals.hasNullValues&&!(N==="monotoneCubic"&&e==="rangeArea")&&(T+=L.line(o,this.areaBottomY),X+=L.line(o,this.areaBottomY)),this.handleNullDataPoints(t,$e,r,W,a),this._handleMarkersAndLabels({type:e,pointsPos:$e,i:r,j:W,realIndex:a,isRangeStart:v})}return{yArrj:f,xArrj:b,pathFromArea:X,areaPaths:u,pathFromLine:T,linePaths:d,linePath:M,areaPath:P}}_handleMarkersAndLabels({type:e,pointsPos:t,isRangeStart:s,i:a,j:i,realIndex:r}){const o=this.w,l=new ge(this.w,this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,i,{realIndex:r,pointsPos:t,zRatio:this.zRatio,elParent:this.elPointsMain});else{o.seriesData.series[a].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");const h=this.markers.plotChartMarkers({pointsPos:t,seriesIndex:r,j:i+1});h!==null&&this.elPointsMain.add(h)}const n=l.drawDataLabel({type:e,isRangeStart:s,pos:t,i:r,j:i+1});n!==null&&this.elDataLabelsWrap.add(n)}_createPaths({type:e,series:t,i:s,j:a,x:i,y:r,xArrj:o,yArrj:l,y2:n,y2Arrj:h,pX:c,pY:d,pathState:u,segmentStartX:g,linePath:p,areaPath:b,linePaths:f,areaPaths:m,curve:v,isRangeStart:y}){const w=new I(this.w),C=this.areaBottomY,A=e==="rangeArea",L=e==="rangeArea"&&y;switch(v){case"monotoneCubic":{const S=y?l:h,k=(T,X)=>T.map((E,F)=>[E,X[F]]).filter(E=>E[1]!==null),M=T=>{const X=[];let E=0;return T.forEach(F=>{F!==null?E++:E>0&&(X.push(E),E=0)}),E>0&&X.push(E),X},P=(T,X)=>{const E=M(T),F=[];for(let Y=0,B=0;Y<E.length;B+=E[Y++])F[Y]=at.slice(X,B,B+E[Y]);return F};switch(u){case 0:if(S[a+1]===null)break;u=1;case 1:if(!(A?o.length===t[s].length:a===t[s].length-2))break;case 2:{const T=y?o:o.slice().reverse(),X=y?S:S.slice().reverse(),E=k(T,X),F=E.length>1?at.points(E):E;let Y=[];A&&(L?m=E:Y=m.reverse());let B=0,N=0;if(P(X,F).forEach(G=>{B++;const V=Zs(G),W=N;N+=G.length;const se=N-1;L?p=w.move(E[W][0],E[W][1])+V:A?p=w.move(Y[W][0],Y[W][1])+w.line(E[W][0],E[W][1])+V+w.line(Y[se][0],Y[se][1]):(p=w.move(E[W][0],E[W][1])+V,b=p+w.line(E[se][0],C)+w.line(E[W][0],C)+"z",m.push(b)),f.push(p)}),A&&B>1&&!L){const G=f.slice(B).reverse();f.splice(B),G.forEach(V=>f.push(V))}u=0;break}}break}case"smooth":{const S=(i-c)*.35;if(t[s][a]===null)u=0;else switch(u){case 0:if(g=c,L?p=w.move(c,h[a])+w.line(c,d):p=w.move(c,d),b=w.move(c,d),t[s][a+1]===null||typeof t[s][a+1]>"u"){f.push(p),m.push(b);break}if(u=1,a<t[s].length-2){const k=w.curve(c+S,d,i-S,r,i,r);p+=k,b+=k;break}case 1:if(t[s][a+1]===null)L?p+=w.line(c,n):p+=w.move(c,d),b+=w.line(c,C)+w.line(g,C)+"z",f.push(p),m.push(b),u=-1;
962else{const k=w.curve(c+S,d,i-S,r,i,r);p+=k,b+=k,a>=t[s].length-2&&(L&&(p+=w.curve(i,r,i,r,i,n)+w.move(i,n)),b+=w.curve(i,r,i,r,i,C)+w.line(g,C)+"z",f.push(p),m.push(b),u=-1)}break}c=i,d=r;break}default:{const S=(k,M,P)=>{let T=[];switch(k){case"stepline":T=w.line(M,null,"H")+w.line(null,P,"V");break;case"linestep":T=w.line(null,P,"V")+w.line(M,null,"H");break;case"straight":T=w.line(M,P);break}return T};if(t[s][a]===null)u=0;else switch(u){case 0:if(g=c,L?p=w.move(c,h[a])+w.line(c,d):p=w.move(c,d),b=w.move(c,d),t[s][a+1]===null||typeof t[s][a+1]>"u"){f.push(p),m.push(b);break}if(u=1,a<t[s].length-2){const k=S(v,i,r);p+=k,b+=k;break}case 1:if(t[s][a+1]===null)L?p+=w.line(c,n):p+=w.move(c,d),b+=w.line(c,C)+w.line(g,C)+"z",f.push(p),m.push(b),u=-1;else{const k=S(v,i,r);p+=k,b+=k,a>=t[s].length-2&&(L&&(p+=w.line(i,n)),b+=w.line(i,C)+w.line(g,C)+"z",f.push(p),m.push(b),u=-1)}break}c=i,d=r;break}}return{linePaths:f,areaPaths:m,pX:c,pY:d,pathState:u,segmentStartX:g,linePath:p,areaPath:b}}handleNullDataPoints(e,t,s,a,i){const r=this.w;if(e[s][a]===null&&r.config.markers.showNullDataPoints||e[s].length===1){let o=this.strokeWidth-r.config.markers.strokeWidth/2;o>0||(o=0);const l=this.markers.plotChartMarkers({pointsPos:t,seriesIndex:i,j:a+1,pSize:o,alwaysDrawMarker:!0});l!==null&&this.elPointsMain.add(l)}}}class kt{constructor(e){this.w=e}drawYAxisTexts(e,t,s,a){const i=this.w,r=i.config.yaxis[0],o=i.formatters.yLabelFormatters[0];return new I(this.w).drawText({x:e+r.labels.offsetX,y:t+r.labels.offsetY,text:o(a,s),textAnchor:"middle",fontSize:r.labels.style.fontSize,fontFamily:r.labels.style.fontFamily,foreColor:Array.isArray(r.labels.style.colors)?r.labels.style.colors[s]:r.labels.style.colors})}}class ke{constructor(e,t){this.ctx=t,this.w=e,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animBeginArr=[0],this.animDur=0,this.donutDataLabels=this.w.config.plotOptions.pie.donut.labels,this.lineColorArr=e.globals.stroke.colors!==void 0?e.globals.stroke.colors:e.globals.colors,this.defaultSize=Math.min(e.layout.gridWidth,e.layout.gridHeight),this.centerY=this.defaultSize/2,this.centerX=e.layout.gridWidth/2,e.config.chart.type==="radialBar"?this.fullAngle=360:this.fullAngle=Math.abs(e.config.plotOptions.pie.endAngle-e.config.plotOptions.pie.startAngle),this.initialAngle=e.config.plotOptions.pie.startAngle%this.fullAngle,e.globals.radialSize=this.defaultSize/2.05-e.config.stroke.width-(e.config.chart.sparkline.enabled?0:e.config.chart.dropShadow.blur),this.donutSize=e.globals.radialSize*parseInt(e.config.plotOptions.pie.donut.size,10)/100;const s=e.config.plotOptions.pie.customScale,a=e.layout.gridWidth/2,i=e.layout.gridHeight/2;this.translateX=a-a*s,this.translateY=i-i*s,this.dataLabelsGroup=new I(this.w).group({class:"apexcharts-datalabels-group",transform:`translate(${this.translateX}, ${this.translateY}) scale(${s})`}),this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSectorAngleArr=[]}draw(e){const t=this,s=this.w,a=new I(this.w),i=a.group({class:"apexcharts-pie"});if(s.globals.noData)return i;let r=0;for(let h=0;h<e.length;h++)r+=D.negToZero(e[h]);const o=[],l=a.group();r===0&&(r=1e-5),e.forEach(h=>{this.maxY=Math.max(this.maxY,h)}),s.config.yaxis[0].max&&(this.maxY=s.config.yaxis[0].max),s.config.grid.position==="back"&&this.chartType==="polarArea"&&this.drawPolarElements(i);for(let h=0;h<e.length;h++){const c=this.fullAngle*D.negToZero(e[h])/r;o.push(c),this.chartType==="polarArea"?(o[h]=this.fullAngle/e.length,this.sliceSizes.push(s.globals.radialSize*e[h]/this.maxY)):this.sliceSizes.push(s.globals.radialSize)}if(s.globals.dataChanged){let h=0;for(let d=0;d<s.globals.previousPaths.length;d++)h+=D.negToZero(s.globals.previousPaths[d]);let c;for(let d=0;d<s.globals.previousPaths.length;d++)c=this.fullAngle*D.negToZero(s.globals.previousPaths[d])/h,this.prevSectorAngleArr.push(c)}if(this.donutSize<0&&(this.donutSize=0),this.chartType==="donut"){const h=a.drawCircle(this.donutSize);h.attr({cx:this.centerX,cy:this.centerY,fill:s.config.plotOptions.pie.donut.background?s.config.plotOptions.pie.donut.background:"transparent"}),l.add(h)}const n=t.drawArcs(o,e);
962if(this.sliceLabels.forEach(h=>{n.add(h)}),l.attr({transform:`translate(${this.translateX}, ${this.translateY}) scale(${s.config.plotOptions.pie.customScale})`}),l.add(n),i.add(l),this.donutDataLabels.show){const h=this.renderInnerDataLabels(this.dataLabelsGroup,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});i.add(h)}return s.config.grid.position==="front"&&this.chartType==="polarArea"&&this.drawPolarElements(i),i}drawArcs(e,t){const s=this.w,a=new q(this.w),i=new I(this.w),r=new te(this.w),o=i.group({class:"apexcharts-slices"});let l=this.initialAngle,n=this.initialAngle,h=this.initialAngle,c=this.initialAngle;this.strokeWidth=s.config.stroke.show?s.config.stroke.width:0;for(let d=0;d<e.length;d++){const u=i.group({class:"apexcharts-series apexcharts-pie-series",seriesName:D.escapeString(s.seriesData.seriesNames[d]),rel:d+1,"data:realIndex":d});o.add(u),l=h,n=c,h=l+e[d],c=n+this.prevSectorAngleArr[d];const g=h<l?this.fullAngle+h-l:h-l,p=r.fillPath({seriesNumber:d,size:this.sliceSizes[d],value:t[d]}),b=this.getChangedPath(n,c),f=i.drawPath({d:b,stroke:Array.isArray(this.lineColorArr)?this.lineColorArr[d]:this.lineColorArr,strokeWidth:0,fill:p,fillOpacity:s.config.fill.opacity,classes:`apexcharts-pie-area apexcharts-${this.chartType.toLowerCase()}-slice-${d}`});if(f.attr({index:0,j:d}),a.setSelectionFilter(f,0,d),s.config.chart.dropShadow.enabled){const C=s.config.chart.dropShadow;a.dropShadow(f,C,d)}this.addListeners(f,this.donutDataLabels);let m={x:0,y:0};const v=(l+g/2)%this.fullAngle;let y={x:this.centerX,y:this.centerY};this.chartType==="pie"||this.chartType==="polarArea"?(m=D.polarToCartesian(this.centerX,this.centerY,s.globals.radialSize/1.25+s.config.plotOptions.pie.dataLabels.offset,v),y=D.polarToCartesian(this.centerX,this.centerY,s.globals.radialSize/2,v)):this.chartType==="donut"&&(m=D.polarToCartesian(this.centerX,this.centerY,(s.globals.radialSize+this.donutSize)/2+s.config.plotOptions.pie.dataLabels.offset,v),y=D.polarToCartesian(this.centerX,this.centerY,(s.globals.radialSize+this.donutSize)/2,v)),I.setAttrs(f.node,{"data:angle":g,"data:startAngle":l,"data:strokeWidth":this.strokeWidth,"data:value":t[d],"data:cx":y.x,"data:cy":y.y}),u.add(f);let w=0;if(this.initialAnim&&!s.globals.resized&&!s.globals.dataChanged?(w=g/this.fullAngle*s.config.chart.animations.speed,w===0&&(w=1),this.animDur=w+this.animDur,this.animBeginArr.push(this.animDur)):this.animBeginArr.push(0),this.dynamicAnim&&s.globals.dataChanged?this.animatePaths(f,{size:this.sliceSizes[d],endAngle:h,startAngle:l,prevStartAngle:n,prevEndAngle:c,animateStartingPos:!0,i:d,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:s.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(f,{size:this.sliceSizes[d],endAngle:h,startAngle:l,i:d,totalItems:e.length-1,animBeginArr:this.animBeginArr,dur:w}),s.config.plotOptions.pie.expandOnClick&&this.chartType!=="polarArea"&&f.node.addEventListener("mouseup",this.pieClicked.bind(this,d)),typeof s.interact.selectedDataPoints[0]<"u"&&s.interact.selectedDataPoints[0].indexOf(d)>-1&&this.pieClicked(d),s.config.dataLabels.enabled){const C=m.x,A=m.y;let L=100*g/this.fullAngle+"%";if(g!==0&&s.config.plotOptions.pie.dataLabels.minAngleToShowLabel<e[d]){const S=s.config.dataLabels.formatter;
962S!==void 0&&(L=S(s.globals.seriesPercent[d][0],{seriesIndex:d,w:s}));const k=s.globals.dataLabels.style.colors[d],M=i.group({class:"apexcharts-datalabels"}),P=i.drawText({x:C,y:A,text:L,textAnchor:"middle",fontSize:s.config.dataLabels.style.fontSize,fontFamily:s.config.dataLabels.style.fontFamily,fontWeight:s.config.dataLabels.style.fontWeight,foreColor:k});if(M.add(P),s.config.dataLabels.dropShadow.enabled){const T=s.config.dataLabels.dropShadow;a.dropShadow(P,T)}P.node.classList.add("apexcharts-pie-label"),s.config.chart.animations.animate&&s.globals.resized===!1&&(P.node.classList.add("apexcharts-pie-label-delay"),P.node.style.animationDelay=s.config.chart.animations.speed/940+"s"),this.sliceLabels.push(M)}}}return o}addListeners(e,t){const s=new I(this.w);e.node.addEventListener("mouseenter",s.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",s.pathMouseLeave.bind(this,e)),e.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this,e.node,t)),e.node.addEventListener("mousedown",s.pathMouseDown.bind(this,e)),this.donutDataLabels.total.showAlways||(e.node.addEventListener("mouseenter",this.printDataLabelsInner.bind(this,e.node,t)),e.node.addEventListener("mousedown",this.printDataLabelsInner.bind(this,e.node,t)))}animatePaths(e,t){const s=this.w,a=this;let i=t.endAngle<t.startAngle?this.fullAngle+t.endAngle-t.startAngle:t.endAngle-t.startAngle,r=i,o=t.startAngle;const l=t.startAngle;t.prevStartAngle!==void 0&&t.prevEndAngle!==void 0&&(o=t.prevEndAngle,r=t.prevEndAngle<t.prevStartAngle?this.fullAngle+t.prevEndAngle-t.prevStartAngle:t.prevEndAngle-t.prevStartAngle),t.i===s.config.series.length-1&&(i+l>this.fullAngle?t.endAngle=t.endAngle-(i+l):i+l<this.fullAngle&&(t.endAngle=t.endAngle+(this.fullAngle-(i+l)))),i===this.fullAngle&&(i=this.fullAngle-.01),a.animateArc(e,o,l,i,r,t)}animateArc(e,t,s,a,i,r){const o=this,l=this.w,n=new xe(this.w),h=r.size;let c;(isNaN(t)||isNaN(i))&&(t=s,i=a,r.dur=0);let d=a,u=s;const g=t<s?this.fullAngle+t-s:t-s;l.globals.dataChanged&&r.shouldSetPrevPaths&&r.prevEndAngle&&(c=o.getPiePath({me:o,startAngle:r.prevStartAngle,angle:r.prevEndAngle<r.prevStartAngle?this.fullAngle+r.prevEndAngle-r.prevStartAngle:r.prevEndAngle-r.prevStartAngle,size:h}),e.attr({d:c})),r.dur!==0?e.animate(r.dur,r.animBeginArr[r.i]).after(function(){(o.chartType==="pie"||o.chartType==="donut"||o.chartType==="polarArea")&&this.animate(l.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":o.strokeWidth}),r.i===l.config.series.length-1&&n.animationCompleted(e)}).during(p=>{d=g+(a-g)*p,r.animateStartingPos&&(d=i+(a-i)*p,u=t-i+(s-(t-i))*p),c=o.getPiePath({me:o,startAngle:u,angle:d,size:h}),e.node.setAttribute("data:pathOrig",c),e.attr({d:c})}):(c=o.getPiePath({me:o,startAngle:u,angle:a,size:h}),r.isTrack||(l.globals.animationEnded=!0),e.node.setAttribute("data:pathOrig",c),e.attr({d:c,"stroke-width":o.strokeWidth}))}pieClicked(e){const t=this.w,s=this,a=s.sliceSizes[e]+(t.config.plotOptions.pie.expandOnClick?4:0),i=t.dom.Paper.findOne(`.apexcharts-${s.chartType.toLowerCase()}-slice-${e}`);if(i.attr("data:pieClicked")==="true"){i.attr({"data:pieClicked":"false"}),this.revertDataLabelsInner(i.node,this.donutDataLabels);const n=i.attr("data:pathOrig");i.attr({d:n});return}else{const n=t.dom.baseEl.getElementsByClassName("apexcharts-pie-area");Array.prototype.forEach.call(n,h=>{h.setAttribute("data:pieClicked","false");const c=h.getAttribute("data:pathOrig");c&&h.setAttribute("d",c)}),t.interact.capturedDataPointIndex=e,i.attr("data:pieClicked","true")}const r=parseInt(i.attr("data:startAngle"),10),o=parseInt(i.attr("data:angle"),10),l=s.getPiePath({me:s,startAngle:r,angle:o,size:a});o!==360&&i.plot(l)}getChangedPath(e,t){let s="";return this.dynamicAnim&&this.w.globals.dataChanged&&(s=this.getPiePath({me:this,startAngle:e,angle:t-e,size:this.size})),s}getPiePath({me:e,startAngle:t,angle:s,size:a}){let i;const r=new I(this.w),o=t,l=Math.PI*(o-90)/180;let n=s+t;Math.ceil(n)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(n=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(n)>this.fullAngle&&(n-=this.fullAngle);const h=Math.PI*(n-90)/180,c=e.centerX+a*Math.cos(l),d=e.centerY+a*Math.sin(l),u=e.centerX+a*Math.cos(h),g=e.centerY+a*Math.sin(h),p=D.polarToCartesian(e.centerX,e.centerY,e.donutSize,n),b=D.polarToCartesian(e.centerX,e.centerY,e.donutSize,o),f=s>180?1:0,m=["M",c,d,"A",a,a,0,f,1,u,g];return e.chartType==="donut"?i=[...m,"L",p.x,p.y,"A",e.donutSize,e.donutSize,0,f,0,b.x,b.y,"L",c,d,"z"].join(" "):e.chartType==="pie"||e.chartType==="polarArea"?i=[...m,"L",e.centerX,e.centerY,"L",c,d].join(" "):i=[...m].join(" "),r.roundPathCorners(i,this.strokeWidth*2)}drawPolarElements(e){const t=this.w,s=new ut(this.w),a=new I(this.w),i=new kt(this.w),r=a.group(),o=a.group(),l=s.niceScale(0,Math.ceil(this.maxY),0),n=l.result.reverse(),h=l.result.length;this.maxY=l.niceMax;let c=t.globals.radialSize;const d=c/(h-1);for(let u=0;u<h-1;u++){const g=a.drawCircle(c);if(g.attr({cx:this.centerX,cy:this.centerY,fill:"none","stroke-width":t.config.plotOptions.polarArea.r
vendor: 8,215 bytes, line 962
962ings.strokeWidth,stroke:t.config.plotOptions.polarArea.rings.strokeColor}),t.config.yaxis[0].show){const p=i.drawYAxisTexts(this.centerX,this.centerY-c+parseInt(t.config.yaxis[0].labels.style.fontSize,10)/2,u,n[u]);o.add(p)}r.add(g),c=c-d}this.drawSpokes(e),e.add(r),e.add(o)}renderInnerDataLabels(e,t,s){const a=this.w,i=new I(this.w),r=t.total.show;e.node.innerHTML="",e.node.style.opacity=s.opacity;const o=s.centerX,l=this.donutDataLabels.total.label?s.centerY:s.centerY-s.centerY/6;let n,h;t.name.color===void 0?n=a.globals.colors[0]:n=t.name.color;let c=t.name.fontSize,d=t.name.fontFamily,u=t.name.fontWeight;t.value.color===void 0?h=a.config.chart.foreColor:h=t.value.color;const g=t.value.formatter;let p="",b="";if(r?(n=t.total.color,c=t.total.fontSize,d=t.total.fontFamily,u=t.total.fontWeight,b=this.donutDataLabels.total.label?t.total.label:"",p=t.total.formatter(a)):a.seriesData.series.length===1&&(p=g(a.seriesData.series[0],a),b=a.seriesData.seriesNames[0]),b&&(b=t.name.formatter(b,t.total.show,a)),t.name.show){const f=i.drawText({x:o,y:l+parseFloat(t.name.offsetY),text:b,textAnchor:"middle",foreColor:n,fontSize:c,fontWeight:u,fontFamily:d});f.node.classList.add("apexcharts-datalabel-label"),e.add(f)}if(t.value.show){const f=t.name.show?parseFloat(t.value.offsetY)+16:t.value.offsetY,m=i.drawText({x:o,y:l+f,text:p,textAnchor:"middle",foreColor:h,fontWeight:t.value.fontWeight,fontSize:t.value.fontSize,fontFamily:t.value.fontFamily});m.node.classList.add("apexcharts-datalabel-value"),e.add(m)}return e}printInnerLabels(e,t,s,a){const i=this.w;let r;a?e.name.color===void 0?r=i.globals.colors[parseInt(a.parentNode.getAttribute("rel"),10)-1]:r=e.name.color:i.seriesData.series.length>1&&e.total.show&&(r=e.total.color);const o=i.dom.baseEl.querySelector(".apexcharts-datalabel-label"),l=i.dom.baseEl.querySelector(".apexcharts-datalabel-value"),n=e.value.formatter;s=n(s,i),!a&&typeof e.total.formatter=="function"&&(s=e.total.formatter(i));const h=t===e.total.label;t=this.donutDataLabels.total.label?e.name.formatter(t,h,i):"",o!==null&&(o.textContent=t),l!==null&&(l.textContent=s),o!==null&&(o.style.fill=r)}printDataLabelsInner(e,t){const s=this.w,a=e.getAttribute("data:value"),i=s.seriesData.seriesNames[parseInt(e.parentNode.getAttribute("rel"),10)-1];s.seriesData.series.length>1&&this.printInnerLabels(t,i,a,e);const r=s.dom.baseEl.querySelector(".apexcharts-datalabels-group");r!==null&&(r.style.opacity=1)}drawSpokes(e){const t=this.w,s=new I(this.w),a=t.config.plotOptions.polarArea.spokes;if(a.strokeWidth===0)return;const i=[],r=360/t.seriesData.series.length;for(let o=0;o<t.seriesData.series.length;o++)i.push(D.polarToCartesian(this.centerX,this.centerY,t.globals.radialSize,t.config.plotOptions.pie.startAngle+r*o));i.forEach((o,l)=>{const n=s.drawLine(o.x,o.y,this.centerX,this.centerY,Array.isArray(a.connectorColors)?a.connectorColors[l]:a.connectorColors);e.add(n)})}revertDataLabelsInner(){const e=this.w;if(this.donutDataLabels.show){const t=e.dom.Paper.findOne(".apexcharts-datalabels-group"),s=this.renderInnerDataLabels(t,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});e.dom.Paper.findOne(".apexcharts-radialbar, .apexcharts-pie").add(s)}}}class Js{constructor(e,t){this.ctx=t,this.w=e,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0,this.graphics=new I(this.w),this.lineColorArr=e.globals.stroke.colors!==void 0?e.globals.stroke.colors:e.globals.colors,this.defaultSize=e.globals.svgHeight<e.globals.svgWidth?e.layout.gridHeight:e.layout.gridWidth,this.isLog=e.config.yaxis[0].logarithmic,this.logBase=e.config.yaxis[0].logBase,this.coreUtils=new $(this.w),this.maxValue=this.isLog?this.coreUtils.getLogVal(this.logBase,e.globals.maxY,0):e.globals.maxY,this.minValue=this.isLog?this.coreUtils.getLogVal(this.logBase,this.w.globals.minY,0):e.globals.minY,this.polygons=e.config.plotOptions.radar.polygons,this.strokeWidth=e.config.stroke.show?e.config.stroke.width:0,this.size=this.defaultSize/2.1-this.strokeWidth-e.config.chart.dropShadow.blur,e.config.xaxis.labels.show&&(this.size=this.size-e.layout.xAxisLabelsWidth/1.75),e.config.plotOptions.radar.size!==void 0&&(this.size=e.config.plotOptions.radar.size),this.dataRadiusOfPercent=[],this.dataRadius=[],this.angleArr=[],this.yaxisLabelsTextsPos=[]}draw(e){const t=this.w,s=new te(this.w),a=[],i=new ge(this.w,this.ctx);e.length&&(this.dataPointsLen=e[t.globals.maxValsInArrayIndex].length),this.disAngle=Math.PI*2/this.dataPointsLen;const r=t.layout.gridWidth/2,o=t.layout.gridHeight/2,l=r+t.config.plotOptions.radar.offsetX,n=o+t.config.plotOptions.radar.offsetY,h=this.graphics.group({class:"apexcharts-radar-series apexcharts-plot-series",transform:`translate(${l||0}, ${n||0})`});let c=[],d=null,u=null;if(this.yaxisLabels=this.graphics.group({class:"apexcharts-yaxis"}),e.forEach((g,p)=>{const b=g.length===t.globals.dataPoints,f=this.graphics.group().attr({class:"apexcharts-series","data:longestSeries":b,seriesName:D.escapeString(t.seriesData.seriesNames[p]),rel:p+1,"data:realIndex":p});this.dataRadiusOfPercent[p]=[],this.dataRadius[p]=[],this.angleArr[p]=[],g.forEach((w,C)=>{const A=Math.abs(this.maxValue-this.minValue);w=w-this.minValue,this.isLog&&(w=this.coreUtils.getLogVal(this.logBase,w,0)),this.dataRadiusOfPercent[p][C]=w/A,this.dataRadius[p][C]=this.dataRadiusOfPercent[p][C]*this.size,this.angleArr[p][C]=C*this.disAngle}),c=this.getDataPointsPos(this.dataRadius[p],this.angleArr[p]);const m=this.createPaths(c,{x:0,y:0});d=this.graphics.group({class:"apexcharts-series-markers-wrap apexcharts-element-hidden"}),u=this.graphics.group({class:"apexcharts-datalabels","data:realIndex":p}),t.globals.delayedElements.push({el:d.node,index:p});const v={i:p,realIndex:p,animationDelay:p,initialSpeed:t.config.chart.animations.speed,dataChangeSpeed:t.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-radar",shouldClipToGrid:!1,bindEventsOnPaths:!1,stroke:t.globals.stroke.colors[p],strokeLineCap:t.config.stroke.lineCap};let y=null;t.globals.previousPaths.length>0&&(y=this.getPreviousPath(p));for(let w=0;w<m.linePathsTo.length;w++){const C=this.graphics.renderPaths(O(R({},v),{pathFrom:y===null?m.linePathsFrom[w]:y,pathTo:m.linePathsTo[w],strokeWidth:Array.isArray(this.strokeWidth)?this.strokeWidth[p]:this.strokeWidth,fill:"none",drawShadow:!1}));f.add(C);const A=s.fillPath({seriesNumber:p}),L=this.graphics.renderPaths(O(R({},v),{pathFrom:y===null?m.areaPathsFrom[w]:y,pathTo:m.areaPathsTo[w],strokeWidth:0,fill:A,drawShadow:!1}));if(t.config.chart.dropShadow.enabled){const S=new q(this.w),k=t.config.chart.dropShadow;S.dropShadow(L,Object.assign({},k,{noUserSpaceOnUse:!0}),p)}f.add(L)}g.forEach((w,C)=>{const A=new fe(this.w,this.ctx).getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:p,dataPointIndex:C}),L=this.graphics.drawMarker(c[C].x,c[C].y,A);L.attr("rel",C),L.attr("j",C),L.attr("index",p),L.node.setAttribute("default-marker-size",A.pSize);const S=this.graphics.group({class:"apexcharts-series-markers"});S&&S.add(L),d.add(S),f.add(d);const k=t.config.dataLabels;if(k.enabled){const M=k.formatter(t.seriesData.series[p][C],{seriesIndex:p,dataPointIndex:C,w:t});i.plotDataLabelsText({x:c[C].x,y:c[C].y,text:M,textAnchor:"middle",i:p,j:p,parent:u,offsetCorrection:!1,dataLabelsConfig:R({},k)})}f.add(u)}),a.push(f)}),this.drawPolygons({parent:h}),t.config.xaxis.labels.show){const g=this.drawXAxisTexts();h.add(g)}return a.forEach(g=>{h.add(g)}),h.add(this.yaxisLabels),h}drawPolygons(e){const t=this.w,{parent:s}=e,a=new kt(this.w),i=t.globals.yAxisScale[0].result.reverse(),r=i.length,o=[],l=this.size/(r-1);for(let c=0;c<r;c++)o[c]=l*c;o.reverse();const n=[],h=[];o.forEach((c,d)=>{const u=D.getPolygonPos(c,this.dataPointsLen);let g="";u.forEach((p,b)=>{if(d===0){const f=this.graphics.drawLine(p.x,p.y,0,0,Array.isArray(this.polygons.connectorColors)?this.polygons.connectorColors[b]:this.polygons.connectorColors);h.push(f)}b===0&&this.yaxisLabelsTextsPos.push({x:p.x,y:p.y}),g+=p.x+","+p.y+" "}),n.push(g)}
vendor: 4,459 bytes, line 962
962),n.forEach((c,d)=>{const u=this.polygons.strokeColors,g=this.polygons.strokeWidth,p=this.graphics.drawPolygon(c,Array.isArray(u)?u[d]:u,Array.isArray(g)?g[d]:g,t.globals.radarPolygons.fill.colors[d]);s.add(p)}),h.forEach(c=>{s.add(c)}),t.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach((c,d)=>{const u=a.drawYAxisTexts(c.x,c.y,d,i[d]);this.yaxisLabels.add(u)})}drawXAxisTexts(){const e=this.w,t=e.config.xaxis.labels,s=this.graphics.group({class:"apexcharts-xaxis"}),a=D.getPolygonPos(this.size,this.dataPointsLen);return e.labelData.labels.forEach((i,r)=>{const o=e.config.xaxis.labels.formatter,l=new ge(this.w,this.ctx);if(a[r]){const n=this.getTextPos(a[r],this.size),h=o(i,{seriesIndex:-1,dataPointIndex:r,w:e});l.plotDataLabelsText({x:n.newX,y:n.newY,text:h,textAnchor:n.textAnchor,i:r,j:r,parent:s,className:"apexcharts-xaxis-label",color:Array.isArray(t.style.colors)&&t.style.colors[r]?t.style.colors[r]:"#a8a8a8",dataLabelsConfig:R({textAnchor:n.textAnchor,dropShadow:{enabled:!1}},t),offsetCorrection:!1}).on("click",c=>{if(typeof e.config.chart.events.xAxisLabelClick=="function"){const d=Object.assign({},e,{labelIndex:r});e.config.chart.events.xAxisLabelClick(c,this.ctx,d)}})}}),s}createPaths(e,t){const s=[];let a=[];const i=[];let r=[];if(e.length){a=[this.graphics.move(t.x,t.y)],r=[this.graphics.move(t.x,t.y)];let o=this.graphics.move(e[0].x,e[0].y),l=this.graphics.move(e[0].x,e[0].y);e.forEach((n,h)=>{o+=this.graphics.line(n.x,n.y),l+=this.graphics.line(n.x,n.y),h===e.length-1&&(o+="Z",l+="Z")}),s.push(o),i.push(l)}return{linePathsFrom:a,linePathsTo:s,areaPathsFrom:r,areaPathsTo:i}}getTextPos(e,t){let s="middle",a=e.x,i=e.y;return Math.abs(e.x)>=10?e.x>0?(s="start",a+=10):e.x<0&&(s="end",a-=10):s="middle",Math.abs(e.y)>=t-10&&(e.y<0?i-=10:e.y>0&&(i+=10)),{textAnchor:s,newX:a,newY:i}}getPreviousPath(e){const t=this.w;let s=null;for(let a=0;a<t.globals.previousPaths.length;a++){const i=t.globals.previousPaths[a];i.paths.length>0&&parseInt(i.realIndex,10)===parseInt(e,10)&&typeof t.globals.previousPaths[a].paths[0]<"u"&&(s=t.globals.previousPaths[a].paths[0].d)}return s}getDataPointsPos(e,t,s=this.dataPointsLen){e=e||[],t=t||[];const a=[];for(let i=0;i<s;i++){const r={};r.x=e[i]*Math.sin(t[i]),r.y=-e[i]*Math.cos(t[i]),a.push(r)}return a}}class Qs extends ke{constructor(e,t){super(e,t),this.ctx=t,this.w=e,this.animBeginArr=[0],this.animDur=0,this.startAngle=e.config.plotOptions.radialBar.startAngle,this.endAngle=e.config.plotOptions.radialBar.endAngle,this.totalAngle=Math.abs(e.config.plotOptions.radialBar.endAngle-e.config.plotOptions.radialBar.startAngle),this.trackStartAngle=e.config.plotOptions.radialBar.track.startAngle,this.trackEndAngle=e.config.plotOptions.radialBar.track.endAngle,this.barLabels=this.w.config.plotOptions.radialBar.barLabels,this.donutDataLabels=this.w.config.plotOptions.radialBar.dataLabels,this.radialDataLabels=this.donutDataLabels,this.trackStartAngle||(this.trackStartAngle=this.startAngle),this.trackEndAngle||(this.trackEndAngle=this.endAngle),this.endAngle===360&&(this.endAngle=359.99),this.margin=parseInt(e.config.plotOptions.radialBar.track.margin,10),this.onBarLabelClick=this.onBarLabelClick.bind(this)}draw(e){const t=this.w,s=new I(this.w),a=s.group({class:"apexcharts-radialbar"});if(t.globals.noData)return a;const i=s.group(),r=this.defaultSize/2,o=t.layout.gridWidth/2;let l=this.defaultSize/2.05;t.config.chart.sparkline.enabled||(l=l-t.config.stroke.width-t.config.chart.dropShadow.blur);const n=t.globals.fill.colors;if(t.config.plotOptions.radialBar.track.show){const u=this.drawTracks({size:l,centerX:o,centerY:r,colorArr:n,series:e});i.add(u)}const h=this.drawArcs({size:l,centerX:o,centerY:r,colorArr:n,series:e});let c=360;t.config.plotOptions.radialBar.startAngle<0&&(c=this.totalAngle);const d=(360-c)/360;if(t.globals.radialSize=l-l*d,this.radialDataLabels.value.show){const u=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);t.globals.radialSize+=u*d}return i.add(h.g),t.config.plotOptions.radialBar.hollow.position==="front"&&(h.g.add(h.elHollow),h.dataLabels&&h.g.add(h.dataLabels)),a.add(i),a}drawTracks(e){const t=this.w,s=new I(this.w),a=s.group({class:"apexcharts-tracks"}),i=new q(this.w),r=new te(this.w),o=this.getStrokeWidth(e);e.size=e.size-o/2;for(let l=0;l<e.series.length;l++){const n=s.group({class:"apexcharts-radialbar-track apexcharts-track"});a.add(n),n.attr({rel:l+1}),e.size=e.size-o-this.margin;
vendor: 9,875 bytes, line 962
962const h=t.config.plotOptions.radialBar.track,c=r.fillPath({seriesNumber:0,size:e.size,fillColors:Array.isArray(h.background)?h.background[l]:h.background,solid:!0}),d=this.trackStartAngle;let u=this.trackEndAngle;Math.abs(u)+Math.abs(d)>=360&&(u=360-Math.abs(this.startAngle)-.1);const g=s.drawPath({d:"",stroke:c,strokeWidth:o*parseInt(h.strokeWidth,10)/100,fill:"none",strokeOpacity:h.opacity,classes:"apexcharts-radialbar-area"});if(h.dropShadow.enabled){const p=h.dropShadow;i.dropShadow(g,p)}n.add(g),g.attr("id","apexcharts-radialbarTrack-"+l),this.animatePaths(g,{centerX:e.centerX,centerY:e.centerY,endAngle:u,startAngle:d,size:e.size,i:l,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return a}drawArcs(e){const t=this.w,s=new I(this.w),a=new te(this.w),i=new q(this.w),r=s.group(),o=this.getStrokeWidth(e);e.size=e.size-o/2;let l=t.config.plotOptions.radialBar.hollow.background;const n=e.size-o*e.series.length-this.margin*e.series.length-o*parseInt(t.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,h=n-t.config.plotOptions.radialBar.hollow.margin;t.config.plotOptions.radialBar.hollow.image!==void 0&&(l=this.drawHollowImage(e,r,n,l));const c=this.drawHollow({size:h,centerX:e.centerX,centerY:e.centerY,fill:l||"transparent"});if(t.config.plotOptions.radialBar.hollow.dropShadow.enabled){const p=t.config.plotOptions.radialBar.hollow.dropShadow;i.dropShadow(c,p)}let d=1;!this.radialDataLabels.total.show&&t.seriesData.series.length>1&&(d=0);let u=null;if(this.radialDataLabels.show){const p=t.dom.Paper.findOne(".apexcharts-datalabels-group");u=this.renderInnerDataLabels(p,this.radialDataLabels,{hollowSize:n,centerX:e.centerX,centerY:e.centerY,opacity:d})}t.config.plotOptions.radialBar.hollow.position==="back"&&(r.add(c),u&&r.add(u));let g=!1;t.config.plotOptions.radialBar.inverseOrder&&(g=!0);for(let p=g?e.series.length-1:0;g?p>=0:p<e.series.length;g?p--:p++){const b=s.group({class:"apexcharts-series apexcharts-radial-series",seriesName:D.escapeString(t.seriesData.seriesNames[p])});r.add(b),b.attr({rel:p+1,"data:realIndex":p}),j.addCollapsedClassToSeries(this.w,b,p),e.size=e.size-o-this.margin;const f=a.fillPath({seriesNumber:p,size:e.size,value:e.series[p]}),m=this.startAngle;let v;const y=D.negToZero(e.series[p]>100?100:e.series[p])/100;let w=Math.round(this.totalAngle*y)+this.startAngle,C;t.globals.dataChanged&&(v=this.startAngle,C=Math.round(this.totalAngle*D.negToZero(t.globals.previousPaths[p])/100)+v),Math.abs(w)+Math.abs(m)>360&&(w=w-.01),Math.abs(C)+Math.abs(v)>360&&(C=C-.01);const A=w-m,L=Array.isArray(t.config.stroke.dashArray)?t.config.stroke.dashArray[p]:t.config.stroke.dashArray,S=s.drawPath({d:"",stroke:f,strokeWidth:o,fill:"none",fillOpacity:t.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+p,strokeDashArray:L}),k=m+A/2,M=D.polarToCartesian(e.centerX,e.centerY,e.size,k);if(I.setAttrs(S.node,{"data:angle":A,"data:value":e.series[p],"data:cx":M.x,"data:cy":M.y}),t.config.chart.dropShadow.enabled){const T=t.config.chart.dropShadow;i.dropShadow(S,T,p)}if(i.setSelectionFilter(S,0,p),this.addListeners(S,this.radialDataLabels),b.add(S),S.attr({index:0,j:p}),this.barLabels.enabled){const T=D.polarToCartesian(e.centerX,e.centerY,e.size,m),X=this.barLabels.formatter(t.seriesData.seriesNames[p],{seriesIndex:p,w:t}),E=["apexcharts-radialbar-label"];this.barLabels.onClick||E.push("apexcharts-no-click");let F=this.barLabels.useSeriesColors?t.globals.colors[p]:t.config.chart.foreColor;F||(F=t.config.chart.foreColor);const Y=T.x+this.barLabels.offsetX,B=T.y+this.barLabels.offsetY,N=s.drawText({x:Y,y:B,text:X,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:F,cssClass:E.join(" ")});N.on("click",this.onBarLabelClick),N.attr({rel:p+1}),m!==0&&N.attr({"transform-origin":`${Y} ${B}`,transform:`rotate(${m} 0 0)`}),b.add(N)}let P=0;this.initialAnim&&!t.globals.resized&&!t.globals.dataChanged&&(P=t.config.chart.animations.speed),t.globals.dataChanged&&(P=t.config.chart.animations.dynamicAnimation.speed),this.animDur=P/(e.series.length*1.2)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(S,{centerX:e.centerX,centerY:e.centerY,endAngle:w,startAngle:m,prevEndAngle:C,prevStartAngle:v,size:e.size,i:p,totalItems:2,animBeginArr:this.animBeginArr,dur:P,shouldSetPrevPaths:!0})}return{g:r,elHollow:c,dataLabels:u}}drawHollow(e){const t=new I(this.w).drawCircle(e.size*2);return t.attr({class:"apexcharts-radialbar-hollow",cx:e.centerX,cy:e.centerY,r:e.size,fill:e.fill}),t}drawHollowImage(e,t,s,a){const i=this.w,r=new te(this.w),o=D.randomId(),l=i.config.plotOptions.radialBar.hollow.image;if(i.config.plotOptions.radialBar.hollow.imageClipped)r.clippedImgArea({width:s,height:s,image:l,patternID:`pattern${i.globals.cuid}${o}`}),a=`url(#pattern${i.globals.cuid}${o})`;else{const n=i.config.plotOptions.radialBar.hollow.imageWidth,h=i.config.plotOptions.radialBar.hollow.imageHeight;if(n===void 0&&h===void 0){const c=i.dom.Paper.image(l,function(d){this.move(e.centerX-d.width/2+i.config.plotOptions.radialBar.hollow.imageOffsetX,e.centerY-d.height/2+i.config.plotOptions.radialBar.hollow.imageOffsetY)});t.add(c)}else{const c=i.dom.Paper.image(l,function(){this.move(e.centerX-n/2+i.config.plotOptions.radialBar.hollow.imageOffsetX,e.centerY-h/2+i.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(n,h)});t.add(c)}}return a}getStrokeWidth(e){const t=this.w;return e.size*(100-parseInt(t.config.plotOptions.radialBar.hollow.size,10))/100/(e.series.length+1)-this.margin}onBarLabelClick(e){const t=parseInt(e.target.getAttribute("rel"),10)-1,s=this.barLabels.onClick,a=this.w;s&&s(a.seriesData.seriesNames[t],{w:a,seriesIndex:t})}}class ea extends pe{draw(e,t){const s=this.w,a=new I(this.w);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=e,this.seriesRangeStart=s.rangeData.seriesRangeStart,this.seriesRangeEnd=s.rangeData.seriesRangeEnd,this.barHelpers.initVariables(e);const i=a.group({class:"apexcharts-rangebar-series apexcharts-plot-series"});for(let r=0;r<e.length;r++){let o,l;const n=s.globals.comboCharts?t[r]:r,{columnGroupIndex:h}=this.barHelpers.getGroupIndex(n),c=a.group({class:"apexcharts-series",seriesName:D.escapeString(s.seriesData.seriesNames[n]),rel:r+1,"data:realIndex":n});j.addCollapsedClassToSeries(this.w,c,n),e[r].length>0&&(this.visibleI=this.visibleI+1);let d=0;this.yRatio.length>1&&(this.yaxisIndex=s.globals.seriesYAxisReverseMap[n][0],d=n);const u=this.barHelpers.initialPositions(n),{y:g,zeroW:p,x:b,xDivision:f,yDivision:m,zeroH:v}=u;let y=u.barWidth,w=u.barHeight;l=g,o=b;const C=a.group({class:"apexcharts-datalabels","data:realIndex":n}),A=a.group({class:"apexcharts-rangebar-goals-markers"});for(let L=0;L<s.globals.dataPoints;L++){const S=this.barHelpers.getStrokeWidth(r,L,n),k=this.seriesRangeStart[r][L],M=this.seriesRangeEnd[r][L];let P=null,T=null,X=null;const E={x:o,y:l,strokeWidth:S,elSeries:c};let F=this.seriesLen;if(s.config.plotOptions.bar.rangeBarGroupRows&&(F=1),typeof s.config.series[r].data[L]>"u")break;if(this.isHorizontal){X=l+w*this.visibleI;const N=(m-w*F)/2;if(s.config.series[r].data[L].x){const G=this.detectOverlappingBars({i:r,j:L,barYPosition:X,srty:N,barHeight:w,yDivision:m,initPositions:u});w=G.barHeight,X=G.barYPosition}P=this.drawRangeBarPaths(R({indexes:{i:r,j:L,realIndex:n},barHeight:w,barYPosition:X,zeroW:p,yDivision:m,y1:k,y2:M},E)),y=P.barWidth}else{s.axisFlags.isXNumeric&&(o=(s.seriesData.seriesX[r][L]-s.globals.minX)/this.xRatio-y/2),T=o+y*this.visibleI;const N=(f-y*F)/2;if(s.config.series[r].data[L].x){const G=this.detectOverlappingBars({i:r,j:L,barXPosition:T,srtx:N,barWidth:y,xDivision:f,initPositions:u});y=G.barWidth,T=G.barXPosition}P=this.drawRangeColumnPaths(R({indexes:{i:r,j:L,realIndex:n,translationsIndex:d},barWidth:y,barXPosition:T,zeroH:v,xDivision:f},E)),w=P.barHeight}const Y=this.barHelpers.drawGoalLine({barXPosition:P.barXPosition,barYPosition:X,goalX:P.goalX,goalY:P.goalY,barHeight:w,barWidth:y});Y&&A.add(Y),l=P.y,o=P.x;const B=this.barHelpers.getPathFillColor(e,r,L,n);this.renderSeries({realIndex:n,pathFill:B.color,lineFill:B.useRangeColor?B.color:s.globals.stroke.colors[n],j:L,i:r,x:o,y:l,y1:k,y2:M,pathFrom:P.pathFrom,pathTo:P.pathTo,strokeWidth:S,elSeries:c,series:e,barHeight:w,barWidth:y,barXPosition:T,barYPosition:X,columnGroupIndex:h,elDataLabelsWrap:C,elGoalsMarkers:A,visibleSeries:this.visibleI,type:"rangebar"})}i.add(c)}return i}detectOverlappingBars({i:e,j:t,barYPosition:s,barXPosition:a,srty:i,srtx:r,barHeight:o,barWidth:l,yDivision:n,xDivision:h,initPositions:c}){const d=this.w;let u=[];const g=d.config.series[e].data[t].rangeName,p=d.config.series[e].data[t].x,b=Array.isArray(p)?p.join(" "):p,f=d.labelData.labels.map(v=>Array.isArray(v)?v.join(" "):v).indexOf(b),m=d.rangeData.seriesRange[e].findIndex(v=>v.x===b&&v.overlaps.length>0);return this.isHorizontal?(d.config.plotOptions.bar.rangeBarGroupRows?s=i+n*f:s=i+o*this.visibleI+n*f,m>-1&&!d.config.plotOptions.bar.rangeBarOverlap&&(u=d.rangeData.seriesRange[e][m].overlaps,u.indexOf(g)>-1&&(o=c.barHeight/u.length,s=o*this.visibleI+n*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+u.indexOf(g))+n*f))):(f>-1&&!d.labelData.timescaleLabels.length&&(d.config.plotOptions.bar.rangeBarGroupRows?a=r+h*f:a=r+l*this.visibleI+h*f),m>-1&&!d.config.plotOptions.bar.rangeBarOverlap&&(u=d.rangeData.seriesRange[e][m].overlaps,u.indexOf(g)>-1&&(l=c.barWidth/u.length,a=l*this.visibleI+h*(100-parseInt(this.barOptions.barWidth,10))/100/2+l*(this.visibleI+u.indexOf(g))+h*f))),{barYPosition:s,barXPosition:a,barHeight:o,barWidth:l}}drawRangeColumnPaths({indexes:e,x:t,xDivision:s,barWidth:a,barXPosition:i,zeroH:r}){const o=this.w,{i:l,j:n,realIndex:h,translationsIndex:c}=e,d=this.yRatio[c],u=this.getRangeValue(h,n);
vendor: 6,077 bytes, line 962
962let g=Math.min(u.start,u.end),p=Math.max(u.start,u.end);typeof this.series[l][n]>"u"||this.series[l][n]===null?g=r:(g=r-g/d,p=r-p/d);const b=Math.abs(p-g),f=this.barHelpers.getColumnPaths({barXPosition:i,barWidth:a,y1:g,y2:p,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:h,i:h,j:n,w:o});if(!o.axisFlags.isXNumeric)t=t+s;else{const m=this.getBarXForNumericXAxis({x:t,j:n,realIndex:h,barWidth:a});t=m.x,i=m.barXPosition}return{pathTo:f.pathTo,pathFrom:f.pathFrom,barHeight:b,x:t,y:u.start<0&&u.end<0?g:p,goalY:this.barHelpers.getGoalValues("y",null,r,l,n,c),barXPosition:i}}preventBarOverflow(e){const t=this.w;return e<0&&(e=0),e>t.layout.gridWidth&&(e=t.layout.gridWidth),e}drawRangeBarPaths({indexes:e,y:t,y1:s,y2:a,yDivision:i,barHeight:r,barYPosition:o,zeroW:l}){const n=this.w,{realIndex:h,j:c}=e,d=this.preventBarOverflow(l+s/this.invertedYRatio),u=this.preventBarOverflow(l+a/this.invertedYRatio),g=this.getRangeValue(h,c),p=Math.abs(u-d),b=this.barHelpers.getBarpaths({barYPosition:o,barHeight:r,x1:d,x2:u,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:h,realIndex:h,j:c,w:n});return n.axisFlags.isXNumeric||(t=t+i),{pathTo:b.pathTo,pathFrom:b.pathFrom,barWidth:p,x:g.start<0&&g.end<0?d:u,goalX:this.barHelpers.getGoalValues("x",l,null,h,c),y:t}}getRangeValue(e,t){const s=this.w;return{start:s.rangeData.seriesRangeStart[e][t],end:s.rangeData.seriesRangeEnd[e][t]}}}function it(x,e){let t=0;for(let i=0;i<x.length;i++)t+=x[i];const s=e/t,a=new Array(x.length);for(let i=0;i<x.length;i++)a[i]=x[i]*s;return a}function rt(x,e,t,s){const a=s*s,i=t*t;return Math.max(a*e/i,i/(a*x))}function ta(x,e,t,s,a,i){if(x===0)return!0;const r=rt(e,t,s,i),o=rt(Math.min(e,a),Math.max(t,a),s+a,i);return r>=o}function ot(x,e,t,s,a,i,r,o){if(r>=o){const l=s/o;let n=i;for(let h=0;h<t;h++){const c=e[h]/l;x.push([a,n,a+l,n+c]),n+=c}}else{const l=s/r;let n=a;for(let h=0;h<t;h++){const c=e[h]/l;x.push([n,i,n+c,i+l]),n+=c}}}function lt(x,e,t,s,a){const i=[],r=x.length;if(r===0)return i;const o=new Array(r);let l=0,n=0,h=1/0,c=-1/0,d=0;for(;d<r;){const u=Math.min(s,a),g=x[d];if(ta(l,h,c,n,g,u))o[l]=g,l++,n+=g,g<h&&(h=g),g>c&&(c=g),d++;else{if(ot(i,o,l,n,e,t,s,a),s>=a){const p=n/a;e+=p,s-=p}else{const p=n/s;t+=p,a-=p}l=0,n=0,h=1/0,c=-1/0}}return l>0&&ot(i,o,l,n,e,t,s,a),i}function sa(x,e,t){const s=x.length,a=new Array(s);for(let o=0;o<s;o++){let l=0;const n=x[o];for(let h=0;h<n.length;h++)l+=n[h];a[o]=l}const i=lt(it(a,e*t),0,0,e,t),r=new Array(s);for(let o=0;o<s;o++){const l=i[o],n=l[0],h=l[1],c=l[2]-n,d=l[3]-h;r[o]=lt(it(x[o],c*d),n,h,c,d)}return r}const aa={generate:sa};class ia{constructor(e,t){this.ctx=t,this.w=e,this.strokeWidth=this.w.config.stroke.width,this.helpers=new St(e,t),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[]}draw(e){const t=this.w,s=new I(this.w,this.ctx),a=new te(this.w),i=s.group({class:"apexcharts-treemap"});if(t.globals.noData)return i;const r=[];return e.forEach(o=>{const l=o.map(n=>Math.abs(n));r.push(l)}),this.negRange=this.helpers.checkColorRange(),t.config.series.forEach((o,l)=>{o.data.forEach(n=>{Array.isArray(this.labels[l])||(this.labels[l]=[]),this.labels[l].push(n.x)})}),aa.generate(r,t.layout.gridWidth,t.layout.gridHeight).forEach((o,l)=>{const n=s.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:D.escapeString(t.seriesData.seriesNames[l]),rel:l+1,"data:realIndex":l});if(s.setupEventDelegation(n,".apexcharts-treemap-rect"),t.config.chart.dropShadow.enabled){const u=t.config.chart.dropShadow;new q(this.w).dropShadow(i,u,l)}const h=s.group({class:"apexcharts-data-labels"}),c={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0};o.forEach((u,g)=>{const p=u[0],b=u[1],f=u[2],m=u[3];c.xMin=Math.min(c.xMin,p),c.yMin=Math.min(c.yMin,b),c.xMax=Math.max(c.xMax,f),c.yMax=Math.max(c.yMax,m);const v=this.helpers.getShadeColor(t.config.chart.type,l,g,this.negRange),y=v.color,w=a.fillPath({color:y,seriesNumber:l,dataPointIndex:g}),C=s.drawRect(p,b,f-p,m-b,t.config.plotOptions.treemap.borderRadius,"#fff",1,this.strokeWidth,t.config.plotOptions.treemap.useFillColorAsStroke?y:t.globals.stroke.colors[l]);C.attr({cx:p,cy:b,index:l,i:l,j:g,width:f-p,height:m-b,fill:w}),C.node.classList.add("apexcharts-treemap-rect");let A={x:p+(f-p)/2,y:b+(m-b)/2,width:0,height:0};const L={x:p,y:b,width:f-p,height:m-b};if(t.config.chart.animations.enabled&&!t.globals.dataChanged){let P=1;t.globals.resized||(P=t.config.chart.animations.speed),this.animateTreemap(C,A,L,P)}if(t.globals.dataChanged){let P=1;this.dynamicAnim.enabled&&t.globals.shouldAnimate&&(P=this.dynamicAnim.speed,t.globals.previousPaths[l]&&t.globals.previousPaths[l][g]&&t.globals.previousPaths[l][g].rect&&(A=t.globals.previousPaths[l][g].rect),this.animateTreemap(C,A,L,P))}let S=this.getFontSize(u),k=t.config.dataLabels.formatter(this.labels[l][g],{value:t.seriesData.series[l][g],seriesIndex:l,dataPointIndex:g,w:t});t.config.plotOptions.treemap.dataLabels.format==="truncate"&&(S=parseInt(t.config.dataLabels.style.fontSize,10),k=this.truncateLabels(k,S,p,b,f,m));let M=null;t.seriesData.series[l][g]&&(M=this.helpers.calculateDataLabels({text:k,x:(p+f)/2,y:(b+m)/2+this.strokeWidth/2+S/3,i:l,j:g,colorProps:v,fontSize:S,series:e})),t.config.dataLabels.enabled&&M&&this.rotateToFitLabel(M,S,k,p,b,f,m),n.add(C),M!==null&&n.add(M)});const d=t.config.plotOptions.treemap.seriesTitle;if(t.config.series.length>1&&d&&d.show){const u=t.config.series[l].name||"";if(u&&c.xMin<1/0&&c.yMin<1/0){const{offsetX:g,offsetY:p,borderColor:b,borderWidth:f,borderRadius:m,style:v}=d,y=v.color||t.config.chart.foreColor,w={left:v.padding.left,right:v.padding.right,top:v.padding.top,bottom:v.padding.bottom},C=s.getTextRects(u,v.fontSize,v.fontFamily),A=C.width+w.left+w.right,L=C.height+w.top+w.bottom,S=c.xMin+(g||0),k=c.yMin+(p||0),M=s.drawRect(S,k,A,L,m,v.background,1,f,b),P=s.drawText({x:S+w.left,y:k+w.top+C.height*.75,text:u,fontSize:v.fontSize,fontFamily:v.fontFamily,fontWeight:v.fontWeight,foreColor:y,cssClass:v.cssClass||""});n.add(M),n.add(P)}}n.add(h),i.add(n)}),i}getFontSize(e){const t=this.w;
962function s(o){let l,n=0;if(Array.isArray(o[0]))for(l=0;l<o.length;l++)n+=s(o[l]);else for(l=0;l<o.length;l++)n+=o[l].length;return n}function a(o){let l,n=0;if(Array.isArray(o[0]))for(l=0;l<o.length;l++)n+=a(o[l]);else for(l=0;l<o.length;l++)n+=1;return n}const i=s(this.labels)/a(this.labels);function r(o,l){const n=o*l,h=Math.pow(n,.5);return Math.min(h/i,parseInt(t.config.dataLabels.style.fontSize,10))}return r(e[2]-e[0],e[3]-e[1])}rotateToFitLabel(e,t,s,a,i,r,o){const l=new I(this.w),n=l.getTextRects(s,t);if(n.width+this.w.config.stroke.width+5>r-a&&n.width<=o-i){const h=l.rotateAroundCenter(e.node);e.node.setAttribute("transform",`rotate(-90 ${h.x} ${h.y}) translate(${n.height/3})`)}}truncateLabels(e,t,s,a,i,r){const o=new I(this.w),l=o.getTextRects(e,t).width+this.w.config.stroke.width+5>i-s&&r-a>i-s?r-a:i-s,n=o.getTextBasedOnMaxWidth({text:e,maxWidth:l,fontSize:t});return e.length!==n.length&&l/t<5?"":n}animateTreemap(e,t,s,a){const i=new xe(this.w);i.animateRect(e,t,s,a,()=>{i.animationCompleted(e)})}}K.use({line:be,area:be,scatter:be,bubble:be,rangeArea:be,bar:pe,column:pe,barStacked:js,rangeBar:ea,candlestick:st,boxPlot:st,pie:ke,donut:ke,polarArea:ke,radialBar:Qs,radar:Js,heatmap:Vs,treemap:ia});class Me{static renderToString(e){return Ve(this,arguments,function*(t,s={}){z.isSSR()&&H.init();const{width:a=400,height:i=300,scale:r=1}=s,o=this._createVirtualElement(a,i),l=O(R({},t),{chart:O(R({},t.chart),{width:a,height:i,toolbar:{show:!1},animations:{enabled:!1}})}),n=new K(o,l);try{yield n.render();const h=this._extractSVGString(n,r);return n.destroy(),h}catch(h){throw n.destroy(),new Error(`SSR rendering failed: ${h.message}`)}})}static renderToHTML(e){return Ve(this,arguments,function*(t,s={}){const{className:a=""}=s,i=yield this.renderToString(t,s),r=this._encodeConfig(t);return`<div class="${`apexcharts-ssr-wrapper${a?" "+a:""}`}" data-apexcharts-hydrate data-apexcharts-config="${r}"> 963${i} 964</div>`})}static _createVirtualElement(e,t){if(z.isBrowser()){const s=document.createElement("div");return s.style.width=`${e}px`,s.style.height=`${t}px`,s}return{_ssrWidth:e,_ssrHeight:t,_ssrMode:!0,nodeType:1,nodeName:"DIV",children:[],style:{},classList:{add:()=>{},remove:()=>{},contains:()=>!1},appendChild(s){this.children.push(s)},removeChild(s){const a=this.children.indexOf(s);a>-1&&this.children.splice(a,1)},querySelector(){return null},querySelectorAll(){return[]},getElementsByClassName(){return[]},getAttribute(){return null},setAttribute(){},removeAttribute(){},hasAttribute(){return!1},getBoundingClientRect(){return{width:this._ssrWidth,height:this._ssrHeight,top:0,left:0,right:this._ssrWidth,bottom:this._ssrHeight,x:0,y:0}},get parentNode(){return null},get isConnected(){return!0},getRootNode(){return this}}}static _extractSVGString(e,t=1){const s=e.w;if(!s||!s.dom||!s.dom.Paper)throw new Error("Chart not properly initialized");const a=s.dom.Paper.node;if(z.isBrowser()&&a instanceof SVGElement){let i=new XMLSerializer().serializeToString(a);return t!==1&&(i=this._applyScale(i,t)),i}
964if(a&&typeof a.toString=="function"){let i=a.toString();return t!==1&&(i=this._applyScale(i,t)),i}throw new Error("Unable to extract SVG string from chart")}static _applyScale(e,t){const s=e.match(/width="([^"]+)"/),a=e.match(/height="([^"]+)"/);if(s&&a){const i=parseFloat(s[1]),r=parseFloat(a[1]),o=i*t,l=r*t;e=e.replace(/width="[^"]+"/,`width="${o}"`).replace(/height="[^"]+"/,`height="${l}"`)}return e}static _encodeConfig(e){try{const t=JSON.stringify(e);return typeof Buffer<"u"?Buffer.from(t).toString("base64"):typeof btoa<"u"?btoa(t):encodeURIComponent(t)}catch(t){throw new Error(`Failed to encode config: ${t.message}`)}}static _decodeConfig(e){try{let t;return typeof Buffer<"u"?t=Buffer.from(e,"base64").toString("utf-8"):typeof atob<"u"?t=atob(e):t=decodeURIComponent(e),JSON.parse(t)}catch(t){throw new Error(`Failed to decode config: ${t.message}`)}}}class ue{static hydrate(e,t={}){if(!z.isBrowser())throw new Error("Hydration can only be performed in browser environment");if(!e)throw new Error("Element is required for hydration");if(!e.hasAttribute("data-apexcharts-hydrate"))throw new Error("Element does not have data-apexcharts-hydrate attribute");const s=e.getAttribute("data-apexcharts-config");if(!s)throw new Error("Element is missing data-apexcharts-config attribute");const a=this._decodeConfig(s),i=this._mergeConfigs(a,t),r=e.innerHTML,o=new K(e,i),l=e.getBoundingClientRect();return e.style.width=`${l.width}px`,e.style.height=`${l.height}px`,e.innerHTML="",e.removeAttribute("data-apexcharts-hydrate"),e.removeAttribute("data-apexcharts-config"),o.render().then(()=>{e.setAttribute("data-apexcharts-hydrated","true"),e.style.width="",e.style.height="";const n=new CustomEvent("apexcharts:hydrated",{detail:{chart:o,ssrContent:r}});e.dispatchEvent(n)}).catch(n=>{throw console.error("ApexCharts hydration failed:",n),e.innerHTML=r,e.setAttribute("data-apexcharts-hydrate",""),e.setAttribute("data-apexcharts-config",s),n}),o}static hydrateAll(e="[data-apexcharts-hydrate]",t={}){if(!z.isBrowser())throw new Error("Hydration can only be performed in browser environment");const s=document.querySelectorAll(e);if(s.length===0)return console.warn(`No elements found matching selector: ${e}`),[];const a=[];return s.forEach(i=>{try{const r=this.hydrate(i,t);a.push(r)}catch(r){console.error("Failed to hydrate element:",i,r)}}),a}static isHydrated(e){return e?e.hasAttribute("data-apexcharts-hydrated"):!1}static _decodeConfig(e){try{let t;return typeof atob<"u"?t=atob(e):typeof Buffer<"u"?t=Buffer.from(e,"base64").toString("utf-8"):t=decodeURIComponent(e),JSON.parse(t)}catch(t){throw new Error(`Failed to decode chart config: ${t.message}`)}}static _mergeConfigs(e,t){var s,a,i;const r=R(R({},e),t);return(e.chart||t.chart)&&(r.chart=R(R({},e.chart),t.chart),(r.chart.animations===void 0||r.chart.animations.enabled===!1)&&(r.chart.animations=O(R({},r.chart.animations||{}),{enabled:!0})),((s=t.chart)==null?void 0:s.toolbar)===void 0&&((i=(a=e.chart)==null?void 0:a.toolbar)==null?void 0:i.show)===!1&&(r.chart.toolbar=O(R({},r.chart.toolbar||{}),{show:!0}))),r}}K.renderToString=Me.renderToString.bind(Me);K.renderToHTML=Me.renderToHTML.bind(Me);K.hydrate=ue.hydrate.bind(ue);K.hydrateAll=ue.hydrateAll.bind(ue);K.isHydrated=ue.isHydrated.bind(ue);export{ue as Hydration,Me as SSRRenderer,K as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.