n8n-editor-ui 1.76.0 → 1.76.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/assets/{AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-Bk0ZjgAz.js → AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-BHsxR3W1.js} +1 -1
  2. package/dist/assets/{AuthView-CQW1x21E.js → AuthView-BM2FUuPl.js} +2 -2
  3. package/dist/assets/{CanvasChat-DuJwpZew.js → CanvasChat-CH9p9KhM.js} +13 -19
  4. package/dist/assets/{CanvasControls-Br7x0c2w.js → CanvasControls-B731Q2p8.js} +1 -1
  5. package/dist/assets/{ChangePasswordView-Ck-5oU_m.js → ChangePasswordView-V_sPVTAZ.js} +3 -3
  6. package/dist/assets/CollectionParameter-6vvdqJHF.js +4 -0
  7. package/dist/assets/{ConcurrentExecutionsHeader-Dfi130Qe.js → ConcurrentExecutionsHeader-CqJlRLxg.js} +2 -2
  8. package/dist/assets/{CredentialsView-D44diL3J.js → CredentialsView-C4S2fAdA.js} +4 -4
  9. package/dist/assets/{ErrorView-ub9nQRXV.js → ErrorView-JaoAwutc.js} +1 -1
  10. package/dist/assets/{ExecutionsView-DsAXYzOp.js → ExecutionsView-5wTNtaSW.js} +5 -5
  11. package/dist/assets/{FileSaver.min-nbqT44De.js → FileSaver.min-LGC4rFGc.js} +1 -1
  12. package/dist/assets/{FixedCollectionParameter-DwiBHQQW.js → FixedCollectionParameter-D4_FTYVl.js} +1 -1
  13. package/dist/assets/{ForgotMyPasswordView-CH0wwots.js → ForgotMyPasswordView-w2WP9YgP.js} +3 -3
  14. package/dist/assets/{Logo-CIYEwVrA.js → Logo-SPkbfh59.js} +1 -1
  15. package/dist/assets/{MainHeader-CN6RTCuC.js → MainHeader-BJg52ZXw.js} +9 -9
  16. package/dist/assets/{MainSidebar-ih4BlE0n.js → MainSidebar-CKqH4uT7.js} +3 -3
  17. package/dist/assets/{NodeCreation-DQUKwvhM.js → NodeCreation-CVgzrFcX.js} +4 -4
  18. package/dist/assets/{NodeCreator-B1R35yuN.js → NodeCreator-cCYcgerB.js} +5 -5
  19. package/dist/assets/{NodeViewSwitcher-TsFkW80s.js → NodeViewSwitcher-CUwv0PGz.js} +21 -21
  20. package/dist/assets/{ProjectCardBadge-BcCHZFJ2.js → ProjectCardBadge-C3jDsURN.js} +1 -1
  21. package/dist/assets/{ProjectHeader-CSOMgkVs.js → ProjectHeader-DSa1hmOP.js} +1 -1
  22. package/dist/assets/{ProjectSettings-DtqNq5WU.js → ProjectSettings-I2IF04E7.js} +2 -2
  23. package/dist/assets/{PushConnectionTracker.vue_vue_type_script_setup_true_lang-CZIKiOsY.js → PushConnectionTracker.vue_vue_type_script_setup_true_lang-CmOvnliJ.js} +1 -1
  24. package/dist/assets/{ResourcesListLayout-CvkkebAN.js → ResourcesListLayout-bBpXYF7L.js} +1 -1
  25. package/dist/assets/{RunDataJson-DA1LNZGU.js → RunDataJson-CcnypqRE.js} +15 -15
  26. package/dist/assets/{RunDataJsonActions-DZzYHsR7.js → RunDataJsonActions-kHQ6vY1P.js} +2 -2
  27. package/dist/assets/{RunDataSearch-D6-6kSmI.js → RunDataSearch-DACIe57p.js} +1 -1
  28. package/dist/assets/{RunDataTable-bDBgkWN3.js → RunDataTable-Sb63wJLj.js} +2 -2
  29. package/dist/assets/{SamlOnboarding-ULq0l8s6.js → SamlOnboarding-DQsARCUw.js} +3 -3
  30. package/dist/assets/{SettingsApiView-CVRk9yEi.js → SettingsApiView-zx8BvT3f.js} +1 -1
  31. package/dist/assets/{SettingsCommunityNodesView-B6We65ta.js → SettingsCommunityNodesView-Ctc1LGK_.js} +4 -4
  32. package/dist/assets/{SettingsExternalSecrets-wrWe6ob7.js → SettingsExternalSecrets-BMlNzQCb.js} +1 -1
  33. package/dist/assets/{SettingsLdapView-CeKm7XML.js → SettingsLdapView-C4cxA2ox.js} +1 -1
  34. package/dist/assets/{SettingsLogStreamingView-DxAoQ7dF.js → SettingsLogStreamingView-CeD1-VKh.js} +1 -1
  35. package/dist/assets/{SettingsPersonalView-DFcUFc08.js → SettingsPersonalView-CMDHnJnJ.js} +1 -1
  36. package/dist/assets/{SettingsSourceControl-D9u9tDhF.js → SettingsSourceControl-uNESGSVY.js} +1 -1
  37. package/dist/assets/{SettingsSso-gUSJtFP0.js → SettingsSso-B5395yj8.js} +1 -1
  38. package/dist/assets/{SettingsUsageAndPlan-C4rSaxsT.js → SettingsUsageAndPlan-B9L45dZx.js} +1 -1
  39. package/dist/assets/{SettingsUsersView-DSaFQg1K.js → SettingsUsersView-BfjRqHo8.js} +1 -1
  40. package/dist/assets/{SettingsView-BcBZpdTs.js → SettingsView-Dvnv5HjE.js} +1 -1
  41. package/dist/assets/{SetupView-BnZ-D6Jy.js → SetupView-Bo0whiYi.js} +3 -3
  42. package/dist/assets/{SetupWorkflowCredentialsButton-B3DfAGgF.js → SetupWorkflowCredentialsButton-CMSQ2frW.js} +1 -1
  43. package/dist/assets/{SetupWorkflowFromTemplateView-DVLoF-kN.js → SetupWorkflowFromTemplateView-DVqRDQCE.js} +3 -3
  44. package/dist/assets/{SigninView-BI4UTqFm.js → SigninView-BdyUXUo3.js} +3 -3
  45. package/dist/assets/{SignoutView-4KEfr3ze.js → SignoutView-BJybdazp.js} +1 -1
  46. package/dist/assets/{SignupView-BdxSQxbe.js → SignupView-CzWl7RK9.js} +3 -3
  47. package/dist/assets/{TemplateDetails-BU5E9lAh.js → TemplateDetails-D7boD6wI.js} +1 -1
  48. package/dist/assets/{TemplateList-CSyTesvr.js → TemplateList-CThbAVgl.js} +1 -1
  49. package/dist/assets/{TemplatesCollectionView-aqqEP8td.js → TemplatesCollectionView-Dc0v4dF-.js} +5 -5
  50. package/dist/assets/{TemplatesSearchView-BXQw_aAZ.js → TemplatesSearchView-BuT5hNyb.js} +3 -3
  51. package/dist/assets/{TemplatesView-BbVjMkgy.js → TemplatesView-BJE24X4W.js} +1 -1
  52. package/dist/assets/{TemplatesWorkflowView-Cao3RpEd.js → TemplatesWorkflowView-CbvvJsE5.js} +5 -5
  53. package/dist/assets/{TestDefinitionEditView-CgW-4tTx.js → TestDefinitionEditView-I7Ov_Zoa.js} +4 -4
  54. package/dist/assets/{TestDefinitionListView-D3eg62pM.js → TestDefinitionListView-D5DrgrXe.js} +1 -1
  55. package/dist/assets/{TestDefinitionRootView-DJdsaL4M.js → TestDefinitionRootView-L4hq7nTP.js} +1 -1
  56. package/dist/assets/{VariablesView-2TmNYpas.js → VariablesView-LkC3vF2q.js} +2 -2
  57. package/dist/assets/{WorkerView-C3LhhFeZ.js → WorkerView-COvW8anR.js} +5 -5
  58. package/dist/assets/{WorkflowActivator-DiOQiQK2.js → WorkflowActivator-P0lWv8pk.js} +2 -2
  59. package/dist/assets/{WorkflowExecutionsInfoAccordion-BmMiVSHQ.js → WorkflowExecutionsInfoAccordion-BIkiqgxq.js} +1 -1
  60. package/dist/assets/{WorkflowExecutionsLandingPage-CxbfP9Kf.js → WorkflowExecutionsLandingPage-D4n3E-xo.js} +2 -2
  61. package/dist/assets/{WorkflowExecutionsPreview-Cku-ZBQ3.js → WorkflowExecutionsPreview-CJPBVQWQ.js} +5 -5
  62. package/dist/assets/{WorkflowExecutionsView-C0CnXLDW.js → WorkflowExecutionsView-C1q64QSF.js} +5 -5
  63. package/dist/assets/{WorkflowHistory-Bg6AIKXX.js → WorkflowHistory-BMFmf0H2.js} +3 -3
  64. package/dist/assets/{WorkflowOnboardingView-LXWyp2is.js → WorkflowOnboardingView-C9MYK55j.js} +1 -1
  65. package/dist/assets/{WorkflowPreview-CsR9t5iY.js → WorkflowPreview-p6m8HW6g.js} +1 -1
  66. package/dist/assets/{WorkflowsView-DQJAEKqk.js → WorkflowsView-ryt6Z6Pg.js} +7 -7
  67. package/dist/assets/{easyAiWorkflowUtils-D3El0FyE.js → easyAiWorkflowUtils-IFYGWz42.js} +1 -1
  68. package/dist/assets/{index-DvkbRfZN.js → index-BfLzQZy8.js} +55 -55
  69. package/dist/assets/{polyfills-DNwgos9f.js → polyfills-DfOJfMlf.js} +257 -847
  70. package/dist/assets/{pushConnection.store-5KniMGTZ.js → pushConnection.store-B2kXZQ1r.js} +1 -1
  71. package/dist/assets/{templateActions-UGDN8R7F.js → templateActions-Cs3Aa6ob.js} +1 -1
  72. package/dist/assets/{useBeforeUnload-BwgAu_Gm.js → useBeforeUnload-Df6rjuGn.js} +1 -1
  73. package/dist/assets/{useBugReporting-Bqv4ngy7.js → useBugReporting-DKZQoKUA.js} +1 -1
  74. package/dist/assets/{useCanvasOperations-Cw1yjntX.js → useCanvasOperations-0-rDC1Yl.js} +546 -670
  75. package/dist/assets/{useExecutionDebugging-CTzUvS-m.js → useExecutionDebugging-DX94986O.js} +1 -1
  76. package/dist/assets/{useExecutionHelpers-ts_ANr0X.js → useExecutionHelpers-CVNFGfe1.js} +1 -1
  77. package/dist/assets/{usePinnedData-CAHmwr13.js → usePinnedData-CE68dXlh.js} +1 -1
  78. package/dist/assets/{usePushConnection-BcVRW8VB.js → usePushConnection-D1Uzxdr7.js} +3 -3
  79. package/dist/assets/{useRunWorkflow-DZq8rmMi.js → useRunWorkflow-CrM3JYTw.js} +3 -3
  80. package/dist/assets/{useWorkflowActivate-y3uHMZeh.js → useWorkflowActivate-DhQ6AKDL.js} +1 -1
  81. package/dist/index.html +2 -2
  82. package/package.json +1 -1
  83. package/dist/assets/CollectionParameter-DRNykodC.js +0 -4
@@ -1,6 +1,6 @@
1
- import { gn as createCompounder, go as SetCache, gp as arrayIncludes, gq as cacheHas, gr as baseRest, gs as isArrayLikeObject, gt as baseFlatten, r as ref, K as useUIStore, bn as useNodeTypesStore, T as useWorkflowsStore, a0 as useSourceControlStore, q as computed, al as getResourcePermissions, cQ as isPresent, H as watch, dy as getMousePosition$1, aB as STICKY_NODE_TYPE, g as useI18n, gu as NOT_DUPLICATABLE_NODE_TYPES, d as defineComponent, E as onClickOutside, l as unref, c as openBlock, e as createBlock, j as createBaseVNode, i as createVNode, w as withCtx, n as normalizeClass, gv as N8nActionDropdown, B as normalizeStyle, gw as Teleport, f as createCommentVNode, _ as _export_sfc$1, bj as v4, gx as CORE_NODES_CATEGORY, gy as DEFAULT_SUBCATEGORY, p as useSettingsStore, gz as AI_TRANSFORM_NODE_TYPE, gA as sublimeSearch, b9 as AI_SUBCATEGORY, ba as AI_CATEGORY_AGENTS, gB as sortBy, fU as i18n, gC as AI_CATEGORY_OTHER_TOOLS, gD as AI_OTHERS_NODE_CREATOR_VIEW, gE as AI_CATEGORY_DOCUMENT_LOADERS, bg as NodeConnectionType, gF as AI_CATEGORY_LANGUAGE_MODELS, gG as AI_CATEGORY_MEMORY, gH as AI_CATEGORY_OUTPUTPARSER, gI as AI_CATEGORY_RETRIEVERS, gJ as AI_CATEGORY_TEXT_SPLITTERS, gK as AI_CATEGORY_TOOLS, gL as AI_WORKFLOW_TOOL_LANGCHAIN_NODE_TYPE, gM as AI_CODE_TOOL_LANGCHAIN_NODE_TYPE, gN as AI_CATEGORY_EMBEDDING, gO as AI_CATEGORY_VECTOR_STORES, gP as AI_UNCATEGORIZED_CATEGORY, aL as useTemplatesStore, en as AI_NODE_CREATOR_VIEW, dO as TRIGGER_NODE_CREATOR_VIEW, bH as MANUAL_TRIGGER_NODE_TYPE, bI as WEBHOOK_NODE_TYPE, gQ as EMAIL_IMAP_NODE_TYPE, gR as SCHEDULE_TRIGGER_NODE_TYPE, bx as FORM_TRIGGER_NODE_TYPE, g8 as EXECUTE_WORKFLOW_TRIGGER_NODE_TYPE, b6 as CHAT_TRIGGER_NODE_TYPE, gS as OTHER_TRIGGER_NODES_SUBCATEGORY, eG as REGULAR_NODE_CREATOR_VIEW, gT as RSS_READ_NODE_TYPE, gU as EMAIL_SEND_NODE_TYPE, gV as TRANSFORM_DATA_SUBCATEGORY, gW as FILTER_NODE_TYPE, gX as REMOVE_DUPLICATES_NODE_TYPE, gY as SPLIT_OUT_NODE_TYPE, gZ as LIMIT_NODE_TYPE, g_ as SUMMARIZE_NODE_TYPE, g$ as AGGREGATE_NODE_TYPE, h0 as MERGE_NODE_TYPE, cn as HTML_NODE_TYPE, h1 as MARKDOWN_NODE_TYPE, h2 as XML_NODE_TYPE, h3 as CRYPTO_NODE_TYPE, h4 as EXTRACT_FROM_FILE_NODE_TYPE, h5 as CONVERT_TO_FILE_NODE_TYPE, h6 as COMPRESSION_NODE_TYPE, h7 as EDIT_IMAGE_NODE_TYPE, h8 as FLOWS_CONTROL_SUBCATEGORY, h9 as IF_NODE_TYPE, ha as SPLIT_IN_BATCHES_NODE_TYPE, hb as HELPERS_SUBCATEGORY, hc as HTTP_REQUEST_NODE_TYPE, hd as CODE_NODE_TYPE, bb as AI_CATEGORY_CHAINS, he as SET_NODE_TYPE, hf as DATETIME_NODE_TYPE, R as defineStore, $ as useCanvasStore, hg as AI_CATEGORY_ROOT_NODES, y as nextTick, bc as AI_CODE_NODE_TYPE, bJ as AI_TRANSFORM_NODE_TYPE$1, eP as CanvasConnectionMode, hh as isValidCanvasConnectionMode, d6 as isValidNodeConnectionType, S as STORES, as as useNDVStore, dD as NODE_CREATOR_OPEN_SOURCES, hi as isVueFlowConnection, d_ as nodeConnectionTypes, bd as getNodeInputs, dn as CUSTOM_API_CALL_KEY, aS as useExternalHooks, aj as useTelemetry, hj as effectScope, ci as toRef, h as createElementBlock, s as renderSlot, c9 as useSlots, bp as provide, b3 as onUnmounted, aw as onBeforeMount, o as onMounted, hk as createPropsRestProxy, hl as useAttrs, F as Fragment, d4 as getCurrentInstance, dx as reactive, aV as inject, t as toDisplayString, A as renderList, x as onBeforeUnmount, hm as isMemoSame, hn as getCurrentScope, ho as onScopeDispose, aW as isRef, aX as toRefs$1, hp as customRef, hq as toValue$1, a$ as resolveDynamicComponent, k as createTextVNode, a_ as mergeProps, m as resolveComponent, ap as h, hr as markRaw, hs as readonly, dC as KeyboardShortcutTooltip, ht as CanvasKey, aa as useCssModule, bm as watchEffect, aY as normalizeProps, hu as CanvasNodeKey, eM as CanvasNodeRenderType, hv as refThrottled, hw as mergeModels, hx as useModel, bo as useNodeHelpers, bG as TitledList, cN as resolveDirective, ax as withDirectives, ac as nodeViewEventBus, hy as CanvasNodeHandleKey, ay as vShow, cY as Transition$2, bq as _sfc_main$y, I as withModifiers, C as createEventBus, bO as isEqual, hz as useActiveElement, c$ as useDeviceSupport, hA as useEventListener$1, aR as createSlots, dj as GRID_SIZE, hB as onKeyDown, hC as onKeyUp, c8 as useThrottleFn, aZ as guardReactiveProps, cq as Suspense, bf as getNodeOutputs, c_ as getTriggerNodeServiceName, eV as sanitizeHtml, bF as nodeIssuesToString, dr as WAIT_NODE_TYPE, ds as SEND_AND_WAIT_OPERATION, dt as FORM_NODE_TYPE, du as WAIT_INDEFINITELY, Z as useRootStore, bQ as useCredentialsStore, bT as useHistoryStore, D as useTagsStore, at as useExecutionsStore, a as useToast, a4 as useWorkflowHelpers, b5 as useClipboard, dR as MoveNodeCommand, c2 as RenameNodeCommand, eK as RemoveNodeCommand, eI as useDataSchema, dY as NODE_SIZE, hD as AddNodeCommand, b_ as getNodeParameters, dT as getNewNodePosition, hE as DEFAULT_NODE_SIZE, hF as CONFIGURATION_NODE_SIZE, be as getConnectionTypes, dZ as generateOffsets, hG as CONFIGURABLE_NODE_SIZE, dX as PUSH_NODES_OFFSET, e7 as AddConnectionCommand, eh as RemoveConnectionCommand, dS as UPDATE_WEBHOOK_ID_NODE_TYPES, dM as generateNodesGraph, a8 as EnterpriseEditionFeature, b$ as deepCopy } from "./index-DvkbRfZN.js";
2
- import { u as useBugReporting } from "./useBugReporting-Bqv4ngy7.js";
3
- import { c as capitalize, u as usePinnedData } from "./usePinnedData-CAHmwr13.js";
1
+ import { gn as createCompounder, go as SetCache, gp as arrayIncludes, gq as cacheHas, gr as baseRest, gs as isArrayLikeObject, gt as baseFlatten, r as ref, K as useUIStore, bn as useNodeTypesStore, T as useWorkflowsStore, a0 as useSourceControlStore, q as computed, al as getResourcePermissions, cQ as isPresent, H as watch, dy as getMousePosition$1, aB as STICKY_NODE_TYPE, g as useI18n, gu as NOT_DUPLICATABLE_NODE_TYPES, d as defineComponent, E as onClickOutside, l as unref, c as openBlock, e as createBlock, j as createBaseVNode, i as createVNode, w as withCtx, n as normalizeClass, gv as N8nActionDropdown, B as normalizeStyle, gw as Teleport, f as createCommentVNode, _ as _export_sfc$1, bj as v4, gx as CORE_NODES_CATEGORY, gy as DEFAULT_SUBCATEGORY, p as useSettingsStore, gz as AI_TRANSFORM_NODE_TYPE, gA as sublimeSearch, b9 as AI_SUBCATEGORY, ba as AI_CATEGORY_AGENTS, gB as sortBy, fU as i18n, gC as AI_CATEGORY_OTHER_TOOLS, gD as AI_OTHERS_NODE_CREATOR_VIEW, gE as AI_CATEGORY_DOCUMENT_LOADERS, bg as NodeConnectionType, gF as AI_CATEGORY_LANGUAGE_MODELS, gG as AI_CATEGORY_MEMORY, gH as AI_CATEGORY_OUTPUTPARSER, gI as AI_CATEGORY_RETRIEVERS, gJ as AI_CATEGORY_TEXT_SPLITTERS, gK as AI_CATEGORY_TOOLS, gL as AI_WORKFLOW_TOOL_LANGCHAIN_NODE_TYPE, gM as AI_CODE_TOOL_LANGCHAIN_NODE_TYPE, gN as AI_CATEGORY_EMBEDDING, gO as AI_CATEGORY_VECTOR_STORES, gP as AI_UNCATEGORIZED_CATEGORY, aL as useTemplatesStore, en as AI_NODE_CREATOR_VIEW, dO as TRIGGER_NODE_CREATOR_VIEW, bH as MANUAL_TRIGGER_NODE_TYPE, bI as WEBHOOK_NODE_TYPE, gQ as EMAIL_IMAP_NODE_TYPE, gR as SCHEDULE_TRIGGER_NODE_TYPE, bx as FORM_TRIGGER_NODE_TYPE, g8 as EXECUTE_WORKFLOW_TRIGGER_NODE_TYPE, b6 as CHAT_TRIGGER_NODE_TYPE, gS as OTHER_TRIGGER_NODES_SUBCATEGORY, eG as REGULAR_NODE_CREATOR_VIEW, gT as RSS_READ_NODE_TYPE, gU as EMAIL_SEND_NODE_TYPE, gV as TRANSFORM_DATA_SUBCATEGORY, gW as FILTER_NODE_TYPE, gX as REMOVE_DUPLICATES_NODE_TYPE, gY as SPLIT_OUT_NODE_TYPE, gZ as LIMIT_NODE_TYPE, g_ as SUMMARIZE_NODE_TYPE, g$ as AGGREGATE_NODE_TYPE, h0 as MERGE_NODE_TYPE, cn as HTML_NODE_TYPE, h1 as MARKDOWN_NODE_TYPE, h2 as XML_NODE_TYPE, h3 as CRYPTO_NODE_TYPE, h4 as EXTRACT_FROM_FILE_NODE_TYPE, h5 as CONVERT_TO_FILE_NODE_TYPE, h6 as COMPRESSION_NODE_TYPE, h7 as EDIT_IMAGE_NODE_TYPE, h8 as FLOWS_CONTROL_SUBCATEGORY, h9 as IF_NODE_TYPE, ha as SPLIT_IN_BATCHES_NODE_TYPE, hb as HELPERS_SUBCATEGORY, hc as HTTP_REQUEST_NODE_TYPE, hd as CODE_NODE_TYPE, bb as AI_CATEGORY_CHAINS, he as SET_NODE_TYPE, hf as DATETIME_NODE_TYPE, R as defineStore, $ as useCanvasStore, hg as AI_CATEGORY_ROOT_NODES, y as nextTick, bc as AI_CODE_NODE_TYPE, bJ as AI_TRANSFORM_NODE_TYPE$1, eP as CanvasConnectionMode, hh as isValidCanvasConnectionMode, d6 as isValidNodeConnectionType, S as STORES, as as useNDVStore, dD as NODE_CREATOR_OPEN_SOURCES, hi as isVueFlowConnection, d_ as nodeConnectionTypes, bd as getNodeInputs, dn as CUSTOM_API_CALL_KEY, aS as useExternalHooks, aj as useTelemetry, hj as effectScope, ci as toRef, h as createElementBlock, s as renderSlot, c9 as useSlots, bp as provide, b3 as onUnmounted, aw as onBeforeMount, o as onMounted, hk as useAttrs, a_ as mergeProps, F as Fragment, d4 as getCurrentInstance, dx as reactive, aV as inject, t as toDisplayString, A as renderList, x as onBeforeUnmount, hl as isMemoSame, hm as getCurrentScope, hn as onScopeDispose, aW as isRef, aX as toRefs$1, ho as customRef, hp as toValue$1, hq as createPropsRestProxy, a$ as resolveDynamicComponent, k as createTextVNode, m as resolveComponent, ap as h, hr as readonly, hs as markRaw, dC as KeyboardShortcutTooltip, ht as CanvasKey, aa as useCssModule, bm as watchEffect, aY as normalizeProps, hu as CanvasNodeKey, eM as CanvasNodeRenderType, hv as refThrottled, hw as mergeModels, hx as useModel, bo as useNodeHelpers, bG as TitledList, cN as resolveDirective, ax as withDirectives, ac as nodeViewEventBus, hy as CanvasNodeHandleKey, ay as vShow, cY as Transition$2, bq as _sfc_main$y, I as withModifiers, C as createEventBus, bO as isEqual, hz as useActiveElement, c$ as useDeviceSupport, hA as useEventListener$1, aR as createSlots, dj as GRID_SIZE, hB as onKeyDown, hC as onKeyUp, c8 as useThrottleFn, aZ as guardReactiveProps, cq as Suspense, bf as getNodeOutputs, c_ as getTriggerNodeServiceName, eV as sanitizeHtml, bF as nodeIssuesToString, dr as WAIT_NODE_TYPE, ds as SEND_AND_WAIT_OPERATION, dt as FORM_NODE_TYPE, du as WAIT_INDEFINITELY, Z as useRootStore, bQ as useCredentialsStore, bT as useHistoryStore, D as useTagsStore, at as useExecutionsStore, a as useToast, a4 as useWorkflowHelpers, b5 as useClipboard, dR as MoveNodeCommand, c2 as RenameNodeCommand, eK as RemoveNodeCommand, eI as useDataSchema, dY as NODE_SIZE, hD as AddNodeCommand, b_ as getNodeParameters, dT as getNewNodePosition, hE as DEFAULT_NODE_SIZE, hF as CONFIGURATION_NODE_SIZE, be as getConnectionTypes, dZ as generateOffsets, hG as CONFIGURABLE_NODE_SIZE, dX as PUSH_NODES_OFFSET, e7 as AddConnectionCommand, eh as RemoveConnectionCommand, dS as UPDATE_WEBHOOK_ID_NODE_TYPES, dM as generateNodesGraph, a8 as EnterpriseEditionFeature, b$ as deepCopy } from "./index-BfLzQZy8.js";
2
+ import { u as useBugReporting } from "./useBugReporting-DKZQoKUA.js";
3
+ import { c as capitalize, u as usePinnedData } from "./usePinnedData-CE68dXlh.js";
4
4
  var camelCase = createCompounder(function(result, word, index) {
5
5
  word = word.toLowerCase();
6
6
  return result + (index ? capitalize(word) : word);
@@ -5866,36 +5866,27 @@ function calcNextPosition(node2, nextPosition, triggerError, nodeExtent, parentN
5866
5866
  computedPosition: clampedPos
5867
5867
  };
5868
5868
  }
5869
- function getHandlePosition(node2, handle2, fallbackPosition = Position.Left) {
5869
+ function getHandlePosition(node2, handle2, fallbackPosition = Position.Left, center = false) {
5870
5870
  const x = ((handle2 == null ? void 0 : handle2.x) ?? 0) + node2.computedPosition.x;
5871
5871
  const y = ((handle2 == null ? void 0 : handle2.y) ?? 0) + node2.computedPosition.y;
5872
5872
  const { width, height } = handle2 ?? getNodeDimensions(node2);
5873
+ if (center) {
5874
+ return { x: x + width / 2, y: y + height / 2 };
5875
+ }
5873
5876
  const position2 = (handle2 == null ? void 0 : handle2.position) ?? fallbackPosition;
5874
5877
  switch (position2) {
5875
5878
  case Position.Top:
5876
- return {
5877
- x: x + width / 2,
5878
- y
5879
- };
5879
+ return { x: x + width / 2, y };
5880
5880
  case Position.Right:
5881
- return {
5882
- x: x + width,
5883
- y: y + height / 2
5884
- };
5881
+ return { x: x + width, y: y + height / 2 };
5885
5882
  case Position.Bottom:
5886
- return {
5887
- x: x + width / 2,
5888
- y: y + height
5889
- };
5883
+ return { x: x + width / 2, y: y + height };
5890
5884
  case Position.Left:
5891
- return {
5892
- x,
5893
- y: y + height / 2
5894
- };
5885
+ return { x, y: y + height / 2 };
5895
5886
  }
5896
5887
  }
5897
- function getHandle(bounds = [], handleId) {
5898
- if (!bounds.length) {
5888
+ function getEdgeHandle(bounds, handleId) {
5889
+ if (!bounds) {
5899
5890
  return null;
5900
5891
  }
5901
5892
  return (!handleId ? bounds[0] : bounds.find((d) => d.id === handleId)) || null;
@@ -6095,103 +6086,90 @@ function snapPosition(position2, snapGrid = [1, 1]) {
6095
6086
  y: snapGrid[1] * Math.round(position2.y / snapGrid[1])
6096
6087
  };
6097
6088
  }
6098
- function defaultValidHandleResult() {
6099
- return {
6100
- handleDomNode: null,
6101
- isValid: false,
6102
- connection: { source: "", target: "", sourceHandle: null, targetHandle: null },
6103
- endHandle: null
6104
- };
6105
- }
6089
+ const alwaysValid$1 = () => true;
6106
6090
  function resetRecentHandle(handleDomNode) {
6107
6091
  handleDomNode == null ? void 0 : handleDomNode.classList.remove("valid", "connecting", "vue-flow__handle-valid", "vue-flow__handle-connecting");
6108
6092
  }
6109
- function getHandles(node2, handleBounds, type, currentHandle) {
6110
- const connectionHandles = [];
6111
- for (const handle2 of handleBounds[type] || []) {
6112
- if (`${node2.id}-${handle2.id}-${type}` !== currentHandle) {
6113
- const { x, y } = getHandlePosition(node2, handle2);
6114
- connectionHandles.push({
6115
- id: handle2.id || null,
6116
- type,
6117
- nodeId: node2.id,
6118
- x,
6119
- y
6120
- });
6093
+ function getNodesWithinDistance(position2, nodeLookup, distance2) {
6094
+ const nodes = [];
6095
+ const rect = {
6096
+ x: position2.x - distance2,
6097
+ y: position2.y - distance2,
6098
+ width: distance2 * 2,
6099
+ height: distance2 * 2
6100
+ };
6101
+ for (const node2 of nodeLookup.values()) {
6102
+ if (getOverlappingArea(rect, nodeToRect(node2)) > 0) {
6103
+ nodes.push(node2);
6121
6104
  }
6122
6105
  }
6123
- return connectionHandles;
6106
+ return nodes;
6124
6107
  }
6125
- function getClosestHandle(event, doc, pos, connectionRadius, handles, validator) {
6126
- const { x, y } = getEventPosition(event);
6127
- const domNodes = doc.elementsFromPoint(x, y);
6128
- const handleBelow = domNodes.find((el) => el.classList.contains("vue-flow__handle"));
6129
- if (handleBelow) {
6130
- const handleNodeId = handleBelow.getAttribute("data-nodeid");
6131
- if (handleNodeId) {
6132
- const handleType = getHandleType(void 0, handleBelow);
6133
- const handleId = handleBelow.getAttribute("data-handleid");
6134
- const validHandleResult = validator({ nodeId: handleNodeId, id: handleId, type: handleType });
6135
- if (validHandleResult) {
6136
- const handle2 = handles.find((h2) => h2.nodeId === handleNodeId && h2.type === handleType && h2.id === handleId);
6137
- return {
6138
- handle: {
6139
- id: handleId,
6140
- type: handleType,
6141
- nodeId: handleNodeId,
6142
- x: (handle2 == null ? void 0 : handle2.x) || pos.x,
6143
- y: (handle2 == null ? void 0 : handle2.y) || pos.y
6144
- },
6145
- validHandleResult
6146
- };
6147
- }
6148
- }
6149
- }
6108
+ const ADDITIONAL_DISTANCE = 250;
6109
+ function getClosestHandle(position2, connectionRadius, nodeLookup, fromHandle) {
6110
+ var _a, _b;
6150
6111
  let closestHandles = [];
6151
6112
  let minDistance = Number.POSITIVE_INFINITY;
6152
- for (const handle2 of handles) {
6153
- const distance2 = Math.sqrt((handle2.x - pos.x) ** 2 + (handle2.y - pos.y) ** 2);
6154
- if (distance2 <= connectionRadius) {
6155
- const validHandleResult = validator(handle2);
6156
- if (distance2 <= minDistance) {
6157
- if (distance2 < minDistance) {
6158
- closestHandles = [{ handle: handle2, validHandleResult }];
6159
- } else if (distance2 === minDistance) {
6160
- closestHandles.push({
6161
- handle: handle2,
6162
- validHandleResult
6163
- });
6164
- }
6113
+ const closeNodes = getNodesWithinDistance(position2, nodeLookup, connectionRadius + ADDITIONAL_DISTANCE);
6114
+ for (const node2 of closeNodes) {
6115
+ const allHandles = [...((_a = node2.handleBounds) == null ? void 0 : _a.source) ?? [], ...((_b = node2.handleBounds) == null ? void 0 : _b.target) ?? []];
6116
+ for (const handle2 of allHandles) {
6117
+ if (fromHandle.nodeId === handle2.nodeId && fromHandle.type === handle2.type && fromHandle.id === handle2.id) {
6118
+ continue;
6119
+ }
6120
+ const { x, y } = getHandlePosition(node2, handle2, handle2.position, true);
6121
+ const distance2 = Math.sqrt((x - position2.x) ** 2 + (y - position2.y) ** 2);
6122
+ if (distance2 > connectionRadius) {
6123
+ continue;
6124
+ }
6125
+ if (distance2 < minDistance) {
6126
+ closestHandles = [{ ...handle2, x, y }];
6165
6127
  minDistance = distance2;
6128
+ } else if (distance2 === minDistance) {
6129
+ closestHandles.push({ ...handle2, x, y });
6166
6130
  }
6167
6131
  }
6168
6132
  }
6169
6133
  if (!closestHandles.length) {
6170
- return { handle: null, validHandleResult: defaultValidHandleResult() };
6171
- }
6172
- if (closestHandles.length === 1) {
6173
- return closestHandles[0];
6134
+ return null;
6174
6135
  }
6175
- const hasValidHandle = closestHandles.some(({ validHandleResult }) => validHandleResult.isValid);
6176
- const hasTargetHandle = closestHandles.some(({ handle: handle2 }) => handle2.type === "target");
6177
- return closestHandles.find(
6178
- ({ handle: handle2, validHandleResult }) => hasTargetHandle ? handle2.type === "target" : hasValidHandle ? validHandleResult.isValid : true
6179
- ) || closestHandles[0];
6180
- }
6181
- function isValidHandle(event, handle2, connectionMode, fromNodeId, fromHandleId, fromType, isValidConnection, doc, edges, nodes, findNode) {
6136
+ if (closestHandles.length > 1) {
6137
+ const oppositeHandleType = fromHandle.type === "source" ? "target" : "source";
6138
+ return closestHandles.find((handle2) => handle2.type === oppositeHandleType) ?? closestHandles[0];
6139
+ }
6140
+ return closestHandles[0];
6141
+ }
6142
+ function isValidHandle(event, {
6143
+ handle: handle2,
6144
+ connectionMode,
6145
+ fromNodeId,
6146
+ fromHandleId,
6147
+ fromType,
6148
+ doc,
6149
+ lib,
6150
+ flowId,
6151
+ isValidConnection = alwaysValid$1
6152
+ }, edges, nodes, findNode) {
6182
6153
  const isTarget = fromType === "target";
6183
- const handleDomNode = doc.querySelector(`.vue-flow__handle[data-id="${handle2 == null ? void 0 : handle2.nodeId}-${handle2 == null ? void 0 : handle2.id}-${handle2 == null ? void 0 : handle2.type}"]`);
6154
+ const handleDomNode = handle2 ? doc.querySelector(`.${lib}-flow__handle[data-id="${flowId}-${handle2 == null ? void 0 : handle2.nodeId}-${handle2 == null ? void 0 : handle2.id}-${handle2 == null ? void 0 : handle2.type}"]`) : null;
6184
6155
  const { x, y } = getEventPosition(event);
6185
- const elementBelow = doc.elementFromPoint(x, y);
6186
- const handleToCheck = (elementBelow == null ? void 0 : elementBelow.classList.contains("vue-flow__handle")) ? elementBelow : handleDomNode;
6187
- const result = defaultValidHandleResult();
6156
+ const handleBelow = doc.elementFromPoint(x, y);
6157
+ const handleToCheck = (handleBelow == null ? void 0 : handleBelow.classList.contains(`${lib}-flow__handle`)) ? handleBelow : handleDomNode;
6158
+ const result = {
6159
+ handleDomNode: handleToCheck,
6160
+ isValid: false,
6161
+ connection: null,
6162
+ toHandle: null
6163
+ };
6188
6164
  if (handleToCheck) {
6189
- result.handleDomNode = handleToCheck;
6190
6165
  const handleType = getHandleType(void 0, handleToCheck);
6191
6166
  const handleNodeId = handleToCheck.getAttribute("data-nodeid");
6192
6167
  const handleId = handleToCheck.getAttribute("data-handleid");
6193
6168
  const connectable = handleToCheck.classList.contains("connectable");
6194
6169
  const connectableEnd = handleToCheck.classList.contains("connectableend");
6170
+ if (!handleNodeId || !handleType) {
6171
+ return result;
6172
+ }
6195
6173
  const connection = {
6196
6174
  source: isTarget ? handleNodeId : fromNodeId,
6197
6175
  sourceHandle: isTarget ? handleId : fromHandleId,
@@ -6201,38 +6179,16 @@ function isValidHandle(event, handle2, connectionMode, fromNodeId, fromHandleId,
6201
6179
  result.connection = connection;
6202
6180
  const isConnectable = connectable && connectableEnd;
6203
6181
  const isValid = isConnectable && (connectionMode === ConnectionMode.Strict ? isTarget && handleType === "source" || !isTarget && handleType === "target" : handleNodeId !== fromNodeId || handleId !== fromHandleId);
6204
- if (isValid) {
6205
- result.isValid = isValidConnection(connection, {
6206
- edges,
6207
- nodes,
6208
- sourceNode: findNode(connection.source),
6209
- targetNode: findNode(connection.target)
6210
- });
6211
- result.endHandle = {
6212
- nodeId: handleNodeId,
6213
- handleId,
6214
- type: handleType,
6215
- position: result.isValid ? handleToCheck.getAttribute("data-handlepos") : null
6216
- };
6217
- }
6182
+ result.isValid = isValid && isValidConnection(connection, {
6183
+ nodes,
6184
+ edges,
6185
+ sourceNode: findNode(fromNodeId),
6186
+ targetNode: findNode(handleNodeId)
6187
+ });
6188
+ result.toHandle = handle2;
6218
6189
  }
6219
6190
  return result;
6220
6191
  }
6221
- function getHandleLookup({ nodes, nodeId, handleId, handleType }) {
6222
- const handleLookup = [];
6223
- for (let i = 0; i < nodes.length; i++) {
6224
- const node2 = nodes[i];
6225
- const { handleBounds } = node2;
6226
- let sourceHandles = [];
6227
- let targetHandles = [];
6228
- if (handleBounds) {
6229
- sourceHandles = getHandles(node2, handleBounds, "source", `${nodeId}-${handleId}-${handleType}`);
6230
- targetHandles = getHandles(node2, handleBounds, "target", `${nodeId}-${handleId}-${handleType}`);
6231
- }
6232
- handleLookup.push(...sourceHandles, ...targetHandles);
6233
- }
6234
- return handleLookup;
6235
- }
6236
6192
  function getHandleType(edgeUpdaterType, handleDomNode) {
6237
6193
  if (edgeUpdaterType) {
6238
6194
  return edgeUpdaterType;
@@ -6252,6 +6208,31 @@ function getConnectionStatus(isInsideConnectionRadius, isHandleValid) {
6252
6208
  }
6253
6209
  return connectionStatus;
6254
6210
  }
6211
+ function isConnectionValid(isInsideConnectionRadius, isHandleValid) {
6212
+ let isValid = null;
6213
+ if (isHandleValid) {
6214
+ isValid = true;
6215
+ } else if (isInsideConnectionRadius && !isHandleValid) {
6216
+ isValid = false;
6217
+ }
6218
+ return isValid;
6219
+ }
6220
+ function getHandle(nodeId, handleType, handleId, nodeLookup, connectionMode, withAbsolutePosition = false) {
6221
+ var _a, _b, _c;
6222
+ const node2 = nodeLookup.get(nodeId);
6223
+ if (!node2) {
6224
+ return null;
6225
+ }
6226
+ const handles = connectionMode === ConnectionMode.Strict ? (_a = node2.handleBounds) == null ? void 0 : _a[handleType] : [...((_b = node2.handleBounds) == null ? void 0 : _b.source) ?? [], ...((_c = node2.handleBounds) == null ? void 0 : _c.target) ?? []];
6227
+ const handle2 = (handleId ? handles == null ? void 0 : handles.find((h2) => h2.id === handleId) : handles == null ? void 0 : handles[0]) ?? null;
6228
+ return handle2 && withAbsolutePosition ? { ...handle2, ...getHandlePosition(node2, handle2, handle2.position, true) } : handle2;
6229
+ }
6230
+ const oppositePosition = {
6231
+ [Position.Left]: Position.Right,
6232
+ [Position.Right]: Position.Left,
6233
+ [Position.Top]: Position.Bottom,
6234
+ [Position.Bottom]: Position.Top
6235
+ };
6255
6236
  const productionEnvs = ["production", "prod"];
6256
6237
  function warn(message, ...args) {
6257
6238
  if (isDev()) {
@@ -6261,14 +6242,16 @@ function warn(message, ...args) {
6261
6242
  function isDev() {
6262
6243
  return !productionEnvs.includes("production");
6263
6244
  }
6264
- function getHandleBounds(selector2, nodeElement, nodeBounds, zoom2) {
6265
- const handles = nodeElement.querySelectorAll(`.vue-flow__handle${selector2}`);
6245
+ function getHandleBounds(type, nodeElement, nodeBounds, zoom2) {
6246
+ const handles = nodeElement.querySelectorAll(`.vue-flow__handle.${type}`);
6266
6247
  const handlesArray = Array.from(handles);
6267
6248
  return handlesArray.map((handle2) => {
6268
6249
  const handleBounds = handle2.getBoundingClientRect();
6269
6250
  return {
6270
6251
  id: handle2.getAttribute("data-handleid"),
6271
6252
  position: handle2.getAttribute("data-handlepos"),
6253
+ nodeId: handle2.getAttribute("data-nodeid"),
6254
+ type,
6272
6255
  x: (handleBounds.left - nodeBounds.left) / zoom2,
6273
6256
  y: (handleBounds.top - nodeBounds.top) / zoom2,
6274
6257
  ...getDimensions(handle2)
@@ -6362,18 +6345,42 @@ function createGraphNodes(nodes, findNode, triggerError) {
6362
6345
  }
6363
6346
  return nextNodes;
6364
6347
  }
6365
- function updateConnectionLookup(connectionLookup, edges) {
6348
+ function addConnectionToLookup(type, connection, connectionKey, connectionLookup, nodeId, handleId) {
6349
+ let key = nodeId;
6350
+ const nodeMap = connectionLookup.get(key) || /* @__PURE__ */ new Map();
6351
+ connectionLookup.set(key, nodeMap.set(connectionKey, connection));
6352
+ key = `${nodeId}-${type}`;
6353
+ const typeMap = connectionLookup.get(key) || /* @__PURE__ */ new Map();
6354
+ connectionLookup.set(key, typeMap.set(connectionKey, connection));
6355
+ if (handleId) {
6356
+ key = `${nodeId}-${type}-${handleId}`;
6357
+ const handleMap = connectionLookup.get(key) || /* @__PURE__ */ new Map();
6358
+ connectionLookup.set(key, handleMap.set(connectionKey, connection));
6359
+ }
6360
+ }
6361
+ function updateConnectionLookup(connectionLookup, edgeLookup, edges) {
6366
6362
  connectionLookup.clear();
6363
+ edgeLookup.clear();
6367
6364
  for (const edge2 of edges) {
6368
- const { id: edgeId, source, target: target2, sourceHandle = null, targetHandle = null } = edge2;
6369
- const sourceKey = `${source}-source-${sourceHandle}`;
6370
- const targetKey = `${target2}-target-${targetHandle}`;
6371
- const prevSource = connectionLookup.get(sourceKey) || /* @__PURE__ */ new Map();
6372
- const prevTarget = connectionLookup.get(targetKey) || /* @__PURE__ */ new Map();
6373
- const connection = markRaw({ edgeId, source, target: target2, sourceHandle, targetHandle });
6374
- connectionLookup.set(sourceKey, prevSource.set(`${target2}-${targetHandle}`, connection));
6375
- connectionLookup.set(targetKey, prevTarget.set(`${source}-${sourceHandle}`, connection));
6365
+ const { source: sourceNode, target: targetNode, sourceHandle = null, targetHandle = null } = edge2;
6366
+ const connection = { edgeId: edge2.id, source: sourceNode, target: targetNode, sourceHandle, targetHandle };
6367
+ const sourceKey = `${sourceNode}-${sourceHandle}--${targetNode}-${targetHandle}`;
6368
+ const targetKey = `${targetNode}-${targetHandle}--${sourceNode}-${sourceHandle}`;
6369
+ addConnectionToLookup("source", connection, targetKey, connectionLookup, sourceNode, sourceHandle);
6370
+ addConnectionToLookup("target", connection, sourceKey, connectionLookup, targetNode, targetHandle);
6371
+ edgeLookup.set(edge2.id, edge2);
6372
+ }
6373
+ }
6374
+ function areSetsEqual(a, b) {
6375
+ if (a.size !== b.size) {
6376
+ return false;
6377
+ }
6378
+ for (const item of a) {
6379
+ if (!b.has(item)) {
6380
+ return false;
6381
+ }
6376
6382
  }
6383
+ return true;
6377
6384
  }
6378
6385
  function createGraphEdges(nextEdges, isValidConnection, findNode, findEdge, onError, defaultEdgeOptions, nodes, edges) {
6379
6386
  const validEdges = [];
@@ -6713,6 +6720,7 @@ function useHandle({
6713
6720
  onEdgeUpdateEnd
6714
6721
  }) {
6715
6722
  const {
6723
+ id: flowId,
6716
6724
  vueFlowRef,
6717
6725
  connectionMode,
6718
6726
  connectionRadius,
@@ -6730,12 +6738,12 @@ function useHandle({
6730
6738
  viewport,
6731
6739
  edges,
6732
6740
  nodes,
6733
- isValidConnection: isValidConnectionProp
6741
+ isValidConnection: isValidConnectionProp,
6742
+ nodeLookup
6734
6743
  } = useVueFlow();
6735
6744
  let connection = null;
6736
6745
  let isValid = false;
6737
6746
  let handleDomNode = null;
6738
- let previousConnection = null;
6739
6747
  function handlePointerDown(event) {
6740
6748
  var _a;
6741
6749
  const isTarget = toValue$1(type) === "target";
@@ -6744,35 +6752,47 @@ function useHandle({
6744
6752
  if (isMouseTriggered && event.button === 0 || !isMouseTriggered) {
6745
6753
  let onPointerMove = function(event2) {
6746
6754
  connectionPosition = getEventPosition(event2, containerBounds);
6747
- const { handle: handle2, validHandleResult } = getClosestHandle(
6748
- event2,
6749
- doc,
6755
+ closestHandle = getClosestHandle(
6750
6756
  pointToRendererPoint(connectionPosition, viewport.value, false, [1, 1]),
6751
6757
  connectionRadius.value,
6752
- handleLookup,
6753
- (handle22) => isValidHandle(
6754
- event2,
6755
- handle22,
6756
- connectionMode.value,
6757
- toValue$1(nodeId),
6758
- toValue$1(handleId),
6759
- isTarget ? "target" : "source",
6760
- isValidConnectionHandler,
6761
- doc,
6762
- edges.value,
6763
- nodes.value,
6764
- findNode
6765
- )
6758
+ nodeLookup.value,
6759
+ fromHandle
6766
6760
  );
6767
- closestHandle = handle2;
6768
6761
  if (!autoPanStarted) {
6769
6762
  autoPan();
6770
6763
  autoPanStarted = true;
6771
6764
  }
6772
- connection = validHandleResult.connection;
6773
- isValid = validHandleResult.isValid;
6774
- handleDomNode = validHandleResult.handleDomNode;
6775
- if (isValid && closestHandle && (previousConnection == null ? void 0 : previousConnection.endHandle) && validHandleResult.endHandle && previousConnection.endHandle.type === validHandleResult.endHandle.type && previousConnection.endHandle.nodeId === validHandleResult.endHandle.nodeId && previousConnection.endHandle.handleId === validHandleResult.endHandle.handleId) {
6765
+ const result = isValidHandle(
6766
+ event2,
6767
+ {
6768
+ handle: closestHandle,
6769
+ connectionMode: connectionMode.value,
6770
+ fromNodeId: toValue$1(nodeId),
6771
+ fromHandleId: toValue$1(handleId),
6772
+ fromType: isTarget ? "target" : "source",
6773
+ isValidConnection: isValidConnectionHandler,
6774
+ doc,
6775
+ lib: "vue",
6776
+ flowId,
6777
+ nodeLookup: nodeLookup.value
6778
+ },
6779
+ edges.value,
6780
+ nodes.value,
6781
+ findNode
6782
+ );
6783
+ handleDomNode = result.handleDomNode;
6784
+ connection = result.connection;
6785
+ isValid = isConnectionValid(!!closestHandle, result.isValid);
6786
+ const newConnection2 = {
6787
+ // from stays the same
6788
+ ...previousConnection,
6789
+ isValid,
6790
+ to: closestHandle && isValid ? rendererPointToPoint({ x: closestHandle.x, y: closestHandle.y }, viewport.value) : connectionPosition,
6791
+ toHandle: result.toHandle,
6792
+ toPosition: isValid && result.toHandle ? result.toHandle.position : oppositePosition[fromHandle.position],
6793
+ toNode: result.toHandle ? nodeLookup.value.get(result.toHandle.nodeId) : null
6794
+ };
6795
+ if (isValid && closestHandle && (previousConnection == null ? void 0 : previousConnection.toHandle) && newConnection2.toHandle && previousConnection.toHandle.type === newConnection2.toHandle.type && previousConnection.toHandle.nodeId === newConnection2.toHandle.nodeId && previousConnection.toHandle.id === newConnection2.toHandle.id && previousConnection.to.x === newConnection2.to.x && previousConnection.to.y === newConnection2.to.y) {
6776
6796
  return;
6777
6797
  }
6778
6798
  updateConnection(
@@ -6783,10 +6803,10 @@ function useHandle({
6783
6803
  },
6784
6804
  viewport.value
6785
6805
  ) : connectionPosition,
6786
- validHandleResult.endHandle,
6806
+ result.toHandle,
6787
6807
  getConnectionStatus(!!closestHandle, isValid)
6788
6808
  );
6789
- previousConnection = validHandleResult;
6809
+ previousConnection = newConnection2;
6790
6810
  if (!closestHandle && !isValid && !handleDomNode) {
6791
6811
  return resetRecentHandle(prevActiveHandle);
6792
6812
  }
@@ -6794,8 +6814,8 @@ function useHandle({
6794
6814
  resetRecentHandle(prevActiveHandle);
6795
6815
  prevActiveHandle = handleDomNode;
6796
6816
  handleDomNode.classList.add("connecting", "vue-flow__handle-connecting");
6797
- handleDomNode.classList.toggle("valid", isValid);
6798
- handleDomNode.classList.toggle("vue-flow__handle-valid", isValid);
6817
+ handleDomNode.classList.toggle("valid", !!isValid);
6818
+ handleDomNode.classList.toggle("vue-flow__handle-valid", !!isValid);
6799
6819
  }
6800
6820
  }, onPointerUp = function(event2) {
6801
6821
  if ((closestHandle || handleDomNode) && connection && isValid) {
@@ -6835,15 +6855,13 @@ function useHandle({
6835
6855
  if (!containerBounds || !handleType) {
6836
6856
  return;
6837
6857
  }
6858
+ const fromHandleInternal = getHandle(toValue$1(nodeId), handleType, toValue$1(handleId), nodeLookup.value, connectionMode.value);
6859
+ if (!fromHandleInternal) {
6860
+ return;
6861
+ }
6838
6862
  let prevActiveHandle;
6839
6863
  let connectionPosition = getEventPosition(event, containerBounds);
6840
6864
  let autoPanStarted = false;
6841
- const handleLookup = getHandleLookup({
6842
- nodes: nodes.value,
6843
- nodeId: toValue$1(nodeId),
6844
- handleId: toValue$1(handleId),
6845
- handleType
6846
- });
6847
6865
  const autoPan = () => {
6848
6866
  if (!autoPanOnConnect.value) {
6849
6867
  return;
@@ -6852,10 +6870,30 @@ function useHandle({
6852
6870
  panBy({ x: xMovement, y: yMovement });
6853
6871
  autoPanId = requestAnimationFrame(autoPan);
6854
6872
  };
6873
+ const fromHandle = {
6874
+ ...fromHandleInternal,
6875
+ nodeId: toValue$1(nodeId),
6876
+ type: handleType,
6877
+ position: fromHandleInternal.position
6878
+ };
6879
+ const fromNodeInternal = nodeLookup.value.get(toValue$1(nodeId));
6880
+ const from = getHandlePosition(fromNodeInternal, fromHandle, Position.Left, true);
6881
+ const newConnection = {
6882
+ inProgress: true,
6883
+ isValid: null,
6884
+ from,
6885
+ fromHandle,
6886
+ fromPosition: fromHandle.position,
6887
+ fromNode: fromNodeInternal,
6888
+ to: connectionPosition,
6889
+ toHandle: null,
6890
+ toPosition: oppositePosition[fromHandle.position],
6891
+ toNode: null
6892
+ };
6855
6893
  startConnection(
6856
6894
  {
6857
6895
  nodeId: toValue$1(nodeId),
6858
- handleId: toValue$1(handleId),
6896
+ id: toValue$1(handleId),
6859
6897
  type: handleType,
6860
6898
  position: (clickedHandle == null ? void 0 : clickedHandle.getAttribute("data-handlepos")) || Position.Top
6861
6899
  },
@@ -6865,6 +6903,7 @@ function useHandle({
6865
6903
  }
6866
6904
  );
6867
6905
  emits.connectStart({ event, nodeId: toValue$1(nodeId), handleId: toValue$1(handleId), handleType });
6906
+ let previousConnection = newConnection;
6868
6907
  doc.addEventListener("mousemove", onPointerMove);
6869
6908
  doc.addEventListener("mouseup", onPointerUp);
6870
6909
  doc.addEventListener("touchmove", onPointerMove);
@@ -6872,47 +6911,58 @@ function useHandle({
6872
6911
  }
6873
6912
  }
6874
6913
  function handleClick(event) {
6914
+ var _a, _b;
6875
6915
  if (!connectOnClick.value) {
6876
6916
  return;
6877
6917
  }
6878
6918
  const isTarget = toValue$1(type) === "target";
6879
6919
  if (!connectionClickStartHandle.value) {
6880
6920
  emits.clickConnectStart({ event, nodeId: toValue$1(nodeId), handleId: toValue$1(handleId) });
6881
- startConnection({ nodeId: toValue$1(nodeId), type: toValue$1(type), handleId: toValue$1(handleId) }, void 0, true);
6882
- } else {
6883
- let isValidConnectionHandler = toValue$1(isValidConnection) || isValidConnectionProp.value || alwaysValid;
6884
- const node2 = findNode(toValue$1(nodeId));
6885
- if (!isValidConnectionHandler && node2) {
6886
- isValidConnectionHandler = (!isTarget ? node2.isValidTargetPos : node2.isValidSourcePos) || alwaysValid;
6887
- }
6888
- if (node2 && (typeof node2.connectable === "undefined" ? nodesConnectable.value : node2.connectable) === false) {
6889
- return;
6890
- }
6891
- const doc = getHostForElement(event.target);
6892
- const { connection: connection2, isValid: isValid2 } = isValidHandle(
6893
- event,
6894
- {
6921
+ startConnection(
6922
+ { nodeId: toValue$1(nodeId), type: toValue$1(type), id: toValue$1(handleId), position: Position.Top },
6923
+ void 0,
6924
+ true
6925
+ );
6926
+ return;
6927
+ }
6928
+ let isValidConnectionHandler = toValue$1(isValidConnection) || isValidConnectionProp.value || alwaysValid;
6929
+ const node2 = findNode(toValue$1(nodeId));
6930
+ if (!isValidConnectionHandler && node2) {
6931
+ isValidConnectionHandler = (!isTarget ? node2.isValidTargetPos : node2.isValidSourcePos) || alwaysValid;
6932
+ }
6933
+ if (node2 && (typeof node2.connectable === "undefined" ? nodesConnectable.value : node2.connectable) === false) {
6934
+ return;
6935
+ }
6936
+ const doc = getHostForElement(event.target);
6937
+ const result = isValidHandle(
6938
+ event,
6939
+ {
6940
+ handle: {
6895
6941
  nodeId: toValue$1(nodeId),
6896
6942
  id: toValue$1(handleId),
6897
- type: toValue$1(type)
6943
+ type: toValue$1(type),
6944
+ position: Position.Top
6898
6945
  },
6899
- connectionMode.value,
6900
- connectionClickStartHandle.value.nodeId,
6901
- connectionClickStartHandle.value.handleId || null,
6902
- connectionClickStartHandle.value.type,
6903
- isValidConnectionHandler,
6946
+ connectionMode: connectionMode.value,
6947
+ fromNodeId: connectionClickStartHandle.value.nodeId,
6948
+ fromHandleId: connectionClickStartHandle.value.id || null,
6949
+ fromType: connectionClickStartHandle.value.type,
6950
+ isValidConnection: isValidConnectionHandler,
6904
6951
  doc,
6905
- edges.value,
6906
- nodes.value,
6907
- findNode
6908
- );
6909
- const isOwnHandle = connection2.source === connection2.target;
6910
- if (isValid2 && !isOwnHandle) {
6911
- emits.connect(connection2);
6912
- }
6913
- emits.clickConnectEnd(event);
6914
- endConnection(event, true);
6952
+ lib: "vue",
6953
+ flowId,
6954
+ nodeLookup: nodeLookup.value
6955
+ },
6956
+ edges.value,
6957
+ nodes.value,
6958
+ findNode
6959
+ );
6960
+ const isOwnHandle = ((_a = result.connection) == null ? void 0 : _a.source) === ((_b = result.connection) == null ? void 0 : _b.target);
6961
+ if (result.isValid && result.connection && !isOwnHandle) {
6962
+ emits.connect(result.connection);
6915
6963
  }
6964
+ emits.clickConnectEnd(event);
6965
+ endConnection(event, true);
6916
6966
  }
6917
6967
  return {
6918
6968
  handlePointerDown,
@@ -7747,8 +7797,8 @@ function useActions(state, nodeLookup, edgeLookup) {
7747
7797
  if (doUpdate) {
7748
7798
  const nodeBounds = update.nodeElement.getBoundingClientRect();
7749
7799
  node2.dimensions = dimensions;
7750
- node2.handleBounds.source = getHandleBounds(".source", update.nodeElement, nodeBounds, zoom2);
7751
- node2.handleBounds.target = getHandleBounds(".target", update.nodeElement, nodeBounds, zoom2);
7800
+ node2.handleBounds.source = getHandleBounds("source", update.nodeElement, nodeBounds, zoom2);
7801
+ node2.handleBounds.target = getHandleBounds("target", update.nodeElement, nodeBounds, zoom2);
7752
7802
  changes.push({
7753
7803
  id: node2.id,
7754
7804
  type: "dimensions",
@@ -7903,7 +7953,7 @@ function useActions(state, nodeLookup, edgeLookup) {
7903
7953
  state.nodes,
7904
7954
  state.edges
7905
7955
  );
7906
- updateConnectionLookup(state.connectionLookup, validEdges);
7956
+ updateConnectionLookup(state.connectionLookup, edgeLookup.value, validEdges);
7907
7957
  state.edges = validEdges;
7908
7958
  };
7909
7959
  const setElements = (elements) => {
@@ -8041,7 +8091,7 @@ function useActions(state, nodeLookup, edgeLookup) {
8041
8091
  state.edges
8042
8092
  );
8043
8093
  state.edges.splice(state.edges.indexOf(prevEdge), 1, validEdge);
8044
- updateConnectionLookup(state.connectionLookup, [validEdge]);
8094
+ updateConnectionLookup(state.connectionLookup, edgeLookup.value, [validEdge]);
8045
8095
  return validEdge;
8046
8096
  }
8047
8097
  return false;
@@ -8059,7 +8109,7 @@ function useActions(state, nodeLookup, edgeLookup) {
8059
8109
  };
8060
8110
  const applyEdgeChanges2 = (changes) => {
8061
8111
  const changedEdges = applyChanges(changes, state.edges);
8062
- updateConnectionLookup(state.connectionLookup, changedEdges);
8112
+ updateConnectionLookup(state.connectionLookup, edgeLookup.value, changedEdges);
8063
8113
  return changedEdges;
8064
8114
  };
8065
8115
  const updateNode = (id2, nodeUpdate, options = { replace: false }) => {
@@ -8371,6 +8421,7 @@ const _sfc_main$f$1 = /* @__PURE__ */ defineComponent({
8371
8421
  const type = toRef(() => props.type ?? "source");
8372
8422
  const isValidConnection = toRef(() => props.isValidConnection ?? null);
8373
8423
  const {
8424
+ id: flowId,
8374
8425
  connectionStartHandle,
8375
8426
  connectionClickStartHandle,
8376
8427
  connectionEndHandle,
@@ -8386,13 +8437,13 @@ const _sfc_main$f$1 = /* @__PURE__ */ defineComponent({
8386
8437
  const isConnecting = toRef(
8387
8438
  () => {
8388
8439
  var _a, _b, _c, _d, _e, _f;
8389
- return ((_a = connectionStartHandle.value) == null ? void 0 : _a.nodeId) === nodeId && ((_b = connectionStartHandle.value) == null ? void 0 : _b.handleId) === __props.id && ((_c = connectionStartHandle.value) == null ? void 0 : _c.type) === type.value || ((_d = connectionEndHandle.value) == null ? void 0 : _d.nodeId) === nodeId && ((_e = connectionEndHandle.value) == null ? void 0 : _e.handleId) === __props.id && ((_f = connectionEndHandle.value) == null ? void 0 : _f.type) === type.value;
8440
+ return ((_a = connectionStartHandle.value) == null ? void 0 : _a.nodeId) === nodeId && ((_b = connectionStartHandle.value) == null ? void 0 : _b.id) === __props.id && ((_c = connectionStartHandle.value) == null ? void 0 : _c.type) === type.value || ((_d = connectionEndHandle.value) == null ? void 0 : _d.nodeId) === nodeId && ((_e = connectionEndHandle.value) == null ? void 0 : _e.id) === __props.id && ((_f = connectionEndHandle.value) == null ? void 0 : _f.type) === type.value;
8390
8441
  }
8391
8442
  );
8392
8443
  const isClickConnecting = toRef(
8393
8444
  () => {
8394
8445
  var _a, _b, _c;
8395
- return ((_a = connectionClickStartHandle.value) == null ? void 0 : _a.nodeId) === nodeId && ((_b = connectionClickStartHandle.value) == null ? void 0 : _b.handleId) === __props.id && ((_c = connectionClickStartHandle.value) == null ? void 0 : _c.type) === type.value;
8446
+ return ((_a = connectionClickStartHandle.value) == null ? void 0 : _a.nodeId) === nodeId && ((_b = connectionClickStartHandle.value) == null ? void 0 : _b.id) === __props.id && ((_c = connectionClickStartHandle.value) == null ? void 0 : _c.type) === type.value;
8396
8447
  }
8397
8448
  );
8398
8449
  const { handlePointerDown, handleClick } = useHandle({
@@ -8447,6 +8498,8 @@ const _sfc_main$f$1 = /* @__PURE__ */ defineComponent({
8447
8498
  position: __props.position,
8448
8499
  x: (handleBounds.left - nodeBounds.left) / zoom2,
8449
8500
  y: (handleBounds.top - nodeBounds.top) / zoom2,
8501
+ type: type.value,
8502
+ nodeId,
8450
8503
  ...getDimensions(handle2.value)
8451
8504
  };
8452
8505
  node2.handleBounds[type.value] = [...node2.handleBounds[type.value] ?? [], nextBounds];
@@ -8481,7 +8534,7 @@ const _sfc_main$f$1 = /* @__PURE__ */ defineComponent({
8481
8534
  return openBlock(), createElementBlock("div", {
8482
8535
  ref_key: "handle",
8483
8536
  ref: handle2,
8484
- "data-id": `${unref(nodeId)}-${__props.id}-${type.value}`,
8537
+ "data-id": `${unref(flowId)}-${unref(nodeId)}-${__props.id}-${type.value}`,
8485
8538
  "data-handleid": __props.id,
8486
8539
  "data-nodeid": unref(nodeId),
8487
8540
  "data-handlepos": _ctx.position,
@@ -8648,15 +8701,13 @@ const _sfc_main$d$1 = /* @__PURE__ */ defineComponent({
8648
8701
  markerStart: {},
8649
8702
  markerEnd: {},
8650
8703
  interactionWidth: { default: 20 },
8651
- style: {},
8652
8704
  labelStyle: {},
8653
- labelShowBg: { type: Boolean, default: true },
8705
+ labelShowBg: { type: Boolean },
8654
8706
  labelBgStyle: {},
8655
8707
  labelBgPadding: {},
8656
8708
  labelBgBorderRadius: {}
8657
8709
  },
8658
8710
  setup(__props, { expose: __expose }) {
8659
- const props = createPropsRestProxy(__props, ["interactionWidth", "labelShowBg"]);
8660
8711
  const pathEl = ref(null);
8661
8712
  const interactionEl = ref(null);
8662
8713
  const labelEl = ref(null);
@@ -8668,16 +8719,15 @@ const _sfc_main$d$1 = /* @__PURE__ */ defineComponent({
8668
8719
  });
8669
8720
  return (_ctx, _cache) => {
8670
8721
  return openBlock(), createElementBlock(Fragment, null, [
8671
- createBaseVNode("path", {
8722
+ createBaseVNode("path", mergeProps(unref(attrs), {
8672
8723
  id: _ctx.id,
8673
8724
  ref_key: "pathEl",
8674
8725
  ref: pathEl,
8675
8726
  d: _ctx.path,
8676
- style: normalizeStyle(props.style),
8677
- class: normalizeClass(["vue-flow__edge-path", unref(attrs).class]),
8727
+ class: "vue-flow__edge-path",
8678
8728
  "marker-end": _ctx.markerEnd,
8679
8729
  "marker-start": _ctx.markerStart
8680
- }, null, 14, _hoisted_1$7$1),
8730
+ }), null, 16, _hoisted_1$7$1),
8681
8731
  _ctx.interactionWidth ? (openBlock(), createElementBlock("path", {
8682
8732
  key: 0,
8683
8733
  ref_key: "interactionEl",
@@ -9397,7 +9447,7 @@ class Storage {
9397
9447
  edgeLookup,
9398
9448
  emits,
9399
9449
  id: id2,
9400
- vueFlowVersion: "1.41.6",
9450
+ vueFlowVersion: "1.42.1",
9401
9451
  $destroy: () => {
9402
9452
  this.remove(id2);
9403
9453
  }
@@ -9645,13 +9695,14 @@ const _sfc_main$a$1 = /* @__PURE__ */ defineComponent({
9645
9695
  multiSelectionKeyCode,
9646
9696
  multiSelectionActive,
9647
9697
  edgeLookup,
9648
- nodeLookup
9698
+ nodeLookup,
9699
+ connectionLookup,
9700
+ defaultEdgeOptions
9649
9701
  } = useVueFlow();
9650
9702
  const container = ref(null);
9651
- const prevSelectedNodesCount = ref(0);
9652
- const prevSelectedEdgesCount = ref(0);
9703
+ const selectedNodeIds = ref(/* @__PURE__ */ new Set());
9704
+ const selectedEdgeIds = ref(/* @__PURE__ */ new Set());
9653
9705
  const containerBounds = ref();
9654
- const edgeIdLookup = ref(/* @__PURE__ */ new Map());
9655
9706
  const hasActiveSelection = toRef(() => elementsSelectable.value && (__props.isSelecting || userSelectionActive.value));
9656
9707
  let selectionInProgress = false;
9657
9708
  let selectionStarted = false;
@@ -9676,12 +9727,6 @@ const _sfc_main$a$1 = /* @__PURE__ */ defineComponent({
9676
9727
  handler == null ? void 0 : handler(event);
9677
9728
  };
9678
9729
  }
9679
- function resetUserSelection() {
9680
- userSelectionActive.value = false;
9681
- userSelectionRect.value = null;
9682
- prevSelectedNodesCount.value = 0;
9683
- prevSelectedEdgesCount.value = 0;
9684
- }
9685
9730
  function onClick(event) {
9686
9731
  if (selectionInProgress) {
9687
9732
  selectionInProgress = false;
@@ -9700,7 +9745,7 @@ const _sfc_main$a$1 = /* @__PURE__ */ defineComponent({
9700
9745
  emits.paneScroll(event);
9701
9746
  }
9702
9747
  function onPointerDown(event) {
9703
- var _a, _b, _c, _d, _e;
9748
+ var _a, _b, _c;
9704
9749
  containerBounds.value = (_a = vueFlowRef.value) == null ? void 0 : _a.getBoundingClientRect();
9705
9750
  if (!elementsSelectable.value || !__props.isSelecting || event.button !== 0 || event.target !== container.value || !containerBounds.value) {
9706
9751
  return;
@@ -9709,11 +9754,6 @@ const _sfc_main$a$1 = /* @__PURE__ */ defineComponent({
9709
9754
  const { x, y } = getMousePosition(event, containerBounds.value);
9710
9755
  selectionStarted = true;
9711
9756
  selectionInProgress = false;
9712
- edgeIdLookup.value = /* @__PURE__ */ new Map();
9713
- for (const [id2, edge2] of edgeLookup.value) {
9714
- edgeIdLookup.value.set(edge2.source, ((_d = edgeIdLookup.value.get(edge2.source)) == null ? void 0 : _d.add(id2)) || /* @__PURE__ */ new Set([id2]));
9715
- edgeIdLookup.value.set(edge2.target, ((_e = edgeIdLookup.value.get(edge2.target)) == null ? void 0 : _e.add(id2)) || /* @__PURE__ */ new Set([id2]));
9716
- }
9717
9757
  removeSelectedElements();
9718
9758
  userSelectionRect.value = {
9719
9759
  width: 0,
@@ -9726,6 +9766,7 @@ const _sfc_main$a$1 = /* @__PURE__ */ defineComponent({
9726
9766
  emits.selectionStart(event);
9727
9767
  }
9728
9768
  function onPointerMove(event) {
9769
+ var _a;
9729
9770
  if (!containerBounds.value || !userSelectionRect.value) {
9730
9771
  return;
9731
9772
  }
@@ -9740,32 +9781,33 @@ const _sfc_main$a$1 = /* @__PURE__ */ defineComponent({
9740
9781
  width: Math.abs(mouseX - startX),
9741
9782
  height: Math.abs(mouseY - startY)
9742
9783
  };
9743
- const selectedNodes = getNodesInside(
9744
- nodes.value,
9745
- nextUserSelectRect,
9746
- viewport.value,
9747
- selectionMode.value === SelectionMode.Partial,
9748
- true
9784
+ const prevSelectedNodeIds = selectedNodeIds.value;
9785
+ const prevSelectedEdgeIds = selectedEdgeIds.value;
9786
+ selectedNodeIds.value = new Set(
9787
+ getNodesInside(nodes.value, nextUserSelectRect, viewport.value, selectionMode.value === SelectionMode.Partial, true).map(
9788
+ (node2) => node2.id
9789
+ )
9749
9790
  );
9750
- const selectedEdgeIds = /* @__PURE__ */ new Set();
9751
- const selectedNodeIds = /* @__PURE__ */ new Set();
9752
- for (const selectedNode of selectedNodes) {
9753
- selectedNodeIds.add(selectedNode.id);
9754
- const edgeIds = edgeIdLookup.value.get(selectedNode.id);
9755
- if (edgeIds) {
9756
- for (const edgeId of edgeIds) {
9757
- selectedEdgeIds.add(edgeId);
9791
+ selectedEdgeIds.value = /* @__PURE__ */ new Set();
9792
+ const edgesSelectable = ((_a = defaultEdgeOptions.value) == null ? void 0 : _a.selectable) ?? true;
9793
+ for (const nodeId of selectedNodeIds.value) {
9794
+ const connections = connectionLookup.value.get(nodeId);
9795
+ if (!connections) {
9796
+ continue;
9797
+ }
9798
+ for (const { edgeId } of connections.values()) {
9799
+ const edge2 = edgeLookup.value.get(edgeId);
9800
+ if (edge2 && (edge2.selectable ?? edgesSelectable)) {
9801
+ selectedEdgeIds.value.add(edgeId);
9758
9802
  }
9759
9803
  }
9760
9804
  }
9761
- if (prevSelectedNodesCount.value !== selectedNodeIds.size) {
9762
- prevSelectedNodesCount.value = selectedNodeIds.size;
9763
- const changes = getSelectionChanges(nodeLookup.value, selectedNodeIds, true);
9805
+ if (!areSetsEqual(prevSelectedNodeIds, selectedNodeIds.value)) {
9806
+ const changes = getSelectionChanges(nodeLookup.value, selectedNodeIds.value, true);
9764
9807
  emits.nodesChange(changes);
9765
9808
  }
9766
- if (prevSelectedEdgesCount.value !== selectedEdgeIds.size) {
9767
- prevSelectedEdgesCount.value = selectedEdgeIds.size;
9768
- const changes = getSelectionChanges(edgeLookup.value, selectedEdgeIds);
9809
+ if (!areSetsEqual(prevSelectedEdgeIds, selectedEdgeIds.value)) {
9810
+ const changes = getSelectionChanges(edgeLookup.value, selectedEdgeIds.value);
9769
9811
  emits.edgesChange(changes);
9770
9812
  }
9771
9813
  userSelectionRect.value = nextUserSelectRect;
@@ -9781,10 +9823,9 @@ const _sfc_main$a$1 = /* @__PURE__ */ defineComponent({
9781
9823
  if (!userSelectionActive.value && userSelectionRect.value && event.target === container.value) {
9782
9824
  onClick(event);
9783
9825
  }
9784
- if (prevSelectedNodesCount.value > 0) {
9785
- nodesSelectionActive.value = true;
9786
- }
9787
- resetUserSelection();
9826
+ userSelectionActive.value = false;
9827
+ userSelectionRect.value = null;
9828
+ nodesSelectionActive.value = selectedNodeIds.value.size > 0;
9788
9829
  emits.selectionEnd(event);
9789
9830
  if (__props.selectionKeyPressed) {
9790
9831
  selectionInProgress = false;
@@ -10322,14 +10363,14 @@ const EdgeWrapper = defineComponent({
10322
10363
  } else {
10323
10364
  sourceNodeHandles = [...sourceNode.handleBounds.source || [], ...sourceNode.handleBounds.target || []];
10324
10365
  }
10325
- const sourceHandle = getHandle(sourceNodeHandles, edge2.value.sourceHandle);
10366
+ const sourceHandle = getEdgeHandle(sourceNodeHandles, edge2.value.sourceHandle);
10326
10367
  let targetNodeHandles;
10327
10368
  if (connectionMode.value === ConnectionMode.Strict) {
10328
10369
  targetNodeHandles = targetNode.handleBounds.target;
10329
10370
  } else {
10330
10371
  targetNodeHandles = [...targetNode.handleBounds.target || [], ...targetNode.handleBounds.source || []];
10331
10372
  }
10332
- const targetHandle = getHandle(targetNodeHandles, edge2.value.targetHandle);
10373
+ const targetHandle = getEdgeHandle(targetNodeHandles, edge2.value.targetHandle);
10333
10374
  const sourcePosition = (sourceHandle == null ? void 0 : sourceHandle.position) || Position.Bottom;
10334
10375
  const targetPosition = (targetHandle == null ? void 0 : targetHandle.position) || Position.Top;
10335
10376
  const { x: sourceX, y: sourceY } = getHandlePosition(sourceNode, sourceHandle, sourcePosition);
@@ -10516,12 +10557,6 @@ const EdgeWrapper = defineComponent({
10516
10557
  }
10517
10558
  });
10518
10559
  const EdgeWrapper$1 = EdgeWrapper;
10519
- const oppositePosition = {
10520
- [Position.Left]: Position.Right,
10521
- [Position.Right]: Position.Left,
10522
- [Position.Top]: Position.Bottom,
10523
- [Position.Bottom]: Position.Top
10524
- };
10525
10560
  const ConnectionLine = defineComponent({
10526
10561
  name: "ConnectionLine",
10527
10562
  compatConfig: { MODE: 3 },
@@ -10562,11 +10597,11 @@ const ConnectionLine = defineComponent({
10562
10597
  () => connectionLineOptions.value.markerEnd ? `url(#${getMarkerId(connectionLineOptions.value.markerEnd, id2)})` : ""
10563
10598
  );
10564
10599
  return () => {
10565
- var _a2, _b, _c, _d;
10600
+ var _a2, _b, _c;
10566
10601
  if (!fromNode.value || !connectionStartHandle.value) {
10567
10602
  return null;
10568
10603
  }
10569
- const startHandleId = connectionStartHandle.value.handleId;
10604
+ const startHandleId = connectionStartHandle.value.id;
10570
10605
  const handleType = connectionStartHandle.value.type;
10571
10606
  const fromHandleBounds = fromNode.value.handleBounds;
10572
10607
  let handleBounds = (fromHandleBounds == null ? void 0 : fromHandleBounds[handleType]) || [];
@@ -10581,24 +10616,24 @@ const ConnectionLine = defineComponent({
10581
10616
  const fromPosition = (fromHandle == null ? void 0 : fromHandle.position) || Position.Top;
10582
10617
  const { x: fromX, y: fromY } = getHandlePosition(fromNode.value, fromHandle, fromPosition);
10583
10618
  let toHandle = null;
10584
- if (toNode.value && ((_a2 = connectionEndHandle.value) == null ? void 0 : _a2.handleId)) {
10619
+ if (toNode.value) {
10585
10620
  if (connectionMode.value === ConnectionMode.Strict) {
10586
- toHandle = ((_b = toNode.value.handleBounds[handleType === "source" ? "target" : "source"]) == null ? void 0 : _b.find(
10621
+ toHandle = ((_a2 = toNode.value.handleBounds[handleType === "source" ? "target" : "source"]) == null ? void 0 : _a2.find(
10587
10622
  (d) => {
10588
10623
  var _a3;
10589
- return d.id === ((_a3 = connectionEndHandle.value) == null ? void 0 : _a3.handleId);
10624
+ return d.id === ((_a3 = connectionEndHandle.value) == null ? void 0 : _a3.id);
10590
10625
  }
10591
10626
  )) || null;
10592
10627
  } else {
10593
- toHandle = ((_c = [...toNode.value.handleBounds.source || [], ...toNode.value.handleBounds.target || []]) == null ? void 0 : _c.find(
10628
+ toHandle = ((_b = [...toNode.value.handleBounds.source || [], ...toNode.value.handleBounds.target || []]) == null ? void 0 : _b.find(
10594
10629
  (d) => {
10595
10630
  var _a3;
10596
- return d.id === ((_a3 = connectionEndHandle.value) == null ? void 0 : _a3.handleId);
10631
+ return d.id === ((_a3 = connectionEndHandle.value) == null ? void 0 : _a3.id);
10597
10632
  }
10598
10633
  )) || null;
10599
10634
  }
10600
10635
  }
10601
- const toPosition = ((_d = connectionEndHandle.value) == null ? void 0 : _d.position) ?? (fromPosition ? oppositePosition[fromPosition] : null);
10636
+ const toPosition = ((_c = connectionEndHandle.value) == null ? void 0 : _c.position) ?? (fromPosition ? oppositePosition[fromPosition] : null);
10602
10637
  if (!fromPosition || !toPosition) {
10603
10638
  return null;
10604
10639
  }
@@ -11832,8 +11867,7 @@ var noop$1 = { value: () => {
11832
11867
  } };
11833
11868
  function dispatch$1() {
11834
11869
  for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {
11835
- if (!(t = arguments[i] + "") || t in _ || /[\s.]/.test(t))
11836
- throw new Error("illegal type: " + t);
11870
+ if (!(t = arguments[i] + "") || t in _ || /[\s.]/.test(t)) throw new Error("illegal type: " + t);
11837
11871
  _[t] = [];
11838
11872
  }
11839
11873
  return new Dispatch$1(_);
@@ -11844,10 +11878,8 @@ function Dispatch$1(_) {
11844
11878
  function parseTypenames$1$1(typenames, types) {
11845
11879
  return typenames.trim().split(/^|\s+/).map(function(t) {
11846
11880
  var name = "", i = t.indexOf(".");
11847
- if (i >= 0)
11848
- name = t.slice(i + 1), t = t.slice(0, i);
11849
- if (t && !types.hasOwnProperty(t))
11850
- throw new Error("unknown type: " + t);
11881
+ if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
11882
+ if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t);
11851
11883
  return { type: t, name };
11852
11884
  });
11853
11885
  }
@@ -11856,42 +11888,29 @@ Dispatch$1.prototype = dispatch$1.prototype = {
11856
11888
  on: function(typename, callback) {
11857
11889
  var _ = this._, T = parseTypenames$1$1(typename + "", _), t, i = -1, n = T.length;
11858
11890
  if (arguments.length < 2) {
11859
- while (++i < n)
11860
- if ((t = (typename = T[i]).type) && (t = get$1(_[t], typename.name)))
11861
- return t;
11891
+ while (++i < n) if ((t = (typename = T[i]).type) && (t = get$1(_[t], typename.name))) return t;
11862
11892
  return;
11863
11893
  }
11864
- if (callback != null && typeof callback !== "function")
11865
- throw new Error("invalid callback: " + callback);
11894
+ if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback);
11866
11895
  while (++i < n) {
11867
- if (t = (typename = T[i]).type)
11868
- _[t] = set$1(_[t], typename.name, callback);
11869
- else if (callback == null)
11870
- for (t in _)
11871
- _[t] = set$1(_[t], typename.name, null);
11896
+ if (t = (typename = T[i]).type) _[t] = set$1(_[t], typename.name, callback);
11897
+ else if (callback == null) for (t in _) _[t] = set$1(_[t], typename.name, null);
11872
11898
  }
11873
11899
  return this;
11874
11900
  },
11875
11901
  copy: function() {
11876
11902
  var copy = {}, _ = this._;
11877
- for (var t in _)
11878
- copy[t] = _[t].slice();
11903
+ for (var t in _) copy[t] = _[t].slice();
11879
11904
  return new Dispatch$1(copy);
11880
11905
  },
11881
11906
  call: function(type, that) {
11882
- if ((n = arguments.length - 2) > 0)
11883
- for (var args = new Array(n), i = 0, n, t; i < n; ++i)
11884
- args[i] = arguments[i + 2];
11885
- if (!this._.hasOwnProperty(type))
11886
- throw new Error("unknown type: " + type);
11887
- for (t = this._[type], i = 0, n = t.length; i < n; ++i)
11888
- t[i].value.apply(that, args);
11907
+ if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];
11908
+ if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
11909
+ for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
11889
11910
  },
11890
11911
  apply: function(type, that, args) {
11891
- if (!this._.hasOwnProperty(type))
11892
- throw new Error("unknown type: " + type);
11893
- for (var t = this._[type], i = 0, n = t.length; i < n; ++i)
11894
- t[i].value.apply(that, args);
11912
+ if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
11913
+ for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
11895
11914
  }
11896
11915
  };
11897
11916
  function get$1(type, name) {
@@ -11908,8 +11927,7 @@ function set$1(type, name, callback) {
11908
11927
  break;
11909
11928
  }
11910
11929
  }
11911
- if (callback != null)
11912
- type.push({ name, value: callback });
11930
+ if (callback != null) type.push({ name, value: callback });
11913
11931
  return type;
11914
11932
  }
11915
11933
  var xhtml$1 = "http://www.w3.org/1999/xhtml";
@@ -11922,8 +11940,7 @@ const namespaces$1 = {
11922
11940
  };
11923
11941
  function namespace$1(name) {
11924
11942
  var prefix = name += "", i = prefix.indexOf(":");
11925
- if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns")
11926
- name = name.slice(i + 1);
11943
+ if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1);
11927
11944
  return namespaces$1.hasOwnProperty(prefix) ? { space: namespaces$1[prefix], local: name } : name;
11928
11945
  }
11929
11946
  function creatorInherit$1(name) {
@@ -11949,13 +11966,11 @@ function selector$1(selector2) {
11949
11966
  };
11950
11967
  }
11951
11968
  function selection_select$1(select2) {
11952
- if (typeof select2 !== "function")
11953
- select2 = selector$1(select2);
11969
+ if (typeof select2 !== "function") select2 = selector$1(select2);
11954
11970
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
11955
11971
  for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node2, subnode, i = 0; i < n; ++i) {
11956
11972
  if ((node2 = group[i]) && (subnode = select2.call(node2, node2.__data__, i, group))) {
11957
- if ("__data__" in node2)
11958
- subnode.__data__ = node2.__data__;
11973
+ if ("__data__" in node2) subnode.__data__ = node2.__data__;
11959
11974
  subgroup[i] = subnode;
11960
11975
  }
11961
11976
  }
@@ -11979,10 +11994,8 @@ function arrayAll$1(select2) {
11979
11994
  };
11980
11995
  }
11981
11996
  function selection_selectAll$1(select2) {
11982
- if (typeof select2 === "function")
11983
- select2 = arrayAll$1(select2);
11984
- else
11985
- select2 = selectorAll$1(select2);
11997
+ if (typeof select2 === "function") select2 = arrayAll$1(select2);
11998
+ else select2 = selectorAll$1(select2);
11986
11999
  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
11987
12000
  for (var group = groups[j], n = group.length, node2, i = 0; i < n; ++i) {
11988
12001
  if (node2 = group[i]) {
@@ -12028,8 +12041,7 @@ function selection_selectChildren$1(match) {
12028
12041
  return this.selectAll(match == null ? children$1 : childrenFilter$1(typeof match === "function" ? match : childMatcher$1(match)));
12029
12042
  }
12030
12043
  function selection_filter$1(match) {
12031
- if (typeof match !== "function")
12032
- match = matcher$1(match);
12044
+ if (typeof match !== "function") match = matcher$1(match);
12033
12045
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
12034
12046
  for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node2, i = 0; i < n; ++i) {
12035
12047
  if ((node2 = group[i]) && match.call(node2, node2.__data__, i, group)) {
@@ -12120,20 +12132,16 @@ function datum$1(node2) {
12120
12132
  return node2.__data__;
12121
12133
  }
12122
12134
  function selection_data$1(value, key) {
12123
- if (!arguments.length)
12124
- return Array.from(this, datum$1);
12135
+ if (!arguments.length) return Array.from(this, datum$1);
12125
12136
  var bind = key ? bindKey$1 : bindIndex$1, parents = this._parents, groups = this._groups;
12126
- if (typeof value !== "function")
12127
- value = constant$2(value);
12137
+ if (typeof value !== "function") value = constant$2(value);
12128
12138
  for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {
12129
12139
  var parent = parents[j], group = groups[j], groupLength = group.length, data = arraylike$1(value.call(parent, parent && parent.__data__, j, parents)), dataLength = data.length, enterGroup = enter[j] = new Array(dataLength), updateGroup = update[j] = new Array(dataLength), exitGroup = exit[j] = new Array(groupLength);
12130
12140
  bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);
12131
12141
  for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {
12132
12142
  if (previous = enterGroup[i0]) {
12133
- if (i0 >= i1)
12134
- i1 = i0 + 1;
12135
- while (!(next = updateGroup[i1]) && ++i1 < dataLength)
12136
- ;
12143
+ if (i0 >= i1) i1 = i0 + 1;
12144
+ while (!(next = updateGroup[i1]) && ++i1 < dataLength) ;
12137
12145
  previous._next = next || null;
12138
12146
  }
12139
12147
  }
@@ -12153,20 +12161,16 @@ function selection_join$1(onenter, onupdate, onexit) {
12153
12161
  var enter = this.enter(), update = this, exit = this.exit();
12154
12162
  if (typeof onenter === "function") {
12155
12163
  enter = onenter(enter);
12156
- if (enter)
12157
- enter = enter.selection();
12164
+ if (enter) enter = enter.selection();
12158
12165
  } else {
12159
12166
  enter = enter.append(onenter + "");
12160
12167
  }
12161
12168
  if (onupdate != null) {
12162
12169
  update = onupdate(update);
12163
- if (update)
12164
- update = update.selection();
12170
+ if (update) update = update.selection();
12165
12171
  }
12166
- if (onexit == null)
12167
- exit.remove();
12168
- else
12169
- onexit(exit);
12172
+ if (onexit == null) exit.remove();
12173
+ else onexit(exit);
12170
12174
  return enter && update ? enter.merge(update).order() : update;
12171
12175
  }
12172
12176
  function selection_merge$1(context) {
@@ -12187,8 +12191,7 @@ function selection_order$1() {
12187
12191
  for (var groups = this._groups, j = -1, m = groups.length; ++j < m; ) {
12188
12192
  for (var group = groups[j], i = group.length - 1, next = group[i], node2; --i >= 0; ) {
12189
12193
  if (node2 = group[i]) {
12190
- if (next && node2.compareDocumentPosition(next) ^ 4)
12191
- next.parentNode.insertBefore(node2, next);
12194
+ if (next && node2.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node2, next);
12192
12195
  next = node2;
12193
12196
  }
12194
12197
  }
@@ -12196,8 +12199,7 @@ function selection_order$1() {
12196
12199
  return this;
12197
12200
  }
12198
12201
  function selection_sort$1(compare) {
12199
- if (!compare)
12200
- compare = ascending$1;
12202
+ if (!compare) compare = ascending$1;
12201
12203
  function compareNode(a, b) {
12202
12204
  return a && b ? compare(a.__data__, b.__data__) : !a - !b;
12203
12205
  }
@@ -12227,16 +12229,14 @@ function selection_node$1() {
12227
12229
  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
12228
12230
  for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {
12229
12231
  var node2 = group[i];
12230
- if (node2)
12231
- return node2;
12232
+ if (node2) return node2;
12232
12233
  }
12233
12234
  }
12234
12235
  return null;
12235
12236
  }
12236
12237
  function selection_size$1() {
12237
12238
  let size = 0;
12238
- for (const node2 of this)
12239
- ++size;
12239
+ for (const node2 of this) ++size;
12240
12240
  return size;
12241
12241
  }
12242
12242
  function selection_empty$1() {
@@ -12245,8 +12245,7 @@ function selection_empty$1() {
12245
12245
  function selection_each$1(callback) {
12246
12246
  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
12247
12247
  for (var group = groups[j], i = 0, n = group.length, node2; i < n; ++i) {
12248
- if (node2 = group[i])
12249
- callback.call(node2, node2.__data__, i, group);
12248
+ if (node2 = group[i]) callback.call(node2, node2.__data__, i, group);
12250
12249
  }
12251
12250
  }
12252
12251
  return this;
@@ -12274,19 +12273,15 @@ function attrConstantNS$1(fullname, value) {
12274
12273
  function attrFunction$1(name, value) {
12275
12274
  return function() {
12276
12275
  var v = value.apply(this, arguments);
12277
- if (v == null)
12278
- this.removeAttribute(name);
12279
- else
12280
- this.setAttribute(name, v);
12276
+ if (v == null) this.removeAttribute(name);
12277
+ else this.setAttribute(name, v);
12281
12278
  };
12282
12279
  }
12283
12280
  function attrFunctionNS$1(fullname, value) {
12284
12281
  return function() {
12285
12282
  var v = value.apply(this, arguments);
12286
- if (v == null)
12287
- this.removeAttributeNS(fullname.space, fullname.local);
12288
- else
12289
- this.setAttributeNS(fullname.space, fullname.local, v);
12283
+ if (v == null) this.removeAttributeNS(fullname.space, fullname.local);
12284
+ else this.setAttributeNS(fullname.space, fullname.local, v);
12290
12285
  };
12291
12286
  }
12292
12287
  function selection_attr$1(name, value) {
@@ -12313,10 +12308,8 @@ function styleConstant$1(name, value, priority) {
12313
12308
  function styleFunction$1(name, value, priority) {
12314
12309
  return function() {
12315
12310
  var v = value.apply(this, arguments);
12316
- if (v == null)
12317
- this.style.removeProperty(name);
12318
- else
12319
- this.style.setProperty(name, v, priority);
12311
+ if (v == null) this.style.removeProperty(name);
12312
+ else this.style.setProperty(name, v, priority);
12320
12313
  };
12321
12314
  }
12322
12315
  function selection_style$1(name, value, priority) {
@@ -12338,10 +12331,8 @@ function propertyConstant$1(name, value) {
12338
12331
  function propertyFunction$1(name, value) {
12339
12332
  return function() {
12340
12333
  var v = value.apply(this, arguments);
12341
- if (v == null)
12342
- delete this[name];
12343
- else
12344
- this[name] = v;
12334
+ if (v == null) delete this[name];
12335
+ else this[name] = v;
12345
12336
  };
12346
12337
  }
12347
12338
  function selection_property$1(name, value) {
@@ -12378,13 +12369,11 @@ ClassList$1.prototype = {
12378
12369
  };
12379
12370
  function classedAdd$1(node2, names) {
12380
12371
  var list = classList$1(node2), i = -1, n = names.length;
12381
- while (++i < n)
12382
- list.add(names[i]);
12372
+ while (++i < n) list.add(names[i]);
12383
12373
  }
12384
12374
  function classedRemove$1(node2, names) {
12385
12375
  var list = classList$1(node2), i = -1, n = names.length;
12386
- while (++i < n)
12387
- list.remove(names[i]);
12376
+ while (++i < n) list.remove(names[i]);
12388
12377
  }
12389
12378
  function classedTrue$1(names) {
12390
12379
  return function() {
@@ -12405,9 +12394,7 @@ function selection_classed$1(name, value) {
12405
12394
  var names = classArray$1(name + "");
12406
12395
  if (arguments.length < 2) {
12407
12396
  var list = classList$1(this.node()), i = -1, n = names.length;
12408
- while (++i < n)
12409
- if (!list.contains(names[i]))
12410
- return false;
12397
+ while (++i < n) if (!list.contains(names[i])) return false;
12411
12398
  return true;
12412
12399
  }
12413
12400
  return this.each((typeof value === "function" ? classedFunction$1 : value ? classedTrue$1 : classedFalse$1)(names, value));
@@ -12447,15 +12434,13 @@ function selection_html$1(value) {
12447
12434
  return arguments.length ? this.each(value == null ? htmlRemove$1 : (typeof value === "function" ? htmlFunction$1 : htmlConstant$1)(value)) : this.node().innerHTML;
12448
12435
  }
12449
12436
  function raise$1() {
12450
- if (this.nextSibling)
12451
- this.parentNode.appendChild(this);
12437
+ if (this.nextSibling) this.parentNode.appendChild(this);
12452
12438
  }
12453
12439
  function selection_raise$1() {
12454
12440
  return this.each(raise$1);
12455
12441
  }
12456
12442
  function lower$1() {
12457
- if (this.previousSibling)
12458
- this.parentNode.insertBefore(this, this.parentNode.firstChild);
12443
+ if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);
12459
12444
  }
12460
12445
  function selection_lower$1() {
12461
12446
  return this.each(lower$1);
@@ -12477,8 +12462,7 @@ function selection_insert$1(name, before) {
12477
12462
  }
12478
12463
  function remove$1() {
12479
12464
  var parent = this.parentNode;
12480
- if (parent)
12481
- parent.removeChild(this);
12465
+ if (parent) parent.removeChild(this);
12482
12466
  }
12483
12467
  function selection_remove$1() {
12484
12468
  return this.each(remove$1);
@@ -12505,16 +12489,14 @@ function contextListener$1(listener) {
12505
12489
  function parseTypenames$2(typenames) {
12506
12490
  return typenames.trim().split(/^|\s+/).map(function(t) {
12507
12491
  var name = "", i = t.indexOf(".");
12508
- if (i >= 0)
12509
- name = t.slice(i + 1), t = t.slice(0, i);
12492
+ if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
12510
12493
  return { type: t, name };
12511
12494
  });
12512
12495
  }
12513
12496
  function onRemove$1(typename) {
12514
12497
  return function() {
12515
12498
  var on = this.__on;
12516
- if (!on)
12517
- return;
12499
+ if (!on) return;
12518
12500
  for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {
12519
12501
  if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {
12520
12502
  this.removeEventListener(o.type, o.listener, o.options);
@@ -12522,49 +12504,42 @@ function onRemove$1(typename) {
12522
12504
  on[++i] = o;
12523
12505
  }
12524
12506
  }
12525
- if (++i)
12526
- on.length = i;
12527
- else
12528
- delete this.__on;
12507
+ if (++i) on.length = i;
12508
+ else delete this.__on;
12529
12509
  };
12530
12510
  }
12531
12511
  function onAdd$1(typename, value, options) {
12532
12512
  return function() {
12533
12513
  var on = this.__on, o, listener = contextListener$1(value);
12534
- if (on)
12535
- for (var j = 0, m = on.length; j < m; ++j) {
12536
- if ((o = on[j]).type === typename.type && o.name === typename.name) {
12537
- this.removeEventListener(o.type, o.listener, o.options);
12538
- this.addEventListener(o.type, o.listener = listener, o.options = options);
12539
- o.value = value;
12540
- return;
12541
- }
12514
+ if (on) for (var j = 0, m = on.length; j < m; ++j) {
12515
+ if ((o = on[j]).type === typename.type && o.name === typename.name) {
12516
+ this.removeEventListener(o.type, o.listener, o.options);
12517
+ this.addEventListener(o.type, o.listener = listener, o.options = options);
12518
+ o.value = value;
12519
+ return;
12542
12520
  }
12521
+ }
12543
12522
  this.addEventListener(typename.type, listener, options);
12544
12523
  o = { type: typename.type, name: typename.name, value, listener, options };
12545
- if (!on)
12546
- this.__on = [o];
12547
- else
12548
- on.push(o);
12524
+ if (!on) this.__on = [o];
12525
+ else on.push(o);
12549
12526
  };
12550
12527
  }
12551
12528
  function selection_on$1(typename, value, options) {
12552
12529
  var typenames = parseTypenames$2(typename + ""), i, n = typenames.length, t;
12553
12530
  if (arguments.length < 2) {
12554
12531
  var on = this.node().__on;
12555
- if (on)
12556
- for (var j = 0, m = on.length, o; j < m; ++j) {
12557
- for (i = 0, o = on[j]; i < n; ++i) {
12558
- if ((t = typenames[i]).type === o.type && t.name === o.name) {
12559
- return o.value;
12560
- }
12532
+ if (on) for (var j = 0, m = on.length, o; j < m; ++j) {
12533
+ for (i = 0, o = on[j]; i < n; ++i) {
12534
+ if ((t = typenames[i]).type === o.type && t.name === o.name) {
12535
+ return o.value;
12561
12536
  }
12562
12537
  }
12538
+ }
12563
12539
  return;
12564
12540
  }
12565
12541
  on = value ? onAdd$1 : onRemove$1;
12566
- for (i = 0; i < n; ++i)
12567
- this.each(on(typenames[i], value, options));
12542
+ for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));
12568
12543
  return this;
12569
12544
  }
12570
12545
  function dispatchEvent$1(node2, type, params) {
@@ -12573,10 +12548,8 @@ function dispatchEvent$1(node2, type, params) {
12573
12548
  event = new event(type, params);
12574
12549
  } else {
12575
12550
  event = window2.document.createEvent("Event");
12576
- if (params)
12577
- event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;
12578
- else
12579
- event.initEvent(type, false, false);
12551
+ if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;
12552
+ else event.initEvent(type, false, false);
12580
12553
  }
12581
12554
  node2.dispatchEvent(event);
12582
12555
  }
@@ -12596,8 +12569,7 @@ function selection_dispatch$1(type, params) {
12596
12569
  function* selection_iterator$1() {
12597
12570
  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
12598
12571
  for (var group = groups[j], i = 0, n = group.length, node2; i < n; ++i) {
12599
- if (node2 = group[i])
12600
- yield node2;
12572
+ if (node2 = group[i]) yield node2;
12601
12573
  }
12602
12574
  }
12603
12575
  }
@@ -12655,14 +12627,12 @@ function select$1(selector2) {
12655
12627
  }
12656
12628
  function sourceEvent$1(event) {
12657
12629
  let sourceEvent2;
12658
- while (sourceEvent2 = event.sourceEvent)
12659
- event = sourceEvent2;
12630
+ while (sourceEvent2 = event.sourceEvent) event = sourceEvent2;
12660
12631
  return event;
12661
12632
  }
12662
12633
  function pointer$1(event, node2) {
12663
12634
  event = sourceEvent$1(event);
12664
- if (node2 === void 0)
12665
- node2 = event.currentTarget;
12635
+ if (node2 === void 0) node2 = event.currentTarget;
12666
12636
  if (node2) {
12667
12637
  var svg = node2.ownerSVGElement || node2;
12668
12638
  if (svg.createSVGPoint) {
@@ -12713,8 +12683,7 @@ function define(constructor, factory, prototype) {
12713
12683
  }
12714
12684
  function extend(parent, definition) {
12715
12685
  var prototype = Object.create(parent.prototype);
12716
- for (var key in definition)
12717
- prototype[key] = definition[key];
12686
+ for (var key in definition) prototype[key] = definition[key];
12718
12687
  return prototype;
12719
12688
  }
12720
12689
  function Color() {
@@ -12908,15 +12877,12 @@ function rgbn(n) {
12908
12877
  return new Rgb(n >> 16 & 255, n >> 8 & 255, n & 255, 1);
12909
12878
  }
12910
12879
  function rgba(r, g, b, a) {
12911
- if (a <= 0)
12912
- r = g = b = NaN;
12880
+ if (a <= 0) r = g = b = NaN;
12913
12881
  return new Rgb(r, g, b, a);
12914
12882
  }
12915
12883
  function rgbConvert(o) {
12916
- if (!(o instanceof Color))
12917
- o = color$1(o);
12918
- if (!o)
12919
- return new Rgb();
12884
+ if (!(o instanceof Color)) o = color$1(o);
12885
+ if (!o) return new Rgb();
12920
12886
  o = o.rgb();
12921
12887
  return new Rgb(o.r, o.g, o.b, o.opacity);
12922
12888
  }
@@ -12975,32 +12941,22 @@ function hex(value) {
12975
12941
  return (value < 16 ? "0" : "") + value.toString(16);
12976
12942
  }
12977
12943
  function hsla(h2, s, l, a) {
12978
- if (a <= 0)
12979
- h2 = s = l = NaN;
12980
- else if (l <= 0 || l >= 1)
12981
- h2 = s = NaN;
12982
- else if (s <= 0)
12983
- h2 = NaN;
12944
+ if (a <= 0) h2 = s = l = NaN;
12945
+ else if (l <= 0 || l >= 1) h2 = s = NaN;
12946
+ else if (s <= 0) h2 = NaN;
12984
12947
  return new Hsl(h2, s, l, a);
12985
12948
  }
12986
12949
  function hslConvert(o) {
12987
- if (o instanceof Hsl)
12988
- return new Hsl(o.h, o.s, o.l, o.opacity);
12989
- if (!(o instanceof Color))
12990
- o = color$1(o);
12991
- if (!o)
12992
- return new Hsl();
12993
- if (o instanceof Hsl)
12994
- return o;
12950
+ if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
12951
+ if (!(o instanceof Color)) o = color$1(o);
12952
+ if (!o) return new Hsl();
12953
+ if (o instanceof Hsl) return o;
12995
12954
  o = o.rgb();
12996
12955
  var r = o.r / 255, g = o.g / 255, b = o.b / 255, min = Math.min(r, g, b), max = Math.max(r, g, b), h2 = NaN, s = max - min, l = (max + min) / 2;
12997
12956
  if (s) {
12998
- if (r === max)
12999
- h2 = (g - b) / s + (g < b) * 6;
13000
- else if (g === max)
13001
- h2 = (b - r) / s + 2;
13002
- else
13003
- h2 = (r - g) / s + 4;
12957
+ if (r === max) h2 = (g - b) / s + (g < b) * 6;
12958
+ else if (g === max) h2 = (b - r) / s + 2;
12959
+ else h2 = (r - g) / s + 4;
13004
12960
  s /= l < 0.5 ? max + min : 2 - max - min;
13005
12961
  h2 *= 60;
13006
12962
  } else {
@@ -13113,16 +13069,12 @@ function interpolateString(a, b) {
13113
13069
  while ((am = reA.exec(a)) && (bm = reB.exec(b))) {
13114
13070
  if ((bs = bm.index) > bi) {
13115
13071
  bs = b.slice(bi, bs);
13116
- if (s[i])
13117
- s[i] += bs;
13118
- else
13119
- s[++i] = bs;
13072
+ if (s[i]) s[i] += bs;
13073
+ else s[++i] = bs;
13120
13074
  }
13121
13075
  if ((am = am[0]) === (bm = bm[0])) {
13122
- if (s[i])
13123
- s[i] += bm;
13124
- else
13125
- s[++i] = bm;
13076
+ if (s[i]) s[i] += bm;
13077
+ else s[++i] = bm;
13126
13078
  } else {
13127
13079
  s[++i] = null;
13128
13080
  q.push({ i, x: interpolateNumber(am, bm) });
@@ -13131,14 +13083,11 @@ function interpolateString(a, b) {
13131
13083
  }
13132
13084
  if (bi < b.length) {
13133
13085
  bs = b.slice(bi);
13134
- if (s[i])
13135
- s[i] += bs;
13136
- else
13137
- s[++i] = bs;
13086
+ if (s[i]) s[i] += bs;
13087
+ else s[++i] = bs;
13138
13088
  }
13139
13089
  return s.length < 2 ? q[0] ? one(q[0].x) : zero(b) : (b = q.length, function(t) {
13140
- for (var i2 = 0, o; i2 < b; ++i2)
13141
- s[(o = q[i2]).i] = o.x(t);
13090
+ for (var i2 = 0, o; i2 < b; ++i2) s[(o = q[i2]).i] = o.x(t);
13142
13091
  return s.join("");
13143
13092
  });
13144
13093
  }
@@ -13153,14 +13102,10 @@ var identity$1 = {
13153
13102
  };
13154
13103
  function decompose(a, b, c, d, e, f) {
13155
13104
  var scaleX, scaleY, skewX;
13156
- if (scaleX = Math.sqrt(a * a + b * b))
13157
- a /= scaleX, b /= scaleX;
13158
- if (skewX = a * c + b * d)
13159
- c -= a * skewX, d -= b * skewX;
13160
- if (scaleY = Math.sqrt(c * c + d * d))
13161
- c /= scaleY, d /= scaleY, skewX /= scaleY;
13162
- if (a * d < b * c)
13163
- a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;
13105
+ if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;
13106
+ if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;
13107
+ if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;
13108
+ if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;
13164
13109
  return {
13165
13110
  translateX: e,
13166
13111
  translateY: f,
@@ -13176,13 +13121,10 @@ function parseCss(value) {
13176
13121
  return m.isIdentity ? identity$1 : decompose(m.a, m.b, m.c, m.d, m.e, m.f);
13177
13122
  }
13178
13123
  function parseSvg(value) {
13179
- if (value == null)
13180
- return identity$1;
13181
- if (!svgNode)
13182
- svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g");
13124
+ if (value == null) return identity$1;
13125
+ if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g");
13183
13126
  svgNode.setAttribute("transform", value);
13184
- if (!(value = svgNode.transform.baseVal.consolidate()))
13185
- return identity$1;
13127
+ if (!(value = svgNode.transform.baseVal.consolidate())) return identity$1;
13186
13128
  value = value.matrix;
13187
13129
  return decompose(value.a, value.b, value.c, value.d, value.e, value.f);
13188
13130
  }
@@ -13200,10 +13142,8 @@ function interpolateTransform(parse, pxComma, pxParen, degParen) {
13200
13142
  }
13201
13143
  function rotate(a, b, s, q) {
13202
13144
  if (a !== b) {
13203
- if (a - b > 180)
13204
- b += 360;
13205
- else if (b - a > 180)
13206
- a += 360;
13145
+ if (a - b > 180) b += 360;
13146
+ else if (b - a > 180) a += 360;
13207
13147
  q.push({ i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: interpolateNumber(a, b) });
13208
13148
  } else if (b) {
13209
13149
  s.push(pop(s) + "rotate(" + b + degParen);
@@ -13234,8 +13174,7 @@ function interpolateTransform(parse, pxComma, pxParen, degParen) {
13234
13174
  a = b = null;
13235
13175
  return function(t) {
13236
13176
  var i = -1, n = q.length, o;
13237
- while (++i < n)
13238
- s[(o = q[i]).i] = o.x(t);
13177
+ while (++i < n) s[(o = q[i]).i] = o.x(t);
13239
13178
  return s.join("");
13240
13179
  };
13241
13180
  };
@@ -13300,14 +13239,11 @@ function Timer() {
13300
13239
  Timer.prototype = timer.prototype = {
13301
13240
  constructor: Timer,
13302
13241
  restart: function(callback, delay, time) {
13303
- if (typeof callback !== "function")
13304
- throw new TypeError("callback is not a function");
13242
+ if (typeof callback !== "function") throw new TypeError("callback is not a function");
13305
13243
  time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);
13306
13244
  if (!this._next && taskTail !== this) {
13307
- if (taskTail)
13308
- taskTail._next = this;
13309
- else
13310
- taskHead = this;
13245
+ if (taskTail) taskTail._next = this;
13246
+ else taskHead = this;
13311
13247
  taskTail = this;
13312
13248
  }
13313
13249
  this._call = callback;
@@ -13332,8 +13268,7 @@ function timerFlush() {
13332
13268
  ++frame;
13333
13269
  var t = taskHead, e;
13334
13270
  while (t) {
13335
- if ((e = clockNow - t._time) >= 0)
13336
- t._call.call(void 0, e);
13271
+ if ((e = clockNow - t._time) >= 0) t._call.call(void 0, e);
13337
13272
  t = t._next;
13338
13273
  }
13339
13274
  --frame;
@@ -13351,15 +13286,13 @@ function wake() {
13351
13286
  }
13352
13287
  function poke() {
13353
13288
  var now2 = clock.now(), delay = now2 - clockLast;
13354
- if (delay > pokeDelay)
13355
- clockSkew -= delay, clockLast = now2;
13289
+ if (delay > pokeDelay) clockSkew -= delay, clockLast = now2;
13356
13290
  }
13357
13291
  function nap() {
13358
13292
  var t0, t1 = taskHead, t2, time = Infinity;
13359
13293
  while (t1) {
13360
13294
  if (t1._call) {
13361
- if (time > t1._time)
13362
- time = t1._time;
13295
+ if (time > t1._time) time = t1._time;
13363
13296
  t0 = t1, t1 = t1._next;
13364
13297
  } else {
13365
13298
  t2 = t1._next, t1._next = null;
@@ -13370,19 +13303,14 @@ function nap() {
13370
13303
  sleep(time);
13371
13304
  }
13372
13305
  function sleep(time) {
13373
- if (frame)
13374
- return;
13375
- if (timeout$1)
13376
- timeout$1 = clearTimeout(timeout$1);
13306
+ if (frame) return;
13307
+ if (timeout$1) timeout$1 = clearTimeout(timeout$1);
13377
13308
  var delay = time - clockNow;
13378
13309
  if (delay > 24) {
13379
- if (time < Infinity)
13380
- timeout$1 = setTimeout(wake, time - clock.now() - clockSkew);
13381
- if (interval)
13382
- interval = clearInterval(interval);
13310
+ if (time < Infinity) timeout$1 = setTimeout(wake, time - clock.now() - clockSkew);
13311
+ if (interval) interval = clearInterval(interval);
13383
13312
  } else {
13384
- if (!interval)
13385
- clockLast = clock.now(), interval = setInterval(poke, pokeDelay);
13313
+ if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);
13386
13314
  frame = 1, setFrame(wake);
13387
13315
  }
13388
13316
  }
@@ -13406,10 +13334,8 @@ var ENDING = 5;
13406
13334
  var ENDED = 6;
13407
13335
  function schedule(node2, name, id2, index, group, timing) {
13408
13336
  var schedules = node2.__transition;
13409
- if (!schedules)
13410
- node2.__transition = {};
13411
- else if (id2 in schedules)
13412
- return;
13337
+ if (!schedules) node2.__transition = {};
13338
+ else if (id2 in schedules) return;
13413
13339
  create(node2, id2, {
13414
13340
  name,
13415
13341
  index,
@@ -13428,20 +13354,17 @@ function schedule(node2, name, id2, index, group, timing) {
13428
13354
  }
13429
13355
  function init(node2, id2) {
13430
13356
  var schedule2 = get$2(node2, id2);
13431
- if (schedule2.state > CREATED)
13432
- throw new Error("too late; already scheduled");
13357
+ if (schedule2.state > CREATED) throw new Error("too late; already scheduled");
13433
13358
  return schedule2;
13434
13359
  }
13435
13360
  function set$2(node2, id2) {
13436
13361
  var schedule2 = get$2(node2, id2);
13437
- if (schedule2.state > STARTED)
13438
- throw new Error("too late; already running");
13362
+ if (schedule2.state > STARTED) throw new Error("too late; already running");
13439
13363
  return schedule2;
13440
13364
  }
13441
13365
  function get$2(node2, id2) {
13442
13366
  var schedule2 = node2.__transition;
13443
- if (!schedule2 || !(schedule2 = schedule2[id2]))
13444
- throw new Error("transition not found");
13367
+ if (!schedule2 || !(schedule2 = schedule2[id2])) throw new Error("transition not found");
13445
13368
  return schedule2;
13446
13369
  }
13447
13370
  function create(node2, id2, self) {
@@ -13451,19 +13374,15 @@ function create(node2, id2, self) {
13451
13374
  function schedule2(elapsed) {
13452
13375
  self.state = SCHEDULED;
13453
13376
  self.timer.restart(start2, self.delay, self.time);
13454
- if (self.delay <= elapsed)
13455
- start2(elapsed - self.delay);
13377
+ if (self.delay <= elapsed) start2(elapsed - self.delay);
13456
13378
  }
13457
13379
  function start2(elapsed) {
13458
13380
  var i, j, n, o;
13459
- if (self.state !== SCHEDULED)
13460
- return stop();
13381
+ if (self.state !== SCHEDULED) return stop();
13461
13382
  for (i in schedules) {
13462
13383
  o = schedules[i];
13463
- if (o.name !== self.name)
13464
- continue;
13465
- if (o.state === STARTED)
13466
- return timeout(start2);
13384
+ if (o.name !== self.name) continue;
13385
+ if (o.state === STARTED) return timeout(start2);
13467
13386
  if (o.state === RUNNING) {
13468
13387
  o.state = ENDED;
13469
13388
  o.timer.stop();
@@ -13485,8 +13404,7 @@ function create(node2, id2, self) {
13485
13404
  });
13486
13405
  self.state = STARTING;
13487
13406
  self.on.call("start", node2, node2.__data__, self.index, self.group);
13488
- if (self.state !== STARTING)
13489
- return;
13407
+ if (self.state !== STARTING) return;
13490
13408
  self.state = STARTED;
13491
13409
  tween = new Array(n = self.tween.length);
13492
13410
  for (i = 0, j = -1; i < n; ++i) {
@@ -13510,15 +13428,13 @@ function create(node2, id2, self) {
13510
13428
  self.state = ENDED;
13511
13429
  self.timer.stop();
13512
13430
  delete schedules[id2];
13513
- for (var i in schedules)
13514
- return;
13431
+ for (var i in schedules) return;
13515
13432
  delete node2.__transition;
13516
13433
  }
13517
13434
  }
13518
13435
  function interrupt(node2, name) {
13519
13436
  var schedules = node2.__transition, schedule2, active, empty2 = true, i;
13520
- if (!schedules)
13521
- return;
13437
+ if (!schedules) return;
13522
13438
  name = name == null ? null : name + "";
13523
13439
  for (i in schedules) {
13524
13440
  if ((schedule2 = schedules[i]).name !== name) {
@@ -13531,8 +13447,7 @@ function interrupt(node2, name) {
13531
13447
  schedule2.on.call(active ? "interrupt" : "cancel", node2, node2.__data__, schedule2.index, schedule2.group);
13532
13448
  delete schedules[i];
13533
13449
  }
13534
- if (empty2)
13535
- delete node2.__transition;
13450
+ if (empty2) delete node2.__transition;
13536
13451
  }
13537
13452
  function selection_interrupt(name) {
13538
13453
  return this.each(function() {
@@ -13558,8 +13473,7 @@ function tweenRemove(id2, name) {
13558
13473
  }
13559
13474
  function tweenFunction(id2, name, value) {
13560
13475
  var tween0, tween1;
13561
- if (typeof value !== "function")
13562
- throw new Error();
13476
+ if (typeof value !== "function") throw new Error();
13563
13477
  return function() {
13564
13478
  var schedule2 = set$2(this, id2), tween = schedule2.tween;
13565
13479
  if (tween !== tween0) {
@@ -13570,8 +13484,7 @@ function tweenFunction(id2, name, value) {
13570
13484
  break;
13571
13485
  }
13572
13486
  }
13573
- if (i === n)
13574
- tween1.push(t);
13487
+ if (i === n) tween1.push(t);
13575
13488
  }
13576
13489
  schedule2.tween = tween1;
13577
13490
  };
@@ -13632,8 +13545,7 @@ function attrFunction$2(name, interpolate2, value) {
13632
13545
  var string00, string10, interpolate0;
13633
13546
  return function() {
13634
13547
  var string0, value1 = value(this), string1;
13635
- if (value1 == null)
13636
- return void this.removeAttribute(name);
13548
+ if (value1 == null) return void this.removeAttribute(name);
13637
13549
  string0 = this.getAttribute(name);
13638
13550
  string1 = value1 + "";
13639
13551
  return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1));
@@ -13643,8 +13555,7 @@ function attrFunctionNS$2(fullname, interpolate2, value) {
13643
13555
  var string00, string10, interpolate0;
13644
13556
  return function() {
13645
13557
  var string0, value1 = value(this), string1;
13646
- if (value1 == null)
13647
- return void this.removeAttributeNS(fullname.space, fullname.local);
13558
+ if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);
13648
13559
  string0 = this.getAttributeNS(fullname.space, fullname.local);
13649
13560
  string1 = value1 + "";
13650
13561
  return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1));
@@ -13668,8 +13579,7 @@ function attrTweenNS(fullname, value) {
13668
13579
  var t0, i0;
13669
13580
  function tween() {
13670
13581
  var i = value.apply(this, arguments);
13671
- if (i !== i0)
13672
- t0 = (i0 = i) && attrInterpolateNS(fullname, i);
13582
+ if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);
13673
13583
  return t0;
13674
13584
  }
13675
13585
  tween._value = value;
@@ -13679,8 +13589,7 @@ function attrTween(name, value) {
13679
13589
  var t0, i0;
13680
13590
  function tween() {
13681
13591
  var i = value.apply(this, arguments);
13682
- if (i !== i0)
13683
- t0 = (i0 = i) && attrInterpolate(name, i);
13592
+ if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);
13684
13593
  return t0;
13685
13594
  }
13686
13595
  tween._value = value;
@@ -13688,12 +13597,9 @@ function attrTween(name, value) {
13688
13597
  }
13689
13598
  function transition_attrTween(name, value) {
13690
13599
  var key = "attr." + name;
13691
- if (arguments.length < 2)
13692
- return (key = this.tween(key)) && key._value;
13693
- if (value == null)
13694
- return this.tween(key, null);
13695
- if (typeof value !== "function")
13696
- throw new Error();
13600
+ if (arguments.length < 2) return (key = this.tween(key)) && key._value;
13601
+ if (value == null) return this.tween(key, null);
13602
+ if (typeof value !== "function") throw new Error();
13697
13603
  var fullname = namespace$1(name);
13698
13604
  return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));
13699
13605
  }
@@ -13726,8 +13632,7 @@ function transition_duration(value) {
13726
13632
  return arguments.length ? this.each((typeof value === "function" ? durationFunction : durationConstant)(id2, value)) : get$2(this.node(), id2).duration;
13727
13633
  }
13728
13634
  function easeConstant(id2, value) {
13729
- if (typeof value !== "function")
13730
- throw new Error();
13635
+ if (typeof value !== "function") throw new Error();
13731
13636
  return function() {
13732
13637
  set$2(this, id2).ease = value;
13733
13638
  };
@@ -13739,19 +13644,16 @@ function transition_ease(value) {
13739
13644
  function easeVarying(id2, value) {
13740
13645
  return function() {
13741
13646
  var v = value.apply(this, arguments);
13742
- if (typeof v !== "function")
13743
- throw new Error();
13647
+ if (typeof v !== "function") throw new Error();
13744
13648
  set$2(this, id2).ease = v;
13745
13649
  };
13746
13650
  }
13747
13651
  function transition_easeVarying(value) {
13748
- if (typeof value !== "function")
13749
- throw new Error();
13652
+ if (typeof value !== "function") throw new Error();
13750
13653
  return this.each(easeVarying(this._id, value));
13751
13654
  }
13752
13655
  function transition_filter(match) {
13753
- if (typeof match !== "function")
13754
- match = matcher$1(match);
13656
+ if (typeof match !== "function") match = matcher$1(match);
13755
13657
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
13756
13658
  for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node2, i = 0; i < n; ++i) {
13757
13659
  if ((node2 = group[i]) && match.call(node2, node2.__data__, i, group)) {
@@ -13762,8 +13664,7 @@ function transition_filter(match) {
13762
13664
  return new Transition(subgroups, this._parents, this._name, this._id);
13763
13665
  }
13764
13666
  function transition_merge(transition2) {
13765
- if (transition2._id !== this._id)
13766
- throw new Error();
13667
+ if (transition2._id !== this._id) throw new Error();
13767
13668
  for (var groups0 = this._groups, groups1 = transition2._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {
13768
13669
  for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node2, i = 0; i < n; ++i) {
13769
13670
  if (node2 = group0[i] || group1[i]) {
@@ -13779,8 +13680,7 @@ function transition_merge(transition2) {
13779
13680
  function start(name) {
13780
13681
  return (name + "").trim().split(/^|\s+/).every(function(t) {
13781
13682
  var i = t.indexOf(".");
13782
- if (i >= 0)
13783
- t = t.slice(0, i);
13683
+ if (i >= 0) t = t.slice(0, i);
13784
13684
  return !t || t === "start";
13785
13685
  });
13786
13686
  }
@@ -13788,8 +13688,7 @@ function onFunction(id2, name, listener) {
13788
13688
  var on0, on1, sit = start(name) ? init : set$2;
13789
13689
  return function() {
13790
13690
  var schedule2 = sit(this, id2), on = schedule2.on;
13791
- if (on !== on0)
13792
- (on1 = (on0 = on).copy()).on(name, listener);
13691
+ if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);
13793
13692
  schedule2.on = on1;
13794
13693
  };
13795
13694
  }
@@ -13800,11 +13699,8 @@ function transition_on(name, listener) {
13800
13699
  function removeFunction(id2) {
13801
13700
  return function() {
13802
13701
  var parent = this.parentNode;
13803
- for (var i in this.__transition)
13804
- if (+i !== id2)
13805
- return;
13806
- if (parent)
13807
- parent.removeChild(this);
13702
+ for (var i in this.__transition) if (+i !== id2) return;
13703
+ if (parent) parent.removeChild(this);
13808
13704
  };
13809
13705
  }
13810
13706
  function transition_remove() {
@@ -13812,13 +13708,11 @@ function transition_remove() {
13812
13708
  }
13813
13709
  function transition_select(select2) {
13814
13710
  var name = this._name, id2 = this._id;
13815
- if (typeof select2 !== "function")
13816
- select2 = selector$1(select2);
13711
+ if (typeof select2 !== "function") select2 = selector$1(select2);
13817
13712
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
13818
13713
  for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node2, subnode, i = 0; i < n; ++i) {
13819
13714
  if ((node2 = group[i]) && (subnode = select2.call(node2, node2.__data__, i, group))) {
13820
- if ("__data__" in node2)
13821
- subnode.__data__ = node2.__data__;
13715
+ if ("__data__" in node2) subnode.__data__ = node2.__data__;
13822
13716
  subgroup[i] = subnode;
13823
13717
  schedule(subgroup[i], name, id2, i, subgroup, get$2(node2, id2));
13824
13718
  }
@@ -13828,8 +13722,7 @@ function transition_select(select2) {
13828
13722
  }
13829
13723
  function transition_selectAll(select2) {
13830
13724
  var name = this._name, id2 = this._id;
13831
- if (typeof select2 !== "function")
13832
- select2 = selectorAll$1(select2);
13725
+ if (typeof select2 !== "function") select2 = selectorAll$1(select2);
13833
13726
  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
13834
13727
  for (var group = groups[j], n = group.length, node2, i = 0; i < n; ++i) {
13835
13728
  if (node2 = group[i]) {
@@ -13872,8 +13765,7 @@ function styleFunction$2(name, interpolate2, value) {
13872
13765
  var string00, string10, interpolate0;
13873
13766
  return function() {
13874
13767
  var string0 = styleValue$1(this, name), value1 = value(this), string1 = value1 + "";
13875
- if (value1 == null)
13876
- string1 = value1 = (this.style.removeProperty(name), styleValue$1(this, name));
13768
+ if (value1 == null) string1 = value1 = (this.style.removeProperty(name), styleValue$1(this, name));
13877
13769
  return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1));
13878
13770
  };
13879
13771
  }
@@ -13881,8 +13773,7 @@ function styleMaybeRemove(id2, name) {
13881
13773
  var on0, on1, listener0, key = "style." + name, event = "end." + key, remove2;
13882
13774
  return function() {
13883
13775
  var schedule2 = set$2(this, id2), on = schedule2.on, listener = schedule2.value[key] == null ? remove2 || (remove2 = styleRemove$2(name)) : void 0;
13884
- if (on !== on0 || listener0 !== listener)
13885
- (on1 = (on0 = on).copy()).on(event, listener0 = listener);
13776
+ if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);
13886
13777
  schedule2.on = on1;
13887
13778
  };
13888
13779
  }
@@ -13899,8 +13790,7 @@ function styleTween(name, value, priority) {
13899
13790
  var t, i0;
13900
13791
  function tween() {
13901
13792
  var i = value.apply(this, arguments);
13902
- if (i !== i0)
13903
- t = (i0 = i) && styleInterpolate(name, i, priority);
13793
+ if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);
13904
13794
  return t;
13905
13795
  }
13906
13796
  tween._value = value;
@@ -13908,12 +13798,9 @@ function styleTween(name, value, priority) {
13908
13798
  }
13909
13799
  function transition_styleTween(name, value, priority) {
13910
13800
  var key = "style." + (name += "");
13911
- if (arguments.length < 2)
13912
- return (key = this.tween(key)) && key._value;
13913
- if (value == null)
13914
- return this.tween(key, null);
13915
- if (typeof value !== "function")
13916
- throw new Error();
13801
+ if (arguments.length < 2) return (key = this.tween(key)) && key._value;
13802
+ if (value == null) return this.tween(key, null);
13803
+ if (typeof value !== "function") throw new Error();
13917
13804
  return this.tween(key, styleTween(name, value, priority == null ? "" : priority));
13918
13805
  }
13919
13806
  function textConstant$2(value) {
@@ -13939,8 +13826,7 @@ function textTween(value) {
13939
13826
  var t0, i0;
13940
13827
  function tween() {
13941
13828
  var i = value.apply(this, arguments);
13942
- if (i !== i0)
13943
- t0 = (i0 = i) && textInterpolate(i);
13829
+ if (i !== i0) t0 = (i0 = i) && textInterpolate(i);
13944
13830
  return t0;
13945
13831
  }
13946
13832
  tween._value = value;
@@ -13948,12 +13834,9 @@ function textTween(value) {
13948
13834
  }
13949
13835
  function transition_textTween(value) {
13950
13836
  var key = "text";
13951
- if (arguments.length < 1)
13952
- return (key = this.tween(key)) && key._value;
13953
- if (value == null)
13954
- return this.tween(key, null);
13955
- if (typeof value !== "function")
13956
- throw new Error();
13837
+ if (arguments.length < 1) return (key = this.tween(key)) && key._value;
13838
+ if (value == null) return this.tween(key, null);
13839
+ if (typeof value !== "function") throw new Error();
13957
13840
  return this.tween(key, textTween(value));
13958
13841
  }
13959
13842
  function transition_transition() {
@@ -13977,8 +13860,7 @@ function transition_end() {
13977
13860
  var on0, on1, that = this, id2 = that._id, size = that.size();
13978
13861
  return new Promise(function(resolve, reject) {
13979
13862
  var cancel = { value: reject }, end = { value: function() {
13980
- if (--size === 0)
13981
- resolve();
13863
+ if (--size === 0) resolve();
13982
13864
  } };
13983
13865
  that.each(function() {
13984
13866
  var schedule2 = set$2(this, id2), on = schedule2.on;
@@ -13990,8 +13872,7 @@ function transition_end() {
13990
13872
  }
13991
13873
  schedule2.on = on1;
13992
13874
  });
13993
- if (size === 0)
13994
- resolve();
13875
+ if (size === 0) resolve();
13995
13876
  });
13996
13877
  }
13997
13878
  var id = 0;
@@ -14234,8 +14115,7 @@ function zoom() {
14234
14115
  }).tween("zoom", function() {
14235
14116
  var that = this, args = arguments, g = gesture(that, args).event(event), e = extent.apply(that, args), p = point == null ? centroid(e) : typeof point === "function" ? point.apply(that, args) : point, w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]), a = that.__zoom, b = typeof transform === "function" ? transform.apply(that, args) : transform, i = interpolate2(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));
14236
14117
  return function(t) {
14237
- if (t === 1)
14238
- t = b;
14118
+ if (t === 1) t = b;
14239
14119
  else {
14240
14120
  var l = i(t), k = w / l[2];
14241
14121
  t = new Transform(k, p[0] - l[0] * k, p[1] - l[1] * k);
@@ -14257,8 +14137,7 @@ function zoom() {
14257
14137
  }
14258
14138
  Gesture.prototype = {
14259
14139
  event: function(event) {
14260
- if (event)
14261
- this.sourceEvent = event;
14140
+ if (event) this.sourceEvent = event;
14262
14141
  return this;
14263
14142
  },
14264
14143
  start: function() {
@@ -14269,12 +14148,9 @@ function zoom() {
14269
14148
  return this;
14270
14149
  },
14271
14150
  zoom: function(key, transform) {
14272
- if (this.mouse && key !== "mouse")
14273
- this.mouse[1] = transform.invert(this.mouse[0]);
14274
- if (this.touch0 && key !== "touch")
14275
- this.touch0[1] = transform.invert(this.touch0[0]);
14276
- if (this.touch1 && key !== "touch")
14277
- this.touch1[1] = transform.invert(this.touch1[0]);
14151
+ if (this.mouse && key !== "mouse") this.mouse[1] = transform.invert(this.mouse[0]);
14152
+ if (this.touch0 && key !== "touch") this.touch0[1] = transform.invert(this.touch0[0]);
14153
+ if (this.touch1 && key !== "touch") this.touch1[1] = transform.invert(this.touch1[0]);
14278
14154
  this.that.__zoom = transform;
14279
14155
  this.emit("zoom");
14280
14156
  return this;
@@ -14303,16 +14179,14 @@ function zoom() {
14303
14179
  }
14304
14180
  };
14305
14181
  function wheeled(event, ...args) {
14306
- if (!filter2.apply(this, arguments))
14307
- return;
14182
+ if (!filter2.apply(this, arguments)) return;
14308
14183
  var g = gesture(this, args).event(event), t = this.__zoom, k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))), p = pointer$1(event);
14309
14184
  if (g.wheel) {
14310
14185
  if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) {
14311
14186
  g.mouse[1] = t.invert(g.mouse[0] = p);
14312
14187
  }
14313
14188
  clearTimeout(g.wheel);
14314
- } else if (t.k === k)
14315
- return;
14189
+ } else if (t.k === k) return;
14316
14190
  else {
14317
14191
  g.mouse = [p, t.invert(p)];
14318
14192
  interrupt(this);
@@ -14327,8 +14201,7 @@ function zoom() {
14327
14201
  }
14328
14202
  }
14329
14203
  function mousedowned(event, ...args) {
14330
- if (touchending || !filter2.apply(this, arguments))
14331
- return;
14204
+ if (touchending || !filter2.apply(this, arguments)) return;
14332
14205
  var currentTarget = event.currentTarget, g = gesture(this, args, true).event(event), v = select$1(event.view).on("mousemove.zoom", mousemoved, true).on("mouseup.zoom", mouseupped, true), p = pointer$1(event, currentTarget), x0 = event.clientX, y0 = event.clientY;
14333
14206
  dragDisable(event.view);
14334
14207
  nopropagation$1(event);
@@ -14351,50 +14224,39 @@ function zoom() {
14351
14224
  }
14352
14225
  }
14353
14226
  function dblclicked(event, ...args) {
14354
- if (!filter2.apply(this, arguments))
14355
- return;
14227
+ if (!filter2.apply(this, arguments)) return;
14356
14228
  var t0 = this.__zoom, p0 = pointer$1(event.changedTouches ? event.changedTouches[0] : event, this), p1 = t0.invert(p0), k1 = t0.k * (event.shiftKey ? 0.5 : 2), t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent);
14357
14229
  noevent$2(event);
14358
- if (duration > 0)
14359
- select$1(this).transition().duration(duration).call(schedule2, t1, p0, event);
14360
- else
14361
- select$1(this).call(zoom2.transform, t1, p0, event);
14230
+ if (duration > 0) select$1(this).transition().duration(duration).call(schedule2, t1, p0, event);
14231
+ else select$1(this).call(zoom2.transform, t1, p0, event);
14362
14232
  }
14363
14233
  function touchstarted(event, ...args) {
14364
- if (!filter2.apply(this, arguments))
14365
- return;
14234
+ if (!filter2.apply(this, arguments)) return;
14366
14235
  var touches = event.touches, n = touches.length, g = gesture(this, args, event.changedTouches.length === n).event(event), started, i, t, p;
14367
14236
  nopropagation$1(event);
14368
14237
  for (i = 0; i < n; ++i) {
14369
14238
  t = touches[i], p = pointer$1(t, this);
14370
14239
  p = [p, this.__zoom.invert(p), t.identifier];
14371
- if (!g.touch0)
14372
- g.touch0 = p, started = true, g.taps = 1 + !!touchstarting;
14373
- else if (!g.touch1 && g.touch0[2] !== p[2])
14374
- g.touch1 = p, g.taps = 0;
14240
+ if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting;
14241
+ else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0;
14375
14242
  }
14376
- if (touchstarting)
14377
- touchstarting = clearTimeout(touchstarting);
14243
+ if (touchstarting) touchstarting = clearTimeout(touchstarting);
14378
14244
  if (started) {
14379
- if (g.taps < 2)
14380
- touchfirst = p[0], touchstarting = setTimeout(function() {
14381
- touchstarting = null;
14382
- }, touchDelay);
14245
+ if (g.taps < 2) touchfirst = p[0], touchstarting = setTimeout(function() {
14246
+ touchstarting = null;
14247
+ }, touchDelay);
14383
14248
  interrupt(this);
14384
14249
  g.start();
14385
14250
  }
14386
14251
  }
14387
14252
  function touchmoved(event, ...args) {
14388
- if (!this.__zooming)
14389
- return;
14253
+ if (!this.__zooming) return;
14390
14254
  var g = gesture(this, args).event(event), touches = event.changedTouches, n = touches.length, i, t, p, l;
14391
14255
  noevent$2(event);
14392
14256
  for (i = 0; i < n; ++i) {
14393
14257
  t = touches[i], p = pointer$1(t, this);
14394
- if (g.touch0 && g.touch0[2] === t.identifier)
14395
- g.touch0[0] = p;
14396
- else if (g.touch1 && g.touch1[2] === t.identifier)
14397
- g.touch1[0] = p;
14258
+ if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;
14259
+ else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;
14398
14260
  }
14399
14261
  t = g.that.__zoom;
14400
14262
  if (g.touch1) {
@@ -14402,41 +14264,32 @@ function zoom() {
14402
14264
  t = scale(t, Math.sqrt(dp / dl));
14403
14265
  p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];
14404
14266
  l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];
14405
- } else if (g.touch0)
14406
- p = g.touch0[0], l = g.touch0[1];
14407
- else
14408
- return;
14267
+ } else if (g.touch0) p = g.touch0[0], l = g.touch0[1];
14268
+ else return;
14409
14269
  g.zoom("touch", constrain(translate(t, p, l), g.extent, translateExtent));
14410
14270
  }
14411
14271
  function touchended(event, ...args) {
14412
- if (!this.__zooming)
14413
- return;
14272
+ if (!this.__zooming) return;
14414
14273
  var g = gesture(this, args).event(event), touches = event.changedTouches, n = touches.length, i, t;
14415
14274
  nopropagation$1(event);
14416
- if (touchending)
14417
- clearTimeout(touchending);
14275
+ if (touchending) clearTimeout(touchending);
14418
14276
  touchending = setTimeout(function() {
14419
14277
  touchending = null;
14420
14278
  }, touchDelay);
14421
14279
  for (i = 0; i < n; ++i) {
14422
14280
  t = touches[i];
14423
- if (g.touch0 && g.touch0[2] === t.identifier)
14424
- delete g.touch0;
14425
- else if (g.touch1 && g.touch1[2] === t.identifier)
14426
- delete g.touch1;
14281
+ if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0;
14282
+ else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1;
14427
14283
  }
14428
- if (g.touch1 && !g.touch0)
14429
- g.touch0 = g.touch1, delete g.touch1;
14430
- if (g.touch0)
14431
- g.touch0[1] = this.__zoom.invert(g.touch0[0]);
14284
+ if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1;
14285
+ if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]);
14432
14286
  else {
14433
14287
  g.end();
14434
14288
  if (g.taps === 2) {
14435
14289
  t = pointer$1(t, this);
14436
14290
  if (Math.hypot(touchfirst[0] - t[0], touchfirst[1] - t[1]) < tapDistance) {
14437
14291
  var p = select$1(this).on("dblclick.zoom");
14438
- if (p)
14439
- p.apply(this, arguments);
14292
+ if (p) p.apply(this, arguments);
14440
14293
  }
14441
14294
  }
14442
14295
  }
@@ -14484,7 +14337,8 @@ const Slots = Symbol("MiniMapSlots");
14484
14337
  const _hoisted_1$1$1 = ["id", "x", "y", "rx", "ry", "width", "height", "fill", "stroke", "stroke-width", "shape-rendering"];
14485
14338
  const __default__$1$1 = {
14486
14339
  name: "MiniMapNode",
14487
- compatConfig: { MODE: 3 }
14340
+ compatConfig: { MODE: 3 },
14341
+ inheritAttrs: false
14488
14342
  };
14489
14343
  const _sfc_main$1$2 = /* @__PURE__ */ defineComponent({
14490
14344
  ...__default__$1$1,
@@ -14499,14 +14353,15 @@ const _sfc_main$1$2 = /* @__PURE__ */ defineComponent({
14499
14353
  color: {},
14500
14354
  shapeRendering: {},
14501
14355
  strokeColor: {},
14502
- strokeWidth: {}
14356
+ strokeWidth: {},
14357
+ hidden: { type: Boolean }
14503
14358
  },
14504
14359
  emits: ["click", "dblclick", "mouseenter", "mousemove", "mouseleave"],
14505
14360
  setup(__props, { emit: emits }) {
14506
14361
  const props = __props;
14507
14362
  const miniMapSlots = inject(Slots);
14508
14363
  const attrs = useAttrs();
14509
- const style2 = toRef(() => attrs.style ?? {});
14364
+ const style = toRef(() => attrs.style ?? {});
14510
14365
  function onClick(event) {
14511
14366
  emits("click", event);
14512
14367
  }
@@ -14523,26 +14378,29 @@ const _sfc_main$1$2 = /* @__PURE__ */ defineComponent({
14523
14378
  emits("mouseleave", event);
14524
14379
  }
14525
14380
  return (_ctx, _cache) => {
14526
- return unref(miniMapSlots)[`node-${props.type}`] ? (openBlock(), createBlock(resolveDynamicComponent(unref(miniMapSlots)[`node-${props.type}`]), normalizeProps(mergeProps({ key: 0 }, props)), null, 16)) : (openBlock(), createElementBlock("rect", {
14527
- key: 1,
14528
- id: _ctx.id,
14529
- class: normalizeClass(["vue-flow__minimap-node", { selected: _ctx.selected, dragging: _ctx.dragging }]),
14530
- x: _ctx.position.x,
14531
- y: _ctx.position.y,
14532
- rx: _ctx.borderRadius,
14533
- ry: _ctx.borderRadius,
14534
- width: _ctx.dimensions.width,
14535
- height: _ctx.dimensions.height,
14536
- fill: _ctx.color || style2.value.background || style2.value.backgroundColor,
14537
- stroke: _ctx.strokeColor,
14538
- "stroke-width": _ctx.strokeWidth,
14539
- "shape-rendering": _ctx.shapeRendering,
14540
- onClick,
14541
- onDblclick,
14542
- onMouseenter: onMouseEnter,
14543
- onMousemove: onMouseMove,
14544
- onMouseleave: onMouseLeave
14545
- }, null, 42, _hoisted_1$1$1));
14381
+ return !_ctx.hidden && _ctx.dimensions.width !== 0 && _ctx.dimensions.height !== 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
14382
+ unref(miniMapSlots)[`node-${props.type}`] ? (openBlock(), createBlock(resolveDynamicComponent(unref(miniMapSlots)[`node-${props.type}`]), normalizeProps(mergeProps({ key: 0 }, { ...props, ..._ctx.$attrs })), null, 16)) : (openBlock(), createElementBlock("rect", mergeProps({
14383
+ key: 1,
14384
+ id: _ctx.id
14385
+ }, _ctx.$attrs, {
14386
+ class: ["vue-flow__minimap-node", { selected: _ctx.selected, dragging: _ctx.dragging }],
14387
+ x: _ctx.position.x,
14388
+ y: _ctx.position.y,
14389
+ rx: _ctx.borderRadius,
14390
+ ry: _ctx.borderRadius,
14391
+ width: _ctx.dimensions.width,
14392
+ height: _ctx.dimensions.height,
14393
+ fill: _ctx.color || style.value.background || style.value.backgroundColor,
14394
+ stroke: _ctx.strokeColor,
14395
+ "stroke-width": _ctx.strokeWidth,
14396
+ "shape-rendering": _ctx.shapeRendering,
14397
+ onClick,
14398
+ onDblclick,
14399
+ onMouseenter: onMouseEnter,
14400
+ onMousemove: onMouseMove,
14401
+ onMouseleave: onMouseLeave
14402
+ }), null, 16, _hoisted_1$1$1))
14403
+ ], 64)) : createCommentVNode("", true);
14546
14404
  };
14547
14405
  }
14548
14406
  });
@@ -14751,12 +14609,13 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
14751
14609
  "stroke-width": _ctx.nodeStrokeWidth,
14752
14610
  "shape-rendering": unref(shapeRendering),
14753
14611
  type: node2.type,
14612
+ hidden: node2.hidden,
14754
14613
  onClick: ($event) => onNodeClick($event, node2),
14755
14614
  onDblclick: ($event) => onNodeDblClick($event, node2),
14756
14615
  onMouseenter: ($event) => onNodeMouseEnter($event, node2),
14757
14616
  onMousemove: ($event) => onNodeMouseMove($event, node2),
14758
14617
  onMouseleave: ($event) => onNodeMouseLeave($event, node2)
14759
- }, null, 8, ["id", "position", "dimensions", "selected", "dragging", "style", "class", "color", "border-radius", "stroke-color", "stroke-width", "shape-rendering", "type", "onClick", "onDblclick", "onMouseenter", "onMousemove", "onMouseleave"]);
14618
+ }, null, 8, ["id", "position", "dimensions", "selected", "dragging", "style", "class", "color", "border-radius", "stroke-color", "stroke-width", "shape-rendering", "type", "hidden", "onClick", "onDblclick", "onMouseenter", "onMousemove", "onMouseleave"]);
14760
14619
  }), 128)),
14761
14620
  createBaseVNode("path", {
14762
14621
  class: "vue-flow__minimap-mask",
@@ -18094,6 +17953,7 @@ const cssModules$2 = {
18094
17953
  const CanvasEdgeToolbar = /* @__PURE__ */ _export_sfc$1(_sfc_main$6, [["__cssModules", cssModules$2]]);
18095
17954
  const _hoisted_1$3 = ["data-source-node-name", "data-target-node-name"];
18096
17955
  const _hoisted_2$2 = ["data-source-node-name", "data-target-node-name", "data-edge-status"];
17956
+ const delayedHoveredTimeout = 300;
18097
17957
  const _sfc_main$5 = /* @__PURE__ */ defineComponent({
18098
17958
  __name: "CanvasEdge",
18099
17959
  props: {
@@ -18140,7 +18000,23 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
18140
18000
  const connectionType = computed(
18141
18001
  () => isValidNodeConnectionType(props.data.source.type) ? props.data.source.type : NodeConnectionType.Main
18142
18002
  );
18143
- const renderToolbar = computed(() => props.hovered && !props.readOnly);
18003
+ const delayedHovered = ref(props.hovered);
18004
+ const delayedHoveredSetTimeoutRef = ref(null);
18005
+ watch(
18006
+ () => props.hovered,
18007
+ (isHovered) => {
18008
+ if (isHovered) {
18009
+ if (delayedHoveredSetTimeoutRef.value) clearTimeout(delayedHoveredSetTimeoutRef.value);
18010
+ delayedHovered.value = true;
18011
+ } else {
18012
+ delayedHoveredSetTimeoutRef.value = setTimeout(() => {
18013
+ delayedHovered.value = false;
18014
+ }, delayedHoveredTimeout);
18015
+ }
18016
+ },
18017
+ { immediate: true }
18018
+ );
18019
+ const renderToolbar = computed(() => (props.selected || delayedHovered.value) && !props.readOnly);
18144
18020
  const isMainConnection = computed(() => data.value.source.type === NodeConnectionType.Main);
18145
18021
  const status2 = computed(() => props.data.status);
18146
18022
  const edgeColor = computed(() => {