semiotic 3.12.0 → 3.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -46
- package/ai/artifact-surface-inventory.json +1 -1
- package/ai/behaviorContracts.cjs +1 -1
- package/ai/dist/diagnose-operation.js +3 -3
- package/ai/dist/mcp-server.js +1 -1
- package/ai/reference.md +15 -3
- package/ai/schema.json +908 -96
- package/ai/surface-manifest.json +1 -1
- package/ai/task-packets/compare-category-totals.json +5 -5
- package/ai/task-packets/compare-category-totals.md +2 -2
- package/ai/task-packets/correct-published-chart.json +5 -5
- package/ai/task-packets/correct-published-chart.md +2 -2
- package/ai/task-packets/index.json +6 -6
- package/ai/task-packets/update-live-chart.json +5 -5
- package/ai/task-packets/update-live-chart.md +2 -2
- package/dist/c-27DCB5T6.min.js +7 -7
- package/dist/c-2CKIGFD2.min.js +1 -1
- package/dist/c-3FATLOH4.min.js +1 -0
- package/dist/{c-STVM6CBI.min.js → c-4SCJKAWZ.min.js} +200 -200
- package/dist/c-5FUOKMH6.min.js +7 -0
- package/dist/c-AAIPWVQ5.min.js +6 -6
- package/dist/{c-2RG4WOVX.min.js → c-ALLF3Y77.min.js} +1 -1
- package/dist/{c-QMKQVCCZ.min.js → c-C5GXUHUO.min.js} +6 -6
- package/dist/c-C67QDKTU.min.js +34 -0
- package/dist/c-F76M77YC.min.js +1 -0
- package/dist/c-FEVXPKQH.min.js +1 -1
- package/dist/c-G42WVQO2.min.js +1 -0
- package/dist/c-G5A3YWTN.min.js +66 -0
- package/dist/c-H4HVKBU3.min.js +1 -0
- package/dist/c-HU3ASFKT.min.js +1 -0
- package/dist/c-I4FYCVJB.min.js +391 -0
- package/dist/{c-5L7JGWQW.min.js → c-IATPZOL7.min.js} +28 -28
- package/dist/c-IE5EBBP6.min.js +110 -0
- package/dist/c-IGONIKZL.min.js +1 -0
- package/dist/c-IKPM53JH.min.js +1 -0
- package/dist/c-IU4QZ7Y5.min.js +1 -1
- package/dist/{c-2ACLVPKF.min.js → c-K5VE57OI.min.js} +1 -1
- package/dist/c-KWJIBJ4R.min.js +1 -0
- package/dist/c-LIMFU6RD.min.js +1 -0
- package/dist/c-M4T43G76.min.js +1 -0
- package/dist/c-M7QUZZCE.min.js +1 -1
- package/dist/c-NVSINXE5.min.js +1 -0
- package/dist/{c-FAF6EV4E.min.js → c-NWRYV6ZF.min.js} +1 -1
- package/dist/c-O5GU2R5W.min.js +1 -0
- package/dist/c-OC7GNXGZ.min.js +1 -0
- package/dist/c-OV5F3DQP.min.js +1 -0
- package/dist/{c-5TAXHW7I.min.js → c-PJ5CAYAW.min.js} +1 -1
- package/dist/c-Q5LZRQGD.min.js +1 -0
- package/dist/c-QP3PXK3N.min.js +1 -0
- package/dist/c-SGZ7ZD2I.min.js +51 -0
- package/dist/c-SSKV5JPW.min.js +1 -1
- package/dist/c-THWTHWXU.min.js +37 -0
- package/dist/c-TRMNDRC4.min.js +41 -0
- package/dist/c-UP656CST.min.js +1 -1
- package/dist/c-USYOK5OX.min.js +1 -0
- package/dist/c-VI753KBO.min.js +1 -0
- package/dist/{c-TT4CTEBR.min.js → c-VLAAAFST.min.js} +1 -1
- package/dist/c-VSOQPII4.min.js +5 -5
- package/dist/c-WGDM4ZRP.min.js +26 -0
- package/dist/c-XCV7VUU3.min.js +87 -0
- package/dist/c-XGDZPYBI.min.js +1 -0
- package/dist/c-XI6CLZII.min.js +1 -0
- package/dist/{c-L4Q2YMXO.min.js → c-XLC7PKM7.min.js} +1 -1
- package/dist/{c-3YAGKCPU.min.js → c-YEB6Z35F.min.js} +1 -1
- package/dist/c-YWZBFG63.min.js +1 -0
- package/dist/c-ZMYO3NZU.min.js +2 -0
- package/dist/c-ZO36H5VH.min.js +48 -0
- package/dist/components/LinkedCharts.d.ts +6 -1
- package/dist/components/Tooltip/Tooltip.d.ts +11 -1
- package/dist/components/Tooltip/tooltipChrome.d.ts +8 -2
- package/dist/components/bundling/semioticVite.d.ts +24 -0
- package/dist/components/charts/physics/cruciblePhysics.d.ts +2 -2
- package/dist/components/charts/physics/gauntletPhysics.d.ts +2 -6
- package/dist/components/charts/physics/physicsHocUtils.d.ts +8 -1
- package/dist/components/charts/realtime/RealtimeHistogram.d.ts +2 -0
- package/dist/components/charts/shared/chartSize.d.ts +58 -0
- package/dist/components/charts/shared/chartSizeDefaults.d.ts +189 -0
- package/dist/components/charts/shared/chartSizeDefaultsAtlas.d.ts +9 -0
- package/dist/components/charts/shared/chartSizeDefaultsNetwork.d.ts +29 -0
- package/dist/components/charts/shared/chartSizeDefaultsOrdinal.d.ts +13 -0
- package/dist/components/charts/shared/chartSizeDefaultsPhysics.d.ts +41 -0
- package/dist/components/charts/shared/chartSizeDefaultsValue.d.ts +19 -0
- package/dist/components/charts/shared/chartSizeDefaultsXY.d.ts +10 -0
- package/dist/components/charts/shared/networkPerspectiveWireSchema.d.ts +3 -0
- package/dist/components/charts/shared/useChartSetup.d.ts +3 -0
- package/dist/components/charts/shared/useCustomChartSetup.d.ts +4 -0
- package/dist/components/charts/shared/useNetworkChartSetup.d.ts +2 -0
- package/dist/components/charts/shared/withChartWrapper.d.ts +6 -2
- package/dist/components/charts/value/BigNumber.d.ts +0 -8
- package/dist/components/charts/xy/minimapLayout.d.ts +10 -0
- package/dist/components/realtime/BinAccumulator.d.ts +5 -2
- package/dist/components/recipes/atlas/dependencyForestChartProps.d.ts +4 -4
- package/dist/components/recipes/atlas/flowCircuitChartProps.d.ts +177 -1
- package/dist/components/recipes/atlas/flowCircuitLayout.d.ts +3 -0
- package/dist/components/recipes/atlas/motifBraidChartProps.d.ts +2 -0
- package/dist/components/recipes/atlas/resolution/BoundaryLoomChart.d.ts +3 -0
- package/dist/components/recipes/atlas/resolution/ComponentCutaway.d.ts +16 -0
- package/dist/components/recipes/atlas/resolution/ResolutionAtlasChart.d.ts +3 -0
- package/dist/components/recipes/atlas/resolution/ResolutionGlyphs.d.ts +15 -0
- package/dist/components/recipes/atlas/resolution/ResolutionReader.d.ts +5 -0
- package/dist/components/recipes/atlas/resolution/appearance.d.ts +58 -0
- package/dist/components/recipes/atlas/resolution/boundaryLoomLayout.d.ts +4 -0
- package/dist/components/recipes/atlas/resolution/chartProps.d.ts +75 -0
- package/dist/components/recipes/atlas/resolution/componentCutawayLayout.d.ts +12 -0
- package/dist/components/recipes/atlas/resolution/cutawayContext.d.ts +23 -0
- package/dist/components/recipes/atlas/resolution/cutawayGraph.d.ts +4 -0
- package/dist/components/recipes/atlas/resolution/cycles.d.ts +7 -0
- package/dist/components/recipes/atlas/resolution/evidence.d.ts +43 -0
- package/dist/components/recipes/atlas/resolution/glyphs.d.ts +40 -0
- package/dist/components/recipes/atlas/resolution/identity.d.ts +4 -0
- package/dist/components/recipes/atlas/resolution/indexGraph.d.ts +32 -0
- package/dist/components/recipes/atlas/resolution/ownership.d.ts +25 -0
- package/dist/components/recipes/atlas/resolution/plan.d.ts +12 -0
- package/dist/components/recipes/atlas/resolution/ports.d.ts +44 -0
- package/dist/components/recipes/atlas/resolution/prepare.d.ts +4 -0
- package/dist/components/recipes/atlas/resolution/project.d.ts +70 -0
- package/dist/components/recipes/atlas/resolution/queries.d.ts +23 -0
- package/dist/components/recipes/atlas/resolution/resolutionAtlasLayout.d.ts +9 -0
- package/dist/components/recipes/atlas/resolution/rules.d.ts +14 -0
- package/dist/components/recipes/atlas/resolution/scene.d.ts +52 -0
- package/dist/components/recipes/atlas/resolution/selection.d.ts +3 -0
- package/dist/components/recipes/atlas/resolution/sets.d.ts +10 -0
- package/dist/components/recipes/atlas/resolution/types.d.ts +401 -0
- package/dist/components/recipes/atlas/resolution/validate.d.ts +4 -0
- package/dist/components/recipes/atlas/resolution/witnesses.d.ts +18 -0
- package/dist/components/recipes/atlas/resolution/worker.d.ts +34 -0
- package/dist/components/recipes/lineageDag.d.ts +4 -0
- package/dist/components/recipes/recipeUtils.d.ts +2 -0
- package/dist/components/recipes/transitDiagram.d.ts +2 -61
- package/dist/components/recipes/transitDiagramTypes.d.ts +65 -0
- package/dist/components/semiotic-ai.d.ts +2 -0
- package/dist/components/semiotic-experimental-network-resolution-react.d.ts +12 -0
- package/dist/components/semiotic-experimental-network-resolution.d.ts +13 -0
- package/dist/components/semiotic-geo.d.ts +1 -1
- package/dist/components/semiotic-network-perspective-core.d.ts +6 -0
- package/dist/components/semiotic-network.d.ts +1 -1
- package/dist/components/semiotic-ordinal.d.ts +1 -1
- package/dist/components/semiotic-physics.d.ts +1 -1
- package/dist/components/semiotic-realtime-core.d.ts +1 -1
- package/dist/components/semiotic-realtime-react.d.ts +2 -0
- package/dist/components/semiotic-utils-core.d.ts +3 -1
- package/dist/components/semiotic-vite.d.ts +2 -0
- package/dist/components/semiotic-xy.d.ts +3 -1
- package/dist/components/semiotic.d.ts +3 -1
- package/dist/components/server/renderToStaticSVG.d.ts +2 -1
- package/dist/components/server/serverChartConfigShared.d.ts +2 -0
- package/dist/components/store/LinkedCrosshairStore.d.ts +43 -11
- package/dist/components/store/themeCore.d.ts +2 -0
- package/dist/components/stream/frameKeyboardNavigation.d.ts +3 -1
- package/dist/components/stream/hoverUtils.d.ts +5 -0
- package/dist/components/stream/networkCustomLayout.d.ts +3 -0
- package/dist/components/stream/networkPerspective.d.ts +2 -0
- package/dist/components/stream/networkPerspectiveFit.d.ts +12 -1
- package/dist/components/stream/networkPerspectiveSolid.d.ts +1 -1
- package/dist/components/stream/networkSceneTypes.d.ts +4 -0
- package/dist/components/stream/networkTypes.d.ts +2 -0
- package/dist/components/stream/pipelineConfig.d.ts +2 -0
- package/dist/components/stream/pipelineDomainResolution.d.ts +4 -1
- package/dist/components/stream/types.d.ts +2 -0
- package/dist/components/stream/useFrame.d.ts +2 -0
- package/dist/components/stream/xySceneBuilders/types.d.ts +2 -0
- package/dist/controls.module.min.js +31 -31
- package/dist/geo.min.js +150 -150
- package/dist/geo.module.min.js +31 -31
- package/dist/network.module.min.js +1 -1
- package/dist/ordinal.module.min.js +1 -1
- package/dist/physics.module.min.js +1 -1
- package/dist/rough.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 +2 -0
- package/dist/semiotic-ai.module.min.js +13 -13
- package/dist/semiotic-artifact-react.module.min.js +4 -4
- package/dist/semiotic-artifact.min.js +1 -1
- package/dist/semiotic-artifact.module.min.js +1 -1
- package/dist/semiotic-atlas-selection.module.min.js +1 -1
- package/dist/semiotic-atlas.module.min.js +10 -12
- package/dist/semiotic-client-cjs-shared.min.js +1078 -925
- package/dist/semiotic-client-glyph.module.min.js +2 -2
- package/dist/semiotic-client-shared.module.min.js +1 -1
- package/dist/semiotic-experimental-auxiliary.module.min.js +8 -9
- package/dist/semiotic-experimental-network-resolution-react.d.ts +12 -0
- package/dist/semiotic-experimental-network-resolution-react.min.js +2 -0
- package/dist/semiotic-experimental-network-resolution-react.module.min.js +89 -0
- package/dist/semiotic-experimental-network-resolution.d.ts +13 -0
- package/dist/semiotic-experimental-network-resolution.min.js +2 -0
- package/dist/semiotic-experimental-network-resolution.module.min.js +2 -0
- package/dist/semiotic-experimental-node-auxiliary.module.min.js +9 -10
- package/dist/semiotic-geo.d.ts +1 -1
- package/dist/semiotic-line.module.min.js +1 -1
- package/dist/semiotic-network-perspective-core.d.ts +6 -0
- package/dist/semiotic-network-perspective-core.min.js +1 -0
- package/dist/semiotic-network-perspective-core.module.min.js +1 -0
- package/dist/semiotic-network-perspective.module.min.js +1 -1
- package/dist/semiotic-network-placement.min.js +4 -0
- package/dist/semiotic-network-placement.module.min.js +4 -0
- package/dist/semiotic-network-zoom.module.min.js +1 -1
- package/dist/semiotic-network.d.ts +1 -1
- package/dist/semiotic-ordinal.d.ts +1 -1
- package/dist/semiotic-physics.d.ts +1 -1
- package/dist/semiotic-realtime-core.d.ts +1 -1
- package/dist/semiotic-realtime-core.module.min.js +1 -1
- package/dist/semiotic-realtime-react.d.ts +2 -0
- package/dist/semiotic-realtime-react.module.min.js +1 -1
- package/dist/semiotic-recipes-core-cjs-base.min.js +101 -106
- package/dist/semiotic-recipes-core.module.min.js +75 -76
- package/dist/semiotic-server-edge-node.module.min.js +391 -392
- package/dist/semiotic-server-edge.min.js +387 -388
- package/dist/semiotic-server-edge.module.min.js +371 -371
- package/dist/semiotic-server-node.min.js +387 -388
- package/dist/semiotic-server-node.module.min.js +1 -1
- package/dist/semiotic-utils-core.d.ts +3 -1
- package/dist/semiotic-utils-core.min.js +12 -11
- package/dist/semiotic-utils-core.module.min.js +12 -11
- package/dist/semiotic-value.module.min.js +4 -4
- package/dist/semiotic-vite.d.ts +2 -0
- package/dist/semiotic-vite.min.js +1 -0
- package/dist/semiotic-vite.module.min.js +1 -0
- package/dist/semiotic-xy.d.ts +3 -1
- package/dist/semiotic.d.ts +3 -1
- package/dist/semiotic.module.min.js +12 -12
- package/dist/server.min.js +387 -388
- package/dist/server.module.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- package/package.json +42 -13
- package/dist/c-2AB65V3L.min.js +0 -1
- package/dist/c-2U5JMOPN.min.js +0 -88
- package/dist/c-3DCTIRW4.min.js +0 -1
- package/dist/c-3OKFRTYM.min.js +0 -1
- package/dist/c-3VZHOPFW.min.js +0 -1
- package/dist/c-4ZSQIBC7.min.js +0 -1
- package/dist/c-5M4RUS7V.min.js +0 -34
- package/dist/c-6O5WWP7F.min.js +0 -1
- package/dist/c-73TOIYIW.min.js +0 -48
- package/dist/c-AE4M7BWH.min.js +0 -1
- package/dist/c-AEIK2NFW.min.js +0 -30
- package/dist/c-AFQSEIZ4.min.js +0 -4
- package/dist/c-BBX7DVVB.min.js +0 -51
- package/dist/c-CNYFCSG4.min.js +0 -5
- package/dist/c-E6QH2WYE.min.js +0 -1
- package/dist/c-GOMQWQJR.min.js +0 -1
- package/dist/c-GTYG4PDT.min.js +0 -1
- package/dist/c-H23GIKTK.min.js +0 -1
- package/dist/c-HQLUUSRJ.min.js +0 -1
- package/dist/c-HXUOFDSD.min.js +0 -64
- package/dist/c-L3LKYOLK.min.js +0 -1
- package/dist/c-MIKDFGKH.min.js +0 -1
- package/dist/c-OYSPTIAG.min.js +0 -1
- package/dist/c-PWPJNYQP.min.js +0 -1
- package/dist/c-QZ5SWKHC.min.js +0 -392
- package/dist/c-RXJH4IRX.min.js +0 -41
- package/dist/c-SN2D6QMH.min.js +0 -1
- package/dist/c-U5YGK6HL.min.js +0 -1
- package/dist/c-VIN5ASK2.min.js +0 -37
- package/dist/c-XZ3GASUJ.min.js +0 -1
- package/dist/c-ZLZZTH4I.min.js +0 -118
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import{b as e}from"./c-6B5EZDHP.min.js";import{b as t,c as r,d as i}from"./c-NIYSAQGB.min.js";import{a as s}from"./c-SBP7KEMI.min.js";import{a as n}from"./c-AQYLQP6O.min.js";import{b as o,c as a}from"./c-YEB6Z35F.min.js";import{a as l}from"./c-H2T7KJDS.min.js";import{a as c}from"./c-BYJJ7EMG.min.js";import{b as d}from"./c-UF4BWPDR.min.js";import{b as u}from"./c-3DHY6CIP.min.js";import{b as h}from"./c-QXLDCATV.min.js";import{B as y,C as p,D as f,G as g,K as m,L as v,P as k,Q as b,U as x,a as w,d as _,e as S,f as C,g as R,h as N,i as A,k as E,l as T,n as D,o as P,q as I,r as L,s as M,t as W,u as O,v as F,x as j,z as B}from"./c-C5GXUHUO.min.js";import{b as $,c as z}from"./c-3KOWSG3J.min.js";import{a as Y,c as X}from"./c-IU4QZ7Y5.min.js";import{a as H,b as V}from"./c-RDM36RTX.min.js";import{A as G,Aa as Q,Ca as K,E as q,Ea as U,F as Z,Fa as J,G as ee,Ga as te,Ha as re,I as ie,J as se,K as ne,Ka as oe,Q as ae,Ta as le,U as ce,Ua as de,V as ue,Va as he,W as ye,Wa as pe,Xa as fe,Y as ge,ab as me,b as ve,ca as ke,da as be,ea as xe,ga as we,ha as _e,ia as Se,ja as Ce,k as Re,ka as Ne,l as Ae,la as Ee,m as Te,ma as De,n as Pe,na as Ie,o as Le,oa as Me,ra as We,sa as Oe,ua as Fe,xa as je,ya as Be,za as $e}from"./c-XCV7VUU3.min.js";import{a as ze}from"./c-2P6E22WZ.min.js";import{c as Ye}from"./c-NVSINXE5.min.js";import{a as Xe,m as He}from"./c-ZOE7TAR3.min.js";import{c as Ve,i as Ge,k as Qe,p as Ke,t as qe,u as Ue}from"./c-SSKV5JPW.min.js";import{a as Ze,b as Je,i as et}from"./c-RBWJFQDC.min.js";import{h as tt}from"./c-K2Z4F22S.min.js";import{e as rt,l as it,p as st,q as nt}from"./c-5FUOKMH6.min.js";import{a as ot,b as at,c as lt,d as ct}from"./c-ESCEKIUO.min.js";import*as dt from"react";import{Fragment as ut,jsx as ht}from"react/jsx-runtime";var yt={type:"flat",matrix:[1,0,0,1,0,0],lift:0,scale:1,bounds:null,project:(e,t)=>[e,t],unproject:(e,t)=>[e,t],depth:(e,t)=>t,groundTransform:"matrix(1 0 0 1 0 0)",billboardTransform:(e,t)=>`translate(${e},${t})`},pt=/* @__PURE__ */Symbol.for("semiotic.networkPerspectiveContext");function ft(){let e=globalThis;return e[pt]??(e[pt]=dt.createContext(yt))}function gt(){return dt.useContext(ft())}function mt(e,t){dt.useEffect(()=>{if(e)return e.perspective.onExtrasReady=t,()=>{e.perspective.onExtrasReady=null}},[e,t])}function vt(e){let t=dt.useRef(null),r=s(e);return(!t.current||t.current.key!==r)&&(t.current={key:r,value:e}),t.current.value}function kt(e,t,r){return t&&null!=e&&!1!==e?/* @__PURE__ */ht(bt,{frame:t,mode:r,children:e}):e}function bt({frame:e,mode:t,children:r}){if(!e)/* */return ht(ut,{children:r});let i=ft();/* */
|
|
2
|
+
return ht(i.Provider,{value:e,children:"ground"===t?/* @__PURE__ */ht("g",{transform:e.groundTransform,children:r}):r})}import*as xt from"react";import{useRef as wt,useState as _t,useEffect as St,useLayoutEffect as Ct,useMemo as Rt,useCallback as Nt,useImperativeHandle as At,forwardRef as Et,memo as Tt}from"react";var Dt={weightChange:.1,newEdge:.5,newNode:1,threshold:3,transitionDuration:500},Pt={radius:3,opacity:.7,speedMultiplier:1,maxPerEdge:50,spawnRate:.1},It=class{constructor(e){this.capacity=e,this.particles=new Array(e),this._freeIndices=new Array(e);for(let t=0;t<e;t++)this.particles[t]={t:0,offset:0,edgeIndex:0,active:!1,x:0,y:0},this._freeIndices[t]=e-1-t}spawn(e,t=Math.random){let r=this._freeIndices.pop();if(void 0===r)return null;let i=this.particles[r];return i.active=!0,i.t=0,i.offset=t()-.5,i.edgeIndex=e,i.x=0,i.y=0,i}step(e,t,r,i){for(let s=0;s<this.capacity;s++){let n=this.particles[s];if(!n.active)continue;let o=r[n.edgeIndex];if(!o||!o.bezier){n.active=!1,this._freeIndices.push(s);continue}let a=i?i[n.edgeIndex]??1:1,l=o.bezier.circular?.3:1;n.t+=e*t*a*l,n.t>=1?(n.active=!1,this._freeIndices.push(s)):Lt(o.bezier,n.t,n.offset,n)}}countForEdge(e){let t=0;for(let r=0;r<this.capacity;r++)this.particles[r].active&&this.particles[r].edgeIndex===e&&t++;return t}clear(){for(let e=0;e<this.capacity;e++)this.particles[e].active=!1;this._freeIndices.length=0;for(let e=this.capacity-1;e>=0;e--)this._freeIndices.push(e)}resize(e){if(e<=this.capacity)return;let t=this.particles;this.particles=new Array(e);for(let r=0;r<e;r++)r<t.length?this.particles[r]=t[r]:(this.particles[r]={t:0,offset:0,edgeIndex:0,active:!1,x:0,y:0},this._freeIndices.push(r));this.capacity=e}};function Lt(e,t,r,i){if(e.circular&&e.segments)return void Mt(e.segments,t,r,e.halfWidth,i);if(!e.points)return i.x=0,void(i.y=0);let[s,n,o,a]=e.points;Wt(s,n,o,a,t,i);let l=a.x-s.x,c=a.y-s.y,d=Math.sqrt(l*l+c*c);if(d>.001){let t=-c/d,s=l/d;i.x+=t*r*e.halfWidth*2,i.y+=s*r*e.halfWidth*2}}function Mt(e,t,r,i,s){let n=e.length,o=t*n,a=Math.min(Math.floor(o),n-1),l=o-a,[c,d,u,h]=e[a];Wt(c,d,u,h,l,s);let y=h.x-c.x,p=h.y-c.y,f=Math.sqrt(y*y+p*p);if(f>.001){let e=-p/f,t=y/f;s.x+=e*r*i*2,s.y+=t*r*i*2}}function Wt(e,t,r,i,s,n){let o=1-s,a=o*o,l=a*o,c=s*s,d=c*s;n.x=l*e.x+3*a*s*t.x+3*o*c*r.x+d*i.x,n.y=l*e.y+3*a*s*t.y+3*o*c*r.y+d*i.y}var Ot=/* @__PURE__ */new Set(["sankey","force","chord","tree","cluster","treemap","circlepack","partition","orbit"]);function Ft(e){return Ot.has(e)}var jt=!1;function Bt(t){e(t)||!Re&&Ft(t)||"production"===process.env.NODE_ENV||jt||(jt=!0,console.warn(`[semiotic] StreamNetworkFrame: no layout plugin registered for "${t}". Import the matching chart HOC (which registers its plugin), or call registerBuiltInNetworkLayouts() from "semiotic/network".`))}import{quadtree as $t}from"d3-quadtree";function zt(e){return{id:e,x0:0,x1:0,y0:0,y1:0,x:0,y:0,width:0,height:0,value:0,data:{id:e},createdByFrame:!0}}function Yt(e){if(!e||"object"!=typeof e)return!1;let t=e;if("boolean"!=typeof t.circular||"number"!=typeof t.halfWidth||!Number.isFinite(t.halfWidth))return!1;if(t.circular){if(!Array.isArray(t.segments)||0===t.segments.length)return!1;for(let e of t.segments)if(!Xt(e))return!1;return!0}return Xt(t.points)}function Xt(e){if(!Array.isArray(e)||4!==e.length)return!1;for(let t of e){if(!t||"object"!=typeof t)return!1;let e=t;if("number"!=typeof e.x||!Number.isFinite(e.x)||"number"!=typeof e.y||!Number.isFinite(e.y))return!1}return!0}import{interpolateNumber as Ht}from"d3-interpolate";var Vt=.5;function Gt(e,t,r,i=Vt){let s=(e.sankeyWidth||1)/2;if("down"===e.direction){let n=t.x1,o=r.x0,a=Ht(n,o);return{circular:!1,points:[{x:e.y0,y:n},{x:e.y0,y:a(i)},{x:e.y1,y:a(1-i)},{x:e.y1,y:o}],halfWidth:s}}let n=t.x1,o=r.x0,a=Ht(n,o);return{circular:!1,points:[{x:n,y:e.y0},{x:a(i),y:e.y0},{x:a(1-i),y:e.y1},{x:o,y:e.y1}],halfWidth:s}}function Qt(e,t=Vt){let r,i=(e._circularWidth||e.sankeyWidth||1)/2,s=e.circularPathData;if(!s)throw new Error("buildCircularBezier requires circularPathData");if(e._circularStub){let e=Math.max(15,Math.min(40,.33*(s.rightFullExtent-s.sourceX))),t=Math.max(15,Math.min(40,.33*(s.targetX-s.leftFullExtent)));return{circular:!0,segments:[[{x:s.sourceX,y:s.sourceY},{x:s.sourceX+.33*e,y:s.sourceY},{x:s.sourceX+.66*e,y:s.sourceY},{x:s.sourceX+e,y:s.sourceY}],[{x:s.targetX-t,y:s.targetY},{x:s.targetX-.66*t,y:s.targetY},{x:s.targetX-.33*t,y:s.targetY},{x:s.targetX,y:s.targetY}]],halfWidth:i}}r="down"===e.direction?[{x:s.sourceY,y:s.sourceX},{x:s.sourceY,y:s.rightFullExtent},{x:s.verticalFullExtent,y:s.rightFullExtent},{x:s.verticalFullExtent,y:s.leftFullExtent},{x:s.targetY,y:s.leftFullExtent},{x:s.targetY,y:s.targetX}]:[{x:s.sourceX,y:s.sourceY},{x:s.rightFullExtent,y:s.sourceY},{x:s.rightFullExtent,y:s.verticalFullExtent},{x:s.leftFullExtent,y:s.verticalFullExtent},{x:s.leftFullExtent,y:s.targetY},{x:s.targetX,y:s.targetY}];let n=[];for(let e=0;e<r.length-1;e++){let t=r[e],i=r[e+1],s=i.x-t.x,o=i.y-t.y;n.push([t,{x:t.x+s/3,y:t.y+o/3},{x:t.x+2*s/3,y:t.y+2*o/3},i])}return{circular:!0,segments:n,halfWidth:i}}function Kt(e,t,r=Vt){let i="string"==typeof e.source?t.get(e.source):e.source,s="string"==typeof e.target?t.get(e.target):e.target;return!(!i||!s||(e.circular&&e.circularPathData?e.bezier=Qt(e,r):e.bezier=Gt(e,i,s,r),0))}function qt(e){let t=e.pulse;if(!t)return;let r=t.duration??500,i=t.color??"rgba(255,255,255,0.6)",s=t.glowRadius??4,{now:n}=e;for(let t of e.sceneNodes){let o=t.id;if(!o)continue;let a=e.nodeTimestamps.get(o);if(!a)continue;let l=n-a;if(l>=r)continue;let c=1-l/r;t._pulseIntensity=c,t._pulseColor=i,t._pulseGlowRadius=s}for(let t of e.sceneEdges){let s=t.datum;if(!s)continue;let o="object"==typeof s.source?s.source?.id:s.source,a="object"==typeof s.target?s.target?.id:s.target;if(!o||!a)continue;let l=`${o}\0${a}`,c=e.edgeTimestamps.get(l);if(!c)continue;let d=n-c;if(d>=r)continue;let u=1-d/r;t._pulseIntensity=u,t._pulseColor=i}}function Ut(e){let t=e.decay;if(!t)return;let r=e.nodeTimestamps.size;if(r<=1)return;if(!e.cache.sortedNodes){e.cache.sortedNodes=Array.from(e.nodeTimestamps.entries()).sort((e,t)=>e[1]-t[1]);let t=/* @__PURE__ */new Map;for(let r=0;r<e.cache.sortedNodes.length;r++)t.set(e.cache.sortedNodes[r][0],r);e.cache.ageMap=t}let i=e.cache.ageMap;for(let s of e.sceneNodes){let e=s.id;if(!e)continue;let n=i.get(e);if(void 0===n)continue;let o=w(t,n,r),a=s.style?.opacity??1;s.style={...s.style,opacity:a*o}}}var Zt="rgba(34, 197, 94, 0.7)",Jt=2e3;function er(e){for(let t of e.sceneNodes)t._pulseColor===Zt&&(t._pulseIntensity=0,t._pulseColor=void 0,t._pulseGlowRadius=void 0);if(0===e.addedNodes.size)return;let t=e.now-e.lastTopologyChangeTime;if(t>=Jt)return;let r=1-t/Jt;for(let t of e.sceneNodes){let i=t.id;!i||!e.addedNodes.has(i)||(t._pulseIntensity=Math.max(t._pulseIntensity??0,r),t._pulseColor=Zt,t._pulseGlowRadius=8)}}function tr(e,t,r=(typeof performance<"u"?performance.now():Date.now())){return 0!==e.size&&r-t<Jt}function rr(e){let t=e.thresholds;if(!t)return;let r=t.warningColor??"#f59e0b",i=t.criticalColor??"#ef4444",s=!1!==t.pulse;for(let n of e.sceneNodes){let o=n.id;if(!o)continue;let a=e.nodes.get(o);if(!a)continue;let l=t.metric(a),c=null;void 0!==t.critical&&l>=t.critical?c=i:void 0!==t.warning&&l>=t.warning&&(c=r),c&&(n.style={...n.style,fill:c},s&&(n._pulseIntensity=.6+.4*Math.sin(e.now/300),n._pulseColor=c,n._pulseGlowRadius=6))}}function ir(e,t){if(!t)return!1;for(let r of e){let e=t.metric(r);if(void 0!==t.warning&&e>=t.warning||void 0!==t.critical&&e>=t.critical)return!0}return!1}function sr(e){let t=e.pulse;if(!t||0===e.lastIngestTime)return!1;let r=e.now??(typeof performance<"u"?performance.now():Date.now()),i=t.duration??500;return r-e.lastIngestTime<i}var nr=["data","domain","layout","scene-geometry","data-paint","overlay","accessibility","evidence"],or=["scene-style","data-paint","accessibility","evidence"],ar=(e,t)=>({retainedData:e,invalidations:t}),lr=["domain","layout","scene-geometry","data-paint","overlay","accessibility","evidence"],cr=["layout","scene-geometry","data-paint","overlay","accessibility","evidence"],dr=["scene-geometry","data-paint","overlay","accessibility","evidence"],ur=["scene-style","data-paint","accessibility","evidence"],hr=["scene-geometry","data-paint","overlay","accessibility","evidence"],yr=[],pr={chartType:/* @__PURE__ */ar("rebuild",lr),nodeIDAccessor:/* @__PURE__ */ar("rebuild",lr),sourceAccessor:/* @__PURE__ */ar("rebuild",lr),targetAccessor:/* @__PURE__ */ar("rebuild",lr),valueAccessor:/* @__PURE__ */ar("rebuild",lr),edgeIdAccessor:/* @__PURE__ */ar("rebuild",lr),childrenAccessor:/* @__PURE__ */ar("rebuild",lr),hierarchySum:/* @__PURE__ */ar("rebuild",lr),orientation:/* @__PURE__ */ar("preserve",cr),nodeAlign:/* @__PURE__ */ar("preserve",cr),nodePaddingRatio:/* @__PURE__ */ar("preserve",cr),nodeWidth:/* @__PURE__ */ar("preserve",cr),edgeSort:/* @__PURE__ */ar("preserve",cr),iterations:/* @__PURE__ */ar("preserve",cr),forceStrength:/* @__PURE__ */ar("preserve",cr),padAngle:/* @__PURE__ */ar("preserve",cr),groupWidth:/* @__PURE__ */ar("preserve",cr),sortGroups:/* @__PURE__ */ar("preserve",cr),treeOrientation:/* @__PURE__ */ar("preserve",cr),edgeType:/* @__PURE__ */ar("preserve",cr),padding:/* @__PURE__ */ar("preserve",cr),paddingTop:/* @__PURE__ */ar("preserve",cr),orbitMode:/* @__PURE__ */ar("preserve",cr),orbitSize:/* @__PURE__ */ar("preserve",cr),orbitSpeed:/* @__PURE__ */ar("preserve",cr),orbitRevolution:/* @__PURE__ */ar("preserve",cr),orbitRevolutionStyle:/* @__PURE__ */ar("preserve",cr),orbitEccentricity:/* @__PURE__ */ar("preserve",cr),orbitShowRings:/* @__PURE__ */ar("preserve",cr),orbitAnimated:/* @__PURE__ */ar("preserve",cr),customNetworkLayout:/* @__PURE__ */ar("preserve",cr),layoutConfig:/* @__PURE__ */ar("preserve",cr),perspective:/* @__PURE__ */ar("preserve",dr),nodeSize:/* @__PURE__ */ar("preserve",dr),nodeSizeRange:/* @__PURE__ */ar("preserve",dr),colorByDepth:/* @__PURE__ */ar("preserve",dr),nodeLabel:/* @__PURE__ */ar("preserve",hr),showLabels:/* @__PURE__ */ar("preserve",hr),labelMode:/* @__PURE__ */ar("preserve",hr),nodeStyle:/* @__PURE__ */ar("preserve",ur),edgeStyle:/* @__PURE__ */ar("preserve",ur),colorBy:/* @__PURE__ */ar("preserve",ur),colorScheme:/* @__PURE__ */ar("preserve",ur),themeCategorical:/* @__PURE__ */ar("preserve",ur),themeSequential:/* @__PURE__ */ar("preserve",ur),themeSelectionOpacity:/* @__PURE__ */ar("preserve",ur),themeSemantic:/* @__PURE__ */ar("preserve",ur),edgeColorBy:/* @__PURE__ */ar("preserve",ur),edgeOpacity:/* @__PURE__ */ar("preserve",ur),showParticles:/* @__PURE__ */ar("preserve",ur),particleStyle:/* @__PURE__ */ar("preserve",ur),decay:/* @__PURE__ */ar("preserve",ur),pulse:/* @__PURE__ */ar("preserve",ur),thresholds:/* @__PURE__ */ar("preserve",ur),staleness:/* @__PURE__ */ar("preserve",ur),layoutSelection:/* @__PURE__ */ar("preserve",ur),clock:/* @__PURE__ */ar("preserve",yr),random:/* @__PURE__ */ar("preserve",yr),seed:/* @__PURE__ */ar("preserve",yr),tensionConfig:/* @__PURE__ */ar("preserve",yr),transition:/* @__PURE__ */ar("preserve",yr),introAnimation:/* @__PURE__ */ar("preserve",yr),onLayoutError:/* @__PURE__ */ar("preserve",yr),__skipForceSimulation:/* @__PURE__ */ar("preserve",yr),__hierarchyRoot:/* @__PURE__ */ar("preserve",yr),__orbitState:/* @__PURE__ */ar("preserve",yr),__previousPositions:/* @__PURE__ */ar("preserve",yr)},fr=/* @__PURE__ */ar("preserve",cr);function gr(e,t){let r="preserve",i=/* @__PURE__ */new Set;for(let s of e){let e="force"!==t||"nodeSize"!==s&&"nodeSizeRange"!==s?pr[s]??fr:ar("preserve",cr);"rebuild"===e.retainedData&&(r="rebuild");for(let t of e.invalidations)i.add(t)}return{retainedData:r,invalidations:i}}var mr=class{constructor(){this.tracker=new Ae}get last(){return this.tracker.last}subscribe(e){return this.tracker.subscribe(e)}recordData(e,t){return this.tracker.record({kind:e,...void 0===t?{}:{count:t}},nr)}recordNoop(e){return this.tracker.record({kind:e,..."restyle"===e?{}:{count:0}},[])}recordRestyle(e){return e?this.tracker.record({kind:"restyle"},or):this.recordNoop("restyle")}recordConfig(e,t){let r=gr(e,t);return this.tracker.record({kind:"config",keys:e},r.invalidations)}};function vr(e,t,r){return"function"==typeof t?t(e):e[t??r]}function kr(e){let t=null==e?NaN:Number(e);return Number.isFinite(t)?t:1}function br(e,t){return null!=e?String(e):("production"!==process.env.NODE_ENV&&console.warn(`[Semiotic] Missing network ${t} ID; skipping this datum.`),null)}function xr(e,t){let r=br(vr(e,t.sourceAccessor,"source"),"source"),i=br(vr(e,t.targetAccessor,"target"),"target");return null===r||null===i?null:{source:r,target:i,value:kr(vr(e,t.valueAccessor,"value")),data:e}}function wr(e,t,r){let i=/* @__PURE__ */new Map;for(let t of e){let e=br(vr(t,r.nodeIDAccessor,"id"),"node");null!==e&&(i.has(e)&&"production"!==process.env.NODE_ENV&&console.warn(`[Semiotic] Duplicate network node ID "${e}"; using the last datum.`),i.set(e,t))}let s=[];return t.forEach((e,t)=>{let n=xr(e,r);if(n){for(let e of[n.source,n.target])i.has(e)||i.set(e,{id:e});s.push({...n,_edgeKey:`${n.source}\0${n.target}\0${t}`})}}),{nodes:i,edges:s}}function _r(e){return`${"string"==typeof e.source?e.source:e.source.id}\0${"string"==typeof e.target?e.target:e.target.id}`}function Sr(e){let t=/* @__PURE__ */new Map;for(let r of e){let e=_r(r),i=t.get(e)??[];i.push(Rr(r)),t.set(e,i)}return t}function Cr(e,t){for(let r of e){let e=t?.get(_r(r))?.shift();Nr(r,0===r.sankeyWidth?e:void 0)}}function Rr(e){return{y0:e.y0,y1:e.y1,sankeyWidth:e.sankeyWidth,circularPathData:e.circular&&e.circularPathData?{...e.circularPathData}:void 0}}function Nr(e,t=Rr(e)){e._prevY0=t.y0,e._prevY1=t.y1,e._prevSankeyWidth=t.sankeyWidth,e._prevCircularPathData=t.circularPathData,e._introFromZero=!1}function Ar(e){e._targetY0=e.y0,e._targetY1=e.y1,e._targetSankeyWidth=e.sankeyWidth,e._targetCircularPathData=Rr(e).circularPathData;let t=e._targetCircularPathData,r=e._prevCircularPathData;t&&(!r||Math.sign(r.verticalFullExtent-r.sourceY)!==Math.sign(t.verticalFullExtent-t.sourceY))&&(e._prevSankeyWidth||(e._prevY0=Er(e.source,e.y0),e._prevY1=Er(e.target,e.y1)),e._prevCircularPathData={...t},e._prevSankeyWidth=0,e._introFromZero=!0)}function Er(e,t){if("string"==typeof e||void 0===e._prevY0||void 0===e._prevX0||0===e._prevX0&&0===e._prevX1)return t;let r=e.y1>e.y0?(t-e.y0)/(e.y1-e.y0):.5;return lt(e._prevY0,e._prevY1,r)}function Tr(e,t){if(void 0===e._targetY0||void 0===e._prevY0||void 0===e._prevSankeyWidth||!(e._prevSankeyWidth>0||e._introFromZero))return;e.y0=lt(e._prevY0,e._targetY0,t),e.y1=lt(e._prevY1,e._targetY1,t),e.sankeyWidth=lt(e._prevSankeyWidth,e._targetSankeyWidth,t);let r=e._targetCircularPathData,i=e._prevCircularPathData;if(!r||!i)return;let s={...r};for(let e of Object.keys(r))s[e]=lt(i[e]??r[e],r[e],t);if("string"!=typeof e.source){let t=e.source.x1-s.sourceX;s.sourceX=e.source.x1,s.rightInnerExtent+=t,s.rightFullExtent+=t,s.sourceWidth=e.source.x1-e.source.x0}if("string"!=typeof e.target){let t=e.target.x0-s.targetX;s.targetX=e.target.x0,s.leftInnerExtent+=t,s.leftFullExtent+=t}s.sourceY=e.y0,s.targetY=e.y1,e.circularPathData=s,e._circularWidth=e.sankeyWidth}function Dr(e){void 0!==e._targetY0&&(e.y0=e._targetY0,e.y1=e._targetY1,e.sankeyWidth=e._targetSankeyWidth,e._targetCircularPathData&&(e.circularPathData={...e._targetCircularPathData},e._circularWidth=e.sankeyWidth)),e._introFromZero=void 0}function Pr(e){let t="string"==typeof e?{type:e}:e;return t&&"flat"!==t.type?t:null}function Ir({config:e,customLayout:t,size:r,nodes:i,edges:s,previousResult:n,revision:o}){let a=H(e.colorScheme,e.themeCategorical,Xe),l={nodes:i,edges:s,dimensions:{width:r[0],height:r[1],plot:{x:0,y:0,width:r[0],height:r[1]}},theme:{semantic:e.themeSemantic??{},sequential:e.themeSequential,selectionOpacity:e.themeSelectionOpacity,categorical:[...a]},resolveColor:V(a,e.colorScheme),config:e.layoutConfig??{},selection:e.layoutSelection??null,perspective:Pr(e.perspective)};return S({family:"network",logLabel:"customNetworkLayout",revision:o,hasPreviousResult:null!==n,onLayoutError:e.onLayoutError,run:()=>t(l)})}function Lr(e,t,r,i){return{geometry:[r,i,...t,e.customNetworkLayout,e.layoutConfig,e.perspective],colors:{semantic:e.themeSemantic,sequential:e.themeSequential,selectionOpacity:e.themeSelectionOpacity,categorical:e.themeCategorical,colorScheme:e.colorScheme},selection:[e.layoutSelection?.isActive??!1,e.layoutSelection?.predicate,null!=e.layoutSelection]}}var Mr=class{constructor(e){this.restyle=e,this.key=null,this.pending=null}reuse(e,t,r,i,s){let n=Lr(e,t,r,i),o=null!==this.key&&Ee(this.key.selection,n.selection);return this.key&&Ee(this.key.geometry,n.geometry)&&Ee(this.key.colors,n.colors)&&(s||o)?(o||this.restyle(e.layoutSelection??null),this.key=n,!0):(this.key=null,this.pending=n,!1)}commit(){this.key=this.pending,this.pending=null}clear(){this.key=null,this.pending=null}};function Wr(e){e.customLayoutBackgrounds=null,e.customLayoutOverlays=null,e.customLayoutHtmlMarks=[],e.lastCustomLayoutResult=null}function Or(e,t){let r=/* @__PURE__ */new WeakMap;for(let t of e)r.set(t,t.style);for(let e of t)r.set(e,e.style);return r}function Fr({nodes:e,edges:t,restyle:r,restyleEdge:i,baseStyles:s,selection:n}){let o=!(!r&&!i);if(r)for(let t of e){let e=s.get(t)??t.style,i=r(t,n);t.style=i?{...e,...i}:e}if(i)for(let e of t){let t=s.get(e)??e.style,r=i(e,n);e.style=r?{...t,...r}:t}return o}var jr=class{constructor(){this.frame=null,this.underlay=[],this.edgeLift=0,this.onExtrasReady=null,this.needsRebuild=!1,this.internal=null,this.builds=0,this.warnedFlatDecorations=!1}warnFlatDecorations(e){if("production"===process.env.NODE_ENV||this.warnedFlatDecorations||e.perspective)return;let t=e=>Array.isArray(e)?e.some(t):null!=e&&!1!==e&&""!==e;!t(e.backgrounds)&&!t(e.overlays)||(this.warnedFlatDecorations=!0,console.warn('[semiotic] customNetworkLayout backgrounds/overlays stay flat. Use perspective: "ground", or NetworkPerspectiveGround/Billboard with perspective: "manual".'))}label(e){let t=this.frame?.type;return t&&"flat"!==t?`${e} (${t} perspective)`:e}get transitioning(){return null!=this.internal?.tween}advance(e,t=!1){let r=null!=this.internal?.tween&&(o()?.advance(this,e,t)??!1);return r&&(this.needsRebuild=!0),r}extrasReady(){this.needsRebuild=!0,this.onExtrasReady?.()}reset(){this.frame=null,this.underlay=[],this.edgeLift=0,this.projectParticle=void 0,this.internal=null,this.builds=0,this.needsRebuild=!1}project(e,t,r){this.needsRebuild=!1;let i=0===this.builds++;if(!(e.perspective&&"flat"!==e.perspective||this.internal))return null;let s=o();return s?s.project(this,e,t,r,i):(a().then(()=>this.extrasReady(),()=>{}),null)}},Br=class extends C{constructor(e){super(),this.nodes=/* @__PURE__ */new Map,this.edges=/* @__PURE__ */new Map,this.tension=0,this.layoutVersion=0,this.sceneNodes=[],this.sceneEdges=[],this.labels=[],this.customLayoutBackgrounds=null,this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this.lastCustomLayoutFailure=null,this.customLayoutHtmlMarks=[],this._customLayoutDiagnosticsWarned=/* @__PURE__ */new Set,this._customLayoutCache=new Mr(e=>this.restyleScene(e)),this.perspective=new jr,this._rawCustomResult=null,this._customRestyle=void 0,this._customRestyleEdge=void 0,this.hasCustomRestyle=!1,this._baseStyles=/* @__PURE__ */new WeakMap,this._nodeQuadtree=null,this._maxNodeRadius=0,this._sceneNodesRevision=0,this._nodeQuadtreeRevision=-1,this._nodesArrCache=null,this._edgesArrCache=null,this._arrCacheVersion=-1,this.particlePool=null,this.incidentEdges=null,this.updateResults=new mr,this.transition=null,this._hasRenderedOnce=!1,this._boundedPrevSnapshot=null,this._boundedEdgeSnapshot=null,this.lastIngestTime=0,this.nodeTimestamps=/* @__PURE__ */new Map,this.edgeTimestamps=/* @__PURE__ */new Map,this._decaySortedNodes=null,this._decayAgeMap=null,this.addedNodes=/* @__PURE__ */new Set,this.removedNodes=/* @__PURE__ */new Set,this.addedEdges=/* @__PURE__ */new Set,this.removedEdges=/* @__PURE__ */new Set,this.lastTopologyChangeTime=0,this.previousNodeIds=/* @__PURE__ */new Set,this.previousEdgeKeys=/* @__PURE__ */new Set,this._networkDecayCache=null,this._lastPositionSnapshot=null,this.config=e,this.tensionConfig={...Dt,...e.tensionConfig},e.showParticles&&("sankey"===e.chartType||e.customNetworkLayout)&&(this.particlePool=new It(2e3))}edgeIncidence(){if(this.incidentEdges)return this.incidentEdges;let e=/* @__PURE__ */new Map;for(let[t,r]of this.edges){let i="string"==typeof r.source?r.source:r.source.id,s="string"==typeof r.target?r.target:r.target.id;for(let r of[i,s])e.has(r)||e.set(r,/* @__PURE__ */new Set),e.get(r).add(t)}return this.incidentEdges=e,e}deleteIndexedEdge(e){let t=this.edges.get(e);if(!t)return;let r="string"==typeof t.source?t.source:t.source.id,i="string"==typeof t.target?t.target:t.target.id;this.incidentEdges?.get(r)?.delete(e),this.incidentEdges?.get(i)?.delete(e),this.edges.delete(e),this.edgeTimestamps.delete(e)}currentTime(){return this.config.clock?.()??ct()}updateConfig(e){let t=this.config,r={...t,...e};t.__orbitState&&(r.__orbitState=t.__orbitState),t.__hierarchyRoot&&(r.__hierarchyRoot=t.__hierarchyRoot),void 0===e.layoutSelection&&null!=t.layoutSelection&&(r.layoutSelection=t.layoutSelection);let i=[.../* @__PURE__ */new Set([...Object.keys(t),...Object.keys(r)])].filter(e=>t[e]!==r[e]);this.config=r,this.tensionConfig={...Dt,...r.tensionConfig},r.showParticles&&("sankey"===r.chartType||r.customNetworkLayout)&&!this.particlePool&&(this.particlePool=new It(2e3)),this.updateResults.recordConfig(i,r.chartType)}updateConfigWithResult(e){return this.updateConfig(e),this.updateResults.last}ingestHierarchy(e,t){this._boundedPrevSnapshot=/* @__PURE__ */new Map;for(let[e,t]of this.nodes)(0!==t.x0||0!==t.x1||0!==t.y0||0!==t.y1)&&this._boundedPrevSnapshot.set(e,{x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1});this.nodes.clear(),this.incidentEdges=null,this.edges.clear(),this._decaySortedNodes=null,this._networkDecayCache=null,this.config.__hierarchyRoot=e,this.runLayout(t),this._boundedPrevSnapshot=null,this.updateResults.recordData("replace",1)}ingestBounded(e,t,r,i){this._boundedPrevSnapshot=/* @__PURE__ */new Map;for(let[e,t]of this.nodes)(0!==t.x0||0!==t.x1||0!==t.y0||0!==t.y1)&&this._boundedPrevSnapshot.set(e,{x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1});this._boundedEdgeSnapshot=Sr(this.edges.values()),this.nodes.clear(),this.incidentEdges=null,this.edges.clear(),this._decaySortedNodes=null,this._networkDecayCache=null,this._arrCacheVersion=-1;let s=wr(e,t,this.config);for(let[e,t]of s.nodes)this.nodes.set(e,{...zt(e),data:t});for(let e of s.edges){let t=e.data,r={...e,y0:0,y1:0,sankeyWidth:0};t&&"object"==typeof t&&Yt(t.bezier)&&(r.bezier=t.bezier),this.edges.set(e._edgeKey,r)}i?.deferLayout||this.runLayout(r),this.updateResults.recordData("replace",e.length+t.length)}ingestBoundedWithResult(e,t,r,i){return this.ingestBounded(e,t,r,i),this.updateResults.last}applyForceLayoutPositions(e,t){for(let[t,r]of Object.entries(e)){let e=this.nodes.get(t);e&&(e.x=r.x,e.y=r.y)}this.config.__skipForceSimulation=!0;try{this.runLayout(t)}finally{this.config.__skipForceSimulation=void 0}}edgeKey(e,t){return`${e}\0${t}`}ingestEdge(e){let t=xr(e,this.config);if(!t)return this.updateResults.recordNoop("ingest"),!1;let{source:r,target:i,value:s}=t,n=0===this.nodes.size,o=!1,a=this.currentTime();this.lastIngestTime=a,this._decaySortedNodes=null,this._networkDecayCache=null,this.nodes.has(r)||(this.nodes.set(r,zt(r)),this.nodeTimestamps.set(r,a),this.tension+=this.tensionConfig.newNode,o=!0),this.nodes.has(i)||(this.nodes.set(i,zt(i)),this.nodeTimestamps.set(i,a),this.tension+=this.tensionConfig.newNode,o=!0);let l=this.edgeKey(r,i),c=this.edges.get(l),d=!1;c?(c.value+=s,c.data={...c.data,...e},this.edgeTimestamps.set(l,a),this.tension+=this.tensionConfig.weightChange,d=!0):(this.incidentEdges=null,this.edges.set(l,{...t,y0:0,y1:0,sankeyWidth:0,_edgeKey:l}),this.edgeTimestamps.set(l,a),this.tension+=this.tensionConfig.newEdge,o=!0);let u=n||o||d||this.tension>=this.tensionConfig.threshold;return o&&(this._arrCacheVersion=-1),this.updateResults.recordData("ingest",1),u}ingestEdgeWithResult(e){return this.ingestEdge(e),this.updateResults.last}runLayout(t){if(this.config.customNetworkLayout)return this.recordTopologyDiff(),void this.layoutVersion++;let r=e(this.config.chartType);if(!r)return void Bt(this.config.chartType);let i=Array.from(this.nodes.values()),s=Array.from(this.edges.values());if(0===i.length&&!r.hierarchical)return;if(this.prepareForRelayout(),r.supportsStreaming&&!r.hierarchical&&(this.config.__previousPositions=this._lastPositionSnapshot??void 0),r.computeLayout(i,s,this.config,t),this.config.__previousPositions=void 0,r.hierarchical&&i.length>0){this.nodes.clear(),this.incidentEdges=null,this.edges.clear(),this._decaySortedNodes=null,this._networkDecayCache=null;for(let e of i)this.nodes.set(e.id,e);for(let e=0;e<s.length;e++){let t=s[e],r="string"==typeof t.source?t.source:t.source.id,i="string"==typeof t.target?t.target:t.target.id,n=t._edgeKey||`${r}\0${i}\0${e}`;t._edgeKey=n,this.edges.set(n,t)}let e=this._boundedPrevSnapshot;if(e&&e.size>0)for(let t of this.nodes.values()){let r=e.get(t.id);r&&(t._prevX0=r.x0,t._prevX1=r.x1,t._prevY0=r.y0,t._prevY1=r.y1)}this._boundedPrevSnapshot=null,this._boundedEdgeSnapshot=null,i=Array.from(this.nodes.values())}this.finalizeLayout();let n=/* @__PURE__ */new Map;for(let e of this.nodes.values())Number.isFinite(e.x)&&Number.isFinite(e.y)&&n.set(e.id,{x:e.x,y:e.y});this._lastPositionSnapshot=n,this.saveTargetPositions();let o=i.some(e=>void 0!==e._prevX0&&(0!==e._prevX0||0!==e._prevX1||0!==e._prevY0||0!==e._prevY1)),a=this.config.transition?.duration??this.tensionConfig.transitionDuration,l=["sankey","tree","treemap","circlepack","partition"].includes(this.config.chartType);if(!this._hasRenderedOnce&&this.config.introAnimation&&l&&i.length>0&&a>0){let e="sankey"===this.config.chartType&&"vertical"===this.config.orientation,r=t[e?1:0]/2,i=t[e?0:1]/2;for(let e of this.nodes.values())e._prevX0=r,e._prevX1=r,e._prevY0=i,e._prevY1=i;for(let e of this.edges.values())e._prevY0=i,e._prevY1=i,e._prevSankeyWidth=0,e._introFromZero=!0;this.restorePreviousPositions(),this.transition={startTime:this.currentTime(),duration:a}}else o&&a>0&&(this.restorePreviousPositions(),this.transition={startTime:this.currentTime(),duration:a});this._hasRenderedOnce=!0,this.recordTopologyDiff(),this.layoutVersion++}recordTopologyDiff(){let e=new Set(this.nodes.keys()),t=new Set(this.edges.keys());this.addedNodes=/* @__PURE__ */new Set,this.removedNodes=/* @__PURE__ */new Set,this.addedEdges=/* @__PURE__ */new Set,this.removedEdges=/* @__PURE__ */new Set;for(let t of e)this.previousNodeIds.has(t)||this.addedNodes.add(t);for(let t of this.previousNodeIds)e.has(t)||this.removedNodes.add(t);for(let e of t)this.previousEdgeKeys.has(e)||this.addedEdges.add(e);for(let e of this.previousEdgeKeys)t.has(e)||this.removedEdges.add(e);(this.addedNodes.size>0||this.removedNodes.size>0||this.addedEdges.size>0||this.removedEdges.size>0)&&(this.lastTopologyChangeTime=this.currentTime()),this.previousNodeIds=e,this.previousEdgeKeys=t}restyleScene(e){let t=Fr({nodes:this.sceneNodes,edges:this.sceneEdges,restyle:this._customRestyle,restyleEdge:this._customRestyleEdge,baseStyles:this._baseStyles,selection:e});this.markStylePaintPending(),this.updateResults.recordRestyle(t)}buildScene(t){if(this.config.customNetworkLayout){if(this._customLayoutCache.reuse(this.config,t,this.getUpdateSnapshot().revisions.data,this.layoutVersion,this.hasCustomRestyle))return void(this.perspective.needsRebuild&&this._rawCustomResult&&(this.commitCustomScene(this._rawCustomResult,t),this._sceneNodesRevision++,this.hasCustomRestyle&&(this._baseStyles=Or(this.sceneNodes,this.sceneEdges),this.restyleScene(this.config.layoutSelection??null))));let e=Ir({config:this.config,customLayout:this.config.customNetworkLayout,size:t,nodes:Array.from(this.nodes.values()),edges:Array.from(this.edges.values()),previousResult:this.lastCustomLayoutResult,revision:this.layoutVersion});if("failure"===e.kind)return this.lastCustomLayoutFailure=e.diagnostic,void(e.preservedLastGoodScene||(this.sceneNodes=[],this.sceneEdges=[],this.labels=[],this.perspective.underlay=[],Wr(this),this._customRestyle=void 0,this._customRestyleEdge=void 0,this.hasCustomRestyle=!1,this._baseStyles=/* @__PURE__ */new WeakMap,this._sceneNodesRevision++));let r=e.result;return this._customLayoutCache.commit(),this._rawCustomResult=r,this.commitCustomScene(r,t),this.lastCustomLayoutFailure=null,this._sceneNodesRevision++,this._customRestyle=r.restyle,this._customRestyleEdge=r.restyleEdge,this.hasCustomRestyle=!(!r.restyle&&!r.restyleEdge),this.hasCustomRestyle&&(this._baseStyles=Or(this.sceneNodes,this.sceneEdges),this.restyleScene(this.config.layoutSelection??null)),void _({label:"customNetworkLayout",nodes:this.sceneNodes,overlays:this.customLayoutOverlays,warned:this._customLayoutDiagnosticsWarned})}this._customLayoutCache.clear(),this._rawCustomResult=null,this._customRestyle=void 0,this._customRestyleEdge=void 0,this.hasCustomRestyle=!1,this._baseStyles=/* @__PURE__ */new WeakMap,Wr(this),this.lastCustomLayoutFailure=null;let r=e(this.config.chartType);if(!r)return Bt(this.config.chartType),void this._sceneNodesRevision++;let i=r.hierarchical?Array.from(this.nodes.values()):this.nodesArray,s=r.hierarchical?Array.from(this.edges.values()):this.edgesArray,n=r.buildScene(i,s,this.config,t),o=this.perspective.project(this.config,t,n);this.sceneNodes=o?.sceneNodes??n.sceneNodes,this.sceneEdges=o?.sceneEdges??n.sceneEdges,this.labels=o?.labels??n.labels,this._sceneNodesRevision++}commitCustomScene(e,t){let r=this.perspective.project(this.config,t,{sceneNodes:e.sceneNodes??[],sceneEdges:e.sceneEdges??[],labels:e.labels??[],htmlMarks:e.htmlMarks,bounds:e.perspectiveBounds});r&&this.perspective.warnFlatDecorations(e);let i=r?{...e,sceneNodes:r.sceneNodes,sceneEdges:r.sceneEdges,labels:r.labels,htmlMarks:e.htmlMarks?r.htmlMarks:void 0}:e;var s,n;this.sceneNodes=i.sceneNodes??[],this.sceneEdges=i.sceneEdges??[],this.labels=i.labels??[],n=i,(s=this).customLayoutBackgrounds=n.backgrounds??null,s.customLayoutOverlays=n.overlays??null,s.customLayoutHtmlMarks=n.htmlMarks??[],s.lastCustomLayoutResult=n}advancePerspectiveTransition(e,t=!1){return this.perspective.advance(e,t)}rebuildNodeQuadtree(){let e=0,t=0,r=!1;for(let i of this.sceneNodes)"circle"===i.type&&i.datum&&(e++,i.r>t&&(t=i.r),i.pathD&&!i._perspectiveToken&&(r=!0));if(this._maxNodeRadius=t,r||e<=500)return void(this._nodeQuadtree=null);let i=[];for(let e of this.sceneNodes)"circle"===e.type&&e.datum&&i.push(e);this._nodeQuadtree=$t().x(e=>e.cx).y(e=>e.cy).addAll(i)}get nodeQuadtree(){return this._nodeQuadtreeRevision!==this._sceneNodesRevision&&(this.rebuildNodeQuadtree(),this._nodeQuadtreeRevision=this._sceneNodesRevision),this._nodeQuadtree}get maxNodeRadius(){return this.nodeQuadtree,this._maxNodeRadius}_ensureArrays(){this._arrCacheVersion===this.layoutVersion&&this._nodesArrCache&&this._edgesArrCache||(this._nodesArrCache=Array.from(this.nodes.values()),this._edgesArrCache=Array.from(this.edges.values()),this._arrCacheVersion=this.layoutVersion)}get nodesArray(){return this._ensureArrays(),this._nodesArrCache}get edgesArray(){return this._ensureArrays(),this._edgesArrCache}get isAnimating(){return!(!e(this.config.chartType)?.supportsAnimation||!1===this.config.orbitAnimated)}tickAnimation(t,r){let i=e(this.config.chartType);if(!i?.tick)return!1;let s=i.hierarchical?Array.from(this.nodes.values()):this.nodesArray,n=i.hierarchical?Array.from(this.edges.values()):this.edgesArray;return i.tick(s,n,this.config,t,r)}cancelIntroAnimation(){this.transition&&this.snapToTargets(),this.transition=null;for(let e of this.nodes.values())e._prevX0=void 0,e._prevX1=void 0,e._prevY0=void 0,e._prevY1=void 0;for(let e of this.edges.values())e._prevY0=void 0,e._prevY1=void 0,e._prevSankeyWidth=void 0,e._prevCircularPathData=void 0,e._introFromZero=!1}advanceTransition(e){if(!this.transition)return!1;let t=at(e,this.transition),r=ot(t);for(let e of this.nodes.values())void 0!==e._targetX0&&void 0!==e._prevX0&&(0!==e._prevX0||0!==e._prevX1)&&(e.x0=lt(e._prevX0,e._targetX0,r),e.x1=lt(e._prevX1,e._targetX1,r),e.y0=lt(e._prevY0,e._targetY0,r),e.y1=lt(e._prevY1,e._targetY1,r));for(let e of this.edges.values())Tr(e,r);return this.rebuildAllBeziers(),!(t>=1&&(this.snapToTargets(),this.transition=null,1))}prepareForRelayout(){let e=this._boundedPrevSnapshot;for(let t of this.nodes.values()){let r=e?.get(t.id);r&&0===t.x0&&0===t.x1&&0===t.y0&&0===t.y1?(t._prevX0=r.x0,t._prevX1=r.x1,t._prevY0=r.y0,t._prevY1=r.y1):(t._prevX0=t.x0,t._prevX1=t.x1,t._prevY0=t.y0,t._prevY1=t.y1)}Cr(this.edges.values(),this._boundedEdgeSnapshot),this.nodes.size>0&&(this._boundedPrevSnapshot=null,this._boundedEdgeSnapshot=null)}finalizeLayout(){let e="vertical"===this.config.orientation?"down":"right";for(let e of this.nodes.values())"treemap"===this.config.chartType||"partition"===this.config.chartType||0!==e.x0||0!==e.x1||0!==e.y0||0!==e.y1?(e.width=e.x1-e.x0,e.height=e.y1-e.y0,e.x=e.x0+e.width/2,e.y=e.y0+e.height/2):(e.x0=e.x-5,e.x1=e.x+5,e.y0=e.y-5,e.y1=e.y+5,e.width=10,e.height=10);for(let t of this.edges.values())t.direction=e,this.updateEdgeBezier(t);this.tension=0}saveTargetPositions(){for(let e of this.nodes.values())e._targetX0=e.x0,e._targetX1=e.x1,e._targetY0=e.y0,e._targetY1=e.y1;for(let e of this.edges.values())Ar(e)}restorePreviousPositions(){for(let e of this.nodes.values())void 0!==e._prevX0&&(0!==e._prevX0||0!==e._prevX1)&&(e.x0=e._prevX0,e.x1=e._prevX1,e.y0=e._prevY0,e.y1=e._prevY1);for(let e of this.edges.values())Tr(e,0);this.rebuildAllBeziers()}snapToTargets(){for(let e of this.nodes.values())void 0!==e._targetX0&&(e.x0=e._targetX0,e.x1=e._targetX1,e.y0=e._targetY0,e.y1=e._targetY1);for(let e of this.edges.values())Dr(e);this.rebuildAllBeziers()}updateEdgeBezier(e){Kt(e,this.nodes,Vt)}rebuildAllBeziers(){for(let e of this.nodes.values())e.width=e.x1-e.x0,e.height=e.y1-e.y0,e.x=e.x0+e.width/2,e.y=e.y0+e.height/2;for(let e of this.edges.values())this.updateEdgeBezier(e)}applyPulse(e){qt({sceneNodes:this.sceneNodes,sceneEdges:this.sceneEdges,nodeTimestamps:this.nodeTimestamps,edgeTimestamps:this.edgeTimestamps,pulse:this.config.pulse,now:e})}applyDecay(){this._networkDecayCache||(this._networkDecayCache={sortedNodes:null,ageMap:null}),this._decaySortedNodes||(this._networkDecayCache.sortedNodes=null,this._networkDecayCache.ageMap=null),Ut({sceneNodes:this.sceneNodes,nodeTimestamps:this.nodeTimestamps,decay:this.config.decay,cache:this._networkDecayCache}),this._decaySortedNodes=this._networkDecayCache.sortedNodes,this._decayAgeMap=this._networkDecayCache.ageMap}applyTopologyDiff(e){er({sceneNodes:this.sceneNodes,addedNodes:this.addedNodes,lastTopologyChangeTime:this.lastTopologyChangeTime,now:e})}get hasActiveTopologyDiff(){return tr(this.addedNodes,this.lastTopologyChangeTime)}applyThresholds(e){rr({sceneNodes:this.sceneNodes,nodes:this.nodes,thresholds:this.config.thresholds,now:e})}get hasActiveThresholds(){return ir(this.nodes.values(),this.config.thresholds)}get hasActivePulses(){return sr({pulse:this.config.pulse,lastIngestTime:this.lastIngestTime})}getLayoutData(){return{nodes:Array.from(this.nodes.values()),edges:Array.from(this.edges.values())}}updateNode(e,t){let r=this.nodes.get(e);if(!r)return this.updateResults.recordNoop("update"),null;let i=r.data?{...r.data}:{};return r.data=t(r.data??{}),this.layoutVersion++,this.lastIngestTime=this.currentTime(),this.updateResults.recordData("update",1),i}updateEdge(e,t,r){let i=[];for(let[,s]of this.edges){let n="string"==typeof s.source?s.source:s.source.id,o="string"==typeof s.target?s.target:s.target.id;if(n===e&&o===t){let e=vr(s.data??{},this.config.valueAccessor,"value");i.push(s.data?{...s.data}:{}),s.data=r(s.data??{});let t=vr(s.data,this.config.valueAccessor,"value");Object.is(e,t)||(s.value=kr(t))}}return i.length>0?(this.layoutVersion++,this.lastIngestTime=this.currentTime(),this.updateResults.recordData("update",i.length)):this.updateResults.recordNoop("update"),i}removeNode(e){if(!this.nodes.has(e))return this.updateResults.recordNoop("remove"),!1;this.nodes.delete(e),this.nodeTimestamps.delete(e);for(let t of this.edgeIncidence().get(e)??[])this.deleteIndexedEdge(t);return this.incidentEdges?.delete(e),this.layoutVersion++,this.lastIngestTime=this.currentTime(),this.updateResults.recordData("remove",1),!0}removeEdge(e,t){let r=[];if(void 0===t){let t=this.config.edgeIdAccessor;if(!t)throw new Error("removeEdge(edgeId) requires edgeIdAccessor to be configured. Use removeEdge(sourceId, targetId) instead.");let i="function"==typeof t?t:e=>e?.[t];for(let[t,s]of this.edges)s.data&&i(s.data)===e&&r.push(t)}else for(let[i,s]of this.edges){let n="string"==typeof s.source?s.source:s.source.id,o="string"==typeof s.target?s.target:s.target.id;n===e&&o===t&&r.push(i)}for(let e of r)this.deleteIndexedEdge(e);return r.length>0?(this.layoutVersion++,this.lastIngestTime=this.currentTime(),this.updateResults.recordData("remove",r.length)):this.updateResults.recordNoop("remove"),r.length>0}clear(){this._customLayoutCache.clear(),this._rawCustomResult=null,this.perspective.underlay=[],this.nodes.clear(),this.incidentEdges=null,this.edges.clear(),this._decaySortedNodes=null,this._networkDecayCache=null,this._decayAgeMap=null,this._nodeQuadtree=null,this._nodesArrCache=null,this._edgesArrCache=null,this._sceneNodesRevision++,this.tension=0,this.layoutVersion++,this.sceneNodes=[],this.sceneEdges=[],this.labels=[],Wr(this),this.lastCustomLayoutFailure=null,this._customRestyle=void 0,this._customRestyleEdge=void 0,this.hasCustomRestyle=!1,this._baseStyles=/* @__PURE__ */new WeakMap,this.transition=null,this._hasRenderedOnce=!1,this.lastIngestTime=0,this._lastPositionSnapshot=null,this.nodeTimestamps.clear(),this.edgeTimestamps.clear(),this.previousNodeIds=/* @__PURE__ */new Set,this.previousEdgeKeys=/* @__PURE__ */new Set,this.addedNodes=/* @__PURE__ */new Set,this.removedNodes=/* @__PURE__ */new Set,this.addedEdges=/* @__PURE__ */new Set,this.removedEdges=/* @__PURE__ */new Set,this.lastTopologyChangeTime=0,this._boundedPrevSnapshot=null,this._boundedEdgeSnapshot=null,this.particlePool&&this.particlePool.clear(),this.updateResults.recordData("clear")}};function $r({sceneNodes:e,indexRef:t,pointRef:r,neighborIndexRef:i,hoverRef:s,setHoverData:n}){let o=r.current;if(t.current<0||!o)return;let a=m(k(e)),l=o.datum?.id,c=null!=l?a.idToIdx.get(String(l))??-1:a.flat.findIndex(e=>e.datum===o.datum&&e.group===o.group),d=a.flat[c];if(c!==t.current&&(i.current=-1),t.current=c,r.current=d??null,d&&d.datum===o.datum&&d.x===o.x&&d.y===o.y&&d.w===o.w&&d.h===o.h&&d.shape===o.shape)return;let u=d?Ye(d.datum||{},d.x,d.y,{nodeOrEdge:"node"}):null;s.current=u,n(u)}import*as zr from"react";import{useId as Yr}from"react";import*as Xr from"react";import{arc as Hr}from"d3-shape";import{jsx as Vr,jsxs as Gr}from"react/jsx-runtime";function Qr(e,t,r="slab-face"){let i=e.style.fill;return(e.style.opacity??1)<=0||(e.style.fillOpacity??1)<=0||"string"==typeof i&&/^\s*(none|transparent)\s*$|^rgba\(.*,\s*0(\.0+)?\s*\)$|^#[\da-f]{3}0$|^#[\da-f]{6}00$/i.test(i)?null:e.faces?.map((i,s)=>/* @__PURE__ */Vr("path",{"data-perspective-part":r,"data-perspective-face":s,d:i.pathD,fill:"string"==typeof e.style.fill?n(e.style.fill,i.shade):t,fillOpacity:e.style.fillOpacity,opacity:e.style.opacity},`face-${s}`))}function Kr(e,t){return Se(qr(e,t),e,`network-node-cursor-${t}`)}function qr(e,t){switch(e.type){case"circle":{let r=e,i=Ge(r.style.fill)?Qe(r.style.fill,`net-circle-${t}-hatch`):void 0,s={fill:i?`url(#net-circle-${t}-hatch)`:ye(r.style.fill),stroke:r.style.stroke,strokeWidth:r.style.strokeWidth,fillOpacity:r.style.fillOpacity,strokeOpacity:r.style.strokeOpacity,opacity:r.style.opacity};/* */
|
|
3
|
+
return Gr(Xr.Fragment,{children:[i&&/* @__PURE__ */Vr("defs",{children:i}),r.pathD&&Qr(r,s.fill,r._perspectiveToken?"token-rim":"slab-face"),r.pathD?/* @__PURE__ */Vr("path",{"data-perspective-part":r._perspectiveToken?"token-top":"slab-top",d:r.pathD,...s}):/* @__PURE__ */Vr("circle",{cx:r.cx,cy:r.cy,r:r.r,...s})]},`net-circle-${t}`)}case"rect":{let r=e,i=Ge(r.style.fill)?Qe(r.style.fill,`net-rect-${t}-hatch`):void 0,s={fill:i?`url(#net-rect-${t}-hatch)`:ye(r.style.fill),stroke:r.style.stroke,strokeWidth:r.style.strokeWidth,fillOpacity:r.style.fillOpacity,strokeOpacity:r.style.strokeOpacity,opacity:r.style.opacity};/* */
|
|
4
|
+
return Gr(Xr.Fragment,{children:[i&&/* @__PURE__ */Vr("defs",{children:i}),r.pathD&&Qr(r,s.fill),r.pathD?/* @__PURE__ */Vr("path",{"data-perspective-part":"slab-top",d:r.pathD,...s}):/* @__PURE__ */Vr("rect",{x:r.x,y:r.y,width:r.w,height:r.h,...s})]},`net-rect-${t}`)}case"arc":{let r=e,i=r.pathD?"":Hr().innerRadius(r.innerR).outerRadius(r.outerR).startAngle(r.startAngle+Math.PI/2).endAngle(r.endAngle+Math.PI/2)(ue)||"",s=Ge(r.style.fill)?Qe(r.style.fill,`net-arc-${t}-hatch`):void 0;/* */
|
|
5
|
+
return Gr(Xr.Fragment,{children:[s&&/* @__PURE__ */Vr("defs",{children:s}),r.pathD&&Qr(r,s?`url(#net-arc-${t}-hatch)`:ye(r.style.fill)),
|
|
6
|
+
/* @__PURE__ */Vr("path",{d:r.pathD??i,"data-perspective-part":r.pathD?"slab-top":void 0,transform:r.pathD?void 0:`translate(${r.cx},${r.cy})`,fill:s?`url(#net-arc-${t}-hatch)`:ye(r.style.fill),stroke:r.style.stroke,strokeWidth:r.style.strokeWidth,fillOpacity:r.style.fillOpacity,strokeOpacity:r.style.strokeOpacity,opacity:r.style.opacity})]},`net-arc-${t}`)}case"symbol":{let r=e,i=Ze(r.symbolType,r.size,r.path),s=r.rotation?`translate(${r.cx},${r.cy}) rotate(${180*r.rotation/Math.PI})`:`translate(${r.cx},${r.cy})`,n=/* @__PURE__ */Vr("path",{"data-perspective-part":r._perspectiveToken?"token-top":void 0,d:i,transform:s,fill:r.style.fill?ye(r.style.fill):"none",stroke:r.style.stroke,strokeWidth:r.style.strokeWidth,fillOpacity:r.style.fillOpacity,strokeOpacity:r.style.strokeOpacity,opacity:r.style.opacity},`net-symbol-${t}`);return r.faces?.length?/* @__PURE__ */Gr(Xr.Fragment,{children:[Qr(r,r.style.fill?ye(r.style.fill):void 0,"token-rim"),n]},`net-symbol-${t}`):n}case"glyph":{let r=e;return ge(r,r.cx,r.cy,`net-glyph-${r.id??t}`)}default:return null}}function Ur(e,t){return Se(Zr(e,t),e,`network-edge-cursor-${t}`)}function Zr(e,t){switch(e.type){case"line":{let r=e;/* */
|
|
7
|
+
return Vr("line",{"data-perspective-part":r._perspectivePart,x1:r.x1,y1:r.y1,x2:r.x2,y2:r.y2,stroke:r.style.stroke||"#999",strokeOpacity:r.style.strokeOpacity,strokeWidth:r.style.strokeWidth??1,strokeDasharray:r.style.strokeDasharray,strokeLinecap:r.style.strokeLinecap,opacity:r.style.opacity},`net-edge-${t}`)}case"bezier":{let r=e,i=`net-bezier-${t}-hatch`,s=Ge(r.style.fill)?Qe(r.style.fill,i):void 0;/* */
|
|
8
|
+
return Gr(Xr.Fragment,{children:[s&&/* @__PURE__ */Vr("defs",{children:s}),
|
|
9
|
+
/* @__PURE__ */Vr("path",{d:r.pathD,"data-perspective-part":r._perspectivePart,fill:s?`url(#${i})`:ye(r.style.fill,"#999"),fillOpacity:r.style.fillOpacity,stroke:r.style.stroke||"none",strokeOpacity:r.style.strokeOpacity,strokeWidth:r.style.strokeWidth,strokeDasharray:r.style.strokeDasharray,strokeLinecap:r.style.strokeLinecap,opacity:r.style.opacity})]},`net-edge-${t}`)}case"ribbon":{let r=e,i=`net-ribbon-${t}-hatch`,s=Ge(r.style.fill)?Qe(r.style.fill,i):void 0;/* */
|
|
10
|
+
return Gr(Xr.Fragment,{children:[s&&/* @__PURE__ */Vr("defs",{children:s}),
|
|
11
|
+
/* @__PURE__ */Vr("path",{d:r.pathD,"data-perspective-part":r._perspectivePart,fill:s?`url(#${i})`:ye(r.style.fill,"#999"),fillOpacity:r.style.fillOpacity,stroke:r.style.stroke||"none",strokeOpacity:r.style.strokeOpacity,strokeWidth:r.style.strokeWidth,strokeDasharray:r.style.strokeDasharray,strokeLinecap:r.style.strokeLinecap,opacity:r.style.opacity})]},`net-edge-${t}`)}case"curved":{let r=e;/* */
|
|
12
|
+
return Vr("path",{d:r.pathD,"data-perspective-part":r._perspectivePart,fill:ye(r.style.fill,"none"),fillOpacity:r.style.fill&&"none"!==r.style.fill?r.style.fillOpacity??.1:void 0,stroke:r.style.stroke||"#999",strokeOpacity:r.style.strokeOpacity,strokeWidth:r.style.strokeWidth??1,strokeDasharray:r.style.strokeDasharray,strokeLinecap:r.style.strokeLinecap,opacity:r.style.opacity},`net-edge-${t}`)}default:return null}}function Jr(e,t,r="middle",i="auto"){/* */
|
|
13
|
+
return Vr("text",{x:e.x,y:e.y,textAnchor:e.anchor||r,dominantBaseline:e.baseline||i,fontSize:e.fontSize||11,fontWeight:e.fontWeight,fill:e.fill||"var(--semiotic-text, #333)",stroke:e.stroke,strokeWidth:e.strokeWidth,paintOrder:e.paintOrder,transform:e.rotate?`rotate(${Math.round(180*e.rotate/Math.PI*100)/100} ${e.x} ${e.y})`:void 0,style:{pointerEvents:"none"},children:e.text},`net-label-${t}`)}import{Fragment as ei,jsx as ti}from"react/jsx-runtime";var ri={x:0,y:0,k:1};function ii(e){return e&&Number.isFinite(e.k)&&e.k>0&&Number.isFinite(e.x)&&Number.isFinite(e.y)?e:ri}function si(e,t){return{...e,x:e.x*t.k+t.x,y:e.y*t.k+t.y}}function ni(e,t){return{x:(e.x-t.x)/t.k,y:(e.y-t.y)/t.k,width:e.width/t.k,height:e.height/t.k}}function oi({view:e,width:t,height:r,children:i}){if(!e)/* */return ti(ei,{children:i});let{x:s,y:n,k:o}=ii(e);/* */
|
|
14
|
+
return ti("svg",{width:t,height:r,overflow:"hidden","data-network-view":"",children:/* @__PURE__ */ti("g",{transform:`translate(${s},${n}) scale(${o})`,children:i})})}function ai(e){let t=e.id??e.datum?.id??e.datum?.data?.id??e.datum?.data?.name;return null==t?void 0:String(t)}function li(e){if("glyph"===e.type&&e.glyph&&"number"==typeof e.size){let t=e.cx??e.x,r=e.cy??e.y;if("number"!=typeof t||"number"!=typeof r)return null;let i=et(e.glyph,e.size);return{x:t+i.centerDx,y:r+i.centerDy,r:Math.max(1,i.radius)}}let t=e.cx??(null!=e.x&&null!=e.w?e.x+e.w/2:e.x),r=e.cy??(null!=e.y&&null!=e.h?e.y+e.h/2:e.y);return"number"!=typeof t||"number"!=typeof r?null:{x:t,y:r,r:"number"==typeof e.r?Math.max(1,e.r):"number"==typeof e.outerR?Math.max(1,e.outerR):"number"==typeof e.size?Math.max(1,Je(e.size)):Math.max(1,e.w??0,e.h??0)/2}}function ci(e){if(!e)return;let t=[];for(let r of e){let e=li(r);e&&t.push({pointId:ai(r),...e})}return t}import{Fragment as di,jsx as ui,jsxs as hi}from"react/jsx-runtime";var yi=/* @__PURE__ */fe(function(e){let{width:t,height:r,totalWidth:i,totalHeight:s,margin:n,labels:o,title:a,description:l,idPrefix:c,legend:d,legendHoverBehavior:u,legendClickBehavior:h,legendHighlightedCategory:y,legendIsolatedCategories:p,legendPosition:f="right",legendLayout:g,foregroundGraphics:m,sceneNodes:v,annotations:k,onAnnotationActivate:b,onObservation:x,chartId:w,chartType:_,autoPlaceAnnotations:S,svgAnnotationRules:C,annotationFrame:R}=e,N=q({onAnnotationActivate:b,onObservation:x,chartId:w,chartType:_}),A=zr.useMemo(()=>{let e=ci(v)??[];return{scales:null,width:t,height:r,frameType:"network",pointNodes:e,sceneNodes:v}},[r,v,t]),E=zr.useMemo(()=>{if(!k)return k;let e=M(k);return S?ae({annotations:e,context:A,..."object"==typeof S?S:{}}):e},[k,S,A]),T=zr.useMemo(()=>ne("network"),[]),D=E?se(E.filter(e=>"widget"!==e.type),T,C,A):null,P=!0===E?.some(e=>"widget"===e.type&&!0===e._annotationDeferred),I=Yr(),{titleId:L,descId:j,labelledBy:B}=F(c||w||I);/* */
|
|
15
|
+
return hi(di,{children:[P&&/* @__PURE__ */ui("style",{children:ie},"annotation-widget-disclosure-style"),
|
|
16
|
+
/* @__PURE__ */hi("svg",{role:"img","aria-labelledby":B,width:i,height:s,style:{position:"absolute",top:0,left:0,pointerEvents:"none"},children:[
|
|
17
|
+
/* @__PURE__ */ui("title",{id:L,children:W(a,"Network Chart")}),
|
|
18
|
+
/* @__PURE__ */ui("desc",{id:j,children:O(a,l,{familyPhrase:"network data visualization",fallback:"Network data visualization"})}),
|
|
19
|
+
/* @__PURE__ */ui("g",{transform:`translate(${n.left},${n.top})`,children:/* @__PURE__ */hi(oi,{view:e.viewTransform,width:t,height:r,children:[o.map((e,t)=>Jr(e,t,"start","middle")),D,m]})}),
|
|
20
|
+
/* @__PURE__ */ui(ce,{title:a,totalWidth:i,marginTop:n.top}),G({legend:d,totalWidth:i,totalHeight:s,margin:n,legendPosition:f,title:a,legendLayout:g,legendHoverBehavior:u,legendClickBehavior:h,legendHighlightedCategory:y,legendIsolatedCategories:p})]}),E?.filter(e=>"widget"===e.type&&(null!=e.pointId||null!=e.nodeId)&&v).map((i,s)=>{let o=!0===i._annotationDeferred,a=i.pointId??i.nodeId,l=v.find(e=>e.id===a||e.datum?.id===a||e.datum?.data?.id===a||e.datum?.data?.name===a),c=l&&li(l);if(!c)return null;let d=si(c,ii(e.viewTransform));if(e.viewTransform&&(d.x<0||d.y<0||d.x>t||d.y>r))return null;let u=n.left+d.x,h=n.top+d.y,y=i.dx??0,p=i.dy??-16,f=i.width??32,g=i.height??32,m=i.content??/* @__PURE__ */ui("span",{style:{fontSize:18,cursor:"default"},children:"ℹ️"});/* */
|
|
21
|
+
return ui("div",{...Z(i,N),className:o?"annotation-deferred":void 0,"data-annotation-disclosure":o?"deferred":void 0,style:{position:"absolute",left:u+y-f/2,top:h+p-g/2,width:f,height:g,display:"flex",alignItems:"center",justifyContent:"center",zIndex:5},children:m},`widget-${s}`)})]})},"NetworkSVGOverlay");import*as pi from"react";import{useEffect as fi,useLayoutEffect as gi,useMemo as mi,useRef as vi,useState as ki}from"react";function bi(e,t){if(void 0!==t?.scrollContainer)return t.scrollContainer;if(t?.scrollContainerRef)return t.scrollContainerRef.current;let r=e.ownerDocument.defaultView;for(let t=e.parentElement;t&&r;t=t.parentElement){let e=r.getComputedStyle(t);if(/(auto|scroll|overlay)/.test(`${e.overflow} ${e.overflowX} ${e.overflowY}`))return t}return null}function xi(e,t){let r=e.ownerDocument.defaultView,i=/* @__PURE__ */new Map;for(let s of[e.parentElement,t.parentElement])for(let e=s;e;e=e.parentElement){if(e===t||i.has(e))continue;let s=r.getComputedStyle(e),n=/(auto|scroll|overlay|hidden|clip)/.test(s.overflowX||s.overflow),o=/(auto|scroll|overlay|hidden|clip)/.test(s.overflowY||s.overflow);(n||o)&&i.set(e,{element:e,x:n,y:o})}return[...i.values()]}function wi(e){let t=e.getBoundingClientRect();return{x:t.left+e.clientLeft,y:t.top+e.clientTop,width:e.clientWidth,height:e.clientHeight}}function _i(e,t){let r=Math.max(e.x,t.x),i=Math.max(e.y,t.y);return{x:r,y:i,width:Math.max(0,Math.min(e.x+e.width,t.x+t.width)-r),height:Math.max(0,Math.min(e.y+e.height,t.y+t.height)-i)}}function Si(e,t,r){let i=wi(t);if(i.width<=0||i.height<=0)return null;let s=e.ownerDocument.defaultView,n=_i(i,{x:0,y:0,width:s.innerWidth,height:s.innerHeight});for(let e of r){let t=wi(e.element);n=_i(n,{x:e.x?t.x:n.x,y:e.y?t.y:n.y,width:e.x?t.width:n.width,height:e.y?t.height:n.height})}let o=e.getBoundingClientRect();return{...n,x:n.x-o.left,y:n.y-o.top}}function Ci(e,t){return e.width>0&&e.height>0&&t.x+t.width>=e.x&&t.x<=e.x+e.width&&t.y+t.height>=e.y&&t.y<=e.y+e.height}var Ri=[];function Ni({containerRef:e,marks:t,width:r,height:i,margin:s,focusedId:n,viewTransform:o,viewport:a,htmlMarkCulling:l,onViewportChange:c}){let d=t??Ri,[u,h]=ki(null),y=vi(null);gi(()=>{y.current?.schedule()},[d,r,i,s.left,s.top]),gi(()=>{let t=e.current,r=t?o?t.closest(".stream-network-frame"):bi(t,a):null,i=t&&r?xi(t,r):[],s=y.current;if(s?.layer!==t||s?.root!==r||s.clips.length!==i.length||!i.every((e,t)=>Ee(e,s.clips[t])))if(s?.dispose(),y.current=null,t&&r){let e=t.ownerDocument.defaultView,s=null,n=()=>{s=null;let e=Si(t,r,i);h(t=>Ee(t,e)?t:e)},o=()=>{null===s&&(s=e.requestAnimationFrame(n))};t.ownerDocument.addEventListener("scroll",o,{passive:!0,capture:!0}),e.addEventListener("resize",o,{passive:!0});let a=new ResizeObserver(o),l=/* @__PURE__ */new Set([r,t.parentElement,...i.map(e=>e.element)]);for(let e of l)a.observe(e);let c=()=>{null!==s&&e.cancelAnimationFrame(s),a.disconnect(),t.ownerDocument.removeEventListener("scroll",o,!0),e.removeEventListener("resize",o)};y.current={layer:t,root:r,clips:i,schedule:o,dispose:c},n()}else h(null)}),gi(()=>()=>{y.current?.dispose(),y.current=null},[]);let p=Number.isFinite(l?.overscan)&&l.overscan>=0?l.overscan:400,f=mi(()=>{let e=null!=r&&null!=i?{x:0,y:0,width:r,height:i}:null,t=u&&e?_i(u,e):u,a=o?t??e:u,c=o&&(t??e)?ni(t??e,ii(o)):t,h=a?{x:a.x-p,y:a.y-p,width:a.width+2*p,height:a.height+2*p}:null,y=o&&h?ni(h,ii(o)):h&&e?_i(h,e):h,f=new Set(l?.pinnedIds);null!==n&&f.add(n);let g=!1!==l?.enabled&&y?d.filter(e=>f.has(e.id)||Ci(y,e)):d,m={...e?{plotRect:{...e,x:s.left,y:s.top}}:{},visibleRect:c,renderRect:y,visibleMarkIds:c?d.filter(e=>Ci(c,e)).map(e=>e.id):null,mountedMarkIds:g.map(e=>e.id)};return{mounted:g,snapshot:m}},[d,u,r,i,p,l?.enabled,l?.pinnedIds,n,o,s.left,s.top]),g=vi(void 0);return fi(()=>{c?Ee(g.current,f.snapshot)||(g.current=f.snapshot,c(f.snapshot)):g.current=void 0},[c,f.snapshot]),f.mounted}import{jsx as Ai}from"react/jsx-runtime";var Ei={position:"absolute",top:0,left:0,pointerEvents:"none"};function Ti({marks:e,margin:t,selection:r=null,width:i,height:s,viewTransform:n,viewport:o,htmlMarkCulling:a,onViewportChange:l}){let c=pi.useRef(null),[d,u]=pi.useState(null),h=Ni({containerRef:c,marks:e,width:i,height:s,focusedId:d,viewTransform:n,viewport:o,htmlMarkCulling:a,onViewportChange:l,margin:t});if(pi.useLayoutEffect(()=>{if(null===d||e?.some(e=>e.id===d))return;let t=c.current,r=t?.ownerDocument;r?.activeElement===r?.body&&t?.closest(".stream-network-frame")?.focus({preventScroll:!0}),u(null)},[e,d]),!(e&&0!==e.length||l||null!==d))return null;let y=ii(n),p=/* @__PURE__ */Ai("div",{className:"semiotic-network-html-marks",ref:c,onFocusCapture:e=>{let t=e.target.closest("[data-mark-id]");t&&e.currentTarget.contains(t)&&u(t.dataset.markId??null)},onBlurCapture:e=>{e.currentTarget.contains(e.relatedTarget)||u(null)},style:{...Ei,transform:`translate(${t.left}px, ${t.top}px)`,...n?{width:i,height:s,overflow:"clip"}:{}},children:/* @__PURE__ */Ai("div",{style:{transformOrigin:"0 0",transform:`translate(${y.x}px, ${y.y}px) scale(${y.k})`},children:h.map(e=>/* @__PURE__ */Ai("div",{className:"semiotic-network-html-mark","data-mark-id":e.id,style:{position:"absolute",transform:`translate(${e.x}px, ${e.y}px)`,width:e.width,height:e.height,pointerEvents:"none"},children:e.content},e.id))})});/* */
|
|
22
|
+
return Ai(Y,{value:r,children:p})}import*as Di from"react";function Pi(e,t){let r=0,i=0;for(let t of e)t&&"object"==typeof t&&null!==t.datum&&r++;for(let e of t){if(!e||"object"!=typeof e)continue;let t=e.datum,r=t&&"object"==typeof t&&!Array.isArray(t)&&"__chordEdges"in t?t.__chordEdges:void 0;i+=Array.isArray(r)?r.length:1}return{nodeCount:r,edgeCount:i}}import{jsx as Ii}from"react/jsx-runtime";var Li=/* @__PURE__ */Di.lazy(()=>import("./c-M7QUZZCE.min.js"));function Mi(e){let{nodes:t,edges:r,chartTitle:i,chartType:s,tableId:n}=e,o=We(),{nodeCount:a,edgeCount:l}=Pi(t,r);return a||l?/* @__PURE__ */Ii(Me,{interaction:o,tableId:n,regionLabel:`Data summary for ${i||(n?`${s} ${n}`:s)}`,countLabel:`${a} nodes, ${l} edges`,className:tt,children:o.isExpanded&&/* @__PURE__ */Ii(Di.Suspense,{fallback:/* @__PURE__ */Ii("div",{role:"status",children:"Loading data summary…"}),children:/* @__PURE__ */Ii(Li,{...e,revealRows:o.revealRows})})}):n?/* @__PURE__ */Ii("span",{id:n,tabIndex:-1,style:ze}):null}import{Fragment as Wi,jsx as Oi,jsxs as Fi}from"react/jsx-runtime";function ji(e){/* */
|
|
23
|
+
return Fi(Wi,{children:[
|
|
24
|
+
/* @__PURE__ */Oi(Be,{tableId:e.tableId}),
|
|
25
|
+
/* @__PURE__ */Oi(Mi,{...e})]})}import{jsx as Bi,jsxs as $i}from"react/jsx-runtime";function zi({tableId:e,props:t,store:r,responsiveRef:i,size:s,margin:n,adjustedWidth:o,adjustedHeight:a,surfaceBackground:l,resolvedBackground:c,resolvedForeground:d}){let{chartType:u,nodes:h,edges:y,data:p,className:g,description:m,title:v,responsiveWidth:k,responsiveHeight:b,summary:x,accessibleTable:w=!0,renderMode:_,legend:S,legendPosition:C,legendLayout:N,legendHoverBehavior:A,legendClickBehavior:E,legendHighlightedCategory:T,legendIsolatedCategories:D,layoutSelection:P,annotations:I,onAnnotationActivate:L,annotationObservationCallback:M,onObservation:W,chartId:O,autoPlaceAnnotations:F,svgAnnotationRules:j}=t;if(r){let e=["tree","cluster","treemap","circlepack","partition","orbit"].includes(u),t=e?p||(Array.isArray(y)?void 0:y):void 0;if(e&&t)r.ingestHierarchy(t,[o,a]),r.cancelIntroAnimation(),r.buildScene([o,a]);else{let e=ve(h),t=Array.isArray(y)?ve(y):[];(e.length>0||t.length>0)&&(r.ingestBounded(e,t,[o,a]),r.cancelIntroAnimation(),r.buildScene([o,a]))}}let B=r?.sceneNodes??[],$=r?.sceneEdges??[],z=r?.labels??[],Y=r?.perspective.frame,H=r?.lastCustomLayoutResult?.perspective,V=r?.perspective.underlay??[];/* */
|
|
26
|
+
return $i("div",{ref:i,className:"stream-network-frame"+(g?` ${g}`:""),role:w||r?.customLayoutHtmlMarks?.length?"group":"img","aria-label":m||("string"==typeof v?v:"Network chart"),style:{position:"relative",fontFamily:"var(--semiotic-font-family, sans-serif)",width:k?"100%":s[0],height:b?"100%":s[1],overflow:t.viewTransform?"clip":void 0},children:[w&&/* @__PURE__ */Bi(Oe,{accessibleTable:w,children:/* @__PURE__ */Bi(ji,{nodes:B,edges:$,chartType:"Network chart",chartTitle:"string"==typeof v?v:void 0,tableId:e})}),
|
|
27
|
+
/* @__PURE__ */Bi(je,{summary:x}),
|
|
28
|
+
/* @__PURE__ */$i("svg",{xmlns:"http://www.w3.org/2000/svg",width:s[0],height:s[1],style:{position:"absolute",left:0,top:0},children:[l?/* @__PURE__ */Bi("rect",{className:"stream-frame-background__backdrop",x:0,y:0,width:s[0],height:s[1],fill:l}):null,
|
|
29
|
+
/* @__PURE__ */Bi("g",{transform:`translate(${n.left},${n.top})`,children:/* @__PURE__ */Bi(oi,{view:t.viewTransform,width:o,height:a,children:R(c,kt(r?.customLayoutBackgrounds,Y,H))})}),
|
|
30
|
+
/* @__PURE__ */Bi("g",{transform:`translate(${n.left},${n.top})`,children:/* @__PURE__ */$i(oi,{view:t.viewTransform,width:o,height:a,children:[V.map((e,t)=>Ur(e,t+$.length+B.length)),$.map((e,t)=>f({node:e,index:t,renderMode:_,fallback:()=>Ur(e,t)})).filter(Boolean),B.map((e,t)=>f({node:e,index:t,renderMode:_,fallback:()=>Kr(e,t)})).filter(Boolean)]})})]}),
|
|
31
|
+
/* @__PURE__ */Bi(yi,{viewTransform:t.viewTransform,width:o,height:a,totalWidth:s[0],totalHeight:s[1],margin:n,labels:z,sceneNodes:B,title:v,description:m,legend:S,legendPosition:C,legendLayout:N,legendHoverBehavior:A,legendClickBehavior:E,legendHighlightedCategory:T,legendIsolatedCategories:D,foregroundGraphics:kt(R(d,kt(X(r?.customLayoutOverlays,P??null),Y,H)),Y),annotations:I,onAnnotationActivate:L,onObservation:M??W,chartId:O,chartType:"StreamNetworkFrame",autoPlaceAnnotations:F,svgAnnotationRules:j,annotationFrame:0}),
|
|
32
|
+
/* @__PURE__ */Bi(Ti,{viewTransform:t.viewTransform,marks:r?.customLayoutHtmlMarks,margin:n,selection:P??null,width:o,height:a,viewport:t.viewport,htmlMarkCulling:t.htmlMarkCulling,onViewportChange:t.onViewportChange})]})}import{jsx as Yi,jsxs as Xi}from"react/jsx-runtime";var Hi=/^(value|amount|total|count|weight|score)$/i,Vi=/* @__PURE__ */st(function({data:e}){if("edge"===e.nodeOrEdge){let t=e.data;if(!t)return null;let r="object"==typeof t.source?t.source.id:t.source,i="object"==typeof t.target?t.target.id:t.target,s=t.__chordEdges;return s&&s.length>1?/* @__PURE__ */Xi("div",{className:"semiotic-tooltip",style:it,children:[
|
|
33
|
+
/* @__PURE__ */Xi("div",{style:{fontWeight:600},children:["Connections: ",s.length]}),s.map((e,t)=>/* @__PURE__ */Xi("div",{style:{marginTop:4,opacity:.8},children:["object"==typeof e.source?e.source.id:e.source," → ","object"==typeof e.target?e.target.id:e.target,": ",e.value.toLocaleString()]},e._edgeKey??t))]}):/* @__PURE__ */Xi("div",{className:"semiotic-tooltip",style:it,children:[
|
|
34
|
+
/* @__PURE__ */Xi("div",{style:{fontWeight:600},children:[r," → ",i]}),null!=t.value&&/* @__PURE__ */Xi("div",{style:{marginTop:4,opacity:.8},children:["Value:"," ","number"==typeof t.value?t.value.toLocaleString():String(t.value)]})]})}let t=e.data;if(!t)return null;let r=t.__hierarchyNode;if(r){let e=[],i=r;for(;i;){let r=i.data?.name??i.data?.id??t.id;null!=r&&e.unshift(String(r)),i=i.parent}e.length>1&&e.shift();let s=e.length-1;/* */
|
|
35
|
+
return Xi("div",{className:"semiotic-tooltip",style:it,children:[
|
|
36
|
+
/* @__PURE__ */Yi("div",{children:e.map((e,t)=>/* @__PURE__ */Xi("span",{children:[t>0&&/* @__PURE__ */Yi("span",{style:{margin:"0 3px",opacity:.5},children:" → "}),t===s?/* @__PURE__ */Yi("strong",{children:e}):/* @__PURE__ */Yi("span",{style:{opacity:.7},children:e})]},t))}),null!=t.value&&t.value>0&&/* @__PURE__ */Yi("div",{style:{marginTop:4,opacity:.8},children:"number"==typeof t.value?t.value.toLocaleString():String(t.value)})]})}let i=(t.sourceLinks?.length||0)+(t.targetLinks?.length||0),s=(t.sourceLinks||[]).reduce((e,t)=>e+(t.value||0),0)+(t.targetLinks||[]).reduce((e,t)=>e+(t.value||0),0),n=t.data??t,o=oe(n),a=null!=o.title?String(o.title):t.id,l=o.entries.some(e=>Hi.test(e.key));/* */
|
|
37
|
+
return Xi("div",{className:"semiotic-tooltip",style:it,children:[
|
|
38
|
+
/* @__PURE__ */Yi("div",{style:{fontWeight:600},children:a}),o.entries.map(e=>/* @__PURE__ */Xi("div",{style:{marginTop:4,opacity:.8},children:[e.key,": ",g(e.value)]},e.key)),!l&&null!=t.value&&t.value>0&&/* @__PURE__ */Xi("div",{style:{marginTop:4,opacity:.8},children:["Total:"," ","number"==typeof t.value?t.value.toLocaleString():String(t.value)]}),i>0&&/* @__PURE__ */Xi("div",{style:{marginTop:4,opacity:.8},children:["Connections: ",i,s!==i&&` (weighted: ${s.toLocaleString()})`]})]})});function Gi(e){let{currentTheme:t,...r}=e;return{...r,themeCategorical:t?.colors?.categorical,themeSequential:t?.colors?.sequential,themeSelectionOpacity:t?.colors?.selectionOpacity,themeSemantic:rt(t)}}function Qi(e){return e._cachedPath2D&&e._cachedPath2DSource===e.pathD||(e._cachedPath2D=new Path2D(e.pathD),e._cachedPath2DSource=e.pathD),e._cachedPath2D}function Ki(e,t){for(let r of t)switch(r.type){case"bezier":qi(e,r);break;case"line":Ui(e,r);break;case"ribbon":Zi(e,r);break;case"curved":Ji(e,r)}}function qi(e,t){if(!t.pathD)return;e.save(),t.style.strokeDasharray&&e.setLineDash(t.style.strokeDasharray.split(/[\s,]+/).map(Number)),t.style.strokeLinecap&&(e.lineCap=t.style.strokeLinecap);let r=Qi(t);if(t.style.fill&&"none"!==t.style.fill){let i=t._gradient;if(i){let r=e.createLinearGradient(i.x0,i.y0??0,i.x1,i.y1??0),s=t.style.fillOpacity??t.style.opacity??.5,n="string"==typeof t.style.fill?t.style.fill:"#999",o=Ve(e,n)||n;r.addColorStop(0,1===i.from?o:"transparent"),r.addColorStop(1,1===i.to?o:"transparent"),e.fillStyle=r,e.globalAlpha=s}else e.fillStyle=Ke(e,t.style.fill,"#007bff"),e.globalAlpha=t.style.fillOpacity??t.style.opacity??.5;e.fill(r)}t.style.stroke&&"none"!==t.style.stroke&&(t.style.strokeWidth??.5)>0&&(e.strokeStyle=Ve(e,t.style.stroke)||t.style.stroke,e.lineWidth=t.style.strokeWidth??.5,e.globalAlpha=(t.style.opacity??1)*(t.style.strokeOpacity??1)*.5,e.stroke(r)),t._pulseIntensity&&t._pulseIntensity>0&&(e.fillStyle=t._pulseColor||"rgba(255,255,255,0.6)",e.globalAlpha=.2*t._pulseIntensity,e.fill(r)),e.restore()}function Ui(e,t){if("none"===t.style.stroke||(t.style.strokeWidth??1)<=0)return;e.save(),t.style.strokeDasharray&&e.setLineDash(t.style.strokeDasharray.split(/[\s,]+/).map(Number)),t.style.strokeLinecap&&(e.lineCap=t.style.strokeLinecap);let r=t.style.stroke||"#999";e.strokeStyle=Ve(e,r)||r,e.lineWidth=t.style.strokeWidth??1,e.globalAlpha=(t.style.opacity??e.globalAlpha)*(t.style.strokeOpacity??1),e.beginPath(),e.moveTo(t.x1,t.y1),e.lineTo(t.x2,t.y2),e.stroke(),t._pulseIntensity&&t._pulseIntensity>0&&(e.setLineDash([]),e.strokeStyle=t._pulseColor||"rgba(255,255,255,0.6)",e.lineWidth=(t.style.strokeWidth??1)+3*t._pulseIntensity,e.globalAlpha=.4*t._pulseIntensity,e.beginPath(),e.moveTo(t.x1,t.y1),e.lineTo(t.x2,t.y2),e.stroke()),e.restore()}function Zi(e,t){if(!t.pathD)return;e.save(),t.style.strokeDasharray&&e.setLineDash(t.style.strokeDasharray.split(/[\s,]+/).map(Number)),t.style.strokeLinecap&&(e.lineCap=t.style.strokeLinecap);let r=Qi(t);t.style.fill&&"none"!==t.style.fill&&(e.fillStyle=Ke(e,t.style.fill,"#007bff"),e.globalAlpha=t.style.fillOpacity??t.style.opacity??.5,e.fill(r)),t.style.stroke&&"none"!==t.style.stroke&&(t.style.strokeWidth??.5)>0&&(e.strokeStyle=Ve(e,t.style.stroke)||t.style.stroke,e.lineWidth=t.style.strokeWidth??.5,e.globalAlpha=(t.style.opacity??1)*(t.style.strokeOpacity??1)*.3,e.stroke(r)),t._pulseIntensity&&t._pulseIntensity>0&&(e.fillStyle=t._pulseColor||"rgba(255,255,255,0.6)",e.globalAlpha=.25*t._pulseIntensity,e.fill(r)),e.restore()}function Ji(e,t){if(!t.pathD)return;e.save(),t.style.strokeDasharray&&e.setLineDash(t.style.strokeDasharray.split(/[\s,]+/).map(Number)),t.style.strokeLinecap&&(e.lineCap=t.style.strokeLinecap);let r=Qi(t);if("none"!==t.style.stroke&&(t.style.strokeWidth??1)>0){let i=t.style.stroke||"#999";e.strokeStyle=Ve(e,i)||i,e.lineWidth=t.style.strokeWidth??1,e.globalAlpha=(t.style.opacity??e.globalAlpha)*(t.style.strokeOpacity??1),e.stroke(r)}t.style.fill&&"none"!==t.style.fill&&(e.fillStyle=Ke(e,t.style.fill,"#007bff"),e.globalAlpha=t.style.fillOpacity??.1,e.fill(r)),e.restore()}var es=null;function ts(e){if(typeof Path2D>"u"||!e)return null;es||(es=/* @__PURE__ */new Map);let t=es.get(e);return t||(t=new Path2D(e),es.size>2048&&es.clear(),es.set(e,t)),t}function rs(e,t,r,i){if(!r?.length||!t.fill)return;let s=e.globalAlpha,o=(t.opacity??s)*(t.fillOpacity??1);if(!(o>0))return;let a=Ke(e,t.fill,i),l=a;if("string"!=typeof a||!/^\s*(none|transparent)\s*$/i.test(a)&&(e.fillStyle=a,l=e.fillStyle,!/^rgba\(.*,\s*0(\.0+)?\s*\)$/.test(l))){e.globalAlpha=o;for(let t of r){let r=ts(t.pathD);r&&(e.fillStyle="string"==typeof l?n(l,t.shade):l,e.fill(r))}e.globalAlpha=s}}function is(e,t){for(let r of t){if("rect"!==r.type)continue;let t=r;if(t.w<=0||t.h<=0)continue;e.save(),void 0!==t.style.opacity&&(e.globalAlpha=t.style.opacity);let i=t.pathD?ts(t.pathD):null;i?(rs(e,t.style,t.faces,"#007bff"),qe(e,t.style,"#007bff",()=>e.fill(i)),Ue(e,t.style,()=>e.stroke(i)),$(e,t,.3,i)):(qe(e,t.style,"#007bff",()=>e.fillRect(t.x,t.y,t.w,t.h)),Ue(e,t.style,()=>e.strokeRect(t.x,t.y,t.w,t.h)),$(e,t)),e.restore()}}function ss(e,t){for(let r of t){if("circle"!==r.type)continue;let t=r;if(t.r<=0)continue;e.save(),void 0!==t.style.opacity&&(e.globalAlpha=t.style.opacity);let i=t.pathD?ts(t.pathD):null;i?(rs(e,t.style,t.faces,"#007bff"),qe(e,t.style,"#007bff",()=>e.fill(i)),Ue(e,t.style,()=>e.stroke(i))):(e.beginPath(),e.arc(t.cx,t.cy,t.r,0,2*Math.PI),qe(e,t.style,"#007bff",()=>e.fill()),Ue(e,t.style,()=>e.stroke())),z(e,t),e.restore()}}function ns(e,t){for(let r of t){if("arc"!==r.type)continue;let t=r;e.save(),void 0!==t.style.opacity&&(e.globalAlpha=t.style.opacity);let i=t.pathD?ts(t.pathD):null;i?(rs(e,t.style,t.faces,"#007bff"),qe(e,t.style,"#007bff",()=>e.fill(i)),Ue(e,t.style,()=>e.stroke(i))):(e.beginPath(),e.arc(t.cx,t.cy,t.outerR,t.startAngle,t.endAngle),e.arc(t.cx,t.cy,t.innerR,t.endAngle,t.startAngle,!0),e.closePath(),qe(e,t.style,"#007bff",()=>e.fill()),Ue(e,t.style,()=>e.stroke())),e.restore()}}function os(e,t,r,i,s,n){let o=i.radius??Pt.radius,a=i.opacity??Pt.opacity;e.globalAlpha=a;for(let a=0;a<t.particles.length;a++){let l=t.particles[a];if(!l.active)continue;let c,d=r[l.edgeIndex];if(d){if(c="string"==typeof i.color&&"inherit"!==i.color?i.color:s(d),e.fillStyle=Ve(e,c)||c,e.beginPath(),n){let[t,r]=n(l.x,l.y,d,l.t);e.arc(t,r,o,0,2*Math.PI)}else e.arc(l.x,l.y,o,0,2*Math.PI);e.fill()}}e.globalAlpha=1}function as(e,t,r,i,s=Math.random){let n=i.spawnRate??Pt.spawnRate,o=i.maxPerEdge??Pt.maxPerEdge;for(let i=0;i<t.length;i++){let a=t[i];if(!a.bezier||e.countForEdge(i)>=o)continue;let l=a.bezier.circular?.3:1,c=a.value*n*r*l,d=Math.floor(c),u=c-d,h=d;s()<u&&h++;for(let t=0;t<h&&!(e.countForEdge(i)>=o);t++)e.spawn(i,s)}}var ls={rect:is,circle:ss,arc:ns,symbol:function(e,t){if(!t.some(e=>"symbol"===e.type&&e.faces))return void d(e,t);let r=e.globalAlpha;for(let i of t)"symbol"===i.type&&(i.faces&&(rs(e,{...i.style,opacity:r*(i.style.opacity??1)},i.faces,"#007bff"),e.globalAlpha=r),d(e,[i]))},glyph:u};function cs(e,t){let r=0;for(let i=1;i<=t.length;i++){if(i<t.length&&t[i].type===t[r].type)continue;let s=ls[t[r]?.type];s&&s(e,0===r&&i===t.length?t:t.slice(r,i)),r=i}}function ds(e){let{canvas:t,store:r,sceneRevisionDiagnostics:i,size:s,margin:n,adjustedWidth:o,adjustedHeight:a,background:l,themeBackground:h,maxDevicePixelRatio:y,renderMode:f,hasBackgroundGraphics:g=!1,dirtyRef:m,resolutionDirtyRef:v,lastFrameTimeRef:k,now:b,random:x,reducedMotion:w,showParticles:_,isContinuous:S,animate:C,decay:R,pulse:N,thresholds:A,staleness:E,particleStyle:T,getParticleColor:D,pendingAnnotationFrameRef:P,lastAnnotationFrameTimeRef:I,setAnnotationFrame:L,scheduleNextFrame:M,syncColorMap:W,onSceneOrStyleChange:O}=e,F=t.getContext("2d");if(!F)return;let B=k.current?Math.min((b-k.current)/1e3,.1):.016;e.cameraOnly||(k.current=b);let $=!e.cameraOnly&&null!=r.transition,z=!e.cameraOnly&&r.advanceTransition(w?b+1e6:b),Y=!w&&z,X=$&&!z,H=!w&&!e.cameraOnly&&r.tickAnimation([o,a],B),V=!e.cameraOnly&&r.advancePerspectiveTransition(b,w),G=!e.cameraOnly&&m.current,Q=!e.cameraOnly&&i?.beforeCompute(r.getLastUpdateResult(),Y),K=$||G||H||V;K&&(r.buildScene([o,a]),G&&W?.()),Q&&i?.afterCompute(Q,K,!0);let q=_&&!w&&!!r.particlePool,Z=!!R||!!N||!!A||!1!==C&&r.hasActiveTopologyDiff||r.hasActivePulses||r.hasActiveThresholds,ee=r.consumeStylePaintPending();(K||ee||e.cameraOnly)&&O?.({inventoryChanged:G||ee,geometryChanged:K});let te=c({dirtyOrRebuilt:K,transitioning:Y,animationTicked:H,continuous:q||S,liveEncoding:Z,forced:ee||!0===v?.current||e.cameraOnly});v&&(v.current=!1);let re=E?.threshold??5e3,ie=!!E&&r.lastIngestTime>0&&b-r.lastIngestTime>re;if(te){let i=J(y,s);if(!U(t,s,n,i))return;if(F.clearRect(-n.left,-n.top,s[0],s[1]),j(F,{background:l,themeBackground:h,hasBackgroundGraphics:g,x:-n.left,y:-n.top,width:s[0],height:s[1]}),F.save(),e.viewTransform){let t=ii(e.viewTransform);F.beginPath(),F.rect(0,0,o,a),F.clip(),F.translate(t.x,t.y),F.scale(t.k,t.k)}if(e.cameraOnly||(R&&r.applyDecay(),N&&r.applyPulse(b),A&&r.applyThresholds(b),!1!==C&&r.applyTopologyDiff(b)),ie&&(F.globalAlpha=E?.dimOpacity??.5),r.perspective.underlay.length&&Ki(F,r.perspective.underlay),p({context:F,nodes:r.sceneEdges,renderMode:f,pixelRatio:i,paintBuiltIn:e=>Ki(F,e)}),p({context:F,nodes:r.sceneNodes,renderMode:f,pixelRatio:i,paintBuiltIn:e=>{let t=e;r.perspective.frame?cs(F,t):(is(F,t),ss(F,t),ns(F,t),d(F,t),u(F,t))}}),q&&!ie){let t=r.edgesArray;if(t.length>0){e.cameraOnly||as(r.particlePool,t,B,T,x);let i,s=.5*(T.speedMultiplier??1);if(T.proportionalSpeed){let e=t.reduce((e,t)=>Math.max(e,t.value||1),1);i=t.map(t=>.3+(t.value||1)/e*1.7)}e.cameraOnly||r.particlePool.step(B,s,t,i),os(F,r.particlePool,t,T,D,r.perspective.projectParticle)}}ie&&(F.globalAlpha=1),F.restore()}if(e.cameraOnly)return;m.current=!1,K&&t.setAttribute("aria-label",Fe(r.sceneNodes?.length??0,r.sceneEdges?.length??0,r.perspective.label("Network chart")));let se=K||P.current;se&&(X||b-I.current>=33)?(L(e=>e+1),I.current=b,P.current=!1):P.current=!!se,(S||Y||null!=r.transition||r.perspective.transitioning||H||r.hasActivePulses||r.hasActiveThresholds||!1!==C&&r.hasActiveTopologyDiff||P.current)&&M()}function us(e,t){return e?"object"==typeof e?e:t?.get(e)??null:null}function hs(e){let{node:t,colorBy:r,colorScheme:i,nodeColorMap:s,colorIndexRef:n}=e;if("function"==typeof r)return String(r(t));if("string"==typeof r&&t.data){let e=t.data[r];if(void 0!==e){if(!s.has(String(e))){let t=Array.isArray(i)?i:He;s.set(String(e),t[n.current++%t.length])}return s.get(String(e))}}if(s.has(t.id))return s.get(t.id);let o=Array.isArray(i)?i:He,a=r?o[n.current++%o.length]:o[0];return s.set(t.id,a),a}function ys(e){let{edge:t,edgeColorBy:r,getNodeColor:i,resolveEndpoint:s,fallback:n}=e;if("function"==typeof r)return r(t);let o=s(t.source),a=s(t.target);return"target"===r&&a?i(a):o?i(o):n}function ps(e){let{edge:t,particleStyleColor:r,particleColorBy:i,hasExplicitParticleColorBy:s,getEdgeColor:n,getNodeColor:o,resolveEndpoint:a,fallback:l}=e;if("function"==typeof r){let e=a(t.source);return e?r(t,e):l}if(!s)return n(t);let c=i,d=a(t.source),u=a(t.target);return"target"===c&&u?o(u):d?o(d):l}function fs(e){let{sceneNodes:t,nodes:r,nodeColorMap:i,colorScheme:s}=e;for(let e of t)e.id&&"string"==typeof e.style?.fill&&i.set(e.id,e.style.fill);let n=Array.isArray(s)?s:He,o=Array.from(r);for(let e=0;e<o.length;e++){let t=o[e];i.has(t.id)||i.set(t.id,n[e%n.length])}return o.length}function gs(e,t){return(e.depth??-1)>(t?.depth??-1)}function ms(e,t,r,i,s=30,n,o=0,a=!0,l=1){let c=null,d=1/0,u=1/0,h=e.some(e=>"rect"===e.type&&e._hitPath);if(h&&(n=null),n){let e=P(n,r,i,s,o,e=>e.cx,e=>e.cy,e=>e.r,gs);e&&(c={mark:e.node,type:"node",datum:e.node.datum,x:e.node.cx,y:e.node.cy,distance:e.distance},d=e.distance)}for(let t of e){if(n&&"circle"===t.type)continue;let e=vs(t,r,i,s);if(e)if(e.mark=t,h)c=e;else if("rect"===t.type){let r=t.w*t.h;(r<u||r===u&&gs(t,c?.mark))&&(c=e,u=r)}else(e.distance<d||e.distance===d&&"circle"===t.type&&"circle"===c?.mark?.type&&gs(t,c.mark))&&(c=e,d=e.distance)}if(c)return c;if(!a)return null;for(let e of t){if(!1===e.interactive)continue;let t=Es(e,r,i,5/l);t&&(t.mark=e),t&&t.distance<d&&(c=t,d=t.distance)}return c}function vs(e,t,r,i=30){if(!e.datum)return null;switch(e.type){case"circle":return ws(e,t,r,i);case"rect":{let i=_s(e,t,r);if(!i||!e._hitPath)return i;let s=e._hitPath,[n,o,a,l]=s.transform,c=As(s),d=Ns();if(!c||!d||0===a||0===l)return null;let u=(t-n)/a,h=(r-o)/l;if(s.fill&&d.isPointInPath(c,u,h))return i;if(s.strokeWidth>0){let e=d.lineWidth;d.lineWidth=s.strokeWidth;let t=d.isPointInStroke(c,u,h);if(d.lineWidth=e,t)return i}return null}case"arc":return Ss(e,t,r);case"symbol":return bs(e,t,r,i);case"glyph":return ks(e,t,r,i);default:return null}}function ks(e,t,r,i=30){let s=et(e.glyph,e.size),n=e.cx+s.centerDx,o=e.cy+s.centerDy,a=t-n,l=r-o,c=Math.sqrt(a*a+l*l);return c<=T(s.radius,i)?{type:"node",datum:e.datum,x:n,y:o,distance:c}:null}function bs(e,t,r,i=30){let s=t-e.cx,n=r-e.cy,o=Math.sqrt(s*s+n*n);return o<=T(Je(e.size),i)?{type:"node",datum:e.datum,x:e.cx,y:e.cy,distance:o}:null}function xs(e,t,r,i,s){let n=As(e),o=Ns();return n&&o&&o.isPointInPath(n,t,r)?{type:"node",datum:e.datum,x:i,y:s,distance:0}:null}function ws(e,t,r,i=30){if(e.pathD&&!e._perspectiveToken)return xs(e,t,r,e.cx,e.cy);let s=t-e.cx,n=r-e.cy,o=Math.sqrt(s*s+n*n);return o<=T(e.r,i)?{type:"node",datum:e.datum,x:e.cx,y:e.cy,distance:o}:null}function _s(e,t,r){let i=E(t,r,e);return i.hit?{type:"node",datum:e.datum,x:i.cx,y:i.cy,distance:0}:null}function Ss(e,t,r){if(e.pathD)return xs(e,t,r,t,r);let i=t-e.cx,s=r-e.cy,n=Math.sqrt(i*i+s*s);if(n<e.innerR-2||n>e.outerR+2)return null;let o=D(Math.atan2(s,i)),a=D(e.startAngle),l=D(e.endAngle);if(a<=l?o>=a&&o<=l:o>=a||o<=l){let t=(e.startAngle+e.endAngle)/2,r=(e.innerR+e.outerR)/2;return{type:"node",datum:e.datum,x:e.cx+r*Math.cos(t),y:e.cy+r*Math.sin(t),distance:0}}return null}var Cs=null,Rs=null;function Ns(){return Rs||((Cs=document.createElement("canvas")).width=1,Cs.height=1,Rs=Cs.getContext("2d")),Rs}function As(e){if(e._cachedPath2D&&e._cachedPath2DSource===e.pathD)return e._cachedPath2D;try{return e._cachedPath2D=new Path2D(e.pathD),e._cachedPath2DSource=e.pathD,e._cachedPath2D}catch{return null}}function Es(e,t,r,i){switch(e.type){case"bezier":case"ribbon":case"curved":return Ds(e,t,r,i);case"line":return Ts(e,t,r,i);default:return null}}function Ts(e,t,r,i){let s=e.x2-e.x1,n=e.y2-e.y1,o=s*s+n*n;if(0===o)return null;let a=((t-e.x1)*s+(r-e.y1)*n)/o;a=Math.max(0,Math.min(1,a));let l=e.x1+a*s,c=e.y1+a*n,d=Math.sqrt((t-l)**2+(r-c)**2);return d<=i?{type:"edge",datum:e.datum,x:l,y:c,distance:d}:null}function Ds(e,t,r,i){if(!e.pathD)return null;let s=As(e),n=Ns();if(!s||!n)return null;try{if(e.style.fill&&"none"!==e.style.fill&&n.isPointInPath(s,t,r))return{type:"edge",datum:e.datum,x:t,y:r,distance:0};let o=n.lineWidth;n.lineWidth=2*i;let a=n.isPointInStroke(s,t,r);if(n.lineWidth=o,a)return{type:"edge",datum:e.datum,x:t,y:r,distance:4}}catch{}return null}function Ps(e){let{clientX:t,clientY:r,canvasRect:i,margin:s,adjustedWidth:n,adjustedHeight:o,sceneNodes:a,sceneEdges:l,nodeQuadtree:c,maxNodeRadius:d,hitRadius:u=30,includeEdges:h=!0}=e,y=t-i.left-s.left,p=r-i.top-s.top;if(y<0||y>n||p<0||p>o)return{kind:"miss-outside"};let f=ii(e.viewTransform),g=ms(a,l,(y-f.x)/f.k,(p-f.y)/f.k,u/f.k,c,d,h,f.k);if(!g)return{kind:"miss"};let m=g.datum||{};return{kind:"hit",hover:Ye(m,g.x,g.y,{nodeOrEdge:g.type}),mark:g.mark}}import{useCallback as Is}from"react";var Ls="StreamNetworkFrame";function Ms({customHoverBehavior:e,customClickBehavior:t,onObservation:r,chartId:i}){return{customHoverBehavior:Is((t,s)=>{e?.(t,s),he({onObservation:r,datum:t?t.data||t:null,x:t?.x,y:t?.y,chartType:Ls,chartId:i,context:s})},[e,r,i]),customClickBehavior:Is((e,s)=>{t?.(e,s),pe({onObservation:r,datum:e?e.data||e:null,x:e?.x,y:e?.y,chartType:Ls,chartId:i,context:s})},[t,r,i])}}function Ws(e,t,r,i,s){return("sankey"===e||t)&&r||i||s}function Os(e,t,r){return e.nodes=be(t),e.edges=be(r),e.nodes||e.edges}function Fs(e){we(e.canvas,e.pointer,t=>{let r=Ps({clientX:t.clientX,clientY:t.clientY,canvasRect:e.canvas.getBoundingClientRect(),margin:e.margin,adjustedWidth:e.width,adjustedHeight:e.height,sceneNodes:e.store.sceneNodes,sceneEdges:e.store.sceneEdges,nodeQuadtree:e.geometryMoved?null:e.store.nodeQuadtree,maxNodeRadius:e.geometryMoved?0:e.store.maxNodeRadius,includeEdges:e.cursorInventory.edges,viewTransform:e.viewTransform});return"hit"===r.kind?ke(r.mark):void 0})}import{useEffect as js,useRef as Bs}from"react";function $s(t,r,i){let s=Bs(i);s.current=i,js(()=>{if(!r&&Ft(t)&&!e(t))return l(()=>import("./c-BMZ6SLYD.min.js").then(e=>{e.registerBuiltInNetworkLayouts()}),()=>s.current(),`StreamNetworkFrame layout "${t}"`)},[t,r])}import{jsx as zs,jsxs as Ys}from"react/jsx-runtime";var Xs=[800,600],Hs=/* @__PURE__ */fe(/* @__PURE__ */Tt(/* @__PURE__ */Et(function(e,s){let{chartType:n,nodes:o,edges:a,data:l,initialEdges:c,nodeIDAccessor:d="id",sourceAccessor:u="source",targetAccessor:p="target",valueAccessor:f="value",edgeIdAccessor:g,childrenAccessor:w,hierarchySum:_,orientation:S="horizontal",nodeAlign:C="justify",nodePaddingRatio:E=.05,nodeWidth:T=15,iterations:D=300,forceStrength:P=.1,layoutExecution:M="auto",layoutLoadingContent:W,onLayoutStateChange:O,padAngle:F=.01,groupWidth:j=20,sortGroups:$,edgeSort:z,treeOrientation:Y="vertical",edgeType:H="curve",padding:V,paddingTop:G,tensionConfig:q,showParticles:U=!1,particleStyle:Z,renderMode:J,perspective:ie,nodeStyle:se,edgeStyle:ne,colorBy:oe,colorScheme:ae="category10",edgeColorBy:ce="source",edgeOpacity:ue=.5,colorByDepth:he=!1,nodeSize:ye=8,nodeSizeRange:pe=[5,20],nodeLabel:fe,showLabels:ge=!0,labelMode:be,size:we=Xs,responsiveWidth:Se,responsiveHeight:Ae,margin:Ee,className:Me,background:We,maxDevicePixelRatio:Be,enableHover:ze=!0,tooltipContent:Xe,customHoverBehavior:He,customClickBehavior:Ve,onObservation:Ge,annotationObservationCallback:Qe,chartId:Ke,onTopologyChange:qe,annotations:Ue,onAnnotationActivate:Ze,autoPlaceAnnotations:Je,svgAnnotationRules:et,legend:tt,legendPosition:rt,legendLayout:it,legendHoverBehavior:st,legendClickBehavior:ot,legendHighlightedCategory:at,legendIsolatedCategories:lt,legendCategoryAccessor:ct,onCategoriesChange:dt,title:ut,foregroundGraphics:ht,backgroundGraphics:yt,decay:pt,pulse:ft,transition:gt,animate:bt,staleness:Et,frameScheduler:Tt,clock:It,random:Lt,seed:Mt,paused:Wt=!1,suspendWhenHidden:Ot=!0,thresholds:Ft,accessibleTable:jt=!0,description:Bt,summary:$t,orbitMode:zt,orbitSize:Yt,orbitSpeed:Xt,orbitRevolution:Ht,orbitRevolutionStyle:Vt,orbitEccentricity:Gt,orbitShowRings:Qt,orbitAnimated:Kt,customNetworkLayout:qt,onLayoutError:Ut,layoutConfig:Zt,layoutSelection:Jt}=e,er=h(n),tr=wt(!0),rr=K({sizeProp:we,responsiveWidth:Se,responsiveHeight:Ae,userMargin:Ee,marginDefault:er,title:ut,legend:tt,legendPosition:rt,legendLayout:it,legendMarginReserved:e.__legendMarginReservedFor===tt,animate:bt,transitionProp:gt,frameScheduler:Tt,clock:It,random:Lt,seed:Mt,paused:Wt,suspendWhenHidden:Ot,themeDirtyRef:tr}),{reducedMotionRef:ir,responsiveRef:sr,size:nr,margin:or,adjustedWidth:ar,adjustedHeight:lr,transition:cr,introEnabled:dr,tableId:ur,rafRef:hr,renderFnRef:yr,scheduleRender:pr,frameRuntime:fr,currentTheme:gr}=rr,{resolvedForeground:mr,resolvedBackground:vr,themeBackground:kr,surfaceBackground:br}=B({foregroundGraphics:ht,backgroundGraphics:yt,size:nr,margin:or,scales:null,background:We,themeBackgroundColor:gr.colors.background}),xr=Ce(),wr=Ne(),_r=Rt(()=>ve(o),[o]),Sr=Rt(()=>Array.isArray(a)?ve(a):a,[a]),Cr=!1===bt,Rr=Rt(()=>({...Dt,...q,...Cr?{transitionDuration:0}:{}}),[q,Cr]),Nr=Rt(()=>({...Pt,...Z}),[Z]),Ar=vt(ie),Er=Rt(()=>Gi({chartType:n,clock:fr.now,random:Lt,seed:Mt,nodeIDAccessor:d,sourceAccessor:u,targetAccessor:p,valueAccessor:f,edgeIdAccessor:g,childrenAccessor:w,hierarchySum:_,orientation:S,nodeAlign:C,nodePaddingRatio:E,nodeWidth:T,iterations:D,forceStrength:P,padAngle:F,groupWidth:j,sortGroups:$,edgeSort:z,treeOrientation:Y,edgeType:H,padding:V,paddingTop:G,tensionConfig:Rr,showParticles:U,particleStyle:Nr,nodeStyle:se,edgeStyle:ne,nodeLabel:fe,showLabels:ge,labelMode:be,colorBy:oe,colorScheme:ae,edgeColorBy:ce,edgeOpacity:ue,colorByDepth:he,nodeSize:ye,nodeSizeRange:pe,decay:pt,pulse:ft,transition:cr,introAnimation:dr,staleness:Et,thresholds:Ft,orbitMode:zt,orbitSize:Yt,orbitSpeed:Xt,orbitRevolution:Ht,orbitRevolutionStyle:Vt,orbitEccentricity:Gt,orbitShowRings:Qt,orbitAnimated:Kt,customNetworkLayout:qt,onLayoutError:Ut,layoutConfig:Zt,perspective:Ar,currentTheme:gr}),[Ar,n,fr.now,Lt,Mt,d,u,p,f,g,w,_,S,C,E,T,D,P,F,j,$,z,Y,H,V,G,Rr,U,Nr,se,ne,fe,ge,be,oe,ae,ce,ue,he,ye,pe,pt,ft,cr,dr,Et,Ft,zt,Yt,Xt,Ht,Vt,Gt,Qt,Kt,qt,Ut,Zt,gr]),Tr=De(Er),Dr=De({chartType:n,nodeIDAccessor:d,sourceAccessor:u,targetAccessor:p,valueAccessor:f,edgeIdAccessor:g,childrenAccessor:w,hierarchySum:_,orientation:S,nodeAlign:C,nodePaddingRatio:E,nodeWidth:T,iterations:D,forceStrength:P,nodeSize:"force"===n?ye:void 0,nodeSizeRange:"force"===n?pe:void 0,padAngle:F,groupWidth:j,sortGroups:$,edgeSort:z,treeOrientation:Y,edgeType:H,padding:V,paddingTop:G,random:Lt,seed:Mt,tensionConfig:Rr,customNetworkLayout:qt,orbitMode:zt,orbitSize:Yt,orbitEccentricity:Gt}),Pr=wt(0),Ir=wt(0),Lr=wt(!1),Mr=wt(null);Mr.current||(Mr.current=new Br(Tr));let Wr=y(Mr,ct,dt,e=>Array.from(e.nodes.values()).map(e=>e.data?{id:e.id,...e.data}:e)),Or=Te("StreamNetworkFrame"),Fr=Nt((e,t,r=!1)=>Pe(Or.current,e,()=>e.buildScene(t),r),[Or]),[jr,zr]=_t(null),[Yr,Xr]=_t(0),[Hr,Vr]=_t(0),[Gr,Qr]=_t(!1),[Kr,qr]=_t(!1),Ur=wt(0),Zr=wt(null),Jr=wt(!1),ei=wt(O);ei.current=O;let ti=wt(Tr);ti.current=Tr;let ri=wt(null),ni=wt(-1),ai=wt(null),li=wt(-1),ci=Nt(e=>{$r({sceneNodes:e.sceneNodes,indexRef:ni,pointRef:ai,neighborIndexRef:li,hoverRef:ri,setHoverData:zr})},[]),di=wt({nodes:!1,edges:!1}),ui=wt(/* @__PURE__ */new Map),hi=wt(0),pi=wt(ae);pi.current=ae;let fi=Nt(e=>hs({node:e,colorBy:oe,colorScheme:ae,nodeColorMap:ui.current,colorIndexRef:hi}),[oe,ae]),gi=Nt(e=>{hi.current=fs({sceneNodes:e.sceneNodes,nodes:e.nodes.values(),nodeColorMap:ui.current,colorScheme:pi.current})},[]),mi=wt(null),vi=Nt((e,t)=>{Fr(e,t),ci(e),mi.current=t,Wr(),gi(e),Os(di.current,e.sceneNodes,e.sceneEdges),tr.current=!1,e.markStylePaintPending()},[Fr,Wr,gi,ci]),ki=Nt(()=>{Mr.current?.markStylePaintPending()},[]),{canvasRef:bi,resolutionDirtyRef:xi}=te(rr,{hydrated:xr,wasHydratingFromSSR:wr,storeRef:Mr,dirtyRef:tr,skipInitialCanvasPaintInvalidation:!0,canvasPaintInvalidator:ki,maxDevicePixelRatio:Be,canvasPaintDependencies:[n,ar,lr,We,yt,J,pr]}),wi=(Ni=gr,Ni?.colors?.border||Ni?.colors?.secondary||Ni?.colors?.primary||"#999"),_i=Nt(e=>us(e,Mr.current?.nodes),[]),Si=Nt(e=>ys({edge:e,edgeColorBy:ce,getNodeColor:fi,resolveEndpoint:_i,fallback:wi}),[ce,fi,wi,_i]),Ci=Nt(e=>ps({edge:e,particleStyleColor:Nr.color,particleColorBy:Nr.colorBy,hasExplicitParticleColorBy:!!Z?.colorBy,getEdgeColor:Si,getNodeColor:fi,resolveEndpoint:_i,fallback:wi}),[Z?.colorBy,Nr.color,Nr.colorBy,fi,Si,wi,_i]),Ri=Ws(n,!!qt,U,!!ft,Mr.current?.isAnimating??!1);var Ni;N(Mr,Tr,tr,pr),mt(Mr.current,Nt(()=>{tr.current=!0,pr()},[pr])),A(Mr,Jt,tr,pr);let Ai=Nt(()=>{let e=Mr.current;if(!e)return;let s=++Ur.current;Zr.current?.abort(),Zr.current=null;let o=[ar,lr],a=(t,r=!1)=>{if(vi(e,o),Xr(e.layoutVersion),qr(!1),ei.current?.(t),qe){let{nodes:t,edges:r}=e.getLayoutData();qe(t,r)}r&&pr()};if("force"===n&&!qt&&!Lt&&r()&&t(M,e.nodes.size,e.edges.size,D)){let t=new AbortController;Zr.current=t;let r=e.getLayoutData(),n=i(r.nodes,r.edges,ti.current,o,e._lastPositionSnapshot);return qr(!0),ei.current?.("pending"),import("./c-VW3UFK54.min.js").then(({runForceLayoutWorker:e})=>e(n,t.signal)).then(({positions:r})=>{t.signal.aborted||s!==Ur.current||(Zr.current=null,e.applyForceLayoutPositions(r,o),a("ready",!0))}).catch(r=>{t.signal.aborted||s!==Ur.current||"AbortError"===r.name||(Zr.current=null,e.runLayout(o),a("error",!0))}),t}e.runLayout(o),a("ready")},[ar,lr,vi,qe,pr,n,qt,Lt,M,D]),Ei=wt(Ai);Ei.current=Ai,$s(n,!!qt,()=>{Ei.current(),pr()}),St(()=>()=>{++Ur.current,Zr.current?.abort()},[]);let Di=wt(!1),Pi=Nt((e=!1)=>!(!e&&!Di.current||(Di.current=!1,Ai(),0)),[Ai]),Ii=Nt(()=>Pi(!1),[Pi]),Li=Nt(e=>{let t=Mr.current;if(!t)return!1;let r=!1,i=Di.current;for(let s of e)null==s||"object"!=typeof s||(r=!0,t.ingestEdge(s)&&(i=!0));let s=Pi(i);return r||s},[Pi]),Mi=Nt(e=>{if(null==e||"object"!=typeof e)return;let t=Mr.current;if(t){if(t.ingestEdge(e)&&(Di.current=!0),Zr.current&&(++Ur.current,Zr.current.abort(),Zr.current=null,Di.current=!0),!fr.isActive)return void Ii();pr()}},[Ii,fr,pr]),Wi=Nt(e=>{Li(e)&&pr()},[Li,pr]);St(()=>fr.subscribe(()=>{fr.isActive||Ii()}),[Ii,fr]);let Oi=Nt(()=>{Di.current=!1,++Ur.current,Zr.current?.abort(),Zr.current=null,qr(!1),ei.current?.("ready"),Mr.current?.clear(),Wr(),ui.current.clear(),hi.current=0,Xr(Mr.current?.layoutVersion??0),zr(null),ri.current=null,ni.current=-1,ai.current=null,li.current=-1,tr.current=!0,pr()},[Wr,pr]),Fi=Nt(()=>{Mr.current&&(Pi(!0),pr())},[Pi,pr]),Bi=Nt(e=>{let t=Mr.current;if(!t)return[];let r=[];for(let i of e){let e=t.nodes.get(i);e&&(r.push({...e.data??{},id:i}),t.removeNode(i),ui.current.delete(i))}if(r.length&&ri.current){let e=new Set(r.map(e=>e.id)),t=ri.current,i=t.data,s=e=>e&&"object"==typeof e?e.id:e;("node"===t.nodeOrEdge?e.has("function"==typeof d?d(i??{}):i?.[d]):e.has(s(i?.source))||e.has(s(i?.target)))&&(ri.current=null,zr(null))}return Pi(r.length>0)&&pr(),r},[Pi,pr,d]),$i=Nt((e,t)=>{let r=[];try{for(let i of e){let e=Mr.current?.updateNode(i,t);null!=e&&r.push({...e,id:i})}}finally{Pi(r.length>0)&&pr()}return r},[Pi,pr]);At(s,()=>({push:Mi,pushMany:Wi,removeNode:e=>Bi([e]).length>0,removeNodes:Bi,updateNodes:$i,removeEdge:(e,t)=>{let r=Mr.current?.removeEdge(e,t)??!1;if(r&&ri.current&&"edge"===ri.current.nodeOrEdge){let r,i=ri.current.data,s="object"==typeof i?.source?i.source.id:i?.source,n="object"==typeof i?.target?i.target.id:i?.target;r=void 0!==t?s===e&&n===t:!g||!i||("function"==typeof g?g:e=>e?.[g])(i.data??i)===e,r&&(ri.current=null,zr(null))}return Pi(r)&&pr(),r},updateNode:(e,t)=>{let r=Mr.current?.updateNode(e,t)??null;return Pi(null!==r)&&pr(),r},updateEdge:(e,t,r)=>{let i=Mr.current?.updateEdge(e,t,r)??[];return Pi(i.length>0)&&pr(),i},clear:Oi,getTopology:()=>(Ii(),Mr.current?.getLayoutData()??{nodes:[],edges:[]}),getCustomLayout:()=>(Ii(),Mr.current?.lastCustomLayoutResult??null),getLayoutFailure:()=>(Ii(),Mr.current?.lastCustomLayoutFailure??null),getTopologyDiff:()=>{Ii();let e=Mr.current;return e?{addedNodes:Array.from(e.addedNodes),removedNodes:Array.from(e.removedNodes),addedEdges:Array.from(e.addedEdges),removedEdges:Array.from(e.removedEdges)}:{addedNodes:[],removedNodes:[],addedEdges:[],removedEdges:[]}},relayout:Fi,getTension:()=>(Ii(),Mr.current?.tension??0)}),[Mi,Wi,Oi,Fi,Ii,Pi,Bi,$i,pr,g]);let Yi=["tree","cluster","treemap","circlepack","partition","orbit"].includes(n),Xi=Yi?l||(Array.isArray(a)?void 0:a):void 0;St(()=>{let e=Mr.current;if(e)if(++Ur.current,Zr.current?.abort(),Zr.current=null,Yi&&Xi)Di.current=!1,e.ingestHierarchy(Xi,[ar,lr]),vi(e,[ar,lr]),Xr(e.layoutVersion),qr(!1),ei.current?.("ready"),pr();else{let i=_r,s=Array.isArray(Sr)?Sr:[];if((null!=o||null!=a)&&(Di.current=!1),0===i.length&&0===s.length){if((null!=o||null!=a)&&(e.nodes.size>0||e.edges.size>0)&&Oi(),"force"===n&&null==o&&null==a&&e.nodes.size>0){Di.current=!1;let e=Ei.current();return()=>e?.abort()}return qr(!1),void ei.current?.("ready")}let l=[ar,lr],c="force"===n&&!qt&&r()&&!Lt&&t(M,i.length,s.length,D);if(c&&wr&&!Jr.current&&e.sceneNodes.length>0)return Jr.current=!0,qr(!1),ei.current?.("ready"),tr.current=!0,void pr();if(c){e.ingestBounded(i,s,l,{deferLayout:!0});let t=Ei.current();return()=>t?.abort()}e.ingestBounded(i,s,l),vi(e,l),Xr(e.layoutVersion),qr(!1),ei.current?.("ready"),pr()}},[_r,Sr,o,a,l,Xi,Yi,ar,lr,Dr,M,D,wr,n,qt,Lt,pr,Oi,vi]);let Hi=xt.useRef(!1);St(()=>{Hi.current||c&&c.length>0&&(Hi.current=!0,Wi(c))},[c,Wi]),St(()=>{let e=Mr.current;if(!e||Zr.current)return;let t=mi.current,r=null!==t&&(t[0]!==ar||t[1]!==lr);!tr.current&&!r||(r&&e.runLayout([ar,lr]),vi(e,[ar,lr]),Xr(e=>e+1),pr())},[gr,ar,lr,vi,pr]);let{customHoverBehavior:Qi,customClickBehavior:Ki}=Ms({customHoverBehavior:He,customClickBehavior:Ve,onObservation:Ge,chartId:Ke}),{hoverHandlerRef:qi,hoverLeaveRef:Ui,onPointerMove:Zi,onPointerLeave:Ji,pointerStateRef:es}=rr,ts=()=>!qt||(Mr.current?.hasCustomRestyle??!1);qi.current=t=>{let r=ts(),i=bi.current;if(!i)return;let s=Mr.current;if(!s)return void xe(i);let n=Ps({viewTransform:e.viewTransform,clientX:t.clientX,clientY:t.clientY,canvasRect:i.getBoundingClientRect(),margin:or,adjustedWidth:ar,adjustedHeight:lr,sceneNodes:s.sceneNodes,sceneEdges:s.sceneEdges,nodeQuadtree:s.nodeQuadtree,maxNodeRadius:s.maxNodeRadius,includeEdges:ze||di.current.edges});if(xe(i,"hit"===n.kind?ke(n.mark):void 0),ze){if("hit"!==n.kind)return void(ri.current&&(ri.current=null,zr(null),Qi?.(null),r&&pr()));ri.current=n.hover,zr(n.hover),Qi?.(n.hover),r&&pr()}},Ui.current=()=>{if(xe(bi.current),ri.current){let e=ts();ri.current=null,zr(null),Qi?.(null),e&&pr()}};let rs=wt(()=>{});rs.current=t=>{if(rr.flushPointerMove(),ee(t.target)||!Ve&&!Ge)return;let r=bi.current;if(!r)return;let i=Mr.current;if(!i)return;let s=Ps({viewTransform:e.viewTransform,clientX:t.clientX,clientY:t.clientY,canvasRect:r.getBoundingClientRect(),margin:or,adjustedWidth:ar,adjustedHeight:lr,sceneNodes:i.sceneNodes,sceneEdges:i.sceneEdges,nodeQuadtree:i.nodeQuadtree,maxNodeRadius:i.maxNodeRadius});"hit"===s.kind?Ki(s.hover,{type:"activate",inputType:le(t.nativeEvent.pointerType)}):"miss"===s.kind&&Ki(null)};let is=Nt(e=>rs.current(e),[]),ss=Nt(e=>{if(de(e))return;let t=Mr.current;if(!t)return;let r=()=>{let e=null!==ri.current;ni.current=-1,ai.current=null,li.current=-1,ri.current=null,zr(null),e&&Qi?.(null),pr()};if("Escape"===e.key)return e.preventDefault(),Ji(),void r();let i=k(t.sceneNodes);if(0===i.length)return void(ni.current>=0&&r());let s=m(i),n=ni.current;if(n>=s.flat.length&&(r(),n=-1)," "===e.key&&n>=0){e.preventDefault();let t=s.flat[n];return void Ki?.(Ye(t.datum||{},t.x,t.y,{nodeOrEdge:"node"}),{type:"activate",inputType:"keyboard"})}if(n<0){if(!["ArrowRight","ArrowLeft","ArrowUp","ArrowDown","Home","End","PageUp","PageDown","Enter"].includes(e.key))return;e.preventDefault(),ni.current=0,li.current=-1;let t=s.flat[0];ai.current=t;let r=t.datum||{},i=Ye(r,t.x,t.y,{nodeOrEdge:"node"});return ri.current=i,zr(i),Qi?.(i,{type:"focus",inputType:"keyboard"}),void pr()}let o=v(s,n),a=b(e.key,o,s,t.sceneEdges??[],li);if(null===a)return;if(e.preventDefault(),a<0)return void r();ni.current=a;let l=s.flat[a];ai.current=l;let c={data:l.datum||{},x:l.x,y:l.y,__semioticHoverData:!0,nodeOrEdge:"node"};ri.current=c,zr(c),Qi?.(c,{type:"focus",inputType:"keyboard"}),pr()},[Ki,Qi,Ji,pr]),ns=Nt(e=>{x(es,e,ze,di.current.nodes||di.current.edges,bi.current,"mouse")&&(ni.current=-1,ai.current=null,Zi(e))},[bi,ze,Zi,es]),os=wt(!1);yr.current=()=>{if(os.current||(hr.current=null,Ii()),!fr.isActive&&!os.current||Zr.current&&!os.current)return;let t=bi.current;if(!t)return;let r=Mr.current;r&&ds({canvas:t,store:r,sceneRevisionDiagnostics:Or.current,size:nr,margin:or,adjustedWidth:ar,adjustedHeight:lr,background:We,themeBackground:kr,maxDevicePixelRatio:Be,renderMode:J,viewTransform:e.viewTransform,cameraOnly:os.current,hasBackgroundGraphics:!(!yt&&!r.customLayoutBackgrounds),dirtyRef:tr,resolutionDirtyRef:xi,lastFrameTimeRef:Pr,now:fr.now(),random:fr.random,reducedMotion:!!ir.current,showParticles:U,isContinuous:Ri,animate:bt,decay:pt,pulse:ft,thresholds:Ft,staleness:Et,particleStyle:Nr,getParticleColor:Ci,pendingAnnotationFrameRef:Lr,lastAnnotationFrameTimeRef:Ir,setAnnotationFrame:Vr,scheduleNextFrame:()=>{pr()},syncColorMap:()=>gi(r),onSceneOrStyleChange:({inventoryChanged:i,geometryChanged:s})=>{(i||s)&&ci(r),i&&(Os(di.current,r.sceneNodes,r.sceneEdges)||xe(t)),(di.current.nodes||di.current.edges)&&(i||s||os.current)&&Fs({canvas:t,pointer:es.current,store:r,margin:or,viewTransform:e.viewTransform,width:ar,height:lr,geometryMoved:s,cursorInventory:di.current})}})};let as=wt(!1);Ct(()=>{if(e.viewTransform||as.current){ni.current<0&&Ui.current?.(),os.current=!0;try{yr.current?.()}finally{os.current=!1}}as.current=!!e.viewTransform},[e.viewTransform,yr,Ui]),_e(bi),I(Et,Mr,tr,pr,fr.now,Gr,Qr);let ls=ii(e.viewTransform),cs=jr?si(jr,ls):null,gs=ze&&jr?/* @__PURE__ */zs(Q,{contentOwnsChrome:nt(Xe),x:cs.x,y:cs.y,containerWidth:ar,containerHeight:lr,margin:or,className:"stream-network-tooltip",zIndex:2,children:Xe?Xe(jr):/* @__PURE__ */zs(Vi,{data:jr})}):null;if(Re||!xr&&wr)/* */
|
|
39
|
+
return zs(zi,{tableId:ur,props:e,store:Mr.current,responsiveRef:sr,size:nr,margin:or,adjustedWidth:ar,adjustedHeight:lr,surfaceBackground:br,resolvedBackground:vr,resolvedForeground:mr});let ms=Mr.current;/* */
|
|
40
|
+
return Ys("div",{ref:sr,className:"stream-network-frame"+(Me?` ${Me}`:""),role:"group","aria-label":Bt||("string"==typeof ut?ut:"Network chart"),tabIndex:0,"aria-busy":Kr||void 0,style:{position:"relative",fontFamily:"var(--semiotic-font-family, sans-serif)",width:Se?"100%":nr[0],height:Ae?"100%":nr[1],overflow:e.viewTransform?"clip":"visible"},onKeyDown:ss,children:["production"!==process.env.NODE_ENV&&Mr.current&&/* @__PURE__ */zs(Le,{store:Mr.current,diagnostics:Or.current}),jt&&/* @__PURE__ */zs(Oe,{accessibleTable:jt,children:/* @__PURE__ */zs(ji,{sceneRevision:Kr?void 0:ms?.getUpdateSnapshot().revisions.accessibility,nodes:ms?.sceneNodes??[],edges:ms?.sceneEdges??[],chartType:"Network chart",tableId:ur,chartTitle:"string"==typeof ut?ut:void 0})}),
|
|
41
|
+
/* @__PURE__ */zs(je,{summary:$t}),
|
|
42
|
+
/* @__PURE__ */zs(Ie,{active:ni.current>=0,hoverPoint:jr&&{data:("edge"===jr.nodeOrEdge?Mr.current?.sceneEdges:Mr.current?.sceneNodes)?.find(e=>e.datum===jr.data)?.accessibleDatum??jr.data}}),
|
|
43
|
+
/* @__PURE__ */Ys("div",{role:ms?.customLayoutHtmlMarks?.length?"group":"img","aria-label":Bt||("string"==typeof ut?ut:"Network chart"),style:{position:"relative",width:"100%",height:"100%"},onMouseMove:ns,onMouseLeave:Ji,onClick:Ve||Ge?is:void 0,children:[Kr&&!1!==W&&/* @__PURE__ */zs("div",{style:{position:"absolute",inset:0,zIndex:3,background:"var(--semiotic-bg, #fff)"},children:me(!0,nr[0],nr[1],W)}),
|
|
44
|
+
/* @__PURE__ */zs(re,{size:nr,margin:or,backdropFill:br??void 0,overflowVisible:!0,children:/* @__PURE__ */zs(oi,{view:e.viewTransform,width:ar,height:lr,children:R(vr,kt(ms?.customLayoutBackgrounds,ms?.perspective.frame,ms?.lastCustomLayoutResult?.perspective))})}),
|
|
45
|
+
/* @__PURE__ */zs("canvas",{ref:bi,"aria-label":Fe(ms?.sceneNodes?.length??0,ms?.sceneEdges?.length??0,ms?.perspective.label("Network chart")??"Network chart"),style:{position:"absolute",top:0,left:0}}),
|
|
46
|
+
/* @__PURE__ */zs(yi,{viewTransform:e.viewTransform,width:ar,height:lr,totalWidth:nr[0],totalHeight:nr[1],margin:or,labels:ms?.labels||[],sceneNodes:ms?.sceneNodes,title:ut,description:Bt,legend:tt,legendPosition:rt,legendLayout:it,legendHoverBehavior:st,legendClickBehavior:ot,legendHighlightedCategory:at,legendIsolatedCategories:lt,foregroundGraphics:kt(R(mr,kt(X(Mr.current?.customLayoutOverlays,Jt??null),ms?.perspective.frame,ms?.lastCustomLayoutResult?.perspective)),ms?.perspective.frame),annotations:Ue,onAnnotationActivate:Ze,onObservation:Qe??Ge,chartId:Ke,chartType:"StreamNetworkFrame",autoPlaceAnnotations:Je,svgAnnotationRules:et,annotationFrame:Hr}),
|
|
47
|
+
/* @__PURE__ */zs(Ti,{viewTransform:e.viewTransform,marks:ms?.customLayoutHtmlMarks,margin:or,selection:Jt??null,width:ar,height:lr,viewport:e.viewport,htmlMarkCulling:e.htmlMarkCulling,onViewportChange:e.onViewportChange}),
|
|
48
|
+
/* @__PURE__ */zs($e,{active:ni.current>=0,hoverPoint:cs,margin:or,size:nr,shape:ai.current?.shape,width:null==ai.current?.w?void 0:ai.current.w*ls.k,height:null==ai.current?.h?void 0:ai.current.h*ls.k}),gs,Et?.showBadge&&/* @__PURE__ */zs(L,{isStale:Gr,position:Et.badgePosition,state:Et.state,settling:Et.settling})]})]})})),"StreamNetworkFrame");export{gt as a,Hs as b};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import type { LinkedCrosshairConfig } from "./store/LinkedCrosshairStore";
|
|
2
3
|
import type { ResolutionMode } from "./store/SelectionStore";
|
|
3
4
|
export type LegendInteractionMode = "highlight" | "isolate" | "none";
|
|
4
5
|
export { useSelection, useSelectionActions, useLinkedHover, useBrushSelection, useFilteredData } from "./store/useSelection";
|
|
@@ -15,6 +16,8 @@ export declare function useLinkedChartCategories(categories: string[], colorScal
|
|
|
15
16
|
export declare function useLinkedChartCategoryRegistryActive(): boolean;
|
|
16
17
|
export interface LinkedChartsProps {
|
|
17
18
|
children: React.ReactNode;
|
|
19
|
+
/** Observe or control a named linkedHover x-position crosshair. */
|
|
20
|
+
crosshair?: LinkedCrosshairConfig;
|
|
18
21
|
/** Pre-configure selections with resolution modes */
|
|
19
22
|
selections?: Record<string, {
|
|
20
23
|
resolution?: ResolutionMode;
|
|
@@ -89,4 +92,6 @@ export declare function estimateLegendRowCount(labels: string[], width: number):
|
|
|
89
92
|
* </LinkedCharts>
|
|
90
93
|
* ```
|
|
91
94
|
*/
|
|
92
|
-
export declare function LinkedCharts({ children, selections, showLegend, legendPosition, legendInteraction, legendSelectionName, legendField }: LinkedChartsProps): React.JSX.Element;
|
|
95
|
+
export declare function LinkedCharts({ children, crosshair, selections, showLegend, legendPosition, legendInteraction, legendSelectionName, legendField }: LinkedChartsProps): React.JSX.Element;
|
|
96
|
+
export { useLinkedCrosshair, useCrosshairPosition } from "./store/LinkedCrosshairStore";
|
|
97
|
+
export type { CrosshairPosition, CrosshairPositionInput, LinkedCrosshairConfig, UseLinkedCrosshairResult } from "./store/LinkedCrosshairStore";
|
|
@@ -30,6 +30,8 @@ export interface TooltipField {
|
|
|
30
30
|
* Base tooltip configuration
|
|
31
31
|
*/
|
|
32
32
|
export interface TooltipConfig {
|
|
33
|
+
/** Explicit chrome policy; otherwise inherits theme.tooltip.chrome. */
|
|
34
|
+
chrome?: "default" | "none";
|
|
33
35
|
/**
|
|
34
36
|
* Array of fields to display in the tooltip
|
|
35
37
|
* Can be simple field names or full TooltipField objects
|
|
@@ -153,6 +155,8 @@ export declare function MultiLineTooltip(config?: MultiLineTooltipConfig): (data
|
|
|
153
155
|
*/
|
|
154
156
|
export interface MultiTooltipConfig {
|
|
155
157
|
mode: "multi";
|
|
158
|
+
/** Custom content owns the surface when set to "none". */
|
|
159
|
+
chrome?: "default" | "none";
|
|
156
160
|
/**
|
|
157
161
|
* Custom renderer. Receives the raw hover datum with multi-series
|
|
158
162
|
* context (`allSeries`, `xValue`) re-attached after unwrap. When
|
|
@@ -160,6 +164,12 @@ export interface MultiTooltipConfig {
|
|
|
160
164
|
*/
|
|
161
165
|
content?: (data: Record<string, unknown>) => React.ReactNode;
|
|
162
166
|
}
|
|
167
|
+
/** Custom datum renderer with an explicit chrome policy, without mutating the function. */
|
|
168
|
+
export interface CustomTooltipConfig {
|
|
169
|
+
content: (data: Record<string, unknown>) => React.ReactNode;
|
|
170
|
+
/** "none" leaves all visual chrome to the content. Defaults to the theme policy. */
|
|
171
|
+
chrome?: "default" | "none";
|
|
172
|
+
}
|
|
163
173
|
/**
|
|
164
174
|
* Type for tooltip prop that chart components accept.
|
|
165
175
|
* `false` disables the tooltip without disabling hover observations. A custom
|
|
@@ -168,7 +178,7 @@ export interface MultiTooltipConfig {
|
|
|
168
178
|
* it; numeric zero remains visible. Use TooltipRoot for custom chrome, or
|
|
169
179
|
* markTooltipChrome(renderer) when chrome is inside wrapper components.
|
|
170
180
|
*/
|
|
171
|
-
export type TooltipProp = boolean | "multi" | MultiTooltipConfig | ((data: Record<string, unknown>) => React.ReactNode) | ReturnType<typeof Tooltip> | ReturnType<typeof MultiLineTooltip> | TooltipConfig;
|
|
181
|
+
export type TooltipProp = boolean | "multi" | MultiTooltipConfig | CustomTooltipConfig | ((data: Record<string, unknown>) => React.ReactNode) | ReturnType<typeof Tooltip> | ReturnType<typeof MultiLineTooltip> | TooltipConfig;
|
|
172
182
|
/**
|
|
173
183
|
* Backward-compatible tooltip input for charts that historically supplied the
|
|
174
184
|
* complete HoverData wrapper to a plain callback.
|
|
@@ -9,10 +9,16 @@ export declare function hasTooltipContent(node: React.ReactNode): boolean;
|
|
|
9
9
|
* switch the tooltip without rebuilding chart-specific content.
|
|
10
10
|
*/
|
|
11
11
|
export declare const defaultTooltipStyle: React.CSSProperties;
|
|
12
|
-
export type TooltipChromeMode = "default" | "css";
|
|
12
|
+
export type TooltipChromeMode = "default" | "css" | "none";
|
|
13
|
+
export declare function useTooltipChrome(): TooltipChromeMode | undefined;
|
|
14
|
+
/** Apply a chart policy to a built-in renderer that already supplies its root. */
|
|
15
|
+
export declare const TooltipChromeScope: ({ chrome, children }: {
|
|
16
|
+
chrome?: TooltipChromeMode;
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
}) => React.JSX.Element;
|
|
13
19
|
export interface TooltipRootProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
14
20
|
/**
|
|
15
|
-
* `"default"` applies Semiotic's theme-aware chrome. Use `"css"` when the
|
|
21
|
+
* `"default"` applies Semiotic's theme-aware chrome. Use `"none"` or `"css"` when the
|
|
16
22
|
* supplied class owns background, text color, border, padding, and shadow.
|
|
17
23
|
* In both modes the root is marked so FlippingTooltip never adds a second
|
|
18
24
|
* box around it.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type Output = {
|
|
2
|
+
type: "chunk";
|
|
3
|
+
fileName: string;
|
|
4
|
+
code: string;
|
|
5
|
+
} | {
|
|
6
|
+
type: "asset";
|
|
7
|
+
fileName: string;
|
|
8
|
+
source: string | Uint8Array;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Remove unreferenced Semiotic worker assets emitted before Vite/Rollup tree
|
|
12
|
+
* shaking. Referenced workers keep their external URLs and CSP behavior.
|
|
13
|
+
* Add `semioticVite()` to `plugins` in vite.config.ts (especially on Vite 7).
|
|
14
|
+
*/
|
|
15
|
+
export declare function semioticVite(): {
|
|
16
|
+
name: string;
|
|
17
|
+
apply: "build";
|
|
18
|
+
enforce: "post";
|
|
19
|
+
generateBundle: {
|
|
20
|
+
order: "post";
|
|
21
|
+
handler(_options: unknown, bundle: Record<string, Output>): void;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -3,8 +3,8 @@ import type { Datum } from "../shared/datumTypes";
|
|
|
3
3
|
import type { PhysicsPipelineConfig, PhysicsQueuedSpawn } from "../../stream/physics/PhysicsPipelineStore";
|
|
4
4
|
import type { PhysicsColliderSpec } from "../../stream/physics/PhysicsKernel";
|
|
5
5
|
import type { CrucibleCompileOptions, CrucibleCompiledPlan, CrucibleDiagnostic, CrucibleLayout, CrucibleOutlet, CrucibleReplayResult, CrucibleRunState } from "./crucibleTypes";
|
|
6
|
-
export declare const DEFAULT_CRUCIBLE_WIDTH
|
|
7
|
-
export declare const DEFAULT_CRUCIBLE_HEIGHT
|
|
6
|
+
export declare const DEFAULT_CRUCIBLE_WIDTH: 900;
|
|
7
|
+
export declare const DEFAULT_CRUCIBLE_HEIGHT: 520;
|
|
8
8
|
export declare const DEFAULT_CRUCIBLE_SIZE: [number, number];
|
|
9
9
|
export declare const DEFAULT_CRUCIBLE_OUTLETS: readonly CrucibleOutlet[];
|
|
10
10
|
export interface CrucibleInitialStateResult<TDatum extends Datum = Datum> {
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pure Gauntlet physics helpers (no React).
|
|
3
|
-
* Types: `./gauntletTypes`.
|
|
4
|
-
*/
|
|
5
1
|
import type { Datum } from "../shared/datumTypes";
|
|
6
2
|
import type { ChartAccessor } from "../shared/types";
|
|
7
3
|
import type { PhysicsPipelineConfig, PhysicsQueuedSpawn } from "../../stream/physics/PhysicsPipelineStore";
|
|
8
4
|
import { type GauntletAccessors, type GauntletCoreBodyFn, type GauntletGate, type GauntletLayout, type GauntletProjectPlacement, type GauntletProjectPlacementFn, type GauntletProjectState, type GauntletPropertyDefinition, type GauntletViabilityFn } from "./gauntletTypes";
|
|
9
5
|
export { CORE_KIND, POSITIVE_KIND, NEGATIVE_KIND } from "./gauntletTypes";
|
|
10
6
|
export type { GauntletAccessors, GauntletBodyDatum, GauntletCoreBodyFn, GauntletEffect, GauntletEvent, GauntletEventContext, GauntletEventLogItem, GauntletGate, GauntletLayout, GauntletNegativeReplacementOptions, GauntletPopSpec, GauntletProjectPlacement, GauntletProjectPlacementFn, GauntletProjectState, GauntletPropertyDefinition, GauntletPropertyForceContext, GauntletPropertyWorkPlan, GauntletPropertyWorkPlanOptions, GauntletViabilityFn } from "./gauntletTypes";
|
|
11
|
-
export declare const DEFAULT_WIDTH
|
|
12
|
-
export declare const DEFAULT_HEIGHT
|
|
7
|
+
export declare const DEFAULT_WIDTH: 900;
|
|
8
|
+
export declare const DEFAULT_HEIGHT: 520;
|
|
13
9
|
export declare const EMPTY_GAUNTLET_PROPERTIES: readonly GauntletPropertyDefinition[];
|
|
14
10
|
export declare function gauntletWallColliders(layout: Pick<GauntletLayout, "width" | "floorY"> & Partial<Pick<GauntletLayout, "height">>): NonNullable<PhysicsPipelineConfig["colliders"]>;
|
|
15
11
|
export declare function readAccessor<TDatum extends Datum, TValue>(datum: TDatum, index: number, accessor: ChartAccessor<TDatum, TValue> | undefined, fallback: TValue): TValue;
|
|
@@ -147,7 +147,10 @@ export interface PhysicsChartModeResult {
|
|
|
147
147
|
* Primary physics sizes stay family-specific (`primaryFallback`); mode only
|
|
148
148
|
* overrides when width/height/size are unset.
|
|
149
149
|
*/
|
|
150
|
-
export declare function usePhysicsChartMode(props: PhysicsChartModeProps,
|
|
150
|
+
export declare function usePhysicsChartMode(props: PhysicsChartModeProps, primarySize: [number, number] | {
|
|
151
|
+
width: number;
|
|
152
|
+
height: number;
|
|
153
|
+
}, options?: {
|
|
151
154
|
hasSimulationMode?: boolean;
|
|
152
155
|
}): PhysicsChartModeResult;
|
|
153
156
|
export interface PhysicsResponsiveSizeResult {
|
|
@@ -168,6 +171,10 @@ export declare function renderPhysicsChartState<TDatum extends Datum>(options: {
|
|
|
168
171
|
loading?: BaseChartProps["loading"];
|
|
169
172
|
loadingContent?: BaseChartProps["loadingContent"];
|
|
170
173
|
size: [number, number];
|
|
174
|
+
responsive?: {
|
|
175
|
+
responsiveWidth?: boolean;
|
|
176
|
+
responsiveHeight?: boolean;
|
|
177
|
+
};
|
|
171
178
|
}): React.ReactElement | null;
|
|
172
179
|
export declare function renderPhysicsFrame(componentName: string, size: [number, number], children: React.ReactNode, responsiveLayout?: Pick<PhysicsChartModeResult, "responsiveContainerRef" | "responsiveHeight" | "responsiveWidth">): React.ReactElement;
|
|
173
180
|
export declare function composePhysicsFrameGraphics(first: FrameGraphicsProp | undefined, second: FrameGraphicsProp | undefined): FrameGraphicsProp | undefined;
|
|
@@ -32,6 +32,8 @@ export interface RealtimeHistogramProps<TDatum extends Datum = Datum> extends Re
|
|
|
32
32
|
mobileInteraction?: MobileInteractionProp;
|
|
33
33
|
/** Time interval for binning */
|
|
34
34
|
binSize: number;
|
|
35
|
+
/** Zero-anchored bin alignment. Centered bins span timestamp ± binSize/2. @default "start" */
|
|
36
|
+
binAlign?: "start" | "center";
|
|
35
37
|
/** Chart dimensions as [width, height] */
|
|
36
38
|
size?: [number, number];
|
|
37
39
|
/** Chart width (alternative to size) */
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { BIG_NUMBER_SIZES } from "./chartSizeDefaultsValue";
|
|
2
|
+
import { type SizedChartName } from "./chartSizeDefaults";
|
|
3
|
+
import type { ChartMode } from "./types";
|
|
4
|
+
import type { ResponsiveRule } from "./responsiveRules";
|
|
5
|
+
export type { SizedChartName } from "./chartSizeDefaults";
|
|
6
|
+
/** Numeric viewport size, in CSS pixels. */
|
|
7
|
+
export interface ChartSize {
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
}
|
|
11
|
+
/** Size-affecting chart props. Container measurements are optional until a responsive host mounts. */
|
|
12
|
+
export interface ChartSizeOptions {
|
|
13
|
+
mode?: ChartMode | "sample" | "mechanical" | "snapshot" | "replay";
|
|
14
|
+
width?: number;
|
|
15
|
+
height?: number;
|
|
16
|
+
size?: [number, number];
|
|
17
|
+
responsiveRules?: ResponsiveRule[];
|
|
18
|
+
responsiveWidth?: boolean;
|
|
19
|
+
responsiveHeight?: boolean;
|
|
20
|
+
/** The chart host's measured content box; used only on responsive axes. */
|
|
21
|
+
containerSize?: Partial<ChartSize>;
|
|
22
|
+
/** ScatterplotMatrix uses field count and cell geometry instead of width/height. */
|
|
23
|
+
fields?: readonly string[];
|
|
24
|
+
cellSize?: number;
|
|
25
|
+
cellGap?: number;
|
|
26
|
+
/** MinimapChart's overview is included in its total height. */
|
|
27
|
+
minimap?: {
|
|
28
|
+
height?: number;
|
|
29
|
+
margin?: {
|
|
30
|
+
top?: number;
|
|
31
|
+
bottom?: number;
|
|
32
|
+
};
|
|
33
|
+
handles?: unknown;
|
|
34
|
+
showExtentLabels?: boolean;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export interface BigNumberSizeOptions {
|
|
38
|
+
mode?: keyof typeof BIG_NUMBER_SIZES | ChartMode;
|
|
39
|
+
width?: number | string;
|
|
40
|
+
height?: number | string;
|
|
41
|
+
}
|
|
42
|
+
/** Inline or percentage-sized value cards retain their CSS sizing instead of inventing pixel dimensions. */
|
|
43
|
+
export interface BigNumberSize {
|
|
44
|
+
width: number | string | undefined;
|
|
45
|
+
height: number | string | undefined;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Resolve a chart's viewport without mounting React. Uses the same defaults as
|
|
49
|
+
* the chart itself. Explicit dimensions override mode defaults. Supply the
|
|
50
|
+
* measured host content box for responsive axes; otherwise returns their
|
|
51
|
+
* pre-measurement fallback. Excludes external CSS, titles/legends outside a
|
|
52
|
+
* ScatterplotMatrix grid, and accessible tables rendered outside the viewport.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* const { height } = resolveChartSize("CandlestickChart", { mode: "context" })
|
|
56
|
+
*/
|
|
57
|
+
export declare function resolveChartSize(chart: "BigNumber", props?: BigNumberSizeOptions): BigNumberSize;
|
|
58
|
+
export declare function resolveChartSize(chart: SizedChartName, props?: ChartSizeOptions): ChartSize;
|