@svgrid/enterprise 3.0.2 → 3.0.3
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/LICENSE +94 -24
- package/README.md +36 -4
- package/dist/SvAdvancedFilter.svelte +1 -1
- package/dist/SvAlertsManager.svelte +2 -1
- package/dist/SvBoard.svelte +2 -1
- package/dist/SvExportMenu.svelte +4 -1
- package/dist/SvExportMenu.svelte.d.ts +0 -13
- package/dist/SvExpressionEditor.svelte +3 -3
- package/dist/SvFormulaBar.svelte +94 -20
- package/dist/SvFormulaBar.svelte.d.ts +7 -0
- package/dist/SvGridAlerts.svelte +49 -9
- package/dist/SvGridBoard.svelte +13 -8
- package/dist/SvGridBulkEditDrawer.svelte +26 -2
- package/dist/SvGridEditPanel.svelte +3 -0
- package/dist/SvGridScheduler.svelte +69 -40
- package/dist/SvGridSelectionBar.svelte +10 -3
- package/dist/SvPivotDesigner.svelte +198 -40
- package/dist/SvPivotDesigner.svelte.d.ts +27 -20
- package/dist/SvSheet.svelte +4043 -243
- package/dist/SvSheet.svelte.d.ts +76 -3
- package/dist/SvSheetChartSetup.svelte +151 -0
- package/dist/SvSheetChartSetup.svelte.d.ts +18 -0
- package/dist/SvSheetComment.svelte +216 -31
- package/dist/SvSheetComment.svelte.d.ts +11 -11
- package/dist/SvSheetConditionalFormat.svelte +28 -31
- package/dist/SvSheetDataValidation.svelte +66 -42
- package/dist/SvSheetEditRanges.svelte +217 -0
- package/dist/SvSheetEditRanges.svelte.d.ts +15 -0
- package/dist/SvSheetErrors.svelte +125 -0
- package/dist/SvSheetErrors.svelte.d.ts +20 -0
- package/dist/SvSheetEvaluate.svelte +133 -0
- package/dist/SvSheetEvaluate.svelte.d.ts +15 -0
- package/dist/SvSheetFilterMenu.svelte +137 -34
- package/dist/SvSheetFilterMenu.svelte.d.ts +5 -0
- package/dist/SvSheetFindReplace.svelte +19 -19
- package/dist/SvSheetFormatCells.svelte +125 -81
- package/dist/SvSheetGoalSeek.svelte +17 -16
- package/dist/SvSheetInsertFunction.svelte +15 -13
- package/dist/SvSheetIteration.svelte +81 -0
- package/dist/SvSheetIteration.svelte.d.ts +10 -0
- package/dist/SvSheetLink.svelte +99 -0
- package/dist/SvSheetLink.svelte.d.ts +17 -0
- package/dist/SvSheetListPicker.svelte +4 -2
- package/dist/SvSheetListPicker.svelte.d.ts +0 -6
- package/dist/SvSheetManageRules.svelte +20 -18
- package/dist/SvSheetNameManager.svelte +17 -15
- package/dist/SvSheetPageSetup.svelte +159 -0
- package/dist/SvSheetPageSetup.svelte.d.ts +13 -0
- package/dist/SvSheetPasteSpecial.svelte +22 -20
- package/dist/SvSheetPivot.svelte +220 -0
- package/dist/SvSheetPivot.svelte.d.ts +21 -0
- package/dist/SvSheetProtectSheet.svelte +81 -0
- package/dist/SvSheetProtectSheet.svelte.d.ts +11 -0
- package/dist/SvSheetRemoveDuplicates.svelte +13 -10
- package/dist/SvSheetRibbon.svelte +104 -51
- package/dist/SvSheetSizeDialog.svelte +4 -2
- package/dist/SvSheetSort.svelte +218 -0
- package/dist/SvSheetSort.svelte.d.ts +28 -0
- package/dist/SvSheetSparklines.svelte +135 -0
- package/dist/SvSheetSparklines.svelte.d.ts +14 -0
- package/dist/SvSheetTable.svelte +160 -0
- package/dist/SvSheetTable.svelte.d.ts +24 -0
- package/dist/SvSheetTabs.svelte +161 -31
- package/dist/SvSheetTabs.svelte.d.ts +22 -8
- package/dist/SvSheetTextToColumns.svelte +20 -20
- package/dist/SvSheetValidationAlert.svelte +8 -6
- package/dist/advanced-filter-enable.js +1 -1
- package/dist/alerts/alert-engine.d.ts +6 -0
- package/dist/alerts/alert-engine.js +21 -4
- package/dist/alerts/alert-formats.js +2 -0
- package/dist/alerts/alert-types.d.ts +1 -1
- package/dist/alerts.d.ts +1 -1
- package/dist/alerts.js +2 -2
- package/dist/board.js +2 -2
- package/dist/bulk-edit.d.ts +3 -1
- package/dist/bulk-edit.js +1 -1
- package/dist/cdn/svgrid-enterprise.svelte-external.js +39827 -16429
- package/dist/designer/assets/GridMenus-8gTNssgV.js +8 -0
- package/dist/designer/assets/{SvChartMenu-D9hEeHar.js → SvChartMenu-BDoeqGz6.js} +1 -1
- package/dist/designer/assets/{SvDateTimePicker-DARvKUL2.js → SvDateTimePicker-DCPg7WGN.js} +1 -1
- package/dist/designer/assets/SvGridCellEditor-DMoWJjEI.js +4 -0
- package/dist/designer/assets/{SvGridChart-B8j1SSy3.js → SvGridChart-Cy1ATrWh.js} +2 -2
- package/dist/designer/assets/SvGridChartBuilder-eQ3mn0L9.js +1 -0
- package/dist/designer/assets/{SvGridChartPanel-pT6ITc2P.js → SvGridChartPanel-CATdVc9X.js} +3 -3
- package/dist/designer/assets/{SvGridChartView-bg281UA1.js → SvGridChartView-CmsZtCED.js} +1 -1
- package/dist/designer/assets/SvGridDropdown-Cjz0H-fI.js +1 -0
- package/dist/designer/assets/{SvTabs-UFCMTHXS.js → SvTabs-2mHC6oaz.js} +1 -1
- package/dist/designer/assets/cell-formatting-BbubJTVz.js +1 -0
- package/dist/designer/assets/{chart-cIPUsbM5.js → chart-Cn7MnNqA.js} +1 -1
- package/dist/designer/assets/{chart-panel-messages-DtTxpBUU.js → chart-panel-messages-Dz7PTIqT.js} +1 -1
- package/dist/designer/assets/{chart-summary-Czu_5epb.js → chart-summary-BD1qYB2R.js} +1 -1
- package/dist/designer/assets/{chart-trend-D5I5VEe8.js → chart-trend-B8xr5LuD.js} +1 -1
- package/dist/designer/assets/{dismissable-BO547MH9.js → dismissable-ChWRPkoa.js} +1 -1
- package/dist/designer/assets/{export-format-D-eP4b2l.js → export-format-DGckmgKr.js} +1 -1
- package/dist/designer/assets/{focus-trap-CAreAhlU.js → focus-trap-V2-6Fy9I.js} +1 -1
- package/dist/designer/assets/{index-DwU7CAMm.js → index-D5bVbuzI.js} +317 -315
- package/dist/designer/assets/index-_JVFxt02.css +1 -0
- package/dist/designer/assets/row-resize-BInFWCpr.js +1 -0
- package/dist/designer/assets/server-block-cache-CXJKkJpy.js +1 -0
- package/dist/designer/assets/src-DUQ4xE3x.js +58 -0
- package/dist/designer/assets/validate-C3B8QKsM.js +1 -0
- package/dist/designer/index.html +17 -16
- package/dist/export-pdf.d.ts +75 -0
- package/dist/export-pdf.js +216 -15
- package/dist/export.js +10 -2
- package/dist/gantt/SvGridGantt.svelte +2890 -0
- package/dist/gantt/SvGridGantt.svelte.d.ts +30 -0
- package/dist/gantt/gantt-config.d.ts +73 -0
- package/dist/gantt/gantt-config.js +1 -0
- package/dist/gantt/gantt-critical-path.d.ts +67 -0
- package/dist/gantt/gantt-critical-path.js +207 -0
- package/dist/gantt/gantt-model.d.ts +257 -0
- package/dist/gantt/gantt-model.js +651 -0
- package/dist/gantt/gantt-resources.d.ts +59 -0
- package/dist/gantt/gantt-resources.js +71 -0
- package/dist/gantt/gantt.d.ts +7 -0
- package/dist/gantt/gantt.js +36 -0
- package/dist/gantt/index.d.ts +15 -0
- package/dist/gantt/index.js +22 -0
- package/dist/gantt/timeline-arrows.d.ts +102 -0
- package/dist/gantt/timeline-arrows.js +181 -0
- package/dist/import.d.ts +2 -2
- package/dist/import.js +1 -1
- package/dist/index.d.ts +34 -7
- package/dist/index.js +44 -7
- package/dist/install.js +8 -1
- package/dist/license-core.d.ts +17 -1
- package/dist/license-core.js +16 -5
- package/dist/license.d.ts +18 -2
- package/dist/license.js +71 -6
- package/dist/node/studio.js +140 -8
- package/dist/pivot-enable.js +2 -2
- package/dist/scheduler-dependencies.d.ts +35 -0
- package/dist/scheduler-dependencies.js +36 -1
- package/dist/scheduler.js +2 -2
- package/dist/selection-bar.js +2 -2
- package/dist/server/SvGroupCell.svelte +213 -0
- package/dist/server/SvGroupCell.svelte.d.ts +62 -0
- package/dist/server/SvRowGroupPanel.svelte +322 -0
- package/dist/server/SvRowGroupPanel.svelte.d.ts +37 -0
- package/dist/server/enable.d.ts +17 -0
- package/dist/server/enable.js +49 -0
- package/dist/server/index.d.ts +22 -0
- package/dist/server/index.js +24 -0
- package/dist/server/messages.d.ts +45 -0
- package/dist/server/messages.js +35 -0
- package/dist/server/server-group-model.d.ts +104 -0
- package/dist/server/server-group-model.js +272 -0
- package/dist/server/server-pivot.d.ts +46 -0
- package/dist/server/server-pivot.js +57 -0
- package/dist/server/server-row-model.d.ts +547 -0
- package/dist/server/server-row-model.js +1551 -0
- package/dist/server/server-selection.d.ts +99 -0
- package/dist/server/server-selection.js +215 -0
- package/dist/server/svgrid-adapter.d.ts +155 -0
- package/dist/server/svgrid-adapter.js +202 -0
- package/dist/sheet/ast.d.ts +45 -1
- package/dist/sheet/ast.js +14 -0
- package/dist/sheet/auto-filter.d.ts +58 -4
- package/dist/sheet/auto-filter.js +159 -11
- package/dist/sheet/autocomplete.d.ts +9 -0
- package/dist/sheet/autocomplete.js +90 -4
- package/dist/sheet/cell-images.d.ts +39 -0
- package/dist/sheet/cell-images.js +90 -0
- package/dist/sheet/cell-types.d.ts +58 -0
- package/dist/sheet/cell-types.js +96 -0
- package/dist/sheet/coerce.d.ts +40 -0
- package/dist/sheet/coerce.js +170 -3
- package/dist/sheet/comments.d.ts +43 -9
- package/dist/sheet/comments.js +85 -27
- package/dist/sheet/conditional-formats.d.ts +29 -6
- package/dist/sheet/conditional-formats.js +37 -12
- package/dist/sheet/csv.d.ts +32 -0
- package/dist/sheet/csv.js +158 -0
- package/dist/sheet/culture.d.ts +87 -0
- package/dist/sheet/culture.js +247 -0
- package/dist/sheet/delta.d.ts +102 -0
- package/dist/sheet/delta.js +203 -0
- package/dist/sheet/deps.d.ts +45 -1
- package/dist/sheet/deps.js +77 -2
- package/dist/sheet/document.d.ts +106 -4
- package/dist/sheet/document.js +204 -3
- package/dist/sheet/engine.d.ts +67 -0
- package/dist/sheet/engine.js +19 -0
- package/dist/sheet/entry.d.ts +8 -4
- package/dist/sheet/entry.js +171 -21
- package/dist/sheet/error-check.d.ts +49 -0
- package/dist/sheet/error-check.js +83 -0
- package/dist/sheet/evaluate-steps.d.ts +48 -0
- package/dist/sheet/evaluate-steps.js +196 -0
- package/dist/sheet/evaluate.d.ts +67 -0
- package/dist/sheet/evaluate.js +725 -13
- package/dist/sheet/filter-files.d.ts +37 -0
- package/dist/sheet/filter-files.js +465 -0
- package/dist/sheet/format-store.d.ts +15 -0
- package/dist/sheet/format-store.js +11 -1
- package/dist/sheet/from-rows.d.ts +14 -0
- package/dist/sheet/from-rows.js +50 -0
- package/dist/sheet/function-catalog.d.ts +1 -1
- package/dist/sheet/function-catalog.js +296 -5
- package/dist/sheet/functions.js +363 -91
- package/dist/sheet/index.d.ts +35 -8
- package/dist/sheet/index.js +35 -8
- package/dist/sheet/links.d.ts +57 -0
- package/dist/sheet/links.js +174 -0
- package/dist/sheet/messages.d.ts +778 -0
- package/dist/sheet/messages.js +806 -0
- package/dist/sheet/number-format.d.ts +52 -5
- package/dist/sheet/number-format.js +465 -68
- package/dist/sheet/objects.d.ts +106 -0
- package/dist/sheet/objects.js +149 -0
- package/dist/sheet/ods-document.d.ts +44 -0
- package/dist/sheet/ods-document.js +1275 -0
- package/dist/sheet/open-file.d.ts +26 -0
- package/dist/sheet/open-file.js +56 -0
- package/dist/sheet/outline.d.ts +82 -0
- package/dist/sheet/outline.js +228 -0
- package/dist/sheet/packs/array.d.ts +16 -0
- package/dist/sheet/packs/array.js +172 -0
- package/dist/sheet/packs/database.d.ts +42 -0
- package/dist/sheet/packs/database.js +142 -0
- package/dist/sheet/packs/engineering.d.ts +2 -0
- package/dist/sheet/packs/engineering.js +296 -0
- package/dist/sheet/packs/financial.d.ts +5 -0
- package/dist/sheet/packs/financial.js +220 -0
- package/dist/sheet/packs/math-stats.d.ts +2 -0
- package/dist/sheet/packs/math-stats.js +372 -0
- package/dist/sheet/packs/special.d.ts +44 -0
- package/dist/sheet/packs/special.js +187 -0
- package/dist/sheet/packs/stats-dist.d.ts +2 -0
- package/dist/sheet/packs/stats-dist.js +785 -0
- package/dist/sheet/packs/text-date.d.ts +2 -0
- package/dist/sheet/packs/text-date.js +332 -0
- package/dist/sheet/packs/trig.d.ts +2 -0
- package/dist/sheet/packs/trig.js +73 -0
- package/dist/sheet/page-setup.d.ts +73 -0
- package/dist/sheet/page-setup.js +73 -0
- package/dist/sheet/parse.js +42 -10
- package/dist/sheet/paste-special.d.ts +22 -0
- package/dist/sheet/paste-special.js +14 -5
- package/dist/sheet/pivot-range.d.ts +160 -0
- package/dist/sheet/pivot-range.js +333 -0
- package/dist/sheet/presence.d.ts +73 -0
- package/dist/sheet/presence.js +79 -0
- package/dist/sheet/print.d.ts +104 -0
- package/dist/sheet/print.js +169 -0
- package/dist/sheet/protection.d.ts +55 -1
- package/dist/sheet/protection.js +55 -2
- package/dist/sheet/rects.d.ts +1 -1
- package/dist/sheet/refs.d.ts +48 -0
- package/dist/sheet/refs.js +155 -8
- package/dist/sheet/ribbon-icons.d.ts +1 -1
- package/dist/sheet/ribbon-icons.js +186 -0
- package/dist/sheet/ribbon.d.ts +1 -1
- package/dist/sheet/ribbon.js +324 -23
- package/dist/sheet/sheet-kinds.d.ts +74 -0
- package/dist/sheet/sheet-kinds.js +91 -0
- package/dist/sheet/shortcuts.d.ts +13 -3
- package/dist/sheet/shortcuts.js +63 -12
- package/dist/sheet/sort.d.ts +51 -0
- package/dist/sheet/sort.js +107 -0
- package/dist/sheet/sparklines.d.ts +111 -0
- package/dist/sheet/sparklines.js +204 -0
- package/dist/sheet/table-styles.d.ts +74 -0
- package/dist/sheet/table-styles.js +152 -0
- package/dist/sheet/tables.d.ts +19 -0
- package/dist/sheet/tables.js +31 -0
- package/dist/sheet/tokenize.d.ts +18 -1
- package/dist/sheet/tokenize.js +60 -9
- package/dist/sheet/validation.d.ts +16 -0
- package/dist/sheet/validation.js +37 -0
- package/dist/sheet/workbook.d.ts +148 -3
- package/dist/sheet/workbook.js +742 -31
- package/dist/sheet/xls-cfb.d.ts +32 -0
- package/dist/sheet/xls-cfb.js +290 -0
- package/dist/sheet/xls-document.d.ts +10 -0
- package/dist/sheet/xls-document.js +1243 -0
- package/dist/sheet/xls-formula.d.ts +40 -0
- package/dist/sheet/xls-formula.js +569 -0
- package/dist/sheet/xlsx-document.d.ts +108 -0
- package/dist/sheet/xlsx-document.js +1849 -0
- package/dist/sheet/xlsx-drawing.d.ts +99 -0
- package/dist/sheet/xlsx-drawing.js +420 -0
- package/dist/sheet-enable.js +6 -7
- package/dist/sheet-text.d.ts +7 -0
- package/dist/sheet-text.js +29 -0
- package/dist/sources/auth-supabase.js +2 -2
- package/dist/sources/realtime-supabase.js +2 -2
- package/dist/sources/rest.d.ts +6 -2
- package/dist/sources/rest.js +42 -7
- package/dist/sources/supabase.d.ts +10 -1
- package/dist/sources/supabase.js +73 -40
- package/dist/studio/emit-project.js +14 -1
- package/dist/studio/index.js +1 -1
- package/dist/studio/project.d.ts +11 -2
- package/dist/studio/project.js +5 -2
- package/dist/studio/ui-components.generated.js +107 -2
- package/dist/sveltekit/in-memory.d.ts +2 -2
- package/dist/sveltekit/in-memory.js +125 -4
- package/dist/sveltekit/index.d.ts +1 -1
- package/dist/sveltekit/index.js +1 -1
- package/dist/sveltekit/query-plan.d.ts +50 -4
- package/dist/sveltekit/query-plan.js +25 -3
- package/dist/sveltekit/sql-source.d.ts +6 -0
- package/dist/sveltekit/sql-source.js +34 -6
- package/dist/sveltekit/sql.d.ts +31 -0
- package/dist/sveltekit/sql.js +135 -25
- package/dist/sveltekit/transport.d.ts +10 -2
- package/dist/sveltekit/transport.js +30 -6
- package/dist/upgrade-prompt.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/watermark.js +35 -2
- package/dist/wc/GridMenus-By9vPuq0.js +1088 -0
- package/dist/wc/SvChartMenu-CQNrQGT2.js +308 -0
- package/dist/wc/SvDateRangeInput-DR6m7bSM.js +199 -0
- package/dist/wc/SvDateTimePicker-D-vRnaMo.js +771 -0
- package/dist/wc/SvField-B_kurx_P.js +149 -0
- package/dist/wc/SvGrid.helpers-BdVDtjUm.js +135 -0
- package/dist/wc/SvGridCellEditor-Bnf1Kr5C.js +560 -0
- package/dist/wc/SvGridChart-BqUJh2pG.js +3572 -0
- package/dist/wc/SvGridChartBuilder-CGycC5cn.js +988 -0
- package/dist/wc/SvGridChartPanel-CRnizsHD.js +1746 -0
- package/dist/wc/SvGridChartView-D1pa_xMy.js +47 -0
- package/dist/wc/SvGridDropdown-45WsObLL.js +259 -0
- package/dist/wc/SvModal-DrfOYYyX.js +189 -0
- package/dist/wc/cell-formatting-CBfgahv1.js +86 -0
- package/dist/wc/chart-6OXlybVT.js +4341 -0
- package/dist/wc/chart-export-CeSADGfi.js +135 -0
- package/dist/wc/chart-export-pdf-BGko7MER.js +104 -0
- package/dist/wc/chart-summary-2m3ia1-n.js +137 -0
- package/dist/wc/chart-trend-CQOQtTMl.js +50 -0
- package/dist/wc/chart-validate-CD6ptiwg.js +180 -0
- package/dist/wc/client-DQIzjDBG.js +3064 -0
- package/dist/wc/column-resize-DUPgynvc.js +101 -0
- package/dist/wc/date-format-DS-z_h9v.js +1130 -0
- package/dist/wc/dismissable-CQ6XFXsk.js +45 -0
- package/dist/wc/editor-contract-peBDxir_.js +22 -0
- package/dist/wc/editor-registry-DxGKqcvx.js +24 -0
- package/dist/wc/focus-trap-Dbb2tJxb.js +65 -0
- package/dist/wc/list-option-DrRyivWp.js +82 -0
- package/dist/wc/popover-WsGlvtQv.js +69 -0
- package/dist/wc/positioning-BiKLfu1E.js +112 -0
- package/dist/wc/react.d.ts +41 -0
- package/dist/wc/react.js +90 -0
- package/dist/wc/rolldown-runtime-Dy4uBu1J.js +11 -0
- package/dist/wc/row-drag-touch-CycRR65n.js +93 -0
- package/dist/wc/row-resize-limG_N1z.js +111 -0
- package/dist/wc/sv-sheet-element.d.ts +97 -0
- package/dist/wc/sv-sheet-element.js +44213 -0
- package/dist/wc/svelte-virtualizer.svelte-CXtQy2TQ.js +530 -0
- package/dist/wc/validate-BqDthkNr.js +88 -0
- package/dist/wc/vue.d.ts +31 -0
- package/dist/wc/vue.js +75 -0
- package/package.json +30 -5
- package/dist/designer/assets/GridMenus-BlsvL_aU.js +0 -8
- package/dist/designer/assets/SvGridCellEditor-C7uQXYds.js +0 -4
- package/dist/designer/assets/SvGridChartBuilder-kvyIU_Rl.js +0 -1
- package/dist/designer/assets/SvGridDropdown-Bb3HH2Aj.js +0 -1
- package/dist/designer/assets/cell-formatting-wr5wm7US.js +0 -1
- package/dist/designer/assets/index-CMFgAoVV.css +0 -1
- package/dist/designer/assets/row-resize-DLktcqUK.js +0 -1
- package/dist/designer/assets/src-EdI3Xqds.js +0 -58
- package/dist/designer/assets/validate-h-aslRV9.js +0 -1
|
@@ -0,0 +1,3572 @@
|
|
|
1
|
+
import { D as e, G as t, H as n, I as r, J as i, K as a, L as o, M as s, O as c, P as l, R as u, S as d, T as f, U as p, V as m, W as h, X as g, Y as _, a as ee, at as v, dt as te, et as y, it as b, j as x, k as S, l as ne, m as C, mt as w, n as T, nt as E, o as re, p as ie, pt as ae, q as oe, rt as se, st as D, tt as O, ut as ce, w as le, x as k, z as A } from "./client-DQIzjDBG.js";
|
|
2
|
+
import { a as ue } from "./editor-contract-peBDxir_.js";
|
|
3
|
+
import { i as de } from "./chart-trend-CQOQtTMl.js";
|
|
4
|
+
import { C as fe, D as pe, E as me, O as he, T as ge, _ as _e, a as ve, b as ye, d as be, g as xe, i as Se, n as Ce, t as we, v as Te, w as Ee, x as De, y as Oe } from "./chart-6OXlybVT.js";
|
|
5
|
+
import { i as ke, t as Ae } from "./chart-export-CeSADGfi.js";
|
|
6
|
+
//#region ../grid/dist/chart-zoom.js
|
|
7
|
+
function je(e, t, n) {
|
|
8
|
+
if (n <= 0) return null;
|
|
9
|
+
let r = Math.max(0, Math.min(n - 1, Math.round(e))), i = Math.max(0, Math.min(n - 1, Math.round(t)));
|
|
10
|
+
return i < r && ([r, i] = [i, r]), r === 0 && i === n - 1 ? null : {
|
|
11
|
+
i0: r,
|
|
12
|
+
i1: i
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function Me(e, t, n, r) {
|
|
16
|
+
if (t <= 2) return null;
|
|
17
|
+
let i = e ? e.i0 : 0, a = e ? e.i1 : t - 1, o = a - i + 1, s = Math.max(2, Math.min(t, Math.round(o * r)));
|
|
18
|
+
if (s === o) return e;
|
|
19
|
+
let c = o > 1 ? (Math.max(i, Math.min(a, n)) - i) / (o - 1) : .5, l = Math.round(n - c * (s - 1));
|
|
20
|
+
return l = Math.max(0, Math.min(t - s, l)), je(l, l + s - 1, t);
|
|
21
|
+
}
|
|
22
|
+
function Ne(e, t, n) {
|
|
23
|
+
if (!e || !n) return e;
|
|
24
|
+
let r = e.i1 - e.i0, i = e.i0 + Math.round(n);
|
|
25
|
+
return i = Math.max(0, Math.min(t - 1 - r, i)), je(i, i + r, t);
|
|
26
|
+
}
|
|
27
|
+
function Pe(e, t, n, r) {
|
|
28
|
+
return !Number.isFinite(r) || r <= 0 ? e : Me(e, t, n, 1 / r);
|
|
29
|
+
}
|
|
30
|
+
function Fe(e, t, n) {
|
|
31
|
+
let r = e.length;
|
|
32
|
+
if (!r) return null;
|
|
33
|
+
let i = e.map((e) => Date.parse(e)), a = [...i].reverse().find(Number.isFinite);
|
|
34
|
+
if (a == null) return null;
|
|
35
|
+
let o = n ?? a, s = 864e5, c, l = o;
|
|
36
|
+
if (typeof t == "object") {
|
|
37
|
+
if (t.from) c = Date.parse(t.from);
|
|
38
|
+
else if (t.days) c = o - t.days * s;
|
|
39
|
+
else return null;
|
|
40
|
+
t.to && (l = Date.parse(t.to));
|
|
41
|
+
} else switch (t) {
|
|
42
|
+
case "1W":
|
|
43
|
+
c = o - 7 * s;
|
|
44
|
+
break;
|
|
45
|
+
case "1M":
|
|
46
|
+
c = j(o, -1);
|
|
47
|
+
break;
|
|
48
|
+
case "3M":
|
|
49
|
+
c = j(o, -3);
|
|
50
|
+
break;
|
|
51
|
+
case "6M":
|
|
52
|
+
c = j(o, -6);
|
|
53
|
+
break;
|
|
54
|
+
case "1Y":
|
|
55
|
+
c = j(o, -12);
|
|
56
|
+
break;
|
|
57
|
+
case "YTD": {
|
|
58
|
+
let e = new Date(o);
|
|
59
|
+
c = Date.UTC(e.getUTCFullYear(), 0, 1);
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
default: return null;
|
|
63
|
+
}
|
|
64
|
+
if (!Number.isFinite(c) || !Number.isFinite(l)) return null;
|
|
65
|
+
let u = -1, d = -1;
|
|
66
|
+
for (let e = 0; e < r; e += 1) {
|
|
67
|
+
let t = i[e];
|
|
68
|
+
Number.isFinite(t) && (t >= c && u < 0 && (u = e), t <= l && (d = e));
|
|
69
|
+
}
|
|
70
|
+
return u < 0 || d < 0 || d < u ? null : je(u, d, r);
|
|
71
|
+
}
|
|
72
|
+
function j(e, t) {
|
|
73
|
+
let n = new Date(e);
|
|
74
|
+
return Date.UTC(n.getUTCFullYear(), n.getUTCMonth() + t, n.getUTCDate(), n.getUTCHours(), n.getUTCMinutes());
|
|
75
|
+
}
|
|
76
|
+
function Ie(e, t) {
|
|
77
|
+
let n = -1, r = Infinity;
|
|
78
|
+
for (let i = 0; i < e.length; i += 1) {
|
|
79
|
+
let a = Date.parse(e[i]);
|
|
80
|
+
if (!Number.isFinite(a)) continue;
|
|
81
|
+
let o = Math.abs(a - t);
|
|
82
|
+
o < r && (r = o, n = i);
|
|
83
|
+
}
|
|
84
|
+
return n;
|
|
85
|
+
}
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region ../grid/dist/chart-sync.svelte.js
|
|
88
|
+
var M = /* @__PURE__ */ new Map();
|
|
89
|
+
function Le(e) {
|
|
90
|
+
let t = M.get(e);
|
|
91
|
+
if (t) return t;
|
|
92
|
+
let n = se({
|
|
93
|
+
hover: null,
|
|
94
|
+
zoom: null
|
|
95
|
+
});
|
|
96
|
+
return M.set(e, n), n;
|
|
97
|
+
}
|
|
98
|
+
function Re(e, t) {
|
|
99
|
+
Le(e).hover = t;
|
|
100
|
+
}
|
|
101
|
+
function ze(e, t, n, r, i = null) {
|
|
102
|
+
Le(e).zoom = {
|
|
103
|
+
window: t,
|
|
104
|
+
count: n,
|
|
105
|
+
from: r,
|
|
106
|
+
labels: i
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
//#endregion
|
|
110
|
+
//#region ../grid/dist/chart-motion.js
|
|
111
|
+
var N = (e, t, n) => e + (t - e) * n, P = (e) => Math.round(e * 100) / 100;
|
|
112
|
+
function Be(e, t, n) {
|
|
113
|
+
return n >= 1 ? t : n <= 0 && e.type === t.type ? e : e.type === t.type ? {
|
|
114
|
+
...t,
|
|
115
|
+
bars: He(e.bars, t.bars, n, t.plot.y + t.plot.h),
|
|
116
|
+
lines: Ue(e.lines, t.lines, n),
|
|
117
|
+
candles: Ge(e.candles, t.candles, n),
|
|
118
|
+
slices: Ke(e.slices, t.slices, n),
|
|
119
|
+
arcs: Je(e.arcs, t.arcs, n),
|
|
120
|
+
yTicks: t.yTicks.map((t) => {
|
|
121
|
+
let r = e.yTicks.find((e) => e.value === t.value);
|
|
122
|
+
return r ? {
|
|
123
|
+
...t,
|
|
124
|
+
y: P(N(r.y, t.y, n))
|
|
125
|
+
} : t;
|
|
126
|
+
})
|
|
127
|
+
} : t;
|
|
128
|
+
}
|
|
129
|
+
var Ve = (e) => `${e.series}\u0000${e.label}`;
|
|
130
|
+
function He(e, t, n, r) {
|
|
131
|
+
if (!e.length && !t.length) return t;
|
|
132
|
+
let i = new Map(e.map((e) => [Ve(e), e])), a = /* @__PURE__ */ new Set(), o = t.map((e) => {
|
|
133
|
+
let t = Ve(e);
|
|
134
|
+
a.add(t);
|
|
135
|
+
let o = i.get(t);
|
|
136
|
+
if (!o) {
|
|
137
|
+
let t = N(r, e.y, n);
|
|
138
|
+
return {
|
|
139
|
+
...e,
|
|
140
|
+
y: P(t),
|
|
141
|
+
h: P(Math.max(0, N(0, e.h, n)))
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
return {
|
|
145
|
+
...e,
|
|
146
|
+
x: P(N(o.x, e.x, n)),
|
|
147
|
+
y: P(N(o.y, e.y, n)),
|
|
148
|
+
w: P(N(o.w, e.w, n)),
|
|
149
|
+
h: P(N(o.h, e.h, n))
|
|
150
|
+
};
|
|
151
|
+
});
|
|
152
|
+
for (let t of e) a.has(Ve(t)) || o.push({
|
|
153
|
+
...t,
|
|
154
|
+
y: P(N(t.y, r, n)),
|
|
155
|
+
h: P(Math.max(0, N(t.h, 0, n)))
|
|
156
|
+
});
|
|
157
|
+
return o;
|
|
158
|
+
}
|
|
159
|
+
function Ue(e, t, n) {
|
|
160
|
+
if (!e.length) return t;
|
|
161
|
+
let r = new Map(e.map((e) => [e.label, e]));
|
|
162
|
+
return t.map((e) => {
|
|
163
|
+
let t = r.get(e.label);
|
|
164
|
+
if (!t || t.points.length !== e.points.length) return e;
|
|
165
|
+
let i = e.points.map((e, r) => {
|
|
166
|
+
let i = t.points[r];
|
|
167
|
+
return !e.defined || !i.defined ? e : {
|
|
168
|
+
...e,
|
|
169
|
+
x: P(N(i.x, e.x, n)),
|
|
170
|
+
y: P(N(i.y, e.y, n))
|
|
171
|
+
};
|
|
172
|
+
});
|
|
173
|
+
return {
|
|
174
|
+
...e,
|
|
175
|
+
points: i,
|
|
176
|
+
path: Oe(i, !!e.smooth, { step: e.step })
|
|
177
|
+
};
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
var We = (e) => `${e.series}\u0000${e.label}`;
|
|
181
|
+
function Ge(e, t, n) {
|
|
182
|
+
if (!e.length) return t;
|
|
183
|
+
let r = new Map(e.map((e) => [We(e), e]));
|
|
184
|
+
return t.map((e) => {
|
|
185
|
+
let t = r.get(We(e));
|
|
186
|
+
if (!t) return e;
|
|
187
|
+
let i = N(t.yOpen, e.yOpen, n), a = N(t.yClose, e.yClose, n);
|
|
188
|
+
return {
|
|
189
|
+
...e,
|
|
190
|
+
x: P(N(t.x, e.x, n)),
|
|
191
|
+
xCenter: P(N(t.xCenter, e.xCenter, n)),
|
|
192
|
+
yOpen: P(i),
|
|
193
|
+
yClose: P(a),
|
|
194
|
+
yHigh: P(N(t.yHigh, e.yHigh, n)),
|
|
195
|
+
yLow: P(N(t.yLow, e.yLow, n)),
|
|
196
|
+
bodyY: P(Math.min(i, a)),
|
|
197
|
+
bodyH: P(Math.max(1, Math.abs(a - i)))
|
|
198
|
+
};
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
function Ke(e, t, n) {
|
|
202
|
+
if (!e.length || t.some((e) => !e.arc)) return t;
|
|
203
|
+
let r = new Map(e.map((e) => [e.label, e]));
|
|
204
|
+
return t.map((e) => {
|
|
205
|
+
let t = r.get(e.label);
|
|
206
|
+
if (!t?.arc || !e.arc) return e;
|
|
207
|
+
let i = N(t.arc.a0, e.arc.a0, n), a = N(t.arc.a1, e.arc.a1, n), o = (i + a) / 2, s = (e.arc.r + e.arc.ir) / 2 || e.arc.r * .6;
|
|
208
|
+
return {
|
|
209
|
+
...e,
|
|
210
|
+
path: Te(e.arc.cx, e.arc.cy, e.arc.ir, e.arc.r, i, a),
|
|
211
|
+
cx: P(e.arc.cx + s * Math.cos(o)),
|
|
212
|
+
cy: P(e.arc.cy + s * Math.sin(o)),
|
|
213
|
+
arc: {
|
|
214
|
+
...e.arc,
|
|
215
|
+
a0: i,
|
|
216
|
+
a1: a
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
var qe = (e) => e.nodePath ? e.nodePath.join("/") : `${e.series}\u0000${e.label}`;
|
|
222
|
+
function Je(e, t, n) {
|
|
223
|
+
if (!e.length) return t;
|
|
224
|
+
let r = new Map(e.map((e) => [qe(e), e]));
|
|
225
|
+
return t.map((e) => {
|
|
226
|
+
let t = r.get(qe(e));
|
|
227
|
+
if (!t) return e;
|
|
228
|
+
let i = N(t.a0, e.a0, n), a = N(t.a1, e.a1, n), o = N(t.r0, e.r0, n), s = N(t.r1, e.r1, n), c = (i + a) / 2, l = (o + s) / 2;
|
|
229
|
+
return {
|
|
230
|
+
...e,
|
|
231
|
+
a0: i,
|
|
232
|
+
a1: a,
|
|
233
|
+
r0: o,
|
|
234
|
+
r1: s,
|
|
235
|
+
path: Te(e.cx, e.cy, o, s, i, a),
|
|
236
|
+
lx: P(e.cx + l * Math.cos(c)),
|
|
237
|
+
ly: P(e.cy + l * Math.sin(c))
|
|
238
|
+
};
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
//#endregion
|
|
242
|
+
//#region ../grid/dist/chart-messages.js
|
|
243
|
+
var Ye = {
|
|
244
|
+
chartLabel: "{type} chart",
|
|
245
|
+
dataTable: "{type} chart data",
|
|
246
|
+
dataTableCapped: ", first {shown} of {total} rows",
|
|
247
|
+
noData: "No data",
|
|
248
|
+
noValue: "no value",
|
|
249
|
+
seriesAtCategory: "{series}: {value} at {category}",
|
|
250
|
+
densePoints: "{count} points, {from} to {to}. Arrow keys step through values.",
|
|
251
|
+
drillIn: ", drill in",
|
|
252
|
+
sankeyNode: "{label}: in {in}, out {out}",
|
|
253
|
+
total: "Total",
|
|
254
|
+
rSquared: "R² {value}",
|
|
255
|
+
describeChart: "Describe chart",
|
|
256
|
+
describeCopied: "Description copied",
|
|
257
|
+
drillPath: "Drilldown path",
|
|
258
|
+
drillRoot: "All",
|
|
259
|
+
dateRange: "Date range",
|
|
260
|
+
showLast: "Show the last {preset}",
|
|
261
|
+
pan: "Pan",
|
|
262
|
+
panTitle: "Drag the plot to pan the zoomed window",
|
|
263
|
+
resetZoom: "Reset zoom",
|
|
264
|
+
resetZoomTitle: "Reset zoom (or double-click the plot)",
|
|
265
|
+
annotate: "Annotate",
|
|
266
|
+
annotateOnTitle: "Click the plot to pin a note, or a marker to remove it",
|
|
267
|
+
annotateOffTitle: "Pin notes on the chart",
|
|
268
|
+
drawingTools: "Drawing tools",
|
|
269
|
+
draw: "Draw: {tool}",
|
|
270
|
+
toolTrend: "Trend",
|
|
271
|
+
toolRay: "Ray",
|
|
272
|
+
toolFib: "Fib",
|
|
273
|
+
toolRect: "Rect",
|
|
274
|
+
toolArrow: "Arrow",
|
|
275
|
+
toolText: "Text",
|
|
276
|
+
drawing: "{tool} drawing",
|
|
277
|
+
deleteDrawing: "Delete",
|
|
278
|
+
deleteDrawingTitle: "Remove the selected drawing (Delete)",
|
|
279
|
+
clearDrawings: "Clear",
|
|
280
|
+
clearDrawingsTitle: "Remove every drawing",
|
|
281
|
+
noteText: "Note text",
|
|
282
|
+
removeNote: "Remove note: {label}",
|
|
283
|
+
png: "PNG",
|
|
284
|
+
downloadPng: "Download PNG",
|
|
285
|
+
svg: "SVG",
|
|
286
|
+
downloadSvg: "Download SVG",
|
|
287
|
+
pdf: "PDF",
|
|
288
|
+
downloadPdf: "Download PDF",
|
|
289
|
+
downloadCsv: "Download CSV",
|
|
290
|
+
print: "Print",
|
|
291
|
+
printTitle: "Print the chart",
|
|
292
|
+
copy: "Copy",
|
|
293
|
+
copied: "✓ Copied",
|
|
294
|
+
copyTitle: "Copy chart as image",
|
|
295
|
+
copyAsImage: "Copy as image",
|
|
296
|
+
range: "Range",
|
|
297
|
+
series: "Series",
|
|
298
|
+
showSeries: "Show",
|
|
299
|
+
hideSeries: "Hide",
|
|
300
|
+
isolateHint: "double-click to isolate",
|
|
301
|
+
showMore: "+{n} more",
|
|
302
|
+
showLess: "Show less",
|
|
303
|
+
rangeBrush: "Range brush",
|
|
304
|
+
brushRange: "{from} to {to}"
|
|
305
|
+
};
|
|
306
|
+
function Xe(e) {
|
|
307
|
+
return ue(Ye, e);
|
|
308
|
+
}
|
|
309
|
+
function F(e, t) {
|
|
310
|
+
return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : e);
|
|
311
|
+
}
|
|
312
|
+
//#endregion
|
|
313
|
+
//#region ../grid/dist/SvGridChart.svelte
|
|
314
|
+
var Ze = u("<span class=\"sv-grid-chart-crumb is-current svelte-kvdein\" aria-current=\"page\"> </span>"), Qe = u("<button type=\"button\" class=\"sv-grid-chart-tool sv-grid-chart-crumb svelte-kvdein\"> </button>"), $e = u("<span class=\"sv-grid-chart-crumb-sep svelte-kvdein\" aria-hidden=\"true\">/</span> <!>", 1), et = u("<nav class=\"sv-grid-chart-crumbs svelte-kvdein\"><button type=\"button\" class=\"sv-grid-chart-tool sv-grid-chart-crumb svelte-kvdein\"> </button> <!></nav>"), tt = u("<button type=\"button\" class=\"sv-grid-chart-tool sv-grid-chart-preset svelte-kvdein\"> </button>"), nt = u("<span class=\"sv-grid-chart-presets svelte-kvdein\" role=\"group\"></span>"), rt = u("<button type=\"button\"><svg aria-hidden=\"true\" width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M5 9l-3 3 3 3\"></path><path d=\"M9 5l3-3 3 3\"></path><path d=\"M15 19l-3 3-3-3\"></path><path d=\"M19 9l3 3-3 3\"></path><path d=\"M2 12h20\"></path><path d=\"M12 2v20\"></path></svg> </button>"), it = u("<button type=\"button\" class=\"sv-grid-chart-tool svelte-kvdein\"><svg aria-hidden=\"true\" width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 7v6h6\"></path><path d=\"M21 17a9 9 0 0 0-15-6.7L3 13\"></path></svg> </button>"), at = u("<button type=\"button\"><svg aria-hidden=\"true\" width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 2v6\"></path><circle cx=\"12\" cy=\"11\" r=\"3\"></circle><path d=\"M12 14v8\"></path></svg> </button>"), ot = u("<button type=\"button\"> </button>"), st = u("<button type=\"button\" class=\"sv-grid-chart-tool svelte-kvdein\"> </button> <button type=\"button\" class=\"sv-grid-chart-tool svelte-kvdein\"> </button>", 1), ct = u("<span class=\"sv-grid-chart-drawtools svelte-kvdein\" role=\"group\"><!> <!></span>"), lt = u("<div class=\"sv-grid-chart-toolbar svelte-kvdein\" role=\"toolbar\"><!> <!> <!> <!> <!> <!> <button type=\"button\" class=\"sv-grid-chart-tool svelte-kvdein\"> </button> <button type=\"button\" class=\"sv-grid-chart-tool svelte-kvdein\"> </button> <button type=\"button\" class=\"sv-grid-chart-tool svelte-kvdein\"> </button> <button type=\"button\" class=\"sv-grid-chart-tool svelte-kvdein\"> </button> <button type=\"button\" class=\"sv-grid-chart-tool svelte-kvdein\"> </button></div>"), ut = u("<div class=\"sv-grid-chart-toolbar is-crumbs-only svelte-kvdein\" role=\"toolbar\"><!></div>"), dt = A("<clipPath><rect></rect></clipPath>"), ft = A("<linearGradient x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\"><stop offset=\"0\"></stop><stop offset=\"1\"></stop></linearGradient>"), pt = A("<pattern width=\"6\" height=\"6\" patternUnits=\"userSpaceOnUse\" patternTransform=\"rotate(45)\"><rect width=\"6\" height=\"6\"></rect><rect width=\"3\" height=\"6\" fill=\"rgba(255,255,255,0.35)\"></rect></pattern>"), mt = A("<pattern width=\"6\" height=\"6\" patternUnits=\"userSpaceOnUse\"><rect width=\"6\" height=\"6\"></rect><path d=\"M0 0L6 6 M6 0L0 6\" stroke=\"rgba(255,255,255,0.45)\" stroke-width=\"1\"></path></pattern>"), ht = A("<pattern width=\"6\" height=\"6\" patternUnits=\"userSpaceOnUse\"><rect width=\"6\" height=\"6\"></rect><circle cx=\"3\" cy=\"3\" r=\"1.2\" fill=\"rgba(255,255,255,0.55)\"></circle></pattern>"), gt = A("<pattern width=\"8\" height=\"8\" patternUnits=\"userSpaceOnUse\" patternTransform=\"rotate(-45)\"><rect width=\"8\" height=\"8\"></rect><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"8\" stroke=\"rgba(0,0,0,0.18)\" stroke-width=\"2\"></line></pattern>"), _t = A("<defs><!><!><!></defs>"), vt = A("<text class=\"sv-grid-chart-title svelte-kvdein\" text-anchor=\"middle\"> </text>"), yt = A("<text class=\"sv-grid-chart-subtitle svelte-kvdein\" text-anchor=\"middle\"> </text>"), bt = A("<text class=\"sv-grid-chart-caption svelte-kvdein\" text-anchor=\"start\"> </text>"), xt = A("<line class=\"sv-grid-chart-gridline svelte-kvdein\"></line>"), St = A("<!><text class=\"sv-grid-chart-axis is-x svelte-kvdein\" text-anchor=\"middle\"> </text>", 1), Ct = A("<line class=\"sv-grid-chart-gridline svelte-kvdein\"></line>"), wt = A("<text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"end\"> </text>"), Tt = A("<text class=\"sv-grid-chart-axis-title svelte-kvdein\" text-anchor=\"middle\"> </text>"), Et = A("<text class=\"sv-grid-chart-axis-title svelte-kvdein\" text-anchor=\"middle\"> </text>"), Dt = A("<!><!><!><!><!>", 1), Ot = A("<line></line>"), kt = A("<text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"end\"> </text>"), At = A("<!><!>", 1), jt = A("<line class=\"sv-grid-chart-gridline svelte-kvdein\"></line>"), Mt = A("<text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"start\"> </text>"), Nt = A("<text class=\"sv-grid-chart-axis is-x svelte-kvdein\"> </text>"), Pt = A("<text class=\"sv-grid-chart-axis is-x svelte-kvdein\" text-anchor=\"middle\"> </text>"), Ft = A("<line class=\"sv-grid-chart-gridline svelte-kvdein\" opacity=\"0.5\"></line>"), It = A("<line class=\"sv-grid-chart-gridline svelte-kvdein\"></line><!><text class=\"sv-grid-chart-axis sv-grid-chart-group-label svelte-kvdein\" text-anchor=\"middle\"> </text>", 1), Lt = A("<text class=\"sv-grid-chart-axis-title svelte-kvdein\" text-anchor=\"middle\"> </text>"), Rt = A("<text class=\"sv-grid-chart-axis-title svelte-kvdein\" text-anchor=\"middle\"> </text>"), zt = A("<text class=\"sv-grid-chart-axis-title svelte-kvdein\" text-anchor=\"middle\"> </text>"), Bt = A("<!><!><!><!><!><!><!><!>", 1), Vt = A("<text class=\"sv-grid-chart-reflabel svelte-kvdein\" text-anchor=\"end\"> </text>"), Ht = A("<text class=\"sv-grid-chart-reflabel svelte-kvdein\" text-anchor=\"middle\"> </text>"), Ut = A("<rect class=\"sv-grid-chart-refband svelte-kvdein\"></rect><!>", 1), Wt = A("<path class=\"sv-grid-chart-band svelte-kvdein\" fill-opacity=\"0.12\" stroke=\"none\"></path>"), Gt = A("<path class=\"sv-grid-chart-area svelte-kvdein\" stroke=\"none\"></path>"), Kt = A("<circle class=\"sv-grid-chart-dot is-active svelte-kvdein\" r=\"4\"></circle>"), qt = A("<circle></circle>"), Jt = A("<path fill=\"none\" stroke-width=\"1.5\"></path>"), Yt = A("<path></path>"), Xt = A("<g class=\"svelte-kvdein\"><!><!><path class=\"sv-grid-chart-linepath svelte-kvdein\" fill=\"none\" stroke-linejoin=\"round\" stroke-linecap=\"round\"></path><!></g>"), Zt = A("<rect rx=\"1\"></rect>"), Qt = A("<circle class=\"sv-grid-chart-dot svelte-kvdein\" fill-opacity=\"0.55\"></circle>"), $t = A("<g class=\"sv-grid-chart-stem svelte-kvdein\"><line class=\"svelte-kvdein\"></line><!><circle class=\"sv-grid-chart-dot svelte-kvdein\"></circle></g>"), en = A("<line class=\"sv-grid-chart-ohlc svelte-kvdein\"></line><line class=\"sv-grid-chart-ohlc svelte-kvdein\"></line><line class=\"sv-grid-chart-ohlc svelte-kvdein\"></line>", 1), tn = A("<line class=\"sv-grid-chart-wick svelte-kvdein\"></line><rect class=\"sv-grid-chart-candle svelte-kvdein\"></rect>", 1), nn = A("<circle class=\"sv-grid-chart-outlier svelte-kvdein\" r=\"2\" fill=\"none\"></circle>"), rn = A("<line class=\"sv-grid-chart-whisker svelte-kvdein\"></line><line class=\"sv-grid-chart-whisker svelte-kvdein\"></line><line class=\"sv-grid-chart-whisker svelte-kvdein\"></line><rect class=\"sv-grid-chart-box svelte-kvdein\" fill-opacity=\"0.25\"></rect><line class=\"sv-grid-chart-median svelte-kvdein\"></line><!>", 1), an = A("<line class=\"sv-grid-chart-errorbar svelte-kvdein\"></line><line class=\"sv-grid-chart-errorbar svelte-kvdein\"></line><line class=\"sv-grid-chart-errorbar svelte-kvdein\"></line>", 1), on = A("<circle fill-opacity=\"0.7\"></circle>"), sn = A("<g class=\"sv-grid-chart-refpill svelte-kvdein\"><rect height=\"16\" rx=\"3\" class=\"svelte-kvdein\"></rect><text text-anchor=\"middle\" fill=\"#fff\" class=\"svelte-kvdein\"> </text></g>"), cn = A("<text class=\"sv-grid-chart-reflabel svelte-kvdein\" text-anchor=\"end\"> </text>"), ln = A("<line class=\"sv-grid-chart-refline svelte-kvdein\"></line><!>", 1), un = A("<line class=\"sv-grid-chart-refline svelte-kvdein\"></line><text class=\"sv-grid-chart-reflabel svelte-kvdein\" text-anchor=\"start\"> </text>", 1), dn = A("<path class=\"sv-grid-chart-overlay-band svelte-kvdein\" fill-opacity=\"0.1\" stroke-opacity=\"0.35\" stroke-width=\"1\"></path>"), fn = A("<!><path class=\"sv-grid-chart-overlay svelte-kvdein\" fill=\"none\" stroke-width=\"2\" stroke-dasharray=\"6 4\" stroke-linejoin=\"round\" stroke-linecap=\"round\"></path>", 1), pn = A("<line class=\"sv-grid-chart-datalabel-leader svelte-kvdein\"></line>"), mn = A("<!><text> </text>", 1), hn = A("<text class=\"sv-grid-chart-serieslabel svelte-kvdein\" text-anchor=\"start\"> </text>"), gn = A("<line stroke-width=\"1.5\"></line><rect height=\"13\" rx=\"2\"></rect><text class=\"sv-grid-chart-annotation-flagtext svelte-kvdein\" text-anchor=\"middle\" fill=\"#fff\"> </text>", 1), _n = A("<path stroke=\"var(--sg-bg, #fff)\" stroke-width=\"1.2\"></path><text class=\"sv-grid-chart-annotation-flagtext svelte-kvdein\" text-anchor=\"middle\" fill=\"#fff\"> </text><text class=\"sv-grid-chart-annotation-label svelte-kvdein\"> </text>", 1), vn = A("<rect width=\"9\" height=\"9\" stroke=\"var(--sg-bg, #fff)\" stroke-width=\"1.5\"></rect><text class=\"sv-grid-chart-annotation-label svelte-kvdein\"> </text>", 1), yn = A("<circle stroke=\"var(--sg-bg, #fff)\" stroke-width=\"1.5\"></circle><text class=\"sv-grid-chart-annotation-label svelte-kvdein\"> </text>", 1), bn = A("<g><!></g>"), xn = A("<path class=\"svelte-kvdein\"></path>"), Sn = A("<line class=\"sv-grid-chart-drawing-hit svelte-kvdein\"></line><line stroke-width=\"1.5\" class=\"svelte-kvdein\"></line><!>", 1), Cn = A("<rect fill-opacity=\"0.08\" stroke-width=\"1.2\" class=\"svelte-kvdein\"></rect>"), wn = A("<line class=\"sv-grid-chart-drawing-hit svelte-kvdein\"></line><line stroke-width=\"1.2\" stroke-dasharray=\"4 3\" class=\"svelte-kvdein\"></line><text class=\"sv-grid-chart-drawing-label svelte-kvdein\" text-anchor=\"end\"> </text>", 1), Tn = A("<line stroke-width=\"1\" class=\"svelte-kvdein\"></line><text class=\"sv-grid-chart-drawing-label svelte-kvdein\"> </text>", 1), En = A("<!><rect class=\"sv-grid-chart-drawing-hit svelte-kvdein\"></rect>", 1), Dn = A("<text class=\"sv-grid-chart-drawing-text svelte-kvdein\"> </text>"), On = A("<circle class=\"sv-grid-chart-drawing-handle svelte-kvdein\" r=\"5\" fill=\"var(--sg-bg, #fff)\" stroke-width=\"1.5\"></circle>"), kn = A("<g><!><!></g>"), An = A("<rect fill=\"var(--sg-accent, #2563eb)\" fill-opacity=\"0.08\" stroke=\"var(--sg-accent, #2563eb)\" stroke-dasharray=\"4 3\"></rect>"), jn = A("<line stroke=\"var(--sg-accent, #2563eb)\" stroke-width=\"1.5\" stroke-dasharray=\"4 3\"></line>"), Mn = A("<circle r=\"3.5\" fill=\"var(--sg-accent, #2563eb)\"></circle><!>", 1), Nn = A("<g class=\"sv-grid-chart-drawings\"><!><!></g>"), Pn = A("<line class=\"sv-grid-chart-crosshair svelte-kvdein\"></line>"), Fn = A("<g class=\"sv-grid-chart-crosshair-label svelte-kvdein\" pointer-events=\"none\"><rect height=\"15\" rx=\"3\" class=\"svelte-kvdein\"></rect><text text-anchor=\"middle\" class=\"svelte-kvdein\"> </text></g>"), In = A("<g class=\"sv-grid-chart-crosshair-label svelte-kvdein\" pointer-events=\"none\"><rect height=\"15\" rx=\"3\" class=\"svelte-kvdein\"></rect><text text-anchor=\"middle\" class=\"svelte-kvdein\"> </text></g><!>", 1), Ln = A("<line class=\"sv-grid-chart-crosshair svelte-kvdein\"></line><!>", 1), Rn = A("<text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"end\"> </text>"), zn = A("<text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"middle\"> </text>"), Bn = A("<text class=\"sv-grid-chart-heatlabel svelte-kvdein\" text-anchor=\"middle\"> </text>"), Vn = A("<rect class=\"sv-grid-chart-heatcell svelte-kvdein\"></rect><!>", 1), Hn = A("<stop></stop>"), Un = A("<defs><linearGradient x1=\"0\" y1=\"1\" x2=\"0\" y2=\"0\"></linearGradient></defs><rect class=\"sv-grid-chart-heatlegend svelte-kvdein\" width=\"10\"></rect><text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"start\"> </text><text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"start\"> </text>", 1), Wn = A("<!><!><!><!>", 1), Gn = A("<text class=\"sv-grid-chart-funnel-label svelte-kvdein\" text-anchor=\"middle\"> </text><text class=\"sv-grid-chart-funnel-value svelte-kvdein\" text-anchor=\"middle\"> </text>", 1), Kn = A("<path class=\"sv-grid-chart-funnel-seg svelte-kvdein\"></path><!>", 1), qn = A("<circle class=\"sv-grid-chart-radar-ring svelte-kvdein\"></circle>"), Jn = A("<line class=\"sv-grid-chart-radar-spoke svelte-kvdein\"></line><text class=\"sv-grid-chart-axis svelte-kvdein\"> </text>", 1), Yn = A("<circle class=\"sv-grid-chart-radar-dot svelte-kvdein\" r=\"3\" role=\"img\"></circle>"), Xn = A("<path class=\"sv-grid-chart-radar-poly svelte-kvdein\" fill-opacity=\"0.18\" stroke-width=\"2\"></path><!>", 1), Zn = A("<!><!><!>", 1), Qn = A("<text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"start\"> </text>"), $n = A("<text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"end\"> </text>"), er = A("<rect rx=\"2\" role=\"img\"></rect>"), tr = A("<rect class=\"sv-grid-chart-calendar-legend svelte-kvdein\" width=\"10\" height=\"10\" rx=\"2\"></rect><text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"start\"> </text>", 1), nr = A("<text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"start\">Less</text><!><text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"start\">More</text>", 1), rr = A("<!><!><!><!>", 1), ir = A("<line></line>"), ar = A("<path fill=\"none\" stroke-width=\"4\" stroke-linecap=\"butt\" opacity=\"0.7\"></path>"), or = A("<line stroke=\"var(--sg-fg, #0f172a)\" stroke-width=\"2.5\" stroke-linecap=\"round\"></line>"), sr = A("<!><path fill=\"none\" stroke=\"var(--sg-border, #e2e8f0)\" stroke-width=\"16\" stroke-linecap=\"round\"></path><!><path fill=\"none\" stroke-width=\"16\" stroke-linecap=\"round\"></path><!><path class=\"sv-grid-chart-gauge-needle svelte-kvdein\"></path><circle class=\"sv-grid-chart-gauge-hub svelte-kvdein\"></circle><circle class=\"sv-grid-chart-gauge-hub-dot svelte-kvdein\" r=\"2.5\"></circle><text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"middle\"> </text><text class=\"sv-grid-chart-axis svelte-kvdein\" text-anchor=\"middle\"> </text><text class=\"sv-grid-chart-gauge-value svelte-kvdein\" text-anchor=\"middle\"> </text>", 1), cr = A("<text class=\"sv-grid-chart-treemap-label svelte-kvdein\"> </text>"), lr = A("<text class=\"sv-grid-chart-treemap-value svelte-kvdein\" opacity=\"0.85\"> </text>"), ur = A("<rect class=\"sv-grid-chart-treemap-cell svelte-kvdein\"></rect><!><!>", 1), dr = A("<path class=\"sv-grid-chart-sankey-link svelte-kvdein\" fill=\"none\" stroke-opacity=\"0.35\" role=\"img\"></path>"), fr = A("<rect class=\"sv-grid-chart-sankey-node svelte-kvdein\" role=\"img\"></rect><text class=\"sv-grid-chart-sankey-label svelte-kvdein\"> </text>", 1), pr = A("<!><!>", 1), mr = A("<circle class=\"sv-grid-chart-gridline svelte-kvdein\" fill=\"none\"></circle>"), hr = A("<text class=\"sv-grid-chart-axis svelte-kvdein\"> </text>"), gr = A("<path class=\"sv-grid-chart-arc-track svelte-kvdein\"></path>"), _r = A("<path class=\"sv-grid-chart-ribbon svelte-kvdein\" fill-opacity=\"0.45\" stroke-opacity=\"0.6\"></path>"), vr = A("<path stroke=\"var(--sg-bg, #fff)\" stroke-width=\"1\"></path>"), yr = A("<text class=\"sv-grid-chart-axis svelte-kvdein\"> </text>"), br = A("<text class=\"sv-grid-chart-datalabel on-bar svelte-kvdein\" text-anchor=\"middle\" dominant-baseline=\"middle\" pointer-events=\"none\"> </text>"), xr = A("<!><!><!><!><!><!>", 1), Sr = A("<rect></rect>"), Cr = A("<line class=\"sv-grid-chart-bullet-target\" stroke=\"var(--sg-fg, #0f172a)\" stroke-width=\"2.5\"></line>"), wr = A("<g class=\"sv-grid-chart-bullet\"><!><rect class=\"sv-grid-chart-bar svelte-kvdein\"></rect><!></g>"), Tr = A("<polyline class=\"sv-grid-chart-callout svelte-kvdein\" fill=\"none\" stroke-width=\"1\"></polyline><text class=\"sv-grid-chart-callout-label svelte-kvdein\"> </text>", 1), Er = A("<text class=\"sv-grid-chart-datalabel on-bar svelte-kvdein\" text-anchor=\"middle\" dominant-baseline=\"middle\"> </text>"), Dr = A("<path stroke=\"var(--sg-bg, #fff)\" stroke-width=\"1\"></path><!>", 1), Or = A("<text class=\"sv-grid-chart-donut-total svelte-kvdein\" text-anchor=\"middle\"> </text><text class=\"sv-grid-chart-donut-label svelte-kvdein\" text-anchor=\"middle\"> </text>", 1), kr = A("<rect class=\"sv-grid-chart-cat-hit svelte-kvdein\" data-dense=\"true\"></rect>"), Ar = A("<rect class=\"sv-grid-chart-cat-hit svelte-kvdein\"></rect>"), jr = A("<rect class=\"sv-grid-chart-zoom-rect svelte-kvdein\"></rect>"), Mr = A("<path fill-opacity=\"0.10\" stroke=\"none\"></path>"), Nr = A("<!><path fill=\"none\" stroke-width=\"1.2\" opacity=\"0.75\"></path>", 1), Pr = A("<rect opacity=\"0.55\"></rect>"), Fr = u("<div class=\"sv-grid-chart-brush-host svelte-kvdein\"><svg class=\"sv-grid-chart-brush svelte-kvdein\" width=\"100%\" role=\"slider\" tabindex=\"0\" aria-orientation=\"horizontal\"><!><!><rect class=\"sv-grid-chart-brush-mask svelte-kvdein\"></rect><rect class=\"sv-grid-chart-brush-mask svelte-kvdein\"></rect><rect class=\"sv-grid-chart-brush-window svelte-kvdein\"></rect><rect class=\"sv-grid-chart-brush-handle svelte-kvdein\" width=\"8\"></rect><rect class=\"sv-grid-chart-brush-handle svelte-kvdein\" width=\"8\"></rect></svg></div>"), Ir = u("<div class=\"sv-grid-chart-empty svelte-kvdein\"> </div>"), Lr = u("<input class=\"sv-grid-chart-textdraft svelte-kvdein\" type=\"text\"/>"), Rr = u("<span class=\"sv-grid-chart-tooltip-dot svelte-kvdein\"></span>"), zr = u("<span class=\"sv-grid-chart-tooltip-row-label svelte-kvdein\"> </span>"), Br = u("<span class=\"sv-grid-chart-tooltip-row svelte-kvdein\"><!> <!> <span class=\"sv-grid-chart-tooltip-row-value svelte-kvdein\"> </span></span>"), Vr = u("<span class=\"sv-grid-chart-tooltip-title svelte-kvdein\"> </span> <!>", 1), Hr = u("<div role=\"tooltip\"><!></div>"), Ur = u("<span class=\"sv-grid-chart-swatch svelte-kvdein\"></span> ", 1), Wr = u("<button type=\"button\"><!></button>"), Gr = u("<button type=\"button\" class=\"sv-grid-chart-legend-more svelte-kvdein\"> </button>"), Kr = u("<div><!> <!></div>"), qr = u("<div class=\"sv-grid-chart-live sv-grid-chart-sr-only svelte-kvdein\" aria-live=\"polite\" aria-atomic=\"true\"> </div>"), Jr = u("<th> </th>"), Yr = u("<td> </td>"), Xr = u("<tr></tr>"), Zr = u("<div><!> <svg width=\"100%\"><!><!><!><!><!><!><g><!><!><!><!><!><!><!><!></g><!><!><g></g><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!></svg> <!> <!> <!> <!> <!> <!> <!> <div class=\"sv-grid-chart-sr-only svelte-kvdein\"><table><caption> <!><!></caption><thead><tr></tr></thead><tbody></tbody></table></div></div>"), Qr = {
|
|
315
|
+
hash: "svelte-kvdein",
|
|
316
|
+
code: ".sv-grid-chart.svelte-kvdein {position:relative;display:flex;flex-direction:column;gap:8px;width:100%;background:var(--sg-chart-bg, transparent);}\n /* Legend on top: the legend row moves above the plot, the toolbar stays\n first. Left / right: a two-column grid, the legend a column of chips\n beside the plot and the brush, the toolbar spanning both. */.sv-grid-chart.is-legend-top.svelte-kvdein .sv-grid-chart-toolbar:where(.svelte-kvdein) {order:-2;}.sv-grid-chart.is-legend-top.svelte-kvdein .sv-grid-chart-legend:where(.svelte-kvdein) {order:-1;}.sv-grid-chart.is-legend-left.svelte-kvdein,\n .sv-grid-chart.is-legend-right.svelte-kvdein {display:grid;grid-template-rows:auto 1fr auto;align-items:start;}.sv-grid-chart.is-legend-left.svelte-kvdein {grid-template-columns:auto minmax(0, 1fr);grid-template-areas:'tb tb' 'lg svg' 'lg br';}.sv-grid-chart.is-legend-right.svelte-kvdein {grid-template-columns:minmax(0, 1fr) auto;grid-template-areas:'tb tb' 'svg lg' 'br lg';}.sv-grid-chart.is-legend-left.svelte-kvdein .sv-grid-chart-toolbar:where(.svelte-kvdein),\n .sv-grid-chart.is-legend-right.svelte-kvdein .sv-grid-chart-toolbar:where(.svelte-kvdein) {grid-area:tb;}.sv-grid-chart.is-legend-left.svelte-kvdein .sv-grid-chart-svg:where(.svelte-kvdein),\n .sv-grid-chart.is-legend-right.svelte-kvdein .sv-grid-chart-svg:where(.svelte-kvdein) {grid-area:svg;}.sv-grid-chart.is-legend-left.svelte-kvdein .sv-grid-chart-brush-host:where(.svelte-kvdein),\n .sv-grid-chart.is-legend-right.svelte-kvdein .sv-grid-chart-brush-host:where(.svelte-kvdein) {grid-area:br;}.sv-grid-chart-brush-host.svelte-kvdein {display:block;min-width:0;}.sv-grid-chart.is-legend-left.svelte-kvdein .sv-grid-chart-legend:where(.svelte-kvdein),\n .sv-grid-chart.is-legend-right.svelte-kvdein .sv-grid-chart-legend:where(.svelte-kvdein) {grid-area:lg;}.sv-grid-chart-legend.is-vertical.svelte-kvdein {flex-direction:column;align-items:flex-start;gap:4px;max-width:180px;padding-top:6px;}\n /* Autosize: the SVG is laid out at the pixel size the host actually has\n (see the dimension bindings in the script), so it needs no aspect-ratio\n scaling of its own. The host takes its height from a flex or grid parent\n that stretches it, never from a percentage: `height: 100%` inside a parent\n with other content over-measures by that content, the SVG grows into the\n gap, and the next measurement grows again, without end. */.sv-grid-chart.is-autosize.svelte-kvdein {min-height:0;}.sv-grid-chart.is-autosize.svelte-kvdein .sv-grid-chart-svg:where(.svelte-kvdein) {flex:none;min-height:0;}.sv-grid-chart-svg.svelte-kvdein {display:block;width:100%;height:auto;}.sv-grid-chart-title.svelte-kvdein {fill:var(--sg-fg, #0f172a);font-size:calc(14px * var(--sg-chart-font-scale, 1));font-weight:600;font-family:inherit;}.sv-grid-chart-subtitle.svelte-kvdein {fill:var(--sg-muted, #64748b);font-size:calc(11.5px * var(--sg-chart-font-scale, 1));font-family:inherit;}.sv-grid-chart-caption.svelte-kvdein {fill:var(--sg-muted, #64748b);font-size:calc(10px * var(--sg-chart-font-scale, 1));font-family:inherit;}.sv-grid-chart-refband.svelte-kvdein {pointer-events:none;}\n /* Enter effects. Fade is the per-mark keyframe every mark already has;\n wipe animates the plot clip's width from 0 (a keyframe with only `from`\n ends at the element's own value); grow scales bars up from their base. */.sv-grid-chart-wipe.svelte-kvdein {\n animation: svelte-kvdein-sv-grid-chart-wipe 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;}\n @keyframes svelte-kvdein-sv-grid-chart-wipe {\n from { width: 0; }\n }.sv-grid-chart-marks.is-enter-grow.svelte-kvdein .sv-grid-chart-bar:where(.svelte-kvdein) {transform-box:fill-box;transform-origin:50% 100%;\n animation: svelte-kvdein-sv-grid-chart-grow 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;}\n @keyframes svelte-kvdein-sv-grid-chart-grow {\n from { transform: scaleY(0.02); }\n }.sv-grid-chart-marks.is-enter-none.svelte-kvdein :where(.svelte-kvdein),\n .sv-grid-chart-marks.is-enter-none.svelte-kvdein {\n animation: none !important;}.sv-grid-chart-svg.is-pannable.svelte-kvdein {cursor:grab;}.sv-grid-chart-svg.is-pannable.svelte-kvdein:active {cursor:grabbing;}.sv-grid-chart-presets.svelte-kvdein {display:inline-flex;gap:2px;margin-right:6px;}.sv-grid-chart-crumbs.svelte-kvdein {display:inline-flex;align-items:center;gap:2px;margin-right:8px;font-size:calc(11.5px * var(--sg-chart-font-scale, 1));}.sv-grid-chart-crumb.is-current.svelte-kvdein {font-weight:600;color:var(--sg-fg, #0f172a);padding:0 4px;}.sv-grid-chart-crumb-sep.svelte-kvdein {color:var(--sg-muted, #64748b);}.sv-grid-chart-arc.is-drillable.svelte-kvdein,\n .sv-grid-chart-slice.is-drillable.svelte-kvdein {cursor:zoom-in;}.sv-grid-chart-bar.is-selected.svelte-kvdein,\n .sv-grid-chart-slice.is-selected.svelte-kvdein,\n .sv-grid-chart-arc.is-selected.svelte-kvdein {stroke:var(--sg-fg, #0f172a);stroke-width:2;}.sv-grid-chart-dot.is-selected.svelte-kvdein {stroke:var(--sg-fg, #0f172a);stroke-width:2;r:5;}.sv-grid-chart-scatter.is-selected.svelte-kvdein {stroke:var(--sg-fg, #0f172a);stroke-width:2;fill-opacity:1;}.sv-grid-chart-preset.svelte-kvdein {padding-inline:6px;}.sv-grid-chart-arc-track.svelte-kvdein {fill:var(--sg-border, #e2e8f0);opacity:0.45;pointer-events:none;}.sv-grid-chart-arc.svelte-kvdein {transition:opacity 0.1s ease;\n animation: svelte-kvdein-sv-grid-chart-in 0.3s ease both;}.sv-grid-chart-ribbon.svelte-kvdein {transition:opacity 0.1s ease;}.sv-grid-chart-stem.svelte-kvdein line:where(.svelte-kvdein) {stroke-linecap:round;}.sv-grid-chart-dot.is-stroked.svelte-kvdein {fill:none;}.sv-grid-chart-tooltip.is-custom.svelte-kvdein {padding:0;background:transparent;color:inherit;border:0;box-shadow:none;}.sv-grid-chart-gridline.svelte-kvdein {stroke:var(--sg-border, #e2e8f0);stroke-width:1;opacity:0.6;}.sv-grid-chart-gridline.is-zero.svelte-kvdein {stroke:var(--sg-muted, #94a3b8);opacity:0.9;}.sv-grid-chart-axis.svelte-kvdein {fill:var(--sg-muted, #64748b);font-size:calc(10px * var(--sg-chart-font-scale, 1));font-family:inherit;}.sv-grid-chart-axis-title.svelte-kvdein {fill:var(--sg-muted, #64748b);font-size:calc(11px * var(--sg-chart-font-scale, 1));font-weight:600;font-family:inherit;}.sv-grid-chart-group-label.svelte-kvdein {fill:var(--sg-fg, #0f172a);font-weight:600;}.sv-grid-chart-crosshair.svelte-kvdein {stroke:var(--sg-accent, #2563eb);stroke-width:1;stroke-dasharray:3 3;opacity:0.65;pointer-events:none;}.sv-grid-chart-callout.svelte-kvdein {opacity:0.8;pointer-events:none;}.sv-grid-chart-callout-label.svelte-kvdein {font-size:calc(10.5px * var(--sg-chart-font-scale, 1));font-family:inherit;fill:var(--sg-fg, #0f172a);pointer-events:none;}.sv-grid-chart-crosshair-label.svelte-kvdein rect:where(.svelte-kvdein) {fill:var(--sg-fg, #0f172a);opacity:0.85;}.sv-grid-chart-crosshair-label.svelte-kvdein text:where(.svelte-kvdein) {fill:var(--sg-bg, #fff);font-size:calc(9.5px * var(--sg-chart-font-scale, 1));font-weight:600;font-family:inherit;}.sv-grid-chart-refline.svelte-kvdein {stroke-width:1.5;opacity:0.9;pointer-events:none;}.sv-grid-chart-reflabel.svelte-kvdein {font-size:calc(9.5px * var(--sg-chart-font-scale, 1));font-weight:700;font-family:inherit;pointer-events:none;}.sv-grid-chart-overlay.svelte-kvdein {opacity:0.85;pointer-events:none;}.sv-grid-chart-annotation-marker.svelte-kvdein {pointer-events:none;}.sv-grid-chart-annotation-marker.has-text.svelte-kvdein {pointer-events:auto;cursor:help;}.sv-grid-chart-annotation-marker.svelte-kvdein:focus-visible {outline:2px solid var(--sg-accent, #2563eb);outline-offset:2px;}.sv-grid-chart-annotation-label.svelte-kvdein {font-size:calc(10px * var(--sg-chart-font-scale, 1));font-weight:700;font-family:inherit;pointer-events:none;}.sv-grid-chart-serieslabel.svelte-kvdein {font-size:calc(10.5px * var(--sg-chart-font-scale, 1));font-weight:600;font-family:inherit;pointer-events:none;}.sv-grid-chart-annotation-flagtext.svelte-kvdein {font-size:calc(9px * var(--sg-chart-font-scale, 1));font-weight:700;font-family:inherit;pointer-events:none;}.sv-grid-chart-refpill.svelte-kvdein text:where(.svelte-kvdein) {font-size:calc(9.5px * var(--sg-chart-font-scale, 1));font-weight:700;font-family:inherit;pointer-events:none;}\n /* Drawings. The hit line is a fat invisible stroke so a 1.5px trend line\n can be clicked; handles only exist on the selected drawing. */.sv-grid-chart-drawing-hit.svelte-kvdein {stroke:transparent;stroke-width:10;fill:transparent;pointer-events:stroke;}.sv-grid-chart-drawing.is-fib.svelte-kvdein .sv-grid-chart-drawing-hit:where(.svelte-kvdein),\n .sv-grid-chart-drawing.is-rect.svelte-kvdein rect:where(.svelte-kvdein),\n .sv-grid-chart-drawing.is-text.svelte-kvdein text:where(.svelte-kvdein) {pointer-events:all;}.sv-grid-chart-drawing[role='button'].svelte-kvdein {cursor:pointer;}.sv-grid-chart-drawing.svelte-kvdein:focus-visible {outline:none;}.sv-grid-chart-drawing.is-selected.svelte-kvdein line:where(.svelte-kvdein),\n .sv-grid-chart-drawing.is-selected.svelte-kvdein rect:where(.svelte-kvdein),\n .sv-grid-chart-drawing.svelte-kvdein:focus-visible line:where(.svelte-kvdein),\n .sv-grid-chart-drawing.svelte-kvdein:focus-visible rect:where(.svelte-kvdein) {filter:drop-shadow(0 0 2px var(--sg-accent, #2563eb));}.sv-grid-chart-drawing-label.svelte-kvdein {font-size:calc(9px * var(--sg-chart-font-scale, 1));font-weight:600;font-family:inherit;pointer-events:none;}.sv-grid-chart-drawing-text.svelte-kvdein {font-size:calc(11px * var(--sg-chart-font-scale, 1));font-weight:600;font-family:inherit;}.sv-grid-chart-drawing-handle.svelte-kvdein {cursor:move;}.sv-grid-chart-textdraft.svelte-kvdein {position:absolute;z-index:11;transform:translate(0, -50%);width:160px;font:inherit;font-size:calc(12px * var(--sg-chart-font-scale, 1));padding:3px 6px;border:1px solid var(--sg-accent, #2563eb);border-radius:4px;background:var(--sg-bg, #fff);color:var(--sg-fg, #0f172a);box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);}.sv-grid-chart-svg.is-drawing.svelte-kvdein {cursor:crosshair;}.sv-grid-chart-drawtools.svelte-kvdein {display:inline-flex;gap:2px;padding-right:6px;margin-right:2px;border-right:1px solid var(--sg-border, #e2e8f0);}\n /* Heatmap cells. Stroke uses the border token (not bg) so the cell\n separators stay visible in BOTH light and dark themes - on dark mode\n a bg-colored stroke disappeared into the navy cells. */.sv-grid-chart-heatcell.svelte-kvdein {stroke:var(--sg-border, #cbd5e1);stroke-width:1;transition:opacity 100ms ease;cursor:default;}.sv-grid-chart-svg.is-clickable.svelte-kvdein .sv-grid-chart-heatcell:where(.svelte-kvdein) {cursor:pointer;}.sv-grid-chart-heatcell.svelte-kvdein:hover {opacity:0.85;}.sv-grid-chart-heatlabel.svelte-kvdein {font-size:calc(10px * var(--sg-chart-font-scale, 1));font-weight:600;font-family:inherit;pointer-events:none;user-select:none;}\n /* Legend gradient bar gets a visible outline + axis labels next to it\n pull from the regular axis class so they follow the theme. */.sv-grid-chart-heatlegend.svelte-kvdein {stroke:var(--sg-border, #cbd5e1);stroke-width:1;}\n /* Funnel segments + labels. */.sv-grid-chart-funnel-seg.svelte-kvdein {stroke:var(--sg-bg, #ffffff);stroke-width:2;transition:opacity 100ms ease;cursor:default;}.sv-grid-chart-svg.is-clickable.svelte-kvdein .sv-grid-chart-funnel-seg:where(.svelte-kvdein) {cursor:pointer;}.sv-grid-chart-funnel-seg.svelte-kvdein:hover {opacity:0.88;}.sv-grid-chart-funnel-label.svelte-kvdein {font-size:calc(11px * var(--sg-chart-font-scale, 1));font-weight:700;font-family:inherit;pointer-events:none;}.sv-grid-chart-funnel-value.svelte-kvdein {font-size:calc(10px * var(--sg-chart-font-scale, 1));font-family:inherit;opacity:0.85;pointer-events:none;}\n /* Radar grid + polygons. */.sv-grid-chart-radar-ring.svelte-kvdein {fill:none;stroke:var(--sg-border, #e2e8f0);stroke-width:1;opacity:0.6;}.sv-grid-chart-radar-spoke.svelte-kvdein {stroke:var(--sg-border, #e2e8f0);stroke-width:1;opacity:0.6;}.sv-grid-chart-radar-poly.svelte-kvdein {transition:opacity 100ms ease;pointer-events:none;}.sv-grid-chart-radar-dot.svelte-kvdein {transition:r 100ms ease;cursor:default;}.sv-grid-chart-radar-dot.svelte-kvdein:hover {r:4.5;}\n /* Calendar heatmap cells. Blank cells get a faint outline so the grid\n still reads on days with no data. */.sv-grid-chart-calendar-cell.svelte-kvdein {stroke:var(--sg-border, #e2e8f0);stroke-width:0.5;transition:opacity 100ms ease;cursor:default;}.sv-grid-chart-calendar-cell.is-blank.svelte-kvdein {stroke-opacity:0.5;}.sv-grid-chart-calendar-cell.svelte-kvdein:hover {opacity:0.85;}.sv-grid-chart-calendar-legend.svelte-kvdein {stroke:var(--sg-border, #cbd5e1);stroke-width:0.5;}\n /* Gauge centre readout. */.sv-grid-chart-gauge-value.svelte-kvdein {fill:var(--sg-fg, #0f172a);font-size:calc(22px * var(--sg-chart-font-scale, 1));font-weight:800;font-family:inherit;pointer-events:none;}\n /* Gauge tick marks: faint minors, stronger majors. */.sv-grid-chart-gauge-tick.svelte-kvdein {stroke:var(--sg-muted, #94a3b8);stroke-width:1;opacity:0.4;}.sv-grid-chart-gauge-tick.is-major.svelte-kvdein {stroke-width:2;opacity:0.7;}\n /* Pointer needle + hub. */.sv-grid-chart-gauge-needle.svelte-kvdein {fill:var(--sg-fg, #0f172a);\n /* A hairline of the background colour around the needle keeps it legible\n where it crosses the value arc, which is the same weight and often a\n similar tone. */stroke:var(--sg-bg, #ffffff);stroke-width:0.75;stroke-linejoin:round;}.sv-grid-chart-gauge-hub.svelte-kvdein {fill:var(--sg-fg, #0f172a);stroke:var(--sg-bg, #ffffff);stroke-width:2;}.sv-grid-chart-gauge-hub-dot.svelte-kvdein {fill:var(--sg-bg, #ffffff);}\n /* Tree-map cells. White separators give the squarified rects breathing\n room without distracting from the data. */.sv-grid-chart-treemap-cell.svelte-kvdein {stroke:var(--sg-bg, #ffffff);stroke-width:1;transition:opacity 100ms ease;cursor:default;}.sv-grid-chart-svg.is-clickable.svelte-kvdein .sv-grid-chart-treemap-cell:where(.svelte-kvdein) {cursor:pointer;}.sv-grid-chart-treemap-cell.svelte-kvdein:hover {opacity:0.88;}.sv-grid-chart-treemap-label.svelte-kvdein {font-size:calc(11px * var(--sg-chart-font-scale, 1));font-weight:600;font-family:inherit;pointer-events:none;}.sv-grid-chart-treemap-value.svelte-kvdein {font-size:calc(10px * var(--sg-chart-font-scale, 1));font-family:inherit;pointer-events:none;}\n /* Sankey nodes + links. Links use stroke not fill so per-ribbon width\n comes from stroke-width directly. */.sv-grid-chart-sankey-node.svelte-kvdein {transition:opacity 100ms ease;cursor:default;}.sv-grid-chart-sankey-node.svelte-kvdein:hover {opacity:0.88;}.sv-grid-chart-sankey-link.svelte-kvdein {transition:stroke-opacity 100ms ease;cursor:default;}.sv-grid-chart-sankey-link.svelte-kvdein:hover {stroke-opacity:0.6;}.sv-grid-chart-sankey-label.svelte-kvdein {fill:var(--sg-fg, #0f172a);font-size:calc(11px * var(--sg-chart-font-scale, 1));font-weight:600;font-family:inherit;pointer-events:none;}\n /* Brush mini-map: a compact secondary chart with a draggable window. */.sv-grid-chart-brush.svelte-kvdein {display:block;width:100%;height:auto;margin-top:4px;border-top:1px solid var(--sg-border, #e2e8f0);user-select:none;touch-action:none;}.sv-grid-chart-brush-mask.svelte-kvdein {fill:var(--sg-bg, #ffffff);fill-opacity:0.65;pointer-events:none;}.sv-grid-chart-brush-window.svelte-kvdein {fill:var(--sg-accent, #2563eb);fill-opacity:0.10;stroke:var(--sg-accent, #2563eb);stroke-width:1;cursor:grab;}.sv-grid-chart-brush-window.svelte-kvdein:active {cursor:grabbing;}.sv-grid-chart-brush-handle.svelte-kvdein {fill:var(--sg-accent, #2563eb);fill-opacity:0.4;cursor:ew-resize;}.sv-grid-chart-brush-handle.svelte-kvdein:hover {fill-opacity:0.7;}.sv-grid-chart-scatter.svelte-kvdein {transition:opacity 0.2s ease;stroke-width:1;}.is-clickable.svelte-kvdein .sv-grid-chart-scatter:where(.svelte-kvdein),\n .sv-grid-chart-scatter.svelte-kvdein:hover {cursor:pointer;}.sv-grid-chart-cat-hit.svelte-kvdein {fill:transparent;}.sv-grid-chart-cat-hit.svelte-kvdein:focus-visible,\n .sv-grid-chart-slice.svelte-kvdein:focus-visible,\n .sv-grid-chart-arc.svelte-kvdein:focus-visible,\n .sv-grid-chart-heatcell.svelte-kvdein:focus-visible,\n .sv-grid-chart-funnel-seg.svelte-kvdein:focus-visible,\n .sv-grid-chart-treemap-cell.svelte-kvdein:focus-visible,\n .sv-grid-chart-sankey-node.svelte-kvdein:focus-visible,\n .sv-grid-chart-sankey-link.svelte-kvdein:focus-visible,\n .sv-grid-chart-calendar-cell.svelte-kvdein:focus-visible,\n .sv-grid-chart-radar-dot.svelte-kvdein:focus-visible,\n .sv-grid-chart-scatter.svelte-kvdein:focus-visible,\n .sv-grid-chart-brush.svelte-kvdein:focus-visible {outline:2px solid var(--sg-accent, #2563eb);outline-offset:1px;}.sv-grid-chart-datalabel.svelte-kvdein {fill:var(--sg-fg, #0f172a);font-size:calc(9.5px * var(--sg-chart-font-scale, 1));font-weight:600;font-variant-numeric:tabular-nums;pointer-events:none;}.sv-grid-chart-datalabel-leader.svelte-kvdein {stroke:var(--sg-muted, #64748b);stroke-width:1;pointer-events:none;}.sv-grid-chart-datalabel.on-bar.svelte-kvdein {fill:#fff;}.sv-grid-chart-donut-total.svelte-kvdein {fill:var(--sg-fg, #0f172a);font-size:calc(16px * var(--sg-chart-font-scale, 1));font-weight:800;font-variant-numeric:tabular-nums;}.sv-grid-chart-donut-label.svelte-kvdein {fill:var(--sg-muted, #64748b);font-size:calc(10px * var(--sg-chart-font-scale, 1));}.sv-grid-chart-bar.svelte-kvdein {transition:x 0.3s ease, y 0.3s ease, width 0.3s ease, height 0.3s ease;}.sv-grid-chart-dot.svelte-kvdein {transition:cx 0.3s ease, cy 0.3s ease;}.sv-grid-chart-candle.svelte-kvdein {stroke-width:1;transition:x 0.3s ease, y 0.3s ease, width 0.3s ease, height 0.3s ease;}.sv-grid-chart-wick.svelte-kvdein,\n .sv-grid-chart-ohlc.svelte-kvdein {stroke-width:1;shape-rendering:crispEdges;}.sv-grid-chart-box.svelte-kvdein {stroke-width:1;transition:x 0.3s ease, y 0.3s ease, width 0.3s ease, height 0.3s ease;}.sv-grid-chart-whisker.svelte-kvdein,\n .sv-grid-chart-errorbar.svelte-kvdein {stroke-width:1;shape-rendering:crispEdges;}\n /* The median is the number people read off a box plot, so it gets the\n weight. Everything else on the mark is 1px. */.sv-grid-chart-median.svelte-kvdein {stroke-width:2;shape-rendering:crispEdges;}.sv-grid-chart-outlier.svelte-kvdein {stroke-width:1;}.is-clickable.svelte-kvdein .sv-grid-chart-cat-hit:where(.svelte-kvdein),\n .is-clickable.svelte-kvdein .sv-grid-chart-slice:where(.svelte-kvdein) {cursor:pointer;}.sv-grid-chart-empty.svelte-kvdein {position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:var(--sg-muted, #94a3b8);font-size:calc(13px * var(--sg-chart-font-scale, 1));pointer-events:none;}\n\n /* Toolbar above the chart: reset-zoom, PNG / SVG / Copy. */.sv-grid-chart-toolbar.svelte-kvdein {display:flex;justify-content:flex-end;gap:4px;flex-wrap:wrap;}.sv-grid-chart-tool.svelte-kvdein {display:inline-flex;align-items:center;gap:4px;border:1px solid var(--sg-border, #cbd5e1);background:var(--sg-bg, #ffffff);color:var(--sg-fg, #1e293b);font-size:calc(11px * var(--sg-chart-font-scale, 1));font-weight:500;padding:3px 8px;border-radius:4px;cursor:pointer;transition:background-color 100ms ease, border-color 100ms ease;}.sv-grid-chart-tool.svelte-kvdein:hover {background:var(--sg-row-hover-bg, #f1f5f9);border-color:var(--sg-accent, #2563eb);}\n\n /* Annotate mode: the toggle reads as pressed, the plot as a target, and a\n marker as something you can click to take away. */.sv-grid-chart-tool.is-on.svelte-kvdein {background:var(--sg-accent, #2563eb);border-color:var(--sg-accent, #2563eb);color:var(--sg-on-accent, #fff);}.sv-grid-chart-svg.is-annotating.svelte-kvdein {cursor:copy;}.sv-grid-chart-annotation-marker.is-removable.svelte-kvdein {cursor:pointer;}\n\n /* Drag-to-zoom: translucent accent rectangle over the plot. */.sv-grid-chart-svg.is-zoomable.svelte-kvdein {cursor:crosshair;}.sv-grid-chart-svg.is-dragging.svelte-kvdein {cursor:crosshair;user-select:none;}.sv-grid-chart-zoom-rect.svelte-kvdein {fill:var(--sg-accent, #2563eb);fill-opacity:0.12;stroke:var(--sg-accent, #2563eb);stroke-width:1;stroke-dasharray:3 3;pointer-events:none;}.sv-grid-chart-tooltip.svelte-kvdein {position:absolute;z-index:10;transform:translate(-50%, calc(-100% - 12px));pointer-events:none;white-space:nowrap;padding:6px 9px;border-radius:6px;background:var(--sg-fg, #0f172a);color:var(--sg-bg, #fff);font-size:calc(11.5px * var(--sg-chart-font-scale, 1));line-height:1.4;box-shadow:0 6px 18px rgba(0, 0, 0, 0.28);display:flex;flex-direction:column;gap:1px;}.sv-grid-chart-tooltip.is-below.svelte-kvdein {transform:translate(-50%, 16px);}\n /* A corner tooltip anchors its own corner to the plot's, no flipping. */.sv-grid-chart-tooltip.is-fixed.svelte-kvdein {transform:none;}.sv-grid-chart-tooltip.is-fixed.is-right.svelte-kvdein {transform:translate(-100%, 0);}.sv-grid-chart-tooltip.is-fixed.is-bottom.svelte-kvdein {transform:translate(0, -100%);}.sv-grid-chart-tooltip.is-fixed.is-right.is-bottom.svelte-kvdein {transform:translate(-100%, -100%);}\n /* Pinned: selectable text, and a ring so a reader sees it is held. */.sv-grid-chart-tooltip.is-pinned.svelte-kvdein {pointer-events:auto;user-select:text;box-shadow:0 0 0 2px var(--sg-accent, #2563eb), 0 6px 18px rgba(0, 0, 0, 0.28);}.sv-grid-chart-tooltip-title.svelte-kvdein {opacity:0.75;font-size:calc(10.5px * var(--sg-chart-font-scale, 1));margin-bottom:1px;}.sv-grid-chart-tooltip-row.svelte-kvdein {display:flex;align-items:center;gap:6px;}.sv-grid-chart-tooltip-dot.svelte-kvdein {width:8px;height:8px;border-radius:2px;flex-shrink:0;}.sv-grid-chart-tooltip-row-label.svelte-kvdein {opacity:0.85;}.sv-grid-chart-tooltip-row-value.svelte-kvdein {margin-left:auto;padding-left:10px;font-weight:700;font-variant-numeric:tabular-nums;}.sv-grid-chart-legend.svelte-kvdein {display:flex;flex-wrap:wrap;gap:6px 12px;font-size:calc(12px * var(--sg-chart-font-scale, 1));color:var(--sg-fg, #0f172a);}.sv-grid-chart-legend-item.svelte-kvdein {display:inline-flex;align-items:center;gap:6px;border:0;background:transparent;color:inherit;font:inherit;padding:1px 2px;border-radius:4px;cursor:pointer;}.sv-grid-chart-legend-item.svelte-kvdein:disabled {cursor:default;}.sv-grid-chart-legend-item.is-off.svelte-kvdein {color:var(--sg-muted, #94a3b8);text-decoration:line-through;}.sv-grid-chart-legend-item.is-isolated.svelte-kvdein {background:var(--sg-header-bg, #f1f5f9);font-weight:700;}.sv-grid-chart-legend-more.svelte-kvdein {border:1px dashed var(--sg-border, #cbd5e1);background:transparent;color:var(--sg-muted, #64748b);font:inherit;font-size:calc(11px * var(--sg-chart-font-scale, 1));padding:1px 7px;border-radius:999px;cursor:pointer;}.sv-grid-chart-legend-more.svelte-kvdein:hover {color:var(--sg-fg, #0f172a);border-color:var(--sg-accent, #2563eb);}.sv-grid-chart-sr-only.svelte-kvdein {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;}.sv-grid-chart-swatch.svelte-kvdein {width:12px;height:12px;border-radius:3px;border:1.5px solid transparent;display:inline-block;box-sizing:border-box;}\n\n /* Enter animation. Marks fade in when they are first created; the position\n transitions above then handle everything after that, so a chart appears\n smoothly and moves smoothly rather than popping into place and then\n animating.\n\n A fade rather than the wipe you would normally reach for. A wipe needs a\n clip-path over all the marks, and the marks here are direct children of the\n <svg> - grouping them is a large edit across every chart type, for a nicer\n version of something already pleasant. Noted rather than done.\n\n `both` matters: it holds the from-state before the animation starts, so a\n mark cannot flash at full opacity for a frame first. It also means that\n when `animation: none` applies below, the rule stops applying entirely and\n the mark is simply painted - not stuck invisible. */\n @keyframes svelte-kvdein-sv-grid-chart-in {\n from { opacity: 0; }\n to { opacity: 1; }\n }.sv-grid-chart-bar.svelte-kvdein,\n .sv-grid-chart-linepath.svelte-kvdein,\n .sv-grid-chart-area.svelte-kvdein,\n .sv-grid-chart-slice.svelte-kvdein,\n .sv-grid-chart-candle.svelte-kvdein,\n .sv-grid-chart-box.svelte-kvdein,\n .sv-grid-chart-funnel-seg.svelte-kvdein,\n .sv-grid-chart-heatcell.svelte-kvdein,\n .sv-grid-chart-treemap-cell.svelte-kvdein {\n animation: svelte-kvdein-sv-grid-chart-in 0.3s ease-out both;}\n\n /* Reduced motion. Every other animated component in the kit honours this\n (SvCard, SvCircularProgress, SvCollapsible); the chart never did, so a\n reader who has asked the OS for less movement still got every bar, dot,\n candle and box sliding on each re-aggregation - and a chart re-aggregates\n on every filter keystroke, which is the worst case for it. */\n @media (prefers-reduced-motion: reduce) {.sv-grid-chart-bar.svelte-kvdein,\n .sv-grid-chart-dot.svelte-kvdein,\n .sv-grid-chart-candle.svelte-kvdein,\n .sv-grid-chart-box.svelte-kvdein {transition:none;}.sv-grid-chart-bar.svelte-kvdein,\n .sv-grid-chart-linepath.svelte-kvdein,\n .sv-grid-chart-area.svelte-kvdein,\n .sv-grid-chart-slice.svelte-kvdein,\n .sv-grid-chart-candle.svelte-kvdein,\n .sv-grid-chart-box.svelte-kvdein,\n .sv-grid-chart-funnel-seg.svelte-kvdein,\n .sv-grid-chart-heatcell.svelte-kvdein,\n .sv-grid-chart-treemap-cell.svelte-kvdein {\n animation: none;}\n }\n\n /* ---- Forced colors (Windows High Contrast) ---------------------------\n The UA forces fill and stroke along with color and background, which\n would paint every series the same. Colour carries the data, so the\n marks keep theirs (forced-color-adjust: none, the one case the spec\n allows it for). Everything that is chrome rather than data takes the\n system palette instead: text, gridlines, the crosshair and its pills,\n focus rings, the legend's swatches and the tooltip. */\n @media (forced-colors: active) {.sv-grid-chart-svg.svelte-kvdein,\n .sv-grid-chart-brush.svelte-kvdein,\n .sv-grid-chart-swatch.svelte-kvdein {forced-color-adjust:none;}.sv-grid-chart-axis.svelte-kvdein,\n .sv-grid-chart-axis-title.svelte-kvdein,\n .sv-grid-chart-title.svelte-kvdein,\n .sv-grid-chart-subtitle.svelte-kvdein,\n .sv-grid-chart-caption.svelte-kvdein,\n .sv-grid-chart-datalabel.svelte-kvdein,\n .sv-grid-chart-callout-label.svelte-kvdein,\n .sv-grid-chart-donut-total.svelte-kvdein,\n .sv-grid-chart-donut-label.svelte-kvdein,\n .sv-grid-chart-sankey-label.svelte-kvdein,\n .sv-grid-chart-annotation-label.svelte-kvdein {fill:CanvasText;}.sv-grid-chart-gridline.svelte-kvdein {stroke:GrayText;opacity:1;}.sv-grid-chart-crosshair.svelte-kvdein {stroke:Highlight;opacity:1;}.sv-grid-chart-crosshair-label.svelte-kvdein rect:where(.svelte-kvdein),\n .sv-grid-chart-refpill.svelte-kvdein rect:where(.svelte-kvdein) {fill:Highlight;opacity:1;}.sv-grid-chart-crosshair-label.svelte-kvdein text:where(.svelte-kvdein),\n .sv-grid-chart-refpill.svelte-kvdein text:where(.svelte-kvdein) {fill:HighlightText;}.sv-grid-chart-cat-hit.svelte-kvdein:focus-visible,\n .sv-grid-chart-slice.svelte-kvdein:focus-visible,\n .sv-grid-chart-arc.svelte-kvdein:focus-visible,\n .sv-grid-chart-heatcell.svelte-kvdein:focus-visible,\n .sv-grid-chart-funnel-seg.svelte-kvdein:focus-visible,\n .sv-grid-chart-treemap-cell.svelte-kvdein:focus-visible,\n .sv-grid-chart-sankey-node.svelte-kvdein:focus-visible,\n .sv-grid-chart-sankey-link.svelte-kvdein:focus-visible,\n .sv-grid-chart-calendar-cell.svelte-kvdein:focus-visible,\n .sv-grid-chart-radar-dot.svelte-kvdein:focus-visible,\n .sv-grid-chart-scatter.svelte-kvdein:focus-visible,\n .sv-grid-chart-brush.svelte-kvdein:focus-visible,\n .sv-grid-chart-annotation-marker.svelte-kvdein:focus-visible {outline:3px solid Highlight;}.sv-grid-chart-slice.is-selected.svelte-kvdein,\n .sv-grid-chart-arc.is-selected.svelte-kvdein {stroke:Highlight;stroke-width:3;}.sv-grid-chart-brush-mask.svelte-kvdein {fill:Canvas;fill-opacity:0.7;}.sv-grid-chart-brush-window.svelte-kvdein {stroke:Highlight;fill:Highlight;fill-opacity:0.2;}.sv-grid-chart-brush-handle.svelte-kvdein {fill:Highlight;}.sv-grid-chart-tooltip.svelte-kvdein {border:1px solid CanvasText;}.sv-grid-chart-legend-item.is-off.svelte-kvdein .sv-grid-chart-swatch:where(.svelte-kvdein) {forced-color-adjust:auto;}\n }"
|
|
317
|
+
};
|
|
318
|
+
function $r(n, u) {
|
|
319
|
+
te(u, !0), f(n, Qr);
|
|
320
|
+
let A = T(u, "legend", 3, !0), ue = T(u, "interactive", 3, !0), Te = T(u, "tooltipMode", 3, "shared"), Oe = T(u, "tooltipPosition", 3, "follow"), je = T(u, "tooltipSticky", 3, !1), j = T(u, "zoomable", 3, !1), M = T(u, "zoom", 15, null), N = T(u, "rangePresets", 3, !1), P = T(u, "contextMenu", 3, !1), Ve = T(u, "animate", 3, !1), He = T(u, "drillable", 3, !1), Ue = T(u, "drillPath", 31, () => se([])), We = T(u, "selectable", 3, !1), Ge = T(u, "selected", 31, () => se([])), Ke = T(u, "announce", 3, !0), qe = T(u, "describe", 3, !0), Je = T(u, "live", 3, !1), Ye = T(u, "hoverHighlight", 3, !0), $r = T(u, "crosshairLabels", 3, !0), ei = T(u, "brush", 3, !1), ti = T(u, "brushHeight", 3, 88), ni = T(u, "autosize", 3, !1), ri = T(u, "annotatable", 3, !1), ii = T(u, "drawable", 3, !1), I = D(() => Xe(u.localeText)), ai = v("");
|
|
321
|
+
g(() => {
|
|
322
|
+
if (!qe()) {
|
|
323
|
+
b(ai, "");
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
let e = t(U), n = !0;
|
|
327
|
+
return import("./chart-summary-2m3ia1-n.js").then(({ chartSummary: t }) => {
|
|
328
|
+
n && b(ai, t(e), !0);
|
|
329
|
+
}), () => {
|
|
330
|
+
n = !1;
|
|
331
|
+
};
|
|
332
|
+
});
|
|
333
|
+
async function oi() {
|
|
334
|
+
if (t(ai)) {
|
|
335
|
+
try {
|
|
336
|
+
await navigator.clipboard?.writeText(t(ai));
|
|
337
|
+
} catch {}
|
|
338
|
+
b(Wo, `${t(I).describeCopied}. ${t(ai)}`);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
let si = v(0), ci = v(0), li = D(() => u.width ?? (ni() && t(si) > 24 ? t(si) : u.spec.width ?? 520)), ui = D(() => u.height ?? (ni() && t(ci) > 24 ? t(ci) : u.spec.height ?? 300)), di = D(() => {
|
|
342
|
+
if (!u.spec.responsive?.length) return;
|
|
343
|
+
let e;
|
|
344
|
+
for (let n of Se(u.spec.responsive, t(li), t(ui))) n.legend !== void 0 && (e = n.legend);
|
|
345
|
+
return e;
|
|
346
|
+
}), L = D(() => {
|
|
347
|
+
if (!u.spec.responsive?.length) return u.spec;
|
|
348
|
+
let { responsive: e, ...n } = ve(u.spec, t(li), t(ui));
|
|
349
|
+
return n;
|
|
350
|
+
}), fi = D(() => t(di) ?? A()), pi = D(() => t(fi) === !0 ? "bottom" : t(fi) === !1 ? null : t(fi)), mi = D(() => t(pi) === "left" || t(pi) === "right"), hi = v(0), gi = v(0), _i = v(0), vi = v(0), yi = D(() => {
|
|
351
|
+
if (!ni() || t(si) <= 24) return null;
|
|
352
|
+
let e = t(Ti) ? t(hi) : 0, n = t(pi) ? t(_i) : 0, r = t(pi) ? t(gi) : 0, i = ei() && !Ia.has(u.spec.type) ? t(vi) : 0, a = Math.max(120, Math.round(t(si) - (t(mi) ? r + 8 : 0))), o = e + (t(mi) ? 0 : n) + i, s = t(mi) ? 16 : (e ? 8 : 0) + (n ? 8 : 0) + (i ? 8 : 0);
|
|
353
|
+
return {
|
|
354
|
+
width: a,
|
|
355
|
+
height: t(ci) > 24 ? Math.max(120, Math.round(t(ci) - o - s)) : void 0
|
|
356
|
+
};
|
|
357
|
+
}), bi = D(() => u.width ?? t(yi)?.width), xi = D(() => u.height ?? t(yi)?.height), Si = D(() => typeof u.dataLabels == "object" ? {
|
|
358
|
+
show: !0,
|
|
359
|
+
...u.dataLabels
|
|
360
|
+
} : u.dataLabels === void 0 ? t(L).dataLabels ? {
|
|
361
|
+
show: t(L).dataLabels.show !== !1,
|
|
362
|
+
...t(L).dataLabels
|
|
363
|
+
} : { show: !1 } : { show: !!u.dataLabels }), Ci = D(() => j() ? j() === !0 ? {
|
|
364
|
+
drag: !0,
|
|
365
|
+
wheel: !1,
|
|
366
|
+
pinch: !1,
|
|
367
|
+
pan: !1,
|
|
368
|
+
axis: "x"
|
|
369
|
+
} : {
|
|
370
|
+
drag: j().drag !== !1,
|
|
371
|
+
wheel: j().wheel ?? !1,
|
|
372
|
+
pinch: j().pinch ?? !!j().wheel,
|
|
373
|
+
pan: j().pan ?? !1,
|
|
374
|
+
axis: j().axis ?? "x"
|
|
375
|
+
} : null), wi = v(!1), Ti = D(() => u.toolbar ?? (!!j() || !!u.onDrill || ri() || !!N() || He() || !!ii())), Ei = v(!1), R = (e) => u.formatValue ? u.formatValue(e) : t(L).valueFormat ? de(e, t(L).valueFormat, t(L)) : Number.isFinite(e) ? e.toLocaleString(void 0, { maximumFractionDigits: 2 }) : String(e), Di = D(() => {
|
|
376
|
+
let e = t(L).y2Axis;
|
|
377
|
+
return u.formatValue ? u.formatValue : e?.formatter ? (t) => e.formatter(t, -1) : e?.format ? (n) => de(n, e.format, t(L)) : (e) => Number.isFinite(e) ? e.toLocaleString(void 0, { maximumFractionDigits: 2 }) : String(e);
|
|
378
|
+
}), Oi = D(() => new Set(t(L).series.filter((e) => e.axis === "right").map((e) => e.label))), ki = (e) => e && t(Oi).has(e) ? t(Di) : R, Ai = v(se(new Set(u.spec.series.filter((e) => e.visible === !1).map((e) => e.label)))), ji = v(null), Mi = v(null), Ni = v(null), Pi = D(() => t(L).palette ?? t(Mi) ?? me), Fi = `svgc-${Math.random().toString(36).slice(2, 8)}`, Ii = D(() => t(L).series.map((e, n) => ({
|
|
379
|
+
...e,
|
|
380
|
+
color: e.color ?? t(Pi)[n % t(Pi).length]
|
|
381
|
+
}))), Li = D(() => t(L).series.map((e, n) => e.pattern ? e.pattern : t(L).patternFallback ? [
|
|
382
|
+
"stripe",
|
|
383
|
+
"crosshatch",
|
|
384
|
+
"dots",
|
|
385
|
+
"diagonal"
|
|
386
|
+
][n % 4] : "solid")), Ri = D(() => {
|
|
387
|
+
let e = {};
|
|
388
|
+
return t(Ii).forEach((n, r) => {
|
|
389
|
+
let i = t(Li)[r];
|
|
390
|
+
e[n.label] = i === "solid" || !i ? n.color : `url(#${Fi}-pat-${r})`;
|
|
391
|
+
}), e;
|
|
392
|
+
}), zi = D(() => t(Ii).map((e, n) => ({
|
|
393
|
+
id: `${Fi}-pat-${n}`,
|
|
394
|
+
color: e.color,
|
|
395
|
+
kind: t(Li)[n] ?? "solid"
|
|
396
|
+
})).filter((e) => e.kind !== "solid")), Bi = D(() => {
|
|
397
|
+
if (t(ji) == null) return t(Ai);
|
|
398
|
+
let e = t(L).type === "pie" ? t(Za) : t(L).series.map((e) => e.label);
|
|
399
|
+
return new Set(e.filter((e) => e !== t(ji)));
|
|
400
|
+
}), Vi = D(() => M() !== null);
|
|
401
|
+
function Hi(e) {
|
|
402
|
+
if (!(e === null && M() === null || e !== null && M() !== null && e.i0 === M().i0 && e.i1 === M().i1 && (e.y?.min ?? null) === (M().y?.min ?? null) && (e.y?.max ?? null) === (M().y?.max ?? null)) && (M(e), u.onZoom?.(e), u.syncGroup && !Wi)) {
|
|
403
|
+
let n = t(L).categories.length;
|
|
404
|
+
ze(u.syncGroup, e, n, Ui, e ? [t(L).categories[e.i0] ?? "", t(L).categories[e.i1] ?? ""] : null);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
let Ui = Symbol("svchart"), Wi = !1, Gi = D(() => u.syncGroup ? Le(u.syncGroup) : null), Ki = v(!1);
|
|
408
|
+
function qi(e) {
|
|
409
|
+
Hi(e);
|
|
410
|
+
}
|
|
411
|
+
function Ji() {
|
|
412
|
+
Hi(null);
|
|
413
|
+
}
|
|
414
|
+
function Yi(e, t) {
|
|
415
|
+
let n = No(e, t);
|
|
416
|
+
return n == null ? null : (M() ? M().i0 : 0) + n;
|
|
417
|
+
}
|
|
418
|
+
function Xi(e) {
|
|
419
|
+
if (!t(Ci)?.wheel || !t(G) || t(Ei) || t(Ci).wheel === "modifier" && !(e.ctrlKey || e.metaKey)) return;
|
|
420
|
+
let n = ia(e);
|
|
421
|
+
if (!n || n.x < t(W).plot.x || n.x > t(W).plot.x + t(W).plot.w) return;
|
|
422
|
+
e.preventDefault();
|
|
423
|
+
let r = Yi(e.clientX, e.currentTarget) ?? 0, i = e.deltaY > 0 ? 1.25 : .8;
|
|
424
|
+
Hi(Me(M(), t(L).categories.length, r, i));
|
|
425
|
+
}
|
|
426
|
+
let Zi = /* @__PURE__ */ new Map(), Qi = null, $i = null, ea = (e) => !!t(Ci)?.pan && t(Vi) && (t(wi) || (t(Ci).pan === "shift" || t(Ci).pan === !0) && e.shiftKey), z = v(null), ta = v(null), na = v(null), ra = D(() => {
|
|
427
|
+
if (!t(ta) || !t(na)) return null;
|
|
428
|
+
let e = Math.min(t(ta).x, t(na).x), n = Math.min(t(ta).y, t(na).y), r = Math.abs(t(na).x - t(ta).x), i = Math.abs(t(na).y - t(ta).y);
|
|
429
|
+
return r > 4 && i > 4 ? {
|
|
430
|
+
x: e,
|
|
431
|
+
y: n,
|
|
432
|
+
w: r,
|
|
433
|
+
h: i
|
|
434
|
+
} : null;
|
|
435
|
+
});
|
|
436
|
+
function ia(e) {
|
|
437
|
+
if (!t(z)) return null;
|
|
438
|
+
let n = t(z).getBoundingClientRect();
|
|
439
|
+
return {
|
|
440
|
+
x: (e.clientX - n.left) / n.width * t(W).width,
|
|
441
|
+
y: (e.clientY - n.top) / n.height * t(W).height
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
function aa(e) {
|
|
445
|
+
let n = t(K) ? e.y - t(W).plot.y : e.x - t(W).plot.x, r = Math.floor(n / t(Do));
|
|
446
|
+
return Math.max(0, Math.min(t(U).categories.length - 1, r));
|
|
447
|
+
}
|
|
448
|
+
function oa(e) {
|
|
449
|
+
if (t(Ei) || t(B) || t(va) || !t(Ci) || !t(G)) return;
|
|
450
|
+
let n = ia(e);
|
|
451
|
+
if (n && !(n.x < t(W).plot.x || n.x > t(W).plot.x + t(W).plot.w || n.y < t(W).plot.y || n.y > t(W).plot.y + t(W).plot.h)) {
|
|
452
|
+
if (e.target.setPointerCapture?.(e.pointerId), t(Ci).pinch && (Zi.set(e.pointerId, n), Zi.size === 2)) {
|
|
453
|
+
let [e, t] = [...Zi.values()];
|
|
454
|
+
Qi = {
|
|
455
|
+
dist: Math.hypot(e.x - t.x, e.y - t.y) || 1,
|
|
456
|
+
mid: aa({
|
|
457
|
+
x: (e.x + t.x) / 2,
|
|
458
|
+
y: (e.y + t.y) / 2
|
|
459
|
+
}) + (M() ? M().i0 : 0),
|
|
460
|
+
start: M()
|
|
461
|
+
}, b(ta, null), b(na, null);
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
if (ea(e)) {
|
|
465
|
+
$i = {
|
|
466
|
+
startIndex: aa(n),
|
|
467
|
+
start: M()
|
|
468
|
+
};
|
|
469
|
+
return;
|
|
470
|
+
}
|
|
471
|
+
t(Ci).drag && (b(ta, n, !0), b(na, n, !0));
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
function sa(e) {
|
|
475
|
+
if (Qi && Zi.has(e.pointerId)) {
|
|
476
|
+
let n = ia(e);
|
|
477
|
+
n && Zi.set(e.pointerId, n);
|
|
478
|
+
let [r, i] = [...Zi.values()];
|
|
479
|
+
if (r && i) {
|
|
480
|
+
let e = Math.hypot(r.x - i.x, r.y - i.y) || 1;
|
|
481
|
+
Hi(Pe(Qi.start, t(L).categories.length, Qi.mid, e / Qi.dist));
|
|
482
|
+
}
|
|
483
|
+
return;
|
|
484
|
+
}
|
|
485
|
+
if ($i) {
|
|
486
|
+
let n = ia(e);
|
|
487
|
+
if (!n) return;
|
|
488
|
+
let r = $i.startIndex - aa(n);
|
|
489
|
+
Hi(Ne($i.start, t(L).categories.length, r));
|
|
490
|
+
return;
|
|
491
|
+
}
|
|
492
|
+
t(ta) && b(na, ia(e), !0);
|
|
493
|
+
}
|
|
494
|
+
function ca(e) {
|
|
495
|
+
if (e && Zi.delete(e.pointerId), Qi) {
|
|
496
|
+
Zi.size < 2 && (Qi = null);
|
|
497
|
+
return;
|
|
498
|
+
}
|
|
499
|
+
if ($i) {
|
|
500
|
+
$i = null;
|
|
501
|
+
return;
|
|
502
|
+
}
|
|
503
|
+
if (!t(ta) || !t(na)) {
|
|
504
|
+
b(ta, null), b(na, null);
|
|
505
|
+
return;
|
|
506
|
+
}
|
|
507
|
+
let n = t(ra);
|
|
508
|
+
if (n) {
|
|
509
|
+
let e = t(Ci)?.axis ?? "x", r = aa({
|
|
510
|
+
x: n.x,
|
|
511
|
+
y: n.y
|
|
512
|
+
}), i = aa({
|
|
513
|
+
x: n.x + n.w,
|
|
514
|
+
y: n.y + n.h
|
|
515
|
+
}), a = M() ? M().i0 : 0, o = e === "y" ? M()?.i0 ?? 0 : a + Math.min(r, i), s = e === "y" ? M()?.i1 ?? t(L).categories.length - 1 : a + Math.max(r, i), c;
|
|
516
|
+
if (e !== "x" && t(mo) && !t(K)) {
|
|
517
|
+
let e = t(mo).yInvert(n.y), r = t(mo).yInvert(n.y + n.h);
|
|
518
|
+
Number.isFinite(e) && Number.isFinite(r) && e !== r && (c = {
|
|
519
|
+
min: Math.min(e, r),
|
|
520
|
+
max: Math.max(e, r)
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
(s > o || c) && Hi({
|
|
524
|
+
i0: o,
|
|
525
|
+
i1: Math.max(o, s),
|
|
526
|
+
...c ? { y: c } : {}
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
b(ta, null), b(na, null);
|
|
530
|
+
}
|
|
531
|
+
function la() {
|
|
532
|
+
j() && t(Vi) && Ji();
|
|
533
|
+
}
|
|
534
|
+
let ua = [
|
|
535
|
+
"trend",
|
|
536
|
+
"hray",
|
|
537
|
+
"fib",
|
|
538
|
+
"rect",
|
|
539
|
+
"arrow",
|
|
540
|
+
"text"
|
|
541
|
+
], da = D(() => ({
|
|
542
|
+
trend: t(I).toolTrend,
|
|
543
|
+
hray: t(I).toolRay,
|
|
544
|
+
fib: t(I).toolFib,
|
|
545
|
+
rect: t(I).toolRect,
|
|
546
|
+
arrow: t(I).toolArrow,
|
|
547
|
+
text: t(I).toolText
|
|
548
|
+
})), fa = D(() => ii() ? ii() === !0 ? ua : ii() : []), B = v(null), V = v(null), pa = v(null), ma = v(null), ha = v(null), ga = v("");
|
|
549
|
+
function _a() {
|
|
550
|
+
let e = t(ha), n = t(ga).trim();
|
|
551
|
+
b(ha, null), b(ga, ""), !(!e || !n) && Ca([...ba(), {
|
|
552
|
+
id: `d${Date.now().toString(36)}${ya++}`,
|
|
553
|
+
kind: "text",
|
|
554
|
+
points: [{
|
|
555
|
+
x: e.x,
|
|
556
|
+
y: e.y
|
|
557
|
+
}],
|
|
558
|
+
text: n
|
|
559
|
+
}]);
|
|
560
|
+
}
|
|
561
|
+
let va = v(null), ya = 0, ba = () => t(L).drawings ?? [];
|
|
562
|
+
function xa(e) {
|
|
563
|
+
if (!t(mo)) return null;
|
|
564
|
+
let n = t(W).axes?.x;
|
|
565
|
+
if (n?.type === "number") return t(mo).xInvertValue(e);
|
|
566
|
+
if (n?.type === "time") return new Date(t(mo).xInvertValue(e)).toISOString();
|
|
567
|
+
let r = Math.round(t(mo).xInvert(e));
|
|
568
|
+
return t(U).categories[r] ?? null;
|
|
569
|
+
}
|
|
570
|
+
function Sa(e) {
|
|
571
|
+
let n = ia(e);
|
|
572
|
+
if (!n || !t(mo) || n.x < t(W).plot.x || n.x > t(W).plot.x + t(W).plot.w || n.y < t(W).plot.y || n.y > t(W).plot.y + t(W).plot.h) return null;
|
|
573
|
+
let r = xa(n.x);
|
|
574
|
+
if (r == null) return null;
|
|
575
|
+
let i = t(mo).yInvert(n.y);
|
|
576
|
+
return Number.isFinite(i) ? {
|
|
577
|
+
x: r,
|
|
578
|
+
y: Math.round(i * 1e3) / 1e3,
|
|
579
|
+
px: n.x,
|
|
580
|
+
py: n.y
|
|
581
|
+
} : null;
|
|
582
|
+
}
|
|
583
|
+
function Ca(e) {
|
|
584
|
+
u.onDrawingsChange?.(e);
|
|
585
|
+
}
|
|
586
|
+
function wa(e) {
|
|
587
|
+
b(B, t(B) === e ? null : e, !0), b(V, null), b(pa, null), b(ha, null);
|
|
588
|
+
}
|
|
589
|
+
function Ta(e) {
|
|
590
|
+
if (!t(B)) return;
|
|
591
|
+
let n = Sa(e);
|
|
592
|
+
if (!n) return;
|
|
593
|
+
if (t(B) === "text") {
|
|
594
|
+
let r = t(us)?.getBoundingClientRect();
|
|
595
|
+
b(ga, ""), b(ha, {
|
|
596
|
+
x: n.x,
|
|
597
|
+
y: n.y,
|
|
598
|
+
left: r ? e.clientX - r.left : 0,
|
|
599
|
+
top: r ? e.clientY - r.top : 0
|
|
600
|
+
}, !0);
|
|
601
|
+
return;
|
|
602
|
+
}
|
|
603
|
+
if (t(B) === "hray") {
|
|
604
|
+
Ca([...ba(), {
|
|
605
|
+
id: `d${Date.now().toString(36)}${ya++}`,
|
|
606
|
+
kind: t(B),
|
|
607
|
+
points: [{
|
|
608
|
+
x: n.x,
|
|
609
|
+
y: n.y
|
|
610
|
+
}]
|
|
611
|
+
}]);
|
|
612
|
+
return;
|
|
613
|
+
}
|
|
614
|
+
if (!t(V)) {
|
|
615
|
+
b(V, n, !0), b(pa, {
|
|
616
|
+
x: n.px,
|
|
617
|
+
y: n.py
|
|
618
|
+
}, !0);
|
|
619
|
+
return;
|
|
620
|
+
}
|
|
621
|
+
let r = t(V);
|
|
622
|
+
b(V, null), b(pa, null), Ca([...ba(), {
|
|
623
|
+
id: `d${Date.now().toString(36)}${ya++}`,
|
|
624
|
+
kind: t(B),
|
|
625
|
+
points: [{
|
|
626
|
+
x: r.x,
|
|
627
|
+
y: r.y
|
|
628
|
+
}, {
|
|
629
|
+
x: n.x,
|
|
630
|
+
y: n.y
|
|
631
|
+
}]
|
|
632
|
+
}]);
|
|
633
|
+
}
|
|
634
|
+
function Ea(e) {
|
|
635
|
+
if (t(va)) {
|
|
636
|
+
let n = Sa(e);
|
|
637
|
+
if (!n) return;
|
|
638
|
+
let { id: r, index: i } = t(va);
|
|
639
|
+
Ca(ba().map((e) => e.id === r ? {
|
|
640
|
+
...e,
|
|
641
|
+
points: e.points.map((e, t) => t === i ? {
|
|
642
|
+
x: n.x,
|
|
643
|
+
y: n.y
|
|
644
|
+
} : e)
|
|
645
|
+
} : e));
|
|
646
|
+
return;
|
|
647
|
+
}
|
|
648
|
+
if (t(V)) {
|
|
649
|
+
let t = ia(e);
|
|
650
|
+
t && b(pa, t, !0);
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
function Da(e) {
|
|
654
|
+
Ca(ba().filter((t) => t.id !== e)), t(ma) === e && b(ma, null);
|
|
655
|
+
}
|
|
656
|
+
function Oa(e, t) {
|
|
657
|
+
(e.key === "Delete" || e.key === "Backspace") && (e.preventDefault(), Da(t));
|
|
658
|
+
}
|
|
659
|
+
function ka(e) {
|
|
660
|
+
if (e.key === "Escape") {
|
|
661
|
+
if (t(fs)) {
|
|
662
|
+
Aa();
|
|
663
|
+
return;
|
|
664
|
+
}
|
|
665
|
+
t(B) && (t(V) ? (b(V, null), b(pa, null)) : b(B, null));
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
function Aa() {
|
|
669
|
+
b(fs, null), Q();
|
|
670
|
+
}
|
|
671
|
+
function ja(e) {
|
|
672
|
+
if (!(!je() || !t(X))) {
|
|
673
|
+
if (t(fs) && t(fs).index === e) {
|
|
674
|
+
Aa();
|
|
675
|
+
return;
|
|
676
|
+
}
|
|
677
|
+
b(fs, {
|
|
678
|
+
index: e,
|
|
679
|
+
series: t(X).ctx.series ?? null
|
|
680
|
+
}, !0);
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
g(() => {
|
|
684
|
+
if (!t(fs) || typeof document > "u") return;
|
|
685
|
+
let e = (e) => {
|
|
686
|
+
t(us) && e.target instanceof Node && t(us).contains(e.target) || Aa();
|
|
687
|
+
};
|
|
688
|
+
return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
|
|
689
|
+
});
|
|
690
|
+
let Ma = (e) => {
|
|
691
|
+
e.focus();
|
|
692
|
+
}, Na = D(() => t(L).type === "candlestick" || t(L).type === "ohlc"), Pa = D(() => t(L).type === "ohlc"), Fa = D(() => Math.max(50, (t(bi) ?? t(L).width ?? 520) - 60)), Ia = /* @__PURE__ */ new Set([
|
|
693
|
+
"pie",
|
|
694
|
+
"heatmap",
|
|
695
|
+
"funnel",
|
|
696
|
+
"radar",
|
|
697
|
+
"calendar",
|
|
698
|
+
"gauge",
|
|
699
|
+
"treemap",
|
|
700
|
+
"sankey",
|
|
701
|
+
"sunburst",
|
|
702
|
+
"radial-bar",
|
|
703
|
+
"radial-column",
|
|
704
|
+
"nightingale",
|
|
705
|
+
"chord",
|
|
706
|
+
"bullet"
|
|
707
|
+
]), La = /* @__PURE__ */ new Set([
|
|
708
|
+
"lollipop",
|
|
709
|
+
"dumbbell",
|
|
710
|
+
"range-area",
|
|
711
|
+
"range-bar",
|
|
712
|
+
"stream",
|
|
713
|
+
"pareto"
|
|
714
|
+
]), Ra = D(() => ei() && !Ia.has(t(L).type)), za = D(() => ({
|
|
715
|
+
...t(L),
|
|
716
|
+
width: t(bi) ?? t(L).width,
|
|
717
|
+
height: ti(),
|
|
718
|
+
title: void 0,
|
|
719
|
+
subtitle: void 0,
|
|
720
|
+
caption: void 0,
|
|
721
|
+
yAxisTitle: void 0,
|
|
722
|
+
y2AxisTitle: void 0,
|
|
723
|
+
xAxisTitle: void 0,
|
|
724
|
+
xAxis: {
|
|
725
|
+
...t(L).xAxis,
|
|
726
|
+
title: void 0,
|
|
727
|
+
labels: !1
|
|
728
|
+
},
|
|
729
|
+
yAxis: {
|
|
730
|
+
...t(L).yAxis,
|
|
731
|
+
title: void 0,
|
|
732
|
+
labels: !1
|
|
733
|
+
},
|
|
734
|
+
y2Axis: {
|
|
735
|
+
...t(L).y2Axis,
|
|
736
|
+
title: void 0,
|
|
737
|
+
labels: !1
|
|
738
|
+
},
|
|
739
|
+
referenceLines: void 0,
|
|
740
|
+
referenceBands: void 0,
|
|
741
|
+
annotations: void 0,
|
|
742
|
+
drawings: void 0,
|
|
743
|
+
seriesLabels: void 0,
|
|
744
|
+
dataLabels: { show: !1 },
|
|
745
|
+
type: t(Na) || t(L).type === "boxplot" || La.has(t(L).type) ? "line" : t(L).type === "histogram" ? "bar" : t(L).type,
|
|
746
|
+
stackOffset: void 0,
|
|
747
|
+
series: t(Ii).filter((e) => !t(Bi).has(e.label)).map((e) => e.ohlc || e.boxes ? {
|
|
748
|
+
...e,
|
|
749
|
+
ohlc: void 0,
|
|
750
|
+
boxes: void 0,
|
|
751
|
+
errors: void 0,
|
|
752
|
+
type: "line"
|
|
753
|
+
} : e.errors || e.type && La.has(e.type) || e.type === "scatter" ? {
|
|
754
|
+
...e,
|
|
755
|
+
errors: void 0,
|
|
756
|
+
type: e.type && (La.has(e.type) || e.type === "scatter") ? "line" : e.type
|
|
757
|
+
} : e)
|
|
758
|
+
})), H = D(() => t(Ra) ? we(Ee(t(za), t(Fa))) : null), Ba = D(() => {
|
|
759
|
+
let e = t(L).categories.length;
|
|
760
|
+
return !M() || e === 0 ? {
|
|
761
|
+
t0: 0,
|
|
762
|
+
t1: 1
|
|
763
|
+
} : {
|
|
764
|
+
t0: M().i0 / e,
|
|
765
|
+
t1: (M().i1 + 1) / e
|
|
766
|
+
};
|
|
767
|
+
}), Va = v(null);
|
|
768
|
+
function Ha(e, n) {
|
|
769
|
+
let r = n.getBoundingClientRect();
|
|
770
|
+
return t(H) ? (e.clientX - r.left) / r.width * t(H).width : 0;
|
|
771
|
+
}
|
|
772
|
+
function Ua(e, n) {
|
|
773
|
+
if (!t(H)) return;
|
|
774
|
+
let r = e.currentTarget, i = Ha(e, r.ownerSVGElement ?? r);
|
|
775
|
+
b(Va, {
|
|
776
|
+
mode: n,
|
|
777
|
+
startX: i,
|
|
778
|
+
startT0: t(Ba).t0,
|
|
779
|
+
startT1: t(Ba).t1
|
|
780
|
+
}, !0), e.currentTarget.setPointerCapture?.(e.pointerId), e.stopPropagation();
|
|
781
|
+
}
|
|
782
|
+
function Wa(e) {
|
|
783
|
+
if (!t(Va) || !t(H)) return;
|
|
784
|
+
let n = (Ha(e, e.currentTarget.ownerSVGElement ?? e.currentTarget) - t(Va).startX) / t(H).plot.w, r = t(L).categories.length;
|
|
785
|
+
if (r === 0) return;
|
|
786
|
+
let i = t(Va).startT0, a = t(Va).startT1;
|
|
787
|
+
if (t(Va).mode === "move") {
|
|
788
|
+
let e = a - i;
|
|
789
|
+
i = Math.max(0, Math.min(1 - e, i + n)), a = i + e;
|
|
790
|
+
} else t(Va).mode === "left" ? i = Math.max(0, Math.min(a - 1 / r, i + n)) : a = Math.min(1, Math.max(i + 1 / r, a + n));
|
|
791
|
+
let o = Math.max(0, Math.floor(i * r)), s = Math.min(r - 1, Math.ceil(a * r) - 1);
|
|
792
|
+
o === 0 && s === r - 1 ? Hi(null) : Hi({
|
|
793
|
+
i0: o,
|
|
794
|
+
i1: Math.max(o, s),
|
|
795
|
+
...M()?.y ? { y: M().y } : {}
|
|
796
|
+
});
|
|
797
|
+
}
|
|
798
|
+
function Ga(e) {
|
|
799
|
+
b(Va, null), e.currentTarget.releasePointerCapture?.(e.pointerId);
|
|
800
|
+
}
|
|
801
|
+
let Ka = D(() => t(L).tree ?? t(L).treemap ?? null), qa = D(() => He() && !!t(Ka) && (t(L).type === "sunburst" || t(L).type === "treemap" || t(L).type === "pie")), Ja = D(() => t(qa) && Ue().length ? xe(t(Ka), Ue()) : t(Ka)), Ya = (e) => e.value ?? (e.children ?? []).reduce((e, t) => e + Ya(t), 0), Xa = D(() => t(L).type === "pie" && t(qa) && t(Ja) ? t(Ja) : null), Za = D(() => t(Xa) ? (t(Xa).children ?? []).map((e) => e.name) : t(L).categories), Qa = (e) => !!t(Xa) && !!t(Xa).children?.find((t) => t.name === e)?.children?.length;
|
|
802
|
+
function $a(e) {
|
|
803
|
+
Ue(e);
|
|
804
|
+
}
|
|
805
|
+
function eo(e) {
|
|
806
|
+
return !t(qa) || !e || !t(Ka) || !xe(t(Ka), e)?.children?.length ? !1 : ($a(e), !0);
|
|
807
|
+
}
|
|
808
|
+
let U = D(() => {
|
|
809
|
+
if (t(Xa)) {
|
|
810
|
+
let e = t(Xa).children ?? [], n = t(L).series[0]?.label ?? t(Xa).name, r = e.map((e) => t(Bi).has(e.name) ? 0 : Ya(e)), i = e.map((e) => e.color ?? null);
|
|
811
|
+
return {
|
|
812
|
+
...t(L),
|
|
813
|
+
categories: t(Za),
|
|
814
|
+
series: [{
|
|
815
|
+
label: n,
|
|
816
|
+
values: r,
|
|
817
|
+
...i.some(Boolean) ? { colors: i } : {}
|
|
818
|
+
}]
|
|
819
|
+
};
|
|
820
|
+
}
|
|
821
|
+
if (t(qa) && t(Ja) && Ue().length) {
|
|
822
|
+
let e = {
|
|
823
|
+
...t(L),
|
|
824
|
+
tree: t(Ja),
|
|
825
|
+
treemap: t(Ja)
|
|
826
|
+
};
|
|
827
|
+
return t(L).type === "treemap" ? e : {
|
|
828
|
+
...e,
|
|
829
|
+
series: t(Ii)
|
|
830
|
+
};
|
|
831
|
+
}
|
|
832
|
+
if (t(L).type === "pie" || t(vo)) {
|
|
833
|
+
let e = t(Ii)[0];
|
|
834
|
+
if (!e) return t(L);
|
|
835
|
+
let n = e.values.map((e, n) => t(Bi).has(t(L).categories[n] ?? String(n)) ? 0 : e);
|
|
836
|
+
return {
|
|
837
|
+
...t(L),
|
|
838
|
+
series: [{
|
|
839
|
+
...e,
|
|
840
|
+
values: n
|
|
841
|
+
}]
|
|
842
|
+
};
|
|
843
|
+
}
|
|
844
|
+
let e = t(Ii).filter((e) => !t(Bi).has(e.label)), n = M() ? be({
|
|
845
|
+
...t(L),
|
|
846
|
+
series: e
|
|
847
|
+
}, M().i0, M().i1) : {
|
|
848
|
+
...t(L),
|
|
849
|
+
series: e
|
|
850
|
+
};
|
|
851
|
+
if (M()?.y) {
|
|
852
|
+
let e = M().y.axis === "right" ? "y2Axis" : "yAxis";
|
|
853
|
+
n = {
|
|
854
|
+
...n,
|
|
855
|
+
[e]: {
|
|
856
|
+
...n[e] ?? {},
|
|
857
|
+
min: M().y.min,
|
|
858
|
+
max: M().y.max,
|
|
859
|
+
nice: !1
|
|
860
|
+
}
|
|
861
|
+
};
|
|
862
|
+
}
|
|
863
|
+
return Ee(n, t(Fa));
|
|
864
|
+
}), to = v(!1), no = D(() => we({
|
|
865
|
+
...t(U),
|
|
866
|
+
palette: t(Pi),
|
|
867
|
+
...t(bi) || t(xi) ? {
|
|
868
|
+
width: t(bi),
|
|
869
|
+
height: t(xi)
|
|
870
|
+
} : {},
|
|
871
|
+
...u.dataLabels === void 0 ? {} : { dataLabels: t(Si) }
|
|
872
|
+
}, t(to) ? "dark" : "light")), ro = D(() => Ve() ? Ve() === !0 ? {
|
|
873
|
+
duration: 400,
|
|
874
|
+
enter: "fade",
|
|
875
|
+
update: !0
|
|
876
|
+
} : {
|
|
877
|
+
duration: Ve().duration ?? 400,
|
|
878
|
+
enter: Ve().enter ?? "fade",
|
|
879
|
+
update: Ve().update ?? !0
|
|
880
|
+
} : null), io = v(!1);
|
|
881
|
+
g(() => {
|
|
882
|
+
if (typeof matchMedia != "function") return;
|
|
883
|
+
let e = matchMedia("(prefers-reduced-motion: reduce)");
|
|
884
|
+
b(io, e.matches, !0);
|
|
885
|
+
let t = () => b(io, e.matches, !0);
|
|
886
|
+
return e.addEventListener?.("change", t), () => e.removeEventListener?.("change", t);
|
|
887
|
+
});
|
|
888
|
+
let ao = v(null), W = D(() => t(ao) && t(ao).t < 1 ? Be(t(ao).from, t(no), t(ao).t) : t(no)), oo = null, so = 0;
|
|
889
|
+
g(() => {
|
|
890
|
+
let e = t(no);
|
|
891
|
+
oe(() => {
|
|
892
|
+
let n = oo;
|
|
893
|
+
if (oo = e, !n || !t(ro)?.update || t(io) || t(ro).duration <= 0 || Je() || e.bars.length + e.arcs.length > 600 || e.lines.some((e) => e.points.length > 600) || n.type !== e.type) return;
|
|
894
|
+
let r = t(ao) && t(ao).t < 1 ? Be(t(ao).from, n, t(ao).t) : n;
|
|
895
|
+
cancelAnimationFrame(so);
|
|
896
|
+
let i = performance.now(), a = t(ro).duration;
|
|
897
|
+
b(ao, {
|
|
898
|
+
from: r,
|
|
899
|
+
t: 0
|
|
900
|
+
}, !0);
|
|
901
|
+
let o = (e) => {
|
|
902
|
+
let t = Math.min(1, (e - i) / a), n = 1 - (1 - t) ** 3;
|
|
903
|
+
b(ao, t >= 1 ? null : {
|
|
904
|
+
from: r,
|
|
905
|
+
t: n
|
|
906
|
+
}, !0), t < 1 && (so = requestAnimationFrame(o));
|
|
907
|
+
};
|
|
908
|
+
so = requestAnimationFrame(o);
|
|
909
|
+
});
|
|
910
|
+
});
|
|
911
|
+
let co = D(() => t(io) || Je() ? "none" : t(ro)?.enter ?? "fade"), lo = D(() => t(W).lines.flatMap((e, t) => e.style?.gradient ? [{
|
|
912
|
+
id: `${Fi}-grad-${t}`,
|
|
913
|
+
...e.style.gradient
|
|
914
|
+
}] : [])), uo = D(() => t(L).yAxis?.title ?? t(L).yAxisTitle), fo = D(() => t(L).y2Axis?.title ?? t(L).y2AxisTitle), po = D(() => t(L).xAxis?.title ?? t(L).xAxisTitle), mo = D(() => ge(t(W))), ho = D(() => ({
|
|
915
|
+
geo: t(W),
|
|
916
|
+
scales: t(mo),
|
|
917
|
+
xOf: t(mo)?.xOf ?? null,
|
|
918
|
+
yOf: t(mo)?.yOf ?? null
|
|
919
|
+
})), G = D(() => !Ia.has(t(L).type)), go = D(() => t(L).type === "sunburst" || t(L).type === "radial-bar" || t(L).type === "radial-column" || t(L).type === "nightingale" || t(L).type === "chord"), _o = D(() => t(L).type === "bullet"), vo = D(() => (t(L).type === "radial-bar" || t(L).type === "radial-column" || t(L).type === "nightingale") && t(L).series.length === 1), yo = D(() => t(L).type === "scatter"), bo = D(() => t(L).type === "heatmap"), xo = D(() => t(L).type === "funnel"), So = D(() => t(L).type === "radar"), Co = D(() => t(L).type === "calendar"), wo = D(() => t(L).type === "gauge"), To = D(() => t(L).type === "treemap"), Eo = D(() => t(L).type === "sankey"), K = D(() => t(W).orientation === "horizontal"), Do = D(() => (t(K) ? t(W).plot.h : t(W).plot.w) / Math.max(1, t(U).categories.length)), Oo = D(() => t(G) && !t(yo) && !t(K) && t(Do) < 4 && t(U).categories.length > 1), ko = D(() => M() ? M().i1 - M().i0 + 1 : t(L).categories.length), Ao = D(() => t(Si).show && t(G) && !t(yo) ? ye(t(W), t(Si), (e, t) => ki(t)(e), {
|
|
920
|
+
stacked: !!(t(L).stacked || t(L).stacked100),
|
|
921
|
+
dense: t(Oo),
|
|
922
|
+
share: !!t(L).stacked100
|
|
923
|
+
}) : []), jo = 1e3;
|
|
924
|
+
function Mo(e, t, n) {
|
|
925
|
+
let r = n.ownerSVGElement ?? n;
|
|
926
|
+
if (!r || typeof r.getBoundingClientRect != "function") return null;
|
|
927
|
+
let i = r.getBoundingClientRect();
|
|
928
|
+
if (!i.width || !i.height) return null;
|
|
929
|
+
let a = r.viewBox?.baseVal, o = a && a.width ? a.width / i.width : 1, s = a && a.height ? a.height / i.height : 1;
|
|
930
|
+
return {
|
|
931
|
+
x: (e - i.left) * o + (a ? a.x : 0),
|
|
932
|
+
y: (t - i.top) * s + (a ? a.y : 0)
|
|
933
|
+
};
|
|
934
|
+
}
|
|
935
|
+
function No(e, n) {
|
|
936
|
+
let r = Mo(e, 0, n);
|
|
937
|
+
if (!r) return null;
|
|
938
|
+
let i = r.x, a = t(W).lines[0]?.points, o = t(U).categories.length;
|
|
939
|
+
if (!a || a.length !== o) {
|
|
940
|
+
let e = Math.floor((i - t(W).plot.x) / t(Do));
|
|
941
|
+
return e >= 0 && e < o ? e : null;
|
|
942
|
+
}
|
|
943
|
+
let s = 0, c = a.length - 1;
|
|
944
|
+
for (; s < c;) {
|
|
945
|
+
let e = s + c >> 1;
|
|
946
|
+
a[e].x < i ? s = e + 1 : c = e;
|
|
947
|
+
}
|
|
948
|
+
return s > 0 && Math.abs(a[s - 1].x - i) <= Math.abs(a[s].x - i) && --s, s;
|
|
949
|
+
}
|
|
950
|
+
let Po = v(0);
|
|
951
|
+
function Fo(e) {
|
|
952
|
+
if (Ys(e, t(Po)) || Hs(e, t(Po))) return;
|
|
953
|
+
let n = t(U).categories.length - 1, r = Math.max(1, Math.floor(n / 10)), i = t(Po);
|
|
954
|
+
switch (e.key) {
|
|
955
|
+
case "ArrowRight":
|
|
956
|
+
case "ArrowDown":
|
|
957
|
+
i = Math.min(n, t(Po) + 1);
|
|
958
|
+
break;
|
|
959
|
+
case "ArrowLeft":
|
|
960
|
+
case "ArrowUp":
|
|
961
|
+
i = Math.max(0, t(Po) - 1);
|
|
962
|
+
break;
|
|
963
|
+
case "Home":
|
|
964
|
+
i = 0;
|
|
965
|
+
break;
|
|
966
|
+
case "End":
|
|
967
|
+
i = n;
|
|
968
|
+
break;
|
|
969
|
+
case "PageDown":
|
|
970
|
+
i = Math.min(n, t(Po) + r);
|
|
971
|
+
break;
|
|
972
|
+
case "PageUp":
|
|
973
|
+
i = Math.max(0, t(Po) - r);
|
|
974
|
+
break;
|
|
975
|
+
case "Enter":
|
|
976
|
+
case " ":
|
|
977
|
+
e.preventDefault(), Ns(e, t(Po));
|
|
978
|
+
return;
|
|
979
|
+
default: return;
|
|
980
|
+
}
|
|
981
|
+
e.preventDefault(), b(Po, i, !0), Cs(e.currentTarget, i);
|
|
982
|
+
}
|
|
983
|
+
let Io = v(null), Lo = D(() => t(Ni) ?? (Ye() ? t(Io) : null)), q = (e) => t(Lo) && t(Lo) !== e ? .18 : 1, Ro = null;
|
|
984
|
+
function zo(e) {
|
|
985
|
+
u.onHover && (e === Ro || e !== null && Ro !== null && e.category === Ro.category && e.index === Ro.index && e.series === Ro.series && e.value === Ro.value || (Ro = e, u.onHover(e)));
|
|
986
|
+
}
|
|
987
|
+
let J = D(() => We() === "multi" ? "multi" : We() ? "single" : null), Bo = (e, t, n, r) => e.category === t && e.series === n && (e.index === void 0 || r === void 0 || e.index === r), Vo = (e, t, n) => Ge().some((r) => Bo(r, e, t, n)), Ho = (e, n, r) => t(J) && Ge().length && !Vo(e, n, r) ? .35 : 1;
|
|
988
|
+
function Uo(e, n, r, i) {
|
|
989
|
+
if (!t(J)) return;
|
|
990
|
+
let a = i === void 0 ? {
|
|
991
|
+
category: e,
|
|
992
|
+
series: n
|
|
993
|
+
} : {
|
|
994
|
+
category: e,
|
|
995
|
+
series: n,
|
|
996
|
+
index: i
|
|
997
|
+
}, o = t(J) === "multi" || !!(r && (r.ctrlKey || r.metaKey || r.shiftKey)), s;
|
|
998
|
+
s = Vo(e, n, i) ? o ? Ge().filter((t) => !Bo(t, e, n, i)) : [] : o ? [...Ge(), a] : [a], Ge(s), u.onSelectionChange?.(s);
|
|
999
|
+
}
|
|
1000
|
+
let Y = v(null), Wo = v(""), Go = D(() => t(L).type === "heatmap" || t(L).type === "calendar" || t(L).type === "gauge" ? [] : t(L).type === "pie" || t(vo) ? t(Za).map((e, n) => ({
|
|
1001
|
+
label: e,
|
|
1002
|
+
color: t(L).categoryColors?.[e] ?? t(U).series[0]?.colors?.[n] ?? t(Pi)[n % t(Pi).length],
|
|
1003
|
+
off: t(Ai).has(e)
|
|
1004
|
+
})) : t(L).type === "sunburst" || t(L).type === "chord" ? t(W).legend.map((e) => ({
|
|
1005
|
+
label: e.label,
|
|
1006
|
+
color: e.color,
|
|
1007
|
+
off: !1
|
|
1008
|
+
})) : t(Ii).map((e) => ({
|
|
1009
|
+
label: e.label,
|
|
1010
|
+
color: e.color,
|
|
1011
|
+
off: t(Ai).has(e.label)
|
|
1012
|
+
}))), Ko = D(() => N() ? N() === !0 ? [
|
|
1013
|
+
"1W",
|
|
1014
|
+
"1M",
|
|
1015
|
+
"3M",
|
|
1016
|
+
"6M",
|
|
1017
|
+
"YTD",
|
|
1018
|
+
"1Y",
|
|
1019
|
+
"All"
|
|
1020
|
+
] : N() : []), qo = D(() => t(Ko).length > 0 && t(G) && (t(L).xType === "time" || t(L).xType === "ordinal-time" || t(L).xAxis?.type === "time" || t(L).xAxis?.type === "ordinal-time")), Jo = (e) => typeof e == "string" ? e : e.label;
|
|
1021
|
+
function Yo(e) {
|
|
1022
|
+
Hi(Fe(t(L).categories, e));
|
|
1023
|
+
}
|
|
1024
|
+
let Xo = D(() => t(L).type !== "sunburst" && t(L).type !== "chord"), Zo = v(!1), Qo = D(() => t(Go).length > 10), $o = D(() => t(Qo) && !t(Zo) ? t(Go).slice(0, 10) : t(Go)), es = D(() => t(L).type === "pie" ? t(W).slices.every((e) => e.value <= 0) : t(L).type === "scatter" ? t(W).scatterPoints.length === 0 : t(L).type === "heatmap" ? t(W).heatmapCells.length === 0 : t(L).type === "funnel" ? t(W).funnelSegments.length === 0 : t(L).type === "radar" ? t(W).radarSeries.length === 0 : t(L).type === "calendar" ? t(W).calendarCells.length === 0 : t(L).type === "gauge" ? !t(W).gauge : t(L).type === "treemap" ? t(W).treemapCells.length === 0 : t(L).type === "sankey" ? t(W).sankeyNodes.length === 0 : t(Na) ? t(W).candles.length === 0 : t(L).type === "boxplot" ? t(W).boxes.length === 0 : t(go) ? t(W).arcs.length === 0 : t(_o) ? t(W).bullets.length === 0 : t(W).bars.length === 0 && t(W).stems.length === 0 && t(W).lines.every((e) => e.points.every((e) => !e.defined))), ts = null;
|
|
1025
|
+
function ns(e) {
|
|
1026
|
+
if (!ue() || !t(Xo)) return;
|
|
1027
|
+
if (t(ji) != null) {
|
|
1028
|
+
ts = {
|
|
1029
|
+
label: t(ji),
|
|
1030
|
+
at: Date.now()
|
|
1031
|
+
}, b(ji, null);
|
|
1032
|
+
return;
|
|
1033
|
+
}
|
|
1034
|
+
let n = new Set(t(Ai));
|
|
1035
|
+
n.has(e) ? n.delete(e) : n.add(e), b(Ai, n, !0);
|
|
1036
|
+
}
|
|
1037
|
+
function rs(e) {
|
|
1038
|
+
if (!ue() || !t(Xo)) return;
|
|
1039
|
+
let n = ts;
|
|
1040
|
+
ts = null;
|
|
1041
|
+
let r = new Set(t(Ai));
|
|
1042
|
+
if (r.delete(e), n && n.label === e && Date.now() - n.at < 600) {
|
|
1043
|
+
b(Ai, r, !0);
|
|
1044
|
+
return;
|
|
1045
|
+
}
|
|
1046
|
+
b(Ai, r, !0), b(ji, t(ji) === e ? null : e, !0);
|
|
1047
|
+
}
|
|
1048
|
+
let is = (e, t) => Number.isFinite(e) ? ki(t)(e) : "", as = D(() => {
|
|
1049
|
+
if (t(L).type === "pie") {
|
|
1050
|
+
let e = t(Xa) ? t(U).series[0] : t(Ii)[0];
|
|
1051
|
+
return {
|
|
1052
|
+
cols: ["Category", "Value"],
|
|
1053
|
+
rows: t(Za).map((t, n) => [t, is(e?.values[n])])
|
|
1054
|
+
};
|
|
1055
|
+
}
|
|
1056
|
+
if (t(yo)) {
|
|
1057
|
+
let e = [];
|
|
1058
|
+
for (let n of t(Ii)) for (let t of n.points ?? []) e.push([
|
|
1059
|
+
n.label,
|
|
1060
|
+
R(t.x),
|
|
1061
|
+
R(t.y),
|
|
1062
|
+
t.r == null ? "" : R(t.r)
|
|
1063
|
+
]);
|
|
1064
|
+
return {
|
|
1065
|
+
cols: [
|
|
1066
|
+
"Series",
|
|
1067
|
+
"X",
|
|
1068
|
+
"Y",
|
|
1069
|
+
"Size"
|
|
1070
|
+
],
|
|
1071
|
+
rows: e
|
|
1072
|
+
};
|
|
1073
|
+
}
|
|
1074
|
+
if (t(go)) return {
|
|
1075
|
+
cols: [
|
|
1076
|
+
t(L).type === "chord" ? "Group" : "Category",
|
|
1077
|
+
"Series",
|
|
1078
|
+
"Value"
|
|
1079
|
+
],
|
|
1080
|
+
rows: t(W).arcs.map((e) => [
|
|
1081
|
+
e.nodePath ? e.nodePath.join(" / ") : e.label,
|
|
1082
|
+
e.series,
|
|
1083
|
+
R(e.value)
|
|
1084
|
+
])
|
|
1085
|
+
};
|
|
1086
|
+
if (t(_o)) return {
|
|
1087
|
+
cols: [
|
|
1088
|
+
"Category",
|
|
1089
|
+
"Value",
|
|
1090
|
+
"Target"
|
|
1091
|
+
],
|
|
1092
|
+
rows: t(W).bullets.map((e) => [
|
|
1093
|
+
e.label,
|
|
1094
|
+
R(e.value),
|
|
1095
|
+
e.target == null ? "" : R(e.target)
|
|
1096
|
+
])
|
|
1097
|
+
};
|
|
1098
|
+
if (t(Na)) {
|
|
1099
|
+
let e = [];
|
|
1100
|
+
for (let n of t(Ii)) (n.ohlc ?? []).forEach((r, i) => {
|
|
1101
|
+
r && e.push([
|
|
1102
|
+
t(L).categories[i] ?? String(i),
|
|
1103
|
+
n.label,
|
|
1104
|
+
R(r.o),
|
|
1105
|
+
R(r.h),
|
|
1106
|
+
R(r.l),
|
|
1107
|
+
R(r.c)
|
|
1108
|
+
]);
|
|
1109
|
+
});
|
|
1110
|
+
return {
|
|
1111
|
+
cols: [
|
|
1112
|
+
"Date",
|
|
1113
|
+
"Series",
|
|
1114
|
+
"Open",
|
|
1115
|
+
"High",
|
|
1116
|
+
"Low",
|
|
1117
|
+
"Close"
|
|
1118
|
+
],
|
|
1119
|
+
rows: e
|
|
1120
|
+
};
|
|
1121
|
+
}
|
|
1122
|
+
if (t(L).type === "waterfall") {
|
|
1123
|
+
let e = t(Ii)[0];
|
|
1124
|
+
return {
|
|
1125
|
+
cols: ["Category", e?.label ?? "Value"],
|
|
1126
|
+
rows: t(L).categories.map((n, r) => {
|
|
1127
|
+
let i = t(W).bars.find((e) => e.index === r);
|
|
1128
|
+
return [n, i ? R(i.value) : is(e?.values[r])];
|
|
1129
|
+
})
|
|
1130
|
+
};
|
|
1131
|
+
}
|
|
1132
|
+
return {
|
|
1133
|
+
cols: ["Category", ...t(Ii).map((e) => e.label)],
|
|
1134
|
+
rows: t(L).categories.map((e, n) => [e, ...t(Ii).map((e) => is(e.values[n], e.label))])
|
|
1135
|
+
};
|
|
1136
|
+
}), os = D(() => t(as).rows.length > jo), ss = D(() => t(os) ? t(as).rows.slice(0, jo) : t(as).rows);
|
|
1137
|
+
function cs(e, t = 12) {
|
|
1138
|
+
return e.length > t ? e.slice(0, t - 1) + "…" : e;
|
|
1139
|
+
}
|
|
1140
|
+
let ls = (e, t) => u.formatValue ? u.formatValue(e) : t, us = v(null);
|
|
1141
|
+
function ds(e) {
|
|
1142
|
+
if (!e) return !1;
|
|
1143
|
+
let t = 0, n = 0, r = 0, i = e.trim().startsWith("#") ? e.trim().slice(1) : "";
|
|
1144
|
+
if (i.length === 6) t = parseInt(i.slice(0, 2), 16), n = parseInt(i.slice(2, 4), 16), r = parseInt(i.slice(4, 6), 16);
|
|
1145
|
+
else {
|
|
1146
|
+
let i = /rgba?\(([^)]+)\)/.exec(e);
|
|
1147
|
+
if (!i) return !1;
|
|
1148
|
+
let a = i[1].split(",").map((e) => parseFloat(e));
|
|
1149
|
+
t = a[0] ?? 0, n = a[1] ?? 0, r = a[2] ?? 0;
|
|
1150
|
+
}
|
|
1151
|
+
return .299 * t + .587 * n + .114 * r < 128;
|
|
1152
|
+
}
|
|
1153
|
+
g(() => {
|
|
1154
|
+
if (!t(us) || typeof window > "u") return;
|
|
1155
|
+
let e = t(us), n = () => {
|
|
1156
|
+
let n = getComputedStyle(e);
|
|
1157
|
+
b(to, ds(n.getPropertyValue("--sg-bg")), !0);
|
|
1158
|
+
let r = [];
|
|
1159
|
+
for (let e = 1; e <= 8; e += 1) {
|
|
1160
|
+
let t = n.getPropertyValue(`--sg-chart-${e}`).trim();
|
|
1161
|
+
r.push(t || me[e - 1]);
|
|
1162
|
+
}
|
|
1163
|
+
(!t(Mi) || r.some((e, n) => e !== t(Mi)[n])) && b(Mi, r.some((e, t) => e !== me[t]) ? r : null, !0);
|
|
1164
|
+
};
|
|
1165
|
+
n();
|
|
1166
|
+
let r = new MutationObserver(n);
|
|
1167
|
+
return r.observe(document.documentElement, {
|
|
1168
|
+
attributes: !0,
|
|
1169
|
+
attributeFilter: [
|
|
1170
|
+
"data-theme",
|
|
1171
|
+
"class",
|
|
1172
|
+
"style"
|
|
1173
|
+
]
|
|
1174
|
+
}), () => r.disconnect();
|
|
1175
|
+
});
|
|
1176
|
+
let X = v(null), fs = v(null), ps = v(null);
|
|
1177
|
+
function Z(e, n, r, i, a) {
|
|
1178
|
+
if (!ue() || !t(us) || i.length === 0 || t(fs) && t(X)) return;
|
|
1179
|
+
let o = t(us).getBoundingClientRect(), s = {
|
|
1180
|
+
category: r,
|
|
1181
|
+
index: -1,
|
|
1182
|
+
rows: i,
|
|
1183
|
+
...a
|
|
1184
|
+
}, c = u.tooltipFormat?.(s), l = Oe() !== "follow", d, f;
|
|
1185
|
+
if (l && t(z)) {
|
|
1186
|
+
let e = t(z).getBoundingClientRect(), n = e.width / (t(W).width || 1), r = e.height / (t(W).height || 1), i = Oe() === "top-right" || Oe() === "bottom-right", a = Oe() === "bottom-left" || Oe() === "bottom-right";
|
|
1187
|
+
d = e.left - o.left + (i ? (t(W).plot.x + t(W).plot.w) * n - 8 : t(W).plot.x * n + 8), f = e.top - o.top + (a ? (t(W).plot.y + t(W).plot.h) * r - 8 : t(W).plot.y * r + 8);
|
|
1188
|
+
} else d = Math.max(70, Math.min(o.width - 70, e - o.left)), f = n - o.top;
|
|
1189
|
+
b(X, {
|
|
1190
|
+
left: d,
|
|
1191
|
+
top: f,
|
|
1192
|
+
below: !l && f < 44,
|
|
1193
|
+
fixed: l,
|
|
1194
|
+
title: c?.title ?? r,
|
|
1195
|
+
rows: c?.rows ?? i,
|
|
1196
|
+
ctx: s
|
|
1197
|
+
}, !0), zo({
|
|
1198
|
+
category: s.category,
|
|
1199
|
+
index: s.index,
|
|
1200
|
+
series: s.series ?? null,
|
|
1201
|
+
value: s.value ?? null
|
|
1202
|
+
});
|
|
1203
|
+
}
|
|
1204
|
+
function ms(e, n) {
|
|
1205
|
+
let r = null, i = Infinity;
|
|
1206
|
+
for (let a of t(W).lines) {
|
|
1207
|
+
let t = a.points[e];
|
|
1208
|
+
if (!t?.defined) continue;
|
|
1209
|
+
let o = Math.abs(t.y - n);
|
|
1210
|
+
o < i && (i = o, r = a.label);
|
|
1211
|
+
}
|
|
1212
|
+
for (let a of t(W).bars) {
|
|
1213
|
+
if (a.label !== t(U).categories[e]) continue;
|
|
1214
|
+
let o = n < a.y ? a.y - n : n > a.y + a.h ? n - (a.y + a.h) : 0;
|
|
1215
|
+
o < i && (i = o, r = a.series);
|
|
1216
|
+
}
|
|
1217
|
+
for (let a of t(W).candles) {
|
|
1218
|
+
if (a.label !== t(U).categories[e]) continue;
|
|
1219
|
+
let o = n < a.yHigh ? a.yHigh - n : n > a.yLow ? n - a.yLow : 0;
|
|
1220
|
+
o < i && (i = o, r = a.series);
|
|
1221
|
+
}
|
|
1222
|
+
return r === null ? null : {
|
|
1223
|
+
label: r,
|
|
1224
|
+
distance: i
|
|
1225
|
+
};
|
|
1226
|
+
}
|
|
1227
|
+
function hs(e) {
|
|
1228
|
+
let n = [];
|
|
1229
|
+
if (t(L).type === "waterfall") {
|
|
1230
|
+
let r = t(W).bars.find((t) => t.index === e), i = t(U).series[0];
|
|
1231
|
+
return r && i && n.push({
|
|
1232
|
+
label: i.label,
|
|
1233
|
+
color: r.color,
|
|
1234
|
+
value: R(r.value)
|
|
1235
|
+
}), n;
|
|
1236
|
+
}
|
|
1237
|
+
for (let r of t(U).series) {
|
|
1238
|
+
let t = r.color, i = r.ohlc?.[e];
|
|
1239
|
+
if (i) {
|
|
1240
|
+
n.push({
|
|
1241
|
+
label: `${r.label} O`,
|
|
1242
|
+
color: t,
|
|
1243
|
+
value: R(i.o)
|
|
1244
|
+
}), n.push({
|
|
1245
|
+
label: `${r.label} H`,
|
|
1246
|
+
value: R(i.h)
|
|
1247
|
+
}), n.push({
|
|
1248
|
+
label: `${r.label} L`,
|
|
1249
|
+
value: R(i.l)
|
|
1250
|
+
}), n.push({
|
|
1251
|
+
label: `${r.label} C`,
|
|
1252
|
+
value: R(i.c)
|
|
1253
|
+
});
|
|
1254
|
+
continue;
|
|
1255
|
+
}
|
|
1256
|
+
let a = r.boxes?.[e];
|
|
1257
|
+
if (a) {
|
|
1258
|
+
n.push({
|
|
1259
|
+
label: `${r.label} max`,
|
|
1260
|
+
color: t,
|
|
1261
|
+
value: R(a.max)
|
|
1262
|
+
}), n.push({
|
|
1263
|
+
label: `${r.label} Q3`,
|
|
1264
|
+
value: R(a.q3)
|
|
1265
|
+
}), n.push({
|
|
1266
|
+
label: `${r.label} median`,
|
|
1267
|
+
value: R(a.median)
|
|
1268
|
+
}), n.push({
|
|
1269
|
+
label: `${r.label} Q1`,
|
|
1270
|
+
value: R(a.q1)
|
|
1271
|
+
}), n.push({
|
|
1272
|
+
label: `${r.label} min`,
|
|
1273
|
+
value: R(a.min)
|
|
1274
|
+
}), a.outliers?.length && n.push({
|
|
1275
|
+
label: `${r.label} outliers`,
|
|
1276
|
+
value: String(a.outliers.length)
|
|
1277
|
+
});
|
|
1278
|
+
continue;
|
|
1279
|
+
}
|
|
1280
|
+
let o = r.values[e], s = ki(r.label), c = r.lowValues?.[e];
|
|
1281
|
+
if (Number.isFinite(o) && Number.isFinite(c)) {
|
|
1282
|
+
n.push({
|
|
1283
|
+
label: r.label,
|
|
1284
|
+
color: t,
|
|
1285
|
+
value: `${s(c)} to ${s(o)}`
|
|
1286
|
+
});
|
|
1287
|
+
continue;
|
|
1288
|
+
}
|
|
1289
|
+
let l = r.targets?.[e];
|
|
1290
|
+
if (Number.isFinite(o) && Number.isFinite(l)) {
|
|
1291
|
+
n.push({
|
|
1292
|
+
label: r.label,
|
|
1293
|
+
color: t,
|
|
1294
|
+
value: s(o)
|
|
1295
|
+
}), n.push({
|
|
1296
|
+
label: `${r.label} target`,
|
|
1297
|
+
value: s(l)
|
|
1298
|
+
});
|
|
1299
|
+
continue;
|
|
1300
|
+
}
|
|
1301
|
+
if (Number.isFinite(o)) {
|
|
1302
|
+
n.push({
|
|
1303
|
+
label: r.label,
|
|
1304
|
+
color: t,
|
|
1305
|
+
value: s(o)
|
|
1306
|
+
});
|
|
1307
|
+
let i = r.errors?.[e];
|
|
1308
|
+
if (i != null) {
|
|
1309
|
+
let e = typeof i == "number" ? o - Math.abs(i) : Math.min(i.lo, i.hi), t = typeof i == "number" ? o + Math.abs(i) : Math.max(i.lo, i.hi);
|
|
1310
|
+
Number.isFinite(e) && Number.isFinite(t) && n.push({
|
|
1311
|
+
label: `${r.label} range`,
|
|
1312
|
+
value: `${s(e)} - ${s(t)}`
|
|
1313
|
+
});
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
for (let r of t(W).overlays) {
|
|
1318
|
+
let i = r.points[e];
|
|
1319
|
+
if (!i?.defined) continue;
|
|
1320
|
+
let a = t(U).series.find((e) => e.overlay && r.label === `${e.label} (${e.overlay})`);
|
|
1321
|
+
if (!a?.overlay) continue;
|
|
1322
|
+
let o = r.r2 === void 0 ? "" : ` (${F(t(I).rSquared, { value: r.r2.toFixed(2) })})`;
|
|
1323
|
+
n.push({
|
|
1324
|
+
label: `${a.label} ${fe(a.overlay)}`,
|
|
1325
|
+
color: r.color,
|
|
1326
|
+
value: `${ki(a.label)(i.value)}${o}`
|
|
1327
|
+
});
|
|
1328
|
+
}
|
|
1329
|
+
return n;
|
|
1330
|
+
}
|
|
1331
|
+
let gs = v(null);
|
|
1332
|
+
function _s(e) {
|
|
1333
|
+
let n = t(W).axes?.y, r = n ? Math.abs(n.max - n.min) : 100, i = r >= 100 ? 0 : r >= 10 ? 1 : r >= 1 ? 2 : 3, a = Number(e.toFixed(i)), o = t(L).yAxis;
|
|
1334
|
+
return o?.formatter ? o.formatter(a, -1) : o?.format ? de(a, o.format, t(L)) : ls(a, R(a));
|
|
1335
|
+
}
|
|
1336
|
+
let vs = D(() => t(L).xType === "time" || t(L).xType === "ordinal-time" || t(L).xAxis?.type === "time" || t(L).xAxis?.type === "ordinal-time"), ys = D(() => t(vs) ? pe(t(U).categories.map((e) => Date.parse(e))) : "day"), bs = (e) => {
|
|
1337
|
+
let t = Date.parse(e);
|
|
1338
|
+
return Number.isFinite(t) ? he(t) : e;
|
|
1339
|
+
};
|
|
1340
|
+
function xs(e) {
|
|
1341
|
+
let n = t(U).categories[e] ?? "";
|
|
1342
|
+
if (!t(vs)) return n;
|
|
1343
|
+
let r = Date.parse(n);
|
|
1344
|
+
return Number.isFinite(r) ? t(L).xAxis?.formatter ? t(L).xAxis.formatter(r, e) : he(r, t(ys)) : n;
|
|
1345
|
+
}
|
|
1346
|
+
function Ss(e, n, r, i) {
|
|
1347
|
+
b(ps, r, !0);
|
|
1348
|
+
let a = ia({
|
|
1349
|
+
clientX: e,
|
|
1350
|
+
clientY: n
|
|
1351
|
+
})?.y;
|
|
1352
|
+
b(gs, a != null && Number.isFinite(a) && a >= t(W).plot.y && a <= t(W).plot.y + t(W).plot.h ? a : null, !0);
|
|
1353
|
+
let o = t(U).categories[r] ?? "", s = hs(r), c, l, d = t(Y) && t(U).series.some((e) => e.label === t(Y)) ? t(Y) : null;
|
|
1354
|
+
if (d) c = d, l = t(U).series.find((e) => e.label === d)?.values[r], s = s.filter((e) => e.label === d || e.label?.startsWith(d + " "));
|
|
1355
|
+
else {
|
|
1356
|
+
let a = i ? Mo(e, n, i) : ia({
|
|
1357
|
+
clientX: e,
|
|
1358
|
+
clientY: n
|
|
1359
|
+
}), o = a && Number.isFinite(a.y) ? ms(r, a.y) : null;
|
|
1360
|
+
b(Io, o && o.distance <= 18 ? o.label : null, !0), Te() === "single" && o && i && (c = o.label, l = t(U).series.find((e) => e.label === o.label)?.values[r], s = s.filter((e) => e.label === o.label || e.label?.startsWith(o.label + " ")));
|
|
1361
|
+
}
|
|
1362
|
+
if (Z(e, n, xs(r), s, {
|
|
1363
|
+
category: o,
|
|
1364
|
+
index: r,
|
|
1365
|
+
series: c,
|
|
1366
|
+
value: l
|
|
1367
|
+
}), u.syncGroup && !t(Ki)) {
|
|
1368
|
+
let e = Date.parse(o);
|
|
1369
|
+
Re(u.syncGroup, {
|
|
1370
|
+
label: o,
|
|
1371
|
+
index: (M() ? M().i0 : 0) + r,
|
|
1372
|
+
time: Number.isFinite(e) ? e : null,
|
|
1373
|
+
from: Ui
|
|
1374
|
+
});
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
function Cs(e, n) {
|
|
1378
|
+
let r = e.getBoundingClientRect();
|
|
1379
|
+
if (Ss(r.left + r.width / 2, r.top + 12, n), !Ke()) return;
|
|
1380
|
+
let i = xs(n);
|
|
1381
|
+
if (t(Y)) {
|
|
1382
|
+
let e = t(U).series.find((e) => e.label === t(Y))?.values[n];
|
|
1383
|
+
b(Wo, F(t(I).seriesAtCategory, {
|
|
1384
|
+
series: t(Y),
|
|
1385
|
+
value: Number.isFinite(e) ? ki(t(Y))(e) : t(I).noValue,
|
|
1386
|
+
category: i
|
|
1387
|
+
}), !0);
|
|
1388
|
+
} else b(Wo, `${i}: ${hs(n).map((e) => `${e.label ?? ""} ${e.value}`).join(", ")}`);
|
|
1389
|
+
}
|
|
1390
|
+
function Q() {
|
|
1391
|
+
t(fs) || (b(ps, null), b(gs, null), b(Io, null), b(X, null), zo(null), u.syncGroup && !t(Ki) && t(Gi)?.hover?.from === Ui && Re(u.syncGroup, null));
|
|
1392
|
+
}
|
|
1393
|
+
g(() => {
|
|
1394
|
+
if (!t(Gi)) return;
|
|
1395
|
+
let e = t(Gi).hover;
|
|
1396
|
+
oe(() => {
|
|
1397
|
+
if (!e) {
|
|
1398
|
+
t(Ki) && (b(Ki, !1), b(ps, null), b(X, null));
|
|
1399
|
+
return;
|
|
1400
|
+
}
|
|
1401
|
+
if (e.from === Ui) return;
|
|
1402
|
+
let n = t(U).categories.indexOf(e.label);
|
|
1403
|
+
if (n < 0 && e.time != null && (n = Ie(t(U).categories, e.time)), n < 0 || !t(z) || !t(mo)) return;
|
|
1404
|
+
b(Ki, !0);
|
|
1405
|
+
let r = t(z).getBoundingClientRect(), i = r.width / t(W).width, a = r.height / t(W).height, o = t(mo).xOf(n);
|
|
1406
|
+
Ss(r.left + o * i, r.top + (t(W).plot.y + 12) * a, n), b(Ki, !0);
|
|
1407
|
+
});
|
|
1408
|
+
}), g(() => {
|
|
1409
|
+
if (!t(Gi)) return;
|
|
1410
|
+
let e = t(Gi).zoom;
|
|
1411
|
+
oe(() => {
|
|
1412
|
+
if (!e || e.from === Ui) return;
|
|
1413
|
+
let n = t(L).categories.length, r = e.window;
|
|
1414
|
+
if (r && e.count !== n) {
|
|
1415
|
+
if (!e.labels) return;
|
|
1416
|
+
let i = Ie(t(L).categories, Date.parse(e.labels[0])), a = Ie(t(L).categories, Date.parse(e.labels[1]));
|
|
1417
|
+
if (i < 0 || a < 0) return;
|
|
1418
|
+
r = i === 0 && a === n - 1 ? null : {
|
|
1419
|
+
i0: Math.min(i, a),
|
|
1420
|
+
i1: Math.max(i, a)
|
|
1421
|
+
};
|
|
1422
|
+
}
|
|
1423
|
+
Wi = !0;
|
|
1424
|
+
try {
|
|
1425
|
+
Hi(r);
|
|
1426
|
+
} finally {
|
|
1427
|
+
Wi = !1;
|
|
1428
|
+
}
|
|
1429
|
+
});
|
|
1430
|
+
});
|
|
1431
|
+
function ws(e, t, n, r, i) {
|
|
1432
|
+
Z(e, t, n, [{ value: `${R(r)} · ${i.toFixed(1)}%` }], {
|
|
1433
|
+
series: n,
|
|
1434
|
+
value: r
|
|
1435
|
+
});
|
|
1436
|
+
}
|
|
1437
|
+
function Ts(e, n, r) {
|
|
1438
|
+
b(Io, r.series, !0);
|
|
1439
|
+
let i = [{
|
|
1440
|
+
label: "x",
|
|
1441
|
+
value: R(r.x)
|
|
1442
|
+
}, {
|
|
1443
|
+
label: "y",
|
|
1444
|
+
value: R(r.y)
|
|
1445
|
+
}], a = t(U).series.find((e) => e.label === r.series && e.overlay), o = a?.overlay ? t(W).overlays.find((e) => e.label === `${a.label} (${a.overlay})`) : void 0;
|
|
1446
|
+
if (a?.overlay && o) {
|
|
1447
|
+
let e = o.r2 === void 0 ? "" : ` (${F(t(I).rSquared, { value: o.r2.toFixed(2) })})`;
|
|
1448
|
+
i.push({
|
|
1449
|
+
label: fe(a.overlay),
|
|
1450
|
+
color: o.color,
|
|
1451
|
+
value: `${o.equation ?? ""}${e}`
|
|
1452
|
+
});
|
|
1453
|
+
}
|
|
1454
|
+
Z(e, n, r.label || r.series, i, {
|
|
1455
|
+
series: r.series,
|
|
1456
|
+
value: r.y
|
|
1457
|
+
});
|
|
1458
|
+
}
|
|
1459
|
+
function Es(e, t, n) {
|
|
1460
|
+
Z(e, t, `${n.rowLabel} · ${n.colLabel}`, [{
|
|
1461
|
+
color: n.color,
|
|
1462
|
+
value: R(n.value)
|
|
1463
|
+
}]);
|
|
1464
|
+
}
|
|
1465
|
+
function Ds(e, t, n) {
|
|
1466
|
+
let r = [{ value: R(n.value) }, {
|
|
1467
|
+
label: "conversion",
|
|
1468
|
+
value: `${(n.conversion * 100).toFixed(1)}%`
|
|
1469
|
+
}];
|
|
1470
|
+
n.dropoff > 0 && r.push({
|
|
1471
|
+
label: "drop-off",
|
|
1472
|
+
value: `${(n.dropoff * 100).toFixed(1)}%`
|
|
1473
|
+
}), Z(e, t, n.label, r, { value: n.value });
|
|
1474
|
+
}
|
|
1475
|
+
function Os(e, n, r) {
|
|
1476
|
+
b(Io, t(vo) || t(L).type === "sunburst" || t(L).type === "chord" ? r.label : r.series, !0), Z(e, n, r.series ? `${r.label} \u00b7 ${r.series}` : r.label, [{
|
|
1477
|
+
color: r.color,
|
|
1478
|
+
value: R(r.value)
|
|
1479
|
+
}], {
|
|
1480
|
+
category: r.label,
|
|
1481
|
+
series: r.series || void 0,
|
|
1482
|
+
value: r.value
|
|
1483
|
+
});
|
|
1484
|
+
}
|
|
1485
|
+
function ks(e, t, n) {
|
|
1486
|
+
Z(e, t, `${n.source} \u2192 ${n.target}`, [{
|
|
1487
|
+
color: n.color,
|
|
1488
|
+
value: R(n.value)
|
|
1489
|
+
}], {
|
|
1490
|
+
category: n.source,
|
|
1491
|
+
series: n.target,
|
|
1492
|
+
value: n.value
|
|
1493
|
+
});
|
|
1494
|
+
}
|
|
1495
|
+
function As(e, t, n) {
|
|
1496
|
+
b(Io, n.series, !0);
|
|
1497
|
+
let r = [{
|
|
1498
|
+
color: n.color,
|
|
1499
|
+
label: n.series,
|
|
1500
|
+
value: R(n.value)
|
|
1501
|
+
}];
|
|
1502
|
+
n.target != null && r.push({
|
|
1503
|
+
label: "target",
|
|
1504
|
+
value: R(n.target)
|
|
1505
|
+
}), Z(e, t, n.label, r, {
|
|
1506
|
+
category: n.label,
|
|
1507
|
+
series: n.series,
|
|
1508
|
+
value: n.value
|
|
1509
|
+
});
|
|
1510
|
+
}
|
|
1511
|
+
function js(e, t, n) {
|
|
1512
|
+
b(Io, n.series, !0);
|
|
1513
|
+
let r = [{
|
|
1514
|
+
color: n.color,
|
|
1515
|
+
label: n.series,
|
|
1516
|
+
value: n.dumbbell && n.value2 != null ? `${R(n.value2)} to ${R(n.value)}` : R(n.value)
|
|
1517
|
+
}];
|
|
1518
|
+
Z(e, t, n.label, r, {
|
|
1519
|
+
category: n.label,
|
|
1520
|
+
series: n.series,
|
|
1521
|
+
value: n.value
|
|
1522
|
+
});
|
|
1523
|
+
}
|
|
1524
|
+
function Ms(e, t, n, r, i, a) {
|
|
1525
|
+
b(Io, n, !0), Z(e, t, `${n} · ${r}`, [{
|
|
1526
|
+
color: a,
|
|
1527
|
+
value: R(i)
|
|
1528
|
+
}], {
|
|
1529
|
+
category: r,
|
|
1530
|
+
series: n,
|
|
1531
|
+
value: i
|
|
1532
|
+
});
|
|
1533
|
+
}
|
|
1534
|
+
function Ns(e, n) {
|
|
1535
|
+
if (t(B)) return;
|
|
1536
|
+
je() && "clientX" in e && !t(Ei) && (t(fs) && t(fs).index === n ? Aa() : (b(fs, null), Ss(e.clientX, e.clientY, n, e.currentTarget), ja(n)));
|
|
1537
|
+
let r = t(U).categories[n] ?? "";
|
|
1538
|
+
if (!t(J)) {
|
|
1539
|
+
Ps(r, "", 0, n, e);
|
|
1540
|
+
return;
|
|
1541
|
+
}
|
|
1542
|
+
let i = "clientX" in e ? ia(e) : null, a = i ? ms(n, i.y) : null, o = t(Y) ?? a?.label ?? (t(U).series.length === 1 ? t(U).series[0].label : "");
|
|
1543
|
+
Ps(r, o, t(U).series.find((e) => e.label === o)?.values[n] ?? 0, n, e);
|
|
1544
|
+
}
|
|
1545
|
+
function Ps(e, n, r, i, a) {
|
|
1546
|
+
if (Uo(e, n, a, i), t(Ei) && u.onAnnotate && i !== void 0) {
|
|
1547
|
+
let a = n ? r : t(U).series[0]?.values[i];
|
|
1548
|
+
u.onAnnotate({
|
|
1549
|
+
category: e,
|
|
1550
|
+
index: i,
|
|
1551
|
+
value: Number.isFinite(a) ? a : 0
|
|
1552
|
+
});
|
|
1553
|
+
return;
|
|
1554
|
+
}
|
|
1555
|
+
let o;
|
|
1556
|
+
if (i !== void 0) {
|
|
1557
|
+
let e = [];
|
|
1558
|
+
for (let r of t(U).series) {
|
|
1559
|
+
if (!r.rowIds || n && r.label !== n) continue;
|
|
1560
|
+
let t = r.rowIds[i];
|
|
1561
|
+
t?.length && e.push(t);
|
|
1562
|
+
}
|
|
1563
|
+
e.length && (o = e.flat());
|
|
1564
|
+
}
|
|
1565
|
+
let s = {
|
|
1566
|
+
category: e,
|
|
1567
|
+
series: n,
|
|
1568
|
+
value: r,
|
|
1569
|
+
rowIds: o
|
|
1570
|
+
};
|
|
1571
|
+
u.onSelect?.(s), o && o.length && u.onDrill?.(s);
|
|
1572
|
+
}
|
|
1573
|
+
function Fs(e, t) {
|
|
1574
|
+
let n = e.ownerSVGElement ?? e.closest("svg");
|
|
1575
|
+
if (!n) return;
|
|
1576
|
+
let r = n.querySelector(`[data-cat-index="${t}"]`);
|
|
1577
|
+
r && (r.focus?.(), Cs(r, t));
|
|
1578
|
+
}
|
|
1579
|
+
function Is(e, n) {
|
|
1580
|
+
if (Ys(e, n)) return;
|
|
1581
|
+
let r = t(U).categories.length - 1, i = e.currentTarget;
|
|
1582
|
+
if (Hs(e, n)) return;
|
|
1583
|
+
let a = t(K) ? "ArrowDown" : "ArrowRight", o = t(K) ? "ArrowUp" : "ArrowLeft", s = t(K) ? "ArrowRight" : "ArrowUp", c = t(K) ? "ArrowLeft" : "ArrowDown";
|
|
1584
|
+
switch (e.key) {
|
|
1585
|
+
case a:
|
|
1586
|
+
e.preventDefault(), Fs(i, Math.min(r, n + 1));
|
|
1587
|
+
return;
|
|
1588
|
+
case o:
|
|
1589
|
+
e.preventDefault(), Fs(i, Math.max(0, n - 1));
|
|
1590
|
+
return;
|
|
1591
|
+
case s:
|
|
1592
|
+
case c: {
|
|
1593
|
+
e.preventDefault();
|
|
1594
|
+
let r = t(U).series.map((e) => e.label);
|
|
1595
|
+
if (!r.length) return;
|
|
1596
|
+
let a = (t(Y) ? r.indexOf(t(Y)) : -1) + (e.key === c ? 1 : -1);
|
|
1597
|
+
b(Y, a < 0 || a >= r.length ? null : r[a], !0), b(Ni, t(Y), !0), Cs(i, n);
|
|
1598
|
+
return;
|
|
1599
|
+
}
|
|
1600
|
+
case "Home":
|
|
1601
|
+
e.preventDefault(), Fs(i, 0);
|
|
1602
|
+
return;
|
|
1603
|
+
case "End":
|
|
1604
|
+
e.preventDefault(), Fs(i, r);
|
|
1605
|
+
return;
|
|
1606
|
+
case "PageDown":
|
|
1607
|
+
e.preventDefault(), Fs(i, Math.min(r, n + Math.max(1, Math.floor(r / 10))));
|
|
1608
|
+
return;
|
|
1609
|
+
case "PageUp":
|
|
1610
|
+
e.preventDefault(), Fs(i, Math.max(0, n - Math.max(1, Math.floor(r / 10))));
|
|
1611
|
+
return;
|
|
1612
|
+
case "Enter":
|
|
1613
|
+
case " ":
|
|
1614
|
+
if (!u.onSelect && !t(J)) return;
|
|
1615
|
+
e.preventDefault(), Ns(e, n);
|
|
1616
|
+
return;
|
|
1617
|
+
case "Escape":
|
|
1618
|
+
t(Y) && (b(Y, null), b(Ni, null), Cs(i, n));
|
|
1619
|
+
return;
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
let Ls = v(se({
|
|
1623
|
+
sel: "",
|
|
1624
|
+
i: 0
|
|
1625
|
+
})), Rs = (e, n) => ue() ? (t(Ls).sel === e ? t(Ls).i : 0) === n ? 0 : -1 : void 0;
|
|
1626
|
+
function zs(e, n) {
|
|
1627
|
+
(t(Ls).sel !== e || t(Ls).i !== n) && b(Ls, {
|
|
1628
|
+
sel: e,
|
|
1629
|
+
i: n
|
|
1630
|
+
}, !0);
|
|
1631
|
+
}
|
|
1632
|
+
function Bs(e, t, n, r, i) {
|
|
1633
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
1634
|
+
r && (e.preventDefault(), r());
|
|
1635
|
+
return;
|
|
1636
|
+
}
|
|
1637
|
+
let a = e.currentTarget, o = a.ownerSVGElement ?? a.closest("svg");
|
|
1638
|
+
if (!o) return;
|
|
1639
|
+
let s = o.querySelectorAll(t), c = s.length;
|
|
1640
|
+
if (!c) return;
|
|
1641
|
+
let l = i && i.colMajor ? i.cols : 1, u = i ? i.colMajor ? 1 : i.cols : 1, d;
|
|
1642
|
+
switch (e.key) {
|
|
1643
|
+
case "ArrowRight":
|
|
1644
|
+
d = n + l;
|
|
1645
|
+
break;
|
|
1646
|
+
case "ArrowLeft":
|
|
1647
|
+
d = n - l;
|
|
1648
|
+
break;
|
|
1649
|
+
case "ArrowDown":
|
|
1650
|
+
d = n + u;
|
|
1651
|
+
break;
|
|
1652
|
+
case "ArrowUp":
|
|
1653
|
+
d = n - u;
|
|
1654
|
+
break;
|
|
1655
|
+
case "Home":
|
|
1656
|
+
d = 0;
|
|
1657
|
+
break;
|
|
1658
|
+
case "End":
|
|
1659
|
+
d = c - 1;
|
|
1660
|
+
break;
|
|
1661
|
+
case "PageDown":
|
|
1662
|
+
d = n + Math.max(1, Math.floor(c / 10));
|
|
1663
|
+
break;
|
|
1664
|
+
case "PageUp":
|
|
1665
|
+
d = n - Math.max(1, Math.floor(c / 10));
|
|
1666
|
+
break;
|
|
1667
|
+
default: return;
|
|
1668
|
+
}
|
|
1669
|
+
e.preventDefault(), d = Math.max(0, Math.min(c - 1, d)), d !== n && (b(Ls, {
|
|
1670
|
+
sel: t,
|
|
1671
|
+
i: d
|
|
1672
|
+
}, !0), s[d].focus?.());
|
|
1673
|
+
}
|
|
1674
|
+
let Vs = (e) => {
|
|
1675
|
+
let t = e.getBoundingClientRect();
|
|
1676
|
+
return {
|
|
1677
|
+
x: t.left + t.width / 2,
|
|
1678
|
+
y: t.top
|
|
1679
|
+
};
|
|
1680
|
+
};
|
|
1681
|
+
function Hs(e, n) {
|
|
1682
|
+
if (!t(Ci) || !t(G)) return !1;
|
|
1683
|
+
let r = t(L).categories.length, i = (M()?.i0 ?? 0) + n, o, s = t(K) ? "ArrowDown" : "ArrowRight", c = t(K) ? "ArrowUp" : "ArrowLeft";
|
|
1684
|
+
if (e.key === "+" || e.key === "=") o = Me(M(), r, i, .8);
|
|
1685
|
+
else if (e.key === "-" || e.key === "_") o = Me(M(), r, i, 1.25);
|
|
1686
|
+
else if (e.key === "0") o = null;
|
|
1687
|
+
else if (e.shiftKey && M() && (e.key === s || e.key === c)) {
|
|
1688
|
+
let t = M().i1 - M().i0 + 1;
|
|
1689
|
+
o = Ne(M(), r, (e.key === s ? 1 : -1) * Math.max(1, Math.floor(t / 10)));
|
|
1690
|
+
}
|
|
1691
|
+
if (o === void 0) return !1;
|
|
1692
|
+
e.preventDefault(), Hi(o);
|
|
1693
|
+
let l = Math.max(0, Math.min(o ? o.i1 - o.i0 : r - 1, i - (o?.i0 ?? 0)));
|
|
1694
|
+
return a().then(() => {
|
|
1695
|
+
let e = t(z)?.querySelector(t(Oo) ? "[data-dense=\"true\"]" : `[data-cat-index="${l}"]`);
|
|
1696
|
+
e && (e.focus?.(), t(Oo) && b(Po, l, !0), Cs(e, l));
|
|
1697
|
+
}), !0;
|
|
1698
|
+
}
|
|
1699
|
+
function Us(e) {
|
|
1700
|
+
let n = t(L).categories.length;
|
|
1701
|
+
if (!n) return;
|
|
1702
|
+
let r = M() ?? {
|
|
1703
|
+
i0: 0,
|
|
1704
|
+
i1: n - 1
|
|
1705
|
+
}, i = r.i1 - r.i0 + 1, a = (r.i0 + r.i1) / 2, o = e.shiftKey ? i : Math.max(1, Math.floor(i / 10)), s;
|
|
1706
|
+
switch (e.key) {
|
|
1707
|
+
case "ArrowRight":
|
|
1708
|
+
s = Ne(M(), n, o);
|
|
1709
|
+
break;
|
|
1710
|
+
case "ArrowLeft":
|
|
1711
|
+
s = Ne(M(), n, -o);
|
|
1712
|
+
break;
|
|
1713
|
+
case "ArrowUp":
|
|
1714
|
+
case "+":
|
|
1715
|
+
case "=":
|
|
1716
|
+
s = Me(M(), n, a, .8);
|
|
1717
|
+
break;
|
|
1718
|
+
case "ArrowDown":
|
|
1719
|
+
case "-":
|
|
1720
|
+
case "_":
|
|
1721
|
+
s = Me(M(), n, a, 1.25);
|
|
1722
|
+
break;
|
|
1723
|
+
case "Home":
|
|
1724
|
+
s = M() ? {
|
|
1725
|
+
...M(),
|
|
1726
|
+
i0: 0,
|
|
1727
|
+
i1: i - 1
|
|
1728
|
+
} : null;
|
|
1729
|
+
break;
|
|
1730
|
+
case "End":
|
|
1731
|
+
s = M() ? {
|
|
1732
|
+
...M(),
|
|
1733
|
+
i0: n - i,
|
|
1734
|
+
i1: n - 1
|
|
1735
|
+
} : null;
|
|
1736
|
+
break;
|
|
1737
|
+
case "0":
|
|
1738
|
+
case "Escape":
|
|
1739
|
+
s = null;
|
|
1740
|
+
break;
|
|
1741
|
+
default: return;
|
|
1742
|
+
}
|
|
1743
|
+
e.preventDefault(), Hi(s);
|
|
1744
|
+
}
|
|
1745
|
+
let Ws = v("idle"), Gs = v(null), Ks = v(null);
|
|
1746
|
+
function qs(e) {
|
|
1747
|
+
if (!P()) return;
|
|
1748
|
+
e.preventDefault();
|
|
1749
|
+
let n = t(G) && !t(yo) ? No(e.clientX, e.currentTarget) : null;
|
|
1750
|
+
Js(e.clientX, e.clientY, n);
|
|
1751
|
+
}
|
|
1752
|
+
function Js(e, n, r) {
|
|
1753
|
+
let i = r == null ? {} : {
|
|
1754
|
+
category: t(U).categories[r],
|
|
1755
|
+
index: (M() ? M().i0 : 0) + r,
|
|
1756
|
+
...t(Y) ? {
|
|
1757
|
+
series: t(Y),
|
|
1758
|
+
value: t(U).series.find((e) => e.label === t(Y))?.values[r]
|
|
1759
|
+
} : {}
|
|
1760
|
+
}, a = () => b(Gs, {
|
|
1761
|
+
x: e,
|
|
1762
|
+
y: n,
|
|
1763
|
+
target: i
|
|
1764
|
+
}, !0);
|
|
1765
|
+
t(Ks) ? a() : import("./SvChartMenu-CQNrQGT2.js").then((e) => {
|
|
1766
|
+
b(Ks, e.default, !0), a();
|
|
1767
|
+
});
|
|
1768
|
+
}
|
|
1769
|
+
function Ys(e, t) {
|
|
1770
|
+
if (!P() || !(e.key === "ContextMenu" || e.key === "F10" && e.shiftKey)) return !1;
|
|
1771
|
+
e.preventDefault();
|
|
1772
|
+
let n = e.currentTarget.getBoundingClientRect();
|
|
1773
|
+
return Js(n.left + n.width / 2, n.top + Math.min(n.height / 2, 24), t), !0;
|
|
1774
|
+
}
|
|
1775
|
+
let Xs = D(() => {
|
|
1776
|
+
if (!t(Gs)) return [];
|
|
1777
|
+
let e = [
|
|
1778
|
+
{
|
|
1779
|
+
label: t(I).downloadPng,
|
|
1780
|
+
onSelect: () => {
|
|
1781
|
+
ec("png");
|
|
1782
|
+
}
|
|
1783
|
+
},
|
|
1784
|
+
{
|
|
1785
|
+
label: t(I).downloadSvg,
|
|
1786
|
+
onSelect: () => {
|
|
1787
|
+
ec("svg");
|
|
1788
|
+
}
|
|
1789
|
+
},
|
|
1790
|
+
{
|
|
1791
|
+
label: t(I).downloadPdf,
|
|
1792
|
+
onSelect: () => {
|
|
1793
|
+
tc();
|
|
1794
|
+
}
|
|
1795
|
+
},
|
|
1796
|
+
...Ae(t(L)) ? [{
|
|
1797
|
+
label: t(I).downloadCsv,
|
|
1798
|
+
onSelect: () => {
|
|
1799
|
+
ke(t(L));
|
|
1800
|
+
}
|
|
1801
|
+
}] : [],
|
|
1802
|
+
{
|
|
1803
|
+
label: t(I).copyAsImage,
|
|
1804
|
+
onSelect: () => {
|
|
1805
|
+
rc();
|
|
1806
|
+
}
|
|
1807
|
+
},
|
|
1808
|
+
{
|
|
1809
|
+
label: t(I).print,
|
|
1810
|
+
onSelect: () => {
|
|
1811
|
+
nc();
|
|
1812
|
+
}
|
|
1813
|
+
},
|
|
1814
|
+
...qe() && t(ai) ? [{
|
|
1815
|
+
label: t(I).describeChart,
|
|
1816
|
+
onSelect: () => {
|
|
1817
|
+
oi();
|
|
1818
|
+
}
|
|
1819
|
+
}] : []
|
|
1820
|
+
];
|
|
1821
|
+
j() && t(Vi) && e.push({ separator: !0 }, {
|
|
1822
|
+
label: t(I).resetZoom,
|
|
1823
|
+
onSelect: Ji
|
|
1824
|
+
}), t(qo) && e.push({ separator: !0 }, {
|
|
1825
|
+
label: t(I).range,
|
|
1826
|
+
children: t(Ko).map((e) => ({
|
|
1827
|
+
label: Jo(e),
|
|
1828
|
+
onSelect: () => Yo(e)
|
|
1829
|
+
}))
|
|
1830
|
+
}), t(Xo) && t(Go).length > 1 && e.push({ separator: !0 }, {
|
|
1831
|
+
label: t(I).series,
|
|
1832
|
+
children: t(Go).map((e) => ({
|
|
1833
|
+
label: `${e.off ? " " : "✓"} ${e.label}`,
|
|
1834
|
+
onSelect: () => ns(e.label)
|
|
1835
|
+
}))
|
|
1836
|
+
});
|
|
1837
|
+
let n = typeof P() == "function" ? P()(t(Gs).target) : Array.isArray(P()) ? P() : [];
|
|
1838
|
+
return n.length && e.push({ separator: !0 }, ...n), e;
|
|
1839
|
+
});
|
|
1840
|
+
function Zs() {
|
|
1841
|
+
if (!t(z)) return null;
|
|
1842
|
+
let e = t(z).cloneNode(!0);
|
|
1843
|
+
e.setAttribute("xmlns", "http://www.w3.org/2000/svg"), e.removeAttribute("class");
|
|
1844
|
+
let n = t(z).getBoundingClientRect();
|
|
1845
|
+
n.width && e.setAttribute("width", String(Math.round(n.width))), n.height && e.setAttribute("height", String(Math.round(n.height)));
|
|
1846
|
+
let r = document.createElement("style"), i = Array.from(document.styleSheets), a = [];
|
|
1847
|
+
for (let e of i) try {
|
|
1848
|
+
for (let t of Array.from(e.cssRules ?? [])) {
|
|
1849
|
+
let e = t.cssText;
|
|
1850
|
+
e.includes(".sv-grid-chart") && a.push(e);
|
|
1851
|
+
}
|
|
1852
|
+
} catch {}
|
|
1853
|
+
if (r.textContent = a.join("\n"), e.insertBefore(r, e.firstChild), t(us) && typeof getComputedStyle == "function") {
|
|
1854
|
+
let n = getComputedStyle(t(us)), r = [
|
|
1855
|
+
"--sg-bg",
|
|
1856
|
+
"--sg-fg",
|
|
1857
|
+
"--sg-muted",
|
|
1858
|
+
"--sg-border",
|
|
1859
|
+
"--sg-accent",
|
|
1860
|
+
"--sg-chart-bg",
|
|
1861
|
+
"--sg-chart-font-scale"
|
|
1862
|
+
].map((e) => {
|
|
1863
|
+
let t = n.getPropertyValue(e).trim();
|
|
1864
|
+
return t ? `${e}:${t}` : "";
|
|
1865
|
+
}).filter(Boolean);
|
|
1866
|
+
n.fontFamily && r.push(`font-family:${n.fontFamily}`), r.length && e.setAttribute("style", r.join(";"));
|
|
1867
|
+
}
|
|
1868
|
+
return new XMLSerializer().serializeToString(e);
|
|
1869
|
+
}
|
|
1870
|
+
function Qs(e, t) {
|
|
1871
|
+
let n = URL.createObjectURL(e), r = document.createElement("a");
|
|
1872
|
+
r.href = n, r.download = t, document.body.appendChild(r), r.click(), r.remove(), setTimeout(() => URL.revokeObjectURL(n), 1e3);
|
|
1873
|
+
}
|
|
1874
|
+
async function $s(e) {
|
|
1875
|
+
return new Promise((n) => {
|
|
1876
|
+
let r = t(z)?.getBoundingClientRect(), i = Math.max(1, Math.round(r?.width ?? t(W).width)), a = Math.max(1, Math.round(r?.height ?? t(W).height)), o = window.devicePixelRatio || 1, s = document.createElement("canvas");
|
|
1877
|
+
s.width = i * o, s.height = a * o;
|
|
1878
|
+
let c = s.getContext("2d");
|
|
1879
|
+
if (!c) {
|
|
1880
|
+
n(null);
|
|
1881
|
+
return;
|
|
1882
|
+
}
|
|
1883
|
+
let l = new Image();
|
|
1884
|
+
l.onload = () => {
|
|
1885
|
+
c.scale(o, o), c.drawImage(l, 0, 0, i, a), s.toBlob((e) => n(e), "image/png");
|
|
1886
|
+
}, l.onerror = () => n(null), l.src = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(e);
|
|
1887
|
+
});
|
|
1888
|
+
}
|
|
1889
|
+
async function ec(e) {
|
|
1890
|
+
let t = Zs();
|
|
1891
|
+
if (!t) return;
|
|
1892
|
+
let n = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
1893
|
+
if (e === "svg") {
|
|
1894
|
+
Qs(new Blob([t], { type: "image/svg+xml" }), `chart-${n}.svg`);
|
|
1895
|
+
return;
|
|
1896
|
+
}
|
|
1897
|
+
let r = await $s(t);
|
|
1898
|
+
r && Qs(r, `chart-${n}.png`);
|
|
1899
|
+
}
|
|
1900
|
+
async function tc() {
|
|
1901
|
+
if (!t(us)) return;
|
|
1902
|
+
let e = await import("./chart-export-pdf-BGko7MER.js"), n = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
1903
|
+
await e.downloadChartPdf(t(us), `chart-${n}.pdf`, {
|
|
1904
|
+
title: t(L).title,
|
|
1905
|
+
subtitle: t(L).subtitle,
|
|
1906
|
+
caption: t(L).caption
|
|
1907
|
+
});
|
|
1908
|
+
}
|
|
1909
|
+
async function nc() {
|
|
1910
|
+
t(us) && (await import("./chart-export-pdf-BGko7MER.js")).printChart(t(us), { title: t(L).title });
|
|
1911
|
+
}
|
|
1912
|
+
async function rc() {
|
|
1913
|
+
let e = Zs();
|
|
1914
|
+
if (!e) {
|
|
1915
|
+
b(Ws, "err");
|
|
1916
|
+
return;
|
|
1917
|
+
}
|
|
1918
|
+
try {
|
|
1919
|
+
let t = await $s(e);
|
|
1920
|
+
if (!t) throw Error("rasterize failed");
|
|
1921
|
+
let n = window.ClipboardItem;
|
|
1922
|
+
n && navigator.clipboard?.write ? await navigator.clipboard.write([new n({ "image/png": t })]) : await navigator.clipboard.writeText(e), b(Ws, "ok");
|
|
1923
|
+
} catch {
|
|
1924
|
+
b(Ws, "err");
|
|
1925
|
+
}
|
|
1926
|
+
setTimeout(() => b(Ws, "idle"), 1500);
|
|
1927
|
+
}
|
|
1928
|
+
var ic = {
|
|
1929
|
+
zoomTo: qi,
|
|
1930
|
+
resetZoom: Ji
|
|
1931
|
+
}, ac = Zr();
|
|
1932
|
+
let oc;
|
|
1933
|
+
{
|
|
1934
|
+
let n = (e) => {
|
|
1935
|
+
var n = et(), i = y(n), a = y(i, !0);
|
|
1936
|
+
w(i);
|
|
1937
|
+
var o = E(i, 2);
|
|
1938
|
+
c(o, 17, Ue, S, (e, n, i) => {
|
|
1939
|
+
var a = $e(), o = E(O(a), 2), s = (e) => {
|
|
1940
|
+
var i = Ze(), a = y(i, !0);
|
|
1941
|
+
w(i), _(() => l(a, t(n))), r(e, i);
|
|
1942
|
+
}, c = (e) => {
|
|
1943
|
+
var a = Qe(), o = y(a, !0);
|
|
1944
|
+
w(a), _(() => l(o, t(n))), p("click", a, () => $a(Ue().slice(0, i + 1))), r(e, a);
|
|
1945
|
+
};
|
|
1946
|
+
x(o, (e) => {
|
|
1947
|
+
i === Ue().length - 1 ? e(s) : e(c, -1);
|
|
1948
|
+
}), r(e, a);
|
|
1949
|
+
}), w(n), _(() => {
|
|
1950
|
+
C(n, "aria-label", t(I).drillPath), l(a, t(Ka)?.name || t(I).drillRoot);
|
|
1951
|
+
}), p("click", i, () => $a([])), r(e, n);
|
|
1952
|
+
};
|
|
1953
|
+
var sc = y(ac), cc = (e) => {
|
|
1954
|
+
var i = lt(), a = y(i), o = (e) => {
|
|
1955
|
+
n(e);
|
|
1956
|
+
};
|
|
1957
|
+
x(a, (e) => {
|
|
1958
|
+
t(qa) && Ue().length && e(o);
|
|
1959
|
+
});
|
|
1960
|
+
var s = E(a, 2), u = (e) => {
|
|
1961
|
+
var n = nt();
|
|
1962
|
+
c(n, 21, () => t(Ko), (e) => Jo(e), (e, n) => {
|
|
1963
|
+
var i = tt(), a = y(i, !0);
|
|
1964
|
+
w(i), _((e, t) => {
|
|
1965
|
+
C(i, "title", e), l(a, t);
|
|
1966
|
+
}, [() => F(t(I).showLast, { preset: Jo(t(n)) }), () => Jo(t(n))]), p("click", i, () => Yo(t(n))), r(e, i);
|
|
1967
|
+
}), w(n), _(() => C(n, "aria-label", t(I).dateRange)), r(e, n);
|
|
1968
|
+
};
|
|
1969
|
+
x(s, (e) => {
|
|
1970
|
+
t(qo) && e(u);
|
|
1971
|
+
});
|
|
1972
|
+
var f = E(s, 2), m = (e) => {
|
|
1973
|
+
var n = rt();
|
|
1974
|
+
let i;
|
|
1975
|
+
var a = E(y(n));
|
|
1976
|
+
w(n), _(() => {
|
|
1977
|
+
i = d(n, 1, "sv-grid-chart-tool svelte-kvdein", null, i, { "is-on": t(wi) }), C(n, "aria-pressed", t(wi)), C(n, "title", t(I).panTitle), l(a, ` ${t(I).pan ?? ""}`);
|
|
1978
|
+
}), p("click", n, () => b(wi, !t(wi))), r(e, n);
|
|
1979
|
+
};
|
|
1980
|
+
x(f, (e) => {
|
|
1981
|
+
t(Ci) && (t(Ci).pan === "mode" || t(Ci).pan === !0) && t(Vi) && e(m);
|
|
1982
|
+
});
|
|
1983
|
+
var h = E(f, 2), g = (e) => {
|
|
1984
|
+
var n = it(), i = E(y(n));
|
|
1985
|
+
w(n), _(() => {
|
|
1986
|
+
C(n, "title", t(I).resetZoomTitle), l(i, ` ${t(I).resetZoom ?? ""}`);
|
|
1987
|
+
}), p("click", n, Ji), r(e, n);
|
|
1988
|
+
};
|
|
1989
|
+
x(h, (e) => {
|
|
1990
|
+
j() && t(Vi) && e(g);
|
|
1991
|
+
});
|
|
1992
|
+
var ee = E(h, 2), v = (e) => {
|
|
1993
|
+
var n = at();
|
|
1994
|
+
let i;
|
|
1995
|
+
var a = E(y(n));
|
|
1996
|
+
w(n), _(() => {
|
|
1997
|
+
i = d(n, 1, "sv-grid-chart-tool svelte-kvdein", null, i, { "is-on": t(Ei) }), C(n, "aria-pressed", t(Ei)), C(n, "title", t(Ei) ? t(I).annotateOnTitle : t(I).annotateOffTitle), l(a, ` ${t(I).annotate ?? ""}`);
|
|
1998
|
+
}), p("click", n, () => b(Ei, !t(Ei))), r(e, n);
|
|
1999
|
+
};
|
|
2000
|
+
x(ee, (e) => {
|
|
2001
|
+
ri() && e(v);
|
|
2002
|
+
});
|
|
2003
|
+
var te = E(ee, 2), S = (e) => {
|
|
2004
|
+
var n = ct(), i = y(n);
|
|
2005
|
+
c(i, 16, () => t(fa), (e) => e, (e, n) => {
|
|
2006
|
+
var i = ot();
|
|
2007
|
+
let a;
|
|
2008
|
+
var o = y(i, !0);
|
|
2009
|
+
w(i), _((e) => {
|
|
2010
|
+
a = d(i, 1, "sv-grid-chart-tool sv-grid-chart-drawtool svelte-kvdein", null, a, { "is-on": t(B) === n }), C(i, "aria-pressed", t(B) === n), C(i, "title", e), l(o, t(da)[n]);
|
|
2011
|
+
}, [() => F(t(I).draw, { tool: t(da)[n] })]), p("click", i, () => wa(n)), r(e, i);
|
|
2012
|
+
});
|
|
2013
|
+
var a = E(i, 2), o = (e) => {
|
|
2014
|
+
var n = st(), i = O(n), a = y(i, !0);
|
|
2015
|
+
w(i);
|
|
2016
|
+
var o = E(i, 2), s = y(o, !0);
|
|
2017
|
+
w(o), _(() => {
|
|
2018
|
+
i.disabled = !t(ma), C(i, "title", t(I).deleteDrawingTitle), l(a, t(I).deleteDrawing), C(o, "title", t(I).clearDrawingsTitle), l(s, t(I).clearDrawings);
|
|
2019
|
+
}), p("click", i, () => t(ma) && Da(t(ma))), p("click", o, () => Ca([])), r(e, n);
|
|
2020
|
+
}, s = D(() => ba().length);
|
|
2021
|
+
x(a, (e) => {
|
|
2022
|
+
t(s) && e(o);
|
|
2023
|
+
}), w(n), _(() => C(n, "aria-label", t(I).drawingTools)), r(e, n);
|
|
2024
|
+
};
|
|
2025
|
+
x(te, (e) => {
|
|
2026
|
+
t(fa).length && t(G) && e(S);
|
|
2027
|
+
});
|
|
2028
|
+
var ne = E(te, 2), T = y(ne, !0);
|
|
2029
|
+
w(ne);
|
|
2030
|
+
var ie = E(ne, 2), ae = y(ie, !0);
|
|
2031
|
+
w(ie);
|
|
2032
|
+
var oe = E(ie, 2), se = y(oe, !0);
|
|
2033
|
+
w(oe);
|
|
2034
|
+
var ce = E(oe, 2), le = y(ce, !0);
|
|
2035
|
+
w(ce);
|
|
2036
|
+
var k = E(ce, 2), A = y(k, !0);
|
|
2037
|
+
w(k), w(i), _(() => {
|
|
2038
|
+
C(ne, "title", t(I).downloadPng), l(T, t(I).png), C(ie, "title", t(I).downloadSvg), l(ae, t(I).svg), C(oe, "title", t(I).downloadPdf), l(se, t(I).pdf), C(ce, "title", t(I).printTitle), l(le, t(I).print), C(k, "title", t(I).copyTitle), l(A, t(Ws) === "ok" ? t(I).copied : t(I).copy);
|
|
2039
|
+
}), p("click", ne, () => ec("png")), p("click", ie, () => ec("svg")), p("click", oe, tc), p("click", ce, nc), p("click", k, rc), re(i, "clientHeight", (e) => b(hi, e)), r(e, i);
|
|
2040
|
+
}, lc = (e) => {
|
|
2041
|
+
var t = ut(), i = y(t);
|
|
2042
|
+
n(i), w(t), re(t, "clientHeight", (e) => b(hi, e)), r(e, t);
|
|
2043
|
+
};
|
|
2044
|
+
x(sc, (e) => {
|
|
2045
|
+
t(Ti) ? e(cc) : t(qa) && Ue().length && e(lc, 1);
|
|
2046
|
+
});
|
|
2047
|
+
var $ = E(sc, 2);
|
|
2048
|
+
let a, f;
|
|
2049
|
+
var uc = y($), dc = (e) => {
|
|
2050
|
+
var n = _t(), i = y(n), a = (e) => {
|
|
2051
|
+
var n = dt(), i = y(n);
|
|
2052
|
+
let a;
|
|
2053
|
+
w(n), _(() => {
|
|
2054
|
+
C(n, "id", `${Fi}-plot`), C(i, "x", t(W).plot.x - 4), C(i, "y", t(W).plot.y - 4), C(i, "width", t(W).plot.w + 8), C(i, "height", t(W).plot.h + 8), a = d(i, 0, "svelte-kvdein", null, a, { "sv-grid-chart-wipe": t(co) === "wipe" });
|
|
2055
|
+
}), r(e, n);
|
|
2056
|
+
};
|
|
2057
|
+
x(i, (e) => {
|
|
2058
|
+
t(G) && e(a);
|
|
2059
|
+
});
|
|
2060
|
+
var s = E(i);
|
|
2061
|
+
c(s, 17, () => t(lo), (e) => e.id, (e, n) => {
|
|
2062
|
+
var i = ft(), a = y(i), o = E(a);
|
|
2063
|
+
w(i), _(() => {
|
|
2064
|
+
C(i, "id", t(n).id), C(a, "stop-color", t(n).from), C(o, "stop-color", t(n).to === "transparent" ? t(n).from : t(n).to), C(o, "stop-opacity", t(n).to === "transparent" ? 0 : 1);
|
|
2065
|
+
}), r(e, i);
|
|
2066
|
+
});
|
|
2067
|
+
var l = E(s);
|
|
2068
|
+
c(l, 17, () => t(zi), (e) => e.id, (e, n) => {
|
|
2069
|
+
var i = o(), a = O(i), s = (e) => {
|
|
2070
|
+
var i = pt(), a = y(i);
|
|
2071
|
+
ae(), w(i), _(() => {
|
|
2072
|
+
C(i, "id", t(n).id), C(a, "fill", t(n).color);
|
|
2073
|
+
}), r(e, i);
|
|
2074
|
+
}, c = (e) => {
|
|
2075
|
+
var i = mt(), a = y(i);
|
|
2076
|
+
ae(), w(i), _(() => {
|
|
2077
|
+
C(i, "id", t(n).id), C(a, "fill", t(n).color);
|
|
2078
|
+
}), r(e, i);
|
|
2079
|
+
}, l = (e) => {
|
|
2080
|
+
var i = ht(), a = y(i);
|
|
2081
|
+
ae(), w(i), _(() => {
|
|
2082
|
+
C(i, "id", t(n).id), C(a, "fill", t(n).color);
|
|
2083
|
+
}), r(e, i);
|
|
2084
|
+
}, u = (e) => {
|
|
2085
|
+
var i = gt(), a = y(i);
|
|
2086
|
+
ae(), w(i), _(() => {
|
|
2087
|
+
C(i, "id", t(n).id), C(a, "fill", t(n).color);
|
|
2088
|
+
}), r(e, i);
|
|
2089
|
+
};
|
|
2090
|
+
x(a, (e) => {
|
|
2091
|
+
t(n).kind === "stripe" ? e(s) : t(n).kind === "crosshatch" ? e(c, 1) : t(n).kind === "dots" ? e(l, 2) : t(n).kind === "diagonal" && e(u, 3);
|
|
2092
|
+
}), r(e, i);
|
|
2093
|
+
}), w(n), r(e, n);
|
|
2094
|
+
};
|
|
2095
|
+
x(uc, (e) => {
|
|
2096
|
+
(t(zi).length || t(lo).length || t(G)) && e(dc);
|
|
2097
|
+
});
|
|
2098
|
+
var fc = E(uc), pc = (e) => {
|
|
2099
|
+
var n = vt(), i = y(n, !0);
|
|
2100
|
+
w(n), _(() => {
|
|
2101
|
+
C(n, "x", t(W).frame.title.x), C(n, "y", t(W).frame.title.y), l(i, t(W).frame.title.text);
|
|
2102
|
+
}), r(e, n);
|
|
2103
|
+
};
|
|
2104
|
+
x(fc, (e) => {
|
|
2105
|
+
t(W).frame.title && e(pc);
|
|
2106
|
+
});
|
|
2107
|
+
var mc = E(fc), hc = (e) => {
|
|
2108
|
+
var n = yt(), i = y(n, !0);
|
|
2109
|
+
w(n), _(() => {
|
|
2110
|
+
C(n, "x", t(W).frame.subtitle.x), C(n, "y", t(W).frame.subtitle.y), l(i, t(W).frame.subtitle.text);
|
|
2111
|
+
}), r(e, n);
|
|
2112
|
+
};
|
|
2113
|
+
x(mc, (e) => {
|
|
2114
|
+
t(W).frame.subtitle && e(hc);
|
|
2115
|
+
});
|
|
2116
|
+
var gc = E(mc), _c = (e) => {
|
|
2117
|
+
var n = bt(), i = y(n, !0);
|
|
2118
|
+
w(n), _(() => {
|
|
2119
|
+
C(n, "x", t(W).frame.caption.x), C(n, "y", t(W).frame.caption.y), l(i, t(W).frame.caption.text);
|
|
2120
|
+
}), r(e, n);
|
|
2121
|
+
};
|
|
2122
|
+
x(gc, (e) => {
|
|
2123
|
+
t(W).frame.caption && e(_c);
|
|
2124
|
+
});
|
|
2125
|
+
var vc = E(gc), yc = (e) => {
|
|
2126
|
+
var n = Dt(), i = O(n);
|
|
2127
|
+
c(i, 17, () => t(W).valueTicks, (e) => e.label + e.x, (e, n, i, a) => {
|
|
2128
|
+
var o = St(), s = O(o), c = (e) => {
|
|
2129
|
+
var i = xt();
|
|
2130
|
+
_(() => {
|
|
2131
|
+
C(i, "x1", t(n).x), C(i, "y1", t(W).plot.y), C(i, "x2", t(n).x), C(i, "y2", t(W).plot.y + t(W).plot.h);
|
|
2132
|
+
}), r(e, i);
|
|
2133
|
+
};
|
|
2134
|
+
x(s, (e) => {
|
|
2135
|
+
t(W).grid.x && e(c);
|
|
2136
|
+
});
|
|
2137
|
+
var u = E(s), d = y(u, !0);
|
|
2138
|
+
w(u), _(() => {
|
|
2139
|
+
C(u, "x", t(n).x), C(u, "y", t(W).plot.y + t(W).plot.h + 14), l(d, t(n).label);
|
|
2140
|
+
}), r(e, o);
|
|
2141
|
+
});
|
|
2142
|
+
var a = E(i), s = (e) => {
|
|
2143
|
+
var n = o(), i = O(n);
|
|
2144
|
+
c(i, 17, () => t(W).catTicks, (e) => e.value, (e, n, i, a) => {
|
|
2145
|
+
var o = Ct();
|
|
2146
|
+
_(() => {
|
|
2147
|
+
C(o, "x1", t(W).plot.x), C(o, "y1", t(n).y), C(o, "x2", t(W).plot.x + t(W).plot.w), C(o, "y2", t(n).y);
|
|
2148
|
+
}), r(e, o);
|
|
2149
|
+
}), r(e, n);
|
|
2150
|
+
};
|
|
2151
|
+
x(a, (e) => {
|
|
2152
|
+
t(W).grid.y && e(s);
|
|
2153
|
+
});
|
|
2154
|
+
var u = E(a);
|
|
2155
|
+
c(u, 17, () => t(W).catTicks, (e) => e.value, (e, n, i, a) => {
|
|
2156
|
+
var o = wt(), s = y(o, !0);
|
|
2157
|
+
w(o), _((e) => {
|
|
2158
|
+
C(o, "x", t(W).plot.x - 6), C(o, "y", t(n).y + 3), l(s, e);
|
|
2159
|
+
}, [() => cs(t(n).label, 18)]), r(e, o);
|
|
2160
|
+
});
|
|
2161
|
+
var d = E(u), f = (e) => {
|
|
2162
|
+
var n = Tt();
|
|
2163
|
+
C(n, "x", 13);
|
|
2164
|
+
var i = y(n, !0);
|
|
2165
|
+
w(n), _(() => {
|
|
2166
|
+
C(n, "y", t(W).plot.y + t(W).plot.h / 2), C(n, "transform", `rotate(-90 13 ${t(W).plot.y + t(W).plot.h / 2})`), l(i, t(uo));
|
|
2167
|
+
}), r(e, n);
|
|
2168
|
+
};
|
|
2169
|
+
x(d, (e) => {
|
|
2170
|
+
t(uo) && e(f);
|
|
2171
|
+
});
|
|
2172
|
+
var p = E(d), m = (e) => {
|
|
2173
|
+
var n = Et(), i = y(n, !0);
|
|
2174
|
+
w(n), _(() => {
|
|
2175
|
+
C(n, "x", t(W).plot.x + t(W).plot.w / 2), C(n, "y", t(W).height - 3 - t(W).frame.bottom), l(i, t(po));
|
|
2176
|
+
}), r(e, n);
|
|
2177
|
+
};
|
|
2178
|
+
x(p, (e) => {
|
|
2179
|
+
t(po) && e(m);
|
|
2180
|
+
}), r(e, n);
|
|
2181
|
+
}, bc = (e) => {
|
|
2182
|
+
var n = Bt(), i = O(n);
|
|
2183
|
+
c(i, 17, () => t(W).yTicks, (e) => e.value, (e, n, i, a) => {
|
|
2184
|
+
var o = At(), s = O(o), c = (e) => {
|
|
2185
|
+
var i = Ot();
|
|
2186
|
+
let a;
|
|
2187
|
+
_(() => {
|
|
2188
|
+
a = d(i, 0, "sv-grid-chart-gridline svelte-kvdein", null, a, { "is-zero": t(n).value === 0 }), C(i, "x1", t(W).plot.x), C(i, "y1", t(n).y), C(i, "x2", t(W).plot.x + t(W).plot.w), C(i, "y2", t(n).y);
|
|
2189
|
+
}), r(e, i);
|
|
2190
|
+
};
|
|
2191
|
+
x(s, (e) => {
|
|
2192
|
+
(t(W).grid.y || t(n).value === 0) && e(c);
|
|
2193
|
+
});
|
|
2194
|
+
var u = E(s), f = (e) => {
|
|
2195
|
+
var i = kt(), a = y(i, !0);
|
|
2196
|
+
w(i), _((e) => {
|
|
2197
|
+
C(i, "x", t(W).plot.x - 6), C(i, "y", t(n).y + 3), l(a, e);
|
|
2198
|
+
}, [() => ls(t(n).value, t(n).label)]), r(e, i);
|
|
2199
|
+
};
|
|
2200
|
+
x(u, (e) => {
|
|
2201
|
+
t(n).label && e(f);
|
|
2202
|
+
}), r(e, o);
|
|
2203
|
+
});
|
|
2204
|
+
var a = E(i), s = (e) => {
|
|
2205
|
+
var n = o(), i = O(n);
|
|
2206
|
+
c(i, 17, () => t(W).xTicks, (e) => e.label + e.x, (e, n, i, a) => {
|
|
2207
|
+
var o = jt();
|
|
2208
|
+
_(() => {
|
|
2209
|
+
C(o, "x1", t(n).x), C(o, "y1", t(W).plot.y), C(o, "x2", t(n).x), C(o, "y2", t(W).plot.y + t(W).plot.h);
|
|
2210
|
+
}), r(e, o);
|
|
2211
|
+
}), r(e, n);
|
|
2212
|
+
};
|
|
2213
|
+
x(a, (e) => {
|
|
2214
|
+
t(W).grid.x && e(s);
|
|
2215
|
+
});
|
|
2216
|
+
var u = E(a), f = (e) => {
|
|
2217
|
+
var n = o(), i = O(n);
|
|
2218
|
+
c(i, 17, () => t(W).y2Ticks, (e) => e.value, (e, n, i, a) => {
|
|
2219
|
+
var s = o(), c = O(s), u = (e) => {
|
|
2220
|
+
var i = Mt(), a = y(i, !0);
|
|
2221
|
+
w(i), _((e) => {
|
|
2222
|
+
C(i, "x", t(W).plot.x + t(W).plot.w + 6), C(i, "y", t(n).y + 3), l(a, e);
|
|
2223
|
+
}, [() => ls(t(n).value, t(n).label)]), r(e, i);
|
|
2224
|
+
};
|
|
2225
|
+
x(c, (e) => {
|
|
2226
|
+
t(n).label && e(u);
|
|
2227
|
+
}), r(e, s);
|
|
2228
|
+
}), r(e, n);
|
|
2229
|
+
};
|
|
2230
|
+
x(u, (e) => {
|
|
2231
|
+
t(W).hasRightAxis && e(f);
|
|
2232
|
+
});
|
|
2233
|
+
var p = E(u);
|
|
2234
|
+
c(p, 17, () => t(W).xTicks, (e) => e.label + e.x, (e, n, i, a) => {
|
|
2235
|
+
var s = o(), c = O(s), u = (e) => {}, d = (e) => {
|
|
2236
|
+
var i = Nt(), a = y(i, !0);
|
|
2237
|
+
w(i), _((e) => {
|
|
2238
|
+
C(i, "x", t(n).x), C(i, "y", t(W).plot.y + t(W).plot.h + 12), C(i, "text-anchor", t(W).xLabelAngle < 0 ? "end" : "start"), C(i, "transform", `rotate(${t(W).xLabelAngle} ${t(n).x} ${t(W).plot.y + t(W).plot.h + 12})`), l(a, e);
|
|
2239
|
+
}, [() => cs(t(n).label, Math.abs(t(W).xLabelAngle) >= 60 ? 18 : 12)]), r(e, i);
|
|
2240
|
+
}, f = (e) => {
|
|
2241
|
+
var i = Pt(), a = y(i, !0);
|
|
2242
|
+
w(i), _((e) => {
|
|
2243
|
+
C(i, "x", t(n).x), C(i, "y", t(W).plot.y + t(W).plot.h + 16), l(a, e);
|
|
2244
|
+
}, [() => cs(t(n).label, 16)]), r(e, i);
|
|
2245
|
+
};
|
|
2246
|
+
x(c, (e) => {
|
|
2247
|
+
t(n).label ? t(W).xLabelRotated ? e(d, 1) : e(f, -1) : e(u);
|
|
2248
|
+
}), r(e, s);
|
|
2249
|
+
});
|
|
2250
|
+
var m = E(p);
|
|
2251
|
+
c(m, 17, () => t(W).categoryGroupTicks, (e) => e.label + e.x0, (e, n) => {
|
|
2252
|
+
let i = D(() => t(W).plot.y + t(W).plot.h + (t(W).xLabelRotated ? 46 : 32));
|
|
2253
|
+
var a = It(), o = O(a), s = E(o), c = (e) => {
|
|
2254
|
+
var a = Ft();
|
|
2255
|
+
_(() => {
|
|
2256
|
+
C(a, "x1", t(n).x0), C(a, "y1", t(W).plot.y + t(W).plot.h), C(a, "x2", t(n).x0), C(a, "y2", t(i) - 9);
|
|
2257
|
+
}), r(e, a);
|
|
2258
|
+
};
|
|
2259
|
+
x(s, (e) => {
|
|
2260
|
+
t(n).x0 > t(W).plot.x + 1 && e(c);
|
|
2261
|
+
});
|
|
2262
|
+
var u = E(s), d = y(u, !0);
|
|
2263
|
+
w(u), _((e) => {
|
|
2264
|
+
C(o, "x1", t(n).x0 + 3), C(o, "y1", t(i) - 9), C(o, "x2", t(n).x1 - 3), C(o, "y2", t(i) - 9), C(u, "x", t(n).xCenter), C(u, "y", t(i)), l(d, e);
|
|
2265
|
+
}, [() => cs(t(n).label, Math.max(4, Math.floor((t(n).x1 - t(n).x0) / 7)))]), r(e, a);
|
|
2266
|
+
});
|
|
2267
|
+
var h = E(m), g = (e) => {
|
|
2268
|
+
var n = Lt();
|
|
2269
|
+
C(n, "x", 13);
|
|
2270
|
+
var i = y(n, !0);
|
|
2271
|
+
w(n), _(() => {
|
|
2272
|
+
C(n, "y", t(W).plot.y + t(W).plot.h / 2), C(n, "transform", `rotate(-90 13 ${t(W).plot.y + t(W).plot.h / 2})`), l(i, t(uo));
|
|
2273
|
+
}), r(e, n);
|
|
2274
|
+
};
|
|
2275
|
+
x(h, (e) => {
|
|
2276
|
+
t(uo) && e(g);
|
|
2277
|
+
});
|
|
2278
|
+
var ee = E(h), v = (e) => {
|
|
2279
|
+
var n = Rt(), i = y(n, !0);
|
|
2280
|
+
w(n), _(() => {
|
|
2281
|
+
C(n, "x", t(W).width - 12), C(n, "y", t(W).plot.y + t(W).plot.h / 2), C(n, "transform", `rotate(90 ${t(W).width - 12} ${t(W).plot.y + t(W).plot.h / 2})`), l(i, t(fo));
|
|
2282
|
+
}), r(e, n);
|
|
2283
|
+
};
|
|
2284
|
+
x(ee, (e) => {
|
|
2285
|
+
t(fo) && e(v);
|
|
2286
|
+
});
|
|
2287
|
+
var te = E(ee), b = (e) => {
|
|
2288
|
+
var n = zt(), i = y(n, !0);
|
|
2289
|
+
w(n), _(() => {
|
|
2290
|
+
C(n, "x", t(W).plot.x + t(W).plot.w / 2), C(n, "y", t(W).height - 3 - t(W).frame.bottom), l(i, t(po));
|
|
2291
|
+
}), r(e, n);
|
|
2292
|
+
};
|
|
2293
|
+
x(te, (e) => {
|
|
2294
|
+
t(po) && e(b);
|
|
2295
|
+
}), r(e, n);
|
|
2296
|
+
};
|
|
2297
|
+
x(vc, (e) => {
|
|
2298
|
+
t(K) ? e(yc) : t(G) && e(bc, 1);
|
|
2299
|
+
});
|
|
2300
|
+
var xc = E(vc);
|
|
2301
|
+
c(xc, 17, () => t(W).referenceBands, S, (e, n) => {
|
|
2302
|
+
var i = Ut(), a = O(i), s = E(a), c = (e) => {
|
|
2303
|
+
var i = o(), a = O(i), s = (e) => {
|
|
2304
|
+
var i = Vt(), a = y(i, !0);
|
|
2305
|
+
w(i), _(() => {
|
|
2306
|
+
C(i, "x", t(n).x + t(n).w - 3), C(i, "y", t(n).y + 10), C(i, "fill", t(n).color), l(a, t(n).label);
|
|
2307
|
+
}), r(e, i);
|
|
2308
|
+
}, c = (e) => {
|
|
2309
|
+
var i = Ht(), a = y(i, !0);
|
|
2310
|
+
w(i), _(() => {
|
|
2311
|
+
C(i, "x", t(n).x + t(n).w / 2), C(i, "y", t(n).y + 10), C(i, "fill", t(n).color), l(a, t(n).label);
|
|
2312
|
+
}), r(e, i);
|
|
2313
|
+
};
|
|
2314
|
+
x(a, (e) => {
|
|
2315
|
+
t(n).axis === "y" ? e(s) : e(c, -1);
|
|
2316
|
+
}), r(e, i);
|
|
2317
|
+
};
|
|
2318
|
+
x(s, (e) => {
|
|
2319
|
+
t(n).label && e(c);
|
|
2320
|
+
}), _(() => {
|
|
2321
|
+
C(a, "x", t(n).x), C(a, "y", t(n).y), C(a, "width", t(n).w), C(a, "height", t(n).h), C(a, "fill", t(n).color), C(a, "fill-opacity", t(n).opacity);
|
|
2322
|
+
}), r(e, i);
|
|
2323
|
+
});
|
|
2324
|
+
var Sc = E(xc);
|
|
2325
|
+
let g;
|
|
2326
|
+
var Cc = y(Sc);
|
|
2327
|
+
c(Cc, 19, () => t(W).lines, (e, t) => e.label + t, (e, n, i) => {
|
|
2328
|
+
let a = D(() => t(n).style?.gradient ? `${Fi}-grad-${t(i)}` : null);
|
|
2329
|
+
var s = Xt(), l = y(s), u = (e) => {
|
|
2330
|
+
var i = Wt();
|
|
2331
|
+
_(() => {
|
|
2332
|
+
C(i, "d", t(n).bandPath), C(i, "fill", t(n).color);
|
|
2333
|
+
}), r(e, i);
|
|
2334
|
+
};
|
|
2335
|
+
x(l, (e) => {
|
|
2336
|
+
t(n).bandPath && e(u);
|
|
2337
|
+
});
|
|
2338
|
+
var f = E(l), p = (e) => {
|
|
2339
|
+
var i = Gt();
|
|
2340
|
+
_(() => {
|
|
2341
|
+
C(i, "d", t(n).areaPath), C(i, "fill", t(a) ? `url(#${t(a)})` : t(Ri)[t(n).label] ?? t(n).color), C(i, "fill-opacity", t(a) ? .6 : t(n).range ? .35 : .15);
|
|
2342
|
+
}), r(e, i);
|
|
2343
|
+
};
|
|
2344
|
+
x(f, (e) => {
|
|
2345
|
+
t(n).areaPath && e(p);
|
|
2346
|
+
});
|
|
2347
|
+
var m = E(f), h = E(m), g = (e) => {
|
|
2348
|
+
let i = D(() => t(n).points[t(ps) ?? -1]);
|
|
2349
|
+
var a = o(), s = O(a), c = (e) => {
|
|
2350
|
+
var a = Kt();
|
|
2351
|
+
_(() => {
|
|
2352
|
+
C(a, "cx", t(i).x), C(a, "cy", t(i).y), C(a, "fill", t(i).marker?.color ?? t(n).color);
|
|
2353
|
+
}), r(e, a);
|
|
2354
|
+
};
|
|
2355
|
+
x(s, (e) => {
|
|
2356
|
+
t(i)?.defined && e(c);
|
|
2357
|
+
}), r(e, a);
|
|
2358
|
+
}, ee = (e) => {
|
|
2359
|
+
var i = o(), a = O(i);
|
|
2360
|
+
c(a, 17, () => t(n).points, S, (e, i, a) => {
|
|
2361
|
+
var s = o(), c = O(s), l = (e) => {
|
|
2362
|
+
let s = D(() => t(i).marker?.shape ?? "circle"), c = D(() => (t(i).marker?.size ?? 3) + +(t(ps) === a)), l = D(() => t(i).marker?.color ?? t(n).color);
|
|
2363
|
+
var u = o(), f = O(u), p = (e) => {
|
|
2364
|
+
var o = qt();
|
|
2365
|
+
let s;
|
|
2366
|
+
_((e, n) => {
|
|
2367
|
+
s = d(o, 0, "sv-grid-chart-dot svelte-kvdein", null, s, e), C(o, "cx", t(i).x), C(o, "cy", t(i).y), C(o, "r", t(c)), C(o, "fill", t(l)), k(o, n);
|
|
2368
|
+
}, [() => ({
|
|
2369
|
+
"is-active": t(ps) === a,
|
|
2370
|
+
"is-selected": Vo(t(i).label, t(n).label)
|
|
2371
|
+
}), () => `opacity:${Ho(t(i).label, t(n).label)}`]), r(e, o);
|
|
2372
|
+
}, m = (e) => {
|
|
2373
|
+
var n = Jt();
|
|
2374
|
+
let o;
|
|
2375
|
+
_((e) => {
|
|
2376
|
+
o = d(n, 0, "sv-grid-chart-dot is-stroked svelte-kvdein", null, o, { "is-active": t(ps) === a }), C(n, "d", e), C(n, "stroke", t(l));
|
|
2377
|
+
}, [() => De(t(s), t(i).x, t(i).y, t(c))]), r(e, n);
|
|
2378
|
+
}, h = (e) => {
|
|
2379
|
+
var n = Yt();
|
|
2380
|
+
let o;
|
|
2381
|
+
_((e) => {
|
|
2382
|
+
o = d(n, 0, "sv-grid-chart-dot svelte-kvdein", null, o, { "is-active": t(ps) === a }), C(n, "d", e), C(n, "fill", t(l));
|
|
2383
|
+
}, [() => De(t(s), t(i).x, t(i).y, t(c))]), r(e, n);
|
|
2384
|
+
};
|
|
2385
|
+
x(f, (e) => {
|
|
2386
|
+
t(s) === "circle" ? e(p) : t(s) === "cross" ? e(m, 1) : e(h, -1);
|
|
2387
|
+
}), r(e, u);
|
|
2388
|
+
};
|
|
2389
|
+
x(c, (e) => {
|
|
2390
|
+
t(i).defined && t(i).marker?.shape !== "none" && e(l);
|
|
2391
|
+
}), r(e, s);
|
|
2392
|
+
}), r(e, i);
|
|
2393
|
+
};
|
|
2394
|
+
x(h, (e) => {
|
|
2395
|
+
t(Oo) ? e(g) : e(ee, -1);
|
|
2396
|
+
}), w(s), _((e) => {
|
|
2397
|
+
k(s, e), C(m, "d", t(n).path), C(m, "stroke", t(n).color), C(m, "stroke-width", t(n).style?.strokeWidth ?? (t(n).range ? 1 : 2)), C(m, "stroke-dasharray", t(n).style?.dash);
|
|
2398
|
+
}, [() => `opacity:${q(t(n).label) * (t(n).style?.opacity ?? 1)}`]), r(e, s);
|
|
2399
|
+
});
|
|
2400
|
+
var wc = E(Cc), Tc = (e) => {
|
|
2401
|
+
var n = o(), i = O(n);
|
|
2402
|
+
s(i, () => u.underlay, () => t(ho)), r(e, n);
|
|
2403
|
+
};
|
|
2404
|
+
x(wc, (e) => {
|
|
2405
|
+
u.underlay && e(Tc);
|
|
2406
|
+
});
|
|
2407
|
+
var Ec = E(wc);
|
|
2408
|
+
c(Ec, 17, () => t(W).bars, S, (e, n) => {
|
|
2409
|
+
var i = Zt();
|
|
2410
|
+
let a;
|
|
2411
|
+
_((e, r, o) => {
|
|
2412
|
+
a = d(i, 0, "sv-grid-chart-bar svelte-kvdein", null, a, e), C(i, "x", t(n).x), C(i, "y", t(n).y), C(i, "width", t(n).w), C(i, "height", t(n).h), C(i, "fill", r), k(i, o);
|
|
2413
|
+
}, [
|
|
2414
|
+
() => ({ "is-selected": Vo(t(n).label, t(n).series, t(n).index) }),
|
|
2415
|
+
() => t(Ri)[t(n).series]?.startsWith("url(") ? t(Ri)[t(n).series] : t(n).color,
|
|
2416
|
+
() => `opacity:${q(t(n).series) * (t(n).opacity ?? 1) * Ho(t(n).label, t(n).series, t(n).index)}`
|
|
2417
|
+
]), p("click", i, function(...e) {
|
|
2418
|
+
(t(J) ? (e) => {
|
|
2419
|
+
e.stopPropagation(), Ps(t(n).label, t(n).series, t(n).value, t(n).index, e);
|
|
2420
|
+
} : void 0)?.apply(this, e);
|
|
2421
|
+
}), r(e, i);
|
|
2422
|
+
});
|
|
2423
|
+
var Dc = E(Ec);
|
|
2424
|
+
c(Dc, 17, () => t(W).stems, S, (e, n) => {
|
|
2425
|
+
var i = $t(), a = y(i), o = E(a), s = (e) => {
|
|
2426
|
+
var i = Qt();
|
|
2427
|
+
_(() => {
|
|
2428
|
+
C(i, "cx", t(n).xCenter), C(i, "cy", t(n).y0), C(i, "r", t(n).r), C(i, "fill", t(n).color2 ?? t(n).color), C(i, "stroke", t(n).color2 ?? t(n).color);
|
|
2429
|
+
}), r(e, i);
|
|
2430
|
+
};
|
|
2431
|
+
x(o, (e) => {
|
|
2432
|
+
t(n).dumbbell && e(s);
|
|
2433
|
+
});
|
|
2434
|
+
var c = E(o);
|
|
2435
|
+
w(i), _((e) => {
|
|
2436
|
+
k(i, e), C(a, "x1", t(n).xCenter), C(a, "y1", t(n).y0), C(a, "x2", t(n).xCenter), C(a, "y2", t(n).y1), C(a, "stroke", t(n).dumbbell ? "var(--sg-muted, #94a3b8)" : t(n).color), C(a, "stroke-width", t(n).dumbbell ? 2 : 1.5), C(c, "cx", t(n).xCenter), C(c, "cy", t(n).y1), C(c, "r", t(n).r), C(c, "fill", t(n).color);
|
|
2437
|
+
}, [() => `opacity:${q(t(n).series)}`]), p("mousemove", i, (e) => js(e.clientX, e.clientY, t(n))), h("mouseleave", i, Q), r(e, i);
|
|
2438
|
+
});
|
|
2439
|
+
var Oc = E(Dc);
|
|
2440
|
+
c(Oc, 17, () => t(W).candles, S, (e, n) => {
|
|
2441
|
+
var i = o(), a = O(i), s = (e) => {
|
|
2442
|
+
var i = en(), a = O(i), o = E(a), s = E(o);
|
|
2443
|
+
_((e, r, i) => {
|
|
2444
|
+
C(a, "x1", t(n).xCenter), C(a, "y1", t(n).yHigh), C(a, "x2", t(n).xCenter), C(a, "y2", t(n).yLow), C(a, "stroke", t(n).color), k(a, e), C(o, "x1", t(n).x), C(o, "y1", t(n).yOpen), C(o, "x2", t(n).xCenter), C(o, "y2", t(n).yOpen), C(o, "stroke", t(n).color), k(o, r), C(s, "x1", t(n).xCenter), C(s, "y1", t(n).yClose), C(s, "x2", t(n).x + t(n).w), C(s, "y2", t(n).yClose), C(s, "stroke", t(n).color), k(s, i);
|
|
2445
|
+
}, [
|
|
2446
|
+
() => `opacity:${q(t(n).series)}`,
|
|
2447
|
+
() => `opacity:${q(t(n).series)}`,
|
|
2448
|
+
() => `opacity:${q(t(n).series)}`
|
|
2449
|
+
]), r(e, i);
|
|
2450
|
+
}, c = (e) => {
|
|
2451
|
+
var i = tn(), a = O(i), o = E(a);
|
|
2452
|
+
_((e, r) => {
|
|
2453
|
+
C(a, "x1", t(n).xCenter), C(a, "y1", t(n).yHigh), C(a, "x2", t(n).xCenter), C(a, "y2", t(n).yLow), C(a, "stroke", t(n).color), k(a, e), C(o, "x", t(n).x), C(o, "y", t(n).bodyY), C(o, "width", t(n).w), C(o, "height", t(n).bodyH), C(o, "fill", t(n).hollow ? "none" : t(n).color), C(o, "stroke", t(n).color), k(o, r);
|
|
2454
|
+
}, [() => `opacity:${q(t(n).series)}`, () => `opacity:${q(t(n).series)}`]), r(e, i);
|
|
2455
|
+
};
|
|
2456
|
+
x(a, (e) => {
|
|
2457
|
+
t(Pa) ? e(s) : e(c, -1);
|
|
2458
|
+
}), r(e, i);
|
|
2459
|
+
});
|
|
2460
|
+
var kc = E(Oc);
|
|
2461
|
+
c(kc, 17, () => t(W).boxes, S, (e, n) => {
|
|
2462
|
+
var i = rn(), a = O(i), o = E(a), s = E(o), l = E(s), u = E(l), d = E(u);
|
|
2463
|
+
c(d, 17, () => t(n).outliers, S, (e, i) => {
|
|
2464
|
+
var a = nn();
|
|
2465
|
+
_((e) => {
|
|
2466
|
+
C(a, "cx", t(n).xCenter), C(a, "cy", t(i).y), C(a, "stroke", t(n).color), k(a, e);
|
|
2467
|
+
}, [() => `opacity:${q(t(n).series)}`]), r(e, a);
|
|
2468
|
+
}), _((e, r, i, c, d) => {
|
|
2469
|
+
C(a, "x1", t(n).xCenter), C(a, "y1", t(n).yMax), C(a, "x2", t(n).xCenter), C(a, "y2", t(n).yMin), C(a, "stroke", t(n).color), k(a, e), C(o, "x1", t(n).x + t(n).w * .25), C(o, "y1", t(n).yMax), C(o, "x2", t(n).x + t(n).w * .75), C(o, "y2", t(n).yMax), C(o, "stroke", t(n).color), k(o, r), C(s, "x1", t(n).x + t(n).w * .25), C(s, "y1", t(n).yMin), C(s, "x2", t(n).x + t(n).w * .75), C(s, "y2", t(n).yMin), C(s, "stroke", t(n).color), k(s, i), C(l, "x", t(n).x), C(l, "y", t(n).boxY), C(l, "width", t(n).w), C(l, "height", t(n).boxH), C(l, "fill", t(n).color), C(l, "stroke", t(n).color), k(l, c), C(u, "x1", t(n).x), C(u, "y1", t(n).yMedian), C(u, "x2", t(n).x + t(n).w), C(u, "y2", t(n).yMedian), C(u, "stroke", t(n).color), k(u, d);
|
|
2470
|
+
}, [
|
|
2471
|
+
() => `opacity:${q(t(n).series)}`,
|
|
2472
|
+
() => `opacity:${q(t(n).series)}`,
|
|
2473
|
+
() => `opacity:${q(t(n).series)}`,
|
|
2474
|
+
() => `opacity:${q(t(n).series)}`,
|
|
2475
|
+
() => `opacity:${q(t(n).series)}`
|
|
2476
|
+
]), r(e, i);
|
|
2477
|
+
});
|
|
2478
|
+
var Ac = E(kc);
|
|
2479
|
+
c(Ac, 17, () => t(W).errorBars, S, (e, n) => {
|
|
2480
|
+
var i = an(), a = O(i), o = E(a), s = E(o);
|
|
2481
|
+
_((e, r, i) => {
|
|
2482
|
+
C(a, "x1", t(n).xCenter), C(a, "y1", t(n).yHi), C(a, "x2", t(n).xCenter), C(a, "y2", t(n).yLo), C(a, "stroke", t(n).color), k(a, e), C(o, "x1", t(n).xCenter - t(n).cap), C(o, "y1", t(n).yHi), C(o, "x2", t(n).xCenter + t(n).cap), C(o, "y2", t(n).yHi), C(o, "stroke", t(n).color), k(o, r), C(s, "x1", t(n).xCenter - t(n).cap), C(s, "y1", t(n).yLo), C(s, "x2", t(n).xCenter + t(n).cap), C(s, "y2", t(n).yLo), C(s, "stroke", t(n).color), k(s, i);
|
|
2483
|
+
}, [
|
|
2484
|
+
() => `opacity:${q(t(n).series)}`,
|
|
2485
|
+
() => `opacity:${q(t(n).series)}`,
|
|
2486
|
+
() => `opacity:${q(t(n).series)}`
|
|
2487
|
+
]), r(e, i);
|
|
2488
|
+
});
|
|
2489
|
+
var jc = E(Ac);
|
|
2490
|
+
c(jc, 17, () => t(W).scatterPoints, S, (e, n, i) => {
|
|
2491
|
+
var a = on();
|
|
2492
|
+
let o;
|
|
2493
|
+
_((e, r, i, s) => {
|
|
2494
|
+
o = d(a, 0, "sv-grid-chart-scatter svelte-kvdein", null, o, e), C(a, "cx", t(n).cx), C(a, "cy", t(n).cy), C(a, "r", t(n).r), C(a, "fill", t(n).color), C(a, "stroke", t(n).color), k(a, r), C(a, "role", t(J) || u.onSelect ? "button" : "img"), C(a, "tabindex", i), C(a, "aria-label", s);
|
|
2495
|
+
}, [
|
|
2496
|
+
() => ({ "is-selected": Vo(t(n).label || t(n).series, t(n).series, i) }),
|
|
2497
|
+
() => `opacity:${q(t(n).series) * Ho(t(n).label || t(n).series, t(n).series, i)}`,
|
|
2498
|
+
() => Rs(".sv-grid-chart-scatter", i),
|
|
2499
|
+
() => `${t(n).label || t(n).series}: ${R(t(n).x)}, ${R(t(n).y)}`
|
|
2500
|
+
]), p("mousemove", a, (e) => Ts(e.clientX, e.clientY, t(n))), h("mouseleave", a, Q), p("click", a, function(...e) {
|
|
2501
|
+
(t(J) || u.onSelect ? (e) => {
|
|
2502
|
+
e.stopPropagation(), Ps(t(n).label || t(n).series, t(n).series, t(n).y, i, e);
|
|
2503
|
+
} : void 0)?.apply(this, e);
|
|
2504
|
+
}), h("focus", a, (e) => {
|
|
2505
|
+
zs(".sv-grid-chart-scatter", i);
|
|
2506
|
+
let r = Vs(e.currentTarget);
|
|
2507
|
+
Ts(r.x, r.y, t(n));
|
|
2508
|
+
}), h("blur", a, Q), p("keydown", a, (e) => Bs(e, ".sv-grid-chart-scatter", i, t(J) || u.onSelect ? () => Ps(t(n).label || t(n).series, t(n).series, t(n).y, i, e) : null)), r(e, a);
|
|
2509
|
+
}), w(Sc);
|
|
2510
|
+
var Mc = E(Sc);
|
|
2511
|
+
c(Mc, 17, () => t(W).referenceLines, S, (e, n) => {
|
|
2512
|
+
var i = ln(), a = O(i), o = E(a), s = (e) => {
|
|
2513
|
+
let i = D(() => Math.max(28, t(n).label.length * 6.4 + 10));
|
|
2514
|
+
var a = sn(), o = y(a), s = E(o), c = y(s, !0);
|
|
2515
|
+
w(s), w(a), _(() => {
|
|
2516
|
+
C(o, "x", t(W).plot.x + t(W).plot.w - t(i)), C(o, "y", t(n).y - 8), C(o, "width", t(i)), C(o, "fill", t(n).color), C(s, "x", t(W).plot.x + t(W).plot.w - t(i) / 2), C(s, "y", t(n).y + 3.5), l(c, t(n).label);
|
|
2517
|
+
}), r(e, a);
|
|
2518
|
+
}, c = (e) => {
|
|
2519
|
+
var i = cn(), a = y(i, !0);
|
|
2520
|
+
w(i), _(() => {
|
|
2521
|
+
C(i, "x", t(W).plot.x + t(W).plot.w - 3), C(i, "y", t(n).y - 3), C(i, "fill", t(n).color), l(a, t(n).label);
|
|
2522
|
+
}), r(e, i);
|
|
2523
|
+
};
|
|
2524
|
+
x(o, (e) => {
|
|
2525
|
+
t(n).pill ? e(s) : e(c, -1);
|
|
2526
|
+
}), _(() => {
|
|
2527
|
+
C(a, "x1", t(W).plot.x), C(a, "y1", t(n).y), C(a, "x2", t(W).plot.x + t(W).plot.w), C(a, "y2", t(n).y), C(a, "stroke", t(n).color), C(a, "stroke-dasharray", t(n).dashed ? "5 4" : void 0);
|
|
2528
|
+
}), r(e, i);
|
|
2529
|
+
});
|
|
2530
|
+
var Nc = E(Mc);
|
|
2531
|
+
c(Nc, 17, () => t(W).referenceLinesV, S, (e, n) => {
|
|
2532
|
+
var i = un(), a = O(i), o = E(a), s = y(o, !0);
|
|
2533
|
+
w(o), _(() => {
|
|
2534
|
+
C(a, "x1", t(n).x), C(a, "y1", t(W).plot.y), C(a, "x2", t(n).x), C(a, "y2", t(W).plot.y + t(W).plot.h), C(a, "stroke", t(n).color), C(a, "stroke-dasharray", t(n).dashed ? "5 4" : void 0), C(o, "x", t(n).x + 3), C(o, "y", t(W).plot.y + 9), C(o, "fill", t(n).color), l(s, t(n).label);
|
|
2535
|
+
}), r(e, i);
|
|
2536
|
+
});
|
|
2537
|
+
var Pc = E(Nc);
|
|
2538
|
+
let v;
|
|
2539
|
+
c(Pc, 23, () => t(W).overlays, (e, t) => e.label + t, (e, n) => {
|
|
2540
|
+
var i = fn(), a = O(i), o = (e) => {
|
|
2541
|
+
var i = dn();
|
|
2542
|
+
_(() => {
|
|
2543
|
+
C(i, "d", t(n).bandPath), C(i, "fill", t(n).color), C(i, "stroke", t(n).color);
|
|
2544
|
+
}), r(e, i);
|
|
2545
|
+
};
|
|
2546
|
+
x(a, (e) => {
|
|
2547
|
+
t(n).bandPath && e(o);
|
|
2548
|
+
});
|
|
2549
|
+
var s = E(a);
|
|
2550
|
+
_(() => {
|
|
2551
|
+
C(s, "d", t(n).path), C(s, "stroke", t(n).color);
|
|
2552
|
+
}), r(e, i);
|
|
2553
|
+
}), w(Pc);
|
|
2554
|
+
var Fc = E(Pc);
|
|
2555
|
+
c(Fc, 17, () => t(Ao), S, (e, n) => {
|
|
2556
|
+
var i = mn(), a = O(i), o = (e) => {
|
|
2557
|
+
var i = pn();
|
|
2558
|
+
_((e) => {
|
|
2559
|
+
C(i, "x1", t(n).leader.x1), C(i, "y1", t(n).leader.y1), C(i, "x2", t(n).leader.x2), C(i, "y2", t(n).leader.y2), k(i, e);
|
|
2560
|
+
}, [() => `opacity:${q(t(n).series)}`]), r(e, i);
|
|
2561
|
+
};
|
|
2562
|
+
x(a, (e) => {
|
|
2563
|
+
t(n).leader && e(o);
|
|
2564
|
+
});
|
|
2565
|
+
var s = E(a);
|
|
2566
|
+
let c;
|
|
2567
|
+
var u = y(s, !0);
|
|
2568
|
+
w(s), _((e) => {
|
|
2569
|
+
c = d(s, 0, "sv-grid-chart-datalabel svelte-kvdein", null, c, { "on-bar": t(n).onBar }), C(s, "x", t(n).x), C(s, "y", t(n).y), C(s, "text-anchor", t(n).anchor), C(s, "transform", t(n).angle ? `rotate(${t(n).angle} ${t(n).x} ${t(n).y})` : void 0), k(s, e), l(u, t(n).text);
|
|
2570
|
+
}, [() => `opacity:${q(t(n).series)}`]), r(e, i);
|
|
2571
|
+
});
|
|
2572
|
+
var Ic = E(Fc);
|
|
2573
|
+
c(Ic, 17, () => t(W).seriesLabels, (e) => e.series, (e, n) => {
|
|
2574
|
+
var i = hn(), a = y(i, !0);
|
|
2575
|
+
w(i), _((e) => {
|
|
2576
|
+
C(i, "x", t(n).x), C(i, "y", t(n).y + 3.5), C(i, "fill", t(n).color), k(i, e), l(a, t(n).text);
|
|
2577
|
+
}, [() => `opacity:${q(t(n).series)}`]), r(e, i);
|
|
2578
|
+
});
|
|
2579
|
+
var Lc = E(Ic), Rc = (e) => {
|
|
2580
|
+
var n = o(), i = O(n);
|
|
2581
|
+
s(i, () => u.overlay, () => t(ho)), r(e, n);
|
|
2582
|
+
};
|
|
2583
|
+
x(Lc, (e) => {
|
|
2584
|
+
u.overlay && e(Rc);
|
|
2585
|
+
});
|
|
2586
|
+
var zc = E(Lc);
|
|
2587
|
+
c(zc, 19, () => t(W).annotations, (e, t) => e.label + t, (e, n, i) => {
|
|
2588
|
+
let a = D(() => t(n).placement === "left" ? -8 : t(n).placement === "right" ? 8 : 0), o = D(() => t(n).placement === "bottom" ? 14 : t(n).placement === "top" ? -8 : 0), s = D(() => t(n).placement === "left" ? "end" : t(n).placement === "right" ? "start" : "middle"), c = D(() => t(Ei) && !!u.onAnnotationRemove), f = D(() => Math.max(14, t(n).label.length * 6.2 + 8));
|
|
2589
|
+
var m = bn();
|
|
2590
|
+
let g;
|
|
2591
|
+
var ee = y(m), v = (e) => {
|
|
2592
|
+
var i = gn(), a = O(i), o = E(a), s = E(o), c = y(s, !0);
|
|
2593
|
+
w(s), _(() => {
|
|
2594
|
+
C(a, "x1", t(n).x), C(a, "y1", t(n).y), C(a, "x2", t(n).x), C(a, "y2", t(n).y - 24), C(a, "stroke", t(n).color), C(o, "x", t(n).x), C(o, "y", t(n).y - 24), C(o, "width", t(f)), C(o, "fill", t(n).color), C(s, "x", t(n).x + t(f) / 2), C(s, "y", t(n).y - 14.5), l(c, t(n).label);
|
|
2595
|
+
}), r(e, i);
|
|
2596
|
+
}, te = (e) => {
|
|
2597
|
+
var i = _n(), c = O(i), u = E(c), d = y(u, !0);
|
|
2598
|
+
w(u);
|
|
2599
|
+
var f = E(u), p = y(f, !0);
|
|
2600
|
+
w(f), _((e) => {
|
|
2601
|
+
C(c, "d", `M${t(n).x},${t(n).y} c-7,-9 -8,-13 -8,-16 a8,8 0 1,1 16,0 c0,3 -1,7 -8,16 z`), C(c, "fill", t(n).color), C(u, "x", t(n).x), C(u, "y", t(n).y - 12.5), l(d, e), C(f, "x", t(n).x + t(a)), C(f, "y", t(n).y + t(o)), C(f, "text-anchor", t(s)), C(f, "fill", t(n).color), l(p, t(n).label);
|
|
2602
|
+
}, [() => t(n).label.slice(0, 1)]), r(e, i);
|
|
2603
|
+
}, S = (e) => {
|
|
2604
|
+
var i = vn(), c = O(i), u = E(c), d = y(u, !0);
|
|
2605
|
+
w(u), _(() => {
|
|
2606
|
+
C(c, "x", t(n).x - 4.5), C(c, "y", t(n).y - 4.5), C(c, "fill", t(n).color), C(u, "x", t(n).x + t(a)), C(u, "y", t(n).y + t(o)), C(u, "text-anchor", t(s)), C(u, "fill", t(n).color), l(d, t(n).label);
|
|
2607
|
+
}), r(e, i);
|
|
2608
|
+
}, ne = (e) => {
|
|
2609
|
+
var i = yn(), u = O(i), d = E(u), f = y(d, !0);
|
|
2610
|
+
w(d), _(() => {
|
|
2611
|
+
C(u, "cx", t(n).x), C(u, "cy", t(n).y), C(u, "r", t(c) ? 6 : 4), C(u, "fill", t(n).color), C(d, "x", t(n).x + t(a)), C(d, "y", t(n).y + t(o)), C(d, "text-anchor", t(s)), C(d, "fill", t(n).color), l(f, t(n).label);
|
|
2612
|
+
}), r(e, i);
|
|
2613
|
+
};
|
|
2614
|
+
x(ee, (e) => {
|
|
2615
|
+
t(n).shape === "flag" ? e(v) : t(n).shape === "pin" ? e(te, 1) : t(n).shape === "square" ? e(S, 2) : e(ne, -1);
|
|
2616
|
+
}), w(m), _((e) => {
|
|
2617
|
+
g = d(m, 0, "sv-grid-chart-annotation-marker svelte-kvdein", null, g, {
|
|
2618
|
+
"is-removable": t(c),
|
|
2619
|
+
"has-text": !!t(n).text
|
|
2620
|
+
}), C(m, "role", t(c) ? "button" : t(n).text ? "img" : void 0), C(m, "tabindex", t(c) || t(n).text ? 0 : void 0), C(m, "aria-label", e);
|
|
2621
|
+
}, [() => t(c) ? F(t(I).removeNote, { label: t(n).label }) : t(n).text ? `${t(n).label}: ${t(n).text}` : void 0]), p("click", m, (e) => {
|
|
2622
|
+
!t(Ei) || !u.onAnnotationRemove || (e.stopPropagation(), u.onAnnotationRemove(t(i)));
|
|
2623
|
+
}), p("keydown", m, (e) => {
|
|
2624
|
+
!t(Ei) || !u.onAnnotationRemove || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), u.onAnnotationRemove(t(i)));
|
|
2625
|
+
}), h("mouseenter", m, (e) => {
|
|
2626
|
+
t(n).text && Z(e.clientX, e.clientY, t(n).label, [{ value: t(n).text }]);
|
|
2627
|
+
}), h("mouseleave", m, () => {
|
|
2628
|
+
t(n).text && b(X, null);
|
|
2629
|
+
}), h("focus", m, () => {
|
|
2630
|
+
if (!t(n).text || !t(z)) return;
|
|
2631
|
+
let e = t(z).getBoundingClientRect();
|
|
2632
|
+
Z(e.left + t(n).x * e.width / t(W).width, e.top + t(n).y * e.height / t(W).height, t(n).label, [{ value: t(n).text }]);
|
|
2633
|
+
}), h("blur", m, () => {
|
|
2634
|
+
t(n).text && b(X, null);
|
|
2635
|
+
}), r(e, m);
|
|
2636
|
+
});
|
|
2637
|
+
var Bc = E(zc), Vc = (e) => {
|
|
2638
|
+
var n = Nn(), i = y(n);
|
|
2639
|
+
c(i, 17, () => t(W).drawings, (e) => e.id, (e, n) => {
|
|
2640
|
+
let i = D(() => t(n).points[0]), a = D(() => t(n).points[1]), s = D(() => t(ma) === t(n).id);
|
|
2641
|
+
var u = kn();
|
|
2642
|
+
let f;
|
|
2643
|
+
var m = y(u), h = (e) => {
|
|
2644
|
+
let o = D(() => Math.atan2(t(a).y - t(i).y, t(a).x - t(i).x));
|
|
2645
|
+
var s = Sn(), c = O(s), l = E(c), u = E(l), d = (e) => {
|
|
2646
|
+
var i = xn();
|
|
2647
|
+
_((e) => {
|
|
2648
|
+
C(i, "d", e), C(i, "fill", t(n).color);
|
|
2649
|
+
}, [() => `M${t(a).x},${t(a).y} L${t(a).x - 10 * Math.cos(t(o) - .45)},${t(a).y - 10 * Math.sin(t(o) - .45)} L${t(a).x - 10 * Math.cos(t(o) + .45)},${t(a).y - 10 * Math.sin(t(o) + .45)} Z`]), r(e, i);
|
|
2650
|
+
};
|
|
2651
|
+
x(u, (e) => {
|
|
2652
|
+
t(n).kind === "arrow" && e(d);
|
|
2653
|
+
}), _(() => {
|
|
2654
|
+
C(c, "x1", t(i).x), C(c, "y1", t(i).y), C(c, "x2", t(a).x), C(c, "y2", t(a).y), C(l, "x1", t(i).x), C(l, "y1", t(i).y), C(l, "x2", t(a).x), C(l, "y2", t(a).y), C(l, "stroke", t(n).color);
|
|
2655
|
+
}), r(e, s);
|
|
2656
|
+
}, g = (e) => {
|
|
2657
|
+
var o = Cn();
|
|
2658
|
+
_((e, r, i, a) => {
|
|
2659
|
+
C(o, "x", e), C(o, "y", r), C(o, "width", i), C(o, "height", a), C(o, "fill", t(n).color), C(o, "stroke", t(n).color);
|
|
2660
|
+
}, [
|
|
2661
|
+
() => Math.min(t(i).x, t(a).x),
|
|
2662
|
+
() => Math.min(t(i).y, t(a).y),
|
|
2663
|
+
() => Math.abs(t(a).x - t(i).x),
|
|
2664
|
+
() => Math.abs(t(a).y - t(i).y)
|
|
2665
|
+
]), r(e, o);
|
|
2666
|
+
}, ee = (e) => {
|
|
2667
|
+
var a = wn(), o = O(a), s = E(o), c = E(s), u = y(c, !0);
|
|
2668
|
+
w(c), _(() => {
|
|
2669
|
+
C(o, "x1", t(i).x), C(o, "y1", t(i).y), C(o, "x2", t(W).plot.x + t(W).plot.w), C(o, "y2", t(i).y), C(s, "x1", t(i).x), C(s, "y1", t(i).y), C(s, "x2", t(W).plot.x + t(W).plot.w), C(s, "y2", t(i).y), C(s, "stroke", t(n).color), C(c, "x", t(W).plot.x + t(W).plot.w - 3), C(c, "y", t(i).y - 3), C(c, "fill", t(n).color), l(u, t(n).label);
|
|
2670
|
+
}), r(e, a);
|
|
2671
|
+
}, v = (e) => {
|
|
2672
|
+
let o = D(() => Math.min(t(i).x, t(a).x)), s = D(() => Math.max(t(i).x, t(a).x));
|
|
2673
|
+
var u = En(), d = O(u);
|
|
2674
|
+
c(d, 17, () => t(n).levels, (e) => e.ratio, (e, i) => {
|
|
2675
|
+
var a = Tn(), c = O(a), u = E(c), d = y(u, !0);
|
|
2676
|
+
w(u), _(() => {
|
|
2677
|
+
C(c, "x1", t(o)), C(c, "y1", t(i).y), C(c, "x2", t(s)), C(c, "y2", t(i).y), C(c, "stroke", t(n).color), C(c, "stroke-dasharray", t(i).ratio === 0 || t(i).ratio === 1 ? void 0 : "3 3"), C(u, "x", t(o) + 3), C(u, "y", t(i).y - 2), C(u, "fill", t(n).color), l(d, t(i).label);
|
|
2678
|
+
}), r(e, a);
|
|
2679
|
+
});
|
|
2680
|
+
var f = E(d);
|
|
2681
|
+
_((e, n) => {
|
|
2682
|
+
C(f, "x", t(o)), C(f, "y", e), C(f, "width", t(s) - t(o)), C(f, "height", n);
|
|
2683
|
+
}, [() => Math.min(t(i).y, t(a).y), () => Math.abs(t(a).y - t(i).y)]), r(e, u);
|
|
2684
|
+
}, te = (e) => {
|
|
2685
|
+
var a = Dn(), o = y(a, !0);
|
|
2686
|
+
w(a), _(() => {
|
|
2687
|
+
C(a, "x", t(i).x), C(a, "y", t(i).y), C(a, "fill", t(n).color), l(o, t(n).text ?? "");
|
|
2688
|
+
}), r(e, a);
|
|
2689
|
+
};
|
|
2690
|
+
x(m, (e) => {
|
|
2691
|
+
(t(n).kind === "trend" || t(n).kind === "arrow") && t(a) ? e(h) : t(n).kind === "rect" && t(a) ? e(g, 1) : t(n).kind === "hray" ? e(ee, 2) : t(n).kind === "fib" && t(a) && t(n).levels ? e(v, 3) : t(n).kind === "text" && e(te, 4);
|
|
2692
|
+
});
|
|
2693
|
+
var ne = E(m), T = (e) => {
|
|
2694
|
+
var i = o(), a = O(i);
|
|
2695
|
+
c(a, 17, () => t(n).points, S, (e, i, a) => {
|
|
2696
|
+
var o = On();
|
|
2697
|
+
_(() => {
|
|
2698
|
+
C(o, "cx", t(i).x), C(o, "cy", t(i).y), C(o, "stroke", t(n).color);
|
|
2699
|
+
}), p("pointerdown", o, (e) => {
|
|
2700
|
+
e.stopPropagation(), e.preventDefault(), b(va, {
|
|
2701
|
+
id: t(n).id,
|
|
2702
|
+
index: a
|
|
2703
|
+
}, !0), t(z)?.setPointerCapture?.(e.pointerId);
|
|
2704
|
+
}), r(e, o);
|
|
2705
|
+
}), r(e, i);
|
|
2706
|
+
};
|
|
2707
|
+
x(ne, (e) => {
|
|
2708
|
+
t(s) && ii() && e(T);
|
|
2709
|
+
}), w(u), _((e) => {
|
|
2710
|
+
f = d(u, 0, `sv-grid-chart-drawing is-${t(n).kind}`, "svelte-kvdein", f, { "is-selected": t(s) }), C(u, "role", ii() ? "button" : void 0), C(u, "tabindex", ii() ? 0 : void 0), C(u, "aria-label", e);
|
|
2711
|
+
}, [() => ii() ? `${F(t(I).drawing, { tool: t(da)[t(n).kind] })}${t(n).text ? `: ${t(n).text}` : ""}` : void 0]), p("click", u, (e) => {
|
|
2712
|
+
ii() && !t(B) && (e.stopPropagation(), b(ma, t(s) ? null : t(n).id, !0));
|
|
2713
|
+
}), p("keydown", u, (e) => {
|
|
2714
|
+
ii() && Oa(e, t(n).id);
|
|
2715
|
+
}), r(e, u);
|
|
2716
|
+
});
|
|
2717
|
+
var a = E(i), s = (e) => {
|
|
2718
|
+
var n = Mn(), i = O(n), a = E(i), o = (e) => {
|
|
2719
|
+
var n = An();
|
|
2720
|
+
_((e, t, r, i) => {
|
|
2721
|
+
C(n, "x", e), C(n, "y", t), C(n, "width", r), C(n, "height", i);
|
|
2722
|
+
}, [
|
|
2723
|
+
() => Math.min(t(V).px, t(pa).x),
|
|
2724
|
+
() => Math.min(t(V).py, t(pa).y),
|
|
2725
|
+
() => Math.abs(t(pa).x - t(V).px),
|
|
2726
|
+
() => Math.abs(t(pa).y - t(V).py)
|
|
2727
|
+
]), r(e, n);
|
|
2728
|
+
}, s = (e) => {
|
|
2729
|
+
var n = jn();
|
|
2730
|
+
_(() => {
|
|
2731
|
+
C(n, "x1", t(V).px), C(n, "y1", t(V).py), C(n, "x2", t(pa).x), C(n, "y2", t(pa).y);
|
|
2732
|
+
}), r(e, n);
|
|
2733
|
+
};
|
|
2734
|
+
x(a, (e) => {
|
|
2735
|
+
t(B) === "rect" ? e(o) : e(s, -1);
|
|
2736
|
+
}), _(() => {
|
|
2737
|
+
C(i, "cx", t(V).px), C(i, "cy", t(V).py);
|
|
2738
|
+
}), r(e, n);
|
|
2739
|
+
};
|
|
2740
|
+
x(a, (e) => {
|
|
2741
|
+
t(V) && t(pa) && e(s);
|
|
2742
|
+
}), w(n), _(() => C(n, "clip-path", `url(#${Fi}-plot)`)), r(e, n);
|
|
2743
|
+
};
|
|
2744
|
+
x(Bc, (e) => {
|
|
2745
|
+
(t(W).drawings.length || t(V)) && e(Vc);
|
|
2746
|
+
});
|
|
2747
|
+
var Hc = E(Bc), Uc = (e) => {
|
|
2748
|
+
var n = o(), i = O(n), a = (e) => {
|
|
2749
|
+
let n = D(() => t(W).plot.y + t(Do) * t(ps) + t(Do) / 2);
|
|
2750
|
+
var i = Pn();
|
|
2751
|
+
_(() => {
|
|
2752
|
+
C(i, "x1", t(W).plot.x), C(i, "y1", t(n)), C(i, "x2", t(W).plot.x + t(W).plot.w), C(i, "y2", t(n));
|
|
2753
|
+
}), r(e, i);
|
|
2754
|
+
}, s = (e) => {
|
|
2755
|
+
let n = D(() => t(W).lines[0]?.points[t(ps)]), i = D(() => t(n) && Number.isFinite(t(n).x) ? t(n).x : t(W).plot.x + t(Do) * t(ps) + t(Do) / 2);
|
|
2756
|
+
var a = Ln(), o = O(a), s = E(o), c = (e) => {
|
|
2757
|
+
let n = D(() => cs(t(X)?.title ?? t(U).categories[t(ps)] ?? "", 16)), a = D(() => Math.max(24, t(n).length * 6.2 + 10));
|
|
2758
|
+
var o = In(), s = O(o), c = y(s), u = E(c), d = y(u, !0);
|
|
2759
|
+
w(u), w(s);
|
|
2760
|
+
var f = E(s), p = (e) => {
|
|
2761
|
+
let n = D(() => _s(t(mo).yInvert(t(gs)))), i = D(() => Math.max(24, t(n).length * 6.2 + 10));
|
|
2762
|
+
var a = Fn(), o = y(a), s = E(o), c = y(s, !0);
|
|
2763
|
+
w(s), w(a), _((e, r) => {
|
|
2764
|
+
C(o, "x", e), C(o, "y", t(gs) - 7.5), C(o, "width", t(i)), C(s, "x", r), C(s, "y", t(gs) + 3.5), l(c, t(n));
|
|
2765
|
+
}, [() => Math.max(0, t(W).plot.x - t(i) - 2), () => Math.max(t(i) / 2, t(W).plot.x - 2 - t(i) / 2)]), r(e, a);
|
|
2766
|
+
};
|
|
2767
|
+
x(f, (e) => {
|
|
2768
|
+
t(gs) != null && t(mo) && t(W).axes && e(p);
|
|
2769
|
+
}), _((e, r) => {
|
|
2770
|
+
C(c, "x", e), C(c, "y", t(W).plot.y + t(W).plot.h + 2), C(c, "width", t(a)), C(u, "x", r), C(u, "y", t(W).plot.y + t(W).plot.h + 13), l(d, t(n));
|
|
2771
|
+
}, [() => Math.max(0, Math.min(t(W).width - t(a), t(i) - t(a) / 2)), () => Math.max(t(a) / 2, Math.min(t(W).width - t(a) / 2, t(i)))]), r(e, o);
|
|
2772
|
+
};
|
|
2773
|
+
x(s, (e) => {
|
|
2774
|
+
$r() && e(c);
|
|
2775
|
+
}), _(() => {
|
|
2776
|
+
C(o, "x1", t(i)), C(o, "y1", t(W).plot.y), C(o, "x2", t(i)), C(o, "y2", t(W).plot.y + t(W).plot.h);
|
|
2777
|
+
}), r(e, a);
|
|
2778
|
+
};
|
|
2779
|
+
x(i, (e) => {
|
|
2780
|
+
t(K) ? e(a) : e(s, -1);
|
|
2781
|
+
}), r(e, n);
|
|
2782
|
+
};
|
|
2783
|
+
x(Hc, (e) => {
|
|
2784
|
+
t(G) && t(ps) !== null && e(Uc);
|
|
2785
|
+
});
|
|
2786
|
+
var Wc = E(Hc), Gc = (e) => {
|
|
2787
|
+
var n = Wn(), i = O(n);
|
|
2788
|
+
c(i, 17, () => t(W).heatmapRowTicks, (e) => e.value, (e, n, i, a) => {
|
|
2789
|
+
var o = Rn(), s = y(o, !0);
|
|
2790
|
+
w(o), _((e) => {
|
|
2791
|
+
C(o, "x", t(W).plot.x - 8), C(o, "y", t(n).y + 3), l(s, e);
|
|
2792
|
+
}, [() => cs(t(n).label, 22)]), r(e, o);
|
|
2793
|
+
});
|
|
2794
|
+
var a = E(i);
|
|
2795
|
+
c(a, 19, () => t(W).heatmapColTicks, (e, t) => e.label + t, (e, n, i, a) => {
|
|
2796
|
+
var o = zn(), s = y(o, !0);
|
|
2797
|
+
w(o), _((e) => {
|
|
2798
|
+
C(o, "x", t(n).x), C(o, "y", t(W).plot.y + t(W).plot.h + 14), l(s, e);
|
|
2799
|
+
}, [() => cs(t(n).label, 14)]), r(e, o);
|
|
2800
|
+
});
|
|
2801
|
+
var o = E(a);
|
|
2802
|
+
c(o, 17, () => t(W).heatmapCells, S, (e, n, i) => {
|
|
2803
|
+
var a = Vn(), o = O(a), s = E(o), c = (e) => {
|
|
2804
|
+
var i = Bn(), a = y(i, !0);
|
|
2805
|
+
w(i), _((e) => {
|
|
2806
|
+
C(i, "x", t(n).x + t(n).w / 2), C(i, "y", t(n).y + t(n).h / 2 + 3), C(i, "fill", t(n).textColor), l(a, e);
|
|
2807
|
+
}, [() => R(t(n).value)]), r(e, i);
|
|
2808
|
+
};
|
|
2809
|
+
x(s, (e) => {
|
|
2810
|
+
t(Si).show && t(n).w > 22 && t(n).h > 14 && e(c);
|
|
2811
|
+
}), _((e, r) => {
|
|
2812
|
+
C(o, "x", t(n).x), C(o, "y", t(n).y), C(o, "width", t(n).w), C(o, "height", t(n).h), C(o, "fill", t(n).color), C(o, "role", u.onSelect || t(J) ? "button" : "img"), C(o, "tabindex", e), C(o, "aria-label", r);
|
|
2813
|
+
}, [() => Rs(".sv-grid-chart-heatcell", i), () => `${t(n).rowLabel} ${t(n).colLabel}: ${R(t(n).value)}`]), p("mousemove", o, (e) => Es(e.clientX, e.clientY, t(n))), h("mouseleave", o, Q), h("focus", o, (e) => {
|
|
2814
|
+
zs(".sv-grid-chart-heatcell", i);
|
|
2815
|
+
let r = Vs(e.currentTarget);
|
|
2816
|
+
Es(r.x, r.y, t(n));
|
|
2817
|
+
}), h("blur", o, Q), p("click", o, () => Ps(t(n).colLabel, t(n).rowLabel, t(n).value)), p("keydown", o, (e) => Bs(e, ".sv-grid-chart-heatcell", i, u.onSelect || t(J) ? () => Ps(t(n).colLabel, t(n).rowLabel, t(n).value) : null, { cols: t(W).heatmapColTicks.length })), r(e, a);
|
|
2818
|
+
});
|
|
2819
|
+
var s = E(o), d = (e) => {
|
|
2820
|
+
let n = D(() => t(W).plot.x + t(W).plot.w + 14), i = D(() => t(W).plot.h - 20), a = D(() => t(W).heatmapLegend);
|
|
2821
|
+
var o = Un(), s = O(o), u = y(s);
|
|
2822
|
+
c(u, 21, () => t(a), S, (e, n, i) => {
|
|
2823
|
+
var o = Hn();
|
|
2824
|
+
_(() => {
|
|
2825
|
+
C(o, "offset", `${i / (t(a).length - 1) * 100}%`), C(o, "stop-color", t(n).color);
|
|
2826
|
+
}), r(e, o);
|
|
2827
|
+
}), w(u), w(s);
|
|
2828
|
+
var d = E(s), f = E(d), p = y(f, !0);
|
|
2829
|
+
w(f);
|
|
2830
|
+
var m = E(f), h = y(m, !0);
|
|
2831
|
+
w(m), _(() => {
|
|
2832
|
+
C(u, "id", `${Fi}-heatscale`), C(d, "x", t(n)), C(d, "y", t(W).plot.y + 10), C(d, "height", t(i)), C(d, "fill", `url(#${Fi}-heatscale)`), C(f, "x", t(n) + 14), C(f, "y", t(W).plot.y + 14), l(p, t(a)[t(a).length - 1].label), C(m, "x", t(n) + 14), C(m, "y", t(W).plot.y + 10 + t(i)), l(h, t(a)[0].label);
|
|
2833
|
+
}), r(e, o);
|
|
2834
|
+
};
|
|
2835
|
+
x(s, (e) => {
|
|
2836
|
+
t(W).heatmapLegend.length && e(d);
|
|
2837
|
+
}), r(e, n);
|
|
2838
|
+
};
|
|
2839
|
+
x(Wc, (e) => {
|
|
2840
|
+
t(bo) && e(Gc);
|
|
2841
|
+
});
|
|
2842
|
+
var Kc = E(Wc), qc = (e) => {
|
|
2843
|
+
var n = o(), i = O(n);
|
|
2844
|
+
c(i, 17, () => t(W).funnelSegments, S, (e, n, i) => {
|
|
2845
|
+
var a = Kn(), o = O(a), s = E(o), c = (e) => {
|
|
2846
|
+
var i = Gn(), a = O(i), o = y(a, !0);
|
|
2847
|
+
w(a);
|
|
2848
|
+
var s = E(a), c = y(s);
|
|
2849
|
+
w(s), _((e, r, i) => {
|
|
2850
|
+
C(a, "x", t(n).cx), C(a, "y", t(n).cy - 3), C(a, "fill", t(n).textColor), l(o, e), C(s, "x", t(n).cx), C(s, "y", t(n).cy + 11), C(s, "fill", t(n).textColor), l(c, `${r ?? ""} · ${i ?? ""}%`);
|
|
2851
|
+
}, [
|
|
2852
|
+
() => cs(t(n).label, 24),
|
|
2853
|
+
() => R(t(n).value),
|
|
2854
|
+
() => (t(n).conversion * 100).toFixed(0)
|
|
2855
|
+
]), r(e, i);
|
|
2856
|
+
}, d = D(() => t(W).plot.h / Math.max(1, t(W).funnelSegments.length) >= 26);
|
|
2857
|
+
x(s, (e) => {
|
|
2858
|
+
t(d) && e(c);
|
|
2859
|
+
}), _((e, r) => {
|
|
2860
|
+
C(o, "d", t(n).path), C(o, "fill", t(n).color), C(o, "role", u.onSelect || t(J) ? "button" : "img"), C(o, "tabindex", e), C(o, "aria-label", r);
|
|
2861
|
+
}, [() => Rs(".sv-grid-chart-funnel-seg", i), () => `${t(n).label}: ${R(t(n).value)}`]), p("mousemove", o, (e) => Ds(e.clientX, e.clientY, t(n))), h("mouseleave", o, Q), h("focus", o, (e) => {
|
|
2862
|
+
zs(".sv-grid-chart-funnel-seg", i);
|
|
2863
|
+
let r = Vs(e.currentTarget);
|
|
2864
|
+
Ds(r.x, r.y, t(n));
|
|
2865
|
+
}), h("blur", o, Q), p("click", o, () => Ps(t(n).label, t(n).label, t(n).value, i)), p("keydown", o, (e) => Bs(e, ".sv-grid-chart-funnel-seg", i, u.onSelect || t(J) ? () => Ps(t(n).label, t(n).label, t(n).value, i) : null)), r(e, a);
|
|
2866
|
+
}), r(e, n);
|
|
2867
|
+
};
|
|
2868
|
+
x(Kc, (e) => {
|
|
2869
|
+
t(xo) && e(qc);
|
|
2870
|
+
});
|
|
2871
|
+
var Jc = E(Kc), Yc = (e) => {
|
|
2872
|
+
let n = D(() => t(W).radarCenter);
|
|
2873
|
+
var i = Zn(), a = O(i);
|
|
2874
|
+
c(a, 17, () => t(W).radarRings, S, (e, i, a) => {
|
|
2875
|
+
let o = D(() => t(n).r * ((a + 1) / t(W).radarRings.length));
|
|
2876
|
+
var s = qn();
|
|
2877
|
+
_(() => {
|
|
2878
|
+
C(s, "cx", t(n).cx), C(s, "cy", t(n).cy), C(s, "r", t(o));
|
|
2879
|
+
}), r(e, s);
|
|
2880
|
+
});
|
|
2881
|
+
var o = E(a);
|
|
2882
|
+
c(o, 17, () => t(W).radarAxes, S, (e, i) => {
|
|
2883
|
+
let a = D(() => t(i).x - t(n).cx), o = D(() => t(i).y - t(n).cy), s = D(() => t(n).cx + t(a) * 1.08), c = D(() => t(n).cy + t(o) * 1.08);
|
|
2884
|
+
var u = Jn(), d = O(u), f = E(d), p = y(f, !0);
|
|
2885
|
+
w(f), _((e) => {
|
|
2886
|
+
C(d, "x1", t(n).cx), C(d, "y1", t(n).cy), C(d, "x2", t(i).x), C(d, "y2", t(i).y), C(f, "x", t(s)), C(f, "y", t(c) + 3), C(f, "text-anchor", e), l(p, t(i).label);
|
|
2887
|
+
}, [() => Math.abs(t(a)) < 1 ? "middle" : t(a) > 0 ? "start" : "end"]), r(e, u);
|
|
2888
|
+
});
|
|
2889
|
+
var s = E(o);
|
|
2890
|
+
c(s, 17, () => t(W).radarSeries, S, (e, n, i) => {
|
|
2891
|
+
var a = Xn(), o = O(a), s = E(o);
|
|
2892
|
+
c(s, 17, () => t(n).points, S, (e, a, o) => {
|
|
2893
|
+
let s = D(() => i * t(n).points.length + o);
|
|
2894
|
+
var c = Yn();
|
|
2895
|
+
_((e, r) => {
|
|
2896
|
+
C(c, "cx", t(a).x), C(c, "cy", t(a).y), C(c, "fill", t(n).color), C(c, "tabindex", e), C(c, "aria-label", r);
|
|
2897
|
+
}, [() => Rs(".sv-grid-chart-radar-dot", t(s)), () => `${t(n).label} ${t(a).axis}: ${R(t(a).value)}`]), p("mousemove", c, (e) => Ms(e.clientX, e.clientY, t(n).label, t(a).axis, t(a).value, t(n).color)), h("mouseleave", c, Q), h("focus", c, (e) => {
|
|
2898
|
+
zs(".sv-grid-chart-radar-dot", t(s));
|
|
2899
|
+
let r = Vs(e.currentTarget);
|
|
2900
|
+
Ms(r.x, r.y, t(n).label, t(a).axis, t(a).value, t(n).color);
|
|
2901
|
+
}), h("blur", c, Q), p("keydown", c, (e) => Bs(e, ".sv-grid-chart-radar-dot", t(s))), r(e, c);
|
|
2902
|
+
}), _((e) => {
|
|
2903
|
+
C(o, "d", t(n).path), C(o, "fill", t(n).color), C(o, "stroke", t(n).color), k(o, e);
|
|
2904
|
+
}, [() => `opacity:${q(t(n).label)}`]), r(e, a);
|
|
2905
|
+
}), r(e, i);
|
|
2906
|
+
};
|
|
2907
|
+
x(Jc, (e) => {
|
|
2908
|
+
t(So) && t(W).radarCenter && e(Yc);
|
|
2909
|
+
});
|
|
2910
|
+
var Xc = E(Jc), Zc = (e) => {
|
|
2911
|
+
var n = rr(), i = O(n);
|
|
2912
|
+
c(i, 17, () => t(W).calendarMonthTicks, S, (e, n, i, a) => {
|
|
2913
|
+
var o = Qn(), s = y(o, !0);
|
|
2914
|
+
w(o), _(() => {
|
|
2915
|
+
C(o, "x", t(n).x), C(o, "y", t(W).plot.y - 8), l(s, t(n).label);
|
|
2916
|
+
}), r(e, o);
|
|
2917
|
+
});
|
|
2918
|
+
var a = E(i);
|
|
2919
|
+
c(a, 16, () => [
|
|
2920
|
+
"Mon",
|
|
2921
|
+
"Wed",
|
|
2922
|
+
"Fri"
|
|
2923
|
+
], S, (e, n, i) => {
|
|
2924
|
+
let a = D(() => [
|
|
2925
|
+
1,
|
|
2926
|
+
3,
|
|
2927
|
+
5
|
|
2928
|
+
][i]), s = D(() => t(W).calendarCells[t(a)]);
|
|
2929
|
+
var c = o(), u = O(c), d = (e) => {
|
|
2930
|
+
var i = $n(), a = y(i, !0);
|
|
2931
|
+
w(i), _(() => {
|
|
2932
|
+
C(i, "x", t(W).plot.x - 6), C(i, "y", t(s).y + t(s).size / 2 + 3), l(a, n);
|
|
2933
|
+
}), r(e, i);
|
|
2934
|
+
};
|
|
2935
|
+
x(u, (e) => {
|
|
2936
|
+
t(s) && e(d);
|
|
2937
|
+
}), r(e, c);
|
|
2938
|
+
});
|
|
2939
|
+
var s = E(a);
|
|
2940
|
+
c(s, 17, () => t(W).calendarCells, S, (e, n, i) => {
|
|
2941
|
+
var a = er();
|
|
2942
|
+
let o;
|
|
2943
|
+
_((e, r) => {
|
|
2944
|
+
o = d(a, 0, "sv-grid-chart-calendar-cell svelte-kvdein", null, o, { "is-blank": !t(n).defined }), C(a, "x", t(n).x + 1), C(a, "y", t(n).y + 1), C(a, "width", t(n).size - 2), C(a, "height", t(n).size - 2), C(a, "fill", t(n).defined ? t(n).color : "transparent"), C(a, "tabindex", e), C(a, "aria-label", r);
|
|
2945
|
+
}, [() => Rs(".sv-grid-chart-calendar-cell", i), () => `${bs(t(n).date)}: ${t(n).defined ? R(t(n).value) : t(I).noValue}`]), p("mousemove", a, (e) => t(n).defined && Z(e.clientX, e.clientY, bs(t(n).date), [{
|
|
2946
|
+
color: t(n).color,
|
|
2947
|
+
value: R(t(n).value)
|
|
2948
|
+
}])), h("mouseleave", a, Q), h("focus", a, (e) => {
|
|
2949
|
+
if (zs(".sv-grid-chart-calendar-cell", i), t(n).defined) {
|
|
2950
|
+
let r = Vs(e.currentTarget);
|
|
2951
|
+
Z(r.x, r.y, bs(t(n).date), [{
|
|
2952
|
+
color: t(n).color,
|
|
2953
|
+
value: R(t(n).value)
|
|
2954
|
+
}]);
|
|
2955
|
+
}
|
|
2956
|
+
}), h("blur", a, Q), p("keydown", a, (e) => Bs(e, ".sv-grid-chart-calendar-cell", i, null, {
|
|
2957
|
+
cols: 7,
|
|
2958
|
+
colMajor: !0
|
|
2959
|
+
})), r(e, a);
|
|
2960
|
+
});
|
|
2961
|
+
var u = E(s), f = (e) => {
|
|
2962
|
+
let n = D(() => t(W).plot.x + t(W).plot.w + 12), i = D(() => t(W).plot.y + 4);
|
|
2963
|
+
var a = nr(), o = O(a), s = E(o);
|
|
2964
|
+
c(s, 17, () => t(W).calendarLegend, S, (e, a, o) => {
|
|
2965
|
+
var s = tr(), c = O(s), u = E(c), d = y(u, !0);
|
|
2966
|
+
w(u), _(() => {
|
|
2967
|
+
C(c, "x", t(n)), C(c, "y", t(i) + 6 + o * 13), C(c, "fill", t(a).color), C(u, "x", t(n) + 14), C(u, "y", t(i) + 14 + o * 13), l(d, t(a).label);
|
|
2968
|
+
}), r(e, s);
|
|
2969
|
+
});
|
|
2970
|
+
var u = E(s);
|
|
2971
|
+
_(() => {
|
|
2972
|
+
C(o, "x", t(n)), C(o, "y", t(i)), C(u, "x", t(n)), C(u, "y", t(i) + 12 + t(W).calendarLegend.length * 13);
|
|
2973
|
+
}), r(e, a);
|
|
2974
|
+
};
|
|
2975
|
+
x(u, (e) => {
|
|
2976
|
+
t(W).calendarLegend.length && e(f);
|
|
2977
|
+
}), r(e, n);
|
|
2978
|
+
};
|
|
2979
|
+
x(Xc, (e) => {
|
|
2980
|
+
t(Co) && e(Zc);
|
|
2981
|
+
});
|
|
2982
|
+
var Qc = E(Xc), $c = (e) => {
|
|
2983
|
+
let n = D(() => t(W).gauge);
|
|
2984
|
+
var i = sr(), a = O(i);
|
|
2985
|
+
c(a, 17, () => t(n).ticks, S, (e, n) => {
|
|
2986
|
+
var i = ir();
|
|
2987
|
+
let a;
|
|
2988
|
+
_(() => {
|
|
2989
|
+
a = d(i, 0, "sv-grid-chart-gauge-tick svelte-kvdein", null, a, { "is-major": t(n).major }), C(i, "x1", t(n).x1), C(i, "y1", t(n).y1), C(i, "x2", t(n).x2), C(i, "y2", t(n).y2);
|
|
2990
|
+
}), r(e, i);
|
|
2991
|
+
});
|
|
2992
|
+
var o = E(a), s = E(o);
|
|
2993
|
+
c(s, 17, () => t(n).rangePaths, S, (e, n) => {
|
|
2994
|
+
var i = ar();
|
|
2995
|
+
_(() => {
|
|
2996
|
+
C(i, "d", t(n).path), C(i, "stroke", t(n).color);
|
|
2997
|
+
}), r(e, i);
|
|
2998
|
+
});
|
|
2999
|
+
var u = E(s), f = E(u), p = (e) => {
|
|
3000
|
+
var i = or();
|
|
3001
|
+
_(() => {
|
|
3002
|
+
C(i, "x1", t(n).target.x1), C(i, "y1", t(n).target.y1), C(i, "x2", t(n).target.x2), C(i, "y2", t(n).target.y2);
|
|
3003
|
+
}), r(e, i);
|
|
3004
|
+
};
|
|
3005
|
+
x(f, (e) => {
|
|
3006
|
+
t(n).target && e(p);
|
|
3007
|
+
});
|
|
3008
|
+
var m = E(f), h = E(m), g = E(h), ee = E(g), v = y(ee, !0);
|
|
3009
|
+
w(ee);
|
|
3010
|
+
var te = E(ee), b = y(te, !0);
|
|
3011
|
+
w(te);
|
|
3012
|
+
var ne = E(te), T = y(ne);
|
|
3013
|
+
w(ne), _((e, r, i, a) => {
|
|
3014
|
+
C(o, "d", t(n).trackPath), C(u, "d", t(n).valuePath), C(u, "stroke", t(n).valueColor ?? "var(--sg-accent, #2563eb)"), C(m, "d", t(n).needle.path), C(h, "cx", t(n).cx), C(h, "cy", t(n).cy), C(h, "r", t(n).needle.hubR), C(g, "cx", t(n).cx), C(g, "cy", t(n).cy), C(ee, "x", t(n).minLabel.x), C(ee, "y", t(n).minLabel.y), l(v, e), C(te, "x", t(n).maxLabel.x), C(te, "y", t(n).maxLabel.y), l(b, r), C(ne, "x", t(n).cx), C(ne, "y", t(n).cy + 38), l(T, `${i ?? ""}${a ?? ""}`);
|
|
3015
|
+
}, [
|
|
3016
|
+
() => R(t(n).min),
|
|
3017
|
+
() => R(t(n).max),
|
|
3018
|
+
() => R(t(n).value),
|
|
3019
|
+
() => t(n).unit ? /^[%°′″]/.test(t(n).unit) ? t(n).unit : ` ${t(n).unit}` : ""
|
|
3020
|
+
]), r(e, i);
|
|
3021
|
+
};
|
|
3022
|
+
x(Qc, (e) => {
|
|
3023
|
+
t(wo) && t(W).gauge && e($c);
|
|
3024
|
+
});
|
|
3025
|
+
var el = E(Qc), tl = (e) => {
|
|
3026
|
+
var n = o(), i = O(n);
|
|
3027
|
+
c(i, 17, () => t(W).treemapCells, S, (e, n, i) => {
|
|
3028
|
+
var a = ur(), o = O(a), s = E(o), c = (e) => {
|
|
3029
|
+
var i = cr(), a = y(i, !0);
|
|
3030
|
+
w(i), _((e) => {
|
|
3031
|
+
C(i, "x", t(n).x + 4), C(i, "y", t(n).y + 12), C(i, "fill", t(n).textColor), l(a, e);
|
|
3032
|
+
}, [() => cs(t(n).name, Math.max(3, Math.floor(t(n).w / 7)))]), r(e, i);
|
|
3033
|
+
};
|
|
3034
|
+
x(s, (e) => {
|
|
3035
|
+
t(n).w > 36 && t(n).h > 18 && e(c);
|
|
3036
|
+
});
|
|
3037
|
+
var d = E(s), f = (e) => {
|
|
3038
|
+
var i = lr(), a = y(i, !0);
|
|
3039
|
+
w(i), _((e) => {
|
|
3040
|
+
C(i, "x", t(n).x + 4), C(i, "y", t(n).y + 24), C(i, "fill", t(n).textColor), l(a, e);
|
|
3041
|
+
}, [() => R(t(n).value)]), r(e, i);
|
|
3042
|
+
};
|
|
3043
|
+
x(d, (e) => {
|
|
3044
|
+
t(n).w > 60 && t(n).h > 30 && e(f);
|
|
3045
|
+
}), _((e, r) => {
|
|
3046
|
+
C(o, "x", t(n).x), C(o, "y", t(n).y), C(o, "width", t(n).w), C(o, "height", t(n).h), C(o, "fill", t(n).color), C(o, "role", u.onSelect || t(J) || t(qa) ? "button" : "img"), C(o, "tabindex", e), C(o, "aria-label", r);
|
|
3047
|
+
}, [() => Rs(".sv-grid-chart-treemap-cell", i), () => `${t(n).name}: ${R(t(n).value)}`]), p("mousemove", o, (e) => Z(e.clientX, e.clientY, t(n).name, [{
|
|
3048
|
+
color: t(n).color,
|
|
3049
|
+
value: R(t(n).value)
|
|
3050
|
+
}])), h("mouseleave", o, Q), h("focus", o, (e) => {
|
|
3051
|
+
zs(".sv-grid-chart-treemap-cell", i);
|
|
3052
|
+
let r = Vs(e.currentTarget);
|
|
3053
|
+
Z(r.x, r.y, t(n).name, [{
|
|
3054
|
+
color: t(n).color,
|
|
3055
|
+
value: R(t(n).value)
|
|
3056
|
+
}]);
|
|
3057
|
+
}), h("blur", o, Q), p("click", o, (e) => {
|
|
3058
|
+
t(qa) && eo([...Ue(), ..._e(t(Ja), t(n).name) ?? []]) || Ps(t(n).name, "", t(n).value, void 0, e);
|
|
3059
|
+
}), p("keydown", o, (e) => Bs(e, ".sv-grid-chart-treemap-cell", i, () => {
|
|
3060
|
+
t(qa) && eo([...Ue(), ..._e(t(Ja), t(n).name) ?? []]) || (u.onSelect || t(J)) && Ps(t(n).name, "", t(n).value, void 0, e);
|
|
3061
|
+
})), r(e, a);
|
|
3062
|
+
}), r(e, n);
|
|
3063
|
+
};
|
|
3064
|
+
x(el, (e) => {
|
|
3065
|
+
t(To) && e(tl);
|
|
3066
|
+
});
|
|
3067
|
+
var nl = E(el), rl = (e) => {
|
|
3068
|
+
var n = pr(), i = O(n);
|
|
3069
|
+
c(i, 17, () => t(W).sankeyLinks, S, (e, n, i) => {
|
|
3070
|
+
var a = dr();
|
|
3071
|
+
_((e, r) => {
|
|
3072
|
+
C(a, "d", t(n).path), C(a, "stroke", t(n).color), C(a, "stroke-width", t(n).width), C(a, "tabindex", e), C(a, "aria-label", r);
|
|
3073
|
+
}, [() => Rs(".sv-grid-chart-sankey-link", i), () => `${t(n).source} → ${t(n).target}: ${R(t(n).value)}`]), p("mousemove", a, (e) => Z(e.clientX, e.clientY, `${t(n).source} → ${t(n).target}`, [{
|
|
3074
|
+
color: t(n).color,
|
|
3075
|
+
value: R(t(n).value)
|
|
3076
|
+
}])), h("mouseleave", a, Q), h("focus", a, (e) => {
|
|
3077
|
+
zs(".sv-grid-chart-sankey-link", i);
|
|
3078
|
+
let r = Vs(e.currentTarget);
|
|
3079
|
+
Z(r.x, r.y, `${t(n).source} → ${t(n).target}`, [{
|
|
3080
|
+
color: t(n).color,
|
|
3081
|
+
value: R(t(n).value)
|
|
3082
|
+
}]);
|
|
3083
|
+
}), h("blur", a, Q), p("keydown", a, (e) => Bs(e, ".sv-grid-chart-sankey-link", i)), r(e, a);
|
|
3084
|
+
});
|
|
3085
|
+
var a = E(i);
|
|
3086
|
+
c(a, 17, () => t(W).sankeyNodes, S, (e, n, i) => {
|
|
3087
|
+
var a = fr(), o = O(a), s = E(o), c = y(s, !0);
|
|
3088
|
+
w(s), _((e, r) => {
|
|
3089
|
+
C(o, "x", t(n).x), C(o, "y", t(n).y), C(o, "width", t(n).w), C(o, "height", t(n).h), C(o, "fill", t(n).color), C(o, "tabindex", e), C(o, "aria-label", r), C(s, "x", t(n).column === 0 ? t(n).x + t(n).w + 4 : t(n).x - 4), C(s, "y", t(n).y + t(n).h / 2 + 3), C(s, "text-anchor", t(n).column === 0 ? "start" : "end"), l(c, t(n).label);
|
|
3090
|
+
}, [() => Rs(".sv-grid-chart-sankey-node", i), () => F(t(I).sankeyNode, {
|
|
3091
|
+
label: t(n).label,
|
|
3092
|
+
in: R(t(n).totalIn),
|
|
3093
|
+
out: R(t(n).totalOut)
|
|
3094
|
+
})]), p("mousemove", o, (e) => Z(e.clientX, e.clientY, t(n).label, [{
|
|
3095
|
+
label: "in",
|
|
3096
|
+
value: R(t(n).totalIn)
|
|
3097
|
+
}, {
|
|
3098
|
+
label: "out",
|
|
3099
|
+
value: R(t(n).totalOut)
|
|
3100
|
+
}])), h("mouseleave", o, Q), h("focus", o, (e) => {
|
|
3101
|
+
zs(".sv-grid-chart-sankey-node", i);
|
|
3102
|
+
let r = Vs(e.currentTarget);
|
|
3103
|
+
Z(r.x, r.y, t(n).label, [{
|
|
3104
|
+
label: "in",
|
|
3105
|
+
value: R(t(n).totalIn)
|
|
3106
|
+
}, {
|
|
3107
|
+
label: "out",
|
|
3108
|
+
value: R(t(n).totalOut)
|
|
3109
|
+
}]);
|
|
3110
|
+
}), h("blur", o, Q), p("keydown", o, (e) => Bs(e, ".sv-grid-chart-sankey-node", i)), r(e, a);
|
|
3111
|
+
}), r(e, n);
|
|
3112
|
+
};
|
|
3113
|
+
x(nl, (e) => {
|
|
3114
|
+
t(Eo) && e(rl);
|
|
3115
|
+
});
|
|
3116
|
+
var il = E(nl), al = (e) => {
|
|
3117
|
+
var n = xr(), i = O(n), a = (e) => {
|
|
3118
|
+
var n = o(), i = O(n);
|
|
3119
|
+
c(i, 17, () => t(W).polarRings, S, (e, n) => {
|
|
3120
|
+
var i = mr();
|
|
3121
|
+
_(() => {
|
|
3122
|
+
C(i, "cx", t(W).radarCenter.cx), C(i, "cy", t(W).radarCenter.cy), C(i, "r", t(n));
|
|
3123
|
+
}), r(e, i);
|
|
3124
|
+
}), r(e, n);
|
|
3125
|
+
};
|
|
3126
|
+
x(i, (e) => {
|
|
3127
|
+
t(W).radarCenter && t(W).polarRings.length && e(a);
|
|
3128
|
+
});
|
|
3129
|
+
var s = E(i);
|
|
3130
|
+
c(s, 17, () => t(W).polarAxes, S, (e, n) => {
|
|
3131
|
+
var i = hr(), a = y(i, !0);
|
|
3132
|
+
w(i), _((e) => {
|
|
3133
|
+
C(i, "x", t(n).x), C(i, "y", t(n).y + 3), C(i, "text-anchor", t(n).x < (t(W).radarCenter?.cx ?? 0) - 2 ? "end" : t(n).x > (t(W).radarCenter?.cx ?? 0) + 2 ? "start" : "middle"), l(a, e);
|
|
3134
|
+
}, [() => cs(t(n).label, 14)]), r(e, i);
|
|
3135
|
+
});
|
|
3136
|
+
var f = E(s);
|
|
3137
|
+
c(f, 17, () => t(W).arcs, S, (e, n) => {
|
|
3138
|
+
var i = o(), a = O(i), s = (e) => {
|
|
3139
|
+
var i = gr();
|
|
3140
|
+
_(() => C(i, "d", t(n).trackPath)), r(e, i);
|
|
3141
|
+
};
|
|
3142
|
+
x(a, (e) => {
|
|
3143
|
+
t(n).trackPath && e(s);
|
|
3144
|
+
}), r(e, i);
|
|
3145
|
+
});
|
|
3146
|
+
var m = E(f);
|
|
3147
|
+
c(m, 17, () => t(W).chordRibbons, S, (e, n) => {
|
|
3148
|
+
var i = _r();
|
|
3149
|
+
_((e) => {
|
|
3150
|
+
C(i, "d", t(n).path), C(i, "fill", t(n).color), C(i, "stroke", t(n).color), k(i, e);
|
|
3151
|
+
}, [() => `opacity:${q(t(n).source) === 1 && q(t(n).target) === 1 ? 1 : .18}`]), p("mousemove", i, (e) => ks(e.clientX, e.clientY, t(n))), h("mouseleave", i, Q), r(e, i);
|
|
3152
|
+
});
|
|
3153
|
+
var g = E(m);
|
|
3154
|
+
c(g, 17, () => t(W).arcs, S, (e, n, i) => {
|
|
3155
|
+
var a = vr();
|
|
3156
|
+
let o;
|
|
3157
|
+
_((e, r, i, s) => {
|
|
3158
|
+
o = d(a, 0, "sv-grid-chart-arc svelte-kvdein", null, o, e), C(a, "d", t(n).path), C(a, "fill", t(n).color), k(a, r), C(a, "role", u.onSelect || t(J) || t(qa) && t(n).nodePath ? "button" : "img"), C(a, "tabindex", i), C(a, "aria-label", s);
|
|
3159
|
+
}, [
|
|
3160
|
+
() => ({
|
|
3161
|
+
"is-selected": Vo(t(n).label, t(n).series),
|
|
3162
|
+
"is-drillable": t(qa) && !!t(n).nodePath && !!xe(t(Ka), t(n).nodePath)?.children?.length
|
|
3163
|
+
}),
|
|
3164
|
+
() => `opacity:${q(t(vo) || t(L).type === "sunburst" || t(L).type === "chord" ? t(n).label : t(n).series)}`,
|
|
3165
|
+
() => Rs(".sv-grid-chart-arc", i),
|
|
3166
|
+
() => `${t(n).nodePath ? t(n).nodePath.join(" / ") : t(n).label}${t(n).series ? ` ${t(n).series}` : ""}: ${R(t(n).value)}`
|
|
3167
|
+
]), p("mousemove", a, (e) => Os(e.clientX, e.clientY, t(n))), h("mouseleave", a, Q), h("focus", a, (e) => {
|
|
3168
|
+
zs(".sv-grid-chart-arc", i);
|
|
3169
|
+
let r = Vs(e.currentTarget);
|
|
3170
|
+
Os(r.x, r.y, t(n));
|
|
3171
|
+
}), h("blur", a, Q), p("click", a, (e) => {
|
|
3172
|
+
t(n).nodePath && eo(t(n).nodePath) || Ps(t(n).label, t(n).series, t(n).value, void 0, e);
|
|
3173
|
+
}), p("keydown", a, (e) => Bs(e, ".sv-grid-chart-arc", i, () => {
|
|
3174
|
+
t(n).nodePath && eo(t(n).nodePath) || (u.onSelect || t(J)) && Ps(t(n).label, t(n).series, t(n).value, void 0, e);
|
|
3175
|
+
})), r(e, a);
|
|
3176
|
+
});
|
|
3177
|
+
var ee = E(g);
|
|
3178
|
+
c(ee, 17, () => t(W).arcs, S, (e, n) => {
|
|
3179
|
+
var i = o(), a = O(i), s = (e) => {
|
|
3180
|
+
var i = o(), a = O(i), s = (e) => {
|
|
3181
|
+
var i = yr(), a = y(i, !0);
|
|
3182
|
+
w(i), _((e) => {
|
|
3183
|
+
C(i, "x", t(n).lx), C(i, "y", t(n).ly + 3), C(i, "text-anchor", t(n).lx < t(n).cx - 2 ? "end" : t(n).lx > t(n).cx + 2 ? "start" : "middle"), l(a, e);
|
|
3184
|
+
}, [() => cs(t(n).label, 14)]), r(e, i);
|
|
3185
|
+
};
|
|
3186
|
+
x(a, (e) => {
|
|
3187
|
+
t(n).a1 - t(n).a0 > .12 && t(L).xAxis?.labels !== !1 && e(s);
|
|
3188
|
+
}), r(e, i);
|
|
3189
|
+
}, c = (e) => {
|
|
3190
|
+
var i = br(), a = y(i, !0);
|
|
3191
|
+
w(i), _((e) => {
|
|
3192
|
+
C(i, "x", t(n).lx), C(i, "y", t(n).ly), C(i, "fill", t(n).textColor), l(a, e);
|
|
3193
|
+
}, [() => cs(t(Si).show && t(L).type !== "sunburst" ? R(t(n).value) : t(n).label, 12)]), r(e, i);
|
|
3194
|
+
};
|
|
3195
|
+
x(a, (e) => {
|
|
3196
|
+
t(L).type === "chord" ? e(s) : (t(n).a1 - t(n).a0) * (t(n).r0 + t(n).r1) / 2 > 34 && t(n).r1 - t(n).r0 > 12 && (t(L).type === "sunburst" || t(Si).show) && e(c, 1);
|
|
3197
|
+
}), r(e, i);
|
|
3198
|
+
}), r(e, n);
|
|
3199
|
+
};
|
|
3200
|
+
x(il, (e) => {
|
|
3201
|
+
t(go) && e(al);
|
|
3202
|
+
});
|
|
3203
|
+
var ol = E(il), sl = (e) => {
|
|
3204
|
+
var n = o(), i = O(n);
|
|
3205
|
+
c(i, 17, () => t(W).bullets, S, (e, n) => {
|
|
3206
|
+
var i = wr(), a = y(i);
|
|
3207
|
+
c(a, 17, () => t(n).ranges, S, (e, i) => {
|
|
3208
|
+
var a = Sr();
|
|
3209
|
+
_(() => {
|
|
3210
|
+
C(a, "x", t(i).x), C(a, "y", t(n).y), C(a, "width", t(i).w), C(a, "height", t(n).h), C(a, "fill", t(i).color);
|
|
3211
|
+
}), r(e, a);
|
|
3212
|
+
});
|
|
3213
|
+
var o = E(a), s = E(o), l = (e) => {
|
|
3214
|
+
var i = Cr();
|
|
3215
|
+
_(() => {
|
|
3216
|
+
C(i, "x1", t(n).targetX), C(i, "y1", t(n).y + t(n).h * .15), C(i, "x2", t(n).targetX), C(i, "y2", t(n).y + t(n).h * .85);
|
|
3217
|
+
}), r(e, i);
|
|
3218
|
+
};
|
|
3219
|
+
x(s, (e) => {
|
|
3220
|
+
t(n).targetX != null && e(l);
|
|
3221
|
+
}), w(i), _(() => {
|
|
3222
|
+
C(o, "x", t(n).x), C(o, "y", t(n).y + t(n).h * .3), C(o, "width", t(n).measureW), C(o, "height", t(n).h * .4), C(o, "fill", t(n).color);
|
|
3223
|
+
}), p("mousemove", i, (e) => As(e.clientX, e.clientY, t(n))), h("mouseleave", i, Q), r(e, i);
|
|
3224
|
+
}), r(e, n);
|
|
3225
|
+
};
|
|
3226
|
+
x(ol, (e) => {
|
|
3227
|
+
t(_o) && e(sl);
|
|
3228
|
+
});
|
|
3229
|
+
var cl = E(ol);
|
|
3230
|
+
c(cl, 17, () => t(W).slices, S, (e, n, i) => {
|
|
3231
|
+
var a = Dr(), o = O(a);
|
|
3232
|
+
let s;
|
|
3233
|
+
var c = E(o), f = (e) => {
|
|
3234
|
+
var i = Tr(), a = O(i), o = E(a), s = y(o, !0);
|
|
3235
|
+
w(o), _((e) => {
|
|
3236
|
+
C(a, "points", `${t(n).callout.x1},${t(n).callout.y1} ${t(n).callout.x2},${t(n).callout.y2} ${t(n).callout.x3},${t(n).callout.y2}`), C(a, "stroke", t(n).color), C(o, "x", t(n).callout.tx), C(o, "y", t(n).callout.ty + 3.5), C(o, "text-anchor", t(n).callout.anchor), l(s, e);
|
|
3237
|
+
}, [() => t(Si).formatter ? t(Si).formatter(t(n).value, {
|
|
3238
|
+
category: t(n).label,
|
|
3239
|
+
series: t(n).label
|
|
3240
|
+
}) : `${cs(t(n).label, Math.min(18, t(n).callout.maxChars))} ${t(n).percent.toFixed(0)}%`]), r(e, i);
|
|
3241
|
+
}, m = (e) => {
|
|
3242
|
+
var i = Er(), a = y(i);
|
|
3243
|
+
w(i), _((e) => {
|
|
3244
|
+
C(i, "x", t(n).cx), C(i, "y", t(n).cy), l(a, `${e ?? ""}%`);
|
|
3245
|
+
}, [() => t(n).percent.toFixed(0)]), r(e, i);
|
|
3246
|
+
};
|
|
3247
|
+
x(c, (e) => {
|
|
3248
|
+
t(n).callout ? e(f) : t(Si).show && t(Si).placement !== "outside" && t(n).percent >= 6 && e(m, 1);
|
|
3249
|
+
}), _((e, r, i, a, c) => {
|
|
3250
|
+
s = d(o, 0, "sv-grid-chart-slice svelte-kvdein", null, s, e), C(o, "d", t(n).path), C(o, "fill", t(n).color), k(o, r), C(o, "role", i), C(o, "tabindex", a), C(o, "aria-label", c);
|
|
3251
|
+
}, [
|
|
3252
|
+
() => ({
|
|
3253
|
+
"is-selected": Vo(t(n).label, t(n).label),
|
|
3254
|
+
"is-drillable": Qa(t(n).label)
|
|
3255
|
+
}),
|
|
3256
|
+
() => `opacity:${Ho(t(n).label, t(n).label)}`,
|
|
3257
|
+
() => u.onSelect || t(J) || Qa(t(n).label) ? "button" : "img",
|
|
3258
|
+
() => Rs(".sv-grid-chart-slice", i),
|
|
3259
|
+
() => `${t(n).label}: ${R(t(n).value)}, ${t(n).percent.toFixed(1)}%${Qa(t(n).label) ? t(I).drillIn : ""}`
|
|
3260
|
+
]), p("mousemove", o, (e) => ws(e.clientX, e.clientY, t(n).label, t(n).value, t(n).percent)), h("mouseleave", o, Q), h("focus", o, (e) => {
|
|
3261
|
+
zs(".sv-grid-chart-slice", i);
|
|
3262
|
+
let r = Vs(e.currentTarget);
|
|
3263
|
+
ws(r.x, r.y, t(n).label, t(n).value, t(n).percent);
|
|
3264
|
+
}), h("blur", o, Q), p("click", o, (e) => {
|
|
3265
|
+
Qa(t(n).label) && eo([...Ue(), t(n).label]) || Ps(t(n).label, t(n).label, t(n).value, i, e);
|
|
3266
|
+
}), p("keydown", o, (e) => {
|
|
3267
|
+
Ys(e, i) || Bs(e, ".sv-grid-chart-slice", i, () => {
|
|
3268
|
+
Qa(t(n).label) && eo([...Ue(), t(n).label]) || (u.onSelect || t(J)) && Ps(t(n).label, t(n).label, t(n).value, i, e);
|
|
3269
|
+
});
|
|
3270
|
+
}), r(e, a);
|
|
3271
|
+
});
|
|
3272
|
+
var ll = E(cl), ul = (e) => {
|
|
3273
|
+
var n = Or(), i = O(n), a = y(i, !0);
|
|
3274
|
+
w(i);
|
|
3275
|
+
var o = E(i), s = y(o, !0);
|
|
3276
|
+
w(o), _((e) => {
|
|
3277
|
+
C(i, "x", t(W).donut.cx), C(i, "y", t(W).donut.cy - 4), l(a, e), C(o, "x", t(W).donut.cx), C(o, "y", t(W).donut.cy + 11), l(s, t(I).total);
|
|
3278
|
+
}, [() => R(t(W).donut.total)]), r(e, n);
|
|
3279
|
+
};
|
|
3280
|
+
x(ll, (e) => {
|
|
3281
|
+
t(W).donut && e(ul);
|
|
3282
|
+
});
|
|
3283
|
+
var dl = E(ll), fl = (e) => {
|
|
3284
|
+
var n = o(), i = O(n), a = (e) => {
|
|
3285
|
+
var n = kr();
|
|
3286
|
+
_((e) => {
|
|
3287
|
+
C(n, "x", t(W).plot.x), C(n, "y", t(W).plot.y), C(n, "width", t(W).plot.w), C(n, "height", t(W).plot.h), C(n, "role", u.onSelect ? "button" : "img"), C(n, "tabindex", ue() ? 0 : void 0), C(n, "data-cat-index", t(Po)), C(n, "aria-label", e);
|
|
3288
|
+
}, [() => F(t(I).densePoints, {
|
|
3289
|
+
count: t(ko),
|
|
3290
|
+
from: t(U).categories[0] ?? "",
|
|
3291
|
+
to: t(U).categories[t(U).categories.length - 1] ?? ""
|
|
3292
|
+
})]), p("mousemove", n, (e) => {
|
|
3293
|
+
let t = No(e.clientX, e.currentTarget);
|
|
3294
|
+
t != null && (b(Po, t, !0), Ss(e.clientX, e.clientY, t));
|
|
3295
|
+
}), h("mouseleave", n, Q), h("focus", n, (e) => Cs(e.currentTarget, t(Po))), h("blur", n, Q), p("click", n, (e) => Ns(e, t(Po))), p("keydown", n, Fo), r(e, n);
|
|
3296
|
+
}, s = (e) => {
|
|
3297
|
+
var n = o(), i = O(n);
|
|
3298
|
+
c(i, 19, () => t(U).categories, (e, t) => e + t, (e, n, i) => {
|
|
3299
|
+
let a = D(() => t(W).lines[0]?.points), o = D(() => t(a)?.[t(i)]?.x), s = D(() => !t(K) && t(a) && t(a).length === t(U).categories.length && Number.isFinite(t(o))), c = D(() => t(s) && t(i) > 0 ? t(a)[t(i) - 1].x : null), l = D(() => t(s) && t(i) < t(a).length - 1 ? t(a)[t(i) + 1].x : null), d = D(() => t(s) ? t(c) == null ? t(W).plot.x : (t(c) + t(o)) / 2 : t(W).plot.x + t(Do) * t(i)), f = D(() => t(s) ? t(l) == null ? t(W).plot.x + t(W).plot.w : (t(o) + t(l)) / 2 : t(W).plot.x + t(Do) * (t(i) + 1));
|
|
3300
|
+
var m = Ar();
|
|
3301
|
+
_((e, n) => {
|
|
3302
|
+
C(m, "x", t(K) ? t(W).plot.x : t(d)), C(m, "y", t(K) ? t(W).plot.y + t(Do) * t(i) : t(W).plot.y), C(m, "width", e), C(m, "height", t(K) ? t(Do) : t(W).plot.h), C(m, "role", u.onSelect ? "button" : "img"), C(m, "tabindex", ue() ? t(i) === 0 ? 0 : -1 : void 0), C(m, "data-cat-index", t(i)), C(m, "aria-label", n);
|
|
3303
|
+
}, [() => t(K) ? t(W).plot.w : Math.max(0, t(f) - t(d)), () => `${t(n)}: ${hs(t(i)).map((e) => `${e.label} ${e.value}`).join(", ")}`]), p("mousemove", m, (e) => Ss(e.clientX, e.clientY, t(i), e.currentTarget)), h("mouseleave", m, Q), h("focus", m, (e) => Cs(e.currentTarget, t(i))), h("blur", m, Q), p("click", m, (e) => Ns(e, t(i))), p("keydown", m, (e) => Is(e, t(i))), r(e, m);
|
|
3304
|
+
}), r(e, n);
|
|
3305
|
+
};
|
|
3306
|
+
x(i, (e) => {
|
|
3307
|
+
t(Oo) ? e(a) : e(s, -1);
|
|
3308
|
+
}), r(e, n);
|
|
3309
|
+
};
|
|
3310
|
+
x(dl, (e) => {
|
|
3311
|
+
t(G) && !t(yo) && e(fl);
|
|
3312
|
+
});
|
|
3313
|
+
var pl = E(dl), ml = (e) => {
|
|
3314
|
+
var n = jr();
|
|
3315
|
+
_(() => {
|
|
3316
|
+
C(n, "x", t(ra).x), C(n, "y", t(ra).y), C(n, "width", t(ra).w), C(n, "height", t(ra).h);
|
|
3317
|
+
}), r(e, n);
|
|
3318
|
+
};
|
|
3319
|
+
x(pl, (e) => {
|
|
3320
|
+
t(ra) && e(ml);
|
|
3321
|
+
}), w($), ee($, (e) => b(z, e), () => t(z));
|
|
3322
|
+
var hl = E($, 2), gl = (e) => {
|
|
3323
|
+
let n = D(() => t(H).plot.x + t(Ba).t0 * t(H).plot.w), i = D(() => (t(Ba).t1 - t(Ba).t0) * t(H).plot.w);
|
|
3324
|
+
var a = Fr(), o = y(a);
|
|
3325
|
+
C(o, "aria-valuemin", 0);
|
|
3326
|
+
var s = y(o);
|
|
3327
|
+
c(s, 17, () => t(H).lines, S, (e, n) => {
|
|
3328
|
+
var i = Nr(), a = O(i), o = (e) => {
|
|
3329
|
+
var i = Mr();
|
|
3330
|
+
_(() => {
|
|
3331
|
+
C(i, "d", t(n).areaPath), C(i, "fill", t(n).color);
|
|
3332
|
+
}), r(e, i);
|
|
3333
|
+
};
|
|
3334
|
+
x(a, (e) => {
|
|
3335
|
+
t(n).areaPath && e(o);
|
|
3336
|
+
});
|
|
3337
|
+
var s = E(a);
|
|
3338
|
+
_(() => {
|
|
3339
|
+
C(s, "d", t(n).path), C(s, "stroke", t(n).color);
|
|
3340
|
+
}), r(e, i);
|
|
3341
|
+
});
|
|
3342
|
+
var l = E(s);
|
|
3343
|
+
c(l, 17, () => t(H).bars, S, (e, n) => {
|
|
3344
|
+
var i = Pr();
|
|
3345
|
+
_(() => {
|
|
3346
|
+
C(i, "x", t(n).x), C(i, "y", t(n).y), C(i, "width", t(n).w), C(i, "height", t(n).h), C(i, "fill", t(n).color);
|
|
3347
|
+
}), r(e, i);
|
|
3348
|
+
});
|
|
3349
|
+
var u = E(l), d = E(u), f = E(d), m = E(f), g = E(m);
|
|
3350
|
+
w(o), w(a), _((e, r) => {
|
|
3351
|
+
C(o, "viewBox", `0 0 ${t(H).width} ${t(H).height}`), C(o, "aria-label", t(I).rangeBrush), C(o, "aria-valuemax", e), C(o, "aria-valuenow", M()?.i0 ?? 0), C(o, "aria-valuetext", r), C(u, "x", t(H).plot.x), C(u, "y", t(H).plot.y), C(u, "width", t(n) - t(H).plot.x), C(u, "height", t(H).plot.h), C(d, "x", t(n) + t(i)), C(d, "y", t(H).plot.y), C(d, "width", t(H).plot.x + t(H).plot.w - (t(n) + t(i))), C(d, "height", t(H).plot.h), C(f, "x", t(n)), C(f, "y", t(H).plot.y), C(f, "width", t(i)), C(f, "height", t(H).plot.h), C(m, "x", t(n) - 4), C(m, "y", t(H).plot.y), C(m, "height", t(H).plot.h), C(g, "x", t(n) + t(i) - 4), C(g, "y", t(H).plot.y), C(g, "height", t(H).plot.h);
|
|
3352
|
+
}, [() => Math.max(0, t(L).categories.length - 1), () => F(t(I).brushRange, {
|
|
3353
|
+
from: t(L).categories[M()?.i0 ?? 0] ?? "",
|
|
3354
|
+
to: t(L).categories[M()?.i1 ?? t(L).categories.length - 1] ?? ""
|
|
3355
|
+
})]), p("pointermove", o, Wa), p("keydown", o, Us), p("pointerdown", f, (e) => Ua(e, "move")), p("pointerup", f, Ga), h("pointercancel", f, Ga), p("pointerdown", m, (e) => Ua(e, "left")), p("pointerup", m, Ga), h("pointercancel", m, Ga), p("pointerdown", g, (e) => Ua(e, "right")), p("pointerup", g, Ga), h("pointercancel", g, Ga), re(a, "clientHeight", (e) => b(vi, e)), r(e, a);
|
|
3356
|
+
};
|
|
3357
|
+
x(hl, (e) => {
|
|
3358
|
+
t(Ra) && t(H) && e(gl);
|
|
3359
|
+
});
|
|
3360
|
+
var _l = E(hl, 2), vl = (e) => {
|
|
3361
|
+
var n = Ir(), i = y(n, !0);
|
|
3362
|
+
w(n), _(() => l(i, t(I).noData)), r(e, n);
|
|
3363
|
+
};
|
|
3364
|
+
x(_l, (e) => {
|
|
3365
|
+
t(es) && e(vl);
|
|
3366
|
+
});
|
|
3367
|
+
var yl = E(_l, 2), bl = (n) => {
|
|
3368
|
+
var i = o(), a = O(i);
|
|
3369
|
+
e(a, () => t(Ks), (e, n) => {
|
|
3370
|
+
n(e, {
|
|
3371
|
+
get items() {
|
|
3372
|
+
return t(Xs);
|
|
3373
|
+
},
|
|
3374
|
+
get x() {
|
|
3375
|
+
return t(Gs).x;
|
|
3376
|
+
},
|
|
3377
|
+
get y() {
|
|
3378
|
+
return t(Gs).y;
|
|
3379
|
+
},
|
|
3380
|
+
onClose: () => b(Gs, null)
|
|
3381
|
+
});
|
|
3382
|
+
}), r(n, i);
|
|
3383
|
+
};
|
|
3384
|
+
x(yl, (e) => {
|
|
3385
|
+
t(Gs) && t(Ks) && e(bl);
|
|
3386
|
+
});
|
|
3387
|
+
var xl = E(yl, 2), Sl = (e) => {
|
|
3388
|
+
var n = Lr();
|
|
3389
|
+
ie(n), i(() => ne(n, () => t(ga), (e) => b(ga, e))), le(n, (e) => Ma?.(e)), _(() => {
|
|
3390
|
+
C(n, "placeholder", t(I).noteText), C(n, "aria-label", t(I).noteText), k(n, `left:${t(ha).left}px; top:${t(ha).top}px;`);
|
|
3391
|
+
}), p("keydown", n, (e) => {
|
|
3392
|
+
e.key === "Enter" ? (e.preventDefault(), _a()) : e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), b(ha, null), b(ga, ""));
|
|
3393
|
+
}), h("blur", n, _a), r(e, n);
|
|
3394
|
+
};
|
|
3395
|
+
x(xl, (e) => {
|
|
3396
|
+
t(ha) && e(Sl);
|
|
3397
|
+
});
|
|
3398
|
+
var Cl = E(xl, 2), wl = (e) => {
|
|
3399
|
+
var n = Hr();
|
|
3400
|
+
let i;
|
|
3401
|
+
var a = y(n), f = (e) => {
|
|
3402
|
+
var n = o(), i = O(n);
|
|
3403
|
+
s(i, () => u.tooltip, () => t(X).ctx), r(e, n);
|
|
3404
|
+
}, p = (e) => {
|
|
3405
|
+
var n = Vr(), i = O(n), a = y(i, !0);
|
|
3406
|
+
w(i);
|
|
3407
|
+
var o = E(i, 2);
|
|
3408
|
+
c(o, 17, () => t(X).rows, S, (e, n) => {
|
|
3409
|
+
var i = Br(), a = y(i), o = (e) => {
|
|
3410
|
+
var i = Rr();
|
|
3411
|
+
_(() => k(i, `background:${t(n).color}`)), r(e, i);
|
|
3412
|
+
};
|
|
3413
|
+
x(a, (e) => {
|
|
3414
|
+
t(n).color && e(o);
|
|
3415
|
+
});
|
|
3416
|
+
var s = E(a, 2), c = (e) => {
|
|
3417
|
+
var i = zr(), a = y(i, !0);
|
|
3418
|
+
w(i), _(() => l(a, t(n).label)), r(e, i);
|
|
3419
|
+
};
|
|
3420
|
+
x(s, (e) => {
|
|
3421
|
+
t(n).label && e(c);
|
|
3422
|
+
});
|
|
3423
|
+
var u = E(s, 2), d = y(u, !0);
|
|
3424
|
+
w(u), w(i), _(() => l(d, t(n).value)), r(e, i);
|
|
3425
|
+
}), _(() => l(a, t(X).title)), r(e, n);
|
|
3426
|
+
};
|
|
3427
|
+
x(a, (e) => {
|
|
3428
|
+
u.tooltip ? e(f) : e(p, -1);
|
|
3429
|
+
}), w(n), _(() => {
|
|
3430
|
+
i = d(n, 1, "sv-grid-chart-tooltip svelte-kvdein", null, i, {
|
|
3431
|
+
"is-below": t(X).below,
|
|
3432
|
+
"is-custom": !!u.tooltip,
|
|
3433
|
+
"is-fixed": t(X).fixed,
|
|
3434
|
+
"is-right": Oe() === "top-right" || Oe() === "bottom-right",
|
|
3435
|
+
"is-bottom": Oe() === "bottom-left" || Oe() === "bottom-right",
|
|
3436
|
+
"is-pinned": !!t(fs)
|
|
3437
|
+
}), k(n, `left:${t(X).left}px; top:${t(X).top}px;`);
|
|
3438
|
+
}), r(e, n);
|
|
3439
|
+
};
|
|
3440
|
+
x(Cl, (e) => {
|
|
3441
|
+
t(X) && e(wl);
|
|
3442
|
+
});
|
|
3443
|
+
var Tl = E(Cl, 2), El = (e) => {
|
|
3444
|
+
var n = Kr();
|
|
3445
|
+
let i;
|
|
3446
|
+
var a = y(n);
|
|
3447
|
+
c(a, 19, () => t($o), (e) => e.label, (e, n, i) => {
|
|
3448
|
+
var a = Wr();
|
|
3449
|
+
let c;
|
|
3450
|
+
var f = y(a), m = (e) => {
|
|
3451
|
+
var a = o(), c = O(a);
|
|
3452
|
+
s(c, () => u.legendItem, () => ({
|
|
3453
|
+
label: t(n).label,
|
|
3454
|
+
color: t(n).color,
|
|
3455
|
+
off: t(n).off,
|
|
3456
|
+
index: t(i)
|
|
3457
|
+
})), r(e, a);
|
|
3458
|
+
}, g = (e) => {
|
|
3459
|
+
var i = Ur(), a = O(i), o = E(a);
|
|
3460
|
+
_(() => {
|
|
3461
|
+
k(a, `background:${t(n).off ? "transparent" : t(n).color}; border-color:${t(n).color}`), l(o, ` ${t(n).label ?? ""}`);
|
|
3462
|
+
}), r(e, i);
|
|
3463
|
+
};
|
|
3464
|
+
x(f, (e) => {
|
|
3465
|
+
u.legendItem ? e(m) : e(g, -1);
|
|
3466
|
+
}), w(a), _(() => {
|
|
3467
|
+
c = d(a, 1, "sv-grid-chart-legend-item svelte-kvdein", null, c, {
|
|
3468
|
+
"is-off": t(n).off,
|
|
3469
|
+
"is-isolated": t(ji) === t(n).label
|
|
3470
|
+
}), a.disabled = !ue() || !t(Xo), C(a, "aria-pressed", t(Xo) ? !t(n).off : void 0), C(a, "title", ue() ? `${t(n).off ? t(I).showSeries : t(I).hideSeries} ${t(n).label} \u00b7 ${t(I).isolateHint}` : t(n).label);
|
|
3471
|
+
}), p("click", a, () => ns(t(n).label)), p("dblclick", a, () => rs(t(n).label)), h("pointerenter", a, () => ue() && b(Ni, t(n).label, !0)), h("pointerleave", a, () => b(Ni, null)), r(e, a);
|
|
3472
|
+
});
|
|
3473
|
+
var f = E(a, 2), m = (e) => {
|
|
3474
|
+
var n = Gr(), i = y(n, !0);
|
|
3475
|
+
w(n), _((e) => l(i, e), [() => t(Zo) ? t(I).showLess : F(t(I).showMore, { n: t(Go).length - 10 })]), p("click", n, () => b(Zo, !t(Zo))), r(e, n);
|
|
3476
|
+
};
|
|
3477
|
+
x(f, (e) => {
|
|
3478
|
+
t(Qo) && e(m);
|
|
3479
|
+
}), w(n), _(() => i = d(n, 1, "sv-grid-chart-legend svelte-kvdein", null, i, { "is-vertical": t(mi) })), re(n, "clientWidth", (e) => b(gi, e)), re(n, "clientHeight", (e) => b(_i, e)), r(e, n);
|
|
3480
|
+
};
|
|
3481
|
+
x(Tl, (e) => {
|
|
3482
|
+
t(pi) && t(Go).length && e(El);
|
|
3483
|
+
});
|
|
3484
|
+
var Dl = E(Tl, 2), Ol = (e) => {
|
|
3485
|
+
var n = qr(), i = y(n, !0);
|
|
3486
|
+
w(n), _(() => l(i, t(Wo))), r(e, n);
|
|
3487
|
+
};
|
|
3488
|
+
x(Dl, (e) => {
|
|
3489
|
+
Ke() && e(Ol);
|
|
3490
|
+
});
|
|
3491
|
+
var kl = E(Dl, 2), Al = y(kl), jl = y(Al), Ml = y(jl, !0), Nl = E(Ml), Pl = (e) => {
|
|
3492
|
+
var n = m();
|
|
3493
|
+
_((e) => l(n, e), [() => F(t(I).dataTableCapped, {
|
|
3494
|
+
shown: jo,
|
|
3495
|
+
total: t(as).rows.length
|
|
3496
|
+
})]), r(e, n);
|
|
3497
|
+
};
|
|
3498
|
+
x(Nl, (e) => {
|
|
3499
|
+
t(os) && e(Pl);
|
|
3500
|
+
});
|
|
3501
|
+
var Fl = E(Nl), Il = (e) => {
|
|
3502
|
+
var n = m();
|
|
3503
|
+
_(() => l(n, `. ${t(ai) ?? ""}`)), r(e, n);
|
|
3504
|
+
};
|
|
3505
|
+
x(Fl, (e) => {
|
|
3506
|
+
qe() && t(ai) && e(Il);
|
|
3507
|
+
}), w(jl);
|
|
3508
|
+
var Ll = E(jl), Rl = y(Ll);
|
|
3509
|
+
c(Rl, 20, () => t(as).cols, (e) => e, (e, t) => {
|
|
3510
|
+
var n = Jr(), i = y(n, !0);
|
|
3511
|
+
w(n), _(() => l(i, t)), r(e, n);
|
|
3512
|
+
}), w(Rl), w(Ll);
|
|
3513
|
+
var zl = E(Ll);
|
|
3514
|
+
c(zl, 21, () => t(ss), S, (e, n) => {
|
|
3515
|
+
var i = Xr();
|
|
3516
|
+
c(i, 21, () => t(n), S, (e, n) => {
|
|
3517
|
+
var i = Yr(), a = y(i, !0);
|
|
3518
|
+
w(i), _(() => l(a, t(n))), r(e, i);
|
|
3519
|
+
}), w(i), r(e, i);
|
|
3520
|
+
}), w(zl), w(Al), w(kl), w(ac), ee(ac, (e) => b(us, e), () => t(us)), _((e, n, r) => {
|
|
3521
|
+
a = d($, 0, "sv-grid-chart-svg svelte-kvdein", null, a, {
|
|
3522
|
+
"is-interactive": ue(),
|
|
3523
|
+
"is-clickable": !!u.onSelect || !!u.onDrill,
|
|
3524
|
+
"is-zoomable": !!t(Ci)?.drag && t(G) && !t(Ei) && !t(wi),
|
|
3525
|
+
"is-pannable": !!t(Ci)?.pan && t(G) && t(Vi) && t(wi),
|
|
3526
|
+
"is-annotating": t(Ei),
|
|
3527
|
+
"is-dragging": !!t(ta),
|
|
3528
|
+
"is-drawing": !!t(B)
|
|
3529
|
+
}), C($, "viewBox", `0 0 ${t(W).width} ${t(W).height}`), C($, "role", ue() ? "group" : "img"), C($, "aria-label", n), C($, "aria-description", qe() && t(ai) ? t(ai) : void 0), C($, "aria-describedby", `${Fi}-table`), f = k($, "", f, { height: ni() ? `${t(xi) ?? t(L).height ?? 300}px` : null }), g = d(Sc, 0, "sv-grid-chart-marks svelte-kvdein", null, g, {
|
|
3530
|
+
"is-enter-grow": t(co) === "grow",
|
|
3531
|
+
"is-enter-none": t(co) === "none"
|
|
3532
|
+
}), C(Sc, "clip-path", t(G) ? `url(#${Fi}-plot)` : void 0), v = d(Pc, 0, "sv-grid-chart-marks svelte-kvdein", null, v, {
|
|
3533
|
+
"is-enter-grow": t(co) === "grow",
|
|
3534
|
+
"is-enter-none": t(co) === "none"
|
|
3535
|
+
}), C(Pc, "clip-path", t(G) ? `url(#${Fi}-plot)` : void 0), C(Al, "id", `${Fi}-table`), l(Ml, r);
|
|
3536
|
+
}, [
|
|
3537
|
+
() => Ce(t(L).style) || void 0,
|
|
3538
|
+
() => F(t(I).chartLabel, { type: t(L).type }),
|
|
3539
|
+
() => F(t(I).dataTable, { type: t(L).type })
|
|
3540
|
+
]), p("pointerdown", $, oa), p("pointermove", $, (e) => {
|
|
3541
|
+
sa(e), Ea(e);
|
|
3542
|
+
}), p("pointerup", $, (e) => {
|
|
3543
|
+
ca(e), b(va, null);
|
|
3544
|
+
}), h("pointercancel", $, (e) => {
|
|
3545
|
+
ca(e), b(va, null);
|
|
3546
|
+
}), p("click", $, Ta), p("keydown", $, ka), h("wheel", $, Xi), p("contextmenu", $, qs), p("dblclick", $, la), re(ac, "clientWidth", (e) => b(si, e)), re(ac, "clientHeight", (e) => b(ci, e));
|
|
3547
|
+
}
|
|
3548
|
+
return _((e, n, r) => {
|
|
3549
|
+
oc = d(ac, 1, "sv-grid-chart svelte-kvdein", null, oc, {
|
|
3550
|
+
"is-autosize": ni(),
|
|
3551
|
+
"is-legend-top": t(pi) === "top",
|
|
3552
|
+
"is-legend-left": t(pi) === "left",
|
|
3553
|
+
"is-legend-right": t(pi) === "right"
|
|
3554
|
+
}), k(ac, e);
|
|
3555
|
+
}, [
|
|
3556
|
+
() => Ce(t(L).style) || void 0,
|
|
3557
|
+
() => F(t(I).chartLabel, { type: t(L).type }),
|
|
3558
|
+
() => F(t(I).dataTable, { type: t(L).type })
|
|
3559
|
+
]), r(n, ac), ce(ic);
|
|
3560
|
+
}
|
|
3561
|
+
n([
|
|
3562
|
+
"click",
|
|
3563
|
+
"pointerdown",
|
|
3564
|
+
"pointermove",
|
|
3565
|
+
"pointerup",
|
|
3566
|
+
"keydown",
|
|
3567
|
+
"contextmenu",
|
|
3568
|
+
"dblclick",
|
|
3569
|
+
"mousemove"
|
|
3570
|
+
]);
|
|
3571
|
+
//#endregion
|
|
3572
|
+
export { $r as t };
|