apexcharts 7.2.0 → 7.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/dist/apexcharts.common.js +2 -2
  2. package/dist/apexcharts.core.js +1 -1
  3. package/dist/apexcharts.core.min.js +1 -1
  4. package/dist/apexcharts.esm.js +167 -2
  5. package/dist/apexcharts.js +167 -2
  6. package/dist/apexcharts.min.js +2 -2
  7. package/dist/apexcharts.ssr.common.js +2 -2
  8. package/dist/apexcharts.ssr.esm.js +167 -2
  9. package/dist/area.common.js +1 -1
  10. package/dist/area.esm.js +1 -1
  11. package/dist/bar.common.js +1 -1
  12. package/dist/bar.esm.js +1 -1
  13. package/dist/bar.js +1 -1
  14. package/dist/boxPlot.common.js +1 -1
  15. package/dist/boxPlot.esm.js +1 -1
  16. package/dist/bubble.common.js +1 -1
  17. package/dist/bubble.esm.js +1 -1
  18. package/dist/candlestick.common.js +1 -1
  19. package/dist/candlestick.esm.js +1 -1
  20. package/dist/candlestick.js +1 -1
  21. package/dist/column.common.js +1 -1
  22. package/dist/column.esm.js +1 -1
  23. package/dist/core.common.js +1 -1
  24. package/dist/core.esm.js +1 -1
  25. package/dist/donut.common.js +1 -1
  26. package/dist/donut.esm.js +1 -1
  27. package/dist/dumbbell.common.js +1 -1
  28. package/dist/dumbbell.esm.js +1 -1
  29. package/dist/features/all.common.js +2 -2
  30. package/dist/features/all.esm.js +167 -2
  31. package/dist/features/annotations.common.js +1 -1
  32. package/dist/features/annotations.esm.js +1 -1
  33. package/dist/features/annotations.js +1 -1
  34. package/dist/features/context-menu.common.js +1 -1
  35. package/dist/features/context-menu.esm.js +1 -1
  36. package/dist/features/context-menu.js +1 -1
  37. package/dist/features/drilldown.common.js +1 -1
  38. package/dist/features/drilldown.esm.js +1 -1
  39. package/dist/features/drilldown.js +1 -1
  40. package/dist/features/dumbbell.common.js +1 -1
  41. package/dist/features/dumbbell.esm.js +1 -1
  42. package/dist/features/dumbbell.js +1 -1
  43. package/dist/features/exports.common.js +1 -1
  44. package/dist/features/exports.esm.js +1 -1
  45. package/dist/features/exports.js +1 -1
  46. package/dist/features/facet.common.js +1 -1
  47. package/dist/features/facet.esm.js +1 -1
  48. package/dist/features/facet.js +1 -1
  49. package/dist/features/history.common.js +1 -1
  50. package/dist/features/history.esm.js +1 -1
  51. package/dist/features/history.js +1 -1
  52. package/dist/features/ink.common.js +1 -1
  53. package/dist/features/ink.esm.js +1 -1
  54. package/dist/features/ink.js +1 -1
  55. package/dist/features/keyboard.common.js +1 -1
  56. package/dist/features/keyboard.esm.js +1 -1
  57. package/dist/features/keyboard.js +1 -1
  58. package/dist/features/legend.common.js +1 -1
  59. package/dist/features/legend.esm.js +1 -1
  60. package/dist/features/legend.js +1 -1
  61. package/dist/features/link.common.js +1 -1
  62. package/dist/features/link.esm.js +1 -1
  63. package/dist/features/link.js +1 -1
  64. package/dist/features/marks.common.js +1 -1
  65. package/dist/features/marks.esm.js +1 -1
  66. package/dist/features/marks.js +1 -1
  67. package/dist/features/measure.common.js +1 -1
  68. package/dist/features/measure.esm.js +1 -1
  69. package/dist/features/measure.js +1 -1
  70. package/dist/features/morph.common.js +1 -1
  71. package/dist/features/morph.esm.js +1 -1
  72. package/dist/features/morph.js +1 -1
  73. package/dist/features/perspectives.common.js +1 -1
  74. package/dist/features/perspectives.esm.js +1 -1
  75. package/dist/features/perspectives.js +1 -1
  76. package/dist/features/raincloud.common.js +1 -1
  77. package/dist/features/raincloud.esm.js +1 -1
  78. package/dist/features/raincloud.js +1 -1
  79. package/dist/features/renderer-canvas.common.js +1 -1
  80. package/dist/features/renderer-canvas.esm.js +1 -1
  81. package/dist/features/renderer-canvas.js +1 -1
  82. package/dist/features/stats.common.js +1 -1
  83. package/dist/features/stats.esm.js +1 -1
  84. package/dist/features/stats.js +1 -1
  85. package/dist/features/storyboard.common.js +1 -1
  86. package/dist/features/storyboard.esm.js +1 -1
  87. package/dist/features/storyboard.js +1 -1
  88. package/dist/features/streamgraph.common.js +1 -1
  89. package/dist/features/streamgraph.esm.js +1 -1
  90. package/dist/features/streamgraph.js +1 -1
  91. package/dist/features/toolbar.common.js +1 -1
  92. package/dist/features/toolbar.esm.js +1 -1
  93. package/dist/features/toolbar.js +1 -1
  94. package/dist/features/trellis.common.js +1 -1
  95. package/dist/features/trellis.esm.js +1 -1
  96. package/dist/features/trellis.js +1 -1
  97. package/dist/features/waterfall.common.js +1 -1
  98. package/dist/features/waterfall.esm.js +1 -1
  99. package/dist/features/waterfall.js +1 -1
  100. package/dist/features/weave.common.js +2 -2
  101. package/dist/features/weave.esm.js +167 -2
  102. package/dist/features/weave.js +2 -2
  103. package/dist/heatmap.common.js +1 -1
  104. package/dist/heatmap.esm.js +1 -1
  105. package/dist/heatmap.js +1 -1
  106. package/dist/histogram.common.js +1 -1
  107. package/dist/histogram.esm.js +1 -1
  108. package/dist/line.common.js +1 -1
  109. package/dist/line.esm.js +1 -1
  110. package/dist/line.js +1 -1
  111. package/dist/pictograms.common.js +1 -1
  112. package/dist/pictograms.esm.js +1 -1
  113. package/dist/pictograms.js +1 -1
  114. package/dist/pie.common.js +1 -1
  115. package/dist/pie.esm.js +1 -1
  116. package/dist/pie.js +1 -1
  117. package/dist/polarArea.common.js +1 -1
  118. package/dist/polarArea.esm.js +1 -1
  119. package/dist/radar.common.js +1 -1
  120. package/dist/radar.esm.js +1 -1
  121. package/dist/radar.js +1 -1
  122. package/dist/radialBar.common.js +1 -1
  123. package/dist/radialBar.esm.js +1 -1
  124. package/dist/radialBar.js +1 -1
  125. package/dist/raincloud.common.js +1 -1
  126. package/dist/raincloud.esm.js +1 -1
  127. package/dist/rangeArea.common.js +1 -1
  128. package/dist/rangeArea.esm.js +1 -1
  129. package/dist/rangeBar.common.js +1 -1
  130. package/dist/rangeBar.esm.js +1 -1
  131. package/dist/scatter.common.js +1 -1
  132. package/dist/scatter.esm.js +1 -1
  133. package/dist/streamgraph.common.js +1 -1
  134. package/dist/streamgraph.esm.js +1 -1
  135. package/dist/sunburst.common.js +1 -1
  136. package/dist/sunburst.esm.js +1 -1
  137. package/dist/sunburst.js +1 -1
  138. package/dist/treemap.common.js +1 -1
  139. package/dist/treemap.esm.js +1 -1
  140. package/dist/treemap.js +1 -1
  141. package/dist/unit-shapes.common.js +1 -1
  142. package/dist/unit-shapes.esm.js +1 -1
  143. package/dist/unit-shapes.js +1 -1
  144. package/dist/unit.common.js +1 -1
  145. package/dist/unit.esm.js +1 -1
  146. package/dist/unit.js +1 -1
  147. package/dist/violin.common.js +1 -1
  148. package/dist/violin.esm.js +1 -1
  149. package/dist/violin.js +1 -1
  150. package/dist/waterfall.common.js +1 -1
  151. package/dist/waterfall.esm.js +1 -1
  152. package/package.json +1 -1
  153. package/src/modules/weave/PluginAPI.js +37 -1
  154. package/src/modules/weave/WeaveHost.js +148 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ApexCharts v7.2.0
2
+ * ApexCharts v7.3.0
3
3
  * (c) 2018-2026 ApexCharts
4
4
  */
5
5
  "use strict";var t=Object.defineProperty,e=Object.defineProperties,i=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,o=(e,i,s)=>i in e?t(e,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[i]=s,l=(t,e)=>{for(var i in e||(e={}))n.call(e,i)&&o(t,i,e[i]);if(s)for(var i of s(e))a.call(e,i)&&o(t,i,e[i]);return t},r=(t,s)=>e(t,i(s));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function c(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const i in t)if("default"!==i){const s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const h=c(require("apexcharts/core")),d=h.__apex_Graphics,u=h.__apex_axes_AxesUtils,m=h.__apex_Data,g=h.__apex_Series,p=h.__apex_Utils,x=h.__apex_Environment_Environment,f=h.__apex_BrowserAPIs_BrowserAPIs,b=h.__apex_math_SVGNS;class y{constructor(t,e){this.w=t,this.ctx=e}svgStringToNode(t){return(new DOMParser).parseFromString(t,"image/svg+xml").documentElement}scaleSvgNode(t,e){const i=parseFloat(t.getAttributeNS(null,"width")),s=parseFloat(t.getAttributeNS(null,"height"));t.setAttributeNS(null,"width",i*e),t.setAttributeNS(null,"height",s*e),t.setAttributeNS(null,"viewBox","0 0 "+i+" "+s)}inlineCanvasLayers(t){const e=this.w.dom.elWrap.querySelectorAll(".apexcharts-series-canvas");if(!e.length)return;const i=t.querySelectorAll(".apexcharts-canvas-series");for(let t=0;t<e.length&&t<i.length;t++){let s;try{s=e[t].toDataURL()}catch(t){continue}const n=i[t],a=document.createElementNS(b,"image");a.setAttribute("x",n.getAttribute("x")||"0"),a.setAttribute("y",n.getAttribute("y")||"0"),a.setAttribute("width",n.getAttribute("width")||"0"),a.setAttribute("height",n.getAttribute("height")||"0"),a.setAttribute("href",s),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s),n.parentNode&&n.parentNode.replaceChild(a,n)}}queryStyleable(t,e){return Array.prototype.slice.call(t.querySelectorAll(e))}setStyleDefaults(t,e){Object.keys(e).forEach(i=>{""===t.style.getPropertyValue(i)&&t.style.setProperty(i,e[i])})}applyExportStyles(t){const e=this.w;this.queryStyleable(t,"style").forEach(t=>t.remove()),this.queryStyleable(t,[".apexcharts-tooltip",".apexcharts-toolbar",".apexcharts-xaxistooltip",".apexcharts-yaxistooltip",".apexcharts-xcrosshairs",".apexcharts-ycrosshairs",".apexcharts-zoom-rect",".apexcharts-selection-rect"].join(", ")).forEach(t=>{t.style.setProperty("display","none","important")}),this.queryStyleable(t,".apexcharts-flip-y").forEach(t=>{this.setStyleDefaults(t,{transform:"scaleY(-1) translateY(-100%)","transform-origin":"top","transform-box":"fill-box"})}),this.queryStyleable(t,".apexcharts-flip-x").forEach(t=>{this.setStyleDefaults(t,{transform:"scaleX(-1)","transform-origin":"center","transform-box":"fill-box"})}),e.config.legend.show&&e.dom.elLegendWrap&&e.dom.elLegendWrap.children.length&&(this.queryStyleable(t,".apexcharts-legend").forEach(t=>{this.setStyleDefaults(t,{display:"flex",overflow:"auto",padding:"0 10px"});const e=t.classList,i=e.contains("apx-legend-position-left")||e.contains("apx-legend-position-right"),s=e.contains("apx-legend-position-top")||e.contains("apx-legend-position-bottom");e.contains("apexcharts-legend-group-horizontal")&&this.setStyleDefaults(t,{"flex-direction":"column"}),i&&this.setStyleDefaults(t,{"flex-direction":"column",bottom:"0"}),s&&this.setStyleDefaults(t,{"flex-wrap":"wrap"}),i||s&&e.contains("apexcharts-align-left")?this.setStyleDefaults(t,{"justify-content":"flex-start","align-items":"flex-start"}):s&&e.contains("apexcharts-align-center")?this.setStyleDefaults(t,{"justify-content":"center","align-items":"center"}):s&&e.contains("apexcharts-align-right")&&this.setStyleDefaults(t,{"justify-content":"flex-end","align-items":"flex-end"})}),this.queryStyleable(t,".apexcharts-legend-group").forEach(t=>{this.setStyleDefaults(t,{display:"flex"})}),this.queryStyleable(t,".apexcharts-legend-group-vertical").forEach(t=>{this.setStyleDefaults(t,{"flex-direction":"column-reverse"})}),this.queryStyleable(t,".apexcharts-legend-series").forEach(t=>{this.setStyleDefaults(t,{cursor:t.classList.contains("apexcharts-no-click")?"auto":"pointer","line-height":"normal",display:"flex","align-items":"center"})}),this.queryStyleable(t,".apexcharts-legend-text").forEach(t=>{this.setStyleDefaults(t,{position:"relative","font-size":"14px"})}),this.queryStyleable(t,".apexcharts-legend-marker").forEach(t=>{this.setStyleDefaults(t,{position:"relative",display:"flex","align-items":"center","justify-content":"center",cursor:"pointer","margin-right":"1px"})}),this.queryStyleable(t,".apexcharts-inactive-legend").forEach(t=>{this.setStyleDefaults(t,{opacity:"0.45"})}),this.queryStyleable(t,".apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series").forEach(t=>{t.style.setProperty("display","none","important")}))}resolveExportBackground(){const t=this.w,e=t.config.chart.background;return e&&"transparent"!==e?e:"dark"===t.config.theme.mode?"#343A3F":"#fff"}collectFontFamilies(){const t=new Set,e=this.w;if(!x.isBrowser()||!e.dom.elWrap)return t;const i=this.queryStyleable(e.dom.elWrap,"text, tspan, .apexcharts-legend-text, .apexcharts-title-text, .apexcharts-subtitle-text");return[e.dom.elWrap,...i].forEach(e=>{const i=f.getComputedStyle(e),s=i&&i.fontFamily;s&&s.split(",").forEach(e=>{const i=e.trim().replace(/^['"]|['"]$/g,"");i&&t.add(i.toLowerCase())})}),t}collectFontFaceRules(){if(!x.isBrowser())return Promise.resolve([]);const t=[],e=[],i=e=>{(e.match(/@font-face\s*\{[^}]*\}/gi)||[]).forEach(e=>{const i=e.match(/font-family\s*:\s*([^;}]+)/i);if(!i)return;const s=i[1].trim().replace(/^['"]|['"]$/g,"");t.push({family:s.toLowerCase(),css:e})})};return Array.from(document.styleSheets||[]).forEach(t=>{let s=null;try{s=t.cssRules}catch(t){s=null}s?Array.from(s).forEach(t=>{5===t.type&&t.cssText&&i(t.cssText)}):t.href&&e.push(fetch(t.href).then(t=>t.ok?t.text():"").then(i).catch(()=>{}))}),Promise.all(e).then(()=>t)}embedFonts(t){const e=this.w;if(!x.isBrowser()||!e.config.chart.toolbar.export.embedFonts||"function"!=typeof fetch)return Promise.resolve();const i=this.collectFontFamilies();return i.size?this.collectFontFaceRules().then(t=>{const e=t.filter(t=>i.has(t.family));return e.length?Promise.all(e.map(t=>this.inlineFontFaceUrls(t.css).catch(()=>null))):Promise.resolve([])}).then(e=>{const i=(e||[]).filter(Boolean).join("\n");if(!i)return;const s=document.createElementNS(b,"style");s.textContent=i,t.insertBefore(s,t.firstChild)}).catch(()=>{}):Promise.resolve()}inlineFontFaceUrls(t){const e=[],i=/url\(\s*(['"]?)([^'")]+)\1\s*\)/gi;let s;for(;null!==(s=i.exec(t));)s[2].startsWith("data:")||e.push(s[2]);return e.length?Promise.all(e.map(t=>this.fetchAsDataUri(t).then(e=>({url:t,dataUri:e})).catch(()=>({url:t,dataUri:null})))).then(e=>{let i=t,s=0;return e.forEach(({url:t,dataUri:e})=>{e&&(i=i.split(t).join(e),s++)}),s?i:null}):Promise.resolve(t.includes("data:")?t:null)}fetchAsDataUri(t){return"function"!=typeof fetch||"function"!=typeof btoa?Promise.reject(new Error("fetch unavailable")):fetch(t).then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status} for ${t}`);const i=e.headers.get("content-type")||"application/octet-stream";return e.arrayBuffer().then(t=>{const e=new Uint8Array(t);let s="";for(let t=0;t<e.length;t+=32768)s+=String.fromCharCode.apply(null,e.subarray(t,t+32768));return`data:${i};base64,${btoa(s)}`})})}getSvgString(t){return new Promise(e=>{const i=this.w;let s=t||i.config.chart.toolbar.export.scale||i.config.chart.toolbar.export.width/i.globals.svgWidth;s||(s=1);const n=i.globals.svgWidth*s,a=i.globals.svgHeight*s,o=i.dom.elWrap.cloneNode(!0);o.style.width=n+"px",o.style.height=a+"px",this.inlineCanvasLayers(o),this.applyExportStyles(o);const l=(new XMLSerializer).serializeToString(o);let r=`\n <svg xmlns="http://www.w3.org/2000/svg"\n version="1.1"\n xmlns:xlink="http://www.w3.org/1999/xlink"\n class="apexcharts-svg"\n xmlns:data="ApexChartsNS"\n transform="translate(0, 0)"\n width="${i.globals.svgWidth}px" height="${i.globals.svgHeight}px">\n <foreignObject width="100%" height="100%">\n <div xmlns="http://www.w3.org/1999/xhtml" style="width:${n}px; height:${a}px;">\n ${l}\n </div>\n </foreignObject>\n </svg>\n `;const c=this.svgStringToNode(r);1!==s&&this.scaleSvgNode(c,s),Promise.all([this.convertImagesToBase64(c),this.embedFonts(c)]).then(()=>{r=(new XMLSerializer).serializeToString(c),e(r.replace(/&nbsp;/g,"&#160;"))})})}convertImagesToBase64(t){const e="http://www.w3.org/1999/xlink",i=t.getElementsByTagName("image"),s=Array.from(i).map(t=>{const i=t.getAttributeNS(e,"href"),s=t.getAttribute("href"),n=i||s;if(!n||n.startsWith("data:"))return Promise.resolve();const a=n=>{i&&t.setAttributeNS(e,"href",n),!s&&i||t.setAttribute("href",n)};return this.fetchAsDataUri(n).then(a).catch(()=>this.getBase64FromUrl(n).then(a).catch(t=>{}))});return Promise.all(s)}getBase64FromUrl(t){return x.isSSR()?Promise.resolve(t):new Promise((e,i)=>{const s=new Image;s.crossOrigin="Anonymous",s.onload=()=>{const t=document.createElement("canvas");t.width=s.width,t.height=s.height;const i=t.getContext("2d");i&&i.drawImage(s,0,0),e(t.toDataURL())},s.onerror=i,s.src=t})}svgUrl(){return new Promise(t=>{this.getSvgString().then(e=>{const i=new Blob([e],{type:"image/svg+xml;charset=utf-8"});t(URL.createObjectURL(i))})})}dataURI(t){return x.isSSR()?Promise.resolve({imgURI:""}):new Promise(e=>{const i=this.w,s=t?t.scale||t.width/i.globals.svgWidth:1,n=document.createElement("canvas");n.width=i.globals.svgWidth*s,n.height=parseInt(i.dom.elWrap.style.height,10)*s;const a=this.resolveExportBackground(),o=n.getContext("2d");o&&(o.fillStyle=a,o.fillRect(0,0,n.width,n.height),this.getSvgString(s).then(t=>{const i="data:image/svg+xml,"+encodeURIComponent(t),s=new Image;s.crossOrigin="anonymous",s.onload=()=>{o.drawImage(s,0,0);const t=n;if(t.msToBlob){const i=t.msToBlob();e({blob:i})}else{const t=n.toDataURL("image/png");e({imgURI:t})}},s.src=i}))})}exportToSVG(){this.svgUrl().then(t=>{this.triggerDownload(t,this.w.config.chart.toolbar.export.svg.filename,".svg")})}exportToPng(){const t=this.w.config.chart.toolbar.export.scale,e=this.w.config.chart.toolbar.export.width,i=t?{scale:t}:e?{width:e}:void 0;this.dataURI(i).then(({imgURI:t,blob:e})=>{e?navigator.msSaveOrOpenBlob(e,this.w.globals.chartID+".png"):this.triggerDownload(t,this.w.config.chart.toolbar.export.png.filename,".png")})}exportToCSV({series:t,fileName:e,columnDelimiter:i=",",lineDelimiter:s="\n"}){const n=this.w;t||(t=n.config.series);let a=[];const o=[];let l="";const r=n.seriesData.series.map((t,e)=>-1===n.globals.collapsedSeriesIndices.indexOf(e)?t:[]),c=t=>{if(null==t||p.isNumber(t))return t;const e=String(t);return/^[=+\-@\t\r]/.test(e)?`'${e}`:e},h=t=>"function"==typeof n.config.chart.toolbar.export.csv.categoryFormatter?n.config.chart.toolbar.export.csv.categoryFormatter(t):"datetime"===n.config.xaxis.type&&String(t).length>=10?new Date(t).toDateString():p.isNumber(t)?t:c(t.split(i).join("")),d=t=>"function"==typeof n.config.chart.toolbar.export.csv.valueFormatter?n.config.chart.toolbar.export.csv.valueFormatter(t):c(t),x=Math.max(...t.map(t=>t.data?t.data.length:0)),f=new m(this.w),b=new u(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale}),y=t=>{let e="";if(n.globals.axisCharts){if("category"===n.config.xaxis.type||n.config.xaxis.convertedCatToNumeric)if(n.globals.isBarHorizontal){const i=n.formatters.yLabelFormatters[0],s=new g(this.ctx.w).getActiveConfigSeriesIndex();e=i(n.labelData.labels[t],{seriesIndex:s,dataPointIndex:t,w:n})}else e=b.getLabel(n.labelData.labels,n.labelData.timescaleLabels,0,t).text;"datetime"===n.config.xaxis.type&&(n.config.xaxis.categories.length?e=n.config.xaxis.categories[t]:n.config.labels.length&&(e=n.config.labels[t]))}else e=n.config.labels[t];return null===e?"nullvalue":(Array.isArray(e)&&(e=e.join(" ")),p.isNumber(e)?e:e.split(i).join(""))},w=(e,s)=>{var l,c,u,m,g,p;if(a.length&&0===s&&o.push(a.join(i)),e.data){const b=e.data.length?e.data:[...Array(x)].map(()=>"");for(let x=0;x<b.length;x++){a=[];let b=y(x);if("nullvalue"!==b){if(b||(f.isFormatXY()?b=t[s].data[x].x:f.isFormat2DArray()&&(b=t[s].data[x]?t[s].data[x][0]:"")),0===s){a.push(h(b));for(let e=0;e<n.seriesData.series.length;e++){const i=f.isFormatXY()?null==(l=t[e].data[x])?void 0:l.y:r[e][x];a.push(d(i))}}("candlestick"===n.config.chart.type||e.type&&"candlestick"===e.type)&&(a.pop(),a.push(n.candleData.seriesCandleO[s][x]),a.push(n.candleData.seriesCandleH[s][x]),a.push(n.candleData.seriesCandleL[s][x]),a.push(n.candleData.seriesCandleC[s][x])),("boxPlot"===n.config.chart.type||e.type&&"boxPlot"===e.type)&&(a.pop(),a.push(n.candleData.seriesCandleO[s][x]),a.push(n.candleData.seriesCandleH[s][x]),a.push(n.candleData.seriesCandleM[s][x]),a.push(n.candleData.seriesCandleL[s][x]),a.push(n.candleData.seriesCandleC[s][x])),"rangeBar"===n.config.chart.type&&(a.pop(),a.push(n.rangeData.seriesRangeStart[s][x]),a.push(n.rangeData.seriesRangeEnd[s][x])),("violin"===n.config.chart.type||e.type&&"violin"===e.type)&&(a.pop(),a.push(null==(c=n.violinData.seriesViolinMin[s])?void 0:c[x]),a.push(null==(u=n.violinData.seriesViolinMax[s])?void 0:u[x]),a.push(null!=(p=null==(g=null==(m=n.violinData.seriesViolinPoints[s])?void 0:m[x])?void 0:g.length)?p:0)),a.length&&o.push(a.join(i))}}}};a.push(n.config.chart.toolbar.export.csv.headerCategory),"boxPlot"===n.config.chart.type?(a.push("minimum"),a.push("q1"),a.push("median"),a.push("q3"),a.push("maximum")):"candlestick"===n.config.chart.type?(a.push("open"),a.push("high"),a.push("low"),a.push("close")):"rangeBar"===n.config.chart.type?(a.push("minimum"),a.push("maximum")):"violin"===n.config.chart.type?(a.push("minimum"),a.push("maximum"),a.push("observations")):t.map((t,e)=>{const s=(t.name?t.name:`series-${e}`)+"";n.globals.axisCharts&&a.push(s.split(i).join("")?s.split(i).join(""):`series-${e}`)}),n.globals.axisCharts||(a.push(n.config.chart.toolbar.export.csv.headerValue),o.push(a.join(i))),n.globals.allSeriesHasEqualX||!n.globals.axisCharts||n.config.xaxis.categories.length||n.config.labels.length?t.map((t,e)=>{n.globals.axisCharts?w(t,e):(a=[],a.push(h(n.labelData.labels[e])),a.push(d(r[e])),o.push(a.join(i)))}):(()=>{const e=new Set,s={};t.forEach((i,n)=>{null==i||i.data.forEach(i=>{let a,o;if(f.isFormatXY())a=i.x,o=i.y;else{if(!f.isFormat2DArray())return;a=i[0],o=i[1]}s[a]||(s[a]=Array(t.length).fill("")),s[a][n]=d(o),e.add(a)})}),a.length&&o.push(a.join(i)),Array.from(e).sort().forEach(t=>{const e=s[t];o.push([h(t),...e].join(i))})})(),l+=o.join(s),this.triggerDownload("data:text/csv; charset=utf-8,"+encodeURIComponent("\ufeff"+l),e||n.config.chart.toolbar.export.csv.filename,".csv")}triggerDownload(t,e,i){if(x.isSSR())return;const s=document.createElement("a");s.href=t,s.download=(e||this.w.globals.chartID)+i,document.body.appendChild(s),s.click(),document.body.removeChild(s)}}class w{constructor(t,e){this.w=t,this.ctx=e,this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=t.globals.minX,this.maxX=t.globals.maxX,this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elMeasure=null,this.elZoomReset=null,this.elMenuIcon=null,this.elMenu=null,this.elMenuItems=[],this.t=null}createToolbar(){var t,e;const i=this.w,s=()=>f.createElementNS("http://www.w3.org/1999/xhtml","div"),n=()=>{const t=f.createElementNS("http://www.w3.org/1999/xhtml","button");return t.setAttribute("type","button"),t},a=s();if(a.setAttribute("class","apexcharts-toolbar"),a.style.top=i.config.chart.toolbar.offsetY+"px",a.style.right=3-i.config.chart.toolbar.offsetX+"px",i.dom.elWrap.appendChild(a),this.elZoom=n(),this.elZoomIn=n(),this.elZoomOut=n(),this.elPan=n(),this.elSelection=n(),this.elMeasure=n(),this.elZoomReset=n(),this.elMenuIcon=n(),this.elMenu=s(),this.elCustomIcons=[],this.t=i.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(let t=0;t<this.t.customIcons.length;t++)this.elCustomIcons.push(n());const o=[],l=(t,e,s)=>{const n=t.toLowerCase();this.t[n]&&i.config.chart.zoom.enabled&&o.push({el:e,icon:"string"==typeof this.t[n]?this.t[n]:s,title:this.localeValues[t],class:`apexcharts-${n}-icon`})};l("zoomIn",this.elZoomIn,'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M12 5v14M5 12h14"/>\n</svg>\n'),l("zoomOut",this.elZoomOut,'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M5 12h14"/>\n</svg>\n');const r=t=>{this.t[t]&&i.config.chart[t].enabled&&o.push({el:"zoom"===t?this.elZoom:this.elSelection,icon:"string"==typeof this.t[t]?this.t[t]:"zoom"===t?'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <circle cx="11" cy="11" r="7"/>\n <path d="m21 21-4.3-4.3M8 11h6M11 8v6"/>\n</svg>\n':'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M5 3a2 2 0 0 0-2 2"/>\n <path d="M19 3a2 2 0 0 1 2 2"/>\n <path d="M21 19a2 2 0 0 1-2 2"/>\n <path d="M5 21a2 2 0 0 1-2-2"/>\n <path d="M9 3h1M14 3h1M9 21h1M14 21h1M3 9v1M3 14v1M21 9v1M21 14v1"/>\n</svg>\n',title:this.localeValues["zoom"===t?"selectionZoom":"selection"],class:`apexcharts-${t}-icon`})};r("zoom"),r("selection"),this.t.pan&&i.config.chart.zoom.enabled&&o.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M5 9 2 12l3 3"/>\n <path d="M9 5l3-3 3 3"/>\n <path d="M15 19l-3 3-3-3"/>\n <path d="M19 9l3 3-3 3"/>\n <path d="M2 12h20"/>\n <path d="M12 2v20"/>\n</svg>\n',title:this.localeValues.pan,class:"apexcharts-pan-icon"}),this.t.measure&&i.config.chart.measure&&i.config.chart.measure.enabled&&o.push({el:this.elMeasure,icon:"string"==typeof this.t.measure?this.t.measure:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.4 2.4 0 0 1 0-3.4l2.6-2.6a2.4 2.4 0 0 1 3.4 0Z"/>\n <path d="m14.5 12.5 2-2"/>\n <path d="m11.5 9.5 2-2"/>\n <path d="m8.5 6.5 2-2"/>\n <path d="m17.5 15.5 2-2"/>\n</svg>\n',title:this.localeValues.measure||"Measure",class:"apexcharts-measure-icon"}),l("reset",this.elZoomReset,'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/>\n <path d="M3 3v5h5"/>\n</svg>\n'),this.t.download&&o.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M4 6h16M4 12h16M4 18h16"/>\n</svg>\n',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(let t=0;t<this.elCustomIcons.length;t++)o.push({el:this.elCustomIcons[t],icon:this.t.customIcons[t].icon,title:this.t.customIcons[t].title,index:this.t.customIcons[t].index,class:"apexcharts-toolbar-custom-icon "+this.t.customIcons[t].class});o.forEach((t,e)=>{t.index&&p.moveIndexInArray(o,e,t.index)});for(let t=0;t<o.length;t++)d.setAttrs(o[t].el,{class:o[t].class,title:o[t].title,"aria-label":o[t].title}),o[t].el.innerHTML=o[t].icon,a.appendChild(o[t].el);this.elZoom.parentNode&&this.elZoom.setAttribute("aria-pressed",String(!!i.interact.zoomEnabled)),this.elSelection.parentNode&&this.elSelection.setAttribute("aria-pressed",String(!!i.interact.selectionEnabled)),this.elPan.parentNode&&this.elPan.setAttribute("aria-pressed",String(!!i.interact.panEnabled)),this.elMeasure.parentNode&&this.elMeasure.setAttribute("aria-pressed",String(!!i.interact.measureEnabled)),this.elMenuIcon.parentNode&&(this.elMenuIcon.setAttribute("aria-haspopup","true"),this.elMenuIcon.setAttribute("aria-expanded","false")),this._createHamburgerMenu(a),i.interact.zoomEnabled?this.elZoom.classList.add(this.selectedClass):i.interact.panEnabled?this.elPan.classList.add(this.selectedClass):i.interact.selectionEnabled?this.elSelection.classList.add(this.selectedClass):i.interact.measureEnabled&&this.elMeasure&&(this.elMeasure.classList.add(this.selectedClass),null==(e=null==(t=this.ctx.measure)?void 0:t.startMeasure)||e.call(t)),this.addToolbarEventListeners()}_createHamburgerMenu(t){this.elMenuItems=[],t.appendChild(this.elMenu),d.setAttrs(this.elMenu,{class:"apexcharts-menu",role:"menu"});const e=[{name:"exportSVG",title:this.localeValues.exportToSVG},{name:"exportPNG",title:this.localeValues.exportToPNG},{name:"exportCSV",title:this.localeValues.exportToCSV}];for(let t=0;t<e.length;t++)this.elMenuItems.push(f.createElementNS("http://www.w3.org/1999/xhtml","div")),this.elMenuItems[t].innerHTML=e[t].title,d.setAttrs(this.elMenuItems[t],{class:`apexcharts-menu-item ${e[t].name}`,title:e[t].title,role:"menuitem",tabindex:"-1"}),this.elMenu.appendChild(this.elMenuItems[t])}addToolbarEventListeners(){var t,e,i,s,n,a,o,l,r;null==(t=this.elZoomReset)||t.addEventListener("click",this.handleZoomReset.bind(this)),null==(e=this.elSelection)||e.addEventListener("click",this.toggleZoomSelection.bind(this,"selection")),null==(i=this.elZoom)||i.addEventListener("click",this.toggleZoomSelection.bind(this,"zoom")),null==(s=this.elZoomIn)||s.addEventListener("click",this.handleZoomIn.bind(this)),null==(n=this.elZoomOut)||n.addEventListener("click",this.handleZoomOut.bind(this)),null==(a=this.elPan)||a.addEventListener("click",this.togglePanning.bind(this)),null==(o=this.elMeasure)||o.addEventListener("click",this.toggleMeasure.bind(this)),null==(l=this.elMenuIcon)||l.addEventListener("click",this.toggleMenu.bind(this)),this.elMenuItems.forEach(t=>{t.classList.contains("exportSVG")?t.addEventListener("click",this.handleDownload.bind(this,"svg")):t.classList.contains("exportPNG")?t.addEventListener("click",this.handleDownload.bind(this,"png")):t.classList.contains("exportCSV")&&t.addEventListener("click",this.handleDownload.bind(this,"csv"))});for(let t=0;t<this.t.customIcons.length;t++)this.elCustomIcons[t].addEventListener("click",this.t.customIcons[t].click.bind(this,this.ctx,this.ctx.w));[this.elZoomReset,this.elSelection,this.elZoom,this.elZoomIn,this.elZoomOut,this.elPan,this.elMeasure,this.elMenuIcon,...this.elCustomIcons].forEach(t=>{t.addEventListener("keydown",e=>{if("Enter"===e.key||" "===e.key){e.preventDefault();const i=t.className;t.click(),requestAnimationFrame(()=>{const t=this.w.dom.baseEl;if(!t)return;const e=i.split(" ").find(t=>t.startsWith("apexcharts-"));if(!e)return;const s=t.querySelector(`.${e}`);s&&s.focus()})}})}),null==(r=this.elMenuIcon)||r.addEventListener("keydown",t=>{var e;"ArrowDown"!==t.key&&"ArrowUp"!==t.key||(t.preventDefault(),(null==(e=this.elMenu)?void 0:e.classList.contains("apexcharts-menu-open"))||this.toggleMenu(),window.setTimeout(()=>{const e="ArrowDown"===t.key?0:this.elMenuItems.length-1;this.elMenuItems[e]&&this.elMenuItems[e].focus()},20))}),this.elMenuItems.forEach((t,e)=>{t.addEventListener("keydown",i=>{var s;if("ArrowDown"===i.key){i.preventDefault();(this.elMenuItems[e+1]||this.elMenuItems[0]).focus()}else if("ArrowUp"===i.key){i.preventDefault();(this.elMenuItems[e-1]||this.elMenuItems[this.elMenuItems.length-1]).focus()}else"Escape"===i.key||"Tab"===i.key?(this._closeMenu(),null==(s=this.elMenuIcon)||s.focus(),"Tab"===i.key||i.preventDefault()):"Enter"!==i.key&&" "!==i.key||(i.preventDefault(),t.click())})})}toggleZoomSelection(t){this.ctx.getSyncedCharts().forEach(e=>{const i=e.ctx.toolbar,s="selection"===t?"selectionEnabled":"zoomEnabled",n=!!e.w.globals[s];i.toggleOtherControls();const a="selection"===t?i.elSelection:i.elZoom;n||(e.w.globals[s]=!0,a.classList.add(i.selectedClass)),a.setAttribute("aria-pressed",String(!!e.w.globals[s]))})}toggleMeasure(){var t,e,i,s;const n=this.w,a=!n.interact.measureEnabled;this.toggleOtherControls(),a&&(n.interact.measureEnabled=!0,null==(t=this.elMeasure)||t.classList.add(this.selectedClass),null==(i=null==(e=this.ctx.measure)?void 0:e.startMeasure)||i.call(e)),null==(s=this.elMeasure)||s.setAttribute("aria-pressed",String(n.interact.measureEnabled))}getToolbarIconsReference(){const t=this.w;this.elZoom||(this.elZoom=t.dom.baseEl.querySelector(".apexcharts-zoom-icon")),this.elPan||(this.elPan=t.dom.baseEl.querySelector(".apexcharts-pan-icon")),this.elSelection||(this.elSelection=t.dom.baseEl.querySelector(".apexcharts-selection-icon")),this.elMeasure||(this.elMeasure=t.dom.baseEl.querySelector(".apexcharts-measure-icon"))}enableZoomPanFromToolbar(t){this.toggleOtherControls(),"pan"===t?this.w.interact.panEnabled=!0:this.w.interact.zoomEnabled=!0;const e="pan"===t?this.elPan:this.elZoom,i="pan"===t?this.elZoom:this.elPan;e&&e.classList.add(this.selectedClass),i&&i.classList.remove(this.selectedClass)}togglePanning(){this.ctx.getSyncedCharts().forEach(t=>{const e=t.ctx.toolbar,i=!!t.w.interact.panEnabled;e.toggleOtherControls(),i||(t.w.interact.panEnabled=!0,e.elPan.classList.add(e.selectedClass)),e.elPan.setAttribute("aria-pressed",String(!!t.w.interact.panEnabled))})}toggleOtherControls(){var t,e,i;const s=this.w;s.interact.panEnabled=!1,s.interact.zoomEnabled=!1,s.interact.selectionEnabled=!1,s.interact.measureEnabled&&(s.interact.measureEnabled=!1,null==(e=null==(t=this.ctx.measure)?void 0:t.stopMeasure)||e.call(t),null==(i=this.elMeasure)||i.setAttribute("aria-pressed","false")),this.getToolbarIconsReference();[this.elPan,this.elSelection,this.elZoom,this.elMeasure].forEach(t=>{t&&t.classList.remove(this.selectedClass)})}_currentXRange(){const t=this.w;return t.axisFlags.isRangeBar?{minX:t.globals.minY,maxX:t.globals.maxY}:{minX:t.globals.minX,maxX:t.globals.maxX}}handleZoomIn(){const t=this.w,{minX:e,maxX:i}=this._currentXRange();this.minX=e,this.maxX=i;const s=(e+i)/2,n=(e+s)/2,a=(i+s)/2,o=this._getNewMinXMaxX(n,a);t.interact.disableZoomIn||this.zoomUpdateOptions(o.minX,o.maxX)}handleZoomOut(){const t=this.w,{minX:e,maxX:i}=this._currentXRange();if(this.minX=e,this.maxX=i,"datetime"===t.config.xaxis.type&&new Date(e).getUTCFullYear()<1e3)return;const s=(e+i)/2,n=e-(s-e),a=i-(s-i),o=this._getNewMinXMaxX(n,a);t.interact.disableZoomOut||this.zoomUpdateOptions(o.minX,o.maxX)}_getNewMinXMaxX(t,e){const i=this.w.config.xaxis.convertedCatToNumeric;return{minX:i?Math.floor(t):t,maxX:i?Math.floor(e):e}}zoomUpdateOptions(t,e){const i=this.w;if(void 0===t&&void 0===e)return void this.handleZoomReset();if(i.config.xaxis.convertedCatToNumeric&&(t<1&&(t=1,e=i.globals.dataPoints),e-t<2))return;let s={min:t,max:e};const n=this.getBeforeZoomRange(s,void 0);n&&(s=n.xaxis);const a={xaxis:s};if(!i.globals.initialConfig)return;const o=p.clone(i.globals.initialConfig.yaxis);i.config.chart.group||(a.yaxis=o),this.w.interact.zoomed=!0,this.ctx.updateHelpers._updateOptions(a,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(s,o)}zoomCallback(t,e){"function"==typeof this.ev.zoomed&&(this.ev.zoomed(this.ctx,{xaxis:t,yaxis:e}),this.ctx.events.fireEvent("zoomed",{xaxis:t,yaxis:e}))}getBeforeZoomRange(t,e){let i=null;return"function"==typeof this.ev.beforeZoom&&(i=this.ev.beforeZoom(this,{xaxis:t,yaxis:e})),i}toggleMenu(){window.setTimeout(()=>{var t,e,i;(null==(t=this.elMenu)?void 0:t.classList.contains("apexcharts-menu-open"))?this._closeMenu():(null==(e=this.elMenu)||e.classList.add("apexcharts-menu-open"),null==(i=this.elMenuIcon)||i.setAttribute("aria-expanded","true"))},0)}_closeMenu(){var t,e;null==(t=this.elMenu)||t.classList.remove("apexcharts-menu-open"),null==(e=this.elMenuIcon)||e.setAttribute("aria-expanded","false")}handleDownload(t){const e=this.w,i=new y(this.w,this.ctx);switch(t){case"svg":i.exportToSVG();break;case"png":i.exportToPng();break;case"csv":i.exportToCSV({series:e.config.series,columnDelimiter:e.config.chart.toolbar.export.csv.columnDelimiter})}}handleZoomReset(){this.ctx.getSyncedCharts().forEach(t=>{const e=t.w;if(!e.interact.zoomed)return;if(e.globals.lastXAxis.min=e.globals.initialConfig.xaxis.min,e.globals.lastXAxis.max=e.globals.initialConfig.xaxis.max,t.updateHelpers.revertDefaultAxisMinMax(),"function"==typeof e.config.chart.events.beforeResetZoom){const i=e.config.chart.events.beforeResetZoom(t,e);i&&t.updateHelpers.revertDefaultAxisMinMax(i)}"function"==typeof e.config.chart.events.zoomed&&t.ctx.toolbar.zoomCallback({min:e.config.xaxis.min,max:e.config.xaxis.max});const i=t.ctx.series.emptyCollapsedSeries(p.clone(e.globals.initialSeries));t.updateHelpers._updateSeries(i,e.config.chart.animations.dynamicAnimation.enabled),e.interact.zoomed=!1})}destroy(){this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elMeasure=null,this.elZoomReset=null,this.elMenuIcon=null}}class v{static xRatio(t){const e=t.layout.gridWidth||1;return(t.globals.maxX-t.globals.minX)/e}static dataXToPx(t,e){return(e-t.globals.minX)/v.xRatio(t)}static pxToDataX(t,e){return t.globals.minX+e*v.xRatio(t)}static screenXToPlotPx(t,e){const i=t.dom.baseEl,s=i&&i.querySelector(".apexcharts-svg");if(!s)return e-t.layout.translateX;const n=s.getBoundingClientRect(),a=t.globals.svgWidth?n.width/t.globals.svgWidth:1;return(e-n.left)/(a||1)-t.layout.translateX}}const S=h.__apex_index_Box;h.default.registerFeatures({toolbar:w,zoomPanSelection:class extends w{constructor(t,e){super(t,e),this.w=t,this.ctx=e,this.dragged=!1,this.graphics=new d(this.w),this.eventList=["mousedown","mouseleave","mousemove","touchstart","touchmove","mouseup","touchend"],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"}init({xyRatios:t}){const e=this.w,i=this;this.xyRatios=t,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.constraints=new S(0,0,e.layout.gridWidth,e.layout.gridHeight),this.zoomRect.node.classList.add("apexcharts-zoom-rect"),this.selectionRect.node.classList.add("apexcharts-selection-rect"),e.dom.Paper.add(this.zoomRect),e.dom.Paper.add(this.selectionRect),"x"===e.config.chart.selection.type?this.slDraggableRect=this.selectionRect.draggable({minX:0,minY:0,maxX:e.layout.gridWidth,maxY:e.layout.gridHeight}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):"y"===e.config.chart.selection.type?this.slDraggableRect=this.selectionRect.draggable({minX:0,maxX:e.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=e.dom.baseEl.querySelector(`${e.globals.chartClass} .apexcharts-svg`),this.hoverArea&&(this.hoverArea.classList.add("apexcharts-zoomable"),this.eventList.forEach(e=>{var s;null==(s=this.hoverArea)||s.addEventListener(e,i.svgMouseEvents.bind(i,t),{capture:!1,passive:!0})}),this._wheelZoomEnabled()&&this.hoverArea.addEventListener("wheel",i.mouseWheelEvent.bind(i),{capture:!1,passive:!1}),this._momentumEnabled()&&["touchstart","touchmove","touchend","touchcancel"].forEach(t=>{var e;null==(e=this.hoverArea)||e.addEventListener(t,i.momentumTouch.bind(i),{capture:!1,passive:!1})}))}destroy(){this.slDraggableRect&&(this.slDraggableRect.draggable(!1),this.slDraggableRect.off(),this.selectionRect.off()),this.selectionRect=null,this.zoomRect=null}svgMouseEvents(t,e){const i=this.w,s=this.ctx.toolbar;if(i.interact.momentum&&i.interact.momentum.busy)return;if(this._momentumEnabled()&&e.touches&&e.touches.length>1)return;const n=i.interact.zoomEnabled?i.config.chart.zoom.type:i.config.chart.selection.type,a=i.config.chart.toolbar.autoSelected;if("measure"!==a&&(e.shiftKey?(i.interact.shiftWasPressed=!0,s.enableZoomPanFromToolbar("pan"===a?"zoom":"pan")):i.interact.shiftWasPressed&&(s.enableZoomPanFromToolbar(a),i.interact.shiftWasPressed=!1)),!e.target)return;const o=e.target.classList;let l;e.target.parentNode&&null!==e.target.parentNode&&(l=e.target.parentNode.classList);if(!(o.contains("apexcharts-legend-marker")||o.contains("apexcharts-legend-text")||l&&l.contains("apexcharts-toolbar"))){if(this.clientX="touchmove"===e.type||"touchstart"===e.type?e.touches[0].clientX:"touchend"===e.type?e.changedTouches[0].clientX:e.clientX,this.clientY="touchmove"===e.type||"touchstart"===e.type?e.touches[0].clientY:"touchend"===e.type?e.changedTouches[0].clientY:e.clientY,"mousedown"===e.type&&1===e.which||"touchstart"===e.type){const t=this._gridRect();if(!t)return;this.startX=this._screenXToPlotPx(this.clientX),this.startY=this.clientY-t.top,this.dragged=!1,this.w.interact.mousedown=!0}("mousemove"===e.type&&1===e.which||"touchmove"===e.type)&&(this.dragged=!0,i.interact.panEnabled?(i.interact.selection=null,this.w.interact.mousedown&&this.panDragging({context:this,zoomtype:n,xyRatios:this.xyRatios})):(this.w.interact.mousedown&&i.interact.zoomEnabled||this.w.interact.mousedown&&i.interact.selectionEnabled)&&(this.selection=this.selectionDrawing({context:this,zoomtype:n}))),"mouseup"!==e.type&&"touchend"!==e.type&&"mouseleave"!==e.type||this.handleMouseUp({zoomtype:n}),this.makeSelectionRectDraggable()}}handleMouseUp({zoomtype:t,isResized:e}){const i=this.w,s=this._gridRect();s&&(this.w.interact.mousedown||e)&&(this.endX=this._screenXToPlotPx(this.clientX),this.endY=this.clientY-s.top,this.dragX=Math.abs(this.endX-this.startX),this.dragY=Math.abs(this.endY-this.startY),(i.interact.zoomEnabled||i.interact.selectionEnabled)&&this.selectionDrawn({context:this,zoomtype:t})),i.interact.zoomEnabled&&this.hideSelectionRect(this.selectionRect),this.dragged=!1,this.w.interact.mousedown=!1}_incidentalZoomEnabled(t){var e,i,s;const n=this.w.config.chart;return!(!n.zoom||!n.zoom.enabled)&&("auto"!==t?!!t:!(!(null==(e=n.toolbar)?void 0:e.show)||!(null==(s=null==(i=n.toolbar)?void 0:i.tools)?void 0:s.reset)))}_wheelZoomEnabled(){const{zoom:t}=this.w.config.chart;return this._incidentalZoomEnabled(t&&t.allowMouseWheelZoom)}_wheel(){const t=this.w.interact;return t.wheel||(t.wheel={factor:1,clientX:0,rafId:null,endTimer:null}),t.wheel}mouseWheelEvent(t){t.preventDefault();const e=this._wheel();let i=t.deltaY;1===t.deltaMode?i*=33:2===t.deltaMode&&(i*=330),e.factor*=Math.pow(2,i/240),e.clientX=t.clientX,null==e.rafId&&(e.rafId=requestAnimationFrame(()=>this._applyWheelZoom())),e.endTimer&&clearTimeout(e.endTimer),e.endTimer=setTimeout(()=>this._endWheelZoom(),150)}_applyWheelZoom(){const t=this.w,e=this._wheel();e.rafId=null;const i=e.factor;if(e.factor=1,1===i||t.globals.isDestroyed)return;const s=this._gridRect();if(!s||!s.width)return;const{min:n,max:a}=this._currentXWindow(),o=a-n,l=Math.min(Math.max((e.clientX-s.left)/s.width,0),1);let r=o*i;const c=this._clampBounds();if(c){const e=t.globals.minXDiff>0&&isFinite(t.globals.minXDiff)?t.globals.minXDiff:0,i=Math.max(2*e,1e-6*(c.max-c.min));r<i&&(r=i),r>c.max-c.min&&(r=c.max-c.min)}let h=n+l*o-l*r,d=h+r;const u=1e-9*o;if(Math.abs(h-n)<u&&Math.abs(d-a)<u)return;if(isNaN(h)||isNaN(d))return;const m=this.getBeforeZoomRange({min:h,max:d},void 0);m&&m.xaxis&&(h=m.xaxis.min,d=m.xaxis.max),this._applyXRange(h,d,!0)}_endWheelZoom(){const t=this.w;if(this._wheel().endTimer=null,t.globals.isDestroyed||!t.interact.zoomed)return;const{min:e,max:i}=this._currentXWindow(),s=t.globals.initialConfig?p.clone(t.globals.initialConfig.yaxis):[],n=this.ctx.toolbar;n&&n.zoomCallback({min:e,max:i},s)}makeSelectionRectDraggable(){const t=this.w;if(!this.selectionRect)return;const e=this.selectionRect.node.getBoundingClientRect();e.width>0&&e.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:()=>{},updateRot:()=>{},createHandle:(t,e,i,s,n)=>"l"===n||"r"===n?t.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):t.circle(0),updateHandle:(t,e)=>t.center(e[0],e[1])}).resize().on("resize",()=>{var e;if(this._clampSelectionRectToPlot(),t.interact.selectionEnabled)t.interact.selection={x:parseFloat(this.selectionRect.node.getAttribute("x")),y:parseFloat(this.selectionRect.node.getAttribute("y")),width:parseFloat(this.selectionRect.node.getAttribute("width")),height:parseFloat(this.selectionRect.node.getAttribute("height"))},clearTimeout(null!=(e=this.w.globals.selectionResizeTimer)?e:void 0),this.w.globals.selectionResizeTimer=window.setTimeout(()=>{this._emitSelectionFromRect()},30);else{const e=t.interact.zoomEnabled?t.config.chart.zoom.type:t.config.chart.selection.type;this.handleMouseUp({zoomtype:e,isResized:!0})}}))}preselectedSelection(){const t=this.w,e=this.xyRatios;if(!t.interact.zoomEnabled)if(void 0!==t.interact.selection&&null!==t.interact.selection)this.drawSelectionRect(r(l({},t.interact.selection),{translateX:t.layout.translateX,translateY:t.layout.translateY}));else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){let i=v.dataXToPx(t,t.config.chart.selection.xaxis.min),s=v.dataXToPx(t,t.config.chart.selection.xaxis.max)-i;t.axisFlags.isRangeBar&&(i=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/e.invertedYRatio,s=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/e.invertedYRatio);const n={x:i,y:0,width:s,height:t.layout.gridHeight,translateX:t.layout.translateX,translateY:t.layout.translateY,selectionEnabled:!0};this.drawSelectionRect(n),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}drawSelectionRect({x:t,y:e,width:i,height:s,translateX:n=0,translateY:a=0}){const o=this.w,l=this.zoomRect,r=this.selectionRect;if(this.dragged||null!==o.interact.selection){const c={transform:"translate("+n+", "+a+")"};o.interact.zoomEnabled&&this.dragged&&(i<0&&(i=1),l.attr({x:t,y:e,width:i,height:s,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}),d.setAttrs(l.node,c)),o.interact.selectionEnabled&&(r.attr({x:t,y:e,width:i>0?i:0,height:s>0?s: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}),d.setAttrs(r.node,c))}}_clampSelectionRectToPlot(){const t=this.selectionRect;if(!t||!t.node)return;const e=this.w.layout.gridWidth;if(!(e>0))return;const i=parseFloat(t.node.getAttribute("x"))||0,s=parseFloat(t.node.getAttribute("width"))||0,n=t=>Math.min(Math.max(t,0),e),a=n(i),o=n(i+s);a===i&&o===i+s||(t.attr({x:a,width:o-a}),t._updateSelectPositions&&t._updateSelectPositions())}hideSelectionRect(t){t&&t.attr({x:0,y:0,width:0,height:0})}selectionDrawing({context:t,zoomtype:e}){const i=this.w,s=t,n=this._gridRect();if(!n)return;const a=s.startX-1,o=s.startY;let c=!1,h=!1;const d=this._screenXToPlotPx(s.clientX),u=s.clientY-n.top;let m=d-a,g=u-o,p={translateX:i.layout.translateX,translateY:i.layout.translateY};return Math.abs(m+a)>i.layout.gridWidth?m=i.layout.gridWidth-a:d<0&&(m=a),a>d&&(c=!0,m=Math.abs(m)),o>u&&(h=!0,g=Math.abs(g)),p="x"===e?{x:c?a-m:a,y:0,width:m,height:i.layout.gridHeight}:"y"===e?{x:0,y:h?o-g:o,width:i.layout.gridWidth,height:g}:{x:c?a-m:a,y:h?o-g:o,width:m,height:g},p=r(l({},p),{translateX:i.layout.translateX,translateY:i.layout.translateY}),s.drawSelectionRect(p),s.selectionDragging("resizing"),p}selectionDragging(t,e){var i;const s=this.w;if(!e)return;e.preventDefault();const{handler:n,box:a}=e.detail,o=this.constraints;let{x:l,y:r}=a;l<o.x&&(l=o.x),r<o.y&&(r=o.y),a.x2>o.x2&&(l=o.x2-a.w),a.y2>o.y2&&(r=o.y2-a.h),n.move(l,r);const c=this.selectionRect;let h=0;"resizing"===t&&(h=30);const d=t=>parseFloat(c.node.getAttribute(t)),u={x:d("x"),y:d("y"),width:d("width"),height:d("height")};s.interact.selection=u;const m=s.config.chart.link,g=!(!m||!m.enabled&&"function"!=typeof m.dimension);("function"==typeof s.config.chart.events.selection||g)&&s.interact.selectionEnabled&&(clearTimeout(null!=(i=this.w.globals.selectionResizeTimer)?i:void 0),this.w.globals.selectionResizeTimer=window.setTimeout(()=>{this._emitSelectionFromRect()},h))}_emitSelectionFromRect(){var t;const e=this.w;if(!e.interact.selectionEnabled)return;const i=e.config.chart.link,s=!(!i||!i.enabled&&"function"!=typeof i.dimension);if("function"!=typeof e.config.chart.events.selection&&!s)return;const n=this._gridRect();if(!n)return;const a=this.selectionRect.node.getBoundingClientRect(),o=this.xyRatios;let l,r,c,h;const d=this._screenXToPlotPx(a.left),u=this._screenXToPlotPx(a.right);if(e.axisFlags.isRangeBar)l=e.globals.yAxisScale[0].niceMin+d*o.invertedYRatio,r=e.globals.yAxisScale[0].niceMin+u*o.invertedYRatio,c=0,h=1;else{if(!e.globals.xAxisScale)return;l=v.pxToDataX(e,d),r=v.pxToDataX(e,u),c=e.globals.yAxisScale[0].niceMin+(n.bottom-a.bottom)*o.yRatio[0],h=e.globals.yAxisScale[0].niceMax-(a.top-n.top)*o.yRatio[0]}const m={xaxis:{min:l,max:r},yaxis:{min:c,max:h}};"function"==typeof e.config.chart.events.selection&&e.config.chart.events.selection(this.ctx,m),e.config.chart.brush.enabled&&void 0!==e.config.chart.events.brushScrolled&&e.config.chart.events.brushScrolled(this.ctx,m),null==(t=this.ctx.linkedViews)||t.onSourceSelection(m.xaxis)}selectionDrawn({context:t,zoomtype:e}){var i;const s=this.w,n=t,a=this.xyRatios,o=this.ctx.toolbar,l=s.interact.zoomEnabled?n.zoomRect.node.getBoundingClientRect():n.selectionRect.node.getBoundingClientRect(),r=n._gridRect();if(!r)return;const c=this._screenXToPlotPx(l.left),h=this._screenXToPlotPx(l.right),d=l.top-r.top,u=l.bottom-r.top;let m,g;s.axisFlags.isRangeBar?(m=s.globals.yAxisScale[0].niceMin+c*a.invertedYRatio,g=s.globals.yAxisScale[0].niceMin+h*a.invertedYRatio):(m=v.pxToDataX(s,c),g=v.pxToDataX(s,h));const x=[],f=[];if(s.config.yaxis.forEach((t,e)=>{const i=s.globals.seriesYAxisMap[e][0],n=s.globals.yAxisScale[e].niceMax-a.yRatio[i]*d,o=s.globals.yAxisScale[e].niceMax-a.yRatio[i]*u;x.push(n),f.push(o)}),n.dragged&&(n.dragX>10||n.dragY>10)&&m!==g)if(s.interact.zoomEnabled){if(!s.globals.initialConfig)return;let t=p.clone(s.globals.initialConfig.yaxis),i=p.clone(s.globals.initialConfig.xaxis);if(s.interact.zoomed=!0,s.config.xaxis.convertedCatToNumeric&&(m=Math.floor(m),g=Math.floor(g),m<1&&(m=1,g=s.globals.dataPoints),g-m<2&&(g=m+1)),"xy"!==e&&"x"!==e||(i={min:m,max:g}),"xy"!==e&&"y"!==e||t.forEach((e,i)=>{t[i].min=f[i],t[i].max=x[i]}),o){const e=o.getBeforeZoomRange(i,t);e&&(i=e.xaxis?e.xaxis:i,t=e.yaxis?e.yaxis:t)}const a={xaxis:i};s.config.chart.group||(a.yaxis=t),n.ctx.updateHelpers._updateOptions(a,!1,n.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof s.config.chart.events.zoomed&&o.zoomCallback(i,t)}else if(s.interact.selectionEnabled){let t=null,a=null;if(a={min:m,max:g},"xy"===e||"y"===e){const e=p.clone(s.config.yaxis);t=e,e.forEach((t,i)=>{e[i].min=f[i],e[i].max=x[i]})}s.interact.selection=n.selection,"function"==typeof s.config.chart.events.selection&&s.config.chart.events.selection(n.ctx,{xaxis:a,yaxis:t}),null==(i=n.ctx.linkedViews)||i.onSourceSelection(a)}}panDragging({context:t}){var e;const i=this.w,s=t;if(void 0!==i.interact.lastClientPosition.x){const t=i.interact.lastClientPosition.x-s.clientX,n=(null!=(e=i.interact.lastClientPosition.y)?e:0)-s.clientY;Math.abs(t)>Math.abs(n)&&t>0?this.moveDirection="left":Math.abs(t)>Math.abs(n)&&t<0?this.moveDirection="right":Math.abs(n)>Math.abs(t)&&n>0?this.moveDirection="up":Math.abs(n)>Math.abs(t)&&n<0&&(this.moveDirection="down")}i.interact.lastClientPosition={x:s.clientX,y:s.clientY};const n=i.axisFlags.isRangeBar?i.globals.minY:i.globals.minX,a=i.axisFlags.isRangeBar?i.globals.maxY:i.globals.maxX;s.panScrolled(n,a)}panScrolled(t,e){var i,s;const n=this.w,a=this.xyRatios;if(!n.globals.initialConfig)return;const o=p.clone(n.globals.initialConfig.yaxis);let l=a.xRatio,r=n.globals.minX,c=n.globals.maxX;if(n.axisFlags.isRangeBar&&(l=a.invertedYRatio,r=n.globals.minY,c=n.globals.maxY),"left"===this.moveDirection?(t=r+n.layout.gridWidth/15*l,e=c+n.layout.gridWidth/15*l):"right"===this.moveDirection&&(t=r-n.layout.gridWidth/15*l,e=c-n.layout.gridWidth/15*l),!n.axisFlags.isRangeBar){const a=null!=(i=n.globals.dataReducerRawMinX)?i:n.globals.initialMinX,o=null!=(s=n.globals.dataReducerRawMaxX)?s:n.globals.initialMaxX;(t<a||e>o)&&(t=r,e=c)}const h={xaxis:{min:t,max:e}};n.config.chart.group||(h.yaxis=o),this.updateScrolledChart(h,t,e)}updateScrolledChart(t,e,i){const s=this.w;if(this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof s.config.chart.events.scrolled){const t={xaxis:{min:e,max:i}};s.config.chart.events.scrolled(this.ctx,t),this.ctx.events.fireEvent("scrolled",t)}}_momentumEnabled(){return this._pinchEnabled()||this._panInertiaEnabled()}_pinchEnabled(){return this._incidentalZoomEnabled(this.w.config.chart.zoom.pinch)}_panInertiaEnabled(){const t=this.w.config.chart;return!(!t.pan||!t.pan.inertia)}_m(){const t=this.w.interact;return t.momentum||(t.momentum={busy:!1,pinch:null,panState:null,samples:[],inertiaRAF:null}),t.momentum}_currentXWindow(){const t=this.w;return t.axisFlags.isRangeBar?{min:t.globals.minY,max:t.globals.maxY}:{min:t.globals.minX,max:t.globals.maxX}}_gridRect(){const t=this.w.dom.baseEl,e=t&&t.querySelector(".apexcharts-grid");return e?e.getBoundingClientRect():null}_screenXToPlotPx(t){return v.screenXToPlotPx(this.w,t)}_clampBounds(){var t,e;const i=this.w;return i.axisFlags.isRangeBar?null:{min:null!=(t=i.globals.dataReducerRawMinX)?t:i.globals.initialMinX,max:null!=(e=i.globals.dataReducerRawMaxX)?e:i.globals.initialMaxX}}_applyXRange(t,e,i){const s=this.w;if(!s.globals.initialConfig)return!1;const n=this._currentXWindow(),a=i&&e-t>n.max-n.min,o=this._clampBounds();if(o){const i=e-t;t<o.min&&(e=(t=o.min)+i),e>o.max&&(t=(e=o.max)-i),t<o.min&&(t=o.min)}if(s.config.xaxis.convertedCatToNumeric&&(t=Math.floor(t),e=a?Math.ceil(e):Math.floor(e),t<1&&(t=1),o&&e>o.max&&(e=Math.floor(o.max)),e-t<2))return!1;if(!(e>t))return!1;const l={xaxis:{min:t,max:e}};return s.config.chart.group||(l.yaxis=p.clone(s.globals.initialConfig.yaxis)),i&&(s.interact.zoomed=!0),this.ctx.updateHelpers._updateOptions(l,!1,!1),{minX:t,maxX:e}}_cancelInertia(){const t=this._m();null!=t.inertiaRAF&&(cancelAnimationFrame(t.inertiaRAF),t.inertiaRAF=null)}_fireScrolled(){const t=this.w;if("function"!=typeof t.config.chart.events.scrolled)return;const{min:e,max:i}=this._currentXWindow(),s={xaxis:{min:e,max:i}};t.config.chart.events.scrolled(this.ctx,s),this.ctx.events.fireEvent("scrolled",s)}_pushSample(t,e){const i=this._m().samples;for(i.push({x:t,t:e});i.length>6;)i.shift()}momentumTouch(t){const e=this.w,i=this._m(),s=t.type;if("touchstart"===s){this._cancelInertia();const s=this._gridRect();if(!s)return;if(t.touches.length>=2&&this._pinchEnabled())t.preventDefault(),i.busy=!0,i.panState=null,this._beginPinch(t,s);else if(1===t.touches.length&&this._panInertiaEnabled()&&e.interact.panEnabled){i.busy=!0,i.pinch=null;const s=t.touches[0],n=this._currentXWindow(),a=e.layout.gridWidth||1;i.panState={startX:s.clientX,startY:s.clientY,axis:null,minX0:n.min,maxX0:n.max,ratio0:(n.max-n.min)/a},i.samples=[{x:s.clientX,t:t.timeStamp}]}return}"touchmove"!==s?(i.pinch?t.touches.length<2&&this._endPinch():i.panState&&0===t.touches.length&&this._endPan(),0===t.touches.length&&(e.interact.mousedown=!1,this.dragged=!1,null!=i.inertiaRAF||i.pinch||i.panState||(i.busy=!1))):i.pinch&&t.touches.length>=2?(t.preventDefault(),this._movePinch(t)):i.panState&&1===t.touches.length&&this._movePan(t)}_beginPinch(t,e){const i=this.w,s=t.touches[0],n=t.touches[1],a=Math.hypot(n.clientX-s.clientX,n.clientY-s.clientY)||1,o=(s.clientX+n.clientX)/2-e.left-i.globals.barPadForNumericAxis,{min:l,max:r}=this._currentXWindow();this._m().pinch={d0:a,cx0:o,minX0:l,maxX0:r,gridWidth:i.layout.gridWidth||1}}_movePinch(t){const e=this.w,i=this._m().pinch;if(!i)return;const s=this._gridRect();if(!s)return;const n=t.touches[0],a=t.touches[1],o=Math.hypot(a.clientX-n.clientX,a.clientY-n.clientY)||1,l=(n.clientX+a.clientX)/2-s.left-e.globals.barPadForNumericAxis,r=i.maxX0-i.minX0,c=r*(i.d0/o);let h=i.minX0+i.cx0/i.gridWidth*r-l/i.gridWidth*c,d=h+c;const u=this._clampBounds();if(u){const t=e.globals.minXDiff>0&&isFinite(e.globals.minXDiff)?e.globals.minXDiff:0,i=Math.max(2*t,1e-6*(u.max-u.min));if(d-h<i){const t=(h+d)/2;h=t-i/2,d=t+i/2}}this._applyXRange(h,d,!0)}_endPinch(){const t=this.w;this._m().pinch=null;const{min:e,max:i}=this._currentXWindow(),s={min:e,max:i},n=t.globals.initialConfig?p.clone(t.globals.initialConfig.yaxis):[],a=this.ctx.toolbar;a&&a.zoomCallback(s,n)}_movePan(t){const e=this._m(),i=e.panState,s=t.touches[0];if(!i.axis){const n=Math.abs(s.clientX-i.startX),a=Math.abs(s.clientY-i.startY);if(n<6&&a<6)return void this._pushSample(s.clientX,t.timeStamp);if(a>n)return e.busy=!1,void(e.panState=null);i.axis="x"}if("x"!==i.axis)return;t.preventDefault();const n=(s.clientX-i.startX)*i.ratio0;this._pushSample(s.clientX,t.timeStamp),this._applyXRange(i.minX0-n,i.maxX0-n,!1)}_endPan(){const t=this._m(),e=t.panState;t.panState=null;let i=0;const s=t.samples;if(s.length>=2){const t=s[0],e=s[s.length-1],n=e.t-t.t;n>0&&(i=(e.x-t.x)/n)}t.samples=[],e&&"x"===e.axis&&this._panInertiaEnabled()&&Math.abs(i)>.05?this._startInertia(i):(t.busy=!1,this._fireScrolled())}_startInertia(t){const e=this.w,i=this._m(),s=e.config.chart.pan&&e.config.chart.pan.friction,n="number"==typeof s?Math.min(Math.max(s,.5),.999):.92;let a=t,o=null;i.busy=!0;const l=t=>{if(e.globals.isDestroyed)return i.inertiaRAF=null,void(i.busy=!1);if(null==o)return o=t,void(i.inertiaRAF=requestAnimationFrame(l));const s=t-o;if(o=t,a*=Math.pow(n,s/16.6667),Math.abs(a)<.02)return i.inertiaRAF=null,i.busy=!1,void this._fireScrolled();const r=this._currentXWindow(),c=e.layout.gridWidth||1,h=(r.max-r.min)/c,d=a*s*h,u=this._applyXRange(r.min-d,r.max-d,!1),m=this._clampBounds();if(!u||m&&(d>0&&u.minX<=m.min+1e-6*(m.max-m.min)||d<0&&u.maxX>=m.max-1e-6*(m.max-m.min)))return i.inertiaRAF=null,i.busy=!1,void this._fireScrolled();i.inertiaRAF=requestAnimationFrame(l)};i.inertiaRAF=requestAnimationFrame(l)}}}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>h.default});
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * ApexCharts v7.2.0
21
+ * ApexCharts v7.3.0
22
22
  * (c) 2018-2026 ApexCharts
23
23
  */
24
24
  import * as _core from "apexcharts/core";
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ApexCharts v7.2.0
2
+ * ApexCharts v7.3.0
3
3
  * (c) 2018-2026 ApexCharts
4
4
  */
5
5
  !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ApexToolbar={})}(this,function(t){"use strict";var e=Object.defineProperty,i=Object.defineProperties,s=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,l=(t,i,s)=>i in t?e(t,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[i]=s,r=(t,e)=>{for(var i in e||(e={}))a.call(e,i)&&l(t,i,e[i]);if(n)for(var i of n(e))o.call(e,i)&&l(t,i,e[i]);return t},c=(t,e)=>i(t,s(e));const h=globalThis.ApexCharts,d=globalThis.ApexCharts.__internals.__apex_Graphics,u=globalThis.ApexCharts.__internals.__apex_axes_AxesUtils,m=globalThis.ApexCharts.__internals.__apex_Data,g=globalThis.ApexCharts.__internals.__apex_Series,p=globalThis.ApexCharts.__internals.__apex_Utils,x=globalThis.ApexCharts.__internals.__apex_Environment_Environment,f=globalThis.ApexCharts.__internals.__apex_BrowserAPIs_BrowserAPIs,b=globalThis.ApexCharts.__internals,y=b.__apex_math_SVGNS;b.__apex_math_Point,b.__apex_math_Matrix,b.__apex_math_Box;class w{constructor(t,e){this.w=t,this.ctx=e}svgStringToNode(t){return(new DOMParser).parseFromString(t,"image/svg+xml").documentElement}scaleSvgNode(t,e){const i=parseFloat(t.getAttributeNS(null,"width")),s=parseFloat(t.getAttributeNS(null,"height"));t.setAttributeNS(null,"width",i*e),t.setAttributeNS(null,"height",s*e),t.setAttributeNS(null,"viewBox","0 0 "+i+" "+s)}inlineCanvasLayers(t){const e=this.w.dom.elWrap.querySelectorAll(".apexcharts-series-canvas");if(!e.length)return;const i=t.querySelectorAll(".apexcharts-canvas-series");for(let t=0;t<e.length&&t<i.length;t++){let s;try{s=e[t].toDataURL()}catch(t){continue}const n=i[t],a=document.createElementNS(y,"image");a.setAttribute("x",n.getAttribute("x")||"0"),a.setAttribute("y",n.getAttribute("y")||"0"),a.setAttribute("width",n.getAttribute("width")||"0"),a.setAttribute("height",n.getAttribute("height")||"0"),a.setAttribute("href",s),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s),n.parentNode&&n.parentNode.replaceChild(a,n)}}queryStyleable(t,e){return Array.prototype.slice.call(t.querySelectorAll(e))}setStyleDefaults(t,e){Object.keys(e).forEach(i=>{""===t.style.getPropertyValue(i)&&t.style.setProperty(i,e[i])})}applyExportStyles(t){const e=this.w;this.queryStyleable(t,"style").forEach(t=>t.remove()),this.queryStyleable(t,[".apexcharts-tooltip",".apexcharts-toolbar",".apexcharts-xaxistooltip",".apexcharts-yaxistooltip",".apexcharts-xcrosshairs",".apexcharts-ycrosshairs",".apexcharts-zoom-rect",".apexcharts-selection-rect"].join(", ")).forEach(t=>{t.style.setProperty("display","none","important")}),this.queryStyleable(t,".apexcharts-flip-y").forEach(t=>{this.setStyleDefaults(t,{transform:"scaleY(-1) translateY(-100%)","transform-origin":"top","transform-box":"fill-box"})}),this.queryStyleable(t,".apexcharts-flip-x").forEach(t=>{this.setStyleDefaults(t,{transform:"scaleX(-1)","transform-origin":"center","transform-box":"fill-box"})}),e.config.legend.show&&e.dom.elLegendWrap&&e.dom.elLegendWrap.children.length&&(this.queryStyleable(t,".apexcharts-legend").forEach(t=>{this.setStyleDefaults(t,{display:"flex",overflow:"auto",padding:"0 10px"});const e=t.classList,i=e.contains("apx-legend-position-left")||e.contains("apx-legend-position-right"),s=e.contains("apx-legend-position-top")||e.contains("apx-legend-position-bottom");e.contains("apexcharts-legend-group-horizontal")&&this.setStyleDefaults(t,{"flex-direction":"column"}),i&&this.setStyleDefaults(t,{"flex-direction":"column",bottom:"0"}),s&&this.setStyleDefaults(t,{"flex-wrap":"wrap"}),i||s&&e.contains("apexcharts-align-left")?this.setStyleDefaults(t,{"justify-content":"flex-start","align-items":"flex-start"}):s&&e.contains("apexcharts-align-center")?this.setStyleDefaults(t,{"justify-content":"center","align-items":"center"}):s&&e.contains("apexcharts-align-right")&&this.setStyleDefaults(t,{"justify-content":"flex-end","align-items":"flex-end"})}),this.queryStyleable(t,".apexcharts-legend-group").forEach(t=>{this.setStyleDefaults(t,{display:"flex"})}),this.queryStyleable(t,".apexcharts-legend-group-vertical").forEach(t=>{this.setStyleDefaults(t,{"flex-direction":"column-reverse"})}),this.queryStyleable(t,".apexcharts-legend-series").forEach(t=>{this.setStyleDefaults(t,{cursor:t.classList.contains("apexcharts-no-click")?"auto":"pointer","line-height":"normal",display:"flex","align-items":"center"})}),this.queryStyleable(t,".apexcharts-legend-text").forEach(t=>{this.setStyleDefaults(t,{position:"relative","font-size":"14px"})}),this.queryStyleable(t,".apexcharts-legend-marker").forEach(t=>{this.setStyleDefaults(t,{position:"relative",display:"flex","align-items":"center","justify-content":"center",cursor:"pointer","margin-right":"1px"})}),this.queryStyleable(t,".apexcharts-inactive-legend").forEach(t=>{this.setStyleDefaults(t,{opacity:"0.45"})}),this.queryStyleable(t,".apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series").forEach(t=>{t.style.setProperty("display","none","important")}))}resolveExportBackground(){const t=this.w,e=t.config.chart.background;return e&&"transparent"!==e?e:"dark"===t.config.theme.mode?"#343A3F":"#fff"}collectFontFamilies(){const t=new Set,e=this.w;if(!x.isBrowser()||!e.dom.elWrap)return t;const i=this.queryStyleable(e.dom.elWrap,"text, tspan, .apexcharts-legend-text, .apexcharts-title-text, .apexcharts-subtitle-text");return[e.dom.elWrap,...i].forEach(e=>{const i=f.getComputedStyle(e),s=i&&i.fontFamily;s&&s.split(",").forEach(e=>{const i=e.trim().replace(/^['"]|['"]$/g,"");i&&t.add(i.toLowerCase())})}),t}collectFontFaceRules(){if(!x.isBrowser())return Promise.resolve([]);const t=[],e=[],i=e=>{(e.match(/@font-face\s*\{[^}]*\}/gi)||[]).forEach(e=>{const i=e.match(/font-family\s*:\s*([^;}]+)/i);if(!i)return;const s=i[1].trim().replace(/^['"]|['"]$/g,"");t.push({family:s.toLowerCase(),css:e})})};return Array.from(document.styleSheets||[]).forEach(t=>{let s=null;try{s=t.cssRules}catch(t){s=null}s?Array.from(s).forEach(t=>{5===t.type&&t.cssText&&i(t.cssText)}):t.href&&e.push(fetch(t.href).then(t=>t.ok?t.text():"").then(i).catch(()=>{}))}),Promise.all(e).then(()=>t)}embedFonts(t){const e=this.w;if(!x.isBrowser()||!e.config.chart.toolbar.export.embedFonts||"function"!=typeof fetch)return Promise.resolve();const i=this.collectFontFamilies();return i.size?this.collectFontFaceRules().then(t=>{const e=t.filter(t=>i.has(t.family));return e.length?Promise.all(e.map(t=>this.inlineFontFaceUrls(t.css).catch(()=>null))):Promise.resolve([])}).then(e=>{const i=(e||[]).filter(Boolean).join("\n");if(!i)return;const s=document.createElementNS(y,"style");s.textContent=i,t.insertBefore(s,t.firstChild)}).catch(()=>{}):Promise.resolve()}inlineFontFaceUrls(t){const e=[],i=/url\(\s*(['"]?)([^'")]+)\1\s*\)/gi;let s;for(;null!==(s=i.exec(t));)s[2].startsWith("data:")||e.push(s[2]);return e.length?Promise.all(e.map(t=>this.fetchAsDataUri(t).then(e=>({url:t,dataUri:e})).catch(()=>({url:t,dataUri:null})))).then(e=>{let i=t,s=0;return e.forEach(({url:t,dataUri:e})=>{e&&(i=i.split(t).join(e),s++)}),s?i:null}):Promise.resolve(t.includes("data:")?t:null)}fetchAsDataUri(t){return"function"!=typeof fetch||"function"!=typeof btoa?Promise.reject(new Error("fetch unavailable")):fetch(t).then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status} for ${t}`);const i=e.headers.get("content-type")||"application/octet-stream";return e.arrayBuffer().then(t=>{const e=new Uint8Array(t);let s="";for(let t=0;t<e.length;t+=32768)s+=String.fromCharCode.apply(null,e.subarray(t,t+32768));return`data:${i};base64,${btoa(s)}`})})}getSvgString(t){return new Promise(e=>{const i=this.w;let s=t||i.config.chart.toolbar.export.scale||i.config.chart.toolbar.export.width/i.globals.svgWidth;s||(s=1);const n=i.globals.svgWidth*s,a=i.globals.svgHeight*s,o=i.dom.elWrap.cloneNode(!0);o.style.width=n+"px",o.style.height=a+"px",this.inlineCanvasLayers(o),this.applyExportStyles(o);const l=(new XMLSerializer).serializeToString(o);let r=`\n <svg xmlns="http://www.w3.org/2000/svg"\n version="1.1"\n xmlns:xlink="http://www.w3.org/1999/xlink"\n class="apexcharts-svg"\n xmlns:data="ApexChartsNS"\n transform="translate(0, 0)"\n width="${i.globals.svgWidth}px" height="${i.globals.svgHeight}px">\n <foreignObject width="100%" height="100%">\n <div xmlns="http://www.w3.org/1999/xhtml" style="width:${n}px; height:${a}px;">\n ${l}\n </div>\n </foreignObject>\n </svg>\n `;const c=this.svgStringToNode(r);1!==s&&this.scaleSvgNode(c,s),Promise.all([this.convertImagesToBase64(c),this.embedFonts(c)]).then(()=>{r=(new XMLSerializer).serializeToString(c),e(r.replace(/&nbsp;/g,"&#160;"))})})}convertImagesToBase64(t){const e="http://www.w3.org/1999/xlink",i=t.getElementsByTagName("image"),s=Array.from(i).map(t=>{const i=t.getAttributeNS(e,"href"),s=t.getAttribute("href"),n=i||s;if(!n||n.startsWith("data:"))return Promise.resolve();const a=n=>{i&&t.setAttributeNS(e,"href",n),!s&&i||t.setAttribute("href",n)};return this.fetchAsDataUri(n).then(a).catch(()=>this.getBase64FromUrl(n).then(a).catch(t=>{console.error("Error converting image to base64:",t)}))});return Promise.all(s)}getBase64FromUrl(t){return x.isSSR()?Promise.resolve(t):new Promise((e,i)=>{const s=new Image;s.crossOrigin="Anonymous",s.onload=()=>{const t=document.createElement("canvas");t.width=s.width,t.height=s.height;const i=t.getContext("2d");i&&i.drawImage(s,0,0),e(t.toDataURL())},s.onerror=i,s.src=t})}svgUrl(){return new Promise(t=>{this.getSvgString().then(e=>{const i=new Blob([e],{type:"image/svg+xml;charset=utf-8"});t(URL.createObjectURL(i))})})}dataURI(t){return x.isSSR()?Promise.resolve({imgURI:""}):new Promise(e=>{const i=this.w,s=t?t.scale||t.width/i.globals.svgWidth:1,n=document.createElement("canvas");n.width=i.globals.svgWidth*s,n.height=parseInt(i.dom.elWrap.style.height,10)*s;const a=this.resolveExportBackground(),o=n.getContext("2d");o&&(o.fillStyle=a,o.fillRect(0,0,n.width,n.height),this.getSvgString(s).then(t=>{const i="data:image/svg+xml,"+encodeURIComponent(t),s=new Image;s.crossOrigin="anonymous",s.onload=()=>{o.drawImage(s,0,0);const t=n;if(t.msToBlob){const i=t.msToBlob();e({blob:i})}else{const t=n.toDataURL("image/png");e({imgURI:t})}},s.src=i}))})}exportToSVG(){this.svgUrl().then(t=>{this.triggerDownload(t,this.w.config.chart.toolbar.export.svg.filename,".svg")})}exportToPng(){const t=this.w.config.chart.toolbar.export.scale,e=this.w.config.chart.toolbar.export.width,i=t?{scale:t}:e?{width:e}:void 0;this.dataURI(i).then(({imgURI:t,blob:e})=>{e?navigator.msSaveOrOpenBlob(e,this.w.globals.chartID+".png"):this.triggerDownload(t,this.w.config.chart.toolbar.export.png.filename,".png")})}exportToCSV({series:t,fileName:e,columnDelimiter:i=",",lineDelimiter:s="\n"}){const n=this.w;t||(t=n.config.series);let a=[];const o=[];let l="";const r=n.seriesData.series.map((t,e)=>-1===n.globals.collapsedSeriesIndices.indexOf(e)?t:[]),c=t=>{if(null==t||p.isNumber(t))return t;const e=String(t);return/^[=+\-@\t\r]/.test(e)?`'${e}`:e},h=t=>"function"==typeof n.config.chart.toolbar.export.csv.categoryFormatter?n.config.chart.toolbar.export.csv.categoryFormatter(t):"datetime"===n.config.xaxis.type&&String(t).length>=10?new Date(t).toDateString():p.isNumber(t)?t:c(t.split(i).join("")),d=t=>"function"==typeof n.config.chart.toolbar.export.csv.valueFormatter?n.config.chart.toolbar.export.csv.valueFormatter(t):c(t),x=Math.max(...t.map(t=>t.data?t.data.length:0)),f=new m(this.w),b=new u(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale}),y=t=>{let e="";if(n.globals.axisCharts){if("category"===n.config.xaxis.type||n.config.xaxis.convertedCatToNumeric)if(n.globals.isBarHorizontal){const i=n.formatters.yLabelFormatters[0],s=new g(this.ctx.w).getActiveConfigSeriesIndex();e=i(n.labelData.labels[t],{seriesIndex:s,dataPointIndex:t,w:n})}else e=b.getLabel(n.labelData.labels,n.labelData.timescaleLabels,0,t).text;"datetime"===n.config.xaxis.type&&(n.config.xaxis.categories.length?e=n.config.xaxis.categories[t]:n.config.labels.length&&(e=n.config.labels[t]))}else e=n.config.labels[t];return null===e?"nullvalue":(Array.isArray(e)&&(e=e.join(" ")),p.isNumber(e)?e:e.split(i).join(""))},w=(e,s)=>{var l,c,u,m,g,p;if(a.length&&0===s&&o.push(a.join(i)),e.data){const b=e.data.length?e.data:[...Array(x)].map(()=>"");for(let x=0;x<b.length;x++){a=[];let b=y(x);if("nullvalue"!==b){if(b||(f.isFormatXY()?b=t[s].data[x].x:f.isFormat2DArray()&&(b=t[s].data[x]?t[s].data[x][0]:"")),0===s){a.push(h(b));for(let e=0;e<n.seriesData.series.length;e++){const i=f.isFormatXY()?null==(l=t[e].data[x])?void 0:l.y:r[e][x];a.push(d(i))}}("candlestick"===n.config.chart.type||e.type&&"candlestick"===e.type)&&(a.pop(),a.push(n.candleData.seriesCandleO[s][x]),a.push(n.candleData.seriesCandleH[s][x]),a.push(n.candleData.seriesCandleL[s][x]),a.push(n.candleData.seriesCandleC[s][x])),("boxPlot"===n.config.chart.type||e.type&&"boxPlot"===e.type)&&(a.pop(),a.push(n.candleData.seriesCandleO[s][x]),a.push(n.candleData.seriesCandleH[s][x]),a.push(n.candleData.seriesCandleM[s][x]),a.push(n.candleData.seriesCandleL[s][x]),a.push(n.candleData.seriesCandleC[s][x])),"rangeBar"===n.config.chart.type&&(a.pop(),a.push(n.rangeData.seriesRangeStart[s][x]),a.push(n.rangeData.seriesRangeEnd[s][x])),("violin"===n.config.chart.type||e.type&&"violin"===e.type)&&(a.pop(),a.push(null==(c=n.violinData.seriesViolinMin[s])?void 0:c[x]),a.push(null==(u=n.violinData.seriesViolinMax[s])?void 0:u[x]),a.push(null!=(p=null==(g=null==(m=n.violinData.seriesViolinPoints[s])?void 0:m[x])?void 0:g.length)?p:0)),a.length&&o.push(a.join(i))}}}};a.push(n.config.chart.toolbar.export.csv.headerCategory),"boxPlot"===n.config.chart.type?(a.push("minimum"),a.push("q1"),a.push("median"),a.push("q3"),a.push("maximum")):"candlestick"===n.config.chart.type?(a.push("open"),a.push("high"),a.push("low"),a.push("close")):"rangeBar"===n.config.chart.type?(a.push("minimum"),a.push("maximum")):"violin"===n.config.chart.type?(a.push("minimum"),a.push("maximum"),a.push("observations")):t.map((t,e)=>{const s=(t.name?t.name:`series-${e}`)+"";n.globals.axisCharts&&a.push(s.split(i).join("")?s.split(i).join(""):`series-${e}`)}),n.globals.axisCharts||(a.push(n.config.chart.toolbar.export.csv.headerValue),o.push(a.join(i))),n.globals.allSeriesHasEqualX||!n.globals.axisCharts||n.config.xaxis.categories.length||n.config.labels.length?t.map((t,e)=>{n.globals.axisCharts?w(t,e):(a=[],a.push(h(n.labelData.labels[e])),a.push(d(r[e])),o.push(a.join(i)))}):(()=>{const e=new Set,s={};t.forEach((i,n)=>{null==i||i.data.forEach(i=>{let a,o;if(f.isFormatXY())a=i.x,o=i.y;else{if(!f.isFormat2DArray())return;a=i[0],o=i[1]}s[a]||(s[a]=Array(t.length).fill("")),s[a][n]=d(o),e.add(a)})}),a.length&&o.push(a.join(i)),Array.from(e).sort().forEach(t=>{const e=s[t];o.push([h(t),...e].join(i))})})(),l+=o.join(s),this.triggerDownload("data:text/csv; charset=utf-8,"+encodeURIComponent("\ufeff"+l),e||n.config.chart.toolbar.export.csv.filename,".csv")}triggerDownload(t,e,i){if(x.isSSR())return;const s=document.createElement("a");s.href=t,s.download=(e||this.w.globals.chartID)+i,document.body.appendChild(s),s.click(),document.body.removeChild(s)}}class v{constructor(t,e){this.w=t,this.ctx=e,this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=t.globals.minX,this.maxX=t.globals.maxX,this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elMeasure=null,this.elZoomReset=null,this.elMenuIcon=null,this.elMenu=null,this.elMenuItems=[],this.t=null}createToolbar(){var t,e;const i=this.w,s=()=>f.createElementNS("http://www.w3.org/1999/xhtml","div"),n=()=>{const t=f.createElementNS("http://www.w3.org/1999/xhtml","button");return t.setAttribute("type","button"),t},a=s();if(a.setAttribute("class","apexcharts-toolbar"),a.style.top=i.config.chart.toolbar.offsetY+"px",a.style.right=3-i.config.chart.toolbar.offsetX+"px",i.dom.elWrap.appendChild(a),this.elZoom=n(),this.elZoomIn=n(),this.elZoomOut=n(),this.elPan=n(),this.elSelection=n(),this.elMeasure=n(),this.elZoomReset=n(),this.elMenuIcon=n(),this.elMenu=s(),this.elCustomIcons=[],this.t=i.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(let t=0;t<this.t.customIcons.length;t++)this.elCustomIcons.push(n());const o=[],l=(t,e,s)=>{const n=t.toLowerCase();this.t[n]&&i.config.chart.zoom.enabled&&o.push({el:e,icon:"string"==typeof this.t[n]?this.t[n]:s,title:this.localeValues[t],class:`apexcharts-${n}-icon`})};l("zoomIn",this.elZoomIn,'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M12 5v14M5 12h14"/>\n</svg>\n'),l("zoomOut",this.elZoomOut,'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M5 12h14"/>\n</svg>\n');const r=t=>{this.t[t]&&i.config.chart[t].enabled&&o.push({el:"zoom"===t?this.elZoom:this.elSelection,icon:"string"==typeof this.t[t]?this.t[t]:"zoom"===t?'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <circle cx="11" cy="11" r="7"/>\n <path d="m21 21-4.3-4.3M8 11h6M11 8v6"/>\n</svg>\n':'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M5 3a2 2 0 0 0-2 2"/>\n <path d="M19 3a2 2 0 0 1 2 2"/>\n <path d="M21 19a2 2 0 0 1-2 2"/>\n <path d="M5 21a2 2 0 0 1-2-2"/>\n <path d="M9 3h1M14 3h1M9 21h1M14 21h1M3 9v1M3 14v1M21 9v1M21 14v1"/>\n</svg>\n',title:this.localeValues["zoom"===t?"selectionZoom":"selection"],class:`apexcharts-${t}-icon`})};r("zoom"),r("selection"),this.t.pan&&i.config.chart.zoom.enabled&&o.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M5 9 2 12l3 3"/>\n <path d="M9 5l3-3 3 3"/>\n <path d="M15 19l-3 3-3-3"/>\n <path d="M19 9l3 3-3 3"/>\n <path d="M2 12h20"/>\n <path d="M12 2v20"/>\n</svg>\n',title:this.localeValues.pan,class:"apexcharts-pan-icon"}),this.t.measure&&i.config.chart.measure&&i.config.chart.measure.enabled&&o.push({el:this.elMeasure,icon:"string"==typeof this.t.measure?this.t.measure:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.4 2.4 0 0 1 0-3.4l2.6-2.6a2.4 2.4 0 0 1 3.4 0Z"/>\n <path d="m14.5 12.5 2-2"/>\n <path d="m11.5 9.5 2-2"/>\n <path d="m8.5 6.5 2-2"/>\n <path d="m17.5 15.5 2-2"/>\n</svg>\n',title:this.localeValues.measure||"Measure",class:"apexcharts-measure-icon"}),l("reset",this.elZoomReset,'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/>\n <path d="M3 3v5h5"/>\n</svg>\n'),this.t.download&&o.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M4 6h16M4 12h16M4 18h16"/>\n</svg>\n',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(let t=0;t<this.elCustomIcons.length;t++)o.push({el:this.elCustomIcons[t],icon:this.t.customIcons[t].icon,title:this.t.customIcons[t].title,index:this.t.customIcons[t].index,class:"apexcharts-toolbar-custom-icon "+this.t.customIcons[t].class});o.forEach((t,e)=>{t.index&&p.moveIndexInArray(o,e,t.index)});for(let t=0;t<o.length;t++)d.setAttrs(o[t].el,{class:o[t].class,title:o[t].title,"aria-label":o[t].title}),o[t].el.innerHTML=o[t].icon,a.appendChild(o[t].el);this.elZoom.parentNode&&this.elZoom.setAttribute("aria-pressed",String(!!i.interact.zoomEnabled)),this.elSelection.parentNode&&this.elSelection.setAttribute("aria-pressed",String(!!i.interact.selectionEnabled)),this.elPan.parentNode&&this.elPan.setAttribute("aria-pressed",String(!!i.interact.panEnabled)),this.elMeasure.parentNode&&this.elMeasure.setAttribute("aria-pressed",String(!!i.interact.measureEnabled)),this.elMenuIcon.parentNode&&(this.elMenuIcon.setAttribute("aria-haspopup","true"),this.elMenuIcon.setAttribute("aria-expanded","false")),this._createHamburgerMenu(a),i.interact.zoomEnabled?this.elZoom.classList.add(this.selectedClass):i.interact.panEnabled?this.elPan.classList.add(this.selectedClass):i.interact.selectionEnabled?this.elSelection.classList.add(this.selectedClass):i.interact.measureEnabled&&this.elMeasure&&(this.elMeasure.classList.add(this.selectedClass),null==(e=null==(t=this.ctx.measure)?void 0:t.startMeasure)||e.call(t)),this.addToolbarEventListeners()}_createHamburgerMenu(t){this.elMenuItems=[],t.appendChild(this.elMenu),d.setAttrs(this.elMenu,{class:"apexcharts-menu",role:"menu"});const e=[{name:"exportSVG",title:this.localeValues.exportToSVG},{name:"exportPNG",title:this.localeValues.exportToPNG},{name:"exportCSV",title:this.localeValues.exportToCSV}];for(let t=0;t<e.length;t++)this.elMenuItems.push(f.createElementNS("http://www.w3.org/1999/xhtml","div")),this.elMenuItems[t].innerHTML=e[t].title,d.setAttrs(this.elMenuItems[t],{class:`apexcharts-menu-item ${e[t].name}`,title:e[t].title,role:"menuitem",tabindex:"-1"}),this.elMenu.appendChild(this.elMenuItems[t])}addToolbarEventListeners(){var t,e,i,s,n,a,o,l,r;null==(t=this.elZoomReset)||t.addEventListener("click",this.handleZoomReset.bind(this)),null==(e=this.elSelection)||e.addEventListener("click",this.toggleZoomSelection.bind(this,"selection")),null==(i=this.elZoom)||i.addEventListener("click",this.toggleZoomSelection.bind(this,"zoom")),null==(s=this.elZoomIn)||s.addEventListener("click",this.handleZoomIn.bind(this)),null==(n=this.elZoomOut)||n.addEventListener("click",this.handleZoomOut.bind(this)),null==(a=this.elPan)||a.addEventListener("click",this.togglePanning.bind(this)),null==(o=this.elMeasure)||o.addEventListener("click",this.toggleMeasure.bind(this)),null==(l=this.elMenuIcon)||l.addEventListener("click",this.toggleMenu.bind(this)),this.elMenuItems.forEach(t=>{t.classList.contains("exportSVG")?t.addEventListener("click",this.handleDownload.bind(this,"svg")):t.classList.contains("exportPNG")?t.addEventListener("click",this.handleDownload.bind(this,"png")):t.classList.contains("exportCSV")&&t.addEventListener("click",this.handleDownload.bind(this,"csv"))});for(let t=0;t<this.t.customIcons.length;t++)this.elCustomIcons[t].addEventListener("click",this.t.customIcons[t].click.bind(this,this.ctx,this.ctx.w));[this.elZoomReset,this.elSelection,this.elZoom,this.elZoomIn,this.elZoomOut,this.elPan,this.elMeasure,this.elMenuIcon,...this.elCustomIcons].forEach(t=>{t.addEventListener("keydown",e=>{if("Enter"===e.key||" "===e.key){e.preventDefault();const i=t.className;t.click(),requestAnimationFrame(()=>{const t=this.w.dom.baseEl;if(!t)return;const e=i.split(" ").find(t=>t.startsWith("apexcharts-"));if(!e)return;const s=t.querySelector(`.${e}`);s&&s.focus()})}})}),null==(r=this.elMenuIcon)||r.addEventListener("keydown",t=>{var e;"ArrowDown"!==t.key&&"ArrowUp"!==t.key||(t.preventDefault(),(null==(e=this.elMenu)?void 0:e.classList.contains("apexcharts-menu-open"))||this.toggleMenu(),window.setTimeout(()=>{const e="ArrowDown"===t.key?0:this.elMenuItems.length-1;this.elMenuItems[e]&&this.elMenuItems[e].focus()},20))}),this.elMenuItems.forEach((t,e)=>{t.addEventListener("keydown",i=>{var s;if("ArrowDown"===i.key){i.preventDefault();(this.elMenuItems[e+1]||this.elMenuItems[0]).focus()}else if("ArrowUp"===i.key){i.preventDefault();(this.elMenuItems[e-1]||this.elMenuItems[this.elMenuItems.length-1]).focus()}else"Escape"===i.key||"Tab"===i.key?(this._closeMenu(),null==(s=this.elMenuIcon)||s.focus(),"Tab"===i.key||i.preventDefault()):"Enter"!==i.key&&" "!==i.key||(i.preventDefault(),t.click())})})}toggleZoomSelection(t){this.ctx.getSyncedCharts().forEach(e=>{const i=e.ctx.toolbar,s="selection"===t?"selectionEnabled":"zoomEnabled",n=!!e.w.globals[s];i.toggleOtherControls();const a="selection"===t?i.elSelection:i.elZoom;n||(e.w.globals[s]=!0,a.classList.add(i.selectedClass)),a.setAttribute("aria-pressed",String(!!e.w.globals[s]))})}toggleMeasure(){var t,e,i,s;const n=this.w,a=!n.interact.measureEnabled;this.toggleOtherControls(),a&&(n.interact.measureEnabled=!0,null==(t=this.elMeasure)||t.classList.add(this.selectedClass),null==(i=null==(e=this.ctx.measure)?void 0:e.startMeasure)||i.call(e)),null==(s=this.elMeasure)||s.setAttribute("aria-pressed",String(n.interact.measureEnabled))}getToolbarIconsReference(){const t=this.w;this.elZoom||(this.elZoom=t.dom.baseEl.querySelector(".apexcharts-zoom-icon")),this.elPan||(this.elPan=t.dom.baseEl.querySelector(".apexcharts-pan-icon")),this.elSelection||(this.elSelection=t.dom.baseEl.querySelector(".apexcharts-selection-icon")),this.elMeasure||(this.elMeasure=t.dom.baseEl.querySelector(".apexcharts-measure-icon"))}enableZoomPanFromToolbar(t){this.toggleOtherControls(),"pan"===t?this.w.interact.panEnabled=!0:this.w.interact.zoomEnabled=!0;const e="pan"===t?this.elPan:this.elZoom,i="pan"===t?this.elZoom:this.elPan;e&&e.classList.add(this.selectedClass),i&&i.classList.remove(this.selectedClass)}togglePanning(){this.ctx.getSyncedCharts().forEach(t=>{const e=t.ctx.toolbar,i=!!t.w.interact.panEnabled;e.toggleOtherControls(),i||(t.w.interact.panEnabled=!0,e.elPan.classList.add(e.selectedClass)),e.elPan.setAttribute("aria-pressed",String(!!t.w.interact.panEnabled))})}toggleOtherControls(){var t,e,i;const s=this.w;s.interact.panEnabled=!1,s.interact.zoomEnabled=!1,s.interact.selectionEnabled=!1,s.interact.measureEnabled&&(s.interact.measureEnabled=!1,null==(e=null==(t=this.ctx.measure)?void 0:t.stopMeasure)||e.call(t),null==(i=this.elMeasure)||i.setAttribute("aria-pressed","false")),this.getToolbarIconsReference();[this.elPan,this.elSelection,this.elZoom,this.elMeasure].forEach(t=>{t&&t.classList.remove(this.selectedClass)})}_currentXRange(){const t=this.w;return t.axisFlags.isRangeBar?{minX:t.globals.minY,maxX:t.globals.maxY}:{minX:t.globals.minX,maxX:t.globals.maxX}}handleZoomIn(){const t=this.w,{minX:e,maxX:i}=this._currentXRange();this.minX=e,this.maxX=i;const s=(e+i)/2,n=(e+s)/2,a=(i+s)/2,o=this._getNewMinXMaxX(n,a);t.interact.disableZoomIn||this.zoomUpdateOptions(o.minX,o.maxX)}handleZoomOut(){const t=this.w,{minX:e,maxX:i}=this._currentXRange();if(this.minX=e,this.maxX=i,"datetime"===t.config.xaxis.type&&new Date(e).getUTCFullYear()<1e3)return;const s=(e+i)/2,n=e-(s-e),a=i-(s-i),o=this._getNewMinXMaxX(n,a);t.interact.disableZoomOut||this.zoomUpdateOptions(o.minX,o.maxX)}_getNewMinXMaxX(t,e){const i=this.w.config.xaxis.convertedCatToNumeric;return{minX:i?Math.floor(t):t,maxX:i?Math.floor(e):e}}zoomUpdateOptions(t,e){const i=this.w;if(void 0===t&&void 0===e)return void this.handleZoomReset();if(i.config.xaxis.convertedCatToNumeric&&(t<1&&(t=1,e=i.globals.dataPoints),e-t<2))return;let s={min:t,max:e};const n=this.getBeforeZoomRange(s,void 0);n&&(s=n.xaxis);const a={xaxis:s};if(!i.globals.initialConfig)return;const o=p.clone(i.globals.initialConfig.yaxis);i.config.chart.group||(a.yaxis=o),this.w.interact.zoomed=!0,this.ctx.updateHelpers._updateOptions(a,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(s,o)}zoomCallback(t,e){"function"==typeof this.ev.zoomed&&(this.ev.zoomed(this.ctx,{xaxis:t,yaxis:e}),this.ctx.events.fireEvent("zoomed",{xaxis:t,yaxis:e}))}getBeforeZoomRange(t,e){let i=null;return"function"==typeof this.ev.beforeZoom&&(i=this.ev.beforeZoom(this,{xaxis:t,yaxis:e})),i}toggleMenu(){window.setTimeout(()=>{var t,e,i;(null==(t=this.elMenu)?void 0:t.classList.contains("apexcharts-menu-open"))?this._closeMenu():(null==(e=this.elMenu)||e.classList.add("apexcharts-menu-open"),null==(i=this.elMenuIcon)||i.setAttribute("aria-expanded","true"))},0)}_closeMenu(){var t,e;null==(t=this.elMenu)||t.classList.remove("apexcharts-menu-open"),null==(e=this.elMenuIcon)||e.setAttribute("aria-expanded","false")}handleDownload(t){const e=this.w,i=new w(this.w,this.ctx);switch(t){case"svg":i.exportToSVG();break;case"png":i.exportToPng();break;case"csv":i.exportToCSV({series:e.config.series,columnDelimiter:e.config.chart.toolbar.export.csv.columnDelimiter})}}handleZoomReset(){this.ctx.getSyncedCharts().forEach(t=>{const e=t.w;if(!e.interact.zoomed)return;if(e.globals.lastXAxis.min=e.globals.initialConfig.xaxis.min,e.globals.lastXAxis.max=e.globals.initialConfig.xaxis.max,t.updateHelpers.revertDefaultAxisMinMax(),"function"==typeof e.config.chart.events.beforeResetZoom){const i=e.config.chart.events.beforeResetZoom(t,e);i&&t.updateHelpers.revertDefaultAxisMinMax(i)}"function"==typeof e.config.chart.events.zoomed&&t.ctx.toolbar.zoomCallback({min:e.config.xaxis.min,max:e.config.xaxis.max});const i=t.ctx.series.emptyCollapsedSeries(p.clone(e.globals.initialSeries));t.updateHelpers._updateSeries(i,e.config.chart.animations.dynamicAnimation.enabled),e.interact.zoomed=!1})}destroy(){this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elMeasure=null,this.elZoomReset=null,this.elMenuIcon=null}}class S{static xRatio(t){const e=t.layout.gridWidth||1;return(t.globals.maxX-t.globals.minX)/e}static dataXToPx(t,e){return(e-t.globals.minX)/S.xRatio(t)}static pxToDataX(t,e){return t.globals.minX+e*S.xRatio(t)}static screenXToPlotPx(t,e){const i=t.dom.baseEl,s=i&&i.querySelector(".apexcharts-svg");if(!s)return e-t.layout.translateX;const n=s.getBoundingClientRect(),a=t.globals.svgWidth?n.width/t.globals.svgWidth:1;return(e-n.left)/(a||1)-t.layout.translateX}}const M=globalThis.ApexCharts.__internals;M.__apex_index_SVG;const _=M.__apex_index_Box;h.registerFeatures({toolbar:v,zoomPanSelection:class extends v{constructor(t,e){super(t,e),this.w=t,this.ctx=e,this.dragged=!1,this.graphics=new d(this.w),this.eventList=["mousedown","mouseleave","mousemove","touchstart","touchmove","mouseup","touchend"],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"}init({xyRatios:t}){const e=this.w,i=this;this.xyRatios=t,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.constraints=new _(0,0,e.layout.gridWidth,e.layout.gridHeight),this.zoomRect.node.classList.add("apexcharts-zoom-rect"),this.selectionRect.node.classList.add("apexcharts-selection-rect"),e.dom.Paper.add(this.zoomRect),e.dom.Paper.add(this.selectionRect),"x"===e.config.chart.selection.type?this.slDraggableRect=this.selectionRect.draggable({minX:0,minY:0,maxX:e.layout.gridWidth,maxY:e.layout.gridHeight}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):"y"===e.config.chart.selection.type?this.slDraggableRect=this.selectionRect.draggable({minX:0,maxX:e.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=e.dom.baseEl.querySelector(`${e.globals.chartClass} .apexcharts-svg`),this.hoverArea&&(this.hoverArea.classList.add("apexcharts-zoomable"),this.eventList.forEach(e=>{var s;null==(s=this.hoverArea)||s.addEventListener(e,i.svgMouseEvents.bind(i,t),{capture:!1,passive:!0})}),this._wheelZoomEnabled()&&this.hoverArea.addEventListener("wheel",i.mouseWheelEvent.bind(i),{capture:!1,passive:!1}),this._momentumEnabled()&&["touchstart","touchmove","touchend","touchcancel"].forEach(t=>{var e;null==(e=this.hoverArea)||e.addEventListener(t,i.momentumTouch.bind(i),{capture:!1,passive:!1})}))}destroy(){this.slDraggableRect&&(this.slDraggableRect.draggable(!1),this.slDraggableRect.off(),this.selectionRect.off()),this.selectionRect=null,this.zoomRect=null}svgMouseEvents(t,e){const i=this.w,s=this.ctx.toolbar;if(i.interact.momentum&&i.interact.momentum.busy)return;if(this._momentumEnabled()&&e.touches&&e.touches.length>1)return;const n=i.interact.zoomEnabled?i.config.chart.zoom.type:i.config.chart.selection.type,a=i.config.chart.toolbar.autoSelected;if("measure"!==a&&(e.shiftKey?(i.interact.shiftWasPressed=!0,s.enableZoomPanFromToolbar("pan"===a?"zoom":"pan")):i.interact.shiftWasPressed&&(s.enableZoomPanFromToolbar(a),i.interact.shiftWasPressed=!1)),!e.target)return;const o=e.target.classList;let l;e.target.parentNode&&null!==e.target.parentNode&&(l=e.target.parentNode.classList);if(!(o.contains("apexcharts-legend-marker")||o.contains("apexcharts-legend-text")||l&&l.contains("apexcharts-toolbar"))){if(this.clientX="touchmove"===e.type||"touchstart"===e.type?e.touches[0].clientX:"touchend"===e.type?e.changedTouches[0].clientX:e.clientX,this.clientY="touchmove"===e.type||"touchstart"===e.type?e.touches[0].clientY:"touchend"===e.type?e.changedTouches[0].clientY:e.clientY,"mousedown"===e.type&&1===e.which||"touchstart"===e.type){const t=this._gridRect();if(!t)return;this.startX=this._screenXToPlotPx(this.clientX),this.startY=this.clientY-t.top,this.dragged=!1,this.w.interact.mousedown=!0}("mousemove"===e.type&&1===e.which||"touchmove"===e.type)&&(this.dragged=!0,i.interact.panEnabled?(i.interact.selection=null,this.w.interact.mousedown&&this.panDragging({context:this,zoomtype:n,xyRatios:this.xyRatios})):(this.w.interact.mousedown&&i.interact.zoomEnabled||this.w.interact.mousedown&&i.interact.selectionEnabled)&&(this.selection=this.selectionDrawing({context:this,zoomtype:n}))),"mouseup"!==e.type&&"touchend"!==e.type&&"mouseleave"!==e.type||this.handleMouseUp({zoomtype:n}),this.makeSelectionRectDraggable()}}handleMouseUp({zoomtype:t,isResized:e}){const i=this.w,s=this._gridRect();s&&(this.w.interact.mousedown||e)&&(this.endX=this._screenXToPlotPx(this.clientX),this.endY=this.clientY-s.top,this.dragX=Math.abs(this.endX-this.startX),this.dragY=Math.abs(this.endY-this.startY),(i.interact.zoomEnabled||i.interact.selectionEnabled)&&this.selectionDrawn({context:this,zoomtype:t})),i.interact.zoomEnabled&&this.hideSelectionRect(this.selectionRect),this.dragged=!1,this.w.interact.mousedown=!1}_incidentalZoomEnabled(t){var e,i,s;const n=this.w.config.chart;return!(!n.zoom||!n.zoom.enabled)&&("auto"!==t?!!t:!(!(null==(e=n.toolbar)?void 0:e.show)||!(null==(s=null==(i=n.toolbar)?void 0:i.tools)?void 0:s.reset)))}_wheelZoomEnabled(){const{zoom:t}=this.w.config.chart;return this._incidentalZoomEnabled(t&&t.allowMouseWheelZoom)}_wheel(){const t=this.w.interact;return t.wheel||(t.wheel={factor:1,clientX:0,rafId:null,endTimer:null}),t.wheel}mouseWheelEvent(t){t.preventDefault();const e=this._wheel();let i=t.deltaY;1===t.deltaMode?i*=33:2===t.deltaMode&&(i*=330),e.factor*=Math.pow(2,i/240),e.clientX=t.clientX,null==e.rafId&&(e.rafId=requestAnimationFrame(()=>this._applyWheelZoom())),e.endTimer&&clearTimeout(e.endTimer),e.endTimer=setTimeout(()=>this._endWheelZoom(),150)}_applyWheelZoom(){const t=this.w,e=this._wheel();e.rafId=null;const i=e.factor;if(e.factor=1,1===i||t.globals.isDestroyed)return;const s=this._gridRect();if(!s||!s.width)return;const{min:n,max:a}=this._currentXWindow(),o=a-n,l=Math.min(Math.max((e.clientX-s.left)/s.width,0),1);let r=o*i;const c=this._clampBounds();if(c){const e=t.globals.minXDiff>0&&isFinite(t.globals.minXDiff)?t.globals.minXDiff:0,i=Math.max(2*e,1e-6*(c.max-c.min));r<i&&(r=i),r>c.max-c.min&&(r=c.max-c.min)}let h=n+l*o-l*r,d=h+r;const u=1e-9*o;if(Math.abs(h-n)<u&&Math.abs(d-a)<u)return;if(isNaN(h)||isNaN(d))return;const m=this.getBeforeZoomRange({min:h,max:d},void 0);m&&m.xaxis&&(h=m.xaxis.min,d=m.xaxis.max),this._applyXRange(h,d,!0)}_endWheelZoom(){const t=this.w;if(this._wheel().endTimer=null,t.globals.isDestroyed||!t.interact.zoomed)return;const{min:e,max:i}=this._currentXWindow(),s=t.globals.initialConfig?p.clone(t.globals.initialConfig.yaxis):[],n=this.ctx.toolbar;n&&n.zoomCallback({min:e,max:i},s)}makeSelectionRectDraggable(){const t=this.w;if(!this.selectionRect)return;const e=this.selectionRect.node.getBoundingClientRect();e.width>0&&e.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:()=>{},updateRot:()=>{},createHandle:(t,e,i,s,n)=>"l"===n||"r"===n?t.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):t.circle(0),updateHandle:(t,e)=>t.center(e[0],e[1])}).resize().on("resize",()=>{var e;if(this._clampSelectionRectToPlot(),t.interact.selectionEnabled)t.interact.selection={x:parseFloat(this.selectionRect.node.getAttribute("x")),y:parseFloat(this.selectionRect.node.getAttribute("y")),width:parseFloat(this.selectionRect.node.getAttribute("width")),height:parseFloat(this.selectionRect.node.getAttribute("height"))},clearTimeout(null!=(e=this.w.globals.selectionResizeTimer)?e:void 0),this.w.globals.selectionResizeTimer=window.setTimeout(()=>{this._emitSelectionFromRect()},30);else{const e=t.interact.zoomEnabled?t.config.chart.zoom.type:t.config.chart.selection.type;this.handleMouseUp({zoomtype:e,isResized:!0})}}))}preselectedSelection(){const t=this.w,e=this.xyRatios;if(!t.interact.zoomEnabled)if(void 0!==t.interact.selection&&null!==t.interact.selection)this.drawSelectionRect(c(r({},t.interact.selection),{translateX:t.layout.translateX,translateY:t.layout.translateY}));else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){let i=S.dataXToPx(t,t.config.chart.selection.xaxis.min),s=S.dataXToPx(t,t.config.chart.selection.xaxis.max)-i;t.axisFlags.isRangeBar&&(i=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/e.invertedYRatio,s=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/e.invertedYRatio);const n={x:i,y:0,width:s,height:t.layout.gridHeight,translateX:t.layout.translateX,translateY:t.layout.translateY,selectionEnabled:!0};this.drawSelectionRect(n),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}drawSelectionRect({x:t,y:e,width:i,height:s,translateX:n=0,translateY:a=0}){const o=this.w,l=this.zoomRect,r=this.selectionRect;if(this.dragged||null!==o.interact.selection){const c={transform:"translate("+n+", "+a+")"};o.interact.zoomEnabled&&this.dragged&&(i<0&&(i=1),l.attr({x:t,y:e,width:i,height:s,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}),d.setAttrs(l.node,c)),o.interact.selectionEnabled&&(r.attr({x:t,y:e,width:i>0?i:0,height:s>0?s: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}),d.setAttrs(r.node,c))}}_clampSelectionRectToPlot(){const t=this.selectionRect;if(!t||!t.node)return;const e=this.w.layout.gridWidth;if(!(e>0))return;const i=parseFloat(t.node.getAttribute("x"))||0,s=parseFloat(t.node.getAttribute("width"))||0,n=t=>Math.min(Math.max(t,0),e),a=n(i),o=n(i+s);a===i&&o===i+s||(t.attr({x:a,width:o-a}),t._updateSelectPositions&&t._updateSelectPositions())}hideSelectionRect(t){t&&t.attr({x:0,y:0,width:0,height:0})}selectionDrawing({context:t,zoomtype:e}){const i=this.w,s=t,n=this._gridRect();if(!n)return;const a=s.startX-1,o=s.startY;let l=!1,h=!1;const d=this._screenXToPlotPx(s.clientX),u=s.clientY-n.top;let m=d-a,g=u-o,p={translateX:i.layout.translateX,translateY:i.layout.translateY};return Math.abs(m+a)>i.layout.gridWidth?m=i.layout.gridWidth-a:d<0&&(m=a),a>d&&(l=!0,m=Math.abs(m)),o>u&&(h=!0,g=Math.abs(g)),p="x"===e?{x:l?a-m:a,y:0,width:m,height:i.layout.gridHeight}:"y"===e?{x:0,y:h?o-g:o,width:i.layout.gridWidth,height:g}:{x:l?a-m:a,y:h?o-g:o,width:m,height:g},p=c(r({},p),{translateX:i.layout.translateX,translateY:i.layout.translateY}),s.drawSelectionRect(p),s.selectionDragging("resizing"),p}selectionDragging(t,e){var i;const s=this.w;if(!e)return;e.preventDefault();const{handler:n,box:a}=e.detail,o=this.constraints;let{x:l,y:r}=a;l<o.x&&(l=o.x),r<o.y&&(r=o.y),a.x2>o.x2&&(l=o.x2-a.w),a.y2>o.y2&&(r=o.y2-a.h),n.move(l,r);const c=this.selectionRect;let h=0;"resizing"===t&&(h=30);const d=t=>parseFloat(c.node.getAttribute(t)),u={x:d("x"),y:d("y"),width:d("width"),height:d("height")};s.interact.selection=u;const m=s.config.chart.link,g=!(!m||!m.enabled&&"function"!=typeof m.dimension);("function"==typeof s.config.chart.events.selection||g)&&s.interact.selectionEnabled&&(clearTimeout(null!=(i=this.w.globals.selectionResizeTimer)?i:void 0),this.w.globals.selectionResizeTimer=window.setTimeout(()=>{this._emitSelectionFromRect()},h))}_emitSelectionFromRect(){var t;const e=this.w;if(!e.interact.selectionEnabled)return;const i=e.config.chart.link,s=!(!i||!i.enabled&&"function"!=typeof i.dimension);if("function"!=typeof e.config.chart.events.selection&&!s)return;const n=this._gridRect();if(!n)return;const a=this.selectionRect.node.getBoundingClientRect(),o=this.xyRatios;let l,r,c,h;const d=this._screenXToPlotPx(a.left),u=this._screenXToPlotPx(a.right);if(e.axisFlags.isRangeBar)l=e.globals.yAxisScale[0].niceMin+d*o.invertedYRatio,r=e.globals.yAxisScale[0].niceMin+u*o.invertedYRatio,c=0,h=1;else{if(!e.globals.xAxisScale)return;l=S.pxToDataX(e,d),r=S.pxToDataX(e,u),c=e.globals.yAxisScale[0].niceMin+(n.bottom-a.bottom)*o.yRatio[0],h=e.globals.yAxisScale[0].niceMax-(a.top-n.top)*o.yRatio[0]}const m={xaxis:{min:l,max:r},yaxis:{min:c,max:h}};"function"==typeof e.config.chart.events.selection&&e.config.chart.events.selection(this.ctx,m),e.config.chart.brush.enabled&&void 0!==e.config.chart.events.brushScrolled&&e.config.chart.events.brushScrolled(this.ctx,m),null==(t=this.ctx.linkedViews)||t.onSourceSelection(m.xaxis)}selectionDrawn({context:t,zoomtype:e}){var i;const s=this.w,n=t,a=this.xyRatios,o=this.ctx.toolbar,l=s.interact.zoomEnabled?n.zoomRect.node.getBoundingClientRect():n.selectionRect.node.getBoundingClientRect(),r=n._gridRect();if(!r)return;const c=this._screenXToPlotPx(l.left),h=this._screenXToPlotPx(l.right),d=l.top-r.top,u=l.bottom-r.top;let m,g;s.axisFlags.isRangeBar?(m=s.globals.yAxisScale[0].niceMin+c*a.invertedYRatio,g=s.globals.yAxisScale[0].niceMin+h*a.invertedYRatio):(m=S.pxToDataX(s,c),g=S.pxToDataX(s,h));const x=[],f=[];if(s.config.yaxis.forEach((t,e)=>{const i=s.globals.seriesYAxisMap[e][0],n=s.globals.yAxisScale[e].niceMax-a.yRatio[i]*d,o=s.globals.yAxisScale[e].niceMax-a.yRatio[i]*u;x.push(n),f.push(o)}),n.dragged&&(n.dragX>10||n.dragY>10)&&m!==g)if(s.interact.zoomEnabled){if(!s.globals.initialConfig)return;let t=p.clone(s.globals.initialConfig.yaxis),i=p.clone(s.globals.initialConfig.xaxis);if(s.interact.zoomed=!0,s.config.xaxis.convertedCatToNumeric&&(m=Math.floor(m),g=Math.floor(g),m<1&&(m=1,g=s.globals.dataPoints),g-m<2&&(g=m+1)),"xy"!==e&&"x"!==e||(i={min:m,max:g}),"xy"!==e&&"y"!==e||t.forEach((e,i)=>{t[i].min=f[i],t[i].max=x[i]}),o){const e=o.getBeforeZoomRange(i,t);e&&(i=e.xaxis?e.xaxis:i,t=e.yaxis?e.yaxis:t)}const a={xaxis:i};s.config.chart.group||(a.yaxis=t),n.ctx.updateHelpers._updateOptions(a,!1,n.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof s.config.chart.events.zoomed&&o.zoomCallback(i,t)}else if(s.interact.selectionEnabled){let t=null,a=null;if(a={min:m,max:g},"xy"===e||"y"===e){const e=p.clone(s.config.yaxis);t=e,e.forEach((t,i)=>{e[i].min=f[i],e[i].max=x[i]})}s.interact.selection=n.selection,"function"==typeof s.config.chart.events.selection&&s.config.chart.events.selection(n.ctx,{xaxis:a,yaxis:t}),null==(i=n.ctx.linkedViews)||i.onSourceSelection(a)}}panDragging({context:t}){var e;const i=this.w,s=t;if(void 0!==i.interact.lastClientPosition.x){const t=i.interact.lastClientPosition.x-s.clientX,n=(null!=(e=i.interact.lastClientPosition.y)?e:0)-s.clientY;Math.abs(t)>Math.abs(n)&&t>0?this.moveDirection="left":Math.abs(t)>Math.abs(n)&&t<0?this.moveDirection="right":Math.abs(n)>Math.abs(t)&&n>0?this.moveDirection="up":Math.abs(n)>Math.abs(t)&&n<0&&(this.moveDirection="down")}i.interact.lastClientPosition={x:s.clientX,y:s.clientY};const n=i.axisFlags.isRangeBar?i.globals.minY:i.globals.minX,a=i.axisFlags.isRangeBar?i.globals.maxY:i.globals.maxX;s.panScrolled(n,a)}panScrolled(t,e){var i,s;const n=this.w,a=this.xyRatios;if(!n.globals.initialConfig)return;const o=p.clone(n.globals.initialConfig.yaxis);let l=a.xRatio,r=n.globals.minX,c=n.globals.maxX;if(n.axisFlags.isRangeBar&&(l=a.invertedYRatio,r=n.globals.minY,c=n.globals.maxY),"left"===this.moveDirection?(t=r+n.layout.gridWidth/15*l,e=c+n.layout.gridWidth/15*l):"right"===this.moveDirection&&(t=r-n.layout.gridWidth/15*l,e=c-n.layout.gridWidth/15*l),!n.axisFlags.isRangeBar){const a=null!=(i=n.globals.dataReducerRawMinX)?i:n.globals.initialMinX,o=null!=(s=n.globals.dataReducerRawMaxX)?s:n.globals.initialMaxX;(t<a||e>o)&&(t=r,e=c)}const h={xaxis:{min:t,max:e}};n.config.chart.group||(h.yaxis=o),this.updateScrolledChart(h,t,e)}updateScrolledChart(t,e,i){const s=this.w;if(this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof s.config.chart.events.scrolled){const t={xaxis:{min:e,max:i}};s.config.chart.events.scrolled(this.ctx,t),this.ctx.events.fireEvent("scrolled",t)}}_momentumEnabled(){return this._pinchEnabled()||this._panInertiaEnabled()}_pinchEnabled(){return this._incidentalZoomEnabled(this.w.config.chart.zoom.pinch)}_panInertiaEnabled(){const t=this.w.config.chart;return!(!t.pan||!t.pan.inertia)}_m(){const t=this.w.interact;return t.momentum||(t.momentum={busy:!1,pinch:null,panState:null,samples:[],inertiaRAF:null}),t.momentum}_currentXWindow(){const t=this.w;return t.axisFlags.isRangeBar?{min:t.globals.minY,max:t.globals.maxY}:{min:t.globals.minX,max:t.globals.maxX}}_gridRect(){const t=this.w.dom.baseEl,e=t&&t.querySelector(".apexcharts-grid");return e?e.getBoundingClientRect():null}_screenXToPlotPx(t){return S.screenXToPlotPx(this.w,t)}_clampBounds(){var t,e;const i=this.w;return i.axisFlags.isRangeBar?null:{min:null!=(t=i.globals.dataReducerRawMinX)?t:i.globals.initialMinX,max:null!=(e=i.globals.dataReducerRawMaxX)?e:i.globals.initialMaxX}}_applyXRange(t,e,i){const s=this.w;if(!s.globals.initialConfig)return!1;const n=this._currentXWindow(),a=i&&e-t>n.max-n.min,o=this._clampBounds();if(o){const i=e-t;t<o.min&&(e=(t=o.min)+i),e>o.max&&(t=(e=o.max)-i),t<o.min&&(t=o.min)}if(s.config.xaxis.convertedCatToNumeric&&(t=Math.floor(t),e=a?Math.ceil(e):Math.floor(e),t<1&&(t=1),o&&e>o.max&&(e=Math.floor(o.max)),e-t<2))return!1;if(!(e>t))return!1;const l={xaxis:{min:t,max:e}};return s.config.chart.group||(l.yaxis=p.clone(s.globals.initialConfig.yaxis)),i&&(s.interact.zoomed=!0),this.ctx.updateHelpers._updateOptions(l,!1,!1),{minX:t,maxX:e}}_cancelInertia(){const t=this._m();null!=t.inertiaRAF&&(cancelAnimationFrame(t.inertiaRAF),t.inertiaRAF=null)}_fireScrolled(){const t=this.w;if("function"!=typeof t.config.chart.events.scrolled)return;const{min:e,max:i}=this._currentXWindow(),s={xaxis:{min:e,max:i}};t.config.chart.events.scrolled(this.ctx,s),this.ctx.events.fireEvent("scrolled",s)}_pushSample(t,e){const i=this._m().samples;for(i.push({x:t,t:e});i.length>6;)i.shift()}momentumTouch(t){const e=this.w,i=this._m(),s=t.type;if("touchstart"===s){this._cancelInertia();const s=this._gridRect();if(!s)return;if(t.touches.length>=2&&this._pinchEnabled())t.preventDefault(),i.busy=!0,i.panState=null,this._beginPinch(t,s);else if(1===t.touches.length&&this._panInertiaEnabled()&&e.interact.panEnabled){i.busy=!0,i.pinch=null;const s=t.touches[0],n=this._currentXWindow(),a=e.layout.gridWidth||1;i.panState={startX:s.clientX,startY:s.clientY,axis:null,minX0:n.min,maxX0:n.max,ratio0:(n.max-n.min)/a},i.samples=[{x:s.clientX,t:t.timeStamp}]}return}"touchmove"!==s?(i.pinch?t.touches.length<2&&this._endPinch():i.panState&&0===t.touches.length&&this._endPan(),0===t.touches.length&&(e.interact.mousedown=!1,this.dragged=!1,null!=i.inertiaRAF||i.pinch||i.panState||(i.busy=!1))):i.pinch&&t.touches.length>=2?(t.preventDefault(),this._movePinch(t)):i.panState&&1===t.touches.length&&this._movePan(t)}_beginPinch(t,e){const i=this.w,s=t.touches[0],n=t.touches[1],a=Math.hypot(n.clientX-s.clientX,n.clientY-s.clientY)||1,o=(s.clientX+n.clientX)/2-e.left-i.globals.barPadForNumericAxis,{min:l,max:r}=this._currentXWindow();this._m().pinch={d0:a,cx0:o,minX0:l,maxX0:r,gridWidth:i.layout.gridWidth||1}}_movePinch(t){const e=this.w,i=this._m().pinch;if(!i)return;const s=this._gridRect();if(!s)return;const n=t.touches[0],a=t.touches[1],o=Math.hypot(a.clientX-n.clientX,a.clientY-n.clientY)||1,l=(n.clientX+a.clientX)/2-s.left-e.globals.barPadForNumericAxis,r=i.maxX0-i.minX0,c=r*(i.d0/o);let h=i.minX0+i.cx0/i.gridWidth*r-l/i.gridWidth*c,d=h+c;const u=this._clampBounds();if(u){const t=e.globals.minXDiff>0&&isFinite(e.globals.minXDiff)?e.globals.minXDiff:0,i=Math.max(2*t,1e-6*(u.max-u.min));if(d-h<i){const t=(h+d)/2;h=t-i/2,d=t+i/2}}this._applyXRange(h,d,!0)}_endPinch(){const t=this.w;this._m().pinch=null;const{min:e,max:i}=this._currentXWindow(),s={min:e,max:i},n=t.globals.initialConfig?p.clone(t.globals.initialConfig.yaxis):[],a=this.ctx.toolbar;a&&a.zoomCallback(s,n)}_movePan(t){const e=this._m(),i=e.panState,s=t.touches[0];if(!i.axis){const n=Math.abs(s.clientX-i.startX),a=Math.abs(s.clientY-i.startY);if(n<6&&a<6)return void this._pushSample(s.clientX,t.timeStamp);if(a>n)return e.busy=!1,void(e.panState=null);i.axis="x"}if("x"!==i.axis)return;t.preventDefault();const n=(s.clientX-i.startX)*i.ratio0;this._pushSample(s.clientX,t.timeStamp),this._applyXRange(i.minX0-n,i.maxX0-n,!1)}_endPan(){const t=this._m(),e=t.panState;t.panState=null;let i=0;const s=t.samples;if(s.length>=2){const t=s[0],e=s[s.length-1],n=e.t-t.t;n>0&&(i=(e.x-t.x)/n)}t.samples=[],e&&"x"===e.axis&&this._panInertiaEnabled()&&Math.abs(i)>.05?this._startInertia(i):(t.busy=!1,this._fireScrolled())}_startInertia(t){const e=this.w,i=this._m(),s=e.config.chart.pan&&e.config.chart.pan.friction,n="number"==typeof s?Math.min(Math.max(s,.5),.999):.92;let a=t,o=null;i.busy=!0;const l=t=>{if(e.globals.isDestroyed)return i.inertiaRAF=null,void(i.busy=!1);if(null==o)return o=t,void(i.inertiaRAF=requestAnimationFrame(l));const s=t-o;if(o=t,a*=Math.pow(n,s/16.6667),Math.abs(a)<.02)return i.inertiaRAF=null,i.busy=!1,void this._fireScrolled();const r=this._currentXWindow(),c=e.layout.gridWidth||1,h=(r.max-r.min)/c,d=a*s*h,u=this._applyXRange(r.min-d,r.max-d,!1),m=this._clampBounds();if(!u||m&&(d>0&&u.minX<=m.min+1e-6*(m.max-m.min)||d<0&&u.maxX>=m.max-1e-6*(m.max-m.min)))return i.inertiaRAF=null,i.busy=!1,void this._fireScrolled();i.inertiaRAF=requestAnimationFrame(l)};i.inertiaRAF=requestAnimationFrame(l)}}}),t.default=h,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ApexCharts v7.2.0
2
+ * ApexCharts v7.3.0
3
3
  * (c) 2018-2026 ApexCharts
4
4
  */
5
5
  "use strict";var t=Object.defineProperty,e=Object.defineProperties,i=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,l=(e,i,s)=>i in e?t(e,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[i]=s,a=(t,e)=>{for(var i in e||(e={}))n.call(e,i)&&l(t,i,e[i]);if(s)for(var i of s(e))r.call(e,i)&&l(t,i,e[i]);return t},o=(t,s)=>e(t,i(s)),c=(t,e,i)=>new Promise((s,n)=>{var r=t=>{try{a(i.next(t))}catch(t){n(t)}},l=t=>{try{a(i.throw(t))}catch(t){n(t)}},a=t=>t.done?s(t.value):Promise.resolve(t.value).then(r,l);a((i=i.apply(t,e)).next())});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function h(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const i in t)if("default"!==i){const s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const u=h(require("apexcharts/core")),d=u.__apex_Utils,p=u.__apex_Environment_Environment,f=u.__apex_BrowserAPIs_BrowserAPIs,m=u.__apex_Resize_addResizeListener,g=u.__apex_Resize_removeResizeListener;class y{constructor(t,e){this.w=t,this.ctx=e,this.kind="svg"}beginSeries(){}present(){return null}clear(){}group(t){return this.ctx.graphics.group(t)}drawPath(t){return this.ctx.graphics.drawPath(t)}drawLine(...t){return this.ctx.graphics.drawLine(...t)}drawRect(...t){return this.ctx.graphics.drawRect(...t)}drawCircle(t,e){return this.ctx.graphics.drawCircle(t,e)}drawText(t){return this.ctx.graphics.drawText(t)}renderPaths(t){return this.ctx.graphics.renderPaths(t)}drawMarker(t,e,i={}){return this.ctx.graphics.drawMarker(t,e,i)}supports(t){return!0}hitTest(){return null}restyle(){}toBitmap(){return null}destroy(){}}const x=["none","lighten","darken"];function v(t){const e=t.config.series||[],i=t.config.chart.type,s="scatter"===i||"bubble"===i,n=t.config.markers&&t.config.markers.size,r=Array.isArray(n)?n.some(t=>t>0):(n||0)>0,l=!(!t.config.dataLabels||!t.config.dataLabels.enabled),a="heatmap"===i;let o=0,c=0;e.forEach(t=>{const e=Array.isArray(t.data)?t.data.length:0;e>c&&(c=e),(s||r||a)&&(o+=e),l&&(o+=e)});return c>=5e4&&(o=Math.max(o,c)),o}function b(t){var e,i,s,n;const r=t.config.fill&&t.config.fill.type,l=t=>"pattern"===t||"image"===t||"gradient"===t;if(Array.isArray(r)?r.some(l):l(r))return!0;const a=null==(i=null==(e=t.config.plotOptions)?void 0:e.line)?void 0:i.colors;if(a&&a.colorAboveThreshold&&a.colorBelowThreshold)return!0;if("heatmap"===t.config.chart.type&&"rect"!==((null==(n=null==(s=t.config.plotOptions)?void 0:s.heatmap)?void 0:n.shape)||"rect"))return!0;const o=t.config.states||{},c=o.hover&&o.hover.filter&&o.hover.filter.type,h=o.active&&o.active.filter&&o.active.filter.type;return!(!c||x.includes(c))||!(!h||x.includes(h))}const _="__apexcharts_renderers__";function w(){const t=globalThis;return t[_]||(t[_]=new Map),t[_]}class A{static get _rendererRegistry(){return w()}static registerRenderer(t,e){w().set(t,e)}static unregisterRenderer(t){w().delete(t)}constructor(t,e){this.w=t,this.ctx=e,this.svg=new y(t,e),this.active=this.svg,this._activeKind="svg",this._instances={}}_desiredKind(){const t=this.w.config.chart,e=t.renderer||"svg";if(!p.isBrowser())return"svg";if("svg"===e)return"svg";if(b(this.w))return"svg";if("canvas"===e)return"canvas";return v(this.w)>=(t.rendererThreshold||8e3)?"canvas":"svg"}resolve(){const t=this.w.config.chart.renderer||"svg",e=this._desiredKind();if("svg"!==e){const t=w().get(e);if(t)return this._instances[e]||(this._instances[e]=t(this.w,this.ctx)),this.active=this._instances[e],this._activeKind=e,this.ctx.renderer=this.active,this.w.globals.activeRenderer=this.active,this._activeKind}else"canvas"===t&&b(this.w);return this.active=this.svg,this._activeKind="svg",this.ctx.renderer=this.active,this.w.globals.activeRenderer=this.active,this._activeKind}getActiveKind(){return this._activeKind}teardown(){for(const t in this._instances){const e=this._instances[t];e&&"function"==typeof e.destroy&&e.destroy()}this._instances={},this.active=this.svg,this._activeKind="svg"}}function E(t){if(!Array.isArray(t)||0===t.length)return"empty";for(let e=0;e<t.length;e++){const i=t[e];if(null!=i)return Array.isArray(i)?"paired":"object"==typeof i?"object":"plain"}return"empty"}function M(t,e){if(null!=t){if("paired"===e){const e=t[0];return e instanceof Date?e.getTime():e}if("object"===e){const e=t.x;return e instanceof Date?e.getTime():e}}}function S(t,e){return"paired"===e?[t,null]:"object"===e?{x:t,y:null}:null}function k(t,e,i){const s="function"==typeof i?i(t,e):t?t[i]:void 0;return null==s||""===s?null:String(s)}function L(t,e){if(!e||"first-seen"===e)return t.slice();if("asc"===e||"desc"===e){const i=t.slice().sort((t,e)=>{const i=Number(t),s=Number(e);return isFinite(i)&&isFinite(s)?i-s:t<e?-1:t>e?1:0});return"desc"===e?i.reverse():i}if(Array.isArray(e)){const i=e.map(String).filter(e=>-1!==t.indexOf(e)),s=t.filter(t=>-1===i.indexOf(t));return i.concat(s)}return"function"==typeof e?t.slice().sort(e):t.slice()}function C(t,e){const i=[],s=new Set;let n=!1,r=!1,l=0,a="plain";t.forEach(t=>{const e=E(t&&t.data);if("empty"!==e){if("plain"===e)return r=!0,void(l=Math.max(l,t.data.length));n=!0,a=e,t.data.forEach(t=>{const n=M(t,e);if(void 0===n)return;const r=typeof n+":"+String(n);s.has(r)||(s.add(r),i.push(n))})}}),n&&r&&e.push("trellis: mixing x-keyed data ([x,y] / {x,y}) with plain value arrays; plain series are padded by position, not by x");const o=n&&i.every(t=>"number"==typeof t&&isFinite(t));return o&&i.sort((t,e)=>Number(t)-Number(e)),{unionX:i,sawKeyed:n,plainMaxLen:l,xForm:a,xIsNumeric:o}}function F(t,e){const i=[],s=new Set;let n=0;return{align:r=>{const l=E(r&&r.data),c=r&&null!=r.name?String(r.name):`series-${n+1}`;n++,s.has(c)||(s.add(c),i.push(c));const h=o(a({},r),{name:c});if("plain"===l||"empty"===l){const e=t.sawKeyed?t.unionX.length:t.plainMaxLen,i=Array.isArray(r.data)?r.data.slice(0,e):[];for(;i.length<e;)i.push(null);return h.data=i,h}const u=new Map;return r.data.forEach(t=>{const i=M(t,l);void 0===i||u.has(i)?void 0!==i&&u.has(i)&&e.push(`trellis: duplicate x "${String(i)}" in series "${c}"; keeping the first`):u.set(i,t)}),h.data=t.unionX.map(t=>u.has(t)?u.get(t):S(t,l)),h},seriesNames:i}}function N(t,e={}){const i=t.xForm,s={bar:0,column:0,rangeBar:[0,0],candlestick:[0,0,0,0],boxPlot:[0,0,0,0,0]},n=e.chartType&&e.chartType in s?s[e.chartType]:null,r="plain"===i?t.unionX.map(()=>n):t.unionX.map(t=>{if(null===n)return S(t,i);const e=Array.isArray(n)?n.slice():n;return"object"===i?{x:t,y:e}:[t,e]});return{name:e.name||t.seriesNames[0]||"series-1",data:r}}function O(t,e={}){const i=[],s=Array.isArray(t)?t:[];if(e.row||e.column)return e.by&&i.push("trellis: `by` is ignored when `row`/`column` are set (they are mutually exclusive)"),function(t,e,i){const s=e.row,n=e.column,r=new Map,l=new Map,a=new Map,o=[],c=[],h=[],u=(t,e)=>{-1===t.indexOf(e)&&t.push(e)};if(t.forEach((t,e)=>{var i,d;const p=s?k(t,e,s):"",f=n?k(t,e,n):"";if(null===p&&null===f)return void o.push(t);if(null===p)return u(h,f),a.has(f)||a.set(f,[]),void(null==(i=a.get(f))||i.push(t));if(null===f)return u(c,p),l.has(p)||l.set(p,[]),void(null==(d=l.get(p))||d.push(t));u(c,p),u(h,f);let m=r.get(p);m||(m=new Map,r.set(p,m));let g=m.get(f);g||(g=[],m.set(f,g)),g.push(t)}),!c.length&&!h.length)return W(["trellis: no series carries the row/column facet keys; nothing to split"]);"number"==typeof e.limit&&e.limit>0&&i.push("trellis: `limit` is not applied to a 2-D grid; ignoring it");const d=L(c.length?c:[""],e.order),p=L(h.length?h:[""],e.order),f=C(t,i),{align:m,seriesNames:g}=F(f,i),y=[];return d.forEach(t=>{p.forEach(e=>{var i;const s=((null==(i=r.get(t))?void 0:i.get(e))||[]).concat(l.get(t)||[]).concat(a.get(e)||[]).concat(o).map(m);y.push({key:[t,e].filter(t=>""!==t).join(" / ")||"all",rowKey:t,colKey:e,series:s,seriesNames:s.map(t=>t.name),empty:0===s.length})})}),{mode:"2d",panels:y,rowKeys:d,colKeys:p,seriesNames:g,xForm:f.sawKeyed?f.xForm:"plain",unionX:f.sawKeyed?f.unionX:Array.from({length:f.plainMaxLen},(t,e)=>e),xIsNumeric:f.xIsNumeric,dropped:0,warnings:i}}(s,e,i);const n=e.by||"facet",r=new Map,l=[];if(s.forEach((t,e)=>{const i=k(t,e,n);if(null===i)l.push(t);else{r.has(i)||r.set(i,[]);const e=r.get(i);e&&e.push(t)}}),0===r.size)return W(["trellis: no series carries the facet key; nothing to split"]);let a=L(Array.from(r.keys()),e.order),o=0;"number"==typeof e.limit&&e.limit>0&&a.length>e.limit&&(o=a.length-e.limit,a=a.slice(0,e.limit));const c=C(a.reduce((t,e)=>t.concat(r.get(e)||[]),[]).concat(l),i),{align:h,seriesNames:u}=F(c,i);return{mode:"1d",panels:a.map(t=>{const e=(r.get(t)||[]).map(h),i=l.map(h),s=e.concat(i);return{key:t,rowKey:null,colKey:null,series:s,seriesNames:s.map(t=>t.name),empty:0===s.length}}),rowKeys:null,colKeys:null,seriesNames:u,xForm:c.sawKeyed?c.xForm:"plain",unionX:c.sawKeyed?c.unionX:Array.from({length:c.plainMaxLen},(t,e)=>e),xIsNumeric:c.xIsNumeric,dropped:o,warnings:i}}function W(t){return{mode:"1d",panels:[],rowKeys:null,colKeys:null,seriesNames:[],xForm:"plain",unionX:[],xIsNumeric:!1,dropped:0,warnings:t}}function P(t,e){const i=t.length;if(0===i)return NaN;if(1===i)return t[0];const s=(i-1)*e,n=Math.floor(s),r=Math.ceil(s);return n===r?t[n]:t[n]+(t[r]-t[n])*(s-n)}function z(t){const e=t.length;if(e<2)return 0;let i=0;for(let s=0;s<e;s++)i+=t[s];const s=i/e;let n=0;for(let i=0;i<e;i++){const e=t[i]-s;n+=e*e}return Math.sqrt(n/e)}function $(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const i=t.slice().sort((t,e)=>t-e);let s=i[0],n=i[i.length-1];const r=e.range;if(Array.isArray(r)&&2===r.length){const t=Number(r[0]),e=Number(r[1]);isFinite(t)&&isFinite(e)&&e>t&&(s=t,n=e)}if(!(n>s)){const t=Math.abs(s)>0?.05*Math.abs(s):.5;return{edges:[s-t,s+t],binWidth:2*t,rule:"single",capped:!1}}const l=n-s;let a,o;if("number"==typeof e.binWidth&&e.binWidth>0)a=e.binWidth,o="binWidth";else if("number"==typeof e.bins&&e.bins>=1)a=l/Math.floor(e.bins),o="count";else{const t=function(t,e,i){const s=t.length,n=t=>e/Math.max(1,Math.ceil(t));switch(i){case"sqrt":return{width:n(Math.sqrt(s)),rule:"sqrt"};case"rice":return{width:n(2*Math.cbrt(s)),rule:"rice"};case"scott":{const e=z(t);return e>0?{width:3.49*e*Math.pow(s,-1/3),rule:"scott"}:{width:n(Math.log2(s)+1),rule:"sturges"}}case"fd":{const e=P(t,.75)-P(t,.25);return e>0?{width:2*e*Math.pow(s,-1/3),rule:"fd"}:{width:n(Math.log2(s)+1),rule:"sturges"}}case"auto":{const e=n(Math.log2(s)+1),i=P(t,.75)-P(t,.25);if(i<=0)return{width:e,rule:"sturges"};const r=2*i*Math.pow(s,-1/3);return r<e?{width:r,rule:"fd"}:{width:e,rule:"sturges"}}default:return{width:n(Math.log2(s)+1),rule:"sturges"}}}(i,l,"string"==typeof e.bins?e.bins:"auto");a=t.width,o=t.rule}(!isFinite(a)||a<=0)&&(a=l);let c=Math.ceil(l/a);(!isFinite(c)||c<1)&&(c=1);let h=!1;c>1e3&&(c=1e3,a=l/c,h=!0),a=l/c;const u=new Array(c+1);for(let t=0;t<=c;t++)u[t]=s+t*a;return u[c]=Math.max(u[c],n),{edges:u,binWidth:a,rule:o,capped:h}}function B(t,e){const i=e.length-1;if(!(t>=e[0])||t>e[i])return-1;if(t===e[i])return i-1;const s=(e[i]-e[0])/i;if(s>0){let n=Math.floor((t-e[0])/s);return n<0&&(n=0),n>i-1&&(n=i-1),t<e[n]?n--:t>=e[n+1]&&n++,n<0||n>i-1?-1:n}let n=0,r=i-1;for(;n<=r;){const i=n+r>>1;if(t<e[i])r=i-1;else{if(!(t>=e[i+1]))return i;n=i+1}}return-1}const H=["heatmap","pie","donut","polarArea","radialBar"],T=["pie","donut","polarArea"];function I(t){const e=[];if(!Array.isArray(t))return e;for(let i=0;i<t.length;i++){const s=t[i];let n=s;Array.isArray(s)?n=1===s.length?s[0]:s[1]:s&&"object"==typeof s&&(n=void 0!==s.y?s.y:s.x);const r=Number(n);null!=n&&isFinite(r)&&e.push(r)}return e}function R(t,e,i,s){var n,r,l,a,o,c;const h={plotOptions:null,yExtentOverride:null,skipYaxisPush:H.includes(s),forceSharedY:!1,pieScaleOf:null,warnings:[]},u=t.panels,d=(null==i?void 0:i.plotOptions)||{};if("histogram"===s){const t=d.histogram||{};let i=[];const s=u.map(t=>t.series.map(t=>{const e=I(t.data);return i=i.concat(e),e})),r=$(i,{bins:t.bins,binWidth:t.binWidth,range:t.range});if(r&&r.edges.length>1){const i=r.edges;h.plotOptions={histogram:{range:[i[0],i[i.length-1]],binWidth:r.binWidth}};let l=0;s.forEach(e=>e.forEach(e=>{if(!e.length)return;const s=function(t,e={}){let i=t.slice();if(e.cumulative){let t=0;i=i.map(e=>t+=e)}const s=t.reduce((t,e)=>t+e,0);if(s<=0)return i;if("relative"===e.normalize)return i.map(t=>t/s*100);if("density"===e.normalize){const t=e.binWidth;if("number"==typeof t&&t>0)return i.map(e=>e/(s*t))}return i}(function(t,e){const i=new Array(Math.max(0,e.length-1)).fill(0);for(let s=0;s<t.length;s++){const n=B(t[s],e);n>=0&&i[n]++}return i}(e,i),{normalize:t.normalize,cumulative:t.cumulative,binWidth:r.binWidth});s.forEach(t=>{isFinite(t)&&t>l&&(l=t)})})),l>0&&(h.yExtentOverride={min:0,max:l});const a=(null==(n=e.scales)?void 0:n.y)||"shared";"independent-row"!==a&&"independent-column"!==a||(h.forceSharedY=!0,h.warnings.push("histogram trellis: group y scales would re-derive counts per group; using scales.y 'shared' (use 'independent' for per-panel count scales)."))}}if("violin"===s){const t=(null==(r=d.violin)?void 0:r.kde)||{};if(!("number"==typeof t.bandwidth&&t.bandwidth>0)){let t=[];u.forEach(e=>e.series.forEach(e=>{t=t.concat(function(t){const e=[];return Array.isArray(t)?(t.forEach(t=>{const i=t&&"object"==typeof t?t.y:null;Array.isArray(i)&&i.forEach(t=>{const i=Number(t);null!=t&&isFinite(i)&&e.push(i)})}),e):e}(e.data))}));const e=t.length?function(t,e={}){if(!Array.isArray(t)||0===t.length)return null;const i=t.slice().sort((t,e)=>t-e),s=i.length;let n=e.bandwidth;if(!("number"==typeof n&&n>0)){const t=z(i),e=P(i,.75)-P(i,.25);n=.9*(e>0?Math.min(t,e/1.349):t)*Math.pow(s,-.2)}if(!isFinite(n)||n<=0){const t=i[0],e=Math.abs(t)>0?.001*Math.abs(t):.001;return{density:[[t-e,0],[t,1],[t+e,0]],bandwidth:e}}const r=Math.max(8,Math.floor(e.resolution||64)),l=i[0]-2*n,a=(i[s-1]+2*n-l)/(r-1),o=1/(s*n*Math.sqrt(2*Math.PI)),c=[];for(let t=0;t<r;t++){const e=l+t*a;let r=0;for(let t=0;t<s;t++){const s=(e-i[t])/n;r+=Math.exp(-.5*s*s)}c.push([e,r*o])}return{density:c,bandwidth:n}}(t,{resolution:8}):null;e&&isFinite(e.bandwidth)&&e.bandwidth>0&&(h.plotOptions={violin:{kde:{bandwidth:e.bandwidth}}})}}if("heatmap"===s){"independent"===(null==(l=e.scales)?void 0:l.color)&&h.warnings.push("a heatmap trellis must share its color scale (the same color meaning different values per panel is a silent lie); ignoring scales.color 'independent'.");const t=null==(o=null==(a=d.heatmap)?void 0:a.colorScale)?void 0:o.ranges;if(!(Array.isArray(t)&&t.length>0)){let t=1/0,e=-1/0;u.forEach(i=>i.series.forEach(i=>{I(i.data).forEach(i=>{i<t&&(t=i),i>e&&(e=i)})})),isFinite(t)&&isFinite(e)&&(h.plotOptions={heatmap:{colorScale:{min:t,max:e}}})}}if("bubble"===s){"independent"===(null==(c=e.scales)?void 0:c.size)&&h.warnings.push("a bubble trellis must share its size scale; ignoring scales.size 'independent'.");let t=1/0,i=-1/0;u.forEach(e=>e.series.forEach(e=>{(function(t){const e=[];return Array.isArray(t)?(t.forEach(t=>{let i=null;Array.isArray(t)&&t.length>2?i=t[2]:t&&"object"==typeof t&&(i=t.z);const s=Number(i);null!=i&&isFinite(s)&&e.push(s)}),e):e})(e.data).forEach(e=>{e<t&&(t=e),e>i&&(i=e)})})),isFinite(t)&&isFinite(i)&&(h.plotOptions={bubble:{minZ:t,maxZ:i}})}if(T.includes(s)&&e.radiusByTotal){const t=new Map;let e=0;u.forEach(i=>{let s=0;i.series.forEach(t=>{I(t.data).forEach(t=>{s+=Math.abs(t)})}),t.set(i.key,s),s>e&&(e=s)}),e>0&&(h.pieScaleOf=i=>{const s=t.get(i);return"number"!=typeof s||s<=0?null:Math.sqrt(s/e)})}return h}const K=u.__apex_ThemePalettes_getThemePalettes;function X(t,e,i=3){if(!isFinite(t)||!isFinite(e))return{min:0,max:1,tickAmount:1};if(t===e){const i=0===t?1:.1*Math.abs(t);t-=i,e+=i}const s=Math.max(1,i),n=(e-t)/s,r=Math.pow(10,Math.floor(Math.log10(n)));let l={dist:1/0,ticks:0,min:0,max:1};return(r>=10?[1,2,2.5,5,10]:[1,2,5,10]).forEach(i=>{const n=i*r,a=Math.floor(t/n)*n,o=Math.ceil(e/n)*n,c=Math.max(1,Math.round((o-a)/n)),h=Math.abs(c-s);(h<l.dist||h===l.dist&&c<l.ticks)&&(l={dist:h,ticks:c,min:a,max:o})}),{min:l.min,max:l.max,tickAmount:l.ticks}}function j(t,e,i){if(null==t)return;let s=t;if("paired"===e?s=t[1]:"object"===e&&(s=t.y),null==s)return;if(Array.isArray(s)){for(let t=0;t<s.length;t++){const e=Number(s[t]);isFinite(e)&&(e<i.min&&(i.min=e),e>i.max&&(i.max=e))}return}const n=Number(s);isFinite(n)&&(n<i.min&&(i.min=n),n>i.max&&(i.max=n))}function D(t){if("number"!=typeof t||!isFinite(t)||t%1==0)return 0;const e=String(t);return-1!==e.indexOf("e")||-1!==e.indexOf("E")?4:Math.min(4,(e.split(".")[1]||"").length)}function Y(t,e){const i={min:1/0,max:-1/0};return t.forEach(t=>t.series.forEach(t=>{Array.isArray(t.data)&&t.data.forEach(t=>j(t,e,i))})),isFinite(i.min)&&isFinite(i.max)?i:null}function q(t,e={},i={}){const s=e.scales||{},n=s.x||"shared",r=s.y||"shared";let l=null;if("shared"===n&&t.xIsNumeric&&t.unionX.length){const e=t.unionX;l={min:e[0],max:e[e.length-1]}}const a=["bar","column","histogram"].includes(i.chartType||""),o=t=>t?(a&&t.min>0&&(t.min=0),X(t.min,t.max,e.targetTicks||3)):null;let c=null;"shared"===r&&(c=o(i.yExtentOverride||Y(t.panels,t.xForm)));let h=null;if("independent-row"===r){h=new Map;const e=new Map;t.panels.forEach(t=>{var i;const s=null!=(i=t.rowKey)?i:"";e.has(s)||e.set(s,[]),e.get(s).push(t)}),e.forEach((e,i)=>{const s=o(Y(e,t.xForm));s&&(null==h||h.set(i,s))})}let u=null;if("independent-column"===r){u=new Map;const e=new Map;t.panels.forEach(t=>{var i;const s=null!=(i=t.colKey)?i:"";e.has(s)||e.set(s,[]),e.get(s).push(t)}),e.forEach((e,i)=>{const s=o(Y(e,t.xForm));s&&(null==u||u.set(i,s))})}const d=K().palette1,p=Array.isArray(i.userColors)?i.userColors.filter(t=>"string"==typeof t):[],f=p.length?p:d,m=t.seriesNames;return{x:l,y:c,rowY:h,colY:u,colorOf:t=>{const e=m.indexOf(t);return f[(-1===e?0:e)%f.length]},palette:f}}function G({panelCount:t,containerWidth:e,cfg:i,hostHeight:s}){var n,r;const l=null!=(n=i.gap)?n:12,a=function(t,e,i={}){var s,n;const r=null!=(s=i.gap)?s:12;if("number"==typeof i.columns&&i.columns>0)return Math.max(1,Math.min(Math.floor(i.columns),e));const l=null!=(n=i.minPanelWidth)?n:220,a=Math.floor((t+r)/(l+r));return Math.max(1,Math.min(a,e))}(e,t,i),o=Math.max(1,Math.ceil(t/a)),c=!i.header||!1!==i.header.show?22:0,h=Math.max(0,(e-l*(a-1))/a);let u;u="number"==typeof i.panelHeight&&i.panelHeight>0?i.panelHeight:"number"==typeof s&&s>0?(s-o*c-l*(o-1))/o:h/(null!=(r=i.aspectRatio)?r:1.6),u=Math.max(80,Math.round(u));const d=i.axes&&i.axes.labels||"edges",p=i.scales||{},f=1===a,m=Array.from({length:t},(e,i)=>{const s=Math.floor(i/a),n=i%a;let r,l;return"none"===d?(r=!1,l=!1):"all"===d||f?(r=!0,l=!0):(r="independent"===p.x||s===function(t,e,i,s){return t<e-(s-1)*i?s-1:s-2}(n,t,a,o),l="independent"===p.y||"independent-column"===p.y||0===n),{i:i,r:s,c:n,showXLabels:r,showYLabels:l}});return{cols:a,rows:o,panelW:h,panelH:u,headerH:c,gap:l,cells:m}}const V=u.__apex_Series,U=["#cf4d3f","#8f9499","#26a75b"],Z=(t,e,i)=>t+(e-t)*i;function J(t){return Math.max(0,Math.min(255,Math.round(t))).toString(16).padStart(2,"0")}function Q(t,e,i){const s=d.parseHex(tt(t)),n=d.parseHex(tt(e));return s&&n?"#"+J(Z(s[0],n[0],i))+J(Z(s[1],n[1],i))+J(Z(s[2],n[2],i)):t}function tt(t){if("string"!=typeof t)return"#000000";if(d.isColorHex(t))return t;return d.rgb2hex(t)||"#000000"}function et(t,e,i,s){var n,r,l;if(!e||"object"!=typeof e)return null;const a=null==(l=null==(r=null==(n=t.config.plotOptions)?void 0:n.treemap)?void 0:r.colorScale)?void 0:l.colorValue;let o;if(o="function"==typeof a?a(e,{seriesIndex:i,dataPointIndex:s,w:t}):"string"==typeof a?e[a]:e.colorValue,null==o)return null;const c=Number(o);return Number.isFinite(c)?c:null}function it(t){var e,i,s;const n=null==(s=null==(i=null==(e=t.config)?void 0:e.plotOptions)?void 0:i.treemap)?void 0:s.colorScale,r=n&&n.gradient;if(!r)return null;if(!1===r.enabled)return null;const l=t.config.series||[];let a=1/0,o=-1/0,c=!1;for(let e=0;e<l.length;e++){const i=l[e]&&l[e].data;if(Array.isArray(i))for(let s=0;s<i.length;s++){const n=et(t,i[s],e,s);null!=n&&(c=!0,n<a&&(a=n),n>o&&(o=n))}}if(!c&&!0!==r.enabled)return null;Number.isFinite(a)||(a=0,o=0);let h=Number.isFinite(Number(r.min))?Number(r.min):a,u=Number.isFinite(Number(r.max))?Number(r.max):o,d=null;if(null===r.midpoint?d=null:Number.isFinite(Number(r.midpoint))?d=Number(r.midpoint):h<0&&u>0&&(d=0),null!=d&&!1!==r.symmetric&&!Number.isFinite(Number(r.min))&&!Number.isFinite(Number(r.max))){const t=Math.max(Math.abs(h-d),Math.abs(u-d));h=d-t,u=d+t}u===h&&(h-=.5,u+=.5);const p=function(t,e,i,s){if(Array.isArray(t.stops)&&t.stops.length>=2)return t.stops.filter(t=>t&&Number.isFinite(Number(t.value))).map(t=>({value:Number(t.value),color:tt(t.color)})).sort((t,e)=>t.value-e.value);const n=(Array.isArray(t.colors)&&t.colors.length>=2?t.colors:U).map(tt),r=n.length;if(null!=s&&r>=3){const t=Math.floor((r-1)/2),l=[];for(let i=0;i<=t;i++)l.push({value:Z(e,s,i/t),color:n[i]});for(let e=t+1;e<r;e++)l.push({value:Z(s,i,(e-t)/(r-1-t)),color:n[e]});return l}return n.map((t,s)=>({value:Z(e,i,s/(r-1)),color:t}))}(r,h,u,d);if(p.length<2)return null;const f=u-h,m=p.map(t=>({percent:0===f?0:(t.value-h)/f,color:t.color}));return{min:h,max:u,midpoint:d,stops:p,at:t=>{if(!Number.isFinite(t))return p[Math.floor(p.length/2)].color;if(t<=p[0].value)return p[0].color;const e=p[p.length-1];if(t>=e.value)return e.color;for(let e=1;e<p.length;e++){const i=p[e];if(t<=i.value){const s=p[e-1],n=i.value-s.value,r=0===n?0:(t-s.value)/n;return Q(s.color,i.color,r)}}return e.color},legendStops:m}}const st="http://www.w3.org/2000/svg";class nt{constructor(t,e){this.w=t,this.ctx=e,this.svgEl=null,this.arrowEl=null,this.hoverValueEl=null,this._min=0,this._max=0,this._geom=null,this._bandHitEls=[],this._activeBandIndex=-1,this._targetEl=null,this._onCellEnter=this._onCellEnter.bind(this),this._onCellLeave=this._onCellLeave.bind(this),this._onBandEnter=this._onBandEnter.bind(this),this._onBandLeave=this._onBandLeave.bind(this)}_getFormatter(){const t=this._cfg();return"function"==typeof t.formatter?t.formatter:t=>{if(!Number.isFinite(t))return String(t);const e=Math.abs(t);return e>=1e3?t.toFixed(0):e>=10?t.toFixed(1):t.toFixed(2)}}static colorScaleOf(t){var e,i,s,n,r;const l=null==(i=null==(e=null==t?void 0:t.config)?void 0:e.chart)?void 0:i.type;return l&&(null==(r=null==(n=null==(s=null==t?void 0:t.config)?void 0:s.plotOptions)?void 0:n[l])?void 0:r.colorScale)||null}static configFor(t){const e=nt.colorScaleOf(t);return e&&e.gradientLegend||null}_cfg(){return nt.configFor(this.w)||{}}static isEnabled(t){if(!nt.supports(t))return!1;const e=nt.configFor(t);return!(!e||!e.enabled)}static supports(t){var e,i;const s=null==(i=null==(e=null==t?void 0:t.config)?void 0:e.chart)?void 0:i.type;return"heatmap"===s||"treemap"===s}draw(t=null){var e,i,s,n,r,l,a,o;const c=this.w;this._targetEl=t;const h=t||c.dom.elLegendWrap;if(!h)return;const u=this._cfg(),d=c.config.legend.position,p="left"===d||"right"===d,m=null!=(i=null==(e=u.arrow)?void 0:e.size)?i:8,g=m+4,y=u.showLabels?28:4,x=u.showLabels?20:4,v=u.showLabels?44:0,b=this._resolveStripLength(p?u.height:u.width,p),_=u.thickness,w=p?Math.max(_+g+4,v):b+2*y,A=p?b+2*x:_+g+4,E=(w-(_+g))/2,M=p?"left"===d?E:E+g:y,S=p?x:"top"===d?g:4,k=f.createElementNS(st,"svg");k.setAttribute("class","apexcharts-heatmap-gradient-legend apexcharts-gradient-legend"),k.setAttribute("width",String(w)),k.setAttribute("height",String(A)),k.setAttribute("overflow","visible");const L=f.createElementNS(st,"defs"),C=`apexcharts-heatmap-gradient-${c.globals.cuid}`,F=f.createElementNS(st,"linearGradient");F.setAttribute("id",C),p?(F.setAttribute("x1","0"),F.setAttribute("y1","1"),F.setAttribute("x2","0"),F.setAttribute("y2","0")):(F.setAttribute("x1","0"),F.setAttribute("y1","0"),F.setAttribute("x2","1"),F.setAttribute("y2","0"));const{min:N,max:O,stops:W,bands:P}=this._computeStops();this._min=N,this._max=O,W.forEach(t=>{const e=f.createElementNS(st,"stop");e.setAttribute("offset",`${(100*t.percent).toFixed(2)}%`),e.setAttribute("stop-color",t.color),F.appendChild(e)}),L.appendChild(F),k.appendChild(L);const z=f.createElementNS(st,"rect");if(z.setAttribute("x",String(M)),z.setAttribute("y",String(S)),z.setAttribute("width",String(p?_:b)),z.setAttribute("height",String(p?b:_)),z.setAttribute("rx","2"),z.setAttribute("fill",`url(#${C})`),k.appendChild(z),u.showLabels){const t=(null==(s=u.labelStyle)?void 0:s.colors)||(Array.isArray(c.config.legend.labels.colors)?c.config.legend.labels.colors[0]:c.config.legend.labels.colors)||c.config.chart.foreColor,e=(null==(n=u.labelStyle)?void 0:n.fontSize)||"11px",i=(null==(r=u.labelStyle)?void 0:r.fontFamily)||c.config.chart.fontFamily,l=this._getFormatter(),a=(s,n,r,l)=>{const a=f.createElementNS(st,"text");return a.setAttribute("x",String(n)),a.setAttribute("y",String(r)),a.setAttribute("text-anchor",l),a.setAttribute("dominant-baseline","middle"),a.setAttribute("fill",t),a.setAttribute("font-size",e),i&&a.setAttribute("font-family",i),a.textContent=String(s),a};if(p){const t=M+_/2;k.appendChild(a(l(N),t,S+b+10,"middle")),k.appendChild(a(l(O),t,S-10,"middle"))}else{const t=S+_/2;k.appendChild(a(l(N),M-6,t,"end")),k.appendChild(a(l(O),M+b+6,t,"start"))}}const $=(null==(l=u.arrow)?void 0:l.color)||c.config.chart.foreColor,B=this._buildArrow(m,$,d);if(k.appendChild(B),this.arrowEl=B,this._bandHitEls=[],c.config.legend.onItemHover.highlightDataSeries&&P.length>0&&P.forEach(t=>{const e=f.createElementNS(st,"rect");if(p){const i=S+b-t.p2*b,s=S+b-t.p1*b;e.setAttribute("x",String(M)),e.setAttribute("y",String(i)),e.setAttribute("width",String(_)),e.setAttribute("height",String(Math.max(0,s-i)))}else e.setAttribute("x",String(M+t.p1*b)),e.setAttribute("y",String(S)),e.setAttribute("width",String(Math.max(0,(t.p2-t.p1)*b))),e.setAttribute("height",String(_));e.setAttribute("fill","transparent"),e.setAttribute("class","apexcharts-heatmap-gradient-band"),e.setAttribute("data:range-index",String(t.index)),e.style.cursor="pointer",k.appendChild(e),this._bandHitEls.push(e)}),this._geom={isVertical:p,position:d,stripX:M,stripY:S,stripLength:b,stripThickness:_,arrowSize:m,svgWidth:w,svgHeight:A},u.showHoverValue){const t=f.createElement("div");t.classList.add("apexcharts-heatmap-gradient-legend-value"),t.style.position="absolute",t.style.fontSize=(null==(a=u.labelStyle)?void 0:a.fontSize)||"11px",t.style.fontFamily=(null==(o=u.labelStyle)?void 0:o.fontFamily)||c.config.chart.fontFamily||"",t.style.color=c.config.chart.foreColor,t.style.background="rgba(0,0,0,0.65)",t.style.color="#fff",t.style.padding="2px 6px",t.style.borderRadius="3px",t.style.pointerEvents="none",t.style.whiteSpace="nowrap",t.style.opacity="0",t.style.transition="opacity 120ms ease",this.hoverValueEl=t}h.classList.add("apexcharts-heatmap-gradient-legend-wrap"),h.classList.add("apx-legend-position-"+d),h.appendChild(k),this.hoverValueEl&&h.appendChild(this.hoverValueEl),this.svgEl=k,t?(h.style.width=w+"px",h.style.height=A+"px",h.style.position="relative",h.style.overflow="visible"):this._applyWrapAlignment(h,d,p,w,A),this._attachHoverListeners(),this._attachBandHoverListeners()}_resolveStripLength(t,e){const i=this.w,s=e?i.globals.svgHeight||i.config.chart.height||300:i.globals.svgWidth||i.config.chart.width||600;if("string"==typeof t){const e=t.trim();if(e.endsWith("%")){const t=parseFloat(e)||0;return Math.max(20,s*t/100)}const i=parseFloat(e);return Number.isFinite(i)?i:200}return"number"==typeof t&&Number.isFinite(t)?t:200}_applyWrapAlignment(t,e,i,s,n){const r=this.w,l=this._cfg().align||"center",a=12,o=r.globals.svgWidth||r.config.chart.width||600,c=r.globals.svgHeight||r.config.chart.height||300,h=r.config.legend.offsetX||0,u=r.config.legend.offsetY||0;if(t.style.position="absolute",t.style.display="block",t.style.overflow="visible",t.style.padding="0",t.style.width=s+"px",t.style.height=n+"px",t.style.right="auto",t.style.bottom="auto",i){const i=c-n-24;let r;r="start"===l?a:"end"===l?a+Math.max(0,i):a+Math.max(0,i)/2,t.style.top=r+u+"px",t.style.left="left"===e?a+h+"px":o-s-a+h+"px"}else{const i=o-s-24;let r;r="start"===l?a:"end"===l?a+Math.max(0,i):a+Math.max(0,i)/2,t.style.left=r+h+"px",t.style.top="top"===e?a+u+"px":c-n-a+u+"px"}}repositionToPlot(){var t,e;if(!p.isBrowser())return;if(this._targetEl)return;const i=this.w,s=i.globals,n=i.dom.elLegendWrap;if(!n||!this._geom)return;if(!Number.isFinite(s.gridWidth)||!Number.isFinite(s.gridHeight))return;const{isVertical:r,position:l,svgWidth:a,svgHeight:o,stripX:c,stripY:h,stripThickness:u}=this._geom,d=this._cfg().align||"center",m=i.config.legend.offsetX||0,g=i.config.legend.offsetY||0,y=null==(e=null==(t=this.ctx)?void 0:t.dimensions)?void 0:e.dimHelpers,x=y?y.getTitleSubtitleCoords("title").height+y.getTitleSubtitleCoords("subtitle").height:0,v=i.layout.xAxisHeight||0,b=(t,e)=>{const i=Math.max(0,t-e);return"start"===d?0:"end"===d?i:i/2};if(r){n.style.top=s.translateY+b(s.gridHeight,o)+g+"px";const t=(("left"===l?0:s.translateX+s.gridWidth)+("left"===l?s.translateX:s.svgWidth))/2;n.style.left=t-c-u/2+m+"px"}else{n.style.left=s.translateX+b(s.gridWidth,a)+m+"px";const t=(("top"===l?x:s.translateY+s.gridHeight+v)+("top"===l?s.translateY:s.svgHeight))/2;n.style.top=t-h-u/2+g+"px"}f.requestAnimationFrame(()=>this._enforceMinPlotGap())}_enforceMinPlotGap(){const t=this.w,e=t.dom.elLegendWrap,i=this.svgEl&&this.svgEl.querySelector("rect"),s=t.dom.baseEl.querySelector(".apexcharts-grid");if(!(e&&i&&s&&this._geom))return;const n=i.getBoundingClientRect(),r=s.getBoundingClientRect();if(!(n.width&&n.height&&r.width&&r.height))return;const{isVertical:l,position:a}=this._geom;if(l){const t="left"===a?r.left-n.right:n.left-r.right;if(t<16){const i=parseFloat(e.style.left)||0,s=16-t;e.style.left=i+("left"===a?-s:s)+"px"}}else{const t="top"===a?r.top-n.bottom:n.top-r.bottom;if(t<16){const i=parseFloat(e.style.top)||0,s=16-t;e.style.top=i+("top"===a?-s:s)+"px"}}}destroy(){var t,e,i,s,n,r,l;for(let i=0;i<this._bandHitEls.length;i++){const s=this._bandHitEls[i];null==(t=s.removeEventListener)||t.call(s,"mousemove",this._onBandEnter),null==(e=s.removeEventListener)||e.call(s,"mouseout",this._onBandLeave)}if(this._bandHitEls=[],this._activeBandIndex=-1,null==(i=this.ctx)?void 0:i.events)try{null==(n=(s=this.ctx.events).removeEventListener)||n.call(s,"dataPointMouseEnter",this._onCellEnter),null==(l=(r=this.ctx.events).removeEventListener)||l.call(r,"dataPointMouseLeave",this._onCellLeave)}catch(t){}}_attachBandHoverListeners(){if(p.isBrowser())for(let t=0;t<this._bandHitEls.length;t++){const e=this._bandHitEls[t];e.addEventListener("mousemove",this._onBandEnter),e.addEventListener("mouseout",this._onBandLeave)}}_onBandEnter(t){var e,i,s,n;const r=this.w,l=t.currentTarget,a=parseInt(null!=(e=l.getAttribute("data:range-index"))?e:"-1",10);a<0||a===this._activeBandIndex||(this._activeBandIndex=a,null==(n=null==(s=null==(i=this.ctx)?void 0:i.events)?void 0:s.fireEvent)||n.call(s,"legendHover",[this.ctx,a,r]),new V(r).highlightRangeInSeries(a,"highlight"))}_onBandLeave(){if(this._activeBandIndex<0)return;const t=this._activeBandIndex;this._activeBandIndex=-1,new V(this.w).highlightRangeInSeries(t,"reset")}_attachHoverListeners(){var t,e;p.isBrowser()&&(null==(e=null==(t=this.ctx)?void 0:t.events)?void 0:e.addEventListener)&&(this.ctx.events.addEventListener("dataPointMouseEnter",this._onCellEnter),this.ctx.events.addEventListener("dataPointMouseLeave",this._onCellLeave))}_onCellEnter(...t){var e,i,s;const n=this.w;if(!this.arrowEl)return;const r=t[t.length-1];if(!r||"object"!=typeof r)return;const l=r.seriesIndex,a=r.dataPointIndex;if("number"!=typeof l||"number"!=typeof a)return;if(!nt.supports(n))return;let o;o=this._continuous?function(t,e,i){const s=t.config.series[e];return et(t,s&&Array.isArray(s.data)?s.data[i]:null,e,i)}(n,l,a):null==(s=null==(i=null==(e=n.seriesData)?void 0:e.series)?void 0:i[l])?void 0:s[a],null==o||Number.isNaN(o)||this._positionArrow(o)}_onCellLeave(){this.arrowEl&&(this.arrowEl.setAttribute("opacity","0"),this.hoverValueEl&&(this.hoverValueEl.style.opacity="0"))}_positionArrow(t){if(!this.arrowEl||!this._geom)return;const{isVertical:e,position:i,stripX:s,stripY:n,stripLength:r,stripThickness:l,arrowSize:a}=this._geom,o=this._min,c=this._max-o;let h;if(h=0===c?.5:(t-o)/c,h<0&&(h=0),h>1&&(h=1),e){const t=n+r-h*r;let e,o;"left"===i?(e=s+l,o=e+a):(e=s,o=e-a);const c=[`${e},${t}`,`${o},${t-a/2}`,`${o},${t+a/2}`].join(" ");this.arrowEl.setAttribute("points",c)}else{const t=s+h*r;let e,o;"top"===i?(e=n+l,o=e+a):(e=n,o=e-a);const c=[`${t},${e}`,`${t-a/2},${o}`,`${t+a/2},${o}`].join(" ");this.arrowEl.setAttribute("points",c)}if(this.arrowEl.setAttribute("opacity","1"),this.hoverValueEl){const o=this._getFormatter();if(this.hoverValueEl.textContent=o(t),e){const t=n+r-h*r;"left"===i?this.hoverValueEl.style.left=`${s+l+a+8}px`:(this.hoverValueEl.style.left=s-a-8+"px",this.hoverValueEl.style.transform="translateX(-100%)"),this.hoverValueEl.style.top=t-9+"px"}else{const t=s+h*r;this.hoverValueEl.style.left=`${t}px`,this.hoverValueEl.style.transform="translateX(-50%)",this.hoverValueEl.style.top="top"===i?`${n+l+a+8}px`:n-a-18+"px"}this.hoverValueEl.style.opacity="1"}}_buildArrow(t,e,i){const s=f.createElementNS(st,"polygon");return s.setAttribute("fill",e),s.setAttribute("opacity","0"),s.setAttribute("class","apexcharts-heatmap-gradient-arrow"),s.setAttribute("points","0,0 0,0 0,0"),s.setAttribute("pointer-events","none"),s}_computeStops(){var t,e;const i=this.w,s=nt.colorScaleOf(i)||{},n=this._cfg(),r=it(i);if(r)return this._continuous=!0,{min:r.min,max:r.max,stops:r.legendStops,bands:[]};this._continuous=!1;let l=1/0,c=-1/0;const h=(null==(t=i.seriesData)?void 0:t.series)||[];for(let t=0;t<h.length;t++){const e=h[t];if(e)for(let t=0;t<e.length;t++){const i=e[t];null==i||Number.isNaN(i)||(i<l&&(l=i),i>c&&(c=i))}}Number.isFinite(l)||(l=0),Number.isFinite(c)||(c=0);let u=l,p=c;void 0!==s.min&&void 0!==s.max&&s.max>s.min?(u=s.min,p=s.max):(void 0!==s.min&&(u=s.min<l?s.min:l),void 0!==s.max&&(p=s.max>c?s.max:c));const f=[],m=[];if(s.ranges&&s.ranges.length>0){const t=s.ranges.map((t,e)=>o(a({},t),{_originalIndex:e})).sort((t,e)=>t.from-e.from),e=t[0].from,i=t[t.length-1].to;u=e,p=i;const n=i-e||1;t.forEach(t=>{const i=(t.from-e)/n,s=(t.to-e)/n;f.push({percent:(i+s)/2,color:t.color}),m.push({index:t._originalIndex,p1:i,p2:s})})}else{const t=i.globals.colors[0]||"#008FFB",s=new d,r=i.config.plotOptions[i.config.chart.type]||{},l=null!=(e=r.shadeIntensity)?e:.5,a=i.globals.hasNegs,o=Math.max(2,n.stops||16);for(let e=0;e<o;e++){const n=e/(o-1),c=u+n*(p-u),h=Math.abs(p)+Math.abs(u),d=0===h?0:100*c/h;let m;m=a?r.reverseNegativeShade?d<0?d/100*(1.25*l):1.25*l*(1-d/100):d<=0?1-(1+d/100)*l:(1-d/100)*l:1-d/100,m>1&&(m=1),m<-1&&(m=-1);const g=r.enableShades?s.shadeColor("dark"===i.config.theme.mode?-1*m:m,t):t;f.push({percent:n,color:g})}}return{min:u,max:p,stops:f,bands:m}}}const rt={zoom:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><circle cx="10.5" cy="10.5" r="6"/><path d="M15 15l5 5"/><path d="M8 10.5h5M10.5 8v5"/></svg>',pan:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><path d="M12 3v18M3 12h18"/><path d="M9 6l3-3 3 3M9 18l3 3 3-3M6 9l-3 3 3 3M18 9l3 3-3 3"/></svg>',reset:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><path d="M4 10a8 8 0 1 1 2 6"/><path d="M4 4v6h6"/></svg>',download:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><path d="M12 4v11"/><path d="M7 11l5 5 5-5"/><path d="M4 20h16"/></svg>'};class lt{constructor(t){this.trellis=t,this.elLegend=null,this.elToolbar=null,this.elTitle=null,this.elBreadcrumb=null,this.gradientLegend=null,this._gradPending=null}buildHeader(t,e,i){const s=this.trellis,n=s.cfg.header||{};if(!1===n.show)return;const r=f.createElement("div");r.className="apexcharts-trellis-header";let l=e;"function"==typeof n.formatter&&(l=n.formatter(e,{dimension:"string"==typeof s.cfg.by?s.cfg.by:void 0,index:i.index,count:i.count})),r.textContent=null==l?"":String(l);const a=n.style||{};if(a.fontSize&&(r.style.fontSize=a.fontSize),a.fontWeight&&(r.style.fontWeight=String(a.fontWeight)),a.color&&(r.style.color=a.color),!1!==s.cfg.promote){r.classList.add("apexcharts-trellis-header-clickable"),r.setAttribute("role","button"),r.setAttribute("tabindex","0"),r.setAttribute("title","Expand this panel");const t=()=>{s._promotedKey===e?s.restorePromotion():s.promote(e)};r.addEventListener("click",t),r.addEventListener("keydown",e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t())})}t.appendChild(r)}stripEl(t,e,i){const s=this.trellis.cfg.header||{},n=f.createElement("div");n.className=`apexcharts-trellis-strip apexcharts-trellis-strip-${t}`;let r=e;"function"==typeof s.formatter&&(r=s.formatter(e,{dimension:t,index:i.index,count:i.count})),n.textContent=null==r?"":String(r);const l=s.style||{};return l.fontSize&&(n.style.fontSize=l.fontSize),l.fontWeight&&(n.style.fontWeight=String(l.fontWeight)),l.color&&(n.style.color=l.color),n}buildBreadcrumb(t,e,i){this.removeBreadcrumb();const s=f.createElement("div");s.className="apexcharts-trellis-breadcrumb";const n=f.createElement("button");n.setAttribute("type","button"),n.className="apexcharts-trellis-breadcrumb-back",n.textContent="All panels",n.addEventListener("click",i);const r=f.createElement("span");r.className="apexcharts-trellis-breadcrumb-sep",r.textContent="/";const l=f.createElement("span");l.className="apexcharts-trellis-breadcrumb-current",l.textContent=e,s.appendChild(n),s.appendChild(r),s.appendChild(l),t.appendChild(s),this.elBreadcrumb=s}removeBreadcrumb(){this.elBreadcrumb&&this.elBreadcrumb.parentNode&&this.elBreadcrumb.parentNode.removeChild(this.elBreadcrumb),this.elBreadcrumb=null}buildTitle(t){const e=this.trellis.w.config.title;if(!e||!e.text)return;const i=f.createElement("div");i.className="apexcharts-trellis-title",i.textContent=e.text;const s=e.style||{};s.fontSize&&(i.style.fontSize=s.fontSize),s.color&&(i.style.color=s.color),t.appendChild(i),this.elTitle=i}buildLegend(t){const e=this.trellis;if("shared"!==(e.cfg.legend||"shared"))return;if("heatmap"===e.w.config.chart.type)return void this.buildGradientLegend(t);const i=e.split?e.split.seriesNames:[];if(i.length<2)return;const s=f.createElement("div");s.className="apexcharts-trellis-legend apexcharts-legend",s.setAttribute("role","list"),i.forEach(t=>{const i=f.createElement("div");i.className="apexcharts-legend-series apexcharts-trellis-legend-item",i.setAttribute("role","listitem"),i.setAttribute("tabindex","0"),i.setAttribute("data:collapsed","false");const n=f.createElement("span");n.className="apexcharts-legend-marker",n.style.background=e.scales?e.scales.colorOf(t):"#008FFB";const r=f.createElement("span");r.className="apexcharts-legend-text",r.textContent=t,i.appendChild(n),i.appendChild(r);const l=()=>{const s=e.sync.toggleSeries(t);i.classList.toggle("apexcharts-inactive-legend",s),i.setAttribute("data:collapsed",String(s))};i.addEventListener("click",l),i.addEventListener("keydown",t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),l())}),s.appendChild(i)}),t.appendChild(s),this.elLegend=s}buildGradientLegend(t){const e=this.trellis,i=e.panels.find(t=>t.chart);if(!i){if(this._gradPending)return;const i=()=>{var s,n;this._gradPending=null,null==(n=(s=e.ctx.events).removeEventListener)||n.call(s,"panelMounted",i),this.buildGradientLegend(t)};return this._gradPending=i,void e.ctx.events.addEventListener("panelMounted",i)}const s=f.createElement("div");s.className="apexcharts-trellis-legend apexcharts-trellis-gradient-legend",t.appendChild(s),this.elLegend=s;const n=i.chart,r=new nt(n.w,n.ctx);r.draw(s),this.gradientLegend=r,e.panels.forEach(t=>{var e;if(!t.chart||t===i)return;const s=null==(e=t.chart.ctx)?void 0:e.events;(null==s?void 0:s.addEventListener)&&(s.addEventListener("dataPointMouseEnter",r._onCellEnter),s.addEventListener("dataPointMouseLeave",r._onCellLeave))})}destroyGradientLegend(){var t,e;const i=this.trellis;if(this._gradPending&&(null==(e=(t=i.ctx.events).removeEventListener)||e.call(t,"panelMounted",this._gradPending),this._gradPending=null),this.gradientLegend){try{this.gradientLegend.destroy()}catch(t){}this.gradientLegend=null}}buildToolbar(t){const e=this.trellis;if("shared"!==(e.cfg.toolbar||"shared"))return;const i=f.createElement("div");i.className="apexcharts-trellis-toolbar";const s={},n=t=>{e.panels.forEach(e=>{if(!e.chart)return;const i=e.chart.w.interact;i.zoomEnabled="zoom"===t,i.panEnabled="pan"===t,i.selectionEnabled=!1}),s.zoom.classList.toggle("apexcharts-selected","zoom"===t),s.pan.classList.toggle("apexcharts-selected","pan"===t),s.zoom.setAttribute("aria-pressed",String("zoom"===t)),s.pan.setAttribute("aria-pressed",String("pan"===t))},r=(t,e,n)=>{const r=f.createElement("button");return r.className=`apexcharts-trellis-tool apexcharts-trellis-tool-${t}`,r.setAttribute("type","button"),r.setAttribute("aria-label",e),r.setAttribute("title",e),r.innerHTML=rt[t],r.addEventListener("click",n),s[t]=r,i.appendChild(r),r};if(r("zoom","Selection zoom",()=>n("zoom")),r("pan","Pan",()=>n("pan")),r("reset","Reset zoom",()=>{e.sync.resetAll()}),e.ctx.exports){const t=f.createElement("div");t.className="apexcharts-trellis-menu",[["png","Download PNG"],["svg","Download SVG"],["csv","Download CSV"]].forEach(([i,s])=>{const n=f.createElement("button");n.setAttribute("type","button"),n.className="apexcharts-trellis-menu-item",n.textContent=s,n.addEventListener("click",()=>{t.classList.remove("apexcharts-trellis-menu-open"),e.exports.download(i)}),t.appendChild(n)}),r("download","Download",()=>{t.classList.toggle("apexcharts-trellis-menu-open")}),i.appendChild(t)}s.zoom.classList.add("apexcharts-selected"),s.zoom.setAttribute("aria-pressed","true"),s.pan.setAttribute("aria-pressed","false"),t.appendChild(i),this.elToolbar=i,t.classList.add("apexcharts-trellis-has-toolbar")}}function at(t,e){const i=d.clone(t.w.config.yaxis);return(Array.isArray(i)?i:[i]).map(t=>d.extend(t,e))}class ot{constructor(t){this.trellis=t,this._syncing=!1,this._hidden=new Set,this.currentWindow=null}_noteWindow(t,e){const i=t&&t.xaxis;i&&null!=i.min&&null!=i.max?this.currentWindow={x:{min:i.min,max:i.max},y:this.currentWindow&&this.currentWindow.y||null,zoomed:e||!(!this.currentWindow||!this.currentWindow.zoomed)}:e&&(this.currentWindow=null)}makeZoomedHandler(t){return(e,i)=>{"function"==typeof t&&t(e,i),this._noteWindow(i,!0),this.onZoomed(i)}}makeScrolledHandler(t){return(e,i)=>{"function"==typeof t&&t(e,i),this._noteWindow(i,!1)}}onZoomed(t){const e=this.trellis;if(this._syncing)return;const i=e.cfg;if(!i||"shared"!==(i.scales.y||"shared"))return;if(!e.autoScaleYaxis)return;const s=t&&t.xaxis;if(!s||null==s.min||null==s.max)return;if(!e.split||!e.split.xIsNumeric)return;const n=function(t,e,i,s){const n={min:1/0,max:-1/0};return t.forEach(t=>t.series.forEach(t=>{Array.isArray(t.data)&&t.data.forEach(t=>{if(null==t)return;const r="paired"===e?t[0]:"object"===e?t.x:null,l=r instanceof Date?r.getTime():Number(r);!isFinite(l)||l<i||l>s||j(t,e,n)})})),isFinite(n.min)&&isFinite(n.max)?n:null}(e.split.panels,e.split.xForm,s.min,s.max);if(!n)return;const r=X(n.min,n.max,i.targetTicks||3);this.currentWindow&&(this.currentWindow.y={min:r.min,max:r.max,tickAmount:r.tickAmount}),this._syncing=!0;const l=e.panels.map(t=>t.chart?t.chart.updateOptions({yaxis:at(t.chart,{min:r.min,max:r.max,tickAmount:r.tickAmount})},!1,!1,!1).catch(()=>{}):Promise.resolve());Promise.all(l).finally(()=>{this._syncing=!1})}resetAll(){const t=this.trellis;this.currentWindow=null;const e=t.scales&&t.scales.x?{min:t.scales.x.min,max:t.scales.x.max}:{min:void 0,max:void 0};this._syncing=!0;const i=t.panels.map(i=>{if(!i.chart)return Promise.resolve();i.chart.w.interact.zoomed=!1;const s={xaxis:e},n=t.split?t._yBoundsFor(t.split.panels[i.index]):null;return n&&(s.yaxis=at(i.chart,{min:n.min,max:n.max,tickAmount:n.tickAmount})),i.chart.updateOptions(s,!1,!1,!1).catch(()=>{})});return Promise.all(i).finally(()=>{this._syncing=!1})}toggleSeries(t){const e=!this._hidden.has(t);return e?this._hidden.add(t):this._hidden.delete(t),this.trellis.panels.forEach(i=>{const s=i.chart;if(!s)return;if(-1!==(s.w.seriesData.seriesNames||[]).indexOf(t))try{e?s.hideSeries(t):s.showSeries(t)}catch(t){}}),e}isHidden(t){return this._hidden.has(t)}applyHiddenTo(t){if(!this._hidden.size||!t)return;const e=t.w.seriesData&&t.w.seriesData.seriesNames||[];this._hidden.forEach(i=>{if(-1!==e.indexOf(i))try{t.hideSeries(i)}catch(t){}})}wireCrosshairs(t){let e=0,i=null;const s=()=>{const t=i&&i.closest?i.closest(".apexcharts-trellis-cell"):null,e=t?t.querySelector(".apexcharts-xcrosshairs"):null,s=e&&e.classList.contains("apexcharts-active");this.trellis.panels.forEach(i=>{if(!i.cellEl||i.cellEl===t)return;const n=i.cellEl.querySelector(".apexcharts-xcrosshairs");n&&(s?(n.setAttribute("x",e.getAttribute("x")||"0"),n.setAttribute("x1",e.getAttribute("x1")||"0"),n.setAttribute("x2",e.getAttribute("x2")||"0"),n.classList.add("apexcharts-active")):n.classList.remove("apexcharts-active"))})},n=()=>{s(),e=i?requestAnimationFrame(n):0};t.addEventListener("mousemove",t=>{i=t.target,e||(e=requestAnimationFrame(n))},{passive:!0}),t.addEventListener("mouseleave",()=>{i=null,e&&(cancelAnimationFrame(e),e=0),this.trellis.panels.forEach(t=>{const e=t.cellEl&&t.cellEl.querySelector(".apexcharts-xcrosshairs");e&&e.classList.remove("apexcharts-active")})},{passive:!0})}}function ct(t,e){const i=null!=t,s=null!=e;return i||s?{min:i?t:null,max:s?e:null}:null}function ht(t,e){return"function"==typeof t&&e?t===e.addXaxisAnnotation?"xaxis":t===e.addYaxisAnnotation?"yaxis":t===e.addPointAnnotation?"point":null:null}function ut(t,e){const i=t.config.annotations?d.clone(t.config.annotations):null,s=[],n=t.globals.memory&&t.globals.memory.methodsToExec||[];for(const t of n){if(!t||"addAnnotation"!==t.label)continue;const i=ht(t.method,e);i&&s.push({kind:i,params:d.clone(t.params)})}return{static:i,dynamic:s}}function dt(t){const e=t&&t.measure;if(!e||"function"!=typeof e.getPins)return null;const i=e.getPins();return Array.isArray(i)&&i.length?{pins:i}:null}class pt{constructor(t){this.trellis=t,this.active=!1,this._io=null,this._byCell=new Map,this._dirty=new Set,this._raf=null,this._draining=!1,this._gutterFloor=0}static supported(){return"undefined"!=typeof IntersectionObserver}_rootMargin(){const t=this.trellis.layout,e=t?Math.max(0,Math.round(t.panelH+t.headerH+t.gap)):300;return`${e}px 0px ${e}px 0px`}start(){pt.supported()&&(this.active=!0,this._io=new IntersectionObserver(t=>this._onEntries(t),{root:null,rootMargin:this._rootMargin(),threshold:0}),this.trellis.panels.forEach(t=>{var e;t.wantMounted=!1,t.cellEl&&(this._byCell.set(t.cellEl,t),null==(e=this._io)||e.observe(t.cellEl))}))}refresh(){this.active&&this._io&&(this._io.disconnect(),this._io=new IntersectionObserver(t=>this._onEntries(t),{root:null,rootMargin:this._rootMargin(),threshold:0}),this._byCell.forEach((t,e)=>{var i;return null==(i=this._io)?void 0:i.observe(e)}))}_onEntries(t){if(this.active){for(const e of t){const t=this._byCell.get(e.target);t&&(t.wantMounted=e.isIntersecting,this._dirty.add(t))}this._schedule()}}_schedule(){var t;this._raf||this._draining||!this.active||(this._raf=(t=()=>{this._raf=null,this._drain()},"function"==typeof requestAnimationFrame?{kind:"raf",id:requestAnimationFrame(t)}:{kind:"timeout",id:setTimeout(()=>t(0),16)}))}_drain(){return c(this,null,function*(){if(!this._draining&&this.active){this._draining=!0;try{let t=0,e=0;for(;this.active&&this._dirty.size&&t<2&&e<6;){const i=this._dirty.values().next().value;this._dirty.delete(i);const s=!!i.wantMounted;s!==!!i.chart&&(e++,s?(t++,yield this._mount(i)):this._unmount(i))}}finally{this._draining=!1,this.active&&this._dirty.size?this._schedule():this.active&&(this.trellis.w.globals.animationEnded=!0)}}})}_liveWindow(t){const e=this.trellis.panels.find(e=>e!==t&&e.chart);if(!e||!e.chart)return null;const i=e.chart.w,s=i.config.xaxis||{},n=Array.isArray(i.config.yaxis)?i.config.yaxis[0]:i.config.yaxis;return{zoomed:!!i.interact.zoomed,x:null!=s.min||null!=s.max?{min:s.min,max:s.max}:null,y:!n||null==n.min&&null==n.max?null:{min:n.min,max:n.max,tickAmount:n.tickAmount}}}_patchYaxis(t,e){const i=Array.isArray(t.yaxis)?t.yaxis:t.yaxis?[t.yaxis]:[{}];i.forEach(t=>{Object.keys(e).forEach(i=>{"labels"===i?t.labels=a(a({},t.labels||{}),e.labels):t[i]=e[i]})}),t.yaxis=i}_mount(t){return c(this,null,function*(){var e,i,s,n,r,l,c,h;const u=this.trellis;if(!t.el||t.chart||t.noMount)return;const d=t.viewStash,p="shared"===u._yMode(),f=!p,m=u._assemblePanelOptions(t.index,{noAnimation:!!d}),g=d&&d.window;g&&g.xaxis&&(m.xaxis=o(a({},m.xaxis||{}),{min:null!=(e=g.xaxis.min)?e:void 0,max:null!=(i=g.xaxis.max)?i:void 0})),f&&g&&Array.isArray(g.yaxis)&&g.yaxis[0]&&this._patchYaxis(m,{min:null!=(s=g.yaxis[0].min)?s:void 0,max:null!=(n=g.yaxis[0].max)?n:void 0});const y=this._liveWindow(t);y&&y.x&&(m.xaxis=o(a({},m.xaxis||{}),{min:y.x.min,max:y.x.max})),y&&y.y&&p&&this._patchYaxis(m,a({min:y.y.min,max:y.y.max},null!=y.y.tickAmount?{tickAmount:y.y.tickAmount}:{}));const x=u.sync.currentWindow;x&&x.x&&(m.xaxis=o(a({},m.xaxis||{}),{min:x.x.min,max:x.x.max})),x&&x.y&&p&&this._patchYaxis(m,a({min:x.y.min,max:x.y.max},null!=x.y.tickAmount?{tickAmount:x.y.tickAmount}:{})),f&&this._gutterFloor>0&&this._patchYaxis(m,{labels:{minWidth:this._gutterFloor}}),t.el.classList.remove("apexcharts-trellis-skeleton");const v=new u._ApexCharts(t.el,m);t.chart=v;try{yield v.render()}catch(e){return t.chart=null,void t.el.classList.add("apexcharts-trellis-skeleton")}if(this.active){if(v.w.interact.zoomed=x?!!x.zoomed:y?y.zoomed:!(!d||!d.zoomed),u.sync.applyHiddenTo(v),d&&d.annotations&&Array.isArray(d.annotations.dynamic)){const t={xaxis:"addXaxisAnnotation",yaxis:"addYaxisAnnotation",point:"addPointAnnotation"},e=v;d.annotations.dynamic.forEach(i=>{const s=t[i.kind];s&&"function"==typeof e[s]&&e[s](i.params,!0)})}if(t.viewStash=null,f){const t=null==(h=null==(c=null==(l=null==(r=v.w)?void 0:r.globals)?void 0:l.yLabelsCoords)?void 0:c[0])?void 0:h.width;if("number"==typeof t&&isFinite(t)){const e=v.w.globals.isBarHorizontal?0:u._yLabelPad(),i=Math.max(0,t-e);i>this._gutterFloor+.5&&(this._gutterFloor=i,yield u._pushGutterFloor(this._gutterFloor))}}u.ctx.events.fireEvent("panelMounted",[u.ctx,{key:t.key,index:t.index,chart:v,remounted:!!d}])}})}_unmount(t){if(t.chart){try{t.viewStash=function(t,e){var i,s;const n=t.config.xaxis||{},r=(Array.isArray(t.config.yaxis)?t.config.yaxis:t.config.yaxis?[t.config.yaxis]:[]).map(t=>ct(t&&t.min,t&&t.max)),l=r.some(t=>null!==t),a=t.config.theme,o=e&&e.drilldown;return{v:1,window:{xaxis:ct(n.min,n.max),yaxis:l?r:null},zoomed:!!t.interact.zoomed,collapsed:(t.globals.collapsedSeriesIndices||[]).slice(),ancillaryCollapsed:(t.globals.ancillaryCollapsedSeriesIndices||[]).slice(),selectedDataPoints:(c=t.interact.selectedDataPoints,Array.isArray(c)?c.map(t=>Array.isArray(t)?t.slice():t):[]),theme:a?{mode:null!=(i=a.mode)?i:null,palette:null!=(s=a.palette)?s:null}:null,locale:t.config.chart&&t.config.chart.defaultLocale||null,annotations:ut(t,e),drill:o&&o.depth>0?{path:o.path.slice()}:null,measure:dt(e)};var c}(t.chart.w,t.chart)}catch(e){t.viewStash=null}try{t.chart.destroy()}catch(t){}if(t.chart=null,t.el){t.el.classList.add("apexcharts-trellis-skeleton");const e=this.trellis.layout;e&&(t.el.style.minHeight=`${e.panelH}px`)}}}stop(){var t;this.active=!1,this._io&&(this._io.disconnect(),this._io=null),this._byCell.clear(),this._dirty.clear(),(t=this._raf)&&("raf"===t.kind?cancelAnimationFrame(t.id):clearTimeout(t.id)),this._raf=null,this._gutterFloor=0}}class ft{static xRatio(t){const e=t.layout.gridWidth||1;return(t.globals.maxX-t.globals.minX)/e}static dataXToPx(t,e){return(e-t.globals.minX)/ft.xRatio(t)}static pxToDataX(t,e){return t.globals.minX+e*ft.xRatio(t)}static screenXToPlotPx(t,e){const i=t.dom.baseEl,s=i&&i.querySelector(".apexcharts-svg");if(!s)return e-t.layout.translateX;const n=s.getBoundingClientRect(),r=t.globals.svgWidth?n.width/t.globals.svgWidth:1;return(e-n.left)/(r||1)-t.layout.translateX}}const mt=["bar","column","rangeBar","candlestick","boxPlot"];class gt{constructor(t){this.trellis=t,this.el=null,this._raf=0,this._lastEvent=null}wire(t,e){const i=f.createElement("div");i.className="apexcharts-trellis-tooltip apexcharts-theme-light",i.setAttribute("role","status"),e.appendChild(i),this.el=i;const s=()=>{this._update(e),this._raf=this._lastEvent?requestAnimationFrame(s):0};t.addEventListener("mousemove",t=>{this._lastEvent=t,this._raf||(this._raf=requestAnimationFrame(s))},{passive:!0}),t.addEventListener("mouseleave",()=>{this._lastEvent=null,this._raf&&(cancelAnimationFrame(this._raf),this._raf=0),i.classList.remove("apexcharts-trellis-tooltip-active")},{passive:!0})}_hoverIndex(t,e,i){const s=t.w,n=s.globals.dataPoints;if(!n||n<1)return-1;const r=s.layout.gridWidth;if(!r)return-1;const l=ft.screenXToPlotPx(s,e),a=s.globals.barPadForNumericAxis||0;if(l<-a||l>r+a)return-1;const o=s.dom&&s.dom.elGridRect?s.dom.elGridRect:t.el&&t.el.querySelector?t.el.querySelector(".apexcharts-grid"):null;if(o&&o.getBoundingClientRect){const t=o.getBoundingClientRect();if(t.height&&(i<t.top||i>t.bottom))return-1}let c;return c=-1!==mt.indexOf(s.config.chart.type)&&!s.config.xaxis.convertedCatToNumeric?Math.ceil(l/(r/n))-1:Math.round(l/(r/Math.max(1,n-1))),Math.max(0,Math.min(n-1,c))}_valueAt(t,e,i,s){var n,r;const l=t.series.find(t=>t.name===e);if(!l||!Array.isArray(l.data))return null;const a=l.data[s];if(null==a)return null;let o=a;if(Array.isArray(a)?o=a[1]:"object"==typeof a&&(o=a.y),null==o)return null;const c=this.trellis.w.config,h=Array.isArray(null==(n=c.tooltip)?void 0:n.y)?c.tooltip.y[i]:null==(r=c.tooltip)?void 0:r.y,u=Array.isArray(c.yaxis)?c.yaxis[0]:c.yaxis,d=h&&"function"==typeof h.formatter&&h.formatter||u&&u.labels&&"function"==typeof u.labels.formatter&&u.labels.formatter||null,p=t=>{if(d)try{return String(d(t,{seriesIndex:i,dataPointIndex:s,w:null}))}catch(e){return String(t)}return String(t)};return Array.isArray(o)?o.map(p).join(" / "):p(o)}_update(t){const e=this.trellis,i=this.el,s=this._lastEvent;if(!i||!s||!e.split)return;const n=s.target&&s.target.closest?s.target.closest(".apexcharts-trellis-cell"):null,r=n?e.panels.find(t=>t.cellEl===n):void 0,l=r&&r.chart?this._hoverIndex(r.chart,s.clientX,s.clientY):-1;if(!r||-1===l)return void i.classList.remove("apexcharts-trellis-tooltip-active");const a=n?n.querySelector(".apexcharts-tooltip-title"):null,o=a&&a.textContent?a.textContent:"",c=e.split.seriesNames,h=e.scales,u=[];e.split.panels.forEach(t=>{const e=[];c.forEach((i,s)=>{const n=this._valueAt(t,i,s,l);if(null===n)return;const r=h?h.colorOf(i):"#008FFB";e.push(`<span class="apexcharts-trellis-tooltip-val"><span class="apexcharts-trellis-tooltip-marker" style="background:${xt(r)}"></span>${yt(n)}</span>`)});const i=t.key===r.key;u.push(`<div class="apexcharts-trellis-tooltip-row${i?" apexcharts-trellis-tooltip-row-active":""}" data-key="${xt(t.key)}"><span class="apexcharts-trellis-tooltip-key">${yt(t.key)}</span><span class="apexcharts-trellis-tooltip-vals">${e.join("")}</span></div>`)});let d="";o&&(d+=`<div class="apexcharts-tooltip-title">${yt(o)}</div>`),d+=u.join(""),i.innerHTML=d,i.classList.add("apexcharts-trellis-tooltip-active");const p=t.getBoundingClientRect();let f=s.clientX-p.left+14,m=s.clientY-p.top+14;const g=i.offsetWidth,y=i.offsetHeight;f+g>p.width-4&&(f=Math.max(4,f-g-28)),m+y>p.height-4&&(m=Math.max(4,m-y-28)),i.style.left=`${Math.round(f)}px`,i.style.top=`${Math.round(m)}px`}destroy(){this._raf&&(cancelAnimationFrame(this._raf),this._raf=0),this._lastEvent=null,this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el),this.el=null}}function yt(t){return String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function xt(t){return String(t).replace(/"/g,"&quot;")}class vt{constructor(t){this.trellis=t}supported(){return!!this.trellis.ctx.exports}_rectIn(t){const e=this.trellis.elWrap.getBoundingClientRect(),i=t.getBoundingClientRect();return{x:i.left-e.left,y:i.top-e.top,w:i.width,h:i.height}}_size(){const t=this.trellis.elWrap.getBoundingClientRect();return{w:Math.ceil(t.width),h:Math.ceil(t.height)}}_background(){const t=this.trellis.panels.find(t=>t.chart),e=t&&t.chart.exports;if(e&&"function"==typeof e.resolveExportBackground){const t=e.resolveExportBackground();if(t&&"transparent"!==t)return t}return"#fff"}_chromeTexts(){const t=this.trellis,e=[],i=(t,i)=>{if(!t||!t.textContent)return;const s=this._rectIn(t),n=getComputedStyle(t);e.push({text:t.textContent,x:"center"===i?s.x+s.w/2:s.x,y:s.y+s.h/2,font:`${n.fontWeight} ${n.fontSize} ${n.fontFamily}`,fontSize:parseFloat(n.fontSize)||12,color:n.color||"#373d3f",align:i})};return i(t.chrome.elTitle,"left"),t.panels.forEach(t=>{t.cellEl&&i(t.cellEl.querySelector(".apexcharts-trellis-header"),"center")}),t.chrome.elLegend&&t.chrome.elLegend.querySelectorAll(".apexcharts-legend-text").forEach(t=>i(t,"left")),e}_legendMarkers(){const t=this.trellis.chrome.elLegend;return t?Array.from(t.querySelectorAll(".apexcharts-legend-marker"),t=>({rect:this._rectIn(t),color:t.style.background||t.style.backgroundColor||"#008FFB"})):[]}dataURI(){return c(this,arguments,function*(t={}){const e=this.trellis,i=t.scale||1,s=this._size(),n=document.createElement("canvas");n.width=s.w*i,n.height=s.h*i;const r=n.getContext("2d");if(!r)return{imgURI:""};const l=r;l.scale(i,i),l.fillStyle=this._background(),l.fillRect(0,0,s.w,s.h);for(const t of e.panels){if(!t.el)continue;const e=this._rectIn(t.el);if(!t.chart){l.fillStyle="rgba(120, 120, 120, 0.06)",l.fillRect(e.x,e.y,e.w,e.h);continue}const{imgURI:s}=yield t.chart.dataURI({scale:i});if(!s)continue;const n=yield bt(s);l.drawImage(n,e.x,e.y,e.w,e.h)}for(const t of this._chromeTexts())l.font=t.font,l.fillStyle=t.color,l.textAlign=t.align,l.textBaseline="middle",l.fillText(t.text,t.x,t.y);for(const t of this._legendMarkers())l.fillStyle=t.color,l.beginPath(),l.arc(t.rect.x+t.rect.w/2,t.rect.y+t.rect.h/2,Math.max(2,t.rect.w/2),0,2*Math.PI),l.fill();return{imgURI:n.toDataURL("image/png")}})}svgString(){return c(this,null,function*(){const t=this.trellis,e=this._size(),i=[];i.push(`<svg xmlns="http://www.w3.org/2000/svg" width="${e.w}" height="${e.h}" viewBox="0 0 ${e.w} ${e.h}">`),i.push(`<rect width="${e.w}" height="${e.h}" fill="${this._background()}"/>`);for(const e of t.panels){if(!e.el)continue;const t=this._rectIn(e.el);if(!e.chart){i.push(`<rect x="${t.x}" y="${t.y}" width="${t.w}" height="${t.h}" fill="rgba(120,120,120,0.06)" rx="4"/>`);continue}const s=yield e.chart.getSvgString();i.push(`<g transform="translate(${t.x}, ${t.y})">${s}</g>`)}for(const t of this._chromeTexts()){const e="center"===t.align?"middle":"start";i.push(`<text x="${t.x}" y="${t.y}" text-anchor="${e}" dominant-baseline="central" style="font:${At(t.font)};fill:${At(t.color)}">${wt(t.text)}</text>`)}for(const t of this._legendMarkers())i.push(`<circle cx="${t.rect.x+t.rect.w/2}" cy="${t.rect.y+t.rect.h/2}" r="${Math.max(2,t.rect.w/2)}" fill="${At(t.color)}"/>`);return i.push("</svg>"),i.join("")})}csv(){var t,e,i;const s=this.trellis,n=s.split;if(!n)return"";const r=s.w,l=(null==(i=null==(e=null==(t=r.config.chart.toolbar)?void 0:t.export)?void 0:e.csv)?void 0:i.columnDelimiter)||",",a=r.config.xaxis&&"datetime"===r.config.xaxis.type,o=t=>{if(null==t)return"";const e=String(t);return/[",\n]/.test(e)||-1!==e.indexOf(l)?`"${e.replace(/"/g,'""')}"`:e},c=t=>a&&"number"==typeof t?new Date(t).toISOString():t,h=n.seriesNames,u=[["x","facet",...h].map(o).join(l)];return n.panels.forEach(t=>{n.unionX.forEach((e,i)=>{const s=[c(e),t.key];h.forEach(e=>{const n=t.series.find(t=>t.name===e);if(!n||!Array.isArray(n.data))return void s.push("");const r=n.data[i];let l=r;Array.isArray(r)?l=r[1]:r&&"object"==typeof r&&(l=r.y),s.push(Array.isArray(l)?l.join("|"):l)}),u.push(s.map(o).join(l))})}),u.join("\n")}download(t){return c(this,null,function*(){var e;const i=this.trellis,s=(null==(e=i.w.config.chart.toolbar)?void 0:e.export)||{},n=String(i.w.globals.chartID||"trellis");if("png"===t){const{imgURI:t}=yield this.dataURI();_t(t,s.png&&s.png.filename||n,".png")}else if("svg"===t){const t=yield this.svgString();_t("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(t),s.svg&&s.svg.filename||n,".svg")}else{_t("data:text/csv;charset=utf-8,"+encodeURIComponent("\ufeff"+this.csv()),s.csv&&s.csv.filename||n,".csv")}})}}function bt(t){return new Promise((e,i)=>{const s=new Image;s.onload=()=>e(s),s.onerror=i,s.src=t})}function _t(t,e,i){const s=document.createElement("a");s.href=t,s.download=e+i,document.body.appendChild(s),s.click(),document.body.removeChild(s)}function wt(t){return String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function At(t){return String(t).replace(/"/g,"&quot;")}const Et={treemap:"trellis does not support treemap: area encoding needs room a panel cannot give. Rendering a single chart.",sunburst:"trellis does not support sunburst: its labels are illegible at panel size. Rendering a single chart.",unit:"the unit type has its own small-multiples mode (plotOptions.unit.grid.split), which beats a trellis of unit charts. Rendering a single chart."};u.default.registerFeatures({trellis:class{constructor(t,e){this.w=t,this.ctx=e,this.panels=[],this._stripEls=[],this.split=null,this.scales=null,this.layout=null,this.cfg={},this.sync=new ot(this),this.chrome=new lt(this),this.virtual=new pt(this),this.exports=new vt(this),this.gridTooltip=null,this._promotedKey=null,this._ApexCharts=u.default,this._virtualActive=!1,this._panelRenderer=null,this._yLabelDecimals=0,this.elWrap=null,this.elGrid=null,this._mounted=!1,this._rendering=!1,this._raf=0,this._lastWidth=0,this._resizeHandler=this._onContainerResize.bind(this),this.autoScaleYaxis=!1,this._elChromeTop=null,this._vetoWarned=!1,this._noKeyWarned=!1,this._frames=null}isActive(){var t;const e=this.w.config.trellis;if(!e||!(e.by||e.row||e.column))return!1;const i=null==(t=this.w.config.chart)?void 0:t.type;if(i&&Et[i])return this._vetoWarned||(this._vetoWarned=!0),!1;if(e.by&&!e.row&&!e.column&&!Array.isArray(e.data)){if(!(this.w.config.series||[]).some((t,i)=>null!==k(t,i,e.by))){if(!this._noKeyWarned){this._noKeyWarned=!0;"function"==typeof e.by||e.by}return!1}}return!0}_layoutCfg(){return this.split&&"2d"===this.split.mode&&this.split.colKeys?o(a({},this.cfg),{columns:this.split.colKeys.length}):this.cfg}_yMode(){var t;return this._frames&&this._frames.forceSharedY?"shared":(null==(t=this.cfg.scales)?void 0:t.y)||"shared"}_yBoundsFor(t){var e,i;const s=this.scales;if(!s)return null;if(this._frames&&this._frames.skipYaxisPush)return null;const n=this._yMode();return"shared"===n?s.y:"independent-row"===n&&s.rowY?s.rowY.get(null!=(e=t.rowKey)?e:"")||null:"independent-column"===n&&s.colY&&s.colY.get(null!=(i=t.colKey)?i:"")||null}_valueAxisIsX(){var t,e;const i=this.w.config;return["bar","boxPlot","violin"].includes(i.chart.type)&&!!(null==(e=null==(t=i.plotOptions)?void 0:t.bar)?void 0:e.horizontal)}_valueAxisXPatch(t){var e,i;const s={min:t.min,max:t.max};return"number"!=typeof(null==(i=null==(e=this.ctx.opts)?void 0:e.xaxis)?void 0:i.tickAmount)&&(s.tickAmount=t.tickAmount),s}_groupId(){return`${this.w.globals.chartID}-tg`}render(){return c(this,null,function*(){var t,e,i,s;const n=this.w;if(!this._mounted&&!this._rendering&&p.isBrowser()){this._rendering=!0;try{this.cfg=n.config.trellis||{},this.autoScaleYaxis=!!(null==(e=null==(t=n.config.chart)?void 0:t.zoom)?void 0:e.autoScaleYaxis);let r=n.config.series||[];if(Array.isArray(this.cfg.data)){const t=function(t,e={}){const i=[],s=e.by;if("string"!=typeof s||!s)return{series:[],warnings:["trellis: tidy-row input (trellis.data) needs a string `by` column name"]};const n=e.x,r=e.y;if(!n||!r)return{series:[],warnings:["trellis: tidy-row input (trellis.data) needs `x` and `y` column names"]};const l=Array.isArray(t)?t:[];if(!l.length)return{series:[],warnings:["trellis: trellis.data is empty"]};const a=e.seriesBy;let o=0,c=0;const h=new Map;l.forEach(t=>{if(!t||"object"!=typeof t)return void o++;const e=t[s],i=t[n];if(null==e||null==i)return void o++;const l=a&&void 0!==t[a]&&null!==t[a]?String(t[a]):String(r);let u=h.get(String(e));u||(u=new Map,h.set(String(e),u));let d=u.get(l);d||(d=new Map,u.set(l,d));const p=i instanceof Date?i.getTime():i;d.has(p)&&c++;const f=t[r];d.set(p,void 0===f?null:f)}),o&&i.push(`trellis: ${o} row(s) missing "${s}" or "${n}" were skipped`),c&&i.push(`trellis: ${c} duplicate (panel, series, x) row(s); kept the last. Aggregate the rows first if you want sums or means.`);const u=[];return h.forEach((t,e)=>{t.forEach((t,i)=>{u.push({name:i,[s]:e,data:Array.from(t,([t,e])=>({x:t,y:e}))})})}),{series:u,warnings:i}}(this.cfg.data,this.cfg);t.warnings.forEach(t=>{}),t.series.length&&(r.length,r=t.series)}const l=O(r,this.cfg);if(this.split=l,l.warnings.forEach(t=>{}),!l.panels.length)return;l.dropped;const c=null!=(i=this.cfg.virtualize)?i:"auto";let h=!0===c||"auto"===c&&l.panels.length>64;h&&!pt.supported()&&(h=!1),this._virtualActive=h,!h&&l.panels.length,l.panels.length;const d="histogram"===n.config.chart.requestedType?"histogram":n.config.chart.type;this._frames=R(l,this.cfg,n.config,d),this._frames.warnings.forEach(t=>{}),this._yLabelDecimals=this._frames.yExtentOverride?0:function(t){let e=0;const i=t=>{const i=D(t);i>e&&(e=i)};return t.forEach(t=>t.series.forEach(t=>{Array.isArray(t.data)&&t.data.forEach(t=>{if(null==t)return;let e=t;Array.isArray(t)?e=t[1]:"object"==typeof t&&(e=t.y),Array.isArray(e)?e.forEach(i):i(e)})})),e}(l.panels);const p=this._yMode()!==((null==(s=this.cfg.scales)?void 0:s.y)||"shared")?o(a({},this.cfg),{scales:o(a({},this.cfg.scales||{}),{y:this._yMode()})}):this.cfg;this.scales=q(l,p,{chartType:n.config.chart.type,userColors:this.ctx.opts&&this.ctx.opts.colors,yExtentOverride:this._frames.yExtentOverride}),this._panelRenderer=function(t,e,i,s){if(i&&i.chart&&i.chart.renderer)return null;if(!s)return null;const n={config:{series:t.panels.reduce((t,e)=>t.concat(e.series),[]),chart:{type:e.chart.type},markers:e.markers,dataLabels:e.dataLabels,fill:e.fill,plotOptions:e.plotOptions,states:e.states}};if(b(n))return null;const r=e.chart.rendererThreshold||8e3;return v(n)>=r?"canvas":null}(l,n.config,this.ctx.opts,A._rendererRegistry.has("canvas")),this._buildSkeleton();const f=this._containerWidth();this._lastWidth=f,this.layout=G({panelCount:l.panels.length,containerWidth:f,cfg:this._layoutCfg(),hostHeight:this._hostHeight()}),this._applyGridStyle(),this._buildCells();const g="shared"!==this._yMode(),y=this.elWrap;if(h)this.virtual.start();else{g&&(y.style.visibility="hidden");for(let t=0;t<this.panels.length;t++){const e=this.panels[t];if(e.noMount)continue;const i=this._assemblePanelOptions(e.index),s=new u.default(e.el,i);e.chart=s,yield s.render(),this.ctx.events.fireEvent("panelMounted",[this.ctx,{key:e.key,index:e.index,chart:s}])}g&&(yield this._alignGutters(),y.style.visibility="")}this.chrome.buildTitle(this._elChromeTop),this.chrome.buildToolbar(y),this.chrome.buildLegend(y),this.sync.wireCrosshairs(this.elGrid),"grid"===(this.cfg.tooltip||"panel")&&(this.gridTooltip=new gt(this),this.gridTooltip.wire(this.elGrid,y)),m(this.ctx.el,this._resizeHandler),this._mounted=!0,h||(n.globals.animationEnded=!0),this.ctx.events.fireEvent("trellisMounted",[this.ctx,{panels:this.getPanels()}])}finally{this._rendering=!1}}})}_containerWidth(){const t=this.ctx.el;return t.getBoundingClientRect().width||t.clientWidth||800}_hostHeight(){const t=this.w.config.chart&&this.w.config.chart.height,e="string"==typeof t?parseFloat(t):t;return"number"==typeof e&&isFinite(e)&&e>0&&"auto"!==String(t)?e:void 0}_buildSkeleton(){const t=this.ctx.el,e=f.createElementNS("http://www.w3.org/1999/xhtml","div");e.className="apexcharts-trellis",this.split&&"2d"===this.split.mode&&e.classList.add("apexcharts-trellis-2d"),e.id=`apexcharts-trellis${this.w.globals.chartID}`,e.setAttribute("data-tooltip-mode",this.cfg.tooltip||"panel");const i=f.createElement("div");i.className="apexcharts-trellis-chrome",e.appendChild(i),this._elChromeTop=i;const s=f.createElement("div");s.className="apexcharts-trellis-grid",e.appendChild(s),t.appendChild(e),this.elWrap=e,this.elGrid=s,this.w.dom.baseEl=t,this.w.dom.elWrap=e}_applyGridStyle(){var t;const e=this.elGrid,i=this.layout;e.style.display="grid";const s=this.split&&"2d"===this.split.mode&&!1!==(null==(t=this.cfg.header)?void 0:t.show);e.style.gridTemplateColumns=s?`auto repeat(${i.cols}, minmax(0, 1fr))`:`repeat(${i.cols}, minmax(0, 1fr))`,e.style.gap=`${i.gap}px`}_buildCells(){var t;const e=this.elGrid,i=this.split,s=this.layout,n="2d"===i.mode,r=n&&!1!==(null==(t=this.cfg.header)?void 0:t.show);this._stripEls=[];const l=this.cfg.emptyPanels||"placeholder";if(r){const t=f.createElement("div");t.className="apexcharts-trellis-corner",e.appendChild(t),this._stripEls.push(t),(i.colKeys||[]).forEach((t,s)=>{const n=this.chrome.stripEl("column",t,{index:s,count:(i.colKeys||[]).length});e.appendChild(n),this._stripEls.push(n)})}this.panels=[],i.panels.forEach((t,a)=>{var o;if(r&&a%s.cols===0){const t=Math.floor(a/s.cols),n=this.chrome.stripEl("row",null!=(o=(i.rowKeys||[])[t])?o:"",{index:t,count:(i.rowKeys||[]).length});e.appendChild(n),this._stripEls.push(n)}const c=f.createElement("div");c.className="apexcharts-trellis-cell",c.setAttribute("data-key",t.key),this._applyCellMutes(c,s.cells[a]),n||this.chrome.buildHeader(c,t.key,{index:a,count:i.panels.length});const h=f.createElement("div");h.className="apexcharts-trellis-panel",this._virtualActive&&(h.classList.add("apexcharts-trellis-skeleton"),h.style.minHeight=`${s.panelH}px`),c.appendChild(h);const u=t.empty&&"placeholder"!==l;if(t.empty)if(c.classList.add("apexcharts-trellis-cell-empty"),"hide"===l)c.classList.add("apexcharts-trellis-cell-hidden");else if("skip"===l)h.classList.add("apexcharts-trellis-skeleton"),h.style.minHeight=`${s.panelH}px`;else{const t=f.createElement("div");t.className="apexcharts-trellis-empty-label",t.textContent=this.w.config.noData&&this.w.config.noData.text||"no data",c.appendChild(t)}e.appendChild(c),this.panels.push({key:t.key,index:a,el:h,cellEl:c,chart:null,empty:t.empty,noMount:u})})}_applyCellMutes(t,e){t.classList.toggle("apexcharts-trellis-mute-x",!e.showXLabels),t.classList.toggle("apexcharts-trellis-mute-y",!e.showYLabels)}_assemblePanelOptions(t,{noAnimation:e=!1}={}){var i,s,n,r,l,c,h,u,p,f,m,g,y,x;const v=this.w,b=this.split,_=this.scales,w=this.layout,A=b.panels[t],E=d.clone(this.ctx.opts||{});delete E.trellis,delete E.series,delete E.responsive,E.annotations&&(E.annotations=function(t,e){if(!t||"object"!=typeof t)return t;const i=a({},t);for(const t of["yaxis","xaxis","points","texts","images"]){const s=i[t];Array.isArray(s)&&(i[t]=s.filter(t=>!t||void 0===t.scope||null===t.scope||"trellis"===t.scope||(Array.isArray(t.scope)?-1!==t.scope.map(String).indexOf(e):String(t.scope)===e)).map(t=>{if(!t||void 0===t.scope)return t;const e=a({},t);return delete e.scope,e}))}return i}(E.annotations,A.key));const M=E.chart||{},S=M.events||{},k=v.globals.chartID,L=null==(n=null==(s=null==(i=this.ctx.opts)?void 0:i.chart)?void 0:s.animations)?void 0:n.enabled,C=e||b.panels.length>16&&void 0===L,F=A.empty&&"placeholder"===(this.cfg.emptyPanels||"placeholder");let O=F?[N(b,{chartType:v.config.chart.type})]:A.series;const W=["pie","donut","polarArea","radialBar"].includes(v.config.chart.type);W&&(O=O.flatMap(t=>Array.isArray(t.data)?t.data:[]).map(t=>"number"==typeof t&&isFinite(t)?t:0));const P=a(a(o(a({chart:o(a(a({id:`${k}-tp${t}`,group:this._groupId(),height:w.panelH,width:"100%",redrawOnParentResize:!1,redrawOnWindowResize:!1,print:{enabled:!1},parentHeightOffset:0,toolbar:{show:!1},zoom:{enabled:"none"!==this.cfg.zoom}},C?{animations:{enabled:!1}}:{}),this._panelRenderer?{renderer:this._panelRenderer}:{}),{events:o(a({},S),{zoomed:this.sync.makeZoomedHandler(S.zoomed),scrolled:this.sync.makeScrolledHandler(S.scrolled)})}),series:O},W?{}:{colors:O.map(t=>_.colorOf(t.name))}),{title:{text:"",margin:0,floating:!0},subtitle:{text:"",margin:0,floating:!0},legend:{show:!1}}),F?{tooltip:{enabled:!1}}:{}),w.panelH<120&&"grid"!==this.cfg.tooltip&&"boolean"!=typeof(null==(l=null==(r=this.ctx.opts)?void 0:r.tooltip)?void 0:l.compact)?{tooltip:{compact:!0}}:{});if(!(null==(c=M.sparkline)?void 0:c.enabled)&&!["pie","donut","polarArea","radialBar","radar","treemap"].includes(v.config.chart.type)){const t=E.grid&&E.grid.padding||{},e="datetime"===(null==(u=null==(h=this.ctx.opts)?void 0:h.xaxis)?void 0:u.type)?2:7;P.grid={padding:{top:("number"==typeof t.top?t.top:0)-12,bottom:("number"==typeof t.bottom?t.bottom:0)-e}}}const z=this._valueAxisIsX();_.x&&!z&&(P.xaxis={min:_.x.min,max:_.x.max});const $=this._yBoundsFor(A);if($){const t=Array.isArray(null==(p=this.ctx.opts)?void 0:p.yaxis)?this.ctx.opts.yaxis[0]:null==(f=this.ctx.opts)?void 0:f.yaxis,e=Array.isArray(E.yaxis)?E.yaxis[0]:E.yaxis;let i={};if("function"!=typeof(null==(m=null==t?void 0:t.labels)?void 0:m.formatter)){const t=($.max-$.min)/Math.max(1,$.tickAmount),e=Math.max(this._yLabelDecimals,D(t));i={labels:{formatter:t=>"number"==typeof t&&isFinite(t)?t.toFixed(e):t}}}P.yaxis=d.extend(e||{},a({min:$.min,max:$.max,tickAmount:$.tickAmount},i)),delete E.yaxis,z&&(P.xaxis=d.extend(P.xaxis||{},this._valueAxisXPatch($)))}const B=this._frames;if(B&&B.plotOptions&&(P.plotOptions=d.clone(B.plotOptions)),B&&B.pieScaleOf){const t=B.pieScaleOf(A.key);if(null!==t){const e=null==(x=null==(y=null==(g=this.ctx.opts)?void 0:g.plotOptions)?void 0:y.pie)?void 0:x.customScale;P.plotOptions=d.extend(P.plotOptions||{},{pie:{customScale:t*("number"==typeof e?e:1)}})}}let H=d.extend(E,P);if("function"==typeof this.cfg.panel){const e=this.cfg.panel(A.key,{index:t,seriesNames:A.seriesNames});e&&"object"==typeof e&&(H=d.extend(H,e))}return H}_alignGutters(){return c(this,null,function*(){var t,e,i,s;const n=this.panels.map(t=>{var e,i,s,n,r;return null==(r=null==(n=null==(s=null==(i=null==(e=t.chart)?void 0:e.w)?void 0:i.globals)?void 0:s.yLabelsCoords)?void 0:n[0])?void 0:r.width}).filter(t=>"number"==typeof t&&isFinite(t));if(!n.length)return;const r=!!(null==(s=null==(i=null==(e=null==(t=this.panels[0])?void 0:t.chart)?void 0:e.w)?void 0:i.globals)?void 0:s.isBarHorizontal)?0:10,l=Math.max(0,Math.max(...n)-r);yield this._pushGutterFloor(l)})}_yLabelPad(){return 10}_pushGutterFloor(t){return c(this,null,function*(){for(const e of this.panels)e.chart&&(yield e.chart.updateOptions({yaxis:at(e.chart,{labels:{minWidth:t}})},!1,!1,!1).catch(()=>{}))})}_onContainerResize(){this._mounted&&(this._raf||(this._raf=requestAnimationFrame(()=>{this._raf=0;const t=this._containerWidth();if(Math.round(t)!==Math.round(this._lastWidth)){if(this._lastWidth=t,this._promotedKey){const t=this.panels.find(t=>t.key===this._promotedKey);return void(t&&t.chart&&t.chart.updateOptions({},!1,!1,!1).catch(()=>{}))}this._relayout(t)}})))}promote(t){return c(this,null,function*(){var e;const i=this.panels.find(e=>e.key===String(t));if(!i||i.noMount||!this._mounted)return;if(this._promotedKey===i.key)return;this._promotedKey&&(yield this.restorePromotion()),this._promotedKey=i.key;const s=this.layout,n=this.elGrid?this.elGrid.getBoundingClientRect().height:0,r=Math.round(Math.max(280,Math.min(560,n||(s?2.4*s.panelH:420))));null==(e=this.elWrap)||e.classList.add("apexcharts-trellis-promoting"),this.panels.forEach(t=>{if(!t.cellEl)return;const e=t===i;t.cellEl.classList.toggle("apexcharts-trellis-cell-promoted",e),t.cellEl.classList.toggle("apexcharts-trellis-cell-parked",!e)}),this._stripEls.forEach(t=>t.classList.add("apexcharts-trellis-cell-parked")),this.chrome.buildBreadcrumb(this._elChromeTop,i.key,()=>this.restorePromotion()),!i.chart&&this._virtualActive&&(i.wantMounted=!0,this.virtual._dirty.add(i),this.virtual._schedule()),i.el&&(i.el.style.minHeight=`${r}px`),i.chart&&(yield i.chart.updateOptions({chart:{height:r}},!1,!1,!1).catch(()=>{})),this.ctx.events.fireEvent("panelPromoted",[this.ctx,{key:i.key,chart:i.chart}])})}restorePromotion(){return c(this,null,function*(){var t;if(!this._promotedKey)return;const e=this.panels.find(t=>t.key===this._promotedKey);this._promotedKey=null,null==(t=this.elWrap)||t.classList.remove("apexcharts-trellis-promoting"),this.panels.forEach(t=>{t.cellEl&&(t.cellEl.classList.remove("apexcharts-trellis-cell-promoted"),t.cellEl.classList.remove("apexcharts-trellis-cell-parked"))}),this._stripEls.forEach(t=>t.classList.remove("apexcharts-trellis-cell-parked")),this.chrome.removeBreadcrumb();const i=this.layout;e&&e.el&&i&&(e.el.style.minHeight=`${i.panelH}px`),e&&e.chart&&i&&(yield e.chart.updateOptions({chart:{height:i.panelH}},!1,!1,!1).catch(()=>{})),this._lastWidth=0,this._relayout(this._containerWidth()),this._lastWidth=this._containerWidth(),this.ctx.events.fireEvent("panelRestored",[this.ctx,{key:e?e.key:null}])})}_relayout(t){const e=this.split;if(!e)return;const i=this.layout?this.layout.panelH:0;this.layout=G({panelCount:e.panels.length,containerWidth:t,cfg:this._layoutCfg(),hostHeight:this._hostHeight()}),this._applyGridStyle();const s=this.layout;this.panels.forEach((t,e)=>{if(t.cellEl&&this._applyCellMutes(t.cellEl,s.cells[e]),t.el&&this._virtualActive&&(t.el.style.minHeight=`${s.panelH}px`),!t.chart)return;const n=s.panelH!==i?{chart:{height:s.panelH}}:{};t.chart.updateOptions(n,!1,!1,!1).catch(()=>{})}),this._virtualActive&&this.virtual.refresh()}updateSeries(t,e=!0){return c(this,null,function*(){var i;const s=this.w;if(Array.isArray(this.cfg.data)&&this.cfg.data.length)return Promise.resolve();if(s.config.series=t,this.ctx.opts&&(this.ctx.opts.series=t),!this._mounted)return this.ctx.render();const n=O(t||[],this.cfg);if(!(n.panels.length===this.panels.length&&n.panels.every((t,e)=>t.key===this.panels[e].key)))return this.teardown(),this.ctx.render();this.split=n,this._frames=R(n,this.cfg,s.config,"histogram"===s.config.chart.requestedType?"histogram":s.config.chart.type);const r=this._yMode()!==((null==(i=this.cfg.scales)?void 0:i.y)||"shared")?o(a({},this.cfg),{scales:o(a({},this.cfg.scales||{}),{y:this._yMode()})}):this.cfg;this.scales=q(n,r,{chartType:s.config.chart.type,userColors:this.ctx.opts&&this.ctx.opts.colors,yExtentOverride:this._frames.yExtentOverride});const l=this.scales,c=this._frames,h=["pie","donut","polarArea","radialBar"].includes(s.config.chart.type),u=this.panels.map((t,i)=>{var s,r,a;if(!t.chart)return Promise.resolve();const o={series:h?n.panels[i].series.flatMap(t=>Array.isArray(t.data)?t.data:[]).map(t=>"number"==typeof t&&isFinite(t)?t:0):n.panels[i].series},u=this._valueAxisIsX();l.x&&!u&&(o.xaxis={min:l.x.min,max:l.x.max});const p=this._yBoundsFor(n.panels[i]);if(p&&(o.yaxis=at(t.chart,{min:p.min,max:p.max,tickAmount:p.tickAmount}),u&&(o.xaxis=d.extend(o.xaxis||{},this._valueAxisXPatch(p)))),c.plotOptions&&(o.plotOptions=d.clone(c.plotOptions)),c.pieScaleOf){const t=c.pieScaleOf(n.panels[i].key);if(null!==t){const e=null==(a=null==(r=null==(s=this.ctx.opts)?void 0:s.plotOptions)?void 0:r.pie)?void 0:a.customScale;o.plotOptions=d.extend(o.plotOptions||{},{pie:{customScale:t*("number"==typeof e?e:1)}})}}return t.chart.updateOptions(o,!1,e,!1).catch(()=>{})});return Promise.all(u)})}getPanels(){return this.panels.map(t=>({key:t.key,index:t.index,chart:t.chart,el:t.cellEl}))}getPanel(t){const e=this.panels.find(e=>e.key===String(t));return e?e.chart:null}teardown(){this.virtual.stop(),this._virtualActive=!1,this._panelRenderer=null,this._promotedKey=null,this._frames=null,this.chrome.destroyGradientLegend(),this.gridTooltip&&(this.gridTooltip.destroy(),this.gridTooltip=null),this._raf&&(cancelAnimationFrame(this._raf),this._raf=0),p.isBrowser()&&this.ctx.el&&g(this.ctx.el,this._resizeHandler),this.panels.forEach(t=>{if(t.chart)try{t.chart.destroy()}catch(t){}t.chart=null}),this.panels=[],this._stripEls=[],this.elWrap&&this.elWrap.parentNode&&this.elWrap.parentNode.removeChild(this.elWrap),this.elWrap=null,this.elGrid=null,this._mounted=!1,this.ctx._renderPromise=null}}}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>u.default});
@@ -38,7 +38,7 @@ var __async = (__this, __arguments, generator) => {
38
38
  });
39
39
  };
40
40
  /*!
41
- * ApexCharts v7.2.0
41
+ * ApexCharts v7.3.0
42
42
  * (c) 2018-2026 ApexCharts
43
43
  */
44
44
  import * as _core from "apexcharts/core";