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.
- package/dist/apexcharts.common.js +2 -2
- package/dist/apexcharts.core.js +1 -1
- package/dist/apexcharts.core.min.js +1 -1
- package/dist/apexcharts.esm.js +167 -2
- package/dist/apexcharts.js +167 -2
- package/dist/apexcharts.min.js +2 -2
- package/dist/apexcharts.ssr.common.js +2 -2
- package/dist/apexcharts.ssr.esm.js +167 -2
- package/dist/area.common.js +1 -1
- package/dist/area.esm.js +1 -1
- package/dist/bar.common.js +1 -1
- package/dist/bar.esm.js +1 -1
- package/dist/bar.js +1 -1
- package/dist/boxPlot.common.js +1 -1
- package/dist/boxPlot.esm.js +1 -1
- package/dist/bubble.common.js +1 -1
- package/dist/bubble.esm.js +1 -1
- package/dist/candlestick.common.js +1 -1
- package/dist/candlestick.esm.js +1 -1
- package/dist/candlestick.js +1 -1
- package/dist/column.common.js +1 -1
- package/dist/column.esm.js +1 -1
- package/dist/core.common.js +1 -1
- package/dist/core.esm.js +1 -1
- package/dist/donut.common.js +1 -1
- package/dist/donut.esm.js +1 -1
- package/dist/dumbbell.common.js +1 -1
- package/dist/dumbbell.esm.js +1 -1
- package/dist/features/all.common.js +2 -2
- package/dist/features/all.esm.js +167 -2
- package/dist/features/annotations.common.js +1 -1
- package/dist/features/annotations.esm.js +1 -1
- package/dist/features/annotations.js +1 -1
- package/dist/features/context-menu.common.js +1 -1
- package/dist/features/context-menu.esm.js +1 -1
- package/dist/features/context-menu.js +1 -1
- package/dist/features/drilldown.common.js +1 -1
- package/dist/features/drilldown.esm.js +1 -1
- package/dist/features/drilldown.js +1 -1
- package/dist/features/dumbbell.common.js +1 -1
- package/dist/features/dumbbell.esm.js +1 -1
- package/dist/features/dumbbell.js +1 -1
- package/dist/features/exports.common.js +1 -1
- package/dist/features/exports.esm.js +1 -1
- package/dist/features/exports.js +1 -1
- package/dist/features/facet.common.js +1 -1
- package/dist/features/facet.esm.js +1 -1
- package/dist/features/facet.js +1 -1
- package/dist/features/history.common.js +1 -1
- package/dist/features/history.esm.js +1 -1
- package/dist/features/history.js +1 -1
- package/dist/features/ink.common.js +1 -1
- package/dist/features/ink.esm.js +1 -1
- package/dist/features/ink.js +1 -1
- package/dist/features/keyboard.common.js +1 -1
- package/dist/features/keyboard.esm.js +1 -1
- package/dist/features/keyboard.js +1 -1
- package/dist/features/legend.common.js +1 -1
- package/dist/features/legend.esm.js +1 -1
- package/dist/features/legend.js +1 -1
- package/dist/features/link.common.js +1 -1
- package/dist/features/link.esm.js +1 -1
- package/dist/features/link.js +1 -1
- package/dist/features/marks.common.js +1 -1
- package/dist/features/marks.esm.js +1 -1
- package/dist/features/marks.js +1 -1
- package/dist/features/measure.common.js +1 -1
- package/dist/features/measure.esm.js +1 -1
- package/dist/features/measure.js +1 -1
- package/dist/features/morph.common.js +1 -1
- package/dist/features/morph.esm.js +1 -1
- package/dist/features/morph.js +1 -1
- package/dist/features/perspectives.common.js +1 -1
- package/dist/features/perspectives.esm.js +1 -1
- package/dist/features/perspectives.js +1 -1
- package/dist/features/raincloud.common.js +1 -1
- package/dist/features/raincloud.esm.js +1 -1
- package/dist/features/raincloud.js +1 -1
- package/dist/features/renderer-canvas.common.js +1 -1
- package/dist/features/renderer-canvas.esm.js +1 -1
- package/dist/features/renderer-canvas.js +1 -1
- package/dist/features/stats.common.js +1 -1
- package/dist/features/stats.esm.js +1 -1
- package/dist/features/stats.js +1 -1
- package/dist/features/storyboard.common.js +1 -1
- package/dist/features/storyboard.esm.js +1 -1
- package/dist/features/storyboard.js +1 -1
- package/dist/features/streamgraph.common.js +1 -1
- package/dist/features/streamgraph.esm.js +1 -1
- package/dist/features/streamgraph.js +1 -1
- package/dist/features/toolbar.common.js +1 -1
- package/dist/features/toolbar.esm.js +1 -1
- package/dist/features/toolbar.js +1 -1
- package/dist/features/trellis.common.js +1 -1
- package/dist/features/trellis.esm.js +1 -1
- package/dist/features/trellis.js +1 -1
- package/dist/features/waterfall.common.js +1 -1
- package/dist/features/waterfall.esm.js +1 -1
- package/dist/features/waterfall.js +1 -1
- package/dist/features/weave.common.js +2 -2
- package/dist/features/weave.esm.js +167 -2
- package/dist/features/weave.js +2 -2
- package/dist/heatmap.common.js +1 -1
- package/dist/heatmap.esm.js +1 -1
- package/dist/heatmap.js +1 -1
- package/dist/histogram.common.js +1 -1
- package/dist/histogram.esm.js +1 -1
- package/dist/line.common.js +1 -1
- package/dist/line.esm.js +1 -1
- package/dist/line.js +1 -1
- package/dist/pictograms.common.js +1 -1
- package/dist/pictograms.esm.js +1 -1
- package/dist/pictograms.js +1 -1
- package/dist/pie.common.js +1 -1
- package/dist/pie.esm.js +1 -1
- package/dist/pie.js +1 -1
- package/dist/polarArea.common.js +1 -1
- package/dist/polarArea.esm.js +1 -1
- package/dist/radar.common.js +1 -1
- package/dist/radar.esm.js +1 -1
- package/dist/radar.js +1 -1
- package/dist/radialBar.common.js +1 -1
- package/dist/radialBar.esm.js +1 -1
- package/dist/radialBar.js +1 -1
- package/dist/raincloud.common.js +1 -1
- package/dist/raincloud.esm.js +1 -1
- package/dist/rangeArea.common.js +1 -1
- package/dist/rangeArea.esm.js +1 -1
- package/dist/rangeBar.common.js +1 -1
- package/dist/rangeBar.esm.js +1 -1
- package/dist/scatter.common.js +1 -1
- package/dist/scatter.esm.js +1 -1
- package/dist/streamgraph.common.js +1 -1
- package/dist/streamgraph.esm.js +1 -1
- package/dist/sunburst.common.js +1 -1
- package/dist/sunburst.esm.js +1 -1
- package/dist/sunburst.js +1 -1
- package/dist/treemap.common.js +1 -1
- package/dist/treemap.esm.js +1 -1
- package/dist/treemap.js +1 -1
- package/dist/unit-shapes.common.js +1 -1
- package/dist/unit-shapes.esm.js +1 -1
- package/dist/unit-shapes.js +1 -1
- package/dist/unit.common.js +1 -1
- package/dist/unit.esm.js +1 -1
- package/dist/unit.js +1 -1
- package/dist/violin.common.js +1 -1
- package/dist/violin.esm.js +1 -1
- package/dist/violin.js +1 -1
- package/dist/waterfall.common.js +1 -1
- package/dist/waterfall.esm.js +1 -1
- package/package.json +1 -1
- package/src/modules/weave/PluginAPI.js +37 -1
- package/src/modules/weave/WeaveHost.js +148 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
5
|
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ApexPerspectives={})}(this,function(e){"use strict";var t=Object.defineProperty,n=Object.defineProperties,i=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,o=(e,n,i)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i,l=(e,t)=>{for(var n in t||(t={}))r.call(t,n)&&o(e,n,t[n]);if(s)for(var n of s(t))a.call(t,n)&&o(e,n,t[n]);return e},c=(e,t)=>n(e,i(t));const d=globalThis.ApexCharts,u=globalThis.ApexCharts.__internals.__apex_Utils,h=globalThis.ApexCharts.__internals.__apex_Environment_Environment;function p(e,t){const n=null!=e,i=null!=t;return n||i?{min:n?e:null,max:i?t:null}:null}function f(e){return Array.isArray(e)?e.map(e=>Array.isArray(e)?e.slice():e):[]}function m(e,t){return"function"==typeof e&&t?e===t.addXaxisAnnotation?"xaxis":e===t.addYaxisAnnotation?"yaxis":e===t.addPointAnnotation?"point":null:null}function y(e,t){const n=e.config.annotations?u.clone(e.config.annotations):null,i=[],s=e.globals.memory&&e.globals.memory.methodsToExec||[];for(const e of s){if(!e||"addAnnotation"!==e.label)continue;const n=m(e.method,t);n&&i.push({kind:n,params:u.clone(e.params)})}return{static:n,dynamic:i}}function g(e){const t=e&&e.measure;if(!t||"function"!=typeof t.getPins)return null;const n=t.getPins();return Array.isArray(n)&&n.length?{pins:n}:null}function v(e,t,{animate:n=!0,mergeOptions:i}={}){var s,r;if(!e||!t)return;"number"==typeof t.v&&t.v>1&&console.warn(`[apexcharts] ViewState v${t.v} is newer than this build understands (v1); applying best-effort.`),e.clearAnnotations();const a=i?u.clone(i):{},o=t.window&&t.window.xaxis;a.xaxis=Object.assign({},a.xaxis,o?{min:null!=(s=o.min)?s:void 0,max:null!=(r=o.max)?r:void 0}:{min:void 0,max:void 0});const l=t.window&&t.window.yaxis;if(Array.isArray(l)&&(a.yaxis=l.map(e=>{var t,n;return e?{min:null!=(t=e.min)?t:void 0,max:null!=(n=e.max)?n:void 0}:{}})),t.theme){const e={};null!=t.theme.mode&&(e.mode=t.theme.mode),null!=t.theme.palette&&(e.palette=t.theme.palette),Object.keys(e).length&&(a.theme=Object.assign({},a.theme,e))}t.annotations&&t.annotations.static&&(a.annotations=u.clone(t.annotations.static)),e.updateOptions(a,!1,n,!1,!1),function(e,t){if(!e||!t)return;const n=e.w;n.interact.zoomed=!!t.zoomed,function(e,t,n){const i=e.w;if(null==t&&null==n)return;const s=i.globals.seriesNames||[],r=new Set([...t||[],...n||[]]),a=new Set([...i.globals.collapsedSeriesIndices||[],...i.globals.ancillaryCollapsedSeriesIndices||[]]);for(let t=0;t<s.length;t++){const n=s[t];if(null==n)continue;const i=r.has(t),o=a.has(t);i&&!o?e.hideSeries(n):!i&&o&&e.showSeries(n)}}(e,t.collapsed,t.ancillaryCollapsed),t.annotations&&Array.isArray(t.annotations.dynamic)&&t.annotations.dynamic.forEach(t=>{const n=function(e){switch(e){case"xaxis":return"addXaxisAnnotation";case"yaxis":return"addYaxisAnnotation";case"point":return"addPointAnnotation";default:return null}}(t.kind);n&&"function"==typeof e[n]&&e[n](t.params,!0)});(function(e,t){Array.isArray(t)&&(e.w.interact.selectedDataPoints=f(t))})(e,t.selectedDataPoints),t.locale&&t.locale!==n.config.chart.defaultLocale&&e.setLocale(t.locale);e.measure&&"function"==typeof e.measure.setPins&&e.measure.setPins(t.measure&&t.measure.pins||[])}(e,t)}const b=globalThis.console;function w(e,...t){b.error(e,...t)}function x(e){b.warn(e)}const A="APEX-",_=new Date("2027-07-31T00:00:00Z"),S="__apex_license_v1__";function k(){const e=globalThis;let t=e[S];return t||(t={key:null,listeners:new Set,result:null},e[S]=t),t}const T=class{static get licenseKey(){return k().key}static set licenseKey(e){k().key=e}static get listeners(){return k().listeners}static get validationResult(){return k().result}static set validationResult(e){k().result=e}static getKey(){return this.licenseKey}static getLicenseStatus(){return this.licenseKey?(this.validationResult=this.validateKey(this.licenseKey),this.validationResult):{expired:!1,signatureVerified:!1,valid:!1}}static isKeyValid(e){return!!e&&this.validateKey(e).valid}static isLicenseValid(){return this.getLicenseStatus().valid}static onChange(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}static setLicense(e){var t,n;if(!e)return this.licenseKey=null,void this.publish({expired:!1,signatureVerified:!1,valid:!1});const i=this.validateKey(e);i.valid||e===this.licenseKey||!(null==(n=this.validationResult)?void 0:n.valid)?(this.licenseKey=e,this.publish(i),i.valid||w(`[Apex] ${i.message}`)):x(`[Apex] Ignoring license key: ${null!=(t=i.message)?t:"it is not valid"} A valid license is already active on this page.`)}static validateKey(e){const t=this.parseKey(e),n=this.validateStructure(e,t);if(!n.valid||!(null==t?void 0:t.signature))return n;const i=this.verdicts.get(e);return!1===i?{data:t.data,expired:!1,message:"Invalid license key. The license signature does not verify.",signatureVerified:!0,valid:!1}:(void 0===i&&this.verifySignature(e,t,n),c(l({},n),{signatureVerified:!0===i}))}static _resetSignatureState(){this.verdicts.clear(),this.verifying.clear(),this.warnedUnverifiable=!1,this.epoch++}static base64ToBytes(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(4*Math.ceil(t.length/4),"="),i=globalThis.atob;if("function"!=typeof i)throw new Error("no base64 decoder available");const s=i(n),r=new Uint8Array(s.length);for(let e=0;e<s.length;e++)r[e]=s.charCodeAt(e);return r}static canonicalPayload(e){const t=e.domains&&e.domains.length>0?e.domains.join(","):"";return`v1|${e.issueDate}|${e.expiryDate}|${e.plan}|${t}`}static notify(e){for(const t of this.listeners)try{t(e)}catch(e){}}static parseKey(e){if("string"!=typeof e||!e.startsWith(A))return null;const t=e.slice(5);if(!t)return null;try{const e=(new TextDecoder).decode(this.base64ToBytes(t)),n=JSON.parse(e);return n.issueDate&&n.expiryDate&&n.plan?{data:{domains:Array.isArray(n.domains)?n.domains:void 0,expiryDate:n.expiryDate,issueDate:n.issueDate,plan:n.plan,valid:!0},signature:"string"==typeof n.sig&&n.sig?n.sig:null}:null}catch(e){return null}}static publish(e){this.validationResult=e,this.notify(e)}static validateStructure(e,t){const n=e=>({expired:!1,message:e,signatureVerified:!1,valid:!1});if("string"!=typeof e||!e.startsWith(A))return n('Invalid license key format. License key must start with "APEX-".');if(!t)return n("Invalid license key. Unable to decode license data.");const{data:i,signature:s}=t;if(!s&&new Date>=_)return n("This license key is in the old unsigned format, which is no longer accepted. Please request a replacement key.");if(new Date(i.expiryDate)<new Date)return{data:i,expired:!0,message:`License expired on ${i.expiryDate}. Please renew your license.`,signatureVerified:!1,valid:!1};if(i.domains&&i.domains.length>0){const e="undefined"==typeof location?"":location.hostname;if(!i.domains.some(t=>e===t||e.endsWith(`.${t}`)))return{data:i,expired:!1,message:`License is not valid for this domain (${e}). Allowed domains: ${i.domains.join(", ")}.`,signatureVerified:!1,valid:!1}}return{data:i,expired:!1,signatureVerified:!1,valid:!0}}static verifySignature(e,t,n){return i=this,s=null,r=function*(){var i;if(this.verifying.has(e)||this.verdicts.has(e))return;this.verifying.add(e);const s=this.epoch,r=null==(i=globalThis.crypto)?void 0:i.subtle;if(!r||0===this.publicKeysSpki.length)return this.verifying.delete(e),void(this.warnedUnverifiable||(this.warnedUnverifiable=!0,x(r?"[Apex] No license signing key is configured in this build, so license signatures cannot be verified.":"[Apex] Web Crypto is unavailable (a secure context is required), so the license signature cannot be verified.")));const a=(new TextEncoder).encode(this.canonicalPayload(t.data));let o=!1;for(const e of this.publicKeysSpki){try{const n=yield r.importKey("spki",this.base64ToBytes(e),{name:"ECDSA",namedCurve:"P-256"},!1,["verify"]);o=yield r.verify({hash:"SHA-256",name:"ECDSA"},n,this.base64ToBytes(t.signature),a)}catch(e){o=!1}if(o)break}if(this.verifying.delete(e),this.epoch!==s)return;if(this.verdicts.set(e,o),o){const t=c(l({},n),{signatureVerified:!0});return void(this.licenseKey===e?this.publish(t):this.notify(t))}const d="Invalid license key. The license signature does not verify.",u={data:t.data,expired:!1,message:d,signatureVerified:!0,valid:!1};this.licenseKey===e?this.publish(u):this.notify(u),w(`[Apex] ${d}`)},new Promise((e,t)=>{var n=e=>{try{o(r.next(e))}catch(e){t(e)}},a=e=>{try{o(r.throw(e))}catch(e){t(e)}},o=t=>t.done?e(t.value):Promise.resolve(t.value).then(n,a);o((r=r.apply(i,s)).next())});var i,s,r}};T.publicKeysSpki=["MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEQIaK9UMD6n0oR/FIy8QdL0uSzKMQlf1BB+tOrji4/WuHsyRNxeDhVykoSsNURozMi1xhmqWvBH1L//xIfugTPA=="],T.verdicts=new Map,T.verifying=new Set,T.warnedUnverifiable=!1,T.epoch=0;let O=T;const R=class{static applyStyles(e){Object.assign(e.style,this.CRITICAL_STYLES,{backgroundImage:this.createWatermarkPattern(),backgroundRepeat:"repeat"})}static node(e){return e?e.querySelector(`[${this.WATERMARK_ATTR}]`):null}static add(e,t){return e&&"undefined"!=typeof document?(this.setManaged(e,t),this.paint(e)):null}static exists(e){return!!this.node(e)}static remove(e,t){e&&(this.setManaged(e,t),this.erase(e))}static untrack(e){this.managed.delete(e)}static createWatermarkPattern(){const e=this.WATERMARK_TEXT;return`url("data:image/svg+xml,${encodeURIComponent(`\n <svg xmlns="http://www.w3.org/2000/svg" width="300" height="200">\n <text\n x="50%"\n y="50%"\n dominant-baseline="middle"\n text-anchor="middle"\n font-family="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Arial, sans-serif"\n font-size="18"\n font-weight="600"\n fill="rgba(134, 134, 134, 0.1)"\n transform="rotate(-35, 100, 60)"\n >${e}</text>\n </svg>\n `.trim())}")`}static erase(e){var t;null==(t=this.node(e))||t.remove()}static paint(e){let t=this.node(e);return t||(t=document.createElement("div"),t.setAttribute(this.WATERMARK_ATTR,""),e.appendChild(t)),this.applyStyles(t),"function"==typeof getComputedStyle&&"static"===getComputedStyle(e).position&&(e.style.position="relative"),t}static reconcile(){const e=O.isLicenseValid();for(const t of this.managed)t.isConnected?e?this.erase(t):this.paint(t):this.managed.delete(t)}static setManaged(e,t){!1!==(null==t?void 0:t.manage)?this.track(e):this.managed.delete(e)}static track(e){this.managed.add(e),this.subscribed||(this.subscribed=!0,O.onChange(()=>{this.reconcile()}))}};R.WATERMARK_ATTR="data-apexcharts-watermark",R.WATERMARK_TEXT="APEXCHARTS",R.ATTR="data-apexcharts-watermark",R.CRITICAL_STYLES={bottom:"0",display:"block",left:"0",msUserSelect:"none",opacity:"1",pointerEvents:"none",position:"absolute",right:"0",top:"0",userSelect:"none",visibility:"visible",webkitUserSelect:"none",zIndex:"10000"},R.managed=new Set,R.subscribed=!1;let C=R;const K="https://apexcharts.com/pricing";let P=!1;const D=new Set;function E(){P=!0,j()}const $=new Set(["premium","enterprise"]);function I(e,t){const n=C.add(t,{manage:!1});if(!n||"undefined"==typeof MutationObserver)return;if(e._wmNodeObserver&&e._wmObservedNode===n)return;e._wmNodeObserver&&e._wmNodeObserver.disconnect();const i=new MutationObserver(()=>{const e=C.node(t);e&&(i.disconnect(),C.applyStyles(e),i.takeRecords(),i.observe(e,{attributes:!0,attributeFilter:["style"]}))});i.observe(n,{attributes:!0,attributeFilter:["style"]}),e._wmNodeObserver=i,e._wmObservedNode=n}function L(e,t){e._wmWrapObserver&&(e._wmWrapObserver.disconnect(),e._wmWrapObserver=null),e._wmNodeObserver&&(e._wmNodeObserver.disconnect(),e._wmNodeObserver=null),e._wmObservedNode=null;const n=t||e.w&&e.w.dom&&e.w.dom.elWrap;n&&C.remove(n,{manage:!1})}function M(e,t){try{if(!h.isBrowser())return;if(e&&e.globals&&e.globals.isDestroyed)return void D.delete(t);const n=e&&e.dom&&e.dom.elWrap;if(!n)return;const i=function(e,t){const n=e&&e.config&&e.config.chart||{},i=[];"unit"===n.type&&i.push("unit"),"raincloud"===n.requestedType&&i.push("raincloud"),t.trellis&&"function"==typeof t.trellis.isActive&&t.trellis.isActive()&&i.push("trellis"),t.storyboard&&t.storyboard._used&&i.push("storyboard");const s=n.link;return t.linkedViews&&s&&(!0===s.enabled||"function"==typeof s.dimension)&&i.push("link"),t.ink&&n.ink&&!0===n.ink.enabled&&i.push("ink"),t.measure&&n.measure&&!0===n.measure.enabled&&i.push("measure"),t.contextMenu&&n.contextMenu&&!0===n.contextMenu.enabled&&i.push("context-menu"),t.perspectives&&(t.perspectives._used||P)&&i.push("perspectives"),t.history&&n.history&&!0===n.history.enabled&&i.push("history"),i}(e,t);if(0===i.length)return D.delete(t),void L(t,n);D.add(t);const s=function(e){const t=e&&e.config&&e.config.chart&&e.config.chart.license;if(t)return t;const n=O.getKey();if(n)return n;const i=h.getApex();return i&&i.license?i.license:null}(e);if(function(e){if(!e)return!1;const t=O.validateKey(e);if(!t.valid)return!1;const n=t.data&&t.data.plan;return"string"==typeof n&&$.has(n.toLowerCase())}(s))return void L(t,n);!function(e,t){if(I(e,t),"undefined"==typeof MutationObserver||e._wmWrapObserver)return;const n=new MutationObserver(()=>{C.node(t)||I(e,t)});n.observe(t,{childList:!0}),e._wmWrapObserver=n}(t,n),function(e,t,n){if(e._premiumLicenseNotified)return;e._premiumLicenseNotified=!0;const i=n.length>1;if(!t)return void console.warn(`[ApexCharts] Premium feature${i?"s":""} in use (${n.join(", ")}) without a license. Running in trial mode with a watermark. Get a license: ${K}`);const s=O.validateKey(t);if(s.valid){const e=s.data&&s.data.plan||"current";return void console.warn(`[ApexCharts] Premium feature${i?"s":""} in use (${n.join(", ")}) require a Premium or Enterprise license; the ${e} plan does not include ${i?"them":"it"}. Running in trial mode with a watermark. Upgrade: ${K}`)}t!==O.getKey()&&console.error(`[Apex] ${s.message}`)}(t,s,i)}catch(e){}}function j(){if(!h.isBrowser())return;const e=new Set,t=h.getApex(),n=t&&t._chartInstances;Array.isArray(n)&&n.forEach(t=>{const n=t&&t.chart;n&&n.w&&!n.w.globals.isDestroyed&&(e.add(n),M(n.w,n))}),Array.from(D).forEach(t=>{const n=t&&t.w,i=n&&n.dom&&n.dom.elWrap;n&&!n.globals.isDestroyed&&i&&!1!==i.isConnected?e.has(t)||M(n,t):D.delete(t)})}O.onChange(j);const U="apex";function N(e){return function(e){if("undefined"!=typeof Buffer)return Buffer.from(e,"utf-8").toString("base64");const t=(new TextEncoder).encode(e);let n="";for(let e=0;e<t.length;e++)n+=String.fromCharCode(t[e]);return btoa(n)}(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function W(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");for(;t.length%4;)t+="=";return function(e){if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").toString("utf-8");const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return(new TextDecoder).decode(n)}(t)}class B{constructor(e,t){this.w=e,this.ctx=t,this._saved=[],this._counter=0,this._used=!1}capture(){const e={v:1,view:function(e,t){var n,i;const s=e.config.xaxis||{},r=(Array.isArray(e.config.yaxis)?e.config.yaxis:e.config.yaxis?[e.config.yaxis]:[]).map(e=>p(e&&e.min,e&&e.max)),a=r.some(e=>null!==e),o=e.config.theme,l=t&&t.drilldown;return{v:1,window:{xaxis:p(s.min,s.max),yaxis:a?r:null},zoomed:!!e.interact.zoomed,collapsed:(e.globals.collapsedSeriesIndices||[]).slice(),ancillaryCollapsed:(e.globals.ancillaryCollapsedSeriesIndices||[]).slice(),selectedDataPoints:f(e.interact.selectedDataPoints),theme:o?{mode:null!=(n=o.mode)?n:null,palette:null!=(i=o.palette)?i:null}:null,locale:e.config.chart&&e.config.chart.defaultLocale||null,annotations:y(e,t),drill:l&&l.depth>0?{path:l.path.slice()}:null,measure:g(t)}}(this.w,this.ctx)},t=this._serializableDelta();return t&&Object.keys(t).length&&(e.options=t),e}_serializableDelta(){const e=this.w.config,t=e.chart&&e.chart.perspectives&&e.chart.perspectives.serializeOptions||["theme","xaxis","yaxis","title","subtitle"],n={};return t.forEach(t=>{if(void 0!==e[t]){const i=function(e){try{return JSON.parse(JSON.stringify(e))}catch(e){return}}(e[t]);void 0!==i&&(n[t]=i)}}),n}encode(e){const t=e||this.capture();return N(JSON.stringify(t))}decode(e){return B.decode(e)}toURL(){if(!h.isBrowser())return"";const e=this.encode(this.capture()),t=new URL(window.location.href);return t.hash=`${U}=${e}`,t.toString()}apply(e,t={}){const n="string"==typeof e?B.decode(e):e;if(!n||!n.view)return;this._used=!0,M(this.w,this.ctx);const i=void 0===t.animate||t.animate,s=u.extend(n.options?u.clone(n.options):{},t.mergeOptions||{}),r=Object.keys(s).length?s:void 0;(this.w.config.chart.group?this.ctx.getSyncedCharts():[this.ctx]).forEach(e=>{v(e,n.view,{animate:i,mergeOptions:r})})}save(e){const t="perspective-"+ ++this._counter;return this._saved.push({id:t,name:e||t,token:this.capture()}),this._used=!0,M(this.w,this.ctx),t}list(){return this._saved.map(e=>({id:e.id,name:e.name,token:e.token}))}delete(e){const t=this._saved.findIndex(t=>t.id===e);t>-1&&this._saved.splice(t,1)}teardown(){this._saved=[],this._counter=0}static decode(e){if("string"!=typeof e||!e)return null;try{const t=JSON.parse(W(e));return t&&"object"==typeof t?1!==t.v?(console.warn(`apexcharts: unsupported perspective version ${t.v} (expected 1).`),null):t:null}catch(e){return console.warn("apexcharts: failed to decode perspective token.",e),null}}static fromURL(e){try{const t=e||(h.isBrowser()?window.location.href:"");if(!t)return null;const n=new URL(t).hash.replace(/^#/,"");if(!n)return null;const i=n.split("&").map(e=>e.split("=")).find(e=>e[0]===U);return i&&null!=i[1]?B.decode(decodeURIComponent(i[1])):null}catch(e){return null}}}d.registerFeatures({perspectives:B}),d.perspectives={decode:e=>(E(),B.decode(e)),fromURL:e=>(E(),B.fromURL(e))},e.default=d,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
5
|
"use strict";var t=Object.defineProperty,r=Object.defineProperties,e=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,s=(r,e,n)=>e in r?t(r,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[e]=n,l=(t,r)=>{for(var e in r||(r={}))o.call(r,e)&&s(t,e,r[e]);if(n)for(var e of n(r))i.call(r,e)&&s(t,e,r[e]);return t},a=(t,n)=>r(t,e(n));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function u(t){if(t&&t.__esModule)return t;const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const e in t)if("default"!==e){const n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,n.get?n:{enumerable:!0,get:()=>t[e]})}return r.default=t,Object.freeze(r)}const c=u(require("apexcharts/core")),y="__apexcharts_series_transforms__";globalThis[y]||(globalThis[y]={});const f=c.__apex_Utils;function d(t,r){const e=t.length;if(0===e)return NaN;if(1===e)return t[0];const n=(e-1)*r,o=Math.floor(n),i=Math.ceil(n);return o===i?t[o]:t[o]+(t[i]-t[o])*(n-o)}function h(t,r={}){if(!Array.isArray(t)||0===t.length)return null;const e=t.slice().sort((t,r)=>t-r),n=d(e,.25),o=d(e,.5),i=d(e,.75),s=i-n;let l=e[0],a=e[e.length-1],u=[];if("tukey"===r.whiskers&&s>0){const t=n-1.5*s,r=i+1.5*s;let o=0;for(;o<e.length&&e[o]<t;)o++;let c=e.length-1;for(;c>=0&&e[c]>r;)c--;o<=c&&(l=e[o],a=e[c],u=e.slice(0,o).concat(e.slice(c+1)))}return{summary:[l,n,o,i,a],outliers:u,iqr:s}}function p(t,r={}){if(!Array.isArray(t)||0===t.length)return null;const e=t.slice().sort((t,r)=>t-r),n=e.length;let o=r.bandwidth;if(!("number"==typeof o&&o>0)){const t=function(t){const r=t.length;if(r<2)return 0;let e=0;for(let n=0;n<r;n++)e+=t[n];const n=e/r;let o=0;for(let e=0;e<r;e++){const r=t[e]-n;o+=r*r}return Math.sqrt(o/r)}(e),r=d(e,.75)-d(e,.25);o=.9*(r>0?Math.min(t,r/1.349):t)*Math.pow(n,-.2)}if(!isFinite(o)||o<=0){const t=e[0],r=Math.abs(t)>0?.001*Math.abs(t):.001;return{density:[[t-r,0],[t,1],[t+r,0]],bandwidth:r}}const i=Math.max(8,Math.floor(r.resolution||64)),s=e[0]-2*o,l=(e[n-1]+2*o-s)/(i-1),a=1/(n*o*Math.sqrt(2*Math.PI)),u=[];for(let t=0;t<i;t++){const r=s+t*l;let i=0;for(let t=0;t<n;t++){const n=(r-e[t])/o;i+=Math.exp(-.5*n*n)}u.push([r,i*a])}return{density:u,bandwidth:o}}function b(t,r){var e;if(!t||"object"!=typeof t||Array.isArray(t))return null;let n=null;if(Array.isArray(t.points)?n=t.points:Array.isArray(null==(e=t.y)?void 0:e.points)?n=t.y.points:r&&Array.isArray(t.y)&&"number"==typeof t.y[0]&&(n=t.y),!n)return null;const o=[];for(let t=0;t<n.length;t++){const r=f.parseNumber(n[t]);null!==r&&isFinite(r)&&o.push(r)}return o.length?o:null}const m=new WeakSet,g=new WeakSet;function v(t,r){var e,n;if(!Array.isArray(t))return t;const o=(null==(e=r.config.plotOptions)?void 0:e.violin)||{},i=o.kde||{},s=(null==(n=o.box)?void 0:n.whiskers)||"minmax";return t.map(t=>{if(!Array.isArray(null==t?void 0:t.data))return t;let r=!1;const e=t.data.map(t=>{var e,n;const o=Array.isArray(null==(e=null==t?void 0:t.y)?void 0:e.density)&&t.y.density.length>0,u=Array.isArray(null==(n=null==t?void 0:t.y)?void 0:n.summary)&&5===t.y.summary.length;if(o&&!m.has(t)){if(u&&!g.has(t))return t;const e=b(t,!1);if(!e)return t;const n=h(e,{whiskers:s});if(!n)return t;r=!0;const o=a(l({},t),{y:a(l({},t.y),{summary:n.summary})});return g.add(o),o}const c=b(t,!0);if(!c)return t;const y=p(c,{bandwidth:i.bandwidth,resolution:i.resolution});if(!y)return t;const f=h(c,{whiskers:s});r=!0;const d=a(l({},t),{y:l({density:y.density,points:c},f?{summary:f.summary}:{})});return m.add(d),d});return r?a(l({},t),{data:e}):t})}var A,w;A="raincloud","function"==typeof(w=v)&&(globalThis[y][A]=w),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>c.default}),exports.raincloudTransform=v;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
5
|
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((t="undefined"!=typeof globalThis?globalThis:t||self).ApexRaincloud={})}(this,function(t){"use strict";var r=Object.defineProperty,e=Object.defineProperties,n=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,a=(t,e,n)=>e in t?r(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,l=(t,r)=>{for(var e in r||(r={}))s.call(r,e)&&a(t,e,r[e]);if(o)for(var e of o(r))i.call(r,e)&&a(t,e,r[e]);return t},u=(t,r)=>e(t,n(r));const c=globalThis.ApexCharts,f="__apexcharts_series_transforms__";globalThis[f]||(globalThis[f]={});const y=globalThis.ApexCharts.__internals.__apex_Utils;function d(t,r){const e=t.length;if(0===e)return NaN;if(1===e)return t[0];const n=(e-1)*r,o=Math.floor(n),s=Math.ceil(n);return o===s?t[o]:t[o]+(t[s]-t[o])*(n-o)}function h(t,r={}){if(!Array.isArray(t)||0===t.length)return null;const e=t.slice().sort((t,r)=>t-r),n=d(e,.25),o=d(e,.5),s=d(e,.75),i=s-n;let a=e[0],l=e[e.length-1],u=[];if("tukey"===r.whiskers&&i>0){const t=n-1.5*i,r=s+1.5*i;let o=0;for(;o<e.length&&e[o]<t;)o++;let c=e.length-1;for(;c>=0&&e[c]>r;)c--;o<=c&&(a=e[o],l=e[c],u=e.slice(0,o).concat(e.slice(c+1)))}return{summary:[a,n,o,s,l],outliers:u,iqr:i}}function p(t,r={}){if(!Array.isArray(t)||0===t.length)return null;const e=t.slice().sort((t,r)=>t-r),n=e.length;let o=r.bandwidth;if(!("number"==typeof o&&o>0)){const t=function(t){const r=t.length;if(r<2)return 0;let e=0;for(let n=0;n<r;n++)e+=t[n];const n=e/r;let o=0;for(let e=0;e<r;e++){const r=t[e]-n;o+=r*r}return Math.sqrt(o/r)}(e),r=d(e,.75)-d(e,.25);o=.9*(r>0?Math.min(t,r/1.349):t)*Math.pow(n,-.2)}if(!isFinite(o)||o<=0){const t=e[0],r=Math.abs(t)>0?.001*Math.abs(t):.001;return{density:[[t-r,0],[t,1],[t+r,0]],bandwidth:r}}const s=Math.max(8,Math.floor(r.resolution||64)),i=e[0]-2*o,a=(e[n-1]+2*o-i)/(s-1),l=1/(n*o*Math.sqrt(2*Math.PI)),u=[];for(let t=0;t<s;t++){const r=i+t*a;let s=0;for(let t=0;t<n;t++){const n=(r-e[t])/o;s+=Math.exp(-.5*n*n)}u.push([r,s*l])}return{density:u,bandwidth:o}}function b(t,r){var e;if(!t||"object"!=typeof t||Array.isArray(t))return null;let n=null;if(Array.isArray(t.points)?n=t.points:Array.isArray(null==(e=t.y)?void 0:e.points)?n=t.y.points:r&&Array.isArray(t.y)&&"number"==typeof t.y[0]&&(n=t.y),!n)return null;const o=[];for(let t=0;t<n.length;t++){const r=y.parseNumber(n[t]);null!==r&&isFinite(r)&&o.push(r)}return o.length?o:null}const m=new WeakSet,g=new WeakSet;function A(t,r){var e,n;if(!Array.isArray(t))return t;const o=(null==(e=r.config.plotOptions)?void 0:e.violin)||{},s=o.kde||{},i=(null==(n=o.box)?void 0:n.whiskers)||"minmax";return t.map(t=>{if(!Array.isArray(null==t?void 0:t.data))return t;let r=!1;const e=t.data.map(t=>{var e,n;const o=Array.isArray(null==(e=null==t?void 0:t.y)?void 0:e.density)&&t.y.density.length>0,a=Array.isArray(null==(n=null==t?void 0:t.y)?void 0:n.summary)&&5===t.y.summary.length;if(o&&!m.has(t)){if(a&&!g.has(t))return t;const e=b(t,!1);if(!e)return t;const n=h(e,{whiskers:i});if(!n)return t;r=!0;const o=u(l({},t),{y:u(l({},t.y),{summary:n.summary})});return g.add(o),o}const c=b(t,!0);if(!c)return t;const f=p(c,{bandwidth:s.bandwidth,resolution:s.resolution});if(!f)return t;const y=h(c,{whiskers:i});r=!0;const d=u(l({},t),{y:l({density:f.density,points:c},y?{summary:y.summary}:{})});return m.add(d),d});return r?u(l({},t),{data:e}):t})}var v,w;v="raincloud","function"==typeof(w=A)?globalThis[f][v]=w:console.warn(`ApexCharts: registerSeriesTransform("${v}") expects a function (series, w) => series.`),t.default=c,t.raincloudTransform=A,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
5
|
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function t(t){if(t&&t.__esModule)return t;const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const e in t)if("default"!==e){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(s,e,i.get?i:{enumerable:!0,get:()=>t[e]})}return s.default=t,Object.freeze(s)}const s=t(require("apexcharts/core")),e=s.__apex_Graphics,i={fill:"fill",stroke:"stroke","stroke-width":"strokeWidth","stroke-dasharray":"strokeDash","stroke-linecap":"lineCap","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","fill-rule":"fillRule"},r=Symbol("never"),l={circle:0,square:1,rect:1,triangle:2,diamond:3,star:4,sparkle:5,cross:6,plus:7,line:8},a=["circle","square","triangle","diamond","star","sparkle","cross","plus","line"],n={attr:()=>n,plot:()=>n,during:()=>n,after:t=>("function"==typeof t&&t(),n),animate:()=>n,delay:()=>n,loop:()=>n,finish:()=>n,stop:()=>n},h={nodeName:"path",style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(){},getAttribute:()=>null,removeAttribute(){},hasAttribute:()=>!1,addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>({x:0,y:0,width:0,height:0})},o={__isCanvasMark:!0,node:{nodeName:"g",instance:null,style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(){},getAttribute:()=>null,removeAttribute(){},addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>({x:0,y:0,width:0,height:0})},attr:()=>o,add:()=>o,addTo:()=>o,remove:()=>o,clear:()=>o,css:()=>o,hide:()=>o,show:()=>o,removeClass:()=>o,animate:()=>n};class c{constructor(t,s){this.__isCanvasMark=!0,this._g=t,this._i=s}get node(){return h}attr(t,s){return"string"==typeof t?("fill"===t&&void 0!==s&&this._g._setMarkerFill(this._i,s),void 0===s?null:this):(t&&void 0!==t.fill&&this._g._setMarkerFill(this._i,t.fill),this)}add(t){return this}addTo(t){return this}remove(){return this}css(t){return this}fill(t){return void 0!==t&&this._g._setMarkerFill(this._i,t),this}stroke(t){return this}hide(){return this}show(){return this}removeClass(t){return this}animate(){return n}}const _={__isCanvasMark:!0,node:h,attr:()=>_,add:()=>_,addTo:()=>_,remove:()=>_,css:()=>_,animate:()=>n};class d{constructor(t){this.__isCanvasMark=!0,this._cmd=t;const s=this;this.node={nodeName:t?t.tag:"g",instance:this,style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(t,e){s._applyAttr(t,e)},getAttribute:()=>null,removeAttribute(){},hasAttribute:()=>!1,addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>({x:0,y:0,width:0,height:0})}}_applyAttr(t,s){const e=this._cmd;if(!e)return;const r=i[t];void 0!==r&&(e[r]=s)}attr(t,s){if("string"==typeof t)return void 0===s?null:(this._applyAttr(t,s),this);for(const s in t)void 0!==t[s]&&this._applyAttr(s,t[s]);return this}add(t){return this}addTo(t){return this}remove(){return this}clear(){return this}css(t){return this}fill(t){return"object"==typeof t?this.attr(t):this.attr("fill",t)}stroke(t){return"object"==typeof t?(void 0!==t.color&&this.attr("stroke",t.color),void 0!==t.width&&this.attr("stroke-width",t.width),this):this.attr("stroke",t)}plot(t){return"string"==typeof t&&this._cmd&&"path"===this._cmd.tag&&(this._cmd.d=t),this}hide(){return this}show(){return this}removeClass(t){return this}bbox(){return{x:0,y:0,width:0,height:0}}animate(){return n}}class u{constructor(t){this.w=t,this._g=new e(t),this._list=[],this._mx=new Float64Array(16),this._my=new Float64Array(16),this._msize=new Float64Array(16),this._mshape=new Int16Array(16),this._mstyle=new Int32Array(16),this._msi=new Int32Array(16),this._mn=0,this._mcap=16,this._crx=new Float64Array(16),this._cry=new Float64Array(16),this._crw=new Float64Array(16),this._crh=new Float64Array(16),this._crstyle=new Int32Array(16),this._crsi=new Int32Array(16),this._crdi=new Int32Array(16),this._crn=0,this._crcap=16,this._cellRadius=0,this._styles=[],this._styleMap=new Map,this._lf=r,this._ls=r,this._lsw=r,this._ld=r,this._lfo=r,this._lso=r,this._lid=-1,this._lofFill=r,this._lofBase=-1,this._lofId=-1,this._rlf=r,this._rls=r,this._rlsw=r,this._rlfo=r,this._rlso=r,this._rlid=-1}_resetStyleCache(){this._lf=r,this._ls=r,this._lsw=r,this._ld=r,this._lfo=r,this._lso=r,this._lid=-1,this._lofFill=r,this._lofBase=-1,this._lofId=-1,this._rlf=r,this._rls=r,this._rlsw=r,this._rlfo=r,this._rlso=r,this._rlid=-1}reset(){this._list=[],this._mn=0,this._styles=[],this._styleMap=new Map,this._resetStyleCache();const t=this.w.config.series||[];let s=16;for(let e=0;e<t.length;e++){const i=t[e]&&t[e].data;Array.isArray(i)&&(s+=i.length)}s=Math.ceil(1.15*s)+16,s>this._mcap&&this._allocMarkers(s),this._crn=0,this._cellRadius=0,s>this._crcap&&this._allocRects(s)}_allocRects(t){this._crcap=t,this._crx=new Float64Array(t),this._cry=new Float64Array(t),this._crw=new Float64Array(t),this._crh=new Float64Array(t),this._crstyle=new Int32Array(t),this._crsi=new Int32Array(t),this._crdi=new Int32Array(t)}_growRects(){const t=2*this._crcap,s=new Float64Array(t);s.set(this._crx),this._crx=s;const e=new Float64Array(t);e.set(this._cry),this._cry=e;const i=new Float64Array(t);i.set(this._crw),this._crw=i;const r=new Float64Array(t);r.set(this._crh),this._crh=r;const l=new Int32Array(t);l.set(this._crstyle),this._crstyle=l;const a=new Int32Array(t);a.set(this._crsi),this._crsi=a;const n=new Int32Array(t);n.set(this._crdi),this._crdi=n,this._crcap=t}_allocMarkers(t){this._mcap=t,this._mx=new Float64Array(t),this._my=new Float64Array(t),this._msize=new Float64Array(t),this._mshape=new Int16Array(t),this._mstyle=new Int32Array(t),this._msi=new Int32Array(t)}_growMarkers(){const t=2*this._mcap,s=new Float64Array(t);s.set(this._mx),this._mx=s;const e=new Float64Array(t);e.set(this._my),this._my=e;const i=new Float64Array(t);i.set(this._msize),this._msize=i;const r=new Int16Array(t);r.set(this._mshape),this._mshape=r;const l=new Int32Array(t);l.set(this._mstyle),this._mstyle=l;const a=new Int32Array(t);a.set(this._msi),this._msi=a,this._mcap=t}displayList(){return this._list}markerCount(){return this._mn}_internStyle(t,s,e,i,r,l){const a=`${t}|${s}|${e}|${i}|${r}|${l}`,n=this._styleMap.get(a);if(void 0!==n)return n;const h=this._styles.length;return this._styles.push({fill:t,stroke:s,strokeWidth:e,strokeDash:i,fillOpacity:r,strokeOpacity:l}),this._styleMap.set(a,h),h}_setMarkerFill(t,s){const e=this._mstyle[t];if(s===this._lofFill&&e===this._lofBase)return void(this._mstyle[t]=this._lofId);const i=this._styles[e];if(!i||i.fill===s)return this._lofFill=s,this._lofBase=e,void(this._lofId=e);const r=this._internStyle(s,i.stroke,i.strokeWidth,i.strokeDash,i.fillOpacity,i.strokeOpacity);this._mstyle[t]=r,this._lofFill=s,this._lofBase=e,this._lofId=r}markerStyle(t){return this._styles[this._mstyle[t]]}markerSeries(t){return this._msi[t]}shapeName(t){return a[t]||"circle"}drawRectCell(t,s,e,i,r={}){const l=this._rectStyleId(r);this._crn>=this._crcap&&this._growRects();const a=this._crn++;return this._crx[a]=t||0,this._cry[a]=s||0,this._crw[a]=e>0?e:0,this._crh[a]=i>0?i:0,this._crstyle[a]=l,this._crsi[a]=null==r.seriesIndex?-1:r.seriesIndex,this._crdi[a]=null==r.dataPointIndex?-1:r.dataPointIndex,r.radius&&(this._cellRadius=r.radius),_}_rectStyleId(t){const s=t.fill,e=t.stroke,i=t.strokeWidth,r=t.fillOpacity,l=t.strokeOpacity;if(s===this._rlf&&e===this._rls&&i===this._rlsw&&r===this._rlfo&&l===this._rlso)return this._rlid;const a=this._internStyle(s,e,i,0,r,l);return this._rlf=s,this._rls=e,this._rlsw=i,this._rlfo=r,this._rlso=l,this._rlid=a,a}rectCount(){return this._crn}rectStyle(t){return this._styles[this._crstyle[t]]}rectSeries(t){return this._crsi[t]}_cmd(t,s){const e={tag:t,z:s||0,fill:void 0,stroke:void 0,strokeWidth:void 0,strokeDash:void 0,lineCap:void 0,fillOpacity:void 0,strokeOpacity:void 0,fillRule:void 0};return this._list.push(e),e}group(t){return o}drawMarker(t,s,e={}){var i;const r=this._markerStyleId(e);this._mn>=this._mcap&&this._growMarkers();const a=this._mn++;return this._mx[a]=t||0,this._my[a]="number"==typeof s?s:NaN,this._msize[a]=e.pSize||0,this._mshape[a]=null!=(i=l[e.shape||"circle"])?i:0,this._mstyle[a]=r,this._msi[a]=null==e.seriesIndex?-1:e.seriesIndex,new c(this,a)}_markerStyleId(t){const s=t.shape||"circle",e="line"===s||"plus"===s||"cross"===s,i=e?"none":t.pointFillColor,r=e?t.pointFillColor:t.pointStrokeColor,l=t.pointStrokeWidth,a=t.pointStrokeDashArray,n=t.pointFillOpacity,h=e?t.pointFillOpacity:t.pointStrokeOpacity;if(i===this._lf&&r===this._ls&&l===this._lsw&&a===this._ld&&n===this._lfo&&h===this._lso)return this._lid;const o=this._internStyle(i,r,l,a,n,h);return this._lf=i,this._ls=r,this._lsw=l,this._ld=a,this._lfo=n,this._lso=h,this._lid=o,o}renderPaths(t){const s=this._cmd("path",t.realIndex);return s.d=t.pathTo,t.pathToNumeric&&(s.nxs=t.pathToNumeric.xs,s.nys=t.pathToNumeric.ys,s.ncloseY=t.pathToNumeric.closeY),s.stroke=t.stroke,s.strokeWidth=t.strokeWidth,s.fill=t.fill,s.lineCap=t.strokeLinecap,s.si=t.realIndex,this.w.globals.animationEnded=!0,new d(s)}drawPath(t){const s=this._cmd("path",0);return s.d=t.d,s.stroke=t.stroke,s.strokeWidth=t.strokeWidth,s.fill=t.fill,s.fillOpacity=t.fillOpacity,s.strokeOpacity=t.strokeOpacity,s.lineCap=t.strokeLinecap,s.strokeDash=t.strokeDashArray,new d(s)}drawLine(t,s,e,i,r="#a8a8a8",l=0,a=1){const n=this._cmd("line",0);return n.lx1=t,n.ly1=s,n.lx2=e,n.ly2=i,n.stroke=r,n.strokeDash=l,n.strokeWidth=a,new d(n)}drawRect(t=0,s=0,e=0,i=0,r=0,l="#fefefe",a=1,n=null,h=null,o=0){const c=this._cmd("rect",0);return c.x1=t,c.y1=s,c.rw=e>0?e:0,c.rh=i>0?i:0,c.radius=r,c.fill=l,c.fillOpacity=a,null!=h&&(c.stroke=h,c.strokeWidth=null==n?1:n,c.strokeDash=o),new d(c)}drawCircle(t,s=null){const e=this._cmd("circle",0);return e.r=t<0?0:t,s&&(e.cx=s.cx,e.cy=s.cy,void 0!==s.fill&&(e.fill=s.fill),void 0!==s.stroke&&(e.stroke=s.stroke)),new d(e)}drawText(t){const s=this._cmd("text",0);return s.text=Array.isArray(t.text)?t.text.join(" "):t.text,s.tx=t.x,s.ty=t.y,s.textAnchor=t.textAnchor||"start",s.fontSize=t.fontSize,s.fontFamily=t.fontFamily,s.fill=t.foreColor,new d(s)}markerPath(t,s,e,i){return this._g.getMarkerPath(t,s,a[e]||"circle",i)}}const p=s.__apex_SVGElement,y=s.__apex_math_SVGNS,f=s.__apex_BrowserAPIs_BrowserAPIs,m=2*Math.PI;class g{constructor(t){this.w=t,this._host=null,this._canvas=null,this._c2d=null,this._margin=0,this._dpr=1,this._dim=null,this._alpha=1,this._unitPaths=new Map,this._markerBatches=0}markerBatchCount(){return this._markerBatches}_seriesAlpha(t){const s=this._dim;return!s||null==s.active||s.active<0||null==t||t<0||t===s.active?1:null==s.opacity?.2:s.opacity}_plotDims(){var t;const s=Math.max(0,Math.ceil(this.w.layout.gridWidth||0)),e=Math.max(0,Math.ceil(this.w.layout.gridHeight||0)),i=(null==(t=this.w.globals.markers)?void 0:t.largestSize)||0;return{gw:s,gh:e,margin:Math.ceil(i+8)}}createHost(){const t=f.getWindow();this._dpr=Math.min(2,t&&t.devicePixelRatio||1);const{gw:s,gh:e,margin:i}=this._plotDims();this._margin=i;const r=s+2*i,l=e+2*i,a=f.createElementNS(y,"foreignObject");a.setAttribute("x",String(-i)),a.setAttribute("y",String(-i)),a.setAttribute("width",String(r)),a.setAttribute("height",String(l)),a.setAttribute("class","apexcharts-canvas-series"),a.style.overflow="visible";const n=f.createElement("canvas");return n.setAttribute("class","apexcharts-series-canvas"),n.width=Math.max(1,Math.round(r*this._dpr)),n.height=Math.max(1,Math.round(l*this._dpr)),n.style.width=r+"px",n.style.height=l+"px",n.style.pointerEvents="none",a.appendChild(n),this._canvas=n,this._c2d=n.getContext("2d"),this._host=new p(a),this._host}getHost(){return this._host}clear(){this._c2d&&this._canvas&&(this._c2d.setTransform(1,0,0,1,0,0),this._c2d.clearRect(0,0,this._canvas.width,this._canvas.height))}_syncDpr(){if(!this._canvas)return;const t=f.getWindow(),s=Math.min(2,t&&t.devicePixelRatio||1);if(s===this._dpr)return;this._dpr=s;const e=parseFloat(this._canvas.style.width)||0,i=parseFloat(this._canvas.style.height)||0;this._canvas.width=Math.max(1,Math.round(e*s)),this._canvas.height=Math.max(1,Math.round(i*s))}paint(t,s,e=null){const i=this._c2d;if(!i)return;this._dim=e||null,this._syncDpr(),this.clear();const r=this._dpr,l=this._margin;if(i.setTransform(r,0,0,r,l*r,l*r),t.length){const s=t.length>1?t.map((t,s)=>[t,s]).sort((t,s)=>t[0].z===s[0].z?t[1]-s[1]:t[0].z-s[0].z).map(t=>t[0]):t;for(let t=0;t<s.length;t++){const e=s[t];this._alpha=this._dim?this._seriesAlpha(e.si):1,this._paintOne(i,e)}}this._paintRects(i,s),this._paintMarkers(i,s),this._alpha=1}_paintRects(t,s){const e=s.rectCount?s.rectCount():0;if(!e)return;const i=s._crx,r=s._cry,l=s._crw,a=s._crh,n=s._crstyle,h=s._cellRadius||0,o=t,c=h>0&&"function"==typeof o.roundRect,_=!!this._dim,d=Math.max(0,this.w.layout.gridWidth||0),u=Math.max(0,this.w.layout.gridHeight||0);t.save(),t.beginPath(),t.rect(0,0,d,u),t.clip();let p=0;for(;p<e;){const d=n[p],u=s.rectStyle(p);if(!u){p++;continue}const y=u.fill,f=y&&"none"!==y&&!("string"==typeof y&&0===y.indexOf("url(")),m=u.stroke,g=null==u.strokeWidth?0:Number(u.strokeWidth),w=m&&"none"!==m&&g>0&&!("string"==typeof m&&0===m.indexOf("url("));f&&(t.fillStyle=y),w&&(t.strokeStyle=m,t.lineWidth=g,t.setLineDash([]));const k=null==u.fillOpacity?1:Number(u.fillOpacity),A=null==u.strokeOpacity?1:Number(u.strokeOpacity);let x=p;for(;x<e&&n[x]===d;){const e=l[x],n=a[x];if(e>0&&n>0){const l=_?this._seriesAlpha(s.rectSeries(x)):1;c?(t.beginPath(),o.roundRect(i[x],r[x],e,n,h),f&&(t.globalAlpha=k*l,t.fill()),w&&(t.globalAlpha=A*l,t.stroke())):(f&&(t.globalAlpha=k*l,t.fillRect(i[x],r[x],e,n)),w&&(t.globalAlpha=A*l,t.strokeRect(i[x],r[x],e,n)))}x++}p=x}t.globalAlpha=1,t.restore()}_unitPath(t,s,e){const i=s+"|"+e;let r=this._unitPaths.get(i);if(void 0===r){try{r=new Path2D(t.markerPath(0,0,s,e))}catch(t){r=null}this._unitPaths.set(i,r)}return r}_paintMarkers(t,s){this._markerBatches=0;const e=s.markerCount();if(!e)return;const i=s._mx,r=s._my,l=s._msize,a=s._mshape,n=s._mstyle,h=!!this._dim;h||(this._alpha=1);let o=0;for(;o<e;){const c=n[o],_=a[o],d=s.markerStyle(o);if(!d){o++;continue}const u=this._applyFill(t,d),p=this._applyStroke(t,d);this._markerBatches++;const y=null==d.fillOpacity?1:Number(d.fillOpacity),f=null==d.strokeOpacity?1:Number(d.strokeOpacity);if(0===_){let _=o;for(;_<e&&0===a[_]&&n[_]===c;){const e=l[_]||0,a=r[_];if(e>0&&a==a)if(t.beginPath(),t.arc(i[_],a,e,0,m),h){const e=this._seriesAlpha(s.markerSeries(_));u&&(t.globalAlpha=y*e,t.fill()),p&&(t.globalAlpha=f*e,t.stroke())}else u&&t.fill(),p&&t.stroke();_++}t.globalAlpha=1,o=_}else{const d=this._dpr,m=this._margin;let g=o;for(;g<e&&a[g]===_&&n[g]===c;){const e=r[g],a=l[g];if(e==e&&a>0){const r=this._unitPath(s,_,a);if(r){t.setTransform(d,0,0,d,(m+i[g])*d,(m+e)*d);const l=h?this._seriesAlpha(s.markerSeries(g)):1;u&&(t.globalAlpha=y*l,t.fill(r)),p&&(t.globalAlpha=f*l,t.stroke(r))}}g++}t.setTransform(d,0,0,d,m*d,m*d),t.globalAlpha=1,o=g}}}_paintNumericPath(t,s){const e=s.nxs,i=s.nys,r=e.length;if(r){t.beginPath(),t.moveTo(e[0],i[0]);for(let s=1;s<r;s++)t.lineTo(e[s],i[s]);null!=s.ncloseY&&(t.lineTo(e[r-1],s.ncloseY),t.lineTo(e[0],s.ncloseY),t.closePath()),this._applyFill(t,s)&&t.fill("evenodd"===s.fillRule?"evenodd":"nonzero"),this._applyStroke(t,s)&&t.stroke(),t.globalAlpha=1}}_paintOne(t,s){switch(s.tag){case"path":if(s.nxs){this._paintNumericPath(t,s);break}if(!s.d)return;if(!s.path2d)try{s.path2d=new Path2D(s.d)}catch(t){return}this._fillStrokePath(t,s,s.path2d);break;case"rect":{const e=new Path2D;s.radius&&"function"==typeof e.roundRect?e.roundRect(s.x1,s.y1,s.rw,s.rh,s.radius):e.rect(s.x1,s.y1,s.rw,s.rh),this._fillStrokePath(t,s,e);break}case"circle":if(!(s.r>0))return;t.beginPath(),t.arc(s.cx,s.cy,s.r,0,m),this._fillStroke(t,s);break;case"line":t.beginPath(),t.moveTo(s.lx1,s.ly1),t.lineTo(s.lx2,s.ly2),this._strokeOnly(t,s);break;case"text":{if(null==s.text)return;t.save(),t.globalAlpha=this._alpha,t.fillStyle=s.fill||"#000";const e=s.fontSize||"11px";t.font=`${"number"==typeof e?e+"px":e} ${s.fontFamily||"Helvetica, Arial, sans-serif"}`,t.textAlign="middle"===s.textAnchor?"center":"end"===s.textAnchor?"right":"left",t.fillText(String(s.text),s.tx,s.ty),t.restore();break}}}_fillStrokePath(t,s,e){this._applyFill(t,s)&&t.fill(e,"evenodd"===s.fillRule?"evenodd":"nonzero"),this._applyStroke(t,s)&&t.stroke(e),t.globalAlpha=1}_fillStroke(t,s){this._applyFill(t,s)&&t.fill(),this._applyStroke(t,s)&&t.stroke(),t.globalAlpha=1}_strokeOnly(t,s){this._applyStroke(t,s)&&t.stroke(),t.globalAlpha=1}_applyFill(t,s){const e=s.fill;return!(!e||"none"===e)&&(("string"!=typeof e||0!==e.indexOf("url("))&&(t.globalAlpha=(null==s.fillOpacity?1:Number(s.fillOpacity))*this._alpha,t.fillStyle=e,!0))}_applyStroke(t,s){const e=s.stroke,i=null==s.strokeWidth?1:Number(s.strokeWidth);if(!(e&&"none"!==e&&i>0))return!1;if("string"==typeof e&&0===e.indexOf("url("))return!1;t.globalAlpha=(null==s.strokeOpacity?1:Number(s.strokeOpacity))*this._alpha,t.strokeStyle=e,t.lineWidth=i,t.lineCap=s.lineCap||"butt";const r=s.strokeDash;return r&&0!==r?t.setLineDash(Array.isArray(r)?r:[Number(r)]):t.setLineDash([]),!0}toDataURL(){return this._canvas?this._canvas.toDataURL():null}destroy(){this._host=null,this._canvas=null,this._c2d=null,this._unitPaths.clear()}}class w{constructor(t,s){this.w=t,this.ctx=s,this.kind="canvas",this._g=new u(t),this._compositor=new g(t)}beginSeries(){this._g.reset()}present(){const t=this._compositor.createHost();return this._compositor.paint(this._g.displayList(),this._g),t}clear(){this._compositor.clear()}canRepaintInPlace(){const t=this._compositor.getHost();return!!(t&&t.node&&t.node.isConnected)}repaintInPlace(){this._compositor.paint(this._g.displayList(),this._g)}group(t){return this._g.group(t)}drawPath(t){return this._g.drawPath(t)}drawLine(...t){return this._g.drawLine(...t)}drawRect(...t){return this._g.drawRect(...t)}drawRectCell(t,s,e,i,r){return this._g.drawRectCell(t,s,e,i,r)}drawCircle(t,s){return this._g.drawCircle(t,s)}drawMarker(t,s,e){return this._g.drawMarker(t,s,e)}renderPaths(t){return this._g.renderPaths(t)}drawText(t){return this._g.drawText(t)}supports(t){return"solidFill"===t||"dashArray"===t}hitTest(t,s){const e=this._g,i=e.rectCount?e.rectCount():0;if(!i)return null;const r=e._crx,l=e._cry,a=e._crw,n=e._crh;for(let h=i-1;h>=0;h--){const i=a[h],o=n[h];if(!(i<=0||o<=0)&&(t>=r[h]&&t<r[h]+i&&s>=l[h]&&s<l[h]+o))return{seriesIndex:e._crsi[h],dataPointIndex:e._crdi[h],x:r[h],y:l[h],width:i,height:o}}return null}restyle(t){this._compositor.paint(this._g.displayList(),this._g,t||null)}toBitmap(){const t=this._compositor.toDataURL();if(!t)return null;const s=this.w.globals,e=this.w.config.chart,i=this._compositor._margin;return{dataURL:t,x:(s.translateX||0)+(e.offsetX||0)-i,y:(s.translateY||0)+(e.offsetY||0)-i,w:(this.w.layout.gridWidth||0)+2*i,h:(this.w.layout.gridHeight||0)+2*i}}destroy(){this._compositor.destroy()}}s.default.registerRenderer("canvas",(t,s)=>new w(t,s)),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>s.default});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
5
|
!function(t,s){"object"==typeof exports&&"undefined"!=typeof module?s(exports):"function"==typeof define&&define.amd?define(["exports"],s):s((t="undefined"!=typeof globalThis?globalThis:t||self).ApexRendererCanvas={})}(this,function(t){"use strict";const s=globalThis.ApexCharts,e=globalThis.ApexCharts.__internals.__apex_Graphics,i={fill:"fill",stroke:"stroke","stroke-width":"strokeWidth","stroke-dasharray":"strokeDash","stroke-linecap":"lineCap","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","fill-rule":"fillRule"},r=Symbol("never"),l={circle:0,square:1,rect:1,triangle:2,diamond:3,star:4,sparkle:5,cross:6,plus:7,line:8},a=["circle","square","triangle","diamond","star","sparkle","cross","plus","line"],n={attr:()=>n,plot:()=>n,during:()=>n,after:t=>("function"==typeof t&&t(),n),animate:()=>n,delay:()=>n,loop:()=>n,finish:()=>n,stop:()=>n},h={nodeName:"path",style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(){},getAttribute:()=>null,removeAttribute(){},hasAttribute:()=>!1,addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>({x:0,y:0,width:0,height:0})},o={__isCanvasMark:!0,node:{nodeName:"g",instance:null,style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(){},getAttribute:()=>null,removeAttribute(){},addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>({x:0,y:0,width:0,height:0})},attr:()=>o,add:()=>o,addTo:()=>o,remove:()=>o,clear:()=>o,css:()=>o,hide:()=>o,show:()=>o,removeClass:()=>o,animate:()=>n};class c{constructor(t,s){this.__isCanvasMark=!0,this._g=t,this._i=s}get node(){return h}attr(t,s){return"string"==typeof t?("fill"===t&&void 0!==s&&this._g._setMarkerFill(this._i,s),void 0===s?null:this):(t&&void 0!==t.fill&&this._g._setMarkerFill(this._i,t.fill),this)}add(t){return this}addTo(t){return this}remove(){return this}css(t){return this}fill(t){return void 0!==t&&this._g._setMarkerFill(this._i,t),this}stroke(t){return this}hide(){return this}show(){return this}removeClass(t){return this}animate(){return n}}const _={__isCanvasMark:!0,node:h,attr:()=>_,add:()=>_,addTo:()=>_,remove:()=>_,css:()=>_,animate:()=>n};class d{constructor(t){this.__isCanvasMark=!0,this._cmd=t;const s=this;this.node={nodeName:t?t.tag:"g",instance:this,style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(t,e){s._applyAttr(t,e)},getAttribute:()=>null,removeAttribute(){},hasAttribute:()=>!1,addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>({x:0,y:0,width:0,height:0})}}_applyAttr(t,s){const e=this._cmd;if(!e)return;const r=i[t];void 0!==r&&(e[r]=s)}attr(t,s){if("string"==typeof t)return void 0===s?null:(this._applyAttr(t,s),this);for(const s in t)void 0!==t[s]&&this._applyAttr(s,t[s]);return this}add(t){return this}addTo(t){return this}remove(){return this}clear(){return this}css(t){return this}fill(t){return"object"==typeof t?this.attr(t):this.attr("fill",t)}stroke(t){return"object"==typeof t?(void 0!==t.color&&this.attr("stroke",t.color),void 0!==t.width&&this.attr("stroke-width",t.width),this):this.attr("stroke",t)}plot(t){return"string"==typeof t&&this._cmd&&"path"===this._cmd.tag&&(this._cmd.d=t),this}hide(){return this}show(){return this}removeClass(t){return this}bbox(){return{x:0,y:0,width:0,height:0}}animate(){return n}}class p{constructor(t){this.w=t,this._g=new e(t),this._list=[],this._mx=new Float64Array(16),this._my=new Float64Array(16),this._msize=new Float64Array(16),this._mshape=new Int16Array(16),this._mstyle=new Int32Array(16),this._msi=new Int32Array(16),this._mn=0,this._mcap=16,this._crx=new Float64Array(16),this._cry=new Float64Array(16),this._crw=new Float64Array(16),this._crh=new Float64Array(16),this._crstyle=new Int32Array(16),this._crsi=new Int32Array(16),this._crdi=new Int32Array(16),this._crn=0,this._crcap=16,this._cellRadius=0,this._styles=[],this._styleMap=new Map,this._lf=r,this._ls=r,this._lsw=r,this._ld=r,this._lfo=r,this._lso=r,this._lid=-1,this._lofFill=r,this._lofBase=-1,this._lofId=-1,this._rlf=r,this._rls=r,this._rlsw=r,this._rlfo=r,this._rlso=r,this._rlid=-1}_resetStyleCache(){this._lf=r,this._ls=r,this._lsw=r,this._ld=r,this._lfo=r,this._lso=r,this._lid=-1,this._lofFill=r,this._lofBase=-1,this._lofId=-1,this._rlf=r,this._rls=r,this._rlsw=r,this._rlfo=r,this._rlso=r,this._rlid=-1}reset(){this._list=[],this._mn=0,this._styles=[],this._styleMap=new Map,this._resetStyleCache();const t=this.w.config.series||[];let s=16;for(let e=0;e<t.length;e++){const i=t[e]&&t[e].data;Array.isArray(i)&&(s+=i.length)}s=Math.ceil(1.15*s)+16,s>this._mcap&&this._allocMarkers(s),this._crn=0,this._cellRadius=0,s>this._crcap&&this._allocRects(s)}_allocRects(t){this._crcap=t,this._crx=new Float64Array(t),this._cry=new Float64Array(t),this._crw=new Float64Array(t),this._crh=new Float64Array(t),this._crstyle=new Int32Array(t),this._crsi=new Int32Array(t),this._crdi=new Int32Array(t)}_growRects(){const t=2*this._crcap,s=new Float64Array(t);s.set(this._crx),this._crx=s;const e=new Float64Array(t);e.set(this._cry),this._cry=e;const i=new Float64Array(t);i.set(this._crw),this._crw=i;const r=new Float64Array(t);r.set(this._crh),this._crh=r;const l=new Int32Array(t);l.set(this._crstyle),this._crstyle=l;const a=new Int32Array(t);a.set(this._crsi),this._crsi=a;const n=new Int32Array(t);n.set(this._crdi),this._crdi=n,this._crcap=t}_allocMarkers(t){this._mcap=t,this._mx=new Float64Array(t),this._my=new Float64Array(t),this._msize=new Float64Array(t),this._mshape=new Int16Array(t),this._mstyle=new Int32Array(t),this._msi=new Int32Array(t)}_growMarkers(){const t=2*this._mcap,s=new Float64Array(t);s.set(this._mx),this._mx=s;const e=new Float64Array(t);e.set(this._my),this._my=e;const i=new Float64Array(t);i.set(this._msize),this._msize=i;const r=new Int16Array(t);r.set(this._mshape),this._mshape=r;const l=new Int32Array(t);l.set(this._mstyle),this._mstyle=l;const a=new Int32Array(t);a.set(this._msi),this._msi=a,this._mcap=t}displayList(){return this._list}markerCount(){return this._mn}_internStyle(t,s,e,i,r,l){const a=`${t}|${s}|${e}|${i}|${r}|${l}`,n=this._styleMap.get(a);if(void 0!==n)return n;const h=this._styles.length;return this._styles.push({fill:t,stroke:s,strokeWidth:e,strokeDash:i,fillOpacity:r,strokeOpacity:l}),this._styleMap.set(a,h),h}_setMarkerFill(t,s){const e=this._mstyle[t];if(s===this._lofFill&&e===this._lofBase)return void(this._mstyle[t]=this._lofId);const i=this._styles[e];if(!i||i.fill===s)return this._lofFill=s,this._lofBase=e,void(this._lofId=e);const r=this._internStyle(s,i.stroke,i.strokeWidth,i.strokeDash,i.fillOpacity,i.strokeOpacity);this._mstyle[t]=r,this._lofFill=s,this._lofBase=e,this._lofId=r}markerStyle(t){return this._styles[this._mstyle[t]]}markerSeries(t){return this._msi[t]}shapeName(t){return a[t]||"circle"}drawRectCell(t,s,e,i,r={}){const l=this._rectStyleId(r);this._crn>=this._crcap&&this._growRects();const a=this._crn++;return this._crx[a]=t||0,this._cry[a]=s||0,this._crw[a]=e>0?e:0,this._crh[a]=i>0?i:0,this._crstyle[a]=l,this._crsi[a]=null==r.seriesIndex?-1:r.seriesIndex,this._crdi[a]=null==r.dataPointIndex?-1:r.dataPointIndex,r.radius&&(this._cellRadius=r.radius),_}_rectStyleId(t){const s=t.fill,e=t.stroke,i=t.strokeWidth,r=t.fillOpacity,l=t.strokeOpacity;if(s===this._rlf&&e===this._rls&&i===this._rlsw&&r===this._rlfo&&l===this._rlso)return this._rlid;const a=this._internStyle(s,e,i,0,r,l);return this._rlf=s,this._rls=e,this._rlsw=i,this._rlfo=r,this._rlso=l,this._rlid=a,a}rectCount(){return this._crn}rectStyle(t){return this._styles[this._crstyle[t]]}rectSeries(t){return this._crsi[t]}_cmd(t,s){const e={tag:t,z:s||0,fill:void 0,stroke:void 0,strokeWidth:void 0,strokeDash:void 0,lineCap:void 0,fillOpacity:void 0,strokeOpacity:void 0,fillRule:void 0};return this._list.push(e),e}group(t){return o}drawMarker(t,s,e={}){var i;const r=this._markerStyleId(e);this._mn>=this._mcap&&this._growMarkers();const a=this._mn++;return this._mx[a]=t||0,this._my[a]="number"==typeof s?s:NaN,this._msize[a]=e.pSize||0,this._mshape[a]=null!=(i=l[e.shape||"circle"])?i:0,this._mstyle[a]=r,this._msi[a]=null==e.seriesIndex?-1:e.seriesIndex,new c(this,a)}_markerStyleId(t){const s=t.shape||"circle",e="line"===s||"plus"===s||"cross"===s,i=e?"none":t.pointFillColor,r=e?t.pointFillColor:t.pointStrokeColor,l=t.pointStrokeWidth,a=t.pointStrokeDashArray,n=t.pointFillOpacity,h=e?t.pointFillOpacity:t.pointStrokeOpacity;if(i===this._lf&&r===this._ls&&l===this._lsw&&a===this._ld&&n===this._lfo&&h===this._lso)return this._lid;const o=this._internStyle(i,r,l,a,n,h);return this._lf=i,this._ls=r,this._lsw=l,this._ld=a,this._lfo=n,this._lso=h,this._lid=o,o}renderPaths(t){const s=this._cmd("path",t.realIndex);return s.d=t.pathTo,t.pathToNumeric&&(s.nxs=t.pathToNumeric.xs,s.nys=t.pathToNumeric.ys,s.ncloseY=t.pathToNumeric.closeY),s.stroke=t.stroke,s.strokeWidth=t.strokeWidth,s.fill=t.fill,s.lineCap=t.strokeLinecap,s.si=t.realIndex,this.w.globals.animationEnded=!0,new d(s)}drawPath(t){const s=this._cmd("path",0);return s.d=t.d,s.stroke=t.stroke,s.strokeWidth=t.strokeWidth,s.fill=t.fill,s.fillOpacity=t.fillOpacity,s.strokeOpacity=t.strokeOpacity,s.lineCap=t.strokeLinecap,s.strokeDash=t.strokeDashArray,new d(s)}drawLine(t,s,e,i,r="#a8a8a8",l=0,a=1){const n=this._cmd("line",0);return n.lx1=t,n.ly1=s,n.lx2=e,n.ly2=i,n.stroke=r,n.strokeDash=l,n.strokeWidth=a,new d(n)}drawRect(t=0,s=0,e=0,i=0,r=0,l="#fefefe",a=1,n=null,h=null,o=0){const c=this._cmd("rect",0);return c.x1=t,c.y1=s,c.rw=e>0?e:0,c.rh=i>0?i:0,c.radius=r,c.fill=l,c.fillOpacity=a,null!=h&&(c.stroke=h,c.strokeWidth=null==n?1:n,c.strokeDash=o),new d(c)}drawCircle(t,s=null){const e=this._cmd("circle",0);return e.r=t<0?0:t,s&&(e.cx=s.cx,e.cy=s.cy,void 0!==s.fill&&(e.fill=s.fill),void 0!==s.stroke&&(e.stroke=s.stroke)),new d(e)}drawText(t){const s=this._cmd("text",0);return s.text=Array.isArray(t.text)?t.text.join(" "):t.text,s.tx=t.x,s.ty=t.y,s.textAnchor=t.textAnchor||"start",s.fontSize=t.fontSize,s.fontFamily=t.fontFamily,s.fill=t.foreColor,new d(s)}markerPath(t,s,e,i){return this._g.getMarkerPath(t,s,a[e]||"circle",i)}}const u=globalThis.ApexCharts.__internals.__apex_SVGElement,y=globalThis.ApexCharts.__internals,f=y.__apex_math_SVGNS;y.__apex_math_Point,y.__apex_math_Matrix,y.__apex_math_Box;const m=globalThis.ApexCharts.__internals.__apex_BrowserAPIs_BrowserAPIs,g=2*Math.PI;class w{constructor(t){this.w=t,this._host=null,this._canvas=null,this._c2d=null,this._margin=0,this._dpr=1,this._dim=null,this._alpha=1,this._unitPaths=new Map,this._markerBatches=0}markerBatchCount(){return this._markerBatches}_seriesAlpha(t){const s=this._dim;return!s||null==s.active||s.active<0||null==t||t<0||t===s.active?1:null==s.opacity?.2:s.opacity}_plotDims(){var t;const s=Math.max(0,Math.ceil(this.w.layout.gridWidth||0)),e=Math.max(0,Math.ceil(this.w.layout.gridHeight||0)),i=(null==(t=this.w.globals.markers)?void 0:t.largestSize)||0;return{gw:s,gh:e,margin:Math.ceil(i+8)}}createHost(){const t=m.getWindow();this._dpr=Math.min(2,t&&t.devicePixelRatio||1);const{gw:s,gh:e,margin:i}=this._plotDims();this._margin=i;const r=s+2*i,l=e+2*i,a=m.createElementNS(f,"foreignObject");a.setAttribute("x",String(-i)),a.setAttribute("y",String(-i)),a.setAttribute("width",String(r)),a.setAttribute("height",String(l)),a.setAttribute("class","apexcharts-canvas-series"),a.style.overflow="visible";const n=m.createElement("canvas");return n.setAttribute("class","apexcharts-series-canvas"),n.width=Math.max(1,Math.round(r*this._dpr)),n.height=Math.max(1,Math.round(l*this._dpr)),n.style.width=r+"px",n.style.height=l+"px",n.style.pointerEvents="none",a.appendChild(n),this._canvas=n,this._c2d=n.getContext("2d"),this._host=new u(a),this._host}getHost(){return this._host}clear(){this._c2d&&this._canvas&&(this._c2d.setTransform(1,0,0,1,0,0),this._c2d.clearRect(0,0,this._canvas.width,this._canvas.height))}_syncDpr(){if(!this._canvas)return;const t=m.getWindow(),s=Math.min(2,t&&t.devicePixelRatio||1);if(s===this._dpr)return;this._dpr=s;const e=parseFloat(this._canvas.style.width)||0,i=parseFloat(this._canvas.style.height)||0;this._canvas.width=Math.max(1,Math.round(e*s)),this._canvas.height=Math.max(1,Math.round(i*s))}paint(t,s,e=null){const i=this._c2d;if(!i)return;this._dim=e||null,this._syncDpr(),this.clear();const r=this._dpr,l=this._margin;if(i.setTransform(r,0,0,r,l*r,l*r),t.length){const s=t.length>1?t.map((t,s)=>[t,s]).sort((t,s)=>t[0].z===s[0].z?t[1]-s[1]:t[0].z-s[0].z).map(t=>t[0]):t;for(let t=0;t<s.length;t++){const e=s[t];this._alpha=this._dim?this._seriesAlpha(e.si):1,this._paintOne(i,e)}}this._paintRects(i,s),this._paintMarkers(i,s),this._alpha=1}_paintRects(t,s){const e=s.rectCount?s.rectCount():0;if(!e)return;const i=s._crx,r=s._cry,l=s._crw,a=s._crh,n=s._crstyle,h=s._cellRadius||0,o=t,c=h>0&&"function"==typeof o.roundRect,_=!!this._dim,d=Math.max(0,this.w.layout.gridWidth||0),p=Math.max(0,this.w.layout.gridHeight||0);t.save(),t.beginPath(),t.rect(0,0,d,p),t.clip();let u=0;for(;u<e;){const d=n[u],p=s.rectStyle(u);if(!p){u++;continue}const y=p.fill,f=y&&"none"!==y&&!("string"==typeof y&&0===y.indexOf("url(")),m=p.stroke,g=null==p.strokeWidth?0:Number(p.strokeWidth),w=m&&"none"!==m&&g>0&&!("string"==typeof m&&0===m.indexOf("url("));f&&(t.fillStyle=y),w&&(t.strokeStyle=m,t.lineWidth=g,t.setLineDash([]));const k=null==p.fillOpacity?1:Number(p.fillOpacity),x=null==p.strokeOpacity?1:Number(p.strokeOpacity);let A=u;for(;A<e&&n[A]===d;){const e=l[A],n=a[A];if(e>0&&n>0){const l=_?this._seriesAlpha(s.rectSeries(A)):1;c?(t.beginPath(),o.roundRect(i[A],r[A],e,n,h),f&&(t.globalAlpha=k*l,t.fill()),w&&(t.globalAlpha=x*l,t.stroke())):(f&&(t.globalAlpha=k*l,t.fillRect(i[A],r[A],e,n)),w&&(t.globalAlpha=x*l,t.strokeRect(i[A],r[A],e,n)))}A++}u=A}t.globalAlpha=1,t.restore()}_unitPath(t,s,e){const i=s+"|"+e;let r=this._unitPaths.get(i);if(void 0===r){try{r=new Path2D(t.markerPath(0,0,s,e))}catch(t){r=null}this._unitPaths.set(i,r)}return r}_paintMarkers(t,s){this._markerBatches=0;const e=s.markerCount();if(!e)return;const i=s._mx,r=s._my,l=s._msize,a=s._mshape,n=s._mstyle,h=!!this._dim;h||(this._alpha=1);let o=0;for(;o<e;){const c=n[o],_=a[o],d=s.markerStyle(o);if(!d){o++;continue}const p=this._applyFill(t,d),u=this._applyStroke(t,d);this._markerBatches++;const y=null==d.fillOpacity?1:Number(d.fillOpacity),f=null==d.strokeOpacity?1:Number(d.strokeOpacity);if(0===_){let _=o;for(;_<e&&0===a[_]&&n[_]===c;){const e=l[_]||0,a=r[_];if(e>0&&a==a)if(t.beginPath(),t.arc(i[_],a,e,0,g),h){const e=this._seriesAlpha(s.markerSeries(_));p&&(t.globalAlpha=y*e,t.fill()),u&&(t.globalAlpha=f*e,t.stroke())}else p&&t.fill(),u&&t.stroke();_++}t.globalAlpha=1,o=_}else{const d=this._dpr,m=this._margin;let g=o;for(;g<e&&a[g]===_&&n[g]===c;){const e=r[g],a=l[g];if(e==e&&a>0){const r=this._unitPath(s,_,a);if(r){t.setTransform(d,0,0,d,(m+i[g])*d,(m+e)*d);const l=h?this._seriesAlpha(s.markerSeries(g)):1;p&&(t.globalAlpha=y*l,t.fill(r)),u&&(t.globalAlpha=f*l,t.stroke(r))}}g++}t.setTransform(d,0,0,d,m*d,m*d),t.globalAlpha=1,o=g}}}_paintNumericPath(t,s){const e=s.nxs,i=s.nys,r=e.length;if(r){t.beginPath(),t.moveTo(e[0],i[0]);for(let s=1;s<r;s++)t.lineTo(e[s],i[s]);null!=s.ncloseY&&(t.lineTo(e[r-1],s.ncloseY),t.lineTo(e[0],s.ncloseY),t.closePath()),this._applyFill(t,s)&&t.fill("evenodd"===s.fillRule?"evenodd":"nonzero"),this._applyStroke(t,s)&&t.stroke(),t.globalAlpha=1}}_paintOne(t,s){switch(s.tag){case"path":if(s.nxs){this._paintNumericPath(t,s);break}if(!s.d)return;if(!s.path2d)try{s.path2d=new Path2D(s.d)}catch(t){return}this._fillStrokePath(t,s,s.path2d);break;case"rect":{const e=new Path2D;s.radius&&"function"==typeof e.roundRect?e.roundRect(s.x1,s.y1,s.rw,s.rh,s.radius):e.rect(s.x1,s.y1,s.rw,s.rh),this._fillStrokePath(t,s,e);break}case"circle":if(!(s.r>0))return;t.beginPath(),t.arc(s.cx,s.cy,s.r,0,g),this._fillStroke(t,s);break;case"line":t.beginPath(),t.moveTo(s.lx1,s.ly1),t.lineTo(s.lx2,s.ly2),this._strokeOnly(t,s);break;case"text":{if(null==s.text)return;t.save(),t.globalAlpha=this._alpha,t.fillStyle=s.fill||"#000";const e=s.fontSize||"11px";t.font=`${"number"==typeof e?e+"px":e} ${s.fontFamily||"Helvetica, Arial, sans-serif"}`,t.textAlign="middle"===s.textAnchor?"center":"end"===s.textAnchor?"right":"left",t.fillText(String(s.text),s.tx,s.ty),t.restore();break}}}_fillStrokePath(t,s,e){this._applyFill(t,s)&&t.fill(e,"evenodd"===s.fillRule?"evenodd":"nonzero"),this._applyStroke(t,s)&&t.stroke(e),t.globalAlpha=1}_fillStroke(t,s){this._applyFill(t,s)&&t.fill(),this._applyStroke(t,s)&&t.stroke(),t.globalAlpha=1}_strokeOnly(t,s){this._applyStroke(t,s)&&t.stroke(),t.globalAlpha=1}_applyFill(t,s){const e=s.fill;return!(!e||"none"===e)&&(("string"!=typeof e||0!==e.indexOf("url("))&&(t.globalAlpha=(null==s.fillOpacity?1:Number(s.fillOpacity))*this._alpha,t.fillStyle=e,!0))}_applyStroke(t,s){const e=s.stroke,i=null==s.strokeWidth?1:Number(s.strokeWidth);if(!(e&&"none"!==e&&i>0))return!1;if("string"==typeof e&&0===e.indexOf("url("))return!1;t.globalAlpha=(null==s.strokeOpacity?1:Number(s.strokeOpacity))*this._alpha,t.strokeStyle=e,t.lineWidth=i,t.lineCap=s.lineCap||"butt";const r=s.strokeDash;return r&&0!==r?t.setLineDash(Array.isArray(r)?r:[Number(r)]):t.setLineDash([]),!0}toDataURL(){return this._canvas?this._canvas.toDataURL():null}destroy(){this._host=null,this._canvas=null,this._c2d=null,this._unitPaths.clear()}}class k{constructor(t,s){this.w=t,this.ctx=s,this.kind="canvas",this._g=new p(t),this._compositor=new w(t)}beginSeries(){this._g.reset()}present(){const t=this._compositor.createHost();return this._compositor.paint(this._g.displayList(),this._g),t}clear(){this._compositor.clear()}canRepaintInPlace(){const t=this._compositor.getHost();return!!(t&&t.node&&t.node.isConnected)}repaintInPlace(){this._compositor.paint(this._g.displayList(),this._g)}group(t){return this._g.group(t)}drawPath(t){return this._g.drawPath(t)}drawLine(...t){return this._g.drawLine(...t)}drawRect(...t){return this._g.drawRect(...t)}drawRectCell(t,s,e,i,r){return this._g.drawRectCell(t,s,e,i,r)}drawCircle(t,s){return this._g.drawCircle(t,s)}drawMarker(t,s,e){return this._g.drawMarker(t,s,e)}renderPaths(t){return this._g.renderPaths(t)}drawText(t){return this._g.drawText(t)}supports(t){return"solidFill"===t||"dashArray"===t}hitTest(t,s){const e=this._g,i=e.rectCount?e.rectCount():0;if(!i)return null;const r=e._crx,l=e._cry,a=e._crw,n=e._crh;for(let h=i-1;h>=0;h--){const i=a[h],o=n[h];if(!(i<=0||o<=0)&&(t>=r[h]&&t<r[h]+i&&s>=l[h]&&s<l[h]+o))return{seriesIndex:e._crsi[h],dataPointIndex:e._crdi[h],x:r[h],y:l[h],width:i,height:o}}return null}restyle(t){this._compositor.paint(this._g.displayList(),this._g,t||null)}toBitmap(){const t=this._compositor.toDataURL();if(!t)return null;const s=this.w.globals,e=this.w.config.chart,i=this._compositor._margin;return{dataURL:t,x:(s.translateX||0)+(e.offsetX||0)-i,y:(s.translateY||0)+(e.offsetY||0)-i,w:(this.w.layout.gridWidth||0)+2*i,h:(this.w.layout.gridHeight||0)+2*i}}destroy(){this._compositor.destroy()}}s.registerRenderer("canvas",(t,s)=>new k(t,s)),t.default=s,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
5
|
"use strict";var t=Object.defineProperty,r=Object.defineProperties,e=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,s=(r,e,n)=>e in r?t(r,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[e]=n,a=(t,r)=>{for(var e in r||(r={}))i.call(r,e)&&s(t,e,r[e]);if(n)for(var e of n(r))o.call(r,e)&&s(t,e,r[e]);return t},l=(t,n)=>r(t,e(n));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function u(t){if(t&&t.__esModule)return t;const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const e in t)if("default"!==e){const n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,n.get?n:{enumerable:!0,get:()=>t[e]})}return r.default=t,Object.freeze(r)}const c=u(require("apexcharts/core")),f=c.__apex_Utils,h="__apexcharts_series_transforms__";function d(t,r){t&&"string"==typeof t&&"function"==typeof r&&(globalThis[h][t]=r)}globalThis[h]||(globalThis[h]={});const g="__apexcharts_row_sources__";function y(t,r){t&&"string"==typeof t&&"function"==typeof r&&(globalThis[g][t]=r)}globalThis[g]||(globalThis[g]={});function p(t,r){const e=t.length;if(0===e)return NaN;if(1===e)return t[0];const n=(e-1)*r,i=Math.floor(n),o=Math.ceil(n);return i===o?t[i]:t[i]+(t[o]-t[i])*(n-i)}function b(t){const r=t.length;if(r<2)return 0;let e=0;for(let n=0;n<r;n++)e+=t[n];const n=e/r;let i=0;for(let e=0;e<r;e++){const r=t[e]-n;i+=r*r}return Math.sqrt(i/r)}function m(t,r={}){if(!Array.isArray(t)||0===t.length)return null;const e=t.slice().sort((t,r)=>t-r);let n=e[0],i=e[e.length-1];const o=r.range;if(Array.isArray(o)&&2===o.length){const t=Number(o[0]),r=Number(o[1]);isFinite(t)&&isFinite(r)&&r>t&&(n=t,i=r)}if(!(i>n)){const t=Math.abs(n)>0?.05*Math.abs(n):.5;return{edges:[n-t,n+t],binWidth:2*t,rule:"single",capped:!1}}const s=i-n;let a,l;if("number"==typeof r.binWidth&&r.binWidth>0)a=r.binWidth,l="binWidth";else if("number"==typeof r.bins&&r.bins>=1)a=s/Math.floor(r.bins),l="count";else{const t=function(t,r,e){const n=t.length,i=t=>r/Math.max(1,Math.ceil(t));switch(e){case"sqrt":return{width:i(Math.sqrt(n)),rule:"sqrt"};case"rice":return{width:i(2*Math.cbrt(n)),rule:"rice"};case"scott":{const r=b(t);return r>0?{width:3.49*r*Math.pow(n,-1/3),rule:"scott"}:{width:i(Math.log2(n)+1),rule:"sturges"}}case"fd":{const r=p(t,.75)-p(t,.25);return r>0?{width:2*r*Math.pow(n,-1/3),rule:"fd"}:{width:i(Math.log2(n)+1),rule:"sturges"}}case"auto":{const r=i(Math.log2(n)+1),e=p(t,.75)-p(t,.25);if(e<=0)return{width:r,rule:"sturges"};const o=2*e*Math.pow(n,-1/3);return o<r?{width:o,rule:"fd"}:{width:r,rule:"sturges"}}default:return{width:i(Math.log2(n)+1),rule:"sturges"}}}(e,s,"string"==typeof r.bins?r.bins:"auto");a=t.width,l=t.rule}(!isFinite(a)||a<=0)&&(a=s);let u=Math.ceil(s/a);(!isFinite(u)||u<1)&&(u=1);let c=!1;u>1e3&&(u=1e3,a=s/u,c=!0),a=s/u;const f=new Array(u+1);for(let t=0;t<=u;t++)f[t]=n+t*a;return f[u]=Math.max(f[u],i),{edges:f,binWidth:a,rule:l,capped:c}}function A(t,r){const e=r.length-1;if(!(t>=r[0])||t>r[e])return-1;if(t===r[e])return e-1;const n=(r[e]-r[0])/e;if(n>0){let i=Math.floor((t-r[0])/n);return i<0&&(i=0),i>e-1&&(i=e-1),t<r[i]?i--:t>=r[i+1]&&i++,i<0||i>e-1?-1:i}let i=0,o=e-1;for(;i<=o;){const e=i+o>>1;if(t<r[e])o=e-1;else{if(!(t>=r[e+1]))return e;i=e+1}}return-1}function v(t,r){var e;if(!t||"object"!=typeof t||Array.isArray(t))return null;let n=null;if(Array.isArray(t.points)?n=t.points:Array.isArray(null==(e=t.y)?void 0:e.points)?n=t.y.points:r&&Array.isArray(t.y)&&"number"==typeof t.y[0]&&(n=t.y),!n)return null;const i=[];for(let t=0;t<n.length;t++){const r=f.parseNumber(n[t]);null!==r&&isFinite(r)&&i.push(r)}return i.length?i:null}function w(t){const r=[];if(!Array.isArray(t))return r;for(let e=0;e<t.length;e++){const n=t[e];let i=n;Array.isArray(n)?i=1===n.length?n[0]:n[1]:n&&"object"==typeof n&&(i=void 0!==n.y?n.y:n.x);const o=f.parseNumber(i);null!==o&&isFinite(o)&&r.push(o)}return r}function M(t,r){var e;const n=r.config,i=r.globals;if(!Array.isArray(t))return t;i.histogramRawSeries||(i.histogramRawSeries=t.map(t=>l(a({},t),{data:Array.isArray(null==t?void 0:t.data)?t.data.slice():null==t?void 0:t.data})));const o=i.histogramRawSeries,s=(null==(e=n.plotOptions)?void 0:e.histogram)||{},u=o.map(t=>w(null==t?void 0:t.data));let c=[];if(1===u.length)c=u[0];else for(const t of u)c=c.concat(t);const f=m(c,{bins:s.bins,binWidth:s.binWidth,range:s.range});if(!f)return r.histogramData={edges:[],binWidth:0,counts:[],rule:"",capped:!1},o;const{edges:h,binWidth:d}=f,g=u.map(t=>function(t,r){const e=new Array(Math.max(0,r.length-1)).fill(0);for(let n=0;n<t.length;n++){const i=A(t[n],r);i>=0&&e[i]++}return e}(t,h));r.histogramData={edges:h,binWidth:d,counts:g,rule:f.rule,capped:f.capped};const y=i.collapsedSeriesIndices||[];return o.map((t,r)=>{if(-1!==y.indexOf(r))return l(a({},t),{data:[]});const e=function(t,r={}){let e=t.slice();if(r.cumulative){let t=0;e=e.map(r=>t+=r)}const n=t.reduce((t,r)=>t+r,0);if(n<=0)return e;if("relative"===r.normalize)return e.map(t=>t/n*100);if("density"===r.normalize){const t=r.binWidth;if("number"==typeof t&&t>0)return e.map(r=>r/(n*t))}return e}(g[r],{normalize:s.normalize,cumulative:s.cumulative,binWidth:d}),n=[];for(let t=0;t<e.length;t++)n.push({x:(h[t]+h[t+1])/2,y:e[t]});return l(a({},t),{data:n})})}const x=new WeakSet;function O(t,r){var e,n;if(!Array.isArray(t))return t;const i=(null==(n=null==(e=r.config.plotOptions)?void 0:e.boxPlot)?void 0:n.whiskers)||"minmax";return t.map(t=>{if(!Array.isArray(null==t?void 0:t.data))return t;let r=!1;const e=t.data.map(t=>{if(Array.isArray(null==t?void 0:t.y)&&5===t.y.length&&!x.has(t))return t;const e=v(t,!1);if(!e)return t;const n=function(t,r={}){if(!Array.isArray(t)||0===t.length)return null;const e=t.slice().sort((t,r)=>t-r),n=p(e,.25),i=p(e,.5),o=p(e,.75),s=o-n;let a=e[0],l=e[e.length-1],u=[];if("tukey"===r.whiskers&&s>0){const t=n-1.5*s,r=o+1.5*s;let i=0;for(;i<e.length&&e[i]<t;)i++;let c=e.length-1;for(;c>=0&&e[c]>r;)c--;i<=c&&(a=e[i],l=e[c],u=e.slice(0,i).concat(e.slice(c+1)))}return{summary:[a,n,i,o,l],outliers:u,iqr:s}}(e,{whiskers:i});if(!n)return t;r=!0;const o=l(a({},t),{y:n.summary,points:e});return x.add(o),o});return r?l(a({},t),{data:e}):t})}function _(t,r){var e,n;if(!Array.isArray(t))return t;const i=(null==(n=null==(e=r.config.plotOptions)?void 0:e.violin)?void 0:n.kde)||{};return t.map(t=>{if(!Array.isArray(null==t?void 0:t.data))return t;let r=!1;const e=t.data.map(t=>{var e;if(Array.isArray(null==(e=null==t?void 0:t.y)?void 0:e.density)&&t.y.density.length&&!x.has(t))return t;const n=v(t,!0);if(!n)return t;const o=function(t,r={}){if(!Array.isArray(t)||0===t.length)return null;const e=t.slice().sort((t,r)=>t-r),n=e.length;let i=r.bandwidth;if(!("number"==typeof i&&i>0)){const t=b(e),r=p(e,.75)-p(e,.25);i=.9*(r>0?Math.min(t,r/1.349):t)*Math.pow(n,-.2)}if(!isFinite(i)||i<=0){const t=e[0],r=Math.abs(t)>0?.001*Math.abs(t):.001;return{density:[[t-r,0],[t,1],[t+r,0]],bandwidth:r}}const o=Math.max(8,Math.floor(r.resolution||64)),s=e[0]-2*i,a=(e[n-1]+2*i-s)/(o-1),l=1/(n*i*Math.sqrt(2*Math.PI)),u=[];for(let t=0;t<o;t++){const r=s+t*a;let o=0;for(let t=0;t<n;t++){const n=(r-e[t])/i;o+=Math.exp(-.5*n*n)}u.push([r,o*l])}return{density:u,bandwidth:i}}(n,{bandwidth:i.bandwidth,resolution:i.resolution});if(!o)return t;r=!0;const s=l(a({},t),{y:{density:o.density,points:n}});return x.add(s),s});return r?l(a({},t),{data:e}):t})}function P(t,r,e){const n=e&&null!=e.maxRows?e.maxRows:3e3,i=function(t,r){let e=0,n=0;for(const r of t)e+=r.length,r.length>n&&(n=r.length);if(e<=r)return{clusters:t,stride:1,total:e,kept:e};const i=r=>{let e=0;for(const n of t)e+=Math.ceil(n.length/r);return e};let o=Math.max(2,Math.ceil(e/r));for(;o<n&&i(o)>r;)o++;let s=0;return{clusters:t.map(t=>{const r=[];for(let e=0;e<t.length;e+=o)r.push(t[e]);return s+=r.length,r}),stride:o,total:e,kept:s}}(r.map(t=>t.rows),n);i.stride;const o=t.globals&&t.globals.colors||[];return r.map((t,r)=>{const e=o[t.realIndex]||o[0];return{name:t.name,data:i.clusters[r].map((n,i)=>a({id:`${t.realIndex}:${r}:${i}`,x:t.name,y:n},e?{fillColor:e}:{}))}})}function S(t,r){const e=t.globals,n=t.histogramData,i=e&&e.histogramRawSeries;if(!n||!Array.isArray(n.edges)||n.edges.length<2)return null;if(!Array.isArray(i)||!i.length)return null;const o=e&&e.collapsedSeriesIndices||[],s=n.edges,a=[];return i.forEach((r,e)=>{var n;if(-1!==o.indexOf(e))return;const l=function(t,r){const e=Math.max(0,r.length-1),n=new Array(e);for(let t=0;t<e;t++)n[t]=[];for(let e=0;e<t.length;e++){const i=A(t[e],r);i>=0&&n[i].push(t[e])}return n}(w(r&&r.data),s),u=t.seriesData&&(null==(n=t.seriesData.seriesNames)?void 0:n[e])||(null==r?void 0:r.name);l.forEach((t,r)=>{const n=`${j(s[r])}-${j(s[r+1])}`;a.push({name:i.length>1&&u?`${u} ${n}`:n,realIndex:e,rows:t})})}),a.length?P(t,a,r):null}function j(t){if(!isFinite(t))return String(t);const r=Math.round(t);return Math.abs(t-r)<1e-6?String(r):String(Number(t.toFixed(2)))}function W(t){return(r,e)=>{var n;const i=t(r);if(!Array.isArray(i)||!i.length)return null;const o=r.globals&&r.globals.collapsedSeriesIndices||[],s=r.globals&&((null==(n=r.globals.categoryLabels)?void 0:n.length)?r.globals.categoryLabels:r.globals.labels)||[],a=[];return i.forEach((t,e)=>{var n;if(-1!==o.indexOf(e))return;if(!Array.isArray(t))return;const l=r.seriesData&&(null==(n=r.seriesData.seriesNames)?void 0:n[e]);t.forEach((t,r)=>{const n=null!=s[r]?String(s[r]):`#${r+1}`;a.push({name:i.length>1&&l?`${l} ${n}`:n,realIndex:e,rows:Array.isArray(t)?t.slice():[]})})}),a.length?P(r,a,e):null}}const D=W(t=>{var r;return null==(r=t.candleData)?void 0:r.seriesBoxPoints}),T=W(t=>{var r;return null==(r=t.violinData)?void 0:r.seriesViolinPoints});d("histogram",M),d("boxPlot",O),d("violin",_),y("histogram",S),y("boxPlot",D),y("violin",T),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>c.default}),exports.boxPlotRows=D,exports.boxPlotTransform=O,exports.histogramRows=S,exports.histogramTransform=M,exports.violinRows=T,exports.violinTransform=_;
|
package/dist/features/stats.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
5
|
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((t="undefined"!=typeof globalThis?globalThis:t||self).ApexStats={})}(this,function(t){"use strict";var r=Object.defineProperty,e=Object.defineProperties,n=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,a=(t,e,n)=>e in t?r(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,l=(t,r)=>{for(var e in r||(r={}))i.call(r,e)&&a(t,e,r[e]);if(s)for(var e of s(r))o.call(r,e)&&a(t,e,r[e]);return t},u=(t,r)=>e(t,n(r));const c=globalThis.ApexCharts,f=globalThis.ApexCharts.__internals.__apex_Utils,h="__apexcharts_series_transforms__";function d(t,r){t&&"string"==typeof t?"function"==typeof r?globalThis[h][t]=r:console.warn(`ApexCharts: registerSeriesTransform("${t}") expects a function (series, w) => series.`):console.warn("ApexCharts: registerSeriesTransform requires a non-empty name.")}globalThis[h]||(globalThis[h]={});const g="__apexcharts_row_sources__";function p(t,r){t&&"string"==typeof t?"function"==typeof r?globalThis[g][t]=r:console.warn(`ApexCharts: registerRowSource("${t}") expects a function (w, opts) => series.`):console.warn("ApexCharts: registerRowSource requires a non-empty name.")}globalThis[g]||(globalThis[g]={});function y(t,r){const e=t.length;if(0===e)return NaN;if(1===e)return t[0];const n=(e-1)*r,s=Math.floor(n),i=Math.ceil(n);return s===i?t[s]:t[s]+(t[i]-t[s])*(n-s)}function m(t){const r=t.length;if(r<2)return 0;let e=0;for(let n=0;n<r;n++)e+=t[n];const n=e/r;let s=0;for(let e=0;e<r;e++){const r=t[e]-n;s+=r*r}return Math.sqrt(s/r)}function b(t,r={}){if(!Array.isArray(t)||0===t.length)return null;const e=t.slice().sort((t,r)=>t-r);let n=e[0],s=e[e.length-1];const i=r.range;if(Array.isArray(i)&&2===i.length){const t=Number(i[0]),r=Number(i[1]);isFinite(t)&&isFinite(r)&&r>t&&(n=t,s=r)}if(!(s>n)){const t=Math.abs(n)>0?.05*Math.abs(n):.5;return{edges:[n-t,n+t],binWidth:2*t,rule:"single",capped:!1}}const o=s-n;let a,l;if("number"==typeof r.binWidth&&r.binWidth>0)a=r.binWidth,l="binWidth";else if("number"==typeof r.bins&&r.bins>=1)a=o/Math.floor(r.bins),l="count";else{const t=function(t,r,e){const n=t.length,s=t=>r/Math.max(1,Math.ceil(t));switch(e){case"sqrt":return{width:s(Math.sqrt(n)),rule:"sqrt"};case"rice":return{width:s(2*Math.cbrt(n)),rule:"rice"};case"scott":{const r=m(t);return r>0?{width:3.49*r*Math.pow(n,-1/3),rule:"scott"}:{width:s(Math.log2(n)+1),rule:"sturges"}}case"fd":{const r=y(t,.75)-y(t,.25);return r>0?{width:2*r*Math.pow(n,-1/3),rule:"fd"}:{width:s(Math.log2(n)+1),rule:"sturges"}}case"auto":{const r=s(Math.log2(n)+1),e=y(t,.75)-y(t,.25);if(e<=0)return{width:r,rule:"sturges"};const i=2*e*Math.pow(n,-1/3);return i<r?{width:i,rule:"fd"}:{width:r,rule:"sturges"}}default:return{width:s(Math.log2(n)+1),rule:"sturges"}}}(e,o,"string"==typeof r.bins?r.bins:"auto");a=t.width,l=t.rule}(!isFinite(a)||a<=0)&&(a=o);let u=Math.ceil(o/a);(!isFinite(u)||u<1)&&(u=1);let c=!1;u>1e3&&(u=1e3,a=o/u,c=!0),a=o/u;const f=new Array(u+1);for(let t=0;t<=u;t++)f[t]=n+t*a;return f[u]=Math.max(f[u],s),{edges:f,binWidth:a,rule:l,capped:c}}function w(t,r){const e=r.length-1;if(!(t>=r[0])||t>r[e])return-1;if(t===r[e])return e-1;const n=(r[e]-r[0])/e;if(n>0){let s=Math.floor((t-r[0])/n);return s<0&&(s=0),s>e-1&&(s=e-1),t<r[s]?s--:t>=r[s+1]&&s++,s<0||s>e-1?-1:s}let s=0,i=e-1;for(;s<=i;){const e=s+i>>1;if(t<r[e])i=e-1;else{if(!(t>=r[e+1]))return e;s=e+1}}return-1}function A(t,r){var e;if(!t||"object"!=typeof t||Array.isArray(t))return null;let n=null;if(Array.isArray(t.points)?n=t.points:Array.isArray(null==(e=t.y)?void 0:e.points)?n=t.y.points:r&&Array.isArray(t.y)&&"number"==typeof t.y[0]&&(n=t.y),!n)return null;const s=[];for(let t=0;t<n.length;t++){const r=f.parseNumber(n[t]);null!==r&&isFinite(r)&&s.push(r)}return s.length?s:null}function v(t){const r=[];if(!Array.isArray(t))return r;for(let e=0;e<t.length;e++){const n=t[e];let s=n;Array.isArray(n)?s=1===n.length?n[0]:n[1]:n&&"object"==typeof n&&(s=void 0!==n.y?n.y:n.x);const i=f.parseNumber(s);null!==i&&isFinite(i)&&r.push(i)}return r}function x(t,r){var e;const n=r.config,s=r.globals;if(!Array.isArray(t))return t;s.histogramRawSeries||(s.histogramRawSeries=t.map(t=>u(l({},t),{data:Array.isArray(null==t?void 0:t.data)?t.data.slice():null==t?void 0:t.data})));const i=s.histogramRawSeries,o=(null==(e=n.plotOptions)?void 0:e.histogram)||{},a=i.map(t=>v(null==t?void 0:t.data));let c=[];if(1===a.length)c=a[0];else for(const t of a)c=c.concat(t);const f=b(c,{bins:o.bins,binWidth:o.binWidth,range:o.range});if(!f)return r.histogramData={edges:[],binWidth:0,counts:[],rule:"",capped:!1},i;const{edges:h,binWidth:d}=f,g=a.map(t=>function(t,r){const e=new Array(Math.max(0,r.length-1)).fill(0);for(let n=0;n<t.length;n++){const s=w(t[n],r);s>=0&&e[s]++}return e}(t,h));r.histogramData={edges:h,binWidth:d,counts:g,rule:f.rule,capped:f.capped};const p=s.collapsedSeriesIndices||[];return i.map((t,r)=>{if(-1!==p.indexOf(r))return u(l({},t),{data:[]});const e=function(t,r={}){let e=t.slice();if(r.cumulative){let t=0;e=e.map(r=>t+=r)}const n=t.reduce((t,r)=>t+r,0);if(n<=0)return e;if("relative"===r.normalize)return e.map(t=>t/n*100);if("density"===r.normalize){const t=r.binWidth;if("number"==typeof t&&t>0)return e.map(r=>r/(n*t))}return e}(g[r],{normalize:o.normalize,cumulative:o.cumulative,binWidth:d}),n=[];for(let t=0;t<e.length;t++)n.push({x:(h[t]+h[t+1])/2,y:e[t]});return u(l({},t),{data:n})})}const M=new WeakSet;function S(t,r){var e,n;if(!Array.isArray(t))return t;const s=(null==(n=null==(e=r.config.plotOptions)?void 0:e.boxPlot)?void 0:n.whiskers)||"minmax";return t.map(t=>{if(!Array.isArray(null==t?void 0:t.data))return t;let r=!1;const e=t.data.map(t=>{if(Array.isArray(null==t?void 0:t.y)&&5===t.y.length&&!M.has(t))return t;const e=A(t,!1);if(!e)return t;const n=function(t,r={}){if(!Array.isArray(t)||0===t.length)return null;const e=t.slice().sort((t,r)=>t-r),n=y(e,.25),s=y(e,.5),i=y(e,.75),o=i-n;let a=e[0],l=e[e.length-1],u=[];if("tukey"===r.whiskers&&o>0){const t=n-1.5*o,r=i+1.5*o;let s=0;for(;s<e.length&&e[s]<t;)s++;let c=e.length-1;for(;c>=0&&e[c]>r;)c--;s<=c&&(a=e[s],l=e[c],u=e.slice(0,s).concat(e.slice(c+1)))}return{summary:[a,n,s,i,l],outliers:u,iqr:o}}(e,{whiskers:s});if(!n)return t;r=!0;const i=u(l({},t),{y:n.summary,points:e});return M.add(i),i});return r?u(l({},t),{data:e}):t})}function _(t,r){var e,n;if(!Array.isArray(t))return t;const s=(null==(n=null==(e=r.config.plotOptions)?void 0:e.violin)?void 0:n.kde)||{};return t.map(t=>{if(!Array.isArray(null==t?void 0:t.data))return t;let r=!1;const e=t.data.map(t=>{var e;if(Array.isArray(null==(e=null==t?void 0:t.y)?void 0:e.density)&&t.y.density.length&&!M.has(t))return t;const n=A(t,!0);if(!n)return t;const i=function(t,r={}){if(!Array.isArray(t)||0===t.length)return null;const e=t.slice().sort((t,r)=>t-r),n=e.length;let s=r.bandwidth;if(!("number"==typeof s&&s>0)){const t=m(e),r=y(e,.75)-y(e,.25);s=.9*(r>0?Math.min(t,r/1.349):t)*Math.pow(n,-.2)}if(!isFinite(s)||s<=0){const t=e[0],r=Math.abs(t)>0?.001*Math.abs(t):.001;return{density:[[t-r,0],[t,1],[t+r,0]],bandwidth:r}}const i=Math.max(8,Math.floor(r.resolution||64)),o=e[0]-2*s,a=(e[n-1]+2*s-o)/(i-1),l=1/(n*s*Math.sqrt(2*Math.PI)),u=[];for(let t=0;t<i;t++){const r=o+t*a;let i=0;for(let t=0;t<n;t++){const n=(r-e[t])/s;i+=Math.exp(-.5*n*n)}u.push([r,i*l])}return{density:u,bandwidth:s}}(n,{bandwidth:s.bandwidth,resolution:s.resolution});if(!i)return t;r=!0;const o=u(l({},t),{y:{density:i.density,points:n}});return M.add(o),o});return r?u(l({},t),{data:e}):t})}function $(t,r,e){const n=e&&null!=e.maxRows?e.maxRows:3e3,s=function(t,r){let e=0,n=0;for(const r of t)e+=r.length,r.length>n&&(n=r.length);if(e<=r)return{clusters:t,stride:1,total:e,kept:e};const s=r=>{let e=0;for(const n of t)e+=Math.ceil(n.length/r);return e};let i=Math.max(2,Math.ceil(e/r));for(;i<n&&s(i)>r;)i++;let o=0;return{clusters:t.map(t=>{const r=[];for(let e=0;e<t.length;e+=i)r.push(t[e]);return o+=r.length,r}),stride:i,total:e,kept:o}}(r.map(t=>t.rows),n);s.stride>1&&console.warn(`ApexCharts: rowSeries() thinned ${s.total} rows to ${s.kept} (every ${s.stride}${2===s.stride?"nd":3===s.stride?"rd":"th"} row) to stay under maxRows=${n}. Raise maxRows to draw more.`);const i=t.globals&&t.globals.colors||[];return r.map((t,r)=>{const e=i[t.realIndex]||i[0];return{name:t.name,data:s.clusters[r].map((n,s)=>l({id:`${t.realIndex}:${r}:${s}`,x:t.name,y:n},e?{fillColor:e}:{}))}})}function O(t,r){const e=t.globals,n=t.histogramData,s=e&&e.histogramRawSeries;if(!n||!Array.isArray(n.edges)||n.edges.length<2)return null;if(!Array.isArray(s)||!s.length)return null;const i=e&&e.collapsedSeriesIndices||[],o=n.edges,a=[];return s.forEach((r,e)=>{var n;if(-1!==i.indexOf(e))return;const l=function(t,r){const e=Math.max(0,r.length-1),n=new Array(e);for(let t=0;t<e;t++)n[t]=[];for(let e=0;e<t.length;e++){const s=w(t[e],r);s>=0&&n[s].push(t[e])}return n}(v(r&&r.data),o),u=t.seriesData&&(null==(n=t.seriesData.seriesNames)?void 0:n[e])||(null==r?void 0:r.name);l.forEach((t,r)=>{const n=`${T(o[r])}-${T(o[r+1])}`;a.push({name:s.length>1&&u?`${u} ${n}`:n,realIndex:e,rows:t})})}),a.length?$(t,a,r):null}function T(t){if(!isFinite(t))return String(t);const r=Math.round(t);return Math.abs(t-r)<1e-6?String(r):String(Number(t.toFixed(2)))}function P(t){return(r,e)=>{var n;const s=t(r);if(!Array.isArray(s)||!s.length)return null;const i=r.globals&&r.globals.collapsedSeriesIndices||[],o=r.globals&&((null==(n=r.globals.categoryLabels)?void 0:n.length)?r.globals.categoryLabels:r.globals.labels)||[],a=[];return s.forEach((t,e)=>{var n;if(-1!==i.indexOf(e))return;if(!Array.isArray(t))return;const l=r.seriesData&&(null==(n=r.seriesData.seriesNames)?void 0:n[e]);t.forEach((t,r)=>{const n=null!=o[r]?String(o[r]):`#${r+1}`;a.push({name:s.length>1&&l?`${l} ${n}`:n,realIndex:e,rows:Array.isArray(t)?t.slice():[]})})}),a.length?$(r,a,e):null}}const R=P(t=>{var r;return null==(r=t.candleData)?void 0:r.seriesBoxPoints}),W=P(t=>{var r;return null==(r=t.violinData)?void 0:r.seriesViolinPoints});d("histogram",x),d("boxPlot",S),d("violin",_),p("histogram",O),p("boxPlot",R),p("violin",W),t.boxPlotRows=R,t.boxPlotTransform=S,t.default=c,t.histogramRows=O,t.histogramTransform=x,t.violinRows=W,t.violinTransform=_,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
5
|
"use strict";var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,a=(t,n,i)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i,o=(e,t)=>{for(var n in t||(t={}))s.call(t,n)&&a(e,n,t[n]);if(i)for(var n of i(t))r.call(t,n)&&a(e,n,t[n]);return e},l=(e,i)=>t(e,n(i));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function c(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const n in e)if("default"!==n){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}return t.default=e,Object.freeze(t)}const d=c(require("apexcharts/core")),u=d.__apex_Environment_Environment,h=d.__apex_Animations_prefersReducedMotion,f=globalThis.console;function p(e,...t){f.error(e,...t)}function y(e){f.warn(e)}const v="APEX-",m=new Date("2027-07-31T00:00:00Z"),g="__apex_license_v1__";function b(){const e=globalThis;let t=e[g];return t||(t={key:null,listeners:new Set,result:null},e[g]=t),t}const x=class{static get licenseKey(){return b().key}static set licenseKey(e){b().key=e}static get listeners(){return b().listeners}static get validationResult(){return b().result}static set validationResult(e){b().result=e}static getKey(){return this.licenseKey}static getLicenseStatus(){return this.licenseKey?(this.validationResult=this.validateKey(this.licenseKey),this.validationResult):{expired:!1,signatureVerified:!1,valid:!1}}static isKeyValid(e){return!!e&&this.validateKey(e).valid}static isLicenseValid(){return this.getLicenseStatus().valid}static onChange(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}static setLicense(e){var t,n;if(!e)return this.licenseKey=null,void this.publish({expired:!1,signatureVerified:!1,valid:!1});const i=this.validateKey(e);i.valid||e===this.licenseKey||!(null==(n=this.validationResult)?void 0:n.valid)?(this.licenseKey=e,this.publish(i),i.valid||p(`[Apex] ${i.message}`)):y(`[Apex] Ignoring license key: ${null!=(t=i.message)?t:"it is not valid"} A valid license is already active on this page.`)}static validateKey(e){const t=this.parseKey(e),n=this.validateStructure(e,t);if(!n.valid||!(null==t?void 0:t.signature))return n;const i=this.verdicts.get(e);return!1===i?{data:t.data,expired:!1,message:"Invalid license key. The license signature does not verify.",signatureVerified:!0,valid:!1}:(void 0===i&&this.verifySignature(e,t,n),l(o({},n),{signatureVerified:!0===i}))}static _resetSignatureState(){this.verdicts.clear(),this.verifying.clear(),this.warnedUnverifiable=!1,this.epoch++}static base64ToBytes(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(4*Math.ceil(t.length/4),"="),i=globalThis.atob;if("function"!=typeof i)throw new Error("no base64 decoder available");const s=i(n),r=new Uint8Array(s.length);for(let e=0;e<s.length;e++)r[e]=s.charCodeAt(e);return r}static canonicalPayload(e){const t=e.domains&&e.domains.length>0?e.domains.join(","):"";return`v1|${e.issueDate}|${e.expiryDate}|${e.plan}|${t}`}static notify(e){for(const t of this.listeners)try{t(e)}catch(e){}}static parseKey(e){if("string"!=typeof e||!e.startsWith(v))return null;const t=e.slice(5);if(!t)return null;try{const e=(new TextDecoder).decode(this.base64ToBytes(t)),n=JSON.parse(e);return n.issueDate&&n.expiryDate&&n.plan?{data:{domains:Array.isArray(n.domains)?n.domains:void 0,expiryDate:n.expiryDate,issueDate:n.issueDate,plan:n.plan,valid:!0},signature:"string"==typeof n.sig&&n.sig?n.sig:null}:null}catch(e){return null}}static publish(e){this.validationResult=e,this.notify(e)}static validateStructure(e,t){const n=e=>({expired:!1,message:e,signatureVerified:!1,valid:!1});if("string"!=typeof e||!e.startsWith(v))return n('Invalid license key format. License key must start with "APEX-".');if(!t)return n("Invalid license key. Unable to decode license data.");const{data:i,signature:s}=t;if(!s&&new Date>=m)return n("This license key is in the old unsigned format, which is no longer accepted. Please request a replacement key.");if(new Date(i.expiryDate)<new Date)return{data:i,expired:!0,message:`License expired on ${i.expiryDate}. Please renew your license.`,signatureVerified:!1,valid:!1};if(i.domains&&i.domains.length>0){const e="undefined"==typeof location?"":location.hostname;if(!i.domains.some(t=>e===t||e.endsWith(`.${t}`)))return{data:i,expired:!1,message:`License is not valid for this domain (${e}). Allowed domains: ${i.domains.join(", ")}.`,signatureVerified:!1,valid:!1}}return{data:i,expired:!1,signatureVerified:!1,valid:!0}}static verifySignature(e,t,n){return i=this,s=null,r=function*(){var i;if(this.verifying.has(e)||this.verdicts.has(e))return;this.verifying.add(e);const s=this.epoch,r=null==(i=globalThis.crypto)?void 0:i.subtle;if(!r||0===this.publicKeysSpki.length)return this.verifying.delete(e),void(this.warnedUnverifiable||(this.warnedUnverifiable=!0,y(r?"[Apex] No license signing key is configured in this build, so license signatures cannot be verified.":"[Apex] Web Crypto is unavailable (a secure context is required), so the license signature cannot be verified.")));const a=(new TextEncoder).encode(this.canonicalPayload(t.data));let c=!1;for(const e of this.publicKeysSpki){try{const n=yield r.importKey("spki",this.base64ToBytes(e),{name:"ECDSA",namedCurve:"P-256"},!1,["verify"]);c=yield r.verify({hash:"SHA-256",name:"ECDSA"},n,this.base64ToBytes(t.signature),a)}catch(e){c=!1}if(c)break}if(this.verifying.delete(e),this.epoch!==s)return;if(this.verdicts.set(e,c),c){const t=l(o({},n),{signatureVerified:!0});return void(this.licenseKey===e?this.publish(t):this.notify(t))}const d="Invalid license key. The license signature does not verify.",u={data:t.data,expired:!1,message:d,signatureVerified:!0,valid:!1};this.licenseKey===e?this.publish(u):this.notify(u),p(`[Apex] ${d}`)},new Promise((e,t)=>{var n=e=>{try{o(r.next(e))}catch(e){t(e)}},a=e=>{try{o(r.throw(e))}catch(e){t(e)}},o=t=>t.done?e(t.value):Promise.resolve(t.value).then(n,a);o((r=r.apply(i,s)).next())});var i,s,r}};x.publicKeysSpki=["MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEQIaK9UMD6n0oR/FIy8QdL0uSzKMQlf1BB+tOrji4/WuHsyRNxeDhVykoSsNURozMi1xhmqWvBH1L//xIfugTPA=="],x.verdicts=new Map,x.verifying=new Set,x.warnedUnverifiable=!1,x.epoch=0;let w=x;const _=class{static applyStyles(e){Object.assign(e.style,this.CRITICAL_STYLES,{backgroundImage:this.createWatermarkPattern(),backgroundRepeat:"repeat"})}static node(e){return e?e.querySelector(`[${this.WATERMARK_ATTR}]`):null}static add(e,t){return e&&"undefined"!=typeof document?(this.setManaged(e,t),this.paint(e)):null}static exists(e){return!!this.node(e)}static remove(e,t){e&&(this.setManaged(e,t),this.erase(e))}static untrack(e){this.managed.delete(e)}static createWatermarkPattern(){const e=this.WATERMARK_TEXT;return`url("data:image/svg+xml,${encodeURIComponent(`\n <svg xmlns="http://www.w3.org/2000/svg" width="300" height="200">\n <text\n x="50%"\n y="50%"\n dominant-baseline="middle"\n text-anchor="middle"\n font-family="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Arial, sans-serif"\n font-size="18"\n font-weight="600"\n fill="rgba(134, 134, 134, 0.1)"\n transform="rotate(-35, 100, 60)"\n >${e}</text>\n </svg>\n `.trim())}")`}static erase(e){var t;null==(t=this.node(e))||t.remove()}static paint(e){let t=this.node(e);return t||(t=document.createElement("div"),t.setAttribute(this.WATERMARK_ATTR,""),e.appendChild(t)),this.applyStyles(t),"function"==typeof getComputedStyle&&"static"===getComputedStyle(e).position&&(e.style.position="relative"),t}static reconcile(){const e=w.isLicenseValid();for(const t of this.managed)t.isConnected?e?this.erase(t):this.paint(t):this.managed.delete(t)}static setManaged(e,t){!1!==(null==t?void 0:t.manage)?this.track(e):this.managed.delete(e)}static track(e){this.managed.add(e),this.subscribed||(this.subscribed=!0,w.onChange(()=>{this.reconcile()}))}};_.WATERMARK_ATTR="data-apexcharts-watermark",_.WATERMARK_TEXT="APEXCHARTS",_.ATTR="data-apexcharts-watermark",_.CRITICAL_STYLES={bottom:"0",display:"block",left:"0",msUserSelect:"none",opacity:"1",pointerEvents:"none",position:"absolute",right:"0",top:"0",userSelect:"none",visibility:"visible",webkitUserSelect:"none",zIndex:"10000"},_.managed=new Set,_.subscribed=!1;let A=_;let S=!1;const k=new Set;function O(){S=!0,C()}const T=new Set(["premium","enterprise"]);function E(e,t){const n=A.add(t,{manage:!1});if(!n||"undefined"==typeof MutationObserver)return;if(e._wmNodeObserver&&e._wmObservedNode===n)return;e._wmNodeObserver&&e._wmNodeObserver.disconnect();const i=new MutationObserver(()=>{const e=A.node(t);e&&(i.disconnect(),A.applyStyles(e),i.takeRecords(),i.observe(e,{attributes:!0,attributeFilter:["style"]}))});i.observe(n,{attributes:!0,attributeFilter:["style"]}),e._wmNodeObserver=i,e._wmObservedNode=n}function I(e,t){e._wmWrapObserver&&(e._wmWrapObserver.disconnect(),e._wmWrapObserver=null),e._wmNodeObserver&&(e._wmNodeObserver.disconnect(),e._wmNodeObserver=null),e._wmObservedNode=null;const n=t||e.w&&e.w.dom&&e.w.dom.elWrap;n&&A.remove(n,{manage:!1})}function R(e,t){try{if(!u.isBrowser())return;if(e&&e.globals&&e.globals.isDestroyed)return void k.delete(t);const n=e&&e.dom&&e.dom.elWrap;if(!n)return;const i=function(e,t){const n=e&&e.config&&e.config.chart||{},i=[];"unit"===n.type&&i.push("unit"),"raincloud"===n.requestedType&&i.push("raincloud"),t.trellis&&"function"==typeof t.trellis.isActive&&t.trellis.isActive()&&i.push("trellis"),t.storyboard&&t.storyboard._used&&i.push("storyboard");const s=n.link;return t.linkedViews&&s&&(!0===s.enabled||"function"==typeof s.dimension)&&i.push("link"),t.ink&&n.ink&&!0===n.ink.enabled&&i.push("ink"),t.measure&&n.measure&&!0===n.measure.enabled&&i.push("measure"),t.contextMenu&&n.contextMenu&&!0===n.contextMenu.enabled&&i.push("context-menu"),t.perspectives&&(t.perspectives._used||S)&&i.push("perspectives"),t.history&&n.history&&!0===n.history.enabled&&i.push("history"),i}(e,t);if(0===i.length)return k.delete(t),void I(t,n);k.add(t);const s=function(e){const t=e&&e.config&&e.config.chart&&e.config.chart.license;if(t)return t;const n=w.getKey();if(n)return n;const i=u.getApex();return i&&i.license?i.license:null}(e);if(function(e){if(!e)return!1;const t=w.validateKey(e);if(!t.valid)return!1;const n=t.data&&t.data.plan;return"string"==typeof n&&T.has(n.toLowerCase())}(s))return void I(t,n);!function(e,t){if(E(e,t),"undefined"==typeof MutationObserver||e._wmWrapObserver)return;const n=new MutationObserver(()=>{A.node(t)||E(e,t)});n.observe(t,{childList:!0}),e._wmWrapObserver=n}(t,n),function(e,t,n){if(e._premiumLicenseNotified)return;if(e._premiumLicenseNotified=!0,n.length,!t)return;const i=w.validateKey(t);if(i.valid)return void(i.data&&i.data.plan);w.getKey()}(t,s,i)}catch(e){}}function C(){if(!u.isBrowser())return;const e=new Set,t=u.getApex(),n=t&&t._chartInstances;Array.isArray(n)&&n.forEach(t=>{const n=t&&t.chart;n&&n.w&&!n.w.globals.isDestroyed&&(e.add(n),R(n.w,n))}),Array.from(k).forEach(t=>{const n=t&&t.w,i=n&&n.dom&&n.dom.elWrap;n&&!n.globals.isDestroyed&&i&&!1!==i.isConnected?e.has(t)||R(n,t):k.delete(t)})}w.onChange(C);const K=d.__apex_Utils;function P(e,t){const n=null!=e,i=null!=t;return n||i?{min:n?e:null,max:i?t:null}:null}function D(e){return Array.isArray(e)?e.map(e=>Array.isArray(e)?e.slice():e):[]}function M(e,t){return"function"==typeof e&&t?e===t.addXaxisAnnotation?"xaxis":e===t.addYaxisAnnotation?"yaxis":e===t.addPointAnnotation?"point":null:null}function L(e,t){const n=e.config.annotations?K.clone(e.config.annotations):null,i=[],s=e.globals.memory&&e.globals.memory.methodsToExec||[];for(const e of s){if(!e||"addAnnotation"!==e.label)continue;const n=M(e.method,t);n&&i.push({kind:n,params:K.clone(e.params)})}return{static:n,dynamic:i}}function j(e){const t=e&&e.measure;if(!t||"function"!=typeof t.getPins)return null;const n=t.getPins();return Array.isArray(n)&&n.length?{pins:n}:null}function N(e,t,{animate:n=!0,mergeOptions:i}={}){var s,r;if(!e||!t)return;"number"==typeof t.v&&t.v,e.clearAnnotations();const a=i?K.clone(i):{},o=t.window&&t.window.xaxis;a.xaxis=Object.assign({},a.xaxis,o?{min:null!=(s=o.min)?s:void 0,max:null!=(r=o.max)?r:void 0}:{min:void 0,max:void 0});const l=t.window&&t.window.yaxis;if(Array.isArray(l)&&(a.yaxis=l.map(e=>{var t,n;return e?{min:null!=(t=e.min)?t:void 0,max:null!=(n=e.max)?n:void 0}:{}})),t.theme){const e={};null!=t.theme.mode&&(e.mode=t.theme.mode),null!=t.theme.palette&&(e.palette=t.theme.palette),Object.keys(e).length&&(a.theme=Object.assign({},a.theme,e))}t.annotations&&t.annotations.static&&(a.annotations=K.clone(t.annotations.static)),e.updateOptions(a,!1,n,!1,!1),function(e,t){if(!e||!t)return;const n=e.w;n.interact.zoomed=!!t.zoomed,function(e,t,n){const i=e.w;if(null==t&&null==n)return;const s=i.globals.seriesNames||[],r=new Set([...t||[],...n||[]]),a=new Set([...i.globals.collapsedSeriesIndices||[],...i.globals.ancillaryCollapsedSeriesIndices||[]]);for(let t=0;t<s.length;t++){const n=s[t];if(null==n)continue;const i=r.has(t),o=a.has(t);i&&!o?e.hideSeries(n):!i&&o&&e.showSeries(n)}}(e,t.collapsed,t.ancillaryCollapsed),t.annotations&&Array.isArray(t.annotations.dynamic)&&t.annotations.dynamic.forEach(t=>{const n=function(e){switch(e){case"xaxis":return"addXaxisAnnotation";case"yaxis":return"addYaxisAnnotation";case"point":return"addPointAnnotation";default:return null}}(t.kind);n&&"function"==typeof e[n]&&e[n](t.params,!0)});(function(e,t){Array.isArray(t)&&(e.w.interact.selectedDataPoints=D(t))})(e,t.selectedDataPoints),t.locale&&t.locale!==n.config.chart.defaultLocale&&e.setLocale(t.locale);e.measure&&"function"==typeof e.measure.setPins&&e.measure.setPins(t.measure&&t.measure.pins||[])}(e,t)}const B="apex";function U(e){return function(e){if("undefined"!=typeof Buffer)return Buffer.from(e,"utf-8").toString("base64");const t=(new TextEncoder).encode(e);let n="";for(let e=0;e<t.length;e++)n+=String.fromCharCode(t[e]);return btoa(n)}(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function W(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");for(;t.length%4;)t+="=";return function(e){if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").toString("utf-8");const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return(new TextDecoder).decode(n)}(t)}class ${constructor(e,t){this.w=e,this.ctx=t,this._saved=[],this._counter=0,this._used=!1}capture(){const e={v:1,view:function(e,t){var n,i;const s=e.config.xaxis||{},r=(Array.isArray(e.config.yaxis)?e.config.yaxis:e.config.yaxis?[e.config.yaxis]:[]).map(e=>P(e&&e.min,e&&e.max)),a=r.some(e=>null!==e),o=e.config.theme,l=t&&t.drilldown;return{v:1,window:{xaxis:P(s.min,s.max),yaxis:a?r:null},zoomed:!!e.interact.zoomed,collapsed:(e.globals.collapsedSeriesIndices||[]).slice(),ancillaryCollapsed:(e.globals.ancillaryCollapsedSeriesIndices||[]).slice(),selectedDataPoints:D(e.interact.selectedDataPoints),theme:o?{mode:null!=(n=o.mode)?n:null,palette:null!=(i=o.palette)?i:null}:null,locale:e.config.chart&&e.config.chart.defaultLocale||null,annotations:L(e,t),drill:l&&l.depth>0?{path:l.path.slice()}:null,measure:j(t)}}(this.w,this.ctx)},t=this._serializableDelta();return t&&Object.keys(t).length&&(e.options=t),e}_serializableDelta(){const e=this.w.config,t=e.chart&&e.chart.perspectives&&e.chart.perspectives.serializeOptions||["theme","xaxis","yaxis","title","subtitle"],n={};return t.forEach(t=>{if(void 0!==e[t]){const i=function(e){try{return JSON.parse(JSON.stringify(e))}catch(e){return}}(e[t]);void 0!==i&&(n[t]=i)}}),n}encode(e){const t=e||this.capture();return U(JSON.stringify(t))}decode(e){return $.decode(e)}toURL(){if(!u.isBrowser())return"";const e=this.encode(this.capture()),t=new URL(window.location.href);return t.hash=`${B}=${e}`,t.toString()}apply(e,t={}){const n="string"==typeof e?$.decode(e):e;if(!n||!n.view)return;this._used=!0,R(this.w,this.ctx);const i=void 0===t.animate||t.animate,s=K.extend(n.options?K.clone(n.options):{},t.mergeOptions||{}),r=Object.keys(s).length?s:void 0;(this.w.config.chart.group?this.ctx.getSyncedCharts():[this.ctx]).forEach(e=>{N(e,n.view,{animate:i,mergeOptions:r})})}save(e){const t="perspective-"+ ++this._counter;return this._saved.push({id:t,name:e||t,token:this.capture()}),this._used=!0,R(this.w,this.ctx),t}list(){return this._saved.map(e=>({id:e.id,name:e.name,token:e.token}))}delete(e){const t=this._saved.findIndex(t=>t.id===e);t>-1&&this._saved.splice(t,1)}teardown(){this._saved=[],this._counter=0}static decode(e){if("string"!=typeof e||!e)return null;try{const t=JSON.parse(W(e));return t&&"object"==typeof t?1!==t.v?null:t:null}catch(e){return null}}static fromURL(e){try{const t=e||(u.isBrowser()?window.location.href:"");if(!t)return null;const n=new URL(t).hash.replace(/^#/,"");if(!n)return null;const i=n.split("&").map(e=>e.split("=")).find(e=>e[0]===B);return i&&null!=i[1]?$.decode(decodeURIComponent(i[1])):null}catch(e){return null}}}d.default.registerFeatures({perspectives:$}),d.default.perspectives={decode:e=>(O(),$.decode(e)),fromURL:e=>(O(),$.fromURL(e))},d.default.registerFeatures({storyboard:class{constructor(e,t){this.w=e,this.ctx=t,this._beats=[],this._observer=null,this._activeIndex=-1,this._animate=!0,this._warnedNoPerspectives=!1,this._used=!1}bind(e={}){var t;if(this.unbind(),!u.isBrowser())return 0;const n=this.ctx.el&&this.ctx.el.ownerDocument;if(!n||"undefined"==typeof IntersectionObserver)return 0;let i=null;if(e.scroller&&(i="string"==typeof e.scroller?n.querySelector(e.scroller):e.scroller),this._beats=this._resolveBeats(n,i,e.beats),!this._beats.length)return 0;this._animate=!1!==e.animate;const s=Math.min(Math.max(null!=(t=e.offset)?t:.5,0),1),r=+(100*s).toFixed(3),a=+(100-100*s).toFixed(3);return this._observer=new IntersectionObserver(e=>this._onIntersect(e),{root:i,rootMargin:`-${r}% 0px -${a}%`,threshold:0}),this._beats.forEach(e=>{var t;return null==(t=this._observer)?void 0:t.observe(e.el)}),this._used=!0,R(this.w,this.ctx),this._beats.length}_resolveBeats(e,t,n){const i=[];if(Array.isArray(n))return n.forEach((t,n)=>{var s,r;if(!t)return;const a=t.el&&"object"==typeof t.el?t.el:t.selector?e.querySelector(t.selector):null;a&&i.push({el:a,key:null!=(r=null!=(s=t.key)?s:a.getAttribute("data-apex-beat"))?r:String(n),view:t.view,options:t.options,announce:t.announce,onEnter:"function"==typeof t.onEnter?t.onEnter:void 0})}),i;return(t||e).querySelectorAll("[data-apex-beat]").forEach((e,t)=>{i.push({el:e,key:e.getAttribute("data-apex-beat")||String(t),view:e.getAttribute("data-apex-view")||void 0,options:void 0,announce:e.getAttribute("data-apex-announce")||void 0,onEnter:void 0})}),i}_onIntersect(e){e.forEach(e=>{const t=this._beats.findIndex(t=>t.el===e.target);t<0||(e.isIntersecting?this._activate(t):t===this._activeIndex&&e.rootBounds&&e.boundingClientRect.top>=e.rootBounds.bottom&&t>0&&this._activate(t-1))})}_activate(e,t={}){var n,i;if(e===this._activeIndex)return;const s=this._beats[e];if(!s)return;const r=e>this._activeIndex?"down":"up";this._activeIndex=e;const a=(void 0!==t.animate?t.animate:this._animate)&&!h();if(null!=s.view||s.options)if(this.ctx.perspectives){const e=null!=(n=s.view)?n:{},t="string"==typeof e||e.view?e:{view:this._normalizeView(e)};this.ctx.perspectives.apply(t,{animate:a,mergeOptions:s.options})}else this._warnedNoPerspectives||(this._warnedNoPerspectives=!0);const o={index:e,key:s.key,el:s.el,direction:r};s.onEnter&&s.onEnter(this.ctx,o),s.announce&&this._announce(s.announce),"function"==typeof this.w.config.chart.events.beatChange&&this.w.config.chart.events.beatChange(this.ctx,o),null==(i=this.ctx.events)||i.fireEvent("beatChange",[this.ctx,o])}_normalizeView(e){const t=e.annotations&&e.annotations.static||{};return l(o({},e),{annotations:{static:o({points:[],xaxis:[],yaxis:[],texts:[],images:[]},t),dynamic:e.annotations&&e.annotations.dynamic||[]}})}goTo(e,t={}){const n="number"==typeof e?e:this._beats.findIndex(t=>t.key===e);n>=0&&n<this._beats.length&&this._activate(n,t)}current(){if(this._activeIndex<0)return null;const e=this._beats[this._activeIndex];return{index:this._activeIndex,key:e?e.key:null}}unbind(){this._observer&&(this._observer.disconnect(),this._observer=null),this._beats=[],this._activeIndex=-1,this._used=!1,R(this.w,this.ctx)}teardown(){this.unbind()}_announce(e){const t=this.w;if(!t.config.chart.accessibility.announcements.enabled)return;const n=t.dom.baseEl;if(!n)return;const i=n.querySelector(".apexcharts-sr-status");i&&(i.textContent="",setTimeout(()=>{i.textContent=e},0))}}}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>d.default});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
5
|
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ApexStoryboard={})}(this,function(e){"use strict";var t=Object.defineProperty,n=Object.defineProperties,i=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,o=(e,n,i)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i,l=(e,t)=>{for(var n in t||(t={}))r.call(t,n)&&o(e,n,t[n]);if(s)for(var n of s(t))a.call(t,n)&&o(e,n,t[n]);return e},c=(e,t)=>n(e,i(t));const d=globalThis.ApexCharts,u=globalThis.ApexCharts.__internals.__apex_Environment_Environment,h=globalThis.ApexCharts.__internals;h.__apex_Animations,h.__apex_Animations_computeStagger,h.__apex_Animations_applyAnimationPolicy;const p=h.__apex_Animations_prefersReducedMotion;h.__apex_Animations_applyProgressiveReveal;const f=globalThis.console;function v(e,...t){f.error(e,...t)}function y(e){f.warn(e)}const m="APEX-",g=new Date("2027-07-31T00:00:00Z"),b="__apex_license_v1__";function x(){const e=globalThis;let t=e[b];return t||(t={key:null,listeners:new Set,result:null},e[b]=t),t}const w=class{static get licenseKey(){return x().key}static set licenseKey(e){x().key=e}static get listeners(){return x().listeners}static get validationResult(){return x().result}static set validationResult(e){x().result=e}static getKey(){return this.licenseKey}static getLicenseStatus(){return this.licenseKey?(this.validationResult=this.validateKey(this.licenseKey),this.validationResult):{expired:!1,signatureVerified:!1,valid:!1}}static isKeyValid(e){return!!e&&this.validateKey(e).valid}static isLicenseValid(){return this.getLicenseStatus().valid}static onChange(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}static setLicense(e){var t,n;if(!e)return this.licenseKey=null,void this.publish({expired:!1,signatureVerified:!1,valid:!1});const i=this.validateKey(e);i.valid||e===this.licenseKey||!(null==(n=this.validationResult)?void 0:n.valid)?(this.licenseKey=e,this.publish(i),i.valid||v(`[Apex] ${i.message}`)):y(`[Apex] Ignoring license key: ${null!=(t=i.message)?t:"it is not valid"} A valid license is already active on this page.`)}static validateKey(e){const t=this.parseKey(e),n=this.validateStructure(e,t);if(!n.valid||!(null==t?void 0:t.signature))return n;const i=this.verdicts.get(e);return!1===i?{data:t.data,expired:!1,message:"Invalid license key. The license signature does not verify.",signatureVerified:!0,valid:!1}:(void 0===i&&this.verifySignature(e,t,n),c(l({},n),{signatureVerified:!0===i}))}static _resetSignatureState(){this.verdicts.clear(),this.verifying.clear(),this.warnedUnverifiable=!1,this.epoch++}static base64ToBytes(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(4*Math.ceil(t.length/4),"="),i=globalThis.atob;if("function"!=typeof i)throw new Error("no base64 decoder available");const s=i(n),r=new Uint8Array(s.length);for(let e=0;e<s.length;e++)r[e]=s.charCodeAt(e);return r}static canonicalPayload(e){const t=e.domains&&e.domains.length>0?e.domains.join(","):"";return`v1|${e.issueDate}|${e.expiryDate}|${e.plan}|${t}`}static notify(e){for(const t of this.listeners)try{t(e)}catch(e){}}static parseKey(e){if("string"!=typeof e||!e.startsWith(m))return null;const t=e.slice(5);if(!t)return null;try{const e=(new TextDecoder).decode(this.base64ToBytes(t)),n=JSON.parse(e);return n.issueDate&&n.expiryDate&&n.plan?{data:{domains:Array.isArray(n.domains)?n.domains:void 0,expiryDate:n.expiryDate,issueDate:n.issueDate,plan:n.plan,valid:!0},signature:"string"==typeof n.sig&&n.sig?n.sig:null}:null}catch(e){return null}}static publish(e){this.validationResult=e,this.notify(e)}static validateStructure(e,t){const n=e=>({expired:!1,message:e,signatureVerified:!1,valid:!1});if("string"!=typeof e||!e.startsWith(m))return n('Invalid license key format. License key must start with "APEX-".');if(!t)return n("Invalid license key. Unable to decode license data.");const{data:i,signature:s}=t;if(!s&&new Date>=g)return n("This license key is in the old unsigned format, which is no longer accepted. Please request a replacement key.");if(new Date(i.expiryDate)<new Date)return{data:i,expired:!0,message:`License expired on ${i.expiryDate}. Please renew your license.`,signatureVerified:!1,valid:!1};if(i.domains&&i.domains.length>0){const e="undefined"==typeof location?"":location.hostname;if(!i.domains.some(t=>e===t||e.endsWith(`.${t}`)))return{data:i,expired:!1,message:`License is not valid for this domain (${e}). Allowed domains: ${i.domains.join(", ")}.`,signatureVerified:!1,valid:!1}}return{data:i,expired:!1,signatureVerified:!1,valid:!0}}static verifySignature(e,t,n){return i=this,s=null,r=function*(){var i;if(this.verifying.has(e)||this.verdicts.has(e))return;this.verifying.add(e);const s=this.epoch,r=null==(i=globalThis.crypto)?void 0:i.subtle;if(!r||0===this.publicKeysSpki.length)return this.verifying.delete(e),void(this.warnedUnverifiable||(this.warnedUnverifiable=!0,y(r?"[Apex] No license signing key is configured in this build, so license signatures cannot be verified.":"[Apex] Web Crypto is unavailable (a secure context is required), so the license signature cannot be verified.")));const a=(new TextEncoder).encode(this.canonicalPayload(t.data));let o=!1;for(const e of this.publicKeysSpki){try{const n=yield r.importKey("spki",this.base64ToBytes(e),{name:"ECDSA",namedCurve:"P-256"},!1,["verify"]);o=yield r.verify({hash:"SHA-256",name:"ECDSA"},n,this.base64ToBytes(t.signature),a)}catch(e){o=!1}if(o)break}if(this.verifying.delete(e),this.epoch!==s)return;if(this.verdicts.set(e,o),o){const t=c(l({},n),{signatureVerified:!0});return void(this.licenseKey===e?this.publish(t):this.notify(t))}const d="Invalid license key. The license signature does not verify.",u={data:t.data,expired:!1,message:d,signatureVerified:!0,valid:!1};this.licenseKey===e?this.publish(u):this.notify(u),v(`[Apex] ${d}`)},new Promise((e,t)=>{var n=e=>{try{o(r.next(e))}catch(e){t(e)}},a=e=>{try{o(r.throw(e))}catch(e){t(e)}},o=t=>t.done?e(t.value):Promise.resolve(t.value).then(n,a);o((r=r.apply(i,s)).next())});var i,s,r}};w.publicKeysSpki=["MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEQIaK9UMD6n0oR/FIy8QdL0uSzKMQlf1BB+tOrji4/WuHsyRNxeDhVykoSsNURozMi1xhmqWvBH1L//xIfugTPA=="],w.verdicts=new Map,w.verifying=new Set,w.warnedUnverifiable=!1,w.epoch=0;let _=w;const A=class{static applyStyles(e){Object.assign(e.style,this.CRITICAL_STYLES,{backgroundImage:this.createWatermarkPattern(),backgroundRepeat:"repeat"})}static node(e){return e?e.querySelector(`[${this.WATERMARK_ATTR}]`):null}static add(e,t){return e&&"undefined"!=typeof document?(this.setManaged(e,t),this.paint(e)):null}static exists(e){return!!this.node(e)}static remove(e,t){e&&(this.setManaged(e,t),this.erase(e))}static untrack(e){this.managed.delete(e)}static createWatermarkPattern(){const e=this.WATERMARK_TEXT;return`url("data:image/svg+xml,${encodeURIComponent(`\n <svg xmlns="http://www.w3.org/2000/svg" width="300" height="200">\n <text\n x="50%"\n y="50%"\n dominant-baseline="middle"\n text-anchor="middle"\n font-family="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Arial, sans-serif"\n font-size="18"\n font-weight="600"\n fill="rgba(134, 134, 134, 0.1)"\n transform="rotate(-35, 100, 60)"\n >${e}</text>\n </svg>\n `.trim())}")`}static erase(e){var t;null==(t=this.node(e))||t.remove()}static paint(e){let t=this.node(e);return t||(t=document.createElement("div"),t.setAttribute(this.WATERMARK_ATTR,""),e.appendChild(t)),this.applyStyles(t),"function"==typeof getComputedStyle&&"static"===getComputedStyle(e).position&&(e.style.position="relative"),t}static reconcile(){const e=_.isLicenseValid();for(const t of this.managed)t.isConnected?e?this.erase(t):this.paint(t):this.managed.delete(t)}static setManaged(e,t){!1!==(null==t?void 0:t.manage)?this.track(e):this.managed.delete(e)}static track(e){this.managed.add(e),this.subscribed||(this.subscribed=!0,_.onChange(()=>{this.reconcile()}))}};A.WATERMARK_ATTR="data-apexcharts-watermark",A.WATERMARK_TEXT="APEXCHARTS",A.ATTR="data-apexcharts-watermark",A.CRITICAL_STYLES={bottom:"0",display:"block",left:"0",msUserSelect:"none",opacity:"1",pointerEvents:"none",position:"absolute",right:"0",top:"0",userSelect:"none",visibility:"visible",webkitUserSelect:"none",zIndex:"10000"},A.managed=new Set,A.subscribed=!1;let S=A;const k="https://apexcharts.com/pricing";let T=!1;const O=new Set;function E(){T=!0,K()}const I=new Set(["premium","enterprise"]);function C(e,t){const n=S.add(t,{manage:!1});if(!n||"undefined"==typeof MutationObserver)return;if(e._wmNodeObserver&&e._wmObservedNode===n)return;e._wmNodeObserver&&e._wmNodeObserver.disconnect();const i=new MutationObserver(()=>{const e=S.node(t);e&&(i.disconnect(),S.applyStyles(e),i.takeRecords(),i.observe(e,{attributes:!0,attributeFilter:["style"]}))});i.observe(n,{attributes:!0,attributeFilter:["style"]}),e._wmNodeObserver=i,e._wmObservedNode=n}function R(e,t){e._wmWrapObserver&&(e._wmWrapObserver.disconnect(),e._wmWrapObserver=null),e._wmNodeObserver&&(e._wmNodeObserver.disconnect(),e._wmNodeObserver=null),e._wmObservedNode=null;const n=t||e.w&&e.w.dom&&e.w.dom.elWrap;n&&S.remove(n,{manage:!1})}function P(e,t){try{if(!u.isBrowser())return;if(e&&e.globals&&e.globals.isDestroyed)return void O.delete(t);const n=e&&e.dom&&e.dom.elWrap;if(!n)return;const i=function(e,t){const n=e&&e.config&&e.config.chart||{},i=[];"unit"===n.type&&i.push("unit"),"raincloud"===n.requestedType&&i.push("raincloud"),t.trellis&&"function"==typeof t.trellis.isActive&&t.trellis.isActive()&&i.push("trellis"),t.storyboard&&t.storyboard._used&&i.push("storyboard");const s=n.link;return t.linkedViews&&s&&(!0===s.enabled||"function"==typeof s.dimension)&&i.push("link"),t.ink&&n.ink&&!0===n.ink.enabled&&i.push("ink"),t.measure&&n.measure&&!0===n.measure.enabled&&i.push("measure"),t.contextMenu&&n.contextMenu&&!0===n.contextMenu.enabled&&i.push("context-menu"),t.perspectives&&(t.perspectives._used||T)&&i.push("perspectives"),t.history&&n.history&&!0===n.history.enabled&&i.push("history"),i}(e,t);if(0===i.length)return O.delete(t),void R(t,n);O.add(t);const s=function(e){const t=e&&e.config&&e.config.chart&&e.config.chart.license;if(t)return t;const n=_.getKey();if(n)return n;const i=u.getApex();return i&&i.license?i.license:null}(e);if(function(e){if(!e)return!1;const t=_.validateKey(e);if(!t.valid)return!1;const n=t.data&&t.data.plan;return"string"==typeof n&&I.has(n.toLowerCase())}(s))return void R(t,n);!function(e,t){if(C(e,t),"undefined"==typeof MutationObserver||e._wmWrapObserver)return;const n=new MutationObserver(()=>{S.node(t)||C(e,t)});n.observe(t,{childList:!0}),e._wmWrapObserver=n}(t,n),function(e,t,n){if(e._premiumLicenseNotified)return;e._premiumLicenseNotified=!0;const i=n.length>1;if(!t)return void console.warn(`[ApexCharts] Premium feature${i?"s":""} in use (${n.join(", ")}) without a license. Running in trial mode with a watermark. Get a license: ${k}`);const s=_.validateKey(t);if(s.valid){const e=s.data&&s.data.plan||"current";return void console.warn(`[ApexCharts] Premium feature${i?"s":""} in use (${n.join(", ")}) require a Premium or Enterprise license; the ${e} plan does not include ${i?"them":"it"}. Running in trial mode with a watermark. Upgrade: ${k}`)}t!==_.getKey()&&console.error(`[Apex] ${s.message}`)}(t,s,i)}catch(e){}}function K(){if(!u.isBrowser())return;const e=new Set,t=u.getApex(),n=t&&t._chartInstances;Array.isArray(n)&&n.forEach(t=>{const n=t&&t.chart;n&&n.w&&!n.w.globals.isDestroyed&&(e.add(n),P(n.w,n))}),Array.from(O).forEach(t=>{const n=t&&t.w,i=n&&n.dom&&n.dom.elWrap;n&&!n.globals.isDestroyed&&i&&!1!==i.isConnected?e.has(t)||P(n,t):O.delete(t)})}_.onChange(K);const D=globalThis.ApexCharts.__internals.__apex_Utils;function $(e,t){const n=null!=e,i=null!=t;return n||i?{min:n?e:null,max:i?t:null}:null}function M(e){return Array.isArray(e)?e.map(e=>Array.isArray(e)?e.slice():e):[]}function L(e,t){return"function"==typeof e&&t?e===t.addXaxisAnnotation?"xaxis":e===t.addYaxisAnnotation?"yaxis":e===t.addPointAnnotation?"point":null:null}function N(e,t){const n=e.config.annotations?D.clone(e.config.annotations):null,i=[],s=e.globals.memory&&e.globals.memory.methodsToExec||[];for(const e of s){if(!e||"addAnnotation"!==e.label)continue;const n=L(e.method,t);n&&i.push({kind:n,params:D.clone(e.params)})}return{static:n,dynamic:i}}function j(e){const t=e&&e.measure;if(!t||"function"!=typeof t.getPins)return null;const n=t.getPins();return Array.isArray(n)&&n.length?{pins:n}:null}function U(e,t,{animate:n=!0,mergeOptions:i}={}){var s,r;if(!e||!t)return;"number"==typeof t.v&&t.v>1&&console.warn(`[apexcharts] ViewState v${t.v} is newer than this build understands (v1); applying best-effort.`),e.clearAnnotations();const a=i?D.clone(i):{},o=t.window&&t.window.xaxis;a.xaxis=Object.assign({},a.xaxis,o?{min:null!=(s=o.min)?s:void 0,max:null!=(r=o.max)?r:void 0}:{min:void 0,max:void 0});const l=t.window&&t.window.yaxis;if(Array.isArray(l)&&(a.yaxis=l.map(e=>{var t,n;return e?{min:null!=(t=e.min)?t:void 0,max:null!=(n=e.max)?n:void 0}:{}})),t.theme){const e={};null!=t.theme.mode&&(e.mode=t.theme.mode),null!=t.theme.palette&&(e.palette=t.theme.palette),Object.keys(e).length&&(a.theme=Object.assign({},a.theme,e))}t.annotations&&t.annotations.static&&(a.annotations=D.clone(t.annotations.static)),e.updateOptions(a,!1,n,!1,!1),function(e,t){if(!e||!t)return;const n=e.w;n.interact.zoomed=!!t.zoomed,function(e,t,n){const i=e.w;if(null==t&&null==n)return;const s=i.globals.seriesNames||[],r=new Set([...t||[],...n||[]]),a=new Set([...i.globals.collapsedSeriesIndices||[],...i.globals.ancillaryCollapsedSeriesIndices||[]]);for(let t=0;t<s.length;t++){const n=s[t];if(null==n)continue;const i=r.has(t),o=a.has(t);i&&!o?e.hideSeries(n):!i&&o&&e.showSeries(n)}}(e,t.collapsed,t.ancillaryCollapsed),t.annotations&&Array.isArray(t.annotations.dynamic)&&t.annotations.dynamic.forEach(t=>{const n=function(e){switch(e){case"xaxis":return"addXaxisAnnotation";case"yaxis":return"addYaxisAnnotation";case"point":return"addPointAnnotation";default:return null}}(t.kind);n&&"function"==typeof e[n]&&e[n](t.params,!0)});(function(e,t){Array.isArray(t)&&(e.w.interact.selectedDataPoints=M(t))})(e,t.selectedDataPoints),t.locale&&t.locale!==n.config.chart.defaultLocale&&e.setLocale(t.locale);e.measure&&"function"==typeof e.measure.setPins&&e.measure.setPins(t.measure&&t.measure.pins||[])}(e,t)}const B="apex";function W(e){return function(e){if("undefined"!=typeof Buffer)return Buffer.from(e,"utf-8").toString("base64");const t=(new TextEncoder).encode(e);let n="";for(let e=0;e<t.length;e++)n+=String.fromCharCode(t[e]);return btoa(n)}(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function V(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");for(;t.length%4;)t+="=";return function(e){if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").toString("utf-8");const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return(new TextDecoder).decode(n)}(t)}class z{constructor(e,t){this.w=e,this.ctx=t,this._saved=[],this._counter=0,this._used=!1}capture(){const e={v:1,view:function(e,t){var n,i;const s=e.config.xaxis||{},r=(Array.isArray(e.config.yaxis)?e.config.yaxis:e.config.yaxis?[e.config.yaxis]:[]).map(e=>$(e&&e.min,e&&e.max)),a=r.some(e=>null!==e),o=e.config.theme,l=t&&t.drilldown;return{v:1,window:{xaxis:$(s.min,s.max),yaxis:a?r:null},zoomed:!!e.interact.zoomed,collapsed:(e.globals.collapsedSeriesIndices||[]).slice(),ancillaryCollapsed:(e.globals.ancillaryCollapsedSeriesIndices||[]).slice(),selectedDataPoints:M(e.interact.selectedDataPoints),theme:o?{mode:null!=(n=o.mode)?n:null,palette:null!=(i=o.palette)?i:null}:null,locale:e.config.chart&&e.config.chart.defaultLocale||null,annotations:N(e,t),drill:l&&l.depth>0?{path:l.path.slice()}:null,measure:j(t)}}(this.w,this.ctx)},t=this._serializableDelta();return t&&Object.keys(t).length&&(e.options=t),e}_serializableDelta(){const e=this.w.config,t=e.chart&&e.chart.perspectives&&e.chart.perspectives.serializeOptions||["theme","xaxis","yaxis","title","subtitle"],n={};return t.forEach(t=>{if(void 0!==e[t]){const i=function(e){try{return JSON.parse(JSON.stringify(e))}catch(e){return}}(e[t]);void 0!==i&&(n[t]=i)}}),n}encode(e){const t=e||this.capture();return W(JSON.stringify(t))}decode(e){return z.decode(e)}toURL(){if(!u.isBrowser())return"";const e=this.encode(this.capture()),t=new URL(window.location.href);return t.hash=`${B}=${e}`,t.toString()}apply(e,t={}){const n="string"==typeof e?z.decode(e):e;if(!n||!n.view)return;this._used=!0,P(this.w,this.ctx);const i=void 0===t.animate||t.animate,s=D.extend(n.options?D.clone(n.options):{},t.mergeOptions||{}),r=Object.keys(s).length?s:void 0;(this.w.config.chart.group?this.ctx.getSyncedCharts():[this.ctx]).forEach(e=>{U(e,n.view,{animate:i,mergeOptions:r})})}save(e){const t="perspective-"+ ++this._counter;return this._saved.push({id:t,name:e||t,token:this.capture()}),this._used=!0,P(this.w,this.ctx),t}list(){return this._saved.map(e=>({id:e.id,name:e.name,token:e.token}))}delete(e){const t=this._saved.findIndex(t=>t.id===e);t>-1&&this._saved.splice(t,1)}teardown(){this._saved=[],this._counter=0}static decode(e){if("string"!=typeof e||!e)return null;try{const t=JSON.parse(V(e));return t&&"object"==typeof t?1!==t.v?(console.warn(`apexcharts: unsupported perspective version ${t.v} (expected 1).`),null):t:null}catch(e){return console.warn("apexcharts: failed to decode perspective token.",e),null}}static fromURL(e){try{const t=e||(u.isBrowser()?window.location.href:"");if(!t)return null;const n=new URL(t).hash.replace(/^#/,"");if(!n)return null;const i=n.split("&").map(e=>e.split("=")).find(e=>e[0]===B);return i&&null!=i[1]?z.decode(decodeURIComponent(i[1])):null}catch(e){return null}}}d.registerFeatures({perspectives:z}),d.perspectives={decode:e=>(E(),z.decode(e)),fromURL:e=>(E(),z.fromURL(e))},d.registerFeatures({storyboard:class{constructor(e,t){this.w=e,this.ctx=t,this._beats=[],this._observer=null,this._activeIndex=-1,this._animate=!0,this._warnedNoPerspectives=!1,this._used=!1}bind(e={}){var t;if(this.unbind(),!u.isBrowser())return 0;const n=this.ctx.el&&this.ctx.el.ownerDocument;if(!n||"undefined"==typeof IntersectionObserver)return 0;let i=null;if(e.scroller&&(i="string"==typeof e.scroller?n.querySelector(e.scroller):e.scroller),this._beats=this._resolveBeats(n,i,e.beats),!this._beats.length)return 0;this._animate=!1!==e.animate;const s=Math.min(Math.max(null!=(t=e.offset)?t:.5,0),1),r=+(100*s).toFixed(3),a=+(100-100*s).toFixed(3);return this._observer=new IntersectionObserver(e=>this._onIntersect(e),{root:i,rootMargin:`-${r}% 0px -${a}%`,threshold:0}),this._beats.forEach(e=>{var t;return null==(t=this._observer)?void 0:t.observe(e.el)}),this._used=!0,P(this.w,this.ctx),this._beats.length}_resolveBeats(e,t,n){const i=[];if(Array.isArray(n))return n.forEach((t,n)=>{var s,r;if(!t)return;const a=t.el&&"object"==typeof t.el?t.el:t.selector?e.querySelector(t.selector):null;a?i.push({el:a,key:null!=(r=null!=(s=t.key)?s:a.getAttribute("data-apex-beat"))?r:String(n),view:t.view,options:t.options,announce:t.announce,onEnter:"function"==typeof t.onEnter?t.onEnter:void 0}):console.warn(`apexcharts: storyboard beat ${n} has no resolvable element; skipped.`)}),i;return(t||e).querySelectorAll("[data-apex-beat]").forEach((e,t)=>{i.push({el:e,key:e.getAttribute("data-apex-beat")||String(t),view:e.getAttribute("data-apex-view")||void 0,options:void 0,announce:e.getAttribute("data-apex-announce")||void 0,onEnter:void 0})}),i}_onIntersect(e){e.forEach(e=>{const t=this._beats.findIndex(t=>t.el===e.target);t<0||(e.isIntersecting?this._activate(t):t===this._activeIndex&&e.rootBounds&&e.boundingClientRect.top>=e.rootBounds.bottom&&t>0&&this._activate(t-1))})}_activate(e,t={}){var n,i;if(e===this._activeIndex)return;const s=this._beats[e];if(!s)return;const r=e>this._activeIndex?"down":"up";this._activeIndex=e;const a=(void 0!==t.animate?t.animate:this._animate)&&!p();if(null!=s.view||s.options)if(this.ctx.perspectives){const e=null!=(n=s.view)?n:{},t="string"==typeof e||e.view?e:{view:this._normalizeView(e)};this.ctx.perspectives.apply(t,{animate:a,mergeOptions:s.options})}else this._warnedNoPerspectives||(this._warnedNoPerspectives=!0,console.warn('apexcharts: storyboard beats carry views but the perspectives feature is not bundled. import "apexcharts/features/storyboard" (which includes it) or drive beats via onEnter.'));const o={index:e,key:s.key,el:s.el,direction:r};s.onEnter&&s.onEnter(this.ctx,o),s.announce&&this._announce(s.announce),"function"==typeof this.w.config.chart.events.beatChange&&this.w.config.chart.events.beatChange(this.ctx,o),null==(i=this.ctx.events)||i.fireEvent("beatChange",[this.ctx,o])}_normalizeView(e){const t=e.annotations&&e.annotations.static||{};return c(l({},e),{annotations:{static:l({points:[],xaxis:[],yaxis:[],texts:[],images:[]},t),dynamic:e.annotations&&e.annotations.dynamic||[]}})}goTo(e,t={}){const n="number"==typeof e?e:this._beats.findIndex(t=>t.key===e);n>=0&&n<this._beats.length&&this._activate(n,t)}current(){if(this._activeIndex<0)return null;const e=this._beats[this._activeIndex];return{index:this._activeIndex,key:e?e.key:null}}unbind(){this._observer&&(this._observer.disconnect(),this._observer=null),this._beats=[],this._activeIndex=-1,this._used=!1,P(this.w,this.ctx)}teardown(){this.unbind()}_announce(e){const t=this.w;if(!t.config.chart.accessibility.announcements.enabled)return;const n=t.dom.baseEl;if(!n)return;const i=n.querySelector(".apexcharts-sr-status");i&&(i.textContent="",setTimeout(()=>{i.textContent=e},0))}}}),e.default=d,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.3.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
5
|
"use strict";var t=Object.defineProperty,e=Object.defineProperties,r=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable,i=(e,r,n)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,l=(t,e)=>{for(var r in e||(e={}))o.call(e,r)&&i(t,r,e[r]);if(n)for(var r of n(e))s.call(e,r)&&i(t,r,e[r]);return t},a=(t,n)=>e(t,r(n));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 r in t)if("default"!==r){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}return e.default=t,Object.freeze(e)}const c=h(require("apexcharts/core")),u=c.__apex_Graphics,d=c.__apex_Utils;class f{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)/f.xRatio(t)}static pxToDataX(t,e){return t.globals.minX+e*f.xRatio(t)}static screenXToPlotPx(t,e){const r=t.dom.baseEl,n=r&&r.querySelector(".apexcharts-svg");if(!n)return e-t.layout.translateX;const o=n.getBoundingClientRect(),s=t.globals.svgWidth?o.width/t.globals.svgWidth:1;return(e-o.left)/(s||1)-t.layout.translateX}}const g=c.__apex_Environment_Environment;const m=["wiggle","silhouette","zero","expand"],p=["inside-out","inverse","none"];function b(t,e,r){const n=r&&void 0!==r[e]?r[e]:e+1;return null==t?{x:n,y:null,rest:{}}:Array.isArray(t)?{x:void 0!==t[0]?t[0]:n,y:t[1],rest:{}}:"object"==typeof t?{x:void 0!==t.x?t.x:n,y:t.y,rest:t}:{x:n,y:t,rest:{}}}function y(t,e){var r,n;const o=e.config,s=e.globals;if(!Array.isArray(t))return t;s.streamgraphRawSeries||(s.streamgraphRawSeries=t.map(t=>a(l({},t),{data:Array.isArray(null==t?void 0:t.data)?t.data.slice():null==t?void 0:t.data})));const i=s.streamgraphRawSeries;if(i.some(t=>function(t){for(let e=0;e<t.length;e++){const r=t[e],n=Array.isArray(r)?r[1]:r&&"object"==typeof r?r.y:r;if(Array.isArray(n)&&2===n.length)return!0}return!1}(Array.isArray(null==t?void 0:t.data)?t.data:[])))return e.streamgraphData=null,t;const h=(null==(r=o.plotOptions)?void 0:r.streamgraph)||{},c=-1!==m.indexOf(h.offset)?h.offset:"wiggle",u=-1!==p.indexOf(h.order)?h.order:"inside-out",f=null==(n=o.xaxis)?void 0:n.categories,g=s.collapsedSeriesIndices||[],{xs:y,rows:x,grids:v}=function(t,e){var r;const n=[],o=[],s=new Map,i=[];for(let a=0;a<t.length;a++){const h=Array.isArray(null==(r=t[a])?void 0:r.data)?t[a].data:[],c=new Map;for(let t=0;t<h.length;t++){const{x:r,y:i,rest:a}=b(h[t],t,e),u=r instanceof Date?r.getTime():r;s.has(u)||(s.set(u,n.length),n.push(r),o.push(l({},a))),c.set(s.get(u),d.parseNumber(i))}i.push(c)}return{xs:n,rows:o,grids:i}}(i,f),w=function(t){const e=[];for(let r=0;r<t.length;r++){const n=t[r]instanceof Date?t[r].getTime():t[r];if("number"!=typeof n||!isFinite(n))return null;e.push(r)}const r=e.map(e=>({j:e,v:t[e]instanceof Date?t[e].getTime():t[e]}));r.sort((t,e)=>t.v-e.v);const n=r.map(t=>t.j);for(let t=0;t<n.length;t++)if(n[t]!==t)return n;return null}(y),_=w?w.map(t=>y[t]):y,A=w?w.map(t=>x[t]):x,S=_.length;let O=!1;const F=[];for(let t=0;t<i.length;t++){const e=new Array(S);for(let r=0;r<S;r++){const n=v[t].get(w?w[r]:r);let o=null==n?0:Number(n);isFinite(o)||(o=0),o<0&&(O=!0,o=0),e[r]=o}F.push(e)}O&&!s.streamgraphWarnedNegative&&(s.streamgraphWarnedNegative=!0);const P=[];for(let t=0;t<i.length;t++)-1===g.indexOf(t)&&P.push(t);let T=F;if("expand"===c){T=F.map(t=>t.slice());for(let t=0;t<S;t++){let e=0;for(let r=0;r<P.length;r++)e+=T[P[r]][t];if(e)for(let r=0;r<P.length;r++)T[P[r]][t]/=e}}const M=function(t,e,r){if("none"===t)return e.slice();if("inverse"===t)return e.slice().reverse();const n={},o={};for(let t=0;t<e.length;t++){const s=e[t],i=r[s];let l=0,a=-1/0,h=0;for(let t=0;t<i.length;t++)l+=i[t],i[t]>a&&(a=i[t],h=t);n[s]=l,o[s]=h}const s=e.slice().sort((t,e)=>o[t]-o[e]||t-e);let i=0,l=0;const a=[],h=[];for(let t=0;t<s.length;t++){const e=s[t];i<l?(i+=n[e],a.push(e)):(l+=n[e],h.push(e))}return h.reverse().concat(a)}(u,P,T),W=function(t,e,r,n){const o=new Array(n).fill(0);if(0===n||0===e.length)return o;if("zero"===t||"expand"===t)return o;if("silhouette"===t){for(let t=0;t<n;t++){let n=0;for(let o=0;o<e.length;o++)n+=r[e[o]][t];o[t]=-n/2}return o}let s=0;for(let t=1;t<n;t++){let n=0,i=0;for(let o=0;o<e.length;o++){const s=r[e[o]],l=s[t];let a=(l-s[t-1])/2;for(let n=0;n<o;n++){const o=r[e[n]];a+=o[t]-o[t-1]}n+=l,i+=a*l}n&&(s-=i/n),o[t]=s}return o}(c,M,T,S),E=i.map(()=>null),j=i.map(()=>null);for(let t=0;t<M.length;t++)E[M[t]]=new Array(S),j[M[t]]=new Array(S);for(let t=0;t<S;t++){let e=W[t];for(let r=0;r<M.length;r++){const n=M[r],o=E[n],s=j[n];o[t]=e,e+=T[n][t],s[t]=e}}return e.streamgraphData={names:i.map((t,e)=>{var r;return null!=(r=null==t?void 0:t.name)?r:`Series ${e+1}`}),xs:_,values:F,lows:E,highs:j,order:M,offset:c,hidden:i.map((t,e)=>e).filter(t=>-1!==g.indexOf(t))},i.map((t,e)=>{const r=E[e],n=j[e];if(!r||!n)return a(l({},t),{data:[]});const o=new Array(S);for(let t=0;t<S;t++)o[t]=a(l({},A[t]),{x:_[t],y:[r[t],n[t]]});return a(l({},t),{data:o})})}const x="__apexcharts_series_transforms__";var v,w;globalThis[x]||(globalThis[x]={}),v="streamgraph","function"==typeof(w=y)&&(globalThis[x][v]=w),c.default.registerFeatures({streamgraph:class{constructor(t,e){this.w=t,this.ctx=e,this._hovered=-1}isActive(){return"streamgraph"===this.w.config.chart.requestedType}_yPx(t){var e;const r=this.w,n=r.globals,o=r.layout.gridHeight,s=n.maxY-n.minY;if(!s||!isFinite(s))return o/2;const i=(t-n.minY)/s;return(null==(e=r.config.yaxis[0])?void 0:e.reversed)?i*o:o-i*o}draw(){this.isActive()&&(this.clearDim(),this.bindHover(),this.drawLabels())}drawLabels(){var t,e,r,n,o,s,i;const l=this.w;if(!this.isActive())return;const a=null==(e=null==(t=l.config.plotOptions)?void 0:t.streamgraph)?void 0:e.labels;if(!a||!1===a.show)return;const h=l.dom.elGraphical,c=l.streamgraphData;if(!h||!c)return;this.removeLabels();const d=new u(l,this.ctx),f=d.group({class:"apexcharts-streamgraph-labels"}),g=(null==(r=a.style)?void 0:r.fontSize)||"auto",m=(null==(n=a.style)?void 0:n.fontFamily)||l.config.chart.fontFamily,p=(null==(o=a.style)?void 0:o.fontWeight)||600,b=null==a.minWidth?24:a.minWidth,y=[];for(let t=0;t<c.order.length;t++){const e=c.order[t],r=this._placeLabel(e,{fontSize:g,fontFamily:m,fontWeight:p,minWidth:b,graphics:d});r&&y.push(r)}let x=0;for(const t of this._deconflict(y)){const e=t.k,r=d.drawText({x:t.x,y:t.y,text:t.text,textAnchor:"middle",dominantBaseline:"middle",fontSize:t.fontSize,fontFamily:m,fontWeight:p,foreColor:(null==(i=null==(s=a.style)?void 0:s.colors)?void 0:i[e])||t.color,cssClass:"apexcharts-streamgraph-label"});r.node.setAttribute("data:realIndex",String(e)),f.add(r),x++}if(!x)return;const v=h.node.querySelector(".apexcharts-xaxis");v?h.node.insertBefore(f.node,v):h.add(f),this.holdUntilBandsLand(f)}_placeLabel(t,{fontSize:e,fontFamily:r,fontWeight:n,minWidth:o,graphics:s}){const i=this.w,l=i.streamgraphData,a=l.lows[t],h=l.highs[t];if(!a||!h)return null;const c=i.globals.seriesXvalues[t],u=a.length;if(!Array.isArray(c)||c.length<u||0===u)return null;const d=new Array(u);let f=0;for(let t=0;t<u;t++){const e=Math.abs(this._yPx(h[t])-this._yPx(a[t]));d[t]=e,e>f&&(f=e)}if(f<=0)return null;const g=this._resolveFontSize(e,f),m=String(l.names[t]);let p=g,b=s.getTextRects(m,`${p}px`,r,"",!0,n);if(f<b.height+6)return null;const y=this._widestRun(d,c,b.height+6,u);if(!y)return null;if(b.width>y.width&&"auto"===e){const t=Math.floor(p*(y.width/b.width));if(t<this._autoBounds().min)return null;if(p=t,b=s.getTextRects(m,`${p}px`,r,"",!0,n),f<b.height+6)return null}const x=b.height+6,v=[];for(const e of this._runs(d,x,u)){const n=Number(c[e.l]),i=Number(c[e.r]);if(!isFinite(n)||!isFinite(i))continue;let l=i-n;if(l<=0&&u>1){const t=Math.abs(Number(c[Math.min(e.r+1,u-1)])-Number(c[Math.max(e.l-1,0)]));l=isFinite(t)?t:0}if(l<o||l<.35*b.width)continue;const d=b.width<=l?m:s.getTextBasedOnMaxWidth({text:m,maxWidth:l,fontSize:`${p}px`,fontFamily:r});if(!d||"..."===d)continue;const f=d===m?b.width:b.width*(d.length/m.length),g=[n+l/2];l>2.2*f&&g.push(n+f/2+2,i-f/2-2);for(const r of g){let n=e.l,o=1/0;for(let t=e.l;t<=e.r;t++){const e=Math.abs(Number(c[t])-r);e<o&&(o=e,n=t)}v.push({x:r,y:(this._yPx(a[n])+this._yPx(h[n]))/2,text:d,color:this._contrastOn(t),fontSize:`${p}px`,width:f,height:b.height})}if(v.length>=6)break}return v.length?{k:t,weight:f,candidates:v}:null}_runs(t,e,r){const n=[];let o=0;for(;o<r;){if(t[o]<e){o++;continue}let s=o,i=t[o];for(;s+1<r&&t[s+1]>=e;)s++,t[s]>i&&(i=t[s]);n.push({l:o,r:s,maxT:i}),o=s+1}return n.sort((t,e)=>e.maxT-t.maxT)}_widestRun(t,e,r,n){let o=-1;for(const s of this._runs(t,r,n)){const t=Number(e[s.r])-Number(e[s.l]);isFinite(t)&&t>o&&(o=t)}return o>=0?{width:o}:null}_deconflict(t){const e=t.slice().sort((t,e)=>e.weight-t.weight),r=[],n=t=>!r.some(e=>t.left<e.box.right&&t.right>e.box.left&&t.top<e.box.bottom&&t.bottom>e.box.top);for(const t of e)for(const e of t.candidates){const o={left:e.x-e.width/2,right:e.x+e.width/2,top:e.y-e.height/2,bottom:e.y+e.height/2};if(n(o)){r.push(a(l({k:t.k},e),{box:o}));break}}return r}_autoBounds(){var t,e;const r=(null==(e=null==(t=this.w.config.plotOptions)?void 0:t.streamgraph)?void 0:e.labels)||{};return{min:null==r.minFontSize?9:r.minFontSize,max:null==r.maxFontSize?30:r.maxFontSize}}_resolveFontSize(t,e){if("auto"!==t){const e=parseFloat(t);return isFinite(e)&&e>0?e:12}const{min:r,max:n}=this._autoBounds();return Math.max(r,Math.min(n,Math.round(.36*e)))}_contrastOn(t){var e;const r=this.w,n=null==(e=r.globals.colors)?void 0:e[t],o="string"==typeof n?d.parseHex(n):null;return o?d.relativeLuminance(o)>.45?"#000000":"#ffffff":r.config.chart.foreColor}removeLabels(){const t=this.w.dom.elGraphical,e=t&&t.node.querySelector(".apexcharts-streamgraph-labels");e&&e.parentNode&&e.parentNode.removeChild(e)}bindHover(){const t=this.w;if(!g.isBrowser())return;if(!1===this._hoverCfg().show)return;const e=t.dom.baseEl&&t.dom.baseEl.querySelector(".apexcharts-svg");e&&!e.__apexStreamHover&&(e.__apexStreamHover=!0,e.addEventListener("mousemove",t=>{this.isActive()&&this.w.streamgraphData&&this._dim(this._bandAt(t))}),e.addEventListener("mouseleave",()=>{this._dim(-1)}))}_hoverCfg(){var t,e;return(null==(e=null==(t=this.w.config.plotOptions)?void 0:t.streamgraph)?void 0:e.hover)||{}}_bandAt(t){const e=this.w,r=e.streamgraphData;if(!r||!r.order.length)return-1;const n=e.dom.baseEl&&e.dom.baseEl.querySelector(".apexcharts-svg");if(!n)return-1;const o=n.getBoundingClientRect(),s=e.globals.svgWidth?o.width/e.globals.svgWidth:1,i=f.screenXToPlotPx(e,t.clientX),l=(t.clientY-o.top)/(s||1)-e.layout.translateY;if(i<0||i>e.layout.gridWidth)return-1;if(l<0||l>e.layout.gridHeight)return-1;const a=e.globals.seriesXvalues[r.order[0]];if(!Array.isArray(a)||!a.length)return-1;const h=e.interact?e.interact.capturedDataPointIndex:-1;let c=-1;if(h>=0&&h<a.length)c=h;else{let t=1/0;for(let e=0;e<a.length;e++){const r=Math.abs(Number(a[e])-i);r<t&&(t=r,c=e)}}if(c<0)return-1;let u=-1,d=1/0;for(let t=0;t<r.order.length;t++){const e=r.order[t],n=this._yPx(r.highs[e][c]),o=this._yPx(r.lows[e][c]),s=Math.min(n,o),i=Math.max(n,o);if(l>=s&&l<=i)return e;const a=l<s?s-l:l-i;a<d&&(d=a,u=e)}return u}_dim(t){const e=this.w;if(t===this._hovered)return;this._hovered=t;const r=this._hoverCfg(),n=null==r.opacity?.35:r.opacity,o=e.dom.baseEl.querySelectorAll(".apexcharts-series"),s=e.dom.baseEl.querySelectorAll(".apexcharts-streamgraph-label"),i=(e,r)=>t<0||r===t;for(let t=0;t<o.length;t++){const e=o[t];e.style.transition="opacity .15s ease",e.style.opacity=i(0,Number(e.getAttribute("data:realIndex")))?"":String(n)}for(let t=0;t<s.length;t++){const r=s[t];r.style.transition="opacity .15s ease, fill .15s ease",i(0,Number(r.getAttribute("data:realIndex")))?this._restoreLabel(r):(r.getAttribute("data:fill")||r.setAttribute("data:fill",r.getAttribute("fill")||""),r.setAttribute("fill",e.config.chart.foreColor),r.style.opacity="0.65")}}_restoreLabel(t){const e=t.getAttribute("data:fill");e&&t.setAttribute("fill",e),t.style.opacity=""}clearDim(){this._hovered=-1;const t=this.w;if(!t.dom.baseEl)return;const e=t.dom.baseEl.querySelectorAll(".apexcharts-series");for(let t=0;t<e.length;t++){e[t].style.opacity=""}const r=t.dom.baseEl.querySelectorAll(".apexcharts-streamgraph-label");for(let t=0;t<r.length;t++)this._restoreLabel(r[t])}holdUntilBandsLand(t){const e=this.w;g.isBrowser()&&e.globals.shouldAnimate&&!e.globals.animationEnded&&(t.node.classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:t.node,holdUntilComplete:!0}))}}}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>c.default}),exports.streamgraphTransform=y;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
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).ApexStreamgraph={})}(this,function(t){"use strict";var e=Object.defineProperty,r=Object.defineProperties,n=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,i=(t,r,n)=>r in t?e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[r]=n,l=(t,e)=>{for(var r in e||(e={}))o.call(e,r)&&i(t,r,e[r]);if(s)for(var r of s(e))a.call(e,r)&&i(t,r,e[r]);return t},h=(t,e)=>r(t,n(e));const c=globalThis.ApexCharts,u=globalThis.ApexCharts.__internals.__apex_Graphics,d=globalThis.ApexCharts.__internals.__apex_Utils;class f{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)/f.xRatio(t)}static pxToDataX(t,e){return t.globals.minX+e*f.xRatio(t)}static screenXToPlotPx(t,e){const r=t.dom.baseEl,n=r&&r.querySelector(".apexcharts-svg");if(!n)return e-t.layout.translateX;const s=n.getBoundingClientRect(),o=t.globals.svgWidth?s.width/t.globals.svgWidth:1;return(e-s.left)/(o||1)-t.layout.translateX}}const g=globalThis.ApexCharts.__internals.__apex_Environment_Environment;const p=["wiggle","silhouette","zero","expand"],m=["inside-out","inverse","none"];function x(t,e,r){const n=r&&void 0!==r[e]?r[e]:e+1;return null==t?{x:n,y:null,rest:{}}:Array.isArray(t)?{x:void 0!==t[0]?t[0]:n,y:t[1],rest:{}}:"object"==typeof t?{x:void 0!==t.x?t.x:n,y:t.y,rest:t}:{x:n,y:t,rest:{}}}function b(t,e){var r,n;const s=e.config,o=e.globals;if(!Array.isArray(t))return t;o.streamgraphRawSeries||(o.streamgraphRawSeries=t.map(t=>h(l({},t),{data:Array.isArray(null==t?void 0:t.data)?t.data.slice():null==t?void 0:t.data})));const a=o.streamgraphRawSeries;if(a.some(t=>function(t){for(let e=0;e<t.length;e++){const r=t[e],n=Array.isArray(r)?r[1]:r&&"object"==typeof r?r.y:r;if(Array.isArray(n)&&2===n.length)return!0}return!1}(Array.isArray(null==t?void 0:t.data)?t.data:[])))return e.streamgraphData=null,t;const i=(null==(r=s.plotOptions)?void 0:r.streamgraph)||{},c=-1!==p.indexOf(i.offset)?i.offset:"wiggle",u=-1!==m.indexOf(i.order)?i.order:"inside-out",f=null==(n=s.xaxis)?void 0:n.categories,g=o.collapsedSeriesIndices||[],{xs:b,rows:y,grids:v}=function(t,e){var r;const n=[],s=[],o=new Map,a=[];for(let i=0;i<t.length;i++){const h=Array.isArray(null==(r=t[i])?void 0:r.data)?t[i].data:[],c=new Map;for(let t=0;t<h.length;t++){const{x:r,y:a,rest:i}=x(h[t],t,e),u=r instanceof Date?r.getTime():r;o.has(u)||(o.set(u,n.length),n.push(r),s.push(l({},i))),c.set(o.get(u),d.parseNumber(a))}a.push(c)}return{xs:n,rows:s,grids:a}}(a,f),w=function(t){const e=[];for(let r=0;r<t.length;r++){const n=t[r]instanceof Date?t[r].getTime():t[r];if("number"!=typeof n||!isFinite(n))return null;e.push(r)}const r=e.map(e=>({j:e,v:t[e]instanceof Date?t[e].getTime():t[e]}));r.sort((t,e)=>t.v-e.v);const n=r.map(t=>t.j);for(let t=0;t<n.length;t++)if(n[t]!==t)return n;return null}(b),_=w?w.map(t=>b[t]):b,A=w?w.map(t=>y[t]):y,S=_.length;let T=!1;const F=[];for(let t=0;t<a.length;t++){const e=new Array(S);for(let r=0;r<S;r++){const n=v[t].get(w?w[r]:r);let s=null==n?0:Number(n);isFinite(s)||(s=0),s<0&&(T=!0,s=0),e[r]=s}F.push(e)}T&&!o.streamgraphWarnedNegative&&(o.streamgraphWarnedNegative=!0,console.warn('ApexCharts: a streamgraph stacks parts of a whole, so negative values have no band to draw and were treated as 0. Use a stacked area (chart.type: "area", chart.stacked: true) for data that goes below zero.'));const O=[];for(let t=0;t<a.length;t++)-1===g.indexOf(t)&&O.push(t);let P=F;if("expand"===c){P=F.map(t=>t.slice());for(let t=0;t<S;t++){let e=0;for(let r=0;r<O.length;r++)e+=P[O[r]][t];if(e)for(let r=0;r<O.length;r++)P[O[r]][t]/=e}}const W=function(t,e,r){if("none"===t)return e.slice();if("inverse"===t)return e.slice().reverse();const n={},s={};for(let t=0;t<e.length;t++){const o=e[t],a=r[o];let i=0,l=-1/0,h=0;for(let t=0;t<a.length;t++)i+=a[t],a[t]>l&&(l=a[t],h=t);n[o]=i,s[o]=h}const o=e.slice().sort((t,e)=>s[t]-s[e]||t-e);let a=0,i=0;const l=[],h=[];for(let t=0;t<o.length;t++){const e=o[t];a<i?(a+=n[e],l.push(e)):(i+=n[e],h.push(e))}return h.reverse().concat(l)}(u,O,P),C=function(t,e,r,n){const s=new Array(n).fill(0);if(0===n||0===e.length)return s;if("zero"===t||"expand"===t)return s;if("silhouette"===t){for(let t=0;t<n;t++){let n=0;for(let s=0;s<e.length;s++)n+=r[e[s]][t];s[t]=-n/2}return s}let o=0;for(let t=1;t<n;t++){let n=0,a=0;for(let s=0;s<e.length;s++){const o=r[e[s]],i=o[t];let l=(i-o[t-1])/2;for(let n=0;n<s;n++){const s=r[e[n]];l+=s[t]-s[t-1]}n+=i,a+=l*i}n&&(o-=a/n),s[t]=o}return s}(c,W,P,S),E=a.map(()=>null),M=a.map(()=>null);for(let t=0;t<W.length;t++)E[W[t]]=new Array(S),M[W[t]]=new Array(S);for(let t=0;t<S;t++){let e=C[t];for(let r=0;r<W.length;r++){const n=W[r],s=E[n],o=M[n];s[t]=e,e+=P[n][t],o[t]=e}}return e.streamgraphData={names:a.map((t,e)=>{var r;return null!=(r=null==t?void 0:t.name)?r:`Series ${e+1}`}),xs:_,values:F,lows:E,highs:M,order:W,offset:c,hidden:a.map((t,e)=>e).filter(t=>-1!==g.indexOf(t))},a.map((t,e)=>{const r=E[e],n=M[e];if(!r||!n)return h(l({},t),{data:[]});const s=new Array(S);for(let t=0;t<S;t++)s[t]=h(l({},A[t]),{x:_[t],y:[r[t],n[t]]});return h(l({},t),{data:s})})}const y="__apexcharts_series_transforms__";var v,w;globalThis[y]||(globalThis[y]={}),v="streamgraph","function"==typeof(w=b)?globalThis[y][v]=w:console.warn(`ApexCharts: registerSeriesTransform("${v}") expects a function (series, w) => series.`),c.registerFeatures({streamgraph:class{constructor(t,e){this.w=t,this.ctx=e,this._hovered=-1}isActive(){return"streamgraph"===this.w.config.chart.requestedType}_yPx(t){var e;const r=this.w,n=r.globals,s=r.layout.gridHeight,o=n.maxY-n.minY;if(!o||!isFinite(o))return s/2;const a=(t-n.minY)/o;return(null==(e=r.config.yaxis[0])?void 0:e.reversed)?a*s:s-a*s}draw(){this.isActive()&&(this.clearDim(),this.bindHover(),this.drawLabels())}drawLabels(){var t,e,r,n,s,o,a;const i=this.w;if(!this.isActive())return;const l=null==(e=null==(t=i.config.plotOptions)?void 0:t.streamgraph)?void 0:e.labels;if(!l||!1===l.show)return;const h=i.dom.elGraphical,c=i.streamgraphData;if(!h||!c)return;this.removeLabels();const d=new u(i,this.ctx),f=d.group({class:"apexcharts-streamgraph-labels"}),g=(null==(r=l.style)?void 0:r.fontSize)||"auto",p=(null==(n=l.style)?void 0:n.fontFamily)||i.config.chart.fontFamily,m=(null==(s=l.style)?void 0:s.fontWeight)||600,x=null==l.minWidth?24:l.minWidth,b=[];for(let t=0;t<c.order.length;t++){const e=c.order[t],r=this._placeLabel(e,{fontSize:g,fontFamily:p,fontWeight:m,minWidth:x,graphics:d});r&&b.push(r)}let y=0;for(const t of this._deconflict(b)){const e=t.k,r=d.drawText({x:t.x,y:t.y,text:t.text,textAnchor:"middle",dominantBaseline:"middle",fontSize:t.fontSize,fontFamily:p,fontWeight:m,foreColor:(null==(a=null==(o=l.style)?void 0:o.colors)?void 0:a[e])||t.color,cssClass:"apexcharts-streamgraph-label"});r.node.setAttribute("data:realIndex",String(e)),f.add(r),y++}if(!y)return;const v=h.node.querySelector(".apexcharts-xaxis");v?h.node.insertBefore(f.node,v):h.add(f),this.holdUntilBandsLand(f)}_placeLabel(t,{fontSize:e,fontFamily:r,fontWeight:n,minWidth:s,graphics:o}){const a=this.w,i=a.streamgraphData,l=i.lows[t],h=i.highs[t];if(!l||!h)return null;const c=a.globals.seriesXvalues[t],u=l.length;if(!Array.isArray(c)||c.length<u||0===u)return null;const d=new Array(u);let f=0;for(let t=0;t<u;t++){const e=Math.abs(this._yPx(h[t])-this._yPx(l[t]));d[t]=e,e>f&&(f=e)}if(f<=0)return null;const g=this._resolveFontSize(e,f),p=String(i.names[t]);let m=g,x=o.getTextRects(p,`${m}px`,r,"",!0,n);if(f<x.height+6)return null;const b=this._widestRun(d,c,x.height+6,u);if(!b)return null;if(x.width>b.width&&"auto"===e){const t=Math.floor(m*(b.width/x.width));if(t<this._autoBounds().min)return null;if(m=t,x=o.getTextRects(p,`${m}px`,r,"",!0,n),f<x.height+6)return null}const y=x.height+6,v=[];for(const e of this._runs(d,y,u)){const n=Number(c[e.l]),a=Number(c[e.r]);if(!isFinite(n)||!isFinite(a))continue;let i=a-n;if(i<=0&&u>1){const t=Math.abs(Number(c[Math.min(e.r+1,u-1)])-Number(c[Math.max(e.l-1,0)]));i=isFinite(t)?t:0}if(i<s||i<.35*x.width)continue;const d=x.width<=i?p:o.getTextBasedOnMaxWidth({text:p,maxWidth:i,fontSize:`${m}px`,fontFamily:r});if(!d||"..."===d)continue;const f=d===p?x.width:x.width*(d.length/p.length),g=[n+i/2];i>2.2*f&&g.push(n+f/2+2,a-f/2-2);for(const r of g){let n=e.l,s=1/0;for(let t=e.l;t<=e.r;t++){const e=Math.abs(Number(c[t])-r);e<s&&(s=e,n=t)}v.push({x:r,y:(this._yPx(l[n])+this._yPx(h[n]))/2,text:d,color:this._contrastOn(t),fontSize:`${m}px`,width:f,height:x.height})}if(v.length>=6)break}return v.length?{k:t,weight:f,candidates:v}:null}_runs(t,e,r){const n=[];let s=0;for(;s<r;){if(t[s]<e){s++;continue}let o=s,a=t[s];for(;o+1<r&&t[o+1]>=e;)o++,t[o]>a&&(a=t[o]);n.push({l:s,r:o,maxT:a}),s=o+1}return n.sort((t,e)=>e.maxT-t.maxT)}_widestRun(t,e,r,n){let s=-1;for(const o of this._runs(t,r,n)){const t=Number(e[o.r])-Number(e[o.l]);isFinite(t)&&t>s&&(s=t)}return s>=0?{width:s}:null}_deconflict(t){const e=t.slice().sort((t,e)=>e.weight-t.weight),r=[],n=t=>!r.some(e=>t.left<e.box.right&&t.right>e.box.left&&t.top<e.box.bottom&&t.bottom>e.box.top);for(const t of e)for(const e of t.candidates){const s={left:e.x-e.width/2,right:e.x+e.width/2,top:e.y-e.height/2,bottom:e.y+e.height/2};if(n(s)){r.push(h(l({k:t.k},e),{box:s}));break}}return r}_autoBounds(){var t,e;const r=(null==(e=null==(t=this.w.config.plotOptions)?void 0:t.streamgraph)?void 0:e.labels)||{};return{min:null==r.minFontSize?9:r.minFontSize,max:null==r.maxFontSize?30:r.maxFontSize}}_resolveFontSize(t,e){if("auto"!==t){const e=parseFloat(t);return isFinite(e)&&e>0?e:12}const{min:r,max:n}=this._autoBounds();return Math.max(r,Math.min(n,Math.round(.36*e)))}_contrastOn(t){var e;const r=this.w,n=null==(e=r.globals.colors)?void 0:e[t],s="string"==typeof n?d.parseHex(n):null;return s?d.relativeLuminance(s)>.45?"#000000":"#ffffff":r.config.chart.foreColor}removeLabels(){const t=this.w.dom.elGraphical,e=t&&t.node.querySelector(".apexcharts-streamgraph-labels");e&&e.parentNode&&e.parentNode.removeChild(e)}bindHover(){const t=this.w;if(!g.isBrowser())return;if(!1===this._hoverCfg().show)return;const e=t.dom.baseEl&&t.dom.baseEl.querySelector(".apexcharts-svg");e&&!e.__apexStreamHover&&(e.__apexStreamHover=!0,e.addEventListener("mousemove",t=>{this.isActive()&&this.w.streamgraphData&&this._dim(this._bandAt(t))}),e.addEventListener("mouseleave",()=>{this._dim(-1)}))}_hoverCfg(){var t,e;return(null==(e=null==(t=this.w.config.plotOptions)?void 0:t.streamgraph)?void 0:e.hover)||{}}_bandAt(t){const e=this.w,r=e.streamgraphData;if(!r||!r.order.length)return-1;const n=e.dom.baseEl&&e.dom.baseEl.querySelector(".apexcharts-svg");if(!n)return-1;const s=n.getBoundingClientRect(),o=e.globals.svgWidth?s.width/e.globals.svgWidth:1,a=f.screenXToPlotPx(e,t.clientX),i=(t.clientY-s.top)/(o||1)-e.layout.translateY;if(a<0||a>e.layout.gridWidth)return-1;if(i<0||i>e.layout.gridHeight)return-1;const l=e.globals.seriesXvalues[r.order[0]];if(!Array.isArray(l)||!l.length)return-1;const h=e.interact?e.interact.capturedDataPointIndex:-1;let c=-1;if(h>=0&&h<l.length)c=h;else{let t=1/0;for(let e=0;e<l.length;e++){const r=Math.abs(Number(l[e])-a);r<t&&(t=r,c=e)}}if(c<0)return-1;let u=-1,d=1/0;for(let t=0;t<r.order.length;t++){const e=r.order[t],n=this._yPx(r.highs[e][c]),s=this._yPx(r.lows[e][c]),o=Math.min(n,s),a=Math.max(n,s);if(i>=o&&i<=a)return e;const l=i<o?o-i:i-a;l<d&&(d=l,u=e)}return u}_dim(t){const e=this.w;if(t===this._hovered)return;this._hovered=t;const r=this._hoverCfg(),n=null==r.opacity?.35:r.opacity,s=e.dom.baseEl.querySelectorAll(".apexcharts-series"),o=e.dom.baseEl.querySelectorAll(".apexcharts-streamgraph-label"),a=(e,r)=>t<0||r===t;for(let t=0;t<s.length;t++){const e=s[t];e.style.transition="opacity .15s ease",e.style.opacity=a(0,Number(e.getAttribute("data:realIndex")))?"":String(n)}for(let t=0;t<o.length;t++){const r=o[t];r.style.transition="opacity .15s ease, fill .15s ease",a(0,Number(r.getAttribute("data:realIndex")))?this._restoreLabel(r):(r.getAttribute("data:fill")||r.setAttribute("data:fill",r.getAttribute("fill")||""),r.setAttribute("fill",e.config.chart.foreColor),r.style.opacity="0.65")}}_restoreLabel(t){const e=t.getAttribute("data:fill");e&&t.setAttribute("fill",e),t.style.opacity=""}clearDim(){this._hovered=-1;const t=this.w;if(!t.dom.baseEl)return;const e=t.dom.baseEl.querySelectorAll(".apexcharts-series");for(let t=0;t<e.length;t++){e[t].style.opacity=""}const r=t.dom.baseEl.querySelectorAll(".apexcharts-streamgraph-label");for(let t=0;t<r.length;t++)this._restoreLabel(r[t])}holdUntilBandsLand(t){const e=this.w;g.isBrowser()&&e.globals.shouldAnimate&&!e.globals.animationEnded&&(t.node.classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:t.node,holdUntilComplete:!0}))}}}),t.default=c,t.streamgraphTransform=b,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|