semiotic 3.9.2 → 3.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +99 -74
- package/agent-skill/semiotic-charts/SKILL.md +13 -7
- package/ai/artifact-contract-reference.md +408 -0
- package/ai/artifact-surface-inventory.json +5586 -0
- package/ai/behaviorContracts.cjs +24 -2
- package/ai/cli.js +480 -56
- package/ai/dist/mcp-server.js +68 -68
- package/ai/examples.md +1 -1
- package/ai/reference.md +31 -14
- package/ai/schema.json +1868 -438
- package/ai/surface-manifest.json +11 -4
- package/ai/system-prompt.md +2 -0
- package/ai/task-packets/compare-category-totals.json +301 -0
- package/ai/task-packets/compare-category-totals.md +188 -0
- package/ai/task-packets/correct-published-chart.json +271 -0
- package/ai/task-packets/correct-published-chart.md +597 -0
- package/ai/task-packets/index.json +40 -0
- package/ai/task-packets/update-live-chart.json +289 -0
- package/ai/task-packets/update-live-chart.md +424 -0
- package/dist/c-2N7IU2NY.min.js +1 -0
- package/dist/c-2WK7YJLL.min.js +1 -0
- package/dist/c-33QOXEUG.min.js +1 -0
- package/dist/c-42PLDTX7.min.js +1 -0
- package/dist/c-447VIMRO.min.js +1 -0
- package/dist/c-4FN7Q6VQ.min.js +1 -0
- package/dist/c-553QUDKA.min.js +1 -0
- package/dist/c-55BAJ333.min.js +1 -0
- package/dist/c-7242NXSG.min.js +1 -0
- package/dist/c-7EGHJU2F.min.js +1 -0
- package/dist/c-7HP7MB2I.min.js +1 -0
- package/dist/c-7NBU5ZKS.min.js +1 -0
- package/dist/c-AFBSWT77.min.js +1 -0
- package/dist/c-AJ7EC32V.min.js +1 -0
- package/dist/c-AQADQNY7.min.js +1 -0
- package/dist/c-ATM475SA.min.js +1 -0
- package/dist/c-AVO3Q7T7.min.js +1 -0
- package/dist/c-AZKPVBOC.min.js +1 -0
- package/dist/c-BNFJMDHN.min.js +1 -0
- package/dist/c-BNG5ECK5.min.js +1 -0
- package/dist/c-BOHCQILI.min.js +1 -0
- package/dist/c-CCTGN5CK.min.js +1 -0
- package/dist/c-CPSPZH6A.min.js +1 -0
- package/dist/c-CPV4N35K.min.js +1 -0
- package/dist/c-D6HAAPTX.min.js +1 -0
- package/dist/c-DE5Q3U2X.min.js +1 -0
- package/dist/c-DK662R77.min.js +1 -0
- package/dist/c-DY2676CR.min.js +1 -0
- package/dist/c-E32M6XW5.min.js +1 -0
- package/dist/c-E4JDJH4I.min.js +1 -0
- package/dist/c-E7I2L7CU.min.js +1 -0
- package/dist/c-EBOQ7ER7.min.js +1 -0
- package/dist/c-ELDWAO2V.min.js +1 -0
- package/dist/c-EUBTECGM.min.js +1 -0
- package/dist/c-GNTXRXRN.min.js +1 -0
- package/dist/c-GSZRZRD6.min.js +1 -0
- package/dist/c-GWX7JGMF.min.js +1 -0
- package/dist/c-GXV3C3MO.min.js +1 -0
- package/dist/c-HHTK2R75.min.js +1 -0
- package/dist/c-HLLFJYTY.min.js +1 -0
- package/dist/c-HPOYKCCG.min.js +1 -0
- package/dist/c-HXDKPIKR.min.js +1 -0
- package/dist/c-I4QJ6YLM.min.js +1 -0
- package/dist/c-IDJV3CZK.min.js +1 -0
- package/dist/c-ITKX3RC5.min.js +1 -0
- package/dist/c-JG2JCQLP.min.js +1 -0
- package/dist/c-JLGRHXGZ.min.js +1 -0
- package/dist/c-JO2UGTCP.min.js +1 -0
- package/dist/c-JUKIWTBJ.min.js +1 -0
- package/dist/c-KCRJGUHP.min.js +1 -0
- package/dist/c-LMGSSD2E.min.js +1 -0
- package/dist/c-LYQMZMZQ.min.js +1 -0
- package/dist/c-LYVKDBQJ.min.js +1 -0
- package/dist/c-MVR3RWF3.min.js +1 -0
- package/dist/c-MXCP7GNZ.min.js +1 -0
- package/dist/c-NG7BLZTR.min.js +1 -0
- package/dist/c-NYZ2QNAM.min.js +1 -0
- package/dist/c-OO5QLMJC.min.js +1 -0
- package/dist/c-OOVX2JPQ.min.js +1 -0
- package/dist/c-ORLEBW72.min.js +1 -0
- package/dist/c-P65V6HLO.min.js +1 -0
- package/dist/c-PP6VY3QU.min.js +1 -0
- package/dist/c-PRIKOLTE.min.js +1 -0
- package/dist/c-PSNI6KAZ.min.js +1 -0
- package/dist/c-PYNW54D2.min.js +1 -0
- package/dist/c-QA3HMQJP.min.js +1 -0
- package/dist/c-ROEHCIGV.min.js +1 -0
- package/dist/c-S3AZX5PP.min.js +1 -0
- package/dist/c-T2V7O2LO.min.js +1 -0
- package/dist/c-TIXX5CAU.min.js +1 -0
- package/dist/c-TKG2NP7G.min.js +1 -0
- package/dist/c-VJTDST2R.min.js +1 -0
- package/dist/c-VXLOLYTO.min.js +1 -0
- package/dist/c-W4ZUKSEQ.min.js +1 -0
- package/dist/c-WH2O53VI.min.js +1 -0
- package/dist/c-WNGH47HF.min.js +1 -0
- package/dist/c-WUWXGQYA.min.js +1 -0
- package/dist/c-XDQKXPX4.min.js +1 -0
- package/dist/{c-CKLIFCGN.min.js → c-XSB27XPS.min.js} +1 -1
- package/dist/c-YDECTEUW.min.js +1 -0
- package/dist/c-YF3YKVQI.min.js +1 -0
- package/dist/c-YLZIV3VS.min.js +1 -0
- package/dist/c-ZYPXQF7B.min.js +1 -0
- package/dist/components/Annotation.d.ts +2 -1
- package/dist/components/ai/chartRecipeRegistry.d.ts +6 -1
- package/dist/components/ai/chartRecipes.d.ts +4 -0
- package/dist/components/ai/describePhysicsProjection.d.ts +18 -0
- package/dist/components/ai/describePhysicsSource.d.ts +13 -0
- package/dist/components/artifact/ArtifactInspector.d.ts +26 -0
- package/dist/components/artifact/ArtifactInspectorContextSections.d.ts +18 -0
- package/dist/components/artifact/artifactContractDiff.d.ts +8 -0
- package/dist/components/artifact/artifactInspectorSummary.d.ts +53 -0
- package/dist/components/artifact/artifactRevision.d.ts +54 -0
- package/dist/components/artifact/artifactTestFixtures.d.ts +17 -0
- package/dist/components/artifact/attachmentAudit.d.ts +13 -0
- package/dist/components/artifact/claimCorrections.d.ts +3 -0
- package/dist/components/artifact/claimGraph.d.ts +5 -0
- package/dist/components/artifact/claimLifecycle.d.ts +32 -0
- package/dist/components/artifact/claims.d.ts +24 -0
- package/dist/components/artifact/collection.d.ts +10 -0
- package/dist/components/artifact/collectionCorrectionScope.d.ts +4 -0
- package/dist/components/artifact/collectionImpact.d.ts +11 -0
- package/dist/components/artifact/collectionLineage.d.ts +3 -0
- package/dist/components/artifact/collectionOperations.d.ts +8 -0
- package/dist/components/artifact/collectionPolicy.d.ts +22 -0
- package/dist/components/artifact/collectionTypes.d.ts +117 -0
- package/dist/components/artifact/configurationRepair.d.ts +8 -0
- package/dist/components/artifact/contract.d.ts +30 -0
- package/dist/components/artifact/evaluateArtifact.d.ts +12 -0
- package/dist/components/artifact/evaluateArtifactTypes.d.ts +78 -0
- package/dist/components/artifact/evaluationPresentation.d.ts +9 -0
- package/dist/components/artifact/evidenceSample.d.ts +8 -0
- package/dist/components/artifact/exportPaths.d.ts +8 -0
- package/dist/components/artifact/fieldPolicies.d.ts +12 -0
- package/dist/components/artifact/fingerprint.d.ts +36 -0
- package/dist/components/artifact/grounding.d.ts +51 -0
- package/dist/components/artifact/groundingBudget.d.ts +38 -0
- package/dist/components/artifact/hostTransfer.d.ts +13 -0
- package/dist/components/artifact/identity.d.ts +19 -0
- package/dist/components/artifact/inheritance.d.ts +48 -0
- package/dist/components/artifact/inheritanceIntegrity.d.ts +3 -0
- package/dist/components/artifact/jsonCompatibility.d.ts +2 -0
- package/dist/components/artifact/obligations.d.ts +3 -0
- package/dist/components/artifact/policies.d.ts +45 -0
- package/dist/components/artifact/policyRelations.d.ts +3 -0
- package/dist/components/artifact/recordProjection.d.ts +7 -0
- package/dist/components/artifact/representation.d.ts +50 -0
- package/dist/components/artifact/serialization.d.ts +40 -0
- package/dist/components/artifact/temporal.d.ts +32 -0
- package/dist/components/artifact/temporalAdapters.d.ts +75 -0
- package/dist/components/artifact/temporalAuditHelpers.d.ts +12 -0
- package/dist/components/artifact/temporalPresentation.d.ts +8 -0
- package/dist/components/artifact/types.d.ts +341 -0
- package/dist/components/artifact/validation.d.ts +13 -0
- package/dist/components/artifact/validationFieldStatus.d.ts +7 -0
- package/dist/components/artifact/validationPrimitives.d.ts +24 -0
- package/dist/components/artifact/validationSurfaces.d.ts +7 -0
- package/dist/components/artifact/validationTemporal.d.ts +3 -0
- package/dist/components/charts/geo/FlowMap.d.ts +7 -0
- package/dist/components/charts/geo/flowMapLineStyle.d.ts +18 -0
- package/dist/components/charts/ordinal/DonutChart.d.ts +2 -0
- package/dist/components/charts/ordinal/FunnelChart.d.ts +2 -0
- package/dist/components/charts/ordinal/GroupedBarChart.d.ts +6 -0
- package/dist/components/charts/ordinal/PieChart.d.ts +2 -0
- package/dist/components/charts/ordinal/RadarChart.d.ts +2 -0
- package/dist/components/charts/ordinal/StackedBarChart.d.ts +6 -0
- package/dist/components/charts/physics/CollisionSwarmChart.d.ts +1 -1
- package/dist/components/charts/physics/EventDropChart.d.ts +3 -1
- package/dist/components/charts/physics/GaltonBoardChart.d.ts +4 -2
- package/dist/components/charts/physics/ProcessFlowChart.d.ts +6 -0
- package/dist/components/charts/physics/UnitPileChart.d.ts +2 -1
- package/dist/components/charts/physics/collisionSwarmPacking.d.ts +14 -0
- package/dist/components/charts/physics/collisionSwarmPhysics.d.ts +1 -0
- package/dist/components/charts/physics/eventDropAdmission.d.ts +32 -0
- package/dist/components/charts/physics/eventDropPhysics.d.ts +22 -1
- package/dist/components/charts/physics/galtonBoardPhysics.d.ts +2 -9
- package/dist/components/charts/physics/physicsChartReconcile.d.ts +4 -0
- package/dist/components/charts/physics/physicsChartUtils.d.ts +1 -1
- package/dist/components/charts/physics/physicsGaltonData.d.ts +10 -0
- package/dist/components/charts/physics/physicsHocHandle.d.ts +2 -0
- package/dist/components/charts/physics/physicsPileData.d.ts +11 -0
- package/dist/components/charts/physics/physicsPilePhysics.d.ts +5 -12
- package/dist/components/charts/physics/physicsProjectionOverlays.d.ts +1 -1
- package/dist/components/charts/physics/physicsSourceRows.d.ts +8 -0
- package/dist/components/charts/physics/usePhysicsChartData.d.ts +19 -0
- package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +4 -0
- package/dist/components/charts/realtime/RealtimeHistogram.d.ts +14 -6
- package/dist/components/charts/realtime/RealtimeLineChart.d.ts +4 -0
- package/dist/components/charts/realtime/RealtimeSwarmChart.d.ts +4 -0
- package/dist/components/charts/realtime/RealtimeWaterfallChart.d.ts +4 -0
- package/dist/components/charts/realtime/realtimeAccessors.d.ts +4 -0
- package/dist/components/charts/realtime/realtimeChartRuntime.d.ts +8 -7
- package/dist/components/charts/realtime/realtimeChartTypes.d.ts +7 -0
- package/dist/components/charts/realtime/temporalHistogramConfig.d.ts +17 -11
- package/dist/components/charts/shared/GaugeReadout.d.ts +9 -0
- package/dist/components/charts/shared/ThresholdAnnotation.d.ts +18 -0
- package/dist/components/charts/shared/ThresholdEndCap.d.ts +7 -0
- package/dist/components/charts/shared/auditAccessibilityText.d.ts +4 -2
- package/dist/components/charts/shared/numericTickFormatter.d.ts +2 -0
- package/dist/components/charts/shared/radialCenterContent.d.ts +10 -0
- package/dist/components/charts/shared/tooltipUtils.d.ts +1 -1
- package/dist/components/charts/shared/useChartLegend.d.ts +4 -0
- package/dist/components/charts/shared/useXYPointStyle.d.ts +2 -0
- package/dist/components/charts/xy/BubbleChart.d.ts +7 -0
- package/dist/components/charts/xy/CandlestickChart.d.ts +7 -0
- package/dist/components/charts/xy/DifferenceChart.d.ts +7 -0
- package/dist/components/charts/xy/MinimapChart.d.ts +7 -0
- package/dist/components/charts/xy/MultiAxisLineChart.d.ts +7 -0
- package/dist/components/charts/xy/ScatterplotMatrix.d.ts +6 -0
- package/dist/components/charts/xy/WaterfallChart.d.ts +8 -0
- package/dist/components/charts/xy/differenceMarkStyle.d.ts +28 -0
- package/dist/components/charts/xy/multiAxisFields.d.ts +23 -0
- package/dist/components/charts/xy/scatterplotMatrixCells.d.ts +50 -0
- package/dist/components/evidence/chartEvidenceEnvelope.d.ts +16 -8
- package/dist/components/evidence/evidenceEnvelopeInput.d.ts +8 -0
- package/dist/components/evidence/evidenceEnvelopeValidation.d.ts +11 -0
- package/dist/components/evidence/evidenceGate.d.ts +3 -1
- package/dist/components/evidence/renderedSceneHash.d.ts +23 -0
- package/dist/components/evidence/stableJsonHash.d.ts +4 -0
- package/dist/components/export/chartConfig.d.ts +40 -5
- package/dist/components/export/chartConfigArtifact.d.ts +6 -0
- package/dist/components/legendLayout.d.ts +18 -0
- package/dist/components/legendStyles.d.ts +4 -0
- package/dist/components/recipes/firstAvailableTrack.d.ts +17 -0
- package/dist/components/recipes/intervals.d.ts +1 -1
- package/dist/components/semiotic-ai-core.d.ts +33 -22
- package/dist/components/semiotic-ai.d.ts +15 -3
- package/dist/components/semiotic-artifact-react.d.ts +10 -0
- package/dist/components/semiotic-artifact.d.ts +23 -0
- package/dist/components/semiotic-experimental.d.ts +1 -1
- package/dist/components/semiotic-physics.d.ts +4 -4
- package/dist/components/semiotic-text.d.ts +2 -0
- package/dist/components/semiotic-utils-core.d.ts +18 -18
- package/dist/components/semiotic.d.ts +3 -3
- package/dist/components/server/renderEvidence.d.ts +12 -0
- package/dist/components/server/renderToStaticSVG.d.ts +3 -0
- package/dist/components/server/staticSVGChrome.d.ts +1 -4
- package/dist/components/server/staticXYAxisTicks.d.ts +2 -38
- package/dist/components/server/staticXYGrid.d.ts +1 -1
- package/dist/components/server/svgSizing.d.ts +6 -0
- package/dist/components/shared/svgRoot.d.ts +17 -0
- package/dist/components/store/selectionProvenance.d.ts +6 -0
- package/dist/components/stream/GeoSVGOverlay.d.ts +4 -0
- package/dist/components/stream/NetworkSVGOverlay.d.ts +4 -0
- package/dist/components/stream/OrdinalSVGOverlay.d.ts +4 -0
- package/dist/components/stream/SVGOverlay.d.ts +4 -0
- package/dist/components/stream/SceneToSVG.d.ts +4 -19
- package/dist/components/stream/SceneToSVGXY.d.ts +13 -0
- package/dist/components/stream/StreamGeoFrame.d.ts +1 -2
- package/dist/components/stream/StreamOrdinalFrame.d.ts +1 -2
- package/dist/components/stream/XYGrid.d.ts +11 -0
- package/dist/components/stream/axisTickUtils.d.ts +0 -1
- package/dist/components/stream/hitTestUtils.d.ts +2 -0
- package/dist/components/stream/overlayAccessibleText.d.ts +18 -0
- package/dist/components/stream/physics/PhysicsControllers.d.ts +1 -1
- package/dist/components/stream/physics/PhysicsKernel.d.ts +9 -0
- package/dist/components/stream/physics/PhysicsPipelineStore.d.ts +5 -4
- package/dist/components/stream/physics/PhysicsPipelineTypes.d.ts +9 -0
- package/dist/components/stream/physics/StreamPhysicsTypes.d.ts +3 -0
- package/dist/components/stream/physics/physicsCanvasCoordinates.d.ts +5 -0
- package/dist/components/stream/physics/physicsFixedPosition.d.ts +16 -0
- package/dist/components/stream/physics/physicsKernelCloning.d.ts +6 -0
- package/dist/components/stream/physics/physicsPipelineObservations.d.ts +2 -0
- package/dist/components/stream/physics/physicsPipelineSettle.d.ts +15 -9
- package/dist/components/stream/physics/physicsRegionRuntime.d.ts +8 -17
- package/dist/components/stream/physics/physicsSemanticUI.d.ts +9 -0
- package/dist/components/stream/pipelineConfig.d.ts +4 -0
- package/dist/components/stream/pipelineStoreUpdateResults.d.ts +1 -1
- package/dist/components/stream/resolveXYAxes.d.ts +13 -0
- package/dist/components/stream/sceneToSVGShared.d.ts +2 -1
- package/dist/components/stream/seriesGeometry.d.ts +13 -0
- package/dist/components/stream/streamEncodingTypes.d.ts +53 -0
- package/dist/components/stream/types.d.ts +4 -53
- package/dist/components/stream/useGeoFrameHandle.d.ts +16 -0
- package/dist/components/stream/useOrdinalFrameHandle.d.ts +15 -0
- package/dist/components/stream/useXYFrameHandle.d.ts +15 -0
- package/dist/components/stream/xyAxisTicks.d.ts +25 -0
- package/dist/components/stream/xyDateTicks.d.ts +3 -2
- package/dist/components/stream/xyFrameAxisTypes.d.ts +2 -0
- package/dist/components/stream/xySceneBuilders/ribbonScene.d.ts +1 -1
- package/dist/components/stream/xySceneBuilders/types.d.ts +1 -0
- package/dist/components/text/annotationTextLayout.d.ts +28 -0
- package/dist/components/text/pretextAnnotationLayout.d.ts +29 -0
- package/dist/components/text/usePretextAnnotations.d.ts +12 -0
- package/dist/controls.module.min.js +1 -1
- package/dist/geo.min.js +1 -1
- package/dist/geo.module.min.js +1 -1
- package/dist/network.module.min.js +1 -1
- package/dist/ordinal.module.min.js +1 -1
- package/dist/physics-matter.min.js +1 -1
- package/dist/physics-matter.module.min.js +1 -1
- package/dist/physics-rapier.min.js +1 -1
- package/dist/physics-rapier.module.min.js +1 -1
- package/dist/physics.module.min.js +1 -1
- package/dist/physicsWorker.js +1 -1
- package/dist/processSankeyLayoutWorker.js +1 -1
- package/dist/rough.min.js +1 -1
- package/dist/rough.module.min.js +1 -1
- package/dist/semiotic-access.module.min.js +1 -1
- package/dist/semiotic-ai-artifact-policy-constants.module.min.js +2 -0
- package/dist/semiotic-ai-core.d.ts +33 -22
- package/dist/semiotic-ai-core.min.js +1 -1
- package/dist/semiotic-ai-core.module.min.js +1 -1
- package/dist/semiotic-ai-hash-primitives.module.min.js +2 -0
- package/dist/semiotic-ai.d.ts +15 -3
- package/dist/semiotic-ai.module.min.js +1 -1
- package/dist/semiotic-artifact-react.d.ts +10 -0
- package/dist/semiotic-artifact-react.min.js +2 -0
- package/dist/semiotic-artifact-react.module.min.js +2 -0
- package/dist/semiotic-artifact.d.ts +23 -0
- package/dist/semiotic-artifact.min.js +1 -0
- package/dist/semiotic-artifact.module.min.js +1 -0
- package/dist/semiotic-client-cjs-shared.min.js +1 -1
- package/dist/semiotic-client-glyph.module.min.js +1 -1
- package/dist/semiotic-client-responsive.module.min.js +1 -1
- package/dist/semiotic-client-shared.module.min.js +1 -1
- package/dist/semiotic-custom-layout-selection-cjs-shared.min.js +1 -1
- package/dist/semiotic-data.min.js +1 -1
- package/dist/semiotic-data.module.min.js +1 -1
- package/dist/semiotic-evidence.min.js +1 -1
- package/dist/semiotic-evidence.module.min.js +1 -1
- package/dist/semiotic-experimental-auxiliary.module.min.js +1 -1
- package/dist/semiotic-experimental-node-auxiliary.module.min.js +1 -1
- package/dist/semiotic-experimental-react-shared.module.min.js +1 -1
- package/dist/semiotic-experimental-vacp.min.js +1 -1
- package/dist/semiotic-experimental-vacp.module.min.js +1 -1
- package/dist/semiotic-experimental.d.ts +1 -1
- package/dist/semiotic-line.module.min.js +1 -1
- package/dist/semiotic-physics.d.ts +4 -4
- package/dist/semiotic-realtime-core.module.min.js +1 -1
- package/dist/semiotic-realtime-react.module.min.js +1 -1
- package/dist/semiotic-recipes-core-cjs-base.min.js +1 -1
- package/dist/semiotic-recipes-core.module.min.js +1 -1
- package/dist/semiotic-recipes-geo-cjs.min.js +1 -1
- package/dist/semiotic-recipes-react.min.js +1 -1
- package/dist/semiotic-server-edge-node.module.min.js +1 -1
- package/dist/semiotic-server-edge.min.js +1 -1
- package/dist/semiotic-server-edge.module.min.js +1 -1
- package/dist/semiotic-server-node.min.js +1 -1
- package/dist/semiotic-server-node.module.min.js +1 -1
- package/dist/semiotic-text.d.ts +2 -0
- package/dist/semiotic-text.min.js +2 -0
- package/dist/semiotic-text.module.min.js +2 -0
- package/dist/semiotic-themes-core.min.js +1 -1
- package/dist/semiotic-themes-core.module.min.js +1 -1
- package/dist/semiotic-themes.min.js +1 -1
- package/dist/semiotic-themes.module.min.js +1 -1
- package/dist/semiotic-utils-core.d.ts +18 -18
- package/dist/semiotic-utils-core.min.js +1 -1
- package/dist/semiotic-utils-core.module.min.js +1 -1
- package/dist/semiotic-value.module.min.js +1 -1
- package/dist/semiotic.d.ts +3 -3
- package/dist/semiotic.module.min.js +1 -1
- package/dist/server.min.js +1 -1
- package/dist/server.module.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- package/package.json +55 -14
- package/spec/README.md +8 -3
- package/spec/v0.1/artifact-contract.schema.json +2299 -0
- package/spec/v0.1/examples/artifact-contract-full.json +369 -0
- package/spec/v0.1/examples/artifact-contract-unknown-state.json +46 -0
- package/dist/c-3BLJEQNG.min.js +0 -1
- package/dist/c-3SCUN5HI.min.js +0 -1
- package/dist/c-3VVKFA4M.min.js +0 -1
- package/dist/c-43TJZS3F.min.js +0 -1
- package/dist/c-4DTZPSUD.min.js +0 -1
- package/dist/c-4ES5367Y.min.js +0 -1
- package/dist/c-52TEGIUJ.min.js +0 -1
- package/dist/c-54IRWOGM.min.js +0 -1
- package/dist/c-5D2S4RMI.min.js +0 -1
- package/dist/c-5JWCTX3G.min.js +0 -1
- package/dist/c-6CMMSN6N.min.js +0 -1
- package/dist/c-6HRB2L7H.min.js +0 -1
- package/dist/c-6O5EVOPH.min.js +0 -1
- package/dist/c-7W4SV36A.min.js +0 -1
- package/dist/c-A4WRGZFX.min.js +0 -1
- package/dist/c-AG7WWVIH.min.js +0 -1
- package/dist/c-AH6J4MTN.min.js +0 -1
- package/dist/c-AKAF6JAD.min.js +0 -1
- package/dist/c-ALYR5LKK.min.js +0 -1
- package/dist/c-BBKITSXB.min.js +0 -1
- package/dist/c-BYDPC44I.min.js +0 -1
- package/dist/c-CFFIU2MW.min.js +0 -1
- package/dist/c-CGNHBHCE.min.js +0 -1
- package/dist/c-CJYSXIFV.min.js +0 -1
- package/dist/c-CZF7MV67.min.js +0 -1
- package/dist/c-D53OKBSY.min.js +0 -1
- package/dist/c-DADXPJXV.min.js +0 -1
- package/dist/c-DBQ2V7CH.min.js +0 -1
- package/dist/c-DPMVAUAW.min.js +0 -1
- package/dist/c-ECJCKLYY.min.js +0 -1
- package/dist/c-EGATGOWJ.min.js +0 -1
- package/dist/c-EGR6VYBW.min.js +0 -1
- package/dist/c-ESNR43AN.min.js +0 -1
- package/dist/c-F3LIKINL.min.js +0 -1
- package/dist/c-F5ZB5GJ6.min.js +0 -1
- package/dist/c-G36WS6LN.min.js +0 -1
- package/dist/c-G3VYMHKE.min.js +0 -1
- package/dist/c-GGISSW5E.min.js +0 -1
- package/dist/c-GR6MOEQC.min.js +0 -1
- package/dist/c-GSVCN34B.min.js +0 -1
- package/dist/c-GYOQCEFP.min.js +0 -1
- package/dist/c-H3DNMTCC.min.js +0 -1
- package/dist/c-I6J3FEZE.min.js +0 -1
- package/dist/c-IGH6MGJ5.min.js +0 -1
- package/dist/c-II2EEAJN.min.js +0 -1
- package/dist/c-IUHFPMHD.min.js +0 -1
- package/dist/c-J6M4JHRS.min.js +0 -1
- package/dist/c-JM3MGLQV.min.js +0 -1
- package/dist/c-KM3N7F7R.min.js +0 -1
- package/dist/c-LF5BZFNC.min.js +0 -1
- package/dist/c-LKBSGFQC.min.js +0 -1
- package/dist/c-MNF2S4AA.min.js +0 -1
- package/dist/c-MT3WBK7M.min.js +0 -1
- package/dist/c-NDJADPIF.min.js +0 -1
- package/dist/c-NVPQCIL5.min.js +0 -1
- package/dist/c-NY3JWV2K.min.js +0 -1
- package/dist/c-OFWJBEE5.min.js +0 -1
- package/dist/c-OYFHP5F5.min.js +0 -1
- package/dist/c-PGKQGGQ2.min.js +0 -1
- package/dist/c-PPWDL5ZI.min.js +0 -1
- package/dist/c-Q2IPZ3MU.min.js +0 -1
- package/dist/c-QKHMBE2E.min.js +0 -1
- package/dist/c-QMVM3AY6.min.js +0 -1
- package/dist/c-QSGWX53A.min.js +0 -1
- package/dist/c-RJKEKZOO.min.js +0 -1
- package/dist/c-RSVIHIQ4.min.js +0 -1
- package/dist/c-S6U5CGT5.min.js +0 -1
- package/dist/c-SFDIIU5G.min.js +0 -1
- package/dist/c-SLGMUBUL.min.js +0 -1
- package/dist/c-SRTBCRVE.min.js +0 -1
- package/dist/c-T6UAIKBH.min.js +0 -1
- package/dist/c-TMCTEVVW.min.js +0 -1
- package/dist/c-TMOSJLT3.min.js +0 -1
- package/dist/c-TZW3JGJ5.min.js +0 -1
- package/dist/c-U6ESPM7V.min.js +0 -1
- package/dist/c-UC5PTTFI.min.js +0 -1
- package/dist/c-USFMFKIH.min.js +0 -1
- package/dist/c-VGKUEZBC.min.js +0 -1
- package/dist/c-VGW3VG3I.min.js +0 -1
- package/dist/c-VN2HG5BS.min.js +0 -1
- package/dist/c-VPZDY5Q4.min.js +0 -1
- package/dist/c-VRXUB2F2.min.js +0 -1
- package/dist/c-VUBQNQJH.min.js +0 -1
- package/dist/c-VUH4PGZY.min.js +0 -1
- package/dist/c-W3CE4A4S.min.js +0 -1
- package/dist/c-X5UBGU2V.min.js +0 -1
- package/dist/c-XDRV7RKW.min.js +0 -1
- package/dist/c-YGZHURXZ.min.js +0 -1
- package/dist/c-YZVRZGX2.min.js +0 -1
- /package/dist/{c-N4G2L7ID.min.js → c-HYW2XA4Q.min.js} +0 -0
- /package/dist/{c-ENF72HU5.min.js → c-QAVFOEUY.min.js} +0 -0
- /package/dist/{c-OCI56QF2.min.js → c-V4XMSLC3.min.js} +0 -0
package/dist/c-VRXUB2F2.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{getSelectionProvenance as e}from"./c-PGKQGGQ2.min.js";var t=["#0072B2","#E69F00","#009E73","#CC79A7","#56B4E9","#D55E00","#F0E442","#000000"],r={mode:"light",colors:{primary:"#00a2ce",secondary:"#6c757d",categorical:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],sequential:"blues",diverging:"RdBu",background:"transparent",surface:"#ffffff",text:"#333",textSecondary:"#666",grid:"#e0e0e0",border:"#ccc",selection:"#00a2ce",selectionOpacity:.15,success:"#2ca02c",danger:"#d62728",warning:"#f0ad4e",error:"#b4181b",info:"#00a2ce"},typography:{fontFamily:"sans-serif",titleSize:16,labelSize:12,tickSize:12}},o={mode:"dark",colors:{primary:"#4fc3f7",secondary:"#90a4ae",categorical:["#4fc3f7","#ffb74d","#81c784","#ef5350","#ba68c8","#a1887f","#f06292","#90a4ae","#dce775","#4dd0e1"],sequential:"blues",diverging:"RdBu",background:"#1a1a2e",surface:"#252540",text:"#e0e0e0",textSecondary:"#aaa",grid:"#333",border:"#555",selection:"#4fc3f7",selectionOpacity:.15,success:"#81c784",danger:"#ef5350",warning:"#ffb74d",error:"#d84848",info:"#4fc3f7"},typography:{fontFamily:"sans-serif",titleSize:16,labelSize:12,tickSize:12}},a={mode:"light",colors:{primary:"#0000cc",secondary:"#333333",categorical:t,sequential:"blues",diverging:"RdBu",background:"#ffffff",surface:"#ffffff",text:"#000000",textSecondary:"#333333",grid:"#999999",border:"#000000",focus:"#0000cc",selection:"#0000cc",selectionOpacity:.1,success:"#006400",danger:"#cc0000",warning:"#b15a00",error:"#8b0000",info:"#0000cc"},typography:{fontFamily:"system-ui, sans-serif",titleSize:18,labelSize:14,tickSize:12},tooltip:{background:"#000000",text:"#ffffff",borderRadius:"4px",fontSize:"14px",shadow:"0 2px 8px rgba(0, 0, 0, 0.3)"},borderRadius:"4px"};function i(e){if(!e?.colors)return;const t=e.colors;return{primary:t.primary,secondary:t.secondary||t.primary,surface:t.surface||t.background,success:t.success,danger:t.danger,warning:t.warning,error:t.error,info:t.info,text:t.text,textSecondary:t.textSecondary,border:t.border,grid:t.grid}}function n(e){if(!e.accessibility)return e;let r=e;if(e.accessibility.colorBlindSafe&&(r={...r,colors:{...r.colors,categorical:t}}),e.accessibility.highContrast){const e="dark"===r.mode;r={...r,colors:{...r.colors,text:e?"#ffffff":"#000000",textSecondary:e?"#cccccc":"#333333",grid:e?"#666666":"#999999",border:e?"#888888":"#000000"}}}return r}function c(e,t){if("light"===t)return r;if("dark"===t)return o;if("high-contrast"===t)return a;if("string"==typeof t)return void 0!==console&&console.warn(`[ThemeStore] Unknown theme preset "${t}". Keeping current theme.`),e;const i=e=>t.aesthetics?{...e,...t.aesthetics,weights:{...e?.weights,...t.aesthetics.weights},thresholds:{...e?.thresholds,...t.aesthetics.thresholds},rationales:{...e?.rationales,...t.aesthetics.rationales}}:e;if(t.mode&&"auto"!==t.mode){const e="dark"===t.mode?o:r;return n({...e,...t,colors:{...e.colors,...t.colors||{}},typography:{...e.typography,...t.typography||{}},aesthetics:i(e.aesthetics)})}return n({...e,...t,colors:{...e.colors,...t.colors||{}},typography:{...e.typography,...t.typography||{}},aesthetics:i(e.aesthetics)})}import{createContext as s,useCallback as f,useContext as d,useMemo as l,useRef as u,useSyncExternalStore as p}from"react";import{jsx as g}from"react/jsx-runtime";function b(e){let t=null;const r=()=>(t||(t=s(null)),t),o=y(e);return[function({children:t,initialState:o}){const a=u(o),i=l(()=>y(e,a.current),[]),n=r();return g(n.Provider,{value:i,children:t})},(e,t)=>{const a=r(),i=d(a)??o,n=u(e);n.current=e;const c=u({hasValue:!1,value:void 0}),s=f(()=>{const e=n.current(i.getState()),r=c.current;return r.hasValue&&t&&t(r.value,e)?r.value:(c.current={hasValue:!0,value:e},e)},[i,t]),l=f(()=>n.current(i.getState()),[i]);return p(i.subscribe,s,l)}]}function y(e,t){const r=new Set;let o={...e(function(e){const t=e(o);if(m(t)){o={...o,...t};for(const e of r)e()}}),...t??{}};return{getState:()=>o,subscribe:function(e){return r.add(e),()=>{r.delete(e)}}}}function m(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!0;return!1}var[h,x]=b(e=>({observations:[],maxObservations:100,version:0,pushObservation(t){e(e=>{const r=e.observations;return r.push(t),r.length>e.maxObservations&&r.shift(),{version:e.version+1}})},clearObservations(){e(()=>({observations:[],version:0}))}}));import{useState as S,useEffect as w}from"react";function k(e,t){if("function"==typeof e.addEventListener)return e.addEventListener("change",t),()=>e.removeEventListener("change",t);const r=e;return r.addListener(t),()=>r.removeListener(t)}function z(e){return!("undefined"==typeof window||!window.matchMedia)&&window.matchMedia(e).matches}function v(){const[e,t]=S(()=>z("(prefers-reduced-motion: reduce)"));return w(()=>{if("undefined"==typeof window||!window.matchMedia)return;const e=window.matchMedia("(prefers-reduced-motion: reduce)");return t(e.matches),k(e,e=>t(e.matches))},[]),e}function F(){const[e,t]=S(()=>z("(forced-colors: active)"));return w(()=>{if("undefined"==typeof window||!window.matchMedia)return;const e=window.matchMedia("(forced-colors: active)");return t(e.matches),k(e,e=>t(e.matches))},[]),e}function R(e){const t=[];for(const[r,o]of Object.entries(e.fields))if("point"===o.type)t.push(e=>o.values.has(e[r]));else{const[e,a]=o.range;t.push(t=>{const o=t[r];return o>=e&&a>=o})}return e=>t.every(t=>t(e))}function M(t,r){const o=[];for(const[e,a]of t.clauses)"crossfilter"===t.resolution&&e===r||o.push(R(a));if(0===o.length)return()=>!0;const a="intersect"===t.resolution?e=>o.every(t=>t(e)):e=>o.some(t=>t(e));return t=>a(t)||(e(t)?.some(a)??!1)}function q(e,t){let r=e.get(t);return r||(r={name:t,resolution:"union",clauses:new Map},e.set(t,r)),r}function O(e,t){if(e.type!==t.type)return!1;if("interval"===e.type&&"interval"===t.type)return e.range[0]===t.range[0]&&e.range[1]===t.range[1];if("point"===e.type&&"point"===t.type){if(e.values.size!==t.values.size)return!1;for(const r of e.values)if(!t.values.has(r))return!1;return!0}return!1}var[B,E]=b(e=>({selections:new Map,setClause(t,r){e(e=>{const o=e.selections.get(t),a=o?.clauses.get(r.clientId);if(a&&function(e,t){if(e.clientId!==t.clientId||e.type!==t.type)return!1;const r=Object.entries(e.fields);if(r.length!==function(e){let t=0;for(const r in e)t++;return t}(t.fields))return!1;for(const[e,o]of r){const r=t.fields[e];if(!r||!O(o,r))return!1}return!0}(a,r))return{};const i=new Map(e.selections),n=q(i,t),c=new Map(n.clauses);return c.set(r.clientId,r),i.set(t,{...n,clauses:c}),{selections:i}})},clearClause(t,r){e(e=>{const o=e.selections.get(t);if(!o||!o.clauses.has(r))return{};const a=new Map(e.selections),i=new Map(o.clauses);return i.delete(r),a.set(t,{...o,clauses:i}),{selections:a}})},setResolution(t,r){e(e=>{const o=e.selections.get(t);if(o?.resolution===r)return{};const a=new Map(e.selections),i=q(a,t);return a.set(t,{...i,resolution:r}),{selections:a}})},clearSelection(t){e(e=>{const r=e.selections.get(t);if(!r||0===r.clauses.size)return{};const o=new Map(e.selections);return o.set(t,{...r,clauses:new Map}),{selections:o}})}})),C=["#6929c4","#1192e8","#005d5d","#9f1853","#fa4d56","#570408","#198038","#002d9c","#ee538b","#b28600","#009d9a","#012749","#8a3800","#a56eff"],j={danger:"#da1e28",warning:"#f1c21b",success:"#24a148",info:"#0043ce"},I={light:r,dark:o,"high-contrast":a,pastels:{mode:"light",colors:{primary:"#c9a0dc",secondary:"#b8a8c8",categorical:["#f0a0c0","#88d4ab","#b0a0e8","#f0c888"],sequential:"purples",background:"#fdf6f0",surface:"#fff5ee",text:"#4a3728",textSecondary:"#7a644a",grid:"#e8d5c4",border:"#e8d5c4",focus:"#8a5fae",annotation:"#8a5fae",success:"#9ad4a3",danger:"#e8869a",warning:"#f0c888",error:"#c86070",info:"#9cb8e0"},typography:{fontFamily:"Inter, system-ui, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#fff5ee",text:"#4a3728",borderRadius:"8px",shadow:"0 2px 8px rgba(0, 0, 0, 0.12)"},borderRadius:"10px"},"pastels-dark":{mode:"dark",colors:{primary:"#c9a0dc",secondary:"#a899c0",categorical:["#f0a0c0","#88d4ab","#b0a0e8","#f0c888"],sequential:"purples",background:"#1a1525",surface:"#251e35",text:"#e8ddf0",textSecondary:"#a899c0",grid:"#3d3455",border:"#3d3455",focus:"#c9a0dc",annotation:"#c9a0dc",success:"#88d4ab",danger:"#f0a0c0",warning:"#f0c888",error:"#e87690",info:"#9cb8e0"},typography:{fontFamily:"Inter, system-ui, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#251e35",text:"#e8ddf0",borderRadius:"8px",shadow:"0 4px 12px rgba(0, 0, 0, 0.4)"},borderRadius:"10px"},"bi-tool":{mode:"light",colors:{primary:"#2563eb",secondary:"#6b7280",categorical:["#2563eb","#0d9488","#ea580c","#6b7280"],sequential:"blues",background:"#f5f6f8",surface:"#ffffff",text:"#2c3e50",textSecondary:"#64717f",grid:"#d8dce3",border:"#d8dce3",focus:"#2563eb",annotation:"#2563eb",success:"#10b981",danger:"#ef4444",warning:"#f59e0b",error:"#dc2626",info:"#2563eb"},typography:{fontFamily:"'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#ffffff",text:"#2c3e50",borderRadius:"6px",shadow:"0 2px 8px rgba(0, 0, 0, 0.12)"},borderRadius:"8px"},"bi-tool-dark":{mode:"dark",colors:{primary:"#3b82f6",secondary:"#9ca3af",categorical:["#3b82f6","#14b8a6","#f97316","#9ca3af"],sequential:"blues",background:"#111827",surface:"#1f2937",text:"#f3f4f6",textSecondary:"#9ca3af",grid:"#374151",border:"#374151",focus:"#3b82f6",annotation:"#3b82f6",success:"#34d399",danger:"#f87171",warning:"#fbbf24",error:"#ef4444",info:"#60a5fa"},typography:{fontFamily:"'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#1f2937",text:"#f3f4f6",borderRadius:"6px",shadow:"0 4px 12px rgba(0, 0, 0, 0.4)"},borderRadius:"8px"},italian:{mode:"light",colors:{primary:"#cc0000",secondary:"#666666",categorical:["#cc0000","#333333","#c8a415","#4682b4"],sequential:"reds",background:"#fafafa",surface:"#ffffff",text:"#1a1a1a",textSecondary:"#666666",grid:"#e0e0e0",border:"#e0e0e0",focus:"#cc0000",annotation:"#cc0000",success:"#556b2f",danger:"#cc0000",warning:"#c8a415",error:"#8b0000",info:"#4682b4"},typography:{fontFamily:"'Helvetica Neue', Helvetica, Arial, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#ffffff",text:"#1a1a1a",borderRadius:"2px",shadow:"0 2px 4px rgba(0, 0, 0, 0.15)"},borderRadius:"2px"},"italian-dark":{mode:"dark",colors:{primary:"#ff3333",secondary:"#aaaaaa",categorical:["#ff3333","#aaaaaa","#d4a843","#6aa4d4"],sequential:"reds",background:"#0a0a0a",surface:"#1a1a1a",text:"#f5f5f5",textSecondary:"#aaaaaa",grid:"#333333",border:"#333333",focus:"#ff3333",annotation:"#ff3333",success:"#7a8b5a",danger:"#ff3333",warning:"#d4a843",error:"#cc0000",info:"#6aa4d4"},typography:{fontFamily:"'Helvetica Neue', Helvetica, Arial, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#1a1a1a",text:"#f5f5f5",borderRadius:"2px",shadow:"0 2px 8px rgba(0, 0, 0, 0.5)"},borderRadius:"2px"},tufte:{mode:"light",colors:{primary:"#8b0000",secondary:"#555555",categorical:["#8b4513","#556b2f","#4a5568","#800020"],sequential:"oranges",background:"#fffff8",surface:"#fffff8",text:"#111111",textSecondary:"#555555",grid:"#e0ddd0",border:"#e0ddd0",focus:"#8b0000",annotation:"#8b0000",success:"#556b2f",danger:"#8b0000",warning:"#b88700",error:"#6b0000",info:"#4a5568"},typography:{fontFamily:"Georgia, 'Times New Roman', serif",titleSize:16,labelSize:12,tickSize:12,tickFontFamily:"'Courier New', Courier, monospace",legendSize:11},tooltip:{background:"#fffff8",text:"#111111",borderRadius:"2px",shadow:"0 1px 3px rgba(0, 0, 0, 0.1)"},borderRadius:"0px"},"tufte-dark":{mode:"dark",colors:{primary:"#c05050",secondary:"#a09880",categorical:["#c08050","#7a8b5a","#8090a0","#a05060"],sequential:"oranges",background:"#1c1b18",surface:"#262520",text:"#e8e4d8",textSecondary:"#a09880",grid:"#3d3c35",border:"#3d3c35",focus:"#c05050",annotation:"#d06a6a",success:"#7a8b5a",danger:"#c05050",warning:"#c8a060",error:"#a04040",info:"#8090a0"},typography:{fontFamily:"Georgia, 'Times New Roman', serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#262520",text:"#e8e4d8",borderRadius:"2px",shadow:"0 2px 6px rgba(0, 0, 0, 0.4)"},borderRadius:"0px"},journalist:{mode:"light",colors:{primary:"#e45050",secondary:"#666666",categorical:["#3a86c8","#e45050","#d4a843","#888888"],sequential:"blues",background:"#ffffff",surface:"#f8f8f8",text:"#222222",textSecondary:"#666666",grid:"#d4d4d4",border:"#d4d4d4",focus:"#e45050",annotation:"#c63b3b",success:"#2d7a3d",danger:"#c8303a",warning:"#d4a843",error:"#a02028",info:"#3a86c8"},typography:{fontFamily:"'Franklin Gothic Medium', 'Libre Franklin', Arial, sans-serif",titleSize:18,labelSize:12,tickSize:12,tickFontFamily:"'Courier New', Courier, monospace",legendSize:11},tooltip:{background:"#f8f8f8",text:"#222222",borderRadius:"4px",shadow:"0 2px 6px rgba(0, 0, 0, 0.12)"},borderRadius:"4px"},"journalist-dark":{mode:"dark",colors:{primary:"#ff6b6b",secondary:"#a0a0a0",categorical:["#5a9fd8","#ff6b6b","#e0c060","#aaaaaa"],sequential:"blues",background:"#141414",surface:"#1e1e1e",text:"#ededed",textSecondary:"#a0a0a0",grid:"#383838",border:"#383838",focus:"#ff6b6b",annotation:"#ff6b6b",success:"#6fba78",danger:"#ff6b6b",warning:"#e0c060",error:"#d04040",info:"#5a9fd8"},typography:{fontFamily:"'Franklin Gothic Medium', 'Libre Franklin', Arial, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#1e1e1e",text:"#ededed",borderRadius:"4px",shadow:"0 4px 12px rgba(0, 0, 0, 0.4)"},borderRadius:"4px"},playful:{mode:"light",colors:{primary:"#8b5cf6",secondary:"#7c5a9e",categorical:["#8b5cf6","#ec4899","#06b6d4","#84cc16"],sequential:"viridis",background:"#fdf8ff",surface:"#ffffff",text:"#2d1b4e",textSecondary:"#7c5a9e",grid:"#e8d0f8",border:"#e8d0f8",focus:"#8b5cf6",annotation:"#7a47e8",success:"#10d870",danger:"#ff4b6e",warning:"#ffaa33",error:"#e11d48",info:"#06b6d4"},typography:{fontFamily:"'Nunito', 'Poppins', system-ui, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#ffffff",text:"#2d1b4e",borderRadius:"12px",shadow:"0 4px 12px rgba(139, 92, 246, 0.15)"},borderRadius:"12px"},"playful-dark":{mode:"dark",colors:{primary:"#a78bfa",secondary:"#b8a0d8",categorical:["#a78bfa","#f472b6","#22d3ee","#a3e635"],sequential:"viridis",background:"#150a28",surface:"#1f1138",text:"#f0e8ff",textSecondary:"#b8a0d8",grid:"#3a2560",border:"#3a2560",focus:"#a78bfa",annotation:"#a78bfa",success:"#4ade80",danger:"#fb7185",warning:"#fbbf24",error:"#f43f5e",info:"#22d3ee"},typography:{fontFamily:"'Nunito', 'Poppins', system-ui, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#1f1138",text:"#f0e8ff",borderRadius:"12px",shadow:"0 4px 12px rgba(0, 0, 0, 0.4)"},borderRadius:"12px"},carbon:{mode:"light",colors:{primary:"#0f62fe",secondary:"#525252",categorical:["#6929c4","#1192e8","#005d5d","#9f1853"],sequential:"blues",diverging:"RdBu",background:"#ffffff",surface:"#ffffff",text:"#161616",textSecondary:"#525252",grid:"#e0e0e0",border:"#e0e0e0",focus:"#0f62fe",annotation:"#0f62fe",success:"#24a148",danger:"#da1e28",warning:"#f1c21b",error:"#a2191f",info:"#0043ce"},typography:{fontFamily:"'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#ffffff",text:"#161616",borderRadius:"2px",shadow:"0 2px 6px rgba(0, 0, 0, 0.2)"},borderRadius:"0px"},"carbon-dark":{mode:"dark",colors:{primary:"#4589ff",secondary:"#a8a8a8",categorical:["#a56eff","#33b1ff","#08bdba","#ff7eb6"],sequential:"blues",diverging:"RdBu",background:"#161616",surface:"#262626",text:"#f4f4f4",textSecondary:"#a8a8a8",grid:"#393939",border:"#393939",focus:"#4589ff",annotation:"#4589ff",success:"#42be65",danger:"#fa4d56",warning:"#f1c21b",error:"#da1e28",info:"#4589ff"},typography:{fontFamily:"'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#262626",text:"#f4f4f4",borderRadius:"2px",shadow:"0 4px 12px rgba(0, 0, 0, 0.5)"},borderRadius:"0px"}};function N(e){return Object.prototype.hasOwnProperty.call(I,e)?I[e]:void 0}function P(e){const t={"--semiotic-bg":e.colors.background,"--semiotic-text":e.colors.text,"--semiotic-text-secondary":e.colors.textSecondary,"--semiotic-grid":e.colors.grid,"--semiotic-border":e.colors.border,"--semiotic-cell-border":e.colors.cellBorder||e.colors.border,"--semiotic-primary":e.colors.primary,"--semiotic-font-family":e.typography.fontFamily,"--semiotic-secondary":e.colors.secondary||e.colors.primary,"--semiotic-surface":e.colors.surface||e.colors.background};e.colors.categorical.forEach((e,r)=>{t["--semiotic-category-"+(r+1)]=e}),e.colors.focus&&(t["--semiotic-focus"]=e.colors.focus),e.colors.selection&&(t["--semiotic-selection-color"]=e.colors.selection),null!=e.colors.selectionOpacity&&(t["--semiotic-selection-opacity"]=e.colors.selectionOpacity+""),e.colors.diverging&&(t["--semiotic-diverging"]=e.colors.diverging),e.colors.annotation&&(t["--semiotic-annotation-color"]=e.colors.annotation),e.colors.success&&(t["--semiotic-success"]=e.colors.success),e.colors.danger&&(t["--semiotic-danger"]=e.colors.danger),e.colors.warning&&(t["--semiotic-warning"]=e.colors.warning),e.colors.error&&(t["--semiotic-error"]=e.colors.error),e.colors.info&&(t["--semiotic-info"]=e.colors.info),e.tooltip?.background&&(t["--semiotic-tooltip-bg"]=e.tooltip.background),e.tooltip?.text&&(t["--semiotic-tooltip-text"]=e.tooltip.text),e.tooltip?.borderRadius&&(t["--semiotic-tooltip-radius"]=e.tooltip.borderRadius),e.tooltip?.fontSize&&(t["--semiotic-tooltip-font-size"]=e.tooltip.fontSize),e.tooltip?.shadow&&(t["--semiotic-tooltip-shadow"]=e.tooltip.shadow),e.borderRadius&&(t["--semiotic-border-radius"]=e.borderRadius);const r=e.typography.legendSize??e.typography.labelSize;null!=r&&(t["--semiotic-legend-font-size"]=r+"px"),null!=e.typography.legendFontFamily&&(t["--semiotic-legend-font-family"]=e.typography.legendFontFamily),null!=e.typography.legendFontWeight&&(t["--semiotic-legend-font-weight"]=e.typography.legendFontWeight+"");const o=e.typography.titleFontSize??e.typography.titleSize;return null!=o&&(t["--semiotic-title-font-size"]=o+"px"),null!=e.typography.titleFontFamily&&(t["--semiotic-title-font-family"]=e.typography.titleFontFamily),null!=e.typography.titleFontWeight&&(t["--semiotic-title-font-weight"]=e.typography.titleFontWeight+""),null!=e.typography.tickFontFamily&&(t["--semiotic-tick-font-family"]=e.typography.tickFontFamily),null!=e.typography.tickSize&&(t["--semiotic-tick-font-size"]=e.typography.tickSize+"px"),null!=e.typography.labelSize&&(t["--semiotic-axis-label-font-size"]=e.typography.labelSize+"px"),t}import*as L from"react";var[A,G]=b(e=>({theme:r,setTheme(t){e(e=>({theme:c(e.theme,t)}))}}));import{jsx as H,jsxs as T}from"react/jsx-runtime";var U=L.createContext(void 0),W="undefined"==typeof window?L.useEffect:L.useLayoutEffect;function V(e){if("string"!=typeof e)return e;if("light"===e)return"light";if("dark"===e)return"dark";if("high-contrast"===e)return"high-contrast";return N(e)||(void 0!==console&&console.warn(`[ThemeProvider] Unknown theme preset "${e}". Falling back to light theme.`),"light")}function K({theme:e}){const t=G(e=>e.setTheme),i=G(e=>e.theme),n=L.useRef(i);n.current=i;const c=L.useRef(null);L.useEffect(()=>{if(void 0!==e)return;if("undefined"==typeof window||!window.matchMedia)return;const i=window.matchMedia("(forced-colors: active)");return i.matches&&(c.current=n.current===a?r:n.current,t("high-contrast")),k(i,e=>{e.matches?(c.current=n.current===a?c.current??r:n.current,t("high-contrast")):(function(e,t){e(t===r?"light":t===o?"dark":t===a?"high-contrast":t)}(t,c.current??r),c.current=null)})},[e,t]);const s=L.useRef(!1);return W(()=>{s.current?void 0!==e&&t(V(e)):s.current=!0},[e,t]),null}function Q({children:e}){const t=G(e=>e.theme),r={position:"relative",colorScheme:"auto"===t.mode?"light dark":t.mode,...P(t)},o=L.useContext(U),a={};return o&&(a["data-semiotic-theme"]=o),a["data-semiotic-theme-mode"]=t.mode,H("div",{style:r,...a,children:e})}function $({theme:e,children:t}){const o="string"==typeof e&&N(e)?e:void 0,i=L.useMemo(()=>function(e){return void 0!==e?c(r,V(e)):"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(forced-colors: active)").matches?a:r}(e),[e]);return H(A,{initialState:{theme:i},children:T(U.Provider,{value:o,children:[H(K,{theme:e}),H(Q,{children:t})]})})}function D(){return G(e=>e.theme)}export{t as COLOR_BLIND_SAFE_CATEGORICAL,r as LIGHT_THEME,o as DARK_THEME,a as HIGH_CONTRAST_THEME,i as resolveThemeSemanticColors,b as createStore,m as hasOwnEnumerableKey,h as ObservationProvider,x as useObservationSelector,G as useThemeSelector,v as useReducedMotion,F as useHighContrast,M as buildPredicate,B as SelectionProvider,E as useSelectionSelector,C as CARBON_CATEGORICAL_14,j as CARBON_ALERT,I as THEME_PRESETS,N as resolveThemePreset,P as themeToCSSVariables,$ as ThemeProviderWrapper,D as useTheme};
|
package/dist/c-VUBQNQJH.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{candlestickCanvasRenderer as e,heatmapCanvasRenderer as t,swarmCanvasRenderer as o,waterfallCanvasRenderer as n}from"./c-I6J3FEZE.min.js";import{buildStackedAreaScene as i,computeBins as r}from"./c-TMOSJLT3.min.js";import{areaCanvasRenderer as a}from"./c-AH6J4MTN.min.js";import{barCanvasRenderer as s}from"./c-G3VYMHKE.min.js";import{buildHeatcellNode as c,buildPointNode as l,buildRectNode as f,buildSymbolNode as g}from"./c-F3LIKINL.min.js";import{pointCanvasRenderer as u}from"./c-T6UAIKBH.min.js";import{symbolCanvasRenderer as h}from"./c-5JWCTX3G.min.js";import{resolveAccessor as m,resolveRawAccessor as y}from"./c-MT3WBK7M.min.js";import{SEQUENTIAL_INTERPOLATORS as d,getSequentialInterpolator as p,resolveExplicitColor as b}from"./c-EGR6VYBW.min.js";import{attachSelectionProvenance as S,getSelectionProvenance as v}from"./c-PGKQGGQ2.min.js";import{makeSymbolResolver as M}from"./c-QKHMBE2E.min.js";var w={chartType:"stackedarea",buildScene:(e,t)=>i(e,t),canvasRenderers:[a,u]};function C(e,t){const o=[],n="bubble"===e.config.chartType?10:5,i=e.config.sizeRange||[3,15];let r=null;if(e.getSize&&!e.config.pointStyle){const o=t.map(t=>e.getSize(t)).filter(e=>null!=e&&!Number.isNaN(e));if(o.length>0){let e=1/0,t=-1/0;for(const n of o)e>n&&(e=n),n>t&&(t=n);r=o=>e===t?(i[0]+i[1])/2:i[0]+(o-e)/(t-e)*(i[1]-i[0])}}const a=e.getColor?e.resolveColorMap(t):null,s=e.config.themeSemantic?.primary||"#4e79a7",c=e.getSymbol,f=c?M(c,e.config.symbolMap):null;for(const i of t){let t=e.config.pointStyle?e.config.pointStyle(i):{fill:s,opacity:.8},c=t.r||n;if(r&&e.getSize){const t=e.getSize(i);null==t||Number.isNaN(t)||(c=r(t))}if(a&&e.getColor&&!t.fill){const o=e.getColor(i);o&&a.has(o)&&(t={...t,fill:a.get(o)})}const u=e.getPointId?e.getPointId(i)+"":void 0;if(f){const n=f(i),r=g(i,e.scales,e.getX,e.getY,Math.PI*c*c,n,t,u);r&&o.push(r)}else{const n=l(i,e.scales,e.getX,e.getY,c,t,u);n&&o.push(n)}}return o}var N=[u,h],k={chartType:"scatter",buildScene:(e,t)=>C(e,t),canvasRenderers:N},x={chartType:"bubble",buildScene:(e,t)=>C(e,t),canvasRenderers:N},A=new Map;function F(e,t,o){return t===o?128:Math.min(Math.floor(255*(e-t)/(o-t)+.5),255)}function W(e){const t=Object.prototype.hasOwnProperty.call(d,e)?e:"blues";let o=A.get(t);if(o)return o;o=Array(256);const n=p(t);for(let e=0;256>e;e++)o[e]=n(e/255);return A.set(t,o),o}function j(e,t,o){const n=o.config.areaStyle?.(t);return n&&("string"==typeof n.fill&&(e.fill=n.fill),e.style=n),e}function T(e,t,o){const n=Math.max(1,Math.floor(e.config.heatmapXBins??20)),i=Math.max(1,Math.floor(e.config.heatmapYBins??20)),r=e.config.heatmapAggregation??"count",a=m(e.config.valueAccessor,"value");if(!e.scales||0===t.length)return[];const[s,l]=e.scales.x.domain(),[f,g]=e.scales.y.domain(),u=(l-s||1)/n,h=(g-f||1)/i,y=n*i;if(y>1e6)return[];const d=new Int32Array(y),p=new Float64Array(y),b=v(e.config.areaStyle)?.[0]===e.config.areaStyle?new Map:void 0;for(let o=0;t.length>o;o++){const r=t[o],c=e.getX(r),l=e.getY(r);if(!isFinite(c)||!isFinite(l))continue;const g=Math.min(Math.floor((c-s)/u),n-1),m=Math.min(Math.floor((l-f)/h),i-1);if(0>g||0>m)continue;const y=m*n+g;d[y]++;const S=a(r);if(p[y]+=isFinite(S)?S:0,b){let e=b.get(y);e||(e=[],b.set(y,e)),e.push(r)}}let M=1/0,w=-1/0;for(let e=0;y>e;e++){if(0===d[e])continue;let t;switch(r){case"sum":t=p[e];break;case"mean":t=p[e]/d[e];break;default:t=d[e]}M>t&&(M=t),t>w&&(w=t)}if(!isFinite(M))return[];const C=e.config.heatmapColorScale,N=C?void 0:W("string"==typeof e.config.colorScheme?e.config.colorScheme:e.config.themeSequential||"blues"),k=o.width/n,x=o.height/i,A=e.config.showValues,T=e.config.heatmapValueFormat,z=[];for(let t=0;i>t;t++){const o=t*n;for(let a=0;n>a;a++){const n=o+a;if(0===d[n])continue;let l;switch(r){case"sum":l=p[n];break;case"mean":l=p[n]/d[n];break;default:l=d[n]}const g=F(l,M,w),m=C?C(l):N[g],y=A?{value:l,showValues:!0,valueFormat:T}:{value:l},v=S({xi:a,yi:t,value:l,count:d[n],sum:p[n],xCenter:s+(a+.5)*u,yCenter:f+(t+.5)*h,agg:r},b?.get(n));z.push(j(c(a*k,(i-1-t)*x,k,x,m,v,y),v,e))}}return z}var z={chartType:"heatmap",buildScene:(e,t,o)=>function(e,t,o){if(e.config.heatmapAggregation)return T(e,t,o);if(0===t.length)return[];const n=m(e.config.valueAccessor,"value"),i=y(e.config.xAccessor,"x"),r=y(e.config.yAccessor,"y"),a=new Map,s=new Map,l=Array(t.length),f=Array(t.length);for(let e=0;t.length>e;e++){const o=t[e],n=i(o),c=r(o);l[e]=n,f[e]=c,a.has(n)||a.set(n,a.size),s.has(c)||s.set(c,s.size)}const g=a.size,u=s.size;if(0===g||0===u)return[];const h=Array.from(a.keys()),d=Array.from(s.keys()),p=h.every(e=>"number"==typeof e&&!isNaN(e)),b=d.every(e=>"number"==typeof e&&!isNaN(e)),S=4096;if(p&&b&&g*u>S&&t.length>S){const n=new Set;for(let i=0;t.length>i;i++){const r=a.get(l[i]),c=s.get(f[i]);if(void 0!==r&&void 0!==c&&(n.add(c*g+r),n.size>S))return T({...e,config:{...e.config,heatmapAggregation:e.config.valueAccessor?"mean":"count"}},t,o)}}if(p){h.sort((e,t)=>Number(e)-Number(t)),a.clear();for(let e=0;h.length>e;e++)a.set(h[e],e)}if(b){d.sort((e,t)=>Number(e)-Number(t)),s.clear();for(let e=0;d.length>e;e++)s.set(d[e],e)}const v=new Float64Array(t.length),M=new Float64Array(t.length),w=Array(t.length),C=new Map;let N=0;for(let e=0;t.length>e;e++){const o=t[e],i=a.get(l[e]),r=s.get(f[e]);if(void 0===i||void 0===r)continue;const c=n(o),u=r*g+i,h=C.get(u);let m;void 0!==h?m=h:(m=N++,C.set(u,m)),v[m]=u,M[m]=c,w[m]=o}let k=1/0,x=-1/0;for(let e=0;N>e;e++){const t=M[e];isFinite(t)&&(k>t&&(k=t),t>x&&(x=t))}if(!isFinite(k)||!isFinite(x))return[];const A=e.config.heatmapColorScale,z=A?void 0:W("string"==typeof e.config.colorScheme?e.config.colorScheme:e.config.themeSequential||"blues"),R=o.width/g,Y=o.height/u,X=e.config.showValues,I=e.config.heatmapValueFormat,B=[];for(let t=0;N>t;t++){const o=M[t];if(!isFinite(o))continue;const n=v[t],i=n%g,r=(n-i)/g,a=F(o,k,x),s=A?A(o):z[a],l=w[t];B.push(j(c(i*R,(u-1-r)*Y,R,Y,s,l,X?{value:o,showValues:!0,valueFormat:I}:{value:o}),l,e))}return B}(e,t,o),canvasRenderers:[t]},R={chartType:"bar",buildScene:(e,t)=>function(e,t){if(!e.config.binSize)return{nodes:[],binBoundaries:[]};const o=r(t,e.getX,e.getY,e.config.binSize,e.getCategory,v(e.config.areaStyle)?.[0]===e.config.areaStyle);if(0===o.size)return{nodes:[],binBoundaries:[]};let n=null;if(e.getCategory){const t=new Set;for(const e of o.values())for(const o of e.categories.keys())t.add(o);const i=e.config.barColors?Object.keys(e.config.barColors):[],r=new Set(i),a=Array.from(t).filter(e=>!r.has(e)).sort(),s=i.filter(e=>t.has(e)),c=s.join("\0")+""+a.join("\0");e.barCategoryCache&&e.barCategoryCache.key===c?n=e.barCategoryCache.order:(n=[...s,...a],e.barCategoryCache={key:c,order:n})}const i=[],a=e.scales,[s,c]=a.x.domain(),l=e.config.barStyle,g=e.config.themeSemantic?.primary,u=l?.gap,h="number"!=typeof u||0>u?1:u,m={};l?.stroke&&(m.stroke=l.stroke),"number"==typeof l?.strokeWidth&&(m.strokeWidth=l.strokeWidth),"number"==typeof l?.opacity&&(m.opacity=l.opacity),l?.cursor&&(m.cursor=l.cursor);for(const t of o.values()){const o=Math.max(t.start,s),r=Math.min(t.end,c);if(o>=r)continue;const u=a.x(o),y=a.x(r),d=Math.abs(y-u),p=d>h+1?h:0,v=Math.min(u,y)+p/2,M=Math.max(d-p,1);if(M>0)if(n&&t.categories.size>0){let o=0;for(const r of n){const n=t.categories.get(r)||0;if(0===n)continue;const s=a.y(o),c=a.y(o+n),u=Math.min(s,c),h=Math.abs(s-c),y=(e.config.barColors?b(e.config.barColors,r):void 0)??l?.fill??g??"#4e79a7",d=S({binStart:t.start,binEnd:t.end,total:t.total,category:r,categoryValue:n},t.categoryRows?.get(r)),p=e.config.areaStyle?.(d)??{};i.push(f(v,u,M,h,{fill:y,...m,...p},d,r)),o+=n}}else{const o=a.y(0),n=a.y(t.total),r=Math.min(o,n),s=Math.abs(o-n),c=l?.fill||g||"#007bff",u=S({binStart:t.start,binEnd:t.end,total:t.total},t.rows),h=e.config.areaStyle?.(u)??{};i.push(f(v,r,M,s,{fill:c,...m,...h},u))}}const y=new Set;for(const e of o.values())y.add(e.start),y.add(e.end);return{nodes:i,binBoundaries:Array.from(y).sort((e,t)=>e-t)}}(e,t),canvasRenderers:[s]},Y={chartType:"swarm",buildScene:(e,t)=>function(e,t){const o=[],n=e.config.swarmStyle||{},i=n.radius??3,r=n.fill??e.config.themeSemantic?.primary??"#007bff",a=n.opacity??.7,s=n.stroke,c=n.strokeWidth,l=n.cursor;for(const n of t){const t=e.getX(n),f=e.getY(n);if(null==f||Number.isNaN(f))continue;const g=e.scales.x(t),u=e.scales.y(f);let h=r;if(e.getCategory){const t=e.getCategory(n)+"";h=(e.config.barColors?b(e.config.barColors,t):void 0)??h}const{r:m,...y}=e.config.pointStyle?.(n)??{},d={type:"point",x:g,y:u,r:m??i,style:{fill:h,opacity:a,stroke:s,strokeWidth:c,cursor:l,...y},datum:n};e.getPointId&&(d.pointId=e.getPointId(n)+""),o.push(d)}return o}(e,t),canvasRenderers:[o]},X={chartType:"waterfall",buildScene:(e,t,o)=>function(e,t,o){const n=[],i=e.scales,r=e.config.waterfallStyle,a=t.filter(t=>{const o=e.getY(t),n=e.getX(t);return null!=o&&!Number.isNaN(o)&&null!=n&&isFinite(n)});if(0===a.length)return n;const s=r?.positiveColor??e.config.themeSemantic?.success??"#28a745",c=r?.negativeColor??e.config.themeSemantic?.danger??"#dc3545",l=r?.gap??1,g=r?.stroke,u=r?.strokeWidth,h=r?.opacity;let m=0;for(let t=0;a.length>t;t++){const y=a[t],d=e.getX(y),p=e.getY(y),b=m+p,S=i.x(d),v=t>0?i.x(e.getX(a[t-1])):void 0,M=a.length-1>t?i.x(e.getX(a[t+1])):void 0,w=null!=v?(v+S)/2:null!=M?S-(M-S)/2:S-o.width/20,C=null!=M?(S+M)/2:null!=v?S+(S-v)/2:S+o.width/20,N=Math.min(w,C)+l/2,k=Math.max(w,C)-l/2-N;if(0>=k){m=b;continue}const x=i.y(m),A=i.y(b),F=Math.min(x,A),W=Math.abs(x-A),j=0>p?c:s,T={...y,baseline:m,cumEnd:b,delta:p,_connectorStroke:r?.connectorStroke,_connectorWidth:r?.connectorWidth},z={fill:j,stroke:g,strokeWidth:u,opacity:h,cursor:r?.cursor,...e.config.areaStyle?.(T)};n.push(f(N,F,k,W,z,T)),m=b}return n}(e,t,o),canvasRenderers:[n]},I={chartType:"candlestick",buildScene:(e,t,o)=>function(e,t,o){if(!e.getHigh||!e.getLow||!e.scales)return[];const n=e.config.candlestickRangeMode??!1;if(!(n||e.getOpen&&e.getClose))return[];const i=[],r=e.config.candlestickStyle||{},a=r.rangeColor||"#6366f1",s=n?a:r.upColor||"#28a745",c=n?a:r.downColor||"#dc3545",l=n?a:r.wickColor||"#333",f=r.wickWidth||(n?2:1),g=t.map(t=>e.getX(t)).filter(e=>null!=e&&!Number.isNaN(e)).sort((e,t)=>e-t);let u=r.bodyWidth??0;if(null==r.bodyWidth)if(g.length>1){let t=1/0;for(let o=1;g.length>o;o++){const n=Math.abs(e.scales.x(g[o])-e.scales.x(g[o-1]));n>0&&t>n&&(t=n)}u=t!==1/0?Math.max(2,Math.min(.6*t,20)):6}else u=6;for(const a of t){const t=e.getX(a);if(null==t||Number.isNaN(t))continue;const g=e.getHigh(a),h=e.getLow(a);if(null==g||Number.isNaN(g)||null==h||Number.isNaN(h))continue;const m=n?g:e.getOpen(a),y=n?h:e.getClose(a);if(!n&&[m,y].some(e=>null==e||Number.isNaN(e)))continue;const d=y>=m,p={type:"candlestick",x:e.scales.x(t),openY:e.scales.y(m),closeY:e.scales.y(y),highY:e.scales.y(g),lowY:e.scales.y(h),bodyWidth:u,upColor:s,downColor:c,wickColor:l,wickWidth:f,isUp:d,style:{cursor:r.cursor,...e.config.pointStyle?.(a)??{}},datum:a};n&&(p.isRange=!0,p.dotRadius=Math.max(2,Math.min(u/2,.12*o.height))),i.push(p)}return i}(e,t,o),canvasRenderers:[e]};export{w as stackedAreaXYPlugin,k as scatterXYPlugin,x as bubbleXYPlugin,z as heatmapXYPlugin,R as barXYPlugin,Y as swarmXYPlugin,X as waterfallXYPlugin,I as candlestickXYPlugin};
|
package/dist/c-VUH4PGZY.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{barXYPlugin as m,bubbleXYPlugin as o,candlestickXYPlugin as i,heatmapXYPlugin as r,scatterXYPlugin as n,stackedAreaXYPlugin as t,swarmXYPlugin as c,waterfallXYPlugin as f}from"./c-VUBQNQJH.min.js";import{customXYPlugin as p}from"./c-I6J3FEZE.min.js";import{areaXYPlugin as j,lineXYPlugin as s,mixedXYPlugin as J,registerXYPlugin as E}from"./c-TMOSJLT3.min.js";function Q(){E(s),E(j),E(t),E(J),E(n),E(o),E(r),E(m),E(c),E(f),E(i),E(p)}export{Q as registerBuiltInXYPlugins};
|
package/dist/c-W3CE4A4S.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t=/^\d{4}-\d{1,2}$/;function e(e){const n=e.trim();if(!n||!Number.isNaN(Number(n)))return NaN;const r=t.test(n)?n+"-01":n;if(r===n&&10>n.length)return NaN;const i=Date.parse(r);return Number.isFinite(i)?i:NaN}function n(t){return t instanceof Date?t.getTime():"string"==typeof t?e(t):+t}export{e as parseDateLikeString,n as coerceDateLikeValue};
|
package/dist/c-X5UBGU2V.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function t(t,r=.5){const a=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(t);if(!a)return t;const n=Math.round(parseInt(a[1],16)*(1-r)),o=Math.round(parseInt(a[2],16)*(1-r)),e=Math.round(parseInt(a[3],16)*(1-r));return`#${n.toString(16).padStart(2,"0")}${o.toString(16).padStart(2,"0")}${e.toString(16).padStart(2,"0")}`}function r(t,r=.5){const a=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(t);if(!a)return t;const n=Math.round(parseInt(a[1],16)+(255-parseInt(a[1],16))*r),o=Math.round(parseInt(a[2],16)+(255-parseInt(a[2],16))*r),e=Math.round(parseInt(a[3],16)+(255-parseInt(a[3],16))*r);return`#${n.toString(16).padStart(2,"0")}${o.toString(16).padStart(2,"0")}${e.toString(16).padStart(2,"0")}`}export{t as darkenColor,r as lightenColor};
|
package/dist/c-XDRV7RKW.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{filterAnnotationsByStatus as e,resolveAccessor as t,resolveRawAccessor as n}from"./c-NDJADPIF.min.js";var r=new Set(["LineChart","AreaChart","StackedAreaChart","DifferenceChart","Scatterplot","BubbleChart","ConnectedScatterplot","QuadrantChart","MultiAxisLineChart","MinimapChart"]),a=new Set(["BarChart","StackedBarChart","GroupedBarChart","DotPlot"]),o=new Set(["PieChart","DonutChart","FunnelChart"]),i=new Set(["Histogram","BoxPlot","ViolinPlot","RidgelinePlot","SwarmPlot"]);function l(e,t){return a.has(e)||o.has(e)||"SwimlaneChart"===e||"GaugeChart"===e?{measure:t.valueAccessor,measureFallback:"value",dimension:t.categoryAccessor??t.stepAccessor,dimensionFallback:"category"}:{measure:t.yAccessor??t.valueAccessor,measureFallback:"y",dimension:t.xAccessor,dimensionFallback:"x"}}function s(e){for(const t of["lineBy","areaBy","stackBy","groupBy","colorBy"]){const n=e[t];if("string"==typeof n&&n)return n}}function c(e,t){return null==e?"—":e instanceof Date?e.toISOString().slice(0,10):"number"==typeof e?t(e):e+""}function u(e,t=new Set){if(null===e)return!0;const n=typeof e;if("string"===n||"boolean"===n)return!0;if("number"===n)return Number.isFinite(e);if("object"!==n)return!1;if(t.has(e))return!1;t.add(e);const r=Array.isArray(e)?e.every(e=>u(e,t)):Object.entries(e).every(([,e])=>u(e,t));return t.delete(e),r}var d=Symbol.for("semiotic.chartRecipeRegistry");function h(e){return function(){const e=globalThis;return e[d]||(e[d]={recipes:new Map,capabilities:new Map,layouts:new Map}),e[d]}().recipes.get(e)}function f(e){return"string"==typeof e?h(e):e&&"object"==typeof e&&"string"==typeof e.id?e:void 0}function m(e){return"string"==typeof e?e:e.id??e.name}function p(e){return e.layoutConfig&&"object"==typeof e.layoutConfig?e.layoutConfig:{}}function g(e){return Array.isArray(e.data)?e.data:Array.isArray(e.nodes)?e.nodes:Array.isArray(e.points)?e.points:Array.isArray(e.areas)?e.areas:[]}function $(e,t,n){return n??f(t.recipe)??f(t.recipeId)??h(e)}function v(e,t,n=[]){const r=e.accessor?t[e.accessor]:void 0;if("string"==typeof r&&r)return r;if(e.field)return e.field;const a=n.find(e=>e&&"object"==typeof e);if(!a)return;const o=Object.entries(a).filter(([e,t])=>!e.startsWith("_")&&null!=t);return"quantitative"===e.semanticType?o.find(([,e])=>"number"==typeof e)?.[0]:"identifier"===e.semanticType?["id","key","name"].find(e=>e in a):o.find(([,e])=>"string"==typeof e)?.[0]}function b(e,t){return e.dataRoles.find(e=>e.role===t)}function y(e,t){return e.dataRoles.find(e=>t.includes(e.semanticType))}function w(e,t,n,r,a,o={}){const i={...o};if(t)for(const[e,n]of Object.entries(t))i[e]=n;for(const e of n.dataRoles){const n=v(e,r,a),o=t&&n?t[n]:n;void 0!==o&&(i[e.role]=o)}return e.replace(/\{([^}]+)\}/g,(e,t)=>{const n=i[t];return null==n?`{${t}}`:n+""})}var C={LineChart:"line chart",AreaChart:"area chart",StackedAreaChart:"stacked area chart",DifferenceChart:"difference chart",Scatterplot:"scatter plot",BubbleChart:"bubble chart",ConnectedScatterplot:"connected scatter plot",QuadrantChart:"quadrant chart",MultiAxisLineChart:"dual-axis line chart",CandlestickChart:"candlestick chart",BumpChart:"bump chart",Heatmap:"heatmap",MinimapChart:"line chart",BarChart:"bar chart",StackedBarChart:"stacked bar chart",GroupedBarChart:"grouped bar chart",DotPlot:"dot plot",Histogram:"histogram",BoxPlot:"box plot",ViolinPlot:"violin plot",RidgelinePlot:"ridgeline plot",SwarmPlot:"swarm plot",PieChart:"pie chart",DonutChart:"donut chart",FunnelChart:"funnel chart",GaugeChart:"gauge",LikertChart:"Likert chart",SwimlaneChart:"swimlane chart",ForceDirectedGraph:"network graph",SankeyDiagram:"Sankey diagram",ProcessSankey:"temporal Sankey diagram",ChordDiagram:"chord diagram",TreeDiagram:"tree diagram",Treemap:"treemap",CirclePack:"circle-packing chart",OrbitDiagram:"orbit diagram",ChoroplethMap:"choropleth map",ProportionalSymbolMap:"proportional-symbol map",FlowMap:"flow map",DistanceCartogram:"distance cartogram",BigNumber:"single value",StreamPhysicsFrame:"physics stream frame",EventDropChart:"event-drop physics chart",GaltonBoardChart:"Galton board chart",UnitPileChart:"physics pile chart",CollisionSwarmChart:"collision swarm chart",PacketFlowChart:"physical flow chart",ProcessFlowChart:"process flow physics chart",CrucibleChart:"crucible physics chart",PhysicsCustomChart:"custom physics chart"},k=new Set(["ForceDirectedGraph","SankeyDiagram","ProcessSankey","ChordDiagram"]),A=new Set(["StreamPhysicsFrame","EventDropChart","GaltonBoardChart","UnitPileChart","CollisionSwarmChart","PacketFlowChart","ProcessFlowChart","GauntletChart","CrucibleChart","PhysicsCustomChart"]);function x(e){return C[e]||e.replace(/([a-z])([A-Z])/g,"$1 $2").toLowerCase()+" chart"}function S(e){const t="number"==typeof e?e:"string"==typeof e?Number(e):NaN;return Number.isFinite(t)?t:void 0}var j=new Set(["Scatterplot","BubbleChart","ConnectedScatterplot","QuadrantChart","ScatterplotMatrix"]),L={"outlier-detection":"alerting","change-detection":"alerting",trend:"tracking","composition-over-time":"apportioning","compare-series":"comparing","compare-categories":"comparing",rank:"ranking","part-to-whole":"apportioning",distribution:"characterizing",correlation:"relating",flow:"tracing",hierarchy:"nesting",geo:"locating"},P={"time-series":"tracking",categorical:"comparing",distribution:"characterizing",relationship:"relating",flow:"tracing",network:"tracing",hierarchy:"nesting",geo:"locating",realtime:"tracking",value:"presenting",custom:"presenting"},F=["trend","compare-series","compare-categories","rank","part-to-whole","distribution","correlation","flow","hierarchy","geo","composition-over-time","change-detection","outlier-detection"],M={alerting:"alerting",tracking:"trend",comparing:"comparison",ranking:"ranking",apportioning:"composition",characterizing:"distribution",relating:"correlation",tracing:"flow",nesting:"hierarchy",locating:"locator",presenting:"single-value"};function D(e){return L[e]}function B(e,t){const n=function(e){if(e){if("fits"in e||"buildProps"in e){const t=e,n={};for(const[e,r]of Object.entries(t.intentScores))"number"==typeof r&&Number.isFinite(r)&&(n[e]=r);return{family:t.family,intentScores:Object.keys(n).length?n:void 0}}return e}}(t);if(n?.act)return n.act;if(n?.intentScores){const e=function(e){let t,n=0;for(const[r,a]of Object.entries(e))if("number"==typeof a&&a>0)if(a>n)t=r,n=a;else if(a===n&&void 0!==t){const e=F.indexOf(r),n=F.indexOf(t);-1===e||-1!==n&&e>=n||(t=r)}return t}(n.intentScores);if(e&&L[e]&&(n.intentScores[e]??0)>=3)return L[e]}return n?.family?P[n.family]:function(e){return"BumpChart"===e?"ranking":o.has(e)||"StackedAreaChart"===e?"apportioning":j.has(e)?"relating":a.has(e)?"comparing":i.has(e)?"characterizing":r.has(e)?"tracking":k.has(e)?"tracing":"BigNumber"===e?"presenting":void 0}(e)}var N=new Set(["y-threshold","x-threshold","band","x-band","callout","label"]),T=new Set(["system","agent","watcher"]),I=new Set(["ai","agent","system","computed","dbt","great-expectations"]),O=new Set(["rule","statistical-test","llm-inference","computed"]);function R(e){const t=e.annotations;return!!Array.isArray(t)&&t.some(e=>{if(!e||"object"!=typeof e)return!1;const t=e;if("string"!=typeof t.type||!N.has(t.type))return!1;const n=t.provenance;return!(!n||"object"!=typeof n)&&(T.has(n.authorKind)||I.has(n.source)||O.has(n.basis))})}function G(e="en"){let t,n;try{t=new Intl.NumberFormat(e,{notation:"compact",maximumFractionDigits:1}),n=new Intl.NumberFormat(e,{maximumFractionDigits:2})}catch{t=new Intl.NumberFormat("en",{notation:"compact",maximumFractionDigits:1}),n=new Intl.NumberFormat("en",{maximumFractionDigits:2})}return e=>Number.isFinite(e)?1e4>Math.abs(e)?n.format(e):t.format(e):e+""}var q={"y-threshold":"a threshold line","x-threshold":"a threshold line",band:"a highlighted band","x-band":"a highlighted band",label:"a label",callout:"a callout","callout-circle":"a callout","callout-rect":"a callout",text:"a text note",bracket:"a bracket",enclose:"an enclosure","rect-enclose":"an enclosure",highlight:"a highlight",widget:"a widget",trend:"a trend line",envelope:"an envelope","anomaly-band":"an anomaly band",forecast:"a forecast","category-highlight":"a category highlight"};function z(e){const t=q["string"==typeof e.type?e.type:"annotation"]||"an annotation",n=function(e){const t=e.provenance&&"object"==typeof e.provenance?e.provenance:null,n=t?.authorKind??t?.source??t?.basis;return"watcher"===n?"a watcher-flagged ":"agent"===n||"ai"===n||"llm-inference"===n?"an AI-suggested ":""}(e),r=n?n+t.replace(/^an? /,""):t,a="string"==typeof e.label?e.label:"string"==typeof e.title?e.title:void 0;return a?`${r} labeled "${a}"`:r}function U(t){const n=Array.isArray(t.annotations)?t.annotations:null;if(!n||0===n.length)return;const r=e(n.filter(e=>!!e&&"object"==typeof e));if(0===r.length)return;const a=r.map(z),o=a.slice(0,5),i=a.length-o.length,l=function(e){return e.length>1?2===e.length?`${e[0]} and ${e[1]}`:`${e.slice(0,-1).join(", ")}, and ${e[e.length-1]}`:e[0]??""}(o)+(i>0?`, and ${i} more`:""),s=r.length;return`The author has marked ${1===s?"one feature":s+" features"} on this chart: ${l}.`}function E(e,u,d={}){const h=void 0!==d.levels,f=new Set(d.levels??["l1","l2","l3"]);h||!d.capability&&!R(u)||f.add("l4");const b=$(e,u,d.recipe);if(b){const e=["l1","l2","l3","l4"].filter(e=>f.has(e));h||e.includes("l4")||e.push("l4");const t=function(e,t,n={}){const r=g(t),a=p(t),o=n.locale??"en",i="function"==typeof e.description?e.description({data:r,config:a,locale:o}):void 0,l=i?.levels??function(e,t,n,r){const a=y(e,["nominal","ordinal"]),o=y(e,["quantitative"]),i=a?v(a,n,t):void 0,l=o?v(o,n,t):void 0,s=a?.role??i??"category",c=o?.role??l??"value",u=e.encodings??[],d=u.length?u.slice(0,3).map(e=>e.meaning.replace(/\.$/,"")).join("; "):`${s} and ${c} are mapped through the recipe's declared visual semantics`,{number:h,percent:f}=function(e){try{return{number:new Intl.NumberFormat(e,{maximumFractionDigits:2}),percent:new Intl.NumberFormat(e,{style:"percent",maximumFractionDigits:1})}}catch{return{number:new Intl.NumberFormat("en",{maximumFractionDigits:2}),percent:new Intl.NumberFormat("en",{style:"percent",maximumFractionDigits:1})}}}(r),p=new Map;if(i&&l)for(const e of t){const t=(e[i]??"Uncategorized")+"",n=Number(e[l]);Number.isFinite(n)&&p.set(t,(p.get(t)??0)+n)}const g=[...p].sort((e,t)=>t[1]-e[1]),$=g.reduce((e,[,t])=>e+t,0),b=g[0],w=g[1],C=$>0?((b?.[1]??0)+(w?.[1]??0))/$:0,k=e.intents.map(e=>({id:m(e),strength:"string"==typeof e?void 0:e.strength})).sort((e,t)=>"primary"===e.strength?-1:"primary"===t.strength?1:0)[0]?.id,A=e.audience?.primary??e.audienceFit?.find(e=>"strong"===e.fit)?.audience;return{l1:`A ${e.name.toLowerCase()} encodes ${s} and ${c}. ${x=d,x?x.charAt(0).toUpperCase()+x.slice(1):x}.`,l2:g.length>0?`${g.length} categories total ${h.format($)}. ${b[0]} accounts for ${h.format(b[1])}${$>0?` (${f.format(b[1]/$)})`:""}${w?`, followed by ${w[0]} at ${h.format(w[1])}`:""}.`:`${t.length} data ${1===t.length?"item is":"items are"} represented.`,l3:2>g.length?b?b[0]+" is the only represented category.":"No quantitative pattern can be derived from the available data.":.5>C?`The total is distributed across ${g.length} categories without the first two forming a majority.`:`Most of the total is concentrated in ${b[0]} and ${w[0]}, which together account for ${f.format(C)}.`,l4:`The chart is intended for ${k??"explanation"}${A?` with a ${A} audience`:""}: ${e.designContract.whyCustom}`};var x}(e,r,a,o),s=n.levels??["l1","l2","l3","l4"],c={};for(const e of s)l[e]&&(c[e]=l[e]);const u=["l1","l2","l3","l4"].map(e=>c[e]).filter(e=>!!e).join(" "),d=n.includeCaveats?[...e.reception?.risks??[],...e.caveats??[],...(e.designContract.misuse??[]).map(e=>"Misuse: "+e)]:void 0;return{text:u,levels:c,...d?.length?{caveats:d}:{}}}(b,u,{levels:e,locale:d.locale,audience:d.audience,includeCaveats:d.includeCaveats}),n=U(u);return{...t,text:n?`${n} ${t.text}`.trim():t.text,...n?{annotations:n}:{}}}const w=G(d.locale??"en"),C=x(e),j=Array.isArray(u.data)?u.data:null,L=s(u),P=A.has(e)?function(e,t){const n=e.physics&&"object"==typeof e.physics?e.physics:null,r=e.settledProjection&&"object"==typeof e.settledProjection?e.settledProjection:null,a=[e.settledProjectionRows,e.projectionRows,r?.rows,n?.settledProjectionRows,n?.projectionRows,n?.settledProjection&&"object"==typeof n.settledProjection?n.settledProjection.rows:void 0].find(e=>Array.isArray(e));return Array.isArray(a)?a.map((e,n)=>{if(!e||"object"!=typeof e)return null;const r=e,a=S(r.count??r.value??r.total??r.bodies??r.events);if(null==a)return null;const o=r.label??r.id??r.name??"container "+(n+1),i=S(r.secondary??r.secondaryCount),l=S(r.observed??r.observedCount);return{label:c(o,t),count:a,...null!=i?{secondary:i}:{},..."string"==typeof r.secondaryLabel&&r.secondaryLabel?{secondaryLabel:r.secondaryLabel}:{},...null!=l?{observed:l}:{}}}).filter(e=>null!=e):null}(u,w):null,{measure:F,measureFallback:D,dimension:N,dimensionFallback:T}=l(e,u),I="string"==typeof F&&F?F:D,O="string"==typeof N&&N?N:T,q={};if(A.has(e)&&function(e,t,n,r,a,o){const i=function(e){return"EventDropChart"===e?"time window":"GaltonBoardChart"===e?"bin":"CollisionSwarmChart"===e?"group lane":"PacketFlowChart"===e?"flow node":"CrucibleChart"===e?"result group":"container"}(e),l=function(e){return"EventDropChart"===e?"event":"GaltonBoardChart"===e?"sample":"CollisionSwarmChart"===e?"point":"PacketFlowChart"===e?"packet":"CrucibleChart"===e?"settled item":"body"}(e);if(a.has("l1")&&(r.l1=function(e,t){return"EventDropChart"===e?"An event-drop physics chart that collapses moving events into a settled projection by event-time window.":"GaltonBoardChart"===e?"A Galton board chart that collapses falling samples into a settled histogram projection.":"UnitPileChart"===e?"A physics pile chart that collapses moving bodies into a settled bar-style projection by container.":"CollisionSwarmChart"===e?"A collision swarm chart that separates overlapping points while preserving their quantitative axis position.":"PacketFlowChart"===e?"A physical flow chart that keeps authored routes visible while packet bodies show throughput and proximity events.":"CrucibleChart"===e?"A crucible physics chart that replays authored phases and events into declared products and outlets; the settled ledger, not collisions, determines the result.":`A ${t} whose accessible reading is the settled projection rather than individual trajectories.`}(e,t)),!a.has("l2")&&!a.has("l3"))return;if(!n||0===n.length)return void(a.has("l2")&&(r.l2="No settled projection is loaded yet."));const s=n.reduce((e,t)=>e+t.count,0),c=n.filter(e=>e.count>0).sort((e,t)=>t.count-e.count),u=c[0]??n.slice().sort((e,t)=>t.count-e.count)[0];if(!u)return;const d=n.reduce((e,t)=>e+(t.secondary??0),0),h=n.find(e=>e.secondaryLabel)?.secondaryLabel??"secondary";if(a.has("l2"))if(0===c.length)r.l2=`The settled projection contains ${o(s)} ${V(s,l)} across ${n.length} ${V(n.length,i)}; no ${V(2,i)} are non-empty yet.`;else{const e=d>0?` ${o(d)} ${V(d,l)} ${1===d?"is":"are"} marked ${h}.`:"";r.l2=`The settled projection contains ${o(s)} ${V(s,l)} across ${n.length} ${V(n.length,i)}; ${c.length} ${V(c.length,i)} ${1===c.length?"is":"are"} non-empty. The largest ${i} is ${u.label} with ${o(u.count)} ${V(u.count,l)}.${e}`}if(a.has("l3")&&s>0&&c.length>0){const e=c.find(e=>e!==u),t=function(e,t){if(0>=t)return"0%";const n=e/t*100;return(10>n?Math.round(10*n)/10:Math.round(n))+"%"}(u.count,s);r.l3=e?`The settled projection is most concentrated in ${u.label}, which holds ${o(u.count)} ${V(u.count,l)} (${t}); ${e.label} follows with ${o(e.count)} ${V(e.count,l)}.`:`The settled projection is concentrated in ${u.label}, which holds all ${o(u.count)} ${V(u.count,l)}.`}}(e,C,P,q,f,w),f.has("l1")&&!A.has(e))if("BumpChart"===e)q.l1=`A ${C} ranking ${L??"series"} by ${I} across ${O}.`;else if(r.has(e)||a.has(e))q.l1=`A ${C} of ${I} by ${O}`+(L?`, split by ${L}.`:".");else if(o.has(e))q.l1=`A ${C} showing ${I} across ${O} categories.`;else if(i.has(e))q.l1=`A ${C} of the distribution of ${I}`+(L?` by ${L}.`:".");else if(k.has(e)){const e=Array.isArray(u.nodes)?u.nodes.length:void 0,t=Array.isArray(u.edges)?u.edges.length:void 0,n=[null!=e?`${e} ${V(e,"node")}`:null,null!=t?`${t} ${V(t,"edge")}`:null].filter(Boolean);q.l1=`A ${C}${n.length?" with "+n.join(" and "):""}.`}else if("BigNumber"===e){const e="string"==typeof u.label?u.label:I;q.l1=`A single value${e?" for "+e:""}.`}else q.l1=`A ${C}.`;const z=r.has(e)||"BumpChart"===e||a.has(e)||o.has(e)||i.has(e);let E=null;if((f.has("l2")||f.has("l3")||f.has("l4"))&&z&&j&&j.length>0&&(E=function(e,t,n,r){let a=0,o=0,i=1/0,l=-1/0,s=null,u=null,d=0,h=0,f=null,m=null,p=NaN,g=NaN;for(const n of e){const e=t(n);Number.isFinite(e)&&(0===a&&(p=e,f=n),g=e,m=n,i>e&&(i=e,s=n,d=a),e>l&&(l=e,u=n,h=a),a++,o+=e)}return 0===a?null:{count:a,min:i,max:l,mean:o/a,minLabel:c(null!=s?n(s):null,r),maxLabel:c(null!=u?n(u):null,r),first:p,last:g,firstLabel:c(null!=f?n(f):null,r),lastLabel:c(null!=m?n(m):null,r),minIndex:d,maxIndex:h}}(j,t(F,D),n(N,T),w)),f.has("l2")&&z&&(j&&0!==j.length?E&&(q.l2=o.has(e)?`${E.count} segments totaling ${w(function(e){return e.mean*e.count}(E))}. Largest is ${E.maxLabel} at ${w(E.max)}; smallest is ${E.minLabel} at ${w(E.min)}.`:`${I} ranges from ${w(E.min)} (${E.minLabel}) to ${w(E.max)} (${E.maxLabel}), with a mean of ${w(E.mean)} across ${E.count} points.`):q.l2="No data is loaded yet."),f.has("l3")&&E&&!L&&r.has(e)?q.l3=function(e,t,n){const{first:r,last:a,min:o,max:i,maxLabel:l,minLabel:s,firstLabel:c,lastLabel:u,minIndex:d,maxIndex:h,count:f}=e,m=i-o,p=a-r;if(0===m)return`${H(t)} is constant at ${n(r)} across the series.`;if(.04>m/(Math.abs(e.mean)||1))return`${H(t)} ends roughly where it started (${n(r)} at ${c} to ${n(a)} at ${u}), ranging between ${n(o)} and ${n(i)}.`;const g=h>0&&f-1>h,$=d>0&&f-1>d,v=(i-Math.max(r,a))/m,b=(Math.min(r,a)-o)/m;return g&&v>.15?`Overall ${t} climbs to a peak of ${n(i)} (${l}), then falls to ${n(a)} (${u}).`:$&&b>.15?`Overall ${t} drops to a low of ${n(o)} (${s}), then recovers to ${n(a)} (${u}).`:.05>Math.abs(p)/m?`${H(t)} ends roughly where it started (${n(r)} at ${c} to ${n(a)} at ${u}), ranging between ${n(o)} and ${n(i)}.`:p>0?h===f-1?`Overall ${t} rises from ${n(r)} (${c}) to a peak of ${n(a)} (${u}).`:`Overall ${t} rises from ${n(r)} (${c}) to ${n(a)} (${u}), after peaking at ${n(i)} (${l}).`:d===f-1?`Overall ${t} falls from ${n(r)} (${c}) to a low of ${n(a)} (${u}).`:`Overall ${t} falls from ${n(r)} (${c}) to ${n(a)} (${u}), after dipping to ${n(o)} (${s}).`}(E,I,w):f.has("l3")&&E&&!L&&a.has(e)&&(q.l3=`The highest ${O} is ${E.maxLabel} and the lowest is ${E.minLabel}.`),f.has("l4")){const t=R(u)?"alerting":B(e,d.capability);t&&(q.l4=function(e,t,n,r,i,l,s,c){const u=M[e],d=/^[aeiou]/i.test(u)?"an":"a";let h,f;switch(e){case"locating":h="This is a map",f="read values by location";break;case"presenting":h="This is a single-value display",f=`read ${"string"==typeof n.label&&n.label?n.label:i} as the headline number`;break;case"tracing":h=`This is ${d} ${u} chart`,f="follow the movement between states";break;case"nesting":h=`This is ${d} ${u} chart`,f="read it for nested structure and how children sum into their parents";break;case"relating":h=`This is ${d} ${u} chart`,f=`read it for whether ${l} and ${i} move together`;break;default:h=`This is ${d} ${u} chart`,f=function(e,t,n,r,i,l){if(!t)switch(e){case"alerting":return"watch for points that break from the rest";case"tracking":return"read it for the overall direction of "+n;case"comparing":return`compare ${n} across ${r}`;case"ranking":return"read it top to bottom by "+n;case"apportioning":return`read each ${r}'s share of the whole`;case"characterizing":return"read it for the spread and shape of "+n;default:return"read the highlighted features"}switch(e){case"alerting":return function(e,t,n){if(a.has(n)||o.has(n))return`${e.maxLabel} stands out at ${t(e.max)} — check it first`;const{first:r,last:i,min:l,max:s,minLabel:c,maxLabel:u,lastLabel:d,minIndex:h,maxIndex:f,count:m}=e,p=s-l;if(p>0){const e=f>0&&m-1>f,n=h>0&&m-1>h,a=(s-Math.max(r,i))/p,o=(Math.min(r,i)-l)/p;if(e&&a>.15)return`the peak of ${t(s)} at ${u} is the point to investigate`;if(n&&o>.15)return`the dip to ${t(l)} at ${c} is the point to investigate`;if(i>=s)return`the climb to ${t(i)} at ${d} warrants a closer look`;if(l>=i)return`the drop to ${t(i)} at ${d} warrants a closer look`}return`the extremes — ${u} (${t(s)}) and ${c} (${t(l)}) — are the points to check`}(t,i,l);case"tracking":return`read it for the trajectory of ${n}, which ${function(e){const t=e.max-e.min,n=e.last-e.first;return 0===t||.05>Math.abs(n)/t?"holds roughly steady":n>0?"rises":"falls"}(t)} from ${i(t.first)} (${t.firstLabel}) to ${i(t.last)} (${t.lastLabel})`;case"comparing":return`compare ${n} across ${r}; ${t.maxLabel} leads at ${i(t.max)}`;case"ranking":return`read it top to bottom by ${n}; ${t.maxLabel} ranks highest at ${i(t.max)}`;case"apportioning":{const e=t.mean*t.count,n=e>0?Math.round(t.max/e*100):null;return`read each ${r}'s share of the ${i(e)} total; ${t.maxLabel} is the largest at ${i(t.max)}${null!=n?` (${n}%)`:""}`}case"characterizing":return`read it for the spread of ${n}, from ${i(t.min)} to ${i(t.max)}`;default:return"read the highlighted features"}}(e,r,i,l,s,t)}return`${h}; ${f}.${function(e,t){if(!t)return"";const n=t.familiarity?.[e];return"number"!=typeof n||n>2?"":` This ${x(e)} may be unfamiliar${t.name?` to ${t.name.toLowerCase()} readers`:""} — lean on this description.`}(t,c)}`}(t,e,u,L?null:E,I,O,w,d.audience))}const Q=["l1","l2","l3","l4"].filter(e=>f.has(e)&&q[e]).map(e=>q[e]).join(" "),W=U(u);return{text:W?`${W} ${Q}`.trim():Q,levels:q,...W?{annotations:W}:{}}}function H(e){return e.length?e[0].toUpperCase()+e.slice(1):e}function V(e,t){return 1!==e&&"body"===t?"bodies":1===e?t:t+"s"}function Q(e){return((e??"unknown")+"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"unknown"}function W(e,t,n){return"function"==typeof t?t(e):e["string"==typeof t&&t?t:n]}function K(e,t="—"){return null==e||""===e?t:"object"==typeof e?K(e.id??e.name??e.label,t):e+""}function J(e){if(null==e||""===e)return;const t="number"==typeof e?e:Number(e);return Number.isFinite(t)?t:void 0}function X(e){return K(e,"unknown").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"unknown"}function Z(e,t){const n=W(e,t,"children");return Array.isArray(n)?n:[]}function _(e,t,n){return`${e} ${1===e?t:n}`}function Y(e,t){return 0===e.numericLeaves?"":e.numericLeaves===e.leaves?", leaf total "+t(e.leafTotal):`, known leaf total ${t(e.leafTotal)} across ${_(e.numericLeaves,"valued leaf","valued leaves")}`}function ee(e){return"TreeDiagram"===e?"tree":"Treemap"===e?"treemap":"CirclePack"===e?"circle-packing":"orbit"}function te(e,t,n){return"function"==typeof t?t(e):e["string"==typeof t&&t?t:n]}function ne(e,t="—"){return null==e||""===e?t:"object"==typeof e?ne(e.id??e.name??e.label,t):e+""}function re(e){if(null==e||""===e)return;const t="number"==typeof e?e:Number(e);return Number.isFinite(t)?t:void 0}function ae(e){return ne(e,"unknown").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"unknown"}function oe(e){const t=[];return(e.linkedHover||e.selection||e.linkedBrush)&&t.push("Use linked highlighting to compare related locations."),(e.enableHover||e.tooltip)&&t.push("Hover or focus a mark for its details."),t.length>0?" "+t.join(" "):""}function ie(e,t,n){const r=te(e,t,n);if(void 0!==r)return r;const a=e.properties;return a&&"object"==typeof a?te(a,t,n):void 0}function le(e,t,n){return ne(ie(e,t,"id")??ie(e,"name","name")??ie(e,"NAME","NAME")??ie(e,"label","label"),n)}function se(e){let t=0,n=1/0,r=-1/0,a=0;for(const o of e)null!=o.value&&(t+=1,n=Math.min(n,o.value),r=Math.max(r,o.value),a+=o.value);return 0===t?null:{count:t,min:n,max:r,total:a,average:a/t}}function ce(e,t){const n=se(e);return n?`range ${t(n.min)} to ${t(n.max)}, average ${t(n.average)}, total ${t(n.total)}`:"no numeric values"}function ue(e,t,n,r){const a=function(e){if(Array.isArray(e))return e;if(!e||"object"!=typeof e)return[];const t=e;return Array.isArray(t.features)?t.features:"Feature"===t.type?[t]:[]}(t.areas),o="FlowMap"===e&&Array.isArray(t.nodes)?t.nodes:Array.isArray(t.points)?t.points:[],i=Array.isArray(t.flows)?t.flows:[],l=Array.isArray(t.lines)?t.lines:[],s=t.valueAccessor??t.sizeBy??t.costAccessor??"value",c=t.pointIdAccessor??t.nodeIdAccessor??"id",u=("ChoroplethMap"===e?a:o).map((n,r)=>({datum:n,index:r,label:le(n,"ChoroplethMap"===e?t.idAccessor:c,`${"ChoroplethMap"===e?"region":"location"} ${r+1}`),value:re(ie(n,s,"value"))})),d=u.filter(e=>null!=e.value),h={id:"root",role:"chart",level:1,label:`${"ChoroplethMap"===e?`A choropleth map with ${a.length} regions.${d.length>0?` Values are available for ${d.length} of ${a.length} regions; ${ce(d,r)}.`:" No regions have numeric values."}`:"FlowMap"===e?`A flow map with ${i.length} flows and ${o.length} locations.`:"DistanceCartogram"===e?`A distance cartogram with ${o.length} locations and ${l.length} routes.`:`A proportional-symbol map with ${o.length} locations.`}${oe(t)}`,children:[]};if("ChoroplethMap"===e)h.children=function(e,t,n){const r=e.filter(e=>null!=e.value).sort((e,t)=>t.value-e.value||e.index-t.index),a=new Map;let o,i=0;for(const[e,t]of r.entries())o!==t.value&&(i=e+1,o=t.value),a.set(t.index,i);let l=0;return function(e){const t=e.filter(e=>null!=e.value),n=e.filter(e=>null==e.value),r=[],a=se(t);if(a)if(a.min===a.max)r.push({id:"equal",label:"Equal values",rows:t});else{const e=a.min+(a.max-a.min)/3,n=a.min+2*(a.max-a.min)/3,o=t.filter(e=>e.value>=n),i=t.filter(t=>t.value>=e&&n>t.value),l=t.filter(t=>e>t.value);o.length>0&&r.push({id:"highest",label:"Highest values",rows:o}),i.length>0&&r.push({id:"middle",label:"Middle values",rows:i}),l.length>0&&r.push({id:"lowest",label:"Lowest values",rows:l})}return n.length>0&&r.push({id:"missing",label:"No numeric value",rows:n}),r}(e).map(e=>{const o=e.rows.slice(0,Math.max(0,t-l));l+=o.length;const i=o.map(e=>{const t=a.get(e.index),o=null==t||2>r.length?"":`, rank ${t} of ${r.length}`;return{id:`geo-${ae(e.label)}-${e.index}`,role:"datum",level:3,label:null==e.value?e.label+": no numeric value.":`${e.label}: ${n(e.value)}${o}.`,...null==e.value?{}:{value:e.value},datum:e.datum}}),s=e.rows.length-o.length;return s>0&&i.push({id:`geo-${e.id}-more`,role:"datum",level:3,label:`${s} more ${1===s?"region":"regions"} in ${e.label.toLowerCase()} not shown; navigation is capped at ${t}.`}),{id:"regions-"+e.id,role:"series",level:2,label:`${e.label}: ${e.rows.length} ${1===e.rows.length?"region":"regions"}, ${ce(e.rows,n)}.`,children:i}})}(u,n,r);else if(u.length>0){const e=u.slice(0,n).map(e=>({id:`geo-${ae(e.label)}-${e.index}`,role:"datum",level:3,label:`${e.label}${null==e.value?"":": "+r(e.value)}.`,...null==e.value?{}:{value:e.value},datum:e.datum}));u.length>n&&e.push({id:"geo-more",role:"datum",level:3,label:`…and ${u.length-n} more locations.`}),h.children?.push({id:"locations",role:"series",level:2,label:`Locations: ${u.length} marks.`,children:e})}const f="FlowMap"===e?i:l;if(f.length>0){const e=f.slice(0,n).map((e,t)=>{const n=ne(e.source,"unknown"),a=ne(e.target,"unknown"),o=re(te(e,s,"value"));return{id:`route-${ae(n)}-${ae(a)}-${t}`,role:"datum",level:3,label:`${n} to ${a}${null==o?"":": "+r(o)}.`,...null==o?{}:{value:o},datum:e}});h.children?.push({id:"routes",role:"series",level:2,label:`Routes: ${f.length} ${1===f.length?"route":"routes"}.`,children:e})}return h}var de=new Set(["ForceDirectedGraph","SankeyDiagram","ProcessSankey","ChordDiagram"]),he=new Set(["TreeDiagram","Treemap","CirclePack","OrbitDiagram"]),fe=new Set(["ChoroplethMap","ProportionalSymbolMap","FlowMap","DistanceCartogram"]);function me(e,t={},n={}){return!!$(e,t,n.recipe)||de.has(e)||he.has(e)||fe.has(e)||r.has(e)||a.has(e)||o.has(e)||i.has(e)}function pe(e,t,n){return"function"==typeof t?t(e):e["string"==typeof t&&t?t:n]}function ge(e,t="—"){return null==e||""===e?t:"object"==typeof e?ge(e.id??e.name??e.label,t):e+""}function $e(e){if(null==e||""===e)return;const t="number"==typeof e?e:Number(e);return Number.isFinite(t)?t:void 0}function ve(e){return ge(e,"unknown").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"unknown"}function be(e,t){const n=[];return(e.linkedHover||e.selection||e.linkedBrush)&&n.push("network"===t?"Use linked highlighting to trace related marks.":"Use linked highlighting to compare related locations."),(e.enableHover||e.tooltip)&&n.push("Hover or focus a mark for its details."),n.length>0?" "+n.join(" "):""}function ye(e,t){t&&e.children?.push(t)}function we(o,i,u={}){const d=u.locale??"en",h=Math.max(1,u.maxLeaves??200),f=G(d),m=$(o,i,u.recipe);if(m)return function(e,t,n={}){const r=g(t),a=p(t),o=Math.max(1,n.maxLeaves??200);if("function"==typeof e.navigation)return e.navigation({data:r,config:a,locale:n.locale??"en"});const i=(l=e.navigation)&&"object"==typeof l?e.navigation:void 0;var l;const s=(i?.groupByRole?b(e,i.groupByRole):void 0)??(i?.groupBy?.[0]?b(e,i.groupBy[0])??e.dataRoles.find(e=>e.field===i.groupBy?.[0]):void 0)??y(e,["nominal","ordinal"]),c=s?v(s,a,r):void 0,u=(i?.idRole?b(e,i.idRole):void 0)??y(e,["identifier"]),d=u?v(u,a,r):void 0,h={id:"root",role:"chart",label:i?.summaryTemplate?w(i.summaryTemplate,void 0,e,a,r,{count:r.length}):`${e.name}: ${r.length} ${1===r.length?"item":"items"} represented.`,level:1,children:[]};let f=0;const m=(t,n,o)=>{const l=d?t[d]:void 0,s=i?.itemLabelTemplate?w(i.itemLabelTemplate,t,e,a,r,{count:r.length}):function(e,t,n,r){const a=y(t,["nominal","ordinal"]),o=t.dataRoles.filter(e=>"quantitative"===e.semanticType),i=a?v(a,n,r):void 0,l=[];i&&null!=e[i]&&l.push(e[i]+"");for(const t of o){const a=v(t,n,r);a&&null!=e[a]&&l.push(`${t.role}: ${e[a]+""}`)}return l.length>0?l.join(", "):"Data item"}(t,e,a,r);return{id:"datum-"+Q(l??n),role:"datum",label:s,level:o,datum:t}};if(c){const e=new Map;for(const t of r){const n=(t[c]??"Uncategorized")+"",r=e.get(n);r?r.push(t):e.set(n,[t])}h.children=[...e].map(([e,t],n)=>{const r=t.slice(0,Math.max(0,o-f));f+=r.length;const a=r.map((e,t)=>m(e,1e5*n+t,3));return t.length>r.length&&a.push({id:"more-"+Q(e),role:"datum",label:`…and ${t.length-r.length} more items`,level:3}),{id:"group-"+Q(e),role:"series",label:`${e}: ${t.length} ${1===t.length?"item":"items"}.`,level:2,children:a}})}else{const e=r.slice(0,o);h.children=e.map((e,t)=>m(e,t,2)),r.length>e.length&&h.children.push({id:"more",role:"datum",label:`…and ${r.length-e.length} more items`,level:2})}return h}(m,i,{maxLeaves:h,locale:d});const C={id:"root",role:"chart",label:E(o,i,{locale:d}).text||"Chart.",level:1,children:[]},k=function(t,n){const r=Array.isArray(t.annotations)?t.annotations:null;if(!r)return null;const a=e(r.filter(e=>!!e&&"object"==typeof e));if(0===a.length)return null;let o=0;const i=a.slice(0,n).map(e=>{const t=e.lifecycle?.status,n=t&&"accepted"!==t?` (${t})`:"";return{id:"annotation-"+o++,role:"annotation",level:3,label:`${r=z(e),r?r.charAt(0).toUpperCase()+r.slice(1):r}${n}.`,datum:e};var r});a.length>n&&i.push({id:"annotation-"+o++,role:"annotation",level:3,label:`…and ${a.length-n} more annotations.`});const l=a.length;return{id:"annotations",role:"annotation",level:2,label:`Annotations: ${1===l?"one marked feature":l+" marked features"}.`,children:i}}(i,h);if(de.has(o)){const e=function(e,t,n,r){const a=Array.isArray(t.nodes)?t.nodes:[],o=Array.isArray(t.edges)?t.edges:Array.isArray(t.flows)?t.flows:[],i=t.nodeIdAccessor??t.nodeIDAccessor,l=t.sourceAccessor??"source",s=t.targetAccessor??"target",c=t.valueAccessor??"value",u=e=>ge(pe(e,i,"id"),"unknown"),d=(e,t)=>ge(pe(e,t,""),"unknown"),h=new Set;for(const e of o)h.add(d(e,l)),h.add(d(e,s));const f=a.length>0?a:[...h].map(e=>({id:e})),m=new Map;for(const e of f)m.set(u(e),{links:0,value:0});for(const e of o){const t=d(e,l),n=d(e,s),r=$e(pe(e,c,"value"))??0;for(const e of[t,n]){const t=m.get(e)??{links:0,value:0};t.links+=1,t.value+=r,m.set(e,t)}}const p={id:"root",role:"chart",level:1,label:`A ${"SankeyDiagram"===e||"ProcessSankey"===e?"flow diagram":"ChordDiagram"===e?"chord diagram":"network graph"} with ${f.length} nodes and ${o.length} links.${be(t,"network")}`,children:[]};let g=0;const $=new Map,v=t.colorBy??"group";for(const e of f){const t=ge(pe(e,v,"group"),"Ungrouped"),n=$.get(t);n?n.push(e):$.set(t,[e])}const b=[...$].map(([e,t],a)=>{const o=[];for(const[e,i]of t.entries()){if(g>=n)break;g+=1;const t=u(i),l=m.get(t)??{links:0,value:0},s=l.value>0?`, ${r(l.value)} total flow`:"";o.push({id:`node-${a}-${e}-${ve(t)}`,role:"datum",level:3,label:`${t}: ${l.links} ${1===l.links?"link":"links"}${s}.`,value:l.value>0?l.value:void 0,datum:i})}return{id:`nodes-${a}-${ve(e)}`,role:"series",level:2,label:`${e}: ${t.length} ${1===t.length?"node":"nodes"}.`,children:o}});b.length>0&&p.children?.push(...b);const y=o.slice(0,n).map((e,t)=>{const n=d(e,l),a=d(e,s),o=$e(pe(e,c,"value"));return{id:`link-${ve(n)}-${ve(a)}-${t}`,role:"datum",level:3,label:`${n} to ${a}${null==o?"":": "+r(o)}.`,value:o,datum:e}});return o.length>n&&y.push({id:"links-more",role:"datum",level:3,label:`…and ${o.length-n} more links.`,value:void 0}),y.length>0&&p.children?.push({id:"links",role:"series",level:2,label:`Links: ${o.length} ${1===o.length?"connection":"connections"}.`,children:y}),p}(o,i,h,f);return ye(e,k),e}if(he.has(o)){const e=function(e,t,n,r){const a=t.data&&"object"==typeof t.data?t.data:null,o=t.childrenAccessor??"children",i=t.valueAccessor??"value",l=t.nodeLabel??t.nodeIdAccessor,s=new WeakMap,c=new WeakSet,u=e=>{const t=s.get(e);if(t)return t;if(c.has(e))return{descendants:0,depth:0,leaves:0,numericLeaves:0,leafTotal:0};c.add(e);const n=Z(e,o);let r;if(0===n.length){const t=J(W(e,i,"value"));r={descendants:0,depth:1,leaves:1,numericLeaves:null==t?0:1,leafTotal:t??0}}else r=n.reduce((e,t)=>{const n=u(t);return{descendants:e.descendants+1+n.descendants,depth:Math.max(e.depth,n.depth+1),leaves:e.leaves+n.leaves,numericLeaves:e.numericLeaves+n.numericLeaves,leafTotal:e.leafTotal+n.leafTotal}},{descendants:0,depth:1,leaves:0,numericLeaves:0,leafTotal:0});return c.delete(e),s.set(e,r),r};let d=0;const h=(e,t,a,s)=>{const c=K(W(e,l,"name"),"item "+a);if(s.has(e))return{id:`hierarchy-${X(a)}-cycle`,role:"datum",level:t,label:`Repeated hierarchy reference to ${c}; branch omitted.`};const f=Z(e,o),m=u(e);if(0===f.length){if(d>=n)return null;d+=1;const o=J(W(e,i,"value"));return{id:`hierarchy-${X(a)}-${X(c)}`,role:"datum",level:t,label:`${c}${null==o?"":": "+r(o)}.`,...null==o?{}:{value:o},datum:e}}const p=new Set(s);p.add(e);const g=[];let $=0;for(const[e,r]of f.entries()){if(d>=n){$+=u(r).leaves;continue}const o=h(r,t+1,`${a}-${e}`,p);o&&g.push(o)}return $>0&&g.push({id:`hierarchy-${X(a)}-more`,role:"datum",level:t+1,label:`${_($,"more leaf","more leaves")} in ${c} not shown; navigation is capped at ${n}.`}),{id:`hierarchy-${X(a)}-${X(c)}`,role:"series",level:t,label:`${c}: ${_(f.length,"direct child","direct children")}, ${_(m.descendants,"total descendant","total descendants")}, ${_(m.leaves,"leaf","leaves")}${Y(m,r)}.`,datum:e,children:g}},f=a?u(a):null,m={id:"root",role:"chart",level:1,label:a?`A ${ee(e)} chart with ${_(f.leaves,"leaf","leaves")} and ${_(f.descendants,"total descendant","total descendants")} across ${_(f.depth,"hierarchy level","hierarchy levels")}${Y(f,r)}.`:"A hierarchy chart with no hierarchy data loaded.",children:[]};if(a){const e=h(a,2,"root",new Set);if(e){const t=K(W(a,l,"name"),"");m.children="series"===e.role&&""===t?e.children:[e]}}return m}(o,i,h,f);return ye(e,k),e}if(fe.has(o)){const e=ue(o,i,h,f);return ye(e,k),e}const A=Array.isArray(i.data)?i.data:null,x=me(o,i,u);if(!A||0===A.length||!x)return k&&(C.children=[k]),C;const{measure:S,measureFallback:j,dimension:L,dimensionFallback:P}=l(o,i),F=t(S,j),M=n(L,P),D="string"==typeof S&&S?S:j,B="string"==typeof L&&L?L:P,N=s(i);let T=0;const I=e=>`${e}-${T++}`,O=(e,t)=>{const n=e.slice(0,h).map(e=>((e,t)=>{const n=F(e),r=c(M(e),f);return{id:I("datum"),role:"datum",level:t,label:`${r}: ${Number.isFinite(n)?f(n):"—"}`,value:Number.isFinite(n)?n:void 0,datum:e}})(e,t));return e.length>h&&n.push({id:I("more"),role:"datum",level:t,label:`…and ${e.length-h} more points`}),n},R=[];if(r.has(o)||a.has(o)){let e=1/0,t=-1/0,n=1/0,r=-1/0;const i=[];let l=!0;for(const a of A){const o=F(a);Number.isFinite(o)&&(e>o&&(e=o),o>t&&(t=o));const s=M(a);i.push(s),"number"==typeof s&&Number.isFinite(s)?(n>s&&(n=s),s>r&&(r=s)):l=!1}const s=new Set,u=[];for(const e of i){const t=e+"";s.has(t)||(s.add(t),u.push(e))}const d=l?`${f(n)} to ${f(r)}`:`${c(u[0],f)} to ${c(u[u.length-1],f)} (${a.has(o)?u.length+" categories":A.length+" points"})`;R.push({id:I("axis"),role:"axis",level:2,label:`${a.has(o)?"Category axis":"X axis"}: ${B}, ${d}.`}),e>t||R.push({id:I("axis"),role:"axis",level:2,label:`Value axis: ${D}, ${f(e)} to ${f(t)}.`})}if(N){const e=n(N,N),t=new Map;for(const n of A){const r=(e(n)??"—")+"",a=t.get(r);a?a.push(n):t.set(r,[n])}const r=[];for(const[e,n]of t){const t=E(o,{...i,data:n},{levels:["l2","l3"],locale:d}).text;r.push({id:I("series"),role:"series",level:2,label:`Series ${e}: ${t}`,children:O(n,3)})}C.children=[...R,...r]}else C.children=[...R,...O(A,2)];return k&&C.children.push(k),C}function Ce(e,t){const n=[],r=e=>{if(n.push(e),e.children&&e.children.length>0&&t.has(e.id))for(const t of e.children)r(t)};return r(e),n}function ke(e){let t=1;if(e.children)for(const n of e.children)t+=ke(n);return t}var Ae=new Set(["StreamPhysicsFrame","EventDropChart","GaltonBoardChart","UnitPileChart","CollisionSwarmChart","PacketFlowChart","ProcessFlowChart","PhysicsCustomChart"]);function xe(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function Se(e){return xe(e)?e:void 0}function je(e){const t="number"==typeof e?e:"string"==typeof e&&e.trim()?Number(e):NaN;return Number.isFinite(t)?t:void 0}function Le(e){const t=je(e);return null==t?void 0:Math.max(0,Math.floor(t))}function Pe(...e){return e.map(Se).find(Boolean)}function Fe(...e){return e.find(Array.isArray)}function Me(e){const t={};for(const[n,r]of Object.entries(e))void 0!==r&&(t[n]=r);return t}function De(e,t,n){return e["string"==typeof t&&t?t:n]}function Be(e){return e instanceof Date?e.toISOString():"number"==typeof e?Number.isInteger(e)?e+"":Math.round(1e3*e)/1e3+"":(e??"—")+""}function Ne(e,t){return 1!==e&&"body"===t?"bodies":1===e?t:t+"s"}function Te(e){return Number.isInteger(e)?e+"":Math.round(1e3*e)/1e3+""}function Ie(e,t,n){const r=e?.filter(e=>!0===Se(e)?.sensor).length,a=Se(t?.observation),o=Se(a?.sensors),i=Fe(n?.activeSensors);return Math.max(r??0,o?Object.keys(o).length:0,i?.length??0)||void 0}function Oe(e,t,n={}){const{capability:r,audience:a,locale:o}=n,i=n.levels??["l1","l2","l3"],l=!1!==n.includeStructure,s=B(e,r),c=E(e,t,{levels:s?[...i,"l4"]:i,locale:o,capability:r,audience:a}),{l4:u,...d}=c.levels,h=["l1","l2","l3"].map(e=>c.levels[e]).filter(Boolean).join(" "),f={levels:d,text:c.annotations?`${c.annotations} ${h}`.trim():h,...c.annotations?{annotations:c.annotations}:{}};let m;if(s&&u){const e=(p=r)?"fits"in p||"buildProps"in p?{family:p.family}:{family:p.family,intentScores:p.intentScores}:{};m={act:s,sentence:u,family:e.family,intentScores:e.intentScores}}var p;const g=l?we(e,t,{maxLeaves:n.maxLeaves,locale:o}):void 0,$=function(e,t,n){if(!1===n)return;const r=xe(n)?n:void 0,a=Se(t.physics),o=Pe(r?.snapshot,a?.snapshot,t.physicsSnapshot,function(e){const t=Se(e);return!!t&&(xe(t.world)||"simulationState"in t||"liveBodyOrder"in t)}(t.snapshot)?t.snapshot:void 0),i=Pe(r?.evidence,a?.evidence,t.physicsEvidence,t.settledEvidence),l=Pe(r?.config,a?.config,o?.config,t.config),s=Pe(Se(o?.world),Se(a?.world)),c=Pe(Se(l?.kernel),Se(s?.options)),u=Fe(s?.bodies),d=Fe(s?.colliders,l?.colliders),h=Fe(o?.queue,a?.queue),f=Fe(o?.liveBodyOrder),m=Fe(s?.springs),p=Fe(o?.activeSensorPairs),g=function(e){if(!e||0===e.length)return;const t=e.map((e,t)=>{const n=Se(e);if(!n)return;const r=je(n.count??n.value??n.total??n.bodies??n.events);if(null==r)return;const a=(n.label??n.id??n.name??"container "+(t+1))+"",o=null==n.id?void 0:n.id+"",i=je(n.secondary??n.secondaryCount),l=je(n.observed??n.observedCount);return Me({id:o,label:a,count:r,secondary:i,secondaryLabel:"string"==typeof n.secondaryLabel?n.secondaryLabel:void 0,observed:l})}).filter(e=>null!=e);if(0===t.length)return;const n=t.reduce((e,t)=>e+t.count,0),r=t.filter(e=>e.count>0).length,a=t.slice().sort((e,t)=>t.count-e.count)[0];return{rows:t,totalCount:n,populatedCount:r,...a?{leader:a}:{}}}(function(e,t,n,r){const a=Se(e.settledProjection),o=Se(t?.settledProjection);return Fe(n?.projectionRows,n?.aggregates,e.settledProjectionRows,e.projectionRows,a?.rows,t?.settledProjectionRows,t?.projectionRows,o?.rows,r?.binCounts)}(t,a,r,i)),$=function(e,t){const n=e?.map((e,t)=>{const n=Se(e);if(!n)return;const r=je(n.count)??0,a=je(n.total),o={label:(n.label??n.id??"sediment "+(t+1))+"",count:r};return null!=n.id&&(o.id=n.id+""),null!=a&&(o.total=a),o}).filter(e=>null!=e),r=Le(t?.bins)??n?.length??0,a=je(t?.count)??n?.reduce((e,t)=>e+t.count,0)??0,o=je(t?.total)??n?.reduce((e,t)=>e+(t.total??0),0),i=n?.slice().sort((e,t)=>t.count-e.count)[0];if(0!==r||0!==a||o)return{bins:r,count:a,...null!=o&&o>0?{total:o}:{},...i?{leader:i}:{}}}(Fe(r?.sediment,a?.sediment,o?.sediment),Pe(r?.sedimentTotals,a?.sedimentTotals)),v=f?.length??u?.length??Le(i?.bodyCount),b=function(e){if(e)return e.filter(e=>!0===Se(e)?.sleeping).length}(u)??Le(i?.sleepingCount),y=h?.length,w="string"==typeof o?.simulationState?o.simulationState:void 0,C="boolean"==typeof i?.settled?i.settled:w?"settled"===w:null!=v||null!=b||null!=y?null!=v&&b===v&&0===(y??0):void 0,k=Se(c?.gravity),A=je(k?.x),x=je(k?.y),S=Me({state:w,settled:C,elapsedSeconds:je(o?.elapsedSeconds),paused:"boolean"==typeof o?.paused?o.paused:void 0,visible:"boolean"==typeof o?.visible?o.visible:void 0,seed:je(c?.seed),gravity:null!=A&&null!=x?{x:A,y:x}:void 0,fixedDt:je(l?.fixedDt??c?.fixedDt),timeScale:je(l?.timeScale),maxSubsteps:Le(l?.maxSubsteps),liveBodies:v,sleepingBodies:b,queued:y,bodyLimit:je(l?.bodyLimit),eviction:"string"==typeof l?.eviction?l.eviction:void 0}),j=Me({colliders:d?.length,sensors:Ie(d,l,s),springs:m?.length,activeSensorPairs:p?.length}),L=Object.keys(j).length>0,P=Ae.has(e);if(!(Object.keys(S).length>0||L||g||$)||!P&&null==n)return;const F={simulation:S,...L?{geometry:j}:{},...g?{aggregates:g}:{},...$?{sediment:$}:{}},M=function(e){const t=[],n=e.simulation,r=[n.state??(n.settled?"settled":void 0),null!=n.liveBodies?`${n.liveBodies} live ${Ne(n.liveBodies,"body")}`:void 0,null!=n.sleepingBodies?n.sleepingBodies+" sleeping":void 0,null!=n.queued?n.queued+" queued":void 0,null!=n.seed?"seed "+Te(n.seed):void 0,n.gravity?`gravity (${Te(n.gravity.x)}, ${Te(n.gravity.y)})`:void 0,null!=n.fixedDt?`fixed step ${Te(n.fixedDt)}s`:void 0,null!=n.timeScale?Te(n.timeScale)+"x time":void 0].filter(Boolean);r.length>0&&t.push(`Physics simulation: ${r.join("; ")}.`);const a=e.geometry;if(a){const e=[null!=a.colliders?`${a.colliders} ${Ne(a.colliders,"collider")}`:void 0,null!=a.sensors?`${a.sensors} ${Ne(a.sensors,"sensor")}`:void 0,null!=a.springs?`${a.springs} ${Ne(a.springs,"spring")}`:void 0,null!=a.activeSensorPairs?`${a.activeSensorPairs} active sensor ${Ne(a.activeSensorPairs,"pair")}`:void 0].filter(Boolean);e.length>0&&t.push(`Physics geometry: ${e.join("; ")}.`)}const o=e.aggregates;if(o){const e=o.leader,n=e?` Largest is ${e.label} with ${Te(e.count)}.`:"";t.push(`Physics aggregates: ${Te(o.totalCount)} settled ${Ne(o.totalCount,"body")} across ${o.rows.length} ${Ne(o.rows.length,"container")}; ${o.populatedCount} populated.${n}`)}const i=e.sediment;if(i){const e=null!=i.total?", value total "+Te(i.total):"",n=i.leader?`; largest sediment bin is ${i.leader.label} with ${Te(i.leader.count)}`:"";t.push(`Physics sediment: ${i.count} retained ${Ne(i.count,"body")} in ${i.bins} ${Ne(i.bins,"bin")}${e}${n}.`)}return t.join(" ")}(F);return{...F,text:M}}(e,t,n.physics),v=function(e,t,n){const r=[];if("GaugeChart"===e){"number"==typeof t.value&&Number.isFinite(t.value)&&r.push(`Current value is ${Be(t.value)}.`);const e="number"==typeof t.min&&Number.isFinite(t.min)?t.min:0,n="number"==typeof t.max&&Number.isFinite(t.max)?t.max:100;r.push(`The gauge scale runs from ${Be(e)} to ${Be(n)}.`)}if("SankeyDiagram"===e||"ProcessSankey"===e){const a=Array.isArray(t.edges)?t.edges:[];if("ProcessSankey"===e&&Array.isArray(t.domain)&&2===t.domain.length&&r.push(`The ProcessSankey time domain runs from ${Be(t.domain[0])} to ${Be(t.domain[1])}.`),a.length>0){r.push(`${a.length} source flow${1===a.length?"":"s"} are supplied.`);for(const o of a.slice(0,n)){const n=De(o,t.sourceAccessor,"source"),a=De(o,t.targetAccessor,"target"),i=De(o,t.valueAccessor,"value");r.push("ProcessSankey"!==e||null==o.startTime&&null==o.endTime?`${Be(n)} to ${Be(a)} has value ${Be(i)}.`:`${Be(n)} to ${Be(a)} has value ${Be(i)} over ${Be(o.startTime)}–${Be(o.endTime)}.`)}}}if("Treemap"===e||"CirclePack"===e||"TreeDiagram"===e||"OrbitDiagram"===e){const e=Se(t.data),a="string"==typeof t.childrenAccessor&&t.childrenAccessor?t.childrenAccessor:"children",o="string"==typeof t.valueAccessor&&t.valueAccessor?t.valueAccessor:"value",i="string"==typeof t.nodeIdAccessor&&t.nodeIdAccessor?t.nodeIdAccessor:"string"==typeof t.nodeIDAccessor&&t.nodeIDAccessor?t.nodeIDAccessor:"name",l=[],s=e=>{const t=Array.isArray(e[a])?e[a]:[];if(0!==t.length)for(const e of t){const t=Se(e);t&&s(t)}else l.push(e)};if(e&&s(e),l.length>0){r.push(l.length+" hierarchy leaves are supplied.");for(const e of l.slice(0,n))r.push(`${Be(e[i])} has value ${Be(e[o])}.`)}}if(Ae.has(e)&&Array.isArray(t.data)){const n=t.data;r.push(`${n.length} observed source row${1===n.length?"":"s"} are supplied.`);const a="CollisionSwarmChart"===e?t.xAccessor:t.valueAccessor,o="CollisionSwarmChart"===e?"x":"value",i=n.map(e=>je(De(e,a,o))).filter(e=>null!=e);i.length>0&&r.push(`Observed ${"string"==typeof a?a:o} ranges from ${Be(Math.min(...i))} to ${Be(Math.max(...i))}.`)}if(0!==r.length)return{source:"chart-props",statements:r,text:"Exact chart-prop facts: "+r.join(" ")}}(e,t,Math.max(1,n.maxLeaves??200)),b=[f.text,m?.sentence,$?.text,v?.text].filter(Boolean).join(" ");return{component:e,description:f,intent:m,structure:g,physics:$,facts:v,text:b}}export{u as isJsonSafe,h as getChartRecipe,f as resolveChartRecipe,m as recipeIntentId,p as recipeConfig,v as fieldForRole,D as communicativeActForIntent,B as resolveCommunicativeAct,E as describeChart,me as supportsStructuredNavigation,we as buildNavigationTree,Ce as flattenVisible,ke as countNodes,Oe as buildReaderGrounding};
|
package/dist/c-YGZHURXZ.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{validateArrayData as e}from"./c-RSVIHIQ4.min.js";import{useChartSetup as t,useFrameImperativeHandle as o}from"./c-F5ZB5GJ6.min.js";import{StreamXYFrame_default as n}from"./c-J6M4JHRS.min.js";import{areaXYPlugin as r,lineXYPlugin as i,mixedXYPlugin as s,registerXYPlugin as a}from"./c-TMOSJLT3.min.js";import{normalizeColorGradient as c}from"./c-F3LIKINL.min.js";import{accessorName as l,bandTooltipFields as u,buildCustomBehaviorProps as f,buildDefaultTooltip as y,mergeShapeStyle as p}from"./c-AG7WWVIH.min.js";import{ChartError as h,MultiPointTooltip as d,SafeRender as m,composeLegendConfigs as g,filterSparseArray as b,makeXYRuleContext as v,normalizeLinkedBrush as x,resolveMultiCapableTooltip as A,resolveStyleRules as S,resolveXYFramePropsAxisChrome as L,useBrushSelection as k,useChartMode as B,warnMissingField as w,wrapStyleWithSelection as _}from"./c-VN2HG5BS.min.js";import{DEFAULT_COLOR as C,getColor as D}from"./c-EGR6VYBW.min.js";import{useMemo as H,useCallback as I,useState as R,useEffect as F,forwardRef as P,useRef as G}from"react";function j(){a(i),a(r),a(s)}import{useMemo as W}from"react";function N(e){const{lineWidth:t=2,colorBy:o,colorScale:n,color:r,resolveStroke:i,fillArea:s,areaOpacity:a=.3,stroke:c,strokeWidth:l,opacity:u,effectiveSelectionHook:f,resolvedSelection:y,styleRules:h,ruleContext:d}=e,m=W(()=>function(e){const{lineWidth:t=2,colorBy:o,colorScale:n,color:r,resolveStroke:i,fillArea:s,areaOpacity:a=.3,styleRules:c,ruleContext:l}=e;return(e,u)=>{const f={strokeWidth:t},y=!0===s||Array.isArray(s)&&null!=u&&s.includes(u);let p;return i?p=i(e,u):o?n&&(p=D(e,o,n)):p=r||C,void 0!==p&&(f.stroke=p,y&&(f.fill=p,f.fillOpacity=a)),c?.length&&Object.assign(f,S(e,c,l?l(e,u):{value:void 0,category:u})),f}}({lineWidth:t,colorBy:o,colorScale:n,color:r,resolveStroke:i,fillArea:s,areaOpacity:a,styleRules:h,ruleContext:d}),[t,o,n,r,i,s,a,h,d]),g=W(()=>p(m,{stroke:c,strokeWidth:l,opacity:u}),[m,c,l,u]);return W(()=>_(g,f??null,y),[g,f,y])}var O="__forecastSegment",T=null;async function M(){return T||(T=await import("./c-QMVM3AY6.min.js")),T}import{useEffect as E,useMemo as V,useRef as z,useState as J}from"react";var $="__semiotic_resolvedX",K="__semiotic_resolvedY";function Y(e){const{data:t,xAccessor:o,yAccessor:n,forecast:r,anomaly:i,groupBy:s}=e,a="string"==typeof o?o:$,c="string"==typeof n?n:K,l=V(()=>{if(!r&&!i)return t;const e="function"==typeof o,s="function"==typeof n;return e||s?t.map(t=>{const r={...t};return e&&(r[$]=o(t)),s&&(r[K]=n(t)),r}):t},[t,r,i,o,n]),[u,f]=J(null),[y,p]=J([]),h=z(r),d=z(i);return E(()=>{if(!r&&!i)return void((h.current||d.current)&&(f(null),p([]),h.current=r,d.current=i));let e=!1;const t=r!==h.current||i!==d.current;if(h.current=r,d.current=i,t&&(f(null),p([])),r){const t=s&&"string"==typeof s&&"object"==typeof r?{...r,_groupBy:s}:r;(async function(...e){return(await M()).buildForecast(...e)})(l,a,c,t,i).then(t=>{e||(f(t),p(t.annotations))}).catch(()=>{e||(f(null),p([]))})}else i&&async function(...e){return(await M()).buildAnomalyAnnotations(...e)}(i).then(t=>{e||(f(null),p(t))}).catch(()=>{e||p([])});return()=>{e=!0}},[l,r,i,a,c,s]),{effectiveData:u?u.processedData:t,statisticalAnnotations:y,hasForecast:!!u,xAccessorKey:a,yAccessorKey:c}}import{useCallback as Q,useRef as X}from"react";function Z({brush:e,onBrush:t,linkedBrush:o,xAccessor:n,yAccessor:r,defaultDimension:i="xy"}){const s=x(o),a=!!e||!!s||!!t,c=s?.xField||("string"==typeof n?n:void 0),l=s?.yField||("string"==typeof r?r:void 0),u="y"!==i||s?.xField?c:void 0,f="x"!==i||s?.yField?l:void 0,y=k({name:s?.name||"__unused_brush__",xField:u,yField:f}),p=s?"xyBrush"===y.brushInteraction.brush?"xy":"xBrush"===y.brushInteraction.brush?"x":"y":i,h=X(y.brushInteraction);h.current=y.brushInteraction;const d=Q(e=>{const o=h.current;if(!e)return s&&o.end(null),void t?.(null);s&&o.end("xyBrush"===o.brush?[[e.x[0],e.y[0]],[e.x[1],e.y[1]]]:"xBrush"===o.brush?e.x:e.y),t?.(e)},[s,t]);return a?{brushStreamProps:{brush:{dimension:p},onBrush:d}}:{brushStreamProps:{}}}import{jsx as q}from"react/jsx-runtime";j();var U="__lineObjectSeries",ee=P(function(r,i){const s=G(null);o(i,{variant:"xy",frameRef:s});const a=B(r.mode,{width:r.width,height:r.height,showGrid:r.showGrid,enableHover:r.enableHover,showLegend:r.showLegend,title:r.title,description:r.description,summary:r.summary,accessibleTable:r.accessibleTable,xLabel:r.xLabel,yLabel:r.yLabel,mobileInteraction:r.mobileInteraction,mobileSemantics:r.mobileSemantics,responsiveRules:r.responsiveRules}),{data:p,margin:x,className:S,xFormat:k,yFormat:_,axisExtent:P,xAccessor:j="x",yAccessor:W="y",lineBy:T,lineDataAccessor:E="coordinates",colorBy:V,colorScheme:z,styleRules:J,curve:$="linear",showPoints:K=!1,pointRadius:Q=3,fillArea:X=!1,areaOpacity:ee=.3,lineWidth:te=2,lineGradient:oe,tooltip:ne,pointIdAccessor:re,annotations:ie,directLabel:se,gapStrategy:ae="break",anomaly:ce,forecast:le,band:ue,xExtent:fe,yExtent:ye,frameProps:pe={},selection:he,linkedHover:de,linkedBrush:me,brush:ge,onBrush:be,onObservation:ve,onClick:xe,hoverHighlight:Ae,hoverRadius:Se,chartId:Le,loading:ke,loadingContent:Be,emptyContent:we,legendInteraction:_e,legendPosition:Ce,legend:De,xScaleType:He,yScaleType:Ie,color:Re,stroke:Fe,strokeWidth:Pe,opacity:Ge}=r,{legend:je,...We}=pe,Ne=H(()=>g(je,De),[je,De]),{width:Oe,height:Te,enableHover:Me,showGrid:Ee,showLegend:Ve,title:ze,description:Je,summary:$e,accessibleTable:Ke,xLabel:Ye,yLabel:Qe}=a,Xe=H(()=>b(p),[p]),Ze=Array.isArray(Xe[0]?.[E])?Xe[0][E]:Xe;w("LineChart",Ze,"xAccessor",j),w("LineChart",Ze,"yAccessor",W);const{effectiveData:qe,statisticalAnnotations:Ue}=Y({data:Xe,xAccessor:j,yAccessor:W,forecast:le,anomaly:ce,groupBy:T}),et="__compoundGroup",tt=!(!le||!T),ot=tt?et:le?O:T,nt=H(()=>{if(!tt)return qe;const e="function"==typeof T?T:e=>e[T];return qe.map(t=>{const o={...t};return o[et]=`${e(t)}__${t[O]||"observed"}`,o})},[qe,tt,T]),rt=tt?nt:qe,it=V||T,st=H(()=>{if(!le)return;const e=le.upperBounds,t=le.lowerBounds;if(!e&&!t)return;const o="function"==typeof e?e:"string"==typeof e?t=>t[e]:null,n="function"==typeof t?t:"string"==typeof t?e=>e[t]:null;let r=1/0,i=-1/0;const s=qe;for(const e of s){const t="function"==typeof W?W(e):+e[W];if(isFinite(t)&&(r>t&&(r=t),t>i&&(i=t)),o){const t=o(e);null!=t&&isFinite(t)&&(t>i&&(i=t),r>t&&(r=t))}if(n){const t=n(e);null!=t&&isFinite(t)&&(r>t&&(r=t),t>i&&(i=t))}}return isFinite(r)&&isFinite(i)?[r,i]:void 0},[le,qe,W]),at=I(e=>{const t="function"==typeof j?j(e):e[j],o="function"==typeof W?W(e):e[W];return null==t||null==o||Number.isNaN(t)||Number.isNaN(o)},[j,W]),ct=void 0!==rt[0]?.[E],lt=ct?U:ot,ut=H(()=>{if(ct)return rt.map((e,t)=>{const o="function"==typeof T?T(e):"string"==typeof T?e[T]:void 0,n=null==o?"line-"+t:o+"",r=Array.isArray(e[E])?e[E]:[];return{...e,[U]:n,[E]:r.map(t=>({...t,[U]:n,parentLine:e,..."string"==typeof T&&void 0!==e[T]?{[T]:e[T]}:{}}))}});if(ot){const e=rt.reduce((e,t)=>{const o="function"==typeof ot?ot(t):t[ot];if(!e[o]){const n={[E]:[]};"string"==typeof ot&&(n[ot]=o),tt&&(n[O]=t[O],"string"==typeof T&&(n[T]=t[T])),e[o]=n}return e[o][E].push(t),e},{});return Object.values(e)}return[{[E]:rt}]},[ct,ot,E,rt,T,tt]),{gapProcessedLineData:ft,hasGaps:yt}=H(()=>{if("interpolate"===ae){let e=!1;const t=[];for(const o of ut){const n=(o[E]||[]).filter(t=>!at(t)||(e=!0,!1));n.length>0&&t.push({...o,[E]:n})}return{gapProcessedLineData:t,hasGaps:e}}if("break"===ae){let e=!1;const t=[];for(const o of ut){const n=o[E]||[];let r=[],i=0;const s=lt&&"string"==typeof lt?o[lt]:void 0;for(const a of n)if(at(a))e=!0,r.length>0&&(t.push({...o,[E]:r}),r=[],i++);else{const e=null!=s?`${s}__seg${i}`:"__seg"+i;r.push({...a,_gapSegment:e})}r.length>0&&t.push({...o,[E]:r})}return{gapProcessedLineData:t,hasGaps:e}}if("zero"===ae){let e=!1;const t="string"==typeof W?W:"y",o=[];for(const n of ut){const r=n[E]||[],i=[];for(const o of r)at(o)?(e=!0,i.push({...o,[t]:0})):i.push(o);o.push({...n,[E]:i})}return{gapProcessedLineData:o,hasGaps:e}}return{gapProcessedLineData:ut,hasGaps:!1}},[ut,ae,E,at,lt,W]),pt="object"==typeof se?se:{},ht=pt.position||"end",dt=pt.fontSize||11,mt=H(()=>{if(!se||!it)return[];const e="function"==typeof it?it:e=>e[it],t=new Set;for(const o of ft){const n=o[E]||[];if(0===n.length)continue;const r=e("end"===ht?n[n.length-1]:n[0])??e(o);if(null==r)continue;const i=r+"";""!==i&&t.add(i)}return Array.from(t)},[se,it,ft,E,ht]),gt=H(()=>{if(!se)return a.marginDefaults;const e=mt.reduce((e,t)=>Math.max(e,t.length*(.6*dt)),0)+10,t="end"===ht?"right":"left";return{...a.marginDefaults,[t]:Math.max(a.marginDefaults[t]||0,e)}},[se,mt,dt,ht,a.marginDefaults]),bt=t({data:qe,rawData:p,colorBy:it,colorScheme:z,legendInteraction:_e,legendPosition:Ce,frameLegend:We,selection:he,linkedHover:de,fallbackFields:it?["string"==typeof it?it:""]:[],unwrapData:!1,onObservation:ve,onClick:xe,hoverHighlight:Ae,mobileInteraction:a.mobileInteraction,mobileSemantics:a.mobileSemantics,chartType:"LineChart",chartId:Le,showLegend:(!se||void 0!==Ve)&&Ve,legend:Ne,userMargin:x,marginDefaults:gt,loading:ke,loadingContent:Be,emptyContent:we,width:Oe,height:Te,hasTitle:!!ze,axisChrome:L(pe,{showAxes:a.showAxes,xLabel:Ye,yLabel:Qe})}),vt=bt.colorScale,xt=bt.effectiveSelectionHook,At=bt.resolvedSelection,St=bt.customHoverBehavior,Lt=bt.customClickBehavior,kt=bt.crosshairProps,Bt=H(()=>{if(it)return ct?e=>{const t=e.parentLine||e;return"function"==typeof it?it(t):t[it]}:it},[it,ct]),wt=H(()=>v(j,W),[j,W]),_t=N({lineWidth:te,colorBy:Bt,colorScale:vt,color:Re,fillArea:X,areaOpacity:ee,stroke:Fe,strokeWidth:Pe,opacity:Ge,effectiveSelectionHook:xt,resolvedSelection:At,styleRules:J,ruleContext:wt}),[Ct,Dt]=R(null);F(()=>{if(!le)return void Dt(null);let e=!1;return async function(...e){return(await M()).createSegmentLineStyle(...e)}(_t,le).then(t=>{e||Dt(()=>t)}).catch(()=>{e||Dt(null)}),()=>{e=!0}},[_t,le]);const Ht=Ct||_t,It=H(()=>{if(K)return e=>{const t={r:Q,fillOpacity:1};return it?vt&&(t.fill=D(e.parentLine||e,it,vt)):t.fill=Re||C,t}},[K,Q,it,vt,Re]),Rt=Array.isArray(X)?"mixed":X?"area":"line",Ft=H(()=>{if(!se||!it)return[];const e="function"==typeof j?j:e=>e[j],t="function"==typeof W?W:e=>e[W],o="function"==typeof it?it:e=>e[it],n=new Map;for(const e of ft){const t=e[E]||[];if(0===t.length)continue;const r="end"===ht?t[t.length-1]:t[0],i=o(r)??o(e);if(null==i)continue;const s=i+"";""===s||n.has(s)||n.set(s,r)}const r=Array.from(n.entries()).map(([o,n])=>({type:"text",label:o,["string"==typeof j?j:"x"]:e(n),["string"==typeof W?W:"y"]:t(n),dx:"end"===ht?6:-6,dy:0,color:vt?vt(o):C,fontSize:dt}));r.sort((e,t)=>{const o="string"==typeof W?W:"y";return e[o]-t[o]});for(let e=1;r.length>e;e++){const t="string"==typeof W?W:"y",o=r[e-1],n=r[e];dt+2>Math.abs(n[t]+n.dy-(o[t]+o.dy))&&(n.dy+=dt+2)}return r},[se,it,vt,ft,E,j,W,ht,dt]),Pt=bt.margin,Gt=T||V,jt=H(()=>y([{label:Ye||l(j),accessor:j,role:"x",format:k},{label:Qe||l(W),accessor:W,role:"y",format:_},...Gt?[{label:l(Gt),accessor:Gt,role:"group"}]:[],...u(ue,_)]),[j,W,Ye,Qe,Gt,k,_,ue]),Wt=e({componentName:"LineChart",data:ct?qe[0]?.[E]||[]:p,accessors:{xAccessor:j,yAccessor:W}}),{brushStreamProps:Nt}=Z({brush:ge,onBrush:be,linkedBrush:me,xAccessor:j,yAccessor:W,defaultDimension:"x"}),Ot=H(()=>ct||lt||yt?ft.flatMap(e=>{const t=e[E]||[];return lt&&"string"==typeof lt?t.map(t=>({...t,[lt]:t[lt]??e[lt]})):t}):rt,[ft,E,ct,lt,rt,yt]),Tt=c(oe),Mt={chartType:Rt,...Array.isArray(X)&&{areaGroups:X},...Tt&&{lineGradient:Tt},...null!=p&&{data:Ot},xAccessor:j,yAccessor:W,xScaleType:He,yScaleType:Ie,...fe&&{xExtent:fe},...!ye||null==ye[0]&&null==ye[1]?st?{yExtent:st}:{}:{yExtent:ye},groupAccessor:"break"===ae&&yt?"_gapSegment":lt||void 0,...ue&&{band:ue},curve:$,lineStyle:Ht,...K&&{pointStyle:It},size:[Oe,Te],responsiveWidth:r.responsiveWidth,responsiveHeight:r.responsiveHeight,...void 0!==r.maxDevicePixelRatio&&{maxDevicePixelRatio:r.maxDevicePixelRatio},margin:Pt,showAxes:a.showAxes,xLabel:Ye,yLabel:Qe,xFormat:k,yFormat:_,...void 0!==P&&{axisExtent:P},...void 0!==r.autoPlaceAnnotations&&{autoPlaceAnnotations:r.autoPlaceAnnotations},enableHover:Me,showGrid:Ee,...bt.legendBehaviorProps,...ze&&{title:ze},...Je&&{description:Je},...$e&&{summary:$e},...void 0!==Ke&&{accessibleTable:Ke},...S&&{className:S},...null!=r.animate&&{animate:r.animate},...A({tooltip:ne,defaultTooltipContent:jt,multiDefaultContent:d()}),...f({linkedHover:de,selection:he,onObservation:ve,onClick:xe,hoverRadius:Se,hoverHighlight:Ae,mobileInteraction:bt.mobileInteraction,customHoverBehavior:St,customClickBehavior:Lt}),...re&&{pointIdAccessor:re},...(ie?.length||Ue.length||Ft.length)&&{annotations:[...ie||[],...Ue,...Ft]},...kt,...Nt,...We};return bt.earlyReturn?bt.earlyReturn:Wt?q(h,{componentName:"LineChart",message:Wt,width:Oe,height:Te}):q(m,{componentName:"LineChart",width:Oe,height:Te,children:q(n,{ref:s,...Mt})})});ee.displayName="LineChart";export{Z as useXYBrush,Y as useSeriesFeatures,j as registerLineFamilyXYPlugins,N as useXYLineStyle,ee as LineChart};
|
package/dist/c-YZVRZGX2.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t=new WeakMap;function e(n,r){if(!r)return r;const i=function(t){const e=t.trim();if(!e.startsWith("var(")||!e.endsWith(")"))return null;const n=e.slice(4,-1),r=n.indexOf(",");if(-1===r){const t=n.trim();return t.startsWith("--")?{name:t}:null}const i=n.slice(0,r).trim(),a=n.slice(r+1).trim();return i.startsWith("--")?{name:i,fallback:a||void 0}:null}(r);if(!i)return r;const a=()=>i.fallback?e(n,i.fallback):r,s=n.canvas;if(!s)return a();let l=t.get(s);l&&0===l.version||(l={version:0,map:new Map},t.set(s,l));const c=l.map.get(r);if(void 0!==c)return c;const o=getComputedStyle(s).getPropertyValue(i.name).trim()||a()||r;return l.map.set(r,o),o}export{e as resolveCSSColor};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|