semiotic 3.8.5 → 3.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +37 -10
- package/README.md +83 -56
- package/ai/behaviorContracts.cjs +88 -3
- package/ai/componentMetadata.cjs +5 -10
- package/ai/dist/mcp-server.js +99 -10
- package/ai/examples.md +198 -9
- package/ai/schema.json +2002 -165
- package/ai/surface-manifest.json +14 -10
- package/ai/system-prompt.md +9 -3
- package/dist/{chunk-chartContainerDataAudit-74TLKIP6.module.min.js → chunk-chartContainerDataAudit-JDSVSKGM.module.min.js} +1 -1
- package/dist/chunk-chunk-2JGJ5GUG.module.min.js +1 -0
- package/dist/chunk-chunk-2YAZHXL4.module.min.js +2 -0
- package/dist/chunk-chunk-3NGIKFD6.module.min.js +1 -0
- package/dist/{chunk-chunk-G7WFWHAD.module.min.js → chunk-chunk-4ITOQRXM.module.min.js} +1 -1
- package/dist/chunk-chunk-5SD6BHVW.module.min.js +2 -0
- package/dist/chunk-chunk-6V5VQVCT.module.min.js +2 -0
- package/dist/chunk-chunk-7TTBHSAG.module.min.js +2 -0
- package/dist/chunk-chunk-7ZDJSYKI.module.min.js +2 -0
- package/dist/chunk-chunk-BGHPD3RA.module.min.js +1 -0
- package/dist/chunk-chunk-BMRZ2SPU.module.min.js +2 -0
- package/dist/chunk-chunk-BNGBEY7N.module.min.js +2 -0
- package/dist/chunk-chunk-C7APLVQD.module.min.js +2 -0
- package/dist/chunk-chunk-DGWFBOGB.module.min.js +1 -0
- package/dist/chunk-chunk-DIVE2DRA.module.min.js +2 -0
- package/dist/chunk-chunk-FBUNUIPV.module.min.js +2 -0
- package/dist/chunk-chunk-FQPKOAIH.module.min.js +2 -0
- package/dist/chunk-chunk-FRO4TRXK.module.min.js +2 -0
- package/dist/chunk-chunk-G7QVPZUD.module.min.js +2 -0
- package/dist/chunk-chunk-GBPYV4FP.module.min.js +2 -0
- package/dist/chunk-chunk-GU2EJIDJ.module.min.js +2 -0
- package/dist/chunk-chunk-J5QD4RAM.module.min.js +2 -0
- package/dist/{chunk-chunk-LJLS6DY7.module.min.js → chunk-chunk-JWXLNZSM.module.min.js} +1 -1
- package/dist/chunk-chunk-KXAFCCDB.module.min.js +2 -0
- package/dist/chunk-chunk-LG7YKJAK.module.min.js +2 -0
- package/dist/{chunk-chunk-I36PJ4OC.module.min.js → chunk-chunk-LVHDZAT3.module.min.js} +1 -1
- package/dist/chunk-chunk-LWITSR2O.module.min.js +2 -0
- package/dist/chunk-chunk-MX35T6RX.module.min.js +2 -0
- package/dist/chunk-chunk-NH4MEAKP.module.min.js +2 -0
- package/dist/chunk-chunk-NJETWX42.module.min.js +2 -0
- package/dist/chunk-chunk-NW25WGLS.module.min.js +2 -0
- package/dist/{chunk-chunk-TMWIZL3K.module.min.js → chunk-chunk-OI7R7EJB.module.min.js} +1 -1
- package/dist/chunk-chunk-ONMLEXHR.module.min.js +2 -0
- package/dist/chunk-chunk-OY66GCE6.module.min.js +1 -0
- package/dist/chunk-chunk-PZFT457G.module.min.js +1 -0
- package/dist/chunk-chunk-Q3WW6JGR.module.min.js +1 -0
- package/dist/chunk-chunk-Q6XKQTOQ.module.min.js +1 -0
- package/dist/chunk-chunk-RJRM2E6P.module.min.js +1 -0
- package/dist/chunk-chunk-RPL7WYXI.module.min.js +1 -0
- package/dist/chunk-chunk-SV4XAZ3Q.module.min.js +1 -0
- package/dist/chunk-chunk-TSCFL235.module.min.js +1 -0
- package/dist/chunk-chunk-UOQRPGPK.module.min.js +2 -0
- package/dist/chunk-chunk-V3OAKG32.module.min.js +1 -0
- package/dist/chunk-chunk-WLOIUMWG.module.min.js +2 -0
- package/dist/chunk-chunk-XEGXX4F7.module.min.js +1 -0
- package/dist/chunk-chunk-XFRBLXYM.module.min.js +1 -0
- package/dist/chunk-chunk-Z2AJERX5.module.min.js +2 -0
- package/dist/chunk-chunk-ZXYDYAB7.module.min.js +2 -0
- package/dist/components/ai/SemioticVACPBridge.d.ts +22 -0
- package/dist/components/ai/chartCapabilities.d.ts +5 -3
- package/dist/components/ai/conversationArc.d.ts +2 -176
- package/dist/components/ai/conversationArcTypes.d.ts +202 -0
- package/dist/components/ai/readerGrounding.d.ts +12 -0
- package/dist/components/ai/vacpAdapter.d.ts +13 -0
- package/dist/components/ai/vacpAdapterActions.d.ts +2 -0
- package/dist/components/ai/vacpAdapterModel.d.ts +7 -0
- package/dist/components/ai/vacpAdapterRuntime.d.ts +26 -0
- package/dist/components/ai/vacpAdapterState.d.ts +3 -0
- package/dist/components/ai/vacpAdapterTypes.d.ts +169 -0
- package/dist/components/ai/vacpTypes.d.ts +160 -0
- package/dist/components/charts/custom/XYCustomChart.d.ts +3 -0
- package/dist/components/charts/geo/DistanceCartogram.d.ts +1 -1
- package/dist/components/charts/index.d.ts +7 -4
- package/dist/components/charts/ordinal/BarChart.d.ts +7 -14
- package/dist/components/charts/ordinal/GaugeChart.d.ts +3 -0
- package/dist/components/charts/ordinal/GroupedBarChart.d.ts +3 -0
- package/dist/components/charts/ordinal/StackedBarChart.d.ts +3 -0
- package/dist/components/charts/ordinal/SwimlaneChart.d.ts +4 -14
- package/dist/components/charts/physics/ChainReactionChart.capability.d.ts +9 -0
- package/dist/components/charts/physics/ChainReactionChart.d.ts +29 -0
- package/dist/components/charts/physics/CollisionSwarmChart.d.ts +1 -1
- package/dist/components/charts/physics/EventDropChart.d.ts +7 -2
- package/dist/components/charts/physics/GaltonBoardChart.d.ts +1 -1
- package/dist/components/charts/physics/{PhysicsPileChart.capability.d.ts → PacketFlowChart.capability.d.ts} +1 -1
- package/dist/components/charts/physics/{PhysicalFlowChart.d.ts → PacketFlowChart.d.ts} +22 -6
- package/dist/components/charts/physics/PhysicsCustomChart.d.ts +1 -1
- package/dist/components/charts/physics/ProcessFlowChart.d.ts +7 -4
- package/dist/components/charts/physics/{PhysicalFlowChart.capability.d.ts → UnitPileChart.capability.d.ts} +1 -1
- package/dist/components/charts/physics/{PhysicsPileChart.d.ts → UnitPileChart.d.ts} +19 -6
- package/dist/components/charts/physics/crucibleChartProps.d.ts +1 -1
- package/dist/components/charts/physics/crucibleChartUtils.d.ts +9 -0
- package/dist/components/charts/physics/gauntletChartProps.d.ts +6 -1
- package/dist/components/charts/physics/gauntletTerminal.d.ts +61 -0
- package/dist/components/charts/physics/packetFlowSemantics.d.ts +6 -0
- package/dist/components/charts/physics/physicsHocUtils.d.ts +45 -2
- package/dist/components/charts/shared/auditAccessibilityStyles.d.ts +9 -0
- package/dist/components/charts/shared/chartSpecCore.d.ts +2 -4
- package/dist/components/charts/shared/gaugeGradient.d.ts +4 -8
- package/dist/components/charts/shared/gradient.d.ts +35 -0
- package/dist/components/charts/shared/hatchFill.d.ts +3 -10
- package/dist/components/charts/shared/hooks.d.ts +2 -50
- package/dist/components/charts/shared/knownChartComponents.d.ts +1 -1
- package/dist/components/charts/shared/streamPropsHelpers.d.ts +1 -2
- package/dist/components/charts/shared/useChartLegend.d.ts +65 -0
- package/dist/components/charts/shared/useChartSetup.d.ts +12 -0
- package/dist/components/charts/shared/useCustomChartSetup.d.ts +6 -1
- package/dist/components/charts/shared/useNetworkChartSetup.d.ts +1 -0
- package/dist/components/charts/shared/useStreamingLegend.d.ts +1 -1
- package/dist/components/charts/xy/AreaChart.d.ts +25 -42
- package/dist/components/charts/xy/BumpChart.capability.d.ts +11 -0
- package/dist/components/charts/xy/BumpChart.d.ts +161 -0
- package/dist/components/charts/xy/DifferenceChart.d.ts +3 -10
- package/dist/components/charts/xy/Heatmap.d.ts +3 -0
- package/dist/components/charts/xy/LineChart.d.ts +6 -8
- package/dist/components/data/portability/capabilityBinding.d.ts +41 -0
- package/dist/components/data/portability/index.d.ts +2 -0
- package/dist/components/geometry/bumpRibbonGeometry.d.ts +36 -0
- package/dist/components/legendLayout.d.ts +75 -1
- package/dist/components/recipes/geographicDotGrid.d.ts +82 -0
- package/dist/components/recipes/geographicGrid.d.ts +100 -0
- package/dist/components/recipes/physics.d.ts +2 -0
- package/dist/components/recipes/physicsStageGeography.d.ts +137 -0
- package/dist/components/semiotic-ai.d.ts +6 -4
- package/dist/components/semiotic-experimental-vacp.d.ts +11 -0
- package/dist/components/semiotic-experimental.d.ts +6 -3
- package/dist/components/semiotic-geo.d.ts +5 -0
- package/dist/components/semiotic-network.d.ts +1 -0
- package/dist/components/semiotic-ordinal.d.ts +2 -0
- package/dist/components/semiotic-physics.d.ts +10 -6
- package/dist/components/semiotic-realtime-core.d.ts +1 -0
- package/dist/components/semiotic-recipes-core.d.ts +6 -1
- package/dist/components/semiotic-server-edge.d.ts +1 -1
- package/dist/components/semiotic-server.d.ts +1 -1
- package/dist/components/semiotic-xy.d.ts +4 -0
- package/dist/components/semiotic.d.ts +4 -4
- package/dist/components/server/renderEvidence.d.ts +1 -1
- package/dist/components/server/renderToStaticSVG.d.ts +2 -1
- package/dist/components/server/serverChartConfigHeatmap.d.ts +6 -0
- package/dist/components/server/serverChartConfigNetworkStyles.d.ts +12 -0
- package/dist/components/server/serverChartConfigShared.d.ts +16 -0
- package/dist/components/server/serverChartConfigs.d.ts +3 -2
- package/dist/components/server/serverChartConfigsPhysics.d.ts +2 -2
- package/dist/components/server/serverChartConfigsXY.d.ts +1 -1
- package/dist/components/server/staticLegend.d.ts +10 -2
- package/dist/components/server/staticSVGChrome.d.ts +14 -6
- package/dist/components/server/staticValue.d.ts +8 -0
- package/dist/components/stream/GeoSVGOverlay.d.ts +4 -10
- package/dist/components/stream/NetworkSVGOverlay.d.ts +2 -6
- package/dist/components/stream/OrdinalSVGOverlay.d.ts +2 -6
- package/dist/components/stream/SVGOverlay.d.ts +2 -6
- package/dist/components/stream/StalenessBadge.d.ts +2 -6
- package/dist/components/stream/geoPipelineConfig.d.ts +10 -0
- package/dist/components/stream/geoTypes.d.ts +3 -6
- package/dist/components/stream/legendRenderer.d.ts +10 -6
- package/dist/components/stream/ordinalTypes.d.ts +7 -31
- package/dist/components/stream/physics/PhysicsEvidence.d.ts +37 -0
- package/dist/components/stream/physics/PhysicsKernel.d.ts +1 -0
- package/dist/components/stream/physics/PhysicsPipelineStore.d.ts +9 -0
- package/dist/components/stream/physics/PhysicsSVGOverlay.d.ts +2 -6
- package/dist/components/stream/physics/PhysicsSettledScene.d.ts +5 -0
- package/dist/components/stream/physics/StreamPhysicsTypes.d.ts +2 -6
- package/dist/components/stream/physics/physicsFramePipelineConfig.d.ts +19 -0
- package/dist/components/stream/physics/physicsPipelineSettle.d.ts +52 -0
- package/dist/components/stream/physics/physicsRegionRuntime.d.ts +23 -0
- package/dist/components/stream/pipelineConfig.d.ts +7 -15
- package/dist/components/stream/renderers/canvasRenderHelpers.d.ts +9 -69
- package/dist/components/stream/renderers/cornerRadii.d.ts +2 -9
- package/dist/components/stream/renderers/thresholdLineSegments.d.ts +12 -0
- package/dist/components/stream/sceneToSVGShared.d.ts +3 -5
- package/dist/components/stream/types.d.ts +34 -56
- package/dist/components/stream/xySceneBuilders/areaGradient.d.ts +4 -20
- package/dist/components/stream/xySceneBuilders/types.d.ts +6 -6
- package/dist/components/types/legendTypes.d.ts +31 -6
- package/dist/controls.min.js +1 -1
- package/dist/controls.module.min.js +1 -1
- package/dist/geo.min.js +1 -1
- package/dist/geo.module.min.js +1 -1
- package/dist/network.min.js +1 -1
- package/dist/network.module.min.js +1 -1
- package/dist/ordinal.min.js +1 -1
- package/dist/ordinal.module.min.js +1 -1
- package/dist/physics.min.js +1 -1
- package/dist/physics.module.min.js +1 -1
- package/dist/physicsWorker.js +1 -1
- package/dist/realtime.min.js +1 -1
- package/dist/realtime.module.min.js +1 -1
- package/dist/semiotic-ai-core.min.js +1 -1
- package/dist/semiotic-ai-core.module.min.js +1 -1
- package/dist/semiotic-ai.d.ts +6 -4
- package/dist/semiotic-ai.min.js +1 -1
- package/dist/semiotic-ai.module.min.js +1 -1
- package/dist/semiotic-data.module.min.js +1 -1
- package/dist/semiotic-experimental-vacp.d.ts +11 -0
- package/dist/semiotic-experimental-vacp.min.js +1 -0
- package/dist/semiotic-experimental-vacp.module.min.js +1 -0
- package/dist/semiotic-experimental.d.ts +6 -3
- package/dist/semiotic-experimental.min.js +2 -1
- package/dist/semiotic-experimental.module.min.js +2 -1
- package/dist/semiotic-geo.d.ts +5 -0
- package/dist/semiotic-network.d.ts +1 -0
- package/dist/semiotic-ordinal.d.ts +2 -0
- package/dist/semiotic-physics.d.ts +10 -6
- package/dist/semiotic-realtime-core.d.ts +1 -0
- package/dist/semiotic-realtime-core.min.js +1 -1
- package/dist/semiotic-realtime-core.module.min.js +1 -1
- package/dist/semiotic-recipes-core.d.ts +6 -1
- package/dist/semiotic-recipes-core.min.js +1 -1
- package/dist/semiotic-recipes-core.module.min.js +1 -1
- package/dist/semiotic-recipes.min.js +1 -1
- package/dist/semiotic-recipes.module.min.js +1 -1
- package/dist/semiotic-server-edge.d.ts +1 -1
- package/dist/semiotic-server-edge.min.js +1 -1
- package/dist/semiotic-server-edge.module.min.js +1 -1
- package/dist/semiotic-server-node.min.js +1 -1
- package/dist/semiotic-server-node.module.min.js +1 -1
- package/dist/semiotic-server.d.ts +1 -1
- package/dist/semiotic-utils-core.min.js +1 -1
- package/dist/semiotic-utils-core.module.min.js +1 -1
- package/dist/semiotic-utils.min.js +1 -1
- package/dist/semiotic-utils.module.min.js +1 -1
- package/dist/semiotic-xy.d.ts +4 -0
- package/dist/semiotic.d.ts +4 -4
- package/dist/semiotic.min.js +1 -1
- package/dist/semiotic.module.min.js +1 -1
- package/dist/server.min.js +1 -1
- package/dist/server.module.min.js +1 -1
- package/dist/xy.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- package/package.json +18 -2
- package/spec/README.md +94 -2
- package/spec/bindings/README.md +14 -3
- package/spec/v0.1/examples/annotation-provenance-reviewed-revision.json +27 -0
- package/spec/v0.1/examples/annotation-provenance-watcher-threshold.json +21 -0
- package/spec/v0.1/examples/audience-profile-executive-review.json +24 -0
- package/spec/v0.1/examples/audience-profile-incident-operators.json +42 -0
- package/spec/v0.1/examples/chart-capability-bar-comparison.json +48 -0
- package/spec/v0.1/examples/chart-capability-service-flow.json +54 -0
- package/dist/chunk-chunk-4AANPFOX.module.min.js +0 -2
- package/dist/chunk-chunk-5I3UZV4Q.module.min.js +0 -2
- package/dist/chunk-chunk-5RKXZQ2P.module.min.js +0 -1
- package/dist/chunk-chunk-74CCPVXB.module.min.js +0 -1
- package/dist/chunk-chunk-7ALTGHK6.module.min.js +0 -1
- package/dist/chunk-chunk-ANYDWOZF.module.min.js +0 -1
- package/dist/chunk-chunk-AVBI6GDT.module.min.js +0 -1
- package/dist/chunk-chunk-BANTPINB.module.min.js +0 -2
- package/dist/chunk-chunk-C4YA6TDR.module.min.js +0 -1
- package/dist/chunk-chunk-C57LR3YG.module.min.js +0 -1
- package/dist/chunk-chunk-CKMD5NV3.module.min.js +0 -2
- package/dist/chunk-chunk-CO5KQMGH.module.min.js +0 -1
- package/dist/chunk-chunk-CWQ5YIHX.module.min.js +0 -2
- package/dist/chunk-chunk-E6TXX6MI.module.min.js +0 -1
- package/dist/chunk-chunk-GMQ5AYTD.module.min.js +0 -1
- package/dist/chunk-chunk-JCG72SGW.module.min.js +0 -2
- package/dist/chunk-chunk-K3DMEW22.module.min.js +0 -1
- package/dist/chunk-chunk-KT2VAZMZ.module.min.js +0 -1
- package/dist/chunk-chunk-L6EA5V3G.module.min.js +0 -2
- package/dist/chunk-chunk-LJPCLYSC.module.min.js +0 -2
- package/dist/chunk-chunk-LRIFN2HK.module.min.js +0 -1
- package/dist/chunk-chunk-N5DDKCCF.module.min.js +0 -1
- package/dist/chunk-chunk-NEVE562N.module.min.js +0 -1
- package/dist/chunk-chunk-NLO44TOS.module.min.js +0 -2
- package/dist/chunk-chunk-PZJ2SBLL.module.min.js +0 -2
- package/dist/chunk-chunk-QSQVBIJA.module.min.js +0 -1
- package/dist/chunk-chunk-QUJ6TTLY.module.min.js +0 -1
- package/dist/chunk-chunk-RBIDBUT4.module.min.js +0 -2
- package/dist/chunk-chunk-RCF52Z42.module.min.js +0 -2
- package/dist/chunk-chunk-RFLAG356.module.min.js +0 -1
- package/dist/chunk-chunk-RPU4IZAV.module.min.js +0 -2
- package/dist/chunk-chunk-SKMBCFIL.module.min.js +0 -2
- package/dist/chunk-chunk-TAE7W424.module.min.js +0 -2
- package/dist/chunk-chunk-TUBMTZMU.module.min.js +0 -2
- package/dist/chunk-chunk-UFFEXJQY.module.min.js +0 -1
- package/dist/chunk-chunk-XSCHTS4D.module.min.js +0 -2
- package/dist/chunk-chunk-XXWSHGPL.module.min.js +0 -2
- package/dist/chunk-chunk-ZOAQDIJO.module.min.js +0 -1
- package/dist/chunk-chunk-ZXIXAPRE.module.min.js +0 -2
- package/dist/chunk-statisticalOverlays-QGDLRUHX.module.min.js +0 -1
- package/dist/chunk-statisticalOverlays-T77OKLDY.module.min.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{annotationBudget as t,annotationDensity as e,isNoteAnnotation as n}from"./chunk-chunk-U66USBWU.module.min.js";import{getMinMax as o}from"./chunk-chunk-JJ2OOIET.module.min.js";import{symbol as i,symbolCircle as r,symbolCross as s,symbolDiamond as a,symbolSquare as c,symbolStar as f,symbolTriangle as d,symbolWye as l}from"d3-shape";var u={circle:r,square:c,triangle:d,diamond:a,star:f,cross:s,wye:l},h=["circle","triangle","diamond","star","square","chevron","cross","wye"];function y(t,e,n){if(n)return n;const o=t??"circle";return"chevron"===o?function(t){const e=1.5*m(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):i(u[o]??r,Math.max(1,e))()??""}function m(t){return Math.sqrt(Math.max(1,t)/Math.PI)}var p=new Map;function b(t,e,n){if(!n&&"circle"===(t??"circle"))return m(e);const o=n?"p:"+n:`${t}:${Math.round(e)}`,i=p.get(o);if(null!=i)return i;const r=(n??y(t,e)).match(/-?\d*\.?\d+(?:e-?\d+)?/gi);let s=0;if(r)for(let t=0;r.length>t+1;t+=2){const e=+r[t],n=+r[t+1],o=Math.sqrt(e*e+n*n);o>s&&(s=o)}return s>0||(s=m(e)),p.size>512&&p.clear(),p.set(o,s),s}import*as g from"react";import{jsx as x}from"react/jsx-runtime";var M={isActive:!1,predicate:()=>!0},v=g.createContext(null);function w({value:t,children:e}){return x(v.Provider,{value:t,children:e})}function k(){return g.useContext(v)??M}function S(t,e){return null!=t?x(w,{value:e,children:t}):t}var A=[40,40],I=[.5,.5];function $(t,e){const[n,o]=t.viewBox??A,[i,r]=t.anchor??I,s=o>0?o:1,a=Math.max(0,e)/s,c=(n>0?n:s)*a,f=s*a;return{width:c,height:f,scale:a,offsetX:-i*c,offsetY:-r*f}}function V(t,e){const n=$(t,e),o=[[n.offsetX,n.offsetY],[n.offsetX+n.width,n.offsetY],[n.offsetX,n.offsetY+n.height],[n.offsetX+n.width,n.offsetY+n.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 P(t,e,n,o){if("none"!==t)return"color"===t||null==t?e??o:"accent"===t?n:t}var W=null;function N(t){if("undefined"==typeof Path2D)return null;W||(W=new Map);const e=W.get(t);if(e)return e;const n=new Path2D(t);return W.size>1024&&W.clear(),W.set(t,n),n}function T(t,e,n=0,o="horizontal"){const[i,r]=t.viewBox??A,s=Math.min(1,Math.max(0,n)),a=Math.min(1,Math.max(0,e));return a>s?s>0||1>a?"vertical"===o?{x:0,y:r*(1-a),width:i,height:r*(a-s)}:{x:i*s,y:0,width:i*(a-s),height:r}:null:{x:0,y:0,width:0,height:0}}function j(t,e){const n=$(t,e);return{centerDx:n.offsetX+n.width/2,centerDy:n.offsetY+n.height/2,halfWidth:n.width/2,halfHeight:n.height/2,radius:Math.hypot(n.width,n.height)/2}}function z(t,e,n,o,i,r=t=>t){for(const s of e.parts){const e=N(s.d);if(!e)continue;const a=s.opacity??1,c=t.globalAlpha;1!==a&&(t.globalAlpha=c*a);const f=i?"none"===s.fill?void 0:i:P(s.fill,n,o);f&&(t.fillStyle=r(f),t.fill(e));const d=i?s.stroke&&"none"!==s.stroke?i:void 0:P(s.stroke??"none",n,o);d&&(t.strokeStyle=r(d),t.lineWidth=s.strokeWidth??1,t.lineCap=s.strokeLinecap??"butt",t.lineJoin=s.strokeLinejoin??"miter",t.stroke(e)),1!==a&&(t.globalAlpha=c)}}function C(t,e){const n=e.scales?.x??e.scales?.time;return n?null!=t.x?n(t.x):e.xAccessor&&null!=t[e.xAccessor]?n(t[e.xAccessor]):null:null}function _(t,e){const n=e.scales?.y??e.scales?.value;return n?null!=t.y?n(t.y):e.yAccessor&&null!=t[e.yAccessor]?n(t[e.yAccessor]):null:null}function R(t){return null==t?null:t+""}function D(t,e,n){return e.stickyPositionCache?.set(t,n),n}function F(t,e,n){const o=t.anchor||t.lifecycle?.anchor||"fixed";if("latest"===o){if(null!=t.pointId&&n.pointNodes&&n.pointNodes.length>0)for(let o=n.pointNodes.length-1;o>=0;o--){const i=n.pointNodes[o];if(i.pointId===t.pointId)return D(e,n,{x:i.x,y:i.y})}const o=function(t){const e=t.data;if(!e||0===e.length)return null;const n=e[e.length-1],o=t.scales?.x??t.scales?.time,i=t.scales?.y??t.scales?.value;if(!o||!i)return null;const r=n[t.xAccessor||"x"],s=n[t.yAccessor||"y"];return null==r||null==s?null:{x:o(r),y:i(s)}}(n);return o?D(e,n,o):null}if("semantic"===o){const o=function(t,e,n){const o=function(t){return R(t.provenance?.stableId??t.stableId)}(t);if(!o)return null;const i=n.pointNodes?.find(t=>R(t.pointId)===o);if(i)return D(e,n,{x:i.x,y:i.y});const r=n.data?.find(t=>function(t){return R(t.stableId??t.id??t.provenance?.stableId)}(t)===o);if(!r)return null;const s=C(r,n),a=_(r,n);return null==s||null==a?null:D(e,n,{x:s,y:a})}(t,e,n);if(o)return o}let i=null,r=null;if(null!=t.pointId&&n.pointNodes){const e=n.pointNodes.find(e=>e.pointId===t.pointId);e&&(i=e.x,r=e.y)}if(null!=i&&null!=r||(i=C(t,n),r=_(t,n)),null!=i&&null!=r)return D(e,n,{x:i,y:r});if("sticky"===o){const t=n.stickyPositionCache?.get(e);if(t)return t}return null}function L(t,e,n,o=50){return!(-o>t||t>(n.width||0)+o||-o>e||e>(n.height||0)+o)}var q=32,E=6,O=4,X=8,Y=72;var B={ai:"AI",agent:"agent",watcher:"watcher",system:"system",import:"imported",computed:"computed",user:"you"};function U(t){if(!J(t))return t;const e=("string"==typeof t.mobileText?t.mobileText:void 0)??("string"==typeof t.shortText?t.shortText:void 0);return!e||"string"!=typeof t.label&&null!=t.label?t:{...t,label:e}}function J(t){return n(t)}function G(t,e){if(!t)return[];const n=Math.max(1,Math.floor(e/7)),o=t.split(/\s+/).filter(Boolean),i=[];let r="";for(const t of o)r&&r.length+t.length+1>n?(i.push(r),r=t):r=r?`${r} ${t}`:t;return r&&i.push(r),i}function H(t,e,n,o,i){const r=t+n,s=e+o;return Math.abs(n)>Math.abs(o)?{x:0>n?r-i.width-4:r+4,y:0>o?s-i.height:s,width:i.width,height:i.height}:{x:0>n?r-i.width:r,y:0>o?s-i.height-4:s+4,width:i.width,height:i.height}}function Z(t,e){return{x:t.x-e,y:t.y-e,width:t.width+2*e,height:t.height+2*e}}function K(t,e){return Math.max(0,Math.min(t.x+t.width,e.x+e.width)-Math.max(t.x,e.x))*Math.max(0,Math.min(t.y+t.height,e.y+e.height)-Math.max(t.y,e.y))}function Q(t,e,n,o,i,r,s,a){const c=Z(t,s);let f=.4*Math.hypot(e.dx,e.dy)+80*function(t,e,n,o){const i=Math.max(0,o-t.x),r=Math.max(0,o-t.y);return(i+Math.max(0,t.x+t.width-(e-o)))*t.height+(r+Math.max(0,t.y+t.height-(n-o)))*t.width}(c,i,r,a);for(const t of n)f+=12*K(c,t);for(const t of o)f+=4*K(c,t);return f}function tt(n){const{annotations:o,context:i,defaultOffset:r=q,notePadding:s=E,markPadding:a=O,edgePadding:c=X,preserveManualOffsets:f=!0,routeLongConnectors:d=!0,connectorThreshold:l=Y,density:u,progressiveDisclosure:h=!1,redundantCues:y=!1,responsive:m,mobile:p,cohesion:b,audience:g}=n,x=i.width||0,M=i.height||0,v="object"==typeof p?p:{},w=v.breakpoint??480,k=!!p&&w>=x,S=k&&!1!==v.preferShortText?o.map(U):o,A=k&&!u?{maxAnnotations:v.maxAnnotations??("callout-list"===v.strategy?1:2),minVisible:v.minVisible??1}:u,I=h||k&&(!1!==v.progressiveDisclosure||"callout-list"===v.strategy),$=k&&!m?v.responsive??{minWidth:w}:m,V=k&&!b?v.cohesion:b;if(0===S.length||0>=x||0>=M)return S.slice();const P=[],W=function(t,e){return(t.pointNodes||[]).map(t=>{const n=Math.max(1,t.r||1)+e;return{x:t.x-n,y:t.y-n,width:2*n,height:2*n}})}(i,a);let N=!1;const T=S.map((t,e)=>{if(!J(t))return t;const n=function(t,e,n){if("widget"===t.type&&"number"==typeof t.px&&"number"==typeof t.py)return{x:t.px,y:t.py};const o=t.pointId??t.nodeId;if(null!=o&&n.pointNodes){const t=n.pointNodes.find(t=>t.pointId===o);if(t)return{x:t.x,y:t.y}}const i=t.coordinates,r=n.scales?.geoProjection;if(Array.isArray(i)&&i.length>=2&&r){const t=i[0],e=i[1];if("number"==typeof t&&"number"==typeof e){const n=r([t,e]);if(n&&"number"==typeof n[0]&&"number"==typeof n[1])return{x:n[0],y:n[1]}}}return n.scales||"number"!=typeof t.x||"number"!=typeof t.y?F(t,e,n):{x:t.x,y:t.y}}(t,e,i);if(!n)return t;const o=function(t){if("widget"===t.type)return{width:"number"==typeof t.width?t.width:32,height:"number"==typeof t.height?t.height:32};const e="number"==typeof t.wrap?t.wrap:120,n=[...G("string"==typeof t.title?t.title:void 0,e),...G("string"==typeof t.label?t.label:void 0,e)],o=n.reduce((t,e)=>Math.max(t,e.length),0);return{width:Math.max(24,Math.min(e,7*o)+10),height:Math.max(18,16*n.length+6)}}(t);if(f&&("number"==typeof(a=t).dx||"number"==typeof a.dy)){const e=function(t){return"text"===t.type||"widget"===t.type?{dx:0,dy:0}:{dx:30,dy:-30}}(t);return P.push(Z(H(n.x,n.y,"number"==typeof t.dx?t.dx:e.dx,"number"==typeof t.dy?t.dy:e.dy,o),s)),t}var a;let u=null,h=1/0;for(const t of function(t){const e=1.6*t;return[{dx:t,dy:-t},{dx:-t,dy:-t},{dx:t,dy:t},{dx:-t,dy:t},{dx:t,dy:0},{dx:-t,dy:0},{dx:0,dy:-t},{dx:0,dy:t},{dx:e,dy:-e},{dx:-e,dy:-e},{dx:e,dy:e},{dx:-e,dy:e}]}(r)){const e=Q(H(n.x,n.y,t.dx,t.dy,o),t,P,W,x,M,s,c);h>e&&(u=t,h=e)}if(!u)return t;const y=Z(H(n.x,n.y,u.dx,u.dy,o),s);P.push(y);const m=Math.hypot(u.dx,u.dy),p=d&&m>=l&&"text"!==t.type&&"widget"!==t.type?{...t.connector||{end:"arrow"},type:"curve"}:t.connector;return N=!0,{...t,dx:u.dx,dy:u.dy,...p?{connector:p}:{}}}),j=N?T:S.slice();let z=j;if(y){let t=!1;const e=j.map(e=>{const n=function(t){return"text"!==t.type||"string"!=typeof t.color||8>Math.hypot("number"==typeof t.dx?t.dx:0,"number"==typeof t.dy?t.dy:0)?t:{...t,_redundantConnector:!0}}(e);return n!==e&&(t=!0),n});z=t?e:j}{let t=!1;const e=z.map(e=>{if(!0!==e?.defensive)return e;const n=function(t){const e=t?.provenance;if(!e||"object"!=typeof e)return t;const n="string"==typeof e.source?B[e.source]??e.source:null,o="number"==typeof e.confidence&&Number.isFinite(e.confidence)?Math.round(100*Math.max(0,Math.min(1,e.confidence)))+"%":null;if(!n&&!o)return t;if(null!=t.label&&"string"!=typeof t.label)return t;const i=[n,o].filter(Boolean).join(" · "),r="string"==typeof t.label?t.label:"";return r.includes(`(${i})`)?t:{...t,label:r?`${r} (${i})`:`(${i})`}}(e);return n!==e&&(t=!0),n});z=t?e:z}const C=new Set;if(A){const n="object"==typeof A?A:{},o=function(t){if(!t)return 1;const e=function(t){const e=t?.familiarity;if(!e)return 3;const n=Object.values(e).filter(t=>"number"==typeof t&&Number.isFinite(t));return 0===n.length?3:n.reduce((t,e)=>t+e,0)/n.length}(t);return e>2?4>e?1:.6:1.5}(g),i=1===o?n:{...n,maxAnnotations:Math.max(0,Math.round((n.maxAnnotations??t(x,M,n))*o))},{deferred:r}=e({annotations:z,width:x,height:M,...i});for(const t of r)C.add(t)}if($&&("object"==typeof $&&"number"==typeof $.minWidth?$.minWidth:480)>=x)for(const t of z)J(t)&&"secondary"===t.emphasis&&C.add(t);if(C.size>0)for(const t of z)!0===t?.defensive&&C.delete(t);let _;return _=0===C.size?z:I?z.map(t=>C.has(t)?{...t,_annotationDeferred:!0}:t):z.filter(t=>!C.has(t)),V?function(t,e){let n=!1;const o=t.map(t=>J(t)?"blended"===t.cohesion||"layer"===t.cohesion?t:(n=!0,{...t,cohesion:e}):t);return n?o:t}(_,V):_}function et(t){return[parseInt(t.slice(1,3),16),parseInt(t.slice(3,5),16),parseInt(t.slice(5,7),16)]}function nt(t,e,n){const o=t=>t.toString(16).padStart(2,"0");return`#${o(t)}${o(e)}${o(n)}`}function ot(t){const e=t.map(et),n=e.length-1;return t=>{if(0>=t){const[t,n,o]=e[0];return nt(t,n,o)}if(t>=1){const[t,o,i]=e[n];return nt(t,o,i)}const o=t*n,i=Math.floor(o),r=o-i,[s,a,c]=e[i],[f,d,l]=e[i+1];return nt(Math.round(s+(f-s)*r),Math.round(a+(d-a)*r),Math.round(c+(l-c)*r))}}var it=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],rt=["#4e79a7","#f28e2c","#e15759","#76b7b2","#59a14f","#edc949","#af7aa1","#ff9da7","#9c755f","#bab0ab"],st=["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],at=ot(["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]),ct=ot(["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]),ft=ot(["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]),dt=ot(["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]),lt=ot(["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]),ut=ot(["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]),ht=ot(["#440154","#482878","#3e4989","#31688e","#26828e","#1f9e89","#35b779","#6ece58","#b5de2b","#fde725"]),yt=ot(["#0d0887","#41049d","#6a00a8","#8f0da4","#b12a90","#cb4679","#e16462","#f1844b","#fca636","#fcce25","#f0f921"]),mt=ot(["#000004","#160b39","#420a68","#6a176e","#932667","#bc3754","#dd513a","#f3771a","#fca50a","#f6d746","#fcffa4"]),pt=ot(["#000004","#140e36","#3b0f70","#641a80","#8c2981","#b73779","#de4968","#f7705c","#fe9f6d","#fecf92","#fcfdbf"]),bt=ot(["#00224e","#123570","#3b496c","#575d6d","#707173","#8a8678","#a59c74","#c3b369","#e1cc55","#fee838","#ffea46"]),gt=ot(["#23171b","#4a58dd","#3f9ee9","#46c7af","#7eed5a","#cdf134","#fbb91f","#f56918","#c52f06","#7a0403"]),xt={blues:at,reds:ct,greens:ft,viridis:ht,oranges:dt,purples:lt,greys:ut,plasma:yt,inferno:mt,magma:pt,cividis:bt,turbo:gt};function Mt(t){return t&&xt[t]||at}var vt=ot(["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]),wt=ot(["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]),kt=ot(["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]),St=ot(["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]),At=ot(["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]),It=ot(["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]),$t=ot(["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]),Vt={data:"data",domain:"domain",layout:"layout","scene-geometry":"sceneGeometry","scene-style":"sceneStyle","data-paint":"dataPaint","interaction-paint":"interactionPaint",overlay:"overlay",accessibility:"accessibility",evidence:"evidence"};function Pt(t,e){const n={...t};for(const t of e)n[Vt[t]]++;return n}function Wt(t,e,n){const o=new Set(e);return{changeSet:{...t,...t.keys?{keys:[...t.keys]}:{}},changed:o,revisions:Pt(n,o)}}var Nt=class{constructor(){this.revisions={data:0,domain:0,layout:0,sceneGeometry:0,sceneStyle:0,dataPaint:0,interactionPaint:0,overlay:0,accessibility:0,evidence:0},this.latest=Wt({kind:"initialize"},[],this.revisions),this.listeners=new Set}get last(){return this.latest}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}record(t,e){const n=Wt(t,e,this.revisions);this.revisions=n.revisions,this.latest=n;for(const t of[...this.listeners])t();return n}},Tt=()=>"undefined"!=typeof performance?performance.now():Date.now();function jt(t){let e=t>>>0;return()=>{e+=1831565813;let t=e;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296}}function zt(t,e){const n=t();return Number.isFinite(n)?n:e}var Ct=class{constructor(t={}){this.randomSource=Math.random,this.subscribers=new Set,this.now=()=>this.advance(),this.random=()=>this.randomSource(),this.clock=t.clock??Tt,this.lastWallTime=zt(this.clock,0),this.logicalTime=this.lastWallTime,this.pausedValue=!0===t.paused,this.visibleValue=!1!==t.visible,this.setRandomSource(t.random,t.seed)}get isActive(){return!this.pausedValue&&this.visibleValue}get paused(){return this.pausedValue}get seed(){return this.seedValue}get visible(){return this.visibleValue}configure(t){this.setClock(t.clock),this.setRandomSource(t.random,t.seed)}setPaused(t){this.pausedValue!==t&&(this.advance(),this.pausedValue=t,this.emit())}setVisible(t){this.visibleValue!==t&&(this.advance(),this.visibleValue=t,this.emit())}snapshot(){return{now:this.now(),paused:this.pausedValue,seed:this.seedValue,visible:this.visibleValue}}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}advance(){const t=zt(this.clock,this.lastWallTime),e=Math.max(0,t-this.lastWallTime);return this.lastWallTime=t,this.isActive&&(this.logicalTime+=e),this.logicalTime}emit(){for(const t of this.subscribers)t()}setClock(t){const e=t??Tt;e!==this.clock&&(this.advance(),this.clock=e,this.lastWallTime=zt(e,this.lastWallTime))}setRandomSource(t,e){const n=function(t){return"number"==typeof t&&Number.isFinite(t)?Math.trunc(t):void 0}(e);t===this.randomInput&&n===this.seedValue||(this.randomInput=t,this.seedValue=n,this.randomSource=t??(void 0===n?Math.random:jt(n)))}};import{forceSimulation as _t,forceCenter as Rt,forceX as Dt,forceY as Ft,forceLink as Lt,forceManyBody as qt,forceCollide as Et}from"d3-force";import{scaleLinear as Ot}from"d3-scale";var Xt=new Set,Yt=new WeakMap;function Bt(t,e){if("production"===process.env.NODE_ENV)return t;if(!t||!t.data||"object"!=typeof t.data)return t;let n=Yt.get(t);if(n){const t=n.get(e);if(t)return t}else n=new Map,Yt.set(t,n);const o=new Proxy(t,{get(t,n,o){if("string"==typeof n&&!(n in t)&&t.data&&n in t.data){const t=`${e}:${n}`;Xt.has(t)||(Xt.add(t),console.warn(`[Semiotic] "${e}" callback accessed "${n}" on the wrapper object, but it only exists on ".data". Use d.data.${n} (or d.data?.${n}) instead. Frame callbacks receive RealtimeNode/RealtimeEdge wrappers, not your raw data.`))}return Reflect.get(t,n,o)}});return n.set(e,o),o}var Ut={supportsStreaming:!0,hierarchical:!1,computeLayout(t,e,n,o){if(0===t.length)return;const i=n.forceStrength??.1,r=o[0]/2,s=o[1]/2,a=Math.max(.1,Math.min(1,Math.min(o[0],o[1])/200)),c=Math.min(.5,.06+1.8*(1-a)),f=n.__previousPositions;let d=0;const l=[];for(const e of t){const t=null!=e.x&&null!=e.y&&(0!==e.x||0!==e.y),n=f?.get(e.id);t?d++:n?(e.x=n.x,e.y=n.y,d++):l.push(e)}const u=d>0&&.3>=(t.length>0?l.length/t.length:1);if(u){const n=new Map;for(const e of t)n.set(e.id,e);for(const t of l){const o=Jt(t.id,e,n);if(o.length>0){let e=0,n=0;for(const t of o)e+=t.x,n+=t.y;const i=Gt(t.id),r=i%360*(Math.PI/180),s=(10+i%20)*a;t.x=e/o.length+s*Math.cos(r),t.y=n/o.length+s*Math.sin(r)}else{const e=Gt(t.id),n=e%360*(Math.PI/180),o=(15+e%30)*a;t.x=r+o*Math.cos(n),t.y=s+o*Math.sin(n)}}}else{const e=2.399963229728653;for(let n=0;t.length>n;n++){const o=t[n];if(null==o.x||null==o.y||0===o.x&&0===o.y){const t=10*Math.sqrt(n+.5)*a,i=n*e;o.x=r+t*Math.cos(i),o.y=s+t*Math.sin(i)}}}const h=n.__skipForceSimulation||0===n.iterations?0:u?40:n.iterations??Math.max(50,Math.min(300,Math.floor(300-2*(t.length-30)))),y=Ht(n.nodeSize,n.nodeSizeRange,t),m=t=>y(t);if(h>0){const f=new Map,d=new Map;for(const e of t)f.set(e.id,0),d.set(e.id,e);for(const t of e){const e="string"==typeof t.source?t.source:t.source.id,n="string"==typeof t.target?t.target:t.target.id;f.set(e,(f.get(e)??0)+1),f.set(n,(f.get(n)??0)+1)}const l=Lt().strength(t=>{const e=t.weight,n="string"==typeof t.target?t.target:t.target.id,o=Math.max(1,Math.min(f.get("string"==typeof t.source?t.source:t.source.id)??1,f.get(n)??1));return Math.min(2.5,(e&&e>0?Math.sqrt(e):1)*i/(.1*o))}).distance(t=>{const e="string"==typeof t.source?d.get(t.source):t.source,n="string"==typeof t.target?d.get(t.target):t.target,o=(e?m(e):0)+(n?m(n):0)+Math.max(6,12*a);return Math.max(16,40*a,o)}).id(t=>t.id),y=_t();if(void 0===n.random&&void 0===n.seed||y.randomSource(n.random??jt(n.seed)),y.force("charge",qt().strength(t=>{const e=f.get(t.id)??0;return-15*a*m(t)*Math.sqrt(e+1)})).force("collide",Et(t=>m(t)+3*a).strength(.9).iterations(2)).force("center",Rt(r,s).strength(.8)).force("x",Dt(r).strength(c)).force("y",Ft(s).strength(c)).force("bounds",function(t,e,n=2,o=.6){let i=[];const r=r=>{const s=o*Math.max(r,.2);for(const o of i){const i=o.x??t[0]/2,r=o.y??t[1]/2,a=o.vx??0,c=o.vy??0,f=e(o)+n,d=Math.min(t[0]/2,f),l=Math.max(t[0]/2,t[0]-f),u=Math.min(t[1]/2,f),h=Math.max(t[1]/2,t[1]-f),y=i+a,m=r+c;d>y?o.vx=a+(d-y)*s:y>l&&(o.vx=a+(l-y)*s),u>m?o.vy=c+(u-m)*s:m>h&&(o.vy=c+(h-m)*s)}};return r.initialize=t=>{i=t},r}(o,m)),y.nodes(t),e.length>0){const t=e.map(t=>({...t,source:"string"==typeof t.source?t.source:t.source.id,target:"string"==typeof t.target?t.target:t.target.id}));l.links(t),y.force("link",l)}u?y.alpha(.3):.1>y.alpha()&&y.alpha(1),y.stop();for(let t=0;h>t;++t)y.tick()}for(const e of t){if(null==e.x||null==e.y)continue;const t=m(e),n=h>0?2:0,i=Math.min(o[0]/2,t+n),r=Math.min(o[1]/2,t+n);e.x=Math.max(i,Math.min(o[0]-i,e.x)),e.y=Math.max(r,Math.min(o[1]-r,e.y)),e.x0=0,e.x1=0,e.y0=0,e.y1=0}const p=new Map;for(const e of t)p.set(e.id,e);for(const t of e){if("string"==typeof t.source){const e=p.get(t.source);e&&(t.source=e)}if("string"==typeof t.target){const e=p.get(t.target);e&&(t.target=e)}}},buildScene(t,e,n,o){const i=n.nodeStyle,r=n.edgeStyle,s=Ht(n.nodeSize,n.nodeSizeRange,t),a=Array.isArray(n.colorScheme)?n.colorScheme:n.themeCategorical&&n.themeCategorical.length>0?n.themeCategorical:it,c=new Map;t.forEach((t,e)=>{c.set(t.id,a[e%a.length])});const f=[],d=[],l=[];for(const e of t){if(null==e.x||null==e.y)continue;const t=s(Bt(e,"nodeSize")),o=i?i(Bt(e,"nodeStyle")):{},r={fill:o.fill||c.get(e.id)||n.themeSemantic?.primary||"#007bff",stroke:o.stroke||n.themeSemantic?.surface||"#fff",strokeWidth:o.strokeWidth??2,opacity:o.opacity};f.push({type:"circle",cx:e.x,cy:e.y,r:t,style:r,datum:e,id:e.id,label:e.id})}const u=new Map;for(const e of t)u.set(e.id,e);for(const t of e){const e="object"==typeof t.source?t.source:u.get(t.source),o="object"==typeof t.target?t.target:u.get(t.target);if(!e||!o)continue;if(null==e.x||null==e.y)continue;if(null==o.x||null==o.y)continue;const i=r?r(Bt(t,"edgeStyle")):{};d.push({type:"line",x1:e.x,y1:e.y,x2:o.x,y2:o.y,style:{stroke:i.stroke||n.themeSemantic?.border||n.themeSemantic?.secondary||"#999",strokeWidth:i.strokeWidth??1,opacity:i.opacity??.6},datum:t})}if(!1!==n.showLabels){const e=(h=n.nodeLabel)?"function"==typeof h?h:t=>t[h]||t.id:null;for(const n of t){if(null==n.x||null==n.y)continue;const t=e?e(n):n.id;if(!t)continue;const o=s(Bt(n,"nodeSize"));l.push({x:n.x,y:n.y-o-4,text:t+"",anchor:"middle",baseline:"auto",fontSize:11})}}var h;return{sceneNodes:f,sceneEdges:d,labels:l}}};function Jt(t,e,n){const o=[];for(const i of e){const e="string"==typeof i.source?i.source:i.source.id,r="string"==typeof i.target?i.target:i.target.id;let s=null;if(e===t?s=r:r===t&&(s=e),s){const t=n.get(s);!t||0===t.x&&0===t.y||o.push({x:t.x,y:t.y})}}return o}function Gt(t){let e=0;for(let n=0;t.length>n;n++)e=(e<<5)-e+t.charCodeAt(n)|0;return Math.abs(e)}function Ht(t,e,n){if(n.some(t=>null!=t.__forceRadius))return t=>t.__forceRadius??8;if(null==t)return()=>8;if("number"==typeof t)return()=>t;if("function"==typeof t)return e=>t(e)||8;const i=e||[5,20],r=[];for(const e of n){const n=e.data?.[t];"number"==typeof n&&r.push(n)}if(0===r.length)return()=>i[0];const[s,a]=o(r);if(s===a)return()=>(i[0]+i[1])/2;const c=Ot().domain([s,a]).range(i).clamp(!0);return e=>{const n=e.data?.[t];return null==n||"number"!=typeof n?i[0]:c(n)}}export{it as schemeCategory10,rt as schemeTableau10,st as schemeSet3,ht as interpolateViridis,xt as SEQUENTIAL_INTERPOLATORS,Mt as getSequentialInterpolator,vt as interpolateRdBu,wt as interpolatePiYG,kt as interpolatePRGn,St as interpolateBrBG,At as interpolateRdYlBu,It as interpolateRdYlGn,$t as interpolateSpectral,h as SYMBOL_SEQUENCE,y as symbolPathString,m as symbolRadius,b as symbolExtent,Nt as UpdateResultTracker,w as CustomLayoutSelectionProvider,k as useCustomLayoutSelection,S as wrapWithCustomLayoutSelection,A as DEFAULT_GLYPH_VIEWBOX,I as DEFAULT_GLYPH_ANCHOR,$ as glyphPlacement,V as glyphExtent,P as resolveGlyphPaint,T as glyphFractionClipRect,j as glyphHitGeometry,z as drawGlyphParts,C as resolveX,_ as resolveY,F as resolveAnchoredPosition,L as isInBounds,tt as annotationLayout,Ct as FrameRuntime,Bt as wrapWithDataHint,Ut as forceLayoutPlugin,Ht as resolveNodeSizeFn};
|