@svgrid/grid 3.0.0 → 3.0.2
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/CHANGELOG.md +116 -88
- package/README.md +199 -199
- package/dist/FlexRender.svelte +96 -96
- package/dist/GridFooter.svelte +190 -181
- package/dist/GridFooter.svelte.d.ts +8 -0
- package/dist/GridMenus.svelte +18 -10
- package/dist/GridMenus.svelte.d.ts +2 -1
- package/dist/SvAutoComplete.svelte +169 -169
- package/dist/SvAvatar.svelte +75 -75
- package/dist/SvCalendar.svelte +503 -503
- package/dist/SvCarousel.svelte +141 -141
- package/dist/SvCheckBox.svelte +102 -102
- package/dist/SvCircularProgress.svelte +109 -109
- package/dist/SvColorInput.svelte +181 -181
- package/dist/SvComboBox.svelte +279 -279
- package/dist/SvContextMenu.svelte +116 -116
- package/dist/SvCountryInput.svelte +163 -163
- package/dist/SvDrawer.svelte +254 -254
- package/dist/SvDropDownList.svelte +378 -378
- package/dist/SvDurationInput.svelte +126 -126
- package/dist/SvField.svelte +293 -293
- package/dist/SvForm.svelte +437 -437
- package/dist/SvGrid.controller.svelte.d.ts +17 -0
- package/dist/SvGrid.controller.svelte.js +128 -14
- package/dist/SvGrid.css +79 -10
- package/dist/SvGrid.svelte +191 -186
- package/dist/SvGrid.types.d.ts +42 -1
- package/dist/SvGridCellEditor.svelte +748 -744
- package/dist/SvGridChart.svelte +2246 -1716
- package/dist/SvGridChart.svelte.d.ts +63 -1
- package/dist/SvGridChartPanel.svelte +633 -485
- package/dist/SvGridChartView.svelte +79 -70
- package/dist/SvGridChartView.svelte.d.ts +7 -0
- package/dist/SvGridDropdown.svelte +728 -728
- package/dist/SvGridSelect.svelte +270 -270
- package/dist/SvGroupCell.svelte +141 -116
- package/dist/SvGroupCell.svelte.d.ts +8 -0
- package/dist/SvListBox.svelte +334 -334
- package/dist/SvMaskedInput.svelte +122 -122
- package/dist/SvMenu.svelte +124 -124
- package/dist/SvMenuList.svelte +146 -146
- package/dist/SvMultiSelect.svelte +293 -293
- package/dist/SvNumberInput.svelte +172 -172
- package/dist/SvOtpInput.svelte +158 -158
- package/dist/SvPasswordInput.svelte +151 -151
- package/dist/SvPhoneInput.svelte +133 -133
- package/dist/SvPopover.svelte +197 -197
- package/dist/SvProgress.svelte +116 -116
- package/dist/SvRadioGroup.svelte +107 -107
- package/dist/SvRating.svelte +112 -112
- package/dist/SvResult.svelte +73 -73
- package/dist/SvRichText.svelte +211 -211
- package/dist/SvRowGroupPanel.svelte +186 -170
- package/dist/SvRowGroupPanel.svelte.d.ts +8 -0
- package/dist/SvScrollArea.svelte +61 -61
- package/dist/SvSlider.svelte +203 -203
- package/dist/SvSwitchButton.svelte +108 -108
- package/dist/SvTagsInput.svelte +115 -115
- package/dist/SvTextInput.svelte +147 -147
- package/dist/SvTimePicker.svelte +245 -245
- package/dist/SvToaster.svelte +159 -159
- package/dist/SvToggleButton.svelte +85 -85
- package/dist/SvTooltip.svelte +161 -161
- package/dist/SvTour.svelte +208 -208
- package/dist/SvTree.svelte +444 -444
- package/dist/SvTreeSelect.svelte +239 -239
- package/dist/ai.d.ts +11 -2
- package/dist/ai.js +51 -7
- package/dist/cdn/GridMenus-DyFA-QxA.js +602 -0
- package/dist/cdn/GridMenus-M2XP9t0_.js +603 -0
- package/dist/cdn/{SvDateRangeInput-DflbiP7N.js → SvDateRangeInput-CaOuMs8O.js} +1 -1
- package/dist/cdn/{SvDateRangeInput-Bh0A0JkF.js → SvDateRangeInput-DMLKmGEc.js} +1 -1
- package/dist/cdn/{SvDateTimePicker-Bivn8dAP.js → SvDateTimePicker-CCbDZNZB.js} +1 -1
- package/dist/cdn/{SvDateTimePicker-BWwpfB_o.js → SvDateTimePicker-sonaH0oh.js} +1 -1
- package/dist/cdn/{SvGridCellEditor-Ba7rY3eu.js → SvGridCellEditor-BWnTi2N7.js} +2 -2
- package/dist/cdn/{SvGridCellEditor-AXL8cHGO.js → SvGridCellEditor-CjEJMJKc.js} +2 -2
- package/dist/cdn/SvGridChart-DAb9RbRs.js +1480 -0
- package/dist/cdn/SvGridChart-Yl-IXZFO.js +1481 -0
- package/dist/cdn/SvGridChartPanel-DayQpDsR.js +834 -0
- package/dist/cdn/SvGridChartPanel-aqf8n-vJ.js +810 -0
- package/dist/cdn/{SvGridChartView-eSPuJE6g.js → SvGridChartView-CxfakxR0.js} +5 -3
- package/dist/cdn/{SvGridChartView-SmPW10dI.js → SvGridChartView-Dm_YEx9L.js} +5 -3
- package/dist/cdn/{SvGridDropdown-B1ZcLpgs.js → SvGridDropdown-D0VdjeR8.js} +1 -1
- package/dist/cdn/{SvGridDropdown-CtdbHcIS.js → SvGridDropdown-D13MtJ2j.js} +1 -1
- package/dist/cdn/cell-formatting-C2Hf5gqd.js +86 -0
- package/dist/cdn/chart-CKJRCPOk.js +1652 -0
- package/dist/cdn/{date-format-DZT7T1wf.js → date-format-BNii4zeD.js} +2 -2
- package/dist/cdn/{date-format-CcP1tafP.js → date-format-BnnHlqGw.js} +2 -2
- package/dist/cdn/{export-format-Cv1Dll6k.js → export-format-CUDLy2yn.js} +84 -168
- package/dist/cdn/{src-B_YS5AOc.js → src-BJ2opd0j.js} +3642 -3450
- package/dist/cdn/{src-DYXXpuSk.js → src-DNbz94Ct.js} +8649 -8457
- package/dist/cdn/svgrid.js +16 -15
- package/dist/cdn/svgrid.svelte-external.js +16 -15
- package/dist/cell-formatting.d.ts +7 -0
- package/dist/cell-formatting.js +7 -1
- package/dist/chart-export.d.ts +23 -2
- package/dist/chart-export.js +88 -14
- package/dist/chart.d.ts +410 -18
- package/dist/chart.js +824 -24
- package/dist/editing.js +22 -13
- package/dist/grid-icons.d.ts +49 -0
- package/dist/grid-icons.js +86 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -2
- package/package.json +1 -1
- package/src/FlexRender.svelte +96 -96
- package/src/GridFooter.svelte +190 -181
- package/src/GridMenus.svelte +18 -10
- package/src/SvAutoComplete.svelte +169 -169
- package/src/SvAvatar.svelte +75 -75
- package/src/SvCalendar.svelte +503 -503
- package/src/SvCalendar.test.ts +226 -226
- package/src/SvCarousel.svelte +141 -141
- package/src/SvCheckBox.svelte +102 -102
- package/src/SvCircularProgress.svelte +109 -109
- package/src/SvColorInput.svelte +181 -181
- package/src/SvComboBox.svelte +279 -279
- package/src/SvContextMenu.svelte +116 -116
- package/src/SvCountryInput.svelte +163 -163
- package/src/SvDrawer.svelte +254 -254
- package/src/SvDropDownList.svelte +378 -378
- package/src/SvDurationInput.svelte +126 -126
- package/src/SvField.svelte +293 -293
- package/src/SvForm.svelte +437 -437
- package/src/SvForm.test.ts +411 -411
- package/src/SvGrid.controller.svelte.ts +146 -13
- package/src/SvGrid.css +79 -10
- package/src/SvGrid.svelte +191 -186
- package/src/SvGrid.types.ts +2133 -2092
- package/src/SvGridCellEditor.svelte +748 -744
- package/src/SvGridChart.svelte +2246 -1716
- package/src/SvGridChart.test.ts +243 -1
- package/src/SvGridChartPanel.svelte +633 -485
- package/src/SvGridChartView.svelte +79 -70
- package/src/SvGridDropdown.svelte +728 -728
- package/src/SvGridSelect.svelte +270 -270
- package/src/SvGroupCell.svelte +141 -116
- package/src/SvListBox.svelte +334 -334
- package/src/SvMaskedInput.svelte +122 -122
- package/src/SvMenu.svelte +124 -124
- package/src/SvMenu.test.ts +97 -97
- package/src/SvMenuList.svelte +146 -146
- package/src/SvMultiSelect.svelte +293 -293
- package/src/SvNumberInput.svelte +172 -172
- package/src/SvOtpInput.svelte +158 -158
- package/src/SvPasswordInput.svelte +151 -151
- package/src/SvPhoneInput.svelte +133 -133
- package/src/SvPopover.svelte +197 -197
- package/src/SvProgress.svelte +116 -116
- package/src/SvRadioGroup.svelte +107 -107
- package/src/SvRating.svelte +112 -112
- package/src/SvResult.svelte +73 -73
- package/src/SvRichText.svelte +211 -211
- package/src/SvRowGroupPanel.svelte +186 -170
- package/src/SvScrollArea.svelte +61 -61
- package/src/SvSlider.svelte +203 -203
- package/src/SvSwitchButton.svelte +108 -108
- package/src/SvTagsInput.svelte +115 -115
- package/src/SvTextInput.svelte +147 -147
- package/src/SvTimePicker.svelte +245 -245
- package/src/SvToaster.svelte +159 -159
- package/src/SvToaster.test.ts +95 -95
- package/src/SvToggleButton.svelte +85 -85
- package/src/SvTooltip.svelte +161 -161
- package/src/SvTour.svelte +208 -208
- package/src/SvTree.svelte +444 -444
- package/src/SvTreeSelect.svelte +239 -239
- package/src/a11y/dismissable.test.ts +119 -119
- package/src/a11y/dismissable.ts +114 -114
- package/src/a11y.contract.test.ts +49 -49
- package/src/a11y.test.ts +59 -59
- package/src/a11y.ts +61 -61
- package/src/ai.test.ts +561 -502
- package/src/ai.ts +1472 -1419
- package/src/build-api.coverage.test.ts +633 -633
- package/src/build-api.ts +846 -846
- package/src/builtin-editors.grid.test.ts +83 -83
- package/src/cell-formatting.ts +177 -171
- package/src/cell-render.test.ts +513 -513
- package/src/cell-render.ts +496 -496
- package/src/cell-values.ts +148 -148
- package/src/chart-export.test.ts +112 -0
- package/src/chart-export.ts +270 -202
- package/src/chart-view.svelte.ts +36 -36
- package/src/chart.test.ts +830 -1
- package/src/chart.ts +3342 -2321
- package/src/collaboration.test.ts +104 -104
- package/src/collaboration.ts +167 -167
- package/src/column-groups.ts +78 -78
- package/src/core.performance.test.ts +30 -30
- package/src/core.ts +1865 -1865
- package/src/createAutocomplete.svelte.ts +132 -132
- package/src/createCombobox.svelte.ts +191 -191
- package/src/createCountryInput.svelte.ts +157 -157
- package/src/createDropdownList.svelte.ts +168 -168
- package/src/createForm.svelte.ts +386 -386
- package/src/createGrid.svelte.ts +42 -42
- package/src/createGrid.test.ts +10 -10
- package/src/createGridState.svelte.ts +17 -17
- package/src/createListbox.svelte.ts +250 -250
- package/src/createMenu.svelte.ts +224 -224
- package/src/createPopoverSelect.svelte.ts +213 -213
- package/src/createSlider.svelte.ts +191 -191
- package/src/createTooltip.svelte.ts +144 -144
- package/src/createTree.svelte.ts +322 -322
- package/src/datetime/date-core.ts +206 -206
- package/src/datetime/date-restrict.ts +61 -61
- package/src/datetime/timezone.ts +135 -135
- package/src/dock-manager-model.ts +596 -596
- package/src/dock-model.ts +374 -374
- package/src/editing.test.ts +974 -974
- package/src/editing.ts +618 -609
- package/src/editor-contract.ts +171 -171
- package/src/editor-registry.grid.test.ts +144 -144
- package/src/editor-registry.ts +122 -122
- package/src/export-data-api.test.ts +126 -126
- package/src/export-format.test.ts +107 -107
- package/src/export-format.ts +601 -601
- package/src/filter-operators.ts +160 -160
- package/src/filtering/excel-filters.ts +325 -325
- package/src/flex-render.ts +3 -3
- package/src/form-field.ts +127 -127
- package/src/grid-icons.test.ts +46 -0
- package/src/grid-icons.ts +184 -0
- package/src/group-display.test.ts +167 -167
- package/src/group-display.ts +200 -200
- package/src/headless.ts +87 -87
- package/src/icon-overrides.grid.test.ts +188 -0
- package/src/icon-seam.test.ts +100 -0
- package/src/index.ts +19 -0
- package/src/js-scroller.svelte.ts +173 -173
- package/src/keyboard-handlers.ts +270 -270
- package/src/keyboard.test.ts +59 -59
- package/src/keyboard.ts +97 -97
- package/src/list-nav.test.ts +49 -49
- package/src/list-nav.ts +29 -29
- package/src/list-option.test.ts +56 -56
- package/src/list-option.ts +179 -179
- package/src/menus.ts +597 -597
- package/src/merge-objects.ts +48 -48
- package/src/overlays.test.ts +90 -90
- package/src/positioning.ts +268 -268
- package/src/render-component.ts +28 -28
- package/src/row-drag.test.ts +401 -401
- package/src/row-drag.ts +419 -419
- package/src/row-resize.test.ts +524 -524
- package/src/row-resize.ts +228 -228
- package/src/scheduler-ical.ts +181 -181
- package/src/scheduler-model.test.ts +562 -562
- package/src/scheduler-model.ts +873 -873
- package/src/selection.test.ts +885 -885
- package/src/server-data-source.test.ts +383 -383
- package/src/server-data-source.ts +469 -469
- package/src/sparkline.test.ts +68 -68
- package/src/sparkline.ts +169 -169
- package/src/spreadsheet.test.ts +488 -488
- package/src/spreadsheet.ts +312 -312
- package/src/static-functions.ts +11 -11
- package/src/subscribe.ts +38 -38
- package/src/summaries.ts +113 -113
- package/src/svgrid-wrapper.types.ts +563 -563
- package/src/svgrid.async-editor-options.test.ts +273 -273
- package/src/svgrid.auto-row-height.test.ts +204 -204
- package/src/svgrid.behavior.test.ts +910 -910
- package/src/svgrid.charting.test.ts +654 -534
- package/src/svgrid.comments-autocomplete.test.ts +127 -127
- package/src/svgrid.context-menu.test.ts +147 -147
- package/src/svgrid.features.test.ts +157 -157
- package/src/svgrid.filter-depth.test.ts +163 -163
- package/src/svgrid.filter-menu-listbox.svelte.test.ts +382 -377
- package/src/svgrid.filter-menu-scroll.test.ts +112 -112
- package/src/svgrid.grand-total.test.ts +188 -188
- package/src/svgrid.group-display-mode.test.ts +171 -171
- package/src/svgrid.group-footers.test.ts +121 -121
- package/src/svgrid.group-pagination.test.ts +153 -153
- package/src/svgrid.new-features.wrapper.test.ts +251 -251
- package/src/svgrid.tree-data.test.ts +186 -186
- package/src/svgrid.wrapper.test.ts +63 -63
- package/src/svgriddropdown.async-panel.svelte.test.ts +195 -195
- package/src/test-setup.ts +62 -62
- package/src/themes/index.ts +288 -288
- package/src/toast-store.svelte.ts +250 -250
- package/src/toast-store.test.ts +147 -147
- package/src/tree-row-model.test.ts +168 -168
- package/src/ui-buttons.test.ts +144 -144
- package/src/ui-inputs.test.ts +118 -118
- package/src/ui-localization.test.ts +113 -113
- package/src/ui-range.test.ts +70 -70
- package/src/ui-selection.test.ts +155 -155
- package/src/ui-tier1.test.ts +142 -142
- package/src/virtual.test.ts +88 -88
- package/src/virtualization/column-virtualizer.test.ts +27 -27
- package/src/virtualization/column-virtualizer.ts +30 -30
- package/src/virtualization/svelte-virtualizer.svelte.ts +26 -26
- package/src/virtualization/types.ts +30 -30
- package/src/virtualization/virtualizer.test.ts +47 -47
- package/src/virtualization/virtualizer.ts +322 -322
- package/dist/cdn/GridMenus-DMihUtma.js +0 -600
- package/dist/cdn/GridMenus-nmNDj1a3.js +0 -601
- package/dist/cdn/SvGridChart-Bs2GIR2Q.js +0 -1202
- package/dist/cdn/SvGridChart-CwhFz7GV.js +0 -1203
- package/dist/cdn/SvGridChartPanel-1WXuStzM.js +0 -561
- package/dist/cdn/SvGridChartPanel-e5_nqNP9.js +0 -585
- package/dist/cdn/chart-i4XcXyHJ.js +0 -1214
|
@@ -0,0 +1,1481 @@
|
|
|
1
|
+
import { a as e, b as t, l as n, r, t as i } from "./chart-CKJRCPOk.js";
|
|
2
|
+
import * as a from "svelte/internal/client";
|
|
3
|
+
import "svelte/internal/disclose-version";
|
|
4
|
+
//#region src/SvGridChart.svelte
|
|
5
|
+
var o = a.from_html("<button type=\"button\" class=\"sv-grid-chart-tool svelte-hyytey\" title=\"Reset zoom (or double-click the plot)\"><svg 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> Reset zoom</button>"), s = a.from_html("<button type=\"button\"><svg 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> Annotate</button>"), c = a.from_html("<div class=\"sv-grid-chart-toolbar svelte-hyytey\"><!> <!> <button type=\"button\" class=\"sv-grid-chart-tool svelte-hyytey\" title=\"Download PNG\">PNG</button> <button type=\"button\" class=\"sv-grid-chart-tool svelte-hyytey\" title=\"Download SVG\">SVG</button> <button type=\"button\" class=\"sv-grid-chart-tool svelte-hyytey\" title=\"Copy chart as image\"> </button></div>"), l = a.from_svg("<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>"), u = a.from_svg("<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>"), d = a.from_svg("<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>"), f = a.from_svg("<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>"), p = a.from_svg("<defs></defs>"), ee = a.from_svg("<line class=\"sv-grid-chart-gridline svelte-hyytey\"></line><text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"middle\"> </text>", 1), m = a.from_svg("<text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"end\"> </text>"), te = a.from_svg("<text class=\"sv-grid-chart-axis-title svelte-hyytey\" text-anchor=\"middle\"> </text>"), h = a.from_svg("<text class=\"sv-grid-chart-axis-title svelte-hyytey\" text-anchor=\"middle\"> </text>"), ne = a.from_svg("<!><!><!><!>", 1), re = a.from_svg("<line></line><text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"end\"> </text>", 1), ie = a.from_svg("<text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"start\"> </text>"), ae = a.from_svg("<text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"end\"> </text>"), oe = a.from_svg("<text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"middle\"> </text>"), se = a.from_svg("<line class=\"sv-grid-chart-gridline svelte-hyytey\" opacity=\"0.5\"></line>"), ce = a.from_svg("<line class=\"sv-grid-chart-gridline svelte-hyytey\"></line><!><text class=\"sv-grid-chart-axis sv-grid-chart-group-label svelte-hyytey\" text-anchor=\"middle\"> </text>", 1), le = a.from_svg("<text class=\"sv-grid-chart-axis-title svelte-hyytey\" text-anchor=\"middle\"> </text>"), ue = a.from_svg("<text class=\"sv-grid-chart-axis-title svelte-hyytey\" text-anchor=\"middle\"> </text>"), de = a.from_svg("<text class=\"sv-grid-chart-axis-title svelte-hyytey\" text-anchor=\"middle\"> </text>"), fe = a.from_svg("<!><!><!><!><!><!><!>", 1), pe = a.from_svg("<path class=\"sv-grid-chart-band\" fill-opacity=\"0.12\" stroke=\"none\"></path>"), me = a.from_svg("<path class=\"sv-grid-chart-area svelte-hyytey\" fill-opacity=\"0.15\" stroke=\"none\"></path>"), he = a.from_svg("<circle class=\"sv-grid-chart-dot is-active svelte-hyytey\" r=\"4\"></circle>"), ge = a.from_svg("<text class=\"sv-grid-chart-datalabel svelte-hyytey\" text-anchor=\"middle\"> </text>"), _e = a.from_svg("<circle></circle><!>", 1), ve = a.from_svg("<g><!><!><path class=\"sv-grid-chart-linepath svelte-hyytey\" fill=\"none\" stroke-width=\"2\" stroke-linejoin=\"round\" stroke-linecap=\"round\"></path><!></g>"), ye = a.from_svg("<text> </text>"), be = a.from_svg("<text text-anchor=\"middle\"> </text>"), xe = a.from_svg("<rect class=\"sv-grid-chart-bar svelte-hyytey\" rx=\"1\"></rect><!>", 1), Se = a.from_svg("<line class=\"sv-grid-chart-ohlc svelte-hyytey\"></line><line class=\"sv-grid-chart-ohlc svelte-hyytey\"></line><line class=\"sv-grid-chart-ohlc svelte-hyytey\"></line>", 1), Ce = a.from_svg("<line class=\"sv-grid-chart-wick svelte-hyytey\"></line><rect class=\"sv-grid-chart-candle svelte-hyytey\"></rect>", 1), we = a.from_svg("<circle class=\"sv-grid-chart-outlier svelte-hyytey\" r=\"2\" fill=\"none\"></circle>"), Te = a.from_svg("<line class=\"sv-grid-chart-whisker svelte-hyytey\"></line><line class=\"sv-grid-chart-whisker svelte-hyytey\"></line><line class=\"sv-grid-chart-whisker svelte-hyytey\"></line><rect class=\"sv-grid-chart-box svelte-hyytey\" fill-opacity=\"0.25\"></rect><line class=\"sv-grid-chart-median svelte-hyytey\"></line><!>", 1), Ee = a.from_svg("<line class=\"sv-grid-chart-errorbar svelte-hyytey\"></line><line class=\"sv-grid-chart-errorbar svelte-hyytey\"></line><line class=\"sv-grid-chart-errorbar svelte-hyytey\"></line>", 1), De = a.from_svg("<circle class=\"sv-grid-chart-scatter svelte-hyytey\" fill-opacity=\"0.7\"></circle>"), Oe = a.from_svg("<line class=\"sv-grid-chart-refline svelte-hyytey\"></line><text class=\"sv-grid-chart-reflabel svelte-hyytey\" text-anchor=\"end\"> </text>", 1), ke = a.from_svg("<line class=\"sv-grid-chart-refline svelte-hyytey\"></line><text class=\"sv-grid-chart-reflabel svelte-hyytey\" text-anchor=\"start\"> </text>", 1), Ae = a.from_svg("<path class=\"sv-grid-chart-overlay svelte-hyytey\" fill=\"none\" stroke-width=\"2\" stroke-dasharray=\"6 4\" stroke-linejoin=\"round\" stroke-linecap=\"round\"></path>"), je = a.from_svg("<circle stroke=\"var(--sg-bg, #fff)\" stroke-width=\"1.5\"></circle><text class=\"sv-grid-chart-annotation-label svelte-hyytey\"> </text>", 1), Me = a.from_svg("<line class=\"sv-grid-chart-crosshair svelte-hyytey\"></line>"), Ne = a.from_svg("<line class=\"sv-grid-chart-crosshair svelte-hyytey\"></line>"), Pe = a.from_svg("<text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"end\"> </text>"), Fe = a.from_svg("<text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"middle\"> </text>"), Ie = a.from_svg("<text class=\"sv-grid-chart-heatlabel svelte-hyytey\" text-anchor=\"middle\"> </text>"), Le = a.from_svg("<rect class=\"sv-grid-chart-heatcell svelte-hyytey\"></rect><!>", 1), Re = a.from_svg("<stop></stop>"), ze = a.from_svg("<defs><linearGradient x1=\"0\" y1=\"1\" x2=\"0\" y2=\"0\"></linearGradient></defs><rect class=\"sv-grid-chart-heatlegend svelte-hyytey\" width=\"10\"></rect><text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"start\"> </text><text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"start\"> </text>", 1), Be = a.from_svg("<!><!><!><!>", 1), Ve = a.from_svg("<path class=\"sv-grid-chart-funnel-seg svelte-hyytey\"></path><text class=\"sv-grid-chart-funnel-label svelte-hyytey\" text-anchor=\"middle\"> </text><text class=\"sv-grid-chart-funnel-value svelte-hyytey\" text-anchor=\"middle\"> </text>", 1), He = a.from_svg("<circle class=\"sv-grid-chart-radar-ring svelte-hyytey\"></circle>"), Ue = a.from_svg("<line class=\"sv-grid-chart-radar-spoke svelte-hyytey\"></line><text class=\"sv-grid-chart-axis svelte-hyytey\"> </text>", 1), We = a.from_svg("<circle class=\"sv-grid-chart-radar-dot svelte-hyytey\" r=\"3\"></circle>"), Ge = a.from_svg("<path class=\"sv-grid-chart-radar-poly svelte-hyytey\" fill-opacity=\"0.18\" stroke-width=\"2\"></path><!>", 1), Ke = a.from_svg("<!><!><!>", 1), qe = a.from_svg("<text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"start\"> </text>"), Je = a.from_svg("<text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"end\"> </text>"), Ye = a.from_svg("<rect rx=\"2\"></rect>"), Xe = a.from_svg("<rect class=\"sv-grid-chart-calendar-legend svelte-hyytey\" width=\"10\" height=\"10\" rx=\"2\"></rect><text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"start\"> </text>", 1), Ze = a.from_svg("<text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"start\">Less</text><!><text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"start\">More</text>", 1), Qe = a.from_svg("<!><!><!><!>", 1), $e = a.from_svg("<line></line>"), et = a.from_svg("<path fill=\"none\" stroke-width=\"4\" stroke-linecap=\"butt\" opacity=\"0.7\"></path>"), tt = a.from_svg("<line stroke=\"var(--sg-fg, #0f172a)\" stroke-width=\"2.5\" stroke-linecap=\"round\"></line>"), nt = a.from_svg("<!><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-hyytey\"></path><circle class=\"sv-grid-chart-gauge-hub svelte-hyytey\"></circle><circle class=\"sv-grid-chart-gauge-hub-dot svelte-hyytey\" r=\"2.5\"></circle><text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"middle\"> </text><text class=\"sv-grid-chart-axis svelte-hyytey\" text-anchor=\"middle\"> </text><text class=\"sv-grid-chart-gauge-value svelte-hyytey\" text-anchor=\"middle\"> </text>", 1), rt = a.from_svg("<text class=\"sv-grid-chart-treemap-label svelte-hyytey\"> </text>"), it = a.from_svg("<text class=\"sv-grid-chart-treemap-value svelte-hyytey\" opacity=\"0.85\"> </text>"), at = a.from_svg("<rect class=\"sv-grid-chart-treemap-cell svelte-hyytey\"></rect><!><!>", 1), ot = a.from_svg("<path class=\"sv-grid-chart-sankey-link svelte-hyytey\" fill=\"none\" stroke-opacity=\"0.35\"></path>"), st = a.from_svg("<rect class=\"sv-grid-chart-sankey-node svelte-hyytey\"></rect><text class=\"sv-grid-chart-sankey-label svelte-hyytey\"> </text>", 1), ct = a.from_svg("<!><!>", 1), lt = a.from_svg("<text class=\"sv-grid-chart-datalabel on-bar svelte-hyytey\" text-anchor=\"middle\" dominant-baseline=\"middle\"> </text>"), ut = a.from_svg("<path class=\"sv-grid-chart-slice svelte-hyytey\" stroke=\"var(--sg-bg, #fff)\" stroke-width=\"1\"></path><!>", 1), dt = a.from_svg("<text class=\"sv-grid-chart-donut-total svelte-hyytey\" text-anchor=\"middle\"> </text><text class=\"sv-grid-chart-donut-label svelte-hyytey\" text-anchor=\"middle\">Total</text>", 1), ft = a.from_svg("<rect class=\"sv-grid-chart-cat-hit svelte-hyytey\" data-dense=\"true\"></rect>"), pt = a.from_svg("<rect class=\"sv-grid-chart-cat-hit svelte-hyytey\"></rect>"), mt = a.from_svg("<rect class=\"sv-grid-chart-zoom-rect svelte-hyytey\"></rect>"), ht = a.from_svg("<path fill-opacity=\"0.10\" stroke=\"none\"></path>"), gt = a.from_svg("<!><path fill=\"none\" stroke-width=\"1.2\" opacity=\"0.75\"></path>", 1), _t = a.from_svg("<rect opacity=\"0.55\"></rect>"), vt = a.from_svg("<svg class=\"sv-grid-chart-brush svelte-hyytey\" width=\"100%\" role=\"img\" aria-label=\"Range brush\"><!><!><rect class=\"sv-grid-chart-brush-mask svelte-hyytey\"></rect><rect class=\"sv-grid-chart-brush-mask svelte-hyytey\"></rect><rect class=\"sv-grid-chart-brush-window svelte-hyytey\"></rect><rect class=\"sv-grid-chart-brush-handle svelte-hyytey\" width=\"8\"></rect><rect class=\"sv-grid-chart-brush-handle svelte-hyytey\" width=\"8\"></rect></svg>"), yt = a.from_html("<div class=\"sv-grid-chart-empty svelte-hyytey\">No data</div>"), bt = a.from_html("<span class=\"sv-grid-chart-tooltip-dot svelte-hyytey\"></span>"), xt = a.from_html("<span class=\"sv-grid-chart-tooltip-row-label svelte-hyytey\"> </span>"), St = a.from_html("<span class=\"sv-grid-chart-tooltip-row svelte-hyytey\"><!> <!> <span class=\"sv-grid-chart-tooltip-row-value svelte-hyytey\"> </span></span>"), Ct = a.from_html("<div><span class=\"sv-grid-chart-tooltip-title svelte-hyytey\"> </span> <!></div>"), wt = a.from_html("<button type=\"button\"><span class=\"sv-grid-chart-swatch svelte-hyytey\"></span> </button>"), Tt = a.from_html("<button type=\"button\" class=\"sv-grid-chart-legend-more svelte-hyytey\"> </button>"), Et = a.from_html("<div class=\"sv-grid-chart-legend svelte-hyytey\"><!> <!></div>"), Dt = a.from_html("<th> </th>"), Ot = a.from_html("<td> </td>"), kt = a.from_html("<tr></tr>"), At = a.from_html("<div class=\"sv-grid-chart svelte-hyytey\"><!> <svg width=\"100%\" role=\"img\"><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!></svg> <!> <!> <!> <!> <table class=\"sv-grid-chart-sr-only svelte-hyytey\"><caption> <!></caption><thead><tr></tr></thead><tbody></tbody></table></div>"), jt = {
|
|
6
|
+
hash: "svelte-hyytey",
|
|
7
|
+
code: ".sv-grid-chart.svelte-hyytey {position:relative;display:flex;flex-direction:column;gap:8px;width:100%;}.sv-grid-chart-svg.svelte-hyytey {display:block;width:100%;height:auto;}.sv-grid-chart-gridline.svelte-hyytey {stroke:var(--sg-border, #e2e8f0);stroke-width:1;opacity:0.6;}.sv-grid-chart-gridline.is-zero.svelte-hyytey {stroke:var(--sg-muted, #94a3b8);opacity:0.9;}.sv-grid-chart-axis.svelte-hyytey {fill:var(--sg-muted, #64748b);font-size:10px;font-family:inherit;}.sv-grid-chart-axis-title.svelte-hyytey {fill:var(--sg-muted, #64748b);font-size:11px;font-weight:600;font-family:inherit;}.sv-grid-chart-group-label.svelte-hyytey {fill:var(--sg-fg, #0f172a);font-weight:600;}.sv-grid-chart-crosshair.svelte-hyytey {stroke:var(--sg-accent, #2563eb);stroke-width:1;stroke-dasharray:3 3;opacity:0.65;pointer-events:none;}.sv-grid-chart-refline.svelte-hyytey {stroke-width:1.5;opacity:0.9;pointer-events:none;}.sv-grid-chart-reflabel.svelte-hyytey {font-size:9.5px;font-weight:700;font-family:inherit;pointer-events:none;}.sv-grid-chart-overlay.svelte-hyytey {opacity:0.85;pointer-events:none;}.sv-grid-chart-annotation-marker.svelte-hyytey {pointer-events:none;}.sv-grid-chart-annotation-label.svelte-hyytey {font-size:10px;font-weight:700;font-family:inherit;pointer-events:none;}\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-hyytey {stroke:var(--sg-border, #cbd5e1);stroke-width:1;transition:opacity 100ms ease;cursor:default;}.sv-grid-chart-svg.is-clickable.svelte-hyytey .sv-grid-chart-heatcell:where(.svelte-hyytey) {cursor:pointer;}.sv-grid-chart-heatcell.svelte-hyytey:hover {opacity:0.85;}.sv-grid-chart-heatlabel.svelte-hyytey {font-size:10px;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-hyytey {stroke:var(--sg-border, #cbd5e1);stroke-width:1;}\n /* Funnel segments + labels. */.sv-grid-chart-funnel-seg.svelte-hyytey {stroke:var(--sg-bg, #ffffff);stroke-width:2;transition:opacity 100ms ease;cursor:default;}.sv-grid-chart-svg.is-clickable.svelte-hyytey .sv-grid-chart-funnel-seg:where(.svelte-hyytey) {cursor:pointer;}.sv-grid-chart-funnel-seg.svelte-hyytey:hover {opacity:0.88;}.sv-grid-chart-funnel-label.svelte-hyytey {font-size:11px;font-weight:700;font-family:inherit;pointer-events:none;}.sv-grid-chart-funnel-value.svelte-hyytey {font-size:10px;font-family:inherit;opacity:0.85;pointer-events:none;}\n /* Radar grid + polygons. */.sv-grid-chart-radar-ring.svelte-hyytey {fill:none;stroke:var(--sg-border, #e2e8f0);stroke-width:1;opacity:0.6;}.sv-grid-chart-radar-spoke.svelte-hyytey {stroke:var(--sg-border, #e2e8f0);stroke-width:1;opacity:0.6;}.sv-grid-chart-radar-poly.svelte-hyytey {transition:opacity 100ms ease;pointer-events:none;}.sv-grid-chart-radar-dot.svelte-hyytey {transition:r 100ms ease;cursor:default;}.sv-grid-chart-radar-dot.svelte-hyytey: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-hyytey {stroke:var(--sg-border, #e2e8f0);stroke-width:0.5;transition:opacity 100ms ease;cursor:default;}.sv-grid-chart-calendar-cell.is-blank.svelte-hyytey {stroke-opacity:0.5;}.sv-grid-chart-calendar-cell.svelte-hyytey:hover {opacity:0.85;}.sv-grid-chart-calendar-legend.svelte-hyytey {stroke:var(--sg-border, #cbd5e1);stroke-width:0.5;}\n /* Gauge centre readout. */.sv-grid-chart-gauge-value.svelte-hyytey {fill:var(--sg-fg, #0f172a);font-size:22px;font-weight:800;font-family:inherit;pointer-events:none;}\n /* Gauge tick marks: faint minors, stronger majors. */.sv-grid-chart-gauge-tick.svelte-hyytey {stroke:var(--sg-muted, #94a3b8);stroke-width:1;opacity:0.4;}.sv-grid-chart-gauge-tick.is-major.svelte-hyytey {stroke-width:2;opacity:0.7;}\n /* Pointer needle + hub. */.sv-grid-chart-gauge-needle.svelte-hyytey {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-hyytey {fill:var(--sg-fg, #0f172a);stroke:var(--sg-bg, #ffffff);stroke-width:2;}.sv-grid-chart-gauge-hub-dot.svelte-hyytey {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-hyytey {stroke:var(--sg-bg, #ffffff);stroke-width:1;transition:opacity 100ms ease;cursor:default;}.sv-grid-chart-svg.is-clickable.svelte-hyytey .sv-grid-chart-treemap-cell:where(.svelte-hyytey) {cursor:pointer;}.sv-grid-chart-treemap-cell.svelte-hyytey:hover {opacity:0.88;}.sv-grid-chart-treemap-label.svelte-hyytey {font-size:11px;font-weight:600;font-family:inherit;pointer-events:none;}.sv-grid-chart-treemap-value.svelte-hyytey {font-size:10px;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-hyytey {transition:opacity 100ms ease;cursor:default;}.sv-grid-chart-sankey-node.svelte-hyytey:hover {opacity:0.88;}.sv-grid-chart-sankey-link.svelte-hyytey {transition:stroke-opacity 100ms ease;cursor:default;}.sv-grid-chart-sankey-link.svelte-hyytey:hover {stroke-opacity:0.6;}.sv-grid-chart-sankey-label.svelte-hyytey {fill:var(--sg-fg, #0f172a);font-size:11px;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-hyytey {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-hyytey {fill:var(--sg-bg, #ffffff);fill-opacity:0.65;pointer-events:none;}.sv-grid-chart-brush-window.svelte-hyytey {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-hyytey:active {cursor:grabbing;}.sv-grid-chart-brush-handle.svelte-hyytey {fill:var(--sg-accent, #2563eb);fill-opacity:0.4;cursor:ew-resize;}.sv-grid-chart-brush-handle.svelte-hyytey:hover {fill-opacity:0.7;}.sv-grid-chart-scatter.svelte-hyytey {transition:opacity 0.2s ease;stroke-width:1;}.is-clickable.svelte-hyytey .sv-grid-chart-scatter:where(.svelte-hyytey),\n .sv-grid-chart-scatter.svelte-hyytey:hover {cursor:pointer;}.sv-grid-chart-cat-hit.svelte-hyytey {fill:transparent;}.sv-grid-chart-cat-hit.svelte-hyytey:focus-visible,\n .sv-grid-chart-slice.svelte-hyytey:focus-visible {outline:2px solid var(--sg-accent, #2563eb);outline-offset:1px;}.sv-grid-chart-datalabel.svelte-hyytey {fill:var(--sg-fg, #0f172a);font-size:9.5px;font-weight:600;font-variant-numeric:tabular-nums;pointer-events:none;}.sv-grid-chart-datalabel.on-bar.svelte-hyytey {fill:#fff;}.sv-grid-chart-donut-total.svelte-hyytey {fill:var(--sg-fg, #0f172a);font-size:16px;font-weight:800;font-variant-numeric:tabular-nums;}.sv-grid-chart-donut-label.svelte-hyytey {fill:var(--sg-muted, #64748b);font-size:10px;}.sv-grid-chart-bar.svelte-hyytey {transition:x 0.3s ease, y 0.3s ease, width 0.3s ease, height 0.3s ease;}.sv-grid-chart-dot.svelte-hyytey {transition:cx 0.3s ease, cy 0.3s ease;}.sv-grid-chart-candle.svelte-hyytey {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-hyytey,\n .sv-grid-chart-ohlc.svelte-hyytey {stroke-width:1;shape-rendering:crispEdges;}.sv-grid-chart-box.svelte-hyytey {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-hyytey,\n .sv-grid-chart-errorbar.svelte-hyytey {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-hyytey {stroke-width:2;shape-rendering:crispEdges;}.sv-grid-chart-outlier.svelte-hyytey {stroke-width:1;}.is-clickable.svelte-hyytey .sv-grid-chart-cat-hit:where(.svelte-hyytey),\n .is-clickable.svelte-hyytey .sv-grid-chart-slice:where(.svelte-hyytey) {cursor:pointer;}.sv-grid-chart-empty.svelte-hyytey {position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:var(--sg-muted, #94a3b8);font-size:13px;pointer-events:none;}\n\n /* Toolbar above the chart: reset-zoom, PNG / SVG / Copy. */.sv-grid-chart-toolbar.svelte-hyytey {display:flex;justify-content:flex-end;gap:4px;flex-wrap:wrap;}.sv-grid-chart-tool.svelte-hyytey {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:11px;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-hyytey: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-hyytey {background:var(--sg-accent, #2563eb);border-color:var(--sg-accent, #2563eb);color:var(--sg-on-accent, #fff);}.sv-grid-chart-svg.is-annotating.svelte-hyytey {cursor:copy;}.sv-grid-chart-annotation-marker.is-removable.svelte-hyytey {cursor:pointer;}\n\n /* Drag-to-zoom: translucent accent rectangle over the plot. */.sv-grid-chart-svg.is-zoomable.svelte-hyytey {cursor:crosshair;}.sv-grid-chart-svg.is-dragging.svelte-hyytey {cursor:crosshair;user-select:none;}.sv-grid-chart-zoom-rect.svelte-hyytey {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-hyytey {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:11.5px;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-hyytey {transform:translate(-50%, 16px);}.sv-grid-chart-tooltip-title.svelte-hyytey {opacity:0.75;font-size:10.5px;margin-bottom:1px;}.sv-grid-chart-tooltip-row.svelte-hyytey {display:flex;align-items:center;gap:6px;}.sv-grid-chart-tooltip-dot.svelte-hyytey {width:8px;height:8px;border-radius:2px;flex-shrink:0;}.sv-grid-chart-tooltip-row-label.svelte-hyytey {opacity:0.85;}.sv-grid-chart-tooltip-row-value.svelte-hyytey {margin-left:auto;padding-left:10px;font-weight:700;font-variant-numeric:tabular-nums;}.sv-grid-chart-legend.svelte-hyytey {display:flex;flex-wrap:wrap;gap:6px 12px;font-size:12px;color:var(--sg-fg, #0f172a);}.sv-grid-chart-legend-item.svelte-hyytey {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-hyytey:disabled {cursor:default;}.sv-grid-chart-legend-item.is-off.svelte-hyytey {color:var(--sg-muted, #94a3b8);text-decoration:line-through;}.sv-grid-chart-legend-item.is-isolated.svelte-hyytey {background:var(--sg-header-bg, #f1f5f9);font-weight:700;}.sv-grid-chart-legend-more.svelte-hyytey {border:1px dashed var(--sg-border, #cbd5e1);background:transparent;color:var(--sg-muted, #64748b);font:inherit;font-size:11px;padding:1px 7px;border-radius:999px;cursor:pointer;}.sv-grid-chart-legend-more.svelte-hyytey:hover {color:var(--sg-fg, #0f172a);border-color:var(--sg-accent, #2563eb);}.sv-grid-chart-sr-only.svelte-hyytey {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-hyytey {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-hyytey-sv-grid-chart-in {\n from { opacity: 0; }\n to { opacity: 1; }\n }.sv-grid-chart-bar.svelte-hyytey,\n .sv-grid-chart-linepath.svelte-hyytey,\n .sv-grid-chart-area.svelte-hyytey,\n .sv-grid-chart-slice.svelte-hyytey,\n .sv-grid-chart-candle.svelte-hyytey,\n .sv-grid-chart-box.svelte-hyytey,\n .sv-grid-chart-funnel-seg.svelte-hyytey,\n .sv-grid-chart-heatcell.svelte-hyytey,\n .sv-grid-chart-treemap-cell.svelte-hyytey {\n animation: svelte-hyytey-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-hyytey,\n .sv-grid-chart-dot.svelte-hyytey,\n .sv-grid-chart-candle.svelte-hyytey,\n .sv-grid-chart-box.svelte-hyytey {transition:none;}.sv-grid-chart-bar.svelte-hyytey,\n .sv-grid-chart-linepath.svelte-hyytey,\n .sv-grid-chart-area.svelte-hyytey,\n .sv-grid-chart-slice.svelte-hyytey,\n .sv-grid-chart-candle.svelte-hyytey,\n .sv-grid-chart-box.svelte-hyytey,\n .sv-grid-chart-funnel-seg.svelte-hyytey,\n .sv-grid-chart-heatcell.svelte-hyytey,\n .sv-grid-chart-treemap-cell.svelte-hyytey {\n animation: none;}\n }"
|
|
8
|
+
};
|
|
9
|
+
function Mt(Mt, g) {
|
|
10
|
+
a.push(g, !0), a.append_styles(Mt, jt);
|
|
11
|
+
let Nt = a.prop(g, "legend", 3, !0), _ = a.prop(g, "interactive", 3, !0), v = a.prop(g, "dataLabels", 3, !1), Pt = a.prop(g, "zoomable", 3, !1), Ft = a.prop(g, "brush", 3, !1), It = a.prop(g, "brushHeight", 3, 88), Lt = a.prop(g, "annotatable", 3, !1), Rt = a.derived(() => g.toolbar ?? (Pt() || !!g.onDrill || Lt())), y = a.state(!1), b = (e) => g.formatValue ? g.formatValue(e) : g.spec.valueFormat ? n(e, g.spec.valueFormat, g.spec) : Number.isFinite(e) ? e.toLocaleString(void 0, { maximumFractionDigits: 2 }) : String(e), x = a.state(a.proxy(/* @__PURE__ */ new Set())), S = a.state(null), zt = a.state(null), Bt = a.state(null), C = a.derived(() => g.spec.palette ?? a.get(zt) ?? i), w = `svgc-${Math.random().toString(36).slice(2, 8)}`, T = a.derived(() => g.spec.series.map((e, t) => ({
|
|
12
|
+
...e,
|
|
13
|
+
color: e.color ?? a.get(C)[t % a.get(C).length]
|
|
14
|
+
}))), Vt = a.derived(() => g.spec.series.map((e, t) => e.pattern ? e.pattern : g.spec.patternFallback ? [
|
|
15
|
+
"stripe",
|
|
16
|
+
"crosshatch",
|
|
17
|
+
"dots",
|
|
18
|
+
"diagonal"
|
|
19
|
+
][t % 4] : "solid")), Ht = a.derived(() => {
|
|
20
|
+
let e = {};
|
|
21
|
+
return a.get(T).forEach((t, n) => {
|
|
22
|
+
let r = a.get(Vt)[n];
|
|
23
|
+
e[t.label] = r === "solid" || !r ? t.color : `url(#${w}-pat-${n})`;
|
|
24
|
+
}), e;
|
|
25
|
+
}), Ut = a.derived(() => a.get(T).map((e, t) => ({
|
|
26
|
+
id: `${w}-pat-${t}`,
|
|
27
|
+
color: e.color,
|
|
28
|
+
kind: a.get(Vt)[t] ?? "solid"
|
|
29
|
+
})).filter((e) => e.kind !== "solid")), Wt = a.derived(() => {
|
|
30
|
+
if (a.get(S) == null) return a.get(x);
|
|
31
|
+
let e = g.spec.type === "pie" ? g.spec.categories : g.spec.series.map((e) => e.label);
|
|
32
|
+
return new Set(e.filter((e) => e !== a.get(S)));
|
|
33
|
+
}), E = a.state(null), Gt = a.derived(() => a.get(E) !== null);
|
|
34
|
+
function Kt() {
|
|
35
|
+
a.set(E, null);
|
|
36
|
+
}
|
|
37
|
+
let D = a.state(null), O = a.state(null), k = a.state(null), A = a.derived(() => {
|
|
38
|
+
if (!a.get(O) || !a.get(k)) return null;
|
|
39
|
+
let e = Math.min(a.get(O).x, a.get(k).x), t = Math.min(a.get(O).y, a.get(k).y), n = Math.abs(a.get(k).x - a.get(O).x), r = Math.abs(a.get(k).y - a.get(O).y);
|
|
40
|
+
return n > 4 && r > 4 ? {
|
|
41
|
+
x: e,
|
|
42
|
+
y: t,
|
|
43
|
+
w: n,
|
|
44
|
+
h: r
|
|
45
|
+
} : null;
|
|
46
|
+
});
|
|
47
|
+
function qt(e) {
|
|
48
|
+
if (!a.get(D)) return null;
|
|
49
|
+
let t = a.get(D).getBoundingClientRect();
|
|
50
|
+
return {
|
|
51
|
+
x: (e.clientX - t.left) / t.width * a.get(I).width,
|
|
52
|
+
y: (e.clientY - t.top) / t.height * a.get(I).height
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function Jt(e) {
|
|
56
|
+
let t = a.get(R) ? e.y - a.get(I).plot.y : e.x - a.get(I).plot.x, n = Math.floor(t / a.get(z));
|
|
57
|
+
return Math.max(0, Math.min(a.get(F).categories.length - 1, n));
|
|
58
|
+
}
|
|
59
|
+
function Yt(e) {
|
|
60
|
+
if (a.get(y) || !Pt() || !a.get(L)) return;
|
|
61
|
+
let t = qt(e);
|
|
62
|
+
t && (t.x < a.get(I).plot.x || t.x > a.get(I).plot.x + a.get(I).plot.w || t.y < a.get(I).plot.y || t.y > a.get(I).plot.y + a.get(I).plot.h || (a.set(O, t, !0), a.set(k, t, !0), e.target.setPointerCapture?.(e.pointerId)));
|
|
63
|
+
}
|
|
64
|
+
function Xt(e) {
|
|
65
|
+
a.get(O) && a.set(k, qt(e), !0);
|
|
66
|
+
}
|
|
67
|
+
function Zt() {
|
|
68
|
+
if (!a.get(O) || !a.get(k)) {
|
|
69
|
+
a.set(O, null), a.set(k, null);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
let e = a.get(A);
|
|
73
|
+
if (e) {
|
|
74
|
+
let t = Jt({
|
|
75
|
+
x: e.x,
|
|
76
|
+
y: e.y
|
|
77
|
+
}), n = Jt({
|
|
78
|
+
x: e.x + e.w,
|
|
79
|
+
y: e.y + e.h
|
|
80
|
+
}), r = a.get(E) ? a.get(E).i0 : 0, i = r + Math.min(t, n), o = r + Math.max(t, n);
|
|
81
|
+
o > i && a.set(E, {
|
|
82
|
+
i0: i,
|
|
83
|
+
i1: o
|
|
84
|
+
}, !0);
|
|
85
|
+
}
|
|
86
|
+
a.set(O, null), a.set(k, null);
|
|
87
|
+
}
|
|
88
|
+
function Qt() {
|
|
89
|
+
Pt() && a.get(Gt) && Kt();
|
|
90
|
+
}
|
|
91
|
+
let $t = a.derived(() => g.spec.type === "candlestick" || g.spec.type === "ohlc"), en = a.derived(() => g.spec.type === "ohlc"), tn = a.derived(() => Ft() && g.spec.type !== "pie" && g.spec.type !== "heatmap"), nn = a.derived(() => ({
|
|
92
|
+
...g.spec,
|
|
93
|
+
height: It(),
|
|
94
|
+
yAxisTitle: void 0,
|
|
95
|
+
y2AxisTitle: void 0,
|
|
96
|
+
xAxisTitle: void 0,
|
|
97
|
+
referenceLines: void 0,
|
|
98
|
+
annotations: void 0,
|
|
99
|
+
type: a.get($t) || g.spec.type === "boxplot" ? "line" : g.spec.type,
|
|
100
|
+
series: a.get(T).filter((e) => !a.get(Wt).has(e.label)).map((e) => e.ohlc || e.boxes ? {
|
|
101
|
+
...e,
|
|
102
|
+
ohlc: void 0,
|
|
103
|
+
boxes: void 0,
|
|
104
|
+
errors: void 0,
|
|
105
|
+
type: "line"
|
|
106
|
+
} : e.errors ? {
|
|
107
|
+
...e,
|
|
108
|
+
errors: void 0
|
|
109
|
+
} : e)
|
|
110
|
+
})), j = a.derived(() => a.get(tn) ? r(a.get(nn)) : null), M = a.derived(() => {
|
|
111
|
+
let e = g.spec.categories.length;
|
|
112
|
+
return !a.get(E) || e === 0 ? {
|
|
113
|
+
t0: 0,
|
|
114
|
+
t1: 1
|
|
115
|
+
} : {
|
|
116
|
+
t0: a.get(E).i0 / e,
|
|
117
|
+
t1: (a.get(E).i1 + 1) / e
|
|
118
|
+
};
|
|
119
|
+
}), N = a.state(null);
|
|
120
|
+
function rn(e, t) {
|
|
121
|
+
let n = t.getBoundingClientRect();
|
|
122
|
+
return a.get(j) ? (e.clientX - n.left) / n.width * a.get(j).width : 0;
|
|
123
|
+
}
|
|
124
|
+
function an(e, t) {
|
|
125
|
+
if (!a.get(j)) return;
|
|
126
|
+
let n = e.currentTarget, r = rn(e, n.ownerSVGElement ?? n);
|
|
127
|
+
a.set(N, {
|
|
128
|
+
mode: t,
|
|
129
|
+
startX: r,
|
|
130
|
+
startT0: a.get(M).t0,
|
|
131
|
+
startT1: a.get(M).t1
|
|
132
|
+
}, !0), e.currentTarget.setPointerCapture?.(e.pointerId), e.stopPropagation();
|
|
133
|
+
}
|
|
134
|
+
function on(e) {
|
|
135
|
+
if (!a.get(N) || !a.get(j)) return;
|
|
136
|
+
let t = (rn(e, e.currentTarget.ownerSVGElement ?? e.currentTarget) - a.get(N).startX) / a.get(j).plot.w, n = g.spec.categories.length;
|
|
137
|
+
if (n === 0) return;
|
|
138
|
+
let r = a.get(N).startT0, i = a.get(N).startT1;
|
|
139
|
+
if (a.get(N).mode === "move") {
|
|
140
|
+
let e = i - r;
|
|
141
|
+
r = Math.max(0, Math.min(1 - e, r + t)), i = r + e;
|
|
142
|
+
} else a.get(N).mode === "left" ? r = Math.max(0, Math.min(i - 1 / n, r + t)) : i = Math.min(1, Math.max(r + 1 / n, i + t));
|
|
143
|
+
let o = Math.max(0, Math.floor(r * n)), s = Math.min(n - 1, Math.ceil(i * n) - 1);
|
|
144
|
+
o === 0 && s === n - 1 ? a.set(E, null) : a.set(E, {
|
|
145
|
+
i0: o,
|
|
146
|
+
i1: Math.max(o, s)
|
|
147
|
+
}, !0);
|
|
148
|
+
}
|
|
149
|
+
function P(e) {
|
|
150
|
+
a.set(N, null), e.currentTarget.releasePointerCapture?.(e.pointerId);
|
|
151
|
+
}
|
|
152
|
+
let F = a.derived(() => {
|
|
153
|
+
if (g.spec.type === "pie") {
|
|
154
|
+
let e = a.get(T)[0];
|
|
155
|
+
if (!e) return g.spec;
|
|
156
|
+
let t = e.values.map((e, t) => a.get(Wt).has(g.spec.categories[t] ?? String(t)) ? 0 : e);
|
|
157
|
+
return {
|
|
158
|
+
...g.spec,
|
|
159
|
+
series: [{
|
|
160
|
+
...e,
|
|
161
|
+
values: t
|
|
162
|
+
}]
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
let e = a.get(T).filter((e) => !a.get(Wt).has(e.label));
|
|
166
|
+
return a.get(E) ? t({
|
|
167
|
+
...g.spec,
|
|
168
|
+
series: e
|
|
169
|
+
}, a.get(E).i0, a.get(E).i1) : {
|
|
170
|
+
...g.spec,
|
|
171
|
+
series: e
|
|
172
|
+
};
|
|
173
|
+
}), sn = a.state(!1), I = a.derived(() => r({
|
|
174
|
+
...a.get(F),
|
|
175
|
+
palette: a.get(C),
|
|
176
|
+
...g.width || g.height ? {
|
|
177
|
+
width: g.width,
|
|
178
|
+
height: g.height
|
|
179
|
+
} : {}
|
|
180
|
+
}, a.get(sn) ? "dark" : "light")), cn = a.derived(() => e(a.get(I))), ln = a.derived(() => ({
|
|
181
|
+
geo: a.get(I),
|
|
182
|
+
scales: a.get(cn),
|
|
183
|
+
xOf: a.get(cn)?.xOf ?? null,
|
|
184
|
+
yOf: a.get(cn)?.yOf ?? null
|
|
185
|
+
})), L = a.derived(() => g.spec.type !== "pie" && g.spec.type !== "heatmap" && g.spec.type !== "funnel" && g.spec.type !== "radar" && g.spec.type !== "calendar" && g.spec.type !== "gauge" && g.spec.type !== "treemap" && g.spec.type !== "sankey"), un = a.derived(() => g.spec.type === "scatter"), dn = a.derived(() => g.spec.type === "heatmap"), fn = a.derived(() => g.spec.type === "funnel"), pn = a.derived(() => g.spec.type === "radar"), mn = a.derived(() => g.spec.type === "calendar"), hn = a.derived(() => g.spec.type === "gauge"), gn = a.derived(() => g.spec.type === "treemap"), _n = a.derived(() => g.spec.type === "sankey"), R = a.derived(() => a.get(I).orientation === "horizontal"), z = a.derived(() => (a.get(R) ? a.get(I).plot.h : a.get(I).plot.w) / Math.max(1, a.get(F).categories.length)), vn = a.derived(() => a.get(L) && !a.get(un) && !a.get(R) && a.get(z) < 4 && a.get(F).categories.length > 1), yn = 1e3;
|
|
186
|
+
function bn(e, t, n) {
|
|
187
|
+
let r = n.ownerSVGElement ?? n;
|
|
188
|
+
if (!r || typeof r.getBoundingClientRect != "function") return null;
|
|
189
|
+
let i = r.getBoundingClientRect();
|
|
190
|
+
if (!i.width || !i.height) return null;
|
|
191
|
+
let a = r.viewBox?.baseVal, o = a && a.width ? a.width / i.width : 1, s = a && a.height ? a.height / i.height : 1;
|
|
192
|
+
return {
|
|
193
|
+
x: (e - i.left) * o + (a ? a.x : 0),
|
|
194
|
+
y: (t - i.top) * s + (a ? a.y : 0)
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
function xn(e, t) {
|
|
198
|
+
let n = bn(e, 0, t);
|
|
199
|
+
if (!n) return null;
|
|
200
|
+
let r = n.x, i = a.get(I).lines[0]?.points, o = a.get(F).categories.length;
|
|
201
|
+
if (!i || i.length !== o) {
|
|
202
|
+
let e = Math.floor((r - a.get(I).plot.x) / a.get(z));
|
|
203
|
+
return e >= 0 && e < o ? e : null;
|
|
204
|
+
}
|
|
205
|
+
let s = 0, c = i.length - 1;
|
|
206
|
+
for (; s < c;) {
|
|
207
|
+
let e = s + c >> 1;
|
|
208
|
+
i[e].x < r ? s = e + 1 : c = e;
|
|
209
|
+
}
|
|
210
|
+
return s > 0 && Math.abs(i[s - 1].x - r) <= Math.abs(i[s].x - r) && --s, s;
|
|
211
|
+
}
|
|
212
|
+
let B = a.state(0);
|
|
213
|
+
function Sn(e) {
|
|
214
|
+
let t = a.get(F).categories.length - 1, n = Math.max(1, Math.floor(t / 10)), r = a.get(B);
|
|
215
|
+
switch (e.key) {
|
|
216
|
+
case "ArrowRight":
|
|
217
|
+
case "ArrowDown":
|
|
218
|
+
r = Math.min(t, a.get(B) + 1);
|
|
219
|
+
break;
|
|
220
|
+
case "ArrowLeft":
|
|
221
|
+
case "ArrowUp":
|
|
222
|
+
r = Math.max(0, a.get(B) - 1);
|
|
223
|
+
break;
|
|
224
|
+
case "Home":
|
|
225
|
+
r = 0;
|
|
226
|
+
break;
|
|
227
|
+
case "End":
|
|
228
|
+
r = t;
|
|
229
|
+
break;
|
|
230
|
+
case "PageDown":
|
|
231
|
+
r = Math.min(t, a.get(B) + n);
|
|
232
|
+
break;
|
|
233
|
+
case "PageUp":
|
|
234
|
+
r = Math.max(0, a.get(B) - n);
|
|
235
|
+
break;
|
|
236
|
+
case "Enter":
|
|
237
|
+
case " ":
|
|
238
|
+
e.preventDefault(), X(a.get(F).categories[a.get(B)] ?? "", "", 0, a.get(B));
|
|
239
|
+
return;
|
|
240
|
+
default: return;
|
|
241
|
+
}
|
|
242
|
+
e.preventDefault(), a.set(B, r, !0), Fn(e.currentTarget, r);
|
|
243
|
+
}
|
|
244
|
+
let V = (e) => a.get(Bt) && a.get(Bt) !== e ? .18 : 1, H = a.derived(() => g.spec.type === "pie" ? g.spec.categories.map((e, t) => ({
|
|
245
|
+
label: e,
|
|
246
|
+
color: a.get(C)[t % a.get(C).length],
|
|
247
|
+
off: a.get(x).has(e)
|
|
248
|
+
})) : a.get(T).map((e) => ({
|
|
249
|
+
label: e.label,
|
|
250
|
+
color: e.color,
|
|
251
|
+
off: a.get(x).has(e.label)
|
|
252
|
+
}))), Cn = a.state(!1), wn = a.derived(() => a.get(H).length > 10), Tn = a.derived(() => a.get(wn) && !a.get(Cn) ? a.get(H).slice(0, 10) : a.get(H)), En = a.derived(() => g.spec.type === "pie" ? a.get(I).slices.every((e) => e.value <= 0) : g.spec.type === "scatter" ? a.get(I).scatterPoints.length === 0 : g.spec.type === "heatmap" ? a.get(I).heatmapCells.length === 0 : g.spec.type === "funnel" ? a.get(I).funnelSegments.length === 0 : g.spec.type === "radar" ? a.get(I).radarSeries.length === 0 : g.spec.type === "calendar" ? a.get(I).calendarCells.length === 0 : g.spec.type === "gauge" ? !a.get(I).gauge : g.spec.type === "treemap" ? a.get(I).treemapCells.length === 0 : g.spec.type === "sankey" ? a.get(I).sankeyNodes.length === 0 : a.get($t) ? a.get(I).candles.length === 0 : g.spec.type === "boxplot" ? a.get(I).boxes.length === 0 : a.get(I).bars.length === 0 && a.get(I).lines.every((e) => e.points.every((e) => !e.defined)));
|
|
253
|
+
function Dn(e) {
|
|
254
|
+
if (!_()) return;
|
|
255
|
+
if (a.get(S) != null) {
|
|
256
|
+
a.set(S, null);
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
let t = new Set(a.get(x));
|
|
260
|
+
t.has(e) ? t.delete(e) : t.add(e), a.set(x, t, !0);
|
|
261
|
+
}
|
|
262
|
+
function On(e) {
|
|
263
|
+
_() && a.set(S, a.get(S) === e ? null : e, !0);
|
|
264
|
+
}
|
|
265
|
+
let U = a.derived(() => {
|
|
266
|
+
if (g.spec.type === "pie") {
|
|
267
|
+
let e = a.get(T)[0];
|
|
268
|
+
return {
|
|
269
|
+
cols: ["Category", "Value"],
|
|
270
|
+
rows: g.spec.categories.map((t, n) => [t, b(e?.values[n] ?? 0)])
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
if (a.get(un)) {
|
|
274
|
+
let e = [];
|
|
275
|
+
for (let t of a.get(T)) for (let n of t.points ?? []) e.push([
|
|
276
|
+
t.label,
|
|
277
|
+
b(n.x),
|
|
278
|
+
b(n.y),
|
|
279
|
+
n.r == null ? "" : b(n.r)
|
|
280
|
+
]);
|
|
281
|
+
return {
|
|
282
|
+
cols: [
|
|
283
|
+
"Series",
|
|
284
|
+
"X",
|
|
285
|
+
"Y",
|
|
286
|
+
"Size"
|
|
287
|
+
],
|
|
288
|
+
rows: e
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
if (a.get($t)) {
|
|
292
|
+
let e = [];
|
|
293
|
+
for (let t of a.get(T)) (t.ohlc ?? []).forEach((n, r) => {
|
|
294
|
+
n && e.push([
|
|
295
|
+
g.spec.categories[r] ?? String(r),
|
|
296
|
+
t.label,
|
|
297
|
+
b(n.o),
|
|
298
|
+
b(n.h),
|
|
299
|
+
b(n.l),
|
|
300
|
+
b(n.c)
|
|
301
|
+
]);
|
|
302
|
+
});
|
|
303
|
+
return {
|
|
304
|
+
cols: [
|
|
305
|
+
"Date",
|
|
306
|
+
"Series",
|
|
307
|
+
"Open",
|
|
308
|
+
"High",
|
|
309
|
+
"Low",
|
|
310
|
+
"Close"
|
|
311
|
+
],
|
|
312
|
+
rows: e
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
return {
|
|
316
|
+
cols: ["Category", ...a.get(T).map((e) => e.label)],
|
|
317
|
+
rows: g.spec.categories.map((e, t) => [e, ...a.get(T).map((e) => b(e.values[t] ?? 0))])
|
|
318
|
+
};
|
|
319
|
+
}), kn = a.derived(() => a.get(U).rows.length > yn), An = a.derived(() => a.get(kn) ? a.get(U).rows.slice(0, yn) : a.get(U).rows);
|
|
320
|
+
function W(e, t = 12) {
|
|
321
|
+
return e.length > t ? e.slice(0, t - 1) + "…" : e;
|
|
322
|
+
}
|
|
323
|
+
let jn = (e, t) => g.formatValue ? g.formatValue(e) : t, G = a.state(null);
|
|
324
|
+
function Mn(e) {
|
|
325
|
+
if (!e) return !1;
|
|
326
|
+
let t = 0, n = 0, r = 0, i = e.trim().startsWith("#") ? e.trim().slice(1) : "";
|
|
327
|
+
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);
|
|
328
|
+
else {
|
|
329
|
+
let i = /rgba?\(([^)]+)\)/.exec(e);
|
|
330
|
+
if (!i) return !1;
|
|
331
|
+
let a = i[1].split(",").map((e) => parseFloat(e));
|
|
332
|
+
t = a[0] ?? 0, n = a[1] ?? 0, r = a[2] ?? 0;
|
|
333
|
+
}
|
|
334
|
+
return .299 * t + .587 * n + .114 * r < 128;
|
|
335
|
+
}
|
|
336
|
+
a.user_effect(() => {
|
|
337
|
+
if (!a.get(G) || typeof window > "u") return;
|
|
338
|
+
let e = a.get(G), t = () => {
|
|
339
|
+
let t = getComputedStyle(e);
|
|
340
|
+
a.set(sn, Mn(t.getPropertyValue("--sg-bg")), !0);
|
|
341
|
+
let n = [];
|
|
342
|
+
for (let e = 1; e <= 8; e += 1) {
|
|
343
|
+
let r = t.getPropertyValue(`--sg-chart-${e}`).trim();
|
|
344
|
+
n.push(r || i[e - 1]);
|
|
345
|
+
}
|
|
346
|
+
(!a.get(zt) || n.some((e, t) => e !== a.get(zt)[t])) && a.set(zt, n.some((e, t) => e !== i[t]) ? n : null, !0);
|
|
347
|
+
};
|
|
348
|
+
t();
|
|
349
|
+
let n = new MutationObserver(t);
|
|
350
|
+
return n.observe(document.documentElement, {
|
|
351
|
+
attributes: !0,
|
|
352
|
+
attributeFilter: [
|
|
353
|
+
"data-theme",
|
|
354
|
+
"class",
|
|
355
|
+
"style"
|
|
356
|
+
]
|
|
357
|
+
}), () => n.disconnect();
|
|
358
|
+
});
|
|
359
|
+
let K = a.state(null), q = a.state(null);
|
|
360
|
+
function J(e, t, n, r) {
|
|
361
|
+
if (!_() || !a.get(G) || r.length === 0) return;
|
|
362
|
+
let i = a.get(G).getBoundingClientRect(), o = Math.max(70, Math.min(i.width - 70, e - i.left)), s = t - i.top;
|
|
363
|
+
a.set(K, {
|
|
364
|
+
left: o,
|
|
365
|
+
top: s,
|
|
366
|
+
below: s < 44,
|
|
367
|
+
title: n,
|
|
368
|
+
rows: r
|
|
369
|
+
}, !0);
|
|
370
|
+
}
|
|
371
|
+
function Nn(e) {
|
|
372
|
+
let t = [];
|
|
373
|
+
for (let n of a.get(F).series) {
|
|
374
|
+
let r = n.color, i = n.ohlc?.[e];
|
|
375
|
+
if (i) {
|
|
376
|
+
t.push({
|
|
377
|
+
label: `${n.label} O`,
|
|
378
|
+
color: r,
|
|
379
|
+
value: b(i.o)
|
|
380
|
+
}), t.push({
|
|
381
|
+
label: `${n.label} H`,
|
|
382
|
+
value: b(i.h)
|
|
383
|
+
}), t.push({
|
|
384
|
+
label: `${n.label} L`,
|
|
385
|
+
value: b(i.l)
|
|
386
|
+
}), t.push({
|
|
387
|
+
label: `${n.label} C`,
|
|
388
|
+
value: b(i.c)
|
|
389
|
+
});
|
|
390
|
+
continue;
|
|
391
|
+
}
|
|
392
|
+
let a = n.boxes?.[e];
|
|
393
|
+
if (a) {
|
|
394
|
+
t.push({
|
|
395
|
+
label: `${n.label} max`,
|
|
396
|
+
color: r,
|
|
397
|
+
value: b(a.max)
|
|
398
|
+
}), t.push({
|
|
399
|
+
label: `${n.label} Q3`,
|
|
400
|
+
value: b(a.q3)
|
|
401
|
+
}), t.push({
|
|
402
|
+
label: `${n.label} median`,
|
|
403
|
+
value: b(a.median)
|
|
404
|
+
}), t.push({
|
|
405
|
+
label: `${n.label} Q1`,
|
|
406
|
+
value: b(a.q1)
|
|
407
|
+
}), t.push({
|
|
408
|
+
label: `${n.label} min`,
|
|
409
|
+
value: b(a.min)
|
|
410
|
+
}), a.outliers?.length && t.push({
|
|
411
|
+
label: `${n.label} outliers`,
|
|
412
|
+
value: String(a.outliers.length)
|
|
413
|
+
});
|
|
414
|
+
continue;
|
|
415
|
+
}
|
|
416
|
+
let o = n.values[e];
|
|
417
|
+
if (Number.isFinite(o)) {
|
|
418
|
+
t.push({
|
|
419
|
+
label: n.label,
|
|
420
|
+
color: r,
|
|
421
|
+
value: b(o)
|
|
422
|
+
});
|
|
423
|
+
let i = n.errors?.[e];
|
|
424
|
+
if (i != null) {
|
|
425
|
+
let e = typeof i == "number" ? o - Math.abs(i) : Math.min(i.lo, i.hi), r = typeof i == "number" ? o + Math.abs(i) : Math.max(i.lo, i.hi);
|
|
426
|
+
Number.isFinite(e) && Number.isFinite(r) && t.push({
|
|
427
|
+
label: `${n.label} range`,
|
|
428
|
+
value: `${b(e)} - ${b(r)}`
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
return t;
|
|
434
|
+
}
|
|
435
|
+
function Pn(e, t, n) {
|
|
436
|
+
a.set(q, n, !0), J(e, t, a.get(F).categories[n] ?? "", Nn(n));
|
|
437
|
+
}
|
|
438
|
+
function Fn(e, t) {
|
|
439
|
+
let n = e.getBoundingClientRect();
|
|
440
|
+
Pn(n.left + n.width / 2, n.top + 12, t);
|
|
441
|
+
}
|
|
442
|
+
function Y() {
|
|
443
|
+
a.set(q, null), a.set(K, null);
|
|
444
|
+
}
|
|
445
|
+
function In(e, t, n, r, i) {
|
|
446
|
+
J(e, t, n, [{ value: `${b(r)} · ${i.toFixed(1)}%` }]);
|
|
447
|
+
}
|
|
448
|
+
function Ln(e, t, n) {
|
|
449
|
+
let r = [{
|
|
450
|
+
label: "x",
|
|
451
|
+
value: b(n.x)
|
|
452
|
+
}, {
|
|
453
|
+
label: "y",
|
|
454
|
+
value: b(n.y)
|
|
455
|
+
}];
|
|
456
|
+
J(e, t, n.label || n.series, r);
|
|
457
|
+
}
|
|
458
|
+
function Rn(e, t, n) {
|
|
459
|
+
J(e, t, `${n.rowLabel} · ${n.colLabel}`, [{
|
|
460
|
+
color: n.color,
|
|
461
|
+
value: b(n.value)
|
|
462
|
+
}]);
|
|
463
|
+
}
|
|
464
|
+
function zn(e, t, n) {
|
|
465
|
+
let r = [{ value: b(n.value) }, {
|
|
466
|
+
label: "conversion",
|
|
467
|
+
value: `${(n.conversion * 100).toFixed(1)}%`
|
|
468
|
+
}];
|
|
469
|
+
n.dropoff > 0 && r.push({
|
|
470
|
+
label: "drop-off",
|
|
471
|
+
value: `${(n.dropoff * 100).toFixed(1)}%`
|
|
472
|
+
}), J(e, t, n.label, r);
|
|
473
|
+
}
|
|
474
|
+
function Bn(e, t, n, r, i, a) {
|
|
475
|
+
J(e, t, `${n} · ${r}`, [{
|
|
476
|
+
color: a,
|
|
477
|
+
value: b(i)
|
|
478
|
+
}]);
|
|
479
|
+
}
|
|
480
|
+
function X(e, t, n, r) {
|
|
481
|
+
if (a.get(y) && g.onAnnotate && r !== void 0) {
|
|
482
|
+
let i = t ? n : a.get(F).series[0]?.values[r];
|
|
483
|
+
g.onAnnotate({
|
|
484
|
+
category: e,
|
|
485
|
+
index: r,
|
|
486
|
+
value: Number.isFinite(i) ? i : 0
|
|
487
|
+
});
|
|
488
|
+
return;
|
|
489
|
+
}
|
|
490
|
+
let i;
|
|
491
|
+
if (r !== void 0) {
|
|
492
|
+
let e = [];
|
|
493
|
+
for (let n of a.get(F).series) {
|
|
494
|
+
if (!n.rowIds || t && n.label !== t) continue;
|
|
495
|
+
let i = n.rowIds[r];
|
|
496
|
+
i?.length && e.push(i);
|
|
497
|
+
}
|
|
498
|
+
e.length && (i = e.flat());
|
|
499
|
+
}
|
|
500
|
+
let o = {
|
|
501
|
+
category: e,
|
|
502
|
+
series: t,
|
|
503
|
+
value: n,
|
|
504
|
+
rowIds: i
|
|
505
|
+
};
|
|
506
|
+
g.onSelect?.(o), i && i.length && g.onDrill?.(o);
|
|
507
|
+
}
|
|
508
|
+
function Z(e, t) {
|
|
509
|
+
let n = e.ownerSVGElement ?? e.closest("svg");
|
|
510
|
+
if (!n) return;
|
|
511
|
+
let r = n.querySelector(`[data-cat-index="${t}"]`);
|
|
512
|
+
r && (r.focus?.(), Fn(r, t));
|
|
513
|
+
}
|
|
514
|
+
function Vn(e, t) {
|
|
515
|
+
let n = a.get(F).categories.length - 1, r = e.currentTarget;
|
|
516
|
+
switch (e.key) {
|
|
517
|
+
case "ArrowRight":
|
|
518
|
+
case "ArrowDown":
|
|
519
|
+
e.preventDefault(), Z(r, Math.min(n, t + 1));
|
|
520
|
+
return;
|
|
521
|
+
case "ArrowLeft":
|
|
522
|
+
case "ArrowUp":
|
|
523
|
+
e.preventDefault(), Z(r, Math.max(0, t - 1));
|
|
524
|
+
return;
|
|
525
|
+
case "Home":
|
|
526
|
+
e.preventDefault(), Z(r, 0);
|
|
527
|
+
return;
|
|
528
|
+
case "End":
|
|
529
|
+
e.preventDefault(), Z(r, n);
|
|
530
|
+
return;
|
|
531
|
+
case "PageDown":
|
|
532
|
+
e.preventDefault(), Z(r, Math.min(n, t + Math.max(1, Math.floor(n / 10))));
|
|
533
|
+
return;
|
|
534
|
+
case "PageUp":
|
|
535
|
+
e.preventDefault(), Z(r, Math.max(0, t - Math.max(1, Math.floor(n / 10))));
|
|
536
|
+
return;
|
|
537
|
+
case "Enter":
|
|
538
|
+
case " ":
|
|
539
|
+
if (!g.onSelect) return;
|
|
540
|
+
e.preventDefault(), X(a.get(F).categories[t] ?? "", "", 0, t);
|
|
541
|
+
return;
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
function Hn(e, t, n) {
|
|
545
|
+
g.onSelect && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), X(t, t, n));
|
|
546
|
+
}
|
|
547
|
+
let Q = a.state("idle");
|
|
548
|
+
function Un() {
|
|
549
|
+
if (!a.get(D)) return null;
|
|
550
|
+
let e = a.get(D).cloneNode(!0);
|
|
551
|
+
e.setAttribute("xmlns", "http://www.w3.org/2000/svg"), e.removeAttribute("class");
|
|
552
|
+
let t = a.get(D).getBoundingClientRect();
|
|
553
|
+
t.width && e.setAttribute("width", String(Math.round(t.width))), t.height && e.setAttribute("height", String(Math.round(t.height)));
|
|
554
|
+
let n = document.createElement("style"), r = Array.from(document.styleSheets), i = [];
|
|
555
|
+
for (let e of r) try {
|
|
556
|
+
for (let t of Array.from(e.cssRules ?? [])) {
|
|
557
|
+
let e = t.cssText;
|
|
558
|
+
e.includes(".sv-grid-chart") && i.push(e);
|
|
559
|
+
}
|
|
560
|
+
} catch {}
|
|
561
|
+
return n.textContent = i.join("\n"), e.insertBefore(n, e.firstChild), new XMLSerializer().serializeToString(e);
|
|
562
|
+
}
|
|
563
|
+
function Wn(e, t) {
|
|
564
|
+
let n = URL.createObjectURL(e), r = document.createElement("a");
|
|
565
|
+
r.href = n, r.download = t, document.body.appendChild(r), r.click(), r.remove(), setTimeout(() => URL.revokeObjectURL(n), 1e3);
|
|
566
|
+
}
|
|
567
|
+
async function Gn(e) {
|
|
568
|
+
return new Promise((t) => {
|
|
569
|
+
let n = a.get(D)?.getBoundingClientRect(), r = Math.max(1, Math.round(n?.width ?? a.get(I).width)), i = Math.max(1, Math.round(n?.height ?? a.get(I).height)), o = window.devicePixelRatio || 1, s = document.createElement("canvas");
|
|
570
|
+
s.width = r * o, s.height = i * o;
|
|
571
|
+
let c = s.getContext("2d");
|
|
572
|
+
if (!c) {
|
|
573
|
+
t(null);
|
|
574
|
+
return;
|
|
575
|
+
}
|
|
576
|
+
let l = new Image();
|
|
577
|
+
l.onload = () => {
|
|
578
|
+
c.scale(o, o), c.drawImage(l, 0, 0, r, i), s.toBlob((e) => t(e), "image/png");
|
|
579
|
+
}, l.onerror = () => t(null), l.src = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(e);
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
async function Kn(e) {
|
|
583
|
+
let t = Un();
|
|
584
|
+
if (!t) return;
|
|
585
|
+
let n = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
586
|
+
if (e === "svg") {
|
|
587
|
+
Wn(new Blob([t], { type: "image/svg+xml" }), `chart-${n}.svg`);
|
|
588
|
+
return;
|
|
589
|
+
}
|
|
590
|
+
let r = await Gn(t);
|
|
591
|
+
r && Wn(r, `chart-${n}.png`);
|
|
592
|
+
}
|
|
593
|
+
async function qn() {
|
|
594
|
+
let e = Un();
|
|
595
|
+
if (!e) {
|
|
596
|
+
a.set(Q, "err");
|
|
597
|
+
return;
|
|
598
|
+
}
|
|
599
|
+
try {
|
|
600
|
+
let t = await Gn(e);
|
|
601
|
+
if (!t) throw Error("rasterize failed");
|
|
602
|
+
let n = window.ClipboardItem;
|
|
603
|
+
n && navigator.clipboard?.write ? await navigator.clipboard.write([new n({ "image/png": t })]) : await navigator.clipboard.writeText(e), a.set(Q, "ok");
|
|
604
|
+
} catch {
|
|
605
|
+
a.set(Q, "err");
|
|
606
|
+
}
|
|
607
|
+
setTimeout(() => a.set(Q, "idle"), 1500);
|
|
608
|
+
}
|
|
609
|
+
var Jn = At(), Yn = a.child(Jn), Xn = (e) => {
|
|
610
|
+
var t = c(), n = a.child(t), r = (e) => {
|
|
611
|
+
var t = o();
|
|
612
|
+
a.delegated("click", t, Kt), a.append(e, t);
|
|
613
|
+
};
|
|
614
|
+
a.if(n, (e) => {
|
|
615
|
+
Pt() && a.get(Gt) && e(r);
|
|
616
|
+
});
|
|
617
|
+
var i = a.sibling(n, 2), l = (e) => {
|
|
618
|
+
var t = s();
|
|
619
|
+
let n;
|
|
620
|
+
a.template_effect(() => {
|
|
621
|
+
n = a.set_class(t, 1, "sv-grid-chart-tool svelte-hyytey", null, n, { "is-on": a.get(y) }), a.set_attribute(t, "aria-pressed", a.get(y)), a.set_attribute(t, "title", a.get(y) ? "Click the plot to pin a note, or a marker to remove it" : "Pin notes on the chart");
|
|
622
|
+
}), a.delegated("click", t, () => a.set(y, !a.get(y))), a.append(e, t);
|
|
623
|
+
};
|
|
624
|
+
a.if(i, (e) => {
|
|
625
|
+
Lt() && e(l);
|
|
626
|
+
});
|
|
627
|
+
var u = a.sibling(i, 2), d = a.sibling(u, 2), f = a.sibling(d, 2), p = a.child(f, !0);
|
|
628
|
+
a.reset(f), a.reset(t), a.template_effect(() => a.set_text(p, a.get(Q) === "ok" ? "✓ Copied" : "Copy")), a.delegated("click", u, () => Kn("png")), a.delegated("click", d, () => Kn("svg")), a.delegated("click", f, qn), a.append(e, t);
|
|
629
|
+
};
|
|
630
|
+
a.if(Yn, (e) => {
|
|
631
|
+
a.get(Rt) && e(Xn);
|
|
632
|
+
});
|
|
633
|
+
var $ = a.sibling(Yn, 2);
|
|
634
|
+
let Zn;
|
|
635
|
+
var Qn = a.child($), $n = (e) => {
|
|
636
|
+
var t = p();
|
|
637
|
+
a.each(t, 21, () => a.get(Ut), (e) => e.id, (e, t) => {
|
|
638
|
+
var n = a.comment(), r = a.first_child(n), i = (e) => {
|
|
639
|
+
var n = l(), r = a.child(n);
|
|
640
|
+
a.next(), a.reset(n), a.template_effect(() => {
|
|
641
|
+
a.set_attribute(n, "id", a.get(t).id), a.set_attribute(r, "fill", a.get(t).color);
|
|
642
|
+
}), a.append(e, n);
|
|
643
|
+
}, o = (e) => {
|
|
644
|
+
var n = u(), r = a.child(n);
|
|
645
|
+
a.next(), a.reset(n), a.template_effect(() => {
|
|
646
|
+
a.set_attribute(n, "id", a.get(t).id), a.set_attribute(r, "fill", a.get(t).color);
|
|
647
|
+
}), a.append(e, n);
|
|
648
|
+
}, s = (e) => {
|
|
649
|
+
var n = d(), r = a.child(n);
|
|
650
|
+
a.next(), a.reset(n), a.template_effect(() => {
|
|
651
|
+
a.set_attribute(n, "id", a.get(t).id), a.set_attribute(r, "fill", a.get(t).color);
|
|
652
|
+
}), a.append(e, n);
|
|
653
|
+
}, c = (e) => {
|
|
654
|
+
var n = f(), r = a.child(n);
|
|
655
|
+
a.next(), a.reset(n), a.template_effect(() => {
|
|
656
|
+
a.set_attribute(n, "id", a.get(t).id), a.set_attribute(r, "fill", a.get(t).color);
|
|
657
|
+
}), a.append(e, n);
|
|
658
|
+
};
|
|
659
|
+
a.if(r, (e) => {
|
|
660
|
+
a.get(t).kind === "stripe" ? e(i) : a.get(t).kind === "crosshatch" ? e(o, 1) : a.get(t).kind === "dots" ? e(s, 2) : a.get(t).kind === "diagonal" && e(c, 3);
|
|
661
|
+
}), a.append(e, n);
|
|
662
|
+
}), a.reset(t), a.append(e, t);
|
|
663
|
+
};
|
|
664
|
+
a.if(Qn, (e) => {
|
|
665
|
+
a.get(Ut).length && e($n);
|
|
666
|
+
});
|
|
667
|
+
var er = a.sibling(Qn), tr = (e) => {
|
|
668
|
+
var t = ne(), n = a.first_child(t);
|
|
669
|
+
a.each(n, 17, () => a.get(I).valueTicks, (e) => e.label + e.x, (e, t) => {
|
|
670
|
+
var n = ee(), r = a.first_child(n), i = a.sibling(r), o = a.child(i, !0);
|
|
671
|
+
a.reset(i), a.template_effect(() => {
|
|
672
|
+
a.set_attribute(r, "x1", a.get(t).x), a.set_attribute(r, "y1", a.get(I).plot.y), a.set_attribute(r, "x2", a.get(t).x), a.set_attribute(r, "y2", a.get(I).plot.y + a.get(I).plot.h), a.set_attribute(i, "x", a.get(t).x), a.set_attribute(i, "y", a.get(I).plot.y + a.get(I).plot.h + 14), a.set_text(o, a.get(t).label);
|
|
673
|
+
}), a.append(e, n);
|
|
674
|
+
});
|
|
675
|
+
var r = a.sibling(n);
|
|
676
|
+
a.each(r, 17, () => a.get(I).catTicks, (e) => e.value, (e, t) => {
|
|
677
|
+
var n = m(), r = a.child(n, !0);
|
|
678
|
+
a.reset(n), a.template_effect((e) => {
|
|
679
|
+
a.set_attribute(n, "x", a.get(I).plot.x - 6), a.set_attribute(n, "y", a.get(t).y + 3), a.set_text(r, e);
|
|
680
|
+
}, [() => W(a.get(t).label, 18)]), a.append(e, n);
|
|
681
|
+
});
|
|
682
|
+
var i = a.sibling(r), o = (e) => {
|
|
683
|
+
var t = te();
|
|
684
|
+
a.set_attribute(t, "x", 13);
|
|
685
|
+
var n = a.child(t, !0);
|
|
686
|
+
a.reset(t), a.template_effect(() => {
|
|
687
|
+
a.set_attribute(t, "y", a.get(I).plot.y + a.get(I).plot.h / 2), a.set_attribute(t, "transform", `rotate(-90 13 ${a.get(I).plot.y + a.get(I).plot.h / 2})`), a.set_text(n, g.spec.yAxisTitle);
|
|
688
|
+
}), a.append(e, t);
|
|
689
|
+
};
|
|
690
|
+
a.if(i, (e) => {
|
|
691
|
+
g.spec.yAxisTitle && e(o);
|
|
692
|
+
});
|
|
693
|
+
var s = a.sibling(i), c = (e) => {
|
|
694
|
+
var t = h(), n = a.child(t, !0);
|
|
695
|
+
a.reset(t), a.template_effect(() => {
|
|
696
|
+
a.set_attribute(t, "x", a.get(I).plot.x + a.get(I).plot.w / 2), a.set_attribute(t, "y", a.get(I).height - 3), a.set_text(n, g.spec.xAxisTitle);
|
|
697
|
+
}), a.append(e, t);
|
|
698
|
+
};
|
|
699
|
+
a.if(s, (e) => {
|
|
700
|
+
g.spec.xAxisTitle && e(c);
|
|
701
|
+
}), a.append(e, t);
|
|
702
|
+
}, nr = (e) => {
|
|
703
|
+
var t = fe(), n = a.first_child(t);
|
|
704
|
+
a.each(n, 17, () => a.get(I).yTicks, (e) => e.value, (e, t) => {
|
|
705
|
+
var n = re(), r = a.first_child(n);
|
|
706
|
+
let i;
|
|
707
|
+
var o = a.sibling(r), s = a.child(o, !0);
|
|
708
|
+
a.reset(o), a.template_effect((e) => {
|
|
709
|
+
i = a.set_class(r, 0, "sv-grid-chart-gridline svelte-hyytey", null, i, { "is-zero": a.get(t).value === 0 }), a.set_attribute(r, "x1", a.get(I).plot.x), a.set_attribute(r, "y1", a.get(t).y), a.set_attribute(r, "x2", a.get(I).plot.x + a.get(I).plot.w), a.set_attribute(r, "y2", a.get(t).y), a.set_attribute(o, "x", a.get(I).plot.x - 6), a.set_attribute(o, "y", a.get(t).y + 3), a.set_text(s, e);
|
|
710
|
+
}, [() => jn(a.get(t).value, a.get(t).label)]), a.append(e, n);
|
|
711
|
+
});
|
|
712
|
+
var r = a.sibling(n), i = (e) => {
|
|
713
|
+
var t = a.comment(), n = a.first_child(t);
|
|
714
|
+
a.each(n, 17, () => a.get(I).y2Ticks, (e) => e.value, (e, t) => {
|
|
715
|
+
var n = ie(), r = a.child(n, !0);
|
|
716
|
+
a.reset(n), a.template_effect((e) => {
|
|
717
|
+
a.set_attribute(n, "x", a.get(I).plot.x + a.get(I).plot.w + 6), a.set_attribute(n, "y", a.get(t).y + 3), a.set_text(r, e);
|
|
718
|
+
}, [() => jn(a.get(t).value, a.get(t).label)]), a.append(e, n);
|
|
719
|
+
}), a.append(e, t);
|
|
720
|
+
};
|
|
721
|
+
a.if(r, (e) => {
|
|
722
|
+
a.get(I).hasRightAxis && e(i);
|
|
723
|
+
});
|
|
724
|
+
var o = a.sibling(r);
|
|
725
|
+
a.each(o, 17, () => a.get(I).xTicks, (e) => e.label + e.x, (e, t) => {
|
|
726
|
+
var n = a.comment(), r = a.first_child(n), i = (e) => {
|
|
727
|
+
var n = ae(), r = a.child(n, !0);
|
|
728
|
+
a.reset(n), a.template_effect((e) => {
|
|
729
|
+
a.set_attribute(n, "x", a.get(t).x), a.set_attribute(n, "y", a.get(I).plot.y + a.get(I).plot.h + 12), a.set_attribute(n, "transform", `rotate(-40 ${a.get(t).x} ${a.get(I).plot.y + a.get(I).plot.h + 12})`), a.set_text(r, e);
|
|
730
|
+
}, [() => W(a.get(t).label)]), a.append(e, n);
|
|
731
|
+
}, o = (e) => {
|
|
732
|
+
var n = oe(), r = a.child(n, !0);
|
|
733
|
+
a.reset(n), a.template_effect((e) => {
|
|
734
|
+
a.set_attribute(n, "x", a.get(t).x), a.set_attribute(n, "y", a.get(I).plot.y + a.get(I).plot.h + 16), a.set_text(r, e);
|
|
735
|
+
}, [() => W(a.get(t).label, 16)]), a.append(e, n);
|
|
736
|
+
};
|
|
737
|
+
a.if(r, (e) => {
|
|
738
|
+
a.get(I).xLabelRotated ? e(i) : e(o, -1);
|
|
739
|
+
}), a.append(e, n);
|
|
740
|
+
});
|
|
741
|
+
var s = a.sibling(o);
|
|
742
|
+
a.each(s, 17, () => a.get(I).categoryGroupTicks, (e) => e.label + e.x0, (e, t) => {
|
|
743
|
+
let n = a.derived(() => a.get(I).plot.y + a.get(I).plot.h + (a.get(I).xLabelRotated ? 46 : 32));
|
|
744
|
+
var r = ce(), i = a.first_child(r), o = a.sibling(i), s = (e) => {
|
|
745
|
+
var r = se();
|
|
746
|
+
a.template_effect(() => {
|
|
747
|
+
a.set_attribute(r, "x1", a.get(t).x0), a.set_attribute(r, "y1", a.get(I).plot.y + a.get(I).plot.h), a.set_attribute(r, "x2", a.get(t).x0), a.set_attribute(r, "y2", a.get(n) - 9);
|
|
748
|
+
}), a.append(e, r);
|
|
749
|
+
};
|
|
750
|
+
a.if(o, (e) => {
|
|
751
|
+
a.get(t).x0 > a.get(I).plot.x + 1 && e(s);
|
|
752
|
+
});
|
|
753
|
+
var c = a.sibling(o), l = a.child(c, !0);
|
|
754
|
+
a.reset(c), a.template_effect((e) => {
|
|
755
|
+
a.set_attribute(i, "x1", a.get(t).x0 + 3), a.set_attribute(i, "y1", a.get(n) - 9), a.set_attribute(i, "x2", a.get(t).x1 - 3), a.set_attribute(i, "y2", a.get(n) - 9), a.set_attribute(c, "x", a.get(t).xCenter), a.set_attribute(c, "y", a.get(n)), a.set_text(l, e);
|
|
756
|
+
}, [() => W(a.get(t).label, Math.max(4, Math.floor((a.get(t).x1 - a.get(t).x0) / 7)))]), a.append(e, r);
|
|
757
|
+
});
|
|
758
|
+
var c = a.sibling(s), l = (e) => {
|
|
759
|
+
var t = le();
|
|
760
|
+
a.set_attribute(t, "x", 13);
|
|
761
|
+
var n = a.child(t, !0);
|
|
762
|
+
a.reset(t), a.template_effect(() => {
|
|
763
|
+
a.set_attribute(t, "y", a.get(I).plot.y + a.get(I).plot.h / 2), a.set_attribute(t, "transform", `rotate(-90 13 ${a.get(I).plot.y + a.get(I).plot.h / 2})`), a.set_text(n, g.spec.yAxisTitle);
|
|
764
|
+
}), a.append(e, t);
|
|
765
|
+
};
|
|
766
|
+
a.if(c, (e) => {
|
|
767
|
+
g.spec.yAxisTitle && e(l);
|
|
768
|
+
});
|
|
769
|
+
var u = a.sibling(c), d = (e) => {
|
|
770
|
+
var t = ue(), n = a.child(t, !0);
|
|
771
|
+
a.reset(t), a.template_effect(() => {
|
|
772
|
+
a.set_attribute(t, "x", a.get(I).width - 5), a.set_attribute(t, "y", a.get(I).plot.y + a.get(I).plot.h / 2), a.set_attribute(t, "transform", `rotate(90 ${a.get(I).width - 5} ${a.get(I).plot.y + a.get(I).plot.h / 2})`), a.set_text(n, g.spec.y2AxisTitle);
|
|
773
|
+
}), a.append(e, t);
|
|
774
|
+
};
|
|
775
|
+
a.if(u, (e) => {
|
|
776
|
+
g.spec.y2AxisTitle && e(d);
|
|
777
|
+
});
|
|
778
|
+
var f = a.sibling(u), p = (e) => {
|
|
779
|
+
var t = de(), n = a.child(t, !0);
|
|
780
|
+
a.reset(t), a.template_effect(() => {
|
|
781
|
+
a.set_attribute(t, "x", a.get(I).plot.x + a.get(I).plot.w / 2), a.set_attribute(t, "y", a.get(I).height - 3), a.set_text(n, g.spec.xAxisTitle);
|
|
782
|
+
}), a.append(e, t);
|
|
783
|
+
};
|
|
784
|
+
a.if(f, (e) => {
|
|
785
|
+
g.spec.xAxisTitle && e(p);
|
|
786
|
+
}), a.append(e, t);
|
|
787
|
+
};
|
|
788
|
+
a.if(er, (e) => {
|
|
789
|
+
a.get(R) ? e(tr) : a.get(L) && e(nr, 1);
|
|
790
|
+
});
|
|
791
|
+
var rr = a.sibling(er);
|
|
792
|
+
a.each(rr, 19, () => a.get(I).lines, (e, t) => e.label + t, (e, t) => {
|
|
793
|
+
var n = ve(), r = a.child(n), i = (e) => {
|
|
794
|
+
var n = pe();
|
|
795
|
+
a.template_effect(() => {
|
|
796
|
+
a.set_attribute(n, "d", a.get(t).bandPath), a.set_attribute(n, "fill", a.get(t).color);
|
|
797
|
+
}), a.append(e, n);
|
|
798
|
+
};
|
|
799
|
+
a.if(r, (e) => {
|
|
800
|
+
a.get(t).bandPath && e(i);
|
|
801
|
+
});
|
|
802
|
+
var o = a.sibling(r), s = (e) => {
|
|
803
|
+
var n = me();
|
|
804
|
+
a.template_effect(() => {
|
|
805
|
+
a.set_attribute(n, "d", a.get(t).areaPath), a.set_attribute(n, "fill", a.get(Ht)[a.get(t).label] ?? a.get(t).color);
|
|
806
|
+
}), a.append(e, n);
|
|
807
|
+
};
|
|
808
|
+
a.if(o, (e) => {
|
|
809
|
+
a.get(t).areaPath && e(s);
|
|
810
|
+
});
|
|
811
|
+
var c = a.sibling(o), l = a.sibling(c), u = (e) => {
|
|
812
|
+
let n = a.derived(() => a.get(t).points[a.get(q) ?? -1]);
|
|
813
|
+
var r = a.comment(), i = a.first_child(r), o = (e) => {
|
|
814
|
+
var r = he();
|
|
815
|
+
a.template_effect(() => {
|
|
816
|
+
a.set_attribute(r, "cx", a.get(n).x), a.set_attribute(r, "cy", a.get(n).y), a.set_attribute(r, "fill", a.get(t).color);
|
|
817
|
+
}), a.append(e, r);
|
|
818
|
+
};
|
|
819
|
+
a.if(i, (e) => {
|
|
820
|
+
a.get(n)?.defined && e(o);
|
|
821
|
+
}), a.append(e, r);
|
|
822
|
+
}, d = (e) => {
|
|
823
|
+
var n = a.comment(), r = a.first_child(n);
|
|
824
|
+
a.each(r, 17, () => a.get(t).points, a.index, (e, n, r) => {
|
|
825
|
+
var i = a.comment(), o = a.first_child(i), s = (e) => {
|
|
826
|
+
var i = _e(), o = a.first_child(i);
|
|
827
|
+
let s;
|
|
828
|
+
var c = a.sibling(o), l = (e) => {
|
|
829
|
+
var t = ge(), r = a.child(t, !0);
|
|
830
|
+
a.reset(t), a.template_effect((e) => {
|
|
831
|
+
a.set_attribute(t, "x", a.get(n).x), a.set_attribute(t, "y", a.get(n).y - 7), a.set_text(r, e);
|
|
832
|
+
}, [() => b(a.get(n).value)]), a.append(e, t);
|
|
833
|
+
};
|
|
834
|
+
a.if(c, (e) => {
|
|
835
|
+
v() && e(l);
|
|
836
|
+
}), a.template_effect(() => {
|
|
837
|
+
s = a.set_class(o, 0, "sv-grid-chart-dot svelte-hyytey", null, s, { "is-active": a.get(q) === r }), a.set_attribute(o, "cx", a.get(n).x), a.set_attribute(o, "cy", a.get(n).y), a.set_attribute(o, "r", a.get(q) === r ? 4 : 3), a.set_attribute(o, "fill", a.get(t).color);
|
|
838
|
+
}), a.append(e, i);
|
|
839
|
+
};
|
|
840
|
+
a.if(o, (e) => {
|
|
841
|
+
a.get(n).defined && e(s);
|
|
842
|
+
}), a.append(e, i);
|
|
843
|
+
}), a.append(e, n);
|
|
844
|
+
};
|
|
845
|
+
a.if(l, (e) => {
|
|
846
|
+
a.get(vn) ? e(u) : e(d, -1);
|
|
847
|
+
}), a.reset(n), a.template_effect((e) => {
|
|
848
|
+
a.set_style(n, e), a.set_attribute(c, "d", a.get(t).path), a.set_attribute(c, "stroke", a.get(t).color);
|
|
849
|
+
}, [() => `opacity:${V(a.get(t).label)}`]), a.append(e, n);
|
|
850
|
+
});
|
|
851
|
+
var ir = a.sibling(rr), ar = (e) => {
|
|
852
|
+
var t = a.comment(), n = a.first_child(t);
|
|
853
|
+
a.snippet(n, () => g.underlay, () => a.get(ln)), a.append(e, t);
|
|
854
|
+
};
|
|
855
|
+
a.if(ir, (e) => {
|
|
856
|
+
g.underlay && e(ar);
|
|
857
|
+
});
|
|
858
|
+
var or = a.sibling(ir);
|
|
859
|
+
a.each(or, 17, () => a.get(I).bars, a.index, (e, t) => {
|
|
860
|
+
var n = xe(), r = a.first_child(n), i = a.sibling(r), o = (e) => {
|
|
861
|
+
var n = ye();
|
|
862
|
+
let r;
|
|
863
|
+
var i = a.child(n, !0);
|
|
864
|
+
a.reset(n), a.template_effect((e) => {
|
|
865
|
+
r = a.set_class(n, 0, "sv-grid-chart-datalabel svelte-hyytey", null, r, { "on-bar": g.spec.stacked || g.spec.stacked100 }), a.set_attribute(n, "x", g.spec.stacked || g.spec.stacked100 ? a.get(t).x + a.get(t).w / 2 : a.get(t).value >= 0 ? a.get(t).x + a.get(t).w + 3 : a.get(t).x - 3), a.set_attribute(n, "y", a.get(t).y + a.get(t).h / 2 + 3), a.set_attribute(n, "text-anchor", g.spec.stacked || g.spec.stacked100 ? "middle" : a.get(t).value >= 0 ? "start" : "end"), a.set_text(i, e);
|
|
866
|
+
}, [() => b(a.get(t).value)]), a.append(e, n);
|
|
867
|
+
}, s = (e) => {
|
|
868
|
+
var n = be();
|
|
869
|
+
let r;
|
|
870
|
+
var i = a.child(n, !0);
|
|
871
|
+
a.reset(n), a.template_effect((e) => {
|
|
872
|
+
r = a.set_class(n, 0, "sv-grid-chart-datalabel svelte-hyytey", null, r, { "on-bar": g.spec.stacked || g.spec.stacked100 }), a.set_attribute(n, "x", a.get(t).x + a.get(t).w / 2), a.set_attribute(n, "y", g.spec.stacked || g.spec.stacked100 ? a.get(t).y + a.get(t).h / 2 + 3 : a.get(t).value >= 0 ? a.get(t).y - 3 : a.get(t).y + a.get(t).h + 11), a.set_text(i, e);
|
|
873
|
+
}, [() => b(a.get(t).value)]), a.append(e, n);
|
|
874
|
+
};
|
|
875
|
+
a.if(i, (e) => {
|
|
876
|
+
v() && a.get(R) && a.get(t).w > 18 ? e(o) : v() && !a.get(R) && a.get(t).h > 13 && e(s, 1);
|
|
877
|
+
}), a.template_effect((e) => {
|
|
878
|
+
a.set_attribute(r, "x", a.get(t).x), a.set_attribute(r, "y", a.get(t).y), a.set_attribute(r, "width", a.get(t).w), a.set_attribute(r, "height", a.get(t).h), a.set_attribute(r, "fill", a.get(Ht)[a.get(t).series] ?? a.get(t).color), a.set_style(r, e);
|
|
879
|
+
}, [() => `opacity:${V(a.get(t).series)}`]), a.append(e, n);
|
|
880
|
+
});
|
|
881
|
+
var sr = a.sibling(or);
|
|
882
|
+
a.each(sr, 17, () => a.get(I).candles, a.index, (e, t) => {
|
|
883
|
+
var n = a.comment(), r = a.first_child(n), i = (e) => {
|
|
884
|
+
var n = Se(), r = a.first_child(n), i = a.sibling(r), o = a.sibling(i);
|
|
885
|
+
a.template_effect((e, n, s) => {
|
|
886
|
+
a.set_attribute(r, "x1", a.get(t).xCenter), a.set_attribute(r, "y1", a.get(t).yHigh), a.set_attribute(r, "x2", a.get(t).xCenter), a.set_attribute(r, "y2", a.get(t).yLow), a.set_attribute(r, "stroke", a.get(t).color), a.set_style(r, e), a.set_attribute(i, "x1", a.get(t).x), a.set_attribute(i, "y1", a.get(t).yOpen), a.set_attribute(i, "x2", a.get(t).xCenter), a.set_attribute(i, "y2", a.get(t).yOpen), a.set_attribute(i, "stroke", a.get(t).color), a.set_style(i, n), a.set_attribute(o, "x1", a.get(t).xCenter), a.set_attribute(o, "y1", a.get(t).yClose), a.set_attribute(o, "x2", a.get(t).x + a.get(t).w), a.set_attribute(o, "y2", a.get(t).yClose), a.set_attribute(o, "stroke", a.get(t).color), a.set_style(o, s);
|
|
887
|
+
}, [
|
|
888
|
+
() => `opacity:${V(a.get(t).series)}`,
|
|
889
|
+
() => `opacity:${V(a.get(t).series)}`,
|
|
890
|
+
() => `opacity:${V(a.get(t).series)}`
|
|
891
|
+
]), a.append(e, n);
|
|
892
|
+
}, o = (e) => {
|
|
893
|
+
var n = Ce(), r = a.first_child(n), i = a.sibling(r);
|
|
894
|
+
a.template_effect((e, n) => {
|
|
895
|
+
a.set_attribute(r, "x1", a.get(t).xCenter), a.set_attribute(r, "y1", a.get(t).yHigh), a.set_attribute(r, "x2", a.get(t).xCenter), a.set_attribute(r, "y2", a.get(t).yLow), a.set_attribute(r, "stroke", a.get(t).color), a.set_style(r, e), a.set_attribute(i, "x", a.get(t).x), a.set_attribute(i, "y", a.get(t).bodyY), a.set_attribute(i, "width", a.get(t).w), a.set_attribute(i, "height", a.get(t).bodyH), a.set_attribute(i, "fill", a.get(t).up ? "none" : a.get(t).color), a.set_attribute(i, "stroke", a.get(t).color), a.set_style(i, n);
|
|
896
|
+
}, [() => `opacity:${V(a.get(t).series)}`, () => `opacity:${V(a.get(t).series)}`]), a.append(e, n);
|
|
897
|
+
};
|
|
898
|
+
a.if(r, (e) => {
|
|
899
|
+
a.get(en) ? e(i) : e(o, -1);
|
|
900
|
+
}), a.append(e, n);
|
|
901
|
+
});
|
|
902
|
+
var cr = a.sibling(sr);
|
|
903
|
+
a.each(cr, 17, () => a.get(I).boxes, a.index, (e, t) => {
|
|
904
|
+
var n = Te(), r = a.first_child(n), i = a.sibling(r), o = a.sibling(i), s = a.sibling(o), c = a.sibling(s), l = a.sibling(c);
|
|
905
|
+
a.each(l, 17, () => a.get(t).outliers, a.index, (e, n) => {
|
|
906
|
+
var r = we();
|
|
907
|
+
a.template_effect((e) => {
|
|
908
|
+
a.set_attribute(r, "cx", a.get(t).xCenter), a.set_attribute(r, "cy", a.get(n).y), a.set_attribute(r, "stroke", a.get(t).color), a.set_style(r, e);
|
|
909
|
+
}, [() => `opacity:${V(a.get(t).series)}`]), a.append(e, r);
|
|
910
|
+
}), a.template_effect((e, n, l, u, d) => {
|
|
911
|
+
a.set_attribute(r, "x1", a.get(t).xCenter), a.set_attribute(r, "y1", a.get(t).yMax), a.set_attribute(r, "x2", a.get(t).xCenter), a.set_attribute(r, "y2", a.get(t).yMin), a.set_attribute(r, "stroke", a.get(t).color), a.set_style(r, e), a.set_attribute(i, "x1", a.get(t).x + a.get(t).w * .25), a.set_attribute(i, "y1", a.get(t).yMax), a.set_attribute(i, "x2", a.get(t).x + a.get(t).w * .75), a.set_attribute(i, "y2", a.get(t).yMax), a.set_attribute(i, "stroke", a.get(t).color), a.set_style(i, n), a.set_attribute(o, "x1", a.get(t).x + a.get(t).w * .25), a.set_attribute(o, "y1", a.get(t).yMin), a.set_attribute(o, "x2", a.get(t).x + a.get(t).w * .75), a.set_attribute(o, "y2", a.get(t).yMin), a.set_attribute(o, "stroke", a.get(t).color), a.set_style(o, l), a.set_attribute(s, "x", a.get(t).x), a.set_attribute(s, "y", a.get(t).boxY), a.set_attribute(s, "width", a.get(t).w), a.set_attribute(s, "height", a.get(t).boxH), a.set_attribute(s, "fill", a.get(t).color), a.set_attribute(s, "stroke", a.get(t).color), a.set_style(s, u), a.set_attribute(c, "x1", a.get(t).x), a.set_attribute(c, "y1", a.get(t).yMedian), a.set_attribute(c, "x2", a.get(t).x + a.get(t).w), a.set_attribute(c, "y2", a.get(t).yMedian), a.set_attribute(c, "stroke", a.get(t).color), a.set_style(c, d);
|
|
912
|
+
}, [
|
|
913
|
+
() => `opacity:${V(a.get(t).series)}`,
|
|
914
|
+
() => `opacity:${V(a.get(t).series)}`,
|
|
915
|
+
() => `opacity:${V(a.get(t).series)}`,
|
|
916
|
+
() => `opacity:${V(a.get(t).series)}`,
|
|
917
|
+
() => `opacity:${V(a.get(t).series)}`
|
|
918
|
+
]), a.append(e, n);
|
|
919
|
+
});
|
|
920
|
+
var lr = a.sibling(cr);
|
|
921
|
+
a.each(lr, 17, () => a.get(I).errorBars, a.index, (e, t) => {
|
|
922
|
+
var n = Ee(), r = a.first_child(n), i = a.sibling(r), o = a.sibling(i);
|
|
923
|
+
a.template_effect((e, n, s) => {
|
|
924
|
+
a.set_attribute(r, "x1", a.get(t).xCenter), a.set_attribute(r, "y1", a.get(t).yHi), a.set_attribute(r, "x2", a.get(t).xCenter), a.set_attribute(r, "y2", a.get(t).yLo), a.set_attribute(r, "stroke", a.get(t).color), a.set_style(r, e), a.set_attribute(i, "x1", a.get(t).xCenter - a.get(t).cap), a.set_attribute(i, "y1", a.get(t).yHi), a.set_attribute(i, "x2", a.get(t).xCenter + a.get(t).cap), a.set_attribute(i, "y2", a.get(t).yHi), a.set_attribute(i, "stroke", a.get(t).color), a.set_style(i, n), a.set_attribute(o, "x1", a.get(t).xCenter - a.get(t).cap), a.set_attribute(o, "y1", a.get(t).yLo), a.set_attribute(o, "x2", a.get(t).xCenter + a.get(t).cap), a.set_attribute(o, "y2", a.get(t).yLo), a.set_attribute(o, "stroke", a.get(t).color), a.set_style(o, s);
|
|
925
|
+
}, [
|
|
926
|
+
() => `opacity:${V(a.get(t).series)}`,
|
|
927
|
+
() => `opacity:${V(a.get(t).series)}`,
|
|
928
|
+
() => `opacity:${V(a.get(t).series)}`
|
|
929
|
+
]), a.append(e, n);
|
|
930
|
+
});
|
|
931
|
+
var ur = a.sibling(lr);
|
|
932
|
+
a.each(ur, 17, () => a.get(I).scatterPoints, a.index, (e, t) => {
|
|
933
|
+
var n = De();
|
|
934
|
+
a.template_effect((e) => {
|
|
935
|
+
a.set_attribute(n, "cx", a.get(t).cx), a.set_attribute(n, "cy", a.get(t).cy), a.set_attribute(n, "r", a.get(t).r), a.set_attribute(n, "fill", a.get(t).color), a.set_attribute(n, "stroke", a.get(t).color), a.set_style(n, e);
|
|
936
|
+
}, [() => `opacity:${V(a.get(t).series)}`]), a.delegated("mousemove", n, (e) => Ln(e.clientX, e.clientY, a.get(t))), a.event("mouseleave", n, Y), a.append(e, n);
|
|
937
|
+
});
|
|
938
|
+
var dr = a.sibling(ur);
|
|
939
|
+
a.each(dr, 17, () => a.get(I).referenceLines, a.index, (e, t) => {
|
|
940
|
+
var n = Oe(), r = a.first_child(n), i = a.sibling(r), o = a.child(i, !0);
|
|
941
|
+
a.reset(i), a.template_effect(() => {
|
|
942
|
+
a.set_attribute(r, "x1", a.get(I).plot.x), a.set_attribute(r, "y1", a.get(t).y), a.set_attribute(r, "x2", a.get(I).plot.x + a.get(I).plot.w), a.set_attribute(r, "y2", a.get(t).y), a.set_attribute(r, "stroke", a.get(t).color), a.set_attribute(r, "stroke-dasharray", a.get(t).dashed ? "5 4" : void 0), a.set_attribute(i, "x", a.get(I).plot.x + a.get(I).plot.w - 3), a.set_attribute(i, "y", a.get(t).y - 3), a.set_attribute(i, "fill", a.get(t).color), a.set_text(o, a.get(t).label);
|
|
943
|
+
}), a.append(e, n);
|
|
944
|
+
});
|
|
945
|
+
var fr = a.sibling(dr);
|
|
946
|
+
a.each(fr, 17, () => a.get(I).referenceLinesV, a.index, (e, t) => {
|
|
947
|
+
var n = ke(), r = a.first_child(n), i = a.sibling(r), o = a.child(i, !0);
|
|
948
|
+
a.reset(i), a.template_effect(() => {
|
|
949
|
+
a.set_attribute(r, "x1", a.get(t).x), a.set_attribute(r, "y1", a.get(I).plot.y), a.set_attribute(r, "x2", a.get(t).x), a.set_attribute(r, "y2", a.get(I).plot.y + a.get(I).plot.h), a.set_attribute(r, "stroke", a.get(t).color), a.set_attribute(r, "stroke-dasharray", a.get(t).dashed ? "5 4" : void 0), a.set_attribute(i, "x", a.get(t).x + 3), a.set_attribute(i, "y", a.get(I).plot.y + 9), a.set_attribute(i, "fill", a.get(t).color), a.set_text(o, a.get(t).label);
|
|
950
|
+
}), a.append(e, n);
|
|
951
|
+
});
|
|
952
|
+
var pr = a.sibling(fr);
|
|
953
|
+
a.each(pr, 19, () => a.get(I).overlays, (e, t) => e.label + t, (e, t) => {
|
|
954
|
+
var n = Ae();
|
|
955
|
+
a.template_effect(() => {
|
|
956
|
+
a.set_attribute(n, "d", a.get(t).path), a.set_attribute(n, "stroke", a.get(t).color);
|
|
957
|
+
}), a.append(e, n);
|
|
958
|
+
});
|
|
959
|
+
var mr = a.sibling(pr), hr = (e) => {
|
|
960
|
+
var t = a.comment(), n = a.first_child(t);
|
|
961
|
+
a.snippet(n, () => g.overlay, () => a.get(ln)), a.append(e, t);
|
|
962
|
+
};
|
|
963
|
+
a.if(mr, (e) => {
|
|
964
|
+
g.overlay && e(hr);
|
|
965
|
+
});
|
|
966
|
+
var gr = a.sibling(mr);
|
|
967
|
+
a.each(gr, 19, () => a.get(I).annotations, (e, t) => e.label + t, (e, t, n) => {
|
|
968
|
+
let r = a.derived(() => a.get(t).placement === "left" ? -8 : a.get(t).placement === "right" ? 8 : 0), i = a.derived(() => a.get(t).placement === "bottom" ? 14 : a.get(t).placement === "top" ? -8 : 0), o = a.derived(() => a.get(t).placement === "left" ? "end" : a.get(t).placement === "right" ? "start" : "middle");
|
|
969
|
+
var s = je(), c = a.first_child(s);
|
|
970
|
+
let l;
|
|
971
|
+
var u = a.sibling(c), d = a.child(u, !0);
|
|
972
|
+
a.reset(u), a.template_effect(() => {
|
|
973
|
+
l = a.set_class(c, 0, "sv-grid-chart-annotation-marker svelte-hyytey", null, l, { "is-removable": a.get(y) && !!g.onAnnotationRemove }), a.set_attribute(c, "cx", a.get(t).x), a.set_attribute(c, "cy", a.get(t).y), a.set_attribute(c, "r", a.get(y) && g.onAnnotationRemove ? 6 : 4), a.set_attribute(c, "fill", a.get(t).color), a.set_attribute(c, "role", a.get(y) && g.onAnnotationRemove ? "button" : void 0), a.set_attribute(c, "tabindex", a.get(y) && g.onAnnotationRemove ? 0 : void 0), a.set_attribute(c, "aria-label", a.get(y) && g.onAnnotationRemove ? `Remove note: ${a.get(t).label}` : void 0), a.set_attribute(u, "x", a.get(t).x + a.get(r)), a.set_attribute(u, "y", a.get(t).y + a.get(i)), a.set_attribute(u, "text-anchor", a.get(o)), a.set_attribute(u, "fill", a.get(t).color), a.set_text(d, a.get(t).label);
|
|
974
|
+
}), a.delegated("click", c, (e) => {
|
|
975
|
+
!a.get(y) || !g.onAnnotationRemove || (e.stopPropagation(), g.onAnnotationRemove(a.get(n)));
|
|
976
|
+
}), a.delegated("keydown", c, (e) => {
|
|
977
|
+
!a.get(y) || !g.onAnnotationRemove || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), g.onAnnotationRemove(a.get(n)));
|
|
978
|
+
}), a.append(e, s);
|
|
979
|
+
});
|
|
980
|
+
var _r = a.sibling(gr), vr = (e) => {
|
|
981
|
+
var t = a.comment(), n = a.first_child(t), r = (e) => {
|
|
982
|
+
let t = a.derived(() => a.get(I).plot.y + a.get(z) * a.get(q) + a.get(z) / 2);
|
|
983
|
+
var n = Me();
|
|
984
|
+
a.template_effect(() => {
|
|
985
|
+
a.set_attribute(n, "x1", a.get(I).plot.x), a.set_attribute(n, "y1", a.get(t)), a.set_attribute(n, "x2", a.get(I).plot.x + a.get(I).plot.w), a.set_attribute(n, "y2", a.get(t));
|
|
986
|
+
}), a.append(e, n);
|
|
987
|
+
}, i = (e) => {
|
|
988
|
+
let t = a.derived(() => a.get(I).lines[0]?.points[a.get(q)]), n = a.derived(() => a.get(t) && Number.isFinite(a.get(t).x) ? a.get(t).x : a.get(I).plot.x + a.get(z) * a.get(q) + a.get(z) / 2);
|
|
989
|
+
var r = Ne();
|
|
990
|
+
a.template_effect(() => {
|
|
991
|
+
a.set_attribute(r, "x1", a.get(n)), a.set_attribute(r, "y1", a.get(I).plot.y), a.set_attribute(r, "x2", a.get(n)), a.set_attribute(r, "y2", a.get(I).plot.y + a.get(I).plot.h);
|
|
992
|
+
}), a.append(e, r);
|
|
993
|
+
};
|
|
994
|
+
a.if(n, (e) => {
|
|
995
|
+
a.get(R) ? e(r) : e(i, -1);
|
|
996
|
+
}), a.append(e, t);
|
|
997
|
+
};
|
|
998
|
+
a.if(_r, (e) => {
|
|
999
|
+
a.get(L) && a.get(q) !== null && e(vr);
|
|
1000
|
+
});
|
|
1001
|
+
var yr = a.sibling(_r), br = (e) => {
|
|
1002
|
+
var t = Be(), n = a.first_child(t);
|
|
1003
|
+
a.each(n, 17, () => a.get(I).heatmapRowTicks, (e) => e.value, (e, t) => {
|
|
1004
|
+
var n = Pe(), r = a.child(n, !0);
|
|
1005
|
+
a.reset(n), a.template_effect((e) => {
|
|
1006
|
+
a.set_attribute(n, "x", a.get(I).plot.x - 8), a.set_attribute(n, "y", a.get(t).y + 3), a.set_text(r, e);
|
|
1007
|
+
}, [() => W(a.get(t).label, 22)]), a.append(e, n);
|
|
1008
|
+
});
|
|
1009
|
+
var r = a.sibling(n);
|
|
1010
|
+
a.each(r, 19, () => a.get(I).heatmapColTicks, (e, t) => e.label + t, (e, t) => {
|
|
1011
|
+
var n = Fe(), r = a.child(n, !0);
|
|
1012
|
+
a.reset(n), a.template_effect((e) => {
|
|
1013
|
+
a.set_attribute(n, "x", a.get(t).x), a.set_attribute(n, "y", a.get(I).plot.y + a.get(I).plot.h + 14), a.set_text(r, e);
|
|
1014
|
+
}, [() => W(a.get(t).label, 14)]), a.append(e, n);
|
|
1015
|
+
});
|
|
1016
|
+
var i = a.sibling(r);
|
|
1017
|
+
a.each(i, 17, () => a.get(I).heatmapCells, a.index, (e, t) => {
|
|
1018
|
+
var n = Le(), r = a.first_child(n), i = a.sibling(r), o = (e) => {
|
|
1019
|
+
var n = Ie(), r = a.child(n, !0);
|
|
1020
|
+
a.reset(n), a.template_effect((e) => {
|
|
1021
|
+
a.set_attribute(n, "x", a.get(t).x + a.get(t).w / 2), a.set_attribute(n, "y", a.get(t).y + a.get(t).h / 2 + 3), a.set_attribute(n, "fill", a.get(t).textColor), a.set_text(r, e);
|
|
1022
|
+
}, [() => b(a.get(t).value)]), a.append(e, n);
|
|
1023
|
+
};
|
|
1024
|
+
a.if(i, (e) => {
|
|
1025
|
+
v() && a.get(t).w > 22 && a.get(t).h > 14 && e(o);
|
|
1026
|
+
}), a.template_effect((e) => {
|
|
1027
|
+
a.set_attribute(r, "x", a.get(t).x), a.set_attribute(r, "y", a.get(t).y), a.set_attribute(r, "width", a.get(t).w), a.set_attribute(r, "height", a.get(t).h), a.set_attribute(r, "fill", a.get(t).color), a.set_attribute(r, "role", g.onSelect ? "button" : "presentation"), a.set_attribute(r, "tabindex", g.onSelect ? 0 : void 0), a.set_attribute(r, "aria-label", e);
|
|
1028
|
+
}, [() => `${a.get(t).rowLabel} ${a.get(t).colLabel}: ${b(a.get(t).value)}`]), a.delegated("mousemove", r, (e) => Rn(e.clientX, e.clientY, a.get(t))), a.event("mouseleave", r, Y), a.delegated("click", r, () => X(a.get(t).colLabel, a.get(t).rowLabel, a.get(t).value)), a.delegated("keydown", r, (e) => {
|
|
1029
|
+
g.onSelect && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), X(a.get(t).colLabel, a.get(t).rowLabel, a.get(t).value));
|
|
1030
|
+
}), a.append(e, n);
|
|
1031
|
+
});
|
|
1032
|
+
var o = a.sibling(i), s = (e) => {
|
|
1033
|
+
let t = a.derived(() => a.get(I).plot.x + a.get(I).plot.w + 14), n = a.derived(() => a.get(I).plot.h - 20), r = a.derived(() => a.get(I).heatmapLegend);
|
|
1034
|
+
var i = ze(), o = a.first_child(i), s = a.child(o);
|
|
1035
|
+
a.each(s, 21, () => a.get(r), a.index, (e, t, n) => {
|
|
1036
|
+
var i = Re();
|
|
1037
|
+
a.template_effect(() => {
|
|
1038
|
+
a.set_attribute(i, "offset", `${n / (a.get(r).length - 1) * 100}%`), a.set_attribute(i, "stop-color", a.get(t).color);
|
|
1039
|
+
}), a.append(e, i);
|
|
1040
|
+
}), a.reset(s), a.reset(o);
|
|
1041
|
+
var c = a.sibling(o), l = a.sibling(c), u = a.child(l, !0);
|
|
1042
|
+
a.reset(l);
|
|
1043
|
+
var d = a.sibling(l), f = a.child(d, !0);
|
|
1044
|
+
a.reset(d), a.template_effect(() => {
|
|
1045
|
+
a.set_attribute(s, "id", `${w}-heatscale`), a.set_attribute(c, "x", a.get(t)), a.set_attribute(c, "y", a.get(I).plot.y + 10), a.set_attribute(c, "height", a.get(n)), a.set_attribute(c, "fill", `url(#${w}-heatscale)`), a.set_attribute(l, "x", a.get(t) + 14), a.set_attribute(l, "y", a.get(I).plot.y + 14), a.set_text(u, a.get(r)[a.get(r).length - 1].label), a.set_attribute(d, "x", a.get(t) + 14), a.set_attribute(d, "y", a.get(I).plot.y + 10 + a.get(n)), a.set_text(f, a.get(r)[0].label);
|
|
1046
|
+
}), a.append(e, i);
|
|
1047
|
+
};
|
|
1048
|
+
a.if(o, (e) => {
|
|
1049
|
+
a.get(I).heatmapLegend.length && e(s);
|
|
1050
|
+
}), a.append(e, t);
|
|
1051
|
+
};
|
|
1052
|
+
a.if(yr, (e) => {
|
|
1053
|
+
a.get(dn) && e(br);
|
|
1054
|
+
});
|
|
1055
|
+
var xr = a.sibling(yr), Sr = (e) => {
|
|
1056
|
+
var t = a.comment(), n = a.first_child(t);
|
|
1057
|
+
a.each(n, 17, () => a.get(I).funnelSegments, a.index, (e, t, n) => {
|
|
1058
|
+
var r = Ve(), i = a.first_child(r), o = a.sibling(i), s = a.child(o, !0);
|
|
1059
|
+
a.reset(o);
|
|
1060
|
+
var c = a.sibling(o), l = a.child(c);
|
|
1061
|
+
a.reset(c), a.template_effect((e, n, r, u) => {
|
|
1062
|
+
a.set_attribute(i, "d", a.get(t).path), a.set_attribute(i, "fill", a.get(t).color), a.set_attribute(i, "role", g.onSelect ? "button" : "presentation"), a.set_attribute(i, "tabindex", g.onSelect ? 0 : void 0), a.set_attribute(i, "aria-label", e), a.set_attribute(o, "x", a.get(t).cx), a.set_attribute(o, "y", a.get(t).cy - 3), a.set_attribute(o, "fill", a.get(t).textColor), a.set_text(s, n), a.set_attribute(c, "x", a.get(t).cx), a.set_attribute(c, "y", a.get(t).cy + 11), a.set_attribute(c, "fill", a.get(t).textColor), a.set_text(l, `${r ?? ""} · ${u ?? ""}%`);
|
|
1063
|
+
}, [
|
|
1064
|
+
() => `${a.get(t).label}: ${b(a.get(t).value)}`,
|
|
1065
|
+
() => W(a.get(t).label, 24),
|
|
1066
|
+
() => b(a.get(t).value),
|
|
1067
|
+
() => (a.get(t).conversion * 100).toFixed(0)
|
|
1068
|
+
]), a.delegated("mousemove", i, (e) => zn(e.clientX, e.clientY, a.get(t))), a.event("mouseleave", i, Y), a.delegated("click", i, () => X(a.get(t).label, a.get(t).label, a.get(t).value, n)), a.delegated("keydown", i, (e) => {
|
|
1069
|
+
g.onSelect && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), X(a.get(t).label, a.get(t).label, a.get(t).value, n));
|
|
1070
|
+
}), a.append(e, r);
|
|
1071
|
+
}), a.append(e, t);
|
|
1072
|
+
};
|
|
1073
|
+
a.if(xr, (e) => {
|
|
1074
|
+
a.get(fn) && e(Sr);
|
|
1075
|
+
});
|
|
1076
|
+
var Cr = a.sibling(xr), wr = (e) => {
|
|
1077
|
+
let t = a.derived(() => a.get(I).radarCenter);
|
|
1078
|
+
var n = Ke(), r = a.first_child(n);
|
|
1079
|
+
a.each(r, 17, () => a.get(I).radarRings, a.index, (e, n, r) => {
|
|
1080
|
+
let i = a.derived(() => a.get(t).r * ((r + 1) / a.get(I).radarRings.length));
|
|
1081
|
+
var o = He();
|
|
1082
|
+
a.template_effect(() => {
|
|
1083
|
+
a.set_attribute(o, "cx", a.get(t).cx), a.set_attribute(o, "cy", a.get(t).cy), a.set_attribute(o, "r", a.get(i));
|
|
1084
|
+
}), a.append(e, o);
|
|
1085
|
+
});
|
|
1086
|
+
var i = a.sibling(r);
|
|
1087
|
+
a.each(i, 17, () => a.get(I).radarAxes, a.index, (e, n) => {
|
|
1088
|
+
let r = a.derived(() => a.get(n).x - a.get(t).cx), i = a.derived(() => a.get(n).y - a.get(t).cy), o = a.derived(() => a.get(t).cx + a.get(r) * 1.08), s = a.derived(() => a.get(t).cy + a.get(i) * 1.08);
|
|
1089
|
+
var c = Ue(), l = a.first_child(c), u = a.sibling(l), d = a.child(u, !0);
|
|
1090
|
+
a.reset(u), a.template_effect((e) => {
|
|
1091
|
+
a.set_attribute(l, "x1", a.get(t).cx), a.set_attribute(l, "y1", a.get(t).cy), a.set_attribute(l, "x2", a.get(n).x), a.set_attribute(l, "y2", a.get(n).y), a.set_attribute(u, "x", a.get(o)), a.set_attribute(u, "y", a.get(s) + 3), a.set_attribute(u, "text-anchor", e), a.set_text(d, a.get(n).label);
|
|
1092
|
+
}, [() => Math.abs(a.get(r)) < 1 ? "middle" : a.get(r) > 0 ? "start" : "end"]), a.append(e, c);
|
|
1093
|
+
});
|
|
1094
|
+
var o = a.sibling(i);
|
|
1095
|
+
a.each(o, 17, () => a.get(I).radarSeries, a.index, (e, t) => {
|
|
1096
|
+
var n = Ge(), r = a.first_child(n), i = a.sibling(r);
|
|
1097
|
+
a.each(i, 17, () => a.get(t).points, a.index, (e, n) => {
|
|
1098
|
+
var r = We();
|
|
1099
|
+
a.template_effect(() => {
|
|
1100
|
+
a.set_attribute(r, "cx", a.get(n).x), a.set_attribute(r, "cy", a.get(n).y), a.set_attribute(r, "fill", a.get(t).color);
|
|
1101
|
+
}), a.delegated("mousemove", r, (e) => Bn(e.clientX, e.clientY, a.get(t).label, a.get(n).axis, a.get(n).value, a.get(t).color)), a.event("mouseleave", r, Y), a.append(e, r);
|
|
1102
|
+
}), a.template_effect((e) => {
|
|
1103
|
+
a.set_attribute(r, "d", a.get(t).path), a.set_attribute(r, "fill", a.get(t).color), a.set_attribute(r, "stroke", a.get(t).color), a.set_style(r, e);
|
|
1104
|
+
}, [() => `opacity:${V(a.get(t).label)}`]), a.append(e, n);
|
|
1105
|
+
}), a.append(e, n);
|
|
1106
|
+
};
|
|
1107
|
+
a.if(Cr, (e) => {
|
|
1108
|
+
a.get(pn) && a.get(I).radarCenter && e(wr);
|
|
1109
|
+
});
|
|
1110
|
+
var Tr = a.sibling(Cr), Er = (e) => {
|
|
1111
|
+
var t = Qe(), n = a.first_child(t);
|
|
1112
|
+
a.each(n, 17, () => a.get(I).calendarMonthTicks, a.index, (e, t) => {
|
|
1113
|
+
var n = qe(), r = a.child(n, !0);
|
|
1114
|
+
a.reset(n), a.template_effect(() => {
|
|
1115
|
+
a.set_attribute(n, "x", a.get(t).x), a.set_attribute(n, "y", a.get(I).plot.y - 8), a.set_text(r, a.get(t).label);
|
|
1116
|
+
}), a.append(e, n);
|
|
1117
|
+
});
|
|
1118
|
+
var r = a.sibling(n);
|
|
1119
|
+
a.each(r, 16, () => [
|
|
1120
|
+
"Mon",
|
|
1121
|
+
"Wed",
|
|
1122
|
+
"Fri"
|
|
1123
|
+
], a.index, (e, t, n) => {
|
|
1124
|
+
let r = a.derived(() => [
|
|
1125
|
+
1,
|
|
1126
|
+
3,
|
|
1127
|
+
5
|
|
1128
|
+
][n]), i = a.derived(() => a.get(I).calendarCells[a.get(r)]);
|
|
1129
|
+
var o = a.comment(), s = a.first_child(o), c = (e) => {
|
|
1130
|
+
var n = Je(), r = a.child(n, !0);
|
|
1131
|
+
a.reset(n), a.template_effect(() => {
|
|
1132
|
+
a.set_attribute(n, "x", a.get(I).plot.x - 6), a.set_attribute(n, "y", a.get(i).y + a.get(i).size / 2 + 3), a.set_text(r, t);
|
|
1133
|
+
}), a.append(e, n);
|
|
1134
|
+
};
|
|
1135
|
+
a.if(s, (e) => {
|
|
1136
|
+
a.get(i) && e(c);
|
|
1137
|
+
}), a.append(e, o);
|
|
1138
|
+
});
|
|
1139
|
+
var i = a.sibling(r);
|
|
1140
|
+
a.each(i, 17, () => a.get(I).calendarCells, a.index, (e, t) => {
|
|
1141
|
+
var n = Ye();
|
|
1142
|
+
let r;
|
|
1143
|
+
a.template_effect((e) => {
|
|
1144
|
+
r = a.set_class(n, 0, "sv-grid-chart-calendar-cell svelte-hyytey", null, r, { "is-blank": !a.get(t).defined }), a.set_attribute(n, "x", a.get(t).x + 1), a.set_attribute(n, "y", a.get(t).y + 1), a.set_attribute(n, "width", a.get(t).size - 2), a.set_attribute(n, "height", a.get(t).size - 2), a.set_attribute(n, "fill", a.get(t).defined ? a.get(t).color : "transparent"), a.set_attribute(n, "aria-label", e);
|
|
1145
|
+
}, [() => `${a.get(t).date}: ${a.get(t).defined ? b(a.get(t).value) : "no data"}`]), a.delegated("mousemove", n, (e) => a.get(t).defined && J(e.clientX, e.clientY, a.get(t).date, [{
|
|
1146
|
+
color: a.get(t).color,
|
|
1147
|
+
value: b(a.get(t).value)
|
|
1148
|
+
}])), a.event("mouseleave", n, Y), a.append(e, n);
|
|
1149
|
+
});
|
|
1150
|
+
var o = a.sibling(i), s = (e) => {
|
|
1151
|
+
let t = a.derived(() => a.get(I).plot.x + a.get(I).plot.w + 12), n = a.derived(() => a.get(I).plot.y + 4);
|
|
1152
|
+
var r = Ze(), i = a.first_child(r), o = a.sibling(i);
|
|
1153
|
+
a.each(o, 17, () => a.get(I).calendarLegend, a.index, (e, r, i) => {
|
|
1154
|
+
var o = Xe(), s = a.first_child(o), c = a.sibling(s), l = a.child(c, !0);
|
|
1155
|
+
a.reset(c), a.template_effect(() => {
|
|
1156
|
+
a.set_attribute(s, "x", a.get(t)), a.set_attribute(s, "y", a.get(n) + 6 + i * 13), a.set_attribute(s, "fill", a.get(r).color), a.set_attribute(c, "x", a.get(t) + 14), a.set_attribute(c, "y", a.get(n) + 14 + i * 13), a.set_text(l, a.get(r).label);
|
|
1157
|
+
}), a.append(e, o);
|
|
1158
|
+
});
|
|
1159
|
+
var s = a.sibling(o);
|
|
1160
|
+
a.template_effect(() => {
|
|
1161
|
+
a.set_attribute(i, "x", a.get(t)), a.set_attribute(i, "y", a.get(n)), a.set_attribute(s, "x", a.get(t)), a.set_attribute(s, "y", a.get(n) + 12 + a.get(I).calendarLegend.length * 13);
|
|
1162
|
+
}), a.append(e, r);
|
|
1163
|
+
};
|
|
1164
|
+
a.if(o, (e) => {
|
|
1165
|
+
a.get(I).calendarLegend.length && e(s);
|
|
1166
|
+
}), a.append(e, t);
|
|
1167
|
+
};
|
|
1168
|
+
a.if(Tr, (e) => {
|
|
1169
|
+
a.get(mn) && e(Er);
|
|
1170
|
+
});
|
|
1171
|
+
var Dr = a.sibling(Tr), Or = (e) => {
|
|
1172
|
+
let t = a.derived(() => a.get(I).gauge);
|
|
1173
|
+
var n = nt(), r = a.first_child(n);
|
|
1174
|
+
a.each(r, 17, () => a.get(t).ticks, a.index, (e, t) => {
|
|
1175
|
+
var n = $e();
|
|
1176
|
+
let r;
|
|
1177
|
+
a.template_effect(() => {
|
|
1178
|
+
r = a.set_class(n, 0, "sv-grid-chart-gauge-tick svelte-hyytey", null, r, { "is-major": a.get(t).major }), a.set_attribute(n, "x1", a.get(t).x1), a.set_attribute(n, "y1", a.get(t).y1), a.set_attribute(n, "x2", a.get(t).x2), a.set_attribute(n, "y2", a.get(t).y2);
|
|
1179
|
+
}), a.append(e, n);
|
|
1180
|
+
});
|
|
1181
|
+
var i = a.sibling(r), o = a.sibling(i);
|
|
1182
|
+
a.each(o, 17, () => a.get(t).rangePaths, a.index, (e, t) => {
|
|
1183
|
+
var n = et();
|
|
1184
|
+
a.template_effect(() => {
|
|
1185
|
+
a.set_attribute(n, "d", a.get(t).path), a.set_attribute(n, "stroke", a.get(t).color);
|
|
1186
|
+
}), a.append(e, n);
|
|
1187
|
+
});
|
|
1188
|
+
var s = a.sibling(o), c = a.sibling(s), l = (e) => {
|
|
1189
|
+
var n = tt();
|
|
1190
|
+
a.template_effect(() => {
|
|
1191
|
+
a.set_attribute(n, "x1", a.get(t).target.x1), a.set_attribute(n, "y1", a.get(t).target.y1), a.set_attribute(n, "x2", a.get(t).target.x2), a.set_attribute(n, "y2", a.get(t).target.y2);
|
|
1192
|
+
}), a.append(e, n);
|
|
1193
|
+
};
|
|
1194
|
+
a.if(c, (e) => {
|
|
1195
|
+
a.get(t).target && e(l);
|
|
1196
|
+
});
|
|
1197
|
+
var u = a.sibling(c), d = a.sibling(u), f = a.sibling(d), p = a.sibling(f), ee = a.child(p, !0);
|
|
1198
|
+
a.reset(p);
|
|
1199
|
+
var m = a.sibling(p), te = a.child(m, !0);
|
|
1200
|
+
a.reset(m);
|
|
1201
|
+
var h = a.sibling(m), ne = a.child(h);
|
|
1202
|
+
a.reset(h), a.template_effect((e, n, r) => {
|
|
1203
|
+
a.set_attribute(i, "d", a.get(t).trackPath), a.set_attribute(s, "d", a.get(t).valuePath), a.set_attribute(s, "stroke", a.get(t).valueColor ?? "var(--sg-accent, #2563eb)"), a.set_attribute(u, "d", a.get(t).needle.path), a.set_attribute(d, "cx", a.get(t).cx), a.set_attribute(d, "cy", a.get(t).cy), a.set_attribute(d, "r", a.get(t).needle.hubR), a.set_attribute(f, "cx", a.get(t).cx), a.set_attribute(f, "cy", a.get(t).cy), a.set_attribute(p, "x", a.get(t).minLabel.x), a.set_attribute(p, "y", a.get(t).minLabel.y), a.set_text(ee, e), a.set_attribute(m, "x", a.get(t).maxLabel.x), a.set_attribute(m, "y", a.get(t).maxLabel.y), a.set_text(te, n), a.set_attribute(h, "x", a.get(t).cx), a.set_attribute(h, "y", a.get(t).cy + 38), a.set_text(ne, `${r ?? ""}${a.get(t).unit ? ` ${a.get(t).unit}` : ""}`);
|
|
1204
|
+
}, [
|
|
1205
|
+
() => b(a.get(t).min),
|
|
1206
|
+
() => b(a.get(t).max),
|
|
1207
|
+
() => b(a.get(t).value)
|
|
1208
|
+
]), a.append(e, n);
|
|
1209
|
+
};
|
|
1210
|
+
a.if(Dr, (e) => {
|
|
1211
|
+
a.get(hn) && a.get(I).gauge && e(Or);
|
|
1212
|
+
});
|
|
1213
|
+
var kr = a.sibling(Dr), Ar = (e) => {
|
|
1214
|
+
var t = a.comment(), n = a.first_child(t);
|
|
1215
|
+
a.each(n, 17, () => a.get(I).treemapCells, a.index, (e, t) => {
|
|
1216
|
+
var n = at(), r = a.first_child(n), i = a.sibling(r), o = (e) => {
|
|
1217
|
+
var n = rt(), r = a.child(n, !0);
|
|
1218
|
+
a.reset(n), a.template_effect((e) => {
|
|
1219
|
+
a.set_attribute(n, "x", a.get(t).x + 4), a.set_attribute(n, "y", a.get(t).y + 12), a.set_attribute(n, "fill", a.get(t).textColor), a.set_text(r, e);
|
|
1220
|
+
}, [() => W(a.get(t).name, Math.max(3, Math.floor(a.get(t).w / 7)))]), a.append(e, n);
|
|
1221
|
+
};
|
|
1222
|
+
a.if(i, (e) => {
|
|
1223
|
+
a.get(t).w > 36 && a.get(t).h > 18 && e(o);
|
|
1224
|
+
});
|
|
1225
|
+
var s = a.sibling(i), c = (e) => {
|
|
1226
|
+
var n = it(), r = a.child(n, !0);
|
|
1227
|
+
a.reset(n), a.template_effect((e) => {
|
|
1228
|
+
a.set_attribute(n, "x", a.get(t).x + 4), a.set_attribute(n, "y", a.get(t).y + 24), a.set_attribute(n, "fill", a.get(t).textColor), a.set_text(r, e);
|
|
1229
|
+
}, [() => b(a.get(t).value)]), a.append(e, n);
|
|
1230
|
+
};
|
|
1231
|
+
a.if(s, (e) => {
|
|
1232
|
+
a.get(t).w > 60 && a.get(t).h > 30 && e(c);
|
|
1233
|
+
}), a.template_effect((e) => {
|
|
1234
|
+
a.set_attribute(r, "x", a.get(t).x), a.set_attribute(r, "y", a.get(t).y), a.set_attribute(r, "width", a.get(t).w), a.set_attribute(r, "height", a.get(t).h), a.set_attribute(r, "fill", a.get(t).color), a.set_attribute(r, "role", g.onSelect ? "button" : "presentation"), a.set_attribute(r, "tabindex", g.onSelect ? 0 : void 0), a.set_attribute(r, "aria-label", e);
|
|
1235
|
+
}, [() => `${a.get(t).name}: ${b(a.get(t).value)}`]), a.delegated("mousemove", r, (e) => J(e.clientX, e.clientY, a.get(t).name, [{
|
|
1236
|
+
color: a.get(t).color,
|
|
1237
|
+
value: b(a.get(t).value)
|
|
1238
|
+
}])), a.event("mouseleave", r, Y), a.delegated("click", r, () => X(a.get(t).name, "", a.get(t).value)), a.delegated("keydown", r, (e) => {
|
|
1239
|
+
g.onSelect && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), X(a.get(t).name, "", a.get(t).value));
|
|
1240
|
+
}), a.append(e, n);
|
|
1241
|
+
}), a.append(e, t);
|
|
1242
|
+
};
|
|
1243
|
+
a.if(kr, (e) => {
|
|
1244
|
+
a.get(gn) && e(Ar);
|
|
1245
|
+
});
|
|
1246
|
+
var jr = a.sibling(kr), Mr = (e) => {
|
|
1247
|
+
var t = ct(), n = a.first_child(t);
|
|
1248
|
+
a.each(n, 17, () => a.get(I).sankeyLinks, a.index, (e, t) => {
|
|
1249
|
+
var n = ot();
|
|
1250
|
+
a.template_effect((e) => {
|
|
1251
|
+
a.set_attribute(n, "d", a.get(t).path), a.set_attribute(n, "stroke", a.get(t).color), a.set_attribute(n, "stroke-width", a.get(t).width), a.set_attribute(n, "aria-label", e);
|
|
1252
|
+
}, [() => `${a.get(t).source} -> ${a.get(t).target}: ${b(a.get(t).value)}`]), a.delegated("mousemove", n, (e) => J(e.clientX, e.clientY, `${a.get(t).source} -> ${a.get(t).target}`, [{
|
|
1253
|
+
color: a.get(t).color,
|
|
1254
|
+
value: b(a.get(t).value)
|
|
1255
|
+
}])), a.event("mouseleave", n, Y), a.append(e, n);
|
|
1256
|
+
});
|
|
1257
|
+
var r = a.sibling(n);
|
|
1258
|
+
a.each(r, 17, () => a.get(I).sankeyNodes, a.index, (e, t) => {
|
|
1259
|
+
var n = st(), r = a.first_child(n);
|
|
1260
|
+
a.set_attribute(r, "tabindex", 0);
|
|
1261
|
+
var i = a.sibling(r), o = a.child(i, !0);
|
|
1262
|
+
a.reset(i), a.template_effect((e) => {
|
|
1263
|
+
a.set_attribute(r, "x", a.get(t).x), a.set_attribute(r, "y", a.get(t).y), a.set_attribute(r, "width", a.get(t).w), a.set_attribute(r, "height", a.get(t).h), a.set_attribute(r, "fill", a.get(t).color), a.set_attribute(r, "aria-label", e), a.set_attribute(i, "x", a.get(t).column === 0 ? a.get(t).x + a.get(t).w + 4 : a.get(t).x - 4), a.set_attribute(i, "y", a.get(t).y + a.get(t).h / 2 + 3), a.set_attribute(i, "text-anchor", a.get(t).column === 0 ? "start" : "end"), a.set_text(o, a.get(t).label);
|
|
1264
|
+
}, [() => `${a.get(t).label}: in ${b(a.get(t).totalIn)}, out ${b(a.get(t).totalOut)}`]), a.delegated("mousemove", r, (e) => J(e.clientX, e.clientY, a.get(t).label, [{
|
|
1265
|
+
label: "in",
|
|
1266
|
+
value: b(a.get(t).totalIn)
|
|
1267
|
+
}, {
|
|
1268
|
+
label: "out",
|
|
1269
|
+
value: b(a.get(t).totalOut)
|
|
1270
|
+
}])), a.event("mouseleave", r, Y), a.event("focus", r, (e) => {
|
|
1271
|
+
let n = e.currentTarget.getBoundingClientRect();
|
|
1272
|
+
J(n.left + n.width / 2, n.top, a.get(t).label, [{
|
|
1273
|
+
label: "in",
|
|
1274
|
+
value: b(a.get(t).totalIn)
|
|
1275
|
+
}, {
|
|
1276
|
+
label: "out",
|
|
1277
|
+
value: b(a.get(t).totalOut)
|
|
1278
|
+
}]);
|
|
1279
|
+
}), a.event("blur", r, Y), a.append(e, n);
|
|
1280
|
+
}), a.append(e, t);
|
|
1281
|
+
};
|
|
1282
|
+
a.if(jr, (e) => {
|
|
1283
|
+
a.get(_n) && e(Mr);
|
|
1284
|
+
});
|
|
1285
|
+
var Nr = a.sibling(jr);
|
|
1286
|
+
a.each(Nr, 17, () => a.get(I).slices, a.index, (e, t, n) => {
|
|
1287
|
+
var r = ut(), i = a.first_child(r), o = a.sibling(i), s = (e) => {
|
|
1288
|
+
var n = lt(), r = a.child(n);
|
|
1289
|
+
a.reset(n), a.template_effect((e) => {
|
|
1290
|
+
a.set_attribute(n, "x", a.get(t).cx), a.set_attribute(n, "y", a.get(t).cy), a.set_text(r, `${e ?? ""}%`);
|
|
1291
|
+
}, [() => a.get(t).percent.toFixed(0)]), a.append(e, n);
|
|
1292
|
+
};
|
|
1293
|
+
a.if(o, (e) => {
|
|
1294
|
+
v() && a.get(t).percent >= 6 && e(s);
|
|
1295
|
+
}), a.template_effect((e) => {
|
|
1296
|
+
a.set_attribute(i, "d", a.get(t).path), a.set_attribute(i, "fill", a.get(t).color), a.set_attribute(i, "role", g.onSelect ? "button" : "presentation"), a.set_attribute(i, "tabindex", g.onSelect ? 0 : void 0), a.set_attribute(i, "aria-label", e);
|
|
1297
|
+
}, [() => `${a.get(t).label}: ${b(a.get(t).value)}, ${a.get(t).percent.toFixed(1)}%`]), a.delegated("mousemove", i, (e) => In(e.clientX, e.clientY, a.get(t).label, a.get(t).value, a.get(t).percent)), a.event("mouseleave", i, Y), a.event("focus", i, (e) => {
|
|
1298
|
+
let n = e.currentTarget.getBoundingClientRect();
|
|
1299
|
+
In(n.left + n.width / 2, n.top, a.get(t).label, a.get(t).value, a.get(t).percent);
|
|
1300
|
+
}), a.event("blur", i, Y), a.delegated("click", i, () => X(a.get(t).label, a.get(t).label, a.get(t).value, n)), a.delegated("keydown", i, (e) => Hn(e, a.get(t).label, a.get(t).value)), a.append(e, r);
|
|
1301
|
+
});
|
|
1302
|
+
var Pr = a.sibling(Nr), Fr = (e) => {
|
|
1303
|
+
var t = dt(), n = a.first_child(t), r = a.child(n, !0);
|
|
1304
|
+
a.reset(n);
|
|
1305
|
+
var i = a.sibling(n);
|
|
1306
|
+
a.template_effect((e) => {
|
|
1307
|
+
a.set_attribute(n, "x", a.get(I).donut.cx), a.set_attribute(n, "y", a.get(I).donut.cy - 4), a.set_text(r, e), a.set_attribute(i, "x", a.get(I).donut.cx), a.set_attribute(i, "y", a.get(I).donut.cy + 11);
|
|
1308
|
+
}, [() => b(a.get(I).donut.total)]), a.append(e, t);
|
|
1309
|
+
};
|
|
1310
|
+
a.if(Pr, (e) => {
|
|
1311
|
+
a.get(I).donut && e(Fr);
|
|
1312
|
+
});
|
|
1313
|
+
var Ir = a.sibling(Pr), Lr = (e) => {
|
|
1314
|
+
var t = a.comment(), n = a.first_child(t), r = (e) => {
|
|
1315
|
+
var t = ft();
|
|
1316
|
+
a.template_effect(() => {
|
|
1317
|
+
a.set_attribute(t, "x", a.get(I).plot.x), a.set_attribute(t, "y", a.get(I).plot.y), a.set_attribute(t, "width", a.get(I).plot.w), a.set_attribute(t, "height", a.get(I).plot.h), a.set_attribute(t, "role", g.onSelect ? "button" : "img"), a.set_attribute(t, "tabindex", _() ? 0 : void 0), a.set_attribute(t, "data-cat-index", a.get(B)), a.set_attribute(t, "aria-label", `${a.get(F).categories.length} points, ${a.get(F).categories[0] ?? ""} to ${a.get(F).categories[a.get(F).categories.length - 1] ?? ""}. Arrow keys step through values.`);
|
|
1318
|
+
}), a.delegated("mousemove", t, (e) => {
|
|
1319
|
+
let t = xn(e.clientX, e.currentTarget);
|
|
1320
|
+
t != null && (a.set(B, t, !0), Pn(e.clientX, e.clientY, t));
|
|
1321
|
+
}), a.event("mouseleave", t, Y), a.event("focus", t, (e) => Fn(e.currentTarget, a.get(B))), a.event("blur", t, Y), a.delegated("click", t, () => X(a.get(F).categories[a.get(B)] ?? "", "", 0, a.get(B))), a.delegated("keydown", t, Sn), a.append(e, t);
|
|
1322
|
+
}, i = (e) => {
|
|
1323
|
+
var t = a.comment(), n = a.first_child(t);
|
|
1324
|
+
a.each(n, 19, () => a.get(F).categories, (e, t) => e + t, (e, t, n) => {
|
|
1325
|
+
let r = a.derived(() => a.get(I).lines[0]?.points), i = a.derived(() => a.get(r)?.[a.get(n)]?.x), o = a.derived(() => !a.get(R) && a.get(r) && a.get(r).length === a.get(F).categories.length && Number.isFinite(a.get(i))), s = a.derived(() => a.get(o) && a.get(n) > 0 ? a.get(r)[a.get(n) - 1].x : null), c = a.derived(() => a.get(o) && a.get(n) < a.get(r).length - 1 ? a.get(r)[a.get(n) + 1].x : null), l = a.derived(() => a.get(o) ? a.get(s) == null ? a.get(I).plot.x : (a.get(s) + a.get(i)) / 2 : a.get(I).plot.x + a.get(z) * a.get(n)), u = a.derived(() => a.get(o) ? a.get(c) == null ? a.get(I).plot.x + a.get(I).plot.w : (a.get(i) + a.get(c)) / 2 : a.get(I).plot.x + a.get(z) * (a.get(n) + 1));
|
|
1326
|
+
var d = pt();
|
|
1327
|
+
a.template_effect((e, t) => {
|
|
1328
|
+
a.set_attribute(d, "x", a.get(R) ? a.get(I).plot.x : a.get(l)), a.set_attribute(d, "y", a.get(R) ? a.get(I).plot.y + a.get(z) * a.get(n) : a.get(I).plot.y), a.set_attribute(d, "width", e), a.set_attribute(d, "height", a.get(R) ? a.get(z) : a.get(I).plot.h), a.set_attribute(d, "role", g.onSelect ? "button" : "img"), a.set_attribute(d, "tabindex", _() ? a.get(n) === 0 ? 0 : -1 : void 0), a.set_attribute(d, "data-cat-index", a.get(n)), a.set_attribute(d, "aria-label", t);
|
|
1329
|
+
}, [() => a.get(R) ? a.get(I).plot.w : Math.max(0, a.get(u) - a.get(l)), () => `${a.get(t)}: ${Nn(a.get(n)).map((e) => `${e.label} ${e.value}`).join(", ")}`]), a.delegated("mousemove", d, (e) => Pn(e.clientX, e.clientY, a.get(n))), a.event("mouseleave", d, Y), a.event("focus", d, (e) => Fn(e.currentTarget, a.get(n))), a.event("blur", d, Y), a.delegated("click", d, () => X(a.get(t), "", 0, a.get(n))), a.delegated("keydown", d, (e) => Vn(e, a.get(n))), a.append(e, d);
|
|
1330
|
+
}), a.append(e, t);
|
|
1331
|
+
};
|
|
1332
|
+
a.if(n, (e) => {
|
|
1333
|
+
a.get(vn) ? e(r) : e(i, -1);
|
|
1334
|
+
}), a.append(e, t);
|
|
1335
|
+
};
|
|
1336
|
+
a.if(Ir, (e) => {
|
|
1337
|
+
a.get(L) && !a.get(un) && e(Lr);
|
|
1338
|
+
});
|
|
1339
|
+
var Rr = a.sibling(Ir), zr = (e) => {
|
|
1340
|
+
var t = mt();
|
|
1341
|
+
a.template_effect(() => {
|
|
1342
|
+
a.set_attribute(t, "x", a.get(A).x), a.set_attribute(t, "y", a.get(A).y), a.set_attribute(t, "width", a.get(A).w), a.set_attribute(t, "height", a.get(A).h);
|
|
1343
|
+
}), a.append(e, t);
|
|
1344
|
+
};
|
|
1345
|
+
a.if(Rr, (e) => {
|
|
1346
|
+
a.get(A) && e(zr);
|
|
1347
|
+
}), a.reset($), a.bind_this($, (e) => a.set(D, e), () => a.get(D));
|
|
1348
|
+
var Br = a.sibling($, 2), Vr = (e) => {
|
|
1349
|
+
let t = a.derived(() => a.get(j).plot.x + a.get(M).t0 * a.get(j).plot.w), n = a.derived(() => (a.get(M).t1 - a.get(M).t0) * a.get(j).plot.w);
|
|
1350
|
+
var r = vt(), i = a.child(r);
|
|
1351
|
+
a.each(i, 17, () => a.get(j).lines, a.index, (e, t) => {
|
|
1352
|
+
var n = gt(), r = a.first_child(n), i = (e) => {
|
|
1353
|
+
var n = ht();
|
|
1354
|
+
a.template_effect(() => {
|
|
1355
|
+
a.set_attribute(n, "d", a.get(t).areaPath), a.set_attribute(n, "fill", a.get(t).color);
|
|
1356
|
+
}), a.append(e, n);
|
|
1357
|
+
};
|
|
1358
|
+
a.if(r, (e) => {
|
|
1359
|
+
a.get(t).areaPath && e(i);
|
|
1360
|
+
});
|
|
1361
|
+
var o = a.sibling(r);
|
|
1362
|
+
a.template_effect(() => {
|
|
1363
|
+
a.set_attribute(o, "d", a.get(t).path), a.set_attribute(o, "stroke", a.get(t).color);
|
|
1364
|
+
}), a.append(e, n);
|
|
1365
|
+
});
|
|
1366
|
+
var o = a.sibling(i);
|
|
1367
|
+
a.each(o, 17, () => a.get(j).bars, a.index, (e, t) => {
|
|
1368
|
+
var n = _t();
|
|
1369
|
+
a.template_effect(() => {
|
|
1370
|
+
a.set_attribute(n, "x", a.get(t).x), a.set_attribute(n, "y", a.get(t).y), a.set_attribute(n, "width", a.get(t).w), a.set_attribute(n, "height", a.get(t).h), a.set_attribute(n, "fill", a.get(t).color);
|
|
1371
|
+
}), a.append(e, n);
|
|
1372
|
+
});
|
|
1373
|
+
var s = a.sibling(o), c = a.sibling(s), l = a.sibling(c), u = a.sibling(l), d = a.sibling(u);
|
|
1374
|
+
a.reset(r), a.template_effect(() => {
|
|
1375
|
+
a.set_attribute(r, "viewBox", `0 0 ${a.get(j).width} ${a.get(j).height}`), a.set_attribute(s, "x", a.get(j).plot.x), a.set_attribute(s, "y", a.get(j).plot.y), a.set_attribute(s, "width", a.get(t) - a.get(j).plot.x), a.set_attribute(s, "height", a.get(j).plot.h), a.set_attribute(c, "x", a.get(t) + a.get(n)), a.set_attribute(c, "y", a.get(j).plot.y), a.set_attribute(c, "width", a.get(j).plot.x + a.get(j).plot.w - (a.get(t) + a.get(n))), a.set_attribute(c, "height", a.get(j).plot.h), a.set_attribute(l, "x", a.get(t)), a.set_attribute(l, "y", a.get(j).plot.y), a.set_attribute(l, "width", a.get(n)), a.set_attribute(l, "height", a.get(j).plot.h), a.set_attribute(u, "x", a.get(t) - 4), a.set_attribute(u, "y", a.get(j).plot.y), a.set_attribute(u, "height", a.get(j).plot.h), a.set_attribute(d, "x", a.get(t) + a.get(n) - 4), a.set_attribute(d, "y", a.get(j).plot.y), a.set_attribute(d, "height", a.get(j).plot.h);
|
|
1376
|
+
}), a.delegated("pointermove", r, on), a.delegated("pointerdown", l, (e) => an(e, "move")), a.delegated("pointerup", l, P), a.event("pointercancel", l, P), a.delegated("pointerdown", u, (e) => an(e, "left")), a.delegated("pointerup", u, P), a.event("pointercancel", u, P), a.delegated("pointerdown", d, (e) => an(e, "right")), a.delegated("pointerup", d, P), a.event("pointercancel", d, P), a.append(e, r);
|
|
1377
|
+
};
|
|
1378
|
+
a.if(Br, (e) => {
|
|
1379
|
+
a.get(tn) && a.get(j) && e(Vr);
|
|
1380
|
+
});
|
|
1381
|
+
var Hr = a.sibling(Br, 2), Ur = (e) => {
|
|
1382
|
+
var t = yt();
|
|
1383
|
+
a.append(e, t);
|
|
1384
|
+
};
|
|
1385
|
+
a.if(Hr, (e) => {
|
|
1386
|
+
a.get(En) && e(Ur);
|
|
1387
|
+
});
|
|
1388
|
+
var Wr = a.sibling(Hr, 2), Gr = (e) => {
|
|
1389
|
+
var t = Ct();
|
|
1390
|
+
let n;
|
|
1391
|
+
var r = a.child(t), i = a.child(r, !0);
|
|
1392
|
+
a.reset(r);
|
|
1393
|
+
var o = a.sibling(r, 2);
|
|
1394
|
+
a.each(o, 17, () => a.get(K).rows, a.index, (e, t) => {
|
|
1395
|
+
var n = St(), r = a.child(n), i = (e) => {
|
|
1396
|
+
var n = bt();
|
|
1397
|
+
a.template_effect(() => a.set_style(n, `background:${a.get(t).color}`)), a.append(e, n);
|
|
1398
|
+
};
|
|
1399
|
+
a.if(r, (e) => {
|
|
1400
|
+
a.get(t).color && e(i);
|
|
1401
|
+
});
|
|
1402
|
+
var o = a.sibling(r, 2), s = (e) => {
|
|
1403
|
+
var n = xt(), r = a.child(n, !0);
|
|
1404
|
+
a.reset(n), a.template_effect(() => a.set_text(r, a.get(t).label)), a.append(e, n);
|
|
1405
|
+
};
|
|
1406
|
+
a.if(o, (e) => {
|
|
1407
|
+
a.get(t).label && e(s);
|
|
1408
|
+
});
|
|
1409
|
+
var c = a.sibling(o, 2), l = a.child(c, !0);
|
|
1410
|
+
a.reset(c), a.reset(n), a.template_effect(() => a.set_text(l, a.get(t).value)), a.append(e, n);
|
|
1411
|
+
}), a.reset(t), a.template_effect(() => {
|
|
1412
|
+
n = a.set_class(t, 1, "sv-grid-chart-tooltip svelte-hyytey", null, n, { "is-below": a.get(K).below }), a.set_style(t, `left:${a.get(K).left}px; top:${a.get(K).top}px;`), a.set_text(i, a.get(K).title);
|
|
1413
|
+
}), a.append(e, t);
|
|
1414
|
+
};
|
|
1415
|
+
a.if(Wr, (e) => {
|
|
1416
|
+
a.get(K) && e(Gr);
|
|
1417
|
+
});
|
|
1418
|
+
var Kr = a.sibling(Wr, 2), qr = (e) => {
|
|
1419
|
+
var t = Et(), n = a.child(t);
|
|
1420
|
+
a.each(n, 17, () => a.get(Tn), (e) => e.label, (e, t) => {
|
|
1421
|
+
var n = wt();
|
|
1422
|
+
let r;
|
|
1423
|
+
var i = a.child(n), o = a.sibling(i);
|
|
1424
|
+
a.reset(n), a.template_effect(() => {
|
|
1425
|
+
r = a.set_class(n, 1, "sv-grid-chart-legend-item svelte-hyytey", null, r, {
|
|
1426
|
+
"is-off": a.get(t).off,
|
|
1427
|
+
"is-isolated": a.get(S) === a.get(t).label
|
|
1428
|
+
}), n.disabled = !_(), a.set_attribute(n, "aria-pressed", !a.get(t).off), a.set_attribute(n, "title", _() ? `${a.get(t).off ? "Show" : "Hide"} ${a.get(t).label} · double-click to isolate` : a.get(t).label), a.set_style(i, `background:${a.get(t).off ? "transparent" : a.get(t).color}; border-color:${a.get(t).color}`), a.set_text(o, ` ${a.get(t).label ?? ""}`);
|
|
1429
|
+
}), a.delegated("click", n, () => Dn(a.get(t).label)), a.delegated("dblclick", n, () => On(a.get(t).label)), a.event("pointerenter", n, () => _() && a.set(Bt, a.get(t).label, !0)), a.event("pointerleave", n, () => a.set(Bt, null)), a.append(e, n);
|
|
1430
|
+
});
|
|
1431
|
+
var r = a.sibling(n, 2), i = (e) => {
|
|
1432
|
+
var t = Tt(), n = a.child(t, !0);
|
|
1433
|
+
a.reset(t), a.template_effect(() => a.set_text(n, a.get(Cn) ? "Show less" : `+${a.get(H).length - 10} more`)), a.delegated("click", t, () => a.set(Cn, !a.get(Cn))), a.append(e, t);
|
|
1434
|
+
};
|
|
1435
|
+
a.if(r, (e) => {
|
|
1436
|
+
a.get(wn) && e(i);
|
|
1437
|
+
}), a.reset(t), a.append(e, t);
|
|
1438
|
+
};
|
|
1439
|
+
a.if(Kr, (e) => {
|
|
1440
|
+
Nt() && a.get(H).length && e(qr);
|
|
1441
|
+
});
|
|
1442
|
+
var Jr = a.sibling(Kr, 2), Yr = a.child(Jr), Xr = a.child(Yr), Zr = a.sibling(Xr), Qr = (e) => {
|
|
1443
|
+
var t = a.text();
|
|
1444
|
+
a.template_effect(() => a.set_text(t, `, first 1000 of ${a.get(U).rows.length ?? ""} rows`)), a.append(e, t);
|
|
1445
|
+
};
|
|
1446
|
+
a.if(Zr, (e) => {
|
|
1447
|
+
a.get(kn) && e(Qr);
|
|
1448
|
+
}), a.reset(Yr);
|
|
1449
|
+
var $r = a.sibling(Yr), ei = a.child($r);
|
|
1450
|
+
a.each(ei, 20, () => a.get(U).cols, (e) => e, (e, t) => {
|
|
1451
|
+
var n = Dt(), r = a.child(n, !0);
|
|
1452
|
+
a.reset(n), a.template_effect(() => a.set_text(r, t)), a.append(e, n);
|
|
1453
|
+
}), a.reset(ei), a.reset($r);
|
|
1454
|
+
var ti = a.sibling($r);
|
|
1455
|
+
a.each(ti, 21, () => a.get(An), a.index, (e, t) => {
|
|
1456
|
+
var n = kt();
|
|
1457
|
+
a.each(n, 21, () => a.get(t), a.index, (e, t) => {
|
|
1458
|
+
var n = Ot(), r = a.child(n, !0);
|
|
1459
|
+
a.reset(n), a.template_effect(() => a.set_text(r, a.get(t))), a.append(e, n);
|
|
1460
|
+
}), a.reset(n), a.append(e, n);
|
|
1461
|
+
}), a.reset(ti), a.reset(Jr), a.reset(Jn), a.bind_this(Jn, (e) => a.set(G, e), () => a.get(G)), a.template_effect(() => {
|
|
1462
|
+
Zn = a.set_class($, 0, "sv-grid-chart-svg svelte-hyytey", null, Zn, {
|
|
1463
|
+
"is-interactive": _(),
|
|
1464
|
+
"is-clickable": !!g.onSelect || !!g.onDrill,
|
|
1465
|
+
"is-zoomable": Pt() && a.get(L) && !a.get(y),
|
|
1466
|
+
"is-annotating": a.get(y),
|
|
1467
|
+
"is-dragging": !!a.get(O)
|
|
1468
|
+
}), a.set_attribute($, "viewBox", `0 0 ${a.get(I).width} ${a.get(I).height}`), a.set_attribute($, "aria-label", `${g.spec.type} chart`), a.set_attribute($, "aria-describedby", `${w}-table`), a.set_attribute(Jr, "id", `${w}-table`), a.set_text(Xr, `${g.spec.type ?? ""} chart data`);
|
|
1469
|
+
}), a.delegated("pointerdown", $, Yt), a.delegated("pointermove", $, Xt), a.delegated("pointerup", $, Zt), a.event("pointercancel", $, Zt), a.delegated("dblclick", $, Qt), a.append(Mt, Jn), a.pop();
|
|
1470
|
+
}
|
|
1471
|
+
a.delegate([
|
|
1472
|
+
"click",
|
|
1473
|
+
"pointerdown",
|
|
1474
|
+
"pointermove",
|
|
1475
|
+
"pointerup",
|
|
1476
|
+
"dblclick",
|
|
1477
|
+
"mousemove",
|
|
1478
|
+
"keydown"
|
|
1479
|
+
]);
|
|
1480
|
+
//#endregion
|
|
1481
|
+
export { Mt as t };
|