@loopstack/loopstack-studio 0.25.1 → 0.26.0

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 (1691) hide show
  1. package/dist/_virtual/rolldown_runtime.js +20 -0
  2. package/dist/api/auth.js +2 -4
  3. package/dist/api/client.js +7 -9
  4. package/dist/api/config.js +2 -4
  5. package/dist/api/dashboard.js +2 -4
  6. package/dist/api/documents.js +2 -4
  7. package/dist/api/environments.js +4 -0
  8. package/dist/api/index.js +23 -21
  9. package/dist/api/processor.js +2 -4
  10. package/dist/api/secrets.js +2 -4
  11. package/dist/api/workflows.js +2 -4
  12. package/dist/api/workspaces.js +2 -4
  13. package/dist/app/EnvironmentEmbedRoot.js +41 -24
  14. package/dist/components/ai-elements/code-block.js +71 -53
  15. package/dist/components/ai-elements/message.js +82 -41
  16. package/dist/components/ai-elements/prompt-input.js +253 -162
  17. package/dist/components/ai-elements/reasoning.js +116 -78
  18. package/dist/components/ai-elements/shimmer.js +35 -23
  19. package/dist/components/ai-elements/sources.js +58 -29
  20. package/dist/components/data-table/ConfirmDialog.js +30 -14
  21. package/dist/components/data-table/DataList.js +200 -138
  22. package/dist/components/data-table/DataTable.js +236 -168
  23. package/dist/components/data-table/DataTableBatchAction.js +27 -18
  24. package/dist/components/data-table/DataTableFilters.js +78 -53
  25. package/dist/components/data-table/DataTablePagination.js +104 -72
  26. package/dist/components/data-table/DataTableToolbar.js +65 -53
  27. package/dist/components/dynamic-form/ArrayController.js +103 -85
  28. package/dist/components/dynamic-form/CodeContent.js +36 -28
  29. package/dist/components/dynamic-form/Form.js +56 -43
  30. package/dist/components/dynamic-form/FormBody.js +10 -12
  31. package/dist/components/dynamic-form/FormElement.js +41 -31
  32. package/dist/components/dynamic-form/FormElementHeader.js +20 -12
  33. package/dist/components/dynamic-form/InputController.js +38 -36
  34. package/dist/components/dynamic-form/MarkdownContent.js +74 -53
  35. package/dist/components/dynamic-form/MermaidDiagram.js +24 -22
  36. package/dist/components/dynamic-form/ObjectController.js +32 -24
  37. package/dist/components/dynamic-form/fields/BaseFieldWrapper.js +47 -35
  38. package/dist/components/dynamic-form/fields/CheckboxField.js +48 -39
  39. package/dist/components/dynamic-form/fields/CodeViewField.js +50 -42
  40. package/dist/components/dynamic-form/fields/InputField.js +90 -62
  41. package/dist/components/dynamic-form/fields/MarkdownViewField.js +19 -16
  42. package/dist/components/dynamic-form/fields/RadioField.js +62 -46
  43. package/dist/components/dynamic-form/fields/SelectField.js +58 -40
  44. package/dist/components/dynamic-form/fields/SliderField.js +100 -94
  45. package/dist/components/dynamic-form/fields/SwitchField.js +61 -42
  46. package/dist/components/dynamic-form/fields/TextareaField.js +72 -53
  47. package/dist/components/dynamic-form/fields/utils/text-validation-utils.js +2 -4
  48. package/dist/components/dynamic-form/hooks/useArrayDefaultValue.js +5 -6
  49. package/dist/components/dynamic-form/hooks/useFieldConfig.js +20 -19
  50. package/dist/components/dynamic-form/hooks/useMergeParentKey.js +2 -4
  51. package/dist/components/dynamic-form/hooks/useSortPropertyNames.js +2 -4
  52. package/dist/components/feedback/ErrorAlert.js +17 -11
  53. package/dist/components/feedback/ErrorBoundary.js +14 -16
  54. package/dist/components/feedback/ErrorSnackbar.js +30 -13
  55. package/dist/components/feedback/LoadingCentered.js +28 -15
  56. package/dist/components/feedback/Snackbar.js +44 -43
  57. package/dist/components/feedback/index.js +5 -5
  58. package/dist/components/index.js +47 -47
  59. package/dist/components/layout/MainLayout.js +25 -17
  60. package/dist/components/layout/StudioSidebar.js +203 -140
  61. package/dist/components/lists/CustomListView.js +74 -49
  62. package/dist/components/lists/ListView.js +102 -66
  63. package/dist/components/loopstack-elements/link.js +104 -65
  64. package/dist/components/loopstack-elements/tool.js +142 -70
  65. package/dist/components/messages/CompletionMessagePaper.js +85 -53
  66. package/dist/components/page/PageBreadcrumbs.js +83 -64
  67. package/dist/components/ui/DiscordLogo.js +22 -16
  68. package/dist/components/ui/GoogleLogo.js +44 -40
  69. package/dist/components/ui/accordion.js +52 -31
  70. package/dist/components/ui/alert-dialog.js +109 -59
  71. package/dist/components/ui/alert.js +36 -22
  72. package/dist/components/ui/avatar.js +35 -21
  73. package/dist/components/ui/badge.js +17 -13
  74. package/dist/components/ui/breadcrumb.js +82 -46
  75. package/dist/components/ui/button-group.js +5 -5
  76. package/dist/components/ui/button.js +21 -17
  77. package/dist/components/ui/card.js +74 -40
  78. package/dist/components/ui/checkbox.js +23 -17
  79. package/dist/components/ui/collapsible.js +25 -17
  80. package/dist/components/ui/command.js +2 -1
  81. package/dist/components/ui/context-menu.js +52 -32
  82. package/dist/components/ui/dialog.js +107 -62
  83. package/dist/components/ui/drawer.js +99 -54
  84. package/dist/components/ui/dropdown-menu.js +159 -91
  85. package/dist/components/ui/hover-card.js +2 -1
  86. package/dist/components/ui/input-group.js +56 -36
  87. package/dist/components/ui/input.js +15 -11
  88. package/dist/components/ui/label.js +15 -11
  89. package/dist/components/ui/popover.js +38 -25
  90. package/dist/components/ui/radio-group.js +33 -22
  91. package/dist/components/ui/scroll-area.js +43 -28
  92. package/dist/components/ui/select.js +134 -73
  93. package/dist/components/ui/separator.js +17 -13
  94. package/dist/components/ui/sheet.js +105 -60
  95. package/dist/components/ui/sidebar.js +451 -269
  96. package/dist/components/ui/skeleton.js +14 -10
  97. package/dist/components/ui/slider.js +41 -32
  98. package/dist/components/ui/switch.js +21 -15
  99. package/dist/components/ui/table.js +85 -46
  100. package/dist/components/ui/tabs.js +45 -26
  101. package/dist/components/ui/textarea.js +14 -10
  102. package/dist/components/ui/tooltip.js +41 -26
  103. package/dist/components/ui-widgets/UiActions.js +37 -30
  104. package/dist/components/ui-widgets/UiWidget.js +46 -34
  105. package/dist/components/ui-widgets/widgets/AiPromptInput.js +42 -28
  106. package/dist/components/ui-widgets/widgets/ButtonFullWidth.js +21 -16
  107. package/dist/components/ui-widgets/widgets/SandboxRun.js +28 -19
  108. package/dist/components/ui-widgets/widgets/SubmitButton.js +20 -15
  109. package/dist/events/api-client-events.js +2 -4
  110. package/dist/events/sse-client-events.js +2 -4
  111. package/dist/features/code-explorer/CodeExplorer.js +2 -1
  112. package/dist/features/code-explorer/components/CodeExplorerTree.js +3 -2
  113. package/dist/features/code-explorer/components/CodeExplorerTreeNode.js +29 -31
  114. package/dist/features/code-explorer/components/FileContentViewer.js +148 -108
  115. package/dist/features/code-explorer/components/FileTabsBar.js +2 -1
  116. package/dist/features/code-explorer/components/FileTabsBarBase.js +169 -134
  117. package/dist/features/code-explorer/index.js +1 -1
  118. package/dist/features/code-explorer/providers/CodeExplorerProvider.js +4 -4
  119. package/dist/features/code-explorer/utils/fileIcons.js +39 -41
  120. package/dist/features/dashboard/Dashboard.js +121 -79
  121. package/dist/features/dashboard/RunItem.js +70 -50
  122. package/dist/features/dashboard/RunList.js +28 -17
  123. package/dist/features/debug/components/ConfigFlowViewer.js +67 -49
  124. package/dist/features/debug/components/WorkflowDebugHeader.js +46 -30
  125. package/dist/features/debug/components/WorkflowDebugLegend.js +68 -56
  126. package/dist/features/debug/components/WorkflowFlowViewer.js +96 -76
  127. package/dist/features/debug/components/workflow-flow/StateNode.js +102 -73
  128. package/dist/features/debug/components/workflow-flow/WorkflowGraph.js +40 -35
  129. package/dist/features/debug/components/workflow-flow/WorkflowTransitionEdge.js +94 -61
  130. package/dist/features/debug/index.js +3 -3
  131. package/dist/features/debug/lib/edge-paths.js +31 -33
  132. package/dist/features/debug/lib/flow-utils.js +145 -147
  133. package/dist/features/documents/DocumentRenderer.js +73 -68
  134. package/dist/features/documents/components/DocumentItem.js +24 -21
  135. package/dist/features/documents/components/DocumentList.js +45 -39
  136. package/dist/features/documents/components/DocumentMetadataPills.js +59 -44
  137. package/dist/features/documents/document-details/DocumentDetails.js +413 -298
  138. package/dist/features/documents/document-details/PromptDetails.js +142 -105
  139. package/dist/features/documents/index.js +4 -4
  140. package/dist/features/documents/renderers/AiMessage.js +48 -39
  141. package/dist/features/documents/renderers/AiMessageContent.js +164 -108
  142. package/dist/features/documents/renderers/ChoicesRenderer.js +89 -77
  143. package/dist/features/documents/renderers/ClaudeMessage.js +91 -74
  144. package/dist/features/documents/renderers/ConfirmPromptRenderer.js +53 -44
  145. package/dist/features/documents/renderers/DocumentDebugRenderer.js +30 -26
  146. package/dist/features/documents/renderers/DocumentFormRenderer.js +85 -69
  147. package/dist/features/documents/renderers/DocumentMessageRenderer.js +9 -10
  148. package/dist/features/documents/renderers/ErrorMessageRenderer.js +13 -11
  149. package/dist/features/documents/renderers/LinkMessageRenderer.js +14 -15
  150. package/dist/features/documents/renderers/MarkdownMessageRenderer.js +10 -8
  151. package/dist/features/documents/renderers/PlainMessageRenderer.js +9 -7
  152. package/dist/features/documents/renderers/TextPromptRenderer.js +54 -45
  153. package/dist/features/documents/renderers/useDocumentTransition.js +33 -30
  154. package/dist/features/feature-registry/FeatureRegistryProvider.js +17 -0
  155. package/dist/features/feature-registry/index.js +1 -0
  156. package/dist/features/file-explorer/api/files.js +7 -0
  157. package/dist/features/file-explorer/components/FileExplorerPanel.js +95 -0
  158. package/dist/features/file-explorer/components/FileTabsBar.js +18 -0
  159. package/dist/features/file-explorer/components/FileTree.js +90 -0
  160. package/dist/features/file-explorer/file-explorer-feature.js +12 -0
  161. package/dist/features/file-explorer/hooks/useFileExplorer.js +44 -0
  162. package/dist/features/file-explorer/index.js +2 -0
  163. package/dist/features/file-explorer/providers/FileExplorerProvider.js +112 -0
  164. package/dist/features/health/LocalHealthCheck.js +53 -54
  165. package/dist/features/health/index.js +1 -1
  166. package/dist/features/oauth/OAuthCallbackPage.js +2 -2
  167. package/dist/features/oauth/OAuthPromptRenderer.js +235 -156
  168. package/dist/features/oauth/index.js +2 -2
  169. package/dist/features/oauth/useOAuthPopup.js +71 -52
  170. package/dist/features/runs/Runs.js +187 -145
  171. package/dist/features/secrets/components/WorkbenchSecretsPanel.js +178 -0
  172. package/dist/features/secrets/index.js +1 -0
  173. package/dist/features/secrets/renderers/SecretInputRenderer.js +87 -0
  174. package/dist/features/secrets/secrets-feature.js +14 -0
  175. package/dist/features/workbench/Workbench.js +50 -74
  176. package/dist/features/workbench/WorkflowItem.js +68 -49
  177. package/dist/features/workbench/WorkflowList.js +127 -49
  178. package/dist/features/workbench/components/NewRunDialog.js +309 -212
  179. package/dist/features/workbench/components/SidebarPanel.js +155 -0
  180. package/dist/features/workbench/components/WorkbenchEnvironmentPanel.js +82 -0
  181. package/dist/features/workbench/components/WorkbenchIconSidebar.js +137 -51
  182. package/dist/features/workbench/components/WorkbenchPreviewPanel.js +134 -123
  183. package/dist/features/workbench/components/WorkbenchRunsPanel.js +32 -0
  184. package/dist/features/workbench/components/WorkbenchSettingsModal.js +60 -49
  185. package/dist/features/workbench/components/WorkbenchSidebarShell.js +80 -0
  186. package/dist/features/workbench/components/WorkflowForms.js +23 -17
  187. package/dist/features/workbench/components/WorkflowHistoryItem.js +122 -96
  188. package/dist/features/workbench/components/WorkflowHistoryList.js +54 -31
  189. package/dist/features/workbench/components/buttons/WorkflowButtons.js +99 -70
  190. package/dist/features/workbench/hooks/useAutoScrollBottom.js +25 -21
  191. package/dist/features/workbench/hooks/useScrollToListItem.js +21 -20
  192. package/dist/features/workbench/hooks/useWorkflowData.js +44 -31
  193. package/dist/features/workbench/hooks/useWorkflowListState.js +12 -13
  194. package/dist/features/workbench/index.js +8 -7
  195. package/dist/features/workbench/providers/ScrollProvider.js +19 -15
  196. package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +75 -78
  197. package/dist/features/workspaces/Workspaces.js +226 -161
  198. package/dist/features/workspaces/components/CreateWorkspace.js +194 -137
  199. package/dist/features/workspaces/components/EnvironmentSlotSelector.js +75 -60
  200. package/dist/features/workspaces/components/ExecutionTimeline.js +185 -143
  201. package/dist/features/workspaces/components/NewWorkflowRunDialog.js +26 -18
  202. package/dist/features/workspaces/components/WorkflowRunForm.js +133 -85
  203. package/dist/features/workspaces/components/WorkspaceHomePage.js +81 -60
  204. package/dist/features/workspaces/components/workflow-form/ArgumentsView.js +69 -52
  205. package/dist/features/workspaces/components/workflow-form/HeaderSection.js +41 -27
  206. package/dist/features/workspaces/components/workflow-form/SelectionView.js +103 -64
  207. package/dist/features/workspaces/index.js +3 -3
  208. package/dist/frontend/studio/node_modules/@dagrejs/dagre/dist/dagre.esm.js +1968 -0
  209. package/dist/hooks/index.js +6 -6
  210. package/dist/hooks/query-keys.js +31 -33
  211. package/dist/hooks/use-mobile.js +11 -12
  212. package/dist/hooks/useApi.js +14 -16
  213. package/dist/hooks/useAuth.js +53 -38
  214. package/dist/hooks/useConfig.js +37 -26
  215. package/dist/hooks/useDashboard.js +15 -12
  216. package/dist/hooks/useDebounce.js +11 -12
  217. package/dist/hooks/useDocuments.js +35 -23
  218. package/dist/hooks/useEnvironmentPreviewUrl.js +13 -0
  219. package/dist/hooks/useEnvironments.js +8 -0
  220. package/dist/hooks/useFiles.js +2 -1
  221. package/dist/hooks/useProcessor.js +17 -14
  222. package/dist/hooks/useSecrets.js +64 -45
  223. package/dist/hooks/useWorkflows.js +163 -109
  224. package/dist/hooks/useWorkspaces.js +125 -83
  225. package/dist/index.d.ts +1395 -0
  226. package/dist/index.js +87 -80
  227. package/dist/lib/requireParam.js +2 -4
  228. package/dist/lib/utils.js +5 -7
  229. package/dist/loopstack-studio.css +1 -1
  230. package/dist/node_modules/@braintree/sanitize-url/dist/constants.js +4 -6
  231. package/dist/node_modules/@braintree/sanitize-url/dist/index.js +6 -8
  232. package/dist/node_modules/@chevrotain/gast/lib/src/helpers.js +17 -19
  233. package/dist/node_modules/@chevrotain/gast/lib/src/model.js +71 -73
  234. package/dist/node_modules/@chevrotain/gast/lib/src/visitor.js +13 -16
  235. package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/api.js +2 -2
  236. package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/base-regexp-visitor.js +2 -4
  237. package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/character-classes.js +34 -36
  238. package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/regexp-parser.js +110 -138
  239. package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/utils.js +11 -13
  240. package/dist/node_modules/@chevrotain/utils/lib/src/print.js +3 -5
  241. package/dist/node_modules/@chevrotain/utils/lib/src/timer.js +2 -4
  242. package/dist/node_modules/@chevrotain/utils/lib/src/to-fast-properties.js +2 -4
  243. package/dist/node_modules/@iconify/utils/lib/customisations/defaults.js +6 -8
  244. package/dist/node_modules/@iconify/utils/lib/icon/defaults.js +8 -10
  245. package/dist/node_modules/@iconify/utils/lib/icon/merge.js +6 -8
  246. package/dist/node_modules/@iconify/utils/lib/icon/name.js +6 -8
  247. package/dist/node_modules/@iconify/utils/lib/icon/transformations.js +2 -4
  248. package/dist/node_modules/@iconify/utils/lib/icon-set/get-icon.js +10 -12
  249. package/dist/node_modules/@iconify/utils/lib/icon-set/tree.js +2 -4
  250. package/dist/node_modules/@iconify/utils/lib/svg/build.js +18 -20
  251. package/dist/node_modules/@iconify/utils/lib/svg/defs.js +6 -8
  252. package/dist/node_modules/@iconify/utils/lib/svg/html.js +2 -4
  253. package/dist/node_modules/@iconify/utils/lib/svg/id.js +8 -10
  254. package/dist/node_modules/@iconify/utils/lib/svg/size.js +5 -7
  255. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/architecture-YZFGNWBL.js +2 -2
  256. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-2KRD3SAO.js +17 -20
  257. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-67CJDMHE.js +17 -20
  258. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-7N4EOEYR.js +23 -28
  259. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-AA7GKIK3.js +21 -26
  260. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-CIAEETIT.js +17 -20
  261. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FOC6F5B3.js +17 -20
  262. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-K5T4RW27.js +425 -436
  263. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-KGLVRYIC.js +17 -20
  264. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-LIHQZDEY.js +38 -45
  265. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-ORNJ4GCN.js +22 -27
  266. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/gitGraph-7Q5UKJZL.js +2 -2
  267. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-OMHHGYJF.js +2 -2
  268. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-4T2RLAQJ.js +2 -2
  269. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-ZZUOXDRM.js +2 -2
  270. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-PYXPWWZC.js +2 -2
  271. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treeView-SZITEDCU.js +2 -2
  272. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-W4RFUUIX.js +2 -2
  273. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/wardley-RL74JXVD.js +2 -2
  274. package/dist/node_modules/@mermaid-js/parser/dist/mermaid-parser.core.js +52 -56
  275. package/dist/node_modules/@shikijs/core/dist/index.js +575 -577
  276. package/dist/node_modules/@shikijs/engine-oniguruma/dist/index.js +157 -159
  277. package/dist/node_modules/@shikijs/engine-oniguruma/dist/wasm-inlined.js +2 -4
  278. package/dist/node_modules/@shikijs/langs/dist/abap.js +2 -3
  279. package/dist/node_modules/@shikijs/langs/dist/actionscript-3.js +2 -3
  280. package/dist/node_modules/@shikijs/langs/dist/ada.js +2 -3
  281. package/dist/node_modules/@shikijs/langs/dist/angular-expression.js +2 -3
  282. package/dist/node_modules/@shikijs/langs/dist/angular-html.js +13 -15
  283. package/dist/node_modules/@shikijs/langs/dist/angular-inline-style.js +3 -5
  284. package/dist/node_modules/@shikijs/langs/dist/angular-inline-template.js +7 -9
  285. package/dist/node_modules/@shikijs/langs/dist/angular-let-declaration.js +3 -5
  286. package/dist/node_modules/@shikijs/langs/dist/angular-template-blocks.js +7 -9
  287. package/dist/node_modules/@shikijs/langs/dist/angular-template.js +3 -5
  288. package/dist/node_modules/@shikijs/langs/dist/angular-ts.js +15 -17
  289. package/dist/node_modules/@shikijs/langs/dist/apache.js +2 -3
  290. package/dist/node_modules/@shikijs/langs/dist/apex.js +2 -3
  291. package/dist/node_modules/@shikijs/langs/dist/apl.js +13 -15
  292. package/dist/node_modules/@shikijs/langs/dist/applescript.js +2 -3
  293. package/dist/node_modules/@shikijs/langs/dist/ara.js +2 -3
  294. package/dist/node_modules/@shikijs/langs/dist/asciidoc.js +2 -3
  295. package/dist/node_modules/@shikijs/langs/dist/asm.js +2 -3
  296. package/dist/node_modules/@shikijs/langs/dist/astro.js +15 -17
  297. package/dist/node_modules/@shikijs/langs/dist/awk.js +2 -3
  298. package/dist/node_modules/@shikijs/langs/dist/ballerina.js +2 -3
  299. package/dist/node_modules/@shikijs/langs/dist/bat.js +2 -3
  300. package/dist/node_modules/@shikijs/langs/dist/beancount.js +2 -3
  301. package/dist/node_modules/@shikijs/langs/dist/berry.js +2 -3
  302. package/dist/node_modules/@shikijs/langs/dist/bibtex.js +2 -3
  303. package/dist/node_modules/@shikijs/langs/dist/bicep.js +2 -3
  304. package/dist/node_modules/@shikijs/langs/dist/bird2.js +2 -3
  305. package/dist/node_modules/@shikijs/langs/dist/blade.js +17 -19
  306. package/dist/node_modules/@shikijs/langs/dist/bsl.js +3 -5
  307. package/dist/node_modules/@shikijs/langs/dist/c.js +2 -3
  308. package/dist/node_modules/@shikijs/langs/dist/c3.js +2 -3
  309. package/dist/node_modules/@shikijs/langs/dist/cadence.js +2 -3
  310. package/dist/node_modules/@shikijs/langs/dist/cairo.js +3 -5
  311. package/dist/node_modules/@shikijs/langs/dist/clarity.js +2 -3
  312. package/dist/node_modules/@shikijs/langs/dist/clojure.js +2 -3
  313. package/dist/node_modules/@shikijs/langs/dist/cmake.js +2 -3
  314. package/dist/node_modules/@shikijs/langs/dist/cobol.js +7 -9
  315. package/dist/node_modules/@shikijs/langs/dist/codeowners.js +2 -3
  316. package/dist/node_modules/@shikijs/langs/dist/codeql.js +2 -3
  317. package/dist/node_modules/@shikijs/langs/dist/coffee.js +3 -5
  318. package/dist/node_modules/@shikijs/langs/dist/common-lisp.js +2 -3
  319. package/dist/node_modules/@shikijs/langs/dist/coq.js +2 -3
  320. package/dist/node_modules/@shikijs/langs/dist/cpp-macro.js +9 -11
  321. package/dist/node_modules/@shikijs/langs/dist/cpp.js +11 -13
  322. package/dist/node_modules/@shikijs/langs/dist/crystal.js +15 -17
  323. package/dist/node_modules/@shikijs/langs/dist/csharp.js +2 -3
  324. package/dist/node_modules/@shikijs/langs/dist/css.js +2 -3
  325. package/dist/node_modules/@shikijs/langs/dist/csv.js +2 -3
  326. package/dist/node_modules/@shikijs/langs/dist/cue.js +2 -3
  327. package/dist/node_modules/@shikijs/langs/dist/cypher.js +2 -3
  328. package/dist/node_modules/@shikijs/langs/dist/d.js +2 -3
  329. package/dist/node_modules/@shikijs/langs/dist/dart.js +2 -3
  330. package/dist/node_modules/@shikijs/langs/dist/dax.js +2 -3
  331. package/dist/node_modules/@shikijs/langs/dist/desktop.js +2 -3
  332. package/dist/node_modules/@shikijs/langs/dist/diff.js +2 -3
  333. package/dist/node_modules/@shikijs/langs/dist/docker.js +2 -3
  334. package/dist/node_modules/@shikijs/langs/dist/dotenv.js +2 -3
  335. package/dist/node_modules/@shikijs/langs/dist/dream-maker.js +2 -3
  336. package/dist/node_modules/@shikijs/langs/dist/edge.js +9 -11
  337. package/dist/node_modules/@shikijs/langs/dist/elixir.js +3 -5
  338. package/dist/node_modules/@shikijs/langs/dist/elm.js +3 -5
  339. package/dist/node_modules/@shikijs/langs/dist/emacs-lisp.js +2 -3
  340. package/dist/node_modules/@shikijs/langs/dist/erb.js +7 -9
  341. package/dist/node_modules/@shikijs/langs/dist/erlang.js +3 -5
  342. package/dist/node_modules/@shikijs/langs/dist/es-tag-css.js +9 -11
  343. package/dist/node_modules/@shikijs/langs/dist/es-tag-glsl.js +9 -11
  344. package/dist/node_modules/@shikijs/langs/dist/es-tag-html.js +9 -11
  345. package/dist/node_modules/@shikijs/langs/dist/es-tag-sql.js +7 -9
  346. package/dist/node_modules/@shikijs/langs/dist/es-tag-xml.js +3 -5
  347. package/dist/node_modules/@shikijs/langs/dist/fennel.js +2 -3
  348. package/dist/node_modules/@shikijs/langs/dist/fish.js +2 -3
  349. package/dist/node_modules/@shikijs/langs/dist/fluent.js +2 -3
  350. package/dist/node_modules/@shikijs/langs/dist/fortran-fixed-form.js +3 -5
  351. package/dist/node_modules/@shikijs/langs/dist/fortran-free-form.js +2 -3
  352. package/dist/node_modules/@shikijs/langs/dist/fsharp.js +3 -5
  353. package/dist/node_modules/@shikijs/langs/dist/gdresource.js +7 -9
  354. package/dist/node_modules/@shikijs/langs/dist/gdscript.js +2 -3
  355. package/dist/node_modules/@shikijs/langs/dist/gdshader.js +2 -3
  356. package/dist/node_modules/@shikijs/langs/dist/genie.js +2 -3
  357. package/dist/node_modules/@shikijs/langs/dist/gherkin.js +2 -3
  358. package/dist/node_modules/@shikijs/langs/dist/git-commit.js +3 -5
  359. package/dist/node_modules/@shikijs/langs/dist/git-rebase.js +3 -5
  360. package/dist/node_modules/@shikijs/langs/dist/gleam.js +2 -3
  361. package/dist/node_modules/@shikijs/langs/dist/glimmer-js.js +11 -13
  362. package/dist/node_modules/@shikijs/langs/dist/glimmer-ts.js +11 -13
  363. package/dist/node_modules/@shikijs/langs/dist/glsl.js +3 -5
  364. package/dist/node_modules/@shikijs/langs/dist/gn.js +2 -3
  365. package/dist/node_modules/@shikijs/langs/dist/gnuplot.js +2 -3
  366. package/dist/node_modules/@shikijs/langs/dist/go.js +2 -3
  367. package/dist/node_modules/@shikijs/langs/dist/graphql.js +11 -13
  368. package/dist/node_modules/@shikijs/langs/dist/groovy.js +2 -3
  369. package/dist/node_modules/@shikijs/langs/dist/hack.js +7 -9
  370. package/dist/node_modules/@shikijs/langs/dist/haml.js +7 -9
  371. package/dist/node_modules/@shikijs/langs/dist/handlebars.js +11 -13
  372. package/dist/node_modules/@shikijs/langs/dist/haskell.js +2 -3
  373. package/dist/node_modules/@shikijs/langs/dist/haxe.js +2 -3
  374. package/dist/node_modules/@shikijs/langs/dist/hcl.js +2 -3
  375. package/dist/node_modules/@shikijs/langs/dist/hjson.js +2 -3
  376. package/dist/node_modules/@shikijs/langs/dist/hlsl.js +2 -3
  377. package/dist/node_modules/@shikijs/langs/dist/html-derivative.js +3 -5
  378. package/dist/node_modules/@shikijs/langs/dist/html.js +7 -9
  379. package/dist/node_modules/@shikijs/langs/dist/http.js +11 -13
  380. package/dist/node_modules/@shikijs/langs/dist/hurl.js +9 -11
  381. package/dist/node_modules/@shikijs/langs/dist/hxml.js +3 -5
  382. package/dist/node_modules/@shikijs/langs/dist/hy.js +2 -3
  383. package/dist/node_modules/@shikijs/langs/dist/imba.js +2 -3
  384. package/dist/node_modules/@shikijs/langs/dist/ini.js +2 -3
  385. package/dist/node_modules/@shikijs/langs/dist/java.js +2 -3
  386. package/dist/node_modules/@shikijs/langs/dist/javascript.js +2 -3
  387. package/dist/node_modules/@shikijs/langs/dist/jinja-html.js +3 -5
  388. package/dist/node_modules/@shikijs/langs/dist/jinja.js +3 -5
  389. package/dist/node_modules/@shikijs/langs/dist/jison.js +3 -5
  390. package/dist/node_modules/@shikijs/langs/dist/json.js +2 -3
  391. package/dist/node_modules/@shikijs/langs/dist/json5.js +2 -3
  392. package/dist/node_modules/@shikijs/langs/dist/jsonc.js +2 -3
  393. package/dist/node_modules/@shikijs/langs/dist/jsonl.js +2 -3
  394. package/dist/node_modules/@shikijs/langs/dist/jsonnet.js +2 -3
  395. package/dist/node_modules/@shikijs/langs/dist/jssm.js +2 -3
  396. package/dist/node_modules/@shikijs/langs/dist/jsx.js +2 -3
  397. package/dist/node_modules/@shikijs/langs/dist/julia.js +13 -15
  398. package/dist/node_modules/@shikijs/langs/dist/just.js +15 -17
  399. package/dist/node_modules/@shikijs/langs/dist/kdl.js +2 -3
  400. package/dist/node_modules/@shikijs/langs/dist/kotlin.js +2 -3
  401. package/dist/node_modules/@shikijs/langs/dist/kusto.js +2 -3
  402. package/dist/node_modules/@shikijs/langs/dist/latex.js +3 -5
  403. package/dist/node_modules/@shikijs/langs/dist/lean.js +2 -3
  404. package/dist/node_modules/@shikijs/langs/dist/less.js +2 -3
  405. package/dist/node_modules/@shikijs/langs/dist/liquid.js +11 -13
  406. package/dist/node_modules/@shikijs/langs/dist/llvm.js +2 -3
  407. package/dist/node_modules/@shikijs/langs/dist/log.js +2 -3
  408. package/dist/node_modules/@shikijs/langs/dist/logo.js +2 -3
  409. package/dist/node_modules/@shikijs/langs/dist/lua.js +3 -5
  410. package/dist/node_modules/@shikijs/langs/dist/luau.js +2 -3
  411. package/dist/node_modules/@shikijs/langs/dist/make.js +2 -3
  412. package/dist/node_modules/@shikijs/langs/dist/markdown-nix.js +2 -3
  413. package/dist/node_modules/@shikijs/langs/dist/markdown-vue.js +2 -3
  414. package/dist/node_modules/@shikijs/langs/dist/markdown.js +2 -3
  415. package/dist/node_modules/@shikijs/langs/dist/marko.js +11 -13
  416. package/dist/node_modules/@shikijs/langs/dist/matlab.js +2 -3
  417. package/dist/node_modules/@shikijs/langs/dist/mdc.js +9 -11
  418. package/dist/node_modules/@shikijs/langs/dist/mdx.js +2 -3
  419. package/dist/node_modules/@shikijs/langs/dist/mermaid.js +2 -3
  420. package/dist/node_modules/@shikijs/langs/dist/mipsasm.js +2 -3
  421. package/dist/node_modules/@shikijs/langs/dist/mojo.js +2 -3
  422. package/dist/node_modules/@shikijs/langs/dist/moonbit.js +2 -3
  423. package/dist/node_modules/@shikijs/langs/dist/move.js +2 -3
  424. package/dist/node_modules/@shikijs/langs/dist/narrat.js +2 -3
  425. package/dist/node_modules/@shikijs/langs/dist/nextflow-groovy.js +2 -3
  426. package/dist/node_modules/@shikijs/langs/dist/nextflow.js +3 -5
  427. package/dist/node_modules/@shikijs/langs/dist/nginx.js +3 -5
  428. package/dist/node_modules/@shikijs/langs/dist/nim.js +17 -19
  429. package/dist/node_modules/@shikijs/langs/dist/nix.js +3 -5
  430. package/dist/node_modules/@shikijs/langs/dist/nushell.js +2 -3
  431. package/dist/node_modules/@shikijs/langs/dist/objective-c.js +2 -3
  432. package/dist/node_modules/@shikijs/langs/dist/objective-cpp.js +2 -3
  433. package/dist/node_modules/@shikijs/langs/dist/ocaml.js +2 -3
  434. package/dist/node_modules/@shikijs/langs/dist/odin.js +2 -3
  435. package/dist/node_modules/@shikijs/langs/dist/openscad.js +2 -3
  436. package/dist/node_modules/@shikijs/langs/dist/pascal.js +2 -3
  437. package/dist/node_modules/@shikijs/langs/dist/perl.js +13 -15
  438. package/dist/node_modules/@shikijs/langs/dist/php.js +15 -17
  439. package/dist/node_modules/@shikijs/langs/dist/pkl.js +2 -3
  440. package/dist/node_modules/@shikijs/langs/dist/plsql.js +2 -3
  441. package/dist/node_modules/@shikijs/langs/dist/po.js +2 -3
  442. package/dist/node_modules/@shikijs/langs/dist/polar.js +2 -3
  443. package/dist/node_modules/@shikijs/langs/dist/postcss.js +2 -3
  444. package/dist/node_modules/@shikijs/langs/dist/powerquery.js +2 -3
  445. package/dist/node_modules/@shikijs/langs/dist/powershell.js +2 -3
  446. package/dist/node_modules/@shikijs/langs/dist/prisma.js +2 -3
  447. package/dist/node_modules/@shikijs/langs/dist/prolog.js +2 -3
  448. package/dist/node_modules/@shikijs/langs/dist/proto.js +2 -3
  449. package/dist/node_modules/@shikijs/langs/dist/pug.js +9 -11
  450. package/dist/node_modules/@shikijs/langs/dist/puppet.js +2 -3
  451. package/dist/node_modules/@shikijs/langs/dist/purescript.js +2 -3
  452. package/dist/node_modules/@shikijs/langs/dist/python.js +2 -3
  453. package/dist/node_modules/@shikijs/langs/dist/qml.js +3 -5
  454. package/dist/node_modules/@shikijs/langs/dist/qmldir.js +2 -3
  455. package/dist/node_modules/@shikijs/langs/dist/qss.js +2 -3
  456. package/dist/node_modules/@shikijs/langs/dist/r.js +2 -3
  457. package/dist/node_modules/@shikijs/langs/dist/racket.js +2 -3
  458. package/dist/node_modules/@shikijs/langs/dist/raku.js +2 -3
  459. package/dist/node_modules/@shikijs/langs/dist/razor.js +7 -9
  460. package/dist/node_modules/@shikijs/langs/dist/reg.js +2 -3
  461. package/dist/node_modules/@shikijs/langs/dist/regexp.js +2 -3
  462. package/dist/node_modules/@shikijs/langs/dist/rel.js +2 -3
  463. package/dist/node_modules/@shikijs/langs/dist/riscv.js +2 -3
  464. package/dist/node_modules/@shikijs/langs/dist/ron.js +2 -3
  465. package/dist/node_modules/@shikijs/langs/dist/rosmsg.js +2 -3
  466. package/dist/node_modules/@shikijs/langs/dist/rst.js +19 -21
  467. package/dist/node_modules/@shikijs/langs/dist/ruby.js +27 -29
  468. package/dist/node_modules/@shikijs/langs/dist/rust.js +2 -3
  469. package/dist/node_modules/@shikijs/langs/dist/sas.js +3 -5
  470. package/dist/node_modules/@shikijs/langs/dist/sass.js +2 -3
  471. package/dist/node_modules/@shikijs/langs/dist/scala.js +2 -3
  472. package/dist/node_modules/@shikijs/langs/dist/scheme.js +2 -3
  473. package/dist/node_modules/@shikijs/langs/dist/scss.js +3 -5
  474. package/dist/node_modules/@shikijs/langs/dist/sdbl.js +2 -3
  475. package/dist/node_modules/@shikijs/langs/dist/shaderlab.js +3 -5
  476. package/dist/node_modules/@shikijs/langs/dist/shellscript.js +2 -3
  477. package/dist/node_modules/@shikijs/langs/dist/shellsession.js +3 -5
  478. package/dist/node_modules/@shikijs/langs/dist/smalltalk.js +2 -3
  479. package/dist/node_modules/@shikijs/langs/dist/solidity.js +2 -3
  480. package/dist/node_modules/@shikijs/langs/dist/soy.js +3 -5
  481. package/dist/node_modules/@shikijs/langs/dist/sparql.js +3 -5
  482. package/dist/node_modules/@shikijs/langs/dist/splunk.js +2 -3
  483. package/dist/node_modules/@shikijs/langs/dist/sql.js +2 -3
  484. package/dist/node_modules/@shikijs/langs/dist/ssh-config.js +2 -3
  485. package/dist/node_modules/@shikijs/langs/dist/stata.js +3 -5
  486. package/dist/node_modules/@shikijs/langs/dist/stylus.js +2 -3
  487. package/dist/node_modules/@shikijs/langs/dist/surrealql.js +3 -5
  488. package/dist/node_modules/@shikijs/langs/dist/svelte.js +11 -13
  489. package/dist/node_modules/@shikijs/langs/dist/swift.js +2 -3
  490. package/dist/node_modules/@shikijs/langs/dist/system-verilog.js +2 -3
  491. package/dist/node_modules/@shikijs/langs/dist/systemd.js +2 -3
  492. package/dist/node_modules/@shikijs/langs/dist/talonscript.js +2 -3
  493. package/dist/node_modules/@shikijs/langs/dist/tasl.js +2 -3
  494. package/dist/node_modules/@shikijs/langs/dist/tcl.js +2 -3
  495. package/dist/node_modules/@shikijs/langs/dist/templ.js +9 -11
  496. package/dist/node_modules/@shikijs/langs/dist/terraform.js +2 -3
  497. package/dist/node_modules/@shikijs/langs/dist/tex.js +3 -5
  498. package/dist/node_modules/@shikijs/langs/dist/toml.js +2 -3
  499. package/dist/node_modules/@shikijs/langs/dist/ts-tags.js +15 -17
  500. package/dist/node_modules/@shikijs/langs/dist/tsv.js +2 -3
  501. package/dist/node_modules/@shikijs/langs/dist/tsx.js +2 -3
  502. package/dist/node_modules/@shikijs/langs/dist/turtle.js +2 -3
  503. package/dist/node_modules/@shikijs/langs/dist/twig.js +15 -17
  504. package/dist/node_modules/@shikijs/langs/dist/typescript.js +2 -3
  505. package/dist/node_modules/@shikijs/langs/dist/typespec.js +2 -3
  506. package/dist/node_modules/@shikijs/langs/dist/typst.js +2 -3
  507. package/dist/node_modules/@shikijs/langs/dist/v.js +2 -3
  508. package/dist/node_modules/@shikijs/langs/dist/vala.js +2 -3
  509. package/dist/node_modules/@shikijs/langs/dist/vb.js +2 -3
  510. package/dist/node_modules/@shikijs/langs/dist/verilog.js +2 -3
  511. package/dist/node_modules/@shikijs/langs/dist/vhdl.js +2 -3
  512. package/dist/node_modules/@shikijs/langs/dist/viml.js +2 -3
  513. package/dist/node_modules/@shikijs/langs/dist/vue-directives.js +2 -3
  514. package/dist/node_modules/@shikijs/langs/dist/vue-html.js +3 -5
  515. package/dist/node_modules/@shikijs/langs/dist/vue-interpolations.js +2 -3
  516. package/dist/node_modules/@shikijs/langs/dist/vue-sfc-style-variable-injection.js +3 -5
  517. package/dist/node_modules/@shikijs/langs/dist/vue-vine.js +15 -17
  518. package/dist/node_modules/@shikijs/langs/dist/vue.js +23 -25
  519. package/dist/node_modules/@shikijs/langs/dist/vyper.js +2 -3
  520. package/dist/node_modules/@shikijs/langs/dist/wasm.js +2 -3
  521. package/dist/node_modules/@shikijs/langs/dist/wenyan.js +2 -3
  522. package/dist/node_modules/@shikijs/langs/dist/wgsl.js +2 -3
  523. package/dist/node_modules/@shikijs/langs/dist/wikitext.js +2 -3
  524. package/dist/node_modules/@shikijs/langs/dist/wit.js +2 -3
  525. package/dist/node_modules/@shikijs/langs/dist/wolfram.js +2 -3
  526. package/dist/node_modules/@shikijs/langs/dist/xml.js +3 -5
  527. package/dist/node_modules/@shikijs/langs/dist/xsl.js +3 -5
  528. package/dist/node_modules/@shikijs/langs/dist/yaml.js +2 -3
  529. package/dist/node_modules/@shikijs/langs/dist/zenscript.js +2 -3
  530. package/dist/node_modules/@shikijs/langs/dist/zig.js +2 -3
  531. package/dist/node_modules/@shikijs/primitive/dist/index.js +319 -321
  532. package/dist/node_modules/@shikijs/themes/dist/andromeeda.js +2 -4
  533. package/dist/node_modules/@shikijs/themes/dist/aurora-x.js +2 -4
  534. package/dist/node_modules/@shikijs/themes/dist/ayu-dark.js +2 -4
  535. package/dist/node_modules/@shikijs/themes/dist/ayu-light.js +2 -4
  536. package/dist/node_modules/@shikijs/themes/dist/ayu-mirage.js +2 -4
  537. package/dist/node_modules/@shikijs/themes/dist/catppuccin-frappe.js +2 -4
  538. package/dist/node_modules/@shikijs/themes/dist/catppuccin-latte.js +2 -4
  539. package/dist/node_modules/@shikijs/themes/dist/catppuccin-macchiato.js +2 -4
  540. package/dist/node_modules/@shikijs/themes/dist/catppuccin-mocha.js +2 -4
  541. package/dist/node_modules/@shikijs/themes/dist/dark-plus.js +2 -4
  542. package/dist/node_modules/@shikijs/themes/dist/dracula-soft.js +2 -4
  543. package/dist/node_modules/@shikijs/themes/dist/dracula.js +2 -4
  544. package/dist/node_modules/@shikijs/themes/dist/everforest-dark.js +2 -4
  545. package/dist/node_modules/@shikijs/themes/dist/everforest-light.js +2 -4
  546. package/dist/node_modules/@shikijs/themes/dist/github-dark-default.js +2 -4
  547. package/dist/node_modules/@shikijs/themes/dist/github-dark-dimmed.js +2 -4
  548. package/dist/node_modules/@shikijs/themes/dist/github-dark-high-contrast.js +2 -4
  549. package/dist/node_modules/@shikijs/themes/dist/github-dark.js +2 -4
  550. package/dist/node_modules/@shikijs/themes/dist/github-light-default.js +2 -4
  551. package/dist/node_modules/@shikijs/themes/dist/github-light-high-contrast.js +2 -4
  552. package/dist/node_modules/@shikijs/themes/dist/github-light.js +2 -4
  553. package/dist/node_modules/@shikijs/themes/dist/gruvbox-dark-hard.js +2 -4
  554. package/dist/node_modules/@shikijs/themes/dist/gruvbox-dark-medium.js +2 -4
  555. package/dist/node_modules/@shikijs/themes/dist/gruvbox-dark-soft.js +2 -4
  556. package/dist/node_modules/@shikijs/themes/dist/gruvbox-light-hard.js +2 -4
  557. package/dist/node_modules/@shikijs/themes/dist/gruvbox-light-medium.js +2 -4
  558. package/dist/node_modules/@shikijs/themes/dist/gruvbox-light-soft.js +2 -4
  559. package/dist/node_modules/@shikijs/themes/dist/horizon-bright.js +2 -4
  560. package/dist/node_modules/@shikijs/themes/dist/horizon.js +2 -4
  561. package/dist/node_modules/@shikijs/themes/dist/houston.js +2 -4
  562. package/dist/node_modules/@shikijs/themes/dist/kanagawa-dragon.js +2 -4
  563. package/dist/node_modules/@shikijs/themes/dist/kanagawa-lotus.js +2 -4
  564. package/dist/node_modules/@shikijs/themes/dist/kanagawa-wave.js +2 -4
  565. package/dist/node_modules/@shikijs/themes/dist/laserwave.js +2 -4
  566. package/dist/node_modules/@shikijs/themes/dist/light-plus.js +2 -4
  567. package/dist/node_modules/@shikijs/themes/dist/material-theme-darker.js +2 -4
  568. package/dist/node_modules/@shikijs/themes/dist/material-theme-lighter.js +2 -4
  569. package/dist/node_modules/@shikijs/themes/dist/material-theme-ocean.js +2 -4
  570. package/dist/node_modules/@shikijs/themes/dist/material-theme-palenight.js +2 -4
  571. package/dist/node_modules/@shikijs/themes/dist/material-theme.js +2 -4
  572. package/dist/node_modules/@shikijs/themes/dist/min-dark.js +2 -4
  573. package/dist/node_modules/@shikijs/themes/dist/min-light.js +2 -4
  574. package/dist/node_modules/@shikijs/themes/dist/monokai.js +2 -4
  575. package/dist/node_modules/@shikijs/themes/dist/night-owl-light.js +2 -4
  576. package/dist/node_modules/@shikijs/themes/dist/night-owl.js +2 -4
  577. package/dist/node_modules/@shikijs/themes/dist/nord.js +2 -4
  578. package/dist/node_modules/@shikijs/themes/dist/one-dark-pro.js +2 -4
  579. package/dist/node_modules/@shikijs/themes/dist/one-light.js +2 -4
  580. package/dist/node_modules/@shikijs/themes/dist/plastic.js +2 -4
  581. package/dist/node_modules/@shikijs/themes/dist/poimandres.js +2 -4
  582. package/dist/node_modules/@shikijs/themes/dist/red.js +2 -4
  583. package/dist/node_modules/@shikijs/themes/dist/rose-pine-dawn.js +2 -4
  584. package/dist/node_modules/@shikijs/themes/dist/rose-pine-moon.js +2 -4
  585. package/dist/node_modules/@shikijs/themes/dist/rose-pine.js +2 -4
  586. package/dist/node_modules/@shikijs/themes/dist/slack-dark.js +2 -4
  587. package/dist/node_modules/@shikijs/themes/dist/slack-ochin.js +2 -4
  588. package/dist/node_modules/@shikijs/themes/dist/snazzy-light.js +2 -4
  589. package/dist/node_modules/@shikijs/themes/dist/solarized-dark.js +2 -4
  590. package/dist/node_modules/@shikijs/themes/dist/solarized-light.js +2 -4
  591. package/dist/node_modules/@shikijs/themes/dist/synthwave-84.js +2 -4
  592. package/dist/node_modules/@shikijs/themes/dist/tokyo-night.js +2 -4
  593. package/dist/node_modules/@shikijs/themes/dist/vesper.js +2 -4
  594. package/dist/node_modules/@shikijs/themes/dist/vitesse-black.js +2 -4
  595. package/dist/node_modules/@shikijs/themes/dist/vitesse-dark.js +2 -4
  596. package/dist/node_modules/@shikijs/themes/dist/vitesse-light.js +2 -4
  597. package/dist/node_modules/@shikijs/types/dist/index.js +2 -4
  598. package/dist/node_modules/@shikijs/vscode-textmate/dist/index.js +947 -949
  599. package/dist/node_modules/@ungap/structured-clone/esm/deserialize.js +30 -30
  600. package/dist/node_modules/@ungap/structured-clone/esm/index.js +4 -6
  601. package/dist/node_modules/@ungap/structured-clone/esm/serialize.js +64 -64
  602. package/dist/node_modules/@ungap/structured-clone/esm/types.js +2 -0
  603. package/dist/node_modules/@upsetjs/venn.js/build/venn.esm.js +693 -695
  604. package/dist/node_modules/@xyflow/react/dist/esm/index.js +881 -883
  605. package/dist/node_modules/@xyflow/system/dist/esm/index.js +1221 -1223
  606. package/dist/node_modules/bail/index.js +2 -4
  607. package/dist/node_modules/ccount/index.js +2 -4
  608. package/dist/node_modules/character-entities-html4/index.js +2 -4
  609. package/dist/node_modules/character-entities-legacy/index.js +2 -4
  610. package/dist/node_modules/chevrotain/lib/src/api.js +10 -10
  611. package/dist/node_modules/chevrotain/lib/src/lang/lang_extensions.js +4 -6
  612. package/dist/node_modules/chevrotain/lib/src/parse/constants.js +2 -4
  613. package/dist/node_modules/chevrotain/lib/src/parse/cst/cst.js +9 -11
  614. package/dist/node_modules/chevrotain/lib/src/parse/cst/cst_visitor.js +15 -17
  615. package/dist/node_modules/chevrotain/lib/src/parse/errors_public.js +17 -19
  616. package/dist/node_modules/chevrotain/lib/src/parse/exceptions_public.js +24 -26
  617. package/dist/node_modules/chevrotain/lib/src/parse/grammar/checks.js +201 -203
  618. package/dist/node_modules/chevrotain/lib/src/parse/grammar/first.js +16 -18
  619. package/dist/node_modules/chevrotain/lib/src/parse/grammar/follow.js +17 -19
  620. package/dist/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_resolver_public.js +12 -14
  621. package/dist/node_modules/chevrotain/lib/src/parse/grammar/interpreter.js +140 -142
  622. package/dist/node_modules/chevrotain/lib/src/parse/grammar/keys.js +4 -5
  623. package/dist/node_modules/chevrotain/lib/src/parse/grammar/llk_lookahead.js +25 -27
  624. package/dist/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js +149 -151
  625. package/dist/node_modules/chevrotain/lib/src/parse/grammar/resolver.js +14 -16
  626. package/dist/node_modules/chevrotain/lib/src/parse/grammar/rest.js +38 -40
  627. package/dist/node_modules/chevrotain/lib/src/parse/parser/parser.js +64 -65
  628. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/error_handler.js +11 -13
  629. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/gast_recorder.js +101 -103
  630. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/lexer_adapter.js +5 -7
  631. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/looksahead.js +45 -47
  632. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/perf_tracer.js +6 -8
  633. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_api.js +73 -75
  634. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_engine.js +180 -182
  635. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recoverable.js +23 -24
  636. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/tree_builder.js +26 -28
  637. package/dist/node_modules/chevrotain/lib/src/parse/parser/utils/apply_mixins.js +2 -4
  638. package/dist/node_modules/chevrotain/lib/src/scan/lexer.js +246 -246
  639. package/dist/node_modules/chevrotain/lib/src/scan/lexer_errors_public.js +2 -4
  640. package/dist/node_modules/chevrotain/lib/src/scan/lexer_public.js +31 -33
  641. package/dist/node_modules/chevrotain/lib/src/scan/reg_exp.js +64 -67
  642. package/dist/node_modules/chevrotain/lib/src/scan/reg_exp_parser.js +10 -12
  643. package/dist/node_modules/chevrotain/lib/src/scan/tokens.js +35 -36
  644. package/dist/node_modules/chevrotain/lib/src/scan/tokens_public.js +26 -28
  645. package/dist/node_modules/chevrotain-allstar/lib/all-star-lookahead.js +240 -242
  646. package/dist/node_modules/chevrotain-allstar/lib/atn.js +133 -134
  647. package/dist/node_modules/chevrotain-allstar/lib/dfa.js +10 -11
  648. package/dist/node_modules/chevrotain-allstar/lib/index.js +1 -1
  649. package/dist/node_modules/classcat/index.js +3 -5
  650. package/dist/node_modules/comma-separated-tokens/index.js +3 -5
  651. package/dist/node_modules/cose-base/cose-base.js +21 -21
  652. package/dist/node_modules/cytoscape/dist/cytoscape.esm.js +7940 -7937
  653. package/dist/node_modules/cytoscape-cose-bilkent/cytoscape-cose-bilkent.js +6 -8
  654. package/dist/node_modules/cytoscape-fcose/cytoscape-fcose.js +6 -8
  655. package/dist/node_modules/cytoscape-fcose/node_modules/cose-base/cose-base.js +20 -20
  656. package/dist/node_modules/cytoscape-fcose/node_modules/layout-base/layout-base.js +4 -6
  657. package/dist/node_modules/d3/src/index.js +95 -95
  658. package/dist/node_modules/d3-array/src/ascending.js +2 -4
  659. package/dist/node_modules/d3-array/src/bisect.js +8 -8
  660. package/dist/node_modules/d3-array/src/bisector.js +6 -8
  661. package/dist/node_modules/d3-array/src/descending.js +2 -4
  662. package/dist/node_modules/d3-array/src/max.js +2 -4
  663. package/dist/node_modules/d3-array/src/min.js +2 -4
  664. package/dist/node_modules/d3-array/src/number.js +2 -4
  665. package/dist/node_modules/d3-array/src/range.js +2 -4
  666. package/dist/node_modules/d3-array/src/ticks.js +11 -13
  667. package/dist/node_modules/d3-axis/src/axis.js +46 -48
  668. package/dist/node_modules/d3-axis/src/identity.js +2 -4
  669. package/dist/node_modules/d3-brush/src/brush.js +4 -6
  670. package/dist/node_modules/d3-color/src/color.js +84 -86
  671. package/dist/node_modules/d3-color/src/define.js +3 -5
  672. package/dist/node_modules/d3-color/src/lab.js +43 -45
  673. package/dist/node_modules/d3-color/src/math.js +2 -4
  674. package/dist/node_modules/d3-dispatch/src/dispatch.js +17 -18
  675. package/dist/node_modules/d3-drag/src/constant.js +2 -4
  676. package/dist/node_modules/d3-drag/src/drag.js +75 -77
  677. package/dist/node_modules/d3-drag/src/event.js +3 -5
  678. package/dist/node_modules/d3-drag/src/nodrag.js +9 -11
  679. package/dist/node_modules/d3-drag/src/noevent.js +4 -6
  680. package/dist/node_modules/d3-ease/src/cubic.js +2 -4
  681. package/dist/node_modules/d3-format/src/defaultLocale.js +6 -8
  682. package/dist/node_modules/d3-format/src/exponent.js +4 -6
  683. package/dist/node_modules/d3-format/src/formatDecimal.js +3 -5
  684. package/dist/node_modules/d3-format/src/formatGroup.js +2 -4
  685. package/dist/node_modules/d3-format/src/formatNumerals.js +2 -4
  686. package/dist/node_modules/d3-format/src/formatPrefixAuto.js +8 -10
  687. package/dist/node_modules/d3-format/src/formatRounded.js +4 -6
  688. package/dist/node_modules/d3-format/src/formatSpecifier.js +8 -10
  689. package/dist/node_modules/d3-format/src/formatTrim.js +2 -4
  690. package/dist/node_modules/d3-format/src/formatTypes.js +13 -15
  691. package/dist/node_modules/d3-format/src/identity.js +2 -4
  692. package/dist/node_modules/d3-format/src/locale.js +31 -33
  693. package/dist/node_modules/d3-format/src/precisionFixed.js +4 -6
  694. package/dist/node_modules/d3-format/src/precisionPrefix.js +4 -6
  695. package/dist/node_modules/d3-format/src/precisionRound.js +4 -6
  696. package/dist/node_modules/d3-hierarchy/src/accessors.js +2 -4
  697. package/dist/node_modules/d3-hierarchy/src/constant.js +3 -5
  698. package/dist/node_modules/d3-hierarchy/src/hierarchy/ancestors.js +2 -4
  699. package/dist/node_modules/d3-hierarchy/src/hierarchy/count.js +4 -6
  700. package/dist/node_modules/d3-hierarchy/src/hierarchy/descendants.js +2 -4
  701. package/dist/node_modules/d3-hierarchy/src/hierarchy/each.js +2 -4
  702. package/dist/node_modules/d3-hierarchy/src/hierarchy/eachAfter.js +2 -4
  703. package/dist/node_modules/d3-hierarchy/src/hierarchy/eachBefore.js +2 -4
  704. package/dist/node_modules/d3-hierarchy/src/hierarchy/find.js +2 -4
  705. package/dist/node_modules/d3-hierarchy/src/hierarchy/index.js +44 -46
  706. package/dist/node_modules/d3-hierarchy/src/hierarchy/iterator.js +2 -4
  707. package/dist/node_modules/d3-hierarchy/src/hierarchy/leaves.js +2 -4
  708. package/dist/node_modules/d3-hierarchy/src/hierarchy/links.js +2 -4
  709. package/dist/node_modules/d3-hierarchy/src/hierarchy/path.js +4 -6
  710. package/dist/node_modules/d3-hierarchy/src/hierarchy/sort.js +2 -4
  711. package/dist/node_modules/d3-hierarchy/src/hierarchy/sum.js +2 -4
  712. package/dist/node_modules/d3-hierarchy/src/treemap/dice.js +2 -4
  713. package/dist/node_modules/d3-hierarchy/src/treemap/index.js +14 -16
  714. package/dist/node_modules/d3-hierarchy/src/treemap/round.js +2 -4
  715. package/dist/node_modules/d3-hierarchy/src/treemap/slice.js +2 -4
  716. package/dist/node_modules/d3-hierarchy/src/treemap/squarify.js +9 -11
  717. package/dist/node_modules/d3-interpolate/src/array.js +4 -6
  718. package/dist/node_modules/d3-interpolate/src/basis.js +4 -6
  719. package/dist/node_modules/d3-interpolate/src/basisClosed.js +4 -6
  720. package/dist/node_modules/d3-interpolate/src/color.js +17 -19
  721. package/dist/node_modules/d3-interpolate/src/constant.js +2 -4
  722. package/dist/node_modules/d3-interpolate/src/date.js +2 -4
  723. package/dist/node_modules/d3-interpolate/src/hcl.js +6 -8
  724. package/dist/node_modules/d3-interpolate/src/number.js +2 -4
  725. package/dist/node_modules/d3-interpolate/src/numberArray.js +3 -5
  726. package/dist/node_modules/d3-interpolate/src/object.js +4 -6
  727. package/dist/node_modules/d3-interpolate/src/rgb.js +9 -11
  728. package/dist/node_modules/d3-interpolate/src/round.js +2 -4
  729. package/dist/node_modules/d3-interpolate/src/string.js +14 -16
  730. package/dist/node_modules/d3-interpolate/src/transform/decompose.js +5 -7
  731. package/dist/node_modules/d3-interpolate/src/transform/index.js +11 -13
  732. package/dist/node_modules/d3-interpolate/src/transform/parse.js +8 -10
  733. package/dist/node_modules/d3-interpolate/src/value.js +12 -14
  734. package/dist/node_modules/d3-interpolate/src/zoom.js +11 -13
  735. package/dist/node_modules/d3-path/src/path.js +14 -16
  736. package/dist/node_modules/d3-sankey/node_modules/d3-array/src/max.js +2 -4
  737. package/dist/node_modules/d3-sankey/node_modules/d3-array/src/min.js +2 -4
  738. package/dist/node_modules/d3-sankey/node_modules/d3-array/src/sum.js +2 -4
  739. package/dist/node_modules/d3-sankey/node_modules/d3-path/src/path.js +12 -13
  740. package/dist/node_modules/d3-sankey/node_modules/d3-shape/src/array.js +2 -4
  741. package/dist/node_modules/d3-sankey/node_modules/d3-shape/src/constant.js +2 -4
  742. package/dist/node_modules/d3-sankey/node_modules/d3-shape/src/link/index.js +17 -19
  743. package/dist/node_modules/d3-sankey/node_modules/d3-shape/src/point.js +3 -5
  744. package/dist/node_modules/d3-sankey/src/align.js +10 -12
  745. package/dist/node_modules/d3-sankey/src/constant.js +2 -4
  746. package/dist/node_modules/d3-sankey/src/sankey.js +168 -170
  747. package/dist/node_modules/d3-sankey/src/sankeyLinkHorizontal.js +6 -8
  748. package/dist/node_modules/d3-scale/src/band.js +9 -11
  749. package/dist/node_modules/d3-scale/src/constant.js +2 -4
  750. package/dist/node_modules/d3-scale/src/continuous.js +47 -49
  751. package/dist/node_modules/d3-scale/src/init.js +2 -4
  752. package/dist/node_modules/d3-scale/src/linear.js +13 -15
  753. package/dist/node_modules/d3-scale/src/nice.js +2 -4
  754. package/dist/node_modules/d3-scale/src/number.js +2 -4
  755. package/dist/node_modules/d3-scale/src/ordinal.js +16 -18
  756. package/dist/node_modules/d3-scale/src/tickFormat.js +14 -16
  757. package/dist/node_modules/d3-scale/src/time.js +34 -36
  758. package/dist/node_modules/d3-scale-chromatic/src/categorical/Tableau10.js +3 -5
  759. package/dist/node_modules/d3-scale-chromatic/src/colors.js +2 -4
  760. package/dist/node_modules/d3-selection/src/array.js +2 -4
  761. package/dist/node_modules/d3-selection/src/constant.js +2 -4
  762. package/dist/node_modules/d3-selection/src/creator.js +10 -12
  763. package/dist/node_modules/d3-selection/src/matcher.js +3 -5
  764. package/dist/node_modules/d3-selection/src/namespace.js +5 -7
  765. package/dist/node_modules/d3-selection/src/namespaces.js +3 -5
  766. package/dist/node_modules/d3-selection/src/pointer.js +4 -6
  767. package/dist/node_modules/d3-selection/src/select.js +4 -6
  768. package/dist/node_modules/d3-selection/src/selection/append.js +4 -6
  769. package/dist/node_modules/d3-selection/src/selection/attr.js +17 -19
  770. package/dist/node_modules/d3-selection/src/selection/call.js +2 -4
  771. package/dist/node_modules/d3-selection/src/selection/classed.js +23 -25
  772. package/dist/node_modules/d3-selection/src/selection/clone.js +5 -7
  773. package/dist/node_modules/d3-selection/src/selection/data.js +16 -18
  774. package/dist/node_modules/d3-selection/src/selection/datum.js +2 -4
  775. package/dist/node_modules/d3-selection/src/selection/dispatch.js +10 -12
  776. package/dist/node_modules/d3-selection/src/selection/each.js +2 -4
  777. package/dist/node_modules/d3-selection/src/selection/empty.js +2 -4
  778. package/dist/node_modules/d3-selection/src/selection/enter.js +11 -13
  779. package/dist/node_modules/d3-selection/src/selection/exit.js +5 -7
  780. package/dist/node_modules/d3-selection/src/selection/filter.js +6 -8
  781. package/dist/node_modules/d3-selection/src/selection/html.js +6 -8
  782. package/dist/node_modules/d3-selection/src/selection/index.js +79 -80
  783. package/dist/node_modules/d3-selection/src/selection/insert.js +6 -8
  784. package/dist/node_modules/d3-selection/src/selection/iterator.js +2 -4
  785. package/dist/node_modules/d3-selection/src/selection/join.js +2 -4
  786. package/dist/node_modules/d3-selection/src/selection/lower.js +4 -6
  787. package/dist/node_modules/d3-selection/src/selection/merge.js +4 -6
  788. package/dist/node_modules/d3-selection/src/selection/node.js +2 -4
  789. package/dist/node_modules/d3-selection/src/selection/nodes.js +2 -4
  790. package/dist/node_modules/d3-selection/src/selection/on.js +9 -11
  791. package/dist/node_modules/d3-selection/src/selection/order.js +2 -4
  792. package/dist/node_modules/d3-selection/src/selection/property.js +6 -8
  793. package/dist/node_modules/d3-selection/src/selection/raise.js +4 -6
  794. package/dist/node_modules/d3-selection/src/selection/remove.js +4 -6
  795. package/dist/node_modules/d3-selection/src/selection/select.js +6 -8
  796. package/dist/node_modules/d3-selection/src/selection/selectAll.js +9 -11
  797. package/dist/node_modules/d3-selection/src/selection/selectChild.js +8 -10
  798. package/dist/node_modules/d3-selection/src/selection/selectChildren.js +8 -10
  799. package/dist/node_modules/d3-selection/src/selection/size.js +2 -4
  800. package/dist/node_modules/d3-selection/src/selection/sort.js +6 -8
  801. package/dist/node_modules/d3-selection/src/selection/sparse.js +2 -4
  802. package/dist/node_modules/d3-selection/src/selection/style.js +12 -14
  803. package/dist/node_modules/d3-selection/src/selection/text.js +6 -8
  804. package/dist/node_modules/d3-selection/src/selector.js +4 -6
  805. package/dist/node_modules/d3-selection/src/selectorAll.js +4 -6
  806. package/dist/node_modules/d3-selection/src/sourceEvent.js +2 -4
  807. package/dist/node_modules/d3-selection/src/window.js +2 -4
  808. package/dist/node_modules/d3-shape/src/arc.js +36 -38
  809. package/dist/node_modules/d3-shape/src/array.js +2 -3
  810. package/dist/node_modules/d3-shape/src/constant.js +2 -4
  811. package/dist/node_modules/d3-shape/src/curve/basis.js +8 -10
  812. package/dist/node_modules/d3-shape/src/curve/basisClosed.js +16 -18
  813. package/dist/node_modules/d3-shape/src/curve/basisOpen.js +7 -9
  814. package/dist/node_modules/d3-shape/src/curve/bump.js +13 -15
  815. package/dist/node_modules/d3-shape/src/curve/bundle.js +7 -9
  816. package/dist/node_modules/d3-shape/src/curve/cardinal.js +8 -10
  817. package/dist/node_modules/d3-shape/src/curve/cardinalClosed.js +10 -12
  818. package/dist/node_modules/d3-shape/src/curve/cardinalOpen.js +7 -9
  819. package/dist/node_modules/d3-shape/src/curve/catmullRom.js +17 -19
  820. package/dist/node_modules/d3-shape/src/curve/catmullRomClosed.js +11 -13
  821. package/dist/node_modules/d3-shape/src/curve/catmullRomOpen.js +8 -10
  822. package/dist/node_modules/d3-shape/src/curve/linear.js +5 -7
  823. package/dist/node_modules/d3-shape/src/curve/linearClosed.js +10 -12
  824. package/dist/node_modules/d3-shape/src/curve/monotone.js +21 -23
  825. package/dist/node_modules/d3-shape/src/curve/natural.js +7 -9
  826. package/dist/node_modules/d3-shape/src/curve/step.js +17 -19
  827. package/dist/node_modules/d3-shape/src/descending.js +2 -4
  828. package/dist/node_modules/d3-shape/src/identity.js +2 -4
  829. package/dist/node_modules/d3-shape/src/line.js +17 -19
  830. package/dist/node_modules/d3-shape/src/math.js +6 -8
  831. package/dist/node_modules/d3-shape/src/noop.js +2 -4
  832. package/dist/node_modules/d3-shape/src/path.js +4 -6
  833. package/dist/node_modules/d3-shape/src/pie.js +13 -15
  834. package/dist/node_modules/d3-shape/src/point.js +3 -5
  835. package/dist/node_modules/d3-time/src/day.js +15 -17
  836. package/dist/node_modules/d3-time/src/duration.js +2 -4
  837. package/dist/node_modules/d3-time/src/hour.js +14 -16
  838. package/dist/node_modules/d3-time/src/interval.js +5 -7
  839. package/dist/node_modules/d3-time/src/millisecond.js +5 -7
  840. package/dist/node_modules/d3-time/src/minute.js +14 -16
  841. package/dist/node_modules/d3-time/src/month.js +12 -14
  842. package/dist/node_modules/d3-time/src/second.js +7 -9
  843. package/dist/node_modules/d3-time/src/ticks.js +64 -66
  844. package/dist/node_modules/d3-time/src/week.js +19 -21
  845. package/dist/node_modules/d3-time/src/year.js +8 -10
  846. package/dist/node_modules/d3-time-format/src/defaultLocale.js +6 -8
  847. package/dist/node_modules/d3-time-format/src/locale.js +344 -346
  848. package/dist/node_modules/d3-timer/src/timeout.js +4 -6
  849. package/dist/node_modules/d3-timer/src/timer.js +31 -33
  850. package/dist/node_modules/d3-transition/src/index.js +2 -2
  851. package/dist/node_modules/d3-transition/src/interrupt.js +3 -4
  852. package/dist/node_modules/d3-transition/src/selection/index.js +4 -5
  853. package/dist/node_modules/d3-transition/src/selection/interrupt.js +4 -6
  854. package/dist/node_modules/d3-transition/src/selection/transition.js +14 -16
  855. package/dist/node_modules/d3-transition/src/transition/attr.js +26 -28
  856. package/dist/node_modules/d3-transition/src/transition/attrTween.js +11 -13
  857. package/dist/node_modules/d3-transition/src/transition/delay.js +9 -11
  858. package/dist/node_modules/d3-transition/src/transition/duration.js +9 -11
  859. package/dist/node_modules/d3-transition/src/transition/ease.js +6 -8
  860. package/dist/node_modules/d3-transition/src/transition/easeVarying.js +6 -8
  861. package/dist/node_modules/d3-transition/src/transition/end.js +4 -6
  862. package/dist/node_modules/d3-transition/src/transition/filter.js +6 -8
  863. package/dist/node_modules/d3-transition/src/transition/index.js +61 -63
  864. package/dist/node_modules/d3-transition/src/transition/interpolate.js +7 -9
  865. package/dist/node_modules/d3-transition/src/transition/merge.js +4 -6
  866. package/dist/node_modules/d3-transition/src/transition/on.js +7 -9
  867. package/dist/node_modules/d3-transition/src/transition/remove.js +4 -6
  868. package/dist/node_modules/d3-transition/src/transition/schedule.js +18 -20
  869. package/dist/node_modules/d3-transition/src/transition/select.js +8 -10
  870. package/dist/node_modules/d3-transition/src/transition/selectAll.js +8 -10
  871. package/dist/node_modules/d3-transition/src/transition/selection.js +5 -7
  872. package/dist/node_modules/d3-transition/src/transition/style.js +19 -21
  873. package/dist/node_modules/d3-transition/src/transition/styleTween.js +6 -8
  874. package/dist/node_modules/d3-transition/src/transition/text.js +6 -8
  875. package/dist/node_modules/d3-transition/src/transition/textTween.js +6 -8
  876. package/dist/node_modules/d3-transition/src/transition/transition.js +8 -10
  877. package/dist/node_modules/d3-transition/src/transition/tween.js +12 -14
  878. package/dist/node_modules/d3-zoom/src/constant.js +2 -4
  879. package/dist/node_modules/d3-zoom/src/event.js +2 -4
  880. package/dist/node_modules/d3-zoom/src/index.js +2 -2
  881. package/dist/node_modules/d3-zoom/src/noevent.js +3 -5
  882. package/dist/node_modules/d3-zoom/src/transform.js +10 -12
  883. package/dist/node_modules/d3-zoom/src/zoom.js +114 -116
  884. package/dist/node_modules/dagre-d3-es/src/dagre/acyclic.js +12 -14
  885. package/dist/node_modules/dagre-d3-es/src/dagre/add-border-segments.js +9 -11
  886. package/dist/node_modules/dagre-d3-es/src/dagre/coordinate-system.js +34 -36
  887. package/dist/node_modules/dagre-d3-es/src/dagre/data/list.js +7 -9
  888. package/dist/node_modules/dagre-d3-es/src/dagre/greedy-fas.js +49 -51
  889. package/dist/node_modules/dagre-d3-es/src/dagre/index.js +2 -2
  890. package/dist/node_modules/dagre-d3-es/src/dagre/layout.js +163 -165
  891. package/dist/node_modules/dagre-d3-es/src/dagre/nesting-graph.js +43 -45
  892. package/dist/node_modules/dagre-d3-es/src/dagre/normalize.js +10 -12
  893. package/dist/node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js +4 -6
  894. package/dist/node_modules/dagre-d3-es/src/dagre/order/barycenter.js +6 -8
  895. package/dist/node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js +12 -14
  896. package/dist/node_modules/dagre-d3-es/src/dagre/order/cross-count.js +20 -22
  897. package/dist/node_modules/dagre-d3-es/src/dagre/order/index.js +34 -36
  898. package/dist/node_modules/dagre-d3-es/src/dagre/order/init-order.js +13 -15
  899. package/dist/node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js +30 -32
  900. package/dist/node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js +28 -30
  901. package/dist/node_modules/dagre-d3-es/src/dagre/order/sort.js +18 -20
  902. package/dist/node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js +10 -12
  903. package/dist/node_modules/dagre-d3-es/src/dagre/position/bk.js +148 -150
  904. package/dist/node_modules/dagre-d3-es/src/dagre/position/index.js +18 -20
  905. package/dist/node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js +17 -19
  906. package/dist/node_modules/dagre-d3-es/src/dagre/rank/index.js +14 -16
  907. package/dist/node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js +63 -64
  908. package/dist/node_modules/dagre-d3-es/src/dagre/rank/util.js +8 -10
  909. package/dist/node_modules/dagre-d3-es/src/dagre/util.js +82 -84
  910. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/dfs.js +13 -15
  911. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/dijkstra.js +2 -3
  912. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/floyd-warshall.js +2 -3
  913. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/index.js +3 -3
  914. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/postorder.js +4 -6
  915. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/preorder.js +4 -6
  916. package/dist/node_modules/dagre-d3-es/src/graphlib/alg/topsort.js +11 -13
  917. package/dist/node_modules/dagre-d3-es/src/graphlib/graph.js +129 -131
  918. package/dist/node_modules/dagre-d3-es/src/graphlib/index.js +1 -1
  919. package/dist/node_modules/dagre-d3-es/src/graphlib/json.js +16 -18
  920. package/dist/node_modules/dayjs/dayjs.min.js +4 -6
  921. package/dist/node_modules/dayjs/plugin/advancedFormat.js +4 -6
  922. package/dist/node_modules/dayjs/plugin/customParseFormat.js +4 -6
  923. package/dist/node_modules/dayjs/plugin/duration.js +4 -6
  924. package/dist/node_modules/dayjs/plugin/isoWeek.js +4 -6
  925. package/dist/node_modules/decode-named-character-reference/index.dom.js +5 -7
  926. package/dist/node_modules/devlop/lib/default.js +2 -4
  927. package/dist/node_modules/dompurify/dist/purify.es.js +180 -182
  928. package/dist/node_modules/entities/dist/esm/decode-codepoint.js +4 -6
  929. package/dist/node_modules/entities/dist/esm/decode.js +85 -87
  930. package/dist/node_modules/entities/dist/esm/generated/decode-data-html.js +2 -4
  931. package/dist/node_modules/estree-util-is-identifier-name/lib/index.js +4 -6
  932. package/dist/node_modules/extend/index.js +6 -9
  933. package/dist/node_modules/hast-util-from-dom/lib/index.js +30 -32
  934. package/dist/node_modules/hast-util-from-html-isomorphic/lib/browser.js +8 -10
  935. package/dist/node_modules/hast-util-from-parse5/lib/index.js +80 -82
  936. package/dist/node_modules/hast-util-is-element/lib/index.js +15 -17
  937. package/dist/node_modules/hast-util-parse-selector/lib/index.js +5 -7
  938. package/dist/node_modules/hast-util-raw/lib/index.js +134 -136
  939. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/doctype.js +21 -23
  940. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/error-codes.js +3 -5
  941. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/foreign-content.js +89 -89
  942. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/html.js +249 -250
  943. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/token.js +4 -6
  944. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/common/unicode.js +14 -14
  945. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/index.js +4 -4
  946. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/formatting-element-list.js +15 -17
  947. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/index.js +1495 -1497
  948. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/parser/open-element-stack.js +146 -148
  949. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/serializer/index.js +19 -20
  950. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/index.js +798 -800
  951. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/preprocessor.js +31 -33
  952. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tree-adapters/default.js +8 -10
  953. package/dist/node_modules/hast-util-sanitize/lib/index.js +104 -106
  954. package/dist/node_modules/hast-util-sanitize/lib/schema.js +11 -12
  955. package/dist/node_modules/hast-util-to-html/lib/handle/comment.js +7 -9
  956. package/dist/node_modules/hast-util-to-html/lib/handle/doctype.js +2 -4
  957. package/dist/node_modules/hast-util-to-html/lib/handle/element.js +23 -25
  958. package/dist/node_modules/hast-util-to-html/lib/handle/index.js +21 -22
  959. package/dist/node_modules/hast-util-to-html/lib/handle/raw.js +4 -6
  960. package/dist/node_modules/hast-util-to-html/lib/handle/root.js +2 -4
  961. package/dist/node_modules/hast-util-to-html/lib/handle/text.js +5 -7
  962. package/dist/node_modules/hast-util-to-html/lib/index.js +36 -38
  963. package/dist/node_modules/hast-util-to-html/lib/omission/closing.js +68 -70
  964. package/dist/node_modules/hast-util-to-html/lib/omission/omission.js +4 -6
  965. package/dist/node_modules/hast-util-to-html/lib/omission/opening.js +30 -32
  966. package/dist/node_modules/hast-util-to-html/lib/omission/util/siblings.js +9 -10
  967. package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +190 -192
  968. package/dist/node_modules/hast-util-to-parse5/lib/index.js +69 -71
  969. package/dist/node_modules/hast-util-to-text/lib/index.js +59 -61
  970. package/dist/node_modules/hast-util-whitespace/lib/index.js +6 -8
  971. package/dist/node_modules/hastscript/lib/create-h.js +24 -26
  972. package/dist/node_modules/hastscript/lib/index.js +5 -7
  973. package/dist/node_modules/hastscript/lib/svg-case-sensitive-tag-names.js +2 -4
  974. package/dist/node_modules/html-url-attributes/lib/index.js +2 -4
  975. package/dist/node_modules/html-void-elements/index.js +2 -4
  976. package/dist/node_modules/inline-style-parser/cjs/index.js +4 -6
  977. package/dist/node_modules/internmap/src/index.js +20 -22
  978. package/dist/node_modules/katex/dist/katex.js +2307 -2301
  979. package/dist/node_modules/khroma/dist/channels/index.js +21 -23
  980. package/dist/node_modules/khroma/dist/channels/reusable.js +3 -5
  981. package/dist/node_modules/khroma/dist/channels/type.js +5 -7
  982. package/dist/node_modules/khroma/dist/color/hex.js +8 -10
  983. package/dist/node_modules/khroma/dist/color/hsl.js +17 -19
  984. package/dist/node_modules/khroma/dist/color/index.js +15 -17
  985. package/dist/node_modules/khroma/dist/color/keyword.js +8 -10
  986. package/dist/node_modules/khroma/dist/color/rgb.js +12 -14
  987. package/dist/node_modules/khroma/dist/constants.js +5 -7
  988. package/dist/node_modules/khroma/dist/methods/adjust.js +6 -8
  989. package/dist/node_modules/khroma/dist/methods/adjust_channel.js +6 -8
  990. package/dist/node_modules/khroma/dist/methods/change.js +7 -9
  991. package/dist/node_modules/khroma/dist/methods/channel.js +4 -6
  992. package/dist/node_modules/khroma/dist/methods/darken.js +3 -5
  993. package/dist/node_modules/khroma/dist/methods/invert.js +6 -8
  994. package/dist/node_modules/khroma/dist/methods/is_dark.js +3 -5
  995. package/dist/node_modules/khroma/dist/methods/is_light.js +3 -5
  996. package/dist/node_modules/khroma/dist/methods/lighten.js +3 -5
  997. package/dist/node_modules/khroma/dist/methods/luminance.js +6 -8
  998. package/dist/node_modules/khroma/dist/methods/mix.js +6 -8
  999. package/dist/node_modules/khroma/dist/methods/rgba.js +13 -15
  1000. package/dist/node_modules/khroma/dist/methods/transparentize.js +3 -5
  1001. package/dist/node_modules/khroma/dist/utils/channel.js +6 -8
  1002. package/dist/node_modules/khroma/dist/utils/index.js +8 -10
  1003. package/dist/node_modules/khroma/dist/utils/lang.js +2 -4
  1004. package/dist/node_modules/khroma/dist/utils/unit.js +2 -4
  1005. package/dist/node_modules/langium/lib/default-module.js +64 -66
  1006. package/dist/node_modules/langium/lib/dependency-injection.js +39 -37
  1007. package/dist/node_modules/langium/lib/documentation/comment-provider.js +5 -7
  1008. package/dist/node_modules/langium/lib/documentation/documentation-provider.js +6 -8
  1009. package/dist/node_modules/langium/lib/documentation/jsdoc.js +202 -204
  1010. package/dist/node_modules/langium/lib/index.js +182 -0
  1011. package/dist/node_modules/langium/lib/languages/generated/ast.js +534 -343
  1012. package/dist/node_modules/langium/lib/languages/grammar-config.js +8 -10
  1013. package/dist/node_modules/langium/lib/parser/async-parser.js +76 -4
  1014. package/dist/node_modules/langium/lib/parser/completion-parser-builder.js +6 -8
  1015. package/dist/node_modules/langium/lib/parser/cst-node-builder.js +54 -56
  1016. package/dist/node_modules/langium/lib/parser/indentation-aware.js +141 -0
  1017. package/dist/node_modules/langium/lib/parser/langium-parser-builder.js +7 -9
  1018. package/dist/node_modules/langium/lib/parser/langium-parser.js +188 -190
  1019. package/dist/node_modules/langium/lib/parser/lexer.js +25 -25
  1020. package/dist/node_modules/langium/lib/parser/parser-builder-base.js +203 -204
  1021. package/dist/node_modules/langium/lib/parser/token-builder.js +30 -32
  1022. package/dist/node_modules/langium/lib/parser/value-converter.js +15 -17
  1023. package/dist/node_modules/langium/lib/references/linker.js +103 -104
  1024. package/dist/node_modules/langium/lib/references/name-provider.js +7 -9
  1025. package/dist/node_modules/langium/lib/references/references.js +51 -53
  1026. package/dist/node_modules/langium/lib/references/scope-computation.js +12 -14
  1027. package/dist/node_modules/langium/lib/references/scope-provider.js +11 -13
  1028. package/dist/node_modules/langium/lib/references/scope.js +56 -27
  1029. package/dist/node_modules/langium/lib/serializer/hydrator.js +69 -71
  1030. package/dist/node_modules/langium/lib/serializer/json-serializer.js +21 -23
  1031. package/dist/node_modules/langium/lib/service-registry.js +5 -7
  1032. package/dist/node_modules/langium/lib/syntax-tree.js +31 -33
  1033. package/dist/node_modules/langium/lib/utils/ast-utils.js +112 -77
  1034. package/dist/node_modules/langium/lib/utils/caching.js +42 -33
  1035. package/dist/node_modules/langium/lib/utils/cancellation.js +5 -7
  1036. package/dist/node_modules/langium/lib/utils/collections.js +33 -35
  1037. package/dist/node_modules/langium/lib/utils/cst-utils.js +161 -46
  1038. package/dist/node_modules/langium/lib/utils/disposable.js +3 -5
  1039. package/dist/node_modules/langium/lib/utils/errors.js +9 -8
  1040. package/dist/node_modules/langium/lib/utils/event.js +5 -7
  1041. package/dist/node_modules/langium/lib/utils/grammar-loader.js +14 -16
  1042. package/dist/node_modules/langium/lib/utils/grammar-utils.js +249 -172
  1043. package/dist/node_modules/langium/lib/utils/index.js +53 -0
  1044. package/dist/node_modules/langium/lib/utils/promise-utils.js +19 -18
  1045. package/dist/node_modules/langium/lib/utils/regexp-utils.js +76 -53
  1046. package/dist/node_modules/langium/lib/utils/stream.js +153 -155
  1047. package/dist/node_modules/langium/lib/utils/uri-utils.js +12 -14
  1048. package/dist/node_modules/langium/lib/validation/document-validator.js +103 -104
  1049. package/dist/node_modules/langium/lib/validation/validation-registry.js +14 -15
  1050. package/dist/node_modules/langium/lib/workspace/ast-descriptions.js +17 -19
  1051. package/dist/node_modules/langium/lib/workspace/ast-node-locator.js +2 -4
  1052. package/dist/node_modules/langium/lib/workspace/configuration.js +5 -7
  1053. package/dist/node_modules/langium/lib/workspace/document-builder.js +134 -131
  1054. package/dist/node_modules/langium/lib/workspace/documents.js +83 -85
  1055. package/dist/node_modules/langium/lib/workspace/file-system-provider.js +4 -5
  1056. package/dist/node_modules/langium/lib/workspace/index-manager.js +14 -16
  1057. package/dist/node_modules/langium/lib/workspace/profiler.js +89 -0
  1058. package/dist/node_modules/langium/lib/workspace/workspace-lock.js +9 -11
  1059. package/dist/node_modules/langium/lib/workspace/workspace-manager.js +33 -35
  1060. package/dist/node_modules/layout-base/layout-base.js +4 -6
  1061. package/dist/node_modules/lodash/_Symbol.js +7 -0
  1062. package/dist/node_modules/lodash/_baseGetTag.js +13 -0
  1063. package/dist/node_modules/lodash/_baseTrim.js +11 -0
  1064. package/dist/node_modules/lodash/_freeGlobal.js +6 -0
  1065. package/dist/node_modules/lodash/_getRawTag.js +17 -0
  1066. package/dist/node_modules/lodash/_objectToString.js +10 -0
  1067. package/dist/node_modules/lodash/_root.js +8 -0
  1068. package/dist/node_modules/lodash/_trimmedEndIndex.js +11 -0
  1069. package/dist/{frontend/studio/node_modules → node_modules}/lodash/debounce.js +8 -10
  1070. package/dist/node_modules/lodash/isObject.js +10 -0
  1071. package/dist/node_modules/lodash/isObjectLike.js +9 -0
  1072. package/dist/node_modules/lodash/isSymbol.js +12 -0
  1073. package/dist/node_modules/lodash/now.js +10 -0
  1074. package/dist/node_modules/lodash/toNumber.js +22 -0
  1075. package/dist/node_modules/lodash-es/_DataView.js +4 -6
  1076. package/dist/node_modules/lodash-es/_Hash.js +13 -14
  1077. package/dist/node_modules/lodash-es/_ListCache.js +13 -14
  1078. package/dist/node_modules/lodash-es/_Map.js +4 -6
  1079. package/dist/node_modules/lodash-es/_MapCache.js +13 -14
  1080. package/dist/node_modules/lodash-es/_Promise.js +4 -6
  1081. package/dist/node_modules/lodash-es/_Set.js +4 -6
  1082. package/dist/node_modules/lodash-es/_SetCache.js +9 -10
  1083. package/dist/node_modules/lodash-es/_Stack.js +11 -12
  1084. package/dist/node_modules/lodash-es/_Symbol.js +3 -5
  1085. package/dist/node_modules/lodash-es/_Uint8Array.js +3 -5
  1086. package/dist/node_modules/lodash-es/_WeakMap.js +4 -6
  1087. package/dist/node_modules/lodash-es/_apply.js +3 -4
  1088. package/dist/node_modules/lodash-es/_arrayEach.js +3 -4
  1089. package/dist/node_modules/lodash-es/_arrayFilter.js +3 -4
  1090. package/dist/node_modules/lodash-es/_arrayIncludes.js +5 -6
  1091. package/dist/node_modules/lodash-es/_arrayIncludesWith.js +3 -4
  1092. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +12 -13
  1093. package/dist/node_modules/lodash-es/_arrayMap.js +3 -4
  1094. package/dist/node_modules/lodash-es/_arrayPush.js +3 -4
  1095. package/dist/node_modules/lodash-es/_arrayReduce.js +3 -4
  1096. package/dist/node_modules/lodash-es/_arraySome.js +3 -4
  1097. package/dist/node_modules/lodash-es/_asciiSize.js +3 -5
  1098. package/dist/node_modules/lodash-es/_assignMergeValue.js +6 -7
  1099. package/dist/node_modules/lodash-es/_assignValue.js +7 -8
  1100. package/dist/node_modules/lodash-es/_assocIndexOf.js +5 -6
  1101. package/dist/node_modules/lodash-es/_baseAssign.js +6 -7
  1102. package/dist/node_modules/lodash-es/_baseAssignIn.js +6 -7
  1103. package/dist/node_modules/lodash-es/_baseAssignValue.js +5 -6
  1104. package/dist/node_modules/lodash-es/_baseClone.js +50 -51
  1105. package/dist/node_modules/lodash-es/_baseCreate.js +5 -7
  1106. package/dist/node_modules/lodash-es/_baseEach.js +4 -6
  1107. package/dist/node_modules/lodash-es/_baseExtremum.js +5 -6
  1108. package/dist/node_modules/lodash-es/_baseFilter.js +5 -6
  1109. package/dist/node_modules/lodash-es/_baseFindIndex.js +3 -4
  1110. package/dist/node_modules/lodash-es/_baseFlatten.js +7 -8
  1111. package/dist/node_modules/lodash-es/_baseFor.js +3 -5
  1112. package/dist/node_modules/lodash-es/_baseForOwn.js +6 -7
  1113. package/dist/node_modules/lodash-es/_baseGet.js +7 -8
  1114. package/dist/node_modules/lodash-es/_baseGetAllKeys.js +6 -7
  1115. package/dist/node_modules/lodash-es/_baseGetTag.js +8 -9
  1116. package/dist/node_modules/lodash-es/_baseGt.js +3 -4
  1117. package/dist/node_modules/lodash-es/_baseHas.js +5 -6
  1118. package/dist/node_modules/lodash-es/_baseHasIn.js +3 -4
  1119. package/dist/node_modules/lodash-es/_baseIndexOf.js +7 -8
  1120. package/dist/node_modules/lodash-es/_baseIsArguments.js +7 -8
  1121. package/dist/node_modules/lodash-es/_baseIsEqual.js +6 -7
  1122. package/dist/node_modules/lodash-es/_baseIsEqualDeep.js +22 -23
  1123. package/dist/node_modules/lodash-es/_baseIsMap.js +7 -8
  1124. package/dist/node_modules/lodash-es/_baseIsMatch.js +8 -9
  1125. package/dist/node_modules/lodash-es/_baseIsNaN.js +3 -4
  1126. package/dist/node_modules/lodash-es/_baseIsNative.js +9 -10
  1127. package/dist/node_modules/lodash-es/_baseIsSet.js +7 -8
  1128. package/dist/node_modules/lodash-es/_baseIsTypedArray.js +9 -10
  1129. package/dist/node_modules/lodash-es/_baseIteratee.js +9 -10
  1130. package/dist/node_modules/lodash-es/_baseKeys.js +8 -9
  1131. package/dist/node_modules/lodash-es/_baseKeysIn.js +10 -11
  1132. package/dist/node_modules/lodash-es/_baseLt.js +3 -4
  1133. package/dist/node_modules/lodash-es/_baseMap.js +7 -8
  1134. package/dist/node_modules/lodash-es/_baseMatches.js +9 -10
  1135. package/dist/node_modules/lodash-es/_baseMatchesProperty.js +14 -15
  1136. package/dist/node_modules/lodash-es/_baseMerge.js +15 -16
  1137. package/dist/node_modules/lodash-es/_baseMergeDeep.js +23 -24
  1138. package/dist/node_modules/lodash-es/_baseOrderBy.js +22 -23
  1139. package/dist/node_modules/lodash-es/_basePick.js +7 -8
  1140. package/dist/node_modules/lodash-es/_basePickBy.js +8 -9
  1141. package/dist/node_modules/lodash-es/_baseProperty.js +3 -4
  1142. package/dist/node_modules/lodash-es/_basePropertyDeep.js +5 -6
  1143. package/dist/node_modules/lodash-es/_baseRange.js +5 -6
  1144. package/dist/node_modules/lodash-es/_baseReduce.js +3 -4
  1145. package/dist/node_modules/lodash-es/_baseRest.js +7 -8
  1146. package/dist/node_modules/lodash-es/_baseSet.js +13 -14
  1147. package/dist/node_modules/lodash-es/_baseSetToString.js +8 -10
  1148. package/dist/node_modules/lodash-es/_baseSortBy.js +3 -4
  1149. package/dist/node_modules/lodash-es/_baseTimes.js +3 -4
  1150. package/dist/node_modules/lodash-es/_baseToString.js +12 -13
  1151. package/dist/node_modules/lodash-es/_baseTrim.js +6 -7
  1152. package/dist/node_modules/lodash-es/_baseUnary.js +3 -4
  1153. package/dist/node_modules/lodash-es/_baseUniq.js +16 -17
  1154. package/dist/node_modules/lodash-es/_baseValues.js +5 -6
  1155. package/dist/node_modules/lodash-es/_baseZipObject.js +3 -4
  1156. package/dist/node_modules/lodash-es/_cacheHas.js +3 -4
  1157. package/dist/node_modules/lodash-es/_castFunction.js +5 -6
  1158. package/dist/node_modules/lodash-es/_castPath.js +8 -9
  1159. package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +5 -6
  1160. package/dist/node_modules/lodash-es/_cloneBuffer.js +8 -9
  1161. package/dist/node_modules/lodash-es/_cloneDataView.js +5 -6
  1162. package/dist/node_modules/lodash-es/_cloneRegExp.js +5 -6
  1163. package/dist/node_modules/lodash-es/_cloneSymbol.js +6 -7
  1164. package/dist/node_modules/lodash-es/_cloneTypedArray.js +5 -6
  1165. package/dist/node_modules/lodash-es/_compareAscending.js +5 -6
  1166. package/dist/node_modules/lodash-es/_compareMultiple.js +5 -6
  1167. package/dist/node_modules/lodash-es/_copyArray.js +3 -4
  1168. package/dist/node_modules/lodash-es/_copyObject.js +6 -7
  1169. package/dist/node_modules/lodash-es/_copySymbols.js +6 -7
  1170. package/dist/node_modules/lodash-es/_copySymbolsIn.js +6 -7
  1171. package/dist/node_modules/lodash-es/_coreJsData.js +3 -5
  1172. package/dist/node_modules/lodash-es/_createAssigner.js +7 -8
  1173. package/dist/node_modules/lodash-es/_createBaseEach.js +5 -6
  1174. package/dist/node_modules/lodash-es/_createBaseFor.js +3 -4
  1175. package/dist/node_modules/lodash-es/_createFind.js +9 -10
  1176. package/dist/node_modules/lodash-es/_createRange.js +7 -8
  1177. package/dist/node_modules/lodash-es/_createSet.js +7 -9
  1178. package/dist/node_modules/lodash-es/_defineProperty.js +4 -6
  1179. package/dist/node_modules/lodash-es/_equalArrays.js +11 -12
  1180. package/dist/node_modules/lodash-es/_equalByTag.js +28 -29
  1181. package/dist/node_modules/lodash-es/_equalObjects.js +8 -9
  1182. package/dist/node_modules/lodash-es/_flatRest.js +7 -8
  1183. package/dist/node_modules/lodash-es/_freeGlobal.js +2 -4
  1184. package/dist/node_modules/lodash-es/_getAllKeys.js +7 -8
  1185. package/dist/node_modules/lodash-es/_getAllKeysIn.js +7 -8
  1186. package/dist/node_modules/lodash-es/_getMapData.js +5 -6
  1187. package/dist/node_modules/lodash-es/_getMatchData.js +7 -8
  1188. package/dist/node_modules/lodash-es/_getNative.js +7 -8
  1189. package/dist/node_modules/lodash-es/_getPrototype.js +3 -5
  1190. package/dist/node_modules/lodash-es/_getRawTag.js +9 -10
  1191. package/dist/node_modules/lodash-es/_getSymbols.js +7 -9
  1192. package/dist/node_modules/lodash-es/_getSymbolsIn.js +8 -10
  1193. package/dist/node_modules/lodash-es/_getTag.js +19 -21
  1194. package/dist/node_modules/lodash-es/_getValue.js +3 -4
  1195. package/dist/node_modules/lodash-es/_hasPath.js +12 -13
  1196. package/dist/node_modules/lodash-es/_hasUnicode.js +5 -6
  1197. package/dist/node_modules/lodash-es/_hashClear.js +5 -6
  1198. package/dist/node_modules/lodash-es/_hashDelete.js +4 -5
  1199. package/dist/node_modules/lodash-es/_hashGet.js +8 -9
  1200. package/dist/node_modules/lodash-es/_hashHas.js +6 -7
  1201. package/dist/node_modules/lodash-es/_hashSet.js +6 -7
  1202. package/dist/node_modules/lodash-es/_initCloneArray.js +5 -6
  1203. package/dist/node_modules/lodash-es/_initCloneByTag.js +28 -29
  1204. package/dist/node_modules/lodash-es/_initCloneObject.js +7 -8
  1205. package/dist/node_modules/lodash-es/_isFlattenable.js +8 -9
  1206. package/dist/node_modules/lodash-es/_isIndex.js +5 -6
  1207. package/dist/node_modules/lodash-es/_isIterateeCall.js +9 -10
  1208. package/dist/node_modules/lodash-es/_isKey.js +8 -9
  1209. package/dist/node_modules/lodash-es/_isKeyable.js +3 -4
  1210. package/dist/node_modules/lodash-es/_isMasked.js +8 -9
  1211. package/dist/node_modules/lodash-es/_isPrototype.js +5 -6
  1212. package/dist/node_modules/lodash-es/_isStrictComparable.js +5 -6
  1213. package/dist/node_modules/lodash-es/_listCacheClear.js +3 -4
  1214. package/dist/node_modules/lodash-es/_listCacheDelete.js +7 -8
  1215. package/dist/node_modules/lodash-es/_listCacheGet.js +5 -6
  1216. package/dist/node_modules/lodash-es/_listCacheHas.js +5 -6
  1217. package/dist/node_modules/lodash-es/_listCacheSet.js +5 -6
  1218. package/dist/node_modules/lodash-es/_mapCacheClear.js +9 -10
  1219. package/dist/node_modules/lodash-es/_mapCacheDelete.js +6 -7
  1220. package/dist/node_modules/lodash-es/_mapCacheGet.js +5 -6
  1221. package/dist/node_modules/lodash-es/_mapCacheHas.js +5 -6
  1222. package/dist/node_modules/lodash-es/_mapCacheSet.js +5 -6
  1223. package/dist/node_modules/lodash-es/_mapToArray.js +3 -4
  1224. package/dist/node_modules/lodash-es/_matchesStrictComparable.js +3 -4
  1225. package/dist/node_modules/lodash-es/_memoizeCapped.js +7 -8
  1226. package/dist/node_modules/lodash-es/_nativeCreate.js +3 -5
  1227. package/dist/node_modules/lodash-es/_nativeKeys.js +3 -5
  1228. package/dist/node_modules/lodash-es/_nativeKeysIn.js +3 -4
  1229. package/dist/node_modules/lodash-es/_nodeUtil.js +4 -6
  1230. package/dist/node_modules/lodash-es/_objectToString.js +5 -6
  1231. package/dist/node_modules/lodash-es/_overArg.js +3 -4
  1232. package/dist/node_modules/lodash-es/_overRest.js +8 -9
  1233. package/dist/node_modules/lodash-es/_root.js +3 -5
  1234. package/dist/node_modules/lodash-es/_safeGet.js +3 -4
  1235. package/dist/node_modules/lodash-es/_setCacheAdd.js +5 -6
  1236. package/dist/node_modules/lodash-es/_setCacheHas.js +3 -4
  1237. package/dist/node_modules/lodash-es/_setToArray.js +3 -4
  1238. package/dist/node_modules/lodash-es/_setToString.js +4 -6
  1239. package/dist/node_modules/lodash-es/_shortOut.js +6 -7
  1240. package/dist/node_modules/lodash-es/_stackClear.js +5 -6
  1241. package/dist/node_modules/lodash-es/_stackDelete.js +3 -4
  1242. package/dist/node_modules/lodash-es/_stackGet.js +3 -4
  1243. package/dist/node_modules/lodash-es/_stackHas.js +3 -4
  1244. package/dist/node_modules/lodash-es/_stackSet.js +10 -11
  1245. package/dist/node_modules/lodash-es/_strictIndexOf.js +3 -4
  1246. package/dist/node_modules/lodash-es/_stringSize.js +7 -8
  1247. package/dist/node_modules/lodash-es/_stringToPath.js +5 -7
  1248. package/dist/node_modules/lodash-es/_toKey.js +7 -8
  1249. package/dist/node_modules/lodash-es/_toSource.js +7 -8
  1250. package/dist/node_modules/lodash-es/_trimmedEndIndex.js +5 -6
  1251. package/dist/node_modules/lodash-es/_unicodeSize.js +16 -17
  1252. package/dist/node_modules/lodash-es/clone.js +6 -7
  1253. package/dist/node_modules/lodash-es/cloneDeep.js +6 -7
  1254. package/dist/node_modules/lodash-es/constant.js +3 -4
  1255. package/dist/node_modules/lodash-es/defaults.js +11 -13
  1256. package/dist/node_modules/lodash-es/eq.js +3 -4
  1257. package/dist/node_modules/lodash-es/filter.js +8 -9
  1258. package/dist/node_modules/lodash-es/find.js +4 -6
  1259. package/dist/node_modules/lodash-es/findIndex.js +9 -10
  1260. package/dist/node_modules/lodash-es/flatMap.js +6 -7
  1261. package/dist/node_modules/lodash-es/flatten.js +5 -6
  1262. package/dist/node_modules/lodash-es/forEach.js +8 -9
  1263. package/dist/node_modules/lodash-es/forIn.js +7 -8
  1264. package/dist/node_modules/lodash-es/forOwn.js +6 -7
  1265. package/dist/node_modules/lodash-es/get.js +5 -6
  1266. package/dist/node_modules/lodash-es/has.js +6 -7
  1267. package/dist/node_modules/lodash-es/hasIn.js +6 -7
  1268. package/dist/node_modules/lodash-es/identity.js +3 -4
  1269. package/dist/node_modules/lodash-es/isArguments.js +6 -8
  1270. package/dist/node_modules/lodash-es/isArray.js +2 -4
  1271. package/dist/node_modules/lodash-es/isArrayLike.js +6 -7
  1272. package/dist/node_modules/lodash-es/isArrayLikeObject.js +6 -7
  1273. package/dist/node_modules/lodash-es/isBuffer.js +4 -6
  1274. package/dist/node_modules/lodash-es/isEmpty.js +17 -18
  1275. package/dist/node_modules/lodash-es/isFunction.js +9 -10
  1276. package/dist/node_modules/lodash-es/isLength.js +5 -6
  1277. package/dist/node_modules/lodash-es/isMap.js +5 -7
  1278. package/dist/node_modules/lodash-es/isObject.js +3 -4
  1279. package/dist/node_modules/lodash-es/isObjectLike.js +3 -4
  1280. package/dist/node_modules/lodash-es/isPlainObject.js +12 -13
  1281. package/dist/node_modules/lodash-es/isSet.js +5 -7
  1282. package/dist/node_modules/lodash-es/isString.js +8 -9
  1283. package/dist/node_modules/lodash-es/isSymbol.js +7 -8
  1284. package/dist/node_modules/lodash-es/isTypedArray.js +5 -7
  1285. package/dist/node_modules/lodash-es/isUndefined.js +3 -4
  1286. package/dist/node_modules/lodash-es/keys.js +7 -8
  1287. package/dist/node_modules/lodash-es/keysIn.js +7 -8
  1288. package/dist/node_modules/lodash-es/last.js +3 -4
  1289. package/dist/node_modules/lodash-es/map.js +8 -9
  1290. package/dist/node_modules/lodash-es/mapValues.js +8 -9
  1291. package/dist/node_modules/lodash-es/max.js +7 -8
  1292. package/dist/node_modules/lodash-es/memoize.js +8 -9
  1293. package/dist/node_modules/lodash-es/merge.js +5 -7
  1294. package/dist/node_modules/lodash-es/min.js +7 -8
  1295. package/dist/node_modules/lodash-es/minBy.js +7 -8
  1296. package/dist/node_modules/lodash-es/noop.js +3 -4
  1297. package/dist/node_modules/lodash-es/now.js +4 -6
  1298. package/dist/node_modules/lodash-es/pick.js +5 -7
  1299. package/dist/node_modules/lodash-es/property.js +8 -9
  1300. package/dist/node_modules/lodash-es/range.js +3 -5
  1301. package/dist/node_modules/lodash-es/reduce.js +10 -11
  1302. package/dist/node_modules/lodash-es/size.js +12 -13
  1303. package/dist/node_modules/lodash-es/sortBy.js +7 -9
  1304. package/dist/node_modules/lodash-es/stubArray.js +3 -4
  1305. package/dist/node_modules/lodash-es/stubFalse.js +3 -4
  1306. package/dist/node_modules/lodash-es/toFinite.js +6 -7
  1307. package/dist/node_modules/lodash-es/toInteger.js +5 -6
  1308. package/dist/node_modules/lodash-es/toNumber.js +13 -14
  1309. package/dist/node_modules/lodash-es/toPlainObject.js +6 -7
  1310. package/dist/node_modules/lodash-es/toString.js +5 -6
  1311. package/dist/node_modules/lodash-es/union.js +7 -9
  1312. package/dist/node_modules/lodash-es/uniqBy.js +6 -7
  1313. package/dist/node_modules/lodash-es/uniqueId.js +7 -8
  1314. package/dist/node_modules/lodash-es/values.js +6 -7
  1315. package/dist/node_modules/lodash-es/zipObject.js +6 -7
  1316. package/dist/node_modules/longest-streak/index.js +2 -4
  1317. package/dist/node_modules/markdown-table/index.js +9 -11
  1318. package/dist/node_modules/marked/lib/marked.esm.js +685 -687
  1319. package/dist/node_modules/mdast-util-find-and-replace/lib/index.js +12 -14
  1320. package/dist/node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp/index.js +2 -4
  1321. package/dist/node_modules/mdast-util-from-markdown/lib/index.js +180 -182
  1322. package/dist/node_modules/mdast-util-gfm/lib/index.js +18 -20
  1323. package/dist/node_modules/mdast-util-gfm-autolink-literal/lib/index.js +67 -69
  1324. package/dist/node_modules/mdast-util-gfm-footnote/lib/index.js +45 -47
  1325. package/dist/node_modules/mdast-util-gfm-strikethrough/lib/index.js +13 -15
  1326. package/dist/node_modules/mdast-util-gfm-table/lib/index.js +28 -30
  1327. package/dist/node_modules/mdast-util-gfm-task-list-item/lib/index.js +14 -16
  1328. package/dist/node_modules/mdast-util-math/lib/index.js +13 -15
  1329. package/dist/node_modules/mdast-util-phrasing/lib/index.js +3 -5
  1330. package/dist/node_modules/mdast-util-to-hast/lib/footer.js +9 -11
  1331. package/dist/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js +2 -4
  1332. package/dist/node_modules/mdast-util-to-hast/lib/handlers/break.js +2 -4
  1333. package/dist/node_modules/mdast-util-to-hast/lib/handlers/code.js +2 -4
  1334. package/dist/node_modules/mdast-util-to-hast/lib/handlers/delete.js +2 -4
  1335. package/dist/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js +2 -4
  1336. package/dist/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js +4 -6
  1337. package/dist/node_modules/mdast-util-to-hast/lib/handlers/heading.js +2 -4
  1338. package/dist/node_modules/mdast-util-to-hast/lib/handlers/html.js +2 -4
  1339. package/dist/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js +6 -8
  1340. package/dist/node_modules/mdast-util-to-hast/lib/handlers/image.js +4 -6
  1341. package/dist/node_modules/mdast-util-to-hast/lib/handlers/index.js +53 -55
  1342. package/dist/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js +2 -4
  1343. package/dist/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js +6 -8
  1344. package/dist/node_modules/mdast-util-to-hast/lib/handlers/link.js +4 -6
  1345. package/dist/node_modules/mdast-util-to-hast/lib/handlers/list-item.js +13 -15
  1346. package/dist/node_modules/mdast-util-to-hast/lib/handlers/list.js +2 -4
  1347. package/dist/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js +2 -4
  1348. package/dist/node_modules/mdast-util-to-hast/lib/handlers/root.js +2 -4
  1349. package/dist/node_modules/mdast-util-to-hast/lib/handlers/strong.js +2 -4
  1350. package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js +2 -4
  1351. package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-row.js +2 -4
  1352. package/dist/node_modules/mdast-util-to-hast/lib/handlers/table.js +4 -6
  1353. package/dist/node_modules/mdast-util-to-hast/lib/handlers/text.js +4 -6
  1354. package/dist/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js +2 -4
  1355. package/dist/node_modules/mdast-util-to-hast/lib/index.js +6 -8
  1356. package/dist/node_modules/mdast-util-to-hast/lib/revert.js +2 -4
  1357. package/dist/node_modules/mdast-util-to-hast/lib/state.js +59 -61
  1358. package/dist/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js +4 -6
  1359. package/dist/node_modules/mdast-util-to-markdown/lib/handle/break.js +4 -6
  1360. package/dist/node_modules/mdast-util-to-markdown/lib/handle/code.js +16 -18
  1361. package/dist/node_modules/mdast-util-to-markdown/lib/handle/definition.js +4 -6
  1362. package/dist/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js +12 -14
  1363. package/dist/node_modules/mdast-util-to-markdown/lib/handle/heading.js +6 -8
  1364. package/dist/node_modules/mdast-util-to-markdown/lib/handle/html.js +4 -6
  1365. package/dist/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js +4 -6
  1366. package/dist/node_modules/mdast-util-to-markdown/lib/handle/image.js +6 -8
  1367. package/dist/node_modules/mdast-util-to-markdown/lib/handle/index.js +41 -43
  1368. package/dist/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js +5 -7
  1369. package/dist/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js +4 -6
  1370. package/dist/node_modules/mdast-util-to-markdown/lib/handle/link.js +9 -11
  1371. package/dist/node_modules/mdast-util-to-markdown/lib/handle/list-item.js +5 -7
  1372. package/dist/node_modules/mdast-util-to-markdown/lib/handle/list.js +10 -12
  1373. package/dist/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js +2 -4
  1374. package/dist/node_modules/mdast-util-to-markdown/lib/handle/root.js +4 -6
  1375. package/dist/node_modules/mdast-util-to-markdown/lib/handle/strong.js +12 -14
  1376. package/dist/node_modules/mdast-util-to-markdown/lib/handle/text.js +2 -4
  1377. package/dist/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js +5 -7
  1378. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js +2 -4
  1379. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js +4 -6
  1380. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js +2 -4
  1381. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js +2 -4
  1382. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-fence.js +2 -4
  1383. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js +2 -4
  1384. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-quote.js +2 -4
  1385. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js +2 -4
  1386. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule.js +2 -4
  1387. package/dist/node_modules/mdast-util-to-markdown/lib/util/check-strong.js +2 -4
  1388. package/dist/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js +2 -4
  1389. package/dist/node_modules/mdast-util-to-markdown/lib/util/encode-info.js +4 -6
  1390. package/dist/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js +2 -4
  1391. package/dist/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js +7 -8
  1392. package/dist/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js +4 -6
  1393. package/dist/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js +4 -6
  1394. package/dist/node_modules/mdast-util-to-string/lib/index.js +12 -14
  1395. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-Q4EWVU46.js +374 -378
  1396. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-DXYQGD6D.js +1347 -1349
  1397. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-AHTNJAMY.js +549 -555
  1398. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-336JU56O.js +38 -40
  1399. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-426QAEUC.js +7 -9
  1400. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-4BX2VUAB.js +4 -6
  1401. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-4TB4RGXK.js +198 -204
  1402. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-55IACEB6.js +5 -7
  1403. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5FUZZQ4R.js +2345 -2347
  1404. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5PVQY5BW.js +253 -257
  1405. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-AGHRB4JF.js +20 -22
  1406. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-BSJP7CBP.js +35 -37
  1407. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-EDXVE4YY.js +15 -17
  1408. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ENJZ2VHE.js +344 -346
  1409. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-FMBD7UC4.js +3 -5
  1410. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ICPOFSXX.js +718 -746
  1411. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-OYMX7WX6.js +588 -594
  1412. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QZHKN3VN.js +4 -8
  1413. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-U2HBQHQK.js +204 -206
  1414. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-X2U36JSP.js +37 -39
  1415. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-XPW4576I.js +891 -893
  1416. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-YZCP3GAM.js +37 -39
  1417. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ZZ45TVLE.js +13 -15
  1418. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-6PBFFD2Q.js +9 -11
  1419. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-HSJHXN6E.js +9 -11
  1420. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/cose-bilkent-S5V4N54A.js +114 -116
  1421. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/dagre-KV5264BT.js +188 -190
  1422. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-5BDNPKRD.js +70 -72
  1423. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-G4DWMVQ6.js +185 -189
  1424. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-MMDJMWI5.js +154 -156
  1425. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-TYMM5635.js +72 -76
  1426. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-SMLLAGMA.js +75 -79
  1427. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-DWJPFMVM.js +896 -900
  1428. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-T4ZO3ILL.js +685 -687
  1429. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-UUTBAWPF.js +569 -571
  1430. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-42DDH7IO.js +15 -17
  1431. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ishikawaDiagram-UXIWVN3A.js +304 -308
  1432. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/journeyDiagram-VCZTEJTY.js +377 -379
  1433. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/kanban-definition-6JOO6SKY.js +114 -116
  1434. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/mindmap-definition-QFDTVHPH.js +87 -91
  1435. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-DEJITSTG.js +94 -96
  1436. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/quadrantDiagram-34T5L4WZ.js +273 -279
  1437. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/requirementDiagram-MS252O5E.js +59 -63
  1438. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-XADWPNL6.js +202 -212
  1439. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-FGHM5R23.js +564 -568
  1440. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-FHFEXIEX.js +155 -157
  1441. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-QKLJ7IA2.js +9 -11
  1442. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-GMOUNBTQ.js +559 -561
  1443. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-DHZGUBPP.js +370 -372
  1444. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/wardleyDiagram-NUSXRM2D.js +450 -454
  1445. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/xychartDiagram-5P7HB3ND.js +658 -680
  1446. package/dist/node_modules/mermaid/dist/mermaid.core.js +430 -434
  1447. package/dist/node_modules/micromark/lib/constructs.js +79 -80
  1448. package/dist/node_modules/micromark/lib/create-tokenizer.js +12 -14
  1449. package/dist/node_modules/micromark/lib/initialize/content.js +7 -9
  1450. package/dist/node_modules/micromark/lib/initialize/document.js +14 -15
  1451. package/dist/node_modules/micromark/lib/initialize/flow.js +7 -9
  1452. package/dist/node_modules/micromark/lib/initialize/text.js +6 -8
  1453. package/dist/node_modules/micromark/lib/parse.js +18 -20
  1454. package/dist/node_modules/micromark/lib/postprocess.js +4 -6
  1455. package/dist/node_modules/micromark/lib/preprocess.js +4 -6
  1456. package/dist/node_modules/micromark-core-commonmark/lib/attention.js +18 -20
  1457. package/dist/node_modules/micromark-core-commonmark/lib/autolink.js +15 -17
  1458. package/dist/node_modules/micromark-core-commonmark/lib/blank-line.js +9 -11
  1459. package/dist/node_modules/micromark-core-commonmark/lib/block-quote.js +13 -15
  1460. package/dist/node_modules/micromark-core-commonmark/lib/character-escape.js +6 -8
  1461. package/dist/node_modules/micromark-core-commonmark/lib/character-reference.js +14 -16
  1462. package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.js +21 -22
  1463. package/dist/node_modules/micromark-core-commonmark/lib/code-indented.js +15 -16
  1464. package/dist/node_modules/micromark-core-commonmark/lib/code-text.js +11 -13
  1465. package/dist/node_modules/micromark-core-commonmark/lib/content.js +17 -18
  1466. package/dist/node_modules/micromark-core-commonmark/lib/definition.js +29 -30
  1467. package/dist/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +6 -8
  1468. package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.js +13 -15
  1469. package/dist/node_modules/micromark-core-commonmark/lib/html-flow.js +67 -68
  1470. package/dist/node_modules/micromark-core-commonmark/lib/html-text.js +64 -66
  1471. package/dist/node_modules/micromark-core-commonmark/lib/label-end.js +111 -112
  1472. package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.js +6 -8
  1473. package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.js +6 -8
  1474. package/dist/node_modules/micromark-core-commonmark/lib/line-ending.js +6 -8
  1475. package/dist/node_modules/micromark-core-commonmark/lib/list.js +31 -32
  1476. package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.js +10 -12
  1477. package/dist/node_modules/micromark-core-commonmark/lib/thematic-break.js +9 -11
  1478. package/dist/node_modules/micromark-extension-gfm/index.js +14 -16
  1479. package/dist/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js +120 -122
  1480. package/dist/node_modules/micromark-extension-gfm-footnote/lib/syntax.js +31 -33
  1481. package/dist/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js +9 -11
  1482. package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.js +4 -6
  1483. package/dist/node_modules/micromark-extension-gfm-table/lib/infer.js +2 -4
  1484. package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.js +34 -36
  1485. package/dist/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js +18 -20
  1486. package/dist/node_modules/micromark-extension-math/lib/math-flow.js +20 -21
  1487. package/dist/node_modules/micromark-extension-math/lib/math-text.js +9 -11
  1488. package/dist/node_modules/micromark-extension-math/lib/syntax.js +6 -8
  1489. package/dist/node_modules/micromark-factory-destination/index.js +8 -10
  1490. package/dist/node_modules/micromark-factory-label/index.js +5 -7
  1491. package/dist/node_modules/micromark-factory-space/index.js +5 -7
  1492. package/dist/node_modules/micromark-factory-title/index.js +6 -8
  1493. package/dist/node_modules/micromark-factory-whitespace/index.js +5 -7
  1494. package/dist/node_modules/micromark-util-character/index.js +12 -14
  1495. package/dist/node_modules/micromark-util-chunked/index.js +4 -6
  1496. package/dist/node_modules/micromark-util-classify-character/index.js +5 -7
  1497. package/dist/node_modules/micromark-util-combine-extensions/index.js +11 -13
  1498. package/dist/node_modules/micromark-util-decode-numeric-character-reference/index.js +2 -4
  1499. package/dist/node_modules/micromark-util-decode-string/index.js +9 -11
  1500. package/dist/node_modules/micromark-util-html-tag-name/index.js +2 -4
  1501. package/dist/node_modules/micromark-util-normalize-identifier/index.js +2 -4
  1502. package/dist/node_modules/micromark-util-resolve-all/index.js +2 -4
  1503. package/dist/node_modules/micromark-util-sanitize-uri/index.js +4 -6
  1504. package/dist/node_modules/micromark-util-subtokenize/index.js +8 -10
  1505. package/dist/node_modules/micromark-util-subtokenize/lib/splice-buffer.js +8 -10
  1506. package/dist/node_modules/motion/dist/es/react.js +2 -2
  1507. package/dist/node_modules/nanoid/index.browser.js +4 -6
  1508. package/dist/node_modules/nanoid/url-alphabet/index.js +2 -4
  1509. package/dist/node_modules/property-information/index.js +23 -25
  1510. package/dist/node_modules/property-information/lib/aria.js +39 -41
  1511. package/dist/node_modules/property-information/lib/find.js +16 -18
  1512. package/dist/node_modules/property-information/lib/hast-to-react.js +2 -4
  1513. package/dist/node_modules/property-information/lib/html.js +94 -96
  1514. package/dist/node_modules/property-information/lib/normalize.js +2 -4
  1515. package/dist/node_modules/property-information/lib/svg.js +77 -79
  1516. package/dist/node_modules/property-information/lib/util/case-insensitive-transform.js +4 -6
  1517. package/dist/node_modules/property-information/lib/util/case-sensitive-transform.js +2 -4
  1518. package/dist/node_modules/property-information/lib/util/create.js +8 -10
  1519. package/dist/node_modules/property-information/lib/util/defined-info.js +11 -13
  1520. package/dist/node_modules/property-information/lib/util/info.js +3 -5
  1521. package/dist/node_modules/property-information/lib/util/merge.js +4 -6
  1522. package/dist/node_modules/property-information/lib/util/schema.js +3 -5
  1523. package/dist/node_modules/property-information/lib/util/types.js +14 -15
  1524. package/dist/node_modules/property-information/lib/xlink.js +3 -5
  1525. package/dist/node_modules/property-information/lib/xml.js +3 -5
  1526. package/dist/node_modules/property-information/lib/xmlns.js +5 -7
  1527. package/dist/node_modules/rehype-harden/dist/index.js +45 -47
  1528. package/dist/node_modules/rehype-katex/lib/index.js +23 -25
  1529. package/dist/node_modules/rehype-raw/lib/index.js +4 -6
  1530. package/dist/node_modules/rehype-sanitize/lib/index.js +4 -6
  1531. package/dist/node_modules/remark-gfm/lib/index.js +7 -9
  1532. package/dist/node_modules/remark-math/lib/index.js +7 -9
  1533. package/dist/node_modules/remark-parse/lib/index.js +4 -6
  1534. package/dist/node_modules/remark-rehype/lib/index.js +5 -7
  1535. package/dist/node_modules/remend/dist/index.js +324 -326
  1536. package/dist/node_modules/roughjs/bundled/rough.esm.js +875 -877
  1537. package/dist/node_modules/shiki/dist/bundle-full.js +12 -13
  1538. package/dist/node_modules/shiki/dist/chunk-CtajNgzt.js +8 -10
  1539. package/dist/node_modules/shiki/dist/engine-oniguruma.js +5 -7
  1540. package/dist/node_modules/shiki/dist/langs-bundle-full-DfKZStlK.js +5 -7
  1541. package/dist/node_modules/shiki/dist/themes.js +3 -5
  1542. package/dist/node_modules/shiki/dist/wasm.js +2 -2
  1543. package/dist/node_modules/space-separated-tokens/index.js +3 -5
  1544. package/dist/node_modules/streamdown/dist/chunk-BO2N2NFS.js +699 -701
  1545. package/dist/node_modules/streamdown/dist/highlighted-body-OFNGDK62.js +8 -10
  1546. package/dist/node_modules/streamdown/dist/index.js +1 -1
  1547. package/dist/node_modules/streamdown/dist/mermaid-GHXKKRXX.js +2 -2
  1548. package/dist/node_modules/streamdown/node_modules/marked/lib/marked.esm.js +712 -709
  1549. package/dist/node_modules/stringify-entities/lib/constant/dangerous.js +2 -4
  1550. package/dist/node_modules/stringify-entities/lib/core.js +16 -18
  1551. package/dist/node_modules/stringify-entities/lib/index.js +5 -7
  1552. package/dist/node_modules/stringify-entities/lib/util/format-smart.js +8 -10
  1553. package/dist/node_modules/stringify-entities/lib/util/to-decimal.js +4 -6
  1554. package/dist/node_modules/stringify-entities/lib/util/to-hexadecimal.js +4 -6
  1555. package/dist/node_modules/stringify-entities/lib/util/to-named.js +12 -14
  1556. package/dist/node_modules/style-to-js/cjs/index.js +7 -9
  1557. package/dist/node_modules/style-to-js/cjs/utilities.js +4 -6
  1558. package/dist/node_modules/style-to-object/cjs/index.js +6 -8
  1559. package/dist/node_modules/stylis/src/Enum.js +2 -4
  1560. package/dist/node_modules/stylis/src/Parser.js +36 -38
  1561. package/dist/node_modules/stylis/src/Serializer.js +15 -17
  1562. package/dist/node_modules/stylis/src/Tokenizer.js +51 -53
  1563. package/dist/node_modules/stylis/src/Utility.js +15 -17
  1564. package/dist/node_modules/trim-lines/index.js +8 -10
  1565. package/dist/node_modules/trough/lib/index.js +4 -6
  1566. package/dist/node_modules/ts-dedent/esm/index.js +2 -4
  1567. package/dist/node_modules/unified/lib/callable-instance.js +2 -4
  1568. package/dist/node_modules/unified/lib/index.js +101 -102
  1569. package/dist/node_modules/unified/node_modules/is-plain-obj/index.js +2 -4
  1570. package/dist/node_modules/unist-util-find-after/lib/index.js +4 -6
  1571. package/dist/node_modules/unist-util-is/lib/index.js +29 -31
  1572. package/dist/node_modules/unist-util-position/lib/index.js +5 -7
  1573. package/dist/node_modules/unist-util-stringify-position/lib/index.js +8 -10
  1574. package/dist/node_modules/unist-util-visit/lib/index.js +4 -6
  1575. package/dist/node_modules/unist-util-visit-parents/lib/color.js +2 -4
  1576. package/dist/node_modules/unist-util-visit-parents/lib/index.js +20 -21
  1577. package/dist/node_modules/uuid/dist/esm-browser/native.js +2 -3
  1578. package/dist/node_modules/uuid/dist/esm-browser/rng.js +6 -8
  1579. package/dist/node_modules/uuid/dist/esm-browser/stringify.js +5 -7
  1580. package/dist/node_modules/uuid/dist/esm-browser/v4.js +9 -10
  1581. package/dist/node_modules/vaul/dist/index.js +274 -276
  1582. package/dist/node_modules/vfile/lib/index.js +42 -44
  1583. package/dist/node_modules/vfile/lib/minpath.browser.js +20 -22
  1584. package/dist/node_modules/vfile/lib/minproc.browser.js +3 -5
  1585. package/dist/node_modules/vfile/lib/minurl.browser.js +6 -8
  1586. package/dist/node_modules/vfile/lib/minurl.shared.js +2 -4
  1587. package/dist/node_modules/vfile-location/lib/index.js +5 -7
  1588. package/dist/node_modules/vfile-message/lib/index.js +5 -7
  1589. package/dist/node_modules/vscode-jsonrpc/browser.js +6 -8
  1590. package/dist/node_modules/vscode-jsonrpc/lib/browser/main.js +9 -11
  1591. package/dist/node_modules/vscode-jsonrpc/lib/browser/ril.js +6 -8
  1592. package/dist/node_modules/vscode-jsonrpc/lib/common/api.js +26 -28
  1593. package/dist/node_modules/vscode-jsonrpc/lib/common/cancellation.js +15 -17
  1594. package/dist/node_modules/vscode-jsonrpc/lib/common/connection.js +11 -13
  1595. package/dist/node_modules/vscode-jsonrpc/lib/common/disposable.js +4 -6
  1596. package/dist/node_modules/vscode-jsonrpc/lib/common/events.js +6 -8
  1597. package/dist/node_modules/vscode-jsonrpc/lib/common/is.js +4 -6
  1598. package/dist/node_modules/vscode-jsonrpc/lib/common/linkedMap.js +4 -6
  1599. package/dist/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js +4 -6
  1600. package/dist/node_modules/vscode-jsonrpc/lib/common/messageReader.js +9 -11
  1601. package/dist/node_modules/vscode-jsonrpc/lib/common/messageWriter.js +29 -31
  1602. package/dist/node_modules/vscode-jsonrpc/lib/common/messages.js +6 -8
  1603. package/dist/node_modules/vscode-jsonrpc/lib/common/ral.js +4 -6
  1604. package/dist/node_modules/vscode-jsonrpc/lib/common/semaphore.js +6 -8
  1605. package/dist/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +6 -8
  1606. package/dist/node_modules/vscode-languageserver-protocol/lib/browser/main.js +8 -10
  1607. package/dist/node_modules/vscode-languageserver-protocol/lib/common/api.js +21 -23
  1608. package/dist/node_modules/vscode-languageserver-protocol/lib/common/connection.js +6 -8
  1609. package/dist/node_modules/vscode-languageserver-protocol/lib/common/messages.js +6 -8
  1610. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js +6 -8
  1611. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js +6 -8
  1612. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js +6 -8
  1613. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js +6 -8
  1614. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js +12 -14
  1615. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js +6 -8
  1616. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js +6 -8
  1617. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js +6 -8
  1618. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js +6 -8
  1619. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js +6 -8
  1620. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js +6 -8
  1621. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.js +53 -55
  1622. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js +6 -8
  1623. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js +6 -8
  1624. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js +8 -10
  1625. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js +10 -12
  1626. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js +6 -8
  1627. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js +6 -8
  1628. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js +6 -8
  1629. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js +6 -8
  1630. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js +6 -8
  1631. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js +6 -8
  1632. package/dist/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js +4 -6
  1633. package/dist/node_modules/vscode-languageserver-textdocument/lib/esm/main.js +19 -21
  1634. package/dist/node_modules/vscode-languageserver-types/lib/esm/main.js +847 -849
  1635. package/dist/node_modules/vscode-uri/lib/esm/index.js +4 -6
  1636. package/dist/node_modules/web-namespaces/index.js +2 -4
  1637. package/dist/node_modules/zwitch/index.js +5 -7
  1638. package/dist/packages/contracts/dist/enums/index.js +12 -14
  1639. package/dist/packages/contracts/dist/enums/registry.enum.js +4 -6
  1640. package/dist/packages/contracts/dist/enums/sort-order.enum.js +4 -6
  1641. package/dist/packages/contracts/dist/enums/user-type.enum.js +4 -6
  1642. package/dist/packages/contracts/dist/enums/workflow-state.enum.js +4 -6
  1643. package/dist/pages/DashboardPage.js +78 -59
  1644. package/dist/pages/DebugPage.js +17 -12
  1645. package/dist/pages/DebugWorkflowDetailsPage.js +105 -91
  1646. package/dist/pages/DebugWorkflowsPage.js +162 -125
  1647. package/dist/pages/EmbedWorkbenchPage.js +63 -48
  1648. package/dist/pages/PreviewWorkbenchPage.js +370 -271
  1649. package/dist/pages/RunsListPage.js +46 -43
  1650. package/dist/pages/RunsPage.js +33 -31
  1651. package/dist/pages/StudioLandingPage.js +132 -97
  1652. package/dist/pages/WorkbenchPage.js +65 -57
  1653. package/dist/pages/WorkflowDebugPage.js +96 -74
  1654. package/dist/pages/WorkspacePage.js +88 -72
  1655. package/dist/pages/WorkspaceRunsPage.js +75 -43
  1656. package/dist/pages/WorkspacesPage.js +17 -22
  1657. package/dist/providers/ComponentOverridesProvider.js +12 -9
  1658. package/dist/providers/InvalidationEventsProvider.js +35 -33
  1659. package/dist/providers/QueryProvider.js +18 -14
  1660. package/dist/providers/SseProvider.js +29 -28
  1661. package/dist/providers/StudioPreferencesProvider.js +54 -0
  1662. package/dist/providers/StudioProvider.js +19 -14
  1663. package/dist/routing/LocalRouter.js +9 -6
  1664. package/dist/services/createApiClient.js +5 -7
  1665. package/dist/services/eventEmitter.js +2 -3
  1666. package/dist/services/index.js +2 -2
  1667. package/dist/types/ai.types.js +5 -7
  1668. package/package.json +8 -8
  1669. package/dist/_virtual/_rolldown/runtime.js +0 -20
  1670. package/dist/features/documents/renderers/SecretInputRenderer.js +0 -89
  1671. package/dist/features/workbench/components/RemoteFileTabsBar.js +0 -19
  1672. package/dist/features/workbench/components/RemoteFileTree.js +0 -59
  1673. package/dist/features/workbench/components/WorkbenchFilesPanel.js +0 -56
  1674. package/dist/features/workbench/components/WorkbenchFloatingPanel.js +0 -40
  1675. package/dist/features/workbench/components/WorkbenchFlowPanel.js +0 -38
  1676. package/dist/features/workbench/components/WorkbenchSecretsPanel.js +0 -153
  1677. package/dist/features/workbench/providers/RemoteFileExplorerProvider.js +0 -145
  1678. package/dist/frontend/studio/node_modules/lodash/_Symbol.js +0 -9
  1679. package/dist/frontend/studio/node_modules/lodash/_baseGetTag.js +0 -15
  1680. package/dist/frontend/studio/node_modules/lodash/_baseTrim.js +0 -13
  1681. package/dist/frontend/studio/node_modules/lodash/_freeGlobal.js +0 -8
  1682. package/dist/frontend/studio/node_modules/lodash/_getRawTag.js +0 -19
  1683. package/dist/frontend/studio/node_modules/lodash/_objectToString.js +0 -12
  1684. package/dist/frontend/studio/node_modules/lodash/_root.js +0 -10
  1685. package/dist/frontend/studio/node_modules/lodash/_trimmedEndIndex.js +0 -13
  1686. package/dist/frontend/studio/node_modules/lodash/isObject.js +0 -12
  1687. package/dist/frontend/studio/node_modules/lodash/isObjectLike.js +0 -11
  1688. package/dist/frontend/studio/node_modules/lodash/isSymbol.js +0 -14
  1689. package/dist/frontend/studio/node_modules/lodash/now.js +0 -12
  1690. package/dist/frontend/studio/node_modules/lodash/toNumber.js +0 -24
  1691. package/dist/node_modules/@dagrejs/dagre/dist/dagre.esm.js +0 -1867
@@ -1,28 +1,27 @@
1
1
  "use client";
2
- import e from "../../../../classcat/index.js";
3
- import { ConnectionLineType as t, ConnectionMode as n, MarkerType as r, PanOnScrollMode as i, Position as a, ResizeControlVariant as o, SelectionMode as s, XYDrag as c, XYHandle as l, XYMinimap as u, XYPanZoom as d, XYResizer as f, addEdge as p, adoptUserNodes as m, areSetsEqual as h, calculateNodePosition as g, createMarkerIds as _, defaultAriaLabelConfig as v, devWarn as y, elementSelectionKeys as b, errorMessages as x, evaluateAbsolutePosition as S, fitViewport as C, getBezierEdgeCenter as w, getBezierPath as T, getBoundsOfRects as E, getConnectionStatus as D, getDimensions as O, getEdgePosition as k, getElementsToRemove as A, getElevatedEdgeZIndex as j, getEventPosition as M, getHandlePosition as N, getHostForElement as P, getInternalNodesBounds as F, getMarkerId as ee, getNodeDimensions as I, getNodesBounds as L, getNodesInside as R, getOverlappingArea as z, getSmoothStepPath as B, getStraightPath as V, getViewportForBounds as H, handleExpandParent as te, infiniteExtent as ne, initialConnection as re, isEdgeBase as ie, isEdgeVisible as ae, isInputDOMNode as oe, isMacOs as se, isMouseEvent as ce, isNodeBase as le, isNumeric as ue, isRectObject as de, mergeAriaLabelConfig as fe, nodeHasDimensions as pe, nodeToRect as me, panBy as he, pointToRendererPoint as ge, rendererPointToPoint as _e, snapPosition as ve, updateAbsolutePositions as ye, updateConnectionLookup as be, updateNodeInternals as xe, withResolvers as Se } from "../../../system/dist/esm/index.js";
4
- import { createContext as Ce, forwardRef as we, memo as U, useCallback as W, useContext as Te, useEffect as G, useLayoutEffect as Ee, useMemo as K, useRef as q, useState as J } from "react";
5
- import { Fragment as De, jsx as Y, jsxs as X } from "react/jsx-runtime";
6
- import { createPortal as Oe } from "react-dom";
7
- import { createWithEqualityFn as ke, useStoreWithEqualityFn as Ae } from "zustand/traditional";
8
- import { shallow as Z } from "zustand/shallow";
9
- //#region ../../node_modules/@xyflow/react/dist/esm/index.js
10
- var je = Ce(null), Me = je.Provider, Ne = x.error001();
11
- function Q(e, t) {
12
- let n = Te(je);
13
- if (n === null) throw Error(Ne);
14
- return Ae(n, e, t);
15
- }
16
- function $() {
17
- let e = Te(je);
18
- if (e === null) throw Error(Ne);
19
- return K(() => ({
2
+ import cc from "../../../../classcat/index.js";
3
+ import { ConnectionLineType, ConnectionMode, MarkerType, PanOnScrollMode, Position, ResizeControlVariant, SelectionMode, XYDrag, XYHandle, XYMinimap, XYPanZoom, XYResizer, addEdge, adoptUserNodes, areSetsEqual, calculateNodePosition, createMarkerIds, defaultAriaLabelConfig, devWarn, elementSelectionKeys, errorMessages, evaluateAbsolutePosition, fitViewport, getBezierEdgeCenter, getBezierPath, getBoundsOfRects, getConnectedEdges, getConnectionStatus, getDimensions, getEdgeCenter, getEdgePosition, getElementsToRemove, getElevatedEdgeZIndex, getEventPosition, getHandlePosition, getHostForElement, getInternalNodesBounds, getMarkerId, getNodeDimensions, getNodesBounds, getNodesInside, getOverlappingArea, getSmoothStepPath, getStraightPath, getViewportForBounds, handleExpandParent, infiniteExtent, initialConnection, isEdgeBase, isEdgeVisible, isInputDOMNode, isMacOs, isMouseEvent, isNodeBase, isNumeric, isRectObject, mergeAriaLabelConfig, nodeHasDimensions, nodeToRect, panBy, pointToRendererPoint, rendererPointToPoint, snapPosition, updateAbsolutePositions, updateConnectionLookup, updateNodeInternals, withResolvers } from "../../../system/dist/esm/index.js";
4
+ import { createContext, forwardRef, memo, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
5
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
6
+ import { createWithEqualityFn, useStoreWithEqualityFn } from "zustand/traditional";
7
+ import { shallow } from "zustand/shallow";
8
+ import { createPortal } from "react-dom";
9
+ var StoreContext = createContext(null), Provider$1 = StoreContext.Provider, zustandErrorMessage = errorMessages.error001();
10
+ function useStore(e, t) {
11
+ let n = useContext(StoreContext);
12
+ if (n === null) throw Error(zustandErrorMessage);
13
+ return useStoreWithEqualityFn(n, e, t);
14
+ }
15
+ function useStoreApi() {
16
+ let e = useContext(StoreContext);
17
+ if (e === null) throw Error(zustandErrorMessage);
18
+ return useMemo(() => ({
20
19
  getState: e.getState,
21
20
  setState: e.setState,
22
21
  subscribe: e.subscribe
23
22
  }), [e]);
24
23
  }
25
- var Pe = { display: "none" }, Fe = {
24
+ var style = { display: "none" }, ariaLiveStyle = {
26
25
  position: "absolute",
27
26
  width: 1,
28
27
  height: 1,
@@ -32,35 +31,35 @@ var Pe = { display: "none" }, Fe = {
32
31
  overflow: "hidden",
33
32
  clip: "rect(0px, 0px, 0px, 0px)",
34
33
  clipPath: "inset(100%)"
35
- }, Ie = "react-flow__node-desc", Le = "react-flow__edge-desc", Re = "react-flow__aria-live", ze = (e) => e.ariaLiveMessage, Be = (e) => e.ariaLabelConfig;
36
- function Ve({ rfId: e }) {
37
- let t = Q(ze);
38
- return Y("div", {
39
- id: `${Re}-${e}`,
34
+ }, ARIA_NODE_DESC_KEY = "react-flow__node-desc", ARIA_EDGE_DESC_KEY = "react-flow__edge-desc", ARIA_LIVE_MESSAGE = "react-flow__aria-live", ariaLiveSelector = (e) => e.ariaLiveMessage, ariaLabelConfigSelector = (e) => e.ariaLabelConfig;
35
+ function AriaLiveMessage({ rfId: e }) {
36
+ let t = useStore(ariaLiveSelector);
37
+ return jsx("div", {
38
+ id: `${ARIA_LIVE_MESSAGE}-${e}`,
40
39
  "aria-live": "assertive",
41
40
  "aria-atomic": "true",
42
- style: Fe,
41
+ style: ariaLiveStyle,
43
42
  children: t
44
43
  });
45
44
  }
46
- function He({ rfId: e, disableKeyboardA11y: t }) {
47
- let n = Q(Be);
48
- return X(De, { children: [
49
- Y("div", {
50
- id: `${Ie}-${e}`,
51
- style: Pe,
45
+ function A11yDescriptions({ rfId: e, disableKeyboardA11y: t }) {
46
+ let n = useStore(ariaLabelConfigSelector);
47
+ return jsxs(Fragment$1, { children: [
48
+ jsx("div", {
49
+ id: `${ARIA_NODE_DESC_KEY}-${e}`,
50
+ style,
52
51
  children: t ? n["node.a11yDescription.default"] : n["node.a11yDescription.keyboardDisabled"]
53
52
  }),
54
- Y("div", {
55
- id: `${Le}-${e}`,
56
- style: Pe,
53
+ jsx("div", {
54
+ id: `${ARIA_EDGE_DESC_KEY}-${e}`,
55
+ style,
57
56
  children: n["edge.a11yDescription.default"]
58
57
  }),
59
- !t && Y(Ve, { rfId: e })
58
+ !t && jsx(AriaLiveMessage, { rfId: e })
60
59
  ] });
61
60
  }
62
- var Ue = we(({ position: t = "top-left", children: n, className: r, style: i, ...a }, o) => Y("div", {
63
- className: e([
61
+ var Panel = forwardRef(({ position: t = "top-left", children: n, className: r, style: i, ...a }, o) => jsx("div", {
62
+ className: cc([
64
63
  "react-flow__panel",
65
64
  r,
66
65
  ...`${t}`.split("-")
@@ -70,13 +69,13 @@ var Ue = we(({ position: t = "top-left", children: n, className: r, style: i, ..
70
69
  ...a,
71
70
  children: n
72
71
  }));
73
- Ue.displayName = "Panel";
74
- function We({ proOptions: e, position: t = "bottom-right" }) {
75
- return e?.hideAttribution ? null : Y(Ue, {
72
+ Panel.displayName = "Panel";
73
+ function Attribution({ proOptions: e, position: t = "bottom-right" }) {
74
+ return e?.hideAttribution ? null : jsx(Panel, {
76
75
  position: t,
77
76
  className: "react-flow__attribution",
78
77
  "data-message": "Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",
79
- children: Y("a", {
78
+ children: jsx("a", {
80
79
  href: "https://reactflow.dev",
81
80
  target: "_blank",
82
81
  rel: "noopener noreferrer",
@@ -85,7 +84,7 @@ function We({ proOptions: e, position: t = "bottom-right" }) {
85
84
  })
86
85
  });
87
86
  }
88
- var Ge = (e) => {
87
+ var selector$m = (e) => {
89
88
  let t = [], n = [];
90
89
  for (let [, n] of e.nodeLookup) n.selected && t.push(n.internals.userNode);
91
90
  for (let [, t] of e.edgeLookup) t.selected && n.push(t);
@@ -93,13 +92,13 @@ var Ge = (e) => {
93
92
  selectedNodes: t,
94
93
  selectedEdges: n
95
94
  };
96
- }, Ke = (e) => e.id;
97
- function qe(e, t) {
98
- return Z(e.selectedNodes.map(Ke), t.selectedNodes.map(Ke)) && Z(e.selectedEdges.map(Ke), t.selectedEdges.map(Ke));
95
+ }, selectId = (e) => e.id;
96
+ function areEqual(e, t) {
97
+ return shallow(e.selectedNodes.map(selectId), t.selectedNodes.map(selectId)) && shallow(e.selectedEdges.map(selectId), t.selectedEdges.map(selectId));
99
98
  }
100
- function Je({ onSelectionChange: e }) {
101
- let t = $(), { selectedNodes: n, selectedEdges: r } = Q(Ge, qe);
102
- return G(() => {
99
+ function SelectionListenerInner({ onSelectionChange: e }) {
100
+ let t = useStoreApi(), { selectedNodes: n, selectedEdges: r } = useStore(selector$m, areEqual);
101
+ return useEffect(() => {
103
102
  let i = {
104
103
  nodes: n,
105
104
  edges: r
@@ -111,16 +110,16 @@ function Je({ onSelectionChange: e }) {
111
110
  e
112
111
  ]), null;
113
112
  }
114
- var Ye = (e) => !!e.onSelectionChangeHandlers;
115
- function Xe({ onSelectionChange: e }) {
116
- let t = Q(Ye);
117
- return e || t ? Y(Je, { onSelectionChange: e }) : null;
113
+ var changeSelector = (e) => !!e.onSelectionChangeHandlers;
114
+ function SelectionListener({ onSelectionChange: e }) {
115
+ let t = useStore(changeSelector);
116
+ return e || t ? jsx(SelectionListenerInner, { onSelectionChange: e }) : null;
118
117
  }
119
- var Ze = typeof window < "u" ? Ee : G, Qe = [0, 0], $e = {
118
+ var useIsomorphicLayoutEffect = typeof window < "u" ? useLayoutEffect : useEffect, defaultNodeOrigin = [0, 0], defaultViewport = {
120
119
  x: 0,
121
120
  y: 0,
122
121
  zoom: 1
123
- }, et = [.../* @__PURE__ */ "nodes.edges.defaultNodes.defaultEdges.onConnect.onConnectStart.onConnectEnd.onClickConnectStart.onClickConnectEnd.nodesDraggable.autoPanOnNodeFocus.nodesConnectable.nodesFocusable.edgesFocusable.edgesReconnectable.elevateNodesOnSelect.elevateEdgesOnSelect.minZoom.maxZoom.nodeExtent.onNodesChange.onEdgesChange.elementsSelectable.connectionMode.snapGrid.snapToGrid.translateExtent.connectOnClick.defaultEdgeOptions.fitView.fitViewOptions.onNodesDelete.onEdgesDelete.onDelete.onNodeDrag.onNodeDragStart.onNodeDragStop.onSelectionDrag.onSelectionDragStart.onSelectionDragStop.onMoveStart.onMove.onMoveEnd.noPanClassName.nodeOrigin.autoPanOnConnect.autoPanOnNodeDrag.onError.connectionRadius.isValidConnection.selectNodesOnDrag.nodeDragThreshold.connectionDragThreshold.onBeforeDelete.debug.autoPanSpeed.ariaLabelConfig.zIndexMode".split("."), "rfId"], tt = (e) => ({
122
+ }, fieldsToTrack = [.../* @__PURE__ */ "nodes.edges.defaultNodes.defaultEdges.onConnect.onConnectStart.onConnectEnd.onClickConnectStart.onClickConnectEnd.nodesDraggable.autoPanOnNodeFocus.nodesConnectable.nodesFocusable.edgesFocusable.edgesReconnectable.elevateNodesOnSelect.elevateEdgesOnSelect.minZoom.maxZoom.nodeExtent.onNodesChange.onEdgesChange.elementsSelectable.connectionMode.snapGrid.snapToGrid.translateExtent.connectOnClick.defaultEdgeOptions.fitView.fitViewOptions.onNodesDelete.onEdgesDelete.onDelete.onNodeDrag.onNodeDragStart.onNodeDragStop.onSelectionDrag.onSelectionDragStart.onSelectionDragStop.onMoveStart.onMove.onMoveEnd.noPanClassName.nodeOrigin.autoPanOnConnect.autoPanOnNodeDrag.onError.connectionRadius.isValidConnection.selectNodesOnDrag.nodeDragThreshold.connectionDragThreshold.onBeforeDelete.debug.autoPanSpeed.ariaLabelConfig.zIndexMode".split("."), "rfId"], selector$l = (e) => ({
124
123
  setNodes: e.setNodes,
125
124
  setEdges: e.setEdges,
126
125
  setMinZoom: e.setMinZoom,
@@ -129,70 +128,70 @@ var Ze = typeof window < "u" ? Ee : G, Qe = [0, 0], $e = {
129
128
  setNodeExtent: e.setNodeExtent,
130
129
  reset: e.reset,
131
130
  setDefaultNodesAndEdges: e.setDefaultNodesAndEdges
132
- }), nt = {
133
- translateExtent: ne,
134
- nodeOrigin: Qe,
131
+ }), initPrevValues = {
132
+ translateExtent: infiniteExtent,
133
+ nodeOrigin: defaultNodeOrigin,
135
134
  minZoom: .5,
136
135
  maxZoom: 2,
137
136
  elementsSelectable: !0,
138
137
  noPanClassName: "nopan",
139
138
  rfId: "1"
140
139
  };
141
- function rt(e) {
142
- let { setNodes: t, setEdges: n, setMinZoom: r, setMaxZoom: i, setTranslateExtent: a, setNodeExtent: o, reset: s, setDefaultNodesAndEdges: c } = Q(tt, Z), l = $();
143
- Ze(() => (c(e.defaultNodes, e.defaultEdges), () => {
144
- u.current = nt, s();
140
+ function StoreUpdater(e) {
141
+ let { setNodes: t, setEdges: n, setMinZoom: r, setMaxZoom: i, setTranslateExtent: a, setNodeExtent: o, reset: s, setDefaultNodesAndEdges: c } = useStore(selector$l, shallow), l = useStoreApi();
142
+ useIsomorphicLayoutEffect(() => (c(e.defaultNodes, e.defaultEdges), () => {
143
+ u.current = initPrevValues, s();
145
144
  }), []);
146
- let u = q(nt);
147
- return Ze(() => {
148
- for (let s of et) {
145
+ let u = useRef(initPrevValues);
146
+ return useIsomorphicLayoutEffect(() => {
147
+ for (let s of fieldsToTrack) {
149
148
  let c = e[s];
150
- c !== u.current[s] && e[s] !== void 0 && (s === "nodes" ? t(c) : s === "edges" ? n(c) : s === "minZoom" ? r(c) : s === "maxZoom" ? i(c) : s === "translateExtent" ? a(c) : s === "nodeExtent" ? o(c) : s === "ariaLabelConfig" ? l.setState({ ariaLabelConfig: fe(c) }) : s === "fitView" ? l.setState({ fitViewQueued: c }) : s === "fitViewOptions" ? l.setState({ fitViewOptions: c }) : l.setState({ [s]: c }));
149
+ c !== u.current[s] && e[s] !== void 0 && (s === "nodes" ? t(c) : s === "edges" ? n(c) : s === "minZoom" ? r(c) : s === "maxZoom" ? i(c) : s === "translateExtent" ? a(c) : s === "nodeExtent" ? o(c) : s === "ariaLabelConfig" ? l.setState({ ariaLabelConfig: mergeAriaLabelConfig(c) }) : s === "fitView" ? l.setState({ fitViewQueued: c }) : s === "fitViewOptions" ? l.setState({ fitViewOptions: c }) : l.setState({ [s]: c }));
151
150
  }
152
151
  u.current = e;
153
- }, et.map((t) => e[t])), null;
152
+ }, fieldsToTrack.map((t) => e[t])), null;
154
153
  }
155
- function it() {
154
+ function getMediaQuery() {
156
155
  return typeof window > "u" || !window.matchMedia ? null : window.matchMedia("(prefers-color-scheme: dark)");
157
156
  }
158
- function at(e) {
159
- let [t, n] = J(e === "system" ? null : e);
160
- return G(() => {
157
+ function useColorModeClass(e) {
158
+ let [t, n] = useState(e === "system" ? null : e);
159
+ return useEffect(() => {
161
160
  if (e !== "system") {
162
161
  n(e);
163
162
  return;
164
163
  }
165
- let t = it(), r = () => n(t?.matches ? "dark" : "light");
164
+ let t = getMediaQuery(), r = () => n(t?.matches ? "dark" : "light");
166
165
  return r(), t?.addEventListener("change", r), () => {
167
166
  t?.removeEventListener("change", r);
168
167
  };
169
- }, [e]), t === null ? it()?.matches ? "dark" : "light" : t;
168
+ }, [e]), t === null ? getMediaQuery()?.matches ? "dark" : "light" : t;
170
169
  }
171
- var ot = typeof document < "u" ? document : null;
172
- function st(e = null, t = {
173
- target: ot,
170
+ var defaultDoc = typeof document < "u" ? document : null;
171
+ function useKeyPress(e = null, t = {
172
+ target: defaultDoc,
174
173
  actInsideInputWithModifier: !0
175
174
  }) {
176
- let [n, r] = J(!1), i = q(!1), a = q(/* @__PURE__ */ new Set([])), [o, s] = K(() => {
175
+ let [n, r] = useState(!1), i = useRef(!1), a = useRef(/* @__PURE__ */ new Set([])), [o, s] = useMemo(() => {
177
176
  if (e !== null) {
178
177
  let t = (Array.isArray(e) ? e : [e]).filter((e) => typeof e == "string").map((e) => e.replace("+", "\n").replace("\n\n", "\n+").split("\n"));
179
178
  return [t, t.reduce((e, t) => e.concat(...t), [])];
180
179
  }
181
180
  return [[], []];
182
181
  }, [e]);
183
- return G(() => {
184
- let n = t?.target ?? ot, c = t?.actInsideInputWithModifier ?? !0;
182
+ return useEffect(() => {
183
+ let n = t?.target ?? defaultDoc, c = t?.actInsideInputWithModifier ?? !0;
185
184
  if (e !== null) {
186
185
  let e = (e) => {
187
- if (i.current = e.ctrlKey || e.metaKey || e.shiftKey || e.altKey, (!i.current || i.current && !c) && oe(e)) return !1;
188
- let n = lt(e.code, s);
189
- if (a.current.add(e[n]), ct(o, a.current, !1)) {
186
+ if (i.current = e.ctrlKey || e.metaKey || e.shiftKey || e.altKey, (!i.current || i.current && !c) && isInputDOMNode(e)) return !1;
187
+ let n = useKeyOrCode(e.code, s);
188
+ if (a.current.add(e[n]), isMatchingKey(o, a.current, !1)) {
190
189
  let n = e.composedPath?.()?.[0] || e.target, a = n?.nodeName === "BUTTON" || n?.nodeName === "A";
191
190
  t.preventDefault !== !1 && (i.current || !a) && e.preventDefault(), r(!0);
192
191
  }
193
192
  }, l = (e) => {
194
- let t = lt(e.code, s);
195
- ct(o, a.current, !0) ? (r(!1), a.current.clear()) : a.current.delete(e[t]), e.key === "Meta" && a.current.clear(), i.current = !1;
193
+ let t = useKeyOrCode(e.code, s);
194
+ isMatchingKey(o, a.current, !0) ? (r(!1), a.current.clear()) : a.current.delete(e[t]), e.key === "Meta" && a.current.clear(), i.current = !1;
196
195
  }, u = () => {
197
196
  a.current.clear(), r(!1);
198
197
  };
@@ -202,15 +201,15 @@ function st(e = null, t = {
202
201
  }
203
202
  }, [e, r]), n;
204
203
  }
205
- function ct(e, t, n) {
204
+ function isMatchingKey(e, t, n) {
206
205
  return e.filter((e) => n || e.length === t.size).some((e) => e.every((e) => t.has(e)));
207
206
  }
208
- function lt(e, t) {
207
+ function useKeyOrCode(e, t) {
209
208
  return t.includes(e) ? "code" : "key";
210
209
  }
211
- var ut = () => {
212
- let e = $();
213
- return K(() => ({
210
+ var useViewportHelper = () => {
211
+ let e = useStoreApi();
212
+ return useMemo(() => ({
214
213
  zoomIn: (t) => {
215
214
  let { panZoom: n } = e.getState();
216
215
  return n ? n.scaleBy(1.2, t) : Promise.resolve(!1);
@@ -242,7 +241,7 @@ var ut = () => {
242
241
  },
243
242
  setCenter: async (t, n, r) => e.getState().setCenter(t, n, r),
244
243
  fitBounds: async (t, n) => {
245
- let { width: r, height: i, minZoom: a, maxZoom: o, panZoom: s } = e.getState(), c = H(t, r, i, a, o, n?.padding ?? .1);
244
+ let { width: r, height: i, minZoom: a, maxZoom: o, panZoom: s } = e.getState(), c = getViewportForBounds(t, r, i, a, o, n?.padding ?? .1);
246
245
  return s ? (await s.setViewport(c, {
247
246
  duration: n?.duration,
248
247
  ease: n?.ease,
@@ -256,12 +255,12 @@ var ut = () => {
256
255
  x: t.x - s,
257
256
  y: t.y - c
258
257
  }, u = n.snapGrid ?? i;
259
- return ge(l, r, n.snapToGrid ?? a, u);
258
+ return pointToRendererPoint(l, r, n.snapToGrid ?? a, u);
260
259
  },
261
260
  flowToScreenPosition: (t) => {
262
261
  let { transform: n, domNode: r } = e.getState();
263
262
  if (!r) return t;
264
- let { x: i, y: a } = r.getBoundingClientRect(), o = _e(t, n);
263
+ let { x: i, y: a } = r.getBoundingClientRect(), o = rendererPointToPoint(t, n);
265
264
  return {
266
265
  x: o.x + i,
267
266
  y: o.y + a
@@ -269,7 +268,7 @@ var ut = () => {
269
268
  }
270
269
  }), []);
271
270
  };
272
- function dt(e, t) {
271
+ function applyChanges(e, t) {
273
272
  let n = [], r = /* @__PURE__ */ new Map(), i = [];
274
273
  for (let t of e) if (t.type === "add") {
275
274
  i.push(t);
@@ -291,14 +290,14 @@ function dt(e, t) {
291
290
  continue;
292
291
  }
293
292
  let i = { ...e };
294
- for (let e of t) ft(e, i);
293
+ for (let e of t) applyChange(e, i);
295
294
  n.push(i);
296
295
  }
297
296
  return i.length && i.forEach((e) => {
298
297
  e.index === void 0 ? n.push({ ...e.item }) : n.splice(e.index, 0, { ...e.item });
299
298
  }), n;
300
299
  }
301
- function ft(e, t) {
300
+ function applyChange(e, t) {
302
301
  switch (e.type) {
303
302
  case "select":
304
303
  t.selected = e.selected;
@@ -311,28 +310,28 @@ function ft(e, t) {
311
310
  break;
312
311
  }
313
312
  }
314
- function pt(e, t) {
315
- return dt(e, t);
313
+ function applyNodeChanges(e, t) {
314
+ return applyChanges(e, t);
316
315
  }
317
- function mt(e, t) {
318
- return dt(e, t);
316
+ function applyEdgeChanges(e, t) {
317
+ return applyChanges(e, t);
319
318
  }
320
- function ht(e, t) {
319
+ function createSelectionChange(e, t) {
321
320
  return {
322
321
  id: e,
323
322
  type: "select",
324
323
  selected: t
325
324
  };
326
325
  }
327
- function gt(e, t = /* @__PURE__ */ new Set(), n = !1) {
326
+ function getSelectionChanges(e, t = /* @__PURE__ */ new Set(), n = !1) {
328
327
  let r = [];
329
328
  for (let [i, a] of e) {
330
329
  let e = t.has(i);
331
- !(a.selected === void 0 && !e) && a.selected !== e && (n && (a.selected = e), r.push(ht(a.id, e)));
330
+ !(a.selected === void 0 && !e) && a.selected !== e && (n && (a.selected = e), r.push(createSelectionChange(a.id, e)));
332
331
  }
333
332
  return r;
334
333
  }
335
- function _t({ items: e = [], lookup: t }) {
334
+ function getElementsDiffChanges({ items: e = [], lookup: t }) {
336
335
  let n = [], r = new Map(e.map((e) => [e.id, e]));
337
336
  for (let [r, i] of e.entries()) {
338
337
  let e = t.get(i.id), a = e?.internals?.userNode ?? e;
@@ -352,24 +351,24 @@ function _t({ items: e = [], lookup: t }) {
352
351
  });
353
352
  return n;
354
353
  }
355
- function vt(e) {
354
+ function elementToRemoveChange(e) {
356
355
  return {
357
356
  id: e.id,
358
357
  type: "remove"
359
358
  };
360
359
  }
361
- var yt = (e) => le(e), bt = (e) => ie(e);
362
- function xt(e) {
363
- return we(e);
360
+ var isNode = (e) => isNodeBase(e), isEdge = (e) => isEdgeBase(e);
361
+ function fixedForwardRef(e) {
362
+ return forwardRef(e);
364
363
  }
365
- function St(e) {
366
- let [t, n] = J(BigInt(0)), [r] = J(() => Ct(() => n((e) => e + BigInt(1))));
367
- return Ze(() => {
364
+ function useQueue(e) {
365
+ let [t, n] = useState(BigInt(0)), [r] = useState(() => createQueue(() => n((e) => e + BigInt(1))));
366
+ return useIsomorphicLayoutEffect(() => {
368
367
  let t = r.get();
369
368
  t.length && (e(t), r.reset());
370
369
  }, [t]), r;
371
370
  }
372
- function Ct(e) {
371
+ function createQueue(e) {
373
372
  let t = [];
374
373
  return {
375
374
  get: () => t,
@@ -381,12 +380,12 @@ function Ct(e) {
381
380
  }
382
381
  };
383
382
  }
384
- var wt = Ce(null);
385
- function Tt({ children: e }) {
386
- let t = $(), n = St(W((e) => {
383
+ var BatchContext = createContext(null);
384
+ function BatchProvider({ children: e }) {
385
+ let t = useStoreApi(), n = useQueue(useCallback((e) => {
387
386
  let { nodes: n = [], setNodes: r, hasDefaultNodes: i, onNodesChange: a, nodeLookup: o, fitViewQueued: s, onNodesChangeMiddlewareMap: c } = t.getState(), l = n;
388
387
  for (let t of e) l = typeof t == "function" ? t(l) : t;
389
- let u = _t({
388
+ let u = getElementsDiffChanges({
390
389
  items: l,
391
390
  lookup: o
392
391
  });
@@ -395,37 +394,37 @@ function Tt({ children: e }) {
395
394
  let { fitViewQueued: e, nodes: n, setNodes: r } = t.getState();
396
395
  e && r(n);
397
396
  });
398
- }, [])), r = St(W((e) => {
397
+ }, [])), r = useQueue(useCallback((e) => {
399
398
  let { edges: n = [], setEdges: r, hasDefaultEdges: i, onEdgesChange: a, edgeLookup: o } = t.getState(), s = n;
400
399
  for (let t of e) s = typeof t == "function" ? t(s) : t;
401
- i ? r(s) : a && a(_t({
400
+ i ? r(s) : a && a(getElementsDiffChanges({
402
401
  items: s,
403
402
  lookup: o
404
403
  }));
405
- }, [])), i = K(() => ({
404
+ }, [])), i = useMemo(() => ({
406
405
  nodeQueue: n,
407
406
  edgeQueue: r
408
407
  }), []);
409
- return Y(wt.Provider, {
408
+ return jsx(BatchContext.Provider, {
410
409
  value: i,
411
410
  children: e
412
411
  });
413
412
  }
414
- function Et() {
415
- let e = Te(wt);
413
+ function useBatchContext() {
414
+ let e = useContext(BatchContext);
416
415
  if (!e) throw Error("useBatchContext must be used within a BatchProvider");
417
416
  return e;
418
417
  }
419
- var Dt = (e) => !!e.panZoom;
420
- function Ot() {
421
- let e = ut(), t = $(), n = Et(), r = Q(Dt), i = K(() => {
418
+ var selector$k = (e) => !!e.panZoom;
419
+ function useReactFlow() {
420
+ let e = useViewportHelper(), t = useStoreApi(), n = useBatchContext(), r = useStore(selector$k), i = useMemo(() => {
422
421
  let e = (e) => t.getState().nodeLookup.get(e), r = (e) => {
423
422
  n.nodeQueue.push(e);
424
423
  }, i = (e) => {
425
424
  n.edgeQueue.push(e);
426
425
  }, a = (e) => {
427
- let { nodeLookup: n, nodeOrigin: r } = t.getState(), i = yt(e) ? e : n.get(e.id), a = i.parentId ? S(i.position, i.measured, i.parentId, n, r) : i.position;
428
- return me({
426
+ let { nodeLookup: n, nodeOrigin: r } = t.getState(), i = isNode(e) ? e : n.get(e.id), a = i.parentId ? evaluateAbsolutePosition(i.position, i.measured, i.parentId, n, r) : i.position;
427
+ return nodeToRect({
429
428
  ...i,
430
429
  position: a,
431
430
  width: i.measured?.width ?? i.width,
@@ -435,7 +434,7 @@ function Ot() {
435
434
  r((r) => r.map((r) => {
436
435
  if (r.id === e) {
437
436
  let e = typeof t == "function" ? t(r) : t;
438
- return n.replace && yt(e) ? e : {
437
+ return n.replace && isNode(e) ? e : {
439
438
  ...r,
440
439
  ...e
441
440
  };
@@ -446,7 +445,7 @@ function Ot() {
446
445
  i((r) => r.map((r) => {
447
446
  if (r.id === e) {
448
447
  let e = typeof t == "function" ? t(r) : t;
449
- return n.replace && bt(e) ? e : {
448
+ return n.replace && isEdge(e) ? e : {
450
449
  ...r,
451
450
  ...e
452
451
  };
@@ -486,7 +485,7 @@ function Ot() {
486
485
  };
487
486
  },
488
487
  deleteElements: async ({ nodes: e = [], edges: n = [] }) => {
489
- let { nodes: r, edges: i, onNodesDelete: a, onEdgesDelete: o, triggerNodeChanges: s, triggerEdgeChanges: c, onDelete: l, onBeforeDelete: u } = t.getState(), { nodes: d, edges: f } = await A({
488
+ let { nodes: r, edges: i, onNodesDelete: a, onEdgesDelete: o, triggerNodeChanges: s, triggerEdgeChanges: c, onDelete: l, onBeforeDelete: u } = t.getState(), { nodes: d, edges: f } = await getElementsToRemove({
490
489
  nodesToRemove: e,
491
490
  edgesToRemove: n,
492
491
  nodes: r,
@@ -494,11 +493,11 @@ function Ot() {
494
493
  onBeforeDelete: u
495
494
  }), p = f.length > 0, m = d.length > 0;
496
495
  if (p) {
497
- let e = f.map(vt);
496
+ let e = f.map(elementToRemoveChange);
498
497
  o?.(f), c(e);
499
498
  }
500
499
  if (m) {
501
- let e = d.map(vt);
500
+ let e = d.map(elementToRemoveChange);
502
501
  a?.(d), s(e);
503
502
  }
504
503
  return (m || p) && l?.({
@@ -510,18 +509,18 @@ function Ot() {
510
509
  };
511
510
  },
512
511
  getIntersectingNodes: (e, n = !0, r) => {
513
- let i = de(e), o = i ? e : a(e), s = r !== void 0;
512
+ let i = isRectObject(e), o = i ? e : a(e), s = r !== void 0;
514
513
  return o ? (r || t.getState().nodes).filter((r) => {
515
514
  let a = t.getState().nodeLookup.get(r.id);
516
515
  if (a && !i && (r.id === e.id || !a.internals.positionAbsolute)) return !1;
517
- let c = me(s ? r : a), l = z(c, o);
516
+ let c = nodeToRect(s ? r : a), l = getOverlappingArea(c, o);
518
517
  return n && l > 0 || l >= c.width * c.height || l >= o.width * o.height;
519
518
  }) : [];
520
519
  },
521
520
  isNodeIntersecting: (e, t, n = !0) => {
522
- let r = de(e) ? e : a(e);
521
+ let r = isRectObject(e) ? e : a(e);
523
522
  if (!r) return !1;
524
- let i = z(r, t);
523
+ let i = getOverlappingArea(r, t);
525
524
  return n && i > 0 || i >= t.width * t.height || i >= r.width * r.height;
526
525
  },
527
526
  updateNode: o,
@@ -558,7 +557,7 @@ function Ot() {
558
557
  },
559
558
  getNodesBounds: (e) => {
560
559
  let { nodeLookup: n, nodeOrigin: r } = t.getState();
561
- return L(e, {
560
+ return getNodesBounds(e, {
562
561
  nodeLookup: n,
563
562
  nodeOrigin: r
564
563
  });
@@ -566,7 +565,7 @@ function Ot() {
566
565
  getHandleConnections: ({ type: e, id: n, nodeId: r }) => Array.from(t.getState().connectionLookup.get(`${r}-${e}${n ? `-${n}` : ""}`)?.values() ?? []),
567
566
  getNodeConnections: ({ type: e, handleId: n, nodeId: r }) => Array.from(t.getState().connectionLookup.get(`${r}${e ? n ? `-${e}-${n}` : `-${e}` : ""}`)?.values() ?? []),
568
567
  fitView: async (e) => {
569
- let r = t.getState().fitViewResolver ?? Se();
568
+ let r = t.getState().fitViewResolver ?? withResolvers();
570
569
  return t.setState({
571
570
  fitViewQueued: !0,
572
571
  fitViewOptions: e,
@@ -575,34 +574,34 @@ function Ot() {
575
574
  }
576
575
  };
577
576
  }, []);
578
- return K(() => ({
577
+ return useMemo(() => ({
579
578
  ...i,
580
579
  ...e,
581
580
  viewportInitialized: r
582
581
  }), [r]);
583
582
  }
584
- var kt = (e) => e.selected, At = typeof window < "u" ? window : void 0;
585
- function jt({ deleteKeyCode: e, multiSelectionKeyCode: t }) {
586
- let n = $(), { deleteElements: r } = Ot(), i = st(e, { actInsideInputWithModifier: !1 }), a = st(t, { target: At });
587
- G(() => {
583
+ var selected = (e) => e.selected, win$1 = typeof window < "u" ? window : void 0;
584
+ function useGlobalKeyHandler({ deleteKeyCode: e, multiSelectionKeyCode: t }) {
585
+ let n = useStoreApi(), { deleteElements: r } = useReactFlow(), i = useKeyPress(e, { actInsideInputWithModifier: !1 }), a = useKeyPress(t, { target: win$1 });
586
+ useEffect(() => {
588
587
  if (i) {
589
588
  let { edges: e, nodes: t } = n.getState();
590
589
  r({
591
- nodes: t.filter(kt),
592
- edges: e.filter(kt)
590
+ nodes: t.filter(selected),
591
+ edges: e.filter(selected)
593
592
  }), n.setState({ nodesSelectionActive: !1 });
594
593
  }
595
- }, [i]), G(() => {
594
+ }, [i]), useEffect(() => {
596
595
  n.setState({ multiSelectionActive: a });
597
596
  }, [a]);
598
597
  }
599
- function Mt(e) {
600
- let t = $();
601
- G(() => {
598
+ function useResizeHandler(e) {
599
+ let t = useStoreApi();
600
+ useEffect(() => {
602
601
  let n = () => {
603
602
  if (!e.current || !(e.current.checkVisibility?.() ?? !0)) return !1;
604
- let n = O(e.current);
605
- (n.height === 0 || n.width === 0) && t.getState().onError?.("004", x.error004()), t.setState({
603
+ let n = getDimensions(e.current);
604
+ (n.height === 0 || n.width === 0) && t.getState().onError?.("004", errorMessages.error004()), t.setState({
606
605
  width: n.width || 500,
607
606
  height: n.height || 500
608
607
  });
@@ -616,30 +615,30 @@ function Mt(e) {
616
615
  }
617
616
  }, []);
618
617
  }
619
- var Nt = {
618
+ var containerStyle = {
620
619
  position: "absolute",
621
620
  width: "100%",
622
621
  height: "100%",
623
622
  top: 0,
624
623
  left: 0
625
- }, Pt = (e) => ({
624
+ }, selector$j = (e) => ({
626
625
  userSelectionActive: e.userSelectionActive,
627
626
  lib: e.lib,
628
627
  connectionInProgress: e.connection.inProgress
629
628
  });
630
- function Ft({ onPaneContextMenu: e, zoomOnScroll: t = !0, zoomOnPinch: n = !0, panOnScroll: r = !1, panOnScrollSpeed: a = .5, panOnScrollMode: o = i.Free, zoomOnDoubleClick: s = !0, panOnDrag: c = !0, defaultViewport: l, translateExtent: u, minZoom: f, maxZoom: p, zoomActivationKeyCode: m, preventScrolling: h = !0, children: g, noWheelClassName: _, noPanClassName: v, onViewportChange: y, isControlledViewport: b, paneClickDistance: x, selectionOnDrag: S }) {
631
- let C = $(), w = q(null), { userSelectionActive: T, lib: E, connectionInProgress: D } = Q(Pt, Z), O = st(m), k = q();
632
- Mt(w);
633
- let A = W((e) => {
629
+ function ZoomPane({ onPaneContextMenu: e, zoomOnScroll: t = !0, zoomOnPinch: n = !0, panOnScroll: r = !1, panOnScrollSpeed: a = .5, panOnScrollMode: o = PanOnScrollMode.Free, zoomOnDoubleClick: s = !0, panOnDrag: c = !0, defaultViewport: l, translateExtent: u, minZoom: f, maxZoom: p, zoomActivationKeyCode: m, preventScrolling: h = !0, children: g, noWheelClassName: _, noPanClassName: v, onViewportChange: y, isControlledViewport: b, paneClickDistance: x, selectionOnDrag: S }) {
630
+ let C = useStoreApi(), w = useRef(null), { userSelectionActive: T, lib: E, connectionInProgress: D } = useStore(selector$j, shallow), O = useKeyPress(m), k = useRef();
631
+ useResizeHandler(w);
632
+ let A = useCallback((e) => {
634
633
  y?.({
635
634
  x: e[0],
636
635
  y: e[1],
637
636
  zoom: e[2]
638
637
  }), b || C.setState({ transform: e });
639
638
  }, [y, b]);
640
- return G(() => {
639
+ return useEffect(() => {
641
640
  if (w.current) {
642
- k.current = d({
641
+ k.current = XYPanZoom({
643
642
  domNode: w.current,
644
643
  minZoom: f,
645
644
  maxZoom: p,
@@ -672,7 +671,7 @@ function Ft({ onPaneContextMenu: e, zoomOnScroll: t = !0, zoomOnPinch: n = !0, p
672
671
  k.current?.destroy();
673
672
  };
674
673
  }
675
- }, []), G(() => {
674
+ }, []), useEffect(() => {
676
675
  k.current?.update({
677
676
  onPaneContextMenu: e,
678
677
  zoomOnScroll: t,
@@ -712,20 +711,20 @@ function Ft({ onPaneContextMenu: e, zoomOnScroll: t = !0, zoomOnPinch: n = !0, p
712
711
  D,
713
712
  S,
714
713
  x
715
- ]), Y("div", {
714
+ ]), jsx("div", {
716
715
  className: "react-flow__renderer",
717
716
  ref: w,
718
- style: Nt,
717
+ style: containerStyle,
719
718
  children: g
720
719
  });
721
720
  }
722
- var It = (e) => ({
721
+ var selector$i = (e) => ({
723
722
  userSelectionActive: e.userSelectionActive,
724
723
  userSelectionRect: e.userSelectionRect
725
724
  });
726
- function Lt() {
727
- let { userSelectionActive: e, userSelectionRect: t } = Q(It, Z);
728
- return e && t ? Y("div", {
725
+ function UserSelection() {
726
+ let { userSelectionActive: e, userSelectionRect: t } = useStore(selector$i, shallow);
727
+ return e && t ? jsx("div", {
729
728
  className: "react-flow__selection react-flow__container",
730
729
  style: {
731
730
  width: t.width,
@@ -734,16 +733,16 @@ function Lt() {
734
733
  }
735
734
  }) : null;
736
735
  }
737
- var Rt = (e, t) => (n) => {
736
+ var wrapHandler = (e, t) => (n) => {
738
737
  n.target === t.current && e?.(n);
739
- }, zt = (e) => ({
738
+ }, selector$h = (e) => ({
740
739
  userSelectionActive: e.userSelectionActive,
741
740
  elementsSelectable: e.elementsSelectable,
742
741
  connectionInProgress: e.connection.inProgress,
743
742
  dragging: e.paneDragging
744
743
  });
745
- function Bt({ isSelecting: t, selectionKeyPressed: n, selectionMode: r = s.Full, panOnDrag: i, paneClickDistance: a, selectionOnDrag: o, onSelectionStart: c, onSelectionEnd: l, onPaneClick: u, onPaneContextMenu: d, onPaneScroll: f, onPaneMouseEnter: p, onPaneMouseMove: m, onPaneMouseLeave: g, children: _ }) {
746
- let v = $(), { userSelectionActive: y, elementsSelectable: b, dragging: x, connectionInProgress: S } = Q(zt, Z), C = b && (t || y), w = q(null), T = q(), E = q(/* @__PURE__ */ new Set()), D = q(/* @__PURE__ */ new Set()), O = q(!1), k = (e) => {
744
+ function Pane({ isSelecting: t, selectionKeyPressed: n, selectionMode: r = SelectionMode.Full, panOnDrag: i, paneClickDistance: a, selectionOnDrag: o, onSelectionStart: c, onSelectionEnd: l, onPaneClick: u, onPaneContextMenu: d, onPaneScroll: f, onPaneMouseEnter: p, onPaneMouseMove: m, onPaneMouseLeave: g, children: _ }) {
745
+ let v = useStoreApi(), { userSelectionActive: y, elementsSelectable: b, dragging: x, connectionInProgress: S } = useStore(selector$h, shallow), C = b && (t || y), w = useRef(null), T = useRef(), E = useRef(/* @__PURE__ */ new Set()), D = useRef(/* @__PURE__ */ new Set()), O = useRef(!1), k = (e) => {
747
746
  if (O.current || S) {
748
747
  O.current = !1;
749
748
  return;
@@ -756,20 +755,20 @@ function Bt({ isSelecting: t, selectionKeyPressed: n, selectionMode: r = s.Full,
756
755
  }
757
756
  d?.(e);
758
757
  }, j = f ? (e) => f(e) : void 0;
759
- return X("div", {
760
- className: e(["react-flow__pane", {
758
+ return jsxs("div", {
759
+ className: cc(["react-flow__pane", {
761
760
  draggable: i === !0 || Array.isArray(i) && i.includes(0),
762
761
  dragging: x,
763
762
  selection: t
764
763
  }]),
765
- onClick: C ? void 0 : Rt(k, w),
766
- onContextMenu: Rt(A, w),
767
- onWheel: Rt(j, w),
764
+ onClick: C ? void 0 : wrapHandler(k, w),
765
+ onContextMenu: wrapHandler(A, w),
766
+ onWheel: wrapHandler(j, w),
768
767
  onPointerEnter: C ? void 0 : p,
769
768
  onPointerMove: C ? (e) => {
770
769
  let { userSelectionRect: t, transform: i, nodeLookup: o, edgeLookup: l, connectionLookup: u, triggerNodeChanges: d, triggerEdgeChanges: f, defaultEdgeOptions: p, resetSelectedElements: m } = v.getState();
771
770
  if (!T.current || !t) return;
772
- let { x: g, y: _ } = M(e.nativeEvent, T.current), { startX: y, startY: b } = t;
771
+ let { x: g, y: _ } = getEventPosition(e.nativeEvent, T.current), { startX: y, startY: b } = t;
773
772
  if (!O.current) {
774
773
  let t = n ? 0 : a;
775
774
  if (Math.hypot(g - y, _ - b) <= t) return;
@@ -784,7 +783,7 @@ function Bt({ isSelecting: t, selectionKeyPressed: n, selectionMode: r = s.Full,
784
783
  width: Math.abs(g - y),
785
784
  height: Math.abs(_ - b)
786
785
  }, S = E.current, C = D.current;
787
- E.current = new Set(R(o, x, i, r === s.Partial, !0).map((e) => e.id)), D.current = /* @__PURE__ */ new Set();
786
+ E.current = new Set(getNodesInside(o, x, i, r === SelectionMode.Partial, !0).map((e) => e.id)), D.current = /* @__PURE__ */ new Set();
788
787
  let w = p?.selectable ?? !0;
789
788
  for (let e of E.current) {
790
789
  let t = u.get(e);
@@ -793,7 +792,7 @@ function Bt({ isSelecting: t, selectionKeyPressed: n, selectionMode: r = s.Full,
793
792
  t && (t.selectable ?? w) && D.current.add(e);
794
793
  }
795
794
  }
796
- h(S, E.current) || d(gt(o, E.current, !0)), h(C, D.current) || f(gt(l, D.current)), v.setState({
795
+ areSetsEqual(S, E.current) || d(getSelectionChanges(o, E.current, !0)), areSetsEqual(C, D.current) || f(getSelectionChanges(l, D.current)), v.setState({
797
796
  userSelectionRect: x,
798
797
  userSelectionActive: !0,
799
798
  nodesSelectionActive: !1
@@ -811,7 +810,7 @@ function Bt({ isSelecting: t, selectionKeyPressed: n, selectionMode: r = s.Full,
811
810
  let i = e.target === w.current;
812
811
  if (!i && e.target.closest(".nokey") || !t || !(o && i || n) || e.button !== 0 || !e.isPrimary) return;
813
812
  e.target?.setPointerCapture?.(e.pointerId), O.current = !1;
814
- let { x: a, y: s } = M(e.nativeEvent, T.current);
813
+ let { x: a, y: s } = getEventPosition(e.nativeEvent, T.current);
815
814
  v.setState({ userSelectionRect: {
816
815
  width: 0,
817
816
  height: 0,
@@ -826,14 +825,14 @@ function Bt({ isSelecting: t, selectionKeyPressed: n, selectionMode: r = s.Full,
826
825
  } : void 0,
827
826
  onPointerLeave: g,
828
827
  ref: w,
829
- style: Nt,
830
- children: [_, Y(Lt, {})]
828
+ style: containerStyle,
829
+ children: [_, jsx(UserSelection, {})]
831
830
  });
832
831
  }
833
- function Vt({ id: e, store: t, unselect: n = !1, nodeRef: r }) {
832
+ function handleNodeClick({ id: e, store: t, unselect: n = !1, nodeRef: r }) {
834
833
  let { addSelectedNodes: i, unselectNodesAndEdges: a, multiSelectionActive: o, nodeLookup: s, onError: c } = t.getState(), l = s.get(e);
835
834
  if (!l) {
836
- c?.("012", x.error012(e));
835
+ c?.("012", errorMessages.error012(e));
837
836
  return;
838
837
  }
839
838
  t.setState({ nodesSelectionActive: !1 }), l.selected ? (n || l.selected && o) && (a({
@@ -841,13 +840,13 @@ function Vt({ id: e, store: t, unselect: n = !1, nodeRef: r }) {
841
840
  edges: []
842
841
  }), requestAnimationFrame(() => r?.current?.blur())) : i([e]);
843
842
  }
844
- function Ht({ nodeRef: e, disabled: t = !1, noDragClassName: n, handleSelector: r, nodeId: i, isSelectable: a, nodeClickDistance: o }) {
845
- let s = $(), [l, u] = J(!1), d = q();
846
- return G(() => {
847
- d.current = c({
843
+ function useDrag({ nodeRef: e, disabled: t = !1, noDragClassName: n, handleSelector: r, nodeId: i, isSelectable: a, nodeClickDistance: o }) {
844
+ let s = useStoreApi(), [l, u] = useState(!1), d = useRef();
845
+ return useEffect(() => {
846
+ d.current = XYDrag({
848
847
  getStoreItems: () => s.getState(),
849
848
  onNodeMouseDown: (t) => {
850
- Vt({
849
+ handleNodeClick({
851
850
  id: t,
852
851
  store: s,
853
852
  nodeRef: e
@@ -860,7 +859,7 @@ function Ht({ nodeRef: e, disabled: t = !1, noDragClassName: n, handleSelector:
860
859
  u(!1);
861
860
  }
862
861
  });
863
- }, []), G(() => {
862
+ }, []), useEffect(() => {
864
863
  if (!(t || !e.current || !d.current)) return d.current.update({
865
864
  noDragClassName: n,
866
865
  handleSelector: r,
@@ -881,19 +880,19 @@ function Ht({ nodeRef: e, disabled: t = !1, noDragClassName: n, handleSelector:
881
880
  o
882
881
  ]), l;
883
882
  }
884
- var Ut = (e) => (t) => t.selected && (t.draggable || e && t.draggable === void 0);
885
- function Wt() {
886
- let e = $();
887
- return W((t) => {
888
- let { nodeExtent: n, snapToGrid: r, snapGrid: i, nodesDraggable: a, onError: o, updateNodePositions: s, nodeLookup: c, nodeOrigin: l } = e.getState(), u = /* @__PURE__ */ new Map(), d = Ut(a), f = r ? i[0] : 5, p = r ? i[1] : 5, m = t.direction.x * f * t.factor, h = t.direction.y * p * t.factor;
883
+ var selectedAndDraggable = (e) => (t) => t.selected && (t.draggable || e && t.draggable === void 0);
884
+ function useMoveSelectedNodes() {
885
+ let e = useStoreApi();
886
+ return useCallback((t) => {
887
+ let { nodeExtent: n, snapToGrid: r, snapGrid: i, nodesDraggable: a, onError: o, updateNodePositions: s, nodeLookup: c, nodeOrigin: l } = e.getState(), u = /* @__PURE__ */ new Map(), d = selectedAndDraggable(a), f = r ? i[0] : 5, p = r ? i[1] : 5, m = t.direction.x * f * t.factor, h = t.direction.y * p * t.factor;
889
888
  for (let [, e] of c) {
890
889
  if (!d(e)) continue;
891
890
  let t = {
892
891
  x: e.internals.positionAbsolute.x + m,
893
892
  y: e.internals.positionAbsolute.y + h
894
893
  };
895
- r && (t = ve(t, i));
896
- let { position: a, positionAbsolute: s } = g({
894
+ r && (t = snapPosition(t, i));
895
+ let { position: a, positionAbsolute: s } = calculateNodePosition({
897
896
  nodeId: e.id,
898
897
  nextPosition: t,
899
898
  nodeLookup: c,
@@ -906,27 +905,27 @@ function Wt() {
906
905
  s(u);
907
906
  }, []);
908
907
  }
909
- var Gt = Ce(null), Kt = Gt.Provider;
910
- Gt.Consumer;
911
- var qt = () => Te(Gt), Jt = (e) => ({
908
+ var NodeIdContext = createContext(null), Provider = NodeIdContext.Provider;
909
+ NodeIdContext.Consumer;
910
+ var useNodeId = () => useContext(NodeIdContext), selector$g = (e) => ({
912
911
  connectOnClick: e.connectOnClick,
913
912
  noPanClassName: e.noPanClassName,
914
913
  rfId: e.rfId
915
- }), Yt = (e, t, r) => (i) => {
914
+ }), connectingSelector = (e, t, r) => (i) => {
916
915
  let { connectionClickStartHandle: a, connectionMode: o, connection: s } = i, { fromHandle: c, toHandle: l, isValid: u } = s, d = l?.nodeId === e && l?.id === t && l?.type === r;
917
916
  return {
918
917
  connectingFrom: c?.nodeId === e && c?.id === t && c?.type === r,
919
918
  connectingTo: d,
920
919
  clickConnecting: a?.nodeId === e && a?.id === t && a?.type === r,
921
- isPossibleEndHandle: o === n.Strict ? c?.type !== r : e !== c?.nodeId || t !== c?.id,
920
+ isPossibleEndHandle: o === ConnectionMode.Strict ? c?.type !== r : e !== c?.nodeId || t !== c?.id,
922
921
  connectionInProcess: !!c,
923
922
  clickConnectionInProcess: !!a,
924
923
  valid: d && u
925
924
  };
926
925
  };
927
- function Xt({ type: t = "source", position: n = a.Top, isValidConnection: r, isConnectable: i = !0, isConnectableStart: o = !0, isConnectableEnd: s = !0, id: c, onConnect: u, children: d, className: f, onMouseDown: m, onTouchStart: h, ...g }, _) {
928
- let v = c || null, y = t === "target", b = $(), S = qt(), { connectOnClick: C, noPanClassName: w, rfId: T } = Q(Jt, Z), { connectingFrom: E, connectingTo: D, clickConnecting: O, isPossibleEndHandle: k, connectionInProcess: A, clickConnectionInProcess: j, valid: M } = Q(Yt(S, v, t), Z);
929
- S || b.getState().onError?.("010", x.error010());
926
+ function HandleComponent({ type: t = "source", position: n = Position.Top, isValidConnection: r, isConnectable: i = !0, isConnectableStart: o = !0, isConnectableEnd: s = !0, id: c, onConnect: u, children: d, className: f, onMouseDown: m, onTouchStart: h, ...g }, _) {
927
+ let v = c || null, y = t === "target", b = useStoreApi(), S = useNodeId(), { connectOnClick: C, noPanClassName: w, rfId: T } = useStore(selector$g, shallow), { connectingFrom: E, connectingTo: D, clickConnecting: O, isPossibleEndHandle: k, connectionInProcess: A, clickConnectionInProcess: j, valid: M } = useStore(connectingSelector(S, v, t), shallow);
928
+ S || b.getState().onError?.("010", errorMessages.error010());
930
929
  let N = (e) => {
931
930
  let { defaultEdgeOptions: t, onConnect: n, hasDefaultEdges: r } = b.getState(), i = {
932
931
  ...t,
@@ -934,15 +933,15 @@ function Xt({ type: t = "source", position: n = a.Top, isValidConnection: r, isC
934
933
  };
935
934
  if (r) {
936
935
  let { edges: e, setEdges: t } = b.getState();
937
- t(p(i, e));
936
+ t(addEdge(i, e));
938
937
  }
939
938
  n?.(i), u?.(i);
940
- }, F = (e) => {
939
+ }, P = (e) => {
941
940
  if (!S) return;
942
- let t = ce(e.nativeEvent);
941
+ let t = isMouseEvent(e.nativeEvent);
943
942
  if (o && (t && e.button === 0 || !t)) {
944
943
  let t = b.getState();
945
- l.onPointerDown(e.nativeEvent, {
944
+ XYHandle.onPointerDown(e.nativeEvent, {
946
945
  handleDomNode: e.currentTarget,
947
946
  autoPanOnConnect: t.autoPanOnConnect,
948
947
  connectionMode: t.connectionMode,
@@ -968,13 +967,47 @@ function Xt({ type: t = "source", position: n = a.Top, isValidConnection: r, isC
968
967
  });
969
968
  }
970
969
  t ? m?.(e) : h?.(e);
970
+ }, F = (e) => {
971
+ let { onClickConnectStart: n, onClickConnectEnd: i, connectionClickStartHandle: a, connectionMode: s, isValidConnection: c, lib: u, rfId: d, nodeLookup: f, connection: p } = b.getState();
972
+ if (!S || !a && !o) return;
973
+ if (!a) {
974
+ n?.(e.nativeEvent, {
975
+ nodeId: S,
976
+ handleId: v,
977
+ handleType: t
978
+ }), b.setState({ connectionClickStartHandle: {
979
+ nodeId: S,
980
+ type: t,
981
+ id: v
982
+ } });
983
+ return;
984
+ }
985
+ let m = getHostForElement(e.target), h = r || c, { connection: g, isValid: _ } = XYHandle.isValid(e.nativeEvent, {
986
+ handle: {
987
+ nodeId: S,
988
+ id: v,
989
+ type: t
990
+ },
991
+ connectionMode: s,
992
+ fromNodeId: a.nodeId,
993
+ fromHandleId: a.id || null,
994
+ fromType: a.type,
995
+ isValidConnection: h,
996
+ flowId: d,
997
+ doc: m,
998
+ lib: u,
999
+ nodeLookup: f
1000
+ });
1001
+ _ && g && N(g);
1002
+ let y = structuredClone(p);
1003
+ delete y.inProgress, y.toPosition = y.toHandle ? y.toHandle.position : null, i?.(e, y), b.setState({ connectionClickStartHandle: null });
971
1004
  };
972
- return Y("div", {
1005
+ return jsx("div", {
973
1006
  "data-handleid": v,
974
1007
  "data-nodeid": S,
975
1008
  "data-handlepos": n,
976
1009
  "data-id": `${T}-${S}-${v}-${t}`,
977
- className: e([
1010
+ className: cc([
978
1011
  "react-flow__handle",
979
1012
  `react-flow__handle-${n}`,
980
1013
  "nodrag",
@@ -993,82 +1026,48 @@ function Xt({ type: t = "source", position: n = a.Top, isValidConnection: r, isC
993
1026
  connectionindicator: i && (!A || k) && (A || j ? s : o)
994
1027
  }
995
1028
  ]),
996
- onMouseDown: F,
997
- onTouchStart: F,
998
- onClick: C ? (e) => {
999
- let { onClickConnectStart: n, onClickConnectEnd: i, connectionClickStartHandle: a, connectionMode: s, isValidConnection: c, lib: u, rfId: d, nodeLookup: f, connection: p } = b.getState();
1000
- if (!S || !a && !o) return;
1001
- if (!a) {
1002
- n?.(e.nativeEvent, {
1003
- nodeId: S,
1004
- handleId: v,
1005
- handleType: t
1006
- }), b.setState({ connectionClickStartHandle: {
1007
- nodeId: S,
1008
- type: t,
1009
- id: v
1010
- } });
1011
- return;
1012
- }
1013
- let m = P(e.target), h = r || c, { connection: g, isValid: _ } = l.isValid(e.nativeEvent, {
1014
- handle: {
1015
- nodeId: S,
1016
- id: v,
1017
- type: t
1018
- },
1019
- connectionMode: s,
1020
- fromNodeId: a.nodeId,
1021
- fromHandleId: a.id || null,
1022
- fromType: a.type,
1023
- isValidConnection: h,
1024
- flowId: d,
1025
- doc: m,
1026
- lib: u,
1027
- nodeLookup: f
1028
- });
1029
- _ && g && N(g);
1030
- let y = structuredClone(p);
1031
- delete y.inProgress, y.toPosition = y.toHandle ? y.toHandle.position : null, i?.(e, y), b.setState({ connectionClickStartHandle: null });
1032
- } : void 0,
1029
+ onMouseDown: P,
1030
+ onTouchStart: P,
1031
+ onClick: C ? F : void 0,
1033
1032
  ref: _,
1034
1033
  ...g,
1035
1034
  children: d
1036
1035
  });
1037
1036
  }
1038
- var Zt = U(xt(Xt));
1039
- function Qt({ data: e, isConnectable: t, sourcePosition: n = a.Bottom }) {
1040
- return X(De, { children: [e?.label, Y(Zt, {
1037
+ var Handle = memo(fixedForwardRef(HandleComponent));
1038
+ function InputNode({ data: e, isConnectable: t, sourcePosition: n = Position.Bottom }) {
1039
+ return jsxs(Fragment$1, { children: [e?.label, jsx(Handle, {
1041
1040
  type: "source",
1042
1041
  position: n,
1043
1042
  isConnectable: t
1044
1043
  })] });
1045
1044
  }
1046
- function $t({ data: e, isConnectable: t, targetPosition: n = a.Top, sourcePosition: r = a.Bottom }) {
1047
- return X(De, { children: [
1048
- Y(Zt, {
1045
+ function DefaultNode({ data: e, isConnectable: t, targetPosition: n = Position.Top, sourcePosition: r = Position.Bottom }) {
1046
+ return jsxs(Fragment$1, { children: [
1047
+ jsx(Handle, {
1049
1048
  type: "target",
1050
1049
  position: n,
1051
1050
  isConnectable: t
1052
1051
  }),
1053
1052
  e?.label,
1054
- Y(Zt, {
1053
+ jsx(Handle, {
1055
1054
  type: "source",
1056
1055
  position: r,
1057
1056
  isConnectable: t
1058
1057
  })
1059
1058
  ] });
1060
1059
  }
1061
- function en() {
1060
+ function GroupNode() {
1062
1061
  return null;
1063
1062
  }
1064
- function tn({ data: e, isConnectable: t, targetPosition: n = a.Top }) {
1065
- return X(De, { children: [Y(Zt, {
1063
+ function OutputNode({ data: e, isConnectable: t, targetPosition: n = Position.Top }) {
1064
+ return jsxs(Fragment$1, { children: [jsx(Handle, {
1066
1065
  type: "target",
1067
1066
  position: n,
1068
1067
  isConnectable: t
1069
1068
  }), e?.label] });
1070
1069
  }
1071
- var nn = {
1070
+ var arrowKeyDiffs = {
1072
1071
  ArrowUp: {
1073
1072
  x: 0,
1074
1073
  y: -1
@@ -1085,13 +1084,13 @@ var nn = {
1085
1084
  x: 1,
1086
1085
  y: 0
1087
1086
  }
1088
- }, rn = {
1089
- input: Qt,
1090
- default: $t,
1091
- output: tn,
1092
- group: en
1087
+ }, builtinNodeTypes = {
1088
+ input: InputNode,
1089
+ default: DefaultNode,
1090
+ output: OutputNode,
1091
+ group: GroupNode
1093
1092
  };
1094
- function an(e) {
1093
+ function getNodeInlineStyleDimensions(e) {
1095
1094
  return e.internals.handleBounds === void 0 ? {
1096
1095
  width: e.width ?? e.initialWidth ?? e.style?.width,
1097
1096
  height: e.height ?? e.initialHeight ?? e.style?.height
@@ -1100,43 +1099,43 @@ function an(e) {
1100
1099
  height: e.height ?? e.style?.height
1101
1100
  };
1102
1101
  }
1103
- var on = (e) => {
1104
- let { width: t, height: n, x: r, y: i } = F(e.nodeLookup, { filter: (e) => !!e.selected });
1102
+ var selector$f = (e) => {
1103
+ let { width: t, height: n, x: r, y: i } = getInternalNodesBounds(e.nodeLookup, { filter: (e) => !!e.selected });
1105
1104
  return {
1106
- width: ue(t) ? t : null,
1107
- height: ue(n) ? n : null,
1105
+ width: isNumeric(t) ? t : null,
1106
+ height: isNumeric(n) ? n : null,
1108
1107
  userSelectionActive: e.userSelectionActive,
1109
1108
  transformString: `translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${i}px)`
1110
1109
  };
1111
1110
  };
1112
- function sn({ onSelectionContextMenu: t, noPanClassName: n, disableKeyboardA11y: r }) {
1113
- let i = $(), { width: a, height: o, transformString: s, userSelectionActive: c } = Q(on, Z), l = Wt(), u = q(null);
1114
- G(() => {
1111
+ function NodesSelection({ onSelectionContextMenu: t, noPanClassName: n, disableKeyboardA11y: r }) {
1112
+ let i = useStoreApi(), { width: a, height: o, transformString: s, userSelectionActive: c } = useStore(selector$f, shallow), l = useMoveSelectedNodes(), u = useRef(null);
1113
+ useEffect(() => {
1115
1114
  r || u.current?.focus({ preventScroll: !0 });
1116
1115
  }, [r]);
1117
1116
  let d = !c && a !== null && o !== null;
1118
- if (Ht({
1117
+ if (useDrag({
1119
1118
  nodeRef: u,
1120
1119
  disabled: !d
1121
1120
  }), !d) return null;
1122
1121
  let f = t ? (e) => {
1123
1122
  t(e, i.getState().nodes.filter((e) => e.selected));
1124
1123
  } : void 0;
1125
- return Y("div", {
1126
- className: e([
1124
+ return jsx("div", {
1125
+ className: cc([
1127
1126
  "react-flow__nodesselection",
1128
1127
  "react-flow__container",
1129
1128
  n
1130
1129
  ]),
1131
1130
  style: { transform: s },
1132
- children: Y("div", {
1131
+ children: jsx("div", {
1133
1132
  ref: u,
1134
1133
  className: "react-flow__nodesselection-rect",
1135
1134
  onContextMenu: f,
1136
1135
  tabIndex: r ? void 0 : -1,
1137
1136
  onKeyDown: r ? void 0 : (e) => {
1138
- Object.prototype.hasOwnProperty.call(nn, e.key) && (e.preventDefault(), l({
1139
- direction: nn[e.key],
1137
+ Object.prototype.hasOwnProperty.call(arrowKeyDiffs, e.key) && (e.preventDefault(), l({
1138
+ direction: arrowKeyDiffs[e.key],
1140
1139
  factor: e.shiftKey ? 4 : 1
1141
1140
  }));
1142
1141
  },
@@ -1147,25 +1146,25 @@ function sn({ onSelectionContextMenu: t, noPanClassName: n, disableKeyboardA11y:
1147
1146
  })
1148
1147
  });
1149
1148
  }
1150
- var cn = typeof window < "u" ? window : void 0, ln = (e) => ({
1149
+ var win = typeof window < "u" ? window : void 0, selector$e = (e) => ({
1151
1150
  nodesSelectionActive: e.nodesSelectionActive,
1152
1151
  userSelectionActive: e.userSelectionActive
1153
1152
  });
1154
- function un({ children: e, onPaneClick: t, onPaneMouseEnter: n, onPaneMouseMove: r, onPaneMouseLeave: i, onPaneContextMenu: a, onPaneScroll: o, paneClickDistance: s, deleteKeyCode: c, selectionKeyCode: l, selectionOnDrag: u, selectionMode: d, onSelectionStart: f, onSelectionEnd: p, multiSelectionKeyCode: m, panActivationKeyCode: h, zoomActivationKeyCode: g, elementsSelectable: _, zoomOnScroll: v, zoomOnPinch: y, panOnScroll: b, panOnScrollSpeed: x, panOnScrollMode: S, zoomOnDoubleClick: C, panOnDrag: w, defaultViewport: T, translateExtent: E, minZoom: D, maxZoom: O, preventScrolling: k, onSelectionContextMenu: A, noWheelClassName: j, noPanClassName: M, disableKeyboardA11y: N, onViewportChange: P, isControlledViewport: F }) {
1155
- let { nodesSelectionActive: ee, userSelectionActive: I } = Q(ln, Z), L = st(l, { target: cn }), R = st(h, { target: cn }), z = R || w, B = R || b, V = u && z !== !0, H = L || I || V;
1156
- return jt({
1153
+ function FlowRendererComponent({ children: e, onPaneClick: t, onPaneMouseEnter: n, onPaneMouseMove: r, onPaneMouseLeave: i, onPaneContextMenu: a, onPaneScroll: o, paneClickDistance: s, deleteKeyCode: c, selectionKeyCode: l, selectionOnDrag: u, selectionMode: d, onSelectionStart: f, onSelectionEnd: p, multiSelectionKeyCode: m, panActivationKeyCode: h, zoomActivationKeyCode: g, elementsSelectable: _, zoomOnScroll: v, zoomOnPinch: y, panOnScroll: b, panOnScrollSpeed: x, panOnScrollMode: S, zoomOnDoubleClick: C, panOnDrag: w, defaultViewport: T, translateExtent: E, minZoom: D, maxZoom: O, preventScrolling: k, onSelectionContextMenu: A, noWheelClassName: j, noPanClassName: M, disableKeyboardA11y: N, onViewportChange: P, isControlledViewport: F }) {
1154
+ let { nodesSelectionActive: I, userSelectionActive: L } = useStore(selector$e, shallow), R = useKeyPress(l, { target: win }), z = useKeyPress(h, { target: win }), B = z || w, V = z || b, H = u && B !== !0, U = R || L || H;
1155
+ return useGlobalKeyHandler({
1157
1156
  deleteKeyCode: c,
1158
1157
  multiSelectionKeyCode: m
1159
- }), Y(Ft, {
1158
+ }), jsx(ZoomPane, {
1160
1159
  onPaneContextMenu: a,
1161
1160
  elementsSelectable: _,
1162
1161
  zoomOnScroll: v,
1163
1162
  zoomOnPinch: y,
1164
- panOnScroll: B,
1163
+ panOnScroll: V,
1165
1164
  panOnScrollSpeed: x,
1166
1165
  panOnScrollMode: S,
1167
1166
  zoomOnDoubleClick: C,
1168
- panOnDrag: !L && z,
1167
+ panOnDrag: !R && B,
1169
1168
  defaultViewport: T,
1170
1169
  translateExtent: E,
1171
1170
  minZoom: D,
@@ -1177,8 +1176,8 @@ function un({ children: e, onPaneClick: t, onPaneMouseEnter: n, onPaneMouseMove:
1177
1176
  onViewportChange: P,
1178
1177
  isControlledViewport: F,
1179
1178
  paneClickDistance: s,
1180
- selectionOnDrag: V,
1181
- children: X(Bt, {
1179
+ selectionOnDrag: H,
1180
+ children: jsxs(Pane, {
1182
1181
  onSelectionStart: f,
1183
1182
  onSelectionEnd: p,
1184
1183
  onPaneClick: t,
@@ -1187,13 +1186,13 @@ function un({ children: e, onPaneClick: t, onPaneMouseEnter: n, onPaneMouseMove:
1187
1186
  onPaneMouseLeave: i,
1188
1187
  onPaneContextMenu: a,
1189
1188
  onPaneScroll: o,
1190
- panOnDrag: z,
1191
- isSelecting: !!H,
1189
+ panOnDrag: B,
1190
+ isSelecting: !!U,
1192
1191
  selectionMode: d,
1193
- selectionKeyPressed: L,
1192
+ selectionKeyPressed: R,
1194
1193
  paneClickDistance: s,
1195
- selectionOnDrag: V,
1196
- children: [e, ee && Y(sn, {
1194
+ selectionOnDrag: H,
1195
+ children: [e, I && jsx(NodesSelection, {
1197
1196
  onSelectionContextMenu: A,
1198
1197
  noPanClassName: M,
1199
1198
  disableKeyboardA11y: N
@@ -1201,19 +1200,19 @@ function un({ children: e, onPaneClick: t, onPaneMouseEnter: n, onPaneMouseMove:
1201
1200
  })
1202
1201
  });
1203
1202
  }
1204
- un.displayName = "FlowRenderer";
1205
- var dn = U(un), fn = (e) => (t) => e ? R(t.nodeLookup, {
1203
+ FlowRendererComponent.displayName = "FlowRenderer";
1204
+ var FlowRenderer = memo(FlowRendererComponent), selector$d = (e) => (t) => e ? getNodesInside(t.nodeLookup, {
1206
1205
  x: 0,
1207
1206
  y: 0,
1208
1207
  width: t.width,
1209
1208
  height: t.height
1210
1209
  }, t.transform, !0).map((e) => e.id) : Array.from(t.nodeLookup.keys());
1211
- function pn(e) {
1212
- return Q(W(fn(e), [e]), Z);
1210
+ function useVisibleNodeIds(e) {
1211
+ return useStore(useCallback(selector$d(e), [e]), shallow);
1213
1212
  }
1214
- var mn = (e) => e.updateNodeInternals;
1215
- function hn() {
1216
- let e = Q(mn), [t] = J(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((t) => {
1213
+ var selector$c = (e) => e.updateNodeInternals;
1214
+ function useResizeObserver() {
1215
+ let e = useStore(selector$c), [t] = useState(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((t) => {
1217
1216
  let n = /* @__PURE__ */ new Map();
1218
1217
  t.forEach((e) => {
1219
1218
  let t = e.target.getAttribute("data-id");
@@ -1224,17 +1223,17 @@ function hn() {
1224
1223
  });
1225
1224
  }), e(n);
1226
1225
  }));
1227
- return G(() => () => {
1226
+ return useEffect(() => () => {
1228
1227
  t?.disconnect();
1229
1228
  }, [t]), t;
1230
1229
  }
1231
- function gn({ node: e, nodeType: t, hasDimensions: n, resizeObserver: r }) {
1232
- let i = $(), a = q(null), o = q(null), s = q(e.sourcePosition), c = q(e.targetPosition), l = q(t), u = n && !!e.internals.handleBounds;
1233
- return G(() => {
1230
+ function useNodeObserver({ node: e, nodeType: t, hasDimensions: n, resizeObserver: r }) {
1231
+ let i = useStoreApi(), a = useRef(null), o = useRef(null), s = useRef(e.sourcePosition), c = useRef(e.targetPosition), l = useRef(t), u = n && !!e.internals.handleBounds;
1232
+ return useEffect(() => {
1234
1233
  a.current && !e.hidden && (!u || o.current !== a.current) && (o.current && r?.unobserve(o.current), r?.observe(a.current), o.current = a.current);
1235
- }, [u, e.hidden]), G(() => () => {
1234
+ }, [u, e.hidden]), useEffect(() => () => {
1236
1235
  o.current &&= (r?.unobserve(o.current), null);
1237
- }, []), G(() => {
1236
+ }, []), useEffect(() => {
1238
1237
  if (a.current) {
1239
1238
  let n = l.current !== t, r = s.current !== e.sourcePosition, o = c.current !== e.targetPosition;
1240
1239
  (n || r || o) && (l.current = t, s.current = e.sourcePosition, c.current = e.targetPosition, i.getState().updateNodeInternals(new Map([[e.id, {
@@ -1250,22 +1249,22 @@ function gn({ node: e, nodeType: t, hasDimensions: n, resizeObserver: r }) {
1250
1249
  e.targetPosition
1251
1250
  ]), a;
1252
1251
  }
1253
- function _n({ id: t, onClick: n, onMouseEnter: r, onMouseMove: i, onMouseLeave: a, onContextMenu: o, onDoubleClick: s, nodesDraggable: c, elementsSelectable: l, nodesConnectable: u, nodesFocusable: d, resizeObserver: f, noDragClassName: p, noPanClassName: m, disableKeyboardA11y: h, rfId: g, nodeTypes: _, nodeClickDistance: v, onError: y }) {
1254
- let { node: S, internals: C, isParent: w } = Q((e) => {
1252
+ function NodeWrapper({ id: t, onClick: n, onMouseEnter: r, onMouseMove: i, onMouseLeave: a, onContextMenu: o, onDoubleClick: s, nodesDraggable: c, elementsSelectable: l, nodesConnectable: u, nodesFocusable: d, resizeObserver: f, noDragClassName: p, noPanClassName: m, disableKeyboardA11y: h, rfId: g, nodeTypes: _, nodeClickDistance: v, onError: y }) {
1253
+ let { node: S, internals: C, isParent: w } = useStore((e) => {
1255
1254
  let n = e.nodeLookup.get(t), r = e.parentLookup.has(t);
1256
1255
  return {
1257
1256
  node: n,
1258
1257
  internals: n.internals,
1259
1258
  isParent: r
1260
1259
  };
1261
- }, Z), T = S.type || "default", E = _?.[T] || rn[T];
1262
- E === void 0 && (y?.("003", x.error003(T)), T = "default", E = _?.default || rn.default);
1263
- let D = !!(S.draggable || c && S.draggable === void 0), O = !!(S.selectable || l && S.selectable === void 0), k = !!(S.connectable || u && S.connectable === void 0), A = !!(S.focusable || d && S.focusable === void 0), j = $(), M = pe(S), N = gn({
1260
+ }, shallow), T = S.type || "default", E = _?.[T] || builtinNodeTypes[T];
1261
+ E === void 0 && (y?.("003", errorMessages.error003(T)), T = "default", E = _?.default || builtinNodeTypes.default);
1262
+ let D = !!(S.draggable || c && S.draggable === void 0), O = !!(S.selectable || l && S.selectable === void 0), k = !!(S.connectable || u && S.connectable === void 0), A = !!(S.focusable || d && S.focusable === void 0), j = useStoreApi(), M = nodeHasDimensions(S), N = useNodeObserver({
1264
1263
  node: S,
1265
1264
  nodeType: T,
1266
1265
  hasDimensions: M,
1267
1266
  resizeObserver: f
1268
- }), P = Ht({
1267
+ }), P = useDrag({
1269
1268
  nodeRef: N,
1270
1269
  disabled: S.hidden || !D,
1271
1270
  noDragClassName: p,
@@ -1273,24 +1272,24 @@ function _n({ id: t, onClick: n, onMouseEnter: r, onMouseMove: i, onMouseLeave:
1273
1272
  nodeId: t,
1274
1273
  isSelectable: O,
1275
1274
  nodeClickDistance: v
1276
- }), F = Wt();
1275
+ }), F = useMoveSelectedNodes();
1277
1276
  if (S.hidden) return null;
1278
- let ee = I(S), L = an(S), z = O || D || n || r || i || a, B = r ? (e) => r(e, { ...C.userNode }) : void 0, V = i ? (e) => i(e, { ...C.userNode }) : void 0, H = a ? (e) => a(e, { ...C.userNode }) : void 0, te = o ? (e) => o(e, { ...C.userNode }) : void 0, ne = s ? (e) => s(e, { ...C.userNode }) : void 0, re = (e) => {
1277
+ let I = getNodeDimensions(S), L = getNodeInlineStyleDimensions(S), R = O || D || n || r || i || a, B = r ? (e) => r(e, { ...C.userNode }) : void 0, H = i ? (e) => i(e, { ...C.userNode }) : void 0, U = a ? (e) => a(e, { ...C.userNode }) : void 0, W = o ? (e) => o(e, { ...C.userNode }) : void 0, G = s ? (e) => s(e, { ...C.userNode }) : void 0, K = (e) => {
1279
1278
  let { selectNodesOnDrag: r, nodeDragThreshold: i } = j.getState();
1280
- O && (!r || !D || i > 0) && Vt({
1279
+ O && (!r || !D || i > 0) && handleNodeClick({
1281
1280
  id: t,
1282
1281
  store: j,
1283
1282
  nodeRef: N
1284
1283
  }), n && n(e, { ...C.userNode });
1285
- }, ie = (e) => {
1286
- if (!(oe(e.nativeEvent) || h)) {
1287
- if (b.includes(e.key) && O) Vt({
1284
+ }, q = (e) => {
1285
+ if (!(isInputDOMNode(e.nativeEvent) || h)) {
1286
+ if (elementSelectionKeys.includes(e.key) && O) handleNodeClick({
1288
1287
  id: t,
1289
1288
  store: j,
1290
1289
  unselect: e.key === "Escape",
1291
1290
  nodeRef: N
1292
1291
  });
1293
- else if (D && S.selected && Object.prototype.hasOwnProperty.call(nn, e.key)) {
1292
+ else if (D && S.selected && Object.prototype.hasOwnProperty.call(arrowKeyDiffs, e.key)) {
1294
1293
  e.preventDefault();
1295
1294
  let { ariaLabelConfig: t } = j.getState();
1296
1295
  j.setState({ ariaLiveMessage: t["node.a11yDescription.ariaLiveMessage"]({
@@ -1298,23 +1297,23 @@ function _n({ id: t, onClick: n, onMouseEnter: r, onMouseMove: i, onMouseLeave:
1298
1297
  x: ~~C.positionAbsolute.x,
1299
1298
  y: ~~C.positionAbsolute.y
1300
1299
  }) }), F({
1301
- direction: nn[e.key],
1300
+ direction: arrowKeyDiffs[e.key],
1302
1301
  factor: e.shiftKey ? 4 : 1
1303
1302
  });
1304
1303
  }
1305
1304
  }
1306
- }, ae = () => {
1305
+ }, J = () => {
1307
1306
  if (h || !N.current?.matches(":focus-visible")) return;
1308
1307
  let { transform: e, width: n, height: r, autoPanOnNodeFocus: i, setCenter: a } = j.getState();
1309
- i && (R(new Map([[t, S]]), {
1308
+ i && (getNodesInside(new Map([[t, S]]), {
1310
1309
  x: 0,
1311
1310
  y: 0,
1312
1311
  width: n,
1313
1312
  height: r
1314
- }, e, !0).length > 0 || a(S.position.x + ee.width / 2, S.position.y + ee.height / 2, { zoom: e[2] }));
1313
+ }, e, !0).length > 0 || a(S.position.x + I.width / 2, S.position.y + I.height / 2, { zoom: e[2] }));
1315
1314
  };
1316
- return Y("div", {
1317
- className: e([
1315
+ return jsx("div", {
1316
+ className: cc([
1318
1317
  "react-flow__node",
1319
1318
  `react-flow__node-${T}`,
1320
1319
  { [m]: D },
@@ -1331,7 +1330,7 @@ function _n({ id: t, onClick: n, onMouseEnter: r, onMouseMove: i, onMouseLeave:
1331
1330
  style: {
1332
1331
  zIndex: C.z,
1333
1332
  transform: `translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,
1334
- pointerEvents: z ? "all" : "none",
1333
+ pointerEvents: R ? "all" : "none",
1335
1334
  visibility: M ? "visible" : "hidden",
1336
1335
  ...S.style,
1337
1336
  ...L
@@ -1339,22 +1338,22 @@ function _n({ id: t, onClick: n, onMouseEnter: r, onMouseMove: i, onMouseLeave:
1339
1338
  "data-id": t,
1340
1339
  "data-testid": `rf__node-${t}`,
1341
1340
  onMouseEnter: B,
1342
- onMouseMove: V,
1343
- onMouseLeave: H,
1344
- onContextMenu: te,
1345
- onClick: re,
1346
- onDoubleClick: ne,
1347
- onKeyDown: A ? ie : void 0,
1341
+ onMouseMove: H,
1342
+ onMouseLeave: U,
1343
+ onContextMenu: W,
1344
+ onClick: K,
1345
+ onDoubleClick: G,
1346
+ onKeyDown: A ? q : void 0,
1348
1347
  tabIndex: A ? 0 : void 0,
1349
- onFocus: A ? ae : void 0,
1348
+ onFocus: A ? J : void 0,
1350
1349
  role: S.ariaRole ?? (A ? "group" : void 0),
1351
1350
  "aria-roledescription": "node",
1352
- "aria-describedby": h ? void 0 : `${Ie}-${g}`,
1351
+ "aria-describedby": h ? void 0 : `${ARIA_NODE_DESC_KEY}-${g}`,
1353
1352
  "aria-label": S.ariaLabel,
1354
1353
  ...S.domAttributes,
1355
- children: Y(Kt, {
1354
+ children: jsx(Provider, {
1356
1355
  value: t,
1357
- children: Y(E, {
1356
+ children: jsx(E, {
1358
1357
  id: t,
1359
1358
  data: S.data,
1360
1359
  type: T,
@@ -1371,24 +1370,24 @@ function _n({ id: t, onClick: n, onMouseEnter: r, onMouseMove: i, onMouseLeave:
1371
1370
  dragHandle: S.dragHandle,
1372
1371
  zIndex: C.z,
1373
1372
  parentId: S.parentId,
1374
- ...ee
1373
+ ...I
1375
1374
  })
1376
1375
  })
1377
1376
  });
1378
1377
  }
1379
- var vn = U(_n), yn = (e) => ({
1378
+ var NodeWrapper$1 = memo(NodeWrapper), selector$b = (e) => ({
1380
1379
  nodesDraggable: e.nodesDraggable,
1381
1380
  nodesConnectable: e.nodesConnectable,
1382
1381
  nodesFocusable: e.nodesFocusable,
1383
1382
  elementsSelectable: e.elementsSelectable,
1384
1383
  onError: e.onError
1385
1384
  });
1386
- function bn(e) {
1387
- let { nodesDraggable: t, nodesConnectable: n, nodesFocusable: r, elementsSelectable: i, onError: a } = Q(yn, Z), o = pn(e.onlyRenderVisibleElements), s = hn();
1388
- return Y("div", {
1385
+ function NodeRendererComponent(e) {
1386
+ let { nodesDraggable: t, nodesConnectable: n, nodesFocusable: r, elementsSelectable: i, onError: a } = useStore(selector$b, shallow), o = useVisibleNodeIds(e.onlyRenderVisibleElements), s = useResizeObserver();
1387
+ return jsx("div", {
1389
1388
  className: "react-flow__nodes",
1390
- style: Nt,
1391
- children: o.map((o) => Y(vn, {
1389
+ style: containerStyle,
1390
+ children: o.map((o) => jsx(NodeWrapper$1, {
1392
1391
  id: o,
1393
1392
  nodeTypes: e.nodeTypes,
1394
1393
  nodeExtent: e.nodeExtent,
@@ -1412,15 +1411,15 @@ function bn(e) {
1412
1411
  }, o))
1413
1412
  });
1414
1413
  }
1415
- bn.displayName = "NodeRenderer";
1416
- var xn = U(bn);
1417
- function Sn(e) {
1418
- return Q(W((t) => {
1414
+ NodeRendererComponent.displayName = "NodeRenderer";
1415
+ var NodeRenderer = memo(NodeRendererComponent);
1416
+ function useVisibleEdgeIds(e) {
1417
+ return useStore(useCallback((t) => {
1419
1418
  if (!e) return t.edges.map((e) => e.id);
1420
1419
  let n = [];
1421
1420
  if (t.width && t.height) for (let e of t.edges) {
1422
1421
  let r = t.nodeLookup.get(e.source), i = t.nodeLookup.get(e.target);
1423
- r && i && ae({
1422
+ r && i && isEdgeVisible({
1424
1423
  sourceNode: r,
1425
1424
  targetNode: i,
1426
1425
  width: t.width,
@@ -1429,9 +1428,9 @@ function Sn(e) {
1429
1428
  }) && n.push(e.id);
1430
1429
  }
1431
1430
  return n;
1432
- }, [e]), Z);
1431
+ }, [e]), shallow);
1433
1432
  }
1434
- var Cn = ({ color: e = "none", strokeWidth: t = 1 }) => Y("polyline", {
1433
+ var ArrowSymbol = ({ color: e = "none", strokeWidth: t = 1 }) => jsx("polyline", {
1435
1434
  className: "arrow",
1436
1435
  style: {
1437
1436
  strokeWidth: t,
@@ -1441,7 +1440,7 @@ var Cn = ({ color: e = "none", strokeWidth: t = 1 }) => Y("polyline", {
1441
1440
  fill: "none",
1442
1441
  strokeLinejoin: "round",
1443
1442
  points: "-5,-4 0,0 -5,4"
1444
- }), wn = ({ color: e = "none", strokeWidth: t = 1 }) => Y("polyline", {
1443
+ }), ArrowClosedSymbol = ({ color: e = "none", strokeWidth: t = 1 }) => jsx("polyline", {
1445
1444
  className: "arrowclosed",
1446
1445
  style: {
1447
1446
  strokeWidth: t,
@@ -1453,17 +1452,17 @@ var Cn = ({ color: e = "none", strokeWidth: t = 1 }) => Y("polyline", {
1453
1452
  strokeLinecap: "round",
1454
1453
  strokeLinejoin: "round",
1455
1454
  points: "-5,-4 0,0 -5,4 -5,-4"
1456
- }), Tn = {
1457
- [r.Arrow]: Cn,
1458
- [r.ArrowClosed]: wn
1455
+ }), MarkerSymbols = {
1456
+ [MarkerType.Arrow]: ArrowSymbol,
1457
+ [MarkerType.ArrowClosed]: ArrowClosedSymbol
1459
1458
  };
1460
- function En(e) {
1461
- let t = $();
1462
- return K(() => Object.prototype.hasOwnProperty.call(Tn, e) ? Tn[e] : (t.getState().onError?.("009", x.error009(e)), null), [e]);
1459
+ function useMarkerSymbol(e) {
1460
+ let t = useStoreApi();
1461
+ return useMemo(() => Object.prototype.hasOwnProperty.call(MarkerSymbols, e) ? MarkerSymbols[e] : (t.getState().onError?.("009", errorMessages.error009(e)), null), [e]);
1463
1462
  }
1464
- var Dn = ({ id: e, type: t, color: n, width: r = 12.5, height: i = 12.5, markerUnits: a = "strokeWidth", strokeWidth: o, orient: s = "auto-start-reverse" }) => {
1465
- let c = En(t);
1466
- return c ? Y("marker", {
1463
+ var Marker = ({ id: e, type: t, color: n, width: r = 12.5, height: i = 12.5, markerUnits: a = "strokeWidth", strokeWidth: o, orient: s = "auto-start-reverse" }) => {
1464
+ let c = useMarkerSymbol(t);
1465
+ return c ? jsx("marker", {
1467
1466
  className: "react-flow__arrowhead",
1468
1467
  id: e,
1469
1468
  markerWidth: `${r}`,
@@ -1473,13 +1472,13 @@ var Dn = ({ id: e, type: t, color: n, width: r = 12.5, height: i = 12.5, markerU
1473
1472
  orient: s,
1474
1473
  refX: "0",
1475
1474
  refY: "0",
1476
- children: Y(c, {
1475
+ children: jsx(c, {
1477
1476
  color: n,
1478
1477
  strokeWidth: o
1479
1478
  })
1480
1479
  }) : null;
1481
- }, On = ({ defaultColor: e, rfId: t }) => {
1482
- let n = Q((e) => e.edges), r = Q((e) => e.defaultEdgeOptions), i = K(() => _(n, {
1480
+ }, MarkerDefinitions = ({ defaultColor: e, rfId: t }) => {
1481
+ let n = useStore((e) => e.edges), r = useStore((e) => e.defaultEdgeOptions), i = useMemo(() => createMarkerIds(n, {
1483
1482
  id: t,
1484
1483
  defaultColor: e,
1485
1484
  defaultMarkerStart: r?.markerStart,
@@ -1490,10 +1489,10 @@ var Dn = ({ id: e, type: t, color: n, width: r = 12.5, height: i = 12.5, markerU
1490
1489
  t,
1491
1490
  e
1492
1491
  ]);
1493
- return i.length ? Y("svg", {
1492
+ return i.length ? jsx("svg", {
1494
1493
  className: "react-flow__marker",
1495
1494
  "aria-hidden": "true",
1496
- children: Y("defs", { children: i.map((e) => Y(Dn, {
1495
+ children: jsx("defs", { children: i.map((e) => jsx(Marker, {
1497
1496
  id: e.id,
1498
1497
  type: e.type,
1499
1498
  color: e.color,
@@ -1505,16 +1504,16 @@ var Dn = ({ id: e, type: t, color: n, width: r = 12.5, height: i = 12.5, markerU
1505
1504
  }, e.id)) })
1506
1505
  }) : null;
1507
1506
  };
1508
- On.displayName = "MarkerDefinitions";
1509
- var kn = U(On);
1510
- function An({ x: t, y: n, label: r, labelStyle: i, labelShowBg: a = !0, labelBgStyle: o, labelBgPadding: s = [2, 4], labelBgBorderRadius: c = 2, children: l, className: u, ...d }) {
1511
- let [f, p] = J({
1507
+ MarkerDefinitions.displayName = "MarkerDefinitions";
1508
+ var MarkerDefinitions$1 = memo(MarkerDefinitions);
1509
+ function EdgeTextComponent({ x: t, y: n, label: r, labelStyle: i, labelShowBg: a = !0, labelBgStyle: o, labelBgPadding: s = [2, 4], labelBgBorderRadius: c = 2, children: l, className: u, ...d }) {
1510
+ let [f, p] = useState({
1512
1511
  x: 1,
1513
1512
  y: 0,
1514
1513
  width: 0,
1515
1514
  height: 0
1516
- }), m = e(["react-flow__edge-textwrapper", u]), h = q(null);
1517
- return G(() => {
1515
+ }), m = cc(["react-flow__edge-textwrapper", u]), h = useRef(null);
1516
+ return useEffect(() => {
1518
1517
  if (h.current) {
1519
1518
  let e = h.current.getBBox();
1520
1519
  p({
@@ -1524,13 +1523,13 @@ function An({ x: t, y: n, label: r, labelStyle: i, labelShowBg: a = !0, labelBgS
1524
1523
  height: e.height
1525
1524
  });
1526
1525
  }
1527
- }, [r]), r ? X("g", {
1526
+ }, [r]), r ? jsxs("g", {
1528
1527
  transform: `translate(${t - f.width / 2} ${n - f.height / 2})`,
1529
1528
  className: m,
1530
1529
  visibility: f.width ? "visible" : "hidden",
1531
1530
  ...d,
1532
1531
  children: [
1533
- a && Y("rect", {
1532
+ a && jsx("rect", {
1534
1533
  width: f.width + 2 * s[0],
1535
1534
  x: -s[0],
1536
1535
  y: -s[1],
@@ -1540,7 +1539,7 @@ function An({ x: t, y: n, label: r, labelStyle: i, labelShowBg: a = !0, labelBgS
1540
1539
  rx: c,
1541
1540
  ry: c
1542
1541
  }),
1543
- Y("text", {
1542
+ jsx("text", {
1544
1543
  className: "react-flow__edge-text",
1545
1544
  y: f.height / 2,
1546
1545
  dy: "0.3em",
@@ -1552,24 +1551,24 @@ function An({ x: t, y: n, label: r, labelStyle: i, labelShowBg: a = !0, labelBgS
1552
1551
  ]
1553
1552
  }) : null;
1554
1553
  }
1555
- An.displayName = "EdgeText";
1556
- var jn = U(An);
1557
- function Mn({ path: t, labelX: n, labelY: r, label: i, labelStyle: a, labelShowBg: o, labelBgStyle: s, labelBgPadding: c, labelBgBorderRadius: l, interactionWidth: u = 20, ...d }) {
1558
- return X(De, { children: [
1559
- Y("path", {
1554
+ EdgeTextComponent.displayName = "EdgeText";
1555
+ var EdgeText = memo(EdgeTextComponent);
1556
+ function BaseEdge({ path: t, labelX: n, labelY: r, label: i, labelStyle: a, labelShowBg: o, labelBgStyle: s, labelBgPadding: c, labelBgBorderRadius: l, interactionWidth: u = 20, ...d }) {
1557
+ return jsxs(Fragment$1, { children: [
1558
+ jsx("path", {
1560
1559
  ...d,
1561
1560
  d: t,
1562
1561
  fill: "none",
1563
- className: e(["react-flow__edge-path", d.className])
1562
+ className: cc(["react-flow__edge-path", d.className])
1564
1563
  }),
1565
- u ? Y("path", {
1564
+ u ? jsx("path", {
1566
1565
  d: t,
1567
1566
  fill: "none",
1568
1567
  strokeOpacity: 0,
1569
1568
  strokeWidth: u,
1570
1569
  className: "react-flow__edge-interaction"
1571
1570
  }) : null,
1572
- i && ue(n) && ue(r) ? Y(jn, {
1571
+ i && isNumeric(n) && isNumeric(r) ? jsx(EdgeText, {
1573
1572
  x: n,
1574
1573
  y: r,
1575
1574
  label: i,
@@ -1581,23 +1580,23 @@ function Mn({ path: t, labelX: n, labelY: r, label: i, labelStyle: a, labelShowB
1581
1580
  }) : null
1582
1581
  ] });
1583
1582
  }
1584
- function Nn({ pos: e, x1: t, y1: n, x2: r, y2: i }) {
1585
- return e === a.Left || e === a.Right ? [.5 * (t + r), n] : [t, .5 * (n + i)];
1583
+ function getControl({ pos: e, x1: t, y1: n, x2: r, y2: i }) {
1584
+ return e === Position.Left || e === Position.Right ? [.5 * (t + r), n] : [t, .5 * (n + i)];
1586
1585
  }
1587
- function Pn({ sourceX: e, sourceY: t, sourcePosition: n = a.Bottom, targetX: r, targetY: i, targetPosition: o = a.Top }) {
1588
- let [s, c] = Nn({
1586
+ function getSimpleBezierPath({ sourceX: e, sourceY: t, sourcePosition: n = Position.Bottom, targetX: r, targetY: i, targetPosition: o = Position.Top }) {
1587
+ let [s, c] = getControl({
1589
1588
  pos: n,
1590
1589
  x1: e,
1591
1590
  y1: t,
1592
1591
  x2: r,
1593
1592
  y2: i
1594
- }), [l, u] = Nn({
1593
+ }), [l, u] = getControl({
1595
1594
  pos: o,
1596
1595
  x1: r,
1597
1596
  y1: i,
1598
1597
  x2: e,
1599
1598
  y2: t
1600
- }), [d, f, p, m] = w({
1599
+ }), [d, f, p, m] = getBezierEdgeCenter({
1601
1600
  sourceX: e,
1602
1601
  sourceY: t,
1603
1602
  targetX: r,
@@ -1615,9 +1614,9 @@ function Pn({ sourceX: e, sourceY: t, sourcePosition: n = a.Bottom, targetX: r,
1615
1614
  m
1616
1615
  ];
1617
1616
  }
1618
- function Fn(e) {
1619
- return U(({ id: t, sourceX: n, sourceY: r, targetX: i, targetY: a, sourcePosition: o, targetPosition: s, label: c, labelStyle: l, labelShowBg: u, labelBgStyle: d, labelBgPadding: f, labelBgBorderRadius: p, style: m, markerEnd: h, markerStart: g, interactionWidth: _ }) => {
1620
- let [v, y, b] = Pn({
1617
+ function createSimpleBezierEdge(e) {
1618
+ return memo(({ id: t, sourceX: n, sourceY: r, targetX: i, targetY: a, sourcePosition: o, targetPosition: s, label: c, labelStyle: l, labelShowBg: u, labelBgStyle: d, labelBgPadding: f, labelBgBorderRadius: p, style: m, markerEnd: h, markerStart: g, interactionWidth: _ }) => {
1619
+ let [v, y, b] = getSimpleBezierPath({
1621
1620
  sourceX: n,
1622
1621
  sourceY: r,
1623
1622
  sourcePosition: o,
@@ -1625,7 +1624,7 @@ function Fn(e) {
1625
1624
  targetY: a,
1626
1625
  targetPosition: s
1627
1626
  });
1628
- return Y(Mn, {
1627
+ return jsx(BaseEdge, {
1629
1628
  id: e.isInternal ? void 0 : t,
1630
1629
  path: v,
1631
1630
  labelX: y,
@@ -1643,11 +1642,11 @@ function Fn(e) {
1643
1642
  });
1644
1643
  });
1645
1644
  }
1646
- var In = Fn({ isInternal: !1 }), Ln = Fn({ isInternal: !0 });
1647
- In.displayName = "SimpleBezierEdge", Ln.displayName = "SimpleBezierEdgeInternal";
1648
- function Rn(e) {
1649
- return U(({ id: t, sourceX: n, sourceY: r, targetX: i, targetY: o, label: s, labelStyle: c, labelShowBg: l, labelBgStyle: u, labelBgPadding: d, labelBgBorderRadius: f, style: p, sourcePosition: m = a.Bottom, targetPosition: h = a.Top, markerEnd: g, markerStart: _, pathOptions: v, interactionWidth: y }) => {
1650
- let [b, x, S] = B({
1645
+ var SimpleBezierEdge = createSimpleBezierEdge({ isInternal: !1 }), SimpleBezierEdgeInternal = createSimpleBezierEdge({ isInternal: !0 });
1646
+ SimpleBezierEdge.displayName = "SimpleBezierEdge", SimpleBezierEdgeInternal.displayName = "SimpleBezierEdgeInternal";
1647
+ function createSmoothStepEdge(e) {
1648
+ return memo(({ id: t, sourceX: n, sourceY: r, targetX: i, targetY: o, label: s, labelStyle: c, labelShowBg: l, labelBgStyle: u, labelBgPadding: d, labelBgBorderRadius: f, style: p, sourcePosition: m = Position.Bottom, targetPosition: h = Position.Top, markerEnd: g, markerStart: _, pathOptions: v, interactionWidth: y }) => {
1649
+ let [b, x, S] = getSmoothStepPath({
1651
1650
  sourceX: n,
1652
1651
  sourceY: r,
1653
1652
  sourcePosition: m,
@@ -1658,7 +1657,7 @@ function Rn(e) {
1658
1657
  offset: v?.offset,
1659
1658
  stepPosition: v?.stepPosition
1660
1659
  });
1661
- return Y(Mn, {
1660
+ return jsx(BaseEdge, {
1662
1661
  id: e.isInternal ? void 0 : t,
1663
1662
  path: b,
1664
1663
  labelX: x,
@@ -1676,32 +1675,32 @@ function Rn(e) {
1676
1675
  });
1677
1676
  });
1678
1677
  }
1679
- var zn = Rn({ isInternal: !1 }), Bn = Rn({ isInternal: !0 });
1680
- zn.displayName = "SmoothStepEdge", Bn.displayName = "SmoothStepEdgeInternal";
1681
- function Vn(e) {
1682
- return U(({ id: t, ...n }) => {
1678
+ var SmoothStepEdge = createSmoothStepEdge({ isInternal: !1 }), SmoothStepEdgeInternal = createSmoothStepEdge({ isInternal: !0 });
1679
+ SmoothStepEdge.displayName = "SmoothStepEdge", SmoothStepEdgeInternal.displayName = "SmoothStepEdgeInternal";
1680
+ function createStepEdge(e) {
1681
+ return memo(({ id: t, ...n }) => {
1683
1682
  let r = e.isInternal ? void 0 : t;
1684
- return Y(zn, {
1683
+ return jsx(SmoothStepEdge, {
1685
1684
  ...n,
1686
1685
  id: r,
1687
- pathOptions: K(() => ({
1686
+ pathOptions: useMemo(() => ({
1688
1687
  borderRadius: 0,
1689
1688
  offset: n.pathOptions?.offset
1690
1689
  }), [n.pathOptions?.offset])
1691
1690
  });
1692
1691
  });
1693
1692
  }
1694
- var Hn = Vn({ isInternal: !1 }), Un = Vn({ isInternal: !0 });
1695
- Hn.displayName = "StepEdge", Un.displayName = "StepEdgeInternal";
1696
- function Wn(e) {
1697
- return U(({ id: t, sourceX: n, sourceY: r, targetX: i, targetY: a, label: o, labelStyle: s, labelShowBg: c, labelBgStyle: l, labelBgPadding: u, labelBgBorderRadius: d, style: f, markerEnd: p, markerStart: m, interactionWidth: h }) => {
1698
- let [g, _, v] = V({
1693
+ var StepEdge = createStepEdge({ isInternal: !1 }), StepEdgeInternal = createStepEdge({ isInternal: !0 });
1694
+ StepEdge.displayName = "StepEdge", StepEdgeInternal.displayName = "StepEdgeInternal";
1695
+ function createStraightEdge(e) {
1696
+ return memo(({ id: t, sourceX: n, sourceY: r, targetX: i, targetY: a, label: o, labelStyle: s, labelShowBg: c, labelBgStyle: l, labelBgPadding: u, labelBgBorderRadius: d, style: f, markerEnd: p, markerStart: m, interactionWidth: h }) => {
1697
+ let [g, _, v] = getStraightPath({
1699
1698
  sourceX: n,
1700
1699
  sourceY: r,
1701
1700
  targetX: i,
1702
1701
  targetY: a
1703
1702
  });
1704
- return Y(Mn, {
1703
+ return jsx(BaseEdge, {
1705
1704
  id: e.isInternal ? void 0 : t,
1706
1705
  path: g,
1707
1706
  labelX: _,
@@ -1719,11 +1718,11 @@ function Wn(e) {
1719
1718
  });
1720
1719
  });
1721
1720
  }
1722
- var Gn = Wn({ isInternal: !1 }), Kn = Wn({ isInternal: !0 });
1723
- Gn.displayName = "StraightEdge", Kn.displayName = "StraightEdgeInternal";
1724
- function qn(e) {
1725
- return U(({ id: t, sourceX: n, sourceY: r, targetX: i, targetY: o, sourcePosition: s = a.Bottom, targetPosition: c = a.Top, label: l, labelStyle: u, labelShowBg: d, labelBgStyle: f, labelBgPadding: p, labelBgBorderRadius: m, style: h, markerEnd: g, markerStart: _, pathOptions: v, interactionWidth: y }) => {
1726
- let [b, x, S] = T({
1721
+ var StraightEdge = createStraightEdge({ isInternal: !1 }), StraightEdgeInternal = createStraightEdge({ isInternal: !0 });
1722
+ StraightEdge.displayName = "StraightEdge", StraightEdgeInternal.displayName = "StraightEdgeInternal";
1723
+ function createBezierEdge(e) {
1724
+ return memo(({ id: t, sourceX: n, sourceY: r, targetX: i, targetY: o, sourcePosition: s = Position.Bottom, targetPosition: c = Position.Top, label: l, labelStyle: u, labelShowBg: d, labelBgStyle: f, labelBgPadding: p, labelBgBorderRadius: m, style: h, markerEnd: g, markerStart: _, pathOptions: v, interactionWidth: y }) => {
1725
+ let [b, x, S] = getBezierPath({
1727
1726
  sourceX: n,
1728
1727
  sourceY: r,
1729
1728
  sourcePosition: s,
@@ -1732,7 +1731,7 @@ function qn(e) {
1732
1731
  targetPosition: c,
1733
1732
  curvature: v?.curvature
1734
1733
  });
1735
- return Y(Mn, {
1734
+ return jsx(BaseEdge, {
1736
1735
  id: e.isInternal ? void 0 : t,
1737
1736
  path: b,
1738
1737
  labelX: x,
@@ -1750,40 +1749,40 @@ function qn(e) {
1750
1749
  });
1751
1750
  });
1752
1751
  }
1753
- var Jn = qn({ isInternal: !1 }), Yn = qn({ isInternal: !0 });
1754
- Jn.displayName = "BezierEdge", Yn.displayName = "BezierEdgeInternal";
1755
- var Xn = {
1756
- default: Yn,
1757
- straight: Kn,
1758
- step: Un,
1759
- smoothstep: Bn,
1760
- simplebezier: Ln
1761
- }, Zn = {
1752
+ var BezierEdge = createBezierEdge({ isInternal: !1 }), BezierEdgeInternal = createBezierEdge({ isInternal: !0 });
1753
+ BezierEdge.displayName = "BezierEdge", BezierEdgeInternal.displayName = "BezierEdgeInternal";
1754
+ var builtinEdgeTypes = {
1755
+ default: BezierEdgeInternal,
1756
+ straight: StraightEdgeInternal,
1757
+ step: StepEdgeInternal,
1758
+ smoothstep: SmoothStepEdgeInternal,
1759
+ simplebezier: SimpleBezierEdgeInternal
1760
+ }, nullPosition = {
1762
1761
  sourceX: null,
1763
1762
  sourceY: null,
1764
1763
  targetX: null,
1765
1764
  targetY: null,
1766
1765
  sourcePosition: null,
1767
1766
  targetPosition: null
1768
- }, Qn = (e, t, n) => n === a.Left ? e - t : n === a.Right ? e + t : e, $n = (e, t, n) => n === a.Top ? e - t : n === a.Bottom ? e + t : e, er = "react-flow__edgeupdater";
1769
- function tr({ position: t, centerX: n, centerY: r, radius: i = 10, onMouseDown: a, onMouseEnter: o, onMouseOut: s, type: c }) {
1770
- return Y("circle", {
1767
+ }, shiftX = (e, t, n) => n === Position.Left ? e - t : n === Position.Right ? e + t : e, shiftY = (e, t, n) => n === Position.Top ? e - t : n === Position.Bottom ? e + t : e, EdgeUpdaterClassName = "react-flow__edgeupdater";
1768
+ function EdgeAnchor({ position: t, centerX: n, centerY: r, radius: i = 10, onMouseDown: a, onMouseEnter: o, onMouseOut: s, type: c }) {
1769
+ return jsx("circle", {
1771
1770
  onMouseDown: a,
1772
1771
  onMouseEnter: o,
1773
1772
  onMouseOut: s,
1774
- className: e([er, `${er}-${c}`]),
1775
- cx: Qn(n, i, t),
1776
- cy: $n(r, i, t),
1773
+ className: cc([EdgeUpdaterClassName, `${EdgeUpdaterClassName}-${c}`]),
1774
+ cx: shiftX(n, i, t),
1775
+ cy: shiftY(r, i, t),
1777
1776
  r: i,
1778
1777
  stroke: "transparent",
1779
1778
  fill: "transparent"
1780
1779
  });
1781
1780
  }
1782
- function nr({ isReconnectable: e, reconnectRadius: t, edge: n, sourceX: r, sourceY: i, targetX: a, targetY: o, sourcePosition: s, targetPosition: c, onReconnect: u, onReconnectStart: d, onReconnectEnd: f, setReconnecting: p, setUpdateHover: m }) {
1783
- let h = $(), g = (e, t) => {
1781
+ function EdgeUpdateAnchors({ isReconnectable: e, reconnectRadius: t, edge: n, sourceX: r, sourceY: i, targetX: a, targetY: o, sourcePosition: s, targetPosition: c, onReconnect: u, onReconnectStart: d, onReconnectEnd: f, setReconnecting: p, setUpdateHover: m }) {
1782
+ let h = useStoreApi(), g = (e, t) => {
1784
1783
  if (e.button !== 0) return;
1785
1784
  let { autoPanOnConnect: r, domNode: i, connectionMode: a, connectionRadius: o, lib: s, onConnectStart: c, cancelConnection: m, nodeLookup: g, rfId: _, panBy: v, updateConnection: y } = h.getState(), b = t.type === "target";
1786
- l.onPointerDown(e.nativeEvent, {
1785
+ XYHandle.onPointerDown(e.nativeEvent, {
1787
1786
  autoPanOnConnect: r,
1788
1787
  connectionMode: a,
1789
1788
  connectionRadius: o,
@@ -1821,7 +1820,7 @@ function nr({ isReconnectable: e, reconnectRadius: t, edge: n, sourceX: r, sourc
1821
1820
  id: n.sourceHandle ?? null,
1822
1821
  type: "source"
1823
1822
  }), y = () => m(!0), b = () => m(!1);
1824
- return X(De, { children: [(e === !0 || e === "source") && Y(tr, {
1823
+ return jsxs(Fragment$1, { children: [(e === !0 || e === "source") && jsx(EdgeAnchor, {
1825
1824
  position: s,
1826
1825
  centerX: r,
1827
1826
  centerY: i,
@@ -1830,7 +1829,7 @@ function nr({ isReconnectable: e, reconnectRadius: t, edge: n, sourceX: r, sourc
1830
1829
  onMouseEnter: y,
1831
1830
  onMouseOut: b,
1832
1831
  type: "source"
1833
- }), (e === !0 || e === "target") && Y(tr, {
1832
+ }), (e === !0 || e === "target") && jsx(EdgeAnchor, {
1834
1833
  position: c,
1835
1834
  centerX: a,
1836
1835
  centerY: o,
@@ -1841,21 +1840,21 @@ function nr({ isReconnectable: e, reconnectRadius: t, edge: n, sourceX: r, sourc
1841
1840
  type: "target"
1842
1841
  })] });
1843
1842
  }
1844
- function rr({ id: t, edgesFocusable: n, edgesReconnectable: r, elementsSelectable: i, onClick: a, onDoubleClick: o, onContextMenu: s, onMouseEnter: c, onMouseMove: l, onMouseLeave: u, reconnectRadius: d, onReconnect: f, onReconnectStart: p, onReconnectEnd: m, rfId: h, edgeTypes: g, noPanClassName: _, onError: v, disableKeyboardA11y: y }) {
1845
- let S = Q((e) => e.edgeLookup.get(t)), C = Q((e) => e.defaultEdgeOptions);
1843
+ function EdgeWrapper({ id: t, edgesFocusable: n, edgesReconnectable: r, elementsSelectable: i, onClick: a, onDoubleClick: o, onContextMenu: s, onMouseEnter: c, onMouseMove: l, onMouseLeave: u, reconnectRadius: d, onReconnect: f, onReconnectStart: p, onReconnectEnd: m, rfId: h, edgeTypes: g, noPanClassName: _, onError: v, disableKeyboardA11y: y }) {
1844
+ let S = useStore((e) => e.edgeLookup.get(t)), C = useStore((e) => e.defaultEdgeOptions);
1846
1845
  S = C ? {
1847
1846
  ...C,
1848
1847
  ...S
1849
1848
  } : S;
1850
- let w = S.type || "default", T = g?.[w] || Xn[w];
1851
- T === void 0 && (v?.("011", x.error011(w)), w = "default", T = g?.default || Xn.default);
1852
- let E = !!(S.focusable || n && S.focusable === void 0), D = f !== void 0 && (S.reconnectable || r && S.reconnectable === void 0), O = !!(S.selectable || i && S.selectable === void 0), A = q(null), [M, N] = J(!1), [P, F] = J(!1), I = $(), { zIndex: L, sourceX: R, sourceY: z, targetX: B, targetY: V, sourcePosition: H, targetPosition: te } = Q(W((e) => {
1849
+ let w = S.type || "default", T = g?.[w] || builtinEdgeTypes[w];
1850
+ T === void 0 && (v?.("011", errorMessages.error011(w)), w = "default", T = g?.default || builtinEdgeTypes.default);
1851
+ let E = !!(S.focusable || n && S.focusable === void 0), D = f !== void 0 && (S.reconnectable || r && S.reconnectable === void 0), O = !!(S.selectable || i && S.selectable === void 0), k = useRef(null), [A, M] = useState(!1), [P, F] = useState(!1), I = useStoreApi(), { zIndex: L, sourceX: z, sourceY: B, targetX: V, targetY: H, sourcePosition: U, targetPosition: W } = useStore(useCallback((e) => {
1853
1852
  let n = e.nodeLookup.get(S.source), r = e.nodeLookup.get(S.target);
1854
1853
  if (!n || !r) return {
1855
1854
  zIndex: S.zIndex,
1856
- ...Zn
1855
+ ...nullPosition
1857
1856
  };
1858
- let i = k({
1857
+ let i = getEdgePosition({
1859
1858
  id: t,
1860
1859
  sourceNode: n,
1861
1860
  targetNode: r,
@@ -1865,7 +1864,7 @@ function rr({ id: t, edgesFocusable: n, edgesReconnectable: r, elementsSelectabl
1865
1864
  onError: v
1866
1865
  });
1867
1866
  return {
1868
- zIndex: j({
1867
+ zIndex: getElevatedEdgeZIndex({
1869
1868
  selected: S.selected,
1870
1869
  zIndex: S.zIndex,
1871
1870
  sourceNode: n,
@@ -1873,7 +1872,7 @@ function rr({ id: t, edgesFocusable: n, edgesReconnectable: r, elementsSelectabl
1873
1872
  elevateOnSelect: e.elevateEdgesOnSelect,
1874
1873
  zIndexMode: e.zIndexMode
1875
1874
  }),
1876
- ...i || Zn
1875
+ ...i || nullPosition
1877
1876
  };
1878
1877
  }, [
1879
1878
  S.source,
@@ -1882,29 +1881,29 @@ function rr({ id: t, edgesFocusable: n, edgesReconnectable: r, elementsSelectabl
1882
1881
  S.targetHandle,
1883
1882
  S.selected,
1884
1883
  S.zIndex
1885
- ]), Z), ne = K(() => S.markerStart ? `url('#${ee(S.markerStart, h)}')` : void 0, [S.markerStart, h]), re = K(() => S.markerEnd ? `url('#${ee(S.markerEnd, h)}')` : void 0, [S.markerEnd, h]);
1886
- if (S.hidden || R === null || z === null || B === null || V === null) return null;
1887
- let ie = (e) => {
1884
+ ]), shallow), G = useMemo(() => S.markerStart ? `url('#${getMarkerId(S.markerStart, h)}')` : void 0, [S.markerStart, h]), K = useMemo(() => S.markerEnd ? `url('#${getMarkerId(S.markerEnd, h)}')` : void 0, [S.markerEnd, h]);
1885
+ if (S.hidden || z === null || B === null || V === null || H === null) return null;
1886
+ let q = (e) => {
1888
1887
  let { addSelectedEdges: n, unselectNodesAndEdges: r, multiSelectionActive: i } = I.getState();
1889
1888
  O && (I.setState({ nodesSelectionActive: !1 }), S.selected && i ? (r({
1890
1889
  nodes: [],
1891
1890
  edges: [S]
1892
- }), A.current?.blur()) : n([t])), a && a(e, S);
1893
- }, ae = o ? (e) => {
1891
+ }), k.current?.blur()) : n([t])), a && a(e, S);
1892
+ }, J = o ? (e) => {
1894
1893
  o(e, { ...S });
1895
- } : void 0, oe = s ? (e) => {
1894
+ } : void 0, Y = s ? (e) => {
1896
1895
  s(e, { ...S });
1897
- } : void 0, se = c ? (e) => {
1896
+ } : void 0, X = c ? (e) => {
1898
1897
  c(e, { ...S });
1899
- } : void 0, ce = l ? (e) => {
1898
+ } : void 0, Z = l ? (e) => {
1900
1899
  l(e, { ...S });
1901
- } : void 0, le = u ? (e) => {
1900
+ } : void 0, Vn = u ? (e) => {
1902
1901
  u(e, { ...S });
1903
1902
  } : void 0;
1904
- return Y("svg", {
1903
+ return jsx("svg", {
1905
1904
  style: { zIndex: L },
1906
- children: X("g", {
1907
- className: e([
1905
+ children: jsxs("g", {
1906
+ className: cc([
1908
1907
  "react-flow__edge",
1909
1908
  `react-flow__edge-${w}`,
1910
1909
  S.className,
@@ -1913,20 +1912,20 @@ function rr({ id: t, edgesFocusable: n, edgesReconnectable: r, elementsSelectabl
1913
1912
  selected: S.selected,
1914
1913
  animated: S.animated,
1915
1914
  inactive: !O && !a,
1916
- updating: M,
1915
+ updating: A,
1917
1916
  selectable: O
1918
1917
  }
1919
1918
  ]),
1920
- onClick: ie,
1921
- onDoubleClick: ae,
1922
- onContextMenu: oe,
1923
- onMouseEnter: se,
1924
- onMouseMove: ce,
1925
- onMouseLeave: le,
1919
+ onClick: q,
1920
+ onDoubleClick: J,
1921
+ onContextMenu: Y,
1922
+ onMouseEnter: X,
1923
+ onMouseMove: Z,
1924
+ onMouseLeave: Vn,
1926
1925
  onKeyDown: E ? (e) => {
1927
- if (!y && b.includes(e.key) && O) {
1926
+ if (!y && elementSelectionKeys.includes(e.key) && O) {
1928
1927
  let { unselectNodesAndEdges: n, addSelectedEdges: r } = I.getState();
1929
- e.key === "Escape" ? (A.current?.blur(), n({ edges: [S] })) : r([t]);
1928
+ e.key === "Escape" ? (k.current?.blur(), n({ edges: [S] })) : r([t]);
1930
1929
  }
1931
1930
  } : void 0,
1932
1931
  tabIndex: E ? 0 : void 0,
@@ -1935,10 +1934,10 @@ function rr({ id: t, edgesFocusable: n, edgesReconnectable: r, elementsSelectabl
1935
1934
  "data-id": t,
1936
1935
  "data-testid": `rf__edge-${t}`,
1937
1936
  "aria-label": S.ariaLabel === null ? void 0 : S.ariaLabel || `Edge from ${S.source} to ${S.target}`,
1938
- "aria-describedby": E ? `${Le}-${h}` : void 0,
1939
- ref: A,
1937
+ "aria-describedby": E ? `${ARIA_EDGE_DESC_KEY}-${h}` : void 0,
1938
+ ref: k,
1940
1939
  ...S.domAttributes,
1941
- children: [!P && Y(T, {
1940
+ children: [!P && jsx(T, {
1942
1941
  id: t,
1943
1942
  source: S.source,
1944
1943
  target: S.target,
@@ -1953,54 +1952,54 @@ function rr({ id: t, edgesFocusable: n, edgesReconnectable: r, elementsSelectabl
1953
1952
  labelBgStyle: S.labelBgStyle,
1954
1953
  labelBgPadding: S.labelBgPadding,
1955
1954
  labelBgBorderRadius: S.labelBgBorderRadius,
1956
- sourceX: R,
1957
- sourceY: z,
1958
- targetX: B,
1959
- targetY: V,
1960
- sourcePosition: H,
1961
- targetPosition: te,
1955
+ sourceX: z,
1956
+ sourceY: B,
1957
+ targetX: V,
1958
+ targetY: H,
1959
+ sourcePosition: U,
1960
+ targetPosition: W,
1962
1961
  data: S.data,
1963
1962
  style: S.style,
1964
1963
  sourceHandleId: S.sourceHandle,
1965
1964
  targetHandleId: S.targetHandle,
1966
- markerStart: ne,
1967
- markerEnd: re,
1965
+ markerStart: G,
1966
+ markerEnd: K,
1968
1967
  pathOptions: "pathOptions" in S ? S.pathOptions : void 0,
1969
1968
  interactionWidth: S.interactionWidth
1970
- }), D && Y(nr, {
1969
+ }), D && jsx(EdgeUpdateAnchors, {
1971
1970
  edge: S,
1972
1971
  isReconnectable: D,
1973
1972
  reconnectRadius: d,
1974
1973
  onReconnect: f,
1975
1974
  onReconnectStart: p,
1976
1975
  onReconnectEnd: m,
1977
- sourceX: R,
1978
- sourceY: z,
1979
- targetX: B,
1980
- targetY: V,
1981
- sourcePosition: H,
1982
- targetPosition: te,
1983
- setUpdateHover: N,
1976
+ sourceX: z,
1977
+ sourceY: B,
1978
+ targetX: V,
1979
+ targetY: H,
1980
+ sourcePosition: U,
1981
+ targetPosition: W,
1982
+ setUpdateHover: M,
1984
1983
  setReconnecting: F
1985
1984
  })]
1986
1985
  })
1987
1986
  });
1988
1987
  }
1989
- var ir = U(rr), ar = (e) => ({
1988
+ var EdgeWrapper$1 = memo(EdgeWrapper), selector$a = (e) => ({
1990
1989
  edgesFocusable: e.edgesFocusable,
1991
1990
  edgesReconnectable: e.edgesReconnectable,
1992
1991
  elementsSelectable: e.elementsSelectable,
1993
1992
  connectionMode: e.connectionMode,
1994
1993
  onError: e.onError
1995
1994
  });
1996
- function or({ defaultMarkerColor: e, onlyRenderVisibleElements: t, rfId: n, edgeTypes: r, noPanClassName: i, onReconnect: a, onEdgeContextMenu: o, onEdgeMouseEnter: s, onEdgeMouseMove: c, onEdgeMouseLeave: l, onEdgeClick: u, reconnectRadius: d, onEdgeDoubleClick: f, onReconnectStart: p, onReconnectEnd: m, disableKeyboardA11y: h }) {
1997
- let { edgesFocusable: g, edgesReconnectable: _, elementsSelectable: v, onError: y } = Q(ar, Z), b = Sn(t);
1998
- return X("div", {
1995
+ function EdgeRendererComponent({ defaultMarkerColor: e, onlyRenderVisibleElements: t, rfId: n, edgeTypes: r, noPanClassName: i, onReconnect: a, onEdgeContextMenu: o, onEdgeMouseEnter: s, onEdgeMouseMove: c, onEdgeMouseLeave: l, onEdgeClick: u, reconnectRadius: d, onEdgeDoubleClick: f, onReconnectStart: p, onReconnectEnd: m, disableKeyboardA11y: h }) {
1996
+ let { edgesFocusable: g, edgesReconnectable: _, elementsSelectable: v, onError: y } = useStore(selector$a, shallow), b = useVisibleEdgeIds(t);
1997
+ return jsxs("div", {
1999
1998
  className: "react-flow__edges",
2000
- children: [Y(kn, {
1999
+ children: [jsx(MarkerDefinitions$1, {
2001
2000
  defaultColor: e,
2002
2001
  rfId: n
2003
- }), b.map((e) => Y(ir, {
2002
+ }), b.map((e) => jsx(EdgeWrapper$1, {
2004
2003
  id: e,
2005
2004
  edgesFocusable: g,
2006
2005
  edgesReconnectable: _,
@@ -2023,25 +2022,25 @@ function or({ defaultMarkerColor: e, onlyRenderVisibleElements: t, rfId: n, edge
2023
2022
  }, e))]
2024
2023
  });
2025
2024
  }
2026
- or.displayName = "EdgeRenderer";
2027
- var sr = U(or), cr = (e) => `translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;
2028
- function lr({ children: e }) {
2029
- return Y("div", {
2025
+ EdgeRendererComponent.displayName = "EdgeRenderer";
2026
+ var EdgeRenderer = memo(EdgeRendererComponent), selector$9 = (e) => `translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;
2027
+ function Viewport({ children: e }) {
2028
+ return jsx("div", {
2030
2029
  className: "react-flow__viewport xyflow__viewport react-flow__container",
2031
- style: { transform: Q(cr) },
2030
+ style: { transform: useStore(selector$9) },
2032
2031
  children: e
2033
2032
  });
2034
2033
  }
2035
- function ur(e) {
2036
- let t = Ot(), n = q(!1);
2037
- G(() => {
2034
+ function useOnInitHandler(e) {
2035
+ let t = useReactFlow(), n = useRef(!1);
2036
+ useEffect(() => {
2038
2037
  !n.current && t.viewportInitialized && e && (setTimeout(() => e(t), 1), n.current = !0);
2039
2038
  }, [e, t.viewportInitialized]);
2040
2039
  }
2041
- var dr = (e) => e.panZoom?.syncViewport;
2042
- function fr(e) {
2043
- let t = Q(dr), n = $();
2044
- return G(() => {
2040
+ var selector$8 = (e) => e.panZoom?.syncViewport;
2041
+ function useViewportSync(e) {
2042
+ let t = useStore(selector$8), n = useStoreApi();
2043
+ return useEffect(() => {
2045
2044
  e && (t?.(e), n.setState({ transform: [
2046
2045
  e.x,
2047
2046
  e.y,
@@ -2049,35 +2048,35 @@ function fr(e) {
2049
2048
  ] }));
2050
2049
  }, [e, t]), null;
2051
2050
  }
2052
- function pr(e) {
2051
+ function storeSelector$1(e) {
2053
2052
  return e.connection.inProgress ? {
2054
2053
  ...e.connection,
2055
- to: ge(e.connection.to, e.transform)
2054
+ to: pointToRendererPoint(e.connection.to, e.transform)
2056
2055
  } : { ...e.connection };
2057
2056
  }
2058
- function mr(e) {
2059
- return e ? (t) => e(pr(t)) : pr;
2057
+ function getSelector(e) {
2058
+ return e ? (t) => e(storeSelector$1(t)) : storeSelector$1;
2060
2059
  }
2061
- function hr(e) {
2062
- return Q(mr(e), Z);
2060
+ function useConnection(e) {
2061
+ return useStore(getSelector(e), shallow);
2063
2062
  }
2064
- var gr = (e) => ({
2063
+ var selector$7 = (e) => ({
2065
2064
  nodesConnectable: e.nodesConnectable,
2066
2065
  isValid: e.connection.isValid,
2067
2066
  inProgress: e.connection.inProgress,
2068
2067
  width: e.width,
2069
2068
  height: e.height
2070
2069
  });
2071
- function _r({ containerStyle: t, style: n, type: r, component: i }) {
2072
- let { nodesConnectable: a, width: o, height: s, isValid: c, inProgress: l } = Q(gr, Z);
2073
- return o && a && l ? Y("svg", {
2070
+ function ConnectionLineWrapper({ containerStyle: t, style: n, type: r, component: i }) {
2071
+ let { nodesConnectable: a, width: o, height: s, isValid: c, inProgress: l } = useStore(selector$7, shallow);
2072
+ return o && a && l ? jsx("svg", {
2074
2073
  style: t,
2075
2074
  width: o,
2076
2075
  height: s,
2077
2076
  className: "react-flow__connectionline react-flow__container",
2078
- children: Y("g", {
2079
- className: e(["react-flow__connection", D(c)]),
2080
- children: Y(vr, {
2077
+ children: jsx("g", {
2078
+ className: cc(["react-flow__connection", getConnectionStatus(c)]),
2079
+ children: jsx(ConnectionLine, {
2081
2080
  style: n,
2082
2081
  type: r,
2083
2082
  CustomComponent: i,
@@ -2086,10 +2085,10 @@ function _r({ containerStyle: t, style: n, type: r, component: i }) {
2086
2085
  })
2087
2086
  }) : null;
2088
2087
  }
2089
- var vr = ({ style: e, type: n = t.Bezier, CustomComponent: r, isValid: i }) => {
2090
- let { inProgress: a, from: o, fromNode: s, fromHandle: c, fromPosition: l, to: u, toNode: d, toHandle: f, toPosition: p, pointer: m } = hr();
2088
+ var ConnectionLine = ({ style: e, type: n = ConnectionLineType.Bezier, CustomComponent: r, isValid: i }) => {
2089
+ let { inProgress: a, from: o, fromNode: s, fromHandle: c, fromPosition: l, to: u, toNode: d, toHandle: f, toPosition: p, pointer: m } = useConnection();
2091
2090
  if (!a) return;
2092
- if (r) return Y(r, {
2091
+ if (r) return jsx(r, {
2093
2092
  connectionLineType: n,
2094
2093
  connectionLineStyle: e,
2095
2094
  fromNode: s,
@@ -2100,7 +2099,7 @@ var vr = ({ style: e, type: n = t.Bezier, CustomComponent: r, isValid: i }) => {
2100
2099
  toY: u.y,
2101
2100
  fromPosition: l,
2102
2101
  toPosition: p,
2103
- connectionStatus: D(i),
2102
+ connectionStatus: getConnectionStatus(i),
2104
2103
  toNode: d,
2105
2104
  toHandle: f,
2106
2105
  pointer: m
@@ -2114,63 +2113,63 @@ var vr = ({ style: e, type: n = t.Bezier, CustomComponent: r, isValid: i }) => {
2114
2113
  targetPosition: p
2115
2114
  };
2116
2115
  switch (n) {
2117
- case t.Bezier:
2118
- [h] = T(g);
2116
+ case ConnectionLineType.Bezier:
2117
+ [h] = getBezierPath(g);
2119
2118
  break;
2120
- case t.SimpleBezier:
2121
- [h] = Pn(g);
2119
+ case ConnectionLineType.SimpleBezier:
2120
+ [h] = getSimpleBezierPath(g);
2122
2121
  break;
2123
- case t.Step:
2124
- [h] = B({
2122
+ case ConnectionLineType.Step:
2123
+ [h] = getSmoothStepPath({
2125
2124
  ...g,
2126
2125
  borderRadius: 0
2127
2126
  });
2128
2127
  break;
2129
- case t.SmoothStep:
2130
- [h] = B(g);
2128
+ case ConnectionLineType.SmoothStep:
2129
+ [h] = getSmoothStepPath(g);
2131
2130
  break;
2132
- default: [h] = V(g);
2131
+ default: [h] = getStraightPath(g);
2133
2132
  }
2134
- return Y("path", {
2133
+ return jsx("path", {
2135
2134
  d: h,
2136
2135
  fill: "none",
2137
2136
  className: "react-flow__connection-path",
2138
2137
  style: e
2139
2138
  });
2140
2139
  };
2141
- vr.displayName = "ConnectionLine";
2142
- var yr = {};
2143
- function br(e = yr) {
2144
- let t = q(e), n = $();
2145
- G(() => {
2140
+ ConnectionLine.displayName = "ConnectionLine";
2141
+ var emptyTypes = {};
2142
+ function useNodeOrEdgeTypesWarning(e = emptyTypes) {
2143
+ let t = useRef(e), n = useStoreApi();
2144
+ useEffect(() => {
2146
2145
  if (process.env.NODE_ENV === "development") {
2147
2146
  let r = new Set([...Object.keys(t.current), ...Object.keys(e)]);
2148
2147
  for (let i of r) if (t.current[i] !== e[i]) {
2149
- n.getState().onError?.("002", x.error002());
2148
+ n.getState().onError?.("002", errorMessages.error002());
2150
2149
  break;
2151
2150
  }
2152
2151
  t.current = e;
2153
2152
  }
2154
2153
  }, [e]);
2155
2154
  }
2156
- function xr() {
2157
- let e = $(), t = q(!1);
2158
- G(() => {
2155
+ function useStylesLoadedWarning() {
2156
+ let e = useStoreApi(), t = useRef(!1);
2157
+ useEffect(() => {
2159
2158
  if (process.env.NODE_ENV === "development" && !t.current) {
2160
2159
  let n = document.querySelector(".react-flow__pane");
2161
- n && window.getComputedStyle(n).zIndex !== "1" && e.getState().onError?.("013", x.error013("react")), t.current = !0;
2160
+ n && window.getComputedStyle(n).zIndex !== "1" && e.getState().onError?.("013", errorMessages.error013("react")), t.current = !0;
2162
2161
  }
2163
2162
  }, []);
2164
2163
  }
2165
- function Sr({ nodeTypes: e, edgeTypes: t, onInit: n, onNodeClick: r, onEdgeClick: i, onNodeDoubleClick: a, onEdgeDoubleClick: o, onNodeMouseEnter: s, onNodeMouseMove: c, onNodeMouseLeave: l, onNodeContextMenu: u, onSelectionContextMenu: d, onSelectionStart: f, onSelectionEnd: p, connectionLineType: m, connectionLineStyle: h, connectionLineComponent: g, connectionLineContainerStyle: _, selectionKeyCode: v, selectionOnDrag: y, selectionMode: b, multiSelectionKeyCode: x, panActivationKeyCode: S, zoomActivationKeyCode: C, deleteKeyCode: w, onlyRenderVisibleElements: T, elementsSelectable: E, defaultViewport: D, translateExtent: O, minZoom: k, maxZoom: A, preventScrolling: j, defaultMarkerColor: M, zoomOnScroll: N, zoomOnPinch: P, panOnScroll: F, panOnScrollSpeed: ee, panOnScrollMode: I, zoomOnDoubleClick: L, panOnDrag: R, onPaneClick: z, onPaneMouseEnter: B, onPaneMouseMove: V, onPaneMouseLeave: H, onPaneScroll: te, onPaneContextMenu: ne, paneClickDistance: re, nodeClickDistance: ie, onEdgeContextMenu: ae, onEdgeMouseEnter: oe, onEdgeMouseMove: se, onEdgeMouseLeave: ce, reconnectRadius: le, onReconnect: ue, onReconnectStart: de, onReconnectEnd: fe, noDragClassName: pe, noWheelClassName: me, noPanClassName: he, disableKeyboardA11y: ge, nodeExtent: _e, rfId: ve, viewport: ye, onViewportChange: be }) {
2166
- return br(e), br(t), xr(), ur(n), fr(ye), Y(dn, {
2167
- onPaneClick: z,
2168
- onPaneMouseEnter: B,
2169
- onPaneMouseMove: V,
2170
- onPaneMouseLeave: H,
2171
- onPaneContextMenu: ne,
2172
- onPaneScroll: te,
2173
- paneClickDistance: re,
2164
+ function GraphViewComponent({ nodeTypes: e, edgeTypes: t, onInit: n, onNodeClick: r, onEdgeClick: i, onNodeDoubleClick: a, onEdgeDoubleClick: o, onNodeMouseEnter: s, onNodeMouseMove: c, onNodeMouseLeave: l, onNodeContextMenu: u, onSelectionContextMenu: d, onSelectionStart: f, onSelectionEnd: p, connectionLineType: m, connectionLineStyle: h, connectionLineComponent: g, connectionLineContainerStyle: _, selectionKeyCode: v, selectionOnDrag: y, selectionMode: b, multiSelectionKeyCode: x, panActivationKeyCode: S, zoomActivationKeyCode: C, deleteKeyCode: w, onlyRenderVisibleElements: T, elementsSelectable: E, defaultViewport: D, translateExtent: O, minZoom: k, maxZoom: A, preventScrolling: j, defaultMarkerColor: M, zoomOnScroll: N, zoomOnPinch: P, panOnScroll: F, panOnScrollSpeed: I, panOnScrollMode: L, zoomOnDoubleClick: R, panOnDrag: z, onPaneClick: B, onPaneMouseEnter: V, onPaneMouseMove: H, onPaneMouseLeave: U, onPaneScroll: W, onPaneContextMenu: G, paneClickDistance: K, nodeClickDistance: q, onEdgeContextMenu: J, onEdgeMouseEnter: Y, onEdgeMouseMove: X, onEdgeMouseLeave: Z, reconnectRadius: Vn, onReconnect: Hn, onReconnectStart: Un, onReconnectEnd: Wn, noDragClassName: Gn, noWheelClassName: Kn, noPanClassName: Q, disableKeyboardA11y: $, nodeExtent: qn, rfId: Jn, viewport: Yn, onViewportChange: Xn }) {
2165
+ return useNodeOrEdgeTypesWarning(e), useNodeOrEdgeTypesWarning(t), useStylesLoadedWarning(), useOnInitHandler(n), useViewportSync(Yn), jsx(FlowRenderer, {
2166
+ onPaneClick: B,
2167
+ onPaneMouseEnter: V,
2168
+ onPaneMouseMove: H,
2169
+ onPaneMouseLeave: U,
2170
+ onPaneContextMenu: G,
2171
+ onPaneScroll: W,
2172
+ paneClickDistance: K,
2174
2173
  deleteKeyCode: w,
2175
2174
  selectionKeyCode: v,
2176
2175
  selectionOnDrag: y,
@@ -2183,50 +2182,50 @@ function Sr({ nodeTypes: e, edgeTypes: t, onInit: n, onNodeClick: r, onEdgeClick
2183
2182
  elementsSelectable: E,
2184
2183
  zoomOnScroll: N,
2185
2184
  zoomOnPinch: P,
2186
- zoomOnDoubleClick: L,
2185
+ zoomOnDoubleClick: R,
2187
2186
  panOnScroll: F,
2188
- panOnScrollSpeed: ee,
2189
- panOnScrollMode: I,
2190
- panOnDrag: R,
2187
+ panOnScrollSpeed: I,
2188
+ panOnScrollMode: L,
2189
+ panOnDrag: z,
2191
2190
  defaultViewport: D,
2192
2191
  translateExtent: O,
2193
2192
  minZoom: k,
2194
2193
  maxZoom: A,
2195
2194
  onSelectionContextMenu: d,
2196
2195
  preventScrolling: j,
2197
- noDragClassName: pe,
2198
- noWheelClassName: me,
2199
- noPanClassName: he,
2200
- disableKeyboardA11y: ge,
2201
- onViewportChange: be,
2202
- isControlledViewport: !!ye,
2203
- children: X(lr, { children: [
2204
- Y(sr, {
2196
+ noDragClassName: Gn,
2197
+ noWheelClassName: Kn,
2198
+ noPanClassName: Q,
2199
+ disableKeyboardA11y: $,
2200
+ onViewportChange: Xn,
2201
+ isControlledViewport: !!Yn,
2202
+ children: jsxs(Viewport, { children: [
2203
+ jsx(EdgeRenderer, {
2205
2204
  edgeTypes: t,
2206
2205
  onEdgeClick: i,
2207
2206
  onEdgeDoubleClick: o,
2208
- onReconnect: ue,
2209
- onReconnectStart: de,
2210
- onReconnectEnd: fe,
2207
+ onReconnect: Hn,
2208
+ onReconnectStart: Un,
2209
+ onReconnectEnd: Wn,
2211
2210
  onlyRenderVisibleElements: T,
2212
- onEdgeContextMenu: ae,
2213
- onEdgeMouseEnter: oe,
2214
- onEdgeMouseMove: se,
2215
- onEdgeMouseLeave: ce,
2216
- reconnectRadius: le,
2211
+ onEdgeContextMenu: J,
2212
+ onEdgeMouseEnter: Y,
2213
+ onEdgeMouseMove: X,
2214
+ onEdgeMouseLeave: Z,
2215
+ reconnectRadius: Vn,
2217
2216
  defaultMarkerColor: M,
2218
- noPanClassName: he,
2219
- disableKeyboardA11y: ge,
2220
- rfId: ve
2217
+ noPanClassName: Q,
2218
+ disableKeyboardA11y: $,
2219
+ rfId: Jn
2221
2220
  }),
2222
- Y(_r, {
2221
+ jsx(ConnectionLineWrapper, {
2223
2222
  style: h,
2224
2223
  type: m,
2225
2224
  component: g,
2226
2225
  containerStyle: _
2227
2226
  }),
2228
- Y("div", { className: "react-flow__edgelabel-renderer" }),
2229
- Y(xn, {
2227
+ jsx("div", { className: "react-flow__edgelabel-renderer" }),
2228
+ jsx(NodeRenderer, {
2230
2229
  nodeTypes: e,
2231
2230
  onNodeClick: r,
2232
2231
  onNodeDoubleClick: a,
@@ -2234,23 +2233,23 @@ function Sr({ nodeTypes: e, edgeTypes: t, onInit: n, onNodeClick: r, onEdgeClick
2234
2233
  onNodeMouseMove: c,
2235
2234
  onNodeMouseLeave: l,
2236
2235
  onNodeContextMenu: u,
2237
- nodeClickDistance: ie,
2236
+ nodeClickDistance: q,
2238
2237
  onlyRenderVisibleElements: T,
2239
- noPanClassName: he,
2240
- noDragClassName: pe,
2241
- disableKeyboardA11y: ge,
2242
- nodeExtent: _e,
2243
- rfId: ve
2238
+ noPanClassName: Q,
2239
+ noDragClassName: Gn,
2240
+ disableKeyboardA11y: $,
2241
+ nodeExtent: qn,
2242
+ rfId: Jn
2244
2243
  }),
2245
- Y("div", { className: "react-flow__viewport-portal" })
2244
+ jsx("div", { className: "react-flow__viewport-portal" })
2246
2245
  ] })
2247
2246
  });
2248
2247
  }
2249
- Sr.displayName = "GraphView";
2250
- var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, width: a, height: o, fitView: s, fitViewOptions: c, minZoom: l = .5, maxZoom: u = 2, nodeOrigin: d, nodeExtent: f, zIndexMode: p = "basic" } = {}) => {
2251
- let h = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), x = i ?? t ?? [], S = r ?? e ?? [], C = d ?? [0, 0], w = f ?? ne;
2252
- be(_, b, x);
2253
- let { nodesInitialized: T } = m(S, h, g, {
2248
+ GraphViewComponent.displayName = "GraphView";
2249
+ var GraphView = memo(GraphViewComponent), getInitialState = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, width: a, height: o, fitView: s, fitViewOptions: c, minZoom: l = .5, maxZoom: u = 2, nodeOrigin: d, nodeExtent: f, zIndexMode: p = "basic" } = {}) => {
2250
+ let h = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), x = i ?? t ?? [], S = r ?? e ?? [], C = d ?? [0, 0], w = f ?? infiniteExtent;
2251
+ updateConnectionLookup(_, b, x);
2252
+ let { nodesInitialized: T } = adoptUserNodes(S, h, g, {
2254
2253
  nodeOrigin: C,
2255
2254
  nodeExtent: w,
2256
2255
  zIndexMode: p
@@ -2260,7 +2259,7 @@ var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, wi
2260
2259
  1
2261
2260
  ];
2262
2261
  if (s && a && o) {
2263
- let { x: e, y: t, zoom: n } = H(F(h, { filter: (e) => !!((e.width || e.initialWidth) && (e.height || e.initialHeight)) }), a, o, l, u, c?.padding ?? .1);
2262
+ let { x: e, y: t, zoom: n } = getViewportForBounds(getInternalNodesBounds(h, { filter: (e) => !!((e.width || e.initialWidth) && (e.height || e.initialHeight)) }), a, o, l, u, c?.padding ?? .1);
2264
2263
  E = [
2265
2264
  e,
2266
2265
  t,
@@ -2286,12 +2285,12 @@ var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, wi
2286
2285
  panZoom: null,
2287
2286
  minZoom: l,
2288
2287
  maxZoom: u,
2289
- translateExtent: ne,
2288
+ translateExtent: infiniteExtent,
2290
2289
  nodeExtent: w,
2291
2290
  nodesSelectionActive: !1,
2292
2291
  userSelectionActive: !1,
2293
2292
  userSelectionRect: null,
2294
- connectionMode: n.Strict,
2293
+ connectionMode: ConnectionMode.Strict,
2295
2294
  domNode: null,
2296
2295
  paneDragging: !1,
2297
2296
  noPanClassName: "nopan",
@@ -2313,7 +2312,7 @@ var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, wi
2313
2312
  fitViewQueued: s ?? !1,
2314
2313
  fitViewOptions: c,
2315
2314
  fitViewResolver: null,
2316
- connection: { ...re },
2315
+ connection: { ...initialConnection },
2317
2316
  connectionClickStartHandle: null,
2318
2317
  connectOnClick: !0,
2319
2318
  ariaLiveMessage: "",
@@ -2322,20 +2321,20 @@ var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, wi
2322
2321
  autoPanOnNodeFocus: !0,
2323
2322
  autoPanSpeed: 15,
2324
2323
  connectionRadius: 20,
2325
- onError: y,
2324
+ onError: devWarn,
2326
2325
  isValidConnection: void 0,
2327
2326
  onSelectionChangeHandlers: [],
2328
2327
  lib: "react",
2329
2328
  debug: !1,
2330
- ariaLabelConfig: v,
2329
+ ariaLabelConfig: defaultAriaLabelConfig,
2331
2330
  zIndexMode: p,
2332
2331
  onNodesChangeMiddlewareMap: /* @__PURE__ */ new Map(),
2333
2332
  onEdgesChangeMiddlewareMap: /* @__PURE__ */ new Map()
2334
2333
  };
2335
- }, Tr = ({ nodes: e, edges: t, defaultNodes: n, defaultEdges: r, width: i, height: o, fitView: s, fitViewOptions: c, minZoom: l, maxZoom: u, nodeOrigin: d, nodeExtent: f, zIndexMode: p }) => ke((h, g) => {
2334
+ }, createStore = ({ nodes: e, edges: t, defaultNodes: n, defaultEdges: r, width: i, height: o, fitView: s, fitViewOptions: c, minZoom: l, maxZoom: u, nodeOrigin: d, nodeExtent: f, zIndexMode: p }) => createWithEqualityFn((h, g) => {
2336
2335
  async function _() {
2337
2336
  let { nodeLookup: e, panZoom: t, fitViewOptions: n, fitViewResolver: r, width: i, height: a, minZoom: o, maxZoom: s } = g();
2338
- t && (await C({
2337
+ t && (await fitViewport({
2339
2338
  nodes: e,
2340
2339
  width: i,
2341
2340
  height: a,
@@ -2345,7 +2344,7 @@ var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, wi
2345
2344
  }, n), r?.resolve(!0), h({ fitViewResolver: null }));
2346
2345
  }
2347
2346
  return {
2348
- ...wr({
2347
+ ...getInitialState({
2349
2348
  nodes: e,
2350
2349
  edges: t,
2351
2350
  width: i,
@@ -2361,7 +2360,7 @@ var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, wi
2361
2360
  zIndexMode: p
2362
2361
  }),
2363
2362
  setNodes: (e) => {
2364
- let { nodeLookup: t, parentLookup: n, nodeOrigin: r, elevateNodesOnSelect: i, fitViewQueued: a, zIndexMode: o, nodesSelectionActive: s } = g(), { nodesInitialized: c, hasSelectedNodes: l } = m(e, t, n, {
2363
+ let { nodeLookup: t, parentLookup: n, nodeOrigin: r, elevateNodesOnSelect: i, fitViewQueued: a, zIndexMode: o, nodesSelectionActive: s } = g(), { nodesInitialized: c, hasSelectedNodes: l } = adoptUserNodes(e, t, n, {
2365
2364
  nodeOrigin: r,
2366
2365
  nodeExtent: f,
2367
2366
  elevateNodesOnSelect: i,
@@ -2382,7 +2381,7 @@ var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, wi
2382
2381
  },
2383
2382
  setEdges: (e) => {
2384
2383
  let { connectionLookup: t, edgeLookup: n } = g();
2385
- be(t, n, e), h({ edges: e });
2384
+ updateConnectionLookup(t, n, e), h({ edges: e });
2386
2385
  },
2387
2386
  setDefaultNodesAndEdges: (e, t) => {
2388
2387
  if (e) {
@@ -2395,8 +2394,8 @@ var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, wi
2395
2394
  }
2396
2395
  },
2397
2396
  updateNodeInternals: (e) => {
2398
- let { triggerNodeChanges: t, nodeLookup: n, parentLookup: r, domNode: i, nodeOrigin: a, nodeExtent: o, debug: s, fitViewQueued: c, zIndexMode: l } = g(), { changes: u, updatedInternals: d } = xe(e, n, r, i, a, o, l);
2399
- d && (ye(n, r, {
2397
+ let { triggerNodeChanges: t, nodeLookup: n, parentLookup: r, domNode: i, nodeOrigin: a, nodeExtent: o, debug: s, fitViewQueued: c, zIndexMode: l } = g(), { changes: u, updatedInternals: d } = updateNodeInternals(e, n, r, i, a, o, l);
2398
+ d && (updateAbsolutePositions(n, r, {
2400
2399
  nodeOrigin: a,
2401
2400
  nodeExtent: o,
2402
2401
  zIndexMode: l
@@ -2418,7 +2417,7 @@ var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, wi
2418
2417
  dragging: t
2419
2418
  };
2420
2419
  if (e && s.inProgress && s.fromNode.id === e.id) {
2421
- let t = N(e, s.fromHandle, a.Left, !0);
2420
+ let t = getHandlePosition(e, s.fromHandle, Position.Left, !0);
2422
2421
  c({
2423
2422
  ...s,
2424
2423
  from: t
@@ -2435,7 +2434,7 @@ var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, wi
2435
2434
  }), r.push(d);
2436
2435
  }
2437
2436
  if (n.length > 0) {
2438
- let { parentLookup: e, nodeOrigin: t } = g(), a = te(n, i, e, t);
2437
+ let { parentLookup: e, nodeOrigin: t } = g(), a = handleExpandParent(n, i, e, t);
2439
2438
  r.push(...a);
2440
2439
  }
2441
2440
  for (let e of l.values()) r = e(r);
@@ -2443,37 +2442,37 @@ var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, wi
2443
2442
  },
2444
2443
  triggerNodeChanges: (e) => {
2445
2444
  let { onNodesChange: t, setNodes: n, nodes: r, hasDefaultNodes: i, debug: a } = g();
2446
- e?.length && (i && n(pt(e, r)), a && console.log("React Flow: trigger node changes", e), t?.(e));
2445
+ e?.length && (i && n(applyNodeChanges(e, r)), a && console.log("React Flow: trigger node changes", e), t?.(e));
2447
2446
  },
2448
2447
  triggerEdgeChanges: (e) => {
2449
2448
  let { onEdgesChange: t, setEdges: n, edges: r, hasDefaultEdges: i, debug: a } = g();
2450
- e?.length && (i && n(mt(e, r)), a && console.log("React Flow: trigger edge changes", e), t?.(e));
2449
+ e?.length && (i && n(applyEdgeChanges(e, r)), a && console.log("React Flow: trigger edge changes", e), t?.(e));
2451
2450
  },
2452
2451
  addSelectedNodes: (e) => {
2453
2452
  let { multiSelectionActive: t, edgeLookup: n, nodeLookup: r, triggerNodeChanges: i, triggerEdgeChanges: a } = g();
2454
2453
  if (t) {
2455
- i(e.map((e) => ht(e, !0)));
2454
+ i(e.map((e) => createSelectionChange(e, !0)));
2456
2455
  return;
2457
2456
  }
2458
- i(gt(r, new Set([...e]), !0)), a(gt(n));
2457
+ i(getSelectionChanges(r, new Set([...e]), !0)), a(getSelectionChanges(n));
2459
2458
  },
2460
2459
  addSelectedEdges: (e) => {
2461
2460
  let { multiSelectionActive: t, edgeLookup: n, nodeLookup: r, triggerNodeChanges: i, triggerEdgeChanges: a } = g();
2462
2461
  if (t) {
2463
- a(e.map((e) => ht(e, !0)));
2462
+ a(e.map((e) => createSelectionChange(e, !0)));
2464
2463
  return;
2465
2464
  }
2466
- a(gt(n, new Set([...e]))), i(gt(r, /* @__PURE__ */ new Set(), !0));
2465
+ a(getSelectionChanges(n, new Set([...e]))), i(getSelectionChanges(r, /* @__PURE__ */ new Set(), !0));
2467
2466
  },
2468
2467
  unselectNodesAndEdges: ({ nodes: e, edges: t } = {}) => {
2469
2468
  let { edges: n, nodes: r, nodeLookup: i, triggerNodeChanges: a, triggerEdgeChanges: o } = g(), s = e || r, c = t || n, l = [];
2470
2469
  for (let e of s) {
2471
2470
  if (!e.selected) continue;
2472
2471
  let t = i.get(e.id);
2473
- t && (t.selected = !1), l.push(ht(e.id, !1));
2472
+ t && (t.selected = !1), l.push(createSelectionChange(e.id, !1));
2474
2473
  }
2475
2474
  let u = [];
2476
- for (let e of c) e.selected && u.push(ht(e.id, !1));
2475
+ for (let e of c) e.selected && u.push(createSelectionChange(e.id, !1));
2477
2476
  a(l), o(u);
2478
2477
  },
2479
2478
  setMinZoom: (e) => {
@@ -2490,12 +2489,12 @@ var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, wi
2490
2489
  resetSelectedElements: () => {
2491
2490
  let { edges: e, nodes: t, triggerNodeChanges: n, triggerEdgeChanges: r, elementsSelectable: i } = g();
2492
2491
  if (!i) return;
2493
- let a = t.reduce((e, t) => t.selected ? [...e, ht(t.id, !1)] : e, []), o = e.reduce((e, t) => t.selected ? [...e, ht(t.id, !1)] : e, []);
2492
+ let a = t.reduce((e, t) => t.selected ? [...e, createSelectionChange(t.id, !1)] : e, []), o = e.reduce((e, t) => t.selected ? [...e, createSelectionChange(t.id, !1)] : e, []);
2494
2493
  n(a), r(o);
2495
2494
  },
2496
2495
  setNodeExtent: (e) => {
2497
2496
  let { nodes: t, nodeLookup: n, parentLookup: r, nodeOrigin: i, elevateNodesOnSelect: a, nodeExtent: o, zIndexMode: s } = g();
2498
- e[0][0] === o[0][0] && e[0][1] === o[0][1] && e[1][0] === o[1][0] && e[1][1] === o[1][1] || (m(t, n, r, {
2497
+ e[0][0] === o[0][0] && e[0][1] === o[0][1] && e[1][0] === o[1][0] && e[1][1] === o[1][1] || (adoptUserNodes(t, n, r, {
2499
2498
  nodeOrigin: i,
2500
2499
  nodeExtent: e,
2501
2500
  elevateNodesOnSelect: a,
@@ -2505,7 +2504,7 @@ var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, wi
2505
2504
  },
2506
2505
  panBy: (e) => {
2507
2506
  let { transform: t, width: n, height: r, panZoom: i, translateExtent: a } = g();
2508
- return he({
2507
+ return panBy({
2509
2508
  delta: e,
2510
2509
  panZoom: i,
2511
2510
  transform: t,
@@ -2529,16 +2528,16 @@ var Cr = U(Sr), wr = ({ nodes: e, edges: t, defaultNodes: r, defaultEdges: i, wi
2529
2528
  }), Promise.resolve(!0);
2530
2529
  },
2531
2530
  cancelConnection: () => {
2532
- h({ connection: { ...re } });
2531
+ h({ connection: { ...initialConnection } });
2533
2532
  },
2534
2533
  updateConnection: (e) => {
2535
2534
  h({ connection: e });
2536
2535
  },
2537
- reset: () => h({ ...wr() })
2536
+ reset: () => h({ ...getInitialState() })
2538
2537
  };
2539
2538
  }, Object.is);
2540
- function Er({ initialNodes: e, initialEdges: t, defaultNodes: n, defaultEdges: r, initialWidth: i, initialHeight: a, initialMinZoom: o, initialMaxZoom: s, initialFitViewOptions: c, fitView: l, nodeOrigin: u, nodeExtent: d, zIndexMode: f, children: p }) {
2541
- let [m] = J(() => Tr({
2539
+ function ReactFlowProvider({ initialNodes: e, initialEdges: t, defaultNodes: n, defaultEdges: r, initialWidth: i, initialHeight: a, initialMinZoom: o, initialMaxZoom: s, initialFitViewOptions: c, fitView: l, nodeOrigin: u, nodeExtent: d, zIndexMode: f, children: p }) {
2540
+ let [m] = useState(() => createStore({
2542
2541
  nodes: e,
2543
2542
  edges: t,
2544
2543
  defaultNodes: n,
@@ -2553,13 +2552,13 @@ function Er({ initialNodes: e, initialEdges: t, defaultNodes: n, defaultEdges: r
2553
2552
  nodeExtent: d,
2554
2553
  zIndexMode: f
2555
2554
  }));
2556
- return Y(Me, {
2555
+ return jsx(Provider$1, {
2557
2556
  value: m,
2558
- children: Y(Tt, { children: p })
2557
+ children: jsx(BatchProvider, { children: p })
2559
2558
  });
2560
2559
  }
2561
- function Dr({ children: e, nodes: t, edges: n, defaultNodes: r, defaultEdges: i, width: a, height: o, fitView: s, fitViewOptions: c, minZoom: l, maxZoom: u, nodeOrigin: d, nodeExtent: f, zIndexMode: p }) {
2562
- return Te(je) ? Y(De, { children: e }) : Y(Er, {
2560
+ function Wrapper({ children: e, nodes: t, edges: n, defaultNodes: r, defaultEdges: i, width: a, height: o, fitView: s, fitViewOptions: c, minZoom: l, maxZoom: u, nodeOrigin: d, nodeExtent: f, zIndexMode: p }) {
2561
+ return useContext(StoreContext) ? jsx(Fragment$1, { children: e }) : jsx(ReactFlowProvider, {
2563
2562
  initialNodes: t,
2564
2563
  initialEdges: n,
2565
2564
  defaultNodes: r,
@@ -2576,51 +2575,51 @@ function Dr({ children: e, nodes: t, edges: n, defaultNodes: r, defaultEdges: i,
2576
2575
  children: e
2577
2576
  });
2578
2577
  }
2579
- var Or = {
2578
+ var wrapperStyle = {
2580
2579
  width: "100%",
2581
2580
  height: "100%",
2582
2581
  overflow: "hidden",
2583
2582
  position: "relative",
2584
2583
  zIndex: 0
2585
2584
  };
2586
- function kr({ nodes: n, edges: r, defaultNodes: a, defaultEdges: o, className: c, nodeTypes: l, edgeTypes: u, onNodeClick: d, onEdgeClick: f, onInit: p, onMove: m, onMoveStart: h, onMoveEnd: g, onConnect: _, onConnectStart: v, onConnectEnd: y, onClickConnectStart: b, onClickConnectEnd: x, onNodeMouseEnter: S, onNodeMouseMove: C, onNodeMouseLeave: w, onNodeContextMenu: T, onNodeDoubleClick: E, onNodeDragStart: D, onNodeDrag: O, onNodeDragStop: k, onNodesDelete: A, onEdgesDelete: j, onDelete: M, onSelectionChange: N, onSelectionDragStart: P, onSelectionDrag: F, onSelectionDragStop: ee, onSelectionContextMenu: I, onSelectionStart: L, onSelectionEnd: R, onBeforeDelete: z, connectionMode: B, connectionLineType: V = t.Bezier, connectionLineStyle: H, connectionLineComponent: te, connectionLineContainerStyle: re, deleteKeyCode: ie = "Backspace", selectionKeyCode: ae = "Shift", selectionOnDrag: oe = !1, selectionMode: ce = s.Full, panActivationKeyCode: le = "Space", multiSelectionKeyCode: ue = se() ? "Meta" : "Control", zoomActivationKeyCode: de = se() ? "Meta" : "Control", snapToGrid: fe, snapGrid: pe, onlyRenderVisibleElements: me = !1, selectNodesOnDrag: he, nodesDraggable: ge, autoPanOnNodeFocus: _e, nodesConnectable: ve, nodesFocusable: ye, nodeOrigin: be = Qe, edgesFocusable: xe, edgesReconnectable: Se, elementsSelectable: Ce = !0, defaultViewport: we = $e, minZoom: U = .5, maxZoom: Te = 2, translateExtent: G = ne, preventScrolling: Ee = !0, nodeExtent: K, defaultMarkerColor: q = "#b1b1b7", zoomOnScroll: J = !0, zoomOnPinch: De = !0, panOnScroll: Oe = !1, panOnScrollSpeed: ke = .5, panOnScrollMode: Ae = i.Free, zoomOnDoubleClick: Z = !0, panOnDrag: je = !0, onPaneClick: Me, onPaneMouseEnter: Ne, onPaneMouseMove: Q, onPaneMouseLeave: $, onPaneScroll: Pe, onPaneContextMenu: Fe, paneClickDistance: Ie = 1, nodeClickDistance: Le = 0, children: Re, onReconnect: ze, onReconnectStart: Be, onReconnectEnd: Ve, onEdgeContextMenu: Ue, onEdgeDoubleClick: Ge, onEdgeMouseEnter: Ke, onEdgeMouseMove: qe, onEdgeMouseLeave: Je, reconnectRadius: Ye = 10, onNodesChange: Ze, onEdgesChange: et, noDragClassName: tt = "nodrag", noWheelClassName: nt = "nowheel", noPanClassName: it = "nopan", fitView: ot, fitViewOptions: st, connectOnClick: ct, attributionPosition: lt, proOptions: ut, defaultEdgeOptions: dt, elevateNodesOnSelect: ft = !0, elevateEdgesOnSelect: pt = !1, disableKeyboardA11y: mt = !1, autoPanOnConnect: ht, autoPanOnNodeDrag: gt, autoPanSpeed: _t, connectionRadius: vt, isValidConnection: yt, onError: bt, style: xt, id: St, nodeDragThreshold: Ct, connectionDragThreshold: wt, viewport: Tt, onViewportChange: Et, width: Dt, height: Ot, colorMode: kt = "light", debug: At, onScroll: jt, ariaLabelConfig: Mt, zIndexMode: Nt = "basic", ...Pt }, Ft) {
2587
- let It = St || "1", Lt = at(kt), Rt = W((e) => {
2585
+ function ReactFlow({ nodes: n, edges: r, defaultNodes: a, defaultEdges: o, className: c, nodeTypes: l, edgeTypes: u, onNodeClick: d, onEdgeClick: f, onInit: p, onMove: m, onMoveStart: h, onMoveEnd: g, onConnect: _, onConnectStart: v, onConnectEnd: y, onClickConnectStart: b, onClickConnectEnd: x, onNodeMouseEnter: S, onNodeMouseMove: C, onNodeMouseLeave: w, onNodeContextMenu: T, onNodeDoubleClick: E, onNodeDragStart: D, onNodeDrag: O, onNodeDragStop: k, onNodesDelete: A, onEdgesDelete: j, onDelete: M, onSelectionChange: N, onSelectionDragStart: P, onSelectionDrag: F, onSelectionDragStop: I, onSelectionContextMenu: L, onSelectionStart: R, onSelectionEnd: z, onBeforeDelete: B, connectionMode: V, connectionLineType: H = ConnectionLineType.Bezier, connectionLineStyle: U, connectionLineComponent: W, connectionLineContainerStyle: G, deleteKeyCode: K = "Backspace", selectionKeyCode: J = "Shift", selectionOnDrag: Y = !1, selectionMode: X = SelectionMode.Full, panActivationKeyCode: Z = "Space", multiSelectionKeyCode: Hn = isMacOs() ? "Meta" : "Control", zoomActivationKeyCode: Un = isMacOs() ? "Meta" : "Control", snapToGrid: Wn, snapGrid: Gn, onlyRenderVisibleElements: Kn = !1, selectNodesOnDrag: Q, nodesDraggable: $, autoPanOnNodeFocus: qn, nodesConnectable: Jn, nodesFocusable: Yn, nodeOrigin: Xn = defaultNodeOrigin, edgesFocusable: Zn, edgesReconnectable: Qn, elementsSelectable: $n = !0, defaultViewport: er = defaultViewport, minZoom: tr = .5, maxZoom: nr = 2, translateExtent: rr = infiniteExtent, preventScrolling: ir = !0, nodeExtent: ar, defaultMarkerColor: or = "#b1b1b7", zoomOnScroll: sr = !0, zoomOnPinch: cr = !0, panOnScroll: lr = !1, panOnScrollSpeed: ur = .5, panOnScrollMode: dr = PanOnScrollMode.Free, zoomOnDoubleClick: fr = !0, panOnDrag: pr = !0, onPaneClick: mr, onPaneMouseEnter: hr, onPaneMouseMove: gr, onPaneMouseLeave: _r, onPaneScroll: vr, onPaneContextMenu: yr, paneClickDistance: br = 1, nodeClickDistance: xr = 0, children: Sr, onReconnect: Cr, onReconnectStart: wr, onReconnectEnd: Tr, onEdgeContextMenu: Er, onEdgeDoubleClick: Dr, onEdgeMouseEnter: Or, onEdgeMouseMove: kr, onEdgeMouseLeave: Ar, reconnectRadius: jr = 10, onNodesChange: Mr, onEdgesChange: Nr, noDragClassName: Pr = "nodrag", noWheelClassName: Fr = "nowheel", noPanClassName: Ir = "nopan", fitView: Lr, fitViewOptions: Rr, connectOnClick: zr, attributionPosition: Br, proOptions: Vr, defaultEdgeOptions: Hr, elevateNodesOnSelect: Ur = !0, elevateEdgesOnSelect: Wr = !1, disableKeyboardA11y: Gr = !1, autoPanOnConnect: Kr, autoPanOnNodeDrag: qr, autoPanSpeed: Jr, connectionRadius: Yr, isValidConnection: Xr, onError: Zr, style: Qr, id: $r, nodeDragThreshold: ei, connectionDragThreshold: ti, viewport: ni, onViewportChange: ri, width: ii, height: ai, colorMode: oi = "light", debug: si, onScroll: ci, ariaLabelConfig: li, zIndexMode: ui = "basic", ...di }, fi) {
2586
+ let pi = $r || "1", mi = useColorModeClass(oi), hi = useCallback((e) => {
2588
2587
  e.currentTarget.scrollTo({
2589
2588
  top: 0,
2590
2589
  left: 0,
2591
2590
  behavior: "instant"
2592
- }), jt?.(e);
2593
- }, [jt]);
2594
- return Y("div", {
2591
+ }), ci?.(e);
2592
+ }, [ci]);
2593
+ return jsx("div", {
2595
2594
  "data-testid": "rf__wrapper",
2596
- ...Pt,
2597
- onScroll: Rt,
2595
+ ...di,
2596
+ onScroll: hi,
2598
2597
  style: {
2599
- ...xt,
2600
- ...Or
2598
+ ...Qr,
2599
+ ...wrapperStyle
2601
2600
  },
2602
- ref: Ft,
2603
- className: e([
2601
+ ref: fi,
2602
+ className: cc([
2604
2603
  "react-flow",
2605
2604
  c,
2606
- Lt
2605
+ mi
2607
2606
  ]),
2608
- id: St,
2607
+ id: $r,
2609
2608
  role: "application",
2610
- children: X(Dr, {
2609
+ children: jsxs(Wrapper, {
2611
2610
  nodes: n,
2612
2611
  edges: r,
2613
- width: Dt,
2614
- height: Ot,
2615
- fitView: ot,
2616
- fitViewOptions: st,
2617
- minZoom: U,
2618
- maxZoom: Te,
2619
- nodeOrigin: be,
2620
- nodeExtent: K,
2621
- zIndexMode: Nt,
2612
+ width: ii,
2613
+ height: ai,
2614
+ fitView: Lr,
2615
+ fitViewOptions: Rr,
2616
+ minZoom: tr,
2617
+ maxZoom: nr,
2618
+ nodeOrigin: Xn,
2619
+ nodeExtent: ar,
2620
+ zIndexMode: ui,
2622
2621
  children: [
2623
- Y(rt, {
2622
+ jsx(StoreUpdater, {
2624
2623
  nodes: n,
2625
2624
  edges: r,
2626
2625
  defaultNodes: a,
@@ -2630,28 +2629,28 @@ function kr({ nodes: n, edges: r, defaultNodes: a, defaultEdges: o, className: c
2630
2629
  onConnectEnd: y,
2631
2630
  onClickConnectStart: b,
2632
2631
  onClickConnectEnd: x,
2633
- nodesDraggable: ge,
2634
- autoPanOnNodeFocus: _e,
2635
- nodesConnectable: ve,
2636
- nodesFocusable: ye,
2637
- edgesFocusable: xe,
2638
- edgesReconnectable: Se,
2639
- elementsSelectable: Ce,
2640
- elevateNodesOnSelect: ft,
2641
- elevateEdgesOnSelect: pt,
2642
- minZoom: U,
2643
- maxZoom: Te,
2644
- nodeExtent: K,
2645
- onNodesChange: Ze,
2646
- onEdgesChange: et,
2647
- snapToGrid: fe,
2648
- snapGrid: pe,
2649
- connectionMode: B,
2650
- translateExtent: G,
2651
- connectOnClick: ct,
2652
- defaultEdgeOptions: dt,
2653
- fitView: ot,
2654
- fitViewOptions: st,
2632
+ nodesDraggable: $,
2633
+ autoPanOnNodeFocus: qn,
2634
+ nodesConnectable: Jn,
2635
+ nodesFocusable: Yn,
2636
+ edgesFocusable: Zn,
2637
+ edgesReconnectable: Qn,
2638
+ elementsSelectable: $n,
2639
+ elevateNodesOnSelect: Ur,
2640
+ elevateEdgesOnSelect: Wr,
2641
+ minZoom: tr,
2642
+ maxZoom: nr,
2643
+ nodeExtent: ar,
2644
+ onNodesChange: Mr,
2645
+ onEdgesChange: Nr,
2646
+ snapToGrid: Wn,
2647
+ snapGrid: Gn,
2648
+ connectionMode: V,
2649
+ translateExtent: rr,
2650
+ connectOnClick: zr,
2651
+ defaultEdgeOptions: Hr,
2652
+ fitView: Lr,
2653
+ fitViewOptions: Rr,
2655
2654
  onNodesDelete: A,
2656
2655
  onEdgesDelete: j,
2657
2656
  onDelete: M,
@@ -2660,28 +2659,28 @@ function kr({ nodes: n, edges: r, defaultNodes: a, defaultEdges: o, className: c
2660
2659
  onNodeDragStop: k,
2661
2660
  onSelectionDrag: F,
2662
2661
  onSelectionDragStart: P,
2663
- onSelectionDragStop: ee,
2662
+ onSelectionDragStop: I,
2664
2663
  onMove: m,
2665
2664
  onMoveStart: h,
2666
2665
  onMoveEnd: g,
2667
- noPanClassName: it,
2668
- nodeOrigin: be,
2669
- rfId: It,
2670
- autoPanOnConnect: ht,
2671
- autoPanOnNodeDrag: gt,
2672
- autoPanSpeed: _t,
2673
- onError: bt,
2674
- connectionRadius: vt,
2675
- isValidConnection: yt,
2676
- selectNodesOnDrag: he,
2677
- nodeDragThreshold: Ct,
2678
- connectionDragThreshold: wt,
2679
- onBeforeDelete: z,
2680
- debug: At,
2681
- ariaLabelConfig: Mt,
2682
- zIndexMode: Nt
2666
+ noPanClassName: Ir,
2667
+ nodeOrigin: Xn,
2668
+ rfId: pi,
2669
+ autoPanOnConnect: Kr,
2670
+ autoPanOnNodeDrag: qr,
2671
+ autoPanSpeed: Jr,
2672
+ onError: Zr,
2673
+ connectionRadius: Yr,
2674
+ isValidConnection: Xr,
2675
+ selectNodesOnDrag: Q,
2676
+ nodeDragThreshold: ei,
2677
+ connectionDragThreshold: ti,
2678
+ onBeforeDelete: B,
2679
+ debug: si,
2680
+ ariaLabelConfig: li,
2681
+ zIndexMode: ui
2683
2682
  }),
2684
- Y(Cr, {
2683
+ jsx(GraphView, {
2685
2684
  onInit: p,
2686
2685
  onNodeClick: d,
2687
2686
  onEdgeClick: f,
@@ -2692,144 +2691,144 @@ function kr({ nodes: n, edges: r, defaultNodes: a, defaultEdges: o, className: c
2692
2691
  onNodeDoubleClick: E,
2693
2692
  nodeTypes: l,
2694
2693
  edgeTypes: u,
2695
- connectionLineType: V,
2696
- connectionLineStyle: H,
2697
- connectionLineComponent: te,
2698
- connectionLineContainerStyle: re,
2699
- selectionKeyCode: ae,
2700
- selectionOnDrag: oe,
2701
- selectionMode: ce,
2702
- deleteKeyCode: ie,
2703
- multiSelectionKeyCode: ue,
2704
- panActivationKeyCode: le,
2705
- zoomActivationKeyCode: de,
2706
- onlyRenderVisibleElements: me,
2707
- defaultViewport: we,
2708
- translateExtent: G,
2709
- minZoom: U,
2710
- maxZoom: Te,
2711
- preventScrolling: Ee,
2712
- zoomOnScroll: J,
2713
- zoomOnPinch: De,
2714
- zoomOnDoubleClick: Z,
2715
- panOnScroll: Oe,
2716
- panOnScrollSpeed: ke,
2717
- panOnScrollMode: Ae,
2718
- panOnDrag: je,
2719
- onPaneClick: Me,
2720
- onPaneMouseEnter: Ne,
2721
- onPaneMouseMove: Q,
2722
- onPaneMouseLeave: $,
2723
- onPaneScroll: Pe,
2724
- onPaneContextMenu: Fe,
2725
- paneClickDistance: Ie,
2726
- nodeClickDistance: Le,
2727
- onSelectionContextMenu: I,
2728
- onSelectionStart: L,
2729
- onSelectionEnd: R,
2730
- onReconnect: ze,
2731
- onReconnectStart: Be,
2732
- onReconnectEnd: Ve,
2733
- onEdgeContextMenu: Ue,
2734
- onEdgeDoubleClick: Ge,
2735
- onEdgeMouseEnter: Ke,
2736
- onEdgeMouseMove: qe,
2737
- onEdgeMouseLeave: Je,
2738
- reconnectRadius: Ye,
2739
- defaultMarkerColor: q,
2740
- noDragClassName: tt,
2741
- noWheelClassName: nt,
2742
- noPanClassName: it,
2743
- rfId: It,
2744
- disableKeyboardA11y: mt,
2745
- nodeExtent: K,
2746
- viewport: Tt,
2747
- onViewportChange: Et
2694
+ connectionLineType: H,
2695
+ connectionLineStyle: U,
2696
+ connectionLineComponent: W,
2697
+ connectionLineContainerStyle: G,
2698
+ selectionKeyCode: J,
2699
+ selectionOnDrag: Y,
2700
+ selectionMode: X,
2701
+ deleteKeyCode: K,
2702
+ multiSelectionKeyCode: Hn,
2703
+ panActivationKeyCode: Z,
2704
+ zoomActivationKeyCode: Un,
2705
+ onlyRenderVisibleElements: Kn,
2706
+ defaultViewport: er,
2707
+ translateExtent: rr,
2708
+ minZoom: tr,
2709
+ maxZoom: nr,
2710
+ preventScrolling: ir,
2711
+ zoomOnScroll: sr,
2712
+ zoomOnPinch: cr,
2713
+ zoomOnDoubleClick: fr,
2714
+ panOnScroll: lr,
2715
+ panOnScrollSpeed: ur,
2716
+ panOnScrollMode: dr,
2717
+ panOnDrag: pr,
2718
+ onPaneClick: mr,
2719
+ onPaneMouseEnter: hr,
2720
+ onPaneMouseMove: gr,
2721
+ onPaneMouseLeave: _r,
2722
+ onPaneScroll: vr,
2723
+ onPaneContextMenu: yr,
2724
+ paneClickDistance: br,
2725
+ nodeClickDistance: xr,
2726
+ onSelectionContextMenu: L,
2727
+ onSelectionStart: R,
2728
+ onSelectionEnd: z,
2729
+ onReconnect: Cr,
2730
+ onReconnectStart: wr,
2731
+ onReconnectEnd: Tr,
2732
+ onEdgeContextMenu: Er,
2733
+ onEdgeDoubleClick: Dr,
2734
+ onEdgeMouseEnter: Or,
2735
+ onEdgeMouseMove: kr,
2736
+ onEdgeMouseLeave: Ar,
2737
+ reconnectRadius: jr,
2738
+ defaultMarkerColor: or,
2739
+ noDragClassName: Pr,
2740
+ noWheelClassName: Fr,
2741
+ noPanClassName: Ir,
2742
+ rfId: pi,
2743
+ disableKeyboardA11y: Gr,
2744
+ nodeExtent: ar,
2745
+ viewport: ni,
2746
+ onViewportChange: ri
2748
2747
  }),
2749
- Y(Xe, { onSelectionChange: N }),
2750
- Re,
2751
- Y(We, {
2752
- proOptions: ut,
2753
- position: lt
2748
+ jsx(SelectionListener, { onSelectionChange: N }),
2749
+ Sr,
2750
+ jsx(Attribution, {
2751
+ proOptions: Vr,
2752
+ position: Br
2754
2753
  }),
2755
- Y(He, {
2756
- rfId: It,
2757
- disableKeyboardA11y: mt
2754
+ jsx(A11yDescriptions, {
2755
+ rfId: pi,
2756
+ disableKeyboardA11y: Gr
2758
2757
  })
2759
2758
  ]
2760
2759
  })
2761
2760
  });
2762
2761
  }
2763
- var Ar = xt(kr), jr = (e) => e.domNode?.querySelector(".react-flow__edgelabel-renderer");
2764
- function Mr({ children: e }) {
2765
- let t = Q(jr);
2766
- return t ? Oe(e, t) : null;
2762
+ var index = fixedForwardRef(ReactFlow), selector$6 = (e) => e.domNode?.querySelector(".react-flow__edgelabel-renderer");
2763
+ function EdgeLabelRenderer({ children: e }) {
2764
+ let t = useStore(selector$6);
2765
+ return t ? createPortal(e, t) : null;
2767
2766
  }
2768
- function Nr(e) {
2769
- let [t, n] = J(e);
2767
+ function useNodesState(e) {
2768
+ let [t, n] = useState(e);
2770
2769
  return [
2771
2770
  t,
2772
2771
  n,
2773
- W((e) => n((t) => pt(e, t)), [])
2772
+ useCallback((e) => n((t) => applyNodeChanges(e, t)), [])
2774
2773
  ];
2775
2774
  }
2776
- function Pr(e) {
2777
- let [t, n] = J(e);
2775
+ function useEdgesState(e) {
2776
+ let [t, n] = useState(e);
2778
2777
  return [
2779
2778
  t,
2780
2779
  n,
2781
- W((e) => n((t) => mt(e, t)), [])
2780
+ useCallback((e) => n((t) => applyEdgeChanges(e, t)), [])
2782
2781
  ];
2783
2782
  }
2784
- x.error014();
2785
- function Fr({ dimensions: t, lineWidth: n, variant: r, className: i }) {
2786
- return Y("path", {
2783
+ errorMessages.error014();
2784
+ function LinePattern({ dimensions: t, lineWidth: n, variant: r, className: i }) {
2785
+ return jsx("path", {
2787
2786
  strokeWidth: n,
2788
2787
  d: `M${t[0] / 2} 0 V${t[1]} M0 ${t[1] / 2} H${t[0]}`,
2789
- className: e([
2788
+ className: cc([
2790
2789
  "react-flow__background-pattern",
2791
2790
  r,
2792
2791
  i
2793
2792
  ])
2794
2793
  });
2795
2794
  }
2796
- function Ir({ radius: t, className: n }) {
2797
- return Y("circle", {
2795
+ function DotPattern({ radius: t, className: n }) {
2796
+ return jsx("circle", {
2798
2797
  cx: t,
2799
2798
  cy: t,
2800
2799
  r: t,
2801
- className: e([
2800
+ className: cc([
2802
2801
  "react-flow__background-pattern",
2803
2802
  "dots",
2804
2803
  n
2805
2804
  ])
2806
2805
  });
2807
2806
  }
2808
- var Lr;
2807
+ var BackgroundVariant;
2809
2808
  (function(e) {
2810
2809
  e.Lines = "lines", e.Dots = "dots", e.Cross = "cross";
2811
- })(Lr ||= {});
2812
- var Rr = {
2813
- [Lr.Dots]: 1,
2814
- [Lr.Lines]: 1,
2815
- [Lr.Cross]: 6
2816
- }, zr = (e) => ({
2810
+ })(BackgroundVariant ||= {});
2811
+ var defaultSize = {
2812
+ [BackgroundVariant.Dots]: 1,
2813
+ [BackgroundVariant.Lines]: 1,
2814
+ [BackgroundVariant.Cross]: 6
2815
+ }, selector$3 = (e) => ({
2817
2816
  transform: e.transform,
2818
2817
  patternId: `pattern-${e.rfId}`
2819
2818
  });
2820
- function Br({ id: t, variant: n = Lr.Dots, gap: r = 20, size: i, lineWidth: a = 1, offset: o = 0, color: s, bgColor: c, style: l, className: u, patternClassName: d }) {
2821
- let f = q(null), { transform: p, patternId: m } = Q(zr, Z), h = i || Rr[n], g = n === Lr.Dots, _ = n === Lr.Cross, v = Array.isArray(r) ? r : [r, r], y = [v[0] * p[2] || 1, v[1] * p[2] || 1], b = h * p[2], x = Array.isArray(o) ? o : [o, o], S = _ ? [b, b] : y, C = [x[0] * p[2] || 1 + S[0] / 2, x[1] * p[2] || 1 + S[1] / 2], w = `${m}${t || ""}`;
2822
- return X("svg", {
2823
- className: e(["react-flow__background", u]),
2819
+ function BackgroundComponent({ id: t, variant: n = BackgroundVariant.Dots, gap: r = 20, size: i, lineWidth: a = 1, offset: o = 0, color: s, bgColor: c, style: l, className: u, patternClassName: d }) {
2820
+ let f = useRef(null), { transform: p, patternId: m } = useStore(selector$3, shallow), h = i || defaultSize[n], g = n === BackgroundVariant.Dots, _ = n === BackgroundVariant.Cross, v = Array.isArray(r) ? r : [r, r], y = [v[0] * p[2] || 1, v[1] * p[2] || 1], b = h * p[2], x = Array.isArray(o) ? o : [o, o], S = _ ? [b, b] : y, C = [x[0] * p[2] || 1 + S[0] / 2, x[1] * p[2] || 1 + S[1] / 2], w = `${m}${t || ""}`;
2821
+ return jsxs("svg", {
2822
+ className: cc(["react-flow__background", u]),
2824
2823
  style: {
2825
2824
  ...l,
2826
- ...Nt,
2825
+ ...containerStyle,
2827
2826
  "--xy-background-color-props": c,
2828
2827
  "--xy-background-pattern-color-props": s
2829
2828
  },
2830
2829
  ref: f,
2831
2830
  "data-testid": "rf__background",
2832
- children: [Y("pattern", {
2831
+ children: [jsx("pattern", {
2833
2832
  id: w,
2834
2833
  x: p[0] % y[0],
2835
2834
  y: p[1] % y[1],
@@ -2837,16 +2836,16 @@ function Br({ id: t, variant: n = Lr.Dots, gap: r = 20, size: i, lineWidth: a =
2837
2836
  height: y[1],
2838
2837
  patternUnits: "userSpaceOnUse",
2839
2838
  patternTransform: `translate(-${C[0]},-${C[1]})`,
2840
- children: g ? Y(Ir, {
2839
+ children: g ? jsx(DotPattern, {
2841
2840
  radius: b / 2,
2842
2841
  className: d
2843
- }) : Y(Fr, {
2842
+ }) : jsx(LinePattern, {
2844
2843
  dimensions: S,
2845
2844
  lineWidth: a,
2846
2845
  variant: n,
2847
2846
  className: d
2848
2847
  })
2849
- }), Y("rect", {
2848
+ }), jsx("rect", {
2850
2849
  x: "0",
2851
2850
  y: "0",
2852
2851
  width: "100%",
@@ -2855,61 +2854,73 @@ function Br({ id: t, variant: n = Lr.Dots, gap: r = 20, size: i, lineWidth: a =
2855
2854
  })]
2856
2855
  });
2857
2856
  }
2858
- Br.displayName = "Background";
2859
- var Vr = U(Br);
2860
- function Hr() {
2861
- return Y("svg", {
2857
+ BackgroundComponent.displayName = "Background";
2858
+ var Background = memo(BackgroundComponent);
2859
+ function PlusIcon() {
2860
+ return jsx("svg", {
2862
2861
  xmlns: "http://www.w3.org/2000/svg",
2863
2862
  viewBox: "0 0 32 32",
2864
- children: Y("path", { d: "M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z" })
2863
+ children: jsx("path", { d: "M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z" })
2865
2864
  });
2866
2865
  }
2867
- function Ur() {
2868
- return Y("svg", {
2866
+ function MinusIcon() {
2867
+ return jsx("svg", {
2869
2868
  xmlns: "http://www.w3.org/2000/svg",
2870
2869
  viewBox: "0 0 32 5",
2871
- children: Y("path", { d: "M0 0h32v4.2H0z" })
2870
+ children: jsx("path", { d: "M0 0h32v4.2H0z" })
2872
2871
  });
2873
2872
  }
2874
- function Wr() {
2875
- return Y("svg", {
2873
+ function FitViewIcon() {
2874
+ return jsx("svg", {
2876
2875
  xmlns: "http://www.w3.org/2000/svg",
2877
2876
  viewBox: "0 0 32 30",
2878
- children: Y("path", { d: "M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z" })
2877
+ children: jsx("path", { d: "M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z" })
2879
2878
  });
2880
2879
  }
2881
- function Gr() {
2882
- return Y("svg", {
2880
+ function LockIcon() {
2881
+ return jsx("svg", {
2883
2882
  xmlns: "http://www.w3.org/2000/svg",
2884
2883
  viewBox: "0 0 25 32",
2885
- children: Y("path", { d: "M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z" })
2884
+ children: jsx("path", { d: "M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z" })
2886
2885
  });
2887
2886
  }
2888
- function Kr() {
2889
- return Y("svg", {
2887
+ function UnlockIcon() {
2888
+ return jsx("svg", {
2890
2889
  xmlns: "http://www.w3.org/2000/svg",
2891
2890
  viewBox: "0 0 25 32",
2892
- children: Y("path", { d: "M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z" })
2891
+ children: jsx("path", { d: "M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z" })
2893
2892
  });
2894
2893
  }
2895
- function qr({ children: t, className: n, ...r }) {
2896
- return Y("button", {
2894
+ function ControlButton({ children: t, className: n, ...r }) {
2895
+ return jsx("button", {
2897
2896
  type: "button",
2898
- className: e(["react-flow__controls-button", n]),
2897
+ className: cc(["react-flow__controls-button", n]),
2899
2898
  ...r,
2900
2899
  children: t
2901
2900
  });
2902
2901
  }
2903
- var Jr = (e) => ({
2902
+ var selector$2 = (e) => ({
2904
2903
  isInteractive: e.nodesDraggable || e.nodesConnectable || e.elementsSelectable,
2905
2904
  minZoomReached: e.transform[2] <= e.minZoom,
2906
2905
  maxZoomReached: e.transform[2] >= e.maxZoom,
2907
2906
  ariaLabelConfig: e.ariaLabelConfig
2908
2907
  });
2909
- function Yr({ style: t, showZoom: n = !0, showFitView: r = !0, showInteractive: i = !0, fitViewOptions: a, onZoomIn: o, onZoomOut: s, onFitView: c, onInteractiveChange: l, className: u, children: d, position: f = "bottom-left", orientation: p = "vertical", "aria-label": m }) {
2910
- let h = $(), { isInteractive: g, minZoomReached: _, maxZoomReached: v, ariaLabelConfig: y } = Q(Jr, Z), { zoomIn: b, zoomOut: x, fitView: S } = Ot();
2911
- return X(Ue, {
2912
- className: e([
2908
+ function ControlsComponent({ style: t, showZoom: n = !0, showFitView: r = !0, showInteractive: i = !0, fitViewOptions: a, onZoomIn: o, onZoomOut: s, onFitView: c, onInteractiveChange: l, className: u, children: d, position: f = "bottom-left", orientation: p = "vertical", "aria-label": m }) {
2909
+ let h = useStoreApi(), { isInteractive: g, minZoomReached: _, maxZoomReached: v, ariaLabelConfig: y } = useStore(selector$2, shallow), { zoomIn: b, zoomOut: x, fitView: S } = useReactFlow(), C = () => {
2910
+ b(), o?.();
2911
+ }, w = () => {
2912
+ x(), s?.();
2913
+ }, T = () => {
2914
+ S(a), c?.();
2915
+ }, E = () => {
2916
+ h.setState({
2917
+ nodesDraggable: !g,
2918
+ nodesConnectable: !g,
2919
+ elementsSelectable: !g
2920
+ }), l?.(!g);
2921
+ };
2922
+ return jsxs(Panel, {
2923
+ className: cc([
2913
2924
  "react-flow__controls",
2914
2925
  p === "horizontal" ? "horizontal" : "vertical",
2915
2926
  u
@@ -2919,57 +2930,45 @@ function Yr({ style: t, showZoom: n = !0, showFitView: r = !0, showInteractive:
2919
2930
  "data-testid": "rf__controls",
2920
2931
  "aria-label": m ?? y["controls.ariaLabel"],
2921
2932
  children: [
2922
- n && X(De, { children: [Y(qr, {
2923
- onClick: () => {
2924
- b(), o?.();
2925
- },
2933
+ n && jsxs(Fragment$1, { children: [jsx(ControlButton, {
2934
+ onClick: C,
2926
2935
  className: "react-flow__controls-zoomin",
2927
2936
  title: y["controls.zoomIn.ariaLabel"],
2928
2937
  "aria-label": y["controls.zoomIn.ariaLabel"],
2929
2938
  disabled: v,
2930
- children: Y(Hr, {})
2931
- }), Y(qr, {
2932
- onClick: () => {
2933
- x(), s?.();
2934
- },
2939
+ children: jsx(PlusIcon, {})
2940
+ }), jsx(ControlButton, {
2941
+ onClick: w,
2935
2942
  className: "react-flow__controls-zoomout",
2936
2943
  title: y["controls.zoomOut.ariaLabel"],
2937
2944
  "aria-label": y["controls.zoomOut.ariaLabel"],
2938
2945
  disabled: _,
2939
- children: Y(Ur, {})
2946
+ children: jsx(MinusIcon, {})
2940
2947
  })] }),
2941
- r && Y(qr, {
2948
+ r && jsx(ControlButton, {
2942
2949
  className: "react-flow__controls-fitview",
2943
- onClick: () => {
2944
- S(a), c?.();
2945
- },
2950
+ onClick: T,
2946
2951
  title: y["controls.fitView.ariaLabel"],
2947
2952
  "aria-label": y["controls.fitView.ariaLabel"],
2948
- children: Y(Wr, {})
2953
+ children: jsx(FitViewIcon, {})
2949
2954
  }),
2950
- i && Y(qr, {
2955
+ i && jsx(ControlButton, {
2951
2956
  className: "react-flow__controls-interactive",
2952
- onClick: () => {
2953
- h.setState({
2954
- nodesDraggable: !g,
2955
- nodesConnectable: !g,
2956
- elementsSelectable: !g
2957
- }), l?.(!g);
2958
- },
2957
+ onClick: E,
2959
2958
  title: y["controls.interactive.ariaLabel"],
2960
2959
  "aria-label": y["controls.interactive.ariaLabel"],
2961
- children: Y(g ? Kr : Gr, {})
2960
+ children: jsx(g ? UnlockIcon : LockIcon, {})
2962
2961
  }),
2963
2962
  d
2964
2963
  ]
2965
2964
  });
2966
2965
  }
2967
- Yr.displayName = "Controls";
2968
- var Xr = U(Yr);
2969
- function Zr({ id: t, x: n, y: r, width: i, height: a, style: o, color: s, strokeColor: c, strokeWidth: l, className: u, borderRadius: d, shapeRendering: f, selected: p, onClick: m }) {
2966
+ ControlsComponent.displayName = "Controls";
2967
+ var Controls = memo(ControlsComponent);
2968
+ function MiniMapNodeComponent({ id: t, x: n, y: r, width: i, height: a, style: o, color: s, strokeColor: c, strokeWidth: l, className: u, borderRadius: d, shapeRendering: f, selected: p, onClick: m }) {
2970
2969
  let { background: h, backgroundColor: g } = o || {}, _ = s || h || g;
2971
- return Y("rect", {
2972
- className: e([
2970
+ return jsx("rect", {
2971
+ className: cc([
2973
2972
  "react-flow__minimap-node",
2974
2973
  { selected: p },
2975
2974
  u
@@ -2989,10 +2988,10 @@ function Zr({ id: t, x: n, y: r, width: i, height: a, style: o, color: s, stroke
2989
2988
  onClick: m ? (e) => m(e, t) : void 0
2990
2989
  });
2991
2990
  }
2992
- var Qr = U(Zr), $r = (e) => e.nodes.map((e) => e.id), ei = (e) => e instanceof Function ? e : () => e;
2993
- function ti({ nodeStrokeColor: e, nodeColor: t, nodeClassName: n = "", nodeBorderRadius: r = 5, nodeStrokeWidth: i, nodeComponent: a = Qr, onClick: o }) {
2994
- let s = Q($r, Z), c = ei(t), l = ei(e), u = ei(n), d = typeof window > "u" || window.chrome ? "crispEdges" : "geometricPrecision";
2995
- return Y(De, { children: s.map((e) => Y(ri, {
2991
+ var MiniMapNode = memo(MiniMapNodeComponent), selectorNodeIds = (e) => e.nodes.map((e) => e.id), getAttrFunction = (e) => e instanceof Function ? e : () => e;
2992
+ function MiniMapNodes({ nodeStrokeColor: e, nodeColor: t, nodeClassName: n = "", nodeBorderRadius: r = 5, nodeStrokeWidth: i, nodeComponent: a = MiniMapNode, onClick: o }) {
2993
+ let s = useStore(selectorNodeIds, shallow), c = getAttrFunction(t), l = getAttrFunction(e), u = getAttrFunction(n), d = typeof window > "u" || window.chrome ? "crispEdges" : "geometricPrecision";
2994
+ return jsx(Fragment$1, { children: s.map((e) => jsx(NodeComponentWrapper, {
2996
2995
  id: e,
2997
2996
  nodeColorFunc: c,
2998
2997
  nodeStrokeColorFunc: l,
@@ -3004,8 +3003,8 @@ function ti({ nodeStrokeColor: e, nodeColor: t, nodeClassName: n = "", nodeBorde
3004
3003
  shapeRendering: d
3005
3004
  }, e)) });
3006
3005
  }
3007
- function ni({ id: e, nodeColorFunc: t, nodeStrokeColorFunc: n, nodeClassNameFunc: r, nodeBorderRadius: i, nodeStrokeWidth: a, shapeRendering: o, NodeComponent: s, onClick: c }) {
3008
- let { node: l, x: u, y: d, width: f, height: p } = Q((t) => {
3006
+ function NodeComponentWrapperInner({ id: e, nodeColorFunc: t, nodeStrokeColorFunc: n, nodeClassNameFunc: r, nodeBorderRadius: i, nodeStrokeWidth: a, shapeRendering: o, NodeComponent: s, onClick: c }) {
3007
+ let { node: l, x: u, y: d, width: f, height: p } = useStore((t) => {
3009
3008
  let n = t.nodeLookup.get(e);
3010
3009
  if (!n) return {
3011
3010
  node: void 0,
@@ -3014,7 +3013,7 @@ function ni({ id: e, nodeColorFunc: t, nodeStrokeColorFunc: n, nodeClassNameFunc
3014
3013
  width: 0,
3015
3014
  height: 0
3016
3015
  };
3017
- let r = n.internals.userNode, { x: i, y: a } = n.internals.positionAbsolute, { width: o, height: s } = I(r);
3016
+ let r = n.internals.userNode, { x: i, y: a } = n.internals.positionAbsolute, { width: o, height: s } = getNodeDimensions(r);
3018
3017
  return {
3019
3018
  node: r,
3020
3019
  x: i,
@@ -3022,8 +3021,8 @@ function ni({ id: e, nodeColorFunc: t, nodeStrokeColorFunc: n, nodeClassNameFunc
3022
3021
  width: o,
3023
3022
  height: s
3024
3023
  };
3025
- }, Z);
3026
- return !l || l.hidden || !pe(l) ? null : Y(s, {
3024
+ }, shallow);
3025
+ return !l || l.hidden || !nodeHasDimensions(l) ? null : jsx(s, {
3027
3026
  x: u,
3028
3027
  y: d,
3029
3028
  width: f,
@@ -3040,7 +3039,7 @@ function ni({ id: e, nodeColorFunc: t, nodeStrokeColorFunc: n, nodeClassNameFunc
3040
3039
  id: l.id
3041
3040
  });
3042
3041
  }
3043
- var ri = U(ni), ii = U(ti), ai = 200, oi = 150, si = (e) => !e.hidden, ci = (e) => {
3042
+ var NodeComponentWrapper = memo(NodeComponentWrapperInner), MiniMapNodes$1 = memo(MiniMapNodes), defaultWidth = 200, defaultHeight = 150, filterHidden = (e) => !e.hidden, selector$1 = (e) => {
3044
3043
  let t = {
3045
3044
  x: -e.transform[0] / e.transform[2],
3046
3045
  y: -e.transform[1] / e.transform[2],
@@ -3049,7 +3048,7 @@ var ri = U(ni), ii = U(ti), ai = 200, oi = 150, si = (e) => !e.hidden, ci = (e)
3049
3048
  };
3050
3049
  return {
3051
3050
  viewBB: t,
3052
- boundingRect: e.nodeLookup.size > 0 ? E(F(e.nodeLookup, { filter: si }), t) : t,
3051
+ boundingRect: e.nodeLookup.size > 0 ? getBoundsOfRects(getInternalNodesBounds(e.nodeLookup, { filter: filterHidden }), t) : t,
3053
3052
  rfId: e.rfId,
3054
3053
  panZoom: e.panZoom,
3055
3054
  translateExtent: e.translateExtent,
@@ -3057,20 +3056,20 @@ var ri = U(ni), ii = U(ti), ai = 200, oi = 150, si = (e) => !e.hidden, ci = (e)
3057
3056
  flowHeight: e.height,
3058
3057
  ariaLabelConfig: e.ariaLabelConfig
3059
3058
  };
3060
- }, li = "react-flow__minimap-desc";
3061
- function ui({ style: t, className: n, nodeStrokeColor: r, nodeColor: i, nodeClassName: a = "", nodeBorderRadius: o = 5, nodeStrokeWidth: s, nodeComponent: c, bgColor: l, maskColor: d, maskStrokeColor: f, maskStrokeWidth: p, position: m = "bottom-right", onClick: h, onNodeClick: g, pannable: _ = !1, zoomable: v = !1, ariaLabel: y, inversePan: b, zoomStep: x = 1, offsetScale: S = 5 }) {
3062
- let C = $(), w = q(null), { boundingRect: T, viewBB: E, rfId: D, panZoom: O, translateExtent: k, flowWidth: A, flowHeight: j, ariaLabelConfig: M } = Q(ci, Z), N = t?.width ?? ai, P = t?.height ?? oi, F = T.width / N, ee = T.height / P, I = Math.max(F, ee), L = I * N, R = I * P, z = S * I, B = T.x - (L - T.width) / 2 - z, V = T.y - (R - T.height) / 2 - z, H = L + z * 2, te = R + z * 2, ne = `${li}-${D}`, re = q(0), ie = q();
3063
- re.current = I, G(() => {
3064
- if (w.current && O) return ie.current = u({
3059
+ }, ARIA_LABEL_KEY = "react-flow__minimap-desc";
3060
+ function MiniMapComponent({ style: t, className: n, nodeStrokeColor: r, nodeColor: i, nodeClassName: a = "", nodeBorderRadius: o = 5, nodeStrokeWidth: s, nodeComponent: c, bgColor: l, maskColor: d, maskStrokeColor: f, maskStrokeWidth: p, position: m = "bottom-right", onClick: h, onNodeClick: g, pannable: _ = !1, zoomable: v = !1, ariaLabel: y, inversePan: b, zoomStep: x = 1, offsetScale: S = 5 }) {
3061
+ let C = useStoreApi(), w = useRef(null), { boundingRect: T, viewBB: E, rfId: D, panZoom: O, translateExtent: k, flowWidth: A, flowHeight: j, ariaLabelConfig: M } = useStore(selector$1, shallow), N = t?.width ?? defaultWidth, P = t?.height ?? defaultHeight, F = T.width / N, I = T.height / P, L = Math.max(F, I), R = L * N, z = L * P, B = S * L, V = T.x - (R - T.width) / 2 - B, H = T.y - (z - T.height) / 2 - B, U = R + B * 2, W = z + B * 2, G = `${ARIA_LABEL_KEY}-${D}`, K = useRef(0), q = useRef();
3062
+ K.current = L, useEffect(() => {
3063
+ if (w.current && O) return q.current = XYMinimap({
3065
3064
  domNode: w.current,
3066
3065
  panZoom: O,
3067
3066
  getTransform: () => C.getState().transform,
3068
- getViewScale: () => re.current
3067
+ getViewScale: () => K.current
3069
3068
  }), () => {
3070
- ie.current?.destroy();
3069
+ q.current?.destroy();
3071
3070
  };
3072
- }, [O]), G(() => {
3073
- ie.current?.update({
3071
+ }, [O]), useEffect(() => {
3072
+ q.current?.update({
3074
3073
  translateExtent: k,
3075
3074
  width: A,
3076
3075
  height: j,
@@ -3088,46 +3087,46 @@ function ui({ style: t, className: n, nodeStrokeColor: r, nodeColor: i, nodeClas
3088
3087
  A,
3089
3088
  j
3090
3089
  ]);
3091
- let ae = h ? (e) => {
3092
- let [t, n] = ie.current?.pointer(e) || [0, 0];
3090
+ let J = h ? (e) => {
3091
+ let [t, n] = q.current?.pointer(e) || [0, 0];
3093
3092
  h(e, {
3094
3093
  x: t,
3095
3094
  y: n
3096
3095
  });
3097
- } : void 0, oe = g ? W((e, t) => {
3096
+ } : void 0, Y = g ? useCallback((e, t) => {
3098
3097
  let n = C.getState().nodeLookup.get(t).internals.userNode;
3099
3098
  g(e, n);
3100
- }, []) : void 0, se = y ?? M["minimap.ariaLabel"];
3101
- return Y(Ue, {
3099
+ }, []) : void 0, X = y ?? M["minimap.ariaLabel"];
3100
+ return jsx(Panel, {
3102
3101
  position: m,
3103
3102
  style: {
3104
3103
  ...t,
3105
3104
  "--xy-minimap-background-color-props": typeof l == "string" ? l : void 0,
3106
3105
  "--xy-minimap-mask-background-color-props": typeof d == "string" ? d : void 0,
3107
3106
  "--xy-minimap-mask-stroke-color-props": typeof f == "string" ? f : void 0,
3108
- "--xy-minimap-mask-stroke-width-props": typeof p == "number" ? p * I : void 0,
3107
+ "--xy-minimap-mask-stroke-width-props": typeof p == "number" ? p * L : void 0,
3109
3108
  "--xy-minimap-node-background-color-props": typeof i == "string" ? i : void 0,
3110
3109
  "--xy-minimap-node-stroke-color-props": typeof r == "string" ? r : void 0,
3111
3110
  "--xy-minimap-node-stroke-width-props": typeof s == "number" ? s : void 0
3112
3111
  },
3113
- className: e(["react-flow__minimap", n]),
3112
+ className: cc(["react-flow__minimap", n]),
3114
3113
  "data-testid": "rf__minimap",
3115
- children: X("svg", {
3114
+ children: jsxs("svg", {
3116
3115
  width: N,
3117
3116
  height: P,
3118
- viewBox: `${B} ${V} ${H} ${te}`,
3117
+ viewBox: `${V} ${H} ${U} ${W}`,
3119
3118
  className: "react-flow__minimap-svg",
3120
3119
  role: "img",
3121
- "aria-labelledby": ne,
3120
+ "aria-labelledby": G,
3122
3121
  ref: w,
3123
- onClick: ae,
3122
+ onClick: J,
3124
3123
  children: [
3125
- se && Y("title", {
3126
- id: ne,
3127
- children: se
3124
+ X && jsx("title", {
3125
+ id: G,
3126
+ children: X
3128
3127
  }),
3129
- Y(ii, {
3130
- onClick: oe,
3128
+ jsx(MiniMapNodes$1, {
3129
+ onClick: Y,
3131
3130
  nodeColor: i,
3132
3131
  nodeStrokeColor: r,
3133
3132
  nodeBorderRadius: o,
@@ -3135,9 +3134,9 @@ function ui({ style: t, className: n, nodeStrokeColor: r, nodeColor: i, nodeClas
3135
3134
  nodeStrokeWidth: s,
3136
3135
  nodeComponent: c
3137
3136
  }),
3138
- Y("path", {
3137
+ jsx("path", {
3139
3138
  className: "react-flow__minimap-mask",
3140
- d: `M${B - z},${V - z}h${H + z * 2}v${te + z * 2}h${-H - z * 2}z
3139
+ d: `M${V - B},${H - B}h${U + B * 2}v${W + B * 2}h${-U - B * 2}z
3141
3140
  M${E.x},${E.y}h${E.width}v${E.height}h${-E.width}z`,
3142
3141
  fillRule: "evenodd",
3143
3142
  pointerEvents: "none"
@@ -3146,15 +3145,15 @@ function ui({ style: t, className: n, nodeStrokeColor: r, nodeColor: i, nodeClas
3146
3145
  })
3147
3146
  });
3148
3147
  }
3149
- ui.displayName = "MiniMap", U(ui);
3150
- var di = (e) => (t) => e ? `${Math.max(1 / t.transform[2], 1)}` : void 0, fi = {
3151
- [o.Line]: "right",
3152
- [o.Handle]: "bottom-right"
3148
+ MiniMapComponent.displayName = "MiniMap", memo(MiniMapComponent);
3149
+ var scaleSelector = (e) => (t) => e ? `${Math.max(1 / t.transform[2], 1)}` : void 0, defaultPositions = {
3150
+ [ResizeControlVariant.Line]: "right",
3151
+ [ResizeControlVariant.Handle]: "bottom-right"
3153
3152
  };
3154
- function pi({ nodeId: t, position: n, variant: r = o.Handle, className: i, style: a = void 0, children: s, color: c, minWidth: l = 10, minHeight: u = 10, maxWidth: d = Number.MAX_VALUE, maxHeight: p = Number.MAX_VALUE, keepAspectRatio: m = !1, resizeDirection: h, autoScale: g = !0, shouldResize: _, onResizeStart: v, onResize: y, onResizeEnd: b }) {
3155
- let x = qt(), C = typeof t == "string" ? t : x, w = $(), T = q(null), E = r === o.Handle, D = Q(W(di(E && g), [E, g]), Z), O = q(null), k = n ?? fi[r];
3156
- return G(() => {
3157
- if (!(!T.current || !C)) return O.current ||= f({
3153
+ function ResizeControl({ nodeId: t, position: n, variant: r = ResizeControlVariant.Handle, className: i, style: a = void 0, children: s, color: c, minWidth: l = 10, minHeight: u = 10, maxWidth: d = Number.MAX_VALUE, maxHeight: p = Number.MAX_VALUE, keepAspectRatio: m = !1, resizeDirection: h, autoScale: g = !0, shouldResize: _, onResizeStart: v, onResize: y, onResizeEnd: b }) {
3154
+ let x = useNodeId(), C = typeof t == "string" ? t : x, w = useStoreApi(), T = useRef(null), E = r === ResizeControlVariant.Handle, D = useStore(useCallback(scaleSelector(E && g), [E, g]), shallow), O = useRef(null), k = n ?? defaultPositions[r];
3155
+ return useEffect(() => {
3156
+ if (!(!T.current || !C)) return O.current ||= XYResizer({
3158
3157
  domNode: T.current,
3159
3158
  nodeId: C,
3160
3159
  getStoreItems: () => {
@@ -3174,13 +3173,13 @@ function pi({ nodeId: t, position: n, variant: r = o.Handle, className: i, style
3174
3173
  y: e.y
3175
3174
  }, c = r.get(C);
3176
3175
  if (c && c.expandParent && c.parentId) {
3177
- let t = c.origin ?? a, n = e.width ?? c.measured.width ?? 0, l = e.height ?? c.measured.height ?? 0, u = te([{
3176
+ let t = c.origin ?? a, n = e.width ?? c.measured.width ?? 0, l = e.height ?? c.measured.height ?? 0, u = handleExpandParent([{
3178
3177
  id: c.id,
3179
3178
  parentId: c.parentId,
3180
3179
  rect: {
3181
3180
  width: n,
3182
3181
  height: l,
3183
- ...S({
3182
+ ...evaluateAbsolutePosition({
3184
3183
  x: e.x ?? c.position.x,
3185
3184
  y: e.y ?? c.position.y
3186
3185
  }, {
@@ -3261,8 +3260,8 @@ function pi({ nodeId: t, position: n, variant: r = o.Handle, className: i, style
3261
3260
  y,
3262
3261
  b,
3263
3262
  _
3264
- ]), Y("div", {
3265
- className: e([
3263
+ ]), jsx("div", {
3264
+ className: cc([
3266
3265
  "react-flow__resize-control",
3267
3266
  "nodrag",
3268
3267
  ...k.split("-"),
@@ -3278,6 +3277,5 @@ function pi({ nodeId: t, position: n, variant: r = o.Handle, className: i, style
3278
3277
  children: s
3279
3278
  });
3280
3279
  }
3281
- U(pi);
3282
- //#endregion
3283
- export { Vr as Background, Lr as BackgroundVariant, Mn as BaseEdge, Xr as Controls, Mr as EdgeLabelRenderer, Zt as Handle, Er as ReactFlowProvider, Ar as index, Pr as useEdgesState, Nr as useNodesState, Ot as useReactFlow };
3280
+ memo(ResizeControl);
3281
+ export { Background, BackgroundVariant, BaseEdge, Controls, EdgeLabelRenderer, Handle, ReactFlowProvider, index, useEdgesState, useNodesState, useReactFlow };