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.
Files changed (452) hide show
  1. package/README.md +99 -74
  2. package/agent-skill/semiotic-charts/SKILL.md +13 -7
  3. package/ai/artifact-contract-reference.md +408 -0
  4. package/ai/artifact-surface-inventory.json +5586 -0
  5. package/ai/behaviorContracts.cjs +24 -2
  6. package/ai/cli.js +480 -56
  7. package/ai/dist/mcp-server.js +68 -68
  8. package/ai/examples.md +1 -1
  9. package/ai/reference.md +31 -14
  10. package/ai/schema.json +1868 -438
  11. package/ai/surface-manifest.json +11 -4
  12. package/ai/system-prompt.md +2 -0
  13. package/ai/task-packets/compare-category-totals.json +301 -0
  14. package/ai/task-packets/compare-category-totals.md +188 -0
  15. package/ai/task-packets/correct-published-chart.json +271 -0
  16. package/ai/task-packets/correct-published-chart.md +597 -0
  17. package/ai/task-packets/index.json +40 -0
  18. package/ai/task-packets/update-live-chart.json +289 -0
  19. package/ai/task-packets/update-live-chart.md +424 -0
  20. package/dist/c-2N7IU2NY.min.js +1 -0
  21. package/dist/c-2WK7YJLL.min.js +1 -0
  22. package/dist/c-33QOXEUG.min.js +1 -0
  23. package/dist/c-42PLDTX7.min.js +1 -0
  24. package/dist/c-447VIMRO.min.js +1 -0
  25. package/dist/c-4FN7Q6VQ.min.js +1 -0
  26. package/dist/c-553QUDKA.min.js +1 -0
  27. package/dist/c-55BAJ333.min.js +1 -0
  28. package/dist/c-7242NXSG.min.js +1 -0
  29. package/dist/c-7EGHJU2F.min.js +1 -0
  30. package/dist/c-7HP7MB2I.min.js +1 -0
  31. package/dist/c-7NBU5ZKS.min.js +1 -0
  32. package/dist/c-AFBSWT77.min.js +1 -0
  33. package/dist/c-AJ7EC32V.min.js +1 -0
  34. package/dist/c-AQADQNY7.min.js +1 -0
  35. package/dist/c-ATM475SA.min.js +1 -0
  36. package/dist/c-AVO3Q7T7.min.js +1 -0
  37. package/dist/c-AZKPVBOC.min.js +1 -0
  38. package/dist/c-BNFJMDHN.min.js +1 -0
  39. package/dist/c-BNG5ECK5.min.js +1 -0
  40. package/dist/c-BOHCQILI.min.js +1 -0
  41. package/dist/c-CCTGN5CK.min.js +1 -0
  42. package/dist/c-CPSPZH6A.min.js +1 -0
  43. package/dist/c-CPV4N35K.min.js +1 -0
  44. package/dist/c-D6HAAPTX.min.js +1 -0
  45. package/dist/c-DE5Q3U2X.min.js +1 -0
  46. package/dist/c-DK662R77.min.js +1 -0
  47. package/dist/c-DY2676CR.min.js +1 -0
  48. package/dist/c-E32M6XW5.min.js +1 -0
  49. package/dist/c-E4JDJH4I.min.js +1 -0
  50. package/dist/c-E7I2L7CU.min.js +1 -0
  51. package/dist/c-EBOQ7ER7.min.js +1 -0
  52. package/dist/c-ELDWAO2V.min.js +1 -0
  53. package/dist/c-EUBTECGM.min.js +1 -0
  54. package/dist/c-GNTXRXRN.min.js +1 -0
  55. package/dist/c-GSZRZRD6.min.js +1 -0
  56. package/dist/c-GWX7JGMF.min.js +1 -0
  57. package/dist/c-GXV3C3MO.min.js +1 -0
  58. package/dist/c-HHTK2R75.min.js +1 -0
  59. package/dist/c-HLLFJYTY.min.js +1 -0
  60. package/dist/c-HPOYKCCG.min.js +1 -0
  61. package/dist/c-HXDKPIKR.min.js +1 -0
  62. package/dist/c-I4QJ6YLM.min.js +1 -0
  63. package/dist/c-IDJV3CZK.min.js +1 -0
  64. package/dist/c-ITKX3RC5.min.js +1 -0
  65. package/dist/c-JG2JCQLP.min.js +1 -0
  66. package/dist/c-JLGRHXGZ.min.js +1 -0
  67. package/dist/c-JO2UGTCP.min.js +1 -0
  68. package/dist/c-JUKIWTBJ.min.js +1 -0
  69. package/dist/c-KCRJGUHP.min.js +1 -0
  70. package/dist/c-LMGSSD2E.min.js +1 -0
  71. package/dist/c-LYQMZMZQ.min.js +1 -0
  72. package/dist/c-LYVKDBQJ.min.js +1 -0
  73. package/dist/c-MVR3RWF3.min.js +1 -0
  74. package/dist/c-MXCP7GNZ.min.js +1 -0
  75. package/dist/c-NG7BLZTR.min.js +1 -0
  76. package/dist/c-NYZ2QNAM.min.js +1 -0
  77. package/dist/c-OO5QLMJC.min.js +1 -0
  78. package/dist/c-OOVX2JPQ.min.js +1 -0
  79. package/dist/c-ORLEBW72.min.js +1 -0
  80. package/dist/c-P65V6HLO.min.js +1 -0
  81. package/dist/c-PP6VY3QU.min.js +1 -0
  82. package/dist/c-PRIKOLTE.min.js +1 -0
  83. package/dist/c-PSNI6KAZ.min.js +1 -0
  84. package/dist/c-PYNW54D2.min.js +1 -0
  85. package/dist/c-QA3HMQJP.min.js +1 -0
  86. package/dist/c-ROEHCIGV.min.js +1 -0
  87. package/dist/c-S3AZX5PP.min.js +1 -0
  88. package/dist/c-T2V7O2LO.min.js +1 -0
  89. package/dist/c-TIXX5CAU.min.js +1 -0
  90. package/dist/c-TKG2NP7G.min.js +1 -0
  91. package/dist/c-VJTDST2R.min.js +1 -0
  92. package/dist/c-VXLOLYTO.min.js +1 -0
  93. package/dist/c-W4ZUKSEQ.min.js +1 -0
  94. package/dist/c-WH2O53VI.min.js +1 -0
  95. package/dist/c-WNGH47HF.min.js +1 -0
  96. package/dist/c-WUWXGQYA.min.js +1 -0
  97. package/dist/c-XDQKXPX4.min.js +1 -0
  98. package/dist/{c-CKLIFCGN.min.js → c-XSB27XPS.min.js} +1 -1
  99. package/dist/c-YDECTEUW.min.js +1 -0
  100. package/dist/c-YF3YKVQI.min.js +1 -0
  101. package/dist/c-YLZIV3VS.min.js +1 -0
  102. package/dist/c-ZYPXQF7B.min.js +1 -0
  103. package/dist/components/Annotation.d.ts +2 -1
  104. package/dist/components/ai/chartRecipeRegistry.d.ts +6 -1
  105. package/dist/components/ai/chartRecipes.d.ts +4 -0
  106. package/dist/components/ai/describePhysicsProjection.d.ts +18 -0
  107. package/dist/components/ai/describePhysicsSource.d.ts +13 -0
  108. package/dist/components/artifact/ArtifactInspector.d.ts +26 -0
  109. package/dist/components/artifact/ArtifactInspectorContextSections.d.ts +18 -0
  110. package/dist/components/artifact/artifactContractDiff.d.ts +8 -0
  111. package/dist/components/artifact/artifactInspectorSummary.d.ts +53 -0
  112. package/dist/components/artifact/artifactRevision.d.ts +54 -0
  113. package/dist/components/artifact/artifactTestFixtures.d.ts +17 -0
  114. package/dist/components/artifact/attachmentAudit.d.ts +13 -0
  115. package/dist/components/artifact/claimCorrections.d.ts +3 -0
  116. package/dist/components/artifact/claimGraph.d.ts +5 -0
  117. package/dist/components/artifact/claimLifecycle.d.ts +32 -0
  118. package/dist/components/artifact/claims.d.ts +24 -0
  119. package/dist/components/artifact/collection.d.ts +10 -0
  120. package/dist/components/artifact/collectionCorrectionScope.d.ts +4 -0
  121. package/dist/components/artifact/collectionImpact.d.ts +11 -0
  122. package/dist/components/artifact/collectionLineage.d.ts +3 -0
  123. package/dist/components/artifact/collectionOperations.d.ts +8 -0
  124. package/dist/components/artifact/collectionPolicy.d.ts +22 -0
  125. package/dist/components/artifact/collectionTypes.d.ts +117 -0
  126. package/dist/components/artifact/configurationRepair.d.ts +8 -0
  127. package/dist/components/artifact/contract.d.ts +30 -0
  128. package/dist/components/artifact/evaluateArtifact.d.ts +12 -0
  129. package/dist/components/artifact/evaluateArtifactTypes.d.ts +78 -0
  130. package/dist/components/artifact/evaluationPresentation.d.ts +9 -0
  131. package/dist/components/artifact/evidenceSample.d.ts +8 -0
  132. package/dist/components/artifact/exportPaths.d.ts +8 -0
  133. package/dist/components/artifact/fieldPolicies.d.ts +12 -0
  134. package/dist/components/artifact/fingerprint.d.ts +36 -0
  135. package/dist/components/artifact/grounding.d.ts +51 -0
  136. package/dist/components/artifact/groundingBudget.d.ts +38 -0
  137. package/dist/components/artifact/hostTransfer.d.ts +13 -0
  138. package/dist/components/artifact/identity.d.ts +19 -0
  139. package/dist/components/artifact/inheritance.d.ts +48 -0
  140. package/dist/components/artifact/inheritanceIntegrity.d.ts +3 -0
  141. package/dist/components/artifact/jsonCompatibility.d.ts +2 -0
  142. package/dist/components/artifact/obligations.d.ts +3 -0
  143. package/dist/components/artifact/policies.d.ts +45 -0
  144. package/dist/components/artifact/policyRelations.d.ts +3 -0
  145. package/dist/components/artifact/recordProjection.d.ts +7 -0
  146. package/dist/components/artifact/representation.d.ts +50 -0
  147. package/dist/components/artifact/serialization.d.ts +40 -0
  148. package/dist/components/artifact/temporal.d.ts +32 -0
  149. package/dist/components/artifact/temporalAdapters.d.ts +75 -0
  150. package/dist/components/artifact/temporalAuditHelpers.d.ts +12 -0
  151. package/dist/components/artifact/temporalPresentation.d.ts +8 -0
  152. package/dist/components/artifact/types.d.ts +341 -0
  153. package/dist/components/artifact/validation.d.ts +13 -0
  154. package/dist/components/artifact/validationFieldStatus.d.ts +7 -0
  155. package/dist/components/artifact/validationPrimitives.d.ts +24 -0
  156. package/dist/components/artifact/validationSurfaces.d.ts +7 -0
  157. package/dist/components/artifact/validationTemporal.d.ts +3 -0
  158. package/dist/components/charts/geo/FlowMap.d.ts +7 -0
  159. package/dist/components/charts/geo/flowMapLineStyle.d.ts +18 -0
  160. package/dist/components/charts/ordinal/DonutChart.d.ts +2 -0
  161. package/dist/components/charts/ordinal/FunnelChart.d.ts +2 -0
  162. package/dist/components/charts/ordinal/GroupedBarChart.d.ts +6 -0
  163. package/dist/components/charts/ordinal/PieChart.d.ts +2 -0
  164. package/dist/components/charts/ordinal/RadarChart.d.ts +2 -0
  165. package/dist/components/charts/ordinal/StackedBarChart.d.ts +6 -0
  166. package/dist/components/charts/physics/CollisionSwarmChart.d.ts +1 -1
  167. package/dist/components/charts/physics/EventDropChart.d.ts +3 -1
  168. package/dist/components/charts/physics/GaltonBoardChart.d.ts +4 -2
  169. package/dist/components/charts/physics/ProcessFlowChart.d.ts +6 -0
  170. package/dist/components/charts/physics/UnitPileChart.d.ts +2 -1
  171. package/dist/components/charts/physics/collisionSwarmPacking.d.ts +14 -0
  172. package/dist/components/charts/physics/collisionSwarmPhysics.d.ts +1 -0
  173. package/dist/components/charts/physics/eventDropAdmission.d.ts +32 -0
  174. package/dist/components/charts/physics/eventDropPhysics.d.ts +22 -1
  175. package/dist/components/charts/physics/galtonBoardPhysics.d.ts +2 -9
  176. package/dist/components/charts/physics/physicsChartReconcile.d.ts +4 -0
  177. package/dist/components/charts/physics/physicsChartUtils.d.ts +1 -1
  178. package/dist/components/charts/physics/physicsGaltonData.d.ts +10 -0
  179. package/dist/components/charts/physics/physicsHocHandle.d.ts +2 -0
  180. package/dist/components/charts/physics/physicsPileData.d.ts +11 -0
  181. package/dist/components/charts/physics/physicsPilePhysics.d.ts +5 -12
  182. package/dist/components/charts/physics/physicsProjectionOverlays.d.ts +1 -1
  183. package/dist/components/charts/physics/physicsSourceRows.d.ts +8 -0
  184. package/dist/components/charts/physics/usePhysicsChartData.d.ts +19 -0
  185. package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +4 -0
  186. package/dist/components/charts/realtime/RealtimeHistogram.d.ts +14 -6
  187. package/dist/components/charts/realtime/RealtimeLineChart.d.ts +4 -0
  188. package/dist/components/charts/realtime/RealtimeSwarmChart.d.ts +4 -0
  189. package/dist/components/charts/realtime/RealtimeWaterfallChart.d.ts +4 -0
  190. package/dist/components/charts/realtime/realtimeAccessors.d.ts +4 -0
  191. package/dist/components/charts/realtime/realtimeChartRuntime.d.ts +8 -7
  192. package/dist/components/charts/realtime/realtimeChartTypes.d.ts +7 -0
  193. package/dist/components/charts/realtime/temporalHistogramConfig.d.ts +17 -11
  194. package/dist/components/charts/shared/GaugeReadout.d.ts +9 -0
  195. package/dist/components/charts/shared/ThresholdAnnotation.d.ts +18 -0
  196. package/dist/components/charts/shared/ThresholdEndCap.d.ts +7 -0
  197. package/dist/components/charts/shared/auditAccessibilityText.d.ts +4 -2
  198. package/dist/components/charts/shared/numericTickFormatter.d.ts +2 -0
  199. package/dist/components/charts/shared/radialCenterContent.d.ts +10 -0
  200. package/dist/components/charts/shared/tooltipUtils.d.ts +1 -1
  201. package/dist/components/charts/shared/useChartLegend.d.ts +4 -0
  202. package/dist/components/charts/shared/useXYPointStyle.d.ts +2 -0
  203. package/dist/components/charts/xy/BubbleChart.d.ts +7 -0
  204. package/dist/components/charts/xy/CandlestickChart.d.ts +7 -0
  205. package/dist/components/charts/xy/DifferenceChart.d.ts +7 -0
  206. package/dist/components/charts/xy/MinimapChart.d.ts +7 -0
  207. package/dist/components/charts/xy/MultiAxisLineChart.d.ts +7 -0
  208. package/dist/components/charts/xy/ScatterplotMatrix.d.ts +6 -0
  209. package/dist/components/charts/xy/WaterfallChart.d.ts +8 -0
  210. package/dist/components/charts/xy/differenceMarkStyle.d.ts +28 -0
  211. package/dist/components/charts/xy/multiAxisFields.d.ts +23 -0
  212. package/dist/components/charts/xy/scatterplotMatrixCells.d.ts +50 -0
  213. package/dist/components/evidence/chartEvidenceEnvelope.d.ts +16 -8
  214. package/dist/components/evidence/evidenceEnvelopeInput.d.ts +8 -0
  215. package/dist/components/evidence/evidenceEnvelopeValidation.d.ts +11 -0
  216. package/dist/components/evidence/evidenceGate.d.ts +3 -1
  217. package/dist/components/evidence/renderedSceneHash.d.ts +23 -0
  218. package/dist/components/evidence/stableJsonHash.d.ts +4 -0
  219. package/dist/components/export/chartConfig.d.ts +40 -5
  220. package/dist/components/export/chartConfigArtifact.d.ts +6 -0
  221. package/dist/components/legendLayout.d.ts +18 -0
  222. package/dist/components/legendStyles.d.ts +4 -0
  223. package/dist/components/recipes/firstAvailableTrack.d.ts +17 -0
  224. package/dist/components/recipes/intervals.d.ts +1 -1
  225. package/dist/components/semiotic-ai-core.d.ts +33 -22
  226. package/dist/components/semiotic-ai.d.ts +15 -3
  227. package/dist/components/semiotic-artifact-react.d.ts +10 -0
  228. package/dist/components/semiotic-artifact.d.ts +23 -0
  229. package/dist/components/semiotic-experimental.d.ts +1 -1
  230. package/dist/components/semiotic-physics.d.ts +4 -4
  231. package/dist/components/semiotic-text.d.ts +2 -0
  232. package/dist/components/semiotic-utils-core.d.ts +18 -18
  233. package/dist/components/semiotic.d.ts +3 -3
  234. package/dist/components/server/renderEvidence.d.ts +12 -0
  235. package/dist/components/server/renderToStaticSVG.d.ts +3 -0
  236. package/dist/components/server/staticSVGChrome.d.ts +1 -4
  237. package/dist/components/server/staticXYAxisTicks.d.ts +2 -38
  238. package/dist/components/server/staticXYGrid.d.ts +1 -1
  239. package/dist/components/server/svgSizing.d.ts +6 -0
  240. package/dist/components/shared/svgRoot.d.ts +17 -0
  241. package/dist/components/store/selectionProvenance.d.ts +6 -0
  242. package/dist/components/stream/GeoSVGOverlay.d.ts +4 -0
  243. package/dist/components/stream/NetworkSVGOverlay.d.ts +4 -0
  244. package/dist/components/stream/OrdinalSVGOverlay.d.ts +4 -0
  245. package/dist/components/stream/SVGOverlay.d.ts +4 -0
  246. package/dist/components/stream/SceneToSVG.d.ts +4 -19
  247. package/dist/components/stream/SceneToSVGXY.d.ts +13 -0
  248. package/dist/components/stream/StreamGeoFrame.d.ts +1 -2
  249. package/dist/components/stream/StreamOrdinalFrame.d.ts +1 -2
  250. package/dist/components/stream/XYGrid.d.ts +11 -0
  251. package/dist/components/stream/axisTickUtils.d.ts +0 -1
  252. package/dist/components/stream/hitTestUtils.d.ts +2 -0
  253. package/dist/components/stream/overlayAccessibleText.d.ts +18 -0
  254. package/dist/components/stream/physics/PhysicsControllers.d.ts +1 -1
  255. package/dist/components/stream/physics/PhysicsKernel.d.ts +9 -0
  256. package/dist/components/stream/physics/PhysicsPipelineStore.d.ts +5 -4
  257. package/dist/components/stream/physics/PhysicsPipelineTypes.d.ts +9 -0
  258. package/dist/components/stream/physics/StreamPhysicsTypes.d.ts +3 -0
  259. package/dist/components/stream/physics/physicsCanvasCoordinates.d.ts +5 -0
  260. package/dist/components/stream/physics/physicsFixedPosition.d.ts +16 -0
  261. package/dist/components/stream/physics/physicsKernelCloning.d.ts +6 -0
  262. package/dist/components/stream/physics/physicsPipelineObservations.d.ts +2 -0
  263. package/dist/components/stream/physics/physicsPipelineSettle.d.ts +15 -9
  264. package/dist/components/stream/physics/physicsRegionRuntime.d.ts +8 -17
  265. package/dist/components/stream/physics/physicsSemanticUI.d.ts +9 -0
  266. package/dist/components/stream/pipelineConfig.d.ts +4 -0
  267. package/dist/components/stream/pipelineStoreUpdateResults.d.ts +1 -1
  268. package/dist/components/stream/resolveXYAxes.d.ts +13 -0
  269. package/dist/components/stream/sceneToSVGShared.d.ts +2 -1
  270. package/dist/components/stream/seriesGeometry.d.ts +13 -0
  271. package/dist/components/stream/streamEncodingTypes.d.ts +53 -0
  272. package/dist/components/stream/types.d.ts +4 -53
  273. package/dist/components/stream/useGeoFrameHandle.d.ts +16 -0
  274. package/dist/components/stream/useOrdinalFrameHandle.d.ts +15 -0
  275. package/dist/components/stream/useXYFrameHandle.d.ts +15 -0
  276. package/dist/components/stream/xyAxisTicks.d.ts +25 -0
  277. package/dist/components/stream/xyDateTicks.d.ts +3 -2
  278. package/dist/components/stream/xyFrameAxisTypes.d.ts +2 -0
  279. package/dist/components/stream/xySceneBuilders/ribbonScene.d.ts +1 -1
  280. package/dist/components/stream/xySceneBuilders/types.d.ts +1 -0
  281. package/dist/components/text/annotationTextLayout.d.ts +28 -0
  282. package/dist/components/text/pretextAnnotationLayout.d.ts +29 -0
  283. package/dist/components/text/usePretextAnnotations.d.ts +12 -0
  284. package/dist/controls.module.min.js +1 -1
  285. package/dist/geo.min.js +1 -1
  286. package/dist/geo.module.min.js +1 -1
  287. package/dist/network.module.min.js +1 -1
  288. package/dist/ordinal.module.min.js +1 -1
  289. package/dist/physics-matter.min.js +1 -1
  290. package/dist/physics-matter.module.min.js +1 -1
  291. package/dist/physics-rapier.min.js +1 -1
  292. package/dist/physics-rapier.module.min.js +1 -1
  293. package/dist/physics.module.min.js +1 -1
  294. package/dist/physicsWorker.js +1 -1
  295. package/dist/processSankeyLayoutWorker.js +1 -1
  296. package/dist/rough.min.js +1 -1
  297. package/dist/rough.module.min.js +1 -1
  298. package/dist/semiotic-access.module.min.js +1 -1
  299. package/dist/semiotic-ai-artifact-policy-constants.module.min.js +2 -0
  300. package/dist/semiotic-ai-core.d.ts +33 -22
  301. package/dist/semiotic-ai-core.min.js +1 -1
  302. package/dist/semiotic-ai-core.module.min.js +1 -1
  303. package/dist/semiotic-ai-hash-primitives.module.min.js +2 -0
  304. package/dist/semiotic-ai.d.ts +15 -3
  305. package/dist/semiotic-ai.module.min.js +1 -1
  306. package/dist/semiotic-artifact-react.d.ts +10 -0
  307. package/dist/semiotic-artifact-react.min.js +2 -0
  308. package/dist/semiotic-artifact-react.module.min.js +2 -0
  309. package/dist/semiotic-artifact.d.ts +23 -0
  310. package/dist/semiotic-artifact.min.js +1 -0
  311. package/dist/semiotic-artifact.module.min.js +1 -0
  312. package/dist/semiotic-client-cjs-shared.min.js +1 -1
  313. package/dist/semiotic-client-glyph.module.min.js +1 -1
  314. package/dist/semiotic-client-responsive.module.min.js +1 -1
  315. package/dist/semiotic-client-shared.module.min.js +1 -1
  316. package/dist/semiotic-custom-layout-selection-cjs-shared.min.js +1 -1
  317. package/dist/semiotic-data.min.js +1 -1
  318. package/dist/semiotic-data.module.min.js +1 -1
  319. package/dist/semiotic-evidence.min.js +1 -1
  320. package/dist/semiotic-evidence.module.min.js +1 -1
  321. package/dist/semiotic-experimental-auxiliary.module.min.js +1 -1
  322. package/dist/semiotic-experimental-node-auxiliary.module.min.js +1 -1
  323. package/dist/semiotic-experimental-react-shared.module.min.js +1 -1
  324. package/dist/semiotic-experimental-vacp.min.js +1 -1
  325. package/dist/semiotic-experimental-vacp.module.min.js +1 -1
  326. package/dist/semiotic-experimental.d.ts +1 -1
  327. package/dist/semiotic-line.module.min.js +1 -1
  328. package/dist/semiotic-physics.d.ts +4 -4
  329. package/dist/semiotic-realtime-core.module.min.js +1 -1
  330. package/dist/semiotic-realtime-react.module.min.js +1 -1
  331. package/dist/semiotic-recipes-core-cjs-base.min.js +1 -1
  332. package/dist/semiotic-recipes-core.module.min.js +1 -1
  333. package/dist/semiotic-recipes-geo-cjs.min.js +1 -1
  334. package/dist/semiotic-recipes-react.min.js +1 -1
  335. package/dist/semiotic-server-edge-node.module.min.js +1 -1
  336. package/dist/semiotic-server-edge.min.js +1 -1
  337. package/dist/semiotic-server-edge.module.min.js +1 -1
  338. package/dist/semiotic-server-node.min.js +1 -1
  339. package/dist/semiotic-server-node.module.min.js +1 -1
  340. package/dist/semiotic-text.d.ts +2 -0
  341. package/dist/semiotic-text.min.js +2 -0
  342. package/dist/semiotic-text.module.min.js +2 -0
  343. package/dist/semiotic-themes-core.min.js +1 -1
  344. package/dist/semiotic-themes-core.module.min.js +1 -1
  345. package/dist/semiotic-themes.min.js +1 -1
  346. package/dist/semiotic-themes.module.min.js +1 -1
  347. package/dist/semiotic-utils-core.d.ts +18 -18
  348. package/dist/semiotic-utils-core.min.js +1 -1
  349. package/dist/semiotic-utils-core.module.min.js +1 -1
  350. package/dist/semiotic-value.module.min.js +1 -1
  351. package/dist/semiotic.d.ts +3 -3
  352. package/dist/semiotic.module.min.js +1 -1
  353. package/dist/server.min.js +1 -1
  354. package/dist/server.module.min.js +1 -1
  355. package/dist/xy.module.min.js +1 -1
  356. package/package.json +55 -14
  357. package/spec/README.md +8 -3
  358. package/spec/v0.1/artifact-contract.schema.json +2299 -0
  359. package/spec/v0.1/examples/artifact-contract-full.json +369 -0
  360. package/spec/v0.1/examples/artifact-contract-unknown-state.json +46 -0
  361. package/dist/c-3BLJEQNG.min.js +0 -1
  362. package/dist/c-3SCUN5HI.min.js +0 -1
  363. package/dist/c-3VVKFA4M.min.js +0 -1
  364. package/dist/c-43TJZS3F.min.js +0 -1
  365. package/dist/c-4DTZPSUD.min.js +0 -1
  366. package/dist/c-4ES5367Y.min.js +0 -1
  367. package/dist/c-52TEGIUJ.min.js +0 -1
  368. package/dist/c-54IRWOGM.min.js +0 -1
  369. package/dist/c-5D2S4RMI.min.js +0 -1
  370. package/dist/c-5JWCTX3G.min.js +0 -1
  371. package/dist/c-6CMMSN6N.min.js +0 -1
  372. package/dist/c-6HRB2L7H.min.js +0 -1
  373. package/dist/c-6O5EVOPH.min.js +0 -1
  374. package/dist/c-7W4SV36A.min.js +0 -1
  375. package/dist/c-A4WRGZFX.min.js +0 -1
  376. package/dist/c-AG7WWVIH.min.js +0 -1
  377. package/dist/c-AH6J4MTN.min.js +0 -1
  378. package/dist/c-AKAF6JAD.min.js +0 -1
  379. package/dist/c-ALYR5LKK.min.js +0 -1
  380. package/dist/c-BBKITSXB.min.js +0 -1
  381. package/dist/c-BYDPC44I.min.js +0 -1
  382. package/dist/c-CFFIU2MW.min.js +0 -1
  383. package/dist/c-CGNHBHCE.min.js +0 -1
  384. package/dist/c-CJYSXIFV.min.js +0 -1
  385. package/dist/c-CZF7MV67.min.js +0 -1
  386. package/dist/c-D53OKBSY.min.js +0 -1
  387. package/dist/c-DADXPJXV.min.js +0 -1
  388. package/dist/c-DBQ2V7CH.min.js +0 -1
  389. package/dist/c-DPMVAUAW.min.js +0 -1
  390. package/dist/c-ECJCKLYY.min.js +0 -1
  391. package/dist/c-EGATGOWJ.min.js +0 -1
  392. package/dist/c-EGR6VYBW.min.js +0 -1
  393. package/dist/c-ESNR43AN.min.js +0 -1
  394. package/dist/c-F3LIKINL.min.js +0 -1
  395. package/dist/c-F5ZB5GJ6.min.js +0 -1
  396. package/dist/c-G36WS6LN.min.js +0 -1
  397. package/dist/c-G3VYMHKE.min.js +0 -1
  398. package/dist/c-GGISSW5E.min.js +0 -1
  399. package/dist/c-GR6MOEQC.min.js +0 -1
  400. package/dist/c-GSVCN34B.min.js +0 -1
  401. package/dist/c-GYOQCEFP.min.js +0 -1
  402. package/dist/c-H3DNMTCC.min.js +0 -1
  403. package/dist/c-I6J3FEZE.min.js +0 -1
  404. package/dist/c-IGH6MGJ5.min.js +0 -1
  405. package/dist/c-II2EEAJN.min.js +0 -1
  406. package/dist/c-IUHFPMHD.min.js +0 -1
  407. package/dist/c-J6M4JHRS.min.js +0 -1
  408. package/dist/c-JM3MGLQV.min.js +0 -1
  409. package/dist/c-KM3N7F7R.min.js +0 -1
  410. package/dist/c-LF5BZFNC.min.js +0 -1
  411. package/dist/c-LKBSGFQC.min.js +0 -1
  412. package/dist/c-MNF2S4AA.min.js +0 -1
  413. package/dist/c-MT3WBK7M.min.js +0 -1
  414. package/dist/c-NDJADPIF.min.js +0 -1
  415. package/dist/c-NVPQCIL5.min.js +0 -1
  416. package/dist/c-NY3JWV2K.min.js +0 -1
  417. package/dist/c-OFWJBEE5.min.js +0 -1
  418. package/dist/c-OYFHP5F5.min.js +0 -1
  419. package/dist/c-PGKQGGQ2.min.js +0 -1
  420. package/dist/c-PPWDL5ZI.min.js +0 -1
  421. package/dist/c-Q2IPZ3MU.min.js +0 -1
  422. package/dist/c-QKHMBE2E.min.js +0 -1
  423. package/dist/c-QMVM3AY6.min.js +0 -1
  424. package/dist/c-QSGWX53A.min.js +0 -1
  425. package/dist/c-RJKEKZOO.min.js +0 -1
  426. package/dist/c-RSVIHIQ4.min.js +0 -1
  427. package/dist/c-S6U5CGT5.min.js +0 -1
  428. package/dist/c-SFDIIU5G.min.js +0 -1
  429. package/dist/c-SLGMUBUL.min.js +0 -1
  430. package/dist/c-SRTBCRVE.min.js +0 -1
  431. package/dist/c-T6UAIKBH.min.js +0 -1
  432. package/dist/c-TMCTEVVW.min.js +0 -1
  433. package/dist/c-TMOSJLT3.min.js +0 -1
  434. package/dist/c-TZW3JGJ5.min.js +0 -1
  435. package/dist/c-U6ESPM7V.min.js +0 -1
  436. package/dist/c-UC5PTTFI.min.js +0 -1
  437. package/dist/c-USFMFKIH.min.js +0 -1
  438. package/dist/c-VGKUEZBC.min.js +0 -1
  439. package/dist/c-VGW3VG3I.min.js +0 -1
  440. package/dist/c-VN2HG5BS.min.js +0 -1
  441. package/dist/c-VPZDY5Q4.min.js +0 -1
  442. package/dist/c-VRXUB2F2.min.js +0 -1
  443. package/dist/c-VUBQNQJH.min.js +0 -1
  444. package/dist/c-VUH4PGZY.min.js +0 -1
  445. package/dist/c-W3CE4A4S.min.js +0 -1
  446. package/dist/c-X5UBGU2V.min.js +0 -1
  447. package/dist/c-XDRV7RKW.min.js +0 -1
  448. package/dist/c-YGZHURXZ.min.js +0 -1
  449. package/dist/c-YZVRZGX2.min.js +0 -1
  450. /package/dist/{c-N4G2L7ID.min.js → c-HYW2XA4Q.min.js} +0 -0
  451. /package/dist/{c-ENF72HU5.min.js → c-QAVFOEUY.min.js} +0 -0
  452. /package/dist/{c-OCI56QF2.min.js → c-V4XMSLC3.min.js} +0 -0
@@ -1 +0,0 @@
1
- import{getChartRecipe as e}from"./c-TMCTEVVW.min.js";function t(e,t){const a=e.length,s=t.length,r=Array(s+1);for(let e=0;s>=e;e++)r[e]=e;for(let o=1;a>=o;o++){let a=r[0];r[0]=o;for(let i=1;s>=i;i++){const s=r[i];r[i]=e[o-1]===t[i-1]?a:1+Math.min(a,r[i],r[i-1]),a=s}}return r[s]}function a(e,a,s=3){let r,o=s+1;for(const s of a){const a=t(e.toLowerCase(),s.toLowerCase());o>a&&(o=a,r=s)}return o>s?void 0:r}function s(e){return e.length>3?[e[0],e[Math.floor(e.length/2)],e[e.length-1]]:[...e]}function r(e,t){if(0===t.length)return null;const s=e.toLowerCase();return t.find(e=>e.toLowerCase().includes(s)||s.includes(e.toLowerCase()))||(a(e,t,3)??null)}function o(e){return` Or use a function: ${e}={d => d.myValue}.`}var i=["string","number",["number","object"],["boolean","object"],"boolean",["array","object"],["string","function"],["string","array","object"],["boolean","function","object","string"],"array","object",["boolean","string"],"function",["boolean","string","function","object"],["boolean","string","object"],["boolean","string","function"],["number","function"],["string","object"],["boolean","object","string","number"],["object","string","number","function"],["boolean","array"],["object","array"],["object","function"],["string","boolean"],["number","string","function"],["number","string"],["boolean","string","number","object"],["string","array"],["array","string"],["string","object","function"],["boolean","number","array"],["number","null"],["array","function"],["string","number","array","object","function"]],n=[["primary","context","sparkline","mobile"],["highlight","isolate","none"],["right","left","top","bottom"],["nice","exact"],["primary","secondary"],["linear","log","time"],["linear","log","symlog"],["sliding","growing"],["left","right"],["vertical","horizontal"],["horizontal","vertical"],["linear","monotoneX","monotoneY","step","stepAfter","stepBefore","basis","cardinal","catmullRom"],["break","interpolate","zero"],["descending","ascending"],["smooth","linear"],["start","end","both","auto"],["series"],["zero","wiggle","silhouette","diverging"],["key","input","insideOut","asc","desc"],["blues","reds","greens","viridis","oranges","purples","greys","plasma","inferno","magma","cividis","turbo","custom"],["count","sum","mean"],["histogram","density","label"],["crossfilter","intersect"],["auto","worker","sync"],["source","target","gradient"],["justify","left","right","center"],["value","temporal"],["off","reuse"],["insertion","crossing-min","inside-out","crossing-min+inside-out"],["stack","hug"],["temporal","max"],["auto"],["raw","scene"],["source","target","both"],["full","half"],["source","target"],["tree","cluster","partition","treemap","circlepack"],["vertical","horizontal","radial"],["line","curve"],["leaf","parent","all"],["locked","decay","alternate"],["geo","line"],["basic","offset","arc"],["butt","round","square"],["straight","fractional"],["radial","strip"],["up","down"],["primary","context","sparkline","mobile","sample","mechanical"],["sample","mechanical"],["route","net"],["outcome","hold-last"],["replay","snapshot"],["horizontal"],["allAbsorbed","none"],["circle","halo","faceted","pill","diamond","square"],["auto","normalized","pixels"],["path","none"],["snapshot","replay","mechanical"],["none","blocker-amplification"],["domino-ball"],["vertical"],["settle"],["number","currency","percent","compact","duration"],["higher-is-better","lower-is-better","neutral"],["auto","positive","negative","neutral"],["tile","presentation","inline","thumbnail"],["start","center","end"]],c={common:{mode:[0,0],width:1,height:1,margin:2,className:0,title:0,description:0,summary:0,accessibleTable:3,enableHover:4,showLegend:4,legendInteraction:[0,1],legendPosition:[0,2],legend:5,showGrid:4,colorBy:6,colorScheme:7,tooltip:8,annotations:9,autoPlaceAnnotations:3,responsiveRules:9,mobileSemantics:10,mobileInteraction:3,maxDevicePixelRatio:1,axisExtent:[0,3],animate:3,loading:4,loadingContent:3,emptyContent:3,hoverHighlight:11,chartId:0,emphasis:[0,4],responsiveWidth:4,responsiveHeight:4,color:0,stroke:0,strokeWidth:1,opacity:1,onObservation:12,frameProps:10,onClick:12},xyAxis:{xLabel:0,yLabel:0,xFormat:12,yFormat:12,xScaleType:[0,5],yScaleType:[0,6]},ordinalAxis:{categoryLabel:0,valueLabel:0,showCategoryTicks:4,valueFormat:12,categoryFormat:12,dataIdAccessor:6},realtime:{data:9,mode:[0,0],size:9,width:1,height:1,maxDevicePixelRatio:1,margin:2,className:0,title:0,description:0,summary:0,accessibleTable:3,showLegend:4,legendPosition:[0,2],legendInteraction:[0,1],timeAccessor:6,valueAccessor:6,windowSize:1,windowMode:[0,7],arrowOfTime:[0,8],timeExtent:9,valueExtent:9,extentPadding:1,showAxes:4,background:0,cursor:0,enableHover:3,tooltip:13,tooltipContent:12,onHover:12,annotations:9,autoPlaceAnnotations:3,responsiveRules:9,mobileSemantics:10,mobileInteraction:3,svgAnnotationRules:12,tickFormatTime:12,tickFormatValue:12,decay:10,pulse:10,staleness:10,linkedHover:14,selection:10,loading:4,loadingContent:3,emptyContent:3,chartId:0,emphasis:[0,4],pointIdAccessor:6,onObservation:12},realtimeStatic:{data:9,mode:[0,0],size:9,width:1,height:1,maxDevicePixelRatio:1,margin:2,className:0,title:0,description:0,summary:0,accessibleTable:3,showLegend:4,legendPosition:[0,2],legendInteraction:[0,1],timeAccessor:6,valueAccessor:6,arrowOfTime:[0,8],timeExtent:9,valueExtent:9,extentPadding:1,showAxes:4,background:0,cursor:0,enableHover:3,tooltip:13,tooltipContent:12,onHover:12,annotations:9,autoPlaceAnnotations:3,responsiveRules:9,mobileSemantics:10,mobileInteraction:3,svgAnnotationRules:12,tickFormatTime:12,tickFormatValue:12,decay:10,pulse:10,staleness:10,linkedHover:14,selection:10,loading:4,loadingContent:3,emptyContent:3,chartId:0,emphasis:[0,4],pointIdAccessor:6,onObservation:12},physics:{data:9,mode:[0,0],size:9,width:1,height:1,maxDevicePixelRatio:1,className:0,title:0,description:0,summary:0,accessibleTable:3,chartId:0,emphasis:[0,4],responsiveWidth:4,responsiveHeight:4,responsiveRules:9,mobileSemantics:10,mobileInteraction:3,colorBy:6,color:0,stroke:0,strokeWidth:1,opacity:1,seed:1,ballRadius:1,hoverRadius:1,paused:4,tooltip:13,annotations:9,autoPlaceAnnotations:3,background:0,legend:5,legendPosition:[0,2],legendLayout:10,selection:10,linkedHover:14,onSimulationStateChange:12,loading:4,loadingContent:3,emptyContent:3,frameProps:10}};function l(e){const[t,a]=Array.isArray(e)?e:[e,void 0],s=i[t],r=Array.isArray(s)?[...s]:s;return void 0===a?{type:r}:{type:r,enum:[...n[a]]}}var d=Object.fromEntries(Object.entries({BarChart:[["data"],"array",["categoryAccessor","valueAccessor"],["common","ordinalAxis"],{data:9,categoryAccessor:6,valueAccessor:6,orientation:[0,9],sort:15,barPadding:1,roundedTop:16,valueExtent:9,styleRules:9,gradientFill:3,baselinePadding:4,brush:4,linkedBrush:17,onBrush:12,regression:14}],StackedBarChart:[["data","stackBy"],"array",["categoryAccessor","valueAccessor"],["common","ordinalAxis"],{data:9,stackBy:6,categoryAccessor:6,valueAccessor:6,orientation:[0,9],normalize:4,sort:15,barPadding:1,roundedTop:16,valueExtent:9,styleRules:9,gradientFill:3,baselinePadding:4,showLegend:4}],GroupedBarChart:[["data","groupBy"],"array",["categoryAccessor","valueAccessor"],["common","ordinalAxis"],{data:9,groupBy:6,categoryAccessor:6,valueAccessor:6,orientation:[0,9],sort:15,barPadding:1,roundedTop:16,valueExtent:9,styleRules:9,gradientFill:3,baselinePadding:4,showLegend:4}],SwarmPlot:[["data"],"array",["categoryAccessor","valueAccessor"],["common","ordinalAxis"],{data:9,categoryAccessor:6,valueAccessor:6,orientation:[0,9],sizeBy:6,sizeRange:9,symbolBy:6,symbolMap:10,pointRadius:1,pointOpacity:1,categoryPadding:1,valueExtent:9,styleRules:9,brush:4,onBrush:12,linkedBrush:17}],BoxPlot:[["data"],"array",["categoryAccessor","valueAccessor"],["common","ordinalAxis"],{data:9,categoryAccessor:6,valueAccessor:6,orientation:[0,9],showOutliers:4,outlierRadius:1,categoryPadding:1,valueExtent:9,styleRules:9}],Histogram:[["data"],"array",["categoryAccessor","valueAccessor"],["common","ordinalAxis"],{data:9,categoryAccessor:6,valueAccessor:6,bins:1,relative:4,categoryPadding:1,valueExtent:9,styleRules:9,brush:4,onBrush:12,linkedBrush:17}],ViolinPlot:[["data"],"array",["categoryAccessor","valueAccessor"],["common","ordinalAxis"],{data:9,categoryAccessor:6,valueAccessor:6,orientation:[0,9],bins:1,curve:0,showIQR:4,categoryPadding:1,valueExtent:9,styleRules:9,brush:4,onBrush:12,linkedBrush:17}],RidgelinePlot:[["data"],"array",["categoryAccessor","valueAccessor"],["common","ordinalAxis"],{data:9,orientation:[0,9],categoryAccessor:6,valueAccessor:6,bins:1,amplitude:1,categoryPadding:1,valueExtent:9,styleRules:9}],DotPlot:[["data"],"array",["categoryAccessor","valueAccessor"],["common","ordinalAxis"],{data:9,categoryAccessor:6,valueAccessor:6,orientation:[0,9],sort:15,dotRadius:1,categoryPadding:1,valueExtent:9,styleRules:9,showGrid:4,regression:14}],PieChart:[["data"],"array",["categoryAccessor","valueAccessor"],["common"],{data:9,categoryAccessor:6,valueAccessor:6,styleRules:9,startAngle:1,cornerRadius:1,showCategoryTicks:4,dataIdAccessor:6}],DonutChart:[["data"],"array",["categoryAccessor","valueAccessor"],["common"],{data:9,categoryAccessor:6,valueAccessor:6,styleRules:9,innerRadius:1,centerContent:18,startAngle:1,cornerRadius:1,showCategoryTicks:4,dataIdAccessor:6}],GaugeChart:[["value"],"none",[],["common"],{value:1,min:1,max:1,thresholds:9,gradientFill:10,arcWidth:1,cornerRadius:1,sweep:1,fillZones:4,showNeedle:4,needleColor:0,color:0,valueFormat:12,centerContent:19,showScaleLabels:4,backgroundColor:0,styleRules:9}],FunnelChart:[["data"],"array",["stepAccessor","valueAccessor"],["common","ordinalAxis"],{data:9,stepAccessor:6,valueAccessor:6,categoryAccessor:6,orientation:[0,10],connectorOpacity:1,showLabels:4,showAxes:4,showCategoryTicks:4,responsiveWidth:4,legendPosition:[0,2],styleRules:9}],RadarChart:[["data"],"array",["categoryAccessor","valueAccessor"],["common","ordinalAxis"],{data:9,categoryAccessor:6,valueAccessor:6,seriesAccessor:6,pointRadius:1,valueExtent:9,styleRules:9}],SwimlaneChart:[["subcategoryAccessor"],"array",["categoryAccessor","subcategoryAccessor","valueAccessor"],["common","ordinalAxis"],{data:9,categoryAccessor:6,subcategoryAccessor:6,valueAccessor:6,orientation:[0,10],barPadding:1,roundedTop:16,valueExtent:9,trackFill:17,gradientFill:3,brush:4,onBrush:12,linkedBrush:17,showCategoryTicks:4,rTickValues:9,tickLabelEdgeAlign:4,responsiveWidth:4,legendPosition:[0,2],styleRules:9}],LikertChart:[[],"array",["categoryAccessor","valueAccessor","levelAccessor","countAccessor"],["common","ordinalAxis"],{data:9,levels:9,categoryAccessor:6,valueAccessor:6,levelAccessor:6,countAccessor:6,orientation:[0,9],barPadding:1,valueExtent:9,styleRules:9}],LineChart:[["data"],"array",["xAccessor","yAccessor"],["common","xyAxis"],{frameProps:10,styleRules:9,data:9,xAccessor:6,yAccessor:6,lineBy:6,lineDataAccessor:0,curve:[0,11],lineWidth:1,showPoints:4,pointRadius:1,pointIdAccessor:6,fillArea:20,areaOpacity:1,lineGradient:10,directLabel:3,gapStrategy:[0,12],forecast:10,anomaly:10,band:21,xExtent:9,yExtent:9,brush:4,linkedBrush:17,onBrush:12}],BumpChart:[["data"],"array",["xAccessor","yAccessor"],["common"],{data:9,xAccessor:6,yAccessor:6,xLabel:0,yLabel:0,xFormat:12,yFormat:12,lineBy:6,rankDirection:[0,13],ribbon:4,curve:[0,14],ribbonSizeRange:9,samplesPerSegment:1,lineWidth:1,highlightTop:1,neutralColor:0,ribbonOpacity:1,lineOpacity:1,showPoints:4,pointRadius:1,showLabels:[11,15],labelPriorityAccessor:0,maxLabels:1,showAxes:4,styleRules:9,labelStyle:22,legend:5,legendInteraction:[0,1],legendPosition:[0,2],hoverHighlight:[11,16]}],AreaChart:[["data"],"array",["xAccessor","yAccessor"],["common","xyAxis"],{styleRules:9,data:9,xAccessor:6,yAccessor:6,areaBy:6,lineDataAccessor:0,curve:[0,11],y0Accessor:6,gradientFill:3,semanticGradient:21,semanticLine:4,lineGradient:10,areaOpacity:1,showLine:4,lineWidth:1,showPoints:4,pointRadius:1,pointIdAccessor:6,forecast:10,anomaly:10,band:21,xExtent:9,yExtent:9}],DifferenceChart:[[],"array",["xAccessor","seriesAAccessor","seriesBAccessor"],["common","xyAxis"],{data:9,xAccessor:6,seriesAAccessor:6,seriesBAccessor:6,seriesALabel:0,seriesBLabel:0,seriesAColor:0,seriesBColor:0,showLines:4,lineWidth:1,showPoints:4,pointRadius:1,curve:[0,11],areaOpacity:1,gradientFill:3,xExtent:9,yExtent:9,pointIdAccessor:6,windowSize:1}],StackedAreaChart:[["data","areaBy"],"array",["xAccessor","yAccessor"],["common","xyAxis"],{styleRules:9,data:9,xAccessor:6,yAccessor:6,xLabel:0,yLabel:0,xFormat:12,yFormat:12,areaBy:6,lineDataAccessor:0,curve:[0,11],areaOpacity:1,showLine:4,lineWidth:1,showPoints:4,pointRadius:1,normalize:4,baseline:[0,17],stackOrder:[0,18],pointIdAccessor:6,xExtent:9,yExtent:9}],Scatterplot:[["data"],"array",["xAccessor","yAccessor"],["common","xyAxis"],{styleRules:9,data:9,xAccessor:6,yAccessor:6,sizeBy:6,sizeRange:9,symbolBy:6,symbolMap:10,pointRadius:1,pointOpacity:1,pointIdAccessor:6,marginalGraphics:22,xExtent:9,yExtent:9,regression:14,forecast:10,anomaly:10,brush:4,linkedBrush:17,onBrush:12}],BubbleChart:[["data","sizeBy"],"array",["xAccessor","yAccessor"],["common","xyAxis"],{styleRules:9,data:9,sizeBy:6,xAccessor:6,yAccessor:6,sizeRange:9,bubbleOpacity:1,bubbleStrokeWidth:1,bubbleStrokeColor:0,pointIdAccessor:6,marginalGraphics:22,xExtent:9,yExtent:9,regression:14}],Heatmap:[["data"],"array",["xAccessor","yAccessor","valueAccessor"],["common","xyAxis"],{styleRules:9,data:9,xAccessor:6,yAccessor:6,valueAccessor:6,colorScheme:[0,19],customColorScale:12,showValues:4,valueFormat:12,cellBorderColor:0,cellBorderWidth:1,pointIdAccessor:6,xExtent:9,yExtent:9,legendPosition:[0,2],heatmapAggregation:[0,20],heatmapXBins:1,heatmapYBins:1}],QuadrantChart:[[],"array",["xAccessor","yAccessor"],["common","xyAxis"],{styleRules:9,data:9,xAccessor:6,yAccessor:6,xCenter:1,yCenter:1,quadrants:10,centerlineStyle:10,showQuadrantLabels:4,quadrantLabelSize:1,sizeBy:6,sizeRange:9,pointRadius:1,pointOpacity:1,pointIdAccessor:6}],MultiAxisLineChart:[["series"],"array",["xAccessor"],["common","xyAxis"],{data:9,xAccessor:6,series:9,colorScheme:7,pointIdAccessor:6,curve:0,lineWidth:1}],WaterfallChart:[["data"],"array",["xAccessor","yAccessor"],["common","xyAxis"],{data:9,xAccessor:6,yAccessor:6,positiveColor:0,negativeColor:0,connectorStroke:0,connectorWidth:1,gap:1,xExtent:9,yExtent:9,pointIdAccessor:6}],CandlestickChart:[[],"array",["xAccessor","highAccessor","lowAccessor"],["common","xyAxis"],{data:9,xAccessor:6,highAccessor:6,lowAccessor:6,openAccessor:6,closeAccessor:6,candlestickStyle:10,pointIdAccessor:6,xExtent:9,yExtent:9,mode:[0,0]}],ConnectedScatterplot:[["data"],"array",["xAccessor","yAccessor"],["common","xyAxis"],{styleRules:9,data:9,xAccessor:6,yAccessor:6,orderAccessor:6,orderLabel:0,pointRadius:1,pointIdAccessor:6,xExtent:9,yExtent:9,regression:14,forecast:10,anomaly:10}],ScatterplotMatrix:[["data","fields"],"array",[],["common"],{frameProps:10,data:9,fields:9,fieldLabels:10,cellSize:1,cellGap:1,pointRadius:1,pointOpacity:1,diagonal:[0,21],histogramBins:1,brushMode:[23,22],hoverMode:4,unselectedOpacity:1,idAccessor:6}],MinimapChart:[["data"],"array",[],["common"],{data:9,xAccessor:6,yAccessor:6,xLabel:0,yLabel:0,xFormat:12,yFormat:12,lineBy:6,lineDataAccessor:0,curve:[0,11],lineWidth:1,fillArea:4,areaOpacity:1,showPoints:4,pointRadius:1,minimap:10,renderBefore:4,onBrush:12,brushExtent:9,yExtent:9}],ForceDirectedGraph:[["nodes","edges"],"network",["nodeIdAccessor","sourceAccessor","targetAccessor"],["common"],{styleRules:9,nodes:9,edges:9,nodeIdAccessor:6,nodeIDAccessor:6,sourceAccessor:6,targetAccessor:6,nodeLabel:6,nodeSize:24,nodeSizeRange:9,edgeWidth:24,edgeColor:0,edgeOpacity:1,nodeStroke:0,nodeStrokeWidth:1,iterations:1,forceStrength:1,layoutExecution:[0,23],layoutLoadingContent:3,onLayoutStateChange:12,showLabels:4}],SankeyDiagram:[["edges"],"network",["sourceAccessor","targetAccessor"],["common"],{styleRules:9,edges:9,nodes:9,sourceAccessor:6,targetAccessor:6,valueAccessor:6,nodeIdAccessor:6,edgeColorBy:[6,24],orientation:[0,9],nodeAlign:[0,25],nodePaddingRatio:1,nodeWidth:1,nodeLabel:6,showLabels:4,edgeOpacity:1,edgeSort:12}],ProcessSankey:[["domain"],"network",["sourceAccessor","targetAccessor"],["common"],{edges:9,nodes:9,domain:9,axisTicks:9,sourceAccessor:6,targetAccessor:6,valueAccessor:6,nodeIdAccessor:6,nodeLabel:6,startTimeAccessor:6,endTimeAccessor:6,systemInTimeAccessor:6,systemOutTimeAccessor:6,xExtentAccessor:6,groupBy:6,edgeIdAccessor:6,orientation:[0,10],legendPosition:[0,2],pairing:[0,26],packing:[0,27],laneOrder:[0,28],maxValueScale:1,lanePlacement:[0,29],nodeSizing:[0,30],showLabels:[11,31],labelPriorityAccessor:0,maxLabels:1,selectionDatum:[0,32],groupPadding:1,ribbonLane:[0,33],ribbonMinRun:25,lifetimeMode:[0,34],showLaneRails:4,showQualityReadout:4,edgeOpacity:1,styleRules:9,layoutExecution:[0,23],layoutWorkerThreshold:1,layoutLoadingContent:26,onLayoutStateChange:12,timeFormat:12,valueFormat:12,showParticles:4,particleStyle:10}],ChordDiagram:[["edges"],"network",["sourceAccessor","targetAccessor"],["common"],{styleRules:9,edges:9,nodes:9,sourceAccessor:6,targetAccessor:6,valueAccessor:6,nodeIdAccessor:6,edgeColorBy:[6,35],padAngle:1,groupWidth:1,sortGroups:12,nodeLabel:6,showLabels:4,edgeOpacity:1}],TreeDiagram:[["data"],"object",[],["common"],{styleRules:9,data:10,layout:[0,36],orientation:[0,37],childrenAccessor:6,valueAccessor:6,nodeIdAccessor:6,colorByDepth:4,edgeStyle:[0,38],nodeLabel:6,showLabels:4,nodeSize:1}],Treemap:[["data"],"object",[],["common"],{styleRules:9,data:10,childrenAccessor:6,valueAccessor:6,nodeIdAccessor:6,colorByDepth:4,showLabels:4,labelMode:[0,39],padding:1,paddingTop:1,nodeLabel:6,nodeStyle:12}],CirclePack:[["data"],"object",[],["common"],{styleRules:9,data:10,childrenAccessor:6,valueAccessor:6,nodeIdAccessor:6,colorByDepth:4,showLabels:4,nodeLabel:6,circleOpacity:1,padding:1}],OrbitDiagram:[["data"],"object",[],["common"],{styleRules:9,data:10,childrenAccessor:6,nodeIdAccessor:6,colorByDepth:4,orbitMode:27,orbitSize:16,speed:1,eccentricity:16,showRings:4,nodeRadius:16,showLabels:4,animated:4,revolution:12,revolutionStyle:[0,40],foregroundGraphics:10}],ChoroplethMap:[["areas","valueAccessor"],"array",["valueAccessor"],["common"],{styleRules:9,areas:28,valueAccessor:6,colorScheme:27,projection:29,graticule:3,fitPadding:1,zoomable:4,zoomExtent:9,onZoom:12,dragRotate:4,tileURL:6,tileAttribution:0,tileCacheSize:1,areaOpacity:1}],ProportionalSymbolMap:[["points","sizeBy"],"array",["xAccessor","yAccessor"],["common"],{styleRules:9,points:9,xAccessor:6,yAccessor:6,sizeBy:6,sizeRange:9,areas:28,pointIdAccessor:6,areaStyle:10,projection:29,graticule:3,fitPadding:1,zoomable:4,zoomExtent:9,onZoom:12,dragRotate:4,tileURL:6,tileAttribution:0,tileCacheSize:1}],FlowMap:[["flows"],"array",[],["common"],{flows:9,nodes:9,nodeIdAccessor:0,xAccessor:6,yAccessor:6,valueAccessor:6,lineIdAccessor:6,lineType:[0,41],flowStyle:[0,42],areas:28,areaStyle:10,edgeColorBy:6,edgeOpacity:1,edgeWidthRange:9,pointRadius:1,edgeLinecap:[0,43],showParticles:4,particleStyle:10,projection:29,graticule:3,fitPadding:1,zoomable:4,zoomExtent:9,onZoom:12,dragRotate:4,tileURL:6,tileAttribution:0,tileCacheSize:1}],DistanceCartogram:[["points","center","costAccessor"],"array",[],["common"],{styleRules:9,points:9,lines:9,xAccessor:6,yAccessor:6,nodeIdAccessor:0,center:0,costAccessor:6,strength:1,lineMode:[0,44],transition:1,pointRadius:1,showRings:30,showRingLabels:4,ringStyle:10,showNorth:4,costLabel:0,cartogramLayout:[0,45],projection:29,graticule:3,fitPadding:1,zoomable:4,zoomExtent:9,onZoom:12,dragRotate:4,tileURL:6,tileAttribution:0,tileCacheSize:1}],RealtimeLineChart:[[],"realtime",[],["realtime"],{styleRules:9,stroke:0,strokeWidth:1,strokeDasharray:0,opacity:1,aggregate:10,eventTime:10,transition:10}],RealtimeHistogram:[["binSize"],"realtime",[],["realtime"],{styleRules:9,binSize:1,direction:[0,46],categoryAccessor:6,colors:10,fill:0,stroke:0,strokeWidth:1,opacity:1,gap:1,legend:5,brush:14,onBrush:12,linkedBrush:17,transition:10}],TemporalHistogram:[["data","binSize"],"array",["timeAccessor","valueAccessor","categoryAccessor"],["realtimeStatic"],{styleRules:9,data:9,binSize:1,size:9,width:1,height:1,margin:2,className:0,timeAccessor:6,valueAccessor:6,direction:[0,46],categoryAccessor:6,colors:10,timeExtent:9,valueExtent:9,extentPadding:1,showAxes:4,background:0,enableHover:3,tooltip:13,tooltipContent:12,onHover:12,annotations:9,autoPlaceAnnotations:3,responsiveRules:9,mobileSemantics:10,mobileInteraction:3,svgAnnotationRules:12,tickFormatTime:12,tickFormatValue:12,fill:0,stroke:0,strokeWidth:1,opacity:1,gap:1,legend:5,transition:10,linkedHover:14,linkedBrush:17,brush:14,onBrush:12}],RealtimeSwarmChart:[[],"realtime",[],["realtime"],{styleRules:9,categoryAccessor:6,colors:10,radius:1,fill:0,opacity:1,stroke:0,strokeWidth:1,pointStyle:12,yScaleType:[0,6],transition:10}],RealtimeWaterfallChart:[[],"realtime",[],["realtime"],{styleRules:9,positiveColor:0,negativeColor:0,connectorStroke:0,connectorWidth:1,gap:1,stroke:0,strokeWidth:1,opacity:1,transition:10}],RealtimeHeatmap:[[],"realtime",[],["realtime"],{styleRules:9,heatmapXBins:1,heatmapYBins:1,aggregation:[0,20],categoryAccessor:6,colorScheme:[0,19],customColorScale:12}],GaltonBoardChart:[[],"array",["valueAccessor"],["physics"],{styleRules:9,valueAccessor:6,valueExtent:9,bins:1,mode:[0,47],simulationMode:[0,48],pegRows:1,mechanicalCount:1,branchProbability:1,referenceLines:21,rerunMS:31,showProjection:4}],EventDropChart:[["data"],"array",["timeAccessor","arrivalAccessor"],["physics"],{styleRules:9,timeAccessor:6,arrivalAccessor:6,windows:10,watermark:22,timeExtent:9,timeScale:1,rerunMS:31,showProjection:4}],UnitPileChart:[[],"array",["categoryAccessor","valueAccessor"],["physics"],{styleRules:9,categoryAccessor:6,valueAccessor:6,mode:[0,47],simulationMode:[0,48],mechanicalCount:1,mechanicalCategories:9,unitValue:1,showProjection:4,sediment:4,rerunMS:31}],CollisionSwarmChart:[[],"array",["xAccessor","groupAccessor","radiusAccessor"],["physics"],{styleRules:9,xAccessor:6,groupAccessor:6,radiusAccessor:6,pointRadius:1,xExtent:9,collisionIterations:1,settle:4,rerunMS:31,showProjection:4}],GauntletChart:[["negativeProperties"],"array",["idAccessor","positiveAccessor","negativeAccessor","metricsAccessor","startTimeAccessor"],["physics"],{idAccessor:6,labelAccessor:6,positiveAccessor:6,negativeAccessor:6,metricsAccessor:6,initialViability:6,positiveProperties:9,negativeProperties:9,gates:9,events:32,bodyGroups:32,crashOffset:1,initialSpawnPacing:10,startTimeAccessor:6,onCapacityChange:12,crashDetection:4,rerunMS:31,showChrome:4,showProjection:4,showTethers:4,coreForceMode:[0,49],terminalBehavior:[0,50]}],CrucibleChart:[["data","phases"],"array",["idAccessor","labelAccessor","categoryAccessor","amountAccessor","metricsAccessor","initialStateAccessor"],["physics"],{description:0,summary:0,phases:9,products:9,events:9,outlets:9,idAccessor:6,labelAccessor:6,categoryAccessor:6,amountAccessor:6,metricsAccessor:6,initialStateAccessor:6,metrics:10,amountLabel:0,conservation:3,projection:10,playback:[0,51],snapshotAt:2,controls:3,paused:4,playbackRate:1,rerunMS:31,seed:25,bodyRadius:1,radiusRange:9,colorBy:6,showBonds:4,showChrome:4,showProjection:4,initialSpawnPacing:10,loading:4,loadingContent:3,emptyContent:3,onStateChange:12,onCrucibleObservation:12,onDiagnostic:12,onConservation:12,onClick:12}],ProcessFlowChart:[["stages"],"array",["idAccessor","stageAccessor","groupBy","workAccessor","radiusAccessor"],["physics"],{stages:9,stageAccessor:6,idAccessor:6,groupBy:6,groupLabelAccessor:6,workAccessor:6,radiusAccessor:6,ballRadius:1,route:[0,52],groupCompletion:[0,53],groupAnchorAlong:1,showProjection:4,showChrome:4,chromeOptions:10,settle:4,gravityX:1,gravityY:1,springStiffness:1,springDamping:1,rerunMS:31,initialSpawnPacing:10,liveCapacity:4,bodyLimit:1,bodyMark:[0,54],seed:1}],PacketFlowChart:[[],"network",["nodeIdAccessor","nodeXAccessor","nodeYAccessor","sourceAccessor","targetAccessor","throughputAccessor","pathAccessor"],["common"],{size:9,background:0,legendLayout:10,nodes:9,links:9,edges:9,data:9,nodeIdAccessor:6,nodeXAccessor:6,nodeYAccessor:6,sourceAccessor:6,targetAccessor:6,throughputAccessor:6,pathAccessor:6,styleRules:9,coordinateMode:[0,55],particleRate:1,maxParticles:1,particleRadius:1,flowSpeed:1,pathConstraint:[0,56],reducedMotion:4,showStaticFlow:4,showNodeLabels:4,showSensors:4,paused:4,rerunMS:31,seed:1}],ChainReactionChart:[["data","taskIDAccessor","labelAccessor","laneAccessor","dependencyAccessor"],"array",["taskIDAccessor","labelAccessor","laneAccessor","dependencyAccessor","startAccessor","endAccessor","progressAccessor","statusAccessor","completionTimeAccessor","blockerAccessor","milestoneAccessor"],["physics"],{taskIDAccessor:6,labelAccessor:6,laneAccessor:6,dependencyAccessor:6,startAccessor:6,endAccessor:6,progressAccessor:6,statusAccessor:6,completionTimeAccessor:6,blockerAccessor:6,milestoneAccessor:6,mode:[0,57],insight:[0,58],currentTime:2,controls:20,mechanism:[0,59],orientation:[0,60],reducedMotion:[0,61],enableHover:4,seed:1,selectedTaskIDs:9,onSelectionChange:12,onObservation:12}],BigNumber:[[],"none",[],[],{width:25,height:25,className:0,chartId:0,description:0,summary:0,loading:4,loadingContent:3,emptyContent:3,value:1,label:0,caption:0,format:[6,62],locale:0,currency:0,precision:1,prefix:0,suffix:0,unit:0,comparison:10,target:10,delta:1,deltaFormat:[6,62],showDeltaPercent:4,direction:[0,63],sentiment:[0,64],thresholds:9,chartSlot:33,chartSize:1,windowSize:1,mode:[0,65],align:[0,66],padding:2,emphasis:[0,4],color:0,background:0,borderColor:0,borderRadius:25,animate:3,stalenessThreshold:1,staleLabel:0,headerSlot:33,valueSlot:33,deltaSlot:33,trendSlot:33,footerSlot:33,onClick:12,onObservation:12}]}).map(([e,[t,a,s,r,o]])=>[e,{required:[...t],dataShape:a,dataAccessors:[...s],props:Object.fromEntries(Object.entries(Object.assign({},...r.map(e=>c[e]),o)).map(([e,t])=>[e,l(t)]))}]));function u(e,t){return(Array.isArray(t)?t:[t]).includes(Array.isArray(e)?"array":typeof e)}var h=new Set(["start","center","end","left","right"]),p={swatchSize:{minimum:1,label:"a positive number"},labelGap:{minimum:0,label:"a non-negative number"},itemGap:{minimum:0,label:"a non-negative number"},rowHeight:{minimum:1,label:"a positive number"},maxWidth:{minimum:1,label:"a positive number"},edgeGutter:{minimum:0,label:"a non-negative number"},sideGutter:{minimum:0,label:"a non-negative number"},axisGutter:{minimum:0,label:"a non-negative number"}};function m(e,t){const i=[];null!=t&&"object"==typeof t||(t={});const n=d[e];if(!n)return{valid:!1,errors:[`Unknown component "${e}". Valid components: ${Object.keys(d).join(", ")}`]};for(const a of n.required)null==t[a]&&i.push(`"${a}" is required for ${e}.`);"array"!==n.dataShape||!Object.prototype.hasOwnProperty.call(n.props,"data")||n.required.includes("data")||function(e,t){return"mechanical"===t.mode&&("GaltonBoardChart"===e||"UnitPileChart"===e)}(e,t)||null!=t.data||i.push(`"data" is required for ${e}.`);for(const[e,a]of Object.entries(t)){if(null==a)continue;const t=n.props[e];if(t){if(!u(a,t.type)){const s=Array.isArray(t.type)?t.type.join(" | "):t.type;i.push(`"${e}" should be ${s}, got ${Array.isArray(a)?"array":typeof a}.`);continue}t.enum&&"string"==typeof a&&!t.enum.includes(a)&&i.push(`"${e}" value "${a}" is not valid. Expected one of: ${t.enum.join(", ")}.`)}}const c=Object.keys(n.props),l=new Set(c);for(const s of Object.keys(t))if(void 0!==t[s]&&!l.has(s)){const t=a(s,c),r=t?`Unknown prop "${s}" for ${e}. Did you mean "${t}"?`:`Unknown prop "${s}" for ${e}. Valid props: ${c.join(", ")}.`;i.push(r)}if("array"===n.dataShape){const a=t.data,c={};for(const e of n.dataAccessors){const a=t[e];"string"==typeof a&&(c[e]=a)}const l=function({componentName:e,data:t,accessors:a,requiredProps:i}){if(i)for(const[t,a]of Object.entries(i))if(null==a)return`${e}: ${t} is required. Provide a field name or function.`;if(null==t)return null;if(!Array.isArray(t)&&"object"==typeof t)return e+": data should be an array, but received an object. If this is hierarchical data, use TreeDiagram, Treemap, or CirclePack instead.";if(!Array.isArray(t)||0===t.length)return e+": No data provided. Pass a non-empty array to the data prop.";if(a){const i=s(t).find(e=>e&&"object"==typeof e);if(i){const t=Object.keys(i);for(const[s,n]of Object.entries(a))if(n&&"string"==typeof n&&!(n in i)){const a=r(n,t),i=a?` Try ${s}="${a}".`:"";return`${e}: ${s} "${n}" not found in data. Available fields: ${t.join(", ")}.${i}`+o(s)}}}return null}({componentName:e,data:a,accessors:Object.keys(c).length>0?c:void 0});l&&i.push(l)}else if("object"===n.dataShape){const a=function({componentName:e,data:t,dataLabel:a="data"}){return null==t?`${e}: No ${a} provided. Pass a hierarchical object with children: { name: "root", children: [...] }.`:Array.isArray(t)?`${e}: ${a} should be a single root object, not an array. Expected: { name: "root", children: [...] }. If you have flat data, use LineChart, BarChart, or Scatterplot instead.`:null}({componentName:e,data:t.data});a&&i.push(a)}else if("network"===n.dataShape){const a=t.nodeIdAccessor??t.nodeIDAccessor??"id",c="string"==typeof a?{nodeIdAccessor:a}:void 0,l=function({componentName:e,nodes:t,edges:a,nodesRequired:i=!1,edgesRequired:n=!0,accessors:c}){if(null==t&&null==a)return null;if(n&&(!a||!Array.isArray(a)||0===a.length))return e+': No edges provided. Pass a non-empty array: edges={[{ source: "A", target: "B", value: 10 }, ...]}.';if(i&&(!t||!Array.isArray(t)||0===t.length))return e+': No nodes provided. Pass a non-empty array: nodes={[{ id: "A" }, { id: "B" }, ...]}.';if(c&&t&&t.length>0){const a=s(t).find(e=>e&&"object"==typeof e);if(a){const t=Object.keys(a);for(const[s,i]of Object.entries(c))if(i&&"string"==typeof i&&!(i in a)){const a=r(i,t),n=a?` Try ${s}="${a}".`:"";return`${e}: ${s} "${i}" not found in node data. Available fields: ${t.join(", ")}.${n}`+o(s)}}}return null}({componentName:e,nodes:t.nodes,edges:t.edges,nodesRequired:n.required.includes("nodes"),edgesRequired:n.required.includes("edges"),accessors:c});l&&i.push(l)}return"GaugeChart"===e&&i.push(...function(e){if(!Array.isArray(e.thresholds))return[];const t=[];return 0===e.thresholds.length&&t.push('"thresholds" for GaugeChart must contain at least one { value, color, label? } object.'),e.thresholds.forEach((e,a)=>{if(!e||"object"!=typeof e||Array.isArray(e))return void t.push(`"thresholds[${a}]" for GaugeChart should be an object with numeric "value" and string "color".`);const s=e;"number"==typeof s.value&&Number.isFinite(s.value)||t.push(`"thresholds[${a}].value" is required for GaugeChart and must be a finite number. BigNumber's "at" threshold key is not supported here.`),"string"==typeof s.color&&0!==s.color.length||t.push(`"thresholds[${a}].color" is required for GaugeChart and must be a non-empty string.`),void 0!==s.label&&"string"!=typeof s.label&&t.push(`"thresholds[${a}].label" for GaugeChart should be a string.`);const r=Object.keys(s).filter(e=>"value"!==e&&"color"!==e&&"label"!==e);r.length>0&&t.push(`"thresholds[${a}]" has unsupported GaugeChart key(s): ${r.join(", ")}. Use { value, color, label? }; { at, level } belongs to BigNumber.`)}),t}(t)),"ScatterplotMatrix"===e&&null!=t.frameProps&&i.push('"frameProps" is not supported for ScatterplotMatrix; configure its matrix props directly.'),i.push(...function(e){const t=e.frameProps;if(null==t||"object"!=typeof t||Array.isArray(t))return[];const a=t.legendLayout;if(null==a||"object"!=typeof a||Array.isArray(a))return null==a?[]:['"frameProps.legendLayout" should be object, got '+(Array.isArray(a)?"array":typeof a)+"."];const s=[],r=a,o=new Set(["align",...Object.keys(p)]);for(const e of Object.keys(r))o.has(e)||s.push(`Unknown "frameProps.legendLayout" key "${e}". Valid keys: ${[...o].join(", ")}.`);void 0!==r.align&&"string"!=typeof r.align?s.push(`"frameProps.legendLayout.align" should be string, got ${Array.isArray(r.align)?"array":typeof r.align}.`):"string"!=typeof r.align||h.has(r.align)||s.push(`"frameProps.legendLayout.align" value "${r.align}" is not valid. Expected one of: ${[...h].join(", ")}.`);for(const[e,t]of Object.entries(p)){const a=r[e];void 0!==a&&("number"==typeof a&&Number.isFinite(a)?t.minimum>a&&s.push(`"frameProps.legendLayout.${e}" should be ${t.label} (minimum ${t.minimum}), got ${a}.`):s.push(`"frameProps.legendLayout.${e}" should be ${t.label}, got ${Array.isArray(a)?"array":typeof a}.`))}return s}(t)),{valid:0===i.length,errors:i}}var g=["title","description","summary"];function y(e){return"string"==typeof e&&e.trim().length>0}var b=new Set(["#0072b2","#e69f00","#009e73","#cc79a7","#56b4e9","#d55e00","#f0e442","#000000"]);function f(e){let t=e.replace(/^#/,"");/^[a-f\d]{3}$/i.test(t)&&(t=t.split("").map(e=>e+e).join(""));const a=t.match(/^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i);if(!a)return null;const[s,r,o]=[parseInt(a[1],16)/255,parseInt(a[2],16)/255,parseInt(a[3],16)/255],i=e=>e>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92;return.2126*i(s)+.7152*i(r)+.0722*i(o)}function A(e,t){const a=f(e),s=f(t);return null===a||null===s?null:(Math.max(a,s)+.05)/(Math.min(a,s)+.05)}var v=new Set(["label","callout","callout-circle","callout-rect","text","widget"]),x=new Set(["label","callout","callout-circle","callout-rect"]);function C(e){return"string"==typeof e?.type?e.type:""}function w(e){return!!e&&"object"==typeof e&&v.has(C(e))}function k(e){return x.has(C(e))&&!function(e){return Array.isArray(e?.disable)&&e.disable.includes("connector")}(e)}var S=new Set(["TreeDiagram","Treemap","CirclePack","OrbitDiagram"]),R=new Set(["ForceDirectedGraph","SankeyDiagram","ChordDiagram"]),P=new Set(["BarChart","StackedBarChart","GroupedBarChart","AreaChart","StackedAreaChart"]),L=new Set(["LineChart","AreaChart","StackedAreaChart"]),j=new Set(["BarChart","StackedBarChart","GroupedBarChart","FunnelChart"]),B=new Set(["LineChart","AreaChart","StackedAreaChart","ConnectedScatterplot"]),$=new Set(["PieChart","DonutChart"]),I={PieChart:"valueAccessor",DonutChart:"valueAccessor",FunnelChart:"valueAccessor"},T=new Set(Object.keys(I)),F={StackedBarChart:"valueAccessor",StackedAreaChart:"yAccessor"},E=new Set(["BigNumber"]),O=new Set(["LineChart","AreaChart","DifferenceChart","StackedAreaChart","Scatterplot","ConnectedScatterplot","BubbleChart","QuadrantChart","MultiAxisLineChart","CandlestickChart","Heatmap","MinimapChart"]),z=new Set(["StreamPhysicsFrame","GaltonBoardChart","EventDropChart","UnitPileChart","CollisionSwarmChart","PacketFlowChart","ProcessFlowChart","PhysicsCustomChart"]),D=new Set(["OrbitDiagram",...z]),M=new Set(["GaltonBoardChart","EventDropChart","UnitPileChart","CollisionSwarmChart","PacketFlowChart","ProcessFlowChart","GauntletChart","CrucibleChart"]),W=new Set(["GaltonBoardChart","EventDropChart","UnitPileChart","CollisionSwarmChart","PacketFlowChart","ProcessFlowChart","GauntletChart","CrucibleChart","PhysicsCustomChart"]),N=new Set(["RealtimeLineChart","RealtimeHistogram","RealtimeSwarmChart","RealtimeWaterfallChart","RealtimeHeatmap","ProcessSankey"]),G=new Set(["MultiAxisLineChart"]),H=new Set(["ChoroplethMap","ProportionalSymbolMap","FlowMap","DistanceCartogram"]),V={Scatterplot:"pointRadius",BubbleChart:"pointRadius",ConnectedScatterplot:"pointRadius",QuadrantChart:"pointRadius",SwarmPlot:"pointRadius",DotPlot:"dotRadius"};function U(e){return"primary"===e?.emphasis||"secondary"===e?.emphasis||null!=function(e){const t=e?.provenance?.confidence;return"number"==typeof t&&Number.isFinite(t)?t:null}(e)}function q(e){const t=e.toLowerCase().replace(/[^a-z]/g,"");if(!t)return 0;if(3>=t.length)return 1;const a=t.replace(/(?:[^laeiouy]es|ed|[^laeiouy]e)$/,"").replace(/^y/,"").match(/[aeiouy]{1,2}/g);return a?a.length:1}function Q(e){return e.physics&&"object"==typeof e.physics?e.physics:{}}function X(t,a,s={}){const r=[],o=e(t),i=z.has(t),n=!!d[t]||!!o||i,c=!0===s.inChartContainer,l=!0===s.describe,u=!0===s.navigable,h=E.has(t),p=S.has(t),{hasTitle:m,hasDescription:f,hasSummary:v,unsupportedFinding:x}=function(e,t){const a=d[e]?.props,s=e=>!!a?.[e],r=g.filter(e=>y(t[e])&&!s(e));return{hasTitle:s("title")&&y(t.title),hasDescription:s("description")&&y(t.description),hasSummary:s("summary")&&y(t.summary),unsupportedFinding:r.length>0?{id:"understandable.unsupported-description-prop",principle:"understandable",heuristic:"Descriptive text is connected to the rendered chart",critical:!0,status:"warn",message:`Useful ${r.join(" and ")} text was supplied, but ${1===r.length?"that prop is":"those props are"} not supported by ${e}'s declared chart API and cannot be credited as rendered accessibility text.`,fix:"Use the component's declared title, description, and summary props when available; for richer generated description or navigation, use ChartContainer with chartConfig plus describe and/or navigable."}:void 0}}(t,a),R=!1!==a.accessibleTable&&!h,P=m||f||v,L=function(e){return!1!==e.tooltip||null!=e.onClick||null!=e.brush||null!=e.onBrush||null!=e.selection||null!=e.linkedHover||null!=e.linkedBrush}(a),j=function(e){const t=Q(e),a=e.controls&&"object"==typeof e.controls?e.controls:{};return!0===e.pauseControl||!0===t.pauseControl||!0===a.pause||"function"==typeof a.pause}(a),B=i,$=function(e){const t=Q(e);return!0===e.settledProjection||!0===t.settledProjection}(a)||M.has(t)&&R,I=function(e){const t=Q(e);return!0===e.reducedMotionSettle||"settle"===e.reducedMotion||!0===t.reducedMotionSettle||"settle"===t.reducedMotion}(a)||B,F=Array.isArray(a.annotations)?a.annotations.filter(e=>!!e&&"object"==typeof e):[],W=n?"pass":"manual",X=n?"":` (unrecognized component "${t}" — verify manually that the built-in applies)`;if(x&&r.push(x),r.push(function(e){const t={id:"perceivable.low-contrast",principle:"perceivable",heuristic:"Low contrast",critical:!0},a=e.colorScheme,s="string"==typeof e.background?e.background:null;if(s&&!s.startsWith("#"))return{...t,status:"manual",message:`Background "${s}" isn't a hex literal (theme/CSS variable) — contrast can't be verified statically.`,fix:'Pass a hex `background` (e.g. "#ffffff"/"#000000"), or verify contrast manually once the theme resolves.'};const r=s??"#ffffff";if(!Array.isArray(a))return{...t,status:"manual",message:"Mark colors come from the theme/CSS variables — contrast can't be verified statically.",fix:"Confirm geometries/large text have ≥ 3:1 and regular text ≥ 4.5:1 contrast against the background."};const o=[];let i=0;for(const e of a){if("string"!=typeof e||!e.startsWith("#"))continue;const t=A(e,r);null!=t&&(i++,3>t&&o.push(`${e} (${t.toFixed(1)}:1)`))}return 0===i?{...t,status:"manual",message:"colorScheme has no parseable hex colors to check.",fix:"Verify contrast manually for non-hex colors."}:o.length>0?{...t,status:"fail",message:`${o.length} color(s) fall below 3:1 contrast vs ${r}: ${o.join(", ")}.`,fix:"Darken (light background) or lighten (dark background) those colors, or use COLOR_BLIND_SAFE_CATEGORICAL."}:{...t,status:"pass",message:`All ${i} checked colorScheme color(s) meet ≥ 3:1 contrast vs ${r}.`}}(a)),r.push({id:"perceivable.content-only-visual",principle:"perceivable",heuristic:"Content is only visual",critical:!0,...h?{status:"pass",message:"BigNumber renders its value as real text with an ARIA label — available without vision."}:R?{status:"pass",message:"A screen-reader data table + live region expose the data non-visually (accessibleTable is on)."}:f&&v?{status:"manual",message:"accessibleTable is off; a description + summary are present. Verify they convey everything the chart shows.",fix:"Re-enable accessibleTable, or confirm via screen reader that the text alternative is complete."}:{status:"fail",message:"accessibleTable is disabled and there's no full text alternative — the data is only available visually.",fix:"Remove accessibleTable={false}, or provide a complete description/summary plus a data table."}}),r.push({id:"perceivable.small-text",principle:"perceivable",heuristic:"Small text size",critical:!0,status:"pass",message:"Semiotic's default tick and axis-label fonts are 12px, meeting Chartability's 9pt/12px floor.",fix:"If a theme or override lowers --semiotic-tick-font-size below 12px, raise it back for low-vision audiences."}),r.push({id:"perceivable.seizure-risk",principle:"perceivable",heuristic:"Visual presents seizure risk",critical:!0,...null!=a.pulse||D.has(t)?{status:"manual",message:"Pulse/continuous animation is in use. Confirm nothing flashes more than 3×/sec, especially saturated red.",fix:"Avoid red flashes and rapid (>3 Hz) flicker; reduced-motion is auto-honored, but verify the default presentation."}:{status:"manual",message:"No flashing detected statically. Confirm no element flashes more than 3×/sec.",fix:"Manual check — most static charts pass trivially."}}),null!=a.colorBy){const e=!0===a.directLabel||!0===a.showLabels,t=function(e){return!!Array.isArray(e.styleRules)&&e.styleRules.some(e=>{if("object"!=typeof e||null===e)return!1;const t=e.style;if("object"!=typeof t||null===t||Array.isArray(t))return!1;const a=t.fill;return"object"==typeof a&&null!==a&&"hatch"===a.type})}(a);r.push({id:"perceivable.color-alone",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,...e?{status:"pass",message:"Categories are encoded by color (colorBy) and also directly labeled, so color isn't the only channel."}:{status:"warn",message:t?"Categories use colorBy and this config authors a HatchFill through styleRules, but a static audit cannot prove those rules give every category a distinct non-color cue. Semiotic does not automatically assign per-category textures.":"Categories are encoded by color (colorBy) with no declared redundant channel. Semiotic supports author-supplied HatchFill patterns through styleRules, but this config has no statically visible HatchFill descriptor and there is no automatic per-category texture assignment.",fix:t?"Verify every category remains distinguishable with color removed; add direct labels where hatching is incomplete, keep categories ≤ ~7, and use a CVD-safe palette.":"Add direct labels (directLabel on LineChart/AreaChart, showLabels on network/hierarchy) or category-targeted styleRules with distinct HatchFill descriptors; keep categories ≤ ~7 and use a CVD-safe palette."}});const s=function(e){if(!Array.isArray(e))return!1;const t=e.filter(e=>"string"==typeof e&&e.startsWith("#")).map(e=>e.toLowerCase());return t.length>0&&t.every(e=>b.has(e))}(a.colorScheme);r.push({id:"perceivable.cvd-safe",principle:"perceivable",heuristic:"Not CVD-friendly",critical:!1,...s?{status:"pass",message:"colorScheme uses Semiotic's Wong colorblind-safe palette."}:{status:"manual",message:"Color encodes meaning; statically we can't confirm the palette is colorblind-safe.",fix:'Use COLOR_BLIND_SAFE_CATEGORICAL from "semiotic", or test your scheme with Viz Palette / Chroma.'}}),r.push({id:"flexible.textures-adjustable",principle:"flexible",heuristic:"Contrast and textures cannot be adjusted",critical:!1,status:"warn",message:t?"This config uses an author-supplied HatchFill through styleRules, but Semiotic has no automatic, theme-aware per-category texture channel or user-facing texture toggle.":"Semiotic supports author-supplied HatchFill patterns through styleRules, but this config has no statically visible HatchFill descriptor; there is no automatic, theme-aware per-category texture channel or user-facing texture toggle.",fix:t?"Verify the authored hatches cover every meaningful category and remain legible in the active theme; pair them with direct labels and a CVD-safe palette.":"Use category-targeted styleRules with distinct HatchFill descriptors or direct labels so the encoding survives color removal. Contrast itself is themeable via CSS variables."})}{const e=F.filter(w);if(e.length>0){const t=a.autoPlaceAnnotations,s="object"==typeof t&&null!==t&&!0===t.redundantCues,o=e.filter(e=>{if("string"!=typeof e.color)return!1;const t=C(e),a=s&&"text"===t;return!(k(e)||a)});r.push({id:"perceivable.annotation-association",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,...0===o.length?{status:"pass",message:"No annotation relies on color alone to indicate its target — wherever color is used, a connector, enclosure, or reference-line cue is present too."}:{status:"warn",message:`${o.length} of ${e.length} annotation(s) carry a color but no connector, enclosure, or reference-line cue, so a color-blind or non-visual reader can't tie them to their target (the correspondence problem).`,fix:"Add a connector (the label/callout default), place the note adjacent to its target, enclose the target, or enable autoPlaceAnnotations: { redundantCues: true } to give colored text notes a leader line — don't rely on color matching alone."}})}}r.push({id:"operable.single-input-modality",principle:"operable",heuristic:"Interaction modality only has one input type",critical:!0,...n?{status:"pass",message:"Built-in keyboard navigation (arrows/Home/End/PageUp-Down/Enter) mirrors mouse hover."}:{status:"manual",message:`Can't confirm keyboard support for "${t}".`,fix:"Verify Tab + arrow-key operation."}});{const e=[];null==a.brush&&null==a.onBrush||e.push("brushing"),!0===a.zoomable&&e.push("zoom/pan"),"isolate"!==a.legendInteraction&&"highlight"!==a.legendInteraction||e.push("legend filtering"),e.length>0&&r.push({id:"operable.complex-action-alternatives",principle:"operable",heuristic:"Complex actions have no alternatives",critical:!1,status:"warn",message:`Mouse-driven ${e.join(", ")} ${e.length>1?"have":"has"} no built-in keyboard/standard-UI equivalent.`,fix:"Pair the complex interaction with a standard control (range inputs for a brush, buttons for zoom, a checkbox list for legend filtering) operable by keyboard and screen reader."})}{const e=V[t];if(e&&L){const t=a[e];"number"==typeof t&&t>0&&24>2*t&&r.push({id:"operable.target-size",principle:"operable",heuristic:"Target pointer interaction size is too small",critical:!1,status:"warn",message:`${e}=${t} gives a ~${2*t}px hit target, below the 24×24px minimum for pointer interaction.`,fix:"Increase the radius, or rely on the chart's hoverRadius / keyboard navigation as the alternative for precise selection."})}}r.push({id:"operable.tab-stops",principle:"operable",heuristic:"Inappropriate tab stops",critical:!1,status:W,message:`The chart takes a single tab stop and navigates data with arrow keys${X} — the recommended pattern for dense charts (no per-datum tab stops to wade through).`}),r.push({id:"operable.interaction-cues",principle:"operable",heuristic:"No interaction cues or instructions",critical:!0,...L?v||f?{status:"manual",message:"Chart is interactive and has descriptive text. Confirm that text explains how to interact (keyboard + pointer).",fix:'State the interaction model in summary, e.g. "Use arrow keys to move between points."'}:{status:"warn",message:"Chart is interactive but nothing explains how to use it.",fix:"Describe the interaction in a summary or nearby text (keyboard navigation, what hover/click reveals)."}:{status:"not-applicable",message:"No interactive behavior detected."}}),r.push({id:"operable.controls-override-at",principle:"operable",heuristic:"Controls override AT controls",critical:!0,status:W,message:`Keyboard handlers fire only while the chart has focus, so they don't hijack page/app screen-reader shortcuts${X}.`}),r.push({id:"operable.focus-indicator",principle:"operable",heuristic:"Keyboard focus indicator missing, obscured, or low contrast",critical:!1,status:W,message:`A shape-adaptive focus ring (var(--semiotic-focus)) marks the focused element${X}.`,fix:n?"Ensure --semiotic-focus keeps ≥ 3:1 contrast against your background.":void 0}),r.push({id:"understandable.title-summary-caption",principle:"understandable",heuristic:"No title, summary, or caption",critical:!0,...P?{status:"pass",message:`Provided: ${[m&&"title",f&&"description",v&&"summary"].filter(Boolean).join(", ")}.`}:c?{status:"manual",message:"No title/description/summary on the chart. If the wrapping ChartContainer supplies a title/subtitle, this is covered at that layer — verify it does.",fix:"Give the ChartContainer a title (and optionally enable describe), or set title/description/summary on the chart."}:{status:"fail",message:"No title, description, or summary — the screen reader falls back to a generic label.",fix:"Add title/description/summary on the chart, or wrap it in a ChartContainer (the opt-in layer for title/caption/description chrome)."}}),r.push({id:"understandable.explain-purpose",principle:"understandable",heuristic:"No explanation for purpose or for how to read",critical:!0,...f||v?{status:"pass",message:"A description/summary is available to explain purpose and how to read the chart."}:l?{status:"manual",message:"ChartContainer's describe option explains how to read the chart (type, stats, trend). Confirm the domain purpose — why this chart exists — is also conveyed (title/subtitle).",fix:"Give the ChartContainer a title/subtitle stating the purpose; describe() covers the how-to-read half."}:m?{status:"warn",message:"Only a title is set — a label, not an explanation of purpose or how to read the chart.",fix:"Add a summary, or enable ChartContainer's describe option for an auto-generated how-to-read description."}:{status:"fail",message:"Nothing explains the chart's purpose or how to read it.",fix:"Add a summary/description, or wrap in a ChartContainer with a title and the describe option (the opt-in full-accessibility layer)."}});{const e=[a.description,a.summary].filter(y).join(". "),t=e?function(e){const t=e.split(/[.!?]+/).map(e=>e.trim()).filter(Boolean),a=e.trim().split(/\s+/).filter(Boolean);if(0===a.length||0===t.length)return null;let s=0;for(const e of a)s+=q(e);return a.length/t.length*.39+s/a.length*11.8-15.59}(e):null;r.push({id:"understandable.reading-level",principle:"understandable",heuristic:"Reading level inappropriate",critical:!0,...null==t?{status:"not-applicable",message:"No description/summary text to grade."}:t>9?{status:"warn",message:`Description/summary reads at ~grade ${t.toFixed(0)}; Chartability targets grade 9 or lower.`,fix:"Shorten sentences and prefer common words."}:{status:"pass",message:`Description/summary reads at ~grade ${Math.max(0,Math.round(t))} (≤ 9).`}})}if(O.has(t)){const e=y(a.xLabel),t=y(a.yLabel);r.push({id:"understandable.axis-labels",principle:"understandable",heuristic:"Axis labels are unclear or missing",critical:!1,...e&&t?{status:"pass",message:"Both axes are labeled (xLabel, yLabel)."}:{status:"warn",message:`Missing axis label: ${[!e&&"xLabel",!t&&"yLabel"].filter(Boolean).join(", ")}. Ticks alone may not name the variable.`,fix:"Set xLabel and yLabel to name each axis's variable and units."}})}if(G.has(t)&&r.push({id:"understandable.information-complexity",principle:"understandable",heuristic:"Information complexity is inappropriate",critical:!1,status:"warn",message:"Dual-axis chart: two y-scales are hard to read accurately and notoriously easy to misinterpret (the crossover point is arbitrary).",fix:"Confirm the second axis is necessary; consider two aligned charts (small multiples) or indexing both series to a common baseline. Label each axis and its series unambiguously."}),F.length>1){const e=F.filter(U).length;r.push({id:"understandable.annotation-hierarchy",principle:"understandable",heuristic:"Information complexity is inappropriate",critical:!1,...e===F.length?{status:"pass",message:`All ${F.length} annotation(s) declare hierarchy through emphasis or provenance confidence, so the renderer can resolve reading order and visual priority.`}:0===e?{status:"warn",message:F.length+" annotations are present with no emphasis or provenance confidence; readers may not know which note is primary.",fix:'Mark the main annotation with emphasis="primary", set supporting notes to emphasis="secondary", or provide provenance.confidence so Semiotic can infer order.'}:{status:"warn",message:`${F.length-e} of ${F.length} annotation(s) have no emphasis or provenance confidence; readers may not know which note is primary among the unordered notes.`,fix:"Set emphasis on each annotation (primary/secondary), or provide provenance.confidence on all annotations so Semiotic can infer order."}})}(null!=a.forecast||null!=a.anomaly||null!=a.band||null!=a.regression)&&r.push({id:"understandable.uncertainty",principle:"understandable",heuristic:"Statistical uncertainty isn't clearly communicated",critical:!1,status:"manual",message:"The chart shows a forecast/regression/band/anomaly overlay. Confirm the uncertainty it represents is explained in text, not just drawn.",fix:"State the confidence interval / method in the summary, and label the band so it isn't mistaken for data."}),null!=a.animate&&!1!==a.animate&&r.push({id:"understandable.changes-followable",principle:"understandable",heuristic:"Changes are not easy to follow",critical:!1,status:W,message:`Transitions animate with object constancy and data changes are mirrored to the live region${X}.`,fix:n?"Keep transition durations in the 250ms–2s range so changes are followable but not slow.":void 0}),r.push({id:"robust.conforms-to-standards",principle:"robust",heuristic:"Does not conform to standards",critical:!1,status:"manual",message:"WCAG 2.1 / Section 508 conformance can't be settled from config alone.",fix:"Run an automated checker (axe) on the rendered output and test with real assistive tech."}),r.push({id:"robust.semantically-valid",principle:"robust",heuristic:"Semantically invalid",critical:!1,status:"manual",message:"Whether interactive elements expose correct roles/names is a render-time, screen-reader question.",fix:"Verify with a screen reader that buttons read as buttons, the chart as an image/group, etc."}),r.push({id:"robust.fragile-technology-support",principle:"robust",heuristic:"Fragile technology support",critical:!1,status:W,message:`Charts render on canvas with an SVG overlay and render to SVG in SSR, so access isn't tied to one rendering path${X}.`,fix:n?"Still test across NVDA+Firefox, JAWS+Chrome, and VoiceOver+Safari — AT support varies.":void 0}),r.push({id:"compromising.table",principle:"compromising",heuristic:"No table",critical:!0,...h?{status:"not-applicable",message:"Single-value display — a table isn't meaningful."}:R?{status:"pass",message:"A human-readable data table is provided (accessibleTable)."}:{status:"fail",message:"accessibleTable is disabled — no human-readable table of the underlying data.",fix:"Remove accessibleTable={false} (unless title/summary/annotations already convey all the data)."}}),h||r.push({id:"compromising.table-static",principle:"compromising",heuristic:"Table/data is static",critical:!1,...c?{status:"manual",message:"Rendered in a ChartContainer. If a data-download action is enabled, the data is exportable.",fix:"Enable the ChartContainer data-download action so users can save the underlying data (keep it opt-in)."}:{status:"warn",message:"The data table is read-only — not downloadable, sortable, or filterable.",fix:"Wrap the chart in a ChartContainer and enable its data-download action (opt-in, so deployments can withhold it where export isn't allowed)."}}),r.push({id:"compromising.shareable-state",principle:"compromising",heuristic:"State is not easy to share and reproduce",critical:!1,status:n?"pass":"manual",message:`Chart state serializes via toConfig/toURL/copyConfig${n?"":X}.`,fix:n?"Expose it to users via the ChartContainer copyConfig action or a shareable URL.":void 0}),r.push({id:"compromising.navigable-structure",principle:"compromising",heuristic:"Information cannot be navigated according to narrative or structure",critical:!1,...u?p?{status:"pass",message:"ChartContainer's navigable option mounts a structured navigation tree, including hierarchy/network branches and their data items."}:{status:"pass",message:"ChartContainer's navigable option mounts a structured tree (chart → axes/series → data points) that screen readers can traverse."}:p?{status:"warn",message:"Hierarchical chart: built-in keyboard navigation is largely flat — it doesn't descend the tree structure.",fix:"Enable ChartContainer's navigable option for a structured navigation tree, or lean on the data table and a summary that conveys the hierarchy."}:{status:W,message:`Keyboard navigation steps through points and switches series/groups${X}.`,fix:n?"For deeper structure (axis → series → datum), enable ChartContainer's navigable option.":void 0}});{const e=Array.isArray(a.data)?a.data:null,s=Array.isArray(a.nodes)?a.nodes:null,o={id:"assistive.data-density",principle:"assistive",heuristic:"Data density is inappropriate",critical:!0};let i;i=T.has(t)&&e&&e.length>7?{...o,status:"warn",message:e.length+" slices in a part-to-whole chart. Chartability suggests ≤ 5 categories; many thin slices are hard to perceive and to describe.",fix:'Group small slices into an "Other" category, or switch to a ranked bar chart.'}:s&&s.length>200?{...o,status:"warn",message:s.length+" nodes. A network this size is hard to navigate non-visually node by node.",fix:"Provide a summary of structure (clusters, hubs, components) and consider filtering or aggregating the graph."}:e&&e.length>5e3?{...o,status:"warn",message:e.length+" data points. Canvas renders this fine, but the non-visual table/navigation become unwieldy.",fix:"Aggregate or bin for the accessible representation, or expose summary statistics rather than every row."}:e?{...o,status:"pass",message:e.length+" data points — a reasonable density for non-visual consumption."}:s?{...o,status:"pass",message:s.length+" nodes — a reasonable density for non-visual consumption."}:{...o,status:"manual",message:"Data not provided inline (push mode); verify density at runtime."},r.push(i)}{const e=Array.isArray(a.data)?a.data:null,t=["valueFormat","yFormat","xFormat","tickFormat","format"].some(e=>"function"==typeof a[e]||"string"==typeof a[e]);let s=!1;if(e&&!t)for(const t of e.slice(0,50))if(t&&"object"==typeof t){for(const e of Object.values(t))if("number"==typeof e&&Number.isFinite(e)&&Math.abs(e)>=1e5){s=!0;break}if(s)break}s&&r.push({id:"assistive.human-readable-numbers",principle:"assistive",heuristic:"Data in text is not human-readable",critical:!1,status:"warn",message:'Data includes large numbers (≥ 100,000) and no value/tick formatter — screen readers will read every digit (e.g. "six hundred fifty thousand…").',fix:'Pass valueFormat / yFormat (e.g. a compact formatter so 6,500,000 reads as "6.5M"); the formatter flows to ticks, tooltips, and the data table.'})}r.push({id:"assistive.features-described",principle:"assistive",heuristic:"Visually apparent features and relationships are not described",critical:!1,...l?{status:"pass",message:"ChartContainer's describe option auto-generates an L1–L3 description (chart type, statistics, and trend) via describeChart()."}:v?{status:"manual",message:"A summary is present. Confirm it describes trends, extrema, clusters, and outliers — not just what the chart is.",fix:"Cover the L2/L3 content blind readers value most: direction of trend, peak/trough, notable outliers."}:{status:"warn",message:"No text describes the visually apparent trends, extrema, or outliers.",fix:"Enable ChartContainer's describe option (auto-generates via describeChart()), or write a summary covering the key trend and notable points."}}),r.push({id:"assistive.skippable-navigation",principle:"assistive",heuristic:"Navigation and interaction is tedious",critical:!0,...h?{status:"not-applicable",message:"Single value — nothing to skip."}:R?{status:"pass",message:'A "Skip to data table" link lets screen-reader users bypass point-by-point navigation.'}:{status:"warn",message:"accessibleTable is off, removing the skip-to-table affordance.",fix:"Keep accessibleTable enabled so users can skip past dense point navigation."}}),r.push({id:"flexible.user-style-respected",principle:"flexible",heuristic:"User style change not respected",critical:!0,status:W,message:`Styling flows through CSS custom properties and honors forced-colors mode, so user/user-agent style changes cascade in${X}.`,fix:n?"Avoid hardcoding colors via frameProps style fns that bypass theme variables.":void 0}),r.push({id:"flexible.reduced-motion",principle:"flexible",heuristic:"Long animations cannot be controlled",critical:!1,...D.has(t)||N.has(t)?j?{status:"pass",message:t+" animates continuously and declares an in-chart pause/stop control."}:{status:"warn",message:t+" animates continuously. prefers-reduced-motion is auto-honored, but there's no in-chart pause/stop control for users who don't set that preference.",fix:"Offer a pause/stop control for looping/streaming motion (Chartability requires it for animation > 2s)."}:{status:W,message:`prefers-reduced-motion is auto-detected; transitions fast-forward and looping animation stops${X}.`}}),i&&(r.push({id:"flexible.sim-pause-control",principle:"flexible",heuristic:"Long animations cannot be controlled",critical:!1,...j?{status:"pass",message:"Physics simulation exposes a pause/stop control for users who need to stop motion."}:{status:"warn",message:"Physics simulation has no declared pause/stop control.",fix:"Provide a visible pause control and set physics.pauseControl=true (or pauseControl=true) so the contract is auditable."}}),r.push({id:"flexible.settled-projection",principle:"flexible",heuristic:"User style change not respected",critical:!1,...$?{status:"pass",message:"A settled-projection table is declared, so non-visual readers get aggregate chart semantics instead of trajectories."}:{status:"warn",message:"Physics chart does not declare a settled projection for its accessible table.",fix:"Provide aggregate rows from the settled projection and set physics.settledProjection=true."}}),r.push({id:"flexible.reduced-motion-settle",principle:"flexible",heuristic:"Long animations cannot be controlled",critical:!1,...I?{status:"pass",message:"Reduced-motion mode settles the simulation to a static chart state instead of freezing bodies mid-flight."}:{status:"warn",message:"Physics chart does not declare reduced-motion synchronous settle behavior.",fix:"In reduced motion, run the world to its settled projection and paint once; set physics.reducedMotionSettle=true."}}));{const e=!0===a.responsiveWidth||!0===a.responsiveHeight,s=H.has(t)&&!0===a.zoomable;r.push({id:"flexible.zoom-reflow",principle:"flexible",heuristic:"Zoom and reflow are not supported",critical:!1,...e?{status:"pass",message:`Chart reflows to its container (${[!0===a.responsiveWidth&&"responsiveWidth",!0===a.responsiveHeight&&"responsiveHeight"].filter(Boolean).join(", ")}), so page zoom doesn't clip it.`}:s?{status:"pass",message:"Geo chart is zoomable/pannable."}:{status:"manual",message:"Fixed width/height — verify the chart survives browser zoom and reflow without clipping or loss of function.",fix:"Use responsiveWidth/responsiveHeight so the chart reflows to its container."}})}if(o){const e=o.encodings?.some(e=>"color"===e.channel&&(!e.redundantWith||0===e.redundantWith.length));e&&r.push({id:"perceivable.recipe-color-alone",principle:"perceivable",heuristic:"Color is used alone to communicate meaning",critical:!1,status:"warn",message:o.name+" declares a color encoding without a redundant cue.",fix:"Add shape, label, position, texture, or a textual category summary to the recipe encoding."}),"required"!==o.accessibility.description||y(a.description)||r.push({id:"understandable.recipe-description",principle:"understandable",heuristic:"Features are not described",critical:!1,status:"fail",message:o.name+" requires a recipe-aware description, but none is attached.",fix:"Call describeChart with recipeId/recipe metadata and attach the returned text as description."}),o.accessibility.fallbackTable&&!1===a.accessibleTable&&r.push({id:"compromising.recipe-fallback",principle:"compromising",heuristic:"No data table is provided",critical:!0,status:"fail",message:o.name+" requires a fallback table, but accessibleTable is disabled.",fix:"Enable accessibleTable and preserve recipe-declared table fields on scene nodes."})}const Y=r.filter(e=>"not-applicable"!==e.status).filter(e=>e.critical),Z={criticalsPassed:Y.filter(e=>"pass"===e.status).length,criticalsEvaluated:Y.length,fails:r.filter(e=>"fail"===e.status).length,warnings:r.filter(e=>"warn"===e.status).length,manual:r.filter(e=>"manual"===e.status).length,passes:r.filter(e=>"pass"===e.status).length};return{component:t,ok:!Y.some(e=>"fail"===e.status),summary:Z,findings:r,reference:"Chartability (POUR-CAF) — https://chartability.github.io/POUR-CAF/. Not a pass/fail cert; pair with manual screen-reader testing (NVDA+Firefox, JAWS+Chrome, VoiceOver+Safari)."}}var Y={pass:"✓",fail:"✗",warn:"⚠",manual:"○","not-applicable":"·"},Z=["perceivable","operable","understandable","robust","compromising","assistive","flexible"];function _(e){const t=[],a=e.summary,s=e.ok?`${a.criticalsPassed}/${a.criticalsEvaluated} critical heuristics pass`:`${a.fails} blocking failure(s) — ${a.criticalsPassed}/${a.criticalsEvaluated} critical heuristics pass`;t.push(`${e.ok?"✓":"✗"} ${e.component}: accessibility audit (Chartability POUR-CAF)`),t.push(` ${s} · ${a.warnings} warning(s) · ${a.manual} to verify manually`);for(const a of Z){const s=e.findings.filter(e=>e.principle===a&&"not-applicable"!==e.status);if(0!==s.length){t.push(""),t.push(" "+a.toUpperCase());for(const e of s)t.push(` ${Y[e.status]} ${e.id}${e.critical?" [critical]":""}: ${e.message}`),!e.fix||"fail"!==e.status&&"warn"!==e.status&&"manual"!==e.status||t.push(" → "+e.fix)}}return t.push(""),t.push(" Ref: "+e.reference),t.join("\n")}export{d as VALIDATION_MAP,m as validateProps,A as contrastRatio,C as annotationType,w as isNoteAnnotation,k as annotationDrawsConnector,S as HIERARCHY_CHARTS,R as NETWORK_CHARTS,P as BAR_AREA_CHARTS,L as TREND_SERIES_CHARTS,j as ORDINAL_BAR_CHARTS,B as CURVE_CHARTS,$ as PIE_CHARTS,I as PART_TO_WHOLE_ACCESSORS,F as NORMALIZED_STACK_ACCESSORS,W as PHYSICS_DIAGNOSTIC_CHARTS,X as auditAccessibility,_ as formatAccessibilityAudit};
@@ -1 +0,0 @@
1
- import{useRef as t,useEffect as r}from"react";import{brushX as e,brushY as n}from"d3-brush";import{select as o}from"d3-selection";import{jsx as l}from"react/jsx-runtime";function u({width:u,height:s,margin:c,scales:i,brushDirection:f,extent:a,onBrush:h}){const m=t(null),p=t(null),b=t(!1),x=u+c.left+c.right,d=s+c.top+c.bottom;return r(()=>{if(!m.current||!i)return;const t=o(m.current).select(".brush-group"),r="x"===f?e().extent([[0,0],[u,s]]):n().extent([[0,0],[u,s]]);return r.on("brush end",t=>{if(b.current)return;if(!t.sourceEvent)return;const r=t.selection;if(!r)return void h(null);const e=("x"===f?i.x:i.y).invert;if(!e)return;const n=[e(r[0]),e(r[1])];h(n)}),t.call(r),p.current=e=>{t.call(r.move,e)},t.select(".selection").attr("fill","steelblue").attr("fill-opacity",.2).attr("stroke","steelblue").attr("stroke-width",1),()=>{p.current=null,r.on("brush end",null)}},[i,u,s,f,h]),r(()=>{if(!p.current||!i||!m.current)return;const t="x"===f?i.x:i.y;if(b.current=!0,a){const r=[t(a[0]),t(a[1])];p.current(r)}else p.current(null);b.current=!1},[a,i,f]),l("svg",{ref:m,width:x,height:d,style:{position:"absolute",top:0,left:0,pointerEvents:"all"},children:l("g",{className:"brush-group",transform:`translate(${c.left},${c.top})`})})}export{u as MinimapBrushOverlay};
@@ -1 +0,0 @@
1
- function n(n,t){return n===t}function t(n,t){if("function"==typeof n)return t=>+n(t);const o=n||t;return n=>+n[o]}function o(n,t){if("function"==typeof n)return n;const o=n||t;return n=>n[o]}function u(n,t){return"function"==typeof n?t=>n(t)+"":n?t=>t[n]+"":t?n=>n[t]+"":void 0}function r(n){return n?"function"==typeof n?n:t=>t[n]||t.id:null}function f(n){return"string"==typeof n?n:n.id}export{n as accessorsEquivalent,t as resolveAccessor,o as resolveRawAccessor,u as resolveStringAccessor,r as resolveLabelFn,f as resolveNodeRefId};
@@ -1 +0,0 @@
1
- function t(t,n){return t===n}function n(t,n){if("function"==typeof t)return n=>+t(n);const e=t||n;return t=>+t[e]}function e(t,n){if("function"==typeof t)return t;const e=t||n;return t=>t[e]}function r(t,n){return"function"==typeof t?n=>t(n)+"":t?n=>n[t]+"":n?t=>t[n]+"":void 0}function o(t){return t?"function"==typeof t?t:n=>n[t]||n.id:null}function c(t){return"string"==typeof t?t:t.id}function u(t,n={}){const e=!0===n.showRetractedAnnotations,r=!0===n.showSupersededAnnotations,o=new Set;for(const n of t){const t=n?.lifecycle?.supersedes;t&&"retracted"!==n?.lifecycle?.status&&o.add(t)}return t.filter(t=>{if("retracted"===t?.lifecycle?.status&&!e)return!1;const n=t?.provenance?.stableId;return!(n&&o.has(n)&&!r)})}export{t as accessorsEquivalent,n as resolveAccessor,e as resolveRawAccessor,r as resolveStringAccessor,o as resolveLabelFn,c as resolveNodeRefId,u as filterAnnotationsByStatus};
@@ -1 +0,0 @@
1
- function e(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function t(t,n,r=t.responsiveRules){if(!Array.isArray(r)||0===r.length)return{props:t,matches:[]};const i=r.map((e,t)=>({rule:e,index:t})).filter(e=>function(e,t){const{when:n}=e,r=t.width,i=t.height,o=function(e){if("number"==typeof e.height&&e.height>0)return e.width/e.height}(t),a=function(e){if("number"==typeof e.height&&e.height>0)return e.height>e.width?"portrait":"landscape"}(t);return!("number"==typeof n.minWidth&&n.minWidth>r||"number"==typeof n.maxWidth&&r>n.maxWidth||"number"==typeof n.minHeight&&("number"!=typeof i||n.minHeight>i)||"number"==typeof n.maxHeight&&("number"!=typeof i||i>n.maxHeight)||"number"==typeof n.minAspectRatio&&("number"!=typeof o||n.minAspectRatio>o)||"number"==typeof n.maxAspectRatio&&("number"!=typeof o||o>n.maxAspectRatio)||n.orientation&&a!==n.orientation)}(e.rule,n)).sort((e,t)=>("number"==typeof e.rule.priority?e.rule.priority:e.index)-("number"==typeof t.rule.priority?t.rule.priority:t.index));return{props:i.reduce((t,n)=>function(t,n){const r={...t,...n};for(const i of["margin","frameProps","mobileSemantics","style"])e(t[i])&&e(n[i])&&(r[i]={...t[i],...n[i]});return"string"==typeof t.className&&"string"==typeof n.className&&(r.className=`${t.className} ${n.className}`),r}(t,n.rule.transform),t),matches:i}}function n(e){if(null==e)return()=>{};const t="function"==typeof e?e:t=>t[e];return e=>o(t(e))}function r(e,t){const r=n(e),i=n(t);return(e,t)=>{const n=i(e);return{value:n,x:r(e),y:n,category:t}}}function i(e,t){const r=n(t??"value"),i=null==e?void 0:"function"==typeof e?e:t=>t[e];return e=>{const t=i?i(e):void 0;return{value:r(e),category:null==t?void 0:t+""}}}function o(e){if("number"==typeof e)return Number.isFinite(e)?e:void 0;if("string"==typeof e&&""!==e.trim()){const t=Number(e);return Number.isFinite(t)?t:void 0}}function a(e,t,n){const r=e.when;return void 0===r||!0===r||!1!==r&&("function"==typeof r?r(t,n):function(e,t,n){const r=null!=e.axis?n[e.axis]:null!=e.field?t[e.field]:n.value;if(void 0!==e.eq&&r!==e.eq)return!1;if(void 0!==e.ne&&r===e.ne)return!1;if(void 0!==e.in&&!e.in.includes(r))return!1;if(void 0===e.gt&&void 0===e.gte&&void 0===e.lt&&void 0===e.lte&&void 0===e.within&&void 0===e.outside)return!0;const i=o(r);if(void 0===i)return!1;if(void 0!==e.gt&&e.gt>=i)return!1;if(void 0!==e.gte&&e.gte>i)return!1;if(void 0!==e.lt&&i>=e.lt)return!1;if(void 0!==e.lte&&i>e.lte)return!1;if(void 0!==e.within){const[t,n]=e.within;if(t>i||i>n)return!1}if(void 0!==e.outside){const[t,n]=e.outside;if(i>=t&&n>=i)return!1}return!0}(r,t,n))}function s(e,t,n){if(!t||0===t.length)return{};let r={};for(const i of t){if(!a(i,e,n))continue;const t="function"==typeof i.style?i.style(e,n):i.style;t&&(r={...r,...t})}return r}function c(e,t,n,r=e=>e){const i=e??(()=>({}));return t&&0!==t.length?(e,o)=>{const a=r(e),c={...i(e,o)};return Object.assign(c,s(a,t,n(a,o))),c}:i}function u(e,t,n,r){if(!e||0===e.length)return r;const o=i(t,n);return(t,n)=>{const i=t&&t.data||t,a=s(i,e,o(i)),c=r?r(t,n):void 0;return c?{...a,...c}:a}}var f=["#0072B2","#E69F00","#009E73","#CC79A7","#56B4E9","#D55E00","#F0E442","#000000"],l={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}},d={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}},m={mode:"light",colors:{primary:"#0000cc",secondary:"#333333",categorical:f,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 y(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 h(e){if(!e.accessibility)return e;let t=e;if(e.accessibility.colorBlindSafe&&(t={...t,colors:{...t.colors,categorical:f}}),e.accessibility.highContrast){const e="dark"===t.mode;t={...t,colors:{...t.colors,text:e?"#ffffff":"#000000",textSecondary:e?"#cccccc":"#333333",grid:e?"#666666":"#999999",border:e?"#888888":"#000000"}}}return t}function g(e){const t=[],n=e.domain;null==n?t.push({severity:"error",code:"PROCESS_SANKEY_MISSING_DOMAIN",message:"ProcessSankey requires domain: [tStart, tEnd].",fix:"Pass domain={[start, end]} as numbers or Date-compatible values."}):Array.isArray(n)&&2===n.length&&Number.isFinite(Number(n[0]))&&Number.isFinite(Number(n[1]))||t.push({severity:"error",code:"PROCESS_SANKEY_BAD_DOMAIN",message:"domain must be a 2-tuple of finite times.",fix:"Use domain={[t0, t1]} with t0 <= t1."});const r=e.edges;if(Array.isArray(r)&&r.length>0){const e=r[0];null!=e.startTime&&null!=e.endTime||t.push({severity:"warning",code:"PROCESS_SANKEY_EDGE_TIMES",message:"Edges should carry startTime and endTime for temporal layout.",fix:"Add startTime/endTime fields or set startTimeAccessor/endTimeAccessor."})}const i=e.nodes,o=Array.isArray(i)?i.length:0;return!0!==e.showLabels||24>o||t.push({severity:"warning",code:"PROCESS_SANKEY_LABEL_DENSITY",message:`showLabels={true} with ${o} nodes may overcrowd the plot.`,fix:'Use showLabels="auto" with optional labelPriorityAccessor / maxLabels.'}),80>(Array.isArray(r)?r.length:0)||null!=e.layoutExecution||"off"===e.packing||t.push({severity:"warning",code:"PROCESS_SANKEY_WORKER_HINT",message:"Dense ProcessSankey layouts benefit from worker packing/order.",fix:'layoutExecution defaults to "auto"; set layoutExecution="worker" or raise layoutWorkerThreshold deliberately.'}),t}function p(e,t){return e===t}function b(e,t){if("function"==typeof e)return t=>+e(t);const n=e||t;return e=>+e[n]}function x(e,t){if("function"==typeof e)return e;const n=e||t;return e=>e[n]}function v(e,t){return"function"==typeof e?t=>e(t)+"":e?t=>t[e]+"":t?e=>e[t]+"":void 0}function A(e){return e?"function"==typeof e?e:t=>t[e]||t.id:null}function S(e){return"string"==typeof e?e:e.id}var N=/^\d{4}-\d{1,2}$/;function w(e){const t=e.trim();if(!t||!Number.isNaN(Number(t)))return NaN;const n=N.test(t)?t+"-01":t;if(n===t&&10>t.length)return NaN;const r=Date.parse(n);return Number.isFinite(r)?r:NaN}function E(e){return e instanceof Date?e.getTime():"string"==typeof e?w(e):+e}var k=new Set(["label","callout","callout-circle","callout-rect","text","widget"]),M=new Set(["label","callout","callout-circle","callout-rect"]);function R(e){return"string"==typeof e?.type?e.type:""}function _(e){return!!e&&"object"==typeof e&&k.has(R(e))}function T(e){return M.has(R(e))&&!function(e){return Array.isArray(e?.disable)&&e.disable.includes("connector")}(e)}function O(e,t={}){const n=!0===t.showRetractedAnnotations,r=!0===t.showSupersededAnnotations,i=new Set;for(const t of e){const e=t?.lifecycle?.supersedes;e&&"retracted"!==t?.lifecycle?.status&&i.add(e)}return e.filter(e=>{if("retracted"===e?.lifecycle?.status&&!n)return!1;const t=e?.provenance?.stableId;return!(t&&i.has(t)&&!r)})}function P(e){return e instanceof Date?"date:"+e.getTime():`${typeof e}:${e+""}`}var F={kind:"rank-competition"};function I(e,t,n,r){const i=e??t;return"function"==typeof i?i(n,r):n[i+""]}function B(e){const t=new Map;(Array.isArray(e.data)?e.data:[]).forEach((n,r)=>{if(!Number.isFinite(Number(I(e.yAccessor,"y",n,r))))return;const i=P(I(e.xAccessor,"x",n,r)),o=t.get(i)??new Set;o.add(I(e.lineBy,"series",n,r)+""),t.set(i,o)});const n=Array.from(t.values(),e=>e.size).sort((e,t)=>e-t);if(0===n.length)return[];const r=Math.floor(n.length/2),i={columns:n.length,median:n.length%2?n[r]:(n[r-1]+n[r])/2,max:n[n.length-1],contestedColumns:n.filter(e=>e>=2).length},o=2>i.max;return o||2>i.contestedColumns||2>i.median?[{code:o?"BUMP_NO_RANK_COMPETITION":"BUMP_SPARSE_RANK_COMPETITION",severity:o?"error":"warning",message:o?"Every ranking column contains one series, so every trajectory remains at rank 1.":"Too few ranking columns contain competing series for reliable rank movement.",fix:"Use a lineBy field with repeated series across shared x columns, or choose a value-based chart.",metrics:{...i}}]:[]}var C=Symbol.for("semiotic.semantic-viability"),z=globalThis,D=z[C]??(z[C]=new Map);function K(e){return D.has(e)}function q(e){return D.get(e)}import{interpolateLab as L}from"d3-interpolate";function W(e,t={}){const n=t.baseOpacity??1;return t.highlight||t.predicate?!function(e,t){if(!t)return!0;const n=Array.isArray(t)?t:[t],r=e;for(const e of n)if(null!=e.value&&r[e.field]+""!=e.value+"")return!1;return!0}(e,t.highlight)||t.predicate&&!t.predicate(e)?t.dimOpacity??.16:Math.min(1,n+(t.brighten??0)):n}function Y(e){const t=Number(e);return Number.isFinite(t)?Math.max(0,t):0}function $(e){let t=e>>>0;return function(){t=t+1831565813|0;let e=Math.imul(t^t>>>15,1|t);return e=e+Math.imul(e^e>>>7,61|e)^e,((e^e>>>14)>>>0)/4294967296}}function H(e){return"primary"===e?.emphasis||!0===e?.defensive}function U(e,t,n={}){return"number"==typeof n.maxAnnotations&&Number.isFinite(n.maxAnnotations)?Math.max(0,Math.floor(n.maxAnnotations)):e>0&&t>0?Math.max(1,Math.round(e*t/(n.areaPerAnnotation&&n.areaPerAnnotation>0?n.areaPerAnnotation:2e4))):1/0}function j(e){let t;const n=e?.emphasis;t="primary"===n?100:"secondary"===n?10:50;const r=e?.provenance?.confidence;switch("number"==typeof r&&Number.isFinite(r)&&(t+=15*Math.max(0,Math.min(1,r))),e?.lifecycle?.freshness){case"fresh":t+=8;break;case"aging":t+=4;break;case"stale":t+=1;break;case"expired":t-=200}return t}function G(e){const{annotations:t,width:n,height:r}=e,i=Math.max(0,e.minVisible??1),o=U(n,r,e),a=t.map((e,t)=>{return{annotation:e,index:t,note:(n=e,_(n))};var n}),s=a.filter(e=>e.note);if(0===s.length||o>=s.length)return{visible:t.slice(),deferred:[],budget:o};const c=s.filter(e=>H(e.annotation)),u=s.filter(e=>!H(e.annotation)).sort((e,t)=>j(t.annotation)-j(e.annotation)||e.index-t.index),f=Math.min(u.length,Math.max(Math.max(0,o-c.length),Math.max(0,i-c.length))),l=new Set([...c.map(e=>e.index),...u.slice(0,f).map(e=>e.index)]),d=[],m=[];for(const{annotation:e,index:t,note:n}of a)!n||l.has(t)?d.push(e):m.push(e);return{visible:d,deferred:m,budget:o}}function V(e){const t=e.provenance,n=e.id??e.stableId??t?.stableId;return null==n||""===n?void 0:n+""}export{t as resolveResponsiveRules,P as bumpXIdentity,F as BUMP_CHART_SEMANTIC_VIABILITY,B as evaluateRankCompetition,K as hasRegisteredSemanticViability,q as getRegisteredSemanticViability,n as makeRuleValueResolver,r as makeXYRuleContext,i as makeNodeRuleContext,a as ruleMatches,s as resolveStyleRules,c as composeStyleRules,u as styleRulesToNodeStyle,l as LIGHT_THEME,d as DARK_THEME,m as HIGH_CONTRAST_THEME,y as resolveThemeSemanticColors,h as applyThemeAccessibility,g as diagnoseProcessSankeyProps,W as dimFor,Y as nonNegativeFinite,$ as mulberry32,p as accessorsEquivalent,b as resolveAccessor,x as resolveRawAccessor,v as resolveStringAccessor,A as resolveLabelFn,S as resolveNodeRefId,w as parseDateLikeString,E as coerceDateLikeValue,R as annotationType,_ as isNoteAnnotation,T as annotationDrawsConnector,U as annotationBudget,G as annotationDensity,O as filterAnnotationsByStatus,V as annotationStableId};
@@ -1 +0,0 @@
1
- import{auditData as r,toDataAuditNotifications as o}from"./c-BBKITSXB.min.js";import"./c-W3CE4A4S.min.js";function t(t,n){if(!n||!t?.component||!t.props)return[];const c="object"==typeof n?n:{};try{const n=r(t.component,t.props,void 0,{checkOutliers:c.checkOutliers});return o(n,{max:c.max,errorsOnly:c.errorsOnly})}catch{return[]}}export{t as buildChartDataAuditNotifications};
@@ -1 +0,0 @@
1
- import{runForceLayoutWorker as n}from"./c-KM3N7F7R.min.js";import{forceLayout as t}from"./c-H3DNMTCC.min.js";import{canUseForceWorker as e,shouldUseForceWorker as r}from"./c-6HRB2L7H.min.js";import{useWasHydratingFromSSR as o}from"./c-VN2HG5BS.min.js";import{useEffect as i,useMemo as s,useRef as u,useState as a}from"react";var d=new WeakMap;function l(n){const t=[];for(const e of Object.keys(n).sort()){const r=n[e];if(void 0!==r){if("function"==typeof r)return null;t.push(`${e}:${r+""}`)}}return t.join("|")}function c(n,t,e){return null==e?null:d.get(n)?.get(t)?.get(e)??null}function p(n,t,e,r){if(null==e)return;let o=d.get(n);o||(o=new WeakMap,d.set(n,o));let i=o.get(t);if(i||(i=new Map,o.set(t,i)),!i.has(e)&&i.size>=16){const n=i.keys().next().value;void 0!==n&&i.delete(n)}i.set(e,r)}function f(d,f,m={}){const g=o(),{seed:h,iterations:k,repulsion:y,linkDistance:w,linkStrength:j,centerStrength:R,damping:b,nodeRadius:v,nodePadding:x,inset:M,execution:S,workerThreshold:E}=m,H=s(()=>({seed:h,iterations:k,repulsion:y,linkDistance:w,linkStrength:j,centerStrength:R,damping:b,nodeRadius:v,nodePadding:x,inset:M,execution:S,workerThreshold:E}),[h,k,y,w,j,R,b,v,x,M,S,E]),T=u(g),[A,C]=a(()=>{if("undefined"==typeof window||g){const n=t(d,f,H);return p(d,f,l(H),n),{positions:n,status:"ready",error:null}}const n=c(d,f,l(H));return n?{positions:n,status:"ready",error:null}:{positions:null,status:"pending",error:null}});return i(()=>{if(T.current)return void(T.current=!1);const o=l(H),i=c(d,f,o);if(i)return void C(n=>"ready"===n.status&&n.positions===i?n:{positions:i,status:"ready",error:null});const s=new AbortController;return C(n=>({positions:n.positions,status:"pending",error:null})),async function(o,i,s={}){const{execution:u="auto",signal:a,workerThreshold:d,nodeRadius:l,...c}=s,p=c.iterations??260;if(!e()||!r(u,o.length,i.length,p,d))return t(o,i,{...c,nodeRadius:l});const f={kind:"normalized",nodes:o.map(n=>({...n})),edges:i.map(n=>({...n})),options:c,nodeRadii:"function"==typeof l?Object.fromEntries(o.map(n=>[n.id,l(n)])):null==l?void 0:Object.fromEntries(o.map(n=>[n.id,l]))};try{return(await n(f,a)).positions}catch(n){if("AbortError"===n?.name)throw n;return t(o,i,{...c,nodeRadius:l})}}(d,f,{...H,signal:s.signal}).then(n=>{p(d,f,o,n),C({positions:n,status:"ready",error:null})}).catch(n=>{"AbortError"!==n.name&&C(t=>({positions:t.positions,status:"error",error:n}))}),()=>s.abort()},[d,f,H]),A}export{f as useForceLayout};
@@ -1 +0,0 @@
1
- import{registerBuiltInXYPlugins as m}from"./c-VUH4PGZY.min.js";import"./c-VUBQNQJH.min.js";import"./c-I6J3FEZE.min.js";import"./c-TMOSJLT3.min.js";import"./c-AH6J4MTN.min.js";import"./c-CZF7MV67.min.js";import"./c-G3VYMHKE.min.js";import"./c-F3LIKINL.min.js";import"./c-VGKUEZBC.min.js";import"./c-T6UAIKBH.min.js";import"./c-5JWCTX3G.min.js";import"./c-54IRWOGM.min.js";import"./c-MT3WBK7M.min.js";import"./c-UC5PTTFI.min.js";import"./c-QSGWX53A.min.js";import"./c-EGR6VYBW.min.js";import"./c-PGKQGGQ2.min.js";import"./c-QKHMBE2E.min.js";export{m as registerBuiltInXYPlugins};
@@ -1 +0,0 @@
1
- var e="__semioticSelectionData";function n(n,t){return t?.length?(Object.defineProperty(n,e,{configurable:!0,enumerable:!1,value:t}),n):n}function t(n){return n?.[e]}export{n as attachSelectionProvenance,t as getSelectionProvenance};
@@ -1 +0,0 @@
1
- import*as e from"react";import{createPortal as t}from"react-dom";import{Fragment as r,jsx as n}from"react/jsx-runtime";function o({target:o,children:a}){const[s,c]=e.useState({requestedTarget:o,resolved:!1,target:null});return e.useEffect(()=>{const e=function(e){return"string"==typeof e?document.getElementById(e):"function"==typeof e?e():e}(o);"production"!==process.env.NODE_ENV&&null==e&&"string"==typeof o&&console.warn(`[Semiotic] accessibleTable portal target "${o}" was not found. Rendering the data-summary controls inline instead.`),c({requestedTarget:o,resolved:!0,target:e})},[o]),s.requestedTarget===o&&s.resolved?s.target?t(a,s.target):n(r,{children:a}):null}export{o as default};
@@ -1 +0,0 @@
1
- import{isNoteAnnotation as t}from"./c-4ES5367Y.min.js";import{interpolateLab as n}from"d3-interpolate";function e(t){return"function"==typeof t?t:n=>n[t]}function r(t,n,e){const r=t?.data,i=r?r[n]:void 0;if(null!=i)return i;const o=t?.[n];return null==o?e:o}function i(t){return null==t?null:t.data??t.datum??t}function o(t,n){const e=new Map;for(const r of t){const t=n(r),i=e.get(t);i?i.push(r):e.set(t,[r])}return e}function a(t){const n=Object.create(null);return t((t,e)=>{n[t]=e}),n}function s(t,n){if(!n)return!0;const e=Array.isArray(n)?n:[n],r=t;for(const t of e)if(null!=t.value&&r[t.field]+""!=t.value+"")return!1;return!0}function u(t,n={}){const e=n.baseOpacity??1;return n.highlight||n.predicate?!s(t,n.highlight)||n.predicate&&!n.predicate(t)?n.dimOpacity??.16:Math.min(1,e+(n.brighten??0)):e}function c(t){return t.join("|")}var f=class{constructor(t=12){this.maxSize=t,this.store=new Map}get(t){return this.store.get(t)}set(t,n){this.maxSize>this.store.size||this.store.clear(),this.store.set(t,n)}getOrCompute(t,n){const e=this.store.get(t);if(void 0!==e)return e;const r=n();return this.set(t,r),r}clear(){this.store.clear()}get size(){return this.store.size}};function h(t,e=.72){const r=n(t,"#ffffff"),i=n(t,"#000000"),o=n(t,t)(0);return t=>{const n=0>t?0:t>1?1:t;return.5===n?o:.5>n?r(2*(.5-n)*e):i(2*(n-.5)*e)}}function l(t,n,e=.72){return h(t,e)(n)}function m(t){return a(n=>{for(const[e,r]of Object.entries(t))n(e,r)})}function p(t){return t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"item"}function d(t,n,e){return Math.max(n,Math.min(e,t))}function g(t){const n=Number(t);return Number.isFinite(n)?Math.max(0,n):0}function x(t){if(0===t.length)return 0;let n=0;for(const e of t)n+=e;return n/t.length}function b(t,n){const e=d(n,0,1),r=t.trim().replace(/^#/,""),i=3===r.length?r.split("").map(t=>t+t).join(""):r;return/^[0-9a-fA-F]{6}$/.test(i)?`rgba(${parseInt(i.slice(0,2),16)}, ${parseInt(i.slice(2,4),16)}, ${parseInt(i.slice(4,6),16)}, ${e})`:t}function M(t){let n=t>>>0;return function(){n=n+1831565813|0;let t=Math.imul(n^n>>>15,1|n);return t=t+Math.imul(t^t>>>7,61|t)^t,((t^t>>>14)>>>0)/4294967296}}var v=2e4;function y(t){return"primary"===t?.emphasis||!0===t?.defensive}function A(t,n,e={}){return"number"==typeof e.maxAnnotations&&Number.isFinite(e.maxAnnotations)?Math.max(0,Math.floor(e.maxAnnotations)):t>0&&n>0?Math.max(1,Math.round(t*n/(e.areaPerAnnotation&&e.areaPerAnnotation>0?e.areaPerAnnotation:2e4))):1/0}function w(t){let n;const e=t?.emphasis;n="primary"===e?100:"secondary"===e?10:50;const r=t?.provenance?.confidence;switch("number"==typeof r&&Number.isFinite(r)&&(n+=15*Math.max(0,Math.min(1,r))),t?.lifecycle?.freshness){case"fresh":n+=8;break;case"aging":n+=4;break;case"stale":n+=1;break;case"expired":n-=200}return n}function z(n){const{annotations:e,width:r,height:i}=n,o=Math.max(0,n.minVisible??1),a=A(r,i,n),s=e.map((n,e)=>{return{annotation:n,index:e,note:(r=n,t(r))};var r}),u=s.filter(t=>t.note);if(0===u.length||a>=u.length)return{visible:e.slice(),deferred:[],budget:a};const c=u.filter(t=>y(t.annotation)),f=u.filter(t=>!y(t.annotation)).sort((t,n)=>w(n.annotation)-w(t.annotation)||t.index-n.index),h=Math.min(f.length,Math.max(Math.max(0,a-c.length),Math.max(0,o-c.length))),l=new Set([...c.map(t=>t.index),...f.slice(0,h).map(t=>t.index)]),m=[],p=[];for(const{annotation:t,index:n,note:e}of s)!e||l.has(n)?m.push(t):p.push(t);return{visible:m,deferred:p,budget:a}}export{e as resolveAccessor,r as readField,i as unwrapDatum,o as groupBy,a as createSafeDatum,s as matchesHighlight,u as dimFor,c as signatureKey,f as LayoutCache,h as makeShade,l as shade,m as datumFromFields,p as stableGlyphId,d as clamp,g as nonNegativeFinite,x as mean,b as withAlpha,M as mulberry32,v as DEFAULT_AREA_PER_ANNOTATION,A as annotationBudget,z as annotationDensity};
@@ -1 +0,0 @@
1
- var t=[40,40],e=[.5,.5];function n(n,r){const[o,i]=n.viewBox??t,[a,s]=n.anchor??e,c=i>0?i:1,l=Math.max(0,r)/c,f=(o>0?o:c)*l,u=c*l;return{width:f,height:u,scale:l,offsetX:-a*f,offsetY:-s*u}}function r(t,e){const r=n(t,e),o=[[r.offsetX,r.offsetY],[r.offsetX+r.width,r.offsetY],[r.offsetX,r.offsetY+r.height],[r.offsetX+r.width,r.offsetY+r.height]];let i=0;for(const[t,e]of o){const n=Math.sqrt(t*t+e*e);n>i&&(i=n)}return i}function o(t,e,n,r){if("none"!==t)return"color"===t||null==t?e??r:"accent"===t?n:t}var i=null;function a(t){if("undefined"==typeof Path2D)return null;i||(i=new Map);const e=i.get(t);if(e)return e;const n=new Path2D(t);return i.size>1024&&i.clear(),i.set(t,n),n}function s(e,n,r=0,o="horizontal"){const[i,a]=e.viewBox??t,s=Math.min(1,Math.max(0,r)),c=Math.min(1,Math.max(0,n));return c>s?s>0||1>c?"vertical"===o?{x:0,y:a*(1-c),width:i,height:a*(c-s)}:{x:i*s,y:0,width:i*(c-s),height:a}:null:{x:0,y:0,width:0,height:0}}function c(t,e){const r=n(t,e);return{centerDx:r.offsetX+r.width/2,centerDy:r.offsetY+r.height/2,halfWidth:r.width/2,halfHeight:r.height/2,radius:Math.hypot(r.width,r.height)/2}}function l(t,e,n,r,i,s=t=>t){for(const c of e.parts){const e=a(c.d);if(!e)continue;const l=c.opacity??1,f=t.globalAlpha;1!==l&&(t.globalAlpha=f*l);const u=i?"none"===c.fill?void 0:i:o(c.fill,n,r);u&&(t.fillStyle=s(u),t.fill(e));const h=i?c.stroke&&"none"!==c.stroke?i:void 0:o(c.stroke??"none",n,r);h&&(t.strokeStyle=s(h),t.lineWidth=c.strokeWidth??1,t.lineCap=c.strokeLinecap??"butt",t.lineJoin=c.strokeLinejoin??"miter",t.stroke(e)),1!==l&&(t.globalAlpha=f)}}function f(t){return{type:"hatch",background:t.background,stroke:t.stroke,lineWidth:t.lineWidth,spacing:t.spacing,angle:t.angle}}var u=null;function h(t={},e){const{background:n="transparent",stroke:r="#000",lineWidth:o=1.5,spacing:i=6,angle:a=45}=t,s={background:n,stroke:r,lineWidth:o,spacing:i,angle:a},c=Math.max(8,Math.ceil(2*i));let l;try{l=function(t){return"undefined"!=typeof OffscreenCanvas?new OffscreenCanvas(t,t):(u||(u=document.createElement("canvas")),u.width=t,u.height=t,u)}(c)}catch{return f(s)}const h=l.getContext("2d");if(!h)return f(s);n&&"transparent"!==n?(h.fillStyle=n,h.fillRect(0,0,c,c)):h.clearRect(0,0,c,c),h.strokeStyle=r,h.lineWidth=o,h.lineCap="square";const d=a*Math.PI/180;if(45===a||-45===a){const t=a>0?1:-1;for(let e=-c;2*c>=e;e+=i)h.beginPath(),h.moveTo(e,0),h.lineTo(e+t*c,c),h.stroke()}else{h.save(),h.translate(c/2,c/2),h.rotate(d);const t=2*c;for(let e=-t;t>=e;e+=i)h.beginPath(),h.moveTo(-t,e),h.lineTo(t,e),h.stroke();h.restore()}return(e||h).createPattern(l,"repeat")}var d=new WeakMap,p=0,m=!1,y=null,g=null,v=null,b=null,k=null,w=new Set;function M(t,e){!function(){if(m)return;if("undefined"==typeof window||"undefined"==typeof document)return;m=!0;const t=t=>{if(!t?.includes("--"))return"";const e=document.createElement("span").style;return e.cssText=t,Array.from(e).filter(t=>t.startsWith("--")).sort().map(t=>`${t}:${e.getPropertyValue(t)}!${e.getPropertyPriority(t)}`).join(";")},e=(e,n)=>{const r=e.target;if(!(r instanceof Element))return!1;if(r===n||r.contains(n))return!0;if(!n.contains(r))return!1;const o="CANVAS"===r.tagName;return!(!o&&!r.querySelector("canvas")||o&&"style"===e.attributeName&&t(e.oldValue)===t(r.getAttribute("style")))},n=t=>{const n=[];for(const r of w){const o=r.getElement();o&&(!t||t.some(t=>e(t,o)))&&n.push(r)}if(!t||0!==n.length){p++;for(const t of n)t.listener()}};if("undefined"!=typeof MutationObserver&&document.documentElement&&(y=new MutationObserver(t=>{n(t)})).observe(document.documentElement,{attributes:!0,attributeFilter:["class","style","data-theme","data-semiotic-theme","data-semiotic-theme-mode"],attributeOldValue:!0,subtree:!0}),"function"==typeof window.matchMedia)try{g=window.matchMedia("(prefers-color-scheme: dark)"),v=()=>n(),"function"==typeof g.addEventListener?g.addEventListener("change",v):"function"==typeof g.addListener&&g.addListener(v)}catch{}document.fonts&&"function"==typeof document.fonts.addEventListener&&(b=document.fonts).addEventListener("loadingdone",k=()=>n())}();const n={getElement:t,listener:e};return w.add(n),()=>{w.delete(n)&&0===w.size&&(y?.disconnect(),y=null,g&&v&&("function"==typeof g.removeEventListener?g.removeEventListener("change",v):"function"==typeof g.removeListener&&g.removeListener(v)),g=null,v=null,b&&k&&b.removeEventListener("loadingdone",k),b=null,k=null,m=!1)}}function x(t,e){if(!e)return e;const n=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 o=n.slice(0,r).trim(),i=n.slice(r+1).trim();return o.startsWith("--")?{name:o,fallback:i||void 0}:null}(e);if(!n)return e;const r=()=>n.fallback?x(t,n.fallback):e,o=t.canvas;if(!o)return r();let i=d.get(o);i&&i.version===p||(i={version:p,map:new Map},d.set(o,i));const a=i.map.get(e);if(void 0!==a)return a;const s=getComputedStyle(o).getPropertyValue(n.name).trim()||r()||e;return i.map.set(e,s),s}function W(t){p++}function $(){return p}import{jsx as S,jsxs as L}from"react/jsx-runtime";function O(t){return"object"==typeof t&&null!==t&&"hatch"===t.type}function E(t){return["hatch",t.background??"transparent",t.stroke??"#000",t.lineWidth??1.5,t.spacing??6,t.angle??45,t.lineOpacity??1].join("|")}function P(t,e){let n=2166136261;const r=E(e);for(let t=0;r.length>t;t++)n^=r.charCodeAt(t),n=Math.imul(n,16777619);return`${t}-hatch-${(n>>>0).toString(36)}`}var A=new Map;function C(t,e){const{background:n="transparent",stroke:r="#000",lineWidth:o=1.5,spacing:i=6,angle:a=45,lineOpacity:s=1}=t,c=Math.max(8,Math.ceil(2*i));return L("pattern",{id:e,width:c,height:c,patternUnits:"userSpaceOnUse",patternTransform:0!==a?`rotate(${a})`:void 0,children:[n&&"transparent"!==n&&S("rect",{width:c,height:c,fill:n}),S("line",{x1:0,y1:0,x2:0,y2:c,stroke:r,strokeWidth:o,strokeOpacity:s}),S("line",{x1:i,y1:0,x2:i,y2:c,stroke:r,strokeWidth:o,strokeOpacity:s})]},e)}function j(t,e,n="#4e79a7"){if(O(t)){const n=P(e,t);return{fill:`url(#${n})`,def:C(t,n)}}return t&&"string"==typeof t?{fill:t}:{fill:n}}function F(t,e,n,r){if(!t||"object"!=typeof t)return;const o=t;if(!Array.isArray(o.stops))return;const i=o.stops.flatMap(t=>{if(!t||"object"!=typeof t)return[];const{offset:e,color:n,opacity:o}=t;return"number"==typeof e&&Number.isFinite(e)?[{offset:Math.max(0,Math.min(1,e)),color:"string"==typeof n&&n?n:r,opacity:"number"==typeof o&&Number.isFinite(o)?Math.max(0,Math.min(1,o)):void 0}]:[]}).sort((t,e)=>t.offset-e.offset);if(!i.length)return;const a="horizontal"===o.direction?"horizontal":"vertical"===o.direction?"vertical":n,s=e+"-gradient";return{fill:`url(#${s})`,def:S("linearGradient",{id:s,x1:0,y1:0,x2:"horizontal"===a?"100%":0,y2:"vertical"===a?"100%":0,children:i.map((t,e)=>S("stop",{offset:100*t.offset+"%",stopColor:t.color,stopOpacity:t.opacity},`${t.offset}-${e}`))},s)}}import{symbol as q,symbolCircle as N,symbolCross as X,symbolDiamond as Y,symbolSquare as z,symbolStar as T,symbolTriangle as I,symbolWye as R}from"d3-shape";var V={circle:N,square:z,triangle:I,diamond:Y,star:T,cross:X,wye:R},D=new Set(["circle","square","triangle","diamond","star","cross","wye","chevron"]),B=["circle","triangle","diamond","star","square","chevron","cross","wye"];function G(t,e,n){if(n)return n;const r=t??"circle";if("chevron"===r)return function(t){const e=1.5*U(t),n=.92*e;return`M0,${-e}L${n},${(.78*e).toFixed(3)}L0,${(.28*e).toFixed(3)}L${-n},${(.78*e).toFixed(3)}Z`}(e);const o=Object.prototype.hasOwnProperty.call(V,r)?V[r]:N;return q(o,Math.max(1,e))()??""}function U(t){return Math.sqrt(Math.max(1,t)/Math.PI)}function H(t,e){const n=new Map;let r=0;return o=>{const i=t(o)+"",a=e&&Object.prototype.hasOwnProperty.call(e,i)?e[i]:void 0;if(a&&D.has(a))return a;let s=n.get(i);return s||(s=B[r%B.length],r++,n.set(i,s)),s}}function J(t,e){const n=t.fillStyle,r="#010203";try{t.fillStyle=r,t.fillStyle=e}catch{return t.fillStyle=n,[78,121,167]}const o=t.fillStyle;if(t.fillStyle=n,"string"!=typeof o)return[78,121,167];if(o.toLowerCase()===r&&e.trim().toLowerCase()!==r)return[78,121,167];if(o.startsWith("#"))return[parseInt(o.slice(1,3),16),parseInt(o.slice(3,5),16),parseInt(o.slice(5,7),16)];const i=o.match(/(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/);return i?[+i[1],+i[2],+i[3]]:[78,121,167]}import{curveMonotoneX as Z,curveMonotoneY as K,curveCardinal as Q,curveCatmullRom as _,curveStep as tt,curveStepBefore as et,curveStepAfter as nt,curveBasis as rt,curveNatural as ot}from"d3-shape";function it(t){switch(t){case"monotoneX":return Z;case"monotoneY":return K;case"cardinal":return Q;case"catmullRom":return _;case"step":return tt;case"stepBefore":return et;case"stepAfter":return nt;case"basis":return rt;case"natural":return ot;default:return null}}function at(t,e,n){if(null==e)return n;if(O(e)){const r=function(t,e){const n=t.background??"transparent",r=t.stroke??"#000",o="transparent"===n||"none"===n?n:x(e,n)||n,i=x(e,r)||r||"#000",a="undefined"!=typeof window&&window.devicePixelRatio||1,s=`${E(t)}|${o}|${i}@${a}`,c=A.get(s);if(void 0!==c)return c;const l=h({background:o,stroke:i,lineWidth:t.lineWidth,spacing:t.spacing,angle:t.angle},e),f=O(l)?null:l;return A.set(s,f),f}(e,t);return r||e.background&&x(t,e.background)||n}return"string"!=typeof e?e:x(t,e)||n}function st(t,e,n){const r=at(t,e,n);if("string"==typeof r&&r.trim().startsWith("var(")){const e=x(t,n);return e&&!e.trim().startsWith("var(")?e:n}return r}function ct(t,e){if(null==e)return;const n=at(t,e,"");return""===n?void 0:n}function lt(t,e,n,r,o,i,a){const s=e.stops.filter(t=>Number.isFinite(t.offset)&&(null==t.opacity||Number.isFinite(t.opacity)));if(2>s.length)return null;const c=t.createLinearGradient(r,o,i,a);for(const e of s)c.addColorStop(Math.max(0,Math.min(1,e.offset)),ft(t,e,n));return c}function ft(t,e,n){const r=e.color??n,o=x(t,r)||r;if(null==e.opacity)return o;const i=Math.max(0,Math.min(1,e.opacity)),[a,s,c]=J(t,o);return`rgba(${a},${s},${c},${i})`}function ut(t,e,n,r){e.fill&&(t.fillStyle=at(t,e.fill,n),void 0!==e.fillOpacity&&(t.globalAlpha=(e.opacity??1)*e.fillOpacity),r())}function ht(t,e,n){e.stroke&&"none"!==e.stroke&&(t.strokeStyle=x(t,e.stroke)||e.stroke,t.lineWidth=e.strokeWidth??1,t.globalAlpha=(e.opacity??1)*(e.strokeOpacity??1),n())}function dt(t){return(t.tl??0)>0||(t.tr??0)>0||(t.br??0)>0||(t.bl??0)>0}function pt(t){const e=t.cornerRadii;if(!e)return{tl:0,tr:0,br:0,bl:0};const n=Math.min(t.w,t.h)/2,r=t=>Math.max(0,Math.min(t??0,n));return{tl:r(e.tl),tr:r(e.tr),br:r(e.br),bl:r(e.bl)}}export{G as symbolPathString,U as symbolRadius,H as makeSymbolResolver,n as glyphPlacement,r as glyphExtent,o as resolveGlyphPaint,s as glyphFractionClipRect,c as glyphHitGeometry,l as drawGlyphParts,M as subscribeToCSSColorInvalidation,x as resolveCSSColor,W as clearCSSColorCache,$ as getCSSColorCacheVersion,J as parseCanvasColor,h as createHatchPattern,O as isHatchFill,P as hatchFillId,C as hatchPatternDef,j as resolveSvgFill,F as resolveAnnotationGradient,it as resolveCurveFactory,at as resolveCanvasFill,st as resolveCanvasPaint,ct as coerceCanvasFill,lt as buildLinearFillGradient,ut as paintNetworkFill,ht as paintNetworkStroke,dt as hasAnyCornerRadius,pt as clampCornerRadii};
@@ -1 +0,0 @@
1
- import{darkenColor as t,lightenColor as o}from"./c-X5UBGU2V.min.js";import{confidenceZScore as n,fitLinearForForecast as e,forecastIntervalStats as r}from"./c-GR6MOEQC.min.js";import{getMax as a,getMinMax as s}from"./c-GGISSW5E.min.js";var i="__forecastSegment",l="__forecastOpacity";function c(t,o,n,e){const r=o.uncertaintyOpacity,a=o.confidenceAccessor;if(!r&&!a)return;const i="object"==typeof r?r:{},c=i.min??.15,f=i.max??1;if(a){const o="function"==typeof a?a:t=>t[a];for(const n of t){const t=o(n);null!=t&&Number.isFinite(t)&&(n[l]=c+Math.max(0,Math.min(1,t))*(f-c))}return}const p=t.map(t=>{const o=n(t),r=e(t);return null!=o&&null!=r&&Number.isFinite(o)&&Number.isFinite(r)?Math.abs(o-r):NaN}),u=p.filter(t=>Number.isFinite(t));if(0===u.length)return;const[h,y]=s(u),d=y-h;t.forEach((t,o)=>{const n=p[o];Number.isFinite(n)&&(t[l]=f-(d>0?(n-h)/d:0)*(f-c))})}function f(t,o){return"function"==typeof o?o(t):!!t[o]}function p(t){return[{type:"anomaly-band",threshold:t.threshold??2,showBand:!1!==t.showBand,fill:t.bandColor||"#6366f1",fillOpacity:t.bandOpacity??.1,anomalyColor:t.anomalyColor||"#ef4444",anomalyRadius:t.anomalyRadius??6,label:t.label}]}function u(t,o,s,l,p){return(u=l).isTraining||u.isForecast||u.isAnomaly||u.upperBounds||u.lowerBounds?function(t,o,n,e,r){const{isTraining:a,isForecast:s,isAnomaly:l,upperBounds:p,lowerBounds:u,color:h="#6366f1",bandOpacity:y=.15,anomalyColor:d="#ef4444",anomalyRadius:m=6,label:b}=e,g=t.map(t=>{let o="observed";return s&&f(t,s)?o="forecast":a&&f(t,a)&&(o="training"),{...t,[i]:o}}),_=e._groupBy,k=[];if(_){const t=new Map;for(const o of g){const n=o[_]??"__default";t.has(n)||t.set(n,[]),t.get(n).push(o)}const o=[];for(const[,n]of t)for(let t=0;n.length-1>t;t++)n[t][i]!==n[t+1][i]&&(o.push({...n[t+1],[i]:n[t][i]}),o.push({...n[t],[i]:n[t+1][i]}));k.push(...g,...o)}else for(let t=0;g.length>t;t++)k.push(g[t]),g.length-1>t&&g[t][i]!==g[t+1][i]&&(k.push({...g[t+1],[i]:g[t][i]}),k.push({...g[t],[i]:g[t+1][i]}));if(e.trainUnderline){const t=[];for(const o of k)"training"===o[i]&&t.push({...o,[i]:"training-base"});k.unshift(...t)}const O=[];if(p&&u){const t="string"==typeof p?p:"__envUpper",o="string"==typeof u?u:"__envLower";if("function"==typeof p||"function"==typeof u)for(const n of k)"function"==typeof p&&(n[t]=p(n)),"function"==typeof u&&(n[o]=u(n));O.push({type:"envelope",upperAccessor:t,lowerAccessor:o,fill:h,fillOpacity:y,label:b})}if(e.uncertaintyOpacity||e.confidenceAccessor){const t=p?"function"==typeof p?p:t=>t[p]:()=>{},o=u?"function"==typeof u?u:t=>t[u]:()=>{};c(k.filter(t=>"forecast"===t[i]),e,t,o)}if(l){const t=e.anomalyStyle,o={type:"highlight",filter:t=>f(t,l)};t?(o.style=t,o.r=m):"function"==typeof d?(o.style=t=>{const o=d(t);return{stroke:o,strokeWidth:1.5,fill:o,fillOpacity:.7}},o.r=m):(o.color=d,o.r=m,o.style={stroke:d,strokeWidth:1.5,fill:d,fillOpacity:.7}),O.push(o)}return r&&O.push({type:"anomaly-band",threshold:r.threshold??2,showBand:!1!==r.showBand,fill:r.bandColor||"#6366f1",fillOpacity:r.bandOpacity??.1,anomalyColor:r.anomalyColor||"#ef4444",anomalyRadius:r.anomalyRadius??6,label:r.label}),{processedData:k,annotations:O}}(t,0,0,l,p):function(t,o,s,l,f){const{trainEnd:p,steps:u=10,confidence:h=.95,color:y="#6366f1",bandOpacity:d=.15,label:m}=l;if(null==p)return{processedData:t,annotations:[]};const b=[],g=[];for(const n of t)n[o]>p?g.push({...n,[i]:"observed"}):b.push({...n,[i]:"training"});const _=b.map(t=>[t[o],t[s]]).filter(t=>null!=t[0]&&null!=t[1]&&isFinite(t[0])&&isFinite(t[1])).sort((t,o)=>t[0]-o[0]),k=[],O=[];if(_.length>=3){const f=_.length,p=e(_);if(p){const{se:e,meanX:b,ssX:g}=r(_,p),w=n(h),B=t.map(t=>t[o]).filter(t=>null!=t&&isFinite(t)),C=a(B),F=_.length>1?(_[f-1][0]-_[0][0])/(f-1):1;for(let t=1;u>=t;t++){const n=C+t*F,r=p(n),a=e*Math.sqrt(1+1/f+(g>0?(n-b)**2/g:0))*w;O.push({[o]:n,[s]:r,[i]:"forecast",__forecastUpper:r+a,__forecastLower:r-a})}c(O,l,t=>t.__forecastUpper,t=>t.__forecastLower),k.push({type:"envelope",upperAccessor:"__forecastUpper",lowerAccessor:"__forecastLower",fill:y,fillOpacity:d,label:m})}}k.push({type:"x-threshold",x:p,color:"#94a3b8",strokeWidth:1,strokeDasharray:"4,2",label:"Train / Forecast"}),f&&k.push({type:"anomaly-band",threshold:f.threshold??2,showBand:!1!==f.showBand,fill:f.bandColor||"#6366f1",fillOpacity:f.bandOpacity??.1,anomalyColor:f.anomalyColor||"#ef4444",anomalyRadius:f.anomalyRadius??6,label:f.label});const w=[];if(w.push(...b),b.length>0&&g.length>0&&w.push({...b[b.length-1],[i]:"observed"}),w.push(...g),O.length>0){const t=g.length>0?g[g.length-1]:b[b.length-1];t&&w.push({...t,[i]:"forecast"}),w.push(...O)}return{processedData:w,annotations:k}}(t,o,s,l,p);var u}function h(n,e){const r=e.trainDasharray??"8,4",a=e.forecastDasharray??"4,4",s=e.color||"#6366f1",c=e.trainOpacity,f=e.forecastOpacity,p=e.trainStroke,u=e.trainLinecap,h=e.trainUnderline;return e=>{const y=n(e),d=e[i];if("training"===d){let o=y.stroke;return"darken"===p?o=t(y.stroke||"#666",.5):p&&(o=p),{...y,stroke:o,strokeDasharray:r,...u&&{strokeLinecap:u},...null!=c&&{strokeOpacity:c}}}if("training-base"===d){let t=y.stroke||"#666";return"lighten"===h&&(t=o(t,.4)),{...y,stroke:t,strokeDasharray:void 0}}if("forecast"===d){const t=e[l],o=null!=t?t:f;return{...y,stroke:s,strokeDasharray:a,...null!=o&&{strokeOpacity:o}}}return y}}export{l as FORECAST_OPACITY_FIELD,i as SEGMENT_FIELD,p as buildAnomalyAnnotations,u as buildForecast,h as createSegmentLineStyle,t as darkenColor,o as lightenColor,c as stampForecastOpacity};
@@ -1 +0,0 @@
1
- function t(t,e,o){let l=o;for(const o of e)"lesser"===o.thresholdType?o.value>t&&(l=o.color):t>o.value&&(l=o.color);return l}function e(e,o,l,n){if(2>e.length||o.length!==e.length||0===l.length)return[];const r=[],h=(t,e,o)=>{const l=r[r.length-1];l?.color===t?l.path.push(o):r.push({color:t,path:[e,o]})};for(let r=1;e.length>r;r++){const[s,c]=e[r-1],[u,f]=e[r],i=o[r-1],g=o[r]-i,p=[0,...0===g?[]:l.map(({value:t})=>(t-i)/g).filter(t=>t>0&&1>t&&Number.isFinite(t)).sort((t,e)=>t-e).filter((t,e,o)=>0===e||t!==o[e-1]),1];for(let e=1;p.length>e;e++){const o=p[e-1],r=p[e];h(t(i+g*((o+r)/2),l,n),[s+(u-s)*o,c+(f-c)*o],[s+(u-s)*r,c+(f-c)*r])}}return r}export{e as buildThresholdLineSegments};
@@ -1 +0,0 @@
1
- import{enrichDatumWithBand as t}from"./c-VGKUEZBC.min.js";import{buildNavGraph as e,extractGeoNavPoints as r,extractOrdinalNavPoints as n,extractXYNavPoints as i,navPointToHover as s,nextGraphIndex as o,nextIndex as c,resolvePosition as u}from"./c-AG7WWVIH.min.js";import{emitClickObservations as a,emitHoverObservations as h,isInteractiveKeyboardTarget as f}from"./c-VN2HG5BS.min.js";var l=class{constructor(t){if(this._capacity=t,this.head=0,this._size=0,1>t)throw Error("RingBuffer capacity must be at least 1");this.buffer=Array(t)}push(t){let e;return this._size===this._capacity?e=this.buffer[this.head]:this._size++,this.buffer[this.head]=t,this.head=(this.head+1)%this._capacity,e}pushMany(t){const e=[];for(const r of t){const t=this.push(r);void 0!==t&&e.push(t)}return e}get(t){if(t>=0&&this._size>t)return this.buffer[(this.head-this._size+t+this._capacity)%this._capacity]}peek(){if(0!==this._size)return this.buffer[(this.head-1+this._capacity)%this._capacity]}peekOldest(){if(0!==this._size)return this.buffer[(this.head-this._size+this._capacity)%this._capacity]}[Symbol.iterator](){let t=0;return{next:()=>this._size>t?{done:!1,value:this.get(t++)}:{done:!0,value:void 0}}}forEach(t){const e=(this.head-this._size+this._capacity)%this._capacity;for(let r=0;this._size>r;r++)t(this.buffer[(e+r)%this._capacity],r)}toArray(){const t=Array(this._size),e=(this.head-this._size+this._capacity)%this._capacity;for(let r=0;this._size>r;r++)t[r]=this.buffer[(e+r)%this._capacity];return t}resize(t){if(1>t)throw Error("RingBuffer capacity must be at least 1");const e=this.toArray();let r=0,n=[];e.length>t&&(r=e.length-t,n=e.slice(0,r)),this._capacity=t,this.buffer=Array(t),this.head=0,this._size=0;for(let t=r;e.length>t;t++)this.push(e[t]);return n}update(t,e){const r=[],n=(this.head-this._size+this._capacity)%this._capacity;for(let i=0;this._size>i;i++){const s=(n+i)%this._capacity,o=this.buffer[s];if(t(o)){let t;t="object"!=typeof o||null===o?o:Array.isArray(o)?[...o]:{...o},r.push(t),this.buffer[s]=e(o)}}return r}remove(t){const e=[],r=[];if(this.forEach(n=>{t(n)?r.push(n):e.push(n)}),0===r.length)return r;this.buffer=Array(this._capacity),this.head=0,this._size=0;for(const t of e)this.push(t);return r}clear(){this.buffer=Array(this._capacity),this.head=0,this._size=0}get size(){return this._size}get capacity(){return this._capacity}get full(){return this._size===this._capacity}};function p(t,e,r,n){const i=n.current,s=!0===t.lastCustomLayoutFailure?.preservedLastGoodScene,o=!s&&t.hasActivePulsesAt(e),c=!(r||s||!o&&!i)&&t.refreshPulse(e);return n.current=o,{changed:c,pending:o}}import{useCallback as y}from"react";function d({customHoverBehavior:t,customClickBehavior:e,onObservation:r,chartId:n,chartType:i}){const s=!(!t&&!r),o=!(!e&&!r),c=y((e,s)=>{t?.(e,s),h({onObservation:r,datum:e?e.data||e:null,x:e?.x,y:e?.y,chartType:i,chartId:n,context:s})},[n,i,t,r]),u=y((t,s)=>{e?.(t,s),a({onObservation:r,datum:t?t.data||t:null,x:t?.x,y:t?.y,chartType:i,chartId:n,context:s})},[n,i,e,r]);return{customHoverBehavior:s?c:void 0,customClickBehavior:o?u:void 0,hasClickBehavior:o}}import{useCallback as v,useRef as _}from"react";function m({storeRef:t,hoverRef:r,hoveredNodeRef:n,setHoverPoint:i,customHoverBehavior:s,customClickBehavior:c,scheduleRender:a,extractPoints:h,toHover:l}){const p=_(-1),y=_(null),d=_(null),m=v(v=>{if(f(v))return;const _=t.current;if(!_)return;const m=()=>{p.current=-1,y.current=null,r.current=null,n&&(n.current=null),i(null),s?.(null),a()};if(0===_.scene.length)return void(0>p.current||m());let g;if(d.current?.version===_.version)g=d.current.graph;else{const t=h(_.scene);if(0===t.length)return void(0>p.current||m());g=e(t),d.current={version:_.version,graph:g}}let b=p.current;if(g.flat.length>b||(m(),b=-1),("Enter"===v.key||" "===v.key)&&b>=0)return v.preventDefault(),void c?.(l(g.flat[b],_),{type:"activate",inputType:"keyboard"});if(0>b){if("Escape"===v.key)return;if(!["ArrowRight","ArrowLeft","ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(v.key))return;v.preventDefault(),p.current=0;const t=g.flat[0];y.current=t;const e=l(t,_);return r.current=e,i(e),s?.(e,{type:"focus",inputType:"keyboard"}),void a()}const z=o(v.key,u(g,b),g);if(null===z)return;if(v.preventDefault(),0>z)return void m();p.current=z;const k=g.flat[z];y.current=k;const A=l(k,_);r.current=A,i(A),s?.(A,{type:"focus",inputType:"keyboard"}),a()},[c,s,h,r,n,a,i,t,l]);return{kbFocusIndexRef:p,focusedNavPointRef:y,onKeyDown:m}}function g(e){return m({...e,extractPoints:i,toHover:(e,r)=>s({...e,datum:t(e.datum,r.resolvedRibbons)})})}function b({chartType:t,oAccessor:e,rAccessor:r,...i}){return m({...i,extractPoints:n,toHover:n=>({...s(n),__oAccessor:"string"==typeof e?e:void 0,__rAccessor:"string"==typeof r?r:void 0,__chartType:t})})}function z(t){const e=t.datum;return{...e||{},...e?.properties||{},data:e,properties:e?.properties,x:t.x,y:t.y,__semioticHoverData:!0}}function k({storeRef:t,hoverRef:e,hoveredNodeRef:n,setHoverPoint:i,customHoverBehavior:s,customClickBehavior:o,scheduleRender:u}){const a=_(-1),h=_(null),l=v(l=>{if(f(l))return;const p=t.current;if(!p)return;const y=()=>{a.current=-1,h.current=null,e.current=null,n&&(n.current=null),i(null),s?.(null),u()};if(0===p.scene.length)return void(0>a.current||y());const d=r(p.scene);if(0===d.length)return void(0>a.current||y());let v=a.current;if(d.length>v||(y(),v=-1),("Enter"===l.key||" "===l.key)&&v>=0)return l.preventDefault(),void o?.(z(d[v]),{type:"activate",inputType:"keyboard"});const _=c(l.key,0>v?-1:v,d.length);if(null===_)return;if(l.preventDefault(),0>_)return void y();const m=0>v?0:_;a.current=m;const g=d[m];h.current=g;const b=z(g);e.current=b,i(b),s?.(b,{type:"focus",inputType:"keyboard"}),u()},[o,s,e,n,u,i,t]);return{kbFocusIndexRef:a,focusedNavPointRef:h,onKeyDown:l}}function A(t,e,r){const n=t.duration??500,i=r-e;return n>i?1-i/n:0}function w(t,e,r,n,i,s=("undefined"!=typeof performance?performance.now():Date.now())){const o=t.color??"rgba(255,255,255,0.6)",c=t.glowRadius??4;let u=!1;const a=i??(()=>{const t=new Map;for(let e=0;r.length>e;e++)t.set(r[e],e);return t})();for(const r of e){if("line"===r.type)continue;if("area"===r.type){const e=Array.isArray(r.datum)?r.datum:[r.datum];let i=0,c=!1;for(const r of e){const e=a.get(r);if(null==e)continue;c=!0;const o=n.get(e);if(null==o)continue;const u=A(t,o,s);u>i&&(i=u)}c&&(u=R(r,i,o)||u);continue}const e=a.get(r.datum);if(null==e)continue;const i=n.get(e);u=R(r,null==i?0:A(t,i,s),o,c)||u}return u}function R(t,e,r,n){let i=!1;return e>0?(t._pulseIntensity!==e&&(t._pulseIntensity=e,i=!0),t._pulseColor!==r&&(t._pulseColor=r,i=!0),t._pulseGlowRadius!==n&&(t._pulseGlowRadius=n,i=!0),i):(0!==t._pulseIntensity&&(t._pulseIntensity=0,i=!0),void 0!==t._pulseColor&&(t._pulseColor=void 0,i=!0),void 0!==t._pulseGlowRadius&&(t._pulseGlowRadius=void 0,i=!0),i)}function x(t,e,r=("undefined"!=typeof performance?performance.now():Date.now())){if(!e||0===e.size)return!1;const n=t.duration??500,i=e.peek();return null!=i&&n>r-i}function B(t,e,r){e>t.capacity&&(t.resize(e),r&&e>r.capacity&&r.resize(e))}function H(t,e){const r=new l(t.capacity);return t.forEach(()=>r.push(e)),r}function C(t,e,r,n){const i=t.push(e);return r&&r.push(n),i}function D(t,e,r){if(!e||0===e.size)return;const n=new Set;if(t.forEach((t,e)=>{r(t)&&n.add(e)}),0===n.size)return;const i=e.toArray();e.clear();for(let t=0;i.length>t;t++)n.has(t)||e.push(i[t])}export{l as RingBuffer,A as computePulseIntensity,w as applyPulse,R as setPulseState,x as hasActivePulses,B as ensureRingBufferCapacity,H as createTimestampBufferForData,C as pushWithTimestamp,D as compactTimestampBufferForRemoval,p as refreshIdlePulse,d as useSemanticFrameInteractions,g as useXYKeyboardNavigation,b as useOrdinalKeyboardNavigation,k as useGeoKeyboardNavigation};
@@ -1 +0,0 @@
1
- function e(e,r){const n=e.length,t=r.length,o=Array(t+1);for(let e=0;t>=e;e++)o[e]=e;for(let a=1;n>=a;a++){let n=o[0];o[0]=a;for(let i=1;t>=i;i++){const t=o[i];o[i]=e[a-1]===r[i-1]?n:1+Math.min(n,o[i],o[i-1]),n=t}}return o[t]}function r(r,n,t=3){let o,a=t+1;for(const t of n){const n=e(r.toLowerCase(),t.toLowerCase());a>n&&(a=n,o=t)}return a>t?void 0:o}function n(e){return e.length>3?[e[0],e[Math.floor(e.length/2)],e[e.length-1]]:[...e]}function t(e,n){if(0===n.length)return null;const t=e.toLowerCase();return n.find(e=>e.toLowerCase().includes(t)||t.includes(e.toLowerCase()))||(r(e,n,3)??null)}function o(e){return` Or use a function: ${e}={d => d.myValue}.`}function a({componentName:e,data:r,accessors:a,requiredProps:i}){if(i)for(const[r,n]of Object.entries(i))if(null==n)return`${e}: ${r} is required. Provide a field name or function.`;if(null==r)return null;if(!Array.isArray(r)&&"object"==typeof r)return e+": data should be an array, but received an object. If this is hierarchical data, use TreeDiagram, Treemap, or CirclePack instead.";if(!Array.isArray(r)||0===r.length)return e+": No data provided. Pass a non-empty array to the data prop.";if(a){const i=n(r).find(e=>e&&"object"==typeof e);if(i){const r=Object.keys(i);for(const[n,s]of Object.entries(a))if(s&&"string"==typeof s&&!(s in i)){const a=t(s,r),i=a?` Try ${n}="${a}".`:"";return`${e}: ${n} "${s}" not found in data. Available fields: ${r.join(", ")}.${i}`+o(n)}}}return null}function i({componentName:e,data:r,dataLabel:n="data"}){return null==r?`${e}: No ${n} provided. Pass a hierarchical object with children: { name: "root", children: [...] }.`:Array.isArray(r)?`${e}: ${n} should be a single root object, not an array. Expected: { name: "root", children: [...] }. If you have flat data, use LineChart, BarChart, or Scatterplot instead.`:null}function s({componentName:e,nodes:r,edges:a,nodesRequired:i=!1,edgesRequired:s=!0,accessors:l}){if(null==r&&null==a)return null;if(s&&(!a||!Array.isArray(a)||0===a.length))return e+': No edges provided. Pass a non-empty array: edges={[{ source: "A", target: "B", value: 10 }, ...]}.';if(i&&(!r||!Array.isArray(r)||0===r.length))return e+': No nodes provided. Pass a non-empty array: nodes={[{ id: "A" }, { id: "B" }, ...]}.';if(l&&r&&r.length>0){const a=n(r).find(e=>e&&"object"==typeof e);if(a){const r=Object.keys(a);for(const[n,i]of Object.entries(l))if(i&&"string"==typeof i&&!(i in a)){const a=t(i,r),s=a?` Try ${n}="${a}".`:"";return`${e}: ${n} "${i}" not found in node data. Available fields: ${r.join(", ")}.${s}`+o(n)}}}return null}export{r as closestMatch,a as validateArrayData,i as validateObjectData,s as validateNetworkData};
@@ -1 +0,0 @@
1
- var n=class extends Error{constructor(n,t){super(`${n.engine} is an optional Semiotic physics engine. Install ${n.packageName} to use ${n.importPath}: ${n.installCommand}`),this.name="PhysicsOptionalEngineDependencyError",this.details=n,t&&(this.cause=t)}};function t(t,e){return new n(t,e)}async function e(n){try{return await import(n.packageName)}catch(e){throw t(n,e)}}export{n as PhysicsOptionalEngineDependencyError,t as optionalEngineDependencyError,e as loadOptionalPhysicsPeer};
@@ -1 +0,0 @@
1
- import{useCustomChartScaffold as t}from"./c-U6ESPM7V.min.js";import{useChartSetup as e}from"./c-F5ZB5GJ6.min.js";import{resolveNodeColor as n}from"./c-5D2S4RMI.min.js";import{lineCanvasRenderer as i}from"./c-CZF7MV67.min.js";import{RingBuffer as o,compactTimestampBufferForRemoval as r,computePulseIntensity as s,hasActivePulses as a,pushWithTimestamp as c,refreshIdlePulse as l,setPulseState as u,useGeoKeyboardNavigation as h,useSemanticFrameInteractions as d}from"./c-RJKEKZOO.min.js";import{pointCanvasRenderer as p}from"./c-T6UAIKBH.min.js";import{needsDataCanvasPaint as f,needsInteractionCanvasPaint as m}from"./c-OCI56QF2.min.js";import{glyphCanvasRenderer as g}from"./c-54IRWOGM.min.js";import{StalenessBadge as y,attachUpdateResultStore as v,buildBaseMetadataProps as b,buildCustomBehaviorProps as w,composeOverlays as R,computeDecayOpacity as P,filterAnnotationsByStatus as x,findHitPointInQuadtree as S,formatVal as C,getHitRadius as L,paintCanvasBackground as A,paintSceneWithBackend as k,renderSceneWithBackend as D,resolveFrameGraphics as j,resolveFrameLayers as M,runCustomLayoutAttempt as T,shouldHandleFramePointer as B,useConfigSync as _,useLayoutSelectionSync as I,useLegendCategoryEmission as E,useStableShallow as N,useStalenessCheck as F,warnCustomLayoutDiagnostics as O}from"./c-AG7WWVIH.min.js";import{wrapWithCustomLayoutSelection as W}from"./c-G36WS6LN.min.js";import{renderPathPulse as z}from"./c-UC5PTTFI.min.js";import{geoSceneNodeToSVG as H}from"./c-DBQ2V7CH.min.js";import{buildResolveColor as G,resolveCustomLayoutPalette as q}from"./c-VPZDY5Q4.min.js";import{AccessibleDataTable as Z,AccessibleTablePortal as X,AriaLiveTooltip as Y,CanvasFrameBackground as Q,FlippingTooltip as U,FocusRing as V,SVGChartTitle as $,SafeRender as K,SceneRevisionDiagnosticsObserver as J,ScreenReaderSummary as tt,SkipToTableLink as et,UpdateResultTracker as nt,annotationLayout as it,computeCanvasAriaLabel as ot,computeEasing as rt,computeRawProgress as st,createDefaultAnnotationRules as at,defaultTooltipStyle as ct,filterSparseArray as lt,getDevicePixelRatio as ut,getPointerHitRadius as ht,isAnnotationActivationTarget as dt,isServerEnvironment as pt,lerp as ft,normalizeTooltip as mt,now as gt,observationInputType as yt,prepareCanvas as vt,rehitCanvasMarkCursor as bt,renderAnnotationPass as wt,renderLegendFromConfig as Rt,sceneHasAuthoredCursor as Pt,sceneMarkCursor as xt,setCanvasMarkCursor as St,smartTooltipEntries as Ct,useAnnotationActivationOptions as Lt,useCanvasMarkCursorCleanup as At,useFrame as kt,useFrameCanvasHost as Dt,useHydration as jt,useSceneRevisionDiagnostics as Mt,useWasHydratingFromSSR as Tt}from"./c-VN2HG5BS.min.js";import{resolveThemeSemanticColors as Bt}from"./c-VRXUB2F2.min.js";import{getMax as _t}from"./c-GGISSW5E.min.js";import{STREAMING_PALETTE as It}from"./c-EGR6VYBW.min.js";import{coerceCanvasFill as Et,glyphHitGeometry as Nt,resolveCSSColor as Ft}from"./c-QKHMBE2E.min.js";import{forwardRef as Ot,memo as Wt,useCallback as zt,useEffect as Ht,useImperativeHandle as Gt,useMemo as qt,useRef as Zt,useState as Xt}from"react";import{geoPath as Yt}from"d3-geo";import{quadtree as Qt}from"d3-quadtree";import{geoMercator as Ut,geoEqualEarth as Vt,geoAlbersUsa as $t,geoOrthographic as Kt,geoNaturalEarth1 as Jt,geoEquirectangular as te}from"d3-geo";var ee={mercator:Ut,equalEarth:Vt,albersUsa:$t,orthographic:Kt,naturalEarth:Jt,equirectangular:te};function ne(t,e){return t?"function"==typeof t?t:e=>e[t]:t=>t[e]}function ie(t){return t?"function"==typeof t?t:e=>e[t]:t=>t.coordinates||t.data||[]}function oe(t,e,n){return t?"function"==typeof t?{...n,...t(e)}:{...n,...t}:{...n}}function re(t,e){if(2>t.length)return[t];const n=.4*e,i=[];let o=[t[0]];for(let e=1;t.length>e;e++){const r=t[e];Math.abs(r[0]-t[e-1][0])>n?(2>o.length||i.push(o),o=[r]):o.push(r)}return 2>o.length||i.push(o),i}function se(t,e,n=24){const i=e[0]-t[0],o=e[1]-t[1],r=Math.sqrt(i*i+o*o);if(0===r)return[t,e];const s=-o/r,a=i/r,c=Math.min(.3*r,80),l=(t[0]+e[0])/2+s*c,u=(t[1]+e[1])/2+a*c,h=[];for(let i=0;n>=i;i++){const o=i/n,r=1-o;h.push([r*r*t[0]+2*r*o*l+o*o*e[0],r*r*t[1]+2*r*o*u+o*o*e[1]])}return h}function ae(t,e){if(2>t.length)return t;const n=e/2+1,i=[];for(let e=0;t.length>e;e++){const o=t[e];let r,s;0===e?(r=t[1][0]-o[0],s=t[1][1]-o[1]):e===t.length-1?(r=o[0]-t[e-1][0],s=o[1]-t[e-1][1]):(r=t[e+1][0]-t[e-1][0],s=t[e+1][1]-t[e-1][1]);const a=Math.sqrt(r*r+s*s)||1;i.push([o[0]+s/a*n,o[1]+-r/a*n])}return i}function ce(t,e,n,i,o){const r=e[0]-t[0],s=e[1]-t[1],a=Math.sqrt(r*r+s*s);if(0===a)return[t,e];const c=s/a,l=-r/a,u=o/2+1;return[[t[0]+c*u,t[1]+l*u],[e[0]+c*u,e[1]+l*u]]}import{scaleLinear as le}from"d3-scale";var ue=["data","domain","layout","scene-geometry","data-paint","overlay","accessibility","evidence"],he=["scene-style","data-paint","accessibility","evidence"],de=(t,e)=>({retainedData:t,invalidations:e}),pe=["domain","layout","scene-geometry","data-paint","overlay","accessibility","evidence"],fe=["domain","layout","scene-geometry","data-paint","overlay","accessibility","evidence"],me=["scene-geometry","data-paint","accessibility","evidence"],ge=["scene-style","data-paint","accessibility","evidence"],ye=["overlay","accessibility","evidence"],ve=[],be={xAccessor:de("rebuild",pe),yAccessor:de("rebuild",pe),lineDataAccessor:de("rebuild",pe),pointIdAccessor:de("rebuild",me),lineIdAccessor:de("rebuild",me),windowSize:de("rebuild",pe),projection:de("preserve",fe),projectionExtent:de("preserve",fe),fitPadding:de("preserve",fe),lineType:de("preserve",fe),flowStyle:de("preserve",fe),graticule:de("preserve",fe),projectionTransform:de("preserve",fe),customLayout:de("preserve",fe),layoutConfig:de("preserve",fe),layoutMargin:de("preserve",fe),areaStyle:de("preserve",ge),pointStyle:de("preserve",["scene-geometry","scene-style","data-paint","accessibility","evidence"]),lineStyle:de("preserve",ge),colorScheme:de("preserve",ge),themeCategorical:de("preserve",ge),themeDiverging:de("preserve",ge),themeSemantic:de("preserve",ge),themeSequential:de("preserve",ge),decay:de("preserve",ge),pulse:de("preserve",ge),layoutSelection:de("preserve",ge),annotations:de("preserve",ye),autoPlaceAnnotations:de("preserve",ye),clock:de("preserve",ve),transition:de("preserve",ve),introAnimation:de("preserve",ve),onLayoutError:de("preserve",ve)},we=de("preserve",fe),Re=class{constructor(){this.tracker=new nt}get last(){return this.tracker.last}subscribe(t){return this.tracker.subscribe(t)}recordData(t,e){return this.tracker.record({kind:t,...void 0===e?{}:{count:e}},ue)}recordNoop(t){return this.tracker.record({kind:t,..."restyle"===t?{}:{count:0}},[])}recordRestyle(t){return t?this.tracker.record({kind:"restyle"},he):this.recordNoop("restyle")}recordConfig(t,e={}){const n=function(t){let e="preserve";const n=new Set;for(const i of t){const t=be[i]??we;"rebuild"===t.retainedData&&(e="rebuild");for(const e of t.invalidations)n.add(e)}return{retainedData:e,invalidations:n}}(t),i=new Set(n.invalidations);return e.retainedDataChanged&&i.add("data"),this.tracker.record({kind:"config",keys:t},i)}};import{geoDistance as Pe,geoGraticule as xe,geoInterpolate as Se}from"d3-geo";function Ce(t){if(null==t)return 0;if("number"==typeof t&&Number.isFinite(t)&&t>=0&&.5>t)return t;throw new RangeError(`[semiotic] fitPadding must be a finite fraction in [0, 0.5); received ${t+""}.`)}var Le=class t{constructor(t){this.updateResults=new Re,this.scene=[],this.scales=null,this.version=0,this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this.lastCustomLayoutFailure=null,this._customLayoutDiagnosticsWarned=new Set,this._customRestyle=void 0,this.hasCustomRestyle=!1,this._baseStyles=new WeakMap,this._customLayoutFailedThisBuild=!1,this._quadtree=null,this._maxPointRadius=0,this.projection=null,this.geoPath=null,this.baseScale=0,this.baseTranslate=[0,0],this.baseRotation=[0,0,0],this.currentZoom=1,this.cartogramLayout=null,this.areas=[],this.pointData=[],this.lineData=[],this.pointBuffer=null,this.streaming=!1,this.lastIngestTime=0,this.timestampBuffer=null,this.activeTransition=null,this.prevPositions=null,this._hasRenderedOnce=!1,this.config=function(t){return{...t,fitPadding:Ce(t.fitPadding)}}(t)}currentTime(){return this.config.clock?.()??gt()}getConfiguredWindowSize(){const t=this.config.windowSize??500;if(!Number.isInteger(t)||1>t)throw Error("GeoPipelineStore windowSize must be a positive integer");return t}retainNewestLines(t=this.getConfiguredWindowSize()){this.lineData.length>t&&(this.lineData=this.lineData.slice(-t))}resizeStreamingWindow(t){if(this.pointBuffer){const e=this.pointBuffer.toArray(),n=this.timestampBuffer?.toArray()??[],i=e.slice(-t),r=n.slice(-i.length),s=this.currentTime();this.pointBuffer=new o(t),this.timestampBuffer=new o(t),i.forEach((t,e)=>{this.pointBuffer.push(t),this.timestampBuffer.push(r[e]??s)})}this.retainNewestLines(t)}updateConfig(t){const e=function(t){return"fitPadding"in t?{...t,fitPadding:Ce(t.fitPadding)}:t}(t),n=this.config,i=this.getConfiguredWindowSize(),o=Object.keys(e).filter(t=>e[t]!==n[t]);this.config={...this.config,...e};const r=this.getConfiguredWindowSize(),s=this.streaming&&r!==i;s&&(this.resizeStreamingWindow(r),this.version++),"customLayout"in e&&!e.customLayout&&(this.lastCustomLayoutFailure=null),this.updateResults.recordConfig(o,{retainedDataChanged:s})}updateConfigWithResult(t){return this.updateConfig(t),this.updateResults.last}setAreas(t){this.areas=t,this.updateResults.recordData("replace",t.length)}setAreasWithResult(t){return this.setAreas(t),this.updateResults.last}setPoints(t){this.pointData=t.slice(),this.pointBuffer=null,this.timestampBuffer=null,this.streaming=!1,this.updateResults.recordData("replace",t.length)}setPointsWithResult(t){return this.setPoints(t),this.updateResults.last}setLines(t){this.lineData=t.slice(),this.streaming&&this.retainNewestLines(),this.updateResults.recordData("replace",t.length)}setLinesWithResult(t){return this.setLines(t),this.updateResults.last}initStreaming(t){void 0!==t&&t!==this.config.windowSize&&(this.config={...this.config,windowSize:t});const e=this.getConfiguredWindowSize(),n=this.pointBuffer?this.pointBuffer.toArray():this.pointData,i=this.timestampBuffer?.toArray()??[],r=n.slice(-e),s=i.slice(-r.length),a=this.currentTime();this.pointBuffer=new o(e),this.timestampBuffer=new o(e),r.forEach((t,e)=>{this.pointBuffer.push(t),this.timestampBuffer.push(s[e]??a)}),this.pointData=[],this.retainNewestLines(e),this.streaming=!0}pushPoint(t){this.pointBuffer||this.initStreaming();const e=this.currentTime();c(this.pointBuffer,t,this.timestampBuffer,e),this.lastIngestTime=e,this.updateResults.recordData("ingest",1)}pushPointWithResult(t){return this.pushPoint(t),this.updateResults.last}pushMany(t){this.pointBuffer||this.initStreaming();const e=this.currentTime();for(const n of t)c(this.pointBuffer,n,this.timestampBuffer,e);this.lastIngestTime=e,this.updateResults.recordData("ingest",t.length)}pushManyWithResult(t){return this.pushMany(t),this.updateResults.last}pushLine(t){null!=t&&"object"==typeof t?(this.streaming||this.initStreaming(),this.lineData.push(t),this.retainNewestLines(),this.version++,this.updateResults.recordData("ingest",1)):this.updateResults.recordNoop("ingest")}pushManyLines(t){if(!Array.isArray(t)||0===t.length)return void this.updateResults.recordNoop("ingest");const e=t.filter(t=>null!=t&&"object"==typeof t);if(0!==e.length){this.streaming||this.initStreaming();for(const t of e)this.lineData.push(t);this.retainNewestLines(),this.version++,this.updateResults.recordData("ingest",e.length)}else this.updateResults.recordNoop("ingest")}removeLine(t){const{lineIdAccessor:e}=this.config;if(!e)throw Error("removeLine() requires lineIdAccessor to be configured");const n="function"==typeof e?e:t=>t[e],i=new Set(Array.isArray(t)?t:[t]),o=[];return this.lineData=this.lineData.filter(t=>!i.has(n(t)+"")||(o.push(t),!1)),o.length>0?(this.version++,this.updateResults.recordData("remove",o.length)):this.updateResults.recordNoop("remove"),o}getLines(){return this.lineData.slice()}removePoint(t){const{pointIdAccessor:e}=this.config;if(!e)throw Error("removePoint() requires pointIdAccessor to be configured");const n="function"==typeof e?e:t=>t[e],i=new Set(Array.isArray(t)?t:[t]);if(this.streaming&&this.pointBuffer){const t=t=>i.has(n(t)+"");r(this.pointBuffer,this.timestampBuffer,t);const e=this.pointBuffer.remove(t);return e.length>0?(this.version++,this.updateResults.recordData("remove",e.length)):this.updateResults.recordNoop("remove"),e}{const t=[];return this.pointData=this.pointData.filter(e=>!i.has(n(e)+"")||(t.push(e),!1)),t.length>0?(this.version++,this.updateResults.recordData("remove",t.length)):this.updateResults.recordNoop("remove"),t}}clear(){this.areas=[],this.pointData=[],this.lineData=[],this.pointBuffer=null,this.timestampBuffer=null,this.streaming=!1,this.scene=[],this.scales=null,this._hasRenderedOnce=!1,this.activeTransition=null,this.prevPositions=null,this._quadtree=null,this._maxPointRadius=0,this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this.lastCustomLayoutFailure=null,this._customRestyle=void 0,this.hasCustomRestyle=!1,this._baseStyles=new WeakMap,this._customLayoutFailedThisBuild=!1,this.version++,this.updateResults.recordData("clear")}restyleScene(t){const e=this._customRestyle;if(e){for(const n of this.scene){const i=this._baseStyles.get(n)??n.style,o=e(n,t);n.style=o?{...i,...o}:i}this.markStylePaintPending(),this.updateResults.recordRestyle(!0)}else this.updateResults.recordRestyle(!1)}computeScene(t){const{config:e}=this,n=this.projection,i=this.geoPath,o=this.scales,r=this.baseScale,s=[...this.baseTranslate],a=[...this.baseRotation],c=this.scene;this.projection=function(t){if(!t)return Vt();if("string"==typeof t){const e=ee[t];return e?e():("production"!==process.env.NODE_ENV&&console.warn(`GeoFrame: Unknown projection "${t}", falling back to equalEarth`),Vt())}if("object"==typeof t&&"type"in t){const e=ee[t.type],n=e?e():Vt();return t.rotate&&"rotate"in n&&n.rotate(t.rotate),t.center&&"center"in n&&n.center(t.center),n}return t}(e.projection),this.geoPath=Yt(this.projection),this.fitProjection(t),this.geoPath=Yt(this.projection);const l=this.projection;this.scales={projection:l,geoPath:this.geoPath,projectedPoint:(t,e)=>l([t,e]),invertedPoint:(t,e)=>l.invert?l.invert([t,e]):null},this._customLayoutFailedThisBuild=!1;const u=this.buildSceneNodes(t);if(this._customLayoutFailedThisBuild)!0===this.lastCustomLayoutFailure?.preservedLastGoodScene?(this.projection=n,this.geoPath=i,this.scales=o,this.baseScale=r,this.baseTranslate=s,this.baseRotation=a):(this.scene=[],this.rebuildQuadtree());else{if(this.scene=u,this.rebuildQuadtree(),e.projectionTransform&&this.applyCartogramTransform(e.projectionTransform,t),e.decay&&this.streaming&&this.applyDecay(),e.pulse&&this.streaming&&this.applyPulse(),e.transition&&!this._hasRenderedOnce&&this.scene.length>0&&e.introAnimation){const e=t.width/2,n=t.height/2,i=this.scene.filter(t=>"point"===t.type).map(t=>({...t,x:e,y:n}));i.length>0&&this.startTransition(i)}this._hasRenderedOnce=!0,e.transition&&c.length>0&&this.startTransition(c),this.version++}}fitProjection(t){const e=this.projection,n=this.config,i=[...this.areas],o=ne(n.xAccessor,"lon"),r=ne(n.yAccessor,"lat"),s=this.getPoints();if(s.length>0){const t=s.map(t=>[o(t),r(t)]);i.push({type:"Feature",properties:{},geometry:{type:"MultiPoint",coordinates:t}})}const a=ie(n.lineDataAccessor);for(const t of this.lineData){const e=a(t);if(e&&e.length>0){const t=e.map(t=>[o(t),r(t)]);i.push({type:"Feature",properties:{},geometry:{type:"LineString",coordinates:t}})}}if(0!==i.length){if(n.projectionExtent){const[[i,o],[r,s]]=n.projectionExtent;e.fitExtent([[0,0],[t.width,t.height]],{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[[i,o],[i,s],[r,s],[r,o],[i,o]]]}})}else if(e.clipAngle&&(e.clipAngle()??0)>0){const i=n.fitPadding??0,o=Math.min(t.width,t.height);e.scale(o/2-o*i),e.translate([t.width/2,t.height/2])}else{const o=n.fitPadding??0,r=t.width*o,s=t.height*o;e.fitExtent([[r,s],[t.width-r,t.height-s]],{type:"FeatureCollection",features:i})}this.baseScale=e.scale(),this.baseTranslate=e.translate(),this.baseRotation=e.rotate?.()??[0,0,0]}}applyZoomTransform(t,e){const n=this.projection;if(!n)return;const i=this.geoPath,o=this.scales,r=n.scale(),s=[...n.translate()],a=this.currentZoom;n.scale(this.baseScale*t.k),n.translate([this.baseTranslate[0]*t.k+t.x,this.baseTranslate[1]*t.k+t.y]),this.currentZoom=t.k,this.geoPath=Yt(n),this.scales={projection:n,geoPath:this.geoPath,projectedPoint:(t,e)=>n([t,e]),invertedPoint:(t,e)=>n.invert?n.invert([t,e]):null},this._customLayoutFailedThisBuild=!1;const c=this.buildSceneNodes(e);this._customLayoutFailedThisBuild?this.lastCustomLayoutFailure?.preservedLastGoodScene?(n.scale(r),n.translate(s),this.currentZoom=a,this.geoPath=i,this.scales=o):(this.scene=[],this.rebuildQuadtree()):(this.scene=c,this.rebuildQuadtree(),this.config.projectionTransform&&this.applyCartogramTransform(this.config.projectionTransform,e),this.version++)}applyZoomScale(t,e){const n=this.projection;if(!n)return;const i=this.geoPath,o=this.scales,r=n.scale(),s=[...n.translate()],a=this.currentZoom;n.scale(this.baseScale*t),n.translate(this.baseTranslate),this.currentZoom=t,this.geoPath=Yt(n),this.scales={projection:n,geoPath:this.geoPath,projectedPoint:(t,e)=>n([t,e]),invertedPoint:(t,e)=>n.invert?n.invert([t,e]):null},this._customLayoutFailedThisBuild=!1;const c=this.buildSceneNodes(e);this._customLayoutFailedThisBuild?this.lastCustomLayoutFailure?.preservedLastGoodScene?(n.scale(r),n.translate(s),this.currentZoom=a,this.geoPath=i,this.scales=o):(this.scene=[],this.rebuildQuadtree()):(this.scene=c,this.rebuildQuadtree(),this.config.projectionTransform&&this.applyCartogramTransform(this.config.projectionTransform,e),this.version++)}applyRotation(t,e){const n=this.projection;if(!n||!n.rotate)return;const i=this.geoPath,o=this.scales,r=[...n.rotate()];n.rotate(t),this.geoPath=Yt(n),this.scales={projection:n,geoPath:this.geoPath,projectedPoint:(t,e)=>n([t,e]),invertedPoint:(t,e)=>n.invert?n.invert([t,e]):null},this._customLayoutFailedThisBuild=!1;const s=this.buildSceneNodes(e);this._customLayoutFailedThisBuild?this.lastCustomLayoutFailure?.preservedLastGoodScene?(n.rotate(r),this.geoPath=i,this.scales=o):(this.scene=[],this.rebuildQuadtree()):(this.scene=s,this.rebuildQuadtree(),this.config.projectionTransform&&this.applyCartogramTransform(this.config.projectionTransform,e),this.version++)}setRotation(t){const e=this.projection;e&&e.rotate&&e.rotate(t)}hasProjection(){return null!=this.projection}getRotation(){return this.projection?.rotate?.()??this.baseRotation}getBaseProjectionState(){return{scale:this.baseScale,translate:[...this.baseTranslate]}}getPoints(){return this.streaming&&this.pointBuffer?this.pointBuffer.toArray():this.pointData}rebuildQuadtree(){let e=0,n=0;for(const t of this.scene)"point"===t.type&&!1!==t.interactive&&(n++,t.r>e&&(e=t.r));if(this._maxPointRadius=e,t.QUADTREE_THRESHOLD>=n)return void(this._quadtree=null);const i=Array(n);let o=0;for(const t of this.scene)"point"===t.type&&!1!==t.interactive&&(i[o++]=t);this._quadtree=Qt().x(t=>t.x).y(t=>t.y).addAll(i)}get quadtree(){return this._quadtree}get maxPointRadius(){return this._maxPointRadius}buildSceneNodes(t){this._customLayoutFailedThisBuild=!1;const{config:e}=this,n=this.projection,i=this.geoPath;if(e.customLayout&&this.scales){const n=e.layoutMargin??{top:0,right:0,bottom:0,left:0},i=q(e.colorScheme,e.themeCategorical,It),o={areas:this.areas.slice(),points:this.getPoints().slice(),lines:this.lineData.slice(),scales:this.scales,dimensions:{width:t.width,height:t.height,margin:n,plot:{x:0,y:0,width:t.width,height:t.height}},theme:{semantic:e.themeSemantic??{},categorical:[...i]},resolveColor:G(i,e.colorScheme),config:e.layoutConfig??{},selection:e.layoutSelection??null},r=T({family:"geo",logLabel:"geo customLayout",revision:this.version,hasPreviousResult:null!==this.lastCustomLayoutResult,onLayoutError:e.onLayoutError,run:()=>e.customLayout(o)});if("failure"===r.kind)return this.lastCustomLayoutFailure=r.diagnostic,this._customLayoutFailedThisBuild=!0,r.preservedLastGoodScene?this.scene:(this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this._customRestyle=void 0,this.hasCustomRestyle=!1,this._baseStyles=new WeakMap,[]);const s=r.result,a=s.nodes??[];if(this.customLayoutOverlays=s.overlays??null,this.lastCustomLayoutResult=s,this.lastCustomLayoutFailure=null,this._customRestyle=s.restyle,this.hasCustomRestyle=!!s.restyle,this._baseStyles=new WeakMap,this.hasCustomRestyle){for(const t of a)this._baseStyles.set(t,t.style);this.restyleScene(e.layoutSelection??null)}return O({label:"geo customLayout",nodes:a,overlays:this.customLayoutOverlays,warned:this._customLayoutDiagnosticsWarned}),a}return this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this.lastCustomLayoutFailure=null,this._customRestyle=void 0,this.hasCustomRestyle=!1,this._baseStyles=new WeakMap,function({config:t,projection:e,path:n,areas:i,points:o,lines:r,layout:s}){const a=ne(t.xAccessor,"lon"),c=ne(t.yAccessor,"lat"),l=[],u=function(t){return{fill:t.themeSemantic?.surface||"#e0e0e0",stroke:t.themeSemantic?.border||"#999",strokeWidth:.5,fillOpacity:1}}(t),h=function(t){return{stroke:t.themeSemantic?.primary||"#4e79a7",strokeWidth:1.5,fill:"none"}}(t),d=function(t){return{fill:t.themeSemantic?.primary||"#4e79a7",r:4,fillOpacity:.8}}(t);if(t.graticule){const e=!0===t.graticule?{}:t.graticule,i=xe();e.step&&i.step(e.step);const o=n(i())||"";o&&l.push({type:"geoarea",pathData:o,centroid:[s.width/2,s.height/2],bounds:[[0,0],[s.width,s.height]],screenArea:0,style:{fill:"none",stroke:e.stroke||"#e0e0e0",strokeWidth:e.strokeWidth??.5,strokeDasharray:e.strokeDasharray||"2,2"},datum:null,interactive:!1})}for(const e of i){const i=n(e);if(!i)continue;const o=n.centroid(e),r=n.bounds(e),s=n.area(e);l.push({type:"geoarea",pathData:i,centroid:o,bounds:r,screenArea:s,style:oe(t.areaStyle,e,u),datum:e,interactive:!0})}const p=ie(t.lineDataAccessor);for(const n of r){const i=p(n);if(!i||2>i.length)continue;let o=[];if("geo"===t.lineType){const t=Array(i.length);for(let e=0;i.length>e;e++)t[e]=[a(i[e]),c(i[e])];for(let n=0;t.length-1>n;n++){const i=t[n],r=t[n+1],s=Pe(i,r)||0,a=Math.max(2,Math.ceil(s/(Math.PI/180))),c=Se(i,r);for(let t=0;a>=t;t++){if(n>0&&0===t)continue;const i=e(c(t/a));null!=i&&o.push(i)}}}else for(let t=0;i.length>t;t++){const n=i[t],r=e([a(n),c(n)]);null!=r&&o.push(r)}if(2>o.length)continue;const r=oe(t.lineStyle,n,h),u="number"==typeof r.strokeWidth?r.strokeWidth:1;2!==i.length||2>o.length||"arc"!==t.flowStyle?2!==i.length||2>o.length||"offset"!==t.flowStyle||(o="geo"===t.lineType?ae(o,u):ce(o[0],o[o.length-1],0,0,u)):o=se(o[0],o[o.length-1]);const d=re(o,s.width);if(d.length>1)for(const t of d)2>t.length||l.push({type:"line",path:t,style:{...r,_edgeFade:!0},datum:n});else l.push({type:"line",path:2>o.length&&d[0]||o,style:r,datum:n})}const f=t.pointIdAccessor?"function"==typeof t.pointIdAccessor?t.pointIdAccessor:e=>e[t.pointIdAccessor]:null,m=e.clipAngle?e.clipAngle()??0:0,g=m>0?m*Math.PI/180:null,y=e.rotate?e.rotate():[0,0,0],v="function"==typeof e.center?e.center():[0,0],b=[(v[0]??0)-y[0],(v[1]??0)-y[1]];for(const n of o){const i=a(n),o=c(n);if(null!=g&&Pe([i,o],b)>g)continue;const r=e([i,o]);if(!r)continue;const s=t.pointStyle?t.pointStyle(n):{...d},u={type:"point",x:r[0],y:r[1],r:s.r||4,style:s,datum:n,pointId:f?f(n)+"":void 0};l.push(u)}return l}({config:e,projection:n,path:i,areas:this.areas,points:this.getPoints(),lines:this.lineData,layout:t})}applyCartogramTransform(t,e){const n=function(t,e,n,i){const o=t.filter(t=>"point"===t.type);if(2>o.length)return null;const r=e.strength??1,s=Number.isFinite(r)?Math.max(0,Math.min(1,r)):1,a="strip"===e.layout?"strip":"radial";if("radial"===a&&0===s)return null;const c=e.centerAccessor?"function"==typeof e.centerAccessor?e.centerAccessor:t=>t[e.centerAccessor]:t=>t.id,l="function"==typeof e.costAccessor?e.costAccessor:t=>t[e.costAccessor],u=o.find(t=>t.datum&&c(t.datum)+""==e.center+"");if(!u)return"production"!==process.env.NODE_ENV&&console.warn(`GeoFrame: Distance cartogram center "${e.center}" not found in point data`),null;const h=o.map(t=>t.datum?Number(l(t.datum)):NaN).filter(t=>isFinite(t)&&t>=0),d=_t(h,1);i>0&&"production"!==process.env.NODE_ENV&&console.warn("GeoFrame: Distance cartogram does not support area rendering. Areas will be ignored. Remove areas or set projectionTransform to null to render them.");for(let e=t.length-1;e>=0;e--){const n=t[e];"geoarea"===n.type&&n.interactive&&t.splice(e,1)}const p="strip"===a?function(t,e,n,i,o){const r=Math.max(3,Math.min(8,.35*o.height)),s=Math.max(1,o.width-2*r),a=o.height/2,c=le().domain([0,i]).range([0,s]);e.x=r,e.y=a;const l=[];for(const o of t){if(o===e)continue;if(!o.datum){o.x=r,o.y=a;continue}const t=Number(n(o.datum)),s=r+(isFinite(t)&&t>=0&&i>0?c(t):0);o.x=s,o.y=a,l.push({node:o,x:s})}l.sort((t,e)=>t.x-e.x);const u=Math.max(0,Math.min(o.height/2-1,6));let h=0;for(;l.length>h;){let t=h+1;for(;l.length>t&&3>Math.abs(l[t].x-l[h].x);)t++;const e=t-h;if(e>1&&u>0)for(let t=0;e>t;t++)l[h+t].node.y=a+(t-(e-1)/2)*Math.min(2.5,2*u/Math.max(1,e-1));h=t}return{cx:r,cy:a,maxCost:i,availableRadius:s,layout:"strip"}}(o,u,l,d,n):function(t,e,n,i,o,r){const s=e.x,a=e.y,c=r.width/2,l=r.height/2,u=Math.min(r.width,r.height)/2,h=le().domain([0,i]).range([0,u]);for(const r of t){if(r===e)continue;if(!r.datum)continue;const t=r.x,u=r.y,d=Math.atan2(u-a,t-s),p=Math.hypot(t-s,u-a),f=Number(n(r.datum)),m=isFinite(f)&&f>=0?i>0?h(f):0:p,g=c+Math.cos(d)*m,y=l+Math.sin(d)*m;r.x=t+(g-t)*o,r.y=u+(y-u)*o}return e.x=s+(c-s)*o,e.y=a+(l-a)*o,{cx:e.x,cy:e.y,maxCost:i,availableRadius:u,layout:"radial"}}(o,u,l,d,s,n),f=t.filter(t=>"line"===t.type);if(f.length>0){const t=new Map;for(const e of o)null!=e.pointId&&t.set(e.pointId+"",[e.x,e.y]);for(const n of f){const i=n.datum?.source,o=n.datum?.target;if(null!=i&&null!=o){const r=t.get(i+""),s=t.get(o+"");if(r&&s)if("fractional"===e.lineMode&&n.path.length>2){const t=n.path[0],e=n.path[n.path.length-1],i=[r[0]-t[0],r[1]-t[1]],o=[s[0]-e[0],s[1]-e[1]],a=[0];for(let t=1;n.path.length>t;t++)a.push(a[t-1]+Math.hypot(n.path[t][0]-n.path[t-1][0],n.path[t][1]-n.path[t-1][1]));const c=a[a.length-1];n.path=n.path.map((t,e)=>{const r=c>0?a[e]/c:e/(n.path.length-1);return[t[0]+i[0]*(1-r)+o[0]*r,t[1]+i[1]*(1-r)+o[1]*r]})}else n.path=[r,s]}}}return p}(this.scene,t,e,this.areas.length);n&&(this.cartogramLayout=n)}applyDecay(){const t=this.config.decay;if(!t||!this.pointBuffer)return;const e=this.pointBuffer.size;if(0===e)return;const n=this.scene.filter(t=>"point"===t.type);for(let i=0;n.length>i;i++){const o=P(t,i,e);n[i]._decayOpacity=o,n[i].style={...n[i].style,opacity:o}}}applyPulse(t=this.currentTime()){const e=this.config.pulse;if(!e||!this.timestampBuffer)return!1;const n=this.scene.filter(t=>"point"===t.type),i=this.timestampBuffer.toArray(),o=e.color||"rgba(255,255,255,0.6)",r=e.glowRadius??4;let a=!1;for(let c=0;n.length>c&&i.length>c;c++){const l=s(e,i[c],t);a=u(n[c],l,o,r)||a}return a}refreshPulse(t){return!0!==this.lastCustomLayoutFailure?.preservedLastGoodScene&&this.applyPulse(t)}hasActivePulsesAt(t){return!!this.config.pulse&&a(this.config.pulse,this.timestampBuffer,t)}get hasActivePulses(){return this.hasActivePulsesAt(this.currentTime())}startTransition(t){const e=this.config.transition?.duration??300;if(0>=e)return;const n=new Map;for(const e of t)"point"===e.type&&e.pointId&&n.set(e.pointId,[e.x,e.y]);const i=this.scene.filter(t=>"point"===t.type);let o=!1;for(const t of i)if(t.pointId){const e=n.get(t.pointId);e&&(t._targetX=t.x,t._targetY=t.y,t.x=e[0],t.y=e[1],(Math.abs(e[0]-t._targetX)>.5||Math.abs(e[1]-t._targetY)>.5)&&(o=!0))}for(const t of i)t.pointId&&!n.has(t.pointId)&&(t._targetOpacity=t.style?.opacity??t.style?.fillOpacity??1,t.style={...t.style,opacity:0},o=!0);o&&(this.activeTransition={startTime:this.currentTime(),duration:e})}cancelIntroAnimation(){this.activeTransition=null;for(const t of this.scene)"point"===t.type&&(null!=t._targetOpacity&&(t.style={...t.style,opacity:t._targetOpacity},t._targetOpacity=void 0),null!=t._targetX&&(t.x=t._targetX,t.y=t._targetY,t._targetX=void 0,t._targetY=void 0))}advanceTransition(t){if(!this.activeTransition)return!1;const e=st(t,this.activeTransition),n=rt(e),i=this.scene.filter(t=>"point"===t.type);for(const t of i){if(null!=t._targetX&&null!=t._targetY){const e=t.y;t.x=ft(t.x,t._targetX,n),t.y=ft(e,t._targetY,n)}null!=t._targetOpacity&&(t.style={...t.style,opacity:t._targetOpacity*n})}if(e>=1){for(const t of i)null!=t._targetX&&(t.x=t._targetX,t.y=t._targetY,t._targetX=void 0,t._targetY=void 0),null!=t._targetOpacity&&(t.style={...t.style,opacity:t._targetOpacity},t._targetOpacity=void 0);return this.activeTransition=null,!1}return!0}};Le.QUADTREE_THRESHOLD=500;var Ae=Le;function ke(t,e,n,i,o,r,s=0,a=i){if(r){const t=S(r,e,n,i,s);if(t&&!1!==t.node.interactive)return t}else{let o=null,r=1/0;for(const s of t){if("point"!==s.type)continue;if(!1===s.interactive)continue;const t=s.x-e,a=s.y-n,c=Math.sqrt(t*t+a*a);L(s.r,i)>=c&&r>c&&(o=s,r=c)}if(o)return{node:o,distance:r}}let c=null,l=1/0;for(const o of t){if("glyph"!==o.type)continue;if(null==o.datum)continue;const t=Nt(o.glyph,o.size),r=o.x+t.centerDx-e,s=o.y+t.centerDy-n,a=Math.sqrt(r*r+s*s);L(t.radius,i)>=a&&l>a&&(c=o,l=a)}if(c)return{node:c,distance:l};for(let i=t.length-1;i>=0;i--){const r=t[i];if("geoarea"!==r.type)continue;const s=r;if(!1===s.interactive)continue;const[[a,c],[l,u]]=s.bounds;if(!(a>e||e>l||c>n||n>u)&&(s._cachedPath2D||(s._cachedPath2D=new Path2D(s.pathData)),o.isPointInPath(s._cachedPath2D,e,n)))return{node:s,distance:0}}let u=null,h=1/0;for(const i of t){if("line"!==i.type)continue;const t=i,{path:o}=t,r=Math.max((t.style.strokeWidth??2)+4,5,a);for(let i=0;o.length-1>i;i++){const[s,a]=o[i],[c,l]=o[i+1],d=De(e,n,s,a,c,l);r>=d&&h>d&&(u=t,h=d)}}return u?{node:u,distance:h}:null}function De(t,e,n,i,o,r){const s=o-n,a=r-i,c=s*s+a*a;if(0===c)return Math.sqrt((t-n)**2+(e-i)**2);let l=((t-n)*s+(e-i)*a)/c;return l=Math.max(0,Math.min(1,l)),Math.sqrt((t-(n+l*s))**2+(e-(i+l*a))**2)}v(Ae);import{useMemo as je,useRef as Me}from"react";import{jsx as Te,jsxs as Be}from"react/jsx-runtime";function _e(t){const{width:e,height:n,totalWidth:i,totalHeight:o,margin:r,showAxes:s,title:a,legend:c,legendHoverBehavior:l,legendClickBehavior:u,legendHighlightedCategory:h,legendIsolatedCategories:d,legendPosition:p,legendLayout:f,foregroundGraphics:m,annotations:g,onAnnotationActivate:y,onObservation:v,chartId:b,chartType:w,autoPlaceAnnotations:R,svgAnnotationRules:P,pointNodes:S,geoProjection:C}=t,L=Lt({onAnnotationActivate:y,onObservation:v,chartId:b,chartType:w}),A=Me([g?.length??0,new Map]),k=g?.length??0;A.current[0]!==k&&(A.current=[k,new Map]);const D=je(()=>{if(!g||0===g.length)return null;const t=x(g),i=C?t.map(t=>{if(!Array.isArray(t.coordinates)||2>t.coordinates.length)return t;const e=C(Number(t.coordinates[0]),Number(t.coordinates[1]));return e?{...t,x:e[0],y:e[1]}:t}):t,o={scales:{x:t=>Number(t),y:t=>Number(t)},timeAxis:"x",width:e,height:n,frameType:"xy",pointNodes:S,stickyPositionCache:A.current[1]},r=R?it({annotations:i,context:o,..."object"==typeof R?R:{}}):i;return wt(r,at("xy",L),P,o)},[g,R,P,e,n,S,L,C]);return s||a||c||m||D&&D.length>0?Be("svg",{role:"img",width:i,height:o,overflow:"visible",style:{position:"absolute",top:0,left:0,pointerEvents:"none",overflow:"visible"},children:[Te("title",{children:"string"==typeof a?a:"XY Chart"}),Te("desc",{children:"string"==typeof a?a+" (XY data visualization)":"XY data visualization"}),Be("g",{transform:"translate("+r.left+","+r.top+")",children:[D,m]}),Te($,{title:a,totalWidth:i,marginTop:r.top}),Rt({legend:c,totalWidth:i,totalHeight:o,margin:r,legendPosition:p,title:a,legendLayout:f,legendHoverBehavior:l,legendClickBehavior:u,legendHighlightedCategory:h,legendIsolatedCategories:d})]}):null}import{zoom as Ie,zoomIdentity as Ee}from"d3-zoom";import{select as Ne}from"d3-selection";function Fe([t,e,n]){const i=1<<n;return[t-Math.floor(t/i)*i,e,n]}function Oe(t,e,n,i,o){return"function"==typeof t?t(e,n,i,o):t.replace("{z}",e+"").replace("{x}",n+"").replace("{y}",i+"").replace("{r}",o>1?"@2x":"")}var We=new WeakMap,ze=1;function He(t){return Number.isFinite(t)?Math.max(1,Math.floor(t)):256}var Ge=class{constructor(t=256){this.cache=new Map,this.limit=He(t)}setLimit(t){this.limit=He(t),this.cache.size>this.limit&&this.evict()}get(t){const e=this.cache.get(t);return e&&(e.lastUsed=performance.now()),e}set(t,e){this.cache.set(t,e),this.cache.size>this.limit&&this.evict()}evict(){for(;this.cache.size>this.limit;){let t,e=1/0;for(const[n,i]of this.cache)e>i.lastUsed&&(e=i.lastUsed,t=n);if(!t)break;{const e=this.cache.get(t);e&&(e.img.onload=null,e.img.onerror=null,e.img.src=""),this.cache.delete(t)}}}clear(){for(const t of this.cache.values())t.img.onload=null,t.img.onerror=null,t.img.src="";this.cache.clear()}};var qe=class{constructor(t){this.capacity=t,this.particles=Array(t);for(let e=0;t>e;e++)this.particles[e]={t:0,offset:0,lineIndex:0,active:!1,x:0,y:0}}spawn(t,e=Math.random){for(let n=0;this.capacity>n;n++){const i=this.particles[n];if(!i.active)return i.active=!0,i.t=0,i.offset=.6*(e()-.5),i.lineIndex=t,i.x=0,i.y=0,i}return null}step(t,e,n,i){for(let o=0;this.capacity>o;o++){const r=this.particles[o];if(!r.active)continue;const s=n[r.lineIndex];if(!s||2>s.length){r.active=!1;continue}if(r.t+=t*e,r.t>=1){r.active=!1;continue}const a=Ze(s),c=Xe(s,r.t*a),l=(i[r.lineIndex]||2)/2;r.x=c.x+c.nx*r.offset*l*2,r.y=c.y+c.ny*r.offset*l*2}}countForLine(t){let e=0;for(let n=0;this.capacity>n;n++)this.particles[n].active&&this.particles[n].lineIndex===t&&e++;return e}clear(){for(let t=0;this.capacity>t;t++)this.particles[t].active=!1}};function Ze(t){let e=0;for(let n=1;t.length>n;n++){const i=t[n][0]-t[n-1][0],o=t[n][1]-t[n-1][1];e+=Math.sqrt(i*i+o*o)}return e}function Xe(t,e){let n=0;for(let i=1;t.length>i;i++){const o=t[i][0]-t[i-1][0],r=t[i][1]-t[i-1][1],s=Math.sqrt(o*o+r*r);if(n+s>=e||i===t.length-1){const a=s>0?(e-n)/s:0,c=s>.001?s:1;return{x:t[i-1][0]+o*a,y:t[i-1][1]+r*a,nx:-r/c,ny:o/c}}n+=s}const i=t[t.length-1];return{x:i[0],y:i[1],nx:0,ny:0}}function Ye(t){if(!t)return;const e=[];for(const n of t)if("point"===n.type)e.push(n);else if("glyph"===n.type){const t=n,i=Nt(t.glyph,t.size);e.push({pointId:t.pointId,x:t.x+i.centerDx,y:t.y+i.centerDy,r:i.radius})}return e}import{jsx as Qe,jsxs as Ue}from"react/jsx-runtime";function Ve({data:t}){if(!t)return null;if(t.properties)return Qe("div",{className:"semiotic-tooltip",style:ct,children:Qe("div",{style:{fontWeight:600},children:t.properties.name||t.properties.NAME||t.properties.id||"Feature"})});const e=null!=t.data?t.data:t;if(!e||"object"!=typeof e)return null;const n=Ct(e),i=null!=n.title?n.title+"":null;return null==i&&0===n.entries.length?null:Ue("div",{className:"semiotic-tooltip",style:ct,children:[null!=i&&Qe("div",{style:{fontWeight:600,marginBottom:n.entries.length?2:0},children:i}),n.entries.map(t=>Ue("div",{children:[Ue("span",{style:{opacity:.7},children:[t.key,": "]}),Qe("span",{style:{fontWeight:600},children:C(t.value)})]},t.key))]})}Ve.ownsChrome=!0;var $e={top:10,right:10,bottom:10,left:10},Ke=null;function Je(){if(null!==Ke)return Ke;if("undefined"==typeof window)return!1;const t="function"==typeof window.matchMedia&&window.matchMedia("(pointer: coarse)").matches,e="undefined"!=typeof navigator&&"number"==typeof navigator.hardwareConcurrency&&4>=navigator.hardwareConcurrency,n="undefined"!=typeof navigator&&"number"==typeof navigator.deviceMemory&&4>=navigator.deviceMemory;return Ke=t||e||n}function tn(){return Je()?12:30}var en={width:28,height:28,border:"1px solid rgba(0,0,0,0.2)",borderRadius:4,background:"rgba(255,255,255,0.9)",color:"#333",fontSize:16,fontWeight:600,lineHeight:1,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",padding:0,boxShadow:"0 1px 3px rgba(0,0,0,0.1)"};function nn(t){return"string"==typeof t?t:"object"==typeof t&&t&&"type"in t?t.type:null}function on(t){return t?t.getContext("2d"):null}function rn(t){const e=t.pointer.clientX-t.canvasRect.left-t.margin.left,n=t.pointer.clientY-t.canvasRect.top-t.margin.top;if(0>e||e>t.width||0>n||n>t.height)return{kind:"outside"};t.hitCanvasRef.current||(t.hitCanvasRef.current="undefined"!=typeof OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas"));const i=on(t.hitCanvasRef.current);if(!i)return{kind:"unavailable"};const o=ke(t.scene,e,n,ht(30,t.pointer.pointerType),i,t.pointQuadtree,t.maxPointRadius,ht(6,t.pointer.pointerType));if(!o)return{kind:"miss"};const{node:r}=o,s=r.datum,a=Array.isArray(s)?null:s?.properties?s:s?.data||s,c="point"===r.type?r.x:"geoarea"===r.type?r.centroid[0]:e,l="point"===r.type?r.y:"geoarea"===r.type?r.centroid[1]:n;return{kind:"hit",node:r,hover:{...a,...a?.properties||{},data:a,properties:a?.properties,__semioticHoverData:!0,x:c,y:l}}}import*as sn from"react";import{useSyncExternalStore as an}from"react";function cn({graphics:t,size:e,margin:n,readScales:i,tracker:o}){return an(o.subscribe,o.getSnapshot,o.getSnapshot),sn.createElement(sn.Fragment,null,j(t,e,n,i()))}import{jsx as ln,jsxs as un}from"react/jsx-runtime";var hn=Wt(Ot(function(t,e){const{projection:o,projectionExtent:r,fitPadding:s,projectionTransform:a,areas:c,points:u,lines:v,customLayout:b,layoutConfig:w,layoutSelection:P,onLayoutError:x,xAccessor:S,yAccessor:C,lineDataAccessor:L,pointIdAccessor:j,lineIdAccessor:T,lineType:O="geo",flowStyle:G="basic",graticule:q,zoomable:$,zoomExtent:K,onZoom:nt,dragRotate:it,showParticles:rt,particleStyle:st,tileURL:at,tileAttribution:ct,tileCacheSize:ft,size:mt,width:gt,height:wt,responsiveWidth:Rt,responsiveHeight:Ct,margin:Lt,className:_t,background:It,maxDevicePixelRatio:Nt,windowSize:Ot=500,renderMode:Wt,areaStyle:Yt,pointStyle:Qt,lineStyle:Ut,colorScheme:Vt,enableHover:$t=!0,hoverAnnotation:Kt,tooltipContent:Jt,allowTooltipOverflow:te=!1,customClickBehavior:ee,customHoverBehavior:ne,onObservation:ie,annotationObservationCallback:oe,chartId:re,annotations:se,onAnnotationActivate:ae,autoPlaceAnnotations:ce,svgAnnotationRules:le,decay:ue,pulse:he,transition:de,animate:pe,staleness:fe,frameScheduler:me,clock:ge,random:ye,seed:ve,paused:be=!1,suspendWhenHidden:we=!0,backgroundGraphics:Re,foregroundGraphics:Pe,title:xe,legend:Se,legendPosition:Ce,legendLayout:Le,legendHoverBehavior:De,legendClickBehavior:je,legendHighlightedCategory:Me,legendIsolatedCategories:Te,legendCategoryAccessor:Be,onCategoriesChange:He,showAxes:Ze,accessibleTable:Xe=!0,description:Qe,summary:Ue}=t,{customHoverBehavior:Ke,customClickBehavior:an,hasClickBehavior:hn}=d({customHoverBehavior:ne,customClickBehavior:ee,onObservation:ie,chartId:re,chartType:"StreamGeoFrame"}),dn=mt||[gt||600,wt||400],pn=Zt(!0),fn=kt({sizeProp:dn,responsiveWidth:Rt,responsiveHeight:Ct,userMargin:Lt,marginDefault:$e,title:xe,legend:Se,legendPosition:Ce,legendLayout:Le,legendMarginReserved:t.__legendMarginReservedFor===Se,animate:pe,transitionProp:de,frameScheduler:me,clock:ge,random:ye,seed:ve,paused:be,suspendWhenHidden:we,themeDirtyRef:pn}),{reducedMotionRef:mn,responsiveRef:gn,size:yn,margin:vn,adjustedWidth:bn,adjustedHeight:wn,transition:Rn,introEnabled:Pn,tableId:xn,frameRuntime:Sn,rafRef:Cn,renderFnRef:Ln,scheduleRender:An,currentTheme:kn}=fn,Dn=jt(),jn=Tt(),Mn=qt(()=>Array.isArray(c)?lt(c):c,[c]),Tn=qt(()=>lt(u),[u]),Bn=qt(()=>lt(v),[v]),_n=it??"orthographic"===nn(o),In=qt(()=>({projection:o,projectionExtent:r,fitPadding:s,xAccessor:S,yAccessor:C,lineDataAccessor:L,lineType:O,flowStyle:G,areaStyle:Yt,pointStyle:Qt,lineStyle:Ut,colorScheme:Vt,themeSemantic:Bt(kn),themeSequential:kn?.colors?.sequential,themeDiverging:kn?.colors?.diverging,themeCategorical:kn?.colors?.categorical,graticule:q,projectionTransform:a,windowSize:Ot,clock:Sn.now,decay:ue,pulse:he,transition:Rn,introAnimation:Pn,annotations:se,pointIdAccessor:j,lineIdAccessor:T,customLayout:b,layoutConfig:w,onLayoutError:x,layoutMargin:vn}),[o,r,s,S,C,L,O,G,Yt,Qt,Ut,Vt,kn,q,a,Ot,Sn.now,ue,he,Rn,Pn,se,j,T,b,w,x,vn]),En=N(In),Nn=Zt(null);Nn.current||(Nn.current=new Ae(En));const Fn=Nn.current,On=Zt(null),Wn=On.current??(On.current=function(t){const e=new Set;let n=0,i=t;return{subscribe:t=>(e.add(t),()=>e.delete(t)),getSnapshot:()=>n,sync(t){if(t!==i){i=t,n+=1;for(const t of e)t()}}}}(Fn.scales)),zn=pt||!Dn&&jn;zn&&(Mn||u||v)&&(Mn&&Fn.setAreas(Mn),u&&Fn.setPoints(Tn),v&&Fn.setLines(Bn),Fn.computeScene({width:bn,height:wn}));const{resolvedForeground:Hn,resolvedBackground:Gn,themeBackground:qn,surfaceBackground:Zn}=function({tracker:t,readScales:e,...n}){const i=i=>"function"==typeof i?sn.createElement(cn,{graphics:i,size:n.size,margin:n.margin,readScales:e,tracker:t}):i;return{...M({...n,resolveScaleAwareGraphics:!1}),resolvedForeground:i(n.foregroundGraphics),resolvedBackground:i(n.backgroundGraphics)}}({foregroundGraphics:Pe,backgroundGraphics:Re,size:yn,margin:vn,scales:Fn.scales,background:It,themeBackgroundColor:kn.colors.background,tracker:Wn,readScales:()=>Fn.scales}),Xn=Zt(null),Yn=Zt(null),Qn=Zt(null);at&&!Qn.current&&(Qn.current=new Ge(ft??256)),Qn.current?.setLimit(ft??256);const Un=Zt(se),Vn=Zt(null),$n=Zt(Ee),Kn=Zt(!1),Jn=Zt(null),ti=zt(t=>{Jn.current=t,gn&&"object"==typeof gn&&(gn.current=t)},[gn]),ei=Zt(null),ni=Zt(null),ii=Zt(null),oi=Zt(0);if(rt&&!ii.current){const t=st?.maxPerLine??tn();ii.current=new qe(50*t)}const ri=Zt(null),si=Zt(!1),ai=Zt(null),ci=Zt(!1),li=Zt(!1),ui=Mt("StreamGeoFrame"),hi=Zt(void 0),[di,pi]=Xt(null),[,fi]=Xt(0),mi=Zt(0),[gi,yi]=Xt(!1),vi=E(Nn,Be,He,t=>t.getPoints());_(Nn,En,pn,An),I(Nn,P,pn,An),Ht(()=>{const t=Nn.current;t&&(Mn&&t.setAreas(Mn),u&&t.setPoints(Tn),v&&t.setLines(Bn),pn.current=!0,An())},[Mn,u,Tn,v,Bn,An]);const bi=zt(t=>{null!=t&&"object"==typeof t&&(Nn.current?.pushPoint(t),pn.current=!0,An())},[An]),wi=zt(t=>{const e=lt(t);0!==e.length&&(Nn.current?.pushMany(e),pn.current=!0,An())},[An]),Ri=zt(t=>{null!=t&&"object"==typeof t&&(Nn.current?.pushLine(t),pn.current=!0,An())},[An]),Pi=zt(t=>{const e=lt(t);0!==e.length&&(Nn.current?.pushManyLines(e),pn.current=!0,An())},[An]),xi=zt(()=>{Nn.current?.clear(),pn.current=!0,An()},[An]);Gt(e,()=>({push:bi,pushMany:wi,removePoint:t=>{const e=Nn.current?.removePoint(t)??[];return e.length>0&&(pn.current=!0,An()),e},pushLine:Ri,pushManyLines:Pi,removeLine:t=>{const e=Nn.current?.removeLine(t)??[];return e.length>0&&(pn.current=!0,An()),e},getLines:()=>Nn.current?.getLines()??[],clear:xi,getProjection:()=>Nn.current?.scales?.projection??null,getGeoPath:()=>Nn.current?.scales?.geoPath??null,getCartogramLayout:()=>Nn.current?.cartogramLayout??null,getCustomLayout:()=>Nn.current?.lastCustomLayoutResult??null,getLayoutFailure:()=>Nn.current?.lastCustomLayoutFailure??null,getZoom:()=>$n.current.k,resetZoom:()=>{const t=Jn.current;t&&Vn.current&&Ne(t).call(Vn.current.transform,Ee)},getData:()=>Nn.current?.getPoints()??[]}),[bi,wi,Ri,Pi,xi,An]);const{hoverHandlerRef:Si,onPointerMove:Ci,onPointerLeave:Li,pointerStateRef:Ai}=fn,{canvasRef:ki,interactionCanvasRef:Di,resolutionDirtyRef:ji}=Dt(fn,{hydrated:Dn,wasHydratingFromSSR:jn,storeRef:Nn,dirtyRef:pn,cleanup:()=>Qn.current?.clear(),maxDevicePixelRatio:Nt,canvasPaintDependencies:[bn,wn,It,Re,Wt,at,ft,An]});Ht(()=>{Si.current=t=>{const e=ki.current;if(!e)return;const n=Nn.current;if(!n||!n.scene.length)return void St(e);const i=rn({pointer:t,canvasRect:e.getBoundingClientRect(),margin:vn,width:bn,height:wn,scene:n.scene,pointQuadtree:n.quadtree,maxPointRadius:n.maxPointRadius,hitCanvasRef:Yn});St(e,"hit"===i.kind?xt(i.node):void 0),$t&&!1!==Kt&&("hit"===i.kind?(ri.current=i.hover,ai.current=i.node,pi(i.hover),Ke?.(i.hover),An()):("outside"===i.kind||"miss"===i.kind&&ri.current)&&(ri.current=null,ai.current=null,pi(null),Ke?.(null),An()))}},[$t,Kt,bn,wn,vn,Ke,An,Si,ki]),fn.hoverLeaveRef.current=()=>{St(ki.current),$t&&!1!==Kt&&(ri.current=null,ai.current=null,pi(null),Ke?.(null),An())},At(ki);const Mi=zt(t=>{if(dt(t.target))return;if(!an)return;const e=Nn.current;if(!e||!e.scene.length)return void an(null);const n=t.currentTarget.getBoundingClientRect(),i=t.clientX-n.left-vn.left,o=t.clientY-n.top-vn.top;if(0>i||i>bn||0>o||o>wn)return void an(null);Yn.current||(Yn.current="undefined"!=typeof OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas"));const r=on(Yn.current);if(!r)return void an(null);const s=ht(30,hi.current),a=ht(6,hi.current),c=ke(e.scene,i,o,s,r,e.quadtree,e.maxPointRadius,a);if(c){const t=c.node.datum,e=Array.isArray(t)?null:t?.properties?t:t?.data||t,n=e?.properties?{...e,...e.properties}:e;return void an({...n,data:e,properties:e?.properties,__semioticHoverData:!0,x:i,y:o,time:i,value:o},{type:"activate",inputType:yt(hi.current)})}an(null)},[wn,bn,an,vn]),{kbFocusIndexRef:Ti,focusedNavPointRef:Bi,onKeyDown:_i}=h({storeRef:Nn,hoverRef:ri,hoveredNodeRef:ai,setHoverPoint:pi,customHoverBehavior:Ke,customClickBehavior:an,scheduleRender:An}),Ii=zt(t=>{B(Ai,t,$t&&!1!==Kt,si.current,ki.current)&&(hi.current=t.pointerType,Ti.current=-1,Bi.current=null,Ci(t))},[ki,$t,Kt,Bi,Ti,Ci,Ai]),Ei=zt(t=>{hi.current=t.pointerType},[]);Ln.current=()=>{if(Cn.current=null,Wn.sync(Nn.current?.scales??null),!Sn.isActive)return;const t=ki.current,e=Nn.current;if(!t||!e)return;const o=Sn.now();let r=!1;const s=ni.current;let a=!1;s&&(ni.current=null,e.applyRotation(s,{width:bn,height:wn}),a=!0);const c=null!=e.activeTransition,u=e.advanceTransition(mn.current?o+1e6:o),h=!mn.current&&u,d=ui.current.beforeCompute(e.getLastUpdateResult(),h);let y=!1;if(pn.current&&!u){const t={width:bn,height:wn},n=e.hasProjection(),i=_n&&n?e.getRotation():null;e.computeScene(t);const o=$n.current,r=1!==o.k||0!==o.x||0!==o.y;_n&&i?r?(e.setRotation(i),e.applyZoomScale(o.k,t)):e.applyRotation(i,t):r&&e.applyZoomTransform(o,t),pn.current=!1,y=!0,vi()}Wn.sync(e.scales),ui.current.afterCompute(d,y,!1);const v=ut(Nt,yn),b=rt&&!mn.current&&!!ii.current,w=e.consumeStylePaintPending();var R;(y||a||w)&&(si.current=Pt(e.scene),si.current||St(t)),si.current&&(c||y||a||w)&&bt((R={canvas:t,pointer:Ai.current,store:e,margin:vn,width:bn,height:wn,hitCanvasRef:Yn,geometryMoved:c||y||a}).canvas,R.pointer,t=>{const e=rn({pointer:t,canvasRect:R.canvas.getBoundingClientRect(),margin:R.margin,width:R.width,height:R.height,scene:R.store.scene,pointQuadtree:R.geometryMoved?null:R.store.quadtree,maxPointRadius:R.store.maxPointRadius,hitCanvasRef:R.hitCanvasRef});return"hit"===e.kind?xt(e.node):void 0});const P=l(e,o,y,li),x=f({dirtyOrRebuilt:y,transitioning:c,continuous:b,liveEncoding:P.changed,forced:a||w||ji.current});if(ji.current=!1,at&&Qn.current){const t=Xn.current;if(t&&e.scales?.projection){const n=vt(t,yn,vn,v);n&&(n.clearRect(-vn.left,-vn.top,yn[0],yn[1]),n.save(),n.beginPath(),n.rect(0,0,bn,wn),n.clip(),function(t,e){const{tileURL:n,projection:i,width:o,height:r,tileCache:s,onTileLoad:a,maxDevicePixelRatio:c}=e,l=i.scale(),u=i.translate(),h=function(t){const{size:e,scale:n,translate:i,clampX:o=!0,clampY:r=!0}=t,s=Math.max(Math.log(n)/Math.LN2-8,0),a=Math.round(s),c=1<<a,l=Math.pow(2,s-a+8),u=i[0]-n/2,h=i[1]-n/2,d=Math.max(o?0:-1/0,Math.floor((0-u)/l)),p=Math.min(o?c:1/0,Math.ceil((e[0]-u)/l)),f=Math.max(r?0:-1/0,Math.floor((0-h)/l)),m=Math.min(r?c:1/0,Math.ceil((e[1]-h)/l)),g=[];for(let t=f;m>t;++t)for(let e=d;p>e;++e)g.push([e,t,a]);return{tiles:g,translate:[u/l,h/l],scale:l}}({size:[o,r],scale:2*l*Math.PI,translate:u}),d=ut(c,[o,r]),p=function(t){if("string"==typeof t)return"template:"+t;const e=t;let n=We.get(e);return null==n&&(n=ze++,We.set(e,n)),"provider:"+n}(n);let f=!0;for(const e of h.tiles){const[i,o,r]=Fe(e),c=Oe(n,r,i,o,d),l=`${p}|dpr:${d}|${r}/${i}/${o}|${c}`;let u=s.get(l);if(!u){const t=new Image;t.crossOrigin="anonymous";const e={img:t,loaded:!1,failed:!1,key:l,lastUsed:performance.now()};s.set(l,e),t.onload=()=>{e.loaded=!0,a?.()},t.onerror=()=>{e.loaded=!0,e.failed=!0,a?.()},t.src=c,u=e}if(!u.loaded){f=!1;continue}if(u.failed)continue;const m=h.scale;t.drawImage(u.img,(e[0]+h.translate[0])*m-.5,(e[1]+h.translate[1])*m-.5,m+1,m+1)}}(n,{tileURL:at,projection:e.scales.projection,width:bn,height:wn,tileCache:Qn.current,maxDevicePixelRatio:Nt,onTileLoad:()=>An()}),n.restore())}}if(x){const n=vt(t,yn,vn,v);if(!n)return;n.clearRect(-vn.left,-vn.top,yn[0],yn[1]),at||A(n,{background:It,themeBackground:qn,hasBackgroundGraphics:!!Re,x:-vn.left,y:-vn.top,width:yn[0],height:yn[1]}),n.save(),n.beginPath(),n.rect(0,0,bn,wn),n.clip();const s=e.scene,a=e.scales,c={width:bn,height:wn};if(k({context:n,nodes:s,renderMode:Wt,pixelRatio:v,paintBuiltIn:t=>{!function(t,e){const n=e.filter(t=>"geoarea"===t.type);for(const e of n){if(!e.pathData)continue;e._cachedPath2D||(e._cachedPath2D=new Path2D(e.pathData));const n=e._cachedPath2D,i=Et(t,e.style.fill)||"#e0e0e0";"none"!==i&&(t.fillStyle=i,t.globalAlpha=(e._decayOpacity??1)*(e.style.fillOpacity??1),t.fill(n));const o=e.style.strokeWidth??.5;if(e.style.stroke&&"none"!==e.style.stroke&&o>0){if(t.strokeStyle=Ft(t,e.style.stroke)||e.style.stroke,t.lineWidth=o,t.globalAlpha=e._decayOpacity??1,e.style.strokeDasharray){const n=e.style.strokeDasharray.split(",").map(Number);t.setLineDash(n)}else t.setLineDash([]);t.stroke(n)}z(t,e,n),t.globalAlpha=1,t.setLineDash([])}}(n,t),i(n,t,a,c),p(n,t,a,c),g(n,t,a,c)}}),b&&ii.current){const t=ii.current,e=s.filter(t=>"line"===t.type);if(e.length>0){const i=st||{},s=.3*(i.speedMultiplier??1),a=i.maxPerLine??tn(),c=i.spawnRate??(Je()?.06:.15),l=i.radius??2,u=i.opacity??.7,h=o/1e3,d=oi.current>0?Math.min(h-oi.current,.1):.016;oi.current=h;const p=e.map(t=>t.path),f=e.map(t=>t.style.strokeWidth??2);for(let n=0;e.length>n;n++)Sn.random()<c&&t.countForLine(n)<a&&t.spawn(n,Sn.random);t.step(d,s,p,f),n.globalAlpha=u;for(let o=0;t.particles.length>o;o++){const r=t.particles[o];if(!r.active)continue;const s=e[r.lineIndex],a="function"==typeof i.color?i.color(s?.datum??{}):"source"!==i.color&&i.color?i.color:s?.style.stroke||"#fff";n.beginPath(),n.arc(r.x,r.y,l,0,2*Math.PI),n.fillStyle=a,n.fill()}n.globalAlpha=1,r=!0}}n.restore()}(y||c&&!u)&&t.setAttribute("aria-label",ot(e.scene,"Geographic chart"));const S=ai.current,C=!(!S||"geoarea"!==S.type&&"point"!==S.type),L=m(C,ci.current),D=Di.current;if(D&&L){const t=vt(D,yn,vn,v);if(t){if(t.clearRect(-vn.left,-vn.top,yn[0],yn[1]),S&&"geoarea"===S.type){const e=new Path2D(S.pathData);t.fillStyle="rgba(255, 255, 255, 0.3)",t.fill(e),t.strokeStyle="rgba(0, 0, 0, 0.5)",t.lineWidth=2,t.stroke(e)}if(S&&"point"===S.type){const e=S,i="object"==typeof Kt?Kt:void 0,o=i?.pointColor||n(S);t.beginPath(),t.arc(e.x,e.y,e.r+3,0,2*Math.PI),o?(t.save(),t.globalAlpha=.4,t.fillStyle=o,t.fill(),t.restore()):(t.fillStyle="rgba(255, 255, 255, 0.4)",t.fill()),t.strokeStyle=o||"rgba(0, 0, 0, 0.5)",t.lineWidth=2,t.stroke()}}ci.current=C}const j=se!==Un.current;j&&(Un.current=se),(y||j||c&&se&&se.length>0)&&(y||j||c&&!u||o-mi.current>=33)&&(fi(t=>t+1),mi.current=o),(h||null!=e.activeTransition||P.pending||r)&&An()},F(fe,Nn,pn,An,Sn.now,gi,yi),Ht(()=>{if("production"!==process.env.NODE_ENV&&at){const t=nn(o);t&&"mercator"!==t&&console.warn(`[StreamGeoFrame] tileURL is set but projection is "${t}". Raster tiles use Web Mercator and will not align with other projections.`)}},[at,o]),Ht(()=>{const t=Jn.current;if(!$||!t)return Vn.current&&t&&(Ne(t).on(".zoom",null),Vn.current=null),void(t&&Ne(t).on("mousedown.rotate",null).on("touchstart.rotate",null));const[e,n]=K||[1,8],i={width:bn,height:wn};if(_n){let o=$n.current.k;const r=t=>{o=Math.max(e,Math.min(n,t)),$n.current=Ee.scale(o);const r=Nn.current;r&&(r.applyZoomScale(o,i),pn.current=!1,An(),r.scales?.projection&&nt?.({projection:r.scales.projection,zoom:r.currentZoom}))};Vn.current={scaleBy:(t,e)=>r(o*e),transform:(t,e)=>r(e?.k??1)};const s=t=>{t.preventDefault(),r(o*(0>t.deltaY?1.1:1/1.1))},a=t=>{const e=t.target;e&&(e.closest("button")||e.closest(".stream-geo-zoom-controls"))||(t.preventDefault(),r(1.5*o))};t.addEventListener("wheel",s,{passive:!1}),t.addEventListener("dblclick",a);const c=.4,l=e=>{if(0!==e.button)return;const n=e.target;if(n.closest("button")||n.closest(".stream-geo-zoom-controls"))return;const i=Nn.current;if(!i)return;const o=i.getRotation();ei.current={x:e.clientX,y:e.clientY,rotation:[...o]},t.setPointerCapture(e.pointerId),e.preventDefault()},u=t=>{const e=ei.current;e&&(ni.current=[e.rotation[0]+(t.clientX-e.x)*c,Math.max(-90,Math.min(90,e.rotation[1]-(t.clientY-e.y)*c)),e.rotation[2]],An())},h=e=>{if(!ei.current)return;ei.current=null,t.releasePointerCapture(e.pointerId);const n=ni.current;if(n){ni.current=null;const t=Nn.current;t&&(t.applyRotation(n,i),An())}const o=Nn.current;o?.scales?.projection&&nt?.({projection:o.scales.projection,zoom:o.currentZoom})};return t.addEventListener("pointerdown",l),t.addEventListener("pointermove",u),t.addEventListener("pointerup",h),t.addEventListener("pointercancel",h),()=>{t.removeEventListener("wheel",s),t.removeEventListener("dblclick",a),t.removeEventListener("pointerdown",l),t.removeEventListener("pointermove",u),t.removeEventListener("pointerup",h),t.removeEventListener("pointercancel",h),Vn.current=null}}const o=Ie().scaleExtent([e,n]).extent([[0,0],[yn[0],yn[1]]]).translateExtent([[-1/0,-1/0],[1/0,1/0]]).on("zoom",t=>{const e=t.transform;$n.current=e,Kn.current=!0;const n=Nn.current;n&&(n.applyZoomTransform(e,i),pn.current=!1,An())}).on("end",t=>{$n.current=t.transform,Kn.current=!1;const e=Nn.current;e?.scales?.projection&&nt?.({projection:e.scales.projection,zoom:e.currentZoom})});return Vn.current=o,Ne(t).call(o),()=>{Ne(t).on(".zoom",null)}},[$,K,_n,yn,bn,wn,vn,nt,An]);const Ni=$t&&!1!==Kt,Fi=Ni&&di?Jt?Jt(di):ln(Ve,{data:di}):null,Oi=Fi?ln(U,{x:di.x,y:di.y,containerWidth:bn,containerHeight:wn,margin:vn,className:"stream-frame-tooltip",zIndex:10,children:Fi}):null;if(zn){const t=Fn.scene;return un("div",{ref:ti,className:"stream-geo-frame"+(_t?" "+_t:""),role:"img","aria-label":Qe||("string"==typeof xe?xe:"Geographic chart"),style:{position:"relative",fontFamily:"var(--semiotic-font-family, sans-serif)",width:Rt?"100%":yn[0],height:Ct?"100%":yn[1]},children:[ln(tt,{summary:Ue}),un("svg",{xmlns:"http://www.w3.org/2000/svg",width:yn[0],height:yn[1],style:{position:"absolute",left:0,top:0},children:[Zn?ln("rect",{className:"stream-frame-background__backdrop",x:0,y:0,width:yn[0],height:yn[1],fill:Zn}):null,ln("g",{transform:`translate(${vn.left},${vn.top})`,children:Gn}),ln("g",{transform:`translate(${vn.left},${vn.top})`,children:t.map((t,e)=>D({node:t,index:e,renderMode:Wt,fallback:()=>H(t,e)}))})]}),ln(_e,{width:bn,height:wn,totalWidth:yn[0],totalHeight:yn[1],margin:vn,showAxes:!1,title:xe,legend:Se,legendPosition:Ce,legendLayout:Le,legendHoverBehavior:De,legendClickBehavior:je,legendHighlightedCategory:Me,legendIsolatedCategories:Te,foregroundGraphics:R(Hn,W(Nn.current?.customLayoutOverlays,P??null)),annotations:se,onAnnotationActivate:ae,onObservation:oe??ie,chartId:re,chartType:"StreamGeoFrame",autoPlaceAnnotations:ce,svgAnnotationRules:le,pointNodes:Ye(t),geoProjection:Nn.current?.scales?.projectedPoint})]})}return un("div",{ref:ti,className:"stream-geo-frame"+(_t?" "+_t:""),role:"group","aria-label":Qe||("string"==typeof xe?xe:"Geographic chart"),tabIndex:0,style:{position:"relative",fontFamily:"var(--semiotic-font-family, sans-serif)",width:Rt?"100%":yn[0],height:Ct?"100%":yn[1],overflow:te?"visible":"hidden",...$?{touchAction:"none"}:{}},onKeyDown:_i,children:["production"!==process.env.NODE_ENV&&Nn.current&&ln(J,{store:Nn.current,diagnostics:ui.current}),Xe&&un(X,{accessibleTable:Xe,children:[ln(et,{tableId:xn}),ln(Z,{scene:Nn.current?.scene??[],chartType:"Geographic chart",tableId:xn,chartTitle:"string"==typeof xe?xe:void 0})]}),ln(tt,{summary:Ue}),ln(Y,{hoverPoint:di}),un("div",{role:"img","aria-label":Qe||("string"==typeof xe?xe:"Geographic chart"),style:{position:"relative",width:"100%",height:"100%"},onPointerMove:Ii,onPointerLeave:Li,onPointerDown:Ni||hn?Ei:void 0,onClick:hn?Mi:void 0,children:[ln(Q,{size:yn,margin:vn,backdropFill:Zn??void 0,children:Gn}),at&&ln("canvas",{ref:Xn,style:{position:"absolute",left:0,top:0,pointerEvents:"none"}}),ln("canvas",{ref:ki,"aria-label":ot(Nn.current?.scene??[],"Geographic chart"),style:{position:"absolute",left:0,top:0}}),ln("canvas",{ref:Di,style:{position:"absolute",left:0,top:0,pointerEvents:"none"}}),ln(_e,{width:bn,height:wn,totalWidth:yn[0],totalHeight:yn[1],margin:vn,showAxes:Ze,title:xe,legend:Se,legendPosition:Ce,legendLayout:Le,legendHoverBehavior:De,legendClickBehavior:je,legendHighlightedCategory:Me,legendIsolatedCategories:Te,foregroundGraphics:R(Hn,W(Nn.current?.customLayoutOverlays,P??null)),annotations:se,onAnnotationActivate:ae,onObservation:oe??ie,chartId:re,chartType:"StreamGeoFrame",autoPlaceAnnotations:ce,svgAnnotationRules:le,pointNodes:Ye(Nn.current?.scene),geoProjection:Nn.current?.scales?.projectedPoint}),fe?.showBadge&&ln(y,{isStale:gi,position:fe.badgePosition}),$&&un("div",{className:"stream-geo-zoom-controls",style:{position:"absolute",bottom:vn.bottom+8,left:vn.left+8,display:"flex",flexDirection:"column",gap:2,zIndex:2},children:[ln("button",{type:"button","aria-label":"Zoom in",onClick:t=>{t.stopPropagation();const e=Jn.current,n=Vn.current;e&&n?.scaleBy&&n.scaleBy(Ne(e),1.5)},style:en,children:"+"}),ln("button",{type:"button","aria-label":"Zoom out",onClick:t=>{t.stopPropagation();const e=Jn.current,n=Vn.current;e&&n?.scaleBy&&n.scaleBy(Ne(e),1/1.5)},style:en,children:"−"})]}),ct&&ln("div",{className:"stream-geo-tile-attribution",style:{position:"absolute",bottom:vn.bottom+2,right:vn.right+4,fontSize:10,color:"rgba(0,0,0,0.6)",background:"rgba(255,255,255,0.7)",padding:"1px 4px",borderRadius:2,pointerEvents:"none",zIndex:2},children:ct}),ln(V,{active:Ti.current>=0,hoverPoint:di,margin:vn,size:yn,shape:Bi.current?.shape,width:Bi.current?.w,height:Bi.current?.h,pathData:Bi.current?.pathData}),Oi]})]})}));hn.displayName="StreamGeoFrame";var dn=hn;import{forwardRef as pn,useMemo as fn}from"react";import{jsx as mn}from"react/jsx-runtime";var gn=pn(function(n,i){const{points:o,areas:r,lines:s,layout:a,layoutConfig:c,onLayoutError:l,projection:u="equirectangular",xAccessor:h="lon",yAccessor:d="lat",lineDataAccessor:p,colorBy:f,colorScheme:m,tooltip:g,annotations:y,margin:v,selection:R,linkedHover:P,onObservation:x,onClick:S,chartId:C,loading:L,loadingContent:A,emptyContent:k,className:D,frameProps:j={}}=n,{frameRef:M,resolved:T,normalizedMargin:B}=t({imperativeRef:i,imperativeVariant:"geo-points",margin:v,width:n.width,height:n.height,enableHover:n.enableHover,title:n.title,description:n.description,summary:n.summary,accessibleTable:n.accessibleTable,mode:n.mode,mobileInteraction:n.mobileInteraction,mobileSemantics:n.mobileSemantics,responsiveRules:n.responsiveRules}),_=fn(()=>lt(o),[o]),I=fn(()=>lt(r),[r]),E=fn(()=>lt(s),[s]),N=fn(()=>[..._,...E,...I],[_,E,I]),F=e({data:N,rawData:void 0!==o||void 0!==s||void 0!==r?N:void 0,colorBy:f,colorScheme:m,legendInteraction:void 0,selection:R,linkedHover:P,fallbackFields:"string"==typeof f?[f]:[],unwrapData:!1,onObservation:x,onClick:S,mobileInteraction:n.mobileInteraction,mobileSemantics:n.mobileSemantics,chartType:"GeoCustomChart",chartId:C,showLegend:!1,userMargin:B,marginDefaults:T.marginDefaults,loading:L,loadingContent:A,emptyContent:k,width:T.width,height:T.height,hasTitle:!!T.title}),O=F.effectiveSelectionHook,W=fn(()=>O?.isActive?{isActive:!0,predicate:O.predicate}:null,[O?.isActive,O?.predicate]);if(F.earlyReturn)return F.earlyReturn;const{width:z,height:H,enableHover:G,title:q,description:Z,summary:X,accessibleTable:Y}=T,Q=mt(g),U={projection:u,...null!=o&&{points:_},...null!=r&&{areas:I},...null!=s&&{lines:E},xAccessor:h,yAccessor:d,...null!=p&&{lineDataAccessor:p},customLayout:a,layoutConfig:c,onLayoutError:l,layoutSelection:W,colorBy:f,colorScheme:m,size:[z,H],responsiveWidth:n.responsiveWidth,responsiveHeight:n.responsiveHeight,margin:F.margin,enableHover:G,...b({title:q,description:Z,summary:X,accessibleTable:Y,className:D,animate:n.animate,maxDevicePixelRatio:n.maxDevicePixelRatio,autoPlaceAnnotations:n.autoPlaceAnnotations}),...!1===g?{tooltipContent:()=>null}:Q?{tooltipContent:Q}:{},...w({linkedHover:P,selection:R,onObservation:x,onClick:S,hoverHighlight:!1,mobileInteraction:F.mobileInteraction,customHoverBehavior:F.customHoverBehavior,customClickBehavior:F.customClickBehavior,linkedHoverInClickPredicate:!1}),...y&&y.length>0&&{annotations:y},...j};return mn(K,{componentName:"GeoCustomChart",width:z,height:H,children:mn(dn,{ref:M,...U})})});gn.displayName="GeoCustomChart";export{dn as StreamGeoFrame_default,gn as GeoCustomChart};
@@ -1 +0,0 @@
1
- function r(r){if(!r)return;const o="boolean"==typeof r?{}:"string"==typeof r?{method:r}:r;return{type:"trend",method:o.method??"linear",...null!=o.bandwidth&&{bandwidth:o.bandwidth},...null!=o.order&&{order:o.order},...null!=o.color&&{color:o.color},...null!=o.strokeWidth&&{strokeWidth:o.strokeWidth},...null!=o.strokeDasharray&&{strokeDasharray:o.strokeDasharray},...null!=o.label&&{label:o.label}}}export{r as buildRegressionAnnotation};
@@ -1 +0,0 @@
1
- import{filterSparseArray as t,resolveOrdinalAxisChrome as e,resolveXYAxisChrome as i}from"./c-VN2HG5BS.min.js";var n=class{constructor(){this._min=1/0,this._max=-1/0,this._dirty=!1}push(t){Number.isFinite(t)&&(this._min>t&&(this._min=t),t>this._max&&(this._max=t))}evict(t){t!==this._min&&t!==this._max||(this._dirty=!0)}recalculate(t,e){this._min=1/0,this._max=-1/0;for(const i of t){const t=e?e(i):i;Number.isFinite(t)&&(this._min>t&&(this._min=t),t>this._max&&(this._max=t))}this._dirty=!1}clear(){this._min=1/0,this._max=-1/0,this._dirty=!1}get extent(){return[this._min,this._max]}get min(){return this._min}get max(){return this._max}get dirty(){return this._dirty}};function r(t){return t===1/0?1/0:Number.isFinite(t)?Math.max(0,Math.floor(t)):5e3}function a(t){return t===1/0?1/0:Number.isFinite(t)?Math.max(1,Math.floor(t)):5e3}var h=class{constructor(t,e){this.lastBoundedData=null,this.chunkTimer=null,this.pushBuffer=[],this.flushScheduled=!1,this.callback=t,this.chunkThreshold=r(e?.chunkThreshold),this.chunkSize=a(e?.chunkSize)}updateChunkOptions(t){this.chunkThreshold=r(t.chunkThreshold),this.chunkSize=a(t.chunkSize)}clearLastData(){this.lastBoundedData=null,this.pushBuffer=[],this.flushScheduled=!1,null!==this.chunkTimer&&(cancelAnimationFrame(this.chunkTimer),this.chunkTimer=null)}setBoundedData(e){if(e=t(e),this.lastBoundedData===e)return;if(this.lastBoundedData=e,null!==this.chunkTimer&&(cancelAnimationFrame(this.chunkTimer),this.chunkTimer=null),this.chunkThreshold>=e.length)return void this.callback({inserts:e,bounded:!0});this.callback({inserts:e.slice(0,this.chunkSize),bounded:!0,totalSize:e.length});let i=this.chunkSize;const n=()=>{if(i>=e.length)return void(this.chunkTimer=null);if(e!==this.lastBoundedData)return void(this.chunkTimer=null);const t=Math.min(i+this.chunkSize,e.length);this.callback({inserts:e.slice(i,t),bounded:!1}),i=t,this.chunkTimer=e.length>i?requestAnimationFrame(n):null};this.chunkTimer=e.length>i?requestAnimationFrame(n):null}setReplacementData(e){if(e=t(e),this.lastBoundedData=e,null!==this.chunkTimer&&(cancelAnimationFrame(this.chunkTimer),this.chunkTimer=null),this.pushBuffer=[],this.flushScheduled=!1,this.chunkThreshold>=e.length)return void this.callback({inserts:e,bounded:!0,preserveCategoryOrder:!0});this.callback({inserts:e.slice(0,this.chunkSize),bounded:!0,preserveCategoryOrder:!0,totalSize:e.length});let i=this.chunkSize;const n=()=>{if(i>=e.length)return void(this.chunkTimer=null);if(e!==this.lastBoundedData)return void(this.chunkTimer=null);const t=Math.min(i+this.chunkSize,e.length);this.callback({inserts:e.slice(i,t),bounded:!1}),i=t,this.chunkTimer=e.length>i?requestAnimationFrame(n):null};this.chunkTimer=e.length>i?requestAnimationFrame(n):null}flushPushBuffer(){if(this.flushScheduled=!1,0===this.pushBuffer.length)return;const t=this.pushBuffer;this.pushBuffer=[],this.callback({inserts:t,bounded:!1})}scheduleFlush(){this.flushScheduled||(this.flushScheduled=!0,queueMicrotask(()=>this.flushPushBuffer()))}push(t){null!=t&&"object"==typeof t&&(this.pushBuffer.push(t),this.scheduleFlush())}pushMany(t){if(0===t.length)return;let e=0;for(let i=0;t.length>i;i++){const n=t[i];null!=n&&"object"==typeof n&&(this.pushBuffer.push(n),e++)}0!==e&&this.scheduleFlush()}flush(){this.flushPushBuffer()}clear(){null!==this.chunkTimer&&(cancelAnimationFrame(this.chunkTimer),this.chunkTimer=null),this.lastBoundedData=null,this.pushBuffer=[],this.flushScheduled=!1}};function s(t,e,i,n){return"string"==typeof t?{key:t,fn:null}:"function"==typeof t?{key:i,fn:t}:"string"==typeof e?{key:e,fn:null}:"function"==typeof e?{key:n,fn:e}:{key:void 0,fn:null}}function o(t,e,i){return n=>{if(!n||!i||!t.fn&&!e.fn)return n;let r=!1;const a=n.map(i=>{const n=t.fn&&t.key&&!(t.key in i),a=e.fn&&e.key&&!(e.key in i);if(!n&&!a)return i;r=!0;const h={...i};return n&&(h[t.key]=t.fn(i)),a&&(h[e.key]=e.fn(i)),h});return r?a:n}}function l(t,e){return t.__legendMarginReservedFor===e}function u(t,e){return{legendLayout:t.legendLayout,axisChrome:i({showAxes:t.showAxes,xLabel:t.xLabel,yLabel:t.yLabel,yLabelRight:t.yLabelRight,axes:t.axes}),legendMarginReserved:l(t,e)}}function c(t,i){return{legendLayout:t.legendLayout,axisChrome:e({showAxes:t.showAxes,projection:t.projection,hasCategoryLabel:!!(t.categoryLabel??t.oLabel),hasValueLabel:!!(t.valueLabel??t.rLabel)}),legendMarginReserved:l(t,i)}}function d(t){return new Set(Array.isArray(t)?t:[t])}function g(t){for(const e of t){if(void 0!==e._targetOpacity){const t=e._targetOpacity;e.style={...e.style||{},opacity:0===t?0:t},e._targetOpacity=void 0}if("point"===e.type)void 0!==e._targetX&&(e.x=e._targetX,e.y=e._targetY,void 0!==e._targetR&&(e.r=e._targetR),e._targetX=void 0,e._targetY=void 0,e._targetR=void 0);else if("glyph"===e.type)void 0!==e._targetX&&(e.x=e._targetX,e.y=e._targetY,void 0!==e._targetR&&(e.size=e._targetR),e._targetX=void 0,e._targetY=void 0,e._targetR=void 0);else if("rect"===e.type||"heatcell"===e.type)void 0!==e._targetX&&(e.x=e._targetX,e.y=e._targetY,e.w=e._targetW,e.h=e._targetH,e._targetX=void 0,e._targetY=void 0,e._targetW=void 0,e._targetH=void 0);else if("candlestick"===e.type)void 0!==e._targetX&&(e.x=e._targetX,void 0!==e._targetOpenY&&(e.openY=e._targetOpenY),void 0!==e._targetCloseY&&(e.closeY=e._targetCloseY),void 0!==e._targetHighY&&(e.highY=e._targetHighY),void 0!==e._targetLowY&&(e.lowY=e._targetLowY),e._targetX=void 0,e._targetOpenY=void 0,e._targetCloseY=void 0,e._targetHighY=void 0,e._targetLowY=void 0);else if("line"===e.type||"area"===e.type){if(e._introClipFraction=void 0,"line"===e.type&&e._targetPath){for(let t=0;e.path.length>t;t++)e.path[t]=e._targetPath[t];e._prevPath=void 0,e._targetPath=void 0}if("area"===e.type){if(e._targetTopPath)for(let t=0;e.topPath.length>t;t++)e.topPath[t]=e._targetTopPath[t];if(e._targetBottomPath)for(let t=0;e.bottomPath.length>t;t++)e.bottomPath[t]=e._targetBottomPath[t];e._prevTopPath=void 0,e._prevBottomPath=void 0,e._targetTopPath=void 0,e._targetBottomPath=void 0}}}}function _(t){for(const e of t){if(void 0!==e._targetOpacity){const t=e._targetOpacity;e.style={...e.style||{},opacity:0===t?0:t},e._targetOpacity=void 0}"point"===e.type?void 0!==e._targetX?(e.x=e._targetX,e.y=e._targetY,void 0!==e._targetR&&(e.r=e._targetR),e._targetX=void 0,e._targetY=void 0,e._targetR=void 0):void 0!==e._targetR&&(e.r=e._targetR,e._targetR=void 0):"rect"===e.type?void 0!==e._targetX&&(e.x=e._targetX,e.y=e._targetY,e.w=e._targetW,e.h=e._targetH,e._targetX=void 0,e._targetY=void 0,e._targetW=void 0,e._targetH=void 0):"wedge"===e.type&&void 0!==e._targetStartAngle&&(e.startAngle=e._targetStartAngle,e.endAngle=e._targetEndAngle,e._targetStartAngle=void 0,e._targetEndAngle=void 0)}}function f(t,e,i){return"exact"===i?function(t,e){const i=t.domain(),n=i[0],r=i[i.length-1],a=n instanceof Date,h=n instanceof Date?n.getTime():n,s=r instanceof Date?r.getTime():r;if(2>e||h===s)return a?[new Date(h),new Date(s)]:[h,s];const o=(s-h)/(e-1),l=Array(e);for(let t=0;e>t;t++){const i=t===e-1?s:h+t*o;l[t]=a?new Date(i):i}return l}(t,e):t.ticks(e)}export{h as DataSourceAdapter,n as IncrementalExtent,d as toIdSet,g as snapXYIntroTargets,_ as snapOrdinalIntroTargets,f as ticksForMode,s as resolveAnnotationAccessor,o as buildEnrichAnnotationData,u as xyFrameLegendOptions,c as ordinalFrameLegendOptions};
@@ -1 +0,0 @@
1
- import{hasPulse as t,renderCirclePulse as e}from"./c-UC5PTTFI.min.js";import{resolveCanvasFill as l}from"./c-QKHMBE2E.min.js";var s=(s,o,r,y)=>{const i=o.filter(t=>"point"===t.type);if(0!==i.length){s.save();try{const o=s.globalAlpha;let r=[],y="";const n=t=>{s.beginPath(),s.arc(t.x,t.y,t.r,0,2*Math.PI),s.globalAlpha=o*(t.style.opacity??t.style.fillOpacity??1),s.fillStyle=l(s,t.style.fill,"#4e79a7"),s.fill();const r=t.style.strokeWidth??1;t.style.stroke&&"none"!==t.style.stroke&&r>0&&(s.strokeStyle=l(s,t.style.stroke,t.style.stroke),s.lineWidth=r,s.stroke()),e(s,t)},a=()=>{if(0===r.length)return;if(1===r.length)return n(r[0]),r=[],void(y="");const t=r[0];s.globalAlpha=o*(t.style.opacity??t.style.fillOpacity??1),s.beginPath();for(const t of r)s.moveTo(t.x+t.r,t.y),s.arc(t.x,t.y,t.r,0,2*Math.PI);s.fillStyle=l(s,t.style.fill,"#4e79a7"),s.fill();const e=t.style.strokeWidth??1;t.style.stroke&&"none"!==t.style.stroke&&e>0&&(s.strokeStyle=l(s,t.style.stroke,t.style.stroke),s.lineWidth=e,s.stroke()),r=[],y=""};for(const e of i){const l=e.style.opacity??e.style.fillOpacity??1,s=e.style.fill;if(t(e)||null!=s&&"string"!=typeof s||1>l){a(),n(e);continue}const o=e.style.strokeWidth??1,i=`${s??"#4e79a7"}\0${e.style.stroke&&"none"!==e.style.stroke&&o>0?e.style.stroke+"":""}\0${o}\0${e.r}\0${l}`;r.length>0&&i!==y&&a(),y=i,r.push(e),2048>r.length||a()}a()}finally{s.restore()}}};export{s as pointCanvasRenderer};