@bino-bi/bn-template-engine 1.0.0-next.28 → 1.0.0-next.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
- package/dist/bn-template-engine/p-132ad556.entry.js +1 -0
- package/dist/bn-template-engine/p-17d71782.entry.js +1 -0
- package/dist/bn-template-engine/p-40ba7f43.entry.js +1 -0
- package/dist/bn-template-engine/p-467871f3.entry.js +1 -0
- package/dist/bn-template-engine/p-64803a42.entry.js +1 -0
- package/dist/bn-template-engine/p-B8AjeKja.js +1 -0
- package/dist/bn-template-engine/p-CCZcKl0Q.js +2 -0
- package/dist/bn-template-engine/p-CrT83eO4.js +1 -0
- package/dist/bn-template-engine/p-D_DzKxRV.js +1 -0
- package/dist/bn-template-engine/p-Z2rUaSh_.js +1 -0
- package/dist/bn-template-engine/p-c41c0a1b.entry.js +1 -0
- package/dist/bn-template-engine/p-yc69rwuH.js +1 -0
- package/dist/cjs/{bn-asset_28.cjs.entry.js → bn-annotation-layer_30.cjs.entry.js} +27566 -26774
- package/dist/cjs/bn-grid.cjs.entry.js +11 -63
- package/dist/cjs/bn-image.cjs.entry.js +5 -6
- package/dist/cjs/bn-internationalization.cjs.entry.js +11 -7
- package/dist/cjs/bn-ruleset.cjs.entry.js +7 -8
- package/dist/cjs/bn-template-engine.cjs.js +2 -2
- package/dist/cjs/bn-text.cjs.entry.js +18 -18
- package/dist/cjs/{diagnostics-Cq-qDtXq.js → diagnostics-C4Ggts3w.js} +50 -2
- package/dist/cjs/{index-C1Z9vO7z.js → index-DGis1BzT.js} +0 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{withBodyObserver-CaPUjuC5.js → withBodyObserver-BK4idxqG.js} +2 -2
- package/dist/cjs/{context-protocol-C0rKepqu.js → withHasError-CqvcS23z.js} +462 -14
- package/dist/cjs/{withStyled-vSfogp9J.js → withStyled-70D4Isgt.js} +22 -35
- package/dist/cjs/{sanitizeHtml-Yx1xn6i_.js → withTranslation-C6Pye2CM.js} +148 -129
- package/dist/collection/collection-manifest.json +11 -11
- package/dist/collection/components/bn-annotation-layer/bn-annotation-layer.css +24 -0
- package/dist/collection/components/bn-annotation-layer/bn-annotation-layer.js +430 -0
- package/dist/collection/components/bn-annotation-layer/utils/marks.js +161 -0
- package/dist/collection/components/bn-annotation-layer/utils/matchPoint.js +25 -0
- package/dist/collection/components/bn-annotation-list/bn-annotation-list.css +46 -0
- package/dist/collection/components/bn-annotation-list/bn-annotation-list.js +112 -0
- package/dist/collection/components/bn-asset/bn-asset.js +1 -1
- package/dist/collection/components/bn-body/bn-body.js +24 -1
- package/dist/collection/components/bn-card/bn-card.js +24 -1
- package/dist/collection/components/bn-chart-bubble/{ibcs-chart-bubble.js → bn-chart-bubble-renderer/bn-chart-bubble-renderer.js} +153 -59
- package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.js +70 -13
- package/dist/collection/components/bn-chart-bubble/utils/BubbleChart.js +29 -21
- package/dist/collection/components/bn-chart-bullet/{ibcs-chart-bullet.js → bn-chart-bullet-renderer/bn-chart-bullet-renderer.js} +127 -53
- package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.js +83 -20
- package/dist/collection/components/bn-chart-bullet/utils/BulletChart.js +26 -17
- package/dist/collection/components/bn-chart-bullet/utils/model/BulletChartStyle.js +4 -4
- package/dist/collection/components/bn-chart-scatter/{ibcs-chart-scatter.js → bn-chart-scatter-renderer/bn-chart-scatter-renderer.js} +132 -53
- package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.js +69 -12
- package/dist/collection/components/bn-chart-scatter/utils/ScatterChart.js +26 -14
- package/dist/collection/components/bn-chart-structure/{ibcs-chart-structure.js → bn-chart-structure-renderer/bn-chart-structure-renderer.js} +159 -66
- package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +115 -95
- package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +44 -15
- package/dist/collection/components/bn-chart-structure/utils/elements/Axis.js +1 -1
- package/dist/collection/components/bn-chart-structure/utils/elements/Bar.js +6 -2
- package/dist/collection/components/bn-chart-structure/utils/elements/Label.js +11 -0
- package/dist/collection/components/bn-chart-structure/utils/elements/Marker.js +5 -1
- package/dist/collection/components/bn-chart-structure/utils/elements/Needle.js +4 -1
- package/dist/collection/components/bn-chart-structure/utils/elements/StackedBar.js +6 -2
- package/dist/collection/components/bn-chart-time/{ibcs-chart-time.js → bn-chart-time-renderer/bn-chart-time-renderer.js} +188 -150
- package/dist/collection/components/bn-chart-time/bn-chart-time.js +140 -405
- package/dist/collection/components/bn-chart-time/utils/TimeChart.js +55 -15
- package/dist/collection/components/bn-chart-time/utils/elements/Column.js +5 -1
- package/dist/collection/components/bn-chart-time/utils/elements/Label.js +14 -0
- package/dist/collection/components/bn-chart-time/utils/elements/LineSeries.js +18 -12
- package/dist/collection/components/bn-chart-time/utils/elements/Marker.js +5 -1
- package/dist/collection/components/bn-chart-time/utils/elements/Needle.js +4 -1
- package/dist/collection/components/bn-chart-time/utils/elements/StackedColumn.js +6 -2
- package/dist/collection/components/bn-chart-time/utils/factories/ScenarioFactory.js +2 -2
- package/dist/collection/components/bn-chart-time/utils/model/TimeChartComponentConfig.js +2 -18
- package/dist/collection/components/bn-component-style/bn-component-style.js +3 -3
- package/dist/collection/components/bn-context/bn-context.js +24 -5
- package/dist/collection/components/bn-dataset/bn-dataset.js +8 -8
- package/dist/collection/components/bn-datasource/bn-datasource.js +8 -8
- package/dist/collection/components/bn-footer/bn-footer.css +1 -15
- package/dist/collection/components/bn-footer/bn-footer.js +17 -34
- package/dist/collection/components/bn-grid/bn-grid.js +38 -71
- package/dist/collection/components/bn-image/bn-image.js +21 -2
- package/dist/collection/components/bn-internationalization/bn-internationalization.js +7 -1
- package/dist/collection/components/bn-layout-card/bn-layout-card.js +3 -32
- package/dist/collection/components/bn-layout-page/bn-layout-page.js +3 -32
- package/dist/collection/components/bn-message/bn-message.js +20 -2
- package/dist/collection/components/bn-page/bn-page.js +22 -3
- package/dist/collection/components/bn-ruleset/bn-ruleset.js +3 -3
- package/dist/collection/components/bn-scaling-group/bn-scaling-group.js +9 -9
- package/dist/collection/components/bn-table/{ibcs-table.js → bn-table-renderer/bn-table-renderer.js} +230 -83
- package/dist/collection/components/bn-table/bn-table.js +134 -157
- package/dist/collection/components/bn-table/utils/Table.js +3 -3
- package/dist/collection/components/bn-table/utils/elements/TableRow.js +1 -1
- package/dist/collection/components/bn-table/utils/factories/tableDataSetFactory.js +38 -4
- package/dist/collection/components/bn-table/utils/helper/DataQuery.js +3 -1
- package/dist/collection/components/bn-table/utils/helper/barColumnGeometry.js +2 -2
- package/dist/collection/components/bn-text/bn-text.js +66 -8
- package/dist/collection/components/bn-title/{ibcs-title/ibcs-title.js → bn-title-renderer/bn-title-renderer.js} +59 -83
- package/dist/collection/components/bn-title/{ibcs-title → bn-title-renderer}/utils/Title.js +2 -2
- package/dist/collection/components/bn-title/{ibcs-title → bn-title-renderer}/utils/factories/TitleDataSetFactory.js +1 -1
- package/dist/collection/components/bn-title/bn-title.js +58 -14
- package/dist/collection/components/bn-tree/bn-tree.js +30 -28
- package/dist/collection/index.js +0 -1
- package/dist/collection/schemas.js +1 -0
- package/dist/collection/stores/componentStyles.js +10 -6
- package/dist/collection/stores/createScopedStores.js +3 -1
- package/dist/collection/stores/internationalization.js +10 -6
- package/dist/collection/utils/annotations.js +66 -0
- package/dist/collection/utils/autoFit.js +2 -2
- package/dist/collection/utils/emptyState.js +1 -1
- package/dist/collection/utils/ibcsRuleSet.js +42 -0
- package/dist/collection/utils/layoutState/dataPoint.js +59 -0
- package/dist/collection/utils/layoutState/geometry.js +46 -0
- package/dist/collection/utils/layoutState/index.js +1 -0
- package/dist/collection/utils/layoutState/svgChartElements.js +113 -11
- package/dist/collection/utils/layoutTemplate.js +0 -2
- package/dist/collection/utils/scaling.js +9 -0
- package/dist/collection/utils/validate.js +0 -7
- package/dist/collection/utils/withComponentStyle.js +14 -18
- package/dist/collection/utils/withDataset.js +22 -11
- package/dist/collection/utils/withHasError.js +17 -2
- package/dist/collection/utils/withRuleSet.js +7 -7
- package/dist/collection/utils/withTranslation.js +14 -14
- package/dist/collection/utils/xy/XYFrame.js +13 -3
- package/dist/collection/utils/xy/model/ScaleFactorsXYChart.js +8 -9
- package/dist/collection/utils/xy/pointKey.js +10 -0
- package/dist/components/{ibcs-chart-bullet.d.ts → bn-annotation-layer.d.ts} +4 -4
- package/dist/components/bn-annotation-layer.js +1 -0
- package/dist/components/{ibcs-chart-scatter.d.ts → bn-annotation-list.d.ts} +4 -4
- package/dist/components/bn-annotation-list.js +1 -0
- package/dist/components/bn-asset.js +1 -1
- package/dist/components/bn-body.js +1 -1
- package/dist/components/bn-card.js +1 -1
- package/dist/components/bn-chart-bubble-renderer.d.ts +11 -0
- package/dist/components/bn-chart-bubble-renderer.js +1 -0
- package/dist/components/bn-chart-bubble.js +1 -1
- package/dist/components/bn-chart-bullet-renderer.d.ts +11 -0
- package/dist/components/bn-chart-bullet-renderer.js +1 -0
- package/dist/components/bn-chart-bullet.js +1 -1
- package/dist/components/bn-chart-scatter-renderer.d.ts +11 -0
- package/dist/components/bn-chart-scatter-renderer.js +1 -0
- package/dist/components/bn-chart-scatter.js +1 -1
- package/dist/components/bn-chart-structure-renderer.d.ts +11 -0
- package/dist/components/bn-chart-structure-renderer.js +1 -0
- package/dist/components/bn-chart-structure.js +1 -1
- package/dist/components/{bn-template.d.ts → bn-chart-time-renderer.d.ts} +4 -4
- package/dist/components/bn-chart-time-renderer.js +1 -0
- package/dist/components/bn-chart-time.js +1 -1
- package/dist/components/bn-component-style.js +1 -1
- package/dist/components/bn-context.js +1 -1
- package/dist/components/bn-dataset.js +1 -1
- package/dist/components/bn-datasource.js +1 -1
- package/dist/components/bn-footer.js +1 -1
- package/dist/components/bn-grid.js +1 -1
- package/dist/components/bn-image.js +1 -1
- package/dist/components/bn-internationalization.js +1 -1
- package/dist/components/bn-layout-card.js +1 -1
- package/dist/components/bn-layout-page.js +1 -1
- package/dist/components/bn-message.js +1 -1
- package/dist/components/bn-page.js +1 -1
- package/dist/components/bn-ruleset.js +1 -1
- package/dist/components/bn-scaling-group.js +1 -1
- package/dist/components/{ibcs-chart-bubble.d.ts → bn-table-renderer.d.ts} +4 -4
- package/dist/components/bn-table-renderer.js +1 -0
- package/dist/components/bn-table.js +1 -1
- package/dist/components/bn-text.js +1 -1
- package/dist/components/{editor-companion.d.ts → bn-title-renderer.d.ts} +4 -4
- package/dist/components/bn-title-renderer.js +1 -0
- package/dist/components/bn-title.js +1 -1
- package/dist/components/bn-tree.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-B1nL0yOa.js +1 -0
- package/dist/components/p-B7uwck1J.js +1 -0
- package/dist/components/p-BDS_jiow.js +1 -0
- package/dist/components/p-BIIDTtcR.js +1 -0
- package/dist/components/p-BQMKgvEC.js +1 -0
- package/dist/components/p-BSV_vyqs.js +1 -0
- package/dist/components/p-BVKLCz2k.js +1 -0
- package/dist/components/p-BWBHlztH.js +1 -0
- package/dist/components/p-BXrPfAvP.js +1 -0
- package/dist/components/p-Ba9PUiBp.js +1 -0
- package/dist/components/p-BpCL2bfw.js +1 -0
- package/dist/components/p-BpsXOtoW.js +1 -0
- package/dist/components/p-Bs-YxJEt.js +1 -0
- package/dist/components/p-CGI6XIaK.js +1 -0
- package/dist/components/p-CMM8vtHW.js +1 -0
- package/dist/components/p-COqIkH1M.js +1 -0
- package/dist/components/p-CYwd_ZNM.js +1 -0
- package/dist/components/p-CkW23yp2.js +1 -0
- package/dist/components/p-CtBM3KFY.js +1 -0
- package/dist/{bn-template-engine/p-DFmSrSnf.js → components/p-CurWSJkH.js} +1 -1
- package/dist/components/p-CxPSvrcF.js +1 -0
- package/dist/components/p-D2Epww9R.js +1 -0
- package/dist/components/p-D5-dYgK_.js +1 -0
- package/dist/components/p-D6YGOYV1.js +2 -0
- package/dist/components/p-DEHnizot.js +1 -0
- package/dist/components/p-DIyUaSBg.js +1 -0
- package/dist/components/p-DPLcGhVt.js +1 -0
- package/dist/components/p-DUHp_9X-.js +1 -0
- package/dist/components/p-DYG9FH_u.js +1 -0
- package/dist/components/p-DdGnuNtc.js +1 -0
- package/dist/components/p-Dlb4ncGF.js +1 -0
- package/dist/components/p-Dm55bMs2.js +1 -0
- package/dist/components/p-Dq1AzGKX.js +1 -0
- package/dist/components/p-Dq4KMCDU.js +1 -0
- package/dist/components/p-DsOaqeTN.js +1 -0
- package/dist/components/p-Ds_BSK8v.js +1 -0
- package/dist/components/p-LZ9lAY8T.js +1 -0
- package/dist/components/p-U3zkcEJZ.js +1 -0
- package/dist/components/p-WzaayhTX.js +1 -0
- package/dist/components/p-X9hpquOX.js +1 -0
- package/dist/components/p-Xb6Ilq8u.js +1 -0
- package/dist/components/p-ey23VlID.js +1 -0
- package/dist/components/p-jbp6YiHf.js +1 -0
- package/dist/components/p-oJjMz8JF.js +1 -0
- package/dist/components/p-xhiPDAZa.js +1 -0
- package/dist/components/p-xpguaboj.js +1 -0
- package/dist/esm/{bn-asset_28.entry.js → bn-annotation-layer_30.entry.js} +24689 -23899
- package/dist/esm/bn-grid.entry.js +11 -63
- package/dist/esm/bn-image.entry.js +4 -5
- package/dist/esm/bn-internationalization.entry.js +9 -5
- package/dist/esm/bn-ruleset.entry.js +6 -7
- package/dist/esm/bn-template-engine.js +3 -3
- package/dist/esm/bn-text.entry.js +12 -12
- package/dist/esm/{diagnostics-vw6TKMiT.js → diagnostics-Cyqy1zDT.js} +48 -2
- package/dist/esm/{index-C5UYpZUU.js → index-CCZcKl0Q.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{withBodyObserver-DD_-r04o.js → withBodyObserver-JcRB9OPQ.js} +2 -2
- package/dist/esm/{context-protocol-CdTp19uA.js → withHasError-l3cMN-oP.js} +458 -14
- package/dist/esm/{withStyled-BDEyKd_H.js → withStyled-DGOiR00Q.js} +17 -29
- package/dist/esm/{sanitizeHtml-C5bFtARM.js → withTranslation-BpO8BC5B.js} +144 -126
- package/dist/schemas/axis.schema.json +52 -0
- package/dist/schemas/i18n.schema.json +31 -0
- package/dist/schemas/partof.schema.json +33 -0
- package/dist/schemas/ruleset.schema.json +59 -0
- package/dist/schemas/stack.schema.json +51 -0
- package/dist/schemas/theme.schema.json +604 -0
- package/dist/schemas/thereof.schema.json +34 -0
- package/dist/types/components/bn-annotation-layer/bn-annotation-layer.d.ts +81 -0
- package/dist/types/components/bn-annotation-layer/utils/marks.d.ts +69 -0
- package/dist/types/components/bn-annotation-layer/utils/matchPoint.d.ts +17 -0
- package/dist/types/components/bn-annotation-list/bn-annotation-list.d.ts +35 -0
- package/dist/types/components/bn-body/bn-body.d.ts +5 -0
- package/dist/types/components/bn-card/bn-card.d.ts +5 -0
- package/dist/types/components/bn-chart-bubble/bn-chart-bubble-renderer/bn-chart-bubble-renderer.d.ts +97 -0
- package/dist/types/components/bn-chart-bubble/bn-chart-bubble.d.ts +20 -2
- package/dist/types/components/bn-chart-bullet/bn-chart-bullet-renderer/bn-chart-bullet-renderer.d.ts +81 -0
- package/dist/types/components/bn-chart-bullet/bn-chart-bullet.d.ts +21 -3
- package/dist/types/components/bn-chart-bullet/utils/BulletChart.d.ts +2 -0
- package/dist/types/components/bn-chart-bullet/utils/model/BulletChartStyle.d.ts +2 -2
- package/dist/types/components/bn-chart-scatter/bn-chart-scatter-renderer/bn-chart-scatter-renderer.d.ts +85 -0
- package/dist/types/components/bn-chart-scatter/bn-chart-scatter.d.ts +20 -2
- package/dist/types/components/bn-chart-structure/{ibcs-chart-structure.d.ts → bn-chart-structure-renderer/bn-chart-structure-renderer.d.ts} +43 -13
- package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +29 -17
- package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +7 -0
- package/dist/types/components/bn-chart-structure/utils/elements/Label.d.ts +5 -0
- package/dist/types/components/bn-chart-structure/utils/elements/Marker.d.ts +1 -0
- package/dist/types/components/bn-chart-structure/utils/elements/StackedBar.d.ts +2 -1
- package/dist/types/components/bn-chart-structure/utils/model/DataPoint.d.ts +3 -0
- package/dist/types/components/bn-chart-time/{ibcs-chart-time.d.ts → bn-chart-time-renderer/bn-chart-time-renderer.d.ts} +50 -17
- package/dist/types/components/bn-chart-time/bn-chart-time.d.ts +36 -66
- package/dist/types/components/bn-chart-time/utils/TimeChart.d.ts +7 -0
- package/dist/types/components/bn-chart-time/utils/elements/Label.d.ts +5 -0
- package/dist/types/components/bn-chart-time/utils/elements/LineSeries.d.ts +5 -1
- package/dist/types/components/bn-chart-time/utils/elements/Marker.d.ts +1 -0
- package/dist/types/components/bn-chart-time/utils/elements/StackedColumn.d.ts +2 -1
- package/dist/types/components/bn-chart-time/utils/factories/ScenarioFactory.d.ts +1 -1
- package/dist/types/components/bn-chart-time/utils/model/DataPoint.d.ts +3 -0
- package/dist/types/components/bn-chart-time/utils/model/TimeChartComponentConfig.d.ts +2 -8
- package/dist/types/components/bn-context/bn-context.d.ts +7 -1
- package/dist/types/components/bn-dataset/bn-dataset.d.ts +2 -2
- package/dist/types/components/bn-datasource/bn-datasource.d.ts +2 -2
- package/dist/types/components/bn-footer/bn-footer.d.ts +5 -7
- package/dist/types/components/bn-grid/bn-grid.d.ts +8 -6
- package/dist/types/components/bn-image/bn-image.d.ts +4 -0
- package/dist/types/components/bn-layout-card/bn-layout-card.d.ts +0 -1
- package/dist/types/components/bn-layout-page/bn-layout-page.d.ts +0 -1
- package/dist/types/components/bn-message/bn-message.d.ts +5 -0
- package/dist/types/components/bn-page/bn-page.d.ts +5 -0
- package/dist/types/components/bn-table/{ibcs-table.d.ts → bn-table-renderer/bn-table-renderer.d.ts} +49 -12
- package/dist/types/components/bn-table/bn-table.d.ts +48 -49
- package/dist/types/components/bn-table/utils/elements/Cell.d.ts +2 -0
- package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +2 -1
- package/dist/types/components/bn-table/utils/elements/TableRow.d.ts +3 -0
- package/dist/types/components/bn-table/utils/factories/tableDataSetFactory.d.ts +9 -2
- package/dist/types/components/bn-text/bn-text.d.ts +19 -1
- package/dist/types/components/bn-title/{ibcs-title/ibcs-title.d.ts → bn-title-renderer/bn-title-renderer.d.ts} +15 -4
- package/dist/types/components/bn-title/bn-title.d.ts +15 -3
- package/dist/types/components/bn-tree/bn-tree.d.ts +6 -2
- package/dist/types/components.d.ts +2070 -2406
- package/dist/types/context/context-protocol.d.ts +2 -0
- package/dist/types/context/scopedDb.d.ts +9 -12
- package/dist/types/index.d.ts +0 -1
- package/dist/types/schemas.d.ts +50 -0
- package/dist/types/stores/componentStyles.d.ts +8 -0
- package/dist/types/stores/createScopedStores.d.ts +1 -0
- package/dist/types/stores/internationalization.d.ts +3 -2
- package/dist/types/stores/ruleSets.d.ts +15 -3
- package/dist/types/utils/annotations.d.ts +45 -0
- package/dist/types/utils/autoFit.d.ts +2 -2
- package/dist/types/utils/emptyState.d.ts +1 -1
- package/dist/types/utils/ibcsRuleSet.d.ts +16 -0
- package/dist/types/utils/layoutState/dataPoint.d.ts +13 -0
- package/dist/types/utils/layoutState/geometry.d.ts +12 -0
- package/dist/types/utils/layoutState/index.d.ts +1 -0
- package/dist/types/utils/layoutState/svgChartElements.d.ts +9 -6
- package/dist/types/utils/layoutState/types.d.ts +29 -0
- package/dist/types/utils/model/ChartStyles.d.ts +2 -1
- package/dist/types/utils/scaling.d.ts +2 -0
- package/dist/types/utils/validate.d.ts +0 -1
- package/dist/types/utils/withComponentStyle.d.ts +4 -4
- package/dist/types/utils/withDataset.d.ts +3 -3
- package/dist/types/utils/withHasError.d.ts +22 -1
- package/dist/types/utils/withRuleSet.d.ts +3 -2
- package/dist/types/utils/withTranslation.d.ts +1 -2
- package/dist/types/utils/xy/model/ScaleFactorsXYChart.d.ts +6 -7
- package/dist/types/utils/xy/pointKey.d.ts +9 -0
- package/package.json +24 -8
- package/readme.md +14 -8
- package/dist/bn-template-engine/assets/bar.png +0 -0
- package/dist/bn-template-engine/assets/matrix.png +0 -0
- package/dist/bn-template-engine/p-5075771a.entry.js +0 -1
- package/dist/bn-template-engine/p-5d516435.entry.js +0 -1
- package/dist/bn-template-engine/p-5e90e728.entry.js +0 -1
- package/dist/bn-template-engine/p-9ef7e132.entry.js +0 -1
- package/dist/bn-template-engine/p-9f7a1980.entry.js +0 -1
- package/dist/bn-template-engine/p-BeXgxHkW.js +0 -1
- package/dist/bn-template-engine/p-C5UYpZUU.js +0 -2
- package/dist/bn-template-engine/p-CH0bpt_k.js +0 -1
- package/dist/bn-template-engine/p-DI3efDSV.js +0 -1
- package/dist/bn-template-engine/p-DXLTTILG.js +0 -1
- package/dist/bn-template-engine/p-DtP4jqG5.js +0 -1
- package/dist/bn-template-engine/p-a8281b71.entry.js +0 -1
- package/dist/bn-template-engine/p-b31277e7.entry.js +0 -1
- package/dist/bn-template-engine/p-b396ac84.entry.js +0 -1
- package/dist/cjs/bn-template.cjs.entry.js +0 -18
- package/dist/cjs/editor-companion.cjs.entry.js +0 -56
- package/dist/cjs/withHasError-qGW_yqIv.js +0 -426
- package/dist/collection/components/bn-footer/assets/bar.png +0 -0
- package/dist/collection/components/bn-footer/assets/matrix.png +0 -0
- package/dist/collection/components/bn-message/assets/bar.png +0 -0
- package/dist/collection/components/bn-message/assets/matrix.png +0 -0
- package/dist/collection/components/bn-template/bn-template.js +0 -38
- package/dist/collection/components/editor-companion/editor-companion.css +0 -3
- package/dist/collection/components/editor-companion/editor-companion.js +0 -137
- package/dist/collection/utils/templateId.js +0 -12
- package/dist/collection/utils/testing/fakeGroup.js +0 -21
- package/dist/collection/utils/testing/hostFont.js +0 -20
- package/dist/collection/utils/testing/mutationObserver.js +0 -44
- package/dist/collection/utils/testing/structureChart.js +0 -26
- package/dist/collection/utils/testing/timeChart.js +0 -28
- package/dist/components/AxisConfig.js +0 -1
- package/dist/components/CompareUtil.js +0 -1
- package/dist/components/DataFormatDigits.js +0 -1
- package/dist/components/DateStringFactory.js +0 -1
- package/dist/components/LabelCollisionManager.js +0 -1
- package/dist/components/Order.js +0 -1
- package/dist/components/SVGStyle.js +0 -1
- package/dist/components/SVGVariancesStyleGroup.js +0 -1
- package/dist/components/StringAdapter.js +0 -1
- package/dist/components/VarianceMeasure.js +0 -1
- package/dist/components/XYChartDataRow.js +0 -1
- package/dist/components/bn-body2.js +0 -1
- package/dist/components/bn-card2.js +0 -1
- package/dist/components/bn-footer2.js +0 -1
- package/dist/components/bn-message2.js +0 -1
- package/dist/components/bn-page2.js +0 -1
- package/dist/components/bn-template.js +0 -1
- package/dist/components/bn-title2.js +0 -1
- package/dist/components/checkXYOverflow.js +0 -1
- package/dist/components/contentDecoder.js +0 -1
- package/dist/components/context-protocol.js +0 -1
- package/dist/components/editor-companion.js +0 -1
- package/dist/components/formatter.js +0 -1
- package/dist/components/geometry.js +0 -1
- package/dist/components/ibcs-chart-bubble.js +0 -1
- package/dist/components/ibcs-chart-bubble2.js +0 -1
- package/dist/components/ibcs-chart-bullet.js +0 -1
- package/dist/components/ibcs-chart-bullet2.js +0 -1
- package/dist/components/ibcs-chart-scatter.js +0 -1
- package/dist/components/ibcs-chart-scatter2.js +0 -1
- package/dist/components/ibcs-chart-structure.d.ts +0 -11
- package/dist/components/ibcs-chart-structure.js +0 -1
- package/dist/components/ibcs-chart-structure2.js +0 -1
- package/dist/components/ibcs-chart-time.d.ts +0 -11
- package/dist/components/ibcs-chart-time.js +0 -1
- package/dist/components/ibcs-chart-time2.js +0 -1
- package/dist/components/ibcs-table.d.ts +0 -11
- package/dist/components/ibcs-table.js +0 -1
- package/dist/components/ibcs-table2.js +0 -1
- package/dist/components/ibcs-title.d.ts +0 -11
- package/dist/components/ibcs-title.js +0 -1
- package/dist/components/ibcs-title2.js +0 -1
- package/dist/components/layoutTemplate.js +0 -1
- package/dist/components/luxon.js +0 -1
- package/dist/components/scaling.js +0 -1
- package/dist/components/svg.esm.js +0 -1
- package/dist/components/svgChartElements.js +0 -1
- package/dist/components/types.js +0 -1
- package/dist/components/validate.js +0 -1
- package/dist/components/withBodyObserver.js +0 -1
- package/dist/components/withComponentStatus.js +0 -1
- package/dist/components/withComponentStyle.js +0 -1
- package/dist/components/withDataset.js +0 -1
- package/dist/components/withHasError.js +0 -1
- package/dist/components/withRuleSet.js +0 -1
- package/dist/components/withScalingGroup.js +0 -1
- package/dist/components/withStyled.js +0 -1
- package/dist/components/withTranslation.js +0 -1
- package/dist/esm/bn-template.entry.js +0 -16
- package/dist/esm/editor-companion.entry.js +0 -54
- package/dist/esm/withHasError-73WV2SP5.js +0 -422
- package/dist/types/components/bn-chart-bubble/ibcs-chart-bubble.d.ts +0 -59
- package/dist/types/components/bn-chart-bullet/ibcs-chart-bullet.d.ts +0 -53
- package/dist/types/components/bn-chart-scatter/ibcs-chart-scatter.d.ts +0 -54
- package/dist/types/components/bn-template/bn-template.d.ts +0 -10
- package/dist/types/components/editor-companion/editor-companion.d.ts +0 -20
- package/dist/types/utils/templateId.d.ts +0 -9
- package/dist/types/utils/testing/fakeGroup.d.ts +0 -8
- package/dist/types/utils/testing/hostFont.d.ts +0 -16
- package/dist/types/utils/testing/mutationObserver.d.ts +0 -5
- package/dist/types/utils/testing/structureChart.d.ts +0 -5
- package/dist/types/utils/testing/timeChart.d.ts +0 -5
- /package/dist/collection/components/bn-chart-bubble/{ibcs-chart-bubble.css → bn-chart-bubble-renderer/bn-chart-bubble-renderer.css} +0 -0
- /package/dist/collection/components/bn-chart-bullet/{ibcs-chart-bullet.css → bn-chart-bullet-renderer/bn-chart-bullet-renderer.css} +0 -0
- /package/dist/collection/components/bn-chart-scatter/{ibcs-chart-scatter.css → bn-chart-scatter-renderer/bn-chart-scatter-renderer.css} +0 -0
- /package/dist/collection/components/bn-chart-time/{ibcs-chart-time.css → bn-chart-time-renderer/bn-chart-time-renderer.css} +0 -0
- /package/dist/collection/components/bn-table/{ibcs-table.css → bn-table-renderer/bn-table-renderer.css} +0 -0
- /package/dist/collection/components/bn-title/{ibcs-title/ibcs-title.css → bn-title-renderer/bn-title-renderer.css} +0 -0
- /package/dist/collection/components/bn-title/{ibcs-title → bn-title-renderer}/utils/factories/index.js +0 -0
- /package/dist/collection/components/bn-title/{ibcs-title → bn-title-renderer}/utils/model/MeasureEntriy.js +0 -0
- /package/dist/collection/components/bn-title/{ibcs-title → bn-title-renderer}/utils/model/TimePeriod.js +0 -0
- /package/dist/collection/components/bn-title/{ibcs-title → bn-title-renderer}/utils/model/TitleConfig.js +0 -0
- /package/dist/collection/components/bn-title/{ibcs-title → bn-title-renderer}/utils/model/index.js +0 -0
- /package/dist/components/{stackColors.js → p-4q8nRcWC.js} +0 -0
- /package/dist/components/{merge.js → p-B2NXsfMz.js} +0 -0
- /package/dist/components/{layoutObserver.js → p-B6kka9sT.js} +0 -0
- /package/dist/components/{NumericScale.js → p-BJmwHV0a.js} +0 -0
- /package/dist/components/{stackLayout.js → p-BTnRaHPb.js} +0 -0
- /package/dist/components/{emotion-hash.esm.js → p-BYBpC0EO.js} +0 -0
- /package/dist/components/{diagnostics.js → p-CckAR27O.js} +0 -0
- /package/dist/components/{SiPrefix.js → p-CeE4_3wQ.js} +0 -0
- /package/dist/components/{queryError.js → p-ClruFZD_.js} +0 -0
- /package/dist/components/{sanitizeHtml.js → p-CyUmrWfW.js} +0 -0
- /package/dist/components/{TableAttribute.js → p-DCPLGEs_.js} +0 -0
- /package/dist/components/{parentDimensions.js → p-DD1zlev_.js} +0 -0
- /package/dist/components/{pageFormats.js → p-DM7fwmH4.js} +0 -0
- /package/dist/components/{emptyState.js → p-DakXa7Dp.js} +0 -0
- /package/dist/components/{relativeVariance.js → p-fCjsrD7I.js} +0 -0
- /package/dist/types/components/bn-title/{ibcs-title → bn-title-renderer}/utils/Title.d.ts +0 -0
- /package/dist/types/components/bn-title/{ibcs-title → bn-title-renderer}/utils/factories/TitleDataSetFactory.d.ts +0 -0
- /package/dist/types/components/bn-title/{ibcs-title → bn-title-renderer}/utils/factories/index.d.ts +0 -0
- /package/dist/types/components/bn-title/{ibcs-title → bn-title-renderer}/utils/model/MeasureEntriy.d.ts +0 -0
- /package/dist/types/components/bn-title/{ibcs-title → bn-title-renderer}/utils/model/TimePeriod.d.ts +0 -0
- /package/dist/types/components/bn-title/{ibcs-title → bn-title-renderer}/utils/model/TitleConfig.d.ts +0 -0
- /package/dist/types/components/bn-title/{ibcs-title → bn-title-renderer}/utils/model/index.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,H as i,h as e,a as s,t as a}from"./p-D6YGOYV1.js";import{i as o}from"./p-DYG9FH_u.js";import{w as n}from"./p-DEHnizot.js";import{w as r}from"./p-jbp6YiHf.js";import{w as f}from"./p-CGI6XIaK.js";import{V as l,a as d,p as h}from"./p-DM7fwmH4.js";const m=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),n(this),this.errors=f(this),this.componentStyle=r(this)}validateFormat(t){const i="WARN_format";o(t)||l.includes(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:`format: invalid value '${t}' is not supported. Valid values: ${l.join(", ")}`})}validateOrientation(t){const i="WARN_orientation";o(t)||d.includes(t)?this.errors.remove(i):this.errors.addOrReplace({id:i,type:"warning",message:`orientation: invalid value '${t}' is not supported. Valid values: ${d.join(", ")}`})}componentWillLoad(){this.validateFormat(this.format),this.validateOrientation(this.orientation)}render(){return e(s,{key:"b2d1a2638c7bee2b2e134d5fedbac63fe38e9830",format:this.format,orientation:this.orientation,style:this.prepareStyle()},e("slot",{key:"4769d18000916a16ee9da8fb0c19b5d8b12393c0"}))}prepareStyle(){const t={"font-family":this.componentStyle((t=>t.global.fontFamily)),"font-size":`${this.componentStyle((t=>t.global.fontSizePx))}px`,"--bn-font-family":this.componentStyle((t=>t.global.fontFamily))||"'Noto Sans', sans-serif","--bn-font-size":`${this.componentStyle((t=>t.global.fontSizePx))||13.3333}px`,"--bn-font-color":this.componentStyle((t=>t.global.fontColor))||"#000000","--bn-font-background":this.componentStyle((t=>t.global.fontBackgroundColor))||"#ffffff"};if(l.includes(this.format)){const{width:i,height:e}=h(this.format,this.orientation);t.width=i,t.height=e}return t}get element(){return this}static get watchers(){return{format:[{validateFormat:0}],orientation:[{validateOrientation:0}]}}static get style(){return':host{background:var(--bn-font-background, white);color:var(--bn-font-color, black);font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);height:768px;width:1024px;display:flex;flex-direction:column;page-break-after:always;overflow:hidden}'}},[257,"bn-page",{selectedStyle:[513,"selected-style"],format:[1],orientation:[1]},void 0,{format:[{validateFormat:0}],orientation:[{validateOrientation:0}]}]);function p(){"undefined"!=typeof customElements&&["bn-page"].forEach((t=>{"bn-page"===t&&(customElements.get(a(t))||customElements.define(a(t),m))}))}export{m as P,p as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as t,c as s}from"./p-BVKLCz2k.js";import{r as a}from"./p-DEHnizot.js";import{g as e}from"./p-D6YGOYV1.js";const r="WARN_datasets",o=(o,n,c)=>{let i,d,f=[],p=[],u=[],m="";const g=()=>{const t=m;m=o.datasets||"",""!==t&&t!==m&&n("",[]),[u,p]=((t,s)=>{const a=[],e=[];for(const t of s)(r=t,r.startsWith("$")?a:e).push(t);var r;return[a,e]})(0,m.split(",")),((t,s)=>{const a=t.errors;if(a)if(s.length>0){const t=s.map((t=>t.substring(1))).join(", ");a.addOrReplace({id:r,type:"warning",message:`Using datasource(s) "${t}" directly. Prefer using a dataset (bn-dataset) for query support and metadata.`})}else a.remove(r)})(o,u),b()},l=(t,s)=>{const a=s?t.substring(1):t;let e;try{e=d.db.db.exec(`SELECT * FROM \`${a}\``)}catch(t){e=[]}n(t,e)},b=()=>{f.forEach((t=>t())),f=[],p.forEach((t=>{t&&(f.push(d.db.subscribe(t,(()=>l(t,!1)))),l(t,!1),(t=>{if(c){const s=d.datasetsMeta.get(t);s&&c(t,s)}})(t))})),u.forEach((t=>{t&&(f.push(d.db.subscribe(t.substring(1),(()=>l(t,!0)))),l(t,!0))}))},y=new MutationObserver((t=>{t.forEach((t=>{"datasets"===t.attributeName&&(o.datasets||"")!==m&&g()}))})),j=o.connectedCallback;o.connectedCallback=()=>{const s=e(o);d=t(s),g(),y.observe(s,{attributes:!0,attributeFilter:["datasets"]}),c&&(i=d.datasetsMeta.on("set",((t,s)=>{p.includes(t)&&c(t,s)}))),a(j,o)};const w=o.disconnectedCallback;return o.disconnectedCallback=()=>{y.disconnect(),f.forEach((t=>t())),f=[],a(i),s(e(o)),a(w,o)},t=>{p=t,b()}};export{o as w}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,H as i,h as s,a as h,t as e}from"./p-D6YGOYV1.js";import{S as n,F as r,a as o,P as a}from"./p-D5-dYgK_.js";import{C as l,A as c,g as u,e as d}from"./p-BQMKgvEC.js";import{D as f,b as v}from"./p-Dlb4ncGF.js";import{c as p,O as g,a as b}from"./p-CxPSvrcF.js";import{S as m}from"./p-CeE4_3wQ.js";import{F as w,I as P,C as y,a as S,V as x,s as L}from"./p-xpguaboj.js";import{g as k,a as M,I as C}from"./p-4q8nRcWC.js";import{d as T,l as O,S as $}from"./p-COqIkH1M.js";import{N as A,r as N}from"./p-fCjsrD7I.js";import{s as _,c as E,a as W,l as D,b as R,d as j,M as B}from"./p-BTnRaHPb.js";import{d as Y,g as V}from"./p-BVKLCz2k.js";import{e as X,r as F}from"./p-ClruFZD_.js";import{S as z}from"./p-oJjMz8JF.js";import{w as H}from"./p-DEHnizot.js";import{S as G}from"./p-CtBM3KFY.js";import{A as U}from"./p-CMM8vtHW.js";class I{constructor(t,i,s,h,e,n,r,o,a=!1){this.categoryPosition={x:0,y:0},this.spacings={scenarioOffset:0,markerOffset:0,scenarioLabelToBar:0,labelToBar:0,labelToAxis:0,needleWidth:0,needleHeadWidth:0,barWidth:0,varianceAxisLineWidth:0,axisLineWidth:0,auxiliaryLineWidth:0,scenarioLineWidth:0,markerWidth:0,categoryWidth:0,axisTickLength:0},this.categoriesBoxOffset={width:0,height:0},this.padding=t,this.scaleFactors=i,this.fontSize=s,this.axisPosition={x:0,y:0},this.numberOfColumns=h,this.leftSideLengthSync=e,this.topSideLabelHeight=n>0?this.fontSize:0,this.hasStackedHeaders=a,this.leftSideLabelLength=this.calculateSideLabelLength(n,r,o),this.calculateSpacings(),this.calculateCategoryPosition(),this.calculateAxisPosition()}getBarPositionX(){return this.axisPosition.x}getBarCenterPositionY(t){return this.categoryPosition.y+this.spacings.scenarioOffset+t*this.spacings.categoryWidth}getBarPositionY(t,i){return i?this.getBarCenterPositionY(t):this.getBarCenterPositionY(t)-this.spacings.scenarioOffset}getCategoryPositionX(t){let i=this.spacings.labelToAxis;return t&&(i=-this.spacings.labelToAxis),this.getAxisPositionX()+i}getAxisTitlePositionX(){return this.axisPosition.x}getAxisTitlePositionY(){return this.axisPosition.y-this.spacings.labelToAxis-this.getTopLabelOverhang()}getStackedHeaderPositionY(){return this.getBarCenterPositionY(0)-.5*this.spacings.barWidth-this.spacings.scenarioLabelToBar}getNeedleWidth(){return this.spacings.needleWidth}getAxisPositionX(){return this.leftSideLabelLength+this.padding.left+this.spacings.labelToAxis}getAxisPositionY(){return this.padding.top+this.getAxisTitleOffset()}loadCategoriesBox(t){this.categoriesBoxOffset=t,this.calculateAxisPosition()}addOffsetByNegativeDataPoints(t,i,s,h){null!=t&&null!=t.value&&t.value<0&&(s&&t.isClipped()?this.axisPosition.x+=Math.abs(t.getClippedValue()*t.pixelPerUnit):this.axisPosition.x+=Math.abs(t.value*t.pixelPerUnit),this.axisPosition.x+=i,this.axisPosition.x+=this.spacings.labelToBar),this.axisPosition.x<h/2&&(this.axisPosition.x=h/2+this.spacings.labelToBar)}getLabelPositionX(t){let i=this.spacings.labelToBar;return t<0&&(i*=-1),this.axisPosition.x+t+i}getLabelPositionY(t){return this.axisPosition.y+t+this.spacings.labelToBar}getCategoryToAxisSpaceing(){return this.spacings.labelToAxis}getCategoryToTopSpaceing(){return this.spacings.scenarioOffset}getCategoryToBottomSpaceing(){return this.spacings.scenarioOffset}getAxisEndPositionY(){return this.getAxisPositionY()+(this.numberOfColumns+.5)*this.spacings.categoryWidth}getScenarioLabelPositionOffsetY(t){if(t){const t=.5*this.getBarWidth()+this.spacings.scenarioLabelToBar;return Math.max(t,this.spacings.categoryWidth-this.spacings.scenarioOffset+this.spacings.labelToAxis)}return-(.5*this.getBarWidth()+this.spacings.scenarioLabelToBar)}getBarWidth(){return this.spacings.barWidth}getMarkerPositionY(t,i){return i?this.getBarCenterPositionY(t)-this.spacings.markerOffset-.5*this.getBarWidth():this.getBarCenterPositionY(t)+this.spacings.markerOffset+.5*this.getBarWidth()}getMarkerPositionX(){return this.getBarPositionX()}getMarkerScenarioLabelPositionOffsetY(t){return t?-(.5*this.spacings.markerWidth+this.spacings.scenarioLabelToBar):this.spacings.scenarioLabelToBar+.5*this.spacings.markerWidth}getAxisEndPositionX(){return this.getAxisPositionX()}calculateSpacings(){this.spacings={scenarioOffset:this.fontSize*this.scaleFactors.scenarioOffset,markerOffset:this.fontSize*this.scaleFactors.markerOffset,scenarioLabelToBar:this.fontSize*this.scaleFactors.scenarioLabelToBar,labelToBar:this.fontSize*this.scaleFactors.labelToBar,labelToAxis:this.fontSize*this.scaleFactors.labelToAxis,needleWidth:this.fontSize*this.scaleFactors.needleWidth,needleHeadWidth:this.fontSize*this.scaleFactors.needleHeadWidth,barWidth:this.fontSize*this.scaleFactors.barWidth,varianceAxisLineWidth:this.fontSize*this.scaleFactors.varianceAxisLineWidth,axisLineWidth:this.fontSize*this.scaleFactors.axisLineWidth,auxiliaryLineWidth:this.fontSize*this.scaleFactors.auxiliaryLineWidth,scenarioLineWidth:this.fontSize*this.scaleFactors.scenarioLineWidth,markerWidth:this.fontSize*this.scaleFactors.markerWidth,categoryWidth:this.fontSize*this.scaleFactors.categoryWidth,axisTickLength:this.fontSize*this.scaleFactors.axisTickLength}}calculateCategoryPosition(){this.categoryPosition={x:this.padding.left,y:this.getAxisPositionY()+.5*this.spacings.categoryWidth}}calculateAxisPosition(){this.axisPosition={x:this.getAxisPositionX(),y:this.getAxisPositionY()}}recalculatePositions(){this.calculateCategoryPosition(),this.calculateAxisPosition()}getAxisTitleOffset(){return this.topSideLabelHeight+this.spacings.labelToAxis+this.getTopLabelOverhang()}getTopLabelOverhang(){return this.hasStackedHeaders?this.getStackedHeaderOverhang():this.getTopScenarioLabelOverhang()}getStackedHeaderOverhang(){return Math.max(0,this.fontSize+this.spacings.scenarioLabelToBar+.5*this.spacings.barWidth-(.5*this.spacings.categoryWidth+this.spacings.scenarioOffset))}getTopScenarioLabelOverhang(){return Math.max(0,this.fontSize+.5*this.spacings.barWidth+this.spacings.scenarioLabelToBar-.5*this.spacings.categoryWidth,this.fontSize+.5*this.spacings.markerWidth+this.spacings.scenarioLabelToBar+this.spacings.markerOffset+.5*this.spacings.barWidth-(.5*this.spacings.categoryWidth+this.spacings.scenarioOffset))}calculateSideLabelLength(t,i,s){if(this.leftSideLengthSync)return this.leftSideLengthSync;const h=t/2;let e=i;return h>e&&(e=h),s>e&&(e=s),e}}class K{constructor(t){this.top=t.top,this.bottom=t.bottom,this.left=t.left,this.right=t.right}addBoxTopLeft(t){return this.top+=t.height|this.top,this.left+=t.width|this.top,this}}class Q{constructor(t){const i=1*t,s=.7*t;this.bgOffset=(i-s)/2,this.markerUp={top:s/2+",0",left:"0,"+s,right:s+","+s},this.markerUpBackground={top:i/2+",0",left:"0,"+i,right:i+","+i},this.markerDown={bottom:s/2+","+s,left:"0,0",right:s+",0"},this.markerDownBackground={bottom:i/2+","+i,left:"0,0",right:i+",0"}}upMarkerPatternStrings(){return{background:this.markerUpBackground.left+" "+this.markerUpBackground.right+" "+this.markerUpBackground.top+" "+this.markerUpBackground.left,foreground:this.markerUp.left+" "+this.markerUp.right+" "+this.markerUp.top+" "+this.markerUp.left,bgOffset:this.bgOffset}}downMarkerPatternStrings(){return{background:this.markerDownBackground.left+" "+this.markerDownBackground.right+" "+this.markerDownBackground.bottom+" "+this.markerDownBackground.left,foreground:this.markerDown.left+" "+this.markerDown.right+" "+this.markerDown.bottom+" "+this.markerDown.left,bgOffset:this.bgOffset}}createPatternMapForStructureBar(){const t=new Map;return t.set("marker-up",this.upMarkerPatternStrings()),t.set("marker-down",this.downMarkerPatternStrings()),t}}class q{constructor(t){this.container=new n,this.pattern=this.createFCPattern(this.container.group(),t),this.styles=t;let i=10;null!=t&&null!=t.fontStyles&&t.fontStyles.size&&(i=t.fontStyles.size),this.bgOffset=(1*i-.7*i)/2}createFCPattern(t,i){const s=i;return t.pattern(10,10,(function(t){t.rect(10,10).fill(s.barStyles.fc.fill),t.line(0,5,5,0).stroke({width:s.barStyles.fc.width,color:s.barStyles.fc.stroke,linecap:"square"}),t.line(5,10,10,5).stroke({width:s.barStyles.fc.width,color:s.barStyles.fc.stroke,linecap:"square"})})).id("pattern-structure-fc")}getFCPolygonPattern(){return{background:"",foreground:"",bgOffset:0,pattern:this.pattern}}toString(){return this.container.svg()}}var Z,J,tt,it,st;!function(t){t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.DIRTY=1]="DIRTY"}(Z||(Z={})),function(t){t.RELATIVE="dr",t.ABSOLUTE="d",t.NONE=""}(J||(J={}));class ht{constructor(t,i){this.data=t,this.scenarios=i,this.variances=[],this.title="",this.hideCategories=!1,this.pixelPerUnit=10,this.pixelPerPercentage=50,this.limit=0,this.sortOrder=new p(new z).default(),this.level=c.CATEGORY,this.filter="",this.measureScale=new m,this.measureUnit="",this.showMeasureScale=!0,this.dataFormatDigits={decimal:1,percent:2},this.stackConfig=null}}class et{constructor(t,i,s,h,e,n,r){this.dataRowAdapter=t,this.orderAdapter=i,this.stringAdapter=s,this.dataFormatDigitsAdapter=h,this.db=e,this.fromExpr=n,this.onQueryError=r}adapt(t){const i=U.adaptArray(t.data,this.dataRowAdapter),s=U.adaptArray(t.scenarios,this.stringAdapter),h=new ht(i,s);return l.isArray(t.variances)&&(h.variances=U.adaptArray(t.variances,this.stringAdapter)),l.isString(t.title)&&(h.title=t.title),l.isBoolean(t.hideCategories)&&(h.hideCategories=t.hideCategories),l.isNumber(t.pixelPerUnit)&&(h.pixelPerUnit=t.pixelPerUnit),l.isNumber(t.pixelPerPercentage)&&(h.pixelPerPercentage=t.pixelPerPercentage),l.isNumber(t.limit)&&(h.limit=t.limit),l.isExisting(t.sortOrder)&&(h.sortOrder=this.orderAdapter.adapt(t.sortOrder)),l.isExisting(t.level)&&(h.level=t.level),l.isString(t.filter)&&(h.filter=t.filter.trim()),l.isExisting(t.measureScale)&&(h.measureScale=f.calculateMeasureScale(this.db,this.fromExpr,h.scenarios,t.measureScale,this.onQueryError)),l.isString(t.measureUnit)&&(h.measureUnit=t.measureUnit),l.isBoolean(t.showMeasureScale)&&(h.showMeasureScale=t.showMeasureScale),l.isExisting(t.dataFormatDigits)&&(h.dataFormatDigits=this.dataFormatDigitsAdapter.adapt(t.dataFormatDigits)),l.isExisting(t.stackConfig)&&(h.stackConfig=t.stackConfig),h}default(){return new ht([],[])}}class nt{constructor(t,i,s,h){this.value=t,this.scenario=i,this.pixelPerUnit=s||1,this.variance="neg"===h||h===tt.NEG?tt.NEG:"pos"===h||h===tt.POS?tt.POS:tt.NEU}isEmpty(){return null==this.value||null==this.scenario}getScaledUnit(){return null==this.value?0:this.value*this.pixelPerUnit}getScaledPercentUnit(){return null==this.value?0:Math.abs(this.value)>1.45?this.value>=0?1.45*this.pixelPerUnit:-1.45*this.pixelPerUnit:this.value*this.pixelPerUnit}getVarianceStyle(){return null==this.value||this.value>=0?this.variance:tt.NEU===this.variance?tt.NEU:tt.POS===this.variance?tt.NEG:tt.POS}isClipped(){return null!=this.value&&Math.abs(this.value)>1.45}getClippedValue(){return 145}getScenario(){var t;return null===(t=this.scenario)||void 0===t?void 0:t.slice(0,2)}}class rt{constructor(){this.operation="+"}addRowGroup(t,i){this.rowGroup=t,this.rowGroupIndex=i}addCategory(t,i){this.category=t,this.categoryIndex=i}addSubCategory(t,i){this.subCategory=t,this.subCategoryIndex=i}addColumnGroup(t,i){this.columnGroup=t,this.columnGroupIndex=i}addSubColumnGroup(t,i){this.columnSubGroup=t,this.columnSubGroupIndex=i}}class ot{constructor(){}adapt(t){const i=new rt;return l.isOperator(t.operation)&&(i.operation=t.operation),l.isNumber(t.rowGroupIndex)&&l.isString(t.rowGroup)&&i.addRowGroup(t.rowGroup,t.rowGroupIndex),l.isNumber(t.categoryIndex)&&l.isString(t.category)&&i.addCategory(t.category,t.categoryIndex),l.isNumber(t.subCategoryIndex)&&l.isString(t.subCategory)&&i.addSubCategory(t.subCategory,t.subCategoryIndex),l.isNumber(t.columnGroupIndex)&&l.isString(t.columnGroup)&&i.addColumnGroup(t.columnGroup,t.columnGroupIndex),l.isNumber(t.columnSubGroupIndex)&&l.isString(t.columnSubGroup)&&i.addSubColumnGroup(t.columnSubGroup,t.columnSubGroupIndex),this.setActualValues(t,i),this.setPlanValues(t,i),this.setPreviousPeriodValues(t,i),this.setForecastValues(t,i),i}default(){return new rt}setActualValues(t,i){l.isNumber(t.ac1)&&(i.ac1=t.ac1),l.isNumber(t.ac2)&&(i.ac2=t.ac2),l.isNumber(t.ac3)&&(i.ac3=t.ac3),l.isNumber(t.ac4)&&(i.ac4=t.ac4)}setPlanValues(t,i){l.isNumber(t.pl1)&&(i.pl1=t.pl1),l.isNumber(t.pl2)&&(i.pl2=t.pl2),l.isNumber(t.pl3)&&(i.pl3=t.pl3),l.isNumber(t.pl4)&&(i.pl4=t.pl4)}setPreviousPeriodValues(t,i){l.isNumber(t.pp1)&&(i.pp1=t.pp1),l.isNumber(t.pp2)&&(i.pp2=t.pp2),l.isNumber(t.pp3)&&(i.pp3=t.pp3),l.isNumber(t.pp4)&&(i.pp4=t.pp4)}setForecastValues(t,i){l.isNumber(t.fc1)&&(i.fc1=t.fc1),l.isNumber(t.fc2)&&(i.fc2=t.fc2),l.isNumber(t.fc3)&&(i.fc3=t.fc3),l.isNumber(t.fc4)&&(i.fc4=t.fc4)}}class at{constructor(t,i,s,h,e,n){this.scaleFactors=t,this.fontStyles=i,this.axisStyles=s,this.barStyles=h,this.varianceStyles=e,this.padding=n,this.pattern=new Map,this.stackColors=["#000000","#c0c0c0","#808080"],this.locale="de"}}class lt{constructor(t,i,s,h,e){this.scaleFactorsStructureChartAdapter=t,this.fontStyleAdapter=i,this.svgStyleGroupAdapter=s,this.svgVariancesStyleGroupAdapter=h,this.paddingadapter=e}adapt(t){const i=new at(this.scaleFactorsStructureChartAdapter.default(),this.fontStyleAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgVariancesStyleGroupAdapter.default(),this.paddingadapter.default());return l.isExisting(t)&&(l.isExisting(t.scaleFactors)&&(i.scaleFactors=this.scaleFactorsStructureChartAdapter.adapt(t.scaleFactors)),l.isExisting(t.fontStyles)&&(i.fontStyles=this.fontStyleAdapter.adapt(t.fontStyles)),l.isExisting(t.axisStyles)&&(i.axisStyles=this.svgStyleGroupAdapter.adapt(t.axisStyles)),l.isExisting(t.barStyles)&&(i.barStyles=this.svgStyleGroupAdapter.adapt(t.barStyles)),l.isExisting(t.varianceStyles)&&(i.varianceStyles=this.svgVariancesStyleGroupAdapter.adapt(t.varianceStyles)),l.isExisting(t.padding)&&(i.padding=this.paddingadapter.adapt(t.padding)),Array.isArray(t.stackColors)&&t.stackColors.length>0&&(i.stackColors=t.stackColors),i.pattern=new Q(i.fontStyles.size).createPatternMapForStructureBar()),i}default(){return new at(this.scaleFactorsStructureChartAdapter.default(),this.fontStyleAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgStyleGroupAdapter.default(),this.svgVariancesStyleGroupAdapter.default(),this.paddingadapter.default())}}class ct{constructor(){this.scenarioOffset=.3,this.scenarioLabelToBar=.1,this.labelToBar=.3,this.labelToAxis=.3,this.needleWidth=.3,this.needleHeadWidth=.6,this.barWidth=1.2,this.varianceAxisLineWidth=.3,this.axisLineWidth=.1,this.auxiliaryLineWidth=.1,this.scenarioLineWidth=.2,this.markerWidth=.7,this.markerOffset=0,this.categoryWidth=1.9,this.axisTickLength=.3}}class ut{adapt(t){const i=new ct;return l.isNumber(t.scenarioOffset)&&(i.scenarioOffset=t.scenarioOffset),l.isNumber(t.scenarioLabelToBar)&&(i.scenarioLabelToBar=t.scenarioLabelToBar),l.isNumber(t.labelToBar)&&(i.labelToBar=t.labelToBar),l.isNumber(t.labelToAxis)&&(i.labelToAxis=t.labelToAxis),l.isNumber(t.needleWidth)&&(i.needleWidth=t.needleWidth),l.isNumber(t.needleHeadWidth)&&(i.needleHeadWidth=t.needleHeadWidth),l.isNumber(t.barWidth)&&(i.barWidth=t.barWidth),l.isNumber(t.varianceAxisLineWidth)&&(i.varianceAxisLineWidth=t.varianceAxisLineWidth),l.isNumber(t.axisLineWidth)&&(i.axisLineWidth=t.axisLineWidth),l.isNumber(t.auxiliaryLineWidth)&&(i.auxiliaryLineWidth=t.auxiliaryLineWidth),l.isNumber(t.scenarioLineWidth)&&(i.scenarioLineWidth=t.scenarioLineWidth),l.isNumber(t.markerWidth)&&(i.markerWidth=t.markerWidth),l.isNumber(t.markerOffset)&&(i.markerOffset=t.markerOffset),l.isNumber(t.categoryWidth)&&(i.categoryWidth=t.categoryWidth),l.isNumber(t.axisTickLength)&&(i.axisTickLength=t.axisTickLength),i}default(){return new ct}}!function(t){t.AC1="ac1",t.PP1="pp1",t.FC1="fc1",t.PL1="pl1",t.AC2="ac2",t.PP2="pp2",t.FC2="fc2",t.PL2="pl2",t.AC3="ac3",t.PP3="pp3",t.FC3="fc3",t.PL3="pl3",t.AC4="ac4",t.PP4="pp4",t.FC4="fc4",t.PL4="pl4",t.POS="pos",t.NEG="neg",t.NEU="neu"}(tt||(tt={})),function(t){t.LIST="LIST",t.SUM="SUM",t.OPT="OPT"}(it||(it={})),function(t){t[t.Left=0]="Left",t[t.Center=1]="Center",t[t.Right=2]="Right",t[t.Top=3]="Top",t[t.Bottom=4]="Bottom"}(st||(st={}));class dt{constructor(t,i,s,h,e,n,r,o){this.group=null,this.segmentFillColor=null,this.maxWidth=null,this.ID_SCENARIOLABEL="Label",this.CSS_CATEGORIES="categories",this.pointPart="label",this.x=i,this.y=s,this.value=e,null!=t&&(this.group=t.group().id(this.createElementID(t.toString(),h))),this.styles=n,this.isVarianceLabel=!1,this.isRelativeLabel=!1,this.verticalHookLocation=r||st.Top,this.horizontalHookLocation=o||st.Left}setToVarianceLabel(){return this.isVarianceLabel=!0,this}setToRelativeVarianceLabel(){return this.isVarianceLabel=!0,this.isRelativeLabel=!0,this}setSegmentFill(t){return this.segmentFillColor=t,this}setMaxWidth(t){return this.maxWidth=t,this}setPoint(t,i="label"){return this.pointKey=t,this.pointPart=i,this}updateGroup(t){return this.group=t,this}createElementID(t,i){return t+"_"+i+"_"+this.ID_SCENARIOLABEL}draw(t={percent:2,decimal:1},i=new m){var s;if(this.isEmpty())return this;const h=this.group;let e;const n=this.styles.fontStyles.background||"#ffffff";let r="",o="start";if(!1===Number.isNaN(Number(this.value))){let s=t.percent,h=t.percent,n=1,a="percent";!1===this.isRelativeLabel&&(s=t.decimal,h=t.decimal,n=i.value,a="decimal"),e=w.number(Number(this.value),a,s,h,n,this.styles.locale),Number(this.value)<0&&(o="end"),this.isVarianceLabel&&Number(this.value)>=0&&(r="+")}else e=""+this.value,o="start";const a=h.text(r+e);a.move(this.x,this.y);const l=a.bbox(),c=l.w,u=l.h;return null!=this.maxWidth&&c>this.maxWidth?(null===(s=this.group)||void 0===s||s.remove(),this.group=null,this):(this.horizontalHookLocation===st.Right?(o="end",a.move(a.x()-a.length(),a.y())):this.horizontalHookLocation===st.Center&&(o="middle",a.move(a.x()-a.length()/2,a.y())),this.verticalHookLocation===st.Center?a.move(a.x(),a.y()-u/2):this.verticalHookLocation===st.Bottom&&a.move(a.x(),a.y()-u),a.font({anchor:o}),null!=this.segmentFillColor?a.fill(k(this.segmentFillColor)):null==h||h.rect(c,.9*u).stroke(n).fill(n).opacity(.7).move(a.x(),a.y()+.1*u).insertBefore(a),this.pointKey&&(null==h||h.attr(T(this.pointKey,this.pointPart))),this)}isEmpty(){return null==this.value||""===this.value}setPos(t,i){return this.x=t,this.y=i,this}}class ft{constructor(t,i,s,h){this.height=0,this.ID_AXIS="axis",this.ID_AXIS_TITLE="axis-title",this.CSS_AXIS_TITLE="categories",this.scenarioType=t.scenarioType,this.labelText=t.labelText||null,this.position=i,this.style=h,this.label=new dt(s,this.position.getAxisTitlePositionX(),this.position.getAxisTitlePositionY(),this.ID_AXIS_TITLE,this.labelText,this.style,st.Bottom,st.Center),this.svgGroup=s.group().id(this.ID_AXIS)}draw(){return this.labelText&&this.label.draw(),this.svgGroup.line(this.position.getAxisPositionX(),this.position.getAxisPositionY(),this.position.getAxisEndPositionX(),this.position.getAxisEndPositionY()).addClass(this.ID_AXIS+"-"+this.convertScenarioType()),this.height=this.svgGroup.height(),this}convertScenarioType(){return void 0===this.scenarioType||null==this.scenarioType?"default":`${this.scenarioType}`.slice(0,2)}}class vt{constructor(t,i,s,h,e,n,r,o=null){if(this.ID_DATA_PREFIX="DATA",this.ID_SCENARIO_PREFIX="SCENARIO",this.ID_RECT="RECT",this.FALLBACK_COLOUR="#000000",this.label=null,this.scenarioLabel=null,this.barGroup=null,this.isVarianceBar=!1,this.overflowConfig=null,this.isOverflowing=!1,this.overdriveWidth=0,this.dimensions={barLength:0,xPos:0,yPos:0,labelXPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:!1},this.hasData=!1,this.dataPoint=s,this.index=h,this.isPrimaryBar=e,this.position=t,this.barStyles=i.barStyles,this.overflowConfig=o,this.scenarioGroup=n,this.styles=i,null!=n&&(this.barGroup=n.group().id(n.toString()+"_"+this.ID_RECT)),!0!==(null==s?void 0:s.isEmpty())&&null!=s.value){this.hasData=!0;let i=st.Left;s.value<0&&(i=st.Right),this.dimensions=this.createDimensions(t,s,h,e),this.label=new dt(this.scenarioGroup,this.dimensions.labelXPos,this.dimensions.yPos,this.ID_DATA_PREFIX,s.value,this.styles,st.Center,i).setPoint(s.key),this.scenarioLabel=this.getScenarioLabel(r)}}setAsVariance(){var t;return this.isVarianceBar=!0,null===(t=this.label)||void 0===t||t.setToVarianceLabel(),this}isRelativeVariance(){var t;return this.isVarianceBar=!0,null===(t=this.label)||void 0===t||t.setToRelativeVarianceLabel(),this}updateLabelGroup(t){var i;return this.isEmpty()||null==t||null===(i=this.label)||void 0===i||i.updateGroup(t),this}draw(t={percent:2,decimal:1},i=new m){var s,h;if(this.isEmpty()||null==this.dataPoint.getScenario())return this;let e=this.barStyles.getSVGStyle(this.dataPoint.getScenario());this.isVarianceBar&&(e=this.styles.varianceStyles.getSVGStyle(this.dataPoint.getVarianceStyle()));const n=this.convertToSVGStyle(e,"stroke");let r=this.convertToSVGStyle(e,"fill");const o=this.barStyles.getSVGStyle(this.dataPoint.getScenario()).fillpattern;if(null!=o){const t=this.styles.pattern.get(o);null!=t&&(r=t.pattern)}null===(s=this.scenarioGroup)||void 0===s||s.attr(T(this.dataPoint.key)),null===(h=this.barGroup)||void 0===h||h.attr(T(this.dataPoint.key,"element")),null!=this.barGroup&&(this.isOverflowing&&this.overflowConfig?this.drawOverdriveBar(r,n):this.barGroup.rect(this.dimensions.barLength,this.position.getBarWidth()).fill(r).stroke(n).cy(this.dimensions.yPos).x(this.dimensions.xPos)),this.drawBarDataLabel(t,i),this.drawScenarioLabel()}drawOverdriveBar(t,i){if(!this.barGroup||!this.overflowConfig)return;const s=this.position.getBarPositionX(),h=this.position.getBarWidth(),e=this.dimensions.barLength,{breakGap:n}=this.overflowConfig;this.dataPoint.getScaledUnit()<0?(this.barGroup.rect(e,h).fill(t).stroke(i).x(s-e).cy(this.dimensions.yPos),this.barGroup.rect(this.overdriveWidth,h).fill(t).stroke(i).x(s-e-n-this.overdriveWidth).cy(this.dimensions.yPos),this.drawBreakIndicator(s-e-n,n)):(this.barGroup.rect(e,h).fill(t).stroke(i).x(s).cy(this.dimensions.yPos),this.barGroup.rect(this.overdriveWidth,h).fill(t).stroke(i).x(s+e+n).cy(this.dimensions.yPos),this.drawBreakIndicator(s+e,n))}drawBreakIndicator(t,i){if(!this.barGroup)return;const s=this.position.getBarWidth(),h=this.dimensions.yPos-s/2,e=t+i/2,n=.35*i,r=s/3;let o=`M ${e-n} ${h}`;for(let t=0;t<3;t++)o+=` L ${e-n-.3*i} ${h+r*(t+.5)} L ${e-n} ${h+r*(t+1)}`;let a=`M ${e+n} ${h}`;for(let t=0;t<3;t++)a+=` L ${e+n+.3*i} ${h+r*(t+.5)} L ${e+n} ${h+r*(t+1)}`;this.barGroup.rect(i,s+2).fill("#ffffff").stroke("none").x(t).cy(this.dimensions.yPos),this.barGroup.path(o).fill("none").stroke({color:"#000000",width:1}),this.barGroup.path(a).fill("none").stroke({color:"#000000",width:1})}createDimensions(t,i,s,h){const e=i.getScaledUnit(),n=Math.abs(e);if(this.overflowConfig&&n>0){const r="ac"===i.getScenario()?this.overflowConfig.cutWidth:this.overflowConfig.cutWidth-this.overflowConfig.scenarioCutOffset;if(n>r){this.isOverflowing=!0;const{breakGap:i,overdriveZoneWidth:o,maxOverflow:a}=this.overflowConfig;this.overdriveWidth=a>0?(n-r)/a*o:0;const l=r+i+this.overdriveWidth;return e<0?{clipped:!1,barLength:r,xPos:t.getBarPositionX()-r,yPos:t.getBarPositionY(s,h),labelXPos:t.getLabelPositionX(-l),scenarioLabelXPos:t.getBarPositionX()-.5*r,scenarioLabelYPos:t.getBarPositionY(s,h)+t.getScenarioLabelPositionOffsetY(h)}:{clipped:!1,barLength:r,xPos:t.getBarPositionX(),yPos:t.getBarPositionY(s,h),labelXPos:t.getLabelPositionX(l),scenarioLabelXPos:t.getBarPositionX()+.5*r,scenarioLabelYPos:t.getBarPositionY(s,h)+t.getScenarioLabelPositionOffsetY(h)}}}return e<0?{clipped:!1,barLength:n,xPos:t.getBarPositionX()+e,yPos:t.getBarPositionY(s,h),labelXPos:this.position.getLabelPositionX(e),scenarioLabelXPos:this.position.getBarPositionX()-.5*n,scenarioLabelYPos:this.position.getBarPositionY(s,h)+this.position.getScenarioLabelPositionOffsetY(h)}:{clipped:!1,barLength:e,xPos:t.getBarPositionX(),yPos:t.getBarPositionY(s,h),labelXPos:this.position.getLabelPositionX(e),scenarioLabelXPos:this.position.getBarPositionX()+.5*n,scenarioLabelYPos:this.position.getBarPositionY(s,h)+this.position.getScenarioLabelPositionOffsetY(h)}}convertToSVGStyle(t,i){return null==t&&(t=[]),t.color=t[i]||this.FALLBACK_COLOUR,Object.assign({},t)}drawScenarioLabel(){null==this.scenarioLabel||this.scenarioLabel.isEmpty()||this.isVarianceBar||this.scenarioLabel.setPos(this.dimensions.scenarioLabelXPos,this.dimensions.scenarioLabelYPos).draw()}drawBarDataLabel(t,i=new m){var s;this.isPrimaryBar&&(null===(s=this.label)||void 0===s||s.draw(t,i))}isEmpty(){return!1===this.hasData||Number.isNaN(this.dataPoint.value)}getScenarioLabel(t){return new dt(this.scenarioGroup,-1,-1,this.ID_SCENARIO_PREFIX,t,this.styles,this.isPrimaryBar?st.Top:st.Bottom,st.Center)}}class pt{constructor(t,i,s,h,e,n,r,o,a){this.ID_DATA_PREFIX="DATA",this.ID_SCENARIO_PREFIX="SCENARIO",this.FALLBACK_COLOUR="#000000",this.scenarioLabel=null,this._defaultMarkerPattern=null,this.dimensions={barLength:0,xPos:0,yPos:0,labelXPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:!1},this.hasData=!1,this.position=t,this.markerGroup=i||null,this.markerPattern=s||this._defaultMarkerPattern,this.styles=e,this.barStyles=e?e.barStyles:null,this.scenario=h,!0!==(null==n?void 0:n.isEmpty())&&(this.hasData=!0,this.pointKey=n.key,this.dimensions=this.createMarkerDimensions(n,r,a),this.scenarioLabel=this.getScenarioLabel(o,e,a))}createMarkerDimensions(t,i,s){return t.getScaledUnit()<0?{clipped:!1,labelXPos:0,barLength:Math.abs(t.getScaledUnit()),xPos:this.position.getMarkerPositionX()-Math.abs(t.getScaledUnit()),yPos:this.position.getMarkerPositionY(i,s),scenarioLabelXPos:this.position.getMarkerPositionX()-Math.abs(t.getScaledUnit()),scenarioLabelYPos:this.position.getMarkerPositionY(i,s)+this.position.getMarkerScenarioLabelPositionOffsetY(s)}:{clipped:!1,labelXPos:0,barLength:t.getScaledUnit(),xPos:this.position.getMarkerPositionX()+t.getScaledUnit(),yPos:this.position.getMarkerPositionY(i,s),scenarioLabelXPos:this.position.getMarkerPositionX()+t.getScaledUnit(),scenarioLabelYPos:this.position.getMarkerPositionY(i,s)+this.position.getMarkerScenarioLabelPositionOffsetY(s)}}getScenarioLabel(t,i,s){return null==this.markerGroup?null:new dt(this.markerGroup,-1,-1,this.ID_DATA_PREFIX,t,i,s?st.Bottom:st.Top,st.Center)}convertToSVGStyle(t,i){return null==t&&(t=[]),t.color=t[i]||this.FALLBACK_COLOUR,Object.assign({},t)}draw(){if(this.isEmpty())return this;const t=this.convertToSVGStyle(this.barStyles[this.getScenario()],"stroke");let i=this.convertToSVGStyle(this.barStyles[this.getScenario()],"fill");const s=this.barStyles[this.getScenario()];if(null!=s&&s.fillpattern){const t=this.styles.pattern.get(s.fillpattern);null!=t&&(i=t.pattern)}return this.markerGroup.attr(T(this.pointKey)),this.markerGroup.polygon(this.markerPattern.background).fill("#ffffff").cy(this.dimensions.yPos).cx(this.dimensions.xPos),this.markerGroup.polygon(this.markerPattern.foreground).fill(i).stroke(t).cy(this.dimensions.yPos).cx(this.dimensions.xPos).attr(T(this.pointKey,"element")),null==this.scenarioLabel||this.scenarioLabel.isEmpty()||this.scenarioLabel.setPos(this.dimensions.scenarioLabelXPos,this.dimensions.scenarioLabelYPos).draw(),this}isEmpty(){return!1===this.hasData}getScenario(){var t;return null===(t=this.scenario)||void 0===t?void 0:t.slice(0,2)}}class gt{constructor(t,i,s,h,e){this.ID_DATA_PREFIX="DATA",this.ID_SCENARIO_PREFIX="SCENARIO",this.ID_RECT="RECT",this.FALLBACK_COLOUR="#000000",this.label=null,this.dimensions={barLength:0,xPos:0,yPos:0,labelXPos:0,scenarioLabelXPos:0,scenarioLabelYPos:0,clipped:!1},this.hasData=!1,this.dataPoint=s,this.index=h,this.position=t,this.barStyles=i.barStyles,this.scenarioGroup=e,this.styles=i,this.barGroup=e.group().id(e.toString()+"_"+this.ID_RECT);const n=void 0===(null==s?void 0:s.value)&&null!=(null==s?void 0:s.scenario);if(!0!==(null==s?void 0:s.isEmpty())&&null!=s.value||n){this.hasData=!0,this.dimensions=this.createDimensions(t,s,h);let i=st.Left;s.value<0&&(i=st.Right),this.label=new dt(this.scenarioGroup,this.dimensions.labelXPos,this.dimensions.yPos,this.ID_DATA_PREFIX,n?A:s.value,this.styles,st.Center,i),this.label.setToRelativeVarianceLabel().setPoint(s.key)}}updateLabelGroup(t){var i;return this.isEmpty()||null==t||null===(i=this.label)||void 0===i||i.updateGroup(t),this}draw(){var t,i,s;if(void 0===(null===(t=this.dataPoint)||void 0===t?void 0:t.value))return null===(i=this.label)||void 0===i||i.draw(),this;if(this.isEmpty())return this;if(null==this.dimensions)return this;this.scenarioGroup.attr(T(this.dataPoint.key)),this.barGroup.attr(T(this.dataPoint.key,"element"));const h=this.styles.varianceStyles.getSVGStyle(this.dataPoint.getVarianceStyle()),e=h.stroke;let n=h.fill;const r=this.barStyles[this.dataPoint.getScenario()];if(null!=r&&r.fillpattern){const t=this.styles.pattern.get(r.fillpattern);null!=t&&null!=t.pattern&&(n=t.pattern)}this.drawNeedleHead(n,e),this.barGroup.rect(this.dimensions.barLength,this.position.getNeedleWidth()).fill(n).stroke(e).cy(this.dimensions.yPos).x(this.dimensions.xPos),null===(s=this.label)||void 0===s||s.draw()}createDimensions(t,i,s){return i.getScaledPercentUnit()<0?{barLength:Math.abs(i.getScaledPercentUnit()),xPos:t.getBarPositionX()+i.getScaledPercentUnit(),yPos:t.getBarCenterPositionY(s),labelXPos:this.position.getLabelPositionX(i.getScaledPercentUnit()-this.position.getNeedleWidth()),clipped:i.isClipped(),scenarioLabelXPos:0,scenarioLabelYPos:0}:{barLength:i.getScaledPercentUnit(),xPos:t.getBarPositionX(),yPos:t.getBarCenterPositionY(s),labelXPos:this.position.getLabelPositionX(i.getScaledPercentUnit()+this.position.getNeedleWidth()),clipped:i.isClipped(),scenarioLabelXPos:0,scenarioLabelYPos:0}}drawNeedleHead(t,i){if(null===this.dimensions)return;const s=this.styles.varianceStyles.needleHeadColour,h=this.styles.varianceStyles.needleHeadColour;if(this.dimensions.clipped){let s="13,0 4,-5 4,5 13,0 8,0 0,-5 0,5 8,0";null!=this.dataPoint.value&&this.dataPoint.value<0&&(s="0,0 9,-5 9,5 0,0 5,0 13,-5 13,5 5,0"),this.barGroup.polygon(s).fill(t).cx(this.getHeadXPosition()).cy(this.dimensions.yPos).fill(t).stroke(i)}else this.barGroup.rect(2*this.position.getNeedleWidth(),2*this.position.getNeedleWidth()).cx(this.getHeadXPosition()).cy(this.dimensions.yPos).fill(s).stroke(h)}isEmpty(){return!1===this.hasData||Number.isNaN(this.dataPoint.value)}getHeadXPosition(){let t=this.dimensions.xPos;return null!=this.dataPoint.value&&this.dataPoint.value>0&&(t+=this.dimensions.barLength),t}}class bt{constructor(t,i,s,h,e,n,r,o,a,l,c){this.hasData=!1,this.position=t,this.styles=i,this.dataPoint=s,this.index=h,this.segment=e,this.segmentIndex=r,this.stackMode=o,this.stack=a,this.group=c,this.barGroup=c.group().id(`stacked_bar_${h}_seg_${r}`),!0!==(null==s?void 0:s.isEmpty())&&null!=s.value&&(this.hasData=!0)}draw(t={percent:2,decimal:1},i=new m){if(!this.hasData||!Number.isFinite(this.dataPoint.value))return;const s=this.dataPoint.value,h=this.dataPoint.pixelPerUnit,e=this.position.getBarPositionX(),n=this.position.getBarWidth(),r=Math.abs(this.segment.end-this.segment.start)*h,o=e+Math.min(this.segment.start,this.segment.end)*h,a=this.position.getBarPositionY(this.index,!0),l=this.styles.stackColors,c=l[this.segmentIndex%l.length],d={color:c},f={color:c,width:.5};this.barGroup.attr(T(this.dataPoint.key,"element")),this.barGroup.rect(Math.max(r,.5),n).fill(d).stroke(f).cy(a).x(o);const v=r-6;if(v>0){const h=o+r/2;if(this.stackMode===u.RELATIVE||this.stackMode===u.ABSOLUTE_RELATIVE){const i=w.number(this.segment.share,"percent",t.percent,t.percent,1,this.styles.locale);new dt(this.group,h,a,"STACK_SEG",i,this.styles,st.Center,st.Center).setSegmentFill(c).setMaxWidth(v).setPoint(this.dataPoint.key).draw()}else new dt(this.group,h,a,"STACK_SEG",s,this.styles,st.Center,st.Center).setSegmentFill(c).setMaxWidth(v).setPoint(this.dataPoint.key).draw(t,i)}}drawTotalLabel(t={percent:2,decimal:1},i=new m,s){if(this.stackMode===u.RELATIVE)return;const h=this.stack.total<0,e=this.position.getLabelPositionX((h?0-this.stack.negative:this.stack.positive)*this.dataPoint.pixelPerUnit),n=this.position.getBarPositionY(this.index,!0);new dt(this.group,e,n,"STACK_TOTAL",this.stack.total,this.styles,st.Center,h?st.Right:st.Left).setPoint(s,"total").draw(t,i)}}class mt{constructor(t,i,s,h,e){this.overflowConfig=null,this.i18n=e;const n=i.group().id("Scenario1"),r=i.group().id("Scenario2").insertBefore(n);this.svgGroups={parent:i,scenario1:n,scenario2:r,scenario3:i.group().id("Scenario3"),scenario4:i.group().id("Scenario4"),scenario1Label:i.group().id("label")},this.styles=s,this.position=t,this.elementCnt=h}setOverflowConfig(t){this.overflowConfig=t}isLastDataPoint(t){return this.elementCnt-1===t}isFirsttDataPoint(t){return 0===t}createPrimaryBar(t,i){var s,h,e,n;const r=null===(h=null===(s=this.svgGroups)||void 0===s?void 0:s.scenario1)||void 0===h?void 0:h.group().id(""+i),o=null===(n=null===(e=this.svgGroups)||void 0===e?void 0:e.scenario1Label)||void 0===n?void 0:n.group().id(""+i);let a=null;return this.isLastDataPoint(i)&&(a=`${this.i18n.get(t.scenario)||t.scenario}`),new vt(this.position,this.styles,t,i,!0,r,a,this.overflowConfig).updateLabelGroup(o)}createVarianceBar(t,i){var s,h,e,n;const r=null===(h=null===(s=this.svgGroups)||void 0===s?void 0:s.scenario1)||void 0===h?void 0:h.group().id(""+i),o=null===(n=null===(e=this.svgGroups)||void 0===e?void 0:e.scenario1Label)||void 0===n?void 0:n.group().id(""+i);let a=null;return this.isLastDataPoint(i)&&(a=`${this.i18n.get(t.scenario)||t.scenario}`),new vt(this.position,this.styles,t,i,!0,r,a,this.overflowConfig).updateLabelGroup(o).setAsVariance()}createRelativeVarianceBar(t,i){var s,h,e,n;const r=null===(h=null===(s=this.svgGroups)||void 0===s?void 0:s.scenario1)||void 0===h?void 0:h.group().id(""+i),o=null===(n=null===(e=this.svgGroups)||void 0===e?void 0:e.scenario1Label)||void 0===n?void 0:n.group().id(""+i);return new gt(this.position,this.styles,t,i,r).updateLabelGroup(o)}createSecondaryBar(t,i){var s,h;const e=null===(h=null===(s=this.svgGroups)||void 0===s?void 0:s.scenario2)||void 0===h?void 0:h.group().id(""+i);let n=null;return this.isFirsttDataPoint(i)&&(n=`${this.i18n.get(t.scenario)||t.scenario}`),new vt(this.position,this.styles,t,i,!1,e,n,this.overflowConfig)}createPrimaryMarker(t,i){var s,h;const e=null===(h=null===(s=this.svgGroups)||void 0===s?void 0:s.scenario3)||void 0===h?void 0:h.group().id(""+i),n=this.styles.pattern.get("marker-down")||{foreground:"0,0 1,0 1,1 0,1",background:"0,0 1,0 1,1 0,1",bgOffset:0};let r=null;return this.isFirstDataPoint(i)&&(r=`${this.i18n.get(t.scenario)||t.scenario}`),new pt(this.position,e,n,t.scenario,this.styles,t,i,r,!0)}createSecondaryMarker(t,i){var s,h;const e=null===(h=null===(s=this.svgGroups)||void 0===s?void 0:s.scenario4)||void 0===h?void 0:h.group().id(""+i),n=this.styles.pattern.get("marker-up")||{foreground:"0,0 1,0 1,1 0,1",background:"0,0 1,0 1,1 0,1",bgOffset:0};let r=null;return this.isLastDataPoint(i)&&(r=`${this.i18n.get(t.scenario)||t.scenario}`),new pt(this.position,e,n,t.scenario,this.styles,t,i,r,!1)}isFirstDataPoint(t){return 0===t}}class wt{constructor(t,i,s,h,e){this.dataModel=[],this.variancesDataModel=[],this.title="",this.configTitle="",this.configVariances=[],this.smallestDataPointValue=new nt(0,tt.AC1,1,tt.NEU),this.highestDataPointValue=new nt(0,tt.AC1,1,tt.NEU),this.smallestVarianceDataPointValue=new nt(0,tt.AC1,1,tt.NEU),this.highestVarianceDataPointValue=new nt(0,tt.AC1,1,tt.NEU),this.pixelPerUnit=1,this.pixelPerPercentage=1,this.level=c.CATEGORY,this.hideCategories=!1,this.axisScenario=tt.AC1,this.CSS_CATEGORIES="categories",this.state=Z.DIRTY,this.titleLength=0,this.leftSideOffsetForHorizontalSync=0,this.limit=0,this.measureScale=new m,this.measureUnit="",this.dataFormatDigits={percent:2,decimal:1},this.stackConfig=null,this.scenarioPropOrder=[],this.overflowConfig=null,this.stackSides=_([]),this.stackLabelClearance={left:0,right:0},this.fromExpr="",this.rowCount=0,this.db=i,this.tableName=s,this.ruleSet=t||new P,this.i18n=this.createI18n(new Map),this.styles=e,this.setConfig(h),this.position=this.createElementPosition()}updatePosition(){this.position=this.createElementPosition()}createElementPosition(){this.titleLength=this.calculateTitleLength(0);let t=this.calculateLeftSideWidth(this.getVarianceType());const i=this.calculateCategoryWidth();return this.titleLength>t&&(t=this.titleLength),new I(new K(this.styles.padding),this.styles.scaleFactors,this.styles.fontStyles.size,this.dataModel.length,this.leftSideOffsetForHorizontalSync,this.titleLength,t,i,!!this.stackConfig&&0===this.variancesDataModel.length)}setStyles(t){this.styles=t}setRuleSet(t){this.ruleSet=t||new P}setConfig(t){var i,s;this.state=Z.DIRTY,this.scenarioPropOrder=[...t.scenarios];const h=this.sortScenariosbyVisualisationRules(t.scenarios);this.hideCategories=t.hideCategories||!1,this.limit=t.limit,this.pixelPerUnit=t.pixelPerUnit||1,this.pixelPerPercentage=t.pixelPerPercentage||100,this.setSource(t.filter),this.level=t.level,this.dataModel=this.populateModel(h,t.level,t.sortOrder);for(const t of this.dataModel)for(const s of[t.scenario1,t.scenario2,t.scenario3,t.scenario4])null==s.value||Number.isNaN(s.value)||(s.key=Object.assign(Object.assign({},O(this.level,t.category)),{scenario:null!==(i=s.scenario)&&void 0!==i?i:void 0}));t.stackConfig&&t.stackConfig.by!==d.SCENARIOS&&this.populateDimensionStackSegments(h,t.stackConfig,t.level),this.variancesDataModel=this.populateVarianceModel(t.variances,this.dataModel),this.configTitle=t.title,this.configVariances=null!==(s=null==t?void 0:t.variances)&&void 0!==s?s:[],this.updateTitle(),this.smallestDataPointValue=this.findSmallestDataPointValue(this.dataModel),this.smallestVarianceDataPointValue=this.findSmallestDataPointValue(this.variancesDataModel),this.highestDataPointValue=this.findHighestDataPointValue(this.dataModel),this.highestVarianceDataPointValue=this.findHighestDataPointValue(this.variancesDataModel),this.axisScenario=this.setAxisScenario(t.variances),this.measureScale=t.measureScale,this.measureUnit=t.measureUnit,this.dataFormatDigits=t.dataFormatDigits,this.stackConfig=t.stackConfig,this.measureStacks(),this.updatePosition()}sortScenariosbyVisualisationRules(t){const i=this;return[...t].sort(((t,s)=>i.ruleSet.getScenarioSorIndex(t)-i.ruleSet.getScenarioSorIndex(s))).reverse()}setI18n(t){this.i18n=this.createI18n(t),this.updateTitle()}updateTitle(){var t;this.title=this.configTitle||w.translateScenarioLabel(null===(t=this.configVariances)||void 0===t?void 0:t.toString(),this.i18n)}createI18n(t){this.state=Z.DIRTY;const i=new Map([["SEPARATOR_WS",", "],["in","in"],["ORDER_asc","↑"],["ORDER_desc","↓"],["ac1","AC"],["pp1","PY"],["fc1","FC"],["pl1","PL"],["ac2","AC2"],["pp2","PY2"],["fc2","FC2"],["pl2","PL2"],["ac3","AC3"],["pp3","PY3"],["fc3","FC3"],["pl3","PL3"],["ac4","AC4"],["pp4","PY4"],["fc4","FC4"],["pl4","PL4"],["category"," "],["operation"," "],["thereof","davon"],["part_of","in % von"],["ibcssymbol_delta_ac","Δ{%}"],["ibcssymbol_delta_generic","Δ({%})"],["ibcssymbol_delta_ac_relative","Δ{%}%"],["ibcssymbol_delta_generic_relative","Δ({%})%"],["SUM_TOTAL","❖"]]);return new Map([...i,...t])}setSource(t){var i,s;if(this.state=Z.DIRTY,this.queryError=void 0,this.fromExpr=Y(this.db,this.tableName,t),this.fromExpr)try{const t=this.db.exec(`SELECT COUNT(*) AS cnt FROM ${this.fromExpr}`);this.rowCount=null!==(s=null===(i=t[0])||void 0===i?void 0:i.cnt)&&void 0!==s?s:0}catch(t){this.rowCount=0,this.failQuery(t)}else this.rowCount=0}getQueryError(){return this.queryError}failQuery(t){var i;null!==(i=this.queryError)&&void 0!==i||(this.queryError=X(t))}getUnitBarExtent(){var t,i;const s=this.isStacked(),h=this.getVarianceType(),e=h!==J.NONE,n=e?this.highestVarianceDataPointValue:this.highestDataPointValue,r=e?this.smallestVarianceDataPointValue:this.smallestDataPointValue;return E({fixedDomain:s?this.stackSides.positive+this.stackSides.negative:void 0,relativeVariance:h===J.RELATIVE,maxPositive:null!==(t=null==n?void 0:n.value)&&void 0!==t?t:0,minNegative:null!==(i=null==r?void 0:r.value)&&void 0!==i?i:0})}getPercentBarExtent(){var t,i,s,h;return W({relativeVariance:this.getVarianceType()===J.RELATIVE,maxPositive:null!==(i=null===(t=this.highestVarianceDataPointValue)||void 0===t?void 0:t.value)&&void 0!==i?i:0,minNegative:null!==(h=null===(s=this.smallestVarianceDataPointValue)||void 0===s?void 0:s.value)&&void 0!==h?h:0})}getAllocatedCanvasWidth(){const t=this.position.getAxisPositionX(),i=this.calculateRightSideWidth(this.getVarianceType());let s=t+i+ +this.styles.padding.left+this.styles.padding.right;return i<this.titleLength/2&&(s+=this.titleLength/2),t<this.titleLength/2&&(s+=this.titleLength/2),s}getAllocatedCanvasHeight(){return this.position.getAxisEndPositionY()+this.position.spacings.labelToAxis+this.position.fontSize+this.styles.padding.bottom}patternToString(){return"<svg></svg>"}layout(){this.draw(new n)}toString(){const t=new n;return this.draw(t),t.id("drawCanvas"),t.width(this.getAllocatedCanvasWidth()),t.height(this.getAllocatedCanvasHeight()),t.svg()}applyFontToContainer(t){t.attr({"font-size":this.styles.fontStyles.size,"font-family":this.styles.fontStyles.family})}draw(t){this.cleanSVGforRedraw(t),this.applyFontToContainer(t),this.state===Z.DIRTY&&(this.state=Z.UP_TO_DATE),this.variancesDataModel&&this.variancesDataModel.length>0?(this.drawVarianceScenario(this.variancesDataModel,t),this.drawAxisAndLabels(this.variancesDataModel,t)):null!=this.stackConfig?(this.drawStackedScenarios(this.dataModel,t),this.drawStackedHeaders(this.dataModel,t),this.drawAxisAndLabels(this.dataModel,t,!0)):(this.drawScenarios(this.dataModel,t),this.drawAxisAndLabels(this.dataModel,t))}setPattern(t,i){this.styles.pattern.set(t,i)}calculateTitleLength(t){const i=y(this.title.length>7?this.title:"_______",{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width;return i<t?t:i/2}getFooter(){return 1===this.measureScale.value&&""===this.measureUnit?" ":w.translateScenarioLabel("in",this.i18n)+" "+this.measureScale.prefix+this.measureUnit}scenarioStyles(){const t=S(this.styles.barStyles,this.ruleSet);return t===this.styles.barStyles?this.styles:Object.assign(Object.create(Object.getPrototypeOf(this.styles)),this.styles,{barStyles:t})}setAxisScenario(t){let i=tt.AC1;if(null!=t&&t.length>0){const s=new x(t.toString());s.isValid&&(i=L(this.ruleSet.getScenarioColorIndex(s.delta))+s.delta.slice(2))}return null===i&&(i=tt.AC1),i}populateModel(t,i,s){if(0===this.rowCount||!this.fromExpr)return[];const h=[],e=this.createOrderStr(i,s),n=this.createSelectString(i,s),r=this.createGroupByStr(i,s);let o;try{o=this.db.exec(`SELECT ${n} ${t.length>0?","+t.map((t=>`SUM(${t} * transformOperator(operation)) as ${t}, COUNT(ISNULL(${t})) as ${t}_cnt`)).join(","):""}\n FROM ${this.fromExpr}\n GROUP BY ${r}\n ORDER BY ${e}`)}catch(t){return this.failQuery(t),[]}return this.detectNaNCells(t,o),this.createDataRows(this.limit>0?o.slice(0,this.limit):o,h,t),this.crateRESTRow(o,t,h),h}detectNaNCells(t,i){i.forEach((i=>(t.forEach((t=>{const s=new x(t);!0===s.isValid?0!==i[s.base+"_cnt"]&&0!==i[s.delta+"_cnt"]||(i[t]=Number.NaN):0===i[t+"_cnt"]&&(i[t]=Number.NaN)})),i)))}crateRESTRow(t,i,s){if(this.limit<=0||this.limit>=t.length)return;const h=[];this.createDataRows(t.slice(this.limit),h,i);const e=(t,i)=>Number.isFinite(i)?(Number.isFinite(t)?t:0)+i:t,n=h.reduce((function(t,s){return{id:t.id,category:t.category,type:t.type,scenario1:new nt(e(t.scenario1.value,s.scenario1.value),i[0],t.scenario1.pixelPerUnit,tt.NEU),scenario2:new nt(e(t.scenario2.value,s.scenario2.value),i[1],t.scenario2.pixelPerUnit,tt.NEU),scenario3:new nt(e(t.scenario3.value,s.scenario3.value),i[2],t.scenario3.pixelPerUnit,tt.NEU),scenario4:new nt(e(t.scenario4.value,s.scenario4.value),i[3],t.scenario4.pixelPerUnit,tt.NEU)}}),{id:9999,category:"REST",type:J.NONE,scenario1:new nt(NaN,i[0],this.pixelPerUnit,tt.NEU),scenario2:new nt(NaN,i[1],this.pixelPerUnit,tt.NEU),scenario3:new nt(NaN,i[2],this.pixelPerUnit,tt.NEU),scenario4:new nt(NaN,i[3],this.pixelPerUnit,tt.NEU)});s.push(n)}createDataRows(t,i,s){t.forEach(((t,h)=>{i.push({id:h,category:t.category,type:J.NONE,scenario1:new nt(t[s[0]],s[0],this.pixelPerUnit,tt.NEU),scenario2:new nt(t[s[1]],s[1],this.pixelPerUnit,tt.NEU),scenario3:new nt(t[s[2]],s[2],this.pixelPerUnit,tt.NEU),scenario4:new nt(t[s[3]],s[3],this.pixelPerUnit,tt.NEU)})}))}createOrderStr(t,i){let s=`${t.toLowerCase()}`;return i.hierarchy.length>=1&&(s=i.hierarchy.map((t=>`${t} ${i.direction}`)).toString()),s}createSelectString(t,i){return t===c.CATEGORY&&i.hierarchy.includes(g.CATEGORYINDEX)?`${g.CATEGORYINDEX}, ${c.CATEGORY} as category`:t===c.ROWGROUP&&i.hierarchy.includes(g.ROWGROUPINDEX)?`${g.ROWGROUPINDEX}, ${c.ROWGROUP} as category`:t===c.SUBCATEGORY&&i.hierarchy.includes(g.SUBCATEGORYINDEX)?`${g.SUBCATEGORYINDEX}, ${c.SUBCATEGORY} as category`:`${t.toString()} as category`}createGroupByStr(t,i){return t===c.CATEGORY&&i.hierarchy.includes(g.CATEGORYINDEX)?`${g.CATEGORYINDEX}, ${c.CATEGORY}`:t===c.ROWGROUP&&i.hierarchy.includes(g.ROWGROUPINDEX)?`${g.ROWGROUPINDEX}, ${c.ROWGROUP}`:t===c.SUBCATEGORY&&i.hierarchy.includes(g.SUBCATEGORYINDEX)?`${g.SUBCATEGORYINDEX}, ${c.SUBCATEGORY}`:`${t.toString()}`}calculateCategoryWidth(){if(this.hideCategories)return 5;let t=0;for(const i of this.dataModel){const s=y(i.category,{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"});s.width>t&&(t=s.width)}return 1.1125*t}findSmallestDataPointValue(t){let i=new nt(0,"default",this.pixelPerUnit,null);for(const s of t)for(const t of[s.scenario1,s.scenario2,s.scenario3,s.scenario4])null!=t&&null!=i.value&&t.value<i.value&&(i=t);return i}findHighestDataPointValue(t){let i=new nt(0,"default",this.pixelPerUnit,null);for(const s of t)for(const t of[s.scenario1,s.scenario2,s.scenario3,s.scenario4])null!=t&&null!=i.value&&t.value>i.value&&(i=t);return i}stackGroups(t){if(!this.stackConfig)return[];const i=this.stackConfig.by===d.SCENARIOS;let s=[];for(const h of i?["scenario1","scenario2","scenario3","scenario4"]:["scenario1"]){const i=t[h];i&&!i.isEmpty()&&null!=i.value&&s.push({value:i.value,scenario:i.scenario,dataPoint:i})}if(0===s.length)return[];const h=this.stackConfig.mode===u.RELATIVE?1:0,e=(t,i)=>({prefix:t,segments:i,layout:D(i.map((t=>t.value)),h),hasValue:i.some((t=>Number.isFinite(t.value)))});if(i){this.sortSegmentsByPropOrder(s);const t=new Map;for(const i of s){const s=M(i.scenario);t.has(s)||t.set(s,[]),t.get(s).push(i)}if(t.size>1){const i=[];for(const s of C)t.has(s)&&(i.push(e(s,t.get(s))),t.delete(s));for(const[s,h]of t)i.push(e(s,h));return i}}else t.stackSegments&&t.stackSegments.length>0&&(s=t.stackSegments.map((t=>({value:t.value,scenario:t.label,dataPoint:t.dataPoint}))));const n=t=>Number.isFinite(t.value)?t.value:0;return"asc"===this.stackConfig.order?s.sort(((t,i)=>n(t)-n(i))):"desc"===this.stackConfig.order&&s.sort(((t,i)=>n(i)-n(t))),[e("",s)]}measureStacks(){const t=[];this.stackLabelClearance={left:0,right:0};for(const i of this.dataModel){const{flipped:s,clearance:h}=this.stackLabelPlace(i),e=this.drawnStackLayouts(i),n=s?"right":"left";this.stackLabelClearance[n]=Math.max(this.stackLabelClearance[n],h),t.push(...e)}this.stackSides=_(t)}stackLabelPlace(t){const i=this.styles.fontStyles.size*this.styles.scaleFactors.labelToBar;return R(this.drawnStackLayouts(t),(t=>{var s;return(null===(s=this.stackConfig)||void 0===s?void 0:s.mode)===u.RELATIVE?0:(i+this.calculateTotalLabelWidth(t.total))/this.pixelPerUnit}))}drawnStackLayouts(t){return this.stackGroups(t).filter((t=>t.hasValue)).map((t=>t.layout))}calculateTotalLabelWidth(t){const i=this.dataFormatDigits.decimal;return y(w.number(t,"decimal",i,i,this.measureScale.value,this.styles.locale),{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width}isStacked(){return null!=this.stackConfig&&this.stackSides.positive+this.stackSides.negative>0}populateVarianceModel(t,i){const s=[];if(0===t.length)return s;let h=null;null!=i&&i.length>0&&(h=i[0]);for(const e in t){const n=new x(t[e]);if(n.isValid){const r=this.mapScenarios(n,h),o=n.direction;let a=this.pixelPerUnit;"dr"===n.type&&(a=this.pixelPerPercentage);for(const h in i){const l=new nt(this.calculateVariance(n,i[h],r),n.base,a,o);null===l.value||Number.isNaN(l.value)||(l.key=Object.assign(Object.assign({},O(this.level,i[h].category)),{scenario:t[e]})),s.push({id:Number(h),category:i[h].category,type:"dr"===n.type?J.RELATIVE:J.ABSOLUTE,scenario1:l,scenario2:new nt(null,null,null,null),scenario3:new nt(null,null,null,null),scenario4:new nt(null,null,null,null)})}}}return s}calculateVariance(t,i,s){const h=s.get(t.base),e=s.get(t.delta);return null==h||null==e?null:t.type===J.RELATIVE?N(i[h].value-i[e].value,i[e].value):i[h].value-i[e].value}mapScenarios(t,i){const s=new Map;return null==i||["scenario1","scenario2","scenario3","scenario4"].forEach((h=>{i[h].scenario===t.delta?s.set(t.delta,h):i[h].scenario===t.base&&s.set(t.base,h)})),s}calculateTextBoxWidth(t){return y(w.number(t,"decimal",1,0,1,this.styles.locale),{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width}calculatePercentageTextBoxWidth(t){let i=0;return t>=0&&(i+=y("+",{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width),i+=y(" %",{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width,y(w.number(t,"decimal",1,1,1,this.styles.locale),{font:this.styles.fontStyles.font,fontSize:this.styles.fontStyles.size+"px"}).width+i+i}cleanSVGforRedraw(t){t.clear()}drawAxisAndLabels(t,i,s=!1){const h=i.group().id("AxisAndDateLables");let e=!1;this.hideCategories||t.forEach(((t,i)=>{t.type===J.RELATIVE&&(e=!0);let n=st.Right,r=!0,o=0;if(s){const i=this.stackLabelPlace(t);r=!i.flipped,o=i.clearance*this.pixelPerUnit*(i.flipped?1:-1)}else t.scenario1.value<0&&(r=!1);r||(n=st.Left),new dt(h,this.position.getCategoryPositionX(r)+o,this.position.getBarCenterPositionY(i),"",this.i18n.get(t.category)||t.category,this.styles,st.Center,n).draw()})),new ft({scenarioType:this.axisScenario,labelText:this.title,isRelative:e},this.position,h,this.styles).draw()}drawScenarios(t,i){const s=i.group().id("Scenarios"),h=new mt(this.position,s,this.scenarioStyles(),t.length,this.i18n);h.setOverflowConfig(this.overflowConfig),t.forEach(((t,i)=>{h.createPrimaryBar(t.scenario1,i).draw(this.dataFormatDigits,this.measureScale),h.createSecondaryBar(t.scenario2,i).draw(),h.createPrimaryMarker(t.scenario3,i).draw(),h.createSecondaryMarker(t.scenario4,i).draw()}))}drawVarianceScenario(t,i){const s=i.group().id("Scenarios"),h=new mt(this.position,s,this.scenarioStyles(),t.length,this.i18n);return h.setOverflowConfig(this.overflowConfig),t.forEach(((t,i)=>{t.type===J.RELATIVE?h.createRelativeVarianceBar(t.scenario1,i).draw():h.createVarianceBar(t.scenario1,i).draw(this.dataFormatDigits,this.measureScale)})),s}sortSegmentsByPropOrder(t){if(0===this.scenarioPropOrder.length)return;const i=this.scenarioPropOrder;t.sort(((t,s)=>{const h=i.indexOf(t.scenario),e=i.indexOf(s.scenario);return(-1===h?i.length:h)-(-1===e?i.length:e)}))}drawStackedScenarios(t,i){if(!this.stackConfig)return;const s=i.group().id("StackedScenarios"),h=this.stackConfig.by===d.SCENARIOS;t.forEach(((t,i)=>{const e=this.stackGroups(t);e.forEach(((n,r)=>{let o=null;n.segments.forEach(((t,a)=>{const l=new bt(this.position,this.styles,t.dataPoint,i,n.layout.segments[a],t.scenario,e.length>1?e.length-1-r:a,this.stackConfig.mode,n.layout,h,s);l.draw(this.dataFormatDigits,this.measureScale),o=l})),o&&n.hasValue&&o.drawTotalLabel(this.dataFormatDigits,this.measureScale,Object.assign(Object.assign({},O(this.level,t.category)),{scenario:e.length>1?n.prefix:void 0}))}))}))}drawStackedHeaders(t,i){if(!this.stackConfig||0===t.length)return;const s=t[0];if(this.stackConfig.by!==d.SCENARIOS&&(!s.stackSegments||0===s.stackSegments.length))return;const h=this.stackGroups(s);if(0===h.length)return;const e=i.group().id("StackedHeaders"),n=this.position.getBarPositionX(),r=this.position.getStackedHeaderPositionY(),o=(t,i)=>{new dt(e,t,r,"STACK_HEADER",i,this.styles,st.Bottom,st.Center).draw()};if(h.length>1)return void h.forEach((t=>{o(n+(t.layout.positive-t.layout.negative)/2*t.segments[0].dataPoint.pixelPerUnit,this.i18n.get(t.prefix+"1")||t.prefix.toUpperCase())}));const[a]=h;a.segments.forEach(((t,i)=>{const{start:s,end:h}=a.layout.segments[i];o(n+(s+h)/2*t.dataPoint.pixelPerUnit,this.i18n.get(t.scenario)||t.scenario)}))}getVarianceType(){return this.variancesDataModel.length>0?this.variancesDataModel[0].type:J.NONE}calculateLeftSideWidth(t){var i,s,h;let e=0;const n=this.styles.fontStyles.size*this.styles.scaleFactors.labelToBar;if(J.NONE===t&&this.isStacked())this.stackSides.negative>0&&(e=this.stackSides.negative*this.pixelPerUnit,this.stackSides.minTotal<0&&(e+=n+this.calculateTotalLabelWidth(this.stackSides.minTotal))),this.stackLabelClearance.left>0&&(e=Math.max(e,this.stackLabelClearance.left*this.pixelPerUnit+this.calculateCategoryWidth()));else if(J.NONE===t&&null!=(null===(i=this.smallestDataPointValue)||void 0===i?void 0:i.value)&&this.smallestDataPointValue.value<0){const t=this.calculateTextBoxWidth(this.smallestDataPointValue.value);e=Math.abs(this.smallestDataPointValue.getScaledUnit())+n+t}else if(J.RELATIVE===t&&null!=(null===(s=this.smallestVarianceDataPointValue)||void 0===s?void 0:s.value)&&this.smallestVarianceDataPointValue.value<0){const t=this.calculatePercentageTextBoxWidth(this.smallestVarianceDataPointValue.value);e=Math.abs(this.smallestVarianceDataPointValue.getScaledPercentUnit())+n+t}else if(J.ABSOLUTE===t&&null!=(null===(h=this.smallestVarianceDataPointValue)||void 0===h?void 0:h.value)&&this.smallestVarianceDataPointValue.value<0){const t=this.calculateTextBoxWidth(this.smallestVarianceDataPointValue.value);e=Math.abs(this.smallestVarianceDataPointValue.getScaledUnit())+n+t}return e<=this.titleLength?this.titleLength:e}calculateRightSideWidth(t){var i,s,h;if(this.isStacked()){const t=this.styles.fontStyles.size*this.styles.scaleFactors.labelToBar,i=this.calculateTextBoxWidth(this.stackSides.maxTotal);let s=this.stackSides.positive*this.pixelPerUnit+t+i;return this.stackSides.minTotal<0&&(s=Math.max(s,this.stackLabelClearance.right*this.pixelPerUnit+this.position.getCategoryToAxisSpaceing()+this.calculateCategoryWidth())),Math.max(s,this.titleLength)}let e=0;const n=this.styles.fontStyles.size*this.styles.scaleFactors.labelToBar;if(J.NONE===t&&null!=(null===(i=this.highestDataPointValue)||void 0===i?void 0:i.value)&&this.highestDataPointValue.value>=0){const t=this.calculateTextBoxWidth(this.highestDataPointValue.value);e=Math.abs(this.highestDataPointValue.getScaledUnit())+n+t}else if(J.RELATIVE===t&&null!=(null===(s=this.highestVarianceDataPointValue)||void 0===s?void 0:s.value)&&this.highestVarianceDataPointValue.value>=0){const t=this.calculatePercentageTextBoxWidth(this.highestVarianceDataPointValue.value);e=Math.abs(this.highestVarianceDataPointValue.getScaledPercentUnit())+n+t}else if(J.ABSOLUTE===t&&null!=(null===(h=this.highestVarianceDataPointValue)||void 0===h?void 0:h.value)&&this.highestVarianceDataPointValue.value>=0){const t=this.calculateTextBoxWidth(this.highestVarianceDataPointValue.value);e=Math.abs(this.highestVarianceDataPointValue.getScaledUnit())+n+t}return e<=this.titleLength?this.titleLength:e}populateDimensionStackSegments(t,i,s){if(0===this.rowCount||!this.fromExpr||0===t.length)return;const h={[c.ROWGROUP]:"category",[c.ROWGROUPINDEX]:"category",[c.CATEGORY]:"subCategory",[c.CATEGORYINDEX]:"subCategory"}[s];if(!h)return;const e=s.toString(),n=t[0];let r;try{r=this.db.exec(`SELECT [${e}] as displayGroup, [${h}] as stackLabel, SUM([${n}] * transformOperator(operation)) as stackValue FROM ${this.fromExpr} GROUP BY [${e}], [${h}]`)}catch(t){return void this.failQuery(t)}const o=new Map;for(const t of r){const i=t.displayGroup;o.has(i)||o.set(i,[]),null!=t.stackValue&&null!=t.stackLabel&&o.get(i).push({label:t.stackLabel,value:t.stackValue})}for(const t of this.dataModel){const i=o.get(t.category);t.stackSegments=i&&i.length>0?i.map((i=>{const s=new nt(i.value,n,this.pixelPerUnit,tt.NEU);return s.key=Object.assign(Object.assign({},O(this.level,t.category)),{[h]:i.label,scenario:n}),{label:i.label,value:i.value,dataPoint:s}})):[]}}hasNoData(){return 0===this.dataModel.length}setAvailableWidth(t){if(this.pixelPerUnit<=0||t<=0)this.overflowConfig=null;else if(null==this.stackConfig){if(this.overflowConfig=this.calculateOverflowConfig(t),this.overflowConfig){const{cutWidth:t,overdriveZoneWidth:i,breakGap:s}=this.overflowConfig,h=t+i+s;this.variancesDataModel&&this.variancesDataModel.length>0?(this.highestVarianceDataPointValue.getScaledUnit()>t&&(this.highestVarianceDataPointValue=new nt(h,this.highestVarianceDataPointValue.scenario,1,this.highestVarianceDataPointValue.variance)),null!=this.smallestVarianceDataPointValue.value&&Math.abs(this.smallestVarianceDataPointValue.getScaledUnit())>t&&(this.smallestVarianceDataPointValue=new nt(-h,this.smallestVarianceDataPointValue.scenario,1,this.smallestVarianceDataPointValue.variance))):(this.highestDataPointValue.getScaledUnit()>t&&(this.highestDataPointValue=new nt(h,this.highestDataPointValue.scenario,1,this.highestDataPointValue.variance)),null!=this.smallestDataPointValue.value&&Math.abs(this.smallestDataPointValue.getScaledUnit())>t&&(this.smallestDataPointValue=new nt(-h,this.smallestDataPointValue.scenario,1,this.smallestDataPointValue.variance))),this.updatePosition()}}else this.overflowConfig=null}calculateOverflowConfig(t){const i=this.variancesDataModel&&this.variancesDataModel.length>0;if(this.getVarianceType()===J.RELATIVE)return null;const s=i?this.highestVarianceDataPointValue:this.highestDataPointValue,h=i?this.smallestVarianceDataPointValue:this.smallestDataPointValue,e=s.getScaledUnit(),n=null!=h.value?Math.abs(h.getScaledUnit()):0,r=Math.max(e,n);if(r<=0)return null;const o=this.styles.fontStyles.size,a=o*this.styles.scaleFactors.labelToBar,l=1.5*o,c=.3*o,u=.8*o,d=t-this.position.getAxisPositionX()-this.styles.padding.left-this.styles.padding.right-a-this.calculateTextBoxWidth(s.value||0)-l-c;if(d<=u)return null;const f=d-u;return r<=f?null:{cutWidth:d,overdriveZoneWidth:l,breakGap:c,maxOverflow:r-f,scenarioCutOffset:u}}}const Pt=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.tableName="",this.dataVersion=0,this.chartTitle="",this.scenarios=[],this.variances=[],this.hideCategories=!1,this.pixelPerUnit=10,this.pixelPerPercentage=50,this.limit=0,this.i18n=new Map,this.order={hierarchy:[],direction:b.ASC},this.level=c.CATEGORY,this.filter="",this.measureScale="_",this.measureUnit="",this.showMeasureScale=!0,this.dataFormatDigits={percent:2,decimal:1},this.stackConfig=null,this.parentDimensions={width:0,height:0},H(this)}getDb(){return this.stores||(this.stores=V(this.element)),this.stores.db.db}render(){var t,i,e,n;if(void 0===this.chart||void 0!==this.queryError)return s(h,null);if(this.chart.hasNoData()){const i=null!==(t=this.i18n.get("no-data"))&&void 0!==t?t:"No Data";return s(h,{class:"no-data"},s("div",{class:"empty-state"},i))}return s(h,null,s("div",{innerHTML:null===(i=this.pattern)||void 0===i?void 0:i.toString(),class:"hidePatternContainer"}),s("div",{class:this.showMeasureScale?"footer":"footer-hide"},null===(e=this.chart)||void 0===e?void 0:e.getFooter()),s("div",{innerHTML:null===(n=this.chart)||void 0===n?void 0:n.toString()}))}syncQueryError(){var t,i;this.queryError=null!==(t=this.measureScaleError)&&void 0!==t?t:null===(i=this.chart)||void 0===i?void 0:i.getQueryError(),F(this.errors,this.queryError)}async componentWillLoad(){var t;const i=this.getDb(),s=this.prepareConfig(),h=this.prepareStyle();this.chart=new wt(new P(this.ruleSetConfig),i,this.tableName,s,h),this.chart.setI18n(this.i18n);const e=s.pixelPerUnit<=0;this.autoFitScaling(s,h),this.chart.setAvailableWidth(e?0:(null===(t=this.parentDimensions)||void 0===t?void 0:t.width)||0),this.pattern=new q(this.chart.styles),this.chart.setPattern("hatched",this.pattern.getFCPolygonPattern()),this.syncQueryError()}async componentWillUpdate(){var t;if(null==this.chart)return;const i=this.prepareConfig(),s=this.prepareStyle();this.chart.setI18n(this.i18n),this.chart.setStyles(s),this.chart.setRuleSet(new P(this.ruleSetConfig)),this.chart.setConfig(i);const h=i.pixelPerUnit<=0;this.autoFitScaling(i,s),this.chart.setAvailableWidth(h?0:(null===(t=this.parentDimensions)||void 0===t?void 0:t.width)||0),this.pattern=new q(this.chart.styles),this.chart.setPattern("hatched",this.pattern.getFCPolygonPattern()),this.syncQueryError()}autoFitScaling(t,i){var s;const h=t.pixelPerUnit<=0,e=t.pixelPerPercentage<=0;if(!h&&!e)return;const n=()=>{var i;null===(i=this.reportAutoScaling)||void 0===i||i.call(this,{unit:h?t.pixelPerUnit:void 0,percentage:e?t.pixelPerPercentage:void 0})},r=null===(s=this.parentDimensions)||void 0===s?void 0:s.width,o=this.getDb(),a=()=>{this.chart=new wt(new P(this.ruleSetConfig),o,this.tableName,t,i),this.chart.setI18n(this.i18n)},l=()=>(this.chart.layout(),this.chart.getAllocatedCanvasWidth());if(!r||r<=0)return h&&(t.pixelPerUnit=1),e&&(t.pixelPerPercentage=50),a(),void n();h&&(t.pixelPerUnit=1),e&&(t.pixelPerPercentage=1),a();let c=l();if(c<=0)return void n();const u=Math.max(B,.9*r/c);let d=!1,f=!1,v=null;for(let i=0;i<=3;i++){const i=j({target:r,measured:c,unitExtent:h?this.chart.getUnitBarExtent():0,pctExtent:e?this.chart.getPercentBarExtent():0,currentPpu:t.pixelPerUnit,currentPpp:t.pixelPerPercentage});if(void 0===i.ppu&&void 0===i.ppp)break;if(h&&void 0!==i.ppu&&(t.pixelPerUnit=i.ppu,d=!0),e&&void 0!==i.ppp&&(t.pixelPerPercentage=i.ppp,f=!0),a(),c=l(),c<=r+.5&&(v={ppu:t.pixelPerUnit,ppp:t.pixelPerPercentage},c>=.98*r))break}let p=!1;if(h&&!d&&(t.pixelPerUnit=u,p=!0),e&&!f&&(t.pixelPerPercentage=u,p=!0),c>r+.5){if(v)d&&(t.pixelPerUnit=v.ppu),f&&(t.pixelPerPercentage=v.ppp);else{const i=r/c;h&&(t.pixelPerUnit=Math.max(B,t.pixelPerUnit*i)),e&&(t.pixelPerPercentage=Math.max(B,t.pixelPerPercentage*i))}p=!0}p&&a(),n()}async componentWillRender(){}componentDidLoad(){}componentDidUpdate(){}prepareConfig(){const t=this.getDb(),i=Y(t,this.tableName,this.filter);return this.measureScaleError=void 0,new et(new ot,new p(new z),new z,new v,t,i,(t=>{this.measureScaleError=X(t)})).adapt({scenarios:this.scenarios,variances:this.variances,title:this.chartTitle,hideCategories:this.hideCategories,pixelPerUnit:this.pixelPerUnit,pixelPerPercentage:this.pixelPerPercentage,level:this.level,limit:this.limit,sortOrder:this.order,filter:this.filter,measureScale:this.measureScale,measureUnit:this.measureUnit,showMeasureScale:this.showMeasureScale,dataFormatDigits:this.dataFormatDigits,stackConfig:this.stackConfig})}prepareStyle(){var t,i;const s=new lt(new ut,new r,new o(new $),new G(new $),new a).adapt(this.styles);return s.locale=(null===(i=null===(t=V(this.element).context)||void 0===t?void 0:t.state)||void 0===i?void 0:i.locale)||"de",s}get element(){return this}static get style(){return':host(.no-data){display:block;box-sizing:border-box;width:100%;height:100%}:host(.no-data)>div{float:none;width:100%;height:100%}:host(.no-data) .no-data~.no-data{display:none}.empty-state{box-sizing:border-box;display:flex;align-items:center;justify-content:center;float:none;width:100%;height:100%;min-height:3em;margin:0;padding:0.5em;overflow:hidden;border:0.1em dashed #ddd;color:#808080;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);font-style:normal;text-align:center}:host{display:inline-block;position:relative;overflow:hidden;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000)}.container{display:flex;flex-direction:row}.background-image{display:flex;flex-wrap:wrap;justify-content:flex-end}.categories{text-align:right;font-size:var(--bn-font-size, 1em);font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.label-bg{fill:var(--bn-font-background, white);opacity:0.7}.label-text{text-align:right;font-size:var(--bn-font-size, 1em);font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.axis-title{text-align:center;font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.axis-ac{stroke:black;stroke-width:0.1em}.axis-pp{stroke:grey;stroke-width:0.1em}.axis-fc{stroke:black;stroke-dasharray:2;stroke-width:0.1em}.axis-pl{stroke:white;stroke-width:0.1em;outline-offset:0em;outline:0.1em solid black}canvas{image-rendering:-moz-crisp-edges;image-rendering:-webkit-crisp-edges;image-rendering:pixelated;image-rendering:crisp-edges}.measure{font-weight:bold}span{display:inline-block}.hidePatternContainer{height:0;width:0}div{float:left}svg#drawCanvas{display:block}.footer{margin:0.2em;font-size:0.6em}.footer-hide{margin:0.2em;font-size:0.6em;opacity:0}'}},[1,"bn-chart-structure-renderer",{tableName:[1,"table-name"],dataVersion:[2,"data-version"],chartTitle:[1,"chart-title"],scenarios:[16],variances:[16],hideCategories:[4,"hide-categories"],pixelPerUnit:[2,"pixel-per-unit"],pixelPerPercentage:[2,"pixel-per-percentage"],reportAutoScaling:[16],errors:[16],limit:[2],styles:[1040],i18n:[1040],order:[16],level:[1],filter:[1],measureScale:[1,"measure-scale"],measureUnit:[1,"measure-unit"],showMeasureScale:[4,"show-measure-scale"],dataFormatDigits:[16],stackConfig:[16],parentDimensions:[16],ruleSetConfig:[16]}]);function yt(){"undefined"!=typeof customElements&&["bn-chart-structure-renderer"].forEach((t=>{"bn-chart-structure-renderer"===t&&(customElements.get(e(t))||customElements.define(e(t),Pt))}))}export{Pt as B,yt as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,H as s,h as i,t as e}from"./p-D6YGOYV1.js";import{I as n,C as r}from"./p-BQMKgvEC.js";import{b as o,D as a,a as c}from"./p-xhiPDAZa.js";import{F as h,I as l}from"./p-xpguaboj.js";import{A as p}from"./p-CMM8vtHW.js";import{D as u,w as f}from"./p-DEHnizot.js";import{a as d,c as m}from"./p-CxPSvrcF.js";import{S as b}from"./p-oJjMz8JF.js";import{s as w}from"./p-CyUmrWfW.js";class _{constructor(){}createMeasures(t,s,i){if(this.allMeasuresUseSameUnit(t)){const e=t.length;let r="",o="";for(let a=0;a<e;a++){let c="";a>0&&(c=s.get("SEPARATOR_WS")),e>1&&a===e-1&&(c=s.get("CONNECTOR_WS")),i===n.ALL?(r=(s.get(r)||r)+c+(s.get(t[a].name)||t[a].name),o=s.get(t[a].unit)||t[a].unit):(r=r+c+t[a].name,o=t[a].unit)}return[{name:r,unit:o}]}return t}createDimension(t,s,i,e,n,r="de"){let a="";if(void 0!==s){const t=new o;t.setLocale(r),a=t.getDateLinkString(s.start,s.end,s.link,s.format,n)}return a+t.map((t=>{let s="";return null!=i&&null!=i.hierarchy&&i.hierarchy.find((s=>s===t))&&(s=e.get("asc"===i.direction?"ORDER_asc":"ORDER_desc")),"".concat(" ",h.translateScenarioLabel(t,e),s)})).toString()}allMeasuresUseSameUnit(t){const s=new Map;return t.forEach((function(t){s.set(t.unit,!0)})),1===s.size}}class v{constructor(){this.businessunit="",this.measures=[],this.scenarios=[],this.i18nMode=n.ALL,this.intervalSpanLimit=32,this.locale="de"}}class C{constructor(t,s,i,e){this.measureEntryAdapter=t,this.timePeriodAdapter=s,this.orderAdapter=i,this.stringAdapter=e}adapt(t){const s=new v;return r.isString(t.businessunit)&&(s.businessunit=t.businessunit),r.isArray(t.measures)&&(s.measures=p.adaptArray(t.measures,this.measureEntryAdapter)),r.isArray(t.scenarios)&&(s.scenarios=p.adaptArray(t.scenarios,this.stringAdapter)),r.isExisting(t.timeperiod)&&(s.timeperiod=this.timePeriodAdapter.adapt(t.timeperiod)),r.isNumber(t.intervalSpanLimit)&&(s.intervalSpanLimit=t.intervalSpanLimit),r.isExisting(t.i18nMode)&&(s.i18nMode=t.i18nMode),r.isExisting(t.order)&&(s.order=this.orderAdapter.adapt(t.order)),r.isString(t.locale)&&(s.locale=t.locale),s}default(){return new v}}var R;!function(t){t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.DIRTY=1]="DIRTY"}(R||(R={}));class M{constructor(t){this.i18n=new Map,this.unit="",this.measures=[],this.dimension="",this.config=new v,this.state=R.DIRTY,this.ruleSet=t||new l,this.dataSetFactory=new _,this.state=R.DIRTY,this.setI18n(new Map)}setRuleSet(t){this.ruleSet=t||new l}setI18n(t){this.state=R.DIRTY;const s=new Map([["SEPARATOR_WS",", "],["in","in"],["ORDER_asc","↑"],["ORDER_desc","↓"],["ac1","AC"],["pp1","PY"],["fc1","FC"],["pl1","PL"],["ac2","AC2"],["pp2","PY2"],["fc2","FC2"],["pl2","PL2"],["ac3","AC3"],["pp3","PY3"],["fc3","FC3"],["pl3","PL3"],["ac4","AC4"],["pp4","PY4"],["fc4","FC4"],["pl4","PL4"],["category"," "],["operation"," "],["thereof","davon"],["part_of","in % von"],["ibcssymbol_delta_ac","Δ{%}"],["ibcssymbol_delta_generic","Δ({%})"],["ibcssymbol_delta_ac_relative","Δ{%}%"],["ibcssymbol_delta_generic_relative","Δ({%})%"],["SUM_TOTAL","❖"],["CONNECTOR_WS"," und "]]);this.i18n=new Map([...s,...t||new Map])}update(){return R.DIRTY===this.state&&(this.unit=this.config.businessunit,this.measures=this.dataSetFactory.createMeasures(this.config.measures,this.i18n,this.config.i18nMode),this.dimension=this.dataSetFactory.createDimension(this.config.scenarios,this.config.timeperiod,this.config.order,this.i18n,this.config.intervalSpanLimit,this.config.locale),this.state=R.UP_TO_DATE),this}setConfig(t){this.config=this.initConfig(t)}initConfig(t){this.state=R.DIRTY;const s=t,i=this;return t.scenarios.sort(((t,s)=>i.ruleSet.getScenarioSorIndex(t)-i.ruleSet.getScenarioSorIndex(s))),s}}class S{constructor(t="",s=""){this.name=t,this.unit=s}}class y{construnctor(){}adapt(t){const s=new S;return r.isString(t.name)&&(s.name=t.name),r.isString(t.unit)&&(s.unit=t.unit),s}default(){return new S("","")}}class E{constructor(t=u.now(),s=u.now(),i=a.AUTO,e=c.AUTO){this.start=t,this.end=s,this.format=i,this.link=e}}class g{construnctor(){}adapt(t){const s=new E;return r.isDate(t.start)&&(s.start=t.start),r.isDate(t.end)&&(s.end=t.end),r.isExisting(t.format)&&(s.format=t.format),r.isExisting(t.link)&&(s.link=t.link),s}default(){return new E}}const A=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.businessUnit="",this.scenarios=[],this.measures=[],this.intervalSpanLimit=28,this.order={hierarchy:[],direction:d.ASC},this.i18n=new Map,this.i18nMode=n.ALL,this.locale="de",this.title=new M(new l),f(this)}render(){return i("div",{key:"ecc33a660538732ceea3e4620afabfcb8ffbce95"},i("div",{key:"cb1c3b074817a4c0647419fdc0f2b94c113ebc09",innerHTML:w(this.title.unit)}),i("div",{key:"92b6ef66f67d33bd3bff6a760d1fc1bee605105d"},this.title.measures.map(((t,s)=>i("span",null,this.isFirstElement(s)?this.title.i18n.get("SEPARATOR_WS"):"",i("span",{class:"measure"},t.name)," ",t.unit?this.title.i18n.get("in"):""," ",t.unit)))),i("div",{key:"74cc33e0e63592e5422b3c0e5c7a52715210c486"},this.title.dimension))}componentWillLoad(){const t=this.prepareConfig();this.title=new M(new l(this.ruleSetConfig)),this.title.setI18n(this.i18n),this.title.setConfig(t)}componentWillUpdate(){const t=this.prepareConfig();this.title.setI18n(this.i18n),this.title.setRuleSet(new l(this.ruleSetConfig)),this.title.setConfig(t)}componentWillRender(){this.title.update()}isFirstElement(t){return 0!==t}prepareConfig(){return new C(new y,new g,new m(new b),new b).adapt({businessunit:this.businessUnit,measures:this.measures,scenarios:this.scenarios,timeperiod:this.timeperiod,intervalSpanLimit:this.intervalSpanLimit,i18nMode:this.i18nMode,order:this.order,locale:this.locale})}static get style(){return':host{display:block;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000)}.measure{font-weight:bold}div{background-color:var(--bn-font-background, white);color:var(--bn-font-color, black)}p{margin:0}'}},[1,"bn-title-renderer",{businessUnit:[1537,"business-unit"],scenarios:[16],measures:[16],timeperiod:[16],intervalSpanLimit:[2,"interval-span-limit"],order:[16],i18n:[1040],i18nMode:[1,"i18n-mode"],locale:[1],ruleSetConfig:[16]}]);function O(){"undefined"!=typeof customElements&&["bn-title-renderer"].forEach((t=>{"bn-title-renderer"===t&&(customElements.get(e(t))||customElements.define(e(t),A))}))}export{A as B,O as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{S as n}from"./p-BQMKgvEC.js";import{r}from"./p-fCjsrD7I.js";const t=/^(dr|d)((?:ac|pp|fc|pl)[1-4])_((?:ac|pp|fc|pl)[1-4])(?:_(pos|neg|neu))?$/;class s{constructor(n,r,t){this.type=n,this.base=r,this.delta=t}static parse(n){const r=t.exec(n);return null===r?null:new s(r[1],r[2],r[3])}compute(n,t){var s;return null==n||null==t?null:"dr"===this.type?0===t?null:null!==(s=r(n-t,t))&&void 0!==s?s:null:n-t}}function u(r){const t=r.trim();if(Object.values(n).includes(t))return{kind:"scenario",slot:t};const u=s.parse(t);return null!==u?{kind:"variance",measure:u}:null}function i(n){return n.replace(/\d+$/,"")}function o(n){return n.replace(/^[a-z]+/,"")}function l(n){var r;return"dr"===(null===(r=s.parse(n.trim()))||void 0===r?void 0:r.type)}function c(n){if(!l(n.measure))return n;const r=n=>void 0===n?void 0:n/100;return Object.assign(Object.assign({},n),{min:r(n.min),max:r(n.max),refLine:r(n.refLine),highlight:n.highlight&&{from:r(n.highlight.from),to:r(n.highlight.to)}})}export{c as a,o as b,l as i,u as r,i as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,H as e,h as s,a as o,t as n}from"./p-D6YGOYV1.js";import{w as i}from"./p-DEHnizot.js";import{w as r}from"./p-jbp6YiHf.js";import{w as a}from"./p-CGI6XIaK.js";const f=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),i(this),this.errors=a(this),this.componentStyle=r(this)}render(){return s(o,{key:"66b35f747b56462ca898e7f475edf580eeb5edc0",style:this.prepareStyle()},s("slot",{key:"deaa11cb68cffbdba8b6a4508417c32c0a949d6b"}))}prepareStyle(){return{"font-family":this.componentStyle((t=>t.global.fontFamily)),"font-size":`${this.componentStyle((t=>t.global.fontSizePx))}px`,"--bn-font-family":this.componentStyle((t=>t.global.fontFamily))||"'Noto Sans', sans-serif","--bn-font-size":`${this.componentStyle((t=>t.global.fontSizePx))||13.3333}px`,"--bn-font-color":this.componentStyle((t=>t.global.fontColor))||"#000000","--bn-font-background":this.componentStyle((t=>t.global.fontBackgroundColor))||"#ffffff"}}get element(){return this}static get style(){return':host{display:flex;flex-direction:column;justify-content:space-between;flex:1;min-height:0;padding:0.25em;margin:0.5em;background-origin:content-box;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000)}:host(.border){box-sizing:border-box;-webkit-box-sizing:border-box;border:0.1em solid #ddd}div{color:var(--bn-font-color, black)}'}},[257,"bn-card",{selectedStyle:[513,"selected-style"]}]);function b(){"undefined"!=typeof customElements&&["bn-card"].forEach((t=>{"bn-card"===t&&(customElements.get(n(t))||customElements.define(n(t),f))}))}export{f as C,b as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as r}from"./p-D6YGOYV1.js";import{a as e}from"./p-DEHnizot.js";let o=(r=21)=>{let e="",o=crypto.getRandomValues(new Uint8Array(r|=0));for(;r--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&o[r]];return e};function t(r,e,o=!1){r.remove(null!==e&&o?"WARN_overflow":"ERR_overflow"),null===e?r.remove("WARN_overflow"):r.addOrReplace(o?{id:"ERR_overflow",type:"error",message:e}:{id:"WARN_overflow",type:"warning",message:e})}const a=t=>{const{set:a,modify:s}=e([],(e=>{const o=r(t);0===e.length?o.removeAttribute("has-error"):o.setAttribute("has-error",JSON.stringify(e))}));return{clear:()=>{a([])},replace:r=>{a(r.map((r=>(r.id||(r.id=o()),r))))},add:r=>(r.id||(r.id=o()),s((e=>[...e,r])),r.id),addOrReplace:r=>(s((e=>[...e.filter((e=>e.id!==r.id)),r])),r.id),remove:r=>{s((e=>e.filter((e=>e.id!==r))))}}};export{t as r,a as w}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as t}from"./p-BQMKgvEC.js";class a{static adaptDefaultString(a){return t.isString(a)?a.trim():""}static adaptArray(a,r){const s=[];return t.isArray(a)&&a.forEach((t=>{s.push(r.adapt(t))})),s}}export{a as A}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as t}from"./p-BQMKgvEC.js";const n=[["rowGroup","data-bn-row-group"],["category","data-bn-category"],["subCategory","data-bn-sub-category"],["date","data-bn-date"],["scenario","data-bn-scenario"],["row","data-bn-row"]],r="data-bn-part";function e(t,e){const a={};if(!t)return a;for(const[r,e]of n){const n=t[r];null!=n&&""!==n&&(a[e]=String(n))}return e&&(a[r]=e),a}function a(t){const e=t.getAttribute(r);if(!e)return;const a={part:e};for(const[r,e]of n){const n=t.getAttribute(e);null!=n&&(a[r]=n)}return a}function o(t){if(!t)return;const n=/^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2})/.exec(t);return n?"00:00:00"===n[2]?n[1]:`${n[1]}T${n[2]}`:t}function u(t,n){return null==n?{}:t.startsWith("rowGroup")?{rowGroup:String(n)}:t.startsWith("subCategory")?{subCategory:String(n)}:{category:String(n)}}function f(t){return"fc"===t||"hatched"===t?"hatched":"solid"===t||"outlined"===t?t:void 0}class s{constructor(t="#000000",n="#000000",r=.1){this.stroke=t,this.fill=n,this.width=r}}class d{adapt(n){const r=new s(n.stroke,n.fill,n.width);return r.fillpattern=f(n.fillpattern),"outlined"===r.fillpattern&&(r.fill="transparent"),t.isString(n.dasharray)&&(r.dasharray=n.dasharray),r}default(){return new s("#000000","#000000",.3)}defaultAC(){return new s("#000000","#000000",.3)}defaultFC(){const t=new s("#000000","#000000",.3);return t.dasharray="10 5 5 5",t.fillpattern="hatched",t}defaultPP(){return new s("#999999","#999999",.3)}defaultPL(){return new s("#000000","#ffffff",.3)}defaultPos(){return new s("#00ff00","#00ff00",.3)}defaultNeg(){return new s("#ff0000","#ff0000",.3)}defaultNeu(){return new s("#999999","#999999",.3)}}export{d as S,e as d,u as l,f as n,o as p,a as r}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{m as r}from"./p-BYBpC0EO.js";var n=Uint8Array,a=Uint16Array,e=Int32Array,i=new n([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),o=new n([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),t=new n([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),f=function(r,n){for(var i=new a(31),o=0;o<31;++o)i[o]=n+=1<<r[o-1];var t=new e(i[30]);for(o=1;o<30;++o)for(var f=i[o];f<i[o+1];++f)t[f]=f-i[o]<<5|o;return{b:i,r:t}},v=f(i,2),l=v.b,u=v.r;l[28]=258,u[258]=28;for(var c=f(o,0).b,w=new a(32768),d=0;d<32768;++d){var s=(43690&d)>>1|(21845&d)<<1;w[d]=((65280&(s=(61680&(s=(52428&s)>>2|(13107&s)<<2))>>4|(3855&s)<<4))>>8|(255&s)<<8)>>1}var h=function(r,n,e){for(var i=r.length,o=0,t=new a(n);o<i;++o)r[o]&&++t[r[o]-1];var f,v=new a(n);for(o=1;o<n;++o)v[o]=v[o-1]+t[o-1]<<1;if(e){f=new a(1<<n);var l=15-n;for(o=0;o<i;++o)if(r[o])for(var u=o<<4|r[o],c=n-r[o],d=v[r[o]-1]++<<c,s=d|(1<<c)-1;d<=s;++d)f[w[d]>>l]=u}else for(f=new a(i),o=0;o<i;++o)r[o]&&(f[o]=w[v[r[o]-1]++]>>15-r[o]);return f},p=new n(288);for(d=0;d<144;++d)p[d]=8;for(d=144;d<256;++d)p[d]=9;for(d=256;d<280;++d)p[d]=7;for(d=280;d<288;++d)p[d]=8;var m=new n(32);for(d=0;d<32;++d)m[d]=5;var b=h(p,9,1),g=h(m,5,1),k=function(r){for(var n=r[0],a=1;a<r.length;++a)r[a]>n&&(n=r[a]);return n},y=function(r,n,a){var e=n/8|0;return(r[e]|r[e+1]<<8)>>(7&n)&a},x=function(r,n){var a=n/8|0;return(r[a]|r[a+1]<<8|r[a+2]<<16)>>(7&n)},E=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],A=function(r,n,a){var e=new Error(n||E[r]);if(e.code=r,Error.captureStackTrace&&Error.captureStackTrace(e,A),!a)throw e;return e},T=new n(0);function U(r,a){var e,f,v=function(r){31==r[0]&&139==r[1]&&8==r[2]||A(6,"invalid gzip data");var n=r[3],a=10;4&n&&(a+=2+(r[10]|r[11]<<8));for(var e=(n>>3&1)+(n>>4&1);e>0;e-=!r[a++]);return a+(2&n)}(r);return v+8>r.length&&A(6,"invalid gzip data"),function(r,a,e,f){var v=r.length;if(!v||a.f&&!a.l)return e||new n(0);var u=!e,w=u||2!=a.i;u&&(e=new n(3*v));var d,s,p=function(r){var a=e.length;if(r>a){var i=new n(Math.max(2*a,r));i.set(e),e=i}},m=a.f||0,E=a.p||0,T=a.b||0,U=a.l,z=a.d,D=a.m,j=a.n,B=8*v;do{if(!U){m=y(r,E,1);var F=y(r,E+1,3);if(E+=3,!F){var I=r[(N=4+((E+7)/8|0))-4]|r[N-3]<<8,M=N+I;if(M>v){A(0);break}w&&p(T+I),e.set(r.subarray(N,M),T),a.b=T+=I,a.p=E=8*M,a.f=m;continue}if(1==F)U=b,z=g,D=9,j=5;else if(2==F){var O=y(r,E,31)+257,C=y(r,E+10,15)+4,Y=O+y(r,E+5,31)+1;E+=14;for(var q=new n(Y),G=new n(19),H=0;H<C;++H)G[t[H]]=y(r,E+3*H,7);E+=3*C;var J=k(G),K=(1<<J)-1,L=h(G,J,1);for(H=0;H<Y;){var N,P=L[y(r,E,K)];if(E+=15&P,(N=P>>4)<16)q[H++]=N;else{var Q=0,R=0;for(16==N?(R=3+y(r,E,3),E+=2,Q=q[H-1]):17==N?(R=3+y(r,E,7),E+=3):18==N&&(R=11+y(r,E,127),E+=7);R--;)q[H++]=Q}}var S=q.subarray(0,O),V=q.subarray(O);D=k(S),j=k(V),U=h(S,D,1),z=h(V,j,1)}else A(1);if(E>B){A(0);break}}w&&p(T+131072);for(var W=(1<<D)-1,X=(1<<j)-1,Z=E;;Z=E){var $=(Q=U[x(r,E)&W])>>4;if((E+=15&Q)>B){A(0);break}if(Q||A(2),$<256)e[T++]=$;else{if(256==$){Z=E,U=null;break}var _=$-254;$>264&&(_=y(r,E,(1<<(ar=i[H=$-257]))-1)+l[H],E+=ar);var rr=z[x(r,E)&X],nr=rr>>4;if(rr||A(3),E+=15&rr,V=c[nr],nr>3){var ar=o[nr];V+=x(r,E)&(1<<ar)-1,E+=ar}if(E>B){A(0);break}w&&p(T+131072);var er=T+_;if(T<V){var ir=0-V,or=Math.min(V,er);for(ir+T<0&&A(3);T<or;++T)e[T]=f[ir+T]}for(;T<er;++T)e[T]=e[T-V]}}a.l=U,a.p=Z,a.b=T,a.f=m,U&&(m=1,a.m=D,a.d=z,a.n=j)}while(!m);return T!=e.length&&u?(d=e,(null==(s=T)||s>d.length)&&(s=d.length),new n(d.subarray(0,s))):e.subarray(0,T)}(r.subarray(v,-8),{i:2},new n(((e=r)[(f=e.length)-4]|e[f-3]<<8|e[f-2]<<16|e[f-1]<<24)>>>0),a)}var z="undefined"!=typeof TextDecoder&&new TextDecoder;try{z.decode(T,{stream:!0})}catch(r){}function D(n){return r(n)}function j(r){const n=r.indexOf(":");if(-1===n)throw new Error("Invalid compressed format: missing ':' separator");const a=r.slice(0,n),e=r.slice(n+1),i=atob(e),o=new Uint8Array(i.length);for(let r=0;r<i.length;r++)o[r]=i.charCodeAt(r);const t=U(o);return{hash:a,json:(new TextDecoder).decode(t)}}export{D as c,j as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as t,g as s}from"./p-D6YGOYV1.js";import{g as e,c as r}from"./p-BVKLCz2k.js";import{r as o}from"./p-DEHnizot.js";import{i as a,f as l,r as u}from"./p-DsOaqeTN.js";import{m as i}from"./p-B2NXsfMz.js";const n=n=>{let f,m,p,c,b,j=null;const O=()=>{const t=m.ruleSets.state;b=i([t._default||{},t[p]||{}]),c=i([t._system||{},b])},w=()=>{const e=s(n),r=e.getAttribute("ruleset");if(j&&(j.disconnect(),j=null),r&&a(r)){const s=l(e,r);if(p=u(s,"ruleset"),s.length>0){j=new MutationObserver((()=>{p=u(s,"ruleset"),O(),t(n)}));for(const t of s)j.observe(t,{attributes:!0,attributeFilter:["ruleset"]})}}else p=r},z=new MutationObserver((s=>{s.forEach((s=>{"ruleset"===s.attributeName&&(w(),O(),t(n))}))})),D=n.connectedCallback;n.connectedCallback=()=>{const r=s(n);m=e(r),c=m.ruleSets.state._system,z.observe(r,{attributes:!0,attributeFilter:["ruleset"]}),w(),O(),f=m.ruleSets.on("set",(e=>{e!==p&&"_default"!==e||(w(),O(),t(s(n)))})),o(D,n)};const M=n.disconnectedCallback;return n.disconnectedCallback=()=>{z.disconnect(),j&&(j.disconnect(),j=null),o(f),r(s(n)),o(M,n)},(t="all")=>"user"===t?b:c};export{n as w}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as t}from"./p-BQMKgvEC.js";class s{constructor(t,s,i){this.pos=t,this.neg=s,this.neu=i,this.needleHeadColour="#000000"}getSVGStyle(t){return"pos"===t?this.pos:"neg"===t?this.neg:this.neu}}class i{constructor(t){this.svgStyleAdapter=t}adapt(i){const h=new s(this.svgStyleAdapter.defaultPos(),this.svgStyleAdapter.defaultNeg(),this.svgStyleAdapter.defaultNeu());return t.isExisting(i.pos)&&(h.pos=this.svgStyleAdapter.adapt(i.pos)),t.isExisting(i.neg)&&(h.neg=this.svgStyleAdapter.adapt(i.neg)),t.isExisting(i.pp)&&(h.neu=this.svgStyleAdapter.adapt(i.neu)),t.isString(i.needleHeadColour)&&(h.needleHeadColour=i.needleHeadColour),h}default(){return new s(this.svgStyleAdapter.defaultPos(),this.svgStyleAdapter.defaultNeg(),this.svgStyleAdapter.defaultNeu())}}export{i as S}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as t}from"./p-
|
|
1
|
+
import{g as t}from"./p-D6YGOYV1.js";import{r}from"./p-DEHnizot.js";const o=(o,s)=>{let a;const e=new MutationObserver((()=>{var t;a&&s(null!==(t=a.textContent)&&void 0!==t?t:"")})),i=o.connectedCallback;o.connectedCallback=()=>{var n;a=t(o),e.observe(a,{childList:!0,subtree:!0,characterData:!0}),s(null!==(n=a.textContent)&&void 0!==n?n:""),r(i,o)};const n=o.disconnectedCallback;o.disconnectedCallback=()=>{e.disconnect(),r(n,o)}};export{o as w}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as a}from"./p-CMM8vtHW.js";var c,t;!function(a){a.ASC="asc",a.DESC="desc"}(c||(c={})),function(a){a.ROWGROUP="rowGroup",a.ROWGROUPINDEX="rowGroupIndex",a.CATEGORY="category",a.CATEGORYINDEX="categoryIndex",a.SUBCATEGORY="subCategory",a.SUBCATEGORYINDEX="subCategoryIndex",a.AC1="ac1",a.AC2="ac2",a.AC3="ac3",a.AC4="ac4",a.PP1="pp1",a.PP2="pp2",a.PP3="pp3",a.PP4="pp4",a.FC1="fc1",a.FC2="fc2",a.FC3="fc3",a.FC4="fc4",a.PL1="pl1",a.PL2="pl2",a.PL3="pl3",a.PL4="pl4"}(t||(t={}));class r{constructor(a=["category"],t=c.ASC){this.hierarchy=a,this.direction=t}}class o{constructor(a){this.stringAdapter=a}adapt(o){var s;const p=a.adaptArray(o.hierarchy,this.stringAdapter),e=c[null===(s=o.direction)||void 0===s?void 0:s.toUpperCase()]||c.ASC;return new r(p.map((a=>t[a.toUpperCase()]||t.CATEGORY)),e)}default(){return new r(["category"],c.ASC)}}export{t as O,c as a,r as b,o as c}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as a,a as e}from"./p-DD1zlev_.js";function t(t,o,l){var i,n,d,v,h;const s="WARN_overflow",r=a(t),c=parseFloat(null!==(h=null===(v=null===(d=null===(n=null===(i=t.shadowRoot)||void 0===i?void 0:i.querySelector(o))||void 0===n?void 0:n.shadowRoot)||void 0===d?void 0:d.querySelector("svg#drawCanvas"))||void 0===v?void 0:v.getAttribute("height"))&&void 0!==h?h:""),p=Math.max(Number.isNaN(c)?0:Math.floor(c),t.scrollHeight||0),u=t.scrollWidth||0,g=[];r.width>0&&u>r.width+1&&g.push(`width (${Math.round(u)}px > ${Math.round(r.width)}px)`);const x=e(t,p);x>1&&g.push(`height (${Math.round(p)}px > ${Math.round(p-x)}px)`),0!==g.length?l.addOrReplace({id:s,type:"warning",message:`Chart exceeds available ${g.join(" and ")} and will be cut off. Check the scale and aspect values or enlarge the container.`}):l.remove(s)}export{t as c}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as t}from"./p-BQMKgvEC.js";class n{constructor(){this.font="16px Arial",this.family="Arial",this.size=16,this.color="#000000",this.background="#ffffff",this.leading=1.8}}class r{adapt(r){const i=new n;return t.isString(r.font)&&(i.font=r.font),t.isString(r.family)&&(i.family=r.family),t.isNumber(r.size)&&(i.size=r.size),t.isString(r.color)&&(i.color=r.color),t.isString(r.background)&&(i.background=r.background),t.isNumber(r.leading)&&(i.leading=r.leading),i}default(){return new n}}class i{constructor(){this.top=10,this.left=10,this.right=10,this.bottom=10}}class s{adapt(n){const r=new i;return t.isNumber(n.top)&&(r.top=n.top),t.isNumber(n.left)&&(r.left=n.left),t.isNumber(n.right)&&(r.right=n.right),t.isNumber(n.bottom)&&(r.bottom=n.bottom),r}default(){return new i}}class e{constructor(t,n,r,i){this.ac=t,this.fc=n,this.pp=r,this.pl=i}getSVGStyle(t){return"ac"===t?this.ac:"fc"===t?this.fc:"pp"===t?this.pp:"pl"===t?this.pl:this.ac}}class h{constructor(t){this.svgStyleAdapter=t}adapt(n){const r=new e(this.svgStyleAdapter.defaultAC(),this.svgStyleAdapter.defaultFC(),this.svgStyleAdapter.defaultPP(),this.svgStyleAdapter.defaultPL());return t.isExisting(n.ac)&&(r.ac=this.svgStyleAdapter.adapt(n.ac)),t.isExisting(n.fc)&&(r.fc=this.svgStyleAdapter.adapt(n.fc)),t.isExisting(n.pp)&&(r.pp=this.svgStyleAdapter.adapt(n.pp)),t.isExisting(n.pl)&&(r.pl=this.svgStyleAdapter.adapt(n.pl)),r}default(){return new e(this.svgStyleAdapter.defaultAC(),this.svgStyleAdapter.defaultFC(),this.svgStyleAdapter.defaultPP(),this.svgStyleAdapter.defaultPL())}}var u=Object.create,o=Object.defineProperty,c=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,l=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty,p=(t,n)=>()=>(n||(t((n={exports:{}}).exports,n),t=null),n.exports),d=t=>{let n={};for(var r in t)o(n,r,{get:t[r],enumerable:!0});return o(n,Symbol.toStringTag,{value:"Module"}),n},w=(t,n,r)=>(r=null!=t?u(l(t)):{},((t,n,r,i)=>{if(n&&"object"==typeof n||"function"==typeof n)for(var s,e=a(n),h=0,u=e.length;h<u;h++)f.call(t,s=e[h])||undefined===s||o(t,s,{get:(t=>n[t]).bind(null,s),enumerable:!(i=c(n,s))||i.enumerable});return t})(o(r,"default",{value:t,enumerable:!0}),t));const y={},m=[];function v(t,n){if(Array.isArray(t))for(const r of t)v(r,n);else if("object"!=typeof t)g(Object.getOwnPropertyNames(n)),y[t]=Object.assign(y[t]||{},n);else for(const n in t)v(n,t[n])}function b(t){return y[t]||{}}function g(t){m.push(...t)}var x=p(((t,n)=>{n.exports=function(t){try{return!!t()}catch(t){return!0}}})),M=p(((t,n)=>{var r=x();n.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))})),_=p(((t,n)=>{var r=M(),i=Function.prototype,s=i.call,e=r&&i.bind.bind(s,s);n.exports=r?e:function(t){return function(){return s.apply(t,arguments)}}})),j=p(((t,n)=>{var r=_();n.exports=r({}.isPrototypeOf)})),O=p(((t,n)=>{var r=function(t){return t&&t.Math===Math&&t};n.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof global&&global)||r("object"==typeof t&&t)||function(){return this}()||Function("return this")()})),k=p(((t,n)=>{var r=M(),i=Function.prototype,s=i.apply,e=i.call;n.exports="object"==typeof Reflect&&Reflect.apply||(r?e.bind(s):function(){return e.apply(s,arguments)})})),A=p(((t,n)=>{var r=_(),i=r({}.toString),s=r("".slice);n.exports=function(t){return s(i(t),8,-1)}})),S=p(((t,n)=>{var r=A(),i=_();n.exports=function(t){if("Function"===r(t))return i(t)}})),E=p(((t,n)=>{var r="object"==typeof document&&document.all;n.exports=void 0===r&&void 0!==r?function(t){return"function"==typeof t||t===r}:function(t){return"function"==typeof t}})),T=p(((t,n)=>{var r=x();n.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))})),C=p(((t,n)=>{var r=M(),i=Function.prototype.call;n.exports=r?i.bind(i):function(){return i.apply(i,arguments)}})),z=p((t=>{var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);t.f=i?function(t){var n=r(this,t);return!!n&&n.enumerable}:n})),F=p(((t,n)=>{n.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}})),N=p(((t,n)=>{var r=_(),i=x(),s=A(),e=Object,h=r("".split);n.exports=i((function(){return!e("z").propertyIsEnumerable(0)}))?function(t){return"String"===s(t)?h(t,""):e(t)}:e})),D=p(((t,n)=>{n.exports=function(t){return null==t}})),P=p(((t,n)=>{var r=D(),i=TypeError;n.exports=function(t){if(r(t))throw new i("Can't call method on "+t);return t}})),$=p(((t,n)=>{var r=N(),i=P();n.exports=function(t){return r(i(t))}})),R=p(((t,n)=>{var r=E();n.exports=function(t){return"object"==typeof t?null!==t:r(t)}})),L=p(((t,n)=>{n.exports={}})),I=p(((t,n)=>{var r=L(),i=O(),s=E(),e=function(t){return s(t)?t:void 0};n.exports=function(t,n){return arguments.length<2?e(r[t])||e(i[t]):r[t]&&r[t][n]||i[t]&&i[t][n]}})),G=p(((t,n)=>{var r=O().navigator,i=r&&r.userAgent;n.exports=i?String(i):""})),Y=p(((t,n)=>{var r,i,s=O(),e=G(),h=s.process,u=s.Deno,o=h&&h.versions||u&&u.version,c=o&&o.v8;c&&(i=(r=c.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&e&&(!(r=e.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=e.match(/Chrome\/(\d+)/))&&(i=+r[1]),n.exports=i})),X=p(((t,n)=>{var r=Y(),i=x(),s=O().String;n.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol("symbol detection");return!s(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))})),H=p(((t,n)=>{var r=X();n.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator})),B=p(((t,n)=>{var r=I(),i=E(),s=j(),e=H(),h=Object;n.exports=e?function(t){return"symbol"==typeof t}:function(t){var n=r("Symbol");return i(n)&&s(n.prototype,h(t))}})),Q=p(((t,n)=>{var r=String;n.exports=function(t){try{return r(t)}catch(t){return"Object"}}})),V=p(((t,n)=>{var r=E(),i=Q(),s=TypeError;n.exports=function(t){if(r(t))return t;throw new s(i(t)+" is not a function")}})),J=p(((t,n)=>{var r=V(),i=D();n.exports=function(t,n){var s=t[n];return i(s)?void 0:r(s)}})),q=p(((t,n)=>{var r=C(),i=E(),s=R(),e=TypeError;n.exports=function(t,n){var h,u;if("string"===n&&i(h=t.toString)&&!s(u=r(h,t)))return u;if(i(h=t.valueOf)&&!s(u=r(h,t)))return u;if("string"!==n&&i(h=t.toString)&&!s(u=r(h,t)))return u;throw new e("Can't convert object to primitive value")}})),U=p(((t,n)=>{n.exports=!0})),W=p(((t,n)=>{var r=O(),i=Object.defineProperty;n.exports=function(t,n){try{i(r,t,{value:n,configurable:!0,writable:!0})}catch(i){r[t]=n}return n}})),Z=p(((t,n)=>{var r=U(),i=O(),s=W(),e="__core-js_shared__",h=n.exports=i[e]||s(e,{});(h.versions||(h.versions=[])).push({version:"3.49.0",mode:r?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"})})),K=p(((t,n)=>{var r=Z();n.exports=function(t,n){return r[t]||(r[t]=n||{})}})),tt=p(((t,n)=>{var r=P(),i=Object;n.exports=function(t){return i(r(t))}})),nt=p(((t,n)=>{var r=_(),i=tt(),s=r({}.hasOwnProperty);n.exports=Object.hasOwn||function(t,n){return s(i(t),n)}})),rt=p(((t,n)=>{var r=_(),i=0,s=Math.random(),e=r(1.1.toString);n.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+e(++i+s,36)}})),it=p(((t,n)=>{var r=O(),i=K(),s=nt(),e=rt(),h=X(),u=H(),o=r.Symbol,c=i("wks"),a=u?o.for||o:o&&o.withoutSetter||e;n.exports=function(t){return s(c,t)||(c[t]=h&&s(o,t)?o[t]:a("Symbol."+t)),c[t]}})),st=p(((t,n)=>{var r=C(),i=R(),s=B(),e=J(),h=q(),u=it(),o=TypeError,c=u("toPrimitive");n.exports=function(t,n){if(!i(t)||s(t))return t;var u,a=e(t,c);if(a){if(void 0===n&&(n="default"),u=r(a,t,n),!i(u)||s(u))return u;throw new o("Can't convert object to primitive value")}return void 0===n&&(n="number"),h(t,n)}})),et=p(((t,n)=>{var r=st(),i=B();n.exports=function(t){var n=r(t,"string");return i(n)?n:n+""}})),ht=p(((t,n)=>{var r=O(),i=R(),s=r.document,e=i(s)&&i(s.createElement);n.exports=function(t){return e?s.createElement(t):{}}})),ut=p(((t,n)=>{var r=T(),i=x(),s=ht();n.exports=!r&&!i((function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a}))})),ot=p((t=>{var n=T(),r=C(),i=z(),s=F(),e=$(),h=et(),u=nt(),o=ut(),c=Object.getOwnPropertyDescriptor;t.f=n?c:function(t,n){if(t=e(t),n=h(n),o)try{return c(t,n)}catch(t){}if(u(t,n))return s(!r(i.f,t,n),t[n])}})),ct=p(((t,n)=>{var r=x(),i=E(),s=/#|\.prototype\./,e=function(t,n){var s=u[h(t)];return s===c||s!==o&&(i(n)?r(n):!!n)},h=e.normalize=function(t){return String(t).replace(s,".").toLowerCase()},u=e.data={},o=e.NATIVE="N",c=e.POLYFILL="P";n.exports=e})),at=p(((t,n)=>{var r=S(),i=V(),s=M(),e=r(r.bind);n.exports=function(t,n){return i(t),void 0===n?t:s?e(t,n):function(){return t.apply(n,arguments)}}})),lt=p(((t,n)=>{var r=T(),i=x();n.exports=r&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))})),ft=p(((t,n)=>{var r=R(),i=String,s=TypeError;n.exports=function(t){if(r(t))return t;throw new s(i(t)+" is not an object")}})),pt=p((t=>{var n=T(),r=ut(),i=lt(),s=ft(),e=et(),h=TypeError,u=Object.defineProperty,o=Object.getOwnPropertyDescriptor,c="enumerable",a="configurable",l="writable";t.f=n?i?function(t,n,r){if(s(t),n=e(n),s(r),"function"==typeof t&&"prototype"===n&&"value"in r&&l in r&&!r[l]){var i=o(t,n);i&&i[l]&&(t[n]=r.value,r={configurable:a in r?r[a]:i[a],enumerable:c in r?r[c]:i[c],writable:!1})}return u(t,n,r)}:u:function(t,n,i){if(s(t),n=e(n),s(i),r)try{return u(t,n,i)}catch(t){}if("get"in i||"set"in i)throw new h("Accessors not supported");return"value"in i&&(t[n]=i.value),t}})),dt=p(((t,n)=>{var r=T(),i=pt(),s=F();n.exports=r?function(t,n,r){return i.f(t,n,s(1,r))}:function(t,n,r){return t[n]=r,t}})),wt=p(((t,n)=>{var r=O(),i=k(),s=S(),e=E(),h=ot().f,u=ct(),o=L(),c=at(),a=dt(),l=nt();Z();var f=function(t){var n=function(r,s,e){if(this instanceof n){switch(arguments.length){case 0:return new t;case 1:return new t(r);case 2:return new t(r,s)}return new t(r,s,e)}return i(t,this,arguments)};return n.prototype=t.prototype,n};n.exports=function(t,n){var i,p,d,w,y,m,v,b,g,x=t.target,M=t.global,_=t.stat,j=t.proto,O=M?r:_?r[x]:r[x]&&r[x].prototype,k=M?o:o[x]||a(o,x,{})[x],A=k.prototype;for(w in n)p=!(i=u(M?w:x+(_?".":"#")+w,t.forced))&&O&&l(O,w),m=k[w],p&&(v=t.dontCallGetSet?(g=h(O,w))&&g.value:O[w]),y=p&&v?v:n[w],(i||j||typeof m!=typeof y)&&(b=t.bind&&p?c(y,r):t.wrap&&p?f(y):j&&e(y)?s(y):y,(t.sham||y&&y.sham||m&&m.sham)&&a(b,"sham",!0),a(k,w,b),j&&(l(o,d=x+"Prototype")||a(o,d,{}),a(o[d],w,y),t.real&&A&&(i||!A[w])&&a(A,w,y)))}})),yt=p(((t,n)=>{var r=Math.ceil,i=Math.floor;n.exports=Math.trunc||function(t){var n=+t;return(n>0?i:r)(n)}})),mt=p(((t,n)=>{var r=yt();n.exports=function(t){var n=+t;return n!=n||0===n?0:r(n)}})),vt=p(((t,n)=>{var r=mt(),i=Math.max,s=Math.min;n.exports=function(t,n){var e=r(t);return e<0?i(e+n,0):s(e,n)}})),bt=p(((t,n)=>{var r=mt(),i=Math.min;n.exports=function(t){var n=r(t);return n>0?i(n,9007199254740991):0}})),gt=p(((t,n)=>{var r=bt();n.exports=function(t){return r(t.length)}})),xt=p(((t,n)=>{var r=$(),i=vt(),s=gt(),e=function(t){return function(n,e,h){var u=r(n),o=s(u);if(0===o)return!t&&-1;var c,a=i(h,o);if(t&&e!=e){for(;o>a;)if((c=u[a++])!=c)return!0}else for(;o>a;a++)if((t||a in u)&&u[a]===e)return t||a||0;return!t&&-1}};n.exports={includes:e(!0),indexOf:e(!1)}})),Mt=p(((t,n)=>{n.exports=function(){}})),_t=p((()=>{var t=wt(),n=xt().includes,r=x(),i=Mt(),s=r((function(){return!Array(1).includes()})),e=r((function(){return[,1].includes(void 0,1)}));t({target:"Array",proto:!0,forced:s||e},{includes:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}}),i("includes")})),jt=p(((t,n)=>{var r=O(),i=L();n.exports=function(t,n){var s=i[t+"Prototype"],e=s&&s[n];if(e)return e;var h=r[t],u=h&&h.prototype;return u&&u[n]}})),Ot=p(((t,n)=>{_t();var r=jt();n.exports=r("Array","includes")})),kt=p(((t,n)=>{var r=R(),i=A(),s=it()("match");n.exports=function(t){var n;return r(t)&&(void 0!==(n=t[s])?!!n:"RegExp"===i(t))}})),At=p(((t,n)=>{var r=kt(),i=TypeError;n.exports=function(t){if(r(t))throw new i("The method doesn't accept regular expressions");return t}})),St=p(((t,n)=>{var r={};r[it()("toStringTag")]="z",n.exports="[object z]"===String(r)})),Et=p(((t,n)=>{var r=St(),i=E(),s=A(),e=it()("toStringTag"),h=Object,u="Arguments"===s(function(){return arguments}());n.exports=r?s:function(t){var n,r,o;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,n){try{return t[n]}catch(t){}}(n=h(t),e))?r:u?s(n):"Object"===(o=s(n))&&i(n.callee)?"Arguments":o}})),Tt=p(((t,n)=>{var r=Et(),i=String;n.exports=function(t){if("Symbol"===r(t))throw new TypeError("Cannot convert a Symbol value to a string");return i(t)}})),Ct=p(((t,n)=>{var r=it()("match");n.exports=function(t){var n=/./;try{"/./"[t](n)}catch(i){try{return n[r]=!1,"/./"[t](n)}catch(t){}}return!1}})),zt=p((()=>{var t=wt(),n=_(),r=At(),i=P(),s=Tt(),e=Ct(),h=n("".indexOf);t({target:"String",proto:!0,forced:!e("includes")},{includes:function(t){return!!~h(s(i(this)),s(r(t)),arguments.length>1?arguments[1]:void 0)}})})),Ft=p(((t,n)=>{zt();var r=jt();n.exports=r("String","includes")})),Nt=p(((t,n)=>{var r=j(),i=Ot(),s=Ft(),e=Array.prototype,h=String.prototype;n.exports=function(t){var n=t.includes;return t===e||r(e,t)&&n===e.includes?i:"string"==typeof t||t===h||r(h,t)&&n===h.includes?s:n}})),Dt=w(p(((t,n)=>{var r=Nt();n.exports=r}))());function Pt(t,n){let r;const i=t.length,s=[];for(r=0;r<i;r++)s.push(n(t[r]));return s}function $t(t){return t%360*Math.PI/180}function Rt(t){return t.replace(/([A-Z])/g,(function(t,n){return"-"+n.toLowerCase()}))}function Lt(t){return t.charAt(0).toUpperCase()+t.slice(1)}function It(t,n,r,i){return null!=n&&null!=r||(i=i||t.bbox(),null==n?n=i.width/i.height*r:null==r&&(r=i.height/i.width*n)),{width:n,height:r}}function Gt(t,n){const r=t.origin;let i=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",s=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=r&&([i,s]=Array.isArray(r)?r:"object"==typeof r?[r.x,r.y]:[r,r]);const e="string"==typeof i,h="string"==typeof s;if(e||h){const{height:t,width:r,x:u,y:o}=n.bbox();e&&(i=(0,Dt.default)(i).call(i,"left")?u:(0,Dt.default)(i).call(i,"right")?u+r:u+r/2),h&&(s=(0,Dt.default)(s).call(s,"top")?o:(0,Dt.default)(s).call(s,"bottom")?o+t:o+t/2)}return[i,s]}const Yt=new Set(["desc","metadata","title"]),Xt=t=>Yt.has(t.nodeName),Ht="http://www.w3.org/2000/svg",Bt="http://www.w3.org/2000/xmlns/",Qt="http://www.w3.org/1999/xlink",Vt={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};var Jt=class{};const qt={},Ut="___SYMBOL___ROOT___";function Wt(t,n=Ht){return Vt.document.createElementNS(n,t)}function Zt(t,n=!1){if(t instanceof Jt)return t;if("object"==typeof t)return nn(t);if(null==t)return new qt[Ut];if("string"==typeof t&&"<"!==t.trim().charAt(0))return nn(Vt.document.querySelector(t));const r=n?Vt.document.createElement("div"):Wt("svg");return r.innerHTML=t.trim(),t=nn(r.firstElementChild),r.removeChild(r.firstElementChild),t}function Kt(t,n){return n&&(n instanceof Vt.window.Node||n.ownerDocument&&n instanceof n.ownerDocument.defaultView.Node)?n:Wt(t)}function tn(t){if(!t)return null;if(t.instance instanceof Jt)return t.instance;if("#document-fragment"===t.nodeName)return new qt.Fragment(t);let n=Lt(t.nodeName||"Dom");return"LinearGradient"===n||"RadialGradient"===n?n="Gradient":qt[n]||(n="Dom"),new qt[n](t)}let nn=tn;function rn(t,n=t.name,r=!1){return qt[n]=t,r&&(qt[Ut]=t),g(Object.getOwnPropertyNames(t.prototype)),t}let sn=1e3;function en(t){return"Svgjs"+Lt(t)+sn++}function hn(t){for(let n=t.children.length-1;n>=0;n--)hn(t.children[n]);return t.id?(t.id=en(t.nodeName),t):t}function un(t,n){let r,i;for(i=(t=Array.isArray(t)?t:[t]).length-1;i>=0;i--)for(r in n)t[i].prototype[r]=n[r]}function on(t){return function(...n){const r=n[n.length-1];return!r||r.constructor!==Object||r instanceof Array?t.apply(this,n):t.apply(this,n.slice(0,-1)).attr(r)}}v("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=Zt(t)).remove();const n=this.position();return this.parent().add(t,n),this},after:function(t){(t=Zt(t)).remove();const n=this.position();return this.parent().add(t,n+1),this},insertBefore:function(t){return(t=Zt(t)).before(this),this},insertAfter:function(t){return(t=Zt(t)).after(this),this}});const cn=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,an=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,ln=/rgb\((\d+),(\d+),(\d+)\)/,fn=/^(#[^\s]+)$/,pn=/\)\s*,?\s*/,dn=/\s/g,wn=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,yn=/^rgb\(/,mn=/^(\s+)?$/,vn=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,bn=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,gn=/[\s,]+/,xn=/[MLHVCSQTAZ]/i;v("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(gn)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const n=this.classes();n.push(t),this.attr("class",n.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(n){return n!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}});const Mn=t=>t.startsWith("--")?t:Rt(t);function _n(t){const n=Math.max(0,Math.min(255,Math.round(t))).toString(16);return 1===n.length?"0"+n:n}function jn(t,n){for(let r=n.length;r--;)if(null==t[n[r]])return!1;return!0}function On(t,n,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(n-t)*r:r<.5?n:r<2/3?t+(n-t)*(2/3-r)*6:t}v("Dom",{css:function(t,n){const r={};if(0===arguments.length){const t=this.node.style;for(let n=0;n<t.length;n++){const i=t.item(n),s=t.getPropertyValue(i),e=t.getPropertyPriority(i);r[i]=e?`${s} !${e}`:s}return r}if(arguments.length<2){if(Array.isArray(t)){for(const n of t){const t=Mn(n);r[n]=this.node.style.getPropertyValue(t)}return r}if("string"==typeof t)return this.node.style.getPropertyValue(Mn(t));if("object"==typeof t)for(const n in t)this.node.style.setProperty(Mn(n),null==t[n]||mn.test(t[n])?"":t[n])}return 2===arguments.length&&this.node.style.setProperty(Mn(t),null==n||mn.test(n)?"":n),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),v("Dom",{data:function(t,n,r){if(null==t)return this.data(Pt(function(t){let n;const r=t.length,i=[];for(n=0;n<r;n++)0===t[n].nodeName.indexOf("data-")&&i.push(t[n]);return i}(this.node.attributes),(t=>t.nodeName.slice(5))));if(t instanceof Array){const n={};for(const r of t)n[r]=this.data(r);return n}if("object"==typeof t)for(n in t)this.data(n,t[n]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(n){return this.attr("data-"+t)}else this.attr("data-"+t,null===n?null:!0===r||"string"==typeof n||"number"==typeof n?n:JSON.stringify(n));return this}}),v("Dom",{remember:function(t,n){if("object"==typeof arguments[0])for(const n in t)this.remember(n,t[n]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=n}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});var kn=class t{constructor(...t){this.init(...t)}static isColor(n){return n&&(n instanceof t||this.isRgb(n)||this.test(n))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(n="vibrant",r){const{random:i,round:s,sin:e,PI:h}=Math;if("vibrant"===n){const n=24*i()+57,r=38*i()+45,s=360*i();return new t(n,r,s,"lch")}if("sine"===n){const n=s(80*e(2*h*(r=null==r?i():r)/.5+.01)+150),u=s(50*e(2*h*r/.5+4.6)+200),o=s(100*e(2*h*r/.5+2.3)+150);return new t(n,u,o)}if("pastel"===n){const n=8*i()+86,r=17*i()+9,s=360*i();return new t(n,r,s,"lch")}if("dark"===n){const n=10+10*i(),r=50*i()+86,s=360*i();return new t(n,r,s,"lch")}if("rgb"===n){const n=255*i(),r=255*i(),s=255*i();return new t(n,r,s)}if("lab"===n){const n=100*i(),r=256*i()-128,s=256*i()-128;return new t(n,r,s,"lab")}if("grey"===n){const n=255*i();return new t(n,n,n)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(wn.test(t)||yn.test(t))}cmyk(){const{_a:n,_b:r,_c:i}=this.rgb(),[s,e,h]=[n,r,i].map((t=>t/255)),u=Math.min(1-s,1-e,1-h);return 1===u?new t(0,0,0,1,"cmyk"):new t((1-s-u)/(1-u),(1-e-u)/(1-u),(1-h-u)/(1-u),u,"cmyk")}hsl(){const{_a:n,_b:r,_c:i}=this.rgb(),[s,e,h]=[n,r,i].map((t=>t/255)),u=Math.max(s,e,h),o=Math.min(s,e,h),c=(u+o)/2,a=u===o,l=u-o;return new t(360*(a?0:u===s?((e-h)/l+(e<h?6:0))/6:u===e?((h-s)/l+2)/6:u===h?((s-e)/l+4)/6:0),100*(a?0:c>.5?l/(2-u-o):l/(u+o)),100*c,"hsl")}init(t=0,n=0,r=0,i=0,s="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)s="string"==typeof i?i:s,i="string"==typeof i?0:i,Object.assign(this,{_a:t,_b:n,_c:r,_d:i,space:s});else if(t instanceof Array)this.space=n||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const r=function(t,n){const r=jn(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:jn(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:jn(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:jn(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:jn(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:jn(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return r.space=n||r.space,r}(t,n);Object.assign(this,r)}else if("string"==typeof t)if(yn.test(t)){const n=t.replace(dn,""),[r,i,s]=ln.exec(n).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:r,_b:i,_c:s,_d:0,space:"rgb"})}else{if(!wn.test(t))throw Error("Unsupported string format, can't construct Color");{const n=t=>parseInt(t,16),[,r,i,s]=an.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(n);Object.assign(this,{_a:r,_b:i,_c:s,_d:0,space:"rgb"})}}const{_a:e,_b:h,_c:u,_d:o}=this;Object.assign(this,"rgb"===this.space?{r:e,g:h,b:u}:"xyz"===this.space?{x:e,y:h,z:u}:"hsl"===this.space?{h:e,s:h,l:u}:"lab"===this.space?{l:e,a:h,b:u}:"lch"===this.space?{l:e,c:h,h:u}:"cmyk"===this.space?{c:e,m:h,y:u,k:o}:{})}lab(){const{x:n,y:r,z:i}=this.xyz();return new t(116*r-16,500*(n-r),200*(r-i),"lab")}lch(){const{l:n,a:r,b:i}=this.lab(),s=Math.sqrt(r**2+i**2);let e=180*Math.atan2(i,r)/Math.PI;return e<0&&(e*=-1,e=360-e),new t(n,s,e,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(n=this.space)||"xyz"===n||"lch"===n){let{x:n,y:r,z:i}=this;if("lab"===this.space||"lch"===this.space){let{l:t,a:s,b:e}=this;if("lch"===this.space){const{c:t,h:n}=this,r=Math.PI/180;s=t*Math.cos(r*n),e=t*Math.sin(r*n)}const h=(t+16)/116,u=s/500+h,o=h-e/200,c=16/116,a=.008856,l=7.787;n=.95047*(u**3>a?u**3:(u-c)/l),r=1*(h**3>a?h**3:(h-c)/l),i=1.08883*(o**3>a?o**3:(o-c)/l)}const s=3.2406*n+-1.5372*r+-.4986*i,e=-.9689*n+1.8758*r+.0415*i,h=.0557*n+-.204*r+1.057*i,u=Math.pow,o=.0031308,c=s>o?1.055*u(s,1/2.4)-.055:12.92*s,a=e>o?1.055*u(e,1/2.4)-.055:12.92*e,l=h>o?1.055*u(h,1/2.4)-.055:12.92*h;return new t(255*c,255*a,255*l)}if("hsl"===this.space){let{h:n,s:r,l:i}=this;if(n/=360,r/=100,i/=100,0===r)return i*=255,new t(i,i,i);const s=i<.5?i*(1+r):i+r-i*r,e=2*i-s,h=255*On(e,s,n+1/3),u=255*On(e,s,n),o=255*On(e,s,n-1/3);return new t(h,u,o)}if("cmyk"===this.space){const{c:n,m:r,y:i,k:s}=this,e=255*(1-Math.min(1,n*(1-s)+s)),h=255*(1-Math.min(1,r*(1-s)+s)),u=255*(1-Math.min(1,i*(1-s)+s));return new t(e,h,u)}return this;var n}toArray(){const{_a:t,_b:n,_c:r,_d:i,space:s}=this;return[t,n,r,i,s]}toHex(){const[t,n,r]=this._clamped().map(_n);return`#${t}${n}${r}`}toRgb(){const[t,n,r]=this._clamped();return`rgb(${t},${n},${r})`}toString(){return this.toHex()}xyz(){const{_a:n,_b:r,_c:i}=this.rgb(),[s,e,h]=[n,r,i].map((t=>t/255)),u=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,o=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,c=h>.04045?Math.pow((h+.055)/1.055,2.4):h/12.92,a=(.4124*u+.3576*o+.1805*c)/.95047,l=(.2126*u+.7152*o+.0722*c)/1,f=(.0193*u+.1192*o+.9505*c)/1.08883,p=a>.008856?Math.pow(a,1/3):7.787*a+16/116,d=l>.008856?Math.pow(l,1/3):7.787*l+16/116,w=f>.008856?Math.pow(f,1/3):7.787*f+16/116;return new t(p,d,w,"xyz")}_clamped(){const{_a:t,_b:n,_c:r}=this.rgb(),{max:i,min:s,round:e}=Math;return[t,n,r].map((t=>i(0,s(e(t),255))))}},An=class t{constructor(...t){this.init(...t)}clone(){return new t(this)}init(t,n){const r=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:n};return this.x=null==r.x?0:r.x,this.y=null==r.y?0:r.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){En.isMatrixLike(t)||(t=new En(t));const{x:n,y:r}=this;return this.x=t.a*n+t.c*r+t.e,this.y=t.b*n+t.d*r+t.f,this}};function Sn(t,n){return Math.abs(n-t)<1e-6}var En=class t{constructor(...t){this.init(...t)}static formatTransforms(t){const n="both"===t.flip||!0===t.flip,r=t.flip&&(n||"x"===t.flip)?-1:1,i=t.flip&&(n||"y"===t.flip)?-1:1,s=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,e=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,h=t.scale&&t.scale.length?t.scale[0]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleX)?t.scaleX*r:r,u=t.scale&&t.scale.length?t.scale[1]*i:isFinite(t.scale)?t.scale*i:isFinite(t.scaleY)?t.scaleY*i:i,o=t.shear||0,c=t.rotate||t.theta||0,a=new An(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),l=a.x,f=a.y,p=new An(t.position??t.px??t.positionX??NaN,t.py??t.positionY??NaN),d=p.x,w=p.y,y=new An(t.translate||t.tx||t.translateX,t.ty||t.translateY),m=y.x,v=y.y,b=new An(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:h,scaleY:u,skewX:s,skewY:e,shear:o,theta:c,rx:b.x,ry:b.y,tx:m,ty:v,ox:l,oy:f,px:d,py:w}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,n,r){const i=t.b*n.a+t.d*n.b,s=t.a*n.c+t.c*n.d,e=t.b*n.c+t.d*n.d,h=t.e+t.a*n.e+t.c*n.f,u=t.f+t.b*n.e+t.d*n.f;return r.a=t.a*n.a+t.c*n.b,r.b=i,r.c=s,r.d=e,r.e=h,r.f=u,r}around(t,n,r){return this.clone().aroundO(t,n,r)}aroundO(t,n,r){const i=t||0,s=n||0;return this.translateO(-i,-s).lmultiplyO(r).translateO(i,s)}clone(){return new t(this)}decompose(t=0,n=0){const r=this.a,i=this.b,s=this.c,e=this.d,h=this.e,u=this.f,o=r*e-i*s,c=o>0?1:-1,a=c*Math.sqrt(r*r+i*i),l=Math.atan2(c*i,c*r),f=(r*s+i*e)/o;return{scaleX:a,scaleY:s*a/(f*r-i)||e*a/(f*i+r),shear:f,rotate:180/Math.PI*l,translateX:h-t+t*r+n*s,translateY:u-n+t*i+n*e,originX:t,originY:n,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(n){if(n===this)return!0;const r=new t(n);return Sn(this.a,r.a)&&Sn(this.b,r.b)&&Sn(this.c,r.c)&&Sn(this.d,r.d)&&Sn(this.e,r.e)&&Sn(this.f,r.f)}flip(t,n){return this.clone().flipO(t,n)}flipO(t,n){return"x"===t?this.scaleO(-1,1,n,0):"y"===t?this.scaleO(1,-1,0,n):this.scaleO(-1,-1,t,n||t)}init(n){const r=t.fromArray([1,0,0,1,0,0]);return n=n instanceof nr?n.matrixify():"string"==typeof n?t.fromArray(n.split(gn).map(parseFloat)):Array.isArray(n)?t.fromArray(n):"object"==typeof n&&t.isMatrixLike(n)?n:"object"==typeof n?(new t).transform(n):6===arguments.length?t.fromArray([].slice.call(arguments)):r,this.a=null!=n.a?n.a:r.a,this.b=null!=n.b?n.b:r.b,this.c=null!=n.c?n.c:r.c,this.d=null!=n.d?n.d:r.d,this.e=null!=n.e?n.e:r.e,this.f=null!=n.f?n.f:r.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,n=this.b,r=this.c,i=this.d,s=this.e,e=this.f,h=t*i-n*r;if(!h)throw new Error("Cannot invert "+this);const u=i/h,o=-n/h,c=-r/h,a=t/h,l=-(u*s+c*e),f=-(o*s+a*e);return this.a=u,this.b=o,this.c=c,this.d=a,this.e=l,this.f=f,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(n){const r=n instanceof t?n:new t(n);return t.matrixMultiply(r,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(n){const r=n instanceof t?n:new t(n);return t.matrixMultiply(this,r,this)}rotate(t,n,r){return this.clone().rotateO(t,n,r)}rotateO(t,n=0,r=0){t=$t(t);const i=Math.cos(t),s=Math.sin(t),{a:e,b:h,c:u,d:o,e:c,f:a}=this;return this.a=e*i-h*s,this.b=h*i+e*s,this.c=u*i-o*s,this.d=o*i+u*s,this.e=c*i-a*s+r*s-n*i+n,this.f=a*i+c*s-n*s-r*i+r,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,n=t,r=0,i=0){3===arguments.length&&(i=r,r=n,n=t);const{a:s,b:e,c:h,d:u,e:o,f:c}=this;return this.a=s*t,this.b=e*n,this.c=h*t,this.d=u*n,this.e=o*t-r*t+r,this.f=c*n-i*n+i,this}shear(t,n,r){return this.clone().shearO(t,n,r)}shearO(t,n=0,r=0){const{a:i,b:s,c:e,d:h,e:u,f:o}=this;return this.a=i+s*t,this.c=e+h*t,this.e=u+o*t-r*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,n=t,r=0,i=0){3===arguments.length&&(i=r,r=n,n=t),t=$t(t),n=$t(n);const s=Math.tan(t),e=Math.tan(n),{a:h,b:u,c:o,d:c,e:a,f:l}=this;return this.a=h+u*s,this.b=u+h*e,this.c=o+c*s,this.d=c+o*e,this.e=a+l*s-i*s,this.f=l+a*e-r*e,this}skewX(t,n,r){return this.skew(t,0,n,r)}skewY(t,n,r){return this.skew(0,t,n,r)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(n){if(t.isMatrixLike(n))return new t(n).multiplyO(this);const r=t.formatTransforms(n),{x:i,y:s}=new An(r.ox,r.oy).transform(this),e=(new t).translateO(r.rx,r.ry).lmultiplyO(this).translateO(-i,-s).scaleO(r.scaleX,r.scaleY).skewO(r.skewX,r.skewY).shearO(r.shear).rotateO(r.theta).translateO(i,s);if(isFinite(r.px)||isFinite(r.py)){const t=new An(i,s).transform(e),n=isFinite(r.px)?r.px-t.x:0,h=isFinite(r.py)?r.py-t.y:0;e.translateO(n,h)}return e.translateO(r.tx,r.ty),e}translate(t,n){return this.clone().translateO(t,n)}translateO(t,n){return this.e+=t||0,this.f+=n||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}};function Tn(){if(!Tn.nodes||Tn.nodes.svg.node.ownerDocument!==Vt.document){const t=Zt().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true"),Tn.nodes={svg:t,path:t.path().node}}return Tn.nodes.svg.node.parentNode||Tn.nodes.svg.addTo(Vt.document.body||Vt.document.documentElement),Tn.nodes}function Cn(t){return!(t.width||t.height||t.x||t.y)}rn(En,"Matrix");var zn=class t{constructor(...t){this.init(...t)}addOffset(){return this.x+=Vt.window.pageXOffset,this.y+=Vt.window.pageYOffset,new t(this)}init(t){return t="string"==typeof t?t.split(gn).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return Cn(this)}merge(n){const r=Math.min(this.x,n.x),i=Math.min(this.y,n.y),s=Math.max(this.x+this.width,n.x+n.width)-r,e=Math.max(this.y+this.height,n.y+n.height)-i;return new t(r,i,s,e)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(n){n instanceof En||(n=new En(n));let r=1/0,i=-1/0,s=1/0,e=-1/0;return[new An(this.x,this.y),new An(this.x2,this.y),new An(this.x,this.y2),new An(this.x2,this.y2)].forEach((function(t){t=t.transform(n),r=Math.min(r,t.x),i=Math.max(i,t.x),s=Math.min(s,t.y),e=Math.max(e,t.y)})),new t(r,s,i-r,e-s)}};function Fn(t,n,r){let i;try{if(i=n(t.node),Cn(i)&&(s=t.node)!==Vt.document&&!(Vt.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===Vt.document}).call(Vt.document.documentElement,s))throw new Error("Element not in the dom")}catch(n){i=r(t)}var s;return i}v({viewbox:{viewbox(t,n,r,i){return null==t?new zn(this.attr("viewBox")):this.attr("viewBox",new zn(t,n,r,i))},zoom(t,n){let{width:r,height:i}=this.attr(["width","height"]);if((r||i)&&"string"!=typeof r&&"string"!=typeof i||(r=this.node.clientWidth,i=this.node.clientHeight),!r||!i)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const s=this.viewbox(),e=r/s.width,h=i/s.height,u=Math.min(e,h);if(null==t)return u;let o=u/t;o===1/0&&(o=Number.MAX_SAFE_INTEGER/100),n=n||new An(r/2/e+s.x,i/2/h+s.y);const c=new zn(s).transform(new En({scale:o,origin:n}));return this.viewbox(c)}}}),rn(zn,"Box");var Nn=class extends Array{constructor(t=[],...n){if(super(t,...n),"number"==typeof t)return this;this.length=0,this.push(...t)}};un([Nn],{each(t,...n){return this.map("function"==typeof t?(n,r,i)=>t.call(n,n,r,i):r=>r[t](...n))},toArray(){return Array.prototype.concat.apply([],this)}});const Dn=["toArray","constructor","each"];function Pn(t){let n=(t+"").trim();const r=n.match(/^url\((.*)\)$/i);if(r){n=r[1].trim();const t=n[0];if('"'===t||"'"===t){if(n[n.length-1]!==t)return null;n=n.slice(1,-1)}}const i=n.match(fn);return i?i[1].slice(1):null}function $n(t,n){const r=`#${Vt.window.CSS.escape(n)}`;return 1===t.nodeType&&t.matches(r)?t:t.querySelector(r)}function Rn(t,n,r=`[${n}]`){const i=t.getAttribute("id"),s=t.getRootNode();if(!i||$n(s,i)!==t)return new Nn;const e=[];1===s.nodeType&&s.matches(r)&&Pn(s.getAttribute(n))===i&&e.push(tn(s));for(const t of s.querySelectorAll(r))Pn(t.getAttribute(n))===i&&e.push(tn(t));return new Nn(e)}Nn.extend=function(t){t=t.reduce(((t,n)=>((0,Dt.default)(Dn).call(Dn,n)||"_"===n[0]||(n in Array.prototype&&(t["$"+n]=Array.prototype[n]),t[n]=function(...t){return this.each(n,...t)}),t)),{}),un([Nn],t)};let Ln=0;const In=new WeakMap,Gn=new WeakMap,Yn=()=>Object.create(null);function Xn(t){const n=t.getEventHolder();let r=In.get(n);return r||(r=Yn(),In.set(n,r)),r}function Hn(t){return t.getEventTarget()}function Bn(t,n,r,i,s){const e=r.bind(i||t),h=s||!1,u=Zt(t),o=Xn(u),c=Hn(u);n=Array.isArray(n)?n:n.split(gn);let a=Gn.get(r);a||(a=++Ln,Gn.set(r,a)),n.forEach((function(t){const n=t.split(".")[0],r=t.split(".")[1]||"*";o[n]=o[n]||Yn(),o[n][r]=o[n][r]||Yn(),o[n][r][a]=o[n][r][a]||[],o[n][r][a].push({listener:e,options:h}),c.addEventListener(n,e,h)}))}function Qn(t,n,r,i){const s=Zt(t),e=Xn(s),h=Hn(s);("function"!=typeof r||(r=Gn.get(r)))&&(n=Array.isArray(n)?n:(n||"").split(gn)).forEach((function(t){const n=t&&t.split(".")[0],u=t&&t.split(".")[1];let o,c;if(r){if(e[n]&&e[n][u||"*"]){const t=e[n][u||"*"][r];if(!t)return;t.forEach((function(t){h.removeEventListener(n,t.listener,t.options??i??!1)})),delete e[n][u||"*"][r]}}else if(n&&u){if(e[n]&&e[n][u]){for(c in e[n][u])Qn(h,[n,u].join("."),c);delete e[n][u]}}else if(u)for(t in e)for(o in e[t])u===o&&Qn(h,[t,u].join("."));else if(n){if(e[n]){for(o in e[n])Qn(h,[n,o].join("."));delete e[n]}}else{for(t in e)Qn(h,t);!function(t){In.delete(t.getEventHolder())}(s)}}))}var Vn=class extends Jt{addEventListener(){}dispatch(t,n,r){return function(t,n,r,i){const s=Hn(t);return n instanceof Vt.window.Event||(n=new Vt.window.CustomEvent(n,{detail:r,cancelable:!0,...i})),s.dispatchEvent(n),n}(this,t,n,r)}dispatchEvent(t){const n=Xn(this)[t.type];if(!n)return!0;for(const r in n)for(const i in n[r])n[r][i].forEach((function(n){n.listener(t)}));return!t.defaultPrevented}fire(t,n,r){return this.dispatch(t,n,r),this}getEventHolder(){return this}getEventTarget(){return this}off(t,n,r){return Qn(this,t,n,r),this}on(t,n,r,i){return Bn(this,t,n,r,i),this}removeEventListener(){}};function Jn(){}rn(Vn,"EventTarget");const qn={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};var Un=class extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(gn).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}},Wn=class t{constructor(...t){this.init(...t)}convert(n){return new t(this.value,n)}divide(n){return n=new t(n),new t(this/n,this.unit||n.unit)}init(n,r){return r=Array.isArray(n)?n[1]:r,n=Array.isArray(n)?n[0]:n,this.value=0,this.unit=r||"","number"==typeof n?this.value=isNaN(n)?0:isFinite(n)?n:n<0?-34e37:34e37:"string"==typeof n?(r=n.match(cn))&&(this.value=parseFloat(r[1]),"%"===r[5]?this.value/=100:"s"===r[5]&&(this.value*=1e3),this.unit=r[5]):n instanceof t&&(this.value=n.valueOf(),this.unit=n.unit),this}minus(n){return n=new t(n),new t(this-n,this.unit||n.unit)}plus(n){return n=new t(n),new t(this+n,this.unit||n.unit)}times(n){return n=new t(n),new t(this*n,this.unit||n.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}};const Zn=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Kn=[];var tr=class t extends Vn{constructor(t,n){super(),this.node=t,this.type=t.nodeName,n&&t!==n&&this.attr(n)}add(t,n){return(t=Zt(t)).removeNamespace&&this.node instanceof Vt.window.SVGElement&&t.removeNamespace(),null==n?this.node.appendChild(t.node):t.node!==this.node.childNodes[n]&&this.node.insertBefore(t.node,this.node.childNodes[n]),this}addTo(t,n){return Zt(t).put(this,n)}children(){return new Nn(Pt(this.node.children,(function(t){return tn(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,n=!0){this.writeDataToDom();let r=this.node.cloneNode(t);return n&&(r=hn(r)),new this.constructor(r)}each(t,n){const r=this.children();let i,s;for(i=0,s=r.length;i<s;i++)t.apply(r[i],[i,r]),n&&r[i].each(t,n);return this}element(n,r){return this.put(new t(Wt(n),r))}first(){return tn(this.node.firstChild)}get(t){return tn(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,n){return this.xml(t,n,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=en(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return tn(this.node.lastChild)}matches(t){const n=this.node,r=n.matches||n.matchesSelector||n.msMatchesSelector||n.mozMatchesSelector||n.webkitMatchesSelector||n.oMatchesSelector||null;return r&&r.call(n,t)}parent(t){let n=this;if(!n.node.parentNode)return null;if(n=tn(n.node.parentNode),!t)return n;do{if("string"==typeof t?n.matches(t):n instanceof t)return n}while(n=tn(n.node.parentNode));return n}put(t,n){return t=Zt(t),this.add(t,n),t}putIn(t,n){return Zt(t).add(this,n)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=Zt(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,n=null){const r=10**t,i=this.attr(n);for(const t in i)"number"==typeof i[t]&&(i[t]=Math.round(i[t]*r)/r);return this.attr(i),this}svg(t,n){return this.xml(t,n,Ht)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const n=this.parent();if(!n)return this.addTo(t);const r=n.index(this);return n.put(t,r).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,n,r){if("boolean"==typeof t&&(r=n,n=t,t=null),null==t||"function"==typeof t){n=null==n||n,this.writeDataToDom();let r=this;if(null!=t){if(r=tn(r.node.cloneNode(!0)),n){const n=t(r);if(r=n||r,!1===n)return""}r.each((function(){const n=t(this),r=n||this;!1===n?this.remove():n&&this!==r&&this.replace(r)}),!0)}return n?r.node.outerHTML:r.node.innerHTML}n=null!=n&&n;const i=Wt("wrapper",r),s=Vt.document.createDocumentFragment();i.innerHTML=t;for(let t=i.children.length;t--;)s.appendChild(i.firstElementChild);const e=this.parent();return n?this.replace(s)&&e:this.add(s)}};un(tr,{attr:function(t,n,r){if(null==t){t={},n=this.node.attributes;for(const r of n)t[r.nodeName]=vn.test(r.nodeValue)?parseFloat(r.nodeValue):r.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,n)=>(t[n]=this.attr(n),t)),{});if("object"==typeof t&&t.constructor===Object)for(n in t)this.attr(n,t[n]);else if(null===n)this.node.removeAttribute(t);else{if(null==n)return null==(n=this.node.getAttribute(t))?qn[t]:vn.test(n)?parseFloat(n):n;"number"==typeof(n=Kn.reduce(((n,r)=>r(t,n,this)),n))?n=new Wn(n):Zn.has(t)&&kn.isColor(n)?n=new kn(n):n.constructor===Array&&(n=new Un(n)),"leading"===t?this.leading&&this.leading(n):"string"==typeof r?this.node.setAttributeNS(r,t,n.toString()):this.node.setAttribute(t,n.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return function(t,n){return new Nn(Pt((n||Vt.document).querySelectorAll(t),(function(t){return tn(t)})))}(t,this.node)},findOne:function(t){return tn(this.node.querySelector(t))}}),rn(tr,"Dom");var nr=class extends tr{constructor(t,n){super(t,n),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,n){return this.cx(t).cy(n)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,n){return this.dx(t).dy(n)}dx(t=0){return this.x(new Wn(t).plus(this.x()))}dy(t=0){return this.y(new Wn(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,n){return this.x(t).y(n)}parents(t=this.root()){const n="string"==typeof t,r=this.root(),i=r&&r.node;n||(t=t&&Zt(t).node);const s=new Nn;let e=this;for(;(e=e.parent())&&e.node!==Vt.document&&"#document-fragment"!==e.node.nodeName&&(s.push(e),n||e.node!==t)&&(!n||!e.matches(t));)if(i&&e.node===i)return null;return s}reference(t){if(!(t=this.attr(t)))return null;const n=function(t,n){const r=Pn(n);return r?$n(t.getRootNode(),r):null}(this.node,t);return n?Zt(n):null}root(){const t=this.parent(qt[Ut]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,n){const r=It(this,t,n);return this.width(new Wn(r.width)).height(new Wn(r.height))}width(t){return this.attr("width",t)}writeDataToDom(t){return((t,n,r={})=>{const i={...this.dom};for(const t in i)i[t].valueOf()===r[t]&&delete i[t];Object.keys(i).length?t.node.setAttribute("data-svgjs",JSON.stringify(i)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))})(this,0,t),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}};un(nr,{bbox:function(){const t=Fn(this,(t=>t.getBBox()),(t=>{try{const n=t.clone().addTo(Tn().svg).show(),r=n.node.getBBox();return n.remove(),r}catch(n){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${n.toString()}`)}}));return new zn(t)},rbox:function(t){const n=Fn(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),r=new zn(n);return t?r.transform(t.screenCTM().inverseO()):r.addOffset()},inside:function(t,n){const r=this.bbox();return t>r.x&&n>r.y&&t<r.x+r.width&&n<r.y+r.height},point:function(t,n){return new An(t,n).transformO(this.screenCTM().inverseO())},ctm:function(){return new En(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),n=t.node.getScreenCTM();return t.remove(),new En(n)}return new En(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new En}}}),rn(nr,"Element");const rr={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,n){return"color"===n?t:t+"-"+n}};["fill","stroke"].forEach((function(t){const n={};let r;n[t]=function(n){if(void 0===n)return this.attr(t);if("string"==typeof n||n instanceof kn||kn.isRgb(n)||n instanceof nr)this.attr(t,n);else for(r=rr[t].length-1;r>=0;r--)null!=n[rr[t][r]]&&this.attr(rr.prefix(t,rr[t][r]),n[rr[t][r]]);return this},v(["Element","Runner"],n)})),v(["Element","Runner"],{matrix:function(t,n,r,i,s,e){return null==t?new En(this):this.attr("transform",new En(t,n,r,i,s,e))},rotate:function(t,n,r){return this.transform({rotate:t,ox:n,oy:r},!0)},skew:function(t,n,r,i){return this.transform(1===arguments.length||3===arguments.length?{skew:t,ox:n,oy:r}:{skew:[t,n],ox:r,oy:i},!0)},shear:function(t,n,r){return this.transform({shear:t,ox:n,oy:r},!0)},scale:function(t,n,r,i){return this.transform(1===arguments.length||3===arguments.length?{scale:t,ox:n,oy:r}:{scale:[t,n],ox:r,oy:i},!0)},translate:function(t,n){return this.transform({translate:[t,n]},!0)},relative:function(t,n){return this.transform({relative:[t,n]},!0)},flip:function(t="both",n="center"){return-1==="xybothtrue".indexOf(t)&&(n=t,t="both"),this.transform({flip:t,origin:n},!0)},opacity:function(t){return this.attr("opacity",t)}}),v("radius",{radius:function(t,n=t){return"radialGradient"===(this._element||this).type?this.attr("r",new Wn(t)):this.rx(t).ry(n)}}),v("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new An(this.node.getPointAtLength(t))}}),v(["Element","Runner"],{font:function(t,n){if("object"==typeof t){for(n in t)this.font(n,t[n]);return this}return"leading"===t?this.leading(n):this.attr("anchor"===t?"text-anchor":"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?"font-"+t:t,n)}}),v("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,n){return t[n]=function(t){return null===t?this.off(n):this.on(n,t),this},t}),{})),v("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(pn).slice(0,-1).map((function(t){const n=t.trim().split("(");return[n[0].trim(),n[1].split(gn).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,n){return"matrix"===n[0]?t.lmultiply(En.fromArray(n[1])):t[n[0]].apply(t,n[1])}),new En)},toParent:function(t,n){if(this===t)return this;if(Xt(this.node))return this.addTo(t,n);const r=this.screenCTM(),i=t.screenCTM().inverse();return this.addTo(t,n).untransform().transform(i.multiply(r)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,n){if(null==t||"string"==typeof t){const n=new En(this).decompose();return null==t?n:n[t]}En.isMatrixLike(t)||(t={...t,origin:Gt(t,this)});const r=new En(!0===n?this:n||!1).transform(t);return this.attr("transform",r)}});var ir=class t extends nr{flatten(){return this.each((function(){if(this instanceof t)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),n=t.index(this)){return n=-1===n?t.children().length:n,this.each((function(r,i){return i[i.length-r-1].toParent(t,n)})),this.remove()}};rn(ir,"Container");var sr=class extends ir{constructor(t,n=t){super(Kt("defs",t),n)}flatten(){return this}ungroup(){return this}};rn(sr,"Defs");var er=class extends nr{};rn(er,"Shape");var hr=d({cx:()=>lr,cy:()=>fr,height:()=>dr,rx:()=>ur,ry:()=>or,width:()=>pr,x:()=>cr,y:()=>ar});function ur(t){return this.attr("rx",t)}function or(t){return this.attr("ry",t)}function cr(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function ar(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function lr(t){return this.attr("cx",t)}function fr(t){return this.attr("cy",t)}function pr(t){return null==t?2*this.rx():this.rx(new Wn(t).divide(2))}function dr(t){return null==t?2*this.ry():this.ry(new Wn(t).divide(2))}var wr=class extends er{constructor(t,n=t){super(Kt("ellipse",t),n)}size(t,n){const r=It(this,t,n);return this.rx(new Wn(r.width).divide(2)).ry(new Wn(r.height).divide(2))}};un(wr,hr),v("Container",{ellipse:on((function(t=0,n=t){return this.put(new wr).size(t,n).move(0,0)}))}),rn(wr,"Ellipse");var yr=class extends tr{constructor(t=Vt.document.createDocumentFragment()){super(t)}xml(t,n,r){if("boolean"==typeof t&&(r=n,n=t,t=null),null==t||"function"==typeof t){const t=new tr(Wt("wrapper",r));return t.add(this.node.cloneNode(!0)),t.xml(!1,r)}return super.xml(t,!1,r)}};rn(yr,"Fragment");var mr=d({from:()=>vr,to:()=>br});function vr(t,n){return this.attr("radialGradient"===(this._element||this).type?{fx:new Wn(t),fy:new Wn(n)}:{x1:new Wn(t),y1:new Wn(n)})}function br(t,n){return this.attr("radialGradient"===(this._element||this).type?{cx:new Wn(t),cy:new Wn(n)}:{x2:new Wn(t),y2:new Wn(n)})}var gr=class extends ir{constructor(t,n){super(Kt(t+"Gradient","string"==typeof t?null:t),n)}attr(t,n,r){return"transform"===t&&(t="gradientTransform"),super.attr(t,n,r)}bbox(){return new zn}targets(){return Rn(this.node,"fill")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}};un(gr,mr),v({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:on((function(t,n){return this.put(new gr(t)).update(n)}))}}),rn(gr,"Gradient");var xr=class extends ir{constructor(t,n=t){super(Kt("pattern",t),n)}attr(t,n,r){return"transform"===t&&(t="patternTransform"),super.attr(t,n,r)}bbox(){return new zn}targets(){return Rn(this.node,"fill")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}};v({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:on((function(t,n,r){return this.put(new xr).update(r).attr({x:0,y:0,width:t,height:n,patternUnits:"userSpaceOnUse"})}))}}),rn(xr,"Pattern");var Mr=class extends er{constructor(t,n=t){super(Kt("image",t),n)}load(t,n){if(!t)return this;const r=new Vt.window.Image;return Bn(r,"load",(function(t){const i=this.parent(xr);0===this.width()&&0===this.height()&&this.size(r.width,r.height),i instanceof xr&&0===i.width()&&0===i.height()&&i.size(this.width(),this.height()),"function"==typeof n&&n.call(this,t)}),this),Bn(r,"load error",(function(){Qn(r)})),this.attr("href",r.src=t,Qt)}};Kn.push((function(t,n,r){return"fill"!==t&&"stroke"!==t||bn.test(n)&&(n=r.root().defs().image(n)),n instanceof Mr&&(n=r.root().defs().pattern(0,0,(t=>{t.add(n)}))),n})),v({Container:{image:on((function(t,n){return this.put(new Mr).size(0,0).load(t,n)}))}}),rn(Mr,"Image");var _r=class extends Un{bbox(){let t=-1/0,n=-1/0,r=1/0,i=1/0;return this.forEach((function(s){t=Math.max(s[0],t),n=Math.max(s[1],n),r=Math.min(s[0],r),i=Math.min(s[1],i)})),new zn(r,i,t-r,n-i)}move(t,n){const r=this.bbox();if(t-=r.x,n-=r.y,!isNaN(t)&&!isNaN(n))for(let r=this.length-1;r>=0;r--)this[r]=[this[r][0]+t,this[r][1]+n];return this}parse(t=[0,0]){const n=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(gn).map(parseFloat)).length%2!=0&&t.pop();for(let r=0,i=t.length;r<i;r+=2)n.push([t[r],t[r+1]]);return n}size(t,n){let r;const i=this.bbox();for(r=this.length-1;r>=0;r--)i.width&&(this[r][0]=(this[r][0]-i.x)*t/i.width+i.x),i.height&&(this[r][1]=(this[r][1]-i.y)*n/i.height+i.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let n=0,r=this.length;n<r;n++)t.push(this[n].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){En.isMatrixLike(t)||(t=new En(t));for(let n=this.length;n--;){const[r,i]=this[n];this[n][0]=t.a*r+t.c*i+t.e,this[n][1]=t.b*r+t.d*i+t.f}return this}},jr=d({MorphArray:()=>Or,height:()=>Er,width:()=>Sr,x:()=>kr,y:()=>Ar});const Or=_r;function kr(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}function Ar(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}function Sr(t){const n=this.bbox();return null==t?n.width:this.size(t,n.height)}function Er(t){const n=this.bbox();return null==t?n.height:this.size(n.width,t)}var Tr=class extends er{constructor(t,n=t){super(Kt("line",t),n)}array(){return new _r([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,n){return this.attr(this.array().move(t,n).toLine())}plot(t,n,r,i){return null==t?this.array():(t=void 0!==n?{x1:t,y1:n,x2:r,y2:i}:new _r(t).toLine(),this.attr(t))}size(t,n){const r=It(this,t,n);return this.attr(this.array().size(r.width,r.height).toLine())}};un(Tr,jr),v({Container:{line:on((function(...t){return Tr.prototype.plot.apply(this.put(new Tr),null!=t[0]?t:[0,0,0,0])}))}}),rn(Tr,"Line");var Cr=class extends ir{constructor(t,n=t){super(Kt("marker",t),n)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,n){return this.attr("refX",t).attr("refY",n)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}};function zr(t,n){return function(r){return null==r?this[t]:(this[t]=r,n&&n.call(this),this)}}v({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:on((function(t,n,r){return this.put(new Cr).size(t,n).ref(t/2,n/2).viewbox(0,0,t,n).attr("orient","auto").update(r)}))},marker:{marker(t,n,r,i){let s=["marker"];return"all"!==t&&s.push(t),s=s.join("-"),t=arguments[1]instanceof Cr?arguments[1]:this.defs().marker(n,r,i),this.attr(s,t)}}}),rn(Cr,"Marker");const Fr={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,n,r,i){return function(s){return s<0?t>0?n/t*s:r>0?i/r*s:0:s>1?r<1?(1-i)/(1-r)*s+(i-r)/(1-r):t<1?(1-n)/(1-t)*s+(n-t)/(1-t):1:3*s*(1-s)**2*n+3*s**2*(1-s)*i+s**3}},steps:function(t,n="end"){n=n.split("-").reverse()[0];let r=t;return"none"===n?--r:"both"===n&&++r,(i,s=!1)=>{let e=Math.floor(i*t);const h=i*e%1==0;return"start"!==n&&"both"!==n||++e,s&&h&&--e,i>=0&&e<0&&(e=0),i<=1&&e>r&&(e=r),e/r}}};var Nr=class{done(){return!1}},Dr=class extends Nr{constructor(t=">"){super(),this.ease=Fr[t]||t}step(t,n,r){return"number"!=typeof t?r<1?t:n:t+(n-t)*this.ease(r)}},Pr=class extends Nr{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,n,r,i){return this.stepper(t,n,r,i)}};function $r(){const t=(this._duration||500)/1e3,n=Math.PI,r=Math.log((this._overshoot||0)/100+1e-10),i=-r/Math.sqrt(n*n+r*r),s=3.9/(i*t);this.d=2*i*s,this.k=s*s}un(class extends Pr{constructor(t=500,n=0){super(),this.duration(t).overshoot(n)}step(t,n,r,i){if("string"==typeof t)return t;if(i.done=r===1/0,r===1/0)return n;if(0===r)return t;r>100&&(r=16);const s=i.velocity||0,e=-this.d*s-this.k*(t-n),h=t+s*(r/=1e3)+e*r*r/2;return i.velocity=s+e*r,i.done=Math.abs(n-h)+Math.abs(s)<.002,i.done?n:h}},{duration:zr("_duration",$r),overshoot:zr("_overshoot",$r)}),un(class extends Pr{constructor(t=.1,n=.01,r=0,i=1e3){super(),this.p(t).i(n).d(r).windup(i)}step(t,n,r,i){if("string"==typeof t)return t;if(i.done=r===1/0,r===1/0)return n;if(0===r)return t;const s=n-t;let e=(i.integral||0)+s*r;const h=(s-(i.error||0))/r,u=this._windup;return!1!==u&&(e=Math.max(-u,Math.min(e,u))),i.error=s,i.integral=e,i.done=Math.abs(s)<.001,i.done?n:t+(this.P*s+this.I*e+this.D*h)}},{windup:zr("_windup"),p:zr("P"),i:zr("I"),d:zr("D")});const Rr={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Lr={M:function(t,n,r){return n.x=r.x=t[0],n.y=r.y=t[1],["M",n.x,n.y]},L:function(t,n){return n.x=t[0],n.y=t[1],["L",t[0],t[1]]},H:function(t,n){return n.x=t[0],["H",t[0]]},V:function(t,n){return n.y=t[0],["V",t[0]]},C:function(t,n){return n.x=t[4],n.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,n){return n.x=t[2],n.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,n){return n.x=t[2],n.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,n){return n.x=t[0],n.y=t[1],["T",t[0],t[1]]},Z:function(t,n,r){return n.x=r.x,n.y=r.y,["Z"]},A:function(t,n){return n.x=t[5],n.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},Ir="mlhvqtcsaz".split("");for(let t=0,n=Ir.length;t<n;++t)Lr[Ir[t]]=function(t){return function(n,r,i){if("H"===t)n[0]=n[0]+r.x;else if("V"===t)n[0]=n[0]+r.y;else if("A"===t)n[5]=n[5]+r.x,n[6]=n[6]+r.y;else for(let t=0,i=n.length;t<i;++t)n[t]=n[t]+(t%2?r.y:r.x);return Lr[t](n,r,i)}}(Ir[t].toUpperCase());function Gr(t){return t.segment.length&&t.segment.length-1===Rr[t.segment[0].toUpperCase()]}function Yr(t,n){t.inNumber&&Xr(t,!1);const r=xn.test(n);if(r)t.segment=[n];else{const n=t.lastCommand,r=n.toLowerCase();t.segment=["m"===r?n===r?"l":"L":n]}return t.inSegment=!0,t.lastCommand=t.segment[0],r}function Xr(t,n){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=n,t.number="",t.pointSeen=!1,t.hasExponent=!1,Gr(t)&&Hr(t)}function Hr(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){return Lr[t.segment[0]](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function Br(t){if(!t.segment.length)return!1;const n="A"===t.segment[0].toUpperCase(),r=t.segment.length;return n&&(4===r||5===r)}function Qr(t){return"E"===t.lastToken.toUpperCase()}const Vr=new Set([" ",",","\t","\n","\r","\f"]);var Jr=class extends Un{bbox(){return Tn().path.setAttribute("d",this.toString()),new zn(Tn.nodes.path.getBBox())}move(t,n){const r=this.bbox();if(t-=r.x,n-=r.y,!isNaN(t)&&!isNaN(n))for(let r,i=this.length-1;i>=0;i--)r=this[i][0],"M"===r||"L"===r||"T"===r?(this[i][1]+=t,this[i][2]+=n):"H"===r?this[i][1]+=t:"V"===r?this[i][1]+=n:"C"===r||"S"===r||"Q"===r?(this[i][1]+=t,this[i][2]+=n,this[i][3]+=t,this[i][4]+=n,"C"===r&&(this[i][5]+=t,this[i][6]+=n)):"A"===r&&(this[i][6]+=t,this[i][7]+=n);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,n=!0){let r=0,i="";const s={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:n,p0:new An,p:new An};for(;s.lastToken=i,i=t.charAt(r++);)if(s.inSegment||!Yr(s,i))if("."!==i)if(isNaN(parseInt(i)))if(Vr.has(i))s.inNumber&&Xr(s,!1);else if("-"!==i&&"+"!==i)if("E"!==i.toUpperCase()){if(xn.test(i)){if(s.inNumber)Xr(s,!1);else{if(!Gr(s))throw new Error("parser Error");Hr(s)}--r}}else s.number+=i,s.hasExponent=!0;else{if(s.inNumber&&!Qr(s)){Xr(s,!1),--r;continue}s.number+=i,s.inNumber=!0}else{if("0"===s.number||Br(s)){s.inNumber=!0,s.number=i,Xr(s,!0);continue}s.inNumber=!0,s.number+=i}else{if(s.pointSeen||s.hasExponent){Xr(s,!1),--r;continue}s.inNumber=!0,s.pointSeen=!0,s.number+=i}return s.inNumber&&Xr(s,!1),s.inSegment&&Gr(s)&&Hr(s),s.segments}(t)}size(t,n){const r=this.bbox();let i,s;for(r.width=0===r.width?1:r.width,r.height=0===r.height?1:r.height,i=this.length-1;i>=0;i--)s=this[i][0],"M"===s||"L"===s||"T"===s?(this[i][1]=(this[i][1]-r.x)*t/r.width+r.x,this[i][2]=(this[i][2]-r.y)*n/r.height+r.y):"H"===s?this[i][1]=(this[i][1]-r.x)*t/r.width+r.x:"V"===s?this[i][1]=(this[i][1]-r.y)*n/r.height+r.y:"C"===s||"S"===s||"Q"===s?(this[i][1]=(this[i][1]-r.x)*t/r.width+r.x,this[i][2]=(this[i][2]-r.y)*n/r.height+r.y,this[i][3]=(this[i][3]-r.x)*t/r.width+r.x,this[i][4]=(this[i][4]-r.y)*n/r.height+r.y,"C"===s&&(this[i][5]=(this[i][5]-r.x)*t/r.width+r.x,this[i][6]=(this[i][6]-r.y)*n/r.height+r.y)):"A"===s&&(this[i][1]=this[i][1]*t/r.width,this[i][2]=this[i][2]*n/r.height,this[i][6]=(this[i][6]-r.x)*t/r.width+r.x,this[i][7]=(this[i][7]-r.y)*n/r.height+r.y);return this}toString(){return function(t){let n="";for(let r=0,i=t.length;r<i;r++)n+=t[r][0],null!=t[r][1]&&(n+=t[r][1],null!=t[r][2]&&(n+=" ",n+=t[r][2],null!=t[r][3]&&(n+=" ",n+=t[r][3],n+=" ",n+=t[r][4],null!=t[r][5]&&(n+=" ",n+=t[r][5],n+=" ",n+=t[r][6],null!=t[r][7]&&(n+=" ",n+=t[r][7])))));return n+" "}(this)}};const qr=t=>{const n=typeof t;return"number"===n?Wn:"string"===n?kn.isColor(t)?kn:gn.test(t)?xn.test(t)?Jr:Un:cn.test(t)?Wn:Wr:ni.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?Un:"object"===n?ti:Wr};var Ur=class{constructor(t){this._stepper=t||new Dr("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,n){return t&&n}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(qr(t));let n=new this._type(t);return this._type===kn&&(n=this._to?n[this._to[4]]():this._from?n[this._from[4]]():n),this._type===ti&&(n=this._to?n.align(this._to):this._from?n.align(this._from):n),n=n.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(n.length)).map(Object).map((function(t){return t.done=!0,t})),n}},Wr=class{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}},Zr=class t{constructor(...t){this.init(...t)}init(n){return Array.isArray(n)&&(n={scaleX:n[0],scaleY:n[1],shear:n[2],rotate:n[3],translateX:n[4],translateY:n[5],originX:n[6],originY:n[7]}),Object.assign(this,t.defaults,n),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}};Zr.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const Kr=(t,n)=>t[0]<n[0]?-1:t[0]>n[0]?1:0;var ti=class{constructor(...t){this.init(...t)}align(t){const n=this.values;for(let r=0,i=n.length;r<i;++r){if(n[r+1]===t[r+1]){if(n[r+1]===kn&&t[r+7]!==n[r+7]){const n=t[r+7],i=new kn(this.values.splice(r+3,5))[n]().toArray();this.values.splice(r+3,0,...i)}r+=n[r+2]+2;continue}if(!t[r+1])return this;const i=(new t[r+1]).toArray();n.splice(r,n[r+2]+3,t[r],t[r+1],t[r+2],...i),r+=n[r+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const n=[];for(const r in t){const i=qr(t[r]),s=new i(t[r]).toArray();n.push([r,i,s.length,...s])}return n.sort(Kr),this.values=n.reduce(((t,n)=>t.concat(n)),[]),this}toArray(){return this.values}valueOf(){const t={},n=this.values;for(;n.length;){const r=n.shift(),i=n.shift(),s=n.shift();t[r]=new i(n.splice(0,s))}return t}};const ni=[Wr,Zr,ti];var ri=class extends er{constructor(t,n=t){super(Kt("path",t),n)}array(){return this._array||(this._array=new Jr(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,n){return this.attr("d",this.array().move(t,n))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new Jr(t))}size(t,n){const r=It(this,t,n);return this.attr("d",this.array().size(r.width,r.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}};ri.prototype.MorphArray=Jr,v({Container:{path:on((function(t){return this.put(new ri).plot(t||new Jr)}))}}),rn(ri,"Path");var ii=d({array:()=>si,clear:()=>ei,move:()=>hi,plot:()=>ui,size:()=>oi});function si(){return this._array||(this._array=new _r(this.attr("points")))}function ei(){return delete this._array,this}function hi(t,n){return this.attr("points",this.array().move(t,n))}function ui(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new _r(t))}function oi(t,n){const r=It(this,t,n);return this.attr("points",this.array().size(r.width,r.height))}var ci=class extends er{constructor(t,n=t){super(Kt("polygon",t),n)}};v({Container:{polygon:on((function(t){return this.put(new ci).plot(t||new _r)}))}}),un(ci,jr),un(ci,ii),rn(ci,"Polygon");var ai=class extends er{constructor(t,n=t){super(Kt("polyline",t),n)}};v({Container:{polyline:on((function(t){return this.put(new ai).plot(t||new _r)}))}}),un(ai,jr),un(ai,ii),rn(ai,"Polyline");var li=class extends er{constructor(t,n=t){super(Kt("rect",t),n)}};un(li,{rx:ur,ry:or}),v({Container:{rect:on((function(t,n){return this.put(new li).size(t,n)}))}}),rn(li,"Rect");var fi=class{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const n=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(n.prev=this._last,this._last.next=n,this._last=n):(this._last=n,this._first=n),n}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}};const pi={nextDraw:null,frames:new fi,timeouts:new fi,immediates:new fi,timer:()=>Vt.window.performance||Vt.window.Date,transforms:[],frame(t){const n=pi.frames.push({run:t});return null===pi.nextDraw&&(pi.nextDraw=Vt.window.requestAnimationFrame(pi._draw)),n},timeout(t,n){n=n||0;const r=pi.timer().now()+n,i=pi.timeouts.push({run:t,time:r});return null===pi.nextDraw&&(pi.nextDraw=Vt.window.requestAnimationFrame(pi._draw)),i},immediate(t){const n=pi.immediates.push(t);return null===pi.nextDraw&&(pi.nextDraw=Vt.window.requestAnimationFrame(pi._draw)),n},cancelFrame(t){null!=t&&pi.frames.remove(t)},clearTimeout(t){null!=t&&pi.timeouts.remove(t)},cancelImmediate(t){null!=t&&pi.immediates.remove(t)},_draw(t){try{let n=null;const r=pi.timeouts.last();for(;(n=pi.timeouts.shift())&&(t>=n.time?n.run():pi.timeouts.push(n),n!==r););let i=null;const s=pi.frames.last();for(;i!==s&&(i=pi.frames.shift());)i.run(t);let e=null;for(;e=pi.immediates.shift();)e()}finally{const t=pi.timeouts.first()||pi.frames.first()||pi.immediates.first();pi.nextDraw=t?Vt.window.requestAnimationFrame(pi._draw):null}}},di=function(t){const n=t.start,r=t.runner.duration();return{start:n,duration:r,end:n+r,runner:t.runner}},wi=function(){const t=Vt.window;return(t.performance||t.Date).now()};var yi=class extends Vn{constructor(t=wi){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),n=t?t.runner.duration():0;return(t?t.start:this._time)+n}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const n=this.speed();if(null==t)return this.speed(-n);const r=Math.abs(n);return this.speed(t?-r:r)}schedule(t,n,r){if(null==t)return this._runners.map(di);let i=0;const s=this.getEndTime();if(n=n||0,null==r||"last"===r||"after"===r)i=s;else if("absolute"===r||"start"===r)i=n,n=0;else if("now"===r)i=this._time;else if("relative"===r){const r=this.getRunnerInfoById(t.id);r&&(i=r.start+n,n=0)}else{if("with-last"!==r)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();i=t?t.start:this._time}}t.unschedule(),t.timeline(this);const e=t.persist(),h={persist:null===e?this._persist:e,start:i+n,runner:t};return this._lastRunnerId=t.id,this._runners.push(h),this._runners.sort(((t,n)=>t.start-n.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const n=this._runnerIds.indexOf(t.id);return n<0||(this._runners.splice(n,1),this._runnerIds.splice(n,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return pi.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=pi.frame(this._step)),this)}_stepFn(t=!1){const n=this._timeSource();let r=n-this._lastSourceTime;t&&(r=0);const i=this._speed*r+(this._time-this._lastStepTime);this._lastSourceTime=n,t||(this._time+=i,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const n=this._runners[t];this._time-n.start<=0&&n.runner.reset()}let s=!1;for(let t=0,n=this._runners.length;t<n;t++){const r=this._runners[t],e=r.runner;let h=i;const u=this._time-r.start;u<=0?s=!0:(u<h&&(h=u),e.active()&&(e.step(h).done?!0!==r.persist&&e.duration()-e.time()+this._time+r.persist<this._time&&(e.unschedule(),--t,--n):s=!0))}return s&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}};v({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new yi,this._timeline):(this._timeline=t,this)}}});var mi=class t extends Vn{constructor(n){super(),this.id=t.id++,n="function"==typeof(n=null==n?400:n)?new Pr(n):n,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof n&&n,this._isDeclarative=n instanceof Pr,this._stepper=this._isDeclarative?n:new Dr,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new En,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,n,r){let i=1,s=!1,e=0;return n=n??0,r=r||"last","object"!=typeof(t=t??400)||t instanceof Nr||(n=t.delay??n,r=t.when??r,s=t.swing||s,i=t.times??i,e=t.wait??e,t=t.duration??400),{duration:t,delay:n,swing:s,times:i,wait:e,when:r}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(n,r,i){const s=t.sanitise(n,r,i),e=new t(s.duration);return this._timeline&&e.timeline(this._timeline),this._element&&e.element(this._element),e.loop(s).schedule(s.delay,s.when)}clearTransform(){return this.transforms=new En,this}clearTransformsFromQueue(){var t;this.done&&this._timeline&&(0,Dt.default)(t=this._timeline._runnerIds).call(t,this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new Dr(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,n,r){return"object"==typeof t&&(n=t.swing,r=t.wait,t=t.times),this._times=t||1/0,this._swing=n||!1,this._wait=r||0,!0===this._times&&(this._times=1/0),this}loops(t){const n=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/n);return Math.min(t+(this._time-t*n)/this._duration,this._times)}const r=Math.floor(t);return this.time(n*r+this._duration*(t%1))}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const n=this._time,r=this._duration,i=this._wait,s=this._swing,e=this._reverse;let h;if(null==t){const t=function(t){const n=s*Math.floor(t%(2*(i+r))/(i+r)),h=n&&!e||!n&&e,u=Math.pow(-1,h)*(t%(i+r))/r+h;return Math.max(Math.min(u,1),0)},u=this._times*(i+r)-i;return h=n<=0?Math.round(t(1e-5)):n<u?t(n):Math.round(t(u-1e-5)),h}const u=Math.floor(this.loops()),o=s&&u%2==0;return h=u+(o&&!e||e&&o?t:1-t),this.loops(h)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,n,r,i){return this._queue.push({initialiser:t||Jn,runner:n||Jn,retarget:r,isTransform:i,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,n,r){if(t instanceof yi||(r=n,n=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,n,r),this}step(t){if(!this.enabled)return this;this._time+=t=null==t?16:t;const n=this.position(),r=this._lastPosition!==n&&this._time>=0;this._lastPosition=n;const i=this.duration(),s=this._lastTime<=0&&this._time>0,e=this._lastTime<i&&this._time>=i;this._lastTime=this._time,s&&this.fire("start",this);const h=this._isDeclarative;this.done=!h&&!e&&this._time>=i,this._reseted=!1;let u=!1;return(r||h)&&(this._initialise(r),this.transforms=new En,u=this._run(h?t:n),this.fire("step",this)),this.done=this.done||u&&h,e&&this.fire("finished",this),this}time(t){return null==t?this._time:(this.step(t-this._time),this)}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let n=0,r=this._queue.length;n<r;++n){const r=this._queue[n],i=this._isDeclarative||!r.initialised&&t;t=!r.finished,i&&t&&(r.initialiser.call(this),r.initialised=!0)}}_rememberMorpher(t,n){if(this._history[t]={morpher:n,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let n=!0;for(let r=0,i=this._queue.length;r<i;++r){const i=this._queue[r],s=i.runner.call(this,t);i.finished=i.finished||!0===s,n=n&&i.finished}return n}_tryRetarget(t,n,r){if(this._history[t]){if(!this._history[t].caller.initialised){const n=this._queue.indexOf(this._history[t].caller);return this._queue.splice(n,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,n,r):this._history[t].morpher.to(n),this._history[t].caller.finished=!1;const i=this.timeline();return i&&i.play(),!0}return!1}};mi.id=0;var vi=class{constructor(t=new En,n=-1,r=!0){this.transforms=t,this.id=n,this.done=r}clearTransformsFromQueue(){}};un([mi,vi],{mergeWith(t){return new vi(t.transforms.lmultiply(this.transforms),t.id)}});const bi=(t,n)=>t.lmultiplyO(n),gi=t=>t.transforms;function xi(){const t=this._transformationRunners.runners.map(gi).reduce(bi,new En);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}var Mi=class{constructor(){this.runners=[],this.ids=[]}add(t){var n;if((0,Dt.default)(n=this.runners).call(n,t))return;const r=t.id+1;return this.runners.push(t),this.ids.push(r),this}clearBefore(t){const n=this.ids.indexOf(t+1)||1;return this.ids.splice(0,n,0),this.runners.splice(0,n,new vi).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,n){const r=this.ids.indexOf(t+1);return this.ids.splice(r,1,t+1),this.runners.splice(r,1,n),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let i=0;i<this.runners.length;++i){var n,r;const s=this.runners[i];if(!(t&&s.done&&t.done)||s._timeline&&(0,Dt.default)(n=s._timeline._runnerIds).call(n,s.id)||t._timeline&&(0,Dt.default)(r=t._timeline._runnerIds).call(r,t.id))t=s;else{this.remove(s.id);const n=s.mergeWith(t);this.edit(t.id,n),t=n,--i}}return this}remove(t){const n=this.ids.indexOf(t+1);return this.ids.splice(n,1),this.runners.splice(n,1),this}};v({Element:{animate(t,n,r){const i=mi.sanitise(t,n,r),s=this.timeline();return new mi(i.duration).loop(i).element(this).timeline(s.play()).schedule(i.delay,i.when)},delay(t,n){return this.animate(0,t,n)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((n=>n.id<=t.id)).map(gi).reduce(bi,new En)},_addRunner(t){this._transformationRunners.add(t),pi.cancelImmediate(this._frameId),this._frameId=pi.immediate(xi.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new Mi).add(new vi(new En(this))))}}}),un(mi,{attr(t,n){return this.styleAttr("attr",t,n)},css(t,n){return this.styleAttr("css",t,n)},styleAttr(t,n,r){if("string"==typeof n)return this.styleAttr(t,{[n]:r});const i=n,s=this._history[t];if(s&&!s.caller.initialised&&s.caller.retarget)return s.caller.retarget.call(this,i),this;if(this._tryRetarget(t,i))return this;let e=new Ur(this._stepper).to(i),h=Object.keys(i);return this.queue((function(){e=e.from(this.element()[t](h))}),(function(n){return this.element()[t](e.at(n).valueOf()),e.done()}),(function(n){const r=(i=Object.keys(n),s=h,i.filter((t=>!(0,Dt.default)(s).call(s,t))));var i,s;if(r.length&&null!=e.from()){const n=this.element()[t](r),i=new ti(e.from()).valueOf();Object.assign(i,n),e.from(i)}const u=new ti(e.to()).valueOf();Object.assign(u,n),e.to(u),h=Object.keys(u)})),this._rememberMorpher(t,e),this},zoom(t,n){if(this._tryRetarget("zoom",t,n))return this;let r=new Ur(this._stepper).to(new Wn(t));return this.queue((function(){r=r.from(this.element().zoom())}),(function(t){return this.element().zoom(r.at(t),n),r.done()}),(function(t,i){n=i,r.to(t)})),this._rememberMorpher("zoom",r),this},transform(t,n,r){if(n=t.relative||n,this._isDeclarative&&!n&&this._tryRetarget("transform",t))return this;const i=En.isMatrixLike(t);r=null!=t.affine?t.affine:null!=r?r:!i;const s=new Ur(this._stepper).type(r?Zr:En);let e,h,u,o,c;return this.queue((function(){h=h||this.element(),e=e||Gt(t,h),c=new En(n?void 0:h),h._addRunner(this),n||h._clearTransformRunnersBefore(this)}),(function(a){n||this.clearTransform();const{x:l,y:f}=new An(e).transform(h._currentTransform(this)),p={...t,origin:[l,f]};!0===p.relative&&delete p.relative;let d=new En(p),w=this._isDeclarative&&u?u:c;if(r){d=d.decompose(l,f),w=w.decompose(l,f);const t=d.rotate,n=w.rotate,r=[t-360,t,t+360],i=r.map((t=>Math.abs(t-n))),s=Math.min(...i),e=i.indexOf(s);d.rotate=r[e]}n&&(i||(d.rotate=t.rotate||0),this._isDeclarative&&o&&(w.rotate=o)),s.from(w),s.to(d);const y=s.at(a);return o=y.rotate,u=new En(y),this.addTransform(u),h._addRunner(this),s.done()}),(function(n){(n.origin||"center").toString()!==(t.origin||"center").toString()&&(e=Gt(n,h)),t={...n,origin:e}}),!0),this._isDeclarative&&this._rememberMorpher("transform",s),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,n){return this.dx(t).dy(n)},_queueNumberDelta(t,n){if(n=new Wn(n),this._tryRetarget(t,n))return this;const r=new Ur(this._stepper).to(n);let i=null;return this.queue((function(){i=this.element()[t](),r.from(i),r.to(i+n)}),(function(n){return this.element()[t](r.at(n)),r.done()}),(function(t){r.to(i+new Wn(t))})),this._rememberMorpher(t,r),this},_queueObject(t,n){if(this._tryRetarget(t,n))return this;const r=new Ur(this._stepper).to(n);return this.queue((function(){r.from(this.element()[t]())}),(function(n){return this.element()[t](r.at(n)),r.done()})),this._rememberMorpher(t,r),this},_queueNumber(t,n){return this._queueObject(t,new Wn(n))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,n){return this.x(t).y(n)},amove(t,n){return this.ax(t).ay(n)},center(t,n){return this.cx(t).cy(n)},size(t,n){const r=It(this._element,t,n);return this.width(r.width).height(r.height)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,n,r,i){if(4===arguments.length)return this.plot([t,n,r,i]);if(this._tryRetarget("plot",t))return this;const s=new Ur(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){s.from(this._element.array())}),(function(t){return this._element.plot(s.at(t)),s.done()})),this._rememberMorpher("plot",s),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,n,r,i){return this._queueObject("viewbox",new zn(t,n,r,i))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),un(mi,{rx:ur,ry:or,from:vr,to:br}),rn(mi,"Runner");var _i=class extends ir{constructor(t,n=t){super(Kt("svg",t),n),this.namespace()}defs(){return this.isRoot()?tn(this.node.querySelector("defs"))||this.put(new sr):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof Vt.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:Ht,version:"1.1"}).attr("xmlns:xlink",Qt,Bt):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,Bt).attr("xmlns:svgjs",null,Bt)}root(){return this.isRoot()?this:super.root()}};v({Container:{nested:on((function(){return this.put(new _i)}))}}),rn(_i,"Svg",!0);var ji=class extends ir{constructor(t,n=t){super(Kt("symbol",t),n)}};v({Container:{symbol:on((function(){return this.put(new ji)}))}}),rn(ji,"Symbol");var Oi=d({amove:()=>Pi,ax:()=>Ni,ay:()=>Di,build:()=>$i,center:()=>Fi,cx:()=>Ci,cy:()=>zi,length:()=>Ai,move:()=>Ti,plain:()=>ki,x:()=>Si,y:()=>Ei});function ki(t){return!1===this._build&&this.clear(),this.node.appendChild(Vt.document.createTextNode(t)),this}function Ai(){return this.node.getComputedTextLength()}function Si(t,n=this.bbox()){return null==t?n.x:this.attr("x",this.attr("x")+t-n.x)}function Ei(t,n=this.bbox()){return null==t?n.y:this.attr("y",this.attr("y")+t-n.y)}function Ti(t,n,r=this.bbox()){return this.x(t,r).y(n,r)}function Ci(t,n=this.bbox()){return null==t?n.cx:this.attr("x",this.attr("x")+t-n.cx)}function zi(t,n=this.bbox()){return null==t?n.cy:this.attr("y",this.attr("y")+t-n.cy)}function Fi(t,n,r=this.bbox()){return this.cx(t,r).cy(n,r)}function Ni(t){return this.attr("x",t)}function Di(t){return this.attr("y",t)}function Pi(t,n){return this.ax(t).ay(n)}function $i(t){return this._build=!!t,this}var Ri=class extends er{constructor(t,n=t){super(Kt("text",t),n),this.dom.leading=this.dom.leading??new Wn(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new Wn(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let n=0;const r=this.dom.leading;this.each((function(i){if(Xt(this.node))return;const s=Vt.window.getComputedStyle(this.node).getPropertyValue("font-size"),e=r*new Wn(s);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?n+=e:(this.attr("dy",i?e+n:0),n=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new Wn(t.leading||1.3),this}writeDataToDom(){return super.writeDataToDom({leading:1.3})}text(t){if(void 0===t){const n=this.node.childNodes;let r=0;t="";for(let i=0,s=n.length;i<s;++i)"textPath"===n[i].nodeName||Xt(n[i])?0===i&&(r=i+1):(i!==r&&3!==n[i].nodeType&&!0===tn(n[i]).dom.newLined&&(t+="\n"),t+=n[i].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let n=0,r=(t=(t+"").split("\n")).length;n<r;n++)this.newLine(t[n]);return this.build(!1).rebuild()}};un(Ri,Oi),v({Container:{text:on((function(t=""){return this.put(new Ri).text(t)})),plain:on((function(t=""){return this.put(new Ri).plain(t)}))}}),rn(Ri,"Text");var Li=class extends er{constructor(t,n=t){super(Kt("tspan",t),n),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof Ri))return this;const n=t.index(this),r=Vt.window.getComputedStyle(this.node).getPropertyValue("font-size"),i=t.dom.leading*new Wn(r);return this.dy(n?i:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}};un(Li,Oi),v({Tspan:{tspan:on((function(t=""){const n=new Li;return this._build||this.clear(),this.put(n).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),rn(Li,"Tspan");var Ii=class extends er{constructor(t,n=t){super(Kt("circle",t),n)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new Wn(t).divide(2))}};un(Ii,{x:cr,y:ar,cx:lr,cy:fr,width:pr,height:dr}),v({Container:{circle:on((function(t=0){return this.put(new Ii).size(t).move(0,0)}))}}),rn(Ii,"Circle");var Gi=class extends ir{constructor(t,n=t){super(Kt("clipPath",t),n)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return Rn(this.node,"clip-path")}};v({Container:{clip:on((function(){return this.defs().put(new Gi)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const n=t instanceof Gi?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+n.id()+")")},unclip(){return this.attr("clip-path",null)}}}),rn(Gi,"ClipPath");var Yi=class extends nr{constructor(t,n=t){super(Kt("foreignObject",t),n)}};v({Container:{foreignObject:on((function(t,n){return this.put(new Yi).size(t,n)}))}}),rn(Yi,"ForeignObject");var Xi=d({dmove:()=>Hi,dx:()=>Bi,dy:()=>Qi,height:()=>Vi,move:()=>Ji,size:()=>qi,width:()=>Ui,x:()=>Wi,y:()=>Zi});function Hi(t,n){return this.children().forEach((r=>{let i;try{i=r.node instanceof Vt.window.SVGSVGElement?new zn(r.attr(["x","y","width","height"])):r.bbox()}catch(t){return}const s=new En(r),e=s.translate(t,n).transform(s.inverse()),h=new An(i.x,i.y).transform(e);r.dmove(h.x-i.x,h.y-i.y)})),this}function Bi(t){return this.dmove(t,0)}function Qi(t){return this.dmove(0,t)}function Vi(t,n=this.bbox()){return null==t?n.height:this.size(n.width,t,n)}function Ji(t=0,n=0,r=this.bbox()){return this.dmove(t-r.x,n-r.y)}function qi(t,n,r=this.bbox()){const i=It(this,t,n,r),s=i.width/r.width,e=i.height/r.height;return this.children().forEach((t=>{const n=new An(r).transform(new En(t).inverse());t.scale(s,e,n.x,n.y)})),this}function Ui(t,n=this.bbox()){return null==t?n.width:this.size(t,n.height,n)}function Wi(t,n=this.bbox()){return null==t?n.x:this.move(t,n.y,n)}function Zi(t,n=this.bbox()){return null==t?n.y:this.move(n.x,t,n)}var Ki=class extends ir{constructor(t,n=t){super(Kt("g",t),n)}};un(Ki,Xi),v({Container:{group:on((function(){return this.put(new Ki)}))}}),rn(Ki,"G");var ts=class extends ir{constructor(t,n=t){super(Kt("a",t),n)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,Qt)}};un(ts,Xi),v({Container:{link:on((function(t){return this.put(new ts).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const n=t.parent();if(!n)return this.remove();const r=n.index(t);return n.add(this,r),t.remove(),this},linkTo(t){let n=this.linker();return n||(n=new ts,this.wrap(n)),"function"==typeof t?t.call(n,n):n.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),rn(ts,"A");var ns=class extends ir{constructor(t,n=t){super(Kt("mask",t),n)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return Rn(this.node,"mask")}};v({Container:{mask:on((function(){return this.defs().put(new ns)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const n=t instanceof ns?t:this.parent().mask().add(t);return this.attr("mask","url(#"+n.id()+")")},unmask(){return this.attr("mask",null)}}}),rn(ns,"Mask");var rs=class extends nr{constructor(t,n=t){super(Kt("stop",t),n)}update(t){return("number"==typeof t||t instanceof Wn)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new Wn(t.offset)),this}};v({Gradient:{stop:function(t,n,r){return this.put(new rs).update(t,n,r)}}}),rn(rs,"Stop");var is=class extends nr{constructor(t,n=t){super(Kt("style",t),n)}addText(t=""){return this.node.textContent+=t,this}font(t,n,r={}){return this.rule("@font-face",{fontFamily:t,src:n,...r})}rule(t,n){return this.addText(function(t,n){if(!t)return"";if(!n)return t;let r=t+"{";for(const t in n)r+=Rt(t)+":"+n[t]+";";return r+="}",r}(t,n))}};v("Dom",{style(t,n){return this.put(new is).rule(t,n)},fontface(t,n,r){return this.put(new is).font(t,n,r)}}),rn(is,"Style");var ss=class extends Ri{constructor(t,n=t){super(Kt("textPath",t),n)}array(){const t=this.track();return t?t.array():null}plot(t){const n=this.track();let r=null;return n&&(r=n.plot(t)),null==t?r:this}track(){return this.reference("href")}};v({Container:{textPath:on((function(t,n){return t instanceof Ri||(t=this.text(t)),t.path(n)}))},Text:{path:on((function(t,n=!0){const r=new ss;let i;if(t instanceof ri||(t=this.defs().path(t)),r.attr("href","#"+t,Qt),n)for(;i=this.node.firstChild;)r.node.appendChild(i);return this.put(r)})),textPath(){return this.findOne("textPath")}},Path:{text:on((function(t){return t instanceof Ri||(t=(new Ri).addTo(this.parent()).text(t)),t.path(this)})),targets(){return Rn(this.node,"href","textPath")}}}),ss.prototype.MorphArray=Jr,rn(ss,"TextPath");var es=class extends er{constructor(t,n=t){super(Kt("use",t),n)}use(t,n){return this.attr("href",(n||"")+"#"+t,Qt)}};v({Container:{use:on((function(t,n){return this.put(new es).use(t,n)}))}}),rn(es,"Use"),un([_i,ji,Mr,xr,Cr],b("viewbox")),un([Tr,ai,ci,ri],b("marker")),un(Ri,b("Text")),un(ri,b("Path")),un(sr,b("Defs")),un([Ri,Li],b("Tspan")),un([li,wr,gr,mi],b("radius")),un(Vn,b("EventTarget")),un(tr,b("Dom")),un(nr,b("Element")),un(er,b("Shape")),un([ir,yr],b("Container")),un(gr,b("Gradient")),un(mi,b("Runner")),Nn.extend([...new Set(m)]),function(t=[]){ni.push(...[].concat(t))}([Wn,kn,zn,En,Un,_r,Jr,An]),un(ni,{to(t){return(new Ur).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,n,r,i,s){return this.fromArray(t.map((function(t,e){return i.step(t,n[e],r,s[e],s)})))}});export{r as F,s as P,_i as S,h as a}
|