@xyflow/react 12.6.0 → 12.6.2
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/dist/base.css +2 -2
- package/dist/esm/components/BatchProvider/index.d.ts.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +16 -19
- package/dist/esm/index.mjs +16 -19
- package/dist/esm/types/component-props.d.ts +5 -32
- package/dist/esm/types/component-props.d.ts.map +1 -1
- package/dist/esm/types/edges.d.ts +1 -2
- package/dist/esm/types/edges.d.ts.map +1 -1
- package/dist/style.css +2 -2
- package/dist/umd/components/BatchProvider/index.d.ts.map +1 -1
- package/dist/umd/index.d.ts +1 -1
- package/dist/umd/index.d.ts.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/types/component-props.d.ts +5 -32
- package/dist/umd/types/component-props.d.ts.map +1 -1
- package/dist/umd/types/edges.d.ts +1 -2
- package/dist/umd/types/edges.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/base.css
CHANGED
|
@@ -249,7 +249,7 @@ svg.react-flow__connectionline {
|
|
|
249
249
|
}
|
|
250
250
|
.react-flow__panel.top.center, .react-flow__panel.bottom.center {
|
|
251
251
|
left: 50%;
|
|
252
|
-
transform: translateX(-50%);
|
|
252
|
+
transform: translateX(-15px) translateX(-50%);
|
|
253
253
|
}
|
|
254
254
|
.react-flow__panel.left {
|
|
255
255
|
left: 0;
|
|
@@ -259,7 +259,7 @@ svg.react-flow__connectionline {
|
|
|
259
259
|
}
|
|
260
260
|
.react-flow__panel.left.center, .react-flow__panel.right.center {
|
|
261
261
|
top: 50%;
|
|
262
|
-
transform: translateY(-50%);
|
|
262
|
+
transform: translateY(-15px) translateY(-50%);
|
|
263
263
|
}
|
|
264
264
|
.react-flow__attribution {
|
|
265
265
|
font-size: 10px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/BatchProvider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAoC,MAAM,OAAO,CAAC;AAKnF,OAAO,EAAE,KAAK,EAAa,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAU9C;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,EACxF,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,SAAS,CAAC;CACrB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/BatchProvider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAoC,MAAM,OAAO,CAAC;AAKnF,OAAO,EAAE,KAAK,EAAa,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAU9C;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,EACxF,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,SAAS,CAAC;CACrB,2CAkEA;AAED,wBAAgB,eAAe;;;EAQ9B"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export { applyNodeChanges, applyEdgeChanges } from './utils/changes';
|
|
|
32
32
|
export { isNode, isEdge } from './utils/general';
|
|
33
33
|
export * from './additional-components';
|
|
34
34
|
export * from './types';
|
|
35
|
-
export { type Align, type SmoothStepPathOptions, type BezierPathOptions, ConnectionLineType, type EdgeMarker, type EdgeMarkerType, MarkerType, type OnMove, type OnMoveStart, type OnMoveEnd, type Connection, ConnectionMode, type OnConnectStartParams, type OnConnectStart, type OnConnect, type OnConnectEnd, type Viewport, type SnapGrid, PanOnScrollMode, type ViewportHelperFunctionOptions, type SetCenterOptions, type FitBoundsOptions, type PanelPosition, type ProOptions, SelectionMode, type SelectionRect, type OnError, type NodeOrigin, type OnSelectionDrag, Position, type XYPosition, type XYZPosition, type Dimensions, type Rect, type Box, type Transform, type CoordinateExtent, type ColorMode, type ColorModeClass, type HandleType, type ShouldResize, type OnResizeStart, type OnResize, type OnResizeEnd, type ControlPosition, type ControlLinePosition, ResizeControlVariant, type ResizeParams, type ResizeParamsWithDirection, type ResizeDragEvent, type NodeChange, type NodeDimensionChange, type NodePositionChange, type NodeSelectionChange, type NodeRemoveChange, type NodeAddChange, type NodeReplaceChange, type EdgeChange, type EdgeSelectionChange, type EdgeRemoveChange, type EdgeAddChange, type EdgeReplaceChange, type KeyCode, type ConnectionState, type FinalConnectionState, type ConnectionInProgress, type NoConnection, type NodeConnection, } from '@xyflow/system';
|
|
35
|
+
export { type Align, type SmoothStepPathOptions, type BezierPathOptions, ConnectionLineType, type EdgeMarker, type EdgeMarkerType, MarkerType, type OnMove, type OnMoveStart, type OnMoveEnd, type Connection, ConnectionMode, type OnConnectStartParams, type OnConnectStart, type OnConnect, type OnConnectEnd, type Viewport, type SnapGrid, PanOnScrollMode, type ViewportHelperFunctionOptions, type SetCenterOptions, type FitBoundsOptions, type PanelPosition, type ProOptions, SelectionMode, type SelectionRect, type OnError, type NodeOrigin, type OnSelectionDrag, Position, type XYPosition, type XYZPosition, type Dimensions, type Rect, type Box, type Transform, type CoordinateExtent, type ColorMode, type ColorModeClass, type HandleType, type ShouldResize, type OnResizeStart, type OnResize, type OnResizeEnd, type ControlPosition, type ControlLinePosition, ResizeControlVariant, type ResizeParams, type ResizeParamsWithDirection, type ResizeDragEvent, type NodeChange, type NodeDimensionChange, type NodePositionChange, type NodeSelectionChange, type NodeRemoveChange, type NodeAddChange, type NodeReplaceChange, type EdgeChange, type EdgeSelectionChange, type EdgeRemoveChange, type EdgeAddChange, type EdgeReplaceChange, type KeyCode, type ConnectionState, type FinalConnectionState, type ConnectionInProgress, type NoConnection, type NodeConnection, type OnReconnect, } from '@xyflow/system';
|
|
36
36
|
import { type Handle as HandleBound } from '@xyflow/system';
|
|
37
37
|
export type Handle = HandleBound;
|
|
38
38
|
export { type GetBezierPathParams, getBezierEdgeCenter, getBezierPath, getEdgeCenter, type GetSmoothStepPathParams, getSmoothStepPath, type GetStraightPathParams, getStraightPath, getViewportForBounds, getNodesBounds, getIncomers, getOutgoers, addEdge, reconnectEdge, getConnectedEdges, } from '@xyflow/system';
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,KAAK,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAChG,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,OAAO,EAAE,YAAY,EAAE,MAAM,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,EACnB,UAAU,EACV,KAAK,MAAM,EACX,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,UAAU,EACf,cAAc,EACd,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,eAAe,EACf,KAAK,6BAA6B,EAClC,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,aAAa,EACb,KAAK,aAAa,EAClB,KAAK,OAAO,EACZ,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,QAAQ,EACR,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,IAAI,EACT,KAAK,GAAG,EACR,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,oBAAoB,EACpB,KAAK,YAAY,EACjB,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,OAAO,EACZ,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,uBAA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ACR,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,oBAAoB,EACpB,KAAK,YAAY,EACjB,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,OAAO,EACZ,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,WAAW,GACjB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,KAAK,MAAM,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC5D,MAAM,MAAM,MAAM,GAAG,WAAW,CAAC;AAGjC,OAAO,EACL,KAAK,mBAAmB,EACxB,mBAAmB,EACnB,aAAa,EACb,aAAa,EACb,KAAK,uBAAuB,EAC5B,iBAAiB,EACjB,KAAK,qBAAqB,EAC1B,eAAe,EACf,oBAAoB,EACpB,cAAc,EACd,WAAW,EACX,WAAW,EACX,OAAO,EACP,aAAa,EACb,iBAAiB,GAClB,MAAM,gBAAgB,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -946,29 +946,26 @@ function BatchProvider({ children, }) {
|
|
|
946
946
|
for (const payload of queueItems) {
|
|
947
947
|
next = typeof payload === 'function' ? payload(next) : payload;
|
|
948
948
|
}
|
|
949
|
+
const changes = getElementsDiffChanges({
|
|
950
|
+
items: next,
|
|
951
|
+
lookup: nodeLookup,
|
|
952
|
+
});
|
|
949
953
|
if (hasDefaultNodes) {
|
|
950
954
|
setNodes(next);
|
|
951
955
|
}
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
956
|
+
// We only want to fire onNodesChange if there are changes to the nodes
|
|
957
|
+
if (changes.length > 0) {
|
|
958
|
+
onNodesChange?.(changes);
|
|
959
|
+
}
|
|
960
|
+
else if (fitViewQueued) {
|
|
961
|
+
// If there are no changes to the nodes, we still need to call setNodes
|
|
962
|
+
// to trigger a re-render and fitView.
|
|
963
|
+
window.requestAnimationFrame(() => {
|
|
964
|
+
const { fitViewQueued, nodes, setNodes } = store.getState();
|
|
965
|
+
if (fitViewQueued) {
|
|
966
|
+
setNodes(nodes);
|
|
967
|
+
}
|
|
957
968
|
});
|
|
958
|
-
// We only want to fire onNodesChange if there are changes to the nodes
|
|
959
|
-
if (changes.length > 0) {
|
|
960
|
-
onNodesChange?.(changes);
|
|
961
|
-
}
|
|
962
|
-
else if (fitViewQueued) {
|
|
963
|
-
// If there are no changes to the nodes, we still need to call setNodes
|
|
964
|
-
// to trigger a re-render and fitView.
|
|
965
|
-
window.requestAnimationFrame(() => {
|
|
966
|
-
const { fitViewQueued, nodes, setNodes } = store.getState();
|
|
967
|
-
if (fitViewQueued) {
|
|
968
|
-
setNodes(nodes);
|
|
969
|
-
}
|
|
970
|
-
});
|
|
971
|
-
}
|
|
972
969
|
}
|
|
973
970
|
}, []);
|
|
974
971
|
const nodeQueue = useQueue(nodeQueueHandler);
|
package/dist/esm/index.mjs
CHANGED
|
@@ -946,29 +946,26 @@ function BatchProvider({ children, }) {
|
|
|
946
946
|
for (const payload of queueItems) {
|
|
947
947
|
next = typeof payload === 'function' ? payload(next) : payload;
|
|
948
948
|
}
|
|
949
|
+
const changes = getElementsDiffChanges({
|
|
950
|
+
items: next,
|
|
951
|
+
lookup: nodeLookup,
|
|
952
|
+
});
|
|
949
953
|
if (hasDefaultNodes) {
|
|
950
954
|
setNodes(next);
|
|
951
955
|
}
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
956
|
+
// We only want to fire onNodesChange if there are changes to the nodes
|
|
957
|
+
if (changes.length > 0) {
|
|
958
|
+
onNodesChange?.(changes);
|
|
959
|
+
}
|
|
960
|
+
else if (fitViewQueued) {
|
|
961
|
+
// If there are no changes to the nodes, we still need to call setNodes
|
|
962
|
+
// to trigger a re-render and fitView.
|
|
963
|
+
window.requestAnimationFrame(() => {
|
|
964
|
+
const { fitViewQueued, nodes, setNodes } = store.getState();
|
|
965
|
+
if (fitViewQueued) {
|
|
966
|
+
setNodes(nodes);
|
|
967
|
+
}
|
|
957
968
|
});
|
|
958
|
-
// We only want to fire onNodesChange if there are changes to the nodes
|
|
959
|
-
if (changes.length > 0) {
|
|
960
|
-
onNodesChange?.(changes);
|
|
961
|
-
}
|
|
962
|
-
else if (fitViewQueued) {
|
|
963
|
-
// If there are no changes to the nodes, we still need to call setNodes
|
|
964
|
-
// to trigger a re-render and fitView.
|
|
965
|
-
window.requestAnimationFrame(() => {
|
|
966
|
-
const { fitViewQueued, nodes, setNodes } = store.getState();
|
|
967
|
-
if (fitViewQueued) {
|
|
968
|
-
setNodes(nodes);
|
|
969
|
-
}
|
|
970
|
-
});
|
|
971
|
-
}
|
|
972
969
|
}
|
|
973
970
|
}, []);
|
|
974
971
|
const nodeQueue = useQueue(nodeQueueHandler);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CSSProperties, HTMLAttributes, MouseEvent as ReactMouseEvent, WheelEvent } from 'react';
|
|
2
|
-
import type { ConnectionMode, ConnectionLineType, OnConnect, OnConnectStart, OnConnectEnd, CoordinateExtent, KeyCode, PanOnScrollMode, ProOptions, PanelPosition, OnMove, OnMoveStart, OnMoveEnd, Viewport, NodeOrigin, HandleType, SelectionMode, OnError, ColorMode, SnapGrid } from '@xyflow/system';
|
|
3
|
-
import type { OnSelectionChangeFunc, NodeTypes, EdgeTypes, Node, Edge, ConnectionLineComponent,
|
|
2
|
+
import type { ConnectionMode, ConnectionLineType, OnConnect, OnConnectStart, OnConnectEnd, CoordinateExtent, KeyCode, PanOnScrollMode, ProOptions, PanelPosition, OnMove, OnMoveStart, OnMoveEnd, Viewport, NodeOrigin, HandleType, SelectionMode, OnError, ColorMode, SnapGrid, OnReconnect } from '@xyflow/system';
|
|
3
|
+
import type { OnSelectionChangeFunc, NodeTypes, EdgeTypes, Node, Edge, ConnectionLineComponent, OnInit, DefaultEdgeOptions, FitViewOptions, OnNodesDelete, OnEdgesDelete, OnDelete, OnNodesChange, OnEdgesChange, NodeMouseHandler, SelectionDragHandler, EdgeMouseHandler, OnNodeDrag, OnBeforeDelete, IsValidConnection } from '.';
|
|
4
4
|
/**
|
|
5
5
|
* ReactFlow component props.
|
|
6
6
|
* @public
|
|
@@ -39,22 +39,11 @@ export interface ReactFlowProps<NodeType extends Node = Node, EdgeType extends E
|
|
|
39
39
|
defaultEdges?: EdgeType[];
|
|
40
40
|
/**
|
|
41
41
|
* Defaults to be applied to all new edges that are added to the flow.
|
|
42
|
-
*
|
|
43
42
|
* Properties on a new edge will override these defaults if they exist.
|
|
44
43
|
* @example
|
|
45
44
|
* const defaultEdgeOptions = {
|
|
46
45
|
* type: 'customEdgeType',
|
|
47
|
-
* animated: true
|
|
48
|
-
* interactionWidth: 10,
|
|
49
|
-
* data: { label: 'custom label' },
|
|
50
|
-
* hidden: false,
|
|
51
|
-
* deletable: true,
|
|
52
|
-
* selected: false,
|
|
53
|
-
* focusable: true,
|
|
54
|
-
* markerStart: EdgeMarker.ArrowClosed,
|
|
55
|
-
* markerEnd: EdgeMarker.ArrowClosed,
|
|
56
|
-
* zIndex: 12,
|
|
57
|
-
* ariaLabel: 'custom aria label'
|
|
46
|
+
* animated: true
|
|
58
47
|
* }
|
|
59
48
|
*/
|
|
60
49
|
defaultEdgeOptions?: DefaultEdgeOptions;
|
|
@@ -91,7 +80,6 @@ export interface ReactFlowProps<NodeType extends Node = Node, EdgeType extends E
|
|
|
91
80
|
/**
|
|
92
81
|
* This handler is called when the source or target of a reconnectable edge is dragged from the
|
|
93
82
|
* current node. It will fire even if the edge's source or target do not end up changing.
|
|
94
|
-
*
|
|
95
83
|
* You can use the `reconnectEdge` utility to convert the connection to a new edge.
|
|
96
84
|
*/
|
|
97
85
|
onReconnect?: OnReconnect<EdgeType>;
|
|
@@ -102,7 +90,6 @@ export interface ReactFlowProps<NodeType extends Node = Node, EdgeType extends E
|
|
|
102
90
|
/**
|
|
103
91
|
* This event fires when the user releases the source or target of an editable edge. It is called
|
|
104
92
|
* even if an edge update does not occur.
|
|
105
|
-
*
|
|
106
93
|
*/
|
|
107
94
|
onReconnectEnd?: (event: MouseEvent | TouchEvent, edge: EdgeType, handleType: HandleType) => void;
|
|
108
95
|
/**
|
|
@@ -163,7 +150,6 @@ export interface ReactFlowProps<NodeType extends Node = Node, EdgeType extends E
|
|
|
163
150
|
onSelectionContextMenu?: (event: ReactMouseEvent, nodes: NodeType[]) => void;
|
|
164
151
|
/**
|
|
165
152
|
* When a connection line is completed and two nodes are connected by the user, this event fires with the new connection.
|
|
166
|
-
*
|
|
167
153
|
* You can use the `addEdge` utility to convert the connection to a complete edge.
|
|
168
154
|
* @example // Use helper function to update edges onConnect
|
|
169
155
|
* import ReactFlow, { addEdge } from '@xyflow/react';
|
|
@@ -231,9 +217,7 @@ export interface ReactFlowProps<NodeType extends Node = Node, EdgeType extends E
|
|
|
231
217
|
onBeforeDelete?: OnBeforeDelete<NodeType, EdgeType>;
|
|
232
218
|
/**
|
|
233
219
|
* Custom node types to be available in a flow.
|
|
234
|
-
*
|
|
235
220
|
* React Flow matches a node's type to a component in the `nodeTypes` object.
|
|
236
|
-
* @TODO check if @default is correct
|
|
237
221
|
* @default {
|
|
238
222
|
* input: InputNode,
|
|
239
223
|
* default: DefaultNode,
|
|
@@ -248,9 +232,7 @@ export interface ReactFlowProps<NodeType extends Node = Node, EdgeType extends E
|
|
|
248
232
|
nodeTypes?: NodeTypes;
|
|
249
233
|
/**
|
|
250
234
|
* Custom edge types to be available in a flow.
|
|
251
|
-
*
|
|
252
235
|
* React Flow matches an edge's type to a component in the `edgeTypes` object.
|
|
253
|
-
* @TODO check if @default is correct
|
|
254
236
|
* @default {
|
|
255
237
|
* default: BezierEdge,
|
|
256
238
|
* straight: StraightEdge,
|
|
@@ -266,7 +248,6 @@ export interface ReactFlowProps<NodeType extends Node = Node, EdgeType extends E
|
|
|
266
248
|
edgeTypes?: EdgeTypes;
|
|
267
249
|
/**
|
|
268
250
|
* The type of edge path to use for connection lines.
|
|
269
|
-
*
|
|
270
251
|
* Although created edges can be of any type, React Flow needs to know what type of path to render for the connection line before the edge is created!
|
|
271
252
|
* @default ConnectionLineType.Bezier
|
|
272
253
|
*/
|
|
@@ -287,7 +268,7 @@ export interface ReactFlowProps<NodeType extends Node = Node, EdgeType extends E
|
|
|
287
268
|
/**
|
|
288
269
|
* If set, pressing the key or chord will delete any selected nodes and edges. Passing an array
|
|
289
270
|
* represents multiple keys that can be pressed.
|
|
290
|
-
|
|
271
|
+
|
|
291
272
|
* For example, `["Delete", "Backspace"]` will delete selected elements when either key is pressed.
|
|
292
273
|
* @default 'Backspace'
|
|
293
274
|
*/
|
|
@@ -404,7 +385,6 @@ export interface ReactFlowProps<NodeType extends Node = Node, EdgeType extends E
|
|
|
404
385
|
selectNodesOnDrag?: boolean;
|
|
405
386
|
/**
|
|
406
387
|
* Enabling this prop allows users to pan the viewport by clicking and dragging.
|
|
407
|
-
*
|
|
408
388
|
* You can also set this prop to an array of numbers to limit which mouse buttons can activate panning.
|
|
409
389
|
* @default true
|
|
410
390
|
* @example [0, 2] // allows panning with the left and right mouse buttons
|
|
@@ -443,7 +423,6 @@ export interface ReactFlowProps<NodeType extends Node = Node, EdgeType extends E
|
|
|
443
423
|
onViewportChange?: (viewport: Viewport) => void;
|
|
444
424
|
/**
|
|
445
425
|
* By default, the viewport extends infinitely. You can use this prop to set a boundary.
|
|
446
|
-
*
|
|
447
426
|
* The first pair of coordinates is the top left boundary and the second pair is the bottom right.
|
|
448
427
|
* @default [[-∞, -∞], [+∞, +∞]]
|
|
449
428
|
* @example [[-1000, -10000], [1000, 1000]]
|
|
@@ -456,7 +435,6 @@ export interface ReactFlowProps<NodeType extends Node = Node, EdgeType extends E
|
|
|
456
435
|
preventScrolling?: boolean;
|
|
457
436
|
/**
|
|
458
437
|
* By default, nodes can be placed on an infinite flow. You can use this prop to set a boundary.
|
|
459
|
-
*
|
|
460
438
|
* The first pair of coordinates is the top left boundary and the second pair is the bottom right.
|
|
461
439
|
* @example [[-1000, -10000], [1000, 1000]]
|
|
462
440
|
*/
|
|
@@ -478,21 +456,18 @@ export interface ReactFlowProps<NodeType extends Node = Node, EdgeType extends E
|
|
|
478
456
|
zoomOnPinch?: boolean;
|
|
479
457
|
/**
|
|
480
458
|
* Controls if the viewport should pan by scrolling inside the container.
|
|
481
|
-
*
|
|
482
459
|
* Can be limited to a specific direction with `panOnScrollMode`.
|
|
483
460
|
* @default false
|
|
484
461
|
*/
|
|
485
462
|
panOnScroll?: boolean;
|
|
486
463
|
/**
|
|
487
464
|
* Controls how fast viewport should be panned on scroll.
|
|
488
|
-
*
|
|
489
465
|
* Use together with `panOnScroll` prop.
|
|
490
466
|
* @default 0.5
|
|
491
467
|
*/
|
|
492
468
|
panOnScrollSpeed?: number;
|
|
493
469
|
/**
|
|
494
470
|
* This prop is used to limit the direction of panning when `panOnScroll` is enabled.
|
|
495
|
-
*
|
|
496
471
|
* The `"free"` option allows panning in any direction.
|
|
497
472
|
* @default "free"
|
|
498
473
|
* @example "horizontal" | "vertical"
|
|
@@ -625,10 +600,8 @@ export interface ReactFlowProps<NodeType extends Node = Node, EdgeType extends E
|
|
|
625
600
|
isValidConnection?: IsValidConnection<EdgeType>;
|
|
626
601
|
/**
|
|
627
602
|
* With a threshold greater than zero you can delay node drag events.
|
|
628
|
-
*
|
|
629
603
|
* If threshold equals 1, you need to drag the node 1 pixel before a drag event is fired.
|
|
630
|
-
*
|
|
631
|
-
* 1 is the default value, so clicks don't trigger drag events.
|
|
604
|
+
* 1 is the default value, so that clicks don't trigger drag events.
|
|
632
605
|
* @default 1
|
|
633
606
|
*/
|
|
634
607
|
nodeDragThreshold?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-props.d.ts","sourceRoot":"","sources":["../../src/types/component-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,IAAI,eAAe,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACtG,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAClB,SAAS,EACT,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,OAAO,EACP,eAAe,EACf,UAAU,EACV,aAAa,EACb,MAAM,EACN,WAAW,EACX,SAAS,EACT,QAAQ,EACR,UAAU,EACV,UAAU,EACV,aAAa,EACb,OAAO,EACP,SAAS,EACT,QAAQ,
|
|
1
|
+
{"version":3,"file":"component-props.d.ts","sourceRoot":"","sources":["../../src/types/component-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,IAAI,eAAe,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACtG,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAClB,SAAS,EACT,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,OAAO,EACP,eAAe,EACf,UAAU,EACV,aAAa,EACb,MAAM,EACN,WAAW,EACX,SAAS,EACT,QAAQ,EACR,UAAU,EACV,UAAU,EACV,aAAa,EACb,OAAO,EACP,SAAS,EACT,QAAQ,EACR,WAAW,EACZ,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EACV,qBAAqB,EACrB,SAAS,EACT,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,uBAAuB,EACvB,MAAM,EACN,kBAAkB,EAClB,cAAc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ACtB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAChD;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CSSProperties, SVGAttributes, ReactNode, MouseEvent as ReactMouseEvent, ComponentType } from 'react';
|
|
2
|
-
import type { EdgeBase, BezierPathOptions, Position, SmoothStepPathOptions, DefaultEdgeOptionsBase, HandleType,
|
|
2
|
+
import type { EdgeBase, BezierPathOptions, Position, SmoothStepPathOptions, DefaultEdgeOptionsBase, HandleType, ConnectionLineType, Handle, EdgePosition, StepPathOptions, OnError, OnReconnect, FinalConnectionState } from '@xyflow/system';
|
|
3
3
|
import { EdgeTypes, InternalNode, Node } from '.';
|
|
4
4
|
/**
|
|
5
5
|
* @inline
|
|
@@ -174,7 +174,6 @@ export type StraightEdgeProps = Omit<EdgeComponentProps, 'sourcePosition' | 'tar
|
|
|
174
174
|
* @expand
|
|
175
175
|
*/
|
|
176
176
|
export type SimpleBezierEdgeProps = EdgeComponentProps;
|
|
177
|
-
export type OnReconnect<EdgeType extends Edge = Edge> = (oldEdge: EdgeType, newConnection: Connection) => void;
|
|
178
177
|
/**
|
|
179
178
|
* If you want to render a custom component for connection lines, you can set the
|
|
180
179
|
* `connectionLineComponent` prop on the [`<ReactFlow />`](/api-reference/react-flow#connection-connectionLineComponent)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edges.d.ts","sourceRoot":"","sources":["../../src/types/edges.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,IAAI,eAAe,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACnH,OAAO,KAAK,EACV,QAAQ,EACR,iBAAiB,EACjB,QAAQ,EACR,qBAAqB,EACrB,sBAAsB,EACtB,UAAU,EACV,
|
|
1
|
+
{"version":3,"file":"edges.d.ts","sourceRoot":"","sources":["../../src/types/edges.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,IAAI,eAAe,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACnH,OAAO,KAAK,EACV,QAAQ,EACR,iBAAiB,EACjB,QAAQ,EACR,qBAAqB,EACrB,sBAAsB,EACtB,UAAU,EACV,kBAAkB,EAClB,MAAM,EACN,YAAY,EACZ,eAAe,EACf,OAAO,EACP,WAAW,EACX,oBAAoB,EACrB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,IAAI,CACd,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClE,QAAQ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AC;IACjC,6EAA6E;IAC7E,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,QAAQ,CAAC;IACvB,UAAU,EAAE,QAAQ,CAAC;IACrB;;;OAGG;IACH,gBAAgB,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC;IAC7C,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;IACtC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,uBAAuB,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,IAAI,aAAa,CAC/E,4BAA4B,CAAC,QAAQ,CAAC,CACvC,CAAC"}
|
package/dist/style.css
CHANGED
|
@@ -290,7 +290,7 @@ svg.react-flow__connectionline {
|
|
|
290
290
|
}
|
|
291
291
|
.react-flow__panel.top.center, .react-flow__panel.bottom.center {
|
|
292
292
|
left: 50%;
|
|
293
|
-
transform: translateX(-50%);
|
|
293
|
+
transform: translateX(-15px) translateX(-50%);
|
|
294
294
|
}
|
|
295
295
|
.react-flow__panel.left {
|
|
296
296
|
left: 0;
|
|
@@ -300,7 +300,7 @@ svg.react-flow__connectionline {
|
|
|
300
300
|
}
|
|
301
301
|
.react-flow__panel.left.center, .react-flow__panel.right.center {
|
|
302
302
|
top: 50%;
|
|
303
|
-
transform: translateY(-50%);
|
|
303
|
+
transform: translateY(-15px) translateY(-50%);
|
|
304
304
|
}
|
|
305
305
|
.react-flow__attribution {
|
|
306
306
|
font-size: 10px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/BatchProvider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAoC,MAAM,OAAO,CAAC;AAKnF,OAAO,EAAE,KAAK,EAAa,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAU9C;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,EACxF,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,SAAS,CAAC;CACrB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/BatchProvider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAoC,MAAM,OAAO,CAAC;AAKnF,OAAO,EAAE,KAAK,EAAa,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAU9C;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,EACxF,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,SAAS,CAAC;CACrB,2CAkEA;AAED,wBAAgB,eAAe;;;EAQ9B"}
|
package/dist/umd/index.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export { applyNodeChanges, applyEdgeChanges } from './utils/changes';
|
|
|
32
32
|
export { isNode, isEdge } from './utils/general';
|
|
33
33
|
export * from './additional-components';
|
|
34
34
|
export * from './types';
|
|
35
|
-
export { type Align, type SmoothStepPathOptions, type BezierPathOptions, ConnectionLineType, type EdgeMarker, type EdgeMarkerType, MarkerType, type OnMove, type OnMoveStart, type OnMoveEnd, type Connection, ConnectionMode, type OnConnectStartParams, type OnConnectStart, type OnConnect, type OnConnectEnd, type Viewport, type SnapGrid, PanOnScrollMode, type ViewportHelperFunctionOptions, type SetCenterOptions, type FitBoundsOptions, type PanelPosition, type ProOptions, SelectionMode, type SelectionRect, type OnError, type NodeOrigin, type OnSelectionDrag, Position, type XYPosition, type XYZPosition, type Dimensions, type Rect, type Box, type Transform, type CoordinateExtent, type ColorMode, type ColorModeClass, type HandleType, type ShouldResize, type OnResizeStart, type OnResize, type OnResizeEnd, type ControlPosition, type ControlLinePosition, ResizeControlVariant, type ResizeParams, type ResizeParamsWithDirection, type ResizeDragEvent, type NodeChange, type NodeDimensionChange, type NodePositionChange, type NodeSelectionChange, type NodeRemoveChange, type NodeAddChange, type NodeReplaceChange, type EdgeChange, type EdgeSelectionChange, type EdgeRemoveChange, type EdgeAddChange, type EdgeReplaceChange, type KeyCode, type ConnectionState, type FinalConnectionState, type ConnectionInProgress, type NoConnection, type NodeConnection, } from '@xyflow/system';
|
|
35
|
+
export { type Align, type SmoothStepPathOptions, type BezierPathOptions, ConnectionLineType, type EdgeMarker, type EdgeMarkerType, MarkerType, type OnMove, type OnMoveStart, type OnMoveEnd, type Connection, ConnectionMode, type OnConnectStartParams, type OnConnectStart, type OnConnect, type OnConnectEnd, type Viewport, type SnapGrid, PanOnScrollMode, type ViewportHelperFunctionOptions, type SetCenterOptions, type FitBoundsOptions, type PanelPosition, type ProOptions, SelectionMode, type SelectionRect, type OnError, type NodeOrigin, type OnSelectionDrag, Position, type XYPosition, type XYZPosition, type Dimensions, type Rect, type Box, type Transform, type CoordinateExtent, type ColorMode, type ColorModeClass, type HandleType, type ShouldResize, type OnResizeStart, type OnResize, type OnResizeEnd, type ControlPosition, type ControlLinePosition, ResizeControlVariant, type ResizeParams, type ResizeParamsWithDirection, type ResizeDragEvent, type NodeChange, type NodeDimensionChange, type NodePositionChange, type NodeSelectionChange, type NodeRemoveChange, type NodeAddChange, type NodeReplaceChange, type EdgeChange, type EdgeSelectionChange, type EdgeRemoveChange, type EdgeAddChange, type EdgeReplaceChange, type KeyCode, type ConnectionState, type FinalConnectionState, type ConnectionInProgress, type NoConnection, type NodeConnection, type OnReconnect, } from '@xyflow/system';
|
|
36
36
|
import { type Handle as HandleBound } from '@xyflow/system';
|
|
37
37
|
export type Handle = HandleBound;
|
|
38
38
|
export { type GetBezierPathParams, getBezierEdgeCenter, getBezierPath, getEdgeCenter, type GetSmoothStepPathParams, getSmoothStepPath, type GetStraightPathParams, getStraightPath, getViewportForBounds, getNodesBounds, getIncomers, getOutgoers, addEdge, reconnectEdge, getConnectedEdges, } from '@xyflow/system';
|
package/dist/umd/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,KAAK,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAChG,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAk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KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,oBAAoB,EACpB,KAAK,YAAY,EACjB,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,OAAO,EACZ,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,WAAW,GACjB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,KAAK,MAAM,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC5D,MAAM,MAAM,MAAM,GAAG,WAAW,CAAC;AAGjC,OAAO,EACL,KAAK,mBAAmB,EACxB,mBAAmB,EACnB,aAAa,EACb,aAAa,EACb,KAAK,uBAAuB,EAC5B,iBAAiB,EACjB,KAAK,qBAAqB,EAC1B,eAAe,EACf,oBAAoB,EACpB,cAAc,EACd,WAAW,EACX,WAAW,EACX,OAAO,EACP,aAAa,EACb,iBAAiB,GAClB,MAAM,gBAAgB,CAAC"}
|
package/dist/umd/index.js
CHANGED
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/di.exports=function(){if(ui)return hi;ui=1;var e=n,t=pi(),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return hi.useSyncExternalStoreWithSelector=function(e,t,n,c,u){var d=i(null);if(null===d.current){var h={hasValue:!1,value:null};d.current=h}else h=d.current;d=a((function(){function e(e){if(!s){if(s=!0,r=e,e=c(e),void 0!==u&&h.hasValue){var t=h.value;if(u(t,e))return i=t}return i=e}if(t=i,o(r,e))return t;var n=c(e);return void 0!==u&&u(t,n)?t:(r=e,i=n)}var r,i,s=!1,a=void 0===n?null:n;return[function(){return e(t())},null===a?void 0:function(){return e(a())}]}),[t,n,c,u]);var f=r(e,d[0],d[1]);return s((function(){h.hasValue=!0,h.value=f}),[f]),l(f),f},hi}();var mi=ai(di.exports);const yi=e=>{let t;const n=new Set,o=(e,o)=>{const r="function"==typeof e?e(t):e;if(!Object.is(r,t)){const e=t;t=(null!=o?o:"object"!=typeof r)?r:Object.assign({},t,r),n.forEach((n=>n(t,e)))}},r=()=>t,i={setState:o,getState:r,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(o,r,i),i},{useSyncExternalStoreWithSelector:vi}=mi;function xi(e,t=e.getState,o){const r=vi(e.subscribe,e.getState,e.getServerState||e.getState,t,o);return n.useDebugValue(r),r}const wi=(e,t)=>{const n=(e=>e?yi(e):yi)(e),o=(e,o=t)=>xi(n,e,o);return Object.assign(o,n),o},bi=n.createContext(null),Si=bi.Provider,Ci=Qn.error001();function Ei(e,t){const o=n.useContext(bi);if(null===o)throw new Error(Ci);return xi(o,e,t)}function ki(){const e=n.useContext(bi);if(null===e)throw new Error(Ci);return n.useMemo((()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe})),[e])}const Mi={display:"none"},Ni={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},_i="react-flow__node-desc",Pi="react-flow__edge-desc",zi="react-flow__aria-live",Oi=e=>e.ariaLiveMessage;function Ai({rfId:e}){const n=Ei(Oi);return t.jsx("div",{id:`${zi}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:Ni,children:n})}function Ri({rfId:e,disableKeyboardA11y:n}){return t.jsxs(t.Fragment,{children:[t.jsxs("div",{id:`${_i}-${e}`,style:Mi,children:["Press enter or space to select a node.",!n&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "]}),t.jsx("div",{id:`${Pi}-${e}`,style:Mi,children:"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."}),!n&&t.jsx(Ai,{rfId:e})]})}const Ii=e=>e.userSelectionActive?"none":"all",Di=n.forwardRef((({position:e="top-left",children:n,className:o,style:i,...s},a)=>{const l=Ei(Ii),c=`${e}`.split("-");return t.jsx("div",{className:r(["react-flow__panel",o,...c]),style:{...i,pointerEvents:l},ref:a,...s,children:n})}));function $i({proOptions:e,position:n="bottom-right"}){return e?.hideAttribution?null:t.jsx(Di,{position:n,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:t.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}function Li(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,o]of e)if(!Object.is(o,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!Object.is(e[n[o]],t[n[o]]))return!1;return!0}Di.displayName="Panel";const Bi=e=>{const t=[],n=[];for(const[,n]of e.nodeLookup)n.selected&&t.push(n.internals.userNode);for(const[,t]of e.edgeLookup)t.selected&&n.push(t);return{selectedNodes:t,selectedEdges:n}},Ti=e=>e.id;function Vi(e,t){return Li(e.selectedNodes.map(Ti),t.selectedNodes.map(Ti))&&Li(e.selectedEdges.map(Ti),t.selectedEdges.map(Ti))}function ji({onSelectionChange:e}){const t=ki(),{selectedNodes:o,selectedEdges:r}=Ei(Bi,Vi);return n.useEffect((()=>{const n={nodes:o,edges:r};e?.(n),t.getState().onSelectionChangeHandlers.forEach((e=>e(n)))}),[o,r,e]),null}const Hi=e=>!!e.onSelectionChangeHandlers;function Zi({onSelectionChange:e}){const n=Ei(Hi);return e||n?t.jsx(ji,{onSelectionChange:e}):null}const Xi=[0,0],Yi={x:0,y:0,zoom:1},Fi=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","onBeforeDelete","debug","autoPanSpeed","paneClickDistance","rfId"],Wi=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setPaneClickDistance:e.setPaneClickDistance}),Ki={translateExtent:Jn,nodeOrigin:Xi,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1",paneClickDistance:0};function Gi(e){const{setNodes:t,setEdges:o,setMinZoom:r,setMaxZoom:i,setTranslateExtent:s,setNodeExtent:a,reset:l,setDefaultNodesAndEdges:c,setPaneClickDistance:u}=Ei(Wi,Li),d=ki();n.useEffect((()=>(c(e.defaultNodes,e.defaultEdges),()=>{h.current=Ki,l()})),[]);const h=n.useRef(Ki);return n.useEffect((()=>{for(const n of Fi){const l=e[n];l!==h.current[n]&&(void 0!==e[n]&&("nodes"===n?t(l):"edges"===n?o(l):"minZoom"===n?r(l):"maxZoom"===n?i(l):"translateExtent"===n?s(l):"nodeExtent"===n?a(l):"paneClickDistance"===n?u(l):"fitView"===n?d.setState({fitViewQueued:l}):"fitViewOptions"===n?d.setState({fitViewOptions:l}):d.setState({[n]:l})))}h.current=e}),Fi.map((t=>e[t]))),null}function qi(){return"undefined"!=typeof window&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null}const Ui="undefined"!=typeof document?document:null;function Qi(e=null,t={target:Ui,actInsideInputWithModifier:!0}){const[o,r]=n.useState(!1),i=n.useRef(!1),s=n.useRef(new Set([])),[a,l]=n.useMemo((()=>{if(null!==e){const t=(Array.isArray(e)?e:[e]).filter((e=>"string"==typeof e)).map((e=>e.replace("+","\n").replace("\n\n","\n+").split("\n"))),n=t.reduce(((e,t)=>e.concat(...t)),[]);return[t,n]}return[[],[]]}),[e]);return n.useEffect((()=>{const n=t?.target||Ui;if(null!==e){const e=e=>{i.current=e.ctrlKey||e.metaKey||e.shiftKey||e.altKey;if((!i.current||i.current&&!t.actInsideInputWithModifier)&&Qo(e))return!1;const n=es(e.code,l);if(s.current.add(e[n]),Ji(a,s.current,!1)){const n=e.composedPath?.()?.[0]||e.target,o="BUTTON"===n?.nodeName||"A"===n?.nodeName;!1===t.preventDefault||!i.current&&o||e.preventDefault(),r(!0)}},o=e=>{const t=es(e.code,l);Ji(a,s.current,!0)?(r(!1),s.current.clear()):s.current.delete(e[t]),"Meta"===e.key&&s.current.clear(),i.current=!1},c=()=>{s.current.clear(),r(!1)};return n?.addEventListener("keydown",e),n?.addEventListener("keyup",o),window.addEventListener("blur",c),window.addEventListener("contextmenu",c),()=>{n?.removeEventListener("keydown",e),n?.removeEventListener("keyup",o),window.removeEventListener("blur",c),window.removeEventListener("contextmenu",c)}}}),[e,r]),o}function Ji(e,t,n){return e.filter((e=>n||e.length===t.size)).some((e=>e.every((e=>t.has(e)))))}function es(e,t){return t.includes(e)?"code":"key"}const ts=()=>{const e=ki();return n.useMemo((()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:o}=e.getState();return o?o.scaleTo(t,{duration:n?.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[o,r,i],panZoom:s}=e.getState();return s?(await s.setViewport({x:t.x??o,y:t.y??r,zoom:t.zoom??i},{duration:n?.duration}),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,o]=e.getState().transform;return{x:t,y:n,zoom:o}},setCenter:async(t,n,o)=>{const{width:r,height:i,maxZoom:s,panZoom:a}=e.getState(),l=void 0!==o?.zoom?o.zoom:s,c=r/2-t*l,u=i/2-n*l;return a?(await a.setViewport({x:c,y:u,zoom:l},{duration:o?.duration}),Promise.resolve(!0)):Promise.resolve(!1)},fitBounds:async(t,n)=>{const{width:o,height:r,minZoom:i,maxZoom:s,panZoom:a}=e.getState(),l=jo(t,o,r,i,s,n?.padding??.1);return a?(await a.setViewport(l,{duration:n?.duration}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:o,snapGrid:r,snapToGrid:i,domNode:s}=e.getState();if(!s)return t;const{x:a,y:l}=s.getBoundingClientRect(),c={x:t.x-a,y:t.y-l},u=n.snapGrid??r,d=n.snapToGrid??i;return Bo(c,o,d,u)},flowToScreenPosition:t=>{const{transform:n,domNode:o}=e.getState();if(!o)return t;const{x:r,y:i}=o.getBoundingClientRect(),s=To(t,n);return{x:s.x+r,y:s.y+i}}})),[])};function ns(e,t){const n=[],o=new Map,r=[];for(const t of e)if("add"!==t.type)if("remove"===t.type||"replace"===t.type)o.set(t.id,[t]);else{const e=o.get(t.id);e?e.push(t):o.set(t.id,[t])}else r.push(t);for(const e of t){const t=o.get(e.id);if(!t){n.push(e);continue}if("remove"===t[0].type)continue;if("replace"===t[0].type){n.push({...t[0].item});continue}const r={...e};for(const e of t)os(e,r);n.push(r)}return r.length&&r.forEach((e=>{void 0!==e.index?n.splice(e.index,0,{...e.item}):n.push({...e.item})})),n}function os(e,t){switch(e.type){case"select":t.selected=e.selected;break;case"position":void 0!==e.position&&(t.position=e.position),void 0!==e.dragging&&(t.dragging=e.dragging);break;case"dimensions":void 0!==e.dimensions&&(t.measured??={},t.measured.width=e.dimensions.width,t.measured.height=e.dimensions.height,e.setAttributes&&(!0!==e.setAttributes&&"width"!==e.setAttributes||(t.width=e.dimensions.width),!0!==e.setAttributes&&"height"!==e.setAttributes||(t.height=e.dimensions.height))),"boolean"==typeof e.resizing&&(t.resizing=e.resizing)}}function rs(e,t){return ns(e,t)}function is(e,t){return ns(e,t)}function ss(e,t){return{id:e,type:"select",selected:t}}function as(e,t=new Set,n=!1){const o=[];for(const[r,i]of e){const e=t.has(r);void 0===i.selected&&!e||i.selected===e||(n&&(i.selected=e),o.push(ss(i.id,e)))}return o}function ls({items:e=[],lookup:t}){const n=[],o=new Map(e.map((e=>[e.id,e])));for(const[o,r]of e.entries()){const e=t.get(r.id),i=e?.internals?.userNode??e;void 0!==i&&i!==r&&n.push({id:r.id,item:r,type:"replace"}),void 0===i&&n.push({item:r,type:"add",index:o})}for(const[e]of t){void 0===o.get(e)&&n.push({id:e,type:"remove"})}return n}function cs(e){return{id:e.id,type:"remove"}}const us=e=>(e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e))(e),ds=e=>fo(e);function hs(e){return n.forwardRef(e)}const fs="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function gs(e){const[t,o]=n.useState(BigInt(0)),[r]=n.useState((()=>function(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}((()=>o((e=>e+BigInt(1)))))));return fs((()=>{const t=r.get();t.length&&(e(t),r.reset())}),[t]),r}const ps=n.createContext(null);function ms({children:e}){const o=ki(),r=gs(n.useCallback((e=>{const{nodes:t=[],setNodes:n,hasDefaultNodes:r,onNodesChange:i,nodeLookup:s,fitViewQueued:a}=o.getState();let l=t;for(const t of e)l="function"==typeof t?t(l):t;if(r)n(l);else{const e=ls({items:l,lookup:s});e.length>0?i?.(e):a&&window.requestAnimationFrame((()=>{const{fitViewQueued:e,nodes:t,setNodes:n}=o.getState();e&&n(t)}))}}),[])),i=gs(n.useCallback((e=>{const{edges:t=[],setEdges:n,hasDefaultEdges:r,onEdgesChange:i,edgeLookup:s}=o.getState();let a=t;for(const t of e)a="function"==typeof t?t(a):t;r?n(a):i&&i(ls({items:a,lookup:s}))}),[])),s=n.useMemo((()=>({nodeQueue:r,edgeQueue:i})),[]);return t.jsx(ps.Provider,{value:s,children:e})}const ys=e=>!!e.panZoom;function vs(){const e=ts(),t=ki(),o=function(){const e=n.useContext(ps);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}(),r=Ei(ys),i=n.useMemo((()=>{const e=e=>t.getState().nodeLookup.get(e),n=e=>{o.nodeQueue.push(e)},r=e=>{o.edgeQueue.push(e)},i=e=>{const{nodeLookup:n,nodeOrigin:o}=t.getState(),r=us(e)?e:n.get(e.id),i=r.parentId?Fo(r.position,r.measured,r.parentId,n,o):r.position,s={...r,position:i,width:r.measured?.width??r.width,height:r.measured?.height??r.height};return zo(s)},s=(e,t,o={replace:!1})=>{n((n=>n.map((n=>{if(n.id===e){const e="function"==typeof t?t(n):t;return o.replace&&us(e)?e:{...n,...e}}return n}))))},a=(e,t,n={replace:!1})=>{r((o=>o.map((o=>{if(o.id===e){const e="function"==typeof t?t(o):t;return n.replace&&ds(e)?e:{...o,...e}}return o}))))};return{getNodes:()=>t.getState().nodes.map((e=>({...e}))),getNode:t=>e(t)?.internals.userNode,getInternalNode:e,getEdges:()=>{const{edges:e=[]}=t.getState();return e.map((e=>({...e})))},getEdge:e=>t.getState().edgeLookup.get(e),setNodes:n,setEdges:r,addNodes:e=>{const t=Array.isArray(e)?e:[e];o.nodeQueue.push((e=>[...e,...t]))},addEdges:e=>{const t=Array.isArray(e)?e:[e];o.edgeQueue.push((e=>[...e,...t]))},toObject:()=>{const{nodes:e=[],edges:n=[],transform:o}=t.getState(),[r,i,s]=o;return{nodes:e.map((e=>({...e}))),edges:n.map((e=>({...e}))),viewport:{x:r,y:i,zoom:s}}},deleteElements:async({nodes:e=[],edges:n=[]})=>{const{nodes:o,edges:r,onNodesDelete:i,onEdgesDelete:s,triggerNodeChanges:a,triggerEdgeChanges:l,onDelete:c,onBeforeDelete:u}=t.getState(),{nodes:d,edges:h}=await async function({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:o,onBeforeDelete:r}){const i=new Set(e.map((e=>e.id))),s=[];for(const e of n){if(!1===e.deletable)continue;const t=i.has(e.id),n=!t&&e.parentId&&s.find((t=>t.id===e.parentId));(t||n)&&s.push(e)}const a=new Set(t.map((e=>e.id))),l=o.filter((e=>!1!==e.deletable)),c=xo(s,l);for(const e of l)a.has(e.id)&&!c.find((t=>t.id===e.id))&&c.push(e);if(!r)return{edges:c,nodes:s};const u=await r({nodes:s,edges:c});return"boolean"==typeof u?u?{edges:c,nodes:s}:{edges:[],nodes:[]}:u}({nodesToRemove:e,edgesToRemove:n,nodes:o,edges:r,onBeforeDelete:u}),f=h.length>0,g=d.length>0;if(f){const e=h.map(cs);s?.(h),l(e)}if(g){const e=d.map(cs);i?.(d),a(e)}return(g||f)&&c?.({nodes:d,edges:h}),{deletedNodes:d,deletedEdges:h}},getIntersectingNodes:(e,n=!0,o)=>{const r=Io(e),s=r?e:i(e),a=void 0!==o;return s?(o||t.getState().nodes).filter((o=>{const i=t.getState().nodeLookup.get(o.id);if(i&&!r&&(o.id===e.id||!i.internals.positionAbsolute))return!1;const l=zo(a?o:i),c=Ro(l,s);return n&&c>0||c>=s.width*s.height})):[]},isNodeIntersecting:(e,t,n=!0)=>{const o=Io(e)?e:i(e);if(!o)return!1;const r=Ro(o,t);return n&&r>0||r>=o.width*o.height},updateNode:s,updateNodeData:(e,t,n={replace:!1})=>{s(e,(e=>{const o="function"==typeof t?t(e):t;return n.replace?{...e,data:o}:{...e,data:{...e.data,...o}}}),n)},updateEdge:a,updateEdgeData:(e,t,n={replace:!1})=>{a(e,(e=>{const o="function"==typeof t?t(e):t;return n.replace?{...e,data:o}:{...e,data:{...e.data,...o}}}),n)},getNodesBounds:e=>{const{nodeLookup:n,nodeOrigin:o}=t.getState();return mo(e,{nodeLookup:n,nodeOrigin:o})},getHandleConnections:({type:e,id:n,nodeId:o})=>Array.from(t.getState().connectionLookup.get(`${o}-${e}${n?`-${n}`:""}`)?.values()??[]),getNodeConnections:({type:e,handleId:n,nodeId:o})=>Array.from(t.getState().connectionLookup.get(`${o}${e?n?`-${e}-${n}`:`-${e}`:""}`)?.values()??[]),fitView:async e=>{const n=t.getState().fitViewResolver??function(){let e,t;return{promise:new Promise(((n,o)=>{e=n,t=o})),resolve:e,reject:t}}();return t.setState({fitViewQueued:!0,fitViewOptions:e,fitViewResolver:n}),o.nodeQueue.push((e=>[...e])),n.promise}}}),[]);return n.useMemo((()=>({...i,...e,viewportInitialized:r})),[r])}const xs=e=>e.selected,ws={actInsideInputWithModifier:!1},bs="undefined"!=typeof window?window:void 0;const Ss={position:"absolute",width:"100%",height:"100%",top:0,left:0},Cs=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib});function Es({onPaneContextMenu:o,zoomOnScroll:r=!0,zoomOnPinch:i=!0,panOnScroll:s=!1,panOnScrollSpeed:a=.5,panOnScrollMode:l=e.PanOnScrollMode.Free,zoomOnDoubleClick:c=!0,panOnDrag:u=!0,defaultViewport:d,translateExtent:h,minZoom:f,maxZoom:g,zoomActivationKeyCode:p,preventScrolling:m=!0,children:y,noWheelClassName:v,noPanClassName:x,onViewportChange:w,isControlledViewport:b,paneClickDistance:S}){const C=ki(),E=n.useRef(null),{userSelectionActive:k,lib:M}=Ei(Cs,Li),N=Qi(p),_=n.useRef();!function(e){const t=ki();n.useEffect((()=>{const n=()=>{if(!e.current)return!1;const n=Go(e.current);0!==n.height&&0!==n.width||t.getState().onError?.("004",Qn.error004()),t.setState({width:n.width||500,height:n.height||500})};if(e.current){n(),window.addEventListener("resize",n);const t=new ResizeObserver((()=>n()));return t.observe(e.current),()=>{window.removeEventListener("resize",n),t&&e.current&&t.unobserve(e.current)}}}),[])}(E);const P=n.useCallback((e=>{w?.({x:e[0],y:e[1],zoom:e[2]}),b||C.setState({transform:e})}),[w,b]);return n.useEffect((()=>{if(E.current){_.current=Gr({domNode:E.current,minZoom:f,maxZoom:g,translateExtent:h,viewport:d,paneClickDistance:S,onDraggingChange:e=>C.setState({paneDragging:e}),onPanZoomStart:(e,t)=>{const{onViewportChangeStart:n,onMoveStart:o}=C.getState();o?.(e,t),n?.(t)},onPanZoom:(e,t)=>{const{onViewportChange:n,onMove:o}=C.getState();o?.(e,t),n?.(t)},onPanZoomEnd:(e,t)=>{const{onViewportChangeEnd:n,onMoveEnd:o}=C.getState();o?.(e,t),n?.(t)}});const{x:e,y:t,zoom:n}=_.current.getViewport();return C.setState({panZoom:_.current,transform:[e,t,n],domNode:E.current.closest(".react-flow")}),()=>{_.current?.destroy()}}}),[]),n.useEffect((()=>{_.current?.update({onPaneContextMenu:o,zoomOnScroll:r,zoomOnPinch:i,panOnScroll:s,panOnScrollSpeed:a,panOnScrollMode:l,zoomOnDoubleClick:c,panOnDrag:u,zoomActivationKeyPressed:N,preventScrolling:m,noPanClassName:x,userSelectionActive:k,noWheelClassName:v,lib:M,onTransformChange:P})}),[o,r,i,s,a,l,c,u,N,m,x,k,v,M,P]),t.jsx("div",{className:"react-flow__renderer",ref:E,style:Ss,children:y})}const ks=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Ms(){const{userSelectionActive:e,userSelectionRect:n}=Ei(ks,Li);return e&&n?t.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:n.width,height:n.height,transform:`translate(${n.x}px, ${n.y}px)`}}):null}const Ns=(e,t)=>n=>{n.target===t.current&&e?.(n)},_s=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function Ps({isSelecting:o,selectionKeyPressed:i,selectionMode:s=e.SelectionMode.Full,panOnDrag:a,selectionOnDrag:l,onSelectionStart:c,onSelectionEnd:u,onPaneClick:d,onPaneContextMenu:h,onPaneScroll:f,onPaneMouseEnter:g,onPaneMouseMove:p,onPaneMouseLeave:m,children:y}){const v=ki(),{userSelectionActive:x,elementsSelectable:w,dragging:b,connectionInProgress:S}=Ei(_s,Li),C=w&&(o||x),E=n.useRef(null),k=n.useRef(),M=n.useRef(new Set),N=n.useRef(new Set),_=n.useRef(!1),P=n.useRef(!1),z=e=>{_.current||S?_.current=!1:(d?.(e),v.getState().resetSelectedElements(),v.setState({nodesSelectionActive:!1}))},O=f?e=>f(e):void 0,A=!0===a||Array.isArray(a)&&a.includes(0);return t.jsxs("div",{className:r(["react-flow__pane",{draggable:A,dragging:b,selection:o}]),onClick:C?void 0:Ns(z,E),onContextMenu:Ns((e=>{Array.isArray(a)&&a?.includes(2)?e.preventDefault():h?.(e)}),E),onWheel:Ns(O,E),onPointerEnter:C?void 0:g,onPointerDown:C?e=>{const{resetSelectedElements:t,domNode:n}=v.getState();if(k.current=n?.getBoundingClientRect(),!w||!o||0!==e.button||e.target!==E.current||!k.current)return;e.target?.setPointerCapture?.(e.pointerId),P.current=!0,_.current=!1;const{x:r,y:i}=er(e.nativeEvent,k.current);t(),v.setState({userSelectionRect:{width:0,height:0,startX:r,startY:i,x:r,y:i}}),c?.(e)}:p,onPointerMove:C?t=>{const{userSelectionRect:n,transform:o,nodeLookup:r,edgeLookup:i,connectionLookup:a,triggerNodeChanges:l,triggerEdgeChanges:c,defaultEdgeOptions:u}=v.getState();if(!k.current||!n)return;_.current=!0;const{x:d,y:h}=er(t.nativeEvent,k.current),{startX:f,startY:g}=n,p={startX:f,startY:g,x:d<f?d:f,y:h<g?h:g,width:Math.abs(d-f),height:Math.abs(h-g)},m=M.current,y=N.current;M.current=new Set(vo(r,p,o,s===e.SelectionMode.Partial,!0).map((e=>e.id))),N.current=new Set;const x=u?.selectable??!0;for(const e of M.current){const t=a.get(e);if(t)for(const{edgeId:e}of t.values()){const t=i.get(e);t&&(t.selectable??x)&&N.current.add(e)}}if(!Wo(m,M.current)){l(as(r,M.current,!0))}if(!Wo(y,N.current)){c(as(i,N.current))}v.setState({userSelectionRect:p,userSelectionActive:!0,nodesSelectionActive:!1})}:p,onPointerUp:C?e=>{if(0!==e.button||!P.current)return;e.target?.releasePointerCapture?.(e.pointerId);const{userSelectionRect:t}=v.getState();!x&&t&&e.target===E.current&&z?.(e),v.setState({userSelectionActive:!1,userSelectionRect:null,nodesSelectionActive:M.current.size>0}),u?.(e),(i||l)&&(_.current=!1),P.current=!1}:void 0,onPointerLeave:m,ref:E,style:Ss,children:[y,t.jsx(Ms,{})]})}function zs({id:e,store:t,unselect:n=!1,nodeRef:o}){const{addSelectedNodes:r,unselectNodesAndEdges:i,multiSelectionActive:s,nodeLookup:a,onError:l}=t.getState(),c=a.get(e);c?(t.setState({nodesSelectionActive:!1}),c.selected?(n||c.selected&&s)&&(i({nodes:[c],edges:[]}),requestAnimationFrame((()=>o?.current?.blur()))):r([e])):l?.("012",Qn.error012(e))}function Os({nodeRef:e,disabled:t=!1,noDragClassName:o,handleSelector:r,nodeId:i,isSelectable:s,nodeClickDistance:a}){const l=ki(),[c,u]=n.useState(!1),d=n.useRef();return n.useEffect((()=>{d.current=Ir({getStoreItems:()=>l.getState(),onNodeMouseDown:t=>{zs({id:t,store:l,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})}),[]),n.useEffect((()=>{if(t)d.current?.destroy();else if(e.current)return d.current?.update({noDragClassName:o,handleSelector:r,domNode:e.current,isSelectable:s,nodeId:i,nodeClickDistance:a}),()=>{d.current?.destroy()}}),[o,r,t,s,e,i]),c}const As=e=>t=>t.selected&&(t.draggable||e&&void 0===t.draggable);function Rs(){const e=ki();return n.useCallback((t=>{const{nodeExtent:n,snapToGrid:o,snapGrid:r,nodesDraggable:i,onError:s,updateNodePositions:a,nodeLookup:l,nodeOrigin:c}=e.getState(),u=new Map,d=As(i),h=o?r[0]:5,f=o?r[1]:5,g=t.direction.x*h*t.factor,p=t.direction.y*f*t.factor;for(const[,e]of l){if(!d(e))continue;let t={x:e.internals.positionAbsolute.x+g,y:e.internals.positionAbsolute.y+p};o&&(t=Lo(t,r));const{position:i,positionAbsolute:a}=bo({nodeId:e.id,nextPosition:t,nodeLookup:l,nodeExtent:n,nodeOrigin:c,onError:s});e.position=i,e.internals.positionAbsolute=a,u.set(e.id,e)}a(u)}),[])}const Is=n.createContext(null),Ds=Is.Provider;Is.Consumer;const $s=()=>n.useContext(Is),Ls=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId});const Bs=n.memo(hs((function({type:n="source",position:o=e.Position.Top,isValidConnection:i,isConnectable:s=!0,isConnectableStart:a=!0,isConnectableEnd:l=!0,id:c,onConnect:u,children:d,className:h,onMouseDown:f,onTouchStart:g,...p},m){const y=c||null,v="target"===n,x=ki(),w=$s(),{connectOnClick:b,noPanClassName:S,rfId:C}=Ei(Ls,Li),{connectingFrom:E,connectingTo:k,clickConnecting:M,isPossibleEndHandle:N,connectionInProcess:_,clickConnectionInProcess:P,valid:z}=Ei(((t,n,o)=>r=>{const{connectionClickStartHandle:i,connectionMode:s,connection:a}=r,{fromHandle:l,toHandle:c,isValid:u}=a,d=c?.nodeId===t&&c?.id===n&&c?.type===o;return{connectingFrom:l?.nodeId===t&&l?.id===n&&l?.type===o,connectingTo:d,clickConnecting:i?.nodeId===t&&i?.id===n&&i?.type===o,isPossibleEndHandle:s===e.ConnectionMode.Strict?l?.type!==o:t!==l?.nodeId||n!==l?.id,connectionInProcess:!!l,clickConnectionInProcess:!!i,valid:d&&u}})(w,y,n),Li);w||x.getState().onError?.("010",Qn.error010());const O=e=>{const{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:o}=x.getState(),r={...t,...e};if(o){const{edges:e,setEdges:t}=x.getState();t(cr(r,e))}n?.(r),u?.(r)},A=e=>{if(!w)return;const t=Jo(e.nativeEvent);if(a&&(t&&0===e.button||!t)){const t=x.getState();jr.onPointerDown(e.nativeEvent,{autoPanOnConnect:t.autoPanOnConnect,connectionMode:t.connectionMode,connectionRadius:t.connectionRadius,domNode:t.domNode,nodeLookup:t.nodeLookup,lib:t.lib,isTarget:v,handleId:y,nodeId:w,flowId:t.rfId,panBy:t.panBy,cancelConnection:t.cancelConnection,onConnectStart:t.onConnectStart,onConnectEnd:t.onConnectEnd,updateConnection:t.updateConnection,onConnect:O,isValidConnection:i||t.isValidConnection,getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,autoPanSpeed:t.autoPanSpeed})}t?f?.(e):g?.(e)};return t.jsx("div",{"data-handleid":y,"data-nodeid":w,"data-handlepos":o,"data-id":`${C}-${w}-${y}-${n}`,className:r(["react-flow__handle",`react-flow__handle-${o}`,"nodrag",S,h,{source:!v,target:v,connectable:s,connectablestart:a,connectableend:l,clickconnecting:M,connectingfrom:E,connectingto:k,valid:z,connectionindicator:s&&(!_||N)&&(_||P?l:a)}]),onMouseDown:A,onTouchStart:A,onClick:b?e=>{const{onClickConnectStart:t,onClickConnectEnd:o,connectionClickStartHandle:r,connectionMode:s,isValidConnection:l,lib:c,rfId:u,nodeLookup:d,connection:h}=x.getState();if(!w||!r&&!a)return;if(!r)return t?.(e.nativeEvent,{nodeId:w,handleId:y,handleType:n}),void x.setState({connectionClickStartHandle:{nodeId:w,type:n,id:y}});const f=qo(e.target),g=i||l,{connection:p,isValid:m}=jr.isValid(e.nativeEvent,{handle:{nodeId:w,id:y,type:n},connectionMode:s,fromNodeId:r.nodeId,fromHandleId:r.id||null,fromType:r.type,isValidConnection:g,flowId:u,doc:f,lib:c,nodeLookup:d});m&&p&&O(p);const v=structuredClone(h);delete v.inProgress,v.toPosition=v.toHandle?v.toHandle.position:null,o?.(e,v),x.setState({connectionClickStartHandle:null})}:void 0,ref:m,...p,children:d})})));const Ts={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Vs={input:function({data:n,isConnectable:o,sourcePosition:r=e.Position.Bottom}){return t.jsxs(t.Fragment,{children:[n?.label,t.jsx(Bs,{type:"source",position:r,isConnectable:o})]})},default:function({data:n,isConnectable:o,targetPosition:r=e.Position.Top,sourcePosition:i=e.Position.Bottom}){return t.jsxs(t.Fragment,{children:[t.jsx(Bs,{type:"target",position:r,isConnectable:o}),n?.label,t.jsx(Bs,{type:"source",position:i,isConnectable:o})]})},output:function({data:n,isConnectable:o,targetPosition:r=e.Position.Top}){return t.jsxs(t.Fragment,{children:[t.jsx(Bs,{type:"target",position:r,isConnectable:o}),n?.label]})},group:function(){return null}};const js=e=>{const{width:t,height:n,x:o,y:r}=yo(e.nodeLookup,{filter:e=>!!e.selected});return{width:Do(t)?t:null,height:Do(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${o}px,${r}px)`}};function Hs({onSelectionContextMenu:e,noPanClassName:o,disableKeyboardA11y:i}){const s=ki(),{width:a,height:l,transformString:c,userSelectionActive:u}=Ei(js,Li),d=Rs(),h=n.useRef(null);if(n.useEffect((()=>{i||h.current?.focus({preventScroll:!0})}),[i]),Os({nodeRef:h}),u||!a||!l)return null;const f=e?t=>{const n=s.getState().nodes.filter((e=>e.selected));e(t,n)}:void 0;return t.jsx("div",{className:r(["react-flow__nodesselection","react-flow__container",o]),style:{transform:c},children:t.jsx("div",{ref:h,className:"react-flow__nodesselection-rect",onContextMenu:f,tabIndex:i?void 0:-1,onKeyDown:i?void 0:e=>{Object.prototype.hasOwnProperty.call(Ts,e.key)&&(e.preventDefault(),d({direction:Ts[e.key],factor:e.shiftKey?4:1}))},style:{width:a,height:l}})})}const Zs="undefined"!=typeof window?window:void 0,Xs=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function Ys({children:e,onPaneClick:o,onPaneMouseEnter:r,onPaneMouseMove:i,onPaneMouseLeave:s,onPaneContextMenu:a,onPaneScroll:l,paneClickDistance:c,deleteKeyCode:u,selectionKeyCode:d,selectionOnDrag:h,selectionMode:f,onSelectionStart:g,onSelectionEnd:p,multiSelectionKeyCode:m,panActivationKeyCode:y,zoomActivationKeyCode:v,elementsSelectable:x,zoomOnScroll:w,zoomOnPinch:b,panOnScroll:S,panOnScrollSpeed:C,panOnScrollMode:E,zoomOnDoubleClick:k,panOnDrag:M,defaultViewport:N,translateExtent:_,minZoom:P,maxZoom:z,preventScrolling:O,onSelectionContextMenu:A,noWheelClassName:R,noPanClassName:I,disableKeyboardA11y:D,onViewportChange:$,isControlledViewport:L}){const{nodesSelectionActive:B,userSelectionActive:T}=Ei(Xs),V=Qi(d,{target:Zs}),j=Qi(y,{target:Zs}),H=j||M,Z=j||S,X=h&&!0!==H,Y=V||T||X;return function({deleteKeyCode:e,multiSelectionKeyCode:t}){const o=ki(),{deleteElements:r}=vs(),i=Qi(e,ws),s=Qi(t,{target:bs});n.useEffect((()=>{if(i){const{edges:e,nodes:t}=o.getState();r({nodes:t.filter(xs),edges:e.filter(xs)}),o.setState({nodesSelectionActive:!1})}}),[i]),n.useEffect((()=>{o.setState({multiSelectionActive:s})}),[s])}({deleteKeyCode:u,multiSelectionKeyCode:m}),t.jsx(Es,{onPaneContextMenu:a,elementsSelectable:x,zoomOnScroll:w,zoomOnPinch:b,panOnScroll:Z,panOnScrollSpeed:C,panOnScrollMode:E,zoomOnDoubleClick:k,panOnDrag:!V&&H,defaultViewport:N,translateExtent:_,minZoom:P,maxZoom:z,zoomActivationKeyCode:v,preventScrolling:O,noWheelClassName:R,noPanClassName:I,onViewportChange:$,isControlledViewport:L,paneClickDistance:c,children:t.jsxs(Ps,{onSelectionStart:g,onSelectionEnd:p,onPaneClick:o,onPaneMouseEnter:r,onPaneMouseMove:i,onPaneMouseLeave:s,onPaneContextMenu:a,onPaneScroll:l,panOnDrag:H,isSelecting:!!Y,selectionMode:f,selectionKeyPressed:V,selectionOnDrag:X,children:[e,B&&t.jsx(Hs,{onSelectionContextMenu:A,noPanClassName:I,disableKeyboardA11y:D})]})})}Ys.displayName="FlowRenderer";const Fs=n.memo(Ys),Ws=e=>t=>e?vo(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map((e=>e.id)):Array.from(t.nodeLookup.keys());const Ks=e=>e.updateNodeInternals;function Gs({id:e,onClick:o,onMouseEnter:i,onMouseMove:s,onMouseLeave:a,onContextMenu:l,onDoubleClick:c,nodesDraggable:u,elementsSelectable:d,nodesConnectable:h,nodesFocusable:f,resizeObserver:g,noDragClassName:p,noPanClassName:m,disableKeyboardA11y:y,rfId:v,nodeTypes:x,nodeClickDistance:w,onError:b}){const{node:S,internals:C,isParent:E}=Ei((t=>{const n=t.nodeLookup.get(e),o=t.parentLookup.has(e);return{node:n,internals:n.internals,isParent:o}}),Li);let k=S.type||"default",M=x?.[k]||Vs[k];void 0===M&&(b?.("003",Qn.error003(k)),k="default",M=Vs.default);const N=!!(S.draggable||u&&void 0===S.draggable),_=!!(S.selectable||d&&void 0===S.selectable),P=!!(S.connectable||h&&void 0===S.connectable),z=!!(S.focusable||f&&void 0===S.focusable),O=ki(),A=Yo(S),R=function({node:e,nodeType:t,hasDimensions:o,resizeObserver:r}){const i=ki(),s=n.useRef(null),a=n.useRef(null),l=n.useRef(e.sourcePosition),c=n.useRef(e.targetPosition),u=n.useRef(t),d=o&&!!e.internals.handleBounds;return n.useEffect((()=>{!s.current||e.hidden||d&&a.current===s.current||(a.current&&r?.unobserve(a.current),r?.observe(s.current),a.current=s.current)}),[d,e.hidden]),n.useEffect((()=>()=>{a.current&&(r?.unobserve(a.current),a.current=null)}),[]),n.useEffect((()=>{if(s.current){const n=u.current!==t,o=l.current!==e.sourcePosition,r=c.current!==e.targetPosition;(n||o||r)&&(u.current=t,l.current=e.sourcePosition,c.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:s.current,force:!0}]])))}}),[e.id,t,e.sourcePosition,e.targetPosition]),s}({node:S,nodeType:k,hasDimensions:A,resizeObserver:g}),I=Os({nodeRef:R,disabled:S.hidden||!N,noDragClassName:p,handleSelector:S.dragHandle,nodeId:e,isSelectable:_,nodeClickDistance:w}),D=Rs();if(S.hidden)return null;const $=Xo(S),L=function(e){return void 0===e.internals.handleBounds?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}(S),B=_||N||o||i||s||a,T=i?e=>i(e,{...C.userNode}):void 0,V=s?e=>s(e,{...C.userNode}):void 0,j=a?e=>a(e,{...C.userNode}):void 0,H=l?e=>l(e,{...C.userNode}):void 0,Z=c?e=>c(e,{...C.userNode}):void 0;return t.jsx("div",{className:r(["react-flow__node",`react-flow__node-${k}`,{[m]:N},S.className,{selected:S.selected,selectable:_,parent:E,draggable:N,dragging:I}]),ref:R,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:B?"all":"none",visibility:A?"visible":"hidden",...S.style,...L},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:T,onMouseMove:V,onMouseLeave:j,onContextMenu:H,onClick:t=>{const{selectNodesOnDrag:n,nodeDragThreshold:r}=O.getState();_&&(!n||!N||r>0)&&zs({id:e,store:O,nodeRef:R}),o&&o(t,{...C.userNode})},onDoubleClick:Z,onKeyDown:z?t=>{if(!Qo(t.nativeEvent)&&!y)if(eo.includes(t.key)&&_){const n="Escape"===t.key;zs({id:e,store:O,unselect:n,nodeRef:R})}else N&&S.selected&&Object.prototype.hasOwnProperty.call(Ts,t.key)&&(t.preventDefault(),O.setState({ariaLiveMessage:`Moved selected node ${t.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~C.positionAbsolute.x}, y: ${~~C.positionAbsolute.y}`}),D({direction:Ts[t.key],factor:t.shiftKey?4:1}))}:void 0,tabIndex:z?0:void 0,role:z?"button":void 0,"aria-describedby":y?void 0:`${_i}-${v}`,"aria-label":S.ariaLabel,children:t.jsx(Ds,{value:e,children:t.jsx(M,{id:e,data:S.data,type:k,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:S.selected??!1,selectable:_,draggable:N,deletable:S.deletable??!0,isConnectable:P,sourcePosition:S.sourcePosition,targetPosition:S.targetPosition,dragging:I,dragHandle:S.dragHandle,zIndex:C.z,parentId:S.parentId,...$})})})}const qs=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function Us(e){const{nodesDraggable:o,nodesConnectable:r,nodesFocusable:i,elementsSelectable:s,onError:a}=Ei(qs,Li),l=(c=e.onlyRenderVisibleElements,Ei(n.useCallback(Ws(c),[c]),Li));var c;const u=function(){const e=Ei(Ks),[t]=n.useState((()=>"undefined"==typeof ResizeObserver?null:new ResizeObserver((t=>{const n=new Map;t.forEach((e=>{const t=e.target.getAttribute("data-id");n.set(t,{id:t,nodeElement:e.target,force:!0})})),e(n)}))));return n.useEffect((()=>()=>{t?.disconnect()}),[t]),t}();return t.jsx("div",{className:"react-flow__nodes",style:Ss,children:l.map((n=>t.jsx(Gs,{id:n,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:u,nodesDraggable:o,nodesConnectable:r,nodesFocusable:i,elementsSelectable:s,nodeClickDistance:e.nodeClickDistance,onError:a},n)))})}Us.displayName="NodeRenderer";const Qs=n.memo(Us);const Js={[e.MarkerType.Arrow]:({color:e="none",strokeWidth:n=1})=>t.jsx("polyline",{style:{stroke:e,strokeWidth:n},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),[e.MarkerType.ArrowClosed]:({color:e="none",strokeWidth:n=1})=>t.jsx("polyline",{style:{stroke:e,fill:e,strokeWidth:n},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})};const ea=({id:e,type:o,color:r,width:i=12.5,height:s=12.5,markerUnits:a="strokeWidth",strokeWidth:l,orient:c="auto-start-reverse"})=>{const u=function(e){const t=ki();return n.useMemo((()=>Object.prototype.hasOwnProperty.call(Js,e)?Js[e]:(t.getState().onError?.("009",Qn.error009(e)),null)),[e])}(o);return u?t.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${i}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:c,refX:"0",refY:"0",children:t.jsx(u,{color:r,strokeWidth:l})}):null},ta=({defaultColor:e,rfId:o})=>{const r=Ei((e=>e.edges)),i=Ei((e=>e.defaultEdgeOptions)),s=n.useMemo((()=>{const t=function(e,{id:t,defaultColor:n,defaultMarkerStart:o,defaultMarkerEnd:r}){const i=new Set;return e.reduce(((e,s)=>([s.markerStart||o,s.markerEnd||r].forEach((o=>{if(o&&"object"==typeof o){const r=xr(o,t);i.has(r)||(e.push({id:r,color:o.color||n,...o}),i.add(r))}})),e)),[]).sort(((e,t)=>e.id.localeCompare(t.id)))}(r,{id:o,defaultColor:e,defaultMarkerStart:i?.markerStart,defaultMarkerEnd:i?.markerEnd});return t}),[r,i,o,e]);return s.length?t.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:t.jsx("defs",{children:s.map((e=>t.jsx(ea,{id:e.id,type:e.type,color:e.color,width:e.width,height:e.height,markerUnits:e.markerUnits,strokeWidth:e.strokeWidth,orient:e.orient},e.id)))})}):null};ta.displayName="MarkerDefinitions";var na=n.memo(ta);function oa({x:e,y:o,label:i,labelStyle:s,labelShowBg:a=!0,labelBgStyle:l,labelBgPadding:c=[2,4],labelBgBorderRadius:u=2,children:d,className:h,...f}){const[g,p]=n.useState({x:1,y:0,width:0,height:0}),m=r(["react-flow__edge-textwrapper",h]),y=n.useRef(null);return n.useEffect((()=>{if(y.current){const e=y.current.getBBox();p({x:e.x,y:e.y,width:e.width,height:e.height})}}),[i]),i?t.jsxs("g",{transform:`translate(${e-g.width/2} ${o-g.height/2})`,className:m,visibility:g.width?"visible":"hidden",...f,children:[a&&t.jsx("rect",{width:g.width+2*c[0],x:-c[0],y:-c[1],height:g.height+2*c[1],className:"react-flow__edge-textbg",style:l,rx:u,ry:u}),t.jsx("text",{className:"react-flow__edge-text",y:g.height/2,dy:"0.3em",ref:y,style:s,children:i}),d]}):null}oa.displayName="EdgeText";const ra=n.memo(oa);function ia({path:e,labelX:n,labelY:o,label:i,labelStyle:s,labelShowBg:a,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:u,interactionWidth:d=20,...h}){return t.jsxs(t.Fragment,{children:[t.jsx("path",{...h,d:e,fill:"none",className:r(["react-flow__edge-path",h.className])}),d&&t.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:d,className:"react-flow__edge-interaction"}),i&&Do(n)&&Do(o)?t.jsx(ra,{x:n,y:o,label:i,labelStyle:s,labelShowBg:a,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:u}):null]})}function sa({pos:t,x1:n,y1:o,x2:r,y2:i}){return t===e.Position.Left||t===e.Position.Right?[.5*(n+r),o]:[n,.5*(o+i)]}function aa({sourceX:t,sourceY:n,sourcePosition:o=e.Position.Bottom,targetX:r,targetY:i,targetPosition:s=e.Position.Top}){const[a,l]=sa({pos:o,x1:t,y1:n,x2:r,y2:i}),[c,u]=sa({pos:s,x1:r,y1:i,x2:t,y2:n}),[d,h,f,g]=nr({sourceX:t,sourceY:n,targetX:r,targetY:i,sourceControlX:a,sourceControlY:l,targetControlX:c,targetControlY:u});return[`M${t},${n} C${a},${l} ${c},${u} ${r},${i}`,d,h,f,g]}function la(e){return n.memo((({id:n,sourceX:o,sourceY:r,targetX:i,targetY:s,sourcePosition:a,targetPosition:l,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:h,labelBgPadding:f,labelBgBorderRadius:g,style:p,markerEnd:m,markerStart:y,interactionWidth:v})=>{const[x,w,b]=aa({sourceX:o,sourceY:r,sourcePosition:a,targetX:i,targetY:s,targetPosition:l}),S=e.isInternal?void 0:n;return t.jsx(ia,{id:S,path:x,labelX:w,labelY:b,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:h,labelBgPadding:f,labelBgBorderRadius:g,style:p,markerEnd:m,markerStart:y,interactionWidth:v})}))}const ca=la({isInternal:!1}),ua=la({isInternal:!0});function da(o){return n.memo((({id:n,sourceX:r,sourceY:i,targetX:s,targetY:a,label:l,labelStyle:c,labelShowBg:u,labelBgStyle:d,labelBgPadding:h,labelBgBorderRadius:f,style:g,sourcePosition:p=e.Position.Bottom,targetPosition:m=e.Position.Top,markerEnd:y,markerStart:v,pathOptions:x,interactionWidth:w})=>{const[b,S,C]=gr({sourceX:r,sourceY:i,sourcePosition:p,targetX:s,targetY:a,targetPosition:m,borderRadius:x?.borderRadius,offset:x?.offset}),E=o.isInternal?void 0:n;return t.jsx(ia,{id:E,path:b,labelX:S,labelY:C,label:l,labelStyle:c,labelShowBg:u,labelBgStyle:d,labelBgPadding:h,labelBgBorderRadius:f,style:g,markerEnd:y,markerStart:v,interactionWidth:w})}))}ca.displayName="SimpleBezierEdge",ua.displayName="SimpleBezierEdgeInternal";const ha=da({isInternal:!1}),fa=da({isInternal:!0});function ga(e){return n.memo((({id:o,...r})=>{const i=e.isInternal?void 0:o;return t.jsx(ha,{...r,id:i,pathOptions:n.useMemo((()=>({borderRadius:0,offset:r.pathOptions?.offset})),[r.pathOptions?.offset])})}))}ha.displayName="SmoothStepEdge",fa.displayName="SmoothStepEdgeInternal";const pa=ga({isInternal:!1}),ma=ga({isInternal:!0});function ya(e){return n.memo((({id:n,sourceX:o,sourceY:r,targetX:i,targetY:s,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:h,style:f,markerEnd:g,markerStart:p,interactionWidth:m})=>{const[y,v,x]=ur({sourceX:o,sourceY:r,targetX:i,targetY:s}),w=e.isInternal?void 0:n;return t.jsx(ia,{id:w,path:y,labelX:v,labelY:x,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:h,style:f,markerEnd:g,markerStart:p,interactionWidth:m})}))}pa.displayName="StepEdge",ma.displayName="StepEdgeInternal";const va=ya({isInternal:!1}),xa=ya({isInternal:!0});function wa(o){return n.memo((({id:n,sourceX:r,sourceY:i,targetX:s,targetY:a,sourcePosition:l=e.Position.Bottom,targetPosition:c=e.Position.Top,label:u,labelStyle:d,labelShowBg:h,labelBgStyle:f,labelBgPadding:g,labelBgBorderRadius:p,style:m,markerEnd:y,markerStart:v,pathOptions:x,interactionWidth:w})=>{const[b,S,C]=ir({sourceX:r,sourceY:i,sourcePosition:l,targetX:s,targetY:a,targetPosition:c,curvature:x?.curvature}),E=o.isInternal?void 0:n;return t.jsx(ia,{id:E,path:b,labelX:S,labelY:C,label:u,labelStyle:d,labelShowBg:h,labelBgStyle:f,labelBgPadding:g,labelBgBorderRadius:p,style:m,markerEnd:y,markerStart:v,interactionWidth:w})}))}va.displayName="StraightEdge",xa.displayName="StraightEdgeInternal";const ba=wa({isInternal:!1}),Sa=wa({isInternal:!0});ba.displayName="BezierEdge",Sa.displayName="BezierEdgeInternal";const Ca={default:Sa,straight:xa,step:ma,smoothstep:fa,simplebezier:ua},Ea={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},ka=(t,n,o)=>o===e.Position.Left?t-n:o===e.Position.Right?t+n:t,Ma=(t,n,o)=>o===e.Position.Top?t-n:o===e.Position.Bottom?t+n:t,Na="react-flow__edgeupdater";function _a({position:e,centerX:n,centerY:o,radius:i=10,onMouseDown:s,onMouseEnter:a,onMouseOut:l,type:c}){return t.jsx("circle",{onMouseDown:s,onMouseEnter:a,onMouseOut:l,className:r([Na,`${Na}-${c}`]),cx:ka(n,i,e),cy:Ma(o,i,e),r:i,stroke:"transparent",fill:"transparent"})}function Pa({isReconnectable:e,reconnectRadius:n,edge:o,sourceX:r,sourceY:i,targetX:s,targetY:a,sourcePosition:l,targetPosition:c,onReconnect:u,onReconnectStart:d,onReconnectEnd:h,setReconnecting:f,setUpdateHover:g}){const p=ki(),m=(e,t)=>{if(0!==e.button)return;const{autoPanOnConnect:n,domNode:r,isValidConnection:i,connectionMode:s,connectionRadius:a,lib:l,onConnectStart:c,onConnectEnd:g,cancelConnection:m,nodeLookup:y,rfId:v,panBy:x,updateConnection:w}=p.getState(),b="target"===t.type;f(!0),d?.(e,o,t.type);jr.onPointerDown(e.nativeEvent,{autoPanOnConnect:n,connectionMode:s,connectionRadius:a,domNode:r,handleId:t.id,nodeId:t.nodeId,nodeLookup:y,isTarget:b,edgeUpdaterType:t.type,lib:l,flowId:v,cancelConnection:m,panBy:x,isValidConnection:i,onConnect:e=>u?.(o,e),onConnectStart:c,onConnectEnd:g,onReconnectEnd:(e,n)=>{f(!1),h?.(e,o,t.type,n)},updateConnection:w,getTransform:()=>p.getState().transform,getFromHandle:()=>p.getState().connection.fromHandle})},y=()=>g(!0),v=()=>g(!1);return t.jsxs(t.Fragment,{children:[(!0===e||"source"===e)&&t.jsx(_a,{position:l,centerX:r,centerY:i,radius:n,onMouseDown:e=>m(e,{nodeId:o.target,id:o.targetHandle??null,type:"target"}),onMouseEnter:y,onMouseOut:v,type:"source"}),(!0===e||"target"===e)&&t.jsx(_a,{position:c,centerX:s,centerY:a,radius:n,onMouseDown:e=>m(e,{nodeId:o.source,id:o.sourceHandle??null,type:"source"}),onMouseEnter:y,onMouseOut:v,type:"target"})]})}function za({id:o,edgesFocusable:i,edgesReconnectable:s,elementsSelectable:a,onClick:l,onDoubleClick:c,onContextMenu:u,onMouseEnter:d,onMouseMove:h,onMouseLeave:f,reconnectRadius:g,onReconnect:p,onReconnectStart:m,onReconnectEnd:y,rfId:v,edgeTypes:x,noPanClassName:w,onError:b,disableKeyboardA11y:S}){let C=Ei((e=>e.edgeLookup.get(o)));const E=Ei((e=>e.defaultEdgeOptions));C=E?{...E,...C}:C;let k=C.type||"default",M=x?.[k]||Ca[k];void 0===M&&(b?.("011",Qn.error011(k)),k="default",M=Ca.default);const N=!!(C.focusable||i&&void 0===C.focusable),_=void 0!==p&&(C.reconnectable||s&&void 0===C.reconnectable),P=!!(C.selectable||a&&void 0===C.selectable),z=n.useRef(null),[O,A]=n.useState(!1),[R,I]=n.useState(!1),D=ki(),{zIndex:$,sourceX:L,sourceY:B,targetX:T,targetY:V,sourcePosition:j,targetPosition:H}=Ei(n.useCallback((t=>{const n=t.nodeLookup.get(C.source),r=t.nodeLookup.get(C.target);if(!n||!r)return{zIndex:C.zIndex,...Ea};const i=function(t){const{sourceNode:n,targetNode:o}=t;if(!pr(n)||!pr(o))return null;const r=n.internals.handleBounds||mr(n.handles),i=o.internals.handleBounds||mr(o.handles),s=vr(r?.source??[],t.sourceHandle),a=vr(t.connectionMode===e.ConnectionMode.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),t.targetHandle);if(!s||!a)return t.onError?.("008",Qn.error008(s?"target":"source",{id:t.id,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle})),null;const l=s?.position||e.Position.Bottom,c=a?.position||e.Position.Top,u=yr(n,s,l),d=yr(o,a,c);return{sourceX:u.x,sourceY:u.y,targetX:d.x,targetY:d.y,sourcePosition:l,targetPosition:c}}({id:o,sourceNode:n,targetNode:r,sourceHandle:C.sourceHandle||null,targetHandle:C.targetHandle||null,connectionMode:t.connectionMode,onError:b}),s=function({sourceNode:e,targetNode:t,selected:n=!1,zIndex:o=0,elevateOnSelect:r=!1}){if(!r)return o;const i=n||t.selected||e.selected,s=Math.max(e.internals.z||0,t.internals.z||0,1e3);return o+(i?s:0)}({selected:C.selected,zIndex:C.zIndex,sourceNode:n,targetNode:r,elevateOnSelect:t.elevateEdgesOnSelect});return{zIndex:s,...i||Ea}}),[C.source,C.target,C.sourceHandle,C.targetHandle,C.selected,C.zIndex]),Li),Z=n.useMemo((()=>C.markerStart?`url('#${xr(C.markerStart,v)}')`:void 0),[C.markerStart,v]),X=n.useMemo((()=>C.markerEnd?`url('#${xr(C.markerEnd,v)}')`:void 0),[C.markerEnd,v]);if(C.hidden||null===L||null===B||null===T||null===V)return null;const Y=c?e=>{c(e,{...C})}:void 0,F=u?e=>{u(e,{...C})}:void 0,W=d?e=>{d(e,{...C})}:void 0,K=h?e=>{h(e,{...C})}:void 0,G=f?e=>{f(e,{...C})}:void 0;return t.jsx("svg",{style:{zIndex:$},children:t.jsxs("g",{className:r(["react-flow__edge",`react-flow__edge-${k}`,C.className,w,{selected:C.selected,animated:C.animated,inactive:!P&&!l,updating:O,selectable:P}]),onClick:e=>{const{addSelectedEdges:t,unselectNodesAndEdges:n,multiSelectionActive:r}=D.getState();P&&(D.setState({nodesSelectionActive:!1}),C.selected&&r?(n({nodes:[],edges:[C]}),z.current?.blur()):t([o])),l&&l(e,C)},onDoubleClick:Y,onContextMenu:F,onMouseEnter:W,onMouseMove:K,onMouseLeave:G,onKeyDown:N?e=>{if(!S&&eo.includes(e.key)&&P){const{unselectNodesAndEdges:t,addSelectedEdges:n}=D.getState();"Escape"===e.key?(z.current?.blur(),t({edges:[C]})):n([o])}}:void 0,tabIndex:N?0:void 0,role:N?"button":"img","data-id":o,"data-testid":`rf__edge-${o}`,"aria-label":null===C.ariaLabel?void 0:C.ariaLabel||`Edge from ${C.source} to ${C.target}`,"aria-describedby":N?`${Pi}-${v}`:void 0,ref:z,children:[!R&&t.jsx(M,{id:o,source:C.source,target:C.target,type:C.type,selected:C.selected,animated:C.animated,selectable:P,deletable:C.deletable??!0,label:C.label,labelStyle:C.labelStyle,labelShowBg:C.labelShowBg,labelBgStyle:C.labelBgStyle,labelBgPadding:C.labelBgPadding,labelBgBorderRadius:C.labelBgBorderRadius,sourceX:L,sourceY:B,targetX:T,targetY:V,sourcePosition:j,targetPosition:H,data:C.data,style:C.style,sourceHandleId:C.sourceHandle,targetHandleId:C.targetHandle,markerStart:Z,markerEnd:X,pathOptions:"pathOptions"in C?C.pathOptions:void 0,interactionWidth:C.interactionWidth}),_&&t.jsx(Pa,{edge:C,isReconnectable:_,reconnectRadius:g,onReconnect:p,onReconnectStart:m,onReconnectEnd:y,sourceX:L,sourceY:B,targetX:T,targetY:V,sourcePosition:j,targetPosition:H,setUpdateHover:A,setReconnecting:I})]})})}const Oa=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function Aa({defaultMarkerColor:e,onlyRenderVisibleElements:o,rfId:r,edgeTypes:i,noPanClassName:s,onReconnect:a,onEdgeContextMenu:l,onEdgeMouseEnter:c,onEdgeMouseMove:u,onEdgeMouseLeave:d,onEdgeClick:h,reconnectRadius:f,onEdgeDoubleClick:g,onReconnectStart:p,onReconnectEnd:m,disableKeyboardA11y:y}){const{edgesFocusable:v,edgesReconnectable:x,elementsSelectable:w,onError:b}=Ei(Oa,Li),S=(C=o,Ei(n.useCallback((e=>{if(!C)return e.edges.map((e=>e.id));const t=[];if(e.width&&e.height)for(const n of e.edges){const o=e.nodeLookup.get(n.source),r=e.nodeLookup.get(n.target);o&&r&&ar({sourceNode:o,targetNode:r,width:e.width,height:e.height,transform:e.transform})&&t.push(n.id)}return t}),[C]),Li));var C;return t.jsxs("div",{className:"react-flow__edges",children:[t.jsx(na,{defaultColor:e,rfId:r}),S.map((e=>t.jsx(za,{id:e,edgesFocusable:v,edgesReconnectable:x,elementsSelectable:w,noPanClassName:s,onReconnect:a,onContextMenu:l,onMouseEnter:c,onMouseMove:u,onMouseLeave:d,onClick:h,reconnectRadius:f,onDoubleClick:g,onReconnectStart:p,onReconnectEnd:m,rfId:r,onError:b,edgeTypes:i,disableKeyboardA11y:y},e)))]})}Aa.displayName="EdgeRenderer";const Ra=n.memo(Aa),Ia=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function Da({children:e}){const n=Ei(Ia);return t.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:e})}const $a=e=>e.panZoom?.syncViewport;function La(e){return e.connection.inProgress?{...e.connection,to:Bo(e.connection.to,e.transform)}:{...e.connection}}function Ba(e){const t=function(e){if(e)return t=>{const n=La(t);return e(n)};return La}(e);return Ei(t,Li)}const Ta=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function Va({containerStyle:e,style:n,type:o,component:i}){const{nodesConnectable:s,width:a,height:l,isValid:c,inProgress:u}=Ei(Ta,Li);return!!(a&&s&&u)?t.jsx("svg",{style:e,width:a,height:l,className:"react-flow__connectionline react-flow__container",children:t.jsx("g",{className:r(["react-flow__connection",ho(c)]),children:t.jsx(ja,{style:n,type:o,CustomComponent:i,isValid:c})})}):null}const ja=({style:n,type:o=e.ConnectionLineType.Bezier,CustomComponent:r,isValid:i})=>{const{inProgress:s,from:a,fromNode:l,fromHandle:c,fromPosition:u,to:d,toNode:h,toHandle:f,toPosition:g}=Ba();if(!s)return;if(r)return t.jsx(r,{connectionLineType:o,connectionLineStyle:n,fromNode:l,fromHandle:c,fromX:a.x,fromY:a.y,toX:d.x,toY:d.y,fromPosition:u,toPosition:g,connectionStatus:ho(i),toNode:h,toHandle:f});let p="";const m={sourceX:a.x,sourceY:a.y,sourcePosition:u,targetX:d.x,targetY:d.y,targetPosition:g};switch(o){case e.ConnectionLineType.Bezier:[p]=ir(m);break;case e.ConnectionLineType.SimpleBezier:[p]=aa(m);break;case e.ConnectionLineType.Step:[p]=gr({...m,borderRadius:0});break;case e.ConnectionLineType.SmoothStep:[p]=gr(m);break;default:[p]=ur(m)}return t.jsx("path",{d:p,fill:"none",className:"react-flow__connection-path",style:n})};ja.displayName="ConnectionLine";const Ha={};function Za(e=Ha){n.useRef(e),ki(),n.useEffect((()=>{}),[e])}function Xa({nodeTypes:e,edgeTypes:o,onInit:r,onNodeClick:i,onEdgeClick:s,onNodeDoubleClick:a,onEdgeDoubleClick:l,onNodeMouseEnter:c,onNodeMouseMove:u,onNodeMouseLeave:d,onNodeContextMenu:h,onSelectionContextMenu:f,onSelectionStart:g,onSelectionEnd:p,connectionLineType:m,connectionLineStyle:y,connectionLineComponent:v,connectionLineContainerStyle:x,selectionKeyCode:w,selectionOnDrag:b,selectionMode:S,multiSelectionKeyCode:C,panActivationKeyCode:E,zoomActivationKeyCode:k,deleteKeyCode:M,onlyRenderVisibleElements:N,elementsSelectable:_,defaultViewport:P,translateExtent:z,minZoom:O,maxZoom:A,preventScrolling:R,defaultMarkerColor:I,zoomOnScroll:D,zoomOnPinch:$,panOnScroll:L,panOnScrollSpeed:B,panOnScrollMode:T,zoomOnDoubleClick:V,panOnDrag:j,onPaneClick:H,onPaneMouseEnter:Z,onPaneMouseMove:X,onPaneMouseLeave:Y,onPaneScroll:F,onPaneContextMenu:W,paneClickDistance:K,nodeClickDistance:G,onEdgeContextMenu:q,onEdgeMouseEnter:U,onEdgeMouseMove:Q,onEdgeMouseLeave:J,reconnectRadius:ee,onReconnect:te,onReconnectStart:ne,onReconnectEnd:oe,noDragClassName:re,noWheelClassName:ie,noPanClassName:se,disableKeyboardA11y:ae,nodeExtent:le,rfId:ce,viewport:ue,onViewportChange:de}){return Za(e),Za(o),ki(),n.useRef(!1),n.useEffect((()=>{}),[]),function(e){const t=vs(),o=n.useRef(!1);n.useEffect((()=>{!o.current&&t.viewportInitialized&&e&&(setTimeout((()=>e(t)),1),o.current=!0)}),[e,t.viewportInitialized])}(r),function(e){const t=Ei($a),o=ki();n.useEffect((()=>{e&&(t?.(e),o.setState({transform:[e.x,e.y,e.zoom]}))}),[e,t])}(ue),t.jsx(Fs,{onPaneClick:H,onPaneMouseEnter:Z,onPaneMouseMove:X,onPaneMouseLeave:Y,onPaneContextMenu:W,onPaneScroll:F,paneClickDistance:K,deleteKeyCode:M,selectionKeyCode:w,selectionOnDrag:b,selectionMode:S,onSelectionStart:g,onSelectionEnd:p,multiSelectionKeyCode:C,panActivationKeyCode:E,zoomActivationKeyCode:k,elementsSelectable:_,zoomOnScroll:D,zoomOnPinch:$,zoomOnDoubleClick:V,panOnScroll:L,panOnScrollSpeed:B,panOnScrollMode:T,panOnDrag:j,defaultViewport:P,translateExtent:z,minZoom:O,maxZoom:A,onSelectionContextMenu:f,preventScrolling:R,noDragClassName:re,noWheelClassName:ie,noPanClassName:se,disableKeyboardA11y:ae,onViewportChange:de,isControlledViewport:!!ue,children:t.jsxs(Da,{children:[t.jsx(Ra,{edgeTypes:o,onEdgeClick:s,onEdgeDoubleClick:l,onReconnect:te,onReconnectStart:ne,onReconnectEnd:oe,onlyRenderVisibleElements:N,onEdgeContextMenu:q,onEdgeMouseEnter:U,onEdgeMouseMove:Q,onEdgeMouseLeave:J,reconnectRadius:ee,defaultMarkerColor:I,noPanClassName:se,disableKeyboardA11y:ae,rfId:ce}),t.jsx(Va,{style:y,type:m,component:v,containerStyle:x}),t.jsx("div",{className:"react-flow__edgelabel-renderer"}),t.jsx(Qs,{nodeTypes:e,onNodeClick:i,onNodeDoubleClick:a,onNodeMouseEnter:c,onNodeMouseMove:u,onNodeMouseLeave:d,onNodeContextMenu:h,nodeClickDistance:G,onlyRenderVisibleElements:N,noPanClassName:se,noDragClassName:re,disableKeyboardA11y:ae,nodeExtent:le,rfId:ce}),t.jsx("div",{className:"react-flow__viewport-portal"})]})})}Xa.displayName="GraphView";const Ya=n.memo(Xa),Fa=({nodes:t,edges:n,defaultNodes:o,defaultEdges:r,width:i,height:s,fitView:a,fitViewOptions:l,minZoom:c=.5,maxZoom:u=2,nodeOrigin:d,nodeExtent:h}={})=>{const f=new Map,g=new Map,p=new Map,m=new Map,y=r??n??[],v=o??t??[],x=d??[0,0],w=h??Jn;Pr(p,m,y);const b=Er(v,f,g,{nodeOrigin:x,nodeExtent:w,elevateNodesOnSelect:!1});let S=[0,0,1];if(a&&i&&s){const e=yo(f,{filter:e=>!(!e.width&&!e.initialWidth||!e.height&&!e.initialHeight)}),{x:t,y:n,zoom:o}=jo(e,i,s,c,u,l?.padding??.1);S=[t,n,o]}return{rfId:"1",width:0,height:0,transform:S,nodes:v,nodesInitialized:b,nodeLookup:f,parentLookup:g,edges:y,edgeLookup:m,connectionLookup:p,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:void 0!==o,hasDefaultEdges:void 0!==r,panZoom:null,minZoom:c,maxZoom:u,translateExtent:Jn,nodeExtent:w,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:e.ConnectionMode.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:x,nodeDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!1,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:a??!1,fitViewOptions:l,fitViewResolver:null,connection:{...ro},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanSpeed:15,connectionRadius:20,onError:$o,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1}},Wa=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:i,fitView:s,fitViewOptions:a,minZoom:l,maxZoom:c,nodeOrigin:u,nodeExtent:d})=>{return h=(h,f)=>{async function g(){const{nodeLookup:e,panZoom:t,fitViewOptions:n,fitViewResolver:o,width:r,height:i,minZoom:s,maxZoom:a}=f();t&&(await wo({nodes:e,width:r,height:i,panZoom:t,minZoom:s,maxZoom:a},n),o?.resolve(!0),h({fitViewResolver:null}))}return{...Fa({nodes:e,edges:t,width:r,height:i,fitView:s,fitViewOptions:a,minZoom:l,maxZoom:c,nodeOrigin:u,nodeExtent:d,defaultNodes:n,defaultEdges:o}),setNodes:e=>{const{nodeLookup:t,parentLookup:n,nodeOrigin:o,elevateNodesOnSelect:r,fitViewQueued:i}=f(),s=Er(e,t,n,{nodeOrigin:o,nodeExtent:d,elevateNodesOnSelect:r,checkEquality:!0});i&&s?(g(),h({nodes:e,nodesInitialized:s,fitViewQueued:!1,fitViewOptions:void 0})):h({nodes:e,nodesInitialized:s})},setEdges:e=>{const{connectionLookup:t,edgeLookup:n}=f();Pr(t,n,e),h({edges:e})},setDefaultNodesAndEdges:(e,t)=>{if(e){const{setNodes:t}=f();t(e),h({hasDefaultNodes:!0})}if(t){const{setEdges:e}=f();e(t),h({hasDefaultEdges:!0})}},updateNodeInternals:e=>{const{triggerNodeChanges:t,nodeLookup:n,parentLookup:o,domNode:r,nodeOrigin:i,nodeExtent:s,debug:a,fitViewQueued:l}=f(),{changes:c,updatedInternals:u}=function(e,t,n,o,r,i){const s=o?.querySelector(".xyflow__viewport");let a=!1;if(!s)return{changes:[],updatedInternals:a};const l=[],c=window.getComputedStyle(s),{m22:u}=new window.DOMMatrixReadOnly(c.transform),d=[];for(const o of e.values()){const e=t.get(o.id);if(!e)continue;if(e.hidden){t.set(e.id,{...e,internals:{...e.internals,handleBounds:void 0}}),a=!0;continue}const s=Go(o.nodeElement),c=e.measured.width!==s.width||e.measured.height!==s.height;if(s.width&&s.height&&(c||!e.internals.handleBounds||o.force)){const h=o.nodeElement.getBoundingClientRect(),f=Zo(e.extent)?e.extent:i;let{positionAbsolute:g}=e.internals;e.parentId&&"parent"===e.extent?g=Eo(g,s,t.get(e.parentId)):f&&(g=Co(g,f,s));const p={...e,measured:s,internals:{...e.internals,positionAbsolute:g,handleBounds:{source:tr("source",o.nodeElement,h,u,e.id),target:tr("target",o.nodeElement,h,u,e.id)}}};t.set(e.id,p),e.parentId&&kr(p,t,n,{nodeOrigin:r}),a=!0,c&&(l.push({id:e.id,type:"dimensions",dimensions:s}),e.expandParent&&e.parentId&&d.push({id:e.id,parentId:e.parentId,rect:zo(p,r)}))}}if(d.length>0){const e=Nr(d,t,n,r);l.push(...e)}return{changes:l,updatedInternals:a}}(e,n,o,r,i,s);u&&(function(e,t,n){const o=Cr(br,n);for(const n of e.values())if(n.parentId)kr(n,e,t,o);else{const e=po(n,o.nodeOrigin),t=Zo(n.extent)?n.extent:o.nodeExtent,r=Co(e,t,Xo(n));n.internals.positionAbsolute=r}}(n,o,{nodeOrigin:i,nodeExtent:s}),l?(g(),h({fitViewQueued:!1,fitViewOptions:void 0})):h({}),c?.length>0&&(a&&console.log("React Flow: trigger node changes",c),t?.(c)))},updateNodePositions:(e,t=!1)=>{const n=[],o=[],{nodeLookup:r,triggerNodeChanges:i}=f();for(const[i,s]of e){const e=r.get(i),a=!!(e?.expandParent&&e?.parentId&&s?.position),l={id:i,type:"position",position:a?{x:Math.max(0,s.position.x),y:Math.max(0,s.position.y)}:s.position,dragging:t};a&&e.parentId&&n.push({id:i,parentId:e.parentId,rect:{...s.internals.positionAbsolute,width:s.measured.width??0,height:s.measured.height??0}}),o.push(l)}if(n.length>0){const{parentLookup:e,nodeOrigin:t}=f(),i=Nr(n,r,e,t);o.push(...i)}i(o)},triggerNodeChanges:e=>{const{onNodesChange:t,setNodes:n,nodes:o,hasDefaultNodes:r,debug:i}=f();e?.length&&(r&&n(rs(e,o)),i&&console.log("React Flow: trigger node changes",e),t?.(e))},triggerEdgeChanges:e=>{const{onEdgesChange:t,setEdges:n,edges:o,hasDefaultEdges:r,debug:i}=f();e?.length&&(r&&n(is(e,o)),i&&console.log("React Flow: trigger edge changes",e),t?.(e))},addSelectedNodes:e=>{const{multiSelectionActive:t,edgeLookup:n,nodeLookup:o,triggerNodeChanges:r,triggerEdgeChanges:i}=f();t?r(e.map((e=>ss(e,!0)))):(r(as(o,new Set([...e]),!0)),i(as(n)))},addSelectedEdges:e=>{const{multiSelectionActive:t,edgeLookup:n,nodeLookup:o,triggerNodeChanges:r,triggerEdgeChanges:i}=f();t?i(e.map((e=>ss(e,!0)))):(i(as(n,new Set([...e]))),r(as(o,new Set,!0)))},unselectNodesAndEdges:({nodes:e,edges:t}={})=>{const{edges:n,nodes:o,nodeLookup:r,triggerNodeChanges:i,triggerEdgeChanges:s}=f(),a=t||n,l=(e||o).map((e=>{const t=r.get(e.id);return t&&(t.selected=!1),ss(e.id,!1)})),c=a.map((e=>ss(e.id,!1)));i(l),s(c)},setMinZoom:e=>{const{panZoom:t,maxZoom:n}=f();t?.setScaleExtent([e,n]),h({minZoom:e})},setMaxZoom:e=>{const{panZoom:t,minZoom:n}=f();t?.setScaleExtent([n,e]),h({maxZoom:e})},setTranslateExtent:e=>{f().panZoom?.setTranslateExtent(e),h({translateExtent:e})},setPaneClickDistance:e=>{f().panZoom?.setClickDistance(e)},resetSelectedElements:()=>{const{edges:e,nodes:t,triggerNodeChanges:n,triggerEdgeChanges:o,elementsSelectable:r}=f();if(!r)return;const i=t.reduce(((e,t)=>t.selected?[...e,ss(t.id,!1)]:e),[]),s=e.reduce(((e,t)=>t.selected?[...e,ss(t.id,!1)]:e),[]);n(i),o(s)},setNodeExtent:e=>{const{nodes:t,nodeLookup:n,parentLookup:o,nodeOrigin:r,elevateNodesOnSelect:i,nodeExtent:s}=f();e[0][0]===s[0][0]&&e[0][1]===s[0][1]&&e[1][0]===s[1][0]&&e[1][1]===s[1][1]||(Er(t,n,o,{nodeOrigin:r,nodeExtent:e,elevateNodesOnSelect:i,checkEquality:!1}),h({nodeExtent:e}))},panBy:e=>{const{transform:t,width:n,height:o,panZoom:r,translateExtent:i}=f();return async function({delta:e,panZoom:t,transform:n,translateExtent:o,width:r,height:i}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const s=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[r,i]],o),a=!!s&&(s.x!==n[0]||s.y!==n[1]||s.k!==n[2]);return Promise.resolve(a)}({delta:e,panZoom:r,transform:t,translateExtent:i,width:n,height:o})},cancelConnection:()=>{h({connection:{...ro}})},updateConnection:e=>{h({connection:e})},reset:()=>h({...Fa()})}},f=Object.is,h?wi(h,f):wi;var h,f};function Ka({initialNodes:e,initialEdges:o,defaultNodes:r,defaultEdges:i,initialWidth:s,initialHeight:a,initialMinZoom:l,initialMaxZoom:c,initialFitViewOptions:u,fitView:d,nodeOrigin:h,nodeExtent:f,children:g}){const[p]=n.useState((()=>Wa({nodes:e,edges:o,defaultNodes:r,defaultEdges:i,width:s,height:a,fitView:d,minZoom:l,maxZoom:c,fitViewOptions:u,nodeOrigin:h,nodeExtent:f})));return t.jsx(Si,{value:p,children:t.jsx(ms,{children:g})})}function Ga({children:e,nodes:o,edges:r,defaultNodes:i,defaultEdges:s,width:a,height:l,fitView:c,fitViewOptions:u,minZoom:d,maxZoom:h,nodeOrigin:f,nodeExtent:g}){return n.useContext(bi)?t.jsx(t.Fragment,{children:e}):t.jsx(Ka,{initialNodes:o,initialEdges:r,defaultNodes:i,defaultEdges:s,initialWidth:a,initialHeight:l,fitView:c,initialFitViewOptions:u,initialMinZoom:d,initialMaxZoom:h,nodeOrigin:f,nodeExtent:g,children:e})}const qa={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};var Ua=hs((function({nodes:o,edges:i,defaultNodes:s,defaultEdges:a,className:l,nodeTypes:c,edgeTypes:u,onNodeClick:d,onEdgeClick:h,onInit:f,onMove:g,onMoveStart:p,onMoveEnd:m,onConnect:y,onConnectStart:v,onConnectEnd:x,onClickConnectStart:w,onClickConnectEnd:b,onNodeMouseEnter:S,onNodeMouseMove:C,onNodeMouseLeave:E,onNodeContextMenu:k,onNodeDoubleClick:M,onNodeDragStart:N,onNodeDrag:_,onNodeDragStop:P,onNodesDelete:z,onEdgesDelete:O,onDelete:A,onSelectionChange:R,onSelectionDragStart:I,onSelectionDrag:D,onSelectionDragStop:$,onSelectionContextMenu:L,onSelectionStart:B,onSelectionEnd:T,onBeforeDelete:V,connectionMode:j,connectionLineType:H=e.ConnectionLineType.Bezier,connectionLineStyle:Z,connectionLineComponent:X,connectionLineContainerStyle:Y,deleteKeyCode:F="Backspace",selectionKeyCode:W="Shift",selectionOnDrag:K=!1,selectionMode:G=e.SelectionMode.Full,panActivationKeyCode:q="Space",multiSelectionKeyCode:U=(Ho()?"Meta":"Control"),zoomActivationKeyCode:Q=(Ho()?"Meta":"Control"),snapToGrid:J,snapGrid:ee,onlyRenderVisibleElements:te=!1,selectNodesOnDrag:ne,nodesDraggable:oe,nodesConnectable:re,nodesFocusable:ie,nodeOrigin:se=Xi,edgesFocusable:ae,edgesReconnectable:le,elementsSelectable:ce=!0,defaultViewport:ue=Yi,minZoom:de=.5,maxZoom:he=2,translateExtent:fe=Jn,preventScrolling:ge=!0,nodeExtent:pe,defaultMarkerColor:me="#b1b1b7",zoomOnScroll:ye=!0,zoomOnPinch:ve=!0,panOnScroll:xe=!1,panOnScrollSpeed:we=.5,panOnScrollMode:be=e.PanOnScrollMode.Free,zoomOnDoubleClick:Se=!0,panOnDrag:Ce=!0,onPaneClick:Ee,onPaneMouseEnter:ke,onPaneMouseMove:Me,onPaneMouseLeave:Ne,onPaneScroll:_e,onPaneContextMenu:Pe,paneClickDistance:ze=0,nodeClickDistance:Oe=0,children:Ae,onReconnect:Re,onReconnectStart:Ie,onReconnectEnd:De,onEdgeContextMenu:$e,onEdgeDoubleClick:Le,onEdgeMouseEnter:Be,onEdgeMouseMove:Te,onEdgeMouseLeave:Ve,reconnectRadius:je=10,onNodesChange:He,onEdgesChange:Ze,noDragClassName:Xe="nodrag",noWheelClassName:Ye="nowheel",noPanClassName:Fe="nopan",fitView:We,fitViewOptions:Ke,connectOnClick:Ge,attributionPosition:qe,proOptions:Ue,defaultEdgeOptions:Qe,elevateNodesOnSelect:Je,elevateEdgesOnSelect:et,disableKeyboardA11y:tt=!1,autoPanOnConnect:nt,autoPanOnNodeDrag:ot,autoPanSpeed:rt,connectionRadius:it,isValidConnection:st,onError:at,style:lt,id:ct,nodeDragThreshold:ut,viewport:dt,onViewportChange:ht,width:ft,height:gt,colorMode:pt="light",debug:mt,onScroll:yt,...vt},xt){const wt=ct||"1",bt=function(e){const[t,o]=n.useState("system"===e?null:e);return n.useEffect((()=>{if("system"!==e)return void o(e);const t=qi(),n=()=>o(t?.matches?"dark":"light");return n(),t?.addEventListener("change",n),()=>{t?.removeEventListener("change",n)}}),[e]),null!==t?t:qi()?.matches?"dark":"light"}(pt),St=n.useCallback((e=>{e.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),yt?.(e)}),[yt]);return t.jsx("div",{"data-testid":"rf__wrapper",...vt,onScroll:St,style:{...lt,...qa},ref:xt,className:r(["react-flow",l,bt]),id:ct,children:t.jsxs(Ga,{nodes:o,edges:i,width:ft,height:gt,fitView:We,fitViewOptions:Ke,minZoom:de,maxZoom:he,nodeOrigin:se,nodeExtent:pe,children:[t.jsx(Ya,{onInit:f,onNodeClick:d,onEdgeClick:h,onNodeMouseEnter:S,onNodeMouseMove:C,onNodeMouseLeave:E,onNodeContextMenu:k,onNodeDoubleClick:M,nodeTypes:c,edgeTypes:u,connectionLineType:H,connectionLineStyle:Z,connectionLineComponent:X,connectionLineContainerStyle:Y,selectionKeyCode:W,selectionOnDrag:K,selectionMode:G,deleteKeyCode:F,multiSelectionKeyCode:U,panActivationKeyCode:q,zoomActivationKeyCode:Q,onlyRenderVisibleElements:te,defaultViewport:ue,translateExtent:fe,minZoom:de,maxZoom:he,preventScrolling:ge,zoomOnScroll:ye,zoomOnPinch:ve,zoomOnDoubleClick:Se,panOnScroll:xe,panOnScrollSpeed:we,panOnScrollMode:be,panOnDrag:Ce,onPaneClick:Ee,onPaneMouseEnter:ke,onPaneMouseMove:Me,onPaneMouseLeave:Ne,onPaneScroll:_e,onPaneContextMenu:Pe,paneClickDistance:ze,nodeClickDistance:Oe,onSelectionContextMenu:L,onSelectionStart:B,onSelectionEnd:T,onReconnect:Re,onReconnectStart:Ie,onReconnectEnd:De,onEdgeContextMenu:$e,onEdgeDoubleClick:Le,onEdgeMouseEnter:Be,onEdgeMouseMove:Te,onEdgeMouseLeave:Ve,reconnectRadius:je,defaultMarkerColor:me,noDragClassName:Xe,noWheelClassName:Ye,noPanClassName:Fe,rfId:wt,disableKeyboardA11y:tt,nodeExtent:pe,viewport:dt,onViewportChange:ht}),t.jsx(Gi,{nodes:o,edges:i,defaultNodes:s,defaultEdges:a,onConnect:y,onConnectStart:v,onConnectEnd:x,onClickConnectStart:w,onClickConnectEnd:b,nodesDraggable:oe,nodesConnectable:re,nodesFocusable:ie,edgesFocusable:ae,edgesReconnectable:le,elementsSelectable:ce,elevateNodesOnSelect:Je,elevateEdgesOnSelect:et,minZoom:de,maxZoom:he,nodeExtent:pe,onNodesChange:He,onEdgesChange:Ze,snapToGrid:J,snapGrid:ee,connectionMode:j,translateExtent:fe,connectOnClick:Ge,defaultEdgeOptions:Qe,fitView:We,fitViewOptions:Ke,onNodesDelete:z,onEdgesDelete:O,onDelete:A,onNodeDragStart:N,onNodeDrag:_,onNodeDragStop:P,onSelectionDrag:D,onSelectionDragStart:I,onSelectionDragStop:$,onMove:g,onMoveStart:p,onMoveEnd:m,noPanClassName:Fe,nodeOrigin:se,rfId:wt,autoPanOnConnect:nt,autoPanOnNodeDrag:ot,autoPanSpeed:rt,onError:at,connectionRadius:it,isValidConnection:st,selectNodesOnDrag:ne,nodeDragThreshold:ut,onBeforeDelete:V,paneClickDistance:ze,debug:mt}),t.jsx(Zi,{onSelectionChange:R}),Ae,t.jsx($i,{proOptions:Ue,position:qe}),t.jsx(Ri,{rfId:wt,disableKeyboardA11y:tt})]})})}));const Qa=e=>e.domNode?.querySelector(".react-flow__edgelabel-renderer");const Ja=e=>e.domNode?.querySelector(".react-flow__viewport-portal");const el=e=>e.nodes;const tl=e=>e.edges;const nl=e=>({x:e.transform[0],y:e.transform[1],zoom:e.transform[2]});const ol=Qn.error014();function rl({dimensions:e,lineWidth:n,variant:o,className:i}){return t.jsx("path",{strokeWidth:n,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:r(["react-flow__background-pattern",o,i])})}function il({radius:e,className:n}){return t.jsx("circle",{cx:e,cy:e,r:e,className:r(["react-flow__background-pattern","dots",n])})}var sl;e.BackgroundVariant=void 0,(sl=e.BackgroundVariant||(e.BackgroundVariant={})).Lines="lines",sl.Dots="dots",sl.Cross="cross";const al={[e.BackgroundVariant.Dots]:1,[e.BackgroundVariant.Lines]:1,[e.BackgroundVariant.Cross]:6},ll=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function cl({id:o,variant:i=e.BackgroundVariant.Dots,gap:s=20,size:a,lineWidth:l=1,offset:c=0,color:u,bgColor:d,style:h,className:f,patternClassName:g}){const p=n.useRef(null),{transform:m,patternId:y}=Ei(ll,Li),v=a||al[i],x=i===e.BackgroundVariant.Dots,w=i===e.BackgroundVariant.Cross,b=Array.isArray(s)?s:[s,s],S=[b[0]*m[2]||1,b[1]*m[2]||1],C=v*m[2],E=Array.isArray(c)?c:[c,c],k=w?[C,C]:S,M=[E[0]*m[2]||1+k[0]/2,E[1]*m[2]||1+k[1]/2],N=`${y}${o||""}`;return t.jsxs("svg",{className:r(["react-flow__background",f]),style:{...h,...Ss,"--xy-background-color-props":d,"--xy-background-pattern-color-props":u},ref:p,"data-testid":"rf__background",children:[t.jsx("pattern",{id:N,x:m[0]%S[0],y:m[1]%S[1],width:S[0],height:S[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${M[0]},-${M[1]})`,children:x?t.jsx(il,{radius:C/2,className:g}):t.jsx(rl,{dimensions:k,lineWidth:l,variant:i,className:g})}),t.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${N})`})]})}cl.displayName="Background";const ul=n.memo(cl);function dl(){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:t.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function hl(){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:t.jsx("path",{d:"M0 0h32v4.2H0z"})})}function fl(){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:t.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function gl(){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:t.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function pl(){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:t.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function ml({children:e,className:n,...o}){return t.jsx("button",{type:"button",className:r(["react-flow__controls-button",n]),...o,children:e})}const yl=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom});function vl({style:e,showZoom:n=!0,showFitView:o=!0,showInteractive:i=!0,fitViewOptions:s,onZoomIn:a,onZoomOut:l,onFitView:c,onInteractiveChange:u,className:d,children:h,position:f="bottom-left",orientation:g="vertical","aria-label":p="React Flow controls"}){const m=ki(),{isInteractive:y,minZoomReached:v,maxZoomReached:x}=Ei(yl,Li),{zoomIn:w,zoomOut:b,fitView:S}=vs(),C="horizontal"===g?"horizontal":"vertical";return t.jsxs(Di,{className:r(["react-flow__controls",C,d]),position:f,style:e,"data-testid":"rf__controls","aria-label":p,children:[n&&t.jsxs(t.Fragment,{children:[t.jsx(ml,{onClick:()=>{w(),a?.()},className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:x,children:t.jsx(dl,{})}),t.jsx(ml,{onClick:()=>{b(),l?.()},className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:v,children:t.jsx(hl,{})})]}),o&&t.jsx(ml,{className:"react-flow__controls-fitview",onClick:()=>{S(s),c?.()},title:"fit view","aria-label":"fit view",children:t.jsx(fl,{})}),i&&t.jsx(ml,{className:"react-flow__controls-interactive",onClick:()=>{m.setState({nodesDraggable:!y,nodesConnectable:!y,elementsSelectable:!y}),u?.(!y)},title:"toggle interactivity","aria-label":"toggle interactivity",children:y?t.jsx(pl,{}):t.jsx(gl,{})}),h]})}vl.displayName="Controls";const xl=n.memo(vl);const wl=n.memo((function({id:e,x:n,y:o,width:i,height:s,style:a,color:l,strokeColor:c,strokeWidth:u,className:d,borderRadius:h,shapeRendering:f,selected:g,onClick:p}){const{background:m,backgroundColor:y}=a||{},v=l||m||y;return t.jsx("rect",{className:r(["react-flow__minimap-node",{selected:g},d]),x:n,y:o,rx:h,ry:h,width:i,height:s,style:{fill:v,stroke:c,strokeWidth:u},shapeRendering:f,onClick:p?t=>p(t,e):void 0})})),bl=e=>e.nodes.map((e=>e.id)),Sl=e=>e instanceof Function?e:()=>e;const Cl=n.memo((function({id:e,nodeColorFunc:n,nodeStrokeColorFunc:o,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:s,shapeRendering:a,NodeComponent:l,onClick:c}){const{node:u,x:d,y:h,width:f,height:g}=Ei((t=>{const{internals:n}=t.nodeLookup.get(e),o=n.userNode,{x:r,y:i}=n.positionAbsolute,{width:s,height:a}=Xo(o);return{node:o,x:r,y:i,width:s,height:a}}),Li);return u&&!u.hidden&&Yo(u)?t.jsx(l,{x:d,y:h,width:f,height:g,style:u.style,selected:!!u.selected,className:r(u),color:n(u),borderRadius:i,strokeColor:o(u),strokeWidth:s,shapeRendering:a,onClick:c,id:u.id}):null}));var El=n.memo((function({nodeStrokeColor:e,nodeColor:n,nodeClassName:o="",nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:s=wl,onClick:a}){const l=Ei(bl,Li),c=Sl(n),u=Sl(e),d=Sl(o),h="undefined"==typeof window||window.chrome?"crispEdges":"geometricPrecision";return t.jsx(t.Fragment,{children:l.map((e=>t.jsx(Cl,{id:e,nodeColorFunc:c,nodeStrokeColorFunc:u,nodeClassNameFunc:d,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:s,onClick:a,shapeRendering:h},e)))})}));const kl=e=>!e.hidden,Ml=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?Ao(yo(e.nodeLookup,{filter:kl}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height}};function Nl({style:e,className:o,nodeStrokeColor:i,nodeColor:s,nodeClassName:a="",nodeBorderRadius:l=5,nodeStrokeWidth:c,nodeComponent:u,bgColor:d,maskColor:h,maskStrokeColor:f,maskStrokeWidth:g,position:p="bottom-right",onClick:m,onNodeClick:y,pannable:v=!1,zoomable:x=!1,ariaLabel:w="React Flow mini map",inversePan:b,zoomStep:S=10,offsetScale:C=5}){const E=ki(),k=n.useRef(null),{boundingRect:M,viewBB:N,rfId:_,panZoom:P,translateExtent:z,flowWidth:O,flowHeight:A}=Ei(Ml,Li),R=e?.width??200,I=e?.height??150,D=M.width/R,$=M.height/I,L=Math.max(D,$),B=L*R,T=L*I,V=C*L,j=M.x-(B-M.width)/2-V,H=M.y-(T-M.height)/2-V,Z=B+2*V,X=T+2*V,Y=`react-flow__minimap-desc-${_}`,F=n.useRef(0),W=n.useRef();F.current=L,n.useEffect((()=>{if(k.current&&P)return W.current=function({domNode:e,panZoom:t,getTransform:n,getViewScale:o}){const r=Se(e);return{update:function({translateExtent:e,width:i,height:s,zoomStep:a=10,pannable:l=!0,zoomable:c=!0,inversePan:u=!1}){let d=[0,0];const h=Un().on("start",(e=>{"mousedown"!==e.sourceEvent.type&&"touchstart"!==e.sourceEvent.type||(d=[e.sourceEvent.clientX??e.sourceEvent.touches[0].clientX,e.sourceEvent.clientY??e.sourceEvent.touches[0].clientY])})).on("zoom",l?r=>{const a=n();if("mousemove"!==r.sourceEvent.type&&"touchmove"!==r.sourceEvent.type||!t)return;const l=[r.sourceEvent.clientX??r.sourceEvent.touches[0].clientX,r.sourceEvent.clientY??r.sourceEvent.touches[0].clientY],c=[l[0]-d[0],l[1]-d[1]];d=l;const h=o()*Math.max(a[2],Math.log(a[2]))*(u?-1:1),f={x:a[0]-c[0]*h,y:a[1]-c[1]*h},g=[[0,0],[i,s]];t.setViewportConstrained({x:f.x,y:f.y,zoom:a[2]},g,e)}:null).on("zoom.wheel",c?e=>{const o=n();if("wheel"!==e.sourceEvent.type||!t)return;const r=-e.sourceEvent.deltaY*(1===e.sourceEvent.deltaMode?.05:e.sourceEvent.deltaMode?1:.002)*a,i=o[2]*Math.pow(2,r);t.scaleTo(i)}:null);r.call(h,{})},destroy:function(){r.on("zoom",null)},pointer:Ce}}({domNode:k.current,panZoom:P,getTransform:()=>E.getState().transform,getViewScale:()=>F.current}),()=>{W.current?.destroy()}}),[P]),n.useEffect((()=>{W.current?.update({translateExtent:z,width:O,height:A,inversePan:b,pannable:v,zoomStep:S,zoomable:x})}),[v,x,b,S,z,O,A]);const K=m?e=>{const[t,n]=W.current?.pointer(e)||[0,0];m(e,{x:t,y:n})}:void 0,G=y?n.useCallback(((e,t)=>{const n=E.getState().nodeLookup.get(t).internals.userNode;y(e,n)}),[]):void 0;return t.jsx(Di,{position:p,style:{...e,"--xy-minimap-background-color-props":"string"==typeof d?d:void 0,"--xy-minimap-mask-background-color-props":"string"==typeof h?h:void 0,"--xy-minimap-mask-stroke-color-props":"string"==typeof f?f:void 0,"--xy-minimap-mask-stroke-width-props":"number"==typeof g?g*L:void 0,"--xy-minimap-node-background-color-props":"string"==typeof s?s:void 0,"--xy-minimap-node-stroke-color-props":"string"==typeof i?i:void 0,"--xy-minimap-node-stroke-width-props":"number"==typeof c?c:void 0},className:r(["react-flow__minimap",o]),"data-testid":"rf__minimap",children:t.jsxs("svg",{width:R,height:I,viewBox:`${j} ${H} ${Z} ${X}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":Y,ref:k,onClick:K,children:[w&&t.jsx("title",{id:Y,children:w}),t.jsx(El,{onClick:G,nodeColor:s,nodeStrokeColor:i,nodeBorderRadius:l,nodeClassName:a,nodeStrokeWidth:c,nodeComponent:u}),t.jsx("path",{className:"react-flow__minimap-mask",d:`M${j-V},${H-V}h${Z+2*V}v${X+2*V}h${-Z-2*V}z\n M${N.x},${N.y}h${N.width}v${N.height}h${-N.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Nl.displayName="MiniMap";const _l=n.memo(Nl);const Pl=n.memo((function({nodeId:o,position:i,variant:s=e.ResizeControlVariant.Handle,className:a,style:l={},children:c,color:u,minWidth:d=10,minHeight:h=10,maxWidth:f=Number.MAX_VALUE,maxHeight:g=Number.MAX_VALUE,keepAspectRatio:p=!1,resizeDirection:m,shouldResize:y,onResizeStart:v,onResize:x,onResizeEnd:w}){const b=$s(),S="string"==typeof o?o:b,C=ki(),E=n.useRef(null),k=s===e.ResizeControlVariant.Line?"right":"bottom-right",M=i??k,N=n.useRef(null);n.useEffect((()=>{if(E.current&&S)return N.current||(N.current=si({domNode:E.current,nodeId:S,getStoreItems:()=>{const{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:o,nodeOrigin:r,domNode:i}=C.getState();return{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:o,nodeOrigin:r,paneDomNode:i}},onChange:(e,t)=>{const{triggerNodeChanges:n,nodeLookup:o,parentLookup:r,nodeOrigin:i}=C.getState(),s=[],a={x:e.x,y:e.y},l=o.get(S);if(l&&l.expandParent&&l.parentId){const t=l.origin??i,n=e.width??l.measured.width??0,c=e.height??l.measured.height??0,u=Nr([{id:l.id,parentId:l.parentId,rect:{width:n,height:c,...Fo({x:e.x??l.position.x,y:e.y??l.position.y},{width:n,height:c},l.parentId,o,t)}}],o,r,i);s.push(...u),a.x=e.x?Math.max(t[0]*n,e.x):void 0,a.y=e.y?Math.max(t[1]*c,e.y):void 0}if(void 0!==a.x&&void 0!==a.y){const e={id:S,type:"position",position:{...a}};s.push(e)}if(void 0!==e.width&&void 0!==e.height){const t={id:S,type:"dimensions",resizing:!0,setAttributes:!m||("horizontal"===m?"width":"height"),dimensions:{width:e.width,height:e.height}};s.push(t)}for(const e of t){const t={...e,type:"position"};s.push(t)}n(s)},onEnd:({width:e,height:t})=>{const n={id:S,type:"dimensions",resizing:!1,dimensions:{width:e,height:t}};C.getState().triggerNodeChanges([n])}})),N.current.update({controlPosition:M,boundaries:{minWidth:d,minHeight:h,maxWidth:f,maxHeight:g},keepAspectRatio:p,resizeDirection:m,onResizeStart:v,onResize:x,onResizeEnd:w,shouldResize:y}),()=>{N.current?.destroy()}}),[M,d,h,f,g,p,v,x,w,y]);const _=M.split("-"),P=s===e.ResizeControlVariant.Line?"borderColor":"backgroundColor",z=u?{...l,[P]:u}:l;return t.jsx("div",{className:r(["react-flow__resize-control","nodrag",..._,s,a]),ref:E,style:z,children:c})}));const zl=e=>e.domNode?.querySelector(".react-flow__renderer");function Ol({children:e}){const t=Ei(zl);return t?o.createPortal(e,t):null}const Al=(e,t)=>e?.internals.positionAbsolute.x!==t?.internals.positionAbsolute.x||e?.internals.positionAbsolute.y!==t?.internals.positionAbsolute.y||e?.measured.width!==t?.measured.width||e?.measured.height!==t?.measured.height||e?.selected!==t?.selected||e?.internals.z!==t?.internals.z,Rl=(e,t)=>{if(e.size!==t.size)return!1;for(const[n,o]of e)if(Al(o,t.get(n)))return!1;return!0},Il=e=>({x:e.transform[0],y:e.transform[1],zoom:e.transform[2],selectedNodesCount:e.nodes.filter((e=>e.selected)).length});e.Background=ul,e.BaseEdge=ia,e.BezierEdge=ba,e.ControlButton=ml,e.Controls=xl,e.EdgeLabelRenderer=function({children:e}){const t=Ei(Qa);return t?o.createPortal(e,t):null},e.EdgeText=ra,e.Handle=Bs,e.MiniMap=_l,e.NodeResizeControl=Pl,e.NodeResizer=function({nodeId:n,isVisible:o=!0,handleClassName:r,handleStyle:i,lineClassName:s,lineStyle:a,color:l,minWidth:c=10,minHeight:u=10,maxWidth:d=Number.MAX_VALUE,maxHeight:h=Number.MAX_VALUE,keepAspectRatio:f=!1,shouldResize:g,onResizeStart:p,onResize:m,onResizeEnd:y}){return o?t.jsxs(t.Fragment,{children:[Qr.map((o=>t.jsx(Pl,{className:s,style:a,nodeId:n,position:o,variant:e.ResizeControlVariant.Line,color:l,minWidth:c,minHeight:u,maxWidth:d,maxHeight:h,onResizeStart:p,keepAspectRatio:f,shouldResize:g,onResize:m,onResizeEnd:y},o))),Ur.map((e=>t.jsx(Pl,{className:r,style:i,nodeId:n,position:e,color:l,minWidth:c,minHeight:u,maxWidth:d,maxHeight:h,onResizeStart:p,keepAspectRatio:f,shouldResize:g,onResize:m,onResizeEnd:y},e)))]}):null},e.NodeToolbar=function({nodeId:o,children:i,className:s,style:a,isVisible:l,position:c=e.Position.Top,offset:u=10,align:d="center",...h}){const f=$s(),g=n.useCallback((e=>{const t=(Array.isArray(o)?o:[o||f||""]).reduce(((t,n)=>{const o=e.nodeLookup.get(n);return o&&t.set(o.id,o),t}),new Map);return t}),[o,f]),p=Ei(g,Rl),{x:m,y:y,zoom:v,selectedNodesCount:x}=Ei(Il,Li);if(!("boolean"==typeof l?l:1===p.size&&p.values().next().value?.selected&&1===x)||!p.size)return null;const w=yo(p),b=Array.from(p.values()),S=Math.max(...b.map((e=>e.internals.z+1))),C={position:"absolute",transform:wr(w,{x:m,y:y,zoom:v},c,u,d),zIndex:S,...a};return t.jsx(Ol,{children:t.jsx("div",{style:C,className:r(["react-flow__node-toolbar",s]),...h,"data-id":b.reduce(((e,t)=>`${e}${t.id} `),"").trim(),children:i})})},e.Panel=Di,e.ReactFlow=Ua,e.ReactFlowProvider=Ka,e.SimpleBezierEdge=ca,e.SmoothStepEdge=ha,e.StepEdge=pa,e.StraightEdge=va,e.ViewportPortal=function({children:e}){const t=Ei(Ja);return t?o.createPortal(e,t):null},e.addEdge=cr,e.applyEdgeChanges=is,e.applyNodeChanges=rs,e.getBezierEdgeCenter=nr,e.getBezierPath=ir,e.getConnectedEdges=xo,e.getEdgeCenter=sr,e.getIncomers=(e,t,n)=>{if(!e.id)return[];const o=new Set;return n.forEach((t=>{t.target===e.id&&o.add(t.source)})),t.filter((e=>o.has(e.id)))},e.getNodesBounds=mo,e.getOutgoers=(e,t,n)=>{if(!e.id)return[];const o=new Set;return n.forEach((t=>{t.source===e.id&&o.add(t.target)})),t.filter((e=>o.has(e.id)))},e.getSimpleBezierPath=aa,e.getSmoothStepPath=gr,e.getStraightPath=ur,e.getViewportForBounds=jo,e.isEdge=ds,e.isNode=us,e.reconnectEdge=(e,t,n,o={shouldReplaceId:!0})=>{const{id:r,...i}=e;if(!t.source||!t.target)return n;if(!n.find((t=>t.id===e.id)))return n;const s={...i,id:o.shouldReplaceId?lr(t):r,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle};return n.filter((e=>e.id!==r)).concat(s)},e.useConnection=Ba,e.useEdges=function(){return Ei(tl,Li)},e.useEdgesState=function(e){const[t,o]=n.useState(e),r=n.useCallback((e=>o((t=>is(e,t)))),[]);return[t,o,r]},e.useHandleConnections=function({type:e,id:t,nodeId:o,onConnect:r,onDisconnect:i}){console.warn("[DEPRECATED] `useHandleConnections` is deprecated. Instead use `useNodeConnections` https://reactflow.dev/api-reference/hooks/useNodeConnections");const s=$s(),a=o??s,l=n.useRef(null),c=Ei((n=>n.connectionLookup.get(`${a}-${e}${t?`-${t}`:""}`)),co);return n.useEffect((()=>{if(l.current&&l.current!==c){const e=c??new Map;uo(l.current,e,i),uo(e,l.current,r)}l.current=c??new Map}),[c,r,i]),n.useMemo((()=>Array.from(c?.values()??[])),[c])},e.useInternalNode=function(e){return Ei(n.useCallback((t=>t.nodeLookup.get(e)),[e]),Li)},e.useKeyPress=Qi,e.useNodeConnections=function({id:e,handleType:t,handleId:o,onConnect:r,onDisconnect:i}={}){const s=$s(),a=e??s;if(!a)throw new Error(ol);const l=n.useRef(null),c=Ei((e=>e.connectionLookup.get(`${a}${t?o?`-${t}-${o}`:`-${t}`:""}`)),co);return n.useEffect((()=>{if(l.current&&l.current!==c){const e=c??new Map;uo(l.current,e,i),uo(e,l.current,r)}l.current=c??new Map}),[c,r,i]),n.useMemo((()=>Array.from(c?.values()??[])),[c])},e.useNodeId=$s,e.useNodes=function(){return Ei(el,Li)},e.useNodesData=function(e){return Ei(n.useCallback((t=>{const n=[],o=Array.isArray(e),r=o?e:[e];for(const e of r){const o=t.nodeLookup.get(e);o&&n.push({id:o.id,type:o.type,data:o.data})}return o?n:n[0]??null}),[e]),zr)},e.useNodesInitialized=function(e={includeHiddenNodes:!1}){return Ei((e=>t=>{if(!e.includeHiddenNodes)return t.nodesInitialized;if(0===t.nodeLookup.size)return!1;for(const[,{internals:e}]of t.nodeLookup)if(void 0===e.handleBounds||!Yo(e.userNode))return!1;return!0})(e))},e.useNodesState=function(e){const[t,o]=n.useState(e),r=n.useCallback((e=>o((t=>rs(e,t)))),[]);return[t,o,r]},e.useOnSelectionChange=function({onChange:e}){const t=ki();n.useEffect((()=>{const n=[...t.getState().onSelectionChangeHandlers,e];return t.setState({onSelectionChangeHandlers:n}),()=>{const n=t.getState().onSelectionChangeHandlers.filter((t=>t!==e));t.setState({onSelectionChangeHandlers:n})}}),[e])},e.useOnViewportChange=function({onStart:e,onChange:t,onEnd:o}){const r=ki();n.useEffect((()=>{r.setState({onViewportChangeStart:e})}),[e]),n.useEffect((()=>{r.setState({onViewportChange:t})}),[t]),n.useEffect((()=>{r.setState({onViewportChangeEnd:o})}),[o])},e.useReactFlow=vs,e.useStore=Ei,e.useStoreApi=ki,e.useUpdateNodeInternals=function(){const e=ki();return n.useCallback((t=>{const{domNode:n,updateNodeInternals:o}=e.getState(),r=Array.isArray(t)?t:[t],i=new Map;r.forEach((e=>{const t=n?.querySelector(`.react-flow__node[data-id="${e}"]`);t&&i.set(e,{id:e,nodeElement:t,force:!0})})),requestAnimationFrame((()=>o(i,{triggerFitView:!1})))}),[])},e.useViewport=function(){return Ei(nl,Li)}}));
|
|
10
|
+
*/di.exports=function(){if(ui)return hi;ui=1;var e=n,t=pi(),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return hi.useSyncExternalStoreWithSelector=function(e,t,n,c,u){var d=i(null);if(null===d.current){var h={hasValue:!1,value:null};d.current=h}else h=d.current;d=a((function(){function e(e){if(!s){if(s=!0,r=e,e=c(e),void 0!==u&&h.hasValue){var t=h.value;if(u(t,e))return i=t}return i=e}if(t=i,o(r,e))return t;var n=c(e);return void 0!==u&&u(t,n)?t:(r=e,i=n)}var r,i,s=!1,a=void 0===n?null:n;return[function(){return e(t())},null===a?void 0:function(){return e(a())}]}),[t,n,c,u]);var f=r(e,d[0],d[1]);return s((function(){h.hasValue=!0,h.value=f}),[f]),l(f),f},hi}();var mi=ai(di.exports);const yi=e=>{let t;const n=new Set,o=(e,o)=>{const r="function"==typeof e?e(t):e;if(!Object.is(r,t)){const e=t;t=(null!=o?o:"object"!=typeof r)?r:Object.assign({},t,r),n.forEach((n=>n(t,e)))}},r=()=>t,i={setState:o,getState:r,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(o,r,i),i},{useSyncExternalStoreWithSelector:vi}=mi;function xi(e,t=e.getState,o){const r=vi(e.subscribe,e.getState,e.getServerState||e.getState,t,o);return n.useDebugValue(r),r}const wi=(e,t)=>{const n=(e=>e?yi(e):yi)(e),o=(e,o=t)=>xi(n,e,o);return Object.assign(o,n),o},bi=n.createContext(null),Si=bi.Provider,Ci=Qn.error001();function Ei(e,t){const o=n.useContext(bi);if(null===o)throw new Error(Ci);return xi(o,e,t)}function ki(){const e=n.useContext(bi);if(null===e)throw new Error(Ci);return n.useMemo((()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe})),[e])}const Mi={display:"none"},Ni={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},_i="react-flow__node-desc",Pi="react-flow__edge-desc",zi="react-flow__aria-live",Oi=e=>e.ariaLiveMessage;function Ai({rfId:e}){const n=Ei(Oi);return t.jsx("div",{id:`${zi}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:Ni,children:n})}function Ri({rfId:e,disableKeyboardA11y:n}){return t.jsxs(t.Fragment,{children:[t.jsxs("div",{id:`${_i}-${e}`,style:Mi,children:["Press enter or space to select a node.",!n&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "]}),t.jsx("div",{id:`${Pi}-${e}`,style:Mi,children:"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."}),!n&&t.jsx(Ai,{rfId:e})]})}const Ii=e=>e.userSelectionActive?"none":"all",Di=n.forwardRef((({position:e="top-left",children:n,className:o,style:i,...s},a)=>{const l=Ei(Ii),c=`${e}`.split("-");return t.jsx("div",{className:r(["react-flow__panel",o,...c]),style:{...i,pointerEvents:l},ref:a,...s,children:n})}));function $i({proOptions:e,position:n="bottom-right"}){return e?.hideAttribution?null:t.jsx(Di,{position:n,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:t.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}function Li(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,o]of e)if(!Object.is(o,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!Object.is(e[n[o]],t[n[o]]))return!1;return!0}Di.displayName="Panel";const Bi=e=>{const t=[],n=[];for(const[,n]of e.nodeLookup)n.selected&&t.push(n.internals.userNode);for(const[,t]of e.edgeLookup)t.selected&&n.push(t);return{selectedNodes:t,selectedEdges:n}},Ti=e=>e.id;function Vi(e,t){return Li(e.selectedNodes.map(Ti),t.selectedNodes.map(Ti))&&Li(e.selectedEdges.map(Ti),t.selectedEdges.map(Ti))}function ji({onSelectionChange:e}){const t=ki(),{selectedNodes:o,selectedEdges:r}=Ei(Bi,Vi);return n.useEffect((()=>{const n={nodes:o,edges:r};e?.(n),t.getState().onSelectionChangeHandlers.forEach((e=>e(n)))}),[o,r,e]),null}const Hi=e=>!!e.onSelectionChangeHandlers;function Zi({onSelectionChange:e}){const n=Ei(Hi);return e||n?t.jsx(ji,{onSelectionChange:e}):null}const Xi=[0,0],Yi={x:0,y:0,zoom:1},Fi=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","onBeforeDelete","debug","autoPanSpeed","paneClickDistance","rfId"],Wi=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setPaneClickDistance:e.setPaneClickDistance}),Ki={translateExtent:Jn,nodeOrigin:Xi,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1",paneClickDistance:0};function Gi(e){const{setNodes:t,setEdges:o,setMinZoom:r,setMaxZoom:i,setTranslateExtent:s,setNodeExtent:a,reset:l,setDefaultNodesAndEdges:c,setPaneClickDistance:u}=Ei(Wi,Li),d=ki();n.useEffect((()=>(c(e.defaultNodes,e.defaultEdges),()=>{h.current=Ki,l()})),[]);const h=n.useRef(Ki);return n.useEffect((()=>{for(const n of Fi){const l=e[n];l!==h.current[n]&&(void 0!==e[n]&&("nodes"===n?t(l):"edges"===n?o(l):"minZoom"===n?r(l):"maxZoom"===n?i(l):"translateExtent"===n?s(l):"nodeExtent"===n?a(l):"paneClickDistance"===n?u(l):"fitView"===n?d.setState({fitViewQueued:l}):"fitViewOptions"===n?d.setState({fitViewOptions:l}):d.setState({[n]:l})))}h.current=e}),Fi.map((t=>e[t]))),null}function qi(){return"undefined"!=typeof window&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null}const Ui="undefined"!=typeof document?document:null;function Qi(e=null,t={target:Ui,actInsideInputWithModifier:!0}){const[o,r]=n.useState(!1),i=n.useRef(!1),s=n.useRef(new Set([])),[a,l]=n.useMemo((()=>{if(null!==e){const t=(Array.isArray(e)?e:[e]).filter((e=>"string"==typeof e)).map((e=>e.replace("+","\n").replace("\n\n","\n+").split("\n"))),n=t.reduce(((e,t)=>e.concat(...t)),[]);return[t,n]}return[[],[]]}),[e]);return n.useEffect((()=>{const n=t?.target||Ui;if(null!==e){const e=e=>{i.current=e.ctrlKey||e.metaKey||e.shiftKey||e.altKey;if((!i.current||i.current&&!t.actInsideInputWithModifier)&&Qo(e))return!1;const n=es(e.code,l);if(s.current.add(e[n]),Ji(a,s.current,!1)){const n=e.composedPath?.()?.[0]||e.target,o="BUTTON"===n?.nodeName||"A"===n?.nodeName;!1===t.preventDefault||!i.current&&o||e.preventDefault(),r(!0)}},o=e=>{const t=es(e.code,l);Ji(a,s.current,!0)?(r(!1),s.current.clear()):s.current.delete(e[t]),"Meta"===e.key&&s.current.clear(),i.current=!1},c=()=>{s.current.clear(),r(!1)};return n?.addEventListener("keydown",e),n?.addEventListener("keyup",o),window.addEventListener("blur",c),window.addEventListener("contextmenu",c),()=>{n?.removeEventListener("keydown",e),n?.removeEventListener("keyup",o),window.removeEventListener("blur",c),window.removeEventListener("contextmenu",c)}}}),[e,r]),o}function Ji(e,t,n){return e.filter((e=>n||e.length===t.size)).some((e=>e.every((e=>t.has(e)))))}function es(e,t){return t.includes(e)?"code":"key"}const ts=()=>{const e=ki();return n.useMemo((()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:o}=e.getState();return o?o.scaleTo(t,{duration:n?.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[o,r,i],panZoom:s}=e.getState();return s?(await s.setViewport({x:t.x??o,y:t.y??r,zoom:t.zoom??i},{duration:n?.duration}),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,o]=e.getState().transform;return{x:t,y:n,zoom:o}},setCenter:async(t,n,o)=>{const{width:r,height:i,maxZoom:s,panZoom:a}=e.getState(),l=void 0!==o?.zoom?o.zoom:s,c=r/2-t*l,u=i/2-n*l;return a?(await a.setViewport({x:c,y:u,zoom:l},{duration:o?.duration}),Promise.resolve(!0)):Promise.resolve(!1)},fitBounds:async(t,n)=>{const{width:o,height:r,minZoom:i,maxZoom:s,panZoom:a}=e.getState(),l=jo(t,o,r,i,s,n?.padding??.1);return a?(await a.setViewport(l,{duration:n?.duration}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:o,snapGrid:r,snapToGrid:i,domNode:s}=e.getState();if(!s)return t;const{x:a,y:l}=s.getBoundingClientRect(),c={x:t.x-a,y:t.y-l},u=n.snapGrid??r,d=n.snapToGrid??i;return Bo(c,o,d,u)},flowToScreenPosition:t=>{const{transform:n,domNode:o}=e.getState();if(!o)return t;const{x:r,y:i}=o.getBoundingClientRect(),s=To(t,n);return{x:s.x+r,y:s.y+i}}})),[])};function ns(e,t){const n=[],o=new Map,r=[];for(const t of e)if("add"!==t.type)if("remove"===t.type||"replace"===t.type)o.set(t.id,[t]);else{const e=o.get(t.id);e?e.push(t):o.set(t.id,[t])}else r.push(t);for(const e of t){const t=o.get(e.id);if(!t){n.push(e);continue}if("remove"===t[0].type)continue;if("replace"===t[0].type){n.push({...t[0].item});continue}const r={...e};for(const e of t)os(e,r);n.push(r)}return r.length&&r.forEach((e=>{void 0!==e.index?n.splice(e.index,0,{...e.item}):n.push({...e.item})})),n}function os(e,t){switch(e.type){case"select":t.selected=e.selected;break;case"position":void 0!==e.position&&(t.position=e.position),void 0!==e.dragging&&(t.dragging=e.dragging);break;case"dimensions":void 0!==e.dimensions&&(t.measured??={},t.measured.width=e.dimensions.width,t.measured.height=e.dimensions.height,e.setAttributes&&(!0!==e.setAttributes&&"width"!==e.setAttributes||(t.width=e.dimensions.width),!0!==e.setAttributes&&"height"!==e.setAttributes||(t.height=e.dimensions.height))),"boolean"==typeof e.resizing&&(t.resizing=e.resizing)}}function rs(e,t){return ns(e,t)}function is(e,t){return ns(e,t)}function ss(e,t){return{id:e,type:"select",selected:t}}function as(e,t=new Set,n=!1){const o=[];for(const[r,i]of e){const e=t.has(r);void 0===i.selected&&!e||i.selected===e||(n&&(i.selected=e),o.push(ss(i.id,e)))}return o}function ls({items:e=[],lookup:t}){const n=[],o=new Map(e.map((e=>[e.id,e])));for(const[o,r]of e.entries()){const e=t.get(r.id),i=e?.internals?.userNode??e;void 0!==i&&i!==r&&n.push({id:r.id,item:r,type:"replace"}),void 0===i&&n.push({item:r,type:"add",index:o})}for(const[e]of t){void 0===o.get(e)&&n.push({id:e,type:"remove"})}return n}function cs(e){return{id:e.id,type:"remove"}}const us=e=>(e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e))(e),ds=e=>fo(e);function hs(e){return n.forwardRef(e)}const fs="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function gs(e){const[t,o]=n.useState(BigInt(0)),[r]=n.useState((()=>function(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}((()=>o((e=>e+BigInt(1)))))));return fs((()=>{const t=r.get();t.length&&(e(t),r.reset())}),[t]),r}const ps=n.createContext(null);function ms({children:e}){const o=ki(),r=gs(n.useCallback((e=>{const{nodes:t=[],setNodes:n,hasDefaultNodes:r,onNodesChange:i,nodeLookup:s,fitViewQueued:a}=o.getState();let l=t;for(const t of e)l="function"==typeof t?t(l):t;const c=ls({items:l,lookup:s});r&&n(l),c.length>0?i?.(c):a&&window.requestAnimationFrame((()=>{const{fitViewQueued:e,nodes:t,setNodes:n}=o.getState();e&&n(t)}))}),[])),i=gs(n.useCallback((e=>{const{edges:t=[],setEdges:n,hasDefaultEdges:r,onEdgesChange:i,edgeLookup:s}=o.getState();let a=t;for(const t of e)a="function"==typeof t?t(a):t;r?n(a):i&&i(ls({items:a,lookup:s}))}),[])),s=n.useMemo((()=>({nodeQueue:r,edgeQueue:i})),[]);return t.jsx(ps.Provider,{value:s,children:e})}const ys=e=>!!e.panZoom;function vs(){const e=ts(),t=ki(),o=function(){const e=n.useContext(ps);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}(),r=Ei(ys),i=n.useMemo((()=>{const e=e=>t.getState().nodeLookup.get(e),n=e=>{o.nodeQueue.push(e)},r=e=>{o.edgeQueue.push(e)},i=e=>{const{nodeLookup:n,nodeOrigin:o}=t.getState(),r=us(e)?e:n.get(e.id),i=r.parentId?Fo(r.position,r.measured,r.parentId,n,o):r.position,s={...r,position:i,width:r.measured?.width??r.width,height:r.measured?.height??r.height};return zo(s)},s=(e,t,o={replace:!1})=>{n((n=>n.map((n=>{if(n.id===e){const e="function"==typeof t?t(n):t;return o.replace&&us(e)?e:{...n,...e}}return n}))))},a=(e,t,n={replace:!1})=>{r((o=>o.map((o=>{if(o.id===e){const e="function"==typeof t?t(o):t;return n.replace&&ds(e)?e:{...o,...e}}return o}))))};return{getNodes:()=>t.getState().nodes.map((e=>({...e}))),getNode:t=>e(t)?.internals.userNode,getInternalNode:e,getEdges:()=>{const{edges:e=[]}=t.getState();return e.map((e=>({...e})))},getEdge:e=>t.getState().edgeLookup.get(e),setNodes:n,setEdges:r,addNodes:e=>{const t=Array.isArray(e)?e:[e];o.nodeQueue.push((e=>[...e,...t]))},addEdges:e=>{const t=Array.isArray(e)?e:[e];o.edgeQueue.push((e=>[...e,...t]))},toObject:()=>{const{nodes:e=[],edges:n=[],transform:o}=t.getState(),[r,i,s]=o;return{nodes:e.map((e=>({...e}))),edges:n.map((e=>({...e}))),viewport:{x:r,y:i,zoom:s}}},deleteElements:async({nodes:e=[],edges:n=[]})=>{const{nodes:o,edges:r,onNodesDelete:i,onEdgesDelete:s,triggerNodeChanges:a,triggerEdgeChanges:l,onDelete:c,onBeforeDelete:u}=t.getState(),{nodes:d,edges:h}=await async function({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:o,onBeforeDelete:r}){const i=new Set(e.map((e=>e.id))),s=[];for(const e of n){if(!1===e.deletable)continue;const t=i.has(e.id),n=!t&&e.parentId&&s.find((t=>t.id===e.parentId));(t||n)&&s.push(e)}const a=new Set(t.map((e=>e.id))),l=o.filter((e=>!1!==e.deletable)),c=xo(s,l);for(const e of l)a.has(e.id)&&!c.find((t=>t.id===e.id))&&c.push(e);if(!r)return{edges:c,nodes:s};const u=await r({nodes:s,edges:c});return"boolean"==typeof u?u?{edges:c,nodes:s}:{edges:[],nodes:[]}:u}({nodesToRemove:e,edgesToRemove:n,nodes:o,edges:r,onBeforeDelete:u}),f=h.length>0,g=d.length>0;if(f){const e=h.map(cs);s?.(h),l(e)}if(g){const e=d.map(cs);i?.(d),a(e)}return(g||f)&&c?.({nodes:d,edges:h}),{deletedNodes:d,deletedEdges:h}},getIntersectingNodes:(e,n=!0,o)=>{const r=Io(e),s=r?e:i(e),a=void 0!==o;return s?(o||t.getState().nodes).filter((o=>{const i=t.getState().nodeLookup.get(o.id);if(i&&!r&&(o.id===e.id||!i.internals.positionAbsolute))return!1;const l=zo(a?o:i),c=Ro(l,s);return n&&c>0||c>=s.width*s.height})):[]},isNodeIntersecting:(e,t,n=!0)=>{const o=Io(e)?e:i(e);if(!o)return!1;const r=Ro(o,t);return n&&r>0||r>=o.width*o.height},updateNode:s,updateNodeData:(e,t,n={replace:!1})=>{s(e,(e=>{const o="function"==typeof t?t(e):t;return n.replace?{...e,data:o}:{...e,data:{...e.data,...o}}}),n)},updateEdge:a,updateEdgeData:(e,t,n={replace:!1})=>{a(e,(e=>{const o="function"==typeof t?t(e):t;return n.replace?{...e,data:o}:{...e,data:{...e.data,...o}}}),n)},getNodesBounds:e=>{const{nodeLookup:n,nodeOrigin:o}=t.getState();return mo(e,{nodeLookup:n,nodeOrigin:o})},getHandleConnections:({type:e,id:n,nodeId:o})=>Array.from(t.getState().connectionLookup.get(`${o}-${e}${n?`-${n}`:""}`)?.values()??[]),getNodeConnections:({type:e,handleId:n,nodeId:o})=>Array.from(t.getState().connectionLookup.get(`${o}${e?n?`-${e}-${n}`:`-${e}`:""}`)?.values()??[]),fitView:async e=>{const n=t.getState().fitViewResolver??function(){let e,t;return{promise:new Promise(((n,o)=>{e=n,t=o})),resolve:e,reject:t}}();return t.setState({fitViewQueued:!0,fitViewOptions:e,fitViewResolver:n}),o.nodeQueue.push((e=>[...e])),n.promise}}}),[]);return n.useMemo((()=>({...i,...e,viewportInitialized:r})),[r])}const xs=e=>e.selected,ws={actInsideInputWithModifier:!1},bs="undefined"!=typeof window?window:void 0;const Ss={position:"absolute",width:"100%",height:"100%",top:0,left:0},Cs=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib});function Es({onPaneContextMenu:o,zoomOnScroll:r=!0,zoomOnPinch:i=!0,panOnScroll:s=!1,panOnScrollSpeed:a=.5,panOnScrollMode:l=e.PanOnScrollMode.Free,zoomOnDoubleClick:c=!0,panOnDrag:u=!0,defaultViewport:d,translateExtent:h,minZoom:f,maxZoom:g,zoomActivationKeyCode:p,preventScrolling:m=!0,children:y,noWheelClassName:v,noPanClassName:x,onViewportChange:w,isControlledViewport:b,paneClickDistance:S}){const C=ki(),E=n.useRef(null),{userSelectionActive:k,lib:M}=Ei(Cs,Li),N=Qi(p),_=n.useRef();!function(e){const t=ki();n.useEffect((()=>{const n=()=>{if(!e.current)return!1;const n=Go(e.current);0!==n.height&&0!==n.width||t.getState().onError?.("004",Qn.error004()),t.setState({width:n.width||500,height:n.height||500})};if(e.current){n(),window.addEventListener("resize",n);const t=new ResizeObserver((()=>n()));return t.observe(e.current),()=>{window.removeEventListener("resize",n),t&&e.current&&t.unobserve(e.current)}}}),[])}(E);const P=n.useCallback((e=>{w?.({x:e[0],y:e[1],zoom:e[2]}),b||C.setState({transform:e})}),[w,b]);return n.useEffect((()=>{if(E.current){_.current=Gr({domNode:E.current,minZoom:f,maxZoom:g,translateExtent:h,viewport:d,paneClickDistance:S,onDraggingChange:e=>C.setState({paneDragging:e}),onPanZoomStart:(e,t)=>{const{onViewportChangeStart:n,onMoveStart:o}=C.getState();o?.(e,t),n?.(t)},onPanZoom:(e,t)=>{const{onViewportChange:n,onMove:o}=C.getState();o?.(e,t),n?.(t)},onPanZoomEnd:(e,t)=>{const{onViewportChangeEnd:n,onMoveEnd:o}=C.getState();o?.(e,t),n?.(t)}});const{x:e,y:t,zoom:n}=_.current.getViewport();return C.setState({panZoom:_.current,transform:[e,t,n],domNode:E.current.closest(".react-flow")}),()=>{_.current?.destroy()}}}),[]),n.useEffect((()=>{_.current?.update({onPaneContextMenu:o,zoomOnScroll:r,zoomOnPinch:i,panOnScroll:s,panOnScrollSpeed:a,panOnScrollMode:l,zoomOnDoubleClick:c,panOnDrag:u,zoomActivationKeyPressed:N,preventScrolling:m,noPanClassName:x,userSelectionActive:k,noWheelClassName:v,lib:M,onTransformChange:P})}),[o,r,i,s,a,l,c,u,N,m,x,k,v,M,P]),t.jsx("div",{className:"react-flow__renderer",ref:E,style:Ss,children:y})}const ks=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Ms(){const{userSelectionActive:e,userSelectionRect:n}=Ei(ks,Li);return e&&n?t.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:n.width,height:n.height,transform:`translate(${n.x}px, ${n.y}px)`}}):null}const Ns=(e,t)=>n=>{n.target===t.current&&e?.(n)},_s=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function Ps({isSelecting:o,selectionKeyPressed:i,selectionMode:s=e.SelectionMode.Full,panOnDrag:a,selectionOnDrag:l,onSelectionStart:c,onSelectionEnd:u,onPaneClick:d,onPaneContextMenu:h,onPaneScroll:f,onPaneMouseEnter:g,onPaneMouseMove:p,onPaneMouseLeave:m,children:y}){const v=ki(),{userSelectionActive:x,elementsSelectable:w,dragging:b,connectionInProgress:S}=Ei(_s,Li),C=w&&(o||x),E=n.useRef(null),k=n.useRef(),M=n.useRef(new Set),N=n.useRef(new Set),_=n.useRef(!1),P=n.useRef(!1),z=e=>{_.current||S?_.current=!1:(d?.(e),v.getState().resetSelectedElements(),v.setState({nodesSelectionActive:!1}))},O=f?e=>f(e):void 0,A=!0===a||Array.isArray(a)&&a.includes(0);return t.jsxs("div",{className:r(["react-flow__pane",{draggable:A,dragging:b,selection:o}]),onClick:C?void 0:Ns(z,E),onContextMenu:Ns((e=>{Array.isArray(a)&&a?.includes(2)?e.preventDefault():h?.(e)}),E),onWheel:Ns(O,E),onPointerEnter:C?void 0:g,onPointerDown:C?e=>{const{resetSelectedElements:t,domNode:n}=v.getState();if(k.current=n?.getBoundingClientRect(),!w||!o||0!==e.button||e.target!==E.current||!k.current)return;e.target?.setPointerCapture?.(e.pointerId),P.current=!0,_.current=!1;const{x:r,y:i}=er(e.nativeEvent,k.current);t(),v.setState({userSelectionRect:{width:0,height:0,startX:r,startY:i,x:r,y:i}}),c?.(e)}:p,onPointerMove:C?t=>{const{userSelectionRect:n,transform:o,nodeLookup:r,edgeLookup:i,connectionLookup:a,triggerNodeChanges:l,triggerEdgeChanges:c,defaultEdgeOptions:u}=v.getState();if(!k.current||!n)return;_.current=!0;const{x:d,y:h}=er(t.nativeEvent,k.current),{startX:f,startY:g}=n,p={startX:f,startY:g,x:d<f?d:f,y:h<g?h:g,width:Math.abs(d-f),height:Math.abs(h-g)},m=M.current,y=N.current;M.current=new Set(vo(r,p,o,s===e.SelectionMode.Partial,!0).map((e=>e.id))),N.current=new Set;const x=u?.selectable??!0;for(const e of M.current){const t=a.get(e);if(t)for(const{edgeId:e}of t.values()){const t=i.get(e);t&&(t.selectable??x)&&N.current.add(e)}}if(!Wo(m,M.current)){l(as(r,M.current,!0))}if(!Wo(y,N.current)){c(as(i,N.current))}v.setState({userSelectionRect:p,userSelectionActive:!0,nodesSelectionActive:!1})}:p,onPointerUp:C?e=>{if(0!==e.button||!P.current)return;e.target?.releasePointerCapture?.(e.pointerId);const{userSelectionRect:t}=v.getState();!x&&t&&e.target===E.current&&z?.(e),v.setState({userSelectionActive:!1,userSelectionRect:null,nodesSelectionActive:M.current.size>0}),u?.(e),(i||l)&&(_.current=!1),P.current=!1}:void 0,onPointerLeave:m,ref:E,style:Ss,children:[y,t.jsx(Ms,{})]})}function zs({id:e,store:t,unselect:n=!1,nodeRef:o}){const{addSelectedNodes:r,unselectNodesAndEdges:i,multiSelectionActive:s,nodeLookup:a,onError:l}=t.getState(),c=a.get(e);c?(t.setState({nodesSelectionActive:!1}),c.selected?(n||c.selected&&s)&&(i({nodes:[c],edges:[]}),requestAnimationFrame((()=>o?.current?.blur()))):r([e])):l?.("012",Qn.error012(e))}function Os({nodeRef:e,disabled:t=!1,noDragClassName:o,handleSelector:r,nodeId:i,isSelectable:s,nodeClickDistance:a}){const l=ki(),[c,u]=n.useState(!1),d=n.useRef();return n.useEffect((()=>{d.current=Ir({getStoreItems:()=>l.getState(),onNodeMouseDown:t=>{zs({id:t,store:l,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})}),[]),n.useEffect((()=>{if(t)d.current?.destroy();else if(e.current)return d.current?.update({noDragClassName:o,handleSelector:r,domNode:e.current,isSelectable:s,nodeId:i,nodeClickDistance:a}),()=>{d.current?.destroy()}}),[o,r,t,s,e,i]),c}const As=e=>t=>t.selected&&(t.draggable||e&&void 0===t.draggable);function Rs(){const e=ki();return n.useCallback((t=>{const{nodeExtent:n,snapToGrid:o,snapGrid:r,nodesDraggable:i,onError:s,updateNodePositions:a,nodeLookup:l,nodeOrigin:c}=e.getState(),u=new Map,d=As(i),h=o?r[0]:5,f=o?r[1]:5,g=t.direction.x*h*t.factor,p=t.direction.y*f*t.factor;for(const[,e]of l){if(!d(e))continue;let t={x:e.internals.positionAbsolute.x+g,y:e.internals.positionAbsolute.y+p};o&&(t=Lo(t,r));const{position:i,positionAbsolute:a}=bo({nodeId:e.id,nextPosition:t,nodeLookup:l,nodeExtent:n,nodeOrigin:c,onError:s});e.position=i,e.internals.positionAbsolute=a,u.set(e.id,e)}a(u)}),[])}const Is=n.createContext(null),Ds=Is.Provider;Is.Consumer;const $s=()=>n.useContext(Is),Ls=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId});const Bs=n.memo(hs((function({type:n="source",position:o=e.Position.Top,isValidConnection:i,isConnectable:s=!0,isConnectableStart:a=!0,isConnectableEnd:l=!0,id:c,onConnect:u,children:d,className:h,onMouseDown:f,onTouchStart:g,...p},m){const y=c||null,v="target"===n,x=ki(),w=$s(),{connectOnClick:b,noPanClassName:S,rfId:C}=Ei(Ls,Li),{connectingFrom:E,connectingTo:k,clickConnecting:M,isPossibleEndHandle:N,connectionInProcess:_,clickConnectionInProcess:P,valid:z}=Ei(((t,n,o)=>r=>{const{connectionClickStartHandle:i,connectionMode:s,connection:a}=r,{fromHandle:l,toHandle:c,isValid:u}=a,d=c?.nodeId===t&&c?.id===n&&c?.type===o;return{connectingFrom:l?.nodeId===t&&l?.id===n&&l?.type===o,connectingTo:d,clickConnecting:i?.nodeId===t&&i?.id===n&&i?.type===o,isPossibleEndHandle:s===e.ConnectionMode.Strict?l?.type!==o:t!==l?.nodeId||n!==l?.id,connectionInProcess:!!l,clickConnectionInProcess:!!i,valid:d&&u}})(w,y,n),Li);w||x.getState().onError?.("010",Qn.error010());const O=e=>{const{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:o}=x.getState(),r={...t,...e};if(o){const{edges:e,setEdges:t}=x.getState();t(cr(r,e))}n?.(r),u?.(r)},A=e=>{if(!w)return;const t=Jo(e.nativeEvent);if(a&&(t&&0===e.button||!t)){const t=x.getState();jr.onPointerDown(e.nativeEvent,{autoPanOnConnect:t.autoPanOnConnect,connectionMode:t.connectionMode,connectionRadius:t.connectionRadius,domNode:t.domNode,nodeLookup:t.nodeLookup,lib:t.lib,isTarget:v,handleId:y,nodeId:w,flowId:t.rfId,panBy:t.panBy,cancelConnection:t.cancelConnection,onConnectStart:t.onConnectStart,onConnectEnd:t.onConnectEnd,updateConnection:t.updateConnection,onConnect:O,isValidConnection:i||t.isValidConnection,getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,autoPanSpeed:t.autoPanSpeed})}t?f?.(e):g?.(e)};return t.jsx("div",{"data-handleid":y,"data-nodeid":w,"data-handlepos":o,"data-id":`${C}-${w}-${y}-${n}`,className:r(["react-flow__handle",`react-flow__handle-${o}`,"nodrag",S,h,{source:!v,target:v,connectable:s,connectablestart:a,connectableend:l,clickconnecting:M,connectingfrom:E,connectingto:k,valid:z,connectionindicator:s&&(!_||N)&&(_||P?l:a)}]),onMouseDown:A,onTouchStart:A,onClick:b?e=>{const{onClickConnectStart:t,onClickConnectEnd:o,connectionClickStartHandle:r,connectionMode:s,isValidConnection:l,lib:c,rfId:u,nodeLookup:d,connection:h}=x.getState();if(!w||!r&&!a)return;if(!r)return t?.(e.nativeEvent,{nodeId:w,handleId:y,handleType:n}),void x.setState({connectionClickStartHandle:{nodeId:w,type:n,id:y}});const f=qo(e.target),g=i||l,{connection:p,isValid:m}=jr.isValid(e.nativeEvent,{handle:{nodeId:w,id:y,type:n},connectionMode:s,fromNodeId:r.nodeId,fromHandleId:r.id||null,fromType:r.type,isValidConnection:g,flowId:u,doc:f,lib:c,nodeLookup:d});m&&p&&O(p);const v=structuredClone(h);delete v.inProgress,v.toPosition=v.toHandle?v.toHandle.position:null,o?.(e,v),x.setState({connectionClickStartHandle:null})}:void 0,ref:m,...p,children:d})})));const Ts={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Vs={input:function({data:n,isConnectable:o,sourcePosition:r=e.Position.Bottom}){return t.jsxs(t.Fragment,{children:[n?.label,t.jsx(Bs,{type:"source",position:r,isConnectable:o})]})},default:function({data:n,isConnectable:o,targetPosition:r=e.Position.Top,sourcePosition:i=e.Position.Bottom}){return t.jsxs(t.Fragment,{children:[t.jsx(Bs,{type:"target",position:r,isConnectable:o}),n?.label,t.jsx(Bs,{type:"source",position:i,isConnectable:o})]})},output:function({data:n,isConnectable:o,targetPosition:r=e.Position.Top}){return t.jsxs(t.Fragment,{children:[t.jsx(Bs,{type:"target",position:r,isConnectable:o}),n?.label]})},group:function(){return null}};const js=e=>{const{width:t,height:n,x:o,y:r}=yo(e.nodeLookup,{filter:e=>!!e.selected});return{width:Do(t)?t:null,height:Do(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${o}px,${r}px)`}};function Hs({onSelectionContextMenu:e,noPanClassName:o,disableKeyboardA11y:i}){const s=ki(),{width:a,height:l,transformString:c,userSelectionActive:u}=Ei(js,Li),d=Rs(),h=n.useRef(null);if(n.useEffect((()=>{i||h.current?.focus({preventScroll:!0})}),[i]),Os({nodeRef:h}),u||!a||!l)return null;const f=e?t=>{const n=s.getState().nodes.filter((e=>e.selected));e(t,n)}:void 0;return t.jsx("div",{className:r(["react-flow__nodesselection","react-flow__container",o]),style:{transform:c},children:t.jsx("div",{ref:h,className:"react-flow__nodesselection-rect",onContextMenu:f,tabIndex:i?void 0:-1,onKeyDown:i?void 0:e=>{Object.prototype.hasOwnProperty.call(Ts,e.key)&&(e.preventDefault(),d({direction:Ts[e.key],factor:e.shiftKey?4:1}))},style:{width:a,height:l}})})}const Zs="undefined"!=typeof window?window:void 0,Xs=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function Ys({children:e,onPaneClick:o,onPaneMouseEnter:r,onPaneMouseMove:i,onPaneMouseLeave:s,onPaneContextMenu:a,onPaneScroll:l,paneClickDistance:c,deleteKeyCode:u,selectionKeyCode:d,selectionOnDrag:h,selectionMode:f,onSelectionStart:g,onSelectionEnd:p,multiSelectionKeyCode:m,panActivationKeyCode:y,zoomActivationKeyCode:v,elementsSelectable:x,zoomOnScroll:w,zoomOnPinch:b,panOnScroll:S,panOnScrollSpeed:C,panOnScrollMode:E,zoomOnDoubleClick:k,panOnDrag:M,defaultViewport:N,translateExtent:_,minZoom:P,maxZoom:z,preventScrolling:O,onSelectionContextMenu:A,noWheelClassName:R,noPanClassName:I,disableKeyboardA11y:D,onViewportChange:$,isControlledViewport:L}){const{nodesSelectionActive:B,userSelectionActive:T}=Ei(Xs),V=Qi(d,{target:Zs}),j=Qi(y,{target:Zs}),H=j||M,Z=j||S,X=h&&!0!==H,Y=V||T||X;return function({deleteKeyCode:e,multiSelectionKeyCode:t}){const o=ki(),{deleteElements:r}=vs(),i=Qi(e,ws),s=Qi(t,{target:bs});n.useEffect((()=>{if(i){const{edges:e,nodes:t}=o.getState();r({nodes:t.filter(xs),edges:e.filter(xs)}),o.setState({nodesSelectionActive:!1})}}),[i]),n.useEffect((()=>{o.setState({multiSelectionActive:s})}),[s])}({deleteKeyCode:u,multiSelectionKeyCode:m}),t.jsx(Es,{onPaneContextMenu:a,elementsSelectable:x,zoomOnScroll:w,zoomOnPinch:b,panOnScroll:Z,panOnScrollSpeed:C,panOnScrollMode:E,zoomOnDoubleClick:k,panOnDrag:!V&&H,defaultViewport:N,translateExtent:_,minZoom:P,maxZoom:z,zoomActivationKeyCode:v,preventScrolling:O,noWheelClassName:R,noPanClassName:I,onViewportChange:$,isControlledViewport:L,paneClickDistance:c,children:t.jsxs(Ps,{onSelectionStart:g,onSelectionEnd:p,onPaneClick:o,onPaneMouseEnter:r,onPaneMouseMove:i,onPaneMouseLeave:s,onPaneContextMenu:a,onPaneScroll:l,panOnDrag:H,isSelecting:!!Y,selectionMode:f,selectionKeyPressed:V,selectionOnDrag:X,children:[e,B&&t.jsx(Hs,{onSelectionContextMenu:A,noPanClassName:I,disableKeyboardA11y:D})]})})}Ys.displayName="FlowRenderer";const Fs=n.memo(Ys),Ws=e=>t=>e?vo(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map((e=>e.id)):Array.from(t.nodeLookup.keys());const Ks=e=>e.updateNodeInternals;function Gs({id:e,onClick:o,onMouseEnter:i,onMouseMove:s,onMouseLeave:a,onContextMenu:l,onDoubleClick:c,nodesDraggable:u,elementsSelectable:d,nodesConnectable:h,nodesFocusable:f,resizeObserver:g,noDragClassName:p,noPanClassName:m,disableKeyboardA11y:y,rfId:v,nodeTypes:x,nodeClickDistance:w,onError:b}){const{node:S,internals:C,isParent:E}=Ei((t=>{const n=t.nodeLookup.get(e),o=t.parentLookup.has(e);return{node:n,internals:n.internals,isParent:o}}),Li);let k=S.type||"default",M=x?.[k]||Vs[k];void 0===M&&(b?.("003",Qn.error003(k)),k="default",M=Vs.default);const N=!!(S.draggable||u&&void 0===S.draggable),_=!!(S.selectable||d&&void 0===S.selectable),P=!!(S.connectable||h&&void 0===S.connectable),z=!!(S.focusable||f&&void 0===S.focusable),O=ki(),A=Yo(S),R=function({node:e,nodeType:t,hasDimensions:o,resizeObserver:r}){const i=ki(),s=n.useRef(null),a=n.useRef(null),l=n.useRef(e.sourcePosition),c=n.useRef(e.targetPosition),u=n.useRef(t),d=o&&!!e.internals.handleBounds;return n.useEffect((()=>{!s.current||e.hidden||d&&a.current===s.current||(a.current&&r?.unobserve(a.current),r?.observe(s.current),a.current=s.current)}),[d,e.hidden]),n.useEffect((()=>()=>{a.current&&(r?.unobserve(a.current),a.current=null)}),[]),n.useEffect((()=>{if(s.current){const n=u.current!==t,o=l.current!==e.sourcePosition,r=c.current!==e.targetPosition;(n||o||r)&&(u.current=t,l.current=e.sourcePosition,c.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:s.current,force:!0}]])))}}),[e.id,t,e.sourcePosition,e.targetPosition]),s}({node:S,nodeType:k,hasDimensions:A,resizeObserver:g}),I=Os({nodeRef:R,disabled:S.hidden||!N,noDragClassName:p,handleSelector:S.dragHandle,nodeId:e,isSelectable:_,nodeClickDistance:w}),D=Rs();if(S.hidden)return null;const $=Xo(S),L=function(e){return void 0===e.internals.handleBounds?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}(S),B=_||N||o||i||s||a,T=i?e=>i(e,{...C.userNode}):void 0,V=s?e=>s(e,{...C.userNode}):void 0,j=a?e=>a(e,{...C.userNode}):void 0,H=l?e=>l(e,{...C.userNode}):void 0,Z=c?e=>c(e,{...C.userNode}):void 0;return t.jsx("div",{className:r(["react-flow__node",`react-flow__node-${k}`,{[m]:N},S.className,{selected:S.selected,selectable:_,parent:E,draggable:N,dragging:I}]),ref:R,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:B?"all":"none",visibility:A?"visible":"hidden",...S.style,...L},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:T,onMouseMove:V,onMouseLeave:j,onContextMenu:H,onClick:t=>{const{selectNodesOnDrag:n,nodeDragThreshold:r}=O.getState();_&&(!n||!N||r>0)&&zs({id:e,store:O,nodeRef:R}),o&&o(t,{...C.userNode})},onDoubleClick:Z,onKeyDown:z?t=>{if(!Qo(t.nativeEvent)&&!y)if(eo.includes(t.key)&&_){const n="Escape"===t.key;zs({id:e,store:O,unselect:n,nodeRef:R})}else N&&S.selected&&Object.prototype.hasOwnProperty.call(Ts,t.key)&&(t.preventDefault(),O.setState({ariaLiveMessage:`Moved selected node ${t.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~C.positionAbsolute.x}, y: ${~~C.positionAbsolute.y}`}),D({direction:Ts[t.key],factor:t.shiftKey?4:1}))}:void 0,tabIndex:z?0:void 0,role:z?"button":void 0,"aria-describedby":y?void 0:`${_i}-${v}`,"aria-label":S.ariaLabel,children:t.jsx(Ds,{value:e,children:t.jsx(M,{id:e,data:S.data,type:k,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:S.selected??!1,selectable:_,draggable:N,deletable:S.deletable??!0,isConnectable:P,sourcePosition:S.sourcePosition,targetPosition:S.targetPosition,dragging:I,dragHandle:S.dragHandle,zIndex:C.z,parentId:S.parentId,...$})})})}const qs=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function Us(e){const{nodesDraggable:o,nodesConnectable:r,nodesFocusable:i,elementsSelectable:s,onError:a}=Ei(qs,Li),l=(c=e.onlyRenderVisibleElements,Ei(n.useCallback(Ws(c),[c]),Li));var c;const u=function(){const e=Ei(Ks),[t]=n.useState((()=>"undefined"==typeof ResizeObserver?null:new ResizeObserver((t=>{const n=new Map;t.forEach((e=>{const t=e.target.getAttribute("data-id");n.set(t,{id:t,nodeElement:e.target,force:!0})})),e(n)}))));return n.useEffect((()=>()=>{t?.disconnect()}),[t]),t}();return t.jsx("div",{className:"react-flow__nodes",style:Ss,children:l.map((n=>t.jsx(Gs,{id:n,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:u,nodesDraggable:o,nodesConnectable:r,nodesFocusable:i,elementsSelectable:s,nodeClickDistance:e.nodeClickDistance,onError:a},n)))})}Us.displayName="NodeRenderer";const Qs=n.memo(Us);const Js={[e.MarkerType.Arrow]:({color:e="none",strokeWidth:n=1})=>t.jsx("polyline",{style:{stroke:e,strokeWidth:n},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),[e.MarkerType.ArrowClosed]:({color:e="none",strokeWidth:n=1})=>t.jsx("polyline",{style:{stroke:e,fill:e,strokeWidth:n},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})};const ea=({id:e,type:o,color:r,width:i=12.5,height:s=12.5,markerUnits:a="strokeWidth",strokeWidth:l,orient:c="auto-start-reverse"})=>{const u=function(e){const t=ki();return n.useMemo((()=>Object.prototype.hasOwnProperty.call(Js,e)?Js[e]:(t.getState().onError?.("009",Qn.error009(e)),null)),[e])}(o);return u?t.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${i}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:c,refX:"0",refY:"0",children:t.jsx(u,{color:r,strokeWidth:l})}):null},ta=({defaultColor:e,rfId:o})=>{const r=Ei((e=>e.edges)),i=Ei((e=>e.defaultEdgeOptions)),s=n.useMemo((()=>{const t=function(e,{id:t,defaultColor:n,defaultMarkerStart:o,defaultMarkerEnd:r}){const i=new Set;return e.reduce(((e,s)=>([s.markerStart||o,s.markerEnd||r].forEach((o=>{if(o&&"object"==typeof o){const r=xr(o,t);i.has(r)||(e.push({id:r,color:o.color||n,...o}),i.add(r))}})),e)),[]).sort(((e,t)=>e.id.localeCompare(t.id)))}(r,{id:o,defaultColor:e,defaultMarkerStart:i?.markerStart,defaultMarkerEnd:i?.markerEnd});return t}),[r,i,o,e]);return s.length?t.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:t.jsx("defs",{children:s.map((e=>t.jsx(ea,{id:e.id,type:e.type,color:e.color,width:e.width,height:e.height,markerUnits:e.markerUnits,strokeWidth:e.strokeWidth,orient:e.orient},e.id)))})}):null};ta.displayName="MarkerDefinitions";var na=n.memo(ta);function oa({x:e,y:o,label:i,labelStyle:s,labelShowBg:a=!0,labelBgStyle:l,labelBgPadding:c=[2,4],labelBgBorderRadius:u=2,children:d,className:h,...f}){const[g,p]=n.useState({x:1,y:0,width:0,height:0}),m=r(["react-flow__edge-textwrapper",h]),y=n.useRef(null);return n.useEffect((()=>{if(y.current){const e=y.current.getBBox();p({x:e.x,y:e.y,width:e.width,height:e.height})}}),[i]),i?t.jsxs("g",{transform:`translate(${e-g.width/2} ${o-g.height/2})`,className:m,visibility:g.width?"visible":"hidden",...f,children:[a&&t.jsx("rect",{width:g.width+2*c[0],x:-c[0],y:-c[1],height:g.height+2*c[1],className:"react-flow__edge-textbg",style:l,rx:u,ry:u}),t.jsx("text",{className:"react-flow__edge-text",y:g.height/2,dy:"0.3em",ref:y,style:s,children:i}),d]}):null}oa.displayName="EdgeText";const ra=n.memo(oa);function ia({path:e,labelX:n,labelY:o,label:i,labelStyle:s,labelShowBg:a,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:u,interactionWidth:d=20,...h}){return t.jsxs(t.Fragment,{children:[t.jsx("path",{...h,d:e,fill:"none",className:r(["react-flow__edge-path",h.className])}),d&&t.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:d,className:"react-flow__edge-interaction"}),i&&Do(n)&&Do(o)?t.jsx(ra,{x:n,y:o,label:i,labelStyle:s,labelShowBg:a,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:u}):null]})}function sa({pos:t,x1:n,y1:o,x2:r,y2:i}){return t===e.Position.Left||t===e.Position.Right?[.5*(n+r),o]:[n,.5*(o+i)]}function aa({sourceX:t,sourceY:n,sourcePosition:o=e.Position.Bottom,targetX:r,targetY:i,targetPosition:s=e.Position.Top}){const[a,l]=sa({pos:o,x1:t,y1:n,x2:r,y2:i}),[c,u]=sa({pos:s,x1:r,y1:i,x2:t,y2:n}),[d,h,f,g]=nr({sourceX:t,sourceY:n,targetX:r,targetY:i,sourceControlX:a,sourceControlY:l,targetControlX:c,targetControlY:u});return[`M${t},${n} C${a},${l} ${c},${u} ${r},${i}`,d,h,f,g]}function la(e){return n.memo((({id:n,sourceX:o,sourceY:r,targetX:i,targetY:s,sourcePosition:a,targetPosition:l,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:h,labelBgPadding:f,labelBgBorderRadius:g,style:p,markerEnd:m,markerStart:y,interactionWidth:v})=>{const[x,w,b]=aa({sourceX:o,sourceY:r,sourcePosition:a,targetX:i,targetY:s,targetPosition:l}),S=e.isInternal?void 0:n;return t.jsx(ia,{id:S,path:x,labelX:w,labelY:b,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:h,labelBgPadding:f,labelBgBorderRadius:g,style:p,markerEnd:m,markerStart:y,interactionWidth:v})}))}const ca=la({isInternal:!1}),ua=la({isInternal:!0});function da(o){return n.memo((({id:n,sourceX:r,sourceY:i,targetX:s,targetY:a,label:l,labelStyle:c,labelShowBg:u,labelBgStyle:d,labelBgPadding:h,labelBgBorderRadius:f,style:g,sourcePosition:p=e.Position.Bottom,targetPosition:m=e.Position.Top,markerEnd:y,markerStart:v,pathOptions:x,interactionWidth:w})=>{const[b,S,C]=gr({sourceX:r,sourceY:i,sourcePosition:p,targetX:s,targetY:a,targetPosition:m,borderRadius:x?.borderRadius,offset:x?.offset}),E=o.isInternal?void 0:n;return t.jsx(ia,{id:E,path:b,labelX:S,labelY:C,label:l,labelStyle:c,labelShowBg:u,labelBgStyle:d,labelBgPadding:h,labelBgBorderRadius:f,style:g,markerEnd:y,markerStart:v,interactionWidth:w})}))}ca.displayName="SimpleBezierEdge",ua.displayName="SimpleBezierEdgeInternal";const ha=da({isInternal:!1}),fa=da({isInternal:!0});function ga(e){return n.memo((({id:o,...r})=>{const i=e.isInternal?void 0:o;return t.jsx(ha,{...r,id:i,pathOptions:n.useMemo((()=>({borderRadius:0,offset:r.pathOptions?.offset})),[r.pathOptions?.offset])})}))}ha.displayName="SmoothStepEdge",fa.displayName="SmoothStepEdgeInternal";const pa=ga({isInternal:!1}),ma=ga({isInternal:!0});function ya(e){return n.memo((({id:n,sourceX:o,sourceY:r,targetX:i,targetY:s,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:h,style:f,markerEnd:g,markerStart:p,interactionWidth:m})=>{const[y,v,x]=ur({sourceX:o,sourceY:r,targetX:i,targetY:s}),w=e.isInternal?void 0:n;return t.jsx(ia,{id:w,path:y,labelX:v,labelY:x,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:h,style:f,markerEnd:g,markerStart:p,interactionWidth:m})}))}pa.displayName="StepEdge",ma.displayName="StepEdgeInternal";const va=ya({isInternal:!1}),xa=ya({isInternal:!0});function wa(o){return n.memo((({id:n,sourceX:r,sourceY:i,targetX:s,targetY:a,sourcePosition:l=e.Position.Bottom,targetPosition:c=e.Position.Top,label:u,labelStyle:d,labelShowBg:h,labelBgStyle:f,labelBgPadding:g,labelBgBorderRadius:p,style:m,markerEnd:y,markerStart:v,pathOptions:x,interactionWidth:w})=>{const[b,S,C]=ir({sourceX:r,sourceY:i,sourcePosition:l,targetX:s,targetY:a,targetPosition:c,curvature:x?.curvature}),E=o.isInternal?void 0:n;return t.jsx(ia,{id:E,path:b,labelX:S,labelY:C,label:u,labelStyle:d,labelShowBg:h,labelBgStyle:f,labelBgPadding:g,labelBgBorderRadius:p,style:m,markerEnd:y,markerStart:v,interactionWidth:w})}))}va.displayName="StraightEdge",xa.displayName="StraightEdgeInternal";const ba=wa({isInternal:!1}),Sa=wa({isInternal:!0});ba.displayName="BezierEdge",Sa.displayName="BezierEdgeInternal";const Ca={default:Sa,straight:xa,step:ma,smoothstep:fa,simplebezier:ua},Ea={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},ka=(t,n,o)=>o===e.Position.Left?t-n:o===e.Position.Right?t+n:t,Ma=(t,n,o)=>o===e.Position.Top?t-n:o===e.Position.Bottom?t+n:t,Na="react-flow__edgeupdater";function _a({position:e,centerX:n,centerY:o,radius:i=10,onMouseDown:s,onMouseEnter:a,onMouseOut:l,type:c}){return t.jsx("circle",{onMouseDown:s,onMouseEnter:a,onMouseOut:l,className:r([Na,`${Na}-${c}`]),cx:ka(n,i,e),cy:Ma(o,i,e),r:i,stroke:"transparent",fill:"transparent"})}function Pa({isReconnectable:e,reconnectRadius:n,edge:o,sourceX:r,sourceY:i,targetX:s,targetY:a,sourcePosition:l,targetPosition:c,onReconnect:u,onReconnectStart:d,onReconnectEnd:h,setReconnecting:f,setUpdateHover:g}){const p=ki(),m=(e,t)=>{if(0!==e.button)return;const{autoPanOnConnect:n,domNode:r,isValidConnection:i,connectionMode:s,connectionRadius:a,lib:l,onConnectStart:c,onConnectEnd:g,cancelConnection:m,nodeLookup:y,rfId:v,panBy:x,updateConnection:w}=p.getState(),b="target"===t.type;f(!0),d?.(e,o,t.type);jr.onPointerDown(e.nativeEvent,{autoPanOnConnect:n,connectionMode:s,connectionRadius:a,domNode:r,handleId:t.id,nodeId:t.nodeId,nodeLookup:y,isTarget:b,edgeUpdaterType:t.type,lib:l,flowId:v,cancelConnection:m,panBy:x,isValidConnection:i,onConnect:e=>u?.(o,e),onConnectStart:c,onConnectEnd:g,onReconnectEnd:(e,n)=>{f(!1),h?.(e,o,t.type,n)},updateConnection:w,getTransform:()=>p.getState().transform,getFromHandle:()=>p.getState().connection.fromHandle})},y=()=>g(!0),v=()=>g(!1);return t.jsxs(t.Fragment,{children:[(!0===e||"source"===e)&&t.jsx(_a,{position:l,centerX:r,centerY:i,radius:n,onMouseDown:e=>m(e,{nodeId:o.target,id:o.targetHandle??null,type:"target"}),onMouseEnter:y,onMouseOut:v,type:"source"}),(!0===e||"target"===e)&&t.jsx(_a,{position:c,centerX:s,centerY:a,radius:n,onMouseDown:e=>m(e,{nodeId:o.source,id:o.sourceHandle??null,type:"source"}),onMouseEnter:y,onMouseOut:v,type:"target"})]})}function za({id:o,edgesFocusable:i,edgesReconnectable:s,elementsSelectable:a,onClick:l,onDoubleClick:c,onContextMenu:u,onMouseEnter:d,onMouseMove:h,onMouseLeave:f,reconnectRadius:g,onReconnect:p,onReconnectStart:m,onReconnectEnd:y,rfId:v,edgeTypes:x,noPanClassName:w,onError:b,disableKeyboardA11y:S}){let C=Ei((e=>e.edgeLookup.get(o)));const E=Ei((e=>e.defaultEdgeOptions));C=E?{...E,...C}:C;let k=C.type||"default",M=x?.[k]||Ca[k];void 0===M&&(b?.("011",Qn.error011(k)),k="default",M=Ca.default);const N=!!(C.focusable||i&&void 0===C.focusable),_=void 0!==p&&(C.reconnectable||s&&void 0===C.reconnectable),P=!!(C.selectable||a&&void 0===C.selectable),z=n.useRef(null),[O,A]=n.useState(!1),[R,I]=n.useState(!1),D=ki(),{zIndex:$,sourceX:L,sourceY:B,targetX:T,targetY:V,sourcePosition:j,targetPosition:H}=Ei(n.useCallback((t=>{const n=t.nodeLookup.get(C.source),r=t.nodeLookup.get(C.target);if(!n||!r)return{zIndex:C.zIndex,...Ea};const i=function(t){const{sourceNode:n,targetNode:o}=t;if(!pr(n)||!pr(o))return null;const r=n.internals.handleBounds||mr(n.handles),i=o.internals.handleBounds||mr(o.handles),s=vr(r?.source??[],t.sourceHandle),a=vr(t.connectionMode===e.ConnectionMode.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),t.targetHandle);if(!s||!a)return t.onError?.("008",Qn.error008(s?"target":"source",{id:t.id,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle})),null;const l=s?.position||e.Position.Bottom,c=a?.position||e.Position.Top,u=yr(n,s,l),d=yr(o,a,c);return{sourceX:u.x,sourceY:u.y,targetX:d.x,targetY:d.y,sourcePosition:l,targetPosition:c}}({id:o,sourceNode:n,targetNode:r,sourceHandle:C.sourceHandle||null,targetHandle:C.targetHandle||null,connectionMode:t.connectionMode,onError:b}),s=function({sourceNode:e,targetNode:t,selected:n=!1,zIndex:o=0,elevateOnSelect:r=!1}){if(!r)return o;const i=n||t.selected||e.selected,s=Math.max(e.internals.z||0,t.internals.z||0,1e3);return o+(i?s:0)}({selected:C.selected,zIndex:C.zIndex,sourceNode:n,targetNode:r,elevateOnSelect:t.elevateEdgesOnSelect});return{zIndex:s,...i||Ea}}),[C.source,C.target,C.sourceHandle,C.targetHandle,C.selected,C.zIndex]),Li),Z=n.useMemo((()=>C.markerStart?`url('#${xr(C.markerStart,v)}')`:void 0),[C.markerStart,v]),X=n.useMemo((()=>C.markerEnd?`url('#${xr(C.markerEnd,v)}')`:void 0),[C.markerEnd,v]);if(C.hidden||null===L||null===B||null===T||null===V)return null;const Y=c?e=>{c(e,{...C})}:void 0,F=u?e=>{u(e,{...C})}:void 0,W=d?e=>{d(e,{...C})}:void 0,K=h?e=>{h(e,{...C})}:void 0,G=f?e=>{f(e,{...C})}:void 0;return t.jsx("svg",{style:{zIndex:$},children:t.jsxs("g",{className:r(["react-flow__edge",`react-flow__edge-${k}`,C.className,w,{selected:C.selected,animated:C.animated,inactive:!P&&!l,updating:O,selectable:P}]),onClick:e=>{const{addSelectedEdges:t,unselectNodesAndEdges:n,multiSelectionActive:r}=D.getState();P&&(D.setState({nodesSelectionActive:!1}),C.selected&&r?(n({nodes:[],edges:[C]}),z.current?.blur()):t([o])),l&&l(e,C)},onDoubleClick:Y,onContextMenu:F,onMouseEnter:W,onMouseMove:K,onMouseLeave:G,onKeyDown:N?e=>{if(!S&&eo.includes(e.key)&&P){const{unselectNodesAndEdges:t,addSelectedEdges:n}=D.getState();"Escape"===e.key?(z.current?.blur(),t({edges:[C]})):n([o])}}:void 0,tabIndex:N?0:void 0,role:N?"button":"img","data-id":o,"data-testid":`rf__edge-${o}`,"aria-label":null===C.ariaLabel?void 0:C.ariaLabel||`Edge from ${C.source} to ${C.target}`,"aria-describedby":N?`${Pi}-${v}`:void 0,ref:z,children:[!R&&t.jsx(M,{id:o,source:C.source,target:C.target,type:C.type,selected:C.selected,animated:C.animated,selectable:P,deletable:C.deletable??!0,label:C.label,labelStyle:C.labelStyle,labelShowBg:C.labelShowBg,labelBgStyle:C.labelBgStyle,labelBgPadding:C.labelBgPadding,labelBgBorderRadius:C.labelBgBorderRadius,sourceX:L,sourceY:B,targetX:T,targetY:V,sourcePosition:j,targetPosition:H,data:C.data,style:C.style,sourceHandleId:C.sourceHandle,targetHandleId:C.targetHandle,markerStart:Z,markerEnd:X,pathOptions:"pathOptions"in C?C.pathOptions:void 0,interactionWidth:C.interactionWidth}),_&&t.jsx(Pa,{edge:C,isReconnectable:_,reconnectRadius:g,onReconnect:p,onReconnectStart:m,onReconnectEnd:y,sourceX:L,sourceY:B,targetX:T,targetY:V,sourcePosition:j,targetPosition:H,setUpdateHover:A,setReconnecting:I})]})})}const Oa=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function Aa({defaultMarkerColor:e,onlyRenderVisibleElements:o,rfId:r,edgeTypes:i,noPanClassName:s,onReconnect:a,onEdgeContextMenu:l,onEdgeMouseEnter:c,onEdgeMouseMove:u,onEdgeMouseLeave:d,onEdgeClick:h,reconnectRadius:f,onEdgeDoubleClick:g,onReconnectStart:p,onReconnectEnd:m,disableKeyboardA11y:y}){const{edgesFocusable:v,edgesReconnectable:x,elementsSelectable:w,onError:b}=Ei(Oa,Li),S=(C=o,Ei(n.useCallback((e=>{if(!C)return e.edges.map((e=>e.id));const t=[];if(e.width&&e.height)for(const n of e.edges){const o=e.nodeLookup.get(n.source),r=e.nodeLookup.get(n.target);o&&r&&ar({sourceNode:o,targetNode:r,width:e.width,height:e.height,transform:e.transform})&&t.push(n.id)}return t}),[C]),Li));var C;return t.jsxs("div",{className:"react-flow__edges",children:[t.jsx(na,{defaultColor:e,rfId:r}),S.map((e=>t.jsx(za,{id:e,edgesFocusable:v,edgesReconnectable:x,elementsSelectable:w,noPanClassName:s,onReconnect:a,onContextMenu:l,onMouseEnter:c,onMouseMove:u,onMouseLeave:d,onClick:h,reconnectRadius:f,onDoubleClick:g,onReconnectStart:p,onReconnectEnd:m,rfId:r,onError:b,edgeTypes:i,disableKeyboardA11y:y},e)))]})}Aa.displayName="EdgeRenderer";const Ra=n.memo(Aa),Ia=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function Da({children:e}){const n=Ei(Ia);return t.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:e})}const $a=e=>e.panZoom?.syncViewport;function La(e){return e.connection.inProgress?{...e.connection,to:Bo(e.connection.to,e.transform)}:{...e.connection}}function Ba(e){const t=function(e){if(e)return t=>{const n=La(t);return e(n)};return La}(e);return Ei(t,Li)}const Ta=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function Va({containerStyle:e,style:n,type:o,component:i}){const{nodesConnectable:s,width:a,height:l,isValid:c,inProgress:u}=Ei(Ta,Li);return!!(a&&s&&u)?t.jsx("svg",{style:e,width:a,height:l,className:"react-flow__connectionline react-flow__container",children:t.jsx("g",{className:r(["react-flow__connection",ho(c)]),children:t.jsx(ja,{style:n,type:o,CustomComponent:i,isValid:c})})}):null}const ja=({style:n,type:o=e.ConnectionLineType.Bezier,CustomComponent:r,isValid:i})=>{const{inProgress:s,from:a,fromNode:l,fromHandle:c,fromPosition:u,to:d,toNode:h,toHandle:f,toPosition:g}=Ba();if(!s)return;if(r)return t.jsx(r,{connectionLineType:o,connectionLineStyle:n,fromNode:l,fromHandle:c,fromX:a.x,fromY:a.y,toX:d.x,toY:d.y,fromPosition:u,toPosition:g,connectionStatus:ho(i),toNode:h,toHandle:f});let p="";const m={sourceX:a.x,sourceY:a.y,sourcePosition:u,targetX:d.x,targetY:d.y,targetPosition:g};switch(o){case e.ConnectionLineType.Bezier:[p]=ir(m);break;case e.ConnectionLineType.SimpleBezier:[p]=aa(m);break;case e.ConnectionLineType.Step:[p]=gr({...m,borderRadius:0});break;case e.ConnectionLineType.SmoothStep:[p]=gr(m);break;default:[p]=ur(m)}return t.jsx("path",{d:p,fill:"none",className:"react-flow__connection-path",style:n})};ja.displayName="ConnectionLine";const Ha={};function Za(e=Ha){n.useRef(e),ki(),n.useEffect((()=>{}),[e])}function Xa({nodeTypes:e,edgeTypes:o,onInit:r,onNodeClick:i,onEdgeClick:s,onNodeDoubleClick:a,onEdgeDoubleClick:l,onNodeMouseEnter:c,onNodeMouseMove:u,onNodeMouseLeave:d,onNodeContextMenu:h,onSelectionContextMenu:f,onSelectionStart:g,onSelectionEnd:p,connectionLineType:m,connectionLineStyle:y,connectionLineComponent:v,connectionLineContainerStyle:x,selectionKeyCode:w,selectionOnDrag:b,selectionMode:S,multiSelectionKeyCode:C,panActivationKeyCode:E,zoomActivationKeyCode:k,deleteKeyCode:M,onlyRenderVisibleElements:N,elementsSelectable:_,defaultViewport:P,translateExtent:z,minZoom:O,maxZoom:A,preventScrolling:R,defaultMarkerColor:I,zoomOnScroll:D,zoomOnPinch:$,panOnScroll:L,panOnScrollSpeed:B,panOnScrollMode:T,zoomOnDoubleClick:V,panOnDrag:j,onPaneClick:H,onPaneMouseEnter:Z,onPaneMouseMove:X,onPaneMouseLeave:Y,onPaneScroll:F,onPaneContextMenu:W,paneClickDistance:K,nodeClickDistance:G,onEdgeContextMenu:q,onEdgeMouseEnter:U,onEdgeMouseMove:Q,onEdgeMouseLeave:J,reconnectRadius:ee,onReconnect:te,onReconnectStart:ne,onReconnectEnd:oe,noDragClassName:re,noWheelClassName:ie,noPanClassName:se,disableKeyboardA11y:ae,nodeExtent:le,rfId:ce,viewport:ue,onViewportChange:de}){return Za(e),Za(o),ki(),n.useRef(!1),n.useEffect((()=>{}),[]),function(e){const t=vs(),o=n.useRef(!1);n.useEffect((()=>{!o.current&&t.viewportInitialized&&e&&(setTimeout((()=>e(t)),1),o.current=!0)}),[e,t.viewportInitialized])}(r),function(e){const t=Ei($a),o=ki();n.useEffect((()=>{e&&(t?.(e),o.setState({transform:[e.x,e.y,e.zoom]}))}),[e,t])}(ue),t.jsx(Fs,{onPaneClick:H,onPaneMouseEnter:Z,onPaneMouseMove:X,onPaneMouseLeave:Y,onPaneContextMenu:W,onPaneScroll:F,paneClickDistance:K,deleteKeyCode:M,selectionKeyCode:w,selectionOnDrag:b,selectionMode:S,onSelectionStart:g,onSelectionEnd:p,multiSelectionKeyCode:C,panActivationKeyCode:E,zoomActivationKeyCode:k,elementsSelectable:_,zoomOnScroll:D,zoomOnPinch:$,zoomOnDoubleClick:V,panOnScroll:L,panOnScrollSpeed:B,panOnScrollMode:T,panOnDrag:j,defaultViewport:P,translateExtent:z,minZoom:O,maxZoom:A,onSelectionContextMenu:f,preventScrolling:R,noDragClassName:re,noWheelClassName:ie,noPanClassName:se,disableKeyboardA11y:ae,onViewportChange:de,isControlledViewport:!!ue,children:t.jsxs(Da,{children:[t.jsx(Ra,{edgeTypes:o,onEdgeClick:s,onEdgeDoubleClick:l,onReconnect:te,onReconnectStart:ne,onReconnectEnd:oe,onlyRenderVisibleElements:N,onEdgeContextMenu:q,onEdgeMouseEnter:U,onEdgeMouseMove:Q,onEdgeMouseLeave:J,reconnectRadius:ee,defaultMarkerColor:I,noPanClassName:se,disableKeyboardA11y:ae,rfId:ce}),t.jsx(Va,{style:y,type:m,component:v,containerStyle:x}),t.jsx("div",{className:"react-flow__edgelabel-renderer"}),t.jsx(Qs,{nodeTypes:e,onNodeClick:i,onNodeDoubleClick:a,onNodeMouseEnter:c,onNodeMouseMove:u,onNodeMouseLeave:d,onNodeContextMenu:h,nodeClickDistance:G,onlyRenderVisibleElements:N,noPanClassName:se,noDragClassName:re,disableKeyboardA11y:ae,nodeExtent:le,rfId:ce}),t.jsx("div",{className:"react-flow__viewport-portal"})]})})}Xa.displayName="GraphView";const Ya=n.memo(Xa),Fa=({nodes:t,edges:n,defaultNodes:o,defaultEdges:r,width:i,height:s,fitView:a,fitViewOptions:l,minZoom:c=.5,maxZoom:u=2,nodeOrigin:d,nodeExtent:h}={})=>{const f=new Map,g=new Map,p=new Map,m=new Map,y=r??n??[],v=o??t??[],x=d??[0,0],w=h??Jn;Pr(p,m,y);const b=Er(v,f,g,{nodeOrigin:x,nodeExtent:w,elevateNodesOnSelect:!1});let S=[0,0,1];if(a&&i&&s){const e=yo(f,{filter:e=>!(!e.width&&!e.initialWidth||!e.height&&!e.initialHeight)}),{x:t,y:n,zoom:o}=jo(e,i,s,c,u,l?.padding??.1);S=[t,n,o]}return{rfId:"1",width:0,height:0,transform:S,nodes:v,nodesInitialized:b,nodeLookup:f,parentLookup:g,edges:y,edgeLookup:m,connectionLookup:p,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:void 0!==o,hasDefaultEdges:void 0!==r,panZoom:null,minZoom:c,maxZoom:u,translateExtent:Jn,nodeExtent:w,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:e.ConnectionMode.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:x,nodeDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!1,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:a??!1,fitViewOptions:l,fitViewResolver:null,connection:{...ro},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanSpeed:15,connectionRadius:20,onError:$o,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1}},Wa=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:i,fitView:s,fitViewOptions:a,minZoom:l,maxZoom:c,nodeOrigin:u,nodeExtent:d})=>{return h=(h,f)=>{async function g(){const{nodeLookup:e,panZoom:t,fitViewOptions:n,fitViewResolver:o,width:r,height:i,minZoom:s,maxZoom:a}=f();t&&(await wo({nodes:e,width:r,height:i,panZoom:t,minZoom:s,maxZoom:a},n),o?.resolve(!0),h({fitViewResolver:null}))}return{...Fa({nodes:e,edges:t,width:r,height:i,fitView:s,fitViewOptions:a,minZoom:l,maxZoom:c,nodeOrigin:u,nodeExtent:d,defaultNodes:n,defaultEdges:o}),setNodes:e=>{const{nodeLookup:t,parentLookup:n,nodeOrigin:o,elevateNodesOnSelect:r,fitViewQueued:i}=f(),s=Er(e,t,n,{nodeOrigin:o,nodeExtent:d,elevateNodesOnSelect:r,checkEquality:!0});i&&s?(g(),h({nodes:e,nodesInitialized:s,fitViewQueued:!1,fitViewOptions:void 0})):h({nodes:e,nodesInitialized:s})},setEdges:e=>{const{connectionLookup:t,edgeLookup:n}=f();Pr(t,n,e),h({edges:e})},setDefaultNodesAndEdges:(e,t)=>{if(e){const{setNodes:t}=f();t(e),h({hasDefaultNodes:!0})}if(t){const{setEdges:e}=f();e(t),h({hasDefaultEdges:!0})}},updateNodeInternals:e=>{const{triggerNodeChanges:t,nodeLookup:n,parentLookup:o,domNode:r,nodeOrigin:i,nodeExtent:s,debug:a,fitViewQueued:l}=f(),{changes:c,updatedInternals:u}=function(e,t,n,o,r,i){const s=o?.querySelector(".xyflow__viewport");let a=!1;if(!s)return{changes:[],updatedInternals:a};const l=[],c=window.getComputedStyle(s),{m22:u}=new window.DOMMatrixReadOnly(c.transform),d=[];for(const o of e.values()){const e=t.get(o.id);if(!e)continue;if(e.hidden){t.set(e.id,{...e,internals:{...e.internals,handleBounds:void 0}}),a=!0;continue}const s=Go(o.nodeElement),c=e.measured.width!==s.width||e.measured.height!==s.height;if(s.width&&s.height&&(c||!e.internals.handleBounds||o.force)){const h=o.nodeElement.getBoundingClientRect(),f=Zo(e.extent)?e.extent:i;let{positionAbsolute:g}=e.internals;e.parentId&&"parent"===e.extent?g=Eo(g,s,t.get(e.parentId)):f&&(g=Co(g,f,s));const p={...e,measured:s,internals:{...e.internals,positionAbsolute:g,handleBounds:{source:tr("source",o.nodeElement,h,u,e.id),target:tr("target",o.nodeElement,h,u,e.id)}}};t.set(e.id,p),e.parentId&&kr(p,t,n,{nodeOrigin:r}),a=!0,c&&(l.push({id:e.id,type:"dimensions",dimensions:s}),e.expandParent&&e.parentId&&d.push({id:e.id,parentId:e.parentId,rect:zo(p,r)}))}}if(d.length>0){const e=Nr(d,t,n,r);l.push(...e)}return{changes:l,updatedInternals:a}}(e,n,o,r,i,s);u&&(function(e,t,n){const o=Cr(br,n);for(const n of e.values())if(n.parentId)kr(n,e,t,o);else{const e=po(n,o.nodeOrigin),t=Zo(n.extent)?n.extent:o.nodeExtent,r=Co(e,t,Xo(n));n.internals.positionAbsolute=r}}(n,o,{nodeOrigin:i,nodeExtent:s}),l?(g(),h({fitViewQueued:!1,fitViewOptions:void 0})):h({}),c?.length>0&&(a&&console.log("React Flow: trigger node changes",c),t?.(c)))},updateNodePositions:(e,t=!1)=>{const n=[],o=[],{nodeLookup:r,triggerNodeChanges:i}=f();for(const[i,s]of e){const e=r.get(i),a=!!(e?.expandParent&&e?.parentId&&s?.position),l={id:i,type:"position",position:a?{x:Math.max(0,s.position.x),y:Math.max(0,s.position.y)}:s.position,dragging:t};a&&e.parentId&&n.push({id:i,parentId:e.parentId,rect:{...s.internals.positionAbsolute,width:s.measured.width??0,height:s.measured.height??0}}),o.push(l)}if(n.length>0){const{parentLookup:e,nodeOrigin:t}=f(),i=Nr(n,r,e,t);o.push(...i)}i(o)},triggerNodeChanges:e=>{const{onNodesChange:t,setNodes:n,nodes:o,hasDefaultNodes:r,debug:i}=f();e?.length&&(r&&n(rs(e,o)),i&&console.log("React Flow: trigger node changes",e),t?.(e))},triggerEdgeChanges:e=>{const{onEdgesChange:t,setEdges:n,edges:o,hasDefaultEdges:r,debug:i}=f();e?.length&&(r&&n(is(e,o)),i&&console.log("React Flow: trigger edge changes",e),t?.(e))},addSelectedNodes:e=>{const{multiSelectionActive:t,edgeLookup:n,nodeLookup:o,triggerNodeChanges:r,triggerEdgeChanges:i}=f();t?r(e.map((e=>ss(e,!0)))):(r(as(o,new Set([...e]),!0)),i(as(n)))},addSelectedEdges:e=>{const{multiSelectionActive:t,edgeLookup:n,nodeLookup:o,triggerNodeChanges:r,triggerEdgeChanges:i}=f();t?i(e.map((e=>ss(e,!0)))):(i(as(n,new Set([...e]))),r(as(o,new Set,!0)))},unselectNodesAndEdges:({nodes:e,edges:t}={})=>{const{edges:n,nodes:o,nodeLookup:r,triggerNodeChanges:i,triggerEdgeChanges:s}=f(),a=t||n,l=(e||o).map((e=>{const t=r.get(e.id);return t&&(t.selected=!1),ss(e.id,!1)})),c=a.map((e=>ss(e.id,!1)));i(l),s(c)},setMinZoom:e=>{const{panZoom:t,maxZoom:n}=f();t?.setScaleExtent([e,n]),h({minZoom:e})},setMaxZoom:e=>{const{panZoom:t,minZoom:n}=f();t?.setScaleExtent([n,e]),h({maxZoom:e})},setTranslateExtent:e=>{f().panZoom?.setTranslateExtent(e),h({translateExtent:e})},setPaneClickDistance:e=>{f().panZoom?.setClickDistance(e)},resetSelectedElements:()=>{const{edges:e,nodes:t,triggerNodeChanges:n,triggerEdgeChanges:o,elementsSelectable:r}=f();if(!r)return;const i=t.reduce(((e,t)=>t.selected?[...e,ss(t.id,!1)]:e),[]),s=e.reduce(((e,t)=>t.selected?[...e,ss(t.id,!1)]:e),[]);n(i),o(s)},setNodeExtent:e=>{const{nodes:t,nodeLookup:n,parentLookup:o,nodeOrigin:r,elevateNodesOnSelect:i,nodeExtent:s}=f();e[0][0]===s[0][0]&&e[0][1]===s[0][1]&&e[1][0]===s[1][0]&&e[1][1]===s[1][1]||(Er(t,n,o,{nodeOrigin:r,nodeExtent:e,elevateNodesOnSelect:i,checkEquality:!1}),h({nodeExtent:e}))},panBy:e=>{const{transform:t,width:n,height:o,panZoom:r,translateExtent:i}=f();return async function({delta:e,panZoom:t,transform:n,translateExtent:o,width:r,height:i}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const s=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[r,i]],o),a=!!s&&(s.x!==n[0]||s.y!==n[1]||s.k!==n[2]);return Promise.resolve(a)}({delta:e,panZoom:r,transform:t,translateExtent:i,width:n,height:o})},cancelConnection:()=>{h({connection:{...ro}})},updateConnection:e=>{h({connection:e})},reset:()=>h({...Fa()})}},f=Object.is,h?wi(h,f):wi;var h,f};function Ka({initialNodes:e,initialEdges:o,defaultNodes:r,defaultEdges:i,initialWidth:s,initialHeight:a,initialMinZoom:l,initialMaxZoom:c,initialFitViewOptions:u,fitView:d,nodeOrigin:h,nodeExtent:f,children:g}){const[p]=n.useState((()=>Wa({nodes:e,edges:o,defaultNodes:r,defaultEdges:i,width:s,height:a,fitView:d,minZoom:l,maxZoom:c,fitViewOptions:u,nodeOrigin:h,nodeExtent:f})));return t.jsx(Si,{value:p,children:t.jsx(ms,{children:g})})}function Ga({children:e,nodes:o,edges:r,defaultNodes:i,defaultEdges:s,width:a,height:l,fitView:c,fitViewOptions:u,minZoom:d,maxZoom:h,nodeOrigin:f,nodeExtent:g}){return n.useContext(bi)?t.jsx(t.Fragment,{children:e}):t.jsx(Ka,{initialNodes:o,initialEdges:r,defaultNodes:i,defaultEdges:s,initialWidth:a,initialHeight:l,fitView:c,initialFitViewOptions:u,initialMinZoom:d,initialMaxZoom:h,nodeOrigin:f,nodeExtent:g,children:e})}const qa={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};var Ua=hs((function({nodes:o,edges:i,defaultNodes:s,defaultEdges:a,className:l,nodeTypes:c,edgeTypes:u,onNodeClick:d,onEdgeClick:h,onInit:f,onMove:g,onMoveStart:p,onMoveEnd:m,onConnect:y,onConnectStart:v,onConnectEnd:x,onClickConnectStart:w,onClickConnectEnd:b,onNodeMouseEnter:S,onNodeMouseMove:C,onNodeMouseLeave:E,onNodeContextMenu:k,onNodeDoubleClick:M,onNodeDragStart:N,onNodeDrag:_,onNodeDragStop:P,onNodesDelete:z,onEdgesDelete:O,onDelete:A,onSelectionChange:R,onSelectionDragStart:I,onSelectionDrag:D,onSelectionDragStop:$,onSelectionContextMenu:L,onSelectionStart:B,onSelectionEnd:T,onBeforeDelete:V,connectionMode:j,connectionLineType:H=e.ConnectionLineType.Bezier,connectionLineStyle:Z,connectionLineComponent:X,connectionLineContainerStyle:Y,deleteKeyCode:F="Backspace",selectionKeyCode:W="Shift",selectionOnDrag:K=!1,selectionMode:G=e.SelectionMode.Full,panActivationKeyCode:q="Space",multiSelectionKeyCode:U=(Ho()?"Meta":"Control"),zoomActivationKeyCode:Q=(Ho()?"Meta":"Control"),snapToGrid:J,snapGrid:ee,onlyRenderVisibleElements:te=!1,selectNodesOnDrag:ne,nodesDraggable:oe,nodesConnectable:re,nodesFocusable:ie,nodeOrigin:se=Xi,edgesFocusable:ae,edgesReconnectable:le,elementsSelectable:ce=!0,defaultViewport:ue=Yi,minZoom:de=.5,maxZoom:he=2,translateExtent:fe=Jn,preventScrolling:ge=!0,nodeExtent:pe,defaultMarkerColor:me="#b1b1b7",zoomOnScroll:ye=!0,zoomOnPinch:ve=!0,panOnScroll:xe=!1,panOnScrollSpeed:we=.5,panOnScrollMode:be=e.PanOnScrollMode.Free,zoomOnDoubleClick:Se=!0,panOnDrag:Ce=!0,onPaneClick:Ee,onPaneMouseEnter:ke,onPaneMouseMove:Me,onPaneMouseLeave:Ne,onPaneScroll:_e,onPaneContextMenu:Pe,paneClickDistance:ze=0,nodeClickDistance:Oe=0,children:Ae,onReconnect:Re,onReconnectStart:Ie,onReconnectEnd:De,onEdgeContextMenu:$e,onEdgeDoubleClick:Le,onEdgeMouseEnter:Be,onEdgeMouseMove:Te,onEdgeMouseLeave:Ve,reconnectRadius:je=10,onNodesChange:He,onEdgesChange:Ze,noDragClassName:Xe="nodrag",noWheelClassName:Ye="nowheel",noPanClassName:Fe="nopan",fitView:We,fitViewOptions:Ke,connectOnClick:Ge,attributionPosition:qe,proOptions:Ue,defaultEdgeOptions:Qe,elevateNodesOnSelect:Je,elevateEdgesOnSelect:et,disableKeyboardA11y:tt=!1,autoPanOnConnect:nt,autoPanOnNodeDrag:ot,autoPanSpeed:rt,connectionRadius:it,isValidConnection:st,onError:at,style:lt,id:ct,nodeDragThreshold:ut,viewport:dt,onViewportChange:ht,width:ft,height:gt,colorMode:pt="light",debug:mt,onScroll:yt,...vt},xt){const wt=ct||"1",bt=function(e){const[t,o]=n.useState("system"===e?null:e);return n.useEffect((()=>{if("system"!==e)return void o(e);const t=qi(),n=()=>o(t?.matches?"dark":"light");return n(),t?.addEventListener("change",n),()=>{t?.removeEventListener("change",n)}}),[e]),null!==t?t:qi()?.matches?"dark":"light"}(pt),St=n.useCallback((e=>{e.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),yt?.(e)}),[yt]);return t.jsx("div",{"data-testid":"rf__wrapper",...vt,onScroll:St,style:{...lt,...qa},ref:xt,className:r(["react-flow",l,bt]),id:ct,children:t.jsxs(Ga,{nodes:o,edges:i,width:ft,height:gt,fitView:We,fitViewOptions:Ke,minZoom:de,maxZoom:he,nodeOrigin:se,nodeExtent:pe,children:[t.jsx(Ya,{onInit:f,onNodeClick:d,onEdgeClick:h,onNodeMouseEnter:S,onNodeMouseMove:C,onNodeMouseLeave:E,onNodeContextMenu:k,onNodeDoubleClick:M,nodeTypes:c,edgeTypes:u,connectionLineType:H,connectionLineStyle:Z,connectionLineComponent:X,connectionLineContainerStyle:Y,selectionKeyCode:W,selectionOnDrag:K,selectionMode:G,deleteKeyCode:F,multiSelectionKeyCode:U,panActivationKeyCode:q,zoomActivationKeyCode:Q,onlyRenderVisibleElements:te,defaultViewport:ue,translateExtent:fe,minZoom:de,maxZoom:he,preventScrolling:ge,zoomOnScroll:ye,zoomOnPinch:ve,zoomOnDoubleClick:Se,panOnScroll:xe,panOnScrollSpeed:we,panOnScrollMode:be,panOnDrag:Ce,onPaneClick:Ee,onPaneMouseEnter:ke,onPaneMouseMove:Me,onPaneMouseLeave:Ne,onPaneScroll:_e,onPaneContextMenu:Pe,paneClickDistance:ze,nodeClickDistance:Oe,onSelectionContextMenu:L,onSelectionStart:B,onSelectionEnd:T,onReconnect:Re,onReconnectStart:Ie,onReconnectEnd:De,onEdgeContextMenu:$e,onEdgeDoubleClick:Le,onEdgeMouseEnter:Be,onEdgeMouseMove:Te,onEdgeMouseLeave:Ve,reconnectRadius:je,defaultMarkerColor:me,noDragClassName:Xe,noWheelClassName:Ye,noPanClassName:Fe,rfId:wt,disableKeyboardA11y:tt,nodeExtent:pe,viewport:dt,onViewportChange:ht}),t.jsx(Gi,{nodes:o,edges:i,defaultNodes:s,defaultEdges:a,onConnect:y,onConnectStart:v,onConnectEnd:x,onClickConnectStart:w,onClickConnectEnd:b,nodesDraggable:oe,nodesConnectable:re,nodesFocusable:ie,edgesFocusable:ae,edgesReconnectable:le,elementsSelectable:ce,elevateNodesOnSelect:Je,elevateEdgesOnSelect:et,minZoom:de,maxZoom:he,nodeExtent:pe,onNodesChange:He,onEdgesChange:Ze,snapToGrid:J,snapGrid:ee,connectionMode:j,translateExtent:fe,connectOnClick:Ge,defaultEdgeOptions:Qe,fitView:We,fitViewOptions:Ke,onNodesDelete:z,onEdgesDelete:O,onDelete:A,onNodeDragStart:N,onNodeDrag:_,onNodeDragStop:P,onSelectionDrag:D,onSelectionDragStart:I,onSelectionDragStop:$,onMove:g,onMoveStart:p,onMoveEnd:m,noPanClassName:Fe,nodeOrigin:se,rfId:wt,autoPanOnConnect:nt,autoPanOnNodeDrag:ot,autoPanSpeed:rt,onError:at,connectionRadius:it,isValidConnection:st,selectNodesOnDrag:ne,nodeDragThreshold:ut,onBeforeDelete:V,paneClickDistance:ze,debug:mt}),t.jsx(Zi,{onSelectionChange:R}),Ae,t.jsx($i,{proOptions:Ue,position:qe}),t.jsx(Ri,{rfId:wt,disableKeyboardA11y:tt})]})})}));const Qa=e=>e.domNode?.querySelector(".react-flow__edgelabel-renderer");const Ja=e=>e.domNode?.querySelector(".react-flow__viewport-portal");const el=e=>e.nodes;const tl=e=>e.edges;const nl=e=>({x:e.transform[0],y:e.transform[1],zoom:e.transform[2]});const ol=Qn.error014();function rl({dimensions:e,lineWidth:n,variant:o,className:i}){return t.jsx("path",{strokeWidth:n,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:r(["react-flow__background-pattern",o,i])})}function il({radius:e,className:n}){return t.jsx("circle",{cx:e,cy:e,r:e,className:r(["react-flow__background-pattern","dots",n])})}var sl;e.BackgroundVariant=void 0,(sl=e.BackgroundVariant||(e.BackgroundVariant={})).Lines="lines",sl.Dots="dots",sl.Cross="cross";const al={[e.BackgroundVariant.Dots]:1,[e.BackgroundVariant.Lines]:1,[e.BackgroundVariant.Cross]:6},ll=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function cl({id:o,variant:i=e.BackgroundVariant.Dots,gap:s=20,size:a,lineWidth:l=1,offset:c=0,color:u,bgColor:d,style:h,className:f,patternClassName:g}){const p=n.useRef(null),{transform:m,patternId:y}=Ei(ll,Li),v=a||al[i],x=i===e.BackgroundVariant.Dots,w=i===e.BackgroundVariant.Cross,b=Array.isArray(s)?s:[s,s],S=[b[0]*m[2]||1,b[1]*m[2]||1],C=v*m[2],E=Array.isArray(c)?c:[c,c],k=w?[C,C]:S,M=[E[0]*m[2]||1+k[0]/2,E[1]*m[2]||1+k[1]/2],N=`${y}${o||""}`;return t.jsxs("svg",{className:r(["react-flow__background",f]),style:{...h,...Ss,"--xy-background-color-props":d,"--xy-background-pattern-color-props":u},ref:p,"data-testid":"rf__background",children:[t.jsx("pattern",{id:N,x:m[0]%S[0],y:m[1]%S[1],width:S[0],height:S[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${M[0]},-${M[1]})`,children:x?t.jsx(il,{radius:C/2,className:g}):t.jsx(rl,{dimensions:k,lineWidth:l,variant:i,className:g})}),t.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${N})`})]})}cl.displayName="Background";const ul=n.memo(cl);function dl(){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:t.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function hl(){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:t.jsx("path",{d:"M0 0h32v4.2H0z"})})}function fl(){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:t.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function gl(){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:t.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function pl(){return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:t.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function ml({children:e,className:n,...o}){return t.jsx("button",{type:"button",className:r(["react-flow__controls-button",n]),...o,children:e})}const yl=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom});function vl({style:e,showZoom:n=!0,showFitView:o=!0,showInteractive:i=!0,fitViewOptions:s,onZoomIn:a,onZoomOut:l,onFitView:c,onInteractiveChange:u,className:d,children:h,position:f="bottom-left",orientation:g="vertical","aria-label":p="React Flow controls"}){const m=ki(),{isInteractive:y,minZoomReached:v,maxZoomReached:x}=Ei(yl,Li),{zoomIn:w,zoomOut:b,fitView:S}=vs(),C="horizontal"===g?"horizontal":"vertical";return t.jsxs(Di,{className:r(["react-flow__controls",C,d]),position:f,style:e,"data-testid":"rf__controls","aria-label":p,children:[n&&t.jsxs(t.Fragment,{children:[t.jsx(ml,{onClick:()=>{w(),a?.()},className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:x,children:t.jsx(dl,{})}),t.jsx(ml,{onClick:()=>{b(),l?.()},className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:v,children:t.jsx(hl,{})})]}),o&&t.jsx(ml,{className:"react-flow__controls-fitview",onClick:()=>{S(s),c?.()},title:"fit view","aria-label":"fit view",children:t.jsx(fl,{})}),i&&t.jsx(ml,{className:"react-flow__controls-interactive",onClick:()=>{m.setState({nodesDraggable:!y,nodesConnectable:!y,elementsSelectable:!y}),u?.(!y)},title:"toggle interactivity","aria-label":"toggle interactivity",children:y?t.jsx(pl,{}):t.jsx(gl,{})}),h]})}vl.displayName="Controls";const xl=n.memo(vl);const wl=n.memo((function({id:e,x:n,y:o,width:i,height:s,style:a,color:l,strokeColor:c,strokeWidth:u,className:d,borderRadius:h,shapeRendering:f,selected:g,onClick:p}){const{background:m,backgroundColor:y}=a||{},v=l||m||y;return t.jsx("rect",{className:r(["react-flow__minimap-node",{selected:g},d]),x:n,y:o,rx:h,ry:h,width:i,height:s,style:{fill:v,stroke:c,strokeWidth:u},shapeRendering:f,onClick:p?t=>p(t,e):void 0})})),bl=e=>e.nodes.map((e=>e.id)),Sl=e=>e instanceof Function?e:()=>e;const Cl=n.memo((function({id:e,nodeColorFunc:n,nodeStrokeColorFunc:o,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:s,shapeRendering:a,NodeComponent:l,onClick:c}){const{node:u,x:d,y:h,width:f,height:g}=Ei((t=>{const{internals:n}=t.nodeLookup.get(e),o=n.userNode,{x:r,y:i}=n.positionAbsolute,{width:s,height:a}=Xo(o);return{node:o,x:r,y:i,width:s,height:a}}),Li);return u&&!u.hidden&&Yo(u)?t.jsx(l,{x:d,y:h,width:f,height:g,style:u.style,selected:!!u.selected,className:r(u),color:n(u),borderRadius:i,strokeColor:o(u),strokeWidth:s,shapeRendering:a,onClick:c,id:u.id}):null}));var El=n.memo((function({nodeStrokeColor:e,nodeColor:n,nodeClassName:o="",nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:s=wl,onClick:a}){const l=Ei(bl,Li),c=Sl(n),u=Sl(e),d=Sl(o),h="undefined"==typeof window||window.chrome?"crispEdges":"geometricPrecision";return t.jsx(t.Fragment,{children:l.map((e=>t.jsx(Cl,{id:e,nodeColorFunc:c,nodeStrokeColorFunc:u,nodeClassNameFunc:d,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:s,onClick:a,shapeRendering:h},e)))})}));const kl=e=>!e.hidden,Ml=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?Ao(yo(e.nodeLookup,{filter:kl}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height}};function Nl({style:e,className:o,nodeStrokeColor:i,nodeColor:s,nodeClassName:a="",nodeBorderRadius:l=5,nodeStrokeWidth:c,nodeComponent:u,bgColor:d,maskColor:h,maskStrokeColor:f,maskStrokeWidth:g,position:p="bottom-right",onClick:m,onNodeClick:y,pannable:v=!1,zoomable:x=!1,ariaLabel:w="React Flow mini map",inversePan:b,zoomStep:S=10,offsetScale:C=5}){const E=ki(),k=n.useRef(null),{boundingRect:M,viewBB:N,rfId:_,panZoom:P,translateExtent:z,flowWidth:O,flowHeight:A}=Ei(Ml,Li),R=e?.width??200,I=e?.height??150,D=M.width/R,$=M.height/I,L=Math.max(D,$),B=L*R,T=L*I,V=C*L,j=M.x-(B-M.width)/2-V,H=M.y-(T-M.height)/2-V,Z=B+2*V,X=T+2*V,Y=`react-flow__minimap-desc-${_}`,F=n.useRef(0),W=n.useRef();F.current=L,n.useEffect((()=>{if(k.current&&P)return W.current=function({domNode:e,panZoom:t,getTransform:n,getViewScale:o}){const r=Se(e);return{update:function({translateExtent:e,width:i,height:s,zoomStep:a=10,pannable:l=!0,zoomable:c=!0,inversePan:u=!1}){let d=[0,0];const h=Un().on("start",(e=>{"mousedown"!==e.sourceEvent.type&&"touchstart"!==e.sourceEvent.type||(d=[e.sourceEvent.clientX??e.sourceEvent.touches[0].clientX,e.sourceEvent.clientY??e.sourceEvent.touches[0].clientY])})).on("zoom",l?r=>{const a=n();if("mousemove"!==r.sourceEvent.type&&"touchmove"!==r.sourceEvent.type||!t)return;const l=[r.sourceEvent.clientX??r.sourceEvent.touches[0].clientX,r.sourceEvent.clientY??r.sourceEvent.touches[0].clientY],c=[l[0]-d[0],l[1]-d[1]];d=l;const h=o()*Math.max(a[2],Math.log(a[2]))*(u?-1:1),f={x:a[0]-c[0]*h,y:a[1]-c[1]*h},g=[[0,0],[i,s]];t.setViewportConstrained({x:f.x,y:f.y,zoom:a[2]},g,e)}:null).on("zoom.wheel",c?e=>{const o=n();if("wheel"!==e.sourceEvent.type||!t)return;const r=-e.sourceEvent.deltaY*(1===e.sourceEvent.deltaMode?.05:e.sourceEvent.deltaMode?1:.002)*a,i=o[2]*Math.pow(2,r);t.scaleTo(i)}:null);r.call(h,{})},destroy:function(){r.on("zoom",null)},pointer:Ce}}({domNode:k.current,panZoom:P,getTransform:()=>E.getState().transform,getViewScale:()=>F.current}),()=>{W.current?.destroy()}}),[P]),n.useEffect((()=>{W.current?.update({translateExtent:z,width:O,height:A,inversePan:b,pannable:v,zoomStep:S,zoomable:x})}),[v,x,b,S,z,O,A]);const K=m?e=>{const[t,n]=W.current?.pointer(e)||[0,0];m(e,{x:t,y:n})}:void 0,G=y?n.useCallback(((e,t)=>{const n=E.getState().nodeLookup.get(t).internals.userNode;y(e,n)}),[]):void 0;return t.jsx(Di,{position:p,style:{...e,"--xy-minimap-background-color-props":"string"==typeof d?d:void 0,"--xy-minimap-mask-background-color-props":"string"==typeof h?h:void 0,"--xy-minimap-mask-stroke-color-props":"string"==typeof f?f:void 0,"--xy-minimap-mask-stroke-width-props":"number"==typeof g?g*L:void 0,"--xy-minimap-node-background-color-props":"string"==typeof s?s:void 0,"--xy-minimap-node-stroke-color-props":"string"==typeof i?i:void 0,"--xy-minimap-node-stroke-width-props":"number"==typeof c?c:void 0},className:r(["react-flow__minimap",o]),"data-testid":"rf__minimap",children:t.jsxs("svg",{width:R,height:I,viewBox:`${j} ${H} ${Z} ${X}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":Y,ref:k,onClick:K,children:[w&&t.jsx("title",{id:Y,children:w}),t.jsx(El,{onClick:G,nodeColor:s,nodeStrokeColor:i,nodeBorderRadius:l,nodeClassName:a,nodeStrokeWidth:c,nodeComponent:u}),t.jsx("path",{className:"react-flow__minimap-mask",d:`M${j-V},${H-V}h${Z+2*V}v${X+2*V}h${-Z-2*V}z\n M${N.x},${N.y}h${N.width}v${N.height}h${-N.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Nl.displayName="MiniMap";const _l=n.memo(Nl);const Pl=n.memo((function({nodeId:o,position:i,variant:s=e.ResizeControlVariant.Handle,className:a,style:l={},children:c,color:u,minWidth:d=10,minHeight:h=10,maxWidth:f=Number.MAX_VALUE,maxHeight:g=Number.MAX_VALUE,keepAspectRatio:p=!1,resizeDirection:m,shouldResize:y,onResizeStart:v,onResize:x,onResizeEnd:w}){const b=$s(),S="string"==typeof o?o:b,C=ki(),E=n.useRef(null),k=s===e.ResizeControlVariant.Line?"right":"bottom-right",M=i??k,N=n.useRef(null);n.useEffect((()=>{if(E.current&&S)return N.current||(N.current=si({domNode:E.current,nodeId:S,getStoreItems:()=>{const{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:o,nodeOrigin:r,domNode:i}=C.getState();return{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:o,nodeOrigin:r,paneDomNode:i}},onChange:(e,t)=>{const{triggerNodeChanges:n,nodeLookup:o,parentLookup:r,nodeOrigin:i}=C.getState(),s=[],a={x:e.x,y:e.y},l=o.get(S);if(l&&l.expandParent&&l.parentId){const t=l.origin??i,n=e.width??l.measured.width??0,c=e.height??l.measured.height??0,u=Nr([{id:l.id,parentId:l.parentId,rect:{width:n,height:c,...Fo({x:e.x??l.position.x,y:e.y??l.position.y},{width:n,height:c},l.parentId,o,t)}}],o,r,i);s.push(...u),a.x=e.x?Math.max(t[0]*n,e.x):void 0,a.y=e.y?Math.max(t[1]*c,e.y):void 0}if(void 0!==a.x&&void 0!==a.y){const e={id:S,type:"position",position:{...a}};s.push(e)}if(void 0!==e.width&&void 0!==e.height){const t={id:S,type:"dimensions",resizing:!0,setAttributes:!m||("horizontal"===m?"width":"height"),dimensions:{width:e.width,height:e.height}};s.push(t)}for(const e of t){const t={...e,type:"position"};s.push(t)}n(s)},onEnd:({width:e,height:t})=>{const n={id:S,type:"dimensions",resizing:!1,dimensions:{width:e,height:t}};C.getState().triggerNodeChanges([n])}})),N.current.update({controlPosition:M,boundaries:{minWidth:d,minHeight:h,maxWidth:f,maxHeight:g},keepAspectRatio:p,resizeDirection:m,onResizeStart:v,onResize:x,onResizeEnd:w,shouldResize:y}),()=>{N.current?.destroy()}}),[M,d,h,f,g,p,v,x,w,y]);const _=M.split("-"),P=s===e.ResizeControlVariant.Line?"borderColor":"backgroundColor",z=u?{...l,[P]:u}:l;return t.jsx("div",{className:r(["react-flow__resize-control","nodrag",..._,s,a]),ref:E,style:z,children:c})}));const zl=e=>e.domNode?.querySelector(".react-flow__renderer");function Ol({children:e}){const t=Ei(zl);return t?o.createPortal(e,t):null}const Al=(e,t)=>e?.internals.positionAbsolute.x!==t?.internals.positionAbsolute.x||e?.internals.positionAbsolute.y!==t?.internals.positionAbsolute.y||e?.measured.width!==t?.measured.width||e?.measured.height!==t?.measured.height||e?.selected!==t?.selected||e?.internals.z!==t?.internals.z,Rl=(e,t)=>{if(e.size!==t.size)return!1;for(const[n,o]of e)if(Al(o,t.get(n)))return!1;return!0},Il=e=>({x:e.transform[0],y:e.transform[1],zoom:e.transform[2],selectedNodesCount:e.nodes.filter((e=>e.selected)).length});e.Background=ul,e.BaseEdge=ia,e.BezierEdge=ba,e.ControlButton=ml,e.Controls=xl,e.EdgeLabelRenderer=function({children:e}){const t=Ei(Qa);return t?o.createPortal(e,t):null},e.EdgeText=ra,e.Handle=Bs,e.MiniMap=_l,e.NodeResizeControl=Pl,e.NodeResizer=function({nodeId:n,isVisible:o=!0,handleClassName:r,handleStyle:i,lineClassName:s,lineStyle:a,color:l,minWidth:c=10,minHeight:u=10,maxWidth:d=Number.MAX_VALUE,maxHeight:h=Number.MAX_VALUE,keepAspectRatio:f=!1,shouldResize:g,onResizeStart:p,onResize:m,onResizeEnd:y}){return o?t.jsxs(t.Fragment,{children:[Qr.map((o=>t.jsx(Pl,{className:s,style:a,nodeId:n,position:o,variant:e.ResizeControlVariant.Line,color:l,minWidth:c,minHeight:u,maxWidth:d,maxHeight:h,onResizeStart:p,keepAspectRatio:f,shouldResize:g,onResize:m,onResizeEnd:y},o))),Ur.map((e=>t.jsx(Pl,{className:r,style:i,nodeId:n,position:e,color:l,minWidth:c,minHeight:u,maxWidth:d,maxHeight:h,onResizeStart:p,keepAspectRatio:f,shouldResize:g,onResize:m,onResizeEnd:y},e)))]}):null},e.NodeToolbar=function({nodeId:o,children:i,className:s,style:a,isVisible:l,position:c=e.Position.Top,offset:u=10,align:d="center",...h}){const f=$s(),g=n.useCallback((e=>{const t=(Array.isArray(o)?o:[o||f||""]).reduce(((t,n)=>{const o=e.nodeLookup.get(n);return o&&t.set(o.id,o),t}),new Map);return t}),[o,f]),p=Ei(g,Rl),{x:m,y:y,zoom:v,selectedNodesCount:x}=Ei(Il,Li);if(!("boolean"==typeof l?l:1===p.size&&p.values().next().value?.selected&&1===x)||!p.size)return null;const w=yo(p),b=Array.from(p.values()),S=Math.max(...b.map((e=>e.internals.z+1))),C={position:"absolute",transform:wr(w,{x:m,y:y,zoom:v},c,u,d),zIndex:S,...a};return t.jsx(Ol,{children:t.jsx("div",{style:C,className:r(["react-flow__node-toolbar",s]),...h,"data-id":b.reduce(((e,t)=>`${e}${t.id} `),"").trim(),children:i})})},e.Panel=Di,e.ReactFlow=Ua,e.ReactFlowProvider=Ka,e.SimpleBezierEdge=ca,e.SmoothStepEdge=ha,e.StepEdge=pa,e.StraightEdge=va,e.ViewportPortal=function({children:e}){const t=Ei(Ja);return t?o.createPortal(e,t):null},e.addEdge=cr,e.applyEdgeChanges=is,e.applyNodeChanges=rs,e.getBezierEdgeCenter=nr,e.getBezierPath=ir,e.getConnectedEdges=xo,e.getEdgeCenter=sr,e.getIncomers=(e,t,n)=>{if(!e.id)return[];const o=new Set;return n.forEach((t=>{t.target===e.id&&o.add(t.source)})),t.filter((e=>o.has(e.id)))},e.getNodesBounds=mo,e.getOutgoers=(e,t,n)=>{if(!e.id)return[];const o=new Set;return n.forEach((t=>{t.source===e.id&&o.add(t.target)})),t.filter((e=>o.has(e.id)))},e.getSimpleBezierPath=aa,e.getSmoothStepPath=gr,e.getStraightPath=ur,e.getViewportForBounds=jo,e.isEdge=ds,e.isNode=us,e.reconnectEdge=(e,t,n,o={shouldReplaceId:!0})=>{const{id:r,...i}=e;if(!t.source||!t.target)return n;if(!n.find((t=>t.id===e.id)))return n;const s={...i,id:o.shouldReplaceId?lr(t):r,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle};return n.filter((e=>e.id!==r)).concat(s)},e.useConnection=Ba,e.useEdges=function(){return Ei(tl,Li)},e.useEdgesState=function(e){const[t,o]=n.useState(e),r=n.useCallback((e=>o((t=>is(e,t)))),[]);return[t,o,r]},e.useHandleConnections=function({type:e,id:t,nodeId:o,onConnect:r,onDisconnect:i}){console.warn("[DEPRECATED] `useHandleConnections` is deprecated. Instead use `useNodeConnections` https://reactflow.dev/api-reference/hooks/useNodeConnections");const s=$s(),a=o??s,l=n.useRef(null),c=Ei((n=>n.connectionLookup.get(`${a}-${e}${t?`-${t}`:""}`)),co);return n.useEffect((()=>{if(l.current&&l.current!==c){const e=c??new Map;uo(l.current,e,i),uo(e,l.current,r)}l.current=c??new Map}),[c,r,i]),n.useMemo((()=>Array.from(c?.values()??[])),[c])},e.useInternalNode=function(e){return Ei(n.useCallback((t=>t.nodeLookup.get(e)),[e]),Li)},e.useKeyPress=Qi,e.useNodeConnections=function({id:e,handleType:t,handleId:o,onConnect:r,onDisconnect:i}={}){const s=$s(),a=e??s;if(!a)throw new Error(ol);const l=n.useRef(null),c=Ei((e=>e.connectionLookup.get(`${a}${t?o?`-${t}-${o}`:`-${t}`:""}`)),co);return n.useEffect((()=>{if(l.current&&l.current!==c){const e=c??new Map;uo(l.current,e,i),uo(e,l.current,r)}l.current=c??new Map}),[c,r,i]),n.useMemo((()=>Array.from(c?.values()??[])),[c])},e.useNodeId=$s,e.useNodes=function(){return Ei(el,Li)},e.useNodesData=function(e){return Ei(n.useCallback((t=>{const n=[],o=Array.isArray(e),r=o?e:[e];for(const e of r){const o=t.nodeLookup.get(e);o&&n.push({id:o.id,type:o.type,data:o.data})}return o?n:n[0]??null}),[e]),zr)},e.useNodesInitialized=function(e={includeHiddenNodes:!1}){return Ei((e=>t=>{if(!e.includeHiddenNodes)return t.nodesInitialized;if(0===t.nodeLookup.size)return!1;for(const[,{internals:e}]of t.nodeLookup)if(void 0===e.handleBounds||!Yo(e.userNode))return!1;return!0})(e))},e.useNodesState=function(e){const[t,o]=n.useState(e),r=n.useCallback((e=>o((t=>rs(e,t)))),[]);return[t,o,r]},e.useOnSelectionChange=function({onChange:e}){const t=ki();n.useEffect((()=>{const n=[...t.getState().onSelectionChangeHandlers,e];return t.setState({onSelectionChangeHandlers:n}),()=>{const n=t.getState().onSelectionChangeHandlers.filter((t=>t!==e));t.setState({onSelectionChangeHandlers:n})}}),[e])},e.useOnViewportChange=function({onStart:e,onChange:t,onEnd:o}){const r=ki();n.useEffect((()=>{r.setState({onViewportChangeStart:e})}),[e]),n.useEffect((()=>{r.setState({onViewportChange:t})}),[t]),n.useEffect((()=>{r.setState({onViewportChangeEnd:o})}),[o])},e.useReactFlow=vs,e.useStore=Ei,e.useStoreApi=ki,e.useUpdateNodeInternals=function(){const e=ki();return n.useCallback((t=>{const{domNode:n,updateNodeInternals:o}=e.getState(),r=Array.isArray(t)?t:[t],i=new Map;r.forEach((e=>{const t=n?.querySelector(`.react-flow__node[data-id="${e}"]`);t&&i.set(e,{id:e,nodeElement:t,force:!0})})),requestAnimationFrame((()=>o(i,{triggerFitView:!1})))}),[])},e.useViewport=function(){return Ei(nl,Li)}}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CSSProperties, HTMLAttributes, MouseEvent as ReactMouseEvent, WheelEvent } from 'react';
|
|
2
|
-
import type { ConnectionMode, ConnectionLineType, OnConnect, OnConnectStart, OnConnectEnd, CoordinateExtent, KeyCode, PanOnScrollMode, ProOptions, PanelPosition, OnMove, OnMoveStart, OnMoveEnd, Viewport, NodeOrigin, HandleType, SelectionMode, OnError, ColorMode, SnapGrid } from '@xyflow/system';
|
|
3
|
-
import type { OnSelectionChangeFunc, NodeTypes, EdgeTypes, Node, Edge, ConnectionLineComponent,
|
|
2
|
+
import type { ConnectionMode, ConnectionLineType, OnConnect, OnConnectStart, OnConnectEnd, CoordinateExtent, KeyCode, PanOnScrollMode, ProOptions, PanelPosition, OnMove, OnMoveStart, OnMoveEnd, Viewport, NodeOrigin, HandleType, SelectionMode, OnError, ColorMode, SnapGrid, OnReconnect } from '@xyflow/system';
|
|
3
|
+
import type { OnSelectionChangeFunc, NodeTypes, EdgeTypes, Node, Edge, ConnectionLineComponent, OnInit, DefaultEdgeOptions, FitViewOptions, OnNodesDelete, OnEdgesDelete, OnDelete, OnNodesChange, OnEdgesChange, NodeMouseHandler, SelectionDragHandler, EdgeMouseHandler, OnNodeDrag, OnBeforeDelete, IsValidConnection } from '.';
|
|
4
4
|
/**
|
|
5
5
|
* ReactFlow component props.
|
|
6
6
|
* @public
|
|
@@ -39,22 +39,11 @@ export interface ReactFlowProps<NodeType extends Node = Node, EdgeType extends E
|
|
|
39
39
|
defaultEdges?: EdgeType[];
|
|
40
40
|
/**
|
|
41
41
|
* Defaults to be applied to all new edges that are added to the flow.
|
|
42
|
-
*
|
|
43
42
|
* Properties on a new edge will override these defaults if they exist.
|
|
44
43
|
* @example
|
|
45
44
|
* const defaultEdgeOptions = {
|
|
46
45
|
* type: 'customEdgeType',
|
|
47
|
-
* animated: true
|
|
48
|
-
* interactionWidth: 10,
|
|
49
|
-
* data: { label: 'custom label' },
|
|
50
|
-
* hidden: false,
|
|
51
|
-
* deletable: true,
|
|
52
|
-
* selected: false,
|
|
53
|
-
* focusable: true,
|
|
54
|
-
* markerStart: EdgeMarker.ArrowClosed,
|
|
55
|
-
* markerEnd: EdgeMarker.ArrowClosed,
|
|
56
|
-
* zIndex: 12,
|
|
57
|
-
* ariaLabel: 'custom aria label'
|
|
46
|
+
* animated: true
|
|
58
47
|
* }
|
|
59
48
|
*/
|
|
60
49
|
defaultEdgeOptions?: DefaultEdgeOptions;
|
|
@@ -91,7 +80,6 @@ export interface ReactFlowProps<NodeType extends Node = Node, EdgeType extends E
|
|
|
91
80
|
/**
|
|
92
81
|
* This handler is called when the source or target of a reconnectable edge is dragged from the
|
|
93
82
|
* current node. It will fire even if the edge's source or target do not end up changing.
|
|
94
|
-
*
|
|
95
83
|
* You can use the `reconnectEdge` utility to convert the connection to a new edge.
|
|
96
84
|
*/
|
|
97
85
|
onReconnect?: OnReconnect<EdgeType>;
|
|
@@ -102,7 +90,6 @@ export interface ReactFlowProps<NodeType extends Node = Node, EdgeType extends E
|
|
|
102
90
|
/**
|
|
103
91
|
* This event fires when the user releases the source or target of an editable edge. It is called
|
|
104
92
|
* even if an edge update does not occur.
|
|
105
|
-
*
|
|
106
93
|
*/
|
|
107
94
|
onReconnectEnd?: (event: MouseEvent | TouchEvent, edge: EdgeType, handleType: HandleType) => void;
|
|
108
95
|
/**
|
|
@@ -163,7 +150,6 @@ export interface ReactFlowProps<NodeType extends Node = Node, EdgeType extends E
|
|
|
163
150
|
onSelectionContextMenu?: (event: ReactMouseEvent, nodes: NodeType[]) => void;
|
|
164
151
|
/**
|
|
165
152
|
* When a connection line is completed and two nodes are connected by the user, this event fires with the new connection.
|
|
166
|
-
*
|
|
167
153
|
* You can use the `addEdge` utility to convert the connection to a complete edge.
|
|
168
154
|
* @example // Use helper function to update edges onConnect
|
|
169
155
|
* import ReactFlow, { addEdge } from '@xyflow/react';
|
|
@@ -231,9 +217,7 @@ export interface ReactFlowProps<NodeType extends Node = Node, EdgeType extends E
|
|
|
231
217
|
onBeforeDelete?: OnBeforeDelete<NodeType, EdgeType>;
|
|
232
218
|
/**
|
|
233
219
|
* Custom node types to be available in a flow.
|
|
234
|
-
*
|
|
235
220
|
* React Flow matches a node's type to a component in the `nodeTypes` object.
|
|
236
|
-
* @TODO check if @default is correct
|
|
237
221
|
* @default {
|
|
238
222
|
* input: InputNode,
|
|
239
223
|
* default: DefaultNode,
|
|
@@ -248,9 +232,7 @@ export interface ReactFlowProps<NodeType extends Node = Node, EdgeType extends E
|
|
|
248
232
|
nodeTypes?: NodeTypes;
|
|
249
233
|
/**
|
|
250
234
|
* Custom edge types to be available in a flow.
|
|
251
|
-
*
|
|
252
235
|
* React Flow matches an edge's type to a component in the `edgeTypes` object.
|
|
253
|
-
* @TODO check if @default is correct
|
|
254
236
|
* @default {
|
|
255
237
|
* default: BezierEdge,
|
|
256
238
|
* straight: StraightEdge,
|
|
@@ -266,7 +248,6 @@ export interface ReactFlowProps<NodeType extends Node = Node, EdgeType extends E
|
|
|
266
248
|
edgeTypes?: EdgeTypes;
|
|
267
249
|
/**
|
|
268
250
|
* The type of edge path to use for connection lines.
|
|
269
|
-
*
|
|
270
251
|
* Although created edges can be of any type, React Flow needs to know what type of path to render for the connection line before the edge is created!
|
|
271
252
|
* @default ConnectionLineType.Bezier
|
|
272
253
|
*/
|
|
@@ -287,7 +268,7 @@ export interface ReactFlowProps<NodeType extends Node = Node, EdgeType extends E
|
|
|
287
268
|
/**
|
|
288
269
|
* If set, pressing the key or chord will delete any selected nodes and edges. Passing an array
|
|
289
270
|
* represents multiple keys that can be pressed.
|
|
290
|
-
|
|
271
|
+
|
|
291
272
|
* For example, `["Delete", "Backspace"]` will delete selected elements when either key is pressed.
|
|
292
273
|
* @default 'Backspace'
|
|
293
274
|
*/
|
|
@@ -404,7 +385,6 @@ export interface ReactFlowProps<NodeType extends Node = Node, EdgeType extends E
|
|
|
404
385
|
selectNodesOnDrag?: boolean;
|
|
405
386
|
/**
|
|
406
387
|
* Enabling this prop allows users to pan the viewport by clicking and dragging.
|
|
407
|
-
*
|
|
408
388
|
* You can also set this prop to an array of numbers to limit which mouse buttons can activate panning.
|
|
409
389
|
* @default true
|
|
410
390
|
* @example [0, 2] // allows panning with the left and right mouse buttons
|
|
@@ -443,7 +423,6 @@ export interface ReactFlowProps<NodeType extends Node = Node, EdgeType extends E
|
|
|
443
423
|
onViewportChange?: (viewport: Viewport) => void;
|
|
444
424
|
/**
|
|
445
425
|
* By default, the viewport extends infinitely. You can use this prop to set a boundary.
|
|
446
|
-
*
|
|
447
426
|
* The first pair of coordinates is the top left boundary and the second pair is the bottom right.
|
|
448
427
|
* @default [[-∞, -∞], [+∞, +∞]]
|
|
449
428
|
* @example [[-1000, -10000], [1000, 1000]]
|
|
@@ -456,7 +435,6 @@ export interface ReactFlowProps<NodeType extends Node = Node, EdgeType extends E
|
|
|
456
435
|
preventScrolling?: boolean;
|
|
457
436
|
/**
|
|
458
437
|
* By default, nodes can be placed on an infinite flow. You can use this prop to set a boundary.
|
|
459
|
-
*
|
|
460
438
|
* The first pair of coordinates is the top left boundary and the second pair is the bottom right.
|
|
461
439
|
* @example [[-1000, -10000], [1000, 1000]]
|
|
462
440
|
*/
|
|
@@ -478,21 +456,18 @@ export interface ReactFlowProps<NodeType extends Node = Node, EdgeType extends E
|
|
|
478
456
|
zoomOnPinch?: boolean;
|
|
479
457
|
/**
|
|
480
458
|
* Controls if the viewport should pan by scrolling inside the container.
|
|
481
|
-
*
|
|
482
459
|
* Can be limited to a specific direction with `panOnScrollMode`.
|
|
483
460
|
* @default false
|
|
484
461
|
*/
|
|
485
462
|
panOnScroll?: boolean;
|
|
486
463
|
/**
|
|
487
464
|
* Controls how fast viewport should be panned on scroll.
|
|
488
|
-
*
|
|
489
465
|
* Use together with `panOnScroll` prop.
|
|
490
466
|
* @default 0.5
|
|
491
467
|
*/
|
|
492
468
|
panOnScrollSpeed?: number;
|
|
493
469
|
/**
|
|
494
470
|
* This prop is used to limit the direction of panning when `panOnScroll` is enabled.
|
|
495
|
-
*
|
|
496
471
|
* The `"free"` option allows panning in any direction.
|
|
497
472
|
* @default "free"
|
|
498
473
|
* @example "horizontal" | "vertical"
|
|
@@ -625,10 +600,8 @@ export interface ReactFlowProps<NodeType extends Node = Node, EdgeType extends E
|
|
|
625
600
|
isValidConnection?: IsValidConnection<EdgeType>;
|
|
626
601
|
/**
|
|
627
602
|
* With a threshold greater than zero you can delay node drag events.
|
|
628
|
-
*
|
|
629
603
|
* If threshold equals 1, you need to drag the node 1 pixel before a drag event is fired.
|
|
630
|
-
*
|
|
631
|
-
* 1 is the default value, so clicks don't trigger drag events.
|
|
604
|
+
* 1 is the default value, so that clicks don't trigger drag events.
|
|
632
605
|
* @default 1
|
|
633
606
|
*/
|
|
634
607
|
nodeDragThreshold?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-props.d.ts","sourceRoot":"","sources":["../../src/types/component-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,IAAI,eAAe,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACtG,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAClB,SAAS,EACT,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,OAAO,EACP,eAAe,EACf,UAAU,EACV,aAAa,EACb,MAAM,EACN,WAAW,EACX,SAAS,EACT,QAAQ,EACR,UAAU,EACV,UAAU,EACV,aAAa,EACb,OAAO,EACP,SAAS,EACT,QAAQ,
|
|
1
|
+
{"version":3,"file":"component-props.d.ts","sourceRoot":"","sources":["../../src/types/component-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,IAAI,eAAe,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACtG,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAClB,SAAS,EACT,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,OAAO,EACP,eAAe,EACf,UAAU,EACV,aAAa,EACb,MAAM,EACN,WAAW,EACX,SAAS,EACT,QAAQ,EACR,UAAU,EACV,UAAU,EACV,aAAa,EACb,OAAO,EACP,SAAS,EACT,QAAQ,EACR,WAAW,EACZ,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EACV,qBAAqB,EACrB,SAAS,EACT,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,uBAAuB,EACvB,MAAM,EACN,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,aAAa,EACb,QAAQ,EACR,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,iBAAiB,EAClB,MAAM,GAAG,CAAC;AAEX;;;GAGG;AACH,MAAM,WAAW,cAAc,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,QAAQ,SAAS,IAAI,GAAG,IAAI,CACxF,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,SAAS,CAAC;IACvD;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;IACnB;;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AAC,EAAE,OAAO,CAAC;CACjB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CSSProperties, SVGAttributes, ReactNode, MouseEvent as ReactMouseEvent, ComponentType } from 'react';
|
|
2
|
-
import type { EdgeBase, BezierPathOptions, Position, SmoothStepPathOptions, DefaultEdgeOptionsBase, HandleType,
|
|
2
|
+
import type { EdgeBase, BezierPathOptions, Position, SmoothStepPathOptions, DefaultEdgeOptionsBase, HandleType, ConnectionLineType, Handle, EdgePosition, StepPathOptions, OnError, OnReconnect, FinalConnectionState } from '@xyflow/system';
|
|
3
3
|
import { EdgeTypes, InternalNode, Node } from '.';
|
|
4
4
|
/**
|
|
5
5
|
* @inline
|
|
@@ -174,7 +174,6 @@ export type StraightEdgeProps = Omit<EdgeComponentProps, 'sourcePosition' | 'tar
|
|
|
174
174
|
* @expand
|
|
175
175
|
*/
|
|
176
176
|
export type SimpleBezierEdgeProps = EdgeComponentProps;
|
|
177
|
-
export type OnReconnect<EdgeType extends Edge = Edge> = (oldEdge: EdgeType, newConnection: Connection) => void;
|
|
178
177
|
/**
|
|
179
178
|
* If you want to render a custom component for connection lines, you can set the
|
|
180
179
|
* `connectionLineComponent` prop on the [`<ReactFlow />`](/api-reference/react-flow#connection-connectionLineComponent)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edges.d.ts","sourceRoot":"","sources":["../../src/types/edges.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,IAAI,eAAe,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACnH,OAAO,KAAK,EACV,QAAQ,EACR,iBAAiB,EACjB,QAAQ,EACR,qBAAqB,EACrB,sBAAsB,EACtB,UAAU,EACV,
|
|
1
|
+
{"version":3,"file":"edges.d.ts","sourceRoot":"","sources":["../../src/types/edges.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,S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AAC;AAEF,MAAM,MAAM,uBAAuB,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,IAAI,aAAa,CAC/E,4BAA4B,CAAC,QAAQ,CAAC,CACvC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyflow/react",
|
|
3
|
-
"version": "12.6.
|
|
3
|
+
"version": "12.6.2",
|
|
4
4
|
"description": "React Flow - A highly customizable React library for building node-based editors and interactive flow charts.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"classcat": "^5.0.3",
|
|
57
57
|
"zustand": "^4.4.0",
|
|
58
|
-
"@xyflow/system": "0.0.
|
|
58
|
+
"@xyflow/system": "0.0.59"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"react": ">=17",
|