@omnitron-dev/omnitron 0.3.0 → 0.3.1
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/README.md +4 -0
- package/dist/BUILD.json +2 -2
- package/dist/cli/omnitron.js +26 -2
- package/dist/cli/omnitron.js.map +1 -1
- package/dist/cluster/mesh-link.js +1 -1
- package/dist/cluster/slave-connector.d.ts +2 -2
- package/dist/cluster/slave-connector.js +1 -1
- package/dist/commands/deploy.d.ts +4 -4
- package/dist/commands/deploy.js +4 -4
- package/dist/commands/discover.d.ts +2 -2
- package/dist/commands/discover.js +2 -2
- package/dist/commands/fleet-asking.d.ts +2 -2
- package/dist/commands/fleet-asking.js +2 -2
- package/dist/commands/fleet-recover.d.ts +2 -0
- package/dist/commands/fleet-recover.d.ts.map +1 -0
- package/dist/commands/fleet-recover.js +30 -0
- package/dist/commands/fleet-recover.js.map +1 -0
- package/dist/commands/host-ingress.d.ts +3 -0
- package/dist/commands/host-ingress.d.ts.map +1 -0
- package/dist/commands/host-ingress.js +31 -0
- package/dist/commands/host-ingress.js.map +1 -0
- package/dist/commands/infra.d.ts +2 -2
- package/dist/commands/infra.js +7 -7
- package/dist/commands/infra.js.map +1 -1
- package/dist/commands/logs.d.ts +1 -1
- package/dist/commands/logs.js +3 -3
- package/dist/commands/logs.js.map +1 -1
- package/dist/commands/node.d.ts +2 -14
- package/dist/commands/node.d.ts.map +1 -1
- package/dist/commands/node.js +33 -22
- package/dist/commands/node.js.map +1 -1
- package/dist/commands/pipeline.d.ts.map +1 -1
- package/dist/commands/pipeline.js +8 -1
- package/dist/commands/pipeline.js.map +1 -1
- package/dist/commands/project.d.ts +2 -2
- package/dist/commands/project.js +2 -2
- package/dist/commands/release.d.ts +1 -1
- package/dist/commands/release.js +4 -4
- package/dist/commands/release.js.map +1 -1
- package/dist/commands/remote.d.ts +3 -3
- package/dist/commands/remote.js +3 -3
- package/dist/commands/tor.d.ts +1 -1
- package/dist/commands/tor.js +2 -2
- package/dist/config/types.d.ts +9 -6
- package/dist/config/types.d.ts.map +1 -1
- package/dist/daemon/daemon-entry.js +1 -1
- package/dist/daemon/daemon-entry.js.map +1 -1
- package/dist/daemon/daemon.d.ts +5 -19
- package/dist/daemon/daemon.d.ts.map +1 -1
- package/dist/daemon/daemon.js +54 -51
- package/dist/daemon/daemon.js.map +1 -1
- package/dist/daemon/daemon.module.d.ts.map +1 -1
- package/dist/daemon/daemon.module.js +3 -5
- package/dist/daemon/daemon.module.js.map +1 -1
- package/dist/daemon/daemon.rpc-service.d.ts +2 -2
- package/dist/daemon/daemon.rpc-service.js +6 -6
- package/dist/daemon/daemon.rpc-service.js.map +1 -1
- package/dist/execution/data-channel.d.ts +1 -1
- package/dist/execution/data-channel.js +1 -1
- package/dist/execution/execution.service.d.ts +10 -3
- package/dist/execution/execution.service.d.ts.map +1 -1
- package/dist/execution/execution.service.js +101 -44
- package/dist/execution/execution.service.js.map +1 -1
- package/dist/infrastructure/bare-metal-plan.js +1 -1
- package/dist/infrastructure/bare-metal-plan.js.map +1 -1
- package/dist/infrastructure/config-payload.d.ts +4 -4
- package/dist/infrastructure/config-payload.js +4 -4
- package/dist/infrastructure/container-runtime.d.ts +2 -10
- package/dist/infrastructure/container-runtime.d.ts.map +1 -1
- package/dist/infrastructure/container-runtime.js +41 -20
- package/dist/infrastructure/container-runtime.js.map +1 -1
- package/dist/infrastructure/gateway-redis-db.d.ts +2 -2
- package/dist/infrastructure/gateway-redis-db.js +2 -2
- package/dist/infrastructure/host-ingress-config.d.ts +12 -0
- package/dist/infrastructure/host-ingress-config.d.ts.map +1 -0
- package/dist/infrastructure/host-ingress-config.js +197 -0
- package/dist/infrastructure/host-ingress-config.js.map +1 -0
- package/dist/infrastructure/host-ingress-lock.d.ts +4 -0
- package/dist/infrastructure/host-ingress-lock.d.ts.map +1 -0
- package/dist/infrastructure/host-ingress-lock.js +36 -0
- package/dist/infrastructure/host-ingress-lock.js.map +1 -0
- package/dist/infrastructure/host-ingress-runtime.d.ts +25 -0
- package/dist/infrastructure/host-ingress-runtime.d.ts.map +1 -0
- package/dist/infrastructure/host-ingress-runtime.js +114 -0
- package/dist/infrastructure/host-ingress-runtime.js.map +1 -0
- package/dist/infrastructure/host-ingress-takeover.d.ts +18 -0
- package/dist/infrastructure/host-ingress-takeover.d.ts.map +1 -0
- package/dist/infrastructure/host-ingress-takeover.js +142 -0
- package/dist/infrastructure/host-ingress-takeover.js.map +1 -0
- package/dist/infrastructure/host-ingress-types.d.ts +173 -0
- package/dist/infrastructure/host-ingress-types.d.ts.map +1 -0
- package/dist/infrastructure/host-ingress-types.js +2 -0
- package/dist/infrastructure/host-ingress-types.js.map +1 -0
- package/dist/infrastructure/host-ingress.service.d.ts +47 -0
- package/dist/infrastructure/host-ingress.service.d.ts.map +1 -0
- package/dist/infrastructure/host-ingress.service.js +514 -0
- package/dist/infrastructure/host-ingress.service.js.map +1 -0
- package/dist/infrastructure/infrastructure.service.d.ts +21 -5
- package/dist/infrastructure/infrastructure.service.d.ts.map +1 -1
- package/dist/infrastructure/infrastructure.service.js +91 -10
- package/dist/infrastructure/infrastructure.service.js.map +1 -1
- package/dist/infrastructure/orphan-containers.d.ts +7 -7
- package/dist/infrastructure/orphan-containers.js +6 -6
- package/dist/infrastructure/presets/minio.js +1 -1
- package/dist/infrastructure/presets/minio.js.map +1 -1
- package/dist/infrastructure/provisioning-outcome.d.ts +1 -1
- package/dist/infrastructure/provisioning-outcome.js +1 -1
- package/dist/infrastructure/service-binding.js +1 -1
- package/dist/infrastructure/service-resolver.d.ts +10 -4
- package/dist/infrastructure/service-resolver.d.ts.map +1 -1
- package/dist/infrastructure/service-resolver.js +88 -45
- package/dist/infrastructure/service-resolver.js.map +1 -1
- package/dist/infrastructure/shipped-config.js +4 -4
- package/dist/infrastructure/stack-infra-manager.d.ts +10 -1
- package/dist/infrastructure/stack-infra-manager.d.ts.map +1 -1
- package/dist/infrastructure/stack-infra-manager.js +53 -43
- package/dist/infrastructure/stack-infra-manager.js.map +1 -1
- package/dist/infrastructure/types.d.ts +8 -6
- package/dist/infrastructure/types.d.ts.map +1 -1
- package/dist/monitoring/log-line.d.ts +3 -3
- package/dist/monitoring/log-line.js +3 -3
- package/dist/monitoring/log-manager.d.ts +3 -3
- package/dist/monitoring/log-manager.js +3 -3
- package/dist/operations.d.ts +16 -0
- package/dist/operations.d.ts.map +1 -0
- package/dist/operations.js +13 -0
- package/dist/operations.js.map +1 -0
- package/dist/orchestrator/app-handle.d.ts +3 -3
- package/dist/orchestrator/app-handle.js +3 -3
- package/dist/orchestrator/bootstrap-loader.d.ts +2 -2
- package/dist/orchestrator/bootstrap-loader.js +3 -3
- package/dist/orchestrator/bootstrap-loader.js.map +1 -1
- package/dist/orchestrator/bootstrap-process.d.ts +1 -1
- package/dist/orchestrator/bootstrap-process.d.ts.map +1 -1
- package/dist/orchestrator/bootstrap-process.js +3 -2
- package/dist/orchestrator/bootstrap-process.js.map +1 -1
- package/dist/orchestrator/build-service.d.ts +6 -12
- package/dist/orchestrator/build-service.d.ts.map +1 -1
- package/dist/orchestrator/build-service.js +120 -83
- package/dist/orchestrator/build-service.js.map +1 -1
- package/dist/orchestrator/call-exposed-service.js +1 -1
- package/dist/orchestrator/classic-launcher.d.ts.map +1 -1
- package/dist/orchestrator/classic-launcher.js +6 -1
- package/dist/orchestrator/classic-launcher.js.map +1 -1
- package/dist/orchestrator/file-watcher.d.ts +1 -0
- package/dist/orchestrator/file-watcher.d.ts.map +1 -1
- package/dist/orchestrator/file-watcher.js +14 -3
- package/dist/orchestrator/file-watcher.js.map +1 -1
- package/dist/orchestrator/http-routes.d.ts +4 -0
- package/dist/orchestrator/http-routes.d.ts.map +1 -0
- package/dist/orchestrator/http-routes.js +19 -0
- package/dist/orchestrator/http-routes.js.map +1 -0
- package/dist/orchestrator/orchestrator.service.d.ts +18 -4
- package/dist/orchestrator/orchestrator.service.d.ts.map +1 -1
- package/dist/orchestrator/orchestrator.service.js +151 -110
- package/dist/orchestrator/orchestrator.service.js.map +1 -1
- package/dist/orchestrator/service-router.d.ts +1 -1
- package/dist/orchestrator/service-router.js +1 -1
- package/dist/orchestrator/topology-query.d.ts +1 -1
- package/dist/orchestrator/topology-query.js +1 -1
- package/dist/project/artifact-builder.js +2 -2
- package/dist/project/artifact-builder.js.map +1 -1
- package/dist/project/build-decision.d.ts +1 -1
- package/dist/project/build-decision.js +1 -1
- package/dist/project/config-resolver.js +1 -1
- package/dist/project/config-resolver.js.map +1 -1
- package/dist/project/declared-config.d.ts +2 -2
- package/dist/project/declared-config.js +2 -2
- package/dist/project/deploy-phases.d.ts +1 -1
- package/dist/project/deploy-phases.js +1 -1
- package/dist/project/exec-in-group.d.ts +1 -1
- package/dist/project/exec-in-group.js +1 -1
- package/dist/project/node-app-config.d.ts +2 -2
- package/dist/project/node-app-config.js +2 -2
- package/dist/project/node-app-config.js.map +1 -1
- package/dist/project/node-app-health.d.ts +1 -1
- package/dist/project/node-app-health.js +1 -1
- package/dist/project/operator-account.d.ts +9 -3
- package/dist/project/operator-account.d.ts.map +1 -1
- package/dist/project/operator-account.js +9 -9
- package/dist/project/operator-account.js.map +1 -1
- package/dist/project/registry.d.ts.map +1 -1
- package/dist/project/registry.js +4 -22
- package/dist/project/registry.js.map +1 -1
- package/dist/project/stack-env.d.ts +1 -1
- package/dist/project/stack-env.js +1 -1
- package/dist/project/stand-containers.d.ts +9 -2
- package/dist/project/stand-containers.d.ts.map +1 -1
- package/dist/project/stand-containers.js +17 -17
- package/dist/project/stand-containers.js.map +1 -1
- package/dist/release/artifact-store.d.ts +1 -1
- package/dist/release/artifact-store.d.ts.map +1 -1
- package/dist/release/artifact-store.js +1 -1
- package/dist/release/artifact-store.js.map +1 -1
- package/dist/release/attest-on-node.d.ts +3 -2
- package/dist/release/attest-on-node.d.ts.map +1 -1
- package/dist/release/attest-on-node.js +6 -6
- package/dist/release/attest-on-node.js.map +1 -1
- package/dist/release/attest.d.ts +3 -3
- package/dist/release/attest.js +1 -1
- package/dist/release/build-run.d.ts +2 -2
- package/dist/release/build-run.js +4 -4
- package/dist/release/build-run.js.map +1 -1
- package/dist/release/builder.d.ts +1 -1
- package/dist/release/builder.d.ts.map +1 -1
- package/dist/release/builder.js +1 -1
- package/dist/release/builder.js.map +1 -1
- package/dist/release/daemon-omni.d.ts +1 -1
- package/dist/release/daemon-omni.js +1 -1
- package/dist/release/definition-inputs.d.ts +1 -1
- package/dist/release/definition-inputs.js +1 -1
- package/dist/release/layout.d.ts +2 -2
- package/dist/release/layout.js +2 -2
- package/dist/release/manifest.d.ts +1 -1
- package/dist/release/manifest.js +1 -1
- package/dist/release/publish.d.ts +1 -1
- package/dist/release/publish.js +1 -1
- package/dist/release/store.d.ts +1 -1
- package/dist/release/store.d.ts.map +1 -1
- package/dist/release/store.js +3 -3
- package/dist/release/store.js.map +1 -1
- package/dist/services/alert.service.d.ts +2 -2
- package/dist/services/alert.service.js +2 -2
- package/dist/services/backup-pipeline.d.ts +1 -1
- package/dist/services/backup-pipeline.js +1 -1
- package/dist/services/backup.service.d.ts +3 -3
- package/dist/services/backup.service.js +3 -3
- package/dist/services/bundle-builder.d.ts +15 -12
- package/dist/services/bundle-builder.d.ts.map +1 -1
- package/dist/services/bundle-builder.js +124 -48
- package/dist/services/bundle-builder.js.map +1 -1
- package/dist/services/discovery.service.d.ts +1 -1
- package/dist/services/discovery.service.js +1 -1
- package/dist/services/host-operation-barrier.d.ts +8 -0
- package/dist/services/host-operation-barrier.d.ts.map +1 -0
- package/dist/services/host-operation-barrier.js +44 -0
- package/dist/services/host-operation-barrier.js.map +1 -0
- package/dist/services/host-upgrade.d.ts +129 -0
- package/dist/services/host-upgrade.d.ts.map +1 -0
- package/dist/services/host-upgrade.js +352 -0
- package/dist/services/host-upgrade.js.map +1 -0
- package/dist/services/infrastructure.rpc-service.d.ts +16 -1
- package/dist/services/infrastructure.rpc-service.d.ts.map +1 -1
- package/dist/services/infrastructure.rpc-service.js +71 -10
- package/dist/services/infrastructure.rpc-service.js.map +1 -1
- package/dist/services/local-bundle.d.ts +9 -0
- package/dist/services/local-bundle.d.ts.map +1 -1
- package/dist/services/local-bundle.js +11 -2
- package/dist/services/local-bundle.js.map +1 -1
- package/dist/services/log-collector.service.d.ts +1 -1
- package/dist/services/log-collector.service.js +1 -1
- package/dist/services/maintenance-lock.d.ts +2 -2
- package/dist/services/maintenance-lock.d.ts.map +1 -1
- package/dist/services/maintenance-lock.js +1 -1
- package/dist/services/migration-output.d.ts +2 -2
- package/dist/services/migration-output.js +2 -2
- package/dist/services/node-deploy-lease.d.ts +19 -2
- package/dist/services/node-deploy-lease.d.ts.map +1 -1
- package/dist/services/node-deploy-lease.js +84 -10
- package/dist/services/node-deploy-lease.js.map +1 -1
- package/dist/services/node-manager.rpc-service.d.ts +6 -1
- package/dist/services/node-manager.rpc-service.d.ts.map +1 -1
- package/dist/services/node-manager.rpc-service.js +25 -1
- package/dist/services/node-manager.rpc-service.js.map +1 -1
- package/dist/services/node-manager.service.d.ts +1 -1
- package/dist/services/node-manager.service.js +1 -1
- package/dist/services/node-upgrade.d.ts +1 -1
- package/dist/services/pipeline.rpc-service.d.ts +4 -0
- package/dist/services/pipeline.rpc-service.d.ts.map +1 -1
- package/dist/services/pipeline.rpc-service.js +9 -0
- package/dist/services/pipeline.rpc-service.js.map +1 -1
- package/dist/services/pipeline.service.d.ts +2 -0
- package/dist/services/pipeline.service.d.ts.map +1 -1
- package/dist/services/pipeline.service.js +12 -0
- package/dist/services/pipeline.service.js.map +1 -1
- package/dist/services/project.rpc-service.d.ts +7 -0
- package/dist/services/project.rpc-service.d.ts.map +1 -1
- package/dist/services/project.rpc-service.js +11 -0
- package/dist/services/project.rpc-service.js.map +1 -1
- package/dist/services/project.service.d.ts +21 -11
- package/dist/services/project.service.d.ts.map +1 -1
- package/dist/services/project.service.js +74 -59
- package/dist/services/project.service.js.map +1 -1
- package/dist/services/redeploy-decision.d.ts +2 -2
- package/dist/services/redeploy-decision.js +1 -1
- package/dist/services/release.rpc-service.d.ts +1 -1
- package/dist/services/release.rpc-service.js +1 -1
- package/dist/services/remote-deployer.service.d.ts +27 -16
- package/dist/services/remote-deployer.service.d.ts.map +1 -1
- package/dist/services/remote-deployer.service.js +269 -101
- package/dist/services/remote-deployer.service.js.map +1 -1
- package/dist/services/remote-provisioner.d.ts +2 -0
- package/dist/services/remote-provisioner.d.ts.map +1 -1
- package/dist/services/remote-provisioner.js +1 -1
- package/dist/services/remote-provisioner.js.map +1 -1
- package/dist/services/static-carry-forward.d.ts +26 -1
- package/dist/services/static-carry-forward.d.ts.map +1 -1
- package/dist/services/static-carry-forward.js +275 -1
- package/dist/services/static-carry-forward.js.map +1 -1
- package/dist/shared/dto/nodes.d.ts +2 -2
- package/dist/shared/dto/services.d.ts +27 -0
- package/dist/shared/dto/services.d.ts.map +1 -1
- package/dist/shared/local-infra-host.d.ts +2 -2
- package/dist/shared/local-infra-host.js +2 -2
- package/dist/shared/release-reading.d.ts +1 -1
- package/dist/shared/release-reading.js +1 -1
- package/package.json +16 -12
- package/webapp/dist/BUILD.json +2 -2
- package/webapp/dist/assets/FormControlLabel-BbSxpQwN.js +1 -0
- package/webapp/dist/assets/{Grid-BZ7xhoHQ.js → Grid-DizFZYue.js} +1 -1
- package/webapp/dist/assets/{Switch-DGSAxQPM.js → Switch-Bfiqzx8l.js} +1 -1
- package/webapp/dist/assets/alerts-DH_RVRS3.js +1 -0
- package/webapp/dist/assets/apps-B96355sz.js +1 -0
- package/webapp/dist/assets/audit-CYGtbi4k.js +1 -0
- package/webapp/dist/assets/client-BmqFExWT.js +1 -0
- package/webapp/dist/assets/containers-B_TpThln.js +2 -0
- package/webapp/dist/assets/dashboard-DHf2_65N.js +1 -0
- package/webapp/dist/assets/dashboard-builder-CWY2pjeG.js +1 -0
- package/webapp/dist/assets/{deploy-release-dialog-D6C-XcKY.js → deploy-release-dialog-Dp-zpSAd.js} +1 -1
- package/webapp/dist/assets/deployments-tJI6O3fK.js +1 -0
- package/webapp/dist/assets/detail-B2zP1Hto.js +8 -0
- package/webapp/dist/assets/detail-CoIrwmsy.js +1 -0
- package/webapp/dist/assets/detail-DWaGaOtL.js +2 -0
- package/webapp/dist/assets/index-Dvo0iprx.css +1 -0
- package/webapp/dist/assets/index-vMnY_4jR.js +412 -0
- package/webapp/dist/assets/logs-DTRjOfX8.js +12 -0
- package/webapp/dist/assets/maplibre-gl-DowHoZAx.js +814 -0
- package/webapp/dist/assets/{metrics-CQgjz2Lz.js → metrics-UCajtdox.js} +2 -2
- package/webapp/dist/assets/nodes-DuTVU0f6.js +7 -0
- package/webapp/dist/assets/pipelines-C8BeDcAl.js +4 -0
- package/webapp/dist/assets/projects-Dp_zFfLY.js +1 -0
- package/webapp/dist/assets/react-DlmbjZJV.js +1 -0
- package/webapp/dist/assets/react-apexcharts.esm-C8pn45ml.js +97 -0
- package/webapp/dist/assets/{release-bits-Dj4EOhhb.js → release-bits-BzTKz5fM.js} +1 -1
- package/webapp/dist/assets/release-build-panel-DcW9YcXQ.js +1 -0
- package/webapp/dist/assets/releases-B4hcr1bE.js +2 -0
- package/webapp/dist/assets/rolldown-runtime-XKyaHtl9.js +1 -0
- package/webapp/dist/assets/settings-DIteZTbe.js +1 -0
- package/webapp/dist/assets/sign-in-D4kMBOHp.js +1 -0
- package/webapp/dist/assets/stacks-Brnf-EB7.js +1 -0
- package/webapp/dist/assets/{system-info-BtE3dgfw.js → system-info-CFDNVKkU.js} +1 -1
- package/webapp/dist/assets/topology-7WeTUsDN.js +12 -0
- package/webapp/dist/assets/traces-9c3gwCN-.js +1 -0
- package/webapp/dist/assets/{use-stack-context-CZUgPq88.js → use-stack-context-CnA5FTHu.js} +1 -1
- package/webapp/dist/index.html +6 -6
- package/webapp/dist/assets/FormControlLabel-BrH2diyl.js +0 -1
- package/webapp/dist/assets/alerts-sXqHJbsa.js +0 -1
- package/webapp/dist/assets/apps-B_Ah8Flh.js +0 -1
- package/webapp/dist/assets/audit-YXihwyui.js +0 -1
- package/webapp/dist/assets/client-CGbBvy9k.js +0 -1
- package/webapp/dist/assets/containers-Di4NOTLf.js +0 -2
- package/webapp/dist/assets/dashboard-Cfuf95N3.js +0 -1
- package/webapp/dist/assets/dashboard-builder-CowaYb-M.js +0 -1
- package/webapp/dist/assets/deployments-ChTq5kCw.js +0 -1
- package/webapp/dist/assets/detail-BsGWv7Dj.js +0 -1
- package/webapp/dist/assets/detail-CyVf_cw5.js +0 -2
- package/webapp/dist/assets/detail-D027j6aO.js +0 -8
- package/webapp/dist/assets/index-B8AHIPc-.css +0 -1
- package/webapp/dist/assets/index-DiZbrwxT.js +0 -414
- package/webapp/dist/assets/logs-L2b8Oqmo.js +0 -12
- package/webapp/dist/assets/maplibre-gl-MlmG2kbn.js +0 -801
- package/webapp/dist/assets/nodes-Nwia2Ty6.js +0 -7
- package/webapp/dist/assets/pipelines-DCu_rXOr.js +0 -4
- package/webapp/dist/assets/projects-Bb4aV76h.js +0 -1
- package/webapp/dist/assets/react-CwJFpaho.js +0 -1
- package/webapp/dist/assets/react-apexcharts.esm-Dy0Fez42.js +0 -1956
- package/webapp/dist/assets/release-build-panel-D6OCVlhT.js +0 -1
- package/webapp/dist/assets/releases-CnAt3yO6.js +0 -2
- package/webapp/dist/assets/rolldown-runtime-hePW80VL.js +0 -1
- package/webapp/dist/assets/settings-DU-mjiwb.js +0 -1
- package/webapp/dist/assets/sign-in-Bcvjrr4C.js +0 -1
- package/webapp/dist/assets/stacks-B-e8p50I.js +0 -1
- package/webapp/dist/assets/topology-Cwch-uF1.js +0 -12
- package/webapp/dist/assets/traces-BbShR-4P.js +0 -1
|
@@ -1,1956 +0,0 @@
|
|
|
1
|
-
import{r as e,t}from"./rolldown-runtime-hePW80VL.js";import{t as n}from"./react-CwJFpaho.js";var r=t(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),i=t(((e,t)=>{var n=r();function i(){}function a(){}a.resetWarningCache=i,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return r.PropTypes=r,r}})),a=t(((e,t)=>{t.exports=i()()})),o=e(n()),s=Object.defineProperty,c=Object.defineProperties,l=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,p=(e,t,n)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,m=(e,t)=>{for(var n in t||={})d.call(t,n)&&p(e,n,t[n]);if(u)for(var n of u(t))f.call(t,n)&&p(e,n,t[n]);return e},h=(e,t)=>c(e,l(t)),g=(e,t,n)=>p(e,typeof t==`symbol`?t:t+``,n),_=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),v=class{static isSSR(){return typeof window>`u`||typeof document>`u`}static isBrowser(){return!this.isSSR()}static hasAPI(e){return!this.isSSR()&&window[e]!==void 0}static getApex(){return typeof window<`u`&&window.Apex?window.Apex:typeof global<`u`&&global.Apex?global.Apex:{}}},y=class e{constructor(e,t=null){this.nodeName=e,this.namespaceURI=t,this.attributes=new Map,this.children=[],this.textContent=``,this.style={},this.classList=new b,this.parentNode=null,this._ssrWidth=void 0,this._ssrHeight=void 0,this._ssrMode=void 0}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){if(e&&e!==this){if(e.parentNode&&e.parentNode!==this)e.parentNode.removeChild(e);else if(e.parentNode===this){let t=this.children.indexOf(e);t!==-1&&this.children.splice(t,1)}e.parentNode=this,this.children.push(e)}return e}removeChild(e){let t=this.children.indexOf(e);return t!==-1&&(this.children.splice(t,1),e.parentNode=null),e}insertBefore(e,t){if(!t)return this.appendChild(e);if(e.parentNode&&e.parentNode!==this)e.parentNode.removeChild(e);else if(e.parentNode===this){let t=this.children.indexOf(e);t!==-1&&this.children.splice(t,1)}let n=this.children.indexOf(t);return n!==-1&&(e.parentNode=this,this.children.splice(n,0,e)),e}cloneNode(t=!1){let n=new e(this.nodeName,this.namespaceURI);return n.textContent=this.textContent,this.attributes.forEach((e,t)=>{n.attributes.set(t,e)}),Object.assign(n.style,this.style),t&&this.children.forEach(e=>{e.cloneNode&&n.appendChild(e.cloneNode(!0))}),n}getBoundingClientRect(){return{width:this._ssrWidth||0,height:this._ssrHeight||0,top:0,left:0,right:this._ssrWidth||0,bottom:this._ssrHeight||0,x:0,y:0}}getRootNode(){let e=this;for(;e.parentNode;)e=e.parentNode;return e}querySelector(){return null}querySelectorAll(){return[]}getElementsByClassName(){return[]}addEventListener(){}removeEventListener(){}get childNodes(){return this.children}toString(){let e=``;if(this.attributes.forEach((t,n)=>{e+=` ${n}="${t}"`}),this.children.length===0&&!this.textContent)return`<${this.nodeName}${e}/>`;let t=this.children.map(e=>e.toString()).join(``);return`<${this.nodeName}${e}>${this.textContent}${t}</${this.nodeName}>`}get innerHTML(){return this.children.map(e=>e.toString()).join(``)}set innerHTML(e){this.children=[],this.textContent=e}get outerHTML(){return this.toString()}get isConnected(){return!0}},b=class{constructor(){this.classes=new Set}add(...e){e.forEach(e=>this.classes.add(e))}remove(...e){e.forEach(e=>this.classes.delete(e))}contains(e){return this.classes.has(e)}toggle(e,t){return t===!0?(this.classes.add(e),!0):t===!1||this.classes.has(e)?(this.classes.delete(e),!1):(this.classes.add(e),!0)}toString(){return Array.from(this.classes).join(` `)}},x=class{constructor(){this.SVGNS=`http://www.w3.org/2000/svg`,this.XLINKNS=`http://www.w3.org/1999/xlink`}createElementNS(e,t){return new y(t,e)}createTextNode(e){let t={nodeName:`#text`,nodeType:3,textContent:e,toString(){return t.textContent}};return t}querySelector(){return null}querySelectorAll(){return[]}getComputedStyle(){return{}}getBoundingClientRect(e){return e&&e.getBoundingClientRect?e.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}createXMLSerializer(){return{serializeToString(e){return e.toString?e.toString():``}}}createDOMParser(){return{parseFromString(e,t){let n=new y(`root`);return n.innerHTML=e,{documentElement:n}}}}},S=null,C=null,w=null,T=class{static init(){v.isSSR()&&!S&&(S=new x)}static createElement(e){return v.isSSR()?(S||this.init(),S.createElementNS(null,e)):document.createElement(e)}static createElementNS(e,t){return v.isSSR()?(S||this.init(),S.createElementNS(e,t)):document.createElementNS(e,t)}static createTextNode(e){return v.isSSR()?(S||this.init(),S.createTextNode(e)):document.createTextNode(e)}static querySelector(e){return v.isSSR()?null:document.querySelector(e)}static querySelectorAll(e){return v.isSSR()?[]:document.querySelectorAll(e)}static getComputedStyle(e){return v.isSSR()?{}:window.getComputedStyle(e)}static matchMedia(e){if(v.isSSR()||typeof window.matchMedia!=`function`)return null;try{return window.matchMedia(e)}catch{return null}}static getBoundingClientRect(e){return v.isSSR()?(S||this.init(),S.getBoundingClientRect(e)):e?e.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}static getXMLSerializer(){return v.isSSR()?(S||this.init(),C||=S.createXMLSerializer(),C):(C||=new XMLSerializer,C)}static getDOMParser(){return v.isSSR()?(S||this.init(),w||=S.createDOMParser(),w):(w||=new DOMParser,w)}static addWindowEventListener(e,t,n){v.isBrowser()&&window.addEventListener(e,t,n)}static removeWindowEventListener(e,t,n){v.isBrowser()&&window.removeEventListener(e,t,n)}static requestAnimationFrame(e){return v.isBrowser()?window.requestAnimationFrame(e):(e(0),null)}static cancelAnimationFrame(e){v.isBrowser()&&e&&window.cancelAnimationFrame(e)}static elementExists(e){return e?v.isSSR()?e._ssrMode===!0||e.nodeName!==void 0:e.getRootNode?e.getRootNode({composed:!0})===document||e.isConnected:!1:!1}static getWindow(){return v.isBrowser()?window:null}static getDocument(){return v.isBrowser()?document:null}static _getShim(){return S}static _resetShim(){S=null,C=null,w=null}},E=new WeakMap,D=0,O=class e{static isObject(e){return e&&typeof e==`object`&&!Array.isArray(e)}static is(e,t){return Object.prototype.toString.call(t)===`[object `+e+`]`}static isSafari(){return v.isBrowser()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}static extend(e,t){if(!this.isObject(e)&&this.isObject(t))return this.clone(t);let n=Object.assign({},e);return this.isObject(e)&&this.isObject(t)&&Object.keys(t).forEach(r=>{this.isObject(t[r])&&r in e?n[r]=this.extend(e[r],t[r]):Object.assign(n,{[r]:t[r]})}),n}static extendArray(t,n){let r=[];return t.map(t=>{r.push(e.extend(n,t))}),t=r,t}static monthMod(e){return e%12}static clone(e,t=new WeakMap,n=!1){if(typeof e!=`object`||!e)return e;if(t.has(e))return t.get(e);let r;if(Array.isArray(e)){if(n)r=e.slice();else{r=[],t.set(e,r);for(let n=0;n<e.length;n++)r[n]=this.clone(e[n],t,!1)}}else if(e instanceof Date)r=new Date(e.getTime());else if(n)r=Object.assign({},e);else{r={},t.set(e,r);for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=this.clone(e[n],t,!1))}return r}static shallowClone(e){return typeof e!=`object`||!e?e:Array.isArray(e)?e.slice():Object.assign({},e)}static stringifyForCompare(e){return JSON.stringify(e,(e,t)=>{if(typeof t!=`function`)return t;let n=E.get(t);return n===void 0&&(n=++D,E.set(t,n)),`__apx_fn_${n}`})}static shallowEqual(e,t){if(e===t)return!0;if(!e||!t)return!1;if(typeof e!=`object`||typeof t!=`object`)return e===t;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(e[r]!==t[r])return!1;return!0}static log10(e){return Math.log(e)/Math.LN10}static roundToBase10(e){return 10**Math.floor(Math.log10(e))}static roundToBase(e,t){return t**+Math.floor(Math.log(e)/Math.log(t))}static parseNumber(e){return typeof e==`number`||e===null?e:parseFloat(e)}static stripNumber(e,t=2){return Number.isInteger(e)?e:parseFloat(e.toPrecision(t))}static randomId(){return(Math.random()+1).toString(36).substring(4)}static noExponents(e){return e.toString().includes(`e`)?Math.round(e):e}static elementExists(e){return!(!e||!e.isConnected)}static getDimensions(e){if(!e)return[0,0];if(v.isSSR())return[e._ssrWidth||400,e._ssrHeight||300];let t;try{t=getComputedStyle(e,null)}catch{return[e.clientWidth||0,e.clientHeight||0]}let n=e.clientWidth,r=e.clientHeight;if(!n||!r){let t=e.getBoundingClientRect();n||=t.width,r||=t.height}return r-=parseFloat(t.paddingTop)+parseFloat(t.paddingBottom),n-=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight),[n,r]}static getBoundingClientRect(e){if(!e)return{top:0,right:0,bottom:0,left:0,width:0,height:0,x:0,y:0};if(v.isSSR())return T.getBoundingClientRect(e);let t=e.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:e.clientWidth,height:e.clientHeight,x:t.left,y:t.top}}static getLargestStringFromArr(e){return e.reduce((e,t)=>(Array.isArray(t)&&(t=t.reduce((e,t)=>e.length>t.length?e:t)),e.length>t.length?e:t),0)}static hexToRgba(e=`#999999`,t=.6){e.substring(0,1)!==`#`&&(e=`#999999`);let n=e.replace(`#`,``),r=n.match(RegExp(`(.{`+n.length/3+`})`,`g`))||[];for(let e=0;e<r.length;e++)r[e]=parseInt(r[e].length===1?r[e]+r[e]:r[e],16);return t!==void 0&&r.push(t),`rgba(`+r.join(`,`)+`)`}static getOpacityFromRGBA(e){return parseFloat(e.replace(/^.*,(.+)\)/,`$1`))}static parseHex(e){if(typeof e!=`string`)return null;let t=e.trim().replace(`#`,``);return t.length===3&&(t=t.split(``).map(e=>e+e).join(``)),/^[0-9a-fA-F]{6}$/.test(t)?[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16)]:null}static relativeLuminance([e,t,n]){let r=e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*r(e)+.7152*r(t)+.0722*r(n)}static getContrastRatio(t,n){let r=e.parseHex(t),i=e.parseHex(n);if(!r||!i)return 0;let a=e.relativeLuminance(r),o=e.relativeLuminance(i),s=Math.max(a,o),c=Math.min(a,o);return(s+.05)/(c+.05)}static rgb2hex(e){return e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i),e&&e.length===4?`#`+(`0`+parseInt(e[1],10).toString(16)).slice(-2)+(`0`+parseInt(e[2],10).toString(16)).slice(-2)+(`0`+parseInt(e[3],10).toString(16)).slice(-2):``}shadeRGBColor(e,t){let n=t.split(`,`),r=e<0?0:255,i=e<0?e*-1:e,a=parseInt(n[0].slice(4),10),o=parseInt(n[1],10),s=parseInt(n[2],10);return`rgb(`+(Math.round((r-a)*i)+a)+`,`+(Math.round((r-o)*i)+o)+`,`+(Math.round((r-s)*i)+s)+`)`}shadeHexColor(e,t){let n=parseInt(t.slice(1),16),r=e<0?0:255,i=e<0?e*-1:e,a=n>>16,o=n>>8&255,s=n&255;return`#`+(16777216+(Math.round((r-a)*i)+a)*65536+(Math.round((r-o)*i)+o)*256+(Math.round((r-s)*i)+s)).toString(16).slice(1)}shadeColor(t,n){return e.isColorHex(n)?this.shadeHexColor(t,n):this.shadeRGBColor(t,n)}static isColorHex(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(e)}static isCSSVariable(e){if(typeof e!=`string`)return!1;let t=e.trim();return t.startsWith(`var(`)&&t.endsWith(`)`)}static getThemeColor(t){if(!e.isCSSVariable(t)||v.isSSR())return t;let n=document.createElement(`div`);n.style.cssText=`position:fixed; left: -9999px; visibility:hidden;`,n.style.color=t,document.body.appendChild(n);let r;try{r=window.getComputedStyle(n).color}finally{n.parentNode&&n.parentNode.removeChild(n)}return r}static applyOpacityToColor(e,t){let n=Number(t);return Number.isFinite(n)?n<=0?`transparent`:n>=1?e:`color-mix(in srgb, ${e} ${Math.round(n*100)}%, transparent)`:e}static getPolygonPos(e,t){let n=[],r=Math.PI*2/t;for(let i=0;i<t;i++){let t={};t.x=e*Math.sin(i*r),t.y=-e*Math.cos(i*r),n.push(t)}return n}static polarToCartesian(e,t,n,r){let i=(r-90)*Math.PI/180;return{x:e+n*Math.cos(i),y:t+n*Math.sin(i)}}static escapeString(e,t=`x`){let n=e.toString().slice();return n=n.replace(/[` ~!@#$%^&*()|+=?;:'",.<>{}[\]\\/]/gi,t),n}static negToZero(e){return e<0?0:e}static moveIndexInArray(e,t,n){if(n>=e.length){let t=n-e.length+1;for(;t--;)e.push(void 0)}return e.splice(n,0,e.splice(t,1)[0]),e}static extractNumber(e){return parseFloat(e.replace(/[^\d.]*/g,``))}static findAncestor(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e}static setELstyles(e,t){for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e.style[n]=t[n])}static preciseAddition(e,t){let n=(String(e).split(`.`)[1]||``).length,r=(String(t).split(`.`)[1]||``).length,i=10**Math.max(n,r);return(Math.round(e*i)+Math.round(t*i))/i}static isNumber(e){return!isNaN(e)&&parseFloat(String(Number(e)))===e&&!isNaN(parseInt(e,10))}static isFloat(e){return Number(e)===e&&e%1!=0}static isMsEdge(){if(v.isSSR())return!1;let e=window.navigator.userAgent,t=e.indexOf(`Edge/`);return t>0&&parseInt(e.substring(t+5,e.indexOf(`.`,t)),10)}static getGCD(e,t,n=7){let r=10**(n-Math.floor(Math.log10(Math.max(e,t))));for(r>1?(e=Math.round(Math.abs(e)*r),t=Math.round(Math.abs(t)*r)):r=1;t;){let n=t;t=e%t,e=n}return e/r}static getPrimeFactors(e){let t=[],n=2;for(;e>=2;)e%n==0?(t.push(n),e/=n):n++;return t}static mod(e,t,n=7){let r=10**(n-Math.floor(Math.log10(Math.max(e,t))));return e=Math.round(Math.abs(e)*r),t=Math.round(Math.abs(t)*r),e%t/r}},k=class{constructor(e){this.w=e,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}isValidDate(e){return typeof e!=`number`&&!isNaN(this.parseDate(e))}getTimeStamp(e){return isNaN(Date.parse(e))?e:this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toISOString().substr(0,25)).getTime():new Date(e).getTime()}getDate(e){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toUTCString()):new Date(e)}parseDate(e){if(!isNaN(Date.parse(e)))return this.getTimeStamp(e);if(typeof e!=`string`)return NaN;let t=Date.parse(e.replace(/-/g,`/`).replace(/[a-z]+/gi,` `));return t=this.getTimeStamp(t),t}parseDateWithTimezone(e){return Date.parse(e.replace(/-/g,`/`).replace(/[a-z]+/gi,` `))}formatDate(e,t){let n=this.w.globals.locale,r=this.w.config.xaxis.labels.datetimeUTC,i=[`\0`,...n.months],a=[``,...n.shortMonths],o=[``,...n.days],s=[``,...n.shortDays];function c(e,t=2){let n=e+``;for(;n.length<t;)n=`0`+n;return n}let l=r?e.getUTCFullYear():e.getFullYear();t=t.replace(/(^|[^\\])yyyy+/g,`$1`+l),t=t.replace(/(^|[^\\])yy/g,`$1`+l.toString().substr(2,2)),t=t.replace(/(^|[^\\])y/g,`$1`+l);let u=(r?e.getUTCMonth():e.getMonth())+1;t=t.replace(/(^|[^\\])MMMM+/g,`$1`+i[0]),t=t.replace(/(^|[^\\])MMM/g,`$1`+a[0]),t=t.replace(/(^|[^\\])MM/g,`$1`+c(u)),t=t.replace(/(^|[^\\])M/g,`$1`+u);let d=r?e.getUTCDate():e.getDate();t=t.replace(/(^|[^\\])dddd+/g,`$1`+o[0]),t=t.replace(/(^|[^\\])ddd/g,`$1`+s[0]),t=t.replace(/(^|[^\\])dd/g,`$1`+c(d)),t=t.replace(/(^|[^\\])d/g,`$1`+d);let f=r?e.getUTCHours():e.getHours();t=t.replace(/(^|[^\\])HH+/g,`$1`+c(f)),t=t.replace(/(^|[^\\])H/g,`$1`+f);let p=f>12?f-12:f===0?12:f;t=t.replace(/(^|[^\\])hh+/g,`$1`+c(p)),t=t.replace(/(^|[^\\])h/g,`$1`+p);let m=r?e.getUTCMinutes():e.getMinutes();t=t.replace(/(^|[^\\])mm+/g,`$1`+c(m)),t=t.replace(/(^|[^\\])m/g,`$1`+m);let h=r?e.getUTCSeconds():e.getSeconds();t=t.replace(/(^|[^\\])ss+/g,`$1`+c(h)),t=t.replace(/(^|[^\\])s/g,`$1`+h);let g=r?e.getUTCMilliseconds():e.getMilliseconds();t=t.replace(/(^|[^\\])fff+/g,`$1`+c(g,3)),g=Math.round(g/10),t=t.replace(/(^|[^\\])ff/g,`$1`+c(g)),g=Math.round(g/10),t=t.replace(/(^|[^\\])f/g,`$1`+g);let _=f<12?`AM`:`PM`;t=t.replace(/(^|[^\\])TT+/g,`$1`+_),t=t.replace(/(^|[^\\])T/g,`$1`+_.charAt(0));let v=_.toLowerCase();t=t.replace(/(^|[^\\])tt+/g,`$1`+v),t=t.replace(/(^|[^\\])t/g,`$1`+v.charAt(0));let y=-e.getTimezoneOffset(),b=r||!y?`Z`:y>0?`+`:`-`;if(!r){y=Math.abs(y);let e=Math.floor(y/60),t=y%60;b+=c(e)+`:`+c(t)}t=t.replace(/(^|[^\\])K/g,`$1`+b);let x=(r?e.getUTCDay():e.getDay())+1;return t=t.replace(new RegExp(o[0],`g`),o[x]),t=t.replace(new RegExp(s[0],`g`),s[x]),t=t.replace(new RegExp(i[0],`g`),i[u]),t=t.replace(new RegExp(a[0],`g`),a[u]),t=t.replace(/\\(.)/g,`$1`),t}getTimeUnitsfromTimestamp(e,t){let n=this.w;n.config.xaxis.min!==void 0&&(e=n.config.xaxis.min),n.config.xaxis.max!==void 0&&(t=n.config.xaxis.max);let r=this.getDate(e),i=this.getDate(t),a=this.formatDate(r,`yyyy MM dd HH mm ss fff`).split(` `),o=this.formatDate(i,`yyyy MM dd HH mm ss fff`).split(` `);return{minMillisecond:parseInt(a[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(a[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(a[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(a[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(a[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(a[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(a[0],10),maxYear:parseInt(o[0],10)}}isLeapYear(e){return e%4==0&&e%100!=0||e%400==0}calculcateLastDaysOfMonth(e,t,n){return this.determineDaysOfMonths(e,t)-n}determineDaysOfYear(e){let t=365;return this.isLeapYear(e)&&(t=366),t}determineRemainingDaysOfYear(e,t,n){let r=this.daysCntOfYear[t]+n;return t>1&&this.isLeapYear(e)&&r++,r}determineDaysOfMonths(e,t){let n=30;switch(e=O.monthMod(e),!0){case this.months30.indexOf(e)>-1:e===2&&(n=this.isLeapYear(t)?29:28);break;case this.months31.indexOf(e)>-1:n=31;break;default:n=31}return n}getDateFields(e,t){let n=new Date(e);return t?{year:n.getUTCFullYear(),month:n.getUTCMonth(),date:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),ms:n.getUTCMilliseconds(),weekday:n.getUTCDay()}:{year:n.getFullYear(),month:n.getMonth(),date:n.getDate(),hour:n.getHours(),minute:n.getMinutes(),second:n.getSeconds(),ms:n.getMilliseconds(),weekday:n.getDay()}}addInterval(e,t,n,r){let i=new Date(e);if(r)switch(t){case`year`:i.setUTCFullYear(i.getUTCFullYear()+n);break;case`month`:i.setUTCMonth(i.getUTCMonth()+n);break;case`week`:i.setUTCDate(i.getUTCDate()+n*7);break;case`day`:i.setUTCDate(i.getUTCDate()+n);break;case`hour`:i.setUTCHours(i.getUTCHours()+n);break;case`minute`:i.setUTCMinutes(i.getUTCMinutes()+n);break;case`second`:i.setUTCSeconds(i.getUTCSeconds()+n)}else switch(t){case`year`:i.setFullYear(i.getFullYear()+n);break;case`month`:i.setMonth(i.getMonth()+n);break;case`week`:i.setDate(i.getDate()+n*7);break;case`day`:i.setDate(i.getDate()+n);break;case`hour`:i.setHours(i.getHours()+n);break;case`minute`:i.setMinutes(i.getMinutes()+n);break;case`second`:i.setSeconds(i.getSeconds()+n)}return i.getTime()}ceilToBoundary(e,t,n,r){let i=new Date(e);if(r)switch(t){case`second`:{let t=i.getUTCSeconds(),r=Math.ceil(t/n)*n;return r===t&&i.getUTCMilliseconds()===0?e:(i.setUTCMilliseconds(0),i.setUTCSeconds(r),i.getTime())}case`minute`:{let t=i.getUTCMinutes(),r=Math.ceil(t/n)*n;return r===t&&i.getUTCSeconds()===0&&i.getUTCMilliseconds()===0?e:(i.setUTCMilliseconds(0),i.setUTCSeconds(0),i.setUTCMinutes(r),i.getTime())}case`hour`:{let t=i.getUTCHours(),r=Math.ceil(t/n)*n;return r===t&&i.getUTCMinutes()===0&&i.getUTCSeconds()===0&&i.getUTCMilliseconds()===0?e:(i.setUTCMilliseconds(0),i.setUTCSeconds(0),i.setUTCMinutes(0),i.setUTCHours(r),i.getTime())}case`day`:return i.getUTCHours()===0&&i.getUTCMinutes()===0&&i.getUTCSeconds()===0&&i.getUTCMilliseconds()===0?e:(i.setUTCMilliseconds(0),i.setUTCSeconds(0),i.setUTCMinutes(0),i.setUTCHours(0),i.setUTCDate(i.getUTCDate()+1),i.getTime());case`week`:{let t=6048e5,r=Date.UTC(1970,0,5);i.setUTCMilliseconds(0),i.setUTCSeconds(0),i.setUTCMinutes(0),i.setUTCHours(0);let a=i.getTime(),o=Math.ceil((a-r)/t),s=r+Math.ceil(o/n)*n*t;return s>=e?s:s+n*t}case`month`:{let t=i.getUTCMonth(),r=Math.ceil(t/n)*n;return r===t&&i.getUTCDate()===1&&i.getUTCHours()===0&&i.getUTCMinutes()===0&&i.getUTCSeconds()===0&&i.getUTCMilliseconds()===0?e:(i.setUTCMilliseconds(0),i.setUTCSeconds(0),i.setUTCMinutes(0),i.setUTCHours(0),i.setUTCDate(1),i.setUTCMonth(r),i.getTime())}case`year`:{let t=i.getUTCFullYear(),r=Math.ceil(t/n)*n;return r===t&&i.getUTCMonth()===0&&i.getUTCDate()===1&&i.getUTCHours()===0&&i.getUTCMinutes()===0&&i.getUTCSeconds()===0&&i.getUTCMilliseconds()===0?e:Date.UTC(r,0,1)}}else switch(t){case`second`:{let t=i.getSeconds(),r=Math.ceil(t/n)*n;return r===t&&i.getMilliseconds()===0?e:(i.setMilliseconds(0),i.setSeconds(r),i.getTime())}case`minute`:{let t=i.getMinutes(),r=Math.ceil(t/n)*n;return r===t&&i.getSeconds()===0&&i.getMilliseconds()===0?e:(i.setMilliseconds(0),i.setSeconds(0),i.setMinutes(r),i.getTime())}case`hour`:{let t=i.getHours(),r=Math.ceil(t/n)*n;return r===t&&i.getMinutes()===0&&i.getSeconds()===0&&i.getMilliseconds()===0?e:(i.setMilliseconds(0),i.setSeconds(0),i.setMinutes(0),i.setHours(r),i.getTime())}case`day`:return i.getHours()===0&&i.getMinutes()===0&&i.getSeconds()===0&&i.getMilliseconds()===0?e:(i.setMilliseconds(0),i.setSeconds(0),i.setMinutes(0),i.setHours(0),i.setDate(i.getDate()+1),i.getTime());case`week`:{let t=6048e5,r=new Date(1970,0,5).getTime();i.setMilliseconds(0),i.setSeconds(0),i.setMinutes(0),i.setHours(0);let a=i.getTime(),o=Math.ceil((a-r)/t),s=r+Math.ceil(o/n)*n*t;return s>=e?s:s+n*t}case`month`:{let t=i.getMonth(),r=Math.ceil(t/n)*n;return r===t&&i.getDate()===1&&i.getHours()===0&&i.getMinutes()===0&&i.getSeconds()===0&&i.getMilliseconds()===0?e:(i.setMilliseconds(0),i.setSeconds(0),i.setMinutes(0),i.setHours(0),i.setDate(1),i.setMonth(r),i.getTime())}case`year`:{let t=i.getFullYear(),r=Math.ceil(t/n)*n;return r===t&&i.getMonth()===0&&i.getDate()===1&&i.getHours()===0&&i.getMinutes()===0&&i.getSeconds()===0&&i.getMilliseconds()===0?e:new Date(r,0,1).getTime()}}return e}isAtBoundary(e,t,n){let r=this.getDateFields(e,n);switch(t){case`year`:return r.month===0&&r.date===1&&r.hour===0&&r.minute===0&&r.second===0&&r.ms===0;case`month`:return r.date===1&&r.hour===0&&r.minute===0&&r.second===0&&r.ms===0;case`day`:return r.hour===0&&r.minute===0&&r.second===0&&r.ms===0;case`hour`:return r.minute===0&&r.second===0&&r.ms===0;case`minute`:return r.second===0&&r.ms===0;case`second`:return r.ms===0}return!1}},A=class{constructor(e){this.w=e,this.tooltipKeyFormat=`dd MMM`}xLabelFormat(e,t,n,r){let i=this.w;if(i.config.xaxis.type===`datetime`&&i.config.xaxis.labels.formatter===void 0&&i.config.tooltip.x.formatter===void 0){let e=new k(this.w);return e.formatDate(e.getDate(t),i.config.tooltip.x.format)}return e(t,n,r)}defaultGeneralFormatter(e){return Array.isArray(e)?e.map(e=>e):e}defaultYFormatter(e,t){let n=this.w;if(O.isNumber(e)){if(n.globals.yValueDecimal!==0)e=e.toFixed(t.decimalsInFloat===void 0?n.globals.yValueDecimal:t.decimalsInFloat);else{let t=e.toFixed(0);e=Number(t)===e?t:e.toFixed(1)}}return e}setLabelFormatters(){let e=this.w,t=e.formatters;return t.xaxisTooltipFormatter=e=>this.defaultGeneralFormatter(e),t.ttKeyFormatter=e=>this.defaultGeneralFormatter(e),t.ttZFormatter=e=>e,t.legendFormatter=e=>this.defaultGeneralFormatter(e),t.xLabelFormatter=e.config.xaxis.labels.formatter===void 0?t=>{if(O.isNumber(t)){if(!e.config.xaxis.convertedCatToNumeric&&e.config.xaxis.type===`numeric`){if(O.isNumber(e.config.xaxis.decimalsInFloat))return t.toFixed(e.config.xaxis.decimalsInFloat);{let n=e.globals.maxX-e.globals.minX;if(n>0){let e=n/10,r=Math.max(0,-Math.floor(Math.log10(e)));return t.toFixed(r)}return t.toFixed(0)}}return e.globals.isBarHorizontal&&e.globals.maxY-e.globals.minY<4?t.toFixed(1):t.toFixed(0)}return t}:e.config.xaxis.labels.formatter,t.ttKeyFormatter=typeof e.config.tooltip.x.formatter==`function`?e.config.tooltip.x.formatter:t.xLabelFormatter,typeof e.config.xaxis.tooltip.formatter==`function`&&(t.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||e.config.tooltip.y.formatter!==void 0)&&(t.ttVal=e.config.tooltip.y),e.config.tooltip.z.formatter!==void 0&&(t.ttZFormatter=e.config.tooltip.z.formatter),e.config.legend.formatter!==void 0&&(t.legendFormatter=e.config.legend.formatter),t.yLabelFormatters=[],e.config.yaxis.forEach((n,r)=>{if(n.labels.formatter!==void 0)t.yLabelFormatters[r]=n.labels.formatter;else if(e.config.chart.type===`violin`){let n=e=>typeof e==`number`&&isFinite(e)?`${Math.round(e*100)/100}`:e;t.yLabelFormatters[r]=t=>e.globals.xyCharts?Array.isArray(t)?t.map(n):n(t):t}else t.yLabelFormatters[r]=t=>e.globals.xyCharts?Array.isArray(t)?t.map(e=>this.defaultYFormatter(e,n)):this.defaultYFormatter(t,n):t}),e.globals}heatmapLabelFormatters(){let e=this.w;if(e.config.chart.type===`heatmap`){e.globals.yAxisScale[0].result=e.seriesData.seriesNames.slice();let t=e.seriesData.seriesNames.reduce((e,t)=>e.length>t.length?e:t,0);e.globals.yAxisScale[0].niceMax=t,e.globals.yAxisScale[0].niceMin=t}}},j={name:`en`,options:{months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],toolbar:{exportToSVG:`Download SVG`,exportToPNG:`Download PNG`,exportToCSV:`Download CSV`,menu:`Menu`,selection:`Selection`,selectionZoom:`Selection Zoom`,zoomIn:`Zoom In`,zoomOut:`Zoom Out`,pan:`Panning`,reset:`Reset Zoom`,measure:`Measure`}}},M=class{constructor(){this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,alignZero:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:`11px`,fontWeight:400,fontFamily:void 0,cssClass:``},formatter:void 0},axisBorder:{show:!1,color:`#e0e0e0`,width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:`#e0e0e0`,width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:`11px`,fontWeight:900,fontFamily:void 0,cssClass:``}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:`front`,stroke:{color:`#b6b6b6`,width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:`#fff`,strokeWidth:2,strokeColor:`#333`,shape:`circle`,offsetX:0,offsetY:0,cssClass:``},label:{borderColor:`#c2c2c2`,borderWidth:1,borderRadius:2,text:void 0,textAnchor:`middle`,offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:`#fff`,color:void 0,fontSize:`11px`,fontFamily:void 0,fontWeight:400,cssClass:``,padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0},tooltip:{enabled:!1,text:void 0,formatter:void 0,theme:void 0,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:`#c2c2c2`,borderColor:`#c2c2c2`,borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:`100%`,yAxisIndex:0,label:{borderColor:`#c2c2c2`,borderWidth:1,borderRadius:2,text:void 0,textAnchor:`end`,position:`right`,offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:`#fff`,color:void 0,fontSize:`11px`,fontFamily:void 0,fontWeight:400,cssClass:``,padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:`#c2c2c2`,borderColor:`#c2c2c2`,borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:`#c2c2c2`,borderWidth:1,borderRadius:2,text:void 0,textAnchor:`middle`,orientation:`vertical`,position:`top`,offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:`#fff`,color:void 0,fontSize:`11px`,fontFamily:void 0,fontWeight:400,cssClass:``,padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:``,textAnchor:`start`,foreColor:void 0,fontSize:`13px`,fontFamily:void 0,fontWeight:400,appendTo:`.apexcharts-annotations`,backgroundColor:`transparent`,borderColor:`#c2c2c2`,borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}init(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},plugins:[],trellis:{by:void 0,row:void 0,column:void 0,emptyPanels:`placeholder`,data:void 0,x:void 0,y:void 0,seriesBy:void 0,columns:`auto`,minPanelWidth:220,gap:12,aspectRatio:1.6,panelHeight:void 0,order:`first-seen`,limit:void 0,virtualize:`auto`,scales:{x:`shared`,y:`shared`,color:`shared`,size:`shared`},header:{show:!0,formatter:void 0,style:{fontSize:void 0,fontWeight:void 0,color:void 0}},axes:{labels:`edges`},legend:`shared`,toolbar:`shared`,tooltip:`panel`,zoom:`sync`,promote:!0,radiusByTotal:!1,targetTicks:3,panel:void 0},chart:{animations:{enabled:!0,speed:800,easing:`easeInOutSine`,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350,easing:void 0},chartTypeMorph:{enabled:!0,speed:600},respectReducedMotion:!0,largeDatasetThreshold:1e3},background:``,locales:[j],defaultLocale:`en`,perspectives:{serializeOptions:[`theme`,`xaxis`,`yaxis`,`title`,`subtitle`]},history:{enabled:!1,maxDepth:100,coalesceMs:250,keyboard:!0},renderer:`svg`,rendererThreshold:8e3,layers:{series:`auto`,grid:`svg`,annotations:`svg`,dataLabels:`svg`},dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:`#000`,opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0,crossFilter:void 0,filterChange:void 0,annotationDragged:void 0,annotationEdited:void 0,annotationCreated:void 0,annotationStyled:void 0,annotationDeleted:void 0,measured:void 0,keyDown:void 0,keyUp:void 0},foreColor:`#373d3f`,fontFamily:`Helvetica, Arial, sans-serif`,height:`auto`,parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,print:{enabled:!0,width:700},id:void 0,group:void 0,nonce:void 0,license:void 0,offsetX:0,offsetY:0,injectStyleSheet:!0,selection:{enabled:!1,type:`x`,fill:{color:`#24292e`,opacity:.1},stroke:{width:1,color:`#24292e`,opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},link:{enabled:!1,mode:`highlight`,dimOpacity:.2,id:void 0,dimension:void 0,reduce:void 0,type:void 0,bins:void 0,order:void 0,seriesName:void 0},ink:{enabled:!1,palette:!1,snap:!1,noteColors:void 0},measure:{enabled:!1,mode:`span`,key:`m`,pinOnRelease:!0,colors:{up:void 0,down:void 0,neutral:void 0,guide:void 0},band:!0,guides:!0,markers:!0,format:{x:void 0,y:void 0,percent:void 0},label:void 0},contextMenu:{enabled:!1,items:[`annotate`,`xline`,`yline`,`measure`],labels:{annotate:void 0,xline:void 0,yline:void 0,measure:void 0},noteText:`Note`,line:{text:``,strokeDashArray:4,color:void 0}},stacked:!1,stackOnlyBar:!0,stackType:`normal`,streaming:{enabled:!1,maxPoints:void 0},toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,measure:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:`,`,headerCategory:`category`,headerValue:`value`,categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0,embedFonts:!0},autoSelected:`zoom`},type:`line`,width:`100%`,zoom:{enabled:!0,type:`x`,autoScaleYaxis:!1,allowMouseWheelZoom:`auto`,pinch:`auto`,zoomedArea:{fill:{color:`#90CAF9`,opacity:.4},stroke:{color:`#0D47A1`,opacity:.4,width:1}}},pan:{inertia:!0,friction:.92},accessibility:{enabled:!0,description:void 0,announcements:{enabled:!0},keyboard:{enabled:!0,navigation:{enabled:!0,wrapAround:!1}}},dataReducer:{enabled:!1,algorithm:`lttb`,targetPoints:250,threshold:500}},parsing:{x:void 0,y:void 0},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:`origin`},bar:{horizontal:!1,columnWidth:`70%`,barHeight:`70%`,distributed:!1,borderRadius:0,borderRadiusApplication:`around`,rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,dumbbell:{connector:{color:void 0,opacity:.55},dataLabels:{enabled:!1,offset:6,colorFromMarker:!0,formatter:void 0,style:{fontSize:`12px`,fontFamily:void 0,fontWeight:600,colors:void 0}},tooltip:{differenceLabel:`Difference`}},isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:`top`,maxItems:100,hideOverflowingLabels:!0,orientation:`horizontal`,total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:`#373d3f`,fontSize:`12px`,fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0,minZ:void 0,maxZ:void 0},scatter:{jitter:{enabled:!1,x:0,y:0,distributed:!1,maxPoints:5e3}},candlestick:{colors:{upward:`#00B746`,downward:`#EF403C`},wick:{useFillColor:!0}},boxPlot:{colors:{upper:`#00E396`,lower:`#008FFB`},whiskers:`minmax`,points:{show:!1,shape:`circle`,size:2.5,jitter:.5,maxPoints:3e3,opacity:.9,fillColor:`series-dark`,strokeColor:`#fff`,strokeWidth:1}},violin:{bandwidthScale:1,kde:{bandwidth:void 0,resolution:64},normalize:`individual`,side:`both`,box:{show:!1,width:`15%`,whiskers:`minmax`,strokeWidth:1,fillColor:void 0,capWidth:.5},points:{show:!0,shape:`circle`,size:2.5,jitter:.5,constrainToViolin:!0,position:`center`,laneWidth:`40%`,maxPoints:3e3,opacity:.9,fillColor:`series-dark`,strokeColor:`#fff`,strokeWidth:1}},histogram:{bins:`auto`,binWidth:void 0,range:void 0,normalize:`count`,cumulative:!1,overlap:!0},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0,gradientLegend:{enabled:!1,width:`70%`,height:`70%`,thickness:12,align:`center`,stops:16,showLabels:!0,showHoverValue:!0,labelStyle:{fontSize:`11px`,fontFamily:void 0,colors:void 0},arrow:{size:8,color:void 0},formatter:void 0}}},waterfall:{colors:{positive:`#00A86F`,negative:`#FF4560`,subtotal:void 0,total:void 0},connectors:{show:!0,color:void 0,strokeWidth:1,strokeDashArray:3}},streamgraph:{offset:`wiggle`,order:`inside-out`,hover:{show:!0,opacity:.35},labels:{show:!0,minWidth:24,minFontSize:9,maxFontSize:30,style:{fontSize:`auto`,fontFamily:void 0,fontWeight:600,colors:void 0}}},funnel:{shape:`rectangle`,lastShape:`flat`},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:`scale`,minFontSize:4},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0,colorValue:void 0,gradient:{enabled:void 0,min:void 0,max:void 0,midpoint:void 0,symmetric:!0,colors:void 0,stops:void 0},gradientLegend:{enabled:!1,width:`70%`,height:`70%`,thickness:12,align:`center`,stops:16,showLabels:!0,showHoverValue:!0,labelStyle:{fontSize:`11px`,fontFamily:void 0,colors:void 0},arrow:{size:8,color:void 0},formatter:void 0}},nested:{enabled:void 0,drilldownAsLevels:!1},parents:{show:`auto`,padding:4,fill:void 0,fillOpacity:1,borderColor:void 0,borderWidth:1,borderRadius:void 0,hover:{show:!0,color:void 0,width:2},header:{show:!0,height:22,minWidth:40,align:`left`,offsetX:0,offsetY:0,showValue:!1,formatter:void 0,style:{fontSize:`12px`,fontFamily:void 0,fontWeight:600,color:void 0,background:void 0,cssClass:``}},tooltip:{formatter:void 0}},levels:[],zoom:{enabled:!1,breadcrumb:void 0},seriesTitle:{show:!0,offsetY:1,offsetX:1,borderColor:`#000`,borderWidth:1,borderRadius:2,style:{background:`rgba(0, 0, 0, 0.6)`,color:`#fff`,fontSize:`12px`,fontFamily:void 0,fontWeight:400,cssClass:``,padding:{left:6,right:6,top:2,bottom:2}}}},unit:{layout:`grouped`,positions:void 0,transition:`group`,shape:`circle`,image:{src:void 0,width:20,height:20,tint:!1},pictogram:{mark:void 0,fit:`contain`,scale:1,padding:0,fallback:`circle`},size:`auto`,columns:{size:`inherit`},grid:{columns:10,total:void 0,fillFrom:`bottom`,split:!1,tileColumns:void 0,max:void 0,trackColor:void 0},scatter:{y:`lanes`,spread:`swarm`,orientation:`horizontal`,tickAmount:5,xMin:void 0,xMax:void 0,xTitle:void 0,xFormatter:void 0,yTickAmount:5,yMin:void 0,yMax:void 0,yTitle:void 0,yFormatter:void 0,sizeField:`z`,sizeRange:void 0,laneLabelWidth:void 0,gridlines:!0},sizeByValue:{enabled:!1,maxRadius:`auto`,minRadius:void 0,scale:`area`},spacing:1.05,borderRadius:0,gather:{motion:`auto`,spring:`crisp`,easing:`outCubic`,overshoot:1.70158,enter:`burst`},arc:{startAngle:-90,endAngle:90,innerRadiusRatio:.4,rows:`auto`},unitValue:1,maxUnits:5e3,sortByGroup:!0,clusterLabels:{show:!0,position:`top`,curved:!0,fontSize:`13px`,fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:void 0,external:{show:!1,connector:{show:!0,width:1.5,color:void 0,gap:8,length:22},offsetX:0,offsetY:0}},tooltip:{formatter:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,shape:`arc`,min:0,max:100,bands:[],bandsStyle:{strokeWidth:`40%`,gap:0,hideTrackWhenPresent:!0},ticks:{show:!1,major:{count:11,length:10,width:2,color:`#666`,placement:`outside`},minor:{count:4,length:5,width:1,color:`#999`,placement:`outside`},labels:{show:!1,offset:6,fontSize:`11px`,fontFamily:void 0,fontWeight:400,color:`#666`,formatter(e){return String(e)}}},needle:{color:`#333`,length:`85%`,baseWidth:4,tipWidth:1,offsetY:0,showValueArc:!1,animation:{enabled:!0,duration:800,easing:`ease-out`}},hollow:{margin:5,size:`50%`,background:`transparent`,image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:`front`,stroke:void 0,strokeWidth:1,strokeDasharray:void 0,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:`#000`,opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:`#f2f2f2`,strokeWidth:`97%`,opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:`#000`,opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:`16px`,fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter(e){return e}},value:{show:!0,fontSize:`14px`,fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter(e){return e+`%`}},total:{show:!1,label:`Total`,fontSize:`16px`,fontWeight:600,fontFamily:void 0,color:void 0,formatter(e){return e.globals.seriesTotals.reduce((e,t)=>e+t,0)/e.seriesData.series.length+`%`}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:`16px`,formatter(e){return e},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,expandOffset:10,hoverOutline:{show:!0,size:8,gap:0,opacity:.3,color:void 0},borderRadius:0,spacing:0,dataLabels:{offset:0,minAngleToShowLabel:10,external:{show:!1,offsetX:0,offsetY:0,fontSize:void 0,fontFamily:void 0,fontWeight:void 0,color:void 0,formatter:void 0,connector:{show:!0,width:1,color:void 0,length:16,gap:6}}},donut:{size:`65%`,background:`transparent`,labels:{show:!1,name:{show:!0,fontSize:`16px`,fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter(e){return e}},value:{show:!0,fontSize:`20px`,fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter(e){return e}},total:{show:!1,showAlways:!1,label:`Total`,fontSize:`16px`,fontWeight:400,fontFamily:void 0,color:void 0,formatter(e){return e.globals.seriesTotals.reduce((e,t)=>e+t,0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:`#e8e8e8`},spokes:{strokeWidth:1,connectorColors:`#e8e8e8`}},sunburst:{offsetX:0,offsetY:0,startAngle:0,endAngle:360,innerSize:`15%`,borderRadius:0,spacing:1,leaf:`extend`,partition:`normalize`,tint:.14,zoomOnClick:!0,dataLabels:{show:!0,minAngleToShow:8,style:{fontSize:`12px`,fontFamily:void 0,fontWeight:400,colors:void 0}}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:`#e8e8e8`,connectorColors:`#e8e8e8`,fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter(e){return e===null?``:e},textAnchor:`middle`,distributed:!1,offsetX:0,offsetY:0,style:{fontSize:`12px`,fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:`#fff`,backgroundColor:void 0,borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:`#fff`,dropShadow:{enabled:!1,top:1,left:1,blur:1,color:`#000`,opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:`#000`,opacity:.8},animate:{enabled:!0},countUp:{enabled:!1}},fill:{type:`solid`,colors:void 0,opacity:.85,gradient:{shade:`dark`,type:`horizontal`,shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:`squares`,width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:`#e0e0e0`,strokeDashArray:0,position:`back`,xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],drilldown:{enabled:!1,series:[],breadcrumb:{show:!0,position:`top-left`,separator:` / `,rootLabel:`All`,offsetX:0,offsetY:0},animation:{enabled:!0,zoomFromPoint:!1,speed:260},loading:{show:!0},cache:!0,marker:{show:!0,size:6,strokeColor:`#fff`}},legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:`bottom`,horizontalAlign:`center`,inverseOrder:!1,fontSize:`12px`,fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],clusterGroupedSeries:!0,clusterGroupedSeriesOrientation:`vertical`,labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:`#fff`,strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:`circle`,offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3},largeDatasetThreshold:0},noData:{text:void 0,align:`center`,offsetX:0,offsetY:0,style:{color:void 0,fontSize:`14px`,fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:`lighten`,value:.15}},active:{allowMultipleDataPointsSelection:!1,filter:{type:`darken`,value:.35}}},title:{text:void 0,align:`left`,margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:`14px`,fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:`left`,margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:`12px`,fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:`smooth`,lineCap:`butt`,width:2,colors:void 0,dashArray:0,fill:{type:`solid`,colors:void 0,opacity:.85,gradient:{shade:`dark`,type:`horizontal`,shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,arrow:!0,compact:!1,custom:void 0,fillSeriesColor:!1,theme:`light`,cssClass:``,style:{fontSize:`12px`,fontFamily:void 0,background:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:`dd MMM`,formatter:void 0},y:{formatter:void 0,title:{formatter(e){return e?e+`: `:``}}},z:{formatter:void 0,title:`Size: `},marker:{show:!0,fillColors:void 0},items:{display:`flex`},fixed:{enabled:!1,position:`topRight`,offsetX:0,offsetY:0}},xaxis:{type:`category`,categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:`12px`,fontWeight:400,fontFamily:void 0,cssClass:``},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:`yyyy`,month:`MMM`,day:`dd MMM`,hour:`HH:mm`,minute:`HH:mm`,second:`HH:mm:ss`}},group:{groups:[],style:{colors:[],fontSize:`12px`,fontWeight:400,fontFamily:void 0,cssClass:``}},axisBorder:{show:!0,color:`#e0e0e0`,width:`100%`,height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:`#e0e0e0`,height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:`on`,min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:`bottom`,title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:`12px`,fontWeight:900,fontFamily:void 0,cssClass:``}},crosshairs:{show:!0,width:1,position:`back`,opacity:.9,stroke:{color:`#b6b6b6`,width:1,dashArray:3},fill:{type:`solid`,color:`#B1B9C4`,gradient:{colorFrom:`#D8E3F0`,colorTo:`#BED1E6`,stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!1,offsetY:0,formatter:void 0,style:{fontSize:`12px`,fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:``,palette:`palette1`,tokens:!0,follow:!1,name:``,monochrome:{enabled:!1,color:`#008FFB`,shadeTo:`light`,shadeIntensity:.65},accessibility:{colorBlindMode:``}}}}},N={funnel:`bar`,pyramid:`bar`,gauge:`radialBar`,waffle:`unit`,histogram:`bar`,waterfall:`rangeBar`,dumbbell:`rangeBar`,streamgraph:`rangeArea`,raincloud:`violin`},P=`_apexOwnedByType`,F=(e,t)=>{let n=t;return n[P]=e,t},I=[`tooltip.custom`,`tooltip.shared`,`tooltip.intersect`,`tooltip.followCursor`,`dataLabels.enabled`,`dataLabels.formatter`,`plotOptions.bar.dataLabels.position`,`markers.size`,`plotOptions.violin.side`,`plotOptions.violin.box.show`,`plotOptions.violin.box.whiskers`,`plotOptions.violin.points.position`,`states.hover.filter.type`,`states.active.filter.type`,`xaxis.crosshairs.width`,`xaxis.tickPlacement`,`xaxis.tooltip.enabled`,`chart.zoom.enabled`,`chart.animations.dynamicAnimation.enabled`],L=(e,t)=>{let n=e;for(let e of t.split(`.`)){if(typeof n!=`object`||!n)return;n=n[e]}return n},R=(e,t,n)=>{let r=t.split(`.`),i=r.pop(),a=e;for(let e of r)(a[e]==null||typeof a[e]!=`object`)&&(a[e]={}),a=a[e];n===void 0?delete a[i]:a[i]=n},ee=(e,t)=>{let n=N[e];return{chart:{type:n||e,requestedType:n?e:void 0,stacked:t.chart?.stacked},plotOptions:{bar:{isFunnel:e===`funnel`||e===`pyramid`},histogram:t.plotOptions?.histogram},series:t.series,yaxis:[{title:{},labels:{},axisBorder:{},axisTicks:{}}]}},te=(e,t)=>{if(typeof e==`function`)return Array.isArray(e[P])?!0:typeof t==`function`&&String(e)===String(t);if(typeof t==`function`)return e===void 0;if(e===t)return!0;try{return JSON.stringify(e)===JSON.stringify(t)}catch{return!1}},ne=({isTimeline:e,seriesIndex:t,dataPointIndex:n,y1:r,y2:i,w:a})=>{let o=a.rangeData.seriesRangeStart[t][n],s=a.rangeData.seriesRangeEnd[t][n],c=a.labelData.labels[n],l=a.config.series[t].name?a.config.series[t].name:``,u=a.formatters.ttKeyFormatter,d=a.config.tooltip.y.title.formatter,f={w:a,seriesIndex:t,dataPointIndex:n,start:o,end:s};typeof d==`function`&&(l=d(l,f)),a.config.series[t].data[n]?.x&&(c=a.config.series[t].data[n].x),e||a.config.xaxis.type===`datetime`&&(c=new A(a).xLabelFormat(a.formatters.ttKeyFormatter,c,c,{i:void 0,dateFormatter:new k(a).formatDate,w:a})),typeof u==`function`&&(c=u(c,f)),Number.isFinite(r)&&Number.isFinite(i)&&(o=r,s=i);let p=``,m=``,h=a.globals.colors[t];if(a.config.tooltip.x.formatter===void 0){if(a.config.xaxis.type===`datetime`){let e=new k(a);p=e.formatDate(e.getDate(o),a.config.tooltip.x.format),m=e.formatDate(e.getDate(s),a.config.tooltip.x.format)}else p=o,m=s}else p=a.config.tooltip.x.formatter(o),m=a.config.tooltip.x.formatter(s);return{start:o,end:s,startVal:p,endVal:m,ylabel:c,color:h,seriesName:l}},re=e=>{let{color:t,seriesName:n,ylabel:r,start:i,end:a,seriesIndex:o,dataPointIndex:s}=e,c=e.w.globals.tooltip.tooltipLabels.getFormatters(o);i=c.yLbFormatter(i),a=c.yLbFormatter(a);let l=c.yLbFormatter(e.w.seriesData.series[o][s]),u=``,d=`<span class="value start-value">
|
|
2
|
-
${i}
|
|
3
|
-
</span> <span class="separator">-</span> <span class="value end-value">
|
|
4
|
-
${a}
|
|
5
|
-
</span>`;return u=e.w.globals.comboCharts?e.w.config.series[o].type===`rangeArea`||e.w.config.series[o].type===`rangeBar`?d:`<span>${l}</span>`:d,`<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: `+t+`">`+(n||``)+`</span></div><div> <span class="category">`+r+`: </span> `+u+` </div></div>`},ie=class e{constructor(e){this.opts=e}static forType(t){let n=new e(t),r=[`line`,`area`,`bar`,`candlestick`,`boxPlot`,`violin`,`rangeBar`,`rangeArea`,`bubble`,`scatter`,`heatmap`,`treemap`,`unit`,`sunburst`,`pie`,`polarArea`,`donut`,`radar`,`radialBar`],i=t.chart.requestedType,a;return a=i===`funnel`||i===`pyramid`?n[i]():i===`gauge`?n.gauge():i===`histogram`?n.histogram():i===`waterfall`?n.waterfall():i===`dumbbell`?n.dumbbell():i===`streamgraph`?n.streamgraph():i===`raincloud`?n.raincloud():r.indexOf(t.chart.type)===-1?n.line():n[t.chart.type](),t.plotOptions?.bar?.isFunnel&&(a=n.funnel()),t.chart.stacked&&t.chart.type===`bar`&&(a=n.stackedBars()),a}static handOverTypeDefaults(t,n,r){let i=t.chart.requestedType||t.chart.type;if(!n||n===i)return;let a=new M().init(),o=O.extend(a,e.forType(ee(n,t))),s=O.extend(a,e.forType(ee(i,t)));for(let e of I){if(r&&L(r,e)!==void 0)continue;let n=L(o,e),i=L(s,e);(n!==void 0||i!==void 0)&&te(L(t,e),n)&&R(t,e,i)}}hideYAxis(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text=``,this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}line(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:`straight`},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}sparkline(e){return this.hideYAxis(),O.extend(e,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}slope(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter(e,t){let n=t.w.config.series[t.seriesIndex].name;return e===null?``:n+`: `+e},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:`top`,labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:`straight`}}}bar(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:`center`}}},dataLabels:{style:{colors:[`#fff`]},background:{enabled:!1}},stroke:{width:0,lineCap:`square`},fill:{opacity:.85},legend:{markers:{shape:`square`}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:`between`,crosshairs:{width:`barWidth`,position:`back`,fill:{type:`gradient`},dropShadow:{enabled:!1},stroke:{width:0}}}}}funnel(){return this.hideYAxis(),h(m({},this.bar()),{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:`around`,borderRadius:0,dataLabels:{position:`center`}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}pyramid(){return this.funnel()}gauge(){return h(m({},this.radialBar()),{plotOptions:{radialBar:{startAngle:-135,endAngle:135,hollow:{margin:0,size:`60%`},track:{background:`#e7e7e7`,strokeWidth:`100%`,margin:5},dataLabels:{name:{show:!1},value:{show:!0,fontSize:`32px`,fontWeight:600,offsetY:8}}}}})}waterfall(){let e=this.rangeBar();return h(m({},e),{chart:{stacked:!1,zoom:{enabled:!1},animations:{animateGradually:{enabled:!0}}},plotOptions:h(m({},e.plotOptions),{bar:h(m({},e.plotOptions.bar),{columnWidth:`60%`,barHeight:`60%`})}),dataLabels:h(m({},e.dataLabels),{enabled:!0,background:{enabled:!0,backgroundColor:`#fff`,foreColor:`#373d3f`,borderColor:`#e3e8ee`,opacity:.92}}),legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!1}})}histogram(){let e=Array.isArray(this.opts?.series)&&this.opts.series.length>1&&this.opts?.plotOptions?.histogram?.overlap!==!1;return h(m({},this.bar()),{chart:{stacked:!1,zoom:{enabled:!1},animations:{animateGradually:{enabled:!1}}},plotOptions:{bar:{columnWidth:`100%`,borderRadius:0,dataLabels:{position:`top`}}},dataLabels:{enabled:!1},fill:e?{opacity:.65}:{},stroke:e?{show:!1}:{show:!0,width:1,colors:[`#fff`]},xaxis:{type:`numeric`,tooltip:{enabled:!1}},tooltip:{shared:e,intersect:!1,x:{formatter:(e,t)=>{let n=t?.w?.histogramData?.edges,r=t?.dataPointIndex;if(!Array.isArray(n)||typeof r!=`number`||r<0)return String(e);let i=n[r],a=n[r+1];if(i===void 0||a===void 0)return String(e);let o=e=>Number.isInteger(e)?String(e):e.toFixed(2);return`${o(i)} to ${o(a)}`}}}})}candlestick(){return{stroke:{width:1},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:F([`candlestick`],({seriesIndex:e,dataPointIndex:t,w:n})=>this._getBoxTooltip(n,e,t,[`Open`,`High`,``,`Low`,`Close`],`candlestick`))},states:{active:{filter:{type:`none`}}},xaxis:{crosshairs:{width:1}}}}boxPlot(){return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:[`#24292e`]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:F([`boxPlot`],({seriesIndex:e,dataPointIndex:t,w:n})=>this._getBoxTooltip(n,e,t,[`Minimum`,`Q1`,`Median`,`Q3`,`Maximum`],`boxPlot`))},markers:{size:7,strokeWidth:1,strokeColors:`#111`},xaxis:{crosshairs:{width:1}}}}violin(){return{chart:{zoom:{enabled:!1},animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:[`#24292e`]},fill:{opacity:.7},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:F([`violin`],({seriesIndex:e,dataPointIndex:t,w:n})=>this._getViolinTooltip(n,e,t))},states:{active:{filter:{type:`none`}}},xaxis:{crosshairs:{width:1}}}}raincloud(){let e=this.violin(),t=this.opts?.plotOptions?.bar?.horizontal===!0;return h(m({},e),{plotOptions:{violin:{side:t?`top`:`right`,box:{show:!0,whiskers:`tukey`},points:{position:t?`bottom`:`left`,jitter:.85}}},tooltip:h(m({},e.tooltip),{custom:F([`raincloud`],({seriesIndex:e,dataPointIndex:t,w:n})=>this._getRaincloudTooltip(n,e,t))})})}rangeBar(){let e=e=>{let{color:t,seriesName:n,ylabel:r,startVal:i,endVal:a}=ne(h(m({},e),{isTimeline:!0}));return re(h(m({},e),{color:t,seriesName:n,ylabel:r,start:i,end:a}))},t=e=>{let{color:t,seriesName:n,ylabel:r,start:i,end:a}=ne(e);return re(h(m({},e),{color:t,seriesName:n,ylabel:r,start:i,end:a}))};return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:`square`},plotOptions:{bar:{borderRadius:0,dataLabels:{position:`center`}}},dataLabels:{enabled:!1,formatter(e,{seriesIndex:t,dataPointIndex:n,w:r}){let i=()=>{let e=r.rangeData.seriesRangeStart[t][n];return r.rangeData.seriesRangeEnd[t][n]-e};return r.globals.comboCharts?r.config.series[t].type===`rangeBar`||r.config.series[t].type===`rangeArea`?i():e:i()},background:{enabled:!1},style:{colors:[`#fff`]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:F([`rangeBar`],n=>n.w.config.plotOptions&&n.w.config.plotOptions.bar&&n.w.config.plotOptions.bar.horizontal?e(n):t(n))},xaxis:{tickPlacement:`between`,tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}dumbbell(){let e=this.rangeBar(),t=(e,t,n)=>`<div class="apexcharts-tooltip-dumbbell-endpoint"><span class="series-name" style="color: `+t+`">`+e+`</span> <span class="value">`+n+`</span></div>`;return h(m({},e),{chart:{stacked:!1,zoom:{enabled:!1}},plotOptions:h(m({},e.plotOptions),{bar:h(m({},e.plotOptions.bar),{barHeight:6,columnWidth:6,dumbbell:{dataLabels:{enabled:!0}}})}),dataLabels:h(m({},e.dataLabels),{enabled:!1}),legend:{show:!0,position:`bottom`,horizontalAlign:`left`,markers:{shape:`circle`}},tooltip:{shared:!1,intersect:!0,followCursor:!1,custom:F([`rangeBar`],e=>{let{w:n,dataPointIndex:r,seriesIndex:i}=e,a=n.dumbbellData;if(!a||a.form!==`series`){let{color:t,seriesName:n,ylabel:r,start:i,end:a}=ne(e);return re(h(m({},e),{color:t,seriesName:n,ylabel:r,start:i,end:a}))}let o=a.values[r]||[],s=n.globals.tooltip.tooltipLabels.getFormatters(i),c=n.labelData.labels[r]??``,l=``,u=[];for(let e=0;e<o.length;e++)o[e]!==null&&a.hidden.indexOf(e)===-1&&(u.push(o[e]),l+=t(a.names[e],n.globals.colors[e],s.yLbFormatter(o[e])));let d=u.length===2?`<div class="apexcharts-tooltip-dumbbell-gap"><span class="category">`+n.config.plotOptions.bar.dumbbell.tooltip.differenceLabel+`: </span><span class="value">`+s.yLbFormatter(Math.abs(u[1]-u[0]))+`</span></div>`:``;return`<div class="apexcharts-tooltip-rangebar apexcharts-tooltip-dumbbell"><div><span class="category">`+c+`</span></div>`+l+d+`</div>`})}})}dumbbellSizing(e){return e.plotOptions.bar?.barHeight||(e.plotOptions.bar.barHeight=2),e.plotOptions.bar?.columnWidth||(e.plotOptions.bar.columnWidth=2),e}area(){return{stroke:{width:4,fill:{type:`solid`,gradient:{inverseColors:!1,shade:`light`,type:`vertical`,opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:`gradient`,gradient:{inverseColors:!1,shade:`light`,type:`vertical`,opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}rangeArea(){let e=e=>{let{color:t,seriesName:n,ylabel:r,start:i,end:a}=ne(e);return re(h(m({},e),{color:t,seriesName:n,ylabel:r,start:i,end:a}))};return{stroke:{curve:`straight`,width:0},fill:{type:`solid`,opacity:.6},markers:{size:0},states:{hover:{filter:{type:`none`}},active:{filter:{type:`none`}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:F([`rangeArea`],t=>e(t))}}}streamgraph(){let e=this.rangeArea(),t=e=>{let{w:t,dataPointIndex:n,seriesIndex:r}=e,i=t.streamgraphData;if(!i||!Array.isArray(i.order)){let{color:t,seriesName:n,ylabel:r,start:i,end:a}=ne(e);return re(h(m({},e),{color:t,seriesName:n,ylabel:r,start:i,end:a}))}let{ylabel:a}=ne(e),o=(()=>{let e=t.streamgraphData,i=t.dom.baseEl&&t.dom.baseEl.querySelector(`.apexcharts-svg`),a=t.interact&&t.interact.clientY,o=t.globals.maxY-t.globals.minY;if(!i||a==null||!o||!isFinite(o))return r;let s=i.getBoundingClientRect(),c=t.globals.svgWidth?s.width/t.globals.svgWidth:1,l=(a-s.top)/(c||1)-t.layout.translateY,u=t.layout.gridHeight,d=e=>{let n=(e-t.globals.minY)/o;return t.config.yaxis[0]?.reversed?n*u:u-n*u},f=r,p=1/0;for(let t=0;t<e.order.length;t++){let r=e.order[t],i=e.lows[r]&&e.lows[r][n],a=e.highs[r]&&e.highs[r][n];if(i==null||a==null)continue;let o=d(a),s=d(i),c=Math.min(o,s),u=Math.max(o,s);if(l>=c&&l<=u)return r;let m=l<c?c-l:l-u;m<p&&(p=m,f=r)}return f})(),s=t.formatters.ttVal!==void 0,c=(e,n)=>{if(s){let r=t.globals.tooltip.tooltipLabels.getFormatters(e);if(typeof r.yLbFormatter==`function`)return r.yLbFormatter(n)}return String(Number.isInteger(n)?n:Number(n.toFixed(6)))},l=``,u=0;for(let e=i.order.length-1;e>=0;e--){let r=i.order[e],a=i.values[r]?.[n];a!=null&&isFinite(a)&&(u+=a,l+=`<div class="apexcharts-tooltip-stream-band`+(r===o?` apexcharts-active`:``)+`"><span class="apexcharts-tooltip-marker" style="background-color: `+t.globals.colors[r]+`"></span><span class="series-name">`+i.names[r]+`</span> <span class="value">`+c(r,a)+`</span></div>`)}let d=i.offset===`expand`?``:`<div class="apexcharts-tooltip-stream-total"><span class="series-name">Total</span> <span class="value">`+c(r,u)+`</span></div>`;return`<div class="apexcharts-tooltip-stream"><div class="apexcharts-tooltip-title">`+a+`</div>`+l+d+`</div>`};return h(m({},e),{chart:{stacked:!1},stroke:{curve:`monotoneCubic`,width:0},fill:{type:`solid`,opacity:1},dataLabels:{enabled:!1},grid:{yaxis:{lines:{show:!1}}},markers:{size:0,hover:{size:0,sizeOffset:0}},tooltip:{intersect:!1,shared:!1,followCursor:!0,custom:F([`streamgraph`],e=>t(e))},legend:{show:!0,position:`top`,horizontalAlign:`center`}})}brush(e){return O.extend(e,{chart:{toolbar:{autoSelected:`selection`,show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}stacked100(e){e.dataLabels=e.dataLabels||{},e.dataLabels.formatter=e.dataLabels.formatter||void 0;let t=e.dataLabels.formatter;return e.yaxis.forEach((t,n)=>{e.yaxis[n].min=0,e.yaxis[n].max=100}),e.chart.type===`bar`&&(e.dataLabels.formatter=t||function(e){return typeof e==`number`?e&&e.toFixed(0)+`%`:e}),e}stackedBars(){let e=this.bar();return h(m({},e),{plotOptions:h(m({},e.plotOptions),{bar:h(m({},e.plotOptions.bar),{borderRadiusApplication:`end`})})})}convertCatToNumeric(e){return e.xaxis.convertedCatToNumeric=!0,e}convertCatToNumericXaxis(e,t){e.xaxis.type=`numeric`,e.xaxis.labels=e.xaxis.labels||{},e.xaxis.labels.formatter=e.xaxis.labels.formatter||function(e){return O.isNumber(e)?Math.floor(e):e};let n=e.xaxis.labels.formatter,r=e.xaxis.categories&&e.xaxis.categories.length?e.xaxis.categories:e.labels;return t&&t.length&&(r=t.map(e=>Array.isArray(e)?e:String(e))),r&&r.length&&(e.xaxis.labels.formatter=function(e){return O.isNumber(e)?n(r[Math.floor(e)-1]):n(e)}),e.xaxis.categories=[],e.labels=[],e.xaxis.tickAmount=e.xaxis.tickAmount||`dataPoints`,e}bubble(){return{dataLabels:{style:{colors:[`#fff`]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:`solid`,gradient:{shade:`light`,inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}scatter(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}heatmap(){return{chart:{stacked:!1,zoom:{enabled:!1}},fill:{opacity:1},dataLabels:{style:{colors:[`#fff`]}},stroke:{colors:[`#fff`]},tooltip:{followCursor:!1,marker:{show:!1},x:{show:!1}},legend:{position:`top`,markers:{shape:`square`}},grid:{padding:{right:20}}}}treemap(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:[`#fff`]}},stroke:{show:!0,width:2,colors:[`#fff`]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1},axisTicks:{show:!1}}}}unit(){return{chart:{toolbar:{show:!1}},dataLabels:{enabled:!1},stroke:{show:!1,width:0},fill:{opacity:1},tooltip:{followCursor:!0,x:{show:!1}},legend:{show:!0,position:`bottom`},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}sunburst(){return{chart:{toolbar:{show:!1}},dataLabels:{style:{colors:[`#fff`]},dropShadow:{enabled:!0}},stroke:{colors:[`#fff`]},fill:{opacity:1},legend:{position:`right`},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}pie(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter(e){return typeof e==`number`?e.toFixed(1)+`%`:e},style:{colors:[`#fff`]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:[`#fff`]},fill:{opacity:1,gradient:{shade:`light`,stops:[0,100]}},tooltip:{theme:`dark`,fillSeriesColor:!0},legend:{position:`right`},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}donut(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter(e){return typeof e==`number`?e.toFixed(1)+`%`:e},style:{colors:[`#fff`]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:[`#fff`]},fill:{opacity:1,gradient:{shade:`light`,shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:`dark`,fillSeriesColor:!0},legend:{position:`right`},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}polarArea(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter(e){return typeof e==`number`?e.toFixed(1)+`%`:e},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:`dark`,fillSeriesColor:!0},legend:{position:`right`},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}radar(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:`11px`}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:e=>e,style:{colors:[`#a8a8a8`],fontSize:`11px`}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}radialBar(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},stroke:{lineCap:`butt`},fill:{gradient:{shade:`dark`,shadeIntensity:.4,inverseColors:!1,type:`diagonal2`,opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:`right`},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}_getBoxTooltip(e,t,n,r,i){let a=e.candleData.seriesCandleO[t][n],o=e.candleData.seriesCandleH[t][n],s=e.candleData.seriesCandleM[t][n],c=e.candleData.seriesCandleL[t][n],l=e.candleData.seriesCandleC[t][n],u=e.config.series[t];return u.type&&u.type!==i?`<div class="apexcharts-custom-tooltip">
|
|
6
|
-
${u.name?u.name:`series-`+(t+1)}: <strong>${e.seriesData.series[t][n]}</strong>
|
|
7
|
-
</div>`:`<div class="apexcharts-tooltip-box apexcharts-tooltip-${e.config.chart.type}"><div>${r[0]}: <span class="value">`+a+`</span></div><div>${r[1]}: <span class="value">`+o+`</span></div>`+(s?`<div>${r[2]}: <span class="value">`+s+`</span></div>`:``)+`<div>${r[3]}: <span class="value">`+c+`</span></div><div>${r[4]}: <span class="value">`+l+`</span></div></div>`}_getViolinTooltip(e,t,n){let r=e.violinData.seriesViolinMin[t]?.[n],i=e.violinData.seriesViolinMax[t]?.[n],a=e.violinData.seriesViolinPoints[t]?.[n]||[],o=e.config.series[t].name||`series-`+(t+1);return`<div class="apexcharts-tooltip-box apexcharts-tooltip-${e.config.chart.type}"><div class="apexcharts-tooltip-violin-name">${o}</div><div>Min: <span class="value">${r}</span></div><div>Max: <span class="value">${i}</span></div><div>Observations: <span class="value">${a.length}</span></div></div>`}_getRaincloudTooltip(e,t,n){let r=e.violinData.seriesViolinSummary[t]?.[n];if(!r)return this._getViolinTooltip(e,t,n);let i=e.violinData.seriesViolinPoints[t]?.[n]||[],a=e.config.series[t].name||`series-`+(t+1),o=e=>{if(!isFinite(e))return String(e);let t=Math.round(e);return Math.abs(e-t)<1e-6?String(t):String(Number(e.toFixed(2)))},[s,c,l,u,d]=r;return`<div class="apexcharts-tooltip-box apexcharts-tooltip-${e.config.chart.type}"><div class="apexcharts-tooltip-violin-name">${a}</div><div>Whisker high: <span class="value">${o(d)}</span></div><div>Q3: <span class="value">${o(u)}</span></div><div>Median: <span class="value">${o(l)}</span></div><div>Q1: <span class="value">${o(c)}</span></div><div>Whisker low: <span class="value">${o(s)}</span></div><div>Observations: <span class="value">${i.length}</span></div></div>`}},z=class{constructor(e){this.opts=e}init({responsiveOverride:e}){let t=this.opts,n=new M,r=new ie(t);t=this.normalizeAliasedChartType(t),this.chartType=t.chart.type,t=this.extendYAxis(t),t=this.extendAnnotations(t);let i=n.init(),a={};if(t&&typeof t==`object`){let n=ie.forType(t);t.chart.brush?.enabled&&(n=r.brush(n)),t.plotOptions?.line?.isSlopeChart&&(n=r.slope()),t.chart.stacked&&t.chart.stackType===`100%`&&(t=r.stacked100(t)),t.plotOptions?.bar?.isDumbbell&&t.chart.requestedType!==`dumbbell`&&(t=r.dumbbellSizing(t)),this.checkForDarkTheme(v.getApex()),this.checkForDarkTheme(t),t.xaxis=t.xaxis||v.getApex().xaxis||{},e||(t.xaxis.convertedCatToNumeric=!1),t=this.checkForCatToNumericXAxis(this.chartType,n,t),(t.chart.sparkline?.enabled||v.getApex().chart?.sparkline?.enabled)&&(n=r.sparkline(n)),a=O.extend(i,n)}let o=O.extend(a,v.getApex());return i=O.extend(o,t),i=this.handleUserInputErrors(i),i}normalizeAliasedChartType(e){if(!e||!e.chart)return e;let t=e.chart.type;return!t||!N[t]?e:(e.chart.requestedType=t,t===`waffle`?(e.plotOptions=e.plotOptions||{},e.plotOptions.unit=e.plotOptions.unit||{},e.plotOptions.unit.layout??(e.plotOptions.unit.layout=`grid`),e.plotOptions.unit.shape??(e.plotOptions.unit.shape=`square`),e.chart.type=`unit`):t===`funnel`||t===`pyramid`?(e.plotOptions=e.plotOptions||{},e.plotOptions.bar=e.plotOptions.bar||{},e.plotOptions.bar.isFunnel=!0,e.plotOptions.bar.horizontal=!0,e.chart.type=`bar`,t===`pyramid`?e.plotOptions.bar.isPyramid=!0:e.plotOptions.bar.isPyramid=!1):t===`gauge`?e.chart.type=`radialBar`:t===`waterfall`?(e.chart.stacked=!1,e.chart.type=`rangeBar`):t===`dumbbell`?(e.plotOptions=e.plotOptions||{},e.plotOptions.bar=e.plotOptions.bar||{},e.plotOptions.bar.isDumbbell=!0,e.plotOptions.bar.horizontal??(e.plotOptions.bar.horizontal=!0),e.chart.stacked=!1,e.chart.type=`rangeBar`):t===`streamgraph`?(e.chart.stacked=!1,e.yaxis=e.yaxis||{},!Array.isArray(e.yaxis)&&e.yaxis.show==null&&(e.yaxis.show=!1),e.chart.type=`rangeArea`):t===`histogram`?(e.xaxis=e.xaxis||{},e.xaxis.type??(e.xaxis.type=`numeric`),e.chart.type=`bar`):t===`raincloud`&&(e.chart.type=`violin`),e)}checkForCatToNumericXAxis(e,t,n){let r=new ie(n),i=(e===`bar`||e===`boxPlot`||e===`violin`)&&n.plotOptions?.bar?.horizontal,a=e===`pie`||e===`polarArea`||e===`donut`||e===`radar`||e===`radialBar`||e===`heatmap`||e===`unit`||e===`sunburst`,o=n.xaxis.type!==`datetime`&&n.xaxis.type!==`numeric`,s=(e===`scatter`||e===`bubble`)&&n.plotOptions?.scatter?.jitter?.enabled,c=n.xaxis.tickPlacement?n.xaxis.tickPlacement:t.xaxis&&t.xaxis.tickPlacement;return!i&&!a&&!s&&o&&c!==`between`&&(n=r.convertCatToNumeric(n)),n}extendYAxis(e,t){let n=new M;(e.yaxis===void 0||!e.yaxis||Array.isArray(e.yaxis)&&e.yaxis.length===0)&&(e.yaxis={});let r=v.getApex();e.yaxis.constructor!==Array&&r.yaxis&&r.yaxis.constructor!==Array&&(e.yaxis=O.extend(e.yaxis,r.yaxis)),e.yaxis=e.yaxis.constructor===Array?O.extendArray(e.yaxis,n.yAxis):[O.extend(n.yAxis,e.yaxis)];let i=!1;e.yaxis.forEach(e=>{e.logarithmic&&(i=!0)});let a=e.series;return t&&!a&&(a=t.config.series),i&&a.length!==e.yaxis.length&&a.length&&(e.yaxis=a.map((t,r)=>{if(t.name||(a[r].name=`series-${r+1}`),e.yaxis[r])return e.yaxis[r].seriesName=a[r].name,e.yaxis[r];{let t=O.extend(n.yAxis,e.yaxis[0]);return t.show=!1,t}})),i&&a.length>1&&a.length!==e.yaxis.length&&console.warn(`A multi-series logarithmic chart should have equal number of series and y-axes`),e}extendAnnotations(e){return e.annotations===void 0&&(e.annotations={},e.annotations.yaxis=[],e.annotations.xaxis=[],e.annotations.points=[]),e=this.extendYAxisAnnotations(e),e=this.extendXAxisAnnotations(e),e=this.extendPointAnnotations(e),e}extendYAxisAnnotations(e){let t=new M;return e.annotations.yaxis=O.extendArray(e.annotations.yaxis===void 0?[]:e.annotations.yaxis,t.yAxisAnnotation),e}extendXAxisAnnotations(e){let t=new M;return e.annotations.xaxis=O.extendArray(e.annotations.xaxis===void 0?[]:e.annotations.xaxis,t.xAxisAnnotation),e}extendPointAnnotations(e){let t=new M;return e.annotations.points=O.extendArray(e.annotations.points===void 0?[]:e.annotations.points,t.pointAnnotation),e}checkForDarkTheme(e){e.theme&&e.theme.mode===`dark`&&(e.tooltip||={},e.tooltip.theme!==`light`&&(e.tooltip.theme=`dark`),e.chart.foreColor||(e.chart.foreColor=`#f6f7f8`),e.theme.palette||(e.theme.palette=`palette4`))}handleUserInputErrors(e){let t=e;if(t.tooltip.shared&&t.tooltip.intersect)throw Error(`tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.`);if(t.chart.type===`bar`&&t.plotOptions.bar.horizontal){if(t.yaxis.length>1)throw Error(`Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false`);t.yaxis[0].reversed&&(t.yaxis[0].opposite=!0),t.xaxis.tooltip.enabled=!1,t.yaxis[0].tooltip.enabled=!1,t.chart.zoom.enabled=!1}return(t.chart.type===`bar`||t.chart.type===`rangeBar`)&&t.tooltip.shared&&t.xaxis.crosshairs.width===`barWidth`&&t.series.length>1&&(t.xaxis.crosshairs.width=`tickWidth`),(t.chart.type===`candlestick`||t.chart.type===`boxPlot`)&&t.yaxis[0].reversed&&(console.warn(`Reversed y-axis in ${t.chart.type} chart is not supported.`),t.yaxis[0].reversed=!1),t}},ae=1.618,oe=[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],se=[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],ce=class{initGlobalVars(e){e.series=[],e.seriesCandleO=[],e.seriesCandleH=[],e.seriesCandleM=[],e.seriesCandleL=[],e.seriesCandleC=[],e.seriesRangeStart=[],e.seriesRangeEnd=[],e.seriesRange=[],e.seriesPercent=[],e.seriesGoals=[],e.seriesX=[],e.seriesZ=[],e.seriesNames=[],e.seriesTotals=[],e.seriesLog=[],e.seriesColors=[],e.stackedSeriesTotals=[],e.seriesXvalues=[],e.seriesYvalues=[],e.dataWasParsed=!1,e.originalSeries=null,e.maxValsInArrayIndex=0,e.yValueDecimal=0,e.allSeriesHasEqualX=!0,e.hasNullValues=!1,e.invalidLogScale=!1,e.seriesRangeName={},e.labels=[],e.hasXaxisGroups=!1,e.groups=[],e.barGroups=[],e.lineGroups=[],e.areaGroups=[],e.hasSeriesGroups=!1,e.seriesGroups=[],e.categoryLabels=[],e.timescaleLabels=[],e.noLabelsProvided=!1,e.isXNumeric=!1,e.skipLastTimelinelabel=!1,e.skipFirstTimelinelabel=!1,e.isDataXYZ=!1,e.isMultiLineX=!1,e.isMultipleYAxis=!1,e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE,e.minYArr=[],e.maxYArr=[],e.maxX=-Number.MAX_VALUE,e.minX=Number.MAX_VALUE,e.initialMaxX=-Number.MAX_VALUE,e.initialMinX=Number.MAX_VALUE,e.maxDate=0,e.minDate=Number.MAX_VALUE,e.minZ=Number.MAX_VALUE,e.maxZ=-Number.MAX_VALUE,e.minXDiff=Number.MAX_VALUE,e.yAxisScale=[],e.xAxisScale=null,e.xAxisTicksPositions=[],e.xRange=0,e.yRange=[],e.zRange=0,e.dataPoints=0,e.xTickAmount=0,e.multiAxisTickAmount=0,e.disableZoomIn=!1,e.disableZoomOut=!1,e.yLabelsCoords=[],e.yTitleCoords=[],e.barPadForNumericAxis=0,e.padHorizontal=0,e.rotateXLabels=!1,e.overlappingXLabels=!1,e.radialSize=0,e.barHeight=0,e.barWidth=0,e.animationEnded=!1,e.isDestroyed=!1,e.bulkRevealScheduled=!1,e.resizeTimer=null,e.selectionResizeTimer=null,e.delayedElements=[],e.pointsArray=[],e.barCanvasCoords=null,e.activeRenderer=null,e.dataLabelsRects=[],e.lastDrawnDataLabelsIndexes=[],e.textRectsCache=new Map,e.domCache=new Map,e.dimensionCache={},e.cachedSelectors={},e.seriesNS||this._attachNamespaces(e)}_attachNamespaces(e){let t=(t,n,r=n)=>{Object.defineProperty(t,r,{get(){return e[n]},set(t){e[n]=t},enumerable:!0,configurable:!0})},n={};t(n,`series`,`data`);for(let e of`seriesNames.seriesX.seriesZ.seriesXvalues.seriesYvalues.seriesGoals.seriesLog.seriesColors.seriesPercent.seriesTotals.stackedSeriesTotals.seriesCandleO.seriesCandleH.seriesCandleM.seriesCandleL.seriesCandleC.seriesRangeStart.seriesRangeEnd.seriesRange.seriesYAxisMap.seriesYAxisReverseMap.seriesGroups.barGroups.lineGroups.areaGroups.originalSeries.collapsedSeries.collapsedSeriesIndices.ancillaryCollapsedSeries.ancillaryCollapsedSeriesIndices.collapsingSeriesIndices.allSeriesCollapsed.risingSeries.previousPaths.ignoreYAxisIndexes.labels.categoryLabels.timescaleLabels.groups`.split(`.`))t(n,e);Object.defineProperty(e,"seriesNS",{value:n,writable:!1,enumerable:!1,configurable:!0});let r={};for(let e of`minX.maxX.initialMinX.initialMaxX.minY.maxY.minYArr.maxYArr.minZ.maxZ.minDate.maxDate.minXDiff.xRange.yRange.zRange.xAxisScale.yAxisScale.xAxisTicksPositions.xTickAmount.multiAxisTickAmount.dataPoints.maxValsInArrayIndex.isXNumeric.isMultipleYAxis.isMultiLineX.isDataXYZ.dataFormatXNumeric.allSeriesHasEqualX.hasNullValues.dataWasParsed.hasXaxisGroups.hasSeriesGroups.skipFirstTimelinelabel.skipLastTimelinelabel.yValueDecimal.invalidLogScale.noLabelsProvided`.split(`.`))t(r,e);Object.defineProperty(e,"axes",{value:r,writable:!1,enumerable:!1,configurable:!0});let i={};for(let e of[`svgWidth`,`svgHeight`,`gridWidth`,`gridHeight`,`translateX`,`translateY`,`translateXAxisX`,`translateXAxisY`,`translateYAxisX`,`xAxisLabelsHeight`,`xAxisGroupLabelsHeight`,`xAxisLabelsWidth`,`yAxisLabelsWidth`,`yAxisWidths`,`yLabelsCoords`,`yTitleCoords`,`padHorizontal`,`barPadForNumericAxis`,`rotateXLabels`,`scaleX`,`scaleY`,`radialSize`,`defaultLabels`,`overlappingXLabels`])t(i,e);Object.defineProperty(e,"layout",{value:i,writable:!1,enumerable:!1,configurable:!0});let a={};for(let e of[`domCache`,`dimensionCache`,`cachedSelectors`,`textRectsCache`,`pointsArray`,`dataLabelsRects`,`lastDrawnDataLabelsIndexes`,`delayedElements`,`resizeTimer`,`selectionResizeTimer`,`resizeObserver`])t(a,e);Object.defineProperty(e,"cache",{value:a,writable:!1,enumerable:!1,configurable:!0})}globalVars(e){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],fill:{colors:[]},radialNeedleRAF:null,unitGatherRAF:null,unitExitRAF:null,stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:e.markers.size,largestSize:0,batched:!1},LINE_HEIGHT_RATIO:ae,axisCharts:!0,isSlopeChart:e.plotOptions.line.isSlopeChart,comboCharts:!1,initialConfig:null,initialSeries:[],tokenSurface:void 0,lastXAxis:[],lastYAxis:[],allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],collapsingSeriesIndices:[],risingSeries:[],ignoreYAxisIndexes:[],isDirty:!1,isExecCalled:!1,dataChanged:!1,resized:!1,columnSeries:null,yaxis:null,total:0,shouldAnimate:!0,previousPaths:[],prevPolarAngles:null,prevStreamFrame:null,streamScrolled:!1,prevChromeFrame:null,svgWidth:0,svgHeight:0,lastResizeSignature:null,defaultLabels:!1,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateYAxisX:[],yAxisWidths:[],tooltip:null,resizeObserver:null,locale:{},memory:{methodsToExec:[]},niceScaleAllowedMagMsd:oe,niceScaleDefaultTicks:se,seriesYAxisMap:[],seriesYAxisReverseMap:[],noData:!1}}defineLazyInitialSeries(e){let t=[],n=null;Object.defineProperty(e,"initialSeries",{configurable:!0,enumerable:!0,get(){return n===null&&(n=O.clone(t)),n},set(r){t=Array.isArray(r)?r.map(e=>e&&typeof e==`object`&&!Array.isArray(e)?m({},e):e):r,n=null,e._initialSeriesPeek=t}}),e._initialSeriesPeek=t}init(e){let t=this.globalVars(e);return this.initGlobalVars(t),this.defineLazyInitialSeries(t),t.initialConfig=O.extend({},e),t.initialSeries=e.series,t.lastXAxis=O.clone(t.initialConfig.xaxis),t.lastYAxis=O.clone(t.initialConfig.yaxis),t}},le=class{constructor(e){this.opts=e}init(){let e=new z(this.opts).init({responsiveOverride:!1}),t=new ce().init(e),n={config:e,globals:t,dom:{},interact:{zoomEnabled:e.chart.toolbar.autoSelected===`zoom`&&e.chart.toolbar.tools.zoom&&e.chart.zoom.enabled,panEnabled:e.chart.toolbar.autoSelected===`pan`&&e.chart.toolbar.tools.pan,selectionEnabled:e.chart.toolbar.autoSelected===`selection`&&e.chart.toolbar.tools.selection,measureEnabled:e.chart.toolbar.autoSelected===`measure`&&!!e.chart.toolbar.tools.measure&&!!(e.chart.measure&&e.chart.measure.enabled),zoomed:!1,selection:void 0,visibleXRange:void 0,selectedDataPoints:[],mousedown:!1,clientX:null,clientY:null,lastClientPosition:{},capturedSeriesIndex:-1,capturedDataPointIndex:-1,disableZoomIn:!1,disableZoomOut:!1,isTouchDevice:v.isBrowser()?`ontouchstart`in window||navigator.maxTouchPoints>0:!1},formatters:{xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,legendFormatter:void 0},candleData:{seriesCandleO:[],seriesCandleH:[],seriesCandleM:[],seriesCandleL:[],seriesCandleC:[],seriesBoxPoints:[]},rangeData:{seriesRangeStart:[],seriesRangeEnd:[],seriesRange:[]},violinData:{seriesViolinDensity:[],seriesViolinPoints:[],seriesViolinSummary:[],seriesViolinMin:[],seriesViolinMax:[]},histogramData:{edges:[],binWidth:0,counts:[],rule:``,capped:!1},waterfallData:{values:[],cumulative:[],kinds:[],geometry:null},dumbbellData:null,streamgraphData:null,labelData:{labels:[],categoryLabels:[],timescaleLabels:[],hasXaxisGroups:!1,groups:[],seriesGroups:[]},axisFlags:{isXNumeric:!1,dataFormatXNumeric:!1,isDataXYZ:!1,isRangeData:!1,isRangeBar:!1,isMultiLineX:!1,noLabelsProvided:!1,dataWasParsed:!1},seriesData:{series:[],seriesNames:[],seriesX:[],seriesZ:[],seriesColors:[],seriesGoals:[],stackedSeriesTotals:[],stackedSeriesTotalsByGroups:[],unitData:[]},layout:{gridHeight:0,gridWidth:0,translateX:0,translateY:0,translateXAxisX:0,translateXAxisY:0,rotateXLabels:!1,xAxisHeight:0,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yLabelsCoords:[],yTitleCoords:[],gridPad:{top:0,right:0,bottom:0,left:0}}};Object.defineProperty(t,"dom",{get(){return n.dom},set(e){n.dom=e},enumerable:!1,configurable:!0});for(let e of[`xLabelFormatter`,`yLabelFormatters`,`xaxisTooltipFormatter`,`ttKeyFormatter`,`ttVal`,`ttZFormatter`,`legendFormatter`])Object.defineProperty(t,e,{get(){return n.formatters[e]},set(t){n.formatters[e]=t},enumerable:!1,configurable:!0});for(let e of[`zoomEnabled`,`panEnabled`,`selectionEnabled`,`zoomed`,`selection`,`visibleXRange`,`selectedDataPoints`,`mousedown`,`clientX`,`clientY`,`lastClientPosition`,`capturedSeriesIndex`,`capturedDataPointIndex`,`disableZoomIn`,`disableZoomOut`,`isTouchDevice`])Object.defineProperty(t,e,{get(){return n.interact[e]},set(t){n.interact[e]=t},enumerable:!1,configurable:!0});for(let e of[`gridHeight`,`gridWidth`,`translateX`,`translateY`,`translateXAxisX`,`translateXAxisY`,`rotateXLabels`,`xAxisHeight`,`xAxisLabelsHeight`,`xAxisGroupLabelsHeight`,`xAxisLabelsWidth`,`yLabelsCoords`,`yTitleCoords`,`gridPad`])Object.defineProperty(t,e,{get(){return n.layout[e]},set(t){n.layout[e]=t},enumerable:!1,configurable:!0});for(let e of[`series`,`seriesNames`,`seriesX`,`seriesZ`,`seriesColors`,`seriesGoals`,`stackedSeriesTotals`,`stackedSeriesTotalsByGroups`])Object.defineProperty(t,e,{get(){return n.seriesData[e]},set(t){n.seriesData[e]=t},enumerable:!1,configurable:!0});for(let e of[`isXNumeric`,`dataFormatXNumeric`,`isDataXYZ`,`isRangeData`,`isRangeBar`,`isMultiLineX`,`noLabelsProvided`,`dataWasParsed`])Object.defineProperty(t,e,{get(){return n.axisFlags[e]},set(t){n.axisFlags[e]=t},enumerable:!1,configurable:!0});for(let e of[`labels`,`categoryLabels`,`timescaleLabels`,`hasXaxisGroups`,`groups`,`seriesGroups`])Object.defineProperty(t,e,{get(){return n.labelData[e]},set(t){n.labelData[e]=t},enumerable:!1,configurable:!0});for(let e of[`seriesRangeStart`,`seriesRangeEnd`,`seriesRange`])Object.defineProperty(t,e,{get(){return n.rangeData[e]},set(t){n.rangeData[e]=t},enumerable:!1,configurable:!0});for(let e of[`seriesCandleO`,`seriesCandleH`,`seriesCandleM`,`seriesCandleL`,`seriesCandleC`])Object.defineProperty(t,e,{get(){return n.candleData[e]},set(t){n.candleData[e]=t},enumerable:!1,configurable:!0});for(let e of[`seriesViolinDensity`,`seriesViolinPoints`,`seriesViolinMin`,`seriesViolinMax`])Object.defineProperty(t,e,{get(){return n.violinData[e]},set(t){n.violinData[e]=t},enumerable:!1,configurable:!0});return n}},ue=class{constructor(e){this.w=e}static checkComboSeries(e,t){let n=!1,r=0,i=0;return t===void 0&&(t=`line`),e.length&&e[0].type!==void 0&&e.forEach(e=>{(e.type===`bar`||e.type===`column`||e.type===`candlestick`||e.type===`boxPlot`||e.type===`violin`)&&r++,e.type!==void 0&&e.type!==t&&i++}),i>0&&(n=!0),{comboBarCount:r,comboCharts:n}}getStackedSeriesTotals(e=[]){let t=this.w,n=[];if(t.seriesData.series.length===0)return n;for(let r=0;r<t.seriesData.series[t.globals.maxValsInArrayIndex].length;r++){let i=0;for(let n=0;n<t.seriesData.series.length;n++)t.seriesData.series[n][r]!==void 0&&e.indexOf(n)===-1&&(i+=t.seriesData.series[n][r]);n.push(i)}return n}getSeriesTotalByIndex(e=null){if(e===null)return this.w.config.series.reduce((e,t)=>e+t,0);{let t=this.w.seriesData.series[e];return Array.isArray(t)?t.reduce((e,t)=>e+t,0):t??0}}getStackedSeriesTotalsByGroups(){let e=this.w,t=[];return e.labelData.seriesGroups.forEach(n=>{let r=[];e.config.series.forEach((t,i)=>{n.indexOf(e.seriesData.seriesNames[i])>-1&&r.push(i)});let i=e.seriesData.series.map((e,t)=>r.indexOf(t)===-1?t:-1).filter(e=>e!==-1);t.push(this.getStackedSeriesTotals(i))}),t}setSeriesYAxisMappings(){let e=this.w.globals,t=this.w.config,n=[],r=[],i=[],a=this.w.seriesData.series.length>t.yaxis.length||t.yaxis.some(e=>Array.isArray(e.seriesName));t.series.forEach((e,t)=>{i.push(t),r.push(null)}),t.yaxis.forEach((e,t)=>{n[t]=[]});let o=[];t.yaxis.forEach((e,r)=>{let s=!1;if(e.seriesName){let o=[];Array.isArray(e.seriesName)?o=e.seriesName:o.push(e.seriesName),o.forEach(e=>{t.series.forEach((t,o)=>{if(t.name===e){let e=o;r===o||a?!a||i.indexOf(o)>-1?n[r].push([r,o]):console.warn(`Series '`+t.name+`' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes.`):(n[o].push([o,r]),e=r),s=!0,e=i.indexOf(e),e!==-1&&i.splice(e,1)}})})}s||o.push(r)}),n=n.map(e=>{let t=[];return e.forEach(e=>{r[e[1]]=e[0],t.push(e[1])}),t});let s=t.yaxis.length-1;for(let e=0;e<o.length&&(s=o[e],n[s]=[],i);e++){let e=i[0];i.shift(),n[s].push(e),r[e]=s}i.forEach(e=>{n[s].push(e),r[e]=s}),e.seriesYAxisMap=n.map(e=>e),e.seriesYAxisReverseMap=r.map(e=>e),e.seriesYAxisMap.forEach((e,n)=>{e.forEach(e=>{if(t.series[e]&&t.series[e].group===void 0){let r=t.series[e];r.group=`apexcharts-axis-${n.toString()}`}})})}isSeriesNull(e=null){let t=[],n=this.w.config.series;return t=e===null?n.filter(e=>e!==null):n[e]&&Array.isArray(n[e].data)?n[e].data.filter(e=>e!==null):n[e]!==null&&n[e]!==void 0?[n[e]]:[],t.length===0}seriesHaveSameValues(e){let t=this.w.seriesData.series[e];return!Array.isArray(t)||t.every((e,t,n)=>e===n[0])}getCategoryLabels(e){let t=this.w,n=e.slice();return t.config.xaxis.convertedCatToNumeric&&(n=e.map(e=>t.config.xaxis.labels.formatter(e-t.globals.minX+1))),n}getLargestSeries(){let e=this.w;e.globals.maxValsInArrayIndex=e.seriesData.series.map(e=>e.length).indexOf(Math.max.apply(Math,e.seriesData.series.map(e=>e.length)))}getLargestMarkerSize(){let e=this.w,t=0;return e.globals.markers.size.forEach(e=>{t=Math.max(t,e)}),e.config.markers.discrete&&e.config.markers.discrete.length&&e.config.markers.discrete.forEach(e=>{t=Math.max(t,e.size)}),t>0&&(e.config.markers.hover.size>0?t=e.config.markers.hover.size:t+=e.config.markers.hover.sizeOffset),e.globals.markers.largestSize=t,t}getSeriesTotals(){let e=this.w;e.globals.seriesTotals=e.seriesData.series.map(e=>{let t=0;if(Array.isArray(e))for(let n=0;n<e.length;n++)t+=e[n];else t+=e;return t})}getSeriesTotalsXRange(e,t){let n=this.w;return n.seriesData.series.map((r,i)=>{let a=0;for(let o=0;o<r.length;o++)n.seriesData.seriesX[i][o]>e&&n.seriesData.seriesX[i][o]<t&&(a+=r[o]);return a})}getPercentSeries(){let e=this.w;e.globals.seriesPercent=e.seriesData.series.map(t=>{let n=[];if(Array.isArray(t))for(let r=0;r<t.length;r++){let i=e.seriesData.stackedSeriesTotals[r],a=0;i&&(a=100*t[r]/i),n.push(a)}else{let r=e.globals.seriesTotals.reduce((e,t)=>e+t,0),i=100*t/r;n.push(i)}return n})}getCalculatedRatios(){let e=this.w,t=e.globals,n=[],r=0,i=0,a=0,o=0,s=[],c=.1,l=0;if(t.yRange=[],t.isMultipleYAxis)for(let e=0;e<t.minYArr.length;e++)t.yRange.push(Math.abs(t.minYArr[e]-t.maxYArr[e])),s.push(0);else t.yRange.push(Math.abs(t.minY-t.maxY));t.xRange=Math.abs(t.maxX-t.minX),t.zRange=Math.abs(t.maxZ-t.minZ);for(let e=0;e<t.yRange.length;e++)n.push(t.yRange[e]/this.w.layout.gridHeight);if(i=t.xRange/this.w.layout.gridWidth,r=t.yRange/this.w.layout.gridWidth,a=t.xRange/this.w.layout.gridHeight,o=t.zRange/this.w.layout.gridHeight*16,o||=1,t.minY!==Number.MIN_VALUE&&Math.abs(t.minY)!==0){let e=t;e.hasNegs=!0}if(e.globals.seriesYAxisReverseMap.length>0){let a=(t,r)=>{let i=e.config.yaxis[e.globals.seriesYAxisReverseMap[r]];if(!i||i.logarithmic)return 0;let a=t<0?-1:1;return t=Math.abs(t),-a*t/n[r]};if(t.isMultipleYAxis){s=[];for(let e=0;e<n.length;e++)s.push(a(t.minYArr[e],e))}else s=[],s.push(a(t.minY,0)),t.minY!==Number.MIN_VALUE&&Math.abs(t.minY)!==0&&(c=-t.minY/r,l=t.minX/i)}else s=[],s.push(0),c=0,l=0;return{yRatio:n,invertedYRatio:r,zRatio:o,xRatio:i,invertedXRatio:a,baseLineInvertedY:c,baseLineY:s,baseLineX:l}}getLogSeries(e){let t=this.w;return t.globals.seriesLog=e.map((e,n)=>{let r=t.globals.seriesYAxisReverseMap[n];return t.config.yaxis[r]&&t.config.yaxis[r].logarithmic?e.map(e=>e===null?null:this.getLogVal(t.config.yaxis[r].logBase,e,n)):e}),t.globals.invalidLogScale?e:t.globals.seriesLog}getLogValAtSeriesIndex(e,t){if(e===null)return null;let n=this.w,r=n.globals.seriesYAxisReverseMap[t];return n.config.yaxis[r]&&n.config.yaxis[r].logarithmic?this.getLogVal(n.config.yaxis[r].logBase,e,t):e}getBaseLog(e,t){return Math.log(t)/Math.log(e)}getLogVal(e,t,n){if(t<=0)return 0;let r=this.w,i=r.globals.minYArr[n]===0?-1:this.getBaseLog(e,r.globals.minYArr[n]),a=(r.globals.maxYArr[n]===0?0:this.getBaseLog(e,r.globals.maxYArr[n]))-i;return(this.getBaseLog(e,t)-i)/a}getLogYRatios(e){let t=this.w,n=this.w.globals,r=n;return r.yLogRatio=e.slice(),r.logYRange=n.yRange.map((e,i)=>{let a=t.globals.seriesYAxisReverseMap[i];return t.config.yaxis[a]&&this.w.config.yaxis[a].logarithmic?(r.yLogRatio[i]=1/this.w.layout.gridHeight,1):n.yRange[i]}),r.invalidLogScale?e.slice():r.yLogRatio}static extendArrayProps(e,t,n){return t?.yaxis&&(t=e.extendYAxis(t,n)),t?.annotations&&(t.annotations.yaxis&&(t=e.extendYAxisAnnotations(t)),t?.annotations?.xaxis&&(t=e.extendXAxisAnnotations(t)),t?.annotations?.points&&(t=e.extendPointAnnotations(t))),t}drawSeriesByGroup(e,t,n,r){let i=this.w,a=[];return e.series.length>0&&t.forEach(t=>{let o=[],s=[];e.i.forEach((n,r)=>{i.config.series[n].group===t&&(o.push(e.series[r]),s.push(n))}),o.length>0&&a.push(r.draw(o,n,s))}),a}},B=`http://www.w3.org/2000/svg`,de=class e{constructor(e,t){typeof e==`object`?(this.x=e.x,this.y=e.y):(this.x=e||0,this.y=t||0)}transform(e){return e.apply(this)}clone(){return new e(this.x,this.y)}},fe=class e{constructor(e,t,n,r,i,a){this.a=e??1,this.b=t??0,this.c=n??0,this.d=r??1,this.e=i??0,this.f=a??0}rotate(t){let n=t*Math.PI/180,r=Math.cos(n),i=Math.sin(n);return this.multiply(new e(r,i,-i,r,0,0))}scale(t,n){return this.multiply(new e(t,0,0,n??t,0,0))}multiply(t){return new e(this.a*t.a+this.c*t.b,this.b*t.a+this.d*t.b,this.a*t.c+this.c*t.d,this.b*t.c+this.d*t.d,this.a*t.e+this.c*t.f+this.e,this.b*t.e+this.d*t.f+this.f)}apply(e){return new de(this.a*e.x+this.c*e.y+this.e,this.b*e.x+this.d*e.y+this.f)}},pe=class{constructor(e,t,n,r){this.x=e,this.y=t,this.w=n,this.h=r,this.width=n,this.height=r,this.x2=e+n,this.y2=t+r}};function me(e){if(!e||typeof e!=`string`)return[[`M`,0,0]];let t=[],n=/([MmLlHhVvCcSsQqTtAaZz])\s*/g,r=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi,i,a=[],o=[];for(;(i=n.exec(e))!==null;)a.push(i[1]),o.push(i.index);for(let n=0;n<a.length;n++){let i=o[n]+a[n].length,s=n+1<o.length?o[n+1]:e.length,c=e.substring(i,s),l=[],u;for(r.lastIndex=0;(u=r.exec(c))!==null;)l.push(parseFloat(u[0]));let d=a[n].toUpperCase();if(d===`Z`)t.push([`Z`]);else if(d===`M`||d===`L`||d===`T`)for(let e=0;e<l.length;e+=2)t.push([d,l[e],l[e+1]]);else if(d===`H`)for(let e=0;e<l.length;e++)t.push([d,l[e]]);else if(d===`V`)for(let e=0;e<l.length;e++)t.push([d,l[e]]);else if(d===`C`)for(let e=0;e<l.length;e+=6)t.push([d,l[e],l[e+1],l[e+2],l[e+3],l[e+4],l[e+5]]);else if(d===`S`||d===`Q`)for(let e=0;e<l.length;e+=4)t.push([d,l[e],l[e+1],l[e+2],l[e+3]]);else if(d===`A`)for(let e=0;e<l.length;e+=7)t.push([d,l[e],l[e+1],l[e+2],l[e+3],l[e+4],l[e+5],l[e+6]])}return t.length===0&&t.push([`M`,0,0]),t}function he(e){let t=1/0,n=1/0,r=-1/0,i=-1/0;return e.forEach(e=>{for(let a=1;a<e.length;a+=2)if(a+1<=e.length){let o=e[a],s=e[a+1];typeof o==`number`&&typeof s==`number`&&(o<t&&(t=o),o>r&&(r=o),s<n&&(n=s),s>i&&(i=s))}}),t===1/0?{x:0,y:0,width:0,height:0}:{x:t,y:n,width:r-t,height:i-n}}function ge(e){return e.map(e=>e.join(` `)).join(` `)}function _e(e){switch(e[0]){case`z`:case`Z`:e[0]=`L`,e[1]=this.start[0],e[2]=this.start[1];break;case`H`:e[0]=`L`,e[2]=this.pos[1];break;case`V`:e[0]=`L`,e[2]=e[1],e[1]=this.pos[0];break;case`T`:e[0]=`Q`,e[3]=e[1],e[4]=e[2],e[1]=this.reflection[1],e[2]=this.reflection[0];break;case`S`:e[0]=`C`,e[6]=e[4],e[5]=e[3],e[4]=e[2],e[3]=e[1],e[2]=this.reflection[1],e[1]=this.reflection[0]}return e}function ve(e){var t=e.length;return this.pos=[e[t-2],e[t-1]],`SCQT`.indexOf(e[0])!=-1&&(this.reflection=[2*this.pos[0]-e[t-4],2*this.pos[1]-e[t-3]]),e}function ye(e){var t=[e];switch(e[0]){case`M`:return this.pos=this.start=[e[1],e[2]],t;case`L`:e[5]=e[3]=e[1],e[6]=e[4]=e[2],e[1]=this.pos[0],e[2]=this.pos[1];break;case`Q`:e[6]=e[4],e[5]=e[3],e[4]=e[4]*1/3+e[2]*2/3,e[3]=e[3]*1/3+e[1]*2/3,e[2]=this.pos[1]*1/3+e[2]*2/3,e[1]=this.pos[0]*1/3+e[1]*2/3;break;case`A`:t=xe(this.pos??[],e),e=t[0]}return e[0]=`C`,this.pos=[e[5],e[6]],this.reflection=[2*e[5]-e[3],2*e[6]-e[4]],t}function be(e,t){if(t===!1)return!1;for(var n=t,r=e.length;n<r;++n)if(e[n][0]==`M`)return n;return!1}function xe(e,t){var n=Math.abs(t[1]),r=Math.abs(t[2]),i=t[3]%360,a=t[4],o=t[5],s=t[6],c=t[7],l=new de(e[0],e[1]),u=new de(s,c),d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N=[],P,F,I,L;if(n===0||r===0||l.x===u.x&&l.y===u.y)return[[`C`,l.x,l.y,u.x,u.y,u.x,u.y]];for(d=new de((l.x-u.x)/2,(l.y-u.y)/2).transform(new fe().rotate(i)),f=d.x*d.x/(n*n)+d.y*d.y/(r*r),f>1&&(f=Math.sqrt(f),n=f*n,r=f*r),p=new fe().rotate(i).scale(1/n,1/r).rotate(-i),l=l.transform(p),u=u.transform(p),m=[u.x-l.x,u.y-l.y],g=m[0]*m[0]+m[1]*m[1],h=Math.sqrt(g),m[0]/=h,m[1]/=h,_=g<4?Math.sqrt(1-g/4):0,a===o&&(_*=-1),v=new de((u.x+l.x)/2+_*-m[1],(u.y+l.y)/2+_*m[0]),y=new de(l.x-v.x,l.y-v.y),b=new de(u.x-v.x,u.y-v.y),x=Math.acos(y.x/Math.sqrt(y.x*y.x+y.y*y.y)),y.y<0&&(x*=-1),S=Math.acos(b.x/Math.sqrt(b.x*b.x+b.y*b.y)),b.y<0&&(S*=-1),o&&x>S&&(S+=2*Math.PI),!o&&x<S&&(S-=2*Math.PI),w=Math.ceil(Math.abs(x-S)*2/Math.PI),E=[],D=x,C=(S-x)/w,T=4*Math.tan(C/4)/3,j=0;j<=w;j++)k=Math.cos(D),O=Math.sin(D),A=new de(v.x+k,v.y+O),E[j]=[new de(A.x+T*O,A.y-T*k),A,new de(A.x-T*O,A.y+T*k)],D+=C;for(E[0][0]=E[0][1].clone(),E[E.length-1][2]=E[E.length-1][1].clone(),p=new fe().rotate(i).scale(n,r).rotate(-i),j=0,M=E.length;j<M;j++)E[j][0]=E[j][0].transform(p),E[j][1]=E[j][1].transform(p),E[j][2]=E[j][2].transform(p);for(j=1,M=E.length;j<M;j++)A=E[j-1][2],P=A.x,F=A.y,A=E[j][0],I=A.x,L=A.y,A=E[j][1],s=A.x,c=A.y,N.push([`C`,P,F,I,L,s,c]);return N}function Se(e,t,n,r,i,a){for(var o=e.slice(t,n||void 0),s=r.slice(i,a||void 0),c=0,l={pos:[0,0],start:[0,0]},u={pos:[0,0],start:[0,0]};o[c]=_e.call(l,o[c]),s[c]=_e.call(u,s[c]),o[c][0]!=s[c][0]||o[c][0]==`M`||o[c][0]==`A`&&(o[c][4]!=s[c][4]||o[c][5]!=s[c][5])?(Array.prototype.splice.apply(o,[c,1].concat(ye.call(l,o[c]))),Array.prototype.splice.apply(s,[c,1].concat(ye.call(u,s[c])))):(o[c]=ve.call(l,o[c]),s[c]=ve.call(u,s[c])),++c!=o.length||c!=s.length;)c==o.length&&o.push([`C`,l.pos[0],l.pos[1],l.pos[0],l.pos[1],l.pos[0],l.pos[1]]),c==s.length&&s.push([`C`,u.pos[0],u.pos[1],u.pos[0],u.pos[1],u.pos[0],u.pos[1]]);return{start:o,dest:s}}function Ce(e,t){for(var n=me(e),r=me(t),i=0,a=0,o=!1,s=!1,c;i!==!1||a!==!1;){if(o=be(n,i!==!1&&i+1),s=be(r,a!==!1&&a+1),i===!1){let e=he(c.start);i=e.height==0||e.width==0?n.push(n[0])-1:n.push([`M`,e.x+e.width/2,e.y+e.height/2])-1}if(a===!1){let e=he(c.dest);a=e.height==0||e.width==0?r.push(r[0])-1:r.push([`M`,e.x+e.width/2,e.y+e.height/2])-1}c=Se(n,i,o,r,a,s),n=n.slice(0,i).concat(c.start,o===!1?[]:n.slice(o)),r=r.slice(0,a).concat(c.dest,s===!1?[]:r.slice(s)),i=o!==!1&&i+c.start.length,a=s!==!1&&a+c.dest.length}return{start:n,dest:r}}function we(e,t){var n=Ce(e,t),r=n.start,i=n.dest;return function(e){return ge(r.map(function(t,n){return i[n].map(function(r,a){return a===0?r:t[a]+(i[n][a]-t[a])*e})}))}}var Te=null,Ee=null;function De(e,t){let n=Array(t);if(!v.isBrowser()){let r=he(me(e)),i=r.x+r.width/2,a=r.y+r.height/2;for(let e=0;e<t;e++)n[e]={x:i,y:a};return n}Te||(Te=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`),Te.setAttribute(`width`,`0`),Te.setAttribute(`height`,`0`),Te.setAttribute(`style`,`position:absolute;width:0;height:0;visibility:hidden;pointer-events:none;`),Ee=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),Te.appendChild(Ee),document.body.appendChild(Te)),Ee.setAttribute(`d`,e||`M0 0`);let r=0;try{r=Ee.getTotalLength()}catch{r=0}if(!r||!isFinite(r)){let r=he(me(e)),i=r.x+r.width/2,a=r.y+r.height/2;for(let e=0;e<t;e++)n[e]={x:i,y:a};return n}for(let e=0;e<t;e++)try{let i=Ee.getPointAtLength(e/t*r);n[e]={x:i.x,y:i.y}}catch{n[e]={x:0,y:0}}return n}function Oe(e,t,n=96){let r=De(e,n),i=De(t,n),a=0,o=1/0;for(let e=0;e<n;e++){let t=0;for(let a=0;a<n;a++){let s=r[(a+e)%n],c=i[a],l=s.x-c.x,u=s.y-c.y;if(t+=l*l+u*u,t>=o)break}t<o&&(o=t,a=e)}let s=Array(n);for(let e=0;e<n;e++)s[e]=r[(e+a)%n];return function(e){let t=``;for(let r=0;r<n;r++){let n=s[r],a=i[r],o=n.x+(a.x-n.x)*e,c=n.y+(a.y-n.y)*e;t+=(r===0?`M`:`L`)+o.toFixed(3)+` `+c.toFixed(3)+` `}return t+`Z`}}function ke(e){return-Math.cos(e*Math.PI)/2+.5}var Ae=ke;function je(e){Ae=typeof e==`function`?e:ke}function Me(e){if(!e||typeof e!=`string`)return null;if(e[0]===`#`){let t=e.slice(1);t.length===3&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]);let n=parseInt(t,16);return[n>>16&255,n>>8&255,n&255,1]}let t=e.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/);return t?[+t[1],+t[2],+t[3],t[4]===void 0?1:+t[4]]:null}function Ne(e,t,n){return`rgba(${Math.round(e[0]+(t[0]-e[0])*n)},${Math.round(e[1]+(t[1]-e[1])*n)},${Math.round(e[2]+(t[2]-e[2])*n)},${e[3]+(t[3]-e[3])*n})`}var Pe=class e{constructor(e,t,n){this.el=e,this.duration=t??300,this.delay=n||0,this._attrTarget=null,this._plotTarget=null,this._plotSnap=null,this._plotAlgorithm=`commands`,this._afterCb=null,this._duringCb=null,this._easing=null,this._next=null,this._root=null,this._scheduled=!1}ease(e){return typeof e==`function`&&(this._easing=e),this._schedule(),this}attr(e){return this._attrTarget=e,this._schedule(),this}plot(e,t,n){return this._plotTarget=e,t&&(this._plotAlgorithm=t),this._plotSnap=n||null,this._schedule(),this}after(e){return this._afterCb=e,this._schedule(),this}during(e){return this._duringCb=e,this._schedule(),this}animate(t,n){let r=new e(this.el,t,n);return this._next=r,r._root=this._root||this,r}_schedule(){let e=this._root||this;e._scheduled||(e._scheduled=!0,queueMicrotask(()=>e._executeChain()))}_executeChain(){let e=[],t=this;for(;t;)e.push(t),t=t._next;let n=0;e.forEach(e=>{n+=e.delay,e._execute(n),n+=e.duration})}_execute(e){let t=this.el,n=this.duration;if(n<=1){let n=()=>{this._attrTarget&&t.attr(this._attrTarget),this._plotTarget&&t.plot(this._plotSnap||this._plotTarget),this._afterCb&&this._afterCb.call(t)};e>0?setTimeout(n,e):n();return}let r=()=>{let e={},r={},i={};if(this._attrTarget)for(let n of Object.keys(this._attrTarget)){let a=t.attr(n);e[n]=a;let o=Me(a),s=Me(String(this._attrTarget[n]));o&&s&&(r[n]=o,i[n]=s)}let a=null;if(this._plotTarget){let e=t.attr(`d`)||``;try{a=this._plotAlgorithm===`polygons`?Oe(e,this._plotTarget):we(e,this._plotTarget)}catch{a=null}}let o=performance.now(),s=this._easing||Ae,c=l=>{let u=l-o,d=Math.min(u/n,1),f=s(d);if(this._attrTarget){if(d>=1)t.attr(this._attrTarget);else{let n={};for(let t of Object.keys(this._attrTarget))if(r[t]&&i[t])n[t]=Ne(r[t],i[t],f);else{let r=parseFloat(e[t]),i=parseFloat(this._attrTarget[t]);!isNaN(r)&&!isNaN(i)&&(n[t]=r+(i-r)*f)}t.attr(n)}}a&&d<1&&t.attr(`d`,a(f)),this._duringCb&&this._duringCb(f),d<1?T.requestAnimationFrame(c):(this._plotTarget&&t.attr(`d`,this._plotSnap||this._plotTarget),this._afterCb&&this._afterCb.call(t))};T.requestAnimationFrame(c)};e>0?setTimeout(r,e):r()}};function Fe(e){e.prototype.animate=function(e,t){return new Pe(this,e,t)}}function Ie(e){return-Math.cos(e*Math.PI)/2+.5}function Le(e,t,n,r){e=Math.min(Math.max(e,0),1),n=Math.min(Math.max(n,0),1);let i=3*e,a=3*(n-e)-i,o=1-i-a,s=3*t,c=3*(r-t)-s,l=1-s-c,u=e=>((o*e+a)*e+i)*e,d=e=>((l*e+c)*e+s)*e,f=e=>{let t=0,n=1,r=e;if(r<t)return t;if(r>n)return n;for(;t<n;){let i=u(r);if(Math.abs(i-e)<1e-4)return r;e>i?t=r:n=r,r=(t+n)/2}return r};return e=>e<=0?0:e>=1?1:d(f(e))}var V=new Map;V.set(`linear`,e=>e),V.set(`easeInOutSine`,Ie),V.set(`easeInSine`,e=>1-Math.cos(e*Math.PI/2)),V.set(`easeOutSine`,e=>Math.sin(e*Math.PI/2)),V.set(`easeInQuad`,e=>e*e),V.set(`easeOutQuad`,e=>1-(1-e)*(1-e)),V.set(`easeInOutQuad`,e=>e<.5?2*e*e:1-(-2*e+2)**2/2),V.set(`easeInCubic`,e=>e*e*e),V.set(`easeOutCubic`,e=>1-(1-e)**3),V.set(`easeInOutCubic`,e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2),V.set(`easeOutBack`,e=>1+2.70158*(e-1)**3+1.70158*(e-1)**2),V.set(`easeInOutBack`,e=>{let t=2.5949095;return e<.5?(2*e)**2*(7.189819*e-t)/2:((2*e-2)**2*(3.5949095*(e*2-2)+t)+2)/2});function Re(e,t){typeof e==`string`&&e&&typeof t==`function`&&V.set(e,t)}function ze(e){return Array.isArray(e)&&e.length===4&&e.every(e=>typeof e==`number`)}function Be(e){return typeof e==`function`?Ve(e):ze(e)?Le(e[0],e[1],e[2],e[3]):typeof e==`string`&&V.has(e)?Ve(V.get(e)):Ie}function Ve(e){return t=>{let n=e(t);return typeof n==`number`&&isFinite(n)?n:t}}var He=`http://www.w3.org/2000/svg`;function Ue(e){return 1-(1-e)**3}function We(e){return 1+2.70158*(e-1)**3+1.70158*(e-1)**2}var Ge=null;function Ke(){if(!v.isBrowser())return!1;try{return Ge||=window.matchMedia(`(prefers-reduced-motion: reduce)`),!!Ge.matches}catch{return!1}}function qe(e,t,n){if(!v.isBrowser()||n.globals.dataChanged||n.globals.resized)return!1;let r=n.config.chart.animations;if(!r||r.enabled===!1)return!1;let i=n.config.chart.type;if(i!==`line`&&i!==`area`&&i!==`rangeArea`||!(n.layout.gridWidth>0))return!1;let a=(r.speed||800)*2,o=Math.max(0,Math.min(1,t/n.layout.gridWidth)),s=(1-Math.cbrt(1-o))*a,c=e.node.style;c.opacity=`0`;let l=null,u=e=>{l===null&&(l=e),e-l>=s?c.opacity=``:T.requestAnimationFrame(u)};return T.requestAnimationFrame(u),!0}function Je(e){let t=e.config.chart.animations;t&&(t.respectReducedMotion!==!1&&Ke()&&(t.enabled=!1,t.dynamicAnimation&&(t.dynamicAnimation.enabled=!1)),je(Be(t.easing)))}function Ye(e){let t=e.style,n=e.index||0,r=typeof e.baseDelay==`number`?e.baseDelay:40,i=e.row||0,a=e.col||0,o=e.groupIndex||0,s=e.perGroup||1,c=e.centerDistance||0;switch(t){case`none`:return 0;case`diagonal`:return(i+a)*r;case`group`:return o*r+n%s*(r/4);case`centroid`:return c*r*(n+1);default:return n*r}}var Xe=class{constructor(e,t){this.w=e,this.ctx=t}animateLine(e,t,n,r){e.attr(t).animate(r).attr(n)}animateMarker(e,t,n,r){e.attr({opacity:0}).animate(t).attr({opacity:1}).after(()=>{r()})}animatePop(e,{speed:t,delay:n=0,onComplete:r}){let i=this.w;if(!v.isBrowser()||!i.globals.shouldAnimate||t<1){r&&r();return}let a=e.node.style;a.transformBox=`fill-box`,a.transformOrigin=`center`,a.transform=`scale(0)`,a.opacity=`0`;let o=performance.now()+n,s=e=>{if(i.globals.isDestroyed)return;let n=Math.max(0,Math.min(1,(e-o)/t));a.transform=`scale(${We(n)})`,a.opacity=String(Math.min(1,n*2)),n<1?T.requestAnimationFrame(s):(a.transform=``,a.transformOrigin=``,a.transformBox=``,a.opacity=``,r&&r())};T.requestAnimationFrame(s)}animateRect(e,t,n,r,i,a=0){e.attr(t).animate(r,a).attr(n).after(()=>i())}animatePathsGradually(e){let{el:t,realIndex:n,j:r,fill:i,pathFrom:a,pathTo:o,pathToInterp:s,speed:c,delay:l,scrollMorph:u}=e,d=this,f=this.w,p=0;f.config.chart.animations.animateGradually.enabled&&(p=f.config.chart.animations.animateGradually.delay),f.config.chart.animations.dynamicAnimation.enabled&&f.globals.dataChanged&&f.config.chart.type!==`bar`&&(p=0),d.morphSVG(t,n,r,f.config.chart.type===`line`&&!f.globals.comboCharts?`stroke`:i,a,o,c,l*p,u,s)}revealBulk(e){let t=this.w;if(e.node.classList.add(`apexcharts-element-hidden`),t.globals.delayedElements.push({el:e.node}),!v.isBrowser()||!t.globals.shouldAnimate){this.animationCompleted(e);return}t.globals.bulkRevealScheduled||(t.globals.bulkRevealScheduled=!0,T.requestAnimationFrame(()=>{t.globals.isDestroyed||(t.globals.bulkRevealScheduled=!1,this.animationCompleted(e))}))}showDelayedElements(){this.w.globals.delayedElements.forEach(e=>{if(e.holdUntilComplete&&!this.w.globals.animationEnded)return;let t=e.el;t.classList.remove(`apexcharts-element-hidden`),t.classList.add(`apexcharts-hidden-element-shown`)})}animationCompleted(e){let t=this.w;t.globals.animationEnded||(t.globals.animationEnded=!0,this.showDelayedElements(),typeof t.config.chart.events.animationEnd==`function`&&t.config.chart.events.animationEnd(this.ctx,{el:e,w:t}))}animateDraw(e,{realIndex:t,j:n,isFill:r,isLast:i,speed:a,delay:o,mask:s}){let c=this.w,l=this,u=()=>{i&&c.globals.shouldAnimate&&l.animationCompleted(e),l.showDelayedElements()};if(!v.isBrowser()||!c.globals.shouldAnimate||a<1){u();return}let d=e.node,f=()=>{let e=s&&s.type===`radial`,i=c.layout.gridWidth+8,l=s&&s.cx||0,f=s&&s.cy||0,p=(s&&s.r||c.layout.gridWidth/2)+4,m=`apexDrawMask${c.globals.cuid}-${t}-${n??0}-${r?`f`:`s`}`,h=T.createElementNS(He,`mask`);h.setAttribute(`id`,m),h.setAttribute(`maskUnits`,`userSpaceOnUse`);let g;if(e){let e=p;h.setAttribute(`x`,String(l-e)),h.setAttribute(`y`,String(f-e)),h.setAttribute(`width`,String(e*2)),h.setAttribute(`height`,String(e*2)),g=T.createElementNS(He,`circle`),g.setAttribute(`cx`,String(l)),g.setAttribute(`cy`,String(f)),g.setAttribute(`r`,`0`),g.setAttribute(`fill`,`#fff`)}else h.setAttribute(`x`,`-4`),h.setAttribute(`y`,`-4`),h.setAttribute(`width`,String(i)),h.setAttribute(`height`,String(c.layout.gridHeight+8)),g=T.createElementNS(He,`rect`),g.setAttribute(`x`,`-4`),g.setAttribute(`y`,`-4`),g.setAttribute(`width`,`0`),g.setAttribute(`height`,String(c.layout.gridHeight+8)),g.setAttribute(`fill`,`#fff`);h.appendChild(g),c.dom.elDefs.node.appendChild(h),d.setAttribute(`mask`,`url(#${m})`);let _=performance.now()+(o||0),v=t=>{if(c.globals.isDestroyed)return;let n=Math.max(0,Math.min(1,(t-_)/a)),r=Ue(n);e?g.setAttribute(`r`,String(r*p)):g.setAttribute(`width`,String(r*i)),n<1?T.requestAnimationFrame(v):(d.removeAttribute(`mask`),h.parentNode&&h.parentNode.removeChild(h),u())};T.requestAnimationFrame(v)},p=e=>{d.setAttribute(`stroke-dasharray`,String(e)),d.setAttribute(`stroke-dashoffset`,String(e));let t=performance.now()+(o||0),n=r=>{if(c.globals.isDestroyed)return;let i=Math.max(0,Math.min(1,(r-t)/a));d.setAttribute(`stroke-dashoffset`,String(e*(1-Ue(i)))),i<1?T.requestAnimationFrame(n):(d.removeAttribute(`stroke-dasharray`),d.removeAttribute(`stroke-dashoffset`),u())};T.requestAnimationFrame(n)};T.requestAnimationFrame(()=>{if(c.globals.isDestroyed)return;if(r){f();return}let e=d.getAttribute(`stroke-dasharray`);if(e&&e!==`0`&&e!==``){f();return}let t=0;try{typeof d.getTotalLength==`function`&&(t=d.getTotalLength())}catch{t=0}if(!t){u();return}p(t)})}morphSVG(e,t,n,r,i,a,o,s,c,l){let u=this.w;i||=e.attr(`pathFrom`),a||=e.attr(`pathTo`);let d=()=>(u.config.chart.type===`radar`&&(o=1),`M 0 ${u.layout.gridHeight}`);(!i||i.indexOf(`undefined`)>-1||i.indexOf(`NaN`)>-1)&&(i=d()),(!a.trim()||a.indexOf(`undefined`)>-1||a.indexOf(`NaN`)>-1)&&(a=d(),l=void 0),l&&(!l.trim()||l.indexOf(`undefined`)>-1||l.indexOf(`NaN`)>-1)&&(l=void 0),u.globals.shouldAnimate||(o=1);let f=(this.ctx?.morphTypeChange)?.isActive()===!0?`polygons`:`commands`,p=null;if(u.globals.dataChanged){let e=u.config.chart.animations.dynamicAnimation.easing;e==null?c&&(p=Be(`linear`)):p=Be(e)}let m=e.plot(i).animate(o,s);p&&m.ease(p),m.plot(l||a,f,l?a:void 0).after(()=>{if(O.isNumber(n)){let t=u.seriesData.series[u.globals.maxValsInArrayIndex];t&&n===t.length-2&&u.globals.shouldAnimate&&this.animationCompleted(e)}else r!==`none`&&u.globals.shouldAnimate&&(!u.globals.comboCharts&&t===u.seriesData.series.length-1||u.globals.comboCharts)&&this.animationCompleted(e);this.showDelayedElements()})}},Ze={lighten:.15,darken:.35},Qe=class e{constructor(e){this.w=e}static isSliceChart(e){let t=e.config.chart.type;return t===`pie`||t===`donut`||t===`polarArea`}static hoverOutlineOwnsHoverState(t){return e.isSliceChart(t)&&t.config.states.hover.filter.type!==`none`&&t.config.plotOptions.pie.hoverOutline?.show===!0}static sliceOffsetOwnsActiveState(t){return e.isSliceChart(t)&&t.config.chart.type!==`polarArea`&&t.config.plotOptions.pie.expandOnClick===!0&&t.config.plotOptions.pie.expandOffset>0&&!e.drilldownBlocksSliceOffset(t)}static drilldownBlocksSliceOffset(t){return e.isSliceChart(t)&&t.config.drilldown?.enabled===!0}getDefaultFilter(e,t){let n=this.w;e.unfilter&&e.unfilter(!0),n.config.chart.dropShadow.enabled&&this.dropShadow(e,n.config.chart.dropShadow,t)}applyFilter(e,t,n,r){var i;let a=this.w;if(e.unfilter&&e.unfilter(!0),n===`none`){this.getDefaultFilter(e,t);return}let o=a.config.chart.dropShadow,s=n===`lighten`?Ze.lighten:Ze.darken,c=Math.max(0,Math.min(1,typeof r==`number`?r:s)),l=1-c,u=n===`lighten`?c:0;e.filterWith&&(e.filterWith(e=>{e.colorMatrix({type:`matrix`,values:`
|
|
8
|
-
${l} 0 0 0 ${u}
|
|
9
|
-
0 ${l} 0 0 ${u}
|
|
10
|
-
0 0 ${l} 0 ${u}
|
|
11
|
-
0 0 0 1 0
|
|
12
|
-
`,in:`SourceGraphic`,result:`brightness`}),o.enabled&&this.addShadow(e,t,o,`brightness`)}),o.noUserSpaceOnUse||(i=e.filterer()?.node)==null||i.setAttribute(`filterUnits`,`userSpaceOnUse`),this._scaleFilterSize(e.filterer()?.node))}addShadow(e,t,n,r){let i=this.w,{blur:a,top:o,left:s,color:c,opacity:l}=n;if(c=Array.isArray(c)?c[t]:c,i.config.chart.dropShadow.enabledOnSeries?.length>0&&i.config.chart.dropShadow.enabledOnSeries.indexOf(t)===-1)return e;e.offset({in:r,dx:s,dy:o,result:`offset`}),e.gaussianBlur({in:`offset`,stdDeviation:a,result:`blur`}),e.flood({"flood-color":c,"flood-opacity":l,result:`flood`}),e.composite({in:`flood`,in2:`blur`,operator:`in`,result:`shadow`}),e.merge([`shadow`,r])}dropShadow(e,t,n=0){var r;let i=this.w;return e.unfilter&&e.unfilter(!0),O.isMsEdge()&&i.config.chart.type===`radialBar`||i.config.chart.dropShadow.enabledOnSeries?.length>0&&i.config.chart.dropShadow.enabledOnSeries?.indexOf(n)===-1||e.filterWith&&(e.filterWith(e=>{this.addShadow(e,n,t,`SourceGraphic`)}),t.noUserSpaceOnUse||(r=e.filterer()?.node)==null||r.setAttribute(`filterUnits`,`userSpaceOnUse`),this._scaleFilterSize(e.filterer()?.node)),e}setSelectionFilter(t,n,r){let i=this.w;if(i.interact.selectedDataPoints[n]!==void 0&&i.interact.selectedDataPoints[n].indexOf(r)>-1){if(t.node.setAttribute(`selected`,!0),e.sliceOffsetOwnsActiveState(i))return;let r=i.config.states.active.filter;r.type!==`none`&&this.applyFilter(t,n,r.type,r.value)}}_scaleFilterSize(e){e&&(t=>{for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.setAttribute(n,t[n])})({width:`200%`,height:`200%`,x:`-50%`,y:`-50%`})}},H=class e{constructor(e,t=null){this.w=e,this.ctx=t}roundPathCorners(e,t){e.indexOf(`NaN`)>-1&&(e=``);function n(e,t,n){var i=t.x-e.x,a=t.y-e.y,o=Math.sqrt(i*i+a*a);return o?r(e,t,Math.min(1,n/o)):{x:e.x,y:e.y}}function r(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function i(e,t){e.length>2&&(e[e.length-2]=t.x,e[e.length-1]=t.y)}function a(e){return{x:parseFloat(e[e.length-2]),y:parseFloat(e[e.length-1])}}var o=e.split(/[,\s]/).reduce(function(e,t){var n=t.match(/^([a-zA-Z])(.+)/);return n?(e.push(n[1]),e.push(n[2])):e.push(t),e},[]).reduce(function(e,t){return parseFloat(t)==t&&e.length?e[e.length-1].push(t):e.push([t]),e},[]),s=[];if(o.length>1){var c=a(o[0]),l=null;o[o.length-1][0]==`Z`&&o[0].length>2&&(l=[`L`,c.x,c.y],o[o.length-1]=l),s.push(o[0]);for(var u=1;u<o.length;u++){var d=s[s.length-1],f=o[u],p=f==l?o[1]:o[u+1];if(p&&d&&d.length>2&&f[0]==`L`&&p.length>2&&p[0]==`L`){var m=a(d),h=a(f),g=a(p),_=n(h,m,t),v=n(h,g,t);i(f,_),f.origPoint=h,s.push(f);var y=r(_,h,.5),b=r(h,v,.5),x=[`C`,y.x,y.y,b.x,b.y,v.x,v.y];x.origPoint=h,s.push(x)}else s.push(f)}if(l){var S=a(s[s.length-1]);s.push([`Z`]),i(s[0],S)}}else s=o;return s.reduce(function(e,t){return e+t.join(` `)+` `},``)}drawLine(e,t,n,r,i=`#a8a8a8`,a=0,o=null,s=`butt`){return this.w.dom.Paper.line().attr({x1:e,y1:t,x2:n,y2:r,stroke:i,"stroke-dasharray":a,"stroke-width":o,"stroke-linecap":s})}drawRect(e=0,t=0,n=0,r=0,i=0,a=`#fefefe`,o=1,s=null,c=null,l=0){let u=this.w.dom.Paper.rect();return u.attr({x:e,y:t,width:n>0?n:0,height:r>0?r:0,rx:i,ry:i,opacity:o,"stroke-width":s===null?0:s,stroke:c===null?`none`:c,"stroke-dasharray":l}),u.node.setAttribute(`fill`,a),u}drawPolygon(e,t=`#e1e1e1`,n=1,r=`none`){return this.w.dom.Paper.polygon(e).attr({fill:r,stroke:t,"stroke-width":n})}drawCircle(e,t=null){let n=this.w;e<0&&(e=0);let r=n.dom.Paper.circle(e*2);return t!==null&&r.attr(t),r}drawPath({d:e=``,stroke:t=`#a8a8a8`,strokeWidth:n=1,fill:r,fillOpacity:i=1,strokeOpacity:a=1,classes:o,strokeLinecap:s=null,strokeDashArray:c=0}){let l=this.w;return s===null&&(s=l.config.stroke.lineCap),(e.indexOf(`undefined`)>-1||e.indexOf(`NaN`)>-1)&&(e=`M 0 ${l.layout.gridHeight}`),l.dom.Paper.path(e).attr({fill:r,"fill-opacity":i,stroke:t,"stroke-opacity":a,"stroke-linecap":s,"stroke-width":n,"stroke-dasharray":c,class:o})}group(e=null){let t=this.w.dom.Paper.group();return e!==null&&t.attr(e),t}move(e,t){return[`M`,e,t].join(` `)}line(e,t,n=null){return n===`H`?[` H`,e].join(` `):n===`V`?[` V`,t].join(` `):[` L`,e,t].join(` `)}curve(e,t,n,r,i,a){return[`C`,e,t,n,r,i,a].join(` `)}quadraticCurve(e,t,n,r){return[`Q`,e,t,n,r].join(` `)}arc(e,t,n,r,i,a,o,s=!1){let c=`A`;return s&&(c=`a`),[c,e,t,n,r,i,a,o].join(` `)}renderPaths({j:e,realIndex:t,pathFrom:n,pathTo:r,pathToInterp:i,stroke:a,strokeWidth:o,strokeLinecap:s,fill:c,animationDelay:l,initialSpeed:u,dataChangeSpeed:d,className:f,chartType:p,shouldClipToGrid:g=!0,bindEventsOnPaths:_=!0,drawShadow:v=!0,drawMask:y=null,scrollMorph:b=!1}){let x=this.w,S=new Qe(this.w),C=new Xe(this.w,this.ctx??void 0),w=this.w.config.chart.animations.enabled,T=w&&this.w.config.chart.animations.dynamicAnimation.enabled;if(n&&n.startsWith(`M 0 0 `)&&r){let e=r.match(/^M\s+[\d.-]+\s+[\d.-]+/);e&&(n=n.replace(/^M\s+0\s+0/,e[0]))}let E,D=(this.ctx?.morphTypeChange)?.isActive()===!0,O=!!(w&&!x.globals.resized||T&&x.globals.dataChanged&&x.globals.shouldAnimate||D&&w&&x.globals.shouldAnimate),k=typeof f==`string`&&(f.indexOf(`apexcharts-line`)>-1||f.indexOf(`apexcharts-area`)>-1||f.indexOf(`apexcharts-rangeArea`)>-1||f.indexOf(`apexcharts-radar`)>-1),A=!(!w||x.globals.resized||x.globals.dataChanged||!k),j=x.config.chart.animations.largeDatasetThreshold??0,M=!!(O&&!A&&j>0&&x.globals.dataPoints>j),N=!(p!==`candlestick`&&p!==`boxPlot`||!O||A||!x.globals.dataChanged||D),P=M||N;O&&!A&&!P?E=n:(E=r,O||(x.globals.animationEnded=!0));let F=x.config.stroke.dashArray,I=0;I=Array.isArray(F)?F[t]:x.config.stroke.dashArray;let L=this.drawPath({d:E,stroke:a,strokeWidth:o,fill:c,fillOpacity:1,classes:f,strokeLinecap:s,strokeDashArray:I});L.attr(`index`,t),g&&(p===`bar`&&!x.globals.isBarHorizontal||x.globals.comboCharts?L.attr({"clip-path":`url(#gridRectBarMask${x.globals.cuid})`}):L.attr({"clip-path":`url(#gridRectMask${x.globals.cuid})`})),x.config.chart.dropShadow.enabled&&v&&S.dropShadow(L,x.config.chart.dropShadow,t),_&&(L.node.addEventListener(`mouseenter`,this.pathMouseEnter.bind(this,L)),L.node.addEventListener(`mouseleave`,this.pathMouseLeave.bind(this,L)),L.node.addEventListener(`mousedown`,this.pathMouseDown.bind(this,L))),L.attr({pathTo:r,pathFrom:n});let R={el:L,j:e,realIndex:t,pathFrom:n,pathTo:r,pathToInterp:i,fill:c,strokeWidth:o,delay:l,scrollMorph:b};if(w&&!x.globals.resized&&!x.globals.dataChanged){if(A){let n=u*2,r=a===`none`||o===0,i=x.seriesData.series.length,s=x.globals.comboCharts?!0:t===i-1;C.animateDraw(L,{realIndex:t,j:e,isFill:r,isLast:s,speed:n,delay:0,mask:y})}else P||C.animatePathsGradually(h(m({},R),{speed:u}))}else(x.globals.resized||!x.globals.dataChanged)&&!P&&C.showDelayedElements();return O&&!P&&(x.globals.dataChanged&&T||D)&&C.animatePathsGradually(h(m({},R),{speed:d})),P&&C.revealBulk(L),L}drawPattern(e,t,n,r=`#a8a8a8`,i=0){return this.w.dom.Paper.pattern(t,n,a=>{e===`horizontalLines`?a.line(0,0,n,0).stroke({color:r,width:i+1}):e===`verticalLines`?a.line(0,0,0,t).stroke({color:r,width:i+1}):e===`slantedLines`?a.line(0,0,t,n).stroke({color:r,width:i}):e===`squares`?a.rect(t,n).fill(`none`).stroke({color:r,width:i}):e===`circles`&&a.circle(t).fill(`none`).stroke({color:r,width:i})})}drawGradient(e,t,n,r,i,a=null,o=null,s=[],c=0,l=!1){let u=this.w,d;t.length<9&&t.indexOf(`#`)===0&&(t=O.hexToRgba(t,r)),n.length<9&&n.indexOf(`#`)===0&&(n=O.hexToRgba(n,i));let f=0,p=1,m=1,h=null;o!==null&&(f=o[0]===void 0?0:o[0]/100,p=o[1]===void 0?1:o[1]/100,m=o[2]===void 0?1:o[2]/100,h=o[3]===void 0?null:o[3]/100);let g=u.config.chart.type===`donut`||u.config.chart.type===`pie`||u.config.chart.type===`polarArea`||u.config.chart.type===`bubble`;if(d=!s||s.length===0?u.dom.Paper.gradient(g?`radial`:`linear`,e=>{e.stop(f,t,r),e.stop(p,n,i),e.stop(m,n,i),h!==null&&e.stop(h,t,r)}):u.dom.Paper.gradient(g?`radial`:`linear`,e=>{(Array.isArray(s[c])?s[c]:Array.isArray(s[0])?s[0]||[]:s).forEach(t=>{e.stop(t.offset/100,t.color,t.opacity)})}),!g)e===`vertical`?l?(d.attr({gradientUnits:`userSpaceOnUse`}),d.from(0,0).to(0,u.layout.gridHeight)):d.from(0,0).to(0,1):e===`diagonal`?d.from(0,0).to(1,1):e===`horizontal`?d.from(0,1).to(1,1):e===`diagonal2`&&d.from(1,0).to(0,1);else{let e=u.layout.gridWidth/2,t=u.layout.gridHeight/2;u.config.chart.type===`bubble`?d.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2}):d.attr({gradientUnits:`userSpaceOnUse`,cx:e,cy:t,r:a})}return d}getTextBasedOnMaxWidth({text:e,maxWidth:t,fontSize:n,fontFamily:r}){let i=this.getTextRects(e,n,r,``),a=i.width/e.length,o=Math.floor(t/a);return t<i.width?e.slice(0,o-3)+`...`:e}drawText({x:e,y:t,text:n,textAnchor:r,fontSize:i,fontFamily:a,fontWeight:o,foreColor:s,opacity:c,maxWidth:l,cssClass:u=``,isPlainText:d=!0,dominantBaseline:f=`auto`}){let p=this.w;n===void 0&&(n=``);let h=n;r||=`start`,(!s||!s.length)&&(s=p.config.chart.foreColor),a||=p.config.chart.fontFamily,i||=`11px`,o||=`regular`;let g={maxWidth:l,fontSize:i,fontFamily:a},_;return Array.isArray(n)?_=p.dom.Paper.text(e=>{for(let t=0;t<n.length;t++)h=n[t],l&&(h=this.getTextBasedOnMaxWidth(m({text:n[t]},g))),t===0?e.tspan(h):e.tspan(h).newLine()}):(l&&(h=this.getTextBasedOnMaxWidth(m({text:n},g))),_=d?p.dom.Paper.plain(n):p.dom.Paper.text(e=>e.tspan(h))),_.attr({x:e,y:t,"text-anchor":r,"dominant-baseline":f,"font-size":i,"font-family":a,"font-weight":o,fill:s,class:`apexcharts-text `+u}),_.node.style.fontFamily=a,_.node.style.opacity=c,_}getMarkerPath(e,t,n,r){let i=``;switch(n){case`cross`:r/=1.4,i=`M ${e-r} ${t-r} L ${e+r} ${t+r} M ${e-r} ${t+r} L ${e+r} ${t-r}`;break;case`plus`:r/=1.12,i=`M ${e-r} ${t} L ${e+r} ${t} M ${e} ${t-r} L ${e} ${t+r}`;break;case`star`:case`sparkle`:{let a=5;r*=1.15,n===`sparkle`&&(r/=1.1,a=4);let o=Math.PI/a;for(let n=0;n<=2*a;n++){let a=n*o,s=n%2==0?r:r/2,c=e+s*Math.sin(a),l=t-s*Math.cos(a);i+=(n===0?`M`:`L`)+c+`,`+l}i+=`Z`;break}case`triangle`:i=`M ${e} ${t-r}
|
|
13
|
-
L ${e+r} ${t+r}
|
|
14
|
-
L ${e-r} ${t+r}
|
|
15
|
-
Z`;break;case`square`:case`rect`:r/=1.125,i=`M ${e-r} ${t-r}
|
|
16
|
-
L ${e+r} ${t-r}
|
|
17
|
-
L ${e+r} ${t+r}
|
|
18
|
-
L ${e-r} ${t+r}
|
|
19
|
-
Z`;break;case`diamond`:r*=1.05,i=`M ${e} ${t-r}
|
|
20
|
-
L ${e+r} ${t}
|
|
21
|
-
L ${e} ${t+r}
|
|
22
|
-
L ${e-r} ${t}
|
|
23
|
-
Z`;break;case`line`:r/=1.1,i=`M ${e-r} ${t}
|
|
24
|
-
L ${e+r} ${t}`;break;default:r*=2,i=`M ${e}, ${t}
|
|
25
|
-
m -${r/2}, 0
|
|
26
|
-
a ${r/2},${r/2} 0 1,0 ${r},0
|
|
27
|
-
a ${r/2},${r/2} 0 1,0 -${r},0`}return i}drawMarkerShape(e,t,n,r,i){let a=this.drawPath({d:this.getMarkerPath(e,t,n,r),stroke:i.pointStrokeColor,strokeDashArray:i.pointStrokeDashArray,strokeWidth:i.pointStrokeWidth,fill:i.pointFillColor,fillOpacity:i.pointFillOpacity,strokeOpacity:i.pointStrokeOpacity});return a.attr({cx:e,cy:t,shape:i.shape,class:i.class?i.class:``}),a}drawMarker(e,t,n){e||=0;let r=n.pSize||0;return O.isNumber(t)||(r=0,t=0),this.drawMarkerShape(e,t,n?.shape,r,m(m({},n),n.shape===`line`||n.shape===`plus`||n.shape===`cross`?{pointStrokeColor:n.pointFillColor,pointStrokeOpacity:n.pointFillOpacity}:{}))}pathMouseEnter(t,n){let r=this.w,i=new Qe(this.w),a=parseInt(t.node.getAttribute(`index`)??``,10),o=parseInt(t.node.getAttribute(`j`)??``,10);if(!(isNaN(a)||isNaN(o))&&(typeof r.config.chart.events.dataPointMouseEnter==`function`&&r.config.chart.events.dataPointMouseEnter(n,this.ctx,{seriesIndex:a,dataPointIndex:o,w:r}),e._fireEvent(r,`dataPointMouseEnter`,[n,this.ctx,{seriesIndex:a,dataPointIndex:o,w:r}]),(r.config.states.active.filter.type===`none`||t.node.getAttribute(`selected`)!==`true`)&&!Qe.hoverOutlineOwnsHoverState(r)&&r.config.states.hover.filter.type!==`none`&&!r.interact.isTouchDevice)){let e=r.config.states.hover.filter;i.applyFilter(t,a,e.type,e.value)}}pathMouseLeave(t,n){let r=this.w,i=new Qe(this.w),a=parseInt(t.node.getAttribute(`index`)??``,10),o=parseInt(t.node.getAttribute(`j`)??``,10);isNaN(a)||isNaN(o)||(typeof r.config.chart.events.dataPointMouseLeave==`function`&&r.config.chart.events.dataPointMouseLeave(n,this.ctx,{seriesIndex:a,dataPointIndex:o,w:r}),e._fireEvent(r,`dataPointMouseLeave`,[n,this.ctx,{seriesIndex:a,dataPointIndex:o,w:r}]),(r.config.states.active.filter.type===`none`||t.node.getAttribute(`selected`)!==`true`)&&(Qe.hoverOutlineOwnsHoverState(r)||r.config.states.hover.filter.type!==`none`&&i.getDefaultFilter(t,a)))}_clearAllDataPointSelections(e,t){let n=this.w;n.interact.selectedDataPoints=[];let r=n.dom.Paper.find(`.apexcharts-series path:not(.apexcharts-decoration-element)`),i=n.dom.Paper.find(`.apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)`),a=n=>{Array.prototype.forEach.call(n,n=>{n.node.setAttribute(`selected`,`false`),e.getDefaultFilter(n,t)})};a(r),a(i)}_togglePointSelection(e,t,n,r){let i=this.w;if(e.node.getAttribute(`selected`)===`true`){e.node.setAttribute(`selected`,`false`);let t=i.interact.selectedDataPoints[n].indexOf(r);return t>-1&&i.interact.selectedDataPoints[n].splice(t,1),`false`}return!i.config.states.active.allowMultipleDataPointsSelection&&i.interact.selectedDataPoints.length>0&&this._clearAllDataPointSelections(t,n),e.node.setAttribute(`selected`,`true`),i.interact.selectedDataPoints[n]===void 0&&(i.interact.selectedDataPoints[n]=[]),i.interact.selectedDataPoints[n].push(r),`true`}_applyPointSelectionFilter(e,t,n,r){let i=this.w;if(!Qe.sliceOffsetOwnsActiveState(i)){if(r===`true`){let r=i.config.states.active.filter;if(r!==`none`)t.applyFilter(e,n,r.type,r.value);else if(i.config.states.hover.filter!==`none`&&!i.interact.isTouchDevice){let r=i.config.states.hover.filter;t.applyFilter(e,n,r.type,r.value)}}else if(i.config.states.active.filter.type!==`none`){if(i.config.states.hover.filter.type!==`none`&&!i.interact.isTouchDevice){let r=i.config.states.hover.filter;t.applyFilter(e,n,r.type,r.value)}else t.getDefaultFilter(e,n)}}}pathMouseDown(t,n){let r=this.w,i=new Qe(this.w),a=parseInt(t.node.getAttribute(`index`)??``,10),o=parseInt(t.node.getAttribute(`j`)??``,10);if(isNaN(a)||isNaN(o))return;let s=r.config.chart.link;if(!s||typeof s.dimension!=`function`&&!s.enabled){let e=this._togglePointSelection(t,i,a,o);this._applyPointSelectionFilter(t,i,a,e)}typeof r.config.chart.events.dataPointSelection==`function`&&r.config.chart.events.dataPointSelection(n,this.ctx,{selectedDataPoints:r.interact.selectedDataPoints,seriesIndex:a,dataPointIndex:o,w:r}),n&&e._fireEvent(r,`dataPointSelection`,[n,this.ctx,{selectedDataPoints:r.interact.selectedDataPoints,seriesIndex:a,dataPointIndex:o,w:r}])}rotateAroundCenter(e){let t={};return e&&typeof e.getBBox==`function`&&(t=e.getBBox()),{x:t.x+t.width/2,y:t.y+t.height/2}}setupEventDelegation(t,n){let r=null;t.node.addEventListener(`mouseover`,i=>{let a=e._findDelegateTarget(i.target,t.node,n);a&&a!==r&&(r&&r.instance&&this.pathMouseLeave(r.instance,i),r=a,a.instance&&this.pathMouseEnter(a.instance,i))}),t.node.addEventListener(`mouseout`,i=>{r&&(i.relatedTarget?e._findDelegateTarget(i.relatedTarget,t.node,n):null)!==r&&(r&&r.instance&&this.pathMouseLeave(r.instance,i),r=null)}),t.node.addEventListener(`mousedown`,r=>{let i=e._findDelegateTarget(r.target,t.node,n);i&&i.instance&&this.pathMouseDown(i.instance,r)})}static _fireEvent(e,t,n){let r=e.globals.events;if(!r||!Object.prototype.hasOwnProperty.call(r,t))return;let i=r[t];for(let e=0;e<i.length;e++)i[e].apply(null,n)}static _findDelegateTarget(e,t,n){for(;e&&e!==t&&e!==document;){if(e.matches&&e.matches(n))return e;e=e.parentNode}return null}static setAttrs(e,t){for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.setAttribute(n,t[n])}getTextRects(e,t,n,r,i=!0,a){let o=this.w,s=[e,t,n,r,i,a].join(`\0`),c=o.globals.textRectsCache;if(c&&c.has(s))return c.get(s);let l=this.drawText({x:-200,y:-200,text:e,textAnchor:`start`,fontSize:t,fontFamily:n,fontWeight:a,foreColor:`#fff`,opacity:0});r&&l.attr(`transform`,r),o.dom.Paper.add(l);let u=l.bbox(),d=u.y;i||(u=l.node.getBoundingClientRect()),l.remove();let f={width:u.width,height:u.height,centerOffset:i?d+u.height/2- -200:0};return c&&c.set(s,f),f}placeTextWithEllipsis(e,t,n){if(typeof e.getComputedTextLength==`function`&&(e.textContent=t,t.length>0&&e.getComputedTextLength()>=n/1.1)){for(let r=t.length-3;r>0;r-=3)if(e.getSubStringLength(0,r)<=n/1.1){e.textContent=t.substring(0,r)+`...`;return}e.textContent=`.`}}},$e=class{constructor(e){this.w=e,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}clippedImgArea(e){let t=this.w,n=t.config,r=parseInt(String(t.layout.gridWidth),10),i=parseInt(String(t.layout.gridHeight),10),a=r>i?r:i,o=e.image,s=0,c=0;e.width===void 0&&e.height===void 0?n.fill.image.width!==void 0&&n.fill.image.height!==void 0?(s=n.fill.image.width+1,c=n.fill.image.height):(s=a+1,c=a):(s=e.width,c=e.height);let l=T.createElementNS(B,`pattern`);H.setAttrs(l,{id:e.patternID,patternUnits:e.patternUnits?e.patternUnits:`userSpaceOnUse`,width:s+`px`,height:c+`px`});let u=T.createElementNS(B,`image`);l.appendChild(u);let d=v.isBrowser()?window.SVG:global.SVG;u.setAttributeNS(d.xlink,`href`,o),H.setAttrs(u,{x:0,y:0,preserveAspectRatio:`none`,width:s+`px`,height:c+`px`}),u.style.opacity=e.opacity,t.dom.elDefs.node.appendChild(l)}getSeriesIndex(e){let t=this.w,n=t.config.chart.type;return this.seriesIndex=(n===`bar`||n===`rangeBar`)&&t.config.plotOptions.bar.distributed||n===`heatmap`||n===`treemap`?e.seriesNumber:e.seriesNumber%t.seriesData.series.length,this.seriesIndex}getSeriesAxisRange(e){let t=this.w,n=t.globals.seriesYAxisReverseMap?.[e]??0;return{minY:O.isNumber(t.globals.minYArr[e])?t.globals.minYArr[e]:t.globals.minY,maxY:O.isNumber(t.globals.maxYArr[e])?t.globals.maxYArr[e]:t.globals.maxY,reversed:!!t.config.yaxis[n]?.reversed}}computeColorStops(e,t){let n=this.w,{threshold:r,colorAboveThreshold:i,colorBelowThreshold:a}=t,{minY:o,maxY:s}=e,c=s-o,l=c===0?r>s?0:100:(s-r)/c*100;e.reversed&&(l=100-l),l=Math.max(0,Math.min(l,100));let u=Array.isArray(n.config.fill.opacity)?n.config.fill.opacity[this.seriesIndex]:n.config.fill.opacity,d={offset:l,color:i,opacity:u},f={offset:l,color:a,opacity:u};return e.reversed?[f,d]:[d,f]}fillPath(e){let t=this.w;this.opts=e;let n=this.w.config,r,i,a;this.seriesIndex=this.getSeriesIndex(e);let o=n.plotOptions.line.colors.colorAboveThreshold&&n.plotOptions.line.colors.colorBelowThreshold,s=this.getFillColors()[this.seriesIndex];t.seriesData.seriesColors[this.seriesIndex]!==void 0&&(s=t.seriesData.seriesColors[this.seriesIndex]),typeof s==`function`&&(s=s({seriesIndex:this.seriesIndex,dataPointIndex:e.dataPointIndex,value:e.value,w:t}));let c=e.fillType?e.fillType:this.getFillType(this.seriesIndex),l=Array.isArray(n.fill.opacity)?n.fill.opacity[this.seriesIndex]:n.fill.opacity,u=c===`gradient`||o;e.color&&(s=e.color);let d=t.config.series[this.seriesIndex];d?.data?.[e.dataPointIndex]?.fillColor&&(s=d?.data?.[e.dataPointIndex]?.fillColor),s||(s=`#fff`,console.warn(`undefined color - ApexCharts`)),e.opacity!==void 0&&e.opacity!==null&&(l=e.opacity);let f=s;O.isCSSVariable(s)?f=O.applyOpacityToColor(s,l):s.indexOf(`rgb`)===-1?s.indexOf(`#`)===-1?f=s:s.length<9&&(f=O.hexToRgba(s,l)):s.indexOf(`rgba`)>-1?l=O.getOpacityFromRGBA(s):f=O.hexToRgba(O.rgb2hex(s),l);let p=O.isCSSVariable(s)?O.getThemeColor(s):s;if(c===`pattern`&&(i=this.handlePatternFill({fillConfig:e.fillConfig,patternFill:i,fillColor:p,defaultColor:f})),u){let t=n.fill.gradient.colorStops?[...n.fill.gradient.colorStops]:[],r=e.fillConfig?.gradient?.type??n.fill.gradient.type;o&&(t[this.seriesIndex]=this.computeColorStops(this.getSeriesAxisRange(this.seriesIndex),n.plotOptions.line.colors),r=`vertical`),a=this.handleGradientFill({type:r,fillConfig:e.fillConfig,fillColor:p,fillOpacity:l,colorStops:t,i:this.seriesIndex,verticalUserSpace:o})}if(c===`image`){let i=n.fill.image.src,a=e.patternID?e.patternID:``,o=`pattern${t.globals.cuid}${e.seriesNumber+1}${a}`;this.patternIDs.indexOf(o)===-1&&(this.clippedImgArea({opacity:l,image:Array.isArray(i)?e.seriesNumber<i.length?i[e.seriesNumber]:i[0]:i,width:e.width?e.width:void 0,height:e.height?e.height:void 0,patternUnits:e.patternUnits,patternID:o}),this.patternIDs.push(o)),r=`url(#${o})`}else r=u?a:c===`pattern`?i:f;return e.solid&&(r=f),r}getFillType(e){let t=this.w;return Array.isArray(t.config.fill.type)?t.config.fill.type[e]:t.config.fill.type}getFillColors(){let e=this.w,t=e.config,n=this.opts,r=[];return e.globals.comboCharts?e.config.series[this.seriesIndex].type===`line`?Array.isArray(e.globals.stroke.colors)?r=e.globals.stroke.colors:r.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?r=e.globals.fill.colors:r.push(e.globals.fill.colors):t.chart.type===`line`?Array.isArray(e.globals.stroke.colors)?r=e.globals.stroke.colors:r.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?r=e.globals.fill.colors:r.push(e.globals.fill.colors),n.fillColors!==void 0&&(r=[],Array.isArray(n.fillColors)?r=n.fillColors.slice():r.push(n.fillColors)),r}handlePatternFill({fillConfig:e,patternFill:t,fillColor:n,defaultColor:r}){let i=this.w.config.fill;e&&(i=e);let a=this.opts,o=new H(this.w),s=Array.isArray(i.pattern.strokeWidth)?i.pattern.strokeWidth[this.seriesIndex]:i.pattern.strokeWidth,c=n;return t=Array.isArray(i.pattern.style)?i.pattern.style[a.seriesNumber]===void 0?r:o.drawPattern(i.pattern.style[a.seriesNumber],i.pattern.width,i.pattern.height,c,s):o.drawPattern(i.pattern.style,i.pattern.width,i.pattern.height,c,s),t}handleGradientFill({type:e,fillColor:t,fillOpacity:n,fillConfig:r,colorStops:i,i:a,verticalUserSpace:o=!1}){let s=this.w.config.fill;r&&(s=m(m({},s),r));let c=this.opts,l=new H(this.w),u=new O;e||=s.gradient.type;let d=t,f,p=s.gradient.opacityFrom===void 0?n:Array.isArray(s.gradient.opacityFrom)?s.gradient.opacityFrom[a]:s.gradient.opacityFrom;d.indexOf(`rgba`)>-1&&(p=O.getOpacityFromRGBA(d));let h=s.gradient.opacityTo===void 0?n:Array.isArray(s.gradient.opacityTo)?s.gradient.opacityTo[a]:s.gradient.opacityTo;if(s.gradient.gradientToColors===void 0||s.gradient.gradientToColors.length===0)f=s.gradient.shade===`dark`?u.shadeColor(parseFloat(s.gradient.shadeIntensity)*-1,t.indexOf(`rgb`)>-1?O.rgb2hex(t):t):u.shadeColor(parseFloat(s.gradient.shadeIntensity),t.indexOf(`rgb`)>-1?O.rgb2hex(t):t);else if(s.gradient.gradientToColors[c.seriesNumber]){let e=s.gradient.gradientToColors[c.seriesNumber];f=e,e.indexOf(`rgba`)>-1&&(h=O.getOpacityFromRGBA(e))}else f=t;if(s.gradient.gradientFrom&&(d=s.gradient.gradientFrom),s.gradient.gradientTo&&(f=s.gradient.gradientTo),s.gradient.inverseColors){let e=d;d=f,f=e}return d.indexOf(`rgb`)>-1&&(d=O.rgb2hex(d)),f.indexOf(`rgb`)>-1&&(f=O.rgb2hex(f)),l.drawGradient(e,d,f,p,h,c.size,s.gradient.stops,i,a,o)}},et=[`none`,`lighten`,`darken`];function tt(e,t){let n=e&&e.renderer;return n&&n.kind&&n.kind!==`svg`?n:t}function nt(e){let t=e.config.series||[],n=e.config.chart.type,r=n===`scatter`||n===`bubble`,i=e.config.markers&&e.config.markers.size,a=Array.isArray(i)?i.some(e=>e>0):(i||0)>0,o=!!(e.config.dataLabels&&e.config.dataLabels.enabled),s=n===`heatmap`,c=0,l=0;return t.forEach(e=>{let t=Array.isArray(e.data)?e.data.length:0;t>l&&(l=t),(r||a||s)&&(c+=t),o&&(c+=t)}),l>=5e4&&(c=Math.max(c,l)),c}function rt(e){let t=e.config.fill&&e.config.fill.type,n=e=>e===`pattern`||e===`image`||e===`gradient`;if(Array.isArray(t)?t.some(n):n(t))return!0;let r=e.config.plotOptions?.line?.colors;if(r&&r.colorAboveThreshold&&r.colorBelowThreshold)return!0;let i=e.config.states||{},a=i.hover&&i.hover.filter&&i.hover.filter.type,o=i.active&&i.active.filter&&i.active.filter.type;return!!(a&&!et.includes(a)||o&&!et.includes(o))}var it=class e{constructor(e,t){this.w=e,this.ctx=t,this._filters=new Qe(this.w),this._graphics=new H(this.w,this.ctx),this._seriesWrap=null,this._seriesWrapIndex=-1,this._batch=null}resetSeriesWrapCache(){this._seriesWrap=null,this._seriesWrapIndex=-1,this._batch=null}static markersAreInert(e){let t=e.config.chart.type;return(t===`line`||t===`area`)&&!e.globals.comboCharts&&!e.config.tooltip.intersect}_shouldBatch(){let t=this.w,n=t.config.markers,r=n.largeDatasetThreshold??0;if(r<=0||this.ctx?.renderer?.kind===`canvas`||!e.markersAreInert(t)||n.discrete&&n.discrete.length||n.onClick||n.onDblClick||t.config.chart.events?.dataPointSelection)return!1;let i=t.seriesData.series;if(!Array.isArray(i)||!i.length)return!1;let a=!1;for(let e=0;e<i.length;e++){if(!Array.isArray(i[e]))return!1;let o=!1,s=!1,c=t.config.series[e]?.data;for(let t=0;t<i[e].length;t++){i[e][t]===null&&(o=!0);let n=Array.isArray(c)?c[t]:null;if(n&&(n.fillColor||n.strokeColor)){s=!0;break}}if(s)return!1;(t.globals.markers.size[e]>0||o&&n.showNullDataPoints)&&i[e].length>r&&(a=!0)}return a}setGlobalMarkerSize(){let e=this.w;if(e.globals.markers.size=Array.isArray(e.config.markers.size)?e.config.markers.size:[e.config.markers.size],e.globals.markers.size.length>0){if(e.globals.markers.size.length<e.seriesData.series.length+1)for(let t=0;t<=e.seriesData.series.length;t++)e.globals.markers.size[t]===void 0&&e.globals.markers.size.push(e.globals.markers.size[0])}else e.globals.markers.size=e.config.series.map(()=>e.config.markers.size);e.globals.markers.batched=this._shouldBatch()}plotChartMarkers({pointsPos:t,seriesIndex:n,j:r,pSize:i,alwaysDrawMarker:a=!1,isVirtualPoint:o=!1}){let s=this.w,c=n,l=t,u=null,d=new H(this.w),f=tt(this.ctx,d),p=s.config.markers.discrete&&s.config.markers.discrete.length;if(Array.isArray(l.x))for(let t=0;t<l.x.length;t++){let m,h=r,g=!O.isNumber(l.y[t]);s.globals.markers.largestSize===0&&s.globals.hasNullValues&&s.seriesData.series[c][r+1]!==null&&!o&&(g=!0),r===1&&t===0&&(h=0),r===1&&t===1&&(h=1);let _=`apexcharts-marker`;e.markersAreInert(s)&&(_+=` no-pointer-events`);let v=Array.isArray(s.config.markers.size)?s.globals.markers.size[n]>0:s.config.markers.size>0;if(s.globals.markers.batched&&(v||a)&&!p&&!o){this._batchPoint(n,h,l.x[t],l.y[t],{invalid:g,graphics:d,pSize:a?i:void 0,trackPoint:!a});continue}if(v||a||p){f.kind===`canvas`&&(s.globals.pointsArray[n]===void 0&&(s.globals.pointsArray[n]=[]),s.globals.pointsArray[n][h]=[l.x[t],l.y[t]]),g||(_+=` w${O.randomId()}`);let e=this.getMarkerConfig({cssClass:_,seriesIndex:n,dataPointIndex:h}),r=s.config.series[c];if(r.data[h]&&(r.data[h].fillColor&&(e.pointFillColor=r.data[h].fillColor),r.data[h].strokeColor&&(e.pointStrokeColor=r.data[h].strokeColor)),i!==void 0&&(e.pSize=i),(l.x[t]<-s.globals.markers.largestSize||l.x[t]>s.layout.gridWidth+s.globals.markers.largestSize||l.y[t]<-s.globals.markers.largestSize||l.y[t]>s.layout.gridHeight+s.globals.markers.largestSize)&&(e.pSize=0),!g){if((s.globals.markers.size[n]>0||a||p)&&!u){let e=!a&&!p;e&&this._seriesWrap&&this._seriesWrapIndex===n?u=this._seriesWrap:(u=f.group({class:e?`apexcharts-series-markers`:``}),u.attr(`clip-path`,`url(#gridRectMarkerMask${s.globals.cuid})`),this.setupMarkerDelegation(u),e&&(this._seriesWrap=u,this._seriesWrapIndex=n))}m=f.drawMarker(l.x[t],l.y[t],e),m.attr(`rel`,h),m.attr(`j`,h),m.attr(`index`,n),m.node.setAttribute(`default-marker-size`,e.pSize),qe(m,l.x[t],s),this._filters.setSelectionFilter(m,n,h),u&&u.add(m)}}else s.globals.pointsArray[n]===void 0&&(s.globals.pointsArray[n]=[]),s.globals.pointsArray[n].push([l.x[t],l.y[t]])}return u}_batchPoint(e,t,n,r,{invalid:i,graphics:a,pSize:o,trackPoint:s}){let c=this.w;if(s&&(c.globals.pointsArray[e]===void 0&&(c.globals.pointsArray[e]=[]),c.globals.pointsArray[e][t]=[n,r]),i)return;(!this._batch||this._batch.seriesIndex!==e)&&(this._batch={seriesIndex:e,opts:this.getMarkerConfig({cssClass:``,seriesIndex:e}),sizes:new Map});let l=o===void 0?this._batch.opts.pSize:o;if(!(l>0))return;let u=c.globals.markers.largestSize;if(n<-u||n>c.layout.gridWidth+u||r<-u||r>c.layout.gridHeight+u)return;let d=this._batch.sizes.get(l);d||(d=[],this._batch.sizes.set(l,d)),d.push(a.getMarkerPath(n,r,this._batch.opts.shape,l))}flushBatch(t,n){let r=this._batch;if(this._batch=null,!r||r.seriesIndex!==n||!r.sizes.size)return[];let i=this.w,a=new H(this.w),o=r.opts,s=o.shape===`line`||o.shape===`plus`||o.shape===`cross`,c=s?o.pointFillColor:o.pointStrokeColor,l=s?o.pointFillOpacity:o.pointStrokeOpacity,u=[];return r.sizes.forEach((r,s)=>{if(!r.length)return;let d=a.drawPath({d:r.join(` `),fill:o.pointFillColor,fillOpacity:o.pointFillOpacity,stroke:c,strokeOpacity:l,strokeWidth:o.pointStrokeWidth,strokeDashArray:o.pointStrokeDashArray});d.attr({class:`apexcharts-marker-batch${e.markersAreInert(i)?` no-pointer-events`:``}`,"clip-path":`url(#gridRectMarkerMask${i.globals.cuid})`,shape:o.shape,index:n,"default-marker-size":s}),t.add(d),u.push(d)}),u}getMarkerConfig({cssClass:e,seriesIndex:t,dataPointIndex:n=null,radius:r=null,size:i=null,strokeWidth:a=null}){let o=this.w,s=this.getMarkerStyle(t),c=i===null?o.globals.markers.size[t]:i,l=o.config.markers;return n!==null&&l.discrete.length&&l.discrete.map(e=>{e.seriesIndex===t&&e.dataPointIndex===n&&(e.strokeColor!==void 0&&(s.pointStrokeColor=e.strokeColor),e.fillColor!==void 0&&(s.pointFillColor=e.fillColor),e.size!==void 0&&(c=e.size),e.shape!==void 0&&(s.pointShape=e.shape))}),{pSize:r===null?c:r,pRadius:r===null?l.radius:r,pointStrokeWidth:a===null?Array.isArray(l.strokeWidth)?l.strokeWidth[t]:l.strokeWidth:a,pointStrokeColor:s.pointStrokeColor,pointFillColor:s.pointFillColor,shape:s.pointShape||(Array.isArray(l.shape)?l.shape[t]:l.shape),class:e,pointStrokeOpacity:Array.isArray(l.strokeOpacity)?l.strokeOpacity[t]:l.strokeOpacity,pointStrokeDashArray:Array.isArray(l.strokeDashArray)?l.strokeDashArray[t]:l.strokeDashArray,pointFillOpacity:Array.isArray(l.fillOpacity)?l.fillOpacity[t]:l.fillOpacity,seriesIndex:t}}setupMarkerDelegation(e){let t=this.w,n=`.apexcharts-marker`;this._graphics.setupEventDelegation(e,n),e.node.addEventListener(`click`,r=>{t.config.markers.onClick&&H._findDelegateTarget(r.target,e.node,n)&&t.config.markers.onClick(r)}),e.node.addEventListener(`dblclick`,r=>{t.config.markers.onDblClick&&H._findDelegateTarget(r.target,e.node,n)&&t.config.markers.onDblClick(r)}),e.node.addEventListener(`touchstart`,t=>{let r=H._findDelegateTarget(t.target,e.node,n);r&&r.instance&&this._graphics.pathMouseDown(r.instance,t)},{passive:!0})}getMarkerStyle(e){let t=this.w,n=t.globals.markers.colors,r=t.config.markers.strokeColor||t.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(r)?r[e]:r,pointFillColor:Array.isArray(n)?n[e]:n}}},at=class{constructor(e,t){this.ctx=t,this.w=e,this.initialAnim=this.w.config.chart.animations.enabled,this.anim=new Xe(this.w),this.filters=new Qe(this.w),this.fill=new $e(this.w),this.markers=new it(this.w,this.ctx),this.graphics=new H(this.w),this._elPointsWrap=null,this._elPointsWrapParent=null,this._perSeries=null}draw(e,t,n){let r=this.w,i=this.graphics,a=tt(this.ctx,i),o=n.realIndex,s=n.pointsPos,c=n.zRatio,l=n.elParent,u=this._elPointsWrap;if((!u||this._elPointsWrapParent!==l)&&(u=a.group({class:`apexcharts-series-markers apexcharts-series-${r.config.chart.type}`}),u.attr(`clip-path`,`url(#gridRectMarkerMask${r.globals.cuid})`),this.markers.setupMarkerDelegation(u),l.add(u),this._elPointsWrap=u,this._elPointsWrapParent=l,this._perSeries=this._buildPerSeriesCache(o,a)),Array.isArray(s.x))for(let e=0;e<s.x.length;e++){let n=t+1,i=!0;t===0&&e===0&&(n=0),t===0&&e===1&&(n=1);let l=r.globals.markers.size[o];if(c!==1/0){let e=r.config.plotOptions.bubble;l=r.seriesData.seriesZ[o][n],e.zScaling&&(l/=c),e.minBubbleRadius&&l<e.minBubbleRadius&&(l=e.minBubbleRadius),e.maxBubbleRadius&&l>e.maxBubbleRadius&&(l=e.maxBubbleRadius)}let d=s.x[e],f=s.y[e];if(l||=0,(f===null||r.seriesData.series[o][n]===void 0)&&(i=!1),i){let e=this.drawPoint(d,f,l,o,n,t);u.add(e),a.kind===`canvas`&&(r.globals.pointsArray[o]===void 0&&(r.globals.pointsArray[o]=[]),r.globals.pointsArray[o][n]=[d,f])}}}_buildPerSeriesCache(e,t){let n=this.w;return{realIndex:e,emit:t,isBubble:n.config.chart.type===`bubble`||n.globals.comboCharts&&n.config.series[e]&&n.config.series[e].type===`bubble`,canCacheConfig:!n.config.markers.discrete.length,markerConfig:null,fillCacheable:void 0,fillCircle:void 0,dropShadowEnabled:n.config.chart.dropShadow.enabled,doInitialAnim:this.initialAnim&&!n.globals.dataChanged&&!n.globals.resized,jitter:n.config.plotOptions.scatter?.jitter,anim:null}}drawPoint(e,t,n,r,i,a){let o=this.w,s=r,c=this.anim,l=this.filters,u=this.fill,d=this.markers,f=this._perSeries;(!f||f.realIndex!==r)&&(f=this._perSeries=this._buildPerSeriesCache(r,tt(this.ctx,this.graphics)));let p=f.emit,m;f.canCacheConfig?(f.markerConfig||(f.markerConfig=d.getMarkerConfig({cssClass:`apexcharts-marker`,seriesIndex:s,dataPointIndex:i,radius:f.isBubble?n:null})),m=f.markerConfig,f.isBubble&&(m.pSize=n,m.pRadius=n)):m=d.getMarkerConfig({cssClass:`apexcharts-marker`,seriesIndex:s,dataPointIndex:i,radius:f.isBubble?n:null});let h=o.config.series[s].data[i],g;f.fillCircle===void 0?(g=u.fillPath({seriesNumber:r,dataPointIndex:i,color:m.pointFillColor,patternUnits:`objectBoundingBox`,value:o.seriesData.series[r][a]}),f.fillCacheable===void 0&&(f.fillCacheable=f.canCacheConfig&&u.getFillType(r)===`solid`&&typeof m.pointFillColor==`string`&&!!m.pointFillColor),f.fillCacheable&&!h?.fillColor&&(f.fillCircle=g)):g=f.fillCircle;let _=p.drawMarker(e,t,m);h?.fillColor&&(g=h.fillColor);let v=f.jitter;if(v?.enabled&&v.distributed&&o.globals.colors.length){let e=Math.round(o.seriesData.seriesX[r]?.[i]);isNaN(e)||(g=o.globals.colors[e%o.globals.colors.length])}if(_.attr({fill:g}),f.dropShadowEnabled){let e=o.config.chart.dropShadow;l.dropShadow(_,e,r)}if(f.doInitialAnim){if(!f.anim){let e=o.config.chart.animations,t=o.globals.dataPoints||1,n=e.animateGradually,r=n&&n.enabled!==!1;f.anim={popSpeed:e.speed,baseDelay:r?Math.min(20,e.speed*.5/Math.max(1,t)):0}}let e=Ye({style:f.anim.baseDelay>0?`sequential`:`none`,index:i,baseDelay:f.anim.baseDelay});c.animatePop(_,{speed:f.anim.popSpeed,delay:e,onComplete:()=>c.animationCompleted(_)})}else o.globals.animationEnded=!0;return _.attr({rel:i,j:i,index:r,"default-marker-size":m.pSize}),l.setSelectionFilter(_,r,i),_}centerTextInBubble(e){let t=this.w;return e+=parseInt(t.config.dataLabels.style.fontSize,10)/4,{y:e}}},ot=(e,t,n,r)=>{if(typeof e!=`function`)return e;let i=e({series:t.seriesData.series,seriesIndex:n,dataPointIndex:r,w:t});return Number.isFinite(i)?i:0},st=class{constructor(e,t=null){this.w=e,this.ctx=t}dataLabelsCorrection(e,t,n,r,i,a,o){let s=this.w,c=new H(this.w),l=!1,u=c.getTextRects(n,o),d=u.width,f=u.height;t<0&&(t=0),t>s.layout.gridHeight+f&&(t=s.layout.gridHeight+f/2),s.globals.dataLabelsRects[r]===void 0&&(s.globals.dataLabelsRects[r]=[]),s.globals.dataLabelsRects[r].push({x:e,y:t,width:d,height:f});let p=s.globals.dataLabelsRects[r].length-2,m=s.globals.lastDrawnDataLabelsIndexes[r]===void 0?0:s.globals.lastDrawnDataLabelsIndexes[r][s.globals.lastDrawnDataLabelsIndexes[r].length-1];if(s.globals.dataLabelsRects[r][p]!==void 0){let n=s.globals.dataLabelsRects[r][m];(e>n.x+n.width||t>n.y+n.height||t+f<n.y||e+d<n.x)&&(l=!0)}return(i===0||a)&&(l=!0),{x:e,y:t,textRects:u,drawnextLabel:l}}drawDataLabel({type:e,pos:t,i:n,j:r,isRangeStart:i,strokeWidth:a=2}){let o=this.w,s=new H(this.w),c=o.config.dataLabels,l=0,u=0,d=r,f=null;if(o.globals.collapsedSeriesIndices.indexOf(n)!==-1||!c.enabled||!Array.isArray(t.x))return f;f=s.group({class:`apexcharts-data-labels`});for(let s=0;s<t.x.length;s++)if(r===1&&s===0&&(d=0),r===1&&s===1&&(d=1),l=t.x[s]+ot(c.offsetX,o,n,d),u=t.y[s]+ot(c.offsetY,o,n,d)+a,!isNaN(l)){let r=o.seriesData.series[n][d];e===`rangeArea`&&(r=i?o.rangeData.seriesRangeStart[n][d]:o.rangeData.seriesRangeEnd[n][d]);let a=``,c=e=>o.config.dataLabels.formatter(e,{seriesIndex:n,dataPointIndex:d,w:o});o.config.chart.type===`bubble`?(r=o.seriesData.seriesZ[n][d],a=c(r),u=t.y[s],u=new at(this.w,this.ctx).centerTextInBubble(u).y):r!==void 0&&(a=c(r));let p=o.config.dataLabels.textAnchor;o.globals.isSlopeChart&&(p=d===0?`end`:d===o.config.series[n].data.length-1?`start`:`middle`),this.plotDataLabelsText({x:l,y:u,text:a,i:n,j:d,parent:f,offsetCorrection:!0,dataLabelsConfig:o.config.dataLabels,textAnchor:p})}return f}plotDataLabelsText(e){let t=this.w,n=new H(this.w),{x:r,y:i,i:a,j:o,text:s,textAnchor:c,fontSize:l,parent:u,dataLabelsConfig:d,color:f,alwaysDrawDataLabel:p,offsetCorrection:m,className:h,seriesIndex:g=a,dataPointIndex:_=o}=e,v=null;if(Array.isArray(t.config.dataLabels.enabledOnSeries)&&t.config.dataLabels.enabledOnSeries.indexOf(a)<0)return v;let y={x:r,y:i,drawnextLabel:!0,textRects:null};if(m&&(y=this.dataLabelsCorrection(r,i,s,a,o,p,parseInt(d.style.fontSize,10).toString())),t.interact.zoomed||(r=y.x,i=y.y),y.textRects){let e=t.globals.barPadForNumericAxis||0;(r<-(e+20)-y.textRects.width||r>t.layout.gridWidth+y.textRects.width+e+30)&&(s=``)}let b=t.globals.dataLabels.style.colors[a];((t.config.chart.type===`bar`||t.config.chart.type===`rangeBar`)&&t.config.plotOptions.bar.distributed||t.config.dataLabels.distributed)&&(b=t.globals.dataLabels.style.colors[o]),typeof b==`function`&&(b=b({series:t.seriesData.series,seriesIndex:a,dataPointIndex:o,w:t})),f&&(b=f);let x=t.config.chart.type===`bar`||t.config.chart.type===`rangeBar`,S=x?0:ot(d.offsetX,t,g,_),C=x?0:ot(d.offsetY,t,g,_),w=S,T=C;if(t.globals.isSlopeChart&&(o!==0&&(w=S*-2+5),o!==0&&o!==t.config.series[a].data.length-1&&(w=0)),y.drawnextLabel){if(c===`middle`&&r===t.layout.gridWidth&&(c=`end`),v=n.drawText({x:r+w,y:i+T,foreColor:b,textAnchor:c||d.textAnchor,text:s,fontSize:l||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||`normal`}),v.attr({class:h||`apexcharts-datalabel`,cx:r,cy:i}),d.dropShadow.enabled){let e=d.dropShadow;new Qe(this.w).dropShadow(v,e)}u.add(v),qe(v,r,t),t.globals.lastDrawnDataLabelsIndexes[a]===void 0&&(t.globals.lastDrawnDataLabelsIndexes[a]=[]),t.globals.lastDrawnDataLabelsIndexes[a].push(o)}return v}addBackgroundToDataLabel(e,t){let n=this.w,r=n.config.dataLabels.background,i=r.padding,a=r.padding/2,o=t.width,s=t.height,c=new H(this.w).drawRect(t.x-i,t.y-a/2,o+i*2,s+a,r.borderRadius,n.config.chart.background===`transparent`||!n.config.chart.background?`#fff`:n.config.chart.background,r.opacity,r.borderWidth,r.borderColor);return r.dropShadow.enabled&&new Qe(this.w).dropShadow(c,r.dropShadow),c}dataLabelsBackground(){var e;let t=this.w;if(t.config.chart.type===`bubble`)return;let n=t.dom.baseEl.querySelectorAll(`.apexcharts-datalabels text`);for(let r=0;r<n.length;r++){let i=n[r],a=i.getBBox(),o=null;if(a.width&&a.height&&(o=this.addBackgroundToDataLabel(i,a)),o){(e=i.parentNode)==null||e.insertBefore(o.node,i);let n=t.config.dataLabels.background.backgroundColor||i.getAttribute(`fill`);t.config.chart.animations.enabled&&!t.globals.resized&&!t.globals.dataChanged?o.animate().attr({fill:n}):o.attr({fill:n}),i.setAttribute(`fill`,t.config.dataLabels.background.foreColor);let r=i.getAttribute(`cx`);r!==null&&qe(o,parseFloat(r),t)}}}bringForward(){let e=this.w,t=e.dom.baseEl.querySelectorAll(`.apexcharts-datalabels`),n=e.dom.baseEl.querySelector(`.apexcharts-plot-series:last-child`);for(let e=0;e<t.length;e++)n&&n.insertBefore(t[e],n.nextSibling)}},ct=class{static invalidateAll(e){e&&e.globals&&(e.globals.cachedSelectors&&(e.globals.cachedSelectors={}),e.globals.domCache&&e.globals.domCache.clear(),e.globals.dimensionCache={})}static invalidateDimensions(e){e&&e.globals&&(e.globals.dimensionCache={})}static invalidateSelectors(e){e&&e.globals&&e.globals.cachedSelectors&&(e.globals.cachedSelectors={})}static getCachedSelector(e,t,n){return!e||!e.globals?n():(e.globals.cachedSelectors||(e.globals.cachedSelectors={}),e.globals.cachedSelectors[t]||(e.globals.cachedSelectors[t]=n()),e.globals.cachedSelectors[t])}static getCachedDimension(e,t,n,r=1e3){if(!e||!e.globals)return n();e.globals.dimensionCache||(e.globals.dimensionCache={});let i=e.globals.dimensionCache[t],a=Date.now();if(i&&i.lastUpdate&&a-i.lastUpdate<r)return i.value;let o=n();return e.globals.dimensionCache[t]={value:o,lastUpdate:a},o}static cacheDOMElement(e,t,n){e&&e.globals&&(e.globals.domCache||(e.globals.domCache=new Map),e.globals.domCache.set(t,n))}static getCachedDOMElement(e,t){return!e||!e.globals||!e.globals.domCache?null:e.globals.domCache.get(t)||null}},lt=class{constructor(e,{theme:t=null,timeScale:n=null}={}){this.w=e,this.theme=t,this.timeScale=n}getLabel(e,t,n,r,i=[],a=`12px`,o=!0){let s=this.w,c=e[r]===void 0?``:e[r],l=c,u=s.formatters.xLabelFormatter,d=s.config.xaxis.labels.formatter,f=new A(this.w),p=c;o&&(l=f.xLabelFormat(u,c,p,{i:r,dateFormatter:new k(this.w).formatDate,w:s}),d!==void 0&&(l=d(c,e[r],{i:r,dateFormatter:new k(this.w).formatDate,w:s}))),t.length>0?(n=t[r].position,l=t[r].value):s.config.xaxis.type===`datetime`&&d===void 0&&(l=``),l===void 0&&(l=``),l=Array.isArray(l)?l:l.toString();let m=new H(this.w),h={};h=s.layout.rotateXLabels&&o?m.getTextRects(l,parseInt(a,10).toString(),null,`rotate(${s.config.xaxis.labels.rotate} 0 0)`,!1):m.getTextRects(l,parseInt(a,10).toString());let g=!s.config.xaxis.labels.showDuplicates&&this.timeScale;return!Array.isArray(l)&&(String(l)===`NaN`||i.indexOf(l)>=0&&g)&&(l=``),{x:n,text:l,textRect:h}}checkLabelBasedOnTickamount(e,t,n){let r=this.w,i=r.config.xaxis.tickAmount;return i===`dataPoints`&&(i=Math.round(r.layout.gridWidth/120)),i>n||e%Math.round(n/(i+1))===0||(t.text=``),t}checkForOverflowingLabels(e,t,n,r,i){let a=this.w;if(e===0&&a.globals.skipFirstTimelinelabel&&(t.text=``),e===n-1&&a.globals.skipLastTimelinelabel&&(t.text=``),a.config.xaxis.labels.hideOverlappingLabels&&r.length>0){let e=i[i.length-1];if(a.config.xaxis.labels.trim&&a.config.xaxis.type!==`datetime`)return t;t.x<e.textRect.width/(a.layout.rotateXLabels?Math.max(Math.abs(a.config.xaxis.labels.rotate),1)/12:1.01)+e.x&&(t.text=``)}return t}checkForReversedLabels(e,t){let n=this.w;return n.config.yaxis[e]&&n.config.yaxis[e].reversed&&t.reverse(),t}yAxisAllSeriesCollapsed(e){let t=this.w.globals;return!t.seriesYAxisMap[e].some(e=>t.collapsedSeriesIndices.indexOf(e)===-1)}translateYAxisIndex(e){let t=this.w,n=t.globals,r=t.config.yaxis;return t.seriesData.series.length>r.length||r.some(e=>Array.isArray(e.seriesName))?e:n.seriesYAxisReverseMap[e]}isYAxisHidden(e){let t=this.w,n=t.config.yaxis[e];if(!n.show||this.yAxisAllSeriesCollapsed(e))return!0;if(!n.showForNullSeries){let n=t.globals.seriesYAxisMap[e],r=new ue(this.w);return n.every(e=>r.isSeriesNull(e))}return!1}getYAxisForeColor(e,t){var n;let r=this.w;return Array.isArray(e)&&r.globals.yAxisScale[t]&&((n=this.theme)==null||n.pushExtraColors(e,r.globals.yAxisScale[t].result.length,!1)),e}drawYAxisTicks(e,t,n,r,i,a,o){let s=this.w,c=new H(this.w),l=s.layout.translateY+s.config.yaxis[i].labels.offsetY;if(s.globals.isBarHorizontal?l=0:s.config.chart.type===`heatmap`&&(l+=a/2),r.show&&t>0){s.config.yaxis[i].opposite===!0&&(e+=r.width);for(let i=t;i>=0;i--){let t=c.drawLine(e+n.offsetX-r.width+r.offsetX,l+r.offsetY,e+n.offsetX+r.offsetX,l+r.offsetY,r.color);o.add(t),l+=a}}}},ut=class{constructor(e,t,n){this.w=e,this.ctx=t,this.elgrid=n,this.axesUtils=new lt(e,{theme:t.theme,timeScale:t.timeScale}),this.xaxisLabels=e.labelData.labels.slice(),e.labelData.timescaleLabels.length>0&&!e.globals.isBarHorizontal&&(this.xaxisLabels=e.labelData.timescaleLabels.slice()),e.config.xaxis.overwriteCategories&&(this.xaxisLabels=e.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],this.offY=e.config.xaxis.position===`top`?0:e.layout.gridHeight,this.offY+=e.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal=e.config.chart.type===`bar`&&e.config.plotOptions.bar.horizontal,this.xaxisFontSize=e.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=e.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=e.config.xaxis.labels.style.colors,this.xaxisBorderWidth=e.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=e.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth=String(this.xaxisBorderWidth).indexOf(`%`)>-1?e.layout.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=e.config.xaxis.axisBorder.height,this.yaxis=e.config.yaxis[0]}drawXaxis(){let e=this.w,t=new H(this.w),n=t.group({class:`apexcharts-xaxis`,transform:`translate(${e.config.xaxis.offsetX}, ${e.config.xaxis.offsetY})`}),r=t.group({class:`apexcharts-xaxis-texts-g`,transform:`translate(${e.layout.translateXAxisX}, ${e.layout.translateXAxisY})`});n.add(r);let i=[];for(let e=0;e<this.xaxisLabels.length;e++)i.push(this.xaxisLabels[e]);if(this.drawXAxisLabelAndGroup(!0,t,r,i,e.axisFlags.isXNumeric,(e,t)=>t),e.labelData.hasXaxisGroups){let n=e.labelData.groups;i=[];for(let e=0;e<n.length;e++)i.push(n[e].title);let a={};e.config.xaxis.group.style&&(a.xaxisFontSize=e.config.xaxis.group.style.fontSize,a.xaxisFontFamily=e.config.xaxis.group.style.fontFamily,a.xaxisForeColors=e.config.xaxis.group.style.colors,a.fontWeight=e.config.xaxis.group.style.fontWeight,a.cssClass=e.config.xaxis.group.style.cssClass),this.drawXAxisLabelAndGroup(!1,t,r,i,!1,(e,t)=>n[e].cols*t,a)}if(e.config.xaxis.title.text!==void 0){let r=t.group({class:`apexcharts-xaxis-title`}),i=t.drawText({x:e.layout.gridWidth/2+e.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+(e.config.xaxis.position===`bottom`?e.layout.xAxisLabelsHeight:-e.layout.xAxisLabelsHeight-10)+e.config.xaxis.title.offsetY,text:e.config.xaxis.title.text,textAnchor:`middle`,fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:`apexcharts-xaxis-title-text `+e.config.xaxis.title.style.cssClass});r.add(i),n.add(r)}if(e.config.xaxis.axisBorder.show){let r=e.globals.barPadForNumericAxis,i=t.drawLine(e.globals.padHorizontal+e.config.xaxis.axisBorder.offsetX-r,this.offY,this.xaxisBorderWidth+r,this.offY,e.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(i):n.add(i)}return n}drawXAxisLabelAndGroup(e,t,n,r,i,a,o={}){let s=[],c=[],l=this.w,u=o.xaxisFontSize||this.xaxisFontSize,d=o.xaxisFontFamily||this.xaxisFontFamily,f=o.xaxisForeColors||this.xaxisForeColors,p=o.fontWeight||l.config.xaxis.labels.style.fontWeight,m=o.cssClass||l.config.xaxis.labels.style.cssClass,h,g=l.globals.padHorizontal,_=r.length,v=l.config.xaxis.type===`category`?l.globals.dataPoints:_;if(v===0&&_>v&&(v=_),i){let e=Math.max(Number(l.config.xaxis.tickAmount)||1,v>1?v-1:v);h=l.layout.gridWidth/Math.min(e,_-1),g=g+a(0,h)/2+l.config.xaxis.labels.offsetX}else h=l.layout.gridWidth/v,g=g+a(0,h)+l.config.xaxis.labels.offsetX;for(let i=0;i<=_-1;i++){let o=g-a(i,h)/2+l.config.xaxis.labels.offsetX;i===0&&_===1&&h/2===g&&v===1&&(o=l.layout.gridWidth/2);let y=this.axesUtils.getLabel(r,l.labelData.timescaleLabels,o,i,s,u,e),b=28;l.layout.rotateXLabels&&e&&(b=22),l.config.xaxis.title.text&&l.config.xaxis.position===`top`&&(b+=parseFloat(l.config.xaxis.title.style.fontSize)+2),e||(b=b+parseFloat(u)+(l.layout.xAxisLabelsHeight-l.layout.xAxisGroupLabelsHeight)+(l.layout.rotateXLabels?10:0)),y=l.config.xaxis.tickAmount!==void 0&&l.config.xaxis.tickAmount!==`dataPoints`&&l.config.xaxis.type!==`datetime`?this.axesUtils.checkLabelBasedOnTickamount(i,y,_):this.axesUtils.checkForOverflowingLabels(i,y,_,s,c);let x=()=>e&&l.config.xaxis.convertedCatToNumeric?f[l.globals.minX+i-1]:f[i],S=(y.textRect?.width??0)/2,C=y.x+S<0;if(l.config.xaxis.labels.show&&!C){let r=t.drawText({x:y.x,y:this.offY+l.config.xaxis.labels.offsetY+b-(l.config.xaxis.position===`top`?l.layout.xAxisHeight+l.config.xaxis.axisTicks.height-2:0),text:y.text,textAnchor:`middle`,fontWeight:p,fontSize:u,fontFamily:d,foreColor:Array.isArray(f)?x():f,isPlainText:!1,cssClass:(e?`apexcharts-xaxis-label `:`apexcharts-xaxis-group-label `)+m});if(n.add(r),r.on(`click`,e=>{if(typeof l.config.chart.events.xAxisLabelClick==`function`){let t=Object.assign({},l,{labelIndex:i});l.config.chart.events.xAxisLabelClick(e,this.ctx,t)}}),e){let e=T.createElementNS(B,`title`);e.textContent=Array.isArray(y.text)?y.text.join(` `):y.text,r.node.appendChild(e),y.text!==``&&(s.push(y.text),c.push(y))}}i<_-1&&(g+=a(i+1,h))}}drawXaxisInversed(e){let t=this.w,n=new H(this.w),r=t.config.yaxis[0].opposite?t.globals.translateYAxisX[e]:0,i=n.group({class:`apexcharts-yaxis apexcharts-xaxis-inversed`,rel:e}),a=n.group({class:`apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g`,transform:`translate(`+r+`, 0)`});i.add(a);let o=[];if(t.config.yaxis[e].show)for(let e=0;e<this.xaxisLabels.length;e++)o.push(this.xaxisLabels[e]);let s=t.layout.gridHeight/o.length,c=-(s/2.2),l=t.formatters.yLabelFormatters[0],u=t.config.yaxis[0].labels;if(u.show)for(let r=0;r<=o.length-1;r++){let i=o[r]===void 0?``:o[r];i=l(i,{seriesIndex:e,dataPointIndex:r,w:t});let d=this.axesUtils.getYAxisForeColor(u.style.colors,e),f=()=>Array.isArray(d)?d[r]:d,p=0;Array.isArray(i)&&(p=i.length/2*parseInt(u.style.fontSize,10));let m=u.offsetX-15,h=`end`;this.yaxis.opposite&&(h=`start`),t.config.yaxis[0].labels.align===`left`?(m=u.offsetX,h=`start`):t.config.yaxis[0].labels.align===`center`?(m=u.offsetX,h=`middle`):t.config.yaxis[0].labels.align===`right`&&(h=`end`);let g=n.drawText({x:m,y:c+s+u.offsetY-p,text:i,textAnchor:h,foreColor:f(),fontSize:u.style.fontSize,fontFamily:u.style.fontFamily,fontWeight:u.style.fontWeight,isPlainText:!1,cssClass:`apexcharts-yaxis-label `+u.style.cssClass,maxWidth:u.maxWidth});a.add(g),g.on(`click`,e=>{if(typeof t.config.chart.events.xAxisLabelClick==`function`){let n=Object.assign({},t,{labelIndex:r});t.config.chart.events.xAxisLabelClick(e,this.ctx,n)}});let _=T.createElementNS(B,`title`);if(_.textContent=Array.isArray(i)?i.join(` `):i,g.node.appendChild(_),t.config.yaxis[e].labels.rotate!==0){let r=n.rotateAroundCenter(g.node);g.node.setAttribute(`transform`,`rotate(${t.config.yaxis[e].labels.rotate} 0 ${r.y})`)}c+=s}if(t.config.yaxis[0].title.text!==void 0){let e=n.group({class:`apexcharts-yaxis-title apexcharts-xaxis-title-inversed`,transform:`translate(`+r+`, 0)`}),a=n.drawText({x:t.config.yaxis[0].title.offsetX,y:t.layout.gridHeight/2+t.config.yaxis[0].title.offsetY,text:t.config.yaxis[0].title.text,textAnchor:`middle`,foreColor:t.config.yaxis[0].title.style.color,fontSize:t.config.yaxis[0].title.style.fontSize,fontWeight:t.config.yaxis[0].title.style.fontWeight,fontFamily:t.config.yaxis[0].title.style.fontFamily,cssClass:`apexcharts-yaxis-title-text `+t.config.yaxis[0].title.style.cssClass});e.add(a),i.add(e)}let d=0;this.isCategoryBarHorizontal&&t.config.yaxis[0].opposite&&(d=t.layout.gridWidth);let f=t.config.xaxis.axisBorder;if(f.show){let e=n.drawLine(t.globals.padHorizontal+f.offsetX+d,1+f.offsetY,t.globals.padHorizontal+f.offsetX+d,t.layout.gridHeight+f.offsetY,f.color,0);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(e):i.add(e)}return t.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(d,o.length,t.config.yaxis[0].axisBorder,t.config.yaxis[0].axisTicks,0,s,i),i}drawXaxisTicks(e,t,n){let r=this.w,i=e;if(e<0||e-2>r.layout.gridWidth)return;let a=this.offY+r.config.xaxis.axisTicks.offsetY;if(t=t+a+r.config.xaxis.axisTicks.height,r.config.xaxis.position===`top`&&(t=a-r.config.xaxis.axisTicks.height),r.config.xaxis.axisTicks.show){let o=new H(this.w).drawLine(e+r.config.xaxis.axisTicks.offsetX,a+r.config.xaxis.offsetY,i+r.config.xaxis.axisTicks.offsetX,t+r.config.xaxis.offsetY,r.config.xaxis.axisTicks.color);n.add(o),o.node.classList.add(`apexcharts-xaxis-tick`)}}getXAxisTicksPositions(){let e=this.w,t=[],n=this.xaxisLabels.length,r=e.globals.padHorizontal;if(e.labelData.timescaleLabels.length>0)for(let e=0;e<n;e++)r=this.xaxisLabels[e].position,t.push(r);else{let i=n;for(let n=0;n<i;n++){let n=i;e.axisFlags.isXNumeric&&e.config.chart.type!==`bar`&&--n,r+=e.layout.gridWidth/n,t.push(r)}}return t}xAxisLabelCorrections(){var e,t;let n=this.w,r=new H(this.w),i=n.dom.baseEl.querySelector(`.apexcharts-xaxis-texts-g`),a=n.dom.baseEl.querySelectorAll(`.apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)`),o=n.dom.baseEl.querySelectorAll(`.apexcharts-yaxis-inversed text`),s=n.dom.baseEl.querySelectorAll(`.apexcharts-xaxis-inversed-texts-g text tspan`);if(n.layout.rotateXLabels||n.config.xaxis.labels.rotateAlways)for(let e=0;e<a.length;e++){let t=r.rotateAroundCenter(a[e]);--t.y,t.x+=1,a[e].setAttribute(`transform`,`rotate(${n.config.xaxis.labels.rotate} ${t.x} ${t.y})`),a[e].setAttribute(`text-anchor`,`end`),i?.setAttribute(`transform`,`translate(0, -10)`);let o=a[e].childNodes;n.config.xaxis.labels.trim&&Array.prototype.forEach.call(o,e=>{r.placeTextWithEllipsis(e,e.textContent,n.layout.xAxisLabelsHeight-(n.config.legend.position===`bottom`?20:10))})}else{let e=n.layout.gridWidth/(n.labelData.labels.length+1);for(let t=0;t<a.length;t++){let i=a[t].childNodes;n.config.xaxis.labels.trim&&n.config.xaxis.type!==`datetime`&&Array.prototype.forEach.call(i,t=>{r.placeTextWithEllipsis(t,t.textContent,e)})}}if(o.length>0){let i=o[o.length-1].getBBox(),a=o[0].getBBox();i.x<-20&&((e=o[o.length-1].parentNode)==null||e.removeChild(o[o.length-1])),a.x+a.width>n.layout.gridWidth&&!n.globals.isBarHorizontal&&((t=o[0].parentNode)==null||t.removeChild(o[0]));for(let e=0;e<s.length;e++)r.placeTextWithEllipsis(s[e],s[e].textContent??``,n.config.yaxis[0].labels.maxWidth-(n.config.yaxis[0].title.text?parseFloat(n.config.yaxis[0].title.style.fontSize)*2:0)-15)}}},dt=class{constructor(e,t){this.w=e,this.ctx=t,this.xaxisLabels=e.labelData.labels.slice(),this.axesUtils=new lt(t.w,{theme:t.theme,timeScale:t.timeScale}),this.isRangeBar=e.rangeData.seriesRange.length&&e.globals.isBarHorizontal,e.labelData.timescaleLabels.length>0&&(this.xaxisLabels=e.labelData.timescaleLabels.slice())}drawGridArea(e=null){let t=this.w,n=new H(this.w);e||=n.group({class:`apexcharts-grid`});let r=n.drawLine(t.globals.padHorizontal,1,t.globals.padHorizontal,t.layout.gridHeight,`transparent`),i=n.drawLine(t.globals.padHorizontal,t.layout.gridHeight,t.layout.gridWidth,t.layout.gridHeight,`transparent`);return e.add(i),e.add(r),e}drawGrid(){if(this.w.globals.axisCharts){let e=this.renderGrid();return this.drawGridArea(e.el),e}return null}createGridMask(){let e=this.w,t=e.globals,n=new H(this.w),r=Array.isArray(e.config.stroke.width)?Math.max(...e.config.stroke.width):e.config.stroke.width,i=e=>{let t=T.createElementNS(B,`clipPath`);return t.setAttribute(`id`,e),t};e.dom.elGridRectMask=i(`gridRectMask${t.cuid}`),e.dom.elGridRectBarMask=i(`gridRectBarMask${t.cuid}`),e.dom.elGridRectMarkerMask=i(`gridRectMarkerMask${t.cuid}`),e.dom.elForecastMask=i(`forecastMask${t.cuid}`),e.dom.elNonForecastMask=i(`nonForecastMask${t.cuid}`);let a=[`bar`,`rangeBar`,`candlestick`,`boxPlot`,`violin`].includes(e.config.chart.type)||e.globals.comboBarCount>0,o=0,s=0;a&&e.axisFlags.isXNumeric&&!e.globals.isBarHorizontal&&(o=Math.max(e.layout.gridPad.left,t.barPadForNumericAxis),s=Math.max(e.layout.gridPad.right,t.barPadForNumericAxis)),e.dom.elGridRect=n.drawRect(-r/2-2,-r/2-2,e.layout.gridWidth+r+4,e.layout.gridHeight+r+4,0,`#fff`),e.dom.elGridRectBar=n.drawRect(-r/2-o-2,-r/2-2,e.layout.gridWidth+r+s+o+4,e.layout.gridHeight+r+4,0,`#fff`);let c=e.globals.markers.largestSize;e.dom.elGridRectMarker=n.drawRect(Math.min(-r/2-o-2,-c),-c,e.layout.gridWidth+Math.max(r+s+o+4,c*2),e.layout.gridHeight+c*2,0,`#fff`),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectBarMask.appendChild(e.dom.elGridRectBar.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);let l=e.dom.elDefs.node;l.appendChild(e.dom.elGridRectMask),l.appendChild(e.dom.elGridRectBarMask),l.appendChild(e.dom.elGridRectMarkerMask),l.appendChild(e.dom.elForecastMask),l.appendChild(e.dom.elNonForecastMask)}_drawGridLines({i:e,x1:t,y1:n,x2:r,y2:i,xCount:a,parent:o}){let s=this.w;if(!(e===0&&s.globals.skipFirstTimelinelabel||e===a-1&&s.globals.skipLastTimelinelabel&&!s.config.xaxis.labels.formatter||s.config.chart.type===`radar`)){s.config.grid.xaxis.lines.show&&this._drawGridLine({i:e,x1:t,y1:n,x2:r,y2:i,xCount:a,parent:o});let c=0;if(s.labelData.hasXaxisGroups&&s.config.xaxis.tickPlacement===`between`){let t=s.labelData.groups;if(t){let n=0;for(let r=0;n<e&&r<t.length;r++)n+=t[r].cols;n===e&&(c=s.layout.xAxisLabelsHeight*.6)}}new ut(this.w,this.ctx).drawXaxisTicks(t,c,s.dom.elGraphical)}}_drawGridLine({i:e,x1:t,y1:n,x2:r,y2:i,xCount:a,parent:o}){let s=this.w,c=o.node.classList.contains(`apexcharts-gridlines-horizontal`),l=s.globals.barPadForNumericAxis,u=n===0&&i===0||t===0&&r===0||n===s.layout.gridHeight&&i===s.layout.gridHeight||s.globals.isBarHorizontal&&(e===0||e===a-1),d=new H(this.w).drawLine(t-(c?l:0),n,r+(c?l:0),i,s.config.grid.borderColor,s.config.grid.strokeDashArray);d.node.classList.add(`apexcharts-gridline`),u&&s.config.grid.show?this.elGridBorders.add(d):o.add(d)}_drawGridBandRect({c:e,x1:t,y1:n,x2:r,y2:i,type:a}){let o=this.w,s=new H(this.w),c=o.globals.barPadForNumericAxis,l=o.config.grid[a].colors[e],u=s.drawRect(t-(a===`row`?c:0),n,r+(a===`row`?c*2:0),i,0,l,o.config.grid[a].opacity);this.elg.add(u),u.attr(`clip-path`,`url(#gridRectMask${o.globals.cuid})`),u.node.classList.add(`apexcharts-grid-${a}`)}_drawXYLines({xCount:e,tickAmount:t}){let n=this.w,r=({xC:t,x1:r,y1:i,x2:a,y2:o})=>{for(let s=0;s<t;s++)r=this.xaxisLabels[s].position,a=this.xaxisLabels[s].position,!(r<0||r-2>n.layout.gridWidth)&&this._drawGridLines({i:s,x1:r,y1:i,x2:a,y2:o,xCount:e,parent:this.elgridLinesV})},i=({xC:t,x1:r,y1:i,x2:a,y2:o})=>{for(let s=0;s<t+ +!n.axisFlags.isXNumeric;s++)s===0&&t===1&&n.globals.dataPoints===1&&(r=n.layout.gridWidth/2,a=r),this._drawGridLines({i:s,x1:r,y1:i,x2:a,y2:o,xCount:e,parent:this.elgridLinesV}),r+=n.layout.gridWidth/(n.axisFlags.isXNumeric?t-1:t),a=r};if(n.config.grid.xaxis.lines.show||n.config.xaxis.axisTicks.show){let t=n.globals.padHorizontal,a,o=n.layout.gridHeight;n.labelData.timescaleLabels.length?r({xC:e,x1:t,y1:0,x2:a,y2:o}):(n.axisFlags.isXNumeric&&(e=n.globals.xAxisScale?.result.length),i({xC:e,x1:t,y1:0,x2:a,y2:o}))}if(n.config.grid.yaxis.lines.show){let e=0,r=0,i=n.layout.gridWidth,a=t+1;this.isRangeBar&&(a=n.labelData.labels.length);for(let o=0;o<a+ +!!this.isRangeBar;o++)this._drawGridLine({i:o,xCount:a+ +!!this.isRangeBar,x1:0,y1:e,x2:i,y2:r,parent:this.elgridLinesH}),e+=n.layout.gridHeight/(this.isRangeBar?a:t),r=e}}_drawInvertedXYLines({xCount:e}){let t=this.w;if(t.config.grid.xaxis.lines.show||t.config.xaxis.axisTicks.show){let n=t.globals.padHorizontal,r,i=t.layout.gridHeight;for(let a=0;a<e+1;a++)t.config.grid.xaxis.lines.show&&this._drawGridLine({i:a,xCount:e+1,x1:n,y1:0,x2:r,y2:i,parent:this.elgridLinesV}),new ut(this.w,this.ctx).drawXaxisTicks(n,0,t.dom.elGraphical),n+=t.layout.gridWidth/e,r=n}if(t.config.grid.yaxis.lines.show){let e=0,n=0,r=t.layout.gridWidth;for(let i=0;i<t.globals.dataPoints+1;i++)this._drawGridLine({i,xCount:t.globals.dataPoints+1,x1:0,y1:e,x2:r,y2:n,parent:this.elgridLinesH}),e+=t.layout.gridHeight/t.globals.dataPoints,n=e}}renderGrid(){let e=this.w,t=e.globals,n=new H(this.w);this.elg=n.group({class:`apexcharts-grid`}),this.elgridLinesH=n.group({class:`apexcharts-gridlines-horizontal`}),this.elgridLinesV=n.group({class:`apexcharts-gridlines-vertical`}),this.elGridBorders=n.group({class:`apexcharts-grid-borders`}),this.elg.add(this.elgridLinesH),this.elg.add(this.elgridLinesV),e.config.grid.show||(this.elgridLinesV.hide(),this.elgridLinesH.hide(),this.elGridBorders.hide());let r=0;for(;r<t.seriesYAxisMap.length&&t.ignoreYAxisIndexes.includes(r);)r++;r===t.seriesYAxisMap.length&&(r=0);let i=t.yAxisScale[r].result.length-1,a;return!t.isBarHorizontal||this.isRangeBar?(a=this.xaxisLabels.length,this.isRangeBar&&(i=e.labelData.labels.length,e.config.xaxis.tickAmount&&e.config.xaxis.labels.formatter&&(a=e.config.xaxis.tickAmount),t.yAxisScale?.[r]?.result?.length>0&&e.config.xaxis.type!==`datetime`&&(a=t.yAxisScale[r].result.length-1)),this._drawXYLines({xCount:a,tickAmount:i})):(a=i,i=t.xTickAmount,this._drawInvertedXYLines({xCount:a,tickAmount:i})),this.drawGridBands(a,i),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:e.layout.gridWidth/a}}drawGridBands(e,t){let n=this.w;if(n.config.grid.row.colors?.length>0&&((e,r,i,a,o,s)=>{for(let c=0,l=0;c<r;c++,l++)l>=n.config.grid[e].colors.length&&(l=0),this._drawGridBandRect({c:l,x1:i,y1:a,x2:o,y2:s,type:e}),a+=n.layout.gridHeight/t})(`row`,t,0,0,n.layout.gridWidth,n.layout.gridHeight/t),n.config.grid.column.colors?.length>0){let t=!n.globals.isBarHorizontal&&n.config.xaxis.tickPlacement===`on`&&(n.config.xaxis.type===`category`||n.config.xaxis.convertedCatToNumeric)?e-1:e;n.axisFlags.isXNumeric&&(t=(n.globals.xAxisScale?.result.length??1)-1);let r=n.globals.padHorizontal,i=n.globals.padHorizontal+n.layout.gridWidth/t,a=n.layout.gridHeight;for(let o=0,s=0;o<e;o++,s++)s>=n.config.grid.column.colors.length&&(s=0),n.config.xaxis.type===`datetime`&&(r=this.xaxisLabels[o].position,i=(this.xaxisLabels[o+1]?.position||n.layout.gridWidth)-this.xaxisLabels[o].position),this._drawGridBandRect({c:s,x1:r,y1:0,x2:i,y2:a,type:`column`}),r+=n.layout.gridWidth/t}}},ft=class{constructor(e){this.w=e,this.coreUtils=new ue(this.w)}niceScale(e,t,n=0){let r=1e-11,i=this.w,a=i.globals,o,s,c,l;a.isBarHorizontal?(o=i.config.xaxis,s=Math.max((a.svgWidth-100)/25,2)):(o=i.config.yaxis[n],s=Math.max((a.svgHeight-100)/15,2)),O.isNumber(s)||(s=10),c=o.min!==void 0&&o.min!==null,l=o.max!==void 0&&o.max!==null;let u=o.stepSize!==void 0&&o.stepSize!==null,d=o.tickAmount!==void 0&&o.tickAmount!==null,f=d?o.tickAmount:se[Math.min(Math.round(s/2),se.length-1)];if(a.isMultipleYAxis&&!d&&a.multiAxisTickAmount>0&&(f=a.multiAxisTickAmount,d=!0),f=f===`dataPoints`?a.dataPoints-1:Math.abs(Math.round(f)),(e===Number.MIN_VALUE&&t===0||!O.isNumber(e)&&!O.isNumber(t)||e===Number.MIN_VALUE&&t===-Number.MAX_VALUE)&&(e=O.isNumber(o.min)?o.min:0,t=O.isNumber(o.max)?o.max:e+f,a.allSeriesCollapsed=!1),e>t){console.warn(`axis.min cannot be greater than axis.max: swapping min and max`);let n=t;t=e,e=n}else e===t&&(e=e===0?0:e-1,t=t===0?2:t+1);let p=[];f<1&&(f=1);let m=f,h=Math.abs(t-e),g=.15;!c&&e>0&&e/h<g&&(e=0,c=!0),!l&&t<0&&-t/h<g&&(t=0,l=!0),h=Math.abs(t-e);let _=h/m,v=_,y=Math.floor(Math.log10(v)),b=10**y,x=Math.ceil(v/b);if(x=oe[a.yValueDecimal===0?0:1][x],v=x*b,_=v,a.isBarHorizontal&&o.stepSize&&o.type!==`datetime`?(_=o.stepSize,u=!0):u&&(_=o.stepSize),u&&o.forceNiceScale&&(_*=10**(y-Math.floor(Math.log10(_)))),c&&l){let e=h/m;if(d){if(u){if(O.mod(h,_)!=0){let t=O.getGCD(_,e);_=e/t<10?t:e}else O.mod(_,e)==0?_=e:(e=_,d=!1)}else _=e}else if(u)O.mod(h,_)==0?e=_:_=e;else if(O.mod(h,_)==0)e=_;else{m=Math.ceil(h/_),e=h/m;let t=O.getGCD(h,_);h/t<s&&(e=t),_=e}m=Math.round(h/_)}else{if(!c&&!l){if(a.isMultipleYAxis&&d){let n=_*Math.floor(e/_),r=n+_*m;r<t&&(_*=2),e=n,r=t,t=e+_*m,h=Math.abs(t-e),e>0&&e<Math.abs(r-t)&&(e=0,t=_*m),t<0&&-t<Math.abs(n-e)&&(t=0,e=-_*m)}else e=_*Math.floor(e/_),t=_*Math.ceil(t/_)}else if(l){if(d)e=t-_*m;else{let n=e;e=_*Math.floor(e/_),Math.abs(t-e)/O.getGCD(h,_)>s&&(e=t-_*f,e+=_*Math.floor((n-e)/_))}}else if(c){if(d)t=e+_*m;else{let n=t;t=_*Math.ceil(t/_),Math.abs(t-e)/O.getGCD(h,_)>s&&(t=e+_*f,t+=_*Math.ceil((n-t)/_))}}h=Math.abs(t-e),_=O.getGCD(h,_),m=Math.round(h/_)}if(!d&&!(c||l)&&(m=Math.ceil((h-r)/(_+r)),m>16&&O.getPrimeFactors(m).length<2&&m++),!d&&o.forceNiceScale&&a.yValueDecimal===0&&m>h&&(m=h,_=Math.round(h/m)),m>s&&(!(d||u)||o.forceNiceScale)){let e=O.getPrimeFactors(m),t=e.length-1,n=m;reduceLoop:for(var S=0;S<t;S++)for(var C=0;C<=t-S;C++){let r=Math.min(C+S,t),i=n,a=1;for(var w=C;w<=r;w++)a*=e[w];if(i/=a,i<s){n=i;break reduceLoop}}_=n===m?h:h/n,m=Math.round(h/_)}a.isMultipleYAxis&&a.multiAxisTickAmount==0&&a.ignoreYAxisIndexes.indexOf(n)<0&&(a.multiAxisTickAmount=m);let T=e-_,E=_*r;do T+=_,p.push(O.stripNumber(T,7));while(t-T>E);return{result:p,niceMin:p[0],niceMax:p[p.length-1]}}linearScale(e,t,n=10,r=0,i=void 0){let a=Math.abs(t-e),o=[];if(e===t)return o=[e],{result:o,niceMin:o[0],niceMax:o[o.length-1]};n=this._adjustTicksForSmallRange(n,r,a),n===`dataPoints`&&(n=this.w.globals.dataPoints-1);let s=n;if(i||=a/s,i!==0&&isFinite(i)){let e=10**Math.max(2,-Math.floor(Math.log10(Math.abs(i)))+2);i=Math.round((i+2**-52)*e)/e}let c=n===Number.MAX_VALUE?5:s;n===Number.MAX_VALUE&&(i=1);let l=e;for(;c>=0;)o.push(l),l=O.preciseAddition(l,i),--c;return{result:o,niceMin:o[0],niceMax:o[o.length-1]}}_resolveLogTickAmount(e){let t=e.tickAmount;return t===`dataPoints`&&(t=this.w.globals.dataPoints-1),O.isNumber(t)&&t>=1?Number(t):null}_thinToTickAmount(e,t){if(t===null||!O.isNumber(t)||t<1)return e;let n=t+1;if(e.length<=n)return e;let r=e.length-1,i=null;for(let e=1;e<=r;e++){if(r%e!==0)continue;let t=r/e+1;t>n||(i===null||t>i.count)&&(i={stride:e,count:t})}if(!i)return[e[0],e[e.length-1]];let a=[];for(let t=0;t<e.length;t+=i.stride)a.push(e[t]);return a}logarithmicScaleNice(e,t,n,r=null){t<=0&&(t=Math.max(e,n)),e<=0&&(e=Math.min(t,n));let i=[],a=Math.ceil(Math.log(t)/Math.log(n)+1),o=Math.floor(Math.log(e)/Math.log(n));for(let e=o;e<a;e++)i.push(n**+e);let s=this._thinToTickAmount(i,r);return{result:s,niceMin:s[0],niceMax:s[s.length-1]}}_logDomainSpan(e,t,n){return n||=10,n<=1||(t<=0&&(t=Math.max(e,n)),e<=0&&(e=Math.min(t,n)),e<=0||t<=0)?0:Math.abs(Math.log(t)/Math.log(n)-Math.log(e)/Math.log(n))}logarithmicScale(e,t,n,r=null){t<=0&&(t=Math.max(e,n)),e<=0&&(e=Math.min(t,n));let i=[],a=Math.log(t)/Math.log(n),o=Math.log(e)/Math.log(n),s=a-o,c=r===null?Math.max(1,Math.round(s)):r,l=s/c;for(let e=0,t=o;e<c;e++,t+=l)i.push(n**+t);return i.push(n**+a),{result:i,niceMin:e,niceMax:t}}_adjustTicksForSmallRange(e,t,n){let r=e;if(t!==void 0&&this.w.config.yaxis[t].labels.formatter&&this.w.config.yaxis[t].tickAmount===void 0){let e=Number(this.w.config.yaxis[t].labels.formatter(1));O.isNumber(e)&&this.w.globals.yValueDecimal===0&&(r=Math.ceil(n))}return r<e?r:e}setYScaleForIndex(e,t,n){let r=this.w.globals,i=this.w.config,a=r.isBarHorizontal?i.xaxis:i.yaxis[e];r.yAxisScale[e]===void 0&&(r.yAxisScale[e]=[]);let o=Math.abs(n-t),s=a.logarithmic&&this._logDomainSpan(t,n,a.logBase)>=1,c=a.logarithmic&&(s||o>5);if(a.logarithmic&&!c&&(r.invalidLogScale=!0),c){r.allSeriesCollapsed=!1;let i=this._resolveLogTickAmount(a);r.yAxisScale[e]=a.forceNiceScale?this.logarithmicScaleNice(t,n,a.logBase,i):this.logarithmicScale(t,n,a.logBase,i)}else n===-Number.MAX_VALUE||!O.isNumber(n)||t===Number.MAX_VALUE||!O.isNumber(t)?r.yAxisScale[e]=this.niceScale(Number.MIN_VALUE,0,e):(r.allSeriesCollapsed=!1,r.yAxisScale[e]=this.niceScale(t,n,e))}setXScale(e,t){let n=this.w,r=n.globals;if(t===-Number.MAX_VALUE||!O.isNumber(t))r.xAxisScale=this.linearScale(0,10,10);else{let i=r.xTickAmount;r.xAxisScale=this.linearScale(e,t,i,0,n.config.xaxis.max===void 0?n.config.xaxis.stepSize:void 0)}return r.xAxisScale}scaleMultipleYAxes(){let e=this.w.config,t=this.w.globals;this.coreUtils.setSeriesYAxisMappings();let n=t.seriesYAxisMap,r=t.minYArr,i=t.maxYArr,a=[],o=!t.isBarHorizontal;if(t.allSeriesCollapsed=!0,t.barGroups=[],n.forEach((n,s)=>{let c=[];if(n.forEach(t=>{let n=e.series[t]?.group;c.indexOf(n)<0&&c.push(n)}),n.length>0){let l=Number.MAX_VALUE,u=-Number.MAX_VALUE,d=l,f=u,p,m;if(e.chart.stacked){let r=Array(t.dataPoints).fill(0),i=[],a=[],o=[];c.forEach(()=>{i.push(r.map(()=>Number.MIN_VALUE)),a.push(r.map(()=>Number.MIN_VALUE)),o.push(r.map(()=>Number.MIN_VALUE))});for(let r=0;r<n.length;r++){!p&&e.series[n[r]].type&&(p=e.series[n[r]].type);let l=n[r];m=e.series[l].group?e.series[l].group:`axis-${s.toString()}`,t.collapsedSeriesIndices.indexOf(l)<0&&t.ancillaryCollapsedSeriesIndices.indexOf(l)<0&&(t.allSeriesCollapsed=!1,c.forEach((t,n)=>{if(e.series[l].group===t)for(let e=0;e<this.w.seriesData.series[l].length;e++){let t=this.w.seriesData.series[l][e];t>=0?a[n][e]+=t:o[n][e]+=t,i[n][e]+=t,d=Math.min(d,t),f=Math.max(f,t)}})),(p===`bar`||p===`column`)&&t.barGroups.push(m)}p||=e.chart.type,p===`bar`||p===`column`?c.forEach((e,t)=>{l=Math.min(l,Math.min.apply(null,o[t])),u=Math.max(u,Math.max.apply(null,a[t]))}):(c.forEach((e,t)=>{d=Math.min(d,Math.min.apply(null,i[t])),f=Math.max(f,Math.max.apply(null,i[t]))}),l=d,u=f),l===Number.MIN_VALUE&&u===Number.MIN_VALUE&&(u=-Number.MAX_VALUE)}else for(let e=0;e<n.length;e++){let a=n[e];l=Math.min(l,r[a]),u=Math.max(u,i[a]),t.collapsedSeriesIndices.indexOf(a)<0&&t.ancillaryCollapsedSeriesIndices.indexOf(a)<0&&(t.allSeriesCollapsed=!1)}e.yaxis[s].min!==void 0&&(l=typeof e.yaxis[s].min==`function`?e.yaxis[s].min(l):e.yaxis[s].min),e.yaxis[s].max!==void 0&&(u=typeof e.yaxis[s].max==`function`?e.yaxis[s].max(u):e.yaxis[s].max),t.barGroups=t.barGroups.filter((e,t,n)=>n.indexOf(e)===t);let h=e.yaxis[s];o&&h.alignZero===!0&&!h.logarithmic&&h.min===void 0&&h.max===void 0&&t.ignoreYAxisIndexes.indexOf(s)<0&&O.isNumber(l)&&O.isNumber(u)?a.push({ai:s,minY:l,maxY:u}):(this.setYScaleForIndex(s,l,u),n.forEach(e=>{r[e]=t.yAxisScale[s].niceMin,i[e]=t.yAxisScale[s].niceMax}))}else this.setYScaleForIndex(s,0,-Number.MAX_VALUE)}),a.length>=2){a.forEach(e=>{this.setYScaleForIndex(e.ai,e.minY,e.maxY),n[e.ai].forEach(n=>{r[n]=t.yAxisScale[e.ai].niceMin,i[n]=t.yAxisScale[e.ai].niceMax})});let e=0;a.forEach(n=>{let r=t.yAxisScale[n.ai],i=r.niceMax-r.niceMin;if(i>0){let t=-r.niceMin/i;t>e&&(e=t)}}),e>1&&(e=1),e<0&&(e=0);let o=e=>{if(e<=0)return 1;let t=10**Math.floor(Math.log10(e)),n=e/t,r;return r=n<=1+1e-9?1:n<=2+1e-9?2:n<=2.5+1e-9?2.5:n<=5+1e-9?5:10,r*t};a.forEach(a=>{let s=t.yAxisScale[a.ai];if(!s.result||s.result.length<2)return;let c=s.niceMax-s.niceMin;if(c<=0)return;let l=-s.niceMin/c;if(Math.abs(l-e)<=1e-9)return;let u=l<e&&e<1-1e-9,d=!u&&l>e&&e>1e-9;if(!u&&!d)return;let f=u?-e*s.niceMax/(1-e):s.niceMin,p=d?-s.niceMin*(1-e)/e:s.niceMax,m=p-f;if(m<=0)return;let h=Math.max(s.result.length,5),g=o(m/Math.max(h-1,1));if(g<=0)return;let _,v;if(u){_=Math.floor(f/g+1e-9)*g;let t=e>1e-9?_*(e-1)/e:s.niceMax,n=Math.max(t,s.niceMax);v=Math.ceil(n/g-1e-9)*g}else{v=Math.ceil(p/g-1e-9)*g;let t=e<1-1e-9?-e*v/(1-e):s.niceMin,n=Math.min(t,s.niceMin);_=Math.floor(n/g+1e-9)*g}s.result=[];for(let e=_;e<=v+g*1e-9;e=O.preciseAddition(e,g))s.result.push(O.stripNumber(e,7));s.niceMin=_,s.niceMax=v,n[a.ai].forEach(e=>{r[e]=s.niceMin,i[e]=s.niceMax})})}else if(a.length===1){let e=a[0];this.setYScaleForIndex(e.ai,e.minY,e.maxY),n[e.ai].forEach(n=>{r[n]=t.yAxisScale[e.ai].niceMin,i[n]=t.yAxisScale[e.ai].niceMax})}}},pt=class{constructor(e){this.w=e,this.scales=new ft(this.w)}init(){this.setYRange(),this.setXRange(),this.setZRange()}_xPixelTolerance(e){let t=this.w.layout.gridWidth;if(!t||!e||!e.length)return 0;let n=this.w.config.xaxis,r=typeof n.min==`number`?n.min:e[0],i=typeof n.max==`number`?n.max:e[e.length-1];return i>r?(i-r)/t:0}_autoScaleYEnabled(){let e=this.w.config,t=this.w.globals.brushSource?.w.config.chart.brush;return!!(e.chart.zoom.enabled&&e.chart.zoom.autoScaleYaxis||t?.enabled&&t?.autoScaleYaxis)}_autoScaleXBounds(e){let t=this.w.config.xaxis;if(!t.min&&!t.max)return null;let n=this._xPixelTolerance(this.w.seriesData.seriesX[e]);return{lo:t.min?t.min-n:-1/0,hi:t.max?t.max+n:1/0}}getMinYMaxY(e,t=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=null){let i=this.w.config,a=this.w.globals,o=-Number.MAX_VALUE,s=Number.MIN_VALUE;r===null&&(r=e+1);let c=this.w.seriesData.series,l=c,u=c;i.chart.type===`candlestick`?(l=this.w.candleData.seriesCandleL,u=this.w.candleData.seriesCandleH):i.chart.type===`boxPlot`?(l=this.w.candleData.seriesCandleO,u=this.w.candleData.seriesCandleC):i.chart.type===`violin`?(l=this.w.violinData.seriesViolinMin,u=this.w.violinData.seriesViolinMax):this.w.axisFlags.isRangeData&&(l=this.w.rangeData.seriesRangeStart,u=this.w.rangeData.seriesRangeEnd);let d=!1,f=!1;this.w.seriesData.seriesX.length>=r&&this._autoScaleYEnabled()&&!this._ignoreAutoScaleWindow&&(d=!0);for(let p=e;p<r;p++){a.dataPoints=Math.max(a.dataPoints,c[p].length);let e=i.series[p].type;this.w.labelData.categoryLabels.length&&(a.dataPoints=this.w.labelData.categoryLabels.filter(e=>e!==void 0).length),this.w.labelData.labels.length&&i.xaxis.type!==`datetime`&&this.w.seriesData.series.reduce((e,t)=>e+t.length,0)!==0&&(a.dataPoints=Math.max(a.dataPoints,this.w.labelData.labels.length));let r=0,m=c[p].length-1;if(d){let e=this.w.seriesData.seriesX[p],t=this._autoScaleXBounds(p);if(t&&i.xaxis.min)for(;r<m&&e[r]<t.lo;r++);if(t&&i.xaxis.max)for(;m>r&&e[m]>t.hi;m--);t&&e&&e.length&&(e[r]>=t.lo&&e[r]<=t.hi||(e[0]<t.lo&&e[e.length-1]>t.hi&&r>0?(m=r,r=m-1):(r=0,m=-1,f=!0)))}if(l===c&&u===c&&i.chart.type!==`boxPlot`&&e!==`candlestick`&&e!==`boxPlot`&&e!==`violin`&&e!==`rangeArea`&&e!==`rangeBar`&&!(this.w.seriesData.seriesGoals[p]&&this.w.seriesData.seriesGoals[p].length)){let i=c[p],l=Math.min(m,i.length-1),u=this.w.seriesData._parsedExtrema?.[p];if(u&&u.ref===i&&u.len===i.length&&r===0&&l===i.length-1)u.maxY>o&&(o=u.maxY),u.lowestY<t&&(t=u.lowestY),u.negMinY<0&&u.negMinY<s&&(s=u.negMinY),u.yDec>a.yValueDecimal&&(a.yValueDecimal=u.yDec),u.hasNulls&&(a.hasNullValues=!0);else{let e=a.yValueDecimal,n=!1;for(let a=r;a<=l;a++){let r=i[a];if(r!==null&&typeof r==`number`&&r===r&&r!==1/0&&r!==-1/0){if(r>o&&(o=r),r<t&&(t=r),s>r&&r<0&&(s=r),!Number.isInteger(r)){let t=r<0?-r:r;if(t>=1e-6&&t<1e21){let t=``+r,n=t.indexOf(`.`),i=n===-1?0:t.length-n-1;i>e&&(e=i)}else{let t=O.noExponents(r);O.isFloat(t)&&(e=Math.max(e,t.toString().split(`.`)[1].length))}}}else n=!0}a.yValueDecimal=e,n&&(a.hasNullValues=!0)}n=o,(e===`bar`||e===`column`)&&(s<0&&o<0&&(o=0,n=Math.max(n,0)),s===Number.MIN_VALUE&&(s=0,t=Math.min(t,0)));continue}for(let i=r;i<=m&&i<this.w.seriesData.series[p].length;i++){let r=c[p][i];if(r!==null&&O.isNumber(r)){switch(u[p]?.[i]!==void 0&&(o=Math.max(o,u[p][i]),t=Math.min(t,u[p][i])),l[p]?.[i]!==void 0&&(t=Math.min(t,l[p][i]),n=Math.max(n,l[p][i])),e){case`candlestick`:this.w.candleData.seriesCandleC[p][i]!==void 0&&(o=Math.max(o,this.w.candleData.seriesCandleH[p][i]),t=Math.min(t,this.w.candleData.seriesCandleL[p][i]));break;case`boxPlot`:this.w.candleData.seriesCandleC[p][i]!==void 0&&(o=Math.max(o,this.w.candleData.seriesCandleC[p][i]),t=Math.min(t,this.w.candleData.seriesCandleO[p][i]));break;case`violin`:this.w.violinData.seriesViolinMax[p]?.[i]!==void 0&&(o=Math.max(o,this.w.violinData.seriesViolinMax[p][i]),t=Math.min(t,this.w.violinData.seriesViolinMin[p][i]))}if(e&&e!==`candlestick`&&e!==`boxPlot`&&e!==`violin`&&e!==`rangeArea`&&e!==`rangeBar`&&(o=Math.max(o,this.w.seriesData.series[p][i]),t=Math.min(t,this.w.seriesData.series[p][i])),this.w.seriesData.seriesGoals[p]&&this.w.seriesData.seriesGoals[p][i]&&Array.isArray(this.w.seriesData.seriesGoals[p][i])&&this.w.seriesData.seriesGoals[p][i].forEach(e=>{o=Math.max(o,e.value),t=Math.min(t,e.value)}),this.w.config.chart.type===`boxPlot`||e===`boxPlot`){let e=this.w.candleData.seriesBoxPoints?.[p]?.[i];if(e)for(let n=0;n<e.length;n++){let r=e[n];typeof r==`number`&&(o=Math.max(o,r),t=Math.min(t,r))}}n=o,r=O.noExponents(r),O.isFloat(r)&&(a.yValueDecimal=Math.max(a.yValueDecimal,r.toString().split(`.`)[1].length)),s>l[p]?.[i]&&l[p]?.[i]<0&&(s=l[p][i])}else a.hasNullValues=!0}(e===`bar`||e===`column`)&&(s<0&&o<0&&(o=0,n=Math.max(n,0)),s===Number.MIN_VALUE&&(s=0,t=Math.min(t,0)))}if(i.chart.type===`rangeBar`&&this.w.rangeData.seriesRangeStart.length&&a.isBarHorizontal&&(s=t),i.chart.type===`bar`&&(s<0&&o<0&&(o=0),s===Number.MIN_VALUE&&(s=0)),f&&o===-Number.MAX_VALUE){this._ignoreAutoScaleWindow=!0;try{return this.getMinYMaxY(e,Number.MAX_VALUE,-Number.MAX_VALUE,r)}finally{this._ignoreAutoScaleWindow=!1}}return{minY:s,maxY:o,lowestY:t,highestY:n}}setYRange(){let e=this.w.globals,t=this.w.config;e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE;let n=Number.MAX_VALUE,r;if(e.isMultipleYAxis){n=Number.MAX_VALUE;for(let t=0;t<this.w.seriesData.series.length;t++)r=this.getMinYMaxY(t),e.minYArr[t]=r.lowestY,e.maxYArr[t]=r.highestY,n=Math.min(n,r.lowestY)}return r=this.getMinYMaxY(0,n,void 0,this.w.seriesData.series.length),t.chart.type===`bar`?(e.minY=r.minY,e.maxY=r.maxY):(e.minY=r.lowestY,e.maxY=r.highestY),n=r.lowestY,t.chart.stacked&&this._setStackedMinMax(),t.chart.type===`line`||t.chart.type===`area`||t.chart.type===`scatter`||t.chart.type===`candlestick`||t.chart.type===`boxPlot`||t.chart.type===`violin`||t.chart.type===`rangeBar`&&!e.isBarHorizontal?e.minY===Number.MIN_VALUE&&n!==-Number.MAX_VALUE&&n!==e.maxY&&(e.minY=n):e.minY=e.minY===Number.MIN_VALUE?r.minY:Math.min(r.minY,e.minY),t.yaxis.forEach((t,n)=>{t.max!==void 0&&(typeof t.max==`number`?e.maxYArr[n]=t.max:typeof t.max==`function`&&(e.maxYArr[n]=t.max(e.isMultipleYAxis?e.maxYArr[n]:e.maxY)),e.maxY=e.maxYArr[n]),t.min!==void 0&&(typeof t.min==`number`?e.minYArr[n]=t.min:typeof t.min==`function`&&(e.minYArr[n]=t.min(e.isMultipleYAxis?e.minYArr[n]===Number.MIN_VALUE?0:e.minYArr[n]:e.minY)),e.minY=e.minYArr[n])}),e.isBarHorizontal&&[`min`,`max`].forEach(n=>{t.xaxis[n]!==void 0&&typeof t.xaxis[n]==`number`&&(n===`min`?e.minY=t.xaxis[n]:e.maxY=t.xaxis[n])}),e.isMultipleYAxis?(this.scales.scaleMultipleYAxes(),e.minY=n):(this.scales.setYScaleForIndex(0,e.minY,e.maxY),e.minY=e.yAxisScale[0].niceMin,e.maxY=e.yAxisScale[0].niceMax,e.minYArr[0]=e.minY,e.maxYArr[0]=e.maxY),e.barGroups=[],e.lineGroups=[],e.areaGroups=[],t.series.forEach(n=>{let r=n;switch(r.type||t.chart.type){case`bar`:case`column`:e.barGroups.push(r.group);break;case`line`:e.lineGroups.push(r.group);break;case`area`:e.areaGroups.push(r.group)}}),e.barGroups=e.barGroups.filter((e,t,n)=>n.indexOf(e)===t),e.lineGroups=e.lineGroups.filter((e,t,n)=>n.indexOf(e)===t),e.areaGroups=e.areaGroups.filter((e,t,n)=>n.indexOf(e)===t),{minY:e.minY,maxY:e.maxY,minYArr:e.minYArr,maxYArr:e.maxYArr,yAxisScale:e.yAxisScale}}setXRange(){let e=this.w.globals,t=this.w.config,n=t.xaxis.type===`numeric`||t.xaxis.type===`datetime`||t.xaxis.type===`category`&&!this.w.axisFlags.noLabelsProvided||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.isXNumeric;if(this.w.axisFlags.isXNumeric&&(()=>{let t=e.minX,n=e.maxX;for(let e=0;e<this.w.seriesData.series.length;e++){let r=this.w.labelData.labels[e];if(!r)continue;let i=this.w.seriesData._parsedExtrema?.[e];if(i&&i.xNumeric&&i.xref===r&&i.len===r.length){i.maxX>n&&(n=i.maxX),i.minX<t&&(t=i.minX);continue}for(let e=0;e<r.length;e++){let i=r[e];i!==null&&typeof i==`number`&&i===i&&(i>n&&(n=i),i<t&&(t=i))}}e.maxX=n,e.initialMaxX=n,e.minX=t,e.initialMinX=t})(),this.w.axisFlags.noLabelsProvided&&t.xaxis.categories.length===0&&(e.maxX=this.w.labelData.labels[this.w.labelData.labels.length-1],e.initialMaxX=this.w.labelData.labels[this.w.labelData.labels.length-1],e.minX=1,e.initialMinX=1),this.w.axisFlags.isXNumeric||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.dataFormatXNumeric){let r=10;if(t.xaxis.tickAmount===void 0)r=Math.round(e.svgWidth/150),t.xaxis.type===`numeric`&&e.dataPoints<30&&(r=e.dataPoints-1),r>e.dataPoints&&e.dataPoints!==0&&(r=e.dataPoints-1);else if(t.xaxis.tickAmount===`dataPoints`){if(this.w.seriesData.series.length>1&&(r=this.w.seriesData.series[e.maxValsInArrayIndex].length-1),this.w.axisFlags.isXNumeric){let t=Math.round(e.maxX-e.minX);t<30&&(r=t)}}else r=t.xaxis.tickAmount;if(e.xTickAmount=r,t.xaxis.max!==void 0&&typeof t.xaxis.max==`number`&&(e.maxX=t.xaxis.max),t.xaxis.min!==void 0&&typeof t.xaxis.min==`number`&&(e.minX=t.xaxis.min),t.xaxis.range!==void 0&&(e.minX=e.maxX-t.xaxis.range),e.minX!==Number.MAX_VALUE&&e.maxX!==-Number.MAX_VALUE){if(t.xaxis.convertedCatToNumeric&&!this.w.axisFlags.dataFormatXNumeric){let t=[];for(let n=e.minX-1;n<e.maxX;n++)t.push(n+1);e.xAxisScale={result:t,niceMin:t[0],niceMax:t[t.length-1]}}else e.xAxisScale=this.scales.setXScale(e.minX,e.maxX)}else e.xAxisScale=this.scales.linearScale(0,r,r,0,t.xaxis.stepSize),this.w.axisFlags.noLabelsProvided&&this.w.labelData.labels.length>0&&(e.xAxisScale=this.scales.linearScale(1,this.w.labelData.labels.length,r-1,0,t.xaxis.stepSize),this.w.seriesData.seriesX=this.w.labelData.labels.slice());n&&(this.w.labelData.labels=e.xAxisScale.result.slice())}return e.isBarHorizontal&&this.w.labelData.labels.length&&(e.xTickAmount=this.w.labelData.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:e.minX,maxX:e.maxX}}setZRange(){let e=this.w.globals;if(!this.w.axisFlags.isDataXYZ)return;for(let t=0;t<this.w.seriesData.series.length;t++)if(this.w.seriesData.seriesZ[t]!==void 0)for(let n=0;n<this.w.seriesData.seriesZ[t].length;n++)this.w.seriesData.seriesZ[t][n]!==null&&O.isNumber(this.w.seriesData.seriesZ[t][n])&&(e.maxZ=Math.max(e.maxZ,this.w.seriesData.seriesZ[t][n]),e.minZ=Math.min(e.minZ,this.w.seriesData.seriesZ[t][n]));let t=this.w.config.plotOptions?.bubble||{};O.isNumber(t.minZ)&&t.minZ<e.minZ&&(e.minZ=t.minZ),O.isNumber(t.maxZ)&&t.maxZ>e.maxZ&&(e.maxZ=t.maxZ)}_handleSingleDataPoint(){let e=this.w.globals,t=this.w.config;if(e.minX===e.maxX){let n=new k(this.w);if(t.xaxis.type===`datetime`){let r=n.getDate(e.minX);t.xaxis.labels.datetimeUTC?r.setUTCDate(r.getUTCDate()-2):r.setDate(r.getDate()-2),e.minX=new Date(r).getTime();let i=n.getDate(e.maxX);t.xaxis.labels.datetimeUTC?i.setUTCDate(i.getUTCDate()+2):i.setDate(i.getDate()+2),e.maxX=new Date(i).getTime()}else(t.xaxis.type===`numeric`||t.xaxis.type===`category`&&!this.w.axisFlags.noLabelsProvided)&&(e.minX-=2,e.initialMinX=e.minX,e.maxX+=2,e.initialMaxX=e.maxX)}}_getMinXDiff(){let e=this.w.globals;this.w.axisFlags.isXNumeric&&this.w.seriesData.seriesX.forEach((t,n)=>{if(t.length){t.length===1&&t.push(this.w.seriesData.seriesX[e.maxValsInArrayIndex][this.w.seriesData.seriesX[e.maxValsInArrayIndex].length-1]);let r=this.w.seriesData._parsedExtrema?.[n];if(r&&r.xNumeric&&r.xSorted&&r.xref===t&&r.len===t.length){r.minXDiff<e.minXDiff&&(e.minXDiff=r.minXDiff),(e.dataPoints===1||e.minXDiff===Number.MAX_VALUE)&&(e.minXDiff=.5);return}let i=!0,a=e.minXDiff;for(let e=1;e<t.length;e++){let n=t[e]-t[e-1];if(n>0)n<a&&(a=n);else if(n<0){i=!1;break}}if(i){e.minXDiff=a,(e.dataPoints===1||e.minXDiff===Number.MAX_VALUE)&&(e.minXDiff=.5);return}let o=t.slice();o.sort((e,t)=>e-t),o.forEach((t,n)=>{if(n>0){let r=t-o[n-1];r>0&&(e.minXDiff=Math.min(r,e.minXDiff))}}),(e.dataPoints===1||e.minXDiff===Number.MAX_VALUE)&&(e.minXDiff=.5)}})}_setStackedMinMax(){let e=this.w.globals,t=this._autoScaleYEnabled();if(!this.w.seriesData.series.length)return;let n=this.w.labelData.seriesGroups;n.length||(n=[this.w.seriesData.seriesNames.map(e=>e)]);let r={},i={};n.forEach(n=>{r[n]=[],i[n]=[],this.w.config.series.map((e,t)=>n.indexOf(this.w.seriesData.seriesNames[t])>-1?t:null).filter(e=>e!==null).forEach(a=>{let o=t?this._autoScaleXBounds(a):null,s=this.w.seriesData.seriesX[a],c=!!(o&&s&&s.length);for(let t=0;t<this.w.seriesData.series[e.maxValsInArrayIndex].length;t++)c&&(s[t]<o.lo||s[t]>o.hi)||(r[n][t]===void 0&&(r[n][t]=0,i[n][t]=0),(this.w.config.chart.stacked&&!e.comboCharts||this.w.config.chart.stacked&&e.comboCharts&&(!this.w.config.chart.stackOnlyBar||this.w.config.series?.[a]?.type===`bar`||this.w.config.series?.[a]?.type===`column`))&&this.w.seriesData.series[a][t]!==null&&O.isNumber(this.w.seriesData.series[a][t])&&(this.w.seriesData.series[a][t]>0?r[n][t]+=parseFloat(String(this.w.seriesData.series[a][t]))+1e-4:i[n][t]+=parseFloat(String(this.w.seriesData.series[a][t]))))})}),Object.entries(r).forEach(([t])=>{r[t].forEach((n,a)=>{e.maxY=Math.max(e.maxY,r[t][a]),e.minY=Math.min(e.minY,i[t][a])})})}};function mt(){return{palette1:[`#008FFB`,`#00A86F`,`#CA8501`,`#FF4560`,`#846DD5`],palette2:[`#6978CB`,`#039DE2`,`#49A84D`,`#B39105`,`#D68000`],palette3:[`#209FCC`,`#648291`,`#D4526E`,`#0FA783`,`#A19285`],palette4:[`#2FA59D`,`#73A20B`,`#099DE1`,`#FD5D5D`,`#648291`],palette5:[`#2B908F`,`#F56566`,`#2EAB16`,`#FA4443`,`#1EA2BD`],palette6:[`#449DD1`,`#F86624`,`#EA3A4A`,`#9C63D1`,`#899E2A`],palette7:[`#DF475B`,`#1B998B`,`#7E75B7`,`#F46036`,`#B1911B`],palette8:[`#9C63D1`,`#F86624`,`#B38F04`,`#EA3A4A`,`#2FA2B3`],palette9:[`#98776F`,`#A19285`,`#A8705E`,`#BA6560`,`#A0927F`],palette10:[`#C91EFF`,`#A94BFD`,`#6C6AFE`,`#2983FF`,`#009ED8`],cvdDeuteranopia:[`#0072B2`,`#E69F00`,`#56B4E9`,`#009E73`,`#F0E442`,`#D55E00`,`#CC79A7`],cvdProtanopia:[`#0077BB`,`#EE7733`,`#009988`,`#EE3377`,`#BBBBBB`,`#33BBEE`,`#CC3311`],cvdTritanopia:[`#CC3311`,`#009988`,`#EE7733`,`#0077BB`,`#EE3377`,`#BBBBBB`,`#33BBEE`],highContrast:[`#005A9C`,`#C00000`,`#007A33`,`#6C3483`,`#7B3F00`,`#0097A7`,`#4A235A`]}}var ht=class{constructor(e,{theme:t=null,timeScale:n=null}={},r){this.w=e,this.elgrid=r,this.xaxisFontSize=e.config.xaxis.labels.style.fontSize,this.axisFontFamily=e.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=e.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal=e.config.chart.type===`bar`&&e.config.plotOptions.bar.horizontal,this.xAxisoffX=e.config.xaxis.position===`bottom`?e.layout.gridHeight:0,this.drawnLabels=[],this.axesUtils=new lt(e,{theme:t,timeScale:n})}drawYaxis(e){let t=this.w,n=new H(this.w),r=t.config.yaxis[e].labels.style,{fontSize:i,fontFamily:a,fontWeight:o}=r,s=n.group({class:`apexcharts-yaxis`,rel:e,transform:`translate(${t.globals.translateYAxisX[e]}, 0)`});if(this.axesUtils.isYAxisHidden(e))return s;let c=n.group({class:`apexcharts-yaxis-texts-g`});s.add(c);let l=t.globals.yAxisScale[e].result.length-1,u=t.layout.gridHeight/l,d=t.formatters.yLabelFormatters[e],f=this.axesUtils.checkForReversedLabels(e,t.globals.yAxisScale[e].result.slice()),p=1;if(t.config.chart.type===`heatmap`&&!t.config.yaxis[e].labels.formatter){let e=parseInt(i,10)||11,n=Math.max(1,Math.floor(t.layout.gridHeight/(e*1.4))),r=l+1;r>n&&(p=Math.ceil(r/n))}if(t.config.yaxis[e].labels.show){let s=t.layout.translateY+t.config.yaxis[e].labels.offsetY;t.globals.isBarHorizontal?s=0:t.config.chart.type===`heatmap`&&(s-=u/2),s+=parseInt(i,10)/3;let m=null;for(let h=l;h>=0;h--){let l=p>1&&h%p!==0?``:d(f[h],h,t),g=t.config.yaxis[e].labels.padding;t.config.yaxis[e].opposite&&t.config.yaxis.length!==0&&(g*=-1);let _=this.getTextAnchor(t.config.yaxis[e].labels.align,t.config.yaxis[e].opposite),v=this.axesUtils.getYAxisForeColor(r.colors,e),y=Array.isArray(v)?v[h]:v,b=Array.from(t.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${e}'] .apexcharts-yaxis-label tspan`)).map(e=>e.textContent),x=n.drawText({x:g,y:s,text:b.includes(l)&&!t.config.yaxis[e].labels.showDuplicates?``:l,textAnchor:_,fontSize:i,fontFamily:a,fontWeight:o,maxWidth:t.config.yaxis[e].labels.maxWidth,foreColor:y,isPlainText:!1,cssClass:`apexcharts-yaxis-label ${r.cssClass}`});c.add(x),this.addTooltip(x,l),m===null&&(m=x),t.config.yaxis[e].labels.rotate!==0&&this.rotateLabel(n,x,m,t.config.yaxis[e].labels.rotate),s+=u}}return this.addYAxisTitle(n,s,e),this.addAxisBorder(n,s,e,l,u),s}getTextAnchor(e,t){return e===`left`?`start`:e===`center`?`middle`:e===`right`?`end`:t?`start`:`end`}addTooltip(e,t){let n=T.createElementNS(B,`title`);n.textContent=Array.isArray(t)?t.join(` `):t,e.node.appendChild(n)}rotateLabel(e,t,n,r){let i=e.rotateAroundCenter(n.node),a=e.rotateAroundCenter(t.node);t.node.setAttribute(`transform`,`rotate(${r} ${i.x} ${a.y})`)}addYAxisTitle(e,t,n){let r=this.w;if(r.config.yaxis[n].title.text!==void 0){let i=e.group({class:`apexcharts-yaxis-title`}),a=r.config.yaxis[n].opposite?r.globals.translateYAxisX[n]:0,o=e.drawText({x:a,y:r.layout.gridHeight/2+r.layout.translateY+r.config.yaxis[n].title.offsetY,text:r.config.yaxis[n].title.text,textAnchor:`end`,foreColor:r.config.yaxis[n].title.style.color,fontSize:r.config.yaxis[n].title.style.fontSize,fontWeight:r.config.yaxis[n].title.style.fontWeight,fontFamily:r.config.yaxis[n].title.style.fontFamily,cssClass:`apexcharts-yaxis-title-text ${r.config.yaxis[n].title.style.cssClass}`});i.add(o),t.add(i)}}addAxisBorder(e,t,n,r,i){let a=this.w,o=a.config.yaxis[n].axisBorder,s=31+o.offsetX;if(a.config.yaxis[n].opposite&&(s=-31-o.offsetX),o.show){let n=e.drawLine(s,a.layout.translateY+o.offsetY-2,s,a.layout.gridHeight+a.layout.translateY+o.offsetY+2,o.color,0,o.width);t.add(n)}a.config.yaxis[n].axisTicks.show&&this.axesUtils.drawYAxisTicks(s,r,o,a.config.yaxis[n].axisTicks,n,i,t)}drawYaxisInversed(e){let t=this.w,n=new H(this.w),r=n.group({class:`apexcharts-xaxis apexcharts-yaxis-inversed`}),i=n.group({class:`apexcharts-xaxis-texts-g`,transform:`translate(${t.layout.translateXAxisX}, ${t.layout.translateXAxisY})`});r.add(i);let a=t.globals.yAxisScale[e].result.length-1,o=t.layout.gridWidth/a+.1,s=o+t.config.xaxis.labels.offsetX,c=t.formatters.xLabelFormatter,l=this.axesUtils.checkForReversedLabels(e,t.globals.yAxisScale[e].result.slice()),u=t.labelData.timescaleLabels;if(u.length>0&&(this.xaxisLabels=u.slice(),l=u.slice(),a=l.length),t.config.xaxis.labels.show)for(let r=u.length?0:a;u.length?r<u.length:r>=0;u.length?r++:r--){let a=c?.(l[r],r,t),d=t.layout.gridWidth+t.globals.padHorizontal-(s-o+t.config.xaxis.labels.offsetX);if(u.length){let e=this.axesUtils.getLabel(l,u,d,r,this.drawnLabels,this.xaxisFontSize);d=e.x,a=e.text,this.drawnLabels.push(e.text),r===0&&t.globals.skipFirstTimelinelabel&&(a=``),r===l.length-1&&t.globals.skipLastTimelinelabel&&(a=``)}let f=n.drawText({x:d,y:this.xAxisoffX+t.config.xaxis.labels.offsetY+30-(t.config.xaxis.position===`top`?t.layout.xAxisHeight+t.config.xaxis.axisTicks.height-2:0),text:a,textAnchor:`middle`,foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[e]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.axisFontFamily,fontWeight:t.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:`apexcharts-xaxis-label ${t.config.xaxis.labels.style.cssClass}`});i.add(f),this.addTooltip(f,a),s+=o}return this.inversedYAxisTitleText(r),this.inversedYAxisBorder(r),r}inversedYAxisBorder(e){let t=this.w,n=new H(this.w),r=t.config.xaxis.axisBorder;if(r.show){let i=0;t.config.chart.type===`bar`&&t.axisFlags.isXNumeric&&(i-=15);let a=n.drawLine(t.globals.padHorizontal+i+r.offsetX,this.xAxisoffX,t.layout.gridWidth,this.xAxisoffX,r.color,0,r.height);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(a):e.add(a)}}inversedYAxisTitleText(e){let t=this.w,n=new H(this.w);if(t.config.xaxis.title.text!==void 0){let r=n.group({class:`apexcharts-xaxis-title apexcharts-yaxis-title-inversed`}),i=n.drawText({x:t.layout.gridWidth/2+t.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(t.config.xaxis.title.style.fontSize)+t.config.xaxis.title.offsetY+20,text:t.config.xaxis.title.text,textAnchor:`middle`,fontSize:t.config.xaxis.title.style.fontSize,fontFamily:t.config.xaxis.title.style.fontFamily,fontWeight:t.config.xaxis.title.style.fontWeight,foreColor:t.config.xaxis.title.style.color,cssClass:`apexcharts-xaxis-title-text ${t.config.xaxis.title.style.cssClass}`});r.add(i),e.add(r)}}yAxisTitleRotate(e,t){let n=this.w,r=new H(this.w),i=n.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${e}'] .apexcharts-yaxis-texts-g`),a=i?i.getBoundingClientRect():{width:0,height:0},o=n.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${e}'] .apexcharts-yaxis-title text`),s=o?o.getBoundingClientRect():{width:0,height:0};if(o){let i=this.xPaddingForYAxisTitle(e,a,s,t);o.setAttribute(`x`,String(i.xPos-(t?10:0)));let c=r.rotateAroundCenter(o);o.setAttribute(`transform`,`rotate(${t?n.config.yaxis[e].title.rotate*-1:n.config.yaxis[e].title.rotate} ${c.x} ${c.y})`)}}xPaddingForYAxisTitle(e,t,n,r){let i=this.w,a=0,o=10;return i.config.yaxis[e].title.text===void 0||e<0?{xPos:a,padd:0}:(r?a=t.width+i.config.yaxis[e].title.offsetX+n.width/2+o/2:(a=t.width*-1+i.config.yaxis[e].title.offsetX+o/2+n.width/2,i.globals.isBarHorizontal&&(o=25,a=t.width*-1-i.config.yaxis[e].title.offsetX-o)),{xPos:a,padd:o})}setYAxisXPosition(e,t){let n=this.w,r=0,i=0,a=18,o=1;n.config.yaxis.length>1&&(this.multipleYs=!0),n.config.yaxis.forEach((s,c)=>{let l=n.globals.ignoreYAxisIndexes.includes(c)||!s.show||s.floating||e[c].width===0,u=e[c].width+t[c].width;s.opposite?n.globals.isBarHorizontal?(i=n.layout.gridWidth+n.layout.translateX-1,n.globals.translateYAxisX[c]=i-s.labels.offsetX):(i=n.layout.gridWidth+n.layout.translateX+o,l||(o+=u+20),n.globals.translateYAxisX[c]=i-s.labels.offsetX+20):(r=n.layout.translateX-a,l||(a+=u+20),n.globals.translateYAxisX[c]=r+s.labels.offsetX)})}setYAxisTextAlignments(){let e=this.w;Array.from(e.dom.baseEl.getElementsByClassName(`apexcharts-yaxis`)).forEach((t,n)=>{let r=e.config.yaxis[n];if(r&&!r.floating&&r.labels.align!==void 0){let t=e.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${n}'] .apexcharts-yaxis-texts-g`),i=Array.from(e.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${n}'] .apexcharts-yaxis-label`)),a=t.getBoundingClientRect();i.forEach(e=>{e.setAttribute(`text-anchor`,r.labels.align)}),r.labels.align===`left`&&!r.opposite?t.setAttribute(`transform`,`translate(-${a.width}, 0)`):r.labels.align===`center`?t.setAttribute(`transform`,`translate(${a.width/2*(r.opposite?1:-1)}, 0)`):r.labels.align===`right`&&r.opposite&&t.setAttribute(`transform`,`translate(${a.width}, 0)`)}})}},gt=class{constructor(e,t){this.w=e,this.ctx=t,this.documentEvent=this.documentEvent.bind(this)}addEventListener(e,t){let n=this.w;Object.prototype.hasOwnProperty.call(n.globals.events,e)?n.globals.events[e].push(t):n.globals.events[e]=[t]}removeEventListener(e,t){let n=this.w;if(!Object.prototype.hasOwnProperty.call(n.globals.events,e))return;let r=n.globals.events[e].indexOf(t);r!==-1&&n.globals.events[e].splice(r,1)}fireEvent(e,t){let n=this.w;if(!Object.prototype.hasOwnProperty.call(n.globals.events,e))return;(!t||!t.length)&&(t=[]);let r=n.globals.events[e],i=r.length;for(let e=0;e<i;e++)r[e].apply(null,t)}setupEventHandlers(){let e=this.w,t=this.ctx,n=e.dom.baseEl.querySelector(e.globals.chartClass);this.ctx.eventList.forEach(r=>{n?.addEventListener(r,n=>{let r=n.target.getAttribute(`i`)===null&&e.interact.capturedSeriesIndex!==-1?e.interact.capturedSeriesIndex:n.target.getAttribute(`i`),i=n.target.getAttribute(`j`)===null&&e.interact.capturedDataPointIndex!==-1?e.interact.capturedDataPointIndex:n.target.getAttribute(`j`),a=Object.assign({},e,{seriesIndex:e.globals.axisCharts?r:0,dataPointIndex:i});n.type===`keydown`?e.config.chart.accessibility.enabled&&e.config.chart.accessibility.keyboard.enabled&&(t.ctx.keyboardNavigation&&t.ctx.keyboardNavigation.handleKey(n),typeof e.config.chart.events.keyDown==`function`&&e.config.chart.events.keyDown(n,t,a),t.ctx.events.fireEvent(`keydown`,[n,t,a])):n.type===`keyup`?e.config.chart.accessibility.enabled&&e.config.chart.accessibility.keyboard.enabled&&(typeof e.config.chart.events.keyUp==`function`&&e.config.chart.events.keyUp(n,t,a),t.ctx.events.fireEvent(`keyup`,[n,t,a])):n.type===`mousemove`||n.type===`touchmove`?typeof e.config.chart.events.mouseMove==`function`&&e.config.chart.events.mouseMove(n,t,a):n.type===`mouseleave`||n.type===`touchleave`?typeof e.config.chart.events.mouseLeave==`function`&&e.config.chart.events.mouseLeave(n,t,a):(n.type===`mouseup`&&n.which===1||n.type===`touchend`)&&(typeof e.config.chart.events.click==`function`&&e.config.chart.events.click(n,t,a),t.ctx.events.fireEvent(`click`,[n,t,a]))},{capture:!1,passive:!0})}),this.ctx.eventList.forEach(t=>{e.dom.baseEl.addEventListener(t,this.documentEvent,{passive:!0})}),this.ctx.core.setupBrushHandler()}documentEvent(e){let t=this.w,n=e.target.className;if(e.type===`click`){let e=t.dom.baseEl.querySelector(`.apexcharts-menu`);e&&e.classList.contains(`apexcharts-menu-open`)&&n!==`apexcharts-menu-icon`&&e.classList.remove(`apexcharts-menu-open`)}t.interact.clientX=e.type===`touchmove`?e.touches[0].clientX:e.clientX,t.interact.clientY=e.type===`touchmove`?e.touches[0].clientY:e.clientY}},_t=class{constructor(e){this.w=e}setCurrentLocaleValues(e){let t=this.w.config.chart.locales,n=v.getApex();n.chart&&n.chart.locales&&n.chart.locales.length>0&&(t=this.w.config.chart.locales.concat(n.chart.locales));let r=t.filter(t=>t.name===e)[0];if(r){let e=O.extend(j,r);this.w.globals.locale=e.options}else throw Error(`Wrong locale name provided. Please make sure you set the correct locale name in options`)}},vt=class{constructor(e,t){this.w=e,this.ctx=t}drawAxis(e,t){let n=this.w.globals,r=this.w.config,i=new ut(this.w,this.ctx,t),a=new ht(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale},t);if(n.axisCharts&&e!==`radar`){let e,t;n.isBarHorizontal?(t=a.drawYaxisInversed(0),e=i.drawXaxisInversed(0),this.w.dom.elGraphical.add(e),this.w.dom.elGraphical.add(t)):(e=i.drawXaxis(),this.w.dom.elGraphical.add(e),r.yaxis.map((e,r)=>{if(n.ignoreYAxisIndexes.indexOf(r)===-1&&(t=a.drawYaxis(r),this.w.dom.Paper.add(t),this.w.config.grid.position===`back`)){let e=this.w.dom.Paper.children()[1];e&&(e.remove(),this.w.dom.Paper.add(e))}}))}}},yt=class{constructor(e){this.w=e}drawXCrosshairs(){let e=this.w;e.dom.elGraphical.node.querySelectorAll(`:scope > .apexcharts-xcrosshairs`).forEach(e=>e.remove());let t=new H(this.w),n=new Qe(this.w),r=e.config.xaxis.crosshairs.fill.gradient,i=e.config.xaxis.crosshairs.dropShadow,a=e.config.xaxis.crosshairs.fill.type,o=r.colorFrom,s=r.colorTo,c=r.opacityFrom,l=r.opacityTo,u=r.stops,d=i.enabled,f=i.left,p=i.top,m=i.blur,h=i.color,g=i.opacity,_=e.config.xaxis.crosshairs.fill.color;if(e.config.xaxis.crosshairs.show){a===`gradient`&&(_=t.drawGradient(`vertical`,o,s,c,l,null,u,[]));let r=e.config.xaxis.crosshairs.width===1?t.drawLine(0,0,0,0):t.drawRect(),i=e.layout.gridHeight;(!O.isNumber(i)||i<0)&&(i=0);let v=e.config.xaxis.crosshairs.width;(!O.isNumber(v)||Number(v)<0)&&(v=0),r.attr({class:`apexcharts-xcrosshairs`,x:0,y:0,y2:i,width:v,height:i,fill:_,filter:`none`,"fill-opacity":e.config.xaxis.crosshairs.opacity,stroke:e.config.xaxis.crosshairs.stroke.color,"stroke-width":e.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":e.config.xaxis.crosshairs.stroke.dashArray}),d&&(r=n.dropShadow(r,{left:f,top:p,blur:m,color:h,opacity:g})),e.dom.elGraphical.add(r)}}drawYCrosshairs(){let e=this.w;e.dom.elGraphical.node.querySelectorAll(`:scope > .apexcharts-ycrosshairs, :scope > .apexcharts-ycrosshairs-hidden`).forEach(e=>e.remove());let t=new H(this.w),n=e.config.yaxis[0].crosshairs,r=e.globals.barPadForNumericAxis;if(e.config.yaxis[0].crosshairs.show){let i=t.drawLine(-r,0,e.layout.gridWidth+r,0,n.stroke.color,n.stroke.dashArray,n.stroke.width);i.attr({class:`apexcharts-ycrosshairs`}),e.dom.elGraphical.add(i)}let i=t.drawLine(-r,0,e.layout.gridWidth+r,0,n.stroke.color,0,0);i.attr({class:`apexcharts-ycrosshairs-hidden`}),e.dom.elGraphical.add(i)}};function bt(e,t){if(!O.isObject(e)||!O.isObject(t))return t===void 0?e:t;let n=m({},e);for(let r of Object.keys(t)){let i=t[r];i!==void 0&&(n[r]=O.isObject(i)&&O.isObject(e[r])?bt(e[r],i):i)}return n}var xt=class{constructor(e){this.w=e,this._activeBreakpoint=null}checkResponsiveConfig(e){let t=this.w,n=t.config;if(n.responsive.length===0)return;let r=n.responsive.slice();r.sort((e,t)=>e.breakpoint>t.breakpoint?1:t.breakpoint>e.breakpoint?-1:0).reverse();let i=new z({}),a=(e={})=>{let n=r[0].breakpoint,a=v.isBrowser()?window.innerWidth>0?window.innerWidth:screen.width:0;if(a>n){if(this._activeBreakpoint!==null){if(!t.globals.initialConfig)return;let n=O.clone(t.globals.initialConfig);n.series=O.clone(t.config.series);let r=ue.extendArrayProps(i,n,t);e=O.extend(r,e),this.overrideResponsiveOptions(e),this._activeBreakpoint=null}}else for(let n=0;n<r.length;n++)if(a<r[n].breakpoint){let a=r[n].options?.yaxis?O.clone(r[n].options.yaxis):null;if(e=ue.extendArrayProps(i,r[n].options,t),e=O.extend(t.config,e),Array.isArray(t.config.yaxis)&&a){let n=Array.isArray(a)?a:[a];e=h(m({},e),{yaxis:t.config.yaxis.map((e,t)=>bt(e,n[t]))})}this.overrideResponsiveOptions(e),this._activeBreakpoint=r[n].breakpoint}};if(e){let n=ue.extendArrayProps(i,e,t);n=O.extend(t.config,n),n=O.extend(n,e),a(n)}else a({})}overrideResponsiveOptions(e){let t=new z(e).init({responsiveOverride:!0});this.w.config=t}};function St(e){let t=e.globals;if(t.streamScrolled=!1,!t.axisCharts||!e.seriesData||!Array.isArray(e.seriesData.series)||e.seriesData.series.length===0){t.prevStreamFrame=null;return}let n=[];e.dom?.baseEl?.querySelectorAll&&e.dom.baseEl.querySelectorAll(`.apexcharts-marker`).forEach(e=>{let t=parseInt(e.getAttribute(`index`)??``,10),r=parseInt(e.getAttribute(`j`)??e.getAttribute(`rel`)??``,10),i=parseFloat(e.getAttribute(`r`)??e.getAttribute(`default-marker-size`)??``);isFinite(t)&&isFinite(r)&&isFinite(i)&&((n[t]=n[t]||[])[r]=i)}),t.prevStreamFrame={seriesX:(e.seriesData.seriesX||[]).slice(),seriesY:e.seriesData.series.slice(),xPixels:(t.seriesXvalues||[]).slice(),yPixels:(t.seriesYvalues||[]).slice(),rPixels:n,labels:(t.labels||[]).slice(),isXNumeric:!!e.axisFlags?.isXNumeric}}function Ct(e,t){let n=t.config.chart.streaming;if(!n||!n.enabled)return;let r=n.maxPoints,i=t.config.xaxis.range,a=e=>e==null?null:Array.isArray(e)?typeof e[0]==`number`?e[0]:null:typeof e==`object`&&typeof e.x==`number`?e.x:null;e.forEach(e=>{let t=e?.data;if(!Array.isArray(t)||t.length<2)return;if(typeof r==`number`&&r>0){t.length>r&&(e.data=t.slice(t.length-r));return}if(!i)return;let n=a(t[t.length-1]),o=a(t[0]);if(n==null||o==null||n<=o)return;let s=(n-o)/(t.length-1),c=n-i-2*s,l=0;for(;l<t.length&&(a(t[l])??c)<c;)l++;l>0&&(e.data=t.slice(l))})}function wt(e){let t=e.config.chart.animations;if(!t||t.enabled===!1||!t.dynamicAnimation||t.dynamicAnimation.enabled===!1)return!1;let n=t.largeDatasetThreshold??0;return n>0&&e.globals.dataPoints>n?!1:!!(v.isBrowser()&&e.globals.dataChanged&&e.globals.shouldAnimate)}function Tt(e,t,n){if(e.axisFlags?.isXNumeric){let r=e.seriesData?.seriesX?.[t];if(r&&r.length&&r[n]!=null)return`x:`+r[n]}let r=e.globals.labels?.[n];return r!=null&&String(r)!==``?`c:`+(Array.isArray(r)?r.join(` `):String(r)):`j:`+n}function Et(e,t,n){if(e.isXNumeric){let r=e.seriesX?.[t];if(r&&r.length&&r[n]!=null)return`x:`+r[n]}let r=e.labels?.[n];return r!=null&&String(r)!==``?`c:`+(Array.isArray(r)?r.join(` `):String(r)):`j:`+n}function Dt(e,t){let n=new Map;e.forEach((e,t)=>{n.has(e)||n.set(e,t)});let r=Array(t.length),i=new Set,a=-1,o=!0,s=e.length===t.length;t.forEach((e,t)=>{let c=n.has(e)&&!i.has(n.get(e))?n.get(e):-1;r[t]=c,c!==-1&&(i.add(c),c<a&&(o=!1),a=c),c!==t&&(s=!1)});let c=[];for(let t=0;t<e.length;t++)i.has(t)||c.push(t);return{toOld:r,exits:c,ordered:o,changed:!s}}function Ot(e){let t=new Map;return e.map(e=>{let n=t.get(e)||0;return t.set(e,n+1),n===0?e:`${e}#${n}`})}function kt(e,t,n=!1,r=!1){if(!wt(e))return null;let i=e.globals.prevStreamFrame;if(!i)return null;let a=i.seriesY?.[t],o=e.seriesData.series?.[t];if(!Array.isArray(a)||!Array.isArray(o)||!a.length||!o.length)return null;let s=Ot(a.map((e,n)=>Et(i,t,n))),c=Ot(o.map((n,r)=>Tt(e,t,r))),l=Dt(s,c);return!l.ordered&&!r||!l.changed&&!n?null:{join:l,oldKeys:s,newKeys:c}}function At(e){let t=e.config.chart.animations;return Be(t.dynamicAnimation?.easing??t.easing)}function jt(e,t,n,r,i){let a=performance.now(),o=s=>{if(e.globals.isDestroyed)return;let c=Math.max(0,Math.min(1,(s-a)/t));r(n(c),c),c<1?T.requestAnimationFrame(o):i&&i()};T.requestAnimationFrame(o)}function Mt(e,t,n){return[...e.querySelectorAll(t)].map(e=>({text:e.textContent||``,display:e.querySelector(`tspan`)?.textContent??e.textContent??``,pos:parseFloat(e.getAttribute(n)||``),transform:e.getAttribute(`transform`)}))}function Nt(e,t,n){return[...e.querySelectorAll(t)].map(e=>parseFloat(e.getAttribute(n)||``))}var Pt=`:not(.apexcharts-tick-ghost)`,Ft=`.apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)${Pt}`,It=`.apexcharts-yaxis-texts-g text${Pt}`,Lt=`.apexcharts-gridlines-vertical line${Pt}`,Rt=`.apexcharts-gridlines-horizontal line${Pt}`;function zt(e){let t=e.globals;if(!e.axisFlags?.isXNumeric||t.isBarHorizontal||e.config.xaxis?.reversed)return null;let n=t.minX,r=t.maxX,i=e.layout.gridWidth;return!isFinite(n)||!isFinite(r)||!(r>n)||!(i>0)?null:{min:n,max:r,width:i}}function Bt(e,t){let n=e.globals;if(n.isBarHorizontal||!Array.isArray(e.config.yaxis)||e.config.yaxis.length!==1||e.config.yaxis[0]?.logarithmic)return null;let r=n.minY,i=n.maxY;if(!isFinite(r)||!isFinite(i)||!(i>r))return null;let a=t.map(e=>e.pos).filter(e=>isFinite(e));return a.length<2?null:{min:r,max:i,pLo:Math.max(...a),pHi:Math.min(...a)}}function Vt(e,t){if(!e||!t)return null;let n=e.max-e.min,r=t.max-t.min;return!(n>0)||!(r>0)||!(e.width>0)||!(t.width>0)?null:{toNew:i=>(e.min+i/e.width*n-t.min)/r*t.width,toOld:i=>(t.min+i/t.width*r-e.min)/n*e.width}}function Ht(e,t){if(!e||!t)return null;let n=e.pHi-e.pLo,r=t.pHi-t.pLo,i=e.max-e.min,a=t.max-t.min;if(!n||!r||!(i>0)||!(a>0))return null;let o=t=>e.min+(t-e.pLo)/n*i,s=e=>t.min+(e-t.pLo)/r*a;return{toNew:e=>t.pLo+(o(e)-t.min)/a*r,toOld:t=>e.pLo+(s(t)-e.min)/i*n}}function Ut(e){let t=e.globals;if(t.prevChromeFrame=null,!t.axisCharts||!v.isBrowser())return;let n=e.dom.baseEl;if(O.elementExists(n))try{let r=Mt(n,It,`y`);t.prevChromeFrame={xLabels:Mt(n,Ft,`x`),yLabels:r,vGrid:Nt(n,Lt,`x1`),hGrid:Nt(n,Rt,`y1`),xScale:zt(e),yAnchors:Bt(e,r)}}catch{t.prevChromeFrame=null}}function Wt(e,t,n,r){let i=t.style;i.opacity=`0`,jt(e,n,r,e=>{i.opacity=String(e)},()=>{i.opacity=``})}function Gt(e,t,n,r,i,a,o){n.forEach(e=>t.setAttribute(e,String(r))),jt(e,a,o,e=>{let a=String(r+(i-r)*e);n.forEach(e=>t.setAttribute(e,a))},()=>{n.forEach(e=>t.setAttribute(e,String(i)))})}function Kt(e,{template:t,display:n,attrs:r,from:i,to:a,duration:o,ease:s}){let c=t.parentNode;if(!c)return;let l=t.cloneNode(!0);if(l.classList.add(`apexcharts-tick-ghost`),l.setAttribute(`pointer-events`,`none`),l.removeAttribute(`id`),n!==void 0){let e=l.querySelector(`tspan`);e?e.textContent=n:l.textContent=n;let t=l.querySelector(`title`);t&&(t.textContent=n)}r.forEach(e=>l.setAttribute(e,String(i)));let u=l.style;u.opacity=`1`,c.appendChild(l),jt(e,o,s,e=>{let t=String(i+(a-i)*e);r.forEach(e=>l.setAttribute(e,t)),u.opacity=String(1-e)},()=>{l.parentNode&&l.parentNode.removeChild(l)})}var qt=20;function Jt(e,{newLabels:t,oldLabels:n,posAttr:r,newLines:i,oldLines:a,lineAttrs:o,duration:s,ease:c,project:l}){let u=new Map;n.forEach((e,t)=>{u.has(e.text)||u.set(e.text,h(m({},e),{i:t}))});let d=new Set,f=i.length===t.length,p=a.length===n.length,g=n.map(e=>e.pos).concat(t.map(e=>parseFloat(e.getAttribute(r)||``))).filter(e=>isFinite(e)),_=Math.min(...g),v=Math.max(...g),y=Math.max(40,(v-_)*.25),b=e=>Math.max(_-y,Math.min(v+y,e)),x=(t,n)=>{if(!t)return;let r=parseFloat(t.getAttribute(o[0])||``),i=a[n.i];isFinite(r)&&isFinite(i)&&Gt(e,t,o,i,r,s,c)};if(t.forEach((t,n)=>{let a=parseFloat(t.getAttribute(r)||``),p=u.get(t.textContent||``),m=f?i[n]:null;p&&d.add(p.i);let h=t.getAttribute(`transform`);if(!p||!isFinite(p.pos)){if(!p){if(l&&isFinite(a)&&!h){let n=isFinite(l.toOld(a))?b(l.toOld(a)):NaN;isFinite(n)&&Math.abs(n-a)>.5&&(Gt(e,t,[r],n,a,s,c),m&&Gt(e,m,o,n,a,s,c))}Wt(e,t,s,c),m&&Wt(e,m,s,c)}return}if(!(!isFinite(a)||Math.abs(p.pos-a)<.5)){if(h||p.transform){let n=p.pos-a;if(isFinite(n)){let i=h||``;jt(e,s,c,e=>{let a=n*(1-e),o=r===`x`?`translate(${a} 0)`:`translate(0 ${a})`;t.setAttribute(`transform`,`${o} ${i}`.trim())},()=>{i?t.setAttribute(`transform`,i):t.removeAttribute(`transform`)})}x(m,p);return}Gt(e,t,[r],p.pos,a,s,c),x(m,p)}}),!l||!t.length)return;let S=0;n.forEach((n,u)=>{if(d.has(u)||!isFinite(n.pos)||n.transform||S>=qt)return;let f=l.toNew(n.pos);!isFinite(f)||Math.abs(f-n.pos)<.5||(S++,Kt(e,{template:t[0],display:n.display,attrs:[r],from:n.pos,to:b(f),duration:s,ease:c}),p&&i.length&&isFinite(a[u])&&Kt(e,{template:i[0],attrs:o,from:a[u],to:b(l.toNew(a[u])),duration:s,ease:c}))})}function Yt(e){let t=e.globals,n=t.prevChromeFrame;if(t.prevChromeFrame=null,!n||!t.axisCharts||!v.isBrowser()||!wt(e)||!(e.seriesData.series||[]).some((t,n)=>kt(e,n,!0,!0)!==null))return;let r=e.dom.baseEl;if(!O.elementExists(r))return;let i=Math.max(1,e.config.chart.animations.dynamicAnimation.speed||1),a=At(e);try{let t=[...r.querySelectorAll(It)],o=Vt(n.xScale,zt(e)),s=Ht(n.yAnchors,Bt(e,t.map(e=>({pos:parseFloat(e.getAttribute(`y`)||``)}))));Jt(e,{newLabels:[...r.querySelectorAll(Ft)],oldLabels:n.xLabels,posAttr:`x`,newLines:[...r.querySelectorAll(Lt)],oldLines:n.vGrid,lineAttrs:[`x1`,`x2`],duration:i,ease:a,project:o}),Jt(e,{newLabels:t,oldLabels:n.yLabels,posAttr:`y`,newLines:[...r.querySelectorAll(Rt)],oldLines:n.hGrid,lineAttrs:[`y1`,`y2`],duration:i,ease:a,project:s})}catch{}}var Xt=`.apexcharts-data-labels[data\\:dlKey]`,Zt=`.apexcharts-datalabel`,Qt=`.apexcharts-datalabel-total[data\\:dlTotalKey]`;function $t(e){let t=e.config.dataLabels;return!!(t?.animate?.enabled||t?.countUp?.enabled)}function en(e){if(!isFinite(e))return 0;let t=String(Math.abs(e)),n=t.indexOf(`e`);if(n!==-1){let e=t.slice(0,n),r=parseInt(t.slice(n+1),10),i=e.indexOf(`.`),a=i===-1?0:e.length-i-1;return Math.min(6,Math.max(0,a-r))}let r=t.indexOf(`.`);return r===-1?0:Math.min(6,t.length-r-1)}function tn(e,t){let n=e.querySelector(`tspan`);n?n.textContent=t:e.textContent=t}function nn(e){let t=e.globals;if(t.prevDataLabels=null,!t.axisCharts||!v.isBrowser()||!$t(e))return;let n=e.dom.baseEl;if(O.elementExists(n))try{let e=new Map;n.querySelectorAll(Xt).forEach(t=>{let n=t.getAttribute(`data:dlKey`);if(!n)return;let r=t.querySelector(Zt);r&&e.set(n,{cx:parseFloat(r.getAttribute(`cx`)||``),cy:parseFloat(r.getAttribute(`cy`)||``),val:parseFloat(t.getAttribute(`data:dlVal`)||``)})}),n.querySelectorAll(Qt).forEach(t=>{let n=t.getAttribute(`data:dlTotalKey`);n&&e.set(`total::${n}`,{cx:parseFloat(t.getAttribute(`cx`)||``),cy:parseFloat(t.getAttribute(`cy`)||``),val:parseFloat(t.getAttribute(`data:dlTotalVal`)||``)})}),t.prevDataLabels=e.size?e:null}catch{t.prevDataLabels=null}}function rn(e,t,n,r){let i=t.style;i.opacity=`0`,jt(e,n,r,e=>{i.opacity=String(e)},()=>{i.opacity=``})}function an(e,{el:t,oldCx:n,oldCy:r,duration:i,ease:a,delay:o=0}){let s=t.hasAttribute(`cx`)?t:t.querySelector(Zt);if(!s)return;let c=n-parseFloat(s.getAttribute(`cx`)||``),l=r-parseFloat(s.getAttribute(`cy`)||``);if(!isFinite(c)||!isFinite(l)||Math.abs(c)+Math.abs(l)<=.5)return;let u=t.getAttribute(`transform`)||``,d=()=>jt(e,i,a,e=>{let n=1-e;t.setAttribute(`transform`,`translate(${c*n} ${l*n}) ${u}`.trim())},()=>{u?t.setAttribute(`transform`,u):t.removeAttribute(`transform`)});o>0?(t.setAttribute(`transform`,`translate(${c} ${l}) ${u}`.trim()),setTimeout(()=>{e.globals.isDestroyed||d()},o)):d()}function on(e,{el:t,from:n,to:r,formatter:i,fmtOpts:a,duration:o,ease:s,delay:c=0}){if(!isFinite(n)||!isFinite(r)||Math.abs(r-n)<=1e-9)return;let l=Math.max(en(n),en(r)),u=e=>{let t=Number(e.toFixed(l)),n=t;if(typeof i==`function`)try{n=i(t,a)}catch{n=t}return String(n)},d=()=>jt(e,o,s,e=>{tn(t,u(n+(r-n)*e))},()=>{tn(t,u(r))});c>0?(tn(t,u(n)),setTimeout(()=>{e.globals.isDestroyed||d()},c)):d()}function sn(e){let t=e.globals,n=t.prevDataLabels;if(t.prevDataLabels=null,!n||!t.axisCharts||!v.isBrowser()||!$t(e)||!wt(e))return;let r=e.dom.baseEl;if(!O.elementExists(r))return;let i=e.config.dataLabels,a=!!i.animate?.enabled,o=!!i.countUp?.enabled,s=i.formatter,c=Math.max(1,e.config.chart.animations.dynamicAnimation.speed||1),l=At(e);try{r.querySelectorAll(Xt).forEach(t=>{let r=t.getAttribute(`data:dlKey`);if(!r)return;let i=t.querySelector(Zt);if(!i)return;let u=n.get(r),d=parseInt(t.getAttribute(`data:dlDelay`)||`0`,10)||0;if(a&&(u&&isFinite(u.cx)&&isFinite(u.cy)?an(e,{el:t,oldCx:u.cx,oldCy:u.cy,duration:c,ease:l,delay:d}):u||rn(e,t,c,l)),o&&u){let n=parseInt(r,10),a=parseInt(t.getAttribute(`data:dlJ`)||``,10);on(e,{el:i,from:u.val,to:parseFloat(t.getAttribute(`data:dlVal`)||``),formatter:s,fmtOpts:h(m({},e),{seriesIndex:n,dataPointIndex:isFinite(a)?a:0,w:e}),duration:c,ease:l,delay:d})}});let t=e.config.plotOptions.bar.dataLabels.total.formatter||s;r.querySelectorAll(Qt).forEach(r=>{let i=r.getAttribute(`data:dlTotalKey`);if(!i)return;let s=n.get(`total::${i}`);if(!s)return;let u=parseInt(r.getAttribute(`data:dlDelay`)||`0`,10)||0;if(a&&isFinite(s.cx)&&isFinite(s.cy)&&an(e,{el:r,oldCx:s.cx,oldCy:s.cy,duration:c,ease:l,delay:u}),o){let n=parseInt(r.getAttribute(`data:dlTotalSeries`)||i,10);on(e,{el:r,from:s.val,to:parseFloat(r.getAttribute(`data:dlTotalVal`)||``),formatter:t,fmtOpts:h(m({},e),{seriesIndex:n,dataPointIndex:0,w:e}),duration:c,ease:l,delay:u})}})}catch{}}var cn=class e{constructor(e,{toggleDataSeries:t=void 0,revertDefaultAxisMinMax:n=void 0,updateSeries:r=void 0}={}){this.w=e,this._toggleDataSeries=t||null,this._revertDefaultAxisMinMax=n||null,this._updateSeries=r||null,this.legendInactiveClass=`legend-mouseover-inactive`}clearSeriesCache(){let e=this.w;e.globals.cachedSelectors&&(delete e.globals.cachedSelectors.allSeriesEls,delete e.globals.cachedSelectors.highlightSeriesEls)}getAllSeriesEls(){let e=this.w,t=`allSeriesEls`;return e.globals.cachedSelectors[t]||(e.globals.cachedSelectors[t]=e.dom.baseEl.getElementsByClassName(`apexcharts-series`)),e.globals.cachedSelectors[t]}getSeriesByName(e){return this.w.dom.baseEl.querySelector(`.apexcharts-inner .apexcharts-series[seriesName='${O.escapeString(e)}']`)}isSeriesHidden(e){let t=this.getSeriesByName(e),n=parseInt(t.getAttribute(`data:realIndex`)??`0`,10);return{isHidden:t.classList.contains(`apexcharts-series-collapsed`),realIndex:n}}addCollapsedClassToSeries(t,n){e.addCollapsedClassToSeries(this.w,t,n)}static addCollapsedClassToSeries(e,t,n){let r=!1;function i(e){for(let i=0;i<e.length;i++)e[i].index===n&&(t.node.classList.add(`apexcharts-series-collapsed`),r=!0)}if(i(e.globals.collapsedSeries),i(e.globals.ancillaryCollapsedSeries),!r||(e.globals.collapsingSeriesIndices||[]).indexOf(n)===-1||(t.node.classList.add(`apexcharts-series-collapsing`),!v.isBrowser()))return;let a=e.config.chart.animations,o=(a.dynamicAnimation.speed||0)+(a.speed||0)+100;setTimeout(()=>{e.globals.isDestroyed||t.node.classList.remove(`apexcharts-series-collapsing`)},o)}toggleSeries(e){var t;let n=this.isSeriesHidden(e);return(t=this._toggleDataSeries)==null||t.call(this,n.realIndex,n.isHidden),n.isHidden}showSeries(e){var t;let n=this.isSeriesHidden(e);n.isHidden&&((t=this._toggleDataSeries)==null||t.call(this,n.realIndex,!0))}hideSeries(e){var t;let n=this.isSeriesHidden(e);n.isHidden||(t=this._toggleDataSeries)==null||t.call(this,n.realIndex,!1)}prepareDataUpdate(){let e=this.w;this.clearSeriesCache(),e.globals.previousPaths=[],e.globals.collapsedSeries=[],e.globals.ancillaryCollapsedSeries=[],e.globals.collapsedSeriesIndices=[],e.globals.ancillaryCollapsedSeriesIndices=[]}resetSeries(e=!0,t=!0,n=!0){var r,i;let a=this.w;this.clearSeriesCache();let o=O.clone(a.globals.initialSeries);Array.isArray(o)||(o=O.clone(a.config.series)||[]),a.globals.previousPaths=[],n?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):o=this.emptyCollapsedSeries(o),a.config.series=o,e&&(t&&(a.interact.zoomed=!1,(r=this._revertDefaultAxisMinMax)==null||r.call(this)),(i=this._updateSeries)==null||i.call(this,o,a.config.chart.animations.dynamicAnimation.enabled))}emptyCollapsedSeries(e){let t=this.w;if(!Array.isArray(e))return e;for(let n=0;n<e.length;n++)t.globals.collapsedSeriesIndices.indexOf(n)>-1&&(e[n]&&typeof e[n]==`object`?e[n].data=[]:e[n]=0);return e}_deriveSeriesNames(){let e=this.w,t=e.config.series||[],n=e.config.labels||[];return t.map((e,t)=>e&&typeof e==`object`&&e.name!=null?String(e.name):n[t]==null?`series-${t+1}`:String(n[t]))}reconcileCollapsedByName(){let e=this.w,t=e.globals,n=this._deriveSeriesNames(),r=r=>{let i=[],a=[];return r.forEach(r=>{let o=r&&r.name!=null?n.indexOf(r.name):r.index;if(o==null||o<0||o>=e.config.series.length)return;let s=e.config.series[o];r.index=o,r.data=t.axisCharts?s&&s.data?s.data.slice():[]:s,i.push(r),a.push(o)}),{records:i,indices:a}},i=r(t.collapsedSeries);t.collapsedSeries=i.records,t.collapsedSeriesIndices=i.indices;let a=r(t.ancillaryCollapsedSeries);t.ancillaryCollapsedSeries=a.records,t.ancillaryCollapsedSeriesIndices=a.indices,t.allSeriesCollapsed=t.collapsedSeries.length+t.ancillaryCollapsedSeries.length===e.config.series.length,this.emptyCollapsedSeries(e.config.series)}canvasRestyle(e){let t=this.w.globals.activeRenderer;t&&t.kind===`canvas`&&typeof t.restyle==`function`&&t.restyle(e)}highlightSeries(e){let t=this.w,n=this.getSeriesByName(e),r=parseInt(n?.getAttribute(`data:realIndex`)??``,10),i=`highlightSeriesEls`,a=t.globals.cachedSelectors[i];a||(a=t.dom.baseEl.querySelectorAll(`.apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis`),t.globals.cachedSelectors[i]=a);let o=null,s=null,c=null;if(t.globals.axisCharts||t.config.chart.type===`radialBar`){if(t.globals.axisCharts){o=t.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${r}']`),s=t.dom.baseEl.querySelector(`.apexcharts-datalabels[data\\:realIndex='${r}']`);let e=t.globals.seriesYAxisReverseMap[r];c=t.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${e}']`)}else o=t.dom.baseEl.querySelector(`.apexcharts-series[rel='${r+1}']`)}else o=t.dom.baseEl.querySelector(`.apexcharts-series[rel='${r+1}'] path`);for(let e=0;e<a.length;e++)a[e].classList.add(this.legendInactiveClass);if(o)t.globals.axisCharts||o.parentNode?.classList.remove(this.legendInactiveClass),o.classList.remove(this.legendInactiveClass),s!==null&&s.classList.remove(this.legendInactiveClass),c!==null&&c.classList.remove(this.legendInactiveClass);else for(let e=0;e<a.length;e++)a[e].classList.remove(this.legendInactiveClass);this.canvasRestyle(o&&!Number.isNaN(r)?{active:r,opacity:.2}:null)}toggleSeriesOnHover(e,t){let n=this.w;t||=e.target;let r=n.dom.baseEl.querySelectorAll(`.apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis`);if(e.type===`mousemove`){let e=parseInt(t.getAttribute(`rel`),10)-1;this.highlightSeries(n.seriesData.seriesNames[e])}else if(e.type===`mouseout`){for(let e=0;e<r.length;e++)r[e].classList.remove(this.legendInactiveClass);this.canvasRestyle(null)}}highlightRangeInSeries(e,t){let n=this.w,r=n.dom.baseEl.getElementsByClassName(`apexcharts-heatmap-rect`),i=e=>{for(let t=0;t<r.length;t++){let n=r[t].classList;typeof n[e]==`function`&&n[e](this.legendInactiveClass)}};if(t===`reset`){i(`remove`);return}let a=n.config.plotOptions.heatmap.colorScale.ranges,o=a&&a[e];if(o){i(`add`);for(let e=0;e<r.length;e++){let t=Number(r[e].getAttribute(`val`));t>=o.from&&t<=o.to&&r[e].classList.remove(this.legendInactiveClass)}}}getActiveConfigSeriesIndex(e=`asc`,t=[]){let n=this.w,r=0;if(n.config.series.length>1){let i=n.config.series.map((e,r)=>e.data&&e.data.length>0&&n.globals.collapsedSeriesIndices.indexOf(r)===-1&&(!n.globals.comboCharts||t.length===0||t.length&&t.indexOf(n.config.series[r].type)>-1)?r:-1);for(let t=e===`asc`?0:i.length-1;e===`asc`?t<i.length:t>=0;e===`asc`?t++:t--)if(i[t]!==-1){r=i[t];break}}return r}getActiveConfigSeriesIndexByGroup(e=[]){let t=this.w;return(t.labelData.seriesGroups||[]).map(n=>{let r=-1;return t.config.series.forEach((i,a)=>{n.indexOf(t.seriesData.seriesNames[a])!==-1&&(t.globals.comboCharts&&e.length&&e.indexOf(i.type)===-1||i.data&&i.data.length>0&&t.globals.collapsedSeriesIndices.indexOf(a)===-1&&(r=a))}),r})}getBarSeriesIndices(){return this.w.globals.comboCharts?this.w.config.series.map((e,t)=>e.type===`bar`||e.type===`column`?t:-1).filter(e=>e!==-1):this.w.config.series.map((e,t)=>t)}getPreviousPaths(){let e=this.w;if(St(e),Ut(e),nn(e),!e.globals.axisCharts){e.globals.previousPaths=e.seriesData.series;return}if(!O.elementExists(e.dom.baseEl)){e.globals.previousPaths=[];return}e.globals.previousPaths=[];function t(t,n,r){let i=t[n].childNodes,a={type:r,paths:[],realIndex:t[n].getAttribute(`data:realIndex`)};for(let e=0;e<i.length;e++)if(i[e].hasAttribute(`pathTo`)){let t=i[e].getAttribute(`pathTo`);a.paths.push({d:t,key:i[e].getAttribute(`data:pathKey`),fill:i[e].getAttribute(`fill`),flip:i[e].classList.contains(`apexcharts-flip-y`)||i[e].classList.contains(`apexcharts-flip-x`)})}e.globals.previousPaths.push(a)}let n=t=>e.dom.baseEl.querySelectorAll(`.apexcharts-${t}-series .apexcharts-series`);[`line`,`area`,`bar`,`rangebar`,`rangeArea`,`candlestick`,`radar`].forEach(e=>{let r=n(e);for(let n=0;n<r.length;n++)t(r,n,e)});let r=e.dom.baseEl.querySelectorAll(`.apexcharts-${e.config.chart.type} .apexcharts-series`);if(r.length>0)for(let t=0;t<r.length;t++){let n=e.dom.baseEl.querySelectorAll(`.apexcharts-${e.config.chart.type} .apexcharts-series[data\\:realIndex='${t}'] rect`),r=[];for(let e=0;e<n.length;e++){let t=t=>n[e].getAttribute(t),i={x:parseFloat(t(`x`)??`0`),y:parseFloat(t(`y`)??`0`),width:parseFloat(t(`width`)??`0`),height:parseFloat(t(`height`)??`0`)};r.push({rect:i,color:n[e].getAttribute(`color`)})}e.globals.previousPaths.push(r)}}clearPreviousPaths(){let e=this.w;e.globals.previousPaths=[],e.globals.allSeriesCollapsed=!1}handleNoData(){let e=this.w,t=this,n=e.config.noData,r=new H(t.w),i=e.globals.svgWidth/2,a=e.globals.svgHeight/2,o=`middle`;if(e.globals.noData=!0,e.globals.animationEnded=!0,n.align===`left`?(i=10,o=`start`):n.align===`right`&&(i=e.globals.svgWidth-10,o=`end`),n.verticalAlign===`top`?a=50:n.verticalAlign===`bottom`&&(a=e.globals.svgHeight-50),i+=n.offsetX,a=a+parseInt(n.style.fontSize,10)+2+n.offsetY,n.text!==void 0&&n.text!==``){let t=r.drawText({x:i,y:a,text:n.text,textAnchor:o,fontSize:n.style.fontSize,fontFamily:n.style.fontFamily,foreColor:n.style.color,opacity:1,cssClass:`apexcharts-text-nodata`});e.dom.Paper.add(t)}}setNullSeriesToZeroValues(e){let t=this.w;for(let n=0;n<e.length;n++)if(e[n].length===0)for(let r=0;r<e[t.globals.maxValsInArrayIndex].length;r++)e[n].push(0);return e}hasAllSeriesEqualX(){let e=!0,t=this.w,n=this.filteredSeriesX();for(let t=0;t<n.length-1;t++)if(n[t][0]!==n[t+1][0]){e=!1;break}return t.globals.allSeriesHasEqualX=e,e}filteredSeriesX(){return this.w.seriesData.seriesX.map(e=>e.length>0?e:[])}},ln={accent:`--apx-accent`,fore:`--apx-fore`,grid:`--apx-grid`,surface:`--apx-surface`},un=24;function dn(e){if(!v.isBrowser())return{};let t=e.dom&&(e.dom.elWrap||e.dom.baseEl)||null;if(!t)return{};let n=T.getComputedStyle(t);if(!n||typeof n.getPropertyValue!=`function`)return{};let r=e=>{let t=n.getPropertyValue(e);return t?String(t).trim():``},i={};for(let e in ln){let t=r(ln[e]);t&&(i[e]=t)}let a=[];for(let e=1;e<=un;e++){let t=r(`--apx-series-${e}`);if(!t)break;a.push(t)}return a.length&&(i.series=a),i}var fn=`__apexcharts_themes__`;globalThis[fn]||(globalThis[fn]={});function pn(){return globalThis[fn]}function mn(e,t){if(!e||typeof e!=`string`){console.warn(`ApexCharts: registerTheme requires a non-empty name.`);return}if(t!=null&&(typeof t!=`object`||Array.isArray(t))){console.warn(`ApexCharts: registerTheme("${e}") expects an object like { mode, palette, tokens, monochrome, accessibility }.`);return}pn()[e]=t||{}}function hn(e){return e&&pn()[e]||null}function gn(e){e&&delete pn()[e]}var _n=`#373d3f`,vn=`#f6f7f8`,yn=`#e0e0e0`,bn=class{constructor(e){this.w=e,this.colors=[],this.isColorFn=!1,this.isHeatmapDistributed=this.checkHeatmapDistributed(),this.isBarDistributed=this.checkBarDistributed(),this._tokens={},this._namedTheme=null}checkHeatmapDistributed(){let{chart:e,plotOptions:t}=this.w.config;return e.type===`treemap`&&t.treemap&&t.treemap.distributed||e.type===`heatmap`&&t.heatmap&&t.heatmap.distributed}checkBarDistributed(){let{chart:e,plotOptions:t}=this.w.config;return t.bar&&t.bar.distributed&&(e.type===`bar`||e.type===`rangeBar`)}init(){this.setDefaultColors()}setDefaultColors(){let e=this.w,t=new O;this._namedTheme=hn(e.config.theme.name),this._applyNamedThemeMode(),e.dom.elWrap.classList.add(`apexcharts-theme-${e.config.theme.mode||`light`}`),this._applyModeDefaults(),this._tokens=this._resolveTokens(),this.applyTokenChrome(this._tokens);let n=e.config.theme.accessibility?.colorBlindMode;if(n){e.globals.colors=this.getColorBlindColors(n),this.applySeriesColors(e.seriesData.seriesColors,e.globals.colors);let t=e.globals.colors.slice();this.pushExtraColors(e.globals.colors),this.applyColorTypes([`fill`,`stroke`],t),this.applyDataLabelsColors(t),this.applyRadarPolygonsColors(),this.applyMarkersColors(t),n===`highContrast`&&e.dom.elWrap.classList.add(`apexcharts-high-contrast`);return}let r=[...e.config.colors||e.config.fill.colors||[]];e.globals.colors=this.getColors(r),this.applySeriesColors(e.seriesData.seriesColors,e.globals.colors),e.config.theme.monochrome.enabled&&(e.globals.colors=this.getMonochromeColors(e.config.theme.monochrome,e.seriesData.series,t));let i=e.globals.colors.slice();this.pushExtraColors(e.globals.colors),this.applyColorTypes([`fill`,`stroke`],i),this.applyDataLabelsColors(i),this.applyRadarPolygonsColors(),this.applyMarkersColors(i)}_applyModeDefaults(){let e=this.w,t=e.config.theme.mode;t===`dark`?(e.config.chart.foreColor===_n&&(e.config.chart.foreColor=vn),e.config.theme.palette===`palette1`&&(e.config.theme.palette=`palette4`),e.config.tooltip&&e.config.tooltip.theme!==`light`&&(e.config.tooltip.theme=`dark`)):t===`light`&&(e.config.chart.foreColor===vn&&(e.config.chart.foreColor=_n),e.config.theme.palette===`palette4`&&(e.config.theme.palette=`palette1`))}_applyNamedThemeMode(){let e=this._namedTheme;if(!e)return;let t=this.w.config.theme;e.mode&&!t.mode&&(t.mode=e.mode),e.accessibility&&e.accessibility.colorBlindMode&&!(t.accessibility&&t.accessibility.colorBlindMode)&&(t.accessibility=t.accessibility||{},t.accessibility.colorBlindMode=e.accessibility.colorBlindMode),e.monochrome&&e.monochrome.enabled&&!t.monochrome.enabled&&(t.monochrome=m(m({},t.monochrome),e.monochrome))}_resolveTokens(){let e=this._namedTheme&&this._namedTheme.tokens||{},t=this._shouldUseTokens()?dn(this.w):{};return m(m({},e),t)}_shouldUseTokens(){return this.w.config.theme.tokens!==!1}applyTokenChrome(e){if(!e)return;let t=this.w;if(e.fore&&(t.config.chart.foreColor===_n||t.config.chart.foreColor===vn)&&(t.config.chart.foreColor=e.fore),e.grid){t.config.grid.borderColor===yn&&(t.config.grid.borderColor=e.grid);let n=t=>{t&&(t.axisBorder&&t.axisBorder.color===yn&&(t.axisBorder.color=e.grid),t.axisTicks&&t.axisTicks.color===yn&&(t.axisTicks.color=e.grid))};n(t.config.xaxis),Array.isArray(t.config.yaxis)?t.config.yaxis.forEach(n):n(t.config.yaxis)}let n=t.globals.tokenSurface,r=t.config.chart.background,i=!r||r===n;if(e.surface){if(i){t.config.chart.background=e.surface,t.globals.tokenSurface=e.surface;let n=t.dom.Paper&&t.dom.Paper.node;n&&n.style&&(n.style.background=e.surface)}}else if(n&&r===n){t.config.chart.background=``,t.globals.tokenSurface=void 0;let e=t.dom.Paper&&t.dom.Paper.node;e&&e.style&&(e.style.background=``)}}getColors(e){let t=this.w;return!e||e.length===0?this.predefined():Array.isArray(e)&&e.length>0&&typeof e[0]==`function`?(this.isColorFn=!0,t.config.series.map((n,r)=>{let i=e[r]||e[0];return typeof i==`function`?i({value:t.globals.axisCharts?t.seriesData.series[r][0]||0:t.seriesData.series[r],seriesIndex:r,dataPointIndex:r,w:this.w}):i})):e}applySeriesColors(e,t){e.forEach((e,n)=>{e&&(t[n]=e)})}getMonochromeColors(e,t,n){let{color:r,shadeIntensity:i,shadeTo:a}=e,o=this.isBarDistributed||this.isHeatmapDistributed?t[0].length*t.length:t.length,s=1/(o/i),c=0;return Array.from({length:o},()=>{let e=a===`dark`?n.shadeColor(c*-1,r):n.shadeColor(c,r);return c+=s,e})}applyColorTypes(e,t){let n=this.w;e.forEach(e=>{n.globals[e].colors=n.config[e].colors===void 0?this.isColorFn?n.config.colors:t:n.config[e].colors.slice(),this.pushExtraColors(n.globals[e].colors)})}applyDataLabelsColors(e){let t=this.w;t.globals.dataLabels.style.colors=t.config.dataLabels.style.colors===void 0?e:t.config.dataLabels.style.colors.slice(),this.pushExtraColors(t.globals.dataLabels.style.colors,50)}applyRadarPolygonsColors(){let e=this.w;e.globals.radarPolygons.fill.colors=e.config.plotOptions.radar.polygons.fill.colors===void 0?[e.config.theme.mode===`dark`?`#343A3F`:`none`]:e.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(e.globals.radarPolygons.fill.colors,20)}applyMarkersColors(e){let t=this.w;t.globals.markers.colors=t.config.markers.colors===void 0?e:t.config.markers.colors.slice(),this.pushExtraColors(t.globals.markers.colors)}pushExtraColors(e,t,n=null){let r=this.w,i=t||r.seriesData.series.length;if(n===null&&(n=this.isBarDistributed||this.isHeatmapDistributed||r.config.chart.type===`heatmap`&&r.config.plotOptions.heatmap&&r.config.plotOptions.heatmap.colorScale.inverse),n&&r.seriesData.series.length&&(i=r.seriesData.series[r.globals.maxValsInArrayIndex].length*r.seriesData.series.length),e.length<i){let t=i-e.length;for(let n=0;n<t;n++)e.push(e[n])}}getColorBlindColors(e){let t=mt();return({deuteranopia:t.cvdDeuteranopia,protanopia:t.cvdProtanopia,tritanopia:t.cvdTritanopia,highContrast:t.highContrast}[e]||t.palette1).slice()}updateThemeOptions(e){e.chart=e.chart||{},e.tooltip=e.tooltip||{};let t=e.theme.mode,n=t===`dark`?`palette4`:t===`light`?`palette1`:e.theme.palette||`palette1`,r=t===`dark`?`#f6f7f8`:t===`light`?`#373d3f`:e.chart.foreColor||`#373d3f`;return e.tooltip.theme=t||`light`,e.chart.foreColor=r,e.theme.palette=n,e}predefined(){let e=this.w.config.theme.palette,t=mt(),n=t[e]||t.palette1,r=this._tokens||{};if(Array.isArray(r.series)&&r.series.length)return r.series.slice();if(r.accent)return[r.accent,...n];let i=this._namedTheme;return i&&Array.isArray(i.palette)&&i.palette.length?i.palette.slice():n}},xn=class{constructor(e){this.w=e}draw(){this.drawTitleSubtitle(`title`),this.drawTitleSubtitle(`subtitle`)}drawTitleSubtitle(e){let t=this.w,n=e===`title`?t.config.title:t.config.subtitle,r=t.globals.svgWidth/2,i=n.offsetY,a=`middle`;if(n.align===`left`?(r=10,a=`start`):n.align===`right`&&(r=t.globals.svgWidth-10,a=`end`),r+=n.offsetX,i=i+parseInt(n.style.fontSize,10)+n.margin/2,n.text!==void 0){let o=new H(this.w).drawText({x:r,y:i,text:n.text,textAnchor:a,fontSize:n.style.fontSize,fontFamily:n.style.fontFamily,fontWeight:n.style.fontWeight,foreColor:n.style.color,opacity:1});o.node.setAttribute(`class`,`apexcharts-${e}-text`),t.dom.Paper.add(o)}}},Sn=class{constructor(e){this.w=e.w,this.dCtx=e}getTitleSubtitleCoords(e){let t=this.w,n=0,r=0,i=e===`title`?t.config.title.floating:t.config.subtitle.floating,a=t.dom.baseEl.querySelector(`.apexcharts-${e}-text`);if(a!==null&&!i){let e=a.getBoundingClientRect();n=e.width,r=t.globals.axisCharts?e.height+5:e.height}return{width:n,height:r}}getLegendsRect(){let e=this.w,t=e.dom.elLegendWrap;!e.config.legend.height&&(e.config.legend.position===`top`||e.config.legend.position===`bottom`)&&t&&(t.style.maxHeight=e.globals.svgHeight/2+`px`);let n=Object.assign({},O.getBoundingClientRect(t));return t!==null&&!e.config.legend.floating&&e.config.legend.show?this.dCtx.lgRect={x:n.x,y:n.y,height:n.height,width:n.height===0?0:n.width}:this.dCtx.lgRect={x:0,y:0,height:0,width:0},(e.config.legend.position===`left`||e.config.legend.position===`right`)&&this.dCtx.lgRect.width*1.5>e.globals.svgWidth&&(this.dCtx.lgRect.width=e.globals.svgWidth/1.5),this.dCtx.lgRect}getDatalabelsRect(){let e=this.w,t=[];e.config.series.forEach((n,r)=>{n.data.forEach((n,i)=>{let a=(t=>e.config.dataLabels.formatter(t,{seriesIndex:r,dataPointIndex:i,w:e}))(e.seriesData.series[r][i]);t.push(a)})});let n=O.getLargestStringFromArr(t),r=new H(this.w),i=e.config.dataLabels.style,a=r.getTextRects(n,parseInt(i.fontSize).toString(),i.fontFamily);return{width:a.width*1.05,height:a.height}}getLargestStringFromMultiArr(e,t){let n=this.w,r=e;if(n.axisFlags.isMultiLineX){let e=t.map(e=>Array.isArray(e)?e.length:1),n=Math.max(...e);r=t[e.indexOf(n)]}return r}getSparklineStrokeInset(){let e=this.w,t=Array.isArray(e.config.stroke.width)?Math.max(...e.config.stroke.width):e.config.stroke.width,n=t/2;if(!e.config.stroke.show||!(n>0))return{top:0,bottom:0};let r=e.globals.maxY-e.globals.minY,i=this._getSeriesYExtremes();if(!this._strokeTracesDataPoints()||!(r>0)||!i)return{top:n,bottom:n};let a=Math.max(e.globals.svgHeight-t,0),o=a*(e.globals.maxY-i.max)/r,s=a*(i.min-e.globals.minY)/r;return{top:Math.min(Math.max(n-o,0),n),bottom:Math.min(Math.max(n-s,0),n)}}_strokeTracesDataPoints(){let e=this.w;if(!e.globals.axisCharts||e.config.chart.stacked)return!1;let t=[`line`,`area`,`scatter`];return e.config.series.every(n=>t.includes(n.type||e.config.chart.type))}_getSeriesYExtremes(){let e=1/0,t=-1/0;return this.w.seriesData.series.forEach(n=>{Array.isArray(n)&&n.forEach(n=>{Number.isFinite(n)&&(n<e&&(e=n),n>t&&(t=n))})}),e===1/0?null:{min:e,max:t}}},Cn=class{constructor(e){this.w=e.w,this.dCtx=e}getxAxisLabelsCoords(){let e=this.w,t=e.labelData.labels.slice();e.config.xaxis.convertedCatToNumeric&&t.length===0&&(t=e.labelData.categoryLabels);let n;if(e.labelData.timescaleLabels.length>0){let t=this.getxAxisTimeScaleLabelsCoords();n={width:t.width,height:t.height},e.layout.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends=(e.config.legend.position===`left`||e.config.legend.position===`right`)&&!e.config.legend.floating?this.dCtx.lgRect.width:0;let r=e.formatters.xLabelFormatter,i=O.getLargestStringFromArr(t),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(i,t);e.globals.isBarHorizontal&&(i=e.globals.yAxisScale[0].result.reduce((e,t)=>e.length>t.length?e:t,0),a=i);let o=new A(this.w),s=i;i=o.xLabelFormat(r,i,s,{i:void 0,dateFormatter:new k(this.w).formatDate,w:e}),a=o.xLabelFormat(r,a,s,{i:void 0,dateFormatter:new k(this.w).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&i===void 0||String(i).trim()===``)&&(i=`1`,a=i);let c=new H(this.w),l=c.getTextRects(i,e.config.xaxis.labels.style.fontSize),u=l;if(i!==a&&(u=c.getTextRects(a,e.config.xaxis.labels.style.fontSize)),n={width:l.width>=u.width?l.width:u.width,height:l.height>=u.height?l.height:u.height},n.width*t.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&e.config.xaxis.labels.rotate!==0||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.layout.rotateXLabels=!0;let t=t=>c.getTextRects(t,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,`rotate(${e.config.xaxis.labels.rotate} 0 0)`,!1);l=t(i),i!==a&&(u=t(a)),n.height=(l.height>u.height?l.height:u.height)/1.5,n.width=l.width>u.width?l.width:u.width}}else e.layout.rotateXLabels=!1}return e.config.xaxis.labels.show||(n={width:0,height:0}),{width:n.width,height:n.height}}getxAxisGroupLabelsCoords(){let e=this.w;if(!e.labelData.hasXaxisGroups)return{width:0,height:0};let t=e.config.xaxis.group.style?.fontSize||e.config.xaxis.labels.style.fontSize,n=e.labelData.groups.map(e=>e.title),r,i=O.getLargestStringFromArr(n),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(i,n),o=new H(this.w),s=o.getTextRects(i,t),c=s;return i!==a&&(c=o.getTextRects(a,t)),r={width:s.width>=c.width?s.width:c.width,height:s.height>=c.height?s.height:c.height},e.config.xaxis.labels.show||(r={width:0,height:0}),{width:r.width,height:r.height}}getxAxisTitleCoords(){let e=this.w,t=0,n=0;if(e.config.xaxis.title.text!==void 0){let r=new H(this.w).getTextRects(e.config.xaxis.title.text,e.config.xaxis.title.style.fontSize);t=r.width,n=r.height}return{width:t,height:n}}getxAxisTimeScaleLabelsCoords(){let e=this.w;this.dCtx.timescaleLabels=e.labelData.timescaleLabels.slice();let t=this.dCtx.timescaleLabels.map(e=>e.value),n=t.reduce((e,t)=>e===void 0?(console.error(`You have possibly supplied invalid Date format. Please supply a valid JavaScript Date`),0):e.length>t.length?e:t,0),r=new H(this.w).getTextRects(n,e.config.xaxis.labels.style.fontSize);return r.width*1.05*t.length>e.layout.gridWidth&&e.config.xaxis.labels.rotate!==0&&(e.globals.overlappingXLabels=!0),r}additionalPaddingXLabels(e){let t=this.w,n=t.globals,r=t.config,i=r.xaxis.type,a=e.width;n.skipLastTimelinelabel=!1,n.skipFirstTimelinelabel=!1;let o=t.config.yaxis[0].opposite&&t.globals.isBarHorizontal,s=e=>n.collapsedSeriesIndices.indexOf(e)!==-1,c=e=>{if(this.dCtx.timescaleLabels&&this.dCtx.timescaleLabels.length){let i=this.dCtx.timescaleLabels[0],o=this.dCtx.timescaleLabels[this.dCtx.timescaleLabels.length-1].position+a/1.75-this.dCtx.yAxisWidthRight,s=i.position-a/1.75+this.dCtx.yAxisWidthLeft,c=t.config.legend.position===`right`&&this.dCtx.lgRect.width>0?this.dCtx.lgRect.width:0;o>n.svgWidth-t.layout.translateX-c&&(n.skipLastTimelinelabel=!0),s<-((!e.show||e.floating)&&(r.chart.type===`bar`||r.chart.type===`candlestick`||r.chart.type===`rangeBar`||r.chart.type===`boxPlot`||r.chart.type===`violin`)?a/1.75:10)&&(n.skipFirstTimelinelabel=!0)}else i===`datetime`?this.dCtx.gridPad.right<a&&!t.layout.rotateXLabels&&(n.skipLastTimelinelabel=!0):i!==`datetime`&&this.dCtx.gridPad.right<a/2-this.dCtx.yAxisWidthRight&&!t.layout.rotateXLabels&&!t.config.xaxis.labels.trim&&(this.dCtx.xPadRight=a/2+1)},l=(e,t)=>{r.yaxis.length>1&&s(t)||c(e)};r.yaxis.forEach((e,t)=>{o?(this.dCtx.gridPad.left<a&&(this.dCtx.xPadLeft=a/2+1),this.dCtx.xPadRight=a/2+1):l(e,t)})}},wn=class{constructor(e){this.w=e.w,this.dCtx=e}getyAxisLabelsCoords(){let e=this.w,t=[],n=10,r=new lt(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});return e.config.yaxis.map((i,a)=>{let o={seriesIndex:a,dataPointIndex:-1,w:e},s=e.globals.yAxisScale[a],c=0;if(!r.isYAxisHidden(a)&&i.labels.show&&i.labels.minWidth!==void 0&&(c=i.labels.minWidth),!r.isYAxisHidden(a)&&i.labels.show&&s.result.length){let r=e.formatters.yLabelFormatters[a],l=s.niceMin===Number.MIN_VALUE?0:s.niceMin,u=s.result.reduce((e,t)=>String(r(e,o))?.length>String(r(t,o))?.length?e:t,l);u=r(u,o);let d=u;if((u===void 0||u.length===0)&&(u=s.niceMax),String(u).length===1&&(u+=`.0`,d=u),e.globals.isBarHorizontal){n=0;let t=e.labelData.labels.slice();u=O.getLargestStringFromArr(t),u=r(u,{seriesIndex:a,dataPointIndex:-1,w:e}),d=this.dCtx.dimHelpers.getLargestStringFromMultiArr(u,t)}let f=new H(this.w),p=`rotate(${i.labels.rotate} 0 0)`,m=f.getTextRects(u,i.labels.style.fontSize,i.labels.style.fontFamily,p,!1),h=m;u!==d&&(h=f.getTextRects(d,i.labels.style.fontSize,i.labels.style.fontFamily,p,!1)),t.push({width:(c>h.width||c>m.width?c:h.width>m.width?h.width:m.width)+n,height:h.height>m.height?h.height:m.height})}else t.push({width:0,height:0})}),t}getyAxisTitleCoords(){let e=this.w,t=[];return e.config.yaxis.map(e=>{if(e.show&&e.title.text!==void 0){let n=new H(this.w),r=`rotate(${e.title.rotate} 0 0)`,i=n.getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,r,!1);t.push({width:i.width,height:i.height})}else t.push({width:0,height:0})}),t}getTotalYAxisWidth(){let e=this.w,t=0,n=0,r=0,i=e.globals.yAxisScale.length>1?10:0,a=new lt(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale}),o=function(t){return e.globals.ignoreYAxisIndexes.indexOf(t)>-1},s=(s,c)=>{let l=e.config.yaxis[c].floating,u=0;s.width>0&&!l?(u=s.width+i,o(c)&&(u=u-s.width-i)):u=l||a.isYAxisHidden(c)?0:5,e.config.yaxis[c].opposite?r+=u:n+=u,t+=u};return e.layout.yLabelsCoords.map((e,t)=>{s(e,t)}),e.layout.yTitleCoords.map((e,t)=>{s(e,t)}),e.globals.isBarHorizontal&&!e.config.yaxis[0].floating&&(t=e.layout.yLabelsCoords[0].width+e.layout.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=n,this.dCtx.yAxisWidthRight=r,t}},Tn=class{constructor(e){this.w=e.w,this.dCtx=e}gridPadForColumnsInNumericAxis(e){let{w:t}=this,{config:n,globals:r}=t;if(r.noData||r.collapsedSeries.length+r.ancillaryCollapsedSeries.length===n.series.length)return 0;let i=e=>[`bar`,`rangeBar`,`candlestick`,`boxPlot`,`violin`].includes(e),a=n.chart.type,o=0,s=i(a)?n.series.length:1;r.comboBarCount>0&&(s=r.comboBarCount),r.collapsedSeries.forEach(e=>{i(e.type)&&--s}),n.chart.stacked&&(s=1);let c=i(a)||r.comboBarCount>0,l=Math.abs(r.initialMaxX-r.initialMinX);if(c&&t.axisFlags.isXNumeric&&!r.isBarHorizontal&&s>0&&l!==0){l<=3&&(l=r.dataPoints);let t=l/e,i=r.minXDiff&&r.minXDiff/t>0?r.minXDiff/t:0;i>e/2&&(i/=2),o=i*parseInt(n.plotOptions.bar.columnWidth,10)/100,o<1&&(o=1),r.barPadForNumericAxis=o}return o}gridPadForStackedTotalDataLabels(){let{w:e}=this,t=e.config.plotOptions.bar.dataLabels.total;if(!e.globals.isBarHorizontal||!e.config.chart.stacked||e.config.chart.stackType!==`100%`||!t.enabled)return;let n=e.seriesData.stackedSeriesTotals||[];if(!n.length)return;let r=t.formatter||e.config.dataLabels.formatter,i=n.map((t,n)=>String(r?r(t,h(m({},e),{seriesIndex:0,dataPointIndex:n,w:e})):t)),a=new H(e).getTextRects(O.getLargestStringFromArr(i),parseFloat(t.style.fontSize).toString(),t.style.fontFamily).width+Math.abs(t.offsetX||0)+2;this.dCtx.xPadRight=Math.max(this.dCtx.xPadRight,a)}gridPadFortitleSubtitle(){let{w:e}=this,{globals:t}=e,n=this.dCtx.isSparkline||!t.axisCharts?0:10;[`title`,`subtitle`].forEach(r=>{e.config[r].text===void 0?n+=this.dCtx.isSparkline||!t.axisCharts?0:5:n+=e.config[r].margin}),e.config.legend.show&&e.config.legend.position===`bottom`&&!e.config.legend.floating&&!t.axisCharts&&(n+=10);let r=this.dCtx.dimHelpers.getTitleSubtitleCoords(`title`),i=this.dCtx.dimHelpers.getTitleSubtitleCoords(`subtitle`);this.dCtx.titleBlockPad=n,e.layout.gridHeight-=r.height+i.height+n,e.layout.translateY+=r.height+i.height+n}setGridXPosForDualYAxis(e,t){let{w:n}=this,r=new lt(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});n.config.yaxis.forEach((i,a)=>{n.globals.ignoreYAxisIndexes.indexOf(a)===-1&&!i.floating&&!r.isYAxisHidden(a)&&(i.opposite&&(n.layout.translateX-=t[a].width+e[a].width+parseInt(i.labels.style.fontSize,10)/1.2+12),n.layout.translateX<2&&(n.layout.translateX=2))})}};function En(e,t){return m(m({show:!0,position:`top-left`,separator:` / `,rootLabel:`All`,offsetX:0,offsetY:0,formatter:void 0},e.config.drilldown&&e.config.drilldown.breadcrumb||{}),t||{})}var Dn=class{constructor(e,t){this.w=e,this.ctx=t,this.theme=t.theme,this.timeScale=t.timeScale,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new Sn(this),this.dimYAxis=new wn(this),this.dimXAxis=new Cn(this),this.dimGrid=new Tn(this),this.lgWidthForSideLegends=0,this.gridPad=m({},this.w.config.grid.padding),this.xPadRight=0,this.titleBlockPad=0,this.xPadLeft=0,this.datalabelsCoords={width:0,height:0},this.xAxisWidth=0,this.timescaleLabels=[]}plotCoords(){let e=this.w,t=e.globals;if(this.gridPad=m({},e.config.grid.padding),this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0},this.isSparkline){this.w.globals.markers.largestSize>0&&Object.entries(this.gridPad).forEach(([e,t])=>{this.gridPad[e]=Math.max(t,this.w.globals.markers.largestSize/1.5)});let e=this.dimHelpers.getSparklineStrokeInset();this.gridPad.top=Math.max(e.top,this.gridPad.top),this.gridPad.bottom=Math.max(e.bottom,this.gridPad.bottom)}t.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),this.gridPadForBreadcrumb(),this.dimGrid.gridPadForStackedTotalDataLabels(),e.layout.gridHeight=e.layout.gridHeight-this.gridPad.top-this.gridPad.bottom,e.layout.gridWidth=e.layout.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;let n=this.dimGrid.gridPadForColumnsInNumericAxis(e.layout.gridWidth);return e.layout.gridWidth=e.layout.gridWidth-n*2,e.layout.translateX=e.layout.translateX+this.gridPad.left+this.xPadLeft+(n>0?n:0),e.layout.translateY=e.layout.translateY+this.gridPad.top,{layout:{gridHeight:e.layout.gridHeight,gridWidth:e.layout.gridWidth,translateX:e.layout.translateX,translateY:e.layout.translateY,translateXAxisX:e.layout.translateXAxisX,translateXAxisY:e.layout.translateXAxisY,rotateXLabels:e.layout.rotateXLabels,xAxisHeight:e.layout.xAxisHeight,xAxisLabelsHeight:e.layout.xAxisLabelsHeight,xAxisGroupLabelsHeight:e.layout.xAxisGroupLabelsHeight,xAxisLabelsWidth:e.layout.xAxisLabelsWidth,yLabelsCoords:e.layout.yLabelsCoords,yTitleCoords:e.layout.yTitleCoords,gridPad:m({},this.gridPad)}}}gridPadForBreadcrumb(){let e=this.w,t=e.config.chart.type===`treemap`;if(t){let t=e.config.plotOptions?.treemap?.zoom;if(t&&t.enabled){if(En(e,t.breadcrumb).show===!1)return;this.gridPad.top+=22;return}}if(!e.globals.axisCharts||!this.ctx.drilldown||!e.config.drilldown||!e.config.drilldown.enabled||En(e).show===!1)return;let n=parseFloat(String(e.config.yaxis?.[0]?.labels?.style?.fontSize))||11,r=24+(t?0:Math.ceil(n*ae/2)),i=t?0:this.titleBlockPad||0;this.gridPad.top+=Math.max(0,r-i)}setDimensionsForAxisCharts(){let e=this.w,t=e.globals,n=this.dimYAxis.getyAxisLabelsCoords(),r=this.dimYAxis.getyAxisTitleCoords();t.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),e.layout.yLabelsCoords=[],e.layout.yTitleCoords=[],e.config.yaxis.map((t,i)=>{e.layout.yLabelsCoords.push({width:n[i].width,index:i}),e.layout.yTitleCoords.push({width:r[i].width,index:i})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();let i=this.dimXAxis.getxAxisLabelsCoords(),a=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(i,o,a),e.layout.translateXAxisY=e.layout.rotateXLabels?this.xAxisHeight/8:-4,e.layout.translateXAxisX=e.layout.rotateXLabels&&e.axisFlags.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(e.layout.rotateXLabels=!1,e.layout.translateXAxisY=-1*((parseInt(e.config.xaxis.labels.style.fontSize,10)||12)/1.5)),e.layout.translateXAxisY=e.layout.translateXAxisY+e.config.xaxis.labels.offsetY,e.layout.translateXAxisX=e.layout.translateXAxisX+e.config.xaxis.labels.offsetX;let s=this.yAxisWidth,c=this.xAxisHeight;e.layout.xAxisLabelsHeight=this.xAxisHeight-o.height,e.layout.xAxisGroupLabelsHeight=e.layout.xAxisLabelsHeight-i.height,e.layout.xAxisLabelsWidth=this.xAxisWidth,e.layout.xAxisHeight=this.xAxisHeight;let l=10;(e.config.chart.type===`radar`||this.isSparkline)&&(s=0,c=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||e.config.chart.type===`treemap`)&&(s=0,c=0,l=0),!this.isSparkline&&e.config.chart.type!==`treemap`&&this.dimXAxis.additionalPaddingXLabels(i);let u=()=>{e.layout.translateX=s+this.datalabelsCoords.width,e.layout.gridHeight=t.svgHeight-this.lgRect.height-c-(!this.isSparkline&&e.config.chart.type!==`treemap`?e.layout.rotateXLabels?10:15:0),e.layout.gridWidth=t.svgWidth-s-this.datalabelsCoords.width*2};switch(e.config.xaxis.position===`top`&&(l=e.layout.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case`bottom`:e.layout.translateY=l,u();break;case`top`:e.layout.translateY=this.lgRect.height+l,u();break;case`left`:e.layout.translateY=l,e.layout.translateX=this.lgRect.width+s+this.datalabelsCoords.width,e.layout.gridHeight=t.svgHeight-c-12,e.layout.gridWidth=t.svgWidth-this.lgRect.width-s-this.datalabelsCoords.width*2;break;case`right`:e.layout.translateY=l,e.layout.translateX=s+this.datalabelsCoords.width,e.layout.gridHeight=t.svgHeight-c-12,e.layout.gridWidth=t.svgWidth-this.lgRect.width-s-this.datalabelsCoords.width*2-5;break;default:throw Error(`Legend position not supported`)}this.dimGrid.setGridXPosForDualYAxis(r,n),new ht(this.w,{theme:this.theme,timeScale:this.timeScale}).setYAxisXPosition(n,r)}setDimensionsForNonAxisCharts(){let e=this.w,t=e.globals,n=e.config,r=0;if(e.config.legend.show&&!e.config.legend.floating&&(r=20),n.chart.type===`unit`){let i=n.legend.show&&!n.legend.floating,a=n.legend.position,o=0,s=0;i&&(a===`bottom`||a===`top`?o=this.lgRect.height:s=this.lgRect.width+r),e.layout.gridWidth=t.svgWidth-s,e.layout.gridHeight=t.svgHeight-o,e.layout.translateX=a===`left`?s:0,e.layout.translateY=a===`top`?o:0;return}let i=n.chart.type===`sunburst`?`sunburst`:n.chart.type===`pie`||n.chart.type===`polarArea`||n.chart.type===`donut`?`pie`:`radialBar`,a=n.plotOptions[i].offsetY,o=n.plotOptions[i].offsetX;if(!n.legend.show||n.legend.floating){e.layout.gridHeight=t.svgHeight;let n=e.dom.elWrap.getBoundingClientRect().width;e.layout.gridWidth=Math.min(n,e.layout.gridHeight),e.layout.translateY=a,e.layout.translateX=o+(t.svgWidth-e.layout.gridWidth)/2;return}switch(n.legend.position){case`bottom`:e.layout.gridHeight=t.svgHeight-this.lgRect.height,e.layout.gridWidth=t.svgWidth,e.layout.translateY=a-10,e.layout.translateX=o+(t.svgWidth-e.layout.gridWidth)/2;break;case`top`:e.layout.gridHeight=t.svgHeight-this.lgRect.height,e.layout.gridWidth=t.svgWidth,e.layout.translateY=this.lgRect.height+a+10,e.layout.translateX=o+(t.svgWidth-e.layout.gridWidth)/2;break;case`left`:e.layout.gridWidth=t.svgWidth-this.lgRect.width-r,e.layout.gridHeight=n.chart.height===`auto`?e.layout.gridWidth:t.svgHeight,e.layout.translateY=a,e.layout.translateX=o+this.lgRect.width+r;break;case`right`:e.layout.gridWidth=t.svgWidth-this.lgRect.width-r-5,e.layout.gridHeight=n.chart.height===`auto`?e.layout.gridWidth:t.svgHeight,e.layout.translateY=a,e.layout.translateX=o+10;break;default:throw Error(`Legend position not supported`)}}conditionalChecksForAxisCoords(e,t,n){let r=this.w,i=r.labelData.hasXaxisGroups?2:1,a=n.height+e.height+t.height,o=r.axisFlags.isMultiLineX?1.2:ae,s=r.layout.rotateXLabels?22:10,c=r.layout.rotateXLabels&&r.config.legend.position===`bottom`?10:0;this.xAxisHeight=a*o+i*s+c,this.xAxisWidth=e.width,this.xAxisHeight-t.height>r.config.xaxis.labels.maxHeight&&(this.xAxisHeight=r.config.xaxis.labels.maxHeight),r.config.xaxis.labels.minHeight&&this.xAxisHeight<r.config.xaxis.labels.minHeight&&(this.xAxisHeight=r.config.xaxis.labels.minHeight),r.config.xaxis.floating&&(this.xAxisHeight=0);let l=0,u=0;r.config.yaxis.forEach(e=>{l+=e.labels.minWidth,u+=e.labels.maxWidth}),this.yAxisWidth<l&&(this.yAxisWidth=l),this.yAxisWidth>u&&(this.yAxisWidth=u)}},On=1e3,kn=60*On,An=60*kn,jn=24*An,Mn=7*jn,Nn=30*jn,Pn=365*jn,Fn=10/86400,In=[{unit:`second`,step:1,approxMs:On},{unit:`second`,step:5,approxMs:5*On},{unit:`second`,step:15,approxMs:15*On},{unit:`second`,step:30,approxMs:30*On},{unit:`minute`,step:1,approxMs:kn},{unit:`minute`,step:5,approxMs:5*kn},{unit:`minute`,step:15,approxMs:15*kn},{unit:`minute`,step:30,approxMs:30*kn},{unit:`hour`,step:1,approxMs:An},{unit:`hour`,step:3,approxMs:3*An},{unit:`hour`,step:6,approxMs:6*An},{unit:`hour`,step:12,approxMs:12*An},{unit:`day`,step:1,approxMs:jn},{unit:`day`,step:2,approxMs:2*jn},{unit:`week`,step:1,approxMs:Mn},{unit:`week`,step:2,approxMs:2*Mn},{unit:`month`,step:1,approxMs:Nn},{unit:`month`,step:3,approxMs:3*Nn},{unit:`month`,step:6,approxMs:6*Nn},{unit:`year`,step:1,approxMs:Pn},{unit:`year`,step:2,approxMs:2*Pn},{unit:`year`,step:5,approxMs:5*Pn},{unit:`year`,step:10,approxMs:10*Pn},{unit:`year`,step:25,approxMs:25*Pn},{unit:`year`,step:50,approxMs:50*Pn},{unit:`year`,step:100,approxMs:100*Pn}],Ln=10,Rn=class{constructor(e,t){this.w=e,this.ctx=t,this.tickInterval=null,this.timeScaleArray=[],this.utc=e.config.xaxis.labels.datetimeUTC}calculateTimeScaleTicks(e,t){let n=this.w;if(n.globals.allSeriesCollapsed)return n.labelData.labels=[],n.labelData.timescaleLabels=[],this.timeScaleArray=[],[];let r=t-e,i=r/jn;n.interact.disableZoomIn=!1,n.interact.disableZoomOut=!1,i<Fn?n.interact.disableZoomIn=!0:i>5e4&&(n.interact.disableZoomOut=!0);let a=Number.isFinite(n.config.xaxis.tickAmount)?n.config.xaxis.tickAmount:Ln;this.tickInterval=zn(r,a);let o=this.generateBaseTicks(e,t,this.tickInterval);return this.timeScaleArray=o,o}generateBaseTicks(e,t,n){let r=this.w,i=new k(r),a=this.utc,o=r.layout.gridWidth,s=t-e,c=[],l=i.ceilToBoundary(e,n.unit,n.step,a),u=0;for(;l<=t&&u<5e3;){let t=i.getDateFields(l,a),r=s>0?(l-e)/s*o:0;c.push({timestamp:l,position:r,unit:n.unit,year:t.year,month:t.month+1,day:t.date,hour:t.hour,minute:t.minute,second:t.second,value:l}),l=i.addInterval(l,n.unit,n.step,a),u++}return c}recalcDimensionsBasedOnFormat(e){let t=this.w,n=this.formatDates(e),r=this.removeOverlappingTS(n);t.labelData.timescaleLabels=r.slice();let i=new Dn(this.w,this.ctx).plotCoords();this.ctx._writeLayoutCoords(i.layout)}formatDates(e){let t=this.w,n=new k(t),r=t.config.xaxis.labels.format,i=t.config.xaxis.labels.datetimeFormatter,a=this.utc,o=(e,t=2)=>String(e).padStart(t,`0`),s=r||this._effectiveFormat(e,i);return e.map(e=>{let t=n.getDate(e.timestamp),r=n.formatDate(t,s);return{dateString:`${e.year}-${o(e.month)}-${o(e.day)}T${o(e.hour)}:${o(e.minute)}:${o(e.second)}.000${a?`Z`:``}`,position:e.position,value:r,unit:e.unit,year:e.year,month:e.month}})}_effectiveFormat(e,t){if(e.length===0)return t.day||`dd MMM`;let n=this.tickInterval&&this.tickInterval.unit||e[0].unit,r=t[n===`week`?`day`:n]||t.day||`dd MMM`,i=e[0],a=e[e.length-1],o=i.year!==a.year,s=o||i.month!==a.month||i.day!==a.day,c=/y/i.test(r),l=/M/.test(r),u=/d/i.test(r);return n===`month`||n===`week`||n===`day`?o&&!c?r+` yyyy`:r:(n===`hour`||n===`minute`||n===`second`)&&s&&!u&&!l?(o?`dd MMM yyyy`:`dd MMM`)+` `+r:r}removeOverlappingTS(e){if(e.length===0)return[];let t=this.w,n=new H(t),r=!1,i;e[0].value&&e.every(t=>t.value.length===e[0].value.length)&&(r=!0,i=n.getTextRects(e[0].value,t.config.xaxis.labels.style.fontSize).width);let a=0;return e.map((o,s)=>{if(s===0||!t.config.xaxis.labels.hideOverlappingLabels)return o;let c=r?i:n.getTextRects(e[a].value,t.config.xaxis.labels.style.fontSize).width,l=e[a].position;return o.position>l+c+10?(a=s,o):null}).filter(e=>e!==null)}};function zn(e,t){if((!Number.isFinite(t)||t<=0)&&(t=Ln),e<=0)return In[0];let n=e/t,r=In[0],i=1/0;for(let e of In){let t=Math.abs(Math.log(e.approxMs/n));t<i&&(i=t,r=e)}return r}var Bn=`__apexcharts_registry__`,Vn=`__apexcharts_custom_types__`;globalThis[Bn]||(globalThis[Bn]={}),globalThis[Vn]||(globalThis[Vn]=new Set);function Hn(){return globalThis[Bn]}function Un(){return globalThis[Vn]}function Wn(e){Un().add(e)}function Gn(e){return Un().has(e)}function Kn(e){return!!Hn()[e]}function qn(e){delete Hn()[e],Un().delete(e)}function Jn(e){Object.assign(Hn(),e)}function U(e){let t=Hn()[e];if(!t)throw Error(`ApexCharts: chart type "${e}" is not registered. Bundler: import 'apexcharts/${e}'. Script tag: add <script src=".../dist/${e}.js"> after apexcharts.core.js, or load the full apexcharts.js instead.`);return t}var Yn=class{constructor(e,t,n){this.w=t,this.ctx=n,this.el=e}setupElements(){let{globals:e,config:t}=this.w,n=t.chart.type,r=[`line`,`area`,`bar`,`rangeBar`,`rangeArea`,`candlestick`,`boxPlot`,`violin`,`scatter`,`bubble`],i=[...r,`radar`,`heatmap`,`treemap`],a=!i.includes(n)&&![`pie`,`donut`,`polarArea`,`radialBar`].includes(n)&&Gn(n);e.axisCharts=i.includes(n)||a,e.xyCharts=r.includes(n)||a,e.isBarHorizontal=[`bar`,`rangeBar`,`boxPlot`,`violin`].includes(n)&&t.plotOptions.bar.horizontal,e.chartClass=`.apexcharts${e.chartID}`,this.w.dom.baseEl=this.el,this.w.dom.elWrap=T.createElementNS(`http://www.w3.org/1999/xhtml`,`div`),H.setAttrs(this.w.dom.elWrap,{id:e.chartClass.substring(1),class:`apexcharts-canvas ${e.chartClass.substring(1)}`}),this.el.appendChild(this.w.dom.elWrap);let o=globalThis.SVG;if(this.w.dom.Paper=o().addTo(this.w.dom.elWrap),this.w.dom.Paper.attr({class:`apexcharts-svg`,"xmlns:data":`ApexChartsNS`,transform:`translate(${t.chart.offsetX}, ${t.chart.offsetY})`}),this.w.dom.Paper.node.style.background=t.theme.mode===`dark`&&!t.chart.background?`#343A3F`:t.theme.mode===`light`&&!t.chart.background?`#fff`:t.chart.background,this.setSVGDimensions(),this.w.dom.elLegendForeign=T.createElementNS(B,`foreignObject`),H.setAttrs(this.w.dom.elLegendForeign,{x:0,y:0,width:e.svgWidth,height:e.svgHeight}),this.w.dom.elLegendWrap=T.createElementNS(`http://www.w3.org/1999/xhtml`,`div`),this.w.dom.elLegendWrap.classList.add(`apexcharts-legend`),this.w.dom.elWrap.appendChild(this.w.dom.elLegendWrap),this.w.dom.Paper.node.appendChild(this.w.dom.elLegendForeign),t.chart.accessibility.enabled&&t.chart.accessibility.announcements.enabled){let e=T.createElement(`div`);e.className=`apexcharts-sr-status`,e.setAttribute(`role`,`status`),e.setAttribute(`aria-live`,`polite`),e.setAttribute(`aria-atomic`,`true`),this.w.dom.elWrap.appendChild(e)}if(t.chart.accessibility.enabled){let e=this.getAccessibleChartLabel(),n=t.chart.accessibility.keyboard.enabled&&t.chart.accessibility.keyboard.navigation.enabled?`application`:`img`;if(this.w.dom.Paper.attr({role:n,"aria-label":e}),t.chart.accessibility.description){let e=T.createElementNS(B,`desc`);e.textContent=t.chart.accessibility.description,this.w.dom.Paper.node.insertBefore(e,this.w.dom.elLegendForeign.nextSibling)}}this.w.dom.elGraphical=this.w.dom.Paper.group().attr({class:`apexcharts-inner apexcharts-graphical`}),this.w.dom.elDefs=this.w.dom.Paper.defs(),this.w.dom.Paper.add(this.w.dom.elGraphical),this.w.dom.elGraphical.add(this.w.dom.elDefs)}_classifySeriesByType(e){let{w:t}=this,{config:n,globals:r}=t,i={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},bar:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},violin:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},a={},o=n.chart.type||`line`,s=null,c=0;return this.w.seriesData.series.forEach((n,r)=>{let l=e[r]?.type===`column`?`bar`:e[r]?.type||(o===`column`?`bar`:o),u=i;u[l]?(l===`rangeArea`?(u[l].series.push(this.w.rangeData.seriesRangeStart[r]),u[l].seriesRangeEnd.push(this.w.rangeData.seriesRangeEnd[r])):u[l].series.push(n),u[l].i.push(r),l===`bar`&&(t.globals.columnSeries=i.bar)):[`heatmap`,`treemap`,`pie`,`donut`,`polarArea`,`radialBar`,`radar`,`unit`,`sunburst`].includes(l)?s=l:Gn(l)?(a[l]||(a[l]={series:[],i:[]}),a[l].series.push(n),a[l].i.push(r)):console.warn(`You have specified an unrecognized series type (${l}).`),o!==l&&l!==`scatter`&&c++}),c>0&&(s&&console.warn(`Chart or series type ${s} cannot appear with other chart or series types.`),i.bar.series.length>0&&n.plotOptions.bar.horizontal&&(c-=i.bar.series.length,i.bar={series:[],i:[]},t.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),r.comboCharts||=c>0,{seriesTypes:i,customBuckets:a}}plotChartType(e,t){let{w:n,ctx:r}=this,i=r.renderer&&r.renderer.kind===`canvas`;i&&r.renderer.beginSeries();let{seriesTypes:a,customBuckets:o}=this._classifySeriesByType(e),s=this._instantiateSeriesRenderers(a,t),c=this._assembleSeriesGraphics(a,o,s,t);if(i){let e=r.renderer;if(e&&e._repaintHostInPlace){e._repaintHostInPlace=!1;let t=this.w.dom.elGraphical.node.querySelector(`.apexcharts-canvas-series-wrap`);if(t&&e.canRepaintInPlace&&e.canRepaintInPlace())return e.repaintInPlace(),(Array.isArray(c)?c:[c]).forEach(e=>{e&&e.node&&t.appendChild(e.node)}),[]}let t=r.renderer.present();if(t){let e=new H(n).group({class:`apexcharts-canvas-series-wrap`});return e.add(t),(Array.isArray(c)?c:[c]).forEach(t=>{t&&e.add(t)}),e}}return c}_instantiateSeriesRenderers(e,t){let{w:n,ctx:r}=this,{config:i,globals:a}=n,o=e.line.series.length>0||e.area.series.length>0||e.scatter.series.length>0||e.bubble.series.length>0||e.rangeArea.series.length>0||!a.comboCharts&&[`line`,`area`,`scatter`,`bubble`,`rangeArea`].includes(i.chart.type)?new(U(`line`))(r.w,r,t):null,s=e.candlestick.series.length>0||e.boxPlot.series.length>0||!a.comboCharts&&[`candlestick`,`boxPlot`].includes(i.chart.type)?new(U(`candlestick`))(r.w,r,t):null,c=e.violin.series.length>0||!a.comboCharts&&i.chart.type===`violin`?new(U(`violin`))(r.w,r,t):null;return r.pie=!a.comboCharts&&[`pie`,`donut`,`polarArea`].includes(i.chart.type)?new(U(`pie`))(r.w,r):null,r.rangeBar=e.rangeBar.series.length>0||!a.comboCharts&&i.chart.type===`rangeBar`?new(U(`rangeBar`))(r.w,r,t):null,{line:o,boxCandlestick:s,violin:c}}_assembleSeriesGraphics(e,t,n,r){let{w:i,ctx:a}=this,{config:o,globals:s}=i,{line:c,boxCandlestick:l,violin:u}=n,d=[];if(s.comboCharts){let n=new ue(this.w);if(e.area.series.length>0&&d.push(...n.drawSeriesByGroup(e.area,s.areaGroups,`area`,c)),e.bar.series.length>0){if(o.chart.stacked){let t=new(U(`barStacked`))(a.w,a,r);d.push(t.draw(e.bar.series,e.bar.i))}else a.bar=new(U(`bar`))(a.w,a,r),d.push(a.bar.draw(e.bar.series,e.bar.i))}if(e.rangeArea.series.length>0&&d.push(c.draw(e.rangeArea.series,`rangeArea`,e.rangeArea.i,e.rangeArea.seriesRangeEnd)),e.line.series.length>0&&d.push(...n.drawSeriesByGroup(e.line,s.lineGroups,`line`,c)),e.candlestick.series.length>0&&d.push(l.draw(e.candlestick.series,`candlestick`,e.candlestick.i)),e.boxPlot.series.length>0&&d.push(l.draw(e.boxPlot.series,`boxPlot`,e.boxPlot.i)),e.violin.series.length>0&&d.push(u.draw(e.violin.series,`violin`,e.violin.i)),e.rangeBar.series.length>0&&d.push(a.rangeBar.draw(e.rangeBar.series,e.rangeBar.i)),e.scatter.series.length>0){let t=new(U(`line`))(a.w,a,r,!0);d.push(t.draw(e.scatter.series,`scatter`,e.scatter.i))}if(e.bubble.series.length>0){let t=new(U(`line`))(a.w,a,r,!0);d.push(t.draw(e.bubble.series,`bubble`,e.bubble.i))}Object.keys(t).forEach(e=>{let n=t[e];if(n.series.length>0){let t=new(U(e))(a.w,a,r);d.push(t.draw(n.series,e,n.i))}})}else{let e=o.chart.type;switch(e){case`line`:d=c.draw(this.w.seriesData.series,`line`);break;case`area`:d=c.draw(this.w.seriesData.series,`area`);break;case`bar`:o.chart.stacked?d=new(U(`barStacked`))(a.w,a,r).draw(this.w.seriesData.series):(a.bar=new(U(`bar`))(a.w,a,r),d=a.bar.draw(this.w.seriesData.series));break;case`candlestick`:d=l.draw(this.w.seriesData.series,`candlestick`);break;case`boxPlot`:d=l.draw(this.w.seriesData.series,e);break;case`violin`:d=u.draw(this.w.seriesData.series,`violin`);break;case`rangeBar`:d=a.rangeBar.draw(this.w.seriesData.series);break;case`rangeArea`:d=c.draw(this.w.rangeData.seriesRangeStart,`rangeArea`,void 0,this.w.rangeData.seriesRangeEnd);break;case`heatmap`:d=new(U(`heatmap`))(a.w,a,r).draw(this.w.seriesData.series);break;case`treemap`:d=new(U(`treemap`))(a.w,a).draw(this.w.seriesData.series);break;case`unit`:d=new(U(`unit`))(a.w,a).draw(this.w.seriesData.series);break;case`sunburst`:d=new(U(`sunburst`))(a.w,a).draw(this.w.seriesData.series);break;case`pie`:case`donut`:case`polarArea`:d=a.pie.draw(this.w.seriesData.series);break;case`radialBar`:d=new(U(`radialBar`))(a.w,a).draw(this.w.seriesData.series);break;case`radar`:d=new(U(`radar`))(a.w,a).draw(this.w.seriesData.series);break;default:d=Gn(e)?new(U(e))(a.w,a,r).draw(this.w.seriesData.series,e):c.draw(this.w.seriesData.series)}}return d}_extractDimensionUnit(e){return String(e).split(/[0-9]+/g).pop()}setSVGDimensions(){let{globals:e,config:t}=this.w;t.chart.width=t.chart.width||`100%`,t.chart.height=t.chart.height||`auto`;let n=t.chart.width,r=t.chart.height;e.svgWidth=NaN,e.svgHeight=NaN;let i=O.getDimensions(this.el),a=this._extractDimensionUnit(n);a===`%`?O.isNumber(i[0])&&(i[0].width===0&&(i=O.getDimensions(this.el.parentNode)),e.svgWidth=i[0]*parseInt(n,10)/100):(a===`px`||a===``)&&(e.svgWidth=parseInt(n,10));let o=this._extractDimensionUnit(r);if(e.svgHeight=r!==`auto`&&r!==``?o===`%`?O.getDimensions(this.el.parentNode)[1]*parseInt(r,10)/100:parseInt(r,10):e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2,e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),H.setAttrs(this.w.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),o!==`%`&&v.isBrowser()){let n=e.axisCharts&&(t.grid.show||t.dataLabels.enabled||t.xaxis.labels.show||t.xaxis.axisBorder.show||t.xaxis.axisTicks.show||t.yaxis.some(e=>e.show&&(e.labels.show||e.axisBorder.show||e.axisTicks.show))),r=t.chart.sparkline.enabled||!n?0:t.chart.parentHeightOffset,i=this.w.dom.Paper.node;i.parentNode?.parentNode&&(i.parentNode.parentNode.style.minHeight=`${e.svgHeight+r}px`)}this.w.dom.elWrap.style.width=`${e.svgWidth}px`,this.w.dom.elWrap.style.height=`${e.svgHeight}px`,e.lastResizeSignature=this.getResizeSignature()}getResizeSignature(){let{config:e}=this.w,t=(e.chart.width||`100%`).toString().trim(),n=(e.chart.height||`auto`).toString().trim(),r=0,i=0;if(t.endsWith(`%`)){let e=O.getDimensions(this.el);e[0]||(e=O.getDimensions(this.el.parentNode)),r=e[0]||0}n.endsWith(`%`)&&(i=O.getDimensions(this.el.parentNode)[1]||0);let a={w:Math.round(r),h:Math.round(i)};return e.responsive&&e.responsive.length&&v.isBrowser()&&(a.iw=window.innerWidth),a}shiftGraphPosition(){let{globals:e}=this.w,{translateY:t,translateX:n}=e;H.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${n}, ${t})`})}resizeNonAxisCharts(){var e;let{w:t}=this,n=t.config.chart.height?String(t.config.chart.height):``,r=n!==``&&n!==`auto`,i=n.includes(`%`),a=0,o=t.config.chart.sparkline.enabled?1:15;o+=t.layout.gridPad.bottom,[`top`,`bottom`].includes(t.config.legend.position)&&t.config.legend.show&&!t.config.legend.floating&&(a=(this.ctx.legend?.legendHelpers.getLegendDimensions().clwh??0)+7);let s=t.dom.baseEl.querySelector(`.apexcharts-radialbar, .apexcharts-pie, .apexcharts-sunburst`),c=t.globals.pieExternalLabelMarginY||0,l=c>0?t.globals.radialSize*2+c*2:t.globals.radialSize*2.05,u=t.config.chart.type===`sunburst`?`sunburst`:t.config.chart.type===`pie`||t.config.chart.type===`donut`||t.config.chart.type===`polarArea`?`pie`:`radialBar`,d=Math.abs(t.config.plotOptions[u].endAngle-t.config.plotOptions[u].startAngle);if(s&&!t.config.chart.sparkline.enabled&&d<360){let n=O.getBoundingClientRect(this.w.dom.Paper.node),r=1/0,c=-1/0,u=e=>{var t;if(e.classList?.contains(`apexcharts-radialbar-hollow`))return;let i=((t=e.tagName)?.toLowerCase)?.call(t);if(i===`text`||i===`tspan`)return;let a=Array.from(e.children??[]);if(a.length>0){a.forEach(e=>u(e));return}let o=O.getBoundingClientRect(e);if(o.bottom-o.top>0){let e=o.top-n.top,t=o.bottom-n.top;e<r&&(r=e),t>c&&(c=t)}};Array.from(s.children??[]).forEach(e=>u(e)),Number.isFinite(r)||(r=0),Number.isFinite(c)||(c=O.getBoundingClientRect(s).bottom-n.top);let d=Math.max(o,t.globals.radialSize*.2),f=Math.max(d-r,0);f!==0&&(t.layout.translateY=(t.layout.translateY??0)+f,H.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${t.layout.translateX??0}, ${t.layout.translateY})`}),c+=f),l=c>0?c:t.globals.radialSize*2.05;let p=Math.max(d,r),m=Math.ceil(l+a+p),h=t.config.chart.offsetY??0,g=m+Math.max(h,0);if(!i){if(this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute(`height`,String(g)),this.w.dom.elWrap.style.height=`${g}px`,H.setAttrs(this.w.dom.Paper.node,{height:m}),v.isBrowser()){let e=this.w.dom.Paper.node.parentNode?.parentNode;e&&(e.style.minHeight=`${g}px`)}t.globals.svgHeight=m,t.config.legend.position===`bottom`&&t.config.legend.show&&!t.config.legend.floating&&((e=this.ctx.legend)==null||e.setLegendWrapXY(20,0))}return}let f=Math.ceil(l+this.w.layout.translateY+a+o);if(!r&&(this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute(`height`,String(f)),this.w.dom.elWrap.style.height=`${f}px`,H.setAttrs(this.w.dom.Paper.node,{height:f}),v.isBrowser())){let e=this.w.dom.Paper.node.parentNode?.parentNode;e&&(e.style.minHeight=`${f}px`)}}coreCalculations(){new pt(this.w).init()}resetGlobals(){let e=()=>this.w.config.series.map(()=>[]),t=new ce,{globals:n}=this.w,r={dataWasParsed:this.w.axisFlags.dataWasParsed,originalSeries:n.originalSeries};t.initGlobalVars(n),n.seriesXvalues=e(),n.seriesYvalues=e(),r.dataWasParsed&&(this.w.axisFlags.dataWasParsed=r.dataWasParsed,n.originalSeries=r.originalSeries)}isMultipleY(){return Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1?(this.w.globals.isMultipleYAxis=!0,!0):!1}xySettings(){let{w:e}=this,t=null;if(e.globals.axisCharts){if(e.config.xaxis.crosshairs.position===`back`&&new yt(this.w).drawXCrosshairs(),e.config.yaxis[0].crosshairs.position===`back`&&new yt(this.w).drawYCrosshairs(),e.config.xaxis.type===`datetime`&&e.config.xaxis.labels.formatter===void 0){this.ctx.timeScale=new Rn(this.w,this.ctx);let t=[];isFinite(e.globals.minX)&&isFinite(e.globals.maxX)&&!e.globals.isBarHorizontal?t=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minX,e.globals.maxX):e.globals.isBarHorizontal&&(t=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minY,e.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(t)}t=new ue(this.w).getCalculatedRatios()}return t}updateSourceChart(e){this.ctx.w.interact.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:e.w.globals.minX,max:e.w.globals.maxX}}}},!1,!1)}setupBrushHandler(){let{ctx:e,w:t}=this;if(t.config.chart.brush.enabled&&typeof t.config.chart.events.selection!=`function`){let n=Array.isArray(t.config.chart.brush.targets)?t.config.chart.brush.targets:[t.config.chart.brush.target];n.forEach(t=>{let n=e.constructor.getChartByID(t);if(!n){console.warn(`ApexCharts: brush target "${t}" was not found. Ensure the target chart is rendered (and its chart.id matches) before the brush chart.`);return}n.w.globals.brushSource=this.ctx,typeof n.w.config.chart.events.zoomed!=`function`&&(n.w.config.chart.events.zoomed=()=>this.updateSourceChart(n)),typeof n.w.config.chart.events.scrolled!=`function`&&(n.w.config.chart.events.scrolled=()=>this.updateSourceChart(n))}),t.config.chart.events.selection=(t,r)=>{n.forEach(t=>{let n=e.constructor.getChartByID(t);n&&n.ctx.updateHelpers._updateOptions({xaxis:{min:r.xaxis.min,max:r.xaxis.max}},!1,!1,!1,!1)})}}}getAccessibleChartLabel(){let e=this.w,t=e.config;if(t.chart.accessibility&&t.chart.accessibility.description)return t.chart.accessibility.description;let n=t.chart.type,r=[];if(t.title.text)r.push(`${t.title.text}. ${n} chart`),t.subtitle.text&&r.push(t.subtitle.text);else{let i=Array.isArray(e.seriesData.seriesNames)&&e.seriesData.seriesNames.length?e.seriesData.seriesNames.filter(Boolean):Array.isArray(t.series)?t.series.map(e=>typeof e==`object`&&e?e.name:null).filter(Boolean):[],a=e.seriesData.series.length||(t.series?t.series.length:0);i.length?r.push(`${n} chart with ${a} data series: ${i.join(`, `)}`):r.push(`${n} chart with ${a} data series`)}return r.join(`. `)}},Xn=`__apexcharts_series_transforms__`;globalThis[Xn]||(globalThis[Xn]={});function Zn(){return globalThis[Xn]}function Qn(e){return e&&Zn()[e]||null}function $n(e,t){let n=e.config.drilldown;return(n&&Array.isArray(n.series)?n.series:[]).find(e=>e&&e.id===t)}function er(e,t,n,r,i,a=null,o={}){let s=t&&typeof t==`object`,c=s?t.x??t.name??``:``,l=Number(s?t.y??t.value:t),u={name:String(c),value:isNaN(l)?null:l,color:s&&t.color?t.color:void 0,_key:`${i}/${n}:${c}`};if(r&&!u.color&&(u.color=r[n%r.length]),o.keepDatum&&(u._datum=t),s&&Array.isArray(t.children)&&t.children.length)u.children=t.children.map((t,n)=>er(e,t,n,null,u._key,a,o));else if(s&&t.drilldown!=null&&o.expandDrilldown!==!1){let n=a||new Set;if(!n.has(t.drilldown)){let r=$n(e,t.drilldown);if(r&&Array.isArray(r.data)&&r.data.length){let i=new Set(n);i.add(t.drilldown);let a=Array.isArray(r.colors)?r.colors:null;u.children=r.data.map((t,n)=>er(e,t,n,a,u._key,i,o))}}}return u}function tr(e,t,n={}){let r=t||e.config.series;return Array.isArray(r)?r.map((t,r)=>{let i=t&&Array.isArray(t.data)?t.data:[],a=`${r}:${t?.name??``}`;return{name:String(t?.name??``),value:null,color:t?.color||void 0,_key:a,_seriesIndex:r,children:i.map((t,r)=>er(e,t,r,null,a,null,n))}}):[]}function nr(e){e.children&&e.children.length&&(e.children.forEach(e=>nr(e)),(e.value==null||isNaN(e.value))&&(e.value=e.children.reduce((e,t)=>e+Math.max(0,t.value||0),0))),(e.value==null||isNaN(e.value))&&(e.value=0)}function rr(e,t={}){if(!Array.isArray(e))return!1;let n=t.drilldown!==!1;for(let t=0;t<e.length;t++){let r=e[t]&&e[t].data;if(Array.isArray(r))for(let e=0;e<r.length;e++){let t=r[e];if(t&&typeof t==`object`&&(Array.isArray(t.children)&&t.children.length||n&&t.drilldown!=null))return!0}}return!1}function ir(e){return!!e?.config?.plotOptions?.treemap?.nested?.drilldownAsLevels}function ar(e,t){let n=e?.config?.plotOptions?.treemap?.nested;return n&&n.enabled===!1?!1:rr(t,{drilldown:ir(e)})}function or(e){let t=[],n=0;return e.forEach((e,r)=>{let i=[],a=(e,t,o)=>{e._parent=o,e._depth=t,e._si=r,e._leaf=!(e.children&&e.children.length),t>n&&(n=t),e._leaf?(e._di=i.length,i.push(e)):(e._di=-1,e.children.forEach(n=>a(n,t+1,e)))};a(e,0,null),t.push(i)}),{leaves:t,maxDepth:n}}function sr(e){let t=e._datum;if(t&&typeof t==`object`){let n=h(m({},t),{x:e.name,y:e.value});return delete n.children,n}return{x:e.name,y:e.value}}function cr(e,t){let n=tr(e,t,{keepDatum:!0,expandDrilldown:ir(e)});n.forEach(nr);let{leaves:r,maxDepth:i}=or(n);return{roots:n,leafSeries:t.map((e,t)=>h(m({},e),{data:(r[t]||[]).map(sr)})),maxDepth:i}}var lr={histogram:`stats`,raincloud:`raincloud`},ur=class e{constructor(e,{resetGlobals:t=()=>{},isMultipleY:n=()=>{}}={}){this.w=e,this.resetGlobals=t,this.isMultipleY=n,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this._warnedMissingTransform=!1,this.coreUtils=new ue(this.w),this.activeSeriesIndex=0}getFirstDataPoint(){let e=this.w.config.series,t=new cn(this.w);this.activeSeriesIndex=t.getActiveConfigSeriesIndex();let n=e[this.activeSeriesIndex];return n&&n.data&&n.data.length>0&&n.data[0]!==null&&n.data[0]!==void 0?n.data[0]:null}isMultiFormat(){return this.isFormatXY()||this.isFormat2DArray()}isFormatXY(){let e=this.getFirstDataPoint();if(!e||e.x===void 0)return!1;let t=this.w.config.series[this.activeSeriesIndex]?.data;if(t){let e=e=>e&&e.x!==void 0;for(let n=1;n<Math.min(3,t.length);n++)if(e(t[n])!==!0){console.warn(`ApexCharts: series data has mixed formats starting at index ${n}`);break}}return!0}isFormat2DArray(){let e=this.getFirstDataPoint();return e&&Array.isArray(e)}_fast2DArrayParse(e,t){var n;let r=e.length;if(r===0)return!1;let i=Array(r),a=Array(r),o=-Number.MAX_VALUE,s=Number.MAX_VALUE,c=1/0,l=!1,u=0,d=!0,f=1/0,p=-1/0,m=!0,h=1/0,g=NaN;for(let t=0;t<r;t++){let n=e[t];if(!Array.isArray(n)||n.length>2)return!1;let r=n[0],_=n[1];if(d){if(typeof r==`number`){r===r&&(r<f&&(f=r),r>p&&(p=r));let e=r-g;e>0?e<h&&(h=e):e<0&&(m=!1),g=r}else d=!1}if(typeof _==`number`){if(_===_&&_!==1/0&&_!==-1/0){if(_>o&&(o=_),_<s&&(s=_),_<0&&_<c&&(c=_),!Number.isInteger(_)){let e=_<0?-_:_;if(e>=1e-6&&e<1e21){let e=``+_,t=e.indexOf(`.`),n=t===-1?0:e.length-t-1;n>u&&(u=n)}else{let e=O.noExponents(_);O.isFloat(e)&&(u=Math.max(u,e.toString().split(`.`)[1].length))}}}else l=!0}else if(_===null)l=!0;else return!1;i[t]=_,a[t]=r}this.twoDSeries=i,this.twoDSeriesX=a,this.w.axisFlags.dataFormatXNumeric=!0;let _=(n=this.w.seriesData)._parsedExtrema??(n._parsedExtrema=[]);return _[t]={ref:i,len:r,maxY:o,lowestY:s,negMinY:c,hasNulls:l,yDec:u,xref:a,xNumeric:d,minX:f,maxX:p,xSorted:m,minXDiff:h},!0}handleFormat2DArray(e,t){let n=this.w.config,r=e[t].data,i=n.chart.type===`boxPlot`||n.series[t].type===`boxPlot`;if(i||n.xaxis.type===`datetime`||!this._fast2DArrayParse(r,t))for(let e=0;e<r.length;e++){let t=r[e],a=t[0],o=t[1],s=t[2];if(o!==void 0&&(Array.isArray(o)&&o.length===4&&!i?this.twoDSeries.push(O.parseNumber(o[3])):t.length>=5?this.twoDSeries.push(O.parseNumber(t[4])):this.twoDSeries.push(O.parseNumber(o)),this.w.axisFlags.dataFormatXNumeric=!0),n.xaxis.type===`datetime`){let e=new Date(a).getTime();this.twoDSeriesX.push(e)}else this.twoDSeriesX.push(a);s!==void 0&&(this.threeDSeries.push(s),this.w.axisFlags.isDataXYZ=!0)}}handleFormatXY(e,t){let n=this.w.config,r=this.w.globals,i=new k(this.w),a=e[t].data,o=t;r.collapsedSeriesIndices.indexOf(t)>-1&&(o=this.activeSeriesIndex);let s=e[o].data;for(let e=0;e<a.length;e++){let n=a[e];if(n.y!==void 0){let e=Array.isArray(n.y)?O.parseNumber(n.y[n.y.length-1]):O.parseNumber(n.y);this.twoDSeries.push(e)}this.seriesGoals[t]===void 0&&(this.seriesGoals[t]=[]),n.goals!==void 0&&Array.isArray(n.goals)?this.seriesGoals[t].push(n.goals):this.seriesGoals[t].push(null),n.z!==void 0&&(this.threeDSeries.push(n.z),this.w.axisFlags.isDataXYZ=!0)}for(let e=0;e<s.length;e++){let t=s[e].x,a=typeof t==`string`,o=Array.isArray(t),c=!o&&!!i.isValidDate(t);if(a||c){if(a||n.xaxis.convertedCatToNumeric){let e=r.isBarHorizontal&&this.w.axisFlags.isRangeData;n.xaxis.type===`datetime`&&!e?this.twoDSeriesX.push(i.parseDate(t)):(this.fallbackToCategory=!0,this.twoDSeriesX.push(t),!isNaN(t)&&this.w.config.xaxis.type!==`category`&&typeof t!=`string`&&(this.w.axisFlags.isXNumeric=!0))}else n.xaxis.type===`datetime`?this.twoDSeriesX.push(t instanceof Date?t.getTime():i.parseDate(t.toString())):(this.w.axisFlags.dataFormatXNumeric=!0,this.w.axisFlags.isXNumeric=!0,this.twoDSeriesX.push(t instanceof Date?t.getTime():parseFloat(t)))}else o?(this.fallbackToCategory=!0,this.twoDSeriesX.push(t)):(this.w.axisFlags.isXNumeric=!0,this.w.axisFlags.dataFormatXNumeric=!0,this.twoDSeriesX.push(t))}}handleRangeData(e,t){let n={start:[],end:[],rangeUniques:[]};return this.isFormat2DArray()?n=this.handleRangeDataFormat(`array`,e,t):this.isFormatXY()&&(n=this.handleRangeDataFormat(`xy`,e,t)),this.w.rangeData.seriesRangeStart[t]=n.start===void 0?[]:n.start,this.w.rangeData.seriesRangeEnd[t]=n.end===void 0?[]:n.end,this.w.rangeData.seriesRange[t]=n.rangeUniques,this.w.rangeData.seriesRange.forEach(e=>{e&&e.forEach(e=>{let t=e.y,n=t.length;if(!(n<=1))for(let r=0;r<n;r++){let i=t[r],a=i.y1,o=i.y2;for(let s=r+1;s<n;s++){let n=t[s],r=n.y1;if(a<=n.y2&&r<=o){let t=e;t.overlaps.add(i.rangeName),t.overlaps.add(n.rangeName)}}}})}),n}handleCustomRangeData(e,t,n){let r=e[t].data||[],i=[],a=[];for(let e=0;e<r.length;e++){let t=r[e],o,s;if(typeof n==`function`){let r=n(t,e);Array.isArray(r)||(r=[r]);let i=r.map(e=>O.parseNumber(e)).filter(e=>e!==null&&!isNaN(e));o=i.length?Math.min(...i):null,s=i.length?Math.max(...i):null}else{let e=t==null?null:t.y;Array.isArray(e)?(o=O.parseNumber(e[0]),s=O.parseNumber(e[e.length-1])):o=s=O.parseNumber(e)}i.push(o),a.push(s)}this.w.rangeData.seriesRangeStart[t]=i,this.w.rangeData.seriesRangeEnd[t]=a}handleCandleStickBoxData(e,t){let n={o:[],h:[],m:[],l:[],c:[]};return this.isFormat2DArray()?n=this.handleCandleStickBoxDataFormat(`array`,e,t):this.isFormatXY()&&(n=this.handleCandleStickBoxDataFormat(`xy`,e,t)),this.w.candleData.seriesCandleO[t]=n.o,this.w.candleData.seriesCandleH[t]=n.h,this.w.candleData.seriesCandleM[t]=n.m,this.w.candleData.seriesCandleL[t]=n.l,this.w.candleData.seriesCandleC[t]=n.c,this.w.candleData.seriesBoxPoints[t]=n.points||[],n}handleViolinData(e,t){let n=this.w,r=e[t].data,i=[],a=[],o=[],s=[],c=[],l=[];for(let e=0;e<r.length;e++){let t=r[e],n=t?.y?.density??t?.[1]??[],u=t?.y?.points??t?.[2]??[],d=this._parseViolinSummary(t?.y?.summary??t?.[3]),f=[],p=[],m=0,h=null,g=1/0,_=-1/0;for(let e=0;e<n.length;e++){let t=O.parseNumber(n[e][0]),r=O.parseNumber(n[e][1]);t!==null&&r!==null&&(f.push(t),p.push(r),r>m&&(m=r,h=t),t<g&&(g=t),t>_&&(_=t))}let v=[];for(let e=0;e<u.length;e++){let t=O.parseNumber(u[e]);t!==null&&(v.push(t),t<g&&(g=t),t>_&&(_=t))}d&&(d[0]<g&&(g=d[0]),d[4]>_&&(_=d[4])),i.push({values:f,weights:p,maxWeight:m}),a.push(v),o.push(d),s.push(g===1/0?0:g),c.push(_===-1/0?0:_),l.push(h===null?v.length?v[Math.floor(v.length/2)]:0:h)}n.violinData.seriesViolinDensity[t]=i,n.violinData.seriesViolinPoints[t]=a,n.violinData.seriesViolinSummary[t]=o,n.violinData.seriesViolinMin[t]=s,n.violinData.seriesViolinMax[t]=c,this.twoDSeries=l}_parseViolinSummary(e){if(!Array.isArray(e)||e.length!==5)return null;let t=[];for(let n=0;n<5;n++){let r=O.parseNumber(e[n]);if(r===null||n>0&&r<t[n-1])return null;t.push(r)}return t}handleRangeDataFormat(e,t,n){let r=[],i=[],a=new Map,o=[];if(t[n].data.forEach(e=>{if(!a.has(e.x)){let t={x:e.x,overlaps:new Set,y:[]};a.set(e.x,t),o.push(t)}}),e===`array`)for(let e=0;e<t[n].data.length;e++)Array.isArray(t[n].data[e])?(r.push(t[n].data[e][1][0]),i.push(t[n].data[e][1][1])):(r.push(t[n].data[e]),i.push(t[n].data[e]));else if(e===`xy`)for(let e=0;e<t[n].data.length;e++){let o=Array.isArray(t[n].data[e].y),s=O.randomId(),c=t[n].data[e].x,l={y1:o?t[n].data[e].y[0]:t[n].data[e].y,y2:o?t[n].data[e].y[1]:t[n].data[e].y,rangeName:s},u=this.w.globals;u.seriesRangeName||={},u.seriesRangeName[n]||(u.seriesRangeName[n]={}),u.seriesRangeName[n][e]=s;let d=a.get(c);d&&d.y.push(l),r.push(l.y1),i.push(l.y2)}return{start:r,end:i,rangeUniques:o}}handleCandleStickBoxDataFormat(e,t,n){let r=this.w,i=r.config.chart.type===`boxPlot`||r.config.series[n].type===`boxPlot`,a=[],o=[],s=[],c=[],l=[],u=[],d=t[n].data,f;if(e===`array`){let e=d[0];f=i&&e&&e.length===6||!i&&e&&e.length===5?e=>e.slice(1):e=>Array.isArray(e[1])?e[1]:[]}else f=e=>Array.isArray(e.y)?e.y:[];for(let e=0;e<d.length;e++){let t=f(d[e]);t&&t.length>=2&&(a.push(t[0]),o.push(t[1]),i?(s.push(t[2]),c.push(t[3]),l.push(t[4])):(c.push(t[2]),l.push(t[3])));let n=d[e]&&d[e].points;u.push(Array.isArray(n)?n:[])}return{o:a,h:o,m:s,l:c,c:l,points:u}}parseDataAxisCharts(t){let n=this.w.config,r=this.w.globals,i=new k(this.w);this.w.seriesData._parsedExtrema=[];let a=n.labels.length>0?n.labels.slice():n.xaxis.categories.slice();this.w.axisFlags.isRangeBar=n.chart.type===`rangeBar`&&r.isBarHorizontal,this.w.labelData.hasXaxisGroups=n.xaxis.type===`category`&&n.xaxis.group.groups.length>0,this.w.labelData.hasXaxisGroups&&(this.w.labelData.groups=n.xaxis.group.groups),t.forEach((e,t)=>{e.name===void 0?this.w.seriesData.seriesNames.push(`series-`+parseInt(String(t+1),10)):this.w.seriesData.seriesNames.push(e.name)}),this.coreUtils.setSeriesYAxisMappings();let o=[],s=[...new Set(n.series.map(e=>e.group))];n.series.forEach((e,t)=>{let n=s.indexOf(e.group);o[n]||(o[n]=[]),o[n].push(this.w.seriesData.seriesNames[t])}),this.w.labelData.seriesGroups=o;let c=()=>{for(let e=0;e<a.length;e++)if(typeof a[e]==`string`){if(i.isValidDate(a[e]))this.twoDSeriesX.push(i.parseDate(a[e]));else throw Error(`You have provided invalid Date format. Please provide a valid JavaScript Date`)}else this.twoDSeriesX.push(a[e])};for(let i=0;i<t.length;i++){this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],t[i].data===void 0&&(console.error(`It is a possibility that you may have not included 'data' property in series.`),t[i]=h(m({},t[i]),{data:[]}));let o=n.chart.dataReducer,s=r.dataReducerRawSeries?.[i]?.data;if(o?.enabled&&this.isMultiFormat()&&Array.isArray(s)&&s.length>(o.threshold??500)){let r=o.targetPoints??250,a=n.xaxis.min,c=n.xaxis.max,l=a==null&&c==null?s:e.sliceByXRange(s,a,c),u=l;if(l.length>r){let t=Array.isArray(l[0])?l[0]?.[1]:l[0]?.y;Array.isArray(t)?t.length===4?u=e.ohlcAggregate(l,r):t.length===2&&(u=e.rangeAggregate(l,r)):u=e.lttbDownsample(l,r)}t[i]=h(m({},t[i]),{data:u})}(n.chart.type===`rangeBar`||n.chart.type===`rangeArea`||t[i].type===`rangeBar`||t[i].type===`rangeArea`)&&(this.w.axisFlags.isRangeData=!0,this.handleRangeData(t,i));let l=t[i].type||n.chart.type;if(Gn(l)){let e=U(l),n=e&&e.yExtent;(e&&e.dataType===`rangeXY`||typeof n==`function`)&&(this.w.axisFlags.isRangeData=!0,this.handleCustomRangeData(t,i,n))}if(this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(t,i):this.isFormatXY()&&this.handleFormatXY(t,i),(n.chart.type===`candlestick`||t[i].type===`candlestick`||n.chart.type===`boxPlot`||t[i].type===`boxPlot`)&&this.handleCandleStickBoxData(t,i),(n.chart.type===`violin`||t[i].type===`violin`)&&this.handleViolinData(t,i),this.w.seriesData.series.push(this.twoDSeries),this.w.labelData.labels.push(this.twoDSeriesX),this.w.seriesData.seriesX.push(this.twoDSeriesX),this.w.seriesData.seriesGoals=this.seriesGoals,i===this.activeSeriesIndex&&!this.fallbackToCategory&&(this.w.axisFlags.isXNumeric=!0);else{n.xaxis.type===`datetime`?(this.w.axisFlags.isXNumeric=!0,c(),this.w.seriesData.seriesX.push(this.twoDSeriesX)):n.xaxis.type===`numeric`&&(this.w.axisFlags.isXNumeric=!0,a.length>0&&(this.twoDSeriesX=a,this.w.seriesData.seriesX.push(this.twoDSeriesX))),this.w.labelData.labels.push(this.twoDSeriesX);let e=t[i].data.map(e=>O.parseNumber(e));this.w.seriesData.series.push(e)}this.w.seriesData.seriesZ.push(this.threeDSeries),t[i].color===void 0?this.w.seriesData.seriesColors.push(void 0):this.w.seriesData.seriesColors.push(t[i].color)}return this.w}parseDataNonAxisCharts(e){let t=this.w.config;this.w.seriesData.unitData=[];let n=Array.isArray(e)&&e.every(e=>typeof e==`number`)&&t.labels.length>0,r=Array.isArray(e)&&e.some(e=>e&&typeof e==`object`&&e.data||e&&typeof e==`object`&&e.parsing);if(t.chart.type===`unit`&&r&&!n)return this.parseUnitSeries(e);if(n&&r&&console.warn(`ApexCharts: Both old format (numeric series + labels) and new format (series objects with data/parsing) detected. Using old format for backward compatibility.`),n){this.w.seriesData.series=e.slice(),this.w.seriesData.seriesNames=t.labels.slice();for(let e=0;e<this.w.seriesData.series.length;e++)this.w.seriesData.seriesNames[e]===void 0&&this.w.seriesData.seriesNames.push(`series-`+(e+1));return this.w}if(Array.isArray(e)&&e.every(e=>typeof e==`number`)){this.w.seriesData.series=e.slice(),this.w.seriesData.seriesNames=[];for(let e=0;e<this.w.seriesData.series.length;e++)this.w.seriesData.seriesNames.push(t.labels[e]||`series-${e+1}`);return this.w}let i=this.extractPieDataFromSeries(e);this.w.seriesData.series=i.values,this.w.seriesData.seriesNames=i.labels,t.chart.type===`radialBar`&&(this.w.seriesData.series=this.w.seriesData.series.map(e=>{let t=O.parseNumber(e);return t>100&&console.warn(`ApexCharts: RadialBar value ${t} > 100, consider using percentage values (0-100)`),t}));for(let e=0;e<this.w.seriesData.series.length;e++)this.w.seriesData.seriesNames[e]===void 0&&this.w.seriesData.seriesNames.push(`series-`+(e+1));return this.w}parseUnitSeries(e){let t=this.w.config,n=[],r=[],i=[];return e.forEach((e,a)=>{let o=e&&Array.isArray(e.data)?e.data:[];n.push(o.length);let s=e&&e.name!==void 0&&e.name!==null?e.name:void 0;r.push(s??t.labels[a]??`series-${a+1}`),i.push(o.slice())}),this.w.seriesData.series=n,this.w.seriesData.seriesNames=r,this.w.seriesData.unitData=i,this.w}resetParsingFlags(){let e=this.w;e.axisFlags.dataWasParsed=!1,e.globals.originalSeries=null,e.config.series&&e.config.series.forEach(e=>{e.__apexParsed&&delete e.__apexParsed})}extractPieDataFromSeries(e){let t=[],n=[];if(!Array.isArray(e))return console.warn(`ApexCharts: Expected array for series data`),{values:[],labels:[]};if(e.length===0)return console.warn(`ApexCharts: Empty series array`),{values:[],labels:[]};let r=e[0];if(typeof r==`object`&&r&&r.data)this.extractPieDataFromSeriesObjects(e,t,n);else return console.warn(`ApexCharts: Unsupported series format for pie/donut/radialBar. Expected series objects with data property.`),{values:[],labels:[]};return{values:t,labels:n}}extractPieDataFromSeriesObjects(e,t,n){e.forEach((e,r)=>{if(!e.data||!Array.isArray(e.data)){console.warn(`ApexCharts: Series ${r} has no valid data array`);return}e.data.forEach(e=>{typeof e==`object`&&e?e.x!==void 0&&e.y!==void 0?(n.push(String(e.x)),t.push(O.parseNumber(e.y))):console.warn(`ApexCharts: Invalid data point format for pie chart. Expected {x, y} format:`,e):console.warn(`ApexCharts: Expected object data point, got:`,typeof e)})})}handleExternalLabelsData(e){let t=this.w.config;if(t.xaxis.categories.length>0)this.w.labelData.labels=t.xaxis.categories;else if(t.labels.length>0)this.w.labelData.labels=t.labels.slice();else if(this.fallbackToCategory){if(this.w.labelData.labels=this.w.labelData.labels[0],this.w.rangeData.seriesRange.length){this.w.rangeData.seriesRange.map(e=>{e.forEach(e=>{this.w.labelData.labels.indexOf(e.x)<0&&e.x&&this.w.labelData.labels.push(e.x)})});let e=this.w.labelData.labels;if(e.length>0&&(typeof e[0]==`number`||typeof e[0]==`string`))this.w.labelData.labels=[...new Set(e)];else{let t=new Map;for(let n of e){let e=JSON.stringify(n);t.has(e)||t.set(e,n)}this.w.labelData.labels=Array.from(t.values())}}t.xaxis.convertedCatToNumeric&&(new ie(t).convertCatToNumericXaxis(t,this.w.seriesData.seriesX[0]),this._generateExternalLabels(e))}else this._generateExternalLabels(e)}_generateExternalLabels(e){let t=this.w.globals,n=this.w.config,r=[];if(t.axisCharts){if(this.w.seriesData.series.length>0){if(this.isFormatXY()){let e=n.series.map(e=>{let t=new Map;for(let n of e.data)t.has(n.x)||t.set(n.x,n);return Array.from(t.values())}),t=e.reduce((e,t,n,r)=>r[e].length>t.length?e:n,0);for(let n=0;n<e[t].length;n++)r.push(n+1)}else for(let e=0;e<this.w.seriesData.series[t.maxValsInArrayIndex].length;e++)r.push(e+1)}this.w.seriesData.seriesX=[];for(let t=0;t<e.length;t++)this.w.seriesData.seriesX.push(r);this.w.globals.isBarHorizontal||(this.w.axisFlags.isXNumeric=!0)}if(r.length===0){r=t.axisCharts?[]:this.w.seriesData.series.map((e,t)=>t+1);for(let t=0;t<e.length;t++)this.w.seriesData.seriesX.push(r)}this.w.labelData.labels=r,n.xaxis.convertedCatToNumeric&&(this.w.labelData.categoryLabels=r.map(e=>n.xaxis.labels.formatter(e))),this.w.axisFlags.noLabelsProvided=!0}parseRawDataIfNeeded(e){let t=this.w.config,n=this.w.globals,r=t.parsing;if(this.w.axisFlags.dataWasParsed)return e;let i=!!(r&&(r.x||r.y||r.z)),a=e.some(e=>e.parsing&&(e.parsing.x||e.parsing.y||e.parsing.z));if(!i&&!a)return e;let o=e.map((e,t)=>{if(!e.data||!Array.isArray(e.data)||e.data.length===0)return e;let n={x:e.parsing?.x||r?.x,y:e.parsing?.y||r?.y,z:e.parsing?.z||r?.z};if(!n.x&&!n.y)return e;let i=e.data[0];if(typeof i==`object`&&i&&(Object.prototype.hasOwnProperty.call(i,`x`)||Object.prototype.hasOwnProperty.call(i,`y`))||Array.isArray(i))return e;if(!n.x||!n.y||Array.isArray(n.y)&&n.y.length===0){let i=[];n.x||i.push(`x`),(!n.y||Array.isArray(n.y)&&n.y.length===0)&&i.push(`y`);let a=e.name??`series[${t}]`;return console.warn(`ApexCharts [${this.w.globals.chartID}]: "${a}" has a parseData config but is missing the '${i.join(`', '`)}' field specification.`,{parsing:e.parsing??r}),e}let a=e.data.map((e,r)=>{if(typeof e!=`object`||!e)return console.warn(`ApexCharts: Series ${t}, data point ${r} is not an object, skipping parsing`),e;let i=this.getNestedValue(e,n.x),a,o;if(Array.isArray(n.y)){let r=n.y.map(t=>this.getNestedValue(e,t));this.w.config.chart.type===`bubble`?(r.length<2&&console.warn(`ApexCharts: series[${t}] bubble chart requires parseData.y to have at least 2 fields (y and z). Got: ${JSON.stringify(n.y)}`),a=r[0]):a=r}else a=this.getNestedValue(e,n.y);n.z&&(o=this.getNestedValue(e,n.z)),i===void 0&&console.warn(`ApexCharts: Series ${t}, data point ${r} missing field '${n.x}'`),a===void 0&&console.warn(`ApexCharts: Series ${t}, data point ${r} missing field '${n.y}'`);let s={x:i,y:a,z:void 0};if(this.w.config.chart.type===`bubble`&&Array.isArray(n.y)&&n.y.length===2){let t=this.getNestedValue(e,n.y[1]);t!==void 0&&(s.z=t)}return o!==void 0&&(s.z=o),s});return h(m({},e),{data:a,__apexParsed:!0})});return this.w.axisFlags.dataWasParsed=!0,n.originalSeries||=O.clone(e),o}getNestedValue(e,t){if(!e||typeof e!=`object`||!t)return;if(t.indexOf(`.`)===-1)return e[t];let n=t.split(`.`),r=e;for(let e=0;e<n.length;e++){if(typeof r!=`object`||!r)return;r=r[n[e]]}return r}applySeriesTransform(e){let t=this.w.config,n=t.chart.requestedType||t.chart.type;n!==`waterfall`&&this.w.waterfallData.geometry&&(this.w.waterfallData={values:[],cumulative:[],kinds:[],geometry:null}),n!==`dumbbell`&&this.w.dumbbellData&&(this.w.dumbbellData=null),n!==`streamgraph`&&this.w.streamgraphData&&(this.w.streamgraphData=null);let r=Qn(n);if(r)return r(e,this.w);let i=lr[n];return!Array.isArray(e)||!i?e:(this._warnedMissingTransform||(this._warnedMissingTransform=!0,console.warn(`ApexCharts: chart.type '${n}' requires the ${i} feature, which is not in this bundle. Bundler: import 'apexcharts/features/${i}' (or from 'apexcharts/${n}'). Script tag: add <script src='.../dist/features/${i}.js'> after apexcharts.js.`)),e.map(e=>h(m({},e),{data:[]})))}flattenTreemapHierarchy(e){let t=this.w,n=t.globals;if(t.config.chart.type!==`treemap`||!Array.isArray(e))return e;if(!n.treemapRawSeries){if(!ar(t,e))return n.treemapRoots=null,e;n.treemapRawSeries=e.map(e=>h(m({},e),{data:Array.isArray(e?.data)?e.data.slice():e?.data}))}let{roots:r,leafSeries:i,maxDepth:a}=cr(t,n.treemapRawSeries);return n.treemapRoots=r,n.treemapMaxDepth=a,i}expandScatterJitterData(e){let t=this.w.config,n=t.chart.type===`scatter`||t.chart.type===`bubble`,r=t.plotOptions?.scatter?.jitter;if(!n||!r||!r.enabled||!Array.isArray(e))return e;if(!e.some(e=>Array.isArray(e?.data)&&e.data.some(e=>e&&!Array.isArray(e)&&Array.isArray(e.y))))return t.xaxis.type!==`datetime`&&(Array.isArray(t.xaxis.categories)&&t.xaxis.categories.length?this._applyBandAxis(t.xaxis.categories.slice()):Array.isArray(t.xaxis._scatterBandLabels)&&t.xaxis._scatterBandLabels.length&&this._applyBandAxis(t.xaxis._scatterBandLabels)),e;let i=[],a=new Map;e.forEach(e=>{Array.isArray(e?.data)&&e.data.forEach(e=>{if(e&&Array.isArray(e.y)){let t=String(e.x);a.has(t)||(a.set(t,i.length),i.push(e.x))}})});let o=r.maxPoints||5e3,s=e.map(e=>{if(!Array.isArray(e?.data))return e;let t=[];return e.data.forEach(e=>{if(e&&Array.isArray(e.y)){let n=a.get(String(e.x)),r=e.y,i=r.length>o?Math.ceil(r.length/o):1;for(let e=0;e<r.length;e+=i){let i=O.parseNumber(r[e]);i!==null&&t.push({x:n,y:i})}}else if(e&&typeof e==`object`&&!Array.isArray(e)){let n=String(e.x);t.push({x:a.has(n)?a.get(n):e.x,y:e.y})}else t.push(e)}),h(m({},e),{data:t})});return this._applyBandAxis(i),s}_applyBandAxis(e){let t=this.w.config.xaxis,n=e.length;if(!n)return;let r=t._scatterBand=t._scatterBand||{};if(t._scatterBandLabels=e.slice(),t.type=`numeric`,this.w.interact?.zoomed&&typeof t.min==`number`&&typeof t.max==`number`&&isFinite(t.min)&&isFinite(t.max)){let e=e=>Math.max(0,Math.min(n-1,e)),i=e(Math.round(t.min+.49)),a=e(Math.round(t.max-.49));a<i&&(i=a=e(Math.round((t.min+t.max)/2))),t.min=i-1,t.max=a+1,t.tickAmount=a-i+2,r.min=!0,r.max=!0,r.tick=!0}else(t.min==null||r.min)&&(t.min=-1,r.min=!0),(t.max==null||r.max)&&(t.max=n,r.max=!0),(t.tickAmount==null||t.tickAmount===`dataPoints`||r.tick)&&(t.tickAmount=n+1,r.tick=!0);t.labels=t.labels||{};let i=t.labels.formatter;if(typeof i!=`function`||i._scatterBand){let n=(t=>{let n=Math.round(t);return Math.abs(t-n)<1e-6&&e[n]!==void 0?e[n]:``});n._scatterBand=!0,t.labels.formatter=n}}parseData(t){let n=this.w,r=n.config,i=n.globals;if(t=this.parseRawDataIfNeeded(t),t=this.applySeriesTransform(t),t=this.expandScatterJitterData(t),t=this.flattenTreemapHierarchy(t),r.chart.dataReducer?.enabled&&i.axisCharts&&!i.dataReducerRawSeries){i.dataReducerRawSeries=t.map(e=>({data:Array.isArray(e?.data)?e.data.slice():e?.data}));let e=1/0,n=-1/0;for(let r of t){let t=r?.data;if(!Array.isArray(t)||t.length===0)continue;let i=!Array.isArray(t[0]),a=i?t[0]?.x:t[0]?.[0],o=i?t[t.length-1]?.x:t[t.length-1]?.[0];typeof a==`number`&&(e=Math.min(e,a)),typeof o==`number`&&(n=Math.max(n,o))}e!==1/0&&(i.dataReducerRawMinX=e,i.dataReducerRawMaxX=n)}if(i.dataReducerRawSeries&&r.chart.dataReducer?.enabled&&(t=t.map(e=>m({},e))),r.series=t,i.dataReducerRawSeries&&r.chart.dataReducer?.enabled){let e=i.dataReducerRawSeries;i.initialSeries=t.map((t,n)=>h(m({},t),{data:(e[n]?.data)?.slice()??t.data}))}else i.initialSeries=i.histogramRawSeries?i.histogramRawSeries:i.dumbbellRawSeries?i.dumbbellRawSeries:i.streamgraphRawSeries?i.streamgraphRawSeries:i.waterfallRawSeries?i.waterfallRawSeries:i.treemapRawSeries?i.treemapRawSeries:t;if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.resetGlobals(),this.isMultipleY(),i.axisCharts?(this.parseDataAxisCharts(t),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(t),r.chart.stacked){let e=new cn(this.w);this.w.seriesData.series=e.setNullSeriesToZeroValues(this.w.seriesData.series)}this.coreUtils.getSeriesTotals(),i.axisCharts?(e._defineLazyResult(this.w.seriesData,`stackedSeriesTotals`,()=>this.coreUtils.getStackedSeriesTotals()),e._defineLazyResult(this.w.seriesData,`stackedSeriesTotalsByGroups`,()=>this.coreUtils.getStackedSeriesTotalsByGroups()),e._defineLazyResult(i,`seriesPercent`,()=>(this.coreUtils.getPercentSeries(),i.seriesPercent))):this.coreUtils.getPercentSeries(),!this.w.axisFlags.dataFormatXNumeric&&(!this.w.axisFlags.isXNumeric||r.xaxis.type===`numeric`&&r.labels.length===0&&r.xaxis.categories.length===0)&&this.handleExternalLabelsData(t);let a=this.coreUtils.getCategoryLabels(this.w.labelData.labels);for(let e=0;e<a.length;e++)if(Array.isArray(a[e])){this.w.axisFlags.isMultiLineX=!0;break}return{seriesData:{series:this.w.seriesData.series,seriesNames:this.w.seriesData.seriesNames,seriesX:this.w.seriesData.seriesX,seriesZ:this.w.seriesData.seriesZ,seriesColors:this.w.seriesData.seriesColors,seriesGoals:this.w.seriesData.seriesGoals,unitData:this.w.seriesData.unitData,noLabelsProvided:this.w.axisFlags.noLabelsProvided},rangeData:{seriesRangeStart:this.w.rangeData.seriesRangeStart,seriesRangeEnd:this.w.rangeData.seriesRangeEnd,seriesRange:this.w.rangeData.seriesRange},candleData:{seriesCandleO:this.w.candleData.seriesCandleO,seriesCandleH:this.w.candleData.seriesCandleH,seriesCandleM:this.w.candleData.seriesCandleM,seriesCandleL:this.w.candleData.seriesCandleL,seriesCandleC:this.w.candleData.seriesCandleC,seriesBoxPoints:this.w.candleData.seriesBoxPoints},labelData:{labels:this.w.labelData.labels,categoryLabels:this.w.labelData.categoryLabels},axisFlags:{isXNumeric:this.w.axisFlags.isXNumeric,dataFormatXNumeric:this.w.axisFlags.dataFormatXNumeric,isDataXYZ:this.w.axisFlags.isDataXYZ,isRangeData:this.w.axisFlags.isRangeData,isRangeBar:this.w.axisFlags.isRangeBar,isMultiLineX:this.w.axisFlags.isMultiLineX,dataWasParsed:this.w.axisFlags.dataWasParsed,hasXaxisGroups:this.w.labelData.hasXaxisGroups,groups:this.w.labelData.groups,seriesGroups:this.w.labelData.seriesGroups}}}static _defineLazyResult(e,t,n){let r=!1,i;Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get(){return r||(r=!0,i=n()),i},set(e){r=!0,i=e}})}static sliceByXRange(e,t,n){let r=e.length;if(r===0)return e;let i=Array.isArray(e[0])?e=>e[0]:e=>e.x,a=0;if(t!=null){let n=0,o=r-1;for(;n<=o;){let r=n+o>>1;i(e[r])<t?n=r+1:o=r-1}a=Math.max(0,n-1)}let o=r;if(n!=null){let t=0,a=r-1;for(;t<=a;){let r=t+a>>1;i(e[r])>n?a=r-1:t=r+1}o=Math.min(r,t+1)}return a===0&&o===r?e.slice():e.slice(a,o)}static lttbDownsample(e,t){let n=e.length;if(t>=n||t<3)return e;let r=!Array.isArray(e[0]),i=r?e=>e.x:e=>e[0],a=r?e=>e.y:e=>e[1],o=[];o.push(e[0]);let s=(n-2)/(t-2),c=0;for(let r=0;r<t-2;r++){let t=Math.floor((r+1)*s)+1,l=Math.min(Math.floor((r+2)*s)+1,n),u=0,d=0,f=l-t;for(let n=t;n<l;n++)u+=i(e[n]),d+=a(e[n]);u/=f,d/=f;let p=Math.floor(r*s)+1,m=Math.min(Math.floor((r+1)*s)+1,n),h=i(e[c]),g=a(e[c]),_=-1,v=p;for(let t=p;t<m;t++){let n=Math.abs((h-u)*(a(e[t])-g)-(h-i(e[t]))*(d-g))*.5;n>_&&(_=n,v=t)}o.push(e[v]),c=v}return o.push(e[n-1]),o}static ohlcAggregate(e,t){let n=e.length;if(t>=n||t<1)return e;let r=!Array.isArray(e[0]),i=r?e=>e.x:e=>e[0],a=r?e=>e.y:e=>e[1],o=r?(e,t)=>({x:e,y:t}):(e,t)=>[e,t],s=[],c=n/t;for(let r=0;r<t;r++){let l=Math.floor(r*c),u=r===t-1?n:Math.floor((r+1)*c);if(u<=l)continue;let d=a(e[l]),f=d[0],p=d[1],m=d[2],h=d[3];for(let t=l+1;t<u;t++){let n=a(e[t]);n[1]>p&&(p=n[1]),n[2]<m&&(m=n[2]),h=n[3]}s.push(o(i(e[l]),[f,p,m,h]))}return s}static rangeAggregate(e,t){let n=e.length;if(t>=n||t<1)return e;let r=!Array.isArray(e[0]),i=r?e=>e.x:e=>e[0],a=r?e=>e.y:e=>e[1],o=r?(e,t)=>({x:e,y:t}):(e,t)=>[e,t],s=[],c=n/t;for(let r=0;r<t;r++){let l=Math.floor(r*c),u=r===t-1?n:Math.floor((r+1)*c);if(u<=l)continue;let d=1/0,f=-1/0;for(let t=l;t<u;t++){let n=a(e[t]);if(n!=null)for(let e=0;e<2;e++){let t=n[e];t!=null&&isFinite(t)&&(t<d&&(d=t),t>f&&(f=t))}}s.push(o(i(e[l]),d===1/0?[null,null]:[d,f]))}return s}excludeCollapsedSeriesInYAxis(){let e=this.w,t=[];e.globals.seriesYAxisMap.forEach((n,r)=>{let i=0;n.forEach(t=>{e.globals.collapsedSeriesIndices.indexOf(t)!==-1&&i++}),i>0&&i==n.length&&t.push(r)}),e.globals.ignoreYAxisIndexes=t.map(e=>e)}},dr=class{constructor(e,t){this.w=e,this.ctx=t}_updateOptions(e,t=!1,n=!0,r=!0,i=!1){return new Promise((a,o)=>{let s=[this.ctx];r&&(s=this.ctx.getSyncedCharts()),this.w.globals.isExecCalled&&(s=[this.ctx],this.w.globals.isExecCalled=!1),s.forEach((r,c)=>{var l;let u=r.w;u.globals.shouldAnimate=n,t||(u.globals.resized=!0,u.globals.dataChanged=!0,n&&u.config.chart.animations.enabled&&r.series.getPreviousPaths());let d=u.config.chart.requestedType||u.config.chart.type;if(n&&e&&typeof e==`object`){let t=e?.chart?.type;t&&t!==d&&((l=r.morphTypeChange)==null||l.captureBeforeDestroy({fromType:d,toType:t,newSeries:e.series||u.config.series}))}if(e&&typeof e==`object`){r.config=new z(e);let t=e.chart&&e.chart.type,n=t===`funnel`||t===`pyramid`||t===`gauge`,a=!!u.config.chart.requestedType;if(t&&!n&&a){e.chart=e.chart||{},e.chart.requestedType=t;let n=u.config.chart.requestedType;(n===`funnel`||n===`pyramid`)&&(e.plotOptions=e.plotOptions||{},e.plotOptions.bar=e.plotOptions.bar||{},e.plotOptions.bar.isFunnel===void 0&&(e.plotOptions.bar.isFunnel=!1),e.plotOptions.bar.isPyramid===void 0&&(e.plotOptions.bar.isPyramid=!1))}r.config.normalizeAliasedChartType(e),e=ue.extendArrayProps(r.config,e,u),r.w.globals.chartID!==this.w.globals.chartID&&(delete e.series,delete e.yaxis),u.config=O.extend(u.config,e),ie.handOverTypeDefaults(u.config,d,e),i&&(u.globals.lastXAxis=e.xaxis?O.clone(e.xaxis):[],u.globals.lastYAxis=e.yaxis?O.clone(e.yaxis):[],u.globals.initialConfig=O.extend({},u.config),u.globals.initialSeries=u.config.series),e.series&&(u.globals.collapsedSeriesIndices.length>0||u.globals.ancillaryCollapsedSeriesIndices.length>0)&&r.series.reconcileCollapsedByName()}return r.update(e).then(()=>{c===s.length-1&&a(r)}).catch(o)})})}_updateSeries(e,t,n=!1){return new Promise((r,i)=>{let a=this.w;a.globals.shouldAnimate=t,a.globals.dataChanged=!0;let o=JSON.stringify({y:(a.globals.yAxisScale||[]).map(e=>e?e.result:null),xMin:a.globals.minX,xMax:a.globals.maxX});ct.invalidateSelectors(a),t&&a.config.chart.animations.enabled&&this.ctx.series.getPreviousPaths();let s=a.config.series.length,c=a.config.series.map(e=>e?.data?.length??0);n&&(a.globals.dataReducerRawSeries=null,a.globals.histogramRawSeries=null,a.globals.waterfallRawSeries=null,a.globals.dumbbellRawSeries=null,a.globals.streamgraphRawSeries=null,a.globals.treemapRawSeries=null),this.ctx.data.resetParsingFlags();let l=this.ctx.data.parseData(e);return this.ctx._writeParsedSeriesData(l.seriesData),this.ctx._writeParsedRangeData(l.rangeData),this.ctx._writeParsedCandleData(l.candleData),this.ctx._writeParsedLabelData(l.labelData),this.ctx._writeParsedAxisFlags(l.axisFlags),n&&(a.globals.initialConfig&&(a.globals.initialConfig.series=a.config.series),a.globals.initialSeries=a.config.series),this._canUseFastPath(e,s,c,a)?this.ctx.fastUpdate(t,o).then(()=>{r(this.ctx)}).catch(i):(this.ctx._updateStats&&this.ctx._updateStats.full++,this.ctx.update().then(()=>{r(this.ctx)}).catch(i))})}_canUseFastPath(e,t,n,r){return!(!r.dom.elGraphical||!r.globals.axisCharts||e.length!==t||e.some((e,t)=>(e?.data?.length??0)!==n[t])||r.globals.collapsedSeries.length>0||r.globals.ancillaryCollapsedSeries.length>0||r.globals.risingSeries.length>0||r.globals.comboCharts||r.interact.zoomed)}_extendSeries(e,t){let n=this.w,r=n.config.series[t];return h(m({},n.config.series[t]),{name:e.name?e.name:r?.name,color:e.color?e.color:r?.color,type:e.type?e.type:r?.type,group:e.group?e.group:r?.group,hidden:e.hidden===void 0?r?.hidden:e.hidden,data:e.data?e.data:r?.data,zIndex:e.zIndex===void 0?t:e.zIndex})}toggleDataPointSelection(e,t){let n=this.w,r=null,i=`.apexcharts-series[data\\:realIndex='${e}']`;if(n.globals.axisCharts?r=n.dom.Paper.findOne(`${i} path[j='${t}'], ${i} circle[j='${t}'], ${i} rect[j='${t}']`):t===void 0&&(r=n.dom.Paper.findOne(`${i} path[j='${e}']`),(n.config.chart.type===`pie`||n.config.chart.type===`polarArea`||n.config.chart.type===`donut`)&&this.ctx.pie.pieClicked(e)),r)new H(this.w).pathMouseDown(r,null);else return console.warn(`toggleDataPointSelection: Element not found`),null;return r.node?r.node:null}forceXAxisUpdate(e){let t=this.w;return[`min`,`max`].forEach(n=>{e.xaxis[n]!==void 0&&(t.config.xaxis[n]=e.xaxis[n],t.globals.lastXAxis[n]=e.xaxis[n])}),e.xaxis.categories&&e.xaxis.categories.length&&(t.config.xaxis.categories=e.xaxis.categories),t.config.xaxis.convertedCatToNumeric&&(e=new ie(e).convertCatToNumericXaxis(e,this.ctx)),e}forceYAxisUpdate(e){return e.chart&&e.chart.stacked&&e.chart.stackType===`100%`&&(Array.isArray(e.yaxis)?e.yaxis.forEach((t,n)=>{e.yaxis[n].min=0,e.yaxis[n].max=100}):(e.yaxis.min=0,e.yaxis.max=100)),e}revertDefaultAxisMinMax(e){let t=this.w,n=t.globals.lastXAxis,r=t.globals.lastYAxis;e&&e.xaxis&&(n=e.xaxis),e&&e.yaxis&&(r=e.yaxis);let i=n;t.config.xaxis.min=i.min,t.config.xaxis.max=i.max;let a=e=>{if(r[e]!==void 0){let n=r[e];t.config.yaxis[e].min=n.min,t.config.yaxis[e].max=n.max}};t.config.yaxis.map((e,n)=>{t.interact.zoomed?a(n):r[n]===void 0?this.ctx.opts.yaxis[n]!==void 0&&(e.min=this.ctx.opts.yaxis[n].min,e.max=this.ctx.opts.yaxis[n].max):a(n)})}},fr=class e{static xRatio(e){let t=e.layout.gridWidth||1;return(e.globals.maxX-e.globals.minX)/t}static dataXToPx(t,n){return(n-t.globals.minX)/e.xRatio(t)}static pxToDataX(t,n){return t.globals.minX+n*e.xRatio(t)}static screenXToPlotPx(e,t){let n=e.dom.baseEl,r=n&&n.querySelector(`.apexcharts-svg`);if(!r)return t-e.layout.translateX;let i=r.getBoundingClientRect(),a=e.globals.svgWidth?i.width/e.globals.svgWidth:1;return(t-i.left)/(a||1)-e.layout.translateX}},pr=class{constructor(e){this.w=e.w,this.ttCtx=e}static hoverTarget(e){return e?(e.eventPhase&&e.target&&(e.apexHoverTarget=e.target),e.apexHoverTarget||e.target):null}getNearestValues({hoverArea:e,elGrid:t,clientX:n,clientY:r}){let i=this.w,a=t.getBoundingClientRect(),o=i.layout.gridWidth,s=a.height,c=o/(i.globals.dataPoints-1),l=s/i.globals.dataPoints,u=this.hasBars();(i.globals.comboCharts||u)&&!i.config.xaxis.convertedCatToNumeric&&(c=o/i.globals.dataPoints);let d=fr.screenXToPlotPx(i,n),f=r-a.top,p=i.globals.barPadForNumericAxis||0;d<-p||f<0||d>o+p||f>s?(e.classList.remove(`hovering-zoom`),e.classList.remove(`hovering-pan`)):i.interact.zoomEnabled?(e.classList.remove(`hovering-pan`),e.classList.add(`hovering-zoom`)):i.interact.panEnabled&&(e.classList.remove(`hovering-zoom`),e.classList.add(`hovering-pan`));let m=Math.round(d/c),h=Math.floor(f/l);u&&!i.config.xaxis.convertedCatToNumeric&&(m=Math.ceil(d/c),--m);let g=null,_=null,v=i.globals.seriesXvalues.map(e=>e.filter(e=>O.isNumber(e))),y=i.globals.seriesYvalues.map(e=>e.filter(e=>O.isNumber(e)));if(i.axisFlags.isXNumeric){_=this.closestInMultiArray(d,f,v,y),g=_.index,m=_.j??0;let e=v.some((e,t)=>e.length!==i.globals.seriesXvalues[t].length);if(g!==null&&e){let e=i.globals.seriesXvalues[g],t=null,n=1/0;for(let r=0;r<e.length;r++){if(!O.isNumber(e[r]))continue;let i=Math.abs(d-e[r]);i<n&&(n=i,t=r)}t!==null&&(m=t)}}return i.interact.capturedSeriesIndex=g===null?-1:g,(!m||m<1)&&(m=0),i.globals.isBarHorizontal?i.interact.capturedDataPointIndex=h:i.interact.capturedDataPointIndex=m,{capturedSeries:g,j:i.globals.isBarHorizontal?h:m,hoverX:d,hoverY:f}}getFirstActiveXArray(e){let t=this.w,n=0,r=e.map((e,t)=>e.length>0?t:-1);for(let e=0;e<r.length;e++)if(r[e]!==-1&&t.globals.collapsedSeriesIndices.indexOf(e)===-1&&t.globals.ancillaryCollapsedSeriesIndices.indexOf(e)===-1){n=r[e];break}return n}closestInMultiArray(e,t,n,r){let i=this.w,a=e=>i.globals.collapsedSeriesIndices.indexOf(e)===-1&&i.globals.ancillaryCollapsedSeriesIndices.indexOf(e)===-1,o=i.config.chart.type,s=!i.globals.comboCharts&&(o===`line`||o===`area`),c=1/0,l=null,u=null;if(i.globals.allSeriesHasEqualX){let i=1/0;for(let t=0;t<n.length;t++){if(!a(t))continue;let o=n[t],s=r[t],c=Math.min(o.length,s.length);for(let t=0;t<c;t++){let n=Math.abs(e-o[t]);n<i&&(i=n,u=t)}}if(u!==null){if(s){let i=1/0;for(let o=0;o<n.length;o++){if(!a(o))continue;let s=n[o],c=r[o],d=Math.min(s.length,c.length);if(d<2){let e=c[u];if(typeof e!=`number`)continue;let n=Math.abs(t-e);n<i&&(i=n,l=o);continue}for(let n=0;n<d-1;n++){let r=this._distanceToSegment(e,t,s[n],c[n],s[n+1],c[n+1]);r.dist<i&&(i=r.dist,l=o)}}}else{let e=1/0;for(let i=0;i<n.length;i++){if(!a(i))continue;let n=r[i][u];if(typeof n!=`number`)continue;let o=Math.abs(t-n);o<e&&(e=o,l=i)}}}return{index:l,j:u}}for(let i=0;i<n.length;i++){if(!a(i))continue;let o=n[i],d=r[i],f=Math.min(o.length,d.length);if(s&&f>=2){for(let n=0;n<f-1;n++){let r=this._distanceToSegment(e,t,o[n],d[n],o[n+1],d[n+1]);r.dist<c&&(c=r.dist,l=i,u=r.t<.5?n:n+1)}continue}for(let n=0;n<f;n++){let r=e-o[n],a=t-d[n],s=Math.sqrt(r*r+a*a);s<c&&(c=s,l=i,u=n)}}return{index:l,j:u}}_distanceToSegment(e,t,n,r,i,a){let o=i-n,s=a-r,c=o*o+s*s,l=c===0?0:((e-n)*o+(t-r)*s)/c;l<0?l=0:l>1&&(l=1);let u=n+l*o,d=r+l*s,f=e-u,p=t-d;return{dist:Math.sqrt(f*f+p*p),t:l}}closestInArray(e,t){let n=t[0],r=null,i=Math.abs(e-n);for(let n=0;n<t.length;n++){let a=Math.abs(e-t[n]);a<i&&(i=a,r=n)}return{j:r}}isXoverlap(e){let t=this.w,n=[],r=t.seriesData.seriesX.filter(e=>e[0]!==void 0);if(r.length>0)for(let t=0;t<r.length-1;t++)r[t][e]!==void 0&&r[t+1][e]!==void 0&&r[t][e]!==r[t+1][e]&&n.push(`unEqual`);return n.length===0}isInitialSeriesSameLen(){let e=!0,t=(this.w.globals._initialSeriesPeek??this.w.globals.initialSeries)?.filter((e,t)=>!this.w.globals.collapsedSeriesIndices?.includes(t))||[];for(let n=0;n<t.length-1;n++){if(!t[n]?.data||!t[n+1]?.data)return!0;if(t[n].data.length!==t[n+1].data.length){e=!1;break}}return e}getBarsHeight(e){return[...e].reduce((e,t)=>e+t.getBBox().height,0)}getElMarkers(e){return typeof e==`number`?this.w.dom.baseEl.querySelectorAll(`.apexcharts-series[data\\:realIndex='${e}'] .apexcharts-series-markers-wrap > *`):this.w.dom.baseEl.querySelectorAll(`.apexcharts-series-markers-wrap > *`)}getAllMarkers(e=!1){let t=[...this.w.dom.baseEl.querySelectorAll(`.apexcharts-series-markers-wrap`)];e&&(t=t.filter(e=>{let t=Number(e.getAttribute(`data:realIndex`));return this.w.globals.collapsedSeriesIndices.indexOf(t)===-1})),t.sort((e,t)=>{var n=Number(e.getAttribute(`data:realIndex`)),r=Number(t.getAttribute(`data:realIndex`));return r<n?1:r>n?-1:0});let n=[];return t.forEach(e=>{n.push(e.querySelector(`.apexcharts-marker`))}),n}hasMarkers(e){return this.getElMarkers(e).length>0}getPathFromPoint(e,t){let n=Number(e.getAttribute(`cx`)),r=Number(e.getAttribute(`cy`)),i=e.getAttribute(`shape`);return new H(this.w).getMarkerPath(n,r,i,t)}getElBars(){return this.w.dom.baseEl.querySelectorAll(`.apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-violin-series, .apexcharts-rangebar-series`)}hasBars(){return this.getElBars().length>0}getHoverMarkerSize(e){let t=this.w,n=t.config.markers.hover.size;return n===void 0&&(n=t.globals.markers.size[e]+t.config.markers.hover.sizeOffset),n}toggleAllTooltipSeriesGroups(e){let t=this.w,n=this.ttCtx;n.allTooltipSeriesGroups.length===0&&(n.allTooltipSeriesGroups=t.dom.baseEl.querySelectorAll(`.apexcharts-tooltip-series-group`));let r=n.allTooltipSeriesGroups;for(let n=0;n<r.length;n++)e===`enable`?(r[n].classList.add(`apexcharts-active`),r[n].style.display=t.config.tooltip.items.display):(r[n].classList.remove(`apexcharts-active`),r[n].style.display=`none`)}},mr=class{constructor(e){this.w=e.w,this.ttCtx=e,this.tooltipUtil=new pr(e)}drawSeriesTexts({shared:e=!0,ttItems:t,i:n=0,j:r=null,y1:i,y2:a,e:o}){let s=this.w;s.config.tooltip.custom===void 0?this.toggleActiveInactiveSeries(e,n):this.handleCustomTooltip({i:n,j:r,y1:i,y2:a,w:s});let c=this.getValuesToPrint({i:n,j:r});this.printLabels({i:n,j:r,values:c,ttItems:t,shared:e,e:o});let l=this.ttCtx.getElTooltip();l&&(this.ttCtx.tooltipRect.ttWidth=l.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=l.getBoundingClientRect().height)}printLabels({i:e,j:t,values:n,ttItems:r,shared:i,e:a}){let o=this.w,{xVal:s,zVal:c,xAxisTTVal:l}=n,u=o.seriesData.series.length,d=t!==null&&o.config.plotOptions.bar.distributed?o.globals.colors[t]:o.globals.colors[e];for(let n=0;n<u;n++){let f=o.config.tooltip.inverseOrder?u-1-n:n,p=this.computeSeriesRow({i:e,j:t,t:n,tIndex:f,shared:i,e:a,basePColor:d});this.DOMHandling({i:e,t:f,j:t,ttItems:r,values:{val:p.val,goalVals:p.goalVals,xVal:s,xAxisTTVal:l,zVal:c},seriesName:p.seriesName,shared:i,pColor:p.pColor})}}computeSeriesRow({i:e,j:t,tIndex:n,shared:r,e:i,basePColor:a}){let o=this.w,s=this.getFormatters(e),c=a,l,u=[],d=o.config.chart.type===`treemap`?s.yLbTitleFormatter(String(o.config.series[e].data[t].x),{series:o.seriesData.series,seriesIndex:e,dataPointIndex:t,w:o}):this.getSeriesName({fn:s.yLbTitleFormatter,index:e,seriesIndex:e,j:t});return o.globals.axisCharts&&(r?(s=this.getFormatters(n),d=this.getSeriesName({fn:s.yLbTitleFormatter,index:n,seriesIndex:e,j:t}),c=o.globals.colors[n],l=this.formatYValue(s,n,t),u=this.formatGoalVals(s,n,t)):(c=this.resolvePatternColor(i,c),l=this.formatYValue(s,e,t),u=this.formatGoalVals(s,e,t))),t===null&&(l=s.yLbFormatter(o.seriesData.series[e],h(m({},o),{seriesIndex:e,dataPointIndex:e}))),{seriesName:d,val:l,goalVals:u,pColor:c}}formatYValue(e,t,n){let r=this.w,i=r.waterfallData&&r.waterfallData.values;return i&&i[t]&&i[t][n]!=null?e.yLbFormatter(i[t][n],{series:i,seriesIndex:t,dataPointIndex:n,w:r}):r.axisFlags.isRangeData?e.yLbFormatter(r.rangeData.seriesRangeStart?.[t]?.[n],{series:r.rangeData.seriesRangeStart,seriesIndex:t,dataPointIndex:n,w:r})+` - `+e.yLbFormatter(r.rangeData.seriesRangeEnd?.[t]?.[n],{series:r.rangeData.seriesRangeEnd,seriesIndex:t,dataPointIndex:n,w:r}):e.yLbFormatter(r.seriesData.series[t][n],{series:r.seriesData.series,seriesIndex:t,dataPointIndex:n,w:r})}formatGoalVals(e,t,n){let r=this.w,i=r.seriesData.seriesGoals[t]?.[n];return Array.isArray(i)?i.map(i=>({attrs:i,val:e.yLbFormatter(i.value,{seriesIndex:t,dataPointIndex:n,w:r})})):[]}resolvePatternColor(e,t){var n;let r=this.w,i=((n=pr.hoverTarget(e))?.getAttribute)?.call(n,`fill`);return i?i.indexOf(`url`)===-1?i:i.indexOf(`Pattern`)===-1?t:(r.dom.baseEl.querySelector(i.substr(4).slice(0,-1))?.childNodes[0])?.getAttribute(`stroke`)??t:t}getFormatters(e){let t=this.w,n=t.formatters.yLabelFormatters[e],r;return t.formatters.ttVal===void 0?r=t.config.tooltip.y.title.formatter:Array.isArray(t.formatters.ttVal)?(n=t.formatters.ttVal[e]&&t.formatters.ttVal[e].formatter,r=t.formatters.ttVal[e]&&t.formatters.ttVal[e].title&&t.formatters.ttVal[e].title.formatter):(n=t.formatters.ttVal.formatter,typeof t.formatters.ttVal.title.formatter==`function`&&(r=t.formatters.ttVal.title.formatter)),typeof n!=`function`&&(n=t.formatters.yLabelFormatters[0]?t.formatters.yLabelFormatters[0]:function(e){return e}),typeof r!=`function`&&(r=function(e){return e?e+`: `:``}),{yLbFormatter:n,yLbTitleFormatter:r}}getSeriesName({fn:e,index:t,seriesIndex:n,j:r}){let i=this.w;return e(String(i.seriesData.seriesNames[t]),{series:i.seriesData.series,seriesIndex:n,dataPointIndex:r,w:i})}DOMHandling({t:e,j:t,ttItems:n,values:r,seriesName:i,shared:a,pColor:o}){let s=this.w,c=this.ttCtx,{val:l,goalVals:u,xVal:d,xAxisTTVal:f,zVal:p}=r;if(!n||!n[e])return;let m=null;m=n[e].children,s.config.tooltip.fillSeriesColor&&(n[e].style.backgroundColor=o,m[0].style.display=`none`),c.showTooltipTitle&&(c.tooltipTitle===null&&(c.tooltipTitle=s.dom.baseEl.querySelector(`.apexcharts-tooltip-title`)),c.tooltipTitle&&(c.tooltipTitle.innerHTML=d)),c.isXAxisTooltipEnabled&&c.xaxisTooltipText&&(c.xaxisTooltipText.innerHTML=f===``?d:f);let h=n[e].querySelector(`.apexcharts-tooltip-text-y-label`);h&&(h.innerHTML=i||``);let g=n[e].querySelector(`.apexcharts-tooltip-text-y-value`);g&&(g.innerHTML=l===void 0?``:l),m[0]&&m[0].classList.contains(`apexcharts-tooltip-marker`)&&(s.config.tooltip.marker.fillColors&&Array.isArray(s.config.tooltip.marker.fillColors)&&(o=s.config.tooltip.marker.fillColors[e]),s.config.tooltip.fillSeriesColor?m[0].style.backgroundColor=o:m[0].style.color=o),s.config.tooltip.marker.show||(m[0].style.display=`none`);let _=n[e].querySelector(`.apexcharts-tooltip-text-goals-label`),v=n[e].querySelector(`.apexcharts-tooltip-text-goals-value`);if(u.length&&s.seriesData.seriesGoals[e]){let n=()=>{let e=`<div>`,t=`<div>`;u.forEach(n=>{e+=` <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: ${n.attrs.strokeColor}; height: 3px; border-radius: 0; top: 5px;"></span> ${n.attrs.name}</div>`,t+=`<div>${n.val}</div>`}),_.innerHTML=e+`</div>`,v.innerHTML=t+`</div>`};a?s.seriesData.seriesGoals[e][t]&&Array.isArray(s.seriesData.seriesGoals[e][t])?n():(_.innerHTML=``,v.innerHTML=``):n()}else _.innerHTML=``,v.innerHTML=``;if(p!==null){let t=n[e].querySelector(`.apexcharts-tooltip-text-z-label`);t.innerHTML=s.config.tooltip.z.title;let r=n[e].querySelector(`.apexcharts-tooltip-text-z-value`);r.innerHTML=p===void 0?``:p}if(a&&m[0]){if(s.config.tooltip.hideEmptySeries){let t=n[e].querySelector(`.apexcharts-tooltip-marker`),r=n[e].querySelector(`.apexcharts-tooltip-text`);parseFloat(l)==0?(t.style.display=`none`,r.style.display=`none`):(t.style.display=`block`,r.style.display=`block`)}l==null||s.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||s.globals.collapsedSeriesIndices.indexOf(e)>-1||Array.isArray(c.tConfig.enabledOnSeries)&&c.tConfig.enabledOnSeries.indexOf(e)===-1?m[0].parentNode.style.display=`none`:m[0].parentNode.style.display=s.config.tooltip.items.display}else Array.isArray(c.tConfig.enabledOnSeries)&&c.tConfig.enabledOnSeries.indexOf(e)===-1&&(m[0].parentNode.style.display=`none`)}toggleActiveInactiveSeries(e,t){let n=this.w;if(e)this.tooltipUtil.toggleAllTooltipSeriesGroups(`enable`);else{this.tooltipUtil.toggleAllTooltipSeriesGroups(`disable`);let e=n.dom.baseEl.querySelector(`.apexcharts-tooltip-series-group-${t}`);if(e){let t=e;t.classList.add(`apexcharts-active`),t.style.display=n.config.tooltip.items.display}}}getValuesToPrint({i:e,j:t}){var n,r,i;let a=this.w,o=a.seriesData.seriesX.map(e=>e.length>0?e:[]),s=``,c=``,l=null,u=null,d={series:a.seriesData.series,seriesIndex:e,dataPointIndex:t,w:a},f=a.formatters.ttZFormatter;t===null?u=a.seriesData.series[e]:a.axisFlags.isXNumeric&&a.config.chart.type!==`treemap`?(s=o[e][t],o[e].length===0&&(s=o[this.tooltipUtil.getFirstActiveXArray(o)][t])):s=new ur(this.w).isFormatXY()?a.config.series[e].data[t]===void 0?``:a.config.series[e].data[t].x:a.labelData.labels[t]===void 0?``:a.labelData.labels[t];let p=s;return s=a.axisFlags.isXNumeric&&a.config.xaxis.type===`datetime`?new A(this.w).xLabelFormat(a.formatters.ttKeyFormatter,p,p,{i:void 0,dateFormatter:new k(this.w).formatDate,w:this.w}):a.globals.isBarHorizontal?a.formatters.yLabelFormatters[0](p,d):(n=a.formatters).xLabelFormatter?.call(n,p,d)??p,a.config.tooltip.x.formatter!==void 0&&(s=(r=a.formatters).ttKeyFormatter?.call(r,p,d)??p),a.seriesData.seriesZ.length>0&&a.seriesData.seriesZ[e].length>0&&(l=f?.(a.seriesData.seriesZ[e][t],a)),c=typeof a.config.xaxis.tooltip.formatter==`function`?(i=a.formatters).xaxisTooltipFormatter?.call(i,p,d):s,{val:Array.isArray(u)?u.join(` `):u,xVal:Array.isArray(s)?s.join(` `):s,xAxisTTVal:Array.isArray(c)?c.join(` `):c,zVal:l}}handleCustomTooltip({i:e,j:t,y1:n,y2:r,w:i}){let a=this.ttCtx.getElTooltip(),o=i.config.tooltip.custom;if(Array.isArray(o)&&(o=o[e]),typeof o!=`function`)return;let s=o({series:i.seriesData.series,seriesIndex:e,dataPointIndex:t,y1:n,y2:r,w:i});if(a){let e=a.querySelector(`.apexcharts-tooltip-arrow`);typeof s==`string`||typeof s==`number`?a.innerHTML=String(s):s!=null&&(s instanceof Element||typeof s.nodeName==`string`)&&(a.innerHTML=``,a.appendChild(s.cloneNode(!0))),e&&a.appendChild(e)}}},hr=7,gr=0,_r=class{constructor(e){this.ttCtx=e,this.w=e.w}moveXCrosshairs(e,t=null){let n=this.ttCtx,r=this.w,i=n.getElXCrosshairs(),a=e-n.xcrosshairsWidth/2,o=r.labelData.labels.slice().length;if(t!==null&&(a=r.layout.gridWidth/o*t),i!==null&&!r.globals.isBarHorizontal&&(i.setAttribute(`x`,String(a)),i.setAttribute(`x1`,String(a)),i.setAttribute(`x2`,String(a)),i.setAttribute(`y2`,String(r.layout.gridHeight)),i.classList.add(`apexcharts-active`)),a<0&&(a=0),a>r.layout.gridWidth&&(a=r.layout.gridWidth),n.isXAxisTooltipEnabled){let e=a;(r.config.xaxis.crosshairs.width===`tickWidth`||r.config.xaxis.crosshairs.width===`barWidth`)&&(e=a+n.xcrosshairsWidth/2),this.moveXAxisTooltip(e)}}moveYCrosshairs(e){let t=this.ttCtx;t.ycrosshairs!==null&&H.setAttrs(t.ycrosshairs,{y1:e,y2:e}),t.ycrosshairsHidden!==null&&H.setAttrs(t.ycrosshairsHidden,{y1:e,y2:e})}moveXAxisTooltip(e){let t=this.w,n=this.ttCtx;if(n.xaxisTooltip!==null&&n.xcrosshairsWidth!==0){n.xaxisTooltip.classList.add(`apexcharts-active`);let r=n.xaxisOffY+t.config.xaxis.tooltip.offsetY+t.layout.translateY+5+t.config.xaxis.offsetY,i=n.xaxisTooltip.getBoundingClientRect().width;if(e-=i/2,!isNaN(e)){e+=t.layout.translateX;let i=new H(this.w).getTextRects(n.xaxisTooltipText?.innerHTML??``,t.config.xaxis.labels.style.fontSize);n.xaxisTooltipText&&(n.xaxisTooltipText.style.minWidth=i.width+`px`),n.xaxisTooltip.style.left=e+`px`,n.xaxisTooltip.style.top=r+`px`}}}moveYAxisTooltip(e){let t=this.w,n=this.ttCtx;n.yaxisTTEls===null&&(n.yaxisTTEls=[...t.dom.baseEl.querySelectorAll(`.apexcharts-yaxistooltip`)]);let r=parseInt(n.ycrosshairsHidden?.getAttribute(`y1`)??`0`,10),i=t.layout.translateY+r;if(n.yaxisTTEls){let r=n.yaxisTTEls[e].getBoundingClientRect(),a=r.height,o,s=t.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${e}'] .apexcharts-yaxis-texts-g`),c=t.dom.elWrap.getBoundingClientRect();if(s){let e=s.getBoundingClientRect();e.width>0&&(o=e.left+e.width/2-c.left-r.width/2)}o??=t.config.yaxis[e].opposite?t.globals.translateYAxisX[e]+4:t.globals.translateYAxisX[e]-r.width-4,i-=a/2,t.globals.ignoreYAxisIndexes.indexOf(e)===-1&&i>0&&i<t.layout.gridHeight?(n.yaxisTTEls[e].classList.add(`apexcharts-active`),n.yaxisTTEls[e].style.top=i+`px`,n.yaxisTTEls[e].style.left=o+t.config.yaxis[e].tooltip.offsetX+`px`):n.yaxisTTEls[e].classList.remove(`apexcharts-active`)}}moveTooltip(e,t,n=null){let r=this.ttCtx.getElTooltip();if(!r)return;let i=this.computeTooltipPosition(e,t,n);i!==null&&this.applyTooltipPosition(r,i)}computeTooltipPosition(e,t,n=null){var r;let i=this.w,a=this.ttCtx,o=a.tooltipRect,s=!!i.config.tooltip.arrow,c=n===null?1:parseFloat(String(n)),l=o.ttHeight||0,u=o.ttWidth||0,d=parseFloat(String(e)),f=parseFloat(String(t));if(isNaN(d)||isNaN(f))return null;let p=c+(s?hr:0)+gr,m=d+p,h=f+i.layout.translateY,g=s?h-l/2+c/2:f+c/2,_=`right`;if(m>i.layout.gridWidth/2&&(m=d-u-p,_=`left`),m>i.layout.gridWidth-u-10&&(m=_===`left`?Math.min(i.layout.gridWidth-u,m):i.layout.gridWidth-u),m<-20&&(m=-20),i.config.tooltip.followCursor){let e=a.getElGrid();if(!e)return null;let t=e.getBoundingClientRect();m=a.e.clientX-t.left,m>i.layout.gridWidth/2?(m-=u,_=`left`):_=`right`,g=a.e.clientY+i.layout.translateY-t.top,g>i.layout.gridHeight/2&&(g-=l)}else if(!i.globals.isBarHorizontal){if(s){let e=i.layout.translateY,t=i.layout.translateY+i.layout.gridHeight;g+l>t&&(g=t-l),g<e&&(g=e)}else l/2+g>i.layout.gridHeight&&(g=i.layout.gridHeight-l+i.layout.translateY)}if(isNaN(m))return null;m+=i.layout.translateX;let v=i.config?.chart?.accessibility;if(v?.enabled&&v?.keyboard?.navigation?.enabled&&((r=i.dom?.baseEl)?.querySelector)?.call(r,`.apexcharts-keyboard-focused`)){let e=s?h:f,t=(c||1)+12,n=g,r=g+l;!isNaN(e)&&l>0&&n<e+t&&r>e-t&&(g=e-l-t,g<0&&(g=e+t))}let y=null;if(s&&l>0){let e=h-g,t=l-10;y=Math.max(10,Math.min(t,e))}return{x:m,y:g,placement:_,arrowY:y}}applyTooltipPosition(e,t){if(!e)return;let n=e.dataset.positioned!==`true`;n&&(e.style.transitionProperty=`none`),e.style.left=t.x+`px`,e.style.top=t.y+`px`,t.placement&&(e.dataset.placement=t.placement),t.arrowY!=null&&e.style.setProperty(`--apx-tt-arrow-y`,t.arrowY+`px`),t.arrowX!=null&&e.style.setProperty(`--apx-tt-arrow-x`,t.arrowX+`px`),n&&(e.offsetWidth,e.dataset.positioned=`true`,requestAnimationFrame(()=>{e.style.transitionProperty=``}))}moveMarkers(e,t){let n=this.w,r=this.ttCtx;if(n.globals.markers.size[e]>0&&!n.globals.markers.batched){let i=n.dom.baseEl.querySelectorAll(` .apexcharts-series[data\\:realIndex='${e}'] .apexcharts-marker`);for(let e=0;e<i.length;e++)parseInt(i[e].getAttribute(`rel`)??`0`,10)===t&&(r.marker.resetPointsSize(),r.marker.enlargeCurrentPoint(t,i[e]))}else r.marker.resetPointsSize(),this.moveDynamicPointOnHover(t,e)}moveDynamicPointOnHover(e,t){let n=this.w,r=this.ttCtx,i=0,a=0,o=new H(this.w),s=n.globals.pointsArray,c=r.tooltipUtil.getHoverMarkerSize(t),l=n.config.series[t].type;if(l&&(l===`column`||l===`candlestick`||l===`boxPlot`||l===`violin`))return;i=s[t]?.[e]?.[0],a=s[t]?.[e]?.[1]||0;let u=n.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${t}'] .apexcharts-series-markers path`);if(u&&a<n.layout.gridHeight&&a>0){let e=u.getAttribute(`shape`)??`circle`,t=o.getMarkerPath(i,a,e,c*1.5);u.setAttribute(`d`,t)}this.moveXCrosshairs(i),r.fixedTooltip||this.moveTooltip(i,a,c)}moveDynamicPointsOnHover(e){let t=this.ttCtx,n=t.w,r=0,i=0,a=0,o=n.globals.pointsArray,s=new cn(this.w),c=new H(this.w);a=s.getActiveConfigSeriesIndex(`asc`,[`line`,`area`,`scatter`,`bubble`]);let l=t.tooltipUtil.getHoverMarkerSize(a);if(o[a]?.[e]&&(r=o[a][e][0],i=o[a][e][1]),isNaN(r))return;let u=t.tooltipUtil.getAllMarkers();if(u.length)for(let t=0;t<n.seriesData.series.length;t++){let i=o[t];if(n.globals.comboCharts&&i===void 0&&u.splice(t,0,null),u[t]&&i&&i.length){let i=o[t][e][1],a;u[t].setAttribute(`cx`,r);let s=u[t].getAttribute(`shape`)??`circle`;if(n.config.chart.type===`rangeArea`&&!n.globals.comboCharts){let r=e+n.seriesData.series[t].length;a=o[t][r][1];let s=Math.abs(i-a)/2;i-=s}if(i!==null&&!isNaN(i)&&i<n.layout.gridHeight+l&&i+l>0){let e=c.getMarkerPath(r,i,s,l);u[t].setAttribute(`d`,e)}else u[t].setAttribute(`d`,``)}}this.moveXCrosshairs(r),t.fixedTooltip||this.moveTooltip(r,i||n.layout.gridHeight,l)}moveStickyTooltipOverBars(e,t){let n=this.w,r=this.ttCtx,i=n.globals.columnSeries?n.globals.columnSeries.length:n.seriesData.series.length;n.config.chart.stacked&&(i=n.globals.barGroups.length);let a=i>=2&&i%2==0?Math.floor(i/2):Math.floor(i/2)+1;n.globals.isBarHorizontal&&(a=new cn(this.w).getActiveConfigSeriesIndex(`desc`)+1);let o=n.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[rel='${a}'] path[j='${e}'], .apexcharts-candlestick-series .apexcharts-series[rel='${a}'] path[j='${e}'], .apexcharts-boxPlot-series .apexcharts-series[rel='${a}'] path[j='${e}'], .apexcharts-violin-series .apexcharts-series[rel='${a}'] path[j='${e}'], .apexcharts-rangebar-series .apexcharts-series[rel='${a}'] path[j='${e}']`);!o&&typeof t==`number`&&(o=n.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[data\\:realIndex='${t}'] path[j='${e}'],
|
|
28
|
-
.apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='${t}'] path[j='${e}'],
|
|
29
|
-
.apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='${t}'] path[j='${e}'],
|
|
30
|
-
.apexcharts-violin-series .apexcharts-series[data\\:realIndex='${t}'] path[j='${e}'],
|
|
31
|
-
.apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='${t}'] path[j='${e}']`));let s=null,c=n.globals.barCanvasCoords;if(!o&&c&&(s=typeof t==`number`&&c[t]?.[e]||null,!s)){for(let t in c)if(c[t]?.[e]){s=c[t][e];break}}let l=o?parseFloat(o.getAttribute(`cx`)??`0`):s?s.cx:0,u=o?parseFloat(o.getAttribute(`cy`)??`0`):s?s.cy:0,d=o?parseFloat(o.getAttribute(`barWidth`)??`0`):s?s.barWidth:0,f=r.getElGrid();if(!f)return;let p=f.getBoundingClientRect(),m=o&&(o.classList.contains(`apexcharts-candlestick-area`)||o.classList.contains(`apexcharts-boxPlot-area`));if(n.axisFlags.isXNumeric){if(o&&!m){let t=this._datapointCenterXFromBars(e);t==null?l-=i%2==0?0:d/2:l=t}o&&m&&(l-=d/2)}else!n.globals.isBarHorizontal&&!s&&(l=r.xAxisTicksPositions[e-1]+r.dataPointsDividedWidth/2,isNaN(l)&&(l=r.xAxisTicksPositions[e]-r.dataPointsDividedWidth/2));if(n.globals.isBarHorizontal?u-=r.tooltipRect.ttHeight:n.config.tooltip.followCursor?u=r.e.clientY-p.top-r.tooltipRect.ttHeight/2:u+r.tooltipRect.ttHeight+15>n.layout.gridHeight&&(u=n.layout.gridHeight),n.globals.isBarHorizontal||this.moveXCrosshairs(l),!r.fixedTooltip){if(n.globals.isBarHorizontal&&!n.config.tooltip.followCursor&&this.placeHorizontalSharedTooltip(e))return;this.moveTooltip(l,u||n.layout.gridHeight)}}_datapointCenterXFromBars(e){var t;let n=this.w,r=n.dom.baseEl.querySelectorAll(`.apexcharts-bar-series path[j='${e}'],.apexcharts-rangebar-series path[j='${e}']`);if(!r.length)return null;let i=1/0,a=-1/0;for(let e of r){if(((t=e.parentNode?.classList)?.contains)?.call(t,`apexcharts-series-collapsed`))continue;let n=e.getBoundingClientRect();(n.width!==0||n.height!==0)&&(n.left<i&&(i=n.left),n.right>a&&(a=n.right))}return isFinite(i)?fr.screenXToPlotPx(n,(i+a)/2):null}placeHorizontalSharedTooltip(e){var t;let n=this.w,r=this.ttCtx,i=r.getElTooltip();if(!i)return!1;let a=r.getElGrid();if(!a)return!1;let o=a.getBoundingClientRect(),s=n.dom.baseEl.querySelectorAll(`.apexcharts-bar-series path[j='${e}'],.apexcharts-rangebar-series path[j='${e}'],.apexcharts-boxPlot-series path[j='${e}']`);if(!s.length)return!1;let c=1/0,l=-1/0,u=1/0,d=-1/0;for(let e of s){if(((t=e.parentNode?.classList)?.contains)?.call(t,`apexcharts-series-collapsed`))continue;let n=e.getBoundingClientRect();(n.width!==0||n.height!==0)&&(n.left<c&&(c=n.left),n.right>l&&(l=n.right),n.top<u&&(u=n.top),n.bottom>d&&(d=n.bottom))}if(!isFinite(c))return!1;let f=r.tooltipRect.ttWidth||0,p=r.tooltipRect.ttHeight||0,m=(c+l)/2-o.left+n.layout.translateX,h=u-o.top+n.layout.translateY,g=d-o.top+n.layout.translateY,_=n.layout.translateY,v=n.layout.translateY+n.layout.gridHeight,y=n.layout.translateX,b=n.layout.translateX+n.layout.gridWidth,x=`top`,S=h-p-hr;if(S<_){let e=g+hr;e+p<=v&&(x=`bottom`,S=e)}let C=m-f/2;C<y&&(C=y),C+f>b&&(C=b-f);let w=Math.max(10,Math.min(f-10,m-C));return this.applyTooltipPosition(i,{x:C,y:S,placement:x,arrowY:null,arrowX:w}),!0}};function vr(e){let t=e=>`<svg viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">${e}</svg>`;switch(e){case`square`:case`rect`:return t(`<rect x="1" y="1" width="10" height="10" rx="1" fill="currentColor"/>`);case`line`:return t(`<rect x="0" y="5" width="12" height="2" rx="1" fill="currentColor"/>`);case`diamond`:return t(`<path d="M6 0.5 L11.5 6 L6 11.5 L0.5 6 Z" fill="currentColor"/>`);case`triangle`:return t(`<path d="M6 1 L11.2 10.5 L0.8 10.5 Z" fill="currentColor"/>`);case`cross`:return t(`<path d="M2 2 L10 10 M10 2 L2 10" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>`);case`plus`:return t(`<path d="M6 1 L6 11 M1 6 L11 6" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>`);case`star`:return t(`<path d="M6 0.5 L7.5 4.4 L11.5 4.7 L8.4 7.2 L9.5 11.1 L6 8.9 L2.5 11.1 L3.6 7.2 L0.5 4.7 L4.5 4.4 Z" fill="currentColor"/>`);case`sparkle`:return t(`<path d="M6 0.5 L7 5 L11.5 6 L7 7 L6 11.5 L5 7 L0.5 6 L5 5 Z" fill="currentColor"/>`);default:return t(`<circle cx="6" cy="6" r="5" fill="currentColor"/>`)}}var yr=class{constructor(e){this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new _r(e)}drawDynamicPoints(){let e=this.w,t=new H(this.w),n=new it(this.w,this.ctx),r=[...e.dom.baseEl.querySelectorAll(`.apexcharts-series`)];e.config.chart.stacked&&r.sort((e,t)=>parseFloat(e.getAttribute(`data:realIndex`))-parseFloat(t.getAttribute(`data:realIndex`)));for(let i=0;i<r.length;i++){let a=r[i].querySelector(`.apexcharts-series-markers-wrap`);if(a!==null){let r=`apexcharts-marker w${(Math.random()+1).toString(36).substring(4)}`;it.markersAreInert(e)&&(r+=` no-pointer-events`);let i=n.getMarkerConfig({cssClass:r,seriesIndex:Number(a.getAttribute(`data:realIndex`))}),o=t.drawMarker(0,0,i);o.node.setAttribute(`default-marker-size`,0);let s=T.createElementNS(B,`g`);s.classList.add(`apexcharts-series-markers`),s.appendChild(o.node),a.appendChild(s)}}}enlargeCurrentPoint(e,t,n=null,r=null){let i=this.w,a=i.config.markers.hover.size;i.config.chart.type!==`bubble`&&(a=this.newPointSize(e,t));let o=t.getAttribute(`cx`),s=t.getAttribute(`cy`);if(n!==null&&r!==null&&(o=n,s=r),this.tooltipPosition.moveXCrosshairs(o),!this.fixedTooltip){if(i.config.chart.type===`radar`){let e=this.ttCtx.getElGrid();if(!e)return;let t=e.getBoundingClientRect();o=this.ttCtx.e.clientX-t.left}this.tooltipPosition.moveTooltip(o,s,a)}}enlargePoints(e){let t=this.w,n=this,r=this.ttCtx,i=e,a=t.dom.baseEl.querySelectorAll(`.apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker`),o=t.config.markers.hover.size;for(let e=0;e<a.length;e++){let s=a[e].getAttribute(`rel`),c=a[e].getAttribute(`index`);if(o===void 0&&(o=t.globals.markers.size[c]+t.config.markers.hover.sizeOffset),i===parseInt(s??`0`,10)){n.newPointSize(i,a[e]);let t=a[e].getAttribute(`cx`)??`0`,s=a[e].getAttribute(`cy`)??`0`;n.tooltipPosition.moveXCrosshairs(parseFloat(t)),r.fixedTooltip||n.tooltipPosition.moveTooltip(parseFloat(t),parseFloat(s),o)}else n.oldPointSize(a[e])}}newPointSize(e,t){let n=this.w,r=n.config.markers.hover.size,i=e===0?t.parentNode.firstChild:t.parentNode.lastChild;if(i.getAttribute(`default-marker-size`)!==`0`){let e=parseInt(i.getAttribute(`index`),10);r===void 0&&(r=n.globals.markers.size[e]+n.config.markers.hover.sizeOffset),r<0&&(r=0);let a=this.ttCtx.tooltipUtil.getPathFromPoint(t,r);return t.setAttribute(`d`,a),r}}oldPointSize(e){let t=parseFloat(e.getAttribute(`default-marker-size`)),n=this.ttCtx.tooltipUtil.getPathFromPoint(e,t);e.setAttribute(`d`,n)}resetPointsSize(){let e=this.w.dom.baseEl.querySelectorAll(`.apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker`);for(let t=0;t<e.length;t++){let n=parseFloat(e[t].getAttribute(`default-marker-size`)??`0`);if(O.isNumber(n)&&n>0){let r=this.ttCtx.tooltipUtil.getPathFromPoint(e[t],n);e[t].setAttribute(`d`,r)}else e[t].setAttribute(`d`,`M0,0`)}}},br=class{constructor(e){this.w=e.w;let t=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!t.globals.isBarHorizontal&&t.config.chart.type===`rangeBar`&&t.config.plotOptions.bar.rangeBarGroupRows}getAttr(e,t){return parseFloat(pr.hoverTarget(e).getAttribute(t)??``)}handleHeatTreeTooltip({e,opt:t,x:n,y:r,type:i}){let a=this.ttCtx,o=this.w,s=o.globals.activeRenderer,c=i===`heatmap`&&s&&s.kind===`canvas`&&typeof s.hitTest==`function`,l=pr.hoverTarget(e),u,d,f,p,m,h;if(c){let i=t.elGrid.getBoundingClientRect(),a=e.type===`touchmove`?e.touches[0].clientX:e.clientX,o=e.type===`touchmove`?e.touches[0].clientY:e.clientY,c=s.hitTest(a-i.left,o-i.top);if(!c)return{x:n,y:r,noHit:!0};u=c.seriesIndex,d=c.dataPointIndex,f=c.x,p=c.y,m=c.width,h=c.height}else if(l.classList.contains(`apexcharts-${i}-rect`))u=this.getAttr(e,`i`),d=this.getAttr(e,`j`),f=this.getAttr(e,`cx`),p=this.getAttr(e,`cy`),m=this.getAttr(e,`width`),h=this.getAttr(e,`height`);else return{x:n,y:r};a.tooltipLabels.drawSeriesTexts({ttItems:t.ttItems,i:u,j:d,shared:!1,e}),o.interact.capturedSeriesIndex=u,o.interact.capturedDataPointIndex=d,a.tooltipPosition.moveXCrosshairs(f+m/2);let g=a.getElTooltip();if(i===`heatmap`&&o.config.tooltip.arrow&&!o.config.tooltip.followCursor&&g){let e=t.elGrid.getBoundingClientRect(),n=o.dom.elWrap.getBoundingClientRect(),r=e.left-n.left,i,s,u,d;if(c)i=f,s=p,u=f+m,d=p+h;else{let t=l.getBoundingClientRect();i=t.left-e.left,s=t.top-e.top,u=t.right-e.left,d=t.bottom-e.top}let _=a.tooltipRect.ttWidth||0,v=a.tooltipRect.ttHeight||0,y=(i+u)/2+r,b=s+o.layout.translateY,x=d+o.layout.translateY,S=o.layout.translateY,C=o.layout.translateY+o.layout.gridHeight,w=r,T=r+o.layout.gridWidth,E=`top`,D=b-v-hr;if(D<S){let e=x+hr;e+v<=C?(E=`bottom`,D=e):D=S}let O=y-_/2;O<w&&(O=w),O+_>T&&(O=T-_);let k=Math.max(10,Math.min(_-10,y-O));return a.tooltipPosition.applyTooltipPosition(g,{x:O,y:D,placement:E,arrowY:null,arrowX:k}),{x:O,y:D,positioned:!0}}if(n=f+a.tooltipRect.ttWidth/2+m,r=p+a.tooltipRect.ttHeight/2-h/2,n>o.layout.gridWidth/2&&(n=f-a.tooltipRect.ttWidth/2+m),a.w.config.tooltip.followCursor){let e=o.dom.elWrap.getBoundingClientRect();n=(o.interact.clientX??0)-e.left-(n>o.layout.gridWidth/2?a.tooltipRect.ttWidth:0),r=(o.interact.clientY??0)-e.top-(r>o.layout.gridHeight/2?a.tooltipRect.ttHeight:0)}return{x:n,y:r}}handleMarkerTooltip({e,opt:t,x:n,y:r}){let i=this.w,a=this.ttCtx,o,s;if(pr.hoverTarget(e).classList.contains(`apexcharts-marker`)){let c=parseInt(t.paths.getAttribute(`cx`),10),l=parseInt(t.paths.getAttribute(`cy`),10),u=parseFloat(t.paths.getAttribute(`val`));if(s=parseInt(t.paths.getAttribute(`rel`),10),o=parseInt(t.paths.parentNode.parentNode.parentNode.getAttribute(`rel`),10)-1,a.intersect){let e=O.findAncestor(t.paths,`apexcharts-series`);e&&(o=parseInt(e.getAttribute(`data:realIndex`),10))}a.tooltipLabels.drawSeriesTexts({ttItems:t.ttItems,i:o,j:s,shared:!a.showOnIntersect&&i.config.tooltip.shared,e}),e.type===`mouseup`&&a.markerClick(e,o,s),i.interact.capturedSeriesIndex=o,i.interact.capturedDataPointIndex=s;let d=!!i.config.tooltip.arrow;if(n=c,d?r=l:(r=l+i.layout.translateY-a.tooltipRect.ttHeight*1.4,u<0&&(r=l)),a.w.config.tooltip.followCursor){let e=a.getElGrid();if(!e)return{x:n,y:r};let t=e.getBoundingClientRect();r=a.e.clientY+i.layout.translateY-t.top}a.marker.enlargeCurrentPoint(s,t.paths,n,r)}return{x:n,y:r}}handleBarTooltip({e,opt:t}){let n=this.w,r=this.ttCtx,i=r.getElTooltip(),a=0,o=0,s=0,c=0,l,u=this.getBarTooltipXY({e,opt:t});if(u.j===null&&u.barHeight===0&&u.barWidth===0)return;c=u.i;let d=u.j;if(n.interact.capturedSeriesIndex=c,n.interact.capturedDataPointIndex=d===null?n.interact.capturedDataPointIndex:d,n.globals.isBarHorizontal&&r.tooltipUtil.hasBars()||!n.config.tooltip.shared?(o=u.x,s=u.y,l=Array.isArray(n.config.stroke.width)?n.config.stroke.width[c]:n.config.stroke.width,a=o):!n.globals.comboCharts&&!n.config.tooltip.shared&&(a/=2),isNaN(s)&&(s=n.globals.svgHeight-r.tooltipRect.ttHeight),o+r.tooltipRect.ttWidth>n.layout.gridWidth?o-=r.tooltipRect.ttWidth:o<0&&(o=0),(!r.w.config.tooltip.followCursor||r.getElGrid())&&(r.tooltip===null&&(r.tooltip=n.dom.baseEl.querySelector(`.apexcharts-tooltip:not(.apexcharts-annotation-tooltip)`)),n.config.tooltip.shared||(n.globals.comboBarCount>0?r.tooltipPosition.moveXCrosshairs(a+l/2):r.tooltipPosition.moveXCrosshairs(a)),!r.fixedTooltip&&(!n.config.tooltip.shared||n.globals.isBarHorizontal&&r.tooltipUtil.hasBars())&&(s=s+n.layout.translateY-r.tooltipRect.ttHeight/2,i))){let e=r.tooltipRect.ttWidth||0,t=r.tooltipRect.ttHeight||0,a=!!n.config.tooltip.arrow,{barAnchorXInGrid:c,barAnchorYInGrid:l,barRectInGrid:d}=u,f=r.getElGrid()?.getBoundingClientRect(),p=n.dom.elWrap.getBoundingClientRect(),m=f?f.left-p.left:n.layout.translateX,h,g=null,_=null,v=o+m,y=s;if(a&&n.globals.isBarHorizontal&&d!=null){let r=n.layout.translateY,i=n.layout.translateY+n.layout.gridHeight,a=m,o=m+n.layout.gridWidth,s=(d.left+d.right)/2+m,c=d.top+n.layout.translateY,l=d.bottom+n.layout.translateY,u=c-t-hr;if(h=`top`,u<r){let e=l+hr;e+t<=i&&(h=`bottom`,u=e)}y=u,v=s-e/2,v<a&&(v=a),v+e>o&&(v=o-e),_=Math.max(10,Math.min(e-10,s-v))}else if(a&&c!=null&&l!=null){let r=c+m,i=m+n.layout.gridWidth/2,a=(d?.left??c)+m,o=(d?.right??c)+m;if(r<i?(h=`right`,v=o+hr):(h=`left`,v=a-e-hr),d){y=(d.top+d.bottom)/2+n.layout.translateY-t/2;let e=n.layout.translateY,r=n.layout.translateY+n.layout.gridHeight;y<e&&(y=e),y+t>r&&(y=r-t)}if(t>0&&d){let e=(d.top+d.bottom)/2+n.layout.translateY;g=Math.max(10,Math.min(t-10,e-y))}}r.tooltipPosition.applyTooltipPosition(i,{x:v,y,placement:h,arrowY:g,arrowX:_})}}getBarTooltipXY({e,opt:t}){let n=this.w,r=null,i=this.ttCtx,a=0,o=0,s=0,c=0,l=0,u=null,d=null,f=null,p=null,m=null,h=pr.hoverTarget(e),g=h.classList;if(g.contains(`apexcharts-bar-area`)||g.contains(`apexcharts-candlestick-area`)||g.contains(`apexcharts-boxPlot-area`)||g.contains(`apexcharts-rangebar-area`)){let g=h,_=g.getBoundingClientRect(),v=t.elGrid.getBoundingClientRect(),y=_.height;l=_.height;let b=_.width,x=parseInt(g.getAttribute(`cx`),10),S=parseInt(g.getAttribute(`cy`),10);u=x,d=S,c=parseFloat(g.getAttribute(`barWidth`));let C=_.left-v.left,w=_.top-v.top,T=C+b/2,E=w+y/2;f=T,p=n.globals.isBarHorizontal?E:w,m={left:C,top:w,right:C+b,bottom:w+y};let D=e.type===`touchmove`?e.touches[0].clientX:e.clientX;r=parseInt(g.getAttribute(`j`),10),a=parseInt(g.parentNode.getAttribute(`rel`),10)-1;let O=g.getAttribute(`data-range-y1`),k=g.getAttribute(`data-range-y2`);n.globals.comboCharts&&(a=parseInt(g.parentNode.getAttribute(`data:realIndex`),10));let A=e=>(e=n.axisFlags.isXNumeric?x-b/2:this.isVerticalGroupedRangeBar?x+b/2:x-i.dataPointsDividedWidth+b/2,e),j=()=>S-i.dataPointsDividedHeight+y/2-i.tooltipRect.ttHeight/2;i.tooltipLabels.drawSeriesTexts({ttItems:t.ttItems,i:a,j:r,y1:O?parseInt(O,10):null,y2:k?parseInt(k,10):null,shared:!i.showOnIntersect&&n.config.tooltip.shared,e}),n.config.tooltip.followCursor?n.globals.isBarHorizontal?(o=D-v.left+15,s=j()):(o=A(o),s=e.clientY-v.top-i.tooltipRect.ttHeight/2-15):n.globals.isBarHorizontal?(o=x,i.xyRatios&&o<i.xyRatios.baseLineInvertedY&&(o=x-i.tooltipRect.ttWidth),s=j()):(o=A(o),s=S)}return{x:o,y:s,barHeight:l,barWidth:c,i:a,j:r,barCx:u,barCy:d,barAnchorXInGrid:f,barAnchorYInGrid:p,barRectInGrid:m}}},xr=class{constructor(e){this.w=e.w,this.ttCtx=e}drawXaxisTooltip(){let e=this.w,t=this.ttCtx,n=e.config.xaxis.position===`bottom`;t.xaxisOffY=n?e.layout.gridHeight+1:-e.layout.xAxisHeight-e.config.xaxis.axisTicks.height+3;let r=n?`apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom`:`apexcharts-xaxistooltip apexcharts-xaxistooltip-top`,i=e.dom.elWrap;t.isXAxisTooltipEnabled&&e.dom.baseEl.querySelector(`.apexcharts-xaxistooltip`)===null&&(t.xaxisTooltip=T.createElementNS(`http://www.w3.org/1999/xhtml`,`div`),t.xaxisTooltip.setAttribute(`class`,r+` apexcharts-theme-`+e.config.tooltip.theme),i.appendChild(t.xaxisTooltip),t.xaxisTooltipText=T.createElementNS(`http://www.w3.org/1999/xhtml`,`div`),t.xaxisTooltipText.classList.add(`apexcharts-xaxistooltip-text`),t.xaxisTooltipText.style.fontFamily=e.config.xaxis.tooltip.style.fontFamily||e.config.chart.fontFamily,t.xaxisTooltipText.style.fontSize=e.config.xaxis.tooltip.style.fontSize,t.xaxisTooltip.appendChild(t.xaxisTooltipText))}drawYaxisTooltip(){let e=this.w,t=this.ttCtx;for(let n=0;n<e.config.yaxis.length;n++){let r=e.config.yaxis[n].opposite||e.config.yaxis[n].crosshairs.opposite;t.yaxisOffX=r?e.layout.gridWidth+1:1;let i=r?`apexcharts-yaxistooltip apexcharts-yaxistooltip-${n} apexcharts-yaxistooltip-right`:`apexcharts-yaxistooltip apexcharts-yaxistooltip-${n} apexcharts-yaxistooltip-left`,a=e.dom.elWrap;e.dom.baseEl.querySelector(`.apexcharts-yaxistooltip.apexcharts-yaxistooltip-${n}`)===null&&(t.yaxisTooltip=T.createElementNS(`http://www.w3.org/1999/xhtml`,`div`),t.yaxisTooltip.setAttribute(`class`,i+` apexcharts-theme-`+e.config.tooltip.theme),a.appendChild(t.yaxisTooltip),n===0&&(t.yaxisTooltipText=[]),t.yaxisTooltipText[n]=T.createElementNS(`http://www.w3.org/1999/xhtml`,`div`),t.yaxisTooltipText[n].classList.add(`apexcharts-yaxistooltip-text`),t.yaxisTooltip.appendChild(t.yaxisTooltipText[n]))}}setXCrosshairWidth(){let e=this.w,t=this.ttCtx,n=t.getElXCrosshairs();if(t.xcrosshairsWidth=parseInt(e.config.xaxis.crosshairs.width,10),e.globals.comboCharts){let n=e.dom.baseEl.querySelector(`.apexcharts-bar-area`);if(n!==null&&e.config.xaxis.crosshairs.width===`barWidth`)t.xcrosshairsWidth=parseFloat(n.getAttribute(`barWidth`)??`0`);else if(e.config.xaxis.crosshairs.width===`tickWidth`){let n=e.labelData.labels.length;t.xcrosshairsWidth=e.layout.gridWidth/n}}else if(e.config.xaxis.crosshairs.width===`tickWidth`){let n=e.labelData.labels.length;t.xcrosshairsWidth=e.layout.gridWidth/n}else if(e.config.xaxis.crosshairs.width===`barWidth`){let n=e.dom.baseEl.querySelector(`.apexcharts-bar-area`);t.xcrosshairsWidth=n===null?1:parseFloat(n.getAttribute(`barWidth`)??`0`)}e.globals.isBarHorizontal&&(t.xcrosshairsWidth=0),n!==null&&t.xcrosshairsWidth>0&&n.setAttribute(`width`,String(t.xcrosshairsWidth))}handleYCrosshair(){let e=this.w,t=this.ttCtx;t.ycrosshairs=e.dom.baseEl.querySelector(`.apexcharts-ycrosshairs`),t.ycrosshairsHidden=e.dom.baseEl.querySelector(`.apexcharts-ycrosshairs-hidden`)}drawYaxisTooltipText(e,t,n){let r=this.ttCtx,i=this.w,a=i.globals,o=a.seriesYAxisMap[e];if(r.yaxisTooltips[e]&&o.length>0){let s=i.formatters.yLabelFormatters[e],c=r.getElGrid();if(!c)return;let l=c.getBoundingClientRect(),u=o[0],d=0;n.yRatio.length>1&&(d=u);let f=(t-l.top)*n.yRatio[d],p=a.maxYArr[u]-a.minYArr[u],m=a.minYArr[u]+(p-f);i.config.yaxis[e].reversed&&(m=a.maxYArr[u]-(p-f)),r.tooltipPosition.moveYCrosshairs(t-l.top),r.yaxisTooltipText[e].innerHTML=s(m),r.tooltipPosition.moveYAxisTooltip(e)}}},Sr=class{constructor(e,t){this.w=e,this.ctx=t,this.tConfig=e.config.tooltip,this.tooltipUtil=new pr(this),this.tooltipLabels=new mr(this),this.tooltipPosition=new _r(this),this.marker=new yr(this),this.intersect=new br(this),this.axesTooltip=new xr(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.xaxisTooltipText=null,this.yaxisTooltip=null,this.yaxisTooltipText=null,this.yaxisTTEls=null,this.xaxisOffY=0,this.yaxisOffX=0,this.xcrosshairsWidth=0,this.ycrosshairs=null,this.ycrosshairsHidden=null,this.tooltip=null,this.e=null,this.isBarShared=!e.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now(),this.dimensionUpdateScheduled=!1,this.xyRatios=null,this.isXAxisTooltipEnabled=!1,this.yaxisTooltips=[],this.allTooltipSeriesGroups=[],this.xAxisTicksPositions=null,this.dataPointsDividedHeight=0,this.dataPointsDividedWidth=0,this.tooltipTitle=null,this.legendLabels=null,this.ttItems=null,this.seriesBound=null,this.seriesHoverTimeout=void 0,this.clientX=0,this.clientY=0,this.barSeriesHeight=0,this.tooltipRect={x:0,y:0,ttWidth:0,ttHeight:0}}setupDimensionCache(){let e=this.w,t=this.getElTooltip();t&&(this.updateDimensionCache(),typeof ResizeObserver<`u`&&!e.globals.resizeObserver&&(e.globals.resizeObserver=new ResizeObserver(()=>{this.dimensionUpdateScheduled||(this.dimensionUpdateScheduled=!0,requestAnimationFrame(()=>{this.updateDimensionCache(),this.dimensionUpdateScheduled=!1}))}),e.globals.resizeObserver.observe(t)))}updateDimensionCache(){let e=this.w,t=this.getElTooltip();if(!t)return;let n=t.getBoundingClientRect();e.globals.dimensionCache.tooltip={width:n.width,height:n.height,lastUpdate:Date.now()}}getCachedDimensions(){let e=this.w;if(e.globals.dimensionCache.tooltip){let t=e.globals.dimensionCache.tooltip;if(Date.now()-t.lastUpdate<1e3)return{ttWidth:t.width,ttHeight:t.height}}this.updateDimensionCache();let t=e.globals.dimensionCache.tooltip;return t?{ttWidth:t.width,ttHeight:t.height}:{ttWidth:0,ttHeight:0}}getElTooltip(e){return e||=this,e.w.dom.baseEl?e.w.dom.baseEl.querySelector(`.apexcharts-tooltip:not(.apexcharts-annotation-tooltip)`):null}getElXCrosshairs(){return this.w.dom.baseEl.querySelector(`.apexcharts-xcrosshairs`)}getElGrid(){return this.w.dom.baseEl.querySelector(`.apexcharts-grid`)}drawTooltip(e){let t=this.w;this.xyRatios=e,this.isXAxisTooltipEnabled=t.config.xaxis.tooltip.enabled&&t.globals.axisCharts,this.yaxisTooltips=t.config.yaxis.map(e=>!!(e.show&&e.tooltip.enabled&&t.globals.axisCharts)),this.allTooltipSeriesGroups=[],t.globals.axisCharts||(this.showTooltipTitle=!1);let n=this.getElTooltip();n?.parentNode&&n.parentNode.removeChild(n),this.tooltipTitle=null;let r=T.createElementNS(`http://www.w3.org/1999/xhtml`,`div`);r.classList.add(`apexcharts-tooltip`),t.config.tooltip.cssClass&&r.classList.add(t.config.tooltip.cssClass),r.classList.add(`apexcharts-theme-${this.tConfig.theme||`light`}`),this.tConfig.fillSeriesColor&&r.classList.add(`apexcharts-tooltip-fill-series`),this.tConfig.compact&&(r.classList.add(`apexcharts-tooltip-compact`),t.config.series.length===1&&r.classList.add(`apexcharts-tooltip-value-only`)),this.tConfig.style&&this.tConfig.style.background&&r.style.setProperty(`--apx-tt-bg`,this.tConfig.style.background);let i=this.tConfig.shared&&t.config.series.length>1&&!t.globals.isBarHorizontal&&t.config.chart.type!==`heatmap`;if(this.tConfig.arrow&&!this.tConfig.followCursor&&!this.tConfig.fixed.enabled&&!i&&!this.tConfig.fillSeriesColor&&t.globals.axisCharts){let e=T.createElementNS(`http://www.w3.org/1999/xhtml`,`div`);e.classList.add(`apexcharts-tooltip-arrow`),r.appendChild(e)}if(t.config.chart.accessibility.enabled&&t.config.chart.accessibility.announcements.enabled&&(r.setAttribute(`role`,`tooltip`),r.setAttribute(`aria-live`,`polite`),r.setAttribute(`aria-atomic`,`true`),r.setAttribute(`aria-hidden`,`true`)),t.dom.elWrap.appendChild(r),t.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();let e=new ut(this.w,this.ctx,void 0);this.xAxisTicksPositions=e.getXAxisTicksPositions()}if((t.globals.comboCharts||this.tConfig.intersect||t.config.chart.type===`rangeBar`)&&!this.tConfig.shared&&(this.showOnIntersect=!0),(t.config.markers.size===0||t.globals.markers.largestSize===0||t.globals.markers.batched)&&this.marker.drawDynamicPoints(),t.globals.collapsedSeries.length===t.seriesData.series.length)return;this.dataPointsDividedHeight=t.layout.gridHeight/t.globals.dataPoints,this.dataPointsDividedWidth=t.layout.gridWidth/t.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=T.createElementNS(`http://www.w3.org/1999/xhtml`,`div`),this.tooltipTitle.classList.add(`apexcharts-tooltip-title`),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||t.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,r.appendChild(this.tooltipTitle));let a=t.seriesData.series.length;(t.globals.xyCharts||t.globals.comboCharts)&&this.tConfig.shared&&(a=this.showOnIntersect?1:t.seriesData.series.length),this.legendLabels=t.dom.baseEl.querySelectorAll(`.apexcharts-legend-text`),this.ttItems=this.createTTElements(a),this.addSVGEvents(),this.setupDimensionCache()}createTTElements(e){let t=this.w,n=[],r=this.getElTooltip();if(!r)return n;for(let i=0;i<e;i++){let a=T.createElementNS(`http://www.w3.org/1999/xhtml`,`div`);a.classList.add(`apexcharts-tooltip-series-group`,`apexcharts-tooltip-series-group-${i}`),a.style.order=String(t.config.tooltip.inverseOrder?e-i:i+1);let o=T.createElementNS(`http://www.w3.org/1999/xhtml`,`span`);o.classList.add(`apexcharts-tooltip-marker`),t.config.tooltip.fillSeriesColor?o.style.backgroundColor=t.globals.colors[i]:o.style.color=t.globals.colors[i];let s=t.config.markers.shape,c=s;Array.isArray(s)&&(c=s[i]),o.setAttribute(`shape`,c),o.innerHTML=vr(c),a.appendChild(o);let l=T.createElementNS(`http://www.w3.org/1999/xhtml`,`div`);l.classList.add(`apexcharts-tooltip-text`),l.style.fontFamily=this.tConfig.style.fontFamily||t.config.chart.fontFamily,l.style.fontSize=this.tConfig.style.fontSize,[`y`,`goals`,`z`].forEach(e=>{let t=T.createElementNS(`http://www.w3.org/1999/xhtml`,`div`);t.classList.add(`apexcharts-tooltip-${e}-group`);let n=T.createElementNS(`http://www.w3.org/1999/xhtml`,`span`);n.classList.add(`apexcharts-tooltip-text-${e}-label`),t.appendChild(n);let r=T.createElementNS(`http://www.w3.org/1999/xhtml`,`span`);r.classList.add(`apexcharts-tooltip-text-${e}-value`),t.appendChild(r),l.appendChild(t)}),a.appendChild(l),r.appendChild(a),n.push(a)}return n}addSVGEvents(){let e=this.w,t=e.config.chart.type,n=this.getElTooltip();if(!n)return;let r=t===`bar`||t===`candlestick`||t===`boxPlot`||t===`violin`||t===`rangeBar`,i=t===`area`||t===`line`||t===`scatter`||t===`bubble`||t===`radar`,a=i&&!e.globals.xyCharts,o=e.dom.Paper.node,s=this.getElGrid();s&&(this.seriesBound=s.getBoundingClientRect());let c=[],l=[],u={hoverArea:o,elGrid:s,tooltipEl:n,tooltipY:c,tooltipX:l,ttItems:this.ttItems},d;if(e.globals.axisCharts&&(i?d=e.dom.baseEl.querySelectorAll(`.apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker`):r?d=e.dom.baseEl.querySelectorAll(`.apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-violin-area, .apexcharts-series .apexcharts-rangebar-area`):(t===`heatmap`||t===`treemap`)&&(d=e.dom.baseEl.querySelectorAll(`.apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap`)),d&&d.length))for(let e=0;e<d.length;e++)c.push(d[e].getAttribute(`cy`)),l.push(d[e].getAttribute(`cx`));if(e.globals.xyCharts&&!this.showOnIntersect||e.globals.comboCharts&&!this.showOnIntersect||r&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([o],u);else if(r&&!e.globals.comboCharts||i&&this.showOnIntersect||a)this.addDatapointEventsListeners(u);else if(t===`heatmap`&&e.globals.activeRenderer&&e.globals.activeRenderer.kind===`canvas`)this.addPathsEventListeners([o],u);else if(!e.globals.axisCharts||t===`heatmap`||t===`treemap`){let t=e.dom.baseEl.querySelectorAll(`.apexcharts-series`);this.addPathsEventListeners(t,u)}if(this.showOnIntersect){let t=e.dom.baseEl.querySelectorAll(`.apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker`);t.length>0&&this.addPathsEventListeners(t,u),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(u)}}drawFixedTooltipRect(){let e=this.w,t=this.getElTooltip();if(!t)return{x:0,y:0,ttWidth:0,ttHeight:0};let n=t.getBoundingClientRect(),r=n.width+10,i=n.height+10,a=this.tConfig.fixed.offsetX,o=this.tConfig.fixed.offsetY,s=this.tConfig.fixed.position.toLowerCase();return s.indexOf(`right`)>-1&&(a=a+e.globals.svgWidth-r+10),s.indexOf(`bottom`)>-1&&(o=o+e.globals.svgHeight-i-10),this.tooltipPosition.applyTooltipPosition(t,{x:a,y:o}),{x:a,y:o,ttWidth:r,ttHeight:i}}addDatapointEventsListeners(e){let t=this.w.dom.baseEl.querySelectorAll(`.apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area`);this.addPathsEventListeners(t,e)}addPathsEventListeners(e,t){let n=this;for(let r=0;r<e.length;r++){let i={paths:e[r],tooltipEl:t.tooltipEl,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:t.ttItems};[`mousemove`,`mouseup`,`touchmove`,`mouseout`,`touchend`].map(t=>e[r].addEventListener(t,n.onSeriesHover.bind(n,i),{capture:!1,passive:!0}))}}onSeriesHover(e,t){pr.hoverTarget(t);let n=Date.now()-this.lastHoverTime;n>=20?this.seriesHover(e,t):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(()=>{this.seriesHover(e,t)},20-n))}seriesHover(e,t){if(this.w.globals.isDestroyed)return;this.lastHoverTime=Date.now();let n=[],r=this.w,i=e=>{let t=e?.w?.config?.chart?.link;return!!(t&&typeof t.dimension==`function`)};r.config.chart.group&&!i(this.ctx)&&(n=this.ctx.getSyncedCharts().filter(e=>!i(e))),!(r.globals.axisCharts&&(r.globals.minX===-1/0&&r.globals.maxX===1/0||r.globals.dataPoints===0))&&(n.length?n.forEach(n=>{let r=this.getElTooltip(n),i={paths:e.paths,tooltipEl:r,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:n.w.globals.tooltip.ttItems};n.w.globals.minX===this.w.globals.minX&&n.w.globals.maxX===this.w.globals.maxX&&n.w.globals.tooltip.seriesHoverByContext({chartCtx:n,ttCtx:n.w.globals.tooltip,opt:i,e:t})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:e,e:t}))}seriesHoverByContext({chartCtx:e,ttCtx:t,opt:n,e:r}){let i=e.w;if(!this.getElTooltip(e))return;let a=t.getCachedDimensions();t.tooltipRect={x:0,y:0,ttWidth:a.ttWidth,ttHeight:a.ttHeight},t.e=r,t.tooltipUtil.hasBars()&&!i.globals.comboCharts&&!t.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new cn(e.w).toggleSeriesOnHover(r,pr.hoverTarget(r)?.parentNode),i.globals.axisCharts?t.axisChartsTooltips({e:r,opt:n,tooltipRect:t.tooltipRect}):t.nonAxisChartsTooltips({e:r,opt:n,tooltipRect:t.tooltipRect}),t.fixedTooltip&&t.drawFixedTooltipRect()}axisChartsTooltips({e,opt:t}){let n=this.w,r,i;if(!t.elGrid)return;let a=t.elGrid.getBoundingClientRect(),o=e.type===`touchmove`?e.touches[0].clientX:e.clientX,s=e.type===`touchmove`?e.touches[0].clientY:e.clientY;if(this.clientY=s,this.clientX=o,n.interact.capturedSeriesIndex=-1,n.interact.capturedDataPointIndex=-1,s<a.top||s>a.top+a.height){this.handleMouseOut(t);return}if(n.dom.elWrap.querySelector(`.apexcharts-annotation-tooltip.apexcharts-active`)){this.handleMouseOut(t);return}if(Array.isArray(this.tConfig.enabledOnSeries)&&!n.config.tooltip.shared){let e=parseInt(t.paths.getAttribute(`index`),10);if(this.tConfig.enabledOnSeries.indexOf(e)<0){this.handleMouseOut(t);return}}let c=this.getElTooltip();if(!c)return;let l=this.getElXCrosshairs(),u=[`heatmap`,`treemap`].includes(n.config.chart.type),d=[];n.config.chart.group&&!u&&(d=this.ctx.getSyncedCharts());let f=n.globals.xyCharts||n.config.chart.type===`bar`&&!n.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||n.globals.comboCharts&&this.tooltipUtil.hasBars();if(e.type===`mousemove`||e.type===`touchmove`||e.type===`mouseup`){if(n.globals.collapsedSeries.length+n.globals.ancillaryCollapsedSeries.length===n.seriesData.series.length)return;l!==null&&l.classList.add(`apexcharts-active`);let a=this.yaxisTooltips?.filter(e=>e===!0),p=this.ycrosshairs;if(p!==null&&a?.length&&p.classList.add(`apexcharts-active`),!u&&(f&&!this.showOnIntersect||d.length>1))this.handleStickyTooltip(e,o,s,t);else if(n.config.chart.type===`heatmap`||n.config.chart.type===`treemap`){let a=this.intersect.handleHeatTreeTooltip({e,opt:t,x:r,y:i,type:n.config.chart.type});if(a.noHit){this.handleMouseOut(t);return}r=a.x,i=a.y,a.positioned||(c.style.left=r+`px`,c.style.top=i+`px`)}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e,opt:t}),this.tooltipUtil.hasMarkers(0)&&this.intersect.handleMarkerTooltip({e,opt:t,x:r,y:i});if(this.yaxisTooltips&&this.yaxisTooltips.length)for(let e=0;e<n.config.yaxis.length;e++)this.axesTooltip.drawYaxisTooltipText(e,s,this.xyRatios);n.dom.baseEl.classList.add(`apexcharts-tooltip-active`),t.tooltipEl.classList.add(`apexcharts-active`),n.config.chart.accessibility.enabled&&n.config.chart.accessibility.announcements.enabled&&t.tooltipEl.removeAttribute(`aria-hidden`)}else(e.type===`mouseout`||e.type===`touchend`)&&this.handleMouseOut(t)}getSliceAnchor(e){let t=this.w,n=parseFloat(e?.getAttribute(`data:cx`)??``),r=parseFloat(e?.getAttribute(`data:cy`)??``);if(isNaN(n)||isNaN(r))return null;let i=t.dom.elWrap.getBoundingClientRect(),a=typeof e.getScreenCTM==`function`?e.getScreenCTM():null;if(!a){let e=t.dom.Paper.node.getBoundingClientRect();return{x:e.left-i.left+n,y:e.top-i.top+r}}return{x:a.a*n+a.c*r+a.e-i.left,y:a.b*n+a.d*r+a.f-i.top}}nonAxisChartsTooltips({e,opt:t,tooltipRect:n}){var r;let i=this.w,a=t.paths.getAttribute(`rel`),o=this.getElTooltip();if(!o)return;let s=i.dom.elWrap.getBoundingClientRect();if(e.type===`mousemove`||e.type===`touchmove`){if(i.dom.baseEl.classList.add(`apexcharts-tooltip-active`),o.classList.add(`apexcharts-active`),i.config.chart.accessibility.enabled&&i.config.chart.accessibility.announcements.enabled&&o.removeAttribute(`aria-hidden`),i.config.chart.type===`unit`){let t=pr.hoverTarget(e),n=t&&typeof t.closest==`function`?t.closest(`.apexcharts-unit-area`):null;if(!n)return;this.renderUnitTooltip(n)}else this.tooltipLabels.drawSeriesTexts({ttItems:t.ttItems,i:parseInt(a,10)-1,shared:!1});let r,c,l=t.paths.querySelector(`path[data\\:cx]`)||t.paths,u=i.config.tooltip.intersect?this.getSliceAnchor(l):null;if(u?(r=u.x-n.ttWidth/2,c=u.y-n.ttHeight-10):(r=(i.interact.clientX??0)-s.left-n.ttWidth/2,c=(i.interact.clientY??0)-s.top-n.ttHeight-10),o.style.left=r+`px`,o.style.top=c+`px`,i.config.legend.tooltipHoverFormatter){let e=i.config.legend.tooltipHoverFormatter,t=a-1,n=this.legendLabels?.[t];if(!n)return;n.innerHTML=e(n.getAttribute(`data:default-text`),{seriesIndex:t,dataPointIndex:t,w:i})}}else(e.type===`mouseout`||e.type===`touchend`)&&(o.classList.remove(`apexcharts-active`),i.dom.baseEl.classList.remove(`apexcharts-tooltip-active`),i.config.legend.tooltipHoverFormatter&&((r=this.legendLabels)==null||r.forEach(e=>{let t=e.getAttribute(`data:default-text`);e.innerHTML=decodeURIComponent(t??``)})))}renderUnitTooltip(e){let t=this.w,n=this.getElTooltip();if(!n)return;let r=parseInt(e.getAttribute(`i`)||`0`,10),i=parseInt(e.getAttribute(`j`)||`0`,10);if(typeof t.config.tooltip.custom==`function`){this.tooltipLabels.handleCustomTooltip({i:r,j:i,y1:null,y2:null,w:t});return}let a=t.seriesData.seriesNames[r]||`series-${r+1}`,o=Math.round(Number(t.seriesData.series[r])||0),s=e.parentNode,c=s&&s.querySelectorAll?s.querySelectorAll(`.apexcharts-unit-area`).length:o,l=t.config.plotOptions.unit||{},u=l.unitValue>0?l.unitValue:1,d=t.seriesData.unitData&&t.seriesData.unitData[r],f=d?d[i]:void 0,p=f&&typeof f==`object`?f:null,m=p&&p.fillColor||t.globals.colors&&t.globals.colors[r]||`#008FFB`,h,g=l.tooltip&&l.tooltip.formatter;if(typeof g==`function`)h=g({seriesName:a,seriesIndex:r,dataPointIndex:i,count:c,value:o,unitValue:u,datum:f,color:m,w:t});else if(f!=null){let e=p?p.name??p.label??p.x??null:null,t=p?p.value??p.y??null:f;h=e!=null&&t!=null?`${e}: ${t}`:e==null?t==null?`#${(i+1).toLocaleString()} of ${c.toLocaleString()}`:String(t):String(e)}else h=`#${(i+1).toLocaleString()} of ${c.toLocaleString()}`,u!==1&&(h+=` · ${u.toLocaleString()} per dot`);let _=t.config.chart.fontFamily||`inherit`,v=t.config.tooltip.style&&t.config.tooltip.style.fontSize||`12px`,y=n.querySelector(`.apexcharts-tooltip-arrow`);n.innerHTML=`<div class="apexcharts-tooltip-title" style="font-family: ${_}; font-size: ${v};">${a}</div><div class="apexcharts-tooltip-series-group apexcharts-active" style="display: flex;"><span class="apexcharts-tooltip-marker" style="background-color: ${m};"></span><div class="apexcharts-tooltip-text" style="font-family: ${_}; font-size: ${v};"><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-value">${h}</span></div></div></div>`,y&&n.appendChild(y);let b=n.getBoundingClientRect();this.tooltipRect.ttWidth=b.width,this.tooltipRect.ttHeight=b.height}handleStickyTooltip(e,t,n,r){let i=this.w,a=this.tooltipUtil.getNearestValues({context:this,hoverArea:r.hoverArea,elGrid:r.elGrid,clientX:t,clientY:n}),o=a.j,s=a.capturedSeries;s!==null&&i.globals.collapsedSeriesIndices.includes(s??-1)&&(s=null);let c=i.globals.barPadForNumericAxis||0;if(a.hoverX<-c||a.hoverX>i.layout.gridWidth+c){this.handleMouseOut(r);return}if(s!==null)this.handleStickyCapturedSeries(e,s??-1,r,o??0);else if(this.tooltipUtil.isXoverlap(o??0)||i.globals.isBarHorizontal){let t=i.seriesData.series.findIndex((e,t)=>!i.globals.collapsedSeriesIndices.includes(t));this.create(e,this,t,o??0,r.ttItems)}}handleStickyCapturedSeries(e,t,n,r){let i=this.w;if(!this.tConfig.shared&&i.seriesData.series[t][r]===null){this.handleMouseOut(n);return}if(i.seriesData.series[t][r]!==void 0)this.tConfig.shared&&this.tooltipUtil.isXoverlap(r)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(e,this,t,r,n.ttItems):this.create(e,this,t,r,n.ttItems,!1);else if(this.tooltipUtil.isXoverlap(r)){let t=i.seriesData.series.findIndex((e,t)=>!i.globals.collapsedSeriesIndices.includes(t));this.create(e,this,t,r,n.ttItems)}}deactivateHoverFilter(){let e=this.w,t=new H(this.w,this.ctx),n=e.dom.Paper.find(`.apexcharts-bar-area`);for(let e=0;e<n.length;e++)t.pathMouseLeave(n[e],void 0)}handleMouseOut(e){var t,n;let r=this.w,i=this.getElXCrosshairs();r.dom.baseEl.classList.remove(`apexcharts-tooltip-active`),e.tooltipEl.classList.remove(`apexcharts-active`),delete e.tooltipEl.dataset.positioned,r.config.chart.accessibility.enabled&&r.config.chart.accessibility.announcements.enabled&&e.tooltipEl.setAttribute(`aria-hidden`,`true`),this.deactivateHoverFilter(),r.config.chart.type!==`bubble`&&this.marker.resetPointsSize(),i!==null&&i.classList.remove(`apexcharts-active`);let a=this.ycrosshairs;if(a!==null&&a.classList.remove(`apexcharts-active`),this.isXAxisTooltipEnabled&&((t=this.xaxisTooltip)==null||t.classList.remove(`apexcharts-active`)),this.yaxisTooltips&&this.yaxisTooltips.length){this.yaxisTTEls===null&&(this.yaxisTTEls=[...r.dom.baseEl.querySelectorAll(`.apexcharts-yaxistooltip`)]);for(let e=0;e<this.yaxisTTEls.length;e++)this.yaxisTTEls[e].classList.remove(`apexcharts-active`)}r.config.legend.tooltipHoverFormatter&&((n=this.legendLabels)==null||n.forEach(e=>{let t=e.getAttribute(`data:default-text`);e.innerHTML=decodeURIComponent(t??``)}))}markerClick(e,t,n){let r=this.w;typeof r.config.chart.events.markerClick==`function`&&r.config.chart.events.markerClick(e,this.ctx,{seriesIndex:t,dataPointIndex:n,w:r}),this.ctx.events.fireEvent(`markerClick`,[e,this.ctx,{seriesIndex:t,dataPointIndex:n,w:r}])}_hasCustomSeries(){let e=this.w;return Gn(e.config.chart.type)?!0:(e.config.series||[]).some(e=>e&&e.type&&Gn(e.type))}create(e,t,n,r,i,a=null){let o=this.w,s=t;e.type===`mouseup`&&this.markerClick(e,n,r),a===null&&(a=this.tConfig.shared);let c=this.tooltipUtil.hasMarkers(n),l=this.ctx?.renderer?.kind===`canvas`,u=l&&!this.tooltipUtil.hasBars(),d=!l&&!c&&!this.tooltipUtil.hasBars()&&this._hasCustomSeries(),f=u||d,p=this.tooltipUtil.getElBars(),g=()=>{o.globals.markers.largestSize>0&&!l&&!o.globals.markers.batched?s.marker.enlargePoints(r):s.tooltipPosition.moveDynamicPointsOnHover(r)};if(o.config.legend.tooltipHoverFormatter){let e=o.config.legend.tooltipHoverFormatter,t=Array.from(this.legendLabels??[]);t.forEach(e=>{let t=e.getAttribute(`data:default-text`);e.innerHTML=decodeURIComponent(t??``)});for(let i=0;i<t.length;i++){let s=t[i],c=parseInt(s.getAttribute(`i`)??``,10),l=decodeURIComponent(s.getAttribute(`data:default-text`)??``),u=e(l,{seriesIndex:a?c:n,dataPointIndex:r,w:o});if(a)s.innerHTML=o.globals.collapsedSeriesIndices.indexOf(c)<0?u:l;else if(s.innerHTML=c===n?u:l,n===c)break}}let _=o.rangeData,v=m(m({ttItems:i,i:n,j:r},(_.seriesRange?.[n]?.[r])?.y[0]?.y1!==void 0&&{y1:(_.seriesRange?.[n]?.[r])?.y[0]?.y1}),(_.seriesRange?.[n]?.[r])?.y[0]?.y2!==void 0&&{y2:(_.seriesRange?.[n]?.[r])?.y[0]?.y2});if(a){if(s.tooltipLabels.drawSeriesTexts(h(m({},v),{shared:!this.showOnIntersect&&this.tConfig.shared})),c||f)g();else if(this.tooltipUtil.hasBars()&&(l&&s.tooltipPosition.moveStickyTooltipOverBars(r,n),this.barSeriesHeight=this.tooltipUtil.getBarsHeight([...p]),this.barSeriesHeight>0)){let e=new H(this.w,this.ctx),t=o.dom.Paper.find(`.apexcharts-bar-area[j='${r}']`);this.deactivateHoverFilter(),s.tooltipUtil.getAllMarkers(!0).length&&!this.barSeriesHeight&&g(),s.tooltipPosition.moveStickyTooltipOverBars(r,n);for(let n=0;n<t.length;n++)e.pathMouseEnter(t[n],void 0)}}else s.tooltipLabels.drawSeriesTexts(m({shared:!1},v)),this.tooltipUtil.hasBars()&&s.tooltipPosition.moveStickyTooltipOverBars(r,n),c?s.tooltipPosition.moveMarkers(n,r):f&&s.tooltipPosition.moveDynamicPointOnHover(r,n)}},Cr=class{constructor(e,t){this.w=e,this.ctx=t,this.kind=`svg`}beginSeries(){}present(){return null}clear(){}group(e){return this.ctx.graphics.group(e)}drawPath(e){return this.ctx.graphics.drawPath(e)}drawLine(...e){return this.ctx.graphics.drawLine(...e)}drawRect(...e){return this.ctx.graphics.drawRect(...e)}drawCircle(e,t){return this.ctx.graphics.drawCircle(e,t)}drawText(e){return this.ctx.graphics.drawText(e)}renderPaths(e){return this.ctx.graphics.renderPaths(e)}drawMarker(e,t,n={}){return this.ctx.graphics.drawMarker(e,t,n)}supports(e){return!0}hitTest(){return null}restyle(){}toBitmap(){return null}destroy(){}},wr=`__apexcharts_renderers__`;function Tr(){let e=globalThis;return e[wr]||(e[wr]=new Map),e[wr]}var Er=class{static get _rendererRegistry(){return Tr()}static registerRenderer(e,t){Tr().set(e,t)}static unregisterRenderer(e){Tr().delete(e)}constructor(e,t){this.w=e,this.ctx=t,this.svg=new Cr(e,t),this.active=this.svg,this._activeKind=`svg`,this._instances={}}_desiredKind(){let e=this.w.config.chart,t=e.renderer||`svg`;return!v.isBrowser()||t===`svg`||rt(this.w)?`svg`:t===`canvas`||nt(this.w)>=(e.rendererThreshold||8e3)?`canvas`:`svg`}resolve(){let e=this.w.config.chart.renderer||`svg`,t=this._desiredKind();if(t!==`svg`){let n=Tr().get(t);if(n)return this._instances[t]||(this._instances[t]=n(this.w,this.ctx)),this.active=this._instances[t],this._activeKind=t,this.ctx.renderer=this.active,this.w.globals.activeRenderer=this.active,this._activeKind;e===t&&console.warn(`[apexcharts] renderer:"${t}" requested but that renderer is not in the default bundle. Bundler: import 'apexcharts/features/renderer-${t}'. Script tag: add <script src=".../dist/features/renderer-${t}.js"> after apexcharts.js. Falling back to SVG.`)}else e===`canvas`&&rt(this.w)&&console.warn(`[apexcharts] renderer:"canvas" requested but this chart uses a feature the canvas renderer does not render yet (gradient/pattern/image fill or a state color-matrix filter); falling back to SVG.`);return this.active=this.svg,this._activeKind=`svg`,this.ctx.renderer=this.active,this.w.globals.activeRenderer=this.active,this._activeKind}getActiveKind(){return this._activeKind}teardown(){for(let e in this._instances){let t=this._instances[e];t&&typeof t.destroy==`function`&&t.destroy()}this._instances={},this.active=this.svg,this._activeKind=`svg`}},W=class e{constructor(e){this.node=e,e&&(e.instance=this),this._listeners=[],this._filter=null}attr(e,t){if(typeof e==`string`&&t===void 0)return this.node.getAttribute(e);let n=typeof e==`string`?{[e]:t}:e;for(let e in n){let t=n[e];t===null?this.node.removeAttribute(e):t!==void 0&&(typeof t==`number`&&isNaN(t)&&(t=0),this.node.setAttribute(e,t))}if(this.node.nodeName===`text`&&n.x!=null){let e=this.node.querySelectorAll(`tspan[data-newline]`);for(let t=0;t<e.length;t++)e[t].setAttribute(`x`,n.x)}return this}css(e){for(let t in e)this.node.style[t]=e[t];return this}fill(e){return typeof e==`object`?this.attr(e):this.attr(`fill`,e)}stroke(e){return typeof e==`object`?(e.color!==void 0&&this.attr(`stroke`,e.color),e.width!==void 0&&this.attr(`stroke-width`,e.width),e.dasharray!==void 0&&this.attr(`stroke-dasharray`,e.dasharray),e.linecap!==void 0&&this.attr(`stroke-linecap`,e.linecap),e.opacity!==void 0&&this.attr(`stroke-opacity`,e.opacity),this):this.attr(`stroke`,e)}size(e,t){return this.attr({width:e,height:t})}move(e,t){return this.attr({x:e,y:t})}center(e,t){if(this.node.nodeName===`g`){let n=this.bbox(),r=e-(n.x+n.width/2),i=t-(n.y+n.height/2);return this.attr(`transform`,`translate(${r}, ${i})`)}return this.attr({cx:e,cy:t})}add(e){return e&&e.__isCanvasMark||this.node.appendChild(e.node||e),this}addTo(e){return(e.node||e).appendChild(this.node),this}remove(){return this.node.parentNode&&this.node.parentNode.removeChild(this.node),this}clear(){for(;this.node.firstChild;)this.node.removeChild(this.node.firstChild);return this}find(t){return Array.from(this.node.querySelectorAll(t)).map(t=>t.instance||new e(t))}findOne(t){let n=this.node.querySelector(t);return n?n.instance||new e(n):null}on(e,t){let n=e.split(`.`)[0];return this._listeners.push({event:e,eventType:n,handler:t}),this.node.addEventListener(n,t),this}off(e,t){if(!e&&!t)this._listeners.forEach(e=>{this.node.removeEventListener(e.eventType,e.handler)}),this._listeners=[];else if(e&&!t){let t=e.split(`.`)[0];this._listeners=this._listeners.filter(e=>e.eventType!==t||(this.node.removeEventListener(e.eventType,e.handler),!1))}else{let n=e.split(`.`)[0];this._listeners=this._listeners.filter(e=>e.eventType===n&&e.handler===t?(this.node.removeEventListener(e.eventType,e.handler),!1):!0)}return this}each(t,n){return Array.from(this.node.children).forEach(r=>{let i=r.instance||new e(r);t.call(i),n&&i.each(t,n)}),this}removeClass(e){return e===`*`?this.node.removeAttribute(`class`):this.node.classList.remove(e),this}children(){return Array.from(this.node.childNodes).filter(e=>e.nodeType===1).map(t=>t.instance||new e(t))}hide(){return this.node.style.display=`none`,this}show(){return this.node.style.display=``,this}bbox(){if(typeof this.node.getBBox==`function`)try{return this.node.getBBox()}catch{}return{x:0,y:0,width:0,height:0}}tspan(t){let n=T.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);return n.textContent=t,this.node.appendChild(n),new e(n)}plot(e){return typeof e==`string`&&this.attr(`d`,e),this}animate(){throw Error(`Animation module not loaded`)}filterWith(){throw Error(`Filter module not loaded`)}},Dr=0,Or=class extends W{constructor(e,t,n){let r=t===`radial`?`radialGradient`:`linearGradient`,i=T.createElementNS(B,r);super(i),this._id=`SvgjsGradient`+ ++Dr,this.attr(`id`,this._id),typeof n==`function`&&n(new kr(this));let a=e.node.querySelector(`defs`);a||(a=T.createElementNS(B,`defs`),e.node.appendChild(a)),a.appendChild(this.node)}stop(e,t,n){let r=T.createElementNS(B,`stop`);return r.setAttribute(`offset`,e),r.setAttribute(`stop-color`,t),n!==void 0&&r.setAttribute(`stop-opacity`,String(n)),this.node.appendChild(r),this}from(e,t){return this.attr({x1:e,y1:t})}to(e,t){return this.attr({x2:e,y2:t})}url(){return`url(#`+this._id+`)`}toString(){return this.url()}valueOf(){return this.url()}fill(){return this.url()}},kr=class{constructor(e){this.gradient=e}stop(e,t,n){return this.gradient.stop(e,t,n),this}},Ar=0,jr=class extends W{constructor(e,t,n,r){let i=T.createElementNS(B,`pattern`);super(i),this._id=`SvgjsPattern`+ ++Ar,this.attr({id:this._id,width:t,height:n,patternUnits:`userSpaceOnUse`}),typeof r==`function`&&r(new Mr(this.node));let a=e.node.querySelector(`defs`);a||(a=T.createElementNS(B,`defs`),e.node.appendChild(a)),a.appendChild(this.node)}url(){return`url(#`+this._id+`)`}toString(){return this.url()}valueOf(){return this.url()}fill(){return this.url()}},Mr=class e extends W{line(e,t,n,r){let i=this._make(`line`);return e!==void 0&&i.attr({x1:e,y1:t,x2:n,y2:r}),i}rect(e,t){let n=this._make(`rect`);return e!==void 0&&n.attr({width:e,height:t}),n}circle(e){let t=this._make(`circle`);return e!==void 0&&t.attr({r:e/2,cx:e/2,cy:e/2}),t}path(e){let t=this._make(`path`);return e&&t.attr(`d`,e),t}polygon(e){let t=this._make(`polygon`);return e&&t.attr(`points`,e),t}group(){return this._makeContainer(`g`)}defs(){return this._makeContainer(`defs`)}plain(e){let t=T.createElementNS(B,`text`);t.textContent=e;let n=new W(t);return this.node.appendChild(t),n}text(e){let t=T.createElementNS(B,`text`),n=new W(t);return this.node.appendChild(t),typeof e==`function`&&e(new Nr(t)),n}image(e,t){let n=T.createElementNS(B,`image`);n.setAttributeNS(`http://www.w3.org/1999/xlink`,`href`,e);let r=new W(n);if(this.node.appendChild(n),typeof t==`function`&&v.isBrowser()){let n=new Image;n.onload=function(){r.size(n.width,n.height),t.call(r,{width:n.width,height:n.height})},n.src=e}return r}gradient(e,t){return new Or(this,e,t)}pattern(e,t,n){return new jr(this,e,t,n)}_make(e){let t=T.createElementNS(B,e);return this.node.appendChild(t),new W(t)}_makeContainer(t){let n=T.createElementNS(B,t);return this.node.appendChild(n),new e(n)}},Nr=class{constructor(e){this.textNode=e}tspan(e){let t=T.createElementNS(B,`tspan`);return t.textContent=e,this.textNode.appendChild(t),new Pr(t,this.textNode)}},Pr=class{constructor(e,t){this.node=e,this.textNode=t}newLine(){return this.node.setAttribute(`dy`,`1.1em`),this.node.dataset.newline=`1`,this}},Fr=0,Ir=class extends W{constructor(){let e=T.createElementNS(B,`filter`);super(e),this._id=`SvgjsFilter`+ ++Fr,this.attr(`id`,this._id)}},Lr=class{constructor(e){this.filter=e}colorMatrix(e){return this._primitive(`feColorMatrix`,e)}offset(e){return this._primitive(`feOffset`,e)}gaussianBlur(e){return this._primitive(`feGaussianBlur`,e)}flood(e){return this._primitive(`feFlood`,e)}composite(e){return this._primitive(`feComposite`,e)}merge(e){let t=T.createElementNS(B,`feMerge`);return e.forEach(e=>{let n=T.createElementNS(B,`feMergeNode`);n.setAttribute(`in`,e),t.appendChild(n)}),this.filter.node.appendChild(t),new W(t)}_primitive(e,t){let n=T.createElementNS(B,e);for(let e in t)n.setAttribute(e,t[e]);return this.filter.node.appendChild(n),new W(n)}};function Rr(e){e.prototype.filterWith=function(e){let t=new Ir;this._filter=t;let n=this.node;for(;n&&n.nodeName!==`svg`;)n=n.parentNode;if(n){let e=n.querySelector(`defs`);e||(e=T.createElementNS(B,`defs`),n.insertBefore(e,n.firstChild)),e.appendChild(t.node)}return e(new Lr(t)),this.attr(`filter`,`url(#`+t._id+`)`),this},e.prototype.unfilter=function(e){return this._filter&&=(this.node.removeAttribute(`filter`),e&&this._filter.node&&this._filter.node.parentNode&&this._filter.node.parentNode.removeChild(this._filter.node),null),this},e.prototype.filterer=function(){return this._filter}}function zr(e){e.prototype.draggable=function(e){if(e===!1)return this._dragCleanup&&=(this._dragCleanup(),null),this;let t=this,n=e||{},r=e=>{if(e.button&&e.button!==0)return;e.stopPropagation();let r=e.type===`touchstart`?e.touches[0]:e,i=t.node,a=parseFloat(i.getAttribute(`x`))||0,o=parseFloat(i.getAttribute(`y`))||0,s=r.clientX,c=r.clientY,l=i.ownerSVGElement,u=null;l&&(u=l.getScreenCTM());let d=e=>{let t=e.type===`touchmove`?e.touches[0]:e,r=t.clientX-s,l=t.clientY-c;u&&(r/=u.a,l/=u.d);let d=a+r,f=o+l,p=parseFloat(i.getAttribute(`width`))||0,m=parseFloat(i.getAttribute(`height`))||0;n.minX!==void 0&&d<n.minX&&(d=n.minX),n.minY!==void 0&&f<n.minY&&(f=n.minY),n.maxX!==void 0&&d+p>n.maxX&&(d=n.maxX-p),n.maxY!==void 0&&f+m>n.maxY&&(f=n.maxY-m);let h={x:d,y:f,w:p,h:m,x2:d+p,y2:f+m},g=new CustomEvent(`dragmove`,{detail:{handler:{move:function(e,t){i.setAttribute(`x`,e),i.setAttribute(`y`,t)}},box:h}});i.dispatchEvent(g)},f=()=>{v.isBrowser()&&(document.removeEventListener(`mousemove`,d),document.removeEventListener(`touchmove`,d),document.removeEventListener(`mouseup`,f),document.removeEventListener(`touchend`,f)),t._activeDrag=null};v.isBrowser()&&(document.addEventListener(`mousemove`,d),document.addEventListener(`touchmove`,d),document.addEventListener(`mouseup`,f),document.addEventListener(`touchend`,f),t._activeDrag={onMove:d,onUp:f})};return t.node.addEventListener(`mousedown`,r),t.node.addEventListener(`touchstart`,r),t._dragCleanup=()=>{t.node.removeEventListener(`mousedown`,r),t.node.removeEventListener(`touchstart`,r),t._activeDrag&&v.isBrowser()&&(document.removeEventListener(`mousemove`,t._activeDrag.onMove),document.removeEventListener(`touchmove`,t._activeDrag.onMove),document.removeEventListener(`mouseup`,t._activeDrag.onUp),document.removeEventListener(`touchend`,t._activeDrag.onUp),t._activeDrag=null)},t}}function Br(e){e.prototype.select=function(e){if(e===!1)return this._selectCleanup&&=(this._selectCleanup(),null),this;let t=this,{createHandle:n,updateHandle:r}=e,i=document.createElementNS(B,`g`);i.setAttribute(`class`,`svg_select_points`);let a=t.node.parentNode;a&&a.appendChild(i);let o={},s=[`t`,`b`,`l`,`r`,`lt`,`rt`,`lb`,`rb`];s.forEach((e,t)=>{let r=new Mr(document.createElementNS(B,`g`));i.appendChild(r.node);let a=n(r,[0,0],t,[],e);o[e]={group:r,handle:a}});let c=()=>{let e=parseFloat(t.attr(`x`))||0,n=parseFloat(t.attr(`y`))||0,a=parseFloat(t.attr(`width`))||0,c=parseFloat(t.attr(`height`))||0,l=t.node.getAttribute(`transform`);l?i.setAttribute(`transform`,l):i.removeAttribute(`transform`);let u={t:[e+a/2,n],b:[e+a/2,n+c],l:[e,n+c/2],r:[e+a,n+c/2],lt:[e,n],rt:[e+a,n],lb:[e,n+c],rb:[e+a,n+c]};s.forEach(e=>{o[e]&&u[e]&&r(o[e].group,u[e])})};return c(),t._selectHandles=i,t._selectHandlesMap=o,t._updateSelectPositions=c,t._selectCleanup=()=>{i.parentNode&&i.parentNode.removeChild(i),t._selectHandles=null,t._selectHandlesMap=null,t._updateSelectPositions=null},t},e.prototype.resize=function(e){if(e===!1)return this._resizeCleanup&&=(this._resizeCleanup(),null),this;let t=this,n=t._selectHandlesMap;if(!n)return t;let r=[],i=e=>{let i=n[e];if(!i||!i.group||!i.group.node)return;let a=i.group.node,o=n=>{if(n.button&&n.button!==0)return;n.stopPropagation();let r=(n.type===`touchstart`?n.touches[0]:n).clientX,i=t.node.ownerSVGElement,a=null;i&&(a=i.getScreenCTM());let o=parseFloat(t.attr(`x`))||0,s=parseFloat(t.attr(`width`))||0,c=n=>{let i=(n.type===`touchmove`?n.touches[0]:n).clientX-r;a&&(i/=a.a);let c=o,l=s;e===`l`?(c=o+i,l=s-i):e===`r`&&(l=s+i),l<0&&(l=0),t.attr({x:c,width:l}),t._updateSelectPositions&&t._updateSelectPositions();let u=new CustomEvent(`resize`,{detail:{el:t}});t.node.dispatchEvent(u)},l=()=>{v.isBrowser()&&(document.removeEventListener(`mousemove`,c),document.removeEventListener(`touchmove`,c),document.removeEventListener(`mouseup`,l),document.removeEventListener(`touchend`,l));let e=new CustomEvent(`resize`,{detail:{el:t}});t.node.dispatchEvent(e)};v.isBrowser()&&(document.addEventListener(`mousemove`,c),document.addEventListener(`touchmove`,c),document.addEventListener(`mouseup`,l),document.addEventListener(`touchend`,l))};a.addEventListener(`mousedown`,o),a.addEventListener(`touchstart`,o),r.push(()=>{a.removeEventListener(`mousedown`,o),a.removeEventListener(`touchstart`,o)})};return i(`l`),i(`r`),t._resizeCleanup=()=>{r.forEach(e=>e())},t}}Rr(W),Fe(W),zr(W),Br(W);function Vr(){let e=new Mr(T.createElementNS(B,`svg`));return e.attr({xmlns:B}),e}Vr.xlink=`http://www.w3.org/1999/xlink`,v.isBrowser()&&window.SVG===void 0&&(window.SVG=Vr),v.isBrowser()?(window.SVG===void 0&&(window.SVG=Vr),window.Apex===void 0&&(window.Apex={})):typeof global<`u`&&(global.Apex===void 0&&(global.Apex={}),global.SVG===void 0&&(global.SVG=Vr));var Hr=`__apexcharts_features_v1__`;globalThis[Hr]||(globalThis[Hr]=new Map);function Ur(){return globalThis[Hr]}var Wr=class e{static get _featureRegistry(){return Ur()}static registerFeatures(t){for(let[n,r]of Object.entries(t))e._featureRegistry.set(n,r)}constructor(e){this.ctx=e,this.w=e.w}initModules(){this.ctx.publicMethods=`updateOptions.updateSeries.appendData.appendSeries.isSeriesHidden.highlightSeries.toggleSeries.showSeries.hideSeries.setLocale.resetSeries.zoomX.toggleDataPointSelection.dataURI.exportToCSV.addXaxisAnnotation.addYaxisAnnotation.addPointAnnotation.clearAnnotations.removeAnnotation.drillDown.drillUp.drillToRoot.clearDrilldownCache.paper.getActiveRenderer.destroy`.split(`.`),this.ctx.eventList=[`click`,`mousedown`,`mousemove`,`mouseleave`,`touchstart`,`touchmove`,`touchleave`,`mouseup`,`touchend`,`keydown`,`keyup`],this.ctx.animations=new Xe(this.w,this.ctx),this.ctx.axes=new vt(this.w,this.ctx),this.ctx.core=new Yn(this.ctx.el,this.w,this.ctx),this.ctx.config=new z({}),this.ctx.data=new ur(this.w,{resetGlobals:()=>this.ctx.core.resetGlobals(),isMultipleY:()=>this.ctx.core.isMultipleY()}),this.ctx.grid=new dt(this.w,this.ctx),this.ctx.graphics=new H(this.w,this.ctx),this.ctx.coreUtils=new ue(this.w),this.ctx.crosshairs=new yt(this.w),this.ctx.events=new gt(this.w,this.ctx),this.ctx.fill=new $e(this.w),this.ctx.localization=new _t(this.w),this.ctx.options=new M,this.ctx.responsive=new xt(this.w),this.ctx.series=new cn(this.w,{toggleDataSeries:(...e)=>this.ctx.legend?.legendHelpers.toggleDataSeries(...e),revertDefaultAxisMinMax:()=>this.ctx.updateHelpers.revertDefaultAxisMinMax(),updateSeries:(...e)=>this.ctx.updateHelpers._updateSeries(...e)}),this.ctx.theme=new bn(this.w),this.ctx.formatters=new A(this.w),this.ctx.titleSubtitle=new xn(this.w),this.ctx.dimensions=new Dn(this.w,this.ctx),this.ctx.updateHelpers=new dr(this.w,this.ctx),this.ctx.rendererController=new Er(this.w,this.ctx),this.ctx.renderer=this.ctx.rendererController.active;let e=new Sr(this.w,this.ctx);this.w.globals.tooltip=e,Object.defineProperty(this.ctx,"tooltip",{get(){return this.w.globals.tooltip},configurable:!0}),this._initOptionalModules()}_initOptionalModules(){let t=e._featureRegistry,n=this.w,r=this.ctx,i=t.get(`exports`);r.exports=i?new i(n,r):null;let a=t.get(`legend`);r.legend=a?new a(n,r):null;let o=t.get(`morphTypeChange`);r.morphTypeChange=o?new o(n,r):null;let s=t.get(`drilldown`);r.drilldown=s?new s(n,r):null;let c=t.get(`perspectives`);r.perspectives=c?new c(n,r):null;let l=t.get(`storyboard`);r.storyboard=l?new l(n,r):null;let u=t.get(`history`);r.history=u?new u(n,r):null;let d=t.get(`linkedViews`);r.linkedViews=d?new d(n,r):null;let f=t.get(`ink`);r.ink=f?new f(n,r):null;let p=t.get(`measure`);r.measure=p?new p(n,r):null;let m=t.get(`contextMenu`);r.contextMenu=m?new m(n,r):null;let h=t.get(`weave`);r.weave=h?new h(n,r):null;let g=t.get(`waterfall`);r.waterfall=g?new g(n,r):null;let _=t.get(`streamgraph`);r.streamgraph=_?new _(n,r):null;let v=t.get(`trellis`);r.trellis=v?new v(n,r):null;let y=t.get(`osThemeWatcher`);r.osThemeWatcher=y?new y(n,r):null;let b=t.get(`toolbar`);Object.defineProperty(r,"toolbar",{get(){return!this._toolbar&&b&&(this._toolbar=new b(n,this)),this._toolbar??null},configurable:!0});let x=t.get(`zoomPanSelection`);Object.defineProperty(r,"zoomPanSelection",{get(){return!this._zoomPanSelection&&x&&(this._zoomPanSelection=new x(n,this)),this._zoomPanSelection??null},configurable:!0});let S=t.get(`keyboardNavigation`);Object.defineProperty(r,"keyboardNavigation",{get(){return!this._keyboardNavigation&&S&&(this._keyboardNavigation=new S(n,this)),this._keyboardNavigation??null},configurable:!0})}},Gr=class{constructor(e){this.ctx=e,this.w=e.w}clear({isUpdating:e}){var t,n,r,i,a,o,s,c,l,u,d,f,p;(t=this.ctx.weave)==null||t.teardown(e),e||(this.w.globals.isDestroyed=!0),this.ctx._zoomPanSelection&&this.ctx._zoomPanSelection.destroy(),this.ctx._toolbar&&this.ctx._toolbar.destroy(),this.w.globals.resizeObserver&&typeof this.w.globals.resizeObserver.disconnect==`function`&&(this.w.globals.resizeObserver.disconnect(),this.w.globals.resizeObserver=null),ct.invalidateAll(this.w),e?(this.ctx._zoomPanSelection=null,this.ctx._toolbar=null,(n=this.ctx._keyboardNavigation)==null||n.destroy(),this.ctx._keyboardNavigation=null):((r=this.ctx.perspectives)==null||r.teardown(),this.ctx.perspectives=null,(i=this.ctx.storyboard)==null||i.teardown(),this.ctx.storyboard=null,(a=this.ctx.history)==null||a.teardown(),this.ctx.history=null,(o=this.ctx.linkedViews)==null||o.teardown(),this.ctx.linkedViews=null,(s=this.ctx.trellis)==null||s.teardown(),this.ctx.trellis=null,(c=this.ctx.ink)==null||c.teardown(),this.ctx.ink=null,(l=this.ctx.measure)==null||l.teardown(),this.ctx.measure=null,(u=this.ctx.contextMenu)==null||u.teardown(),this.ctx.contextMenu=null,(d=this.ctx.osThemeWatcher)==null||d.teardown(),this.ctx.osThemeWatcher=null,this.ctx.weave=null,(p=(f=this.ctx.rendererController)?.teardown)==null||p.call(f),this.ctx.rendererController=null,this.ctx.renderer=null,this.ctx.drilldown=null,this.ctx.morphTypeChange=null,this.ctx.exports=null,this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx._zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx._toolbar=null,this.ctx.localization=null,this.ctx._keyboardNavigation=null,this.ctx.w.globals.tooltip=null),this.clearDomElements({isUpdating:e})}killSVG(e){e.each(function(){this.removeClass(`*`),this.off()},!0),e.clear()}clearDomElements({isUpdating:e}){let t=this.w.dom;if(v.isBrowser()&&t.Paper){let n=t.Paper.node;n.parentNode&&n.parentNode.parentNode&&!e&&(n.parentNode.parentNode.style.minHeight=`unset`);let r=t.baseEl;if(r&&this.ctx.eventList.forEach(e=>{r.removeEventListener(e,this.ctx.events.documentEvent)}),this.ctx.el!==null)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(t.Paper),t.Paper.remove()}t.Paper=null,t.elWrap=null,t.elGraphical=null,t.elLegendWrap=null,t.elLegendForeign=null,t.baseEl=null,t.elGridRect=null,t.elGridRectMask=null,t.elGridRectBarMask=null,t.elGridRectMarkerMask=null,t.elForecastMask=null,t.elNonForecastMask=null,t.elDefs=null}},Kr=`__apexcharts_unit_layouts__`;globalThis[Kr]||(globalThis[Kr]={});function qr(){return globalThis[Kr]}function Jr(e,t){if(!e||typeof e!=`string`){console.warn(`ApexCharts: registerUnitLayout requires a non-empty name.`);return}if(typeof t!=`function`){console.warn(`ApexCharts: registerUnitLayout("${e}") expects a function (objects, rect) => [{id, x, y}].`);return}qr()[e]=t}function Yr(e){delete qr()[e]}var Xr=`__apexcharts_unit_marks__`;globalThis[Xr]||(globalThis[Xr]={});function Zr(){return globalThis[Xr]}function Qr(e,t){if(typeof e==`string`){let n=e.trim();return n?Object.freeze({name:t||`anonymous`,path:n,viewBox:[0,0,100,100]}):null}if(!e||typeof e!=`object`||typeof e.path!=`string`||!e.path.trim())return null;let n=Array.isArray(e.viewBox)&&e.viewBox.length===4?e.viewBox.map(Number):[0,0,100,100];return!n.every(e=>isFinite(e))||n[2]<=0||n[3]<=0?null:Object.freeze(h(m({},e),{name:t||e.name||`anonymous`,path:e.path.trim(),viewBox:n,fillRule:e.fillRule===`evenodd`?`evenodd`:void 0}))}function $r(e,t){if(!e||typeof e!=`string`){console.warn(`ApexCharts: registerUnitMark requires a non-empty name.`);return}let n=Qr(t,e);if(!n){console.warn(`ApexCharts: registerUnitMark("${e}") expects path data, or {path, viewBox?, fillRule?}.`);return}Zr()[e]=n}function ei(e){delete Zr()[e]}var ti=`__apexcharts_row_sources__`;globalThis[ti]||(globalThis[ti]={});function ni(){return globalThis[ti]}function ri(e,t){if(!e||typeof e!=`string`){console.warn(`ApexCharts: registerRowSource requires a non-empty name.`);return}if(typeof t!=`function`){console.warn(`ApexCharts: registerRowSource("${e}") expects a function (w, opts) => series.`);return}ni()[e]=t}function ii(e){return e&&ni()[e]||null}function ai(e){delete ni()[e]}function oi(e){let t=e&&e.config&&e.config.chart;return t?ii(t.requestedType)||ii(t.type):null}var si=`__apexcharts_plugins__`;function ci(){let e=globalThis;return e[si]||(e[si]={}),e[si]}function li(e){if(!e||typeof e.name!=`string`||typeof e.setup!=`function`){console.error(`[apexcharts] registerPlugin: a plugin needs a { name, setup } shape.`);return}ci()[e.name]=e}function ui(e){delete ci()[e]}var di=new WeakMap;function fi(e,t){if(v.isSSR())return;let n=!1;if(e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){let t=e.getBoundingClientRect();(e.style.display===`none`||t.width===0)&&(n=!0)}let r=new ResizeObserver(r=>{n&&t.call(e,r),n=!0});e.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(e.children).forEach(e=>r.observe(e)):r.observe(e),di.set(t,r)}function pi(e,t){if(v.isSSR())return;let n=di.get(t);n&&(n.disconnect(),di.delete(t))}var mi=`@keyframes opaque {
|
|
32
|
-
0% {
|
|
33
|
-
opacity: 0
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
to {
|
|
37
|
-
opacity: 1
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@keyframes resizeanim {
|
|
42
|
-
|
|
43
|
-
0%,
|
|
44
|
-
to {
|
|
45
|
-
opacity: 0
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.apexcharts-canvas {
|
|
50
|
-
position: relative;
|
|
51
|
-
direction: ltr !important;
|
|
52
|
-
user-select: none;
|
|
53
|
-
/* Focus indicator colour. Themes override below. */
|
|
54
|
-
--apexcharts-focus-color: #008FFB;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/* Dark theme & high-contrast: brighter focus colour for sufficient contrast. */
|
|
58
|
-
.apexcharts-canvas .apexcharts-theme-dark,
|
|
59
|
-
.apexcharts-theme-dark.apexcharts-canvas {
|
|
60
|
-
--apexcharts-focus-color: #FFD500;
|
|
61
|
-
}
|
|
62
|
-
.apexcharts-canvas.apexcharts-high-contrast,
|
|
63
|
-
.apexcharts-high-contrast.apexcharts-canvas {
|
|
64
|
-
--apexcharts-focus-color: #FFFF00;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/* Visually-hidden aria-live status region (WCAG 4.1.3 Status Messages). */
|
|
68
|
-
.apexcharts-sr-status {
|
|
69
|
-
position: absolute;
|
|
70
|
-
width: 1px;
|
|
71
|
-
height: 1px;
|
|
72
|
-
padding: 0;
|
|
73
|
-
margin: -1px;
|
|
74
|
-
overflow: hidden;
|
|
75
|
-
clip: rect(0, 0, 0, 0);
|
|
76
|
-
white-space: nowrap;
|
|
77
|
-
border: 0;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/* Respect OS-level reduced-motion preference (WCAG 2.3.3). */
|
|
81
|
-
@media (prefers-reduced-motion: reduce) {
|
|
82
|
-
.apexcharts-canvas *,
|
|
83
|
-
.apexcharts-canvas *::before,
|
|
84
|
-
.apexcharts-canvas *::after {
|
|
85
|
-
animation-duration: 0.01ms !important;
|
|
86
|
-
animation-iteration-count: 1 !important;
|
|
87
|
-
transition-duration: 0.01ms !important;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.apexcharts-canvas ::-webkit-scrollbar {
|
|
92
|
-
-webkit-appearance: none;
|
|
93
|
-
width: 6px
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.apexcharts-canvas ::-webkit-scrollbar-thumb {
|
|
97
|
-
border-radius: 4px;
|
|
98
|
-
background-color: rgba(0, 0, 0, .5);
|
|
99
|
-
box-shadow: 0 0 1px rgba(255, 255, 255, .5);
|
|
100
|
-
-webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5)
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.apexcharts-inner {
|
|
104
|
-
position: relative
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.apexcharts-text tspan {
|
|
108
|
-
font-family: inherit
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
rect.legend-mouseover-inactive,
|
|
112
|
-
.legend-mouseover-inactive rect,
|
|
113
|
-
.legend-mouseover-inactive path,
|
|
114
|
-
.legend-mouseover-inactive circle,
|
|
115
|
-
.legend-mouseover-inactive line,
|
|
116
|
-
.legend-mouseover-inactive text.apexcharts-yaxis-title-text,
|
|
117
|
-
.legend-mouseover-inactive text.apexcharts-yaxis-label {
|
|
118
|
-
transition: .15s ease all;
|
|
119
|
-
opacity: .2
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/* Linked Views (#4): per-mark crossfilter dim. Applied to individual data
|
|
123
|
-
marks (not whole series) whose x is outside the brushed range. Opacity is
|
|
124
|
-
overridable per chart via the --apx-cf-dim custom property. */
|
|
125
|
-
.apexcharts-crossfilter-dimmed {
|
|
126
|
-
transition: opacity .25s ease;
|
|
127
|
-
opacity: var(--apx-cf-dim, .2)
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/* Linked Views (#4): default styling for the built-in crossfilter data table
|
|
131
|
-
(cf.dataTable). Deliberately light so host styles can override. */
|
|
132
|
-
.apexcharts-cf-table {
|
|
133
|
-
border-collapse: collapse;
|
|
134
|
-
width: 100%;
|
|
135
|
-
font-size: 13px;
|
|
136
|
-
}
|
|
137
|
-
.apexcharts-cf-table caption {
|
|
138
|
-
caption-side: bottom;
|
|
139
|
-
text-align: right;
|
|
140
|
-
padding: 6px 2px;
|
|
141
|
-
font-size: 12px;
|
|
142
|
-
opacity: .7
|
|
143
|
-
}
|
|
144
|
-
.apexcharts-cf-table th,
|
|
145
|
-
.apexcharts-cf-table td {
|
|
146
|
-
padding: 6px 10px;
|
|
147
|
-
text-align: left;
|
|
148
|
-
border-bottom: 1px solid rgba(0, 0, 0, .08)
|
|
149
|
-
}
|
|
150
|
-
.apexcharts-cf-table th {
|
|
151
|
-
font-weight: 600;
|
|
152
|
-
border-bottom-width: 2px
|
|
153
|
-
}
|
|
154
|
-
.apexcharts-cf-table tbody tr:hover {
|
|
155
|
-
background: rgba(99, 102, 241, .06)
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/* Measure ruler (#18): measure / delta ruler.
|
|
159
|
-
Theme via these classes or the --apx-measure-* custom properties below
|
|
160
|
-
(config \`chart.measure.colors\` overrides both). The ruler group also carries
|
|
161
|
-
a direction class: apexcharts-measure-up | -down | -flat.
|
|
162
|
-
Element classes:
|
|
163
|
-
.apexcharts-measure-band shaded span band
|
|
164
|
-
.apexcharts-measure-vline vertical guide lines
|
|
165
|
-
.apexcharts-measure-line free-mode diagonal line
|
|
166
|
-
.apexcharts-measure-label-bg readout box .apexcharts-measure-label text
|
|
167
|
-
Colors are applied as SVG presentation attributes, so any rule you write on
|
|
168
|
-
these classes overrides them. */
|
|
169
|
-
.apexcharts-canvas {
|
|
170
|
-
--apx-measure-up: #16a34a;
|
|
171
|
-
--apx-measure-down: #dc2626;
|
|
172
|
-
--apx-measure-neutral: #64748b;
|
|
173
|
-
--apx-measure-guide: #94a3b8;
|
|
174
|
-
}
|
|
175
|
-
.apexcharts-measure-capture {
|
|
176
|
-
cursor: crosshair;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
/* Radial Actions (#chrome): right-click context menu. Theme via these classes
|
|
180
|
-
or the --apx-menu-* custom properties. */
|
|
181
|
-
.apexcharts-canvas {
|
|
182
|
-
--apx-menu-bg: #ffffff;
|
|
183
|
-
--apx-menu-fg: #1e293b;
|
|
184
|
-
--apx-menu-border: #e2e8f0;
|
|
185
|
-
--apx-menu-hover: #f1f5f9;
|
|
186
|
-
--apx-menu-shadow: rgba(15, 23, 42, 0.18);
|
|
187
|
-
}
|
|
188
|
-
.apexcharts-context-menu {
|
|
189
|
-
min-width: 168px;
|
|
190
|
-
padding: 4px;
|
|
191
|
-
border-radius: 8px;
|
|
192
|
-
background: var(--apx-menu-bg);
|
|
193
|
-
border: 1px solid var(--apx-menu-border);
|
|
194
|
-
box-shadow: 0 6px 22px var(--apx-menu-shadow);
|
|
195
|
-
font-family: Helvetica, Arial, sans-serif;
|
|
196
|
-
font-size: 13px;
|
|
197
|
-
z-index: 20;
|
|
198
|
-
user-select: none;
|
|
199
|
-
}
|
|
200
|
-
.apexcharts-context-menu-item {
|
|
201
|
-
display: block;
|
|
202
|
-
width: 100%;
|
|
203
|
-
box-sizing: border-box;
|
|
204
|
-
text-align: left;
|
|
205
|
-
padding: 7px 12px;
|
|
206
|
-
border: 0;
|
|
207
|
-
border-radius: 5px;
|
|
208
|
-
background: transparent;
|
|
209
|
-
color: var(--apx-menu-fg);
|
|
210
|
-
font: inherit;
|
|
211
|
-
cursor: pointer;
|
|
212
|
-
}
|
|
213
|
-
.apexcharts-context-menu-item:hover,
|
|
214
|
-
.apexcharts-context-menu-item--active {
|
|
215
|
-
background: var(--apx-menu-hover);
|
|
216
|
-
}
|
|
217
|
-
.apexcharts-context-menu-item:focus {
|
|
218
|
-
outline: none;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/* Ink Layer (#7): the floating note editor card, opened by clicking an
|
|
222
|
-
ink-managed annotation. Theme via these classes or the --apx-ink-* vars. */
|
|
223
|
-
.apexcharts-canvas {
|
|
224
|
-
--apx-ink-card-bg: #ffffff;
|
|
225
|
-
--apx-ink-card-fg: #1e293b;
|
|
226
|
-
--apx-ink-card-border: #e2e8f0;
|
|
227
|
-
--apx-ink-card-hover: #f1f5f9;
|
|
228
|
-
--apx-ink-card-accent: #6366f1;
|
|
229
|
-
--apx-ink-card-shadow: rgba(15, 23, 42, 0.18);
|
|
230
|
-
}
|
|
231
|
-
.apexcharts-ink-card {
|
|
232
|
-
position: absolute;
|
|
233
|
-
z-index: 25;
|
|
234
|
-
display: flex;
|
|
235
|
-
flex-direction: column;
|
|
236
|
-
gap: 6px;
|
|
237
|
-
padding: 8px;
|
|
238
|
-
border-radius: 8px;
|
|
239
|
-
background: var(--apx-ink-card-bg);
|
|
240
|
-
border: 1px solid var(--apx-ink-card-border);
|
|
241
|
-
box-shadow: 0 6px 22px var(--apx-ink-card-shadow);
|
|
242
|
-
font-family: Helvetica, Arial, sans-serif;
|
|
243
|
-
font-size: 12px;
|
|
244
|
-
color: var(--apx-ink-card-fg);
|
|
245
|
-
user-select: none;
|
|
246
|
-
}
|
|
247
|
-
.apexcharts-ink-card-row {
|
|
248
|
-
display: flex;
|
|
249
|
-
align-items: center;
|
|
250
|
-
gap: 4px;
|
|
251
|
-
}
|
|
252
|
-
.apexcharts-ink-card input.apexcharts-ink-editor {
|
|
253
|
-
flex: 1 1 auto;
|
|
254
|
-
width: 150px;
|
|
255
|
-
min-width: 0;
|
|
256
|
-
box-sizing: border-box;
|
|
257
|
-
padding: 4px 6px;
|
|
258
|
-
font: inherit;
|
|
259
|
-
color: inherit;
|
|
260
|
-
background: transparent;
|
|
261
|
-
border: 1px solid var(--apx-ink-card-border);
|
|
262
|
-
border-radius: 5px;
|
|
263
|
-
}
|
|
264
|
-
.apexcharts-ink-card input.apexcharts-ink-editor:focus {
|
|
265
|
-
outline: none;
|
|
266
|
-
border-color: var(--apx-ink-card-accent);
|
|
267
|
-
}
|
|
268
|
-
.apexcharts-ink-btn {
|
|
269
|
-
flex: 0 0 auto;
|
|
270
|
-
width: 24px;
|
|
271
|
-
height: 24px;
|
|
272
|
-
display: inline-flex;
|
|
273
|
-
align-items: center;
|
|
274
|
-
justify-content: center;
|
|
275
|
-
padding: 0;
|
|
276
|
-
border: 0;
|
|
277
|
-
border-radius: 5px;
|
|
278
|
-
background: transparent;
|
|
279
|
-
color: inherit;
|
|
280
|
-
font: inherit;
|
|
281
|
-
font-size: 12px;
|
|
282
|
-
line-height: 1;
|
|
283
|
-
cursor: pointer;
|
|
284
|
-
}
|
|
285
|
-
.apexcharts-ink-btn:hover,
|
|
286
|
-
.apexcharts-ink-btn--active {
|
|
287
|
-
background: var(--apx-ink-card-hover);
|
|
288
|
-
}
|
|
289
|
-
.apexcharts-ink-btn:focus-visible,
|
|
290
|
-
.apexcharts-ink-swatch:focus-visible {
|
|
291
|
-
outline: 2px solid var(--apx-ink-card-accent);
|
|
292
|
-
outline-offset: 1px;
|
|
293
|
-
}
|
|
294
|
-
.apexcharts-ink-btn--bold {
|
|
295
|
-
font-weight: 700;
|
|
296
|
-
}
|
|
297
|
-
.apexcharts-ink-btn--delete:hover {
|
|
298
|
-
color: #dc2626;
|
|
299
|
-
}
|
|
300
|
-
.apexcharts-ink-swatch {
|
|
301
|
-
flex: 0 0 auto;
|
|
302
|
-
width: 16px;
|
|
303
|
-
height: 16px;
|
|
304
|
-
padding: 0;
|
|
305
|
-
border: 1px solid rgba(100, 116, 139, 0.45);
|
|
306
|
-
border-radius: 50%;
|
|
307
|
-
cursor: pointer;
|
|
308
|
-
}
|
|
309
|
-
.apexcharts-ink-swatch--active {
|
|
310
|
-
box-shadow:
|
|
311
|
-
0 0 0 2px var(--apx-ink-card-bg),
|
|
312
|
-
0 0 0 4px var(--apx-ink-card-accent);
|
|
313
|
-
}
|
|
314
|
-
.apexcharts-ink-sep {
|
|
315
|
-
flex: 0 0 auto;
|
|
316
|
-
width: 1px;
|
|
317
|
-
height: 16px;
|
|
318
|
-
margin: 0 2px;
|
|
319
|
-
background: var(--apx-ink-card-border);
|
|
320
|
-
}
|
|
321
|
-
.apexcharts-ink-cardlabel {
|
|
322
|
-
flex: 0 0 auto;
|
|
323
|
-
font-size: 10px;
|
|
324
|
-
letter-spacing: 0.4px;
|
|
325
|
-
text-transform: uppercase;
|
|
326
|
-
opacity: 0.65;
|
|
327
|
-
margin-right: 2px;
|
|
328
|
-
}
|
|
329
|
-
.apexcharts-ink-marker-size {
|
|
330
|
-
flex: 0 0 auto;
|
|
331
|
-
min-width: 16px;
|
|
332
|
-
text-align: center;
|
|
333
|
-
font-variant-numeric: tabular-nums;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
.apexcharts-legend-text {
|
|
337
|
-
padding-left: 15px;
|
|
338
|
-
margin-left: -15px;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
.apexcharts-legend-series[role="button"]:focus {
|
|
342
|
-
outline: 2px solid var(--apexcharts-focus-color, #008FFB);
|
|
343
|
-
outline-offset: 2px;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
.apexcharts-legend-series[role="button"]:focus:not(:focus-visible) {
|
|
347
|
-
outline: none;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
.apexcharts-legend-series[role="button"]:focus-visible {
|
|
351
|
-
outline: 2px solid var(--apexcharts-focus-color, #008FFB);
|
|
352
|
-
outline-offset: 2px;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
.apexcharts-series-collapsed {
|
|
356
|
-
opacity: 0
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
/* A series still playing its exit tween stays painted so it can visibly shrink
|
|
360
|
-
away, hiding it on the first frame leaves a hole in a stacked chart for the
|
|
361
|
-
length of the animation. Dropped once the tween lands. */
|
|
362
|
-
.apexcharts-series-collapsed.apexcharts-series-collapsing {
|
|
363
|
-
opacity: 1
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
/* Its labels ride the shrinking marks, but a mark runs out of room for its text
|
|
367
|
-
well before it reaches zero, so fade them across the exit instead of holding
|
|
368
|
-
them crisp over a sliver. Duration is set inline from dynamicAnimation.speed. */
|
|
369
|
-
.apexcharts-datalabels.apexcharts-series-collapsing {
|
|
370
|
-
animation: apexcharts-datalabels-exit var(--apexcharts-dl-exit, 400ms) ease-in
|
|
371
|
-
forwards;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
@keyframes apexcharts-datalabels-exit {
|
|
375
|
-
from {
|
|
376
|
-
opacity: 1
|
|
377
|
-
}
|
|
378
|
-
to {
|
|
379
|
-
opacity: 0
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
.apexcharts-canvas svg:focus:not(:focus-visible) {
|
|
384
|
-
outline: none;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
/* Keyboard navigation focus indicator on SVG data elements.
|
|
388
|
-
SVG elements don't support CSS outline, so we use stroke. */
|
|
389
|
-
.apexcharts-bar-area.apexcharts-keyboard-focused,
|
|
390
|
-
.apexcharts-candlestick-area.apexcharts-keyboard-focused,
|
|
391
|
-
.apexcharts-boxPlot-area.apexcharts-keyboard-focused,
|
|
392
|
-
.apexcharts-rangebar-area.apexcharts-keyboard-focused,
|
|
393
|
-
.apexcharts-pie-area.apexcharts-keyboard-focused,
|
|
394
|
-
.apexcharts-heatmap-rect.apexcharts-keyboard-focused,
|
|
395
|
-
.apexcharts-treemap-rect.apexcharts-keyboard-focused {
|
|
396
|
-
stroke: var(--apexcharts-focus-color, #008FFB);
|
|
397
|
-
stroke-width: 2;
|
|
398
|
-
stroke-opacity: 1;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
.apexcharts-tooltip {
|
|
402
|
-
--apx-tt-bg: #ffffff;
|
|
403
|
-
/* Shared by the body and the arrow's two outward facets, so the
|
|
404
|
-
* hairline reads as one continuous outline around the whole shape.
|
|
405
|
-
* Keep it strong enough to survive on its own: the shadow below is
|
|
406
|
-
* elevation, not edge definition. */
|
|
407
|
-
--apx-tt-border: rgba(15, 23, 42, 0.12);
|
|
408
|
-
/* Elevation, in three layers: a tight contact shadow that anchors the
|
|
409
|
-
* bottom edge, a directional key shadow for the lift, and a wide
|
|
410
|
-
* ambient one that grounds the whole box. Each is weaker and more
|
|
411
|
-
* diffuse than the last.
|
|
412
|
-
*
|
|
413
|
-
* A tooltip is unusual in that it floats over *data*, so reach costs
|
|
414
|
-
* more than it does on a page: every pixel the shadow travels tints a
|
|
415
|
-
* bar or a line the reader is trying to compare. These numbers are
|
|
416
|
-
* tuned to keep the near-edge contrast that reads as elevation while
|
|
417
|
-
* dropping the long low haze that only muddies the plot.
|
|
418
|
-
*
|
|
419
|
-
* Note there is deliberately no \`0 0 0 1px\` ring layer. That used to
|
|
420
|
-
* stand in for edge definition back when --apx-tt-border was barely
|
|
421
|
-
* visible; now that the border is a real hairline (and the arrow
|
|
422
|
-
* shares it) a ring only double-draws the outline, and being spread
|
|
423
|
-
* rather than offset it leaked ink upward too, flattening the lift.
|
|
424
|
-
*
|
|
425
|
-
* \`--apx-tt-shadow-dir\` flips the whole stack's Y in one place — see
|
|
426
|
-
* the \`[data-placement="bottom"]\` rule further down. */
|
|
427
|
-
--apx-tt-shadow-dir: 1;
|
|
428
|
-
--apx-tt-shadow: 0 calc(var(--apx-tt-shadow-dir) * 1px) 2px rgba(15, 23, 42, 0.06), 0 calc(var(--apx-tt-shadow-dir) * 4px) 8px -2px rgba(15, 23, 42, 0.10), 0 calc(var(--apx-tt-shadow-dir) * 12px) 20px -8px rgba(15, 23, 42, 0.14);
|
|
429
|
-
--apx-tt-arrow-bg: var(--apx-tt-bg);
|
|
430
|
-
--apx-tt-color: #0f172a;
|
|
431
|
-
--apx-tt-color-muted: rgba(15, 23, 42, 0.55);
|
|
432
|
-
border-radius: 8px;
|
|
433
|
-
background: var(--apx-tt-bg);
|
|
434
|
-
border: 1px solid var(--apx-tt-border);
|
|
435
|
-
box-shadow: var(--apx-tt-shadow);
|
|
436
|
-
color: var(--apx-tt-color);
|
|
437
|
-
cursor: default;
|
|
438
|
-
font-size: 13px;
|
|
439
|
-
left: 0;
|
|
440
|
-
top: 0;
|
|
441
|
-
opacity: 0;
|
|
442
|
-
pointer-events: none;
|
|
443
|
-
position: absolute;
|
|
444
|
-
display: flex;
|
|
445
|
-
flex-direction: column;
|
|
446
|
-
padding: 2px 0;
|
|
447
|
-
white-space: nowrap;
|
|
448
|
-
z-index: 12;
|
|
449
|
-
transition: opacity .12s ease
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
/* While the tooltip is visible, smoothly animate position changes
|
|
453
|
-
* between data points. Kept short (160 ms) and ease-out so it stays
|
|
454
|
-
* responsive — too long would feel laggy when sweeping across many
|
|
455
|
-
* points fast. The position transition is only attached after the
|
|
456
|
-
* first paint (Position.applyTooltipPosition flips \`data-positioned\`
|
|
457
|
-
* once the tooltip has been placed) so the *first* show doesn't slide
|
|
458
|
-
* the tooltip in from the previously-stale (0,0) coordinates. */
|
|
459
|
-
.apexcharts-tooltip.apexcharts-active {
|
|
460
|
-
opacity: 1;
|
|
461
|
-
transition: opacity .12s ease
|
|
462
|
-
}
|
|
463
|
-
.apexcharts-tooltip.apexcharts-active[data-positioned="true"] {
|
|
464
|
-
transition: opacity .12s ease, left .16s ease-out, top .16s ease-out
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
.apexcharts-tooltip.apexcharts-theme-light {
|
|
468
|
-
/* defaults already set above; class kept for backward-compat selectors */
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
.apexcharts-tooltip.apexcharts-theme-dark {
|
|
472
|
-
--apx-tt-bg: #1c1c1f;
|
|
473
|
-
--apx-tt-border: rgba(255, 255, 255, 0.16);
|
|
474
|
-
/* Dark needs more alpha than light to register at all, but not as much
|
|
475
|
-
* as it used to: the light rim above now carries the edge, so the
|
|
476
|
-
* shadow is free to be pure elevation instead of doubling as an
|
|
477
|
-
* outline. Same geometry as light, heavier ink. */
|
|
478
|
-
--apx-tt-shadow: 0 calc(var(--apx-tt-shadow-dir) * 1px) 2px rgba(0, 0, 0, 0.24), 0 calc(var(--apx-tt-shadow-dir) * 4px) 8px -2px rgba(0, 0, 0, 0.30), 0 calc(var(--apx-tt-shadow-dir) * 12px) 20px -8px rgba(0, 0, 0, 0.38);
|
|
479
|
-
--apx-tt-color: #f3f4f6;
|
|
480
|
-
--apx-tt-color-muted: rgba(243, 244, 246, 0.55);
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
.apexcharts-tooltip * {
|
|
484
|
-
font-family: inherit
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
/* Point-annotation hover tooltip (apexcharts/apexcharts.js#2424). Reuses the
|
|
488
|
-
* glass body/border/shadow from \`.apexcharts-tooltip\` but holds free-form
|
|
489
|
-
* content, so it needs its own padding, wrapping and a sane max width. */
|
|
490
|
-
.apexcharts-tooltip.apexcharts-annotation-tooltip {
|
|
491
|
-
padding: 6px 10px;
|
|
492
|
-
max-width: 240px;
|
|
493
|
-
white-space: normal;
|
|
494
|
-
line-height: 1.4;
|
|
495
|
-
pointer-events: none;
|
|
496
|
-
z-index: 13
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
.apexcharts-tooltip-title {
|
|
500
|
-
padding: 8px 12px 4px;
|
|
501
|
-
font-size: 12px;
|
|
502
|
-
font-weight: 600;
|
|
503
|
-
letter-spacing: 0.01em;
|
|
504
|
-
color: var(--apx-tt-color-muted);
|
|
505
|
-
background: transparent;
|
|
506
|
-
border-bottom: none;
|
|
507
|
-
margin-bottom: 0
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title,
|
|
511
|
-
.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {
|
|
512
|
-
background: transparent;
|
|
513
|
-
border-bottom: none
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
/* \`fillSeriesColor\`: each series-group already paints itself with the
|
|
517
|
-
* series colour. Drop the glass body entirely (transparent bg, no
|
|
518
|
-
* border, no backdrop-filter, no padding) and clip the coloured
|
|
519
|
-
* series-group(s) to the tooltip's rounded corners so they fill the
|
|
520
|
-
* shell edge-to-edge. Text inside the coloured group is forced to
|
|
521
|
-
* white for contrast. */
|
|
522
|
-
.apexcharts-tooltip.apexcharts-tooltip-fill-series {
|
|
523
|
-
background: transparent;
|
|
524
|
-
-webkit-backdrop-filter: none;
|
|
525
|
-
backdrop-filter: none;
|
|
526
|
-
border: none;
|
|
527
|
-
padding: 0;
|
|
528
|
-
overflow: hidden;
|
|
529
|
-
color: #fff
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-title {
|
|
533
|
-
background: rgba(0, 0, 0, 0.22);
|
|
534
|
-
color: #fff;
|
|
535
|
-
opacity: 1;
|
|
536
|
-
padding: 6px 12px
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-series-group {
|
|
540
|
-
color: #fff
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
/* Arrow connector — a 45°-rotated square straddling the body's edge, so
|
|
544
|
-
* the body's 1px border runs continuously out across the arrow and back.
|
|
545
|
-
* The two facets that face away from the tooltip carry the border; the
|
|
546
|
-
* two that face into it carry none, and the square's opaque fill covers
|
|
547
|
-
* the segment of the body's own border it sits on, hiding the seam.
|
|
548
|
-
*
|
|
549
|
-
* This is why it's a rotated square and not a triangle: \`clip-path\`
|
|
550
|
-
* erases \`border\` and \`box-shadow\` along with everything outside the
|
|
551
|
-
* polygon, which left \`filter: drop-shadow\` as the only way to suggest
|
|
552
|
-
* an edge — and a drop-shadow can only ever blur one, never draw a
|
|
553
|
-
* hairline. Nothing here needs a filter.
|
|
554
|
-
*
|
|
555
|
-
* Geometry: a square of side S rotated 45° reaches S/√2 from its centre
|
|
556
|
-
* to each corner, so S = 10px gives the ~7px tip overhang that
|
|
557
|
-
* ARROW_TIP_OVERHANG assumes (tooltip/constants.js) over a ~14px base.
|
|
558
|
-
* The offsets park the square's *centre* 1px outside the padding box
|
|
559
|
-
* (-6px = -1px border - 10px/2), i.e. exactly on the body's border line,
|
|
560
|
-
* so the two borders meet end to end instead of overlapping or gapping.
|
|
561
|
-
* \`box-sizing\` must be border-box or the bordered sides would grow the
|
|
562
|
-
* square asymmetrically and knock its centre off that line. */
|
|
563
|
-
.apexcharts-tooltip-arrow {
|
|
564
|
-
position: absolute;
|
|
565
|
-
box-sizing: border-box;
|
|
566
|
-
width: 10px;
|
|
567
|
-
height: 10px;
|
|
568
|
-
background: var(--apx-tt-arrow-bg);
|
|
569
|
-
transform: rotate(45deg);
|
|
570
|
-
pointer-events: none;
|
|
571
|
-
top: calc(var(--apx-tt-arrow-y, 50%) - 5px)
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
/* Which two sides face outward depends on the placement. Under
|
|
575
|
-
* \`rotate(45deg)\` the square's bottom-left corner swings to the left,
|
|
576
|
-
* top-right to the right, top-left to the top and bottom-right to the
|
|
577
|
-
* bottom — so the pair of borders below is always the two sharing the
|
|
578
|
-
* corner that ends up as the tip. */
|
|
579
|
-
.apexcharts-tooltip[data-placement="right"] .apexcharts-tooltip-arrow {
|
|
580
|
-
left: -6px;
|
|
581
|
-
border-left: 1px solid var(--apx-tt-border);
|
|
582
|
-
border-bottom: 1px solid var(--apx-tt-border)
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
.apexcharts-tooltip[data-placement="left"] .apexcharts-tooltip-arrow {
|
|
586
|
-
right: -6px;
|
|
587
|
-
border-top: 1px solid var(--apx-tt-border);
|
|
588
|
-
border-right: 1px solid var(--apx-tt-border)
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
/* Vertical arrow variants: tooltip is above/below the data point and the
|
|
592
|
-
* arrow points down/up. The base rule above uses \`--apx-tt-arrow-y\` for
|
|
593
|
-
* left/right placement; for top/bottom we centre on \`--apx-tt-arrow-x\`
|
|
594
|
-
* instead (set by applyTooltipPosition). */
|
|
595
|
-
.apexcharts-tooltip[data-placement="top"] .apexcharts-tooltip-arrow,
|
|
596
|
-
.apexcharts-tooltip[data-placement="bottom"] .apexcharts-tooltip-arrow {
|
|
597
|
-
top: auto;
|
|
598
|
-
left: calc(var(--apx-tt-arrow-x, 50%) - 5px)
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
.apexcharts-tooltip[data-placement="top"] .apexcharts-tooltip-arrow {
|
|
602
|
-
bottom: -6px;
|
|
603
|
-
border-right: 1px solid var(--apx-tt-border);
|
|
604
|
-
border-bottom: 1px solid var(--apx-tt-border)
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
.apexcharts-tooltip[data-placement="bottom"] .apexcharts-tooltip-arrow {
|
|
608
|
-
top: -6px;
|
|
609
|
-
border-top: 1px solid var(--apx-tt-border);
|
|
610
|
-
border-left: 1px solid var(--apx-tt-border)
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
/* When the tooltip is flipped below the data point, the default
|
|
614
|
-
* downward-biased shadow leaves its top edge undefined. Negating the
|
|
615
|
-
* direction casts the whole elevation upward instead, so the shadow
|
|
616
|
-
* falls between the tooltip and the mark above it. One multiplier flips
|
|
617
|
-
* all three layers together; the arrow needs no counterpart, since its
|
|
618
|
-
* border doesn't depend on light direction. */
|
|
619
|
-
.apexcharts-tooltip[data-placement="bottom"] {
|
|
620
|
-
--apx-tt-shadow-dir: -1
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
.apexcharts-tooltip-text-goals-value,
|
|
624
|
-
.apexcharts-tooltip-text-y-value,
|
|
625
|
-
.apexcharts-tooltip-text-z-value {
|
|
626
|
-
display: inline-block;
|
|
627
|
-
margin-left: 5px;
|
|
628
|
-
font-weight: 600
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
.apexcharts-tooltip-text-goals-label:empty,
|
|
632
|
-
.apexcharts-tooltip-text-goals-value:empty,
|
|
633
|
-
.apexcharts-tooltip-text-y-label:empty,
|
|
634
|
-
.apexcharts-tooltip-text-y-value:empty,
|
|
635
|
-
.apexcharts-tooltip-text-z-value:empty,
|
|
636
|
-
.apexcharts-tooltip-title:empty {
|
|
637
|
-
display: none
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
.apexcharts-tooltip-text-goals-label,
|
|
641
|
-
.apexcharts-tooltip-text-goals-value {
|
|
642
|
-
padding: 6px 0 5px
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
.apexcharts-tooltip-goals-group,
|
|
646
|
-
.apexcharts-tooltip-text-goals-label,
|
|
647
|
-
.apexcharts-tooltip-text-goals-value {
|
|
648
|
-
display: flex
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
.apexcharts-tooltip-text-goals-label:not(:empty),
|
|
652
|
-
.apexcharts-tooltip-text-goals-value:not(:empty) {
|
|
653
|
-
margin-top: -6px
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
.apexcharts-tooltip-marker {
|
|
657
|
-
display: inline-flex;
|
|
658
|
-
align-items: center;
|
|
659
|
-
justify-content: center;
|
|
660
|
-
position: relative;
|
|
661
|
-
width: 12px;
|
|
662
|
-
height: 12px;
|
|
663
|
-
margin-right: 6px;
|
|
664
|
-
vertical-align: middle;
|
|
665
|
-
color: inherit;
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
.apexcharts-tooltip-marker svg {
|
|
669
|
-
width: 100%;
|
|
670
|
-
height: 100%;
|
|
671
|
-
display: block;
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
.apexcharts-tooltip-series-group {
|
|
675
|
-
padding: 4px 12px;
|
|
676
|
-
display: none;
|
|
677
|
-
gap: 8px;
|
|
678
|
-
text-align: left;
|
|
679
|
-
justify-content: left;
|
|
680
|
-
align-items: center
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {
|
|
684
|
-
opacity: 1
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
.apexcharts-tooltip-series-group.apexcharts-active:last-child,
|
|
688
|
-
.apexcharts-tooltip-series-group:last-child {
|
|
689
|
-
padding-bottom: 8px
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
.apexcharts-tooltip-y-group {
|
|
693
|
-
padding: 6px 0 5px
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
/* \`tooltip.compact\`: a tight box instead of a card, for panels a normal card
|
|
697
|
-
would cover (small multiples, sparklines, tiles). Only the box shrinks, so
|
|
698
|
-
the arrow and every anchor rule still apply. Rows stay stacked when there
|
|
699
|
-
are several series (the names are what tells them apart); a one-series
|
|
700
|
-
chart collapses to a single line, see \`-value-only\` below. */
|
|
701
|
-
.apexcharts-tooltip.apexcharts-tooltip-compact {
|
|
702
|
-
padding: 3px 8px;
|
|
703
|
-
font-size: 11px;
|
|
704
|
-
line-height: 1.35
|
|
705
|
-
}
|
|
706
|
-
|
|
707
|
-
.apexcharts-tooltip-compact .apexcharts-tooltip-title {
|
|
708
|
-
padding: 0;
|
|
709
|
-
font-size: 11px;
|
|
710
|
-
white-space: nowrap
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
.apexcharts-tooltip-compact .apexcharts-tooltip-series-group,
|
|
714
|
-
.apexcharts-tooltip-compact .apexcharts-tooltip-series-group.apexcharts-active:last-child,
|
|
715
|
-
.apexcharts-tooltip-compact .apexcharts-tooltip-series-group:last-child {
|
|
716
|
-
padding: 0;
|
|
717
|
-
gap: 5px
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
.apexcharts-tooltip-compact .apexcharts-tooltip-y-group {
|
|
721
|
-
padding: 0
|
|
722
|
-
}
|
|
723
|
-
|
|
724
|
-
.apexcharts-tooltip-compact .apexcharts-tooltip-marker {
|
|
725
|
-
width: 8px;
|
|
726
|
-
height: 8px
|
|
727
|
-
}
|
|
728
|
-
|
|
729
|
-
/* A one-series panel: the series name repeats what the panel header already
|
|
730
|
-
says, so the value stands alone and the x label becomes its prefix on one
|
|
731
|
-
line ("Aug 2024 6.59"). */
|
|
732
|
-
.apexcharts-tooltip.apexcharts-tooltip-compact.apexcharts-tooltip-value-only {
|
|
733
|
-
/* The tooltip body is a flex COLUMN by default (title row, then series
|
|
734
|
-
rows); one series needs no column, so the same box turns into one line. */
|
|
735
|
-
flex-direction: row;
|
|
736
|
-
align-items: baseline;
|
|
737
|
-
gap: 6px
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
.apexcharts-tooltip-value-only .apexcharts-tooltip-marker {
|
|
741
|
-
display: none
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
.apexcharts-tooltip-value-only .apexcharts-tooltip-text-y-label {
|
|
745
|
-
display: none
|
|
746
|
-
}
|
|
747
|
-
|
|
748
|
-
.apexcharts-custom-tooltip,
|
|
749
|
-
.apexcharts-tooltip-box {
|
|
750
|
-
padding: 4px 8px
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
.apexcharts-tooltip-boxPlot {
|
|
754
|
-
display: flex;
|
|
755
|
-
flex-direction: column-reverse
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
.apexcharts-tooltip-box>div {
|
|
759
|
-
margin: 4px 0
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
.apexcharts-tooltip-box span.value {
|
|
763
|
-
font-weight: 700
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
.apexcharts-tooltip-rangebar {
|
|
767
|
-
padding: 5px 8px
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
.apexcharts-tooltip-rangebar .category {
|
|
771
|
-
font-weight: 600;
|
|
772
|
-
color: #777
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
.apexcharts-tooltip-rangebar .series-name {
|
|
776
|
-
font-weight: 700;
|
|
777
|
-
display: block;
|
|
778
|
-
margin-bottom: 5px
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
/* Streamgraph: every band read out at one column, top-down in stacking order.
|
|
782
|
-
* A row per band rather than the shared tooltip's list, because a streamgraph's
|
|
783
|
-
* \`[lo, hi]\` are stacking offsets and the values the reader gave live on
|
|
784
|
-
* w.streamgraphData. */
|
|
785
|
-
.apexcharts-tooltip-stream {
|
|
786
|
-
padding: 5px 8px
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
.apexcharts-tooltip-stream .apexcharts-tooltip-title {
|
|
790
|
-
background: transparent;
|
|
791
|
-
border: 0;
|
|
792
|
-
padding: 0 0 4px;
|
|
793
|
-
margin: 0;
|
|
794
|
-
font-weight: 700
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
.apexcharts-tooltip-stream-band {
|
|
798
|
-
display: flex;
|
|
799
|
-
align-items: center;
|
|
800
|
-
gap: 5px;
|
|
801
|
-
line-height: 1.6;
|
|
802
|
-
opacity: .72
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
.apexcharts-tooltip-stream-band.apexcharts-active {
|
|
806
|
-
opacity: 1;
|
|
807
|
-
font-weight: 700
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
.apexcharts-tooltip-stream-band .series-name {
|
|
811
|
-
flex: 1 1 auto;
|
|
812
|
-
margin-right: 8px
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
.apexcharts-tooltip-stream-band .value {
|
|
816
|
-
font-weight: 700;
|
|
817
|
-
margin-left: auto
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
.apexcharts-tooltip-stream-total {
|
|
821
|
-
display: flex;
|
|
822
|
-
align-items: center;
|
|
823
|
-
margin-top: 4px;
|
|
824
|
-
padding-top: 4px;
|
|
825
|
-
border-top: 1px solid var(--apx-tt-border, rgba(15, 23, 42, .12))
|
|
826
|
-
}
|
|
827
|
-
|
|
828
|
-
.apexcharts-tooltip-stream-total .series-name {
|
|
829
|
-
flex: 1 1 auto;
|
|
830
|
-
font-weight: 600
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
.apexcharts-tooltip-stream-total .value {
|
|
834
|
-
font-weight: 700;
|
|
835
|
-
margin-left: auto
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
/* The band labels themselves. Pointer events off so a name never blocks a
|
|
839
|
-
* hover on the band it sits on. */
|
|
840
|
-
.apexcharts-streamgraph-label {
|
|
841
|
-
pointer-events: none
|
|
842
|
-
}
|
|
843
|
-
|
|
844
|
-
/* X/Y axis tooltips — small popovers that label the crosshair on the
|
|
845
|
-
* axes. Restyled to match the modern data-tooltip palette: solid white
|
|
846
|
-
* body with a subtle border + soft drop-shadow, smaller font, rounded
|
|
847
|
-
* corners. The arrows still use the CSS border-triangle technique
|
|
848
|
-
* (cheap, crisp at small sizes); their colours flow from CSS variables
|
|
849
|
-
* so light/dark themes only need one override per axis. */
|
|
850
|
-
.apexcharts-xaxistooltip,
|
|
851
|
-
.apexcharts-yaxistooltip {
|
|
852
|
-
--apx-axt-bg: #ffffff;
|
|
853
|
-
--apx-axt-border: rgba(15, 23, 42, 0.08);
|
|
854
|
-
--apx-axt-color: #0f172a;
|
|
855
|
-
--apx-axt-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.18), 0 1px 3px -1px rgba(15, 23, 42, 0.12);
|
|
856
|
-
opacity: 0;
|
|
857
|
-
pointer-events: none;
|
|
858
|
-
color: var(--apx-axt-color);
|
|
859
|
-
font-size: 12px;
|
|
860
|
-
font-weight: 500;
|
|
861
|
-
text-align: center;
|
|
862
|
-
border-radius: 6px;
|
|
863
|
-
position: absolute;
|
|
864
|
-
z-index: 10;
|
|
865
|
-
background: var(--apx-axt-bg);
|
|
866
|
-
border: 1px solid var(--apx-axt-border);
|
|
867
|
-
box-shadow: var(--apx-axt-shadow)
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
.apexcharts-xaxistooltip.apexcharts-theme-dark,
|
|
871
|
-
.apexcharts-yaxistooltip.apexcharts-theme-dark {
|
|
872
|
-
--apx-axt-bg: #1c1c1f;
|
|
873
|
-
--apx-axt-border: rgba(255, 255, 255, 0.1);
|
|
874
|
-
--apx-axt-color: #f3f4f6;
|
|
875
|
-
--apx-axt-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.55), 0 1px 3px -1px rgba(0, 0, 0, 0.45)
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
.apexcharts-xaxistooltip {
|
|
879
|
-
padding: 4px 8px;
|
|
880
|
-
transition: .15s ease all
|
|
881
|
-
}
|
|
882
|
-
|
|
883
|
-
.apexcharts-xaxistooltip:after,
|
|
884
|
-
.apexcharts-xaxistooltip:before {
|
|
885
|
-
left: 50%;
|
|
886
|
-
border: solid transparent;
|
|
887
|
-
content: " ";
|
|
888
|
-
height: 0;
|
|
889
|
-
width: 0;
|
|
890
|
-
position: absolute;
|
|
891
|
-
pointer-events: none
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
/* :before paints the 1px border outline of the triangle (slightly larger
|
|
895
|
-
* than :after); :after sits inside and paints the fill — leaves a 1px
|
|
896
|
-
* ring of :before visible at the edges. */
|
|
897
|
-
.apexcharts-xaxistooltip:after {
|
|
898
|
-
border-color: transparent;
|
|
899
|
-
border-width: 5px;
|
|
900
|
-
margin-left: -5px
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
.apexcharts-xaxistooltip:before {
|
|
904
|
-
border-color: transparent;
|
|
905
|
-
border-width: 6px;
|
|
906
|
-
margin-left: -6px
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
.apexcharts-xaxistooltip-bottom:after,
|
|
910
|
-
.apexcharts-xaxistooltip-bottom:before {
|
|
911
|
-
bottom: 100%
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
.apexcharts-xaxistooltip-top:after,
|
|
915
|
-
.apexcharts-xaxistooltip-top:before {
|
|
916
|
-
top: 100%
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
.apexcharts-xaxistooltip-bottom:after {
|
|
920
|
-
border-bottom-color: var(--apx-axt-bg)
|
|
921
|
-
}
|
|
922
|
-
|
|
923
|
-
.apexcharts-xaxistooltip-bottom:before {
|
|
924
|
-
border-bottom-color: var(--apx-axt-border)
|
|
925
|
-
}
|
|
926
|
-
|
|
927
|
-
.apexcharts-xaxistooltip-top:after {
|
|
928
|
-
border-top-color: var(--apx-axt-bg)
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
.apexcharts-xaxistooltip-top:before {
|
|
932
|
-
border-top-color: var(--apx-axt-border)
|
|
933
|
-
}
|
|
934
|
-
|
|
935
|
-
.apexcharts-xaxistooltip.apexcharts-active {
|
|
936
|
-
opacity: 1;
|
|
937
|
-
transition: .15s ease all
|
|
938
|
-
}
|
|
939
|
-
|
|
940
|
-
.apexcharts-yaxistooltip {
|
|
941
|
-
padding: 3px 8px
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
.apexcharts-yaxistooltip:after,
|
|
945
|
-
.apexcharts-yaxistooltip:before {
|
|
946
|
-
top: 50%;
|
|
947
|
-
border: solid transparent;
|
|
948
|
-
content: " ";
|
|
949
|
-
height: 0;
|
|
950
|
-
width: 0;
|
|
951
|
-
position: absolute;
|
|
952
|
-
pointer-events: none
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
.apexcharts-yaxistooltip:after {
|
|
956
|
-
border-color: transparent;
|
|
957
|
-
border-width: 5px;
|
|
958
|
-
margin-top: -5px
|
|
959
|
-
}
|
|
960
|
-
|
|
961
|
-
.apexcharts-yaxistooltip:before {
|
|
962
|
-
border-color: transparent;
|
|
963
|
-
border-width: 6px;
|
|
964
|
-
margin-top: -6px
|
|
965
|
-
}
|
|
966
|
-
|
|
967
|
-
.apexcharts-yaxistooltip-left:after,
|
|
968
|
-
.apexcharts-yaxistooltip-left:before {
|
|
969
|
-
left: 100%
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
.apexcharts-yaxistooltip-right:after,
|
|
973
|
-
.apexcharts-yaxistooltip-right:before {
|
|
974
|
-
right: 100%
|
|
975
|
-
}
|
|
976
|
-
|
|
977
|
-
.apexcharts-yaxistooltip-left:after {
|
|
978
|
-
border-left-color: var(--apx-axt-bg)
|
|
979
|
-
}
|
|
980
|
-
|
|
981
|
-
.apexcharts-yaxistooltip-left:before {
|
|
982
|
-
border-left-color: var(--apx-axt-border)
|
|
983
|
-
}
|
|
984
|
-
|
|
985
|
-
.apexcharts-yaxistooltip-right:after {
|
|
986
|
-
border-right-color: var(--apx-axt-bg)
|
|
987
|
-
}
|
|
988
|
-
|
|
989
|
-
.apexcharts-yaxistooltip-right:before {
|
|
990
|
-
border-right-color: var(--apx-axt-border)
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
.apexcharts-yaxistooltip.apexcharts-active {
|
|
994
|
-
opacity: 1
|
|
995
|
-
}
|
|
996
|
-
|
|
997
|
-
.apexcharts-yaxistooltip-hidden {
|
|
998
|
-
display: none
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
.apexcharts-xcrosshairs,
|
|
1002
|
-
.apexcharts-ycrosshairs {
|
|
1003
|
-
pointer-events: none;
|
|
1004
|
-
opacity: 0;
|
|
1005
|
-
transition: .15s ease all
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
.apexcharts-xcrosshairs.apexcharts-active,
|
|
1009
|
-
.apexcharts-ycrosshairs.apexcharts-active {
|
|
1010
|
-
opacity: 1;
|
|
1011
|
-
transition: .15s ease all
|
|
1012
|
-
}
|
|
1013
|
-
|
|
1014
|
-
.apexcharts-ycrosshairs-hidden {
|
|
1015
|
-
opacity: 0
|
|
1016
|
-
}
|
|
1017
|
-
|
|
1018
|
-
.apexcharts-selection-rect {
|
|
1019
|
-
cursor: move
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
.svg_select_shape {
|
|
1023
|
-
stroke-width: 1;
|
|
1024
|
-
stroke-dasharray: 10 10;
|
|
1025
|
-
stroke: black;
|
|
1026
|
-
stroke-opacity: 0.1;
|
|
1027
|
-
pointer-events: none;
|
|
1028
|
-
fill: none;
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
.svg_select_handle {
|
|
1032
|
-
stroke-width: 3;
|
|
1033
|
-
stroke: black;
|
|
1034
|
-
fill: none;
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
|
-
.svg_select_handle_r {
|
|
1038
|
-
cursor: e-resize;
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
.svg_select_handle_l {
|
|
1042
|
-
cursor: w-resize;
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
|
-
.apexcharts-svg.apexcharts-zoomable.hovering-zoom {
|
|
1046
|
-
cursor: crosshair
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
|
-
.apexcharts-svg.apexcharts-zoomable.hovering-pan {
|
|
1050
|
-
cursor: move
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
.apexcharts-menu-icon,
|
|
1054
|
-
.apexcharts-measure-icon,
|
|
1055
|
-
.apexcharts-pan-icon,
|
|
1056
|
-
.apexcharts-reset-icon,
|
|
1057
|
-
.apexcharts-selection-icon,
|
|
1058
|
-
.apexcharts-toolbar-custom-icon,
|
|
1059
|
-
.apexcharts-zoom-icon,
|
|
1060
|
-
.apexcharts-zoomin-icon,
|
|
1061
|
-
.apexcharts-zoomout-icon {
|
|
1062
|
-
cursor: pointer;
|
|
1063
|
-
/* WCAG 2.5.8 Target Size (Minimum): 24×24 CSS px hit target. */
|
|
1064
|
-
width: 26px;
|
|
1065
|
-
height: 24px;
|
|
1066
|
-
line-height: 24px;
|
|
1067
|
-
color: #6e8192;
|
|
1068
|
-
text-align: center;
|
|
1069
|
-
/* Reset native <button> chrome — these are styled via SVG icons. */
|
|
1070
|
-
padding: 0;
|
|
1071
|
-
margin: 0;
|
|
1072
|
-
background: transparent;
|
|
1073
|
-
border: 0;
|
|
1074
|
-
border-radius: 5px;
|
|
1075
|
-
display: inline-flex;
|
|
1076
|
-
align-items: center;
|
|
1077
|
-
justify-content: center;
|
|
1078
|
-
transition: background-color .12s ease, color .12s ease;
|
|
1079
|
-
}
|
|
1080
|
-
|
|
1081
|
-
.apexcharts-menu-icon svg,
|
|
1082
|
-
.apexcharts-measure-icon svg,
|
|
1083
|
-
.apexcharts-pan-icon svg,
|
|
1084
|
-
.apexcharts-reset-icon svg,
|
|
1085
|
-
.apexcharts-selection-icon svg,
|
|
1086
|
-
.apexcharts-zoom-icon svg,
|
|
1087
|
-
.apexcharts-zoomin-icon svg,
|
|
1088
|
-
.apexcharts-zoomout-icon svg {
|
|
1089
|
-
width: 18px;
|
|
1090
|
-
height: 18px;
|
|
1091
|
-
fill: none;
|
|
1092
|
-
stroke: currentColor;
|
|
1093
|
-
stroke-width: 2;
|
|
1094
|
-
stroke-linecap: round;
|
|
1095
|
-
stroke-linejoin: round
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
.apexcharts-theme-dark .apexcharts-menu-icon,
|
|
1099
|
-
.apexcharts-theme-dark .apexcharts-measure-icon,
|
|
1100
|
-
.apexcharts-theme-dark .apexcharts-pan-icon,
|
|
1101
|
-
.apexcharts-theme-dark .apexcharts-reset-icon,
|
|
1102
|
-
.apexcharts-theme-dark .apexcharts-selection-icon,
|
|
1103
|
-
.apexcharts-theme-dark .apexcharts-toolbar-custom-icon,
|
|
1104
|
-
.apexcharts-theme-dark .apexcharts-zoom-icon,
|
|
1105
|
-
.apexcharts-theme-dark .apexcharts-zoomin-icon,
|
|
1106
|
-
.apexcharts-theme-dark .apexcharts-zoomout-icon {
|
|
1107
|
-
color: #d4d6dc
|
|
1108
|
-
}
|
|
1109
|
-
|
|
1110
|
-
.apexcharts-canvas .apexcharts-measure-icon.apexcharts-selected,
|
|
1111
|
-
.apexcharts-canvas .apexcharts-pan-icon.apexcharts-selected,
|
|
1112
|
-
.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected,
|
|
1113
|
-
.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected,
|
|
1114
|
-
.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected {
|
|
1115
|
-
background: rgba(0, 143, 251, 0.12);
|
|
1116
|
-
color: #008ffb
|
|
1117
|
-
}
|
|
1118
|
-
|
|
1119
|
-
.apexcharts-theme-light .apexcharts-menu-icon:hover,
|
|
1120
|
-
.apexcharts-theme-light .apexcharts-measure-icon:not(.apexcharts-selected):hover,
|
|
1121
|
-
.apexcharts-theme-light .apexcharts-pan-icon:not(.apexcharts-selected):hover,
|
|
1122
|
-
.apexcharts-theme-light .apexcharts-reset-icon:hover,
|
|
1123
|
-
.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover,
|
|
1124
|
-
.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover,
|
|
1125
|
-
.apexcharts-theme-light .apexcharts-zoomin-icon:hover,
|
|
1126
|
-
.apexcharts-theme-light .apexcharts-zoomout-icon:hover {
|
|
1127
|
-
background: rgba(15, 23, 42, 0.06);
|
|
1128
|
-
color: #1f2937
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
.apexcharts-theme-dark .apexcharts-menu-icon:hover,
|
|
1132
|
-
.apexcharts-theme-dark .apexcharts-measure-icon:not(.apexcharts-selected):hover,
|
|
1133
|
-
.apexcharts-theme-dark .apexcharts-pan-icon:not(.apexcharts-selected):hover,
|
|
1134
|
-
.apexcharts-theme-dark .apexcharts-reset-icon:hover,
|
|
1135
|
-
.apexcharts-theme-dark .apexcharts-selection-icon:not(.apexcharts-selected):hover,
|
|
1136
|
-
.apexcharts-theme-dark .apexcharts-zoom-icon:not(.apexcharts-selected):hover,
|
|
1137
|
-
.apexcharts-theme-dark .apexcharts-zoomin-icon:hover,
|
|
1138
|
-
.apexcharts-theme-dark .apexcharts-zoomout-icon:hover {
|
|
1139
|
-
background: rgba(255, 255, 255, 0.08);
|
|
1140
|
-
color: #fff
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
|
-
.apexcharts-menu-icon,
|
|
1144
|
-
.apexcharts-selection-icon {
|
|
1145
|
-
position: relative
|
|
1146
|
-
}
|
|
1147
|
-
|
|
1148
|
-
.apexcharts-toolbar {
|
|
1149
|
-
position: absolute;
|
|
1150
|
-
z-index: 11;
|
|
1151
|
-
display: inline-flex;
|
|
1152
|
-
align-items: center;
|
|
1153
|
-
gap: 1px;
|
|
1154
|
-
padding: 3px;
|
|
1155
|
-
border-radius: 8px;
|
|
1156
|
-
background: rgba(255, 255, 255, 0.85);
|
|
1157
|
-
backdrop-filter: blur(8px);
|
|
1158
|
-
-webkit-backdrop-filter: blur(8px);
|
|
1159
|
-
}
|
|
1160
|
-
|
|
1161
|
-
.apexcharts-theme-dark .apexcharts-toolbar {
|
|
1162
|
-
background: rgba(28, 28, 31, 0.82);
|
|
1163
|
-
}
|
|
1164
|
-
|
|
1165
|
-
.apexcharts-menu {
|
|
1166
|
-
background: rgba(255, 255, 255, 0.95);
|
|
1167
|
-
backdrop-filter: blur(8px);
|
|
1168
|
-
-webkit-backdrop-filter: blur(8px);
|
|
1169
|
-
position: absolute;
|
|
1170
|
-
top: calc(100% + 4px);
|
|
1171
|
-
border: 1px solid rgba(15, 23, 42, 0.08);
|
|
1172
|
-
border-radius: 8px;
|
|
1173
|
-
padding: 4px;
|
|
1174
|
-
right: 0;
|
|
1175
|
-
opacity: 0;
|
|
1176
|
-
min-width: 120px;
|
|
1177
|
-
transition: opacity .15s ease, transform .15s ease;
|
|
1178
|
-
transform: translateY(-2px);
|
|
1179
|
-
pointer-events: none;
|
|
1180
|
-
box-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.12), 0 2px 4px -1px rgba(15, 23, 42, 0.06)
|
|
1181
|
-
}
|
|
1182
|
-
|
|
1183
|
-
.apexcharts-menu.apexcharts-menu-open {
|
|
1184
|
-
opacity: 1;
|
|
1185
|
-
transform: translateY(0);
|
|
1186
|
-
pointer-events: all
|
|
1187
|
-
}
|
|
1188
|
-
|
|
1189
|
-
.apexcharts-menu-item {
|
|
1190
|
-
padding: 6px 9px;
|
|
1191
|
-
font-size: 12px;
|
|
1192
|
-
border-radius: 5px;
|
|
1193
|
-
cursor: pointer
|
|
1194
|
-
}
|
|
1195
|
-
|
|
1196
|
-
.apexcharts-theme-light .apexcharts-menu-item:hover {
|
|
1197
|
-
background: rgba(15, 23, 42, 0.06)
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
|
-
.apexcharts-theme-dark .apexcharts-menu {
|
|
1201
|
-
background: rgba(28, 28, 31, 0.92);
|
|
1202
|
-
border-color: rgba(255, 255, 255, 0.08);
|
|
1203
|
-
color: #f3f4f6;
|
|
1204
|
-
box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.4)
|
|
1205
|
-
}
|
|
1206
|
-
|
|
1207
|
-
.apexcharts-theme-dark .apexcharts-menu-item:hover {
|
|
1208
|
-
background: rgba(255, 255, 255, 0.08)
|
|
1209
|
-
}
|
|
1210
|
-
|
|
1211
|
-
@media screen and (min-width:768px) {
|
|
1212
|
-
.apexcharts-canvas:hover .apexcharts-toolbar {
|
|
1213
|
-
opacity: 1
|
|
1214
|
-
}
|
|
1215
|
-
}
|
|
1216
|
-
|
|
1217
|
-
/* Toolbar keyboard accessibility: show toolbar when any button inside it is focused */
|
|
1218
|
-
.apexcharts-toolbar:focus-within {
|
|
1219
|
-
opacity: 1
|
|
1220
|
-
}
|
|
1221
|
-
|
|
1222
|
-
/* Focus indicator for toolbar icon buttons */
|
|
1223
|
-
.apexcharts-menu-icon:focus-visible,
|
|
1224
|
-
.apexcharts-measure-icon:focus-visible,
|
|
1225
|
-
.apexcharts-pan-icon:focus-visible,
|
|
1226
|
-
.apexcharts-reset-icon:focus-visible,
|
|
1227
|
-
.apexcharts-selection-icon:focus-visible,
|
|
1228
|
-
.apexcharts-toolbar-custom-icon:focus-visible,
|
|
1229
|
-
.apexcharts-zoom-icon:focus-visible,
|
|
1230
|
-
.apexcharts-zoomin-icon:focus-visible,
|
|
1231
|
-
.apexcharts-zoomout-icon:focus-visible {
|
|
1232
|
-
outline: 2px solid var(--apexcharts-focus-color, #008FFB);
|
|
1233
|
-
outline-offset: 1px;
|
|
1234
|
-
border-radius: 5px
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
/* Focus indicator for hamburger menu items */
|
|
1238
|
-
.apexcharts-menu-item:focus-visible {
|
|
1239
|
-
outline: 2px solid var(--apexcharts-focus-color, #008FFB);
|
|
1240
|
-
outline-offset: -2px;
|
|
1241
|
-
background: #eee
|
|
1242
|
-
}
|
|
1243
|
-
|
|
1244
|
-
.apexcharts-canvas .apexcharts-element-hidden,
|
|
1245
|
-
.apexcharts-datalabel.apexcharts-element-hidden,
|
|
1246
|
-
.apexcharts-hide .apexcharts-series-points {
|
|
1247
|
-
opacity: 0;
|
|
1248
|
-
}
|
|
1249
|
-
|
|
1250
|
-
.apexcharts-hidden-element-shown {
|
|
1251
|
-
opacity: 1;
|
|
1252
|
-
transition: 0.25s ease all;
|
|
1253
|
-
}
|
|
1254
|
-
|
|
1255
|
-
.apexcharts-datalabel,
|
|
1256
|
-
.apexcharts-datalabel-label,
|
|
1257
|
-
.apexcharts-datalabel-value,
|
|
1258
|
-
.apexcharts-datalabels,
|
|
1259
|
-
.apexcharts-pie-label,
|
|
1260
|
-
.apexcharts-pie-name-label,
|
|
1261
|
-
.apexcharts-pie-name-label-group,
|
|
1262
|
-
.apexcharts-pie-label-connector,
|
|
1263
|
-
.apexcharts-unit-outer-label,
|
|
1264
|
-
.apexcharts-unit-outer-label-group,
|
|
1265
|
-
.apexcharts-unit-label-connector {
|
|
1266
|
-
cursor: default;
|
|
1267
|
-
pointer-events: none
|
|
1268
|
-
}
|
|
1269
|
-
|
|
1270
|
-
.apexcharts-pie-label-connector,
|
|
1271
|
-
.apexcharts-unit-label-connector {
|
|
1272
|
-
fill: none
|
|
1273
|
-
}
|
|
1274
|
-
|
|
1275
|
-
.apexcharts-pie-label-delay,
|
|
1276
|
-
.apexcharts-unit-label-delay {
|
|
1277
|
-
opacity: 0;
|
|
1278
|
-
animation-name: opaque;
|
|
1279
|
-
animation-duration: .3s;
|
|
1280
|
-
animation-fill-mode: forwards;
|
|
1281
|
-
animation-timing-function: ease
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
|
-
/* Slower than the pie's, on purpose: these come in while the dots are still
|
|
1285
|
-
easing into place, so a longer fade reads as arriving WITH the crowd. */
|
|
1286
|
-
.apexcharts-unit-label-delay {
|
|
1287
|
-
animation-duration: .5s
|
|
1288
|
-
}
|
|
1289
|
-
|
|
1290
|
-
.apexcharts-radialbar-label {
|
|
1291
|
-
cursor: pointer;
|
|
1292
|
-
}
|
|
1293
|
-
|
|
1294
|
-
.apexcharts-annotation-rect,
|
|
1295
|
-
.apexcharts-area-series .apexcharts-area,
|
|
1296
|
-
.apexcharts-gridline,
|
|
1297
|
-
.apexcharts-line,
|
|
1298
|
-
.apexcharts-point-annotation-label,
|
|
1299
|
-
.apexcharts-radar-series path:not(.apexcharts-marker),
|
|
1300
|
-
.apexcharts-radar-series polygon,
|
|
1301
|
-
.apexcharts-toolbar svg,
|
|
1302
|
-
.apexcharts-tooltip .apexcharts-marker,
|
|
1303
|
-
.apexcharts-xaxis-annotation-label,
|
|
1304
|
-
.apexcharts-yaxis-annotation-label,
|
|
1305
|
-
.apexcharts-zoom-rect,
|
|
1306
|
-
.no-pointer-events {
|
|
1307
|
-
pointer-events: none
|
|
1308
|
-
}
|
|
1309
|
-
|
|
1310
|
-
.apexcharts-tooltip-active .apexcharts-marker {
|
|
1311
|
-
transition: .15s ease all
|
|
1312
|
-
}
|
|
1313
|
-
|
|
1314
|
-
.apexcharts-radar-series .apexcharts-yaxis {
|
|
1315
|
-
pointer-events: none;
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
|
-
.resize-triggers {
|
|
1319
|
-
animation: 1ms resizeanim;
|
|
1320
|
-
visibility: hidden;
|
|
1321
|
-
opacity: 0;
|
|
1322
|
-
height: 100%;
|
|
1323
|
-
width: 100%;
|
|
1324
|
-
overflow: hidden
|
|
1325
|
-
}
|
|
1326
|
-
|
|
1327
|
-
.contract-trigger:before,
|
|
1328
|
-
.resize-triggers,
|
|
1329
|
-
.resize-triggers>div {
|
|
1330
|
-
content: " ";
|
|
1331
|
-
display: block;
|
|
1332
|
-
position: absolute;
|
|
1333
|
-
top: 0;
|
|
1334
|
-
left: 0
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1337
|
-
.resize-triggers>div {
|
|
1338
|
-
height: 100%;
|
|
1339
|
-
width: 100%;
|
|
1340
|
-
background: #eee;
|
|
1341
|
-
overflow: auto
|
|
1342
|
-
}
|
|
1343
|
-
|
|
1344
|
-
.contract-trigger:before {
|
|
1345
|
-
overflow: hidden;
|
|
1346
|
-
width: 200%;
|
|
1347
|
-
height: 200%
|
|
1348
|
-
}
|
|
1349
|
-
|
|
1350
|
-
.apexcharts-bar-goals-markers {
|
|
1351
|
-
pointer-events: none
|
|
1352
|
-
}
|
|
1353
|
-
|
|
1354
|
-
.apexcharts-bar-shadows {
|
|
1355
|
-
pointer-events: none
|
|
1356
|
-
}
|
|
1357
|
-
|
|
1358
|
-
.apexcharts-rangebar-goals-markers {
|
|
1359
|
-
pointer-events: none
|
|
1360
|
-
}
|
|
1361
|
-
|
|
1362
|
-
.apexcharts-drilldown-target {
|
|
1363
|
-
cursor: pointer
|
|
1364
|
-
}
|
|
1365
|
-
|
|
1366
|
-
.apexcharts-breadcrumb {
|
|
1367
|
-
position: absolute;
|
|
1368
|
-
z-index: 11;
|
|
1369
|
-
display: inline-flex;
|
|
1370
|
-
align-items: center;
|
|
1371
|
-
gap: 2px;
|
|
1372
|
-
font-size: 12px;
|
|
1373
|
-
font-family: inherit;
|
|
1374
|
-
padding: 2px 4px
|
|
1375
|
-
}
|
|
1376
|
-
|
|
1377
|
-
.apexcharts-breadcrumb-item {
|
|
1378
|
-
background: transparent;
|
|
1379
|
-
border: none;
|
|
1380
|
-
padding: 2px 6px;
|
|
1381
|
-
border-radius: 3px;
|
|
1382
|
-
font: inherit;
|
|
1383
|
-
color: inherit;
|
|
1384
|
-
cursor: pointer;
|
|
1385
|
-
line-height: 1.2
|
|
1386
|
-
}
|
|
1387
|
-
|
|
1388
|
-
.apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current) {
|
|
1389
|
-
background: rgba(0, 0, 0, 0.08)
|
|
1390
|
-
}
|
|
1391
|
-
|
|
1392
|
-
.apexcharts-breadcrumb-arrow {
|
|
1393
|
-
margin-right: 4px;
|
|
1394
|
-
font-weight: 600;
|
|
1395
|
-
user-select: none
|
|
1396
|
-
}
|
|
1397
|
-
|
|
1398
|
-
.apexcharts-breadcrumb-current {
|
|
1399
|
-
cursor: default;
|
|
1400
|
-
font-weight: 600;
|
|
1401
|
-
opacity: 0.85
|
|
1402
|
-
}
|
|
1403
|
-
|
|
1404
|
-
.apexcharts-breadcrumb-separator {
|
|
1405
|
-
opacity: 0.5;
|
|
1406
|
-
user-select: none
|
|
1407
|
-
}
|
|
1408
|
-
|
|
1409
|
-
.apexcharts-theme-dark .apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current) {
|
|
1410
|
-
background: rgba(255, 255, 255, 0.12)
|
|
1411
|
-
}
|
|
1412
|
-
|
|
1413
|
-
.apexcharts-drilldown-loading {
|
|
1414
|
-
position: absolute;
|
|
1415
|
-
inset: 0;
|
|
1416
|
-
z-index: 12;
|
|
1417
|
-
display: flex;
|
|
1418
|
-
align-items: center;
|
|
1419
|
-
justify-content: center;
|
|
1420
|
-
gap: 10px;
|
|
1421
|
-
font-size: 13px;
|
|
1422
|
-
font-family: inherit;
|
|
1423
|
-
color: inherit;
|
|
1424
|
-
background: rgba(255, 255, 255, 0.62);
|
|
1425
|
-
/* The chart underneath stays interactive-looking but must not take clicks
|
|
1426
|
-
while a level is resolving, or a second drill can start mid-fetch. */
|
|
1427
|
-
cursor: progress
|
|
1428
|
-
}
|
|
1429
|
-
|
|
1430
|
-
.apexcharts-drilldown-loading-spinner {
|
|
1431
|
-
width: 26px;
|
|
1432
|
-
height: 26px;
|
|
1433
|
-
border-radius: 50%;
|
|
1434
|
-
border: 2.5px solid rgba(0, 0, 0, 0.16);
|
|
1435
|
-
border-top-color: rgba(0, 0, 0, 0.55);
|
|
1436
|
-
animation: apexcharts-drilldown-spin 0.7s linear infinite
|
|
1437
|
-
}
|
|
1438
|
-
|
|
1439
|
-
.apexcharts-drilldown-loading-text {
|
|
1440
|
-
opacity: 0.8
|
|
1441
|
-
}
|
|
1442
|
-
|
|
1443
|
-
.apexcharts-theme-dark .apexcharts-drilldown-loading {
|
|
1444
|
-
background: rgba(30, 30, 30, 0.62)
|
|
1445
|
-
}
|
|
1446
|
-
|
|
1447
|
-
.apexcharts-theme-dark .apexcharts-drilldown-loading-spinner {
|
|
1448
|
-
border-color: rgba(255, 255, 255, 0.22);
|
|
1449
|
-
border-top-color: rgba(255, 255, 255, 0.7)
|
|
1450
|
-
}
|
|
1451
|
-
|
|
1452
|
-
@keyframes apexcharts-drilldown-spin {
|
|
1453
|
-
to {
|
|
1454
|
-
transform: rotate(360deg)
|
|
1455
|
-
}
|
|
1456
|
-
}
|
|
1457
|
-
|
|
1458
|
-
@media (prefers-reduced-motion: reduce) {
|
|
1459
|
-
.apexcharts-drilldown-loading-spinner {
|
|
1460
|
-
animation: apexcharts-drilldown-pulse 1.4s ease-in-out infinite
|
|
1461
|
-
}
|
|
1462
|
-
|
|
1463
|
-
@keyframes apexcharts-drilldown-pulse {
|
|
1464
|
-
0%, 100% {
|
|
1465
|
-
opacity: 0.35
|
|
1466
|
-
}
|
|
1467
|
-
|
|
1468
|
-
50% {
|
|
1469
|
-
opacity: 1
|
|
1470
|
-
}
|
|
1471
|
-
}
|
|
1472
|
-
}
|
|
1473
|
-
|
|
1474
|
-
.apexcharts-disable-transitions * {
|
|
1475
|
-
transition: none !important;
|
|
1476
|
-
}
|
|
1477
|
-
/* ── Trellis (#22): small multiples ─────────────────────────────────────── */
|
|
1478
|
-
.apexcharts-trellis {
|
|
1479
|
-
position: relative;
|
|
1480
|
-
}
|
|
1481
|
-
.apexcharts-trellis-grid {
|
|
1482
|
-
display: grid;
|
|
1483
|
-
}
|
|
1484
|
-
.apexcharts-trellis-cell {
|
|
1485
|
-
min-width: 0;
|
|
1486
|
-
position: relative;
|
|
1487
|
-
}
|
|
1488
|
-
.apexcharts-trellis-header {
|
|
1489
|
-
font-size: 12px;
|
|
1490
|
-
font-weight: 600;
|
|
1491
|
-
line-height: 22px;
|
|
1492
|
-
height: 22px;
|
|
1493
|
-
text-align: center;
|
|
1494
|
-
overflow: hidden;
|
|
1495
|
-
text-overflow: ellipsis;
|
|
1496
|
-
white-space: nowrap;
|
|
1497
|
-
color: var(--apx-fore, #373d3f);
|
|
1498
|
-
}
|
|
1499
|
-
.apexcharts-trellis-title {
|
|
1500
|
-
font-size: 14px;
|
|
1501
|
-
font-weight: 700;
|
|
1502
|
-
padding: 2px 0 6px;
|
|
1503
|
-
color: var(--apx-fore, #373d3f);
|
|
1504
|
-
}
|
|
1505
|
-
/* Edge-label policy: a muted cell hides its axis-label INK, never the label
|
|
1506
|
-
SPACE — every panel keeps the identical plot rectangle, and flipping the
|
|
1507
|
-
policy on a resize is a class toggle, not a re-render. */
|
|
1508
|
-
.apexcharts-trellis-mute-y .apexcharts-yaxis {
|
|
1509
|
-
opacity: 0;
|
|
1510
|
-
}
|
|
1511
|
-
.apexcharts-trellis-mute-x .apexcharts-xaxis {
|
|
1512
|
-
opacity: 0;
|
|
1513
|
-
}
|
|
1514
|
-
/* The shared toolbar floats at the top-right, so a grid that has one starts
|
|
1515
|
-
below it: from four columns on, the last cell's header (or a 2-D column
|
|
1516
|
-
strip label) would otherwise run under the buttons. One band for the whole
|
|
1517
|
-
grid, not per panel. */
|
|
1518
|
-
.apexcharts-trellis-has-toolbar {
|
|
1519
|
-
padding-top: 24px;
|
|
1520
|
-
}
|
|
1521
|
-
/* 2-D faceting (P4): column labels once across the top, row labels once
|
|
1522
|
-
down the left. The row strip column is auto-sized; panel columns stay
|
|
1523
|
-
equal fractions, so panel alignment is independent of the strip width. */
|
|
1524
|
-
.apexcharts-trellis-strip {
|
|
1525
|
-
font-size: 12px;
|
|
1526
|
-
font-weight: 600;
|
|
1527
|
-
color: var(--apx-fore, #373d3f);
|
|
1528
|
-
overflow: hidden;
|
|
1529
|
-
text-overflow: ellipsis;
|
|
1530
|
-
white-space: nowrap;
|
|
1531
|
-
}
|
|
1532
|
-
.apexcharts-trellis-strip-column {
|
|
1533
|
-
text-align: center;
|
|
1534
|
-
line-height: 22px;
|
|
1535
|
-
height: 22px;
|
|
1536
|
-
align-self: end;
|
|
1537
|
-
}
|
|
1538
|
-
.apexcharts-trellis-strip-row {
|
|
1539
|
-
align-self: center;
|
|
1540
|
-
max-width: 140px;
|
|
1541
|
-
padding-right: 6px;
|
|
1542
|
-
}
|
|
1543
|
-
/* Empty (row, column) combinations. 'placeholder' keeps a REAL panel with a
|
|
1544
|
-
quiet label; 'skip' shows the tinted skeleton; 'hide' shows nothing while
|
|
1545
|
-
keeping the grid slot. */
|
|
1546
|
-
.apexcharts-trellis-cell-empty {
|
|
1547
|
-
position: relative;
|
|
1548
|
-
}
|
|
1549
|
-
.apexcharts-trellis-empty-label {
|
|
1550
|
-
position: absolute;
|
|
1551
|
-
inset: 0;
|
|
1552
|
-
display: flex;
|
|
1553
|
-
align-items: center;
|
|
1554
|
-
justify-content: center;
|
|
1555
|
-
font-size: 12px;
|
|
1556
|
-
color: var(--apx-fore, #373d3f);
|
|
1557
|
-
opacity: 0.45;
|
|
1558
|
-
pointer-events: none;
|
|
1559
|
-
}
|
|
1560
|
-
.apexcharts-trellis-cell-hidden > * {
|
|
1561
|
-
visibility: hidden;
|
|
1562
|
-
}
|
|
1563
|
-
/* P5: one shared gradient strip is a heatmap grid's legend. The slot is
|
|
1564
|
-
content-sized inline (the strip svg's own box); centering is its own. */
|
|
1565
|
-
.apexcharts-trellis-gradient-legend {
|
|
1566
|
-
margin: 10px auto 0;
|
|
1567
|
-
}
|
|
1568
|
-
/* Virtualization (P2): an unmounted panel's mount div reserves the exact
|
|
1569
|
-
panel height (inline min-height) so page height and scroll position never
|
|
1570
|
-
shift; the skeleton itself is a quiet tinted block. Deliberately not
|
|
1571
|
-
animated: a shimmering grid of 200 placeholders is noise. */
|
|
1572
|
-
.apexcharts-trellis-panel.apexcharts-trellis-skeleton {
|
|
1573
|
-
background: var(--apx-fore, #373d3f);
|
|
1574
|
-
opacity: 0.05;
|
|
1575
|
-
border-radius: 4px;
|
|
1576
|
-
}
|
|
1577
|
-
/* tooltip: 'panel' — the group still syncs every panel's crosshair, but only
|
|
1578
|
-
the hovered cell shows its tooltip cards. */
|
|
1579
|
-
.apexcharts-trellis[data-tooltip-mode='panel'] .apexcharts-trellis-cell:not(:hover) .apexcharts-tooltip,
|
|
1580
|
-
.apexcharts-trellis[data-tooltip-mode='panel'] .apexcharts-trellis-cell:not(:hover) .apexcharts-xaxistooltip,
|
|
1581
|
-
.apexcharts-trellis[data-tooltip-mode='panel'] .apexcharts-trellis-cell:not(:hover) .apexcharts-yaxistooltip {
|
|
1582
|
-
opacity: 0 !important;
|
|
1583
|
-
}
|
|
1584
|
-
/* tooltip: 'grid' (P3) — ALL per-panel tooltip ink is hidden (the group
|
|
1585
|
-
still computes it; the trellis card reads it) and one trellis-owned card
|
|
1586
|
-
follows the cursor with one row per panel. */
|
|
1587
|
-
.apexcharts-trellis[data-tooltip-mode='grid'] .apexcharts-trellis-cell .apexcharts-tooltip,
|
|
1588
|
-
.apexcharts-trellis[data-tooltip-mode='grid'] .apexcharts-trellis-cell .apexcharts-xaxistooltip,
|
|
1589
|
-
.apexcharts-trellis[data-tooltip-mode='grid'] .apexcharts-trellis-cell .apexcharts-yaxistooltip {
|
|
1590
|
-
opacity: 0 !important;
|
|
1591
|
-
}
|
|
1592
|
-
.apexcharts-trellis-tooltip {
|
|
1593
|
-
position: absolute;
|
|
1594
|
-
top: 0;
|
|
1595
|
-
left: 0;
|
|
1596
|
-
z-index: 14;
|
|
1597
|
-
pointer-events: none;
|
|
1598
|
-
opacity: 0;
|
|
1599
|
-
transition: opacity 0.1s ease;
|
|
1600
|
-
background: var(--apx-bg, #fff);
|
|
1601
|
-
color: var(--apx-fore, #373d3f);
|
|
1602
|
-
border: 1px solid rgba(120, 120, 120, 0.25);
|
|
1603
|
-
border-radius: 5px;
|
|
1604
|
-
box-shadow: 2px 2px 6px -4px rgba(0, 0, 0, 0.4);
|
|
1605
|
-
font-size: 12px;
|
|
1606
|
-
min-width: 140px;
|
|
1607
|
-
max-width: 320px;
|
|
1608
|
-
}
|
|
1609
|
-
.apexcharts-trellis-tooltip-active {
|
|
1610
|
-
opacity: 1;
|
|
1611
|
-
}
|
|
1612
|
-
.apexcharts-trellis-tooltip .apexcharts-tooltip-title {
|
|
1613
|
-
padding: 5px 10px;
|
|
1614
|
-
font-weight: 600;
|
|
1615
|
-
background: rgba(120, 120, 120, 0.08);
|
|
1616
|
-
border-bottom: 1px solid rgba(120, 120, 120, 0.18);
|
|
1617
|
-
margin-bottom: 2px;
|
|
1618
|
-
}
|
|
1619
|
-
.apexcharts-trellis-tooltip-row {
|
|
1620
|
-
display: flex;
|
|
1621
|
-
align-items: center;
|
|
1622
|
-
justify-content: space-between;
|
|
1623
|
-
gap: 14px;
|
|
1624
|
-
padding: 2px 10px;
|
|
1625
|
-
line-height: 1.6;
|
|
1626
|
-
}
|
|
1627
|
-
.apexcharts-trellis-tooltip-row-active {
|
|
1628
|
-
background: rgba(120, 120, 120, 0.1);
|
|
1629
|
-
font-weight: 600;
|
|
1630
|
-
}
|
|
1631
|
-
.apexcharts-trellis-tooltip-key {
|
|
1632
|
-
overflow: hidden;
|
|
1633
|
-
text-overflow: ellipsis;
|
|
1634
|
-
white-space: nowrap;
|
|
1635
|
-
}
|
|
1636
|
-
.apexcharts-trellis-tooltip-vals {
|
|
1637
|
-
display: flex;
|
|
1638
|
-
gap: 10px;
|
|
1639
|
-
white-space: nowrap;
|
|
1640
|
-
}
|
|
1641
|
-
.apexcharts-trellis-tooltip-val {
|
|
1642
|
-
display: inline-flex;
|
|
1643
|
-
align-items: center;
|
|
1644
|
-
gap: 5px;
|
|
1645
|
-
}
|
|
1646
|
-
.apexcharts-trellis-tooltip-marker {
|
|
1647
|
-
width: 8px;
|
|
1648
|
-
height: 8px;
|
|
1649
|
-
border-radius: 50%;
|
|
1650
|
-
display: inline-block;
|
|
1651
|
-
flex: none;
|
|
1652
|
-
}
|
|
1653
|
-
/* Panel promotion (P3): the promoted cell spans the grid; the rest park.
|
|
1654
|
-
The promoted panel is the only visible one, so both its axes unmute. */
|
|
1655
|
-
.apexcharts-trellis-cell-promoted {
|
|
1656
|
-
grid-column: 1 / -1;
|
|
1657
|
-
}
|
|
1658
|
-
.apexcharts-trellis-cell-parked {
|
|
1659
|
-
display: none;
|
|
1660
|
-
}
|
|
1661
|
-
.apexcharts-trellis-cell-promoted.apexcharts-trellis-mute-y .apexcharts-yaxis,
|
|
1662
|
-
.apexcharts-trellis-cell-promoted.apexcharts-trellis-mute-x .apexcharts-xaxis {
|
|
1663
|
-
opacity: 1;
|
|
1664
|
-
}
|
|
1665
|
-
.apexcharts-trellis-header-clickable {
|
|
1666
|
-
cursor: pointer;
|
|
1667
|
-
}
|
|
1668
|
-
.apexcharts-trellis-header-clickable:hover {
|
|
1669
|
-
text-decoration: underline;
|
|
1670
|
-
text-underline-offset: 3px;
|
|
1671
|
-
}
|
|
1672
|
-
.apexcharts-trellis-breadcrumb {
|
|
1673
|
-
display: flex;
|
|
1674
|
-
align-items: center;
|
|
1675
|
-
gap: 6px;
|
|
1676
|
-
font-size: 12px;
|
|
1677
|
-
padding: 2px 0 6px;
|
|
1678
|
-
color: var(--apx-fore, #373d3f);
|
|
1679
|
-
}
|
|
1680
|
-
.apexcharts-trellis-breadcrumb-back {
|
|
1681
|
-
border: none;
|
|
1682
|
-
background: none;
|
|
1683
|
-
padding: 0;
|
|
1684
|
-
font-size: 12px;
|
|
1685
|
-
cursor: pointer;
|
|
1686
|
-
color: var(--apx-accent, #008ffb);
|
|
1687
|
-
}
|
|
1688
|
-
.apexcharts-trellis-breadcrumb-back:hover {
|
|
1689
|
-
text-decoration: underline;
|
|
1690
|
-
}
|
|
1691
|
-
.apexcharts-trellis-breadcrumb-sep {
|
|
1692
|
-
opacity: 0.5;
|
|
1693
|
-
}
|
|
1694
|
-
.apexcharts-trellis-breadcrumb-current {
|
|
1695
|
-
font-weight: 600;
|
|
1696
|
-
}
|
|
1697
|
-
/* The toolbar download menu (P3). */
|
|
1698
|
-
.apexcharts-trellis-menu {
|
|
1699
|
-
position: absolute;
|
|
1700
|
-
top: 26px;
|
|
1701
|
-
right: 0;
|
|
1702
|
-
display: none;
|
|
1703
|
-
flex-direction: column;
|
|
1704
|
-
min-width: 132px;
|
|
1705
|
-
background: var(--apx-bg, #fff);
|
|
1706
|
-
border: 1px solid rgba(120, 120, 120, 0.25);
|
|
1707
|
-
border-radius: 5px;
|
|
1708
|
-
box-shadow: 2px 2px 6px -4px rgba(0, 0, 0, 0.4);
|
|
1709
|
-
padding: 4px;
|
|
1710
|
-
z-index: 15;
|
|
1711
|
-
}
|
|
1712
|
-
.apexcharts-trellis-menu-open {
|
|
1713
|
-
display: flex;
|
|
1714
|
-
}
|
|
1715
|
-
.apexcharts-trellis-menu-item {
|
|
1716
|
-
border: none;
|
|
1717
|
-
background: none;
|
|
1718
|
-
text-align: left;
|
|
1719
|
-
font-size: 12px;
|
|
1720
|
-
padding: 5px 8px;
|
|
1721
|
-
border-radius: 3px;
|
|
1722
|
-
cursor: pointer;
|
|
1723
|
-
color: var(--apx-fore, #373d3f);
|
|
1724
|
-
}
|
|
1725
|
-
.apexcharts-trellis-menu-item:hover {
|
|
1726
|
-
background: rgba(120, 120, 120, 0.12);
|
|
1727
|
-
}
|
|
1728
|
-
.apexcharts-trellis-toolbar {
|
|
1729
|
-
position: absolute;
|
|
1730
|
-
top: 0;
|
|
1731
|
-
right: 0;
|
|
1732
|
-
display: flex;
|
|
1733
|
-
gap: 2px;
|
|
1734
|
-
z-index: 12;
|
|
1735
|
-
}
|
|
1736
|
-
.apexcharts-trellis-tool {
|
|
1737
|
-
border: 0;
|
|
1738
|
-
background: transparent;
|
|
1739
|
-
padding: 2px;
|
|
1740
|
-
cursor: pointer;
|
|
1741
|
-
border-radius: 3px;
|
|
1742
|
-
color: #6e8192;
|
|
1743
|
-
line-height: 0;
|
|
1744
|
-
}
|
|
1745
|
-
.apexcharts-trellis-tool:hover {
|
|
1746
|
-
color: var(--apx-fore, #373d3f);
|
|
1747
|
-
}
|
|
1748
|
-
.apexcharts-trellis-tool.apexcharts-selected {
|
|
1749
|
-
color: var(--apx-accent, #008ffb);
|
|
1750
|
-
}
|
|
1751
|
-
.apexcharts-trellis-legend {
|
|
1752
|
-
display: flex;
|
|
1753
|
-
flex-wrap: wrap;
|
|
1754
|
-
justify-content: center;
|
|
1755
|
-
gap: 4px 14px;
|
|
1756
|
-
padding: 8px 10px 2px;
|
|
1757
|
-
}
|
|
1758
|
-
.apexcharts-trellis-legend-item {
|
|
1759
|
-
display: flex;
|
|
1760
|
-
align-items: center;
|
|
1761
|
-
gap: 6px;
|
|
1762
|
-
cursor: pointer;
|
|
1763
|
-
line-height: 1;
|
|
1764
|
-
}
|
|
1765
|
-
.apexcharts-trellis-legend-item .apexcharts-legend-marker {
|
|
1766
|
-
width: 12px;
|
|
1767
|
-
height: 12px;
|
|
1768
|
-
border-radius: 50%;
|
|
1769
|
-
display: inline-block;
|
|
1770
|
-
}
|
|
1771
|
-
.apexcharts-trellis-legend-item .apexcharts-legend-text {
|
|
1772
|
-
font-size: 12px;
|
|
1773
|
-
color: var(--apx-fore, #373d3f);
|
|
1774
|
-
}
|
|
1775
|
-
.apexcharts-trellis-legend-item.apexcharts-inactive-legend {
|
|
1776
|
-
opacity: 0.45;
|
|
1777
|
-
}
|
|
1778
|
-
|
|
1779
|
-
/* Printing (#3352). The sheet is narrower than the screen and nothing reports
|
|
1780
|
-
its width to the page, so a chart laid out for the screen would be cropped at
|
|
1781
|
-
the edge of the paper. The chart lays itself out again for print (see
|
|
1782
|
-
chart.print in the options); this caps whatever is left over so it shrinks to
|
|
1783
|
-
fit rather than being cut. Shrink only: a chart narrower than the page keeps
|
|
1784
|
-
the size it was drawn at. */
|
|
1785
|
-
@media print {
|
|
1786
|
-
/* Scoped to the class the chart adds while it is laid out for the sheet: this
|
|
1787
|
-
pair of rules is only safe once an identity viewBox is in place, since
|
|
1788
|
-
without one a capped width crops the drawing instead of scaling it. A chart
|
|
1789
|
-
with chart.print.enabled:false gets neither, and prints as it always did. */
|
|
1790
|
-
.apexcharts-canvas.apexcharts-printing,
|
|
1791
|
-
.apexcharts-canvas.apexcharts-printing svg {
|
|
1792
|
-
max-width: 100% !important;
|
|
1793
|
-
}
|
|
1794
|
-
|
|
1795
|
-
.apexcharts-canvas.apexcharts-printing svg {
|
|
1796
|
-
height: auto !important;
|
|
1797
|
-
}
|
|
1798
|
-
|
|
1799
|
-
/* A scaled-down SVG is shorter than the box drawn for it, and the wrapper
|
|
1800
|
-
carries the pre-scale height inline, so without this a chart shrunk to fit a
|
|
1801
|
-
narrow column prints above a white gap the size of what it gave up. The
|
|
1802
|
-
host element's own inline min-height is cleared by _beforePrint. */
|
|
1803
|
-
.apexcharts-canvas.apexcharts-printing {
|
|
1804
|
-
height: auto !important;
|
|
1805
|
-
}
|
|
1806
|
-
|
|
1807
|
-
.apexcharts-toolbar {
|
|
1808
|
-
display: none !important;
|
|
1809
|
-
}
|
|
1810
|
-
}
|
|
1811
|
-
`,hi=globalThis.console;function gi(e){hi.error(e)}function _i(e){hi.warn(e)}var vi=`APEX-`,yi=new Date(`2027-07-31T00:00:00Z`),bi=`__apex_license_v1__`;function xi(){let e=globalThis,t=e[bi];return t||(t={key:null,listeners:new Set,result:null},e[bi]=t),t}var Si=class{static get licenseKey(){return xi().key}static set licenseKey(e){xi().key=e}static get listeners(){return xi().listeners}static get validationResult(){return xi().result}static set validationResult(e){xi().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){if(!e)return this.licenseKey=null,void this.publish({expired:!1,signatureVerified:!1,valid:!1});let t=this.validateKey(e);t.valid||e===this.licenseKey||!this.validationResult?.valid?(this.licenseKey=e,this.publish(t),t.valid||gi(`[Apex] ${t.message}`)):_i(`[Apex] Ignoring license key: ${t.message??`it is not valid`} A valid license is already active on this page.`)}static validateKey(e){let t=this.parseKey(e),n=this.validateStructure(e,t);if(!n.valid||!t?.signature)return n;let r=this.verdicts.get(e);return!1===r?{data:t.data,expired:!1,message:`Invalid license key. The license signature does not verify.`,signatureVerified:!0,valid:!1}:(r===void 0&&this.verifySignature(e,t,n),h(m({},n),{signatureVerified:!0===r}))}static _resetSignatureState(){this.verdicts.clear(),this.verifying.clear(),this.warnedUnverifiable=!1,this.epoch++}static base64ToBytes(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`),n=t.padEnd(4*Math.ceil(t.length/4),`=`),r=globalThis.atob;if(typeof r!=`function`)throw Error(`no base64 decoder available`);let i=r(n),a=new Uint8Array(i.length);for(let e=0;e<i.length;e++)a[e]=i.charCodeAt(e);return a}static canonicalPayload(e){let t=e.domains&&e.domains.length>0?e.domains.join(`,`):``;return`v1|${e.issueDate}|${e.expiryDate}|${e.plan}|${t}`}static notify(e){for(let t of this.listeners)try{t(e)}catch{}}static parseKey(e){if(typeof e!=`string`||!e.startsWith(vi))return null;let t=e.slice(5);if(!t)return null;try{let 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:typeof n.sig==`string`&&n.sig?n.sig:null}:null}catch{return null}}static publish(e){this.validationResult=e,this.notify(e)}static validateStructure(e,t){let n=e=>({expired:!1,message:e,signatureVerified:!1,valid:!1});if(typeof e!=`string`||!e.startsWith(vi))return n(`Invalid license key format. License key must start with "APEX-".`);if(!t)return n(`Invalid license key. Unable to decode license data.`);let{data:r,signature:i}=t;if(!i&&new Date>=yi)return n(`This license key is in the old unsigned format, which is no longer accepted. Please request a replacement key.`);if(new Date(r.expiryDate)<new Date)return{data:r,expired:!0,message:`License expired on ${r.expiryDate}. Please renew your license.`,signatureVerified:!1,valid:!1};if(r.domains&&r.domains.length>0){let e=typeof location>`u`?``:location.hostname;if(!r.domains.some((t=>e===t||e.endsWith(`.${t}`))))return{data:r,expired:!1,message:`License is not valid for this domain (${e}). Allowed domains: ${r.domains.join(`, `)}.`,signatureVerified:!1,valid:!1}}return{data:r,expired:!1,signatureVerified:!1,valid:!0}}static verifySignature(e,t,n){return _(this,null,function*(){if(this.verifying.has(e)||this.verdicts.has(e))return;this.verifying.add(e);let r=this.epoch,i=globalThis.crypto?.subtle;if(!i||this.publicKeysSpki.length===0)return this.verifying.delete(e),void(this.warnedUnverifiable||(this.warnedUnverifiable=!0,_i(i?`[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.`)));let a=new TextEncoder().encode(this.canonicalPayload(t.data)),o=!1;for(let e of this.publicKeysSpki){try{let n=yield i.importKey(`spki`,this.base64ToBytes(e),{name:`ECDSA`,namedCurve:`P-256`},!1,[`verify`]);o=yield i.verify({hash:`SHA-256`,name:`ECDSA`},n,this.base64ToBytes(t.signature),a)}catch{o=!1}if(o)break}if(this.verifying.delete(e),this.epoch!==r)return;if(this.verdicts.set(e,o),o){let t=h(m({},n),{signatureVerified:!0});this.licenseKey===e?this.publish(t):this.notify(t);return}let s=`Invalid license key. The license signature does not verify.`,c={data:t.data,expired:!1,message:s,signatureVerified:!0,valid:!1};this.licenseKey===e?this.publish(c):this.notify(c),gi(`[Apex] ${s}`)})}};Si.publicKeysSpki=[`MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEQIaK9UMD6n0oR/FIy8QdL0uSzKMQlf1BB+tOrji4/WuHsyRNxeDhVykoSsNURozMi1xhmqWvBH1L//xIfugTPA==`],Si.verdicts=new Map,Si.verifying=new Set,Si.warnedUnverifiable=!1,Si.epoch=0;var Ci=Si,wi=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&&typeof document<`u`?(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(){let e=this.WATERMARK_TEXT;return`url("data:image/svg+xml,${encodeURIComponent(`
|
|
1812
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="300" height="200">
|
|
1813
|
-
<text
|
|
1814
|
-
x="50%"
|
|
1815
|
-
y="50%"
|
|
1816
|
-
dominant-baseline="middle"
|
|
1817
|
-
text-anchor="middle"
|
|
1818
|
-
font-family="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Arial, sans-serif"
|
|
1819
|
-
font-size="18"
|
|
1820
|
-
font-weight="600"
|
|
1821
|
-
fill="rgba(134, 134, 134, 0.1)"
|
|
1822
|
-
transform="rotate(-35, 100, 60)"
|
|
1823
|
-
>${e}</text>
|
|
1824
|
-
</svg>
|
|
1825
|
-
`.trim())}")`}static erase(e){var t;(t=this.node(e))==null||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),typeof getComputedStyle==`function`&&getComputedStyle(e).position===`static`&&(e.style.position=`relative`),t}static reconcile(){let e=Ci.isLicenseValid();for(let t of this.managed)t.isConnected?e?this.erase(t):this.paint(t):this.managed.delete(t)}static setManaged(e,t){!1===t?.manage?this.managed.delete(e):this.track(e)}static track(e){this.managed.add(e),this.subscribed||(this.subscribed=!0,Ci.onChange((()=>{this.reconcile()})))}};wi.WATERMARK_ATTR=`data-apexcharts-watermark`,wi.WATERMARK_TEXT=`APEXCHARTS`,wi.ATTR=`data-apexcharts-watermark`,wi.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`},wi.managed=new Set,wi.subscribed=!1;var Ti=wi,Ei=`https://apexcharts.com/pricing`,Di=new Set;function Oi(e){Di.delete(e)}function ki(e,t){let n=e&&e.config&&e.config.chart||{},r=[];n.type===`unit`&&r.push(`unit`),n.requestedType===`raincloud`&&r.push(`raincloud`),t.trellis&&typeof t.trellis.isActive==`function`&&t.trellis.isActive()&&r.push(`trellis`),t.storyboard&&t.storyboard._used&&r.push(`storyboard`);let i=n.link;return t.linkedViews&&i&&(i.enabled===!0||typeof i.dimension==`function`)&&r.push(`link`),t.ink&&n.ink&&n.ink.enabled===!0&&r.push(`ink`),t.measure&&n.measure&&n.measure.enabled===!0&&r.push(`measure`),t.contextMenu&&n.contextMenu&&n.contextMenu.enabled===!0&&r.push(`context-menu`),t.perspectives&&t.perspectives._used&&r.push(`perspectives`),t.history&&n.history&&n.history.enabled===!0&&r.push(`history`),r}function Ai(e){let t=e&&e.config&&e.config.chart&&e.config.chart.license;if(t)return t;let n=Ci.getKey();if(n)return n;let r=v.getApex();return r&&r.license?r.license:null}var ji=new Set([`premium`,`enterprise`]);function Mi(e){if(!e)return!1;let t=Ci.validateKey(e);if(!t.valid)return!1;let n=t.data&&t.data.plan;return typeof n==`string`&&ji.has(n.toLowerCase())}function Ni(e,t){let n=Ti.add(t,{manage:!1});if(!n||typeof MutationObserver>`u`||e._wmNodeObserver&&e._wmObservedNode===n)return;e._wmNodeObserver&&e._wmNodeObserver.disconnect();let r=new MutationObserver(()=>{let e=Ti.node(t);e&&(r.disconnect(),Ti.applyStyles(e),r.takeRecords(),r.observe(e,{attributes:!0,attributeFilter:[`style`]}))});r.observe(n,{attributes:!0,attributeFilter:[`style`]}),e._wmNodeObserver=r,e._wmObservedNode=n}function Pi(e,t){if(Ni(e,t),typeof MutationObserver>`u`||e._wmWrapObserver)return;let n=new MutationObserver(()=>{Ti.node(t)||Ni(e,t)});n.observe(t,{childList:!0}),e._wmWrapObserver=n}function Fi(e,t){e._wmWrapObserver&&=(e._wmWrapObserver.disconnect(),null),e._wmNodeObserver&&=(e._wmNodeObserver.disconnect(),null),e._wmObservedNode=null;let n=t||e.w&&e.w.dom&&e.w.dom.elWrap;n&&Ti.remove(n,{manage:!1})}function Ii(e,t,n){if(e._premiumLicenseNotified)return;e._premiumLicenseNotified=!0;let r=n.length>1;if(!t){console.warn(`[ApexCharts] Premium feature${r?`s`:``} in use (${n.join(`, `)}) without a license. Running in trial mode with a watermark. Get a license: ${Ei}`);return}let i=Ci.validateKey(t);if(i.valid){let e=i.data&&i.data.plan||`current`;console.warn(`[ApexCharts] Premium feature${r?`s`:``} in use (${n.join(`, `)}) require a Premium or Enterprise license; the ${e} plan does not include ${r?`them`:`it`}. Running in trial mode with a watermark. Upgrade: ${Ei}`);return}t!==Ci.getKey()&&console.error(`[Apex] ${i.message}`)}function Li(e,t){try{if(!v.isBrowser())return;if(e&&e.globals&&e.globals.isDestroyed){Di.delete(t);return}let n=e&&e.dom&&e.dom.elWrap;if(!n)return;let r=ki(e,t);if(r.length===0){Di.delete(t),Fi(t,n);return}Di.add(t);let i=Ai(e);if(Mi(i)){Fi(t,n);return}Pi(t,n),Ii(t,i,r)}catch{}}function Ri(){if(!v.isBrowser())return;let e=new Set,t=v.getApex(),n=t&&t._chartInstances;Array.isArray(n)&&n.forEach(t=>{let n=t&&t.chart;n&&n.w&&!n.w.globals.isDestroyed&&(e.add(n),Li(n.w,n))}),Array.from(Di).forEach(t=>{let n=t&&t.w,r=n&&n.dom&&n.dom.elWrap;if(!n||n.globals.isDestroyed||!r||r.isConnected===!1){Di.delete(t);return}e.has(t)||Li(n,t)})}Ci.onChange(Ri);var zi=class e{constructor(e,t){g(this,`core`),g(this,`responsive`),g(this,`axes`),g(this,`grid`),g(this,`graphics`),g(this,`coreUtils`),g(this,`crosshairs`),g(this,`events`),g(this,`fill`),g(this,`localization`),g(this,`options`),g(this,`series`),g(this,`theme`),g(this,`formatters`),g(this,`titleSubtitle`),g(this,`dimensions`),g(this,`updateHelpers`),g(this,`tooltip`),g(this,`data`),g(this,`animations`),g(this,`exports`),g(this,`legend`),g(this,`toolbar`),g(this,`zoomPanSelection`),g(this,`keyboardNavigation`),g(this,`annotations`),g(this,`morphTypeChange`),g(this,`timeScale`),g(this,`_keyboardNavigation`),g(this,`_zoomPanSelection`),g(this,`windowResizeHandler`),g(this,`parentResizeHandler`),g(this,`publicMethods`,[]),g(this,`eventList`,[]),g(this,`_renderPromise`,null),g(this,`_parentResizeWaiter`,null),g(this,`_printRestore`,null),g(this,`beforePrintHandler`),g(this,`afterPrintHandler`),g(this,`config`),g(this,`perspectives`),g(this,`storyboard`),g(this,`history`),g(this,`linkedViews`),g(this,`trellis`),g(this,`ink`),g(this,`measure`),g(this,`contextMenu`),g(this,`weave`),g(this,`waterfall`),g(this,`streamgraph`),g(this,`renderer`),g(this,`rendererController`),this.opts=t,this.ctx=this,this.w=new le(t).init(),this.el=e,this.w.globals.cuid=O.randomId(),this.w.globals.chartID=this.w.config.chart.id?O.escapeString(this.w.config.chart.id):this.w.globals.cuid,Je(this.w),new Wr(this).initModules(),this.lastUpdateOptions=null,this._updateStats={fast:0,fastWithAxes:0,full:0},this.create=this.create.bind(this),v.isBrowser()&&(this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this),this.beforePrintHandler=this._beforePrint.bind(this),this.afterPrintHandler=this._afterPrint.bind(this))}render(){if(!this.w?.config?.chart)return Promise.reject(Error("ApexCharts: chart configuration is missing or invalid. Ensure the options object includes a `chart` property."));if(this._renderPromise)return this._renderPromise;let e=new Promise((e,t)=>{if(O.elementExists(this.el)){Apex._chartInstances===void 0&&(Apex._chartInstances=[]),this.w.config.chart.id&&Apex._chartInstances.push({id:this.w.globals.chartID,group:this.w.config.chart.group,chart:this}),this.setLocale(this.w.config.chart.defaultLocale);let n=this.w.config.chart.events.beforeMount;typeof n==`function`&&n(this,this.w),this.events.fireEvent(`beforeMount`,[this,this.w]);let r=this.w.config.trellis,i=!!(r&&(r.by||r.row||r.column)),a=!!(i&&this.trellis&&this.trellis.isActive());if(i&&!this.trellis&&console.warn("ApexCharts: `trellis` requires the trellis feature, which is not in the default bundle. Bundler: import 'apexcharts/features/trellis'. Script tag: add <script src='.../dist/features/trellis.js'> after apexcharts.js. Rendering as a single chart."),this.w.config.chart?.measure?.enabled&&!this.measure&&console.warn("ApexCharts: `chart.measure` requires the measure feature, which is not in the default bundle. Bundler: import 'apexcharts/features/measure'. Script tag: add <script src='.../dist/features/measure.js'> after apexcharts.js."),this.w.config.chart?.link?.enabled&&!this.linkedViews&&console.warn("ApexCharts: `chart.link` requires the link feature, which is not in the default bundle. Bundler: import 'apexcharts/features/link'. Script tag: add <script src='.../dist/features/link.js'> after apexcharts.js."),!this.ink){let e=this.w.config.chart?.ink?.enabled,t=(this.w.config.annotations?.points??[]).some(e=>e&&e.draggable);(e||t)&&console.warn("ApexCharts: `chart.ink` / `annotations.points[].draggable` requires the ink feature, which is not in the default bundle. Bundler: import 'apexcharts/features/ink'. Script tag: add <script src='.../dist/features/ink.js'> after apexcharts.js.")}if(this.w.config.chart?.contextMenu?.enabled&&!this.contextMenu&&console.warn("ApexCharts: `chart.contextMenu` requires the context-menu feature, which is not in the default bundle. Bundler: import 'apexcharts/features/context-menu'. Script tag: add <script src='.../dist/features/context-menu.js'> after apexcharts.js."),this.w.config.chart?.history?.enabled&&!this.history&&console.warn("ApexCharts: `chart.history` requires the history feature, which is not in the default bundle. Bundler: import 'apexcharts/features/history'. Script tag: add <script src='.../dist/features/history.js'> after apexcharts.js."),v.isBrowser()){a||(window.addEventListener(`resize`,this.windowResizeHandler),fi(this.el.parentNode,this.parentResizeHandler),this._printEnabled()&&(window.addEventListener(`beforeprint`,this.beforePrintHandler),window.addEventListener(`afterprint`,this.afterPrintHandler)));let e=this.el.getRootNode&&this.el.getRootNode(),t=O.is(`ShadowRoot`,e),n=this.el.ownerDocument,r=t?e.getElementById(`apexcharts-css`):n.getElementById(`apexcharts-css`);if(!r){r=T.createElementNS(`http://www.w3.org/1999/xhtml`,`style`),r.id=`apexcharts-css`,r.textContent=mi;let i=this.opts.chart?.nonce||this.w.config.chart.nonce;i&&r.setAttribute(`nonce`,i),t?e.prepend(r):this.w.config.chart.injectStyleSheet!==!1&&n.head.appendChild(r)}}if(a){this.trellis.render().then(()=>{Li(this.w,this),typeof this.w.config.chart.events.mounted==`function`&&this.w.config.chart.events.mounted(this,this.w),this.events.fireEvent(`mounted`,[this,this.w]),e(this)}).catch(e=>{let n=e instanceof Error?e:Error(String(e)),r=n;r.chartId=this.w?.globals?.chartID,r.el=this.el,t(n)});return}let o=this.create(this.w.config.series,{});if(!o)return e(this);this.mount(o).then(()=>{typeof this.w.config.chart.events.mounted==`function`&&this.w.config.chart.events.mounted(this,this.w),this.events.fireEvent(`mounted`,[this,this.w]),e(o)}).catch(e=>{let n=e instanceof Error?e:Error(String(e)),r=n;r.chartId=this.w?.globals?.chartID,r.el=this.el,t(n)})}else t(Error(`Element not found`))});return this._renderPromise=e,e.catch(()=>{this._renderPromise===e&&(this._renderPromise=null)}),e}create(e,t){var n,r,i,a,o;let s=this.w;this.core||new Wr(this).initModules();let c=this.w.globals;if(c.noData=!1,c.animationEnded=!1,!O.elementExists(this.el)||(this.responsive.checkResponsiveConfig(t),Je(s),s.config.xaxis.convertedCatToNumeric&&new ie(s.config).convertCatToNumericXaxis(s.config,this.ctx),this.core.setupElements(),s.config.chart.type===`treemap`&&(s.config.grid.show=!1,s.config.yaxis[0].show=!1),c.svgWidth===0))return c.animationEnded=!0,null;let l=e;e.forEach((e,t)=>{e.hidden&&(l=this.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:t}))});let u=ue.checkComboSeries(l,s.config.chart.type);c.comboCharts=u.comboCharts,c.comboBarCount=u.comboBarCount;let d=l.every(e=>e.data&&e.data.length===0);(l.length===0||d&&c.collapsedSeries.length<1)&&this.series.handleNoData(),v.isBrowser()&&this.events.setupEventHandlers();let f=this.data.parseData(l);this._writeParsedSeriesData(f.seriesData),this._writeParsedRangeData(f.rangeData),this._writeParsedCandleData(f.candleData),this._writeParsedLabelData(f.labelData),this._writeParsedAxisFlags(f.axisFlags),(n=this.rendererController)==null||n.resolve(),(r=this.weave)==null||r.dispatch(`afterParse`),this.theme.init(),new it(this.w,this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),(!c.noData||c.collapsedSeries.length===s.seriesData.series.length||s.config.legend.showForSingleSeries)&&((i=this.legend)==null||i.init()),this.series.hasAllSeriesEqualX(),c.axisCharts&&(this.core.coreCalculations(),s.config.xaxis.type!==`category`&&this.formatters.setLabelFormatters(),this.ctx.toolbar&&(this.ctx.toolbar.minX=s.globals.minX,this.ctx.toolbar.maxX=s.globals.maxX)),this.formatters.heatmapLabelFormatters(),new ue(this.w).getLargestMarkerSize();let p=this.dimensions.plotCoords();this._writeLayoutCoords(p.layout);let m=this.core.xySettings();(a=this.weave)==null||a.dispatch(`afterScales`,{xyRatios:m}),this.grid.createGridMask();let h=this.core.plotChartType(l,m),g=new st(this.w,this);return g.bringForward(),s.config.dataLabels.background.enabled&&g.dataLabelsBackground(),this.core.shiftGraphPosition(),(o=this.legend?.heatmapGradientLegend)==null||o.repositionToPlot(),s.globals.dataPoints>50&&s.dom.elWrap.classList.add(`apexcharts-disable-transitions`),{elGraph:h,xyRatios:m,dimensions:{plot:{left:s.layout.translateX,top:s.layout.translateY,width:s.layout.gridWidth,height:s.layout.gridHeight}}}}mount(e=null){let t=this,n=t.w;return new Promise((r,i)=>{var a,o,s,c,l,u,d,f,p,m;if(t.el===null)return i(Error(`Not enough data to display or target element not found`));n.globals.allSeriesCollapsed&&t.series.handleNoData(),t.grid=new dt(t.w,t);let h=t.grid.drawGrid(),g=Wr._featureRegistry.get(`annotations`);if(t.annotations=g?new g(t.w,{theme:t.theme,timeScale:t.timeScale}):null,(a=t.annotations)==null||a.drawImageAnnos(),(o=t.annotations)==null||o.drawTextAnnos(),n.config.grid.position===`back`&&(h&&n.dom.elGraphical.add(h.el),h?.elGridBorders?.node&&n.dom.elGraphical.add(h.elGridBorders)),Array.isArray(e.elGraph))for(let t=0;t<e.elGraph.length;t++)n.dom.elGraphical.add(e.elGraph[t]);else n.dom.elGraphical.add(e.elGraph);n.config.grid.position===`front`&&(h&&n.dom.elGraphical.add(h.el),h?.elGridBorders?.node&&n.dom.elGraphical.add(h.elGridBorders)),(s=t.waterfall)==null||s.drawConnectors(),(c=t.streamgraph)==null||c.draw(),n.config.xaxis.crosshairs.position===`front`&&t.crosshairs.drawXCrosshairs(),n.config.yaxis[0].crosshairs.position===`front`&&t.crosshairs.drawYCrosshairs(),n.config.chart.type!==`treemap`&&t.axes.drawAxis(n.config.chart.type,h);let _=new ut(this.w,this.ctx,h),y=new ht(this.w,{theme:this.theme,timeScale:this.timeScale},h);if(h!==null&&(_.xAxisLabelCorrections(),y.setYAxisTextAlignments(),n.config.yaxis.map((e,t)=>{n.globals.ignoreYAxisIndexes.indexOf(t)===-1&&y.yAxisTitleRotate(t,e.opposite)})),(l=t.annotations)==null||l.drawAxesAnnotations(),!n.globals.noData){if(v.isBrowser()&&n.config.tooltip.enabled&&!n.globals.noData&&((u=t.w.globals.tooltip)==null||u.drawTooltip(e.xyRatios)),n.config.chart.accessibility.enabled&&n.config.chart.accessibility.keyboard.enabled&&n.config.chart.accessibility.keyboard.navigation.enabled&&((d=t.keyboardNavigation)==null||d.init()),v.isBrowser()&&n.globals.axisCharts&&(n.axisFlags.isXNumeric||n.config.xaxis.convertedCatToNumeric||n.axisFlags.isRangeBar))(n.config.chart.zoom.enabled||n.config.chart.selection&&n.config.chart.selection.enabled||n.config.chart.pan&&n.config.chart.pan.enabled)&&((f=t.zoomPanSelection)==null||f.init({xyRatios:e.xyRatios}));else{let e=n.config.chart.toolbar.tools;[`zoom`,`zoomin`,`zoomout`,`selection`,`pan`,`reset`].forEach(t=>{e[t]=!1})}n.config.chart.toolbar.show&&!n.globals.allSeriesCollapsed&&((p=t.toolbar)==null||p.createToolbar())}(m=t.weave)==null||m.dispatch(`draw`,{pass:`full`,xyRatios:e?.xyRatios}),n.globals.memory.methodsToExec.length>0&&n.globals.memory.methodsToExec.forEach(e=>{e.method(e.params,!1,e.context)}),!n.globals.axisCharts&&!n.globals.noData&&t.core.resizeNonAxisCharts(),Li(n,t),r(t)})}destroy(){this.trellis&&this.trellis.teardown(),this._renderPromise=null,v.isBrowser()&&(window.removeEventListener(`resize`,this.windowResizeHandler),pi(this.el.parentNode,this.parentResizeHandler),clearTimeout(this.w.globals.resizeTimer??void 0),clearTimeout(this._parentResizeWaiter??void 0),this._parentResizeWaiter=null,window.removeEventListener(`beforeprint`,this.beforePrintHandler),window.removeEventListener(`afterprint`,this.afterPrintHandler));let e=this.w.config.chart.id;e&&Array.isArray(Apex._chartInstances)&&Apex._chartInstances.forEach((t,n)=>{t.id===O.escapeString(e)&&Apex._chartInstances.splice(n,1)}),this._keyboardNavigation&&this._keyboardNavigation.destroy(),Fi(this),Oi(this),new Gr(this.ctx).clear({isUpdating:!1})}updateOptions(t,n=!1,r=!0,i=!0,a=!0){let o=this.w;if(t&&`series`in t&&!Array.isArray(t.series)&&(console.warn("ApexCharts: updateOptions() ignored `series` because it is not an array."),t=m({},t),delete t.series),this.trellis&&this.trellis._mounted)return this.opts=O.extend(this.opts||{},t||{}),this.w.config=O.extend(o.config,t||{}),this.trellis.teardown(),this.render();if(o.interact.selection=void 0,this.lastUpdateOptions){if(O.shallowEqual(this.lastUpdateOptions,t))return Promise.resolve(this);if(t.series&&this.lastUpdateOptions.series&&!e._optionsTooBigToCompare(t)&&O.stringifyForCompare(this.lastUpdateOptions.series)===O.stringifyForCompare(t.series)){let e=m({},t),n=m({},this.lastUpdateOptions);if(delete e.series,delete n.series,O.shallowEqual(e,n))return Promise.resolve(this)}}return t.series&&(this.data.resetParsingFlags(),this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map((e,t)=>this.updateHelpers._extendSeries(e,t))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),o.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,n,r,i,a)}updateSeries(e=[],t=!0,n=!0){return Array.isArray(e)?this.trellis&&this.trellis._mounted?this.trellis.updateSeries(e,t):(this.data.resetParsingFlags(),this.series.prepareDataUpdate(),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(e,t,n)):(console.warn(`ApexCharts: updateSeries() ignored the call because the series is not an array.`),Promise.resolve(this))}appendSeries(e,t=!0,n=!0){this.data.resetParsingFlags();let r=this.w.config.series.slice();return r.push(e),this.series.prepareDataUpdate(),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(r,t,n)}appendData(e,t=!0){let n=this;n.data.resetParsingFlags(),n.w.globals.dataChanged=!0,n.w.config.chart.animations.enabled&&n.series.getPreviousPaths();let r=n.w.globals.histogramRawSeries||n.w.globals.waterfallRawSeries||n.w.globals.dumbbellRawSeries||n.w.globals.streamgraphRawSeries;if(r){for(let t=0;t<r.length;t++){let n=e[t];if(n&&Array.isArray(n.data)&&Array.isArray(r[t].data))for(let e=0;e<n.data.length;e++)r[t].data.push(n.data[e])}return this.update()}let i=n.w.config.series.slice();for(let t=0;t<i.length;t++)if(e[t]!==null&&e[t]!==void 0){let n=e[t],r=i[t];for(let e=0;e<n.data.length;e++)r.data.push(n.data[e])}return Ct(i,n.w),n.w.config.series=i,t&&(n.w.globals.initialSeries=n.w.config.series),this.update()}static _optionsTooBigToCompare(e){let t=e&&e.series;if(!Array.isArray(t))return!1;let n=0;for(let e=0;e<t.length;e++){let r=t[e]&&t[e].data;if(n+=Array.isArray(r)?r.length:1,n>1e3)return!0}return!1}update(t){return new Promise((n,r)=>{if(t&&this.lastUpdateOptions&&!e._optionsTooBigToCompare(t)&&O.stringifyForCompare(this.lastUpdateOptions)===O.stringifyForCompare(t))return n(this);this.lastUpdateOptions=t&&!e._optionsTooBigToCompare(t)?O.clone(t):null,new Gr(this.ctx).clear({isUpdating:!0});let i=this.create(this.w.config.series,t??{});if(!i)return n(this);this.mount(i).then(()=>{var e;(e=this.morphTypeChange)==null||e.applyChromeFade(),Yt(this.w),sn(this.w),typeof this.w.config.chart.events.updated==`function`&&this.w.config.chart.events.updated(this,this.w),this.events.fireEvent(`updated`,[this,this.w]),this.w.globals.isDirty=!0,n(this)}).catch(e=>{r(e)})})}_fastAxisChromeRefresh(e){let t=this.w,n=t.globals;this._fastAxisBailReason=``;try{if(n.isBarHorizontal)return this._fastAxisBailReason=`barHorizontal`,!1;if(t.config.chart.sparkline.enabled)return!0;let e=t.config.annotations;if(e&&(e.yaxis&&e.yaxis.length||e.xaxis&&e.xaxis.length||e.points&&e.points.length||e.texts&&e.texts.length||e.images&&e.images.length))return this._fastAxisBailReason=`annotations`,!1;if(t.config.chart.ink&&t.config.chart.ink.enabled)return this._fastAxisBailReason=`ink`,!1;let r=this.dimensions;if(!r||!r.dimYAxis)return this._fastAxisBailReason=`noDimensions`,!1;let i=t.layout.yLabelsCoords,a=t.layout.yTitleCoords,o=r.dimYAxis.getyAxisLabelsCoords(),s=r.dimYAxis.getyAxisTitleCoords();t.layout.yLabelsCoords=[],t.layout.yTitleCoords=[],t.config.yaxis.map((e,n)=>{t.layout.yLabelsCoords.push({width:o[n].width,index:n}),t.layout.yTitleCoords.push({width:s[n].width,index:n})});let c=r.dimYAxis.getTotalYAxisWidth();if(c>r.yAxisWidth+2)return t.layout.yLabelsCoords=i,t.layout.yTitleCoords=a,this._fastAxisBailReason=`labelWidth ${c} > ${r.yAxisWidth}`,!1;let l=t.dom.elGraphical.node,u=l.querySelector(`.apexcharts-grid`),d=l.querySelector(`.apexcharts-grid-borders`);if(!u)return this._fastAxisBailReason=`missingGridNode`,!1;let f=u.parentNode,p=d?d.nextSibling:u.nextSibling;u.remove(),d&&d.remove(),l.querySelectorAll(`.apexcharts-xaxis-tick`).forEach(e=>e.remove()),this.grid=new dt(t,this);let m=this.grid.drawGrid();m&&m.el&&(f.insertBefore(m.el.node,p),m.elGridBorders&&m.elGridBorders.node&&f.insertBefore(m.elGridBorders.node,p));let h=new ut(this.w,this.ctx,m),g=l.querySelector(`.apexcharts-xaxis`);if(g){let e=g.parentNode,t=g.nextSibling;g.remove();let n=h.drawXaxis();e.insertBefore(n.node,t)}let _=new ht(this.w,{theme:this.theme,timeScale:this.timeScale},m);for(let e=0;e<t.config.yaxis.length;e++){if(n.ignoreYAxisIndexes.indexOf(e)!==-1)continue;let r=t.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${e}']`);if(!r)return this._fastAxisBailReason=`missingYAxisNode`,!1;let i=r.parentNode;if(!i)return this._fastAxisBailReason=`missingYAxisParent`,!1;let a=r.nextSibling;r.remove();let o=_.drawYaxis(e);i.insertBefore(o.node,a)}return m!==null&&(h.xAxisLabelCorrections(),_.setYAxisTextAlignments(),t.config.yaxis.map((e,t)=>{n.ignoreYAxisIndexes.indexOf(t)===-1&&_.yAxisTitleRotate(t,e.opposite)})),!0}catch(e){return this._fastAxisBailReason=`error: `+(e&&e.message),!1}}fastUpdate(e,t){return new Promise((n,r)=>{var i,a,o,s,c;try{let l=this.w,u=l.globals;u.shouldAnimate=e,u.dataChanged=!0,u.animationEnded=!1,ct.invalidateSelectors(l);let d=l.globals;d.maxY=-Number.MAX_VALUE,d.minY=Number.MIN_VALUE,d.minYArr=[],d.maxYArr=[],d.maxX=-Number.MAX_VALUE,d.minX=Number.MAX_VALUE,d.initialMaxX=-Number.MAX_VALUE,d.initialMinX=Number.MAX_VALUE,d.yAxisScale=[],d.xAxisScale=null,d.xAxisTicksPositions=[],d.xRange=0,d.yRange=[],d.zRange=0,d.xTickAmount=0,d.multiAxisTickAmount=0,d.pointsArray=[],d.barCanvasCoords=null,d.dataLabelsRects=[],d.lastDrawnDataLabelsIndexes=[],d.textRectsCache=new Map,d.domCache=new Map,d.cachedSelectors={},d.disableZoomIn=!1,d.disableZoomOut=!1,u.axisCharts&&(this.core.coreCalculations(),l.config.xaxis.type!==`category`&&this.formatters.setLabelFormatters()),this.formatters.heatmapLabelFormatters();let f=this.core.xySettings();this._zoomPanSelection&&(this._zoomPanSelection.xyRatios=f);let p=JSON.stringify({y:(u.yAxisScale||[]).map(e=>e?e.result:null),xMin:u.minX,xMax:u.maxX}),m=u.axisCharts&&t!=null&&p!==t;if(m&&!this._fastAxisChromeRefresh(f))return this._updateStats.full++,this.update().then(()=>n(this)).catch(r);m?this._updateStats.fastWithAxes++:this._updateStats.fast++,(i=this.weave)==null||i.dispatch(`afterScales`,{pass:`fast`,xyRatios:f});let h=this.ctx.renderer,g=!!(h&&h.kind===`canvas`&&h.canRepaintInPlace&&h.canRepaintInPlace());g&&(h._repaintHostInPlace=!0);let _=l.dom.elGraphical.node;_.querySelectorAll((g?``:`.apexcharts-canvas-series-wrap, `)+`.apexcharts-plot-series, .apexcharts-series, .apexcharts-datalabels, .apexcharts-datalabels-background`).forEach(e=>e.parentNode?.removeChild(e));let y=this.core.plotChartType(l.config.series,f),b=_.querySelector(`.apexcharts-grid`),x=_.querySelector(`.apexcharts-xaxis`),S=Array.isArray(y)?y:[y],C=b&&l.config.grid.position===`front`?b:x;C?S.forEach(e=>{let t=e&&e.node?e.node:e;t&&_.insertBefore(t,C)}):S.forEach(e=>{l.dom.elGraphical.add(e)});let w=new st(l,this);w.bringForward(),l.config.dataLabels.background.enabled&&w.dataLabelsBackground(),(a=this.waterfall)==null||a.drawConnectors(),(o=this.streamgraph)==null||o.draw(),u.streamScrolled||Yt(l),sn(l),v.isBrowser()&&l.config.tooltip.enabled&&!u.noData&&((s=l.globals.tooltip)==null||s.drawTooltip(f)),(c=this.weave)==null||c.dispatch(`draw`,{pass:`fast`,xyRatios:f}),typeof l.config.chart.events.updated==`function`&&l.config.chart.events.updated(this,l),this.events.fireEvent(`updated`,[this,l]),Li(l,this),u.isDirty=!0,n(this)}catch(e){r(e)}})}getSyncedCharts(){let e=this.getGroupedCharts();return e.splice(0,0,this),e}getPanels(){return this.trellis?this.trellis.getPanels():[]}getPanel(e){return this.trellis?this.trellis.getPanel(e):null}getGroupedCharts(){return Apex._chartInstances.filter(e=>this!==e.chart&&!!this.w.config.chart.group&&this.w.config.chart.group===e.group).map(e=>e.chart)}static getChartByID(e){let t=O.escapeString(e);if(!Apex._chartInstances)return;let n=Apex._chartInstances.filter(e=>e.id===t)[0];return n&&n.chart}static trellis(t,n){if(!Wr._featureRegistry.get(`trellis`))return console.warn(`ApexCharts.trellis requires the trellis feature, which is not in the default bundle. Bundler: import 'apexcharts/features/trellis'. Script tag: add <script src='.../dist/features/trellis.js'> after apexcharts.js.`),null;let r=new e(t,n);return r.render(),r}static initOnLoad(){let t=document.querySelectorAll(`[data-apexcharts]`);for(let n=0;n<t.length;n++){let r=t[n],i=JSON.parse(t[n].getAttribute(`data-options`)??``);new e(r,i).render()}}static exec(e,t,...n){let r=this.getChartByID(e);if(!r)return;r.w.globals.isExecCalled=!0;let i=null;return r.publicMethods.indexOf(t)!==-1&&(i=r[t](...n)),i}static merge(e,t){return O.extend(e,t)}static getThemePalettes(){return mt()}static use(e){Jn(e)}static registerFeatures(e){Wr.registerFeatures(e)}static setLicense(t){return Ci.setLicense(t),Ri(),e}static registerPlugin(t){return li(t),e}static unregisterPlugin(t){return ui(t),e}static registerRenderer(e,t){Er.registerRenderer(e,t)}static registerSeriesType(t,n){let r=e._customSeriesFactory;return r?!n||typeof n.renderItem!=`function`?(console.warn(`[apexcharts] registerSeriesType("${t}") needs a def with a renderItem() function.`),e):Kn(t)&&!Gn(t)||N[t]?(console.warn(`[apexcharts] registerSeriesType("${t}") would override the built-in "${t}" chart type; pick another name.`),e):(Jn({[t]:r(t,n)}),Wn(t),e):(console.warn(`[apexcharts] registerSeriesType("${t}") requires the Marks feature: import 'apexcharts/features/marks'.`),e)}static unregisterSeriesType(t){return Gn(t)&&qn(t),e}static registerTheme(t,n){return mn(t,n),e}static unregisterTheme(t){return gn(t),e}static registerEasing(t,n){return Re(t,n),e}static registerUnitLayout(t,n){return Jr(t,n),e}static unregisterUnitLayout(t){return Yr(t),e}static registerUnitMark(t,n){return $r(t,n),e}static unregisterUnitMark(t){return ei(t),e}static registerRowSource(t,n){return ri(t,n),e}static unregisterRowSource(t){return ai(t),e}rowSeries(e){let t=oi(this.w);return t&&t(this.w,e)||null}static crossfilter(t){if(!t||typeof t.id!=`string`)throw Error(`ApexCharts.crossfilter requires an { id } string.`);let n=e._crossfilterFactory;if(!n)return console.warn(`[apexcharts] ApexCharts.crossfilter(...) requires the link feature, which is not in the default bundle. Bundler: import 'apexcharts/features/link'. Script tag: add <script src='.../dist/features/link.js'> after apexcharts.js.`),null;let r=n(t);return Ri(),r}static getCrossfilter(t){let n=e._crossfilterGet;return n?n(t):null}clearCrossfilter(){var e;(e=this.linkedViews)==null||e.clearGroup()}startMeasure(){var e;(e=this.measure)==null||e.startMeasure()}stopMeasure(){var e;(e=this.measure)==null||e.stopMeasure()}clearMeasures(){var e;(e=this.measure)==null||e.clearMeasures()}toggleSeries(e){return this.series.toggleSeries(e)}highlightSeriesOnLegendHover(e,t){return this.series.toggleSeriesOnHover(e,t)}showSeries(e){this.series.showSeries(e)}hideSeries(e){this.series.hideSeries(e)}highlightSeries(e){this.series.highlightSeries(e)}isSeriesHidden(e){return this.series.isSeriesHidden(e)}resetSeries(e=!0,t=!0){this.series.resetSeries(e,t)}addEventListener(e,t){this.events.addEventListener(e,t)}removeEventListener(e,t){this.events.removeEventListener(e,t)}addXaxisAnnotation(e,t=!0,n=void 0){var r;let i=this;n&&(i=n),(r=i.annotations)==null||r.addXaxisAnnotationExternal(e,t,i)}addYaxisAnnotation(e,t=!0,n=void 0){var r;let i=this;n&&(i=n),(r=i.annotations)==null||r.addYaxisAnnotationExternal(e,t,i)}addPointAnnotation(e,t=!0,n=void 0){var r;let i=this;n&&(i=n),(r=i.annotations)==null||r.addPointAnnotationExternal(e,t,i)}clearAnnotations(e=void 0){var t;let n=this;e&&(n=e),n.lastUpdateOptions=null,(t=n.annotations)==null||t.clearAnnotations(n)}removeAnnotation(e,t=void 0){var n;let r=this;t&&(r=t),r.lastUpdateOptions=null,(n=r.annotations)==null||n.removeAnnotation(r,e)}getChartArea(){return this.w.dom.baseEl.querySelector(`.apexcharts-inner`)}getSeriesTotalXRange(e,t){return this.coreUtils.getSeriesTotalsXRange(e,t)}getHighestValueInSeries(e=0){return new pt(this.w).getMinYMaxY(e).highestY}getLowestValueInSeries(e=0){return new pt(this.w).getMinYMaxY(e).lowestY}getSeriesTotal(){return this.w.globals.seriesTotals}getState(){let e=this.w,t=e.globals;return{series:e.seriesData.series,seriesNames:e.seriesData.seriesNames,colors:t.colors,labels:e.labelData.labels,seriesTotals:t.seriesTotals,seriesPercent:t.seriesPercent,seriesXvalues:t.seriesXvalues,seriesYvalues:t.seriesYvalues,minX:t.minX,maxX:t.maxX,minY:t.minY,maxY:t.maxY,minYArr:t.minYArr,maxYArr:t.maxYArr,minXDiff:t.minXDiff,dataPoints:t.dataPoints,xAxisScale:t.xAxisScale,yAxisScale:t.yAxisScale,xTickAmount:t.xTickAmount,isXNumeric:e.axisFlags.isXNumeric,seriesYAxisMap:t.seriesYAxisMap,seriesYAxisReverseMap:t.seriesYAxisReverseMap,svgWidth:t.svgWidth,svgHeight:t.svgHeight,gridWidth:e.layout.gridWidth,gridHeight:e.layout.gridHeight,selectedDataPoints:e.interact.selectedDataPoints,collapsedSeriesIndices:t.collapsedSeriesIndices,zoomed:e.interact.zoomed,seriesX:e.seriesData.seriesX,seriesZ:e.seriesData.seriesZ,seriesCandleO:e.candleData.seriesCandleO,seriesCandleH:e.candleData.seriesCandleH,seriesCandleM:e.candleData.seriesCandleM,seriesCandleL:e.candleData.seriesCandleL,seriesCandleC:e.candleData.seriesCandleC,seriesRangeStart:e.rangeData.seriesRangeStart,seriesRangeEnd:e.rangeData.seriesRangeEnd,seriesGoals:e.seriesData.seriesGoals}}toggleDataPointSelection(e,t){return this.updateHelpers.toggleDataPointSelection(e,t)}zoomX(e,t){var n;(n=this.ctx.toolbar)==null||n.zoomUpdateOptions(e,t)}setLocale(e){this.localization.setCurrentLocaleValues(e)}dataURI(e){if(!this.ctx.exports)throw Error(`apexcharts: Exports feature is not registered. Import apexcharts/features/exports.`);return this.trellis&&this.trellis._mounted?this.trellis.exports.dataURI(e):this.ctx.exports.dataURI(e)}getSvgString(e){if(!this.ctx.exports)throw Error(`apexcharts: Exports feature is not registered. Import apexcharts/features/exports.`);return this.trellis&&this.trellis._mounted?this.trellis.exports.svgString():this.ctx.exports.getSvgString(e)}exportToCSV(e={}){if(!this.ctx.exports)throw Error(`apexcharts: Exports feature is not registered. Import apexcharts/features/exports.`);return this.trellis&&this.trellis._mounted?this.trellis.exports.download(`csv`):this.ctx.exports.exportToCSV(e)}promotePanel(e){return this.trellis&&this.trellis._mounted?this.trellis.promote(e):Promise.resolve()}restorePanels(){return this.trellis&&this.trellis._mounted?this.trellis.restorePromotion():Promise.resolve()}paper(){return this.w.dom.Paper}getActiveRenderer(){return this.rendererController?this.rendererController.getActiveKind():`svg`}refreshTokens(){return this.lastUpdateOptions=null,this.update()}drillDown(e){if(!this.ctx.drilldown)throw Error(`apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.`);return this.ctx.drilldown.drillDown(e)}drillUp(){if(!this.ctx.drilldown)throw Error(`apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.`);return this.ctx.drilldown.drillUp()}drillToRoot(){if(!this.ctx.drilldown)throw Error(`apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.`);return this.ctx.drilldown.drillToRoot()}clearDrilldownCache(e){if(!this.ctx.drilldown)throw Error(`apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.`);return this.ctx.drilldown.clearCache(e)}static _writeDataProps(e,t){for(let n of Object.keys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r&&`value`in r&&(e[n]=r.value)}}_writeParsedSeriesData(t){e._writeDataProps(this.w.seriesData,t)}_writeParsedRangeData(t){e._writeDataProps(this.w.rangeData,t)}_writeParsedCandleData(t){e._writeDataProps(this.w.candleData,t)}_writeParsedLabelData(t){e._writeDataProps(this.w.labelData,t)}_writeParsedAxisFlags(t){e._writeDataProps(this.w.axisFlags,t)}_writeLayoutCoords(t){e._writeDataProps(this.w.layout,t)}_parentResizeCallback(){if(this.w.config.chart.redrawOnParentResize){if(!this.w.globals.animationEnded){this._deferParentResize();return}this._windowResize()}}_deferParentResize(){if(this._parentResizeWaiter)return;let e=Date.now(),t=this.w.config.chart.animations?.speed||800,n=Math.min(Math.max(1e3+t*2,1500),15e3),r=()=>{if(this._parentResizeWaiter=null,!this.w.globals.isDestroyed&&O.elementExists(this.el)){if(this.w.globals.animationEnded||Date.now()-e>=n){this._windowResize();return}this._parentResizeWaiter=window.setTimeout(r,100)}};this._parentResizeWaiter=window.setTimeout(r,100)}_printEnabled(){let e=this.w.config.chart.print;return e!==!1&&e?.enabled!==!1}_beforePrint(){var e;if(this._printRestore||!this._printEnabled())return;let t=this.w,n=t.config.chart.print?.width??700;this._printRestore={width:t.config.chart.width},typeof n==`number`&&n>0&&t.globals.svgWidth>n&&this.updateHelpers._updateOptions({chart:{width:n}},!1,!1,!1,!1);let r=t.dom?.Paper?.node;if(r&&!r.getAttribute(`viewBox`)){r.setAttribute(`viewBox`,`0 0 ${t.globals.svgWidth} ${t.globals.svgHeight}`),this._printRestore.viewBoxAdded=!0,(e=t.dom?.elWrap)==null||e.classList.add(`apexcharts-printing`);let n=this.el;n&&n.style&&(this._printRestore.minHeight=n.style.minHeight,n.style.minHeight=`0`)}}_afterPrint(){var e,t;if(!this._printRestore)return;let n=this.w,r=this._printRestore;if(this._printRestore=null,r.viewBoxAdded){(e=n.dom?.Paper?.node)==null||e.removeAttribute(`viewBox`),(t=n.dom?.elWrap)==null||t.classList.remove(`apexcharts-printing`);let i=this.el;i&&i.style&&(i.style.minHeight=r.minHeight??``)}n.config.chart.width!==r.width&&(this.updateHelpers._updateOptions({chart:{width:r.width}},!1,!1,!1,!1),clearTimeout(n.globals.resizeTimer??void 0))}_windowResize(){clearTimeout(this.w.globals.resizeTimer??void 0),this.w.globals.resizeTimer=window.setTimeout(()=>{let e=this.w.globals;if(this.core&&e.lastResizeSignature){let t=this.core.getResizeSignature();if(t.w===e.lastResizeSignature.w&&t.h===e.lastResizeSignature.h&&t.iw===e.lastResizeSignature.iw)return}e.resized=!0,e.dataChanged=!1,this.ctx.update()},150)}_windowResizeHandler(){clearTimeout(this.w.globals.resizeTimer??void 0);let{redrawOnWindowResize:e}=this.w.config.chart;typeof e==`function`&&(e=e()),e&&this._windowResize()}};g(zi,`perspectives`,null);var G=zi,Bi=Object.defineProperty,Vi=Object.defineProperties,Hi=Object.getOwnPropertyDescriptors,Ui=Object.getOwnPropertySymbols,Wi=Object.prototype.hasOwnProperty,Gi=Object.prototype.propertyIsEnumerable,Ki=(e,t,n)=>t in e?Bi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,K=(e,t)=>{for(var n in t||={})Wi.call(t,n)&&Ki(e,n,t[n]);if(Ui)for(var n of Ui(t))Gi.call(t,n)&&Ki(e,n,t[n]);return e},q=(e,t)=>Vi(e,Hi(t)),qi=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),Ji=at,Yi=Xe,Xi=Ye,Zi=Je,Qi=Ke,$i=qe,ea=le,ta=Jn,na=U,ra=Gn,ia=Yn,aa=ue,oa=yt,sa=ur,ca=st,la=gt,ua=$e,da=Qe,fa=A,J=H,pa=it,ma=pt,ha=xt,ga=ft,Y=cn,_a=bn,va=Rn,ya=xn,ba=vt,xa=lt,Sa=dt,Ca=ut,wa=ht,Ta=Dn,Ea=Tn,Da=Sn,Oa=Cn,ka=wn,Aa=Gr,ja=Wr,Ma=_t,Na=dr,Pa=z,Fa=ie,Ia=ce,La=M,Ra=xr,za=br,Ba=mr,Va=yr,Ha=_r,Ua=Sr,Wa=pr,X=T,Ga=x,Ka=y,qa=b,Ja=me,Ya=we,Xa=he,Za=ge,Qa=Pe,$a=Fe,eo=Mr,to=zr,no=W,ro=Ir,io=Lr,ao=Rr,oo=Or,so=jr,co=Br,lo=Vr,uo=pe,fo=B,po=de,mo=fe,ho=pe,go=ae,_o=oe,vo=se,yo=k,Z=v,bo=ct,xo=fi,So=pi,Co=mt,Q=O,wo=Object.freeze(Object.defineProperty({__proto__:null,__apex_Animations:Yi,__apex_Animations_applyAnimationPolicy:Zi,__apex_Animations_applyProgressiveReveal:$i,__apex_Animations_computeStagger:Xi,__apex_Animations_prefersReducedMotion:Qi,__apex_Base:ea,__apex_BrowserAPIs_BrowserAPIs:X,__apex_ChartFactory_getChartClass:na,__apex_ChartFactory_isCustom:ra,__apex_ChartFactory_register:ta,__apex_Config:Pa,__apex_Constants_LINE_HEIGHT_RATIO:go,__apex_Constants_NICE_SCALE_ALLOWED_MAG_MSD:_o,__apex_Constants_NICE_SCALE_DEFAULT_TICKS:vo,__apex_Core:ia,__apex_CoreUtils:aa,__apex_Crosshairs:oa,__apex_DOMShim_SSRClassList:qa,__apex_DOMShim_SSRDOMShim:Ga,__apex_DOMShim_SSRElement:Ka,__apex_Data:sa,__apex_DataLabels:ca,__apex_DateTime:yo,__apex_Defaults:Fa,__apex_Environment_Environment:Z,__apex_Events:la,__apex_Fill:ua,__apex_Filters:da,__apex_Formatters:fa,__apex_Globals:Ia,__apex_Graphics:J,__apex_Markers:pa,__apex_Options:La,__apex_PathMorphing_arrayToPath:Za,__apex_PathMorphing_morphPaths:Ya,__apex_PathMorphing_parsePath:Ja,__apex_PathMorphing_pathBbox:Xa,__apex_PerformanceCache:bo,__apex_Range:ma,__apex_Resize_addResizeListener:xo,__apex_Resize_removeResizeListener:So,__apex_Responsive:ha,__apex_SVGAnimation_SVGAnimationRunner:Qa,__apex_SVGAnimation_installAnimationMethods:$a,__apex_SVGContainer:eo,__apex_SVGDraggable_installDraggable:to,__apex_SVGElement:no,__apex_SVGFilter_FilterBuilder:io,__apex_SVGFilter_SVGFilter:ro,__apex_SVGFilter_installFilterMethods:ao,__apex_SVGGradient_SVGGradient:oo,__apex_SVGPattern_SVGPattern:so,__apex_SVGSelectable_installSelectable:co,__apex_Scales:ga,__apex_Series:Y,__apex_Theme:_a,__apex_ThemePalettes_getThemePalettes:Co,__apex_TimeScale:va,__apex_TitleSubtitle:ya,__apex_Utils:Q,__apex_axes_Axes:ba,__apex_axes_AxesUtils:xa,__apex_axes_Grid:Sa,__apex_axes_XAxis:Ca,__apex_axes_YAxis:wa,__apex_charts_Scatter:Ji,__apex_dimensions_Dimensions:Ta,__apex_dimensions_Grid:Ea,__apex_dimensions_Helpers:Da,__apex_dimensions_XAxis:Oa,__apex_dimensions_YAxis:ka,__apex_helpers_Destroy:Aa,__apex_helpers_InitCtxVariables:ja,__apex_helpers_Localization:Ma,__apex_helpers_UpdateHelpers:Na,__apex_index_Box:uo,__apex_index_SVG:lo,__apex_math_Box:ho,__apex_math_Matrix:mo,__apex_math_Point:po,__apex_math_SVGNS:fo,__apex_tooltip_AxesTooltip:Ra,__apex_tooltip_Intersect:za,__apex_tooltip_Labels:Ba,__apex_tooltip_Marker:Va,__apex_tooltip_Position:Ha,__apex_tooltip_Tooltip:Ua,__apex_tooltip_Utils:Wa,default:G},Symbol.toStringTag,{value:`Module`})),To=class{constructor(e,t){this.w=e,this.ctx=t}svgStringToNode(e){return new DOMParser().parseFromString(e,`image/svg+xml`).documentElement}scaleSvgNode(e,t){let n=parseFloat(e.getAttributeNS(null,`width`)),r=parseFloat(e.getAttributeNS(null,`height`));e.setAttributeNS(null,`width`,n*t),e.setAttributeNS(null,`height`,r*t),e.setAttributeNS(null,`viewBox`,`0 0 `+n+` `+r)}inlineCanvasLayers(e){let t=this.w.dom.elWrap.querySelectorAll(`.apexcharts-series-canvas`);if(!t.length)return;let n=e.querySelectorAll(`.apexcharts-canvas-series`);for(let e=0;e<t.length&&e<n.length;e++){let r;try{r=t[e].toDataURL()}catch{continue}let i=n[e],a=document.createElementNS(fo,`image`);a.setAttribute(`x`,i.getAttribute(`x`)||`0`),a.setAttribute(`y`,i.getAttribute(`y`)||`0`),a.setAttribute(`width`,i.getAttribute(`width`)||`0`),a.setAttribute(`height`,i.getAttribute(`height`)||`0`),a.setAttribute(`href`,r),a.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,r),i.parentNode&&i.parentNode.replaceChild(a,i)}}queryStyleable(e,t){return Array.prototype.slice.call(e.querySelectorAll(t))}setStyleDefaults(e,t){Object.keys(t).forEach(n=>{e.style.getPropertyValue(n)===``&&e.style.setProperty(n,t[n])})}applyExportStyles(e){let t=this.w;this.queryStyleable(e,`style`).forEach(e=>e.remove()),this.queryStyleable(e,[`.apexcharts-tooltip`,`.apexcharts-toolbar`,`.apexcharts-xaxistooltip`,`.apexcharts-yaxistooltip`,`.apexcharts-xcrosshairs`,`.apexcharts-ycrosshairs`,`.apexcharts-zoom-rect`,`.apexcharts-selection-rect`].join(`, `)).forEach(e=>{e.style.setProperty(`display`,`none`,`important`)}),this.queryStyleable(e,`.apexcharts-flip-y`).forEach(e=>{this.setStyleDefaults(e,{transform:`scaleY(-1) translateY(-100%)`,"transform-origin":`top`,"transform-box":`fill-box`})}),this.queryStyleable(e,`.apexcharts-flip-x`).forEach(e=>{this.setStyleDefaults(e,{transform:`scaleX(-1)`,"transform-origin":`center`,"transform-box":`fill-box`})}),t.config.legend.show&&t.dom.elLegendWrap&&t.dom.elLegendWrap.children.length&&(this.queryStyleable(e,`.apexcharts-legend`).forEach(e=>{this.setStyleDefaults(e,{display:`flex`,overflow:`auto`,padding:`0 10px`});let t=e.classList,n=t.contains(`apx-legend-position-left`)||t.contains(`apx-legend-position-right`),r=t.contains(`apx-legend-position-top`)||t.contains(`apx-legend-position-bottom`);t.contains(`apexcharts-legend-group-horizontal`)&&this.setStyleDefaults(e,{"flex-direction":`column`}),n&&this.setStyleDefaults(e,{"flex-direction":`column`,bottom:`0`}),r&&this.setStyleDefaults(e,{"flex-wrap":`wrap`}),n||r&&t.contains(`apexcharts-align-left`)?this.setStyleDefaults(e,{"justify-content":`flex-start`,"align-items":`flex-start`}):r&&t.contains(`apexcharts-align-center`)?this.setStyleDefaults(e,{"justify-content":`center`,"align-items":`center`}):r&&t.contains(`apexcharts-align-right`)&&this.setStyleDefaults(e,{"justify-content":`flex-end`,"align-items":`flex-end`})}),this.queryStyleable(e,`.apexcharts-legend-group`).forEach(e=>{this.setStyleDefaults(e,{display:`flex`})}),this.queryStyleable(e,`.apexcharts-legend-group-vertical`).forEach(e=>{this.setStyleDefaults(e,{"flex-direction":`column-reverse`})}),this.queryStyleable(e,`.apexcharts-legend-series`).forEach(e=>{this.setStyleDefaults(e,{cursor:e.classList.contains(`apexcharts-no-click`)?`auto`:`pointer`,"line-height":`normal`,display:`flex`,"align-items":`center`})}),this.queryStyleable(e,`.apexcharts-legend-text`).forEach(e=>{this.setStyleDefaults(e,{position:`relative`,"font-size":`14px`})}),this.queryStyleable(e,`.apexcharts-legend-marker`).forEach(e=>{this.setStyleDefaults(e,{position:`relative`,display:`flex`,"align-items":`center`,"justify-content":`center`,cursor:`pointer`,"margin-right":`1px`})}),this.queryStyleable(e,`.apexcharts-inactive-legend`).forEach(e=>{this.setStyleDefaults(e,{opacity:`0.45`})}),this.queryStyleable(e,`.apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series`).forEach(e=>{e.style.setProperty(`display`,`none`,`important`)}))}resolveExportBackground(){let e=this.w,t=e.config.chart.background;return t&&t!==`transparent`?t:e.config.theme.mode===`dark`?`#343A3F`:`#fff`}collectFontFamilies(){let e=new Set,t=this.w;if(!Z.isBrowser()||!t.dom.elWrap)return e;let n=this.queryStyleable(t.dom.elWrap,`text, tspan, .apexcharts-legend-text, .apexcharts-title-text, .apexcharts-subtitle-text`);return[t.dom.elWrap,...n].forEach(t=>{let n=X.getComputedStyle(t),r=n&&n.fontFamily;r&&r.split(`,`).forEach(t=>{let n=t.trim().replace(/^['"]|['"]$/g,``);n&&e.add(n.toLowerCase())})}),e}collectFontFaceRules(){if(!Z.isBrowser())return Promise.resolve([]);let e=[],t=[],n=t=>{(t.match(/@font-face\s*\{[^}]*\}/gi)||[]).forEach(t=>{let n=t.match(/font-family\s*:\s*([^;}]+)/i);if(!n)return;let r=n[1].trim().replace(/^['"]|['"]$/g,``);e.push({family:r.toLowerCase(),css:t})})};return Array.from(document.styleSheets||[]).forEach(e=>{let r=null;try{r=e.cssRules}catch{r=null}if(r){Array.from(r).forEach(e=>{e.type===5&&e.cssText&&n(e.cssText)});return}e.href&&t.push(fetch(e.href).then(e=>e.ok?e.text():``).then(n).catch(()=>{}))}),Promise.all(t).then(()=>e)}embedFonts(e){let t=this.w;if(!Z.isBrowser()||!t.config.chart.toolbar.export.embedFonts||typeof fetch!=`function`)return Promise.resolve();let n=this.collectFontFamilies();return n.size?this.collectFontFaceRules().then(e=>{let t=e.filter(e=>n.has(e.family));return t.length?Promise.all(t.map(e=>this.inlineFontFaceUrls(e.css).catch(()=>null))):Promise.resolve([])}).then(t=>{let n=(t||[]).filter(Boolean).join(`
|
|
1826
|
-
`);if(!n)return;let r=document.createElementNS(fo,`style`);r.textContent=n,e.insertBefore(r,e.firstChild)}).catch(()=>{}):Promise.resolve()}inlineFontFaceUrls(e){let t=[],n=/url\(\s*(['"]?)([^'")]+)\1\s*\)/gi,r;for(;(r=n.exec(e))!==null;)r[2].startsWith(`data:`)||t.push(r[2]);return t.length?Promise.all(t.map(e=>this.fetchAsDataUri(e).then(t=>({url:e,dataUri:t})).catch(()=>({url:e,dataUri:null})))).then(t=>{let n=e,r=0;return t.forEach(({url:e,dataUri:t})=>{t&&(n=n.split(e).join(t),r++)}),r?n:null}):Promise.resolve(e.includes(`data:`)?e:null)}fetchAsDataUri(e){return typeof fetch!=`function`||typeof btoa!=`function`?Promise.reject(Error(`fetch unavailable`)):fetch(e).then(t=>{if(!t.ok)throw Error(`HTTP ${t.status} for ${e}`);let n=t.headers.get(`content-type`)||`application/octet-stream`;return t.arrayBuffer().then(e=>{let t=new Uint8Array(e),r=``,i=32768;for(let e=0;e<t.length;e+=i)r+=String.fromCharCode.apply(null,t.subarray(e,e+i));return`data:${n};base64,${btoa(r)}`})})}getSvgString(e){return new Promise(t=>{let n=this.w,r=e||n.config.chart.toolbar.export.scale||n.config.chart.toolbar.export.width/n.globals.svgWidth;r||=1;let i=n.globals.svgWidth*r,a=n.globals.svgHeight*r,o=n.dom.elWrap.cloneNode(!0);o.style.width=i+`px`,o.style.height=a+`px`,this.inlineCanvasLayers(o),this.applyExportStyles(o);let s=new XMLSerializer().serializeToString(o),c=`
|
|
1827
|
-
<svg xmlns="http://www.w3.org/2000/svg"
|
|
1828
|
-
version="1.1"
|
|
1829
|
-
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
1830
|
-
class="apexcharts-svg"
|
|
1831
|
-
xmlns:data="ApexChartsNS"
|
|
1832
|
-
transform="translate(0, 0)"
|
|
1833
|
-
width="${n.globals.svgWidth}px" height="${n.globals.svgHeight}px">
|
|
1834
|
-
<foreignObject width="100%" height="100%">
|
|
1835
|
-
<div xmlns="http://www.w3.org/1999/xhtml" style="width:${i}px; height:${a}px;">
|
|
1836
|
-
${s}
|
|
1837
|
-
</div>
|
|
1838
|
-
</foreignObject>
|
|
1839
|
-
</svg>
|
|
1840
|
-
`,l=this.svgStringToNode(c);r!==1&&this.scaleSvgNode(l,r),Promise.all([this.convertImagesToBase64(l),this.embedFonts(l)]).then(()=>{c=new XMLSerializer().serializeToString(l),t(c.replace(/ /g,` `))})})}convertImagesToBase64(e){let t=`http://www.w3.org/1999/xlink`,n=e.getElementsByTagName(`image`),r=Array.from(n).map(e=>{let n=e.getAttributeNS(t,`href`),r=e.getAttribute(`href`),i=n||r;if(!i||i.startsWith(`data:`))return Promise.resolve();let a=i=>{n&&e.setAttributeNS(t,`href`,i),(r||!n)&&e.setAttribute(`href`,i)};return this.fetchAsDataUri(i).then(a).catch(()=>this.getBase64FromUrl(i).then(a).catch(e=>{console.error(`Error converting image to base64:`,e)}))});return Promise.all(r)}getBase64FromUrl(e){return Z.isSSR()?Promise.resolve(e):new Promise((t,n)=>{let r=new Image;r.crossOrigin=`Anonymous`,r.onload=()=>{let e=document.createElement(`canvas`);e.width=r.width,e.height=r.height;let n=e.getContext(`2d`);n&&n.drawImage(r,0,0),t(e.toDataURL())},r.onerror=n,r.src=e})}svgUrl(){return new Promise(e=>{this.getSvgString().then(t=>{let n=new Blob([t],{type:`image/svg+xml;charset=utf-8`});e(URL.createObjectURL(n))})})}dataURI(e){return Z.isSSR()?Promise.resolve({imgURI:``}):new Promise(t=>{let n=this.w,r=e?e.scale||e.width/n.globals.svgWidth:1,i=document.createElement(`canvas`);i.width=n.globals.svgWidth*r,i.height=parseInt(n.dom.elWrap.style.height,10)*r;let a=this.resolveExportBackground(),o=i.getContext(`2d`);o&&(o.fillStyle=a,o.fillRect(0,0,i.width,i.height),this.getSvgString(r).then(e=>{let n=`data:image/svg+xml,`+encodeURIComponent(e),r=new Image;r.crossOrigin=`anonymous`,r.onload=()=>{o.drawImage(r,0,0);let e=i;e.msToBlob?t({blob:e.msToBlob()}):t({imgURI:i.toDataURL(`image/png`)})},r.src=n}))})}exportToSVG(){this.svgUrl().then(e=>{this.triggerDownload(e,this.w.config.chart.toolbar.export.svg.filename,`.svg`)})}exportToPng(){let e=this.w.config.chart.toolbar.export.scale,t=this.w.config.chart.toolbar.export.width,n=e?{scale:e}:t?{width:t}:void 0;this.dataURI(n).then(({imgURI:e,blob:t})=>{t?navigator.msSaveOrOpenBlob(t,this.w.globals.chartID+`.png`):this.triggerDownload(e,this.w.config.chart.toolbar.export.png.filename,`.png`)})}exportToCSV({series:e,fileName:t,columnDelimiter:n=`,`,lineDelimiter:r=`
|
|
1841
|
-
`}){let i=this.w;e||=i.config.series;let a=[],o=[],s=``,c=i.seriesData.series.map((e,t)=>i.globals.collapsedSeriesIndices.indexOf(t)===-1?e:[]),l=e=>{if(e==null||Q.isNumber(e))return e;let t=String(e);return/^[=+\-@\t\r]/.test(t)?`'${t}`:t},u=e=>typeof i.config.chart.toolbar.export.csv.categoryFormatter==`function`?i.config.chart.toolbar.export.csv.categoryFormatter(e):i.config.xaxis.type===`datetime`&&String(e).length>=10?new Date(e).toDateString():Q.isNumber(e)?e:l(e.split(n).join(``)),d=e=>typeof i.config.chart.toolbar.export.csv.valueFormatter==`function`?i.config.chart.toolbar.export.csv.valueFormatter(e):l(e),f=Math.max(...e.map(e=>e.data?e.data.length:0)),p=new sa(this.w),m=new xa(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale}),h=e=>{let t=``;if(!i.globals.axisCharts)t=i.config.labels[e];else{if(i.config.xaxis.type===`category`||i.config.xaxis.convertedCatToNumeric){if(i.globals.isBarHorizontal){let n=i.formatters.yLabelFormatters[0],r=new Y(this.ctx.w).getActiveConfigSeriesIndex();t=n(i.labelData.labels[e],{seriesIndex:r,dataPointIndex:e,w:i})}else t=m.getLabel(i.labelData.labels,i.labelData.timescaleLabels,0,e).text}i.config.xaxis.type===`datetime`&&(i.config.xaxis.categories.length?t=i.config.xaxis.categories[e]:i.config.labels.length&&(t=i.config.labels[e]))}return t===null?`nullvalue`:(Array.isArray(t)&&(t=t.join(` `)),Q.isNumber(t)?t:t.split(n).join(``))},g=()=>[...Array(f)].map(()=>``),_=(t,r)=>{if(a.length&&r===0&&o.push(a.join(n)),t.data){let s=t.data.length?t.data:g();for(let l=0;l<s.length;l++){a=[];let s=h(l);if(s!==`nullvalue`){if(s||(p.isFormatXY()?s=e[r].data[l].x:p.isFormat2DArray()&&(s=e[r].data[l]?e[r].data[l][0]:``)),r===0){a.push(u(s));for(let t=0;t<i.seriesData.series.length;t++){let n=p.isFormatXY()?e[t].data[l]?.y:c[t][l];a.push(d(n))}}(i.config.chart.type===`candlestick`||t.type&&t.type===`candlestick`)&&(a.pop(),a.push(i.candleData.seriesCandleO[r][l]),a.push(i.candleData.seriesCandleH[r][l]),a.push(i.candleData.seriesCandleL[r][l]),a.push(i.candleData.seriesCandleC[r][l])),(i.config.chart.type===`boxPlot`||t.type&&t.type===`boxPlot`)&&(a.pop(),a.push(i.candleData.seriesCandleO[r][l]),a.push(i.candleData.seriesCandleH[r][l]),a.push(i.candleData.seriesCandleM[r][l]),a.push(i.candleData.seriesCandleL[r][l]),a.push(i.candleData.seriesCandleC[r][l])),i.config.chart.type===`rangeBar`&&(a.pop(),a.push(i.rangeData.seriesRangeStart[r][l]),a.push(i.rangeData.seriesRangeEnd[r][l])),(i.config.chart.type===`violin`||t.type&&t.type===`violin`)&&(a.pop(),a.push(i.violinData.seriesViolinMin[r]?.[l]),a.push(i.violinData.seriesViolinMax[r]?.[l]),a.push(i.violinData.seriesViolinPoints[r]?.[l]?.length??0)),a.length&&o.push(a.join(n))}}}};a.push(i.config.chart.toolbar.export.csv.headerCategory),i.config.chart.type===`boxPlot`?(a.push(`minimum`),a.push(`q1`),a.push(`median`),a.push(`q3`),a.push(`maximum`)):i.config.chart.type===`candlestick`?(a.push(`open`),a.push(`high`),a.push(`low`),a.push(`close`)):i.config.chart.type===`rangeBar`?(a.push(`minimum`),a.push(`maximum`)):i.config.chart.type===`violin`?(a.push(`minimum`),a.push(`maximum`),a.push(`observations`)):e.map((e,t)=>{let r=(e.name?e.name:`series-${t}`)+``;i.globals.axisCharts&&a.push(r.split(n).join(``)?r.split(n).join(``):`series-${t}`)}),i.globals.axisCharts||(a.push(i.config.chart.toolbar.export.csv.headerValue),o.push(a.join(n))),!i.globals.allSeriesHasEqualX&&i.globals.axisCharts&&!i.config.xaxis.categories.length&&!i.config.labels.length?(()=>{let t=new Set,r={};e.forEach((n,i)=>{n?.data.forEach(n=>{let a,o;if(p.isFormatXY())a=n.x,o=n.y;else if(p.isFormat2DArray())a=n[0],o=n[1];else return;r[a]||(r[a]=Array(e.length).fill(``)),r[a][i]=d(o),t.add(a)})}),a.length&&o.push(a.join(n)),Array.from(t).sort().forEach(e=>{let t=r[e];o.push([u(e),...t].join(n))})})():e.map((e,t)=>{i.globals.axisCharts?_(e,t):(a=[],a.push(u(i.labelData.labels[t])),a.push(d(c[t])),o.push(a.join(n)))}),s+=o.join(r),this.triggerDownload(`data:text/csv; charset=utf-8,`+encodeURIComponent(``+s),t||i.config.chart.toolbar.export.csv.filename,`.csv`)}triggerDownload(e,t,n){if(Z.isSSR())return;let r=document.createElement(`a`);r.href=e,r.download=(t||this.w.globals.chartID)+n,document.body.appendChild(r),r.click(),document.body.removeChild(r)}};G.registerFeatures({exports:To});var Eo=`.apexcharts-flip-y {
|
|
1842
|
-
transform: scaleY(-1) translateY(-100%);
|
|
1843
|
-
transform-origin: top;
|
|
1844
|
-
transform-box: fill-box;
|
|
1845
|
-
}
|
|
1846
|
-
.apexcharts-flip-x {
|
|
1847
|
-
transform: scaleX(-1);
|
|
1848
|
-
transform-origin: center;
|
|
1849
|
-
transform-box: fill-box;
|
|
1850
|
-
}
|
|
1851
|
-
.apexcharts-legend {
|
|
1852
|
-
display: flex;
|
|
1853
|
-
overflow: auto;
|
|
1854
|
-
padding: 0 10px;
|
|
1855
|
-
}
|
|
1856
|
-
.apexcharts-legend.apexcharts-legend-group-horizontal {
|
|
1857
|
-
flex-direction: column;
|
|
1858
|
-
}
|
|
1859
|
-
.apexcharts-legend-group {
|
|
1860
|
-
display: flex;
|
|
1861
|
-
}
|
|
1862
|
-
.apexcharts-legend-group-vertical {
|
|
1863
|
-
flex-direction: column-reverse;
|
|
1864
|
-
}
|
|
1865
|
-
.apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {
|
|
1866
|
-
flex-wrap: wrap
|
|
1867
|
-
}
|
|
1868
|
-
.apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {
|
|
1869
|
-
flex-direction: column;
|
|
1870
|
-
bottom: 0;
|
|
1871
|
-
}
|
|
1872
|
-
.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {
|
|
1873
|
-
justify-content: flex-start;
|
|
1874
|
-
align-items: flex-start;
|
|
1875
|
-
}
|
|
1876
|
-
.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {
|
|
1877
|
-
justify-content: center;
|
|
1878
|
-
align-items: center;
|
|
1879
|
-
}
|
|
1880
|
-
.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {
|
|
1881
|
-
justify-content: flex-end;
|
|
1882
|
-
align-items: flex-end;
|
|
1883
|
-
}
|
|
1884
|
-
.apexcharts-legend-series {
|
|
1885
|
-
cursor: pointer;
|
|
1886
|
-
line-height: normal;
|
|
1887
|
-
display: flex;
|
|
1888
|
-
align-items: center;
|
|
1889
|
-
}
|
|
1890
|
-
.apexcharts-legend-text {
|
|
1891
|
-
position: relative;
|
|
1892
|
-
font-size: 14px;
|
|
1893
|
-
}
|
|
1894
|
-
.apexcharts-legend-text *, .apexcharts-legend-marker * {
|
|
1895
|
-
pointer-events: none;
|
|
1896
|
-
}
|
|
1897
|
-
.apexcharts-legend-marker {
|
|
1898
|
-
position: relative;
|
|
1899
|
-
display: flex;
|
|
1900
|
-
align-items: center;
|
|
1901
|
-
justify-content: center;
|
|
1902
|
-
cursor: pointer;
|
|
1903
|
-
margin-right: 1px;
|
|
1904
|
-
}
|
|
1905
|
-
|
|
1906
|
-
.apexcharts-legend-series.apexcharts-no-click {
|
|
1907
|
-
cursor: auto;
|
|
1908
|
-
}
|
|
1909
|
-
.apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {
|
|
1910
|
-
display: none !important;
|
|
1911
|
-
}
|
|
1912
|
-
.apexcharts-inactive-legend {
|
|
1913
|
-
opacity: 0.45;
|
|
1914
|
-
} `,Do=class{constructor(e){this.w=e.w,this.lgCtx=e}getLegendStyles(){if(Z.isSSR())return null;let e=document.createElement(`style`);e.setAttribute(`type`,`text/css`);let t=this.w.config.chart.nonce;t&&e.setAttribute(`nonce`,t);let n=document.createTextNode(Eo);return e.appendChild(n),e}getLegendDimensions(){let e=this.w.dom.baseEl.querySelector(`.apexcharts-legend`);if(!e)return{clwh:0,clww:0};let{width:t,height:n}=e.getBoundingClientRect();return{clwh:n,clww:t}}appendToForeignObject(){var e;let t=this.getLegendStyles();this.w.config.chart.injectStyleSheet!==!1&&t&&((e=this.w.dom.elLegendForeign)==null||e.appendChild(t))}toggleDataSeries(e,t){let n=this.w;if(n.globals.axisCharts||n.config.chart.type===`radialBar`){n.globals.resized=!0;let r=null,i=null;if(n.globals.risingSeries=[],n.globals.axisCharts){if(r=Array.prototype.find.call(n.dom.baseEl.querySelectorAll(`.apexcharts-series`),t=>t.getAttribute(`data:realIndex`)===String(e))??null,!r)return;i=parseInt(r.getAttribute(`data:realIndex`)??``,10)}else{if(r=n.dom.baseEl.querySelector(`.apexcharts-series[rel='${e+1}']`),!r)return;i=parseInt(r.getAttribute(`rel`)??``,10)-1}if(t?[{cs:n.globals.collapsedSeries,csi:n.globals.collapsedSeriesIndices},{cs:n.globals.ancillaryCollapsedSeries,csi:n.globals.ancillaryCollapsedSeriesIndices}].forEach(e=>{let t=e.cs,n=e.csi;this.riseCollapsedSeries(t,n,i)}):this.hideSeries({seriesEl:r,realIndex:i}),n.config.chart.accessibility.enabled){let t=n.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${e+1}"]`);if(t){let r=n.globals.collapsedSeriesIndices.includes(i)||n.globals.ancillaryCollapsedSeriesIndices.includes(i);t.setAttribute(`aria-pressed`,r?`true`:`false`);let a=t.querySelector(`.apexcharts-legend-text`),o=a?a.textContent:n.seriesData.seriesNames[e],s=r?`hidden`:`visible`;t.setAttribute(`aria-label`,`${o}, ${s}. Press Enter or Space to toggle.`)}}}else{if(n.globals.resized=!0,n.globals.risingSeries=[],t)this.riseCollapsedSeries(n.globals.collapsedSeries,n.globals.collapsedSeriesIndices,e);else{let t=this.getSeriesAfterCollapsing({realIndex:e});this.lgCtx.updateSeries(t,n.config.chart.animations.dynamicAnimation.enabled)}if(n.config.chart.accessibility.enabled){let t=n.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${e+1}"]`);if(t){let r=n.globals.collapsedSeriesIndices.includes(e);t.setAttribute(`aria-pressed`,r?`true`:`false`);let i=t.querySelector(`.apexcharts-legend-text`),a=i?i.textContent:n.seriesData.seriesNames[e],o=r?`hidden`:`visible`;t.setAttribute(`aria-label`,`${a}, ${o}. Press Enter or Space to toggle.`)}}}}_nonAxisSliceContainer(e){let t=this.w.config.chart.type;return(t===`pie`||t===`donut`||t===`polarArea`||t===`sunburst`)&&e.length===1&&e[0]&&typeof e[0]==`object`&&Array.isArray(e[0].data)?e[0].data:e}_readSliceValue(e){return this.w.config.chart.type===`unit`&&e&&Array.isArray(e.data)?e.data:e&&typeof e==`object`?e.y:e}_writeSliceValue(e,t,n){let r=e[t];if(this.w.config.chart.type===`unit`&&r&&Array.isArray(r.data)){r.data=Array.isArray(n)?n:[];return}r&&typeof r==`object`?r.y=n:e[t]=n}getSeriesAfterCollapsing({realIndex:e}){let t=this.w,n=t.globals,r=Q.clone(t.config.series);if(n.axisCharts){let i=t.config.yaxis[n.seriesYAxisReverseMap[e]],a={index:e,data:r[e].data.slice(),type:r[e].type||t.config.chart.type,name:(n.seriesNames||[])[e]};if(i&&i.show&&i.showAlways)n.ancillaryCollapsedSeriesIndices.indexOf(e)<0&&(n.ancillaryCollapsedSeries.push(a),n.ancillaryCollapsedSeriesIndices.push(e));else if(n.collapsedSeriesIndices.indexOf(e)<0){n.collapsedSeries.push(a),n.collapsedSeriesIndices.push(e);let t=n.risingSeries.indexOf(e);n.risingSeries.splice(t,1)}}else if(n.collapsedSeriesIndices.indexOf(e)<0){let i=this._nonAxisSliceContainer(r);n.collapsedSeries.push({index:e,data:this._readSliceValue(i[e]),type:t.config.series[e]?.type??`line`,name:(n.seriesNames||[])[e]}),n.collapsedSeriesIndices.push(e)}let i=n.axisCharts?t.config.series.length:this._nonAxisSliceContainer(r).length;return n.allSeriesCollapsed=n.collapsedSeries.length+n.ancillaryCollapsedSeries.length===i,this._getSeriesBasedOnCollapsedState(r)}hideSeries({seriesEl:e,realIndex:t}){let n=this.w,r=this.getSeriesAfterCollapsing({realIndex:t}),i=e.childNodes;for(let e=0;e<i.length;e++)i[e].classList.contains(`apexcharts-series-markers-wrap`)&&(i[e].classList.contains(`apexcharts-hide`)?i[e].classList.remove(`apexcharts-hide`):i[e].classList.add(`apexcharts-hide`));let a=n.config.chart.animations.dynamicAnimation.enabled;a&&(n.globals.collapsingSeriesIndices=[t]);let o=()=>{n.globals.collapsingSeriesIndices=[]},s=this.lgCtx.updateSeries(r,a);o(),s&&typeof s.then==`function`&&s.then(o,o)}riseCollapsedSeries(e,t,n){let r=this.w,i=Q.clone(r.config.series);if(e.length>0){for(let a=0;a<e.length;a++)if(e[a].index===n){if(r.globals.axisCharts)i[n].data=e[a].data.slice(),i[n].hidden=!1;else{let t=this._nonAxisSliceContainer(i);this._writeSliceValue(t,n,e[a].data)}e.splice(a,1),t.splice(a,1),r.globals.risingSeries.push(n),a--}i=this._getSeriesBasedOnCollapsedState(i),this.lgCtx.updateSeries(i,r.config.chart.animations.dynamicAnimation.enabled)}}_getSeriesBasedOnCollapsedState(e){let t=this.w,n=0;if(t.globals.axisCharts)e.forEach((r,i)=>{t.globals.collapsedSeriesIndices.indexOf(i)<0&&t.globals.ancillaryCollapsedSeriesIndices.indexOf(i)<0||(e[i].data=[],n++)});else{let r=this._nonAxisSliceContainer(e);r.forEach((e,i)=>{t.globals.collapsedSeriesIndices.indexOf(i)<0||(this._writeSliceValue(r,i,0),n++)})}let r=t.globals.axisCharts?e.length:this._nonAxisSliceContainer(e).length;return t.globals.allSeriesCollapsed=n===r,e}},Oo=[`#cf4d3f`,`#8f9499`,`#26a75b`],ko=(e,t,n)=>e+(t-e)*n;function Ao(e){return Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,`0`)}function jo(e,t,n){let r=Q.parseHex(Mo(e)),i=Q.parseHex(Mo(t));return!r||!i?e:`#`+Ao(ko(r[0],i[0],n))+Ao(ko(r[1],i[1],n))+Ao(ko(r[2],i[2],n))}function Mo(e){return typeof e==`string`?Q.isColorHex(e)?e:Q.rgb2hex(e)||`#000000`:`#000000`}function No(e,t,n){let r=e.config.series[t];return Po(e,r&&Array.isArray(r.data)?r.data[n]:null,t,n)}function Po(e,t,n,r){if(!t||typeof t!=`object`)return null;let i=e.config.plotOptions?.treemap?.colorScale?.colorValue,a;if(a=typeof i==`function`?i(t,{seriesIndex:n,dataPointIndex:r,w:e}):typeof i==`string`?t[i]:t.colorValue,a==null)return null;let o=Number(a);return Number.isFinite(o)?o:null}function Fo(e,t,n,r){if(Array.isArray(e.stops)&&e.stops.length>=2)return e.stops.filter(e=>e&&Number.isFinite(Number(e.value))).map(e=>({value:Number(e.value),color:Mo(e.color)})).sort((e,t)=>e.value-t.value);let i=(Array.isArray(e.colors)&&e.colors.length>=2?e.colors:Oo).map(Mo),a=i.length;if(r!=null&&a>=3){let e=Math.floor((a-1)/2),o=[];for(let n=0;n<=e;n++)o.push({value:ko(t,r,n/e),color:i[n]});for(let t=e+1;t<a;t++)o.push({value:ko(r,n,(t-e)/(a-1-e)),color:i[t]});return o}return i.map((e,r)=>({value:ko(t,n,r/(a-1)),color:e}))}function Io(e){let t=e.config?.plotOptions?.treemap?.colorScale,n=t&&t.gradient;if(!n||n.enabled===!1)return null;let r=e.config.series||[],i=1/0,a=-1/0,o=!1;for(let t=0;t<r.length;t++){let n=r[t]&&r[t].data;if(Array.isArray(n))for(let r=0;r<n.length;r++){let s=Po(e,n[r],t,r);s!=null&&(o=!0,s<i&&(i=s),s>a&&(a=s))}}if(!o&&n.enabled!==!0)return null;Number.isFinite(i)||(i=0,a=0);let s=Number.isFinite(Number(n.min))?Number(n.min):i,c=Number.isFinite(Number(n.max))?Number(n.max):a,l=null;if(n.midpoint===null?l=null:Number.isFinite(Number(n.midpoint))?l=Number(n.midpoint):s<0&&c>0&&(l=0),l!=null&&n.symmetric!==!1&&!Number.isFinite(Number(n.min))&&!Number.isFinite(Number(n.max))){let e=Math.max(Math.abs(s-l),Math.abs(c-l));s=l-e,c=l+e}c===s&&(s-=.5,c+=.5);let u=Fo(n,s,c,l);if(u.length<2)return null;let d=e=>{if(!Number.isFinite(e))return u[Math.floor(u.length/2)].color;if(e<=u[0].value)return u[0].color;let t=u[u.length-1];if(e>=t.value)return t.color;for(let t=1;t<u.length;t++){let n=u[t];if(e<=n.value){let r=u[t-1],i=n.value-r.value,a=i===0?0:(e-r.value)/i;return jo(r.color,n.color,a)}}return t.color},f=c-s,p=u.map(e=>({percent:f===0?0:(e.value-s)/f,color:e.color}));return{min:s,max:c,midpoint:l,stops:u,at:d,legendStops:p}}function Lo(e){let t=Mo(e);return Q.getContrastRatio(t,`#ffffff`)>=Q.getContrastRatio(t,`#000000`)?`#ffffff`:`#000000`}var Ro=`http://www.w3.org/2000/svg`,zo=class e{constructor(e,t){this.w=e,this.ctx=t,this.svgEl=null,this.arrowEl=null,this.hoverValueEl=null,this._min=0,this._max=0,this._geom=null,this._bandHitEls=[],this._activeBandIndex=-1,this._targetEl=null,this._onCellEnter=this._onCellEnter.bind(this),this._onCellLeave=this._onCellLeave.bind(this),this._onBandEnter=this._onBandEnter.bind(this),this._onBandLeave=this._onBandLeave.bind(this)}_getFormatter(){let e=this._cfg();return typeof e.formatter==`function`?e.formatter:e=>{if(!Number.isFinite(e))return String(e);let t=Math.abs(e);return t>=1e3?e.toFixed(0):t>=10?e.toFixed(1):e.toFixed(2)}}static colorScaleOf(e){let t=e?.config?.chart?.type;return t&&e?.config?.plotOptions?.[t]?.colorScale||null}static configFor(t){let n=e.colorScaleOf(t);return n&&n.gradientLegend||null}_cfg(){return e.configFor(this.w)||{}}static isEnabled(t){if(!e.supports(t))return!1;let n=e.configFor(t);return!!(n&&n.enabled)}static supports(e){let t=e?.config?.chart?.type;return t===`heatmap`||t===`treemap`}draw(e=null){let t=this.w;this._targetEl=e;let n=e||t.dom.elLegendWrap;if(!n)return;let r=this._cfg(),i=t.config.legend.position,a=i===`left`||i===`right`,o=r.arrow?.size??8,s=o+4,c=r.showLabels?28:4,l=r.showLabels?20:4,u=r.showLabels?44:0,d=this._resolveStripLength(a?r.height:r.width,a),f=r.thickness,p=a?Math.max(f+s+4,u):d+c*2,m=a?d+l*2:f+s+4,h=(p-(f+s))/2,g=a?i===`left`?h:h+s:c,_=a?l:i===`top`?s:4,v=X.createElementNS(Ro,`svg`);v.setAttribute(`class`,`apexcharts-heatmap-gradient-legend apexcharts-gradient-legend`),v.setAttribute(`width`,String(p)),v.setAttribute(`height`,String(m)),v.setAttribute(`overflow`,`visible`);let y=X.createElementNS(Ro,`defs`),b=`apexcharts-heatmap-gradient-${t.globals.cuid}`,x=X.createElementNS(Ro,`linearGradient`);x.setAttribute(`id`,b),a?(x.setAttribute(`x1`,`0`),x.setAttribute(`y1`,`1`),x.setAttribute(`x2`,`0`),x.setAttribute(`y2`,`0`)):(x.setAttribute(`x1`,`0`),x.setAttribute(`y1`,`0`),x.setAttribute(`x2`,`1`),x.setAttribute(`y2`,`0`));let{min:S,max:C,stops:w,bands:T}=this._computeStops();this._min=S,this._max=C,w.forEach(e=>{let t=X.createElementNS(Ro,`stop`);t.setAttribute(`offset`,`${(e.percent*100).toFixed(2)}%`),t.setAttribute(`stop-color`,e.color),x.appendChild(t)}),y.appendChild(x),v.appendChild(y);let E=X.createElementNS(Ro,`rect`);if(E.setAttribute(`x`,String(g)),E.setAttribute(`y`,String(_)),E.setAttribute(`width`,String(a?f:d)),E.setAttribute(`height`,String(a?d:f)),E.setAttribute(`rx`,`2`),E.setAttribute(`fill`,`url(#${b})`),v.appendChild(E),r.showLabels){let e=r.labelStyle?.colors||(Array.isArray(t.config.legend.labels.colors)?t.config.legend.labels.colors[0]:t.config.legend.labels.colors)||t.config.chart.foreColor,n=r.labelStyle?.fontSize||`11px`,i=r.labelStyle?.fontFamily||t.config.chart.fontFamily,o=this._getFormatter(),s=(t,r,a,o)=>{let s=X.createElementNS(Ro,`text`);return s.setAttribute(`x`,String(r)),s.setAttribute(`y`,String(a)),s.setAttribute(`text-anchor`,o),s.setAttribute(`dominant-baseline`,`middle`),s.setAttribute(`fill`,e),s.setAttribute(`font-size`,n),i&&s.setAttribute(`font-family`,i),s.textContent=String(t),s};if(a){let e=g+f/2;v.appendChild(s(o(S),e,_+d+10,`middle`)),v.appendChild(s(o(C),e,_-10,`middle`))}else{let e=_+f/2;v.appendChild(s(o(S),g-6,e,`end`)),v.appendChild(s(o(C),g+d+6,e,`start`))}}let D=r.arrow?.color||t.config.chart.foreColor,O=this._buildArrow(o,D,i);if(v.appendChild(O),this.arrowEl=O,this._bandHitEls=[],t.config.legend.onItemHover.highlightDataSeries&&T.length>0&&T.forEach(e=>{let t=X.createElementNS(Ro,`rect`);if(a){let n=_+d-e.p2*d,r=_+d-e.p1*d;t.setAttribute(`x`,String(g)),t.setAttribute(`y`,String(n)),t.setAttribute(`width`,String(f)),t.setAttribute(`height`,String(Math.max(0,r-n)))}else t.setAttribute(`x`,String(g+e.p1*d)),t.setAttribute(`y`,String(_)),t.setAttribute(`width`,String(Math.max(0,(e.p2-e.p1)*d))),t.setAttribute(`height`,String(f));t.setAttribute(`fill`,`transparent`),t.setAttribute(`class`,`apexcharts-heatmap-gradient-band`),t.setAttribute(`data:range-index`,String(e.index)),t.style.cursor=`pointer`,v.appendChild(t),this._bandHitEls.push(t)}),this._geom={isVertical:a,position:i,stripX:g,stripY:_,stripLength:d,stripThickness:f,arrowSize:o,svgWidth:p,svgHeight:m},r.showHoverValue){let e=X.createElement(`div`);e.classList.add(`apexcharts-heatmap-gradient-legend-value`),e.style.position=`absolute`,e.style.fontSize=r.labelStyle?.fontSize||`11px`,e.style.fontFamily=r.labelStyle?.fontFamily||t.config.chart.fontFamily||``,e.style.color=t.config.chart.foreColor,e.style.background=`rgba(0,0,0,0.65)`,e.style.color=`#fff`,e.style.padding=`2px 6px`,e.style.borderRadius=`3px`,e.style.pointerEvents=`none`,e.style.whiteSpace=`nowrap`,e.style.opacity=`0`,e.style.transition=`opacity 120ms ease`,this.hoverValueEl=e}n.classList.add(`apexcharts-heatmap-gradient-legend-wrap`),n.classList.add(`apx-legend-position-`+i),n.appendChild(v),this.hoverValueEl&&n.appendChild(this.hoverValueEl),this.svgEl=v,e?(n.style.width=p+`px`,n.style.height=m+`px`,n.style.position=`relative`,n.style.overflow=`visible`):this._applyWrapAlignment(n,i,a,p,m),this._attachHoverListeners(),this._attachBandHoverListeners()}_resolveStripLength(e,t){let n=this.w,r=t?n.globals.svgHeight||n.config.chart.height||300:n.globals.svgWidth||n.config.chart.width||600;if(typeof e==`string`){let t=e.trim();if(t.endsWith(`%`))return Math.max(20,r*(parseFloat(t)||0)/100);let n=parseFloat(t);return Number.isFinite(n)?n:200}return typeof e==`number`&&Number.isFinite(e)?e:200}_applyWrapAlignment(e,t,n,r,i){let a=this.w,o=this._cfg().align||`center`,s=a.globals.svgWidth||a.config.chart.width||600,c=a.globals.svgHeight||a.config.chart.height||300,l=a.config.legend.offsetX||0,u=a.config.legend.offsetY||0;if(e.style.position=`absolute`,e.style.display=`block`,e.style.overflow=`visible`,e.style.padding=`0`,e.style.width=r+`px`,e.style.height=i+`px`,e.style.right=`auto`,e.style.bottom=`auto`,n){let n=c-i-24,a;a=o===`start`?12:o===`end`?12+Math.max(0,n):12+Math.max(0,n)/2,e.style.top=a+u+`px`,t===`left`?e.style.left=12+l+`px`:e.style.left=s-r-12+l+`px`}else{let n=s-r-24,a;a=o===`start`?12:o===`end`?12+Math.max(0,n):12+Math.max(0,n)/2,e.style.left=a+l+`px`,t===`top`?e.style.top=12+u+`px`:e.style.top=c-i-12+u+`px`}}repositionToPlot(){if(!Z.isBrowser()||this._targetEl)return;let e=this.w,t=e.globals,n=e.dom.elLegendWrap;if(!n||!this._geom||!Number.isFinite(t.gridWidth)||!Number.isFinite(t.gridHeight))return;let{isVertical:r,position:i,svgWidth:a,svgHeight:o,stripX:s,stripY:c,stripThickness:l}=this._geom,u=this._cfg().align||`center`,d=e.config.legend.offsetX||0,f=e.config.legend.offsetY||0,p=this.ctx?.dimensions?.dimHelpers,m=p?p.getTitleSubtitleCoords(`title`).height+p.getTitleSubtitleCoords(`subtitle`).height:0,h=e.layout.xAxisHeight||0,g=(e,t)=>{let n=Math.max(0,e-t);return u===`start`?0:u===`end`?n:n/2};if(r){n.style.top=t.translateY+g(t.gridHeight,o)+f+`px`;let e=((i===`left`?0:t.translateX+t.gridWidth)+(i===`left`?t.translateX:t.svgWidth))/2;n.style.left=e-s-l/2+d+`px`}else{n.style.left=t.translateX+g(t.gridWidth,a)+d+`px`;let e=((i===`top`?m:t.translateY+t.gridHeight+h)+(i===`top`?t.translateY:t.svgHeight))/2;n.style.top=e-c-l/2+f+`px`}X.requestAnimationFrame(()=>this._enforceMinPlotGap())}_enforceMinPlotGap(){let e=this.w,t=e.dom.elLegendWrap,n=this.svgEl&&this.svgEl.querySelector(`rect`),r=e.dom.baseEl.querySelector(`.apexcharts-grid`);if(!t||!n||!r||!this._geom)return;let i=n.getBoundingClientRect(),a=r.getBoundingClientRect();if(!i.width||!i.height||!a.width||!a.height)return;let{isVertical:o,position:s}=this._geom;if(o){let e=s===`left`?a.left-i.right:i.left-a.right;if(e<16){let n=parseFloat(t.style.left)||0,r=16-e;t.style.left=n+(s===`left`?-r:r)+`px`}}else{let e=s===`top`?a.top-i.bottom:i.top-a.bottom;if(e<16){let n=parseFloat(t.style.top)||0,r=16-e;t.style.top=n+(s===`top`?-r:r)+`px`}}}destroy(){var e,t,n,r,i,a;for(let n=0;n<this._bandHitEls.length;n++){let r=this._bandHitEls[n];(e=r.removeEventListener)==null||e.call(r,`mousemove`,this._onBandEnter),(t=r.removeEventListener)==null||t.call(r,`mouseout`,this._onBandLeave)}if(this._bandHitEls=[],this._activeBandIndex=-1,this.ctx?.events)try{(r=(n=this.ctx.events).removeEventListener)==null||r.call(n,`dataPointMouseEnter`,this._onCellEnter),(a=(i=this.ctx.events).removeEventListener)==null||a.call(i,`dataPointMouseLeave`,this._onCellLeave)}catch{}}_attachBandHoverListeners(){if(Z.isBrowser())for(let e=0;e<this._bandHitEls.length;e++){let t=this._bandHitEls[e];t.addEventListener(`mousemove`,this._onBandEnter),t.addEventListener(`mouseout`,this._onBandLeave)}}_onBandEnter(e){var t,n;let r=this.w,i=e.currentTarget,a=parseInt(i.getAttribute(`data:range-index`)??`-1`,10);a<0||a===this._activeBandIndex||(this._activeBandIndex=a,(n=(t=this.ctx?.events)?.fireEvent)==null||n.call(t,`legendHover`,[this.ctx,a,r]),new Y(r).highlightRangeInSeries(a,`highlight`))}_onBandLeave(){if(this._activeBandIndex<0)return;let e=this._activeBandIndex;this._activeBandIndex=-1,new Y(this.w).highlightRangeInSeries(e,`reset`)}_attachHoverListeners(){Z.isBrowser()&&this.ctx?.events?.addEventListener&&(this.ctx.events.addEventListener(`dataPointMouseEnter`,this._onCellEnter),this.ctx.events.addEventListener(`dataPointMouseLeave`,this._onCellLeave))}_onCellEnter(...t){let n=this.w;if(!this.arrowEl)return;let r=t[t.length-1];if(!r||typeof r!=`object`)return;let i=r.seriesIndex,a=r.dataPointIndex;if(typeof i!=`number`||typeof a!=`number`||!e.supports(n))return;let o;o=this._continuous?No(n,i,a):n.seriesData?.series?.[i]?.[a],!(o==null||Number.isNaN(o))&&this._positionArrow(o)}_onCellLeave(){this.arrowEl&&(this.arrowEl.setAttribute(`opacity`,`0`),this.hoverValueEl&&(this.hoverValueEl.style.opacity=`0`))}_positionArrow(e){if(!this.arrowEl||!this._geom)return;let{isVertical:t,position:n,stripX:r,stripY:i,stripLength:a,stripThickness:o,arrowSize:s}=this._geom,c=this._min,l=this._max-c,u;if(u=l===0?.5:(e-c)/l,u<0&&(u=0),u>1&&(u=1),t){let e=i+a-u*a,t,c;n===`left`?(t=r+o,c=t+s):(t=r,c=t-s);let l=[`${t},${e}`,`${c},${e-s/2}`,`${c},${e+s/2}`].join(` `);this.arrowEl.setAttribute(`points`,l)}else{let e=r+u*a,t,c;n===`top`?(t=i+o,c=t+s):(t=i,c=t-s);let l=[`${e},${t}`,`${e-s/2},${c}`,`${e+s/2},${c}`].join(` `);this.arrowEl.setAttribute(`points`,l)}if(this.arrowEl.setAttribute(`opacity`,`1`),this.hoverValueEl){let c=this._getFormatter();if(this.hoverValueEl.textContent=c(e),t){let e=i+a-u*a;n===`left`?this.hoverValueEl.style.left=`${r+o+s+8}px`:(this.hoverValueEl.style.left=`${r-s-8}px`,this.hoverValueEl.style.transform=`translateX(-100%)`),this.hoverValueEl.style.top=`${e-9}px`}else{let e=r+u*a;this.hoverValueEl.style.left=`${e}px`,this.hoverValueEl.style.transform=`translateX(-50%)`,n===`top`?this.hoverValueEl.style.top=`${i+o+s+8}px`:this.hoverValueEl.style.top=`${i-s-18}px`}this.hoverValueEl.style.opacity=`1`}}_buildArrow(e,t,n){let r=X.createElementNS(Ro,`polygon`);return r.setAttribute(`fill`,t),r.setAttribute(`opacity`,`0`),r.setAttribute(`class`,`apexcharts-heatmap-gradient-arrow`),r.setAttribute(`points`,`0,0 0,0 0,0`),r.setAttribute(`pointer-events`,`none`),r}_computeStops(){let t=this.w,n=e.colorScaleOf(t)||{},r=this._cfg(),i=Io(t);if(i)return this._continuous=!0,{min:i.min,max:i.max,stops:i.legendStops,bands:[]};this._continuous=!1;let a=1/0,o=-1/0,s=t.seriesData?.series||[];for(let e=0;e<s.length;e++){let t=s[e];if(t)for(let e=0;e<t.length;e++){let n=t[e];n==null||Number.isNaN(n)||(n<a&&(a=n),n>o&&(o=n))}}Number.isFinite(a)||(a=0),Number.isFinite(o)||(o=0);let c=a,l=o;n.min!==void 0&&n.max!==void 0&&n.max>n.min?(c=n.min,l=n.max):(n.min!==void 0&&(c=n.min<a?n.min:a),n.max!==void 0&&(l=n.max>o?n.max:o));let u=[],d=[];if(n.ranges&&n.ranges.length>0){let e=n.ranges.map((e,t)=>q(K({},e),{_originalIndex:t})).sort((e,t)=>e.from-t.from),t=e[0].from,r=e[e.length-1].to;c=t,l=r;let i=r-t||1;e.forEach(e=>{let n=(e.from-t)/i,r=(e.to-t)/i;u.push({percent:(n+r)/2,color:e.color}),d.push({index:e._originalIndex,p1:n,p2:r})})}else{let e=t.globals.colors[0]||`#008FFB`,n=new Q,i=t.config.plotOptions[t.config.chart.type]||{},a=i.shadeIntensity??.5,o=t.globals.hasNegs,s=Math.max(2,r.stops||16);for(let r=0;r<s;r++){let d=r/(s-1),f=c+d*(l-c),p=Math.abs(l)+Math.abs(c),m=p===0?0:100*f/p,h;h=o?i.reverseNegativeShade?m<0?m/100*(a*1.25):(1-m/100)*(a*1.25):m<=0?1-(1+m/100)*a:(1-m/100)*a:1-m/100,h>1&&(h=1),h<-1&&(h=-1);let g=i.enableShades?n.shadeColor(t.config.theme.mode===`dark`?h*-1:h,e):e;u.push({percent:d,color:g})}}return{min:c,max:l,stops:u,bands:d}}},Bo=class{constructor(e,t){this.w=e,this.ctx=t,this.updateSeries=(...e)=>t.updateHelpers._updateSeries(...e),this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this),this.isBarsDistributed=this.w.config.chart.type===`bar`&&this.w.config.plotOptions.bar.distributed&&this.w.config.series.length===1,this.legendHelpers=new Do(this)}init(){let e=this.w,t=e.globals,n=e.config;this.isBarsDistributed=n.chart.type===`bar`&&n.plotOptions.bar.distributed&&n.series.length===1;let r=n.legend.showForSingleSeries&&this.w.seriesData.series.length===1||this.isBarsDistributed||n.chart.type===`heatmap`||zo.isEnabled(e)||this.w.seriesData.series.length>1;if(this.legendHelpers.appendToForeignObject(),(r||!t.axisCharts)&&n.legend.show){let t=e.dom.elLegendWrap;for(;t.firstChild;)t.removeChild(t.firstChild);this.heatmapGradientLegend&&=(this.heatmapGradientLegend.destroy(),null),zo.isEnabled(e)?(this.heatmapGradientLegend=new zo(e,this.ctx),this.heatmapGradientLegend.draw()):(this.drawLegends(),n.legend.position===`bottom`||n.legend.position===`top`?this.legendAlignHorizontal():(n.legend.position===`right`||n.legend.position===`left`)&&this.legendAlignVertical())}}createLegendMarker({i:e,fillcolor:t}){let n=this.w,r=X.createElement(`span`);r.classList.add(`apexcharts-legend-marker`);let i=n.config.legend.markers.shape||n.config.markers.shape,a=i;Array.isArray(i)&&(a=i[e]);let o=Array.isArray(n.config.legend.markers.size)?parseFloat(n.config.legend.markers.size[e]):parseFloat(n.config.legend.markers.size),s=Array.isArray(n.config.legend.markers.offsetX)?parseFloat(n.config.legend.markers.offsetX[e]):parseFloat(n.config.legend.markers.offsetX),c=Array.isArray(n.config.legend.markers.offsetY)?parseFloat(n.config.legend.markers.offsetY[e]):parseFloat(n.config.legend.markers.offsetY),l=Array.isArray(n.config.legend.markers.strokeWidth)?parseFloat(n.config.legend.markers.strokeWidth[e]):parseFloat(n.config.legend.markers.strokeWidth),u=r.style;if(u.height=(o+l)*2+`px`,u.width=(o+l)*2+`px`,u.left=s+`px`,u.top=c+`px`,n.config.legend.markers.customHTML)u.background=`transparent`,u.color=t[e],Array.isArray(n.config.legend.markers.customHTML)?n.config.legend.markers.customHTML[e]&&(r.innerHTML=n.config.legend.markers.customHTML[e]()):r.innerHTML=n.config.legend.markers.customHTML();else{let i=new pa(this.ctx.w,this.ctx).getMarkerConfig({cssClass:`apexcharts-legend-marker apexcharts-marker apexcharts-marker-${a}`,seriesIndex:e,strokeWidth:l,size:o}),s=(Z.isBrowser()?window.SVG:global.SVG)().addTo(r).size(`100%`,`100%`),c=new J(this.w).drawMarker(0,0,q(K({},i),{pointFillColor:Array.isArray(t)?t[e]:i.pointFillColor,shape:a}));n.dom.Paper.find(`.apexcharts-legend-marker.apexcharts-marker`).forEach(e=>{e.node.classList.contains(`apexcharts-marker-triangle`)?e.node.style.transform=`translate(50%, 45%)`:e.node.style.transform=`translate(50%, 50%)`}),s.add(c)}return r}drawLegends(){let e=this,t=this.w,n=t.dom.elLegendWrap,r=t.config.legend.fontFamily,i=t.seriesData.seriesNames,a=t.config.legend.markers.fillColors?t.config.legend.markers.fillColors.slice():t.globals.colors.slice();if(t.config.chart.type===`heatmap`){let e=t.config.plotOptions.heatmap.colorScale.ranges;i=e.map(e=>e.name?e.name:e.from+` - `+e.to),a=e.map(e=>e.color)}else this.isBarsDistributed&&(i=t.labelData.labels.slice());t.config.legend.customLegendItems.length&&(i=t.config.legend.customLegendItems);let o=t.formatters.legendFormatter,s=t.config.legend.inverseOrder,c=[];t.labelData.seriesGroups.length>1&&t.config.legend.clusterGroupedSeries&&t.labelData.seriesGroups.forEach((e,r)=>{c[r]=X.createElement(`div`),c[r].classList.add(`apexcharts-legend-group`,`apexcharts-legend-group-${r}`),t.config.legend.clusterGroupedSeriesOrientation===`horizontal`?n.classList.add(`apexcharts-legend-group-horizontal`):c[r].classList.add(`apexcharts-legend-group-vertical`)});for(let e=s?i.length-1:0;s?e>=0:e<=i.length-1;s?e--:e++){let s=o(i[e],{seriesIndex:e,w:t}),l=!1,u=!1;if(t.globals.collapsedSeries.length>0)for(let n=0;n<t.globals.collapsedSeries.length;n++)t.globals.collapsedSeries[n].index===e&&(l=!0);if(t.globals.ancillaryCollapsedSeriesIndices.length>0)for(let n=0;n<t.globals.ancillaryCollapsedSeriesIndices.length;n++)t.globals.ancillaryCollapsedSeriesIndices[n]===e&&(u=!0);let d=this.createLegendMarker({i:e,fillcolor:a});J.setAttrs(d,{rel:e+1,"data:collapsed":l||u}),(l||u)&&d.classList.add(`apexcharts-inactive-legend`);let f=X.createElement(`div`);if(t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled){f.setAttribute(`role`,`button`),f.setAttribute(`tabindex`,`0`);let e=Array.isArray(s)?s.join(` `):s,t=l||u,n=t?`hidden`:`visible`;f.setAttribute(`aria-label`,`${e}, ${n}. Press Enter or Space to toggle.`),f.setAttribute(`aria-pressed`,t?`true`:`false`)}let p=X.createElement(`span`);p.classList.add(`apexcharts-legend-text`),p.innerHTML=Array.isArray(s)?s.join(` `):s;let m=t.config.legend.labels.useSeriesColors?t.globals.colors[e]:Array.isArray(t.config.legend.labels.colors)?t.config.legend.labels.colors?.[e]:t.config.legend.labels.colors;m||=t.config.chart.foreColor,p.style.color=m,p.style.fontSize=t.config.legend.fontSize,p.style.fontWeight=t.config.legend.fontWeight,p.style.fontFamily=r||t.config.chart.fontFamily,J.setAttrs(p,{rel:e+1,i:e,"data:default-text":encodeURIComponent(s),"data:collapsed":l||u}),f.appendChild(d),f.appendChild(p);let h=new aa(this.w);t.config.legend.showForZeroSeries||h.getSeriesTotalByIndex(e)===0&&h.seriesHaveSameValues(e)&&!h.isSeriesNull(e)&&t.globals.collapsedSeriesIndices.indexOf(e)===-1&&t.globals.ancillaryCollapsedSeriesIndices.indexOf(e)===-1&&f.classList.add(`apexcharts-hidden-zero-series`),t.config.legend.showForNullSeries||h.isSeriesNull(e)&&t.globals.collapsedSeriesIndices.indexOf(e)===-1&&t.globals.ancillaryCollapsedSeriesIndices.indexOf(e)===-1&&f.classList.add(`apexcharts-hidden-null-series`),c.length?t.labelData.seriesGroups.forEach((r,i)=>{r.includes(t.config.series[e]?.name??``)&&(n.appendChild(c[i]),c[i].appendChild(f))}):n.appendChild(f),n.classList.add(`apexcharts-align-${t.config.legend.horizontalAlign}`),n.classList.add(`apx-legend-position-`+t.config.legend.position),f.classList.add(`apexcharts-legend-series`),f.style.margin=`${t.config.legend.itemMargin.vertical}px ${t.config.legend.itemMargin.horizontal}px`,n.style.width=t.config.legend.width?t.config.legend.width+`px`:``,n.style.height=t.config.legend.height?t.config.legend.height+`px`:``,J.setAttrs(f,{rel:e+1,seriesName:Q.escapeString(i[e]),"data:collapsed":l||u}),(l||u)&&f.classList.add(`apexcharts-inactive-legend`),t.config.legend.onItemClick.toggleDataSeries||f.classList.add(`apexcharts-no-click`)}t.dom.elWrap.addEventListener(`click`,e.onLegendClick,!0),t.config.legend.onItemHover.highlightDataSeries&&t.config.legend.customLegendItems.length===0&&(t.dom.elWrap.addEventListener(`mousemove`,e.onLegendHovered,!0),t.dom.elWrap.addEventListener(`mouseout`,e.onLegendHovered,!0)),t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&t.dom.elWrap.addEventListener(`keydown`,e.onLegendKeyDown.bind(e),!0)}setLegendWrapXY(e,t){let n=this.w,r=n.dom.elLegendWrap,i=r.clientHeight,a=0,o=0;if(n.config.legend.position===`bottom`)o=n.globals.svgHeight-Math.min(i,n.globals.svgHeight/2)-5;else if(n.config.legend.position===`top`){let e=new Ta(this.w,this.ctx),t=e.dimHelpers.getTitleSubtitleCoords(`title`).height,n=e.dimHelpers.getTitleSubtitleCoords(`subtitle`).height;o=(t>0?t-10:0)+(n>0?n-10:0)}r.style.position=`absolute`,a=a+e+n.config.legend.offsetX,o=o+t+n.config.legend.offsetY,r.style.left=a+`px`,r.style.top=o+`px`,n.config.legend.position===`right`&&(r.style.left=`auto`,r.style.right=25+n.config.legend.offsetX+`px`),[`width`,`height`].forEach(e=>{r&&r.style[e]&&(r.style[e]=parseInt(String(n.config.legend[e]),10)+`px`)})}legendAlignHorizontal(){let e=this.w,t=e.dom.elLegendWrap;t.style.right=`0`;let n=new Ta(this.w,this.ctx),r=n.dimHelpers.getTitleSubtitleCoords(`title`),i=n.dimHelpers.getTitleSubtitleCoords(`subtitle`),a=0;e.config.legend.position===`top`&&(a=r.height+i.height+e.config.title.margin+e.config.subtitle.margin-10),this.setLegendWrapXY(20,a)}legendAlignVertical(){let e=this.w,t=this.legendHelpers.getLegendDimensions(),n=0;e.config.legend.position===`left`&&(n=20),e.config.legend.position===`right`&&(n=e.globals.svgWidth-t.clww-10),this.setLegendWrapXY(n,20)}onLegendHovered(e){let t=this.w,n=e.target,r=n.classList.contains(`apexcharts-legend-series`)||n.classList.contains(`apexcharts-legend-text`)||n.classList.contains(`apexcharts-legend-marker`);if(t.config.chart.type!==`heatmap`&&!this.isBarsDistributed)!n.classList.contains(`apexcharts-inactive-legend`)&&r&&new Y(this.ctx.w).toggleSeriesOnHover(e,n);else if(r){let t=parseInt(n.getAttribute(`rel`)??`0`,10)-1;this.ctx.events.fireEvent(`legendHover`,[this.ctx,t,this.w]);let r=new Y(this.ctx.w);e.type===`mousemove`?r.highlightRangeInSeries(t,`highlight`):e.type===`mouseout`&&r.highlightRangeInSeries(t,`reset`)}}onLegendKeyDown(e){let t=this,n=this.w,r=e.target;if((r.classList.contains(`apexcharts-legend-series`)||r.classList.contains(`apexcharts-legend-text`)||r.classList.contains(`apexcharts-legend-marker`))&&(e.key===`Enter`||e.key===` `)){e.preventDefault();let i=r.getAttribute(`rel`);t.onLegendClick(e),i!==null&&n.config.legend.onItemClick.toggleDataSeries&&requestAnimationFrame(()=>{let e=n.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${i}"]`);e&&e.focus()})}}onLegendClick(e){let t=this.w,n=e.target;if(!t.config.legend.customLegendItems.length&&(n.classList.contains(`apexcharts-legend-series`)||n.classList.contains(`apexcharts-legend-text`)||n.classList.contains(`apexcharts-legend-marker`))){let e=parseInt(n.getAttribute(`rel`)??`0`,10)-1,r=n.getAttribute(`data:collapsed`)===`true`,i=this.w.config.chart.events.legendClick;typeof i==`function`&&i(this.ctx,e,this.w),this.ctx.events.fireEvent(`legendClick`,[this.ctx,e,this.w]);let a=this.w.config.legend.markers.onClick;typeof a==`function`&&n.classList.contains(`apexcharts-legend-marker`)&&(a(this.ctx,e,this.w),this.ctx.events.fireEvent(`legendMarkerClick`,[this.ctx,e,this.w])),t.config.chart.type!==`treemap`&&t.config.chart.type!==`heatmap`&&!this.isBarsDistributed&&t.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(e,r)}}};G.registerFeatures({legend:Bo});var Vo=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
1915
|
-
<path d="M5 9 2 12l3 3"/>
|
|
1916
|
-
<path d="M9 5l3-3 3 3"/>
|
|
1917
|
-
<path d="M15 19l-3 3-3-3"/>
|
|
1918
|
-
<path d="M19 9l3 3-3 3"/>
|
|
1919
|
-
<path d="M2 12h20"/>
|
|
1920
|
-
<path d="M12 2v20"/>
|
|
1921
|
-
</svg>
|
|
1922
|
-
`,Ho=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
1923
|
-
<circle cx="11" cy="11" r="7"/>
|
|
1924
|
-
<path d="m21 21-4.3-4.3M8 11h6M11 8v6"/>
|
|
1925
|
-
</svg>
|
|
1926
|
-
`,Uo=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
1927
|
-
<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/>
|
|
1928
|
-
<path d="M3 3v5h5"/>
|
|
1929
|
-
</svg>
|
|
1930
|
-
`,Wo=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
1931
|
-
<path d="M12 5v14M5 12h14"/>
|
|
1932
|
-
</svg>
|
|
1933
|
-
`,Go=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
1934
|
-
<path d="M5 12h14"/>
|
|
1935
|
-
</svg>
|
|
1936
|
-
`,Ko=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
1937
|
-
<path d="M5 3a2 2 0 0 0-2 2"/>
|
|
1938
|
-
<path d="M19 3a2 2 0 0 1 2 2"/>
|
|
1939
|
-
<path d="M21 19a2 2 0 0 1-2 2"/>
|
|
1940
|
-
<path d="M5 21a2 2 0 0 1-2-2"/>
|
|
1941
|
-
<path d="M9 3h1M14 3h1M9 21h1M14 21h1M3 9v1M3 14v1M21 9v1M21 14v1"/>
|
|
1942
|
-
</svg>
|
|
1943
|
-
`,qo=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
1944
|
-
<path d="M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.4 2.4 0 0 1 0-3.4l2.6-2.6a2.4 2.4 0 0 1 3.4 0Z"/>
|
|
1945
|
-
<path d="m14.5 12.5 2-2"/>
|
|
1946
|
-
<path d="m11.5 9.5 2-2"/>
|
|
1947
|
-
<path d="m8.5 6.5 2-2"/>
|
|
1948
|
-
<path d="m17.5 15.5 2-2"/>
|
|
1949
|
-
</svg>
|
|
1950
|
-
`,Jo=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
1951
|
-
<path d="M4 6h16M4 12h16M4 18h16"/>
|
|
1952
|
-
</svg>
|
|
1953
|
-
`,Yo=class{constructor(e,t){this.w=e,this.ctx=t,this.ev=this.w.config.chart.events,this.selectedClass=`apexcharts-selected`,this.localeValues=this.w.globals.locale.toolbar,this.minX=e.globals.minX,this.maxX=e.globals.maxX,this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elMeasure=null,this.elZoomReset=null,this.elMenuIcon=null,this.elMenu=null,this.elMenuItems=[],this.t=null}createToolbar(){var e,t;let n=this.w,r=()=>X.createElementNS(`http://www.w3.org/1999/xhtml`,`div`),i=()=>{let e=X.createElementNS(`http://www.w3.org/1999/xhtml`,`button`);return e.setAttribute(`type`,`button`),e},a=r();if(a.setAttribute(`class`,`apexcharts-toolbar`),a.style.top=n.config.chart.toolbar.offsetY+`px`,a.style.right=-n.config.chart.toolbar.offsetX+3+`px`,n.dom.elWrap.appendChild(a),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elMeasure=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=r(),this.elCustomIcons=[],this.t=n.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(let e=0;e<this.t.customIcons.length;e++)this.elCustomIcons.push(i());let o=[],s=(e,t,r)=>{let i=e.toLowerCase();this.t[i]&&n.config.chart.zoom.enabled&&o.push({el:t,icon:typeof this.t[i]==`string`?this.t[i]:r,title:this.localeValues[e],class:`apexcharts-${i}-icon`})};s(`zoomIn`,this.elZoomIn,Wo),s(`zoomOut`,this.elZoomOut,Go);let c=e=>{this.t[e]&&n.config.chart[e].enabled&&o.push({el:e===`zoom`?this.elZoom:this.elSelection,icon:typeof this.t[e]==`string`?this.t[e]:e===`zoom`?Ho:Ko,title:this.localeValues[e===`zoom`?`selectionZoom`:`selection`],class:`apexcharts-${e}-icon`})};c(`zoom`),c(`selection`),this.t.pan&&n.config.chart.zoom.enabled&&o.push({el:this.elPan,icon:typeof this.t.pan==`string`?this.t.pan:Vo,title:this.localeValues.pan,class:`apexcharts-pan-icon`}),this.t.measure&&n.config.chart.measure&&n.config.chart.measure.enabled&&o.push({el:this.elMeasure,icon:typeof this.t.measure==`string`?this.t.measure:qo,title:this.localeValues.measure||`Measure`,class:`apexcharts-measure-icon`}),s(`reset`,this.elZoomReset,Uo),this.t.download&&o.push({el:this.elMenuIcon,icon:typeof this.t.download==`string`?this.t.download:Jo,title:this.localeValues.menu,class:`apexcharts-menu-icon`});for(let e=0;e<this.elCustomIcons.length;e++)o.push({el:this.elCustomIcons[e],icon:this.t.customIcons[e].icon,title:this.t.customIcons[e].title,index:this.t.customIcons[e].index,class:`apexcharts-toolbar-custom-icon `+this.t.customIcons[e].class});o.forEach((e,t)=>{e.index&&Q.moveIndexInArray(o,t,e.index)});for(let e=0;e<o.length;e++)J.setAttrs(o[e].el,{class:o[e].class,title:o[e].title,"aria-label":o[e].title}),o[e].el.innerHTML=o[e].icon,a.appendChild(o[e].el);this.elZoom.parentNode&&this.elZoom.setAttribute(`aria-pressed`,String(!!n.interact.zoomEnabled)),this.elSelection.parentNode&&this.elSelection.setAttribute(`aria-pressed`,String(!!n.interact.selectionEnabled)),this.elPan.parentNode&&this.elPan.setAttribute(`aria-pressed`,String(!!n.interact.panEnabled)),this.elMeasure.parentNode&&this.elMeasure.setAttribute(`aria-pressed`,String(!!n.interact.measureEnabled)),this.elMenuIcon.parentNode&&(this.elMenuIcon.setAttribute(`aria-haspopup`,`true`),this.elMenuIcon.setAttribute(`aria-expanded`,`false`)),this._createHamburgerMenu(a),n.interact.zoomEnabled?this.elZoom.classList.add(this.selectedClass):n.interact.panEnabled?this.elPan.classList.add(this.selectedClass):n.interact.selectionEnabled?this.elSelection.classList.add(this.selectedClass):n.interact.measureEnabled&&this.elMeasure&&(this.elMeasure.classList.add(this.selectedClass),(t=(e=this.ctx.measure)?.startMeasure)==null||t.call(e)),this.addToolbarEventListeners()}_createHamburgerMenu(e){this.elMenuItems=[],e.appendChild(this.elMenu),J.setAttrs(this.elMenu,{class:`apexcharts-menu`,role:`menu`});let t=[{name:`exportSVG`,title:this.localeValues.exportToSVG},{name:`exportPNG`,title:this.localeValues.exportToPNG},{name:`exportCSV`,title:this.localeValues.exportToCSV}];for(let e=0;e<t.length;e++)this.elMenuItems.push(X.createElementNS(`http://www.w3.org/1999/xhtml`,`div`)),this.elMenuItems[e].innerHTML=t[e].title,J.setAttrs(this.elMenuItems[e],{class:`apexcharts-menu-item ${t[e].name}`,title:t[e].title,role:`menuitem`,tabindex:`-1`}),this.elMenu.appendChild(this.elMenuItems[e])}addToolbarEventListeners(){var e,t,n,r,i,a,o,s,c;(e=this.elZoomReset)==null||e.addEventListener(`click`,this.handleZoomReset.bind(this)),(t=this.elSelection)==null||t.addEventListener(`click`,this.toggleZoomSelection.bind(this,`selection`)),(n=this.elZoom)==null||n.addEventListener(`click`,this.toggleZoomSelection.bind(this,`zoom`)),(r=this.elZoomIn)==null||r.addEventListener(`click`,this.handleZoomIn.bind(this)),(i=this.elZoomOut)==null||i.addEventListener(`click`,this.handleZoomOut.bind(this)),(a=this.elPan)==null||a.addEventListener(`click`,this.togglePanning.bind(this)),(o=this.elMeasure)==null||o.addEventListener(`click`,this.toggleMeasure.bind(this)),(s=this.elMenuIcon)==null||s.addEventListener(`click`,this.toggleMenu.bind(this)),this.elMenuItems.forEach(e=>{e.classList.contains(`exportSVG`)?e.addEventListener(`click`,this.handleDownload.bind(this,`svg`)):e.classList.contains(`exportPNG`)?e.addEventListener(`click`,this.handleDownload.bind(this,`png`)):e.classList.contains(`exportCSV`)&&e.addEventListener(`click`,this.handleDownload.bind(this,`csv`))});for(let e=0;e<this.t.customIcons.length;e++)this.elCustomIcons[e].addEventListener(`click`,this.t.customIcons[e].click.bind(this,this.ctx,this.ctx.w));[this.elZoomReset,this.elSelection,this.elZoom,this.elZoomIn,this.elZoomOut,this.elPan,this.elMeasure,this.elMenuIcon,...this.elCustomIcons].forEach(e=>{e.addEventListener(`keydown`,t=>{if(t.key===`Enter`||t.key===` `){t.preventDefault();let n=e.className;e.click(),requestAnimationFrame(()=>{let e=this.w.dom.baseEl;if(!e)return;let t=n.split(` `).find(e=>e.startsWith(`apexcharts-`));if(!t)return;let r=e.querySelector(`.${t}`);r&&r.focus()})}})}),(c=this.elMenuIcon)==null||c.addEventListener(`keydown`,e=>{(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault(),this.elMenu?.classList.contains(`apexcharts-menu-open`)||this.toggleMenu(),window.setTimeout(()=>{let t=e.key===`ArrowDown`?0:this.elMenuItems.length-1;this.elMenuItems[t]&&this.elMenuItems[t].focus()},20))}),this.elMenuItems.forEach((e,t)=>{e.addEventListener(`keydown`,n=>{var r;n.key===`ArrowDown`?(n.preventDefault(),(this.elMenuItems[t+1]||this.elMenuItems[0]).focus()):n.key===`ArrowUp`?(n.preventDefault(),(this.elMenuItems[t-1]||this.elMenuItems[this.elMenuItems.length-1]).focus()):n.key===`Escape`||n.key===`Tab`?(this._closeMenu(),(r=this.elMenuIcon)==null||r.focus(),n.key===`Tab`||n.preventDefault()):(n.key===`Enter`||n.key===` `)&&(n.preventDefault(),e.click())})})}toggleZoomSelection(e){this.ctx.getSyncedCharts().forEach(t=>{let n=t.ctx.toolbar,r=e===`selection`?`selectionEnabled`:`zoomEnabled`,i=!!t.w.globals[r];n.toggleOtherControls();let a=e===`selection`?n.elSelection:n.elZoom;i||(t.w.globals[r]=!0,a.classList.add(n.selectedClass)),a.setAttribute(`aria-pressed`,String(!!t.w.globals[r]))})}toggleMeasure(){var e,t,n,r;let i=this.w,a=!i.interact.measureEnabled;this.toggleOtherControls(),a&&(i.interact.measureEnabled=!0,(e=this.elMeasure)==null||e.classList.add(this.selectedClass),(n=(t=this.ctx.measure)?.startMeasure)==null||n.call(t)),(r=this.elMeasure)==null||r.setAttribute(`aria-pressed`,String(i.interact.measureEnabled))}getToolbarIconsReference(){let e=this.w;this.elZoom||=e.dom.baseEl.querySelector(`.apexcharts-zoom-icon`),this.elPan||=e.dom.baseEl.querySelector(`.apexcharts-pan-icon`),this.elSelection||=e.dom.baseEl.querySelector(`.apexcharts-selection-icon`),this.elMeasure||=e.dom.baseEl.querySelector(`.apexcharts-measure-icon`)}enableZoomPanFromToolbar(e){this.toggleOtherControls(),e===`pan`?this.w.interact.panEnabled=!0:this.w.interact.zoomEnabled=!0;let t=e===`pan`?this.elPan:this.elZoom,n=e===`pan`?this.elZoom:this.elPan;t&&t.classList.add(this.selectedClass),n&&n.classList.remove(this.selectedClass)}togglePanning(){this.ctx.getSyncedCharts().forEach(e=>{let t=e.ctx.toolbar,n=!!e.w.interact.panEnabled;t.toggleOtherControls(),n||(e.w.interact.panEnabled=!0,t.elPan.classList.add(t.selectedClass)),t.elPan.setAttribute(`aria-pressed`,String(!!e.w.interact.panEnabled))})}toggleOtherControls(){var e,t,n;let r=this.w;r.interact.panEnabled=!1,r.interact.zoomEnabled=!1,r.interact.selectionEnabled=!1,r.interact.measureEnabled&&(r.interact.measureEnabled=!1,(t=(e=this.ctx.measure)?.stopMeasure)==null||t.call(e),(n=this.elMeasure)==null||n.setAttribute(`aria-pressed`,`false`)),this.getToolbarIconsReference(),[this.elPan,this.elSelection,this.elZoom,this.elMeasure].forEach(e=>{e&&e.classList.remove(this.selectedClass)})}_currentXRange(){let e=this.w;return e.axisFlags.isRangeBar?{minX:e.globals.minY,maxX:e.globals.maxY}:{minX:e.globals.minX,maxX:e.globals.maxX}}handleZoomIn(){let e=this.w,{minX:t,maxX:n}=this._currentXRange();this.minX=t,this.maxX=n;let r=(t+n)/2,i=(t+r)/2,a=(n+r)/2,o=this._getNewMinXMaxX(i,a);e.interact.disableZoomIn||this.zoomUpdateOptions(o.minX,o.maxX)}handleZoomOut(){let e=this.w,{minX:t,maxX:n}=this._currentXRange();if(this.minX=t,this.maxX=n,e.config.xaxis.type===`datetime`&&new Date(t).getUTCFullYear()<1e3)return;let r=(t+n)/2,i=t-(r-t),a=n-(r-n),o=this._getNewMinXMaxX(i,a);e.interact.disableZoomOut||this.zoomUpdateOptions(o.minX,o.maxX)}_getNewMinXMaxX(e,t){let n=this.w.config.xaxis.convertedCatToNumeric;return{minX:n?Math.floor(e):e,maxX:n?Math.floor(t):t}}zoomUpdateOptions(e,t){let n=this.w;if(e===void 0&&t===void 0){this.handleZoomReset();return}if(n.config.xaxis.convertedCatToNumeric&&(e<1&&(e=1,t=n.globals.dataPoints),t-e<2))return;let r={min:e,max:t},i=this.getBeforeZoomRange(r,void 0);i&&(r=i.xaxis);let a={xaxis:r};if(!n.globals.initialConfig)return;let o=Q.clone(n.globals.initialConfig.yaxis);n.config.chart.group||(a.yaxis=o),this.w.interact.zoomed=!0,this.ctx.updateHelpers._updateOptions(a,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(r,o)}zoomCallback(e,t){typeof this.ev.zoomed==`function`&&(this.ev.zoomed(this.ctx,{xaxis:e,yaxis:t}),this.ctx.events.fireEvent(`zoomed`,{xaxis:e,yaxis:t}))}getBeforeZoomRange(e,t){let n=null;return typeof this.ev.beforeZoom==`function`&&(n=this.ev.beforeZoom(this,{xaxis:e,yaxis:t})),n}toggleMenu(){window.setTimeout(()=>{var e,t;this.elMenu?.classList.contains(`apexcharts-menu-open`)?this._closeMenu():((e=this.elMenu)==null||e.classList.add(`apexcharts-menu-open`),(t=this.elMenuIcon)==null||t.setAttribute(`aria-expanded`,`true`))},0)}_closeMenu(){var e,t;(e=this.elMenu)==null||e.classList.remove(`apexcharts-menu-open`),(t=this.elMenuIcon)==null||t.setAttribute(`aria-expanded`,`false`)}handleDownload(e){let t=this.w,n=new To(this.w,this.ctx);switch(e){case`svg`:n.exportToSVG();break;case`png`:n.exportToPng();break;case`csv`:n.exportToCSV({series:t.config.series,columnDelimiter:t.config.chart.toolbar.export.csv.columnDelimiter})}}handleZoomReset(){this.ctx.getSyncedCharts().forEach(e=>{let t=e.w;if(!t.interact.zoomed)return;if(t.globals.lastXAxis.min=t.globals.initialConfig.xaxis.min,t.globals.lastXAxis.max=t.globals.initialConfig.xaxis.max,e.updateHelpers.revertDefaultAxisMinMax(),typeof t.config.chart.events.beforeResetZoom==`function`){let n=t.config.chart.events.beforeResetZoom(e,t);n&&e.updateHelpers.revertDefaultAxisMinMax(n)}typeof t.config.chart.events.zoomed==`function`&&e.ctx.toolbar.zoomCallback({min:t.config.xaxis.min,max:t.config.xaxis.max});let n=e.ctx.series.emptyCollapsedSeries(Q.clone(t.globals.initialSeries));e.updateHelpers._updateSeries(n,t.config.chart.animations.dynamicAnimation.enabled),t.interact.zoomed=!1})}destroy(){this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elMeasure=null,this.elZoomReset=null,this.elMenuIcon=null}},Xo=class e{static xRatio(e){let t=e.layout.gridWidth||1;return(e.globals.maxX-e.globals.minX)/t}static dataXToPx(t,n){return(n-t.globals.minX)/e.xRatio(t)}static pxToDataX(t,n){return t.globals.minX+n*e.xRatio(t)}static screenXToPlotPx(e,t){let n=e.dom.baseEl,r=n&&n.querySelector(`.apexcharts-svg`);if(!r)return t-e.layout.translateX;let i=r.getBoundingClientRect(),a=e.globals.svgWidth?i.width/e.globals.svgWidth:1;return(t-i.left)/(a||1)-e.layout.translateX}},Zo=240,Qo=.05,$o=.92,es=.02,ts=16.6667,ns=15,rs=class extends Yo{constructor(e,t){super(e,t),this.w=e,this.ctx=t,this.dragged=!1,this.graphics=new J(this.w),this.eventList=[`mousedown`,`mouseleave`,`mousemove`,`touchstart`,`touchmove`,`mouseup`,`touchend`],this.clientX=0,this.clientY=0,this.startX=0,this.endX=0,this.dragX=0,this.startY=0,this.endY=0,this.dragY=0,this.moveDirection=`none`}init({xyRatios:e}){let t=this.w,n=this;this.xyRatios=e,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.constraints=new uo(0,0,t.layout.gridWidth,t.layout.gridHeight),this.zoomRect.node.classList.add(`apexcharts-zoom-rect`),this.selectionRect.node.classList.add(`apexcharts-selection-rect`),t.dom.Paper.add(this.zoomRect),t.dom.Paper.add(this.selectionRect),this.slDraggableRect=t.config.chart.selection.type===`x`?this.selectionRect.draggable({minX:0,minY:0,maxX:t.layout.gridWidth,maxY:t.layout.gridHeight}).on(`dragmove.namespace`,this.selectionDragging.bind(this,`dragging`)):t.config.chart.selection.type===`y`?this.selectionRect.draggable({minX:0,maxX:t.layout.gridWidth}).on(`dragmove.namespace`,this.selectionDragging.bind(this,`dragging`)):this.selectionRect.draggable().on(`dragmove.namespace`,this.selectionDragging.bind(this,`dragging`)),this.preselectedSelection(),this.hoverArea=t.dom.baseEl.querySelector(`${t.globals.chartClass} .apexcharts-svg`),this.hoverArea&&(this.hoverArea.classList.add(`apexcharts-zoomable`),this.eventList.forEach(t=>{var r;(r=this.hoverArea)==null||r.addEventListener(t,n.svgMouseEvents.bind(n,e),{capture:!1,passive:!0})}),this._wheelZoomEnabled()&&this.hoverArea.addEventListener(`wheel`,n.mouseWheelEvent.bind(n),{capture:!1,passive:!1}),this._momentumEnabled()&&[`touchstart`,`touchmove`,`touchend`,`touchcancel`].forEach(e=>{var t;(t=this.hoverArea)==null||t.addEventListener(e,n.momentumTouch.bind(n),{capture:!1,passive:!1})}))}destroy(){this.slDraggableRect&&(this.slDraggableRect.draggable(!1),this.slDraggableRect.off(),this.selectionRect.off()),this.selectionRect=null,this.zoomRect=null}svgMouseEvents(e,t){let n=this.w,r=this.ctx.toolbar;if(n.interact.momentum&&n.interact.momentum.busy||this._momentumEnabled()&&t.touches&&t.touches.length>1)return;let i=n.interact.zoomEnabled?n.config.chart.zoom.type:n.config.chart.selection.type,a=n.config.chart.toolbar.autoSelected;if(a!==`measure`&&(t.shiftKey?(n.interact.shiftWasPressed=!0,r.enableZoomPanFromToolbar(a===`pan`?`zoom`:`pan`)):n.interact.shiftWasPressed&&(r.enableZoomPanFromToolbar(a),n.interact.shiftWasPressed=!1)),!t.target)return;let o=t.target.classList,s;if(t.target.parentNode&&t.target.parentNode!==null&&(s=t.target.parentNode.classList),!(o.contains(`apexcharts-legend-marker`)||o.contains(`apexcharts-legend-text`)||s&&s.contains(`apexcharts-toolbar`))){if(this.clientX=t.type===`touchmove`||t.type===`touchstart`?t.touches[0].clientX:t.type===`touchend`?t.changedTouches[0].clientX:t.clientX,this.clientY=t.type===`touchmove`||t.type===`touchstart`?t.touches[0].clientY:t.type===`touchend`?t.changedTouches[0].clientY:t.clientY,t.type===`mousedown`&&t.which===1||t.type===`touchstart`){let e=this._gridRect();if(!e)return;this.startX=this._screenXToPlotPx(this.clientX),this.startY=this.clientY-e.top,this.dragged=!1,this.w.interact.mousedown=!0}(t.type===`mousemove`&&t.which===1||t.type===`touchmove`)&&(this.dragged=!0,n.interact.panEnabled?(n.interact.selection=null,this.w.interact.mousedown&&this.panDragging({context:this,zoomtype:i,xyRatios:this.xyRatios})):(this.w.interact.mousedown&&n.interact.zoomEnabled||this.w.interact.mousedown&&n.interact.selectionEnabled)&&(this.selection=this.selectionDrawing({context:this,zoomtype:i}))),(t.type===`mouseup`||t.type===`touchend`||t.type===`mouseleave`)&&this.handleMouseUp({zoomtype:i}),this.makeSelectionRectDraggable()}}handleMouseUp({zoomtype:e,isResized:t}){let n=this.w,r=this._gridRect();r&&(this.w.interact.mousedown||t)&&(this.endX=this._screenXToPlotPx(this.clientX),this.endY=this.clientY-r.top,this.dragX=Math.abs(this.endX-this.startX),this.dragY=Math.abs(this.endY-this.startY),(n.interact.zoomEnabled||n.interact.selectionEnabled)&&this.selectionDrawn({context:this,zoomtype:e})),n.interact.zoomEnabled&&this.hideSelectionRect(this.selectionRect),this.dragged=!1,this.w.interact.mousedown=!1}_incidentalZoomEnabled(e){let t=this.w.config.chart;return!t.zoom||!t.zoom.enabled?!1:e===`auto`?!!(t.toolbar?.show&&t.toolbar?.tools?.reset):!!e}_wheelZoomEnabled(){let{zoom:e}=this.w.config.chart;return this._incidentalZoomEnabled(e&&e.allowMouseWheelZoom)}_wheel(){let e=this.w.interact;return e.wheel||={factor:1,clientX:0,rafId:null,endTimer:null},e.wheel}mouseWheelEvent(e){e.preventDefault();let t=this._wheel(),n=e.deltaY;e.deltaMode===1?n*=33:e.deltaMode===2&&(n*=330),t.factor*=2**(n/Zo),t.clientX=e.clientX,t.rafId??=requestAnimationFrame(()=>this._applyWheelZoom()),t.endTimer&&clearTimeout(t.endTimer),t.endTimer=setTimeout(()=>this._endWheelZoom(),150)}_applyWheelZoom(){let e=this.w,t=this._wheel();t.rafId=null;let n=t.factor;if(t.factor=1,n===1||e.globals.isDestroyed)return;let r=this._gridRect();if(!r||!r.width)return;let{min:i,max:a}=this._currentXWindow(),o=a-i,s=Math.min(Math.max((t.clientX-r.left)/r.width,0),1),c=o*n,l=this._clampBounds();if(l){let t=e.globals.minXDiff>0&&isFinite(e.globals.minXDiff)?e.globals.minXDiff:0,n=Math.max(t*2,(l.max-l.min)*1e-6);c<n&&(c=n),c>l.max-l.min&&(c=l.max-l.min)}let u=i+s*o-s*c,d=u+c,f=o*1e-9;if(Math.abs(u-i)<f&&Math.abs(d-a)<f||isNaN(u)||isNaN(d))return;let p=this.getBeforeZoomRange({min:u,max:d},void 0);p&&p.xaxis&&(u=p.xaxis.min,d=p.xaxis.max),this._applyXRange(u,d,!0)}_endWheelZoom(){let e=this.w,t=this._wheel();if(t.endTimer=null,e.globals.isDestroyed||!e.interact.zoomed)return;let{min:n,max:r}=this._currentXWindow(),i=e.globals.initialConfig?Q.clone(e.globals.initialConfig.yaxis):[],a=this.ctx.toolbar;a&&a.zoomCallback({min:n,max:r},i)}makeSelectionRectDraggable(){let e=this.w;if(!this.selectionRect)return;let t=this.selectionRect.node.getBoundingClientRect();t.width>0&&t.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:()=>{},updateRot:()=>{},createHandle:(e,t,n,r,i)=>i===`l`||i===`r`?e.circle(8).css({"stroke-width":1,stroke:`#333`,fill:`#fff`}):e.circle(0),updateHandle:(e,t)=>e.center(t[0],t[1])}).resize().on(`resize`,()=>{if(e.interact.selectionEnabled)e.interact.selection={x:parseFloat(this.selectionRect.node.getAttribute(`x`)),y:parseFloat(this.selectionRect.node.getAttribute(`y`)),width:parseFloat(this.selectionRect.node.getAttribute(`width`)),height:parseFloat(this.selectionRect.node.getAttribute(`height`))},clearTimeout(this.w.globals.selectionResizeTimer??void 0),this.w.globals.selectionResizeTimer=window.setTimeout(()=>{this._emitSelectionFromRect()},30);else{let t=e.interact.zoomEnabled?e.config.chart.zoom.type:e.config.chart.selection.type;this.handleMouseUp({zoomtype:t,isResized:!0})}}))}preselectedSelection(){let e=this.w,t=this.xyRatios;if(!e.interact.zoomEnabled){if(e.interact.selection!==void 0&&e.interact.selection!==null)this.drawSelectionRect(q(K({},e.interact.selection),{translateX:e.layout.translateX,translateY:e.layout.translateY}));else if(e.config.chart.selection.xaxis.min!==void 0&&e.config.chart.selection.xaxis.max!==void 0){let n=Xo.dataXToPx(e,e.config.chart.selection.xaxis.min),r=Xo.dataXToPx(e,e.config.chart.selection.xaxis.max)-n;e.axisFlags.isRangeBar&&(n=(e.config.chart.selection.xaxis.min-e.globals.yAxisScale[0].niceMin)/t.invertedYRatio,r=(e.config.chart.selection.xaxis.max-e.config.chart.selection.xaxis.min)/t.invertedYRatio);let i={x:n,y:0,width:r,height:e.layout.gridHeight,translateX:e.layout.translateX,translateY:e.layout.translateY,selectionEnabled:!0};this.drawSelectionRect(i),this.makeSelectionRectDraggable(),typeof e.config.chart.events.selection==`function`&&e.config.chart.events.selection(this.ctx,{xaxis:{min:e.config.chart.selection.xaxis.min,max:e.config.chart.selection.xaxis.max},yaxis:{}})}}}drawSelectionRect({x:e,y:t,width:n,height:r,translateX:i=0,translateY:a=0}){let o=this.w,s=this.zoomRect,c=this.selectionRect;if(this.dragged||o.interact.selection!==null){let l={transform:`translate(`+i+`, `+a+`)`};o.interact.zoomEnabled&&this.dragged&&(n<0&&(n=1),s.attr({x:e,y:t,width:n,height:r,fill:o.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":o.config.chart.zoom.zoomedArea.fill.opacity,stroke:o.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":o.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":o.config.chart.zoom.zoomedArea.stroke.opacity}),J.setAttrs(s.node,l)),o.interact.selectionEnabled&&(c.attr({x:e,y:t,width:n>0?n:0,height:r>0?r:0,fill:o.config.chart.selection.fill.color,"fill-opacity":o.config.chart.selection.fill.opacity,stroke:o.config.chart.selection.stroke.color,"stroke-width":o.config.chart.selection.stroke.width,"stroke-dasharray":o.config.chart.selection.stroke.dashArray,"stroke-opacity":o.config.chart.selection.stroke.opacity}),J.setAttrs(c.node,l))}}hideSelectionRect(e){e&&e.attr({x:0,y:0,width:0,height:0})}selectionDrawing({context:e,zoomtype:t}){let n=this.w,r=e,i=this._gridRect();if(!i)return;let a=r.startX-1,o=r.startY,s=!1,c=!1,l=this._screenXToPlotPx(r.clientX),u=r.clientY-i.top,d=l-a,f=u-o,p={translateX:n.layout.translateX,translateY:n.layout.translateY};return Math.abs(d+a)>n.layout.gridWidth?d=n.layout.gridWidth-a:l<0&&(d=a),a>l&&(s=!0,d=Math.abs(d)),o>u&&(c=!0,f=Math.abs(f)),p=t===`x`?{x:s?a-d:a,y:0,width:d,height:n.layout.gridHeight}:t===`y`?{x:0,y:c?o-f:o,width:n.layout.gridWidth,height:f}:{x:s?a-d:a,y:c?o-f:o,width:d,height:f},p=q(K({},p),{translateX:n.layout.translateX,translateY:n.layout.translateY}),r.drawSelectionRect(p),r.selectionDragging(`resizing`),p}selectionDragging(e,t){let n=this.w;if(!t)return;t.preventDefault();let{handler:r,box:i}=t.detail,a=this.constraints,{x:o,y:s}=i;o<a.x&&(o=a.x),s<a.y&&(s=a.y),i.x2>a.x2&&(o=a.x2-i.w),i.y2>a.y2&&(s=a.y2-i.h),r.move(o,s);let c=this.selectionRect,l=0;e===`resizing`&&(l=30);let u=e=>parseFloat(c.node.getAttribute(e)),d={x:u(`x`),y:u(`y`),width:u(`width`),height:u(`height`)};n.interact.selection=d;let f=n.config.chart.link,p=!(!f||!f.enabled&&typeof f.dimension!=`function`);(typeof n.config.chart.events.selection==`function`||p)&&n.interact.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer??void 0),this.w.globals.selectionResizeTimer=window.setTimeout(()=>{this._emitSelectionFromRect()},l))}_emitSelectionFromRect(){var e;let t=this.w;if(!t.interact.selectionEnabled)return;let n=t.config.chart.link,r=!(!n||!n.enabled&&typeof n.dimension!=`function`);if(typeof t.config.chart.events.selection!=`function`&&!r)return;let i=this._gridRect();if(!i)return;let a=this.selectionRect.node.getBoundingClientRect(),o=this.xyRatios,s,c,l,u,d=this._screenXToPlotPx(a.left),f=this._screenXToPlotPx(a.right);if(t.axisFlags.isRangeBar)s=t.globals.yAxisScale[0].niceMin+d*o.invertedYRatio,c=t.globals.yAxisScale[0].niceMin+f*o.invertedYRatio,l=0,u=1;else{if(!t.globals.xAxisScale)return;s=Xo.pxToDataX(t,d),c=Xo.pxToDataX(t,f),l=t.globals.yAxisScale[0].niceMin+(i.bottom-a.bottom)*o.yRatio[0],u=t.globals.yAxisScale[0].niceMax-(a.top-i.top)*o.yRatio[0]}let p={xaxis:{min:s,max:c},yaxis:{min:l,max:u}};typeof t.config.chart.events.selection==`function`&&t.config.chart.events.selection(this.ctx,p),t.config.chart.brush.enabled&&t.config.chart.events.brushScrolled!==void 0&&t.config.chart.events.brushScrolled(this.ctx,p),(e=this.ctx.linkedViews)==null||e.onSourceSelection(p.xaxis)}selectionDrawn({context:e,zoomtype:t}){var n;let r=this.w,i=e,a=this.xyRatios,o=this.ctx.toolbar,s=r.interact.zoomEnabled?i.zoomRect.node.getBoundingClientRect():i.selectionRect.node.getBoundingClientRect(),c=i._gridRect();if(!c)return;let l=this._screenXToPlotPx(s.left),u=this._screenXToPlotPx(s.right),d=s.top-c.top,f=s.bottom-c.top,p,m;r.axisFlags.isRangeBar?(p=r.globals.yAxisScale[0].niceMin+l*a.invertedYRatio,m=r.globals.yAxisScale[0].niceMin+u*a.invertedYRatio):(p=Xo.pxToDataX(r,l),m=Xo.pxToDataX(r,u));let h=[],g=[];if(r.config.yaxis.forEach((e,t)=>{let n=r.globals.seriesYAxisMap[t][0],i=r.globals.yAxisScale[t].niceMax-a.yRatio[n]*d,o=r.globals.yAxisScale[t].niceMax-a.yRatio[n]*f;h.push(i),g.push(o)}),i.dragged&&(i.dragX>10||i.dragY>10)&&p!==m){if(r.interact.zoomEnabled){if(!r.globals.initialConfig)return;let e=Q.clone(r.globals.initialConfig.yaxis),n=Q.clone(r.globals.initialConfig.xaxis);if(r.interact.zoomed=!0,r.config.xaxis.convertedCatToNumeric&&(p=Math.floor(p),m=Math.floor(m),p<1&&(p=1,m=r.globals.dataPoints),m-p<2&&(m=p+1)),(t===`xy`||t===`x`)&&(n={min:p,max:m}),(t===`xy`||t===`y`)&&e.forEach((t,n)=>{e[n].min=g[n],e[n].max=h[n]}),o){let t=o.getBeforeZoomRange(n,e);t&&(n=t.xaxis?t.xaxis:n,e=t.yaxis?t.yaxis:e)}let a={xaxis:n};r.config.chart.group||(a.yaxis=e),i.ctx.updateHelpers._updateOptions(a,!1,i.w.config.chart.animations.dynamicAnimation.enabled),typeof r.config.chart.events.zoomed==`function`&&o.zoomCallback(n,e)}else if(r.interact.selectionEnabled){let e=null,a=null;if(a={min:p,max:m},t===`xy`||t===`y`){let t=Q.clone(r.config.yaxis);e=t,t.forEach((e,n)=>{t[n].min=g[n],t[n].max=h[n]})}r.interact.selection=i.selection,typeof r.config.chart.events.selection==`function`&&r.config.chart.events.selection(i.ctx,{xaxis:a,yaxis:e}),(n=i.ctx.linkedViews)==null||n.onSourceSelection(a)}}}panDragging({context:e}){let t=this.w,n=e;if(t.interact.lastClientPosition.x!==void 0){let e=t.interact.lastClientPosition.x-n.clientX,r=(t.interact.lastClientPosition.y??0)-n.clientY;Math.abs(e)>Math.abs(r)&&e>0?this.moveDirection=`left`:Math.abs(e)>Math.abs(r)&&e<0?this.moveDirection=`right`:Math.abs(r)>Math.abs(e)&&r>0?this.moveDirection=`up`:Math.abs(r)>Math.abs(e)&&r<0&&(this.moveDirection=`down`)}t.interact.lastClientPosition={x:n.clientX,y:n.clientY};let r=t.axisFlags.isRangeBar?t.globals.minY:t.globals.minX,i=t.axisFlags.isRangeBar?t.globals.maxY:t.globals.maxX;n.panScrolled(r,i)}panScrolled(e,t){let n=this.w,r=this.xyRatios;if(!n.globals.initialConfig)return;let i=Q.clone(n.globals.initialConfig.yaxis),a=r.xRatio,o=n.globals.minX,s=n.globals.maxX;if(n.axisFlags.isRangeBar&&(a=r.invertedYRatio,o=n.globals.minY,s=n.globals.maxY),this.moveDirection===`left`?(e=o+n.layout.gridWidth/ns*a,t=s+n.layout.gridWidth/ns*a):this.moveDirection===`right`&&(e=o-n.layout.gridWidth/ns*a,t=s-n.layout.gridWidth/ns*a),!n.axisFlags.isRangeBar){let r=n.globals.dataReducerRawMinX??n.globals.initialMinX,i=n.globals.dataReducerRawMaxX??n.globals.initialMaxX;(e<r||t>i)&&(e=o,t=s)}let c={xaxis:{min:e,max:t}};n.config.chart.group||(c.yaxis=i),this.updateScrolledChart(c,e,t)}updateScrolledChart(e,t,n){let r=this.w;if(this.ctx.updateHelpers._updateOptions(e,!1,!1),typeof r.config.chart.events.scrolled==`function`){let e={xaxis:{min:t,max:n}};r.config.chart.events.scrolled(this.ctx,e),this.ctx.events.fireEvent(`scrolled`,e)}}_momentumEnabled(){return this._pinchEnabled()||this._panInertiaEnabled()}_pinchEnabled(){return this._incidentalZoomEnabled(this.w.config.chart.zoom.pinch)}_panInertiaEnabled(){let e=this.w.config.chart;return!!(e.pan&&e.pan.inertia)}_m(){let e=this.w.interact;return e.momentum||={busy:!1,pinch:null,panState:null,samples:[],inertiaRAF:null},e.momentum}_currentXWindow(){let e=this.w;return e.axisFlags.isRangeBar?{min:e.globals.minY,max:e.globals.maxY}:{min:e.globals.minX,max:e.globals.maxX}}_gridRect(){let e=this.w.dom.baseEl,t=e&&e.querySelector(`.apexcharts-grid`);return t?t.getBoundingClientRect():null}_screenXToPlotPx(e){return Xo.screenXToPlotPx(this.w,e)}_clampBounds(){let e=this.w;return e.axisFlags.isRangeBar?null:{min:e.globals.dataReducerRawMinX??e.globals.initialMinX,max:e.globals.dataReducerRawMaxX??e.globals.initialMaxX}}_applyXRange(e,t,n){let r=this.w;if(!r.globals.initialConfig)return!1;let i=this._currentXWindow(),a=n&&t-e>i.max-i.min,o=this._clampBounds();if(o){let n=t-e;e<o.min&&(e=o.min,t=e+n),t>o.max&&(t=o.max,e=t-n),e<o.min&&(e=o.min)}if(r.config.xaxis.convertedCatToNumeric&&(e=Math.floor(e),t=a?Math.ceil(t):Math.floor(t),e<1&&(e=1),o&&t>o.max&&(t=Math.floor(o.max)),t-e<2)||!(t>e))return!1;let s={xaxis:{min:e,max:t}};return r.config.chart.group||(s.yaxis=Q.clone(r.globals.initialConfig.yaxis)),n&&(r.interact.zoomed=!0),this.ctx.updateHelpers._updateOptions(s,!1,!1),{minX:e,maxX:t}}_cancelInertia(){let e=this._m();e.inertiaRAF!=null&&(cancelAnimationFrame(e.inertiaRAF),e.inertiaRAF=null)}_fireScrolled(){let e=this.w;if(typeof e.config.chart.events.scrolled!=`function`)return;let{min:t,max:n}=this._currentXWindow(),r={xaxis:{min:t,max:n}};e.config.chart.events.scrolled(this.ctx,r),this.ctx.events.fireEvent(`scrolled`,r)}_pushSample(e,t){let n=this._m().samples;for(n.push({x:e,t});n.length>6;)n.shift()}momentumTouch(e){let t=this.w,n=this._m(),r=e.type;if(r===`touchstart`){this._cancelInertia();let r=this._gridRect();if(!r)return;if(e.touches.length>=2&&this._pinchEnabled())e.preventDefault(),n.busy=!0,n.panState=null,this._beginPinch(e,r);else if(e.touches.length===1&&this._panInertiaEnabled()&&t.interact.panEnabled){n.busy=!0,n.pinch=null;let r=e.touches[0],i=this._currentXWindow(),a=t.layout.gridWidth||1;n.panState={startX:r.clientX,startY:r.clientY,axis:null,minX0:i.min,maxX0:i.max,ratio0:(i.max-i.min)/a},n.samples=[{x:r.clientX,t:e.timeStamp}]}return}if(r===`touchmove`){n.pinch&&e.touches.length>=2?(e.preventDefault(),this._movePinch(e)):n.panState&&e.touches.length===1&&this._movePan(e);return}n.pinch?e.touches.length<2&&this._endPinch():n.panState&&e.touches.length===0&&this._endPan(),e.touches.length===0&&(t.interact.mousedown=!1,this.dragged=!1,n.inertiaRAF==null&&!n.pinch&&!n.panState&&(n.busy=!1))}_beginPinch(e,t){let n=this.w,r=e.touches[0],i=e.touches[1],a=Math.hypot(i.clientX-r.clientX,i.clientY-r.clientY)||1,o=(r.clientX+i.clientX)/2-t.left-n.globals.barPadForNumericAxis,{min:s,max:c}=this._currentXWindow();this._m().pinch={d0:a,cx0:o,minX0:s,maxX0:c,gridWidth:n.layout.gridWidth||1}}_movePinch(e){let t=this.w,n=this._m().pinch;if(!n)return;let r=this._gridRect();if(!r)return;let i=e.touches[0],a=e.touches[1],o=Math.hypot(a.clientX-i.clientX,a.clientY-i.clientY)||1,s=(i.clientX+a.clientX)/2-r.left-t.globals.barPadForNumericAxis,c=n.maxX0-n.minX0,l=c*(n.d0/o),u=n.minX0+n.cx0/n.gridWidth*c-s/n.gridWidth*l,d=u+l,f=this._clampBounds();if(f){let e=t.globals.minXDiff>0&&isFinite(t.globals.minXDiff)?t.globals.minXDiff:0,n=Math.max(e*2,(f.max-f.min)*1e-6);if(d-u<n){let e=(u+d)/2;u=e-n/2,d=e+n/2}}this._applyXRange(u,d,!0)}_endPinch(){let e=this.w,t=this._m();t.pinch=null;let{min:n,max:r}=this._currentXWindow(),i={min:n,max:r},a=e.globals.initialConfig?Q.clone(e.globals.initialConfig.yaxis):[],o=this.ctx.toolbar;o&&o.zoomCallback(i,a)}_movePan(e){let t=this._m(),n=t.panState,r=e.touches[0];if(!n.axis){let i=Math.abs(r.clientX-n.startX),a=Math.abs(r.clientY-n.startY);if(i<6&&a<6){this._pushSample(r.clientX,e.timeStamp);return}if(a>i){t.busy=!1,t.panState=null;return}n.axis=`x`}if(n.axis!==`x`)return;e.preventDefault();let i=(r.clientX-n.startX)*n.ratio0;this._pushSample(r.clientX,e.timeStamp),this._applyXRange(n.minX0-i,n.maxX0-i,!1)}_endPan(){let e=this._m(),t=e.panState;e.panState=null;let n=0,r=e.samples;if(r.length>=2){let e=r[0],t=r[r.length-1],i=t.t-e.t;i>0&&(n=(t.x-e.x)/i)}e.samples=[],t&&t.axis===`x`&&this._panInertiaEnabled()&&Math.abs(n)>Qo?this._startInertia(n):(e.busy=!1,this._fireScrolled())}_startInertia(e){let t=this.w,n=this._m(),r=t.config.chart.pan&&t.config.chart.pan.friction,i=typeof r==`number`?Math.min(Math.max(r,.5),.999):$o,a=e,o=null;n.busy=!0;let s=e=>{if(t.globals.isDestroyed){n.inertiaRAF=null,n.busy=!1;return}if(o==null){o=e,n.inertiaRAF=requestAnimationFrame(s);return}let r=e-o;if(o=e,a*=i**+(r/ts),Math.abs(a)<es){n.inertiaRAF=null,n.busy=!1,this._fireScrolled();return}let c=this._currentXWindow(),l=t.layout.gridWidth||1,u=(c.max-c.min)/l,d=a*r*u,f=this._applyXRange(c.min-d,c.max-d,!1),p=this._clampBounds();if(!f||p&&(d>0&&f.minX<=p.min+(p.max-p.min)*1e-6||d<0&&f.maxX>=p.max-(p.max-p.min)*1e-6)){n.inertiaRAF=null,n.busy=!1,this._fireScrolled();return}n.inertiaRAF=requestAnimationFrame(s)};n.inertiaRAF=requestAnimationFrame(s)}};G.registerFeatures({toolbar:Yo,zoomPanSelection:rs});var is=class{constructor(e){this.w=e.w,this.annoCtx=e}setOrientations(e,t=null){let n=this.w;if(e.label.orientation===`vertical`){let r=t===null?0:t,i=n.dom.baseEl.querySelector(`.apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='${r}']`);if(i!==null){let t=i.getBBox();i.setAttribute(`x`,String(parseFloat(i.getAttribute(`x`)??`0`)-t.height+4));let n=e.label.position===`top`?t.width:-t.width;i.setAttribute(`y`,String(parseFloat(i.getAttribute(`y`)??`0`)+n));let{x:r,y:a}=this.annoCtx.graphics.rotateAroundCenter(i);i.setAttribute(`transform`,`rotate(-90 ${r} ${a})`)}}}addBackgroundToAnno(e,t){let n=this.w;if(!e||!t.label.text||!String(t.label.text).trim())return null;let r=n.dom.baseEl.querySelector(`.apexcharts-grid`);if(!r)return null;let i=r.getBoundingClientRect(),a=r.getBBox(),o=i.width/a.width||1,s=e.getBoundingClientRect(),{left:c,right:l,top:u,bottom:d}=t.label.style.padding;t.label.orientation===`vertical`&&([u,d,c,l]=[c,l,u,d]);let f=i.left-a.x*o,p=i.top-a.y*o,m=(s.left-f)/o-c,h=(s.top-p)/o-u,g=this.annoCtx.graphics.drawRect(m,h,s.width/o+c+l,s.height/o+u+d,t.label.borderRadius,t.label.style.background,1,t.label.borderWidth,t.label.borderColor,0);return t.id&&g.node.classList.add(t.id),g}annotationsBackground(){let e=this.w,t=(t,n,r)=>{let i=e.dom.baseEl.querySelector(`.apexcharts-${r}-annotations .apexcharts-${r}-annotation-label[rel='${n}']`);if(i){let n=i.parentNode,r=this.addBackgroundToAnno(i,t);if(r){n?.insertBefore(r.node,i);let a=i.getAttribute(`x`);a!==null&&$i(r,parseFloat(a),e),t.label.mouseEnter&&r.node.addEventListener(`mouseenter`,t.label.mouseEnter.bind(this,t)),t.label.mouseLeave&&r.node.addEventListener(`mouseleave`,t.label.mouseLeave.bind(this,t)),t.label.click&&r.node.addEventListener(`click`,t.label.click.bind(this,t))}}};e.config.annotations.xaxis.forEach((e,n)=>t(e,n,`xaxis`)),e.config.annotations.yaxis.forEach((e,n)=>t(e,n,`yaxis`)),e.config.annotations.points.forEach((e,n)=>t(e,n,`point`))}usesCategoryX(){let e=this.w;return(e.config.xaxis.type===`category`||e.config.xaxis.convertedCatToNumeric)&&!this.annoCtx.invertAxis&&!e.axisFlags.dataFormatXNumeric&&!e.config.chart.sparkline.enabled}hasXDomain(){let e=this.w;return this.annoCtx.invertAxis?Q.isNumber(e.globals.minY)&&Q.isNumber(e.globals.yRange[0]):this.usesCategoryX()?e.labelData.labels.length>0||e.labelData.categoryLabels.length>0:Q.isNumber(e.globals.minX)&&Q.isNumber(e.globals.xRange)}getY1Y2(e,t){let n=this.w,r=e===`y1`?t.y:t.y2,i=typeof r==`string`&&r.includes(`px`),a,o=!1;if(this.annoCtx.invertAxis){let e=n.config.xaxis.convertedCatToNumeric?n.labelData.categoryLabels:n.labelData.labels,o=e.indexOf(r);if(!i&&o===-1)return{yP:0,clipped:!0};let s=n.dom.baseEl.querySelector(`.apexcharts-yaxis-texts-g text:nth-child(${o+1})`);a=s?parseFloat(s.getAttribute(`y`)??`0`):(n.layout.gridHeight/e.length-1)*(o+1)-n.globals.barHeight,t.seriesIndex!==void 0&&n.globals.barHeight&&(a-=n.globals.barHeight/2*(n.seriesData.series.length-1)-n.globals.barHeight*t.seriesIndex)}else{if(!n.config.yaxis[t.yAxisIndex])return{yP:0,clipped:!0};let e=n.globals.seriesYAxisMap[t.yAxisIndex]?.[0]??null;if(e===null&&n.seriesData.series.length)return{yP:0,clipped:!0};let i=e===null?n.globals.minY:n.globals.minYArr[e],s=e===null?n.globals.maxY-n.globals.minY:n.globals.yRange[e],c=n.config.yaxis[t.yAxisIndex].logarithmic&&e!==null?new aa(this.w).getLogVal(n.config.yaxis[t.yAxisIndex].logBase,r,e)/n.globals.yLogRatio[e]:(r-i)/(s/n.layout.gridHeight);a=n.layout.gridHeight-Math.min(Math.max(c,0),n.layout.gridHeight),o=c>n.layout.gridHeight||c<0,t.marker&&(t.y===void 0||t.y===null)&&(a=0),n.config.yaxis[t.yAxisIndex]?.reversed&&(a=c)}return i&&(a=parseFloat(r)),{yP:a,clipped:o}}getX1X2(e,t){let n=this.w,r=e===`x1`?t.x:t.x2,i=this.annoCtx.invertAxis?n.globals.minY:n.globals.minX,a=this.annoCtx.invertAxis?n.globals.maxY:n.globals.maxX,o=this.annoCtx.invertAxis?n.globals.yRange[0]:n.globals.xRange,s=!1,c=typeof r==`string`&&r.includes(`px`),l=r==null&&t.marker;if(!c&&!l&&!this.hasXDomain())return{x:0,clipped:!0};let u=this.annoCtx.inversedReversedAxis?(a-r)/(o/n.layout.gridWidth):(r-i)/(o/n.layout.gridWidth);return(n.config.xaxis.type===`category`||n.config.xaxis.convertedCatToNumeric)&&!this.annoCtx.invertAxis&&!n.axisFlags.dataFormatXNumeric&&(n.config.chart.sparkline.enabled||(u=this.getStringX(r))),typeof r==`string`&&r.includes(`px`)&&(u=parseFloat(r)),r==null&&t.marker&&(u=n.layout.gridWidth),t.seriesIndex!==void 0&&n.globals.barWidth&&!this.annoCtx.invertAxis&&(u-=n.globals.barWidth/2*(n.seriesData.series.length-1)-n.globals.barWidth*t.seriesIndex),typeof u!=`number`&&(u=0,s=!0),parseFloat(u.toFixed(10))>parseFloat(n.layout.gridWidth.toFixed(10))?(u=n.layout.gridWidth,s=!0):u<0&&(u=0,s=!0),{x:u,clipped:s}}getStringX(e){let t=this.w,n=e;if(t.config.xaxis.convertedCatToNumeric&&t.labelData.categoryLabels.length){let n=String(e);e=t.labelData.categoryLabels.findIndex(e=>String(e)===n)+1}let r=t.labelData.labels.map(e=>Array.isArray(e)?e.join(` `):e).indexOf(e),i=t.dom.baseEl.querySelector(`.apexcharts-xaxis-texts-g text:nth-child(${r+1})`);return i&&(n=parseFloat(i.getAttribute(`x`)??`0`)),n}},as=class{constructor(e){this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new is(this.annoCtx)}addXaxisAnnotation(e,t,n){let r=this.w,i=this.helpers.getX1X2(`x1`,e),a=i.x,o=i.clipped,s=!0,c,l=e.label.text,u=e.strokeDashArray;if(Q.isNumber(a)){if(e.x2===null||e.x2===void 0){if(!o){let n=this.annoCtx.graphics.drawLine(a+e.offsetX,0+e.offsetY,a+e.offsetX,r.layout.gridHeight+e.offsetY,e.borderColor,u,e.borderWidth);t.appendChild(n.node),e.id&&n.node.classList.add(e.id),$i(n,a+e.offsetX,r)}}else{let n=this.helpers.getX1X2(`x2`,e);if(c=n.x,s=n.clipped,c<a){let e=a;a=c,c=e}let i=this.annoCtx.graphics.drawRect(a+e.offsetX,0+e.offsetY,c-a,r.layout.gridHeight+e.offsetY,0,e.fillColor,e.opacity,1,e.borderColor,u);i.node.classList.add(`apexcharts-annotation-rect`),i.attr(`clip-path`,`url(#gridRectMask${r.globals.cuid})`),t.appendChild(i.node),e.id&&i.node.classList.add(e.id),$i(i,a+e.offsetX,r)}if(!(o&&s)){let i=this.annoCtx.graphics.getTextRects(l,e.label.style.fontSize),o=e.label.position===`top`?4:e.label.position===`center`?r.layout.gridHeight/2+(e.label.orientation===`vertical`?i.width/2:0):r.layout.gridHeight,s=this.annoCtx.graphics.drawText({x:a+e.label.offsetX,y:o+e.label.offsetY-(e.label.orientation===`vertical`?e.label.position===`top`?i.width/2-12:-i.width/2:0),text:l,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:`apexcharts-xaxis-annotation-label ${e.label.style.cssClass} ${e.id?e.id:``}`});s.attr({rel:n}),t.appendChild(s.node),$i(s,a+e.label.offsetX,r),this.annoCtx.helpers.setOrientations(e,n)}}}drawXAxisAnnotations(){let e=this.w,t=this.annoCtx.graphics.group({class:`apexcharts-xaxis-annotations`});return e.config.annotations.xaxis.map((e,n)=>{this.addXaxisAnnotation(e,t.node,n)}),t}},os=class{constructor(e){this.w=e.w,this.annoCtx=e,this.helpers=new is(this.annoCtx),this.axesUtils=new xa(this.annoCtx.w,{theme:this.annoCtx.theme,timeScale:this.annoCtx.timeScale})}addYaxisAnnotation(e,t,n){let r=this.w,i=e.strokeDashArray,a=this.helpers.getY1Y2(`y1`,e),o=a.yP,s=a.clipped,c,l=!0,u=!1,d=e.label.text;if(e.y2===null||e.y2===void 0){if(!s){u=!0;let n=this.annoCtx.graphics.drawLine(0+e.offsetX,o+e.offsetY,this._getYAxisAnnotationWidth(e),o+e.offsetY,e.borderColor,i,e.borderWidth);t.appendChild(n.node),e.id&&n.node.classList.add(e.id)}}else{if(a=this.helpers.getY1Y2(`y2`,e),c=a.yP,l=a.clipped,c>o){let e=o;o=c,c=e}if(!(s&&l)){u=!0;let n=this.annoCtx.graphics.drawRect(0+e.offsetX,c+e.offsetY,this._getYAxisAnnotationWidth(e),o-c,0,e.fillColor,e.opacity,1,e.borderColor,i);n.node.classList.add(`apexcharts-annotation-rect`),n.attr(`clip-path`,`url(#gridRectMask${r.globals.cuid})`),t.appendChild(n.node),e.id&&n.node.classList.add(e.id)}}if(u){let i=e.label.position===`right`?r.layout.gridWidth:e.label.position===`center`?r.layout.gridWidth/2:0,a=this.annoCtx.graphics.drawText({x:i+e.label.offsetX,y:(c??o)+e.label.offsetY-3,text:d,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:`apexcharts-yaxis-annotation-label ${e.label.style.cssClass} ${e.id?e.id:``}`});a.attr({rel:n}),t.appendChild(a.node)}}_getYAxisAnnotationWidth(e){let t=this.w,n=t.layout.gridWidth;return n=e.width.indexOf(`%`)>-1?t.layout.gridWidth*parseInt(e.width,10)/100:parseInt(e.width,10),n+e.offsetX}drawYAxisAnnotations(){let e=this.w,t=this.annoCtx.graphics.group({class:`apexcharts-yaxis-annotations`});return e.config.annotations.yaxis.forEach((e,n)=>{e.yAxisIndex=this.axesUtils.translateYAxisIndex(e.yAxisIndex),this.axesUtils.isYAxisHidden(e.yAxisIndex)&&this.axesUtils.yAxisAllSeriesCollapsed(e.yAxisIndex)||this.addYaxisAnnotation(e,t.node,n)}),t}},ss=class{constructor(e){this.w=e.w,this.annoCtx=e,this.helpers=new is(this.annoCtx)}addPointAnnotation(e,t,n){let r=this.w;if(r.globals.collapsedSeriesIndices.indexOf(e.seriesIndex)>-1)return;let i=this.helpers.getX1X2(`x1`,e),a=i.x,o=i.clipped,s=this.helpers.getY1Y2(`y1`,e),c=s.yP,l=s.clipped;if(Q.isNumber(a)&&!(l||o)){let i={pSize:e.marker.size,pointStrokeWidth:e.marker.strokeWidth,pointFillColor:e.marker.fillColor,pointStrokeColor:e.marker.strokeColor,shape:e.marker.shape,pRadius:e.marker.radius,class:`apexcharts-point-annotation-marker ${e.marker.cssClass} ${e.id?e.id:``}`},o=this.annoCtx.graphics.drawMarker(a+e.marker.offsetX,c+e.marker.offsetY,i);t.appendChild(o.node);let s=[o.node];$i(o,a,r);let l=e.label.text?e.label.text:``,u=this.annoCtx.graphics.drawText({x:a+e.label.offsetX,y:c+e.label.offsetY-e.marker.size-parseFloat(e.label.style.fontSize)/1.6,text:l,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:`apexcharts-point-annotation-label ${e.label.style.cssClass} ${e.id?e.id:``}`});if(u.attr({rel:n}),t.appendChild(u.node),$i(u,a,r),e.customSVG.SVG){let n=this.annoCtx.graphics.group({class:`apexcharts-point-annotations-custom-svg `+e.customSVG.cssClass});n.attr({transform:`translate(${a+e.customSVG.offsetX}, ${c+e.customSVG.offsetY})`}),n.node.innerHTML=e.customSVG.SVG,t.appendChild(n.node),s.push(n.node)}if(e.image.path){let t=e.image.width?e.image.width:20,n=e.image.height?e.image.height:20;o=this.annoCtx.addImage({x:a+e.image.offsetX-t/2,y:c+e.image.offsetY-n/2,width:t,height:n,path:e.image.path,appendTo:`.apexcharts-point-annotations`}),s.push(o.node)}e.tooltip&&e.tooltip.enabled&&s.forEach(t=>{t.addEventListener(`mouseenter`,()=>{this.showPointTooltip(e,t)}),t.addEventListener(`mouseleave`,()=>{this.hidePointTooltip()})}),e.mouseEnter&&o.node.addEventListener(`mouseenter`,e.mouseEnter.bind(this,e)),e.mouseLeave&&o.node.addEventListener(`mouseleave`,e.mouseLeave.bind(this,e)),e.click&&o.node.addEventListener(`click`,e.click.bind(this,e))}}getPointTooltipEl(){let e=this.w,t=e.dom.elWrap.querySelector(`.apexcharts-annotation-tooltip`);return t||(t=X.createElementNS(`http://www.w3.org/1999/xhtml`,`div`),t.classList.add(`apexcharts-tooltip`,`apexcharts-annotation-tooltip`),e.dom.elWrap.appendChild(t)),t}getPointTooltipContent(e){let t=this.w,n=e.tooltip||{};if(typeof n.formatter==`function`)return n.formatter({annotation:e,seriesIndex:e.seriesIndex,id:e.id,w:t});let r=n.text==null?e.label&&e.label.text:n.text;return Array.isArray(r)&&(r=r.join(`<br/>`)),r==null?``:String(r)}showPointTooltip(e,t){let n=this.w,r=this.getPointTooltipContent(e);if(!r)return;let i=this.getPointTooltipEl();i.innerHTML=r;let a=e.tooltip.theme||n.config.tooltip.theme||`light`;i.classList.remove(`apexcharts-theme-light`,`apexcharts-theme-dark`),i.classList.add(`apexcharts-theme-${a}`),i.classList.add(`apexcharts-active`);let o=n.dom.elWrap.getBoundingClientRect(),s=t.getBoundingClientRect(),c=i.getBoundingClientRect(),l=e.tooltip.offsetX||0,u=e.tooltip.offsetY||0,d=s.left-o.left+s.width/2-c.width/2,f=s.top-o.top-c.height-10;d=Math.max(0,Math.min(d,o.width-c.width)),f<0&&(f=s.top-o.top+s.height+10),i.style.left=d+l+`px`,i.style.top=f+u+`px`}hidePointTooltip(){let e=this.w.dom.elWrap.querySelector(`.apexcharts-annotation-tooltip`);e&&e.classList.remove(`apexcharts-active`)}drawPointAnnotations(){let e=this.w,t=this.annoCtx.graphics.group({class:`apexcharts-point-annotations`});return e.config.annotations.points.map((e,n)=>{this.addPointAnnotation(e,t.node,n)}),t}},cs=class{constructor(e,{theme:t=null,timeScale:n=null}={}){this.w=e,this.theme=t,this.timeScale=n,this.invertAxis=void 0,this.inversedReversedAxis=void 0,this.graphics=new J(this.w),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new is(this),this.xAxisAnnotations=new as(this),this.yAxisAnnotations=new os(this),this.pointsAnnotations=new ss(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.layout.gridWidth/this.w.globals.dataPoints}drawAxesAnnotations(){let e=this.w;if(e.globals.axisCharts){let t=this.yAxisAnnotations.drawYAxisAnnotations(),n=this.xAxisAnnotations.drawXAxisAnnotations(),r=this.pointsAnnotations.drawPointAnnotations(),i=e.config.chart.animations.enabled,a=[t,n,r],o=[n.node,t.node,r.node],s=e.config.chart.type===`line`||e.config.chart.type===`area`||e.config.chart.type===`rangeArea`,c=[s,!1,s];for(let t=0;t<3;t++)e.dom.elGraphical.add(a[t]),i&&!e.globals.resized&&!e.globals.dataChanged&&e.config.chart.type!==`scatter`&&e.config.chart.type!==`bubble`&&e.globals.dataPoints>1&&!c[t]&&o[t].classList.add(`apexcharts-element-hidden`),e.globals.delayedElements.push({el:o[t],index:0});this.helpers.annotationsBackground()}}drawImageAnnos(){this.w.config.annotations.images.map(e=>{this.addImage(e)})}drawTextAnnos(){this.w.config.annotations.texts.map(e=>{this.addText(e)})}addXaxisAnnotation(e,t,n){this.xAxisAnnotations.addXaxisAnnotation(e,t,n)}addYaxisAnnotation(e,t,n){this.yAxisAnnotations.addYaxisAnnotation(e,t,n)}addPointAnnotation(e,t,n){this.pointsAnnotations.addPointAnnotation(e,t,n)}addText(e){let{x:t,y:n,text:r,textAnchor:i,foreColor:a,fontSize:o,fontFamily:s,fontWeight:c,cssClass:l,backgroundColor:u,borderWidth:d,strokeDashArray:f,borderRadius:p,borderColor:m,appendTo:h=`.apexcharts-svg`,paddingLeft:g=4,paddingRight:_=4,paddingBottom:v=2,paddingTop:y=2}=e,b=this.w,x=this.graphics.drawText({x:t,y:n,text:r,textAnchor:i||`start`,fontSize:o||`12px`,fontWeight:c||`regular`,fontFamily:s||b.config.chart.fontFamily,foreColor:a||b.config.chart.foreColor,cssClass:`apexcharts-text `+l?l:``}),S=b.dom.baseEl.querySelector(h);S&&S.appendChild(x.node);let C=x.bbox();if(r){let e=this.graphics.drawRect(C.x-g,C.y-y,C.width+g+_,C.height+v+y,p,u||`transparent`,1,d,m,f);S.insertBefore(e.node,x.node)}}addImage(e){let t=this.w,{path:n,x:r=0,y:i=0,width:a=20,height:o=20,appendTo:s=`.apexcharts-svg`}=e,c=t.dom.Paper.image(n);c.size(a,o).move(r,i);let l=t.dom.baseEl.querySelector(s);return l&&l.appendChild(c.node),c}addXaxisAnnotationExternal(e,t,n){return this.addAnnotationExternal({params:e,pushToMemory:t,context:n,type:`xaxis`,contextMethod:n.addXaxisAnnotation}),n}addYaxisAnnotationExternal(e,t,n){return this.addAnnotationExternal({params:e,pushToMemory:t,context:n,type:`yaxis`,contextMethod:n.addYaxisAnnotation}),n}addPointAnnotationExternal(e,t,n){return this.invertAxis===void 0&&(this.invertAxis=n.w.globals.isBarHorizontal),this.addAnnotationExternal({params:e,pushToMemory:t,context:n,type:`point`,contextMethod:n.addPointAnnotation}),n}addAnnotationExternal({params:e,pushToMemory:t,context:n,type:r,contextMethod:i}){let a=n,o=a.w,s=o.dom.baseEl.querySelector(`.apexcharts-${r}-annotations`),c=s.childNodes.length+1,l=new La,u=Object.assign({},r===`xaxis`?l.xAxisAnnotation:r===`yaxis`?l.yAxisAnnotation:l.pointAnnotation),d=Q.extend(u,e);switch(r){case`xaxis`:this.addXaxisAnnotation(d,s,c);break;case`yaxis`:this.addYaxisAnnotation(d,s,c);break;case`point`:this.addPointAnnotation(d,s,c)}let f=o.dom.baseEl.querySelector(`.apexcharts-${r}-annotations .apexcharts-${r}-annotation-label[rel='${c}']`),p=this.helpers.addBackgroundToAnno(f,d);return p&&s.insertBefore(p.node,f),t&&o.globals.memory.methodsToExec.push({context:a,id:d.id?d.id:Q.randomId(),method:i,label:`addAnnotation`,params:e}),n}_removeAnnotationTooltip(e){let t=e.dom.elWrap&&e.dom.elWrap.querySelector(`.apexcharts-annotation-tooltip`);t&&t.parentNode&&t.parentNode.removeChild(t)}clearAnnotations(e){let t=e.w;this._removeAnnotationTooltip(t);let n=t.dom.baseEl.querySelectorAll(`.apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations`);for(let e=t.globals.memory.methodsToExec.length-1;e>=0;e--)(t.globals.memory.methodsToExec[e].label===`addText`||t.globals.memory.methodsToExec[e].label===`addAnnotation`)&&t.globals.memory.methodsToExec.splice(e,1);Array.prototype.forEach.call(n,e=>{for(;e.firstChild;)e.removeChild(e.firstChild)})}removeAnnotation(e,t){let n=e.w;this._removeAnnotationTooltip(n);let r=n.dom.baseEl.querySelectorAll(`.${t}`);r&&(n.globals.memory.methodsToExec.map((e,r)=>{e.id===t&&n.globals.memory.methodsToExec.splice(r,1)}),Object.keys(n.config.annotations).forEach(e=>{let r=n.config.annotations[e];Array.isArray(r)&&(n.config.annotations[e]=r.filter(e=>e.id!==t))}),Array.prototype.forEach.call(r,e=>{e.parentElement.removeChild(e)}))}};G.registerFeatures({annotations:cs});var ls=class{constructor(e,t){this.w=e,this.ctx=t,this.seriesIndex=0,this.dataPointIndex=0,this.active=!1,this._tooltipDismissed=!1,this._focusedEl=null,this._hoveredBarEl=null,this._enlargedScatterMarker=null,this._onKeyDown=this._onKeyDown.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this),this._onLegendClick=this._onLegendClick.bind(this),this._onPointerDown=this._onPointerDown.bind(this),this._lastPointerDownAt=0}init(){let e=this.w.dom.Paper.node;e&&(e.setAttribute(`tabindex`,`0`),e.addEventListener(`focus`,this._onFocus),e.addEventListener(`blur`,this._onBlur),e.addEventListener(`mousedown`,this._onPointerDown,{capture:!0}),e.addEventListener(`pointerdown`,this._onPointerDown,{capture:!0}),e.addEventListener(`touchstart`,this._onPointerDown,{capture:!0,passive:!0}),e.addEventListener(`keydown`,this._onKeyDown,{passive:!1}),this.ctx.events.addEventListener(`legendClick`,this._onLegendClick))}destroy(){let e=this.w,t=e.dom.Paper&&e.dom.Paper.node;this.ctx.events.removeEventListener(`legendClick`,this._onLegendClick),t&&(t.removeEventListener(`focus`,this._onFocus),t.removeEventListener(`blur`,this._onBlur),t.removeEventListener(`keydown`,this._onKeyDown),t.removeEventListener(`mousedown`,this._onPointerDown,{capture:!0}),t.removeEventListener(`pointerdown`,this._onPointerDown,{capture:!0}),t.removeEventListener(`touchstart`,this._onPointerDown,{capture:!0}))}_onPointerDown(){this._lastPointerDownAt=Date.now()}handleKey(e){}_onFocus(){this._isNavEnabled()&&(Date.now()-this._lastPointerDownAt<100||(this.active=!0,this._clampCursor(),this._snapToVisibleRange(),this._showCurrentPoint()))}_onBlur(){this.active=!1,this._tooltipDismissed=!1,this._hideFocus()}_onLegendClick(){this.active&&(this.active=!1,this._hideFocus())}_onKeyDown(e){var t,n,r;if(this._isNavEnabled()&&this.active){if(e.shiftKey&&(e.key===`ArrowRight`||e.key===`ArrowLeft`)&&this._canPan()){e.preventDefault(),this._panBy(e.key===`ArrowRight`?1:-1);return}switch(e.key){case`ArrowRight`:e.preventDefault(),this._move(0,1);break;case`ArrowLeft`:e.preventDefault(),this._move(0,-1);break;case`ArrowUp`:e.preventDefault(),this._move(-1,0);break;case`ArrowDown`:e.preventDefault(),this._move(1,0);break;case`Home`:e.preventDefault(),this.dataPointIndex=0,this._skipNullForward(),this._showCurrentPoint();break;case`End`:e.preventDefault(),this.dataPointIndex=this._getDataPointCount(this.seriesIndex)-1,this._skipNullBackward(),this._showCurrentPoint();break;case`Enter`:case` `:e.preventDefault(),this._fireClick();break;case`+`:case`=`:this._canZoom()&&(e.preventDefault(),(t=this.ctx.toolbar)==null||t.handleZoomIn(),this._announce(`Zoomed in`));break;case`-`:case`_`:this._canZoom()&&(e.preventDefault(),(n=this.ctx.toolbar)==null||n.handleZoomOut(),this._announce(`Zoomed out`));break;case`0`:this._canZoom()&&this.w.interact.zoomed&&(e.preventDefault(),(r=this.ctx.toolbar)==null||r.handleZoomReset(),this._announce(`Zoom reset`));break;case`Escape`:e.preventDefault(),this._tooltipDismissed?(this.active=!1,this._tooltipDismissed=!1,this._hideFocus()):(this._tooltipDismissed=!0,this._hideFocus())}}}_canZoom(){let e=this.w;return!!(e.globals.axisCharts&&e.config.chart.zoom&&e.config.chart.zoom.enabled)}_canPan(){return this._canZoom()}_panBy(e){let t=this.w,n=this.ctx.toolbar;if(!n)return;let r=Number(t.globals.minX),i=Number(t.globals.maxX);if(!isFinite(r)||!isFinite(i)||r===i)return;let a=(i-r)*.1*e;n.zoomUpdateOptions(r+a,i+a),this._announce(e>0?`Panned right`:`Panned left`)}_move(e,t){let n=this.w,r=n.config.chart.accessibility.keyboard.navigation.wrapAround;if(e!==0){let t=this.w.globals.tooltip;if(t&&t.tConfig&&t.tConfig.shared){let e=this.dataPointIndex;if(t.tooltipUtil&&t.tooltipUtil.isXoverlap(e)&&t.tooltipUtil.isInitialSeriesSameLen())return}let i=this._getSeriesCount(),a=this.seriesIndex+e,o=0;for(;o<i&&(a<0&&(a=r?i-1:0),a>=i&&(a=r?0:i-1),n.globals.collapsedSeriesIndices.includes(a));)a+=e,o++;this.seriesIndex=a;let s=this._getDataPointCount(a);this.dataPointIndex>=s&&(this.dataPointIndex=s-1)}if(t!==0){let e=this._getDataPointCount(this.seriesIndex),n=this.dataPointIndex+t;n<0&&(n=r?e-1:0),n>=e&&(n=r?0:e-1),this.dataPointIndex=n,t>0?this._skipNullForward():this._skipNullBackward(),this._isDataPointVisible(this.seriesIndex,this.dataPointIndex)||this._snapToVisibleRangeInDirection(t)}this._showCurrentPoint()}_skipNullForward(){let e=this.w,t=this.seriesIndex,n=this._getDataPointCount(t),r=this.dataPointIndex,i=0;if(Array.isArray(e.seriesData.series[t])){for(;i<n&&e.seriesData.series[t][r]===null;)r=(r+1)%n,i++;this.dataPointIndex=r}}_skipNullBackward(){let e=this.w,t=this.seriesIndex,n=this._getDataPointCount(t),r=this.dataPointIndex,i=0;if(Array.isArray(e.seriesData.series[t])){for(;i<n&&e.seriesData.series[t][r]===null;)r=(r-1+n)%n,i++;this.dataPointIndex=r}}_showCurrentPoint(){let{seriesIndex:e,dataPointIndex:t}=this,n=this.w,r=n.globals.tooltip;r&&r.ttItems&&(n.interact.capturedSeriesIndex=e,n.interact.capturedDataPointIndex=t,this._applyFocusClass(e,t),this._showTooltip(e,t,r))}_hideFocus(){let e=this.w,t=e.globals.tooltip;if(this._removeFocusClass(),this._leaveHoveredBar(),!t)return;t.marker&&t.marker.resetPointsSize(),this._enlargedScatterMarker=null;let n=t.getElTooltip();n&&(n.classList.remove(`apexcharts-active`),e.config.chart.accessibility.enabled&&e.config.chart.accessibility.announcements.enabled&&n.setAttribute(`aria-hidden`,`true`)),e.dom.baseEl.classList.remove(`apexcharts-tooltip-active`);let r=t.getElXCrosshairs();r&&r.classList.remove(`apexcharts-active`)}_showTooltip(e,t,n){let r=this.w,i=r.config.chart.type,a=n.getElTooltip();if(!a)return;let o=n.getCachedDimensions();n.tooltipRect={x:0,y:0,ttWidth:o.ttWidth||0,ttHeight:o.ttHeight||0},this._setSyntheticEvent(e,t,n),r.dom.baseEl.classList.add(`apexcharts-tooltip-active`),a.classList.add(`apexcharts-active`),r.config.chart.accessibility.enabled&&r.config.chart.accessibility.announcements.enabled&&a.removeAttribute(`aria-hidden`),i===`pie`||i===`donut`||i===`polarArea`?this._showTooltipNonAxis(e,t,n,a):i===`radialBar`?this._showTooltipRadialBar(e,t,n,a):i===`heatmap`||i===`treemap`?this._showTooltipHeatTree(e,t,n,a,i):i===`bar`||i===`candlestick`||i===`boxPlot`||i===`violin`||i===`rangeBar`?this._showTooltipBar(e,t,n):this._showTooltipAxisLine(e,t,n)}_setSyntheticEvent(e,t,n){let r=this.w,i=r.config.chart.type,a=0,o=0,s=this._getFocusableElement(e,t);if(s){let e=s.getBoundingClientRect();a=e.left+e.width/2,o=e.top+e.height/2}else if(r.globals.pointsArray&&r.globals.pointsArray[e]&&r.globals.pointsArray[e][t]){let i=r.globals.pointsArray[e][t],s=n.getElGrid&&n.getElGrid();if(s){let e=s.getBoundingClientRect();a=e.left+(i[0]||0),o=e.top+(i[1]||0)}}else{let e=r.dom.Paper&&r.dom.Paper.node;if(e){let t=e.getBoundingClientRect();a=t.left+t.width/2,o=t.top+t.height/2}}if((i===`line`||i===`area`||i===`rangeArea`||i===`scatter`||i===`bubble`||i===`radar`)&&r.globals.pointsArray&&r.globals.pointsArray[e]&&r.globals.pointsArray[e][t]){let i=r.globals.pointsArray[e][t],s=n.getElGrid&&n.getElGrid();if(s){let e=s.getBoundingClientRect();a=e.left+(i[0]||0),o=e.top+(i[1]||0)}}n.e={type:`mousemove`,clientX:a,clientY:o}}_showTooltipBar(e,t,n){let r=this.w,i=n.tConfig.shared&&(n.tooltipUtil.isXoverlap(t)||r.globals.isBarHorizontal)&&n.tooltipUtil.isInitialSeriesSameLen(),a=r.rangeData.seriesRange?.[e]?.[t]?.y?.[0];n.tooltipLabels.drawSeriesTexts(q(K(K({ttItems:n.ttItems,i:e,j:t},a?.y1!==void 0&&{y1:a.y1}),a?.y2!==void 0&&{y2:a.y2}),{shared:i}));let o=`.apexcharts-series[data\\:realIndex='${e}']`,s=r.dom.Paper.findOne(`${o} path[j='${t}'], ${o} circle[j='${t}'], ${o} rect[j='${t}']`);if(s&&(this._leaveHoveredBar(),new J(this.w,this.ctx).pathMouseEnter(s,null),this._hoveredBarEl=s),r.globals.isBarHorizontal){let e=s&&s.node;if(e){let t=r.dom.elWrap.getBoundingClientRect(),i=e.getBoundingClientRect(),a=i.left-t.left,o=i.top-t.top,s=i.height,c=i.width,l=n.tooltipRect.ttWidth||0,u=n.tooltipRect.ttHeight||0,d=o+s/2-u/2,f=a+c;a<(n.xyRatios&&n.xyRatios.baseLineInvertedY!=null?n.xyRatios.baseLineInvertedY:t.width/2)&&(f=a-l);let p=n.getElTooltip();p&&(p.style.left=f+`px`,p.style.top=d+`px`)}}else n.tooltipPosition.moveStickyTooltipOverBars(t,e)}_showTooltipAxisLine(e,t,n){let r=this.w,i=r.config.chart.type,a=n.tConfig.shared&&n.tooltipUtil.isXoverlap(t)&&n.tooltipUtil.isInitialSeriesSameLen();n.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:e,j:t,shared:a});let o=i===`scatter`||i===`bubble`,s=r.globals.markers.largestSize>0&&!r.globals.markers.batched;o?this._showScatterBubblePoint(e,t,n):s?a?n.marker.enlargePoints(t):n.tooltipPosition.moveDynamicPointOnHover(t,e):a?n.tooltipPosition.moveDynamicPointsOnHover(t):n.tooltipPosition.moveDynamicPointOnHover(t,e)}_showScatterBubblePoint(e,t,n){let r=this.w.dom.baseEl;this._enlargedScatterMarker&&=(n.marker.oldPointSize(this._enlargedScatterMarker),null);let i=r.querySelector(`.apexcharts-series[data\\:realIndex='${e}']`);if(!i)return;let a=i.querySelector(`.apexcharts-marker[rel='${t}']`);a&&(n.marker.enlargeCurrentPoint(t,a),this._enlargedScatterMarker=a)}_showTooltipNonAxis(e,t,n,r){let i=this.w;n.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:t,shared:!1});let a=r.getBoundingClientRect(),o=a.width||n.tooltipRect.ttWidth||0,s=a.height||n.tooltipRect.ttHeight||0,c=i.dom.baseEl.querySelector(`.apexcharts-pie-area[j='${t}']`),l=n.getSliceAnchor(c);l&&(r.style.left=l.x-o/2+`px`,r.style.top=l.y-s-10+`px`)}_showTooltipRadialBar(e,t,n,r){let i=this.w;n.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:e,shared:!1});let{ttWidth:a=0,ttHeight:o=0}=n.getCachedDimensions(),s=i.dom.baseEl.querySelector(`.apexcharts-radialbar-series[data\\:realIndex='${e}'] path`);if(s){let t=parseFloat(s.getAttribute(`data:angle`)??``)||0,n=(i.config.plotOptions.radialBar.startAngle||0)+t/2,c=i.layout.gridWidth/2,l=i.layout.gridHeight/2,u=i.globals.radialSize||Math.min(i.layout.gridWidth,i.layout.gridHeight)/2,d=i.seriesData.series.length,f=u/Math.max(d,1),p=u-e*f,m=(p+(p-f))/2,h=Q.polarToCartesian(c,l,m,n),g=h.x+(i.layout.translateX||0),_=h.y+(i.layout.translateY||0);r.style.left=g-a/2+`px`,r.style.top=_-o-10+`px`}}_showTooltipHeatTree(e,t,n,r,i){let a=this.w;n.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:e,j:t,shared:!1});let o=r.getBoundingClientRect(),s=o.width||n.tooltipRect.ttWidth||0,c=o.height||n.tooltipRect.ttHeight||0,l=i===`heatmap`?`apexcharts-heatmap-rect`:`apexcharts-treemap-rect`,u=a.dom.baseEl.querySelector(`.${l}[i='${e}'][j='${t}']`);if(u){let e=a.dom.elWrap.getBoundingClientRect(),t=u.getBoundingClientRect(),i=t.left-e.left,o=t.top-e.top,l=t.width,d=t.height,f=parseFloat(u.getAttribute(`cx`)??``),p=parseFloat(u.getAttribute(`width`)??``);n.tooltipPosition.moveXCrosshairs(f+p/2);let m=i+l+s/2,h=o+d/2-c/2;i+l>a.layout.gridWidth/2&&(m=i-s/2),r.style.left=m+`px`,r.style.top=h+`px`}}_applyFocusClass(e,t){this._removeFocusClass();let n=this._getFocusableElement(e,t)||this._getBatchedFocusEl(e);if(n){n.classList.add(`apexcharts-keyboard-focused`),n.setAttribute(`role`,`img`);let r=this._buildPointLabel(e,t);r&&n.setAttribute(`aria-label`,r),this._focusedEl=n}}_getBatchedFocusEl(e){return this.w.globals.markers.batched?this.w.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${e}'] .apexcharts-series-markers path`):null}_removeFocusClass(){this._focusedEl&&=(this._focusedEl.classList.remove(`apexcharts-keyboard-focused`),this._focusedEl.removeAttribute(`role`),this._focusedEl.removeAttribute(`aria-label`),null)}_buildPointLabel(e,t){let n=this.w,r=n.config.chart.type,i=n.seriesData.seriesNames||[],a=n.seriesData.series||[];if(r===`pie`||r===`donut`||r===`polarArea`){let e=(n.labelData?.labels&&n.labelData.labels[t])??``,r=Array.isArray(a)?a[t]:``;return e?`${e}: ${r}`:`${r}`}if(r===`radialBar`)return`${i[e]||`Series ${e+1}`}: ${Array.isArray(a)?a[e]:``}`;let o=i[e]||`Series ${e+1}`,s=(Array.isArray(a[e])?a[e]:[])[t],c=s==null?``:String(s),l=n.formatters?.yLabelFormatters?.[e];if(typeof l==`function`)try{c=l(s,{seriesIndex:e,dataPointIndex:t,w:n})}catch{}let u=``,d=n.labelData?.categoryLabels,f=n.seriesData?.seriesX?.[e];if(Array.isArray(d)&&d[t]!=null)u=String(d[t]);else if(Array.isArray(f)&&f[t]!=null){let r=n.formatters?.xLabelFormatter;if(typeof r==`function`)try{u=String(r(f[t],{seriesIndex:e,dataPointIndex:t,w:n}))}catch{u=String(f[t])}else u=String(f[t])}return u?`${o}: ${c}, ${u}`:`${o}: ${c}`}_leaveHoveredBar(){this._hoveredBarEl&&=(new J(this.w,this.ctx).pathMouseLeave(this._hoveredBarEl,null),null)}_getFocusableElement(e,t){let n=this.w,r=n.config.chart.type,i=n.dom.baseEl;return r===`pie`||r===`donut`||r===`polarArea`?i.querySelector(`.apexcharts-pie-area[j='${t}']`):r===`heatmap`?i.querySelector(`.apexcharts-heatmap-rect[i='${e}'][j='${t}']`):r===`treemap`?i.querySelector(`.apexcharts-treemap-rect[i='${e}'][j='${t}']`):r===`radialBar`?i.querySelector(`.apexcharts-radialbar-series[data\\:realIndex='${e}'] path`):r===`bar`||r===`candlestick`||r===`boxPlot`||r===`violin`||r===`rangeBar`?i.querySelector(`.apexcharts-series[data\\:realIndex='${e}'] path[j='${t}']`):i.querySelector(`.apexcharts-series[data\\:realIndex='${e}'] .apexcharts-marker[rel='${t}']`)||null}_fireClick(){let e=this.w.globals.tooltip;e&&e.markerClick({type:`mouseup`,clientX:0,clientY:0},this.seriesIndex,this.dataPointIndex)}_isNavEnabled(){let e=this.w.config.chart.accessibility;return e.enabled&&e.keyboard.enabled&&e.keyboard.navigation.enabled}_getSeriesCount(){let e=this.w,t=e.config.chart.type;return t===`pie`||t===`donut`||t===`polarArea`?1:e.seriesData.series.length}_getDataPointCount(e){let t=this.w,n=t.config.chart.type;if(n===`pie`||n===`donut`||n===`polarArea`)return t.seriesData.series.length;let r=t.seriesData.series;return r[e]&&Array.isArray(r[e])?r[e].length:0}_clampCursor(){let e=this._getSeriesCount();this.seriesIndex>=e&&(this.seriesIndex=e-1),this.seriesIndex<0&&(this.seriesIndex=0);let t=this._getDataPointCount(this.seriesIndex);this.dataPointIndex>=t&&(this.dataPointIndex=t-1),this.dataPointIndex<0&&(this.dataPointIndex=0)}_snapToVisibleRange(){let e=this.w,t=e.globals,n=this.seriesIndex;if(!e.interact.zoomed)return;let r=e.seriesData.seriesX&&e.seriesData.seriesX[n];if(!r||!r.length)return;let i=t.minX,a=t.maxX;if(i===void 0||a===void 0)return;let o=r[this.dataPointIndex];if(o>=i&&o<=a)return;let s=r.length;for(let e=0;e<s;e++)if(r[e]>=i&&r[e]<=a){this.dataPointIndex=e;return}}_snapToVisibleRangeInDirection(e){let t=this.w,n=t.globals,r=this.seriesIndex,i=t.seriesData.seriesX&&t.seriesData.seriesX[r];if(!i||!i.length)return;let a=n.minX,o=n.maxX;if(a===void 0||o===void 0)return;let s=i.length;if(e>=0){for(let e=0;e<s;e++)if(i[e]>=a&&i[e]<=o){this.dataPointIndex=e;return}}else for(let e=s-1;e>=0;e--)if(i[e]>=a&&i[e]<=o){this.dataPointIndex=e;return}}_isDataPointVisible(e,t){let n=this.w,r=n.globals;if(!n.interact.zoomed)return!0;let i=n.seriesData.seriesX&&n.seriesData.seriesX[e];if(!i)return!0;let a=i[t];return a===void 0||a>=r.minX&&a<=r.maxX}_announce(e){let t=this.w;if(!t.config.chart.accessibility.announcements.enabled)return;let n=t.dom.baseEl;if(!n)return;let r=n.querySelector(`.apexcharts-sr-status`);r&&(r.textContent=``,setTimeout(()=>{r.textContent=e},0))}};G.registerFeatures({keyboardNavigation:ls});function us(e,t){if(!(t>0))return[];if(t===1)return[K({},e)];let n=e.width>=e.height,r=n?e.width:e.height,i=n?e.height:e.width,a=i>0?r/i:t,o=Math.max(1,Math.ceil(Math.sqrt(a*t)));o>t&&(o=t);let s=Math.floor(t/o),c=t-s*o,l=[],u=r/o,d=0;for(let t=0;t<o;t++){let t=s+ +(c>0);c>0&&c--;let r=t>0?i/t:0;for(let i=0;i<t;i++)l.push(n?{x:e.x+d,y:e.y+i*r,width:u,height:r}:{x:e.x+i*r,y:e.y+d,width:r,height:u});d+=u}return l}function ds(e,t,n){if(!(t>0))return[];let r=e.width>=e.height,i=r?e.width:e.height,a=r?e.height:e.width,o=r?e.y:e.x,s=o+a,c=a>0?i/a:t,l=Math.max(Math.ceil(Math.sqrt(c*t)),Math.ceil(i/16));l>=1||(l=1),l>t&&(l=t);let u=Math.floor(t/l),d=t-u*l,f=[],p=i/l,m=r?e.x:e.y;for(let e=0;e<l;e++){let e=u+ +(d>0);d>0&&d--;let t=[],i=n(m,m+p,r);if(Array.isArray(i))for(let e=0;e<i.length;e++){let n=i[e];if(!n)continue;let r=Math.max(o,Math.min(n[0],n[1])),a=Math.min(s,Math.max(n[0],n[1]));a>r&&t.push([r,a])}t.length||t.push([o,s]);let a=t.reduce((e,t)=>e+(t[1]-t[0]),0),c=t.map(n=>a>0?(n[1]-n[0])/a*e:e/t.length),l=c.map(e=>Math.floor(e)),h=l.reduce((e,t)=>e+t,0),g=c.map((e,t)=>({i:t,frac:e-Math.floor(e)})).sort((e,t)=>t.frac-e.frac);for(let t=0;h<e;t++,h++)l[g[t%g.length].i]++;for(let e=0;e<t.length;e++){let n=l[e];if(n<=0)continue;let i=t[e][0],a=(t[e][1]-i)/n;for(let e=0;e<n;e++)f.push(r?{x:m,y:i+e*a,width:p,height:a}:{x:i+e*a,y:m,width:a,height:p})}m+=p}return f}function fs(e,t,n,r,i,a){let o=i===n?0:Math.round(32767*((e-n)/(i-n))),s=a===r?0:Math.round(32767*((t-r)/(a-r))),c=0;for(let e=32768;e>=1;e/=2){let t=+((o&e)>0),n=+((s&e)>0);if(c+=e*e*(3*t^n),n===0){t===1&&(o=e-1-o,s=e-1-s);let n=o;o=s,s=n}}return c}function ps(e,t){let n=1/0,r=1/0,i=-1/0,a=-1/0,o=e.map(e=>{let[o,s]=t(e);return o<n&&(n=o),o>i&&(i=o),s<r&&(r=s),s>a&&(a=s),[o,s]});return e.map((e,t)=>({item:e,d:fs(o[t][0],o[t][1],n,r,i,a)})).sort((e,t)=>e.d-t.d).map(e=>e.item)}function ms(e){if(!e||typeof e!=`string`)return null;let t=e.trim();if(t[0]===`#`){let e=t.slice(1);return e.length===3?[parseInt(e[0]+e[0],16),parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),1]:e.length===6||e.length===8?[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16),e.length===8?parseInt(e.slice(6,8),16)/255:1]:null}let n=t.match(/^rgba?\(([^)]+)\)$/i);if(n){let e=n[1].split(`,`).map(e=>parseFloat(e));return e.length<3||e.some(e=>!isFinite(e))?null:[e[0],e[1],e[2],e.length>3?e[3]:1]}return null}function hs(e,t){let n=ms(e),r=ms(t);return!n||!r?null:e=>{let t=Math.round(n[0]+(r[0]-n[0])*e),i=Math.round(n[1]+(r[1]-n[1])*e),a=Math.round(n[2]+(r[2]-n[2])*e),o=n[3]+(r[3]-n[3])*e;return o>=1?`rgb(${t},${i},${a})`:`rgba(${t},${i},${a},${o})`}}function gs(e){return e<.5?4*e*e*e:1-(-2*e+2)**3/2}function _s({pieces:e,duration:t,onPieceDone:n,onAllDone:r}){let i=!1,a=Date.now(),o=Math.max(1,t),s=(e,t)=>{let n=e.from,r=e.to,i=e.el;i.setAttribute(`x`,String(n.x+(r.x-n.x)*t)),i.setAttribute(`y`,String(n.y+(r.y-n.y)*t)),i.setAttribute(`width`,String(Math.max(0,n.width+(r.width-n.width)*t))),i.setAttribute(`height`,String(Math.max(0,n.height+(r.height-n.height)*t))),i.setAttribute(`rx`,String(Math.max(0,n.rx+(r.rx-n.rx)*t))),e.fill?i.setAttribute(`fill`,e.fill(t)):t>=1&&e.fillEnd&&i.setAttribute(`fill`,e.fillEnd)},c=()=>{if(i)return;let t=Date.now()-a,l=!1;for(let r=0;r<e.length;r++){let i=e[r];if(i._done)continue;let a=(t-i.delay)/o;if(a<1&&(l=!0),a<=0)continue;let c=Math.min(1,a);s(i,gs(c)),c>=1&&(i._done=!0,n&&n(i))}l?X.requestAnimationFrame(c):r&&r()};return X.requestAnimationFrame(c),()=>{i=!0}}var vs=new Set([`bar`,`funnel`,`pyramid`,`histogram`]),ys=new Set([`pie`,`donut`,`polarArea`,`radialBar`,`gauge`]),bs=new Set([`unit`,`waffle`]),xs=new Set([`treemap`,`sunburst`]),Ss=new Set([`boxPlot`,`violin`]),Cs=.55,ws=1500,Ts=300;function Es(e){return vs.has(e)?`bar`:ys.has(e)?`radial`:bs.has(e)?`unit`:xs.has(e)?`partition`:Ss.has(e)?`summary`:null}var Ds=class{constructor(e,t){this.w=e,this.ctx=t,this._snapshot=null,this._ghost=null,this._pieceLayer=null,this._pieceCancel=null}canMorphTypes(e,t){if(e===t)return!1;let n=Es(e),r=Es(t);return!n||!r?!1:n===`partition`==(r===`partition`)||n!==`unit`&&r!==`unit`}isCompatibleSeriesShape(e,t,n){if(!Array.isArray(n)||n.length===0)return!1;let r=Es(e),i=Es(t);return i===`unit`?n.every(e=>typeof e==`number`)?!0:n.every(e=>e&&typeof e==`object`&&Array.isArray(e.data)):i===`partition`?!0:i===`radial`?n.every(e=>typeof e==`number`)?!0:n.length===1&&n[0]&&typeof n[0]==`object`&&Array.isArray(n[0].data):i===`bar`||i===`summary`?n.every(e=>e&&typeof e==`object`&&Array.isArray(e.data)):r!==null&&i!==null}captureBeforeDestroy({fromType:e,toType:t,newSeries:n}){if(this._snapshot=null,this._removeGhost(),this._cancelPieces(),!Z.isBrowser())return!1;let r=this.w.config.chart.animations;if(!r||r.enabled===!1||r.chartTypeMorph&&r.chartTypeMorph.enabled===!1||r.respectReducedMotion&&Qi()||!this.canMorphTypes(e,t)||!this.isCompatibleSeriesShape(e,t,n))return!1;let{marks:i,branches:a,unitDots:o}=this._captureFromDOM(e);if(!i.length)return!1;let s=this._buildMapping(i,e,t,n,a);if(s.size===0)return!1;this._snapshot={fromType:e,toType:t,mapping:s,oldLayout:{translateX:this.w.layout.translateX||0,translateY:this.w.layout.translateY||0}};let c=Es(e),l=Es(t),u=this._canProbePaths();if(l===`unit`&&(c===`bar`||c===`summary`||c===`radial`&&u)){let e=this._countUnitSeries(n);this._snapshot.pieceOut=e>0&&e<=ws}else if(c===`unit`&&(l===`bar`||l===`summary`||l===`radial`&&u)){let e=0;if(o.forEach(t=>{e+=t.length}),e>0&&e<=ws){this._snapshot.pieceIn=!0,this._snapshot.sourceDots=o;let e=[];l===`radial`?(Array.isArray(n)?n:[]).forEach((t,n)=>{e.push(`${n}:0`)}):(Array.isArray(n)?n:[]).forEach((t,n)=>{let r=t&&Array.isArray(t.data)?t.data:[];for(let t=0;t<r.length;t++)e.push(`${n}:${t}`)}),this._snapshot.keyOrder=e}}return this._needsGhost(e,t)&&!this._snapshot.pieceOut&&!this._snapshot.pieceIn&&this._captureGhost(),this.w.globals.previousPaths=[],!0}_needsGhost(e,t){return Es(e)===`unit`||Es(t)===`unit`}_captureGhost(){var e;let t=this.w.dom?.Paper,n=t&&t.node;if(!n||typeof n.cloneNode!=`function`)return;let r=n.cloneNode(!0);typeof r.querySelectorAll==`function`&&[`.apexcharts-xaxis`,`.apexcharts-yaxis`,`.apexcharts-grid`,`.apexcharts-gridlines-horizontal`,`.apexcharts-gridlines-vertical`,`.apexcharts-legend`,`.apexcharts-title-text`,`.apexcharts-subtitle-text`,`.apexcharts-annotations`,`.apexcharts-zoom-rect`,`.apexcharts-selection-rect`,`.apexcharts-xcrosshairs`,`.apexcharts-ycrosshairs`].forEach(e=>{r.querySelectorAll(e).forEach(e=>{e.parentNode&&e.parentNode.removeChild(e)})}),typeof r.querySelectorAll==`function`&&r.querySelectorAll(`[id]`).forEach(e=>{e.removeAttribute(`id`)}),(e=r.removeAttribute)==null||e.call(r,`id`),this._ghost=r}_mountGhost(){var e,t;let n=this._ghost;if(!n||!Z.isBrowser())return;let r=this.w.dom?.elWrap;if(!r||typeof r.appendChild!=`function`){this._ghost=null;return}let i=n.style;i&&(i.position=`absolute`,i.left=`0`,i.top=`0`,i.background=`transparent`,i.pointerEvents=`none`,i.opacity=`1`),(e=n.setAttribute)==null||e.call(n,`aria-hidden`,`true`),(t=n.setAttribute)==null||t.call(n,`class`,`apexcharts-morph-ghost`),r.appendChild(n);let a=this.getSpeed(),o=Math.max(120,Math.round(a*Cs));X.requestAnimationFrame(()=>{i&&(i.transition=`opacity ${o}ms ease-in`,i.opacity=`0`)}),setTimeout(()=>this._removeGhost(),o+60)}_removeGhost(){let e=this._ghost;this._ghost=null,e&&e.parentNode&&e.parentNode.removeChild(e)}_countUnitSeries(e){if(!Array.isArray(e))return 0;let t=0;for(let n of e){if(!n||typeof n!=`object`||!Array.isArray(n.data))return 0;t+=n.data.length}return t}usesPieceTakeover(){return!!(this._snapshot&&this._snapshot.pieceOut)}claimsTargetMark(e,t){return!!(this._snapshot&&this._snapshot.pieceIn&&this._snapshot.mapping.has(`${e}:${t}`))}_makePieceLayer(){let e=this.w.dom?.elGraphical,t=e&&e.node;if(!t||typeof t.appendChild!=`function`)return null;let n=X.createElementNS(`http://www.w3.org/2000/svg`,`g`);if(!n)return null;n.setAttribute(`class`,`apexcharts-morph-pieces`),n.setAttribute(`pointer-events`,`none`);let r=this.w.globals?.cuid;return r&&n.setAttribute(`clip-path`,`url(#gridRectBarMask${r})`),t.appendChild(n),this._pieceLayer=n,n}_revealPieceHidden(){let e=this.w.globals.dom?.baseEl;e&&typeof e.querySelectorAll==`function`&&e.querySelectorAll(`[data-piece-hidden]`).forEach(e=>{e.removeAttribute(`opacity`),e.removeAttribute(`data-piece-hidden`)})}_cancelPieces(){this._pieceCancel&&=(this._pieceCancel(),null);let e=this._pieceLayer;this._pieceLayer=null,e&&e.parentNode&&e.parentNode.removeChild(e),this._revealPieceHidden()}_canProbePaths(){if(!Z.isBrowser())return!1;let e=X.createElementNS(`http://www.w3.org/2000/svg`,`path`);return!!e&&typeof e.isPointInFill==`function`}_makeExtentProber(e,t,n){let r=n.ownerDocument.createElementNS(`http://www.w3.org/2000/svg`,`path`);r.setAttribute(`d`,e),r.setAttribute(`fill`,`#000`),r.setAttribute(`stroke`,`#000`),r.setAttribute(`stroke-width`,`3`),r.setAttribute(`visibility`,`hidden`),n.appendChild(r);let i=r.ownerSVGElement;if(typeof r.isPointInFill!=`function`||!i||typeof i.createSVGPoint!=`function`)return n.removeChild(r),null;let a=i.createSVGPoint(),o=(e,t)=>{a.x=e,a.y=t;let n=r;return n.isPointInFill(a)||typeof n.isPointInStroke==`function`&&n.isPointInStroke(a)};return{intervalsAt:(e,n,r)=>{let i=r?t.y:t.x,a=i+(r?t.height:t.width);if(!(a>i))return null;let s=(e,t)=>r?o(t,e):o(e,t),c=[e+(n-e)*.1,(e+n)/2,n-(n-e)*.1],l=(e,t,n)=>{let r=t,i=e;for(let e=0;e<6;e++){let e=(r+i)/2;s(e,n)?i=e:r=e}return(r+i)/2},u=(a-i)/48,d=Array(49).fill(null),f=!1;for(let e of c)for(let t=0;t<=48;t++)d[t]===null&&s(i+t*u,e)&&(d[t]=e,f=!0);if(!f)return null;let p=[],m=-1;for(let e=0;e<=49;e++){let t=e<=48&&d[e]!==null;if(t&&m<0&&(m=e),!t&&m>=0){let t=e-1,n=d[m],r=m===0?i:l(i+m*u,i+(m-1)*u,n),o=t===48?a:l(i+t*u,i+(t+1)*u,d[t]);o>r&&p.push([r,o]),m=-1}}return p.length?p:null},dispose:()=>{r.parentNode&&r.parentNode.removeChild(r)}}}_separatePieces(){let e=this._snapshot,t=this.w.globals.dom?.baseEl;if(!e||!t)return this._revealPieceHidden();let n=new Map,r=0;if(t.querySelectorAll(`.apexcharts-unit-area`).forEach(e=>{let t=parseInt(e.getAttribute(`i`)??``,10);if(isNaN(t))return;let i=e.getAttribute(`cx`),a,o,s=3;if(i!=null)a=parseFloat(i),o=parseFloat(e.getAttribute(`cy`)??``),s=parseFloat(e.getAttribute(`r`)??`3`)||3;else{let t=parseFloat(e.getAttribute(`width`)??`0`)||0,n=parseFloat(e.getAttribute(`height`)??`0`)||0;a=parseFloat(e.getAttribute(`x`)??``)+t/2,o=parseFloat(e.getAttribute(`y`)??``)+n/2,s=Math.max(t,n)/2||3}if(!isFinite(a)||!isFinite(o))return;let c=n.get(t);c||(c=[],n.set(t,c)),c.push({el:e,x:a,y:o,r:s,fill:e.getAttribute(`fill`)}),r++}),r===0||r>ws)return this._revealPieceHidden();let i=this._makePieceLayer();if(!i)return this._revealPieceHidden();let a=[],o=i.ownerDocument,s=Es(e.fromType),c=s===`summary`||s===`radial`;if(Array.from(n.keys()).sort((e,t)=>e-t).forEach(t=>{let r=n.get(t),s=this.getInitialBBoxFor(t),l=e.mapping.get(`${t}:0`);if(!s||!l){r.forEach(e=>{e.el.removeAttribute(`opacity`),e.el.removeAttribute(`data-piece-hidden`)});return}let u=l.fill&&l.fill.indexOf(`url(`)!==0?l.fill:this.w.globals.colors?.[t]||r[0].fill,d=null;if(c){let e=this.getInitialPathFor(t,0);e&&(d=this._makeExtentProber(e,s,i))}let f=d?ds(s,r.length,d.intervalsAt):us(s,r.length);d&&d.dispose();let p=ps(f,e=>[e.x+e.width/2,e.y+e.height/2]),m=ps(r,e=>[e.x,e.y]);for(let e=0;e<m.length;e++){let n=p[e],r=m[e],s=o.createElementNS(`http://www.w3.org/2000/svg`,`rect`);s.setAttribute(`data-i`,String(t)),s.setAttribute(`x`,String(n.x)),s.setAttribute(`y`,String(n.y)),s.setAttribute(`width`,String(n.width)),s.setAttribute(`height`,String(n.height)),s.setAttribute(`rx`,`0`),s.setAttribute(`fill`,String(u)),i.appendChild(s),a.push({el:s,from:{x:n.x,y:n.y,width:n.width,height:n.height,rx:0},to:{x:r.x-r.r,y:r.y-r.r,width:r.r*2,height:r.r*2,rx:r.r},fill:hs(u,r.fill),fillEnd:r.fill,delay:0,meta:{dotEl:r.el}})}}),!a.length)return this._cancelPieces();this._runPieces(a,e=>{let t=e.meta.dotEl;t.removeAttribute(`opacity`),t.removeAttribute(`data-piece-hidden`),e.el.parentNode&&e.el.parentNode.removeChild(e.el)})}_combinePieces(){let e=this._snapshot,t=this.w.globals.dom?.baseEl;if(!e||!e.sourceDots||!e.keyOrder||!t)return this._revealPieceHidden();let n=this._collectTargetMarks(e.toType);if(!n.size)return this._revealPieceHidden();let r=e.oldLayout.translateX-(this.w.layout.translateX||0),i=e.oldLayout.translateY-(this.w.layout.translateY||0),a=Array.from(e.sourceDots.keys()).sort((e,t)=>e-t),o=this._makePieceLayer();if(!o)return this._revealPieceHidden();let s=o.ownerDocument,c=[],l=Es(e.toType),u=l===`summary`||l===`radial`;for(let t=0;t<a.length;t++){let l=e.sourceDots.get(a[t]),d=e.keyOrder[t],f=d?n.get(d):null;if(!f||!l||!l.length){f&&f.els.forEach(e=>{e.removeAttribute(`opacity`),e.removeAttribute(`data-piece-hidden`)});continue}let p=f.fill&&f.fill.indexOf(`url(`)!==0?f.fill:this.w.globals.colors?.[f.realIndex]||l[0].fill,m=null;if(u){let e=f.d||f.els.map(e=>e.getAttribute(`pathTo`)||e.getAttribute(`d`)).filter(Boolean).join(` `);e&&(m=this._makeExtentProber(e,f.bbox,o))}let h=m?ds(f.bbox,l.length,m.intervalsAt):us(f.bbox,l.length);m&&m.dispose();let g=ps(h,e=>[e.x+e.width/2,e.y+e.height/2]),_=ps(l,e=>[e.x,e.y]),v={remaining:_.length,els:f.els,tiles:[]};for(let e=0;e<_.length;e++){let t=_[e],n=g[e],a=s.createElementNS(`http://www.w3.org/2000/svg`,`rect`),l=t.x+r-t.r,u=t.y+i-t.r;a.setAttribute(`data-key`,d),a.setAttribute(`x`,String(l)),a.setAttribute(`y`,String(u)),a.setAttribute(`width`,String(t.r*2)),a.setAttribute(`height`,String(t.r*2)),a.setAttribute(`rx`,String(t.r)),a.setAttribute(`fill`,String(t.fill||p)),o.appendChild(a),v.tiles.push(a),c.push({el:a,from:{x:l,y:u,width:t.r*2,height:t.r*2,rx:t.r},to:{x:n.x,y:n.y,width:n.width,height:n.height,rx:0},fill:hs(t.fill,p),fillEnd:String(p),delay:0,meta:{markState:v}})}}if(!c.length)return this._cancelPieces();this._runPieces(c,e=>{let t=e.meta.markState;t.remaining--,t.remaining===0&&(t.els.forEach(e=>{e.removeAttribute(`opacity`),e.removeAttribute(`data-piece-hidden`)}),t.tiles.forEach(e=>{e.parentNode&&e.parentNode.removeChild(e)}))})}_runPieces(e,t){let n=this.getSpeed(),r=Math.min(Ts,n*.35),i=Math.max(180,n-r);for(let t=0;t<e.length;t++)e[t].delay=e.length>1?t/(e.length-1)*r:0;this._pieceCancel=_s({pieces:e,duration:i,onPieceDone:t,onAllDone:()=>{this._pieceCancel=null,this._cancelPieces()}})}_collectTargetMarks(e){let t=this.w.globals.dom?.baseEl,n=new Map;if(!t)return n;let r=Es(e);if(r===`radial`)return t.querySelectorAll(`.apexcharts-pie-series .apexcharts-pie-area`).forEach((e,t)=>{let r=e.getAttribute(`data:pathFinal`)||e.getAttribute(`d`);if(!r||!r.trim())return;let i=this._pathBBox(r);i&&n.set(`${t}:0`,{realIndex:t,j:0,d:r,bbox:{x:i.minX,y:i.minY,width:i.maxX-i.minX,height:i.maxY-i.minY},fill:e.getAttribute(`fill`),els:[e]})}),n;let i=r===`summary`?`.apexcharts-${e}-series`:`.apexcharts-bar-series`;return t.querySelectorAll(`${i} .apexcharts-series`).forEach(e=>{let t=parseInt(e.getAttribute(`data:realIndex`)??`0`,10)||0,r=0;e.querySelectorAll(`path[pathTo]`).forEach(e=>{let i=e.getAttribute(`pathTo`)||e.getAttribute(`d`);if(!i||!i.trim())return;let a=parseInt(e.getAttribute(`j`)??``,10),o=isNaN(a)?r++:a,s=this._pathBBox(i);if(!s)return;let c=`${t}:${o}`,l=n.get(c);l?(l.els.push(e),l.bbox={x:Math.min(l.bbox.x,s.minX),y:Math.min(l.bbox.y,s.minY),width:Math.max(l.bbox.x+l.bbox.width,s.maxX)-Math.min(l.bbox.x,s.minX),height:Math.max(l.bbox.y+l.bbox.height,s.maxY)-Math.min(l.bbox.y,s.minY)}):n.set(c,{realIndex:t,j:o,bbox:{x:s.minX,y:s.minY,width:s.maxX-s.minX,height:s.maxY-s.minY},fill:e.getAttribute(`fill`),els:[e]})})}),n}_captureFromDOM(e){let t=this.w.globals.dom?.baseEl;if(!t)return{marks:[],branches:[],unitDots:new Map};let n=[],r=[],i=new Map,a=Es(e);if(a===`bar`)t.querySelectorAll(`.apexcharts-bar-series .apexcharts-series`).forEach(e=>{let t=parseInt(e.getAttribute(`data:realIndex`)??`0`,10);e.querySelectorAll(`path[pathTo]`).forEach((e,r)=>{let i=e.getAttribute(`pathTo`)||e.getAttribute(`d`);i&&n.push({realIndex:t,j:r,d:i,fill:e.getAttribute(`fill`)})})});else if(a===`summary`){let r=new Map;t.querySelectorAll(`.apexcharts-${e}-area`).forEach(e=>{let t=parseInt(e.getAttribute(`j`)??``,10);if(isNaN(t))return;let n=e.getAttribute(`pathTo`)||e.getAttribute(`d`);if(!n||!n.trim())return;let i=typeof e.closest==`function`?e.closest(`.apexcharts-series`):null,a=parseInt(i?.getAttribute(`data:realIndex`)??`0`,10)||0,o=`${a}:${t}`,s=r.get(o);s?s.d+=` ${n}`:r.set(o,{realIndex:a,j:t,d:n,fill:e.getAttribute(`fill`)})}),Array.from(r.values()).sort((e,t)=>e.realIndex-t.realIndex||e.j-t.j).forEach(e=>n.push(e))}else if(a===`partition`){if(e===`treemap`){let e=e=>{let t=parseFloat(e.getAttribute(`x`)??``),n=parseFloat(e.getAttribute(`y`)??``),r=parseFloat(e.getAttribute(`width`)??``),i=parseFloat(e.getAttribute(`height`)??``);return[t,n,r,i].every(e=>isFinite(e))?`M ${t} ${n} L ${t+r} ${n} L ${t+r} ${n+i} L ${t} ${n+i} Z`:null};t.querySelectorAll(`.apexcharts-treemap-rect`).forEach(t=>{let r=e(t);r&&n.push({realIndex:parseInt(t.getAttribute(`i`)??`0`,10)||0,j:parseInt(t.getAttribute(`j`)??`0`,10)||0,d:r,fill:t.getAttribute(`fill`),key:t.getAttribute(`data:key`)||null})}),t.querySelectorAll(`.apexcharts-treemap-parent-rect`).forEach(t=>{let n=e(t),i=t.getAttribute(`data:key`);n&&i&&r.push({key:i,d:n,fill:t.getAttribute(`fill`)})})}else{let e=t.querySelectorAll(`.apexcharts-sunburst-arc`),i=[];e.forEach(e=>{e.getAttribute(`data:leaf`)===`true`&&i.push(e)}),(i.length?i:Array.from(e)).forEach((e,t)=>{let r=e.getAttribute(`d`);r&&r.trim()&&n.push({realIndex:t,j:0,d:r,fill:e.getAttribute(`fill`),key:e.getAttribute(`data:key`)||null})}),e.forEach(e=>{if(e.getAttribute(`data:leaf`)===`true`)return;let t=e.getAttribute(`d`),n=e.getAttribute(`data:key`);t&&t.trim()&&n&&r.push({key:n,d:t,fill:e.getAttribute(`fill`)})})}}else if(a===`unit`){let e=t.querySelectorAll(`.apexcharts-unit-area`),r=new Map;e.forEach(e=>{let t=parseInt(e.getAttribute(`i`)??``,10);if(isNaN(t))return;let n=e.getAttribute(`cx`),a,o,s=3;if(n!=null)a=parseFloat(n),o=parseFloat(e.getAttribute(`cy`)??``),s=parseFloat(e.getAttribute(`r`)??`3`)||3;else{let t=parseFloat(e.getAttribute(`width`)??`0`)||0,n=parseFloat(e.getAttribute(`height`)??`0`)||0;a=parseFloat(e.getAttribute(`x`)??``)+t/2,o=parseFloat(e.getAttribute(`y`)??``)+n/2,s=Math.max(t,n)/2||3}if(!isFinite(a)||!isFinite(o))return;let c=i.get(t);c||(c=[],i.set(t,c)),c.push({x:a,y:o,r:s,fill:e.getAttribute(`fill`)});let l=r.get(t);if(!l){r.set(t,{minX:a,minY:o,maxX:a,maxY:o,fill:e.getAttribute(`fill`)});return}a<l.minX&&(l.minX=a),a>l.maxX&&(l.maxX=a),o<l.minY&&(l.minY=o),o>l.maxY&&(l.maxY=o)}),Array.from(r.keys()).sort((e,t)=>e-t).forEach(e=>{let t=r.get(e),i=t.minX-2,a=t.minY-2,o=t.maxX+2,s=t.maxY+2;n.push({realIndex:e,j:0,d:`M ${i} ${a} L ${o} ${a} L ${o} ${s} L ${i} ${s} Z`,fill:t.fill})})}else if(a===`radial`){if(e===`radialBar`||e===`gauge`){let e=this.w.layout.gridWidth/2,r=Math.min(this.w.layout.gridWidth,this.w.layout.gridHeight)/2;t.querySelectorAll(`.apexcharts-radial-series .apexcharts-radialbar-area`).forEach(t=>{let i=t.parentElement,a=parseInt(i?.getAttribute(`data:realIndex`)??`0`,10),o=t.getAttribute(`d`);if(!o)return;let s=parseFloat(t.getAttribute(`stroke-width`)||`0`),c=s>1&&this._radialArcToFilledSegment(o,s,e,r)||o;n.push({realIndex:a,j:0,d:c,fill:t.getAttribute(`stroke`)})})}else t.querySelectorAll(`.apexcharts-pie-series .apexcharts-pie-area`).forEach((e,t)=>{let r=e.getAttribute(`d`);r&&n.push({realIndex:t,j:0,d:r,fill:e.getAttribute(`fill`)})})}return{marks:n,branches:r,unitDots:i}}_radialArcToFilledSegment(e,t,n,r){let i=e.match(/M\s*(-?[\d.]+)\s+(-?[\d.]+)\s+A\s*(-?[\d.]+)\s+(?:-?[\d.]+)\s+(?:-?[\d.]+)\s+(\d)\s+(\d)\s+(-?[\d.]+)\s+(-?[\d.]+)/);if(!i)return null;let a=parseFloat(i[1]),o=parseFloat(i[2]),s=parseFloat(i[3]),c=parseInt(i[4],10),l=parseInt(i[5],10),u=parseFloat(i[6]),d=parseFloat(i[7]);if(!isFinite(s)||s<=0)return null;let f=t/2,p=s+f,m=Math.max(0,s-f),h=(e,t,i)=>{let a=e-n,o=t-r,s=Math.sqrt(a*a+o*o);if(s===0)return{x:n,y:r};let c=i/s;return{x:n+a*c,y:r+o*c}},g=h(a,o,p),_=h(u,d,p),v=h(a,o,m),y=h(u,d,m),b=+!l;return`M ${g.x} ${g.y} A ${p} ${p} 0 ${c} ${l} ${_.x} ${_.y} L ${y.x} ${y.y} A ${m} ${m} 0 ${c} ${b} ${v.x} ${v.y} Z`}buildRingSegmentPath(e,t,n,r,i,a){let o=r/2,s=n+o,c=Math.max(0,n-o),l=(i-90)*Math.PI/180,u=(a-90)*Math.PI/180,d={x:e+s*Math.cos(l),y:t+s*Math.sin(l)},f={x:e+s*Math.cos(u),y:t+s*Math.sin(u)},p={x:e+c*Math.cos(l),y:t+c*Math.sin(l)},m={x:e+c*Math.cos(u),y:t+c*Math.sin(u)},h=+(a>i),g=+(Math.abs(a-i)>180);return`M ${d.x} ${d.y} A ${s} ${s} 0 ${g} ${h} ${f.x} ${f.y} L ${m.x} ${m.y} A ${c} ${c} 0 ${g} ${1-h} ${p.x} ${p.y} Z`}getFromType(){return this._snapshot?this._snapshot.fromType:null}_buildMapping(e,t,n,r,i){let a=new Map,o=Es(n),s=e.slice().sort((e,t)=>e.realIndex-t.realIndex||e.j-t.j);if(o===`partition`&&i&&i.length){let e=s.filter(e=>e.key);e.length===s.length&&(e.forEach(e=>{a.set(`key:${e.key}`,{d:e.d,fill:e.fill})}),i.forEach(e=>{a.set(`key:${e.key}`,{d:e.d,fill:e.fill})}))}if(o===`radial`||o===`unit`||o===`partition`)return s.forEach((e,t)=>{a.set(`${t}:0`,{d:e.d,fill:e.fill})}),a;if(o===`bar`||o===`summary`){let e=[];return(Array.isArray(r)?r:[]).forEach((t,n)=>{let r=t&&Array.isArray(t.data)?t.data:[];for(let t=0;t<r.length;t++)e.push({realIndex:n,j:t})}),s.forEach((t,n)=>{let r=e[n];r&&a.set(`${r.realIndex}:${r.j}`,{d:t.d,fill:t.fill})}),a}return a}isActive(){return this._snapshot!==null}getInitialPathFor(e,t){if(!this._snapshot)return null;let n=this._snapshot.mapping.get(`${e}:${t}`);if(!n)return null;let r=this._snapshot.oldLayout.translateX-(this.w.layout.translateX||0),i=this._snapshot.oldLayout.translateY-(this.w.layout.translateY||0);return r===0&&i===0?n.d:this._translatePathD(n.d,r,i)}_translatePathD(e,t,n){return t===0&&n===0?e:Ja(e).map(e=>{let r=e[0];return r===`Z`?`Z`:r===`M`||r===`L`||r===`T`?`${r} ${e[1]+t} ${e[2]+n}`:r===`H`?`${r} ${e[1]+t}`:r===`V`?`${r} ${e[1]+n}`:r===`C`?`${r} ${e[1]+t} ${e[2]+n} ${e[3]+t} ${e[4]+n} ${e[5]+t} ${e[6]+n}`:r===`S`||r===`Q`?`${r} ${e[1]+t} ${e[2]+n} ${e[3]+t} ${e[4]+n}`:r===`A`?`${r} ${e[1]} ${e[2]} ${e[3]} ${e[4]} ${e[5]} ${e[6]+t} ${e[7]+n}`:e.join(` `)}).join(` `)}getInitialCenterFor(e){let t=this.getInitialBBoxFor(e);return t?{x:t.x+t.width/2,y:t.y+t.height/2}:null}getInitialPathAt(e){return this.getInitialPathFor(e,0)}getInitialPathForKey(e){return!this._snapshot||!e?null:this.getInitialPathFor(`key`,e)}hasKeyedMarks(){if(!this._snapshot)return!1;for(let e of this._snapshot.mapping.keys())if(typeof e==`string`&&e.startsWith(`key:`))return!0;return!1}getInitialSlotFor(e,t,n){let r=this.getInitialBBoxFor(e);if(!r)return null;let i=r.x+r.width/2,a=r.y+r.height/2;if(!(n>1)||!(t>=0))return{x:i,y:a};let o=(Math.min(t,n-1)+.5)/n;return r.height>=r.width?{x:i,y:r.y+r.height*(1-o)}:{x:r.x+r.width*o,y:a}}getInitialBBoxFor(e){if(!this._snapshot)return null;let t=this._snapshot.mapping.get(`${e}:0`);if(!t)return null;let n=this._pathBBox(t.d);if(!n)return null;let r=this._snapshot.oldLayout.translateX-(this.w.layout.translateX||0),i=this._snapshot.oldLayout.translateY-(this.w.layout.translateY||0);return{x:n.minX+r,y:n.minY+i,width:n.maxX-n.minX,height:n.maxY-n.minY}}_pathBBox(e){let t=Ja(e),n=1/0,r=1/0,i=-1/0,a=-1/0,o=!1;return t.forEach(e=>{let t=e[0];if(t===`Z`)return;let s=[];if(t===`H`)s=[[e[1],(r+a)/2||e[1]]];else if(t===`V`)s=[[(n+i)/2||e[1],e[1]]];else if(t===`A`)s=[[e[6],e[7]]];else for(let t=1;t+1<e.length;t+=2)s.push([e[t],e[t+1]]);s.forEach(([e,t])=>{isFinite(e)&&isFinite(t)&&(o=!0,e<n&&(n=e),e>i&&(i=e),t<r&&(r=t),t>a&&(a=t))})}),o?{minX:n,minY:r,maxX:i,maxY:a}:null}getInitialFillFor(e,t){if(!this._snapshot)return null;let n=this._snapshot.mapping.get(`${e}:${t}`);return n?n.fill:null}getSpeed(){let e=this.w.config.chart.animations;return e.chartTypeMorph&&e.chartTypeMorph.speed||e.speed||600}applyChromeFade(){if(!this._snapshot||!Z.isBrowser())return;let e=this.w.globals.dom?.baseEl;if(!e)return;this._snapshot.pieceOut?this._separatePieces():this._snapshot.pieceIn?this._combinePieces():this._mountGhost();let t=this.getSpeed();[`.apexcharts-xaxis`,`.apexcharts-yaxis`,`.apexcharts-grid`,`.apexcharts-gridlines-horizontal`,`.apexcharts-gridlines-vertical`,`.apexcharts-legend`,`.apexcharts-title-text`,`.apexcharts-subtitle-text`].forEach(n=>{e.querySelectorAll(n).forEach(e=>{e.style&&(e.style.opacity=`0`,e.style.transition=`opacity ${t}ms ease-out`,X.requestAnimationFrame(()=>{e.style.opacity=`1`}),setTimeout(()=>{e.style.transition=``,e.style.opacity=``},t+80))})}),setTimeout(()=>this.cleanup(),t+100)}cleanup(){this._snapshot=null,this._removeGhost(),this._cancelPieces()}};G.registerFeatures({morphTypeChange:Ds});var Os=`http://www.w3.org/1999/xhtml`,ks=18;function As(e,t){return K(K({show:!0,position:`top-left`,separator:` / `,rootLabel:`All`,offsetX:0,offsetY:0,formatter:void 0},e.config.drilldown&&e.config.drilldown.breadcrumb||{}),t||{})}function js(e,t){let n=[`.apexcharts-title-text`,`.apexcharts-subtitle-text`].map(t=>e.dom.baseEl.querySelector(t)).filter(e=>e!==null);if(!n.length)return;let r=e.dom.elWrap.getBoundingClientRect().top;for(let e=0;e<n.length+1;e++){let e=t.getBoundingClientRect(),i=n.find(t=>{let n=t.getBoundingClientRect();return e.left<n.right&&e.right>n.left&&e.top<n.bottom&&e.bottom>n.top});if(!i)break;t.style.top=`${i.getBoundingClientRect().bottom-r+4}px`}}function Ms(e,t){let n=e.layout.translateY||0,r=e.dom.elWrap;if(!r)return n;let i=e.dom.baseEl.querySelectorAll(`.apexcharts-yaxis-label`);if(!i.length)return n;let a=r.getBoundingClientRect().top,o=t.getBoundingClientRect(),s=n;for(let e=0;e<i.length;e++){let t=i[e].getBoundingClientRect();t.height&&(t.left>=o.right||t.right<=o.left||(s=Math.min(s,t.top-a)))}return s}function Ns(e,t,n,r){let i=t?.dimensions?.dimHelpers,a=i?i.getTitleSubtitleCoords(`title`).height+i.getTitleSubtitleCoords(`subtitle`).height:0,o=n.getBoundingClientRect().height||ks,s=r&&r.offsetY||0,c=Ms(e,n);if(c-a>=o+1)return n.style.top=`${c-o-1+s}px`,!0;n.style.top=`${a+s}px`;let l=e.config.theme.mode===`dark`;return n.style.background=l?`rgba(20,24,30,0.82)`:`rgba(255,255,255,0.86)`,n.style.borderRadius=`4px`,!1}function Ps(e){let t=e.dom.elWrap;if(!t)return;let n=t.querySelector(`.apexcharts-breadcrumb`);n&&n.parentNode&&n.parentNode.removeChild(n)}function Fs(e,t){if(!Z.isBrowser())return null;let n=e.dom.elWrap;if(!n)return null;Ps(e);let r=t.config||As(e);if(r.show===!1)return null;let i=t.crumbs||[];if(i.length<2)return null;let a=X.createElementNS(Os,`nav`);a.setAttribute(`class`,`apexcharts-breadcrumb`),a.setAttribute(`aria-label`,t.ariaLabel||`Breadcrumb`),Is(a,r),t.compact&&(a.style.fontSize=`11px`,a.style.padding=`0 2px`);let o=r.separator==null?` / `:r.separator;return i.forEach((e,n)=>{if(n>0){let e=X.createElementNS(Os,`span`);e.setAttribute(`class`,`apexcharts-breadcrumb-separator`),e.setAttribute(`aria-hidden`,`true`),e.textContent=o,a.appendChild(e)}let s=n===0?r.rootLabel??`All`:e.label;if(typeof r.formatter==`function`&&(s=r.formatter(s,{index:n,depth:i.length-1,data:e.data})),n===i.length-1){let e=X.createElementNS(Os,`span`);e.setAttribute(`class`,`apexcharts-breadcrumb-item apexcharts-breadcrumb-current`),e.setAttribute(`aria-current`,`page`),e.textContent=String(s),a.appendChild(e);return}let c=X.createElementNS(Os,`button`);if(c.setAttribute(`type`,`button`),c.setAttribute(`class`,`apexcharts-breadcrumb-item`),n===0){let e=X.createElementNS(Os,`span`);e.setAttribute(`class`,`apexcharts-breadcrumb-arrow`),e.setAttribute(`aria-hidden`,`true`),e.textContent=`←`,c.appendChild(e)}let l=X.createElementNS(Os,`span`);l.setAttribute(`class`,`apexcharts-breadcrumb-label`),l.textContent=String(s),c.appendChild(l),c.addEventListener(`click`,()=>t.onNavigate(n,e)),a.appendChild(c)}),n.appendChild(a),a}function Is(e,t){let n=t.offsetX||0,r=t.offsetY||0;e.style.position=`absolute`,e.style.top=r+`px`,t.position===`top-right`?e.style.right=-n+3+`px`:e.style.left=n+`px`}var Ls=`http://www.w3.org/1999/xhtml`,Rs=class{constructor(e,t,n){this.w=e,this.ctx=t,this.drilldown=n}render(e){if(!Z.isBrowser())return;let t=this.w,n=t.dom.elWrap;if(!n)return;let r=n.querySelector(`.apexcharts-breadcrumb`);r&&r.parentNode&&r.parentNode.removeChild(r);let i=t.config.drilldown&&t.config.drilldown.breadcrumb;if(!i||i.show===!1||this.drilldown.depth===0)return;let a=X.createElementNS(Ls,`nav`);a.setAttribute(`class`,`apexcharts-breadcrumb`),a.setAttribute(`aria-label`,`Drilldown breadcrumb`),this._position(a,i);let o=i.separator==null?` / `:i.separator;e.forEach((t,n)=>{if(n>0){let e=X.createElementNS(Ls,`span`);e.setAttribute(`class`,`apexcharts-breadcrumb-separator`),e.setAttribute(`aria-hidden`,`true`),e.textContent=o,a.appendChild(e)}let r=this._label(t,n);if(n===e.length-1){let e=X.createElementNS(Ls,`span`);e.setAttribute(`class`,`apexcharts-breadcrumb-item apexcharts-breadcrumb-current`),e.setAttribute(`aria-current`,`page`),e.textContent=r,a.appendChild(e)}else{let e=X.createElementNS(Ls,`button`);if(e.setAttribute(`type`,`button`),e.setAttribute(`class`,`apexcharts-breadcrumb-item`),n===0){let t=X.createElementNS(Ls,`span`);t.setAttribute(`class`,`apexcharts-breadcrumb-arrow`),t.setAttribute(`aria-hidden`,`true`),t.textContent=`←`,e.appendChild(t)}let t=X.createElementNS(Ls,`span`);t.setAttribute(`class`,`apexcharts-breadcrumb-label`),t.textContent=r,e.appendChild(t),e.addEventListener(`click`,()=>this.drilldown.drillToLevel(n)),a.appendChild(e)}}),n.appendChild(a),this.w.globals.axisCharts&&Ns(this.w,this.ctx,a,i),this._avoidChromeOverlap(a)}_avoidChromeOverlap(e){let t=this.w,n=[`.apexcharts-title-text`,`.apexcharts-subtitle-text`].map(e=>t.dom.baseEl.querySelector(e)).filter(e=>e!==null);if(!n.length)return;let r=t.dom.elWrap.getBoundingClientRect().top;for(let t=0;t<n.length+1;t++){let t=e.getBoundingClientRect(),i=n.find(e=>{let n=e.getBoundingClientRect();return t.left<n.right&&t.right>n.left&&t.top<n.bottom&&t.bottom>n.top});if(!i)break;e.style.top=`${i.getBoundingClientRect().bottom-r+4}px`}}_label(e,t){let n=this.w.config.drilldown.breadcrumb,r;if(t===0)r=n.rootLabel==null?`All`:n.rootLabel;else{let t=(this.w.config.drilldown.series||[]).find(t=>t&&t.id===e);r=t&&t.name||String(e)}return typeof n.formatter==`function`?n.formatter(r,{index:t,depth:this.drilldown.depth}):r}_position(e,t){let n=t.offsetX||0,r=t.offsetY||0;e.style.position=`absolute`,e.style.top=r+`px`,t.position===`top-right`?e.style.right=-n+3+`px`:e.style.left=n+`px`}},zs=`http://www.w3.org/1999/xhtml`,Bs=`apexcharts-drilldown-loading`,Vs=class{constructor(e){this.w=e,this.el=null}_cfg(){let e=this.w.config.drilldown,t=e&&e.loading;return t===!1?{show:!1}:t||{}}show(){if(!Z.isBrowser())return;let e=this._cfg();if(e.show===!1)return;let t=this.w.dom.elWrap;if(!t)return;this.hide();let n=X.createElementNS(zs,`div`);n.setAttribute(`class`,Bs),n.setAttribute(`role`,`status`),n.setAttribute(`aria-live`,`polite`),n.setAttribute(`aria-label`,e.text||`Loading`);let r=X.createElementNS(zs,`div`);if(r.setAttribute(`class`,`${Bs}-spinner`),r.setAttribute(`aria-hidden`,`true`),n.appendChild(r),e.text){let t=X.createElementNS(zs,`span`);t.setAttribute(`class`,`${Bs}-text`),t.textContent=e.text,n.appendChild(t)}t.appendChild(n),this.el=n}hide(){let e=this.w.dom.elWrap;if(e){let t=e.querySelectorAll(`.${Bs}`);for(let e=0;e<t.length;e++){let n=t[e];n.parentNode&&n.parentNode.removeChild(n)}}else this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el);this.el=null}},Hs=32,Us=`__apexDrilldownMarker`,Ws=class{constructor(e,t){this.w=e,this.ctx=t,this.stack=[],this.rootSnapshot=null,this._wired=!1,this._asyncCache=new Map,this._pending=null,this._warnedUnreachable=!1,this._warnedNoSliceOffset=!1,this.breadcrumb=new Rs(e,t,this),this.loading=new Vs(e),this._onPointSelect=this._onPointSelect.bind(this),this._afterRender=this._afterRender.bind(this),this._onPlotDown=this._onPlotDown.bind(this),this._onPlotClick=this._onPlotClick.bind(this),this._downAt=null,this._plotClickWired=null,this.init()}init(){let e=this.w;e.config.drilldown&&e.config.drilldown.enabled&&(this._wired||(this._wired=!0,this.ctx.addEventListener(`dataPointSelection`,this._onPointSelect),this.ctx.addEventListener(`mounted`,this._afterRender),this.ctx.addEventListener(`updated`,this._afterRender),e.config.markers&&(e.config.markers.discrete=this._drillMarkers(e.config.series))))}get path(){return[`root`,...this.stack.map(e=>e.id)]}get depth(){return this.stack.length}drillDown(e,t,n){let r=this._resolveChild(e);return r?this._drillInto(r,t,n):typeof this.w.config.drilldown.onDrillDown==`function`?this._drillDownAsync(e,t,n):(console.warn(`ApexCharts: drilldown id "${e}" not found in chart.drilldown.series, and no onDrillDown resolver is set.`),Promise.resolve(this.ctx))}drillUp(){return this.drillToLevel(this.stack.length-1)}drillToRoot(){return this.drillToLevel(0)}drillToLevel(e){let t=this.stack.length;if(e<0||e>=t)return Promise.resolve(this.ctx);let n=this.path[this.path.length-1],r=e===0?this.rootSnapshot:this.stack[e].restore;this.stack=this.stack.slice(0,e);let i=this.path[this.path.length-1];return this._apply(this._viewFromSnapshot(r),`up`,{from:n,to:i})}_resolveChild(e){let t=this.w.config.drilldown&&this.w.config.drilldown.series;return Array.isArray(t)&&t.find(t=>t&&t.id===e)||null}_drillInto(e,t,n){if(this.stack.length>=Hs)return console.warn(`ApexCharts: drilldown max depth (${Hs}) reached.`),Promise.resolve(this.ctx);this.rootSnapshot||=this._snapshot();let r=this.path[this.path.length-1];return this.stack.push({id:e.id,name:e.name,restore:this._snapshot()}),this._apply(this._viewFromChild(e),`down`,{from:r,to:e.id,point:t,seriesIndex:n&&n.seriesIndex,dataPointIndex:n&&n.dataPointIndex})}_drillDownAsync(e,t,n){let r=this.w.config.drilldown.onDrillDown,i=this._cacheGet(e);if(i)return this._drillInto(i,t,n);if(this._pending)return this._pending;let a;this.loading.show();try{a=r({id:e,point:t,seriesIndex:n&&n.seriesIndex,dataPointIndex:n&&n.dataPointIndex})}catch(t){return this.loading.hide(),this._fire(`drillDownError`,{id:e,error:t}),Promise.resolve(this.ctx)}let o=()=>{this._pending=null,this.loading.hide()},s=Promise.resolve(a).then(r=>{if(o(),this._isDead())return this.ctx;if(!r||!r.data)return this._fire(`drillDownError`,{id:e,error:Error(`drilldown: onDrillDown resolved without a drillable level for id "${e}" (expected an object with a \`data\` array).`)}),this.ctx;let i=r.id==null?q(K({},r),{id:e}):r;return this._cacheSet(e,i),this._drillInto(i,t,n)},t=>(o(),this._isDead()||this._fire(`drillDownError`,{id:e,error:t}),this.ctx));return this._pending=s,s}_isDead(){let e=this.w;return!e||!e.globals||e.globals.isDestroyed===!0}_cacheEnabled(){let e=this.w.config.drilldown;return!!(e&&e.cache!==!1)}_cacheGet(e){return!this._cacheEnabled()||e==null?null:this._asyncCache.get(e)||null}_cacheSet(e,t){this._cacheEnabled()&&e!=null&&this._asyncCache.set(e,t)}clearCache(e){return e==null?this._asyncCache.clear():this._asyncCache.delete(e),this.ctx}_snapshot(){let e=this.w.config,t=this._overrideFields(),n={series:this._uncollapseSeries(Q.clone(e.series))};return Array.isArray(e.labels)&&e.labels.length&&(n.labels=Q.clone(e.labels)),n.chart={type:e.chart.type,stacked:e.chart.stacked},t.has(`xaxis`)&&(n.xaxis=Q.clone(e.xaxis)),t.has(`yaxis`)&&(n.yaxis=Q.clone(e.yaxis)),t.has(`colors`)&&(n.colors=e.colors?Q.clone(e.colors):void 0),t.has(`plotOptions`)&&(n.plotOptions=Q.clone(e.plotOptions)),t.has(`fill`)&&(n.fill=Q.clone(e.fill)),t.has(`legend`)&&(n.legend=Q.clone(e.legend)),n}_uncollapseSeries(e){let t=this.w,n=t.globals,r=[...n.collapsedSeries||[],...n.ancillaryCollapsedSeries||[]];if(!r.length)return e;let i=t.config.chart.type,a=(i===`pie`||i===`donut`||i===`polarArea`)&&e.length===1&&e[0]&&typeof e[0]==`object`&&Array.isArray(e[0].data)?e[0].data:e;for(let t of r){let r=t.index;n.axisCharts?e[r]&&(e[r].data=Array.isArray(t.data)?t.data.slice():t.data):a[r]&&typeof a[r]==`object`?a[r].y=t.data:a[r]!==void 0&&(a[r]=t.data)}return e}_overrideFields(){let e=new Set,t=this.w.config.drilldown&&this.w.config.drilldown.series||[];for(let n of t)n&&(n.xaxis&&e.add(`xaxis`),n.yaxis&&e.add(`yaxis`),n.colors&&e.add(`colors`),n.plotOptions&&e.add(`plotOptions`),n.fill&&e.add(`fill`),n.legend&&e.add(`legend`));return e}_copyOptionalViewFields(e,t){t.xaxis&&(e.xaxis=t.xaxis),t.yaxis&&(e.yaxis=t.yaxis),t.colors&&(e.colors=t.colors),t.plotOptions&&(e.plotOptions=t.plotOptions),t.fill&&(e.fill=t.fill),t.legend&&(e.legend=t.legend)}_viewFromChild(e){let t={};t.series=Array.isArray(e.series)?e.series:[{name:e.name||``,data:e.data}];let n={};return e.chart&&e.chart.type&&(n.type=e.chart.type),e.chart&&e.chart.stacked!=null&&(n.stacked=e.chart.stacked),Object.keys(n).length&&(t.chart=n),this._copyOptionalViewFields(t,e),t}_viewFromSnapshot(e){let t={series:e.series,chart:e.chart};return e.labels&&e.labels.length&&(t.labels=e.labels),this._copyOptionalViewFields(t,e),t}_apply(e,t,n){let r=this.w;r.interact.selectedDataPoints=[],r.globals.collapsedSeries=[],r.globals.collapsedSeriesIndices=[],r.globals.ancillaryCollapsedSeries=[],r.globals.ancillaryCollapsedSeriesIndices=[],r.globals.allSeriesCollapsed=!1,r.globals.risingSeries=[],e.markers=q(K({},e.markers||{}),{discrete:this._drillMarkers(e.series)});let i=(!r.config.drilldown.animation||r.config.drilldown.animation.enabled!==!1)&&r.config.chart.animations.enabled!==!1;t===`down`&&this._fire(`drillDownStart`,n);let a=t=>this.ctx.updateOptions(e,!1,t,!1,!1),o=()=>(this._fire(t===`down`?`drillDownEnd`:`drillUp`,n),this.ctx);if(i&&this._zoomEnabled()){let e=this._triggerOrigin(n);if(e)return this._zoomDrill(e,t,()=>a(!1)).then(o)}return a(i).then(o)}_zoomEnabled(){let e=this.w.config.drilldown&&this.w.config.drilldown.animation;return!!(e&&e.zoomFromPoint)}_svgNode(){let e=this.w.dom&&this.w.dom.Paper;return e&&e.node?e.node:null}_markGroup(){let e=this._svgNode();return!e||typeof e.querySelector!=`function`?null:e.querySelector(`.apexcharts-plot-series, .apexcharts-heatmap, .apexcharts-treemap`)}_triggerOrigin(e){if(!Z.isBrowser())return null;let t=this._svgNode(),n=this._markGroup();if(!t||!n||typeof n.animate!=`function`||typeof t.getBoundingClientRect!=`function`)return null;let r=t.getBoundingClientRect(),i=null;if(e&&e.seriesIndex!=null&&e.dataPointIndex!=null&&this.w.dom.baseEl&&(i=this.w.dom.baseEl.querySelector(`[index="${e.seriesIndex}"][j="${e.dataPointIndex}"]`)),i&&typeof i.getBoundingClientRect==`function`){let e=i.getBoundingClientRect();return{x:e.left+e.width/2-r.left,y:e.top+e.height/2-r.top}}let a=n.getBoundingClientRect();return{x:a.left+a.width/2-r.left,y:a.top+a.height/2-r.top}}_zoomDrill(e,t,n){return qi(this,null,function*(){let r=this._zoomDuration(),i=t===`down`,a=Math.round(r*.55),o=i?`scale(1.03)`:`scale(0.97)`,s=i?`scaleX(0.55) scaleY(0.85)`:`scale(1.04)`,c=t=>{t.style.transformBox=`view-box`,t.style.transformOrigin=`${e.x}px ${e.y}px`},l=e=>{e.style.transform=``,e.style.opacity=``,e.style.transformOrigin=``,e.style.transformBox=``},u=this._markGroup(),d=null;if(u){c(u),d=u.animate([{transform:`scale(1)`,opacity:1},{transform:o,opacity:0}],{duration:a,easing:`ease-in`,fill:`forwards`});try{yield d.finished}catch{}}yield n();let f=this._markGroup();if(f){c(f),f.style.opacity=`0`,f.style.transform=s,d&&u===f&&d.cancel();let e=f.animate([{transform:s,opacity:0},{transform:`scale(1)`,opacity:1}],{duration:r,easing:`cubic-bezier(0.16, 1, 0.3, 1)`,fill:`forwards`});try{yield e.finished}catch{}l(f),e.cancel()}})}_zoomDuration(){let e=this.w.config.drilldown&&this.w.config.drilldown.animation,t=e&&typeof e.speed==`number`?e.speed:260;return Math.max(80,t)}_fire(e,t){let n=this.w.config.chart.events&&this.w.config.chart.events[e];typeof n==`function`&&n(t,this.ctx,this.w),this.ctx.events.fireEvent(e,[t,this.ctx,this.w])}_onPointSelect(e,t,n){if(!n)return;let r=this._pointAt(n.seriesIndex,n.dataPointIndex);if(r&&typeof r==`object`&&r.drilldown!=null)return this.drillDown(r.drilldown,r,n);if(typeof this.w.config.drilldown.onDrillDown==`function`)return this._drillDownAsync(null,r,n)}_pointAt(e,t){let n=this.w.config.series;if(!Array.isArray(n)||e==null||t==null)return null;let r=n[e];return!r||!Array.isArray(r.data)||r.data[t]==null?null:r.data[t]}_afterRender(){let e=this.w;e.config.drilldown&&e.config.drilldown.enabled&&(this._markDrillableTargets(),this._wirePlotClick(),this.breadcrumb.render(this.path),e.config.markers&&(e.config.markers.discrete=this._drillMarkers(e.config.series)))}_markDrillableTargets(){if(!Z.isBrowser())return;let e=this.w,t=e.dom.baseEl,n=e.config.series;if(!t||!Array.isArray(n))return;let r=0;n.forEach((e,n)=>{let i=e&&Array.isArray(e.data)?e.data:null;i&&i.forEach((e,i)=>{if(!e||typeof e!=`object`||e.drilldown==null)return;let a=t.querySelectorAll(`[index="${n}"][j="${i}"]`);a.length||r++,a.forEach(e=>{this._isClickThroughMark(e)&&e.classList.remove(`no-pointer-events`),e.classList.add(`apexcharts-drilldown-target`)})})}),r&&!this._warnedUnreachable&&(this._warnedUnreachable=!0,console.warn(`ApexCharts: ${r} drillable point(s) have no clickable mark, so clicking them cannot do anything. Leave \`drilldown.marker\` on, or give the series markers of its own (\`markers.size > 0\`).`))}warnSliceOffsetDisabled(){this._warnedNoSliceOffset||(this._warnedNoSliceOffset=!0,console.warn("ApexCharts: `plotOptions.pie.expandOnClick` is not available in a drilldown pie/donut, so it was ignored. A slice click navigates, and a slice that slid out would be discarded by the drill it just triggered."))}_wirePlotClick(){if(!Z.isBrowser())return;let e=this.w.dom.baseEl;e&&this._plotClickWired!==e&&(this._plotClickWired&&(this._plotClickWired.removeEventListener(`mousedown`,this._onPlotDown),this._plotClickWired.removeEventListener(`click`,this._onPlotClick)),e.addEventListener(`mousedown`,this._onPlotDown),e.addEventListener(`click`,this._onPlotClick),this._plotClickWired=e)}_onPlotDown(e){this._downAt={x:e.clientX,y:e.clientY}}_onPlotClick(e){let t=this.w;if(!t.config.drilldown||!t.config.drilldown.enabled)return;let n=this._downAt;if(this._downAt=null,n&&Math.hypot(e.clientX-n.x,e.clientY-n.y)>4)return;let r=e.target;if(!r||typeof r.closest!=`function`||r.closest(`.apexcharts-drilldown-target`)||r.closest(`.apexcharts-legend, .apexcharts-toolbar, .apexcharts-breadcrumb, .apexcharts-menu, .apexcharts-tooltip`))return;let i=t.interact.capturedSeriesIndex,a=t.interact.capturedDataPointIndex;if(i==null||a==null||i<0||a<0||!this._isPointBasedSeries(t.config.series[i]))return;let o=this._pointAt(i,a);if(o&&typeof o==`object`&&o.drilldown!=null)return this.drillDown(o.drilldown,o,{seriesIndex:i,dataPointIndex:a})}_isClickThroughMark(e){return!e.classList||!e.classList.contains(`no-pointer-events`)||!e.classList.contains(`apexcharts-marker`)?!1:!(typeof e.closest==`function`&&e.closest(`.apexcharts-tooltip`))}_drillMarkers(e){let t=this.w,n=t.config.drilldown,r=Array.isArray(t.config.markers&&t.config.markers.discrete)?t.config.markers.discrete.filter(e=>!e||!e[Us]):[],i=n&&n.marker||{};if(i.show===!1||!Array.isArray(e))return r;let a=[];return e.forEach((e,t)=>{if(!this._seriesNeedsDrillMarker(t,e))return;let n=e&&Array.isArray(e.data)?e.data:null;n&&n.forEach((e,n)=>{if(!e||typeof e!=`object`||e.drilldown==null)return;let r={seriesIndex:t,dataPointIndex:n,[Us]:!0};i.size!==void 0&&(r.size=i.size),i.shape!==void 0&&(r.shape=i.shape),i.fillColor!==void 0&&(r.fillColor=i.fillColor),i.strokeColor!==void 0&&(r.strokeColor=i.strokeColor),a.push(r)})}),r.concat(a)}_seriesNeedsDrillMarker(e,t){if(!this._isPointBasedSeries(t))return!1;let n=this.w.config.markers&&this.w.config.markers.size,r=Array.isArray(n)?n[e]:n;return!(Number(r)>0)}_isPointBasedSeries(e){let t=e&&e.type||this.w.config.chart.type;return t===`line`||t===`area`}};G.registerFeatures({drilldown:Ws});var Gs=`__apexcharts_plugins__`;function Ks(){let e=globalThis;return e[Gs]||(e[Gs]={}),e[Gs]}function qs(e){return Ks()[e]||null}var Js=1,Ys=[`updateOptions`,`updateSeries`,`appendData`,`appendSeries`,`toggleSeries`,`showSeries`,`hideSeries`,`highlightSeries`,`isSeriesHidden`,`zoomX`,`addXaxisAnnotation`,`addYaxisAnnotation`,`addPointAnnotation`,`clearAnnotations`,`removeAnnotation`,`dataURI`,`exportToCSV`];function Xs(e){let t={};return Ys.forEach(n=>{typeof e[n]==`function`&&(t[n]=e[n].bind(e))}),Object.freeze(t)}function Zs(e,t){let n=t=>(t&&e.add(t),t),r={get node(){return e.node},path(e={}){let{d:r=``,stroke:i=`#000`,width:a=1,fill:o=`none`,opacity:s=1,dash:c=0,className:l=``}=e;return n(t.drawPath({d:r,stroke:i,strokeWidth:a,fill:o,fillOpacity:o===`none`?0:s,strokeOpacity:s,strokeDashArray:c,classes:l}))},line(e={}){let{x1:r,y1:i,x2:a,y2:o,stroke:s=`#000`,width:c=1,dash:l=0}=e;return n(t.drawLine(r,i,a,o,s,l,c))},rect(e={}){let{x:r=0,y:i=0,w:a=0,h:o=0,r:s=0,fill:c=`#000`,stroke:l=null,opacity:u=1}=e;return n(t.drawRect(r,i,a,o,s,c,u,l==null?null:1,l))},circle(e={}){let{cx:r=0,cy:i=0,r:a=0,fill:o=`#000`,stroke:s=null}=e;return n(t.drawCircle(a,{cx:r,cy:i,fill:o,stroke:s||`none`}))},text(e={}){let{x:r=0,y:i=0,text:a=``,color:o,size:s,anchor:c=`start`,weight:l}=e;return n(t.drawText({x:r,y:i,text:a,textAnchor:c,fontSize:s,foreColor:o,fontWeight:l}))},clear(){let t=e.node;for(;t.firstChild;)t.removeChild(t.firstChild);return r}};return r}function Qs(e,t){let n=e.ctx,r=e.w,i={name:t.def.name,version:Js,get options(){return t.options},on(e,n){let r=t.handlers;return r.has(e)||r.set(e,[]),r.get(e).push(n),i},off(e,n){let r=t.handlers.get(e);if(r){let e=r.indexOf(n);e>-1&&r.splice(e,1)}return i},store:{},layer(n){return e._layer(t.def.name,n||{})},get scales(){return e._currentScales},get data(){return e._lastData||=e._dataSnapshot()},theme:Object.freeze({get mode(){return r.config.theme.mode},get foreColor(){return r.config.chart.foreColor},seriesColor(e){return r.globals.colors[e]},token(t){return e._token(t)}}),chart:Xs(n),emit(e,r){n.events.fireEvent(`plugin:${t.def.name}:${e}`,[n,r])},get el(){return r.dom.baseEl}};return Object.freeze(i)}var $s=class{constructor(e,t){this.w=e,this.ctx=t,this.active=[],this._layers=new Map,this._currentScales=null,this._lastPluginsRef=null,this._lastData=null,this._updatedWired=!1,this._onUpdated=this._onUpdated.bind(this),this._init()}_init(){(this.w.config.plugins||[]).map((e,t)=>({entry:e,order:e.order==null?t:e.order})).sort((e,t)=>e.order-t.order).forEach(e=>this._activate(e.entry)),this._lastPluginsRef=this.w.config.plugins,this._wireUpdated()}_wireUpdated(){this._updatedWired||=(this.ctx.addEventListener(`updated`,this._onUpdated),!0)}_onUpdated(){this.dispatch(`afterUpdate`,{pass:`update`})}_activate(e){let t=qs(e.name);if(!t){console.error(`[apexcharts] plugin "${e.name}" is not registered.`);return}let n=t.apiVersion==null?1:t.apiVersion;if(Math.trunc(n)!==Js){console.error(`[apexcharts] plugin "${t.name}" targets Weave API v${n}, host is v${Js}; skipped.`);return}let r={def:t,options:Object.freeze(K({},e.options||{})),handlers:new Map,disabled:!1,failures:0,api:null};r.api=Qs(this,r),this.active.push(r),this._guard(r,`setup`,()=>t.setup(r.api))}dispatch(e,t){if(e===`draw`&&(this._reconcile(),this._resetLayers()),this._lastData=null,!this.active.length)return;e===`afterParse`?this._currentScales=null:t&&`xyRatios`in t&&this._setScales(t.xyRatios);let n=t&&t.pass||`full`,r=null;for(let t of this.active){if(t.disabled)continue;let i=t.handlers.get(e);if(!i||!i.length)continue;r===null&&(r=this._dataSnapshot(),this._lastData=r);let a={api:t.api,scales:this._currentScales,data:r,pass:n,hook:e};for(let n of i.slice())this._guard(t,e,()=>n(a))}}_guard(e,t,n){if(!e.disabled)try{n()}catch(n){console.error(`[apexcharts] plugin "${e.def.name}" threw in "${t}":`,n),e.failures=(e.failures||0)+1,e.failures>=3&&(e.disabled=!0,console.error(`[apexcharts] plugin "${e.def.name}" disabled after repeated errors.`))}}_setScales(e){let t=this.w,n=t.globals,r=t.layout;if(!e||!n.axisCharts){this._currentScales=null;return}let i=e.xRatio,a=e.yRatio||[],o=e=>a[e]==null?a[0]:a[e],s=e=>n.maxYArr[e]==null?n.maxY:n.maxYArr[e],c=e=>n.minYArr[e]==null?n.minY:n.minYArr[e];this._currentScales={x:e=>r.translateX+(e-n.minX)/i,y:(e,t=0)=>r.translateY+(s(t)-e)/o(t),domainX:[n.minX,n.maxX],domainY:(e=0)=>[c(e),s(e)],gridWidth:r.gridWidth,gridHeight:r.gridHeight,ratios:e}}_dataSnapshot(){let e=this.w,t=e.globals,n=e.seriesData.series||[],r=e.seriesData.seriesX||[];return n.map((e,n)=>{let i=r[n]||[],a=(e||[]).map((e,t)=>({x:i[t]==null?t:i[t],y:e}));return{name:t.seriesNames?t.seriesNames[n]:void 0,hidden:(t.collapsedSeriesIndices||[]).includes(n),color:t.colors?t.colors[n]:void 0,points:a}})}_token(e){let t=this.w,n=t.globals;switch(e){case`foreColor`:return t.config.chart.foreColor;case`background`:return t.config.chart.background;case`accent`:case`primary`:return n.colors?n.colors[0]:void 0;default:return/^series-\d+$/.test(e)&&n.colors?n.colors[Number(e.split(`-`)[1])]:void 0}}_layer(e,{z:t=`front`,className:n=``}={}){let r=this._layers.get(e);if(!r){r=this.ctx.graphics.group({class:`apexcharts-plugin-${e} ${n}`.trim()});let i=this.w.dom.elGraphical.node;t===`behind`?i.insertBefore(r.node,i.firstChild):i.appendChild(r.node),r.node.setAttribute(`aria-hidden`,`true`),this._layers.set(e,r)}return Zs(r,this.ctx.graphics)}_resetLayers(){let e=this.w.dom.elGraphical,t=e&&e.node;if(t){let e=t.querySelectorAll(`g[class*="apexcharts-plugin-"]`);Array.prototype.forEach.call(e,e=>e.remove())}this._layers.clear()}_reconcile(){let e=this.w.config.plugins||[];if(e===this._lastPluginsRef)return;this._lastPluginsRef=e;let t=new Map(e.map((e,t)=>[e.name,{entry:e,order:e.order==null?t:e.order}]));for(let e=this.active.length-1;e>=0;e--){let n=this.active[e],r=t.get(n.def.name);r?n.options=Object.freeze(K({},r.entry.options||{})):(this._guard(n,`destroy`,()=>n.def.destroy&&n.def.destroy(n.api)),this.active.splice(e,1))}let n=new Set(this.active.map(e=>e.def.name)),r=[];t.forEach((e,t)=>{n.has(t)||r.push(e)}),r.sort((e,t)=>e.order-t.order).forEach(e=>this._activate(e.entry))}teardown(e){if(!e){this.dispatch(`destroy`);for(let e of this.active)this._guard(e,`destroy`,()=>e.def.destroy&&e.def.destroy(e.api));this.active=[],this._updatedWired&&=(this.ctx.removeEventListener&&this.ctx.removeEventListener(`updated`,this._onUpdated),!1)}this._layers.clear()}};G.registerFeatures({weave:$s});function ec(e,t){let n=e&&e.renderer;return n&&n.kind&&n.kind!==`svg`?n:t}function tc(e,t){let n=class{constructor(e,t,n){this.w=e,this.ctx=t,this.xyRatios=n,this._warned=!1}draw(n,r,i){var a,o;let s=this.w,c=new J(s,this.ctx),l=ec(this.ctx,c),u=c.group({class:`apexcharts-marks-series`});return n.forEach((n,r)=>{let a=Array.isArray(i)?i[r]:r,o=c.group({class:`apexcharts-series`,rel:a+1,seriesName:Q.escapeString(s.seriesData.seriesNames[a]),"data:realIndex":a}),d=this._scales(a,(s.seriesData.series[a]||[]).length),f=s.globals.colors[a],p=s.config.series[a]?.data||[],m=s.seriesData.seriesX[a]||[],h=s.seriesData.series[a]||[];s.globals.seriesXvalues[a]=[],s.globals.seriesYvalues[a]=[],s.globals.pointsArray[a]===void 0&&(s.globals.pointsArray[a]=[]);for(let n=0;n<h.length;n++){let r=h[n];if(r==null)continue;let i=m[n],c=d.xAt(n,i),u=d.y(r),g=this._api(l,o,a,n);try{t.renderItem({datum:p[n],x:c,y:u,scales:d,api:g,seriesIndex:a,dataPointIndex:n,color:f})}catch(t){this._warned||=(console.warn(`[apexcharts] renderItem for series type "${e}" threw; skipping datum:`,t),!0)}s.globals.seriesXvalues[a][n]=c,s.globals.seriesYvalues[a][n]=u,s.globals.pointsArray[a][n]=[c,u]}c.setupEventDelegation(o,`.apexcharts-marks-mark`),u.add(o)}),(o=(a=this.ctx.animations)?.animationCompleted)==null||o.call(a,u),u}_scales(e,t){let n=this.w.globals,r=this.w.config,i=this.xyRatios.xRatio,a=this.xyRatios.yRatio,o=n.seriesYAxisReverseMap?.[e]??0,s=Array.isArray(a)?a[o]??a[0]:a,c=n.maxYArr,l=Array.isArray(c)&&c.length?c[o]??n.maxY:n.maxY,u=n.gridWidth,d=n.gridHeight,f=!n.isXNumeric,p=t||n.dataPoints||1,m=p>0?u/p:u,h=r.xaxis.tickPlacement===`on`,g=e=>i?(e-n.minX)/i:u/2,_=e=>(l-e)/s,v=(e,t)=>f?h&&p>1?e/(p-1)*u:(e+.5)*m:g(t),y=n.minXDiff||1;return{x:g,xAt:v,y:_,gridWidth:u,gridHeight:d,band:f?m:i?y/i:u}}_api(e,t,n,r){let i=e=>{if(e){try{e.node.setAttribute(`index`,String(n)),e.node.setAttribute(`j`,String(r)),e.node.classList.add(`apexcharts-marks-mark`)}catch{}t.add(e)}return e};return{path:(t={})=>i(e.drawPath({d:t.d||``,stroke:t.stroke??`#000`,strokeWidth:t.width??t.strokeWidth??1,fill:t.fill??`none`,fillOpacity:t.fillOpacity??(t.fill&&t.fill!==`none`?t.opacity??1:0),strokeOpacity:t.strokeOpacity??t.opacity??1,strokeDashArray:t.dash??0,strokeLinecap:t.lineCap})),line:(t={})=>i(e.drawLine(t.x1,t.y1,t.x2,t.y2,t.stroke??`#000`,t.dash??0,t.width??t.strokeWidth??1)),rect:(t={})=>i(e.drawRect(t.x??0,t.y??0,t.w??0,t.h??0,t.r??0,t.fill??`#000`,t.opacity??1,t.stroke==null?null:t.strokeWidth??1,t.stroke)),circle:(t={})=>i(e.drawCircle(t.r??0,{cx:t.cx??0,cy:t.cy??0,fill:t.fill??`#000`,stroke:t.stroke||`none`,"stroke-width":t.strokeWidth??+!!t.stroke})),text:(t={})=>i(e.drawText({x:t.x??0,y:t.y??0,text:t.text??``,textAnchor:t.anchor??`start`,fontSize:t.size,foreColor:t.color,fontWeight:t.weight}))}}};return n.dataType=t.dataType||`xy`,n.yExtent=typeof t.yExtent==`function`?t.yExtent:null,n}G._customSeriesFactory=tc;var nc=`(prefers-color-scheme: dark)`,rc=`(prefers-contrast: more)`,ic=class e{constructor(e,t){if(this.w=e,this.ctx=t,e.config.theme.follow!==`os`||!Z.isBrowser())return;let n=this._ensureMedia();n&&(this._applyToConfig(n),this._ensureListeners(n))}_ensureMedia(){if(!this.ctx._osThemeMedia){let e=X.matchMedia(nc),t=X.matchMedia(rc);if(!e&&!t)return null;this.ctx._osThemeMedia={dark:e,contrast:t,handler:null}}return this.ctx._osThemeMedia}_applyToConfig(e){let t=this.w.config.theme;e.dark&&(t.mode=e.dark.matches?`dark`:`light`),e.contrast&&e.contrast.matches&&(t.accessibility=t.accessibility||{},t.accessibility.colorBlindMode=`highContrast`)}_ensureListeners(t){if(t.handler)return;let n=this.ctx,r=()=>{let e=n._osThemeMedia;if(!e)return;let t={mode:e.dark&&e.dark.matches?`dark`:`light`};t.accessibility=e.contrast&&e.contrast.matches?{colorBlindMode:`highContrast`}:{colorBlindMode:``},n.updateOptions({theme:t},!1,!0,!1)};e._add(t.dark,r),e._add(t.contrast,r),t.handler=r}teardown(){let t=this.ctx._osThemeMedia;t&&(t.handler&&(e._remove(t.dark,t.handler),e._remove(t.contrast,t.handler)),this.ctx._osThemeMedia=null)}static _add(e,t){e&&(typeof e.addEventListener==`function`?e.addEventListener(`change`,t):typeof e.addListener==`function`&&e.addListener(t))}static _remove(e,t){e&&(typeof e.removeEventListener==`function`?e.removeEventListener(`change`,t):typeof e.removeListener==`function`&&e.removeListener(t))}};G.registerFeatures({osThemeWatcher:ic});var ac=`__apexcharts_series_transforms__`;globalThis[ac]||(globalThis[ac]={});function oc(){return globalThis[ac]}function sc(e,t){if(!e||typeof e!=`string`){console.warn(`ApexCharts: registerSeriesTransform requires a non-empty name.`);return}if(typeof t!=`function`){console.warn(`ApexCharts: registerSeriesTransform("${e}") expects a function (series, w) => series.`);return}oc()[e]=t}var cc=`__apexcharts_row_sources__`;globalThis[cc]||(globalThis[cc]={});function lc(){return globalThis[cc]}function uc(e,t){if(!e||typeof e!=`string`){console.warn(`ApexCharts: registerRowSource requires a non-empty name.`);return}if(typeof t!=`function`){console.warn(`ApexCharts: registerRowSource("${e}") expects a function (w, opts) => series.`);return}lc()[e]=t}var dc=1e3;function fc(e,t){let n=e.length;if(n===0)return NaN;if(n===1)return e[0];let r=(n-1)*t,i=Math.floor(r),a=Math.ceil(r);return i===a?e[i]:e[i]+(e[a]-e[i])*(r-i)}function pc(e){let t=e.length;if(t<2)return 0;let n=0;for(let r=0;r<t;r++)n+=e[r];let r=n/t,i=0;for(let n=0;n<t;n++){let t=e[n]-r;i+=t*t}return Math.sqrt(i/t)}function mc(e,t,n){let r=e.length,i=e=>t/Math.max(1,Math.ceil(e));switch(n){case`sqrt`:return{width:i(Math.sqrt(r)),rule:`sqrt`};case`rice`:return{width:i(2*Math.cbrt(r)),rule:`rice`};case`scott`:{let t=pc(e);return t>0?{width:3.49*t*r**(-1/3),rule:`scott`}:{width:i(Math.log2(r)+1),rule:`sturges`}}case`fd`:{let t=fc(e,.75)-fc(e,.25);return t>0?{width:2*t*r**(-1/3),rule:`fd`}:{width:i(Math.log2(r)+1),rule:`sturges`}}case`auto`:{let t=i(Math.log2(r)+1),n=fc(e,.75)-fc(e,.25);if(n<=0)return{width:t,rule:`sturges`};let a=2*n*r**(-1/3);return a<t?{width:a,rule:`fd`}:{width:t,rule:`sturges`}}default:return{width:i(Math.log2(r)+1),rule:`sturges`}}}function hc(e,t={}){if(!Array.isArray(e)||e.length===0)return null;let n=e.slice().sort((e,t)=>e-t),r=n[0],i=n[n.length-1],a=t.range;if(Array.isArray(a)&&a.length===2){let e=Number(a[0]),t=Number(a[1]);isFinite(e)&&isFinite(t)&&t>e&&(r=e,i=t)}if(!(i>r)){let e=Math.abs(r)>0?Math.abs(r)*.05:.5;return{edges:[r-e,r+e],binWidth:e*2,rule:`single`,capped:!1}}let o=i-r,s,c;if(typeof t.binWidth==`number`&&t.binWidth>0)s=t.binWidth,c=`binWidth`;else if(typeof t.bins==`number`&&t.bins>=1)s=o/Math.floor(t.bins),c=`count`;else{let e=mc(n,o,typeof t.bins==`string`?t.bins:`auto`);s=e.width,c=e.rule}(!isFinite(s)||s<=0)&&(s=o);let l=Math.ceil(o/s);(!isFinite(l)||l<1)&&(l=1);let u=!1;l>dc&&(l=dc,s=o/l,u=!0),s=o/l;let d=Array(l+1);for(let e=0;e<=l;e++)d[e]=r+e*s;return d[l]=Math.max(d[l],i),{edges:d,binWidth:s,rule:c,capped:u}}function gc(e,t){let n=t.length-1;if(!(e>=t[0])||e>t[n])return-1;if(e===t[n])return n-1;let r=(t[n]-t[0])/n;if(r>0){let i=Math.floor((e-t[0])/r);return i<0&&(i=0),i>n-1&&(i=n-1),e<t[i]?i--:e>=t[i+1]&&i++,i<0||i>n-1?-1:i}let i=0,a=n-1;for(;i<=a;){let n=i+a>>1;if(e<t[n])a=n-1;else if(e>=t[n+1])i=n+1;else return n}return-1}function _c(e,t){let n=Array(Math.max(0,t.length-1)).fill(0);for(let r=0;r<e.length;r++){let i=gc(e[r],t);i>=0&&n[i]++}return n}function vc(e,t){let n=Math.max(0,t.length-1),r=Array(n);for(let e=0;e<n;e++)r[e]=[];for(let n=0;n<e.length;n++){let i=gc(e[n],t);i>=0&&r[i].push(e[n])}return r}function yc(e,t={}){if(!Array.isArray(e)||e.length===0)return null;let n=e.slice().sort((e,t)=>e-t),r=fc(n,.25),i=fc(n,.5),a=fc(n,.75),o=a-r,s=n[0],c=n[n.length-1],l=[];if(t.whiskers===`tukey`&&o>0){let e=r-1.5*o,t=a+1.5*o,i=0;for(;i<n.length&&n[i]<e;)i++;let u=n.length-1;for(;u>=0&&n[u]>t;)u--;i<=u&&(s=n[i],c=n[u],l=n.slice(0,i).concat(n.slice(u+1)))}return{summary:[s,r,i,a,c],outliers:l,iqr:o}}function bc(e,t={}){if(!Array.isArray(e)||e.length===0)return null;let n=e.slice().sort((e,t)=>e-t),r=n.length,i=t.bandwidth;if(!(typeof i==`number`&&i>0)){let e=pc(n),t=fc(n,.75)-fc(n,.25);i=.9*(t>0?Math.min(e,t/1.349):e)*r**(-1/5)}if(!isFinite(i)||i<=0){let e=n[0],t=Math.abs(e)>0?Math.abs(e)*.001:.001;return{density:[[e-t,0],[e,1],[e+t,0]],bandwidth:t}}let a=Math.max(8,Math.floor(t.resolution||64)),o=n[0]-2*i,s=(n[r-1]+2*i-o)/(a-1),c=1/(r*i*Math.sqrt(2*Math.PI)),l=[];for(let e=0;e<a;e++){let t=o+e*s,a=0;for(let e=0;e<r;e++){let r=(t-n[e])/i;a+=Math.exp(-.5*r*r)}l.push([t,a*c])}return{density:l,bandwidth:i}}function xc(e,t={}){let n=e.slice();if(t.cumulative){let e=0;n=n.map(t=>e+=t)}let r=e.reduce((e,t)=>e+t,0);if(r<=0)return n;if(t.normalize===`relative`)return n.map(e=>e/r*100);if(t.normalize===`density`){let e=t.binWidth;if(typeof e==`number`&&e>0)return n.map(t=>t/(r*e))}return n}function Sc(e,t){if(!e||typeof e!=`object`||Array.isArray(e))return null;let n=null;if(Array.isArray(e.points)?n=e.points:Array.isArray(e.y?.points)?n=e.y.points:t&&Array.isArray(e.y)&&typeof e.y[0]==`number`&&(n=e.y),!n)return null;let r=[];for(let e=0;e<n.length;e++){let t=Q.parseNumber(n[e]);t!==null&&isFinite(t)&&r.push(t)}return r.length?r:null}function Cc(e){let t=[];if(!Array.isArray(e))return t;for(let n=0;n<e.length;n++){let r=e[n],i=r;Array.isArray(r)?i=r.length===1?r[0]:r[1]:r&&typeof r==`object`&&(i=r.y===void 0?r.x:r.y);let a=Q.parseNumber(i);a!==null&&isFinite(a)&&t.push(a)}return t}function wc(e,t){let n=t.config,r=t.globals;if(!Array.isArray(e))return e;r.histogramRawSeries||=e.map(e=>q(K({},e),{data:Array.isArray(e?.data)?e.data.slice():e?.data}));let i=r.histogramRawSeries,a=n.plotOptions?.histogram||{},o=i.map(e=>Cc(e?.data)),s=[];if(o.length===1)s=o[0];else for(let e of o)s=s.concat(e);let c=hc(s,{bins:a.bins,binWidth:a.binWidth,range:a.range});if(!c)return t.histogramData={edges:[],binWidth:0,counts:[],rule:``,capped:!1},i;let{edges:l,binWidth:u}=c,d=o.map(e=>_c(e,l));t.histogramData={edges:l,binWidth:u,counts:d,rule:c.rule,capped:c.capped};let f=r.collapsedSeriesIndices||[];return i.map((e,t)=>{if(f.indexOf(t)!==-1)return q(K({},e),{data:[]});let n=xc(d[t],{normalize:a.normalize,cumulative:a.cumulative,binWidth:u}),r=[];for(let e=0;e<n.length;e++)r.push({x:(l[e]+l[e+1])/2,y:n[e]});return q(K({},e),{data:r})})}var Tc=new WeakSet;function Ec(e,t){if(!Array.isArray(e))return e;let n=t.config.plotOptions?.boxPlot?.whiskers||`minmax`;return e.map(e=>{if(!Array.isArray(e?.data))return e;let t=!1,r=e.data.map(e=>{if(Array.isArray(e?.y)&&e.y.length===5&&!Tc.has(e))return e;let r=Sc(e,!1);if(!r)return e;let i=yc(r,{whiskers:n});if(!i)return e;t=!0;let a=q(K({},e),{y:i.summary,points:r});return Tc.add(a),a});return t?q(K({},e),{data:r}):e})}function Dc(e,t){if(!Array.isArray(e))return e;let n=t.config.plotOptions?.violin?.kde||{};return e.map(e=>{if(!Array.isArray(e?.data))return e;let t=!1,r=e.data.map(e=>{if(Array.isArray(e?.y?.density)&&e.y.density.length&&!Tc.has(e))return e;let r=Sc(e,!0);if(!r)return e;let i=bc(r,{bandwidth:n.bandwidth,resolution:n.resolution});if(!i)return e;t=!0;let a=q(K({},e),{y:{density:i.density,points:r}});return Tc.add(a),a});return t?q(K({},e),{data:r}):e})}var Oc=3e3;function kc(e,t){let n=0,r=0;for(let t of e)n+=t.length,t.length>r&&(r=t.length);if(n<=t)return{clusters:e,stride:1,total:n,kept:n};let i=t=>{let n=0;for(let r of e)n+=Math.ceil(r.length/t);return n},a=Math.max(2,Math.ceil(n/t));for(;a<r&&i(a)>t;)a++;let o=0;return{clusters:e.map(e=>{let t=[];for(let n=0;n<e.length;n+=a)t.push(e[n]);return o+=t.length,t}),stride:a,total:n,kept:o}}function Ac(e,t,n){let r=n&&n.maxRows!=null?n.maxRows:Oc,i=kc(t.map(e=>e.rows),r);i.stride>1&&console.warn(`ApexCharts: rowSeries() thinned ${i.total} rows to ${i.kept} (every ${i.stride}${i.stride===2?`nd`:i.stride===3?`rd`:`th`} row) to stay under maxRows=${r}. Raise maxRows to draw more.`);let a=e.globals&&e.globals.colors||[];return t.map((e,t)=>{let n=a[e.realIndex]||a[0];return{name:e.name,data:i.clusters[t].map((r,i)=>K({id:`${e.realIndex}:${t}:${i}`,x:e.name,y:r},n?{fillColor:n}:{}))}})}function jc(e,t){let n=e.globals,r=e.histogramData,i=n&&n.histogramRawSeries;if(!r||!Array.isArray(r.edges)||r.edges.length<2||!Array.isArray(i)||!i.length)return null;let a=n&&n.collapsedSeriesIndices||[],o=r.edges,s=[];return i.forEach((t,n)=>{if(a.indexOf(n)!==-1)return;let r=vc(Cc(t&&t.data),o),c=e.seriesData&&e.seriesData.seriesNames?.[n]||t?.name;r.forEach((e,t)=>{let r=`${Mc(o[t])}-${Mc(o[t+1])}`;s.push({name:i.length>1&&c?`${c} ${r}`:r,realIndex:n,rows:e})})}),s.length?Ac(e,s,t):null}function Mc(e){if(!isFinite(e))return String(e);let t=Math.round(e);return Math.abs(e-t)<1e-6?String(t):String(Number(e.toFixed(2)))}function Nc(e){return(t,n)=>{let r=e(t);if(!Array.isArray(r)||!r.length)return null;let i=t.globals&&t.globals.collapsedSeriesIndices||[],a=t.globals&&(t.globals.categoryLabels?.length?t.globals.categoryLabels:t.globals.labels)||[],o=[];return r.forEach((e,n)=>{if(i.indexOf(n)!==-1||!Array.isArray(e))return;let s=t.seriesData&&t.seriesData.seriesNames?.[n];e.forEach((e,t)=>{let i=a[t]==null?`#${t+1}`:String(a[t]);o.push({name:r.length>1&&s?`${s} ${i}`:i,realIndex:n,rows:Array.isArray(e)?e.slice():[]})})}),o.length?Ac(t,o,n):null}}var Pc=Nc(e=>e.candleData?.seriesBoxPoints),Fc=Nc(e=>e.violinData?.seriesViolinPoints);sc(`histogram`,wc),sc(`boxPlot`,Ec),sc(`violin`,Dc),uc(`histogram`,jc),uc(`boxPlot`,Pc),uc(`violin`,Fc);var Ic=class{constructor(e,t){this.w=e,this.ctx=t}isActive(){return this.w.config.chart.requestedType===`waterfall`}drawConnectors(){let e=this.w;if(!this.isActive())return;let t=e.config.plotOptions?.waterfall?.connectors;if(!t||t.show===!1)return;let n=e.dom.elGraphical,r=e.waterfallData&&e.waterfallData.geometry;if(!n||!r)return;this.removeConnectors();let i=new J(e,this.ctx),a=i.group({class:`apexcharts-waterfall-connectors`}),o=t.color||e.config.grid.borderColor,s=t.strokeWidth==null?1:t.strokeWidth,c=t.strokeDashArray==null?3:t.strokeDashArray,l=0;for(let e=0;e<r.length;e++){let t=r[e];if(Array.isArray(t))for(let e=0;e<t.length-1;e++){let n=t[e],r=t[e+1];if(!n||!r||!(r.slotStart-n.slotEnd>.5))continue;let u=n.horizontal?i.drawLine(n.levelEnd,n.slotEnd,n.levelEnd,r.slotStart,o,c,s):i.drawLine(n.slotEnd,n.levelEnd,r.slotStart,n.levelEnd,o,c,s);u.node.classList.add(`apexcharts-waterfall-connector`),a.add(u),l++}}if(!l)return;a.attr(`clip-path`,`url(#gridRectBarMask${e.globals.cuid})`);let u=n.node.querySelector(`.apexcharts-xaxis`);u?n.node.insertBefore(a.node,u):n.add(a),this.holdUntilBarsLand(a)}removeConnectors(){let e=this.w.dom.elGraphical,t=e&&e.node.querySelector(`.apexcharts-waterfall-connectors`);t&&t.parentNode&&t.parentNode.removeChild(t)}holdUntilBarsLand(e){let t=this.w;Z.isBrowser()&&t.globals.shouldAnimate&&!t.globals.animationEnded&&(e.node.classList.add(`apexcharts-element-hidden`),t.globals.delayedElements.push({el:e.node,holdUntilComplete:!0}))}};function Lc(e,t,n){let r=n&&n[t]!==void 0?n[t]:t+1;return e==null?{x:r,y:null,isSubtotal:!1,isTotal:!1,rest:{}}:Array.isArray(e)?{x:e[0]===void 0?r:e[0],y:e[1],isSubtotal:!1,isTotal:!1,rest:{}}:typeof e==`object`?{x:e.x===void 0?r:e.x,y:e.y,isSubtotal:e.isSubtotal===!0,isTotal:e.isTotal===!0,rest:e}:{x:r,y:e,isSubtotal:!1,isTotal:!1,rest:{}}}function Rc(e){for(let t=0;t<e.length;t++){let n=e[t],r=Array.isArray(n)?n[1]:n&&typeof n==`object`?n.y:n;if(Array.isArray(r)&&r.length===2)return!0}return!1}function zc(e,t,n){if(e&&e.fillColor)return e.fillColor;let r=n[t];return typeof r==`string`&&r?r:void 0}function Bc(e,t,n){let r=[],i=[],a=[],o=[],s=0,c=0;for(let l=0;l<e.length;l++){let{x:u,y:d,isSubtotal:f,isTotal:p,rest:m}=Lc(e[l],l,t),h,g,_;if(p||f)h=p?0:c,g=s,_=p?`total`:`subtotal`,c=s;else{let e=Q.parseNumber(d);if(e===null||!isFinite(e)){r.push(q(K({},m),{x:u,y:null})),i.push(null),a.push(s),o.push(null);continue}h=s,g=s+e,s=g,_=e<0?`negative`:`positive`}let v=zc(m,_,n);r.push(K(q(K({},m),{x:u,y:[h,g]}),v?{fillColor:v}:{})),i.push(g-h),a.push(s),o.push(_)}return{data:r,values:i,cumulative:a,kinds:o}}function Vc(e,t){let n=t.config,r=t.globals;if(!Array.isArray(e))return e;r.waterfallRawSeries||=e.map(e=>q(K({},e),{data:Array.isArray(e?.data)?e.data.slice():e?.data}));let i=r.waterfallRawSeries,a=n.plotOptions?.waterfall?.colors||{},o=n.xaxis?.categories,s=r.collapsedSeriesIndices||[],c=[],l=[],u=[],d=i.map((e,t)=>{let n=Array.isArray(e?.data)?e.data:[];if(s.indexOf(t)!==-1)return c[t]=[],l[t]=[],u[t]=[],q(K({},e),{data:[]});if(Rc(n))return c[t]=n.map(e=>{let t=Array.isArray(e)?e[1]:e&&typeof e==`object`?e.y:e;if(!Array.isArray(t))return null;let n=Q.parseNumber(t[0]),r=Q.parseNumber(t[1]);return n===null||r===null?null:r-n}),l[t]=n.map(e=>{let t=Array.isArray(e)?e[1]:e&&typeof e==`object`?e.y:e,n=Array.isArray(t)?Q.parseNumber(t[1]):null;return n===null?0:n}),u[t]=n.map(()=>null),e;let r=Bc(n,o,a);return c[t]=r.values,l[t]=r.cumulative,u[t]=r.kinds,q(K({},e),{data:r.data})});return t.waterfallData={values:c,cumulative:l,kinds:u,geometry:[]},d}sc(`waterfall`,Vc),G.registerFeatures({waterfall:Ic});function Hc(e,t,n){let r=n&&n[t]!==void 0?n[t]:t+1;return e==null?{x:r,y:null,rest:{}}:Array.isArray(e)?{x:e[0]===void 0?r:e[0],y:e[1],rest:{}}:typeof e==`object`?{x:e.x===void 0?r:e.x,y:e.y,rest:e}:{x:r,y:e,rest:{}}}function Uc(e){for(let t=0;t<e.length;t++){let n=e[t],r=Array.isArray(n)?n[1]:n&&typeof n==`object`?n.y:n;if(Array.isArray(r)&&r.length===2)return!0}return!1}function Wc(e,t){let n=[],r=[],i=new Map,a=[];for(let o=0;o<e.length;o++){let s=Array.isArray(e[o]?.data)?e[o].data:[],c=new Map;for(let e=0;e<s.length;e++){let{x:a,y:o,rest:l}=Hc(s[e],e,t),u=a instanceof Date?a.getTime():a;i.has(u)||(i.set(u,n.length),n.push(a),r.push(K({},l)));let d=i.get(u);c.set(d,Q.parseNumber(o))}a.push(c)}return{xs:n,rows:r,byX:a}}function Gc(e,t){let n=t.config,r=t.globals;if(!Array.isArray(e))return e;r.dumbbellRawSeries||=e.map(e=>q(K({},e),{data:Array.isArray(e?.data)?e.data.slice():e?.data}));let i=r.dumbbellRawSeries;if(i.some(e=>Uc(Array.isArray(e?.data)?e.data:[])))return t.dumbbellData={form:`pairs`,names:[],values:[],order:[],carrier:0,hidden:[]},e;let a=n.xaxis?.categories,o=r.collapsedSeriesIndices||[],{xs:s,rows:c,byX:l}=Wc(i,a),u=[],d=[],f=[];for(let e=0;e<i.length;e++)o.indexOf(e)===-1&&f.push(e);let p=[];for(let e=0;e<s.length;e++){let t=[];for(let n=0;n<i.length;n++){let r=l[n].has(e)?l[n].get(e):null;t.push(r==null||!isFinite(r)?null:r)}u.push(t);let n=null,r=null,a=-1,o=-1;for(let e=0;e<f.length;e++){let i=f[e],s=t[i];s!==null&&((n===null||s<n)&&(n=s,a=i),(r===null||s>r)&&(r=s,o=i))}if(n===null||r===null){d.push(null),p.push(q(K({},c[e]),{x:s[e],y:null}));continue}d.push([a,o]),p.push(q(K({},c[e]),{x:s[e],y:[n,r]}))}t.dumbbellData={form:`series`,names:i.map((e,t)=>e?.name??`Series ${t+1}`),values:u,order:d,carrier:f.length?f[0]:0,hidden:i.map((e,t)=>t).filter(e=>o.indexOf(e)!==-1)};let m=t.dumbbellData.carrier;return i.map((e,t)=>q(K({},e),{data:t===m&&f.length?p:[]}))}sc(`dumbbell`,Gc);var Kc=class{constructor(e,t){this.w=e,this.ctx=t,this._hovered=-1}isActive(){return this.w.config.chart.requestedType===`streamgraph`}_yPx(e){let t=this.w,n=t.globals,r=t.layout.gridHeight,i=n.maxY-n.minY;if(!i||!isFinite(i))return r/2;let a=(e-n.minY)/i;return t.config.yaxis[0]?.reversed?a*r:r-a*r}draw(){this.isActive()&&(this.clearDim(),this.bindHover(),this.drawLabels())}drawLabels(){let e=this.w;if(!this.isActive())return;let t=e.config.plotOptions?.streamgraph?.labels;if(!t||t.show===!1)return;let n=e.dom.elGraphical,r=e.streamgraphData;if(!n||!r)return;this.removeLabels();let i=new J(e,this.ctx),a=i.group({class:`apexcharts-streamgraph-labels`}),o=t.style?.fontSize||`auto`,s=t.style?.fontFamily||e.config.chart.fontFamily,c=t.style?.fontWeight||600,l=t.minWidth==null?24:t.minWidth,u=[];for(let e=0;e<r.order.length;e++){let t=r.order[e],n=this._placeLabel(t,{fontSize:o,fontFamily:s,fontWeight:c,minWidth:l,graphics:i});n&&u.push(n)}let d=0;for(let e of this._deconflict(u)){let n=e.k,r=i.drawText({x:e.x,y:e.y,text:e.text,textAnchor:`middle`,dominantBaseline:`middle`,fontSize:e.fontSize,fontFamily:s,fontWeight:c,foreColor:t.style?.colors?.[n]||e.color,cssClass:`apexcharts-streamgraph-label`});r.node.setAttribute(`data:realIndex`,String(n)),a.add(r),d++}if(!d)return;let f=n.node.querySelector(`.apexcharts-xaxis`);f?n.node.insertBefore(a.node,f):n.add(a),this.holdUntilBandsLand(a)}_placeLabel(e,{fontSize:t,fontFamily:n,fontWeight:r,minWidth:i,graphics:a}){let o=this.w,s=o.streamgraphData,c=s.lows[e],l=s.highs[e];if(!c||!l)return null;let u=o.globals.seriesXvalues[e],d=c.length;if(!Array.isArray(u)||u.length<d||d===0)return null;let f=Array(d),p=0;for(let e=0;e<d;e++){let t=Math.abs(this._yPx(l[e])-this._yPx(c[e]));f[e]=t,t>p&&(p=t)}if(p<=0)return null;let m=this._resolveFontSize(t,p),h=String(s.names[e]),g=m,_=a.getTextRects(h,`${g}px`,n,``,!0,r);if(p<_.height+6)return null;let v=this._widestRun(f,u,_.height+6,d);if(!v)return null;if(_.width>v.width&&t===`auto`){let e=Math.floor(g*(v.width/_.width));if(e<this._autoBounds().min||(g=e,_=a.getTextRects(h,`${g}px`,n,``,!0,r),p<_.height+6))return null}let y=_.height+6,b=[];for(let t of this._runs(f,y,d)){let r=Number(u[t.l]),o=Number(u[t.r]);if(!isFinite(r)||!isFinite(o))continue;let s=o-r;if(s<=0&&d>1){let e=Math.abs(Number(u[Math.min(t.r+1,d-1)])-Number(u[Math.max(t.l-1,0)]));s=isFinite(e)?e:0}if(s<i||s<_.width*.35)continue;let f=_.width<=s?h:a.getTextBasedOnMaxWidth({text:h,maxWidth:s,fontSize:`${g}px`,fontFamily:n});if(!f||f===`...`)continue;let p=f===h?_.width:_.width*(f.length/h.length),m=[r+s/2];s>p*2.2&&m.push(r+p/2+2,o-p/2-2);for(let n of m){let r=t.l,i=1/0;for(let e=t.l;e<=t.r;e++){let t=Math.abs(Number(u[e])-n);t<i&&(i=t,r=e)}b.push({x:n,y:(this._yPx(c[r])+this._yPx(l[r]))/2,text:f,color:this._contrastOn(e),fontSize:`${g}px`,width:p,height:_.height})}if(b.length>=6)break}return b.length?{k:e,weight:p,candidates:b}:null}_runs(e,t,n){let r=[],i=0;for(;i<n;){if(e[i]<t){i++;continue}let a=i,o=e[i];for(;a+1<n&&e[a+1]>=t;)a++,e[a]>o&&(o=e[a]);r.push({l:i,r:a,maxT:o}),i=a+1}return r.sort((e,t)=>t.maxT-e.maxT)}_widestRun(e,t,n,r){let i=-1;for(let a of this._runs(e,n,r)){let e=Number(t[a.r])-Number(t[a.l]);isFinite(e)&&e>i&&(i=e)}return i>=0?{width:i}:null}_deconflict(e){let t=e.slice().sort((e,t)=>t.weight-e.weight),n=[],r=e=>!n.some(t=>e.left<t.box.right&&e.right>t.box.left&&e.top<t.box.bottom&&e.bottom>t.box.top);for(let e of t)for(let t of e.candidates){let i={left:t.x-t.width/2,right:t.x+t.width/2,top:t.y-t.height/2,bottom:t.y+t.height/2};if(r(i)){n.push(q(K({k:e.k},t),{box:i}));break}}return n}_autoBounds(){let e=this.w.config.plotOptions?.streamgraph?.labels||{};return{min:e.minFontSize==null?9:e.minFontSize,max:e.maxFontSize==null?30:e.maxFontSize}}_resolveFontSize(e,t){if(e!==`auto`){let t=parseFloat(e);return isFinite(t)&&t>0?t:12}let{min:n,max:r}=this._autoBounds();return Math.max(n,Math.min(r,Math.round(t*.36)))}_contrastOn(e){let t=this.w,n=t.globals.colors?.[e],r=typeof n==`string`?Q.parseHex(n):null;return r?Q.relativeLuminance(r)>.45?`#000000`:`#ffffff`:t.config.chart.foreColor}removeLabels(){let e=this.w.dom.elGraphical,t=e&&e.node.querySelector(`.apexcharts-streamgraph-labels`);t&&t.parentNode&&t.parentNode.removeChild(t)}bindHover(){let e=this.w;if(!Z.isBrowser()||this._hoverCfg().show===!1)return;let t=e.dom.baseEl&&e.dom.baseEl.querySelector(`.apexcharts-svg`);t&&!t.__apexStreamHover&&(t.__apexStreamHover=!0,t.addEventListener(`mousemove`,e=>{this.isActive()&&this.w.streamgraphData&&this._dim(this._bandAt(e))}),t.addEventListener(`mouseleave`,()=>{this._dim(-1)}))}_hoverCfg(){return this.w.config.plotOptions?.streamgraph?.hover||{}}_bandAt(e){let t=this.w,n=t.streamgraphData;if(!n||!n.order.length)return-1;let r=t.dom.baseEl&&t.dom.baseEl.querySelector(`.apexcharts-svg`);if(!r)return-1;let i=r.getBoundingClientRect(),a=t.globals.svgWidth?i.width/t.globals.svgWidth:1,o=Xo.screenXToPlotPx(t,e.clientX),s=(e.clientY-i.top)/(a||1)-t.layout.translateY;if(o<0||o>t.layout.gridWidth||s<0||s>t.layout.gridHeight)return-1;let c=t.globals.seriesXvalues[n.order[0]];if(!Array.isArray(c)||!c.length)return-1;let l=t.interact?t.interact.capturedDataPointIndex:-1,u=-1;if(l>=0&&l<c.length)u=l;else{let e=1/0;for(let t=0;t<c.length;t++){let n=Math.abs(Number(c[t])-o);n<e&&(e=n,u=t)}}if(u<0)return-1;let d=-1,f=1/0;for(let e=0;e<n.order.length;e++){let t=n.order[e],r=this._yPx(n.highs[t][u]),i=this._yPx(n.lows[t][u]),a=Math.min(r,i),o=Math.max(r,i);if(s>=a&&s<=o)return t;let c=s<a?a-s:s-o;c<f&&(f=c,d=t)}return d}_dim(e){let t=this.w;if(e===this._hovered)return;this._hovered=e;let n=this._hoverCfg(),r=n.opacity==null?.35:n.opacity,i=t.dom.baseEl.querySelectorAll(`.apexcharts-series`),a=t.dom.baseEl.querySelectorAll(`.apexcharts-streamgraph-label`),o=(t,n)=>e<0||n===e;for(let e=0;e<i.length;e++){let t=i[e];t.style.transition=`opacity .15s ease`,t.style.opacity=o(t,Number(t.getAttribute(`data:realIndex`)))?``:String(r)}for(let e=0;e<a.length;e++){let n=a[e];n.style.transition=`opacity .15s ease, fill .15s ease`,o(n,Number(n.getAttribute(`data:realIndex`)))?this._restoreLabel(n):(n.getAttribute(`data:fill`)||n.setAttribute(`data:fill`,n.getAttribute(`fill`)||``),n.setAttribute(`fill`,t.config.chart.foreColor),n.style.opacity=`0.65`)}}_restoreLabel(e){let t=e.getAttribute(`data:fill`);t&&e.setAttribute(`fill`,t),e.style.opacity=``}clearDim(){this._hovered=-1;let e=this.w;if(!e.dom.baseEl)return;let t=e.dom.baseEl.querySelectorAll(`.apexcharts-series`);for(let e=0;e<t.length;e++){let n=t[e];n.style.opacity=``}let n=e.dom.baseEl.querySelectorAll(`.apexcharts-streamgraph-label`);for(let e=0;e<n.length;e++)this._restoreLabel(n[e])}holdUntilBandsLand(e){let t=this.w;Z.isBrowser()&&t.globals.shouldAnimate&&!t.globals.animationEnded&&(e.node.classList.add(`apexcharts-element-hidden`),t.globals.delayedElements.push({el:e.node,holdUntilComplete:!0}))}},qc=[`wiggle`,`silhouette`,`zero`,`expand`],Jc=[`inside-out`,`inverse`,`none`];function Yc(e,t,n){let r=n&&n[t]!==void 0?n[t]:t+1;return e==null?{x:r,y:null,rest:{}}:Array.isArray(e)?{x:e[0]===void 0?r:e[0],y:e[1],rest:{}}:typeof e==`object`?{x:e.x===void 0?r:e.x,y:e.y,rest:e}:{x:r,y:e,rest:{}}}function Xc(e){for(let t=0;t<e.length;t++){let n=e[t],r=Array.isArray(n)?n[1]:n&&typeof n==`object`?n.y:n;if(Array.isArray(r)&&r.length===2)return!0}return!1}function Zc(e,t){let n=[],r=[],i=new Map,a=[];for(let o=0;o<e.length;o++){let s=Array.isArray(e[o]?.data)?e[o].data:[],c=new Map;for(let e=0;e<s.length;e++){let{x:a,y:o,rest:l}=Yc(s[e],e,t),u=a instanceof Date?a.getTime():a;i.has(u)||(i.set(u,n.length),n.push(a),r.push(K({},l))),c.set(i.get(u),Q.parseNumber(o))}a.push(c)}return{xs:n,rows:r,grids:a}}function Qc(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n]instanceof Date?e[n].getTime():e[n];if(typeof r!=`number`||!isFinite(r))return null;t.push(n)}let n=t.map(t=>({j:t,v:e[t]instanceof Date?e[t].getTime():e[t]}));n.sort((e,t)=>e.v-t.v);let r=n.map(e=>e.j);for(let e=0;e<r.length;e++)if(r[e]!==e)return r;return null}function $c(e,t,n){if(e===`none`)return t.slice();if(e===`inverse`)return t.slice().reverse();let r={},i={};for(let e=0;e<t.length;e++){let a=t[e],o=n[a],s=0,c=-1/0,l=0;for(let e=0;e<o.length;e++)s+=o[e],o[e]>c&&(c=o[e],l=e);r[a]=s,i[a]=l}let a=t.slice().sort((e,t)=>i[e]-i[t]||e-t),o=0,s=0,c=[],l=[];for(let e=0;e<a.length;e++){let t=a[e];o<s?(o+=r[t],c.push(t)):(s+=r[t],l.push(t))}return l.reverse().concat(c)}function el(e,t,n,r){let i=Array(r).fill(0);if(r===0||t.length===0||e===`zero`||e===`expand`)return i;if(e===`silhouette`){for(let e=0;e<r;e++){let r=0;for(let i=0;i<t.length;i++)r+=n[t[i]][e];i[e]=-r/2}return i}let a=0;for(let e=1;e<r;e++){let r=0,o=0;for(let i=0;i<t.length;i++){let a=n[t[i]],s=a[e],c=(s-a[e-1])/2;for(let r=0;r<i;r++){let i=n[t[r]];c+=i[e]-i[e-1]}r+=s,o+=c*s}r&&(a-=o/r),i[e]=a}return i}function tl(e,t){let n=t.config,r=t.globals;if(!Array.isArray(e))return e;r.streamgraphRawSeries||=e.map(e=>q(K({},e),{data:Array.isArray(e?.data)?e.data.slice():e?.data}));let i=r.streamgraphRawSeries;if(i.some(e=>Xc(Array.isArray(e?.data)?e.data:[])))return t.streamgraphData=null,e;let a=n.plotOptions?.streamgraph||{},o=qc.indexOf(a.offset)===-1?`wiggle`:a.offset,s=Jc.indexOf(a.order)===-1?`inside-out`:a.order,c=n.xaxis?.categories,l=r.collapsedSeriesIndices||[],{xs:u,rows:d,grids:f}=Zc(i,c),p=Qc(u),m=p?p.map(e=>u[e]):u,h=p?p.map(e=>d[e]):d,g=m.length,_=!1,v=[];for(let e=0;e<i.length;e++){let t=Array(g);for(let n=0;n<g;n++){let r=f[e].get(p?p[n]:n),i=r==null?0:Number(r);isFinite(i)||(i=0),i<0&&(_=!0,i=0),t[n]=i}v.push(t)}_&&!r.streamgraphWarnedNegative&&(r.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.`));let y=[];for(let e=0;e<i.length;e++)l.indexOf(e)===-1&&y.push(e);let b=v;if(o===`expand`){b=v.map(e=>e.slice());for(let e=0;e<g;e++){let t=0;for(let n=0;n<y.length;n++)t+=b[y[n]][e];if(t)for(let n=0;n<y.length;n++)b[y[n]][e]/=t}}let x=$c(s,y,b),S=el(o,x,b,g),C=i.map(()=>null),w=i.map(()=>null);for(let e=0;e<x.length;e++)C[x[e]]=Array(g),w[x[e]]=Array(g);for(let e=0;e<g;e++){let t=S[e];for(let n=0;n<x.length;n++){let r=x[n],i=C[r],a=w[r];i[e]=t,t+=b[r][e],a[e]=t}}return t.streamgraphData={names:i.map((e,t)=>e?.name??`Series ${t+1}`),xs:m,values:v,lows:C,highs:w,order:x,offset:o,hidden:i.map((e,t)=>t).filter(e=>l.indexOf(e)!==-1)},i.map((e,t)=>{let n=C[t],r=w[t];if(!n||!r)return q(K({},e),{data:[]});let i=Array(g);for(let e=0;e<g;e++)i[e]=q(K({},h[e]),{x:m[e],y:[n[e],r[e]]});return q(K({},e),{data:i})})}sc(`streamgraph`,tl),G.registerFeatures({streamgraph:Kc});var nl=(e,t,n,r)=>{if(typeof e!=`function`)return e;let i=e({series:t.seriesData.series,seriesIndex:n,dataPointIndex:r,w:t});return Number.isFinite(i)?i:0};function rl(e){return-Math.cos(e*Math.PI)/2+.5}function il(e,t,n,r){e=Math.min(Math.max(e,0),1),n=Math.min(Math.max(n,0),1);let i=3*e,a=3*(n-e)-i,o=1-i-a,s=3*t,c=3*(r-t)-s,l=1-s-c,u=e=>((o*e+a)*e+i)*e,d=e=>((l*e+c)*e+s)*e,f=e=>{let t=0,n=1,r=e;if(r<t)return t;if(r>n)return n;for(;t<n;){let i=u(r);if(Math.abs(i-e)<1e-4)return r;e>i?t=r:n=r,r=(t+n)/2}return r};return e=>e<=0?0:e>=1?1:d(f(e))}var al=new Map;al.set(`linear`,e=>e),al.set(`easeInOutSine`,rl),al.set(`easeInSine`,e=>1-Math.cos(e*Math.PI/2)),al.set(`easeOutSine`,e=>Math.sin(e*Math.PI/2)),al.set(`easeInQuad`,e=>e*e),al.set(`easeOutQuad`,e=>1-(1-e)*(1-e)),al.set(`easeInOutQuad`,e=>e<.5?2*e*e:1-(-2*e+2)**2/2),al.set(`easeInCubic`,e=>e*e*e),al.set(`easeOutCubic`,e=>1-(1-e)**3),al.set(`easeInOutCubic`,e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2),al.set(`easeOutBack`,e=>1+2.70158*(e-1)**3+1.70158*(e-1)**2),al.set(`easeInOutBack`,e=>{let t=2.5949095;return e<.5?(2*e)**2*(7.189819*e-t)/2:((2*e-2)**2*(3.5949095*(e*2-2)+t)+2)/2});function ol(e){return Array.isArray(e)&&e.length===4&&e.every(e=>typeof e==`number`)}function sl(e){return typeof e==`function`?cl(e):ol(e)?il(e[0],e[1],e[2],e[3]):typeof e==`string`&&al.has(e)?cl(al.get(e)):rl}function cl(e){return t=>{let n=e(t);return typeof n==`number`&&isFinite(n)?n:t}}function ll(e,t){let n=new Set(e.exits),r=[],i=0;for(let t=0;t<e.toOld.length;t++){let a=e.toOld[t];if(a!==-1){for(;i<a;)n.has(i)&&r.push({oldJ:i,newJ:-1}),i++;r.push({oldJ:a,newJ:t}),i=a+1}else r.push({oldJ:-1,newJ:t})}for(;i<t;)n.has(i)&&r.push({oldJ:i,newJ:-1}),i++;return r}function ul(e,t,n){if(!e||typeof e!=`string`)return null;let r=Ja(e);if(!r.length||r[0][0]!==`M`)return null;for(let e=1;e<r.length;e++)if(r[e][0]===`M`)return null;let i=r,a=null;if(n){if(r.length<5||(a=r.slice(-3),i=r.slice(0,-3),a[2][0]!==`Z`)||a[1][0]!==`L`||a[0][0]!==`L`&&a[0][0]!==`C`)return null}else if(r[r.length-1][0]===`Z`)return null;if(i.length!==t||i.length<2)return null;let o=i[1][0];if(o!==`L`&&o!==`C`)return null;for(let e=2;e<i.length;e++)if(i[e][0]!==o)return null;let s=i.map(e=>e[0]===`C`?[Number(e[5]),Number(e[6])]:[Number(e[1]),Number(e[2])]);for(let e of s)if(!isFinite(e[0])||!isFinite(e[1]))return null;return{body:i,closing:a,segType:o,anchors:s}}function dl(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function fl(e,t,n){let r=e,i=[t[1],t[2]],a=[t[3],t[4]],o=[t[5],t[6]],s=dl(r,i,n),c=dl(i,a,n),l=dl(a,o,n),u=dl(s,c,n),d=dl(c,l,n),f=dl(u,d,n);return{first:[`C`,s[0],s[1],u[0],u[1],f[0],f[1]],second:[`C`,d[0],d[1],l[0],l[1],o[0],o[1]],mid:f}}function pl(e,t,n){let r=[t[1],t[2]],i=dl(e,r,n);return{first:[`L`,i[0],i[1]],second:[`L`,r[0],r[1]],mid:i}}function ml(e,t){let{body:n,closing:r,segType:i,anchors:a}=e,o=a.length,s=t.length,c=e=>i===`C`?[`C`,e[0],e[1],e[0],e[1],e[0],e[1]]:[`L`,e[0],e[1]],l=[[`M`,a[0][0],a[0][1]]],u=0;for(;u<s&&t[u]!==0;)u++;for(let e=1;e<=u;e++)l.push(c(a[0]));let d=u+1;for(let e=0;e<o-1;e++){let r=0;for(;d+r<s&&t[d+r]===-1;)r++;let o=n[e+1];if(!r)l.push(o.slice());else{let t=r+1,n=a[e],s=o;for(let e=0;e<r;e++){let r=1/(t-e),a=i===`C`?fl(n,s,r):pl(n,s,r);l.push(a.first),n=a.mid,s=a.second}l.push(s)}d+=r+1}for(;d<s;)l.push(c(a[o-1])),d++;return r&&r.forEach(e=>l.push(e.slice())),l}function hl(e,t,n,r,i,a){let o=ul(e,r,a);if(!o)return null;let s=ul(t,i,a);if(!s||o.segType!==s.segType||(o.closing||s.closing)&&(!o.closing||!s.closing||o.closing[0][0]!==s.closing[0][0]))return null;let c=n.map(e=>e.oldJ),l=n.map(e=>e.newJ);return{from:Za(ml(o,c)),toInterp:Za(ml(s,l))}}function gl(e){let t=e.config.chart.animations;if(!t||t.enabled===!1||!t.dynamicAnimation||t.dynamicAnimation.enabled===!1)return!1;let n=t.largeDatasetThreshold??0;return n>0&&e.globals.dataPoints>n?!1:!!(Z.isBrowser()&&e.globals.dataChanged&&e.globals.shouldAnimate)}function _l(e,t,n){if(e.axisFlags?.isXNumeric){let r=e.seriesData?.seriesX?.[t];if(r&&r.length&&r[n]!=null)return`x:`+r[n]}let r=e.globals.labels?.[n];return r!=null&&String(r)!==``?`c:`+(Array.isArray(r)?r.join(` `):String(r)):`j:`+n}function vl(e,t,n){if(e.isXNumeric){let r=e.seriesX?.[t];if(r&&r.length&&r[n]!=null)return`x:`+r[n]}let r=e.labels?.[n];return r!=null&&String(r)!==``?`c:`+(Array.isArray(r)?r.join(` `):String(r)):`j:`+n}function yl(e,t){let n=new Map;e.forEach((e,t)=>{n.has(e)||n.set(e,t)});let r=Array(t.length),i=new Set,a=-1,o=!0,s=e.length===t.length;t.forEach((e,t)=>{let c=n.has(e)&&!i.has(n.get(e))?n.get(e):-1;r[t]=c,c!==-1&&(i.add(c),c<a&&(o=!1),a=c),c!==t&&(s=!1)});let c=[];for(let t=0;t<e.length;t++)i.has(t)||c.push(t);return{toOld:r,exits:c,ordered:o,changed:!s}}function bl(e){let t=new Map;return e.map(e=>{let n=t.get(e)||0;return t.set(e,n+1),n===0?e:`${e}#${n}`})}function xl(e,t,n=!1,r=!1){if(!gl(e))return null;let i=e.globals.prevStreamFrame;if(!i)return null;let a=i.seriesY?.[t],o=e.seriesData.series?.[t];if(!Array.isArray(a)||!Array.isArray(o)||!a.length||!o.length)return null;let s=bl(a.map((e,n)=>vl(i,t,n))),c=bl(o.map((n,r)=>_l(e,t,r))),l=yl(s,c);return!l.ordered&&!r||!l.changed&&!n?null:{join:l,oldKeys:s,newKeys:c}}function Sl(e){let t=e.config.chart.animations;return sl(t.dynamicAnimation?.easing??t.easing)}function Cl(e,t,n,r,i){let a=performance.now(),o=s=>{if(e.globals.isDestroyed)return;let c=Math.max(0,Math.min(1,(s-a)/t));r(n(c),c),c<1?X.requestAnimationFrame(o):i&&i()};X.requestAnimationFrame(o)}function wl(e,{elPointsMain:t,realIndex:n,speed:r}){if(!t?.node)return!1;let i=xl(e,n,!0);if(!i)return!1;let a=e.globals.prevStreamFrame;if(!a)return!1;let o=a.xPixels?.[n],s=a.yPixels?.[n];if(!o||!s)return!1;let c=t.node.querySelectorAll(`.apexcharts-marker`);if(!c.length)return!1;let l=e.globals.seriesXvalues?.[n]||[],u=e.globals.seriesYvalues?.[n]||[],d=Sl(e),f=Math.max(1,r||1);return t.node.classList.remove(`apexcharts-element-hidden`),c.forEach(t=>{let r=parseInt(t.getAttribute(`j`)??t.getAttribute(`rel`)??``,10);if(!isFinite(r)||r<0||r>=i.join.toOld.length)return;let c=i.join.toOld[r],p=l[r]!=null&&u[r]!=null?[l[r],u[r]]:null;if(c===-1||!p){let n=t.style;n.opacity=`0`,Cl(e,f,d,e=>{n.opacity=String(e)},()=>{n.opacity=``});return}let m=(o[c]??NaN)-p[0],h=(s[c]??NaN)-p[1];if(!isFinite(m)||!isFinite(h))return;let g=a.rPixels?.[n]?.[c]??NaN,_=parseFloat(t.getAttribute(`r`)??t.getAttribute(`default-marker-size`)??``),v=isFinite(g)&&isFinite(_)&&_>0&&Math.abs(g-_)>.25;if(!(Math.abs(m)>=.5||Math.abs(h)>=.5)&&!v)return;let y=e=>{let n=m*(1-e),r=h*(1-e);if(v){let i=(g+(_-g)*e)/_;t.setAttribute(`transform`,`translate(${n+p[0]*(1-i)}, ${r+p[1]*(1-i)}) scale(${i})`)}else t.setAttribute(`transform`,`translate(${n}, ${r})`)};y(0),Cl(e,f,d,y,()=>{t.removeAttribute(`transform`)})}),!0}function Tl(e,{type:t,realIndex:n,pathFromLine:r,pathFromArea:i,linePaths:a,areaPaths:o}){let s=xl(e,n);if(!s)return null;let{join:c,oldKeys:l,newKeys:u}=s,d=e.globals.prevStreamFrame;if(!d)return null;let f=d.seriesY?.[n],p=e.seriesData.series?.[n];if(f.length<2||p.length<2||f.some(e=>e===null)||p.some(e=>e===null))return null;let m=ll(c,l.length),h={};return Array.isArray(a)&&a.length===1&&r&&(h.line=hl(r,a[0],m,l.length,u.length,!1)),t===`area`&&Array.isArray(o)&&o.length===1&&i&&(h.area=hl(i,o[0],m,l.length,u.length,!0)),!h.line&&!h.area?null:h}function El(e){let t=/^M\s*([+-]?[\d.eE]+)[\s,]+([+-]?[\d.eE]+)/.exec(e||``);if(!t)return null;let n=parseFloat(t[1]),r=parseFloat(t[2]);return isFinite(n)&&isFinite(r)?{x:n,y:r}:null}function Dl({w:e,elSeries:t,record:n,newKeys:r,isHorizontal:i,speed:a}){if(!gl(e)||!n||!Array.isArray(n.paths)||!t?.node)return;let o=new Set(r),s=n.paths.filter(e=>e&&e.d&&e.key!=null&&!o.has(e.key));if(!s.length)return;let c=new J(e),l=e.globals.colors?.[parseInt(String(n.realIndex),10)];s.forEach(n=>{let r=n.fill||l||`#c8c8c8`;String(r).indexOf(`url(`)===0&&(r=l||`#c8c8c8`);let o=c.drawPath({d:n.d,stroke:`none`,strokeWidth:0,fill:r,fillOpacity:1,classes:`apexcharts-bar-ghost`}),s=o.node;s.setAttribute(`pointer-events`,`none`),o.attr(`clip-path`,`url(#gridRectBarMask${e.globals.cuid})`),t.node.insertBefore(s,t.node.firstChild);let u=El(n.d),d=i?`left center`:`center bottom`;try{let e=s.getBBox();u&&e&&(d=i?Math.abs(u.x-e.x)<=Math.abs(u.x-(e.x+e.width))?`left center`:`right center`:Math.abs(u.y-(e.y+e.height))<=Math.abs(u.y-e.y)?`center bottom`:`center top`)}catch{}let f=s.style;f.transformBox=`fill-box`,f.transformOrigin=d;let p=Math.max(1,a||1),m=performance.now(),h=t=>{if(e.globals.isDestroyed||!s.parentNode)return;let n=Math.max(0,Math.min(1,(t-m)/p)),r=1-(1-n)**3,a=1-r;f.transform=i?`scaleX(${a})`:`scaleY(${a})`,f.opacity=String(1-r),n<1?X.requestAnimationFrame(h):s.parentNode.removeChild(s)};X.requestAnimationFrame(h)})}var Ol=class{constructor(e){this.w=e.w,this.barCtx=e,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||=this.w.config.dataLabels.formatter}handleBarDataLabels(e){let{x:t,y:n,y1:r,y2:i,i:a,j:o,realIndex:s,columnGroupIndex:c,series:l,barHeight:u,barWidth:d,barXPosition:f,barYPosition:p,visibleSeries:m}=e,h=this.w,g=new J(this.barCtx.w),_=h.waterfallData&&h.waterfallData.values,v=_&&_[s]&&_[s][o]!=null?_[s][o]:null,y=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[s]:this.barCtx.strokeWidth,b,x;h.axisFlags.isXNumeric&&!h.globals.isBarHorizontal?(b=t+d*(m+1),x=n+u*(m+1)-y):(b=t+d*m,x=n+u*m);let S=null,C=null,w=t,T=n,E={},D=h.config.dataLabels,O=this.barCtx.barOptions.dataLabels,k=this.barCtx.barOptions.dataLabels.total;p!==void 0&&(this.barCtx.isRangeBar||this.barCtx.isPyramid)&&(x=p,T=p),f!==void 0&&this.barCtx.isVerticalGroupedRangeBar&&(b=f,w=f);let A=nl(D.offsetX,h,s,o),j=nl(D.offsetY,h,s,o),M={width:0,height:0};if(h.config.dataLabels.enabled){let e=v===null?h.seriesData.series[s][o]:v;M=g.getTextRects(h.config.dataLabels.formatter?h.config.dataLabels.formatter(e,q(K({},h),{seriesIndex:s,dataPointIndex:o,w:h})):h.formatters.yLabelFormatters[0](e),parseFloat(D.style.fontSize).toString(),D.style.fontFamily,void 0,!0,D.style.fontWeight)}let N={x:t,y:n,i:a,j:o,realIndex:s,columnGroupIndex:c,bcx:b,bcy:x,barHeight:u,barWidth:d,textRects:M,strokeWidth:y,dataLabelsX:w,dataLabelsY:T,dataLabelsConfig:D,barDataLabelsConfig:O,barTotalDataLabelsConfig:k,offX:A,offY:j};if(E=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(N):this.calculateColumnsDataLabelsPosition(N),v!==null&&this.barCtx.isHorizontal&&O.position===`center`){let e=h.waterfallData.geometry?.[s]?.[o];e&&e.horizontal&&(E.dataLabelsX=(e.levelStart+e.levelEnd)/2+A)}return S=this.drawCalculatedDataLabels({x:E.dataLabelsX,y:E.dataLabelsY,val:v===null?this.barCtx.isRangeBar?[r,i]:h.config.chart.stackType===`100%`?l[s][o]:h.seriesData.series[s][o]:v,i:s,j:o,barWidth:d,barHeight:u,textRects:M,dataLabelsConfig:D}),h.config.chart.stacked&&k.enabled&&(C=this.drawTotalDataLabels({x:E.totalDataLabelsX,y:E.totalDataLabelsY,barWidth:d,barHeight:u,realIndex:s,j:o,textAnchor:E.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:s,j:o}),rawVal:this.getStackedTotalValue({realIndex:s,j:o}),dataLabelsConfig:D,barTotalDataLabelsConfig:k})),{dataLabelsPos:E,dataLabels:S,totalDataLabels:C}}hasMultipleSeriesGroups(){return this.w.labelData.seriesGroups.length>1}getTotalGroupContext(e){if(!this.hasMultipleSeriesGroups())return null;let t=this.barCtx.barHelpers.getSeriesGroupIndex(e);return t<0?null:{groupIndex:t,group:this.w.labelData.seriesGroups[t]}}drawsStackedTotal(e){let t=this.barCtx.lastActiveBarSerieIndexByGroup,n=this.getTotalGroupContext(e);return n&&t&&t.length>n.groupIndex?t[n.groupIndex]===e:this.barCtx.lastActiveBarSerieIndex===e}getStackedTotalValue({realIndex:e,j:t}){let n=this.w,r=this.getTotalGroupContext(e),i=n.seriesData.stackedSeriesTotalsByGroups;return r&&i&&i[r.groupIndex]?i[r.groupIndex][t]:this.barCtx.stackedSeriesTotals[t]}getStackedTotalDataLabel({realIndex:e,j:t}){let n=this.w,r=this.getStackedTotalValue({realIndex:e,j:t});return this.totalFormatter&&(r=this.totalFormatter(r,q(K({},n),{seriesIndex:e,dataPointIndex:t,w:n}))),r}calculateColumnsDataLabelsPosition(e){let t=this.w,{i:n,j:r,realIndex:i,y:a,bcx:o,barWidth:s,barHeight:c,textRects:l,dataLabelsX:u,dataLabelsY:d,dataLabelsConfig:f,barDataLabelsConfig:p,barTotalDataLabelsConfig:m,strokeWidth:h,offX:g,offY:_}=e,v,y,b=o;c=Math.abs(c);let x=t.config.plotOptions.bar.dataLabels.orientation===`vertical`,{zeroEncounters:S}=this.barCtx.barHelpers.getZeroValueEncounters({i:n,j:r});o-=h/2;let C=t.layout.gridWidth/t.globals.dataPoints;this.barCtx.isVerticalGroupedRangeBar?u+=s/2:(u=t.axisFlags.isXNumeric?o-s/2+g:o-C+s/2+g,!t.config.chart.stacked&&S>0&&t.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(u-=s*S)),x&&(u=u+l.height/2-h/2-2);let w=t.seriesData.series[n][r]<0,T=a;switch(this.barCtx.isReversed&&(T=a+(w?c:-c)),p.position){case`center`:d=x?w?T-c/2+_:T+c/2-_:w?T-c/2+l.height/2+_:T+c/2+l.height/2-_;break;case`bottom`:d=x?w?T-c+_:T+c-_:w?T-c+l.height+h+_:T+c-l.height/2+h-_;break;case`top`:d=x?w?T+_:T-_:w?T-l.height/2-_:T+l.height+_}let E=T,D=this.getTotalGroupContext(i);if((D?[D.group]:t.labelData.seriesGroups).forEach(e=>{var t;(t=this.barCtx[e.join(`,`)])==null||t.prevY.forEach(e=>{E=w?Math.max(e[r],E):Math.min(e[r],E)})}),this.drawsStackedTotal(i)&&m.enabled){let e=new J(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:i,j:r}),f.fontSize);v=w?E-e.height/2-_-m.offsetY+18:E+e.height+_+m.offsetY-18;let n=C;y=b+(t.axisFlags.isXNumeric?-s/2:s/2-n)+m.offsetX}return t.config.chart.stacked||(d<0?d=0+h:d+l.height/3>t.layout.gridHeight&&(d=t.layout.gridHeight-h)),{bcx:o,bcy:a,dataLabelsX:u,dataLabelsY:d,totalDataLabelsX:y,totalDataLabelsY:v,totalDataLabelsAnchor:`middle`}}calculateBarsDataLabelsPosition(e){let t=this.w,{x:n,i:r,j:i,realIndex:a,bcy:o,barHeight:s,barWidth:c,textRects:l,dataLabelsX:u,strokeWidth:d,dataLabelsConfig:f,barDataLabelsConfig:p,barTotalDataLabelsConfig:m,offX:h,offY:g}=e,_=t.layout.gridHeight/t.globals.dataPoints,{zeroEncounters:v}=this.barCtx.barHelpers.getZeroValueEncounters({i:r,j:i});c=Math.abs(c);let y;if(this.barCtx.isPyramid){let e=l.centerOffset??0;y=o+s/2+g-e}else y=o-(this.barCtx.isRangeBar?0:_)+s/2+l.height/2+g-3;!t.config.chart.stacked&&v>0&&t.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(y-=s*v);let b,x,S=`start`,C=t.seriesData.series[r][i]<0,w=n;if(this.barCtx.isReversed&&(w=n+(C?-c:c),S=C?`start`:`end`),this.barCtx.isPyramid)u=t.layout.gridWidth/2+h;else switch(p.position){case`center`:u=C?w+c/2-h:Math.max(l.width/2,w-c/2)+h;break;case`bottom`:u=C?w+c-d-h:w-c+d+h;break;case`top`:u=C?w-d-h:w-d+h}let T=w,E=this.getTotalGroupContext(a);if((E?[E.group]:t.labelData.seriesGroups).forEach(e=>{var t;(t=this.barCtx[e.join(`,`)])==null||t.prevX.forEach(e=>{T=C?Math.min(e[i],T):Math.max(e[i],T)})}),this.drawsStackedTotal(a)&&m.enabled){let e=new J(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:a,j:i}),f.fontSize);C?(b=T-d-h-m.offsetX,S=`end`):b=T+h+m.offsetX+(this.barCtx.isReversed?-(c+d):d),x=y-l.height/2+e.height/2+m.offsetY+d,t.globals.barGroups.length>1&&!E&&(x-=t.globals.barGroups.length/2*(s/2))}if(!t.config.chart.stacked){let e=C&&f.textAnchor!==`middle`?f.textAnchor===`start`?`end`:`start`:f.textAnchor,n;n=p.orientation===`vertical`?l.height/2:e===`end`?l.width:e===`middle`?l.width/2:0;let r=(p.orientation===`vertical`?l.height:l.width)-n;u+r>t.layout.gridWidth-d&&(u=t.layout.gridWidth-r-d),u-n<d&&(u=n+d)}return{bcx:n,bcy:o,dataLabelsX:u,dataLabelsY:y,totalDataLabelsX:b,totalDataLabelsY:x,totalDataLabelsAnchor:S}}drawCalculatedDataLabels({x:e,y:t,val:n,i:r,j:i,textRects:a,barHeight:o,barWidth:s,dataLabelsConfig:c}){let l=this.w,u=`rotate(0)`;l.config.plotOptions.bar.dataLabels.orientation===`vertical`&&(u=`rotate(-90, ${e}, ${t})`);let d=new ca(this.barCtx.w,this.barCtx.ctx),f=new J(this.barCtx.w),p=c.formatter,m=null,h=l.globals.collapsedSeriesIndices.indexOf(r)>-1,g=(l.globals.collapsingSeriesIndices||[]).indexOf(r)>-1;if(g){let e=l.globals.prevDataLabels?.get(`${r}::${_l(l,r,i)}`);e&&isFinite(e.val)&&(n=e.val)}if(c.enabled&&(!h||g)){m=f.group({class:`apexcharts-data-labels`,transform:u});let h=l.config.dataLabels;(h.animate?.enabled||h.countUp?.enabled)&&(m.node.setAttribute(`data:dlKey`,`${r}::${_l(l,r,i)}`),m.node.setAttribute(`data:dlJ`,String(i)),typeof n==`number`&&isFinite(n)&&m.node.setAttribute(`data:dlVal`,String(n)));let _=``;n!==void 0&&(_=p(n,q(K({},l),{seriesIndex:r,dataPointIndex:i,w:l}))),!n&&l.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(_=``);let v=l.seriesData.series[r][i]<0,y=l.config.plotOptions.bar.dataLabels.position;l.config.plotOptions.bar.dataLabels.orientation===`vertical`&&(y===`top`&&(c.textAnchor=v?`end`:`start`),y===`center`&&(c.textAnchor=`middle`),y===`bottom`&&(c.textAnchor=v?`end`:`start`)),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&s<f.getTextRects(_,parseFloat(c.style.fontSize).toString()).width&&(_=``),l.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&!g&&(this.barCtx.isHorizontal?a.width/1.6>Math.abs(s)&&(_=``):a.height/1.6>Math.abs(o)&&(_=``));let b=K({},c);this.barCtx.isHorizontal&&n<0&&(c.textAnchor===`start`?b.textAnchor=`end`:c.textAnchor===`end`&&(b.textAnchor=`start`)),d.plotDataLabelsText({x:e,y:t,text:_,i:r,j:i,parent:m,dataLabelsConfig:b,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return m}drawTotalDataLabels({x:e,y:t,val:n,rawVal:r,realIndex:i,j:a,textAnchor:o,barTotalDataLabelsConfig:s}){let c=new J(this.barCtx.w),l;if(s.enabled&&e!==void 0&&t!==void 0&&this.drawsStackedTotal(i)){l=c.drawText({x:e,y:t,foreColor:s.style.color,text:n,textAnchor:o,fontFamily:s.style.fontFamily,fontSize:s.style.fontSize,fontWeight:s.style.fontWeight}),l.attr({class:`apexcharts-datalabel-total`,cx:e,cy:t});let u=this.w.config.dataLabels;if(u.animate?.enabled||u.countUp?.enabled){let{groupIndex:e}=this.barCtx.barHelpers.getGroupIndex(i);l.node.setAttribute(`data:dlTotalKey`,`${e}::${_l(this.w,i,a)}`),l.node.setAttribute(`data:dlTotalSeries`,String(i)),typeof r==`number`&&isFinite(r)&&l.node.setAttribute(`data:dlTotalVal`,String(r))}}return l}};function kl(e){return e?.config?.chart?.requestedType!==`histogram`||e.config.plotOptions?.histogram?.overlap===!1?!1:(e.seriesData?.series?.length??0)>1}var Al=class{constructor(e){this.w=e.w,this.barCtx=e}initVariables(e){let t=this.w;this.barCtx.series=e,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(let n=0;n<e.length;n++)if(e[n].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=e[n].length),t.axisFlags.isXNumeric)for(let r=0;r<e[n].length;r++)t.seriesData.seriesX[n][r]>t.globals.minX&&t.seriesData.seriesX[n][r]<t.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=t.globals.dataPoints;this.arrBorderRadius=this.createBorderRadiusArr(t.seriesData.series),Q.isSafari()&&(this.arrBorderRadius=this.arrBorderRadius.map(e=>e.map(e=>`none`))),this.barCtx.seriesLen===0&&(this.barCtx.seriesLen=1)}barSlotXSpan(){let e=this.w;if(this._slotXSpan!==void 0)return this._slotXSpan;let t=0;if(e.globals.dataPoints<=1){let n=e.globals.maxX-e.globals.minX;t=n>0?n/4:0}else if(t=this._unionMinXGap(),!(t>0)||!isFinite(t)){let n=e.globals.minXDiff;t=n>0&&isFinite(n)&&n!==.5?n:0}return this._slotXSpan=t,t}_unionMinXGap(){let e=this.w.seriesData.seriesX||[],t=[];for(let n=0;n<e.length;n++){let r=e[n];Array.isArray(r)&&r.length>0&&t.push(r)}if(!t.length)return 0;let n=Array(t.length).fill(0),r=NaN,i=1/0;for(;;){let e=1/0,a=-1;for(let r=0;r<t.length;r++){let i=t[r];for(;n[r]<i.length&&typeof i[n[r]]!=`number`;)n[r]++;if(n[r]>=i.length)continue;let o=i[n[r]];if(o!==o){n[r]++,r--;continue}o<e&&(e=o,a=r)}if(a===-1)break;if(n[a]++,r===r){let t=e-r;t>0&&t<i&&(i=t)}r=e}return isFinite(i)?i:0}initialPositions(e){let t=this.w,n,r,i,a,o,s,c,l,u=t.globals.dataPoints;this.barCtx.isRangeBar&&(u=t.labelData.labels.length);let d=this.barCtx.seriesLen;if((t.config.plotOptions.bar.rangeBarGroupRows||kl(t))&&(d=1),this.barCtx.isHorizontal)i=t.layout.gridHeight/u,o=i/d,t.axisFlags.isXNumeric&&(i=t.layout.gridHeight/this.barCtx.totalItems,o=i/this.barCtx.seriesLen),o=o*parseInt(this.barCtx.barOptions.barHeight,10)/100,String(this.barCtx.barOptions.barHeight).indexOf(`%`)===-1&&(o=parseInt(this.barCtx.barOptions.barHeight,10)),l=this.barCtx.baseLineInvertedY+t.globals.padHorizontal+(this.barCtx.isReversed?t.layout.gridWidth:0)-(this.barCtx.isReversed?this.barCtx.baseLineInvertedY*2:0),this.barCtx.isFunnel&&(l=t.layout.gridWidth/2),r=(i-o*this.barCtx.seriesLen)/2;else{if(a=t.layout.gridWidth/this.barCtx.visibleItems,t.config.xaxis.convertedCatToNumeric&&(a=t.layout.gridWidth/t.globals.dataPoints),s=a/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100,t.axisFlags.isXNumeric){let e=this.barCtx.xRatio,t=this.barSlotXSpan();t>0&&t/e>0&&(a=t/e),s=a/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100,s<1&&(s=1)}String(this.barCtx.barOptions.columnWidth).indexOf(`%`)===-1&&(s=parseInt(this.barCtx.barOptions.columnWidth,10)),c=t.layout.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?t.layout.gridHeight:0)+(this.barCtx.isReversed?this.barCtx.baseLineY[this.barCtx.translationsIndex]*2:0),n=t.axisFlags.isXNumeric?this.barCtx.getBarXForNumericXAxis({x:n,j:0,realIndex:e,barWidth:s}).x:t.globals.padHorizontal+Q.noExponents(a-s*this.barCtx.seriesLen)/2}return t.globals.barHeight=o,t.globals.barWidth=s,{x:n,y:r,yDivision:i,xDivision:a,barHeight:o,barWidth:s,zeroH:c,zeroW:l}}initializeStackedPrevVars(e){e.w.labelData.seriesGroups.forEach(t=>{e[t]||(e[t]={}),e[t].prevY=[],e[t].prevX=[],e[t].prevYF=[],e[t].prevXF=[],e[t].prevYVal=[],e[t].prevXVal=[]})}initializeStackedXYVars(e){e.w.labelData.seriesGroups.forEach(t=>{e[t]||(e[t]={}),e[t].xArrj=[],e[t].xArrjF=[],e[t].xArrjVal=[],e[t].yArrj=[],e[t].yArrjF=[],e[t].yArrjVal=[]})}getPathFillColor(e,t,n,r){let i=this.w,a=new ua(this.barCtx.w),o=null,s=this.barCtx.barOptions.distributed?n:t,c=!1;this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(r=>{e[t][n]>=r.from&&e[t][n]<=r.to&&(o=r.color,c=!0)});let l=this.getDumbbellConnectorFill(t,n)||i.config.series[t].data[n]?.fill,u=this.barCtx.barOptions.isDumbbell?i.config.plotOptions.bar.dumbbell.connector:null,d;return u&&u.color&&(o=u.color,d=u.opacity),{color:a.fillPath({seriesNumber:this.barCtx.barOptions.distributed?s:r,dataPointIndex:n,color:o,opacity:d,value:e[t][n],fillConfig:l,fillType:l?.type?l.type:Array.isArray(i.config.fill.type)?i.config.fill.type[r]:i.config.fill.type}),useRangeColor:c}}getDumbbellConnectorFill(e,t){let n=this.w;if(!this.barCtx.barOptions.isDumbbell)return null;let r=n.dumbbellData;if(!r||r.form!==`series`)return null;let i=n.config.plotOptions.bar.dumbbell.connector;if(i.color)return null;let a=r.order[t];if(!a)return null;let o=n.globals.colors[a[0]],s=n.globals.colors[a[1]];return!o||!s?null:{type:`gradient`,gradient:{type:this.barCtx.isHorizontal?`horizontal`:`vertical`,gradientFrom:o,gradientTo:s,opacityFrom:i.opacity,opacityTo:i.opacity,stops:[0,100],inverseColors:!this.barCtx.isHorizontal}}}getStrokeWidth(e,t,n){let r=0,i=this.w;return this.barCtx.series[e][t]===void 0||this.barCtx.series[e][t]===null||i.config.chart.type===`bar`&&!this.barCtx.series[e][t]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,i.config.stroke.show&&(this.barCtx.isNullValue||(r=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[n]:this.barCtx.strokeWidth)),r}getStackedSeriesIndices(e){let t=this.w.labelData.seriesGroups;if(!t||t.length<2)return[Array.from({length:e},(e,t)=>t)];let n=Array.from({length:t.length},()=>[]),r=[];for(let t=0;t<e;t++){let e=this.getSeriesGroupIndex(t);e>-1?n[e].push(t):r.push(t)}return r.length&&n.push(r),n.filter(e=>e.length>0)}createBorderRadiusArr(e){let t=this.w,n=!this.w.config.chart.stacked||t.config.plotOptions.bar.borderRadius<=0,r=e.length,i=e[0]?.length|0,a=Array.from({length:r},()=>Array(i).fill(n?`top`:`none`));if(n)return a;let o=this.w.config.chart.type===`bar`&&i===1,s=o?`top`:`both`,c=o?`top`:`bottom`;for(let t of this.getStackedSeriesIndices(r))for(let n=0;n<i;n++){let r=[],i=[];for(let a of t){let t=e[a][n];t>0?r.push(a):t<0&&i.push(a)}if(r.length>0&&i.length===0){if(r.length===1)a[r[0]][n]=s;else{let e=r[0],t=r[r.length-1];for(let i of r)a[i][n]=i===e?c:i===t?`top`:`none`}}else if(i.length>0&&r.length===0){if(i.length===1)a[i[0]][n]=`both`;else{let e=Math.max(...i),t=Math.min(...i);for(let r of i)a[r][n]=r===e?`bottom`:r===t?`top`:`none`}}else if(r.length>0&&i.length>0){let e=r[r.length-1];for(let t of r)a[t][n]=t===e?`top`:`none`;let t=Math.max(...i);for(let e of i)a[e][n]=e===t?`bottom`:`none`}}return a}barBackground({j:e,i:t,x1:n,x2:r,y1:i,y2:a,elSeries:o}){let s=this.w,c=new J(this.barCtx.w),l=new Y(this.barCtx.w).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&l===t){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);let t=this.barCtx.barOptions.colors.backgroundBarColors[e],l=c.drawRect(n===void 0?0:n,i===void 0?0:i,r===void 0?s.layout.gridWidth:r,a===void 0?s.layout.gridHeight:a,this.barCtx.barOptions.colors.backgroundBarRadius,t,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(l),l.node.classList.add(`apexcharts-backgroundBar`)}}getColumnPaths({barWidth:e,barXPosition:t,y1:n,y2:r,strokeWidth:i,isReversed:a,series:o,seriesGroup:s,realIndex:c,i:l,j:u,w:d}){let f=new J(this.barCtx.w);i=Array.isArray(i)?i[c]:i,i||=0;let p=e,m=t;d.config.series[c].data[u]?.columnWidthOffset&&(m=t-d.config.series[c].data[u].columnWidthOffset/2,p=e+d.config.series[c].data[u].columnWidthOffset);let h=i/2,g=m+h,_=m+p-h,v=(o[l][u]>=0?1:-1)*(a?-1:1);n+=.001-h*v,r+=.001+h*v;let y=f.line(_,n),b=d.config.plotOptions.bar.borderRadiusApplication===`around`||this.arrBorderRadius[c][u]===`both`?` Z`:` z`,x=f.move(g,n)+f.line(g,r)+f.line(_,r)+y+b,S=x;this.arrBorderRadius[c][u]!==`none`&&(S=f.roundPathCorners(S,d.config.plotOptions.bar.borderRadius));let C=null,w=(this.barCtx.ctx?.morphTypeChange)?.getInitialPathFor(c,u);if(w?C=w:d.globals.previousPaths.length>0&&(C=this.barCtx.getPreviousPath(c,u,S,x)),C??=f.move(g,n)+f.line(g,n)+y+y+y+y+y+f.line(g,n)+b,d.config.chart.stacked){let e=this.barCtx;e=this.barCtx[s],e.yArrj.push(r-h*v),e.yArrjF.push(Math.abs(n-r+i*v)),e.yArrjVal.push(this.barCtx.series[l][u])}return{pathTo:S,pathFrom:C,drawnBox:{x1:g,x2:_,y1:n,y2:r}}}getFunnelTrapezoidPaths({barYPosition:e,barHeight:t,series:n,i:r,j:i,realIndex:a,strokeWidth:o,w:s}){let c=new J(this.barCtx.w),l=s.layout.gridWidth/2,u=e=>Math.abs(e/this.barCtx.invertedYRatio)/2,d=u(n[r][i]),f=i===n[r].length-1,p=s.config.plotOptions.funnel.lastShape===`taper`?`taper`:`flat`,m;m=f?p===`taper`?0:d:u(n[r][i+1]);let h=o/2,g=e+h,_=e+t-h,v=l-d,y=l+d,b=l-m,x=l+m,S=c.move(v,g)+c.line(y,g)+c.line(x,_)+c.line(b,_)+` Z`,C=null,w=(this.barCtx.ctx?.morphTypeChange)?.getInitialPathFor(a,i);return w?C=w:s.globals.previousPaths.length>0&&(C=this.barCtx.getPreviousPath(a,i,S)),C??=c.move(l,g)+c.line(l,g)+c.line(l,_)+c.line(l,_)+` Z`,{pathTo:S,pathFrom:C,x:y,x1:v,barXPosition:l}}computePyramidLayout(e){let t=this.w,n=t.layout.gridHeight,r=t.layout.gridWidth,i=e.map(e=>Math.abs(Number(e)||0)),a=i.reduce((e,t)=>e+t,0);if(a===0||n<=0)return i.map(()=>({y:0,height:0,topHalf:0,bottomHalf:0}));let o=r/2,s=0,c=[];for(let e=0;e<i.length;e++){let t=s/a;s+=i[e];let r=s/a,l=t*n,u=r*n;c.push({y:l,height:u-l,topHalf:t*o,bottomHalf:r*o})}return c}getPyramidPaths({barYPosition:e,barHeight:t,topHalf:n,bottomHalf:r,realIndex:i,j:a,strokeWidth:o,w:s}){let c=new J(this.barCtx.w),l=s.layout.gridWidth/2,u=o/2,d=e+u,f=e+t-u,p=l-n,m=l+n,h=l-r,g=l+r,_=c.move(p,d)+c.line(m,d)+c.line(g,f)+c.line(h,f)+` Z`,v=null,y=(this.barCtx.ctx?.morphTypeChange)?.getInitialPathFor(i,a);return y?v=y:s.globals.previousPaths.length>0&&(v=this.barCtx.getPreviousPath(i,a,_)),v??=c.move(l,d)+c.line(l,d)+c.line(l,f)+c.line(l,f)+` Z`,{pathTo:_,pathFrom:v,x:m,x1:p,barXPosition:l}}getBarpaths({barYPosition:e,barHeight:t,x1:n,x2:r,strokeWidth:i,isReversed:a,series:o,seriesGroup:s,realIndex:c,i:l,j:u,w:d}){let f=new J(this.barCtx.w);i=Array.isArray(i)?i[c]:i,i||=0;let p=e,m=t;d.config.series[c].data[u]?.barHeightOffset&&(p=e-d.config.series[c].data[u].barHeightOffset/2,m=t+d.config.series[c].data[u].barHeightOffset);let h=i/2,g=p+h,_=p+m-h,v=(o[l][u]>=0?1:-1)*(a?-1:1);n+=.001+h*v,r+=.001-h*v;let y=this.barCtx.isFunnel,b=y?(n+r)/2:n,x=f.line(n,_),S=d.config.plotOptions.bar.borderRadiusApplication===`around`||this.arrBorderRadius[c][u]===`both`?` Z`:` z`,C=f.move(n,g)+f.line(r,g)+f.line(r,_)+x+S,w=C;this.arrBorderRadius[c][u]!==`none`&&(w=f.roundPathCorners(w,d.config.plotOptions.bar.borderRadius));let T=null,E=(this.barCtx.ctx?.morphTypeChange)?.getInitialPathFor(c,u);if(E?T=E:d.globals.previousPaths.length>0&&(T=this.barCtx.getPreviousPath(c,u,w,C)),T==null){let e=y?f.line(b,_):x;T=f.move(b,g)+f.line(b,g)+e+e+e+e+e+f.line(b,g)+S}if(d.config.chart.stacked){let e=this.barCtx;e=this.barCtx[s],e.xArrj.push(r+h*v),e.xArrjF.push(Math.abs(n-r-i*v)),e.xArrjVal.push(this.barCtx.series[l][u])}return{pathTo:w,pathFrom:T,drawnBox:{x1:n,x2:r,y1:g,y2:_}}}getXForValue(e,t,n=!0){let r=n?t:null;return e!=null&&(r=t+e/this.barCtx.invertedYRatio-(this.barCtx.isReversed?e/this.barCtx.invertedYRatio:0)*2),r}getYForValue(e,t,n,r=!0){let i=r?t:null;return e!=null&&(i=t-e/this.barCtx.yRatio[n]+(this.barCtx.isReversed?e/this.barCtx.yRatio[n]:0)*2),i}getGoalValues(e,t,n,r,i,a){let o=this.w,s=[],c=(r,i)=>{s.push({[e]:e===`x`?this.getXForValue(r,t,!1):this.getYForValue(r,n,a,!1),attrs:i})};if(o.seriesData.seriesGoals[r]&&o.seriesData.seriesGoals[r][i]&&Array.isArray(o.seriesData.seriesGoals[r][i])&&o.seriesData.seriesGoals[r][i].forEach(e=>{c(e.value,e)}),this.barCtx.barOptions.isDumbbell){let t=this.getDumbbellEnds(r,i);if(t.length){let n={strokeHeight:e===`x`?0:o.globals.markers.size[r],strokeWidth:e===`x`?o.globals.markers.size[r]:0,strokeDashArray:0,strokeLineCap:`round`},a=0,s=0;for(let e=1;e<t.length;e++)t[e].value<t[a].value&&(a=e),t[e].value>t[s].value&&(s=e);let l=o.config.plotOptions.bar.dumbbell.dataLabels;t.forEach((e,t)=>{let o=q(K({},n),{strokeColor:e.color});l.enabled&&(t===a||t===s)&&(o.label={text:this.getDumbbellLabelText(e.value,r,i,e.index),color:l.colorFromMarker?e.color:Array.isArray(l.style.colors)?l.style.colors[e.index]||l.style.colors[0]:l.style.colors,outward:t===a&&a!==s?-1:1}),c(e.value,o)})}}return s}getDumbbellEnds(e,t){let n=this.w,r=[],i=n.dumbbellData;if(i&&i.form===`series`){let e=i.values[t]||[];for(let t=0;t<e.length;t++){let a=e[t];a!==null&&i.hidden.indexOf(t)===-1&&r.push({value:a,color:n.globals.colors[t],index:t})}return r}if(!n.rangeData.seriesRange.length)return r;let a=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:n.globals.colors,o=t=>Array.isArray(a[e])?a[e][t]:a[e];return[{value:n.rangeData.seriesRangeStart[e][t],color:o(0),index:0},{value:n.rangeData.seriesRangeEnd[e][t],color:o(1),index:1}]}getDumbbellLabelText(e,t,n,r){let i=this.w,a=i.config.plotOptions.bar.dumbbell.dataLabels;if(typeof a.formatter==`function`)return a.formatter(e,{seriesIndex:t,dataPointIndex:n,endpointIndex:r,w:i});let o=this.barCtx.isHorizontal?i.formatters.xLabelFormatter:i.formatters.yLabelFormatters[0];return typeof o==`function`?o(e,n,i):String(e)}drawGoalLine({barXPosition:e,barYPosition:t,goalX:n,goalY:r,barWidth:i,barHeight:a}){if(!(Array.isArray(n)&&n.length>0||Array.isArray(r)&&r.length>0))return null;let o=new J(this.barCtx.w),s=o.group({class:`apexcharts-bar-goals-groups`});s.node.classList.add(`apexcharts-element-hidden`),this.barCtx.w.globals.delayedElements.push({el:s.node}),s.attr(`clip-path`,`url(#gridRectMarkerMask${this.barCtx.w.globals.cuid})`);let c=null;return this.barCtx.isHorizontal?Array.isArray(n)&&n.forEach(e=>{if(e.x>=-1&&e.x<=o.w.layout.gridWidth+1){let n=e.attrs.strokeHeight===void 0?a/2:e.attrs.strokeHeight,r=t+n+a/2;c=o.drawLine(e.x,r-n*2,e.x,r,e.attrs.strokeColor?e.attrs.strokeColor:void 0,e.attrs.strokeDashArray,e.attrs.strokeWidth?e.attrs.strokeWidth:2,e.attrs.strokeLineCap),s.add(c),e.attrs.label&&s.add(this.drawDumbbellLabel(e.attrs,{x:e.x,y:r-n,horizontal:!0,markerSize:e.attrs.strokeWidth||0}))}}):Array.isArray(r)&&r.forEach(t=>{if(t.y>=-1&&t.y<=o.w.layout.gridHeight+1){let n=t.attrs.strokeWidth===void 0?i/2:t.attrs.strokeWidth,r=e+n+i/2;c=o.drawLine(r-n*2,t.y,r,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),s.add(c),t.attrs.label&&s.add(this.drawDumbbellLabel(t.attrs,{x:r-n,y:t.y,horizontal:!1,markerSize:t.attrs.strokeHeight||0}))}}),s}drawDumbbellLabel(e,t){let n=this.w,r=new J(n),i=n.config.plotOptions.bar.dumbbell.dataLabels,a=t.markerSize/2+i.offset,o=e.label.outward;return r.drawText({x:t.x+(t.horizontal?a*o:0),y:t.y-(t.horizontal?0:a*o),text:e.label.text,textAnchor:t.horizontal?o<0?`end`:`start`:`middle`,dominantBaseline:t.horizontal?`central`:o<0?`hanging`:`auto`,foreColor:e.label.color,fontSize:i.style.fontSize,fontFamily:i.style.fontFamily,fontWeight:i.style.fontWeight,cssClass:`apexcharts-dumbbell-label`})}drawBarShadow({prevPaths:e,currPaths:t,color:n,realIndex:r,j:i}){let a=this.w,{x:o,x1:s,barYPosition:c}=e,{x:l,x1:u,barYPosition:d}=t,f=c+t.barHeight,p=new J(this.barCtx.w),m=new Q,h=p.move(s,f)+p.line(o,f)+p.line(l,d)+p.line(u,d)+p.line(s,f)+(a.config.plotOptions.bar.borderRadiusApplication===`around`||this.arrBorderRadius[r][i]===`both`?` Z`:` z`);return p.drawPath({d:h,fill:m.shadeColor(.5,Q.rgb2hex(n)),stroke:`none`,strokeWidth:0,fillOpacity:1,classes:`apexcharts-bar-shadow apexcharts-decoration-element`})}getZeroValueEncounters({i:e,j:t}){let n=this.w,r=0,i=0;return(n.config.plotOptions.bar.horizontal?n.seriesData.series.map((e,t)=>t):n.globals.columnSeries?.i.map(e=>e)||[]).forEach(a=>{let o=n.globals.seriesPercent[a][t];o&&r++,a<e&&o===0&&i++}),{nonZeroColumns:r,zeroEncounters:i}}getSeriesGroupIndex(e){let t=this.w;return t.labelData.seriesGroups.findIndex(n=>n.indexOf(t.seriesData.seriesNames[e])>-1)}getGroupIndex(e){let t=this.w,n=t.labelData.seriesGroups.findIndex(n=>n.indexOf(t.seriesData.seriesNames[e])>-1),r=this.barCtx.columnGroupIndices,i=r.indexOf(n);return i<0&&(r.push(n),i=r.length-1),{groupIndex:n,columnGroupIndex:i}}},jl=class e{constructor(e,t,n){this.ctx=t,this.w=e,this.barOptions=e.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=e.config.stroke.width,this.isNullValue=!1,this.isRangeBar=e.rangeData.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!e.globals.isBarHorizontal&&e.rangeData.seriesRange.length&&e.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.isPyramid=this.barOptions.isPyramid,this.pyramidLayout=null,this.xyRatios=n,this.xRatio=0,this.yRatio=[],this.invertedXRatio=0,this.invertedYRatio=0,this.baseLineY=[],this.baseLineInvertedY=0,this.xyRatios!==null&&(this.xRatio=n.xRatio,this.yRatio=n.yRatio,this.invertedXRatio=n.invertedXRatio,this.invertedYRatio=n.invertedYRatio,this.baseLineY=n.baseLineY,this.baseLineInvertedY=n.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[],this._prevKeyed=null,this._ltCache=null,this._layoutShiftCache=null,this._pathToInterp=null,this.series=[],this.elSeries=null,this.visibleI=0,this.isReversed=!1;let r=new Y(this.w);this.lastActiveBarSerieIndex=r.getActiveConfigSeriesIndex(`desc`,[`bar`,`column`]),this.lastActiveBarSerieIndexByGroup=r.getActiveConfigSeriesIndexByGroup([`bar`,`column`]),this.columnGroupIndices=[];let i=r.getBarSeriesIndices(),a=new aa(this.w);this.stackedSeriesTotals=a.getStackedSeriesTotals(this.w.config.series.map((e,t)=>i.indexOf(t)===-1?t:-1).filter(e=>e!==-1)),this.barHelpers=new Al(this)}draw(e,t){let n=this.w,r=new J(this.w),i=new aa(this.w);e=i.getLogSeries(e),this.series=e,this.yRatio=i.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);let a=r.group({class:`apexcharts-bar-series apexcharts-plot-series`});n.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn(`WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts`);for(let i=0,o=0;i<e.length;i++,o++){let s,c,l=[],u=[],d=n.globals.comboCharts?t[i]:i,{columnGroupIndex:f}=this.barHelpers.getGroupIndex(d),p=r.group({class:`apexcharts-series`,rel:i+1,seriesName:Q.escapeString(n.seriesData.seriesNames[d]),"data:realIndex":d});Y.addCollapsedClassToSeries(this.w,p,d),e[i].length>0&&(this.visibleI+=1),this.yRatio.length>1&&(this.yaxisIndex=n.globals.seriesYAxisReverseMap[d],this.translationsIndex=d);let m=this.translationsIndex;this.isReversed=n.config.yaxis[this.yaxisIndex]&&n.config.yaxis[this.yaxisIndex].reversed,this.isPyramid&&(this.pyramidLayout=this.barHelpers.computePyramidLayout(e[i]));let h=this.barHelpers.initialPositions(d),{y:g,yDivision:_,zeroW:v,x:y,xDivision:b,zeroH:x}=h,S=h.barHeight,C=h.barWidth;c=g,s=y,this.isHorizontal||u.push(s+(C??0)/2);let w=r.group({class:`apexcharts-datalabels`,"data:realIndex":d});n.globals.delayedElements.push({el:w.node,holdUntilComplete:!n.config.dataLabels.animate?.enabled&&this.isLengthTransition(d)}),w.node.classList.add(`apexcharts-element-hidden`);let T=r.group({class:`apexcharts-bar-goals-markers`}),E=r.group({class:`apexcharts-bar-shadows`});n.globals.delayedElements.push({el:E.node}),E.node.classList.add(`apexcharts-element-hidden`);for(let t=0;t<e[i].length;t++){let r=this.barHelpers.getStrokeWidth(i,t,d),a=null,h={indexes:{i,j:t,realIndex:d,translationsIndex:m,bc:o},x:s,y:c,strokeWidth:r,elSeries:p};this.isHorizontal?(a=this.drawBarPaths(q(K({},h),{barHeight:S,zeroW:v,yDivision:_})),C=this.series[i][t]/this.invertedYRatio):(a=this.drawColumnPaths(q(K({},h),{xDivision:b,barWidth:C,zeroH:x})),S=this.series[i][t]/this.yRatio[m]);let g=this.barHelpers.getPathFillColor(e,i,t,d);if(this.isFunnel&&!this.isPyramid&&this.barOptions.isFunnel3d&&n.config.plotOptions.funnel?.shape!==`trapezoid`&&this.pathArr.length&&t>0){let e=this.barHelpers.drawBarShadow({color:typeof g.color==`string`&&g.color?.indexOf(`url`)===-1?g.color:Q.hexToRgba(n.globals.colors[i]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:a,realIndex:d,j:t});E.add(e),n.config.chart.dropShadow.enabled&&new da(this.w).dropShadow(e,n.config.chart.dropShadow,d)}this.pathArr.push(a);let y=this.barHelpers.drawGoalLine({barXPosition:a.barXPosition,barYPosition:a.barYPosition,goalX:a.goalX,goalY:a.goalY,barHeight:S,barWidth:C});y&&T.add(y),c=a.y,s=a.x,t>0&&u.push(s+(C??0)/2),l.push(c),this.renderSeries(q(K({realIndex:d,pathFill:g.color},g.useRangeColor?{lineFill:g.color}:{}),{j:t,i,columnGroupIndex:f,pathFrom:a.pathFrom,pathTo:a.pathTo,strokeWidth:r,elSeries:p,x:s,y:c,series:e,barHeight:Math.abs(a.barHeight?a.barHeight:S),barWidth:Math.abs(a.barWidth?a.barWidth:C),elDataLabelsWrap:w,elGoalsMarkers:T,elBarShadows:E,visibleSeries:this.visibleI,type:`bar`}))}if(n.globals.seriesXvalues[d]=u,n.globals.seriesYvalues[d]=l,n.globals.previousPaths.length>0){let t=[];for(let r=0;r<e[i].length;r++)t.push(_l(n,d,r));Dl({w:n,elSeries:p,record:this._prevRecord(d),newKeys:t,isHorizontal:this.isHorizontal,speed:n.config.chart.animations.dynamicAnimation.speed})}a.add(p)}return a}renderSeries({realIndex:e,pathFill:t,lineFill:n,j:r,i,columnGroupIndex:a,pathFrom:o,pathTo:s,strokeWidth:c,elSeries:l,x:u,y:d,y1:f,y2:p,series:m,barHeight:h,barWidth:g,barXPosition:_,barYPosition:v,elDataLabelsWrap:y,elGoalsMarkers:b,elBarShadows:x,visibleSeries:S,type:C,classes:w}){var T,E;let D=this.w,O=new J(this.w,this.ctx),k=ec(this.ctx,O),A=!1,j=this._pathToInterp;if(this._pathToInterp=null,l._bindingsDelegated||(l._bindingsDelegated=!0,O.setupEventDelegation(l,`.apexcharts-${C}-area`)),!n){let t=typeof D.globals.stroke.colors[e]==`function`?function(e){let t=D.config.stroke.colors,n;return Array.isArray(t)&&t.length>0&&(n=t[e],n||=``,typeof n==`function`)?n({value:D.seriesData.series[e][r],dataPointIndex:r,w:D}):n}(e):D.globals.stroke.colors[e];n=this.barOptions.distributed?D.globals.stroke.colors[r]:t}let M=D.config.chart.animations,N=M.animateGradually,P=N&&N.enabled!==!1&&!(D.globals.dataChanged&&this.isLayoutShift(e)),F=0,I=0;if(P){let e=D.globals.dataPoints||1,t=N.delay||0,n=Math.min(t,M.speed*.5/Math.max(1,e));I=Xi({style:`sequential`,index:r,baseDelay:n}),D.config.chart.stacked&&!D.globals.dataChanged&&(I+=i*n*.5),F=I/(t||1)}let L=new Ol(this).handleBarDataLabels({x:u,y:d,y1:f,y2:p,i,j:r,series:m,realIndex:e,columnGroupIndex:a,barHeight:h,barWidth:g,barXPosition:_,barYPosition:v,visibleSeries:S});if(I>0){let e=D.config.dataLabels;if(e.animate?.enabled||e.countUp?.enabled){let e=String(Math.round(I));(T=L.dataLabels?.node)==null||T.setAttribute(`data:dlDelay`,e),(E=L.totalDataLabels?.node)==null||E.setAttribute(`data:dlDelay`,e)}}if(D.globals.isBarHorizontal||(L.dataLabelsPos.dataLabelsX+Math.max(g,D.globals.barPadForNumericAxis)<0||L.dataLabelsPos.dataLabelsX-Math.max(g,D.globals.barPadForNumericAxis)>D.layout.gridWidth)&&(A=!0),D.config.series[i].data[r]&&D.config.series[i].data[r].strokeColor&&(n=D.config.series[i].data[r].strokeColor),this.isNullValue&&D.globals.collapsingSeriesIndices.indexOf(e)===-1&&(t=`none`),!A){let a=this.ctx.morphTypeChange?.isActive()===!0,u=a?this.ctx.morphTypeChange.getSpeed():D.config.chart.animations.dynamicAnimation.speed,d=a&&this.ctx.morphTypeChange.claimsTargetMark(e,r);d&&(o=s,F=0);let m=k.renderPaths({i,j:r,realIndex:e,pathFrom:o,pathTo:s,stroke:n,strokeWidth:c,strokeLineCap:D.config.stroke.lineCap,fill:t,pathToInterp:j,animationDelay:F,initialSpeed:D.config.chart.animations.speed,dataChangeSpeed:u,className:`apexcharts-${C}-area${w?` ${w}`:``}`,chartType:C,bindEventsOnPaths:!1});m.attr(`clip-path`,`url(#gridRectBarMask${D.globals.cuid})`),d&&(m.node.setAttribute(`opacity`,`0`),m.node.setAttribute(`data-piece-hidden`,`1`));let _=D.config.forecastDataPoints;_.count>0&&r>=D.globals.dataPoints-_.count&&(m.node.setAttribute(`stroke-dasharray`,_.dashArray),m.node.setAttribute(`stroke-width`,_.strokeWidth),m.node.setAttribute(`fill-opacity`,_.fillOpacity)),f!==void 0&&p!==void 0&&(m.attr(`data-range-y1`,f),m.attr(`data-range-y2`,p)),new da(this.w).setSelectionFilter(m,e,r),l.add(m),m.attr({cy:L.dataLabelsPos.bcy,cx:L.dataLabelsPos.bcx,j:r,val:D.seriesData.series[i][r],barHeight:h,barWidth:g,"data:pathKey":_l(D,e,r)}),k.kind===`canvas`&&(D.globals.barCanvasCoords||(D.globals.barCanvasCoords={}),D.globals.barCanvasCoords[e]||(D.globals.barCanvasCoords[e]={}),D.globals.barCanvasCoords[e][r]={cx:L.dataLabelsPos.bcx,cy:L.dataLabelsPos.bcy,barWidth:g}),L.dataLabels!==null&&y.add(L.dataLabels),L.totalDataLabels&&y.add(L.totalDataLabels),l.add(y),b&&l.add(b),x&&l.add(x)}return l}drawBarPaths({indexes:e,barHeight:t,strokeWidth:n,zeroW:r,x:i,y:a,yDivision:o,elSeries:s}){let c=this.w,l=e.i,u=e.j,d;if(c.axisFlags.isXNumeric)a=(c.seriesData.seriesX[l][u]-c.globals.minX)/this.invertedXRatio-t,d=a+t*this.visibleI;else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){let{nonZeroColumns:e,zeroEncounters:n}=this.barHelpers.getZeroValueEncounters({i:l,j:u});e>0&&(t=this.seriesLen*t/e),d=a+t*this.visibleI,d-=t*n}else d=a+t*this.visibleI;let f=this.isFunnel&&c.config.plotOptions.funnel.shape===`trapezoid`,p=this.isPyramid&&this.pyramidLayout?this.pyramidLayout[u]:null,m=!!p;if(p)d=p.y,t=p.height;else if(this.isFunnel&&!f){let e=r??0;r=e-(this.barHelpers.getXForValue(this.series[l][u],e)-e)/2}i=this.barHelpers.getXForValue(this.series[l][u],r??0);let h;return h=p?this.barHelpers.getPyramidPaths({barYPosition:d,barHeight:t,topHalf:p.topHalf,bottomHalf:p.bottomHalf,realIndex:e.realIndex,j:u,strokeWidth:n,w:c}):f?this.barHelpers.getFunnelTrapezoidPaths({barYPosition:d,barHeight:t,series:this.series,i:l,j:u,realIndex:e.realIndex,strokeWidth:n,w:c}):this.barHelpers.getBarpaths({barYPosition:d,barHeight:t,x1:r,x2:i,strokeWidth:n,isReversed:this.isReversed,series:this.series,realIndex:e.realIndex,i:l,j:u,w:c}),(f||m)&&(r=h.x1,i=h.x),!c.axisFlags.isXNumeric&&!m&&(a+=o),m&&(a=d),this.barHelpers.barBackground({j:u,i:l,y1:d-t*this.visibleI,y2:t*this.seriesLen,elSeries:s}),{pathTo:h.pathTo,pathFrom:h.pathFrom,x1:r,x:i,y:a,goalX:this.barHelpers.getGoalValues(`x`,r,null,e.realIndex,u,0),barYPosition:d,barHeight:t}}drawColumnPaths({indexes:e,x:t,y:n,xDivision:r,barWidth:i,zeroH:a,strokeWidth:o,elSeries:s}){let c=this.w,l=e.realIndex,u=e.translationsIndex,d=e.i,f=e.j,p=e.bc,m;if(c.axisFlags.isXNumeric){let e=this.getBarXForNumericXAxis({x:t,j:f,realIndex:l,barWidth:i});t=e.x,m=e.barXPosition}else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){let{nonZeroColumns:e,zeroEncounters:n}=this.barHelpers.getZeroValueEncounters({i:d,j:f});e>0&&(i=this.seriesLen*i/e),m=t+i*this.visibleI,m-=i*n}else m=t+i*this.visibleI;n=this.barHelpers.getYForValue(this.series[d][f],a,u);let h=this.barHelpers.getColumnPaths({barXPosition:m,barWidth:i,y1:a,y2:n,strokeWidth:o,isReversed:this.isReversed,series:this.series,realIndex:l,i:d,j:f,w:c});return c.axisFlags.isXNumeric||(t+=r),this.barHelpers.barBackground({bc:p,j:f,i:d,x1:m-o/2-i*this.visibleI,x2:i*this.seriesLen+o/2,elSeries:s}),{pathTo:h.pathTo,pathFrom:h.pathFrom,x:t,y:n,goalY:this.barHelpers.getGoalValues(`y`,null,a,l,f,u),barXPosition:m,barWidth:i}}getBarXForNumericXAxis({x:e,barWidth:t,realIndex:n,j:r}){let i=this.w,a=n;return i.seriesData.seriesX[n].length||(a=i.globals.maxValsInArrayIndex),Q.isNumber(i.seriesData.seriesX[a][r])&&(e=Xo.dataXToPx(i,i.seriesData.seriesX[a][r])-t*this.seriesLen/2),{barXPosition:e+(kl(i)?0:t*this.visibleI),x:e}}_prevRecord(e){let t=this.w,n=null;for(let r=0;r<t.globals.previousPaths.length;r++){let i=t.globals.previousPaths[r];i.paths&&i.paths.length>0&&parseInt(i.realIndex,10)===parseInt(String(e),10)&&(n=i)}return n}_prevKeyedPaths(e){if(this._prevKeyed||={},this._prevKeyed[e]!==void 0)return this._prevKeyed[e];let t=this._prevRecord(e),n=null;if(t&&t.paths.every(e=>e.key!=null)){let e=new Map;t.paths.forEach(t=>{e.set(t.key,t)}),n=e}return this._prevKeyed[e]=n,n}isLengthTransition(e){if(this._ltCache||={},this._ltCache[e]!==void 0)return this._ltCache[e];let t=this.w,n=!1;if(gl(t)&&t.globals.previousPaths.length>0){let r=this._prevRecord(e),i=t.seriesData.series[e]?.length??0;if(!r)n=i>0;else if(r.paths.length!==i)n=!0;else{let r=this._prevKeyedPaths(e);if(r){for(let a=0;a<i;a++)if(!r.has(_l(t,e,a))){n=!0;break}}}}return this._ltCache[e]=n,n}isLayoutShift(e){if(this.isLengthTransition(e))return!0;if(this._layoutShiftCache||={},this._layoutShiftCache[e]!==void 0)return this._layoutShiftCache[e];let t=xl(this.w,e,!0,!0),n=!!(t&&t.join.changed);return this._layoutShiftCache[e]=n,n}getPreviousPath(t,n,r,i){let a=this.w;this._pathToInterp=null;let o=this._prevRecord(t);if(!o)return gl(a)?null:r;let s=null,c=!1,l=this._prevKeyedPaths(t);if(l){let e=l.get(_l(a,t,n));e?s=e.d:c=!0}else o.paths[n]===void 0?c=!0:s=o.paths[n].d;if(s){let t=e.pathCommandCount(s),n=e.pathCommandCount(r);if(t===n)return s;let o=new J(a),c=t=>{let n=e.pathBox(t);return n?Math.min(n.maxX-n.minX,n.maxY-n.minY):0},l=t<n?c(s)>1:c(r)>1;if(t<n){let t=o.roundPathCorners(s,0);if(e.pathCommandCount(t)===n){if(l&&i){let t=o.roundPathCorners(i,0);e.pathCommandCount(t)===n&&(this._pathToInterp=t)}return t}}else{let n=o.roundPathCorners(r,0);if(e.pathCommandCount(n)===t){if(this._pathToInterp=n,l){let n=e.squareLike(s),r=n?o.roundPathCorners(n,0):null;if(r&&e.pathCommandCount(r)===t)return r}return s}}}return c&&gl(a)?null:r}static pathBox(e){if(!e)return null;let t=[],n=/([MLC])([^MLCZz]*)/g,r;for(;(r=n.exec(e))!==null;){let e=r[2].trim().split(/[\s,]+/).map(Number);e.length<2||e.some(isNaN)||t.push([e[e.length-2],e[e.length-1]])}if(t.length<3)return null;let i=t.map(e=>e[0]),a=t.map(e=>e[1]);return{minX:Math.min(...i),maxX:Math.max(...i),minY:Math.min(...a),maxY:Math.max(...a),start:t[0],vertical:Math.abs(t[1][0]-t[0][0])<Math.abs(t[1][1]-t[0][1])}}static squareLike(t){let n=e.pathBox(t);if(!n)return null;let{minX:r,maxX:i,minY:a,maxY:o,start:s,vertical:c}=n,l=(e,t,n)=>Math.abs(e-t)<=Math.abs(e-n)?[t,n]:[n,t],u,d,f,p;c?(u=Math.abs(s[0]-r)<=Math.abs(s[0]-i)?r:i,d=u===r?i:r,[f,p]=l(s[1],a,o)):(f=Math.abs(s[1]-a)<=Math.abs(s[1]-o)?a:o,p=f===a?o:a,[u,d]=l(s[0],r,i));let m=t.trim().endsWith(`Z`)?` Z`:` z`;return c?`M ${u} ${f} L ${u} ${p} L ${d} ${p} L ${d} ${f}${m}`:`M ${u} ${f} L ${d} ${f} L ${d} ${p} L ${u} ${p}${m}`}getPreviousFlip(e,t){let n=this.w,r=this._prevRecord(e);if(!r)return null;let i=this._prevKeyedPaths(e),a=i?i.get(_l(n,e,t)):r.paths[t];return a?!!a.flip:null}static pathCommandCount(e){if(!e)return 0;let t=e.match(/[A-Za-z]/g);return t?t.length:0}},Ml=class extends jl{draw(e,t){let n=this.w;this.graphics=new J(this.w),this.bar=new jl(this.w,this.ctx,this.xyRatios);let r=new aa(this.w);e=r.getLogSeries(e),this.yRatio=r.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e),n.config.chart.stackType===`100%`&&(e=n.globals.comboCharts?t.map(e=>n.globals.seriesPercent[e]):n.globals.seriesPercent.slice()),this.series=e,this.barHelpers.initializeStackedPrevVars(this);let i=this.graphics.group({class:`apexcharts-bar-series apexcharts-plot-series`}),a=0,o=0,s=n.config.chart.animations,c=s.enabled&&s.dynamicAnimation.enabled&&n.globals.previousPaths.length>0,l=!1;for(let r=0,s=0;r<e.length;r++,s++){let u=n.globals.comboCharts?t[r]:r,{groupIndex:d,columnGroupIndex:f}=this.barHelpers.getGroupIndex(u);this.groupCtx=this[n.labelData.seriesGroups[d]];let p=[],m=[],h=0;this.yRatio.length>1&&(this.yaxisIndex=n.globals.seriesYAxisReverseMap[u][0],h=u),this.isReversed=n.config.yaxis[this.yaxisIndex]&&n.config.yaxis[this.yaxisIndex].reversed;let g=this.graphics.group({class:`apexcharts-series`,seriesName:Q.escapeString(n.seriesData.seriesNames[u]),rel:r+1,"data:realIndex":u});Y.addCollapsedClassToSeries(this.w,g,u);let _=this.graphics.group({class:`apexcharts-datalabels`,"data:realIndex":u});Y.addCollapsedClassToSeries(this.w,_,u),(n.globals.collapsingSeriesIndices||[]).indexOf(u)>-1&&_.node.style.setProperty(`--apexcharts-dl-exit`,`${n.config.chart.animations.dynamicAnimation.speed}ms`);let v=this.graphics.group({class:`apexcharts-bar-goals-markers`}),y=this.initialPositions(a,o,void 0,void 0,void 0,void 0,h),{xDivision:b,yDivision:x,zeroH:S,zeroW:C}=y,w=y.barHeight,T=y.barWidth;o=y.y,a=y.x,n.globals.barHeight=w,n.globals.barWidth=T,this.barHelpers.initializeStackedXYVars(this),this.groupCtx.prevY.length===1&&this.groupCtx.prevY[0].every(e=>isNaN(e))&&(this.groupCtx.prevY[0]=this.groupCtx.prevY[0].map(()=>S),this.groupCtx.prevYF[0]=this.groupCtx.prevYF[0].map(()=>0));for(let t=0;t<n.globals.dataPoints;t++){let i=this.barHelpers.getStrokeWidth(r,t,u),y={indexes:{i:r,j:t,realIndex:u,translationsIndex:h,bc:s},strokeWidth:i,x:a,y:o,elSeries:g,columnGroupIndex:f,seriesGroup:n.labelData.seriesGroups[d]},E=null;this.isHorizontal?(E=this.drawStackedBarPaths(q(K({},y),{zeroW:C,barHeight:w,yDivision:x})),T=this.series[r][t]/this.invertedYRatio):(E=this.drawStackedColumnPaths(q(K({},y),{xDivision:b,barWidth:T,zeroH:S})),w=this.series[r][t]/this.yRatio[h]);let D=this.barHelpers.drawGoalLine({barXPosition:E.barXPosition,barYPosition:E.barYPosition,goalX:E.goalX,goalY:E.goalY,barHeight:w,barWidth:T});D&&v.add(D),o=E.y,a=E.x,p.push(a),m.push(o);let O=this.barHelpers.getPathFillColor(e,r,t,u),k=``,A=n.globals.isBarHorizontal?`apexcharts-flip-x`:`apexcharts-flip-y`,j=this.barHelpers.arrBorderRadius[u][t]===`bottom`&&n.seriesData.series[u][t]>0||this.barHelpers.arrBorderRadius[u][t]===`top`&&n.seriesData.series[u][t]<0,M=c&&!j&&this.getPreviousFlip(u,t);(j||M)&&(k=A),M&&(k+=` apexcharts-flip-held`,l=!0),g=this.renderSeries(q(K({realIndex:u,pathFill:O.color},O.useRangeColor?{lineFill:O.color}:{}),{j:t,i:r,columnGroupIndex:f,pathFrom:E.pathFrom,pathTo:E.pathTo,strokeWidth:i,elSeries:g,x:a,y:o,series:e,barHeight:w,barWidth:T,elDataLabelsWrap:_,elGoalsMarkers:v,type:`bar`,visibleSeries:f,classes:k}))}n.globals.seriesXvalues[u]=p,n.globals.seriesYvalues[u]=m,this.groupCtx.prevY.push(this.groupCtx.yArrj),this.groupCtx.prevYF.push(this.groupCtx.yArrjF),this.groupCtx.prevYVal.push(this.groupCtx.yArrjVal),this.groupCtx.prevX.push(this.groupCtx.xArrj),this.groupCtx.prevXF.push(this.groupCtx.xArrjF),this.groupCtx.prevXVal.push(this.groupCtx.xArrjVal),i.add(g)}return l&&this.settleHeldMirrors(),i}settleHeldMirrors(){let e=this.w;if(!Z.isBrowser())return;let t=e.config.chart.animations,n=(t.dynamicAnimation.speed||0)+(t.speed||0)+100;setTimeout(()=>{!e.globals.isDestroyed&&Q.elementExists(e.dom.baseEl)&&e.dom.baseEl.querySelectorAll(`.apexcharts-flip-held`).forEach(e=>{e.classList.remove(`apexcharts-flip-held`,`apexcharts-flip-y`,`apexcharts-flip-x`)})},n)}initialPositions(e,t,n,r,i,a,o){let s=this.w,c,l;if(this.isHorizontal){r=s.layout.gridHeight/s.globals.dataPoints;let e=s.config.plotOptions.bar.barHeight;c=String(e).indexOf(`%`)===-1?parseInt(e,10):r*parseInt(e,10)/100,a=s.globals.padHorizontal+(this.isReversed?s.layout.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),t=(r-c)/2}else{n=s.layout.gridWidth/s.globals.dataPoints,l=n;let t=s.config.plotOptions.bar.columnWidth,r=s.axisFlags.isXNumeric?this.barHelpers.barSlotXSpan():0;r>0?(n=r/this.xRatio,l=n*parseInt(this.barOptions.columnWidth,10)/100):l*=parseInt(t,10)/100,String(t).indexOf(`%`)===-1&&(l=parseInt(t,10)),i=this.isReversed?this.baseLineY[o]:s.layout.gridHeight-this.baseLineY[o],e=s.globals.padHorizontal+(n-l)/2}let u=s.globals.barGroups.length||1;return{x:e,y:t,yDivision:r,xDivision:n,barHeight:(c??0)/u,barWidth:(l??0)/u,zeroH:i,zeroW:a}}drawStackedBarPaths({indexes:e,barHeight:t,strokeWidth:n,zeroW:r,x:i,y:a,columnGroupIndex:o,seriesGroup:s,yDivision:c,elSeries:l}){let u=this.w,d=a+o*t,f,p=e.i,m=e.j,h=e.realIndex,g=e.translationsIndex,_=0;for(let e=0;e<this.groupCtx.prevXF.length;e++)_+=this.groupCtx.prevXF[e][m];let v=p;if(u.config.series[h].name&&(v=s.indexOf(u.config.series[h].name)),v>0){let e=r;this.groupCtx.prevXVal[v-1][m]<0?e=this.series[p]?.[m]>=0?this.groupCtx.prevX[v-1][m]+_-(this.isReversed?_:0)*2:this.groupCtx.prevX[v-1][m]:this.groupCtx.prevXVal[v-1][m]>=0&&(e=this.series[p]?.[m]>=0?this.groupCtx.prevX[v-1][m]:this.groupCtx.prevX[v-1][m]-_+(this.isReversed?_:0)*2),f=e}else f=r;i=this.series[p]?.[m]===null?f:f+this.series[p]?.[m]/this.invertedYRatio-(this.isReversed?this.series[p]?.[m]/this.invertedYRatio:0)*2;let y=this.barHelpers.getBarpaths({barYPosition:d,barHeight:t,x1:f,x2:i,strokeWidth:n,isReversed:this.isReversed,series:this.series,realIndex:e.realIndex,seriesGroup:s,i:p,j:m,w:u});return this.barHelpers.barBackground({j:m,i:p,y1:d,y2:t,elSeries:l}),a+=c,{pathTo:y.pathTo,pathFrom:y.pathFrom,goalX:this.barHelpers.getGoalValues(`x`,r,null,h,m,g),barXPosition:f,barYPosition:d,x:i,y:a}}drawStackedColumnPaths({indexes:e,x:t,y:n,xDivision:r,barWidth:i,zeroH:a,columnGroupIndex:o,seriesGroup:s,elSeries:c}){let l=this.w,u=e.i,d=e.j,f=e.bc,p=e.realIndex,m=e.translationsIndex;if(l.axisFlags.isXNumeric){let e=l.seriesData.seriesX[p][d];e||=0,t=(e-l.globals.minX)/this.xRatio-i/2*l.globals.barGroups.length}let h=t+o*i,g,_=0;for(let e=0;e<this.groupCtx.prevYF.length;e++)_+=isNaN(this.groupCtx.prevYF[e][d])?0:this.groupCtx.prevYF[e][d];let v=u;if(s&&(v=s.indexOf(l.seriesData.seriesNames[p])),v>0&&!l.axisFlags.isXNumeric||v>0&&l.axisFlags.isXNumeric&&l.seriesData.seriesX[p-1][d]===l.seriesData.seriesX[p][d]){let e,t,n=Math.min(this.yRatio.length+1,p+1);if(this.groupCtx.prevY[v-1]!==void 0&&this.groupCtx.prevY[v-1].length){for(let e=1;e<n;e++)if(!isNaN(this.groupCtx.prevY[v-e]?.[d])){t=this.groupCtx.prevY[v-e][d];break}}for(let r=1;r<n;r++)if(this.groupCtx.prevYVal[v-r]?.[d]<0){e=this.series[u]?.[d]>=0?t-_+(this.isReversed?_:0)*2:t;break}else if(this.groupCtx.prevYVal[v-r]?.[d]>=0){e=this.series[u]?.[d]>=0?t:t+_-(this.isReversed?_:0)*2;break}e===void 0&&(e=l.layout.gridHeight),g=this.groupCtx.prevYF[0]?.every(e=>e===0)&&this.groupCtx.prevYF.slice(1,v).every(e=>e.every(e=>isNaN(e)))?a:e}else g=a;n=this.series[u]?.[d]?g-this.series[u]?.[d]/this.yRatio[m]+(this.isReversed?this.series[u]?.[d]/this.yRatio[m]:0)*2:g;let y=this.barHelpers.getColumnPaths({barXPosition:h,barWidth:i,y1:g,y2:n,yRatio:this.yRatio[m],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:s,realIndex:e.realIndex,i:u,j:d,w:l});return this.barHelpers.barBackground({bc:f,j:d,i:u,x1:h,x2:i,elSeries:c}),{pathTo:y.pathTo,pathFrom:y.pathFrom,goalY:this.barHelpers.getGoalValues(`y`,null,a,p,d,0),barXPosition:h,x:l.axisFlags.isXNumeric?t:t+r,y:n}}};function Nl({w:e,points:t,seedA:n,seedB:r,center:i,halfExtent:a,alongFn:o,isHorizontal:s,options:c,clampAt:l,sideSign:u}){let d=c;if(!d||d.show===!1||!t||!t.length)return[];let f=d.maxPoints||3e3,p=t.length>f?Math.ceil(t.length/f):1,m=d.size==null?2.5:d.size,h=a*(d.jitter==null?.5:d.jitter),g=d.constrainToViolin!==!1&&typeof l==`function`,_=d.shape===`square`,v=d.colorScale,y=v&&Array.isArray(v.colors)&&v.colors.length>0,b=y?Math.max(2,v.steps||24):1,x=y&&v.min!=null?v.min:e.globals.minY,S=(y&&v.max!=null?v.max:e.globals.maxY)-x||1,C=y?Array(b).fill(``):[``];for(let e=0;e<t.length;e+=p){let a=t[e],c=o(a),d=(Ll(n*7919+r*100003+e)-.5)*2*h;if(g){let e=l(a);d>e&&(d=e),d<-e&&(d=-e)}u&&(d=Math.abs(d)*u);let f=s?c:i+d,p=s?i+d:c,v=_?zl(f,p,m):Rl(f,p,m);if(y){let e=(a-x)/S;e<0&&(e=0),e>1&&(e=1),C[Math.round(e*(b-1))]+=v}else C[0]+=v}if(!y)return C[0]?[{fill:null,d:C[0]}]:[];let w=[];for(let e=0;e<b;e++)C[e]&&w.push({fill:Il(v.colors,e/(b-1)),d:C[e]});return w}function Pl({graphics:e,w:t,elSeries:n,pointsByCat:r,options:i,distributed:a,realIndex:o,wrapClass:s,pointClass:c}){if(!i||i.show===!1||!r.length)return;let l=i.opacity==null?.9:i.opacity,u=i.strokeColor==null?`#fff`:i.strokeColor,d=i.strokeWidth==null?1:i.strokeWidth,f=t.config.chart.animations.enabled&&!t.globals.resized&&!t.globals.dataChanged,p=e.group({class:f?`${s} apexcharts-element-hidden`:s});f&&t.globals.delayedElements.push({el:p.node}),r.forEach(({groups:n,j:r})=>{let s=a?t.globals.colors[r]:t.globals.colors[o],f=i.fillColor,m=f===`series`?s:f===`series-dark`?Fl(s,.45):f||Fl(s,.45);n.forEach(n=>{let i=e.drawPath({d:n.d,fill:n.fill==null?m:n.fill,stroke:d>0?u:`none`,strokeWidth:d,fillOpacity:l,classes:c});i.attr(`data:realIndex`,o),i.attr(`j`,r),i.attr(`clip-path`,`url(#gridRectBarMask${t.globals.cuid})`),i.node.style.pointerEvents=`none`,p.add(i)})}),n.add(p)}function Fl(e,t){let n=Q.parseHex(e);if(!n)return e;let r=Math.max(0,1-t);return`rgb(${Math.round(n[0]*r)},${Math.round(n[1]*r)},${Math.round(n[2]*r)})`}function Il(e,t){if(!e.length)return`#000`;if(e.length===1)return e[0];let n=Math.max(0,Math.min(1,t))*(e.length-1),r=Math.floor(n),i=n-r,a=Q.parseHex(e[r])||[0,0,0],o=Q.parseHex(e[Math.min(r+1,e.length-1)])||a,s=(e,t)=>Math.round(e+(t-e)*i);return`rgb(${s(a[0],o[0])},${s(a[1],o[1])},${s(a[2],o[2])})`}function Ll(e){let t=(e^2654435769)>>>0;return t=Math.imul(t^t>>>16,73244475),t=Math.imul(t^t>>>16,73244475),((t^t>>>16)>>>0)/4294967296}function Rl(e,t,n){return`M ${e-n} ${t} a ${n} ${n} 0 1 0 ${2*n} 0 a ${n} ${n} 0 1 0 ${-2*n} 0 `}function zl(e,t,n){return`M ${e-n} ${t-n} h ${2*n} v ${2*n} h ${-2*n} z `}var Bl=class extends jl{draw(e,t,n){let r=this.w,i=new J(this.w),a=r.globals.comboCharts?t:r.config.chart.type,o=new ua(this.w);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=r.config.plotOptions.bar.horizontal,this.isOHLC=this.candlestickOptions&&this.candlestickOptions.type===`ohlc`,this.coreUtils=new aa(this.w),e=this.coreUtils.getLogSeries(e),this.series=e,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);let s=i.group({class:`apexcharts-${a}-series apexcharts-plot-series`});for(let t=0;t<e.length;t++){this.isBoxPlot=r.config.chart.type===`boxPlot`||r.config.series[t].type===`boxPlot`;let a,c,l=[],u=[],d=r.globals.comboCharts?n[t]:t,{columnGroupIndex:f}=this.barHelpers.getGroupIndex(d),p=i.group({class:`apexcharts-series`,seriesName:Q.escapeString(r.seriesData.seriesNames[d]),rel:t+1,"data:realIndex":d});Y.addCollapsedClassToSeries(this.w,p,d),e[t].length>0&&(this.visibleI+=1);let m=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[d][0],m=d);let{y:h,barHeight:g,yDivision:_,zeroW:v,x:y,barWidth:b,xDivision:x,zeroH:S}=this.barHelpers.initialPositions(d);c=h,a=y,u.push(a+(b??0)/2);let C=i.group({class:`apexcharts-datalabels`,"data:realIndex":d}),w=i.group({class:`apexcharts-bar-goals-markers`}),T=this.isBoxPlot?this.boxOptions.points:null,E=[],D=r.layout.gridWidth,O=b??0;for(let n=0;n<r.globals.dataPoints;n++){let i=this.barHelpers.getStrokeWidth(t,n,d),s=null,h={indexes:{i:t,j:n,realIndex:d,translationsIndex:m},x:a,y:c,strokeWidth:i,elSeries:p};if(s=this.isHorizontal?this.drawHorizontalBoxPaths(q(K({},h),{yDivision:_,barHeight:g,zeroW:v})):this.drawVerticalBoxPaths(q(K({},h),{xDivision:x,barWidth:b,zeroH:S,cullBounds:{lo:-O,hi:D+O}})),c=s.y,a=s.x,n>0&&u.push(a+(b??0)/2),l.push(c),s.culled)continue;let y=this.barHelpers.drawGoalLine({barXPosition:s.barXPosition,barYPosition:s.barYPosition,goalX:s.goalX,goalY:s.goalY,barHeight:g,barWidth:b});if(y&&w.add(y),s.pathTo.forEach((l,u)=>{let m=!this.isBoxPlot&&this.candlestickOptions.wick.useFillColor?s.color[u]:r.globals.stroke.colors[t],h=o.fillPath({seriesNumber:d,dataPointIndex:n,color:s.color[u],value:e[t][n]});this.renderSeries({realIndex:d,pathFill:h,lineFill:m,j:n,i:t,pathFrom:s.pathFrom,pathTo:l,strokeWidth:i,elSeries:p,x:a,y:c,series:e,columnGroupIndex:f,barHeight:g,barWidth:b,elDataLabelsWrap:C,elGoalsMarkers:w,visibleSeries:this.visibleI,type:r.config.chart.type})}),T&&T.show!==!1){let e=r.candleData.seriesBoxPoints[d]?.[n];if(e&&e.length){let t=e=>this.coreUtils.getLogValAtSeriesIndex(e,d),i,a,o;if(this.isHorizontal){let e=this.invertedYRatio,n=g??0,r=v??0;i=s.barYPosition+n/2,a=n/2,o=n=>r+t(n)/e}else{let e=this.yRatio[m],n=b??0,r=S??0;i=s.barXPosition+n/2,a=n/2,o=n=>r-t(n)/e}let c=Nl({w:r,points:e,seedA:d,seedB:n,center:i,halfExtent:a,alongFn:o,isHorizontal:this.isHorizontal,options:T});c.length&&E.push({groups:c,j:n})}}}T&&Pl({graphics:i,w:r,elSeries:p,pointsByCat:E,options:T,distributed:r.config.plotOptions.bar.distributed,realIndex:d,wrapClass:`apexcharts-boxPlot-points-wrap`,pointClass:`apexcharts-boxPlot-points`}),r.globals.seriesXvalues[d]=u,r.globals.seriesYvalues[d]=l,s.add(p)}return s}drawVerticalBoxPaths({indexes:e,x:t,xDivision:n,barWidth:r,zeroH:i,strokeWidth:a,cullBounds:o=null}){let s=this.w,c=new J(this.w),l=e.i,u=e.j,{colors:d}=s.config.plotOptions.candlestick,{colors:f}=this.boxOptions,p=e.realIndex,m=e=>Array.isArray(e)?e[p]:e,h=m(d.upward),g=m(d.downward),_=this.yRatio[e.translationsIndex],v=this.getOHLCValue(p,u),y=i,b=i,x=v.o<v.c?[h]:[g];this.isBoxPlot&&(x=[m(f.lower),m(f.upper)]);let S=Math.min(v.o,v.c),C=Math.max(v.o,v.c),w=v.m;s.axisFlags.isXNumeric&&(t=(s.seriesData.seriesX[p][u]-s.globals.minX)/this.xRatio-r/2);let T=t+r*this.visibleI;if(this.series[l]?.[u]===void 0||this.series[l]?.[u]===null?(S=i,C=i):(S=i-S/_,C=i-C/_,y=i-v.h/_,b=i-v.l/_,w=i-v.m/_),o&&(T+r<o.lo||T>o.hi))return{pathTo:null,pathFrom:null,x:s.axisFlags.isXNumeric?t:t+n,y:C,barXPosition:T,color:x,culled:!0};let E;if(this.isOHLC){let e=T+r/2,t=i-v.o/_,n=i-v.c/_;E=[c.move(e,y)+c.line(e,b)+c.move(e,t)+c.line(T,t)+c.move(e,n)+c.line(T+r,n)]}else E=this.isBoxPlot?[c.move(T,S)+c.line(T+r/2,S)+c.line(T+r/2,y)+c.line(T+r/4,y)+c.line(T+r-r/4,y)+c.line(T+r/2,y)+c.line(T+r/2,S)+c.line(T+r,S)+c.line(T+r,w)+c.line(T,w)+c.line(T,S+a/2),c.move(T,w)+c.line(T+r,w)+c.line(T+r,C)+c.line(T+r/2,C)+c.line(T+r/2,b)+c.line(T+r-r/4,b)+c.line(T+r/4,b)+c.line(T+r/2,b)+c.line(T+r/2,C)+c.line(T,C)+c.line(T,w)+`z`]:[c.move(T,C)+c.line(T+r/2,C)+c.line(T+r/2,y)+c.line(T+r/2,C)+c.line(T+r,C)+c.line(T+r,S)+c.line(T+r/2,S)+c.line(T+r/2,b)+c.line(T+r/2,S)+c.line(T,S)+c.line(T,C-a/2)];let D=null,O=(this.ctx?.morphTypeChange)?.getInitialPathFor(p,u);return O?D=O:s.globals.previousPaths.length>0&&(D=this.getPreviousPath(p,u,E[0])),D??=c.move(T+r/2,S)+c.move(T,S),s.axisFlags.isXNumeric||(t+=n),{pathTo:E,pathFrom:D,x:t,y:C,goalY:this.barHelpers.getGoalValues(`y`,null,i,p,u,e.translationsIndex),barXPosition:T,color:x}}drawHorizontalBoxPaths({indexes:e,y:t,yDivision:n,barHeight:r,zeroW:i,strokeWidth:a}){let o=this.w,s=new J(this.w),c=e.i,l=e.j,u=e.realIndex,{colors:d}=o.config.plotOptions.candlestick,{colors:f}=this.boxOptions,p=e=>Array.isArray(e)?e[u]:e,m=this.invertedYRatio,h=this.getOHLCValue(u,l),g=h.o<h.c?[p(d.upward)]:[p(d.downward)];this.isBoxPlot&&(g=[p(f.lower),p(f.upper)]);let _=i,v=i,y=Math.min(h.o,h.c),b=Math.max(h.o,h.c),x=h.m;o.axisFlags.isXNumeric&&(t=(o.seriesData.seriesX[u][l]-o.globals.minX)/this.invertedXRatio-r/2);let S=t+r*this.visibleI;this.series[c]?.[l]===void 0||this.series[c]?.[l]===null?(y=i,b=i):(y=i+y/m,b=i+b/m,_=i+h.h/m,v=i+h.l/m,x=i+h.m/m);let C=[s.move(y,S)+s.line(y,S+r/2)+s.line(_,S+r/2)+s.line(_,S+r/2-r/4)+s.line(_,S+r/2+r/4)+s.line(_,S+r/2)+s.line(y,S+r/2)+s.line(y,S+r)+s.line(x,S+r)+s.line(x,S)+s.line(y+a/2,S),s.move(x,S)+s.line(x,S+r)+s.line(b,S+r)+s.line(b,S+r/2)+s.line(v,S+r/2)+s.line(v,S+r-r/4)+s.line(v,S+r/4)+s.line(v,S+r/2)+s.line(b,S+r/2)+s.line(b,S)+s.line(x,S)+`z`],w=null,T=(this.ctx?.morphTypeChange)?.getInitialPathFor(u,l);return T?w=T:o.globals.previousPaths.length>0&&(w=this.getPreviousPath(u,l,C[0])),w??=s.move(y,S+r/2)+s.move(y,S),o.axisFlags.isXNumeric||(t+=n),{pathTo:C,pathFrom:w,x:b,y:t,goalX:this.barHelpers.getGoalValues(`x`,i,null,u,l,0),barYPosition:S,color:g}}getOHLCValue(e,t){let n=this.w,r=this.coreUtils,i=n=>n[e]&&n[e][t]!=null?r.getLogValAtSeriesIndex(n[e][t],e):0,a=i(n.candleData.seriesCandleH),o=i(n.candleData.seriesCandleO),s=i(n.candleData.seriesCandleM),c=i(n.candleData.seriesCandleC),l=i(n.candleData.seriesCandleL);return{o:this.isBoxPlot?a:o,h:this.isBoxPlot?o:a,m:s,l:this.isBoxPlot?c:l,c:this.isBoxPlot?l:c}}},Vl=e=>{let t=Gl(e),n=e.length-1,r=[],i,a,o,s;for(let r=0;r<n;r++)o=Wl(e[r],e[r+1]),Math.abs(o)<1e-6?t[r]=t[r+1]=0:(i=t[r]/o,a=t[r+1]/o,s=i*i+a*a,s>9&&(s=o*3/Math.sqrt(s),t[r]=s*i,t[r+1]=s*a));for(let i=0;i<=n;i++)s=(e[Math.min(n,i+1)][0]-e[Math.max(0,i-1)][0])/(6*(1+t[i]*t[i])),r.push([s||0,t[i]*s||0]);return r},Hl=e=>{let t=``;for(let n=0;n<e.length;n++){let r=e[n],i=r.length;i>4?(t+=`C${r[0]}, ${r[1]}`,t+=`, ${r[2]}, ${r[3]}`,t+=`, ${r[4]}, ${r[5]}`):i>2&&(t+=`S${r[0]}, ${r[1]}`,t+=`, ${r[2]}, ${r[3]}`)}return t},Ul={points(e){let t=Vl(e),n=e[1],r=e[0],i=[],a=t[1],o=t[0];i.push(r,[r[0]+o[0],r[1]+o[1],n[0]-a[0],n[1]-a[1],n[0],n[1]]);for(let n=2,r=t.length;n<r;n++){let r=e[n],a=t[n];i.push([r[0]-a[0],r[1]-a[1],r[0],r[1]])}return i},slice(e,t,n){let r=e.slice(t,n);if(t){if(n-t>1&&r[1].length<6){let e=r[0].length;r[1]=[r[0][e-2]*2-r[0][e-4],r[0][e-1]*2-r[0][e-3]].concat(r[1])}r[0]=r[0].slice(-2)}return r}};function Wl(e,t){return(t[1]-e[1])/(t[0]-e[0])}function Gl(e){let t=[],n=e[0],r=e[1],i=t[0]=Wl(n,r),a=1;for(let o=e.length-1;a<o;a++)n=r,r=e[a+1],t[a]=(i+(i=Wl(n,r)))*.5;return t[a]=i,t}var Kl=class extends jl{draw(e,t,n){let r=this.w,i=new J(this.w),a=new ua(this.w);this.violinOptions=r.config.plotOptions.violin,this.pointsOptions=this.violinOptions.points,this.boxOptions=this.violinOptions.box||{},this.cloudSign=Jl(this.violinOptions.side),this.rainSign=this.pointsOptions.show===!1?0:Jl(this.pointsOptions.position),this.boxShown=this.boxOptions.show===!0,this.boxFrac=this.boxShown?Yl(this.boxOptions.width,.15):0,this.rainFrac=Yl(this.pointsOptions.laneWidth,.4),this.bandwidthScale=this.violinOptions.bandwidthScale||1,this.normalize=this.violinOptions.normalize||`individual`,this.distributed=r.config.plotOptions.bar.distributed,this.isHorizontal=r.config.plotOptions.bar.horizontal,this.coreUtils=new aa(this.w),e=this.coreUtils.getLogSeries(e),this.series=e,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);let o=i.group({class:`apexcharts-violin-series apexcharts-plot-series`});for(let t=0;t<e.length;t++){let s,c,l=[],u=[],d=r.globals.comboCharts?n[t]:t,{columnGroupIndex:f}=this.barHelpers.getGroupIndex(d),p=i.group({class:`apexcharts-series`,seriesName:Q.escapeString(r.seriesData.seriesNames[d]),rel:t+1,"data:realIndex":d});Y.addCollapsedClassToSeries(this.w,p,d),e[t].length>0&&(this.visibleI+=1);let m=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[d][0],m=d);let{y:h,barHeight:g,yDivision:_,zeroW:v,x:y,barWidth:b,xDivision:x,zeroH:S}=this.barHelpers.initialPositions(d);c=h,s=y,u.push(s+(b??0)/2);let C=i.group({class:`apexcharts-datalabels`,"data:realIndex":d});this.seriesMaxWeight=0,this.normalize===`group`&&(r.violinData.seriesViolinDensity[d]||[]).forEach(e=>{e&&e.maxWeight>this.seriesMaxWeight&&(this.seriesMaxWeight=e.maxWeight)});let w=[];for(let n=0;n<r.globals.dataPoints;n++){let i=this.barHelpers.getStrokeWidth(t,n,d),o=this.isHorizontal?this.drawHorizontalViolin({indexes:{i:t,j:n,realIndex:d,translationsIndex:m},y:c,yDivision:_,barHeight:g,zeroW:v}):this.drawVerticalViolin({indexes:{i:t,j:n,realIndex:d,translationsIndex:m},x:s,xDivision:x,barWidth:b,zeroH:S});s=o.x,c=o.y,n>0&&u.push(o.center),l.push(o.alongRepresentative);let h=this.buildPointsSubPath({realIndex:d,j:n,center:o.center,halfExtent:o.halfExtent,alongFn:o.alongFn,density:o.density,maxWeight:o.maxWeight,cloudBase:o.cloudBase,cloudMaxPx:o.cloudMaxPx,rainCenter:o.rainCenter,rainHalfPx:o.rainHalfPx});h.length&&w.push({groups:h,j:n});let y=a.fillPath({seriesNumber:this.distributed?n:d,dataPointIndex:n,color:this.distributed?r.globals.colors[n]:void 0,value:e[t][n]});this.renderSeries({realIndex:d,pathFill:y,lineFill:r.globals.stroke.colors[d],j:n,i:t,pathFrom:o.pathFrom,pathTo:o.pathTo,strokeWidth:i,elSeries:p,x:s,y:c,series:e,columnGroupIndex:f,barHeight:g,barWidth:b,elDataLabelsWrap:C,visibleSeries:this.visibleI,type:`violin`});let T=p.node.querySelector(`path.apexcharts-violin-area[j='${n}']`);if(T&&isFinite(o.alongRepresentative)&&T.setAttribute(this.isHorizontal?`cx`:`cy`,`${o.alongRepresentative}`),o.boxPaths){let i=this.boxOptions.strokeWidth??1;o.boxPaths.forEach(a=>{this.renderSeries({realIndex:d,pathFill:a.filled?this.boxOptions.fillColor||y:`none`,lineFill:r.globals.stroke.colors[d],j:n,i:t,pathFrom:a.pathFrom,pathTo:a.pathTo,strokeWidth:i,elSeries:p,x:s,y:c,series:e,columnGroupIndex:f,barHeight:g,barWidth:b,elDataLabelsWrap:C,visibleSeries:this.visibleI,type:`violin`,classes:`apexcharts-raincloud-box`})})}}Pl({graphics:i,w:r,elSeries:p,pointsByCat:w,options:this.pointsOptions,distributed:this.distributed,realIndex:d,wrapClass:`apexcharts-violin-points-wrap`,pointClass:`apexcharts-violin-points`}),r.globals.seriesXvalues[d]=u,r.globals.seriesYvalues[d]=l,o.add(p)}return o}drawVerticalViolin({indexes:e,x:t,xDivision:n,barWidth:r,zeroH:i}){let a=this.w,{realIndex:o,j:s,translationsIndex:c}=e,l=this.yRatio[c];a.axisFlags.isXNumeric&&(t=(a.seriesData.seriesX[o][s]-a.globals.minX)/this.xRatio-r/2);let u=t+r*this.visibleI+r/2,d=r/2,f=this.getDensity(o,s),p=this.effectiveMaxWeight(f),m=e=>i-this.logVal(e,o)/l,h=Xl({halfExtent:d,cloudSign:this.cloudSign??0,rainSign:this.rainSign??0,boxFrac:this.boxFrac??0,rainFrac:this.rainFrac??0}),g=u+h.cloudBaseOff,_=this.buildBodyPath({nodes:f.nodes,center:g,halfExtent:h.cloudMaxPx,maxWeight:p,vertical:!0,alongFn:m,collapsed:!1,sideSign:this.cloudSign}),v=null,y=(this.ctx?.morphTypeChange)?.getInitialPathFor(o,s);return y?v=y:a.globals.previousPaths.length>0&&(v=this.getPreviousPath(o,s,_)),v??=this.buildBodyPath({nodes:f.nodes,center:g,halfExtent:h.cloudMaxPx,maxWeight:p,vertical:!0,alongFn:m,collapsed:!0,sideSign:this.cloudSign}),a.axisFlags.isXNumeric||(t+=n),{pathTo:_,pathFrom:v,x:t,y:i,center:u,halfExtent:d,alongFn:m,density:f,maxWeight:p,cloudBase:g,cloudMaxPx:h.cloudMaxPx,rainCenter:u+h.rainCenterOff,rainHalfPx:h.rainHalfPx,boxPaths:this.buildBoxSubPaths({realIndex:o,j:s,boxCenter:u+h.boxCenterOff,boxHalfPx:h.boxHalfPx,alongFn:m,vertical:!0}),alongRepresentative:m(this.series[e.i][s]??0)}}drawHorizontalViolin({indexes:e,y:t,yDivision:n,barHeight:r,zeroW:i}){let a=this.w,{realIndex:o,j:s}=e,c=this.invertedYRatio;a.axisFlags.isXNumeric&&(t=(a.seriesData.seriesX[o][s]-a.globals.minX)/this.invertedXRatio-r/2);let l=t+r*this.visibleI+r/2,u=r/2,d=this.getDensity(o,s),f=this.effectiveMaxWeight(d),p=e=>i+this.logVal(e,o)/c,m=Xl({halfExtent:u,cloudSign:this.cloudSign??0,rainSign:this.rainSign??0,boxFrac:this.boxFrac??0,rainFrac:this.rainFrac??0}),h=l+m.cloudBaseOff,g=this.buildBodyPath({nodes:d.nodes,center:h,halfExtent:m.cloudMaxPx,maxWeight:f,vertical:!1,alongFn:p,collapsed:!1,sideSign:this.cloudSign}),_=null,v=(this.ctx?.morphTypeChange)?.getInitialPathFor(o,s);return v?_=v:a.globals.previousPaths.length>0&&(_=this.getPreviousPath(o,s,g)),_??=this.buildBodyPath({nodes:d.nodes,center:h,halfExtent:m.cloudMaxPx,maxWeight:f,vertical:!1,alongFn:p,collapsed:!0,sideSign:this.cloudSign}),a.axisFlags.isXNumeric||(t+=n),{pathTo:g,pathFrom:_,x:i,y:t,center:l,halfExtent:u,alongFn:p,maxWeight:f,density:d,cloudBase:h,cloudMaxPx:m.cloudMaxPx,rainCenter:l+m.rainCenterOff,rainHalfPx:m.rainHalfPx,boxPaths:this.buildBoxSubPaths({realIndex:o,j:s,boxCenter:l+m.boxCenterOff,boxHalfPx:m.boxHalfPx,alongFn:p,vertical:!1}),alongRepresentative:p(this.series[e.i][s]??0)}}getDensity(e,t){let n=this.w.violinData.seriesViolinDensity[e]?.[t];if(!n||!n.values.length)return{nodes:[],maxWeight:0};let r=n.values.map((e,t)=>t);r.sort((e,t)=>n.values[e]-n.values[t]);let i=[],a=null;for(let e of r){let t=n.values[e];(a===null||t!==a)&&(i.push({v:t,w:n.weights[e]}),a=t)}return{nodes:i,maxWeight:n.maxWeight}}effectiveMaxWeight(e){return this.normalize===`group`&&this.seriesMaxWeight>0?this.seriesMaxWeight:e.maxWeight}buildBodyPath({nodes:e,center:t,halfExtent:n,maxWeight:r,vertical:i,alongFn:a,collapsed:o,sideSign:s=0}){let c=new J(this.w);if(e.length===0){let e=a(0);return i?c.move(t,e)+c.line(t,e):c.move(e,t)+c.line(e,t)}let l=e=>{if(o||r<=0)return 0;let t=e/r*n*this.bandwidthScale;return Math.min(n,Math.max(0,t))},u=[],d=[];for(let n=0;n<e.length;n++){let r=a(e[n].v),o=l(e[n].w),c=s===0?t+o:t+s*o,f=s===0?t-o:t;i?(u.push([c,r]),d.push([f,r])):(u.push([r,c]),d.push([r,f]))}return d.reverse(),this.smoothSegment(u,i,!1)+this.smoothSegment(d,i,!0)+`z`}buildBoxSubPaths({realIndex:e,j:t,boxCenter:n,boxHalfPx:r,alongFn:i,vertical:a}){let o=this.w;if(!this.boxShown||r<=0)return null;let s=o.violinData.seriesViolinSummary[e]?.[t];if(!s)return null;let c=r*Math.min(1,Math.max(0,this.boxOptions.capWidth??.5)),[l,u,d,f,p]=s.map(e=>i(e)),m=(e,t)=>{let r=new J(this.w),i=(e,t)=>a?[e,t]:[t,e],o=e=>e.map(([e,t],n)=>n===0?r.move(e,t):r.line(e,t)).join(``),s=n;return{whiskers:o([i(s,l),i(s,u)])+o([i(s,f),i(s,p)])+o([i(s-e,l),i(s+e,l)])+o([i(s-e,p),i(s+e,p)]),box:o([i(s-t,u),i(s+t,u),i(s+t,f),i(s-t,f)])+`z`+o([i(s-t,d),i(s+t,d)])}},h=m(c,r),g=m(0,0),_=(n,r)=>{let i=null;return o.globals.previousPaths.length>0&&(i=this.getPreviousPath(e,t,n)),i??r};return[{pathTo:h.whiskers,pathFrom:_(h.whiskers,g.whiskers),filled:!1},{pathTo:h.box,pathFrom:_(h.box,g.box),filled:!0}]}smoothSegment(e,t,n){let r=new J(this.w),i=e[0],a=n?r.line(i[0],i[1]):r.move(i[0],i[1]);if(e.length<3||!this.strictlyMonotonic(e,t)){for(let t=1;t<e.length;t++)a+=r.line(e[t][0],e[t][1]);return a}let o=e.map(([e,n])=>t?[n,e]:[e,n]),s=Ul.points(o),c=t?s.map(ql):s;return a+=Hl(c),a}strictlyMonotonic(e,t){let n=+!!t;for(let t=1;t<e.length;t++)if(e[t][n]===e[t-1][n])return!1;return!0}buildPointsSubPath({realIndex:e,j:t,center:n,halfExtent:r,alongFn:i,density:a,maxWeight:o,cloudBase:s,cloudMaxPx:c,rainCenter:l,rainHalfPx:u}){let d=this.rainSign!==0,f=d?l:this.cloudSign===0?n:s,p=d?u:this.cloudSign===0?r:c;return Nl({w:this.w,points:this.w.violinData.seriesViolinPoints[e]?.[t],seedA:e,seedB:t,center:f,halfExtent:p,alongFn:i,isHorizontal:this.isHorizontal,options:this.pointsOptions,clampAt:d?null:e=>this.halfWidthAtValue(e,a,p,o),sideSign:d?0:this.cloudSign})}halfWidthAtValue(e,t,n,r){let{nodes:i}=t,a=r??t.maxWeight;if(!i.length||a<=0)return 0;let o=e=>Math.min(n,e/a*n*this.bandwidthScale);if(e<=i[0].v)return o(i[0].w);if(e>=i[i.length-1].v)return o(i[i.length-1].w);for(let t=1;t<i.length;t++)if(e<=i[t].v){let n=i[t-1],r=i[t],a=r.v===n.v?0:(e-n.v)/(r.v-n.v);return o(n.w+(r.w-n.w)*a)}return 0}logVal(e,t){return this.coreUtils.getLogValAtSeriesIndex(e,t)}};function ql(e){let t=[];for(let n=0;n<e.length;n+=2)t.push(e[n+1],e[n]);return t}function Jl(e){return e===`right`||e===`bottom`?1:e===`left`||e===`top`?-1:0}function Yl(e,t){let n=t;if(typeof e==`string`&&e.trim().endsWith(`%`)){let t=parseFloat(e);isFinite(t)&&(n=t/100)}else typeof e==`number`&&isFinite(e)&&(n=e);return Math.min(.5,Math.max(0,n))}function Xl({halfExtent:e,cloudSign:t,rainSign:n,boxFrac:r,rainFrac:i}){let a=r*e,o=n===0?e:i*e,s=n===0?0:n*(e-o);if(t===0)return{cloudBaseOff:0,cloudMaxPx:e,boxCenterOff:0,boxHalfPx:a,rainCenterOff:s,rainHalfPx:o};let c=2*Math.max(0,1-(n===0?0:i)-r)*e,l=t*(e-c);return{cloudBaseOff:l,cloudMaxPx:c,boxCenterOff:l-t*a,boxHalfPx:a,rainCenterOff:s,rainHalfPx:o}}var Zl=class{constructor(e,t){this.ctx=t,this.w=e}checkColorRange(){let e=this.w,t=!1,n=e.config.plotOptions[e.config.chart.type];return n.colorScale.ranges.length>0&&n.colorScale.ranges.map(e=>{e.from<=0&&(t=!0)}),t}getShadeColor(e,t,n,r){let i=this.w,a=1,o=i.config.plotOptions[e].shadeIntensity,s=this.determineColor(e,t,n);i.globals.hasNegs||r?a=i.config.plotOptions[e].reverseNegativeShade?s.percent<0?s.percent/100*(o*1.25):(1-s.percent/100)*(o*1.25):s.percent<=0?1-(1+s.percent/100)*o:(1-s.percent/100)*o:(a=1-s.percent/100,e===`treemap`&&(a=(1-s.percent/100)*(o*1.25)));let c=s.color,l=new Q;if(i.config.plotOptions[e].enableShades){if(this.w.config.theme.mode===`dark`){let e=l.shadeColor(a*-1,s.color);c=Q.hexToRgba(Q.isColorHex(e)?e:Q.rgb2hex(e),i.config.fill.opacity)}else{let e=l.shadeColor(a,s.color);c=Q.hexToRgba(Q.isColorHex(e)?e:Q.rgb2hex(e),i.config.fill.opacity)}}return{color:c,colorProps:s}}determineColor(e,t,n){let r=this.w,i=r.seriesData.series[t][n],a=r.config.plotOptions[e],o=a.colorScale.inverse?n:t;a.distributed&&r.config.chart.type===`treemap`&&(o=n);let s=r.globals.colors[o],c=null,l,u;if(!a.distributed&&e===`heatmap`)l=r.globals.minY,u=r.globals.maxY;else{let e=r.seriesData.series[t];l=e.length?e[0]:0,u=l;for(let t=1;t<e.length;t++)e[t]<l&&(l=e[t]),e[t]>u&&(u=e[t])}let d=a.colorScale.min,f=a.colorScale.max;d!==void 0&&f!==void 0&&f>d?(l=d,u=f):d!==void 0&&(l=d<r.globals.minY?d:r.globals.minY,u=f>r.globals.maxY?f:r.globals.maxY);let p=Math.abs(u)+Math.abs(l),m=p===0?0:100*Math.min(Math.max(i,l),u)/p;return a.colorScale.ranges.length>0&&a.colorScale.ranges.map(e=>{if(i>=e.from&&i<=e.to){s=e.color,c=e.foreColor?e.foreColor:null,l=e.from,u=e.to;let t=Math.abs(u)+Math.abs(l);m=t===0?0:100*i/t}}),{color:s,foreColor:c,percent:m}}calculateDataLabels({text:e,x:t,y:n,i:r,j:i,colorProps:a,fontSize:o}){let s=this.w,c=s.config.dataLabels,l=new J(this.w),u=new ca(this.w,this.ctx),d=null;if(c.enabled){d=l.group({class:`apexcharts-data-labels`});let f=nl(c.offsetX,s,r,i),p=nl(c.offsetY,s,r,i),m=t+f,h=n+parseFloat(c.style.fontSize)/3+p;u.plotDataLabelsText({x:m,y:h,text:e,i:r,j:i,color:a.foreColor,parent:d,fontSize:o,dataLabelsConfig:c})}return d}},Ql=class{constructor(e,t,n){this.ctx=t,this.w=e,this.xRatio=n.xRatio,this.yRatio=n.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new Zl(e,t),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}draw(e){let t=this.w,n=new J(this.w,this.ctx),r=ec(this.ctx,n),i=r!==n&&typeof r.drawRectCell==`function`,a=n.group({class:`apexcharts-heatmap`});a.attr(`clip-path`,`url(#gridRectMask${t.globals.cuid})`);let o=t.layout.gridWidth/t.globals.dataPoints,s=t.layout.gridHeight/t.seriesData.series.length,c=(t.config.xaxis.type===`numeric`||t.config.xaxis.type===`datetime`)&&t.axisFlags.isXNumeric&&this.xRatio>0,l=o;if(c){let e=t.globals.minXDiff;l=Number.isFinite(e)&&e>0?e/this.xRatio:o}let u=Array.isArray(t.config.fill.opacity)?t.config.fill.opacity[0]??1:t.config.fill.opacity??1,d=0,f=!1;this.negRange=this.helpers.checkColorRange();let p=e.slice();t.config.yaxis[0].reversed&&(f=!0,p.reverse());for(let m=f?0:p.length-1;f?m<p.length:m>=0;f?m++:m--){let f=n.group({class:`apexcharts-series apexcharts-heatmap-series`,seriesName:Q.escapeString(t.seriesData.seriesNames[m]),rel:m+1,"data:realIndex":m});if(Y.addCollapsedClassToSeries(this.w,f,m),i||n.setupEventDelegation(f,`.apexcharts-heatmap-rect`),t.config.chart.dropShadow.enabled){let e=t.config.chart.dropShadow;new da(this.w).dropShadow(f,e,m)}let h=0,g=t.config.plotOptions.heatmap.shadeIntensity,_=0;for(let a=0;a<t.globals.dataPoints;a++){if(!c&&t.seriesData.seriesX.length&&!t.globals.allSeriesHasEqualX&&t.globals.minX+t.globals.minXDiff*a<t.seriesData.seriesX[m][_]){h+=o;continue}if(_>=p[m].length)break;let v=c?l:o;if(c){let e=t.seriesData.seriesX[m]?t.seriesData.seriesX[m][_]:null;if(e==null||e!==e){_++;continue}h=(e-t.globals.minX)/this.xRatio-l/2}let y=this.helpers.getShadeColor(t.config.chart.type,m,_,this.negRange),b=y.color,x=y.colorProps;t.config.fill.type===`image`&&(b=new ua(this.w).fillPath({seriesNumber:m,dataPointIndex:_,opacity:t.globals.hasNegs?x.percent<0?1-(1+x.percent/100):g+x.percent/100:x.percent/100,patternID:Q.randomId(),width:t.config.fill.image.width?t.config.fill.image.width:v,height:t.config.fill.image.height?t.config.fill.image.height:s}));let S=this.rectRadius,C=t.config.plotOptions.heatmap.useFillColorAsStroke?b:t.globals.stroke.colors[0];if(i)r.drawRectCell(h,d,v,s,{fill:b,fillOpacity:u,stroke:C,strokeWidth:this.strokeWidth,radius:S,seriesIndex:m,dataPointIndex:_});else{let r=n.drawRect(h,d,v,s,S);if(r.attr({cx:h,cy:d}),r.node.classList.add(`apexcharts-heatmap-rect`),f.add(r),r.attr({fill:b,i:m,index:m,j:_,val:e[m][_],"stroke-width":this.strokeWidth,stroke:C,color:b}),t.config.chart.animations.enabled&&!t.globals.dataChanged){let e=1;t.globals.resized||(e=t.config.chart.animations.speed),this.animateHeatMap(r,h,d,v,s,e,m,_)}if(t.globals.dataChanged){let e=1;if(this.dynamicAnim.enabled&&t.globals.shouldAnimate){e=this.dynamicAnim.speed;let n=t.globals.previousPaths[m]&&t.globals.previousPaths[m][_]&&t.globals.previousPaths[m][_].color;n||=`rgba(255, 255, 255, 0)`,this.animateHeatColor(r,Q.isColorHex(n)?n:Q.rgb2hex(n),Q.isColorHex(b)?b:Q.rgb2hex(b),e)}}}let w=t.config.dataLabels.formatter,T=w(t.seriesData.series[m][_],{value:t.seriesData.series[m][_],seriesIndex:m,dataPointIndex:_,w:t}),E=this.helpers.calculateDataLabels({text:T,x:h+v/2,y:d+s/2,i:m,j:_,colorProps:x,series:p});E!==null&&f.add(E),c||(h+=o),_++}d+=s,a.add(f)}let m=t.globals.yAxisScale[0].result.slice();return t.config.yaxis[0].reversed?m.unshift(``):m.push(``),t.globals.yAxisScale[0].result=m,a}animateHeatMap(e,t,n,r,i,a,o=0,s=0){let c=this.w,l=new Yi(this.w),u=c.config.chart.animations.animateGradually,d=u&&u.enabled!==!1,f=0;if(d){let e=((c.seriesData.series||[]).length||1)+(c.globals.dataPoints||1)-2;f=Xi({style:`diagonal`,index:s,row:o,col:s,baseDelay:Math.min(u.delay||0,a*.5/Math.max(1,e))})}l.animateRect(e,{x:t+r/2,y:n+i/2,width:0,height:0},{x:t,y:n,width:r,height:i},a,()=>{l.animationCompleted(e)},f)}animateHeatColor(e,t,n,r){e.attr({fill:t}).animate(r).attr({fill:n})}},$l=class{constructor(e){this.w=e.w,this.lineCtx=e}sameValueSeriesFix(e,t){let n=this.w;if((n.config.fill.type===`gradient`||n.config.fill.type[e]===`gradient`)&&new aa(this.lineCtx.w).seriesHaveSameValues(e)){let n=t[e].slice();n[n.length-1]=n[n.length-1]+1e-6,t[e]=n}return t}calculatePoints({series:e,realIndex:t,x:n,y:r,i,j:a,prevY:o}){let s=this.w,c=[],l=[],u=this.lineCtx.categoryAxisCorrection+s.config.markers.offsetX;return s.axisFlags.isXNumeric&&(u=(s.seriesData.seriesX[t][0]-s.globals.minX)/this.lineCtx.xRatio+s.config.markers.offsetX),a===0&&(c.push(u),l.push(Q.isNumber(e[i][0])?o+s.config.markers.offsetY:null)),c.push(n+s.config.markers.offsetX),l.push(Q.isNumber(e[i][a+1])?r+s.config.markers.offsetY:null),{x:c,y:l}}checkPreviousPaths({pathFromLine:e,pathFromArea:t,realIndex:n}){let r=this.w;for(let i=0;i<r.globals.previousPaths.length;i++){let a=r.globals.previousPaths[i];(a.type===`line`||a.type===`area`)&&a.paths.length>0&&parseInt(a.realIndex,10)===parseInt(n,10)&&(a.type===`line`?(this.lineCtx.appendPathFrom=!1,e=r.globals.previousPaths[i].paths[0].d):a.type===`area`&&(this.lineCtx.appendPathFrom=!1,t=r.globals.previousPaths[i].paths[0].d,r.config.stroke.show&&r.globals.previousPaths[i].paths[1]&&(e=r.globals.previousPaths[i].paths[1].d)))}return{pathFromLine:e,pathFromArea:t}}determineFirstPrevY({i:e,realIndex:t,series:n,prevY:r,lineYPosition:i,translationsIndex:a}){let o=this.w,s=o.config.chart.stacked&&!o.globals.comboCharts||o.config.chart.stacked&&o.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||this.w.config.series[t]?.type===`bar`||this.w.config.series[t]?.type===`column`);if(n[e]?.[0]!==void 0){if(s){if(e>0){let e=this.lineCtx.stackTopAt(t,0);i=e===void 0?this.lineCtx.zeroY:e}else i=this.lineCtx.zeroY}else i=this.lineCtx.zeroY;r=i-n[e][0]/this.lineCtx.yRatio[a]+(this.lineCtx.isReversed?n[e][0]/this.lineCtx.yRatio[a]:0)*2}else if(s&&e>0&&n[e][0]===void 0){for(let t=e-1;t>=0;t--)if(n[t][0]!==null&&n[t][0]!==void 0){i=this.lineCtx.prevSeriesY[t][0],r=i;break}}return{prevY:r,lineYPosition:i}}};function eu(e,t,n,r){let i=e.globals,a=i.prevStreamFrame;if(!a||!i.dataChanged||!e.axisFlags?.isXNumeric)return null;let o=a.seriesX[t],s=a.seriesY[t],c=e.seriesData.seriesX[t],l=e.seriesData.series[t];if(!o||!s||!c||!l||o.length<3||c.length<3)return null;let u=-1;for(let e=0;e<o.length;e++)if(o[e]===c[0]){u=e;break}if(u===-1)return null;let d=Math.min(o.length-u,c.length);if(d<2)return null;let f=c.length-d;if(u===0&&f===0)return null;for(let e=0;e<d;e++){if(o[u+e]!==c[e])return null;let t=s[u+e],n=l[e];if(t!==n&&(t!=null||n!=null))return null}let p=a.xPixels[t],m=a.yPixels[t];if(!p||!m)return null;let h=-1,g=-1;for(let e=0;e<d;e++)p[u+e]!=null&&m[u+e]!=null&&n[e]!=null&&r[e]!=null&&(h===-1&&(h=e),g=e);if(h===-1||g<=h)return null;let _=n[h],v=n[g],y=p[u+h],b=p[u+g];if(Math.abs(v-_)<1e-6)return null;let x=(b-y)/(v-_),S=y-x*_;if(!isFinite(x)||!isFinite(S)||Math.abs(x-1)>.02||Math.abs(S)<.5)return null;let C=h,w=h;for(let e=h;e<=g;e++){let t=r[e];t!=null&&m[u+e]!=null&&(t<r[C]&&(C=e),t>r[w]&&(w=e))}let T=1,E=0,D=r[C],O=r[w];if(Math.abs(O-D)>1e-6?(T=(m[u+w]-m[u+C])/(O-D),E=m[u+C]-T*D):E=m[u+C]-D,!isFinite(T)||!isFinite(E)||T<.2||T>5)return null;let k=Math.floor((h+g)/2);if(k!==h&&k!==g&&n[k]!=null&&p[u+k]!=null){let e=x*n[k]+S;if(Math.abs(e-p[u+k])>1.5)return null;if(r[k]!=null&&m[u+k]!=null){let e=T*r[k]+E;if(Math.abs(e-m[u+k])>1.5)return null}}return i.streamScrolled=!0,{ax:x,bx:S,ay:T,by:E}}var tu=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function nu(e,t){let{ax:n,bx:r,ay:i,by:a}=t,o=[],s=/([MmLlHhVvCcSsQqTtAaZz])([^MmLlHhVvCcSsQqTtAaZz]*)/g,c;for(;(c=s.exec(e))!==null;){let e=c[1].toUpperCase(),t=(c[2].match(tu)||[]).map(parseFloat);if(e===`Z`){o.push(`z`);continue}if(e===`H`){for(let e of t)o.push(`H ${n*e+r}`);continue}if(e===`V`){for(let e of t)o.push(`V ${i*e+a}`);continue}if(e===`A`){for(let e=0;e+6<t.length;e+=7)o.push(`A ${t[e]} ${t[e+1]} ${t[e+2]} ${t[e+3]} ${t[e+4]} ${n*t[e+5]+r} ${i*t[e+6]+a}`);continue}let s=[];for(let e=0;e+1<t.length;e+=2)s.push(`${n*t[e]+r} ${i*t[e+1]+a}`);s.length&&o.push(`${e} ${s.join(` `)}`)}return o.join(` `)}var ru=class{constructor(e,t,n,r){this.ctx=t,this.w=e,this.xyRatios=n,this.xRatio=0,this.yRatio=[],this.zRatio=0,this.baseLineY=[],this.pointsChart=this.w.config.chart.type===`bubble`||this.w.config.chart.type===`scatter`||r,this.scatter=new Ji(this.w,this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new $l(this),this.markers=new pa(this.w,this.ctx),this.prevSeriesY=[],this.prevSeriesYByX=new Map,this.categoryAxisCorrection=0,this.yaxisIndex=0,this.xDivision=0,this.zeroY=0,this.areaBottomY=0,this.strokeWidth=0,this.isReversed=!1,this.appendPathFrom=!1,this.elSeries=null,this.elPointsMain=null,this.elDataLabelsWrap=null,this._elLastPointsWrap=null}draw(e,t,n,r){let i=this.w,a=new J(this.w),o=i.globals.comboCharts?t:i.config.chart.type,s=a.group({class:`apexcharts-${o}-series apexcharts-plot-series`}),c=new aa(this.w);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=c.getLogSeries(e),this.yRatio=c.getLogYRatios(this.yRatio),this.prevSeriesY=[],this.prevSeriesYByX=new Map;let l=[];for(let t=0;t<e.length;t++){e=this.lineHelpers.sameValueSeriesFix(t,e);let a=i.globals.comboCharts?n[t]:t,s=this.yRatio.length>1?a:0;this._initSerieVariables(e,t,a);let c=[],u=[],d=[],f=i.globals.padHorizontal+this.categoryAxisCorrection,p=[],m=[];Y.addCollapsedClassToSeries(this.w,this.elSeries,a),i.axisFlags.isXNumeric&&i.seriesData.seriesX.length>0&&(f=(i.seriesData.seriesX[a][0]-i.globals.minX)/this.xRatio),d.push(f);let h=f,g,_=h,v=this.zeroY,y=this.zeroY;v=this.lineHelpers.determineFirstPrevY({i:t,realIndex:a,series:e,prevY:v,lineYPosition:0,translationsIndex:s}).prevY,i.config.stroke.curve===`monotoneCubic`&&e[t][0]===null?c.push(null):c.push(v);let b=v,x;o===`rangeArea`&&(x=this.lineHelpers.determineFirstPrevY({i:t,realIndex:a,series:r,prevY:y,lineYPosition:0,translationsIndex:s}),y=x.prevY,g=y,u.push(c[0]===null?null:y));let S=this._calculatePathsFrom({type:o,series:e,i:t,realIndex:a,translationsIndex:s,prevX:_,prevY:v,prevY2:y}),C=[c[0]],w=[u[0]],T={type:o,series:e,realIndex:a,translationsIndex:s,i:t,x:f,y:1,pX:h,pY:b,pathsFrom:S,linePaths:p,areaPaths:m,seriesIndex:n,lineYPosition:0,xArrj:d,yArrj:c,y2Arrj:u,seriesRangeEnd:r},E=this._iterateOverDataPoints(q(K({},T),{iterations:o===`rangeArea`?e[t].length-1:void 0,isRangeStart:!0}));if(o===`rangeArea`){let e=this._calculatePathsFrom({series:r,i:t,realIndex:a,prevX:_,prevY:y}),n=this._iterateOverDataPoints(q(K({},T),{series:r,xArrj:[f],yArrj:C,y2Arrj:w,pY:g,areaPaths:E.areaPaths,pathsFrom:e,iterations:r[t].length-1,isRangeStart:!1})),i=E.linePaths.length/2;for(let e=0;e<i;e++)E.linePaths[e]=n.linePaths[e+i]+E.linePaths[e];E.linePaths.splice(i),E.pathFromLine=n.pathFromLine+E.pathFromLine}else/z\s*$/i.test(E.pathFromArea)||(E.pathFromArea+=`z`);this._handlePaths({type:o,realIndex:a,i:t,paths:E}),this.markers.flushBatch(this.elPointsMain,a),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),l.push(this.elSeries)}if(i.config.series[0]?.zIndex!==void 0&&l.sort((e,t)=>Number(e.node.getAttribute(`zIndex`))-Number(t.node.getAttribute(`zIndex`))),i.config.chart.stacked)for(let e=l.length-1;e>=0;e--)s.add(l[e]);else for(let e=0;e<l.length;e++)s.add(l[e]);return s}_initSerieVariables(e,t,n){let r=this.w,i=new J(this.w);this.xDivision=r.layout.gridWidth/(r.globals.dataPoints-+(r.config.xaxis.tickPlacement===`on`)),this.strokeWidth=Array.isArray(r.config.stroke.width)?r.config.stroke.width[n]:r.config.stroke.width;let a=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[n],a=n),this.isReversed=r.config.yaxis[this.yaxisIndex]&&r.config.yaxis[this.yaxisIndex].reversed,this.zeroY=r.layout.gridHeight-this.baseLineY[a]-(this.isReversed?r.layout.gridHeight:0)+(this.isReversed?this.baseLineY[a]*2:0),this.areaBottomY=this.zeroY,(this.zeroY>r.layout.gridHeight||r.config.plotOptions.area.fillTo===`end`)&&(this.areaBottomY=r.layout.gridHeight),this.categoryAxisCorrection=this.xDivision/2;let o=r.config.series[n];if(this.elSeries=i.group({class:`apexcharts-series`,zIndex:o.zIndex===void 0?n:o.zIndex,seriesName:Q.escapeString(r.seriesData.seriesNames[n])}),this.elPointsMain=i.group({class:`apexcharts-series-markers-wrap`,"data:realIndex":n}),this.markers.resetSeriesWrapCache(),this._elLastPointsWrap=null,r.globals.hasNullValues){let e=this.markers.plotChartMarkers({pointsPos:{x:[0],y:[r.layout.gridHeight+r.globals.markers.largestSize]},seriesIndex:t,j:0,pSize:.1,alwaysDrawMarker:!0,isVirtualPoint:!0});e!==null&&this.elPointsMain.add(e)}this.elDataLabelsWrap=i.group({class:`apexcharts-datalabels`,"data:realIndex":n});let s=e[t].length===r.globals.dataPoints;this.elSeries.attr({"data:longestSeries":s,rel:t+1,"data:realIndex":n}),this.appendPathFrom=!0}_calculatePathsFrom({type:e,series:t,i:n,realIndex:r,translationsIndex:i,prevX:a,prevY:o,prevY2:s}){let c=this.w,l=new J(this.w),u,d,f,p;if(t[n][0]===null){for(let e=0;e<t[n].length;e++)if(t[n][e]!==null){a=this.xDivision*e,o=this.zeroY-t[n][e]/this.yRatio[i],u=l.move(a,o),d=l.move(a,this.areaBottomY);break}}else u=l.move(a,o),e===`rangeArea`&&(u=l.move(a,s)+l.line(a,o)),d=l.move(a,this.areaBottomY)+l.line(a,o);if(f=l.move(0,this.areaBottomY)+l.line(0,this.areaBottomY),p=l.move(0,this.areaBottomY)+l.line(0,this.areaBottomY),c.globals.previousPaths.length>0){let e=this.lineHelpers.checkPreviousPaths({pathFromLine:f,pathFromArea:p,realIndex:r});f=e.pathFromLine,p=e.pathFromArea}return{prevX:a,prevY:o,linePath:u,areaPath:d,pathFromLine:f,pathFromArea:p}}_stackKey(e,t){if(!this.w.axisFlags.isXNumeric)return t;let n=this.w.seriesData.seriesX[e];return n?n[t]:void 0}stackTopAt(e,t){let n=this._stackKey(e,t);if(n!=null)return this.prevSeriesYByX.get(n)}_recordStackTops(e,t){let n=this.w;if(Array.isArray(t)&&n.globals.collapsedSeriesIndices.indexOf(e)===-1&&n.globals.ancillaryCollapsedSeriesIndices.indexOf(e)===-1)for(let n=0;n<t.length;n++){let r=this._stackKey(e,n);if(r==null)continue;let i=t[n];Q.isNumber(i)&&this.prevSeriesYByX.set(r,i)}}_handlePaths({type:e,realIndex:t,i:n,paths:r}){let i=this.w,a=new J(this.w),o=ec(this.ctx,a),s=new ua(this.w);this.prevSeriesY.push(r.yArrj),this._recordStackTops(t,r.yArrj);let c=null;(e===`line`||e===`area`)&&i.globals.dataChanged&&(c=eu(i,t,r.xArrj,r.yArrj));let l=null;!c&&(e===`line`||e===`area`)&&(l=Tl(i,{type:e,realIndex:t,pathFromLine:r.pathFromLine,pathFromArea:r.pathFromArea,linePaths:r.linePaths,areaPaths:r.areaPaths})),i.globals.seriesXvalues[t]=r.xArrj,i.globals.seriesYvalues[t]=r.yArrj;let u=i.config.forecastDataPoints;if(u.count>0&&e!==`rangeArea`){let e=i.globals.seriesXvalues[t][i.globals.seriesXvalues[t].length-u.count-1],n=a.drawRect(e,0,i.layout.gridWidth,i.layout.gridHeight,0);i.dom.elForecastMask.appendChild(n.node);let r=a.drawRect(0,0,e,i.layout.gridHeight,0);i.dom.elNonForecastMask.appendChild(r.node)}this.pointsChart?wl(i,{elPointsMain:this.elPointsMain,realIndex:t,speed:i.config.chart.animations.dynamicAnimation.speed}):(i.globals.delayedElements.push({el:this.elPointsMain.node,index:t}),wl(i,{elPointsMain:this.elPointsMain,realIndex:t,speed:i.config.chart.animations.dynamicAnimation.speed}),xl(i,t)&&this.elDataLabelsWrap?.node&&(this.elDataLabelsWrap.node.classList.add(`apexcharts-element-hidden`),i.globals.delayedElements.push({el:this.elDataLabelsWrap.node,holdUntilComplete:!0})));let d={i:n,realIndex:t,animationDelay:n,initialSpeed:i.config.chart.animations.speed,dataChangeSpeed:i.config.chart.animations.dynamicAnimation.speed,className:`apexcharts-${e}`},f=r.numericXY,p=e===`line`||e===`area`,m=p&&r.linePaths.length>1?[r.linePaths.join(` `)]:r.linePaths,h=p&&r.areaPaths.length>1?[r.areaPaths.join(` `)]:r.areaPaths;if(e===`area`){let e=s.fillPath({seriesNumber:t});for(let t=0;t<h.length;t++){let n=o.renderPaths(q(K({},d),{pathFrom:c?nu(r.areaPaths[t],c):l?.area?.from??r.pathFromArea,pathTo:h[t],pathToNumeric:f?{xs:f.xs,ys:f.ys,closeY:f.areaCloseY}:void 0,pathToInterp:l?.area?.toInterp,scrollMorph:!!c,stroke:`none`,strokeWidth:0,strokeLineCap:null,fill:e}));this.elSeries.add(n)}}if(i.config.stroke.show&&!this.pointsChart){let a=null;if(e===`line`)a=s.fillPath({seriesNumber:t,i:n});else if(i.config.stroke.fill.type===`solid`)a=i.globals.stroke.colors[t];else{let e=i.config.fill;i.config.fill=i.config.stroke.fill,a=s.fillPath({seriesNumber:t,i:n}),i.config.fill=e}for(let n=0;n<m.length;n++){let p=a;e===`rangeArea`&&(p=s.fillPath({seriesNumber:t}));let h=q(K({},d),{pathFrom:c?nu(r.linePaths[n],c):l?.line?.from??r.pathFromLine,pathTo:m[n],pathToNumeric:f?{xs:f.xs,ys:f.ys}:void 0,pathToInterp:l?.line?.toInterp,scrollMorph:!!c,stroke:a,strokeWidth:this.strokeWidth,strokeLineCap:i.config.stroke.lineCap,fill:e===`rangeArea`?p:`none`}),g=o.renderPaths(h);if(this.elSeries.add(g),g.attr(`fill-rule`,`evenodd`),u.count>0&&e!==`rangeArea`){let e=o.renderPaths(h);e.node.setAttribute(`stroke-dasharray`,u.dashArray),u.strokeWidth&&e.node.setAttribute(`stroke-width`,u.strokeWidth),this.elSeries.add(e),e.attr(`clip-path`,`url(#forecastMask${i.globals.cuid})`),g.attr(`clip-path`,`url(#nonForecastMask${i.globals.cuid})`)}}}}_iterateOverDataPoints({type:e,series:t,iterations:n,realIndex:r,translationsIndex:i,i:a,x:o,y:s,pX:c,pY:l,pathsFrom:u,linePaths:d,areaPaths:f,seriesIndex:p,lineYPosition:m,xArrj:h,yArrj:g,y2Arrj:_,isRangeStart:v,seriesRangeEnd:y}){let b=this.w,x=new J(this.w),S=this.yRatio,{prevY:C,linePath:w,areaPath:T,pathFromLine:E,pathFromArea:D}=u,O=Q.isNumber(b.globals.minYArr[r])?b.globals.minYArr[r]:b.globals.minY;n||=b.globals.dataPoints>1?b.globals.dataPoints-1:b.globals.dataPoints;let k=(e,t)=>t-e/S[i]+(this.isReversed?e/S[i]:0)*2,A=s,j=b.config.chart.stacked&&!b.globals.comboCharts||b.config.chart.stacked&&b.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||this.w.config.series[r]?.type===`bar`||this.w.config.series[r]?.type===`column`),M=b.config.stroke.curve;Array.isArray(M)&&(M=Array.isArray(p)?M[p[a]]:M[a]);let N=0,P,F=this.pointsChart?this._scatterJitterPx(r):null;if(M===`straight`&&!this.pointsChart){let p=this._fastStraightPath({type:e,series:t,i:a,realIndex:r,translationsIndex:i,iterations:n,x:o,y:s,pX:c,pY:l,pathsFrom:u,linePaths:d,areaPaths:f,xArrj:h,yArrj:g,y2Arrj:_,stackSeries:j});if(p)return p}for(let i=0;i<n&&t[a].length!==0;i++){let u=t[a][i+1]===void 0||t[a][i+1]===null;if(b.axisFlags.isXNumeric){let e=b.seriesData.seriesX[r][i+1];b.seriesData.seriesX[r][i+1]===void 0&&(e=b.seriesData.seriesX[r][n-1]),o=(e-b.globals.minX)/this.xRatio}else o+=this.xDivision;if(j){if(a>0&&b.globals.collapsedSeries.length<b.config.series.length-1){if((e=>{for(let t=e;t>=0;t--){let e=p?.[t]??t;if(b.globals.collapsedSeriesIndices.indexOf(e)===-1&&b.globals.ancillaryCollapsedSeriesIndices.indexOf(e)===-1)return t}return-1})(a-1)<0)m=this.zeroY;else{let e=this.stackTopAt(r,i+1);m=e===void 0?this.zeroY:e}}else m=this.zeroY}else m=this.zeroY;u?s=k(O,m):(s=k(t[a][i+1],m),e===`rangeArea`&&(A=k(y[a][i+1],m)));let S=o,I=s;if(F){let e=r*100003+(i+1);F.x&&(S=o+(Ll(e*7919+13)-.5)*2*F.x),F.y&&(I=s+(Ll(e*6271+97)-.5)*2*F.y)}h.push(t[a][i+1]===null?null:S),u&&(b.config.stroke.curve===`smooth`||b.config.stroke.curve===`monotoneCubic`)?(g.push(null),_.push(null)):(g.push(I),_.push(A));let L=this.lineHelpers.calculatePoints({series:t,x:S,y:I,realIndex:r,i:a,j:i,prevY:C}),R=this._createPaths({type:e,series:t,i:a,j:i,x:o,y:s,y2:A,xArrj:h,yArrj:g,y2Arrj:_,pX:c,pY:l,pathState:N,segmentStartX:P,linePath:w,areaPath:T,linePaths:d,areaPaths:f,curve:M,isRangeStart:v});f=R.areaPaths,d=R.linePaths,c=R.pX,l=R.pY,N=R.pathState,P=R.segmentStartX,T=R.areaPath,w=R.linePath,this.appendPathFrom&&!b.globals.hasNullValues&&(M!==`monotoneCubic`||e!==`rangeArea`)&&(E+=x.line(o,this.areaBottomY),D+=x.line(o,this.areaBottomY)),this.handleNullDataPoints(t,L,a,i,r),this._handleMarkersAndLabels({type:e,pointsPos:L,i:a,j:i,realIndex:r,isRangeStart:v})}return{yArrj:g,xArrj:h,pathFromArea:D,areaPaths:f,pathFromLine:E,linePaths:d,linePath:w,areaPath:T}}_handleMarkersAndLabels({type:e,pointsPos:t,isRangeStart:n,i:r,j:i,realIndex:a}){let o=this.w,s=new ca(this.w,this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,i,{realIndex:a,pointsPos:t,zRatio:this.zRatio,elParent:this.elPointsMain});else{(o.globals.dataChanged||o.globals.resized||o.globals.markers.batched)&&o.seriesData.series[r].length>1&&this.elPointsMain.node.classList.add(`apexcharts-element-hidden`);let e=this.markers.plotChartMarkers({pointsPos:t,seriesIndex:a,j:i+1});e!==null&&e!==this._elLastPointsWrap&&(this.elPointsMain.add(e),this._elLastPointsWrap=e)}let c=s.drawDataLabel({type:e,isRangeStart:n,pos:t,i:a,j:i+1});c!==null&&this.elDataLabelsWrap.add(c)}_scatterJitterPx(e){let t=this.w,n=t.config.plotOptions.scatter?.jitter;if(!n||!n.enabled||!n.x&&!n.y)return null;let r=t.axisFlags.isXNumeric&&this.xRatio?1/this.xRatio:this.xDivision,i=this.yRatio.length>1?e:0,a=this.yRatio[i]?1/this.yRatio[i]:0;return{x:(n.x||0)*r,y:(n.y||0)*a}}_fastStraightPath({type:e,series:t,i:n,realIndex:r,translationsIndex:i,iterations:a,x:o,y:s,pX:c,pY:l,pathsFrom:u,linePaths:d,areaPaths:f,xArrj:p,yArrj:m,y2Arrj:h,stackSeries:g}){let _=this.w;if(e!==`line`&&e!==`area`||_.globals.comboCharts||g||_.config.dataLabels.enabled||_.config.markers.discrete.length||_.globals.markers.size[r]>0)return null;let v=t[n],y=v.length;if(!a||y<2||y-1!==a)return null;for(let e=0;e<=a;e++)if(v[e]==null)return null;let b=_.axisFlags.isXNumeric,x=b?_.seriesData.seriesX[r]:null;if(b&&(!x||x.length<y))return null;let S=this.yRatio[i],C=this.isReversed,w=this.zeroY,T=this.areaBottomY,E=this.xRatio,D=_.globals.minX,O=this.xDivision,k=_.config.markers.offsetX,A=_.config.markers.offsetY,j=this.appendPathFrom&&!_.globals.hasNullValues,{pathFromLine:M,pathFromArea:N}=u,P=this.ctx&&this.ctx.renderer,F=!!(P&&P.kind&&P.kind!==`svg`),I=!F||_.globals.dataChanged&&!!_.globals.prevStreamFrame,L=F?new Float64Array(y):null,R=F?new Float64Array(y):null;L&&R&&(L[0]=c,R[0]=l),_.globals.pointsArray[r]===void 0&&(_.globals.pointsArray[r]=[]);let ee=_.globals.pointsArray[r],te=x?(x[0]-D)/E+k:this.categoryAxisCorrection+k;ee.push([te,u.prevY+A]);let ne=I?Array(a+1):[];I&&(ne[0]=`M `+c+` `+l);let re=I&&j?Array(a):null,ie=o,z=c,ae=l;for(let e=0;e<a;e++){x?z=(x[e+1]-D)/E:(ie+=O,z=ie);let t=v[e+1];ae=w-t/S+(C?t/S:0)*2,p.push(z),m.push(ae),h.push(s),ee.push([z+k,ae+A]),I&&(ne[e+1]=` L `+z+` `+ae,re&&(re[e]=` L `+z+` `+T)),L&&R&&(L[e+1]=z,R[e+1]=ae)}let oe=``,se=``;if(I&&(oe=ne.join(``),se=oe+` L `+z+` `+T+` L `+c+` `+T+`z`),re){let e=re.join(``);M+=e,N+=e}else!I&&j&&(M+=` L `+z+` `+T,N+=` L `+z+` `+T);return d.push(oe),f.push(se),{yArrj:m,xArrj:p,pathFromArea:N,areaPaths:f,pathFromLine:M,linePaths:d,linePath:oe,areaPath:se,numericXY:L?{xs:L,ys:R,areaCloseY:T}:void 0}}_createPaths({type:e,series:t,i:n,j:r,x:i,y:a,xArrj:o,yArrj:s,y2:c,y2Arrj:l,pX:u,pY:d,pathState:f,segmentStartX:p,linePath:m,areaPath:h,linePaths:g,areaPaths:_,curve:v,isRangeStart:y}){let b=new J(this.w),x=this.areaBottomY,S=e===`rangeArea`,C=e===`rangeArea`&&y;switch(v){case`monotoneCubic`:{let e=y?s:l,i=(e,t)=>e.map((e,n)=>[e,t[n]]).filter(e=>e[1]!==null),a=e=>{let t=[],n=0;return e.forEach(e=>{e===null?n>0&&(t.push(n),n=0):n++}),n>0&&t.push(n),t},c=(e,t)=>{let n=a(e),r=[];for(let e=0,i=0;e<n.length;i+=n[e++])r[e]=Ul.slice(t,i,i+n[e]);return r};switch(f){case 0:if(e[r+1]===null)break;f=1;case 1:if(!(S?o.length===t[n].length:r===t[n].length-2))break;case 2:{let t=y?o:o.slice().reverse(),n=y?e:e.slice().reverse(),r=i(t,n),a=r.length>1?Ul.points(r):r,s=[];S&&(C?_=r:s=_.reverse());let l=0,u=0;if(c(n,a).forEach(e=>{l++;let t=Hl(e),n=u;u+=e.length;let i=u-1;C?m=b.move(r[n][0],r[n][1])+t:S?m=b.move(s[n][0],s[n][1])+b.line(r[n][0],r[n][1])+t+b.line(s[i][0],s[i][1]):(m=b.move(r[n][0],r[n][1])+t,h=m+b.line(r[i][0],x)+b.line(r[n][0],x)+`z`,_.push(h)),g.push(m)}),S&&l>1&&!C){let e=g.slice(l).reverse();g.splice(l),e.forEach(e=>g.push(e))}f=0;break}}break}case`smooth`:{let e=(i-u)*.35;if(t[n][r]===null)f=0;else switch(f){case 0:if(p=u,m=C?b.move(u,l[r])+b.line(u,d):b.move(u,d),h=b.move(u,d),t[n][r+1]===null||t[n][r+1]===void 0){g.push(m),_.push(h);break}if(f=1,r<t[n].length-2){let t=b.curve(u+e,d,i-e,a,i,a);m+=t,h+=t;break}case 1:if(t[n][r+1]===null)m+=C?b.line(u,c):b.move(u,d),h+=b.line(u,x)+b.line(p,x)+`z`,g.push(m),_.push(h),f=-1;else{let o=b.curve(u+e,d,i-e,a,i,a);m+=o,h+=o,r>=t[n].length-2&&(C&&(m+=b.curve(i,a,i,a,i,c)+b.move(i,c)),h+=b.curve(i,a,i,a,i,x)+b.line(p,x)+`z`,g.push(m),_.push(h),f=-1)}}u=i,d=a;break}default:{let e=(e,t,n)=>{let r=``;switch(e){case`stepline`:r=b.line(t,null,`H`)+b.line(null,n,`V`);break;case`linestep`:r=b.line(null,n,`V`)+b.line(t,null,`H`);break;case`straight`:r=b.line(t,n)}return r};if(t[n][r]===null)f=0;else switch(f){case 0:if(p=u,m=C?b.move(u,l[r])+b.line(u,d):b.move(u,d),h=b.move(u,d),t[n][r+1]===null||t[n][r+1]===void 0){g.push(m),_.push(h);break}if(f=1,r<t[n].length-2){let t=e(v,i,a);m+=t,h+=t;break}case 1:if(t[n][r+1]===null)m+=C?b.line(u,c):b.move(u,d),h+=b.line(u,x)+b.line(p,x)+`z`,g.push(m),_.push(h),f=-1;else{let o=e(v,i,a);m+=o,h+=o,r>=t[n].length-2&&(C&&(m+=b.line(i,c)),h+=b.line(i,x)+b.line(p,x)+`z`,g.push(m),_.push(h),f=-1)}}u=i,d=a;break}}return{linePaths:g,areaPaths:_,pX:u,pY:d,pathState:f,segmentStartX:p,linePath:m,areaPath:h}}handleNullDataPoints(e,t,n,r,i){let a=this.w;if(e[n][r]===null&&a.config.markers.showNullDataPoints||e[n].length===1){let e=this.strokeWidth-a.config.markers.strokeWidth/2;e>0||(e=0);let n=this.markers.plotChartMarkers({pointsPos:t,seriesIndex:i,j:r+1,pSize:e,alwaysDrawMarker:!0});n!==null&&this.elPointsMain.add(n)}}};function iu(e,t){let{lines:n,lineHeight:r,anchor:i,elbow:a,labelX:o,labelY:s,side:c,connector:l,style:u,foreColor:d}=t,f=new J(e),p=f.group({class:t.groupClass||`apexcharts-outer-label-group`});if(l.show){let e=`M ${i.x} ${i.y} L ${a.x} ${a.y} L ${o} ${s}`,n=f.drawPath({d:e,stroke:l.color,strokeWidth:l.width,fill:`none`,strokeLinecap:`round`});n.node.classList.add(t.connectorClass||`apexcharts-outer-label-connector`),p.add(n)}let m=c===`right`?o+4:o-4,h=n.length,g=s-(h-1)*r/2,_=f.drawText({x:m,y:g,text:h===1?n[0]:n,textAnchor:c===`right`?`start`:`end`,fontSize:u.fontSize,fontFamily:u.fontFamily,fontWeight:u.fontWeight,foreColor:d,dominantBaseline:`central`,cssClass:t.textClass||`apexcharts-outer-label`});if(h>1){let e=_.node.getElementsByTagName(`tspan`);for(let t=0;t<e.length;t++)e[t].setAttribute(`x`,`${m}`),e[t].setAttribute(`dy`,t===0?`0`:`${r}`)}return p.add(_),p}function au(e,t,n={}){let r=new J(e),i=n.fontSize||`12px`,a=parseFloat(i)||12,o=0;return t.forEach(e=>{if(e==null||e===``)return;let t=`${e}`,s=r.getTextRects(t,i,n.fontFamily,``).width;o=Math.max(o,s>0?s:t.length*a*.58)}),o}function ou(e,t,n,r){let i=e.slice().sort((e,t)=>e.idealY-t.idealY);i.forEach(e=>{e.labelY=e.idealY});for(let e=1;e<i.length;e++)i[e].labelY-i[e-1].labelY<t&&(i[e].labelY=i[e-1].labelY+t);let a=i[i.length-1],o=a?a.labelY-n:0;if(o>0)for(let e=i.length-1;e>=0;e--)i[e].labelY-=o,e<i.length-1&&i[e+1].labelY-i[e].labelY<t&&(i[e].labelY=i[e+1].labelY-t);if(r!=null&&i.length&&i[0].labelY<r){let e=r-i[0].labelY;for(let t=0;t<i.length;t++)i[t].labelY+=e}}var su=class{constructor(e){this.w=e}drawYAxisTexts(e,t,n,r){let i=this.w,a=i.config.yaxis[0],o=i.formatters.yLabelFormatters[0];return new J(this.w).drawText({x:e+a.labels.offsetX,y:t+a.labels.offsetY,text:o(r,n),textAnchor:`middle`,fontSize:a.labels.style.fontSize,fontFamily:a.labels.style.fontFamily,foreColor:Array.isArray(a.labels.style.colors)?a.labels.style.colors[n]:a.labels.style.colors})}getMaxLabelWidth(e,{fontSize:t,fontFamily:n}={}){let r=new J(this.w),i=0;return e.forEach(e=>{if(e==null||e===``)return;let a=r.getTextRects(`${e}`,t||`12px`,n,``);i=Math.max(i,a.width)}),i}drawExternalLabel(e){return iu(this.w,q(K({},e),{groupClass:`apexcharts-pie-name-label-group`,textClass:`apexcharts-pie-name-label`,connectorClass:`apexcharts-pie-label-connector`}))}},cu=Math.PI/180,lu=180/Math.PI;function uu(e,t,n,r){return{x:e+n*Math.cos((r-90)*cu),y:t+n*Math.sin((r-90)*cu)}}var $=e=>`${e.x} ${e.y}`;function du({cx:e,cy:t,rIn:n,rOut:r,a0:i,a1:a,r:o,spanDeg:s}){let c=(n,r)=>uu(e,t,n,r),l=o/r*lu,u=o/n*lu,d=c(r,i+l),f=c(r,a-l),p=+(s-2*l>180),m=c(r,a),h=c(r-o,a),g=c(r,i),_=c(r-o,i),v=c(n,a-u),y=c(n,i+u),b=+(s-2*u>180),x=c(n,a),S=c(n+o,a),C=c(n,i),w=c(n+o,i);return[`M`,$(d),`A`,r,r,0,p,1,$(f),`Q`,$(m),$(h),`L`,$(S),`Q`,$(x),$(v),`A`,n,n,0,b,0,$(y),`Q`,$(C),$(w),`L`,$(_),`Q`,$(g),$(d),`Z`].join(` `)}function fu({cx:e,cy:t,rOut:n,a0:r,a1:i,r:a,spanDeg:o}){let s=(n,r)=>uu(e,t,n,r),c=a/n*lu,l=s(n,r+c),u=s(n,i-c),d=+(o-2*c>180),f=s(n,i),p=s(n-a,i),m=s(n,r),h=s(n-a,r);return[`M`,$(l),`A`,n,n,0,d,1,$(u),`Q`,$(f),$(p),`L`,`${e} ${t}`,`L`,$(h),`Q`,$(m),$(l),`Z`].join(` `)}function pu({cx:e,cy:t,rIn:n,rOut:r,a0:i,a1:a,spanDeg:o}){let s=(n,r)=>uu(e,t,n,r),c=+(o>180),l=s(r,i),u=s(r,a),d=s(n,a),f=s(n,i);return[`M`,$(l),`A`,r,r,0,c,1,$(u),`L`,$(d),`A`,n,n,0,c,0,$(f),`Z`].join(` `)}var mu=`transform 320ms cubic-bezier(0.25, 0.8, 0.3, 1)`,hu=`opacity 180ms ease-out`,gu=class{constructor(e,t){this.ctx=t,this.w=e,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animBeginArr=[0],this.animDur=0,this.donutDataLabels=this.w.config.plotOptions.pie.donut.labels,this.lineColorArr=e.globals.stroke.colors===void 0?e.globals.colors:e.globals.stroke.colors,this.defaultSize=Math.min(e.layout.gridWidth,e.layout.gridHeight),this.centerY=e.layout.gridHeight/2,this.centerX=e.layout.gridWidth/2,this.fullAngle=e.config.chart.type===`radialBar`?360:Math.abs(e.config.plotOptions.pie.endAngle-e.config.plotOptions.pie.startAngle),this.initialAngle=e.config.plotOptions.pie.startAngle%this.fullAngle,e.globals.radialSize=this.defaultSize/2.05-e.config.stroke.width-(e.config.chart.sparkline.enabled?0:e.config.chart.dropShadow.blur),this.externalCfg=e.config.plotOptions.pie.dataLabels.external;let n=e.config.dataLabels.style;this.externalLabelStyle={fontSize:this.externalCfg.fontSize||n.fontSize,fontFamily:this.externalCfg.fontFamily||n.fontFamily,fontWeight:this.externalCfg.fontWeight||n.fontWeight},this.externalLabels=[],this.externalLabelMaxLines=1,this.externalLabelLineH=parseFloat(this.externalLabelStyle.fontSize)||12,e.globals.pieExternalLabelMarginY=0,this.showExternalLabels=this.externalCfg.show&&this.chartType!==`polarArea`,this.showExternalLabels&&!e.globals.noData&&this.reserveExternalLabelSpace(),this.donutSize=e.globals.radialSize*parseInt(e.config.plotOptions.pie.donut.size,10)/100;let r=e.config.plotOptions.pie.customScale,i=e.layout.gridWidth/2,a=e.layout.gridHeight/2;this.translateX=i-i*r,this.translateY=a-a*r,this.dataLabelsGroup=new J(this.w).group({class:`apexcharts-datalabels-group`,transform:`translate(${this.translateX}, ${this.translateY}) scale(${r})`}),this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSliceSizes=[],this.sliceLabelGroups={},this.externalLabelGroups={},this.elHoverOutline=null,this.elHoverOutlinePath=null,this.hoverOutlineIndex=-1,this.prevSectorAngleArr=[]}getExternalLabelText(e){let t=this.w,n=t.seriesData.seriesNames[e],r=this.externalCfg.formatter;return typeof r==`function`?r(n,{seriesIndex:e,percent:t.globals.seriesPercent?.[e]?.[0],value:t.globals.seriesTotals?.[e],w:t}):n==null?``:`${n}`}getExternalLabelLines(e){let t=this.getExternalLabelText(e);return(Array.isArray(t)?t:`${t??``}`.split(`
|
|
1954
|
-
`)).map(e=>e==null?``:`${e}`)}reserveExternalLabelSpace(){let e=this.w,t=new su(e),n=(e.seriesData.seriesNames||[]).map((e,t)=>this.getExternalLabelLines(t)),r=t.getMaxLabelWidth(n.flat(),{fontSize:this.externalLabelStyle.fontSize,fontFamily:this.externalLabelStyle.fontFamily});this.externalLabelMaxLines=n.reduce((e,t)=>Math.max(e,t.length),1),this.externalLabelLineH=Math.round((parseFloat(this.externalLabelStyle.fontSize)||12)*1.35);let i=this.externalCfg.connector,a=this.externalLabelMaxLines*this.externalLabelLineH,o=r+(i.length||0)+(i.gap||0)+12,s=a/2+(i.gap||0)+6,c=Math.min(e.globals.radialSize,e.layout.gridWidth/2-o,e.layout.gridHeight/2-s);e.globals.radialSize=Math.max(c,this.defaultSize*.15),e.globals.pieExternalLabelMarginY=s;let l=e.config.chart.height?String(e.config.chart.height):``,u=l!==``&&l!==`auto`;this.centerY=u?e.layout.gridHeight/2:e.globals.radialSize+s}draw(e){let t=this,n=this.w,r=new J(this.w),i=r.group({class:`apexcharts-pie`});if(n.globals.noData)return i;let a=0;for(let t=0;t<e.length;t++)a+=Q.negToZero(e[t]);let o=[],s=r.group();a===0&&(a=1e-5),e.forEach(e=>{this.maxY=Math.max(this.maxY,e)}),n.config.yaxis[0].max&&(this.maxY=n.config.yaxis[0].max),n.config.grid.position===`back`&&this.chartType===`polarArea`&&this.drawPolarElements(i);let c=n.globals.collapsedSeriesIndices||[],l=1;if(this.chartType===`polarArea`){let t=0;for(let n=0;n<e.length;n++)c.indexOf(n)===-1&&t++;l=Math.max(1,t)}for(let t=0;t<e.length;t++){let r=this.fullAngle*Q.negToZero(e[t])/a;o.push(r),this.chartType===`polarArea`?(o[t]=c.indexOf(t)>-1?0:this.fullAngle/l,this.sliceSizes.push(n.globals.radialSize*e[t]/(this.maxY||1))):this.sliceSizes.push(n.globals.radialSize)}let u=this.ctx.morphTypeChange?.isActive()===!0;if(n.globals.dataChanged&&!u){if(this.chartType===`polarArea`){let e=n.globals.previousPaths,t=n.globals.prevPolarAngles;if(Array.isArray(t)&&t.length===e.length)this.prevSectorAngleArr=t.slice();else for(let t=0;t<e.length;t++)this.prevSectorAngleArr.push(this.fullAngle/Math.max(1,e.length));let r=0;for(let t=0;t<e.length;t++)r=Math.max(r,Q.negToZero(e[t]));n.config.yaxis[0].max&&(r=n.config.yaxis[0].max),this.prevSliceSizes=e.map(e=>n.globals.radialSize*Q.negToZero(e)/(r||1))}else{let e=0;for(let t=0;t<n.globals.previousPaths.length;t++)e+=Q.negToZero(n.globals.previousPaths[t]);let t;for(let r=0;r<n.globals.previousPaths.length;r++)t=this.fullAngle*Q.negToZero(n.globals.previousPaths[r])/e,this.prevSectorAngleArr.push(t)}}if(this.chartType===`polarArea`&&(n.globals.prevPolarAngles=o.slice()),this.donutSize<0&&(this.donutSize=0),this.chartType===`donut`){let e=r.drawCircle(this.donutSize);e.attr({cx:this.centerX,cy:this.centerY,fill:n.config.plotOptions.pie.donut.background?n.config.plotOptions.pie.donut.background:`transparent`}),s.add(e)}let d=t.drawArcs(o,e);if(this.sliceLabels.forEach(e=>{d.add(e)}),s.attr({transform:`translate(${this.translateX}, ${this.translateY}) scale(${n.config.plotOptions.pie.customScale})`}),s.add(d),i.add(s),this.donutDataLabels.show){let e=this.initialAnim&&!n.globals.resized&&!n.globals.dataChanged&&this.animDur>0,t=this.renderInnerDataLabels(this.dataLabelsGroup,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:e?0:this.donutDataLabels.show});if(e){let e=this.dataLabelsGroup.node;e.style.transition=`opacity 280ms ease-out`,setTimeout(()=>{e.style.opacity=`1`},this.animDur)}i.add(t)}return n.config.grid.position===`front`&&this.chartType===`polarArea`&&this.drawPolarElements(i),i}drawArcs(e,t){var n,r;let i=this.w,a=new da(this.w),o=new J(this.w),s=new ua(this.w),c=o.group({class:`apexcharts-slices`});this.elHoverOutline=o.group({class:`apexcharts-pie-hover-outline`}),this.elHoverOutline.node.style.pointerEvents=`none`,this.elHoverOutline.node.style.opacity=`0`,i.config.chart.animations.enabled&&(this.elHoverOutline.node.style.transition=hu),c.add(this.elHoverOutline);let l=this.initialAngle,u=this.initialAngle,d=this.initialAngle,f=this.initialAngle;this.strokeWidth=i.config.stroke.show?i.config.stroke.width:0;let p=this.ctx.morphTypeChange?.isActive()===!0;for(let m=0;m<e.length;m++){let h=o.group({class:`apexcharts-series apexcharts-pie-series`,seriesName:Q.escapeString(i.seriesData.seriesNames[m]),rel:m+1,"data:realIndex":m});c.add(h),l=d,u=f,d=l+e[m],f=u+this.prevSectorAngleArr[m];let g=d<l?this.fullAngle+d-l:d-l,_=s.fillPath({seriesNumber:m,size:this.sliceSizes[m],value:t[m]}),v=p?this.ctx.morphTypeChange.getInitialPathFor(m,0):null,y=this.chartType===`polarArea`&&i.globals.dataChanged&&!p?this.prevSliceSizes[m]||0:void 0,b=v||this.getChangedPath(u,f,y),x=o.drawPath({d:b,stroke:Array.isArray(this.lineColorArr)?this.lineColorArr[m]??this.lineColorArr[m%this.lineColorArr.length]:this.lineColorArr,strokeWidth:0,fill:_,fillOpacity:i.config.fill.opacity,classes:`apexcharts-pie-area apexcharts-${this.chartType.toLowerCase()}-slice-${m}`});if(x.attr({index:0,j:m}),a.setSelectionFilter(x,0,m),i.config.chart.dropShadow.enabled){let e=i.config.chart.dropShadow;a.dropShadow(x,e,m)}this.addListeners(x,this.donutDataLabels,m);let S={x:0,y:0},C=(l+g/2)%this.fullAngle,w={x:this.centerX,y:this.centerY};this.chartType===`pie`||this.chartType===`polarArea`?(S=Q.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize/1.25+i.config.plotOptions.pie.dataLabels.offset,C),w=Q.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize/2,C)):this.chartType===`donut`&&(S=Q.polarToCartesian(this.centerX,this.centerY,(i.globals.radialSize+this.donutSize)/2+i.config.plotOptions.pie.dataLabels.offset,C),w=Q.polarToCartesian(this.centerX,this.centerY,(i.globals.radialSize+this.donutSize)/2,C)),J.setAttrs(x.node,{"data:angle":g,"data:startAngle":l,"data:strokeWidth":this.strokeWidth,"data:value":t[m],"data:cx":w.x,"data:cy":w.y}),h.add(x);let T=!1;if(p){let e=this.getPiePath({me:this,startAngle:l,angle:g,size:this.sliceSizes[m]});x.node.setAttribute(`data:pathFinal`,e),T=(n=this.ctx.morphTypeChange).claimsTargetMark?.call(n,m,0)===!0,T&&(x.attr({d:e}),x.node.setAttribute(`data:pathOrig`,e),x.node.setAttribute(`opacity`,`0`),x.node.setAttribute(`data-piece-hidden`,`1`))}let E=0;if(this.initialAnim&&!i.globals.resized&&!i.globals.dataChanged?(E=g/this.fullAngle*i.config.chart.animations.speed,E===0&&(E=1),this.animDur=E+this.animDur,this.animBeginArr.push(this.animDur)):this.animBeginArr.push(0),!T){if(p&&v){let e=this.getPiePath({me:this,startAngle:l,angle:g,size:this.sliceSizes[m]}),t=this.ctx.morphTypeChange.getSpeed(),n=this.ctx.animations;x.node.setAttribute(`data:pathOrig`,e);let r=x.animate(t).plot(e,`polygons`).attr({"stroke-width":this.strokeWidth});r&&typeof r.after==`function`?r.after(()=>n.animationCompleted(x)):n.animationCompleted(x)}else this.dynamicAnim&&i.globals.dataChanged?this.animatePaths(x,{size:this.sliceSizes[m],prevSize:y,endAngle:d,startAngle:l,prevStartAngle:u,prevEndAngle:f,animateStartingPos:!0,i:m,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:i.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(x,{size:this.sliceSizes[m],endAngle:d,startAngle:l,i:m,totalItems:e.length-1,animBeginArr:this.animBeginArr,dur:E})}if(this.getExpandOffset()>0?x.node.addEventListener(`mouseup`,this.pieClicked.bind(this,m)):m===0&&da.drilldownBlocksSliceOffset(i)&&((r=this.ctx.drilldown)==null||r.warnSliceOffsetDisabled()),i.interact.selectedDataPoints[0]!==void 0&&i.interact.selectedDataPoints[0].indexOf(m)>-1){if(this.initialAnim&&!i.globals.resized&&!i.globals.dataChanged&&this.animDur>0){let e=this,t=m;setTimeout(()=>e.pieClicked(t,{animate:!1}),this.animDur)}else this.pieClicked(m,{animate:!1})}if(i.config.dataLabels.enabled){let t=S.x,n=S.y,r=100*g/this.fullAngle+`%`;if(g!==0&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabel<e[m]){let e=i.config.dataLabels.formatter;e!==void 0&&(r=e(i.globals.seriesPercent[m][0],{seriesIndex:m,w:i}));let s=i.globals.dataLabels.style.colors[m],c=o.group({class:`apexcharts-datalabels`}),l=o.drawText({x:t,y:n,text:r,textAnchor:`middle`,fontSize:i.config.dataLabels.style.fontSize,fontFamily:i.config.dataLabels.style.fontFamily,fontWeight:i.config.dataLabels.style.fontWeight,foreColor:s});if(c.add(l),i.config.dataLabels.dropShadow.enabled){let e=i.config.dataLabels.dropShadow;a.dropShadow(l,e)}l.node.classList.add(`apexcharts-pie-label`),i.config.chart.animations.animate&&i.globals.resized===!1&&(l.node.classList.add(`apexcharts-pie-label-delay`),l.node.style.animationDelay=i.config.chart.animations.speed/940+`s`),this.sliceLabels.push(c),this.sliceLabelGroups[m]=c.node}}if(this.showExternalLabels&&g!==0){let e=this.getExternalLabelLines(m);if(e.some(e=>e!==``)){let t=Q.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize,C),n=Q.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize+(this.externalCfg.connector.gap||0),C),r=n.x>=this.centerX,a=r?n.x+(this.externalCfg.connector.length||0):n.x-(this.externalCfg.connector.length||0);this.externalLabels.push({i:m,lines:e,anchor:t,elbow:n,side:r?`right`:`left`,labelX:a+parseFloat(this.externalCfg.offsetX||0),idealY:n.y+parseFloat(this.externalCfg.offsetY||0),connectorColor:this.externalCfg.connector.color||i.globals.colors[m],foreColor:this.externalCfg.color||i.config.chart.foreColor})}}}if(this.showExternalLabels&&this.externalLabels.length){this.placeExternalLabels();let e=Z.isBrowser()&&(p||this.dynamicAnim&&i.globals.dataChanged||this.initialAnim&&!i.globals.resized&&!i.globals.dataChanged);this.externalLabels.forEach(t=>{let n=new su(i).drawExternalLabel({lines:t.lines,lineHeight:this.externalLabelLineH,anchor:t.anchor,elbow:t.elbow,labelX:t.labelX,labelY:t.labelY,side:t.side,connector:{show:this.externalCfg.connector.show,width:this.externalCfg.connector.width,color:t.connectorColor},style:this.externalLabelStyle,foreColor:t.foreColor});e&&(n.node.classList.add(`apexcharts-element-hidden`),i.globals.delayedElements.push({el:n.node})),this.externalLabelGroups[t.i]=n.node,c.add(n)})}return c}placeExternalLabels(){let e=this.w,t=this.externalLabelMaxLines*this.externalLabelLineH+2,n=this.centerY+e.globals.radialSize+e.globals.pieExternalLabelMarginY;[`left`,`right`].forEach(e=>{ou(this.externalLabels.filter(t=>t.side===e),t,n)})}addListeners(e,t,n){let r=new J(this.w,this.ctx);e.node.addEventListener(`mouseenter`,r.pathMouseEnter.bind(r,e)),e.node.addEventListener(`mouseleave`,r.pathMouseLeave.bind(r,e)),e.node.addEventListener(`mouseleave`,this.revertDataLabelsInner.bind(this)),typeof n==`number`&&(e.node.addEventListener(`mouseenter`,this.showHoverOutline.bind(this,n)),e.node.addEventListener(`mouseleave`,this.hideHoverOutline.bind(this))),e.node.addEventListener(`mousedown`,r.pathMouseDown.bind(r,e)),this.donutDataLabels.total.showAlways||(e.node.addEventListener(`mouseenter`,this.printDataLabelsInner.bind(this,e.node,t)),e.node.addEventListener(`mousedown`,this.printDataLabelsInner.bind(this,e.node,t)))}animatePaths(e,t){let n=this.w,r=this,i=t.endAngle<t.startAngle?this.fullAngle+t.endAngle-t.startAngle:t.endAngle-t.startAngle,a=i,o=t.startAngle,s=t.startAngle;t.prevStartAngle!==void 0&&t.prevEndAngle!==void 0&&(o=t.prevEndAngle,a=t.prevEndAngle<t.prevStartAngle?this.fullAngle+t.prevEndAngle-t.prevStartAngle:t.prevEndAngle-t.prevStartAngle),t.i===n.config.series.length-1&&(i+s>this.fullAngle?t.endAngle-=i+s:i+s<this.fullAngle&&(t.endAngle+=this.fullAngle-(i+s))),i===this.fullAngle&&(i=this.fullAngle-.01),r.animateArc(e,o,s,i,a,t)}animateArc(e,t,n,r,i,a){let o=this,s=this.w,c=new Yi(this.w),l=a.size,u;(isNaN(t)||isNaN(i))&&(t=n,i=r,a.dur=0);let d=r,f=n,p=t<n?this.fullAngle+t-n:t-n,m=typeof a.prevSize==`number`;s.globals.dataChanged&&a.shouldSetPrevPaths&&a.prevEndAngle&&(u=o.getPiePath({me:o,startAngle:a.prevStartAngle,angle:a.prevEndAngle<a.prevStartAngle?this.fullAngle+a.prevEndAngle-a.prevStartAngle:a.prevEndAngle-a.prevStartAngle,size:m?a.prevSize:l}),e.attr({d:u})),a.dur===0?(u=o.getPiePath({me:o,startAngle:f,angle:r,size:l}),a.isTrack||(s.globals.animationEnded=!0),e.node.setAttribute(`data:pathOrig`,u),e.attr({d:u,"stroke-width":o.strokeWidth})):e.animate(a.dur,a.animBeginArr[a.i]).after(function(){(o.chartType===`pie`||o.chartType===`donut`||o.chartType===`polarArea`)&&this.animate(s.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":o.strokeWidth}),a.i===s.config.series.length-1&&c.animationCompleted(e)}).during(s=>{d=p+(r-p)*s,a.animateStartingPos&&(d=i+(r-i)*s,f=t-i+(n-(t-i))*s),u=o.getPiePath({me:o,startAngle:f,angle:d,size:m?a.prevSize+(l-a.prevSize)*s:l}),e.node.setAttribute(`data:pathOrig`,u),e.attr({d:u})})}pieClicked(e,t){let n=this.w,r=this,i=!(t&&t.animate===!1),a=n.dom.Paper.findOne(`.apexcharts-${r.chartType.toLowerCase()}-slice-${e}`);if(!a)return;if(a.attr(`data:pieClicked`)===`true`){a.attr({"data:pieClicked":`false`}),this.revertDataLabelsInner(),this.offsetSlice(e,0,i);return}let o=n.dom.baseEl.getElementsByClassName(`apexcharts-pie-area`);Array.prototype.forEach.call(o,e=>{let t=e.getAttribute(`data:pieClicked`)===`true`;e.setAttribute(`data:pieClicked`,`false`),t&&this.offsetSlice(parseInt(e.getAttribute(`j`),10),0,i)}),n.interact.capturedDataPointIndex=e,a.attr(`data:pieClicked`,`true`),this.offsetSlice(e,this.getExpandOffset(),i)}getExpandOffset(){let e=this.w.config.plotOptions.pie;if(!e.expandOnClick||this.chartType===`polarArea`||da.drilldownBlocksSliceOffset(this.w))return 0;let t=Number(e.expandOffset);return Number.isFinite(t)&&t>0?t:0}getSliceMovers(e){let t=this.w.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${e}`);return[t?t.node:null,this.sliceLabelGroups[e],this.externalLabelGroups[e],this.hoverOutlineIndex===e&&this.elHoverOutlinePath?this.elHoverOutlinePath.node:null].filter(Boolean)}offsetSlice(e,t,n=!0){let r=this.w;if(!r.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${e}`))return;let{dx:i,dy:a}=this.getSliceOffsetVector(e,t),o=`translate(${i} ${a})`,s=n&&r.config.chart.animations.enabled?mu:``;this.getSliceMovers(e).forEach(e=>{e.style.transition=s,e.setAttribute(`transform`,o)})}getSliceOffsetVector(e,t){let n=this.w.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${e}`),r=n?parseFloat(n.attr(`data:angle`)):NaN;if(!t||!Number.isFinite(r)||r>=this.fullAngle)return{dx:0,dy:0};let i=parseFloat(n.attr(`data:startAngle`)),a=Math.PI*(i+r/2-90)/180;return{dx:t*Math.cos(a),dy:t*Math.sin(a)}}showHoverOutline(e){let t=this.w;if(!da.hoverOutlineOwnsHoverState(t)||!this.elHoverOutline)return;let n=this.getHoverOutlinePath(e);if(!n)return;let r=t.config.plotOptions.pie.hoverOutline,i=r.color||t.globals.colors[e];if(!this.elHoverOutlinePath){let e=new J(t);this.elHoverOutlinePath=e.drawPath({d:n,fill:i,strokeWidth:0,classes:`apexcharts-pie-hover-outline-band`}),this.elHoverOutline.add(this.elHoverOutlinePath)}this.elHoverOutlinePath.attr({d:n,fill:i,"fill-opacity":r.opacity});let{dx:a,dy:o}=this.getSliceOffsetVector(e,this.isSliceOut(e)?this.getExpandOffset():0);this.elHoverOutlinePath.node.style.transition=``,this.elHoverOutlinePath.node.setAttribute(`transform`,`translate(${a} ${o})`),this.hoverOutlineIndex=e,this.elHoverOutline.node.style.opacity=`1`}hideHoverOutline(){this.elHoverOutline&&(this.elHoverOutline.node.style.opacity=`0`)}isSliceOut(e){let t=this.w.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${e}`);return!!t&&t.attr(`data:pieClicked`)===`true`}getHoverOutlinePath(e){let t=this.w,n=t.config.plotOptions.pie.hoverOutline,r=t.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${e}`);if(!r)return null;let i=parseFloat(r.attr(`data:angle`));if(!Number.isFinite(i)||i<=0)return null;let a=this.sliceSizes[e],o=Number(n.size);if(!Number.isFinite(a)||!Number.isFinite(o)||o<=0)return null;let{startDeg:s,spanDeg:c}=this.getSliceExtent({me:this,startAngle:parseFloat(r.attr(`data:startAngle`)),angle:i,size:a});if(!(c>0))return null;let l=a+(this.strokeWidth||0)/2+(Number(n.gap)||0),u=l+o,d={cx:this.centerX,cy:this.centerY,rIn:l,rOut:u,a0:s,a1:s+c,spanDeg:c},f=Math.min(o/2,c*Math.PI/180/2*l);return f>.5?du(q(K({},d),{r:f})):pu(d)}getChangedPath(e,t,n){let r=``;return this.dynamicAnim&&this.w.globals.dataChanged&&(r=this.getPiePath({me:this,startAngle:e,angle:t-e,size:typeof n==`number`?n:this.size})),r}getSliceExtent({me:e,startAngle:t,angle:n,size:r}){let i=this.w,a=t,o=n+t;Math.ceil(o)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(o=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01);let s=o-a,c=e.chartType===`pie`||e.chartType===`donut`||e.chartType===`polarArea`,l=i.config.plotOptions.pie.spacing;if(c&&l>0&&s>0){let t=e.chartType===`donut`?(r+e.donutSize)/2:r,n=t>0?l/t*(180/Math.PI):0,i=Math.min(n/2,Math.max(0,s/2-.5));a+=i,s-=2*i}return o=a+s,Math.ceil(o)>this.fullAngle&&(o-=this.fullAngle),{startDeg:a,spanDeg:s,endDeg:o}}getPiePath({me:e,startAngle:t,angle:n,size:r}){let i,a=this.w,o=new J(this.w),{startDeg:s,spanDeg:c,endDeg:l}=this.getSliceExtent({me:e,startAngle:t,angle:n,size:r}),u=e.chartType===`pie`||e.chartType===`donut`||e.chartType===`polarArea`,d=Math.PI*(s-90)/180,f=a.config.plotOptions.pie.borderRadius;if(f>0&&u){let t=this.getRoundedSlicePath({me:e,startDeg:s,spanDeg:c,size:r,borderRadius:f});if(t)return t}let p=Math.PI*(l-90)/180,m=e.centerX+r*Math.cos(d),h=e.centerY+r*Math.sin(d),g=e.centerX+r*Math.cos(p),_=e.centerY+r*Math.sin(p),v=Q.polarToCartesian(e.centerX,e.centerY,e.donutSize,l),y=Q.polarToCartesian(e.centerX,e.centerY,e.donutSize,s),b=+(c>180),x=[`M`,m,h,`A`,r,r,0,b,1,g,_];return i=e.chartType===`donut`?[...x,`L`,v.x,v.y,`A`,e.donutSize,e.donutSize,0,b,0,y.x,y.y,`L`,m,h,`z`].join(` `):e.chartType===`pie`||e.chartType===`polarArea`?[...x,`L`,e.centerX,e.centerY,`L`,m,h].join(` `):[...x].join(` `),o.roundPathCorners(i,this.strokeWidth*2)}getRoundedSlicePath({me:e,startDeg:t,spanDeg:n,size:r,borderRadius:i}){if(!(n>0))return null;let a=Math.PI/180,o=e.centerX,s=e.centerY,c=e.chartType===`donut`,l=r,u=c?e.donutSize:0,d=n*a,f=i;if(f=Math.min(f,d*l/2),c?(f=Math.min(f,d*u/2),f=Math.min(f,(l-u)/2)):f=Math.min(f,l/2),!(f>.5))return null;let p=t,m=t+n;return c?du({cx:o,cy:s,rIn:u,rOut:l,a0:p,a1:m,r:f,spanDeg:n}):fu({cx:o,cy:s,rOut:l,a0:p,a1:m,r:f,spanDeg:n})}drawPolarElements(e){let t=this.w,n=new ga(this.w),r=new J(this.w),i=new su(this.w),a=r.group(),o=r.group(),s=n.niceScale(0,Math.ceil(this.maxY),0),c=s.result.reverse(),l=s.result.length;this.maxY=s.niceMax;let u=t.globals.radialSize,d=u/(l-1);for(let e=0;e<l-1;e++){let n=r.drawCircle(u);if(n.attr({cx:this.centerX,cy:this.centerY,fill:`none`,"stroke-width":t.config.plotOptions.polarArea.rings.strokeWidth,stroke:t.config.plotOptions.polarArea.rings.strokeColor}),t.config.yaxis[0].show){let n=i.drawYAxisTexts(this.centerX,this.centerY-u+parseInt(t.config.yaxis[0].labels.style.fontSize,10)/2,e,c[e]);o.add(n)}a.add(n),u-=d}this.drawSpokes(e),e.add(a),e.add(o)}renderInnerDataLabels(e,t,n){let r=this.w,i=new J(this.w),a=t.total.show;e.node.innerHTML=``,e.node.style.opacity=n.opacity;let o=n.centerX,s=this.donutDataLabels.total.label?n.centerY:n.centerY-n.centerY/6,c,l;c=t.name.color===void 0?r.globals.colors[0]:t.name.color;let u=t.name.fontSize,d=t.name.fontFamily,f=t.name.fontWeight;l=t.value.color===void 0?r.config.chart.foreColor:t.value.color;let p=t.value.formatter,m=``,h=``;if(a?(c=t.total.color,u=t.total.fontSize,d=t.total.fontFamily,f=t.total.fontWeight,h=this.donutDataLabels.total.label?t.total.label:``,m=t.total.formatter(r)):r.seriesData.series.length===1&&(m=p(r.seriesData.series[0],r),h=r.seriesData.seriesNames[0]),h&&=t.name.formatter(h,t.total.show,r),t.name.show){let n=i.drawText({x:o,y:s+parseFloat(t.name.offsetY),text:h,textAnchor:`middle`,foreColor:c,fontSize:u,fontWeight:f,fontFamily:d});n.node.classList.add(`apexcharts-datalabel-label`),e.add(n)}if(t.value.show){let n=t.name.show?parseFloat(t.value.offsetY)+16:t.value.offsetY,r=i.drawText({x:o,y:s+n,text:m,textAnchor:`middle`,foreColor:l,fontWeight:t.value.fontWeight,fontSize:t.value.fontSize,fontFamily:t.value.fontFamily});r.node.classList.add(`apexcharts-datalabel-value`),e.add(r)}return e}printInnerLabels(e,t,n,r){let i=this.w,a;r?a=e.name.color===void 0?i.globals.colors[parseInt(r.parentNode.getAttribute(`rel`),10)-1]:e.name.color:i.seriesData.series.length>1&&e.total.show&&(a=e.total.color);let o=i.dom.baseEl.querySelector(`.apexcharts-datalabel-label`),s=i.dom.baseEl.querySelector(`.apexcharts-datalabel-value`),c=e.value.formatter;n=c(n,i),!r&&typeof e.total.formatter==`function`&&(n=e.total.formatter(i));let l=t===e.total.label;if(t=this.donutDataLabels.total.label?e.name.formatter(t,l,i):``,o!==null&&(o.textContent=t),s!==null&&(s.textContent=n),o!==null){let e=o;e.style.fill=a}}printDataLabelsInner(e,t){let n=this.w,r=e.getAttribute(`data:value`),i=n.seriesData.seriesNames[parseInt(e.parentNode.getAttribute(`rel`),10)-1];n.seriesData.series.length>1&&this.printInnerLabels(t,i,r,e);let a=n.dom.baseEl.querySelector(`.apexcharts-datalabels-group`);if(a!==null){let e=a;e.style.opacity=`1`}}drawSpokes(e){let t=this.w,n=new J(this.w),r=t.config.plotOptions.polarArea.spokes;if(r.strokeWidth===0)return;let i=[],a=360/t.seriesData.series.length;for(let e=0;e<t.seriesData.series.length;e++)i.push(Q.polarToCartesian(this.centerX,this.centerY,t.globals.radialSize,t.config.plotOptions.pie.startAngle+a*e));i.forEach((t,i)=>{let a=n.drawLine(t.x,t.y,this.centerX,this.centerY,Array.isArray(r.connectorColors)?r.connectorColors[i]:r.connectorColors);e.add(a)})}revertDataLabelsInner(){let e=this.w;if(this.donutDataLabels.show){let t=e.dom.Paper.findOne(`.apexcharts-datalabels-group`),n=this.renderInnerDataLabels(t,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});e.dom.Paper.findOne(`.apexcharts-radialbar, .apexcharts-pie`).add(n)}}},_u=5,vu=class{constructor(e,t){this.ctx=t,this.w=e,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0,this.graphics=new J(this.w),this.lineColorArr=e.globals.stroke.colors===void 0?e.globals.colors:e.globals.stroke.colors,this.defaultSize=e.globals.svgHeight<e.globals.svgWidth?e.layout.gridHeight:e.layout.gridWidth,this.isLog=e.config.yaxis[0].logarithmic,this.logBase=e.config.yaxis[0].logBase,this.coreUtils=new aa(this.w),this.maxValue=this.isLog?this.coreUtils.getLogVal(this.logBase,e.globals.maxY,0):e.globals.maxY,this.minValue=this.isLog?this.coreUtils.getLogVal(this.logBase,this.w.globals.minY,0):e.globals.minY,this.polygons=e.config.plotOptions.radar.polygons,this.strokeWidth=e.config.stroke.show?e.config.stroke.width:0,this.size=this.defaultSize/2.1-this.strokeWidth-e.config.chart.dropShadow.blur,e.config.xaxis.labels.show&&(this.size-=e.layout.xAxisLabelsWidth/1.75),e.config.plotOptions.radar.size!==void 0&&(this.size=e.config.plotOptions.radar.size),this.dataRadiusOfPercent=[],this.dataRadius=[],this.angleArr=[],this.dataPointsLen=0,this.disAngle=0,this.yaxisLabelsTextsPos=[]}draw(e){let t=this.w,n=new ua(this.w),r=[],i=new ca(this.w,this.ctx);e.length&&(this.dataPointsLen=e[t.globals.maxValsInArrayIndex].length),this.disAngle=Math.PI*2/this.dataPointsLen;let a=t.layout.gridWidth/2,o=t.layout.gridHeight/2,s=a+t.config.plotOptions.radar.offsetX,c=o+t.config.plotOptions.radar.offsetY,l=this.graphics.group({class:`apexcharts-radar-series apexcharts-plot-series`,transform:`translate(${s||0}, ${c||0})`}),u=[],d=null,f=null;if(this.yaxisLabels=this.graphics.group({class:`apexcharts-yaxis`}),e.forEach((e,a)=>{let o=e.length===t.globals.dataPoints,s=this.graphics.group().attr({class:`apexcharts-series`,"data:longestSeries":o,seriesName:Q.escapeString(t.seriesData.seriesNames[a]),rel:a+1,"data:realIndex":a});this.dataRadiusOfPercent[a]=[],this.dataRadius[a]=[],this.angleArr[a]=[],e.forEach((e,t)=>{let n=Math.abs(this.maxValue-this.minValue);e-=this.minValue,this.isLog&&(e=this.coreUtils.getLogVal(this.logBase,e,0)),this.dataRadiusOfPercent[a][t]=e/n,this.dataRadius[a][t]=this.dataRadiusOfPercent[a][t]*this.size,this.angleArr[a][t]=t*this.disAngle}),u=this.getDataPointsPos(this.dataRadius[a],this.angleArr[a]);let c=this.createPaths(u,{x:0,y:0});d=this.graphics.group({class:`apexcharts-series-markers-wrap apexcharts-element-hidden`}),f=this.graphics.group({class:`apexcharts-datalabels`,"data:realIndex":a}),t.globals.delayedElements.push({el:d.node,index:a});let l={i:a,realIndex:a,animationDelay:a,initialSpeed:t.config.chart.animations.speed,dataChangeSpeed:t.config.chart.animations.dynamicAnimation.speed,className:`apexcharts-radar`,shouldClipToGrid:!1,bindEventsOnPaths:!1,stroke:t.globals.stroke.colors[a],strokeLineCap:t.config.stroke.lineCap},p=null;t.globals.previousPaths.length>0&&(p=this.getPreviousPath(a));for(let e=0;e<c.linePathsTo.length;e++){let r=this.graphics.renderPaths(q(K({},l),{pathFrom:p===null?c.linePathsFrom[e]:p,pathTo:c.linePathsTo[e],strokeWidth:Array.isArray(this.strokeWidth)?this.strokeWidth[a]:this.strokeWidth,fill:`none`,drawShadow:!1}));s.add(r);let i=n.fillPath({seriesNumber:a}),o=this.graphics.renderPaths(q(K({},l),{pathFrom:p===null?c.areaPathsFrom[e]:p,pathTo:c.areaPathsTo[e],strokeWidth:0,fill:i,drawShadow:!1,drawMask:{type:`radial`,cx:0,cy:0,r:this.size}}));if(t.config.chart.dropShadow.enabled){let e=new da(this.w),n=t.config.chart.dropShadow;e.dropShadow(o,Object.assign({},n,{noUserSpaceOnUse:!0}),a)}s.add(o)}e.forEach((e,n)=>{let r=new pa(this.w,this.ctx).getMarkerConfig({cssClass:`apexcharts-marker`,seriesIndex:a,dataPointIndex:n});r.pSize||(r.pSize=_u,r.pointFillColor=`transparent`,r.pointStrokeColor=`transparent`,r.pointStrokeWidth=0);let o=this.graphics.drawMarker(u[n].x,u[n].y,r);o.attr(`rel`,n),o.attr(`j`,n),o.attr(`index`,a),o.node.setAttribute(`default-marker-size`,r.pSize);let c=this.graphics.group({class:`apexcharts-series-markers`});c&&c.add(o),d.add(c),s.add(d);let l=t.config.dataLabels;if(l.enabled){let e=l.formatter(t.seriesData.series[a][n],{seriesIndex:a,dataPointIndex:n,w:t});i.plotDataLabelsText({x:u[n].x,y:u[n].y,text:e,textAnchor:`middle`,i:a,j:a,seriesIndex:a,dataPointIndex:n,parent:f,offsetCorrection:!1,dataLabelsConfig:K({},l)})}s.add(f)}),r.push(s)}),this.drawPolygons({parent:l}),t.config.xaxis.labels.show){let e=this.drawXAxisTexts();l.add(e)}return r.forEach(e=>{l.add(e)}),l.add(this.yaxisLabels),l}drawPolygons(e){let t=this.w,{parent:n}=e,r=new su(this.w),i=t.globals.yAxisScale[0].result.reverse(),a=i.length,o=[],s=this.size/(a-1);for(let e=0;e<a;e++)o[e]=s*e;o.reverse();let c=[],l=[];o.forEach((e,t)=>{let n=Q.getPolygonPos(e,this.dataPointsLen),r=``;n.forEach((e,n)=>{if(t===0){let t=this.graphics.drawLine(e.x,e.y,0,0,Array.isArray(this.polygons.connectorColors)?this.polygons.connectorColors[n]:this.polygons.connectorColors);l.push(t)}n===0&&this.yaxisLabelsTextsPos.push({x:e.x,y:e.y}),r+=e.x+`,`+e.y+` `}),c.push(r)}),c.forEach((e,r)=>{let i=this.polygons.strokeColors,a=this.polygons.strokeWidth,o=this.graphics.drawPolygon(e,Array.isArray(i)?i[r]:i,Array.isArray(a)?a[r]:a,t.globals.radarPolygons.fill.colors[r]);n.add(o)}),l.forEach(e=>{n.add(e)}),t.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach((e,t)=>{let n=r.drawYAxisTexts(e.x,e.y,t,i[t]);this.yaxisLabels.add(n)})}drawXAxisTexts(){let e=this.w,t=e.config.xaxis.labels,n=this.graphics.group({class:`apexcharts-xaxis`}),r=Q.getPolygonPos(this.size,this.dataPointsLen);return e.labelData.labels.forEach((i,a)=>{let o=e.config.xaxis.labels.formatter,s=new ca(this.w,this.ctx);if(r[a]){let c=this.getTextPos(r[a],this.size),l=o(i,{seriesIndex:-1,dataPointIndex:a,w:e});s.plotDataLabelsText({x:c.newX,y:c.newY,text:l,textAnchor:c.textAnchor,i:a,j:a,parent:n,className:`apexcharts-xaxis-label`,color:Array.isArray(t.style.colors)&&t.style.colors[a]?t.style.colors[a]:`#a8a8a8`,dataLabelsConfig:K({textAnchor:c.textAnchor,dropShadow:{enabled:!1}},t),offsetCorrection:!1}).on(`click`,t=>{if(typeof e.config.chart.events.xAxisLabelClick==`function`){let n=Object.assign({},e,{labelIndex:a});e.config.chart.events.xAxisLabelClick(t,this.ctx,n)}})}}),n}createPaths(e,t){let n=[],r=[],i=[],a=[];if(e.length){r=[this.graphics.move(t.x,t.y)],a=[this.graphics.move(t.x,t.y)];let o=this.graphics.move(e[0].x,e[0].y),s=this.graphics.move(e[0].x,e[0].y);e.forEach((t,n)=>{o+=this.graphics.line(t.x,t.y),s+=this.graphics.line(t.x,t.y),n===e.length-1&&(o+=`Z`,s+=`Z`)}),n.push(o),i.push(s)}return{linePathsFrom:r,linePathsTo:n,areaPathsFrom:a,areaPathsTo:i}}getTextPos(e,t){let n=`middle`,r=e.x,i=e.y;return Math.abs(e.x)>=10?e.x>0?(n=`start`,r+=10):e.x<0&&(n=`end`,r-=10):n=`middle`,Math.abs(e.y)>=t-10&&(e.y<0?i-=10:e.y>0&&(i+=10)),{textAnchor:n,newX:r,newY:i}}getPreviousPath(e){let t=this.w,n=null;for(let r=0;r<t.globals.previousPaths.length;r++){let i=t.globals.previousPaths[r];i.paths.length>0&&parseInt(i.realIndex,10)===parseInt(String(e),10)&&t.globals.previousPaths[r].paths[0]!==void 0&&(n=t.globals.previousPaths[r].paths[0].d)}return n}getDataPointsPos(e,t,n=this.dataPointsLen){e||=[],t||=[];let r=[];for(let i=0;i<n;i++){let n={};n.x=e[i]*Math.sin(t[i]),n.y=-e[i]*Math.cos(t[i]),r.push(n)}return r}},yu=class extends gu{constructor(e,t){super(e,t),this.ctx=t,this.w=e,this.animBeginArr=[0],this.animDur=0,this.startAngle=e.config.plotOptions.radialBar.startAngle,this.endAngle=e.config.plotOptions.radialBar.endAngle,this.totalAngle=Math.abs(e.config.plotOptions.radialBar.endAngle-e.config.plotOptions.radialBar.startAngle),this.trackStartAngle=e.config.plotOptions.radialBar.track.startAngle,this.trackEndAngle=e.config.plotOptions.radialBar.track.endAngle,this.barLabels=this.w.config.plotOptions.radialBar.barLabels,this.donutDataLabels=this.w.config.plotOptions.radialBar.dataLabels,this.radialDataLabels=this.donutDataLabels,this.trackStartAngle||=this.startAngle,this.trackEndAngle||=this.endAngle,this.endAngle===360&&(this.endAngle=359.99),this.margin=parseInt(e.config.plotOptions.radialBar.track.margin,10),this.onBarLabelClick=this.onBarLabelClick.bind(this)}draw(e){let t=this.w,n=new J(this.w),r=n.group({class:`apexcharts-radialbar`});if(t.globals.noData)return r;let i=n.group(),a=t.layout.gridHeight/2,o=t.layout.gridWidth/2,s=this.defaultSize/2.05;t.config.chart.sparkline.enabled||(s=s-t.config.stroke.width-t.config.chart.dropShadow.blur);let c=t.globals.fill.colors,l=t.config.plotOptions.radialBar,u=Array.isArray(l.bands)&&l.bands.length>0,d=u&&l.bandsStyle&&l.bandsStyle.hideTrackWhenPresent,f=l.shape===`needle`;if(l.track.show&&!d){let t=this.drawTracks({size:s,centerX:o,centerY:a,colorArr:c,series:e});i.add(t)}if(u){let t=this.drawBands({size:s,centerX:o,centerY:a,series:e});i.add(t)}let p=this.drawArcs({size:s,centerX:o,centerY:a,colorArr:c,series:e,skipValueArc:f&&!l.needle?.showValueArc});if(l.ticks&&l.ticks.show){let n=this.drawTicks({size:s,centerX:o,centerY:a,series:e});if(this.initialAnim&&!t.globals.dataChanged&&!t.globals.resized&&Z.isBrowser()&&t.globals.shouldAnimate){let e=n.node;e.style.opacity=`0`,e.style.transition=`opacity 280ms ease-out`;let r=t.config.chart.animations.speed||800;setTimeout(()=>{e.style.opacity=`1`},r)}i.add(n)}if(f){let t=this.drawNeedle({size:s,centerX:o,centerY:a,series:e});i.add(t)}let m=360;t.config.plotOptions.radialBar.startAngle<0&&(m=this.totalAngle);let h=(360-m)/360;if(t.globals.radialSize=s-s*h,this.radialDataLabels.value.show){let e=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);t.globals.radialSize+=e*h}return i.add(p.g),t.config.plotOptions.radialBar.hollow.position===`front`&&(p.g.add(p.elHollow),p.dataLabels&&p.g.add(p.dataLabels)),r.add(i),r}drawTracks(e){let t=this.w,n=new J(this.w),r=n.group({class:`apexcharts-tracks`}),i=new da(this.w),a=new ua(this.w),o=this.getStrokeWidth(e);e.size-=o/2;for(let s=0;s<e.series.length;s++){let c=n.group({class:`apexcharts-radialbar-track apexcharts-track`});r.add(c),c.attr({rel:s+1}),e.size=e.size-o-this.margin;let l=t.config.plotOptions.radialBar.track,u=a.fillPath({seriesNumber:0,size:e.size,fillColors:Array.isArray(l.background)?l.background[s]:l.background,solid:!0}),d=this.trackStartAngle,f=this.trackEndAngle;Math.abs(f)+Math.abs(d)>=360&&(f=360-Math.abs(this.startAngle)-.1);let p=n.drawPath({d:``,stroke:u,strokeWidth:o*parseInt(l.strokeWidth,10)/100,fill:`none`,strokeOpacity:l.opacity,classes:`apexcharts-radialbar-area`});if(l.dropShadow.enabled){let e=l.dropShadow;i.dropShadow(p,e)}c.add(p),p.attr(`id`,`apexcharts-radialbarTrack-`+s),this.animatePaths(p,{centerX:e.centerX,centerY:e.centerY,endAngle:f,startAngle:d,size:e.size,i:s,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return r}drawArcs(e){let t=this.w,n=new J(this.w),r=new ua(this.w),i=new da(this.w),a=n.group(),o=this.getStrokeWidth(e);e.size-=o/2;let s=t.config.plotOptions.radialBar.hollow.background,c=e.size-o*e.series.length-this.margin*e.series.length-o*parseInt(t.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,l=c-t.config.plotOptions.radialBar.hollow.margin;t.config.plotOptions.radialBar.hollow.image!==void 0&&(s=this.drawHollowImage(e,a,c,s));let u=this.drawHollow({size:l,centerX:e.centerX,centerY:e.centerY,fill:s||`transparent`});if(t.config.plotOptions.radialBar.hollow.dropShadow.enabled){let e=t.config.plotOptions.radialBar.hollow.dropShadow;i.dropShadow(u,e)}let d=1;!this.radialDataLabels.total.show&&t.seriesData.series.length>1&&(d=0);let f=null;if(this.radialDataLabels.show){let n=t.dom.Paper.findOne(`.apexcharts-datalabels-group`);f=this.renderInnerDataLabels(n,this.radialDataLabels,{hollowSize:c,centerX:e.centerX,centerY:e.centerY,opacity:d})}t.config.plotOptions.radialBar.hollow.position===`back`&&(a.add(u),f&&a.add(f));let p=!1;t.config.plotOptions.radialBar.inverseOrder&&(p=!0);let m=this.ctx.morphTypeChange?.isActive()===!0;for(let s=p?e.series.length-1:0;p?s>=0:s<e.series.length;p?s--:s++){let c=n.group({class:`apexcharts-series apexcharts-radial-series`,seriesName:Q.escapeString(t.seriesData.seriesNames[s])});a.add(c),c.attr({rel:s+1,"data:realIndex":s}),Y.addCollapsedClassToSeries(this.w,c,s),e.size=e.size-o-this.margin;let l=r.fillPath({seriesNumber:s,size:e.size,value:e.series[s]}),u=this.startAngle,d,f=t.config.plotOptions.radialBar,p=typeof f.min==`number`?f.min:0,h=typeof f.max==`number`?f.max:100,g=h===p?1:h-p,_=e=>Math.max(0,(Math.min(Math.max(e,p),h)-p)/g),v=_(Q.negToZero(e.series[s])),y=Math.round(this.totalAngle*v)+this.startAngle,b;t.globals.dataChanged&&(d=this.startAngle,b=Math.round(this.totalAngle*_(Q.negToZero(t.globals.previousPaths[s])))+d),Math.abs(y)+Math.abs(u)>360&&(y-=.01),Math.abs(b)+Math.abs(d)>360&&(b-=.01);let x=y-u,S=Array.isArray(t.config.stroke.dashArray)?t.config.stroke.dashArray[s]:t.config.stroke.dashArray,C=m?this.ctx.morphTypeChange.getInitialPathFor(s,0):null,w=m?this.ctx.morphTypeChange.getFromType():null,T=!!C&&(w===`bar`||w===`funnel`||w===`pyramid`||w===`pie`||w===`donut`||w===`polarArea`),E=n.drawPath({d:C||``,stroke:T||e.skipValueArc?`transparent`:l,strokeWidth:T||e.skipValueArc?0:o,fill:T?l:`none`,fillOpacity:t.config.fill.opacity,classes:`apexcharts-radialbar-area apexcharts-radialbar-slice-`+s,strokeDashArray:S}),D=u+x/2,O=Q.polarToCartesian(e.centerX,e.centerY,e.size,D);if(J.setAttrs(E.node,{"data:angle":x,"data:value":e.series[s],"data:cx":O.x,"data:cy":O.y}),t.config.chart.dropShadow.enabled){let e=t.config.chart.dropShadow;i.dropShadow(E,e,s)}if(i.setSelectionFilter(E,0,s),this.addListeners(E,this.radialDataLabels),c.add(E),E.attr({index:0,j:s}),this.barLabels.enabled){let r=Q.polarToCartesian(e.centerX,e.centerY,e.size,u),i=this.barLabels.formatter(t.seriesData.seriesNames[s],{seriesIndex:s,w:t}),a=[`apexcharts-radialbar-label`];this.barLabels.onClick||a.push(`apexcharts-no-click`);let o=this.barLabels.useSeriesColors?t.globals.colors[s]:t.config.chart.foreColor;o||=t.config.chart.foreColor;let l=r.x+this.barLabels.offsetX,d=r.y+this.barLabels.offsetY,f=n.drawText({x:l,y:d,text:i,textAnchor:`end`,dominantBaseline:`middle`,fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:o,cssClass:a.join(` `)});f.on(`click`,this.onBarLabelClick),f.attr({rel:s+1}),u!==0&&f.attr({"transform-origin":`${l} ${d}`,transform:`rotate(${u} 0 0)`}),c.add(f)}let k=0;if(this.initialAnim&&!t.globals.resized&&!t.globals.dataChanged&&(k=t.config.chart.animations.speed),t.globals.dataChanged&&(k=t.config.chart.animations.dynamicAnimation.speed),this.animDur=k/(e.series.length*1.2)+this.animDur,this.animBeginArr.push(this.animDur),m&&C){let t=this.ctx.morphTypeChange.getSpeed(),n=this.getPiePath({me:this,startAngle:u,angle:x,size:e.size});if(T){let r=this.ctx.morphTypeChange.buildRingSegmentPath(e.centerX,e.centerY,e.size,o,u,u+x);E.animate(t).plot(r,`polygons`).after(function(){this.attr({d:n,fill:`none`,stroke:e.skipValueArc?`transparent`:l,"stroke-width":e.skipValueArc?0:o})})}else E.animate(t).plot(n,`polygons`).attr({"stroke-width":o})}else this.animatePaths(E,{centerX:e.centerX,centerY:e.centerY,endAngle:y,startAngle:u,prevEndAngle:b,prevStartAngle:d,size:e.size,i:s,totalItems:2,animBeginArr:this.animBeginArr,dur:k,shouldSetPrevPaths:!0})}return{g:a,elHollow:u,dataLabels:f}}_angleAtValue(e){let t=this.w.config.plotOptions.radialBar,n=typeof t.min==`number`?t.min:0,r=typeof t.max==`number`?t.max:100,i=r===n?n+1:r,a=(Math.max(n,Math.min(i,Number(e)))-n)/(i-n);return this.startAngle+a*(this.endAngle-this.startAngle)}_describeArc(e,t,n,r,i){let a=Q.polarToCartesian(e,t,n,i),o=Q.polarToCartesian(e,t,n,r),s=i-r,c=+(Math.abs(s)>180);return`M ${a.x} ${a.y} A ${n} ${n} 0 ${c} 0 ${o.x} ${o.y}`}drawBands(e){let t=this.w,n=new J(this.w),r=t.config.plotOptions.radialBar,i=r.bands||[],a=n.group({class:`apexcharts-gauge-bands`}),o=this.getStrokeWidth(e),s=e.size-o/2-o-this.margin,c=o*parseInt(r.bandsStyle.strokeWidth,10)/100,l=typeof r.min==`number`?r.min:0,u=typeof r.max==`number`?r.max:100,d=u===l?0:(r.bandsStyle.gap||0)*((this.endAngle-this.startAngle)/(u-l));for(let t=0;t<i.length;t++){let o=i[t];if(o.from===void 0||o.to===void 0)continue;let l=this._angleAtValue(o.from),u=this._angleAtValue(o.to),f=Math.min(l,u)+d/2,p=Math.max(l,u)-d/2;if(p-f<=0)continue;let m=n.drawPath({d:this._describeArc(e.centerX,e.centerY,s,f,p),stroke:o.color||`#ccc`,strokeWidth:c,fill:`none`,strokeLinecap:r.bandsStyle.linecap||`butt`,classes:`apexcharts-gauge-band`});m.node.setAttribute(`data-band-index`,String(t)),a.add(m)}return a}drawTicks(e){let t=this.w,n=new J(this.w),r=t.config.plotOptions.radialBar,i=r.ticks,a=n.group({class:`apexcharts-gauge-ticks`}),o=this.getStrokeWidth(e),s=e.size-o/2-o-this.margin,c=typeof r.min==`number`?r.min:0,l=typeof r.max==`number`?r.max:100,u=Math.max(2,i.major?.count??11),d=Math.max(0,i.minor?.count??0),f=(t,r,o)=>{let c=this._angleAtValue(t),l=r.length??8,u=r.placement===`inside`?s-l:s,d=r.placement===`inside`?s:s+l,f=Q.polarToCartesian(e.centerX,e.centerY,u,c),p=Q.polarToCartesian(e.centerX,e.centerY,d,c),m=n.drawLine(f.x,f.y,p.x,p.y,r.color||(o?`#666`:`#999`),0,r.width||(o?2:1));if(a.add(m),o&&i.labels?.show){let o=(r.placement===`inside`?u:d)+(r.placement===`inside`?-1:1)*(i.labels.offset??6),s=Q.polarToCartesian(e.centerX,e.centerY,o,c),l=typeof i.labels.formatter==`function`?i.labels.formatter(t):String(t),f=n.drawText({x:s.x,y:s.y,text:l,textAnchor:`middle`,dominantBaseline:`middle`,fontFamily:i.labels.fontFamily,fontSize:i.labels.fontSize,fontWeight:i.labels.fontWeight,foreColor:i.labels.color,cssClass:`apexcharts-gauge-tick-label`});a.add(f)}};for(let e=0;e<u;e++)if(f(c+e/(u-1)*(l-c),i.major||{},!0),e<u-1&&d>0)for(let t=1;t<=d;t++)f(c+(e+t/(d+1))/(u-1)*(l-c),i.minor||{},!1);return a}drawNeedle(e){let t=this.w,n=new J(this.w),r=t.config.plotOptions.radialBar.needle||{},i=n.group({class:`apexcharts-gauge-needle`});if(!e.series||e.series.length===0)return i;let a=this.getStrokeWidth(e),o=e.size-a/2-a-this.margin,s=typeof r.length==`string`&&r.length.endsWith(`%`)?o*parseInt(r.length,10)/100:Number(r.length||o*.85),c=r.baseWidth??4,l=r.tipWidth??1,u=r.color||`#333`,d=e.centerX,f=Number(r.offsetY??0),p=e.centerY+f,m=`M ${d+c/2} ${p} A ${c/2} ${c/2} 0 0 1 ${d-c/2} ${p} L ${d-l/2} ${p-s} L ${d+l/2} ${p-s} Z`,h=n.drawPath({d:m,stroke:u,strokeWidth:0,fill:u,classes:`apexcharts-gauge-needle-shape`});i.add(h);let g=Number(e.series[0]),_=this._angleAtValue(g),v=this.initialAnim&&!t.globals.dataChanged&&!t.globals.resized,y=this.ctx,b=typeof y._lastNeedleAngle==`number`?y._lastNeedleAngle:this.startAngle;if(y._lastNeedleAngle=_,Z.isBrowser()&&t.globals.shouldAnimate&&(v||t.globals.dataChanged)&&b!==_){let e=i.node;e.setAttribute(`transform-origin`,`${d} ${p}`),e.setAttribute(`transform`,`rotate(${b})`);let n=r.animation?.duration&&Number(r.animation.duration)||r.animationSpeed&&Number(r.animationSpeed)||t.config.chart.animations.dynamicAnimation?.speed||t.config.chart.animations.speed||800,a=v?e=>1+2.70158*(e-1)**3+1.70158*(e-1)**2:e=>1-(1-e)**3;t.globals.radialNeedleRAF!=null&&(X.cancelAnimationFrame(t.globals.radialNeedleRAF),t.globals.radialNeedleRAF=null);let o=performance.now(),s=r=>{if(this.w.globals.isDestroyed){t.globals.radialNeedleRAF=null;return}let i=Math.max(0,Math.min(1,(r-o)/n)),c=b+(_-b)*a(i);e.setAttribute(`transform`,`rotate(${c})`),i<1?t.globals.radialNeedleRAF=X.requestAnimationFrame(s):t.globals.radialNeedleRAF=null};t.globals.radialNeedleRAF=X.requestAnimationFrame(s)}else i.attr({"transform-origin":`${d} ${p}`,transform:`rotate(${_})`});return i}drawHollow(e){let t=new J(this.w),n=this.w.config.plotOptions.radialBar.hollow,r=t.drawCircle(e.size*2),i={class:`apexcharts-radialbar-hollow`,cx:e.centerX,cy:e.centerY,r:e.size,fill:e.fill};return(n.stroke||n.strokeDasharray)&&(i.stroke=n.stroke||`transparent`,i[`stroke-width`]=n.strokeWidth??1,n.strokeDasharray&&(i[`stroke-dasharray`]=n.strokeDasharray)),r.attr(i),r}drawHollowImage(e,t,n,r){let i=this.w,a=new ua(this.w),o=Q.randomId(),s=i.config.plotOptions.radialBar.hollow.image;if(i.config.plotOptions.radialBar.hollow.imageClipped)a.clippedImgArea({width:n,height:n,image:s,patternID:`pattern${i.globals.cuid}${o}`}),r=`url(#pattern${i.globals.cuid}${o})`;else{let n=i.config.plotOptions.radialBar.hollow.imageWidth,r=i.config.plotOptions.radialBar.hollow.imageHeight;if(n===void 0&&r===void 0){let n=i.dom.Paper.image(s,function(t){this.move(e.centerX-t.width/2+i.config.plotOptions.radialBar.hollow.imageOffsetX,e.centerY-t.height/2+i.config.plotOptions.radialBar.hollow.imageOffsetY)});t.add(n)}else{let a=i.dom.Paper.image(s,function(){this.move(e.centerX-n/2+i.config.plotOptions.radialBar.hollow.imageOffsetX,e.centerY-r/2+i.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(n,r)});t.add(a)}}return r}getStrokeWidth(e){let t=this.w;return e.size*(100-parseInt(t.config.plotOptions.radialBar.hollow.size,10))/100/(e.series.length+1)-this.margin}onBarLabelClick(e){let t=e.target,n=parseInt(t.getAttribute(`rel`)??``,10)-1,r=this.barLabels.onClick,i=this.w;r&&r(i.seriesData.seriesNames[n],{w:i,seriesIndex:n})}},bu=class extends jl{draw(e,t){let n=this.w,r=new J(this.w);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=e,this.seriesRangeStart=n.rangeData.seriesRangeStart,this.seriesRangeEnd=n.rangeData.seriesRangeEnd,this.barHelpers.initVariables(e);let i=r.group({class:`apexcharts-rangebar-series apexcharts-plot-series`});for(let a=0;a<e.length;a++){let o,s,c=n.globals.comboCharts?t[a]:a,{columnGroupIndex:l}=this.barHelpers.getGroupIndex(c),u=r.group({class:`apexcharts-series`,seriesName:Q.escapeString(n.seriesData.seriesNames[c]),rel:a+1,"data:realIndex":c});Y.addCollapsedClassToSeries(this.w,u,c),e[a].length>0&&(this.visibleI+=1);let d=0;this.yRatio.length>1&&(this.yaxisIndex=n.globals.seriesYAxisReverseMap[c][0],d=c);let f=this.barHelpers.initialPositions(c),{y:p,zeroW:m,x:h,zeroH:g}=f,_=f.barWidth??0,v=f.barHeight??0,y=f.yDivision??0,b=f.xDivision??0;s=p,o=h;let x=r.group({class:`apexcharts-datalabels`,"data:realIndex":c}),S=r.group({class:`apexcharts-rangebar-goals-markers`});for(let t=0;t<n.globals.dataPoints;t++){let r=this.barHelpers.getStrokeWidth(a,t,c),i=this.seriesRangeStart[a][t],p=this.seriesRangeEnd[a][t],h=null,C=null,w=null,T={x:o,y:s,strokeWidth:r,elSeries:u},E=this.seriesLen;if(n.config.plotOptions.bar.rangeBarGroupRows&&(E=1),n.config.series[a].data?.[t]===void 0)break;if(this.isHorizontal){w=s+v*this.visibleI;let e=(y-v*E)/2;if(n.config.series[a].data?.[t]?.x){let n=this.detectOverlappingBars({i:a,j:t,barYPosition:w,srty:e,barHeight:v,yDivision:y,initPositions:f});v=n.barHeight,w=n.barYPosition}h=this.drawRangeBarPaths(K({indexes:{i:a,j:t,realIndex:c},barHeight:v,barYPosition:w,zeroW:m,yDivision:y,y1:i,y2:p},T)),_=h.barWidth}else{n.axisFlags.isXNumeric&&(o=(n.seriesData.seriesX[a][t]-n.globals.minX)/this.xRatio-_/2),C=o+_*this.visibleI;let e=(b-_*E)/2;if(n.config.series[a].data?.[t]?.x){let n=this.detectOverlappingBars({i:a,j:t,barXPosition:C,srtx:e,barWidth:_,xDivision:b,initPositions:f});_=n.barWidth,C=n.barXPosition}h=this.drawRangeColumnPaths(K({indexes:{i:a,j:t,realIndex:c,translationsIndex:d},barWidth:_,barXPosition:C,zeroH:g,xDivision:b},T)),v=h.barHeight}let D=this.barHelpers.drawGoalLine({barXPosition:h.barXPosition,barYPosition:w,goalX:h.goalX,goalY:h.goalY,barHeight:v,barWidth:_});D&&S.add(D),s=h.y,o=h.x;let O=this.barHelpers.getPathFillColor(e,a,t,c);this.renderSeries({realIndex:c,pathFill:O.color,lineFill:O.useRangeColor?O.color:n.globals.stroke.colors[c],j:t,i:a,x:o,y:s,y1:i,y2:p,pathFrom:h.pathFrom,pathTo:h.pathTo,strokeWidth:r,elSeries:u,series:e,barHeight:v,barWidth:_,barXPosition:C,barYPosition:w,columnGroupIndex:l,elDataLabelsWrap:x,elGoalsMarkers:S,visibleSeries:this.visibleI,type:`rangebar`})}i.add(u)}return i}detectOverlappingBars({i:e,j:t,barYPosition:n,barXPosition:r,srty:i,srtx:a,barHeight:o,barWidth:s,yDivision:c,xDivision:l,initPositions:u}){let d=this.w,f=[],p=d.globals.seriesRangeName?.[e]?.[t],m=d.config.series[e].data?.[t]?.x,h=Array.isArray(m)?m.join(` `):m,g=d.labelData.labels.map(e=>Array.isArray(e)?e.join(` `):e).indexOf(h),_=d.rangeData.seriesRange[e].findIndex(e=>e.x===h&&e.overlaps?.size>0);return this.isHorizontal?(n=d.config.plotOptions.bar.rangeBarGroupRows?i+c*g:i+o*this.visibleI+c*g,_>-1&&!d.config.plotOptions.bar.rangeBarOverlap&&(f=Array.from(d.rangeData.seriesRange[e][_].overlaps),f.indexOf(p)>-1&&(o=u.barHeight/f.length,n=o*this.visibleI+c*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+f.indexOf(p))+c*g))):(g>-1&&!d.labelData.timescaleLabels.length&&(r=d.config.plotOptions.bar.rangeBarGroupRows?a+l*g:a+s*this.visibleI+l*g),_>-1&&!d.config.plotOptions.bar.rangeBarOverlap&&(f=Array.from(d.rangeData.seriesRange[e][_].overlaps),f.indexOf(p)>-1&&(s=u.barWidth/f.length,r=s*this.visibleI+l*(100-parseInt(this.barOptions.barWidth,10))/100/2+s*(this.visibleI+f.indexOf(p))+l*g))),{barYPosition:n,barXPosition:r,barHeight:o,barWidth:s}}drawRangeColumnPaths({indexes:e,x:t,xDivision:n,barWidth:r,barXPosition:i,zeroH:a}){let o=this.w,{i:s,j:c,realIndex:l,translationsIndex:u}=e,d=this.yRatio[u],f=this.getRangeValue(l,c),p=Math.min(f.start,f.end),m=Math.max(f.start,f.end),h=this.series[s]?.[c]!==void 0&&this.series[s]?.[c]!==null;h?(p=a-p/d,m=a-m/d):p=a;let g=Math.abs(m-p),_=this.barHelpers.getColumnPaths({barXPosition:i,barWidth:r,y1:p,y2:m,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:l,i:l,j:c,w:o});if(h){let e=_.drawnBox,t=f.end>=f.start;this.recordColumnGeometry(l,c,{slotStart:e.x1,slotEnd:e.x2,levelStart:t?e.y1:e.y2,levelEnd:t?e.y2:e.y1,horizontal:!1})}if(!o.axisFlags.isXNumeric)t+=n;else{let e=this.getBarXForNumericXAxis({x:t,j:c,realIndex:l,barWidth:r});t=e.x,i=e.barXPosition}return{pathTo:_.pathTo,pathFrom:_.pathFrom,barHeight:g,x:t,y:f.start<0&&f.end<0?p:m,goalY:this.barHelpers.getGoalValues(`y`,null,a,l,c,u),barXPosition:i}}preventBarOverflow(e){let t=this.w;return e<0&&(e=0),e>t.layout.gridWidth&&(e=t.layout.gridWidth),e}drawRangeBarPaths({indexes:e,y:t,y1:n,y2:r,yDivision:i,barHeight:a,barYPosition:o,zeroW:s}){let c=this.w,{realIndex:l,j:u}=e,d=this.preventBarOverflow(s+n/this.invertedYRatio),f=this.preventBarOverflow(s+r/this.invertedYRatio),p=this.getRangeValue(l,u),m=Math.abs(f-d),h=this.barHelpers.getBarpaths({barYPosition:o,barHeight:a,x1:d,x2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:l,realIndex:l,j:u,w:c});if(p.start!=null&&p.end!=null){let e=h.drawnBox;this.recordColumnGeometry(l,u,{slotStart:e.y1,slotEnd:e.y2,levelStart:e.x1,levelEnd:e.x2,horizontal:!0})}return c.axisFlags.isXNumeric||(t+=i),{pathTo:h.pathTo,pathFrom:h.pathFrom,barWidth:m,x:p.start<0&&p.end<0?d:f,goalX:this.barHelpers.getGoalValues(`x`,s,null,l,u,0),y:t}}recordColumnGeometry(e,t,n){let r=this.w.waterfallData&&this.w.waterfallData.geometry;r&&isFinite(n.slotStart)&&isFinite(n.levelEnd)&&(r[e]||(r[e]=[]),r[e][t]=n)}getRangeValue(e,t){let n=this.w;return{start:n.rangeData.seriesRangeStart[e][t],end:n.rangeData.seriesRangeEnd[e][t]}}};function xu(e,t){let n=0;for(let t=0;t<e.length;t++)n+=e[t];let r=t/n,i=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]*r;return i}function Su(e,t,n,r){let i=r*r,a=n*n;return Math.max(i*t/a,a/(i*e))}function Cu(e,t,n,r,i,a){return e===0||Su(t,n,r,a)>=Su(Math.min(t,i),Math.max(n,i),r+i,a)}function wu(e,t,n,r,i,a,o,s){if(o>=s){let o=r/s,c=a;for(let r=0;r<n;r++){let n=t[r]/o;e.push([i,c,i+o,c+n]),c+=n}}else{let s=r/o,c=i;for(let r=0;r<n;r++){let n=t[r]/s;e.push([c,a,c+n,a+s]),c+=n}}}function Tu(e,t,n,r,i){let a=[],o=e.length;if(o===0)return a;let s=Array(o),c=0,l=0,u=1/0,d=-1/0,f=0;for(;f<o;){let o=Math.min(r,i),p=e[f];if(Cu(c,u,d,l,p,o))s[c]=p,c++,l+=p,p<u&&(u=p),p>d&&(d=p),f++;else{if(wu(a,s,c,l,t,n,r,i),r>=i){let e=l/i;t+=e,r-=e}else{let e=l/r;n+=e,i-=e}c=0,l=0,u=1/0,d=-1/0}}return c>0&&wu(a,s,c,l,t,n,r,i),a}function Eu(e,t,n){let r=e.length,i=Array(r);for(let t=0;t<r;t++){let n=0,r=e[t];for(let e=0;e<r.length;e++)n+=r[e];i[t]=n}let a=Tu(xu(i,t*n),0,0,t,n),o=Array(r);for(let t=0;t<r;t++){let n=a[t],r=n[0],i=n[1],s=n[2]-r,c=n[3]-i;o[t]=Tu(xu(e[t],s*c),r,i,s,c)}return o}function Du(e){let t=e.children;if(t&&t.length){let n=0;for(let e=0;e<t.length;e++)n+=Du(t[e]);return e._area=n,n}let n=Number(e.value),r=isNaN(n)?0:Math.abs(n);return e._area=r,r}function Ou(e,t,n,r,i,a,o,s){let c=e.length;if(c===0||r<=0||i<=0)return;let l=Array(c),u=0;for(let t=0;t<c;t++)l[t]=e[t]._area,u+=l[t];if(u<=0)return;let d=Tu(xu(l,r*i),t,n,r,i);for(let t=0;t<c;t++){let n=e[t],r=d[t];if(!r)continue;n.rect=r,n.depth=a;let i=n.children;if(!i||!i.length)continue;let c=r[2]-r[0],l=r[3]-r[1],u=Math.max(0,o(n,a,c,l)||0);(u*2>=c||u*2>=l)&&(u=0);let f=Math.max(0,s(n,a,c,l)||0);f>0&&l-u*2-f<f&&(f=0),n.headerHeight=f,Ou(i,r[0]+u,r[1]+f+u,c-u*2,l-f-u*2,a+1,o,s)}}function ku(e,t,n,r={}){if(!Array.isArray(e)||e.length===0)return e||[];let i=r.padding||(()=>0),a=r.header||(()=>0);for(let t=0;t<e.length;t++)Du(e[t]);return Ou(e,0,0,t,n,0,i,a),e}var Au={generate:Eu,generateNested:ku};function ju(e,t){let n=e.config.drilldown;return(n&&Array.isArray(n.series)?n.series:[]).find(e=>e&&e.id===t)}function Mu(e,t,n,r,i,a=null,o={}){let s=t&&typeof t==`object`,c=s?t.x??t.name??``:``,l=Number(s?t.y??t.value:t),u={name:String(c),value:isNaN(l)?null:l,color:s&&t.color?t.color:void 0,_key:`${i}/${n}:${c}`};if(r&&!u.color&&(u.color=r[n%r.length]),o.keepDatum&&(u._datum=t),s&&Array.isArray(t.children)&&t.children.length)u.children=t.children.map((t,n)=>Mu(e,t,n,null,u._key,a,o));else if(s&&t.drilldown!=null&&o.expandDrilldown!==!1){let n=a||new Set;if(!n.has(t.drilldown)){let r=ju(e,t.drilldown);if(r&&Array.isArray(r.data)&&r.data.length){let i=new Set(n);i.add(t.drilldown);let a=Array.isArray(r.colors)?r.colors:null;u.children=r.data.map((t,n)=>Mu(e,t,n,a,u._key,i,o))}}}return u}function Nu(e,t={}){let n=e.config.series,r=n&&n[0],i=r&&Array.isArray(r.data)?r.data:n;return Array.isArray(i)?i.map((n,r)=>Mu(e,n,r,null,``,null,t)):[]}function Pu(e,t,n={}){let r=t||e.config.series;return Array.isArray(r)?r.map((t,r)=>{let i=t&&Array.isArray(t.data)?t.data:[],a=`${r}:${t?.name??``}`;return{name:String(t?.name??``),value:null,color:t?.color||void 0,_key:a,_seriesIndex:r,children:i.map((t,r)=>Mu(e,t,r,null,a,null,n))}}):[]}function Fu(e){e.children&&e.children.length&&(e.children.forEach(e=>Fu(e)),(e.value==null||isNaN(e.value))&&(e.value=e.children.reduce((e,t)=>e+Math.max(0,t.value||0),0))),(e.value==null||isNaN(e.value))&&(e.value=0)}function Iu(e){if(typeof e!=`string`)return``;let t=e.indexOf(`/`);return t===-1?``:e.slice(t)}function Lu(e){let t=[],n=0;return e.forEach((e,r)=>{let i=[],a=(e,t,o)=>{e._parent=o,e._depth=t,e._si=r,e._leaf=!(e.children&&e.children.length),t>n&&(n=t),e._leaf?(e._di=i.length,i.push(e)):(e._di=-1,e.children.forEach(n=>a(n,t+1,e)))};a(e,0,null),t.push(i)}),{leaves:t,maxDepth:n}}function Ru(e){let t=e.globals.treemapRoots;if(t&&t.length)return{roots:t,maxDepth:e.globals.treemapMaxDepth||1,nested:!0};let n=Pu(e,e.config.series,{keepDatum:!0,expandDrilldown:!1});n.forEach(Fu);let{maxDepth:r}=Lu(n);return{roots:n,maxDepth:r,nested:!1}}var zu=e=>(e[2]-e[0])*(e[3]-e[1]),Bu=class{constructor(e,t){this.ctx=t,this.w=e,this.strokeWidth=this.w.config.stroke.width,this.helpers=new Zl(e,t),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[],this.roots=[],this.drawn=[],this.nested=!1,this.showParents=!1,this.scale=null,this._levelCache=null,this._total=null,this._avgLabelSize=null,this._tooltipEl=null,this._tipOwned=!1,this._morphLeafIndex=0}draw(e){let t=this.w,n=new J(this.w,this.ctx),r=new ua(this.w),i=n.group({class:`apexcharts-treemap`});if(t.globals.noData)return i;e.forEach(e=>{e.map(e=>Math.abs(e))}),this.negRange=this.helpers.checkColorRange(),t.config.series.forEach((e,t)=>{e.data.forEach(e=>{Array.isArray(this.labels[t])||(this.labels[t]=[]),this.labels[t].push(e.x)})});let a=Ru(t);this.nested=a.nested,this.roots=a.roots,this.scale=Io(t);let o=a.roots.length===1?a.roots[0].children||[]:a.roots;this.drawn=o;let s=t.config.plotOptions.treemap.parents;this.showParents=s.show===!0||s.show!==!1&&this.nested;let c=this._resolveFocus(o),l=c?[c]:o;Au.generateNested(l,t.layout.gridWidth,t.layout.gridHeight,{padding:(e,t,n,r)=>this.showParents?this._levelPadding(t,n,r):0,header:(e,t,n,r)=>this.showParents?this._levelHeader(e,t,n,r):0});let u=this.ctx?.morphTypeChange,d=!!u&&typeof u.isActive==`function`&&u.isActive()&&typeof u.getInitialPathAt==`function`;this._morphLeafIndex=0;let f=this._leavesBySeries(l,t.config.series.length),p=this.showParents?this._parentsBySeries(l,t.config.series.length):[];return f.forEach((a,o)=>{let s=n.group({class:`apexcharts-series apexcharts-treemap-series`,seriesName:Q.escapeString(t.seriesData.seriesNames[o]),rel:o+1,"data:realIndex":o});if(n.setupEventDelegation(s,`.apexcharts-treemap-rect`),t.config.chart.dropShadow.enabled){let e=t.config.chart.dropShadow;new da(this.w).dropShadow(i,e,o)}let c=n.group({class:`apexcharts-data-labels`}),l={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0};this.showParents&&(p[o]||[]).forEach(e=>{this._drawParent(s,e,o)});let u=t.config.chart.animations,f=u.animateGradually,m=f&&f.enabled!==!1,h=Array(a.length).fill(0);if(m){let e=a.length||1,t=Math.min(f.delay||0,u.speed*.5/e);a.map((e,t)=>({j:t,area:e.rect?zu(e.rect):0})).sort((e,t)=>t.area-e.area).forEach((e,n)=>{h[e.j]=n*t})}a.forEach((i,a)=>{let c=i.rect;if(!c)return;let u=i._di,f=c[0],p=c[1],m=c[2],g=c[3];l.xMin=Math.min(l.xMin,f),l.yMin=Math.min(l.yMin,p),l.xMax=Math.max(l.xMax,m),l.yMax=Math.max(l.yMax,g);let _=this._leafColor(o,u),v=_.color,y=r.fillPath({color:v,seriesNumber:o,dataPointIndex:u}),b=d?this._morphSourceForLeaf(i):null,x=b?n.drawPath({d:this._tilePath(f,p,m,g),fill:`#fff`,stroke:t.config.plotOptions.treemap.useFillColorAsStroke?v:t.globals.stroke.colors[o],strokeWidth:this.strokeWidth,fillOpacity:1}):n.drawRect(f,p,m-f,g-p,t.config.plotOptions.treemap.borderRadius,`#fff`,1,this.strokeWidth,t.config.plotOptions.treemap.useFillColorAsStroke?v:t.globals.stroke.colors[o]);x.attr({cx:f,cy:p,index:o,i:o,j:u,width:m-f,height:g-p,fill:y}),x.node.classList.add(`apexcharts-treemap-rect`),x.node.setAttribute(`data:key`,Iu(i._key));let S={x:f+(m-f)/2,y:p+(g-p)/2,width:0,height:0},C={x:f,y:p,width:m-f,height:g-p};if(b)this._morphTile(x,b,this._tilePath(f,p,m,g),this.ctx.morphTypeChange.getSpeed(),o,u);else if(t.config.chart.animations.enabled&&!t.globals.dataChanged){let e=1;t.globals.resized||(e=t.config.chart.animations.speed),this.animateTreemap(x,S,C,e,h[a]||0)}if(t.globals.dataChanged){let e=1;this.dynamicAnim.enabled&&t.globals.shouldAnimate&&(e=this.dynamicAnim.speed,t.globals.previousPaths[o]&&t.globals.previousPaths[o][u]&&t.globals.previousPaths[o][u].rect&&(S=t.globals.previousPaths[o][u].rect),this.animateTreemap(x,S,C,e))}let w=this.getFontSize(c);t.config.plotOptions.treemap.dataLabels.format===`truncate`&&(w=parseInt(String(t.config.dataLabels.style.fontSize),10));let T=null;if(t.config.dataLabels.enabled&&this._labelCanShow(w,m-f,g-p)){let n=t.config.dataLabels.formatter(this.labels[o][u],{value:t.seriesData.series[o][u],seriesIndex:o,dataPointIndex:u,w:t});t.config.plotOptions.treemap.dataLabels.format===`truncate`&&(n=this.truncateLabels(String(n),w,f,p,m,g)),t.seriesData.series[o][u]&&(T=this.helpers.calculateDataLabels({text:n,x:(f+m)/2,y:(p+g)/2+this.strokeWidth/2+w/3,i:o,j:u,colorProps:_,fontSize:w,series:e})),t.config.dataLabels.enabled&&T&&this.rotateToFitLabel(T,w,n,f,p,m,g)}s.add(x),T!==null&&s.add(T)});let g=t.config.plotOptions.treemap.seriesTitle;if(!this.showParents&&t.config.series.length>1&&g&&g.show){let e=t.config.series[o].name||``;if(e&&l.xMin<1/0&&l.yMin<1/0){let{offsetX:r,offsetY:i,borderColor:a,borderWidth:o,borderRadius:c,style:u}=g,d=u.color||t.config.chart.foreColor,f={left:u.padding.left,right:u.padding.right,top:u.padding.top,bottom:u.padding.bottom},p=n.getTextRects(e,u.fontSize,u.fontFamily),m=p.width+f.left+f.right,h=p.height+f.top+f.bottom,_=l.xMin+(r||0),v=l.yMin+(i||0),y=n.drawRect(_,v,m,h,c,u.background,1,o,a),b=n.drawText({x:_+f.left,y:v+f.top+(p?.height??0)*.75,text:e,fontSize:u.fontSize,fontFamily:u.fontFamily,fontWeight:u.fontWeight,foreColor:d,cssClass:u.cssClass||``});s.add(y),s.add(b)}}s.add(c),i.add(s)}),this._renderBreadcrumb(),i}_levelCfg(e){if(this._levelCache||=[],this._levelCache[e])return this._levelCache[e];let t=this.w.config.plotOptions.treemap,n=t.parents||{},r=(t.levels||[])[e]||{},i=q(K(K({},n),r),{header:q(K(K({},n.header||{}),r.header||{}),{style:K(K({},(n.header||{}).style||{}),(r.header||{}).style||{})}),hover:K(K({},n.hover||{}),r.hover||{})});return this._levelCache[e]=i,i}_levelPadding(e,t,n){let r=this._levelCfg(e);return Number(r.padding)||0}_levelHeader(e,t,n,r){let i=this._levelCfg(t).header||{};if(i.show===!1)return 0;let a=Number(i.height);return!Number.isFinite(a)||a<=0||n<(Number(i.minWidth)||40)||r<a*2?0:a}_leavesBySeries(e,t){let n=Array(Math.max(1,t));for(let e=0;e<n.length;e++)n[e]=[];let r=e=>{if(e.children&&e.children.length)e.children.forEach(r);else{let t=e._si||0;n[t]&&n[t].push(e)}};return e.forEach(r),n}_parentsBySeries(e,t){let n=Array(Math.max(1,t));for(let e=0;e<n.length;e++)n[e]=[];let r=e=>{if(!e.children||!e.children.length)return;let t=e._si||0;n[t]&&n[t].push(e),e.children.forEach(r)};return e.forEach(r),n.forEach(e=>e.sort((e,t)=>(e.depth||0)-(t.depth||0))),n}_leafColor(e,t){let n=this.w;if(this.scale){let r=No(n,e,t);if(r!=null){let e=this.scale.at(r);return{color:e,foreColor:Lo(e),colorProps:{color:e,foreColor:Lo(e),percent:0}}}}return this.helpers.getShadeColor(n.config.chart.type,e,t,this.negRange)}_parentChrome(e){let t=this.w,n=this._levelCfg(e),r=t.config.theme.mode===`dark`,i=(n.header||{}).style||{},a=Math.min(e,3),o=r?255:0,s=`${o},${o},${o}`;return{fill:n.fill||`rgba(${s},${(r?.04:.03)+a*.02})`,fillOpacity:n.fillOpacity==null?1:n.fillOpacity,borderColor:n.borderColor||`rgba(${s},${r?.18:.14})`,borderWidth:n.borderWidth==null?1:n.borderWidth,borderRadius:n.borderRadius==null?t.config.plotOptions.treemap.borderRadius:n.borderRadius,headerBg:i.background||`rgba(${s},${r?.1:.07})`,headerColor:i.color||(r?`#e8e8e8`:t.config.chart.foreColor),headerFontSize:i.fontSize||`12px`,headerFontFamily:i.fontFamily||t.config.chart.fontFamily,headerFontWeight:i.fontWeight==null?600:i.fontWeight,hoverColor:n.hover&&n.hover.color||(r?`rgba(255,255,255,0.85)`:`rgba(0,0,0,0.7)`),hoverWidth:n.hover&&n.hover.width||2,hoverShow:!(n.hover&&n.hover.show===!1)}}_drawParent(e,t,n){let r=t.rect;if(!r)return;let i=this.w,a=new J(this.w,this.ctx),o=t.depth||0,s=this._levelCfg(o),c=this._parentChrome(o),l=r[0],u=r[1],d=r[2]-r[0],f=r[3]-r[1];if(d<=0||f<=0)return;let p=a.group({class:`apexcharts-treemap-parent`,"data:depth":o,"data:name":Q.escapeString(t.name)}),m=Iu(t._key),h=this._morphKeyed()?this.ctx.morphTypeChange.getInitialPathForKey(m):null,g=h?a.drawPath({d:this._tilePath(l,u,l+d,u+f),fill:c.fill,stroke:c.borderColor,strokeWidth:c.borderWidth,fillOpacity:c.fillOpacity}):a.drawRect(l,u,d,f,c.borderRadius,c.fill,c.fillOpacity,c.borderWidth,c.borderColor);g.node.classList.add(`apexcharts-treemap-parent-rect`),g.node.setAttribute(`data:key`,m),g.node.setAttribute(`data:depth`,String(o)),h&&this._morphTile(g,h,this._tilePath(l,u,l+d,u+f),this.ctx.morphTypeChange.getSpeed(),n,o),p.add(g);let _=t.headerHeight||0,v=``;if(_>0){let e=s.header||{},r=a.drawRect(l,u,d,_,0,c.headerBg,1,0,`transparent`);r.node.classList.add(`apexcharts-treemap-parent-header`),p.add(r);let f=String(t.name??``);typeof e.formatter==`function`?f=String(e.formatter(t.name,{value:t.value,depth:o,seriesIndex:n,node:t,w:i})):e.showValue&&(f=`${f} ${this._formatValue(t.value)}`),v=f;let m=Number(e.offsetX)||0,h=e.align||`left`,y=Math.max(0,d-12-Math.abs(m)),b=parseFloat(String(c.headerFontSize))||12,x=a.getTextBasedOnMaxWidth({text:f,maxWidth:y,fontSize:b});if(x){let t=l+6+m,n=`start`;h===`center`?(t=l+d/2+m,n=`middle`):h===`right`&&(t=l+d-6+m,n=`end`);let r=a.drawText({x:t,y:u+_/2+b/3+(Number(e.offsetY)||0),text:x,textAnchor:n,fontSize:c.headerFontSize,fontFamily:c.headerFontFamily,fontWeight:c.headerFontWeight,foreColor:c.headerColor,cssClass:`apexcharts-treemap-parent-label ${e.style&&e.style.cssClass||``}`});r.node.setAttribute(`pointer-events`,`none`),p.add(r)}this._attachParentEvents(r.node,t,c,g),this._makeParentAccessible(r.node,t,c,g,v)}this._attachParentEvents(g.node,t,c,g),p.node.setAttribute(`role`,`group`),p.node.setAttribute(`aria-label`,this._parentLabel(t,v)),e.add(p)}_parentLabel(e,t){let n=this._drawnTotal(),r=n>0?(e._area/n*100).toFixed(1):`0`,i=this._countLeaves(e);return`${t&&String(t).trim()?String(t).replace(/\s+/g,` `).trim():`${e.name}, ${this._formatValue(e._area)}`}, ${i} ${i===1?`item`:`items`}, ${r}% of total`}_makeParentAccessible(e,t,n,r,i){e&&e.setAttribute&&this._zoomEnabled()&&(e.setAttribute(`role`,`button`),e.setAttribute(`tabindex`,`0`),e.setAttribute(`aria-label`,`${this._parentLabel(t,i)}. Zoom in`),e.setAttribute(`aria-expanded`,`false`),Z.isBrowser()&&e.addEventListener&&(e.addEventListener(`focus`,()=>{r.node.setAttribute(`stroke`,n.hoverColor),r.node.setAttribute(`stroke-width`,String(n.hoverWidth+1))}),e.addEventListener(`blur`,()=>{r.node.setAttribute(`stroke`,n.borderColor),r.node.setAttribute(`stroke-width`,String(n.borderWidth))}),e.addEventListener(`keydown`,e=>{(e.key===`Enter`||e.key===` `||e.key===`Spacebar`)&&(e.preventDefault(),this._zoomTo(t,!0))})))}_attachParentEvents(e,t,n,r){if(!Z.isBrowser()||!e||!e.addEventListener)return;let i=this.w;n.hoverShow&&(e.addEventListener(`mouseenter`,()=>{r.node.setAttribute(`stroke`,n.hoverColor),r.node.setAttribute(`stroke-width`,String(n.hoverWidth))}),e.addEventListener(`mouseleave`,()=>{r.node.setAttribute(`stroke`,n.borderColor),r.node.setAttribute(`stroke-width`,String(n.borderWidth))})),i.config.tooltip.enabled&&(e.addEventListener(`mouseenter`,e=>this._showParentTooltip(e,t)),e.addEventListener(`mousemove`,e=>this._positionTooltip(e)),e.addEventListener(`mouseleave`,()=>this._hideParentTooltip())),this._zoomEnabled()&&(e.style.cursor=`pointer`,e.addEventListener(`click`,()=>this._zoomTo(t)))}_zoomEnabled(){let e=this.w,t=e.config.plotOptions.treemap.zoom;if(!t||!t.enabled||!this.showParents)return!1;let n=e.config.drilldown;return n&&n.enabled&&Array.isArray(n.series)&&n.series.length?(this._warnedZoomConflict||(this._warnedZoomConflict=!0,console.warn("ApexCharts treemap: `plotOptions.treemap.zoom` and the drilldown feature both navigate the hierarchy, so zoom is ignored here. Drop `drilldown.series` to zoom a nested treemap instead.")),!1):!0}_resolveFocus(e){let t=this.w.globals.treemapFocusKey;if(!t||!this._zoomEnabled())return null;let n=null,r=e=>{if(!n){if(e._key===t){n=e;return}e.children&&e.children.forEach(r)}};return e.forEach(r),n&&n.children&&n.children.length?n:null}_zoomTo(e,t=!1){let n=this.w;if(!e||!e.children||!e.children.length)return;let r=n.globals.treemapFocusKey===e._key?null:e._key;n.globals.treemapFocusKey=r,this._hideParentTooltip();let i=this.ctx.update();t&&i&&typeof i.then==`function`&&i.then(()=>{if(!Z.isBrowser())return;let e=n.dom.baseEl.querySelector(`.apexcharts-breadcrumb .apexcharts-breadcrumb-item`);if(e&&e.focus){e.focus();return}let t=n.dom.baseEl.querySelector(`.apexcharts-treemap-parent-header[tabindex]`);t&&t.focus&&t.focus()})}_focusChain(){let e=[],t=new Set(this.drawn||[]),n=this._resolveFocus(this.drawn||[]);for(;n&&(e.unshift(n),!t.has(n));)n=n._parent;return e}_breadcrumbCfg(){let e=this.w.config.plotOptions.treemap.zoom;return As(this.w,e&&e.breadcrumb)}_renderBreadcrumb(){if(!Z.isBrowser())return;let e=this.w;if(!e.dom.elWrap||(Ps(e),!this._zoomEnabled()))return;let t=this._focusChain();if(!t.length)return;let n=Fs(e,{ariaLabel:`Treemap breadcrumb`,config:this._breadcrumbCfg(),compact:!0,crumbs:[{label:`All`,data:null}].concat(t.map(e=>({label:e.name,data:e}))),onNavigate:(t,n)=>{e.globals.treemapFocusKey=n.data?n.data._key:null,this._hideParentTooltip(),this.ctx.update()}});n&&(this._placeBreadcrumb(n),js(e,n))}_placeBreadcrumb(e){let t=this.w,n=t.layout.translateY||0,r=this.ctx?.dimensions?.dimHelpers,i=r?r.getTitleSubtitleCoords(`title`).height+r.getTitleSubtitleCoords(`subtitle`).height:0,a=e.getBoundingClientRect().height||ks;if(n-i>=a+1){e.style.top=`${n-a-1}px`;return}e.style.top=`${i}px`;let o=t.config.theme.mode===`dark`;e.style.background=o?`rgba(20,24,30,0.82)`:`rgba(255,255,255,0.86)`,e.style.borderRadius=`4px`}_showParentTooltip(e,t){let n=this.w,r=this._tip();if(!r)return;let i=this._drawnTotal(),a=t._parent?t._parent._area:i,o=i>0?(t._area/i*100).toFixed(1):`0.0`,s=a>0?(t._area/a*100).toFixed(1):o,c=this.w.config.plotOptions.treemap.parents,l=c&&c.tooltip&&c.tooltip.formatter,u=this._countLeaves(t),d;if(typeof l==`function`)d=l({name:t.name,value:t._area,depth:t.depth||0,leafCount:u,percentOfParent:Number(s),percentOfTotal:Number(o),node:t,w:n});else{let e=this._parentChrome(t.depth||0).headerBg;d=`<div class="apexcharts-tooltip-series-group apexcharts-active" style="display:flex;${n.config.tooltip.fillSeriesColor?`background-color:${e};`:``}"><div class="apexcharts-tooltip-text"><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${Q.escapeString(t.name)}: </span><span class="apexcharts-tooltip-text-y-value">${this._formatValue(t._area)}</span></div><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${u} items, </span><span class="apexcharts-tooltip-text-y-value">${s}% of parent, ${o}% of total</span></div></div></div>`}r.innerHTML=d,r.classList.add(`apexcharts-active`),r.style.opacity=`1`,this._tipOwned=!0,this._positionTooltip(e)}_tip(){return this._tooltipEl||=this.w.dom.baseEl.querySelector(`.apexcharts-tooltip`),this._tooltipEl}_positionTooltip(e){let t=this._tip();if(!t||!this._tipOwned)return;let n=this.w.dom.elWrap.getBoundingClientRect(),r=t.offsetWidth,i=t.offsetHeight,a=e.clientX-n.left+12;a+r>n.width&&(a=e.clientX-n.left-r-12),a=Math.max(0,Math.min(a,n.width-r));let o=e.clientY-n.top+12;o+i>n.height&&(o=e.clientY-n.top-i-12),o=Math.max(0,Math.min(o,n.height-i)),t.style.left=a+`px`,t.style.top=o+`px`}_hideParentTooltip(){let e=this._tip();e&&this._tipOwned&&(this._tipOwned=!1,e.classList.remove(`apexcharts-active`),e.style.opacity=`0`)}_drawnTotal(){return this._total??=(this.drawn||[]).reduce((e,t)=>e+this._subtreeArea(t),0),this._total||0}_subtreeArea(e){if(e._area!=null)return e._area;let t=e.children;if(t&&t.length){let e=0;for(let n=0;n<t.length;n++)e+=this._subtreeArea(t[n]);return e}let n=Number(e.value);return isNaN(n)?0:Math.abs(n)}_countLeaves(e){return!e.children||!e.children.length?1:e.children.reduce((e,t)=>e+this._countLeaves(t),0)}_formatValue(e){let t=this.w,n=t.config.tooltip?.y?.formatter||t.config.yaxis?.[0]?.labels?.formatter;if(typeof n==`function`)try{return String(n(e,{seriesIndex:0,dataPointIndex:0,w:t}))}catch{}return String(e)}_labelCanShow(e,t,n){if(!Number.isFinite(e)||e<=0)return!1;let r=this.w.config.plotOptions.treemap.dataLabels;return e<(r&&r.minFontSize!=null?Number(r.minFontSize):0)?!1:Math.max(t,n)>=e}_averageLabelSize(){if(this._avgLabelSize!=null)return this._avgLabelSize;function e(t){let n,r=0;if(Array.isArray(t[0]))for(n=0;n<t.length;n++)r+=e(t[n]);else for(n=0;n<t.length;n++)r+=t[n].length;return r}function t(e){let n,r=0;if(Array.isArray(e[0]))for(n=0;n<e.length;n++)r+=t(e[n]);else for(n=0;n<e.length;n++)r+=1;return r}return this._avgLabelSize=e(this.labels)/t(this.labels),this._avgLabelSize}getFontSize(e){let t=this.w,n=this._averageLabelSize();function r(e,r){let i=e*r;return Math.min(i**.5/n,parseInt(t.config.dataLabels.style.fontSize,10))}return r(e[2]-e[0],e[3]-e[1])}rotateToFitLabel(e,t,n,r,i,a,o){let s=new J(this.w),c=s.getTextRects(n,String(t));if(c.width+this.w.config.stroke.width+5>a-r&&c.width<=o-i){let t=s.rotateAroundCenter(e.node);e.node.setAttribute(`transform`,`rotate(-90 ${t.x} ${t.y}) translate(${c.height/3})`)}}truncateLabels(e,t,n,r,i,a){let o=new J(this.w),s=o.getTextRects(e,String(t)).width+this.w.config.stroke.width+5>i-n&&a-r>i-n?a-r:i-n,c=o.getTextBasedOnMaxWidth({text:e,maxWidth:s,fontSize:t});return e.length!==c.length&&s/t<5?``:c}_morphKeyed(){let e=this.ctx?.morphTypeChange;return!!(e&&typeof e.hasKeyedMarks==`function`&&e.hasKeyedMarks()&&typeof e.getInitialPathForKey==`function`)}_morphSourceForLeaf(e){let t=this.ctx?.morphTypeChange;if(!t||typeof t.getInitialPathAt!=`function`)return null;if(this._morphKeyed()){let n=t.getInitialPathForKey(Iu(e._key));if(n)return n}return t.getInitialPathAt(this._morphLeafIndex++)}_tilePath(e,t,n,r){return`M ${e} ${t} L ${n} ${t} L ${n} ${r} L ${e} ${r} Z`}_morphTile(e,t,n,r,i,a){new Yi(this.w,this.ctx).morphSVG(e,i,a,`none`,t,n,r,0)}animateTreemap(e,t,n,r,i=0){let a=new Yi(this.w);a.animateRect(e,t,n,r,()=>{a.animationCompleted(e)},i)}},Vu=.05,Hu=.05,Uu=1/45;function Wu(e,t,n,r){return{value:e,velocity:0,target:e,stiffness:t,damping:n}}function Gu(e,t){if(t<=0)return qu(e);let n=t;for(;n>0;){let t=Math.min(n,Uu),r=-e.stiffness*(e.value-e.target)-e.damping*e.velocity;e.velocity+=r*t,e.value+=e.velocity*t,n-=t}return!!qu(e)&&(e.value=e.target,e.velocity=0,!0)}function Ku(e,t){e.target=t}function qu(e){let t=e.restVelocity??Vu,n=e.restDisplacement??Hu;return Math.abs(e.velocity)<t&&Math.abs(e.value-e.target)<n}var Ju={crisp:[210,26],gentle:[120,20],snappy:[320,30]};function Yu(e){return Ju[e??`crisp`]??Ju.crisp}var Xu=`__apexcharts_unit_layouts__`;globalThis[Xu]||(globalThis[Xu]={});function Zu(){return globalThis[Xu]}function Qu(e){return e&&Zu()[e]||null}var $u=`__apexcharts_unit_marks__`;globalThis[$u]||(globalThis[$u]={});function ed(){return globalThis[$u]}function td(e,t){if(typeof e==`string`){let t=e.trim();return t?Object.freeze({name:`anonymous`,path:t,viewBox:[0,0,100,100]}):null}if(!e||typeof e!=`object`||typeof e.path!=`string`||!e.path.trim())return null;let n=Array.isArray(e.viewBox)&&e.viewBox.length===4?e.viewBox.map(Number):[0,0,100,100];return!n.every(e=>isFinite(e))||n[2]<=0||n[3]<=0?null:Object.freeze(q(K({},e),{name:e.name||`anonymous`,path:e.path.trim(),viewBox:n,fillRule:e.fillRule===`evenodd`?`evenodd`:void 0}))}function nd(e){return e&&ed()[e]||null}var rd=Math.PI*(3-Math.sqrt(5));function id(e){return 1-(1-e)**3}function ad(e){return t=>1+(e+1)*(t-1)**3+e*(t-1)**2}function od(e){return e<.5?4*e*e*e:1-(-2*e+2)**3/2}var sd=800,cd=.25,ld=0,ud=1,dd=2;function fd(e,t){let[n,r]=Yu(e),i=sd/Math.max(1,t);return[n*i*i,r*i]}var pd=class{constructor(e,t){this.ctx=t,this.w=e,this._lastDotR=1,this._gridTrack=null,this._gridDenom=1,this._scatterAxis=null,this._specCache=new Map,this._markWarned=null}draw(e){let t=this.w,n=new J(t,this.ctx),r=n.group({class:`apexcharts-unit`});if(t.globals.noData||!Array.isArray(e)||e.length===0)return r;let i=t.config.plotOptions.unit,a=i.layout===`packed`?`packed`:i.layout===`columns`?`columns`:i.layout===`grid`?`grid`:i.layout===`scatter`?`scatter`:i.layout===`arc`?`arc`:i.layout===`custom`?`custom`:`grouped`,o=i.transition,s=o===`flow`,c=o===`identity`,l=i.unitValue>0?i.unitValue:1,u=e.map(e=>{let t=Math.abs(Q.parseNumber(e))/l;return t>0?Math.max(1,Math.round(t)):0});u=this._applyMaxUnits(u,i.maxUnits);let d=u.reduce((e,t)=>e+t,0),f=a===`packed`?this._layoutPacked(u,i):a===`columns`?this._layoutColumns(u,i):a===`grid`?this._layoutGrid(u,i):a===`scatter`?this._layoutScatter(i):a===`arc`?this._layoutArc(u,i):a===`custom`?this._layoutCustom(u,i):this._layoutGrouped(u,i),p=a===`grid`&&!!(i.grid&&i.grid.split);p&&this._drawGridTrack(r,n,i),a===`scatter`&&this._drawScatterAxes(r,n);let m=this._lastDotR,h=this._shouldAnimate(),g=this.ctx&&this.ctx.morphTypeChange,_=h&&!!g&&typeof g.isActive==`function`&&g.isActive()&&typeof g.getInitialCenterFor==`function`,v=_&&typeof g.getInitialSlotFor==`function`,y=_&&typeof g.usesPieceTakeover==`function`&&g.usesPieceTakeover(),b=h&&!_&&this.ctx?this.ctx._unitPrevDots:null,x=new Map,S=[],C=t.seriesData.unitData||[],w=this._bubbleStats(C,i,m),T=0;if(f.forEach(e=>{let o=t.globals.colors[e.i]||t.globals.colors[0]||`#008FFB`,l=n.group({class:`apexcharts-series`,seriesName:Q.escapeString(t.seriesData.seriesNames[e.i]||`series-${e.i+1}`),rel:e.i+1,"data:realIndex":e.i}),f=_&&!v?g.getInitialCenterFor(e.i):null,E=e.dots.length,D=C[e.i];if(e.dots.forEach((t,r)=>{let a=t.j==null?r:t.j,u=D?D[a]:void 0,d=u&&typeof u==`object`&&u.fillColor?u.fillColor:o,_=t.r==null?w?this._radiusForValue(this._unitValueOf(u),w):m:t.r,C=this._markSpecFor(i,u,e.i,_),O=this._drawDot(n,i,_,d,e.i,a,C);l.add(O);let k;if(c){let e=u&&typeof u==`object`?u.id==null?u.name:u.id:void 0;k=e==null?`g:${T}`:`id:${e}`}else k=s?String(T):t.slot==null?`${e.i}:${a}`:`slot:${t.slot}`;if(T++,x.set(k,{x:t.x,y:t.y,fill:d,r:_,spec:C}),y)this._place(O.node,C,t.x,t.y),O.node.setAttribute(`opacity`,`0`),O.node.setAttribute(`data-piece-hidden`,`1`);else if(h){let n=b&&b.get(k),r=n||(v?g.getInitialSlotFor(e.i,a,E):f),o=i.gather&&i.gather.enter||`burst`,s=p||o===`fade`||o===`rise`,c=r?r.x:s?t.x:e.cx,l=r?r.y:o===`rise`&&!p?t.y+14:s?t.y:e.cy;O.node.style.opacity=r?`1`:`0`,this._place(O.node,C,c,l),S.push({node:O.node,spec:C,x:t.x,y:t.y,cx0:c,cy0:l,key:k,r0:n&&n.r!=null?n.r:_,r1:_,fill0:n?n.fill:d,fill1:d,delay:0,isEnter:!r})}else this._place(O.node,C,t.x,t.y)}),(a===`grouped`||a===`columns`||p)&&i.clusterLabels&&i.clusterLabels.show&&u[e.i]>0){let t=p?this._gridDenom:d;this._drawClusterLabel(l,e,u[e.i],t,i,o)}r.add(l)}),this._outerLabelsOn(i)&&this._drawOuterLabels(r,f,u,d,i,h&&!b),b){let e=this._collectExits(b,x,i);if(e.length){let t=n.group({class:`apexcharts-unit-exits`});r.add(t),this._runExits(t,e,i)}}return this.ctx&&(this.ctx._unitPrevDots=x),this.ctx&&(!h||_)&&(this.ctx._unitSprings=null),h&&S.length?this._runGather(S):t.globals.animationEnded=!0,r}_applyMaxUnits(e,t){let n=e.reduce((e,t)=>e+t,0);if(!t||t<=0||n<=t)return e;let r=t/n;return console.warn(`[ApexCharts] unit chart: ${n} dots exceeds maxUnits (${t}); counts were scaled down proportionally. Raise plotOptions.unit.maxUnits or use plotOptions.unit.unitValue to represent more units per dot.`),e.map(e=>e>0?Math.max(1,Math.round(e*r)):0)}_layoutCustom(e,t){let n=this.w,r=n.layout.gridWidth,i=n.layout.gridHeight,a=e.reduce((e,t)=>e+t,0),o=this._resolveLayoutProvider(t);if(!o)return console.warn(`[ApexCharts] unit chart: layout 'custom' needs plotOptions.unit.positions (a function, or the name of a layout registered with ApexCharts.registerUnitLayout). Falling back to 'grouped'.`),this._layoutGrouped(e,t);let s=this._outerLabelsOn(t)?this._outerLabelGutter(e,t):0;this._lastOuterGutter=s;let c={x:s,y:0,width:Math.max(1,r-s*2),height:i},l=Math.sqrt(c.width*c.height/Math.PI),u=this._resolveStep(t,l,a);this._lastDotR=this._dotRadiusFromStep(u,t);let d=this._lastDotR,f=this._layoutObjects(e,d),p;try{p=o(f,c)}catch(n){return console.warn(`[ApexCharts] unit chart: the layout provider threw; falling back to 'grouped'.`,n),this._layoutGrouped(e,t)}if(!Array.isArray(p))return console.warn(`[ApexCharts] unit chart: the layout provider must return an array of {id, x, y}; falling back to 'grouped'.`),this._layoutGrouped(e,t);let m=new Map;p.forEach(e=>{e&&isFinite(e.x)&&isFinite(e.y)&&m.set(String(e.id),{x:e.x,y:e.y,r:typeof e.r==`number`&&e.r>0?e.r:void 0})});let h=e.map((e,t)=>({i:t,cx:r/2,cy:i/2,outerR:d,dots:[]}));return f.forEach(e=>{let t=m.get(e.id);t&&h[e.seriesIndex].dots.push({x:t.x,y:t.y,r:t.r,j:e.dataPointIndex})}),h.forEach(e=>{if(!e.dots.length)return;let t=0,n=0;e.dots.forEach(e=>{t+=e.x,n+=e.y}),e.cx=t/e.dots.length,e.cy=n/e.dots.length;let r=0;e.dots.forEach(t=>{r=Math.max(r,Math.hypot(t.x-e.cx,t.y-e.cy))}),e.outerR=r+d}),h}_layoutObjects(e,t){let n=this.w,r=n.seriesData.unitData||[],i=n.seriesData.seriesNames||[],a=[],o=0;return e.forEach((e,n)=>{let s=r[n];for(let r=0;r<e;r++){let e=s?s[r]:void 0,c=e&&typeof e==`object`&&(e.id!=null||e.name!=null)?String(e.id==null?e.name:e.id):`${n}:${r}`;a.push({id:c,index:o,seriesIndex:n,dataPointIndex:r,label:i[n],value:this._unitValueOf(e)??void 0,datum:e,r:t}),o++}}),a}_resolveLayoutProvider(e){let t=e.positions;if(typeof t==`function`)return t;if(typeof t==`string`&&t){let e=Qu(t);if(e)return e;console.warn(`[ApexCharts] unit chart: no layout named "${t}" is registered. Register one with ApexCharts.registerUnitLayout("${t}", fn).`)}return null}_layoutGrouped(e,t){let n=this.w,r=n.layout.gridWidth,i=n.layout.gridHeight,a=t.clusterLabels&&t.clusterLabels.show?30:6,o=e.map((e,t)=>t).filter(t=>e[t]>0),s=Math.max(1,o.length),c=Array(e.length).fill(-1);o.forEach((e,t)=>c[e]=t);let l=r/s,u=i-a,d=Math.max(1,...e),f=Math.min(l,u)*.08,p=Math.max(4,Math.min(l,u)/2-f),m=this._resolveStep(t,p,d);this._lastDotR=this._dotRadiusFromStep(m,t);let h=this._lastDotR,g=a+u/2,_=e.map(e=>m*Math.sqrt(Math.max(1,e))+h),v=e=>c[e]>=0?l*(c[e]+.5):r/2,y=e.map((e,t)=>v(t)),b=o.map(e=>_[e]),x=!1;for(let e=1;e<s;e++)if(y[o[e]]-y[o[e-1]]<b[e]+b[e-1]){x=!0;break}if(x){let t=Math.max(2*h,8),n=b.reduce((e,t)=>e+2*t,0)+t*(s-1),i;if(n<=r){let e=(r-n)/2;i=b.map(n=>{let r=e+n;return e+=2*n+t,r})}else if(s===1)i=[r/2];else{let e=b[0],t=r-b[s-1];i=b.map((n,r)=>e+(t-e)*r/(s-1))}y=e.map((e,t)=>c[t]>=0?i[c[t]]:r/2)}return e.map((e,t)=>({i:t,cx:y[t],cy:g,outerR:_[t],dots:this._spiral(y[t],g,e,m,0)}))}_layoutPacked(e,t){let n=this.w,r=n.layout.gridWidth,i=n.layout.gridHeight,a=Math.max(1,e.reduce((e,t)=>e+t,0)),o=Math.max(4,Math.min(r,i-6)/2-Math.min(r,i)*.06),s=this._resolveStep(t,o,a);this._lastDotR=this._dotRadiusFromStep(s,t);let c=r/2,l=6+(i-6)/2,u=e.map((e,t)=>t);t.sortByGroup!==!1&&u.sort((t,n)=>e[t]-e[n]);let d=e.map((e,t)=>({i:t,cx:c,cy:l,outerR:s*Math.sqrt(a)+this._lastDotR,dots:[]})),f=0;return u.forEach(t=>{for(let n=0;n<e[t];n++){let e=s*Math.sqrt(f+.5),n=f*rd;d[t].dots.push({x:c+e*Math.cos(n),y:l+e*Math.sin(n),slot:f}),f++}}),d}_layoutArc(e,t){let n=this.w,r=n.layout.gridWidth,i=n.layout.gridHeight,a=Math.max(1,e.reduce((e,t)=>e+t,0)),o=t.arc||{},s=typeof o.startAngle==`number`?o.startAngle:-90,c=typeof o.endAngle==`number`?o.endAngle:90,l=s*Math.PI/180,u=c*Math.PI/180,d=u-l||Math.PI,f=Math.max(0,Math.min(.95,typeof o.innerRadiusRatio==`number`?o.innerRadiusRatio:.4)),p=e=>Math.sin(e),m=e=>-Math.cos(e),h=this._arcBounds(l,u),g=Math.min(r,i)*.04,_=Math.max(1e-6,h.maxX-h.minX),v=Math.max(1e-6,h.maxY-h.minY),y=Math.max(4,Math.min((r-2*g)/_,(i-2*g)/v)),b=y*f,x=r/2-(h.minX+h.maxX)/2*y,S=i/2-(h.minY+h.maxY)/2*y,C=this._arcAllocate(a,b,y,d,t);this._lastDotR=C.dotR;let w=[];for(let e=0;e<C.R;e++){let t=C.radii[e],n=C.seatsPerRow[e];for(let e=0;e<n;e++){let r=n===1?(l+u)/2:l+d*(e+.5)/n;w.push({a:r,x:x+t*p(r),y:S+t*m(r)})}}w.sort((e,t)=>e.a-t.a);let T=e.map((e,t)=>({i:t,cx:x,cy:S,outerR:y,dots:[]})),E=0,D=0;return w.forEach((t,n)=>{for(;E<e.length&&D>=e[E];)E++,D=0;E>=e.length||(T[E].dots.push({x:t.x,y:t.y,slot:n}),D++)}),T}_arcBounds(e,t){let n=e=>Math.sin(e),r=e=>-Math.cos(e),i=Math.min(e,t),a=Math.max(e,t),o=[0,n(e),n(t)],s=[0,r(e),r(t)],c=Math.PI/2;for(let e=Math.ceil(i/c);e*c<=a;e++)o.push(n(e*c)),s.push(r(e*c));return{minX:Math.min(...o),maxX:Math.max(...o),minY:Math.min(...s),maxY:Math.max(...s)}}_arcAllocate(e,t,n,r,i){let a=i.spacing>0?i.spacing:1.05,o=Math.abs(r)||Math.PI,s=this._fixedRadius(i),c=r=>{r=Math.max(1,Math.round(r));let i=[];for(let e=0;e<r;e++)i.push(r===1?(t+n)/2:t+(n-t)*(e/(r-1)));let s=i.reduce((e,t)=>e+t,0)||1,c=i.map(t=>e*t/s),l=c.map(e=>Math.floor(e)),u=e-l.reduce((e,t)=>e+t,0);for(c.map((e,t)=>({idx:t,frac:e-Math.floor(e)})).sort((e,t)=>t.frac-e.frac).forEach(e=>{u>0&&(l[e.idx]++,u--)});u>0;)l[r-1]++,u--;let d=r===1?n-t||n:(n-t)/(r-1),f=1/0;for(let e=0;e<r;e++){let t=l[e];if(t<=0)continue;let n=i[e]*o/t;n<f&&(f=n)}return{R:r,radii:i,seatsPerRow:l,dotR:Math.max(1,Math.min(d,f)/(2*a))}},l=i.arc&&i.arc.rows,u;if(typeof l==`number`&&l>=1)u=c(l);else if(s){let e=2*s*a;u=c((n-t)/e+1)}else{let t=Math.max(1,Math.min(40,Math.ceil(Math.sqrt(e))+6));u=c(1);for(let e=2;e<=t;e++){let t=c(e);t.dotR>u.dotR&&(u=t)}}return s&&(u.dotR=s),u}_layoutColumns(e,t){let n=this.w,r=n.layout.gridWidth,i=n.layout.gridHeight,a=!!(t.clusterLabels&&t.clusterLabels.show),o=a&&t.clusterLabels.position===`bottom`,s=a&&!o?30:6,c=e.map((e,t)=>t).filter(t=>e[t]>0),l=Math.max(1,c.length),u=Array(e.length).fill(-1);c.forEach((e,t)=>u[e]=t);let d=r/l,f=d*.62,p=Math.max(8,i*.04)+(o?30:0),m=Math.max(4,i-s-p),h=Math.max(1,...e),g=t.spacing>0?t.spacing:1,_=t.columns?t.columns.size:void 0,v;v=t.shape!==`image`&&_===`auto`?null:t.shape!==`image`&&typeof _==`number`&&_>0?_:this._fixedRadius(t);let y=1,b=0;if(v){b=2*v*g,this._lastDotR=v;let e=Math.max(1,Math.floor(m/b)),t=Math.max(1,Math.floor(f/b));y=Math.max(1,Math.min(t,Math.ceil(h/e)))}else{let e=0,t=Math.max(1,Math.min(40,Math.round(f/4)));for(let n=1;n<=t;n++){let t=Math.ceil(h/n),r=Math.min(f/n,m/t);r>e&&(e=r,y=n)}b=e,this._lastDotR=Math.max(1,b/(2*g))}let x=this._lastDotR,S=Math.ceil(h/y),C=s+(m+Math.min(m,S*b))/2;return e.map((e,t)=>{let n=u[t]>=0?d*(u[t]+.5):r/2,i=Math.ceil(Math.max(1,e)/y)*b,a=n-y*b/2+b/2,o=[];for(let t=0;t<e;t++){let e=Math.floor(t/y),n=t%y;o.push({x:a+n*b,y:C-x-e*b})}return{i:t,cx:n,cy:C-i/2,outerR:i/2,flat:!0,dots:o}})}_layoutGrid(e,t){if(t.grid&&t.grid.split)return this._layoutGridSplit(e,t);this._gridTrack=null;let n=this.w,r=n.layout.gridWidth,i=n.layout.gridHeight,a=t.grid||{},o=Math.max(1,Math.round(a.columns>0?a.columns:10)),s=a.fillFrom===`top`?`top`:`bottom`,c=a.total>0?this._largestRemainder(e,Math.round(a.total)):e.slice(),l=c.reduce((e,t)=>e+t,0),u=Math.max(1,Math.ceil(Math.max(1,l)/o)),d=t.spacing>0?t.spacing:1,f=Math.max(4,r),p=Math.max(4,i-6),m=this._fixedRadius(t),h=0;m?(h=2*m*d,this._lastDotR=m):(h=Math.min(f/o,p/u),this._lastDotR=Math.max(1,h/(2*d)));let g=o*h,_=u*h,v=(r-g)/2+h/2,y=6+(p-_)/2,b=e=>s===`bottom`?y+_-h/2-e*h:y+h/2+e*h,x=e.map((e,t)=>({i:t,cx:r/2,cy:6+p/2,outerR:Math.max(g,_)/2,dots:[]})),S=0;for(let e=0;e<c.length;e++)for(let t=0;t<c[e];t++){let t=S%o,n=Math.floor(S/o);x[e].dots.push({x:v+t*h,y:b(n),slot:S}),S++}return x}_layoutGridSplit(e,t){let n=this.w,r=n.layout.gridWidth,i=n.layout.gridHeight,a=t.grid||{},o=Math.max(1,Math.round(a.columns>0?a.columns:10)),s=a.fillFrom===`top`?`top`:`bottom`,c=Math.max(1,Math.round(a.total>0?a.total:100)),l=Math.max(1,Math.ceil(c/o)),u=e.map((e,t)=>t).filter(t=>e[t]>0),d=Math.max(1,u.length),f=a.max>0?a.max:Math.max(1,...e),p=Math.max(1,Math.round(a.tileColumns>0?a.tileColumns:Math.ceil(Math.sqrt(d)))),m=Math.max(1,Math.ceil(d/p)),h=!(t.clusterLabels&&t.clusterLabels.show===!1),g=h&&t.clusterLabels&&t.clusterLabels.position===`bottom`,_=h&&!g?22:4,v=h&&g?22:4,y=r/p,b=i/m,x=Math.max(4,y*.86),S=Math.max(4,b-_-v),C=t.spacing>0?t.spacing:1,w=this._fixedRadius(t),T=0;w?(T=2*w*C,this._lastDotR=w):(T=Math.min(x/o,S/l),this._lastDotR=Math.max(1,T/(2*C)));let E=o*T,D=l*T,O=(e,t)=>s===`bottom`?e+D-T/2-t*T:e+T/2+t*T,k=[],A=[];return u.forEach((t,n)=>{let r=n%p,i=Math.floor(n/p),a=r*y,s=i*b,l=a+(y-E)/2+T/2,u=s+_+(S-D)/2,d=e=>({x:l+e%o*T,y:O(u,Math.floor(e/o))});for(let e=0;e<c;e++)k.push(d(e));let m=Math.max(0,Math.min(c,Math.round(e[t]/f*c))),h=[];for(let e=0;e<m;e++){let t=d(e);h.push({x:t.x,y:t.y,slot:n*c+e})}A.push({i:t,cx:a+y/2,cy:u+D/2,outerR:D/2,flat:!0,split:!0,dots:h})}),this._gridDenom=f,this._gridTrack={cells:k},A}_drawGridTrack(e,t,n){let r=this._gridTrack;if(!r||!r.cells||!r.cells.length)return;let i=this._lastDotR,a=(n.grid||{}).trackColor||`rgba(128,128,128,0.14)`,o=t.group({class:`apexcharts-unit-track`});r.cells.forEach(e=>{let r;if(n.shape===`square`){let o=i*2;r=t.drawRect(0,0,o,o,n.borderRadius||0,a,1,0,`none`),r.node.setAttribute(`fill`,a),r.node.setAttribute(`x`,String(e.x-i)),r.node.setAttribute(`y`,String(e.y-i))}else r=t.drawCircle(i,{fill:a,"stroke-width":0,stroke:`none`}),r.node.setAttribute(`fill`,a),r.node.setAttribute(`cx`,String(e.x)),r.node.setAttribute(`cy`,String(e.y));r.node.classList.add(`apexcharts-unit-track-cell`),o.add(r)}),e.add(o)}_layoutScatter(e){let t=this.w,n=e.scatter||{};if(n.y===`value`)return this._layoutScatter2D(e);if(n.orientation===`vertical`)return this._layoutScatterVertical(e);let r=t.layout.gridWidth,i=t.layout.gridHeight,a=t.seriesData.unitData||[],o=t.seriesData.seriesNames||[],s=e=>this._unitValueOf(e),c=this._scatterSizeStats(n,a),l=a.map(e=>Array.isArray(e)?e.map(s):[]),u=e=>e!=null&&isFinite(e),d=l.map((e,t)=>t).filter(e=>l[e].some(u)),f=Math.max(1,d.length),p=1/0,m=-1/0;l.forEach(e=>e.forEach(e=>{e!=null&&isFinite(e)&&(e<p&&(p=e),e>m&&(m=e))})),p===1/0&&(p=0,m=1);let h=Math.max(2,Math.round(n.tickAmount>0?n.tickAmount:5)),g=this._scatterValueDomain(n,p,m,h),_=g.min,v=g.max,y=v-_||1,b=n.laneLabelWidth==null?f>1?92:8:Math.max(0,n.laneLabelWidth),x=30+(n.xTitle?20:0),S=b,C=r-8,w=i-x,T=Math.max(4,C-S),E=Math.max(4,w-10),D=e=>S+(e-_)/y*T,O=E/f,k=e=>10+O*(e+.5),A=0,j=this._fixedRadius(e);if(j)A=j;else{let e=Math.max(1,...d.map(e=>l[e].filter(u).length));A=Math.max(2,Math.min(6,O*.12,T/(2.5*Math.sqrt(e))))}this._lastDotR=A;let M=e.spacing>0?e.spacing:1,N=Math.max(.5,A*M),P=n.spread===`jitter`,F=[],I=[],L=c?c.rMax:A;d.forEach((e,t)=>{let n=k(t);I.push({i:e,cy:n,name:o[e]||`series-${e+1}`});let r=(a[e]||[]).map((e,t)=>{let r=s(e),i={j:t,px:D(u(r)?r:_),y:n};return c&&(i.r=this._scatterRadius(e,c,A)),i});if(P){let e=Math.max(L,O/2-L);r.forEach((t,r)=>{let i=(r*9301+49297)%233280/233280;t.y=n+(i*2-1)*e})}else this._beeswarm(r,n,A,N,L);F.push({i:e,cx:(S+C)/2,cy:n,outerR:O/2,dots:r.map(e=>({x:e.px,y:e.y,r:e.r}))})});let R=g.ticks;return this._scatterAxis={mode:`1d`,plotL:S,plotR:C,plotT:10,plotB:w,xMin:_,xMax:v,plotX:D,ticks:R,lanes:I,xTitle:n.xTitle,formatter:typeof n.xFormatter==`function`?n.xFormatter:null,gridlines:n.gridlines!==!1},F}_layoutScatterVertical(e){let t=this.w,n=e.scatter||{},r=t.layout.gridWidth,i=t.layout.gridHeight,a=t.seriesData.unitData||[],o=t.seriesData.seriesNames||[],s=e=>this._unitValueOf(e),c=this._scatterSizeStats(n,a),l=a.map(e=>Array.isArray(e)?e.map(s):[]),u=e=>e!=null&&isFinite(e),d=l.map((e,t)=>t).filter(e=>l[e].some(u)),f=Math.max(1,d.length),p=1/0,m=-1/0;l.forEach(e=>e.forEach(e=>{e!=null&&isFinite(e)&&(e<p&&(p=e),e>m&&(m=e))})),p===1/0&&(p=0,m=1);let h=Math.max(2,Math.round(n.tickAmount>0?n.tickAmount:5)),g=this._scatterValueDomain(n,p,m,h),_=g.min,v=g.max,y=v-_||1,b=46+(n.xTitle?18:0),x=f>1?26:10,S=b,C=r-10,w=i-x,T=Math.max(4,C-S),E=Math.max(4,w-10),D=e=>w-(e-_)/y*E,O=T/f,k=e=>S+O*(e+.5),A=0,j=this._fixedRadius(e);if(j)A=j;else{let e=Math.max(1,...d.map(e=>l[e].filter(u).length));A=Math.max(2,Math.min(6,O*.12,E/(2.5*Math.sqrt(e))))}this._lastDotR=A;let M=e.spacing>0?e.spacing:1,N=Math.max(.5,A*M),P=n.spread===`jitter`,F=[],I=[],L=c?c.rMax:A;d.forEach((e,t)=>{let n=k(t);I.push({i:e,cx:n,name:o[e]||`series-${e+1}`});let r=(a[e]||[]).map((e,t)=>{let r=s(e),i={j:t,py:D(u(r)?r:_),x:n};return c&&(i.r=this._scatterRadius(e,c,A)),i});if(P){let e=Math.max(L,O/2-L);r.forEach((t,r)=>{let i=(r*9301+49297)%233280/233280;t.x=n+(i*2-1)*e})}else this._beeswarm(r,n,A,N,L,!0);F.push({i:e,cx:n,cy:(10+w)/2,outerR:O/2,dots:r.map(e=>({x:e.x,y:e.py,r:e.r}))})});let R=g.ticks;return this._scatterAxis={mode:`1d`,orientation:`vertical`,plotL:S,plotR:C,plotT:10,plotB:w,vMin:_,vMax:v,plotY:D,ticks:R,lanes:I,valueTitle:n.xTitle,formatter:typeof n.xFormatter==`function`?n.xFormatter:null,gridlines:n.gridlines!==!1},F}_layoutScatter2D(e){let t=this.w,n=t.layout.gridWidth,r=t.layout.gridHeight,i=e.scatter||{},a=t.seriesData.unitData||[],o=e=>typeof e==`number`&&isFinite(e),s=e=>e&&typeof e==`object`?e.x:null,c=e=>e&&typeof e==`object`?e.y==null?e.value:e.y:null,l=a.map((e,t)=>t).filter(e=>(a[e]||[]).some(e=>o(s(e))&&o(c(e)))),u=1/0,d=-1/0,f=1/0,p=-1/0;a.forEach(e=>(e||[]).forEach(e=>{let t=s(e),n=c(e);o(t)&&o(n)&&(t<u&&(u=t),t>d&&(d=t),n<f&&(f=n),n>p&&(p=n))})),u===1/0&&(u=0,d=1,f=0,p=1);let m=Math.max(2,Math.round(i.tickAmount>0?i.tickAmount:5)),h=Math.max(2,Math.round(i.yTickAmount>0?i.yTickAmount:5)),g=this._niceScale(i.xMin==null?u:i.xMin,i.xMax==null?d:i.xMax,m),_=this._niceScale(i.yMin==null?f:i.yMin,i.yMax==null?p:i.yMax,h),v=i.xMin==null?g.min:i.xMin,y=i.xMax==null?g.max:i.xMax,b=i.yMin==null?_.min:i.yMin,x=i.yMax==null?_.max:i.yMax,S=y-v||1,C=x-b||1,w=46+(i.yTitle?18:0),T=30+(i.xTitle?20:0),E=w,D=n-12,O=r-T,k=Math.max(4,D-E),A=Math.max(4,O-10),j=e=>E+(e-v)/S*k,M=e=>O-(e-b)/C*A,N=this._scatterSizeStats(i,a),P=this._fixedRadius(e)||5;this._lastDotR=P;let F=[];l.forEach(e=>{let t=(a[e]||[]).map(e=>{let t=s(e),n=c(e);return{x:j(o(t)?t:v),y:M(o(n)?n:b),r:N?this._scatterRadius(e,N,P):void 0}});F.push({i:e,cx:(E+D)/2,cy:(10+O)/2,outerR:A/2,dots:t})});let I=(e,t,n,r,i,a)=>{let o=[];if(i)for(let t=0;t<a;t++)o.push(e+n*t/(a-1));else{let i=r||n/Math.max(1,a-1);for(let n=e;n<=t+i*.5;n+=i)o.push(Math.abs(n)<i*1e-9?0:n)}return o};return this._scatterAxis={mode:`2d`,plotL:E,plotR:D,plotT:10,plotB:O,plotX:j,plotY:M,xTicks:I(v,y,S,g.spacing,i.xMin!=null||i.xMax!=null,m),yTicks:I(b,x,C,_.spacing,i.yMin!=null||i.yMax!=null,h),xTitle:i.xTitle,yTitle:i.yTitle,xFormatter:typeof i.xFormatter==`function`?i.xFormatter:null,yFormatter:typeof i.yFormatter==`function`?i.yFormatter:null,gridlines:i.gridlines!==!1},F}_scatterSizeStats(e,t){let n=e&&e.sizeRange;if(!Array.isArray(n)||n.length<2)return null;let r=Math.max(.5,+n[0]),i=Math.max(r,+n[1]),a=e.sizeField||`z`,o=1/0,s=-1/0;return t.forEach(e=>(e||[]).forEach(e=>{let t=e&&typeof e==`object`?e[a]:null;typeof t==`number`&&isFinite(t)&&(t<o&&(o=t),t>s&&(s=t))})),o===1/0?null:{zmin:o,zmax:s,rMin:r,rMax:i,field:a}}_scatterRadius(e,t,n){if(!t)return n;let r=e&&typeof e==`object`?e[t.field]:null;if(typeof r!=`number`||!isFinite(r))return t.rMin;let i=t.zmax>t.zmin?(r-t.zmin)/(t.zmax-t.zmin):1,a=Math.max(0,Math.min(1,i)),o=t.rMin*t.rMin,s=t.rMax*t.rMax;return Math.sqrt(o+a*(s-o))}_beeswarm(e,t,n,r,i,a=!1){let o=a?`py`:`px`,s=a?`x`:`y`,c=e.slice().sort((e,t)=>e[o]-t[o]),l=[],u=i??n;c.forEach(e=>{let i=e.r==null?n:e.r,a=0;for(let n=0;n<2e3;n++){let s=n===0?0:Math.ceil(n/2)*r*(n%2?1:-1),c=t+s,d=!0;for(let t=l.length-1;t>=0;t--){let n=l[t],r=e[o]-n.f;if(r>i+u)break;let a=i+n.r,s=c-n.s;if(r*r+s*s<a*a){d=!1;break}}if(d){a=s;break}}e[s]=t+a,l.push({f:e[o],s:e[s],r:i})})}_scatterValueDomain(e,t,n,r){let i=(e,t,n)=>{let r=[];for(let i=e;i<=t+n*.5;i+=n)r.push(Math.abs(i)<n*1e-9?0:i);return r};if(e.xMin!=null||e.xMax!=null){let a=e.xMin==null?t:e.xMin,o=e.xMax==null?n:e.xMax;o>a||(o=a+1);let s=(o-a)/Math.max(1,r-1);return t<a&&(a-=Math.ceil((a-t)/s)*s),n>o&&(o+=Math.ceil((n-o)/s)*s),{min:a,max:o,ticks:i(a,o,s)}}let a=this._niceScale(t,n,r),o=a.spacing||(a.max-a.min)/Math.max(1,r-1);return{min:a.min,max:a.max,ticks:i(a.min,a.max,o)}}_niceScale(e,t,n){let r=e,i=t;i>r||(i=r+1);let a=this._niceNum(i-r,!1),o=this._niceNum(a/Math.max(1,n-1),!0);return{min:Math.floor(r/o)*o,max:Math.ceil(i/o)*o,spacing:o}}_niceNum(e,t){let n=e>0?e:1,r=Math.floor(Math.log(n)/Math.LN10),i=n/10**r,a;return a=t?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10,a*10**r}_drawScatterAxes(e,t){let n=this.w;if(!Z.isBrowser())return;let r=this._scatterAxis;if(!r)return;let i=`http://www.w3.org/2000/svg`,a=t.group({class:`apexcharts-unit-axis`}),o=n.config.grid&&n.config.grid.borderColor||`rgba(128,128,128,0.18)`,s=`rgba(128,128,128,0.5)`,c=n.config.xaxis&&n.config.xaxis.labels&&n.config.xaxis.labels.style&&n.config.xaxis.labels.style.colors,l=Array.isArray(c)?c[0]:c,u=l||`rgba(120,130,140,0.9)`,d=(e,t,n,r,o)=>{let s=X.createElementNS(i,`line`);s.setAttribute(`x1`,String(e)),s.setAttribute(`y1`,String(t)),s.setAttribute(`x2`,String(n)),s.setAttribute(`y2`,String(r)),s.setAttribute(`stroke`,o),s.setAttribute(`shape-rendering`,`crispEdges`),a.node.appendChild(s)},f=(e,t,r,o,s,c,l,u)=>{let d=X.createElementNS(i,`text`);d.setAttribute(`class`,u),d.setAttribute(`x`,String(t)),d.setAttribute(`y`,String(r)),d.setAttribute(`text-anchor`,o),d.setAttribute(`dominant-baseline`,`middle`),d.setAttribute(`font-size`,`${c}px`),d.setAttribute(`font-family`,n.config.chart.fontFamily||`inherit`),d.setAttribute(`font-weight`,String(l)),d.setAttribute(`fill`,s),d.textContent=e,a.node.appendChild(d)};if(r.mode===`2d`){if(r.yTicks.forEach(e=>{let t=r.plotY(e);r.gridlines&&d(r.plotL,t,r.plotR,t,o);let n=r.yFormatter?String(r.yFormatter(e)):this._formatTick(e);f(n,r.plotL-8,t,`end`,u,11,400,`apexcharts-unit-tick`)}),r.xTicks.forEach(e=>{let t=r.plotX(e);r.gridlines&&d(t,r.plotT,t,r.plotB,o);let n=r.xFormatter?String(r.xFormatter(e)):this._formatTick(e);f(n,t,r.plotB+14,`middle`,u,11,400,`apexcharts-unit-tick`)}),d(r.plotL,r.plotB,r.plotR,r.plotB,s),d(r.plotL,r.plotT,r.plotL,r.plotB,s),r.xTitle&&f(String(r.xTitle),(r.plotL+r.plotR)/2,r.plotB+32,`middle`,u,12,600,`apexcharts-unit-axis-title`),r.yTitle){let e=X.createElementNS(i,`text`);e.setAttribute(`class`,`apexcharts-unit-axis-title`);let t=(r.plotT+r.plotB)/2;e.setAttribute(`x`,`14`),e.setAttribute(`y`,String(t)),e.setAttribute(`text-anchor`,`middle`),e.setAttribute(`font-size`,`12px`),e.setAttribute(`font-family`,n.config.chart.fontFamily||`inherit`),e.setAttribute(`font-weight`,`600`),e.setAttribute(`fill`,u),e.setAttribute(`transform`,`rotate(-90 14 ${t})`),e.textContent=String(r.yTitle),a.node.appendChild(e)}e.add(a);return}if(r.orientation===`vertical`){if(r.ticks.forEach(e=>{let t=r.plotY(e);r.gridlines&&d(r.plotL,t,r.plotR,t,o);let n=r.formatter?String(r.formatter(e)):this._formatTick(e);f(n,r.plotL-8,t,`end`,u,11,400,`apexcharts-unit-tick`)}),d(r.plotL,r.plotT,r.plotL,r.plotB,s),r.valueTitle){let e=X.createElementNS(i,`text`);e.setAttribute(`class`,`apexcharts-unit-axis-title`);let t=(r.plotT+r.plotB)/2;e.setAttribute(`x`,`14`),e.setAttribute(`y`,String(t)),e.setAttribute(`text-anchor`,`middle`),e.setAttribute(`font-size`,`12px`),e.setAttribute(`font-family`,n.config.chart.fontFamily||`inherit`),e.setAttribute(`font-weight`,`600`),e.setAttribute(`fill`,u),e.setAttribute(`transform`,`rotate(-90 14 ${t})`),e.textContent=String(r.valueTitle),a.node.appendChild(e)}r.lanes.forEach(e=>{let t=l||n.globals.colors[e.i]||n.globals.colors[0]||`#008FFB`;f(e.name,e.cx,r.plotB+16,`middle`,t,12,600,`apexcharts-unit-lane-label`)}),e.add(a);return}r.ticks.forEach((e,t)=>{let n=r.plotX(e);r.gridlines&&d(n,r.plotT,n,r.plotB,o);let i=r.formatter?String(r.formatter(e)):this._formatTick(e),a=t===0?`start`:t===r.ticks.length-1?`end`:`middle`;f(i,n,r.plotB+14,a,u,11,400,`apexcharts-unit-tick`)}),d(r.plotL,r.plotB,r.plotR,r.plotB,s),r.xTitle&&f(String(r.xTitle),(r.plotL+r.plotR)/2,r.plotB+32,`middle`,u,12,600,`apexcharts-unit-axis-title`),r.plotL>12&&r.lanes.forEach(e=>{let t=l||n.globals.colors[e.i]||n.globals.colors[0]||`#008FFB`;f(e.name,r.plotL-8,e.cy,`end`,t,12,600,`apexcharts-unit-lane-label`)}),e.add(a)}_formatTick(e){if(!isFinite(e))return``;let t=Math.abs(e);return t>=1e6?`${+(e/1e6).toFixed(1)}M`:t>=1e4?`${+(e/1e3).toFixed(1)}k`:String(Number.isInteger(e)?e:+e.toFixed(2))}_largestRemainder(e,t){let n=e.reduce((e,t)=>e+t,0);if(n<=0||t<=0)return e.map(()=>0);let r=e.map(e=>e/n*t),i=r.map(e=>Math.floor(e)),a=i.reduce((e,t)=>e+t,0),o=Math.max(0,t-a),s=r.map((e,t)=>({i:t,frac:e-Math.floor(e)})).sort((e,t)=>t.frac-e.frac),c=i.slice();for(let e=0;e<o&&e<s.length;e++)c[s[e].i]++;return c}_spiral(e,t,n,r,i){let a=[];for(let o=0;o<n;o++){let n=i+o,s=r*Math.sqrt(n+.5),c=n*rd;a.push({x:e+s*Math.cos(c),y:t+s*Math.sin(c)})}return a}_fixedRadius(e){return e.shape===`image`&&e.image?Math.max(e.image.width||20,e.image.height||20)/2:this._bubbleActive(e)&&typeof e.sizeByValue.maxRadius==`number`?e.sizeByValue.maxRadius>0?e.sizeByValue.maxRadius:null:typeof e.size==`number`&&e.size>0?e.size:null}_bubbleActive(e){let t=e.sizeByValue;return!!(t&&t.enabled&&e.shape!==`image`&&e.shape!==`square`)}_unitValueOf(e){if(typeof e==`number`)return e;if(e&&typeof e==`object`){let t=e.value==null?e.y:e.value;return typeof t==`number`?t:null}return null}_radiusForValue(e,t){if(e==null||!isFinite(e))return t.minR;let n=t.max>t.min?(e-t.min)/(t.max-t.min):1,r=Math.max(0,Math.min(1,n));if(t.scale===`linear`)return t.minR+r*(t.maxR-t.minR);let i=t.minR*t.minR,a=t.maxR*t.maxR;return Math.sqrt(i+r*(a-i))}_bubbleStats(e,t,n){if(!this._bubbleActive(t))return null;let r=1/0,i=-1/0;if(e.forEach(e=>{e&&e.forEach(e=>{let t=this._unitValueOf(e);t!=null&&isFinite(t)&&(t<r&&(r=t),t>i&&(i=t))})}),r===1/0||i<r)return null;let a=t.sizeByValue,o=n,s=Math.max(1,Math.min(o,typeof a.minRadius==`number`?a.minRadius:o*.35));return{min:r,max:i,minR:s,maxR:o,scale:a.scale===`linear`?`linear`:`area`}}_resolveStep(e,t,n){let r=e.spacing>0?e.spacing:1,i=this._fixedRadius(e);return i?2*i*r:t/(Math.sqrt(Math.max(1,n))+.5)}_dotRadiusFromStep(e,t){let n=t.spacing>0?t.spacing:1;return this._fixedRadius(t)||Math.max(1,e/(2*n))}_isCorner(e){return e.shape===`square`||e.shape===`image`}_halfExtent(e,t){if(e.shape===`image`&&e.image)return{hx:(e.image.width||20)/2,hy:(e.image.height||20)/2};let n=t??this._lastDotR;return{hx:n,hy:n}}_place(e,t,n,r){let i=t;i.pk===dd?e.setAttribute(`transform`,`translate(`+(n-i.ox)+`,`+(r-i.oy)+i.tail):i.pk===ud?(e.setAttribute(`x`,String(n-i.hx)),e.setAttribute(`y`,String(r-i.hy))):(e.setAttribute(`cx`,String(n)),e.setAttribute(`cy`,String(r)))}_baseSpec(e,t){let n=t??this._lastDotR;if(!this._isCorner(e))return{pk:ld,r:n};let{hx:r,hy:i}=this._halfExtent(e,n);return{pk:ud,hx:r,hy:i,r:n}}_resolveMark(e){if(e==null)return null;if(typeof e==`object`)return td(e);if(typeof e!=`string`||!e)return null;let t=e.trim();return t[0]===`M`||t[0]===`m`?td(t):nd(t)||(this._markWarned||=new Set,this._markWarned.has(t)||(this._markWarned.add(t),console.warn(`[ApexCharts] unit chart: no mark named "${t}" is registered. Register one with ApexCharts.registerUnitMark("${t}", pathData), or import a catalog from 'apexcharts/pictograms'.`)),null)}_glyphSpec(e,t,n){let r=Math.round(t*10)/10,i=e.name+`|`+e.path.length+`|`+r,a=this._specCache.get(i);if(a)return a;let o=e.viewBox||[0,0,100,100],s=Math.max(0,Math.min(.9,n.padding||0)),c=typeof n.scale==`number`&&n.scale>0?n.scale:1,l=2*r*(1-s)*c,u=n.fit===`width`?l/o[2]:n.fit===`height`?l/o[3]:l/Math.max(o[2],o[3]),d=Object.freeze({pk:dd,mark:e,d:e.path,fillRule:e.fillRule,s:u,ox:(o[0]+o[2]/2)*u,oy:(o[1]+o[3]/2)*u,tail:`) scale(`+u+`)`,r});return this._specCache.set(i,d),d}_markSpecFor(e,t,n,r){if(e.shape!==`pictogram`)return this._baseSpec(e,r);let i=e.pictogram||{},a=t&&typeof t==`object`?t.mark:void 0,o=Array.isArray(i.mark)?i.mark[n%i.mark.length]:i.mark,s=this._resolveMark(a??o);return s?this._glyphSpec(s,r,i):this._baseSpec(q(K({},e),{shape:i.fallback===`square`?`square`:`circle`}),r)}_drawDot(e,t,n,r,i,a,o){let s=this.w,c=s.config.stroke.show?s.config.stroke.width:0,l=Array.isArray(s.globals.stroke.colors)&&s.globals.stroke.colors[i]||`none`,u=typeof s.config.fill.opacity==`number`?s.config.fill.opacity:1,d;if(o&&o.pk===dd)d=s.dom.Paper.path(o.d),d.node.setAttribute(`fill`,r),o.fillRule===`evenodd`&&d.node.setAttribute(`fill-rule`,`evenodd`),u<1&&d.node.setAttribute(`fill-opacity`,String(u)),d.node.setAttribute(`data:r`,String(o.r));else if(t.shape===`image`&&t.image&&t.image.src){let e=t.image.width||20,n=t.image.height||20;d=s.dom.Paper.image(t.image.src),d.node.setAttribute(`width`,String(e)),d.node.setAttribute(`height`,String(n)),d.node.setAttribute(`preserveAspectRatio`,`xMidYMid meet`),t.image.tint&&d.node.setAttribute(`filter`,`url(#${this._tintFilter(r)})`)}else if(t.shape===`square`){let i=n*2;d=e.drawRect(0,0,i,i,t.borderRadius||0,r,1,c,l),d.node.setAttribute(`fill`,r),u<1&&d.node.setAttribute(`fill-opacity`,String(u))}else d=e.drawCircle(n,{fill:r,"stroke-width":c,stroke:l}),d.node.setAttribute(`fill`,r),u<1&&d.node.setAttribute(`fill-opacity`,String(u));return d.node.classList.add(`apexcharts-unit-area`),d.node.setAttribute(`i`,String(i)),d.node.setAttribute(`j`,String(a)),d}_tintFilter(e){let t=this.w,n=`http://www.w3.org/2000/svg`,r=String(e).replace(/[^a-zA-Z0-9]/g,``),i=`apexcharts-unit-tint-${t.globals.chartID}-${r}`,a=t.dom.Paper.node;if(a.querySelector(`#${i}`))return i;let o=a.querySelector(`defs`);o||(o=X.createElementNS(n,`defs`),a.insertBefore(o,a.firstChild));let s=X.createElementNS(n,`filter`);s.setAttribute(`id`,i),s.setAttribute(`x`,`0%`),s.setAttribute(`y`,`0%`),s.setAttribute(`width`,`100%`),s.setAttribute(`height`,`100%`);let c=X.createElementNS(n,`feFlood`);c.setAttribute(`flood-color`,e),c.setAttribute(`result`,`flood`);let l=X.createElementNS(n,`feComposite`);return l.setAttribute(`in`,`flood`),l.setAttribute(`in2`,`SourceAlpha`),l.setAttribute(`operator`,`in`),s.appendChild(c),s.appendChild(l),o.appendChild(s),i}_placeDot(e,t,n,r,i){this._place(e,i||this._baseSpec(t),n,r)}_rgb(e){if(typeof e!=`string`)return null;let t=e.trim();if(t[0]===`#`){t.length===4&&(t=`#`+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]);let e=parseInt(t.slice(1,7),16);return isNaN(e)?null:[e>>16&255,e>>8&255,e&255]}let n=t.match(/rgba?\(([^)]+)\)/);if(n){let e=n[1].split(`,`).map(e=>parseFloat(e));if(e.length>=3&&e.every(e=>!isNaN(e)))return[e[0],e[1],e[2]]}return null}_shouldAnimate(){let e=this.w,t=e.config.chart.animations;return!(!Z.isBrowser()||!t||t.enabled===!1||e.globals.shouldAnimate===!1||e.globals.resized&&!e.globals.dataChanged||t.respectReducedMotion&&Qi())}_seedSprings(e,t,n){let[r,i]=fd(t.spring,n),a=this.ctx?this.ctx._unitSprings:null,o=new Map;for(let t=0;t<e.length;t++){let n=e[t],s=a&&!n.isEnter&&n.key!=null?a.get(n.key):null,c=s?s.x:Wu(n.cx0,r,i),l=s?s.y:Wu(n.cy0,r,i);s&&(c.stiffness=r,l.stiffness=r,c.damping=i,l.damping=i,n.cx0=c.value,n.cy0=l.value,this._place(n.node,n.spec,n.cx0,n.cy0),(c.velocity!==0||l.velocity!==0)&&(n.delay=0)),n.sx=c,n.sy=l,n.key!=null&&o.set(n.key,{x:c,y:l})}this.ctx&&(this.ctx._unitSprings=o)}_runGather(e){let t=this.w,n=t.config.plotOptions.unit,r=Math.max(1,t.config.chart.animations.speed||800),i=Math.min(r*.6,450),a=e.length;for(let t=0;t<a;t++)e[t].delay=a>1?t/(a-1)*i:0;let o=n.gather||{},s=o.motion||`auto`;s===`spring`||s===`auto`&&(!o.easing||o.easing===`outCubic`)?this._seedSprings(e,o,r):this.ctx&&(this.ctx._unitSprings=null);for(let t=0;t<a;t++){let n=e[t];n.spec.pk===ld&&n.r0!=null&&n.r1!=null&&n.r0!==n.r1&&n.node.setAttribute(`r`,String(n.r0))}for(let t=0;t<a;t++){let n=e[t];n.fill0&&n.fill1&&n.fill0!==n.fill1&&(n._c0=this._rgb(n.fill0),n._c1=this._rgb(n.fill1))}let c=o.easing===`outBack`?ad(typeof o.overshoot==`number`?o.overshoot:1.70158):o.easing===`inOutCubic`?od:id;this.w.globals.unitGatherRAF!=null&&(X.cancelAnimationFrame(this.w.globals.unitGatherRAF),this.w.globals.unitGatherRAF=null);let l=performance.now(),u=l,d=t=>{if(this.w.globals.isDestroyed){this.w.globals.unitGatherRAF=null,this.w.globals.animationEnded=!0;return}let n=Math.min(cd,Math.max(0,(t-u)/1e3));u=t;let i=!0;for(let o=0;o<a;o++){let a=e[o],s=t-l-a.delay,u=Math.max(0,Math.min(1,s/r)),d=id(u),f,p;if(a.sx&&a.sy){s>=0&&!a.released&&(Ku(a.sx,a.x),Ku(a.sy,a.y),a.released=!0);let e=Gu(a.sx,n),t=Gu(a.sy,n);(!a.released||!e||!t)&&(i=!1),f=a.sx.value,p=a.sy.value}else{let e=c(u);f=a.cx0+(a.x-a.cx0)*e,p=a.cy0+(a.y-a.cy0)*e}if(this._place(a.node,a.spec,f,p),a.isEnter&&(a.node.style.opacity=String(Math.min(1,u*2.5))),a._c0&&a._c1){let e=Math.round(a._c0[0]+(a._c1[0]-a._c0[0])*d),t=Math.round(a._c0[1]+(a._c1[1]-a._c0[1])*d),n=Math.round(a._c0[2]+(a._c1[2]-a._c0[2])*d);a.node.setAttribute(`fill`,`rgb(${e},${t},${n})`)}a.spec.pk===ld&&a.r0!=null&&a.r1!=null&&a.r0!==a.r1&&a.node.setAttribute(`r`,String(a.r0+(a.r1-a.r0)*d)),u<1&&(i=!1)}if(i){for(let t=0;t<a;t++){let n=e[t];n.node.style.opacity=``,n._c1&&n.fill1&&n.node.setAttribute(`fill`,n.fill1),n.spec.pk===ld&&n.r0!=null&&n.r1!=null&&n.r0!==n.r1&&n.node.setAttribute(`r`,String(n.r1))}this.w.globals.unitGatherRAF=null,this.w.globals.animationEnded=!0}else this.w.globals.unitGatherRAF=X.requestAnimationFrame(d)};this.w.globals.unitGatherRAF=X.requestAnimationFrame(d)}_collectExits(e,t,n){let r=Math.max(0,n.maxUnits||5e3),i=[];for(let[n,a]of e)if(!t.has(n)&&(i.push(a),i.length>=r))break;return i}_runExits(e,t,n){let r=this.w,i=new J(r,this.ctx),a=this._lastDotR,o=r.layout.gridWidth/2,s=r.layout.gridHeight/2,c=n.layout===`grid`||n.layout===`scatter`||n.layout===`arc`||n.layout===`custom`?0:.35,l=[];if(t.forEach(t=>{let r=t.r==null?a:t.r,o=t.spec||this._baseSpec(n,r),s=this._drawDot(i,n,r,t.fill,0,0,o);s.node.classList.add(`apexcharts-unit-exit`),this._place(s.node,o,t.x,t.y),e.add(s),l.push({node:s.node,x0:t.x,y0:t.y,spec:o})}),!this._shouldAnimate()){l.forEach(e=>e.node.remove());return}let u=Math.max(1,r.config.chart.animations.speed||800);this.w.globals.unitExitRAF!=null&&(X.cancelAnimationFrame(this.w.globals.unitExitRAF),this.w.globals.unitExitRAF=null);let d=performance.now(),f=t=>{if(this.w.globals.isDestroyed){this.w.globals.unitExitRAF=null;return}let n=Math.max(0,Math.min(1,(t-d)/u)),r=id(n);for(let e=0;e<l.length;e++){let t=l[e];if(c){let e=t.x0+(o-t.x0)*r*c,n=t.y0+(s-t.y0)*r*c;this._place(t.node,t.spec,e,n)}t.node.style.opacity=String(1-r)}n<1?this.w.globals.unitExitRAF=X.requestAnimationFrame(f):(this.w.globals.unitExitRAF=null,e.node&&e.node.remove())};this.w.globals.unitExitRAF=X.requestAnimationFrame(f)}_outerLabelsOn(e){let t=e.clusterLabels;return!!(e.layout===`custom`&&t&&t.show!==!1&&t.external&&t.external.show)}_outerLabelLines(e,t,n,r){let i=this.w,a=i.seriesData.seriesNames[e]||`series-${e+1}`,o=n>0?t/n*100:0,s=r.clusterLabels,c=typeof s.formatter==`function`?s.formatter(a,{seriesIndex:e,value:t,percent:o,w:i}):`${a}
|
|
1955
|
-
${o.toFixed(1)}%`;return String(c).split(`
|
|
1956
|
-
`)}_outerLabelGutter(e,t){let n=this.w,r=t.clusterLabels,i=r.external.connector||{},a=e.reduce((e,t)=>e+t,0),o=[];if(e.forEach((e,n)=>{e>0&&o.push(...this._outerLabelLines(n,e,a,t))}),!o.length)return 0;let s=au(n,o,{fontSize:r.fontSize,fontFamily:r.fontFamily||n.config.chart.fontFamily}),c=i.gap==null?8:i.gap,l=i.length==null?22:i.length,u=s+c+l+8+Math.abs(parseFloat(r.external.offsetX)||0);return Math.min(u,n.layout.gridWidth*.25)}_drawOuterLabels(e,t,n,r,i,a){let o=this.w;if(!Z.isBrowser())return;let s=i.clusterLabels,c=s.external,l=c.connector||{},u=l.gap==null?8:l.gap,d=l.length==null?22:l.length,f=parseFloat(c.offsetX)||0,p=parseFloat(c.offsetY)||0,m=o.layout.gridWidth,h=o.layout.gridHeight,g=this._lastDotR,_=t.filter(e=>e.dots.length>0);if(!_.length)return;let v=0,y=0;if(_.length>1){let e=_.map(e=>e.cx),t=_.map(e=>e.cy);v=Math.max(...e)-Math.min(...e),y=Math.max(...t)-Math.min(...t)}let b=v>y,x=parseFloat(s.fontSize)||13,S=Math.round(x*1.35),C=[];if(_.slice().sort((e,t)=>e.cy-t.cy).forEach((e,t)=>{let a=this._outerLabelLines(e.i,n[e.i],r,i);if(!a.some(e=>e!==``))return;let o=b?e.cx>=m/2?`right`:`left`:t%2==0?`right`:`left`,s=o===`right`?1:-1,c=e.dots[0],l=-1/0;e.dots.forEach(t=>{let n=s*t.x-.75*Math.abs(t.y-e.cy);n>l&&(l=n,c=t)});let h={x:c.x+s*(c.r||g),y:c.y},_={x:h.x+s*u,y:h.y};C.push({i:e.i,lines:a,anchor:h,elbow:_,labelX:_.x+s*d+f,idealY:h.y+p,labelY:h.y+p,side:o})}),!C.length)return;let w=C.reduce((e,t)=>Math.max(e,t.lines.length),1)*S,T=w/2;[`left`,`right`].forEach(e=>{ou(C.filter(t=>t.side===e),w+2,h-T,T)});let E=new J(o,this.ctx).group({class:`apexcharts-unit-outer-labels`});if(a){let e=Math.max(1,o.config.chart.animations.speed||800);E.node.classList.add(`apexcharts-unit-label-delay`),E.node.style.animationDelay=`${Math.min(e*.45,600)/1e3}s`}C.forEach(e=>{let t=o.globals.colors[e.i]||o.globals.colors[0]||`#008FFB`;E.add(iu(o,{lines:e.lines,lineHeight:S,anchor:e.anchor,elbow:e.elbow,labelX:e.labelX,labelY:e.labelY,side:e.side,connector:{show:l.show!==!1,width:l.width==null?1.5:l.width,color:l.color||t},style:{fontSize:s.fontSize,fontFamily:s.fontFamily||o.config.chart.fontFamily,fontWeight:s.fontWeight},foreColor:s.color||o.config.chart.foreColor,groupClass:`apexcharts-unit-outer-label-group`,textClass:`apexcharts-unit-outer-label`,connectorClass:`apexcharts-unit-label-connector`}))}),e.add(E)}_drawClusterLabel(e,t,n,r,i,a){let o=this.w;if(!Z.isBrowser())return;let s=`http://www.w3.org/2000/svg`,c=o.seriesData.seriesNames[t.i]||`series-${t.i+1}`,l=r>0?n/r*100:0,u=i.clusterLabels,d=parseFloat(u.fontSize)||13,f;f=typeof u.formatter==`function`?u.formatter(c,{seriesIndex:t.i,value:n,percent:l,w:o}):`${c} (${l.toFixed(1)}%)`;let p=typeof f==`string`?f:String(f),m=X.createElementNS(s,`text`);m.setAttribute(`class`,`apexcharts-unit-label`),m.setAttribute(`text-anchor`,`middle`),m.setAttribute(`font-size`,`${d}px`),m.setAttribute(`font-family`,u.fontFamily||o.config.chart.fontFamily||`inherit`),m.setAttribute(`font-weight`,String(u.fontWeight||600)),m.setAttribute(`fill`,u.color||a);let h=u.position===`bottom`,g=t.outerR+d*.6+3+(u.offsetY||0),_=p.length*d*.55;if(!h&&!t.flat&&u.curved!==!1&&_<=Math.PI*g*.95){let n=t.cy,r=`M ${t.cx-g} ${n} A ${g} ${g} 0 0 1 ${t.cx+g} ${n}`,i=`apexcharts-unit-label-${o.globals.chartID}-${t.i}`,a=X.createElementNS(s,`path`);a.setAttribute(`id`,i),a.setAttribute(`d`,r),a.setAttribute(`fill`,`none`),a.setAttribute(`stroke`,`none`);let c=X.createElementNS(s,`textPath`);c.setAttribute(`href`,`#${i}`),c.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,`#${i}`),c.setAttribute(`startOffset`,`50%`),c.textContent=p,m.appendChild(c),e.node.appendChild(a)}else{m.setAttribute(`x`,String(t.cx));let e=h?t.cy+t.outerR+d+6+(u.offsetY||0):t.cy-t.outerR-6-(u.offsetY||0);m.setAttribute(`y`,String(e)),m.textContent=p}e.node.appendChild(m)}},md=Math.PI/180,hd=180/Math.PI,gd=`http://www.w3.org/2000/svg`,_d=`http://www.w3.org/1999/xhtml`,vd=(e,t,n)=>e+(t-e)*n,yd=class{constructor(e,t){this.ctx=t,this.w=e;let n=e.config;this.cfg=n.plotOptions.sunburst,this.strokeWidth=n.stroke.show?n.stroke.width:0,this.strokeColor=Array.isArray(n.stroke.colors)?n.stroke.colors[0]:n.stroke.colors||`#fff`,this.startAngle=this.cfg.startAngle,this.endAngle=this.cfg.endAngle,this.maxDepth=0,this.centerX=0,this.centerY=0,this.maxRadius=0,this.total=1,this._focusMaxDepth=0,this._focus=null,this._zoomGen=0,this._roots=[],this._nodesAll=[],this._innerR=()=>0,this._outerR=()=>0,this._tooltipEl=null,this._lblSeq=0,this._morphLeafIndex=0,this._graphics=null,this._ringsG=null,this._labelsG=null}draw(e){let t=this.w,n=new J(this.w);this._graphics=n;let r=n.group({class:`apexcharts-sunburst`});if(t.globals.noData||!e||!e.length)return r;let i=t.layout.gridWidth,a=t.layout.gridHeight;if(this.centerX=i/2+(this.cfg.offsetX||0),this.centerY=a/2+(this.cfg.offsetY||0),this.maxRadius=Math.min(i,a)/2.05-this.strokeWidth-(t.config.chart.sparkline.enabled?0:t.config.chart.dropShadow.blur),this.maxRadius<5||(this._roots=this._buildHierarchy(),!this._roots.length))return r;this._roots.forEach(e=>this._fillValues(e)),this._validateStrict(),this._nodesAll=[];let o=t.globals.colors||[];this._roots.forEach((e,t)=>{this._colorPass(e,e.color||o[t%o.length]||`#008FFB`)}),this.total=this._roots.reduce((e,t)=>e+Math.max(0,t.value),0)||1,this._ringsG=n.group({class:`apexcharts-sunburst-rings`}),this._labelsG=n.group({class:`apexcharts-sunburst-labels`}),r.add(this._ringsG),r.add(this._labelsG),this._focus=null,this._relayout(this._focus);let s=t.config.chart.animations,c=`none`;return s.enabled&&(t.globals.dataChanged?s.dynamicAnimation.enabled&&(c=`update`):t.globals.resized||(c=`intro`)),this._applyLayout(c),this._renderBreadcrumb(),r}_buildHierarchy(){return Nu(this.w)}_fillValues(e){Fu(e)}_validateStrict(){if(this.cfg.partition!==`strict`)return;let e=!1,t=n=>{if(n.children&&n.children.length){let r=n.children.reduce((e,t)=>e+Math.max(0,t.value||0),0);!e&&n.value!=null&&Math.abs(r-n.value)>.5&&(console.warn(`ApexCharts sunburst: partition 'strict' but "${n.name}" (${n.value}) != sum of its children (${r}). Angles are normalized to fill the wedge.`),e=!0),n.children.forEach(t)}};this._roots.forEach(t)}_colorPass(e,t){e._color=e.color||t,this._nodesAll.push(e),e.children&&e.children.forEach(t=>this._colorPass(t,t.color||this._lighten(e._color,this.cfg.tint)))}_relayout(e){if(this._nodesAll.forEach(e=>{e._show=!1}),this._focusMaxDepth=0,e)this._placeVis(e,0,this.startAngle,this.endAngle,e._parent);else{let e=this._roots.reduce((e,t)=>e+Math.max(0,t.value),0)||1,t=this.startAngle;this._roots.forEach(n=>{let r=(this.endAngle-this.startAngle)*Math.max(0,n.value)/e;this._placeVis(n,0,t,t+r,null),t+=r})}let t=this._parseSize(this.cfg.innerSize,this.maxRadius),n=this._focusMaxDepth+1,r=(this.maxRadius-t)/n,i=+(n>1);this._innerR=e=>t+e*r+(e>0?i/2:0),this._outerR=e=>t+(e+1)*r-i/2,this._nodesAll.forEach(e=>{e._show&&(e._iR=this._innerR(e._vDepth),e._oR=e._leaf&&this.cfg.leaf===`extend`&&e._vDepth<this._focusMaxDepth?this.maxRadius:this._outerR(e._vDepth))})}_placeVis(e,t,n,r,i){if(e._show=!0,e._vDepth=t,e._a0=n,e._a1=r,e._parent=i,e._leaf=!(e.children&&e.children.length),t>this._focusMaxDepth&&(this._focusMaxDepth=t),!e._leaf){let i=e.children.reduce((e,t)=>e+Math.max(0,t.value),0)||1,a=n;e.children.forEach(o=>{let s=(r-n)*Math.max(0,o.value)/i;this._placeVis(o,t+1,a,a+s,e),a+=s})}}_applyLayout(e){let t=this.w.config.chart.animations,n=t.enabled?e===`none`?0:e===`update`?t.dynamicAnimation.speed||350:t.speed||500:0,r=++this._zoomGen,i=this.ctx?.morphTypeChange,a=!!i&&typeof i.isActive==`function`&&i.isActive()&&typeof i.getInitialPathAt==`function`,o=a?i.getSpeed():0;this._morphLeafIndex=0;let s=e===`update`?this.ctx._sunburstPrevGeoms:null;this._nodesAll.forEach(t=>{if(t._show){let i={a0:t._a0,a1:t._a1,iR:t._iR,oR:t._oR};t._el||=this._createArcEl(t);let c=a?this._morphSourceFor(t):null;if(c&&o>0)this._morphArcFrom(t,c,i,o,r);else if((e===`intro`||a)&&n>0)this._sweepArc(t,i,a?o:n,r);else{let e,a=!1;if(t._cur)e=t._cur;else if(s&&s.get(t._key))e=s.get(t._key);else{let t=(i.a0+i.a1)/2;e={a0:t,a1:t,iR:i.iR,oR:i.iR},a=!0}this._animateArc(t,e,i,n,!1,a,r)}}else if(t._el&&t._cur){let e=(t._cur.a0+t._cur.a1)/2,i={a0:e,a1:e,iR:t._cur.iR,oR:t._cur.iR};this._animateArc(t,t._cur,i,n,!0,!1,r)}});let c=new Map;this._nodesAll.forEach(e=>{e._show&&c.set(e._key,{a0:e._a0,a1:e._a1,iR:e._iR,oR:e._oR})}),this.ctx._sunburstPrevGeoms=c,this._renderLabels(n)}_morphSourceFor(e){let t=this.ctx,n=t&&t.morphTypeChange;return n?typeof n.hasKeyedMarks==`function`&&n.hasKeyedMarks()&&typeof n.getInitialPathForKey==`function`?n.getInitialPathForKey(Iu(e._key)):e.children&&e.children.length?null:n.getInitialPathAt(this._morphLeafIndex++):null}_morphArcFrom(e,t,n,r,i){let a=e._el,o=this._arcPath(n.iR,n.oR,n.a0,n.a1,this.cfg.borderRadius);a.node.style.display=``,a.attr({d:t,opacity:1}),e._cur=n,this._zoomGen===i&&new Yi(this.w,this.ctx).morphSVG(a,0,null,e._color,t,o,r,0)}_sweepArc(e,t,n,r){let i=e._el,a=this.cfg.borderRadius,o=this.startAngle,s=this.endAngle;i.node.style.display=``,i.attr({d:``,opacity:1}),i.animate(n).during(n=>{if(this._zoomGen!==r)return;let c=o+(s-o)*n;if(c<=t.a0+.01){i.attr({d:``});return}let l=Math.min(t.a1,c);i.attr({d:this._arcPath(t.iR,t.oR,t.a0,l,a)}),e._cur={a0:t.a0,a1:l,iR:t.iR,oR:t.oR}}).after(()=>{this._zoomGen===r&&(e._cur=t)})}_createArcEl(e){let t=this._graphics.drawPath({d:``,fill:e._color,stroke:this.strokeColor,strokeWidth:this.strokeWidth,fillOpacity:1,classes:`apexcharts-sunburst-arc`}),n=t.node;return n.setAttribute(`data:name`,e.name),n.setAttribute(`data:value`,String(e.value)),n.setAttribute(`data:key`,Iu(e._key)),n.setAttribute(`data:leaf`,String(!(e.children&&e.children.length))),this._attachTooltip(n,e),Z.isBrowser()&&(n.addEventListener(`click`,()=>this._zoomTo(e)),n.style.cursor=`pointer`),this._ringsG.add(t),t}_animateArc(e,t,n,r,i,a,o){let s=e._el,c=this.cfg.borderRadius;if(s.attr({fill:e._color}),r===0){s.attr({d:this._arcPath(n.iR,n.oR,n.a0,n.a1,c),opacity:+!i}),s.node.style.display=i?`none`:``,e._cur=i?null:n;return}s.node.style.display=``;let l=i?Number(s.attr(`opacity`))||1:+!a,u=+!i;s.attr({opacity:l}),s.animate(r).during(r=>{if(this._zoomGen!==o)return;let i=vd(t.a0,n.a0,r),a=vd(t.a1,n.a1,r),d=vd(t.iR,n.iR,r),f=vd(t.oR,n.oR,r);s.attr({d:this._arcPath(d,f,i,a,c),opacity:vd(l,u,r)}),e._cur={a0:i,a1:a,iR:d,oR:f}}).after(()=>{this._zoomGen===o&&(i?(s.node.style.display=`none`,e._cur=null):e._cur=n)})}_renderLabels(e){let t=this._labelsG;for(;t.node.firstChild;)t.node.removeChild(t.node.firstChild);this.cfg.dataLabels.show&&(this._nodesAll.forEach(e=>{e._show&&(e._a1-e._a0<this.cfg.dataLabels.minAngleToShow||this._renderCurvedLabel(e))}),e>0?(t.attr({opacity:0}),t.animate(250,e).attr({opacity:1})):t.attr({opacity:1}))}_renderCurvedLabel(e){if(!Z.isBrowser())return;let t=this.cfg.dataLabels.style,n=this.w,r=(e._iR+e._oR)/2,i=(e._a0+e._a1)/2,a=i>90&&i<270,o=Math.min(r>0?4/r*hd:0,(e._a1-e._a0)/2),s=a?e._a1-o:e._a0+o,c=a?e._a0+o:e._a1-o,l=this._ptAt(r,s),u=this._ptAt(r,c),d=+(Math.abs(c-s)>180),f=+!a,p=`apx-sb-lbl-${n.globals.cuid}-${this._lblSeq++}`,m=X.createElementNS(gd,`path`);m.setAttribute(`id`,p),m.setAttribute(`d`,`M ${l.x} ${l.y} A ${r} ${r} 0 ${d} ${f} ${u.x} ${u.y}`),m.setAttribute(`fill`,`none`),m.setAttribute(`stroke`,`none`);let h=t.colors,g=(Array.isArray(h)?h[0]:h)||`#fff`,_=X.createElementNS(gd,`text`);_.setAttribute(`font-size`,t.fontSize||`12px`),t.fontFamily&&_.setAttribute(`font-family`,t.fontFamily),_.setAttribute(`font-weight`,String(t.fontWeight||400)),_.setAttribute(`fill`,g),_.setAttribute(`dominant-baseline`,`central`),_.style.pointerEvents=`none`;let v=X.createElementNS(gd,`textPath`);v.setAttribute(`href`,`#`+p),v.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,`#`+p),v.setAttribute(`startOffset`,`50%`),v.setAttribute(`text-anchor`,`middle`),v.textContent=this._truncate(e.name,r,e._a1-e._a0,t.fontSize),_.appendChild(v),this._labelsG.node.appendChild(m),this._labelsG.node.appendChild(_)}_truncate(e,t,n,r){let i=t*n*md-8,a=(parseFloat(r)||12)*.58,o=Math.floor(i/a);return o>=e.length?e:o<=1?``:e.slice(0,Math.max(1,o-1))+`…`}_zoomTo(e){if(this.cfg.zoomOnClick===!1)return;let t=e===this._focus?e._parent||null:e;t!==this._focus&&(this._focus=t&&!(t.children&&t.children.length)?t._parent||null:t,this._relayout(this._focus),this._applyLayout(`zoom`),this._renderBreadcrumb())}_focusChain(){let e=[],t=this._focus;for(;t;)e.unshift(t),t=t._parent;return e}_renderBreadcrumb(){if(!Z.isBrowser())return;let e=this.w.dom.elWrap;if(!e)return;let t=e.querySelector(`.apexcharts-breadcrumb`);if(t&&t.parentNode&&t.parentNode.removeChild(t),!this._focus)return;let n=X.createElementNS(_d,`nav`);n.setAttribute(`class`,`apexcharts-breadcrumb`),n.setAttribute(`aria-label`,`Sunburst breadcrumb`),n.style.position=`absolute`,n.style.top=`0px`,n.style.left=`0px`;let r=[{name:`All`,node:null}].concat(this._focusChain().map(e=>({name:e.name,node:e})));r.forEach((e,t)=>{if(t>0){let e=X.createElementNS(_d,`span`);e.setAttribute(`class`,`apexcharts-breadcrumb-separator`),e.textContent=` / `,n.appendChild(e)}if(t===r.length-1){let t=X.createElementNS(_d,`span`);t.setAttribute(`class`,`apexcharts-breadcrumb-item apexcharts-breadcrumb-current`),t.textContent=e.name,n.appendChild(t)}else{let r=X.createElementNS(_d,`button`);if(r.setAttribute(`type`,`button`),r.setAttribute(`class`,`apexcharts-breadcrumb-item`),t===0){let e=X.createElementNS(_d,`span`);e.setAttribute(`class`,`apexcharts-breadcrumb-arrow`),e.textContent=`←`,r.appendChild(e)}let i=X.createElementNS(_d,`span`);i.setAttribute(`class`,`apexcharts-breadcrumb-label`),i.textContent=e.name,r.appendChild(i),r.addEventListener(`click`,()=>{this._focus=e.node,this._relayout(this._focus),this._applyLayout(`zoom`),this._renderBreadcrumb()}),n.appendChild(r)}}),e.appendChild(n),this._avoidChromeOverlap(n)}_avoidChromeOverlap(e){js(this.w,e)}_ptAt(e,t){return{x:this.centerX+e*Math.cos((t-90)*md),y:this.centerY+e*Math.sin((t-90)*md)}}_arcPath(e,t,n,r,i){if(t<=e+.01)return``;let a=r-n,o=this.cfg.spacing;if(o>0&&a>0&&t>0){let e=o/t*hd,i=Math.min(e/2,Math.max(0,a/2-.25));n+=i,r-=i,a=r-n}if(a<=0)return``;let s=a*md,c=this.centerX,l=this.centerY,u=i;return u=Math.min(u,s*e/2,s*t/2,(t-e)/2),u>.5?du({cx:c,cy:l,rIn:e,rOut:t,a0:n,a1:r,r:u,spanDeg:a}):pu({cx:c,cy:l,rIn:e,rOut:t,a0:n,a1:r,spanDeg:a})}_tip(){return this._tooltipEl||=this.w.dom.baseEl.querySelector(`.apexcharts-tooltip`),this._tooltipEl}_attachTooltip(e,t){this.w.config.tooltip.enabled&&Z.isBrowser()&&(e.addEventListener(`mouseenter`,e=>this._showTooltip(e,t)),e.addEventListener(`mousemove`,e=>this._positionTooltip(e)),e.addEventListener(`mouseleave`,()=>this._hideTooltip()))}_showTooltip(e,t){let n=this._tip();if(!n)return;let r=this.w,i=(t.value/this.total*100).toFixed(1),a=t._parent?t._parent.value:this.total,o=a>0?(t.value/a*100).toFixed(1):i;n.innerHTML=`<div class="apexcharts-tooltip-series-group apexcharts-active" style="display:flex;${r.config.tooltip.fillSeriesColor?`background-color:${t._color};`:``}"><span class="apexcharts-tooltip-marker" style="background-color:${t._color}"></span><div class="apexcharts-tooltip-text"><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${t.name}: </span><span class="apexcharts-tooltip-text-y-value">${t.value} (${o}% of parent, ${i}% of total)</span></div></div></div>`,n.classList.add(`apexcharts-active`),n.style.opacity=`1`,this._positionTooltip(e)}_positionTooltip(e){let t=this._tip();if(!t)return;let n=this.w.dom.elWrap.getBoundingClientRect(),r=t.offsetWidth,i=t.offsetHeight,a=e.clientX-n.left+12;a+r>n.width&&(a=e.clientX-n.left-r-12),a=Math.max(0,Math.min(a,n.width-r));let o=e.clientY-n.top+12;o+i>n.height&&(o=e.clientY-n.top-i-12),o=Math.max(0,Math.min(o,n.height-i)),t.style.left=a+`px`,t.style.top=o+`px`}_hideTooltip(){let e=this._tip();e&&(e.classList.remove(`apexcharts-active`),e.style.opacity=`0`)}_parseSize(e,t){if(typeof e==`number`)return e;let n=String(e).trim();if(n.endsWith(`%`))return parseFloat(n)/100*t;let r=parseFloat(n);return isNaN(r)?.15*t:r}_lighten(e,t){if(typeof e!=`string`||e[0]!==`#`)return e;let n=e.slice(1);if(n.length===3&&(n=n.split(``).map(e=>e+e).join(``)),n.length!==6)return e;let r=parseInt(n,16);if(isNaN(r))return e;let i=r>>16&255,a=r>>8&255,o=r&255;return i=Math.round(i+(255-i)*t),a=Math.round(a+(255-a)*t),o=Math.round(o+(255-o)*t),`#`+((1<<24)+(i<<16)+(a<<8)+o).toString(16).slice(1)}};G.use({line:ru,area:ru,scatter:ru,bubble:ru,rangeArea:ru,bar:jl,column:jl,barStacked:Ml,rangeBar:bu,candlestick:Bl,boxPlot:Bl,violin:Kl,pie:gu,donut:gu,polarArea:gu,radialBar:yu,radar:vu,heatmap:Ql,treemap:Bu,unit:pd,sunburst:yd}),Object.defineProperty(G,"__internals",{value:wo,enumerable:!1,writable:!1,configurable:!1});var bd=e(a());function xd(e,t,n){return(t=function(e){var t=function(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return typeof t==`symbol`?t:t+``}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sd(){return Sd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sd.apply(null,arguments)}function Cd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Cd(Object(n),!0).forEach((function(t){xd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Td(e){return Td=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Td(e)}var Ed=[`type`,`width`,`height`,`series`,`options`,`chartRef`];function Dd(e){return e&&Td(e)===`object`&&!Array.isArray(e)}function Od(e,t){var n=wd({},e);return Dd(e)&&Dd(t)&&Object.keys(t).forEach((function(r){n[r]=Dd(t[r])&&r in e?Od(e[r],t[r]):t[r]})),n}function kd(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new WeakSet;if(e===t)return!0;if(Td(e)!==`object`||e===null||Td(t)!==`object`||t===null)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(var a=0,o=r;a<o.length;a++){var s=o[a];if(!i.includes(s)||!kd(e[s],t[s],n))return!1}return!0}var Ad=[`type`,`series`,`options`,`width`,`height`,`chartRef`];function jd(e){var t=e.type,n=t===void 0?`line`:t,r=e.width,i=r===void 0?`100%`:r,a=e.height,s=a===void 0?`auto`:a,c=e.series,l=e.options,u=e.chartRef,d=function(e,t){if(e==null)return{};var n,r,i=function(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,Ed),f=(0,o.useRef)(null),p=(0,o.useRef)(null),m=(0,o.useRef)(null),h=u||m,g=function(){return Od(l,{chart:{type:n,height:s,width:i},series:c})};(0,o.useEffect)((function(){return h.current=new G(f.current,g()),h.current.render(),p.current=l,function(){try{h.current&&typeof h.current.destroy==`function`&&h.current.destroy()}catch{}finally{h.current=null}}}),[]),(0,o.useEffect)((function(){if(h.current&&h.current.w){var e=!kd(h.current.w.config.series,c),t=!kd(p.current,l)||s!==h.current.opts.chart.height||i!==h.current.opts.chart.width;(e||t)&&(e?t?h.current.updateOptions(g()):h.current.updateSeries(c):h.current.updateOptions(g())),p.current=l}}),[l,c,s,i]);var _,v,y=(_=Ad,v=wd({},d),_.forEach((function(e){delete v[e]})),v);return o.createElement(`div`,Sd({ref:f},y))}jd.propTypes={type:bd.default.string.isRequired,series:bd.default.array.isRequired,options:bd.default.object.isRequired,width:bd.default.oneOfType([bd.default.string,bd.default.number]),height:bd.default.oneOfType([bd.default.string,bd.default.number]),chartRef:bd.default.shape({current:bd.default.any})};export{jd as default};
|