@xyflow/system 0.0.22 → 0.0.23
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/esm/index.js +32 -25
- package/dist/esm/index.mjs +32 -25
- package/dist/esm/types/nodes.d.ts +1 -1
- package/dist/esm/types/nodes.d.ts.map +1 -1
- package/dist/esm/utils/graph.d.ts +1 -1
- package/dist/esm/utils/graph.d.ts.map +1 -1
- package/dist/esm/utils/store.d.ts +7 -3
- package/dist/esm/utils/store.d.ts.map +1 -1
- package/dist/esm/xypanzoom/eventhandler.d.ts.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/types/nodes.d.ts +1 -1
- package/dist/umd/types/nodes.d.ts.map +1 -1
- package/dist/umd/utils/graph.d.ts +1 -1
- package/dist/umd/utils/graph.d.ts.map +1 -1
- package/dist/umd/utils/store.d.ts +7 -3
- package/dist/umd/utils/store.d.ts.map +1 -1
- package/dist/umd/xypanzoom/eventhandler.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/esm/index.js
CHANGED
|
@@ -280,6 +280,7 @@ function fitView({ nodeLookup, width, height, panZoom, minZoom, maxZoom, nodeOri
|
|
|
280
280
|
const filteredNodes = [];
|
|
281
281
|
nodeLookup.forEach((n) => {
|
|
282
282
|
const isVisible = n.measured.width && n.measured.height && (options?.includeHiddenNodes || !n.hidden);
|
|
283
|
+
// TODO: this remove options.nodes.some with a Set
|
|
283
284
|
if (isVisible &&
|
|
284
285
|
(!options?.nodes || (options?.nodes.length && options?.nodes.some((optionNode) => optionNode.id === n.id)))) {
|
|
285
286
|
filteredNodes.push(n);
|
|
@@ -1078,8 +1079,8 @@ function toHandleBounds(handles) {
|
|
|
1078
1079
|
};
|
|
1079
1080
|
}
|
|
1080
1081
|
function getHandlePosition(position, node, handle = null) {
|
|
1081
|
-
const x = (handle?.x ?? 0) +
|
|
1082
|
-
const y = (handle?.y ?? 0) +
|
|
1082
|
+
const x = (handle?.x ?? 0) + node.internals.positionAbsolute.x;
|
|
1083
|
+
const y = (handle?.y ?? 0) + node.internals.positionAbsolute.y;
|
|
1083
1084
|
const { width, height } = handle ?? getNodeDimensions(node);
|
|
1084
1085
|
switch (position) {
|
|
1085
1086
|
case Position.Top:
|
|
@@ -1202,6 +1203,7 @@ function adoptUserNodes(nodes, nodeLookup, options = {
|
|
|
1202
1203
|
nodeOrigin: [0, 0],
|
|
1203
1204
|
elevateNodesOnSelect: true,
|
|
1204
1205
|
defaults: {},
|
|
1206
|
+
checkEquality: true,
|
|
1205
1207
|
}) {
|
|
1206
1208
|
const tmpLookup = new Map(nodeLookup);
|
|
1207
1209
|
nodeLookup.clear();
|
|
@@ -1212,7 +1214,7 @@ function adoptUserNodes(nodes, nodeLookup, options = {
|
|
|
1212
1214
|
if (userNode.parentId) {
|
|
1213
1215
|
parentNodeIds.add(userNode.parentId);
|
|
1214
1216
|
}
|
|
1215
|
-
if (userNode === currentStoreNode?.internals.userNode) {
|
|
1217
|
+
if (options.checkEquality && userNode === currentStoreNode?.internals.userNode) {
|
|
1216
1218
|
nodeLookup.set(userNode.id, currentStoreNode);
|
|
1217
1219
|
}
|
|
1218
1220
|
else {
|
|
@@ -1225,7 +1227,7 @@ function adoptUserNodes(nodes, nodeLookup, options = {
|
|
|
1225
1227
|
},
|
|
1226
1228
|
internals: {
|
|
1227
1229
|
positionAbsolute: userNode.position,
|
|
1228
|
-
handleBounds: currentStoreNode?.internals
|
|
1230
|
+
handleBounds: currentStoreNode?.internals.handleBounds,
|
|
1229
1231
|
z: (isNumeric(userNode.zIndex) ? userNode.zIndex : 0) + (userNode.selected ? selectedNodeZ : 0),
|
|
1230
1232
|
userNode,
|
|
1231
1233
|
isParent: false,
|
|
@@ -1305,10 +1307,11 @@ function handleParentExpand(nodes, nodeLookup) {
|
|
|
1305
1307
|
}
|
|
1306
1308
|
return changes;
|
|
1307
1309
|
}
|
|
1308
|
-
function
|
|
1310
|
+
function updateNodeInternals(updates, nodeLookup, domNode, nodeOrigin) {
|
|
1309
1311
|
const viewportNode = domNode?.querySelector('.xyflow__viewport');
|
|
1312
|
+
let updatedInternals = false;
|
|
1310
1313
|
if (!viewportNode) {
|
|
1311
|
-
return [];
|
|
1314
|
+
return { changes: [], updatedInternals };
|
|
1312
1315
|
}
|
|
1313
1316
|
const changes = [];
|
|
1314
1317
|
const style = window.getComputedStyle(viewportNode);
|
|
@@ -1325,19 +1328,18 @@ function updateNodeDimensions(updates, nodeLookup, domNode, nodeOrigin) {
|
|
|
1325
1328
|
handleBounds: undefined,
|
|
1326
1329
|
},
|
|
1327
1330
|
});
|
|
1331
|
+
updatedInternals = true;
|
|
1328
1332
|
}
|
|
1329
1333
|
else if (node) {
|
|
1330
1334
|
const dimensions = getDimensions(update.nodeElement);
|
|
1335
|
+
const dimensionChanged = node.measured.width !== dimensions.width || node.measured.height !== dimensions.height;
|
|
1331
1336
|
const doUpdate = !!(dimensions.width &&
|
|
1332
1337
|
dimensions.height &&
|
|
1333
|
-
(
|
|
1338
|
+
(dimensionChanged || !node.internals.handleBounds || update.force));
|
|
1334
1339
|
if (doUpdate) {
|
|
1335
1340
|
const newNode = {
|
|
1336
1341
|
...node,
|
|
1337
|
-
measured:
|
|
1338
|
-
...node.measured,
|
|
1339
|
-
...dimensions,
|
|
1340
|
-
},
|
|
1342
|
+
measured: dimensions,
|
|
1341
1343
|
internals: {
|
|
1342
1344
|
...node.internals,
|
|
1343
1345
|
handleBounds: {
|
|
@@ -1347,13 +1349,16 @@ function updateNodeDimensions(updates, nodeLookup, domNode, nodeOrigin) {
|
|
|
1347
1349
|
},
|
|
1348
1350
|
};
|
|
1349
1351
|
nodeLookup.set(node.id, newNode);
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1352
|
+
updatedInternals = true;
|
|
1353
|
+
if (dimensionChanged) {
|
|
1354
|
+
changes.push({
|
|
1355
|
+
id: newNode.id,
|
|
1356
|
+
type: 'dimensions',
|
|
1357
|
+
dimensions,
|
|
1358
|
+
});
|
|
1359
|
+
if (newNode.expandParent) {
|
|
1360
|
+
triggerChangeNodes.push(newNode);
|
|
1361
|
+
}
|
|
1357
1362
|
}
|
|
1358
1363
|
}
|
|
1359
1364
|
}
|
|
@@ -1362,7 +1367,7 @@ function updateNodeDimensions(updates, nodeLookup, domNode, nodeOrigin) {
|
|
|
1362
1367
|
const parentExpandChanges = handleParentExpand(triggerChangeNodes, nodeLookup);
|
|
1363
1368
|
changes.push(...parentExpandChanges);
|
|
1364
1369
|
}
|
|
1365
|
-
return changes;
|
|
1370
|
+
return { changes, updatedInternals };
|
|
1366
1371
|
}
|
|
1367
1372
|
function panBy({ delta, panZoom, transform, translateExtent, width, height, }) {
|
|
1368
1373
|
if (!panZoom || (!delta.x && !delta.y)) {
|
|
@@ -1452,8 +1457,8 @@ function getDragItems(nodeLookup, nodesDraggable, mousePos, nodeId) {
|
|
|
1452
1457
|
id: internalNode.id,
|
|
1453
1458
|
position: internalNode.position || { x: 0, y: 0 },
|
|
1454
1459
|
distance: {
|
|
1455
|
-
x: mousePos.x -
|
|
1456
|
-
y: mousePos.y -
|
|
1460
|
+
x: mousePos.x - internalNode.internals.positionAbsolute.x,
|
|
1461
|
+
y: mousePos.y - internalNode.internals.positionAbsolute.y,
|
|
1457
1462
|
},
|
|
1458
1463
|
extent: internalNode.extent,
|
|
1459
1464
|
parentId: internalNode.parentId,
|
|
@@ -1693,8 +1698,8 @@ function getHandles(node, handleBounds, type, currentHandle) {
|
|
|
1693
1698
|
id: h.id || null,
|
|
1694
1699
|
type,
|
|
1695
1700
|
nodeId: node.id,
|
|
1696
|
-
x:
|
|
1697
|
-
y:
|
|
1701
|
+
x: node.internals.positionAbsolute.x + h.x + h.width / 2,
|
|
1702
|
+
y: node.internals.positionAbsolute.y + h.y + h.height / 2,
|
|
1698
1703
|
});
|
|
1699
1704
|
}
|
|
1700
1705
|
return res;
|
|
@@ -2043,7 +2048,9 @@ function createPanOnScrollHandler({ zoomPanValues, noWheelClassName, d3Selection
|
|
|
2043
2048
|
}
|
|
2044
2049
|
function createZoomOnScrollHandler({ noWheelClassName, preventScrolling, d3ZoomHandler }) {
|
|
2045
2050
|
return function (event, d) {
|
|
2046
|
-
if
|
|
2051
|
+
// we still want to enable pinch zooming even if preventScrolling is set to false
|
|
2052
|
+
const preventZoom = !preventScrolling && event.type === 'wheel' && !event.ctrlKey;
|
|
2053
|
+
if (preventZoom || isWrappedWithClass(event, noWheelClassName)) {
|
|
2047
2054
|
return null;
|
|
2048
2055
|
}
|
|
2049
2056
|
event.preventDefault();
|
|
@@ -2735,4 +2742,4 @@ function XYResizer({ domNode, nodeId, getStoreItems, onChange }) {
|
|
|
2735
2742
|
};
|
|
2736
2743
|
}
|
|
2737
2744
|
|
|
2738
|
-
export { ConnectionLineType, ConnectionMode, MarkerType, PanOnScrollMode, Position, ResizeControlVariant, SelectionMode, XYDrag, XYHandle, XYMinimap, XYPanZoom, XYResizer, XY_RESIZER_HANDLE_POSITIONS, XY_RESIZER_LINE_POSITIONS, addEdge, adoptUserNodes, areConnectionMapsEqual, boxToRect, calcAutoPan, calculateNodePosition, clamp, clampPosition, createMarkerIds, devWarn, elementSelectionKeys, errorMessages, fitView, getBezierEdgeCenter, getBezierPath, getBoundsOfBoxes, getBoundsOfRects, getConnectedEdges, getDimensions, getEdgeCenter, getEdgePosition, getElementsToRemove, getElevatedEdgeZIndex, getEventPosition, getHandleBounds, getHostForElement, getIncomers, getInternalNodesBounds, getMarkerId, getNodeDimensions, getNodePositionWithOrigin, getNodeToolbarTransform, getNodesBounds, getNodesInside, getOutgoers, getOverlappingArea, getPointerPosition, getPositionWithOrigin, getSmoothStepPath, getStraightPath, getViewportForBounds, handleConnectionChange, handleParentExpand, infiniteExtent, isCoordinateExtent, isEdgeBase, isEdgeVisible, isInputDOMNode, isInternalNodeBase, isMacOs, isMouseEvent, isNodeBase, isNumeric, isRectObject, nodeHasDimensions, nodeToBox, nodeToRect, panBy, pointToRendererPoint, rectToBox, rendererPointToPoint, shallowNodeData, snapPosition, updateAbsolutePositions, updateConnectionLookup, updateEdge,
|
|
2745
|
+
export { ConnectionLineType, ConnectionMode, MarkerType, PanOnScrollMode, Position, ResizeControlVariant, SelectionMode, XYDrag, XYHandle, XYMinimap, XYPanZoom, XYResizer, XY_RESIZER_HANDLE_POSITIONS, XY_RESIZER_LINE_POSITIONS, addEdge, adoptUserNodes, areConnectionMapsEqual, boxToRect, calcAutoPan, calculateNodePosition, clamp, clampPosition, createMarkerIds, devWarn, elementSelectionKeys, errorMessages, fitView, getBezierEdgeCenter, getBezierPath, getBoundsOfBoxes, getBoundsOfRects, getConnectedEdges, getDimensions, getEdgeCenter, getEdgePosition, getElementsToRemove, getElevatedEdgeZIndex, getEventPosition, getHandleBounds, getHostForElement, getIncomers, getInternalNodesBounds, getMarkerId, getNodeDimensions, getNodePositionWithOrigin, getNodeToolbarTransform, getNodesBounds, getNodesInside, getOutgoers, getOverlappingArea, getPointerPosition, getPositionWithOrigin, getSmoothStepPath, getStraightPath, getViewportForBounds, handleConnectionChange, handleParentExpand, infiniteExtent, isCoordinateExtent, isEdgeBase, isEdgeVisible, isInputDOMNode, isInternalNodeBase, isMacOs, isMouseEvent, isNodeBase, isNumeric, isRectObject, nodeHasDimensions, nodeToBox, nodeToRect, panBy, pointToRendererPoint, rectToBox, rendererPointToPoint, shallowNodeData, snapPosition, updateAbsolutePositions, updateConnectionLookup, updateEdge, updateNodeInternals };
|
package/dist/esm/index.mjs
CHANGED
|
@@ -280,6 +280,7 @@ function fitView({ nodeLookup, width, height, panZoom, minZoom, maxZoom, nodeOri
|
|
|
280
280
|
const filteredNodes = [];
|
|
281
281
|
nodeLookup.forEach((n) => {
|
|
282
282
|
const isVisible = n.measured.width && n.measured.height && (options?.includeHiddenNodes || !n.hidden);
|
|
283
|
+
// TODO: this remove options.nodes.some with a Set
|
|
283
284
|
if (isVisible &&
|
|
284
285
|
(!options?.nodes || (options?.nodes.length && options?.nodes.some((optionNode) => optionNode.id === n.id)))) {
|
|
285
286
|
filteredNodes.push(n);
|
|
@@ -1078,8 +1079,8 @@ function toHandleBounds(handles) {
|
|
|
1078
1079
|
};
|
|
1079
1080
|
}
|
|
1080
1081
|
function getHandlePosition(position, node, handle = null) {
|
|
1081
|
-
const x = (handle?.x ?? 0) +
|
|
1082
|
-
const y = (handle?.y ?? 0) +
|
|
1082
|
+
const x = (handle?.x ?? 0) + node.internals.positionAbsolute.x;
|
|
1083
|
+
const y = (handle?.y ?? 0) + node.internals.positionAbsolute.y;
|
|
1083
1084
|
const { width, height } = handle ?? getNodeDimensions(node);
|
|
1084
1085
|
switch (position) {
|
|
1085
1086
|
case Position.Top:
|
|
@@ -1202,6 +1203,7 @@ function adoptUserNodes(nodes, nodeLookup, options = {
|
|
|
1202
1203
|
nodeOrigin: [0, 0],
|
|
1203
1204
|
elevateNodesOnSelect: true,
|
|
1204
1205
|
defaults: {},
|
|
1206
|
+
checkEquality: true,
|
|
1205
1207
|
}) {
|
|
1206
1208
|
const tmpLookup = new Map(nodeLookup);
|
|
1207
1209
|
nodeLookup.clear();
|
|
@@ -1212,7 +1214,7 @@ function adoptUserNodes(nodes, nodeLookup, options = {
|
|
|
1212
1214
|
if (userNode.parentId) {
|
|
1213
1215
|
parentNodeIds.add(userNode.parentId);
|
|
1214
1216
|
}
|
|
1215
|
-
if (userNode === currentStoreNode?.internals.userNode) {
|
|
1217
|
+
if (options.checkEquality && userNode === currentStoreNode?.internals.userNode) {
|
|
1216
1218
|
nodeLookup.set(userNode.id, currentStoreNode);
|
|
1217
1219
|
}
|
|
1218
1220
|
else {
|
|
@@ -1225,7 +1227,7 @@ function adoptUserNodes(nodes, nodeLookup, options = {
|
|
|
1225
1227
|
},
|
|
1226
1228
|
internals: {
|
|
1227
1229
|
positionAbsolute: userNode.position,
|
|
1228
|
-
handleBounds: currentStoreNode?.internals
|
|
1230
|
+
handleBounds: currentStoreNode?.internals.handleBounds,
|
|
1229
1231
|
z: (isNumeric(userNode.zIndex) ? userNode.zIndex : 0) + (userNode.selected ? selectedNodeZ : 0),
|
|
1230
1232
|
userNode,
|
|
1231
1233
|
isParent: false,
|
|
@@ -1305,10 +1307,11 @@ function handleParentExpand(nodes, nodeLookup) {
|
|
|
1305
1307
|
}
|
|
1306
1308
|
return changes;
|
|
1307
1309
|
}
|
|
1308
|
-
function
|
|
1310
|
+
function updateNodeInternals(updates, nodeLookup, domNode, nodeOrigin) {
|
|
1309
1311
|
const viewportNode = domNode?.querySelector('.xyflow__viewport');
|
|
1312
|
+
let updatedInternals = false;
|
|
1310
1313
|
if (!viewportNode) {
|
|
1311
|
-
return [];
|
|
1314
|
+
return { changes: [], updatedInternals };
|
|
1312
1315
|
}
|
|
1313
1316
|
const changes = [];
|
|
1314
1317
|
const style = window.getComputedStyle(viewportNode);
|
|
@@ -1325,19 +1328,18 @@ function updateNodeDimensions(updates, nodeLookup, domNode, nodeOrigin) {
|
|
|
1325
1328
|
handleBounds: undefined,
|
|
1326
1329
|
},
|
|
1327
1330
|
});
|
|
1331
|
+
updatedInternals = true;
|
|
1328
1332
|
}
|
|
1329
1333
|
else if (node) {
|
|
1330
1334
|
const dimensions = getDimensions(update.nodeElement);
|
|
1335
|
+
const dimensionChanged = node.measured.width !== dimensions.width || node.measured.height !== dimensions.height;
|
|
1331
1336
|
const doUpdate = !!(dimensions.width &&
|
|
1332
1337
|
dimensions.height &&
|
|
1333
|
-
(
|
|
1338
|
+
(dimensionChanged || !node.internals.handleBounds || update.force));
|
|
1334
1339
|
if (doUpdate) {
|
|
1335
1340
|
const newNode = {
|
|
1336
1341
|
...node,
|
|
1337
|
-
measured:
|
|
1338
|
-
...node.measured,
|
|
1339
|
-
...dimensions,
|
|
1340
|
-
},
|
|
1342
|
+
measured: dimensions,
|
|
1341
1343
|
internals: {
|
|
1342
1344
|
...node.internals,
|
|
1343
1345
|
handleBounds: {
|
|
@@ -1347,13 +1349,16 @@ function updateNodeDimensions(updates, nodeLookup, domNode, nodeOrigin) {
|
|
|
1347
1349
|
},
|
|
1348
1350
|
};
|
|
1349
1351
|
nodeLookup.set(node.id, newNode);
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1352
|
+
updatedInternals = true;
|
|
1353
|
+
if (dimensionChanged) {
|
|
1354
|
+
changes.push({
|
|
1355
|
+
id: newNode.id,
|
|
1356
|
+
type: 'dimensions',
|
|
1357
|
+
dimensions,
|
|
1358
|
+
});
|
|
1359
|
+
if (newNode.expandParent) {
|
|
1360
|
+
triggerChangeNodes.push(newNode);
|
|
1361
|
+
}
|
|
1357
1362
|
}
|
|
1358
1363
|
}
|
|
1359
1364
|
}
|
|
@@ -1362,7 +1367,7 @@ function updateNodeDimensions(updates, nodeLookup, domNode, nodeOrigin) {
|
|
|
1362
1367
|
const parentExpandChanges = handleParentExpand(triggerChangeNodes, nodeLookup);
|
|
1363
1368
|
changes.push(...parentExpandChanges);
|
|
1364
1369
|
}
|
|
1365
|
-
return changes;
|
|
1370
|
+
return { changes, updatedInternals };
|
|
1366
1371
|
}
|
|
1367
1372
|
function panBy({ delta, panZoom, transform, translateExtent, width, height, }) {
|
|
1368
1373
|
if (!panZoom || (!delta.x && !delta.y)) {
|
|
@@ -1452,8 +1457,8 @@ function getDragItems(nodeLookup, nodesDraggable, mousePos, nodeId) {
|
|
|
1452
1457
|
id: internalNode.id,
|
|
1453
1458
|
position: internalNode.position || { x: 0, y: 0 },
|
|
1454
1459
|
distance: {
|
|
1455
|
-
x: mousePos.x -
|
|
1456
|
-
y: mousePos.y -
|
|
1460
|
+
x: mousePos.x - internalNode.internals.positionAbsolute.x,
|
|
1461
|
+
y: mousePos.y - internalNode.internals.positionAbsolute.y,
|
|
1457
1462
|
},
|
|
1458
1463
|
extent: internalNode.extent,
|
|
1459
1464
|
parentId: internalNode.parentId,
|
|
@@ -1693,8 +1698,8 @@ function getHandles(node, handleBounds, type, currentHandle) {
|
|
|
1693
1698
|
id: h.id || null,
|
|
1694
1699
|
type,
|
|
1695
1700
|
nodeId: node.id,
|
|
1696
|
-
x:
|
|
1697
|
-
y:
|
|
1701
|
+
x: node.internals.positionAbsolute.x + h.x + h.width / 2,
|
|
1702
|
+
y: node.internals.positionAbsolute.y + h.y + h.height / 2,
|
|
1698
1703
|
});
|
|
1699
1704
|
}
|
|
1700
1705
|
return res;
|
|
@@ -2043,7 +2048,9 @@ function createPanOnScrollHandler({ zoomPanValues, noWheelClassName, d3Selection
|
|
|
2043
2048
|
}
|
|
2044
2049
|
function createZoomOnScrollHandler({ noWheelClassName, preventScrolling, d3ZoomHandler }) {
|
|
2045
2050
|
return function (event, d) {
|
|
2046
|
-
if
|
|
2051
|
+
// we still want to enable pinch zooming even if preventScrolling is set to false
|
|
2052
|
+
const preventZoom = !preventScrolling && event.type === 'wheel' && !event.ctrlKey;
|
|
2053
|
+
if (preventZoom || isWrappedWithClass(event, noWheelClassName)) {
|
|
2047
2054
|
return null;
|
|
2048
2055
|
}
|
|
2049
2056
|
event.preventDefault();
|
|
@@ -2735,4 +2742,4 @@ function XYResizer({ domNode, nodeId, getStoreItems, onChange }) {
|
|
|
2735
2742
|
};
|
|
2736
2743
|
}
|
|
2737
2744
|
|
|
2738
|
-
export { ConnectionLineType, ConnectionMode, MarkerType, PanOnScrollMode, Position, ResizeControlVariant, SelectionMode, XYDrag, XYHandle, XYMinimap, XYPanZoom, XYResizer, XY_RESIZER_HANDLE_POSITIONS, XY_RESIZER_LINE_POSITIONS, addEdge, adoptUserNodes, areConnectionMapsEqual, boxToRect, calcAutoPan, calculateNodePosition, clamp, clampPosition, createMarkerIds, devWarn, elementSelectionKeys, errorMessages, fitView, getBezierEdgeCenter, getBezierPath, getBoundsOfBoxes, getBoundsOfRects, getConnectedEdges, getDimensions, getEdgeCenter, getEdgePosition, getElementsToRemove, getElevatedEdgeZIndex, getEventPosition, getHandleBounds, getHostForElement, getIncomers, getInternalNodesBounds, getMarkerId, getNodeDimensions, getNodePositionWithOrigin, getNodeToolbarTransform, getNodesBounds, getNodesInside, getOutgoers, getOverlappingArea, getPointerPosition, getPositionWithOrigin, getSmoothStepPath, getStraightPath, getViewportForBounds, handleConnectionChange, handleParentExpand, infiniteExtent, isCoordinateExtent, isEdgeBase, isEdgeVisible, isInputDOMNode, isInternalNodeBase, isMacOs, isMouseEvent, isNodeBase, isNumeric, isRectObject, nodeHasDimensions, nodeToBox, nodeToRect, panBy, pointToRendererPoint, rectToBox, rendererPointToPoint, shallowNodeData, snapPosition, updateAbsolutePositions, updateConnectionLookup, updateEdge,
|
|
2745
|
+
export { ConnectionLineType, ConnectionMode, MarkerType, PanOnScrollMode, Position, ResizeControlVariant, SelectionMode, XYDrag, XYHandle, XYMinimap, XYPanZoom, XYResizer, XY_RESIZER_HANDLE_POSITIONS, XY_RESIZER_LINE_POSITIONS, addEdge, adoptUserNodes, areConnectionMapsEqual, boxToRect, calcAutoPan, calculateNodePosition, clamp, clampPosition, createMarkerIds, devWarn, elementSelectionKeys, errorMessages, fitView, getBezierEdgeCenter, getBezierPath, getBoundsOfBoxes, getBoundsOfRects, getConnectedEdges, getDimensions, getEdgeCenter, getEdgePosition, getElementsToRemove, getElevatedEdgeZIndex, getEventPosition, getHandleBounds, getHostForElement, getIncomers, getInternalNodesBounds, getMarkerId, getNodeDimensions, getNodePositionWithOrigin, getNodeToolbarTransform, getNodesBounds, getNodesInside, getOutgoers, getOverlappingArea, getPointerPosition, getPositionWithOrigin, getSmoothStepPath, getStraightPath, getViewportForBounds, handleConnectionChange, handleParentExpand, infiniteExtent, isCoordinateExtent, isEdgeBase, isEdgeVisible, isInputDOMNode, isInternalNodeBase, isMacOs, isMouseEvent, isNodeBase, isNumeric, isRectObject, nodeHasDimensions, nodeToBox, nodeToRect, panBy, pointToRendererPoint, rectToBox, rendererPointToPoint, shallowNodeData, snapPosition, updateAbsolutePositions, updateConnectionLookup, updateEdge, updateNodeInternals };
|
|
@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AM,UAAU,GAAG,QAAQ,CAAC,aAAa,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAC;AAErE,MAAM,MAAM,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAC;AAE/C,MAAM,MAAM,UAAU,CAAC,QAAQ,SAAS,gBAAgB,GAAG,gBAAgB,IAAI,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC"}
|
|
@@ -66,7 +66,7 @@ export type GetInternalNodesBoundsParams = {
|
|
|
66
66
|
* @internal
|
|
67
67
|
*/
|
|
68
68
|
export declare const getInternalNodesBounds: (nodeLookup: NodeLookup, params?: GetInternalNodesBoundsParams) => Rect;
|
|
69
|
-
export declare const getNodesInside: <NodeType extends NodeBase = NodeBase>(nodeLookup: Map<string, InternalNodeBase<NodeType>>, rect: Rect, [tx, ty, tScale]?: Transform, partially?: boolean, excludeNonSelectableNodes?: boolean, nodeOrigin?: NodeOrigin) => NodeType[];
|
|
69
|
+
export declare const getNodesInside: <NodeType extends NodeBase = NodeBase>(nodeLookup: Map<string, InternalNodeBase<NodeType>>, rect: Rect, [tx, ty, tScale]?: Transform, partially?: boolean, excludeNonSelectableNodes?: boolean, nodeOrigin?: NodeOrigin) => InternalNodeBase<NodeType>[];
|
|
70
70
|
/**
|
|
71
71
|
* Get all connecting edges for a given set of nodes
|
|
72
72
|
* @param nodes - Nodes you want to get the connected edges for
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../src/utils/graph.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,gBAAgB,EAChB,OAAO,EACP,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAGlB;;;;;;GAMG;AAC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,SAAS,QAAQ,GAAG,QAAQ,EAAE,EACpH,aAAkB,EAClB,aAAkB,EAClB,KAAK,EACL,KAAK,EACL,cAAc,GACf,EAAE;IACD,aAAa,EAAE,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;IACnC,aAAa,EAAE,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;IACnC,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,cAAc,CAAC,EAAE,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;CACzD,GAAG,OAAO,CAAC;IACV,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB,CAAC,CA+CD"}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import { NodeBase, CoordinateExtent,
|
|
1
|
+
import { NodeBase, CoordinateExtent, InternalNodeUpdate, NodeOrigin, PanZoomInstance, Transform, XYPosition, ConnectionLookup, EdgeBase, EdgeLookup, InternalNodeBase, NodeLookup, NodeDimensionChange, NodePositionChange } from '../types';
|
|
2
2
|
export declare function updateAbsolutePositions<NodeType extends NodeBase>(nodeLookup: Map<string, InternalNodeBase<NodeType>>, options?: UpdateNodesOptions<NodeType>, parentNodeIds?: Set<string>): void;
|
|
3
3
|
type UpdateNodesOptions<NodeType extends NodeBase> = {
|
|
4
4
|
nodeOrigin?: NodeOrigin;
|
|
5
5
|
elevateNodesOnSelect?: boolean;
|
|
6
6
|
defaults?: Partial<NodeType>;
|
|
7
|
+
checkEquality?: boolean;
|
|
7
8
|
};
|
|
8
9
|
export declare function adoptUserNodes<NodeType extends NodeBase>(nodes: NodeType[], nodeLookup: Map<string, InternalNodeBase<NodeType>>, options?: UpdateNodesOptions<NodeType>): void;
|
|
9
|
-
export declare function handleParentExpand(nodes: InternalNodeBase[], nodeLookup: NodeLookup):
|
|
10
|
-
export declare function
|
|
10
|
+
export declare function handleParentExpand(nodes: InternalNodeBase[], nodeLookup: NodeLookup): (NodeDimensionChange | NodePositionChange)[];
|
|
11
|
+
export declare function updateNodeInternals<NodeType extends InternalNodeBase>(updates: Map<string, InternalNodeUpdate>, nodeLookup: Map<string, NodeType>, domNode: HTMLElement | null, nodeOrigin?: NodeOrigin): {
|
|
12
|
+
changes: (NodeDimensionChange | NodePositionChange)[];
|
|
13
|
+
updatedInternals: boolean;
|
|
14
|
+
};
|
|
11
15
|
export declare function panBy({ delta, panZoom, transform, translateExtent, width, height, }: {
|
|
12
16
|
delta: XYPosition;
|
|
13
17
|
panZoom: PanZoomInstance | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/utils/store.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/utils/store.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,EACV,eAAe,EACf,SAAS,EACT,UAAU,EAEV,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,gBAAgB,EAChB,UAAU,EAEV,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAKlB,wBAAgB,uBAAuB,CAAC,QAAQ,SAAS,QAAQ,EAC/D,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC,EACnD,OAAO,GAAE,kBAAkB,CAAC,QAAQ,CAInC,EACD,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,QAoC5B;AAED,KAAK,kBAAkB,CAAC,QAAQ,SAAS,QAAQ,IAAI;IACnD,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC7B,a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,OAAO,SAAS,GAAG,KAAK,OAAO,sBAYvD;AAED,wBAAgB,yBAAyB,CAAC,EAAE,aAAa,EAAE,gBAAgB,EAAE,cAAc,EAAE,EAAE,kBAAkB,WAChG,YAAY,cAAc,EAAE,GAAG,CAAC,UAoBhD;AAED,wBAAgB,oBAAoB,CAAC,EACnC,aAAa,EACb,SAAS,EACT,iBAAiB,EACjB,iBAAiB,EACjB,SAAS,GACV,EAAE,aAAa,WACC,YAAY,cAAc,EAAE,GAAG,CAAC,UAahD;AAED,wBAAgB,uBAAuB,CAAC,EACtC,aAAa,EACb,SAAS,EACT,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,GAClB,EAAE,gBAAgB,WACF,YAAY,cAAc,EAAE,GAAG,CAAC,UAgChD"}
|
package/dist/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).XYFlowSystem={})}(this,(function(t){"use strict";const e={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:t=>`Node type "${t}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:t=>`The old edge with id=${t} does not exist.`,error009:t=>`Marker type "${t}" doesn't exist.`,error008:(t,{id:e,sourceHandle:n,targetHandle:o})=>`Couldn't create edge for ${t} handle id: "${n?o:n}", edge id: ${e}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:t=>`Edge type "${t}" not found. Using fallback type "default".`,error012:t=>`Node with id "${t}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},n=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]];var o,r,i,a,s,u;t.ConnectionMode=void 0,(o=t.ConnectionMode||(t.ConnectionMode={})).Strict="strict",o.Loose="loose",t.PanOnScrollMode=void 0,(r=t.PanOnScrollMode||(t.PanOnScrollMode={})).Free="free",r.Vertical="vertical",r.Horizontal="horizontal",t.SelectionMode=void 0,(i=t.SelectionMode||(t.SelectionMode={})).Partial="partial",i.Full="full",t.ConnectionLineType=void 0,(a=t.ConnectionLineType||(t.ConnectionLineType={})).Bezier="default",a.Straight="straight",a.Step="step",a.SmoothStep="smoothstep",a.SimpleBezier="simplebezier",t.MarkerType=void 0,(s=t.MarkerType||(t.MarkerType={})).Arrow="arrow",s.ArrowClosed="arrowclosed",t.Position=void 0,(u=t.Position||(t.Position={})).Left="left",u.Top="top",u.Right="right",u.Bottom="bottom";const l=t=>"id"in t&&"source"in t&&"target"in t,c=(t,e=[0,0])=>{if(!t)return{position:{x:0,y:0},positionAbsolute:{x:0,y:0}};const{width:n,height:o}=C(t),r=n*e[0],i=o*e[1],a={x:t.position.x-r,y:t.position.y-i};return{position:a,positionAbsolute:"internals"in t?{x:t.internals.positionAbsolute.x-r,y:t.internals.positionAbsolute.y-i}:a}},h=(t,e={nodeOrigin:[0,0],useRelativePosition:!1})=>{if(0===t.length)return{x:0,y:0,width:0,height:0};const n=t.reduce(((t,n)=>{const o=c(n,n.origin||e.nodeOrigin);return v(t,x({...o[e.useRelativePosition?"position":"positionAbsolute"],...C(n)}))}),{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return w(n)},d=(t,e)=>{const n=new Set;return t.forEach((t=>{n.add(t.id)})),e.filter((t=>n.has(t.source)||n.has(t.target)))};function f({nodeId:t,nextPosition:n,nodeLookup:o,nodeOrigin:r=[0,0],nodeExtent:i,onError:a}){const s=o.get(t),u=s.parentId?o.get(s.parentId):void 0,{x:l,y:h}=u?c(u,u.origin||r).positionAbsolute:{x:0,y:0};let d=function(t,e){return e&&"parent"!==e?[e[0],[e[1][0]-(t.measured?.width??0),e[1][1]-(t.measured?.height??0)]]:e}(s,s.extent||i);if("parent"!==s.extent||s.expandParent)u&&$(s.extent)&&(d=[[s.extent[0][0]+l,s.extent[0][1]+h],[s.extent[1][0]+l,s.extent[1][1]+h]]);else if(u){const t=s.measured.width,e=s.measured.height,n=u.measured.width,o=u.measured.height;if(t&&e&&n&&o){const i=s.origin||r,a=l+t*i[0],u=h+e*i[1];d=[[a,u],[a+n-t,u+o-e]]}}else a?.("005",e.error005());const f=$(d)?g(n,d):n;return{position:{x:f.x-l,y:f.y-h},positionAbsolute:f}}const p=(t,e=0,n=1)=>Math.min(Math.max(t,e),n),g=(t={x:0,y:0},e)=>({x:p(t.x,e[0][0],e[1][0]),y:p(t.y,e[0][1],e[1][1])}),m=(t,e,n)=>t<e?p(Math.abs(t-e),1,50)/50:t>n?-p(Math.abs(t-n),1,50)/50:0,y=(t,e)=>[20*m(t.x,35,e.width-35),20*m(t.y,35,e.height-35)],v=(t,e)=>({x:Math.min(t.x,e.x),y:Math.min(t.y,e.y),x2:Math.max(t.x2,e.x2),y2:Math.max(t.y2,e.y2)}),x=({x:t,y:e,width:n,height:o})=>({x:t,y:e,x2:t+n,y2:e+o}),w=({x:t,y:e,x2:n,y2:o})=>({x:t,y:e,width:n-t,height:o-e}),_=(t,e=[0,0])=>{const{positionAbsolute:n}=c(t,t.origin||e);return{...n,width:t.measured?.width??t.width??0,height:t.measured?.height??t.height??0}},b=(t,e=[0,0])=>{const{positionAbsolute:n}=c(t,t.origin||e);return{...n,x2:n.x+(t.measured?.width??t.width??0),y2:n.y+(t.measured?.height??t.height??0)}},M=(t,e)=>w(v(x(t),x(e))),E=(t,e)=>{const n=Math.max(0,Math.min(t.x+t.width,e.x+e.width)-Math.max(t.x,e.x)),o=Math.max(0,Math.min(t.y+t.height,e.y+e.height)-Math.max(t.y,e.y));return Math.ceil(n*o)},P=t=>!isNaN(t)&&isFinite(t),S=(t,e)=>{},z=(t,e=[1,1])=>({x:e[0]*Math.round(t.x/e[0]),y:e[1]*Math.round(t.y/e[1])}),N=({x:t,y:e},[n,o,r],i=!1,a=[1,1])=>{const s={x:(t-n)/r,y:(e-o)/r};return i?z(s,a):s},k=({x:t,y:e},[n,o,r])=>({x:t*r+n,y:e*r+o}),A=(t,e,n,o,r,i)=>{const a=e/(t.width*(1+i)),s=n/(t.height*(1+i)),u=Math.min(a,s),l=p(u,o,r);return{x:e/2-(t.x+t.width/2)*l,y:n/2-(t.y+t.height/2)*l,zoom:l}},T=()=>"undefined"!=typeof navigator&&navigator?.userAgent?.indexOf("Mac")>=0;function $(t){return void 0!==t&&"parent"!==t}function C(t){return{width:t.measured?.width??t.width??t.initialWidth??0,height:t.measured?.height??t.height??t.initialHeight??0}}function I(t,{snapGrid:e=[0,0],snapToGrid:n=!1,transform:o}){const{x:r,y:i}=B(t),a=N({x:r,y:i},o),{x:s,y:u}=n?z(a,e):a;return{xSnapped:s,ySnapped:u,...a}}const O=t=>({width:t.offsetWidth,height:t.offsetHeight}),H=t=>t.getRootNode?.()||window?.document,X=["INPUT","SELECT","TEXTAREA"];const Y=t=>"clientX"in t,B=(t,e)=>{const n=Y(t),o=n?t.clientX:t.touches?.[0].clientX,r=n?t.clientY:t.touches?.[0].clientY;return{x:o-(e?.left??0),y:r-(e?.top??0)}},R=(t,e,n,o=[0,0])=>{const r=e.querySelectorAll(t);if(!r||!r.length)return null;const i=Array.from(r),a=e.getBoundingClientRect(),s=a.width*o[0],u=a.height*o[1];return i.map((t=>{const e=t.getBoundingClientRect();return{id:t.getAttribute("data-handleid"),position:t.getAttribute("data-handlepos"),x:(e.left-a.left-s)/n,y:(e.top-a.top-u)/n,...O(t)}}))};function D({sourceX:t,sourceY:e,targetX:n,targetY:o,sourceControlX:r,sourceControlY:i,targetControlX:a,targetControlY:s}){const u=.125*t+.375*r+.375*a+.125*n,l=.125*e+.375*i+.375*s+.125*o;return[u,l,Math.abs(u-t),Math.abs(l-e)]}function L(t,e){return t>=0?.5*t:25*e*Math.sqrt(-t)}function V({pos:e,x1:n,y1:o,x2:r,y2:i,c:a}){switch(e){case t.Position.Left:return[n-L(n-r,a),o];case t.Position.Right:return[n+L(r-n,a),o];case t.Position.Top:return[n,o-L(o-i,a)];case t.Position.Bottom:return[n,o+L(i-o,a)]}}function q({sourceX:t,sourceY:e,targetX:n,targetY:o}){const r=Math.abs(n-t)/2,i=n<t?n+r:n-r,a=Math.abs(o-e)/2;return[i,o<e?o+a:o-a,r,a]}const Z=({source:t,sourceHandle:e,target:n,targetHandle:o})=>`xy-edge__${t}${e||""}-${n}${o||""}`;const G={[t.Position.Left]:{x:-1,y:0},[t.Position.Right]:{x:1,y:0},[t.Position.Top]:{x:0,y:-1},[t.Position.Bottom]:{x:0,y:1}},j=({source:e,sourcePosition:n=t.Position.Bottom,target:o})=>n===t.Position.Left||n===t.Position.Right?e.x<o.x?{x:1,y:0}:{x:-1,y:0}:e.y<o.y?{x:0,y:1}:{x:0,y:-1},W=(t,e)=>Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2));function F(t){return t&&!(!t.internals.handleBounds&&!t.handles?.length)&&!!(t.measured.width||t.width||t.initialWidth)}function K(t){if(!t)return null;const e=[],n=[];for(const o of t)o.width=o.width??1,o.height=o.height??1,"source"===o.type?e.push(o):"target"===o.type&&n.push(o);return{source:e,target:n}}function U(e,n,o=null){const r=(o?.x??0)+(n.internals.positionAbsolute?.x??0),i=(o?.y??0)+(n.internals.positionAbsolute?.y??0),{width:a,height:s}=o??C(n);switch(e){case t.Position.Top:return[r+a/2,i];case t.Position.Right:return[r+a,i+s/2];case t.Position.Bottom:return[r+a/2,i+s];case t.Position.Left:return[r,i+s/2]}}function Q(t,e){return t&&(e?t.find((t=>t.id===e)):t[0])||null}function J(t,e){if(!t)return"";if("string"==typeof t)return t;return`${e?`${e}__`:""}${Object.keys(t).sort().map((e=>`${e}=${t[e]}`)).join("&")}`}function tt(t,e={nodeOrigin:[0,0],elevateNodesOnSelect:!0,defaults:{}},n){const o=e?.elevateNodesOnSelect?1e3:0;for(const[r,i]of t){const a=i.parentId;if(a&&!t.has(a))throw new Error(`Parent node ${a} not found`);if(a||i.internals.isParent||n?.has(r)){const s=a?t.get(a):null,{x:u,y:l,z:c}=et(i,t,{...i.position,z:(P(i.zIndex)?i.zIndex:0)+(i.selected?o:0)},s?.origin||e.nodeOrigin),h=i.internals.positionAbsolute,d=u!==h.x||l!==h.y;i.internals.positionAbsolute=d?{x:u,y:l}:h,i.internals.z=c,void 0!==n&&(i.internals.isParent=!!n?.has(r)),t.set(r,i)}}}function et(t,e,n,o=[0,0]){if(!t.parentId)return n;const r=e.get(t.parentId),{position:i}=c(r,r?.origin||o);return et(r,e,{x:(n.x??0)+i.x,y:(n.y??0)+i.y,z:(r.internals.z??0)>(n.z??0)?r.internals.z??0:n.z??0},r.origin||o)}function nt(t,e){const n=[],o=new Map;return t.forEach((t=>{const n=t.parentId;if(t.expandParent&&n){const r=e.get(n);if(r){const e=o.get(n)||_(r,t.origin),i=M(e,_(t,t.origin));o.set(n,i)}}})),o.size>0&&o.forEach(((t,o)=>{const r=e.get(o),{position:i}=c(r,r.origin),a=C(r);if(t.x<i.x||t.y<i.y){const e=Math.round(Math.abs(i.x-t.x)),r=Math.round(Math.abs(i.y-t.y));n.push({id:o,type:"position",position:{x:i.x-e,y:i.y-r}}),n.push({id:o,type:"dimensions",resizing:!0,dimensions:{width:a.width+e,height:a.height+r}})}else(a.width<t.width||a.height<t.height)&&n.push({id:o,type:"dimensions",resizing:!0,dimensions:{width:Math.max(a.width,t.width),height:Math.max(a.height,t.height)}})})),n}var ot={value:()=>{}};function rt(){for(var t,e=0,n=arguments.length,o={};e<n;++e){if(!(t=arguments[e]+"")||t in o||/[\s.]/.test(t))throw new Error("illegal type: "+t);o[t]=[]}return new it(o)}function it(t){this._=t}function at(t,e){for(var n,o=0,r=t.length;o<r;++o)if((n=t[o]).name===e)return n.value}function st(t,e,n){for(var o=0,r=t.length;o<r;++o)if(t[o].name===e){t[o]=ot,t=t.slice(0,o).concat(t.slice(o+1));break}return null!=n&&t.push({name:e,value:n}),t}it.prototype=rt.prototype={constructor:it,on:function(t,e){var n,o,r=this._,i=(o=r,(t+"").trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!o.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),a=-1,s=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<s;)if(n=(t=i[a]).type)r[n]=st(r[n],t.name,e);else if(null==e)for(n in r)r[n]=st(r[n],t.name,null);return this}for(;++a<s;)if((n=(t=i[a]).type)&&(n=at(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new it(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,o,r=new Array(n),i=0;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=0,n=(o=this._[t]).length;i<n;++i)o[i].value.apply(e,r)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)}};var ut="http://www.w3.org/1999/xhtml",lt={svg:"http://www.w3.org/2000/svg",xhtml:ut,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ct(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),lt.hasOwnProperty(e)?{space:lt[e],local:t}:t}function ht(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===ut&&e.documentElement.namespaceURI===ut?e.createElement(t):e.createElementNS(n,t)}}function dt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ft(t){var e=ct(t);return(e.local?dt:ht)(e)}function pt(){}function gt(t){return null==t?pt:function(){return this.querySelector(t)}}function mt(){return[]}function yt(t){return null==t?mt:function(){return this.querySelectorAll(t)}}function vt(t){return function(){return null==(e=t.apply(this,arguments))?[]:Array.isArray(e)?e:Array.from(e);var e}}function xt(t){return function(){return this.matches(t)}}function wt(t){return function(e){return e.matches(t)}}var _t=Array.prototype.find;function bt(){return this.firstElementChild}var Mt=Array.prototype.filter;function Et(){return Array.from(this.children)}function Pt(t){return new Array(t.length)}function St(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function zt(t,e,n,o,r,i){for(var a,s=0,u=e.length,l=i.length;s<l;++s)(a=e[s])?(a.__data__=i[s],o[s]=a):n[s]=new St(t,i[s]);for(;s<u;++s)(a=e[s])&&(r[s]=a)}function Nt(t,e,n,o,r,i,a){var s,u,l,c=new Map,h=e.length,d=i.length,f=new Array(h);for(s=0;s<h;++s)(u=e[s])&&(f[s]=l=a.call(u,u.__data__,s,e)+"",c.has(l)?r[s]=u:c.set(l,u));for(s=0;s<d;++s)l=a.call(t,i[s],s,i)+"",(u=c.get(l))?(o[s]=u,u.__data__=i[s],c.delete(l)):n[s]=new St(t,i[s]);for(s=0;s<h;++s)(u=e[s])&&c.get(f[s])===u&&(r[s]=u)}function kt(t){return t.__data__}function At(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Tt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function $t(t){return function(){this.removeAttribute(t)}}function Ct(t){return function(){this.removeAttributeNS(t.space,t.local)}}function It(t,e){return function(){this.setAttribute(t,e)}}function Ot(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Ht(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Xt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Yt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Bt(t){return function(){this.style.removeProperty(t)}}function Rt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Dt(t,e,n){return function(){var o=e.apply(this,arguments);null==o?this.style.removeProperty(t):this.style.setProperty(t,o,n)}}function Lt(t,e){return t.style.getPropertyValue(e)||Yt(t).getComputedStyle(t,null).getPropertyValue(e)}function Vt(t){return function(){delete this[t]}}function qt(t,e){return function(){this[t]=e}}function Zt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Gt(t){return t.trim().split(/^|\s+/)}function jt(t){return t.classList||new Wt(t)}function Wt(t){this._node=t,this._names=Gt(t.getAttribute("class")||"")}function Ft(t,e){for(var n=jt(t),o=-1,r=e.length;++o<r;)n.add(e[o])}function Kt(t,e){for(var n=jt(t),o=-1,r=e.length;++o<r;)n.remove(e[o])}function Ut(t){return function(){Ft(this,t)}}function Qt(t){return function(){Kt(this,t)}}function Jt(t,e){return function(){(e.apply(this,arguments)?Ft:Kt)(this,t)}}function te(){this.textContent=""}function ee(t){return function(){this.textContent=t}}function ne(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function oe(){this.innerHTML=""}function re(t){return function(){this.innerHTML=t}}function ie(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function ae(){this.nextSibling&&this.parentNode.appendChild(this)}function se(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ue(){return null}function le(){var t=this.parentNode;t&&t.removeChild(this)}function ce(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function he(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function de(t){return function(){var e=this.__on;if(e){for(var n,o=0,r=-1,i=e.length;o<i;++o)n=e[o],t.type&&n.type!==t.type||n.name!==t.name?e[++r]=n:this.removeEventListener(n.type,n.listener,n.options);++r?e.length=r:delete this.__on}}}function fe(t,e,n){return function(){var o,r=this.__on,i=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(r)for(var a=0,s=r.length;a<s;++a)if((o=r[a]).type===t.type&&o.name===t.name)return this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=n),void(o.value=e);this.addEventListener(t.type,i,n),o={type:t.type,name:t.name,value:e,listener:i,options:n},r?r.push(o):this.__on=[o]}}function pe(t,e,n){var o=Yt(t),r=o.CustomEvent;"function"==typeof r?r=new r(e,n):(r=o.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function ge(t,e){return function(){return pe(this,t,e)}}function me(t,e){return function(){return pe(this,t,e.apply(this,arguments))}}St.prototype={constructor:St,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},Wt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var ye=[null];function ve(t,e){this._groups=t,this._parents=e}function xe(){return new ve([[document.documentElement]],ye)}function we(t){return"string"==typeof t?new ve([[document.querySelector(t)]],[document.documentElement]):new ve([[t]],ye)}function _e(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=t.clientX,o.y=t.clientY,[(o=o.matrixTransform(e.getScreenCTM().inverse())).x,o.y]}if(e.getBoundingClientRect){var r=e.getBoundingClientRect();return[t.clientX-r.left-e.clientLeft,t.clientY-r.top-e.clientTop]}}return[t.pageX,t.pageY]}ve.prototype=xe.prototype={constructor:ve,select:function(t){"function"!=typeof t&&(t=gt(t));for(var e=this._groups,n=e.length,o=new Array(n),r=0;r<n;++r)for(var i,a,s=e[r],u=s.length,l=o[r]=new Array(u),c=0;c<u;++c)(i=s[c])&&(a=t.call(i,i.__data__,c,s))&&("__data__"in i&&(a.__data__=i.__data__),l[c]=a);return new ve(o,this._parents)},selectAll:function(t){t="function"==typeof t?vt(t):yt(t);for(var e=this._groups,n=e.length,o=[],r=[],i=0;i<n;++i)for(var a,s=e[i],u=s.length,l=0;l<u;++l)(a=s[l])&&(o.push(t.call(a,a.__data__,l,s)),r.push(a));return new ve(o,r)},selectChild:function(t){return this.select(null==t?bt:function(t){return function(){return _t.call(this.children,t)}}("function"==typeof t?t:wt(t)))},selectChildren:function(t){return this.selectAll(null==t?Et:function(t){return function(){return Mt.call(this.children,t)}}("function"==typeof t?t:wt(t)))},filter:function(t){"function"!=typeof t&&(t=xt(t));for(var e=this._groups,n=e.length,o=new Array(n),r=0;r<n;++r)for(var i,a=e[r],s=a.length,u=o[r]=[],l=0;l<s;++l)(i=a[l])&&t.call(i,i.__data__,l,a)&&u.push(i);return new ve(o,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,kt);var n,o=e?Nt:zt,r=this._parents,i=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var a=i.length,s=new Array(a),u=new Array(a),l=new Array(a),c=0;c<a;++c){var h=r[c],d=i[c],f=d.length,p=At(t.call(h,h&&h.__data__,c,r)),g=p.length,m=u[c]=new Array(g),y=s[c]=new Array(g);o(h,d,m,y,l[c]=new Array(f),p,e);for(var v,x,w=0,_=0;w<g;++w)if(v=m[w]){for(w>=_&&(_=w+1);!(x=y[_])&&++_<g;);v._next=x||null}}return(s=new ve(s,r))._enter=u,s._exit=l,s},enter:function(){return new ve(this._enter||this._groups.map(Pt),this._parents)},exit:function(){return new ve(this._exit||this._groups.map(Pt),this._parents)},join:function(t,e,n){var o=this.enter(),r=this,i=this.exit();return"function"==typeof t?(o=t(o))&&(o=o.selection()):o=o.append(t+""),null!=e&&(r=e(r))&&(r=r.selection()),null==n?i.remove():n(i),o&&r?o.merge(r).order():r},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,o=e._groups,r=n.length,i=o.length,a=Math.min(r,i),s=new Array(r),u=0;u<a;++u)for(var l,c=n[u],h=o[u],d=c.length,f=s[u]=new Array(d),p=0;p<d;++p)(l=c[p]||h[p])&&(f[p]=l);for(;u<r;++u)s[u]=n[u];return new ve(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var o,r=t[e],i=r.length-1,a=r[i];--i>=0;)(o=r[i])&&(a&&4^o.compareDocumentPosition(a)&&a.parentNode.insertBefore(o,a),a=o);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Tt);for(var n=this._groups,o=n.length,r=new Array(o),i=0;i<o;++i){for(var a,s=n[i],u=s.length,l=r[i]=new Array(u),c=0;c<u;++c)(a=s[c])&&(l[c]=a);l.sort(e)}return new ve(r,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var o=t[e],r=0,i=o.length;r<i;++r){var a=o[r];if(a)return a}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,o=e.length;n<o;++n)for(var r,i=e[n],a=0,s=i.length;a<s;++a)(r=i[a])&&t.call(r,r.__data__,a,i);return this},attr:function(t,e){var n=ct(t);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((null==e?n.local?Ct:$t:"function"==typeof e?n.local?Xt:Ht:n.local?Ot:It)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Bt:"function"==typeof e?Dt:Rt)(t,e,null==n?"":n)):Lt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Vt:"function"==typeof e?Zt:qt)(t,e)):this.node()[t]},classed:function(t,e){var n=Gt(t+"");if(arguments.length<2){for(var o=jt(this.node()),r=-1,i=n.length;++r<i;)if(!o.contains(n[r]))return!1;return!0}return this.each(("function"==typeof e?Jt:e?Ut:Qt)(n,e))},text:function(t){return arguments.length?this.each(null==t?te:("function"==typeof t?ne:ee)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?oe:("function"==typeof t?ie:re)(t)):this.node().innerHTML},raise:function(){return this.each(ae)},lower:function(){return this.each(se)},append:function(t){var e="function"==typeof t?t:ft(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ft(t),o=null==e?ue:"function"==typeof e?e:gt(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)}))},remove:function(){return this.each(le)},clone:function(t){return this.select(t?he:ce)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var o,r,i=function(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),a=i.length;if(!(arguments.length<2)){for(s=e?fe:de,o=0;o<a;++o)this.each(s(i[o],e,n));return this}var s=this.node().__on;if(s)for(var u,l=0,c=s.length;l<c;++l)for(o=0,u=s[l];o<a;++o)if((r=i[o]).type===u.type&&r.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?me:ge)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var o,r=t[e],i=0,a=r.length;i<a;++i)(o=r[i])&&(yield o)}};const be={passive:!1},Me={capture:!0,passive:!1};function Ee(t){t.stopImmediatePropagation()}function Pe(t){t.preventDefault(),t.stopImmediatePropagation()}function Se(t){var e=t.document.documentElement,n=we(t).on("dragstart.drag",Pe,Me);"onselectstart"in e?n.on("selectstart.drag",Pe,Me):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function ze(t,e){var n=t.document.documentElement,o=we(t).on("dragstart.drag",null);e&&(o.on("click.drag",Pe,Me),setTimeout((function(){o.on("click.drag",null)}),0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Ne=t=>()=>t;function ke(t,{sourceEvent:e,subject:n,target:o,identifier:r,active:i,x:a,y:s,dx:u,dy:l,dispatch:c}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:c}})}function Ae(t){return!t.ctrlKey&&!t.button}function Te(){return this.parentNode}function $e(t,e){return null==e?{x:t.x,y:t.y}:e}function Ce(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ie(){var t,e,n,o,r=Ae,i=Te,a=$e,s=Ce,u={},l=rt("start","drag","end"),c=0,h=0;function d(t){t.on("mousedown.drag",f).filter(s).on("touchstart.drag",m).on("touchmove.drag",y,be).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(a,s){if(!o&&r.call(this,a,s)){var u=x(this,i.call(this,a,s),a,s,"mouse");u&&(we(a.view).on("mousemove.drag",p,Me).on("mouseup.drag",g,Me),Se(a.view),Ee(a),n=!1,t=a.clientX,e=a.clientY,u("start",a))}}function p(o){if(Pe(o),!n){var r=o.clientX-t,i=o.clientY-e;n=r*r+i*i>h}u.mouse("drag",o)}function g(t){we(t.view).on("mousemove.drag mouseup.drag",null),ze(t.view,n),Pe(t),u.mouse("end",t)}function m(t,e){if(r.call(this,t,e)){var n,o,a=t.changedTouches,s=i.call(this,t,e),u=a.length;for(n=0;n<u;++n)(o=x(this,s,t,e,a[n].identifier,a[n]))&&(Ee(t),o("start",t,a[n]))}}function y(t){var e,n,o=t.changedTouches,r=o.length;for(e=0;e<r;++e)(n=u[o[e].identifier])&&(Pe(t),n("drag",t,o[e]))}function v(t){var e,n,r=t.changedTouches,i=r.length;for(o&&clearTimeout(o),o=setTimeout((function(){o=null}),500),e=0;e<i;++e)(n=u[r[e].identifier])&&(Ee(t),n("end",t,r[e]))}function x(t,e,n,o,r,i){var s,h,f,p=l.copy(),g=_e(i||n,e);if(null!=(f=a.call(t,new ke("beforestart",{sourceEvent:n,target:d,identifier:r,active:c,x:g[0],y:g[1],dx:0,dy:0,dispatch:p}),o)))return s=f.x-g[0]||0,h=f.y-g[1]||0,function n(i,a,l){var m,y=g;switch(i){case"start":u[r]=n,m=c++;break;case"end":delete u[r],--c;case"drag":g=_e(l||a,e),m=c}p.call(i,t,new ke(i,{sourceEvent:a,subject:f,target:d,identifier:r,active:m,x:g[0]+s,y:g[1]+h,dx:g[0]-y[0],dy:g[1]-y[1],dispatch:p}),o)}}return d.filter=function(t){return arguments.length?(r="function"==typeof t?t:Ne(!!t),d):r},d.container=function(t){return arguments.length?(i="function"==typeof t?t:Ne(t),d):i},d.subject=function(t){return arguments.length?(a="function"==typeof t?t:Ne(t),d):a},d.touchable=function(t){return arguments.length?(s="function"==typeof t?t:Ne(!!t),d):s},d.on=function(){var t=l.on.apply(l,arguments);return t===l?d:t},d.clickDistance=function(t){return arguments.length?(h=(t=+t)*t,d):Math.sqrt(h)},d}function Oe(t){return(e,n,o)=>t?.(e,o)}function He(t,e){if(!t.parentId)return!1;const n=e.get(t.parentId);return!!n&&(!!n.selected||He(n,e))}function Xe(t,e,n){let o=t;do{if(o?.matches(e))return!0;if(o===n)return!1;o=o.parentElement}while(o);return!1}function Ye({nodeId:t,dragItems:e,nodeLookup:n}){const o=e.map((t=>({...n.get(t.id),position:t.position,measured:{...t.measured}})));return[t?o.find((e=>e.id===t)):o[0],o]}function Be(t,e,n,o){return(e[n]||[]).reduce(((e,r)=>(`${t.id}-${r.id}-${n}`!==o&&e.push({id:r.id||null,type:n,nodeId:t.id,x:(t.internals.positionAbsolute.x??0)+r.x+r.width/2,y:(t.internals.positionAbsolute.y??0)+r.y+r.height/2}),e)),[])}function Re(t,e){return t||(e?.classList.contains("target")?"target":e?.classList.contains("source")?"source":null)}function De(t,e){let n=null;return e?n="valid":t&&!e&&(n="invalid"),n}ke.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};const Le=()=>!0;let Ve=null;function qe(e,{handle:n,connectionMode:o,fromNodeId:r,fromHandleId:i,fromType:a,doc:s,lib:u,flowId:l,isValidConnection:c=Le}){const h="target"===a,d=n?s.querySelector(`.${u}-flow__handle[data-id="${l}-${n?.nodeId}-${n?.id}-${n?.type}"]`):null,{x:f,y:p}=B(e),g=s.elementFromPoint(f,p),m=g?.classList.contains(`${u}-flow__handle`)?g:d,y={handleDomNode:m,isValid:!1,connection:null,endHandle:null};if(m){const e=Re(void 0,m),n=m.getAttribute("data-nodeid"),a=m.getAttribute("data-handleid"),s=m.classList.contains("connectable"),u=m.classList.contains("connectableend");if(!n)return y;const l={source:h?n:r,sourceHandle:h?a:i,target:h?r:n,targetHandle:h?i:a};y.connection=l;s&&u&&(o===t.ConnectionMode.Strict?h&&"source"===e||!h&&"target"===e:n!==r||a!==i)&&(y.endHandle={nodeId:n,handleId:a,type:e},y.isValid=c(l))}return y}const Ze={onPointerDown:function(t,{connectionMode:e,connectionRadius:n,handleId:o,nodeId:r,edgeUpdaterType:i,isTarget:a,domNode:s,nodeLookup:u,lib:l,autoPanOnConnect:c,flowId:h,panBy:d,cancelConnection:f,onConnectStart:p,onConnect:g,onConnectEnd:m,isValidConnection:v=Le,onEdgeUpdateEnd:x,updateConnection:w,getTransform:_,getConnectionStartHandle:b}){const M=H(t.target);let E,P=0;const{x:S,y:z}=B(t),A=M?.elementFromPoint(S,z),T=Re(i,A),$=s?.getBoundingClientRect();if(!$||!T)return;let C=B(t,$),I=!1,O=null,X=!1,Y=null;const R=function({nodeLookup:t,nodeId:e,handleId:n,handleType:o}){const r=[];for(const[,i]of t)if(i.internals.handleBounds){const t=`${e}-${n}-${o}`,a=Be(i,i.internals.handleBounds,"source",t),s=Be(i,i.internals.handleBounds,"target",t);r.push(...a,...s)}return r}({nodeLookup:u,nodeId:r,handleId:o,handleType:T});function D(){if(!c||!$)return;const[t,e]=y(C,$);d({x:t,y:e}),P=requestAnimationFrame(D)}function L(t){b()||V(t);const i=_();C=B(t,$),E=function(t,e,n){let o=[],r=1/0;for(const i of n){const n=Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2));n<=e&&(n<r?o=[i]:n===r&&o.push(i),r=n)}return o.length?1===o.length?o[0]:o.find((t=>"target"===t.type))||o[0]:null}(N(C,i,!1,[1,1]),n,R),I||(D(),I=!0);const s=qe(t,{handle:E,connectionMode:e,fromNodeId:r,fromHandleId:o,fromType:a?"target":"source",isValidConnection:v,doc:M,lib:l,flowId:h});Y=s.handleDomNode,O=s.connection,X=s.isValid,w({connectionStartHandle:Ve,connectionPosition:E&&X?k({x:E.x,y:E.y},i):C,connectionStatus:De(!!E,X),connectionEndHandle:s.endHandle})}function V(t){(E||Y)&&O&&X&&g?.(O),m?.(t),i&&x?.(t),f(),cancelAnimationFrame(P),I=!1,X=!1,O=null,Y=null,Ve=null,M.removeEventListener("mousemove",L),M.removeEventListener("mouseup",V),M.removeEventListener("touchmove",L),M.removeEventListener("touchend",V)}Ve={nodeId:r,handleId:o,type:T},w({connectionPosition:C,connectionStatus:null,connectionStartHandle:Ve,connectionEndHandle:null}),p?.(t,{nodeId:r,handleId:o,handleType:T}),M.addEventListener("mousemove",L),M.addEventListener("mouseup",V),M.addEventListener("touchmove",L),M.addEventListener("touchend",V)},isValid:qe};function Ge(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function je(t,e){var n=Object.create(t.prototype);for(var o in e)n[o]=e[o];return n}function We(){}var Fe=.7,Ke=1/Fe,Ue="\\s*([+-]?\\d+)\\s*",Qe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Je="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",tn=/^#([0-9a-f]{3,8})$/,en=new RegExp(`^rgb\\(${Ue},${Ue},${Ue}\\)$`),nn=new RegExp(`^rgb\\(${Je},${Je},${Je}\\)$`),on=new RegExp(`^rgba\\(${Ue},${Ue},${Ue},${Qe}\\)$`),rn=new RegExp(`^rgba\\(${Je},${Je},${Je},${Qe}\\)$`),an=new RegExp(`^hsl\\(${Qe},${Je},${Je}\\)$`),sn=new RegExp(`^hsla\\(${Qe},${Je},${Je},${Qe}\\)$`),un={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function ln(){return this.rgb().formatHex()}function cn(){return this.rgb().formatRgb()}function hn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=tn.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?dn(e):3===n?new gn(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?fn(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?fn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=en.exec(t))?new gn(e[1],e[2],e[3],1):(e=nn.exec(t))?new gn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=on.exec(t))?fn(e[1],e[2],e[3],e[4]):(e=rn.exec(t))?fn(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=an.exec(t))?_n(e[1],e[2]/100,e[3]/100,1):(e=sn.exec(t))?_n(e[1],e[2]/100,e[3]/100,e[4]):un.hasOwnProperty(t)?dn(un[t]):"transparent"===t?new gn(NaN,NaN,NaN,0):null}function dn(t){return new gn(t>>16&255,t>>8&255,255&t,1)}function fn(t,e,n,o){return o<=0&&(t=e=n=NaN),new gn(t,e,n,o)}function pn(t,e,n,o){return 1===arguments.length?((r=t)instanceof We||(r=hn(r)),r?new gn((r=r.rgb()).r,r.g,r.b,r.opacity):new gn):new gn(t,e,n,null==o?1:o);var r}function gn(t,e,n,o){this.r=+t,this.g=+e,this.b=+n,this.opacity=+o}function mn(){return`#${wn(this.r)}${wn(this.g)}${wn(this.b)}`}function yn(){const t=vn(this.opacity);return`${1===t?"rgb(":"rgba("}${xn(this.r)}, ${xn(this.g)}, ${xn(this.b)}${1===t?")":`, ${t})`}`}function vn(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function xn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function wn(t){return((t=xn(t))<16?"0":"")+t.toString(16)}function _n(t,e,n,o){return o<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Mn(t,e,n,o)}function bn(t){if(t instanceof Mn)return new Mn(t.h,t.s,t.l,t.opacity);if(t instanceof We||(t=hn(t)),!t)return new Mn;if(t instanceof Mn)return t;var e=(t=t.rgb()).r/255,n=t.g/255,o=t.b/255,r=Math.min(e,n,o),i=Math.max(e,n,o),a=NaN,s=i-r,u=(i+r)/2;return s?(a=e===i?(n-o)/s+6*(n<o):n===i?(o-e)/s+2:(e-n)/s+4,s/=u<.5?i+r:2-i-r,a*=60):s=u>0&&u<1?0:a,new Mn(a,s,u,t.opacity)}function Mn(t,e,n,o){this.h=+t,this.s=+e,this.l=+n,this.opacity=+o}function En(t){return(t=(t||0)%360)<0?t+360:t}function Pn(t){return Math.max(0,Math.min(1,t||0))}function Sn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Ge(We,hn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:ln,formatHex:ln,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return bn(this).formatHsl()},formatRgb:cn,toString:cn}),Ge(gn,pn,je(We,{brighter(t){return t=null==t?Ke:Math.pow(Ke,t),new gn(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Fe:Math.pow(Fe,t),new gn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new gn(xn(this.r),xn(this.g),xn(this.b),vn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:mn,formatHex:mn,formatHex8:function(){return`#${wn(this.r)}${wn(this.g)}${wn(this.b)}${wn(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:yn,toString:yn})),Ge(Mn,(function(t,e,n,o){return 1===arguments.length?bn(t):new Mn(t,e,n,null==o?1:o)}),je(We,{brighter(t){return t=null==t?Ke:Math.pow(Ke,t),new Mn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Fe:Math.pow(Fe,t),new Mn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*e,r=2*n-o;return new gn(Sn(t>=240?t-240:t+120,r,o),Sn(t,r,o),Sn(t<120?t+240:t-120,r,o),this.opacity)},clamp(){return new Mn(En(this.h),Pn(this.s),Pn(this.l),vn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=vn(this.opacity);return`${1===t?"hsl(":"hsla("}${En(this.h)}, ${100*Pn(this.s)}%, ${100*Pn(this.l)}%${1===t?")":`, ${t})`}`}}));var zn=t=>()=>t;function Nn(t){return 1==(t=+t)?kn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(o){return Math.pow(t+o*e,n)}}(e,n,t):zn(isNaN(e)?n:e)}}function kn(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):zn(isNaN(t)?e:t)}var An=function t(e){var n=Nn(e);function o(t,e){var o=n((t=pn(t)).r,(e=pn(e)).r),r=n(t.g,e.g),i=n(t.b,e.b),a=kn(t.opacity,e.opacity);return function(e){return t.r=o(e),t.g=r(e),t.b=i(e),t.opacity=a(e),t+""}}return o.gamma=t,o}(1);function Tn(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var $n=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Cn=new RegExp($n.source,"g");function In(t,e){var n,o,r,i=$n.lastIndex=Cn.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=$n.exec(t))&&(o=Cn.exec(e));)(r=o.index)>i&&(r=e.slice(i,r),s[a]?s[a]+=r:s[++a]=r),(n=n[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,u.push({i:a,x:Tn(n,o)})),i=Cn.lastIndex;return i<e.length&&(r=e.slice(i),s[a]?s[a]+=r:s[++a]=r),s.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,o=0;o<e;++o)s[(n=u[o]).i]=n.x(t);return s.join("")})}var On,Hn=180/Math.PI,Xn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Yn(t,e,n,o,r,i){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*o)&&(n-=t*u,o-=e*u),(s=Math.sqrt(n*n+o*o))&&(n/=s,o/=s,u/=s),t*o<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:r,translateY:i,rotate:Math.atan2(e,t)*Hn,skewX:Math.atan(u)*Hn,scaleX:a,scaleY:s}}function Bn(t,e,n,o){function r(t){return t.length?t.pop()+" ":""}return function(i,a){var s=[],u=[];return i=t(i),a=t(a),function(t,o,r,i,a,s){if(t!==r||o!==i){var u=a.push("translate(",null,e,null,n);s.push({i:u-4,x:Tn(t,r)},{i:u-2,x:Tn(o,i)})}else(r||i)&&a.push("translate("+r+e+i+n)}(i.translateX,i.translateY,a.translateX,a.translateY,s,u),function(t,e,n,i){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),i.push({i:n.push(r(n)+"rotate(",null,o)-2,x:Tn(t,e)})):e&&n.push(r(n)+"rotate("+e+o)}(i.rotate,a.rotate,s,u),function(t,e,n,i){t!==e?i.push({i:n.push(r(n)+"skewX(",null,o)-2,x:Tn(t,e)}):e&&n.push(r(n)+"skewX("+e+o)}(i.skewX,a.skewX,s,u),function(t,e,n,o,i,a){if(t!==n||e!==o){var s=i.push(r(i)+"scale(",null,",",null,")");a.push({i:s-4,x:Tn(t,n)},{i:s-2,x:Tn(e,o)})}else 1===n&&1===o||i.push(r(i)+"scale("+n+","+o+")")}(i.scaleX,i.scaleY,a.scaleX,a.scaleY,s,u),i=a=null,function(t){for(var e,n=-1,o=u.length;++n<o;)s[(e=u[n]).i]=e.x(t);return s.join("")}}}var Rn=Bn((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Xn:Yn(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),Dn=Bn((function(t){return null==t?Xn:(On||(On=document.createElementNS("http://www.w3.org/2000/svg","g")),On.setAttribute("transform",t),(t=On.transform.baseVal.consolidate())?Yn((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Xn)}),", ",")",")");function Ln(t){return((t=Math.exp(t))+1/t)/2}var Vn,qn,Zn=function t(e,n,o){function r(t,r){var i,a,s=t[0],u=t[1],l=t[2],c=r[0],h=r[1],d=r[2],f=c-s,p=h-u,g=f*f+p*p;if(g<1e-12)a=Math.log(d/l)/e,i=function(t){return[s+t*f,u+t*p,l*Math.exp(e*t*a)]};else{var m=Math.sqrt(g),y=(d*d-l*l+o*g)/(2*l*n*m),v=(d*d-l*l-o*g)/(2*d*n*m),x=Math.log(Math.sqrt(y*y+1)-y),w=Math.log(Math.sqrt(v*v+1)-v);a=(w-x)/e,i=function(t){var o,r=t*a,i=Ln(x),c=l/(n*m)*(i*(o=e*r+x,((o=Math.exp(2*o))-1)/(o+1))-function(t){return((t=Math.exp(t))-1/t)/2}(x));return[s+c*f,u+c*p,l*i/Ln(e*r+x)]}}return i.duration=1e3*a*e/Math.SQRT2,i}return r.rho=function(e){var n=Math.max(.001,+e),o=n*n;return t(n,o,o*o)},r}(Math.SQRT2,2,4),Gn=0,jn=0,Wn=0,Fn=1e3,Kn=0,Un=0,Qn=0,Jn="object"==typeof performance&&performance.now?performance:Date,to="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function eo(){return Un||(to(no),Un=Jn.now()+Qn)}function no(){Un=0}function oo(){this._call=this._time=this._next=null}function ro(t,e,n){var o=new oo;return o.restart(t,e,n),o}function io(){Un=(Kn=Jn.now())+Qn,Gn=jn=0;try{!function(){eo(),++Gn;for(var t,e=Vn;e;)(t=Un-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Gn}()}finally{Gn=0,function(){var t,e,n=Vn,o=1/0;for(;n;)n._call?(o>n._time&&(o=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Vn=e);qn=t,so(o)}(),Un=0}}function ao(){var t=Jn.now(),e=t-Kn;e>Fn&&(Qn-=e,Kn=t)}function so(t){Gn||(jn&&(jn=clearTimeout(jn)),t-Un>24?(t<1/0&&(jn=setTimeout(io,t-Jn.now()-Qn)),Wn&&(Wn=clearInterval(Wn))):(Wn||(Kn=Jn.now(),Wn=setInterval(ao,Fn)),Gn=1,to(io)))}function uo(t,e,n){var o=new oo;return e=null==e?0:+e,o.restart((n=>{o.stop(),t(n+e)}),e,n),o}oo.prototype=ro.prototype={constructor:oo,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?eo():+n)+(null==e?0:+e),this._next||qn===this||(qn?qn._next=this:Vn=this,qn=this),this._call=t,this._time=n,so()},stop:function(){this._call&&(this._call=null,this._time=1/0,so())}};var lo=rt("start","end","cancel","interrupt"),co=[],ho=0,fo=1,po=2,go=3,mo=4,yo=5,vo=6;function xo(t,e,n,o,r,i){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var o,r=t.__transition;function i(t){n.state=fo,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}function a(i){var l,c,h,d;if(n.state!==fo)return u();for(l in r)if((d=r[l]).name===n.name){if(d.state===go)return uo(a);d.state===mo?(d.state=vo,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[l]):+l<e&&(d.state=vo,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[l])}if(uo((function(){n.state===go&&(n.state=mo,n.timer.restart(s,n.delay,n.time),s(i))})),n.state=po,n.on.call("start",t,t.__data__,n.index,n.group),n.state===po){for(n.state=go,o=new Array(h=n.tween.length),l=0,c=-1;l<h;++l)(d=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(o[++c]=d);o.length=c+1}}function s(e){for(var r=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(u),n.state=yo,1),i=-1,a=o.length;++i<a;)o[i].call(t,r);n.state===yo&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){for(var o in n.state=vo,n.timer.stop(),delete r[e],r)return;delete t.__transition}r[e]=n,n.timer=ro(i,0,n.time)}(t,n,{name:e,index:o,group:r,on:lo,tween:co,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:ho})}function wo(t,e){var n=bo(t,e);if(n.state>ho)throw new Error("too late; already scheduled");return n}function _o(t,e){var n=bo(t,e);if(n.state>go)throw new Error("too late; already running");return n}function bo(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Mo(t,e){var n,o,r,i=t.__transition,a=!0;if(i){for(r in e=null==e?null:e+"",i)(n=i[r]).name===e?(o=n.state>po&&n.state<yo,n.state=vo,n.timer.stop(),n.on.call(o?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete i[r]):a=!1;a&&delete t.__transition}}function Eo(t,e){var n,o;return function(){var r=_o(this,t),i=r.tween;if(i!==n)for(var a=0,s=(o=n=i).length;a<s;++a)if(o[a].name===e){(o=o.slice()).splice(a,1);break}r.tween=o}}function Po(t,e,n){var o,r;if("function"!=typeof n)throw new Error;return function(){var i=_o(this,t),a=i.tween;if(a!==o){r=(o=a).slice();for(var s={name:e,value:n},u=0,l=r.length;u<l;++u)if(r[u].name===e){r[u]=s;break}u===l&&r.push(s)}i.tween=r}}function So(t,e,n){var o=t._id;return t.each((function(){var t=_o(this,o);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return bo(t,o).value[e]}}function zo(t,e){var n;return("number"==typeof e?Tn:e instanceof hn?An:(n=hn(e))?(e=n,An):In)(t,e)}function No(t){return function(){this.removeAttribute(t)}}function ko(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ao(t,e,n){var o,r,i=n+"";return function(){var a=this.getAttribute(t);return a===i?null:a===o?r:r=e(o=a,n)}}function To(t,e,n){var o,r,i=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===o?r:r=e(o=a,n)}}function $o(t,e,n){var o,r,i;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttribute(t))===(s=u+"")?null:a===o&&s===r?i:(r=s,i=e(o=a,u));this.removeAttribute(t)}}function Co(t,e,n){var o,r,i;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttributeNS(t.space,t.local))===(s=u+"")?null:a===o&&s===r?i:(r=s,i=e(o=a,u));this.removeAttributeNS(t.space,t.local)}}function Io(t,e){var n,o;function r(){var r=e.apply(this,arguments);return r!==o&&(n=(o=r)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,r)),n}return r._value=e,r}function Oo(t,e){var n,o;function r(){var r=e.apply(this,arguments);return r!==o&&(n=(o=r)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,r)),n}return r._value=e,r}function Ho(t,e){return function(){wo(this,t).delay=+e.apply(this,arguments)}}function Xo(t,e){return e=+e,function(){wo(this,t).delay=e}}function Yo(t,e){return function(){_o(this,t).duration=+e.apply(this,arguments)}}function Bo(t,e){return e=+e,function(){_o(this,t).duration=e}}var Ro=xe.prototype.constructor;function Do(t){return function(){this.style.removeProperty(t)}}var Lo=0;function Vo(t,e,n,o){this._groups=t,this._parents=e,this._name=n,this._id=o}function qo(){return++Lo}var Zo=xe.prototype;Vo.prototype={constructor:Vo,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=gt(t));for(var o=this._groups,r=o.length,i=new Array(r),a=0;a<r;++a)for(var s,u,l=o[a],c=l.length,h=i[a]=new Array(c),d=0;d<c;++d)(s=l[d])&&(u=t.call(s,s.__data__,d,l))&&("__data__"in s&&(u.__data__=s.__data__),h[d]=u,xo(h[d],e,n,d,h,bo(s,n)));return new Vo(i,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=yt(t));for(var o=this._groups,r=o.length,i=[],a=[],s=0;s<r;++s)for(var u,l=o[s],c=l.length,h=0;h<c;++h)if(u=l[h]){for(var d,f=t.call(u,u.__data__,h,l),p=bo(u,n),g=0,m=f.length;g<m;++g)(d=f[g])&&xo(d,e,n,g,f,p);i.push(f),a.push(u)}return new Vo(i,a,e,n)},selectChild:Zo.selectChild,selectChildren:Zo.selectChildren,filter:function(t){"function"!=typeof t&&(t=xt(t));for(var e=this._groups,n=e.length,o=new Array(n),r=0;r<n;++r)for(var i,a=e[r],s=a.length,u=o[r]=[],l=0;l<s;++l)(i=a[l])&&t.call(i,i.__data__,l,a)&&u.push(i);return new Vo(o,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,o=e.length,r=n.length,i=Math.min(o,r),a=new Array(o),s=0;s<i;++s)for(var u,l=e[s],c=n[s],h=l.length,d=a[s]=new Array(h),f=0;f<h;++f)(u=l[f]||c[f])&&(d[f]=u);for(;s<o;++s)a[s]=e[s];return new Vo(a,this._parents,this._name,this._id)},selection:function(){return new Ro(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=qo(),o=this._groups,r=o.length,i=0;i<r;++i)for(var a,s=o[i],u=s.length,l=0;l<u;++l)if(a=s[l]){var c=bo(a,e);xo(a,t,n,l,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Vo(o,this._parents,t,n)},call:Zo.call,nodes:Zo.nodes,node:Zo.node,size:Zo.size,empty:Zo.empty,each:Zo.each,on:function(t,e){var n=this._id;return arguments.length<2?bo(this.node(),n).on.on(t):this.each(function(t,e,n){var o,r,i=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?wo:_o;return function(){var a=i(this,t),s=a.on;s!==o&&(r=(o=s).copy()).on(e,n),a.on=r}}(n,t,e))},attr:function(t,e){var n=ct(t),o="transform"===n?Dn:zo;return this.attrTween(t,"function"==typeof e?(n.local?Co:$o)(n,o,So(this,"attr."+t,e)):null==e?(n.local?ko:No)(n):(n.local?To:Ao)(n,o,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var o=ct(t);return this.tween(n,(o.local?Io:Oo)(o,e))},style:function(t,e,n){var o="transform"==(t+="")?Rn:zo;return null==e?this.styleTween(t,function(t,e){var n,o,r;return function(){var i=Lt(this,t),a=(this.style.removeProperty(t),Lt(this,t));return i===a?null:i===n&&a===o?r:r=e(n=i,o=a)}}(t,o)).on("end.style."+t,Do(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var o,r,i;return function(){var a=Lt(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=Lt(this,t)),a===u?null:a===o&&u===r?i:(r=u,i=e(o=a,s))}}(t,o,So(this,"style."+t,e))).each(function(t,e){var n,o,r,i,a="style."+e,s="end."+a;return function(){var u=_o(this,t),l=u.on,c=null==u.value[a]?i||(i=Do(e)):void 0;l===n&&r===c||(o=(n=l).copy()).on(s,r=c),u.on=o}}(this._id,t)):this.styleTween(t,function(t,e,n){var o,r,i=n+"";return function(){var a=Lt(this,t);return a===i?null:a===o?r:r=e(o=a,n)}}(t,o,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var o="style."+(t+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(null==e)return this.tween(o,null);if("function"!=typeof e)throw new Error;return this.tween(o,function(t,e,n){var o,r;function i(){var i=e.apply(this,arguments);return i!==r&&(o=(r=i)&&function(t,e,n){return function(o){this.style.setProperty(t,e.call(this,o),n)}}(t,i,n)),o}return i._value=e,i}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(So(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function o(){var o=t.apply(this,arguments);return o!==n&&(e=(n=o)&&function(t){return function(e){this.textContent=t.call(this,e)}}(o)),e}return o._value=t,o}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var o,r=bo(this.node(),n).tween,i=0,a=r.length;i<a;++i)if((o=r[i]).name===t)return o.value;return null}return this.each((null==e?Eo:Po)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Ho:Xo)(e,t)):bo(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Yo:Bo)(e,t)):bo(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){_o(this,t).ease=e}}(e,t)):bo(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;_o(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,o=n._id,r=n.size();return new Promise((function(i,a){var s={value:a},u={value:function(){0==--r&&i()}};n.each((function(){var n=_o(this,o),r=n.on;r!==t&&((e=(t=r).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),n.on=e})),0===r&&i()}))},[Symbol.iterator]:Zo[Symbol.iterator]};var Go={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function jo(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}xe.prototype.interrupt=function(t){return this.each((function(){Mo(this,t)}))},xe.prototype.transition=function(t){var e,n;t instanceof Vo?(e=t._id,t=t._name):(e=qo(),(n=Go).time=eo(),t=null==t?null:t+"");for(var o=this._groups,r=o.length,i=0;i<r;++i)for(var a,s=o[i],u=s.length,l=0;l<u;++l)(a=s[l])&&xo(a,t,e,l,s,n||jo(a,e));return new Vo(o,this._parents,t,e)};var Wo=t=>()=>t;function Fo(t,{sourceEvent:e,target:n,transform:o,dispatch:r}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:r}})}function Ko(t,e,n){this.k=t,this.x=e,this.y=n}Ko.prototype={constructor:Ko,scale:function(t){return 1===t?this:new Ko(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Ko(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Uo=new Ko(1,0,0);function Qo(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Uo;return t.__zoom}function Jo(t){t.stopImmediatePropagation()}function tr(t){t.preventDefault(),t.stopImmediatePropagation()}function er(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function nr(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function or(){return this.__zoom||Uo}function rr(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function ir(){return navigator.maxTouchPoints||"ontouchstart"in this}function ar(t,e,n){var o=t.invertX(e[0][0])-n[0][0],r=t.invertX(e[1][0])-n[1][0],i=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(r>o?(o+r)/2:Math.min(0,o)||Math.max(0,r),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}function sr(){var t,e,n,o=er,r=nr,i=ar,a=rr,s=ir,u=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],c=250,h=Zn,d=rt("start","zoom","end"),f=500,p=150,g=0,m=10;function y(t){t.property("__zoom",or).on("wheel.zoom",E,{passive:!1}).on("mousedown.zoom",P).on("dblclick.zoom",S).filter(s).on("touchstart.zoom",z).on("touchmove.zoom",N).on("touchend.zoom touchcancel.zoom",k).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(t,e){return(e=Math.max(u[0],Math.min(u[1],e)))===t.k?t:new Ko(e,t.x,t.y)}function x(t,e,n){var o=e[0]-n[0]*t.k,r=e[1]-n[1]*t.k;return o===t.x&&r===t.y?t:new Ko(t.k,o,r)}function w(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function _(t,e,n,o){t.on("start.zoom",(function(){b(this,arguments).event(o).start()})).on("interrupt.zoom end.zoom",(function(){b(this,arguments).event(o).end()})).tween("zoom",(function(){var t=this,i=arguments,a=b(t,i).event(o),s=r.apply(t,i),u=null==n?w(s):"function"==typeof n?n.apply(t,i):n,l=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),c=t.__zoom,d="function"==typeof e?e.apply(t,i):e,f=h(c.invert(u).concat(l/c.k),d.invert(u).concat(l/d.k));return function(t){if(1===t)t=d;else{var e=f(t),n=l/e[2];t=new Ko(n,u[0]-e[0]*n,u[1]-e[1]*n)}a.zoom(null,t)}}))}function b(t,e,n){return!n&&t.__zooming||new M(t,e)}function M(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=r.apply(t,e),this.taps=0}function E(t,...e){if(o.apply(this,arguments)){var n=b(this,e).event(t),r=this.__zoom,s=Math.max(u[0],Math.min(u[1],r.k*Math.pow(2,a.apply(this,arguments)))),c=_e(t);if(n.wheel)n.mouse[0][0]===c[0]&&n.mouse[0][1]===c[1]||(n.mouse[1]=r.invert(n.mouse[0]=c)),clearTimeout(n.wheel);else{if(r.k===s)return;n.mouse=[c,r.invert(c)],Mo(this),n.start()}tr(t),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),p),n.zoom("mouse",i(x(v(r,s),n.mouse[0],n.mouse[1]),n.extent,l))}}function P(t,...e){if(!n&&o.apply(this,arguments)){var r=t.currentTarget,a=b(this,e,!0).event(t),s=we(t.view).on("mousemove.zoom",(function(t){if(tr(t),!a.moved){var e=t.clientX-c,n=t.clientY-h;a.moved=e*e+n*n>g}a.event(t).zoom("mouse",i(x(a.that.__zoom,a.mouse[0]=_e(t,r),a.mouse[1]),a.extent,l))}),!0).on("mouseup.zoom",(function(t){s.on("mousemove.zoom mouseup.zoom",null),ze(t.view,a.moved),tr(t),a.event(t).end()}),!0),u=_e(t,r),c=t.clientX,h=t.clientY;Se(t.view),Jo(t),a.mouse=[u,this.__zoom.invert(u)],Mo(this),a.start()}}function S(t,...e){if(o.apply(this,arguments)){var n=this.__zoom,a=_e(t.changedTouches?t.changedTouches[0]:t,this),s=n.invert(a),u=n.k*(t.shiftKey?.5:2),h=i(x(v(n,u),a,s),r.apply(this,e),l);tr(t),c>0?we(this).transition().duration(c).call(_,h,a,t):we(this).call(y.transform,h,a,t)}}function z(n,...r){if(o.apply(this,arguments)){var i,a,s,u,l=n.touches,c=l.length,h=b(this,r,n.changedTouches.length===c).event(n);for(Jo(n),a=0;a<c;++a)u=[u=_e(s=l[a],this),this.__zoom.invert(u),s.identifier],h.touch0?h.touch1||h.touch0[2]===u[2]||(h.touch1=u,h.taps=0):(h.touch0=u,i=!0,h.taps=1+!!t);t&&(t=clearTimeout(t)),i&&(h.taps<2&&(e=u[0],t=setTimeout((function(){t=null}),f)),Mo(this),h.start())}}function N(t,...e){if(this.__zooming){var n,o,r,a,s=b(this,e).event(t),u=t.changedTouches,c=u.length;for(tr(t),n=0;n<c;++n)r=_e(o=u[n],this),s.touch0&&s.touch0[2]===o.identifier?s.touch0[0]=r:s.touch1&&s.touch1[2]===o.identifier&&(s.touch1[0]=r);if(o=s.that.__zoom,s.touch1){var h=s.touch0[0],d=s.touch0[1],f=s.touch1[0],p=s.touch1[1],g=(g=f[0]-h[0])*g+(g=f[1]-h[1])*g,m=(m=p[0]-d[0])*m+(m=p[1]-d[1])*m;o=v(o,Math.sqrt(g/m)),r=[(h[0]+f[0])/2,(h[1]+f[1])/2],a=[(d[0]+p[0])/2,(d[1]+p[1])/2]}else{if(!s.touch0)return;r=s.touch0[0],a=s.touch0[1]}s.zoom("touch",i(x(o,r,a),s.extent,l))}}function k(t,...o){if(this.__zooming){var r,i,a=b(this,o).event(t),s=t.changedTouches,u=s.length;for(Jo(t),n&&clearTimeout(n),n=setTimeout((function(){n=null}),f),r=0;r<u;++r)i=s[r],a.touch0&&a.touch0[2]===i.identifier?delete a.touch0:a.touch1&&a.touch1[2]===i.identifier&&delete a.touch1;if(a.touch1&&!a.touch0&&(a.touch0=a.touch1,delete a.touch1),a.touch0)a.touch0[1]=this.__zoom.invert(a.touch0[0]);else if(a.end(),2===a.taps&&(i=_e(i,this),Math.hypot(e[0]-i[0],e[1]-i[1])<m)){var l=we(this).on("dblclick.zoom");l&&l.apply(this,arguments)}}}return y.transform=function(t,e,n,o){var r=t.selection?t.selection():t;r.property("__zoom",or),t!==r?_(t,e,n,o):r.interrupt().each((function(){b(this,arguments).event(o).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},y.scaleBy=function(t,e,n,o){y.scaleTo(t,(function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)}),n,o)},y.scaleTo=function(t,e,n,o){y.transform(t,(function(){var t=r.apply(this,arguments),o=this.__zoom,a=null==n?w(t):"function"==typeof n?n.apply(this,arguments):n,s=o.invert(a),u="function"==typeof e?e.apply(this,arguments):e;return i(x(v(o,u),a,s),t,l)}),n,o)},y.translateBy=function(t,e,n,o){y.transform(t,(function(){return i(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),r.apply(this,arguments),l)}),null,o)},y.translateTo=function(t,e,n,o,a){y.transform(t,(function(){var t=r.apply(this,arguments),a=this.__zoom,s=null==o?w(t):"function"==typeof o?o.apply(this,arguments):o;return i(Uo.translate(s[0],s[1]).scale(a.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,l)}),o,a)},M.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var e=we(this.that).datum();d.call(t,this.that,new Fo(t,{sourceEvent:this.sourceEvent,target:y,type:t,transform:this.that.__zoom,dispatch:d}),e)}},y.wheelDelta=function(t){return arguments.length?(a="function"==typeof t?t:Wo(+t),y):a},y.filter=function(t){return arguments.length?(o="function"==typeof t?t:Wo(!!t),y):o},y.touchable=function(t){return arguments.length?(s="function"==typeof t?t:Wo(!!t),y):s},y.extent=function(t){return arguments.length?(r="function"==typeof t?t:Wo([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),y):r},y.scaleExtent=function(t){return arguments.length?(u[0]=+t[0],u[1]=+t[1],y):[u[0],u[1]]},y.translateExtent=function(t){return arguments.length?(l[0][0]=+t[0][0],l[1][0]=+t[1][0],l[0][1]=+t[0][1],l[1][1]=+t[1][1],y):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},y.constrain=function(t){return arguments.length?(i=t,y):i},y.duration=function(t){return arguments.length?(c=+t,y):c},y.interpolate=function(t){return arguments.length?(h=t,y):h},y.on=function(){var t=d.on.apply(d,arguments);return t===d?y:t},y.clickDistance=function(t){return arguments.length?(g=(t=+t)*t,y):Math.sqrt(g)},y.tapDistance=function(t){return arguments.length?(m=+t,y):m},y}Qo.prototype=Ko.prototype;const ur=(t,e)=>t.x!==e.x||t.y!==e.y||t.zoom!==e.k,lr=t=>({x:t.x,y:t.y,zoom:t.k}),cr=({x:t,y:e,zoom:n})=>Uo.translate(t,e).scale(n),hr=(t,e)=>t.target.closest(`.${e}`),dr=(t,e)=>2===e&&Array.isArray(t)&&t.includes(2),fr=(t,e=0)=>"number"==typeof e&&e>0?t.transition().duration(e):t,pr=t=>{const e=t.ctrlKey&&T()?10:1;return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*e};var gr;t.ResizeControlVariant=void 0,(gr=t.ResizeControlVariant||(t.ResizeControlVariant={})).Line="line",gr.Handle="handle";function mr(t,e){return Math.max(0,e-t)}function yr(t,e){return Math.max(0,t-e)}function vr(t,e,n){return Math.max(0,e-t,t-n)}function xr(t,e){return t?!e:e}const wr={width:0,height:0,x:0,y:0},_r={...wr,pointerX:0,pointerY:0,aspectRatio:1},br={x:0,y:0,width:0,height:0,isXPosChange:!1,isYPosChange:!1,isWidthChange:!1,isHeightChange:!1};function Mr(t,e,n){const o=e.position.x+t.position.x,r=e.position.y+t.position.y,i=t.measured.width??0,a=t.measured.height??0,s=n[0]*i,u=n[1]*a;return[[o-s,r-u],[o+i-s,r+a-u]]}t.XYDrag=function({onNodeMouseDown:t,getStoreItems:e,onDragStart:n,onDrag:o,onDragStop:r}){let i={x:null,y:null},a=0,s=[],u=!1,l={x:0,y:0},c=null,d=!1,p=null;return{update:function({noDragClassName:g,handleSelector:m,domNode:v,isSelectable:w,nodeId:_}){function b({x:t,y:n},r){const{nodeLookup:a,nodeExtent:u,snapGrid:l,snapToGrid:c,nodeOrigin:d,onNodeDrag:p,onSelectionDrag:g,onError:m,updateNodePositions:y}=e();i={x:t,y:n};let v=!1,w={x:0,y:0,x2:0,y2:0};if(s.length>1&&u){const t=h(s,{nodeOrigin:d});w=x(t)}if(s=s.map((e=>{let o={x:t-e.distance.x,y:n-e.distance.y};c&&(o=z(o,l));let r=[[u[0][0],u[0][1]],[u[1][0],u[1][1]]];if(s.length>1&&u&&!e.extent){const{positionAbsolute:t}=e.internals,n=t.x-w.x+u[0][0],o=t.x+(e.measured?.width??0)-w.x2+u[1][0];r=[[n,t.y-w.y+u[0][1]],[o,t.y+(e.measured?.height??0)-w.y2+u[1][1]]]}const{position:i,positionAbsolute:h}=f({nodeId:e.id,nextPosition:o,nodeLookup:a,nodeExtent:r,nodeOrigin:d,onError:m});return v=v||e.position.x!==i.x||e.position.y!==i.y,e.position=i,e.internals.positionAbsolute=h,e})),v&&(y(s,!0),r&&(o||p||!_&&g))){const[t,e]=Ye({nodeId:_,dragItems:s,nodeLookup:a});if(o?.(r,s,t,e),p?.(r,t,e),!_){Oe(g)(r,t,e)}}}function M(){if(!c)return;const[t,n]=y(l,c);if(0!==t||0!==n){const{transform:o,panBy:r}=e();i.x=(i.x??0)-t/o[2],i.y=(i.y??0)-n/o[2],r({x:t,y:n})&&b(i,null)}a=requestAnimationFrame(M)}function E(o){const{nodeLookup:r,multiSelectionActive:a,nodesDraggable:u,transform:l,snapGrid:c,snapToGrid:h,selectNodesOnDrag:f,onNodeDragStart:p,onSelectionDragStart:g,unselectNodesAndEdges:m}=e();d=!0,f&&w||a||!_||r.get(_)?.selected||m(),w&&f&&_&&t?.(_);const y=I(o.sourceEvent,{transform:l,snapGrid:c,snapToGrid:h});if(i=y,s=function(t,e,n,o){const r=[];for(const[i,a]of t)if((a.selected||a.id===o)&&(!a.parentId||!He(a,t))&&(a.draggable||e&&void 0===a.draggable)){const e=t.get(i);r.push({id:e.id,position:e.position||{x:0,y:0},distance:{x:n.x-(e.internals.positionAbsolute?.x??0),y:n.y-(e.internals.positionAbsolute?.y??0)},extent:e.extent,parentId:e.parentId,origin:e.origin,expandParent:e.expandParent,internals:{positionAbsolute:e.internals.positionAbsolute||{x:0,y:0}},measured:{width:e.measured.width||0,height:e.measured.height||0}})}return r}(r,u,y,_),s.length>0&&(n||p||!_&&g)){const[t,e]=Ye({nodeId:_,dragItems:s,nodeLookup:r});if(n?.(o.sourceEvent,s,t,e),p?.(o.sourceEvent,t,e),!_){Oe(g)(o.sourceEvent,t,e)}}}p=we(v);const P=Ie().on("start",(t=>{const{domNode:n,nodeDragThreshold:o,transform:r,snapGrid:a,snapToGrid:s}=e();0===o&&E(t);const u=I(t.sourceEvent,{transform:r,snapGrid:a,snapToGrid:s});i=u,c=n?.getBoundingClientRect()||null,l=B(t.sourceEvent,c)})).on("drag",(t=>{const{autoPanOnNodeDrag:n,transform:o,snapGrid:r,snapToGrid:a,nodeDragThreshold:h}=e(),f=I(t.sourceEvent,{transform:o,snapGrid:r,snapToGrid:a});if(!u&&n&&d&&(u=!0,M()),!d){const e=f.xSnapped-(i.x??0),n=f.ySnapped-(i.y??0);Math.sqrt(e*e+n*n)>h&&E(t)}(i.x!==f.xSnapped||i.y!==f.ySnapped)&&s&&d&&(l=B(t.sourceEvent,c),b(f,t.sourceEvent))})).on("end",(t=>{if(d&&(u=!1,d=!1,cancelAnimationFrame(a),s.length>0)){const{nodeLookup:n,updateNodePositions:o,onNodeDragStop:i,onSelectionDragStop:a}=e();if(o(s,!1),r||i||!_&&a){const[e,o]=Ye({nodeId:_,dragItems:s,nodeLookup:n});if(r?.(t.sourceEvent,s,e,o),i?.(t.sourceEvent,e,o),!_){Oe(a)(t.sourceEvent,e,o)}}}})).filter((t=>{const e=t.target;return!t.button&&(!g||!Xe(e,`.${g}`,v))&&(!m||Xe(e,m,v))}));p.call(P)},destroy:function(){p?.on(".drag",null)}}},t.XYHandle=Ze,t.XYMinimap=function({domNode:t,panZoom:e,getTransform:n,getViewScale:o}){const r=we(t);return{update:function({translateExtent:t,width:i,height:a,zoomStep:s=10,pannable:u=!0,zoomable:l=!0,inversePan:c=!1}){const h=sr().on("zoom",u?r=>{const s=n();if("mousemove"!==r.sourceEvent.type||!e)return;const u=o()*Math.max(s[2],Math.log(s[2]))*(c?-1:1),l={x:s[0]-r.sourceEvent.movementX*u,y:s[1]-r.sourceEvent.movementY*u},h=[[0,0],[i,a]];e.setViewportConstrained({x:l.x,y:l.y,zoom:s[2]},h,t)}:null).on("zoom.wheel",l?t=>{const o=n();if("wheel"!==t.sourceEvent.type||!e)return;const r=-t.sourceEvent.deltaY*(1===t.sourceEvent.deltaMode?.05:t.sourceEvent.deltaMode?1:.002)*s,i=o[2]*Math.pow(2,r);e.scaleTo(i)}:null);r.call(h,{})},destroy:function(){r.on("zoom",null)},pointer:_e}},t.XYPanZoom=function({domNode:e,minZoom:n,maxZoom:o,translateExtent:r,viewport:i,onPanZoom:a,onPanZoomStart:s,onPanZoomEnd:u,onTransformChange:l,onDraggingChange:c}){const h={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},d=e.getBoundingClientRect(),f=sr().scaleExtent([n,o]).translateExtent(r),g=we(e).call(f);w({x:i.x,y:i.y,zoom:p(i.zoom,n,o)},[[0,0],[d.width,d.height]],r);const m=g.on("wheel.zoom"),y=g.on("dblclick.zoom");function v(t,e){g&&f?.transform(fr(g,e?.duration),t)}function x(){f.on("zoom",null)}function w(t,e,n){const o=cr(t),r=f?.constrain()(o,e,n);return r&&v(r),r}return f.wheelDelta(pr),{update:function({noWheelClassName:e,noPanClassName:n,onPaneContextMenu:o,userSelectionActive:r,panOnScroll:i,panOnDrag:d,panOnScrollMode:p,panOnScrollSpeed:v,preventScrolling:w,zoomOnPinch:_,zoomOnScroll:b,zoomOnDoubleClick:M,zoomActivationKeyPressed:E,lib:P}){r&&!h.isZoomingOrPanning&&x();const S=i&&!E&&!r?function({zoomPanValues:e,noWheelClassName:n,d3Selection:o,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:s,onPanZoomStart:u,onPanZoom:l,onPanZoomEnd:c}){return h=>{if(hr(h,n))return!1;h.preventDefault(),h.stopImmediatePropagation();const d=o.property("__zoom").k||1,f=T();if(h.ctrlKey&&s&&f){const t=_e(h),e=pr(h),n=d*Math.pow(2,e);return void r.scaleTo(o,n,t,h)}const p=1===h.deltaMode?20:1;let g=i===t.PanOnScrollMode.Vertical?0:h.deltaX*p,m=i===t.PanOnScrollMode.Horizontal?0:h.deltaY*p;!f&&h.shiftKey&&i!==t.PanOnScrollMode.Vertical&&(g=h.deltaY*p,m=0),r.translateBy(o,-g/d*a,-m/d*a,{internal:!0});const y=lr(o.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling||(e.isPanScrolling=!0,u?.(h,y)),e.isPanScrolling&&(l?.(h,y),e.panScrollTimeout=setTimeout((()=>{c?.(h,y),e.isPanScrolling=!1}),150))}}({zoomPanValues:h,noWheelClassName:e,d3Selection:g,d3Zoom:f,panOnScrollMode:p,panOnScrollSpeed:v,zoomOnPinch:_,onPanZoomStart:s,onPanZoom:a,onPanZoomEnd:u}):function({noWheelClassName:t,preventScrolling:e,d3ZoomHandler:n}){return function(o,r){if(!e||hr(o,t))return null;o.preventDefault(),n.call(this,o,r)}}({noWheelClassName:e,preventScrolling:w,d3ZoomHandler:m});if(g.on("wheel.zoom",S,{passive:!1}),!r){const t=function({zoomPanValues:t,onDraggingChange:e,onPanZoomStart:n}){return o=>{if(o.sourceEvent?.internal)return;const r=lr(o.transform);t.mouseButton=o.sourceEvent?.button||0,t.isZoomingOrPanning=!0,t.prevViewport=r,"mousedown"===o.sourceEvent?.type&&e(!0),n&&n?.(o.sourceEvent,r)}}({zoomPanValues:h,onDraggingChange:c,onPanZoomStart:s});f.on("start",t);const e=function({zoomPanValues:t,panOnDrag:e,onPaneContextMenu:n,onTransformChange:o,onPanZoom:r}){return i=>{t.usedRightMouseButton=!(!n||!dr(e,t.mouseButton??0)),i.sourceEvent?.sync||o([i.transform.x,i.transform.y,i.transform.k]),r&&!i.sourceEvent?.internal&&r?.(i.sourceEvent,lr(i.transform))}}({zoomPanValues:h,panOnDrag:d,onPaneContextMenu:!!o,onPanZoom:a,onTransformChange:l});f.on("zoom",e);const n=function({zoomPanValues:t,panOnDrag:e,panOnScroll:n,onDraggingChange:o,onPanZoomEnd:r,onPaneContextMenu:i}){return a=>{if(!a.sourceEvent?.internal&&(t.isZoomingOrPanning=!1,i&&dr(e,t.mouseButton??0)&&!t.usedRightMouseButton&&a.sourceEvent&&i(a.sourceEvent),t.usedRightMouseButton=!1,o(!1),r&&ur(t.prevViewport,a.transform))){const e=lr(a.transform);t.prevViewport=e,clearTimeout(t.timerId),t.timerId=setTimeout((()=>{r?.(a.sourceEvent,e)}),n?150:0)}}}({zoomPanValues:h,panOnDrag:d,panOnScroll:i,onPaneContextMenu:o,onPanZoomEnd:u,onDraggingChange:c});f.on("end",n)}const z=function({zoomActivationKeyPressed:t,zoomOnScroll:e,zoomOnPinch:n,panOnDrag:o,panOnScroll:r,zoomOnDoubleClick:i,userSelectionActive:a,noWheelClassName:s,noPanClassName:u,lib:l}){return c=>{const h=t||e,d=n&&c.ctrlKey;if(1===c.button&&"mousedown"===c.type&&(hr(c,`${l}-flow__node`)||hr(c,`${l}-flow__edge`)))return!0;if(!(o||h||r||i||n))return!1;if(a)return!1;if(hr(c,s)&&"wheel"===c.type)return!1;if(hr(c,u)&&("wheel"!==c.type||r&&"wheel"===c.type&&!t))return!1;if(!n&&c.ctrlKey&&"wheel"===c.type)return!1;if(!h&&!r&&!d&&"wheel"===c.type)return!1;if(!o&&("mousedown"===c.type||"touchstart"===c.type))return!1;if(Array.isArray(o)&&!o.includes(c.button)&&("mousedown"===c.type||"touchstart"===c.type))return!1;const f=Array.isArray(o)&&o.includes(c.button)||!c.button||c.button<=1;return(!c.ctrlKey||"wheel"===c.type)&&f}}({zoomActivationKeyPressed:E,panOnDrag:d,zoomOnScroll:b,panOnScroll:i,zoomOnDoubleClick:M,zoomOnPinch:_,userSelectionActive:r,noPanClassName:n,noWheelClassName:e,lib:P});f.filter(z),M?g.on("dblclick.zoom",y):g.on("dblclick.zoom",null)},destroy:x,setViewport:function(t,e){const n=cr(t);return v(n,e),n},setViewportConstrained:w,getViewport:function(){const t=g?Qo(g.node()):{x:0,y:0,k:1};return{x:t.x,y:t.y,zoom:t.k}},scaleTo:function(t,e){g&&f?.scaleTo(fr(g,e?.duration),t)},scaleBy:function(t,e){g&&f?.scaleBy(fr(g,e?.duration),t)},setScaleExtent:function(t){f?.scaleExtent(t)},setTranslateExtent:function(t){f?.translateExtent(t)},syncViewport:function(t){if(g){const e=cr(t),n=g.property("__zoom");n.k===t.zoom&&n.x===t.x&&n.y===t.y||f?.transform(g,e,null,{sync:!0})}}}},t.XYResizer=function({domNode:t,nodeId:e,getStoreItems:n,onChange:o}){const r=we(t);return{update:function({controlPosition:t,boundaries:i,keepAspectRatio:a,onResizeStart:s,onResize:u,onResizeEnd:l,shouldResize:c}){let h={...wr},d={..._r};const f=function(t){return{isHorizontal:t.includes("right")||t.includes("left"),isVertical:t.includes("bottom")||t.includes("top"),affectsX:t.includes("left"),affectsY:t.includes("top")}}(t);let p,g,m,y,v=[];const x=Ie().on("start",(t=>{const{nodeLookup:o,transform:r,snapGrid:i,snapToGrid:a,nodeOrigin:u}=n();if(p=o.get(e),p){const{xSnapped:n,ySnapped:l}=I(t.sourceEvent,{transform:r,snapGrid:i,snapToGrid:a});h={width:p.measured?.width??0,height:p.measured?.height??0,x:p.position.x??0,y:p.position.y??0},d={...h,pointerX:n,pointerY:l,aspectRatio:h.width/h.height},g=void 0,("parent"===p.extent||p.expandParent)&&(g=o.get(p.parentId),g&&"parent"===p.extent&&(m=function(t){return[[0,0],[t.measured.width,t.measured.height]]}(g))),v=[],y=void 0;for(const[t,n]of o)if(n.parentId===e&&(v.push({id:t,position:{...n.position},extent:n.extent}),"parent"===n.extent||n.expandParent)){const t=Mr(n,p,n.origin??u);y=y?[[Math.min(t[0][0],y[0][0]),Math.min(t[0][1],y[0][1])],[Math.max(t[1][0],y[1][0]),Math.max(t[1][1],y[1][1])]]:t}s?.(t,{...h})}})).on("drag",(t=>{const{transform:e,snapGrid:r,snapToGrid:s,nodeOrigin:l}=n(),x=I(t.sourceEvent,{transform:e,snapGrid:r,snapToGrid:s}),w=[];if(p){const{x:e,y:n,width:r,height:s}=h,_={...br},b=p.origin??l,{width:M,height:E,x:P,y:S}=function(t,e,n,o,r,i,a,s){let{affectsX:u,affectsY:l}=e;const{isHorizontal:c,isVertical:h}=e,d=c&&h,{xSnapped:f,ySnapped:p}=n,{minWidth:g,maxWidth:m,minHeight:y,maxHeight:v}=o,{x:x,y:w,width:_,height:b,aspectRatio:M}=t;let E=Math.floor(c?f-t.pointerX:0),P=Math.floor(h?p-t.pointerY:0);const S=_+(u?-E:E),z=b+(l?-P:P),N=-i[0]*_,k=-i[1]*b;let A=vr(S,g,m),T=vr(z,y,v);if(a){let t=0,e=0;u&&E<0?t=mr(x+E+N,a[0][0]):!u&&E>0&&(t=yr(x+S+N,a[1][0])),l&&P<0?e=mr(w+P+k,a[0][1]):!l&&P>0&&(e=yr(w+z+k,a[1][1])),A=Math.max(A,t),T=Math.max(T,e)}if(s){let t=0,e=0;u&&E>0?t=yr(x+E,s[0][0]):!u&&E<0&&(t=mr(x+S,s[1][0])),l&&P>0?e=yr(w+P,s[0][1]):!l&&P<0&&(e=mr(w+z,s[1][1])),A=Math.max(A,t),T=Math.max(T,e)}if(r){if(c){const t=vr(S/M,y,v)*M;if(A=Math.max(A,t),a){let t=0;t=!u&&!l||u&&!l&&d?yr(w+k+S/M,a[1][1])*M:mr(w+k+(u?E:-E)/M,a[0][1])*M,A=Math.max(A,t)}if(s){let t=0;t=!u&&!l||u&&!l&&d?mr(w+S/M,s[1][1])*M:yr(w+(u?E:-E)/M,s[0][1])*M,A=Math.max(A,t)}}if(h){const t=vr(z*M,g,m)/M;if(T=Math.max(T,t),a){let t=0;t=!u&&!l||l&&!u&&d?yr(x+z*M+N,a[1][0])/M:mr(x+(l?P:-P)*M+N,a[0][0])/M,T=Math.max(T,t)}if(s){let t=0;t=!u&&!l||l&&!u&&d?mr(x+z*M,s[1][0])/M:yr(x+(l?P:-P)*M,s[0][0])/M,T=Math.max(T,t)}}}P+=P<0?T:-T,E+=E<0?A:-A,r&&(d?S>z*M?P=(xr(u,l)?-E:E)/M:E=(xr(u,l)?-P:P)*M:c?(P=E/M,l=u):(E=P*M,u=l));const $=u?x+E:x,C=l?w+P:w;return{width:_+(u?-E:E),height:b+(l?-P:P),x:i[0]*E*(u?-1:1)+$,y:i[1]*P*(l?-1:1)+C}}(d,f,x,i,a,b,m,y),z=M!==r,N=E!==s,k=P!==e&&z,A=S!==n&&N;if((k||A||1===b[0]||1==b[1])&&(_.isXPosChange=k,_.isYPosChange=A,_.x=k?P:e,_.y=A?S:n,h.x=_.x,h.y=_.y,g&&p.expandParent&&(_.x<0&&(h.x=0,d.x=d.x-_.x),_.y<0&&(h.y=0,d.y=d.y-_.y)),v.length>0)){const t=P-e,o=S-n;for(const e of v)e.position={x:e.position.x-t+b[0]*(M-r),y:e.position.y-o+b[1]*(E-s)},w.push(e)}if((z||N)&&(_.isWidthChange=z,_.isHeightChange=N,_.width=M,_.height=E,h.width=_.width,h.height=_.height),!(_.isXPosChange||_.isYPosChange||z||N))return;const T=function({width:t,prevWidth:e,height:n,prevHeight:o,affectsX:r,affectsY:i}){const a=t-e,s=n-o,u=[a>0?1:a<0?-1:0,s>0?1:s<0?-1:0];return a&&r&&(u[0]=-1*u[0]),s&&i&&(u[1]=-1*u[1]),u}({width:h.width,prevWidth:r,height:h.height,prevHeight:s,affectsX:f.affectsX,affectsY:f.affectsY}),$={...h,direction:T},C=c?.(t,$);if(!1===C)return;u?.(t,$),o(_,w)}})).on("end",(t=>{l?.(t,{...h})}));r.call(x)},destroy:function(){r.on(".drag",null)}}},t.XY_RESIZER_HANDLE_POSITIONS=["top-left","top-right","bottom-left","bottom-right"],t.XY_RESIZER_LINE_POSITIONS=["top","right","bottom","left"],t.addEdge=(t,n)=>{if(!t.source||!t.target)return e.error006(),n;let o;return o=l(t)?{...t}:{...t,id:Z(t)},((t,e)=>e.some((e=>!(e.source!==t.source||e.target!==t.target||e.sourceHandle!==t.sourceHandle&&(e.sourceHandle||t.sourceHandle)||e.targetHandle!==t.targetHandle&&(e.targetHandle||t.targetHandle)))))(o,n)?n:(null===o.sourceHandle&&delete o.sourceHandle,null===o.targetHandle&&delete o.targetHandle,n.concat(o))},t.adoptUserNodes=function(t,e,n={nodeOrigin:[0,0],elevateNodesOnSelect:!0,defaults:{}}){const o=new Map(e);e.clear();const r=n?.elevateNodesOnSelect?1e3:0,i=new Set;t.forEach((t=>{const a=o.get(t.id);t.parentId&&i.add(t.parentId),t===a?.internals.userNode?e.set(t.id,a):e.set(t.id,{...n.defaults,...t,measured:{width:t.measured?.width,height:t.measured?.height},internals:{positionAbsolute:t.position,handleBounds:a?.internals?.handleBounds,z:(P(t.zIndex)?t.zIndex:0)+(t.selected?r:0),userNode:t,isParent:!1}})})),i.size>0&&tt(e,n,i)},t.areConnectionMapsEqual=function(t,e){if(!t&&!e)return!0;if(!t||!e||t.size!==e.size)return!1;if(!t.size&&!e.size)return!0;for(const n of t.keys())if(!e.has(n))return!1;return!0},t.boxToRect=w,t.calcAutoPan=y,t.calculateNodePosition=f,t.clamp=p,t.clampPosition=g,t.createMarkerIds=function(t,{id:e,defaultColor:n,defaultMarkerStart:o,defaultMarkerEnd:r}){const i=new Set;return t.reduce(((t,a)=>([a.markerStart||o,a.markerEnd||r].forEach((o=>{if(o&&"object"==typeof o){const r=J(o,e);i.has(r)||(t.push({id:r,color:o.color||n,...o}),i.add(r))}})),t)),[]).sort(((t,e)=>t.id.localeCompare(e.id)))},t.devWarn=S,t.elementSelectionKeys=["Enter"," ","Escape"],t.errorMessages=e,t.fitView=function({nodeLookup:t,width:e,height:n,panZoom:o,minZoom:r,maxZoom:i,nodeOrigin:a=[0,0]},s){const u=[];if(t.forEach((t=>{t.measured.width&&t.measured.height&&(s?.includeHiddenNodes||!t.hidden)&&(!s?.nodes||s?.nodes.length&&s?.nodes.some((e=>e.id===t.id)))&&u.push(t)})),u.length>0){const t=h(u,{nodeOrigin:a}),l=A(t,e,n,s?.minZoom??r,s?.maxZoom??i,s?.padding??.1);return o.setViewport(l,{duration:s?.duration}),!0}return!1},t.getBezierEdgeCenter=D,t.getBezierPath=function({sourceX:e,sourceY:n,sourcePosition:o=t.Position.Bottom,targetX:r,targetY:i,targetPosition:a=t.Position.Top,curvature:s=.25}){const[u,l]=V({pos:o,x1:e,y1:n,x2:r,y2:i,c:s}),[c,h]=V({pos:a,x1:r,y1:i,x2:e,y2:n,c:s}),[d,f,p,g]=D({sourceX:e,sourceY:n,targetX:r,targetY:i,sourceControlX:u,sourceControlY:l,targetControlX:c,targetControlY:h});return[`M${e},${n} C${u},${l} ${c},${h} ${r},${i}`,d,f,p,g]},t.getBoundsOfBoxes=v,t.getBoundsOfRects=M,t.getConnectedEdges=d,t.getDimensions=O,t.getEdgeCenter=q,t.getEdgePosition=function(n){const{sourceNode:o,targetNode:r}=n;if(!F(o)||!F(r))return null;const i=o.internals.handleBounds||K(o.handles),a=r.internals.handleBounds||K(r.handles),s=Q(i?.source??[],n.sourceHandle),u=Q(n.connectionMode===t.ConnectionMode.Strict?a?.target??[]:(a?.target??[]).concat(a?.source??[]),n.targetHandle),l=s?.position||t.Position.Bottom,c=u?.position||t.Position.Top;if(!s||!u)return n.onError?.("008",e.error008(s?"target":"source",{id:n.id,sourceHandle:n.sourceHandle,targetHandle:n.targetHandle})),null;const[h,d]=U(l,o,s),[f,p]=U(c,r,u);return{sourceX:h,sourceY:d,targetX:f,targetY:p,sourcePosition:l,targetPosition:c}},t.getElementsToRemove=async function({nodesToRemove:t=[],edgesToRemove:e=[],nodes:n,edges:o,onBeforeDelete:r}){const i=t.map((t=>t.id)),a=[];for(const t of n){if(!1===t.deletable)continue;const e=i.includes(t.id),n=!e&&t.parentId&&a.find((e=>e.id===t.parentId));(e||n)&&a.push(t)}const s=e.map((t=>t.id)),u=o.filter((t=>!1!==t.deletable)),l=d(a,u);for(const t of u){s.includes(t.id)&&!l.find((e=>e.id===t.id))&&l.push(t)}if(!r)return{edges:l,nodes:a};const c=await r({nodes:a,edges:l});return"boolean"==typeof c?c?{edges:l,nodes:a}:{edges:[],nodes:[]}:c},t.getElevatedEdgeZIndex=function({sourceNode:t,targetNode:e,selected:n=!1,zIndex:o=0,elevateOnSelect:r=!1}){if(!r)return o;const i=n||e.selected||t.selected,a=Math.max(t.internals.z||0,e.internals.z||0,1e3);return o+(i?a:0)},t.getEventPosition=B,t.getHandleBounds=R,t.getHostForElement=H,t.getIncomers=(t,e,n)=>{if(!t.id)return[];const o=new Set;return n.forEach((e=>{e.target===t.id&&o.add(e.source)})),e.filter((t=>o.has(t.id)))},t.getInternalNodesBounds=(t,e={nodeOrigin:[0,0],useRelativePosition:!1})=>{if(0===t.size)return{x:0,y:0,width:0,height:0};let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0};return t.forEach((t=>{if(null==e.filter||e.filter(t)){const o=c(t,t.origin||e.nodeOrigin);n=v(n,x({...o[e.useRelativePosition?"position":"positionAbsolute"],...C(t)}))}})),w(n)},t.getMarkerId=J,t.getNodeDimensions=C,t.getNodePositionWithOrigin=c,t.getNodeToolbarTransform=function(e,n,o,r,i){let a=.5;"start"===i?a=0:"end"===i&&(a=1);let s=[(e.x+e.width*a)*n.zoom+n.x,e.y*n.zoom+n.y-r],u=[-100*a,-100];switch(o){case t.Position.Right:s=[(e.x+e.width)*n.zoom+n.x+r,(e.y+e.height*a)*n.zoom+n.y],u=[0,-100*a];break;case t.Position.Bottom:s[1]=(e.y+e.height)*n.zoom+n.y+r,u[1]=0;break;case t.Position.Left:s=[e.x*n.zoom+n.x-r,(e.y+e.height*a)*n.zoom+n.y],u=[-100,-100*a]}return`translate(${s[0]}px, ${s[1]}px) translate(${u[0]}%, ${u[1]}%)`},t.getNodesBounds=h,t.getNodesInside=(t,e,[n,o,r]=[0,0,1],i=!1,a=!1,s=[0,0])=>{const u={...N(e,[n,o,r]),width:e.width/r,height:e.height/r},l=[];for(const[,e]of t){const{measured:t,selectable:n=!0,hidden:o=!1}=e,r=t.width??e.width??e.initialWidth??null,c=t.height??e.height??e.initialHeight??null;if(a&&!n||o)continue;const h=E(u,_(e,s));(null===r||null===c||i&&h>0||h>=(r??0)*(c??0)||e.dragging)&&l.push(e)}return l},t.getOutgoers=(t,e,n)=>{if(!t.id)return[];const o=new Set;return n.forEach((e=>{e.source===t.id&&o.add(e.target)})),e.filter((t=>o.has(t.id)))},t.getOverlappingArea=E,t.getPointerPosition=I,t.getPositionWithOrigin=({x:t,y:e,width:n,height:o,origin:r=[0,0]})=>!n||!o||r[0]<0||r[1]<0||r[0]>1||r[1]>1?{x:t,y:e}:{x:t-n*r[0],y:e-o*r[1]},t.getSmoothStepPath=function({sourceX:e,sourceY:n,sourcePosition:o=t.Position.Bottom,targetX:r,targetY:i,targetPosition:a=t.Position.Top,borderRadius:s=5,centerX:u,centerY:l,offset:c=20}){const[h,d,f,p,g]=function({source:e,sourcePosition:n=t.Position.Bottom,target:o,targetPosition:r=t.Position.Top,center:i,offset:a}){const s=G[n],u=G[r],l={x:e.x+s.x*a,y:e.y+s.y*a},c={x:o.x+u.x*a,y:o.y+u.y*a},h=j({source:l,sourcePosition:n,target:c}),d=0!==h.x?"x":"y",f=h[d];let p,g,m=[];const y={x:0,y:0},v={x:0,y:0},[x,w,_,b]=q({sourceX:e.x,sourceY:e.y,targetX:o.x,targetY:o.y});if(s[d]*u[d]==-1){p=i.x??x,g=i.y??w;const t=[{x:p,y:l.y},{x:p,y:c.y}],e=[{x:l.x,y:g},{x:c.x,y:g}];m=s[d]===f?"x"===d?t:e:"x"===d?e:t}else{const t=[{x:l.x,y:c.y}],i=[{x:c.x,y:l.y}];if(m="x"===d?s.x===f?i:t:s.y===f?t:i,n===r){const t=Math.abs(e[d]-o[d]);if(t<=a){const n=Math.min(a-1,a-t);s[d]===f?y[d]=(l[d]>e[d]?-1:1)*n:v[d]=(c[d]>o[d]?-1:1)*n}}if(n!==r){const e="x"===d?"y":"x",n=s[d]===u[e],o=l[e]>c[e],r=l[e]<c[e];(1===s[d]&&(!n&&o||n&&r)||1!==s[d]&&(!n&&r||n&&o))&&(m="x"===d?t:i)}const h={x:l.x+y.x,y:l.y+y.y},x={x:c.x+v.x,y:c.y+v.y};Math.max(Math.abs(h.x-m[0].x),Math.abs(x.x-m[0].x))>=Math.max(Math.abs(h.y-m[0].y),Math.abs(x.y-m[0].y))?(p=(h.x+x.x)/2,g=m[0].y):(p=m[0].x,g=(h.y+x.y)/2)}return[[e,{x:l.x+y.x,y:l.y+y.y},...m,{x:c.x+v.x,y:c.y+v.y},o],p,g,_,b]}({source:{x:e,y:n},sourcePosition:o,target:{x:r,y:i},targetPosition:a,center:{x:u,y:l},offset:c});return[h.reduce(((t,e,n)=>{let o="";return o=n>0&&n<h.length-1?function(t,e,n,o){const r=Math.min(W(t,e)/2,W(e,n)/2,o),{x:i,y:a}=e;if(t.x===i&&i===n.x||t.y===a&&a===n.y)return`L${i} ${a}`;if(t.y===a)return`L ${i+r*(t.x<n.x?-1:1)},${a}Q ${i},${a} ${i},${a+r*(t.y<n.y?1:-1)}`;const s=t.x<n.x?1:-1;return`L ${i},${a+r*(t.y<n.y?-1:1)}Q ${i},${a} ${i+r*s},${a}`}(h[n-1],e,h[n+1],s):`${0===n?"M":"L"}${e.x} ${e.y}`,t+=o}),""),d,f,p,g]},t.getStraightPath=function({sourceX:t,sourceY:e,targetX:n,targetY:o}){const[r,i,a,s]=q({sourceX:t,sourceY:e,targetX:n,targetY:o});return[`M ${t},${e}L ${n},${o}`,r,i,a,s]},t.getViewportForBounds=A,t.handleConnectionChange=function(t,e,n){if(!n)return;const o=[];t.forEach(((t,n)=>{e?.has(n)||o.push(t)})),o.length&&n(o)},t.handleParentExpand=nt,t.infiniteExtent=n,t.isCoordinateExtent=$,t.isEdgeBase=l,t.isEdgeVisible=function({sourceNode:t,targetNode:e,width:n,height:o,transform:r}){const i=v(b(t),b(e));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const a={x:-r[0]/r[2],y:-r[1]/r[2],width:n/r[2],height:o/r[2]};return E(a,w(i))>0},t.isInputDOMNode=function(t){const e=t.composedPath?.()?.[0]||t.target;return X.includes(e?.nodeName)||e?.hasAttribute("contenteditable")||!!e?.closest(".nokey")},t.isInternalNodeBase=t=>"id"in t&&"internals"in t&&!("source"in t)&&!("target"in t),t.isMacOs=T,t.isMouseEvent=Y,t.isNodeBase=t=>"id"in t&&"position"in t&&!("source"in t)&&!("target"in t),t.isNumeric=P,t.isRectObject=t=>P(t.width)&&P(t.height)&&P(t.x)&&P(t.y),t.nodeHasDimensions=function(t){return void 0!==(t.measured?.width??t.width??t.initialWidth)&&void 0!==(t.measured?.height??t.height??t.initialHeight)},t.nodeToBox=b,t.nodeToRect=_,t.panBy=function({delta:t,panZoom:e,transform:n,translateExtent:o,width:r,height:i}){if(!e||!t.x&&!t.y)return!1;const a=e.setViewportConstrained({x:n[0]+t.x,y:n[1]+t.y,zoom:n[2]},[[0,0],[r,i]],o);return!!a&&(a.x!==n[0]||a.y!==n[1]||a.k!==n[2])},t.pointToRendererPoint=N,t.rectToBox=x,t.rendererPointToPoint=k,t.shallowNodeData=function(t,e){if(null===t||null===e)return!1;const n=Array.isArray(t)?t:[t],o=Array.isArray(e)?e:[e];if(n.length!==o.length)return!1;for(let t=0;t<n.length;t++)if(n[t].id!==o[t].id||n[t].type!==o[t].type||!Object.is(n[t].data,o[t].data))return!1;return!0},t.snapPosition=z,t.updateAbsolutePositions=tt,t.updateConnectionLookup=function(t,e,n){t.clear(),e.clear();for(const o of n){const{source:n,target:r,sourceHandle:i=null,targetHandle:a=null}=o,s=`${n}-source-${i}`,u=`${r}-target-${a}`,l=t.get(s)||new Map,c=t.get(u)||new Map,h={edgeId:o.id,source:n,target:r,sourceHandle:i,targetHandle:a};e.set(o.id,o),t.set(s,l.set(`${r}-${a}`,h)),t.set(u,c.set(`${n}-${i}`,h))}},t.updateEdge=(t,n,o,r={shouldReplaceId:!0})=>{const{id:i,...a}=t;if(!n.source||!n.target)return e.error006(),o;if(!o.find((e=>e.id===t.id)))return e.error007(i),o;const s={...a,id:r.shouldReplaceId?Z(n):i,source:n.source,target:n.target,sourceHandle:n.sourceHandle,targetHandle:n.targetHandle};return o.filter((t=>t.id!==i)).concat(s)},t.updateNodeDimensions=function(t,e,n,o){const r=n?.querySelector(".xyflow__viewport");if(!r)return[];const i=[],a=window.getComputedStyle(r),{m22:s}=new window.DOMMatrixReadOnly(a.transform),u=[];if(t.forEach((t=>{const n=e.get(t.id);if(n?.hidden)e.set(n.id,{...n,internals:{...n.internals,handleBounds:void 0}});else if(n){const r=O(t.nodeElement);if(!(!r.width||!r.height||n.measured?.width===r.width&&n.measured?.height===r.height&&!t.force)){const a={...n,measured:{...n.measured,...r},internals:{...n.internals,handleBounds:{source:R(".source",t.nodeElement,s,n.origin||o),target:R(".target",t.nodeElement,s,n.origin||o)}}};e.set(n.id,a),i.push({id:a.id,type:"dimensions",dimensions:r}),a.expandParent&&u.push(a)}}})),u.length>0){const t=nt(u,e);i.push(...t)}return i}}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).XYFlowSystem={})}(this,(function(t){"use strict";const e={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:t=>`Node type "${t}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:t=>`The old edge with id=${t} does not exist.`,error009:t=>`Marker type "${t}" doesn't exist.`,error008:(t,{id:e,sourceHandle:n,targetHandle:o})=>`Couldn't create edge for ${t} handle id: "${n?o:n}", edge id: ${e}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:t=>`Edge type "${t}" not found. Using fallback type "default".`,error012:t=>`Node with id "${t}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},n=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]];var o,r,i,a,s,u;t.ConnectionMode=void 0,(o=t.ConnectionMode||(t.ConnectionMode={})).Strict="strict",o.Loose="loose",t.PanOnScrollMode=void 0,(r=t.PanOnScrollMode||(t.PanOnScrollMode={})).Free="free",r.Vertical="vertical",r.Horizontal="horizontal",t.SelectionMode=void 0,(i=t.SelectionMode||(t.SelectionMode={})).Partial="partial",i.Full="full",t.ConnectionLineType=void 0,(a=t.ConnectionLineType||(t.ConnectionLineType={})).Bezier="default",a.Straight="straight",a.Step="step",a.SmoothStep="smoothstep",a.SimpleBezier="simplebezier",t.MarkerType=void 0,(s=t.MarkerType||(t.MarkerType={})).Arrow="arrow",s.ArrowClosed="arrowclosed",t.Position=void 0,(u=t.Position||(t.Position={})).Left="left",u.Top="top",u.Right="right",u.Bottom="bottom";const l=t=>"id"in t&&"source"in t&&"target"in t,c=(t,e=[0,0])=>{if(!t)return{position:{x:0,y:0},positionAbsolute:{x:0,y:0}};const{width:n,height:o}=C(t),r=n*e[0],i=o*e[1],a={x:t.position.x-r,y:t.position.y-i};return{position:a,positionAbsolute:"internals"in t?{x:t.internals.positionAbsolute.x-r,y:t.internals.positionAbsolute.y-i}:a}},h=(t,e={nodeOrigin:[0,0],useRelativePosition:!1})=>{if(0===t.length)return{x:0,y:0,width:0,height:0};const n=t.reduce(((t,n)=>{const o=c(n,n.origin||e.nodeOrigin);return v(t,x({...o[e.useRelativePosition?"position":"positionAbsolute"],...C(n)}))}),{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return w(n)},d=(t,e)=>{const n=new Set;return t.forEach((t=>{n.add(t.id)})),e.filter((t=>n.has(t.source)||n.has(t.target)))};function f({nodeId:t,nextPosition:n,nodeLookup:o,nodeOrigin:r=[0,0],nodeExtent:i,onError:a}){const s=o.get(t),u=s.parentId?o.get(s.parentId):void 0,{x:l,y:h}=u?c(u,u.origin||r).positionAbsolute:{x:0,y:0};let d=function(t,e){return e&&"parent"!==e?[e[0],[e[1][0]-(t.measured?.width??0),e[1][1]-(t.measured?.height??0)]]:e}(s,s.extent||i);if("parent"!==s.extent||s.expandParent)u&&$(s.extent)&&(d=[[s.extent[0][0]+l,s.extent[0][1]+h],[s.extent[1][0]+l,s.extent[1][1]+h]]);else if(u){const t=s.measured.width,e=s.measured.height,n=u.measured.width,o=u.measured.height;if(t&&e&&n&&o){const i=s.origin||r,a=l+t*i[0],u=h+e*i[1];d=[[a,u],[a+n-t,u+o-e]]}}else a?.("005",e.error005());const f=$(d)?g(n,d):n;return{position:{x:f.x-l,y:f.y-h},positionAbsolute:f}}const p=(t,e=0,n=1)=>Math.min(Math.max(t,e),n),g=(t={x:0,y:0},e)=>({x:p(t.x,e[0][0],e[1][0]),y:p(t.y,e[0][1],e[1][1])}),m=(t,e,n)=>t<e?p(Math.abs(t-e),1,50)/50:t>n?-p(Math.abs(t-n),1,50)/50:0,y=(t,e)=>[20*m(t.x,35,e.width-35),20*m(t.y,35,e.height-35)],v=(t,e)=>({x:Math.min(t.x,e.x),y:Math.min(t.y,e.y),x2:Math.max(t.x2,e.x2),y2:Math.max(t.y2,e.y2)}),x=({x:t,y:e,width:n,height:o})=>({x:t,y:e,x2:t+n,y2:e+o}),w=({x:t,y:e,x2:n,y2:o})=>({x:t,y:e,width:n-t,height:o-e}),_=(t,e=[0,0])=>{const{positionAbsolute:n}=c(t,t.origin||e);return{...n,width:t.measured?.width??t.width??0,height:t.measured?.height??t.height??0}},b=(t,e=[0,0])=>{const{positionAbsolute:n}=c(t,t.origin||e);return{...n,x2:n.x+(t.measured?.width??t.width??0),y2:n.y+(t.measured?.height??t.height??0)}},M=(t,e)=>w(v(x(t),x(e))),E=(t,e)=>{const n=Math.max(0,Math.min(t.x+t.width,e.x+e.width)-Math.max(t.x,e.x)),o=Math.max(0,Math.min(t.y+t.height,e.y+e.height)-Math.max(t.y,e.y));return Math.ceil(n*o)},P=t=>!isNaN(t)&&isFinite(t),S=(t,e)=>{},z=(t,e=[1,1])=>({x:e[0]*Math.round(t.x/e[0]),y:e[1]*Math.round(t.y/e[1])}),N=({x:t,y:e},[n,o,r],i=!1,a=[1,1])=>{const s={x:(t-n)/r,y:(e-o)/r};return i?z(s,a):s},k=({x:t,y:e},[n,o,r])=>({x:t*r+n,y:e*r+o}),A=(t,e,n,o,r,i)=>{const a=e/(t.width*(1+i)),s=n/(t.height*(1+i)),u=Math.min(a,s),l=p(u,o,r);return{x:e/2-(t.x+t.width/2)*l,y:n/2-(t.y+t.height/2)*l,zoom:l}},T=()=>"undefined"!=typeof navigator&&navigator?.userAgent?.indexOf("Mac")>=0;function $(t){return void 0!==t&&"parent"!==t}function C(t){return{width:t.measured?.width??t.width??t.initialWidth??0,height:t.measured?.height??t.height??t.initialHeight??0}}function I(t,{snapGrid:e=[0,0],snapToGrid:n=!1,transform:o}){const{x:r,y:i}=B(t),a=N({x:r,y:i},o),{x:s,y:u}=n?z(a,e):a;return{xSnapped:s,ySnapped:u,...a}}const O=t=>({width:t.offsetWidth,height:t.offsetHeight}),H=t=>t.getRootNode?.()||window?.document,X=["INPUT","SELECT","TEXTAREA"];const Y=t=>"clientX"in t,B=(t,e)=>{const n=Y(t),o=n?t.clientX:t.touches?.[0].clientX,r=n?t.clientY:t.touches?.[0].clientY;return{x:o-(e?.left??0),y:r-(e?.top??0)}},R=(t,e,n,o=[0,0])=>{const r=e.querySelectorAll(t);if(!r||!r.length)return null;const i=Array.from(r),a=e.getBoundingClientRect(),s=a.width*o[0],u=a.height*o[1];return i.map((t=>{const e=t.getBoundingClientRect();return{id:t.getAttribute("data-handleid"),position:t.getAttribute("data-handlepos"),x:(e.left-a.left-s)/n,y:(e.top-a.top-u)/n,...O(t)}}))};function D({sourceX:t,sourceY:e,targetX:n,targetY:o,sourceControlX:r,sourceControlY:i,targetControlX:a,targetControlY:s}){const u=.125*t+.375*r+.375*a+.125*n,l=.125*e+.375*i+.375*s+.125*o;return[u,l,Math.abs(u-t),Math.abs(l-e)]}function L(t,e){return t>=0?.5*t:25*e*Math.sqrt(-t)}function V({pos:e,x1:n,y1:o,x2:r,y2:i,c:a}){switch(e){case t.Position.Left:return[n-L(n-r,a),o];case t.Position.Right:return[n+L(r-n,a),o];case t.Position.Top:return[n,o-L(o-i,a)];case t.Position.Bottom:return[n,o+L(i-o,a)]}}function q({sourceX:t,sourceY:e,targetX:n,targetY:o}){const r=Math.abs(n-t)/2,i=n<t?n+r:n-r,a=Math.abs(o-e)/2;return[i,o<e?o+a:o-a,r,a]}const Z=({source:t,sourceHandle:e,target:n,targetHandle:o})=>`xy-edge__${t}${e||""}-${n}${o||""}`;const G={[t.Position.Left]:{x:-1,y:0},[t.Position.Right]:{x:1,y:0},[t.Position.Top]:{x:0,y:-1},[t.Position.Bottom]:{x:0,y:1}},j=({source:e,sourcePosition:n=t.Position.Bottom,target:o})=>n===t.Position.Left||n===t.Position.Right?e.x<o.x?{x:1,y:0}:{x:-1,y:0}:e.y<o.y?{x:0,y:1}:{x:0,y:-1},W=(t,e)=>Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2));function F(t){return t&&!(!t.internals.handleBounds&&!t.handles?.length)&&!!(t.measured.width||t.width||t.initialWidth)}function K(t){if(!t)return null;const e=[],n=[];for(const o of t)o.width=o.width??1,o.height=o.height??1,"source"===o.type?e.push(o):"target"===o.type&&n.push(o);return{source:e,target:n}}function U(e,n,o=null){const r=(o?.x??0)+n.internals.positionAbsolute.x,i=(o?.y??0)+n.internals.positionAbsolute.y,{width:a,height:s}=o??C(n);switch(e){case t.Position.Top:return[r+a/2,i];case t.Position.Right:return[r+a,i+s/2];case t.Position.Bottom:return[r+a/2,i+s];case t.Position.Left:return[r,i+s/2]}}function Q(t,e){return t&&(e?t.find((t=>t.id===e)):t[0])||null}function J(t,e){if(!t)return"";if("string"==typeof t)return t;return`${e?`${e}__`:""}${Object.keys(t).sort().map((e=>`${e}=${t[e]}`)).join("&")}`}function tt(t,e={nodeOrigin:[0,0],elevateNodesOnSelect:!0,defaults:{}},n){const o=e?.elevateNodesOnSelect?1e3:0;for(const[r,i]of t){const a=i.parentId;if(a&&!t.has(a))throw new Error(`Parent node ${a} not found`);if(a||i.internals.isParent||n?.has(r)){const s=a?t.get(a):null,{x:u,y:l,z:c}=et(i,t,{...i.position,z:(P(i.zIndex)?i.zIndex:0)+(i.selected?o:0)},s?.origin||e.nodeOrigin),h=i.internals.positionAbsolute,d=u!==h.x||l!==h.y;i.internals.positionAbsolute=d?{x:u,y:l}:h,i.internals.z=c,void 0!==n&&(i.internals.isParent=!!n?.has(r)),t.set(r,i)}}}function et(t,e,n,o=[0,0]){if(!t.parentId)return n;const r=e.get(t.parentId),{position:i}=c(r,r?.origin||o);return et(r,e,{x:(n.x??0)+i.x,y:(n.y??0)+i.y,z:(r.internals.z??0)>(n.z??0)?r.internals.z??0:n.z??0},r.origin||o)}function nt(t,e){const n=[],o=new Map;return t.forEach((t=>{const n=t.parentId;if(t.expandParent&&n){const r=e.get(n);if(r){const e=o.get(n)||_(r,t.origin),i=M(e,_(t,t.origin));o.set(n,i)}}})),o.size>0&&o.forEach(((t,o)=>{const r=e.get(o),{position:i}=c(r,r.origin),a=C(r);if(t.x<i.x||t.y<i.y){const e=Math.round(Math.abs(i.x-t.x)),r=Math.round(Math.abs(i.y-t.y));n.push({id:o,type:"position",position:{x:i.x-e,y:i.y-r}}),n.push({id:o,type:"dimensions",resizing:!0,dimensions:{width:a.width+e,height:a.height+r}})}else(a.width<t.width||a.height<t.height)&&n.push({id:o,type:"dimensions",resizing:!0,dimensions:{width:Math.max(a.width,t.width),height:Math.max(a.height,t.height)}})})),n}var ot={value:()=>{}};function rt(){for(var t,e=0,n=arguments.length,o={};e<n;++e){if(!(t=arguments[e]+"")||t in o||/[\s.]/.test(t))throw new Error("illegal type: "+t);o[t]=[]}return new it(o)}function it(t){this._=t}function at(t,e){for(var n,o=0,r=t.length;o<r;++o)if((n=t[o]).name===e)return n.value}function st(t,e,n){for(var o=0,r=t.length;o<r;++o)if(t[o].name===e){t[o]=ot,t=t.slice(0,o).concat(t.slice(o+1));break}return null!=n&&t.push({name:e,value:n}),t}it.prototype=rt.prototype={constructor:it,on:function(t,e){var n,o,r=this._,i=(o=r,(t+"").trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!o.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),a=-1,s=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<s;)if(n=(t=i[a]).type)r[n]=st(r[n],t.name,e);else if(null==e)for(n in r)r[n]=st(r[n],t.name,null);return this}for(;++a<s;)if((n=(t=i[a]).type)&&(n=at(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new it(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,o,r=new Array(n),i=0;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=0,n=(o=this._[t]).length;i<n;++i)o[i].value.apply(e,r)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)}};var ut="http://www.w3.org/1999/xhtml",lt={svg:"http://www.w3.org/2000/svg",xhtml:ut,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ct(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),lt.hasOwnProperty(e)?{space:lt[e],local:t}:t}function ht(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===ut&&e.documentElement.namespaceURI===ut?e.createElement(t):e.createElementNS(n,t)}}function dt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ft(t){var e=ct(t);return(e.local?dt:ht)(e)}function pt(){}function gt(t){return null==t?pt:function(){return this.querySelector(t)}}function mt(){return[]}function yt(t){return null==t?mt:function(){return this.querySelectorAll(t)}}function vt(t){return function(){return null==(e=t.apply(this,arguments))?[]:Array.isArray(e)?e:Array.from(e);var e}}function xt(t){return function(){return this.matches(t)}}function wt(t){return function(e){return e.matches(t)}}var _t=Array.prototype.find;function bt(){return this.firstElementChild}var Mt=Array.prototype.filter;function Et(){return Array.from(this.children)}function Pt(t){return new Array(t.length)}function St(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function zt(t,e,n,o,r,i){for(var a,s=0,u=e.length,l=i.length;s<l;++s)(a=e[s])?(a.__data__=i[s],o[s]=a):n[s]=new St(t,i[s]);for(;s<u;++s)(a=e[s])&&(r[s]=a)}function Nt(t,e,n,o,r,i,a){var s,u,l,c=new Map,h=e.length,d=i.length,f=new Array(h);for(s=0;s<h;++s)(u=e[s])&&(f[s]=l=a.call(u,u.__data__,s,e)+"",c.has(l)?r[s]=u:c.set(l,u));for(s=0;s<d;++s)l=a.call(t,i[s],s,i)+"",(u=c.get(l))?(o[s]=u,u.__data__=i[s],c.delete(l)):n[s]=new St(t,i[s]);for(s=0;s<h;++s)(u=e[s])&&c.get(f[s])===u&&(r[s]=u)}function kt(t){return t.__data__}function At(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Tt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function $t(t){return function(){this.removeAttribute(t)}}function Ct(t){return function(){this.removeAttributeNS(t.space,t.local)}}function It(t,e){return function(){this.setAttribute(t,e)}}function Ot(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Ht(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Xt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Yt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Bt(t){return function(){this.style.removeProperty(t)}}function Rt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Dt(t,e,n){return function(){var o=e.apply(this,arguments);null==o?this.style.removeProperty(t):this.style.setProperty(t,o,n)}}function Lt(t,e){return t.style.getPropertyValue(e)||Yt(t).getComputedStyle(t,null).getPropertyValue(e)}function Vt(t){return function(){delete this[t]}}function qt(t,e){return function(){this[t]=e}}function Zt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Gt(t){return t.trim().split(/^|\s+/)}function jt(t){return t.classList||new Wt(t)}function Wt(t){this._node=t,this._names=Gt(t.getAttribute("class")||"")}function Ft(t,e){for(var n=jt(t),o=-1,r=e.length;++o<r;)n.add(e[o])}function Kt(t,e){for(var n=jt(t),o=-1,r=e.length;++o<r;)n.remove(e[o])}function Ut(t){return function(){Ft(this,t)}}function Qt(t){return function(){Kt(this,t)}}function Jt(t,e){return function(){(e.apply(this,arguments)?Ft:Kt)(this,t)}}function te(){this.textContent=""}function ee(t){return function(){this.textContent=t}}function ne(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function oe(){this.innerHTML=""}function re(t){return function(){this.innerHTML=t}}function ie(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function ae(){this.nextSibling&&this.parentNode.appendChild(this)}function se(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ue(){return null}function le(){var t=this.parentNode;t&&t.removeChild(this)}function ce(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function he(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function de(t){return function(){var e=this.__on;if(e){for(var n,o=0,r=-1,i=e.length;o<i;++o)n=e[o],t.type&&n.type!==t.type||n.name!==t.name?e[++r]=n:this.removeEventListener(n.type,n.listener,n.options);++r?e.length=r:delete this.__on}}}function fe(t,e,n){return function(){var o,r=this.__on,i=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(r)for(var a=0,s=r.length;a<s;++a)if((o=r[a]).type===t.type&&o.name===t.name)return this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=n),void(o.value=e);this.addEventListener(t.type,i,n),o={type:t.type,name:t.name,value:e,listener:i,options:n},r?r.push(o):this.__on=[o]}}function pe(t,e,n){var o=Yt(t),r=o.CustomEvent;"function"==typeof r?r=new r(e,n):(r=o.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function ge(t,e){return function(){return pe(this,t,e)}}function me(t,e){return function(){return pe(this,t,e.apply(this,arguments))}}St.prototype={constructor:St,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},Wt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var ye=[null];function ve(t,e){this._groups=t,this._parents=e}function xe(){return new ve([[document.documentElement]],ye)}function we(t){return"string"==typeof t?new ve([[document.querySelector(t)]],[document.documentElement]):new ve([[t]],ye)}function _e(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=t.clientX,o.y=t.clientY,[(o=o.matrixTransform(e.getScreenCTM().inverse())).x,o.y]}if(e.getBoundingClientRect){var r=e.getBoundingClientRect();return[t.clientX-r.left-e.clientLeft,t.clientY-r.top-e.clientTop]}}return[t.pageX,t.pageY]}ve.prototype=xe.prototype={constructor:ve,select:function(t){"function"!=typeof t&&(t=gt(t));for(var e=this._groups,n=e.length,o=new Array(n),r=0;r<n;++r)for(var i,a,s=e[r],u=s.length,l=o[r]=new Array(u),c=0;c<u;++c)(i=s[c])&&(a=t.call(i,i.__data__,c,s))&&("__data__"in i&&(a.__data__=i.__data__),l[c]=a);return new ve(o,this._parents)},selectAll:function(t){t="function"==typeof t?vt(t):yt(t);for(var e=this._groups,n=e.length,o=[],r=[],i=0;i<n;++i)for(var a,s=e[i],u=s.length,l=0;l<u;++l)(a=s[l])&&(o.push(t.call(a,a.__data__,l,s)),r.push(a));return new ve(o,r)},selectChild:function(t){return this.select(null==t?bt:function(t){return function(){return _t.call(this.children,t)}}("function"==typeof t?t:wt(t)))},selectChildren:function(t){return this.selectAll(null==t?Et:function(t){return function(){return Mt.call(this.children,t)}}("function"==typeof t?t:wt(t)))},filter:function(t){"function"!=typeof t&&(t=xt(t));for(var e=this._groups,n=e.length,o=new Array(n),r=0;r<n;++r)for(var i,a=e[r],s=a.length,u=o[r]=[],l=0;l<s;++l)(i=a[l])&&t.call(i,i.__data__,l,a)&&u.push(i);return new ve(o,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,kt);var n,o=e?Nt:zt,r=this._parents,i=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var a=i.length,s=new Array(a),u=new Array(a),l=new Array(a),c=0;c<a;++c){var h=r[c],d=i[c],f=d.length,p=At(t.call(h,h&&h.__data__,c,r)),g=p.length,m=u[c]=new Array(g),y=s[c]=new Array(g);o(h,d,m,y,l[c]=new Array(f),p,e);for(var v,x,w=0,_=0;w<g;++w)if(v=m[w]){for(w>=_&&(_=w+1);!(x=y[_])&&++_<g;);v._next=x||null}}return(s=new ve(s,r))._enter=u,s._exit=l,s},enter:function(){return new ve(this._enter||this._groups.map(Pt),this._parents)},exit:function(){return new ve(this._exit||this._groups.map(Pt),this._parents)},join:function(t,e,n){var o=this.enter(),r=this,i=this.exit();return"function"==typeof t?(o=t(o))&&(o=o.selection()):o=o.append(t+""),null!=e&&(r=e(r))&&(r=r.selection()),null==n?i.remove():n(i),o&&r?o.merge(r).order():r},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,o=e._groups,r=n.length,i=o.length,a=Math.min(r,i),s=new Array(r),u=0;u<a;++u)for(var l,c=n[u],h=o[u],d=c.length,f=s[u]=new Array(d),p=0;p<d;++p)(l=c[p]||h[p])&&(f[p]=l);for(;u<r;++u)s[u]=n[u];return new ve(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var o,r=t[e],i=r.length-1,a=r[i];--i>=0;)(o=r[i])&&(a&&4^o.compareDocumentPosition(a)&&a.parentNode.insertBefore(o,a),a=o);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Tt);for(var n=this._groups,o=n.length,r=new Array(o),i=0;i<o;++i){for(var a,s=n[i],u=s.length,l=r[i]=new Array(u),c=0;c<u;++c)(a=s[c])&&(l[c]=a);l.sort(e)}return new ve(r,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var o=t[e],r=0,i=o.length;r<i;++r){var a=o[r];if(a)return a}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,o=e.length;n<o;++n)for(var r,i=e[n],a=0,s=i.length;a<s;++a)(r=i[a])&&t.call(r,r.__data__,a,i);return this},attr:function(t,e){var n=ct(t);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((null==e?n.local?Ct:$t:"function"==typeof e?n.local?Xt:Ht:n.local?Ot:It)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Bt:"function"==typeof e?Dt:Rt)(t,e,null==n?"":n)):Lt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Vt:"function"==typeof e?Zt:qt)(t,e)):this.node()[t]},classed:function(t,e){var n=Gt(t+"");if(arguments.length<2){for(var o=jt(this.node()),r=-1,i=n.length;++r<i;)if(!o.contains(n[r]))return!1;return!0}return this.each(("function"==typeof e?Jt:e?Ut:Qt)(n,e))},text:function(t){return arguments.length?this.each(null==t?te:("function"==typeof t?ne:ee)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?oe:("function"==typeof t?ie:re)(t)):this.node().innerHTML},raise:function(){return this.each(ae)},lower:function(){return this.each(se)},append:function(t){var e="function"==typeof t?t:ft(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ft(t),o=null==e?ue:"function"==typeof e?e:gt(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)}))},remove:function(){return this.each(le)},clone:function(t){return this.select(t?he:ce)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var o,r,i=function(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),a=i.length;if(!(arguments.length<2)){for(s=e?fe:de,o=0;o<a;++o)this.each(s(i[o],e,n));return this}var s=this.node().__on;if(s)for(var u,l=0,c=s.length;l<c;++l)for(o=0,u=s[l];o<a;++o)if((r=i[o]).type===u.type&&r.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?me:ge)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var o,r=t[e],i=0,a=r.length;i<a;++i)(o=r[i])&&(yield o)}};const be={passive:!1},Me={capture:!0,passive:!1};function Ee(t){t.stopImmediatePropagation()}function Pe(t){t.preventDefault(),t.stopImmediatePropagation()}function Se(t){var e=t.document.documentElement,n=we(t).on("dragstart.drag",Pe,Me);"onselectstart"in e?n.on("selectstart.drag",Pe,Me):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function ze(t,e){var n=t.document.documentElement,o=we(t).on("dragstart.drag",null);e&&(o.on("click.drag",Pe,Me),setTimeout((function(){o.on("click.drag",null)}),0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Ne=t=>()=>t;function ke(t,{sourceEvent:e,subject:n,target:o,identifier:r,active:i,x:a,y:s,dx:u,dy:l,dispatch:c}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:c}})}function Ae(t){return!t.ctrlKey&&!t.button}function Te(){return this.parentNode}function $e(t,e){return null==e?{x:t.x,y:t.y}:e}function Ce(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ie(){var t,e,n,o,r=Ae,i=Te,a=$e,s=Ce,u={},l=rt("start","drag","end"),c=0,h=0;function d(t){t.on("mousedown.drag",f).filter(s).on("touchstart.drag",m).on("touchmove.drag",y,be).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(a,s){if(!o&&r.call(this,a,s)){var u=x(this,i.call(this,a,s),a,s,"mouse");u&&(we(a.view).on("mousemove.drag",p,Me).on("mouseup.drag",g,Me),Se(a.view),Ee(a),n=!1,t=a.clientX,e=a.clientY,u("start",a))}}function p(o){if(Pe(o),!n){var r=o.clientX-t,i=o.clientY-e;n=r*r+i*i>h}u.mouse("drag",o)}function g(t){we(t.view).on("mousemove.drag mouseup.drag",null),ze(t.view,n),Pe(t),u.mouse("end",t)}function m(t,e){if(r.call(this,t,e)){var n,o,a=t.changedTouches,s=i.call(this,t,e),u=a.length;for(n=0;n<u;++n)(o=x(this,s,t,e,a[n].identifier,a[n]))&&(Ee(t),o("start",t,a[n]))}}function y(t){var e,n,o=t.changedTouches,r=o.length;for(e=0;e<r;++e)(n=u[o[e].identifier])&&(Pe(t),n("drag",t,o[e]))}function v(t){var e,n,r=t.changedTouches,i=r.length;for(o&&clearTimeout(o),o=setTimeout((function(){o=null}),500),e=0;e<i;++e)(n=u[r[e].identifier])&&(Ee(t),n("end",t,r[e]))}function x(t,e,n,o,r,i){var s,h,f,p=l.copy(),g=_e(i||n,e);if(null!=(f=a.call(t,new ke("beforestart",{sourceEvent:n,target:d,identifier:r,active:c,x:g[0],y:g[1],dx:0,dy:0,dispatch:p}),o)))return s=f.x-g[0]||0,h=f.y-g[1]||0,function n(i,a,l){var m,y=g;switch(i){case"start":u[r]=n,m=c++;break;case"end":delete u[r],--c;case"drag":g=_e(l||a,e),m=c}p.call(i,t,new ke(i,{sourceEvent:a,subject:f,target:d,identifier:r,active:m,x:g[0]+s,y:g[1]+h,dx:g[0]-y[0],dy:g[1]-y[1],dispatch:p}),o)}}return d.filter=function(t){return arguments.length?(r="function"==typeof t?t:Ne(!!t),d):r},d.container=function(t){return arguments.length?(i="function"==typeof t?t:Ne(t),d):i},d.subject=function(t){return arguments.length?(a="function"==typeof t?t:Ne(t),d):a},d.touchable=function(t){return arguments.length?(s="function"==typeof t?t:Ne(!!t),d):s},d.on=function(){var t=l.on.apply(l,arguments);return t===l?d:t},d.clickDistance=function(t){return arguments.length?(h=(t=+t)*t,d):Math.sqrt(h)},d}function Oe(t){return(e,n,o)=>t?.(e,o)}function He(t,e){if(!t.parentId)return!1;const n=e.get(t.parentId);return!!n&&(!!n.selected||He(n,e))}function Xe(t,e,n){let o=t;do{if(o?.matches(e))return!0;if(o===n)return!1;o=o.parentElement}while(o);return!1}function Ye({nodeId:t,dragItems:e,nodeLookup:n}){const o=e.map((t=>({...n.get(t.id),position:t.position,measured:{...t.measured}})));return[t?o.find((e=>e.id===t)):o[0],o]}function Be(t,e,n,o){return(e[n]||[]).reduce(((e,r)=>(`${t.id}-${r.id}-${n}`!==o&&e.push({id:r.id||null,type:n,nodeId:t.id,x:t.internals.positionAbsolute.x+r.x+r.width/2,y:t.internals.positionAbsolute.y+r.y+r.height/2}),e)),[])}function Re(t,e){return t||(e?.classList.contains("target")?"target":e?.classList.contains("source")?"source":null)}function De(t,e){let n=null;return e?n="valid":t&&!e&&(n="invalid"),n}ke.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};const Le=()=>!0;let Ve=null;function qe(e,{handle:n,connectionMode:o,fromNodeId:r,fromHandleId:i,fromType:a,doc:s,lib:u,flowId:l,isValidConnection:c=Le}){const h="target"===a,d=n?s.querySelector(`.${u}-flow__handle[data-id="${l}-${n?.nodeId}-${n?.id}-${n?.type}"]`):null,{x:f,y:p}=B(e),g=s.elementFromPoint(f,p),m=g?.classList.contains(`${u}-flow__handle`)?g:d,y={handleDomNode:m,isValid:!1,connection:null,endHandle:null};if(m){const e=Re(void 0,m),n=m.getAttribute("data-nodeid"),a=m.getAttribute("data-handleid"),s=m.classList.contains("connectable"),u=m.classList.contains("connectableend");if(!n)return y;const l={source:h?n:r,sourceHandle:h?a:i,target:h?r:n,targetHandle:h?i:a};y.connection=l;s&&u&&(o===t.ConnectionMode.Strict?h&&"source"===e||!h&&"target"===e:n!==r||a!==i)&&(y.endHandle={nodeId:n,handleId:a,type:e},y.isValid=c(l))}return y}const Ze={onPointerDown:function(t,{connectionMode:e,connectionRadius:n,handleId:o,nodeId:r,edgeUpdaterType:i,isTarget:a,domNode:s,nodeLookup:u,lib:l,autoPanOnConnect:c,flowId:h,panBy:d,cancelConnection:f,onConnectStart:p,onConnect:g,onConnectEnd:m,isValidConnection:v=Le,onEdgeUpdateEnd:x,updateConnection:w,getTransform:_,getConnectionStartHandle:b}){const M=H(t.target);let E,P=0;const{x:S,y:z}=B(t),A=M?.elementFromPoint(S,z),T=Re(i,A),$=s?.getBoundingClientRect();if(!$||!T)return;let C=B(t,$),I=!1,O=null,X=!1,Y=null;const R=function({nodeLookup:t,nodeId:e,handleId:n,handleType:o}){const r=[];for(const[,i]of t)if(i.internals.handleBounds){const t=`${e}-${n}-${o}`,a=Be(i,i.internals.handleBounds,"source",t),s=Be(i,i.internals.handleBounds,"target",t);r.push(...a,...s)}return r}({nodeLookup:u,nodeId:r,handleId:o,handleType:T});function D(){if(!c||!$)return;const[t,e]=y(C,$);d({x:t,y:e}),P=requestAnimationFrame(D)}function L(t){b()||V(t);const i=_();C=B(t,$),E=function(t,e,n){let o=[],r=1/0;for(const i of n){const n=Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2));n<=e&&(n<r?o=[i]:n===r&&o.push(i),r=n)}return o.length?1===o.length?o[0]:o.find((t=>"target"===t.type))||o[0]:null}(N(C,i,!1,[1,1]),n,R),I||(D(),I=!0);const s=qe(t,{handle:E,connectionMode:e,fromNodeId:r,fromHandleId:o,fromType:a?"target":"source",isValidConnection:v,doc:M,lib:l,flowId:h});Y=s.handleDomNode,O=s.connection,X=s.isValid,w({connectionStartHandle:Ve,connectionPosition:E&&X?k({x:E.x,y:E.y},i):C,connectionStatus:De(!!E,X),connectionEndHandle:s.endHandle})}function V(t){(E||Y)&&O&&X&&g?.(O),m?.(t),i&&x?.(t),f(),cancelAnimationFrame(P),I=!1,X=!1,O=null,Y=null,Ve=null,M.removeEventListener("mousemove",L),M.removeEventListener("mouseup",V),M.removeEventListener("touchmove",L),M.removeEventListener("touchend",V)}Ve={nodeId:r,handleId:o,type:T},w({connectionPosition:C,connectionStatus:null,connectionStartHandle:Ve,connectionEndHandle:null}),p?.(t,{nodeId:r,handleId:o,handleType:T}),M.addEventListener("mousemove",L),M.addEventListener("mouseup",V),M.addEventListener("touchmove",L),M.addEventListener("touchend",V)},isValid:qe};function Ge(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function je(t,e){var n=Object.create(t.prototype);for(var o in e)n[o]=e[o];return n}function We(){}var Fe=.7,Ke=1/Fe,Ue="\\s*([+-]?\\d+)\\s*",Qe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Je="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",tn=/^#([0-9a-f]{3,8})$/,en=new RegExp(`^rgb\\(${Ue},${Ue},${Ue}\\)$`),nn=new RegExp(`^rgb\\(${Je},${Je},${Je}\\)$`),on=new RegExp(`^rgba\\(${Ue},${Ue},${Ue},${Qe}\\)$`),rn=new RegExp(`^rgba\\(${Je},${Je},${Je},${Qe}\\)$`),an=new RegExp(`^hsl\\(${Qe},${Je},${Je}\\)$`),sn=new RegExp(`^hsla\\(${Qe},${Je},${Je},${Qe}\\)$`),un={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function ln(){return this.rgb().formatHex()}function cn(){return this.rgb().formatRgb()}function hn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=tn.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?dn(e):3===n?new gn(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?fn(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?fn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=en.exec(t))?new gn(e[1],e[2],e[3],1):(e=nn.exec(t))?new gn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=on.exec(t))?fn(e[1],e[2],e[3],e[4]):(e=rn.exec(t))?fn(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=an.exec(t))?_n(e[1],e[2]/100,e[3]/100,1):(e=sn.exec(t))?_n(e[1],e[2]/100,e[3]/100,e[4]):un.hasOwnProperty(t)?dn(un[t]):"transparent"===t?new gn(NaN,NaN,NaN,0):null}function dn(t){return new gn(t>>16&255,t>>8&255,255&t,1)}function fn(t,e,n,o){return o<=0&&(t=e=n=NaN),new gn(t,e,n,o)}function pn(t,e,n,o){return 1===arguments.length?((r=t)instanceof We||(r=hn(r)),r?new gn((r=r.rgb()).r,r.g,r.b,r.opacity):new gn):new gn(t,e,n,null==o?1:o);var r}function gn(t,e,n,o){this.r=+t,this.g=+e,this.b=+n,this.opacity=+o}function mn(){return`#${wn(this.r)}${wn(this.g)}${wn(this.b)}`}function yn(){const t=vn(this.opacity);return`${1===t?"rgb(":"rgba("}${xn(this.r)}, ${xn(this.g)}, ${xn(this.b)}${1===t?")":`, ${t})`}`}function vn(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function xn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function wn(t){return((t=xn(t))<16?"0":"")+t.toString(16)}function _n(t,e,n,o){return o<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Mn(t,e,n,o)}function bn(t){if(t instanceof Mn)return new Mn(t.h,t.s,t.l,t.opacity);if(t instanceof We||(t=hn(t)),!t)return new Mn;if(t instanceof Mn)return t;var e=(t=t.rgb()).r/255,n=t.g/255,o=t.b/255,r=Math.min(e,n,o),i=Math.max(e,n,o),a=NaN,s=i-r,u=(i+r)/2;return s?(a=e===i?(n-o)/s+6*(n<o):n===i?(o-e)/s+2:(e-n)/s+4,s/=u<.5?i+r:2-i-r,a*=60):s=u>0&&u<1?0:a,new Mn(a,s,u,t.opacity)}function Mn(t,e,n,o){this.h=+t,this.s=+e,this.l=+n,this.opacity=+o}function En(t){return(t=(t||0)%360)<0?t+360:t}function Pn(t){return Math.max(0,Math.min(1,t||0))}function Sn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Ge(We,hn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:ln,formatHex:ln,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return bn(this).formatHsl()},formatRgb:cn,toString:cn}),Ge(gn,pn,je(We,{brighter(t){return t=null==t?Ke:Math.pow(Ke,t),new gn(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Fe:Math.pow(Fe,t),new gn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new gn(xn(this.r),xn(this.g),xn(this.b),vn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:mn,formatHex:mn,formatHex8:function(){return`#${wn(this.r)}${wn(this.g)}${wn(this.b)}${wn(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:yn,toString:yn})),Ge(Mn,(function(t,e,n,o){return 1===arguments.length?bn(t):new Mn(t,e,n,null==o?1:o)}),je(We,{brighter(t){return t=null==t?Ke:Math.pow(Ke,t),new Mn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Fe:Math.pow(Fe,t),new Mn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*e,r=2*n-o;return new gn(Sn(t>=240?t-240:t+120,r,o),Sn(t,r,o),Sn(t<120?t+240:t-120,r,o),this.opacity)},clamp(){return new Mn(En(this.h),Pn(this.s),Pn(this.l),vn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=vn(this.opacity);return`${1===t?"hsl(":"hsla("}${En(this.h)}, ${100*Pn(this.s)}%, ${100*Pn(this.l)}%${1===t?")":`, ${t})`}`}}));var zn=t=>()=>t;function Nn(t){return 1==(t=+t)?kn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(o){return Math.pow(t+o*e,n)}}(e,n,t):zn(isNaN(e)?n:e)}}function kn(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):zn(isNaN(t)?e:t)}var An=function t(e){var n=Nn(e);function o(t,e){var o=n((t=pn(t)).r,(e=pn(e)).r),r=n(t.g,e.g),i=n(t.b,e.b),a=kn(t.opacity,e.opacity);return function(e){return t.r=o(e),t.g=r(e),t.b=i(e),t.opacity=a(e),t+""}}return o.gamma=t,o}(1);function Tn(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var $n=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Cn=new RegExp($n.source,"g");function In(t,e){var n,o,r,i=$n.lastIndex=Cn.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=$n.exec(t))&&(o=Cn.exec(e));)(r=o.index)>i&&(r=e.slice(i,r),s[a]?s[a]+=r:s[++a]=r),(n=n[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,u.push({i:a,x:Tn(n,o)})),i=Cn.lastIndex;return i<e.length&&(r=e.slice(i),s[a]?s[a]+=r:s[++a]=r),s.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,o=0;o<e;++o)s[(n=u[o]).i]=n.x(t);return s.join("")})}var On,Hn=180/Math.PI,Xn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Yn(t,e,n,o,r,i){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*o)&&(n-=t*u,o-=e*u),(s=Math.sqrt(n*n+o*o))&&(n/=s,o/=s,u/=s),t*o<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:r,translateY:i,rotate:Math.atan2(e,t)*Hn,skewX:Math.atan(u)*Hn,scaleX:a,scaleY:s}}function Bn(t,e,n,o){function r(t){return t.length?t.pop()+" ":""}return function(i,a){var s=[],u=[];return i=t(i),a=t(a),function(t,o,r,i,a,s){if(t!==r||o!==i){var u=a.push("translate(",null,e,null,n);s.push({i:u-4,x:Tn(t,r)},{i:u-2,x:Tn(o,i)})}else(r||i)&&a.push("translate("+r+e+i+n)}(i.translateX,i.translateY,a.translateX,a.translateY,s,u),function(t,e,n,i){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),i.push({i:n.push(r(n)+"rotate(",null,o)-2,x:Tn(t,e)})):e&&n.push(r(n)+"rotate("+e+o)}(i.rotate,a.rotate,s,u),function(t,e,n,i){t!==e?i.push({i:n.push(r(n)+"skewX(",null,o)-2,x:Tn(t,e)}):e&&n.push(r(n)+"skewX("+e+o)}(i.skewX,a.skewX,s,u),function(t,e,n,o,i,a){if(t!==n||e!==o){var s=i.push(r(i)+"scale(",null,",",null,")");a.push({i:s-4,x:Tn(t,n)},{i:s-2,x:Tn(e,o)})}else 1===n&&1===o||i.push(r(i)+"scale("+n+","+o+")")}(i.scaleX,i.scaleY,a.scaleX,a.scaleY,s,u),i=a=null,function(t){for(var e,n=-1,o=u.length;++n<o;)s[(e=u[n]).i]=e.x(t);return s.join("")}}}var Rn=Bn((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Xn:Yn(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),Dn=Bn((function(t){return null==t?Xn:(On||(On=document.createElementNS("http://www.w3.org/2000/svg","g")),On.setAttribute("transform",t),(t=On.transform.baseVal.consolidate())?Yn((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Xn)}),", ",")",")");function Ln(t){return((t=Math.exp(t))+1/t)/2}var Vn,qn,Zn=function t(e,n,o){function r(t,r){var i,a,s=t[0],u=t[1],l=t[2],c=r[0],h=r[1],d=r[2],f=c-s,p=h-u,g=f*f+p*p;if(g<1e-12)a=Math.log(d/l)/e,i=function(t){return[s+t*f,u+t*p,l*Math.exp(e*t*a)]};else{var m=Math.sqrt(g),y=(d*d-l*l+o*g)/(2*l*n*m),v=(d*d-l*l-o*g)/(2*d*n*m),x=Math.log(Math.sqrt(y*y+1)-y),w=Math.log(Math.sqrt(v*v+1)-v);a=(w-x)/e,i=function(t){var o,r=t*a,i=Ln(x),c=l/(n*m)*(i*(o=e*r+x,((o=Math.exp(2*o))-1)/(o+1))-function(t){return((t=Math.exp(t))-1/t)/2}(x));return[s+c*f,u+c*p,l*i/Ln(e*r+x)]}}return i.duration=1e3*a*e/Math.SQRT2,i}return r.rho=function(e){var n=Math.max(.001,+e),o=n*n;return t(n,o,o*o)},r}(Math.SQRT2,2,4),Gn=0,jn=0,Wn=0,Fn=1e3,Kn=0,Un=0,Qn=0,Jn="object"==typeof performance&&performance.now?performance:Date,to="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function eo(){return Un||(to(no),Un=Jn.now()+Qn)}function no(){Un=0}function oo(){this._call=this._time=this._next=null}function ro(t,e,n){var o=new oo;return o.restart(t,e,n),o}function io(){Un=(Kn=Jn.now())+Qn,Gn=jn=0;try{!function(){eo(),++Gn;for(var t,e=Vn;e;)(t=Un-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Gn}()}finally{Gn=0,function(){var t,e,n=Vn,o=1/0;for(;n;)n._call?(o>n._time&&(o=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Vn=e);qn=t,so(o)}(),Un=0}}function ao(){var t=Jn.now(),e=t-Kn;e>Fn&&(Qn-=e,Kn=t)}function so(t){Gn||(jn&&(jn=clearTimeout(jn)),t-Un>24?(t<1/0&&(jn=setTimeout(io,t-Jn.now()-Qn)),Wn&&(Wn=clearInterval(Wn))):(Wn||(Kn=Jn.now(),Wn=setInterval(ao,Fn)),Gn=1,to(io)))}function uo(t,e,n){var o=new oo;return e=null==e?0:+e,o.restart((n=>{o.stop(),t(n+e)}),e,n),o}oo.prototype=ro.prototype={constructor:oo,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?eo():+n)+(null==e?0:+e),this._next||qn===this||(qn?qn._next=this:Vn=this,qn=this),this._call=t,this._time=n,so()},stop:function(){this._call&&(this._call=null,this._time=1/0,so())}};var lo=rt("start","end","cancel","interrupt"),co=[],ho=0,fo=1,po=2,go=3,mo=4,yo=5,vo=6;function xo(t,e,n,o,r,i){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var o,r=t.__transition;function i(t){n.state=fo,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}function a(i){var l,c,h,d;if(n.state!==fo)return u();for(l in r)if((d=r[l]).name===n.name){if(d.state===go)return uo(a);d.state===mo?(d.state=vo,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[l]):+l<e&&(d.state=vo,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[l])}if(uo((function(){n.state===go&&(n.state=mo,n.timer.restart(s,n.delay,n.time),s(i))})),n.state=po,n.on.call("start",t,t.__data__,n.index,n.group),n.state===po){for(n.state=go,o=new Array(h=n.tween.length),l=0,c=-1;l<h;++l)(d=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(o[++c]=d);o.length=c+1}}function s(e){for(var r=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(u),n.state=yo,1),i=-1,a=o.length;++i<a;)o[i].call(t,r);n.state===yo&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){for(var o in n.state=vo,n.timer.stop(),delete r[e],r)return;delete t.__transition}r[e]=n,n.timer=ro(i,0,n.time)}(t,n,{name:e,index:o,group:r,on:lo,tween:co,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:ho})}function wo(t,e){var n=bo(t,e);if(n.state>ho)throw new Error("too late; already scheduled");return n}function _o(t,e){var n=bo(t,e);if(n.state>go)throw new Error("too late; already running");return n}function bo(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Mo(t,e){var n,o,r,i=t.__transition,a=!0;if(i){for(r in e=null==e?null:e+"",i)(n=i[r]).name===e?(o=n.state>po&&n.state<yo,n.state=vo,n.timer.stop(),n.on.call(o?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete i[r]):a=!1;a&&delete t.__transition}}function Eo(t,e){var n,o;return function(){var r=_o(this,t),i=r.tween;if(i!==n)for(var a=0,s=(o=n=i).length;a<s;++a)if(o[a].name===e){(o=o.slice()).splice(a,1);break}r.tween=o}}function Po(t,e,n){var o,r;if("function"!=typeof n)throw new Error;return function(){var i=_o(this,t),a=i.tween;if(a!==o){r=(o=a).slice();for(var s={name:e,value:n},u=0,l=r.length;u<l;++u)if(r[u].name===e){r[u]=s;break}u===l&&r.push(s)}i.tween=r}}function So(t,e,n){var o=t._id;return t.each((function(){var t=_o(this,o);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return bo(t,o).value[e]}}function zo(t,e){var n;return("number"==typeof e?Tn:e instanceof hn?An:(n=hn(e))?(e=n,An):In)(t,e)}function No(t){return function(){this.removeAttribute(t)}}function ko(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ao(t,e,n){var o,r,i=n+"";return function(){var a=this.getAttribute(t);return a===i?null:a===o?r:r=e(o=a,n)}}function To(t,e,n){var o,r,i=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===o?r:r=e(o=a,n)}}function $o(t,e,n){var o,r,i;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttribute(t))===(s=u+"")?null:a===o&&s===r?i:(r=s,i=e(o=a,u));this.removeAttribute(t)}}function Co(t,e,n){var o,r,i;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttributeNS(t.space,t.local))===(s=u+"")?null:a===o&&s===r?i:(r=s,i=e(o=a,u));this.removeAttributeNS(t.space,t.local)}}function Io(t,e){var n,o;function r(){var r=e.apply(this,arguments);return r!==o&&(n=(o=r)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,r)),n}return r._value=e,r}function Oo(t,e){var n,o;function r(){var r=e.apply(this,arguments);return r!==o&&(n=(o=r)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,r)),n}return r._value=e,r}function Ho(t,e){return function(){wo(this,t).delay=+e.apply(this,arguments)}}function Xo(t,e){return e=+e,function(){wo(this,t).delay=e}}function Yo(t,e){return function(){_o(this,t).duration=+e.apply(this,arguments)}}function Bo(t,e){return e=+e,function(){_o(this,t).duration=e}}var Ro=xe.prototype.constructor;function Do(t){return function(){this.style.removeProperty(t)}}var Lo=0;function Vo(t,e,n,o){this._groups=t,this._parents=e,this._name=n,this._id=o}function qo(){return++Lo}var Zo=xe.prototype;Vo.prototype={constructor:Vo,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=gt(t));for(var o=this._groups,r=o.length,i=new Array(r),a=0;a<r;++a)for(var s,u,l=o[a],c=l.length,h=i[a]=new Array(c),d=0;d<c;++d)(s=l[d])&&(u=t.call(s,s.__data__,d,l))&&("__data__"in s&&(u.__data__=s.__data__),h[d]=u,xo(h[d],e,n,d,h,bo(s,n)));return new Vo(i,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=yt(t));for(var o=this._groups,r=o.length,i=[],a=[],s=0;s<r;++s)for(var u,l=o[s],c=l.length,h=0;h<c;++h)if(u=l[h]){for(var d,f=t.call(u,u.__data__,h,l),p=bo(u,n),g=0,m=f.length;g<m;++g)(d=f[g])&&xo(d,e,n,g,f,p);i.push(f),a.push(u)}return new Vo(i,a,e,n)},selectChild:Zo.selectChild,selectChildren:Zo.selectChildren,filter:function(t){"function"!=typeof t&&(t=xt(t));for(var e=this._groups,n=e.length,o=new Array(n),r=0;r<n;++r)for(var i,a=e[r],s=a.length,u=o[r]=[],l=0;l<s;++l)(i=a[l])&&t.call(i,i.__data__,l,a)&&u.push(i);return new Vo(o,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,o=e.length,r=n.length,i=Math.min(o,r),a=new Array(o),s=0;s<i;++s)for(var u,l=e[s],c=n[s],h=l.length,d=a[s]=new Array(h),f=0;f<h;++f)(u=l[f]||c[f])&&(d[f]=u);for(;s<o;++s)a[s]=e[s];return new Vo(a,this._parents,this._name,this._id)},selection:function(){return new Ro(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=qo(),o=this._groups,r=o.length,i=0;i<r;++i)for(var a,s=o[i],u=s.length,l=0;l<u;++l)if(a=s[l]){var c=bo(a,e);xo(a,t,n,l,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Vo(o,this._parents,t,n)},call:Zo.call,nodes:Zo.nodes,node:Zo.node,size:Zo.size,empty:Zo.empty,each:Zo.each,on:function(t,e){var n=this._id;return arguments.length<2?bo(this.node(),n).on.on(t):this.each(function(t,e,n){var o,r,i=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?wo:_o;return function(){var a=i(this,t),s=a.on;s!==o&&(r=(o=s).copy()).on(e,n),a.on=r}}(n,t,e))},attr:function(t,e){var n=ct(t),o="transform"===n?Dn:zo;return this.attrTween(t,"function"==typeof e?(n.local?Co:$o)(n,o,So(this,"attr."+t,e)):null==e?(n.local?ko:No)(n):(n.local?To:Ao)(n,o,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var o=ct(t);return this.tween(n,(o.local?Io:Oo)(o,e))},style:function(t,e,n){var o="transform"==(t+="")?Rn:zo;return null==e?this.styleTween(t,function(t,e){var n,o,r;return function(){var i=Lt(this,t),a=(this.style.removeProperty(t),Lt(this,t));return i===a?null:i===n&&a===o?r:r=e(n=i,o=a)}}(t,o)).on("end.style."+t,Do(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var o,r,i;return function(){var a=Lt(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=Lt(this,t)),a===u?null:a===o&&u===r?i:(r=u,i=e(o=a,s))}}(t,o,So(this,"style."+t,e))).each(function(t,e){var n,o,r,i,a="style."+e,s="end."+a;return function(){var u=_o(this,t),l=u.on,c=null==u.value[a]?i||(i=Do(e)):void 0;l===n&&r===c||(o=(n=l).copy()).on(s,r=c),u.on=o}}(this._id,t)):this.styleTween(t,function(t,e,n){var o,r,i=n+"";return function(){var a=Lt(this,t);return a===i?null:a===o?r:r=e(o=a,n)}}(t,o,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var o="style."+(t+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(null==e)return this.tween(o,null);if("function"!=typeof e)throw new Error;return this.tween(o,function(t,e,n){var o,r;function i(){var i=e.apply(this,arguments);return i!==r&&(o=(r=i)&&function(t,e,n){return function(o){this.style.setProperty(t,e.call(this,o),n)}}(t,i,n)),o}return i._value=e,i}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(So(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function o(){var o=t.apply(this,arguments);return o!==n&&(e=(n=o)&&function(t){return function(e){this.textContent=t.call(this,e)}}(o)),e}return o._value=t,o}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var o,r=bo(this.node(),n).tween,i=0,a=r.length;i<a;++i)if((o=r[i]).name===t)return o.value;return null}return this.each((null==e?Eo:Po)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Ho:Xo)(e,t)):bo(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Yo:Bo)(e,t)):bo(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){_o(this,t).ease=e}}(e,t)):bo(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;_o(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,o=n._id,r=n.size();return new Promise((function(i,a){var s={value:a},u={value:function(){0==--r&&i()}};n.each((function(){var n=_o(this,o),r=n.on;r!==t&&((e=(t=r).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),n.on=e})),0===r&&i()}))},[Symbol.iterator]:Zo[Symbol.iterator]};var Go={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function jo(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}xe.prototype.interrupt=function(t){return this.each((function(){Mo(this,t)}))},xe.prototype.transition=function(t){var e,n;t instanceof Vo?(e=t._id,t=t._name):(e=qo(),(n=Go).time=eo(),t=null==t?null:t+"");for(var o=this._groups,r=o.length,i=0;i<r;++i)for(var a,s=o[i],u=s.length,l=0;l<u;++l)(a=s[l])&&xo(a,t,e,l,s,n||jo(a,e));return new Vo(o,this._parents,t,e)};var Wo=t=>()=>t;function Fo(t,{sourceEvent:e,target:n,transform:o,dispatch:r}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:r}})}function Ko(t,e,n){this.k=t,this.x=e,this.y=n}Ko.prototype={constructor:Ko,scale:function(t){return 1===t?this:new Ko(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Ko(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Uo=new Ko(1,0,0);function Qo(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Uo;return t.__zoom}function Jo(t){t.stopImmediatePropagation()}function tr(t){t.preventDefault(),t.stopImmediatePropagation()}function er(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function nr(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function or(){return this.__zoom||Uo}function rr(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function ir(){return navigator.maxTouchPoints||"ontouchstart"in this}function ar(t,e,n){var o=t.invertX(e[0][0])-n[0][0],r=t.invertX(e[1][0])-n[1][0],i=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(r>o?(o+r)/2:Math.min(0,o)||Math.max(0,r),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}function sr(){var t,e,n,o=er,r=nr,i=ar,a=rr,s=ir,u=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],c=250,h=Zn,d=rt("start","zoom","end"),f=500,p=150,g=0,m=10;function y(t){t.property("__zoom",or).on("wheel.zoom",E,{passive:!1}).on("mousedown.zoom",P).on("dblclick.zoom",S).filter(s).on("touchstart.zoom",z).on("touchmove.zoom",N).on("touchend.zoom touchcancel.zoom",k).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(t,e){return(e=Math.max(u[0],Math.min(u[1],e)))===t.k?t:new Ko(e,t.x,t.y)}function x(t,e,n){var o=e[0]-n[0]*t.k,r=e[1]-n[1]*t.k;return o===t.x&&r===t.y?t:new Ko(t.k,o,r)}function w(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function _(t,e,n,o){t.on("start.zoom",(function(){b(this,arguments).event(o).start()})).on("interrupt.zoom end.zoom",(function(){b(this,arguments).event(o).end()})).tween("zoom",(function(){var t=this,i=arguments,a=b(t,i).event(o),s=r.apply(t,i),u=null==n?w(s):"function"==typeof n?n.apply(t,i):n,l=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),c=t.__zoom,d="function"==typeof e?e.apply(t,i):e,f=h(c.invert(u).concat(l/c.k),d.invert(u).concat(l/d.k));return function(t){if(1===t)t=d;else{var e=f(t),n=l/e[2];t=new Ko(n,u[0]-e[0]*n,u[1]-e[1]*n)}a.zoom(null,t)}}))}function b(t,e,n){return!n&&t.__zooming||new M(t,e)}function M(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=r.apply(t,e),this.taps=0}function E(t,...e){if(o.apply(this,arguments)){var n=b(this,e).event(t),r=this.__zoom,s=Math.max(u[0],Math.min(u[1],r.k*Math.pow(2,a.apply(this,arguments)))),c=_e(t);if(n.wheel)n.mouse[0][0]===c[0]&&n.mouse[0][1]===c[1]||(n.mouse[1]=r.invert(n.mouse[0]=c)),clearTimeout(n.wheel);else{if(r.k===s)return;n.mouse=[c,r.invert(c)],Mo(this),n.start()}tr(t),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),p),n.zoom("mouse",i(x(v(r,s),n.mouse[0],n.mouse[1]),n.extent,l))}}function P(t,...e){if(!n&&o.apply(this,arguments)){var r=t.currentTarget,a=b(this,e,!0).event(t),s=we(t.view).on("mousemove.zoom",(function(t){if(tr(t),!a.moved){var e=t.clientX-c,n=t.clientY-h;a.moved=e*e+n*n>g}a.event(t).zoom("mouse",i(x(a.that.__zoom,a.mouse[0]=_e(t,r),a.mouse[1]),a.extent,l))}),!0).on("mouseup.zoom",(function(t){s.on("mousemove.zoom mouseup.zoom",null),ze(t.view,a.moved),tr(t),a.event(t).end()}),!0),u=_e(t,r),c=t.clientX,h=t.clientY;Se(t.view),Jo(t),a.mouse=[u,this.__zoom.invert(u)],Mo(this),a.start()}}function S(t,...e){if(o.apply(this,arguments)){var n=this.__zoom,a=_e(t.changedTouches?t.changedTouches[0]:t,this),s=n.invert(a),u=n.k*(t.shiftKey?.5:2),h=i(x(v(n,u),a,s),r.apply(this,e),l);tr(t),c>0?we(this).transition().duration(c).call(_,h,a,t):we(this).call(y.transform,h,a,t)}}function z(n,...r){if(o.apply(this,arguments)){var i,a,s,u,l=n.touches,c=l.length,h=b(this,r,n.changedTouches.length===c).event(n);for(Jo(n),a=0;a<c;++a)u=[u=_e(s=l[a],this),this.__zoom.invert(u),s.identifier],h.touch0?h.touch1||h.touch0[2]===u[2]||(h.touch1=u,h.taps=0):(h.touch0=u,i=!0,h.taps=1+!!t);t&&(t=clearTimeout(t)),i&&(h.taps<2&&(e=u[0],t=setTimeout((function(){t=null}),f)),Mo(this),h.start())}}function N(t,...e){if(this.__zooming){var n,o,r,a,s=b(this,e).event(t),u=t.changedTouches,c=u.length;for(tr(t),n=0;n<c;++n)r=_e(o=u[n],this),s.touch0&&s.touch0[2]===o.identifier?s.touch0[0]=r:s.touch1&&s.touch1[2]===o.identifier&&(s.touch1[0]=r);if(o=s.that.__zoom,s.touch1){var h=s.touch0[0],d=s.touch0[1],f=s.touch1[0],p=s.touch1[1],g=(g=f[0]-h[0])*g+(g=f[1]-h[1])*g,m=(m=p[0]-d[0])*m+(m=p[1]-d[1])*m;o=v(o,Math.sqrt(g/m)),r=[(h[0]+f[0])/2,(h[1]+f[1])/2],a=[(d[0]+p[0])/2,(d[1]+p[1])/2]}else{if(!s.touch0)return;r=s.touch0[0],a=s.touch0[1]}s.zoom("touch",i(x(o,r,a),s.extent,l))}}function k(t,...o){if(this.__zooming){var r,i,a=b(this,o).event(t),s=t.changedTouches,u=s.length;for(Jo(t),n&&clearTimeout(n),n=setTimeout((function(){n=null}),f),r=0;r<u;++r)i=s[r],a.touch0&&a.touch0[2]===i.identifier?delete a.touch0:a.touch1&&a.touch1[2]===i.identifier&&delete a.touch1;if(a.touch1&&!a.touch0&&(a.touch0=a.touch1,delete a.touch1),a.touch0)a.touch0[1]=this.__zoom.invert(a.touch0[0]);else if(a.end(),2===a.taps&&(i=_e(i,this),Math.hypot(e[0]-i[0],e[1]-i[1])<m)){var l=we(this).on("dblclick.zoom");l&&l.apply(this,arguments)}}}return y.transform=function(t,e,n,o){var r=t.selection?t.selection():t;r.property("__zoom",or),t!==r?_(t,e,n,o):r.interrupt().each((function(){b(this,arguments).event(o).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},y.scaleBy=function(t,e,n,o){y.scaleTo(t,(function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)}),n,o)},y.scaleTo=function(t,e,n,o){y.transform(t,(function(){var t=r.apply(this,arguments),o=this.__zoom,a=null==n?w(t):"function"==typeof n?n.apply(this,arguments):n,s=o.invert(a),u="function"==typeof e?e.apply(this,arguments):e;return i(x(v(o,u),a,s),t,l)}),n,o)},y.translateBy=function(t,e,n,o){y.transform(t,(function(){return i(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),r.apply(this,arguments),l)}),null,o)},y.translateTo=function(t,e,n,o,a){y.transform(t,(function(){var t=r.apply(this,arguments),a=this.__zoom,s=null==o?w(t):"function"==typeof o?o.apply(this,arguments):o;return i(Uo.translate(s[0],s[1]).scale(a.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,l)}),o,a)},M.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var e=we(this.that).datum();d.call(t,this.that,new Fo(t,{sourceEvent:this.sourceEvent,target:y,type:t,transform:this.that.__zoom,dispatch:d}),e)}},y.wheelDelta=function(t){return arguments.length?(a="function"==typeof t?t:Wo(+t),y):a},y.filter=function(t){return arguments.length?(o="function"==typeof t?t:Wo(!!t),y):o},y.touchable=function(t){return arguments.length?(s="function"==typeof t?t:Wo(!!t),y):s},y.extent=function(t){return arguments.length?(r="function"==typeof t?t:Wo([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),y):r},y.scaleExtent=function(t){return arguments.length?(u[0]=+t[0],u[1]=+t[1],y):[u[0],u[1]]},y.translateExtent=function(t){return arguments.length?(l[0][0]=+t[0][0],l[1][0]=+t[1][0],l[0][1]=+t[0][1],l[1][1]=+t[1][1],y):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},y.constrain=function(t){return arguments.length?(i=t,y):i},y.duration=function(t){return arguments.length?(c=+t,y):c},y.interpolate=function(t){return arguments.length?(h=t,y):h},y.on=function(){var t=d.on.apply(d,arguments);return t===d?y:t},y.clickDistance=function(t){return arguments.length?(g=(t=+t)*t,y):Math.sqrt(g)},y.tapDistance=function(t){return arguments.length?(m=+t,y):m},y}Qo.prototype=Ko.prototype;const ur=(t,e)=>t.x!==e.x||t.y!==e.y||t.zoom!==e.k,lr=t=>({x:t.x,y:t.y,zoom:t.k}),cr=({x:t,y:e,zoom:n})=>Uo.translate(t,e).scale(n),hr=(t,e)=>t.target.closest(`.${e}`),dr=(t,e)=>2===e&&Array.isArray(t)&&t.includes(2),fr=(t,e=0)=>"number"==typeof e&&e>0?t.transition().duration(e):t,pr=t=>{const e=t.ctrlKey&&T()?10:1;return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*e};var gr;t.ResizeControlVariant=void 0,(gr=t.ResizeControlVariant||(t.ResizeControlVariant={})).Line="line",gr.Handle="handle";function mr(t,e){return Math.max(0,e-t)}function yr(t,e){return Math.max(0,t-e)}function vr(t,e,n){return Math.max(0,e-t,t-n)}function xr(t,e){return t?!e:e}const wr={width:0,height:0,x:0,y:0},_r={...wr,pointerX:0,pointerY:0,aspectRatio:1},br={x:0,y:0,width:0,height:0,isXPosChange:!1,isYPosChange:!1,isWidthChange:!1,isHeightChange:!1};function Mr(t,e,n){const o=e.position.x+t.position.x,r=e.position.y+t.position.y,i=t.measured.width??0,a=t.measured.height??0,s=n[0]*i,u=n[1]*a;return[[o-s,r-u],[o+i-s,r+a-u]]}t.XYDrag=function({onNodeMouseDown:t,getStoreItems:e,onDragStart:n,onDrag:o,onDragStop:r}){let i={x:null,y:null},a=0,s=[],u=!1,l={x:0,y:0},c=null,d=!1,p=null;return{update:function({noDragClassName:g,handleSelector:m,domNode:v,isSelectable:w,nodeId:_}){function b({x:t,y:n},r){const{nodeLookup:a,nodeExtent:u,snapGrid:l,snapToGrid:c,nodeOrigin:d,onNodeDrag:p,onSelectionDrag:g,onError:m,updateNodePositions:y}=e();i={x:t,y:n};let v=!1,w={x:0,y:0,x2:0,y2:0};if(s.length>1&&u){const t=h(s,{nodeOrigin:d});w=x(t)}if(s=s.map((e=>{let o={x:t-e.distance.x,y:n-e.distance.y};c&&(o=z(o,l));let r=[[u[0][0],u[0][1]],[u[1][0],u[1][1]]];if(s.length>1&&u&&!e.extent){const{positionAbsolute:t}=e.internals,n=t.x-w.x+u[0][0],o=t.x+(e.measured?.width??0)-w.x2+u[1][0];r=[[n,t.y-w.y+u[0][1]],[o,t.y+(e.measured?.height??0)-w.y2+u[1][1]]]}const{position:i,positionAbsolute:h}=f({nodeId:e.id,nextPosition:o,nodeLookup:a,nodeExtent:r,nodeOrigin:d,onError:m});return v=v||e.position.x!==i.x||e.position.y!==i.y,e.position=i,e.internals.positionAbsolute=h,e})),v&&(y(s,!0),r&&(o||p||!_&&g))){const[t,e]=Ye({nodeId:_,dragItems:s,nodeLookup:a});if(o?.(r,s,t,e),p?.(r,t,e),!_){Oe(g)(r,t,e)}}}function M(){if(!c)return;const[t,n]=y(l,c);if(0!==t||0!==n){const{transform:o,panBy:r}=e();i.x=(i.x??0)-t/o[2],i.y=(i.y??0)-n/o[2],r({x:t,y:n})&&b(i,null)}a=requestAnimationFrame(M)}function E(o){const{nodeLookup:r,multiSelectionActive:a,nodesDraggable:u,transform:l,snapGrid:c,snapToGrid:h,selectNodesOnDrag:f,onNodeDragStart:p,onSelectionDragStart:g,unselectNodesAndEdges:m}=e();d=!0,f&&w||a||!_||r.get(_)?.selected||m(),w&&f&&_&&t?.(_);const y=I(o.sourceEvent,{transform:l,snapGrid:c,snapToGrid:h});if(i=y,s=function(t,e,n,o){const r=[];for(const[i,a]of t)if((a.selected||a.id===o)&&(!a.parentId||!He(a,t))&&(a.draggable||e&&void 0===a.draggable)){const e=t.get(i);r.push({id:e.id,position:e.position||{x:0,y:0},distance:{x:n.x-e.internals.positionAbsolute.x,y:n.y-e.internals.positionAbsolute.y},extent:e.extent,parentId:e.parentId,origin:e.origin,expandParent:e.expandParent,internals:{positionAbsolute:e.internals.positionAbsolute||{x:0,y:0}},measured:{width:e.measured.width||0,height:e.measured.height||0}})}return r}(r,u,y,_),s.length>0&&(n||p||!_&&g)){const[t,e]=Ye({nodeId:_,dragItems:s,nodeLookup:r});if(n?.(o.sourceEvent,s,t,e),p?.(o.sourceEvent,t,e),!_){Oe(g)(o.sourceEvent,t,e)}}}p=we(v);const P=Ie().on("start",(t=>{const{domNode:n,nodeDragThreshold:o,transform:r,snapGrid:a,snapToGrid:s}=e();0===o&&E(t);const u=I(t.sourceEvent,{transform:r,snapGrid:a,snapToGrid:s});i=u,c=n?.getBoundingClientRect()||null,l=B(t.sourceEvent,c)})).on("drag",(t=>{const{autoPanOnNodeDrag:n,transform:o,snapGrid:r,snapToGrid:a,nodeDragThreshold:h}=e(),f=I(t.sourceEvent,{transform:o,snapGrid:r,snapToGrid:a});if(!u&&n&&d&&(u=!0,M()),!d){const e=f.xSnapped-(i.x??0),n=f.ySnapped-(i.y??0);Math.sqrt(e*e+n*n)>h&&E(t)}(i.x!==f.xSnapped||i.y!==f.ySnapped)&&s&&d&&(l=B(t.sourceEvent,c),b(f,t.sourceEvent))})).on("end",(t=>{if(d&&(u=!1,d=!1,cancelAnimationFrame(a),s.length>0)){const{nodeLookup:n,updateNodePositions:o,onNodeDragStop:i,onSelectionDragStop:a}=e();if(o(s,!1),r||i||!_&&a){const[e,o]=Ye({nodeId:_,dragItems:s,nodeLookup:n});if(r?.(t.sourceEvent,s,e,o),i?.(t.sourceEvent,e,o),!_){Oe(a)(t.sourceEvent,e,o)}}}})).filter((t=>{const e=t.target;return!t.button&&(!g||!Xe(e,`.${g}`,v))&&(!m||Xe(e,m,v))}));p.call(P)},destroy:function(){p?.on(".drag",null)}}},t.XYHandle=Ze,t.XYMinimap=function({domNode:t,panZoom:e,getTransform:n,getViewScale:o}){const r=we(t);return{update:function({translateExtent:t,width:i,height:a,zoomStep:s=10,pannable:u=!0,zoomable:l=!0,inversePan:c=!1}){const h=sr().on("zoom",u?r=>{const s=n();if("mousemove"!==r.sourceEvent.type||!e)return;const u=o()*Math.max(s[2],Math.log(s[2]))*(c?-1:1),l={x:s[0]-r.sourceEvent.movementX*u,y:s[1]-r.sourceEvent.movementY*u},h=[[0,0],[i,a]];e.setViewportConstrained({x:l.x,y:l.y,zoom:s[2]},h,t)}:null).on("zoom.wheel",l?t=>{const o=n();if("wheel"!==t.sourceEvent.type||!e)return;const r=-t.sourceEvent.deltaY*(1===t.sourceEvent.deltaMode?.05:t.sourceEvent.deltaMode?1:.002)*s,i=o[2]*Math.pow(2,r);e.scaleTo(i)}:null);r.call(h,{})},destroy:function(){r.on("zoom",null)},pointer:_e}},t.XYPanZoom=function({domNode:e,minZoom:n,maxZoom:o,translateExtent:r,viewport:i,onPanZoom:a,onPanZoomStart:s,onPanZoomEnd:u,onTransformChange:l,onDraggingChange:c}){const h={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},d=e.getBoundingClientRect(),f=sr().scaleExtent([n,o]).translateExtent(r),g=we(e).call(f);w({x:i.x,y:i.y,zoom:p(i.zoom,n,o)},[[0,0],[d.width,d.height]],r);const m=g.on("wheel.zoom"),y=g.on("dblclick.zoom");function v(t,e){g&&f?.transform(fr(g,e?.duration),t)}function x(){f.on("zoom",null)}function w(t,e,n){const o=cr(t),r=f?.constrain()(o,e,n);return r&&v(r),r}return f.wheelDelta(pr),{update:function({noWheelClassName:e,noPanClassName:n,onPaneContextMenu:o,userSelectionActive:r,panOnScroll:i,panOnDrag:d,panOnScrollMode:p,panOnScrollSpeed:v,preventScrolling:w,zoomOnPinch:_,zoomOnScroll:b,zoomOnDoubleClick:M,zoomActivationKeyPressed:E,lib:P}){r&&!h.isZoomingOrPanning&&x();const S=i&&!E&&!r?function({zoomPanValues:e,noWheelClassName:n,d3Selection:o,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:s,onPanZoomStart:u,onPanZoom:l,onPanZoomEnd:c}){return h=>{if(hr(h,n))return!1;h.preventDefault(),h.stopImmediatePropagation();const d=o.property("__zoom").k||1,f=T();if(h.ctrlKey&&s&&f){const t=_e(h),e=pr(h),n=d*Math.pow(2,e);return void r.scaleTo(o,n,t,h)}const p=1===h.deltaMode?20:1;let g=i===t.PanOnScrollMode.Vertical?0:h.deltaX*p,m=i===t.PanOnScrollMode.Horizontal?0:h.deltaY*p;!f&&h.shiftKey&&i!==t.PanOnScrollMode.Vertical&&(g=h.deltaY*p,m=0),r.translateBy(o,-g/d*a,-m/d*a,{internal:!0});const y=lr(o.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling||(e.isPanScrolling=!0,u?.(h,y)),e.isPanScrolling&&(l?.(h,y),e.panScrollTimeout=setTimeout((()=>{c?.(h,y),e.isPanScrolling=!1}),150))}}({zoomPanValues:h,noWheelClassName:e,d3Selection:g,d3Zoom:f,panOnScrollMode:p,panOnScrollSpeed:v,zoomOnPinch:_,onPanZoomStart:s,onPanZoom:a,onPanZoomEnd:u}):function({noWheelClassName:t,preventScrolling:e,d3ZoomHandler:n}){return function(o,r){if(!e&&"wheel"===o.type&&!o.ctrlKey||hr(o,t))return null;o.preventDefault(),n.call(this,o,r)}}({noWheelClassName:e,preventScrolling:w,d3ZoomHandler:m});if(g.on("wheel.zoom",S,{passive:!1}),!r){const t=function({zoomPanValues:t,onDraggingChange:e,onPanZoomStart:n}){return o=>{if(o.sourceEvent?.internal)return;const r=lr(o.transform);t.mouseButton=o.sourceEvent?.button||0,t.isZoomingOrPanning=!0,t.prevViewport=r,"mousedown"===o.sourceEvent?.type&&e(!0),n&&n?.(o.sourceEvent,r)}}({zoomPanValues:h,onDraggingChange:c,onPanZoomStart:s});f.on("start",t);const e=function({zoomPanValues:t,panOnDrag:e,onPaneContextMenu:n,onTransformChange:o,onPanZoom:r}){return i=>{t.usedRightMouseButton=!(!n||!dr(e,t.mouseButton??0)),i.sourceEvent?.sync||o([i.transform.x,i.transform.y,i.transform.k]),r&&!i.sourceEvent?.internal&&r?.(i.sourceEvent,lr(i.transform))}}({zoomPanValues:h,panOnDrag:d,onPaneContextMenu:!!o,onPanZoom:a,onTransformChange:l});f.on("zoom",e);const n=function({zoomPanValues:t,panOnDrag:e,panOnScroll:n,onDraggingChange:o,onPanZoomEnd:r,onPaneContextMenu:i}){return a=>{if(!a.sourceEvent?.internal&&(t.isZoomingOrPanning=!1,i&&dr(e,t.mouseButton??0)&&!t.usedRightMouseButton&&a.sourceEvent&&i(a.sourceEvent),t.usedRightMouseButton=!1,o(!1),r&&ur(t.prevViewport,a.transform))){const e=lr(a.transform);t.prevViewport=e,clearTimeout(t.timerId),t.timerId=setTimeout((()=>{r?.(a.sourceEvent,e)}),n?150:0)}}}({zoomPanValues:h,panOnDrag:d,panOnScroll:i,onPaneContextMenu:o,onPanZoomEnd:u,onDraggingChange:c});f.on("end",n)}const z=function({zoomActivationKeyPressed:t,zoomOnScroll:e,zoomOnPinch:n,panOnDrag:o,panOnScroll:r,zoomOnDoubleClick:i,userSelectionActive:a,noWheelClassName:s,noPanClassName:u,lib:l}){return c=>{const h=t||e,d=n&&c.ctrlKey;if(1===c.button&&"mousedown"===c.type&&(hr(c,`${l}-flow__node`)||hr(c,`${l}-flow__edge`)))return!0;if(!(o||h||r||i||n))return!1;if(a)return!1;if(hr(c,s)&&"wheel"===c.type)return!1;if(hr(c,u)&&("wheel"!==c.type||r&&"wheel"===c.type&&!t))return!1;if(!n&&c.ctrlKey&&"wheel"===c.type)return!1;if(!h&&!r&&!d&&"wheel"===c.type)return!1;if(!o&&("mousedown"===c.type||"touchstart"===c.type))return!1;if(Array.isArray(o)&&!o.includes(c.button)&&("mousedown"===c.type||"touchstart"===c.type))return!1;const f=Array.isArray(o)&&o.includes(c.button)||!c.button||c.button<=1;return(!c.ctrlKey||"wheel"===c.type)&&f}}({zoomActivationKeyPressed:E,panOnDrag:d,zoomOnScroll:b,panOnScroll:i,zoomOnDoubleClick:M,zoomOnPinch:_,userSelectionActive:r,noPanClassName:n,noWheelClassName:e,lib:P});f.filter(z),M?g.on("dblclick.zoom",y):g.on("dblclick.zoom",null)},destroy:x,setViewport:function(t,e){const n=cr(t);return v(n,e),n},setViewportConstrained:w,getViewport:function(){const t=g?Qo(g.node()):{x:0,y:0,k:1};return{x:t.x,y:t.y,zoom:t.k}},scaleTo:function(t,e){g&&f?.scaleTo(fr(g,e?.duration),t)},scaleBy:function(t,e){g&&f?.scaleBy(fr(g,e?.duration),t)},setScaleExtent:function(t){f?.scaleExtent(t)},setTranslateExtent:function(t){f?.translateExtent(t)},syncViewport:function(t){if(g){const e=cr(t),n=g.property("__zoom");n.k===t.zoom&&n.x===t.x&&n.y===t.y||f?.transform(g,e,null,{sync:!0})}}}},t.XYResizer=function({domNode:t,nodeId:e,getStoreItems:n,onChange:o}){const r=we(t);return{update:function({controlPosition:t,boundaries:i,keepAspectRatio:a,onResizeStart:s,onResize:u,onResizeEnd:l,shouldResize:c}){let h={...wr},d={..._r};const f=function(t){return{isHorizontal:t.includes("right")||t.includes("left"),isVertical:t.includes("bottom")||t.includes("top"),affectsX:t.includes("left"),affectsY:t.includes("top")}}(t);let p,g,m,y,v=[];const x=Ie().on("start",(t=>{const{nodeLookup:o,transform:r,snapGrid:i,snapToGrid:a,nodeOrigin:u}=n();if(p=o.get(e),p){const{xSnapped:n,ySnapped:l}=I(t.sourceEvent,{transform:r,snapGrid:i,snapToGrid:a});h={width:p.measured?.width??0,height:p.measured?.height??0,x:p.position.x??0,y:p.position.y??0},d={...h,pointerX:n,pointerY:l,aspectRatio:h.width/h.height},g=void 0,("parent"===p.extent||p.expandParent)&&(g=o.get(p.parentId),g&&"parent"===p.extent&&(m=function(t){return[[0,0],[t.measured.width,t.measured.height]]}(g))),v=[],y=void 0;for(const[t,n]of o)if(n.parentId===e&&(v.push({id:t,position:{...n.position},extent:n.extent}),"parent"===n.extent||n.expandParent)){const t=Mr(n,p,n.origin??u);y=y?[[Math.min(t[0][0],y[0][0]),Math.min(t[0][1],y[0][1])],[Math.max(t[1][0],y[1][0]),Math.max(t[1][1],y[1][1])]]:t}s?.(t,{...h})}})).on("drag",(t=>{const{transform:e,snapGrid:r,snapToGrid:s,nodeOrigin:l}=n(),x=I(t.sourceEvent,{transform:e,snapGrid:r,snapToGrid:s}),w=[];if(p){const{x:e,y:n,width:r,height:s}=h,_={...br},b=p.origin??l,{width:M,height:E,x:P,y:S}=function(t,e,n,o,r,i,a,s){let{affectsX:u,affectsY:l}=e;const{isHorizontal:c,isVertical:h}=e,d=c&&h,{xSnapped:f,ySnapped:p}=n,{minWidth:g,maxWidth:m,minHeight:y,maxHeight:v}=o,{x:x,y:w,width:_,height:b,aspectRatio:M}=t;let E=Math.floor(c?f-t.pointerX:0),P=Math.floor(h?p-t.pointerY:0);const S=_+(u?-E:E),z=b+(l?-P:P),N=-i[0]*_,k=-i[1]*b;let A=vr(S,g,m),T=vr(z,y,v);if(a){let t=0,e=0;u&&E<0?t=mr(x+E+N,a[0][0]):!u&&E>0&&(t=yr(x+S+N,a[1][0])),l&&P<0?e=mr(w+P+k,a[0][1]):!l&&P>0&&(e=yr(w+z+k,a[1][1])),A=Math.max(A,t),T=Math.max(T,e)}if(s){let t=0,e=0;u&&E>0?t=yr(x+E,s[0][0]):!u&&E<0&&(t=mr(x+S,s[1][0])),l&&P>0?e=yr(w+P,s[0][1]):!l&&P<0&&(e=mr(w+z,s[1][1])),A=Math.max(A,t),T=Math.max(T,e)}if(r){if(c){const t=vr(S/M,y,v)*M;if(A=Math.max(A,t),a){let t=0;t=!u&&!l||u&&!l&&d?yr(w+k+S/M,a[1][1])*M:mr(w+k+(u?E:-E)/M,a[0][1])*M,A=Math.max(A,t)}if(s){let t=0;t=!u&&!l||u&&!l&&d?mr(w+S/M,s[1][1])*M:yr(w+(u?E:-E)/M,s[0][1])*M,A=Math.max(A,t)}}if(h){const t=vr(z*M,g,m)/M;if(T=Math.max(T,t),a){let t=0;t=!u&&!l||l&&!u&&d?yr(x+z*M+N,a[1][0])/M:mr(x+(l?P:-P)*M+N,a[0][0])/M,T=Math.max(T,t)}if(s){let t=0;t=!u&&!l||l&&!u&&d?mr(x+z*M,s[1][0])/M:yr(x+(l?P:-P)*M,s[0][0])/M,T=Math.max(T,t)}}}P+=P<0?T:-T,E+=E<0?A:-A,r&&(d?S>z*M?P=(xr(u,l)?-E:E)/M:E=(xr(u,l)?-P:P)*M:c?(P=E/M,l=u):(E=P*M,u=l));const $=u?x+E:x,C=l?w+P:w;return{width:_+(u?-E:E),height:b+(l?-P:P),x:i[0]*E*(u?-1:1)+$,y:i[1]*P*(l?-1:1)+C}}(d,f,x,i,a,b,m,y),z=M!==r,N=E!==s,k=P!==e&&z,A=S!==n&&N;if((k||A||1===b[0]||1==b[1])&&(_.isXPosChange=k,_.isYPosChange=A,_.x=k?P:e,_.y=A?S:n,h.x=_.x,h.y=_.y,g&&p.expandParent&&(_.x<0&&(h.x=0,d.x=d.x-_.x),_.y<0&&(h.y=0,d.y=d.y-_.y)),v.length>0)){const t=P-e,o=S-n;for(const e of v)e.position={x:e.position.x-t+b[0]*(M-r),y:e.position.y-o+b[1]*(E-s)},w.push(e)}if((z||N)&&(_.isWidthChange=z,_.isHeightChange=N,_.width=M,_.height=E,h.width=_.width,h.height=_.height),!(_.isXPosChange||_.isYPosChange||z||N))return;const T=function({width:t,prevWidth:e,height:n,prevHeight:o,affectsX:r,affectsY:i}){const a=t-e,s=n-o,u=[a>0?1:a<0?-1:0,s>0?1:s<0?-1:0];return a&&r&&(u[0]=-1*u[0]),s&&i&&(u[1]=-1*u[1]),u}({width:h.width,prevWidth:r,height:h.height,prevHeight:s,affectsX:f.affectsX,affectsY:f.affectsY}),$={...h,direction:T},C=c?.(t,$);if(!1===C)return;u?.(t,$),o(_,w)}})).on("end",(t=>{l?.(t,{...h})}));r.call(x)},destroy:function(){r.on(".drag",null)}}},t.XY_RESIZER_HANDLE_POSITIONS=["top-left","top-right","bottom-left","bottom-right"],t.XY_RESIZER_LINE_POSITIONS=["top","right","bottom","left"],t.addEdge=(t,n)=>{if(!t.source||!t.target)return e.error006(),n;let o;return o=l(t)?{...t}:{...t,id:Z(t)},((t,e)=>e.some((e=>!(e.source!==t.source||e.target!==t.target||e.sourceHandle!==t.sourceHandle&&(e.sourceHandle||t.sourceHandle)||e.targetHandle!==t.targetHandle&&(e.targetHandle||t.targetHandle)))))(o,n)?n:(null===o.sourceHandle&&delete o.sourceHandle,null===o.targetHandle&&delete o.targetHandle,n.concat(o))},t.adoptUserNodes=function(t,e,n={nodeOrigin:[0,0],elevateNodesOnSelect:!0,defaults:{},checkEquality:!0}){const o=new Map(e);e.clear();const r=n?.elevateNodesOnSelect?1e3:0,i=new Set;t.forEach((t=>{const a=o.get(t.id);t.parentId&&i.add(t.parentId),n.checkEquality&&t===a?.internals.userNode?e.set(t.id,a):e.set(t.id,{...n.defaults,...t,measured:{width:t.measured?.width,height:t.measured?.height},internals:{positionAbsolute:t.position,handleBounds:a?.internals.handleBounds,z:(P(t.zIndex)?t.zIndex:0)+(t.selected?r:0),userNode:t,isParent:!1}})})),i.size>0&&tt(e,n,i)},t.areConnectionMapsEqual=function(t,e){if(!t&&!e)return!0;if(!t||!e||t.size!==e.size)return!1;if(!t.size&&!e.size)return!0;for(const n of t.keys())if(!e.has(n))return!1;return!0},t.boxToRect=w,t.calcAutoPan=y,t.calculateNodePosition=f,t.clamp=p,t.clampPosition=g,t.createMarkerIds=function(t,{id:e,defaultColor:n,defaultMarkerStart:o,defaultMarkerEnd:r}){const i=new Set;return t.reduce(((t,a)=>([a.markerStart||o,a.markerEnd||r].forEach((o=>{if(o&&"object"==typeof o){const r=J(o,e);i.has(r)||(t.push({id:r,color:o.color||n,...o}),i.add(r))}})),t)),[]).sort(((t,e)=>t.id.localeCompare(e.id)))},t.devWarn=S,t.elementSelectionKeys=["Enter"," ","Escape"],t.errorMessages=e,t.fitView=function({nodeLookup:t,width:e,height:n,panZoom:o,minZoom:r,maxZoom:i,nodeOrigin:a=[0,0]},s){const u=[];if(t.forEach((t=>{t.measured.width&&t.measured.height&&(s?.includeHiddenNodes||!t.hidden)&&(!s?.nodes||s?.nodes.length&&s?.nodes.some((e=>e.id===t.id)))&&u.push(t)})),u.length>0){const t=h(u,{nodeOrigin:a}),l=A(t,e,n,s?.minZoom??r,s?.maxZoom??i,s?.padding??.1);return o.setViewport(l,{duration:s?.duration}),!0}return!1},t.getBezierEdgeCenter=D,t.getBezierPath=function({sourceX:e,sourceY:n,sourcePosition:o=t.Position.Bottom,targetX:r,targetY:i,targetPosition:a=t.Position.Top,curvature:s=.25}){const[u,l]=V({pos:o,x1:e,y1:n,x2:r,y2:i,c:s}),[c,h]=V({pos:a,x1:r,y1:i,x2:e,y2:n,c:s}),[d,f,p,g]=D({sourceX:e,sourceY:n,targetX:r,targetY:i,sourceControlX:u,sourceControlY:l,targetControlX:c,targetControlY:h});return[`M${e},${n} C${u},${l} ${c},${h} ${r},${i}`,d,f,p,g]},t.getBoundsOfBoxes=v,t.getBoundsOfRects=M,t.getConnectedEdges=d,t.getDimensions=O,t.getEdgeCenter=q,t.getEdgePosition=function(n){const{sourceNode:o,targetNode:r}=n;if(!F(o)||!F(r))return null;const i=o.internals.handleBounds||K(o.handles),a=r.internals.handleBounds||K(r.handles),s=Q(i?.source??[],n.sourceHandle),u=Q(n.connectionMode===t.ConnectionMode.Strict?a?.target??[]:(a?.target??[]).concat(a?.source??[]),n.targetHandle),l=s?.position||t.Position.Bottom,c=u?.position||t.Position.Top;if(!s||!u)return n.onError?.("008",e.error008(s?"target":"source",{id:n.id,sourceHandle:n.sourceHandle,targetHandle:n.targetHandle})),null;const[h,d]=U(l,o,s),[f,p]=U(c,r,u);return{sourceX:h,sourceY:d,targetX:f,targetY:p,sourcePosition:l,targetPosition:c}},t.getElementsToRemove=async function({nodesToRemove:t=[],edgesToRemove:e=[],nodes:n,edges:o,onBeforeDelete:r}){const i=t.map((t=>t.id)),a=[];for(const t of n){if(!1===t.deletable)continue;const e=i.includes(t.id),n=!e&&t.parentId&&a.find((e=>e.id===t.parentId));(e||n)&&a.push(t)}const s=e.map((t=>t.id)),u=o.filter((t=>!1!==t.deletable)),l=d(a,u);for(const t of u){s.includes(t.id)&&!l.find((e=>e.id===t.id))&&l.push(t)}if(!r)return{edges:l,nodes:a};const c=await r({nodes:a,edges:l});return"boolean"==typeof c?c?{edges:l,nodes:a}:{edges:[],nodes:[]}:c},t.getElevatedEdgeZIndex=function({sourceNode:t,targetNode:e,selected:n=!1,zIndex:o=0,elevateOnSelect:r=!1}){if(!r)return o;const i=n||e.selected||t.selected,a=Math.max(t.internals.z||0,e.internals.z||0,1e3);return o+(i?a:0)},t.getEventPosition=B,t.getHandleBounds=R,t.getHostForElement=H,t.getIncomers=(t,e,n)=>{if(!t.id)return[];const o=new Set;return n.forEach((e=>{e.target===t.id&&o.add(e.source)})),e.filter((t=>o.has(t.id)))},t.getInternalNodesBounds=(t,e={nodeOrigin:[0,0],useRelativePosition:!1})=>{if(0===t.size)return{x:0,y:0,width:0,height:0};let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0};return t.forEach((t=>{if(null==e.filter||e.filter(t)){const o=c(t,t.origin||e.nodeOrigin);n=v(n,x({...o[e.useRelativePosition?"position":"positionAbsolute"],...C(t)}))}})),w(n)},t.getMarkerId=J,t.getNodeDimensions=C,t.getNodePositionWithOrigin=c,t.getNodeToolbarTransform=function(e,n,o,r,i){let a=.5;"start"===i?a=0:"end"===i&&(a=1);let s=[(e.x+e.width*a)*n.zoom+n.x,e.y*n.zoom+n.y-r],u=[-100*a,-100];switch(o){case t.Position.Right:s=[(e.x+e.width)*n.zoom+n.x+r,(e.y+e.height*a)*n.zoom+n.y],u=[0,-100*a];break;case t.Position.Bottom:s[1]=(e.y+e.height)*n.zoom+n.y+r,u[1]=0;break;case t.Position.Left:s=[e.x*n.zoom+n.x-r,(e.y+e.height*a)*n.zoom+n.y],u=[-100,-100*a]}return`translate(${s[0]}px, ${s[1]}px) translate(${u[0]}%, ${u[1]}%)`},t.getNodesBounds=h,t.getNodesInside=(t,e,[n,o,r]=[0,0,1],i=!1,a=!1,s=[0,0])=>{const u={...N(e,[n,o,r]),width:e.width/r,height:e.height/r},l=[];for(const[,e]of t){const{measured:t,selectable:n=!0,hidden:o=!1}=e,r=t.width??e.width??e.initialWidth??null,c=t.height??e.height??e.initialHeight??null;if(a&&!n||o)continue;const h=E(u,_(e,s));(null===r||null===c||i&&h>0||h>=(r??0)*(c??0)||e.dragging)&&l.push(e)}return l},t.getOutgoers=(t,e,n)=>{if(!t.id)return[];const o=new Set;return n.forEach((e=>{e.source===t.id&&o.add(e.target)})),e.filter((t=>o.has(t.id)))},t.getOverlappingArea=E,t.getPointerPosition=I,t.getPositionWithOrigin=({x:t,y:e,width:n,height:o,origin:r=[0,0]})=>!n||!o||r[0]<0||r[1]<0||r[0]>1||r[1]>1?{x:t,y:e}:{x:t-n*r[0],y:e-o*r[1]},t.getSmoothStepPath=function({sourceX:e,sourceY:n,sourcePosition:o=t.Position.Bottom,targetX:r,targetY:i,targetPosition:a=t.Position.Top,borderRadius:s=5,centerX:u,centerY:l,offset:c=20}){const[h,d,f,p,g]=function({source:e,sourcePosition:n=t.Position.Bottom,target:o,targetPosition:r=t.Position.Top,center:i,offset:a}){const s=G[n],u=G[r],l={x:e.x+s.x*a,y:e.y+s.y*a},c={x:o.x+u.x*a,y:o.y+u.y*a},h=j({source:l,sourcePosition:n,target:c}),d=0!==h.x?"x":"y",f=h[d];let p,g,m=[];const y={x:0,y:0},v={x:0,y:0},[x,w,_,b]=q({sourceX:e.x,sourceY:e.y,targetX:o.x,targetY:o.y});if(s[d]*u[d]==-1){p=i.x??x,g=i.y??w;const t=[{x:p,y:l.y},{x:p,y:c.y}],e=[{x:l.x,y:g},{x:c.x,y:g}];m=s[d]===f?"x"===d?t:e:"x"===d?e:t}else{const t=[{x:l.x,y:c.y}],i=[{x:c.x,y:l.y}];if(m="x"===d?s.x===f?i:t:s.y===f?t:i,n===r){const t=Math.abs(e[d]-o[d]);if(t<=a){const n=Math.min(a-1,a-t);s[d]===f?y[d]=(l[d]>e[d]?-1:1)*n:v[d]=(c[d]>o[d]?-1:1)*n}}if(n!==r){const e="x"===d?"y":"x",n=s[d]===u[e],o=l[e]>c[e],r=l[e]<c[e];(1===s[d]&&(!n&&o||n&&r)||1!==s[d]&&(!n&&r||n&&o))&&(m="x"===d?t:i)}const h={x:l.x+y.x,y:l.y+y.y},x={x:c.x+v.x,y:c.y+v.y};Math.max(Math.abs(h.x-m[0].x),Math.abs(x.x-m[0].x))>=Math.max(Math.abs(h.y-m[0].y),Math.abs(x.y-m[0].y))?(p=(h.x+x.x)/2,g=m[0].y):(p=m[0].x,g=(h.y+x.y)/2)}return[[e,{x:l.x+y.x,y:l.y+y.y},...m,{x:c.x+v.x,y:c.y+v.y},o],p,g,_,b]}({source:{x:e,y:n},sourcePosition:o,target:{x:r,y:i},targetPosition:a,center:{x:u,y:l},offset:c});return[h.reduce(((t,e,n)=>{let o="";return o=n>0&&n<h.length-1?function(t,e,n,o){const r=Math.min(W(t,e)/2,W(e,n)/2,o),{x:i,y:a}=e;if(t.x===i&&i===n.x||t.y===a&&a===n.y)return`L${i} ${a}`;if(t.y===a)return`L ${i+r*(t.x<n.x?-1:1)},${a}Q ${i},${a} ${i},${a+r*(t.y<n.y?1:-1)}`;const s=t.x<n.x?1:-1;return`L ${i},${a+r*(t.y<n.y?-1:1)}Q ${i},${a} ${i+r*s},${a}`}(h[n-1],e,h[n+1],s):`${0===n?"M":"L"}${e.x} ${e.y}`,t+=o}),""),d,f,p,g]},t.getStraightPath=function({sourceX:t,sourceY:e,targetX:n,targetY:o}){const[r,i,a,s]=q({sourceX:t,sourceY:e,targetX:n,targetY:o});return[`M ${t},${e}L ${n},${o}`,r,i,a,s]},t.getViewportForBounds=A,t.handleConnectionChange=function(t,e,n){if(!n)return;const o=[];t.forEach(((t,n)=>{e?.has(n)||o.push(t)})),o.length&&n(o)},t.handleParentExpand=nt,t.infiniteExtent=n,t.isCoordinateExtent=$,t.isEdgeBase=l,t.isEdgeVisible=function({sourceNode:t,targetNode:e,width:n,height:o,transform:r}){const i=v(b(t),b(e));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const a={x:-r[0]/r[2],y:-r[1]/r[2],width:n/r[2],height:o/r[2]};return E(a,w(i))>0},t.isInputDOMNode=function(t){const e=t.composedPath?.()?.[0]||t.target;return X.includes(e?.nodeName)||e?.hasAttribute("contenteditable")||!!e?.closest(".nokey")},t.isInternalNodeBase=t=>"id"in t&&"internals"in t&&!("source"in t)&&!("target"in t),t.isMacOs=T,t.isMouseEvent=Y,t.isNodeBase=t=>"id"in t&&"position"in t&&!("source"in t)&&!("target"in t),t.isNumeric=P,t.isRectObject=t=>P(t.width)&&P(t.height)&&P(t.x)&&P(t.y),t.nodeHasDimensions=function(t){return void 0!==(t.measured?.width??t.width??t.initialWidth)&&void 0!==(t.measured?.height??t.height??t.initialHeight)},t.nodeToBox=b,t.nodeToRect=_,t.panBy=function({delta:t,panZoom:e,transform:n,translateExtent:o,width:r,height:i}){if(!e||!t.x&&!t.y)return!1;const a=e.setViewportConstrained({x:n[0]+t.x,y:n[1]+t.y,zoom:n[2]},[[0,0],[r,i]],o);return!!a&&(a.x!==n[0]||a.y!==n[1]||a.k!==n[2])},t.pointToRendererPoint=N,t.rectToBox=x,t.rendererPointToPoint=k,t.shallowNodeData=function(t,e){if(null===t||null===e)return!1;const n=Array.isArray(t)?t:[t],o=Array.isArray(e)?e:[e];if(n.length!==o.length)return!1;for(let t=0;t<n.length;t++)if(n[t].id!==o[t].id||n[t].type!==o[t].type||!Object.is(n[t].data,o[t].data))return!1;return!0},t.snapPosition=z,t.updateAbsolutePositions=tt,t.updateConnectionLookup=function(t,e,n){t.clear(),e.clear();for(const o of n){const{source:n,target:r,sourceHandle:i=null,targetHandle:a=null}=o,s=`${n}-source-${i}`,u=`${r}-target-${a}`,l=t.get(s)||new Map,c=t.get(u)||new Map,h={edgeId:o.id,source:n,target:r,sourceHandle:i,targetHandle:a};e.set(o.id,o),t.set(s,l.set(`${r}-${a}`,h)),t.set(u,c.set(`${n}-${i}`,h))}},t.updateEdge=(t,n,o,r={shouldReplaceId:!0})=>{const{id:i,...a}=t;if(!n.source||!n.target)return e.error006(),o;if(!o.find((e=>e.id===t.id)))return e.error007(i),o;const s={...a,id:r.shouldReplaceId?Z(n):i,source:n.source,target:n.target,sourceHandle:n.sourceHandle,targetHandle:n.targetHandle};return o.filter((t=>t.id!==i)).concat(s)},t.updateNodeInternals=function(t,e,n,o){const r=n?.querySelector(".xyflow__viewport");let i=!1;if(!r)return{changes:[],updatedInternals:i};const a=[],s=window.getComputedStyle(r),{m22:u}=new window.DOMMatrixReadOnly(s.transform),l=[];if(t.forEach((t=>{const n=e.get(t.id);if(n?.hidden)e.set(n.id,{...n,internals:{...n.internals,handleBounds:void 0}}),i=!0;else if(n){const r=O(t.nodeElement),s=n.measured.width!==r.width||n.measured.height!==r.height;if(!(!r.width||!r.height||!s&&n.internals.handleBounds&&!t.force)){const c={...n,measured:r,internals:{...n.internals,handleBounds:{source:R(".source",t.nodeElement,u,n.origin||o),target:R(".target",t.nodeElement,u,n.origin||o)}}};e.set(n.id,c),i=!0,s&&(a.push({id:c.id,type:"dimensions",dimensions:r}),c.expandParent&&l.push(c))}}})),l.length>0){const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AE,QAAQ,EAAE,KAAK,IAAI,CAAC;AAE7E,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC,aAAa,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAC;AAErE,MAAM,MAAM,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAC;AAE/C,MAAM,MAAM,UAAU,CAAC,QAAQ,SAAS,gBAAgB,GAAG,gBAAgB,IAAI,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC"}
|
|
@@ -66,7 +66,7 @@ export type GetInternalNodesBoundsParams = {
|
|
|
66
66
|
* @internal
|
|
67
67
|
*/
|
|
68
68
|
export declare const getInternalNodesBounds: (nodeLookup: NodeLookup, params?: GetInternalNodesBoundsParams) => Rect;
|
|
69
|
-
export declare const getNodesInside: <NodeType extends NodeBase = NodeBase>(nodeLookup: Map<string, InternalNodeBase<NodeType>>, rect: Rect, [tx, ty, tScale]?: Transform, partially?: boolean, excludeNonSelectableNodes?: boolean, nodeOrigin?: NodeOrigin) => NodeType[];
|
|
69
|
+
export declare const getNodesInside: <NodeType extends NodeBase = NodeBase>(nodeLookup: Map<string, InternalNodeBase<NodeType>>, rect: Rect, [tx, ty, tScale]?: Transform, partially?: boolean, excludeNonSelectableNodes?: boolean, nodeOrigin?: NodeOrigin) => InternalNodeBase<NodeType>[];
|
|
70
70
|
/**
|
|
71
71
|
* Get all connecting edges for a given set of nodes
|
|
72
72
|
* @param nodes - Nodes you want to get the connected edges for
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../src/utils/graph.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,gBAAgB,EAChB,OAAO,EACP,kBAAkB,EAClB,UAAU,EACV,gBA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AAC,QAAQ,SAAS,QAAQ,GAAG,QAAQ,EAAE,QAAQ,SAAS,QAAQ,GAAG,QAAQ,EAAE,EACpH,aAAkB,EAClB,aAAkB,EAClB,KAAK,EACL,KAAK,EACL,cAAc,GACf,EAAE;IACD,aAAa,EAAE,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;IACnC,aAAa,EAAE,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;IACnC,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,cAAc,CAAC,EAAE,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;CACzD,GAAG,OAAO,CAAC;IACV,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB,CAAC,CA+CD"}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import { NodeBase, CoordinateExtent,
|
|
1
|
+
import { NodeBase, CoordinateExtent, InternalNodeUpdate, NodeOrigin, PanZoomInstance, Transform, XYPosition, ConnectionLookup, EdgeBase, EdgeLookup, InternalNodeBase, NodeLookup, NodeDimensionChange, NodePositionChange } from '../types';
|
|
2
2
|
export declare function updateAbsolutePositions<NodeType extends NodeBase>(nodeLookup: Map<string, InternalNodeBase<NodeType>>, options?: UpdateNodesOptions<NodeType>, parentNodeIds?: Set<string>): void;
|
|
3
3
|
type UpdateNodesOptions<NodeType extends NodeBase> = {
|
|
4
4
|
nodeOrigin?: NodeOrigin;
|
|
5
5
|
elevateNodesOnSelect?: boolean;
|
|
6
6
|
defaults?: Partial<NodeType>;
|
|
7
|
+
checkEquality?: boolean;
|
|
7
8
|
};
|
|
8
9
|
export declare function adoptUserNodes<NodeType extends NodeBase>(nodes: NodeType[], nodeLookup: Map<string, InternalNodeBase<NodeType>>, options?: UpdateNodesOptions<NodeType>): void;
|
|
9
|
-
export declare function handleParentExpand(nodes: InternalNodeBase[], nodeLookup: NodeLookup):
|
|
10
|
-
export declare function
|
|
10
|
+
export declare function handleParentExpand(nodes: InternalNodeBase[], nodeLookup: NodeLookup): (NodeDimensionChange | NodePositionChange)[];
|
|
11
|
+
export declare function updateNodeInternals<NodeType extends InternalNodeBase>(updates: Map<string, InternalNodeUpdate>, nodeLookup: Map<string, NodeType>, domNode: HTMLElement | null, nodeOrigin?: NodeOrigin): {
|
|
12
|
+
changes: (NodeDimensionChange | NodePositionChange)[];
|
|
13
|
+
updatedInternals: boolean;
|
|
14
|
+
};
|
|
11
15
|
export declare function panBy({ delta, panZoom, transform, translateExtent, width, height, }: {
|
|
12
16
|
delta: XYPosition;
|
|
13
17
|
panZoom: PanZoomInstance | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/utils/store.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/utils/store.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,EACV,eAAe,EACf,SAAS,EACT,UAAU,EAEV,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,gBAAgB,EAChB,UAAU,EAEV,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAKlB,wBAAgB,uBAAuB,CAAC,QAAQ,SAAS,QAAQ,EAC/D,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC,EACnD,OAAO,GAAE,kBAAkB,CAAC,QAAQ,CAInC,EACD,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,QAoC5B;AAED,KAAK,kBAAkB,CAAC,QAAQ,SAAS,QAAQ,IAAI;IACnD,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,QAAQ,C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AE,gBAAgB,EAAE,aAAa,EAAE,EAAE,kBAAkB,UAC1F,OAAO,SAAS,GAAG,KAAK,OAAO,sBAYvD;AAED,wBAAgB,yBAAyB,CAAC,EAAE,aAAa,EAAE,gBAAgB,EAAE,cAAc,EAAE,EAAE,kBAAkB,WAChG,YAAY,cAAc,EAAE,GAAG,CAAC,UAoBhD;AAED,wBAAgB,oBAAoB,CAAC,EACnC,aAAa,EACb,SAAS,EACT,iBAAiB,EACjB,iBAAiB,EACjB,SAAS,GACV,EAAE,aAAa,WACC,YAAY,cAAc,EAAE,GAAG,CAAC,UAahD;AAED,wBAAgB,uBAAuB,CAAC,EACtC,aAAa,EACb,SAAS,EACT,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,GAClB,EAAE,gBAAgB,WACF,YAAY,cAAc,EAAE,GAAG,CAAC,UAgChD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyflow/system",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.23",
|
|
4
4
|
"description": "xyflow core system that powers React Flow and Svelte Flow.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"node-based UI",
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/node": "^18.7.16",
|
|
49
49
|
"typescript": "5.1.3",
|
|
50
|
+
"@xyflow/eslint-config": "0.0.0",
|
|
50
51
|
"@xyflow/rollup-config": "0.0.0",
|
|
51
|
-
"@xyflow/tsconfig": "0.0.0"
|
|
52
|
-
"@xyflow/eslint-config": "0.0.0"
|
|
52
|
+
"@xyflow/tsconfig": "0.0.0"
|
|
53
53
|
},
|
|
54
54
|
"rollup": {
|
|
55
55
|
"globals": {
|