semiotic 2.0.3 → 3.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +828 -0
- package/README.md +215 -37
- package/ai/cli.js +48 -0
- package/ai/dist/ai/componentRegistry.js +45 -0
- package/ai/dist/ai/mcp-server.js +99 -0
- package/ai/dist/ai/renderHOCToSVG.js +77 -0
- package/ai/dist/src/components/Annotation.js +358 -0
- package/ai/dist/src/components/AnnotationLayer/AnnotationLayer.js +369 -0
- package/ai/dist/src/components/Axis/Axis.js +374 -0
- package/ai/dist/src/components/Axis/axisTitle.js +14 -0
- package/ai/dist/src/components/Axis/index.js +7 -0
- package/ai/dist/src/components/Axis/summaryGraphic.js +37 -0
- package/ai/dist/src/components/Brush.js +84 -0
- package/ai/dist/src/components/ChartErrorBoundary.js +91 -0
- package/ai/dist/src/components/DividedLine.js +65 -0
- package/ai/dist/src/components/Legend.js +140 -0
- package/ai/dist/src/components/LinkedCharts.js +95 -0
- package/ai/dist/src/components/ThemeProvider.js +79 -0
- package/ai/dist/src/components/Tooltip/Tooltip.js +309 -0
- package/ai/dist/src/components/TooltipPositioner/index.js +132 -0
- package/ai/dist/src/components/annotationLayerBehavior/annotationHandling.js +73 -0
- package/ai/dist/src/components/annotationLayerBehavior/d3labeler.js +254 -0
- package/ai/dist/src/components/annotationRules/baseRules.js +150 -0
- package/ai/dist/src/components/annotationRules/networkframeRules.js +196 -0
- package/ai/dist/src/components/annotationRules/xyframeRules.js +297 -0
- package/ai/dist/src/components/batchWork.js +35 -0
- package/ai/dist/src/components/charts/index.js +109 -0
- package/ai/dist/src/components/charts/network/ChordDiagram.js +142 -0
- package/ai/dist/src/components/charts/network/CirclePack.js +108 -0
- package/ai/dist/src/components/charts/network/ForceDirectedGraph.js +121 -0
- package/ai/dist/src/components/charts/network/SankeyDiagram.js +155 -0
- package/ai/dist/src/components/charts/network/TreeDiagram.js +110 -0
- package/ai/dist/src/components/charts/network/Treemap.js +106 -0
- package/ai/dist/src/components/charts/ordinal/BarChart.js +156 -0
- package/ai/dist/src/components/charts/ordinal/BoxPlot.js +139 -0
- package/ai/dist/src/components/charts/ordinal/DonutChart.js +130 -0
- package/ai/dist/src/components/charts/ordinal/DotPlot.js +126 -0
- package/ai/dist/src/components/charts/ordinal/GroupedBarChart.js +129 -0
- package/ai/dist/src/components/charts/ordinal/Histogram.js +132 -0
- package/ai/dist/src/components/charts/ordinal/PieChart.js +128 -0
- package/ai/dist/src/components/charts/ordinal/RidgelinePlot.js +130 -0
- package/ai/dist/src/components/charts/ordinal/StackedBarChart.js +130 -0
- package/ai/dist/src/components/charts/ordinal/SwarmPlot.js +147 -0
- package/ai/dist/src/components/charts/ordinal/ViolinPlot.js +138 -0
- package/ai/dist/src/components/charts/realtime/RealtimeHeatmap.js +79 -0
- package/ai/dist/src/components/charts/realtime/RealtimeHistogram.js +114 -0
- package/ai/dist/src/components/charts/realtime/RealtimeLineChart.js +93 -0
- package/ai/dist/src/components/charts/realtime/RealtimeSwarmChart.js +105 -0
- package/ai/dist/src/components/charts/realtime/RealtimeWaterfallChart.js +106 -0
- package/ai/dist/src/components/charts/shared/ChartError.js +72 -0
- package/ai/dist/src/components/charts/shared/colorUtils.js +138 -0
- package/ai/dist/src/components/charts/shared/formatUtils.js +213 -0
- package/ai/dist/src/components/charts/shared/hooks.js +49 -0
- package/ai/dist/src/components/charts/shared/legendUtils.js +57 -0
- package/ai/dist/src/components/charts/shared/selectionUtils.js +67 -0
- package/ai/dist/src/components/charts/shared/tooltipUtils.js +79 -0
- package/ai/dist/src/components/charts/shared/types.js +2 -0
- package/ai/dist/src/components/charts/shared/validateChartData.js +82 -0
- package/ai/dist/src/components/charts/shared/validateProps.js +736 -0
- package/ai/dist/src/components/charts/xy/AreaChart.js +230 -0
- package/ai/dist/src/components/charts/xy/BubbleChart.js +251 -0
- package/ai/dist/src/components/charts/xy/Heatmap.js +235 -0
- package/ai/dist/src/components/charts/xy/LineChart.js +307 -0
- package/ai/dist/src/components/charts/xy/MinimapChart.js +298 -0
- package/ai/dist/src/components/charts/xy/Scatterplot.js +172 -0
- package/ai/dist/src/components/charts/xy/ScatterplotMatrix.js +426 -0
- package/ai/dist/src/components/charts/xy/StackedAreaChart.js +231 -0
- package/ai/dist/src/components/constants/coordinateNames.js +11 -0
- package/ai/dist/src/components/constants/frame_props.js +251 -0
- package/ai/dist/src/components/data/dataFunctions.js +487 -0
- package/ai/dist/src/components/data/multiAccessorUtils.js +14 -0
- package/ai/dist/src/components/data/transforms.js +143 -0
- package/ai/dist/src/components/data/unflowedFunctions.js +5 -0
- package/ai/dist/src/components/export/exportChart.js +121 -0
- package/ai/dist/src/components/generic_utilities/functions.js +5 -0
- package/ai/dist/src/components/geometry/areaDrawing.js +312 -0
- package/ai/dist/src/components/geometry/contourLayout.js +73 -0
- package/ai/dist/src/components/geometry/hexbinLayout.js +163 -0
- package/ai/dist/src/components/geometry/lineDrawing.js +356 -0
- package/ai/dist/src/components/geometry/sankeyLinks.js +331 -0
- package/ai/dist/src/components/geometry/summaryLayouts.js +136 -0
- package/ai/dist/src/components/index.js +18 -0
- package/ai/dist/src/components/processing/InteractionItems.js +223 -0
- package/ai/dist/src/components/processing/hierarchyUtils.js +104 -0
- package/ai/dist/src/components/processing/layouts/chordLayout.js +58 -0
- package/ai/dist/src/components/processing/layouts/forceLayout.js +142 -0
- package/ai/dist/src/components/processing/layouts/hierarchyLayout.js +31 -0
- package/ai/dist/src/components/processing/layouts/index.js +32 -0
- package/ai/dist/src/components/processing/layouts/sankeyLayout.js +96 -0
- package/ai/dist/src/components/processing/layouts/simpleLayouts.js +34 -0
- package/ai/dist/src/components/processing/layouts/types.js +2 -0
- package/ai/dist/src/components/processing/networkDefaults.js +39 -0
- package/ai/dist/src/components/realtime/BinAccumulator.js +36 -0
- package/ai/dist/src/components/realtime/IncrementalExtent.js +55 -0
- package/ai/dist/src/components/realtime/RingBuffer.js +104 -0
- package/ai/dist/src/components/realtime/renderers/barRenderer.js +133 -0
- package/ai/dist/src/components/realtime/renderers/candlestickRenderer.js +7 -0
- package/ai/dist/src/components/realtime/renderers/lineRenderer.js +164 -0
- package/ai/dist/src/components/realtime/renderers/swarmRenderer.js +91 -0
- package/ai/dist/src/components/realtime/renderers/types.js +2 -0
- package/ai/dist/src/components/realtime/renderers/waterfallRenderer.js +163 -0
- package/ai/dist/src/components/realtime/types.js +2 -0
- package/ai/dist/src/components/semiotic-ai.js +89 -0
- package/ai/dist/src/components/semiotic-data.js +12 -0
- package/ai/dist/src/components/semiotic-network.js +38 -0
- package/ai/dist/src/components/semiotic-ordinal.js +28 -0
- package/ai/dist/src/components/semiotic-realtime.js +30 -0
- package/ai/dist/src/components/semiotic-server.js +8 -0
- package/ai/dist/src/components/semiotic-xy.js +35 -0
- package/ai/dist/src/components/semiotic.js +109 -0
- package/ai/dist/src/components/server/renderToStaticSVG.js +594 -0
- package/ai/dist/src/components/store/SelectionStore.js +91 -0
- package/ai/dist/src/components/store/ThemeStore.js +78 -0
- package/ai/dist/src/components/store/TooltipStore.js +13 -0
- package/ai/dist/src/components/store/createStore.js +81 -0
- package/ai/dist/src/components/store/useSelection.js +133 -0
- package/ai/dist/src/components/stream/CanvasHitTester.js +164 -0
- package/ai/dist/src/components/stream/DataSourceAdapter.js +99 -0
- package/ai/dist/src/components/stream/MarginalGraphics.js +266 -0
- package/ai/dist/src/components/stream/NetworkCanvasHitTester.js +228 -0
- package/ai/dist/src/components/stream/NetworkPipelineStore.js +498 -0
- package/ai/dist/src/components/stream/NetworkSVGOverlay.js +70 -0
- package/ai/dist/src/components/stream/NetworkSceneGraph.js +38 -0
- package/ai/dist/src/components/stream/OrdinalCanvasHitTester.js +146 -0
- package/ai/dist/src/components/stream/OrdinalPipelineStore.js +786 -0
- package/ai/dist/src/components/stream/OrdinalSVGOverlay.js +130 -0
- package/ai/dist/src/components/stream/ParticlePool.js +174 -0
- package/ai/dist/src/components/stream/PipelineStore.js +1243 -0
- package/ai/dist/src/components/stream/SVGOverlay.js +129 -0
- package/ai/dist/src/components/stream/SceneGraph.js +132 -0
- package/ai/dist/src/components/stream/StreamNetworkFrame.js +561 -0
- package/ai/dist/src/components/stream/StreamOrdinalFrame.js +492 -0
- package/ai/dist/src/components/stream/StreamXYFrame.js +590 -0
- package/ai/dist/src/components/stream/accessorUtils.js +20 -0
- package/ai/dist/src/components/stream/index.js +32 -0
- package/ai/dist/src/components/stream/layouts/chordLayoutPlugin.js +352 -0
- package/ai/dist/src/components/stream/layouts/forceLayoutPlugin.js +230 -0
- package/ai/dist/src/components/stream/layouts/hierarchyLayoutPlugin.js +568 -0
- package/ai/dist/src/components/stream/layouts/index.js +28 -0
- package/ai/dist/src/components/stream/layouts/sankeyLayoutPlugin.js +245 -0
- package/ai/dist/src/components/stream/networkTypes.js +17 -0
- package/ai/dist/src/components/stream/ordinalSceneBuilders/barScene.js +126 -0
- package/ai/dist/src/components/stream/ordinalSceneBuilders/connectorScene.js +62 -0
- package/ai/dist/src/components/stream/ordinalSceneBuilders/pieScene.js +33 -0
- package/ai/dist/src/components/stream/ordinalSceneBuilders/pointScene.js +63 -0
- package/ai/dist/src/components/stream/ordinalSceneBuilders/statisticalScene.js +278 -0
- package/ai/dist/src/components/stream/ordinalSceneBuilders/timelineScene.js +30 -0
- package/ai/dist/src/components/stream/ordinalSceneBuilders/types.js +2 -0
- package/ai/dist/src/components/stream/ordinalTypes.js +2 -0
- package/ai/dist/src/components/stream/renderers/areaCanvasRenderer.js +48 -0
- package/ai/dist/src/components/stream/renderers/barCanvasRenderer.js +70 -0
- package/ai/dist/src/components/stream/renderers/boxplotCanvasRenderer.js +75 -0
- package/ai/dist/src/components/stream/renderers/candlestickCanvasRenderer.js +28 -0
- package/ai/dist/src/components/stream/renderers/connectorCanvasRenderer.js +47 -0
- package/ai/dist/src/components/stream/renderers/heatmapCanvasRenderer.js +31 -0
- package/ai/dist/src/components/stream/renderers/lineCanvasRenderer.js +140 -0
- package/ai/dist/src/components/stream/renderers/networkArcRenderer.js +38 -0
- package/ai/dist/src/components/stream/renderers/networkCircleRenderer.js +37 -0
- package/ai/dist/src/components/stream/renderers/networkEdgeRenderer.js +102 -0
- package/ai/dist/src/components/stream/renderers/networkParticleRenderer.js +63 -0
- package/ai/dist/src/components/stream/renderers/networkRectRenderer.js +35 -0
- package/ai/dist/src/components/stream/renderers/pointCanvasRenderer.js +38 -0
- package/ai/dist/src/components/stream/renderers/swarmCanvasRenderer.js +10 -0
- package/ai/dist/src/components/stream/renderers/types.js +2 -0
- package/ai/dist/src/components/stream/renderers/violinCanvasRenderer.js +47 -0
- package/ai/dist/src/components/stream/renderers/waterfallCanvasRenderer.js +38 -0
- package/ai/dist/src/components/stream/renderers/wedgeCanvasRenderer.js +33 -0
- package/ai/dist/src/components/stream/types.js +2 -0
- package/ai/dist/src/components/types/annotationTypes.js +2 -0
- package/ai/dist/src/components/types/canvasTypes.js +2 -0
- package/ai/dist/src/components/types/generalTypes.js +2 -0
- package/ai/dist/src/components/types/interactionTypes.js +2 -0
- package/ai/dist/src/components/types/legendTypes.js +2 -0
- package/ai/dist/src/components/types/networkTypes.js +2 -0
- package/ai/dist/src/components/types/ordinalTypes.js +2 -0
- package/ai/dist/src/components/types/xyTypes.js +2 -0
- package/ai/dist/src/components/useBoundingRect.js +24 -0
- package/ai/dist/src/components/visualizationLayerBehavior/axis.js +301 -0
- package/ai/dist/src/components/visualizationLayerBehavior/general.js +435 -0
- package/ai/dist/src/setupTests.js +4 -0
- package/ai/examples.md +489 -0
- package/ai/schema.json +1338 -0
- package/ai/system-prompt.md +41 -0
- package/dist/AnnotationLayer/AnnotationLayer.d.ts +0 -1
- package/dist/Axis/axisTitle.d.ts +3 -3
- package/dist/Axis/summaryGraphic.d.ts +1 -1
- package/dist/ChartErrorBoundary.d.ts +39 -0
- package/dist/LinkedCharts.d.ts +42 -0
- package/dist/ThemeProvider.d.ts +12 -0
- package/dist/Tooltip/Tooltip.d.ts +141 -0
- package/dist/TooltipPositioner/index.d.ts +1 -1
- package/dist/annotationLayerBehavior/annotationHandling.d.ts +2 -2
- package/dist/annotationRules/networkframeRules.d.ts +2 -2
- package/dist/annotationRules/xyframeRules.d.ts +2 -2
- package/dist/batchWork.d.ts +1 -1
- package/dist/charts/index.d.ts +74 -0
- package/dist/charts/network/ChordDiagram.d.ts +36 -0
- package/dist/charts/network/CirclePack.d.ts +32 -0
- package/dist/charts/network/ForceDirectedGraph.d.ts +38 -0
- package/dist/charts/network/SankeyDiagram.d.ts +38 -0
- package/dist/charts/network/TreeDiagram.d.ts +34 -0
- package/dist/charts/network/Treemap.d.ts +33 -0
- package/dist/charts/ordinal/BarChart.d.ts +32 -0
- package/dist/charts/ordinal/BoxPlot.d.ts +27 -0
- package/dist/charts/ordinal/DonutChart.d.ts +23 -0
- package/dist/charts/ordinal/DotPlot.d.ts +27 -0
- package/dist/charts/ordinal/GroupedBarChart.d.ts +26 -0
- package/dist/charts/ordinal/Histogram.d.ts +26 -0
- package/dist/charts/ordinal/PieChart.d.ts +21 -0
- package/dist/charts/ordinal/RidgelinePlot.d.ts +34 -0
- package/dist/charts/ordinal/StackedBarChart.d.ts +27 -0
- package/dist/charts/ordinal/SwarmPlot.d.ts +29 -0
- package/dist/charts/ordinal/ViolinPlot.d.ts +28 -0
- package/dist/charts/realtime/RealtimeHeatmap.d.ts +95 -0
- package/dist/charts/realtime/RealtimeHistogram.d.ts +119 -0
- package/dist/charts/realtime/RealtimeLineChart.d.ts +98 -0
- package/dist/charts/realtime/RealtimeSwarmChart.d.ts +100 -0
- package/dist/charts/realtime/RealtimeWaterfallChart.d.ts +97 -0
- package/dist/charts/shared/ChartError.d.ts +19 -0
- package/dist/charts/shared/colorUtils.d.ts +62 -0
- package/dist/charts/shared/formatUtils.d.ts +94 -0
- package/dist/charts/shared/hooks.d.ts +20 -0
- package/dist/charts/shared/legendUtils.d.ts +32 -0
- package/dist/charts/shared/selectionUtils.d.ts +51 -0
- package/dist/charts/shared/tooltipUtils.d.ts +18 -0
- package/dist/charts/shared/types.d.ts +97 -0
- package/dist/charts/shared/validateChartData.d.ts +41 -0
- package/dist/charts/shared/validateProps.d.ts +18 -0
- package/dist/charts/xy/AreaChart.d.ts +130 -0
- package/dist/charts/xy/BubbleChart.d.ts +164 -0
- package/dist/charts/xy/Heatmap.d.ts +156 -0
- package/dist/charts/xy/LineChart.d.ts +196 -0
- package/dist/charts/xy/MinimapChart.d.ts +73 -0
- package/dist/charts/xy/Scatterplot.d.ts +55 -0
- package/dist/charts/xy/ScatterplotMatrix.d.ts +71 -0
- package/dist/charts/xy/StackedAreaChart.d.ts +134 -0
- package/dist/constants/frame_props.d.ts +9 -0
- package/dist/data/dataFunctions.d.ts +10 -11
- package/dist/data/transforms.d.ts +45 -0
- package/dist/export/exportChart.d.ts +16 -0
- package/dist/{svg → geometry}/areaDrawing.d.ts +3 -13
- package/dist/geometry/contourLayout.d.ts +6 -0
- package/dist/geometry/hexbinLayout.d.ts +7 -0
- package/dist/{svg → geometry}/lineDrawing.d.ts +7 -35
- package/dist/geometry/sankeyLinks.d.ts +2 -0
- package/dist/geometry/summaryLayouts.d.ts +45 -0
- package/dist/index.d.ts +1 -125
- package/dist/network.js +7495 -0
- package/dist/network.js.map +1 -0
- package/dist/network.min.js +1 -0
- package/dist/network.module.js +7458 -0
- package/dist/network.module.js.map +1 -0
- package/dist/network.module.min.js +1 -0
- package/dist/ordinal.js +6497 -0
- package/dist/ordinal.js.map +1 -0
- package/dist/ordinal.min.js +1 -0
- package/dist/ordinal.module.js +6465 -0
- package/dist/ordinal.module.js.map +1 -0
- package/dist/ordinal.module.min.js +1 -0
- package/dist/processing/InteractionItems.d.ts +5 -4
- package/dist/processing/hierarchyUtils.d.ts +16 -0
- package/dist/processing/layouts/chordLayout.d.ts +2 -0
- package/dist/processing/layouts/forceLayout.d.ts +3 -0
- package/dist/processing/layouts/hierarchyLayout.d.ts +10 -0
- package/dist/processing/layouts/index.d.ts +8 -0
- package/dist/processing/layouts/sankeyLayout.d.ts +8 -0
- package/dist/processing/layouts/simpleLayouts.d.ts +7 -0
- package/dist/processing/layouts/types.d.ts +17 -0
- package/dist/processing/networkDefaults.d.ts +36 -0
- package/dist/realtime/BinAccumulator.d.ts +8 -0
- package/dist/realtime/IncrementalExtent.d.ts +13 -0
- package/dist/realtime/RingBuffer.d.ts +19 -0
- package/dist/realtime/renderers/barRenderer.d.ts +2 -0
- package/dist/realtime/renderers/candlestickRenderer.d.ts +2 -0
- package/dist/realtime/renderers/lineRenderer.d.ts +2 -0
- package/dist/realtime/renderers/swarmRenderer.d.ts +2 -0
- package/dist/realtime/renderers/types.d.ts +9 -0
- package/dist/realtime/renderers/waterfallRenderer.d.ts +3 -0
- package/dist/realtime/types.d.ts +113 -0
- package/dist/realtime.js +7072 -0
- package/dist/realtime.js.map +1 -0
- package/dist/realtime.min.js +1 -0
- package/dist/realtime.module.js +7043 -0
- package/dist/realtime.module.js.map +1 -0
- package/dist/realtime.module.min.js +1 -0
- package/dist/semiotic-ai.d.ts +36 -0
- package/dist/semiotic-ai.js +13323 -0
- package/dist/semiotic-ai.js.map +1 -0
- package/dist/semiotic-ai.min.js +1 -0
- package/dist/semiotic-ai.module.js +13264 -0
- package/dist/semiotic-ai.module.js.map +1 -0
- package/dist/semiotic-ai.module.min.js +1 -0
- package/dist/semiotic-data.d.ts +5 -0
- package/dist/semiotic-data.js +141 -0
- package/dist/semiotic-data.js.map +1 -0
- package/dist/semiotic-data.min.js +1 -0
- package/dist/semiotic-data.module.js +136 -0
- package/dist/semiotic-data.module.js.map +1 -0
- package/dist/semiotic-data.module.min.js +1 -0
- package/dist/semiotic-network.d.ts +23 -0
- package/dist/semiotic-ordinal.d.ts +19 -0
- package/dist/semiotic-realtime.d.ts +22 -0
- package/dist/semiotic-server.d.ts +1 -0
- package/dist/semiotic-xy.d.ts +21 -0
- package/dist/semiotic.d.ts +41 -28
- package/dist/semiotic.js +16257 -13130
- package/dist/semiotic.js.map +1 -0
- package/dist/semiotic.min.js +1 -0
- package/dist/semiotic.module.js +16198 -13100
- package/dist/semiotic.module.js.map +1 -0
- package/dist/semiotic.module.min.js +1 -0
- package/dist/server/renderToStaticSVG.d.ts +9 -0
- package/dist/server.js +5191 -0
- package/dist/server.js.map +1 -0
- package/dist/server.min.js +1 -0
- package/dist/server.module.js +5166 -0
- package/dist/server.module.js.map +1 -0
- package/dist/server.module.min.js +1 -0
- package/dist/store/SelectionStore.d.ts +29 -0
- package/dist/store/ThemeStore.d.ts +26 -0
- package/dist/store/useSelection.d.ts +66 -0
- package/dist/stream/CanvasHitTester.d.ts +18 -0
- package/dist/stream/DataSourceAdapter.d.ts +32 -0
- package/dist/stream/MarginalGraphics.d.ts +19 -0
- package/dist/stream/NetworkCanvasHitTester.d.ts +14 -0
- package/dist/stream/NetworkPipelineStore.d.ts +74 -0
- package/dist/stream/NetworkSVGOverlay.d.ts +40 -0
- package/dist/stream/NetworkSceneGraph.d.ts +14 -0
- package/dist/stream/OrdinalCanvasHitTester.d.ts +9 -0
- package/dist/stream/OrdinalPipelineStore.d.ts +65 -0
- package/dist/stream/OrdinalSVGOverlay.d.ts +34 -0
- package/dist/stream/ParticlePool.d.ts +28 -0
- package/dist/stream/PipelineStore.d.ts +161 -0
- package/dist/stream/SVGOverlay.d.ts +37 -0
- package/dist/stream/SceneGraph.d.ts +16 -0
- package/dist/stream/StreamNetworkFrame.d.ts +4 -0
- package/dist/stream/StreamOrdinalFrame.d.ts +4 -0
- package/dist/stream/StreamXYFrame.d.ts +4 -0
- package/dist/stream/accessorUtils.d.ts +2 -0
- package/dist/stream/index.d.ts +16 -0
- package/dist/stream/layouts/chordLayoutPlugin.d.ts +8 -0
- package/dist/stream/layouts/forceLayoutPlugin.d.ts +9 -0
- package/dist/stream/layouts/hierarchyLayoutPlugin.d.ts +17 -0
- package/dist/stream/layouts/index.d.ts +11 -0
- package/dist/stream/layouts/sankeyLayoutPlugin.d.ts +8 -0
- package/dist/stream/networkTypes.d.ts +346 -0
- package/dist/stream/ordinalSceneBuilders/barScene.d.ts +4 -0
- package/dist/stream/ordinalSceneBuilders/connectorScene.d.ts +3 -0
- package/dist/stream/ordinalSceneBuilders/pieScene.d.ts +3 -0
- package/dist/stream/ordinalSceneBuilders/pointScene.d.ts +4 -0
- package/dist/stream/ordinalSceneBuilders/statisticalScene.d.ts +6 -0
- package/dist/stream/ordinalSceneBuilders/timelineScene.d.ts +3 -0
- package/dist/stream/ordinalSceneBuilders/types.d.ts +21 -0
- package/dist/stream/ordinalTypes.d.ts +225 -0
- package/dist/stream/renderers/areaCanvasRenderer.d.ts +7 -0
- package/dist/stream/renderers/barCanvasRenderer.d.ts +7 -0
- package/dist/stream/renderers/boxplotCanvasRenderer.d.ts +2 -0
- package/dist/stream/renderers/candlestickCanvasRenderer.d.ts +2 -0
- package/dist/stream/renderers/connectorCanvasRenderer.d.ts +2 -0
- package/dist/stream/renderers/heatmapCanvasRenderer.d.ts +6 -0
- package/dist/stream/renderers/lineCanvasRenderer.d.ts +8 -0
- package/dist/stream/renderers/networkArcRenderer.d.ts +5 -0
- package/dist/stream/renderers/networkCircleRenderer.d.ts +5 -0
- package/dist/stream/renderers/networkEdgeRenderer.d.ts +10 -0
- package/dist/stream/renderers/networkParticleRenderer.d.ts +11 -0
- package/dist/stream/renderers/networkRectRenderer.d.ts +5 -0
- package/dist/stream/renderers/pointCanvasRenderer.d.ts +7 -0
- package/dist/stream/renderers/swarmCanvasRenderer.d.ts +7 -0
- package/dist/stream/renderers/types.d.ts +7 -0
- package/dist/stream/renderers/violinCanvasRenderer.d.ts +2 -0
- package/dist/stream/renderers/waterfallCanvasRenderer.d.ts +8 -0
- package/dist/stream/renderers/wedgeCanvasRenderer.d.ts +2 -0
- package/dist/stream/types.d.ts +307 -0
- package/dist/types/annotationTypes.d.ts +13 -18
- package/dist/types/canvasTypes.d.ts +1 -1
- package/dist/types/generalTypes.d.ts +41 -36
- package/dist/types/interactionTypes.d.ts +7 -9
- package/dist/types/legendTypes.d.ts +2 -2
- package/dist/types/networkTypes.d.ts +40 -30
- package/dist/types/ordinalTypes.d.ts +27 -18
- package/dist/types/xyTypes.d.ts +1 -95
- package/dist/visualizationLayerBehavior/axis.d.ts +3 -5
- package/dist/visualizationLayerBehavior/general.d.ts +8 -12
- package/dist/xy.js +6993 -0
- package/dist/xy.js.map +1 -0
- package/dist/xy.min.js +1 -0
- package/dist/xy.module.js +6957 -0
- package/dist/xy.module.js.map +1 -0
- package/dist/xy.module.min.js +1 -0
- package/package.json +123 -67
- package/dist/AnnotationLayer/helpers.d.ts +0 -6
- package/dist/AnnotationLayer/index.d.ts +0 -2
- package/dist/FacetController.d.ts +0 -12
- package/dist/Frame.d.ts +0 -2
- package/dist/InteractionLayer.d.ts +0 -3
- package/dist/Mark/Mark.d.ts +0 -3
- package/dist/Mark/Mark.types.d.ts +0 -10
- package/dist/Mark/constants/markTransition.d.ts +0 -10
- package/dist/Mark/markBehavior/drawing.d.ts +0 -13
- package/dist/MiniMap.d.ts +0 -14
- package/dist/MinimapXYFrame.d.ts +0 -10
- package/dist/NetworkFrame.d.ts +0 -4
- package/dist/OrdinalFrame.d.ts +0 -4
- package/dist/ResponsiveFrame.d.ts +0 -22
- package/dist/ResponsiveMinimapXYFrame.d.ts +0 -6
- package/dist/ResponsiveNetworkFrame.d.ts +0 -6
- package/dist/ResponsiveOrdinalFrame.d.ts +0 -6
- package/dist/ResponsiveXYFrame.d.ts +0 -6
- package/dist/SpanOrDiv.d.ts +0 -10
- package/dist/SparkFrame.d.ts +0 -14
- package/dist/SparkNetworkFrame.d.ts +0 -5
- package/dist/SparkOrdinalFrame.d.ts +0 -5
- package/dist/SparkXYFrame.d.ts +0 -5
- package/dist/VisualizationLayer.d.ts +0 -33
- package/dist/XYFrame.d.ts +0 -4
- package/dist/annotationRules/orframeRules.d.ts +0 -105
- package/dist/components/Annotation.d.ts +0 -3
- package/dist/components/AnnotationLayer/AnnotationLayer.d.ts +0 -26
- package/dist/components/Axis/Axis.d.ts +0 -7
- package/dist/components/Axis/axisTitle.d.ts +0 -10
- package/dist/components/Axis/index.d.ts +0 -2
- package/dist/components/Axis/summaryGraphic.d.ts +0 -17
- package/dist/components/Brush.d.ts +0 -12
- package/dist/components/DividedLine.d.ts +0 -16
- package/dist/components/FacetController.d.ts +0 -12
- package/dist/components/Frame.d.ts +0 -2
- package/dist/components/InteractionLayer.d.ts +0 -3
- package/dist/components/Legend.d.ts +0 -3
- package/dist/components/Mark/Mark.d.ts +0 -3
- package/dist/components/Mark/Mark.types.d.ts +0 -10
- package/dist/components/Mark/markBehavior/drawing.d.ts +0 -13
- package/dist/components/MiniMap.d.ts +0 -14
- package/dist/components/MinimapXYFrame.d.ts +0 -10
- package/dist/components/NetworkFrame.d.ts +0 -4
- package/dist/components/OrdinalFrame.d.ts +0 -4
- package/dist/components/ResponsiveFrame.d.ts +0 -22
- package/dist/components/ResponsiveMinimapXYFrame.d.ts +0 -6
- package/dist/components/ResponsiveNetworkFrame.d.ts +0 -6
- package/dist/components/ResponsiveOrdinalFrame.d.ts +0 -6
- package/dist/components/ResponsiveXYFrame.d.ts +0 -6
- package/dist/components/SpanOrDiv.d.ts +0 -10
- package/dist/components/SparkFrame.d.ts +0 -14
- package/dist/components/SparkNetworkFrame.d.ts +0 -5
- package/dist/components/SparkOrdinalFrame.d.ts +0 -5
- package/dist/components/SparkXYFrame.d.ts +0 -5
- package/dist/components/TooltipPositioner/index.d.ts +0 -7
- package/dist/components/VisualizationLayer.d.ts +0 -33
- package/dist/components/XYFrame.d.ts +0 -4
- package/dist/components/annotationLayerBehavior/annotationHandling.d.ts +0 -19
- package/dist/components/annotationLayerBehavior/d3labeler.d.ts +0 -9
- package/dist/components/annotationRules/baseRules.d.ts +0 -25
- package/dist/components/annotationRules/networkframeRules.d.ts +0 -48
- package/dist/components/annotationRules/orframeRules.d.ts +0 -105
- package/dist/components/annotationRules/xyframeRules.d.ts +0 -117
- package/dist/components/batchWork.d.ts +0 -6
- package/dist/components/constants/coordinateNames.d.ts +0 -8
- package/dist/components/constants/frame_props.d.ts +0 -4
- package/dist/components/constants/jsx.d.ts +0 -19
- package/dist/components/data/dataFunctions.d.ts +0 -46
- package/dist/components/data/multiAccessorUtils.d.ts +0 -1
- package/dist/components/data/unflowedFunctions.d.ts +0 -1
- package/dist/components/generic_utilities/functions.d.ts +0 -1
- package/dist/components/index.d.ts +0 -125
- package/dist/components/interactionLayerBehavior/InteractionCanvas.d.ts +0 -20
- package/dist/components/processing/InteractionItems.d.ts +0 -12
- package/dist/components/processing/network.d.ts +0 -114
- package/dist/components/processing/ordinal.d.ts +0 -102
- package/dist/components/processing/xyDrawing.d.ts +0 -135
- package/dist/components/semiotic.d.ts +0 -35
- package/dist/components/store/TooltipStore.d.ts +0 -2
- package/dist/components/store/createStore.d.ts +0 -1
- package/dist/components/svg/SvgHelper.d.ts +0 -37
- package/dist/components/svg/areaDrawing.d.ts +0 -31
- package/dist/components/svg/ckmeans.d.ts +0 -69
- package/dist/components/svg/frameFunctions.d.ts +0 -119
- package/dist/components/svg/lineDrawing.d.ts +0 -99
- package/dist/components/svg/networkDrawing.d.ts +0 -134
- package/dist/components/svg/pieceDrawing.d.ts +0 -13
- package/dist/components/svg/pieceLayouts.d.ts +0 -71
- package/dist/components/svg/summaryLayouts.d.ts +0 -74
- package/dist/components/types/annotationTypes.d.ts +0 -140
- package/dist/components/types/canvasTypes.d.ts +0 -9
- package/dist/components/types/generalTypes.d.ts +0 -236
- package/dist/components/types/interactionTypes.d.ts +0 -74
- package/dist/components/types/legendTypes.d.ts +0 -20
- package/dist/components/types/networkTypes.d.ts +0 -165
- package/dist/components/types/ordinalTypes.d.ts +0 -103
- package/dist/components/types/xyTypes.d.ts +0 -118
- package/dist/components/useBoundingRect.d.ts +0 -2
- package/dist/components/useDerivedStateFromProps.d.ts +0 -1
- package/dist/components/useLegacyUnmountCallback.d.ts +0 -1
- package/dist/components/visualizationLayerBehavior/axis.d.ts +0 -38
- package/dist/components/visualizationLayerBehavior/general.d.ts +0 -84
- package/dist/constants/jsx.d.ts +0 -19
- package/dist/interactionLayerBehavior/InteractionCanvas.d.ts +0 -20
- package/dist/processing/network.d.ts +0 -114
- package/dist/processing/ordinal.d.ts +0 -102
- package/dist/processing/xyDrawing.d.ts +0 -135
- package/dist/setupTests.d.ts +0 -1
- package/dist/svg/SvgHelper.d.ts +0 -37
- package/dist/svg/ckmeans.d.ts +0 -69
- package/dist/svg/frameFunctions.d.ts +0 -119
- package/dist/svg/networkDrawing.d.ts +0 -134
- package/dist/svg/pieceDrawing.d.ts +0 -13
- package/dist/svg/pieceLayouts.d.ts +0 -71
- package/dist/svg/summaryLayouts.d.ts +0 -74
- package/dist/useDerivedStateFromProps.d.ts +0 -1
- package/dist/useLegacyUnmountCallback.d.ts +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as t from"react";import e,{useMemo as n,forwardRef as o,useRef as r,useState as i,useCallback as s,useEffect as a,useImperativeHandle as l,createContext as c,useContext as h,useLayoutEffect as u}from"react";import{brushX as d,brushY as f,brush as p}from"d3-brush";import{select as y}from"d3-selection";import{scaleLinear as m,scaleOrdinal as g}from"d3-scale";import{bin as x,sum as b}from"d3-array";import{schemeCategory10 as v,interpolatePlasma as k,interpolateViridis as E,interpolatePurples as w,interpolateOranges as M,interpolateGreens as A,interpolateReds as S,interpolateBlues as $,schemeSet3 as P,schemeTableau10 as N}from"d3-scale-chromatic";import _ from"labella";import{line as O,curveLinear as D,curveCardinal as j}from"d3-shape";import T from"regression";import{contourDensity as z}from"d3-contour";import{hexbin as C}from"d3-hexbin";const B=5e3;class W{constructor(t){this.lastBoundedData=null,this.chunkTimer=0,this.callback=t}setBoundedData(t){if(t===this.lastBoundedData)return;if(this.lastBoundedData=t,this.chunkTimer&&(cancelAnimationFrame(this.chunkTimer),this.chunkTimer=0),5e3>=t.length)return void this.callback({inserts:t,bounded:!0});this.callback({inserts:t.slice(0,B),bounded:!0,totalSize:t.length});let e=B;const n=()=>{if(e>=t.length)return;if(t!==this.lastBoundedData)return;const o=Math.min(e+B,t.length);this.callback({inserts:t.slice(e,o),bounded:!1}),e=o,this.chunkTimer=t.length>e?requestAnimationFrame(n):0};this.chunkTimer=requestAnimationFrame(n)}push(t){this.callback({inserts:[t],bounded:!1})}pushMany(t){0!==t.length&&this.callback({inserts:t,bounded:!1})}clear(){this.chunkTimer&&(cancelAnimationFrame(this.chunkTimer),this.chunkTimer=0),this.lastBoundedData=null}}class F{constructor(t){if(this._capacity=t,this.head=0,this._size=0,1>t)throw Error("RingBuffer capacity must be at least 1");this.buffer=Array(t)}push(t){let e;return this._size===this._capacity?e=this.buffer[this.head]:this._size++,this.buffer[this.head]=t,this.head=(this.head+1)%this._capacity,e}pushMany(t){const e=[];for(const n of t){const t=this.push(n);void 0!==t&&e.push(t)}return e}get(t){if(t>=0&&this._size>t)return this.buffer[(this.head-this._size+t+this._capacity)%this._capacity]}peek(){if(0!==this._size)return this.buffer[(this.head-1+this._capacity)%this._capacity]}peekOldest(){if(0!==this._size)return this.buffer[(this.head-this._size+this._capacity)%this._capacity]}[Symbol.iterator](){let t=0;const e=this;return{next:()=>e._size>t?{done:!1,value:e.get(t++)}:{done:!0,value:void 0}}}toArray(){const t=[];for(const e of this)t.push(e);return t}resize(t){if(1>t)throw Error("RingBuffer capacity must be at least 1");const e=this.toArray(),n=[];for(;e.length>t;)n.push(e.shift());this._capacity=t,this.buffer=Array(t),this.head=0,this._size=0;for(const t of e)this.push(t);return n}clear(){this.buffer=Array(this._capacity),this.head=0,this._size=0}get size(){return this._size}get capacity(){return this._capacity}get full(){return this._size===this._capacity}}class L{constructor(){this._min=1/0,this._max=-1/0,this._dirty=!1}push(t){Number.isNaN(t)||(this._min>t&&(this._min=t),t>this._max&&(this._max=t))}evict(t){t!==this._min&&t!==this._max||(this._dirty=!0)}recalculate(t,e){this._min=1/0,this._max=-1/0;for(const n of t){const t=e?e(n):n;Number.isNaN(t)||(this._min>t&&(this._min=t),t>this._max&&(this._max=t))}this._dirty=!1}clear(){this._min=1/0,this._max=-1/0,this._dirty=!1}get extent(){return[this._min,this._max]}get min(){return this._min}get max(){return this._max}get dirty(){return this._dirty}}function Y(t,e,n,o,r){const i=new Map;for(const s of t){const t=e(s),a=n(s);if(null==t||null==a||Number.isNaN(t)||Number.isNaN(a))continue;const l=Math.floor(t/o)*o;let c=i.get(l);if(c||(c={start:l,end:l+o,total:0,categories:new Map},i.set(l,c)),c.total+=a,r){const t=r(s);c.categories.set(t,(c.categories.get(t)||0)+a)}}return i}function I(t,e,n,o,r,i){const s=[],a=[];for(const r of t){const t=n(r),i=o(r);null==t||null==i||Number.isNaN(t)||Number.isNaN(i)||(s.push([e.x(t),e.y(i)]),a.push(i))}return{type:"line",path:s,rawValues:a,style:r,datum:t,group:i}}function X(t,e,n,o,r,i,s){const a=[],l=[];for(const i of t){const t=n(i),s=o(i);if(null==t||null==s||Number.isNaN(t)||Number.isNaN(s))continue;const c=e.x(t);a.push([c,e.y(s)]),l.push([c,e.y(r)])}return{type:"area",topPath:a,bottomPath:l,style:i,datum:t,group:s}}function R(t,e,n,o,r,i){const s=n(t),a=o(t);return null==s||null==a||Number.isNaN(s)||Number.isNaN(a)?null:{type:"point",x:e.x(s),y:e.y(a),r:r,style:i,datum:t}}function H(t,e,n,o,r,i,s){return{type:"rect",x:t,y:e,w:n,h:o,style:r,datum:i,group:s}}function V(t,e,n,o,r,i){return{type:"heatcell",x:t,y:e,w:n,h:o,fill:r,datum:i}}function G(t,e){if("function"==typeof t)return e=>+t(e);const n=t||e;return t=>+t[n]}function q(t,e){return"function"==typeof t?t:t?e=>e[t]+"":void 0}class J{constructor(t){this.xExtent=new L,this.yExtent=new L,this.timestampBuffer=null,this.activeTransition=null,this.prevPositionMap=new Map,this.lastIngestTime=0,this.scales=null,this.scene=[],this.version=0,this.config=t,this.buffer=new F(t.windowSize),this.growingCap=t.windowSize,["bar","swarm","waterfall"].includes(t.chartType)||"streaming"===t.runtimeMode?(this.getX=G(t.timeAccessor||t.xAccessor,"time"),this.getY=G(t.valueAccessor||t.yAccessor,"value")):(this.getX=G(t.xAccessor,"x"),this.getY=G(t.yAccessor,"y")),this.getGroup=q(t.groupAccessor),this.getCategory=q(t.categoryAccessor),this.getSize=t.sizeAccessor?G(t.sizeAccessor,"size"):void 0,this.getColor=q(t.colorAccessor),this.getBounds=t.boundsAccessor?G(t.boundsAccessor,"bounds"):void 0,"candlestick"===t.chartType&&(this.getOpen=G(t.openAccessor,"open"),this.getHigh=G(t.highAccessor,"high"),this.getLow=G(t.lowAccessor,"low"),this.getClose=G(t.closeAccessor,"close")),t.pulse&&(this.timestampBuffer=new F(t.windowSize))}ingest(t){const e="undefined"!=typeof performance?performance.now():Date.now();if(this.lastIngestTime=e,t.bounded){this.buffer.clear(),this.xExtent.clear(),this.yExtent.clear(),this.timestampBuffer&&this.timestampBuffer.clear();const n=t.totalSize||t.inserts.length;n>this.buffer.capacity&&(this.buffer.resize(n),this.timestampBuffer&&n>this.timestampBuffer.capacity&&this.timestampBuffer.resize(n));for(const n of t.inserts)this.buffer.push(n),this.timestampBuffer&&this.timestampBuffer.push(e),this.xExtent.push(this.getX(n)),"candlestick"===this.config.chartType&&this.getHigh&&this.getLow?(this.yExtent.push(this.getHigh(n)),this.yExtent.push(this.getLow(n))):this.yExtent.push(this.getY(n))}else for(const n of t.inserts){"growing"===this.config.windowMode&&this.buffer.full&&(this.growingCap*=2,this.buffer.resize(this.growingCap),this.timestampBuffer&&this.timestampBuffer.resize(this.growingCap));const t=this.buffer.push(n);this.timestampBuffer&&this.timestampBuffer.push(e),this.xExtent.push(this.getX(n)),"candlestick"===this.config.chartType&&this.getHigh&&this.getLow?(this.yExtent.push(this.getHigh(n)),this.yExtent.push(this.getLow(n))):this.yExtent.push(this.getY(n)),null!=t&&(this.xExtent.evict(this.getX(t)),"candlestick"===this.config.chartType&&this.getHigh&&this.getLow?(this.yExtent.evict(this.getHigh(t)),this.yExtent.evict(this.getLow(t))):this.yExtent.evict(this.getY(t)))}return!0}computeScene(t){var e,n,o,r,i,s;const{config:a,buffer:l}=this;if(this.xExtent.dirty&&this.xExtent.recalculate(l,this.getX),this.yExtent.dirty)if("candlestick"===a.chartType&&this.getHigh&&this.getLow){this.yExtent.clear();for(const t of l)this.yExtent.push(this.getHigh(t)),this.yExtent.push(this.getLow(t))}else this.yExtent.recalculate(l,this.getY);const c=this.xExtent.extent,h=this.yExtent.extent;let u=a.xExtent?[null!==(e=a.xExtent[0])&&void 0!==e?e:c[0],null!==(n=a.xExtent[1])&&void 0!==n?n:c[1]]:c,d=a.yExtent?[null!==(o=a.yExtent[0])&&void 0!==o?o:h[0],null!==(r=a.yExtent[1])&&void 0!==r?r:h[1]]:h;const f=a.yExtent&&null!=a.yExtent[0]&&null!=a.yExtent[1];if("stackedarea"===a.chartType&&!f&&l.size>0)if(a.normalize)d=[0,1+a.extentPadding];else{const t=l.toArray(),e=this.groupData(t),n=new Map;for(const t of e)for(const e of t.data){const t=this.getX(e),o=this.getY(e);null==t||null==o||Number.isNaN(t)||Number.isNaN(o)||n.set(t,(n.get(t)||0)+o)}let o=0;for(const t of n.values())t>o&&(o=t);d=[0,o+(o>0?o*a.extentPadding:1)]}else if("bar"===a.chartType&&a.binSize&&!f&&l.size>0){const[,t]=function(t,e,n,o,r){const i=Y(t,e,n,o,r);if(0===i.size)return[0,0];let s=0;for(const t of i.values())t.total>s&&(s=t.total);return[0,s]}(l,this.getX,this.getY,a.binSize,this.getCategory);d=[0,t+t*a.extentPadding]}else if("waterfall"===a.chartType&&!f&&l.size>0){const[t,e]=function(t,e){let n=0,o=0,r=0;for(const i of t){const t=e(i);null==t||Number.isNaN(t)||(r+=t,n>r&&(n=r),r>o&&(o=r))}return[n,o]}(l,this.getY),n=e-t,o=n>0?n*a.extentPadding:1;d=[Math.min(0,t-Math.abs(o)),Math.max(0,e+Math.abs(o))]}else if(!f&&d[0]!==1/0){if(this.getBounds){const t=l.toArray();for(const e of t){const t=this.getY(e),n=this.getBounds(e);null!=t&&!Number.isNaN(t)&&n&&(t+n>d[1]&&(d[1]=t+n),d[0]>t-n&&(d[0]=t-n))}}const t=d[1]-d[0],e=t>0?t*a.extentPadding:1,n=null===(i=a.yExtent)||void 0===i?void 0:i[0],o=null===(s=a.yExtent)||void 0===s?void 0:s[1];d=[null!=n?d[0]:d[0]-e,null!=o?d[1]:d[1]+e]}if(u[0]!==1/0&&u[1]!==-1/0||(u=[0,1]),d[0]!==1/0&&d[1]!==-1/0||(d=[0,1]),void 0!==a.arrowOfTime)if("x"==("up"===(p=a.arrowOfTime)||"down"===p?"y":"x")){const e="right"===a.arrowOfTime?[0,t.width]:[t.width,0];this.scales={x:m().domain(u).range(e),y:m().domain(d).range([t.height,0])}}else{const e="down"===a.arrowOfTime?[0,t.height]:[t.height,0];this.scales={x:m().domain(d).range([0,t.width]),y:m().domain(u).range(e)}}else this.scales={x:m().domain(u).range([0,t.width]),y:m().domain(d).range([t.height,0])};var p;this.config.transition&&this.scene.length>0&&this.snapshotPositions();const y=l.toArray();this.scene=this.buildSceneNodes(t),this.config.decay&&this.applyDecay(this.scene,y),this.config.pulse&&this.applyPulse(this.scene,y),this.config.transition&&this.prevPositionMap.size>0&&this.startTransition(),this.version++}buildSceneNodes(t){const{config:e,buffer:n,scales:o}=this;if(!o||0===n.size)return[];const r=n.toArray();switch(e.chartType){case"line":return this.buildLineScene(r);case"area":return this.buildAreaScene(r);case"stackedarea":return this.buildStackedAreaScene(r);case"scatter":case"bubble":return this.buildPointScene(r);case"heatmap":return this.buildHeatmapScene(r,t);case"bar":return this.buildBarScene(r);case"swarm":return this.buildSwarmScene(r);case"waterfall":return this.buildWaterfallScene(r,t);case"candlestick":return this.buildCandlestickScene(r,t);default:return[]}}buildLineScene(t){var e;const n=this.groupData(t),o=[],r=null===(e=this.config.annotations)||void 0===e?void 0:e.filter(t=>"threshold"===t.type&&t.color).map(t=>({value:t.value,color:t.color,thresholdType:t.thresholdType||"greater"}));if(this.getBounds)for(const t of n){const e=this.buildBoundsForGroup(t.data,t.key);e&&o.push(e)}for(const t of n){const e=this.resolveLineStyle(t.key,t.data[0]),n=I(t.data,this.scales,this.getX,this.getY,e,t.key);r&&r.length>0&&(n.colorThresholds=r),o.push(n)}return o}buildAreaScene(t){const e=this.groupData(t),n=[],o=this.scales.y.domain()[0];for(const t of e){const e=this.resolveAreaStyle(t.key,t.data[0]);n.push(X(t.data,this.scales,this.getX,this.getY,o,e,t.key))}return n}buildStackedAreaScene(t){return function(t,e,n,o,r,i){var s;const a=new Set;for(const e of t)for(const t of e.data){const e=n(t);null==e||Number.isNaN(e)||a.add(e)}const l=Array.from(a).sort((t,e)=>t-e),c=new Map;for(const e of t){const t=new Map;for(const r of e.data){const e=n(r),i=o(r);null==e||null==i||Number.isNaN(e)||Number.isNaN(i)||t.set(e,(t.get(e)||0)+i)}c.set(e.key,t)}let h;if(i){h=new Map;for(const e of l){let n=0;for(const o of t)n+=(null===(s=c.get(o.key))||void 0===s?void 0:s.get(e))||0;h.set(e,n||1)}}const u=[],d=new Map;for(const t of l)d.set(t,0);for(const n of t){const t=c.get(n.key),o=[],s=[];for(const n of l){let r=t.get(n)||0;const a=d.get(n);i&&(r/=h.get(n));const l=e.x(n);s.push([l,e.y(a)]),o.push([l,e.y(a+r)]),d.set(n,a+r)}u.push({type:"area",topPath:o,bottomPath:s,style:r(n.key,n.data[0]),datum:n.data,group:n.key})}return u}(this.groupData(t),this.scales,this.getX,this.getY,(t,e)=>this.resolveAreaStyle(t,e),this.config.normalize)}buildPointScene(t){const e=[],n="bubble"===this.config.chartType?10:5,o=this.config.sizeRange||[3,15];let r=null;if(this.getSize&&!this.config.pointStyle){const e=t.map(t=>this.getSize(t)).filter(t=>null!=t&&!Number.isNaN(t));if(e.length>0){const t=Math.min(...e),n=Math.max(...e);r=e=>t===n?(o[0]+o[1])/2:o[0]+(e-t)/(n-t)*(o[1]-o[0])}}let i=null;if(this.getColor&&!this.config.pointStyle){const e=new Set;for(const n of t){const t=this.getColor(n);t&&e.add(t)}const n=Array.isArray(this.config.colorScheme)?this.config.colorScheme:["#4e79a7","#f28e2b","#e15759","#76b7b2","#59a14f","#edc948","#b07aa1","#ff9da7","#9c755f","#bab0ac"];i=new Map;let o=0;for(const t of e)i.set(t,n[o%n.length]),o++}for(const o of t){let t=this.config.pointStyle?this.config.pointStyle(o):{fill:"#4e79a7",opacity:.8},s=t.r||n;if(r&&this.getSize){const t=this.getSize(o);null==t||Number.isNaN(t)||(s=r(t))}if(i&&this.getColor){const e=this.getColor(o);e&&i.has(e)&&(t=Object.assign(Object.assign({},t),{fill:i.get(e)}))}const a=R(o,this.scales,this.getX,this.getY,s,t);a&&e.push(a)}return e}buildHeatmapScene(t,e){const n=[];if(this.config.heatmapAggregation)return this.buildStreamingHeatmapScene(t,e);const o=G(this.config.valueAccessor,"value"),r=new Set,i=new Set;for(const e of t)r.add(this.getX(e)),i.add(this.getY(e));const s=Array.from(r).sort((t,e)=>t-e),a=Array.from(i).sort((t,e)=>t-e);if(0===s.length||0===a.length)return n;const l=e.width/s.length,c=e.height/a.length,h=new Map;for(const e of t){const t=`${this.getX(e)}_${this.getY(e)}`;h.set(t,{val:o(e),datum:e})}let u=1/0,d=-1/0;for(const{val:t}of h.values())u>t&&(u=t),t>d&&(d=t);const f=d-u||1;for(let t=0;s.length>t;t++)for(let e=0;a.length>e;e++){const o=h.get(`${s[t]}_${a[e]}`);if(!o)continue;const r=(o.val-u)/f;n.push(V(t*l,(a.length-1-e)*c,l,c,`rgb(${Math.round(220-180*r)},${Math.round(220-100*r)},${Math.round(255-50*r)})`,o.datum))}return n}buildStreamingHeatmapScene(t,e){var n,o,r;const i=[],s=null!==(n=this.config.heatmapXBins)&&void 0!==n?n:20,a=null!==(o=this.config.heatmapYBins)&&void 0!==o?o:20,l=null!==(r=this.config.heatmapAggregation)&&void 0!==r?r:"count",c=G(this.config.valueAccessor,"value");if(!this.scales||0===t.length)return i;const[h,u]=this.scales.x.domain(),[d,f]=this.scales.y.domain(),p=(u-h||1)/s,y=(f-d||1)/a,m=new Map;for(const e of t){const t=this.getX(e),n=this.getY(e),o=Math.min(Math.floor((t-h)/p),s-1),r=Math.min(Math.floor((n-d)/y),a-1);if(0>o||0>r)continue;const i=`${o}_${r}`;let l=m.get(i);l||(l={sum:0,count:0,data:[]},m.set(i,l)),l.count++,l.sum+=c(e),l.data.push(e)}let g=1/0,x=-1/0;const b=new Map;for(const[t,e]of m){let n;switch(l){case"sum":n=e.sum;break;case"mean":n=e.count>0?e.sum/e.count:0;break;default:n=e.count}b.set(t,n),g>n&&(g=n),n>x&&(x=n)}const v=x-g||1,k=e.width/s,E=e.height/a;for(const[t,e]of b){const[n,o]=t.split("_"),r=+n,s=+o,l=(e-g)/v,c=`rgb(${Math.round(220-180*l)},${Math.round(220-100*l)},${Math.round(255-50*l)})`,h=m.get(t);i.push(V(r*k,(a-1-s)*E,k,E,c,{xi:r,yi:s,value:e,count:h.count,sum:h.sum,data:h.data}))}return i}buildBarScene(t){var e;if(!this.config.binSize)return[];const n=Y(t,this.getX,this.getY,this.config.binSize,this.getCategory);if(0===n.size)return[];let o=null;if(this.getCategory){const t=new Set;for(const e of n.values())for(const n of e.categories.keys())t.add(n);const e=this.config.barColors?Object.keys(this.config.barColors):[],r=new Set(e),i=Array.from(t).filter(t=>!r.has(t)).sort();o=[...e.filter(e=>t.has(e)),...i]}const r=[],i=this.scales,[s,a]=i.x.domain();for(const t of n.values()){const n=Math.max(t.start,s),l=Math.min(t.end,a);if(n>=l)continue;const c=i.x(n),h=i.x(l),u=Math.min(c,h)+.5,d=Math.max(c,h)-.5-u;if(d>0)if(o&&t.categories.size>0){let n=0;for(const s of o){const o=t.categories.get(s)||0;if(0===o)continue;const a=i.y(n),l=i.y(n+o);r.push(H(u,Math.min(a,l),d,Math.abs(a-l),{fill:(null===(e=this.config.barColors)||void 0===e?void 0:e[s])||"#4e79a7"},{binStart:t.start,binEnd:t.end,total:t.total,category:s,categoryValue:o},s)),n+=o}}else{const e=i.y(0),n=i.y(t.total);r.push(H(u,Math.min(e,n),d,Math.abs(e-n),{fill:"#007bff"},{binStart:t.start,binEnd:t.end,total:t.total}))}}return r}buildSwarmScene(t){var e,n,o,r;const i=[],s=this.config.swarmStyle||{},a=null!==(e=s.radius)&&void 0!==e?e:3,l=null!==(n=s.fill)&&void 0!==n?n:"#007bff",c=null!==(o=s.opacity)&&void 0!==o?o:.7,h=s.stroke,u=s.strokeWidth;for(const e of t){const t=this.getX(e),n=this.getY(e);if(null==n||Number.isNaN(n))continue;const o=this.scales.x(t),s=this.scales.y(n);let d=l;if(this.getCategory){const t=this.getCategory(e);d=(null===(r=this.config.barColors)||void 0===r?void 0:r[t])||d}i.push({type:"point",x:o,y:s,r:a,style:{fill:d,opacity:c,stroke:h,strokeWidth:u},datum:e})}return i}buildWaterfallScene(t,e){const n=[],o=this.scales,r=t.filter(t=>{const e=this.getY(t);return null!=e&&!Number.isNaN(e)});if(0===r.length)return n;let i=0;for(let t=0;r.length>t;t++){const s=r[t],a=this.getX(s),l=this.getY(s),c=i+l;let h;h=r.length-1>t?this.getX(r[t+1])-a:t>0?a-this.getX(r[t-1]):0;const u=o.x(a),d=0!==h?o.x(a+h):u+e.width/10,f=Math.min(u,d)+.5,p=Math.max(u,d)-.5-f;if(0>=p){i=c;continue}const y=o.y(i),m=o.y(c);n.push(H(f,Math.min(y,m),p,Math.abs(y-m),{fill:0>l?"#dc3545":"#28a745"},Object.assign(Object.assign({},s),{baseline:i,cumEnd:c,delta:l}))),i=c}return n}buildCandlestickScene(t,e){if(!(this.getOpen&&this.getHigh&&this.getLow&&this.getClose&&this.scales))return[];const n=[],o=this.config.candlestickStyle||{},r=o.upColor||"#28a745",i=o.downColor||"#dc3545",s=o.wickColor||"#333",a=o.wickWidth||1,l=t.map(t=>this.getX(t)).filter(t=>null!=t&&!Number.isNaN(t)).sort((t,e)=>t-e);let c=o.bodyWidth||6;if(!o.bodyWidth&&l.length>1){let t=1/0;for(let e=1;l.length>e;e++){const n=Math.abs(this.scales.x(l[e])-this.scales.x(l[e-1]));n>0&&t>n&&(t=n)}t!==1/0&&(c=Math.max(2,Math.min(.6*t,20)))}for(const e of t){const t=this.getX(e);if(null==t||Number.isNaN(t))continue;const o=this.getOpen(e),l=this.getHigh(e),h=this.getLow(e),u=this.getClose(e);if([o,l,h,u].some(t=>null==t||Number.isNaN(t)))continue;const d=u>=o;n.push({type:"candlestick",x:this.scales.x(t),openY:this.scales.y(o),closeY:this.scales.y(u),highY:this.scales.y(l),lowY:this.scales.y(h),bodyWidth:c,upColor:r,downColor:i,wickColor:s,wickWidth:a,isUp:d,datum:e})}return n}buildBoundsForGroup(t,e){if(!this.getBounds||!this.scales)return null;const n=[],o=[];for(const e of t){const t=this.getX(e),r=this.getY(e);if(null==t||null==r||Number.isNaN(t)||Number.isNaN(r))continue;const i=this.getBounds(e),s=this.scales.x(t);if(i&&0!==i)n.push([s,this.scales.y(r+i)]),o.push([s,this.scales.y(r-i)]);else{const t=this.scales.y(r);n.push([s,t]),o.push([s,t])}}return 2>n.length?null:{type:"area",topPath:n,bottomPath:o,style:this.resolveBoundsStyle(e,t[0]),datum:t,group:e,interactive:!1}}resolveBoundsStyle(t,e){const n=this.config.boundsStyle;return"function"==typeof n?n(e||{},t):n&&"object"==typeof n?n:{fill:this.resolveLineStyle(t,e).stroke||"#4e79a7",fillOpacity:.2,stroke:"none"}}computeDecayOpacity(t,e){var n,o,r;const i=this.config.decay;if(!i||1>=e)return 1;const s=null!==(n=i.minOpacity)&&void 0!==n?n:.1,a=e-1-t;switch(i.type){case"linear":return s+(1-a/(e-1))*(1-s);case"exponential":{const t=null!==(o=i.halfLife)&&void 0!==o?o:e/2;return s+Math.pow(.5,a/t)*(1-s)}case"step":return(null!==(r=i.stepThreshold)&&void 0!==r?r:.5*e)>a?1:s;default:return 1}}applyDecay(t,e){var n,o;if(!this.config.decay)return;const r=e.length;if(1>=r)return;const i=new Map;for(let t=0;e.length>t;t++)i.set(e[t],t);for(const e of t){if("line"===e.type||"area"===e.type)continue;const t=i.get(e.datum);if(null==t)continue;const s=this.computeDecayOpacity(t,r);if("heatcell"===e.type)e.style={opacity:s};else if("candlestick"===e.type)e._decayOpacity=s;else{const t=null!==(o=null===(n=e.style)||void 0===n?void 0:n.opacity)&&void 0!==o?o:1;e.style=Object.assign(Object.assign({},e.style),{opacity:t*s})}}}computePulseIntensity(t,e){var n;const o=this.config.pulse;if(!o)return 0;const r=null!==(n=o.duration)&&void 0!==n?n:500,i=e-t;return r>i?1-i/r:0}applyPulse(t,e){var n;if(!this.config.pulse||!this.timestampBuffer)return;const o="undefined"!=typeof performance?performance.now():Date.now(),r=null!==(n=this.config.pulse.color)&&void 0!==n?n:"rgba(255,255,255,0.6)",i=new Map;for(let t=0;e.length>t;t++)i.set(e[t],t);for(const e of t){if("line"===e.type||"area"===e.type)continue;const t=i.get(e.datum);if(null==t)continue;const n=this.timestampBuffer.get(t);if(null==n)continue;const s=this.computePulseIntensity(n,o);s>0&&(e._pulseIntensity=s,e._pulseColor=r)}}get hasActivePulses(){var t;if(!this.config.pulse||!this.timestampBuffer||0===this.timestampBuffer.size)return!1;const e="undefined"!=typeof performance?performance.now():Date.now(),n=null!==(t=this.config.pulse.duration)&&void 0!==t?t:500,o=this.timestampBuffer.peek();return null!=o&&n>e-o}snapshotPositions(){this.prevPositionMap.clear();for(let t=0;this.scene.length>t;t++){const e=this.scene[t],n=this.getNodeIdentity(e,t);n&&("point"===e.type?this.prevPositionMap.set(n,{x:e.x,y:e.y,r:e.r}):"rect"===e.type||"heatcell"===e.type?this.prevPositionMap.set(n,{x:e.x,y:e.y,w:e.w,h:e.h}):"candlestick"===e.type&&this.prevPositionMap.set(n,{x:e.x,y:e.openY}))}}getNodeIdentity(t,e){var n,o,r,i;switch(t.type){case"point":return`p:${void 0===t.datum?e:this.getX(t.datum)}_${this.getY(t.datum)}`;case"rect":return`r:${t.group||""}:${null!==(i=null!==(o=null===(n=t.datum)||void 0===n?void 0:n.binStart)&&void 0!==o?o:null===(r=t.datum)||void 0===r?void 0:r.category)&&void 0!==i?i:e}`;case"heatcell":return`h:${t.x}_${t.y}`;case"candlestick":return"c:"+this.getX(t.datum);default:return null}}startTransition(){var t,e,n,o,r,i;if(!this.config.transition||0===this.prevPositionMap.size)return;const s=null!==(t=this.config.transition.duration)&&void 0!==t?t:300;let a=!1;for(let t=0;this.scene.length>t;t++){const s=this.scene[t],l=this.getNodeIdentity(s,t);if(!l)continue;const c=this.prevPositionMap.get(l);if(c)if("point"===s.type){const t={x:s.x,y:s.y,r:s.r};c.x===t.x&&c.y===t.y||(s._targetX=t.x,s._targetY=t.y,s._targetR=t.r,s.x=c.x,s.y=c.y,s.r=null!==(e=c.r)&&void 0!==e?e:s.r,a=!0)}else if("rect"===s.type){const t={x:s.x,y:s.y,w:s.w,h:s.h};c.x===t.x&&c.y===t.y&&c.w===t.w&&c.h===t.h||(s._targetX=t.x,s._targetY=t.y,s._targetW=t.w,s._targetH=t.h,s.x=c.x,s.y=c.y,s.w=null!==(n=c.w)&&void 0!==n?n:s.w,s.h=null!==(o=c.h)&&void 0!==o?o:s.h,a=!0)}else if("heatcell"===s.type){const t={x:s.x,y:s.y,w:s.w,h:s.h};c.x===t.x&&c.y===t.y||(s._targetX=t.x,s._targetY=t.y,s._targetW=t.w,s._targetH=t.h,s.x=c.x,s.y=c.y,s.w=null!==(r=c.w)&&void 0!==r?r:s.w,s.h=null!==(i=c.h)&&void 0!==i?i:s.h,a=!0)}}a&&(this.activeTransition={startTime:"undefined"!=typeof performance?performance.now():Date.now(),duration:s})}advanceTransition(t){var e;if(!this.activeTransition)return!1;const n=Math.min((t-this.activeTransition.startTime)/this.activeTransition.duration,1),o="linear"===(null===(e=this.config.transition)||void 0===e?void 0:e.easing)?n:1-Math.pow(1-n,3);for(const t of this.scene)if("point"===t.type){if(void 0===t._targetX)continue;const e=this.getNodeIdentity(t,0);if(!e)continue;const n=this.prevPositionMap.get(e);if(!n)continue;t.x=n.x+(t._targetX-n.x)*o,t.y=n.y+(t._targetY-n.y)*o,void 0!==t._targetR&&void 0!==n.r&&(t.r=n.r+(t._targetR-n.r)*o)}else if("rect"===t.type){if(void 0===t._targetX)continue;const e=this.getNodeIdentity(t,0);if(!e)continue;const n=this.prevPositionMap.get(e);if(!n)continue;t.x=n.x+(t._targetX-n.x)*o,t.y=n.y+(t._targetY-n.y)*o,void 0!==n.w&&(t.w=n.w+(t._targetW-n.w)*o),void 0!==n.h&&(t.h=n.h+(t._targetH-n.h)*o)}else if("heatcell"===t.type){if(void 0===t._targetX)continue;const e=this.getNodeIdentity(t,0);if(!e)continue;const n=this.prevPositionMap.get(e);if(!n)continue;t.x=n.x+(t._targetX-n.x)*o,t.y=n.y+(t._targetY-n.y)*o,void 0!==n.w&&(t.w=n.w+(t._targetW-n.w)*o),void 0!==n.h&&(t.h=n.h+(t._targetH-n.h)*o)}if(n>=1){for(const t of this.scene)if("point"===t.type){if(void 0===t._targetX)continue;t.x=t._targetX,t.y=t._targetY,void 0!==t._targetR&&(t.r=t._targetR),t._targetX=void 0,t._targetY=void 0,t._targetR=void 0}else if("rect"===t.type){if(void 0===t._targetX)continue;t.x=t._targetX,t.y=t._targetY,t.w=t._targetW,t.h=t._targetH,t._targetX=void 0,t._targetY=void 0,t._targetW=void 0,t._targetH=void 0}else if("heatcell"===t.type){if(void 0===t._targetX)continue;t.x=t._targetX,t.y=t._targetY,t.w=t._targetW,t.h=t._targetH,t._targetX=void 0,t._targetY=void 0,t._targetW=void 0,t._targetH=void 0}return this.activeTransition=null,!1}return!0}groupData(t){if(!this.getGroup)return[{key:"_default",data:t}];const e=new Map;for(const n of t){const t=this.getGroup(n);e.has(t)||e.set(t,[]),e.get(t).push(n)}return Array.from(e.entries()).map(([t,e])=>({key:t,data:e}))}resolveLineStyle(t,e){const n=this.config.lineStyle;return"function"==typeof n?n(e||{},t):n&&"object"==typeof n?{stroke:n.stroke||"#007bff",strokeWidth:n.strokeWidth||2,strokeDasharray:n.strokeDasharray,fill:n.fill,fillOpacity:n.fillOpacity,opacity:n.opacity}:{stroke:"#007bff",strokeWidth:2}}resolveAreaStyle(t,e){var n;if(this.config.areaStyle)return this.config.areaStyle(e||{});const o=this.config.lineStyle;return"function"==typeof o?o(e||{},t):o&&"object"==typeof o?{fill:o.fill||o.stroke||"#4e79a7",fillOpacity:null!==(n=o.fillOpacity)&&void 0!==n?n:.7,stroke:o.stroke||"#4e79a7",strokeWidth:o.strokeWidth||2}:{fill:"#4e79a7",fillOpacity:.7,stroke:"#4e79a7",strokeWidth:2}}getData(){return this.buffer.toArray()}getExtents(){return this.xExtent.min===1/0?null:{x:this.xExtent.extent,y:this.yExtent.extent}}clear(){this.buffer.clear(),this.xExtent.clear(),this.yExtent.clear(),this.timestampBuffer&&this.timestampBuffer.clear(),this.prevPositionMap.clear(),this.activeTransition=null,this.lastIngestTime=0,this.scales=null,this.scene=[],this.version++}get size(){return this.buffer.size}getBuffer(){return this.buffer}getXAccessor(){return this.getX}getYAccessor(){return this.getY}getCategoryAccessor(){return this.getCategory}updateConfig(t){Object.assign(this.config,t)}}function K(t,e,n){const o=e-t.x,r=n-t.y,i=Math.sqrt(o*o+r*r);return i>t.r+5?null:{node:t,datum:t.datum,x:t.x,y:t.y,distance:i}}function Z(t,e,n){if(0===t.path.length)return null;const o=nt(t.path,e);if(0>o)return null;const[r,i]=t.path[o],s=e-r,a=n-i,l=Math.sqrt(s*s+a*a);return{node:t,datum:Array.isArray(t.datum)&&t.datum[o]?t.datum[o]:t.datum,x:r,y:i,distance:l}}function U(t,e,n){return t.x>e||e>t.x+t.w||t.y>n||n>t.y+t.h?null:{node:t,datum:t.datum,x:t.x+t.w/2,y:t.y+t.h/2,distance:0}}function Q(t,e,n){return t.x>e||e>t.x+t.w||t.y>n||n>t.y+t.h?null:{node:t,datum:t.datum,x:t.x+t.w/2,y:t.y+t.h/2,distance:0}}function tt(t,e,n){const o=t.bodyWidth/2,r=Math.min(t.openY,t.closeY);if(!(t.x-o-3>e||e>t.x+o+3||t.highY-3>n||n>t.lowY+3)){const o=r+Math.max(Math.max(t.openY,t.closeY)-r,1)/2,i=e-t.x,s=n-o;return{node:t,datum:t.datum,x:t.x,y:o,distance:Math.sqrt(i*i+s*s)}}return null}function et(t,e,n){if(0===t.topPath.length)return null;const o=nt(t.topPath,e);if(0>o)return null;const[r,i]=t.topPath[o],s=e-r,a=n-i;return{node:t,datum:t.datum,x:r,y:i,distance:Math.sqrt(s*s+a*a)}}function nt(t,e){if(0===t.length)return-1;let n=0,o=t.length-1;for(;o>n;){const r=n+o>>1;e>t[r][0]?n=r+1:o=r}return n>0&&Math.abs(t[n][0]-e)>=Math.abs(t[n-1][0]-e)?n-1:n}const ot={fill:e=>t.createElement("rect",{style:e,width:20,height:20}),line:e=>t.createElement("line",{style:e,x1:0,y1:0,x2:20,y2:20})};function rt(t,e,n,o){let r;return r="function"==typeof n?n(t):(0,ot[n])(o(t,e)),r}function it(e){const{legendGroups:n,customClickBehavior:o,title:r="Legend",width:i=100,height:s=20,orientation:a="vertical"}=e,l="vertical"===a?(({legendGroups:e,width:n,customClickBehavior:o})=>{let r=30;const i=[];return e.forEach((e,s)=>{r+=5,i.push(t.createElement("line",{key:"legend-top-line legend-symbol-"+s,stroke:"gray",x1:0,y1:r,x2:n,y2:r})),r+=10,e.label&&(r+=20,i.push(t.createElement("text",{key:"legend-text-"+s,y:r,className:"legend-group-label"},e.label)),r+=10),i.push(t.createElement("g",{key:"legend-group-"+s,className:"legend-item",transform:`translate(0,${r})`},((e,n)=>{const{type:o="fill",styleFn:r,items:i}=e,s=[];let a=0;return i.forEach((e,i)=>{const l=rt(e,i,o,r);s.push(t.createElement("g",{key:"legend-item-"+i,transform:`translate(0,${a})`,onClick:n?()=>n(e):void 0,style:{cursor:n?"pointer":"default"}},l,t.createElement("text",{y:15,x:30},e.label))),a+=25}),s})(e,o))),r+=25*e.items.length+10}),i})({legendGroups:n,width:i,customClickBehavior:o}):(({legendGroups:e,title:n,height:o,customClickBehavior:r})=>{let i=0;const s=[],a=!1===n?10:40;return e.forEach((n,l)=>{n.label&&(s.push(t.createElement("text",{key:"legend-text-"+l,transform:`translate(${i},${a}) rotate(90)`,textAnchor:"start",className:"legend-group-label"},n.label)),i+=20);const c=((e,n)=>{const{type:o="fill",styleFn:r,items:i}=e,s=[];let a=0;return i.forEach((e,i)=>{const l=rt(e,i,o,r);s.push(t.createElement("g",{key:"legend-item-"+i,transform:`translate(${a},0)`,onClick:n?()=>n(e):void 0,style:{cursor:n?"pointer":"default"}},l,t.createElement("text",{y:15,x:25},e.label))),a+=35,a+=8*e.label.length}),{items:s,offset:a}})(n,r);s.push(t.createElement("g",{key:"legend-group-"+l,className:"legend-item",transform:`translate(${i},${a})`},c.items)),i+=c.offset+5,e[l+1]&&s.push(t.createElement("line",{key:"legend-top-line legend-symbol-"+l,stroke:"gray",x1:i,y1:a-10,x2:i,y2:o+a+10})),i+=15}),t.createElement("g",null,!1!==n&&t.createElement("line",{x1:0,x2:i+10,y1:a-10,y2:a-10,stroke:"gray",className:"title-neatline"}),s)})({legendGroups:n,title:r,height:s,customClickBehavior:o});return t.createElement("g",null,void 0!==r&&t.createElement("text",{className:"legend-title",y:20,x:"horizontal"===a?0:i/2,textAnchor:"horizontal"===a?"start":"middle"},r),l)}function st(t){return"string"==typeof t?{type:t}:t}function at({orient:e,config:o,values:r,scale:i,size:s,length:a}){const l=function(t){var e,n,o,r,i;return{type:t.type,bins:null!==(e=t.bins)&&void 0!==e?e:20,fill:null!==(n=t.fill)&&void 0!==n?n:"#4e79a7",fillOpacity:null!==(o=t.fillOpacity)&&void 0!==o?o:.5,stroke:null!==(r=t.stroke)&&void 0!==r?r:"none",strokeWidth:null!==(i=t.strokeWidth)&&void 0!==i?i:1}}(o),c="top"===e||"bottom"===e,h=n(()=>{if(0===r.length)return null;const n=i.domain(),o=s-8;if("boxplot"===l.type){const n=function(t){const e=[...t].sort((t,e)=>t-e),n=e.length;if(0===n)return null;const o=e[Math.floor(.25*n)],r=e[Math.floor(.5*n)],i=e[Math.floor(.75*n)],s=i-o;return{q1:o,median:r,q3:i,whiskerLow:Math.max(e[0],o-1.5*s),whiskerHigh:Math.min(e[n-1],i+1.5*s)}}(r);if(!n)return null;const{q1:s,median:a,q3:h,whiskerLow:u,whiskerHigh:d}=n,f=Math.min(.5*o,20),p=(o-f)/2+4;if(c){const n=i(s),o=i(h),r=i(a),c=i(u),y=i(d),m="top"===e?-1:1,g=0;return t.createElement("g",{"data-testid":"marginal-boxplot-"+e},t.createElement("line",{x1:c,y1:g+m*(p+f/2),x2:y,y2:g+m*(p+f/2),stroke:l.fill,strokeWidth:l.strokeWidth}),t.createElement("line",{x1:c,y1:g+m*p,x2:c,y2:g+m*(p+f),stroke:l.fill,strokeWidth:l.strokeWidth}),t.createElement("line",{x1:y,y1:g+m*p,x2:y,y2:g+m*(p+f),stroke:l.fill,strokeWidth:l.strokeWidth}),t.createElement("rect",{x:Math.min(n,o),y:"top"===e?g-p-f:g+p,width:Math.abs(o-n),height:f,fill:l.fill,fillOpacity:l.fillOpacity,stroke:"none"===l.stroke?l.fill:l.stroke,strokeWidth:l.strokeWidth}),t.createElement("line",{x1:r,y1:"top"===e?g-p-f:g+p,x2:r,y2:"top"===e?g-p:g+p+f,stroke:l.fill,strokeWidth:2}))}{const n=i(s),o=i(h),r=i(a),c=i(u),y=i(d),m="left"===e?-1:1,g=0;return t.createElement("g",{"data-testid":"marginal-boxplot-"+e},t.createElement("line",{x1:g+m*(p+f/2),y1:c,x2:g+m*(p+f/2),y2:y,stroke:l.fill,strokeWidth:l.strokeWidth}),t.createElement("line",{x1:g+m*p,y1:c,x2:g+m*(p+f),y2:c,stroke:l.fill,strokeWidth:l.strokeWidth}),t.createElement("line",{x1:g+m*p,y1:y,x2:g+m*(p+f),y2:y,stroke:l.fill,strokeWidth:l.strokeWidth}),t.createElement("rect",{x:"left"===e?g-p-f:g+p,y:Math.min(n,o),width:f,height:Math.abs(o-n),fill:l.fill,fillOpacity:l.fillOpacity,stroke:"none"===l.stroke?l.fill:l.stroke,strokeWidth:l.strokeWidth}),t.createElement("line",{x1:"left"===e?g-p-f:g+p,y1:r,x2:"left"===e?g-p:g+p+f,y2:r,stroke:l.fill,strokeWidth:2}))}}const h=x().domain(n).thresholds(l.bins)(r);if(0===h.length)return null;const u=Math.max(...h.map(t=>t.length));if(0===u)return null;if("histogram"===l.type)return t.createElement("g",{"data-testid":"marginal-histogram-"+e},h.map((n,r)=>{if(null==n.x0||null==n.x1)return null;const s=n.length/u*o;if(c){const o=i(n.x0),a=i(n.x1)-i(n.x0);return t.createElement("rect",{key:r,x:o,y:"top"===e?-4-s:4,width:Math.max(a,.5),height:s,fill:l.fill,fillOpacity:l.fillOpacity,stroke:l.stroke,strokeWidth:l.strokeWidth})}{const o=i(n.x0),a=i(n.x1)-i(n.x0);return t.createElement("rect",{key:r,x:"left"===e?-4-s:4,y:Math.min(o,o+a),width:s,height:Math.abs(a),fill:l.fill,fillOpacity:l.fillOpacity,stroke:l.stroke,strokeWidth:l.strokeWidth})}}));if("violin"===l.type){const n=o/2+4,r=[];for(const t of h){if(null==t.x0||null==t.x1)continue;const s=t.length/u*(o/2),a=i((t.x0+t.x1)/2);r.push(c?`${a},${"top"===e?-(n-s):n-s}`:`${"left"===e?-(n-s):n-s},${a}`)}for(let t=h.length-1;t>=0;t--){const s=h[t];if(null==s.x0||null==s.x1)continue;const a=s.length/u*(o/2),l=i((s.x0+s.x1)/2);r.push(c?`${l},${"top"===e?-(n+a):n+a}`:`${"left"===e?-(n+a):n+a},${l}`)}return t.createElement("g",{"data-testid":"marginal-violin-"+e},t.createElement("polygon",{points:r.join(" "),fill:l.fill,fillOpacity:l.fillOpacity,stroke:"none"===l.stroke?l.fill:l.stroke,strokeWidth:l.strokeWidth}))}if("ridgeline"===l.type){const n=[];if(c){const t=0,r=null!=h[0].x0?i(h[0].x0):0;n.push(`M${r},${t}`);for(const t of h){if(null==t.x0||null==t.x1)continue;const r=t.length/u*o,s=i((t.x0+t.x1)/2);n.push(`L${s},${"top"===e?-r-4:r+4}`)}const s=null!=h[h.length-1].x1?i(h[h.length-1].x1):a;n.push(`L${s},${t}`),n.push("Z")}else{const t=0,r=null!=h[0].x0?i(h[0].x0):0;n.push(`M${t},${r}`);for(const t of h){if(null==t.x0||null==t.x1)continue;const r=t.length/u*o,s=i((t.x0+t.x1)/2);n.push(`L${"left"===e?-r-4:r+4},${s}`)}const s=null!=h[h.length-1].x1?i(h[h.length-1].x1):a;n.push(`L${t},${s}`),n.push("Z")}return t.createElement("g",{"data-testid":"marginal-ridgeline-"+e},t.createElement("path",{d:n.join(" "),fill:l.fill,fillOpacity:l.fillOpacity,stroke:"none"===l.stroke?l.fill:l.stroke,strokeWidth:l.strokeWidth}))}return null},[r,i,l,s,a,e,c,4]);return h?t.createElement("g",{className:"marginal-"+e,"data-testid":"marginal-"+e},h):null}function lt(t){return Math.round(100*t)/100+""}function ct(e){const{width:o,height:r,totalWidth:i,totalHeight:s,margin:a,scales:l,showAxes:c,xLabel:h,yLabel:u,xFormat:d,yFormat:f,showGrid:p,title:y,legend:m,foregroundGraphics:g,marginalGraphics:x,xValues:b,yValues:v,annotations:k,svgAnnotationRules:E,annotationFrame:w,children:M}=e,A=n(()=>c&&l?l.x.ticks(5).map(t=>({value:t,pixel:l.x(t),label:(d||lt)(t)})):[],[c,l,d]),S=n(()=>c&&l?l.y.ticks(5).map(t=>({value:t,pixel:l.y(t),label:(f||lt)(t)})):[],[c,l,f]),$=n(()=>k&&0!==k.length&&E?k.map((t,e)=>E(t,e,{scales:l?{time:l.x,value:l.y}:null,timeAxis:"x",width:o,height:r})).filter(Boolean):null,[k,E,o,r,w]);return c||y||m||g||x||$&&$.length>0||p||M?t.createElement("svg",{width:i,height:s,style:{position:"absolute",top:0,left:0,pointerEvents:"none"}},t.createElement("g",{transform:`translate(${a.left},${a.top})`},p&&l&&t.createElement("g",{className:"stream-grid"},A.map((e,n)=>t.createElement("line",{key:"xgrid-"+n,x1:e.pixel,y1:0,x2:e.pixel,y2:r,stroke:"#e0e0e0",strokeWidth:1})),S.map((e,n)=>t.createElement("line",{key:"ygrid-"+n,x1:0,y1:e.pixel,x2:o,y2:e.pixel,stroke:"#e0e0e0",strokeWidth:1}))),c&&l&&t.createElement("g",{className:"stream-axes"},t.createElement("line",{x1:0,y1:r,x2:o,y2:r,stroke:"#ccc",strokeWidth:1}),A.map((e,n)=>t.createElement("g",{key:"xtick-"+n,transform:`translate(${e.pixel},${r})`},t.createElement("line",{y2:5,stroke:"#ccc",strokeWidth:1}),t.createElement("text",{y:18,textAnchor:"middle",fontSize:10,fill:"#666",style:{userSelect:"none"}},e.label))),h&&t.createElement("text",{x:o/2,y:r+40,textAnchor:"middle",fontSize:12,fill:"#333",style:{userSelect:"none"}},h),t.createElement("line",{x1:0,y1:0,x2:0,y2:r,stroke:"#ccc",strokeWidth:1}),S.map((e,n)=>t.createElement("g",{key:"ytick-"+n,transform:`translate(0,${e.pixel})`},t.createElement("line",{x2:-5,stroke:"#ccc",strokeWidth:1}),t.createElement("text",{x:-8,textAnchor:"end",dominantBaseline:"middle",fontSize:10,fill:"#666",style:{userSelect:"none"}},e.label))),u&&t.createElement("text",{x:15-a.left,y:r/2,textAnchor:"middle",fontSize:12,fill:"#333",transform:`rotate(-90, ${15-a.left}, ${r/2})`,style:{userSelect:"none"}},u)),$,x&&l&&b&&v&&t.createElement(t.Fragment,null,x.top&&t.createElement("g",{transform:"translate(0, 0)"},t.createElement(at,{orient:"top",config:st(x.top),values:b,scale:l.x,size:a.top,length:o})),x.bottom&&t.createElement("g",{transform:`translate(0, ${r})`},t.createElement(at,{orient:"bottom",config:st(x.bottom),values:b,scale:l.x,size:a.bottom,length:o})),x.left&&t.createElement("g",{transform:"translate(0, 0)"},t.createElement(at,{orient:"left",config:st(x.left),values:v,scale:l.y,size:a.left,length:r})),x.right&&t.createElement("g",{transform:`translate(${o}, 0)`},t.createElement(at,{orient:"right",config:st(x.right),values:v,scale:l.y,size:a.right,length:r}))),g,M),y&&t.createElement("text",{x:i/2,y:20,textAnchor:"middle",fontSize:14,fontWeight:"bold",fill:"#333",style:{userSelect:"none"}},"string"==typeof y?y:null),m&&t.createElement("g",{transform:`translate(${i-a.right+10}, ${a.top})`},"object"==typeof(P=m)&&null!==P&&!t.isValidElement(P)&&"legendGroups"in P?t.createElement(it,{legendGroups:m.legendGroups,title:"",width:100}):m)):null;var P}function ht(t,e,n){let o=n;for(const n of e)"lesser"===n.thresholdType?n.value>t&&(o=n.color):t>n.value&&(o=n.color);return o}const ut=(t,e,n,o)=>{var r;const i=e.filter(t=>"area"===t.type);for(const e of i){if(2>e.topPath.length)continue;t.beginPath();const[n,o]=e.topPath[0];t.moveTo(n,o);for(let n=1;e.topPath.length>n;n++)t.lineTo(e.topPath[n][0],e.topPath[n][1]);for(let n=e.bottomPath.length-1;n>=0;n--)t.lineTo(e.bottomPath[n][0],e.bottomPath[n][1]);t.closePath();const i=null!==(r=e.style.fillOpacity)&&void 0!==r?r:.7;if(t.globalAlpha=i,t.fillStyle=e.style.fill||"#4e79a7",t.fill(),e.style.stroke&&"none"!==e.style.stroke){t.globalAlpha=1,t.strokeStyle=e.style.stroke,t.lineWidth=e.style.strokeWidth||2,t.setLineDash([]),t.beginPath(),t.moveTo(e.topPath[0][0],e.topPath[0][1]);for(let n=1;e.topPath.length>n;n++)t.lineTo(e.topPath[n][0],e.topPath[n][1]);t.stroke()}t.globalAlpha=1}},dt=(t,e,n,o)=>{var r;const i=e.filter(t=>"point"===t.type);for(const e of i){t.beginPath(),t.arc(e.x,e.y,e.r,0,2*Math.PI);const n=null!==(r=e.style.opacity)&&void 0!==r?r:e.style.fillOpacity;if(null!=n&&(t.globalAlpha=n),t.fillStyle=e.style.fill||"#4e79a7",t.fill(),e.style.stroke&&(t.strokeStyle=e.style.stroke,t.lineWidth=e.style.strokeWidth||1,t.stroke()),e._pulseIntensity&&e._pulseIntensity>0){const n=4;t.beginPath(),t.arc(e.x,e.y,e.r+n*e._pulseIntensity,0,2*Math.PI),t.strokeStyle=e._pulseColor||"rgba(255,255,255,0.6)",t.lineWidth=2*e._pulseIntensity,t.globalAlpha=.5*e._pulseIntensity,t.stroke()}t.globalAlpha=1}},ft=(t,e,n,o)=>{const r=e.filter(t=>"rect"===t.type);for(const e of r)null!=e.style.opacity&&(t.globalAlpha=e.style.opacity),e.style.icon?pt(t,e):(t.fillStyle=e.style.fill||"#007bff",t.fillRect(e.x,e.y,e.w,e.h),e.style.stroke&&(t.strokeStyle=e.style.stroke,t.lineWidth=e.style.strokeWidth||1,t.strokeRect(e.x,e.y,e.w,e.h))),e._pulseIntensity&&e._pulseIntensity>0&&(t.globalAlpha=.3*e._pulseIntensity,t.fillStyle=e._pulseColor||"rgba(255,255,255,0.6)",t.fillRect(e.x,e.y,e.w,e.h)),t.globalAlpha=1};function pt(t,e){const n=e.style.icon,o=e.style.iconPadding||2,r=Math.min(e.w,e.w)-o;if(0>=r)return;const i=e.h>e.w;if(t.save(),t.beginPath(),t.rect(e.x,e.y,e.w,e.h),t.clip(),i){const i=r+o,s=e.x+(e.w-r)/2;for(let o=e.y+e.h-r;o>=e.y-r;o-=i)t.drawImage(n,s,o,r,r)}else{const i=r+o,s=e.y+(e.h-r)/2;for(let o=e.x;e.x+e.w>o;o+=i)t.drawImage(n,o,s,r,r)}t.restore()}const yt={line:[ut,(t,e,n,o)=>{const r=e.filter(t=>"line"===t.type);for(const i of r){if(2>i.path.length)continue;const s=i.style.stroke||"#007bff",a=i.style.strokeWidth||2,l=i.colorThresholds,c=i.rawValues;if(t.setLineDash(i.style.strokeDasharray?i.style.strokeDasharray.split(/[\s,]+/).map(Number):[]),null!=i.style.opacity&&(t.globalAlpha=i.style.opacity),t.lineWidth=a,l&&0!==l.length&&c&&c.length===i.path.length){let h=null,u=null,d=null,f=null,p=!1;function y(e,n,o){t.beginPath(),t.strokeStyle=e,t.moveTo(n,o),p=!0}function m(){p&&(t.stroke(),p=!1)}for(let g=0;i.path.length>g;g++){const[x,b]=i.path[g],v=c[g],k=ht(v,l,s);if(null!==h&&null!==f&&null!==d){if(k===f)t.lineTo(x,b);else{const E=[];for(const w of l){const M=w.value;(d>M||M>v)&&(M>d||v>M)||d===M||v===M||E.push({t:(M-d)/(v-d)})}E.sort((t,e)=>t.t-e.t);for(const A of E){const S=h+(x-h)*A.t,$=u+(b-u)*A.t,P=ht(d+(v-d)*Math.min(A.t+1e-4,1),l,s);t.lineTo(S,$),m(),y(P,S,$)}t.lineTo(x,b)}h=x,u=b,d=v,f=k}else y(k,x,b),h=x,u=b,d=v,f=k}m()}else{t.beginPath(),t.strokeStyle=s;const[N,_]=i.path[0];t.moveTo(N,_);for(let O=1;i.path.length>O;O++)t.lineTo(i.path[O][0],i.path[O][1]);t.stroke()}if(i.style.fill&&i.style.fillOpacity&&i.style.fillOpacity>0){t.beginPath(),t.globalAlpha=i.style.fillOpacity,t.fillStyle=i.style.fill;const[D,j]=i.path[0];t.moveTo(D,j);for(let z=1;i.path.length>z;z++)t.lineTo(i.path[z][0],i.path[z][1]);const T=i.path[0][0];t.lineTo(i.path[i.path.length-1][0],o.height),t.lineTo(T,o.height),t.closePath(),t.fill()}t.globalAlpha=1,t.setLineDash([])}}],area:[ut],stackedarea:[ut],scatter:[dt],bubble:[dt],heatmap:[(t,e,n,o)=>{const r=e.filter(t=>"heatcell"===t.type);for(const e of r){const n=e.style;null!=(null==n?void 0:n.opacity)&&(t.globalAlpha=n.opacity),t.fillStyle=e.fill,t.fillRect(e.x,e.y,e.w,e.h),t.strokeStyle="#fff",t.lineWidth=1,t.strokeRect(e.x,e.y,e.w,e.h),e._pulseIntensity&&e._pulseIntensity>0&&(t.globalAlpha=.3*e._pulseIntensity,t.fillStyle=e._pulseColor||"rgba(255,255,255,0.6)",t.fillRect(e.x,e.y,e.w,e.h)),t.globalAlpha=1}}],bar:[ft],swarm:[dt],waterfall:[(t,e,n,o)=>{var r,i;ft(t,e);const s=e.filter(t=>"rect"===t.type);if(s.length>=2){t.save(),t.strokeStyle="#999",t.lineWidth=1,t.setLineDash([]);for(let e=0;s.length-1>e;e++){const o=s[e],a=s[e+1];if(!(null===(r=o.datum)||void 0===r?void 0:r.cumEnd)||!(null===(i=a.datum)||void 0===i?void 0:i.baseline))continue;const l=n.y(o.datum.cumEnd),c=o.x+o.w,h=a.x;t.beginPath(),t.moveTo(c,l),t.lineTo(h,l),t.stroke()}t.restore()}}],candlestick:[(t,e,n,o)=>{for(const n of e){if("candlestick"!==n.type)continue;const e=n;t.beginPath(),t.moveTo(e.x,e.highY),t.lineTo(e.x,e.lowY),t.strokeStyle=e.wickColor,t.lineWidth=e.wickWidth,t.stroke();const o=Math.min(e.openY,e.closeY),r=Math.abs(e.openY-e.closeY),i=e.isUp?e.upColor:e.downColor;t.fillStyle=i,t.fillRect(e.x-e.bodyWidth/2,o,e.bodyWidth,Math.max(r,1)),t.strokeStyle=i,t.lineWidth=1,t.strokeRect(e.x-e.bodyWidth/2,o,e.bodyWidth,Math.max(r,1))}}]},mt={top:20,right:20,bottom:30,left:40},gt={axisStroke:"#ccc",tickText:"#666",crosshair:"rgba(0, 0, 0, 0.25)",hoverFill:"rgba(255, 255, 255, 0.3)",hoverStroke:"rgba(0, 0, 0, 0.4)",pointRing:"white"},xt={background:"rgba(0, 0, 0, 0.85)",color:"white",padding:"6px 10px",borderRadius:4,fontSize:12,lineHeight:1.5,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",pointerEvents:"none",whiteSpace:"nowrap"};function bt({hover:e}){const n=t=>Number.isInteger(t)?t+"":t.toFixed(2);return t.createElement("div",{className:"semiotic-tooltip",style:xt},t.createElement("div",{style:{fontWeight:600,marginBottom:2}},n(e.value)),t.createElement("div",{style:{opacity:.7,fontSize:11}},n(e.time)))}function vt({width:e,height:n,totalWidth:o,totalHeight:i,margin:s,dimension:l,scales:c,onBrush:h}){const u=r(null),m=r(null);return a(()=>{if(!u.current)return;const t=y(u.current).select(".brush-g"),o="x"===l?d():"y"===l?f():p();return o.extent([[0,0],[e,n]]),o.on("brush end",t=>{if(!c)return;if(!t.selection)return void h(null);let o,r;if("x"===l){const[e,i]=t.selection;o=[c.x.invert(e),c.x.invert(i)],r=[c.y.invert(n),c.y.invert(0)]}else if("y"===l){const[n,i]=t.selection;o=[c.x.invert(0),c.x.invert(e)],r=[c.y.invert(i),c.y.invert(n)]}else{const[[e,n],[i,s]]=t.selection;o=[c.x.invert(e),c.x.invert(i)],r=[c.y.invert(s),c.y.invert(n)]}h({x:o,y:r})}),t.call(o),m.current=o,t.select(".selection").attr("fill","steelblue").attr("fill-opacity",.15).attr("stroke","steelblue").attr("stroke-width",1),()=>{o.on("brush end",null),m.current=null}},[e,n,l,c,h]),t.createElement("svg",{ref:u,width:o,height:i,style:{position:"absolute",top:0,left:0,pointerEvents:"all"}},t.createElement("g",{className:"brush-g",transform:`translate(${s.left},${s.top})`}))}const kt=o(function(e,o){var c;const{chartType:h,runtimeMode:u,data:d,xAccessor:f,yAccessor:p,colorAccessor:y,sizeAccessor:m,groupAccessor:g,lineDataAccessor:x,normalize:b,binSize:v,valueAccessor:k,arrowOfTime:E="right",windowMode:w="sliding",windowSize:M=200,timeAccessor:A,xExtent:S,yExtent:$,extentPadding:P=.1,sizeRange:N,size:_=[500,300],margin:O,className:D,background:j,lineStyle:T,pointStyle:z,areaStyle:C,swarmStyle:B,barColors:F,colorScheme:L,boundsAccessor:Y,boundsStyle:I,openAccessor:X,highAccessor:R,lowAccessor:H,closeAccessor:V,candlestickStyle:G,showAxes:q=!0,xLabel:nt,yLabel:ot,xFormat:rt,yFormat:it,tickFormatTime:st,tickFormatValue:at,hoverAnnotation:lt,tooltipContent:ht,customHoverBehavior:ut,enableHover:dt,annotations:ft,svgAnnotationRules:pt,showGrid:xt,legend:kt,backgroundGraphics:Et,foregroundGraphics:wt,title:Mt,categoryAccessor:At,brush:St,onBrush:$t,decay:Pt,pulse:Nt,transition:_t,staleness:Ot,heatmapAggregation:Dt,heatmapXBins:jt,heatmapYBins:Tt,marginalGraphics:zt}=e,Ct=Object.assign(Object.assign({},mt),O);if(zt){const t=60;zt.top&&t>Ct.top&&(Ct.top=t),zt.bottom&&t>Ct.bottom&&(Ct.bottom=t),zt.left&&t>Ct.left&&(Ct.left=t),zt.right&&t>Ct.right&&(Ct.right=t)}const Bt=_[0]-Ct.left-Ct.right,Wt=_[1]-Ct.top-Ct.bottom,Ft=null!=lt?lt:dt,Lt=r(null),Yt=r(0),It=r(!1),[Xt,Rt]=i(0),[Ht,Vt]=i(null),Gt=r(null),[qt,Jt]=i(null),[Kt,Zt]=i(!1),[Ut,Qt]=i([]),[te,ee]=i([]),ne=r(()=>{}),oe="streaming"===u||["bar","swarm","waterfall"].includes(h),re=n(()=>({chartType:h,runtimeMode:oe?"streaming":"bounded",windowSize:M,windowMode:w,arrowOfTime:oe?E:"right",extentPadding:P,xAccessor:oe?void 0:f,yAccessor:oe?void 0:p,timeAccessor:oe?A:void 0,valueAccessor:k,colorAccessor:y,sizeAccessor:m,groupAccessor:g,categoryAccessor:At,lineDataAccessor:x,xExtent:S,yExtent:$,sizeRange:N,binSize:v,normalize:b,boundsAccessor:Y,boundsStyle:I,openAccessor:X,highAccessor:R,lowAccessor:H,closeAccessor:V,candlestickStyle:G,lineStyle:T,pointStyle:z,areaStyle:C,swarmStyle:B,colorScheme:L,barColors:F,annotations:ft,decay:Pt,pulse:Nt,transition:_t,staleness:Ot,heatmapAggregation:Dt,heatmapXBins:jt,heatmapYBins:Tt}),[h,M,w,E,P,f,p,A,k,y,m,g,At,x,S,$,N,v,b,Y,I,X,R,H,V,G,T,z,C,B,L,F,ft,Pt,Nt,_t,Ot,Dt,jt,Tt,oe]),ie=r(null);ie.current||(ie.current=new J(re));const se=s(()=>{Yt.current||(Yt.current=requestAnimationFrame(()=>ne.current()))},[]);a(()=>{var t;null===(t=ie.current)||void 0===t||t.updateConfig(re),It.current=!0,se()},[re,se]);const ae=r(null);ae.current||(ae.current=new W(t=>{const e=ie.current;e&&e.ingest(t)&&(It.current=!0,se())}));const le=s(t=>{var e;null===(e=ae.current)||void 0===e||e.push(t)},[]),ce=s(t=>{var e;null===(e=ae.current)||void 0===e||e.pushMany(t)},[]),he=s(()=>{var t,e;null===(t=ae.current)||void 0===t||t.clear(),null===(e=ie.current)||void 0===e||e.clear(),It.current=!0,se()},[se]);l(o,()=>({push:le,pushMany:ce,clear:he,getData:()=>{var t,e;return null!==(e=null===(t=ie.current)||void 0===t?void 0:t.getData())&&void 0!==e?e:[]},getScales:()=>{var t,e;return null!==(e=null===(t=ie.current)||void 0===t?void 0:t.scales)&&void 0!==e?e:null},getExtents:()=>{var t,e;return null!==(e=null===(t=ie.current)||void 0===t?void 0:t.getExtents())&&void 0!==e?e:null}}),[le,ce,he]),a(()=>{var t;d&&(null===(t=ae.current)||void 0===t||t.setBoundedData(d))},[d]);const ue=r(()=>{}),de=r(()=>{});ue.current=t=>{if(!Ft)return;const e=Lt.current;if(!e)return;const n=e.getBoundingClientRect(),o=t.clientX-n.left-Ct.left,r=t.clientY-n.top-Ct.top;if(0>o||o>Bt||0>r||r>Wt)return void(Gt.current&&(Gt.current=null,Jt(null),ut&&ut(null),se()));const i=ie.current;if(!i||0===i.scene.length)return;const s=function(t,e,n,o=30){let r=null;for(const i of t){let t=null;switch(i.type){case"point":t=K(i,e,n);break;case"line":t=Z(i,e,n);break;case"rect":t=U(i,e,n);break;case"heatcell":t=Q(i,e,n);break;case"area":if(!1===i.interactive)break;t=et(i,e,n);break;case"candlestick":t=tt(i,e,n)}t&&o>t.distance&&(r&&t.distance>=r.distance||(r=t))}return r}(i.scene,o,r);if(!s)return void(Gt.current&&(Gt.current=null,Jt(null),ut&&ut(null),se()));const a={data:s.datum,time:s.x,value:s.y,x:s.x,y:s.y};Gt.current=a,Jt(a),ut&&ut(a),se()},de.current=()=>{Gt.current&&(Gt.current=null,Jt(null),ut&&ut(null),se())};const fe=s(t=>ue.current(t),[]),pe=s(()=>de.current(),[]);ne.current=()=>{var t,e;Yt.current=0;const n=Lt.current;if(!n)return;const o=n.getContext("2d");if(!o)return;const r=ie.current;if(!r)return;const i="undefined"!=typeof performance?performance.now():Date.now(),s=r.advanceTransition(i);s||r.computeScene({width:Bt,height:Wt});const a="undefined"!=typeof window&&window.devicePixelRatio||1;n.width=_[0]*a,n.height=_[1]*a,n.style.width=_[0]+"px",n.style.height=_[1]+"px",o.scale(a,a),o.translate(Ct.left,Ct.top),o.clearRect(-Ct.left,-Ct.top,_[0],_[1]);const l=function(t){if(!t)return gt;const e=getComputedStyle(t),n=e.getPropertyValue("--text-secondary").trim(),o=e.getPropertyValue("--text-primary").trim(),r=e.getPropertyValue("--surface-3").trim(),i=e.getPropertyValue("--surface-0").trim();return n||o?{axisStroke:r||gt.axisStroke,tickText:n||gt.tickText,crosshair:n?n+"66":gt.crosshair,hoverFill:i?i+"4D":gt.hoverFill,hoverStroke:n?n+"99":gt.hoverStroke,pointRing:i||gt.pointRing}:gt}(n),c=null!==(t=null==Ot?void 0:Ot.threshold)&&void 0!==t?t:5e3,u=Ot&&r.lastIngestTime>0&&i-r.lastIngestTime>c;u&&(o.globalAlpha=null!==(e=null==Ot?void 0:Ot.dimOpacity)&&void 0!==e?e:.5),j&&(o.fillStyle=j,o.fillRect(0,0,Bt,Wt));const d=yt[h];if(d&&r.scales)for(const t of d)t(o,r.scene,r.scales,{width:Bt,height:Wt});u&&(o.globalAlpha=1),Ft&&Gt.current&&r.scales&&function(t,e,n,o,r,i,s){if(!1===r.crosshair)return;t.save();const a="object"==typeof r.crosshair?r.crosshair:{};t.strokeStyle=a.stroke||s.crosshair,t.lineWidth=a.strokeWidth||1,t.setLineDash(a.strokeDasharray?a.strokeDasharray.split(/[\s,]+/).map(Number):[4,4]),t.beginPath(),t.moveTo(e.x,0),t.lineTo(e.x,o),t.stroke(),t.beginPath(),t.moveTo(0,e.y),t.lineTo(n,e.y),t.stroke(),t.restore(),t.beginPath(),t.arc(e.x,e.y,4,0,2*Math.PI),t.fillStyle="#007bff",t.fill(),t.strokeStyle=s.pointRing,t.lineWidth=2,t.stroke()}(o,Gt.current,Bt,Wt,"object"==typeof Ft?Ft:{},0,l);const y=It.current;if(It.current=!1,y&&r.scales&&(Vt(r.scales),zt)){const t=r.getData(),e="function"==typeof f?f:t=>t[f||"x"],n="function"==typeof p?p:t=>t[p||"y"];Qt(t.map(t=>e(t)).filter(t=>"number"==typeof t&&isFinite(t))),ee(t.map(t=>n(t)).filter(t=>"number"==typeof t&&isFinite(t)))}y&&ft&&ft.length>0&&pt&&Rt(t=>t+1),(null==Ot?void 0:Ot.showBadge)&&Zt(!!u),(s||r.hasActivePulses)&&(Yt.current=requestAnimationFrame(()=>ne.current()))},a(()=>(se(),()=>{Yt.current&&cancelAnimationFrame(Yt.current)}),[se]),a(()=>{It.current=!0,se()},[h,Bt,Wt,q,j,T,se]),a(()=>{if(!Ot)return;const t=setInterval(()=>{var t;const e=ie.current;if(!e||0===e.lastIngestTime)return;const n="undefined"!=typeof performance?performance.now():Date.now(),o=null!==(t=Ot.threshold)&&void 0!==t?t:5e3,r=n-e.lastIngestTime>o;r!==Kt&&(Zt(r),It.current=!0,se())},1e3);return()=>clearInterval(t)},[Ot,Kt,se]);const ye=Ft&&qt?ht?ht(qt):t.createElement(bt,{hover:qt}):null,me=ye?t.createElement("div",{className:"stream-frame-tooltip",style:{position:"absolute",left:Ct.left+qt.x,top:Ct.top+qt.y,transform:`translate(${qt.x>.7*Bt?"calc(-100% - 12px)":"12px"}, ${.3*Wt>qt.y?"4px":"calc(-100% - 4px)"})`,pointerEvents:"none",zIndex:1}},ye):null;return t.createElement("div",{className:"stream-xy-frame"+(D?" "+D:""),style:{position:"relative",width:_[0],height:_[1]},onMouseMove:Ft?fe:void 0,onMouseLeave:Ft?pe:void 0},Et&&t.createElement("svg",{style:{position:"absolute",left:0,top:0,width:_[0],height:_[1],pointerEvents:"none"}},Et),t.createElement("canvas",{ref:Lt,style:{position:"absolute",left:0,top:0}}),t.createElement(ct,{width:Bt,height:Wt,totalWidth:_[0],totalHeight:_[1],margin:Ct,scales:Ht,showAxes:q,xLabel:nt,yLabel:ot,xFormat:rt||st,yFormat:it||at,showGrid:xt,title:Mt,legend:kt,foregroundGraphics:wt,marginalGraphics:zt,xValues:Ut,yValues:te,annotations:ft,svgAnnotationRules:pt,annotationFrame:Xt}),(St||$t)&&t.createElement(vt,{width:Bt,height:Wt,totalWidth:_[0],totalHeight:_[1],margin:Ct,dimension:null!==(c=null==St?void 0:St.dimension)&&void 0!==c?c:"xy",scales:Ht,onBrush:null!=$t?$t:()=>{}}),(null==Ot?void 0:Ot.showBadge)&&t.createElement("div",{className:"stream-staleness-badge",style:Object.assign(Object.assign({position:"absolute"},"top-left"===Ot.badgePosition?{top:4,left:4}:"bottom-left"===Ot.badgePosition?{bottom:4,left:4}:"bottom-right"===Ot.badgePosition?{bottom:4,right:4}:{top:4,right:4}),{padding:"2px 8px",borderRadius:4,fontSize:11,fontWeight:600,pointerEvents:"none",background:Kt?"#dc3545":"#28a745",color:"white"})},Kt?"STALE":"LIVE"),me)});kt.displayName="StreamXYFrame";const Et={category10:v,tableau10:N,set3:P,blues:$,reds:S,greens:A,oranges:M,purples:w,viridis:E,plasma:k},wt=v;function Mt(t,e,n){if("function"==typeof e)return e(t);const o=t[e];return n?n(o):wt[Math.abs(function(t){let e=0;for(let n=0;t.length>n;n++)e=(e<<5)-e+t.charCodeAt(n),e&=e;return Math.abs(e)}(o+""))%wt.length]}const At="#007bff";const St={background:"rgba(0, 0, 0, 0.85)",color:"white",padding:"8px 12px",borderRadius:"4px",fontSize:"14px",lineHeight:"1.5",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",pointerEvents:"none",maxWidth:"300px",wordWrap:"break-word"};function $t(t,e){return"function"==typeof e?e(t):t[e]}function Pt(t,e){return e?e(t):null==t?"":"number"==typeof t?t.toLocaleString():t instanceof Date?t.toLocaleDateString():"object"==typeof t&&null!==t?void 0!==t.id?t.id+"":void 0!==t.name?t.name+"":JSON.stringify(t):t+""}function Nt(e){return!0===e||("function"==typeof e?e:!1!==e&&void 0!==e&&("object"!=typeof e||null===e||!("fields"in e)&&!("title"in e)||function(e={}){const{fields:n,title:o,format:r,style:i={},className:s=""}=e;return e=>{if(!e||"object"!=typeof e)return null;let a;const l=[];if(o){const t=$t(e,o);a=Pt(t,r)}if(n&&n.length>0)n.forEach(t=>{let n,o,i;"string"==typeof t?(n=t,o=t,i=r):(n=t.label,o=t.accessor||t.key||"",i=t.format||r);const s=$t(e,o);l.push({label:n,value:Pt(s,i)})});else if(!o){const t=["value","y","name","id","label"];for(const n of t)if(void 0!==e[n]){a=Pt(e[n],r);break}if(!a){const t=Object.keys(e).filter(t=>!t.startsWith("_"));t.length>0&&(a=Pt(e[t[0]],r))}}const c=Object.assign(Object.assign({},St),i);return t.createElement("div",{className:("semiotic-tooltip "+s).trim(),style:c},a&&t.createElement("div",{style:{fontWeight:l.length>0?"bold":"normal"}},a),l.map((e,n)=>t.createElement("div",{key:n,style:{marginTop:0===n&&a?"4px":0}},e.label&&t.createElement("span",null,e.label,": "),e.value)))}}(e)))}function _t({componentName:e,message:n,width:o,height:r}){return t.createElement("div",{role:"alert",style:{width:o,height:Math.max(r,120),display:"flex",alignItems:"center",justifyContent:"center",border:"1px dashed rgba(128, 128, 128, 0.4)",borderRadius:8,background:"rgba(128, 128, 128, 0.04)",padding:24,boxSizing:"border-box"}},t.createElement("div",{style:{textAlign:"center",maxWidth:400}},t.createElement("div",{style:{fontSize:13,fontWeight:600,color:"rgba(128, 128, 128, 0.7)",marginBottom:6,fontFamily:"monospace"}},e),t.createElement("div",{style:{fontSize:14,color:"rgba(128, 128, 128, 0.9)",lineHeight:1.5}},n)))}function Ot({width:e,height:n,margin:o,scales:i,brushDirection:s,extent:l,onBrush:c}){const h=r(null),u=r(null),p=r(!1),m=e+o.left+o.right,g=n+o.top+o.bottom;return a(()=>{if(!h.current||!i)return;const t=y(h.current).select(".brush-group"),o="x"===s?d().extent([[0,0],[e,n]]):f().extent([[0,0],[e,n]]);return o.on("brush end",t=>{if(p.current)return;if(!t.sourceEvent)return;const e=t.selection;if(!e)return void c(null);const n=("x"===s?i.x:i.y).invert;if(!n)return;const o=[n(e[0]),n(e[1])];c(o)}),t.call(o),u.current=o,t.select(".selection").attr("fill","steelblue").attr("fill-opacity",.2).attr("stroke","steelblue").attr("stroke-width",1),()=>{o.on("brush end",null)}},[i,e,n,s,c]),a(()=>{if(!u.current||!i||!h.current)return;const t=y(h.current).select(".brush-group"),e="x"===s?i.x:i.y;if(p.current=!0,l){const n=[e(l[0]),e(l[1])];t.call(u.current.move,n)}else t.call(u.current.move,null);p.current=!1},[l,i,s]),t.createElement("svg",{ref:h,width:m,height:g,style:{position:"absolute",top:0,left:0,pointerEvents:"all"}},t.createElement("g",{className:"brush-group",transform:`translate(${o.left},${o.top})`}))}function Dt(e){var o,l;const{data:c,width:h=600,height:u=400,margin:d,className:f,title:p,xLabel:y,yLabel:m,xFormat:x,yFormat:b,xAccessor:v="x",yAccessor:k="y",lineBy:E,lineDataAccessor:w="coordinates",colorBy:M,colorScheme:A="category10",curve:S="linear",lineWidth:$=2,fillArea:P=!1,areaOpacity:N=.3,showPoints:_=!1,pointRadius:O=3,enableHover:D=!0,showGrid:j=!1,showLegend:T,tooltip:z,minimap:C={},renderBefore:B=!1,onBrush:W,brushExtent:F,frameProps:L={}}=e,Y=c||[],[I,X]=i(null),R=null!=F?F:I,H=s(t=>{F||X(t),null==W||W(t)},[F,W]),V=r(null),[G,q]=i(null);a(()=>{const t=()=>{var e,n;const o=null===(n=null===(e=V.current)||void 0===e?void 0:e.getScales)||void 0===n?void 0:n.call(e);o?q(o):requestAnimationFrame(t)};requestAnimationFrame(t)},[c]);const J=void 0!==(null===(o=Y[0])||void 0===o?void 0:o[w]),K=n(()=>{if(J)return Y;if(E){const t=Y.reduce((t,e)=>{const n="function"==typeof E?E(e):e[E];if(!t[n]){const e={[w]:[]};"string"==typeof E&&(e[E]=n),t[n]=e}return t[n][w].push(e),t},{});return Object.values(t)}return[{[w]:Y}]},[Y,E,w,J]),Z=n(()=>J||E?K.flatMap(t=>{const e=t[w]||[];return E&&"string"==typeof E?e.map(e=>Object.assign(Object.assign({},e),{[E]:t[E]})):e}):Y,[K,w,J,E,Y]),U=function(t,e,o="category10"){return n(()=>{if(e&&"function"!=typeof e)return function(t,e,n="category10"){const o=Array.from(new Set(t.map(t=>t[e]))),r=o.every(t=>"number"==typeof t||!isNaN(Number(t)));if(Array.isArray(n))return g().domain(o).range(n).unknown("#999");const i=Et[n]||Et.category10;if(r&&"function"==typeof i)return t=>i(Number(t)/Math.max(...o.map(Number)));{const t=Array.isArray(i)?i:wt;return g().domain(o).range(t).unknown("#999")}}(t,e,o)},[t,e,o])}(Y,M,A),Q=n(()=>t=>{const e={strokeWidth:$};return e.stroke=M?Mt(t,M,U):At,P&&(e.fill=e.stroke,e.fillOpacity=N),e},[M,U,$,P,N]),tt=n(()=>C.lineStyle?C.lineStyle:t=>{const e={strokeWidth:1};return e.stroke=M?Mt(t,M,U):At,e},[M,U,C.lineStyle]),et=n(()=>{if(_)return t=>{const e={r:O,fillOpacity:1};return e.fill=M?Mt(t.parentLine||t,M,U):At,e}},[_,O,M,U]),nt=void 0!==T?T:K.length>1,ot=n(()=>{if(nt&&M)return function({data:t,colorBy:e,colorScale:n,getColor:o,strokeColor:r,strokeWidth:i}){return{legendGroups:[{styleFn:t=>{const e={fill:t.color,stroke:t.color};return void 0!==r&&(e.stroke=r),void 0!==i&&(e.strokeWidth=i),e},type:"fill",items:Array.from(new Set(t.map(t=>"function"==typeof e?e(t):t[e]))).map(r=>{const i=t.find("function"==typeof e?t=>e(t)===r:t=>t[e]===r),s=i?o(i,e,n):n?n(r):"#000000";return{label:r+"",color:s}}),label:""}]}}({data:K,colorBy:M,colorScale:U,getColor:Mt})},[nt,M,K,U]),rt=n(()=>{const t=Object.assign(Object.assign({},{top:50,bottom:60,left:70,right:40}),d);return ot&&120>t.right&&(t.right=120),t},[d,ot]),it=C.height||60,st=n(()=>{var t,e,n,o,r,i,s,a;return{top:null!==(e=null===(t=C.margin)||void 0===t?void 0:t.top)&&void 0!==e?e:0,bottom:null!==(o=null===(n=C.margin)||void 0===n?void 0:n.bottom)&&void 0!==o?o:20,left:null!==(i=null===(r=C.margin)||void 0===r?void 0:r.left)&&void 0!==i?i:rt.left,right:null!==(a=null===(s=C.margin)||void 0===s?void 0:s.right)&&void 0!==a?a:rt.right}},[C.margin,rt]),at=C.brushDirection||"x",lt=function({data:t,accessors:e,requiredProps:n}){if(n)for(const[t,e]of Object.entries(n))if(null==e)return t+" is required. Provide a field name or function.";if(!t||!Array.isArray(t)||0===t.length)return"No data provided. Pass a non-empty array to the data prop.";if(e){const n=t[0];if(n&&"object"==typeof n)for(const[t,o]of Object.entries(e))if(o&&"string"==typeof o&&!(o in n))return`${t} "${o}" not found in data. Available fields: ${Object.keys(n).join(", ")}.`}return null}({componentName:"MinimapChart",data:Y,accessors:{xAccessor:v,yAccessor:k}});if(lt)return t.createElement(_t,{componentName:"MinimapChart",message:lt,width:h,height:u});const ct=P?"area":"line",ht=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({chartType:ct,data:Z,xAccessor:v,yAccessor:k,groupAccessor:E||void 0,curve:S,lineStyle:Q},_&&{pointStyle:et}),{size:[h,u],margin:rt,showAxes:!0,xLabel:y,yLabel:m,xFormat:x,yFormat:b,enableHover:D,showGrid:j}),ot&&{legend:ot}),p&&{title:p}),z&&{tooltipContent:Nt(z)}),R&&{xExtent:R}),L),ut={chartType:ct,data:Z,xAccessor:v,yAccessor:k,groupAccessor:E||void 0,curve:S,lineStyle:tt,size:[h,it+st.top+st.bottom],margin:st,showAxes:null!==(l=C.showAxes)&&void 0!==l&&l,background:C.background,enableHover:!1},dt=t.createElement("div",{key:"minimap",style:{position:"relative",width:h}},t.createElement(kt,Object.assign({ref:V},ut)),t.createElement(Ot,{width:h-st.left-st.right,height:it,margin:st,scales:G,brushDirection:at,extent:R,onBrush:H})),ft=t.createElement("div",{key:"main"},t.createElement(kt,Object.assign({},ht)));return t.createElement("div",{className:"minimap-chart"+(f?" "+f:"")},B?dt:ft,B?ft:dt)}Dt.displayName="MinimapChart";const jt=({xy:e,orient:n,i:o,className:r="",jaggedBase:i})=>{let s=`M${e.x1},${e.y1}L${e.x2},${e.y2}`;return i&&0===o&&(s=((t,e)=>{let n="";const{x1:o,x2:r,y1:i,y2:s}=e;if("left"===t||"right"===t){const e=Math.abs(r-o);n=((t,e,n,o)=>{const r=t/e;let i=0,s="M0,"+n;const a="right"===o?-1:1;for(;t>=i;)s+=`L${i},${n}`,t>i&&(s+=`L${i+r/2},${n+10*a}`),i+=r;return s})(e,Math.ceil(e/40),"right"===t?0:i,t)}else{const e=Math.abs(s-i);n=((t,e,n,o)=>{const r=t/e;let i=0,s=`M${n},0`;const a="bottom"===o?-1:1;for(;t>=i;)s+=`L${n},${i}`,t>i&&(s+=`L${n+10*a},${i+r/2}`),i+=r;return s})(e,Math.ceil(e/40),o,t)}return n})(n,e)),t.createElement("path",{key:o,fill:"none",stroke:"currentColor",strokeWidth:"1px",d:s,className:`tick-line tick ${n} ${r}`})};function Tt(t,e,n){const o=Math.abs(n.range()[1]-n.range()[0]);return t||(e||(e=Math.max(1,Math.floor(o/40))),t=n.ticks&&n.ticks(e)||n.domain()),t}function zt({t:t,o:e,w:n}){return"contour"!==t&&"boxplot"!==t||"left"!==e&&"right"!==e?0:n/2}function Ct({t:t,o:e,w:n}){return"contour"!==t&&"boxplot"!==t||"top"!==e&&"bottom"!==e?0:n/2}function Bt(t){const{translation:n,orient:o,decoratedSummaryType:r,summaryWidth:i,renderedSummary:s,points:a}=t;return e.createElement("g",{className:"marginal-graphics",transform:`translate(${n[o]})`},e.createElement("g",{transform:`translate(${zt({t:r.type,o:o,w:i})},${Ct({t:r.type,o:o,w:i})})`},s),a)}function Wt(t){const{className:n,translation:o,position:r,rotation:i,labelName:s,anchorMod:a}=t;return e.createElement("g",{className:"axis-title "+n,transform:`translate(${[o[0]+r[0],o[1]+r[1]]}) rotate(${i})`},e.isValidElement(s)?s:e.createElement("text",{textAnchor:a},s))}function Ft(t){if(null==t)return"";if("number"!=typeof t)return t+"";if(!isFinite(t))return t+"";if(0===t)return"0";const e=parseFloat(t.toPrecision(12)),n=Math.abs(e);return 1e9>n?1e6>n?1e4>n?Number.isInteger(e)?e+"":parseFloat(e.toPrecision(6))+"":parseFloat((e/1e3).toPrecision(3))+"K":parseFloat((e/1e6).toPrecision(3))+"M":parseFloat((e/1e9).toPrecision(3))+"B"}function Lt(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&0>e.indexOf(o)&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);o.length>r;r++)0>e.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]])}return n}"function"==typeof SuppressedError&&SuppressedError;function Yt(e){const{rotate:n,label:o,dynamicLabelPosition:s,orient:l="left",marginalSummaryType:c,tickFormat:h=(c?()=>"":Ft),size:u,width:d=u&&u[0]||0,height:f=u&&u[1]||0,className:p,padding:y,tickValues:m,scale:g,ticks:x,footer:b,tickSize:v,tickLineGenerator:k,baseline:E=!0,margin:w={top:0,bottom:0,left:0,right:0},center:M=!1,annotationFunction:A,glyphFunction:S,xyPoints:$}=e,[P,N]=i(0),[_,O]=i(void 0),D=r(null);a(()=>{if(!(null==o?void 0:o.position)&&s){const t=((t,e)=>{const n=t.current;if(!n)return 30;const o="left"===e||"right"===e?"width":"height";return Math.max(...[...n.querySelectorAll(".axis-label")].map(t=>t.getBBox&&t.getBBox()||{height:30,width:30}).map(t=>t[o]))+25})(D,l);t!==_&&O(t)}},[o,s]);let j,{axisParts:T,position:z=[0,0]}=e;if(T||(T=function({renderMode:t=()=>{},padding:e=5,scale:n,ticks:o,tickValues:r=Tt(void 0,o,n),orient:i="left",size:s,footer:a=!1,tickSize:l=(a?-10:["top","bottom"].find(t=>t===i)?s?s[1]:0:s?s[0]:0),jaggedBase:c}){let h,u,d,f,p,y,m=[],g=0,x=0,b="middle";switch(i){case"top":h="x1",u="x2",d="y1",f="y2",m=[0,l],p="tx",y="ty",g-=20-e;break;case"bottom":h="x1",u="x2",d="y2",f="y1",m=s?[s[1],s[1]-l]:[0,-l],p="tx",y="ty",g+=20+e;break;case"right":h="y2",u="y1",d="x2",f="x1",m=s?[s[0],s[0]-l]:[0,-l],p="ty",y="tx",g+=5+e,x+=5,b="start";break;default:h="y1",u="y2",d="x1",f="x2",m=[0,l],p="ty",y="tx",g-=5+e,x+=5,b="end"}let v=r instanceof Function?r({orient:i}):r;return c&&void 0===v.find(t=>t===n.domain()[0])&&(v=[n.domain()[0],...v]),v.map((e,o)=>{const r=n(e);return{[h]:r,[u]:r,[d]:m[0],[f]:m[1],[p]:r+x,[y]:m[0]+g,defaultAnchor:b,renderMode:t(e,o),value:e}})}({padding:y,tickValues:m,scale:g,ticks:x,orient:l,size:[d,f],footer:b,tickSize:v}),j=t.createElement("g",{className:"axis "+p},(({axisParts:e,orient:n,tickLineGenerator:o=jt,className:r,jaggedBase:i,scale:s,showOutboundTickLines:a=!1})=>{const l=e.map((t,e)=>o({xy:t,orient:n,i:e,className:r,jaggedBase:i,scale:s})),c=a?e.map((e,o)=>(({xy:e,orient:n,i:o,className:r=""})=>{let i=`M-4,${e.y1}L${e.x1},${e.y2}`;return"left"===n?i=`M${e.x1-8},${e.y1}L${e.x1},${e.y2}`:"right"===n?i=`M${e.x2},${e.y1}L${e.x2+8},${e.y2}`:"top"===n?i=`M${e.x1},${e.y1-8}L${e.x1},${e.y1}`:"bottom"===n&&(i=`M${e.x1},${e.y2}L${e.x1},${e.y2+8}`),t.createElement("path",{key:o,fill:"none",stroke:"currentColor",strokeWidth:"1px",d:i,className:`outbound-tick-line tick ${n} ${r}`})})({xy:e,orient:n,i:o,className:r})):[];return[...l,c]})({axisParts:T,orient:l,tickLineGenerator:k,className:p,scale:g}))),0===T.length)return null;let C,B,W,F,L=50,Y=f,I=-50,X=0,R=0,H=0,V=0,G=f,q=25,J=-25,K=18,Z=d+25,U=0,Q=P,tt=0,et="y";switch(l){case"right":z=[z[0],z[1]],I=d,V=R=d,tt=w.top,Z=-d-25,J=5,C=t=>{N(t.nativeEvent.offsetY-tt)},!0===M&&(V=R=d/2);break;case"top":z=[z[0],0],L=d,Y=50,X=-50,I=0,tt=w.left,et="x",V=d,G=0,!0===M&&(G=H=f/2),C=t=>{N(t.nativeEvent.offsetX-tt)},q=P,Q=25,J=0,K=-10,Z=0,U=f+25;break;case"bottom":z=[z[0],0],L=d,Y=50,H=G=X=f,R=I=0,V=d,tt=w.left,C=t=>{N(t.nativeEvent.offsetX-tt)},q=P,Q=25,J=0,K=15,Z=0,U=-f-25,et="x",!0===M&&(G=H=f/2);break;default:z=[z[0],z[1]],tt=w.top,!0===M&&(V=R=d/2),C=t=>{N(t.nativeEvent.offsetY-tt)}}if(A){const n=function(t,e){return e.tickFormat?e.tickFormat(t):t.toString?""+t:t}(g.invert(P),e),o=S?S({lineHeight:U,lineWidth:Z,value:g.invert(P)}):t.createElement("g",null,t.isValidElement(n)?t.createElement("g",{transform:`translate(${J},${K})`},n):t.createElement("text",{x:J,y:K},n),t.createElement("circle",{r:5}),t.createElement("line",{x1:Z,y1:U,style:{stroke:"black"}})),r=P?t.createElement("g",{style:{pointerEvents:"none"},transform:`translate(${q},${Q})`},o):null;B=t.createElement("g",{className:"annotation-brush",transform:`translate(${I},${X})`},t.createElement("rect",{style:{fillOpacity:0},height:Y,width:L,onMouseMove:C,onClick:t=>A({className:"dynamic-axis-annotation",type:et,value:g.invert(P),e:t}),onMouseOut:()=>{N(void 0)}}),r)}if(c&&$){const e=Math.max(w[l]-6,5),n="string"==typeof c?{type:c}:c;void 0!==n.flip||"bottom"!==l&&"right"!==l||(n.flip=!0);const o=n.summaryStyle?()=>n.summaryStyle:()=>({fill:"black",fillOpacity:.5,stroke:"black",strokeDasharray:"0"}),r=n.renderMode?()=>n.renderMode:()=>{},i=n.summaryClass?()=>n.summaryClass:()=>"",s=n.filter||(()=>!0),a=$.filter(t=>void 0!==t.x&&void 0!==t.y&&s(t.data)).map(t=>Object.assign(Object.assign({},t),{xy:{x:"top"===l||"bottom"===l?g(t.x):0,y:"left"===l||"right"===l?g(t.y):0},piece:{scaledVerticalValue:g(t.y),scaledValue:g(t.x)},value:g("top"===l||"bottom"===l?t.y:t.x),scaledValue:g(t.x),scaledVerticalValue:g(t.y)})),h=function(e){const n=[];for(const o of e){const e=[],{elements:r,containerProps:i}=o;if(o.Mark)n.push(o.Mark);else{for(let n=0;r.length>n;n++){const o=r[n],{markType:i,style:s={}}=o,a=Lt(o,["markType","style"]),l=Object.assign({},a);void 0!==s.fill&&(l.fill=s.fill),void 0!==s.stroke&&(l.stroke=s.stroke),void 0!==s.strokeWidth&&(l.strokeWidth=s.strokeWidth),void 0!==s.opacity&&(l.opacity=s.opacity),void 0!==s.fillOpacity&&(l.fillOpacity=s.fillOpacity),void 0!==s.strokeOpacity&&(l.strokeOpacity=s.strokeOpacity);const c=Object.assign({},s);delete c.fill,delete c.stroke,delete c.strokeWidth,delete c.opacity,delete c.fillOpacity,delete c.strokeOpacity,Object.keys(c).length>0&&(l.style=c),l.key=o.key||n,i&&e.push(t.createElement(i,l))}i?n.push(t.createElement("g",Object.assign({},i),e)):n.push(...e)}}return n}((({data:t,type:e,renderMode:n,eventListenersGenerator:o,styleFn:r,classFn:i,projection:s,adjustedSize:a,margin:l,axisCreator:c})=>{if(e&&e.type)return function({data:t,type:e,renderMode:n,eventListenersGenerator:o,styleFn:r,classFn:i,projection:s,adjustedSize:a,chartSize:l,margin:c,axisCreator:h}){return"function"==typeof e.type?e.type({data:t,type:e,renderMode:n,eventListenersGenerator:o,styleFn:r,classFn:i,projection:s,adjustedSize:a,chartSize:l,margin:c,axisCreator:h}):(console.error(`Invalid summary type: ${e.type} - Must be a function`),{})}({data:t,type:e="string"==typeof e?{type:e}:e,renderMode:n,eventListenersGenerator:o,styleFn:r,classFn:i,projection:s,adjustedSize:a,chartSize:"vertical"===s?a[1]:a[0],margin:l,axisCreator:c})})({data:{column:{middle:e/2,pieceData:a,width:e,xyData:a}},type:n,renderMode:r,eventListenersGenerator:n.eventListenersGenerator||(()=>({})),styleFn:o,classFn:i,projection:"top"===l||"bottom"===l?"horizontal":"vertical",adjustedSize:u,margin:{top:0,bottom:0,left:0,right:0}}).marks);let d;if(!0===n.showPoints){const o=((t,e,n)=>{const o="left"===t||"right"===t?e/2:0,r="bottom"===t||"top"===t?e/2:0;return n.map(t=>[t.xy.x+o,t.xy.y+r])})(l,e,a);d=o.map((e,o)=>t.createElement("circle",{key:"axis-summary-point-"+o,cx:e[0],cy:e[1],r:n.r||3,style:n.pointStyle||{fill:"black",fillOpacity:.1}}))}W=t.createElement(Bt,{translation:{left:[2-w.left,0],right:[u[0]+2,0],top:[0,2-w.top],bottom:[0,u[1]+2]},orient:l,decoratedSummaryType:n,summaryWidth:e,renderedSummary:h,points:d})}const nt=(({axisParts:e,tickFormat:n,rotate:o=0,center:r=!1,orient:i})=>{const s=e.map((t,e)=>({axisPart:t,i:e,formatted:n(t.value,e)})),a="left"===i||"right"===i;let l=s;if(!o&&s.length>1){const t=8,e=14,n=8,o=t=>"string"==typeof t?t:"number"==typeof t?t+"":null;if("top"===i||"bottom"===i){const e=[...s].sort((t,e)=>t.axisPart.tx-e.axisPart.tx);let r=-1/0;const i=new Set;for(const s of e){const e=o(s.formatted);if(!e){i.add(s.i);continue}const a=e.length*t/2;r+n>s.axisPart.tx-a||(i.add(s.i),r=s.axisPart.tx+a)}l=s.filter(t=>i.has(t.i))}else if(a){const t=[...s].sort((t,e)=>t.axisPart.ty-e.axisPart.ty);let o=-1/0;const r=new Set;for(const i of t)o+e+n>i.axisPart.ty||(r.add(i.i),o=i.axisPart.ty);l=s.filter(t=>r.has(t.i))}}return l.map(({axisPart:e,i:n,formatted:s})=>{("object"!=typeof s||s instanceof Date)&&(s=t.createElement("text",{textAnchor:e.defaultAnchor,className:"axis-label"},s.toString?""+s:s));let a=e.tx,l=e.ty;if(r)switch(i){case"right":a-=(e.x2-e.x1)/2;break;case"left":a+=(e.x2-e.x1)/2;break;case"top":l+=(e.y2-e.y1)/2;break;case"bottom":l-=(e.y2-e.y1)/2}return t.createElement("g",{key:n,pointerEvents:"none",transform:`translate(${a},${l}) rotate(${o})`,className:"axis-label"},s)})})({tickFormat:h,axisParts:T,orient:l,rotate:n,center:M});if(o){const e=o.name||o,n=o.position||{};let r=n.anchor||"middle";const i=o.locationDistance||_,s=n.rotation||{left:-90,right:90,top:0,bottom:0}[l],a={left:{start:[0,u[1]],middle:[0,u[1]/2],end:[0,0],inside:[i||15,0],outside:[-(i||45),0]},right:{start:[u[0]+0,u[1]],middle:[u[0]+0,u[1]/2],end:[u[0]+0,0],inside:[-(i||15),0],outside:[i||45,0]},top:{start:[0,0],middle:[0+u[0]/2,0],end:[0+u[0],0],inside:[0,i||15],outside:[0,-(i||40)]},bottom:{start:[0,u[1]],middle:[0+u[0]/2,u[1]],end:[0+u[0],u[1]],inside:[0,-(i||5)],outside:[0,i||50]}},c=a[l][r],h=a[l][n.location||"outside"];c[0]=c[0]+h[0],c[1]=c[1]+h[1],"start"===r&&"right"===l?r="end":"end"===r&&"right"===l&&(r="start"),F=t.createElement(Wt,{className:p,translation:c,position:z,rotation:s,labelName:e,anchorMod:r})}const ot=`${l} axis ${T&&T.length>0&&`from ${h(T[0].value,0)} to ${h(T[T.length-1].value,T.length-1)}`||"without ticks"}`;return t.createElement("g",{className:p,"aria-label":ot,ref:D},B,nt,j,!0===E?t.createElement("line",{key:"baseline",className:"axis-baseline "+p,stroke:"black",strokeLinecap:"square",x1:R,x2:V,y1:H,y2:G}):null,F,W)}function It(t,e=120,n=8){if(!t)return[];const o=Math.max(1,Math.floor(e/n)),r=t.split(/\s+/),i=[];let s="";for(const t of r)s&&s.length+1+t.length>o?(i.push(s),s=t):s=s?`${s} ${t}`:t;return s&&i.push(s),i}function Xt(t,e,n,o){return"curly"===t?o?`M0,0 C${.6*n},0 ${.4*n},${e/2} ${n},${e/2} C${.4*n},${e/2} ${.6*n},${e} 0,${e}`:`M0,0 C0,${.6*n} ${e/2},${.4*n} ${e/2},${n} C${e/2},${.4*n} ${e},${.6*n} ${e},0`:o?`M0,0 L${n},0 L${n},${e} L0,${e}`:`M0,0 L0,${n} L${e},${n} L${e},0`}function Rt(e){const{x:n=0,y:o=0,dx:r,dy:i,nx:s,ny:a,note:l,connector:c,subject:h,type:u,color:d,className:f,disable:p,events:y={},"data-testid":m}=e,g=new Set(Array.isArray(p)?p:[]);let x=r||0,b=i||0;null!=s&&(x=s-n),null!=a&&(b=a-o);const v="string"==typeof u?u:"label";if("bracket"===v&&h&&0===x&&0===b)if(void 0!==h.width){x=h.width/2;const t=h.depth||30;b=t+(0>t?-5:5)}else if(void 0!==h.height){const t=h.depth||30;x=t+(0>t?-5:5),b=h.height/2}return t.createElement("g",Object.assign({className:("annotation "+(f||"")).trim(),transform:`translate(${n},${o})`,"data-testid":m},y),!g.has("connector")&&function(e,n,o,r,i,s){const a=[];let l=0,c=0;if("callout-circle"!==i&&"label"!==i||!(null==s?void 0:s.radius)){if("callout-rect"===i&&s){const t=s.width||0,o=s.height||0;if(t>0||o>0){const r=t/2,i=o/2,s=e-r,a=n-i;if(0!==s||0!==a){const e=Math.abs(s),n=Math.abs(a),h=t/2,u=o/2,d=e*u>n*h?h/e:u/n;l=r+s*d,c=i+a*d}}}else if("bracket"===i&&s){const t=s.width,e=s.height,n=s.depth||30;void 0!==t?(l=t/2,c=n):void 0!==e&&(l=n,c=e/2)}}else{const t=(s.radius||0)+(s.radiusPadding||0);if(t>0&&(0!==e||0!==n)){const o=Math.atan2(n,e);l=Math.cos(o)*t,c=Math.sin(o)*t}}if(Math.sqrt(Math.pow(e-l,2)+Math.pow(n-c,2))>.5&&(a.push(t.createElement("line",{key:"connector-line",x1:l,y1:c,x2:e,y2:n,stroke:r||"currentColor"})),"arrow"===(null==o?void 0:o.end))){const o=10,i=16/180*Math.PI,s=Math.atan2(n-c,e-l);a.push(t.createElement("path",{key:"connector-arrow",d:`M${l},${c}L${l+o*Math.cos(s+i)},${c+o*Math.sin(s+i)}L${l+o*Math.cos(s-i)},${c+o*Math.sin(s-i)}Z`,fill:r||"currentColor",stroke:"none"}))}return t.createElement("g",{className:"annotation-connector"},a)}(x,b,c,d,v,h),!g.has("subject")&&function(e,n,o,r,i){var s;const a=[];switch(e){case"callout-circle":{const e=((null==n?void 0:n.radius)||0)+((null==n?void 0:n.radiusPadding)||0);e>0&&a.push(t.createElement("circle",{key:"subject-circle",r:e,fill:"none",stroke:o||"currentColor"}));break}case"callout-rect":{const e=(null==n?void 0:n.width)||0,r=(null==n?void 0:n.height)||0;(e>0||r>0)&&a.push(t.createElement("rect",{key:"subject-rect",width:e,height:r,fill:"none",stroke:o||"currentColor"}));break}case"callout-custom":(null==n?void 0:n.custom)&&a.push(...Array.isArray(n.custom)?n.custom:[n.custom]);break;case"xy-threshold":{const e=r||0,s=i||0;if(void 0!==(null==n?void 0:n.x)){const r=(n.x||0)-e;a.push(t.createElement("line",{key:"threshold-line",x1:r,y1:(n.y1||0)-s,x2:r,y2:(n.y2||0)-s,stroke:o||"currentColor",strokeDasharray:"5,5"}))}else if(void 0!==(null==n?void 0:n.y)){const r=(n.y||0)-s;a.push(t.createElement("line",{key:"threshold-line",x1:(n.x1||0)-e,y1:r,x2:(n.x2||0)-e,y2:r,stroke:o||"currentColor",strokeDasharray:"5,5"}))}else void 0!==(null==n?void 0:n.x1)||void 0!==(null==n?void 0:n.x2)?a.push(t.createElement("line",{key:"threshold-line",x1:(n.x1||0)-e,y1:0,x2:(n.x2||0)-e,y2:0,stroke:o||"currentColor",strokeDasharray:"5,5"})):void 0===(null==n?void 0:n.y1)&&void 0===(null==n?void 0:n.y2)||a.push(t.createElement("line",{key:"threshold-line",x1:0,y1:(n.y1||0)-s,x2:0,y2:(n.y2||0)-s,stroke:o||"currentColor",strokeDasharray:"5,5"}));break}case"bracket":{const e=null!==(s=null==n?void 0:n.width)&&void 0!==s?s:null==n?void 0:n.height;void 0!==e&&a.push(t.createElement("path",{key:"bracket-path",d:Xt((null==n?void 0:n.type)||"curly",e,(null==n?void 0:n.depth)||30,void 0===(null==n?void 0:n.width)),fill:"none",stroke:o||"currentColor"}));break}}return t.createElement("g",{className:"annotation-subject"},a)}(v,h,d,n,o),!g.has("note")&&function(e,n,o,r){if(!e)return t.createElement("g",{className:"annotation-note"});const{label:i,title:s,orientation:a,align:l,wrap:c=120,noWrap:h}=e;if(!i&&!s)return t.createElement("g",{className:"annotation-note"});let u=a;u||(u=Math.abs(n)>Math.abs(o)?"leftRight":"topBottom");let d=l;d&&"dynamic"!==d||(d="topBottom"===u?0>n?"right":"left":0>o?"bottom":"top");let f="start";"topBottom"===u?"right"===d?f="end":"middle"===d&&(f="middle"):f=0>n?"end":"start";const p=16,y=s?h?[s]:It(s,c):[],m=i?h?[i]:It(i,c):[],g="leftRight"===u?"end"===f?-4:4:0;let x=0;const b=[];y.length>0&&(b.push(t.createElement("text",{key:"annotation-note-title",className:"annotation-note-title",fill:r||void 0,textAnchor:f,fontWeight:"bold"},y.map((e,n)=>t.createElement("tspan",{key:n,x:g,dy:0===n?0:p},e)))),x=y.length*p),m.length>0&&b.push(t.createElement("text",{key:"annotation-note-label",className:"annotation-note-label",fill:r||void 0,textAnchor:f,y:x},m.map((e,n)=>t.createElement("tspan",{key:n,x:g,dy:p},e))));let v=null;if((s||i)&&(0!==n||0!==o))if("topBottom"===u){const e=Math.min(c,120);let n=0,o=e;"end"===f?(n=-e,o=0):"middle"===f&&(n=-e/2,o=e/2),v=t.createElement("line",{className:"note-line",x1:n,x2:o,y1:0,y2:0,stroke:r||"currentColor"})}else{const e=(y.length+m.length)*p+(m.length>0?p:0);let n=0,o=e;"bottom"===d?(n=-e,o=0):"middle"===d&&(n=-e/2,o=e/2),v=t.createElement("line",{className:"note-line",x1:0,x2:0,y1:n,y2:o,stroke:r||"currentColor"})}const k=(y.length+m.length)*p+(m.length>0?p:0);let E=0;return"topBottom"===u?0>o&&(E=-k):"leftRight"===u&&("middle"===d?E=-k/2:("bottom"===d||0>o)&&(E=-k)),t.createElement("g",{className:"annotation-note",transform:`translate(${n},${o})`},t.createElement("g",{className:"annotation-note-content",transform:0!==E?`translate(0,${E})`:void 0},b),v)}(l,x,b,d))}function Ht(e){const{noteData:n}=e,{screenCoordinates:o}=n,r="string"==typeof n.type?n.type:"label",i=n.eventListeners||n.events||{};if(n.coordinates&&o){const e=n.nx||o[0][0]+n.dx,i=n.ny||o[0][1]+n.dy,s=o.map((o,s)=>{const a=Object.assign({},n,{note:0===s?n.note:{label:""},x:o[0],y:o[1],nx:e,ny:i});return t.createElement(Rt,Object.assign({"data-testid":"semiotic-annotation",key:"multi-annotation-"+s},a,{type:r}))});return t.createElement("g",null,s)}const s=n.note||{title:"none",label:n.label};return t.createElement(Rt,Object.assign({"data-testid":"semiotic-annotation",key:`${s.label}-${s.title}-${n.i}`,events:i},n,{type:r}))}const Vt=(t,e,n,o)=>{const r=(t.note.label||t.note.title).length;return[Math.min(t.note.wrap||120,r*e)+2*o,Math.ceil(r*e/120)*n+2*o]};function Gt(t){let e=new EventTarget,n=t(function(t){n=Object.assign(n,t(n)),e.dispatchEvent(new CustomEvent("update"))});return{getState:()=>n,subscribe:function(t){return e.addEventListener("update",t),()=>e.removeEventListener("update",t)}}}let[qt,Jt]=function(e){let o=c(null),r=Gt(e);return[function({children:r}){let i=n(()=>Gt(e),[]);return t.createElement(o.Provider,{value:i,children:r})},t=>{var e;let n=null!==(e=h(o))&&void 0!==e?e:r;return function(t,e){const[n,o]=i(e);return u(()=>t(()=>o(e)),[t]),n}(n.subscribe,()=>t(n.getState()))}]}(t=>({tooltip:null,changeTooltip(e){t(()=>({tooltip:e}))}}));function Kt(t,e,n){return"number"==typeof n?n:e&&e.find(e=>e.props.orient===t)?50:10}const Zt=(t,e,n)=>`${t.map(Ut).join(",")}${JSON.stringify(e)}${n.join(",")}`;function Ut(t){if(!t||!t.props||!t.props.noteData)return"";const{note:e={}}=t.props.noteData,{label:n,title:o}=e;return`${t.props.noteData.id||`${t.props.noteData.x}-${t.props.noteData.y}`}-${n}=${o}`}function Qt(t,n=8,o){const{noteWidth:r=o}=t;let i=r;"number"==typeof r&&(i=()=>r);const s=t.note&&t.note.wrap||120,a=t.note.label||t.note.label||"";return r&&i(t)||(e.isValidElement(t.note)?100:Math.min(s,a.length*n))}function te(t,n=8,o=20,r){const{noteHeight:i=r}=t;let s=i;"number"==typeof i&&(s=()=>i);const a=t.note&&t.note.wrap||120,l=t.note.label||t.note.title||"";return i&&s(t)||(e.isValidElement(t.note)?30:Math.ceil(l.length*n/a)*o+(t.note.label&&t.note.title?o:0))}const ee=(t,e)=>e.map((e,n)=>t.svgAnnotationRule(e,n,t)).filter(t=>null!=t),ne=(e,n)=>{let o=n.adjustedAnnotations,r=n.adjustedAnnotationsKey,i=n.adjustableAnnotations,s=n.fixedAnnotations,a=[],l=[];const c=n.adjustedAnnotationsKey,h=n.adjustedAnnotationsDataVersion,{annotations:u,annotationHandling:d=!1,size:f,svgAnnotationRule:p,htmlAnnotationRule:y}=e,m="object"==typeof d?d:{layout:{type:d},dataVersion:""},{dataVersion:g=""}=m;if(p){const n=ee(e,u);r=Zt(n,m,f),!1===d&&(o=i),o=o.length!==i.length||c!==r||h!==g?((e,n,o)=>{const{layout:r={type:!1,noteHeight:void 0,noteWidth:void 0}}=n;if(!1===r.type)return e;const{noteWidth:i,noteHeight:s}=r;let{margin:a={top:0,bottom:0,left:0,right:0}}=o;const{size:l,axes:c=[]}=o;if(a="number"==typeof a?{top:a,left:a,right:a,bottom:a}:a,"bump"===r.type)return function(t,e,n,o,r){const{padding:i=1,characterWidth:s=8,lineHeight:a=20,iterations:l=500,pointSizeFunction:c=o,labelSizeFunction:h=r||Vt}=e,u=t.map((t,e)=>{const n=(t.props.noteData.x[0]||t.props.noteData.x)+(void 0!==t.props.noteData.dx?t.props.noteData.dx:-10*(e%3-1)),o=(t.props.noteData.y[0]||t.props.noteData.y)+(void 0!==t.props.noteData.dy?t.props.noteData.dy:10*(e%3-1)),[r,l]=h(t.props.noteData,s,a,i);return{x:n,y:o,above:t.props.noteData.y>o,left:t.props.noteData.x>n,width:r,height:l,type:"label",name:"",originalNote:t}}),d=t.map(t=>({x:t.props.noteData.x,y:t.props.noteData.y,fx:t.props.noteData.x,fy:t.props.noteData.y,r:c&&c(t.props.noteData)||5,type:"point",originalNote:t})),f=function(){let t,e=[],n=[],o=1,r=1,i={start:t=>{},width:t=>{},height:t=>{},label:t=>{},anchor:t=>{},alt_energy:t=>{},alt_schedule:t=>{}},s=!1;const a=function(t){let o=e.length,r=0,i=e[t].x-n[t].x,s=n[t].y-e[t].y,a=Math.sqrt(i*i+s*s);a>0&&(r+=.2*a),i/=a,s/=a,r+=i>0&&s>0?0:0>i&&s>0?3:0>i&&0>s?6:9;let l,c,u,d,f,p,y,m=e[t].x,g=e[t].y-e[t].height+2,x=e[t].x+e[t].width,b=e[t].y+2;for(let i=0;o>i;i++)i!==t&&(h(n[t].x,e[t].x,n[i].x,e[i].x,n[t].y,e[t].y,n[i].y,e[i].y)&&(r+=1),l=e[i].x,u=e[i].y-e[i].height+2,c=e[i].x+e[i].width,d=e[i].y+2,f=Math.max(0,Math.min(c,x)-Math.max(l,m)),p=Math.max(0,Math.min(d,b)-Math.max(u,g)),y=f*p,r+=30*y),l=n[i].x-n[i].r,u=n[i].y-n[i].r,c=n[i].x+n[i].r,d=n[i].y+n[i].r,f=Math.max(0,Math.min(c,x)-Math.max(l,m)),p=Math.max(0,Math.min(d,b)-Math.max(u,g)),y=f*p,r+=30*y;return r},l=function(i){let l,c,h=Math.floor(Math.random()*e.length),u=e[h].x,d=e[h].y;l=s?t(h,e,n):a(h),e[h].x+=5*(Math.random()-.5),e[h].y+=5*(Math.random()-.5),e[h].x>o&&(e[h].x=u),0>e[h].x&&(e[h].x=u),e[h].y>r&&(e[h].y=d),0>e[h].y&&(e[h].y=d),c=s?t(h,e,n):a(h);let f=c-l;Math.random()<Math.exp(-f/i)||(e[h].x=u,e[h].y=d)},c=function(i){let l,c=Math.floor(Math.random()*e.length),h=e[c].x,u=e[c].y;l=s?t(c,e,n):a(c);let d=.5*(Math.random()-.5),f=Math.sin(d),p=Math.cos(d);e[c].x-=n[c].x,e[c].y-=n[c].y;let y,m=e[c].x*f+e[c].y*p;e[c].x=e[c].x*p-e[c].y*f+n[c].x,e[c].y=m+n[c].y,e[c].x>o&&(e[c].x=h),0>e[c].x&&(e[c].x=h),e[c].y>r&&(e[c].y=u),0>e[c].y&&(e[c].y=u),y=s?t(c,e,n):a(c);let g=y-l;Math.random()<Math.exp(-g/i)||(e[c].x=h,e[c].y=u)},h=function(t,e,n,o,r,i,s,a){let l,c,h,u,d;return h=(a-s)*(e-t)-(o-n)*(i-r),u=(o-n)*(r-s)-(a-s)*(t-n),d=(e-t)*(r-s)-(i-r)*(t-n),l=u/h,c=d/h,!(0>l||l>1||0>c||c>1)},u=function(t,e,n){return t-e/n};return i.start=function(t){let n=e.length,o=1;for(let e=0;t>e;e++){for(let t=0;n>t;t++).5>Math.random()?l(o):c(o);o=u(o,1,t)}},i.width=function(t){return arguments.length?(o=t,i):o},i.height=function(t){return arguments.length?(r=t,i):r},i.label=function(t){return arguments.length?(e=t,i):e},i.anchor=function(t){return arguments.length?(n=t,i):n},i.alt_energy=function(e){return arguments.length?(t=e,s=!0,i):a},i.alt_schedule=function(t){return arguments.length?i:u},i}();return f.label(u),f.anchor(d),f.width(n[0]),f.height(n[1]),f.start(l),u.forEach(t=>{if("label"===t.type){const e=function(t,e,n){return t.y>e.y?[e.x+e.width/2+n/2,e.y-e.height+n/2]:[e.x+e.width/2,e.y]}(t.originalNote.props.noteData,t,i);t.originalNote.props.noteData.nx=e[0],t.originalNote.props.noteData.ny=e[1]}}),t}(e,r,l,o.pointSizeFunction,o.labelSizeFunction);if("marginalia"===r.type){const{marginOffset:n,orient:o="nearest",characterWidth:h=8,lineHeight:u=20,padding:d=2,axisMarginOverride:f={}}=r,p="nearest"===o?["left","right","top","bottom"]:Array.isArray(o)?o:[o],y=p.find(t=>"left"===t),m=p.find(t=>"right"===t),g=p.find(t=>"top"===t),x=p.find(t=>"bottom"===t),b=[],v=[],k=[],E=[];for(const t of e){const e=t.props.noteData,n=e.x[0]||e.x,o=e.y[0]||e.y,r=y?n:1/0,i=m?l[0]-n:1/0,s=g?o:1/0,a=Math.min(r,i,s,x?l[1]-o:1/0);r===a?b.push(t):i===a?v.push(t):s===a?k.push(t):E.push(t)}const w=new _.Force({minPos:void 0!==f.top?0+f.top:0-a.top,maxPos:void 0!==f.bottom?l[1]-f.bottom:x?l[1]:l[1]+a.bottom}).nodes(b.map(t=>new _.Node(t.props.noteData.y[0]||t.props.noteData.y,te(t.props.noteData,h,u,i)+d))).compute(),M=new _.Force({minPos:void 0!==f.top?0+f.top:g?0:0-a.top,maxPos:void 0!==f.bottom?l[1]-f.bottom:l[1]+a.bottom}).nodes(v.map(t=>new _.Node(t.props.noteData.y[0]||t.props.noteData.y,te(t.props.noteData,h,u,i)+d))).compute(),A=new _.Force({minPos:void 0!==f.left?0+f.left:y?0:0-a.left,maxPos:void 0!==f.right?l[0]-f.right:l[0]+a.right}).nodes(k.map(t=>new _.Node(t.props.noteData.x[0]||t.props.noteData.x,Qt(t.props.noteData,h,s)+d))).compute(),S=new _.Force({minPos:void 0!==f.left?0+f.left:0-a.left,maxPos:void 0!==f.right?l[0]-f.right:m?l[0]:l[0]+a.right}).nodes(E.map(t=>new _.Node(t.props.noteData.x[0]||t.props.noteData.x,Qt(t.props.noteData,h,s)+d))).compute(),$=Math.max(...E.map(t=>te(t.props.noteData,h,u,i)+d)),P=Math.max(...k.map(t=>te(t.props.noteData,h,u,i)+d)),N=Math.max(...b.map(t=>Qt(t.props.noteData,h,s)+d)),O=Math.max(...v.map(t=>Qt(t.props.noteData,h,s)+d)),D=w.nodes(),j=M.nodes(),T=A.nodes(),z=S.nodes();return b.forEach((e,o)=>{const r=0-D[o].layerIndex*N-Kt("left",c,n),i=D[o].currentPos;e.props.noteData.nx=r,e.props.noteData.ny=i,e.props.noteData.note&&!t.isValidElement(e)&&(e.props.noteData.note.orientation=e.props.noteData.note.orientation||"leftRight",e.props.noteData.note.align=e.props.noteData.note.align||"right")}),v.forEach((e,o)=>{const r=l[0]+j[o].layerIndex*O+Kt("right",c,n),i=j[o].currentPos;e.props.noteData.nx=r,e.props.noteData.ny=i,e.props.noteData.note&&!t.isValidElement(e)&&(e.props.noteData.note.orientation=e.props.noteData.note.orientation||"leftRight",e.props.noteData.note.align=e.props.noteData.note.align||"left")}),k.forEach((t,e)=>{const o=T[e].currentPos,r=0-T[e].layerIndex*P-Kt("top",c,n);t.props.noteData.nx=o,t.props.noteData.ny=r}),E.forEach((t,e)=>{const o=z[e].currentPos,r=l[1]+z[e].layerIndex*$+Kt("bottom",c,n);t.props.noteData.nx=o,t.props.noteData.ny=r}),e}return e})(i,m,e):i.map((e,n)=>{const r=Object.assign(Object.assign({},o[n].props.noteData),e.props.noteData);return t.createElement(Ht,{key:e.key,noteData:r})}),a=[...o,...s]}return y&&(l=((t,e)=>e.map((e,n)=>t.htmlAnnotationRule(e,n,t)).filter(t=>null!=t))(e,u)),{svgAnnotations:a,htmlAnnotations:l,adjustedAnnotations:o,adjustedAnnotationsKey:r,adjustedAnnotationsDataVersion:g}};function oe(e){const{legendSettings:n,margin:o,size:r,annotations:s,annotationHandling:l}=e,c=Jt(t=>t.tooltip);let h=null!=c?s.concat(c):s,u=Jt(t=>t.changeTooltip);const d=Object.assign(Object.assign({},e),{annotations:h,voronoiHover:t=>{u(t)}}),f="object"==typeof l?l:{layout:{type:l},dataVersion:""},{dataVersion:p=""}=f,[y,m]=i([]),[g,x]=i([]),[b,v]=i([]),[k,E]=i(""),[w,M]=i(p),A=ee(d,h),S=A.filter(t=>t.props&&t.props.noteData&&!t.props.noteData.fixedPosition),$=Zt(S,f,r);let P;if(a(()=>{const t=A.filter(t=>!t.props||!t.props.noteData||t.props.noteData.fixedPosition),e=ne(d,{adjustedAnnotations:y,adjustedAnnotationsKey:k,adjustedAnnotationsDataVersion:w,adjustableAnnotations:S,fixedAnnotations:t});m(e.adjustedAnnotations),E(e.adjustedAnnotationsKey),M(e.adjustedAnnotationsDataVersion),x(e.svgAnnotations),v(e.htmlAnnotations)},[$,p,h.length,h.map(t=>function(t){const e=new Set;return JSON.stringify(t,(t,n)=>e.has(n)?"...":"object"==typeof n?(e.add(n),"note"===t?`${n.label}-${n.title}`:"connector"===t?`${n.end}-${n.type}`:"subject"===t?""+n.radius:"object"==typeof n.column?`${n.column.x}-${n.column.y}-${n.column.name}`:n.voronoiX||n.voronoiY||n.x||n.y||n.dx||n.dy||n.label||n.type||n.key||n.hierarchicalID||n.id||n.name?`${n.voronoiX}-${n.voronoiY}-${n.dx}-${n.dy}-${n.x}-${n.y}-${n.label}-${n.type}-${n.key}-${n.hierarchicalID}-${n.id}-${n.name}`:"..."):n)}(t)).join("-")]),n){const e={left:[15,15],right:[r[0]+15,15]},{position:o="right",title:i="Legend"}=n;P=t.createElement("g",{transform:`translate(${e[o].join(",")})`},t.createElement(it,Object.assign({},n,{title:i,position:o})))}return 0!==h.length||n?t.createElement("div",{className:"annotation-layer",style:{position:"absolute",pointerEvents:"none",background:"none"}},t.createElement("svg",{className:"annotation-layer-svg",height:r[1],width:r[0],style:{background:"none",pointerEvents:"none",position:"absolute",left:o.left+"px",top:o.top+"px",overflow:"visible"}},t.createElement("g",null,P,g)),t.createElement("div",{className:"annotation-layer-html",style:{background:"none",pointerEvents:"none",position:"absolute",height:r[1]+"px",width:r[0]+"px",left:o.left+"px",top:o.top+"px"}},b)):null}const re=t=>t.reduce((t,e)=>t.concat(Array.isArray(e)?re(e.slice().sort((t,e)=>t-e)):e),[]);function ie(t=[]){if(!Array.isArray(t))return"not-array";let e=t.slice();return Array.isArray(e[0])||(e=e.slice().sort((t,e)=>t-e)),""+re(e).map(t=>t instanceof Date&&""+t||void 0!==t&&t.toFixed&&t.toFixed(2)||"empty")}function se(e){const{extent:n,selectedExtent:o}=e,i=r(null),s=ie(n),l=ie(o);a(()=>{(null==i?void 0:i.current)&&((t,e)=>{const{svgBrush:n,selectedExtent:o}=e;if(y(t).call(n),o){let e=o;if(Array.isArray(o[0])){const t=[e[0][1],e[1][1]].sort((t,e)=>t-e);e=[[e[0][0],t[0]],[e[1][0],t[1]]]}y(t).call(n.move,e)}})(i.current,e)},[s,l,i]);const{position:c=[0,0]}=e;return t.createElement("g",{transform:`translate(${c})`,ref:i,className:"xybrush"})}const ae=t=>t instanceof Date?t.getTime():t,le=({data:t,lineDataAccessor:e,xProp:n,xPropTop:o,xPropBottom:r,yProp:i,yPropTop:s,yPropBottom:a,xAccessor:l,yAccessor:c})=>{Array.isArray(t)||(t=[t]);const h=[];return e.forEach((e,u)=>{l.forEach((l,d)=>{c.forEach((c,f)=>{t.forEach(t=>{const p=Object.assign(Object.assign({},t),{xIndex:d,yIndex:f,lineIndex:u});p.data=e(t).map((t,e)=>{const h={data:t};return h[n]=l(t,e),h[o]=h[n],h[r]=h[n],h[i]=c(t,e),h[s]=h[i],h[a]=h[i],h}),p.key=p.key||h.length,h.push(p)})})})}),h},ce=({type:t="stackedarea",data:e,xProp:n,yProp:o,yPropMiddle:r,sort:i,yPropTop:s,yPropBottom:a})=>{const l=new Map,c=e.map(()=>0);let h=0;for(const t of e){t.__lineIndex=h;for(const e of t.data){const t=ae(e[n]);c[h]+=e[o],l.has(t)||l.set(t,[]),l.get(t)[h]=e}h++}let u=(t,e)=>c[e.key]-c[t.key];"stackedpercent-invert"!==t&&"stackedarea-invert"!==t||(u=(t,e)=>c[t.key]-c[e.key]),null!==(i=void 0===i?u:i)&&(e=e.sort(i));const d=e.map(t=>t.__lineIndex);for(const[,e]of l){let n=0,i=0;const l=b(e,t=>(null==t?void 0:t[o])>0?t[o]:0),c=b(e,t=>0>(null==t?void 0:t[o])?t[o]:0);for(const h of d){const u=e[h];if(u)if(0>u[o]){if("linepercent"===t||"stackedpercent"===t||"stackedpercent-invert"===t){const e=u[o]/c;if(u.percent=e,"linepercent"===t)u[a]=u[a]=u[s]=u[r]=e;else{const t=0>c?e:0;u[a]=0===c?0:-n/c,u[s]=u[a]-t,u[r]=u[a]-t/2}}else u[a]=n,u[s]=n+u[o],u[r]=n+u[o]/2;n+=u[o]}else{if("linepercent"===t||"stackedpercent"===t||"stackedpercent-invert"===t){const e=u[o]/l;if(u.percent=e,"linepercent"===t)u[a]=u[s]=u[r]=e;else{const t=l>0?e:0;u[a]=0===l?0:i/l,u[s]=u[a]+t,u[r]=u[a]+t/2}}else u[a]=i,u[s]=i+u[o],u[r]=i+u[o]/2;i+=u[o]}}}return e},he=({data:t,y1:e,x1:n,yPropTop:o,yPropMiddle:r,yPropBottom:i,xPropTop:s,xPropMiddle:a,xPropBottom:l})=>{if(e)for(const n of t)for(const t of n.data)t[i]=e(t),t[r]=t[o];if(n)for(const e of t)for(const t of e.data)t[l]=n(t),t[a]=(t[l]+t[s])/2;return t},ue=({data:t,y1:e,yPropTop:n,yPropMiddle:o,yPropBottom:r,type:i="cumulative"})=>{for(const s of t){let t=0;const a="cumulative-reverse"===i?s.data.reverse():s.data;for(const i of a)t+=i[n],i[r]=i[n]=i[o]=t,e&&(i[r]=e(i),i[o]=i[r]+i[n]/2)}return t},de=({type:t="bumpline",data:e,xProp:n,yProp:o,yPropMiddle:r,yPropTop:i,yPropBottom:s})=>{const a=new Map;for(const t of e)for(const e of t.data){const t=ae(e[n]);a.has(t)||a.set(t,[]),a.get(t).push(e)}let l=(t,e)=>t[o]>e[o]?1:-1;"bumparea-invert"!==t&&"bumpline-invert"!==t||(l=(t,e)=>e[o]>t[o]?1:-1);for(const[,e]of a){let n=0,a=0;e.sort(l);let c=1;for(const l of e)"bumparea"===t||"bumparea-invert"===t?0>l[o]?(l[i]=n+l[o],l[r]=n+l[o]/2,l[s]=n,n+=l[o]):(l[i]=a+l[o],l[r]=a+l[o]/2,l[s]=a,a+=l[o]):(l[o]=c,l[i]=c,l[s]=c),c++}return e};function fe({pointA:t,pointB:e,currentParameters:n,parameters:o,keys:r}){const i={};return r.forEach(n=>{i[n]="number"==typeof t[n]?(t[n]+e[n])/2:void 0}),JSON.stringify(o(i))===JSON.stringify(n)?[i,e]:[t,i]}function pe({data:t,steps:e,key:n}){const o=[];return Array.isArray(t)||(t=[t]),e||(e=t.map(t=>Object.keys(t)).reduce((t,e)=>t.concat(e),[])),t.forEach((t,r)=>{const i=n?t[n]:r;e.forEach(e=>{const n={funnelKey:i,stepName:"",stepValue:0};n.stepName=e,n.stepValue=t[e]?t[e]:0,o.push(n)})}),o}function ye(e){const n=(e=>{const{parameters:n,className:o,interpolate:r=D,customAccessors:i,lineDataAccessor:s,data:a,searchIterations:l}=e,c=Lt(e,["parameters","className","interpolate","customAccessors","lineDataAccessor","data","searchIterations"]),{x:h,y:u}=i,d=le({data:a,lineDataAccessor:[s],xProp:"x",yProp:"y",xAccessor:[h],yAccessor:[u]});for(const t of d)t.data=t.data.map(t=>Object.assign(Object.assign({},t.data),t));const f=((t,e,n=10)=>{let o=t(e[0],0),r=[];const i=[{key:o,points:r}];return e.forEach((e,s)=>{const a=t(e,s);let l=a===o;const c=JSON.stringify(a),h=JSON.stringify(o);if("object"==typeof o&&(l=c===h),l)r.push(e);else{let s=r[r.length-1],l=e,h=c,u=0;for(;n>u&&c===h;){const e=fe({pointA:s,pointB:l,currentParameters:o,parameters:t,keys:Object.keys(s)});s=e[0],l=e[1],h=JSON.stringify(t(l)),u++}r.push(l),r=[l,e],i.push({key:a,points:r}),o=a}}),i})(n,d[0].data,l),p=O().curve(r).x(t=>t.x).y(t=>t.y);return f.map((e,n)=>t.createElement("path",Object.assign({},c,{className:o,key:"DividedLine-"+n,style:e.key,d:p(e.points)})))})(e);return t.createElement("g",null,n)}const me="x",ge="y",xe="yMiddle",be="yTop",ve="yBottom",ke="xMiddle",Ee="xTop",we="xBottom";function Me({preprocess:e=!0,processedData:n=!1,summaryType:o,data:r,finalXExtent:i,finalYExtent:s,size:a,xScaleType:l=m(),yScaleType:c=m(),margin:h,styleFn:u,classFn:d,renderFn:f,chartSize:p}){let y=i,g=s;if(!y){const t=r.coordinates.map(t=>t.x);y=[Math.min(...t),Math.max(...t)]}if(!g){const t=r.coordinates.map(t=>t.y);g=[Math.min(...t),Math.max(...t)]}if(n&&r)return r.coordinates;let x,b=[];x=o.type?o:{type:x};const{bins:v=.05,cellPx:k,binValue:E=t=>t.length,binMax:w,customMark:M}=x;r.coordinates&&!r._xyfCoordinates&&(r._xyfCoordinates=r.coordinates.map(t=>[t.x,t.y]));const A=Array.isArray(r)?r:[r],S=l.domain(y).range([0,a[0]]),$=c.domain(g).range([0,a[1]]),P=k&&k/2||(v>1?1/v:v)*a[0]/2,N=C().x(t=>S(t._xyfPoint[0])).y(t=>$(t._xyfPoint[1])).radius(P).size(a);let _;const O=N.centers();return A.forEach(e=>{_=0;const n=N(e._xyfCoordinates.map((t,n)=>Object.assign({_xyfPoint:t},e.coordinates[n]))),o={};n.forEach(t=>{o[`${parseInt(t.x)}-${parseInt(t.y)}`]=!0}),O.forEach(t=>{if(!o[`${parseInt(t[0])}-${parseInt(t[1])}`]){const e=[];e.x=t[0],e.y=t[1],n.push(e)}}),_=Math.max(...n.map(t=>E(t))),w&&w(_);const r=[[0,-1],[.866,-.5],[.866,.5],[0,1],[-.866,.5],[-.866,-.5]],i=S.invert(P)-y[0],s=$.invert(P)-g[0],l=r.map(t=>[t[0]*i,t[1]*s]),c=n.map(n=>{const o=E(n),i=n.x,s=n.y;n.x=S.invert(n.x),n.y=$.invert(n.y);const c=o/_;return{customMark:M&&t.createElement("g",{transform:`translate(${i},${a[1]-s})`},M({d:Object.assign(Object.assign({},n),{binItems:n,percent:c,value:o,radius:P,hexCoordinates:r.map(t=>[t[0]*P,t[1]*P])}),margin:h,styleFn:u,classFn:d,renderFn:f,chartSize:p,adjustedSize:a})),_xyfCoordinates:l.map(t=>[t[0]+n.x,t[1]+n.y]),value:o,percent:c,data:n,parentSummary:e,centroid:!0}});b=[...b,...c]}),e?(b.forEach(t=>{t.x=t.data.x,t.y=t.data.y}),{type:"hexbin",processedData:!0,coordinates:b,binMax:_}):b}const Ae=(t,e,n,o)=>[...t.map((t,o)=>[t[0],t[1]+n(e[o])]),...t.map((t,n)=>[t[0],t[1]-o(e[n])]).reverse()];function Se({preprocess:e=!0,processedData:n=!1,summaryType:o,data:r,finalXExtent:i=[Math.min(...r.coordinates.map(t=>t.x)),Math.max(...r.coordinates.map(t=>t.x))],finalYExtent:s=[Math.min(...r.coordinates.map(t=>t.y)),Math.max(...r.coordinates.map(t=>t.y))],size:a,xScaleType:l=m(),yScaleType:c=m(),margin:h,styleFn:u,classFn:d,renderFn:f,chartSize:p}){if(n&&r)return r.coordinates;r.coordinates&&!r._xyfCoordinates&&(r._xyfCoordinates=r.coordinates.map(t=>[t.x,t.y]));const y=Array.isArray(r)?r:[r];let g,x=[];g=o.type?o:{type:g};const{binValue:b=t=>t.length,xBins:v=g.yBins||.05,yBins:k=v,xCellPx:E=!g.xBins&&g.xCellPx,yCellPx:w=!g.yBins&&g.yCellPx,customMark:M,binMax:A}=g,S=1>v?v:1/v,$=1>k?k:1/k,P=l.domain(i).range([0,a[0]]),N=c.domain(s).range([a[1],0]),_=[Math.ceil((E&&E/a[0]||S)*a[0]*10)/10,Math.ceil((w&&w/a[1]||$)*a[1]*10)/10];let O=-1/0;return y.forEach(e=>{const n=[],o=[];let r,i;for(let t=0;a[0]>Math.ceil(t);t+=_[0]){const s=P.invert(t),l=P.invert(t+_[0]);i=[],n.push(i);for(let n=0;a[1]>Math.ceil(n);n+=_[1]){const a=N.invert(n),c=N.invert(n+_[1]);r={gx:t,gy:n,gw:_[0],gh:_[1],x:(s+l)/2,y:(a+c)/2,binItems:[],value:0,_xyfCoordinates:[[s,a],[l,a],[l,c],[s,c]],parentSummary:e},i.push(r),o.push(r)}i.push(r)}n.push(i),e._xyfCoordinates.forEach((t,o)=>{const r=P(t[0]),i=N(t[1]),s=Math.floor(r/_[0]),a=Math.floor(i/_[1]);n[s][a]&&n[s][a].binItems.push(e.coordinates[o])}),o.forEach(t=>{t.value=b(t.binItems),O=Math.max(O,t.value)}),o.forEach(e=>{e.percent=e.value/O,e.customMark=M&&t.createElement("g",{transform:`translate(${e.gx},${e.gy})`},M({d:e,margin:h,styleFn:u,classFn:d,renderFn:f,chartSize:p,adjustedSize:a}))}),x=[...x,...o]}),A&&A(O),e?{type:"heatmap",processedData:!0,_baseData:[],_xyfCoordinates:[],data:[],bounds:[],x:0,y:0,coordinates:x,binMax:O}:x}const $e=t=>t&&t.extent||Array.isArray(t)&&t||[],Pe=()=>!0,Ne={top:be,bottom:ve,orphan:ge},_e={top:Ee,bottom:we,orphan:me},Oe={stackedarea:ce,"stackedarea-invert":ce,stackedpercent:ce,"stackedpercent-invert":ce,linepercent:ce,difference:({data:t,yProp:e,yPropTop:n,yPropBottom:o})=>(t.forEach((r,i)=>{r.data.forEach((r,s)=>{const a=0===i?1:0;r[e]>t[a].data[s][e]?(r[o]=t[a].data[s][e],r[n]=r[e]):(r[n]=r[e],r[o]=r[e])})}),t),bumparea:de,bumpline:de,"bumparea-invert":de,line:he,area:he,cumulative:ue,"cumulative-reverse":ue};function De(t,e){const n=[];for(const t of e)n.push(Object.assign({},t));for(const e of t)e.parentSummary||n.push(e);return n}const je=({lineDataAccessor:t,xAccessor:e,yAccessor:n,summaries:o,points:r,lines:i,lineType:s,showLinePoints:a,showSummaryPoints:l,xExtent:c,yExtent:h,invertX:u,invertY:d,summaryDataAccessor:f,summaryType:p,adjustedSize:y,margin:g,summaryStyleFn:x,summaryClassFn:b,summaryRenderModeFn:v,chartSize:k,filterRenderedLines:E,filterRenderedSummaries:w,filterRenderedPoints:M,defined:A=Pe,annotations:S=[]})=>{let $=[],P=[],N=[],_=[],O=[];if(r){e.forEach((t,e)=>{n.forEach((n,o)=>{let i=0;for(const s of r){const r=t(s,i),a=n(s,i),l={x:r,y:a,data:s,xIndex:e,yIndex:o};Array.isArray(a)&&(l[ve]=Math.min(...a),l[be]=Math.max(...a),l[xe]=(l[ve]+l[be])/2),Array.isArray(r)&&(l[we]=Math.min(...r),l[Ee]=Math.max(...r),l[ke]=(l[we]+l[Ee])/2),N.push(l),i++}})});for(const t of N)$.push(Object.assign(Object.assign({},t),{[me]:t[Ee]||t[we]||t.x,[ge]:t[be]||t[ve]||t.y}))}if(i){P=le({data:i,lineDataAccessor:t,xProp:me,xPropTop:Ee,xPropBottom:we,yProp:ge,yPropTop:be,yPropBottom:ve,xAccessor:e,yAccessor:n}),_=function(t,e){return n=>Oe[Te(t.type,n)](Object.assign(Object.assign(Object.assign({},t),e),{data:n}))}(s,{xProp:me,yProp:ge,yPropMiddle:xe,yPropTop:be,yPropBottom:ve,xPropMiddle:ke,xPropTop:Ee,xPropBottom:we})(P);for(const t of _)for(let e=0;t.data.length>e;e++){const n=t.data[e];if(!A(Object.assign({},n.data,n),e))continue;const o={parentLine:t,y:n.y,x:n.x,xTop:n.xTop,xMiddle:n.xMiddle,xBottom:n.xBottom,yTop:n.yTop,yMiddle:n.yMiddle,yBottom:n.yBottom,data:n.data};n.percent&&(o.percent=n.percent),$.push(o)}if(a){const t=!0===a?ke:_e[a],e=!0===a?xe:Ne[a];_.forEach(n=>{n.data.filter((t,e)=>{if(A(Object.assign({},t.data,t))){if("orphan"===a){const t=n.data[e-1],o=n.data[e+1];return!(t&&A(Object.assign({},t.data,t))||o&&A(Object.assign({},o.data,o)))}return!0}return!1}).forEach(o=>{N.push(Object.assign(Object.assign({},o),{parentLine:n,[ge]:void 0!==o[e]?o[e]:void 0!==o[xe]?o[xe]:void 0!==o[ve]?o[ve]:o.y,[me]:void 0!==o[t]?o[t]:void 0!==o[ke]?o[ke]:void 0!==o[we]?o[we]:o.y}))})})}}o&&(O=(({data:t,summaryDataAccessor:e,xAccessor:n,yAccessor:o})=>{const r=[];return e.forEach(e=>{n.forEach(n=>{o.forEach(o=>{const i=t=>e(t).map((t,e)=>[n(t,e),o(t,e)]);t.forEach(t=>{r.push(Object.assign(Object.assign({},t),{_baseData:e(t),_xyfCoordinates:i(t)}))})})})}),r})({data:o,summaryDataAccessor:f,xAccessor:e,yAccessor:n}),O.forEach(t=>{const e=t._baseData;t._xyfCoordinates.length>0&&t._xyfCoordinates[0][0][0]?t._xyfCoordinates[0].forEach(n=>{Array.isArray(n)&&n.map((n,o)=>Object.assign({parentSummary:t},e[o],{[me]:n[0],[ge]:n[1]})).forEach(t=>{l&&N.push(Object.assign(Object.assign({x:0},t),{[ge]:t[be]||t[ve]||t[ge]})),$.push(Object.assign({x:0,y:0},t))})}):t._xyfCoordinates.length>0&&Array.isArray(t._xyfCoordinates)&&t._xyfCoordinates.map((n,o)=>Object.assign(Object.assign({parentSummary:t},e[o]),{[me]:n[0],[ge]:n[1]})).forEach(t=>{l&&N.push(Object.assign(Object.assign({x:0},t),{[ge]:t[be]||t[ve]||t[ge]})),$.push(Object.assign({x:0,y:0},t))})}));let D,C,B,W,F=[],L=[];c&&!Array.isArray(c)&&!0===c.includeAnnotations&&e.forEach(t=>{S.forEach((e,n)=>{const o=t(e,n);isFinite(o)&&F.push({[me]:o})})}),h&&!Array.isArray(h)&&!0===h.includeAnnotations&&n.forEach(t=>{S.forEach((e,n)=>{const o=t(e,n);isFinite(o)&&L.push({[ge]:o})})});for(const t of $){const e=void 0===t[we]?t[me]:Math.min(t[Ee],t[we]),n=void 0===t[Ee]?t[me]:Math.max(t[we],t[Ee]),o=void 0===t[ve]?t[ge]:Math.min(t[be],t[ve]),r=void 0===t[be]?t[ge]:Math.max(t[ve],t[be]);void 0===e||void 0!==D&&e>=D||(D=e),void 0===n||void 0!==C&&C>=n||(C=n),void 0===o||void 0!==B&&o>=B||(B=o),void 0===r||void 0!==W&&W>=r||(W=r)}for(const t of F){const e=t[me];void 0===e||void 0!==D&&e>=D||(D=e),void 0===e||void 0!==C&&C>=e||(C=e)}for(const t of L){const e=t[ge];void 0===e||void 0!==B&&e>=B||(B=e),void 0===e||void 0!==W&&W>=e||(W=e)}const Y=[D,C],I=[B,W],X=$e(c),R=$e(h);let H=[R&&void 0!==R[0]?R[0]:I[0],R&&void 0!==R[1]?R[1]:I[1]],V=[X&&void 0!==X[0]?X[0]:Y[0],X&&void 0!==X[1]?X[1]:Y[1]];if(!u||X&&2===X.length||(V=[V[1],V[0]]),"bumpline"!==s.type&&!d||R&&2===R.length||(H=[H[1],H[0]]),p.type&&"contour"===p.type)O=function({summaryType:t,data:e,finalXExtent:n,finalYExtent:o}){let r=[];t.type||(t={type:t});const{resolution:i=500,thresholds:s=10,bandwidth:a=20,neighborhood:l}=t,c=m().domain(n).rangeRound([0,i]).nice(),h=m().domain(o).rangeRound([i,0]).nice();return e.forEach(t=>{let e=z().size([i,i]).x(t=>c(t[0])).y(t=>h(t[1])).thresholds(s).bandwidth(a)(t._xyfCoordinates);l&&(e=[e[0]]);const n=Math.max(...e.map(t=>t.value));e.forEach(e=>{e.parentSummary=t,e.bounds=[],e.percent=e.value/n,e.coordinates.forEach(t=>{t.forEach((n,o)=>{t[o]=n.map(t=>[c.invert(t[0]),h.invert(t[1])]),0===o&&e.bounds.push(function(t){let e=[1/0,0],n=[-1/0,0],o=[0,1/0],r=[0,-1/0];return t.forEach(t=>{e=e[0]>t[0]?t:e,n=t[0]>n[0]?t:n,r=t[1]>r[1]?t:r,o=o[1]>t[1]?t:o}),{center:[(e[0]+n[0])/2,(o[1]+r[1])/2],top:o,left:e,right:n,bottom:r}}(t[o]))})})}),r=[...r,...e]}),r}({summaryType:p,data:O,finalXExtent:V,finalYExtent:H});else if(p.type&&"linebounds"===p.type){if(O=function({summaryType:t,data:e,defined:n}){let o=[];t.type||(t={type:t});const{boundingAccessor:r,topBoundingAccessor:i=r,bottomBoundingAccessor:s=r}=t;return e.forEach(t=>{const e=t._baseData.map(n);let r=[],a=[];const l=[{xyf:a,base:r}];e.forEach((n,o)=>{!0===n?(r.push(t._baseData[o]),a.push(t._xyfCoordinates[o])):e[o+1]&&(r=[],a=[],l.push({xyf:a,base:r}))}),l.forEach(({xyf:e,base:n})=>{const r={data:t,parentSummary:t,_xyfCoordinates:Ae(e,n,i,s)};o=[...o,r]})}),o}({summaryType:p,data:O,defined:A}),!R||2!==R.length)for(const t of O)for(const e of t._xyfCoordinates){const t=e[1];void 0!==t&&isFinite(t)&&(H[0]>t&&(H[0]=t),t>H[1]&&(H[1]=t))}}else p.type&&"hexbin"===p.type?(O=Me({summaryType:p,data:O[0],processedData:o&&!!o[0].processedData,preprocess:!1,finalXExtent:V,finalYExtent:H,size:y,margin:g,styleFn:x,classFn:b,renderFn:v,chartSize:k}),$=De($,O)):p.type&&"heatmap"===p.type?(O=Se({summaryType:p,data:O[0],processedData:o&&!!o[0].processedData,preprocess:!1,finalXExtent:V,finalYExtent:H,size:y,margin:g,styleFn:x,classFn:b,renderFn:v,chartSize:k}),$=De($,O)):p.type&&"trendline"===p.type&&(O=function({preprocess:t=!1,summaryType:e,data:n,finalXExtent:o=[Math.min(...n.coordinates.map(t=>t.x)),Math.max(...n.coordinates.map(t=>t.x))],xScaleType:r=m()}){if(t)return n[0].coordinates;let i,s=[];i=e.type?e:{type:i};const{regressionType:a="linear",order:l=2,precision:c=4,controlPoints:h=20,curve:u=j}=i;let d=a;o[0]>=0||"logarithmic"!==a&&"power"!==a&&"exponential"!==a||(console.error(`Cannot use this ${a} regressionType type with value range that goes below 0, defaulting to linear`),d="linear"),n.coordinates&&!n._xyfCoordinates&&(n._xyfCoordinates=n.coordinates.map(t=>[t.x,t.y]));const f=Array.isArray(n)?n:[n],p=r.domain([0,1]).range(o);return s=[],f.forEach(t=>{const e=T[d](t._xyfCoordinates.map(t=>{let e=t[0],n=t[1];return"number"!=typeof e&&(e=e.getTime()),"number"!=typeof n&&(n=n.getTime()),[e,n]}),{order:l,precision:c}),n=1/h;let o=[0,1];if("linear"!==d){o=[];for(let t=0;1+n>t;t+=n)o.push(t)}const r=[];o.forEach(t=>{r.push(e.predict(p(t)))}),s.push({centroid:!1,customMark:void 0,data:t,parentSummary:t,value:e.string,r2:e.r2,curve:u,_xyfCoordinates:r})}),s}({summaryType:p,data:O[0],preprocess:o&&!!o[0].processedData,finalXExtent:V}),$=De($,O));return E&&(_=_.filter(E),$=$.filter((t,e)=>!t.parentLine||E(t.parentLine,e,[]))),M&&($=$.filter(M)),w&&(O=O.filter(w),$=$.filter((t,e)=>!t.parentSummary||w(t.parentSummary,e,[]))),{xExtent:V,yExtent:H,projectedLines:_,projectedPoints:N,projectedSummaries:O,fullDataset:$,calculatedXExtent:Y,calculatedYExtent:I}},Te=(t,e)=>!Oe[t]||"difference"===t&&2!==e.length?"line":t;export{Ht as Annotation,oe as AnnotationLayer,Yt as Axis,se as Brush,ye as DividedLine,it as Legend,Dt as MinimapChart,kt as StreamXYFrame,je as calculateDataExtent,pe as funnelize,Se as heatmapping,Me as hexbinning};
|
package/package.json
CHANGED
|
@@ -1,33 +1,106 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "semiotic",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-beta.2",
|
|
4
4
|
"description": "The semiotic JavaScript data visualization framework",
|
|
5
|
-
"main": "dist/semiotic.js",
|
|
6
|
-
"module": "dist/semiotic.module.js",
|
|
5
|
+
"main": "dist/semiotic.min.js",
|
|
6
|
+
"module": "dist/semiotic.module.min.js",
|
|
7
7
|
"types": "dist/semiotic.d.ts",
|
|
8
8
|
"sideEffects": false,
|
|
9
|
+
"bin": {
|
|
10
|
+
"semiotic-ai": "ai/cli.js",
|
|
11
|
+
"semiotic-mcp": "ai/dist/ai/mcp-server.js"
|
|
12
|
+
},
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/semiotic.d.ts",
|
|
16
|
+
"import": "./dist/semiotic.module.min.js",
|
|
17
|
+
"require": "./dist/semiotic.min.js",
|
|
18
|
+
"default": "./dist/semiotic.module.min.js"
|
|
19
|
+
},
|
|
20
|
+
"./xy": {
|
|
21
|
+
"types": "./dist/semiotic-xy.d.ts",
|
|
22
|
+
"import": "./dist/xy.module.min.js",
|
|
23
|
+
"require": "./dist/xy.min.js",
|
|
24
|
+
"default": "./dist/xy.module.min.js"
|
|
25
|
+
},
|
|
26
|
+
"./ordinal": {
|
|
27
|
+
"types": "./dist/semiotic-ordinal.d.ts",
|
|
28
|
+
"import": "./dist/ordinal.module.min.js",
|
|
29
|
+
"require": "./dist/ordinal.min.js",
|
|
30
|
+
"default": "./dist/ordinal.module.min.js"
|
|
31
|
+
},
|
|
32
|
+
"./network": {
|
|
33
|
+
"types": "./dist/semiotic-network.d.ts",
|
|
34
|
+
"import": "./dist/network.module.min.js",
|
|
35
|
+
"require": "./dist/network.min.js",
|
|
36
|
+
"default": "./dist/network.module.min.js"
|
|
37
|
+
},
|
|
38
|
+
"./realtime": {
|
|
39
|
+
"types": "./dist/semiotic-realtime.d.ts",
|
|
40
|
+
"import": "./dist/realtime.module.min.js",
|
|
41
|
+
"require": "./dist/realtime.min.js",
|
|
42
|
+
"default": "./dist/realtime.module.min.js"
|
|
43
|
+
},
|
|
44
|
+
"./server": {
|
|
45
|
+
"types": "./dist/server.d.ts",
|
|
46
|
+
"import": "./dist/server.module.min.js",
|
|
47
|
+
"require": "./dist/server.min.js",
|
|
48
|
+
"default": "./dist/server.module.min.js"
|
|
49
|
+
},
|
|
50
|
+
"./ai": {
|
|
51
|
+
"types": "./dist/semiotic-ai.d.ts",
|
|
52
|
+
"import": "./dist/semiotic-ai.module.min.js",
|
|
53
|
+
"require": "./dist/semiotic-ai.min.js",
|
|
54
|
+
"default": "./dist/semiotic-ai.module.min.js"
|
|
55
|
+
},
|
|
56
|
+
"./data": {
|
|
57
|
+
"types": "./dist/semiotic-data.d.ts",
|
|
58
|
+
"import": "./dist/semiotic-data.module.min.js",
|
|
59
|
+
"require": "./dist/semiotic-data.min.js",
|
|
60
|
+
"default": "./dist/semiotic-data.module.min.js"
|
|
61
|
+
},
|
|
62
|
+
"./package.json": "./package.json"
|
|
63
|
+
},
|
|
9
64
|
"files": [
|
|
10
|
-
"dist
|
|
11
|
-
"dist
|
|
65
|
+
"dist/*.js",
|
|
66
|
+
"dist/*.js.map",
|
|
67
|
+
"dist/**/*.d.ts",
|
|
68
|
+
"ai/schema.json",
|
|
69
|
+
"ai/system-prompt.md",
|
|
70
|
+
"ai/examples.md",
|
|
71
|
+
"ai/cli.js",
|
|
72
|
+
"ai/dist/**/*.js",
|
|
73
|
+
"CLAUDE.md",
|
|
74
|
+
"README.md",
|
|
75
|
+
"LICENSE"
|
|
12
76
|
],
|
|
13
77
|
"scripts": {
|
|
14
|
-
"start": "parcel serve --target
|
|
15
|
-
"build": "parcel build --target
|
|
78
|
+
"start": "parcel serve --target website --port 3000",
|
|
79
|
+
"build": "parcel build --target website",
|
|
80
|
+
"build:analyze": "node scripts/build.mjs --analyze",
|
|
81
|
+
"build:prod": "node scripts/build.mjs --production",
|
|
16
82
|
"test": "jest --config jest.config.js",
|
|
17
|
-
"pretest:dist": "
|
|
83
|
+
"pretest:dist": "node scripts/build.mjs",
|
|
18
84
|
"test:dist": "playwright test",
|
|
19
|
-
"
|
|
85
|
+
"bench": "vitest bench",
|
|
86
|
+
"bench:ui": "vitest bench --ui",
|
|
87
|
+
"bench:baseline": "vitest bench --run && node scripts/save-baseline.js",
|
|
88
|
+
"bench:compare": "vitest bench --run && node scripts/compare-baseline.js",
|
|
89
|
+
"serve-examples": "npm run dist && parcel serve integration-tests/index.html integration-tests/xy-examples/index.html integration-tests/ordinal-examples/index.html integration-tests/network-examples/index.html integration-tests/viz-examples/index.html integration-tests/hoc-legend-examples/index.html --dist-dir .parcel-cache/integration-tests",
|
|
90
|
+
"dist": "node scripts/build.mjs",
|
|
91
|
+
"dist:prod": "node scripts/build.mjs --production",
|
|
20
92
|
"lint": "eslint src",
|
|
21
93
|
"lint:fix": "eslint src --fix",
|
|
22
94
|
"create-release-branch": "sh ./scripts/create-release-branch.sh",
|
|
23
95
|
"publish-release": "sh ./scripts/publish-release.sh",
|
|
24
|
-
"
|
|
25
|
-
"website:
|
|
96
|
+
"clean": "rm -rf .parcel-cache docs/build dist && echo 'All caches and build artifacts cleared'",
|
|
97
|
+
"website:clean": "npm run clean && npm run dist:prod",
|
|
98
|
+
"website:start": "npm run dist:prod && parcel serve --target website --no-cache",
|
|
99
|
+
"website:start:clean": "npm run clean && npm run dist:prod && parcel serve --target website --no-cache",
|
|
100
|
+
"website:build": "npm run dist:prod && parcel build --target website",
|
|
101
|
+
"build:mcp": "tsc -p tsconfig.mcp.json",
|
|
26
102
|
"typescript": "tsc --noEmit",
|
|
27
|
-
"prepublishOnly": "
|
|
28
|
-
},
|
|
29
|
-
"resolutions": {
|
|
30
|
-
"@types/react": "^17.0.37"
|
|
103
|
+
"prepublishOnly": "node scripts/build.mjs --production"
|
|
31
104
|
},
|
|
32
105
|
"targets": {
|
|
33
106
|
"website": {
|
|
@@ -36,21 +109,17 @@
|
|
|
36
109
|
"source": "docs/public/index.html",
|
|
37
110
|
"distDir": "docs/build",
|
|
38
111
|
"engines": {
|
|
39
|
-
"browsers": "Firefox
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
"docs": {
|
|
43
|
-
"source": "public/index.html",
|
|
44
|
-
"distDir": "build",
|
|
45
|
-
"engines": {
|
|
46
|
-
"browsers": "Firefox 60, Chrome 67, Safari 11.1"
|
|
112
|
+
"browsers": "Firefox 90, Chrome 90, Safari 14"
|
|
47
113
|
}
|
|
48
114
|
}
|
|
49
115
|
},
|
|
50
116
|
"alias": {
|
|
51
117
|
"semiotic": "."
|
|
52
118
|
},
|
|
53
|
-
"repository":
|
|
119
|
+
"repository": {
|
|
120
|
+
"type": "git",
|
|
121
|
+
"url": "git+https://github.com/nteract/semiotic.git"
|
|
122
|
+
},
|
|
54
123
|
"author": {
|
|
55
124
|
"name": "Elijah Meeks",
|
|
56
125
|
"email": "elijahmeeks@gmail.com"
|
|
@@ -63,78 +132,69 @@
|
|
|
63
132
|
"@babel/core": "^7.24.4",
|
|
64
133
|
"@babel/preset-env": "^7.24.4",
|
|
65
134
|
"@babel/preset-react": "^7.24.1",
|
|
66
|
-
"@babel/preset-typescript": "^7.24.1",
|
|
67
135
|
"@mdx-js/react": "^1.6.22",
|
|
68
136
|
"@parcel/transformer-inline-string": "^2.8.2",
|
|
69
137
|
"@parcel/transformer-mdx": "^2.8.2",
|
|
70
138
|
"@playwright/test": "^1.17.1",
|
|
71
|
-
"@
|
|
139
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
140
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
141
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
72
142
|
"@testing-library/react": "^14.3.0",
|
|
73
143
|
"@testing-library/user-event": "^14.4.3",
|
|
74
|
-
"@types/d3-scale": "^
|
|
75
|
-
"@types/
|
|
76
|
-
"@types/
|
|
77
|
-
"@types/react
|
|
144
|
+
"@types/d3-scale": "^4.0.9",
|
|
145
|
+
"@types/jest": "^29.5.14",
|
|
146
|
+
"@types/node": "^20.19.35",
|
|
147
|
+
"@types/react": "^18.3.28",
|
|
148
|
+
"@types/react-dom": "^18.3.7",
|
|
149
|
+
"@types/seedrandom": "^3.0.5",
|
|
78
150
|
"@typescript-eslint/eslint-plugin": "^5.4.6",
|
|
151
|
+
"@vitest/ui": "^4.0.18",
|
|
79
152
|
"@vx/pattern": "0.0.143",
|
|
80
|
-
"
|
|
81
|
-
"babel-eslint": "^7.2.3",
|
|
82
|
-
"babel-jest": "^27.5.1",
|
|
83
|
-
"classnames": "2.2.5",
|
|
84
|
-
"conventional-changelog-cli": "1.1.1",
|
|
85
|
-
"conventional-recommended-bump": "0.3.0",
|
|
153
|
+
"babel-jest": "^29.7.0",
|
|
86
154
|
"d3-dsv": "1.0.5",
|
|
87
155
|
"d3-flextree-v4": "^1.0.1",
|
|
88
|
-
"d3-random": "1.0.1",
|
|
89
156
|
"d3-sankey": "0.12.3",
|
|
90
157
|
"dagre": "^0.8.2",
|
|
91
|
-
"dentist": "1.0.3",
|
|
92
|
-
"enzyme": "3.1.0",
|
|
93
158
|
"eslint": "^7.0.0",
|
|
94
159
|
"eslint-config-netflix-dea": "^4.0.0",
|
|
95
160
|
"eslint-plugin-import": "^2.25.3",
|
|
96
161
|
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
97
162
|
"eslint-plugin-react": "^7.27.1",
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"history": "4.2.0",
|
|
101
|
-
"in-publish": "2.0.0",
|
|
102
|
-
"jest": "^27.4.5",
|
|
163
|
+
"jest": "^29.7.0",
|
|
164
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
103
165
|
"marked": "4.0.10",
|
|
104
166
|
"material-design-icons-svg": "1.1.2",
|
|
105
167
|
"parcel": "^2.8.2",
|
|
106
168
|
"playwright-chromium": "^1.17.1",
|
|
107
|
-
"prettier": "^
|
|
108
|
-
"process": "^0.11.10",
|
|
169
|
+
"prettier": "^3.8.1",
|
|
109
170
|
"react": "^18.1.0",
|
|
110
171
|
"react-dom": "^18.1.0",
|
|
111
|
-
"react-element-to-jsx-string": "^12.0.0",
|
|
112
172
|
"react-prism": "4.3.2",
|
|
113
173
|
"react-router-dom": "^6.2.1",
|
|
114
|
-
"react-test-renderer": "^17.0.2",
|
|
115
174
|
"resize-observer-polyfill": "^1.5.1",
|
|
116
|
-
"rollup": "^
|
|
175
|
+
"rollup": "^4.59.0",
|
|
117
176
|
"rollup-plugin-auto-external": "^2.0.0",
|
|
118
|
-
"rollup-plugin-bundle-size": "^1.0.3",
|
|
119
|
-
"rollup-plugin-commonjs": "^10.1.0",
|
|
120
177
|
"rollup-plugin-typescript2": "^0.34.1",
|
|
178
|
+
"rollup-plugin-visualizer": "^7.0.0",
|
|
121
179
|
"roughjs": "^3.1.0",
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"typescript": "
|
|
125
|
-
"
|
|
180
|
+
"seedrandom": "^3.0.5",
|
|
181
|
+
"ts-jest": "^29.4.6",
|
|
182
|
+
"typescript": "~5.9.3",
|
|
183
|
+
"vitest": "^4.0.18"
|
|
126
184
|
},
|
|
127
185
|
"peerDependencies": {
|
|
128
186
|
"react": "^18.1.0",
|
|
129
187
|
"react-dom": "^18.1.0"
|
|
130
188
|
},
|
|
131
189
|
"dependencies": {
|
|
190
|
+
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
132
191
|
"d3-array": "3.2.4",
|
|
133
192
|
"d3-brush": "3.0.0",
|
|
134
193
|
"d3-chord": "3.0.1",
|
|
135
194
|
"d3-contour": "^1.1.1",
|
|
136
195
|
"d3-delaunay": "^6.0.4",
|
|
137
196
|
"d3-force": "3.0.0",
|
|
197
|
+
"d3-format": "^3.1.0",
|
|
138
198
|
"d3-glyphedge": "^1.2.0",
|
|
139
199
|
"d3-hexbin": "^0.2.2",
|
|
140
200
|
"d3-hierarchy": "3.1.2",
|
|
@@ -143,27 +203,23 @@
|
|
|
143
203
|
"d3-polygon": "3.0.1",
|
|
144
204
|
"d3-sankey-circular": "0.34.0",
|
|
145
205
|
"d3-scale": "4.0.2",
|
|
206
|
+
"d3-scale-chromatic": "^3.1.0",
|
|
146
207
|
"d3-selection": "3.0.0",
|
|
147
208
|
"d3-shape": "3.2.0",
|
|
209
|
+
"d3-time-format": "^4.1.0",
|
|
148
210
|
"dequal": "^2.0.3",
|
|
149
211
|
"labella": "1.1.4",
|
|
150
|
-
"memoize-one": "^
|
|
151
|
-
"
|
|
152
|
-
"polygon-offset": "0.3.1",
|
|
153
|
-
"react-annotation": "3.0.0-beta.5",
|
|
212
|
+
"memoize-one": "^6.0.0",
|
|
213
|
+
"polygon-offset": "0.3.2",
|
|
154
214
|
"regression": "^2.0.1",
|
|
155
215
|
"svg-path-bounding-box": "1.0.4"
|
|
156
216
|
},
|
|
157
|
-
"eslintConfig": {
|
|
158
|
-
"extends": "react-app"
|
|
159
|
-
},
|
|
160
217
|
"browserslist": {
|
|
161
218
|
"development": [
|
|
162
|
-
"Edge
|
|
163
|
-
"Firefox
|
|
164
|
-
"Chrome
|
|
165
|
-
"Safari
|
|
166
|
-
"IE 11"
|
|
219
|
+
"Edge 90",
|
|
220
|
+
"Firefox 90",
|
|
221
|
+
"Chrome 90",
|
|
222
|
+
"Safari 14"
|
|
167
223
|
]
|
|
168
224
|
}
|
|
169
225
|
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export function marginOffsetFn(orient: any, axisSettings: any, marginOffset: any): number;
|
|
2
|
-
export function adjustedAnnotationKeyMapper(d: any): string;
|
|
3
|
-
export function safeStringify(value: any): string;
|
|
4
|
-
export function noteDataWidth(noteData: any, charWidth: number, layoutNoteWidth: any): any;
|
|
5
|
-
export function noteDataHeight(noteData: any, charWidth: number, lineHeight: number, layoutNoteHeight: any): any;
|
|
6
|
-
export function keyFromSVGAnnotations(adjustableAnnotations: any, annotationProcessor: any, size: any): string;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { OrdinalFrameProps } from "./types/ordinalTypes";
|
|
3
|
-
import { XYFrameProps } from "./types/xyTypes";
|
|
4
|
-
interface FacetControllerProps {
|
|
5
|
-
children: React.ReactElement;
|
|
6
|
-
sharedRExtent: boolean;
|
|
7
|
-
sharedXExtent: boolean;
|
|
8
|
-
sharedYExtent: boolean;
|
|
9
|
-
}
|
|
10
|
-
declare type Props = FacetControllerProps & OrdinalFrameProps & XYFrameProps;
|
|
11
|
-
export default function FacetController(props: Props): React.JSX.Element;
|
|
12
|
-
export {};
|
package/dist/Frame.d.ts
DELETED
package/dist/Mark/Mark.d.ts
DELETED