semiotic 3.13.2 → 3.13.3
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 +47 -46
- package/ai/artifact-surface-inventory.json +1 -1
- package/ai/dist/mcp-server.js +4 -4
- package/ai/reference.md +23 -12
- package/ai/schema.json +258 -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-2YFVDRU4.min.js +1 -0
- package/dist/c-4OVDIXAR.min.js +1 -0
- package/dist/c-57IIWW46.min.js +1 -0
- package/dist/c-62UTMRQE.min.js +1 -0
- package/dist/c-6QV6F3U7.min.js +1 -0
- package/dist/c-7S46KBYD.min.js +2 -0
- package/dist/c-AJSS332Z.min.js +2 -0
- package/dist/c-B3X2IJRQ.min.js +1 -0
- package/dist/c-BLLDBVFK.min.js +38 -0
- package/dist/c-C7TT4J7K.min.js +1 -0
- package/dist/{c-ZMB3VTD4.min.js → c-CJ5GA7DM.min.js} +1 -1
- package/dist/c-D7YDFHLY.min.js +1 -0
- package/dist/{c-BR2TOCUN.min.js → c-DMDFJQU4.min.js} +1 -1
- package/dist/{c-JDU4Y4IW.min.js → c-FRVHZIGR.min.js} +1 -1
- package/dist/{c-MSZ3ZDAP.min.js → c-HAZCVHI7.min.js} +1 -1
- package/dist/c-HN5U72U7.min.js +1 -0
- package/dist/c-JA5F7ITS.min.js +1 -0
- package/dist/{c-ISHYKYII.min.js → c-JVZRD4GL.min.js} +1 -1
- package/dist/{c-OOR2LN4A.min.js → c-KJGJEOSV.min.js} +1 -1
- package/dist/c-M2TPZE7P.min.js +1 -0
- package/dist/c-OA6RJZ7S.min.js +1 -0
- package/dist/c-OBBSIOYU.min.js +1 -0
- package/dist/{c-SQQZPFVY.min.js → c-QPHM7AWW.min.js} +1 -1
- package/dist/{c-HOMJ3C6B.min.js → c-QSEAAHEU.min.js} +1 -1
- package/dist/c-RQWI623R.min.js +1 -0
- package/dist/{c-WFSEQ2XG.min.js → c-RWFADOKS.min.js} +1 -1
- package/dist/{c-SDGGMIYI.min.js → c-TJGC5JEM.min.js} +1 -1
- package/dist/{c-H5THWQI4.min.js → c-TOXWQRXS.min.js} +3 -3
- package/dist/c-VBDWHTC7.min.js +1 -0
- package/dist/c-VBIPDCE7.min.js +1 -0
- package/dist/c-WTNRBWZZ.min.js +51 -0
- package/dist/{c-3GIPT46Z.min.js → c-XG4LL2VI.min.js} +1 -1
- package/dist/c-XPNBS3W2.min.js +1 -0
- package/dist/c-XT3G3YWU.min.js +1 -0
- package/dist/c-ZP6O6UHV.min.js +1 -0
- package/dist/c-ZVL7ULNH.min.js +1 -0
- package/dist/components/ChartErrorBoundary.d.ts +5 -1
- package/dist/components/ai/intentWeights.d.ts +22 -0
- package/dist/components/ai/streamSchema.d.ts +98 -0
- package/dist/components/ai/streamingTypes.d.ts +27 -4
- package/dist/components/ai/suggestCharts.d.ts +10 -2
- package/dist/components/ai/suggestStreamCharts.d.ts +60 -13
- package/dist/components/ai/suggestStreamDashboard.d.ts +9 -1
- package/dist/components/charts/network/processSankey/frameMargins.d.ts +1 -1
- package/dist/components/charts/network/processSankey/labelPlacement.d.ts +1 -1
- package/dist/components/charts/physics/physicsHocUtils.d.ts +1 -1
- package/dist/components/charts/realtime/RealtimeAccumulator.d.ts +7 -0
- package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +9 -2
- package/dist/components/charts/realtime/RealtimeHistogram.d.ts +13 -1
- package/dist/components/charts/realtime/RealtimeLineChart.types.d.ts +5 -1
- package/dist/components/charts/realtime/RealtimeSwarmChart.d.ts +5 -1
- package/dist/components/charts/realtime/RealtimeWaterfallChart.d.ts +7 -1
- package/dist/components/charts/realtime/TemporalHistogram.capability.d.ts +5 -3
- package/dist/components/charts/realtime/aggregate.d.ts +11 -12
- package/dist/components/charts/realtime/defaultRealtimeTooltip.d.ts +9 -0
- package/dist/components/charts/realtime/eventTime.d.ts +7 -1
- package/dist/components/charts/realtime/useRealtimeLineIngestion.d.ts +13 -0
- package/dist/components/charts/shared/ChartError.d.ts +4 -6
- package/dist/components/charts/shared/GaugeReadout.d.ts +39 -4
- package/dist/components/charts/shared/axisExtent.d.ts +2 -1
- package/dist/components/charts/shared/chartMode.d.ts +2 -2
- package/dist/components/charts/shared/gaugeLayout.d.ts +69 -0
- package/dist/components/charts/shared/types.d.ts +3 -0
- package/dist/components/charts/shared/useNetworkChartSetup.d.ts +3 -0
- package/dist/components/charts/shared/useStreamStatus.d.ts +2 -2
- package/dist/components/charts/shared/withChartErrorBoundary.d.ts +14 -0
- package/dist/components/charts/xy/Scatterplot.streamCapability.d.ts +2 -0
- package/dist/components/charts/xy/WaterfallChart.d.ts +2 -0
- package/dist/components/charts/xy/WaterfallIndex.d.ts +12 -0
- package/dist/components/charts/xy/lineGapStrategy.d.ts +15 -3
- package/dist/components/legendGeometry.d.ts +148 -0
- package/dist/components/legendLayout.d.ts +20 -38
- package/dist/components/realtime/ReorderBuffer.d.ts +14 -0
- package/dist/components/realtime/SlidingExtent.d.ts +18 -0
- package/dist/components/realtime/WindowAccumulator.d.ts +5 -1
- package/dist/components/realtime/renderers/types.d.ts +1 -0
- package/dist/components/realtime/renderers/waterfallRenderer.d.ts +1 -1
- package/dist/components/recipes/compositional/edgeRouting.d.ts +9 -0
- package/dist/components/recipes/compositional/metrics.d.ts +2 -2
- package/dist/components/recipes/compositional/projection.d.ts +3 -1
- package/dist/components/recipes/compositional/routing.d.ts +3 -1
- package/dist/components/recipes/compositional/testFixtures.d.ts +4 -0
- package/dist/components/recipes/compositional/topology.d.ts +2 -0
- package/dist/components/recipes/compositional/types.d.ts +10 -1
- package/dist/components/recipes/compositional/useCompositionalInterfaces.d.ts +20 -0
- package/dist/components/semiotic-ai-core.d.ts +3 -2
- package/dist/components/semiotic-ai-stream.d.ts +3 -2
- package/dist/components/semiotic-recipes-react.d.ts +2 -0
- package/dist/components/semiotic-utils-core.d.ts +2 -0
- package/dist/components/server/serverChartConfigHeatmap.d.ts +13 -0
- package/dist/components/server/staticLegend.d.ts +5 -0
- package/dist/components/server/staticLegendText.d.ts +13 -0
- package/dist/components/server/staticSVGChrome.d.ts +2 -2
- package/dist/components/stream/DataSourceAdapter.d.ts +15 -62
- package/dist/components/stream/FrameRuntime.d.ts +3 -0
- package/dist/components/stream/GeoPipelineStore.d.ts +2 -0
- package/dist/components/stream/IngestActivity.d.ts +9 -0
- package/dist/components/stream/NetworkPipelineStore.d.ts +3 -1
- package/dist/components/stream/OrdinalPipelineStore.d.ts +5 -2
- package/dist/components/stream/OrdinalSVGOverlay.d.ts +1 -1
- package/dist/components/stream/PipelineStore.d.ts +8 -3
- package/dist/components/stream/accessibleDataRows.d.ts +1 -0
- package/dist/components/stream/axisTickUtils.d.ts +25 -5
- package/dist/components/stream/frameDefaultMargins.d.ts +26 -4
- package/dist/components/stream/frameKeyboardNavigation.d.ts +8 -1
- package/dist/components/stream/geoTypes.d.ts +2 -0
- package/dist/components/stream/graphKeyboardNavigation.d.ts +4 -2
- package/dist/components/stream/hitTestUtils.d.ts +7 -0
- package/dist/components/stream/keyboardNav.d.ts +3 -1
- package/dist/components/stream/navigationGraph.d.ts +10 -3
- package/dist/components/stream/networkFrameKeyboardNavigation.d.ts +2 -0
- package/dist/components/stream/networkNavGroups.d.ts +3 -0
- package/dist/components/stream/networkPipelineConfig.d.ts +1 -0
- package/dist/components/stream/networkSceneTypes.d.ts +10 -0
- package/dist/components/stream/networkSpatialNavigation.d.ts +3 -0
- package/dist/components/stream/networkTypes.d.ts +2 -0
- package/dist/components/stream/ordinalAxisTicks.d.ts +27 -0
- package/dist/components/stream/ordinalSceneBuilders/pieScene.d.ts +10 -0
- package/dist/components/stream/ordinalSceneBuilders/types.d.ts +2 -0
- package/dist/components/stream/ordinalTypes.d.ts +11 -2
- package/dist/components/stream/pipelineBufferUtils.d.ts +9 -0
- package/dist/components/stream/pipelineConfig.d.ts +7 -0
- package/dist/components/stream/pipelineDomainResolution.d.ts +3 -2
- package/dist/components/stream/roundScaleDomain.d.ts +9 -0
- package/dist/components/stream/stalenessBands.d.ts +1 -1
- package/dist/components/stream/svgOverlayUtils.d.ts +12 -0
- package/dist/components/stream/types.d.ts +10 -2
- package/dist/components/stream/useFrame.d.ts +7 -4
- package/dist/components/stream/useOrdinalFrameHandle.d.ts +4 -14
- package/dist/components/stream/useStalenessCheck.d.ts +5 -3
- package/dist/components/stream/useStreamingDataHandle.d.ts +24 -0
- package/dist/components/stream/useXYFrameHandle.d.ts +4 -14
- package/dist/components/stream/xyDateTicks.d.ts +33 -4
- package/dist/components/stream/xyFrameAxisTypes.d.ts +2 -0
- package/dist/components/stream/xyPlugins/registry.d.ts +7 -0
- package/dist/components/stream/xySceneBuilders/heatmapScene.d.ts +11 -2
- package/dist/components/stream/xySceneBuilders/types.d.ts +4 -0
- package/dist/components/types/legendTypes.d.ts +12 -1
- package/dist/geo.min.js +155 -152
- package/dist/geo.module.min.js +1 -1
- package/dist/network.module.min.js +1 -1
- package/dist/ordinal.module.min.js +1 -1
- package/dist/physics.module.min.js +1 -1
- package/dist/processSankeyLayoutWorker.js +1 -1
- package/dist/semiotic-ai-core.d.ts +3 -2
- package/dist/semiotic-ai-core.min.js +5 -5
- package/dist/semiotic-ai-core.module.min.js +4 -4
- package/dist/semiotic-ai.module.min.js +2 -2
- package/dist/semiotic-artifact.min.js +6 -6
- package/dist/semiotic-artifact.module.min.js +5 -5
- package/dist/semiotic-atlas-selection.module.min.js +1 -1
- package/dist/semiotic-atlas.module.min.js +1 -1
- package/dist/semiotic-client-cjs-shared.min.js +1022 -1018
- package/dist/semiotic-client-compositional.module.min.js +1 -1
- package/dist/semiotic-client-shared.module.min.js +1 -1
- package/dist/semiotic-experimental-auxiliary.module.min.js +1 -1
- package/dist/semiotic-experimental-node-auxiliary.module.min.js +1 -1
- package/dist/semiotic-line.module.min.js +1 -1
- package/dist/semiotic-realtime-core.module.min.js +1 -1
- package/dist/semiotic-realtime-react.module.min.js +1 -1
- package/dist/semiotic-recipes-core-cjs-base.min.js +101 -101
- package/dist/semiotic-recipes-core.module.min.js +1 -1
- package/dist/semiotic-recipes-react.d.ts +2 -0
- package/dist/semiotic-recipes-react.min.js +8 -8
- package/dist/semiotic-server-edge-node.module.min.js +3 -3
- package/dist/semiotic-server-edge.min.js +399 -394
- package/dist/semiotic-server-edge.module.min.js +3 -3
- package/dist/semiotic-server-node.min.js +399 -394
- package/dist/semiotic-utils-core.d.ts +2 -0
- package/dist/semiotic-utils-core.min.js +11 -11
- package/dist/semiotic-utils-core.module.min.js +3 -3
- package/dist/semiotic-value.module.min.js +1 -1
- package/dist/semiotic.module.min.js +1 -1
- package/dist/server.min.js +399 -394
- package/dist/server.module.min.js +3 -3
- package/dist/xy.module.min.js +1 -1
- package/package.json +11 -11
- package/dist/c-27SDQN3J.min.js +0 -1
- package/dist/c-2N7IU2NY.min.js +0 -1
- package/dist/c-4EUQNA7N.min.js +0 -2
- package/dist/c-5EPR4KFB.min.js +0 -1
- package/dist/c-5KZ3NO6X.min.js +0 -1
- package/dist/c-7UN2WUMI.min.js +0 -1
- package/dist/c-BRBTXINY.min.js +0 -1
- package/dist/c-C3Z7ZRAA.min.js +0 -1
- package/dist/c-C4WRRUZ5.min.js +0 -1
- package/dist/c-CXDAWBOW.min.js +0 -1
- package/dist/c-DJ6DT5BL.min.js +0 -51
- package/dist/c-DNBFFE3P.min.js +0 -1
- package/dist/c-HR5AH3MA.min.js +0 -1
- package/dist/c-HTL37JCD.min.js +0 -1
- package/dist/c-JS2D7A2P.min.js +0 -1
- package/dist/c-L6OT4OVA.min.js +0 -1
- package/dist/c-NB2UEX5C.min.js +0 -1
- package/dist/c-OU7A3IUL.min.js +0 -1
- package/dist/c-PNLTF6YG.min.js +0 -37
- package/dist/c-QVKOXC3S.min.js +0 -1
- package/dist/c-SIQVOV6A.min.js +0 -1
- package/dist/c-TBMFC5CR.min.js +0 -1
- package/dist/c-XF5ILLBG.min.js +0 -1
- package/dist/c-YQHGEETR.min.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
function t(t,e){var r=t.get(e);if(!r)throw new Error("missing: "+e);return r}function e(t){return t.y0-t.y1>0?"up":"down"}function r(t,e){return e(t.source)==e(t.target)}function a(t){return t.target.x0-t.source.x1}function i(t,r){var i=c(t),n=a(r)/Math.tan(i);return"up"==e(t)?t.y1-n:t.y1+n}function n(t,r){var i=c(t),n=a(r)/Math.tan(i);return"up"==e(t)?t.y1+n:t.y1-n}function c(t){var e=Math.abs(t.y1-t.y0),r=Math.abs(t.target.x0-t.source.x1);return Math.atan(r/e)}function l(t){return u(t.source)}function o(t){return u(t.target)}function u(t){return(t.y0+t.y1)/2}function s(t){return t.virtual?0:t.value}function f(t,e){var a=0;t.sourceLinks.forEach(function(t){a=t.circular&&!r(t,e)?a+1:a});var i=0;return t.targetLinks.forEach(function(t){i=t.circular&&!r(t,e)?i+1:i}),a+i}function h(t){return t.target.depth}function d(t,e){return t.sourceLinks.length?t.depth:e-1}function y(t,e){return t.y0-e.y0}function g(t,e){return e.y0-t.y0}function p(t,e){return t.y1-e.y1}function m(t,e){return e.y1-t.y1}function x(t,e){return L(t.source,e.source)||t.index-e.index}function k(t,e){return L(t.target,e.target)||t.index-e.index}function L(t,e){return t.partOfCycle===e.partOfCycle?t.y0-e.y0:"top"===t.circularLinkType||"bottom"===e.circularLinkType?-1:1}function v(t,e){return b(t)==b(e)?"bottom"==t.circularLinkType?g(t,e):y(t,e):b(e)-b(t)}function b(t){return t.target.column-t.source.column}function D(t,e){return P(t)==P(e)}function P(t){return t.y0-t.y1>0?"up":"down"}function E(t,e,a,i,n){let c=t;c.links.forEach(function(t){t.circular&&(t._circularWidth=t.width,t._circularStub=!1)});var l=yt(c.links,function(t){return t.source.y0});c.links.forEach(function(t){t.circular&&(t.circularPathData={})});var o=c.links.filter(function(t){return t.circular}),u=new Map,s=new Map;o.forEach(function(t){u.set(t.source,(u.get(t.source)||0)+1),s.set(t.target,(s.get(t.target)||0)+1)});var f=new Set(o.filter(function(t){return r(t,e)&&1===u.get(t.source)&&1===s.get(t.target)}));return["top","bottom"].forEach(function(t){var e=o.filter(function(e){return e.circularLinkType===t});(function(t,e,r){if(0!==t.length){t.sort(v);var a=Array.from(new Set(t.flatMap(function(t){return[t.source.column,t.target.column]}))).sort(function(t,e){return t-e}),i=new Map(a.map(function(t,e){return[t,e]})),n=new zt(a.length);t.forEach(function(t){var a=i.get(t.source.column),c=i.get(t.target.column),l=Math.min(a,c),o=Math.max(a,c),u=e.has(t)?0:n.query(l,o);t.circularPathData.verticalBuffer=u+t._circularWidth/2,n.reserve(l,o,u+t._circularWidth+r)})}})(e.slice(),f,a),["source","target"].forEach(function(r){var n=new Map;e.forEach(function(t){var e=t[r].column;n.has(e)||n.set(e,[]),n.get(e).push(t)}),n.forEach(function(e){e.sort("source"===r?"bottom"===t?g:y:"bottom"===t?m:p);var n=0,c="source"===r?"right":"left";e.forEach(function(t,e){t.circularPathData[c+"SmallArcRadius"]=i+t._circularWidth/2+n,t.circularPathData[c+"LargeArcRadius"]=i+t._circularWidth/2+e*a+n,n+=t._circularWidth})})})}),c.links.forEach(function(t){t.circular&&(t.circularPathData.arcRadius=t._circularWidth+i,t.circularPathData.rightNodeBuffer=5,t.circularPathData.leftNodeBuffer=5,t.circularPathData.sourceWidth=t.source.x1-t.source.x0,t.circularPathData.sourceX=t.source.x0+t.circularPathData.sourceWidth,t.circularPathData.targetX=t.target.x0,t.circularPathData.sourceY=t.y0,t.circularPathData.targetY=t.y1,f.has(t)?(t.circularPathData.rightSmallArcRadius=i+t._circularWidth/2,t.circularPathData.rightLargeArcRadius=i+t._circularWidth/2,t.circularPathData.leftSmallArcRadius=i+t._circularWidth/2,t.circularPathData.leftLargeArcRadius=i+t._circularWidth/2,"bottom"==t.circularLinkType?(t.circularPathData.verticalFullExtent=t.source.y1+n+t.circularPathData.verticalBuffer,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.rightLargeArcRadius,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.leftLargeArcRadius):(t.circularPathData.verticalFullExtent=t.source.y0-n-t.circularPathData.verticalBuffer,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.rightLargeArcRadius,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.leftLargeArcRadius)):"bottom"==t.circularLinkType?(t.circularPathData.verticalFullExtent=Math.max(c.y1,t.source.y1,t.target.y1)+n+t.circularPathData.verticalBuffer,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.rightLargeArcRadius,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.leftLargeArcRadius):(t.circularPathData.verticalFullExtent=l-n-t.circularPathData.verticalBuffer,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.rightLargeArcRadius,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.leftLargeArcRadius),t.circularPathData.rightInnerExtent=t.circularPathData.sourceX+t.circularPathData.rightNodeBuffer,t.circularPathData.leftInnerExtent=t.circularPathData.targetX-t.circularPathData.leftNodeBuffer,t.circularPathData.rightFullExtent=t.circularPathData.sourceX+t.circularPathData.rightLargeArcRadius+t.circularPathData.rightNodeBuffer,t.circularPathData.leftFullExtent=t.circularPathData.targetX-t.circularPathData.leftLargeArcRadius-t.circularPathData.leftNodeBuffer),t.circular?t.path=function(t){return"top"==t.circularLinkType?"M"+t.circularPathData.sourceX+" "+t.circularPathData.sourceY+" L"+t.circularPathData.rightInnerExtent+" "+t.circularPathData.sourceY+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightSmallArcRadius+" 0 0 0 "+t.circularPathData.rightFullExtent+" "+(t.circularPathData.sourceY-t.circularPathData.rightSmallArcRadius)+" L"+t.circularPathData.rightFullExtent+" "+t.circularPathData.verticalRightInnerExtent+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightLargeArcRadius+" 0 0 0 "+t.circularPathData.rightInnerExtent+" "+t.circularPathData.verticalFullExtent+" L"+t.circularPathData.leftInnerExtent+" "+t.circularPathData.verticalFullExtent+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftLargeArcRadius+" 0 0 0 "+t.circularPathData.leftFullExtent+" "+t.circularPathData.verticalLeftInnerExtent+" L"+t.circularPathData.leftFullExtent+" "+(t.circularPathData.targetY-t.circularPathData.leftSmallArcRadius)+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftSmallArcRadius+" 0 0 0 "+t.circularPathData.leftInnerExtent+" "+t.circularPathData.targetY+" L"+t.circularPathData.targetX+" "+t.circularPathData.targetY:"M"+t.circularPathData.sourceX+" "+t.circularPathData.sourceY+" L"+t.circularPathData.rightInnerExtent+" "+t.circularPathData.sourceY+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightSmallArcRadius+" 0 0 1 "+t.circularPathData.rightFullExtent+" "+(t.circularPathData.sourceY+t.circularPathData.rightSmallArcRadius)+" L"+t.circularPathData.rightFullExtent+" "+t.circularPathData.verticalRightInnerExtent+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightLargeArcRadius+" 0 0 1 "+t.circularPathData.rightInnerExtent+" "+t.circularPathData.verticalFullExtent+" L"+t.circularPathData.leftInnerExtent+" "+t.circularPathData.verticalFullExtent+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftLargeArcRadius+" 0 0 1 "+t.circularPathData.leftFullExtent+" "+t.circularPathData.verticalLeftInnerExtent+" L"+t.circularPathData.leftFullExtent+" "+(t.circularPathData.targetY+t.circularPathData.leftSmallArcRadius)+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftSmallArcRadius+" 0 0 1 "+t.circularPathData.leftInnerExtent+" "+t.circularPathData.targetY+" L"+t.circularPathData.targetX+" "+t.circularPathData.targetY}(t):t.path=function(t){var e=t.source.x1,r=t.y0,a=t.target.x0,i=t.y1,n=(e+a)/2;return"M"+e+","+r+"C"+n+","+r+" "+n+","+i+" "+a+","+i}(t)}),c}function M(t){return function(){return t}}function S(t){return t.index}function w(t){return t.nodes}function A(t){return t.links}function $(t,e,r){var a=mt(t.nodes,function(t){return t.column}).sort(function(t,e){return t[0]-e[0]}).map(function(t){return t[1]});a.forEach(function(i,n){var c=i.length;if(e)i.sort(e);else if(n>0){var l=new Map;i.forEach(function(t,e){var r,a,i,n=(a=0,i=0,(r=t).targetLinks.forEach(function(t){if(!t.circular){var e=t.value||1;i+=u(t.source)*e,a+=e}}),r.sourceLinks.forEach(function(t){if(!t.circular){var e=t.value||1;i+=u(t.target)*e,a+=e}}),a>0?i/a:NaN);l.set(t,{bc:n,idx:e})}),i.sort(function(t,e){var r=l.get(t),a=l.get(e),i=r.bc,n=a.bc;if(t.circularLinkType!==e.circularLinkType){if("top"==t.circularLinkType&&"bottom"==e.circularLinkType)return-1;if("bottom"==t.circularLinkType&&"top"==e.circularLinkType)return 1;if("top"==t.circularLinkType)return-1;if("top"==e.circularLinkType||"bottom"==t.circularLinkType)return 1;if("bottom"==e.circularLinkType)return-1}return isNaN(i)||isNaN(n)?isNaN(i)?isNaN(n)?r.idx-a.idx:1:-1:i-n})}else i.sort(function(t,e){return t.circularLinkType==e.circularLinkType?f(e,r)-f(t,r):"top"==t.circularLinkType&&"bottom"==e.circularLinkType||"top"==t.circularLinkType&&0==e.partOfCycle||0==t.partOfCycle&&"bottom"==e.circularLinkType?-1:0});i.forEach(function(e,i){e.depth==a.length-1&&1==c||0==e.depth&&1==c?(e.y0=t.y1/2-e.value*t.ky,e.y1=e.y0+e.value*t.ky):e.partOfCycle?0==f(e,r)?(e.y0=t.y1/2+i,e.y1=e.y0+e.value*t.ky):"top"==e.circularLinkType?(e.y0=t.y0+i,e.y1=e.y0+e.value*t.ky):(e.y0=t.y1-e.value*t.ky-i,e.y1=e.y0+e.value*t.ky):0==t.y0||0==t.y1?(e.y0=(t.y1-t.y0)/c*i,e.y1=e.y0+e.value*t.ky):(e.y0=(t.y1-t.y0)/2-c/2+i,e.y1=e.y0+e.value*t.ky)})})}function T(t,e,r,a,i,n){function c(e,r){var a=h.length;h.forEach(function(i){var n=i.length,c=i[0].depth;i.forEach(function(i){var s;if(i.sourceLinks.length||i.targetLinks.length)if(i.partOfCycle&&f(i,r)>0){var h=kt(i.sourceLinks,o),d=kt(i.targetLinks,l),y=h&&d?(h+d)/2:h||d;if(y){var g=(y-u(i))*e*.3;i.y0+=g,i.y1+=g}}else if(0==c&&1==n)s=i.y1-i.y0,i.y0=t.y1/2-s/2,i.y1=t.y1/2+s/2;else if(c==a-1&&1==n)s=i.y1-i.y0,i.y0=t.y1/2-s/2,i.y1=t.y1/2+s/2;else if(1==i.targetLinks.length&&1==i.targetLinks[0].source.sourceLinks.length)s=i.y1-i.y0,i.y0=i.targetLinks[0].source.y0,i.y1=i.y0+s;else{var p=kt(i.sourceLinks,o),m=kt(i.targetLinks,l),x=((p&&m?(p+m)/2:p||m)-u(i))*e;i.y0+=x,i.y1+=x}})})}function s(){h.forEach(function(r){var n,c,l,o=t.y0,u=r.length;for(e?r.sort(e):r.sort(L),l=0;l<u;++l)(c=o-(n=r[l]).y0)>0&&(n.y0+=c,n.y1+=c),o=n.y1+a;if((c=o-a-t.y1)>0)for(o=n.y0-=c,n.y1-=c,l=u-2;l>=0;--l)(c=(n=r[l]).y1+i-o)>0&&(n.y0-=c,n.y1-=c),o=n.y0})}var h=mt(t.nodes,function(t){return t.column}).sort(function(t,e){return t[0]-e[0]}).map(function(t){return t[1]});s();for(var d=1,y=n;y>0;--y)c(d*=.99,r),s()}function R(t){t.nodes.forEach(function(t){t.sourceLinks.sort(k),t.targetLinks.sort(x)}),t.nodes.forEach(function(t){var e=t.y0,r=e,a=t.y1,i=a;t.sourceLinks.forEach(function(t){t.circular?(t.y0=a-t.width/2,a-=t.width):(t.y0=e+t.width/2,e+=t.width)}),t.targetLinks.forEach(function(t){t.circular?(t.y1=i-t.width/2,i-=t.width):(t.y1=r+t.width/2,r+=t.width)})})}function _(t){let{sx:e,sTop:r,sBot:a,tx:i,tTop:n,tBot:c,cp1X:l,cp2X:o}=t,u=(r+a)/2,s=(n+c)/2;return{pathD:[`M${e},${r}`,`C${l},${r} ${o},${n} ${i},${n}`,`L${i},${c}`,`C${o},${c} ${l},${a} ${e},${a}`,"Z"].join(" "),bezier:{circular:!1,points:[{x:e,y:u},{x:l,y:u},{x:o,y:s},{x:i,y:s}],halfWidth:(a-r)/2}}}function I(t){let e=t.circularPathData;if(!e)return null;let r=t.sankeyWidth/2,a="bottom"===t.circularLinkType?1:-1,i=1===a?1:0,n="down"===t.direction,c=(t,e)=>n?`${e},${t}`:`${t},${e}`,l=(t,e,r,a,i)=>`A${n?e:t},${n?t:e} 0 0 ${n?1-r:r} ${c(a,i)}`,{sourceX:o,sourceY:u,targetX:s,targetY:f,rightInnerExtent:h,leftInnerExtent:d,rightFullExtent:y,leftFullExtent:g,verticalFullExtent:p,verticalRightInnerExtent:m,verticalLeftInnerExtent:x,rightLargeArcRadius:k,rightSmallArcRadius:L,leftLargeArcRadius:v,leftSmallArcRadius:b}=e;return`M${c(o,u-a*r)}L${c(h,u-a*r)}`+l(k+r,L+r,i,y+r,u+a*L)+`L${c(y+r,m)}`+l(k+r,k+r,i,h,p+a*r)+`L${c(d,p+a*r)}`+l(v+r,v+r,i,g-r,x)+`L${c(g-r,f+a*b)}`+l(v+r,b+r,i,d,f-a*r)+`L${c(s,f-a*r)}L${c(s,f+a*r)}L${c(d,f+a*r)}`+l(v-r,b-r,1-i,g+r,f+a*b)+`L${c(g+r,x)}`+l(v-r,v-r,1-i,d,p-a*r)+`L${c(h,p-a*r)}`+l(k-r,k-r,1-i,y-r,m)+`L${c(y-r,u+a*L)}`+l(k-r,L-r,1-i,h,u+a*r)+`L${c(o,u+a*r)}Z`}function W(t,e){if("production"===process.env.NODE_ENV||!t||!t.data||"object"!=typeof t.data)return t;let r=Bt.get(t);if(r){let t=r.get(e);if(t)return t}else r=new Map,Bt.set(t,r);let a=new Proxy(t,{get(t,r,a){if("string"==typeof r&&!(r in t)&&t.data&&r in t.data){let t=`${e}:${r}`;jt.has(t)||(jt.add(t),console.warn(`[Semiotic] "${e}" callback accessed "${r}" on the wrapper object, but it only exists on ".data". Use d.data.${r} (or d.data?.${r}) instead. Frame callbacks receive RealtimeNode/RealtimeEdge wrappers, not your raw data.`))}return Reflect.get(t,r,a)}});return r.set(e,a),a}function F(t,e,r){let a=[];for(let i of e){let e=ut(i.source),n=ut(i.target),c=null;if(e===t?c=n:n===t&&(c=e),c){let t=r.get(c);t&&(0!==t.x||0!==t.y)&&a.push({x:t.x,y:t.y})}}return a}function N(t){let e=0;for(let r=0;r<t.length;r++)e=(e<<5)-e+t.charCodeAt(r)|0;return Math.abs(e)}function C(t,e,r){let a=t.match(/[a-zA-Z]|[-+]?\d*\.?\d+(?:[eE][-+]?\d+)?/g);if(!a)return t;let i=[],n=0;for(;n<a.length;){let t=a[n];if("M"===t||"L"===t||"C"===t||"Q"===t)for(i.push(t),n++;n<a.length&&!isNaN(Number(a[n]));)i.push(String(Number(a[n])+e)),n++,n<a.length&&!isNaN(Number(a[n]))&&(i.push(String(Number(a[n])+r)),n++);else if("A"===t)for(i.push(t),n++;n<a.length&&!isNaN(Number(a[n]));)i.push(a[n++]),n<a.length&&i.push(a[n++]),n<a.length&&i.push(a[n++]),n<a.length&&i.push(a[n++]),n<a.length&&i.push(a[n++]),n<a.length&&(i.push(String(Number(a[n])+e)),n++),n<a.length&&(i.push(String(Number(a[n])+r)),n++);else"Z"===t||"z"===t?(i.push(t),n++):(i.push(a[n]),n++)}return i.join(" ")}function z(t){let[e,r,a]=function(t){if(t.startsWith("#")){let e=t.slice(1);if(3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),6===e.length)return[0,2,4].map(t=>parseInt(e.slice(t,t+2),16))}let e=t.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/);return e?[+e[1],+e[2],+e[3]]:[128,128,128]}(t);return.299*e+.587*r+.114*a>150?"#222":"#fff"}function O(t){if(t)return"function"==typeof t?t:e=>e[t]}function j(t){if(!t)return null;if("function"==typeof t){let e=t;return t=>e(t.data??t)}return e=>e.data?.[t]||e[t]||e.id}function B(t){let e=new Map(t.map(t=>[t,0]));return t.map(t=>{let r=e.get(t),a=t;for(;r>0&&e.has(a);)a=`${t}__${r++}`;return e.set(t,r||1),e.set(a,1),a})}function X(t,e,r){if(e.colorByDepth&&void 0!==t.depth){let r=function(t){return Array.isArray(t.colorScheme)?t.colorScheme:t.themeCategorical&&t.themeCategorical.length>0?t.themeCategorical:Kt}(e);return r[t.depth%r.length]}return r||function(t){return Array.isArray(t.colorScheme)&&t.colorScheme.length>0?t.colorScheme[0]:t.themeSemantic?.primary?t.themeSemantic.primary:t.themeCategorical&&t.themeCategorical.length>0?t.themeCategorical[0]:"#4d430c"}(e)}function Y(t,e,r){return{fill:X(t,e,r.fill),stroke:r.stroke||e.themeSemantic?.surface||"#fff",strokeWidth:r.strokeWidth??1,opacity:r.opacity,cursor:r.cursor}}function q(t){return!t.__hierarchyNode?.children?.length}function Z(t,e,r,a,i){let n=(t+r)/2,c=(e+a)/2;return"horizontal"===i?`M ${t},${e} C ${n},${e} ${n},${a} ${r},${a}`:"radial"===i?`M ${t},${e} Q ${n},${e} ${n},${c} T ${r},${a}`:`M ${t},${e} C ${t},${c} ${r},${c} ${r},${a}`}function G(t,e,r){let a=r.treeOrientation||"vertical";if("radial"===a){let r=e.x,a=e.y;t.x=a*Math.cos(r-Math.PI/2),t.y=a*Math.sin(r-Math.PI/2)}else"horizontal"===a?(t.x=e.y,t.y=e.x):(t.x=e.x,t.y=e.y);Q(t,5)}function K(t,e){t.x0=e.x0,t.y0=e.y0,t.x1=t.value?e.x1:e.x0,t.y1=t.value?e.y1:e.y0,t.x=(t.x0+t.x1)/2,t.y=(t.y0+t.y1)/2,t.width=t.x1-t.x0,t.height=t.y1-t.y0}function V(t,e){let r=e.r??0;t.x=e.x,t.y=e.y,Q(t,r),t.__radius=r}function Q(t,e){t.x0=t.x-e,t.x1=t.x+e,t.y0=t.y-e,t.y1=t.y+e,t.width=2*e,t.height=2*e}function U(t){return t.data&&"object"==typeof t.data?t.data:t}function H(t,e,r){if(e)return r?.selectedStyle&&Object.assign(t,r.selectedStyle),t;let a=r?.unselectedOpacity??ft;return t.opacity=a,t.fillOpacity=a,t.strokeOpacity=a,r?.unselectedStyle&&Object.assign(t,r.unselectedStyle),t}function J(t,e,r){if(t)return e?a=>{let i={...t(a)};return e.isActive?H(i,e.predicate(U(a)),r):i}:t}function tt(t,e,r){if(t)return e?a=>{let i={...t(a)};if(!e.isActive)return i;let n=U(a),c="object"==typeof a.source?U(a.source):null,l="object"==typeof a.target?U(a.target):null;return H(i,c||l?!!c&&e.predicate(c)||!!l&&e.predicate(l):e.predicate(n),r)}:t}function et(t,e){if(!t)return[];let r=[],a=t=>{r.push(t);let i="function"==typeof e?e(t):t[e];i&&Array.isArray(i)&&i.forEach(a)};return a(t),r}function rt(t,e,r,a){if(t&&t.length>0)return t;let i=new Set;return e.forEach(t=>{let e="function"==typeof r?r(t):t[r],n="function"==typeof a?a(t):t[a];i.add(e),i.add(n)}),Array.from(i).map(t=>({id:t}))}function at({edgeColorBy:t,colorBy:e,colorScale:r,nodeStyleFn:a,edgeOpacity:i,baseStyle:n={}}){return c=>{let l={fillOpacity:i,...n};if("function"==typeof t)l.fill=t(c);else if("source"===t){let t="object"==typeof c.source?c.source:null;e&&t?l.fill=dt(t.data||t,e,r):t&&(l.fill=a(t,t.index).fill)}else if("target"===t){let t="object"==typeof c.target?c.target:null;e&&t?l.fill=dt(t.data||t,e,r):t&&(l.fill=a(t,t.index).fill)}else"gradient"===t&&(l.fill="#999",l.fillOpacity=.7*i);return l}}function it(t){return nt(t,"orbit",()=>({metaMap:new Map,startTime:typeof performance<"u"?performance.now():Date.now()}))}import{a as nt}from"./c-DEWMXCOF.min.js";import{a as ct,b as lt}from"./c-LHVHGQRW.min.js";import{e as ot,f as ut}from"./c-YLZIV3VS.min.js";import{a as st,e as ft}from"./c-OU7A3IUL.min.js";import{a as ht,r as dt}from"./c-WPL6PGP3.min.js";import{min as yt,group as gt,sum as pt,groups as mt,max as xt,mean as kt}from"d3-array";import{interpolateNumber as Lt}from"d3-interpolate";import{forceLink as vt,forceSimulation as bt,forceManyBody as Dt,forceCollide as Pt,forceCenter as Et,forceX as Mt,forceY as St}from"d3-force";import{ribbon as wt,chord as At}from"d3-chord";import{arc as $t,pie as Tt}from"d3-shape";import{hierarchy as Rt,cluster as _t,tree as It,treemap as Wt,treemapBinary as Ft,partition as Nt,pack as Ct}from"d3-hierarchy";var zt=class{constructor(t){this.size=t,this.maximum=new Float64Array(4*t),this.floor=new Float64Array(4*t)}query(t,e){let r=(a,i,n)=>{if(t<=i&&n<=e)return this.maximum[a];let c=i+n>>>1;return Math.max(this.floor[a],t<=c?r(2*a,i,c):0,e>c?r(2*a+1,c+1,n):0)};return r(1,0,this.size-1)}reserve(t,e,r){let a=(i,n,c)=>{if(this.maximum[i]=Math.max(this.maximum[i],r),t<=n&&c<=e)return void(this.floor[i]=Math.max(this.floor[i],r));let l=n+c>>>1;t<=l&&a(2*i,n,l),e>l&&a(2*i+1,l+1,c)};a(1,0,this.size-1)}},Ot=t=>{let{source:e,target:r}=t;if("string"==typeof e||"string"==typeof r)return null;if("down"===t.direction){let a=t.y0-t.sankeyWidth/2,i=t.y1-t.sankeyWidth/2,n=t.y1+t.sankeyWidth/2,c=t.y0+t.sankeyWidth/2,l=e.x1,o=r.x0,u=Lt(l,o),s=u(.5),f=u(.5);return`M${a},${l}C${a},${s} ${i},${f} ${i},${o}L${n},${o}C${n},${f} ${c},${s} ${c},${l}Z`}let a=t.sankeyWidth/2,i=Lt(e.x1,r.x0),{pathD:n}=_({sx:e.x1,sTop:t.y0-a,sBot:t.y0+a,tx:r.x0,tTop:t.y1-a,tBot:t.y1+a,cp1X:i(.5),cp2X:i(.5)});return n},jt=/*#__PURE__*/new Set,Bt=/*#__PURE__*/new WeakMap,Xt={left:function(t){return t.depth},right:function(t,e){return e-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?Math.min.apply(Math,t.sourceLinks.map(h))-1:0},justify:d},Yt={supportsStreaming:!0,hierarchical:!1,computeLayout(e,a,c,l){let o="vertical"===c.orientation?"down":"right",u=c.nodeAlign||"justify",f=c.nodeWidth??15,h=c.nodePaddingRatio??.05,y=c.iterations??300;for(let t of a)t.sankeyWidth=0,t.circular=!1,delete t.circularPathData,delete t._circularWidth,delete t._circularStub;for(let t of e)t.value=0,t.width=t.height=0,t.x0=t.x1=t.y0=t.y1=0,t.sourceLinks=[],t.targetLinks=[];let g=new Set(e.map(t=>t.id)),p=new Set,m=a.filter(t=>{let e=ut(t.source),r=ut(t.target);return!(!Number.isFinite(t.value)||t.value<=0||!g.has(e)||!g.has(r)||(p.add(e),p.add(r),0))}).map(t=>({...t,source:ut(t.source),target:ut(t.target)}));if(0===m.length)return;let x,k=e.filter(t=>p.has(t.id)).map(t=>({...t}));x="down"===o?[[0,0],[l[1],l[0]]]:[[0,0],[l[0],l[1]]];let L=function(){function e(){var e={nodes:k.apply(null,arguments),links:L.apply(null,arguments)};return function(e){e.x0=a,e.y0=c,e.x1=l,e.y1=o,e.py=0,function(e,r){e.nodes.forEach(function(t,e){t.index=e,t.sourceLinks=[],t.targetLinks=[]});var a=function(t,e){var r=new Map;return gt(t,e).forEach(function(t,e){r.set(e,t[0])}),r}(e.nodes,r);e.links.forEach(function(e,r){e.index=r;var i=e.source,n=e.target;"object"!=typeof i&&(i=e.source=t(a,i)),"object"!=typeof n&&(n=e.target=t(a,n)),i.sourceLinks.push(e),n.targetLinks.push(e)})}(e,y),function(t,e,r){var a=0,i=null==e?function(t,e,r){let a=t.length,i=Array.from({length:a},()=>[]),n=Array.from({length:a},()=>[]),c=new Int32Array(a),l=new Int32Array(a),o=new Float64Array(a),u=new Float64Array(e.length),s=new Int32Array(a),f=t.map(t=>{let e=r(t);return`${typeof e}:${String(e)}`}),h=0;for(let t of e)t.source.index!==t.target.index&&Number.isFinite(t.value)&&(h=Math.max(h,t.value));let d=(t,e)=>f[t]<f[e]?-1:f[t]>f[e]?1:0;e.map((t,e)=>e).sort((t,r)=>d(e[t].source.index,e[r].source.index)||d(e[t].target.index,e[r].target.index)||e[t].value-e[r].value).forEach(t=>{let r=e[t],a=r.source.index,s=r.target.index;if(a===s)return;let f=Number.isFinite(r.value)&&h>0?Math.max(0,r.value)/h:0;u[t]=f,n[a].push(t),i[s].push(t),l[a]++,c[s]++,o[a]+=f,o[s]-=f});let y=t.map(t=>t.index),g=Int32Array.from(y),p=t=>0===l[t]?2:0===c[t]?1:0,m=(t,e)=>{let r=p(t),a=p(e);return r!==a?r>a:0===r&&o[t]!==o[e]?o[t]>o[e]:f[t]<f[e]||f[t]===f[e]&&t<e},x=(t,e)=>{let r=y[t];y[t]=y[e],y[e]=r,g[y[t]]=t,g[r]=e},k=(t,e=!1)=>{let r=g[t];for(;!e&&r>0;){let e=r-1>>>1;if(!m(t,y[e]))break;x(r,e),r=e}for(;2*r+1<y.length;){let e=2*r+1;if(e+1<y.length&&m(y[e+1],y[e])&&e++,!m(y[e],t))break;x(r,e),r=e}};for(let t=(y.length>>>1)-1;t>=0;t--)k(y[t],!0);let L=0,v=a-1;for(;y.length;){let t=y[0];s[t]=0===l[t]?v--:L++;let r=y.pop();g[t]=-1,y.length&&(y[0]=r,g[r]=0,k(r));for(let r of n[t]){let t=e[r].target.index;g[t]<0||(c[t]--,o[t]+=u[r],k(t))}for(let r of i[t]){let t=e[r].source.index;g[t]<0||(l[t]--,o[t]-=u[r],k(t))}}return s}(t.nodes,t.links,r):null;t.nodes.forEach(function(t){delete t.circularLinkType}),t.links.forEach(function(t){delete t.circularLinkID,delete t.circularLinkType,delete t.circularPathData,delete t._circularWidth,delete t._circularStub,t.circular=i?i[t.source.index]>=i[t.target.index]:!(e(t.source)<e(t.target)),t.circular&&(t.circularLinkID=a++)})}(e,p,y),function(t,e){var a=0,i=0;t.links.forEach(function(t){t.circular&&(t.source.circularLinkType||t.target.circularLinkType?t.circularLinkType=t.source.circularLinkType?t.source.circularLinkType:t.target.circularLinkType:t.circularLinkType=a<i?"top":"bottom","top"==t.circularLinkType?a++:i++,t.source.circularLinkType=t.circularLinkType,t.target.circularLinkType=t.circularLinkType)}),t.links.forEach(function(t){t.circular&&(t.source.circularLinkType==t.target.circularLinkType&&(t.circularLinkType=t.source.circularLinkType),r(t,e)&&(t.circularLinkType=t.source.circularLinkType))})}(e,y),function(t){t.nodes.forEach(function(t){t.partOfCycle=!1,t.value=Math.max(pt(t.sourceLinks,s),pt(t.targetLinks,s)),t.sourceLinks.forEach(function(e){e.circular&&(t.partOfCycle=!0,t.circularLinkType=e.circularLinkType)}),t.targetLinks.forEach(function(e){e.circular&&(t.partOfCycle=!0,t.circularLinkType=e.circularLinkType)})})}(e),function(t,e,r){if(null!=e&&t.nodes.length){t.nodes.sort(function(t,r){return e(t)<e(r)?-1:1});var a=0,i=e(t.nodes[0]);t.nodes.forEach(function(t){a=e(t)==i?a:a+1,i=e(t)==i?i:e(t),t.column=a})}var n=new Int32Array(t.nodes.length),c=[],l=1;t.nodes.forEach(function(t){t.depth=t.height=0,t.targetLinks.forEach(function(e){e.circular||n[t.index]++}),0===n[t.index]&&c.push(t)});for(var o=0;o<c.length;o++){var u=c[o];l=Math.max(l,u.depth+1),u.sourceLinks.forEach(function(t){t.circular||(t.target.depth=Math.max(t.target.depth,u.depth+1),0===--n[t.target.index]&&c.push(t.target))})}for(o=c.length-1;o>=0;o--)(u=c[o]).sourceLinks.forEach(function(t){t.circular||(u.height=Math.max(u.height,t.target.height+1))});t.nodes.forEach(function(t){t.column=null==e?r(t,l):t.column})}(e,p,g);var d=f;if(null!==h){var k=mt(e.nodes,function(t){return t.column}).sort(function(t,e){return t[0]-e[0]}).map(function(t){return t[1]}),L=xt(k,function(t){return t.length});L>1&&(d=Math.max(1,(o-c)*h/(L-1)))}(function(t,e,r){var a=mt(t.nodes,function(t){return t.column}).sort(function(t,e){return t[0]-e[0]}).map(function(t){return t[1]});t.py=e;var i=yt(a,function(e){return(t.y1-t.y0-(e.length-1)*t.py)/pt(e,function(t){return t.value})});t.ky=i,t.links.forEach(function(e){e.width=e.value*t.ky});var n=xt(t.nodes,function(t){return t.column});n>0?t.nodes.forEach(function(e){e.x0=t.x0+e.column*((t.x1-t.x0-r)/n),e.x1=e.x0+r}):t.nodes.forEach(function(e){e.x0=t.x0,e.x1=e.x0+r})})(e,d,u),$(e,p,y),T(e,p,y,d,d,m),R(e),$(e,p,y),T(e,p,y,d,d,m),R(e),function(t){let e=t;e.nodes.forEach(function(t){t.y+(t.y1-t.y0)>e.y1&&(t.y=t.y-(t.y+(t.y1-t.y0)-e.y1));var r=t.sourceLinks.slice().sort(function(t,e){return t.index-e.index});r.length>1&&r.sort(function(t,e){if(!t.circular&&!e.circular){if(t.target.column==e.target.column)return t.y1-e.y1;if(!D(t,e))return t.y1-e.y1;if(t.target.column>e.target.column){var r=i(e,t);return t.y1-r}if(e.target.column>t.target.column)return i(t,e)-e.y1}return t.circular&&!e.circular?"top"==t.circularLinkType?-1:1:e.circular&&!t.circular?"top"==e.circularLinkType?1:-1:t.circular&&e.circular?t.circularLinkType===e.circularLinkType&&"top"==t.circularLinkType?t.target.column===e.target.column?t.target.y1-e.target.y1:e.target.column-t.target.column:t.circularLinkType===e.circularLinkType&&"bottom"==t.circularLinkType?t.target.column===e.target.column?e.target.y1-t.target.y1:t.target.column-e.target.column:"top"==t.circularLinkType?-1:1:void 0});var a=t.y0;r.forEach(function(t){t.y0=a+t.width/2,a+=t.width});for(var n=0,c=r.length-1;c>=0;c--){var l=r[c];"bottom"==l.circularLinkType&&(l.y0=t.y1-n-l.width/2),n+=l.width}})}(e),e.nodes.forEach(function(t){var e=t.targetLinks.slice().sort(function(t,e){return t.index-e.index});e.length>1&&e.sort(function(t,e){if(!t.circular&&!e.circular){if(t.source.column==e.source.column)return t.y0-e.y0;if(!D(t,e))return t.y0-e.y0;if(e.source.column<t.source.column){var r=n(e,t);return t.y0-r}if(t.source.column<e.source.column)return n(t,e)-e.y0}return t.circular&&!e.circular?"top"==t.circularLinkType?-1:1:e.circular&&!t.circular?"top"==e.circularLinkType?1:-1:t.circular&&e.circular?t.circularLinkType===e.circularLinkType&&"top"==t.circularLinkType?t.source.column===e.source.column?t.source.y1-e.source.y1:t.source.column-e.source.column:t.circularLinkType===e.circularLinkType&&"bottom"==t.circularLinkType?t.source.column===e.source.column?t.source.y1-e.source.y1:e.source.column-t.source.column:"top"==t.circularLinkType?-1:1:void 0});var r=t.y0;e.forEach(function(t){t.y1=r+t.width/2,r+=t.width});for(var a=0,i=e.length-1;i>=0;i--){var c=e[i];"bottom"==c.circularLinkType&&(c.y1=t.y1-a-c.width/2),a+=c.width}}),function(t){var e=t.nodes,r=t.links,a=!1,i=!1;if(r.forEach(function(t){"top"==t.circularLinkType?a=!0:"bottom"==t.circularLinkType&&(i=!0)}),0==a||0==i){let a=function(e){return(e-n)/(c-n)*(t.y1-t.y0)+t.y0};var n=yt(e,function(t){return t.y0}),c=xt(e,function(t){return t.y1}),l=c-n,o=(t.y1-t.y0)/l;o<1?(e.forEach(function(t){t.y0=a(t.y0),t.y1=a(t.y1)}),r.forEach(function(t){t.y0=a(t.y0),t.y1=a(t.y1),t.width=t.width*o})):e.forEach(function(t){var e=t.y1-t.y0,r=a(t.y0)-t.y0;t.y0=a(t.y0),t.y1=t.y0+e,t.sourceLinks.forEach(function(t){t.y0=t.y0+r}),t.targetLinks.forEach(function(t){t.y1=t.y1+r})})}}(e),E(e,y,x,10,8)}(e),e}var a=0,c=0,l=1,o=1,u=24,f=8,h=null,y=S,g=d,p=void 0,m=32,x=2,k=w,L=A;return e.update=function(t){return R(t),E(t,y,x,10,8),t},e.nodeWidth=function(t){return arguments.length?(u=+t,e):u},e.nodePadding=function(t){return arguments.length?(f=+t,e):f},e.nodePaddingRatio=function(t){return arguments.length?(h=+t,e):h},e.nodes=function(t){return arguments.length?(k="function"==typeof t?t:M(t),e):k},e.links=function(t){return arguments.length?(L="function"==typeof t?t:M(t),e):L},e.nodeId=function(t){return arguments.length?(y="function"==typeof t?t:M(t),e):y},e.nodeAlign=function(t){return arguments.length?(g="function"==typeof t?t:M(t),e):g},e.nodeSort=function(t){return arguments.length?(p=t,e):p},e.iterations=function(t){return arguments.length?(m=+t,e):m},e.circularLinkGap=function(t){return arguments.length?(x=+t,e):x},e.extent=function(t){return arguments.length?(a=+t[0][0],c=+t[0][1],l=+t[1][0],o=+t[1][1],e):[[a,c],[l,o]]},e.size=function(t){return arguments.length?(a=c=0,l=+t[0],o=+t[1],e):[l-a,o-c]},e}().extent(x).links(m).nodes(k).nodeAlign(Xt[u]||d).nodeId(t=>t.id).nodeWidth(f).iterations(y);L.nodePaddingRatio&&L.nodePaddingRatio(h),L();{let t=1/0,e=-1/0,r=1/0,a=-1/0;for(let i of k)i.x0<t&&(t=i.x0),i.x1>e&&(e=i.x1),i.y0<r&&(r=i.y0),i.y1>a&&(a=i.y1);for(let i of m){if(!i.circular||!i.circularPathData)continue;let n=i.circularPathData,c=(i._circularWidth??i.width??0)/2;n.leftFullExtent-c<t&&(t=n.leftFullExtent-c),n.rightFullExtent+c>e&&(e=n.rightFullExtent+c),n.verticalFullExtent-c<r&&(r=n.verticalFullExtent-c),n.verticalFullExtent+c>a&&(a=n.verticalFullExtent+c)}let i=e-t,n=a-r,c=x[1][0],l=x[1][1];if(i>0&&n>0&&(t<0||r<0||e>c||a>l)){let e=c/i,a=l/n,o=Math.min(e,a),u=-t*o+(c-i*o)/2,s=-r*o+(l-n*o)/2;for(let t of k)t.x0=t.x0*o+u,t.x1=t.x1*o+u,t.y0=t.y0*o+s,t.y1=t.y1*o+s;for(let t of m)if(t.y0=t.y0*o+s,t.y1=t.y1*o+s,t.width=(t.width??0)*o,t._circularWidth&&(t._circularWidth*=o),t.circular&&t.circularPathData){let e=t.circularPathData;e.sourceX=e.sourceX*o+u,e.targetX=e.targetX*o+u,e.sourceY=e.sourceY*o+s,e.targetY=e.targetY*o+s,e.rightFullExtent=e.rightFullExtent*o+u,e.leftFullExtent=e.leftFullExtent*o+u,e.verticalFullExtent=e.verticalFullExtent*o+s,e.rightInnerExtent=e.rightInnerExtent*o+u,e.leftInnerExtent=e.leftInnerExtent*o+u,e.verticalRightInnerExtent=e.verticalRightInnerExtent*o+s,e.verticalLeftInnerExtent=e.verticalLeftInnerExtent*o+s,e.rightSmallArcRadius*=o,e.rightLargeArcRadius*=o,e.leftSmallArcRadius*=o,e.leftLargeArcRadius*=o,e.sourceWidth*=o,e.rightNodeBuffer*=o,e.leftNodeBuffer*=o,e.arcRadius*=o}}}let v=new Map;for(let t of e)v.set(t.id,t);for(let t of k){let e=v.get(t.id);e&&(e.x0=t.x0,e.x1=t.x1,e.y0=t.y0,e.y1=t.y1,e.value=t.value,e.depth=t.depth,e.sourceLinks=t.sourceLinks,e.targetLinks=t.targetLinks,e.width=t.x1-t.x0,e.height=t.y1-t.y0,e.x=t.x0+(t.x1-t.x0)/2,e.y=t.y0+(t.y1-t.y0)/2)}let b=new Map;for(let t of a)if(t._edgeKey)b.set(t._edgeKey,t);else{let e=ut(t.source),r=ut(t.target);b.set(`${e}\0${r}`,t)}for(let t of m){let e=ut(t.source),r=ut(t.target),a=t._edgeKey?b.get(t._edgeKey):b.get(`${e}\0${r}`);if(a){a.y0=t.y0,a.y1=t.y1,a.sankeyWidth=t.width??0,a.circular=!!t.circular,a.circularPathData=t.circularPathData,a._circularWidth=t._circularWidth,a._circularStub=t._circularStub,a.path=t.path,a.circularLinkType=t.circularLinkType,a.direction=o;let i=v.get(e),n=v.get(r);i&&(a.source=i),n&&(a.target=n)}}},buildScene(t,e,r,a){let i="vertical"===r.orientation?"down":"right",n=r.nodeStyle,c=r.edgeStyle,l=r.edgeOpacity??.5,o=r.edgeColorBy||"source",u=Array.isArray(r.colorScheme)?r.colorScheme:r.themeCategorical&&r.themeCategorical.length>0?r.themeCategorical:ht,s=new Map;t.forEach((t,e)=>{s.set(t.id,u[e%u.length])});let f=[],h=[],d=[],y=new Map;for(let e of t){let t=e.x1-e.x0,r=e.y1-e.y0;if(e.value<=0||t<=0||r<=0)continue;let a=n?n(W(e,"nodeStyle")):{},c={fill:a.fill||s.get(e.id)||"#4d430c",stroke:a.stroke,strokeWidth:a.strokeWidth,opacity:a.opacity,cursor:a.cursor};y.set(e.id,("string"==typeof c.fill?c.fill:null)||s.get(e.id)||"#4d430c");let l={...e.data,value:e.data?.value??e.value};"down"===i?f.push({type:"rect",x:e.y0,y:e.x0,w:r,h:t,style:c,accessibleDatum:l,datum:e,id:e.id,label:e.id}):f.push({type:"rect",x:e.x0,y:e.y0,w:t,h:r,style:c,accessibleDatum:l,datum:e,id:e.id,label:e.id})}let g=[...e].sort((t,e)=>(e.sankeyWidth||0)-(t.sankeyWidth||0));for(let t of g){if(!(t.value>0)||!t.sankeyWidth||t.sankeyWidth<=0)continue;let e="object"==typeof t.source?t.source:null,a="object"==typeof t.target?t.target:null;if(!e||!a)continue;let i=r.themeSemantic?.border||r.themeSemantic?.secondary||"#999";i="function"==typeof o?o(t)||i:"target"===o?y.get(a.id)||s.get(a.id)||i:y.get(e.id)||s.get(e.id)||i;let n,u=c?c(W(t,"edgeStyle")):{};if(n=t.circular&&t.circularPathData?I(t):Ot(t),!n)continue;let f={fill:u.fill||i,fillOpacity:u.fillOpacity??l,stroke:u.stroke||"none",strokeWidth:u.strokeWidth,strokeOpacity:u.strokeOpacity,opacity:u.opacity,cursor:u.cursor};h.push({type:"bezier",pathD:n,bezierCache:t.bezier,style:f,accessibleDatum:t.data,datum:t})}if(!1!==r.showLabels){let e=ot(r.nodeLabel);for(let r of t){let t=r.x1-r.x0,n=r.y1-r.y0;if(r.value<=0||t<=0||n<=0)continue;let c,l,o,u=e?e(r):r.id;if(u){if("down"===i)c=r.y0+(r.y1-r.y0)/2,l=r.x1+14,o="start";else{let e=a[0]/2;r.x0+t/2<e?(c=r.x0-6,o="end"):(c=r.x1+6,o="start"),l=r.y0+n/2}d.push({x:c,y:l,text:String(u),anchor:"down"===i?"middle":o,baseline:"middle",fontSize:11})}}}return{sceneNodes:f,sceneEdges:h,labels:d}}},qt={supportsStreaming:!0,hierarchical:!1,computeLayout(t,e,r,a){if(0===t.length)return;let i=r.forceStrength??.1,n=a[0]/2,c=a[1]/2,l=Math.max(.1,Math.min(1,Math.min(a[0],a[1])/200)),o=Math.min(.5,.06+1.8*(1-l)),u=r.__previousPositions,s=0,f=[];for(let e of t){let t=!1!==e.__hasPosition&&Number.isFinite(e.x)&&Number.isFinite(e.y),r=u?.get(e.id);t?s++:r?(e.x=r.x,e.y=r.y,s++):f.push(e)}let h=t.length>0?f.length/t.length:1,d=s>0&&h<=.3;if(d){let r=new Map;for(let e of t)r.set(e.id,e);for(let t of f){let a=F(t.id,e,r);if(a.length>0){let e=0,r=0;for(let t of a)e+=t.x,r+=t.y;let i=N(t.id),n=i%360*(Math.PI/180),c=(10+i%20)*l;t.x=e/a.length+c*Math.cos(n),t.y=r/a.length+c*Math.sin(n)}else{let e=N(t.id),r=e%360*(Math.PI/180),a=(15+e%30)*l;t.x=n+a*Math.cos(r),t.y=c+a*Math.sin(r)}}}else{let e=Math.PI*(3-Math.sqrt(5));for(let r=0;r<t.length;r++){let a=t[r];if(!1===a.__hasPosition||!Number.isFinite(a.x)||!Number.isFinite(a.y)){let t=10*Math.sqrt(r+.5)*l,i=r*e;a.x=n+t*Math.cos(i),a.y=c+t*Math.sin(i)}}}for(let e of t)e.__hasPosition=!0;let y=t.length,g=r.iterations??Math.max(50,Math.min(300,Math.floor(300-2*(y-30)))),p=r.__skipForceSimulation||0===r.iterations?0:d?40:g,m=ct(r.nodeSize,r.nodeSizeRange,t);if(p>0){let u=new Map,s=new Map;for(let e of t)u.set(e.id,0),s.set(e.id,e);for(let t of e){let e=ut(t.source),r=ut(t.target);u.set(e,(u.get(e)??0)+1),u.set(r,(u.get(r)??0)+1)}let f=vt().strength(t=>{let e=lt(t),r=ut(t.source),a=ut(t.target),n=Math.max(1,Math.min(u.get(r)??1,u.get(a)??1)),c=e&&e>0?Math.sqrt(e):1;return Math.min(2.5,c*i/(.1*n))}).distance(t=>{let e="string"==typeof t.source?s.get(t.source):t.source,r="string"==typeof t.target?s.get(t.target):t.target,a=(e?m(e):0)+(r?m(r):0)+Math.max(6,12*l);return Math.max(16,40*l,a)}).id(t=>t.id),h=bt();if((void 0!==r.random||void 0!==r.seed)&&h.randomSource(r.random??st(r.seed)),h.force("charge",Dt().strength(t=>{let e=u.get(t.id)??0;return-15*l*m(t)*Math.sqrt(e+1)})).force("collide",Pt(t=>m(t)+3*l).strength(.9).iterations(2)).force("center",Et(n,c).strength(.8)).force("x",Mt(n).strength(o)).force("y",St(c).strength(o)).force("bounds",function(t,e,r=2,a=.6){let i=[],n=n=>{let c=a*Math.max(n,.2);for(let a of i){let i=a.x??t[0]/2,n=a.y??t[1]/2,l=a.vx??0,o=a.vy??0,u=e(a)+r,s=Math.min(t[0]/2,u),f=Math.max(t[0]/2,t[0]-u),h=Math.min(t[1]/2,u),d=Math.max(t[1]/2,t[1]-u),y=i+l,g=n+o;y<s?a.vx=l+(s-y)*c:y>f&&(a.vx=l+(f-y)*c),g<h?a.vy=o+(h-g)*c:g>d&&(a.vy=o+(d-g)*c)}};return n.initialize=t=>{i=t},n}(a,m)),h.nodes(t),e.length>0){let t=e.map(t=>({...t,source:ut(t.source),target:ut(t.target)}));f.links(t),h.force("link",f)}d?h.alpha(.3):h.alpha()<.1&&h.alpha(1),h.stop();for(let t=0;t<p;++t)h.tick()}for(let e of t){if(null==e.x||null==e.y)continue;let t=m(e),r=p>0?2:0,i=Math.min(a[0]/2,t+r),n=Math.min(a[1]/2,t+r);e.x=Math.max(i,Math.min(a[0]-i,e.x)),e.y=Math.max(n,Math.min(a[1]-n,e.y)),e.x0=0,e.x1=0,e.y0=0,e.y1=0}let x=new Map;for(let e of t)x.set(e.id,e);for(let t of e){if("string"==typeof t.source){let e=x.get(t.source);e&&(t.source=e)}if("string"==typeof t.target){let e=x.get(t.target);e&&(t.target=e)}}},buildScene(t,e,r,a){let i=r.nodeStyle,n=r.edgeStyle,c=ct(r.nodeSize,r.nodeSizeRange,t),l=Array.isArray(r.colorScheme)?r.colorScheme:r.themeCategorical&&r.themeCategorical.length>0?r.themeCategorical:ht,o=new Map;t.forEach((t,e)=>{o.set(t.id,l[e%l.length])});let u=[],s=[],f=[];for(let e of t){if(null==e.x||null==e.y)continue;let t=c(W(e,"nodeSize")),a=i?i(W(e,"nodeStyle")):{},n={fill:a.fill||o.get(e.id)||r.themeSemantic?.primary||"#007bff",stroke:a.stroke||r.themeSemantic?.surface||"#fff",strokeWidth:a.strokeWidth??2,opacity:a.opacity,cursor:a.cursor};u.push({type:"circle",cx:e.x,cy:e.y,r:t,style:n,accessibleDatum:e.data,datum:e,id:e.id,label:e.id})}let h=new Map;for(let e of t)h.set(e.id,e);for(let t of e){let e="object"==typeof t.source?t.source:h.get(t.source),a="object"==typeof t.target?t.target:h.get(t.target);if(!e||!a||null==e.x||null==e.y||null==a.x||null==a.y)continue;let i=n?n(W(t,"edgeStyle")):{},c={stroke:i.stroke||r.themeSemantic?.border||r.themeSemantic?.secondary||"#999",strokeWidth:i.strokeWidth??1,opacity:i.opacity??.6,cursor:i.cursor};s.push({type:"line",x1:e.x,y1:e.y,x2:a.x,y2:a.y,style:c,accessibleDatum:t.data,datum:t})}if(!1!==r.showLabels){let e=ot(r.nodeLabel);for(let r of t){if(null==r.x||null==r.y)continue;let t=e?e(r):r.id;if(!t)continue;let a=c(W(r,"nodeSize"));f.push({x:r.x,y:r.y-a-4,text:String(t),anchor:"middle",baseline:"auto",fontSize:11,anchorPoint:[r.x,r.y]})}}return{sceneNodes:u,sceneEdges:s,labels:f}}},Zt=ht,Gt={supportsStreaming:!1,hierarchical:!1,computeLayout(t,e,r,a){for(let e of t)delete e.__arcData;for(let t of e)delete t.__chordData,delete t.__chordEdges;if(0===t.length)return;let{padAngle:i=.01,groupWidth:n=20,sortGroups:c}=r,l=Math.min(a[0],a[1])/2,o=l-n,u=a[0]/2,s=a[1]/2,f=new Map(t.map(t=>[t.id,t])),h=new Set,d=e.filter(t=>{let e=ut(t.source),r=ut(t.target);return!(!Number.isFinite(t.value)||t.value<=0||!f.has(e)||!f.has(r)||(h.add(e),h.add(r),0))}),y=t.filter(t=>h.has(t.id)),g=y.length;if(0===g)return;let p=new Map(y.map((t,e)=>[t.id,e])),m=Array.from({length:g},()=>new Array(g).fill(0)),x=new Map;for(let t of d){let e=ut(t.source),r=ut(t.target),a=p.get(e),i=p.get(r);m[a][i]+=t.value;let n=a<=i?`${a}\0${i}`:`${i}\0${a}`,c=x.get(n);c?c.push(t):x.set(n,[t])}let k=Math.min(Number.isFinite(i)?Math.max(0,i):.01,Math.PI/g),L=At().padAngle(k);c&&L.sortGroups(c);let v=L(m),b=v.groups,D=$t().innerRadius(o).outerRadius(l);for(let t of b){let e=y[t.index],r={innerRadius:o,outerRadius:l,startAngle:t.startAngle,endAngle:t.endAngle},a=D.centroid(r);e.x=a[0]+u,e.y=a[1]+s,e.__arcData={startAngle:t.startAngle,endAngle:t.endAngle}}for(let t of e){let e=ut(t.source),r=ut(t.target),a=f.get(e),i=f.get(r);a&&(t.source=a),i&&(t.target=i)}for(let t of v){let e=t.source.index,r=t.target.index,a=e<=r?`${e}\0${r}`:`${r}\0${e}`,i=x.get(a);for(let e of i)e.__chordData=t,e.__chordEdges=i}},buildScene(t,e,r,a){let{groupWidth:i=20,edgeOpacity:n=.5}=r,c=Math.min(a[0],a[1])/2,l=c-i,o=a[0]/2,u=a[1]/2,s=r.nodeStyle,f=r.edgeStyle,h=r.edgeColorBy||"source",d=Array.isArray(r.colorScheme)?r.colorScheme:r.themeCategorical&&r.themeCategorical.length>0?r.themeCategorical:Zt,y=new Map;t.forEach((t,e)=>{y.set(t.id,d[e%d.length])});let g=wt().radius(l),p=[],m=[],x=[];for(let e=0;e<t.length;e++){let r=t[e],a=r.__arcData;if(!a)continue;let i=s?s(W(r,"nodeStyle")):{},n={fill:("string"==typeof i.fill?i.fill:void 0)||y.get(r.id)||d[e%d.length],stroke:i.stroke||"black",strokeWidth:i.strokeWidth??1,opacity:i.opacity,cursor:i.cursor};p.push({type:"arc",cx:o,cy:u,innerR:l,outerR:c,startAngle:a.startAngle-Math.PI/2,endAngle:a.endAngle-Math.PI/2,style:n,accessibleDatum:r.data,datum:r,id:r.id,label:r.id})}let k=new Set,L=t.filter(t=>t.__arcData);for(let t of e){let e=t.__chordData;if(!e||k.has(e))continue;k.add(e);let a=L[e.source.index].id;for(let e of t.__chordEdges||[])ut(e.source)===a&&(t=e);let i=g(e);if(!i)continue;let c=C(i,o,u),l=r.themeSemantic?.border||r.themeSemantic?.secondary||"#999",s=f?f(W(t,"edgeStyle")):{};if(f)l=("string"==typeof s.fill?s.fill:void 0)||l;else{let e="object"==typeof t.source?t.source:null,r="object"==typeof t.target?t.target:null;"target"===h&&r?l=y.get(r.id)||l:e&&(l=y.get(e.id)||l)}let d={fill:l,fillOpacity:s.fillOpacity??n,stroke:s.stroke||"none",strokeWidth:s.strokeWidth,strokeOpacity:s.strokeOpacity,opacity:s.opacity,cursor:s.cursor};m.push({type:"ribbon",pathD:c,style:d,accessibleDatum:t.data,datum:t})}if(!1!==r.showLabels){let e=ot(r.nodeLabel),a=c+12;for(let r of t){let t=r.__arcData;if(!t)continue;let i=e?e(r):r.id;if(!i)continue;let n=(t.startAngle+t.endAngle)/2,c=n-Math.PI/2,l=o+Math.cos(c)*a,s=u+Math.sin(c)*a,f=n>Math.PI?"end":"start";x.push({x:l,y:s,text:String(i),anchor:f,baseline:"middle",fontSize:11})}}return{sceneNodes:p,sceneEdges:m,labels:x}}},Kt=["#e8d5b7","#b8d4e3","#d4e3b8","#e3c4d4","#d4d4e3","#e3d4b8","#b8e3d4","#e3b8b8"],Vt={supportsStreaming:!1,hierarchical:!0,computeLayout(t,e,r,a){let i=r.__hierarchyRoot;if(!i)return;let n=r.chartType,c=O(r.childrenAccessor),l=Rt(i,c),o=[];l.eachBefore(t=>o.push(t));let u=B(o.map((t,e)=>function(t,e,r){let a=e.nodeIDAccessor,i=t.data;return String("function"==typeof a?a(i):"string"==typeof a&&void 0!==i[a]?i[a]:void 0!==i.name?i.name:void 0!==i.id?i.id:`node-${r}`)}(t,r,e)));l.sum(function(t="value"){let e="function"==typeof t?t:e=>e[t];return t=>{let r=e(t),a="string"==typeof r?Number(r):r;return Number.isFinite(a)&&a>0?a:0}}(r.hierarchySum)).sort((t,e)=>e.value-t.value);let[s,f]=a;switch(n){case"tree":case"cluster":!function(t,e,r,a){let i=e.treeOrientation||"vertical",n="cluster"===e.chartType?_t():It();if("horizontal"===i)n.size([a,r]);else if("radial"===i){let t=Math.min(r,a)/2;n.size([2*Math.PI,.8*t])}else n.size([r,a]);n(t)}(l,r,s,f);break;case"treemap":case"partition":!function(t,e,r,a){let i="treemap"===e.chartType,n=i?Wt().tile(Ft):Nt();n.size([r,a]).padding(e.padding??(i?4:1)),"paddingTop"in n&&e.paddingTop>0&&n.paddingTop(e.paddingTop),n(t)}(l,r,s,f);break;case"circlepack":!function(t,e,r,a){let i=e.padding??4,n=Ct().size([r,a]).padding(i);t.leaves().some(t=>t.value)||n.radius(()=>0).padding(0),n(t)}(l,r,s,f)}let h=l.descendants();t.length=0,e.length=0;let d=new Map(o.map((t,e)=>[t,{id:u[e],x:0,y:0,x0:0,x1:0,y0:0,y1:0,width:0,height:0,value:t.value,depth:t.depth,data:t.data,createdByFrame:!0}]));for(let e of h){let a=d.get(e);"tree"===n||"cluster"===n?G(a,e,r):"treemap"===n||"partition"===n?K(a,e):"circlepack"===n&&V(a,e),a.__hierarchyNode=e,t.push(a)}if("tree"===n||"cluster"===n)for(let t of h)if(t.parent){let r=d.get(t.parent),a=d.get(t);e.push({source:r,target:a,value:1,y0:0,y1:0,sankeyWidth:0,data:{depth:t.depth}})}},buildScene(t,e,r,a){let i=r.chartType,n=r.nodeStyle||(()=>({})),c=r.edgeStyle||(()=>({}));switch(i){case"tree":case"cluster":return function(t,e,r,a,i,n){let c=[],l=[],o=[],u=r.treeOrientation||"vertical",s="radial"===u,f=a[0]/2,h=a[1]/2,{nodeSize:d}=r,y="number"==typeof d?d:5;for(let e of t){let t=e.x,a=e.y;s&&(t+=f,a+=h);let n=Y(e,r,i(W(e,"nodeStyle")));c.push({type:"circle",cx:t,cy:a,r:y,style:n,accessibleDatum:{...e.data,value:e.data?.value??e.value},datum:e,id:e.id,label:e.id,depth:e.depth})}let g=r.edgeOpacity??.5;for(let t of e){let e="object"==typeof t.source?t.source:null,a="object"==typeof t.target?t.target:null;if(!e||!a)continue;let i=e.x,c=e.y,o=a.x,d=a.y;s&&(i+=f,c+=h,o+=f,d+=h);let y=Z(i,c,o,d,u),p=n(W(t,"edgeStyle")),m={fill:"none",stroke:p.stroke||r.themeSemantic?.border||r.themeSemantic?.secondary||"#999",strokeWidth:p.strokeWidth??1.5,opacity:p.opacity??g,cursor:p.cursor};l.push({type:"curved",pathD:y,style:m,datum:t})}if(!1!==r.showLabels){let e=j(r.nodeLabel);for(let r of t){let t=e?e(r):r.id;if(!t)continue;let a,i,n,c=r.x,l=r.y;if(s&&(c+=f,l+=h),s){let t=c-f,e=l-h,r=Math.sqrt(t*t+e*e);r>0?(a=c+t/r*10,i=l+e/r*10,n=t>=0?"start":"end"):(a=c,i=l-12,n="middle")}else"horizontal"===u?(q(r)?(a=c+y+6,n="start"):(a=c-y-6,n="end"),i=l):(a=c,i=l+y+14,n="middle");o.push({x:a,y:i,text:String(t),anchor:n,baseline:"middle",fontSize:11,anchorPoint:[c,l]})}}return{sceneNodes:c,sceneEdges:l,labels:o}}(t,e,r,a,n,c);case"treemap":case"partition":return function(t,e,r){let a=[],i=[];for(let i of t){let t=i.x1-i.x0,n=i.y1-i.y0;if(t<=0||n<=0)continue;let c=r(W(i,"nodeStyle")),l=Y(i,e,c);l.fillOpacity=c.fillOpacity,l.strokeOpacity=c.strokeOpacity,a.push({type:"rect",x:i.x0,y:i.y0,w:t,h:n,style:l,accessibleDatum:{...i.data,value:i.data?.value??i.value},datum:i,id:i.id,label:i.id,depth:i.depth})}if(!1!==e.showLabels){let a=j(e.nodeLabel),n=e.labelMode||"leaf",c="partition"===e.chartType;for(let l of t){let t=l.x1-l.x0,o=l.y1-l.y0;if(t<=0||o<=0)continue;let u=q(l);if(!c&&("leaf"===n&&!u||"parent"===n&&u))continue;let s=a?a(l):l.id;if(!s)continue;if(t<(u?30:40)||o<(u?16:14))continue;let f=X(l,e,r(W(l,"nodeStyle")).fill),h="string"==typeof f?z(f):e.themeSemantic?.text??"#000";u?i.push({x:l.x0+t/2,y:l.y0+o/2,text:String(s),anchor:"middle",baseline:"middle",fontSize:Math.min(11,Math.max(8,Math.min(t,o)/6)),fill:h}):i.push({x:l.x0+4,y:l.y0+12,text:String(s),anchor:"start",baseline:"auto",fontSize:11,fontWeight:600,fill:h})}}return{sceneNodes:a,sceneEdges:[],labels:i}}(t,r,n);case"circlepack":return function(t,e,r){let a=[],i=[];for(let i of t){let t=i.__radius??5;if(t<=0)continue;let n=Y(i,e,r(W(i,"nodeStyle")));n.opacity??(n.opacity=.7),a.push({type:"circle",cx:i.x,cy:i.y,r:t,style:n,accessibleDatum:{...i.data,value:i.data?.value??i.value},datum:i,id:i.id,label:i.id,depth:i.depth})}if(!1!==e.showLabels){let a=j(e.nodeLabel);for(let n of t){let t=n.__radius??5,c=a?a(n):n.id;if(!c||t<15)continue;let l=q(n),o=X(n,e,r(W(n,"nodeStyle")).fill);if(l){let r="string"==typeof o?z(o):e.themeSemantic?.text??"#000";i.push({x:n.x,y:n.y,text:String(c),anchor:"middle",baseline:"middle",fontSize:Math.min(11,Math.max(8,t/3)),fill:r})}else i.push({x:n.x,y:n.y-t+14,text:String(c),anchor:"middle",baseline:"hanging",fontSize:Math.min(11,Math.max(8,t/3)),fill:e.themeSemantic?.text||"#000",stroke:e.themeSemantic?.surface||"#fff",strokeWidth:3,paintOrder:"stroke"})}}return{sceneNodes:a,sceneEdges:[],labels:i}}(t,r,n);default:return{sceneNodes:[],sceneEdges:[],labels:[]}}}},Qt={supportsStreaming:!1,hierarchical:!0,supportsAnimation:!0,computeLayout(t,e,r,a){let i=r.__hierarchyRoot;i&&function(t,e,r,a,i){let n=O(r.childrenAccessor||"children"),c=function(t){if("function"==typeof t)return t;let e=t||"name";return t=>String(t[e]??"")}(r.nodeIDAccessor),l=function(t){if(Array.isArray(t))return t;switch(t){case"solar":return[1];case"atomic":return[2,8];default:return[9999]}}(r.orbitMode),o=r.orbitSize??2.95,u=r.orbitEccentricity??1,s="number"==typeof o?()=>o:o,f="number"==typeof u?()=>u:u,h=it(r);h.metaMap.clear(),a.length=0,i.length=0;let d=B(et(t,n).map(t=>String(c(t)))),y=0,g=e[0]/2,p=e[1]/2,m=Math.min(e[0],e[1])/2*.85,x=d[y++],k={id:x,x:g,y:p,x0:g,x1:g,y0:p,y1:p,width:0,height:0,value:0,depth:0,data:t};a.push(k),h.metaMap.set(x,{ring:m,angle:0,depth:0,parentId:null,eccentricity:1}),function t(e,r,c,o,u,g,p){let m=n(e);if(!m?.length)return;let x=m.length,k=0,L=0,v=0;for(;L<x;)L+=l[Math.min(v,l.length-1)],v++,k++;let b=0;for(let x=0;x<k;x++){let L=l[Math.min(x,l.length-1)],v=m.slice(b,b+L);if(!v.length)break;let D=(x+1)/k,P={id:r,depth:g,data:e,parentId:r},E=p?u/s(P)*D:u*D,M=Tt().value(t=>n(t)?.length?4:1).sort(null)(v),S=f(P);for(let e=0;e<v.length;e++){let n=(M[e].startAngle+M[e].endAngle)/2,l=v[e],u=d[y++],s=c+E*Math.sin(n),f=o+E*Math.cos(n)*S,p={id:u,x:s,y:f,x0:s,x1:s,y0:f,y1:f,width:0,height:0,value:0,depth:g,data:l};a.push(p),h.metaMap.set(u,{ring:E,angle:n,depth:g,parentId:r,eccentricity:S}),i.push({source:r,target:u,value:1,y0:0,y1:0,sankeyWidth:0,data:{source:r,target:u}}),t(l,u,s,f,E,g+1,!0)}b+=L}}(t,x,g,p,m,1,!1)}(i,a,r,t,e)},buildScene(t,e,r,a){let i=r.nodeStyle,n=r.edgeStyle,c=r.nodeSize,l="number"==typeof c?()=>c:"function"==typeof c?c:()=>6,o=[],u=[],s=[];if(!1!==r.orbitShowRings){let e=it(r),a=new Map;for(let e of t)a.set(e.id,e);let i=new Map;for(let[,t]of e.metaMap){if(!t.parentId)continue;let e=a.get(t.parentId);if(!e)continue;let r=`${t.parentId}:${t.ring}`;i.has(r)||i.set(r,{parentX:e.x,parentY:e.y,ring:t.ring,ecc:t.eccentricity})}let n=48,c={stroke:"rgba(128,128,128,0.35)",strokeWidth:.5,opacity:1};for(let[,{parentX:t,parentY:e,ring:r,ecc:a}]of i)for(let i=0;i<n;i++){let l=i/n*Math.PI*2,o=(i+1)/n*Math.PI*2;u.push({type:"line",x1:t+r*Math.sin(l),y1:e+r*Math.cos(l)*a,x2:t+r*Math.sin(o),y2:e+r*Math.cos(o)*a,style:c,interactive:!1,datum:null})}}for(let e of t){if(null==e.x||null==e.y)continue;let t=l(W(e,"nodeSize")),a=i?i(W(e,"nodeStyle")):{},n={fill:a.fill||r.themeSemantic?.primary||"#6366f1",stroke:a.stroke||r.themeSemantic?.surface||"#fff",strokeWidth:a.strokeWidth??1,opacity:a.opacity??(0===(e.depth??0)?1:.85),cursor:a.cursor};o.push({type:"circle",cx:e.x,cy:e.y,r:t,style:n,accessibleDatum:e.data,datum:e,id:e.id,label:e.id,depth:e.depth})}let f=new Map;for(let e of t)f.set(e.id,e);for(let t of e){let e="object"==typeof t.source?t.source:f.get(t.source),r="object"==typeof t.target?t.target:f.get(t.target);if(!e||!r||null==e.x||null==r.x)continue;let a=n?n(W(t,"edgeStyle")):{},i={stroke:a.stroke||"rgba(128,128,128,0.35)",strokeWidth:a.strokeWidth??.5,opacity:a.opacity??1,cursor:a.cursor};u.push({type:"line",x1:e.x,y1:e.y,x2:r.x,y2:r.y,style:i,datum:t})}if(r.showLabels){let e=r.nodeLabel;for(let r of t){let t=l(W(r,"nodeSize"));if(t<=4)continue;let a="function"==typeof e?e(r):e?r.data?.[e]??r.id:r.id;s.push({x:r.x,y:r.y+t+12,text:String(a),anchor:"middle",fontSize:10,fill:"currentColor",anchorPoint:[r.x,r.y]})}}return{sceneNodes:o,sceneEdges:u,labels:s}},tick:(t,e,r,a,i)=>!1!==r.orbitAnimated&&(function(t,e){let r=it(e),a=e.orbitSpeed??.25,i=e.orbitRevolution??function(t){switch(t){case"decay":return t=>Math.pow(.6,t.depth??0);case"alternate":return t=>{let e=t.depth??0;return(e%2==0?1:-1)/(e+1)};default:return t=>1/((t.depth??0)+1)}}(e.orbitRevolutionStyle),n=((typeof performance<"u"?performance.now():Date.now())-r.startTime)/1e3,c=a*(Math.PI/6),l=new Map;for(let e of t)l.set(e.id,e);for(let e of t){let t=r.metaMap.get(e.id);if(!t||!t.parentId)continue;let a=l.get(t.parentId);if(!a)continue;let o={id:e.id,depth:t.depth,data:e.data,parentId:t.parentId},u=t.angle+n*c*i(o);e.x=a.x+t.ring*Math.sin(u),e.y=a.y+t.ring*Math.cos(u)*t.eccentricity,e.x0=e.x,e.x1=e.x,e.y0=e.y,e.y1=e.y}}(t,r),!0)};export{_ as a,Yt as b,qt as c,Gt as d,Vt as e,J as f,tt as g,et as h,rt as i,at as j,Qt as k};
|
|
1
|
+
function t(t,e){var r=t.get(e);if(!r)throw new Error("missing: "+e);return r}function e(t){return t.y0-t.y1>0?"up":"down"}function r(t,e){return e(t.source)==e(t.target)}function a(t){return t.target.x0-t.source.x1}function i(t,r){var i=c(t),n=a(r)/Math.tan(i);return"up"==e(t)?t.y1-n:t.y1+n}function n(t,r){var i=c(t),n=a(r)/Math.tan(i);return"up"==e(t)?t.y1+n:t.y1-n}function c(t){var e=Math.abs(t.y1-t.y0),r=Math.abs(t.target.x0-t.source.x1);return Math.atan(r/e)}function l(t){return u(t.source)}function o(t){return u(t.target)}function u(t){return(t.y0+t.y1)/2}function s(t){return t.virtual?0:t.value}function f(t,e){var a=0;t.sourceLinks.forEach(function(t){a=t.circular&&!r(t,e)?a+1:a});var i=0;return t.targetLinks.forEach(function(t){i=t.circular&&!r(t,e)?i+1:i}),a+i}function h(t){return t.target.depth}function d(t,e){return t.sourceLinks.length?t.depth:e-1}function y(t,e){return t.y0-e.y0}function g(t,e){return e.y0-t.y0}function p(t,e){return t.y1-e.y1}function m(t,e){return e.y1-t.y1}function x(t,e){return L(t.source,e.source)||t.index-e.index}function k(t,e){return L(t.target,e.target)||t.index-e.index}function L(t,e){return t.partOfCycle===e.partOfCycle?t.y0-e.y0:"top"===t.circularLinkType||"bottom"===e.circularLinkType?-1:1}function v(t,e){return b(t)==b(e)?"bottom"==t.circularLinkType?g(t,e):y(t,e):b(e)-b(t)}function b(t){return t.target.column-t.source.column}function D(t,e){return P(t)==P(e)}function P(t){return t.y0-t.y1>0?"up":"down"}function E(t,e,a,i,n){let c=t;c.links.forEach(function(t){t.circular&&(t._circularWidth=t.width,t._circularStub=!1)});var l=yt(c.links,function(t){return t.source.y0});c.links.forEach(function(t){t.circular&&(t.circularPathData={})});var o=c.links.filter(function(t){return t.circular}),u=new Map,s=new Map;o.forEach(function(t){u.set(t.source,(u.get(t.source)||0)+1),s.set(t.target,(s.get(t.target)||0)+1)});var f=new Set(o.filter(function(t){return r(t,e)&&1===u.get(t.source)&&1===s.get(t.target)}));return["top","bottom"].forEach(function(t){var e=o.filter(function(e){return e.circularLinkType===t});(function(t,e,r){if(0!==t.length){t.sort(v);var a=Array.from(new Set(t.flatMap(function(t){return[t.source.column,t.target.column]}))).sort(function(t,e){return t-e}),i=new Map(a.map(function(t,e){return[t,e]})),n=new zt(a.length);t.forEach(function(t){var a=i.get(t.source.column),c=i.get(t.target.column),l=Math.min(a,c),o=Math.max(a,c),u=e.has(t)?0:n.query(l,o);t.circularPathData.verticalBuffer=u+t._circularWidth/2,n.reserve(l,o,u+t._circularWidth+r)})}})(e.slice(),f,a),["source","target"].forEach(function(r){var n=new Map;e.forEach(function(t){var e=t[r].column;n.has(e)||n.set(e,[]),n.get(e).push(t)}),n.forEach(function(e){e.sort("source"===r?"bottom"===t?g:y:"bottom"===t?m:p);var n=0,c="source"===r?"right":"left";e.forEach(function(t,e){t.circularPathData[c+"SmallArcRadius"]=i+t._circularWidth/2+n,t.circularPathData[c+"LargeArcRadius"]=i+t._circularWidth/2+e*a+n,n+=t._circularWidth})})})}),c.links.forEach(function(t){t.circular&&(t.circularPathData.arcRadius=t._circularWidth+i,t.circularPathData.rightNodeBuffer=5,t.circularPathData.leftNodeBuffer=5,t.circularPathData.sourceWidth=t.source.x1-t.source.x0,t.circularPathData.sourceX=t.source.x0+t.circularPathData.sourceWidth,t.circularPathData.targetX=t.target.x0,t.circularPathData.sourceY=t.y0,t.circularPathData.targetY=t.y1,f.has(t)?(t.circularPathData.rightSmallArcRadius=i+t._circularWidth/2,t.circularPathData.rightLargeArcRadius=i+t._circularWidth/2,t.circularPathData.leftSmallArcRadius=i+t._circularWidth/2,t.circularPathData.leftLargeArcRadius=i+t._circularWidth/2,"bottom"==t.circularLinkType?(t.circularPathData.verticalFullExtent=t.source.y1+n+t.circularPathData.verticalBuffer,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.rightLargeArcRadius,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.leftLargeArcRadius):(t.circularPathData.verticalFullExtent=t.source.y0-n-t.circularPathData.verticalBuffer,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.rightLargeArcRadius,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.leftLargeArcRadius)):"bottom"==t.circularLinkType?(t.circularPathData.verticalFullExtent=Math.max(c.y1,t.source.y1,t.target.y1)+n+t.circularPathData.verticalBuffer,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.rightLargeArcRadius,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.leftLargeArcRadius):(t.circularPathData.verticalFullExtent=l-n-t.circularPathData.verticalBuffer,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.rightLargeArcRadius,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.leftLargeArcRadius),t.circularPathData.rightInnerExtent=t.circularPathData.sourceX+t.circularPathData.rightNodeBuffer,t.circularPathData.leftInnerExtent=t.circularPathData.targetX-t.circularPathData.leftNodeBuffer,t.circularPathData.rightFullExtent=t.circularPathData.sourceX+t.circularPathData.rightLargeArcRadius+t.circularPathData.rightNodeBuffer,t.circularPathData.leftFullExtent=t.circularPathData.targetX-t.circularPathData.leftLargeArcRadius-t.circularPathData.leftNodeBuffer),t.circular?t.path=function(t){return"top"==t.circularLinkType?"M"+t.circularPathData.sourceX+" "+t.circularPathData.sourceY+" L"+t.circularPathData.rightInnerExtent+" "+t.circularPathData.sourceY+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightSmallArcRadius+" 0 0 0 "+t.circularPathData.rightFullExtent+" "+(t.circularPathData.sourceY-t.circularPathData.rightSmallArcRadius)+" L"+t.circularPathData.rightFullExtent+" "+t.circularPathData.verticalRightInnerExtent+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightLargeArcRadius+" 0 0 0 "+t.circularPathData.rightInnerExtent+" "+t.circularPathData.verticalFullExtent+" L"+t.circularPathData.leftInnerExtent+" "+t.circularPathData.verticalFullExtent+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftLargeArcRadius+" 0 0 0 "+t.circularPathData.leftFullExtent+" "+t.circularPathData.verticalLeftInnerExtent+" L"+t.circularPathData.leftFullExtent+" "+(t.circularPathData.targetY-t.circularPathData.leftSmallArcRadius)+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftSmallArcRadius+" 0 0 0 "+t.circularPathData.leftInnerExtent+" "+t.circularPathData.targetY+" L"+t.circularPathData.targetX+" "+t.circularPathData.targetY:"M"+t.circularPathData.sourceX+" "+t.circularPathData.sourceY+" L"+t.circularPathData.rightInnerExtent+" "+t.circularPathData.sourceY+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightSmallArcRadius+" 0 0 1 "+t.circularPathData.rightFullExtent+" "+(t.circularPathData.sourceY+t.circularPathData.rightSmallArcRadius)+" L"+t.circularPathData.rightFullExtent+" "+t.circularPathData.verticalRightInnerExtent+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightLargeArcRadius+" 0 0 1 "+t.circularPathData.rightInnerExtent+" "+t.circularPathData.verticalFullExtent+" L"+t.circularPathData.leftInnerExtent+" "+t.circularPathData.verticalFullExtent+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftLargeArcRadius+" 0 0 1 "+t.circularPathData.leftFullExtent+" "+t.circularPathData.verticalLeftInnerExtent+" L"+t.circularPathData.leftFullExtent+" "+(t.circularPathData.targetY+t.circularPathData.leftSmallArcRadius)+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftSmallArcRadius+" 0 0 1 "+t.circularPathData.leftInnerExtent+" "+t.circularPathData.targetY+" L"+t.circularPathData.targetX+" "+t.circularPathData.targetY}(t):t.path=function(t){var e=t.source.x1,r=t.y0,a=t.target.x0,i=t.y1,n=(e+a)/2;return"M"+e+","+r+"C"+n+","+r+" "+n+","+i+" "+a+","+i}(t)}),c}function S(t){return function(){return t}}function M(t){return t.index}function w(t){return t.nodes}function A(t){return t.links}function $(t,e,r){var a=mt(t.nodes,function(t){return t.column}).sort(function(t,e){return t[0]-e[0]}).map(function(t){return t[1]});a.forEach(function(i,n){var c=i.length;if(e)i.sort(e);else if(n>0){var l=new Map;i.forEach(function(t,e){var r,a,i,n=(a=0,i=0,(r=t).targetLinks.forEach(function(t){if(!t.circular){var e=t.value||1;i+=u(t.source)*e,a+=e}}),r.sourceLinks.forEach(function(t){if(!t.circular){var e=t.value||1;i+=u(t.target)*e,a+=e}}),a>0?i/a:NaN);l.set(t,{bc:n,idx:e})}),i.sort(function(t,e){var r=l.get(t),a=l.get(e),i=r.bc,n=a.bc;if(t.circularLinkType!==e.circularLinkType){if("top"==t.circularLinkType&&"bottom"==e.circularLinkType)return-1;if("bottom"==t.circularLinkType&&"top"==e.circularLinkType)return 1;if("top"==t.circularLinkType)return-1;if("top"==e.circularLinkType||"bottom"==t.circularLinkType)return 1;if("bottom"==e.circularLinkType)return-1}return isNaN(i)||isNaN(n)?isNaN(i)?isNaN(n)?r.idx-a.idx:1:-1:i-n})}else i.sort(function(t,e){return t.circularLinkType==e.circularLinkType?f(e,r)-f(t,r):"top"==t.circularLinkType&&"bottom"==e.circularLinkType||"top"==t.circularLinkType&&0==e.partOfCycle||0==t.partOfCycle&&"bottom"==e.circularLinkType?-1:0});i.forEach(function(e,i){e.depth==a.length-1&&1==c||0==e.depth&&1==c?(e.y0=t.y1/2-e.value*t.ky,e.y1=e.y0+e.value*t.ky):e.partOfCycle?0==f(e,r)?(e.y0=t.y1/2+i,e.y1=e.y0+e.value*t.ky):"top"==e.circularLinkType?(e.y0=t.y0+i,e.y1=e.y0+e.value*t.ky):(e.y0=t.y1-e.value*t.ky-i,e.y1=e.y0+e.value*t.ky):0==t.y0||0==t.y1?(e.y0=(t.y1-t.y0)/c*i,e.y1=e.y0+e.value*t.ky):(e.y0=(t.y1-t.y0)/2-c/2+i,e.y1=e.y0+e.value*t.ky)})})}function T(t,e,r,a,i,n){function c(e,r){var a=h.length;h.forEach(function(i){var n=i.length,c=i[0].depth;i.forEach(function(i){var s;if(i.sourceLinks.length||i.targetLinks.length)if(i.partOfCycle&&f(i,r)>0){var h=kt(i.sourceLinks,o),d=kt(i.targetLinks,l),y=h&&d?(h+d)/2:h||d;if(y){var g=(y-u(i))*e*.3;i.y0+=g,i.y1+=g}}else if(0==c&&1==n)s=i.y1-i.y0,i.y0=t.y1/2-s/2,i.y1=t.y1/2+s/2;else if(c==a-1&&1==n)s=i.y1-i.y0,i.y0=t.y1/2-s/2,i.y1=t.y1/2+s/2;else if(1==i.targetLinks.length&&1==i.targetLinks[0].source.sourceLinks.length)s=i.y1-i.y0,i.y0=i.targetLinks[0].source.y0,i.y1=i.y0+s;else{var p=kt(i.sourceLinks,o),m=kt(i.targetLinks,l),x=((p&&m?(p+m)/2:p||m)-u(i))*e;i.y0+=x,i.y1+=x}})})}function s(){h.forEach(function(r){var n,c,l,o=t.y0,u=r.length;for(e?r.sort(e):r.sort(L),l=0;l<u;++l)(c=o-(n=r[l]).y0)>0&&(n.y0+=c,n.y1+=c),o=n.y1+a;if((c=o-a-t.y1)>0)for(o=n.y0-=c,n.y1-=c,l=u-2;l>=0;--l)(c=(n=r[l]).y1+i-o)>0&&(n.y0-=c,n.y1-=c),o=n.y0})}var h=mt(t.nodes,function(t){return t.column}).sort(function(t,e){return t[0]-e[0]}).map(function(t){return t[1]});s();for(var d=1,y=n;y>0;--y)c(d*=.99,r),s()}function R(t){t.nodes.forEach(function(t){t.sourceLinks.sort(k),t.targetLinks.sort(x)}),t.nodes.forEach(function(t){var e=t.y0,r=e,a=t.y1,i=a;t.sourceLinks.forEach(function(t){t.circular?(t.y0=a-t.width/2,a-=t.width):(t.y0=e+t.width/2,e+=t.width)}),t.targetLinks.forEach(function(t){t.circular?(t.y1=i-t.width/2,i-=t.width):(t.y1=r+t.width/2,r+=t.width)})})}function _(t){let{sx:e,sTop:r,sBot:a,tx:i,tTop:n,tBot:c,cp1X:l,cp2X:o}=t,u=(r+a)/2,s=(n+c)/2;return{pathD:[`M${e},${r}`,`C${l},${r} ${o},${n} ${i},${n}`,`L${i},${c}`,`C${o},${c} ${l},${a} ${e},${a}`,"Z"].join(" "),bezier:{circular:!1,points:[{x:e,y:u},{x:l,y:u},{x:o,y:s},{x:i,y:s}],halfWidth:(a-r)/2}}}function I(t){let e=t.circularPathData;if(!e)return null;let r=t.sankeyWidth/2,a="bottom"===t.circularLinkType?1:-1,i=1===a?1:0,n="down"===t.direction,c=(t,e)=>n?`${e},${t}`:`${t},${e}`,l=(t,e,r,a,i)=>`A${n?e:t},${n?t:e} 0 0 ${n?1-r:r} ${c(a,i)}`,{sourceX:o,sourceY:u,targetX:s,targetY:f,rightInnerExtent:h,leftInnerExtent:d,rightFullExtent:y,leftFullExtent:g,verticalFullExtent:p,verticalRightInnerExtent:m,verticalLeftInnerExtent:x,rightLargeArcRadius:k,rightSmallArcRadius:L,leftLargeArcRadius:v,leftSmallArcRadius:b}=e;return`M${c(o,u-a*r)}L${c(h,u-a*r)}`+l(k+r,L+r,i,y+r,u+a*L)+`L${c(y+r,m)}`+l(k+r,k+r,i,h,p+a*r)+`L${c(d,p+a*r)}`+l(v+r,v+r,i,g-r,x)+`L${c(g-r,f+a*b)}`+l(v+r,b+r,i,d,f-a*r)+`L${c(s,f-a*r)}L${c(s,f+a*r)}L${c(d,f+a*r)}`+l(v-r,b-r,1-i,g+r,f+a*b)+`L${c(g+r,x)}`+l(v-r,v-r,1-i,d,p-a*r)+`L${c(h,p-a*r)}`+l(k-r,k-r,1-i,y-r,m)+`L${c(y-r,u+a*L)}`+l(k-r,L-r,1-i,h,u+a*r)+`L${c(o,u+a*r)}Z`}function W(t,e){if("production"===process.env.NODE_ENV||!t||!t.data||"object"!=typeof t.data)return t;let r=Bt.get(t);if(r){let t=r.get(e);if(t)return t}else r=new Map,Bt.set(t,r);let a=new Proxy(t,{get(t,r,a){if("string"==typeof r&&!(r in t)&&t.data&&r in t.data){let t=`${e}:${r}`;jt.has(t)||(jt.add(t),console.warn(`[Semiotic] "${e}" callback accessed "${r}" on the wrapper object, but it only exists on ".data". Use d.data.${r} (or d.data?.${r}) instead. Frame callbacks receive RealtimeNode/RealtimeEdge wrappers, not your raw data.`))}return Reflect.get(t,r,a)}});return r.set(e,a),a}function F(t,e,r){let a=[];for(let i of e){let e=ut(i.source),n=ut(i.target),c=null;if(e===t?c=n:n===t&&(c=e),c){let t=r.get(c);t&&(0!==t.x||0!==t.y)&&a.push({x:t.x,y:t.y})}}return a}function N(t){let e=0;for(let r=0;r<t.length;r++)e=(e<<5)-e+t.charCodeAt(r)|0;return Math.abs(e)}function C(t,e,r){let a=t.match(/[a-zA-Z]|[-+]?\d*\.?\d+(?:[eE][-+]?\d+)?/g);if(!a)return t;let i=[],n=0;for(;n<a.length;){let t=a[n];if("M"===t||"L"===t||"C"===t||"Q"===t)for(i.push(t),n++;n<a.length&&!isNaN(Number(a[n]));)i.push(String(Number(a[n])+e)),n++,n<a.length&&!isNaN(Number(a[n]))&&(i.push(String(Number(a[n])+r)),n++);else if("A"===t)for(i.push(t),n++;n<a.length&&!isNaN(Number(a[n]));)i.push(a[n++]),n<a.length&&i.push(a[n++]),n<a.length&&i.push(a[n++]),n<a.length&&i.push(a[n++]),n<a.length&&i.push(a[n++]),n<a.length&&(i.push(String(Number(a[n])+e)),n++),n<a.length&&(i.push(String(Number(a[n])+r)),n++);else"Z"===t||"z"===t?(i.push(t),n++):(i.push(a[n]),n++)}return i.join(" ")}function z(t){let[e,r,a]=function(t){if(t.startsWith("#")){let e=t.slice(1);if(3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),6===e.length)return[0,2,4].map(t=>parseInt(e.slice(t,t+2),16))}let e=t.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/);return e?[+e[1],+e[2],+e[3]]:[128,128,128]}(t);return.299*e+.587*r+.114*a>150?"#222":"#fff"}function O(t){if(t)return"function"==typeof t?t:e=>e[t]}function j(t){if(!t)return null;if("function"==typeof t){let e=t;return t=>e(t.data??t)}return e=>e.data?.[t]||e[t]||e.id}function B(t){let e=new Map(t.map(t=>[t,0]));return t.map(t=>{let r=e.get(t),a=t;for(;r>0&&e.has(a);)a=`${t}__${r++}`;return e.set(t,r||1),e.set(a,1),a})}function X(t,e,r){if(e.colorByDepth&&void 0!==t.depth){let r=function(t){return Array.isArray(t.colorScheme)?t.colorScheme:t.themeCategorical&&t.themeCategorical.length>0?t.themeCategorical:Kt}(e);return r[t.depth%r.length]}return r||function(t){return Array.isArray(t.colorScheme)&&t.colorScheme.length>0?t.colorScheme[0]:t.themeSemantic?.primary?t.themeSemantic.primary:t.themeCategorical&&t.themeCategorical.length>0?t.themeCategorical[0]:"#4d430c"}(e)}function Y(t,e,r){return{fill:X(t,e,r.fill),stroke:r.stroke||e.themeSemantic?.surface||"#fff",strokeWidth:r.strokeWidth??1,opacity:r.opacity,cursor:r.cursor}}function q(t){return!t.__hierarchyNode?.children?.length}function Z(t,e,r,a,i){let n=(t+r)/2,c=(e+a)/2;return"horizontal"===i?`M ${t},${e} C ${n},${e} ${n},${a} ${r},${a}`:"radial"===i?`M ${t},${e} Q ${n},${e} ${n},${c} T ${r},${a}`:`M ${t},${e} C ${t},${c} ${r},${c} ${r},${a}`}function G(t,e,r){let a=r.treeOrientation||"vertical";if("radial"===a){let r=e.x,a=e.y;t.x=a*Math.cos(r-Math.PI/2),t.y=a*Math.sin(r-Math.PI/2)}else"horizontal"===a?(t.x=e.y,t.y=e.x):(t.x=e.x,t.y=e.y);Q(t,5)}function K(t,e){t.x0=e.x0,t.y0=e.y0,t.x1=t.value?e.x1:e.x0,t.y1=t.value?e.y1:e.y0,t.x=(t.x0+t.x1)/2,t.y=(t.y0+t.y1)/2,t.width=t.x1-t.x0,t.height=t.y1-t.y0}function V(t,e){let r=e.r??0;t.x=e.x,t.y=e.y,Q(t,r),t.__radius=r}function Q(t,e){t.x0=t.x-e,t.x1=t.x+e,t.y0=t.y-e,t.y1=t.y+e,t.width=2*e,t.height=2*e}function H(t){return t.data&&"object"==typeof t.data?t.data:t}function J(t,e,r){if(e)return r?.selectedStyle&&Object.assign(t,r.selectedStyle),t;let a=r?.unselectedOpacity??ft;return t.opacity=a,t.fillOpacity=a,t.strokeOpacity=a,r?.unselectedStyle&&Object.assign(t,r.unselectedStyle),t}function U(t,e,r){if(t)return e?a=>{let i={...t(a)};return e.isActive?J(i,e.predicate(H(a)),r):i}:t}function tt(t,e,r){if(t)return e?a=>{let i={...t(a)};if(!e.isActive)return i;let n=H(a),c="object"==typeof a.source?H(a.source):null,l="object"==typeof a.target?H(a.target):null;return J(i,c||l?!!c&&e.predicate(c)||!!l&&e.predicate(l):e.predicate(n),r)}:t}function et(t,e){if(!t)return[];let r=[],a=t=>{r.push(t);let i="function"==typeof e?e(t):t[e];i&&Array.isArray(i)&&i.forEach(a)};return a(t),r}function rt(t,e,r,a){if(t&&t.length>0)return t;let i=new Set;return e.forEach(t=>{let e="function"==typeof r?r(t):t[r],n="function"==typeof a?a(t):t[a];i.add(e),i.add(n)}),Array.from(i).map(t=>({id:t}))}function at({edgeColorBy:t,colorBy:e,colorScale:r,nodeStyleFn:a,edgeOpacity:i,baseStyle:n={}}){return c=>{let l={fillOpacity:i,...n};if("function"==typeof t)l.fill=t(c);else if("source"===t){let t="object"==typeof c.source?c.source:null;e&&t?l.fill=dt(t.data||t,e,r):t&&(l.fill=a(t,t.index).fill)}else if("target"===t){let t="object"==typeof c.target?c.target:null;e&&t?l.fill=dt(t.data||t,e,r):t&&(l.fill=a(t,t.index).fill)}else"gradient"===t&&(l.fill="#999",l.fillOpacity=.7*i);return l}}function it(t){return nt(t,"orbit",()=>({metaMap:new Map,startTime:typeof performance<"u"?performance.now():Date.now()}))}import{a as nt}from"./c-DEWMXCOF.min.js";import{a as ct,b as lt}from"./c-LHVHGQRW.min.js";import{e as ot,f as ut}from"./c-YLZIV3VS.min.js";import{a as st,e as ft}from"./c-C7TT4J7K.min.js";import{a as ht,r as dt}from"./c-WPL6PGP3.min.js";import{min as yt,group as gt,sum as pt,groups as mt,max as xt,mean as kt}from"d3-array";import{interpolateNumber as Lt}from"d3-interpolate";import{forceLink as vt,forceSimulation as bt,forceManyBody as Dt,forceCollide as Pt,forceCenter as Et,forceX as St,forceY as Mt}from"d3-force";import{ribbon as wt,chord as At}from"d3-chord";import{arc as $t,pie as Tt}from"d3-shape";import{hierarchy as Rt,cluster as _t,tree as It,treemap as Wt,treemapBinary as Ft,partition as Nt,pack as Ct}from"d3-hierarchy";var zt=class{constructor(t){this.size=t,this.maximum=new Float64Array(4*t),this.floor=new Float64Array(4*t)}query(t,e){let r=(a,i,n)=>{if(t<=i&&n<=e)return this.maximum[a];let c=i+n>>>1;return Math.max(this.floor[a],t<=c?r(2*a,i,c):0,e>c?r(2*a+1,c+1,n):0)};return r(1,0,this.size-1)}reserve(t,e,r){let a=(i,n,c)=>{if(this.maximum[i]=Math.max(this.maximum[i],r),t<=n&&c<=e)return void(this.floor[i]=Math.max(this.floor[i],r));let l=n+c>>>1;t<=l&&a(2*i,n,l),e>l&&a(2*i+1,l+1,c)};a(1,0,this.size-1)}},Ot=t=>{let{source:e,target:r}=t;if("string"==typeof e||"string"==typeof r)return null;if("down"===t.direction){let a=t.y0-t.sankeyWidth/2,i=t.y1-t.sankeyWidth/2,n=t.y1+t.sankeyWidth/2,c=t.y0+t.sankeyWidth/2,l=e.x1,o=r.x0,u=Lt(l,o),s=u(.5),f=u(.5);return`M${a},${l}C${a},${s} ${i},${f} ${i},${o}L${n},${o}C${n},${f} ${c},${s} ${c},${l}Z`}let a=t.sankeyWidth/2,i=Lt(e.x1,r.x0),{pathD:n}=_({sx:e.x1,sTop:t.y0-a,sBot:t.y0+a,tx:r.x0,tTop:t.y1-a,tBot:t.y1+a,cp1X:i(.5),cp2X:i(.5)});return n},jt=/*#__PURE__*/new Set,Bt=/*#__PURE__*/new WeakMap,Xt={left:function(t){return t.depth},right:function(t,e){return e-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?Math.min.apply(Math,t.sourceLinks.map(h))-1:0},justify:d},Yt={supportsStreaming:!0,hierarchical:!1,computeLayout(e,a,c,l){let o="vertical"===c.orientation?"down":"right",u=c.nodeAlign||"justify",f=c.nodeWidth??15,h=c.nodePaddingRatio??.05,y=c.iterations??300;for(let t of a)t.sankeyWidth=0,t.circular=!1,delete t.circularPathData,delete t._circularWidth,delete t._circularStub;for(let t of e)t.value=0,t.width=t.height=0,t.x0=t.x1=t.y0=t.y1=0,t.sourceLinks=[],t.targetLinks=[];let g=new Set(e.map(t=>t.id)),p=new Set,m=a.filter(t=>{let e=ut(t.source),r=ut(t.target);return!(!Number.isFinite(t.value)||t.value<=0||!g.has(e)||!g.has(r)||(p.add(e),p.add(r),0))}).map(t=>({...t,source:ut(t.source),target:ut(t.target)}));if(0===m.length)return;let x,k=e.filter(t=>p.has(t.id)).map(t=>({...t}));x="down"===o?[[0,0],[l[1],l[0]]]:[[0,0],[l[0],l[1]]];let L=function(){function e(){var e={nodes:k.apply(null,arguments),links:L.apply(null,arguments)};return function(e){e.x0=a,e.y0=c,e.x1=l,e.y1=o,e.py=0,function(e,r){e.nodes.forEach(function(t,e){t.index=e,t.sourceLinks=[],t.targetLinks=[]});var a=function(t,e){var r=new Map;return gt(t,e).forEach(function(t,e){r.set(e,t[0])}),r}(e.nodes,r);e.links.forEach(function(e,r){e.index=r;var i=e.source,n=e.target;"object"!=typeof i&&(i=e.source=t(a,i)),"object"!=typeof n&&(n=e.target=t(a,n)),i.sourceLinks.push(e),n.targetLinks.push(e)})}(e,y),function(t,e,r){var a=0,i=null==e?function(t,e,r){let a=t.length,i=Array.from({length:a},()=>[]),n=Array.from({length:a},()=>[]),c=new Int32Array(a),l=new Int32Array(a),o=new Float64Array(a),u=new Float64Array(e.length),s=new Int32Array(a),f=t.map(t=>{let e=r(t);return`${typeof e}:${String(e)}`}),h=0;for(let t of e)t.source.index!==t.target.index&&Number.isFinite(t.value)&&(h=Math.max(h,t.value));let d=(t,e)=>f[t]<f[e]?-1:f[t]>f[e]?1:0;e.map((t,e)=>e).sort((t,r)=>d(e[t].source.index,e[r].source.index)||d(e[t].target.index,e[r].target.index)||e[t].value-e[r].value).forEach(t=>{let r=e[t],a=r.source.index,s=r.target.index;if(a===s)return;let f=Number.isFinite(r.value)&&h>0?Math.max(0,r.value)/h:0;u[t]=f,n[a].push(t),i[s].push(t),l[a]++,c[s]++,o[a]+=f,o[s]-=f});let y=t.map(t=>t.index),g=Int32Array.from(y),p=t=>0===l[t]?2:0===c[t]?1:0,m=(t,e)=>{let r=p(t),a=p(e);return r!==a?r>a:0===r&&o[t]!==o[e]?o[t]>o[e]:f[t]<f[e]||f[t]===f[e]&&t<e},x=(t,e)=>{let r=y[t];y[t]=y[e],y[e]=r,g[y[t]]=t,g[r]=e},k=(t,e=!1)=>{let r=g[t];for(;!e&&r>0;){let e=r-1>>>1;if(!m(t,y[e]))break;x(r,e),r=e}for(;2*r+1<y.length;){let e=2*r+1;if(e+1<y.length&&m(y[e+1],y[e])&&e++,!m(y[e],t))break;x(r,e),r=e}};for(let t=(y.length>>>1)-1;t>=0;t--)k(y[t],!0);let L=0,v=a-1;for(;y.length;){let t=y[0];s[t]=0===l[t]?v--:L++;let r=y.pop();g[t]=-1,y.length&&(y[0]=r,g[r]=0,k(r));for(let r of n[t]){let t=e[r].target.index;g[t]<0||(c[t]--,o[t]+=u[r],k(t))}for(let r of i[t]){let t=e[r].source.index;g[t]<0||(l[t]--,o[t]-=u[r],k(t))}}return s}(t.nodes,t.links,r):null;t.nodes.forEach(function(t){delete t.circularLinkType}),t.links.forEach(function(t){delete t.circularLinkID,delete t.circularLinkType,delete t.circularPathData,delete t._circularWidth,delete t._circularStub,t.circular=i?i[t.source.index]>=i[t.target.index]:!(e(t.source)<e(t.target)),t.circular&&(t.circularLinkID=a++)})}(e,p,y),function(t,e){var a=0,i=0;t.links.forEach(function(t){t.circular&&(t.source.circularLinkType||t.target.circularLinkType?t.circularLinkType=t.source.circularLinkType?t.source.circularLinkType:t.target.circularLinkType:t.circularLinkType=a<i?"top":"bottom","top"==t.circularLinkType?a++:i++,t.source.circularLinkType=t.circularLinkType,t.target.circularLinkType=t.circularLinkType)}),t.links.forEach(function(t){t.circular&&(t.source.circularLinkType==t.target.circularLinkType&&(t.circularLinkType=t.source.circularLinkType),r(t,e)&&(t.circularLinkType=t.source.circularLinkType))})}(e,y),function(t){t.nodes.forEach(function(t){t.partOfCycle=!1,t.value=Math.max(pt(t.sourceLinks,s),pt(t.targetLinks,s)),t.sourceLinks.forEach(function(e){e.circular&&(t.partOfCycle=!0,t.circularLinkType=e.circularLinkType)}),t.targetLinks.forEach(function(e){e.circular&&(t.partOfCycle=!0,t.circularLinkType=e.circularLinkType)})})}(e),function(t,e,r){if(null!=e&&t.nodes.length){t.nodes.sort(function(t,r){return e(t)<e(r)?-1:1});var a=0,i=e(t.nodes[0]);t.nodes.forEach(function(t){a=e(t)==i?a:a+1,i=e(t)==i?i:e(t),t.column=a})}var n=new Int32Array(t.nodes.length),c=[],l=1;t.nodes.forEach(function(t){t.depth=t.height=0,t.targetLinks.forEach(function(e){e.circular||n[t.index]++}),0===n[t.index]&&c.push(t)});for(var o=0;o<c.length;o++){var u=c[o];l=Math.max(l,u.depth+1),u.sourceLinks.forEach(function(t){t.circular||(t.target.depth=Math.max(t.target.depth,u.depth+1),0===--n[t.target.index]&&c.push(t.target))})}for(o=c.length-1;o>=0;o--)(u=c[o]).sourceLinks.forEach(function(t){t.circular||(u.height=Math.max(u.height,t.target.height+1))});t.nodes.forEach(function(t){t.column=null==e?r(t,l):t.column})}(e,p,g);var d=f;if(null!==h){var k=mt(e.nodes,function(t){return t.column}).sort(function(t,e){return t[0]-e[0]}).map(function(t){return t[1]}),L=xt(k,function(t){return t.length});L>1&&(d=Math.max(1,(o-c)*h/(L-1)))}(function(t,e,r){var a=mt(t.nodes,function(t){return t.column}).sort(function(t,e){return t[0]-e[0]}).map(function(t){return t[1]});t.py=e;var i=yt(a,function(e){return(t.y1-t.y0-(e.length-1)*t.py)/pt(e,function(t){return t.value})});t.ky=i,t.links.forEach(function(e){e.width=e.value*t.ky});var n=xt(t.nodes,function(t){return t.column});n>0?t.nodes.forEach(function(e){e.x0=t.x0+e.column*((t.x1-t.x0-r)/n),e.x1=e.x0+r}):t.nodes.forEach(function(e){e.x0=t.x0,e.x1=e.x0+r})})(e,d,u),$(e,p,y),T(e,p,y,d,d,m),R(e),$(e,p,y),T(e,p,y,d,d,m),R(e),function(t){let e=t;e.nodes.forEach(function(t){t.y+(t.y1-t.y0)>e.y1&&(t.y=t.y-(t.y+(t.y1-t.y0)-e.y1));var r=t.sourceLinks.slice().sort(function(t,e){return t.index-e.index});r.length>1&&r.sort(function(t,e){if(!t.circular&&!e.circular){if(t.target.column==e.target.column)return t.y1-e.y1;if(!D(t,e))return t.y1-e.y1;if(t.target.column>e.target.column){var r=i(e,t);return t.y1-r}if(e.target.column>t.target.column)return i(t,e)-e.y1}return t.circular&&!e.circular?"top"==t.circularLinkType?-1:1:e.circular&&!t.circular?"top"==e.circularLinkType?1:-1:t.circular&&e.circular?t.circularLinkType===e.circularLinkType&&"top"==t.circularLinkType?t.target.column===e.target.column?t.target.y1-e.target.y1:e.target.column-t.target.column:t.circularLinkType===e.circularLinkType&&"bottom"==t.circularLinkType?t.target.column===e.target.column?e.target.y1-t.target.y1:t.target.column-e.target.column:"top"==t.circularLinkType?-1:1:void 0});var a=t.y0;r.forEach(function(t){t.y0=a+t.width/2,a+=t.width});for(var n=0,c=r.length-1;c>=0;c--){var l=r[c];"bottom"==l.circularLinkType&&(l.y0=t.y1-n-l.width/2),n+=l.width}})}(e),e.nodes.forEach(function(t){var e=t.targetLinks.slice().sort(function(t,e){return t.index-e.index});e.length>1&&e.sort(function(t,e){if(!t.circular&&!e.circular){if(t.source.column==e.source.column)return t.y0-e.y0;if(!D(t,e))return t.y0-e.y0;if(e.source.column<t.source.column){var r=n(e,t);return t.y0-r}if(t.source.column<e.source.column)return n(t,e)-e.y0}return t.circular&&!e.circular?"top"==t.circularLinkType?-1:1:e.circular&&!t.circular?"top"==e.circularLinkType?1:-1:t.circular&&e.circular?t.circularLinkType===e.circularLinkType&&"top"==t.circularLinkType?t.source.column===e.source.column?t.source.y1-e.source.y1:t.source.column-e.source.column:t.circularLinkType===e.circularLinkType&&"bottom"==t.circularLinkType?t.source.column===e.source.column?t.source.y1-e.source.y1:e.source.column-t.source.column:"top"==t.circularLinkType?-1:1:void 0});var r=t.y0;e.forEach(function(t){t.y1=r+t.width/2,r+=t.width});for(var a=0,i=e.length-1;i>=0;i--){var c=e[i];"bottom"==c.circularLinkType&&(c.y1=t.y1-a-c.width/2),a+=c.width}}),function(t){var e=t.nodes,r=t.links,a=!1,i=!1;if(r.forEach(function(t){"top"==t.circularLinkType?a=!0:"bottom"==t.circularLinkType&&(i=!0)}),0==a||0==i){let a=function(e){return(e-n)/(c-n)*(t.y1-t.y0)+t.y0};var n=yt(e,function(t){return t.y0}),c=xt(e,function(t){return t.y1}),l=c-n,o=(t.y1-t.y0)/l;o<1?(e.forEach(function(t){t.y0=a(t.y0),t.y1=a(t.y1)}),r.forEach(function(t){t.y0=a(t.y0),t.y1=a(t.y1),t.width=t.width*o})):e.forEach(function(t){var e=t.y1-t.y0,r=a(t.y0)-t.y0;t.y0=a(t.y0),t.y1=t.y0+e,t.sourceLinks.forEach(function(t){t.y0=t.y0+r}),t.targetLinks.forEach(function(t){t.y1=t.y1+r})})}}(e),E(e,y,x,10,8)}(e),e}var a=0,c=0,l=1,o=1,u=24,f=8,h=null,y=M,g=d,p=void 0,m=32,x=2,k=w,L=A;return e.update=function(t){return R(t),E(t,y,x,10,8),t},e.nodeWidth=function(t){return arguments.length?(u=+t,e):u},e.nodePadding=function(t){return arguments.length?(f=+t,e):f},e.nodePaddingRatio=function(t){return arguments.length?(h=+t,e):h},e.nodes=function(t){return arguments.length?(k="function"==typeof t?t:S(t),e):k},e.links=function(t){return arguments.length?(L="function"==typeof t?t:S(t),e):L},e.nodeId=function(t){return arguments.length?(y="function"==typeof t?t:S(t),e):y},e.nodeAlign=function(t){return arguments.length?(g="function"==typeof t?t:S(t),e):g},e.nodeSort=function(t){return arguments.length?(p=t,e):p},e.iterations=function(t){return arguments.length?(m=+t,e):m},e.circularLinkGap=function(t){return arguments.length?(x=+t,e):x},e.extent=function(t){return arguments.length?(a=+t[0][0],c=+t[0][1],l=+t[1][0],o=+t[1][1],e):[[a,c],[l,o]]},e.size=function(t){return arguments.length?(a=c=0,l=+t[0],o=+t[1],e):[l-a,o-c]},e}().extent(x).links(m).nodes(k).nodeAlign(Xt[u]||d).nodeId(t=>t.id).nodeWidth(f).iterations(y);L.nodePaddingRatio&&L.nodePaddingRatio(h),L();{let t=1/0,e=-1/0,r=1/0,a=-1/0;for(let i of k)i.x0<t&&(t=i.x0),i.x1>e&&(e=i.x1),i.y0<r&&(r=i.y0),i.y1>a&&(a=i.y1);for(let i of m){if(!i.circular||!i.circularPathData)continue;let n=i.circularPathData,c=(i._circularWidth??i.width??0)/2;n.leftFullExtent-c<t&&(t=n.leftFullExtent-c),n.rightFullExtent+c>e&&(e=n.rightFullExtent+c),n.verticalFullExtent-c<r&&(r=n.verticalFullExtent-c),n.verticalFullExtent+c>a&&(a=n.verticalFullExtent+c)}let i=e-t,n=a-r,c=x[1][0],l=x[1][1];if(i>0&&n>0&&(t<0||r<0||e>c||a>l)){let e=c/i,a=l/n,o=Math.min(e,a),u=-t*o+(c-i*o)/2,s=-r*o+(l-n*o)/2;for(let t of k)t.x0=t.x0*o+u,t.x1=t.x1*o+u,t.y0=t.y0*o+s,t.y1=t.y1*o+s;for(let t of m)if(t.y0=t.y0*o+s,t.y1=t.y1*o+s,t.width=(t.width??0)*o,t._circularWidth&&(t._circularWidth*=o),t.circular&&t.circularPathData){let e=t.circularPathData;e.sourceX=e.sourceX*o+u,e.targetX=e.targetX*o+u,e.sourceY=e.sourceY*o+s,e.targetY=e.targetY*o+s,e.rightFullExtent=e.rightFullExtent*o+u,e.leftFullExtent=e.leftFullExtent*o+u,e.verticalFullExtent=e.verticalFullExtent*o+s,e.rightInnerExtent=e.rightInnerExtent*o+u,e.leftInnerExtent=e.leftInnerExtent*o+u,e.verticalRightInnerExtent=e.verticalRightInnerExtent*o+s,e.verticalLeftInnerExtent=e.verticalLeftInnerExtent*o+s,e.rightSmallArcRadius*=o,e.rightLargeArcRadius*=o,e.leftSmallArcRadius*=o,e.leftLargeArcRadius*=o,e.sourceWidth*=o,e.rightNodeBuffer*=o,e.leftNodeBuffer*=o,e.arcRadius*=o}}}let v=new Map;for(let t of e)v.set(t.id,t);for(let t of k){let e=v.get(t.id);e&&(e.x0=t.x0,e.x1=t.x1,e.y0=t.y0,e.y1=t.y1,e.value=t.value,e.depth=t.depth,e.sourceLinks=t.sourceLinks,e.targetLinks=t.targetLinks,e.width=t.x1-t.x0,e.height=t.y1-t.y0,e.x=t.x0+(t.x1-t.x0)/2,e.y=t.y0+(t.y1-t.y0)/2)}let b=new Map;for(let t of a)if(t._edgeKey)b.set(t._edgeKey,t);else{let e=ut(t.source),r=ut(t.target);b.set(`${e}\0${r}`,t)}for(let t of m){let e=ut(t.source),r=ut(t.target),a=t._edgeKey?b.get(t._edgeKey):b.get(`${e}\0${r}`);if(a){a.y0=t.y0,a.y1=t.y1,a.sankeyWidth=t.width??0,a.circular=!!t.circular,a.circularPathData=t.circularPathData,a._circularWidth=t._circularWidth,a._circularStub=t._circularStub,a.path=t.path,a.circularLinkType=t.circularLinkType,a.direction=o;let i=v.get(e),n=v.get(r);i&&(a.source=i),n&&(a.target=n)}}},buildScene(t,e,r,a){let i="vertical"===r.orientation?"down":"right",n=r.nodeStyle,c=r.edgeStyle,l=r.edgeOpacity??.5,o=r.edgeColorBy||"source",u=Array.isArray(r.colorScheme)?r.colorScheme:r.themeCategorical&&r.themeCategorical.length>0?r.themeCategorical:ht,s=new Map;t.forEach((t,e)=>{s.set(t.id,u[e%u.length])});let f=[],h=[],d=[],y=new Map;for(let e of t){let t=e.x1-e.x0,r=e.y1-e.y0;if(e.value<=0||t<=0||r<=0)continue;let a=n?n(W(e,"nodeStyle")):{},c={fill:a.fill||s.get(e.id)||"#4d430c",stroke:a.stroke,strokeWidth:a.strokeWidth,opacity:a.opacity,cursor:a.cursor};y.set(e.id,("string"==typeof c.fill?c.fill:null)||s.get(e.id)||"#4d430c");let l={...e.data,value:e.data?.value??e.value};"down"===i?f.push({type:"rect",x:e.y0,y:e.x0,w:r,h:t,style:c,accessibleDatum:l,datum:e,id:e.id,label:e.id}):f.push({type:"rect",x:e.x0,y:e.y0,w:t,h:r,style:c,accessibleDatum:l,datum:e,id:e.id,label:e.id})}let g=[...e].sort((t,e)=>(e.sankeyWidth||0)-(t.sankeyWidth||0));for(let t of g){if(!(t.value>0)||!t.sankeyWidth||t.sankeyWidth<=0)continue;let e="object"==typeof t.source?t.source:null,a="object"==typeof t.target?t.target:null;if(!e||!a)continue;let i=r.themeSemantic?.border||r.themeSemantic?.secondary||"#999";i="function"==typeof o?o(t)||i:"target"===o?y.get(a.id)||s.get(a.id)||i:y.get(e.id)||s.get(e.id)||i;let n,u=c?c(W(t,"edgeStyle")):{};if(n=t.circular&&t.circularPathData?I(t):Ot(t),!n)continue;let f={fill:u.fill||i,fillOpacity:u.fillOpacity??l,stroke:u.stroke||"none",strokeWidth:u.strokeWidth,strokeOpacity:u.strokeOpacity,opacity:u.opacity,cursor:u.cursor};h.push({type:"bezier",pathD:n,bezierCache:t.bezier,style:f,accessibleDatum:t.data,datum:t})}if(!1!==r.showLabels){let e=ot(r.nodeLabel);for(let r of t){let t=r.x1-r.x0,n=r.y1-r.y0;if(r.value<=0||t<=0||n<=0)continue;let c,l,o,u=e?e(r):r.id;if(u){if("down"===i)c=r.y0+(r.y1-r.y0)/2,l=r.x0+t/2<a[1]/2?r.x1+14:r.x0-14,o="start";else{let e=a[0]/2;r.x0+t/2<e?(c=r.x1+6,o="start"):(c=r.x0-6,o="end"),l=r.y0+n/2}d.push({x:c,y:l,text:String(u),anchor:"down"===i?"middle":o,baseline:"middle",fontSize:11})}}}return{sceneNodes:f,sceneEdges:h,labels:d}}},qt={supportsStreaming:!0,hierarchical:!1,computeLayout(t,e,r,a){if(0===t.length)return;let i=r.forceStrength??.1,n=a[0]/2,c=a[1]/2,l=Math.max(.1,Math.min(1,Math.min(a[0],a[1])/200)),o=Math.min(.5,.06+1.8*(1-l)),u=r.__previousPositions,s=0,f=[];for(let e of t){let t=!1!==e.__hasPosition&&Number.isFinite(e.x)&&Number.isFinite(e.y),r=u?.get(e.id);t?s++:r?(e.x=r.x,e.y=r.y,s++):f.push(e)}let h=t.length>0?f.length/t.length:1,d=s>0&&h<=.3;if(d){let r=new Map;for(let e of t)r.set(e.id,e);for(let t of f){let a=F(t.id,e,r);if(a.length>0){let e=0,r=0;for(let t of a)e+=t.x,r+=t.y;let i=N(t.id),n=i%360*(Math.PI/180),c=(10+i%20)*l;t.x=e/a.length+c*Math.cos(n),t.y=r/a.length+c*Math.sin(n)}else{let e=N(t.id),r=e%360*(Math.PI/180),a=(15+e%30)*l;t.x=n+a*Math.cos(r),t.y=c+a*Math.sin(r)}}}else{let e=Math.PI*(3-Math.sqrt(5));for(let r=0;r<t.length;r++){let a=t[r];if(!1===a.__hasPosition||!Number.isFinite(a.x)||!Number.isFinite(a.y)){let t=10*Math.sqrt(r+.5)*l,i=r*e;a.x=n+t*Math.cos(i),a.y=c+t*Math.sin(i)}}}for(let e of t)e.__hasPosition=!0;let y=t.length,g=r.iterations??Math.max(50,Math.min(300,Math.floor(300-2*(y-30)))),p=r.__skipForceSimulation||0===r.iterations?0:d?40:g,m=ct(r.nodeSize,r.nodeSizeRange,t);if(p>0){let u=new Map,s=new Map;for(let e of t)u.set(e.id,0),s.set(e.id,e);for(let t of e){let e=ut(t.source),r=ut(t.target);u.set(e,(u.get(e)??0)+1),u.set(r,(u.get(r)??0)+1)}let f=vt().strength(t=>{let e=lt(t),r=ut(t.source),a=ut(t.target),n=Math.max(1,Math.min(u.get(r)??1,u.get(a)??1)),c=e&&e>0?Math.sqrt(e):1;return Math.min(2.5,c*i/(.1*n))}).distance(t=>{let e="string"==typeof t.source?s.get(t.source):t.source,r="string"==typeof t.target?s.get(t.target):t.target,a=(e?m(e):0)+(r?m(r):0)+Math.max(6,12*l);return Math.max(16,40*l,a)}).id(t=>t.id),h=bt();if((void 0!==r.random||void 0!==r.seed)&&h.randomSource(r.random??st(r.seed)),h.force("charge",Dt().strength(t=>{let e=u.get(t.id)??0;return-15*l*m(t)*Math.sqrt(e+1)})).force("collide",Pt(t=>m(t)+3*l).strength(.9).iterations(2)).force("center",Et(n,c).strength(.8)).force("x",St(n).strength(o)).force("y",Mt(c).strength(o)).force("bounds",function(t,e,r=2,a=.6){let i=[],n=n=>{let c=a*Math.max(n,.2);for(let a of i){let i=a.x??t[0]/2,n=a.y??t[1]/2,l=a.vx??0,o=a.vy??0,u=e(a)+r,s=Math.min(t[0]/2,u),f=Math.max(t[0]/2,t[0]-u),h=Math.min(t[1]/2,u),d=Math.max(t[1]/2,t[1]-u),y=i+l,g=n+o;y<s?a.vx=l+(s-y)*c:y>f&&(a.vx=l+(f-y)*c),g<h?a.vy=o+(h-g)*c:g>d&&(a.vy=o+(d-g)*c)}};return n.initialize=t=>{i=t},n}(a,m)),h.nodes(t),e.length>0){let t=e.map(t=>({...t,source:ut(t.source),target:ut(t.target)}));f.links(t),h.force("link",f)}d?h.alpha(.3):h.alpha()<.1&&h.alpha(1),h.stop();for(let t=0;t<p;++t)h.tick()}for(let e of t){if(null==e.x||null==e.y)continue;let t=m(e),r=p>0?2:0,i=Math.min(a[0]/2,t+r),n=Math.min(a[1]/2,t+r);e.x=Math.max(i,Math.min(a[0]-i,e.x)),e.y=Math.max(n,Math.min(a[1]-n,e.y)),e.x0=0,e.x1=0,e.y0=0,e.y1=0}let x=new Map;for(let e of t)x.set(e.id,e);for(let t of e){if("string"==typeof t.source){let e=x.get(t.source);e&&(t.source=e)}if("string"==typeof t.target){let e=x.get(t.target);e&&(t.target=e)}}},buildScene(t,e,r,a){let i=r.nodeStyle,n=r.edgeStyle,c=ct(r.nodeSize,r.nodeSizeRange,t),l=Array.isArray(r.colorScheme)?r.colorScheme:r.themeCategorical&&r.themeCategorical.length>0?r.themeCategorical:ht,o=new Map;t.forEach((t,e)=>{o.set(t.id,l[e%l.length])});let u=[],s=[],f=[];for(let e of t){if(null==e.x||null==e.y)continue;let t=c(W(e,"nodeSize")),a=i?i(W(e,"nodeStyle")):{},n={fill:a.fill||o.get(e.id)||r.themeSemantic?.primary||"#007bff",stroke:a.stroke||r.themeSemantic?.surface||"#fff",strokeWidth:a.strokeWidth??2,opacity:a.opacity,cursor:a.cursor};u.push({type:"circle",cx:e.x,cy:e.y,r:t,style:n,accessibleDatum:e.data,datum:e,id:e.id,label:e.id})}let h=new Map;for(let e of t)h.set(e.id,e);for(let t of e){let e="object"==typeof t.source?t.source:h.get(t.source),a="object"==typeof t.target?t.target:h.get(t.target);if(!e||!a||null==e.x||null==e.y||null==a.x||null==a.y)continue;let i=n?n(W(t,"edgeStyle")):{},c={stroke:i.stroke||r.themeSemantic?.border||r.themeSemantic?.secondary||"#999",strokeWidth:i.strokeWidth??1,opacity:i.opacity??.6,cursor:i.cursor};s.push({type:"line",x1:e.x,y1:e.y,x2:a.x,y2:a.y,style:c,accessibleDatum:t.data,datum:t})}if(!1!==r.showLabels){let e=ot(r.nodeLabel);for(let r of t){if(null==r.x||null==r.y)continue;let t=e?e(r):r.id;if(!t)continue;let a=c(W(r,"nodeSize"));f.push({x:r.x,y:r.y-a-4,text:String(t),anchor:"middle",baseline:"auto",fontSize:11,anchorPoint:[r.x,r.y]})}}return{sceneNodes:u,sceneEdges:s,labels:f}}},Zt=ht,Gt={supportsStreaming:!1,hierarchical:!1,computeLayout(t,e,r,a){for(let e of t)delete e.__arcData;for(let t of e)delete t.__chordData,delete t.__chordEdges;if(0===t.length)return;let{padAngle:i=.01,groupWidth:n=20,sortGroups:c}=r,l=Math.min(a[0],a[1])/2,o=l-n,u=a[0]/2,s=a[1]/2,f=new Map(t.map(t=>[t.id,t])),h=new Set,d=e.filter(t=>{let e=ut(t.source),r=ut(t.target);return!(!Number.isFinite(t.value)||t.value<=0||!f.has(e)||!f.has(r)||(h.add(e),h.add(r),0))}),y=t.filter(t=>h.has(t.id)),g=y.length;if(0===g)return;let p=new Map(y.map((t,e)=>[t.id,e])),m=Array.from({length:g},()=>new Array(g).fill(0)),x=new Map;for(let t of d){let e=ut(t.source),r=ut(t.target),a=p.get(e),i=p.get(r);m[a][i]+=t.value;let n=a<=i?`${a}\0${i}`:`${i}\0${a}`,c=x.get(n);c?c.push(t):x.set(n,[t])}let k=Math.min(Number.isFinite(i)?Math.max(0,i):.01,Math.PI/g),L=At().padAngle(k);c&&L.sortGroups(c);let v=L(m),b=v.groups,D=$t().innerRadius(o).outerRadius(l);for(let t of b){let e=y[t.index],r={innerRadius:o,outerRadius:l,startAngle:t.startAngle,endAngle:t.endAngle},a=D.centroid(r);e.x=a[0]+u,e.y=a[1]+s,e.__arcData={startAngle:t.startAngle,endAngle:t.endAngle}}for(let t of e){let e=ut(t.source),r=ut(t.target),a=f.get(e),i=f.get(r);a&&(t.source=a),i&&(t.target=i)}for(let t of v){let e=t.source.index,r=t.target.index,a=e<=r?`${e}\0${r}`:`${r}\0${e}`,i=x.get(a);for(let e of i)e.__chordData=t,e.__chordEdges=i}},buildScene(t,e,r,a){let{groupWidth:i=20,edgeOpacity:n=.5}=r,c=Math.min(a[0],a[1])/2,l=c-i,o=a[0]/2,u=a[1]/2,s=r.nodeStyle,f=r.edgeStyle,h=r.edgeColorBy||"source",d=Array.isArray(r.colorScheme)?r.colorScheme:r.themeCategorical&&r.themeCategorical.length>0?r.themeCategorical:Zt,y=new Map;t.forEach((t,e)=>{y.set(t.id,d[e%d.length])});let g=wt().radius(l),p=[],m=[],x=[];for(let e=0;e<t.length;e++){let r=t[e],a=r.__arcData;if(!a)continue;let i=s?s(W(r,"nodeStyle")):{},n={fill:("string"==typeof i.fill?i.fill:void 0)||y.get(r.id)||d[e%d.length],stroke:i.stroke||"black",strokeWidth:i.strokeWidth??1,opacity:i.opacity,cursor:i.cursor};p.push({type:"arc",cx:o,cy:u,innerR:l,outerR:c,startAngle:a.startAngle-Math.PI/2,endAngle:a.endAngle-Math.PI/2,style:n,accessibleDatum:r.data,datum:r,id:r.id,label:r.id})}let k=new Set,L=t.filter(t=>t.__arcData);for(let t of e){let e=t.__chordData;if(!e||k.has(e))continue;k.add(e);let a=L[e.source.index].id;for(let e of t.__chordEdges||[])ut(e.source)===a&&(t=e);let i=g(e);if(!i)continue;let c=C(i,o,u),l=r.themeSemantic?.border||r.themeSemantic?.secondary||"#999",s=f?f(W(t,"edgeStyle")):{};if(f)l=("string"==typeof s.fill?s.fill:void 0)||l;else{let e="object"==typeof t.source?t.source:null,r="object"==typeof t.target?t.target:null;"target"===h&&r?l=y.get(r.id)||l:e&&(l=y.get(e.id)||l)}let d={fill:l,fillOpacity:s.fillOpacity??n,stroke:s.stroke||"none",strokeWidth:s.strokeWidth,strokeOpacity:s.strokeOpacity,opacity:s.opacity,cursor:s.cursor};m.push({type:"ribbon",pathD:c,style:d,accessibleDatum:t.data,datum:t})}if(!1!==r.showLabels){let e=ot(r.nodeLabel),a=c+12;for(let r of t){let t=r.__arcData;if(!t)continue;let i=e?e(r):r.id;if(!i)continue;let n=(t.startAngle+t.endAngle)/2,c=n-Math.PI/2,l=o+Math.cos(c)*a,s=u+Math.sin(c)*a,f=n>Math.PI?"end":"start";x.push({x:l,y:s,text:String(i),anchor:f,baseline:"middle",fontSize:11})}}return{sceneNodes:p,sceneEdges:m,labels:x}}},Kt=["#e8d5b7","#b8d4e3","#d4e3b8","#e3c4d4","#d4d4e3","#e3d4b8","#b8e3d4","#e3b8b8"],Vt={supportsStreaming:!1,hierarchical:!0,computeLayout(t,e,r,a){let i=r.__hierarchyRoot;if(!i)return;let n=r.chartType,c=O(r.childrenAccessor),l=Rt(i,c),o=[];l.eachBefore(t=>o.push(t));let u=B(o.map((t,e)=>function(t,e,r){let a=e.nodeIDAccessor,i=t.data;return String("function"==typeof a?a(i):"string"==typeof a&&void 0!==i[a]?i[a]:void 0!==i.name?i.name:void 0!==i.id?i.id:`node-${r}`)}(t,r,e)));l.sum(function(t="value"){let e="function"==typeof t?t:e=>e[t];return t=>{let r=e(t),a="string"==typeof r?Number(r):r;return Number.isFinite(a)&&a>0?a:0}}(r.hierarchySum)).sort((t,e)=>e.value-t.value);let[s,f]=a;switch(n){case"tree":case"cluster":!function(t,e,r,a){let i=e.treeOrientation||"vertical",n="cluster"===e.chartType?_t():It();if("horizontal"===i)n.size([a,r]);else if("radial"===i){let t=Math.min(r,a)/2;n.size([2*Math.PI,.8*t])}else n.size([r,a]);n(t)}(l,r,s,f);break;case"treemap":case"partition":!function(t,e,r,a){let i="treemap"===e.chartType,n=i?Wt().tile(Ft):Nt();n.size([r,a]).padding(e.padding??(i?4:1)),"paddingTop"in n&&e.paddingTop>0&&n.paddingTop(e.paddingTop),n(t)}(l,r,s,f);break;case"circlepack":!function(t,e,r,a){let i=e.padding??4,n=Ct().size([r,a]).padding(i);t.leaves().some(t=>t.value)||n.radius(()=>0).padding(0),n(t)}(l,r,s,f)}let h=l.descendants();t.length=0,e.length=0;let d=new Map(o.map((t,e)=>[t,{id:u[e],x:0,y:0,x0:0,x1:0,y0:0,y1:0,width:0,height:0,value:t.value,depth:t.depth,data:t.data,createdByFrame:!0}]));for(let e of h){let a=d.get(e);"tree"===n||"cluster"===n?G(a,e,r):"treemap"===n||"partition"===n?K(a,e):"circlepack"===n&&V(a,e),a.__hierarchyNode=e,t.push(a)}if("tree"===n||"cluster"===n)for(let t of h)if(t.parent){let r=d.get(t.parent),a=d.get(t);e.push({source:r,target:a,value:1,y0:0,y1:0,sankeyWidth:0,data:{depth:t.depth}})}},buildScene(t,e,r,a){let i=r.chartType,n=r.nodeStyle||(()=>({})),c=r.edgeStyle||(()=>({}));switch(i){case"tree":case"cluster":return function(t,e,r,a,i,n){let c=[],l=[],o=[],u=r.treeOrientation||"vertical",s="radial"===u,f=a[0]/2,h=a[1]/2,{nodeSize:d}=r,y="number"==typeof d?d:5;for(let e of t){let t=e.x,a=e.y;s&&(t+=f,a+=h);let n=Y(e,r,i(W(e,"nodeStyle")));c.push({type:"circle",cx:t,cy:a,r:y,style:n,accessibleDatum:{...e.data,value:e.data?.value??e.value},datum:e,id:e.id,label:e.id,depth:e.depth})}let g=r.edgeOpacity??.5;for(let t of e){let e="object"==typeof t.source?t.source:null,a="object"==typeof t.target?t.target:null;if(!e||!a)continue;let i=e.x,c=e.y,o=a.x,d=a.y;s&&(i+=f,c+=h,o+=f,d+=h);let y=Z(i,c,o,d,u),p=n(W(t,"edgeStyle")),m={fill:"none",stroke:p.stroke||r.themeSemantic?.border||r.themeSemantic?.secondary||"#999",strokeWidth:p.strokeWidth??1.5,opacity:p.opacity??g,cursor:p.cursor};l.push({type:"curved",pathD:y,style:m,datum:t})}if(!1!==r.showLabels){let e=j(r.nodeLabel);for(let r of t){let t=e?e(r):r.id;if(!t)continue;let i,n,c,l=r.x,d=r.y;if(s&&(l+=f,d+=h),s){let t=l-f,e=d-h,r=Math.sqrt(t*t+e*e);r>0?(i=l+t/r*10,n=d+e/r*10,c=t>=0?"start":"end"):(i=l,n=d-12,c="middle")}else if("horizontal"===u){let e=q(r),o=11*String(t).length*.6,u=y+6;(e?l+u+o<=a[0]:l-u-o<0)?(i=l+y+6,c="start"):(i=l-y-6,c="end"),n=d}else{i=l;let t=y+14;n=d+t+6<=a[1]?d+t:d-t,c="middle"}let g=11*String(t).length*.6,p=i-("end"===c?g:"middle"===c?g/2:0);p<0?c="start":p+g>a[0]&&(c="end"),o.push({x:i,y:n,text:String(t),anchor:c,baseline:"middle",fontSize:11,anchorPoint:[l,d]})}}return{sceneNodes:c,sceneEdges:l,labels:o}}(t,e,r,a,n,c);case"treemap":case"partition":return function(t,e,r){let a=[],i=[];for(let i of t){let t=i.x1-i.x0,n=i.y1-i.y0;if(t<=0||n<=0)continue;let c=r(W(i,"nodeStyle")),l=Y(i,e,c);l.fillOpacity=c.fillOpacity,l.strokeOpacity=c.strokeOpacity,a.push({type:"rect",x:i.x0,y:i.y0,w:t,h:n,style:l,accessibleDatum:{...i.data,value:i.data?.value??i.value},datum:i,id:i.id,label:i.id,depth:i.depth})}if(!1!==e.showLabels){let a=j(e.nodeLabel),n=e.labelMode||"leaf",c="partition"===e.chartType;for(let l of t){let t=l.x1-l.x0,o=l.y1-l.y0;if(t<=0||o<=0)continue;let u=q(l);if(!c&&("leaf"===n&&!u||"parent"===n&&u))continue;let s=a?a(l):l.id;if(!s)continue;if(t<(u?30:40)||o<(u?16:14))continue;let f=X(l,e,r(W(l,"nodeStyle")).fill),h="string"==typeof f?z(f):e.themeSemantic?.text??"#000";u?i.push({x:l.x0+t/2,y:l.y0+o/2,text:String(s),anchor:"middle",baseline:"middle",fontSize:Math.min(11,Math.max(8,Math.min(t,o)/6)),fill:h}):i.push({x:l.x0+4,y:l.y0+12,text:String(s),anchor:"start",baseline:"auto",fontSize:11,fontWeight:600,fill:h})}}return{sceneNodes:a,sceneEdges:[],labels:i}}(t,r,n);case"circlepack":return function(t,e,r){let a=[],i=[];for(let i of t){let t=i.__radius??5;if(t<=0)continue;let n=Y(i,e,r(W(i,"nodeStyle")));n.opacity??(n.opacity=.7),a.push({type:"circle",cx:i.x,cy:i.y,r:t,style:n,accessibleDatum:{...i.data,value:i.data?.value??i.value},datum:i,id:i.id,label:i.id,depth:i.depth})}if(!1!==e.showLabels){let a=j(e.nodeLabel);for(let n of t){let t=n.__radius??5,c=a?a(n):n.id;if(!c||t<15)continue;let l=q(n),o=X(n,e,r(W(n,"nodeStyle")).fill);if(l){let r="string"==typeof o?z(o):e.themeSemantic?.text??"#000";i.push({x:n.x,y:n.y,text:String(c),anchor:"middle",baseline:"middle",fontSize:Math.min(11,Math.max(8,t/3)),fill:r})}else i.push({x:n.x,y:n.y-t+14,text:String(c),anchor:"middle",baseline:"hanging",fontSize:Math.min(11,Math.max(8,t/3)),fill:e.themeSemantic?.text||"#000",stroke:e.themeSemantic?.surface||"#fff",strokeWidth:3,paintOrder:"stroke"})}}return{sceneNodes:a,sceneEdges:[],labels:i}}(t,r,n);default:return{sceneNodes:[],sceneEdges:[],labels:[]}}}},Qt={supportsStreaming:!1,hierarchical:!0,supportsAnimation:!0,computeLayout(t,e,r,a){let i=r.__hierarchyRoot;i&&function(t,e,r,a,i){let n=O(r.childrenAccessor||"children"),c=function(t){if("function"==typeof t)return t;let e=t||"name";return t=>String(t[e]??"")}(r.nodeIDAccessor),l=function(t){if(Array.isArray(t))return t;switch(t){case"solar":return[1];case"atomic":return[2,8];default:return[9999]}}(r.orbitMode),o=r.orbitSize??2.95,u=r.orbitEccentricity??1,s="number"==typeof o?()=>o:o,f="number"==typeof u?()=>u:u,h=it(r);h.metaMap.clear(),a.length=0,i.length=0;let d=B(et(t,n).map(t=>String(c(t)))),y=0,g=e[0]/2,p=e[1]/2,m=Math.min(e[0],e[1])/2*.85,x=d[y++],k={id:x,x:g,y:p,x0:g,x1:g,y0:p,y1:p,width:0,height:0,value:0,depth:0,data:t};a.push(k),h.metaMap.set(x,{ring:m,angle:0,depth:0,parentId:null,eccentricity:1}),function t(e,r,c,o,u,g,p){let m=n(e);if(!m?.length)return;let x=m.length,k=0,L=0,v=0;for(;L<x;)L+=l[Math.min(v,l.length-1)],v++,k++;let b=0;for(let x=0;x<k;x++){let L=l[Math.min(x,l.length-1)],v=m.slice(b,b+L);if(!v.length)break;let D=(x+1)/k,P={id:r,depth:g,data:e,parentId:r},E=p?u/s(P)*D:u*D,S=Tt().value(t=>n(t)?.length?4:1).sort(null)(v),M=f(P);for(let e=0;e<v.length;e++){let n=(S[e].startAngle+S[e].endAngle)/2,l=v[e],u=d[y++],s=c+E*Math.sin(n),f=o+E*Math.cos(n)*M,p={id:u,x:s,y:f,x0:s,x1:s,y0:f,y1:f,width:0,height:0,value:0,depth:g,data:l};a.push(p),h.metaMap.set(u,{ring:E,angle:n,depth:g,parentId:r,eccentricity:M}),i.push({source:r,target:u,value:1,y0:0,y1:0,sankeyWidth:0,data:{source:r,target:u}}),t(l,u,s,f,E,g+1,!0)}b+=L}}(t,x,g,p,m,1,!1)}(i,a,r,t,e)},buildScene(t,e,r,a){let i=r.nodeStyle,n=r.edgeStyle,c=r.nodeSize,l="number"==typeof c?()=>c:"function"==typeof c?c:()=>6,o=[],u=[],s=[];if(!1!==r.orbitShowRings){let e=it(r),a=new Map;for(let e of t)a.set(e.id,e);let i=new Map;for(let[,t]of e.metaMap){if(!t.parentId)continue;let e=a.get(t.parentId);if(!e)continue;let r=`${t.parentId}:${t.ring}`;i.has(r)||i.set(r,{parentX:e.x,parentY:e.y,ring:t.ring,ecc:t.eccentricity})}let n=48,c={stroke:"rgba(128,128,128,0.35)",strokeWidth:.5,opacity:1};for(let[,{parentX:t,parentY:e,ring:r,ecc:a}]of i)for(let i=0;i<n;i++){let l=i/n*Math.PI*2,o=(i+1)/n*Math.PI*2;u.push({type:"line",x1:t+r*Math.sin(l),y1:e+r*Math.cos(l)*a,x2:t+r*Math.sin(o),y2:e+r*Math.cos(o)*a,style:c,interactive:!1,datum:null})}}for(let e of t){if(null==e.x||null==e.y)continue;let t=l(W(e,"nodeSize")),a=i?i(W(e,"nodeStyle")):{},n={fill:a.fill||r.themeSemantic?.primary||"#6366f1",stroke:a.stroke||r.themeSemantic?.surface||"#fff",strokeWidth:a.strokeWidth??1,opacity:a.opacity??(0===(e.depth??0)?1:.85),cursor:a.cursor};o.push({type:"circle",cx:e.x,cy:e.y,r:t,style:n,accessibleDatum:e.data,datum:e,id:e.id,label:e.id,depth:e.depth})}let f=new Map;for(let e of t)f.set(e.id,e);for(let t of e){let e="object"==typeof t.source?t.source:f.get(t.source),r="object"==typeof t.target?t.target:f.get(t.target);if(!e||!r||null==e.x||null==r.x)continue;let a=n?n(W(t,"edgeStyle")):{},i={stroke:a.stroke||"rgba(128,128,128,0.35)",strokeWidth:a.strokeWidth??.5,opacity:a.opacity??1,cursor:a.cursor};u.push({type:"line",x1:e.x,y1:e.y,x2:r.x,y2:r.y,style:i,datum:t})}if(r.showLabels){let e=r.nodeLabel;for(let r of t){let t=l(W(r,"nodeSize"));if(t<=4)continue;let a="function"==typeof e?e(r):e?r.data?.[e]??r.id:r.id;s.push({x:r.x,y:r.y+t+12,text:String(a),anchor:"middle",fontSize:10,fill:"currentColor",anchorPoint:[r.x,r.y]})}}return{sceneNodes:o,sceneEdges:u,labels:s}},tick:(t,e,r,a,i)=>!1!==r.orbitAnimated&&(function(t,e){let r=it(e),a=e.orbitSpeed??.25,i=e.orbitRevolution??function(t){switch(t){case"decay":return t=>Math.pow(.6,t.depth??0);case"alternate":return t=>{let e=t.depth??0;return(e%2==0?1:-1)/(e+1)};default:return t=>1/((t.depth??0)+1)}}(e.orbitRevolutionStyle),n=((typeof performance<"u"?performance.now():Date.now())-r.startTime)/1e3,c=a*(Math.PI/6),l=new Map;for(let e of t)l.set(e.id,e);for(let e of t){let t=r.metaMap.get(e.id);if(!t||!t.parentId)continue;let a=l.get(t.parentId);if(!a)continue;let o={id:e.id,depth:t.depth,data:e.data,parentId:t.parentId},u=t.angle+n*c*i(o);e.x=a.x+t.ring*Math.sin(u),e.y=a.y+t.ring*Math.cos(u)*t.eccentricity,e.x0=e.x,e.x1=e.x,e.y0=e.y,e.y1=e.y}}(t,r),!0)};export{_ as a,Yt as b,qt as c,Gt as d,Vt as e,U as f,tt as g,et as h,rt as i,at as j,Qt as k};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e){if(null==e)return;if("number"==typeof e)return{top:e,right:e,bottom:e,left:e};let t={};return"number"==typeof e.top&&(t.top=e.top),"number"==typeof e.right&&(t.right=e.right),"number"==typeof e.bottom&&(t.bottom=e.bottom),"number"==typeof e.left&&(t.left=e.left),t}function t(t){let o=a(null);return n(t.imperativeRef,{variant:t.imperativeVariant,frameRef:o}),{frameRef:o,resolved:r(t.mode,{width:t.width,height:t.height,showGrid:t.showGrid,enableHover:t.enableHover,showLegend:t.showLegend,title:t.title,description:t.description,summary:t.summary,accessibleTable:t.accessibleTable,xLabel:t.xLabel,yLabel:t.yLabel,mobileInteraction:t.mobileInteraction,mobileSemantics:t.mobileSemantics,responsiveRules:t.responsiveRules}),normalizedMargin:l(()=>e(t.margin),[t.margin])}}function o(e){let o=t(e),{resolved:n,normalizedMargin:r}=o,a=i({responsive:e.responsive,data:e.data??[],rawData:e.data,colorBy:e.colorBy,colorScheme:e.colorScheme,legendInteraction:e.legendInteraction,legendPosition:e.legendPosition,frameLegend:e.frameLegend,selection:e.selection,linkedHover:e.linkedHover,hoverHighlight:e.hoverHighlight,fallbackFields:"string"==typeof e.colorBy?[e.colorBy]:[],unwrapData:e.unwrapData,onObservation:e.onObservation,onClick:e.onClick,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,chartType:e.chartTypeLabel,chartId:e.chartId,showLegend:n.showLegend,legend:e.legend,userMargin:r,marginDefaults:n.marginDefaults,loading:e.loading,loadingContent:e.loadingContent,emptyContent:e.emptyContent,width:n.width,height:n.height});return{...o,safeData:a.data,setup:a,earlyReturn:a.earlyReturn}}import{c as n,b as i}from"./c-
|
|
1
|
+
function e(e){if(null==e)return;if("number"==typeof e)return{top:e,right:e,bottom:e,left:e};let t={};return"number"==typeof e.top&&(t.top=e.top),"number"==typeof e.right&&(t.right=e.right),"number"==typeof e.bottom&&(t.bottom=e.bottom),"number"==typeof e.left&&(t.left=e.left),t}function t(t){let o=a(null);return n(t.imperativeRef,{variant:t.imperativeVariant,frameRef:o}),{frameRef:o,resolved:r(t.mode,{width:t.width,height:t.height,showGrid:t.showGrid,enableHover:t.enableHover,showLegend:t.showLegend,title:t.title,description:t.description,summary:t.summary,accessibleTable:t.accessibleTable,xLabel:t.xLabel,yLabel:t.yLabel,mobileInteraction:t.mobileInteraction,mobileSemantics:t.mobileSemantics,responsiveRules:t.responsiveRules}),normalizedMargin:l(()=>e(t.margin),[t.margin])}}function o(e){let o=t(e),{resolved:n,normalizedMargin:r}=o,a=i({responsive:e.responsive,data:e.data??[],rawData:e.data,colorBy:e.colorBy,colorScheme:e.colorScheme,legendInteraction:e.legendInteraction,legendPosition:e.legendPosition,frameLegend:e.frameLegend,selection:e.selection,linkedHover:e.linkedHover,hoverHighlight:e.hoverHighlight,fallbackFields:"string"==typeof e.colorBy?[e.colorBy]:[],unwrapData:e.unwrapData,onObservation:e.onObservation,onClick:e.onClick,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,chartType:e.chartTypeLabel,chartId:e.chartId,showLegend:n.showLegend,legend:e.legend,userMargin:r,marginDefaults:n.marginDefaults,loading:e.loading,loadingContent:e.loadingContent,emptyContent:e.emptyContent,width:n.width,height:n.height});return{...o,safeData:a.data,setup:a,earlyReturn:a.earlyReturn}}import{c as n,b as i}from"./c-DMDFJQU4.min.js";import{bK as r}from"./c-62UTMRQE.min.js";import{useRef as a,useMemo as l}from"react";export{e as a,t as b,o as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){let a={};if(null==e||"object"!=typeof e)return a;for(let[t,r]of Object.entries(e))t.startsWith("_")||null==r||""===r||("number"==typeof r?Number.isFinite(r)&&(a[t]=r):"string"==typeof r?a[t]=r:"boolean"==typeof r?a[t]=String(r):r instanceof Date&&(a[t]=r.toISOString().slice(0,10)));return a}function a(e){return e&&"object"==typeof e?e:{}}function t(e){return a(e.accessibility).tableFields??e.accessibleDatum??e.datum}function r(r,i){let o=a(r.accessibility);return{label:"string"==typeof o.label&&o.label.length>0?o.label:"string"==typeof r.label&&r.label.length>0?r.label:i,values:{...r.navParentId?{group:r.navParentId}:{},...e(t(r))}}}function i(e){let a= new Set;if(!e.some(e=>e&&("point"===e.type||"symbol"===e.type||"glyph"===e.type)))return a;for(let t of e)if(t&&["line","area","boxplot","violin"].includes(String(t.type))&&Array.isArray(t.datum))for(let e of t.datum)a.add(e);return a}function o(e){if(!Array.isArray(e))return 0;let a=i(e),r=0;for(let i of e)if(i&&"object"==typeof i&&null!==i.datum)switch(i.type){case"point":case"symbol":case"glyph":a.has(i.datum)||r++;break;case"line":case"area":{let e=t(i);r+=Array.isArray(e)?e.length:null!=e&&"object"==typeof e?1:0;break}case"boxplot":case"violin":{let e=t(i);r+=Array.isArray(e)?e.length+1:1;break}case"rect":case"heatcell":case"wedge":case"circle":case"arc":case"candlestick":case"connector":case"trapezoid":case"bezier":case"ribbon":case"curved":case"geoarea":r++}return r}function l(r){let o=[];if(!Array.isArray(r))return o;let l=i(r);for(let i of r)if(i&&"object"==typeof i&&null!==i.datum)try{switch(i.type){case"point":case"symbol":case"glyph":if(l.has(i.datum))break;o.push({label:"Point",values:e(t(i))});break;case"line":case"area":{let a=t(i),r=Array.isArray(a)?a:null!=a&&"object"==typeof a?[a]:[],l="line"===i.type?"Line point":"Area point";for(let a of r)o.push({label:l,values:e(a)});break}case"boxplot":case"violin":{let a=t(i),r="boxplot"===i.type?"Boxplot":"Distribution",l="string"==typeof i.category?{category:i.category}:{};if(Array.isArray(a)){o.push({label:r,values:{...l,...e(i.stats)}});for(let t of a)o.push({label:`${r} observation`,values:{...l,...e(t)}})}else o.push({label:r,values:{...l,...e(a)}});break}case"rect":{let a=t(i),r=null!=a&&"object"==typeof a?a:{},l=r.category??i.group??"",s=r.value??r.__aggregateValue??r.total,c=e(r);null==c.category&&""!==l&&(c.category=String(l)),null==c.value&&null!=s&&(c.value="number"==typeof s||"string"==typeof s?s:String(s)),o.push({label:"Bar",values:c});break}case"heatcell":{let a=e(t(i));null==a.value&&"number"==typeof i.value&&Number.isFinite(i.value)&&(a.value=i.value),o.push({label:"Cell",values:a});break}case"wedge":{let r=t(i),l=e(r);if(null==l.category){let e=a(r),t=e.category??e.label;null!=t&&(l.category=String(t))}o.push({label:"Wedge",values:l});break}case"circle":o.push({label:"Node",values:e(t(i))});break;case"arc":o.push({label:"Arc",values:e(t(i))});break;case"candlestick":o.push({label:"Candlestick",values:e(t(i))});break;case"connector":case"trapezoid":case"bezier":case"ribbon":case"curved":o.push({label:"Connection",values:e(t(i))});break;case"geoarea":{let r=a(t(i)),l={...e(r.properties),...e(r)};o.push({label:"Region",values:l});break}}}catch{}return o}function s(e,a,t=`${a}s`){return`${e} ${1===e?a:t}`}var c="semiotic-accessible-data-table",n=`${c} semiotic-accessible-data-table-hidden`,b=`${c} semiotic-accessible-data-table-visible`,d=`${b} semiotic-accessible-data-table-network`,u={boxSizing:"border-box",maxWidth:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},p={position:"absolute",top:0,left:0,right:0,zIndex:"var(--semiotic-data-table-z-index, var(--semiotic-overlay-z-index, 20))",padding:"14px 16px 12px",borderBottom:"1px solid var(--semiotic-data-table-border, var(--semiotic-border, #e0e0e0))",fontFamily:"var(--semiotic-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)",fontSize:13,lineHeight:1.5,color:"var(--semiotic-data-table-text, var(--semiotic-text, #333))",background:"var(--semiotic-data-table-bg, var(--semiotic-surface, var(--semiotic-bg, #fff)))",borderRadius:"var(--semiotic-border-radius, 0px) var(--semiotic-border-radius, 0px) 0 0"},f={marginBottom:8,paddingRight:28,color:"var(--semiotic-data-table-muted-text, var(--semiotic-text-secondary, #666))",fontSize:12,letterSpacing:"0.01em"},m={position:"absolute",top:10,right:10,width:22,height:22,display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid var(--semiotic-data-table-border, var(--semiotic-border, #e0e0e0))",background:"var(--semiotic-data-table-bg, var(--semiotic-surface, var(--semiotic-bg, #fff)))",cursor:"pointer",color:"var(--semiotic-data-table-muted-text, var(--semiotic-text-secondary, #666))",fontSize:13,lineHeight:1,padding:0,borderRadius:"var(--semiotic-border-radius, 4px)"},v={width:"100%",borderCollapse:"collapse",fontSize:12,marginTop:4,fontVariantNumeric:"tabular-nums"},g={textAlign:"left",padding:"5px 10px",borderBottom:"2px solid var(--semiotic-data-table-border, var(--semiotic-border, #e0e0e0))",fontWeight:600,fontSize:11,textTransform:"uppercase",letterSpacing:"0.04em",color:"var(--semiotic-data-table-muted-text, var(--semiotic-text-secondary, #666))"},y={padding:"4px 10px",borderBottom:"1px solid var(--semiotic-data-table-border, var(--semiotic-border, #e0e0e0))"},x={textAlign:"left",fontSize:11,color:"var(--semiotic-data-table-muted-text, var(--semiotic-text-secondary, #666))",marginBottom:4,fontStyle:"italic"},h={marginTop:8,padding:"4px 10px",fontSize:12,cursor:"pointer",border:"1px solid var(--semiotic-data-table-border, var(--semiotic-border, #e0e0e0))",borderRadius:"var(--semiotic-border-radius, 4px)",background:"var(--semiotic-data-table-bg, var(--semiotic-surface, var(--semiotic-bg, #fff)))",color:"var(--semiotic-data-table-text, var(--semiotic-text, #333))",fontFamily:"inherit"};export{e as a,t as b,r as c,o as d,l as e,n as f,b as g,d as h,u as i,p as j,f as k,m as l,v as m,g as n,y as o,x as p,h as q,s as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as l}from"./c-YSMCBJOI.min.js";import{c,b as u}from"./c-DMDFJQU4.min.js";import{a as f,g as m,f as p}from"./c-4OVDIXAR.min.js";import{e as y,j as d,l as h,m as g}from"./c-AMQAAW7G.min.js";import{j as v}from"./c-ZYMXDR42.min.js";import{T as b,J as A,G as x,I as S,R as k}from"./c-OBBSIOYU.min.js";import{bQ as w,an as D,bW as B,bK as L,b as C,be as O,v as R,bM as G,aP as j,aR as P,ba as _}from"./c-62UTMRQE.min.js";import{f as F}from"./c-C7TT4J7K.min.js";import{e as H}from"./c-ZP6O6UHV.min.js";import{r as M,n as W}from"./c-WPL6PGP3.min.js";import{E as I,D as T}from"./c-B3X2IJRQ.min.js";import{d as N}from"./c-5PCO2P5Q.min.js";import{useMemo as E,useState as K,useEffect as Q,forwardRef as U,useRef as X,useCallback as z}from"react";import{jsx as J}from"react/jsx-runtime";function Y(){y(d),y(h),y(g)}function $(e){let{colorBy:t,colorScale:o,color:r,pointRadius:a=5,radiusFn:i,fillOpacity:n=1,fallbackFill:s,baseStyleExtras:l,stroke:c,strokeWidth:u,opacity:f,effectiveSelectionHook:m,resolvedSelection:p,colorDatumAccessor:y,selectionDatumAccessor:d,styleRules:h,ruleContext:g}=e,v=E(()=>e=>{let c="function"==typeof l?l(e):l,u=c?{...c}:{};if(void 0===u.fillOpacity&&(u.fillOpacity=n),void 0===u.fill)if(t){if(o){let r=y?y(e):e;u.fill=M(r,t,o)}}else u.fill=s?s(e):r||W;return void 0===u.r&&(u.r=i?i(e):a),h&&h.length>0&&Object.assign(u,w(e,h,g?g(e):{value:void 0})),u},[t,o,r,a,i,n,s,l,y,h,g]),A=E(()=>b(v,{stroke:c,strokeWidth:u,opacity:f}),[v,c,u,f]);return E(()=>F(A,m??null,p,d),[A,m,p,d])}function q(e){let{lineWidth:t=2,colorBy:o,colorScale:r,color:a,resolveStroke:i,fillArea:n,areaOpacity:s=.3,stroke:l,strokeWidth:c,opacity:u,effectiveSelectionHook:f,resolvedSelection:m,styleRules:p,ruleContext:y}=e,d=E(()=>function(e){let{lineWidth:t=2,colorBy:o,colorScale:r,color:a,resolveStroke:i,fillArea:n,areaOpacity:s=.3,styleRules:l,ruleContext:c}=e;return(e,u)=>{let f,m={strokeWidth:t},p=!0===n||Array.isArray(n)&&null!=u&&n.includes(u);return i?f=i(e,u):o?r&&(f=M(e,o,r)):f=a||W,void 0!==f&&(m.stroke=f,p&&(m.fill=f,m.fillOpacity=s)),l?.length&&Object.assign(m,w(e,l,c?c(e,u):{value:void 0,category:u})),m}}({lineWidth:t,colorBy:o,colorScale:r,color:a,resolveStroke:i,fillArea:n,areaOpacity:s,styleRules:p,ruleContext:y}),[t,o,r,a,i,n,s,p,y]),h=E(()=>b(d,{stroke:l,strokeWidth:c,opacity:u}),[d,l,c,u]);return E(()=>F(h,f??null,m),[h,f,m])}async function V(){return t||(t=await(import("./c-PX2XTYMN.min.js"))),t}function Z(e){let{data:t,xAccessor:i,yAccessor:n,groupBy:s}=e,l=D(e.forecast),c=D(e.anomaly),u="string"==typeof i?i:r,f="string"==typeof n?n:a,m=E(()=>{if(!l&&!c)return t;let e="function"==typeof i,o="function"==typeof n;return e||o?t.map(t=>{let s={...t};return e&&(s[r]=i(t)),o&&(s[a]=n(t)),s}):t},[t,l,c,i,n]),p=E(()=>({overlayData:m,forecast:l,anomaly:c,xAccessorKey:u,yAccessorKey:f,groupBy:s}),[m,l,c,u,f,s]),[y,d]=K(null);Q(()=>{if(!l&&!c)return void d(null);let e=!1;return(l?async function(...e){return(await V()).buildForecast(...e)}(m,u,f,s?{...l,_groupBy:s}:l,c):async function(...e){return(await V()).buildAnomalyAnnotations(...e)}(c).then(e=>({processedData:m,annotations:e}))).then(t=>{e||d({request:p,result:t,hasForecast:!!l})}).catch(t=>{e||("production"!==process.env.NODE_ENV&&console.warn("[Semiotic] Unable to compute statistical overlays:",t),d(null))}),()=>{e=!0}},[p,m,l,c,u,f,s]);let h=y?.request===p?y:null;return{effectiveData:h?.result.processedData??t,statisticalAnnotations:h?.result.annotations??o,hasForecast:h?.hasForecast??!1,xAccessorKey:u,yAccessorKey:f}}function ee(e,{lineDataAccessor:t,groupAccessor:o,lineBy:r,segmentField:a}){let i=new Map;for(let n of e){let e="function"==typeof o?o(n):n[o],s=String(e),l=i.get(s);l||(l={[t]:[]},"string"==typeof o&&(l[o]=e),a&&(l[a]=n[a],"string"==typeof r&&(l[r]=n[r])),i.set(s,l)),l[t].push(n)}return[...i.values()]}function te(e,t){if(!t)return e;let o=new Set(e),r=[];for(let[e,a]of t.seriesOf)o.has(a)&&r.push(e);return r}function oe(e,t){if(!t)return e;let o=e.tooltipContent,r=e=>{let r=e?.allSeries;return o(Array.isArray(r)?{...e,allSeries:r.map(e=>({...e,group:t.seriesOf.get(e.group)??e.group}))}:e)};return{...e,tooltipContent:I(o)?T(r):r}}var e="__forecastSegment",t=null,o=[],r="__semiotic_resolvedX",a="__semiotic_resolvedY",i="__lineObjectSeries",n=e=>e.parentLine||e,s=/*#__PURE__*/B(/*#__PURE__*/U(function(t,o){Y();let r=X(null);c(o,{variant:"xy",frameRef:r});let a=L(t.mode,{width:t.width,height:t.height,showAxes:t.showAxes,showGrid:t.showGrid,enableHover:t.enableHover,showLegend:t.showLegend,title:t.title,description:t.description,summary:t.summary,accessibleTable:t.accessibleTable,xLabel:t.xLabel,yLabel:t.yLabel,mobileInteraction:t.mobileInteraction,mobileSemantics:t.mobileSemantics,responsiveRules:t.responsiveRules}),{data:s,margin:y,className:d,xFormat:h,yFormat:g,axisExtent:b,xAccessor:w="x",yAccessor:D="y",lineBy:B,lineDataAccessor:F="coordinates",colorBy:M,colorScheme:I,styleRules:T,curve:U="linear",showPoints:re=!1,pointRadius:ae=3,fillArea:ie=!1,areaOpacity:ne=.3,lineWidth:se=2,lineGradient:le,tooltip:ce,pointIdAccessor:ue,annotations:fe,directLabel:me,gapStrategy:pe="break",anomaly:ye,forecast:de,band:he,xExtent:ge,yExtent:ve,frameProps:be={},selection:Ae,linkedHover:xe,linkedBrush:Se,brush:ke,onBrush:we,onObservation:De,onClick:Be,hoverHighlight:Le,hoverRadius:Ce,chartId:Oe,loading:Re,loadingContent:Ge,emptyContent:je,legendInteraction:Pe,legendPosition:_e,legend:Fe,xScaleType:He,yScaleType:Me,color:We,stroke:Ie,strokeWidth:Te,opacity:Ne}=t,{legend:Ee,...Ke}=be,Qe=E(()=>H(Ee,Fe),[Ee,Fe]),{width:Ue,height:Xe,enableHover:ze,showGrid:Je,showLegend:Ye,title:$e,description:qe,summary:Ve,accessibleTable:Ze,xLabel:et,yLabel:tt}=a,ot=E(()=>C(s),[s]),rt=Array.isArray(ot[0]?.[F])?ot[0][F]:ot;O("LineChart",rt,"xAccessor",w),O("LineChart",rt,"yAccessor",D);let{effectiveData:at,statisticalAnnotations:it,hasForecast:nt,xAccessorKey:st,yAccessorKey:lt}=Z({data:ot,xAccessor:w,yAccessor:D,forecast:de,anomaly:ye,groupBy:B}),ct=nt?st:w,ut=nt?lt:D,ft="__compoundGroup",mt=!(!de||!B),pt=mt?ft:de?e:B,yt=E(()=>{if(!mt)return at;let t="function"==typeof B?B:e=>e[B];return at.map(o=>{let r={...o};return r[ft]=`${t(o)}__${o[e]||"observed"}`,r})},[at,mt,B]),dt=mt?yt:at,ht=M||B,gt=E(()=>function(e,t,o){if(!o)return;let r=[t,o.upperBounds??"__forecastUpper",o.lowerBounds??"__forecastLower"].map(e=>"function"==typeof e?e:t=>t[e]),a=!(!o.upperBounds&&!o.lowerBounds),i=1/0,n=-1/0;for(let t of e){let e=r[1](t),o=r[2](t);(null!=e||null!=o)&&(a=!0);for(let a of[Number(r[0](t)),e,o])"number"==typeof a&&Number.isFinite(a)&&(i=Math.min(i,a),n=Math.max(n,a))}return a&&i<=n?[i,n]:void 0}(at,ut,de),[de,at,ut]),vt=z(e=>{let t="function"==typeof ct?ct(e):e[ct],o="function"==typeof ut?ut(e):e[ut];return null==t||null==o||Number.isNaN(t)||Number.isNaN(o)},[ct,ut]),bt=void 0!==dt[0]?.[F],At=bt?i:pt,xt=E(()=>bt?dt.map((e,t)=>{let o="function"==typeof B?B(e):"string"==typeof B?e[B]:void 0,r=null==o?`line-${t}`:String(o),a=Array.isArray(e[F])?e[F]:[];return{...e,[i]:r,[F]:a.map(t=>({...t,[i]:r,parentLine:e,..."string"==typeof B&&void 0!==e[B]?{[B]:e[B]}:{}}))}}):pt?ee(dt,{lineDataAccessor:F,groupAccessor:pt,lineBy:B,segmentField:mt?e:void 0}):[{[F]:dt}],[bt,pt,F,dt,B,mt]),{lines:St,hasGaps:kt,segments:wt}=E(()=>function({lineData:e,strategy:t,lineDataAccessor:o,isGap:r,yField:a,seriesOfLine:i}){let n=e=>e[o]||[];if("interpolate"===t){let t=!1,a=[];for(let i of e){let e=n(i).filter(e=>!r(e)||(t=!0,!1));e.length>0&&a.push({...i,[o]:e})}return{lines:a,hasGaps:t}}if("zero"===t){if(!a)return{lines:e,hasGaps:e.some(e=>n(e).some(r))};let t=!1;return{lines:e.map(e=>({...e,[o]:n(e).map(e=>r(e)?(t=!0,{...e,[a]:0}):e)})),hasGaps:t}}if(!e.some(e=>n(e).some(r)))return{lines:e,hasGaps:!1};let s=[],l=new WeakMap,c=new Map;return e.forEach((e,t)=>{let a=i(e),u=[],f=0,m=()=>{if(0===u.length)return;let r={...e,[o]:u},i=`seg:${t}:${f}`;l.set(r,i),c.set(i,a),s.push(r),u=[],f++};for(let t of n(e))r(t)?m():u.push(t);m()}),{lines:s,hasGaps:!0,segments:{keyOf:l,seriesOf:c}}}({lineData:xt,strategy:pe,lineDataAccessor:F,isGap:vt,yField:"string"==typeof ut?ut:void 0,seriesOfLine:e=>{if(!At)return"";let t=e[F]?.[0],o="string"==typeof At?e[At]:t?At(t):void 0;return null==o?"":String(o)}}),[xt,pe,F,vt,At,ut]),Dt=E(()=>"zero"===pe&&"function"==typeof ut?e=>vt(e)?0:ut(e):ut,[ut,pe,vt]),Bt="object"==typeof me?me:{},Lt=Bt.position||"end",Ct=Bt.fontSize||11,Ot=(!me||void 0!==Ye)&&Ye,Rt=u({responsive:t,data:at,rawData:s,colorBy:ht,colorScheme:I,legendInteraction:Pe,legendPosition:_e,frameLegend:Ke,selection:Ae,linkedHover:xe,fallbackFields:ht?["string"==typeof ht?ht:""]:[],unwrapData:!1,onObservation:De,onClick:Be,hoverHighlight:Le,mobileInteraction:a.mobileInteraction,mobileSemantics:a.mobileSemantics,chartType:"LineChart",chartId:Oe,showLegend:Ot,legend:Qe,userMargin:y,marginDefaults:a.marginDefaults,loading:Re,loadingContent:Ge,emptyContent:je,width:Ue,height:Xe,hasTitle:!!$e,axisChrome:R(be,{showAxes:a.showAxes,xLabel:et,yLabel:tt})}),Gt=Rt.categoryColorScale,jt=Rt.effectiveSelectionHook,Pt=Rt.resolvedSelection,_t=Rt.customHoverBehavior,Ft=Rt.customClickBehavior,Ht=Rt.crosshairProps,Mt=E(()=>{if(ht)return bt?e=>{let t=e.parentLine||e;return"function"==typeof ht?ht(t):t[ht]}:ht},[ht,bt]),Wt=E(()=>G(ct,Dt),[ct,Dt]),It=q({lineWidth:se,colorBy:Mt,colorScale:Gt,color:We,fillArea:ie,areaOpacity:ne,stroke:Ie,strokeWidth:Te,opacity:Ne,effectiveSelectionHook:jt,resolvedSelection:Pt,styleRules:T,ruleContext:Wt}),[Tt,Nt]=K(null);Q(()=>{if(!de)return void Nt(null);let e=!1;return async function(...e){return(await V()).createSegmentLineStyle(...e)}(It,de).then(t=>{e||Nt(()=>t)}).catch(()=>{e||Nt(null)}),()=>{e=!0}},[It,de]);let Et=Tt||It,Kt=$({colorBy:ht,colorScale:Gt,color:We,pointRadius:ae,colorDatumAccessor:n,selectionDatumAccessor:N,effectiveSelectionHook:jt,resolvedSelection:Pt}),Qt=Array.isArray(ie)?"mixed":ie?"area":"line",Ut=E(()=>{if(!me||!ht)return[];let e={position:Lt,fontSize:Ct,colorBy:ht,color:e=>Gt?.(e)??W};return void 0===s?[{type:"text",_directLabelRequest:e}]:f(St.flatMap(e=>(e[F]||[]).map(t=>({...t,parentLine:t.parentLine||e}))),e,ct,Dt)},[s,me,ht,Gt,St,F,ct,Dt,Lt,Ct]),Xt=E(()=>{if(!me)return Rt.margin;let e="end"===Lt?"right":"left";if("number"==typeof y||"number"==typeof y?.[e])return Rt.margin;let t=(void 0===s?Rt.allCategories:Ut.map(e=>String(e.label))).reduce((e,t)=>Math.max(e,Array.from(t).length*Ct*.65),0);return{...Rt.margin,[e]:Math.max(Rt.margin[e],t+10)}},[s,me,Ut,Lt,Ct,y,Rt.margin,Rt.allCategories]),zt=B||M,Jt=E(()=>A([{label:et||x(w),accessor:ct,role:"x",format:h},{label:tt||x(D),accessor:Dt,role:"y",format:g},...zt?[{label:x(zt),accessor:zt,role:"group"}]:[],...S(he,g)]),[ct,Dt,w,D,et,tt,zt,h,g,he]),Yt=bt?at[0]?.[F]||[]:s,$t=l({componentName:"LineChart",data:Yt,accessors:{xAccessor:w,yAccessor:D}}),{brushStreamProps:qt}=m({brush:ke,onBrush:we,linkedBrush:Se,xAccessor:ct,yAccessor:Dt,defaultDimension:"x"}),{flattenedData:Vt,segmentGroupAccessor:Zt}=E(()=>{if(!(bt||At||kt))return{flattenedData:dt,segmentGroupAccessor:void 0};let e=wt?new WeakMap:void 0;return{flattenedData:St.flatMap(t=>{let o=t[F]||[],r=At&&"string"==typeof At?o.map(e=>({...e,[At]:e[At]??t[At]})):o,a=wt?.keyOf.get(t);if(e&&void 0!==a)for(let t of r)e.set(t,a);return r}),segmentGroupAccessor:e?t=>e.get(t)??"":void 0}},[St,F,bt,At,dt,kt,wt]),eo=E(()=>function(e,t){return t?(o,r)=>e(o,void 0===r?r:t.seriesOf.get(r)??r):e}(Et,wt),[Et,wt]),to=v(le),oo={chartType:Qt,...Array.isArray(ie)&&{areaGroups:te(ie,wt)},...to&&{lineGradient:to},...null!=s&&{data:Vt},xAccessor:ct,yAccessor:Dt,xScaleType:He,yScaleType:Me,...ge&&{xExtent:ge},...!ve||null==ve[0]&&null==ve[1]?gt?{yExtent:gt}:{}:{yExtent:ve},groupAccessor:Zt??(At||void 0),...he&&{band:he},curve:U,lineStyle:eo,...re&&{pointStyle:Kt},size:[Ue,Xe],responsiveWidth:t.responsiveWidth,responsiveHeight:t.responsiveHeight,...void 0!==t.maxDevicePixelRatio&&{maxDevicePixelRatio:t.maxDevicePixelRatio},margin:Xt,showAxes:a.showAxes,xLabel:et,yLabel:tt,xFormat:h,yFormat:g,...void 0!==b&&{axisExtent:b},...void 0!==t.autoPlaceAnnotations&&{autoPlaceAnnotations:t.autoPlaceAnnotations},enableHover:ze,showGrid:Je,...Rt.legendBehaviorProps,...$e&&{title:$e},...qe&&{description:qe},...Ve&&{summary:Ve},...void 0!==Ze&&{accessibleTable:Ze},...d&&{className:d},...null!=t.animate&&{animate:t.animate},...oe(j({tooltip:ce,defaultTooltipContent:Jt,multiDefaultContent:P({xFormat:h,yFormat:g})}),wt),...k({linkedHover:xe,selection:Ae,onObservation:De,onClick:Be,hoverRadius:Ce,hoverHighlight:Le,mobileInteraction:Rt.mobileInteraction,customHoverBehavior:_t,customClickBehavior:Ft}),...ue&&{pointIdAccessor:ue},...(fe?.length||it.length||Ut.length)&&{annotations:[...fe||[],...it,...Ut]},...Ht,...qt,...Ke};return Rt.earlyReturn?Rt.earlyReturn:$t?J(_,{componentName:"LineChart",message:$t,width:Ue,height:Xe}):J(p,{ref:r,...oo})}),"LineChart");export{$ as a,Z as b,Y as c,q as d,ee as e,s as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function i({remaining:i,kind:e="row",onClick:o}){return i<=0?null:t("button",{type:"button",className:"semiotic-accessible-data-table-show-more",onClick:o,style:n,children:["Show ",Math.min(25,i)," more ",e,1===i?"":"s"," (",i," remaining)"]})}import{q as n}from"./c-
|
|
1
|
+
function i({remaining:i,kind:e="row",onClick:o}){return i<=0?null:t("button",{type:"button",className:"semiotic-accessible-data-table-show-more",onClick:o,style:n,children:["Show ",Math.min(25,i)," more ",e,1===i?"":"s"," (",i," remaining)"]})}import{q as n}from"./c-HN5U72U7.min.js";import{jsxs as t}from"react/jsx-runtime";export{i as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./c-RI7UJTEY.min.js";import{
|
|
1
|
+
import{a as e}from"./c-RI7UJTEY.min.js";import{bL as t,bQ as i}from"./c-62UTMRQE.min.js";function r(e){return{...e,bySource:Object.fromEntries(Object.entries(e.bySource).map(([e,t])=>[e,{...t}]))}}var a=class{constructor(e,t={},i=[]){if(this.windowSize=e,this.policy=t,this.windows=new Map,this.openWindows=new Set,this.sources=new Map,this.latest=-1/0,this.frontier=-1/0,this.value=-1/0,this.pending=[],!Number.isFinite(e)||e<=0)throw new RangeError("EventDrop windows.size must be a finite positive number");for(let e of i)this.sources.set(e,{latest:-1/0,arrival:-1/0,idle:!1});this.validatePolicy(t)}validatePolicy(e){if("function"!=typeof e){for(let t of["delay","idleTimeout","allowedLateness"]){let i=e[t];if(null!=i&&(!Number.isFinite(i)||i<0))throw new RangeError(`watermark.${t} must be finite and nonnegative`)}if(null!=e.value&&!Number.isFinite(e.value))throw new RangeError("watermark.value must be finite")}}setWatermark(e){this.validatePolicy(e),this.policy=e}getWatermark(){return this.value}getLatestEventTime(){return this.latest}getArrivalFrontier(){return this.frontier}getLedger(){return Array.from(this.windows.values(),r).sort((e,t)=>e.start-t.start)}drainEvents(){let e=this.pending;return this.pending=[],e}snapshot(){return this.state(this.getLedger())}drainDelta(){let e=Array.from(this.changedWindows??[],e=>r(this.windows.get(e)));return this.changedWindows=new Set,this.state(e)}state(e){return{windows:e,sources:Array.from(this.sources,([e,t])=>[e,{...t}]),latest:this.latest,frontier:this.frontier,value:this.value,heldBy:this.heldBy}}restore(e){this.applySnapshot(e,!0)}applyDelta(e){this.applySnapshot(e,!1)}applySnapshot(e,t){let i=e=>Number.isFinite(e)||e===-1/0,a=e=>Number.isSafeInteger(e)&&e>=0;if(![e.latest,e.frontier,e.value].every(i)||new Set(e.windows.map(e=>e.windowId)).size!==e.windows.length||new Set(e.sources.map(([e])=>e)).size!==e.sources.length||e.sources.some(([,e])=>!i(e.latest)||!i(e.arrival))||e.windows.some(e=>!Number.isFinite(e.start)||!Number.isFinite(e.end)||e.end<=e.start||!a(e.accepted)||!a(e.late)||Object.values(e.bySource).some(e=>!a(e.accepted)||!a(e.late))||Object.values(e.bySource).reduce((e,t)=>e+t.accepted,0)!==e.accepted||Object.values(e.bySource).reduce((e,t)=>e+t.late,0)!==e.late))throw new RangeError("Invalid EventDrop ledger snapshot");t&&(this.windows.clear(),this.openWindows.clear());for(let t of e.windows){let e=this.windows.get(t.windowId);e&&this.openWindows.delete(e);let i=r(t);Object.setPrototypeOf(i.bySource,null),this.windows.set(t.windowId,i),i.open&&this.openWindows.add(i)}this.changedWindows?.clear(),this.sources=new Map(e.sources.map(([e,t])=>[e,{...t}])),this.latest=e.latest,this.frontier=e.frontier,this.value=e.value,this.heldBy=e.heldBy,this.pending=[]}advance(e,t="external"){if(!Number.isFinite(e))return;this.frontier=Math.max(this.frontier,e);let i,r=this.policy;if("function"==typeof r)i=r(this.latest);else if(r.external)i=r.external();else if(null!=r.value)i=r.value;else{let t=this.latest;if(r.perSource){let i;t=1/0;for(let[a,n]of this.sources){Number.isFinite(n.arrival)||(n.arrival=e);let s=null!=r.idleTimeout&&e-n.arrival>=r.idleTimeout;s&&!n.idle&&this.pending.push({type:"physics-source-idle",sourceId:a}),n.idle=s,!s&&n.latest<t&&(t=n.latest,i=a)}i&&i!==this.heldBy&&t<this.latest&&this.pending.push({type:"physics-watermark-held",sourceId:i}),this.heldBy=i,t===1/0&&(t=this.latest)}i=t-(r.delay??this.windowSize)}if(!Number.isFinite(i)||i<=this.value)return;let a=this.value;this.value=i,this.pending.push({type:"physics-watermark-advance",from:a,to:i,cause:t});for(let t of this.openWindows)t.end<=this.value&&this.close(t,e)}close(e,t){this.changedWindows?.add(e.windowId),e.open=!1,e.closedAt=t,e.watermarkAtClose=this.value,this.openWindows.delete(e),this.pending.push({type:"physics-window-close",...r(e),watermark:this.value})}append(e){var t;let{eventTime:i,arrivalTime:a,source:n=""}=e;if(!Number.isFinite(i)||!Number.isFinite(a))throw new RangeError("Event and arrival times must be finite");if(a<this.frontier)throw new RangeError("Incremental admissions require nondecreasing arrival times");this.latest=Math.max(this.latest,i);let s=this.sources.get(n);this.sources.set(n,{latest:Math.max(s?.latest??-1/0,i),arrival:a,idle:!1}),this.advance(a,"arrival");let l=Math.floor(i/this.windowSize)*this.windowSize,o=l+this.windowSize,u=`${l}-${o}`,h=this.windows.get(u);h||(h={windowId:u,start:l,end:o,accepted:0,late:0,bySource:Object.create(null),open:!0},this.windows.set(u,h),this.openWindows.add(h),this.pending.push({type:"physics-window-open",windowId:u,start:l,end:o}));let d=e.watermarkAtArrival??this.value,c=o+("function"==typeof this.policy?0:this.policy.allowedLateness??0)<=d,p=(t=h.bySource)[n]??(t[n]={accepted:0,late:0}),m=c?"late":"accepted";return h[m]++,this.changedWindows?.add(u),p[m]++,!h.open&&!c&&this.pending.push({type:"physics-window-update",windowId:u,accepted:h.accepted,late:h.late,bySource:r(h).bySource,watermark:this.value,retractions:1}),h.open&&o<=this.value&&this.close(h,a),{windowId:u,start:l,end:o,late:c,watermarkAtArrival:d}}};function n(e){let[t,i]=e,r=t<160||i<116,a=r?Math.min(12,Math.max(2,.08*t)):32,n=r?Math.min(8,Math.max(2,.12*i)):24,s=r?n:34;return{width:t,height:i,plot:{x:a,y:n,width:Math.max(1,t-2*a),height:Math.max(1,i-n-s)}}}function s(e){let t=String(e??"");if(!t)return"#4e79a7";let i=["#4e79a7","#59a14f","#e15759","#f28e2b","#76b7b2","#edc948","#b07aa1","#ff9da7"],r=0;for(let e=0;e<t.length;e+=1)r=31*r+t.charCodeAt(e)>>>0;return i[r%i.length]}function l(e,t){return t?(i,r)=>({..."function"==typeof e?e(i,r):e,..."function"==typeof t?t(i,r):t}):e}function o(e,r="#4e79a7",a){let n=a?.styleRules,l=!!n&&n.length>0,o=l?t(a?.valueAccessor):void 0;return t=>{let a=t.datum,u=a&&e?"function"==typeof e?e(a,0):a[e]:void 0,h={fill:null==u?r:s(u),stroke:"#111827",strokeWidth:1,opacity:.9};return l&&a&&Object.assign(h,i(a,n,{value:o?o(a):void 0,category:null==u?void 0:String(u)})),h}}function u(e,t,i,r){return{fixedDt:1/120,maxSubsteps:8,colliders:t,observation:{chartType:i},kernel:{seed:e,gravity:{x:0,y:760},cellSize:36,collisionIterations:6,velocityDamping:.995,restitution:.08,friction:.4,sleepSpeed:8,sleepAfter:.6,...r}}}function h(e,t,i){if(!e.length)return[];let r=n(t),a=r.plot.width/Math.max(1,e.length),s=e.reduce((e,t)=>Math.max(e,t.value),1),l=.62*r.plot.height,o=r.plot.y+r.plot.height;return e.map((e,t)=>{let n=Math.max(8,e.value/s*l),u=r.plot.x+(t+.5)*a,h=o-n/2,d=null==e.secondary?"":`, ${e.secondary} secondary`,c=`${i} ${e.label}: ${e.value}${d}`;return{id:`${i}-${e.label}`,label:c,description:c,datum:e,x:u,y:h,shape:"rect",width:Math.max(12,.58*a),height:n,group:i}})}function d(e,t,i){return"function"==typeof i?i(e,t):e[i]}function c(e){if(e instanceof Date){let t=e.getTime();return Number.isFinite(t)?t:null}let t="number"==typeof e?e:"string"==typeof e&&e.trim()?Number(e):NaN;return Number.isFinite(t)?t:null}function p(e,t,i){return Math.max(t,Math.min(i,e))}function m(e,t){let i=c(e);return null!=i&&i>0?i:t}function w(e){if(!e)return;let t=c(e[0]),i=c(e[1]);return null!=t&&null!=i?t<=i?[t,i]:[i,t]:void 0}function f(e){return String(e??"unknown").trim().replace(/[^A-Za-z0-9_-]+/g,"_")||"unknown"}function v(e,t,i=0){let r=new Set(e.filter(e=>null!=e.id).map(e=>String(e.id))),a=new Map;for(let n of e){let e=null==n.id?`${t}-${i++}`:String(n.id);for(;null==n.id&&r.has(e);)e=`${t}-${i++}`;r.add(e),a.set(e,null==n.id?{...n,id:e}:n)}return{seed:e,rows:Array.from(a.values()),nextId:i}}function g(t={}){let i=(t.categories?.length?t.categories:["Intake","Review","Build","Ship"]).map(e=>String(e).trim()).filter(Boolean),r=i.length?i:["Intake"],a=Math.max(r.length,Math.round(t.count??Math.max(48,12*r.length))),n=m(t.unitValue,1),s=e(t.seed??1),l=t.idPrefix??"mechanical-pile",o=r.map(()=>.65+.9*s()),u=o.reduce((e,t)=>e+t,0)||1,h=a-r.length,d=o.map(e=>e/u*h),c=d.map(e=>1+Math.floor(e)),p=a-c.reduce((e,t)=>e+t,0),w=d.map((e,t)=>({index:t,fraction:e-Math.floor(e)})).sort((e,t)=>t.fraction-e.fraction);for(let e=0;p>0;e=(e+1)%w.length)c[w[e].index]+=1,p-=1;return r.map((e,t)=>({id:`${l}-${t}`,category:e,value:c[t]*n,mechanical:!0,unitCount:c[t],unitValue:n,share:c[t]/a}))}function y(e,t){let i=e/t,r=Math.round(i);return Math.ceil(r>0&&Math.abs(i-r)<=Number.EPSILON*i*4?r:i)}function b(t){let i=Math.max(2,Math.round(t.bins)),r=Math.max(1,Math.round(t.pegRows??i-1)),a=Math.max(1,Math.round(t.count??Math.max(64,4*i))),n=p(Number.isFinite(t.branchProbability)?t.branchProbability??.5:.5,0,1),s=e(t.seed??1),l=t.idPrefix??"mechanical";return Array.from({length:a},(e,t)=>{let i=0;for(let e=0;e<r;e+=1)s()<n&&(i+=1);let a=r/2;return{id:`${l}-${t}`,value:i,mechanical:!0,pegRows:r,branchProbability:n,pathRights:i,side:i<a?"left":i>a?"right":"center"}})}function x(e){let{windowSize:t,watermark:i,watermarkAtArrivalAccessor:r}=e;if(!(Number.isFinite(t)&&t>0))throw new RangeError("EventDrop windows.size must be a finite positive number");let{rows:n}=v(e.data,"event"),s=n.flatMap((t,i)=>{let r=c(d(t,i,e.timeAccessor));return null==r?[]:[{datum:t,index:i,eventTime:r,arrivalTime:c(d(t,i,e.arrivalAccessor))??r,watermarkAtArrival:0,late:!1}]}),l="function"==typeof i?null:c(i?.value),o="function"==typeof i?t:c(i?.delay)??t,u=new a(t,i,e.sourceIds);for(let t of s.slice().sort((e,t)=>e.arrivalTime-t.arrivalTime||e.index-t.index)){let i=r?c(d(t.datum,t.index,r)):null,a=u.append({eventTime:t.eventTime,arrivalTime:t.arrivalTime,source:String(d(t.datum,t.index,e.sourceAccessor??"source")??""),watermarkAtArrival:i??void 0});t.watermarkAtArrival=a.watermarkAtArrival,t.late=a.late}return{events:s,watermarkValue:s.length?u.getWatermark():l??-o,ledger:u.getLedger(),lifecycleEvents:u.drainEvents()}}export{n as a,l as b,o as c,u as d,h as e,d as f,c as g,p as h,m as i,w as j,f as k,v as l,g as m,y as n,b as o,a as p,x as q};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as registerBuiltInXYPlugins}from"./c-XPNBS3W2.min.js";import"./c-ZVL7ULNH.min.js";import"./c-5NAU4JAY.min.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t=class{constructor(){this._min=1/0,this._max=-1/0,this._dirty=!1}push(t){Number.isFinite(t)&&(t<this._min&&(this._min=t),t>this._max&&(this._max=t))}evict(t){(t===this._min||t===this._max)&&(this._dirty=!0)}recalculate(t,i){this._min=1/0,this._max=-1/0;for(let s of t){let t=i?i(s):s;Number.isFinite(t)&&(t<this._min&&(this._min=t),t>this._max&&(this._max=t))}this._dirty=!1}clear(){this._min=1/0,this._max=-1/0,this._dirty=!1}get extent(){return[this._min,this._max]}get min(){return this._min}get max(){return this._max}get dirty(){return this._dirty}};export{t as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,t={}){let r=!0===t.showRetractedAnnotations,n=!0===t.showSupersededAnnotations,a=new Set;for(let t of e){let e=t?.lifecycle?.supersedes;e&&"retracted"!==t?.lifecycle?.status&&a.add(e)}return e.filter(e=>{if("retracted"===e?.lifecycle?.status&&!r)return!1;let t=e?.provenance?.stableId;return!(t&&a.has(t)&&!n)})}function t(e){return"string"==typeof e?e:"value"}function r(e){return null==e?"–":"number"==typeof e?le(e):e instanceof Date?oe(e):String(e)}function n(e,t){if(!t)return r(e);try{return t(e)??r(e)}catch{return r(e)}}function a(e,t){return"function"==typeof t?t(e):e[t]}function l(e,t){if(!e)return[];let r=Array.isArray(e)?e:[e],n=[];return r.forEach((e,r)=>{let a="string"==typeof e?.y0Accessor?e.y0Accessor:"low",l="string"==typeof e?.y1Accessor?e.y1Accessor:"high";n.push({label:a,accessor:e=>e.bands?.[r]?.y0??(0===r?e.band?.y0:void 0),format:t}),n.push({label:l,accessor:e=>e.bands?.[r]?.y1??(0===r?e.band?.y1:void 0),format:t})}),n}function o(e){let t=e.find(e=>"title"===e.role),r=e.filter(e=>"title"!==e.role);return e=>{let l=e.data;if(!l)return null;let o=t?n(a(l,t.accessor),t.format):null;return ve("div",{className:"semiotic-tooltip",style:ge,children:[null!=o&&xe("div",{style:{fontWeight:"bold",marginBottom:r.length>0?4:0},children:o}),r.map((e,t)=>{let r=n("y"===e.role&&null!=l.__aggregateValue?l.__aggregateValue:a(l,e.accessor),e.format);return ve("div",{style:t>0?{marginTop:2}:void 0,children:[ve("span",{style:{opacity:.7},children:[e.label,": "]}),xe("span",{children:r})]},t)})]})}}function i({categoryAccessor:e,valueAccessor:l,groupAccessor:o,groupLabel:i,pieData:u=!1,valueFormat:s}){return c=>{let d=u?c.data?.[0]||c.data||c:c.data||c,f=a(d,e),h=a(d,l),p=o?a(d,o):void 0;return ve("div",{className:"semiotic-tooltip",style:ge,children:[xe("div",{style:{fontWeight:"bold"},children:r(f)}),xe("div",{style:{marginTop:4},children:n(h,s)}),null!=p&&ve("div",{style:{marginTop:2,opacity:.8},children:[i||t(o),": ",r(p)]})]})}}function u(...e){let t=e.filter(e=>null!=e);return 0===t.length?null:1===t.length?t[0]:we.createElement(we.Fragment,null,...t)}function s(e,t,r,n){be(()=>{e.current?.updateConfig(t),r.current=!0,n()},[t,n,e,r])}function c(e,t,r,n){let a=ke(null);be(()=>{let l=e.current;if(!l)return;let o=t??null;a.current!==o&&(a.current=o,l.setLayoutSelection(o),l.hasCustomRestyle?l.restyleScene(o):r.current=!0,n())},[t,n,e,r])}function d(e,t){let r=e?.state??(e?.settling?"settling":void 0);if("live"===r)return Ae;if("stopped"===r||"failed"===r||"stale"===r)return{alpha:e?.dimOpacity??.5,band:"stale",isStale:!0};if("settling"===r)return{alpha:.85,band:"aging",isStale:!1};if(!(e&&t>0))return Ae;let n=null!=e.threshold&&e.threshold>0?e.threshold:5e3,a=e.graded;if(a){let e="object"==typeof a?a:{},r=ie(t,n,e.thresholds);return{alpha:{...Se,...e.opacities??{}}[r],band:r,isStale:"fresh"!==r}}return t>n?{alpha:e.dimOpacity??.5,band:"stale",isStale:!0}:Ae}function f(e,t,r,n,a,l){let o=ke("fresh");be(()=>{if(!e)return o.current="fresh",void(a&&l(!1));let i=setInterval(()=>{let i=t.current;if(!i)return;let u=d(e,i.activity.elapsed());(u.band!==o.current||u.isStale!==a)&&(o.current=u.band,u.isStale!==a&&l(u.isStale),r.current=!0,n())},1e3);return()=>clearInterval(i)},[e,a,n,t,l,r])}function h({isStale:e,position:t,state:r,settling:n}){let a=function(e,t,r){return t||(r?"settling":e?"stale":"live")}(e,r,n),{colors:l}=ye(),o={live:l.success,stale:l.danger,stopped:l.textSecondary,failed:l.error,settling:l.warning}[a]??Me[a],i=(me(o,"#ffffff")??0)>=4.5?"#ffffff":"#000000",u=Object.hasOwn(Me,a)?a.toUpperCase():"LIVE";return xe("div",{className:"stream-staleness-badge",role:"status","aria-live":"polite","aria-atomic":"true",style:{position:"absolute",..."top-left"===t?{top:4,left:4}:"bottom-left"===t?{bottom:4,left:4}:"bottom-right"===t?{bottom:4,right:4}:{top:4,right:4},padding:"2px 8px",borderRadius:4,fontSize:11,fontWeight:600,pointerEvents:"none",zIndex:3,background:o,color:i},children:u})}function p(e){let{background:t,hasBackgroundGraphics:r=!1,themeBackground:n=""}=e;return"transparent"===t?null:r?t||null:t||(n&&"transparent"!==n?n:"")||null}function g(e,t){let{background:r,hasBackgroundGraphics:n=!1,themeBackground:a="",x:l=0,y:o=0,width:i,height:u}=t,s=function(e){let{background:t,hasBackgroundGraphics:r=!1,themeBackground:n=""}=e;return"transparent"===t||r?null:t||(n&&"transparent"!==n?n:"")||null}({background:r,hasBackgroundGraphics:n,themeBackground:a});if(!s)return!1;let c=he(e,s);return!(!c||"transparent"===c.trim().toLowerCase()||(e.fillStyle=c,e.fillRect(l,o,i,u),0))}function y(e,t,r,n){return"function"==typeof e?e({size:t,margin:r,scales:n}):e}function m({foregroundGraphics:e,backgroundGraphics:t,size:r,margin:n,scales:a,background:l,themeBackgroundColor:o,resolveScaleAwareGraphics:i=!0}){let u=`var(--semiotic-bg, ${o})`;return{resolvedForeground:i||"function"!=typeof e?y(e,r,n,a):null,resolvedBackground:i||"function"!=typeof t?y(t,r,n,a):null,themeBackground:u,surfaceBackground:p({background:l,hasBackgroundGraphics:!!t,themeBackground:u})}}function v(e,t){if(!t)return[];let r=new Set,n=[];for(let a of e){if(!a||"object"!=typeof a)continue;let e="function"==typeof t?t(a):a[t],l=String(e);r.has(l)||(r.add(l),n.push(l))}return n}function x(e,t,r,n){let a=ke({accessor:t,onChange:r,readData:n}),l=ke([]);a.current={accessor:t,onChange:r,readData:n};let o=Ie(()=>{let{accessor:t,onChange:r,readData:n}=a.current;if(!r||!t)return;let o=v(e.current?n(e.current):[],t);(function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0})(o,l.current)||(l.current=o,r(o))},[e]);return be(()=>{l.current=[],o()},[t,o,r]),o}function w(e,t){let r="function"==typeof e?e(t.datum??null,t):e;return function(e){if(!e||"object"!=typeof e)return!1;let t=e;return"string"==typeof t.id&&"function"==typeof t.cacheKey&&"function"==typeof t.drawCanvas&&"function"==typeof t.renderStaticSVG}(r)?r:void 0}function b(e,t){if("production"===process.env.NODE_ENV)return;let r=`${e}:${t}`;Ee.has(r)||(Ee.add(r),console.warn(`[Semiotic] Render backend "${e}" does not support scene node "${t}"; using the built-in renderer.`))}function k(e){let{context:t,nodes:r,renderMode:n,pixelRatio:a,paintBuiltIn:l}=e;if(!n||"sketchy"===n)return void l(r);let o=[],i=()=>{o.length&&(l(o),o=[])};for(let e of r){let r,u=w(n,e);if(u){i(),t.save();try{r=u.drawCanvas({context:t,node:e,style:e.style??{},pixelRatio:a})}finally{t.restore()}r||(b(u.id,e.type??"unknown"),l([e]))}else o.push(e)}i()}function I(e){let{node:t,index:r,renderMode:n,fallback:a}=e,l=w(n,t);if(!l)return{element:a(),renderedByBackend:!1};let o=l.renderStaticSVG({node:t,style:t.style??{},key:`${l.id}-${r}`});return null!=o?{element:ue(o,t,`${l.id}-${r}-cursor`),renderedByBackend:!0}:(b(l.id,t.type??"unknown"),{element:a(),renderedByBackend:!1})}function S(e){return I(e).element}function A(e){let t=[];return e.nodes.forEach((r,n)=>{let a=I({node:r,index:n,renderMode:e.renderMode,fallback:()=>e.fallback(r,n)});null!==a.element&&void 0!==a.element&&!1!==a.element&&t.push({node:r,index:n,...a})}),t}function M(e,t,r,n,a,l){return function(e,t,r){let n=e.current;n.inside=!0,n.clientX=t.clientX,n.clientY=t.clientY,n.pointerType=t.pointerType??r}(e,t,l),!(!r&&!n||!r&&"touch"===e.current.pointerType&&(se(a),1))}function E(e){let{title:t,description:r,summary:n,accessibleTable:a,className:l,animate:o,maxDevicePixelRatio:i,axisExtent:u,autoPlaceAnnotations:s}=e,c={};return t&&(c.title=t),r&&(c.description=r),n&&(c.summary=n),void 0!==a&&(c.accessibleTable=a),l&&(c.className=l),null!=o&&(c.animate=o),void 0!==i&&(c.maxDevicePixelRatio=i),void 0!==u&&(c.axisExtent=u),void 0!==s&&(c.autoPlaceAnnotations=s),c}function R(e){let{linkedHover:t,selection:r,onObservation:n,onClick:a,hoverRadius:l,hoverHighlight:o,forceHoverBehavior:i,forceClickBehavior:u,mobileInteraction:s,customHoverBehavior:c,customClickBehavior:d,linkedHoverInClickPredicate:f=!0}=e,h={};n&&(h.annotationObservationCallback=n);let p=s?.enabled?Math.max(l??30,Math.ceil((s.targetSize||44)/2),24):l;(i||t||n||a||o)&&(h.customHoverBehavior=c);let g=f?n||a||t:n||a,y=s?.enabled&&(s.tapToSelect||s.tapToLockTooltip)&&(t||o||r);return d&&(u||g||y)&&(h.customClickBehavior=d),null!=p&&(h.hoverRadius=p),h}function P(e){let{tooltip:t,defaultTooltipContent:r}=e;return{tooltipContent:!1===t?()=>null:ce(t)||r}}function D(e,t){if(!function(e){return void 0!==e.stroke||void 0!==e.strokeWidth||void 0!==e.opacity}(t))return e??((...e)=>({}));let r={};return void 0!==t.stroke&&(r.stroke=t.stroke),void 0!==t.strokeWidth&&(r.strokeWidth=t.strokeWidth),void 0!==t.opacity&&(r.opacity=t.opacity),e?(...t)=>({...e(...t)||{},...r}):(...e)=>({...r})}function B(e,t,r){if(r<=1)return 1;let n=r-1;return de({age:n-t,extent:n,type:e.type,halfLife:e.halfLife??r/2,threshold:e.stepThreshold??.5*r,minOpacity:e.minOpacity??.1})}function _(e){let t=new Map;for(let r=0;r<e.length;r++)t.set(e[r],r);return t}function C(e,t,r,n=_(r)){let a=r.length;if(!(a<=1))for(let r of t){if("line"===r.type){let t=Array.isArray(r.datum)?r.datum:[];if(t.length<2)continue;let l=new Array(t.length),o=!1;for(let r=0;r<t.length;r++){let i=n.get(t[r]);null!=i?(l[r]=B(e,i,a),l[r]<1&&(o=!0)):l[r]=1}o&&(r._decayOpacities=l);continue}if("area"===r.type){let t=Array.isArray(r.datum)?r.datum:[],l=r.topPath?r.topPath.length:t.length;if(l<2)continue;if(t.length===l){let o=new Array(l),i=!1;for(let r=0;r<t.length;r++){let l=n.get(t[r]);null!=l?(o[r]=B(e,l,a),o[r]<1&&(i=!0)):o[r]=1}i&&(r._decayOpacities=o)}else{let o=1;for(let r of t){let t=n.get(r);if(null!=t){let r=B(e,t,a);r<o&&(o=r)}}if(o<1){let e=new Array(l);e.fill(o),r._decayOpacities=e}}continue}let t=n.get(r.datum);if(null==t)continue;let l=B(e,t,a);if("candlestick"===r.type)r._decayOpacity=l;else{let e=r.style?.opacity??1;r.style={...r.style,opacity:e*l}}}}function T(e){if("production"===process.env.NODE_ENV)return;let{label:t,nodes:r,overlays:n,warned:a}=e;L(n)&&0===r.length&&O(a,"overlay-only",`[semiotic] ${t} returned overlays but no data-bearing scene nodes. Overlays do not participate in hover, selection, transitions, SSR evidence, or accessibility tables. Emit at least one scene node with a datum, or mark the overlay-only chart as intentionally decorative.`),r.length>0&&r.every(e=>null==e.datum)&&O(a,"null-datums",`[semiotic] ${t} returned scene nodes, but every scene-node datum is null. Hover, callbacks, selection, and tooltip helpers need data-bearing nodes. Attach a user-facing datum to each interactive node, or set interactive overlays outside the chart.`)}function L(e){return null!=e&&!1!==e&&""!==e&&(!Array.isArray(e)||e.some(L))}function O(e,t,r){e.has(t)||(e.add(t),console.warn(r))}function $(e){try{return{kind:"success",result:e.run()}}catch(t){let r=e.hasPreviousResult,n=function(e,t,r,n){let a=function(e){if(e instanceof Error)return{name:e.name||"Error",message:e.message||"Custom layout threw."};if("string"==typeof e)return{name:"Error",message:e};if(null==e)return{name:"Error",message:"Custom layout threw a nullish value."};try{return{name:"Error",message:String(e)}}catch{return{name:"Error",message:"Custom layout threw a non-stringifiable value."}}}(t),l="network"===e?"customNetworkLayout":"customLayout";return{code:"CUSTOM_LAYOUT_ERROR",severity:"error",phase:"layout",component:e,source:l,message:`Semiotic ${e} ${l} failed: ${a.message}`,error:a,recovery:r?"preserved-last-good-scene":"empty-scene",preservedLastGoodScene:r,affectedRevision:n}}(e.family,t,r,e.revision);"production"!==process.env.NODE_ENV&&console.error(`[semiotic] ${e.logLabel} threw:`,t);try{e.onLayoutError?.(n)}catch(e){"production"!==process.env.NODE_ENV&&console.error("[semiotic] onLayoutError threw:",e)}return{kind:"failure",diagnostic:n,preservedLastGoodScene:r}}}function G(e,t,r,n,a,l){let o=a-r,i=l-n,u=o*o+i*i;if(0===u)return Math.sqrt((e-r)**2+(t-n)**2);let s=((e-r)*o+(t-n)*i)/u;s=Math.max(0,Math.min(1,s));let c=r+s*o,d=n+s*i;return Math.sqrt((e-c)**2+(t-d)**2)}function H(e,t,r){return e>=r.x&&e<=r.x+r.w&&t>=r.y&&t<=r.y+r.h?{hit:!0,cx:r.x+r.w/2,cy:r.y+r.h/2}:{hit:!1,cx:0,cy:0}}function N(e,t=30,r=1){return Math.max((e??4)+5/r,12/r,t)}function U(e){return e instanceof Date?e:"number"==typeof e&&e>1e9?new Date(e):null}function j(e,t){let r=U(e);if(!r)return!1;let n=U(t);return!n||r.getFullYear()!==n.getFullYear()||r.getMonth()!==n.getMonth()}function z(e){let t=e%(2*Math.PI);return t<0&&(t+=2*Math.PI),t}function V(e,t,r){if(Math.abs(r-t)>=2*Math.PI-1e-6)return!0;let n=z(t),a=z(r),l=z(e);return n<=a?l>=n&&l<=a:l>=n||l<=a}function W(e,t,r,n,a,l=e=>e.x,o=e=>e.y,i=e=>e.r,u,s=1){let c=N(a,n,s),d=t-c,f=t+c,h=r-c,p=r+c,g=null,y=1/0;return e.visit((e,a,c,m,v)=>{if(a>f||m<d||c>p||v<h)return!0;let x=e;if(!x.length){let e=x;do{let a=e.data,c=l(a)-t,d=o(a)-r,f=Math.sqrt(c*c+d*d);f<=N(i(a),n,s)&&(null===g||(u?u(a,g,f,y):f<y))&&(g=a,y=f),e=e.next}while(e)}return!1}),g?{node:g,distance:y}:null}function F(e,t){return"string"==typeof e&&e.length>0?e:t}function K(e,t,r){return"string"==typeof t&&t.length>0?t:"string"==typeof e&&e.length>0?`${e} (${r.familyPhrase})`:r.fallback}function Y(e){let t=String(e).replace(/[^a-zA-Z0-9_-]/g,"_"),r=/^[A-Za-z_]/.test(t)?t:`c${t}`,n=`${r}-semiotic-title`,a=`${r}-semiotic-desc`;return{titleId:n,descId:a,labelledBy:`${n} ${a}`}}function q(e,t=!1){let r=(e,t)=>e.x-t.x||e.y-t.y,n=new Map;for(let t of e){let e=t.group??"_default",r=n.get(e);r||(r=[],n.set(e,r)),r.push(t)}for(let e of n.values()){t||e.sort(r);for(let t=0;t<e.length;t++)e[t]._groupIndex=t}let a=Array.from(n.keys());t||a.sort((e,t)=>n.get(e)[0].y-n.get(t)[0].y);let l=t?e:Array.from(n.values()).flat().sort(r),o=new Map;for(let e=0;e<l.length;e++){l[e]._flatIndex=e;let t=l[e].navId??l[e].datum?.id;null!=t&&o.set(String(t),e);let r=l[e].datum?.id;null!=r&&!o.has(String(r))&&o.set(String(r),e)}return{flat:l,groups:a,byGroup:n,idToIdx:o}}function J(e,t){if(0===e.flat.length)return{flatIndex:-1,group:"_default",indexInGroup:-1};let r=Math.max(0,Math.min(t,e.flat.length-1)),n=e.flat[r];return{flatIndex:r,group:n.group??"_default",indexInGroup:n._groupIndex??0}}function Q(e,t,r){let{group:n,indexInGroup:a}=t,l=r.byGroup.get(n);switch(e){case"ArrowRight":return a<l.length-1?l[a+1]._flatIndex:t.flatIndex;case"ArrowLeft":return a>0?l[a-1]._flatIndex:t.flatIndex;case"ArrowDown":{let e=r.groups.indexOf(n);return e<r.groups.length-1?X(r,r.groups[e+1],l[a]):t.flatIndex}case"ArrowUp":{let e=r.groups.indexOf(n);return e>0?X(r,r.groups[e-1],l[a]):t.flatIndex}case"PageDown":{let e=Math.max(1,Math.floor(.1*r.flat.length));return Math.min(t.flatIndex+e,r.flat.length-1)}case"PageUp":{let e=Math.max(1,Math.floor(.1*r.flat.length));return Math.max(t.flatIndex-e,0)}case"Home":return 0;case"End":return r.flat.length-1;case"Escape":return-1;default:return null}}function X(e,t,r){let n=e.byGroup.get(t),a=0,l=Math.abs(n[0].x-r.x);for(let e=1;e<n.length;e++){let t=Math.abs(n[e].x-r.x);t<l&&(l=t,a=e)}return n[a]._flatIndex}function Z(e,t,r){switch(e){case"ArrowRight":case"ArrowDown":return t<r-1?t+1:t;case"ArrowLeft":case"ArrowUp":return t>0?t-1:t;case"PageDown":{let e=Math.max(1,Math.floor(.1*r));return Math.min(t+e,r-1)}case"PageUp":{let e=Math.max(1,Math.floor(.1*r));return Math.max(t-e,0)}case"Home":return 0;case"End":return r-1;case"Escape":return-1;default:return null}}function ee(e,t,r,n){let a="right"===r||"left"===r,l="right"===r||"down"===r?1:-1,o=null,i=1/0;for(let r=0;r<(n?.length??e.flat.length);r++){let u=n?n[r]:r,s=e.flat[u],c=s.x-t.x,d=s.y-t.y,f=(a?c:d)*l,h=a?d:c,p=c*c+d*d;f>0&&f>=Math.abs(h)&&p<i&&(o=u,i=p)}return o}function te(e){let t=[];for(let r of e){if(!r.datum)continue;let e=t.length;if("circle"===r.type&&null!=r.cx){if(r.r<=0)continue;t.push({x:r.cx,y:r.cy,datum:r.datum,shape:"circle",group:r.datum.id??"_default"})}else if("rect"===r.type&&null!=r.x){if(r.w<=0||r.h<=0)continue;t.push({x:r.x+r.w/2,y:r.y+r.h/2,datum:r.datum,shape:"rect",w:r.w,h:r.h,group:r.datum.id??"_default"})}else if("arc"===r.type&&null!=r.cx)t.push({x:r.cx,y:r.cy,datum:r.datum,shape:"circle",group:r.datum.id??"_default"});else if("symbol"===r.type&&null!=r.cx){if(r.size<=0)continue;t.push({x:r.cx,y:r.cy,datum:r.datum,shape:"circle",group:r.datum.id??"_default"})}else if("glyph"===r.type&&null!=r.cx){if(r.size<=0)continue;let e=pe(r.glyph,r.size);t.push({x:r.cx+e.centerDx,y:r.cy+e.centerDy,datum:r.datum,shape:"rect",w:2*e.halfWidth,h:2*e.halfHeight,group:r.datum.id??"_default"})}if(t.length>e){let e=t[t.length-1];e.navId=r.id??(null==r.datum.id?void 0:String(r.datum.id)),e.navParentId=r.navParentId}}for(let e of t)null!=e.navId&&(e.semanticKey=e.navId);return t.sort((e,t)=>e.x-t.x||e.y-t.y),t}function re(e,t,r,n,a){let l=function(e,t,r){if(!r.flat.some(e=>null!=e.navParentId))return;let n=r.flat.map((e,t)=>(e=>{let t=r.flat[e]?.navParentId,n=null==t?void 0:r.idToIdx.get(t);if(null==n||n===e)return;let a=new Set([e]),l=n;for(;null!=l;){if(a.has(l))return;a.add(l);let e=r.flat[l].navParentId;l=null==e?void 0:r.idToIdx.get(e)}return n})(t)),a=n.flatMap((e,t)=>null==e?[t]:[]),l=t<0?a[0]:t;if(null==l)return-1;let o=n.flatMap((e,t)=>e===n[l]?[t]:[]);if("Escape"===e)return t<0?-1:n[l]??-1;if("Enter"===e)return n.findIndex(e=>e===l)>=0?n.findIndex(e=>e===l):l;if("Home"===e)return o[0];if("End"===e)return o[o.length-1];if("PageDown"===e||"PageUp"===e){let t="PageDown"===e?10:-10;return o[Math.max(0,Math.min(o.length-1,o.indexOf(l)+t))]}if(!["ArrowRight","ArrowLeft","ArrowDown","ArrowUp"].includes(e))return null;let i=e.slice(5).toLowerCase();return ee(r,r.flat[l],i,o)??l}(e,t.flatIndex,r);if(void 0!==l)return l;let o=r.flat[t.flatIndex];if(!o)return Q(e,t,r);let i=o.datum?.id;switch(e){case"ArrowRight":case"ArrowLeft":case"ArrowDown":case"ArrowUp":{let n=ee(r,o,"ArrowRight"===e?"right":"ArrowLeft"===e?"left":"ArrowDown"===e?"down":"up")??t.flatIndex;return n!==t.flatIndex&&(a.current=-1,Be.delete(a)),n}case"Enter":{if(null==i)return t.flatIndex;let e=function(e,t){let r=String(e),n=[];for(let e of t){let t=e.datum??e,a=ne(t.source),l=ne(t.target),o=null!=a,i=null!=l;o&&String(a)===r&&i?n.push(String(l)):i&&String(l)===r&&o&&n.push(String(a))}return[...new Set(n)]}(i,n);if(0===e.length)return t.flatIndex;let l=Be.get(a),o=l?.nodeId===String(i)?l.previousId:void 0,u=e.filter(e=>e!==o&&r.idToIdx.has(e)),s=u.length?u:e.filter(e=>r.idToIdx.has(e));if(!s.length)return t.flatIndex;let c=(a.current+1)%s.length,d=r.idToIdx.get(s[c])??-1;return d>=0?(a.current=-1,Be.set(a,{nodeId:s[c],previousId:String(i)}),d):t.flatIndex}default:{Be.delete(a);let n=Q(e,t,r);return null!==n&&n!==t.flatIndex&&(a.current=-1),n}}}function ne(e){return"object"==typeof e&&null!==e&&"id"in e?e.id:e}function ae({storeRef:e,hoverRef:t,hoveredNodeRef:r,setHoverPoint:n,customHoverBehavior:a,customClickBehavior:l,scheduleRender:o,clearPointerHover:i,extractPoints:u,toHover:s,navigation:c="graph",nextConnected:d}){let f=ke(-1),h=ke(-1),p=ke(null),g=ke(null),y=Ie(()=>{i?.();let e=null!==t.current;h.current=-1,p.current=null,f.current=-1,t.current=null,r&&(r.current=null),n(null),e&&a?.(null),o()},[i,t,r,n,a,o]),m=Ie(e=>{e.currentTarget.contains(e.relatedTarget)||y()},[y]),v=ke(a);v.current=a;let x=Ie(()=>{let a=e.current;if(!a)return;if(h.current<0)return void(g.current=null);let l=q(u(a.scene),"ordered"===c);g.current={version:a.version,graph:l};let o=t.current;(function(e,t,r,n,a,l){let o=r.current;if(t.current<0||!o)return;let i=e=>(e.datum===o.datum||void 0!==o.semanticKey&&e.semanticKey===o.semanticKey)&&e.group===o.group&&e.shape===o.shape,u=e[t.current]&&i(e[t.current])?t.current:e.findIndex(i),s=e[u];if(t.current=u,r.current=s??null,s&&s.datum===o.datum&&s.x===o.x&&s.y===o.y&&s.w===o.w&&s.h===o.h&&s.pathData===o.pathData&&s.stats===o.stats)return;let c=s?l(s):null;n.current=c,a(c)})(l.flat,h,p,t,n,e=>s(e,a)),o&&!t.current&&v.current?.(null),h.current<0&&r&&(r.current=null)},[c,u,t,r,n,e,s]),w=Ie(r=>{if(fe(r))return;let m,v=e.current;if(!v)return;if(0===v.scene.length)return void((h.current>=0||"Escape"===r.key)&&y());if(g.current?.version===v.version)m=g.current.graph;else{let e=u(v.scene);if(0===e.length)return void((h.current>=0||"Escape"===r.key)&&y());m=q(e,"ordered"===c),g.current={version:v.version,graph:m}}if("Escape"===r.key){let e=d?.("Escape",m,h.current,f);if(null==e||e<0)return r.preventDefault(),i?.(),void y();r.stopPropagation()}let x,w=h.current;if(w>=m.flat.length&&(y(),w=-1),("Enter"===r.key&&!d||" "===r.key)&&w>=0)return r.preventDefault(),void l?.(s(m.flat[w],v),{type:"activate",inputType:"keyboard"});if(w<0){if(!(["ArrowRight","ArrowLeft","ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(r.key)||d&&"Enter"===r.key))return;f.current=-1,x=d&&m.flat.some(e=>null!=e.navParentId)?d(r.key,m,-1,f)??0:"End"===r.key?m.flat.length-1:"PageDown"===r.key?Z(r.key,-1,m.flat.length):0}else x=d?d(r.key,m,w,f):"linear"===c?Z(r.key,w,m.flat.length):Q(r.key,J(m,w),m);if(null===x)return;if(r.preventDefault(),x<0)return void y();h.current=x;let b=m.flat[x];p.current=b;let k=s(b,v);t.current=k,n(k),a?.(k,{type:"focus",inputType:"keyboard"}),o()},[y,i,l,a,u,d,c,t,o,n,e,s]);return{kbFocusIndexRef:h,focusedNavPointRef:p,neighborIndexRef:f,onKeyDown:w,onBlur:m,clearFocus:y,refreshKeyboardFocus:x}}import{aI as le,aJ as oe,d as ie,ak as ue,ag as se,aS as ce,h as de,aV as fe}from"./c-62UTMRQE.min.js";import{c as he}from"./c-JDI7HKEM.min.js";import{i as pe}from"./c-ELGOCAEY.min.js";import{y as ge,o as ye,b as me}from"./c-B3X2IJRQ.min.js";import{jsxs as ve,jsx as xe}from"react/jsx-runtime";import*as we from"react";import{useEffect as be,useRef as ke,useCallback as Ie}from"react";var Se={fresh:1,aging:.7,stale:.45,expired:.25},Ae={alpha:1,band:"fresh",isStale:!1},Me={live:"#28a745",stale:"#dc3545",stopped:"#6c757d",failed:"#842029",settling:"#fd7e14"},Ee=/*#__PURE__*/new Set,Re=class{constructor(e){this.now=e,this.last=null}touch(){this.last=this.now()}clear(){this.last=null}elapsed(){return null==this.last?0:Math.max(0,this.now()-this.last)}},Pe=/*#__PURE__*/new WeakMap,De=class{getLastUpdateResult(){return this.updateResults.last}getUpdateSnapshot(){return this.updateResults.last}subscribeUpdateResult(e){return this.updateResults.subscribe(e)}setLayoutSelection(e){this.config.layoutSelection=e}markStylePaintPending(){Pe.set(this,!0)}consumeStylePaintPending(){let e=!0===Pe.get(this);return Pe.delete(this),e}},Be=/*#__PURE__*/new WeakMap;export{m as A,v as B,x as C,k as D,S as E,A as F,t as G,r as H,l as I,o as J,i as K,J as L,te as M,re as N,ae as O,M as P,E as Q,R,P as S,D as T,Re as a,B as b,_ as c,C as d,T as e,$ as f,De as g,u as h,s as i,c as j,G as k,H as l,N as m,j as n,V as o,W as p,d as q,f as r,h as s,e as t,F as u,K as v,Y as w,p as x,g as y,y as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,p as t,n,o as a,m as l}from"./c-
|
|
1
|
+
import{r as e,p as t,n,o as a,m as l}from"./c-HN5U72U7.min.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";var s=e=>{if(null==e)return"";let t=Math.round(100*e)/100;return Number.isNaN(t)?"":String(t)};function o(e){return null==e||""===e?"—":"number"==typeof e?Number.isNaN(e)?"—":s(e):"boolean"==typeof e?e?"true":"false":"object"==typeof e?"—":String(e)}function u(e){let t=new Map;for(let n of e??[])for(let[e,a]of Object.entries(n?.values??{})){if(null==a||""===a)continue;let n=t.get(e);if(n||(n={count:0,min:1/0,max:-1/0,sum:0,strings:new Set},t.set(e,n)),"number"==typeof a){if(!Number.isFinite(a))continue;n.count++,n.sum+=a,a<n.min&&(n.min=a),a>n.max&&(n.max=a)}else"object"!=typeof a&&"function"!=typeof a&&n.strings.add(String(a))}return Array.from(t,([e,t])=>{if(t.count)return{name:e,count:t.count,numeric:!0,min:t.min,max:t.max,mean:t.sum/t.count};let n=Array.from(t.strings);return{name:e,count:n.length,numeric:!1,uniqueValues:n.slice(0,5)}}).filter(e=>e.count>0)}function m(t,n){let a=[`${e(t,"data point","data points")}.`];for(let e of n)if(e.numeric)a.push(`${e.name}: ${s(e.min)} to ${s(e.max)}, mean ${s(e.mean)}.`);else{let t=e.uniqueValues,n=t.length<=3?t.join(", "):`${t.slice(0,3).join(", ")}… (${e.count} unique)`;a.push(`${e.name}: ${n}.`)}return a.join(" ")}function c({rows:e,label:s,caption:u,typeLabel:m,labelRows:c=!1,className:f="semiotic-accessible-data-table-table",style:b,extraColumns:d=[]}){let p=Array.from(new Set(e.flatMap(e=>Object.keys(e.values))));return r("table",{className:f,role:"table","aria-label":s,style:b??l,children:[i("caption",{className:"semiotic-accessible-data-table-caption",style:t,children:u}),i("thead",{children:i("tr",{children:[m,...p,...d.map(e=>e.label)].map((e,t)=>i("th",{style:n,children:e},t))})}),i("tbody",{children:e.map((e,t)=>r("tr",{tabIndex:-1,"aria-label":c?e.label:void 0,children:[i("td",{style:a,children:e.label}),p.map(t=>i("td",{style:a,children:o(e.values[t])},t)),d.map((e,n)=>i("td",{style:a,children:o(e.values[t])},n))]},t))})]})}export{s as a,u as b,m as c,c as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as e}from"./c-
|
|
1
|
+
import{q as e}from"./c-2YFVDRU4.min.js";import{c as t,b as n}from"./c-6X7RO4GU.min.js";import{am as r}from"./c-62UTMRQE.min.js";import{useMemo as o,useRef as i,useState as s,useEffect as a}from"react";var u=/*#__PURE__*/new WeakMap;function l(e){let t=[];for(let n of Object.keys(e).sort()){let r=e[n];if(void 0!==r){if("function"==typeof r)return null;t.push(`${n}:${String(r)}`)}}return t.join("|")}function d(e,t,n){return null==n?null:u.get(e)?.get(t)?.get(n)??null}function p(e,t,n,r){if(null==n)return;let o=u.get(e);o||(o=new WeakMap,u.set(e,o));let i=o.get(t);if(i||(i=new Map,o.set(t,i)),!i.has(n)&&i.size>=16){let e=i.keys().next().value;void 0!==e&&i.delete(e)}i.set(n,r)}function c(u,c,f={}){let m=r(),{seed:g,iterations:h,repulsion:k,linkDistance:y,linkStrength:w,centerStrength:R,damping:b,nodeRadius:j,nodePadding:v,inset:S,execution:E,workerThreshold:M}=f,x=o(()=>({seed:g,iterations:h,repulsion:k,linkDistance:y,linkStrength:w,centerStrength:R,damping:b,nodeRadius:j,nodePadding:v,inset:S,execution:E,workerThreshold:M}),[g,h,k,y,w,R,b,j,v,S,E,M]),T=i(m),[O,A]=s(()=>{if(typeof window>"u"||m){let t=e(u,c,x);return p(u,c,l(x),t),{positions:t,status:"ready",error:null}}let t=d(u,c,l(x));return t?{positions:t,status:"ready",error:null}:{positions:null,status:"pending",error:null}});return a(()=>{if(T.current)return void(T.current=!1);let r=l(x),o=d(u,c,r);if(o)return void A(e=>"ready"===e.status&&e.positions===o?e:{positions:o,status:"ready",error:null});let i=new AbortController;return A(e=>({positions:e.positions,status:"pending",error:null})),async function(r,o,i={}){let{execution:s="auto",signal:a,workerThreshold:u,nodeRadius:l,...d}=i,p=d.iterations??260;if(!t()||!n(s,r.length,o.length,p,u))return e(r,o,{...d,nodeRadius:l});let c={kind:"normalized",nodes:r.map(e=>({...e})),edges:o.map(e=>({...e})),options:d,nodeRadii:"function"==typeof l?Object.fromEntries(r.map(e=>[e.id,l(e)])):null==l?void 0:Object.fromEntries(r.map(e=>[e.id,l]))};try{let{runForceLayoutWorker:e}=await(import("./c-G3SM44T7.min.js"));return(await e(c,a)).positions}catch(t){if("AbortError"===t?.name)throw t;return e(r,o,{...d,nodeRadius:l})}}(u,c,{...x,signal:i.signal}).then(e=>{p(u,c,r,e),A({positions:e,status:"ready",error:null})}).catch(e=>{"AbortError"!==e.name&&A(t=>({positions:t.positions,status:"error",error:e}))}),()=>i.abort()},[u,c,x]),O}export{c as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function r(){a("sankey",c),a("force",o),a("chord",t),a("tree",e),a("cluster",e),a("treemap",e),a("circlepack",e),a("partition",e),a("orbit",i)}import{b as c,c as o,d as t,e,k as i}from"./c-FRVHZIGR.min.js";import{c as a}from"./c-DEWMXCOF.min.js";export{r as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e,r,u){let o=n(e),i=n(r),f=n(u);return e=>{let n="string"==typeof e.agg&&"number"==typeof e.count&&"number"==typeof e.xCenter&&"number"==typeof e.yCenter;return{value:n?t(e.value):f(e),x:n?t(e.xCenter):o(e),y:n?t(e.yCenter):i(e)}}}function t(e){return"number"==typeof e&&Number.isFinite(e)?e:void 0}import{
|
|
1
|
+
function e(e,r,u){let o=n(e),i=n(r),f=n(u);return e=>{let n="string"==typeof e.agg&&"number"==typeof e.count&&"number"==typeof e.xCenter&&"number"==typeof e.yCenter;return{value:n?t(e.value):f(e),x:n?t(e.xCenter):o(e),y:n?t(e.yCenter):i(e)}}}function t(e){return"number"==typeof e&&Number.isFinite(e)?e:void 0}import{bL as n}from"./c-62UTMRQE.min.js";export{e as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a({scene:a,sceneRevision:d,chartType:h,revealRows:u}){let[g,f]=o.useState(5),y=d??a,{allRows:j,summary:b}=o.useMemo(()=>{let s=n(a);return{allRows:s,summary:e(s.length,t(s))}},[y]),w=Math.min(g,j.length),
|
|
1
|
+
function a({scene:a,sceneRevision:d,chartType:h,revealRows:u}){let[g,f]=o.useState(5),y=d??a,{allRows:j,summary:b}=o.useMemo(()=>{let s=n(a);return{allRows:s,summary:e(s.length,t(s))}},[y]),w=Math.min(g,j.length),R=j.length-w;return m(c,{children:[p("div",{className:"semiotic-accessible-data-table-summary",role:"note",style:i,children:b}),p(s,{rows:j.slice(0,w),label:`Sample data for ${h}`,typeLabel:"type",caption:R>0?`First ${w} of ${l(j.length,"data point","data points")}`:`All ${l(j.length,"data point","data points")}`}),p(r,{remaining:R,onClick:a=>{u(a.currentTarget,w,Math.min(w+25,j.length),j.length),f(a=>a+25)},kind:"row"})]})}import{c as e,b as t,d as s}from"./c-QPHM7AWW.min.js";import{a as r}from"./c-JVZRD4GL.min.js";import{e as n,k as i,r as l}from"./c-HN5U72U7.min.js";import*as o from"react";import{jsxs as m,Fragment as c,jsx as p}from"react/jsx-runtime";export{a as default};
|