@loopstack/loopstack-studio 0.28.0 → 0.29.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 (366) hide show
  1. package/dist/_virtual/rolldown_runtime.js +13 -15
  2. package/dist/components/dynamic-form/Form.js +49 -52
  3. package/dist/config.js +6 -0
  4. package/dist/features/debug/components/WorkflowFlowViewer.js +94 -81
  5. package/dist/features/debug/components/workflow-flow/StateNode.js +154 -79
  6. package/dist/features/debug/components/workflow-flow/WorkflowGraph.js +43 -31
  7. package/dist/features/debug/components/workflow-flow/WorkflowTransitionEdge.js +52 -51
  8. package/dist/features/debug/lib/edge-paths.js +45 -30
  9. package/dist/features/debug/lib/flow-types.js +2 -0
  10. package/dist/features/debug/lib/flow-utils.js +66 -64
  11. package/dist/features/documents/components/DocumentList.js +19 -18
  12. package/dist/features/workbench/WorkflowItem.js +4 -3
  13. package/dist/features/workbench/components/EmbedLogsContent.js +5 -0
  14. package/dist/features/workbench/components/PreviewEmptyState.js +10 -0
  15. package/dist/features/workbench/components/PreviewWorkbench.js +14 -0
  16. package/dist/features/workbench/components/RecentRunItem.js +48 -0
  17. package/dist/features/workbench/components/WorkflowForms.js +4 -3
  18. package/dist/features/workbench/hooks/useEmbedBridge.js +3 -0
  19. package/dist/features/workbench/hooks/useWorkflowData.js +9 -9
  20. package/dist/features/workbench/index.js +4 -0
  21. package/dist/features/workspaces/components/ExecutionTimeline.js +9 -8
  22. package/dist/loopstack-studio.css +1 -1
  23. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{architecture-YZFGNWBL.js → architecture-7EHR7CIX.js} +2 -2
  24. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-7N4EOEYR.js → chunk-4EGX6M5U.js} +9 -13
  25. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-KGLVRYIC.js → chunk-5DO6E6H7.js} +3 -7
  26. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-BR22UD5L.js +56 -0
  27. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-2KRD3SAO.js → chunk-FHYWG6QK.js} +3 -7
  28. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-FOC6F5B3.js → chunk-MPE355IW.js} +3 -7
  29. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-MZUSXYTE.js +24 -0
  30. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-N66VUXT2.js +48 -0
  31. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-NNHCCRGN.js +20219 -0
  32. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-PUPMXCY4.js +19 -0
  33. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-67CJDMHE.js → chunk-UIBZB4QT.js} +3 -7
  34. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-WCWK7LTN.js +25 -0
  35. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/eventmodeling-FCH6USID.js +3 -0
  36. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{gitGraph-7Q5UKJZL.js → gitGraph-WXDBUCRP.js} +2 -2
  37. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-J43DQDTF.js +3 -0
  38. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-YPE3B663.js +3 -0
  39. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-LRSECV5Y.js +3 -0
  40. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-GUYGQ44K.js +3 -0
  41. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{treeView-SZITEDCU.js → treeView-BLDUP644.js} +2 -2
  42. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-LRROVOQU.js +3 -0
  43. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/wardley-L42UT6IY.js +3 -0
  44. package/dist/node_modules/@mermaid-js/parser/dist/mermaid-parser.core.js +24 -19
  45. package/dist/node_modules/@ungap/structured-clone/esm/deserialize.js +36 -26
  46. package/dist/node_modules/@xyflow/react/dist/esm/index.js +1 -1
  47. package/dist/node_modules/cytoscape/dist/cytoscape.esm.js +257 -254
  48. package/dist/node_modules/dagre-d3-es/src/dagre/greedy-fas.js +19 -19
  49. package/dist/node_modules/dagre-d3-es/src/dagre/layout.js +48 -48
  50. package/dist/node_modules/dagre-d3-es/src/dagre/nesting-graph.js +9 -9
  51. package/dist/node_modules/dagre-d3-es/src/dagre/order/cross-count.js +3 -3
  52. package/dist/node_modules/dagre-d3-es/src/dagre/order/index.js +11 -11
  53. package/dist/node_modules/dagre-d3-es/src/dagre/order/init-order.js +4 -4
  54. package/dist/node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js +4 -4
  55. package/dist/node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js +8 -8
  56. package/dist/node_modules/dagre-d3-es/src/dagre/order/sort.js +5 -5
  57. package/dist/node_modules/dagre-d3-es/src/dagre/position/bk.js +72 -72
  58. package/dist/node_modules/dagre-d3-es/src/dagre/position/index.js +1 -1
  59. package/dist/node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js +25 -25
  60. package/dist/node_modules/dagre-d3-es/src/dagre/rank/util.js +8 -8
  61. package/dist/node_modules/dagre-d3-es/src/dagre/util.js +48 -48
  62. package/dist/node_modules/dagre-d3-es/src/graphlib/graph.js +109 -109
  63. package/dist/node_modules/dagre-d3-es/src/graphlib/json.js +17 -17
  64. package/dist/node_modules/dompurify/dist/purify.es.js +293 -205
  65. package/dist/node_modules/es-toolkit/dist/_internal/globalThis.js +4 -0
  66. package/dist/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.js +4 -0
  67. package/dist/node_modules/es-toolkit/dist/compat/_internal/getSymbols.js +4 -0
  68. package/dist/node_modules/es-toolkit/dist/compat/_internal/getTag.js +4 -0
  69. package/dist/node_modules/es-toolkit/dist/compat/_internal/isPrototype.js +5 -0
  70. package/dist/node_modules/es-toolkit/dist/compat/_internal/tags.js +2 -0
  71. package/dist/node_modules/es-toolkit/dist/compat/function/memoize.js +12 -0
  72. package/dist/node_modules/es-toolkit/dist/compat/object/clone.js +97 -0
  73. package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeep.js +5 -0
  74. package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.js +29 -0
  75. package/dist/node_modules/es-toolkit/dist/compat/object/merge.js +6 -0
  76. package/dist/node_modules/es-toolkit/dist/compat/object/mergeWith.js +49 -0
  77. package/dist/node_modules/es-toolkit/dist/compat/predicate/isArguments.js +5 -0
  78. package/dist/node_modules/es-toolkit/dist/compat/predicate/isArray.js +4 -0
  79. package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.js +5 -0
  80. package/dist/node_modules/es-toolkit/dist/compat/predicate/isArrayLikeObject.js +6 -0
  81. package/dist/node_modules/es-toolkit/dist/compat/predicate/isEmpty.js +16 -0
  82. package/dist/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.js +4 -0
  83. package/dist/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.js +12 -0
  84. package/dist/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.js +5 -0
  85. package/dist/node_modules/es-toolkit/dist/function/noop.js +2 -0
  86. package/dist/node_modules/es-toolkit/dist/object/clone.js +29 -0
  87. package/dist/node_modules/es-toolkit/dist/object/cloneDeepWith.js +114 -0
  88. package/dist/node_modules/es-toolkit/dist/predicate/isBuffer.js +5 -0
  89. package/dist/node_modules/es-toolkit/dist/predicate/isLength.js +4 -0
  90. package/dist/node_modules/es-toolkit/dist/predicate/isPrimitive.js +4 -0
  91. package/dist/node_modules/es-toolkit/dist/predicate/isTypedArray.js +4 -0
  92. package/dist/node_modules/hast-util-raw/node_modules/parse5/dist/tokenizer/index.js +2 -2
  93. package/dist/node_modules/internmap/src/index.js +1 -1
  94. package/dist/node_modules/katex/dist/katex.js +379 -417
  95. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +3 -3
  96. package/dist/node_modules/lodash-es/_assignMergeValue.js +1 -1
  97. package/dist/node_modules/lodash-es/_assignValue.js +1 -1
  98. package/dist/node_modules/lodash-es/_baseClone.js +9 -9
  99. package/dist/node_modules/lodash-es/_baseForOwn.js +1 -1
  100. package/dist/node_modules/lodash-es/_baseIsEqualDeep.js +1 -1
  101. package/dist/node_modules/lodash-es/_baseMatchesProperty.js +6 -6
  102. package/dist/node_modules/lodash-es/_baseMerge.js +2 -2
  103. package/dist/node_modules/lodash-es/_baseMergeDeep.js +7 -7
  104. package/dist/node_modules/lodash-es/_baseOrderBy.js +12 -12
  105. package/dist/node_modules/lodash-es/_baseRest.js +1 -1
  106. package/dist/node_modules/lodash-es/_baseSet.js +1 -1
  107. package/dist/node_modules/lodash-es/_baseSetToString.js +3 -3
  108. package/dist/node_modules/lodash-es/_baseToString.js +2 -2
  109. package/dist/node_modules/lodash-es/_baseUniq.js +1 -1
  110. package/dist/node_modules/lodash-es/_createRange.js +1 -1
  111. package/dist/node_modules/lodash-es/_createSet.js +3 -3
  112. package/dist/node_modules/lodash-es/_flatRest.js +1 -1
  113. package/dist/node_modules/lodash-es/_getAllKeys.js +2 -2
  114. package/dist/node_modules/lodash-es/_getAllKeysIn.js +1 -1
  115. package/dist/node_modules/lodash-es/_getSymbolsIn.js +1 -1
  116. package/dist/node_modules/lodash-es/_getTag.js +1 -1
  117. package/dist/node_modules/lodash-es/_hasPath.js +2 -2
  118. package/dist/node_modules/lodash-es/_initCloneByTag.js +1 -1
  119. package/dist/node_modules/lodash-es/_initCloneObject.js +1 -1
  120. package/dist/node_modules/lodash-es/_isFlattenable.js +1 -1
  121. package/dist/node_modules/lodash-es/_isIterateeCall.js +1 -1
  122. package/dist/node_modules/lodash-es/_isKey.js +1 -1
  123. package/dist/node_modules/lodash-es/_setToString.js +1 -1
  124. package/dist/node_modules/lodash-es/defaults.js +1 -1
  125. package/dist/node_modules/lodash-es/findIndex.js +2 -2
  126. package/dist/node_modules/lodash-es/forEach.js +1 -1
  127. package/dist/node_modules/lodash-es/forIn.js +1 -1
  128. package/dist/node_modules/lodash-es/isEmpty.js +2 -2
  129. package/dist/node_modules/lodash-es/isPlainObject.js +1 -1
  130. package/dist/node_modules/lodash-es/map.js +1 -1
  131. package/dist/node_modules/lodash-es/max.js +1 -1
  132. package/dist/node_modules/lodash-es/merge.js +3 -3
  133. package/dist/node_modules/lodash-es/min.js +1 -1
  134. package/dist/node_modules/lodash-es/minBy.js +1 -1
  135. package/dist/node_modules/lodash-es/reduce.js +1 -1
  136. package/dist/node_modules/lodash-es/toNumber.js +1 -1
  137. package/dist/node_modules/lodash-es/union.js +3 -3
  138. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{architectureDiagram-Q4EWVU46.js → architectureDiagram-3BPJPVTR.js} +310 -308
  139. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{blockDiagram-DXYQGD6D.js → blockDiagram-GPEHLZMM.js} +215 -190
  140. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{c4Diagram-AHTNJAMY.js → c4Diagram-AAUBKEIU.js} +3 -3
  141. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-EDXVE4YY.js → chunk-2J33WTMH.js} +1 -1
  142. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-5FUZZQ4R.js → chunk-3OPIFGDE.js} +48 -20
  143. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-5PVQY5BW.js → chunk-5ZQYHXKU.js} +8 -8
  144. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-4TB4RGXK.js → chunk-727SXJPM.js} +555 -459
  145. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-OYMX7WX6.js → chunk-AQP2D5EJ.js} +155 -145
  146. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-ICPOFSXX.js → chunk-CSCIHK7Q.js} +106 -12
  147. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-ENJZ2VHE.js → chunk-KSCS5N6A.js} +12 -12
  148. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-ZZ45TVLE.js → chunk-L5ZTLDWV.js} +2 -2
  149. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-336JU56O.js → chunk-LZXEDZCA.js} +5 -5
  150. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-YZCP3GAM.js → chunk-ND2GUHAM.js} +1 -1
  151. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-X2U36JSP.js → chunk-NZK2D7GU.js} +1 -1
  152. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-U2HBQHQK.js → chunk-O5CBEL6O.js} +2 -2
  153. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-426QAEUC.js → chunk-WU5MYG2G.js} +1 -1
  154. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{classDiagram-6PBFFD2Q.js → classDiagram-4FO5ZUOK.js} +11 -11
  155. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{classDiagram-v2-HSJHXN6E.js → classDiagram-v2-Q7XG4LA2.js} +11 -11
  156. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{dagre-KV5264BT.js → dagre-BM42HDAG.js} +8 -8
  157. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{diagram-MMDJMWI5.js → diagram-2AECGRRQ.js} +3 -3
  158. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{diagram-5BDNPKRD.js → diagram-5GNKFQAL.js} +3 -3
  159. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-KO2AKTUF.js +433 -0
  160. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{diagram-TYMM5635.js → diagram-LMA3HP47.js} +3 -3
  161. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{diagram-G4DWMVQ6.js → diagram-OG6HWLK6.js} +5 -5
  162. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{erDiagram-SMLLAGMA.js → erDiagram-TEJ5UH35.js} +9 -9
  163. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{flowDiagram-DWJPFMVM.js → flowDiagram-I6XJVG4X.js} +10 -10
  164. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{ganttDiagram-T4ZO3ILL.js → ganttDiagram-6RSMTGT7.js} +7 -4
  165. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{gitGraphDiagram-UUTBAWPF.js → gitGraphDiagram-PVQCEYII.js} +2 -2
  166. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{infoDiagram-42DDH7IO.js → infoDiagram-5YYISTIA.js} +3 -3
  167. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{ishikawaDiagram-UXIWVN3A.js → ishikawaDiagram-YF4QCWOH.js} +3 -3
  168. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{journeyDiagram-VCZTEJTY.js → journeyDiagram-JHISSGLW.js} +2 -2
  169. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{kanban-definition-6JOO6SKY.js → kanban-definition-UN3LZRKU.js} +7 -7
  170. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{mindmap-definition-QFDTVHPH.js → mindmap-definition-RKZ34NQL.js} +9 -9
  171. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{pieDiagram-DEJITSTG.js → pieDiagram-4H26LBE5.js} +3 -3
  172. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{quadrantDiagram-34T5L4WZ.js → quadrantDiagram-W4KKPZXB.js} +364 -337
  173. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{requirementDiagram-MS252O5E.js → requirementDiagram-4Y6WPE33.js} +9 -9
  174. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{sankeyDiagram-XADWPNL6.js → sankeyDiagram-5OEKKPKP.js} +187 -138
  175. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{sequenceDiagram-FGHM5R23.js → sequenceDiagram-3UESZ5HK.js} +15 -8
  176. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{stateDiagram-FHFEXIEX.js → stateDiagram-AJRCARHV.js} +10 -10
  177. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{stateDiagram-v2-QKLJ7IA2.js → stateDiagram-v2-BHNVJYJU.js} +10 -10
  178. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{timeline-definition-GMOUNBTQ.js → timeline-definition-PNZ67QCA.js} +3 -3
  179. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{vennDiagram-DHZGUBPP.js → vennDiagram-CIIHVFJN.js} +3 -3
  180. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/wardleyDiagram-YWT4CUSO.js +640 -0
  181. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{xychartDiagram-5P7HB3ND.js → xychartDiagram-2RQKCTM6.js} +4 -4
  182. package/dist/node_modules/mermaid/dist/mermaid.core.js +96 -70
  183. package/dist/node_modules/stylis/src/Enum.js +2 -2
  184. package/dist/node_modules/stylis/src/Middleware.js +9 -0
  185. package/dist/node_modules/stylis/src/Parser.js +55 -44
  186. package/dist/node_modules/stylis/src/Utility.js +9 -12
  187. package/dist/node_modules/unified/lib/index.js +1 -1
  188. package/dist/packages/contracts/dist/enums/index.js +4 -24
  189. package/dist/packages/contracts/dist/enums/registry.enum.js +9 -20
  190. package/dist/packages/contracts/dist/enums/sort-order.enum.js +5 -10
  191. package/dist/packages/contracts/dist/enums/user-type.enum.js +5 -10
  192. package/dist/packages/contracts/dist/enums/workflow-state.enum.js +5 -10
  193. package/dist/pages/EmbedWorkbenchPage.js +4 -3
  194. package/dist/pages/PreviewWorkbenchPage.js +126 -124
  195. package/dist/pages/StudioLandingPage.js +28 -72
  196. package/package.json +2 -2
  197. package/dist/node_modules/@chevrotain/gast/lib/src/helpers.js +0 -23
  198. package/dist/node_modules/@chevrotain/gast/lib/src/model.js +0 -151
  199. package/dist/node_modules/@chevrotain/gast/lib/src/visitor.js +0 -40
  200. package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/api.js +0 -2
  201. package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/base-regexp-visitor.js +0 -85
  202. package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/character-classes.js +0 -35
  203. package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/regexp-parser.js +0 -570
  204. package/dist/node_modules/@chevrotain/regexp-to-ast/lib/src/utils.js +0 -25
  205. package/dist/node_modules/@chevrotain/utils/lib/src/print.js +0 -9
  206. package/dist/node_modules/@chevrotain/utils/lib/src/timer.js +0 -8
  207. package/dist/node_modules/@chevrotain/utils/lib/src/to-fast-properties.js +0 -10
  208. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-AA7GKIK3.js +0 -28
  209. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-CIAEETIT.js +0 -23
  210. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-K5T4RW27.js +0 -1197
  211. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-LIHQZDEY.js +0 -60
  212. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-ORNJ4GCN.js +0 -29
  213. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-OMHHGYJF.js +0 -3
  214. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-4T2RLAQJ.js +0 -3
  215. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-ZZUOXDRM.js +0 -3
  216. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-PYXPWWZC.js +0 -3
  217. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-W4RFUUIX.js +0 -3
  218. package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/wardley-RL74JXVD.js +0 -3
  219. package/dist/node_modules/chevrotain/lib/src/api.js +0 -10
  220. package/dist/node_modules/chevrotain/lib/src/lang/lang_extensions.js +0 -10
  221. package/dist/node_modules/chevrotain/lib/src/parse/constants.js +0 -2
  222. package/dist/node_modules/chevrotain/lib/src/parse/cst/cst.js +0 -13
  223. package/dist/node_modules/chevrotain/lib/src/parse/cst/cst_visitor.js +0 -49
  224. package/dist/node_modules/chevrotain/lib/src/parse/errors_public.js +0 -77
  225. package/dist/node_modules/chevrotain/lib/src/parse/exceptions_public.js +0 -33
  226. package/dist/node_modules/chevrotain/lib/src/parse/grammar/checks.js +0 -275
  227. package/dist/node_modules/chevrotain/lib/src/parse/grammar/first.js +0 -23
  228. package/dist/node_modules/chevrotain/lib/src/parse/grammar/follow.js +0 -28
  229. package/dist/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_resolver_public.js +0 -14
  230. package/dist/node_modules/chevrotain/lib/src/parse/grammar/interpreter.js +0 -262
  231. package/dist/node_modules/chevrotain/lib/src/parse/grammar/keys.js +0 -5
  232. package/dist/node_modules/chevrotain/lib/src/parse/grammar/llk_lookahead.js +0 -41
  233. package/dist/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js +0 -241
  234. package/dist/node_modules/chevrotain/lib/src/parse/grammar/resolver.js +0 -30
  235. package/dist/node_modules/chevrotain/lib/src/parse/grammar/rest.js +0 -56
  236. package/dist/node_modules/chevrotain/lib/src/parse/parser/parser.js +0 -114
  237. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/error_handler.js +0 -46
  238. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/gast_recorder.js +0 -166
  239. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/lexer_adapter.js +0 -43
  240. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/looksahead.js +0 -107
  241. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/perf_tracer.js +0 -21
  242. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_api.js +0 -312
  243. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_engine.js +0 -285
  244. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recoverable.js +0 -144
  245. package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/tree_builder.js +0 -92
  246. package/dist/node_modules/chevrotain/lib/src/parse/parser/utils/apply_mixins.js +0 -11
  247. package/dist/node_modules/chevrotain/lib/src/scan/lexer.js +0 -437
  248. package/dist/node_modules/chevrotain/lib/src/scan/lexer_errors_public.js +0 -9
  249. package/dist/node_modules/chevrotain/lib/src/scan/lexer_public.js +0 -253
  250. package/dist/node_modules/chevrotain/lib/src/scan/reg_exp.js +0 -152
  251. package/dist/node_modules/chevrotain/lib/src/scan/reg_exp_parser.js +0 -15
  252. package/dist/node_modules/chevrotain/lib/src/scan/tokens.js +0 -65
  253. package/dist/node_modules/chevrotain/lib/src/scan/tokens_public.js +0 -39
  254. package/dist/node_modules/chevrotain-allstar/lib/all-star-lookahead.js +0 -346
  255. package/dist/node_modules/chevrotain-allstar/lib/atn.js +0 -194
  256. package/dist/node_modules/chevrotain-allstar/lib/dfa.js +0 -32
  257. package/dist/node_modules/chevrotain-allstar/lib/index.js +0 -1
  258. package/dist/node_modules/langium/lib/default-module.js +0 -85
  259. package/dist/node_modules/langium/lib/dependency-injection.js +0 -62
  260. package/dist/node_modules/langium/lib/documentation/comment-provider.js +0 -11
  261. package/dist/node_modules/langium/lib/documentation/documentation-provider.js +0 -36
  262. package/dist/node_modules/langium/lib/documentation/jsdoc.js +0 -303
  263. package/dist/node_modules/langium/lib/index.js +0 -182
  264. package/dist/node_modules/langium/lib/languages/generated/ast.js +0 -1089
  265. package/dist/node_modules/langium/lib/languages/grammar-config.js +0 -13
  266. package/dist/node_modules/langium/lib/parser/async-parser.js +0 -83
  267. package/dist/node_modules/langium/lib/parser/completion-parser-builder.js +0 -7
  268. package/dist/node_modules/langium/lib/parser/cst-node-builder.js +0 -160
  269. package/dist/node_modules/langium/lib/parser/indentation-aware.js +0 -141
  270. package/dist/node_modules/langium/lib/parser/langium-parser-builder.js +0 -11
  271. package/dist/node_modules/langium/lib/parser/langium-parser.js +0 -388
  272. package/dist/node_modules/langium/lib/parser/lexer.js +0 -50
  273. package/dist/node_modules/langium/lib/parser/parser-builder-base.js +0 -275
  274. package/dist/node_modules/langium/lib/parser/token-builder.js +0 -61
  275. package/dist/node_modules/langium/lib/parser/value-converter.js +0 -78
  276. package/dist/node_modules/langium/lib/references/linker.js +0 -190
  277. package/dist/node_modules/langium/lib/references/name-provider.js +0 -13
  278. package/dist/node_modules/langium/lib/references/references.js +0 -76
  279. package/dist/node_modules/langium/lib/references/scope-computation.js +0 -35
  280. package/dist/node_modules/langium/lib/references/scope-provider.js +0 -34
  281. package/dist/node_modules/langium/lib/references/scope.js +0 -73
  282. package/dist/node_modules/langium/lib/serializer/hydrator.js +0 -125
  283. package/dist/node_modules/langium/lib/serializer/json-serializer.js +0 -145
  284. package/dist/node_modules/langium/lib/service-registry.js +0 -37
  285. package/dist/node_modules/langium/lib/syntax-tree.js +0 -70
  286. package/dist/node_modules/langium/lib/utils/ast-utils.js +0 -157
  287. package/dist/node_modules/langium/lib/utils/caching.js +0 -91
  288. package/dist/node_modules/langium/lib/utils/cancellation.js +0 -5
  289. package/dist/node_modules/langium/lib/utils/collections.js +0 -85
  290. package/dist/node_modules/langium/lib/utils/cst-utils.js +0 -190
  291. package/dist/node_modules/langium/lib/utils/disposable.js +0 -8
  292. package/dist/node_modules/langium/lib/utils/errors.js +0 -12
  293. package/dist/node_modules/langium/lib/utils/event.js +0 -5
  294. package/dist/node_modules/langium/lib/utils/grammar-loader.js +0 -22
  295. package/dist/node_modules/langium/lib/utils/grammar-utils.js +0 -296
  296. package/dist/node_modules/langium/lib/utils/index.js +0 -53
  297. package/dist/node_modules/langium/lib/utils/promise-utils.js +0 -30
  298. package/dist/node_modules/langium/lib/utils/regexp-utils.js +0 -167
  299. package/dist/node_modules/langium/lib/utils/stream.js +0 -327
  300. package/dist/node_modules/langium/lib/utils/uri-utils.js +0 -107
  301. package/dist/node_modules/langium/lib/validation/document-validator.js +0 -210
  302. package/dist/node_modules/langium/lib/validation/validation-registry.js +0 -87
  303. package/dist/node_modules/langium/lib/workspace/ast-descriptions.js +0 -57
  304. package/dist/node_modules/langium/lib/workspace/ast-node-locator.js +0 -28
  305. package/dist/node_modules/langium/lib/workspace/configuration.js +0 -51
  306. package/dist/node_modules/langium/lib/workspace/document-builder.js +0 -201
  307. package/dist/node_modules/langium/lib/workspace/documents.js +0 -142
  308. package/dist/node_modules/langium/lib/workspace/file-system-provider.js +0 -34
  309. package/dist/node_modules/langium/lib/workspace/index-manager.js +0 -49
  310. package/dist/node_modules/langium/lib/workspace/profiler.js +0 -89
  311. package/dist/node_modules/langium/lib/workspace/workspace-lock.js +0 -42
  312. package/dist/node_modules/langium/lib/workspace/workspace-manager.js +0 -66
  313. package/dist/node_modules/lodash-es/flatMap.js +0 -7
  314. package/dist/node_modules/lodash-es/uniqBy.js +0 -7
  315. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/wardleyDiagram-NUSXRM2D.js +0 -574
  316. package/dist/node_modules/vscode-jsonrpc/browser.js +0 -7
  317. package/dist/node_modules/vscode-jsonrpc/lib/browser/main.js +0 -52
  318. package/dist/node_modules/vscode-jsonrpc/lib/browser/ril.js +0 -120
  319. package/dist/node_modules/vscode-jsonrpc/lib/common/api.js +0 -337
  320. package/dist/node_modules/vscode-jsonrpc/lib/common/cancellation.js +0 -57
  321. package/dist/node_modules/vscode-jsonrpc/lib/common/connection.js +0 -647
  322. package/dist/node_modules/vscode-jsonrpc/lib/common/disposable.js +0 -13
  323. package/dist/node_modules/vscode-jsonrpc/lib/common/events.js +0 -64
  324. package/dist/node_modules/vscode-jsonrpc/lib/common/is.js +0 -34
  325. package/dist/node_modules/vscode-jsonrpc/lib/common/linkedMap.js +0 -235
  326. package/dist/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js +0 -93
  327. package/dist/node_modules/vscode-jsonrpc/lib/common/messageReader.js +0 -129
  328. package/dist/node_modules/vscode-jsonrpc/lib/common/messageWriter.js +0 -85
  329. package/dist/node_modules/vscode-jsonrpc/lib/common/messages.js +0 -161
  330. package/dist/node_modules/vscode-jsonrpc/lib/common/ral.js +0 -18
  331. package/dist/node_modules/vscode-jsonrpc/lib/common/semaphore.js +0 -44
  332. package/dist/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +0 -58
  333. package/dist/node_modules/vscode-languageserver-protocol/lib/browser/main.js +0 -28
  334. package/dist/node_modules/vscode-languageserver-protocol/lib/common/api.js +0 -36
  335. package/dist/node_modules/vscode-languageserver-protocol/lib/common/connection.js +0 -12
  336. package/dist/node_modules/vscode-languageserver-protocol/lib/common/messages.js +0 -31
  337. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js +0 -19
  338. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js +0 -15
  339. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js +0 -11
  340. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js +0 -11
  341. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js +0 -33
  342. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js +0 -35
  343. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js +0 -15
  344. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js +0 -11
  345. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js +0 -19
  346. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js +0 -11
  347. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js +0 -15
  348. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.js +0 -674
  349. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js +0 -11
  350. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js +0 -19
  351. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js +0 -126
  352. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js +0 -24
  353. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js +0 -11
  354. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js +0 -31
  355. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js +0 -11
  356. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js +0 -11
  357. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js +0 -19
  358. package/dist/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js +0 -15
  359. package/dist/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js +0 -42
  360. package/dist/node_modules/vscode-languageserver-textdocument/lib/esm/main.js +0 -138
  361. package/dist/node_modules/vscode-languageserver-types/lib/esm/main.js +0 -1084
  362. package/dist/node_modules/vscode-uri/lib/esm/index.js +0 -373
  363. /package/dist/node_modules/{entities → hast-util-raw/node_modules/entities}/dist/esm/decode-codepoint.js +0 -0
  364. /package/dist/node_modules/{entities → hast-util-raw/node_modules/entities}/dist/esm/decode.js +0 -0
  365. /package/dist/node_modules/{entities → hast-util-raw/node_modules/entities}/dist/esm/generated/decode-data-html.js +0 -0
  366. /package/dist/node_modules/{unified/node_modules/is-plain-obj → is-plain-obj}/index.js +0 -0
@@ -1,11 +1,11 @@
1
1
  import { __toESM } from "../../../../../_virtual/rolldown_runtime.js";
2
2
  import { __name, log } from "./chunk-AGHRB4JF.js";
3
- import { clear, defaultConfig_default, getAccDescription, getAccTitle, getConfig, getConfig2, getDiagramTitle, sanitizeText, setAccDescription, setAccTitle, setDiagramTitle, setupGraphViewbox } from "./chunk-ICPOFSXX.js";
3
+ import { clear, defaultConfig_default, getAccDescription, getAccTitle, getConfig, getConfig2, getDiagramTitle, sanitizeText, setAccDescription, setAccTitle, setDiagramTitle, setupGraphViewbox } from "./chunk-CSCIHK7Q.js";
4
4
  import select_default from "../../../../d3-selection/src/select.js";
5
5
  import "../../../../d3/src/index.js";
6
- import { selectSvgElement } from "./chunk-426QAEUC.js";
7
- import { cleanAndMerge, getEdgeId } from "./chunk-5PVQY5BW.js";
8
- import { createText, getIconSVG, registerIconPacks, unknownIcon } from "./chunk-U2HBQHQK.js";
6
+ import { selectSvgElement } from "./chunk-WU5MYG2G.js";
7
+ import { cleanAndMerge, getEdgeId } from "./chunk-5ZQYHXKU.js";
8
+ import { createText, getIconSVG, registerIconPacks, unknownIcon } from "./chunk-O5CBEL6O.js";
9
9
  import { populateCommonDb } from "./chunk-4BX2VUAB.js";
10
10
  import { parse } from "../../../../@mermaid-js/parser/dist/mermaid-parser.core.js";
11
11
  import { cytoscape } from "../../../../cytoscape/dist/cytoscape.esm.js";
@@ -21,39 +21,39 @@ var import_cytoscape_fcose = /* @__PURE__ */ __toESM(require_cytoscape_fcose(),
21
21
  T: /* @__PURE__ */ __name((e) => `0,0 ${e},0 ${e / 2},${e}`, "T"),
22
22
  B: /* @__PURE__ */ __name((e) => `${e / 2},0 ${e},${e} 0,${e}`, "B")
23
23
  }, ArchitectureDirectionArrowShift = {
24
- L: /* @__PURE__ */ __name((e, A) => e - A + 2, "L"),
25
- R: /* @__PURE__ */ __name((e, A) => e - 2, "R"),
26
- T: /* @__PURE__ */ __name((e, A) => e - A + 2, "T"),
27
- B: /* @__PURE__ */ __name((e, A) => e - 2, "B")
24
+ L: /* @__PURE__ */ __name((e, O) => e - O + 2, "L"),
25
+ R: /* @__PURE__ */ __name((e, O) => e - 2, "R"),
26
+ T: /* @__PURE__ */ __name((e, O) => e - O + 2, "T"),
27
+ B: /* @__PURE__ */ __name((e, O) => e - 2, "B")
28
28
  }, getOppositeArchitectureDirection = /* @__PURE__ */ __name(function(e) {
29
29
  return isArchitectureDirectionX(e) ? e === "L" ? "R" : "L" : e === "T" ? "B" : "T";
30
30
  }, "getOppositeArchitectureDirection"), isArchitectureDirection = /* @__PURE__ */ __name(function(e) {
31
- let A = e;
32
- return A === "L" || A === "R" || A === "T" || A === "B";
31
+ let O = e;
32
+ return O === "L" || O === "R" || O === "T" || O === "B";
33
33
  }, "isArchitectureDirection"), isArchitectureDirectionX = /* @__PURE__ */ __name(function(e) {
34
- let A = e;
35
- return A === "L" || A === "R";
34
+ let O = e;
35
+ return O === "L" || O === "R";
36
36
  }, "isArchitectureDirectionX"), isArchitectureDirectionY = /* @__PURE__ */ __name(function(e) {
37
- let A = e;
38
- return A === "T" || A === "B";
39
- }, "isArchitectureDirectionY"), isArchitectureDirectionXY = /* @__PURE__ */ __name(function(e, A) {
40
- let j = isArchitectureDirectionX(e) && isArchitectureDirectionY(A), M = isArchitectureDirectionY(e) && isArchitectureDirectionX(A);
41
- return j || M;
37
+ let O = e;
38
+ return O === "T" || O === "B";
39
+ }, "isArchitectureDirectionY"), isArchitectureDirectionXY = /* @__PURE__ */ __name(function(e, O) {
40
+ let k = isArchitectureDirectionX(e) && isArchitectureDirectionY(O), A = isArchitectureDirectionY(e) && isArchitectureDirectionX(O);
41
+ return k || A;
42
42
  }, "isArchitectureDirectionXY"), isArchitecturePairXY = /* @__PURE__ */ __name(function(e) {
43
- let A = e[0], j = e[1], M = isArchitectureDirectionX(A) && isArchitectureDirectionY(j), N = isArchitectureDirectionY(A) && isArchitectureDirectionX(j);
44
- return M || N;
43
+ let O = e[0], k = e[1], A = isArchitectureDirectionX(O) && isArchitectureDirectionY(k), j = isArchitectureDirectionY(O) && isArchitectureDirectionX(k);
44
+ return A || j;
45
45
  }, "isArchitecturePairXY"), isValidArchitectureDirectionPair = /* @__PURE__ */ __name(function(e) {
46
46
  return e !== "LL" && e !== "RR" && e !== "TT" && e !== "BB";
47
- }, "isValidArchitectureDirectionPair"), getArchitectureDirectionPair = /* @__PURE__ */ __name(function(e, A) {
48
- let j = `${e}${A}`;
49
- return isValidArchitectureDirectionPair(j) ? j : void 0;
50
- }, "getArchitectureDirectionPair"), shiftPositionByArchitectureDirectionPair = /* @__PURE__ */ __name(function([e, A], j) {
51
- let M = j[0], N = j[1];
52
- return isArchitectureDirectionX(M) ? isArchitectureDirectionY(N) ? [e + (M === "L" ? -1 : 1), A + (N === "T" ? 1 : -1)] : [e + (M === "L" ? -1 : 1), A] : isArchitectureDirectionX(N) ? [e + (N === "L" ? 1 : -1), A + (M === "T" ? 1 : -1)] : [e, A + (M === "T" ? 1 : -1)];
47
+ }, "isValidArchitectureDirectionPair"), getArchitectureDirectionPair = /* @__PURE__ */ __name(function(e, O) {
48
+ let k = `${e}${O}`;
49
+ return isValidArchitectureDirectionPair(k) ? k : void 0;
50
+ }, "getArchitectureDirectionPair"), shiftPositionByArchitectureDirectionPair = /* @__PURE__ */ __name(function([e, O], k) {
51
+ let A = k[0], j = k[1];
52
+ return isArchitectureDirectionX(A) ? isArchitectureDirectionY(j) ? [e + (A === "L" ? -1 : 1), O + (j === "T" ? 1 : -1)] : [e + (A === "L" ? -1 : 1), O] : isArchitectureDirectionX(j) ? [e + (j === "L" ? 1 : -1), O + (A === "T" ? 1 : -1)] : [e, O + (A === "T" ? 1 : -1)];
53
53
  }, "shiftPositionByArchitectureDirectionPair"), getArchitectureDirectionXYFactors = /* @__PURE__ */ __name(function(e) {
54
54
  return e === "LT" || e === "TL" ? [1, 1] : e === "BL" || e === "LB" ? [1, -1] : e === "BR" || e === "RB" ? [-1, -1] : [-1, 1];
55
- }, "getArchitectureDirectionXYFactors"), getArchitectureDirectionAlignment = /* @__PURE__ */ __name(function(e, A) {
56
- return isArchitectureDirectionXY(e, A) ? "bend" : isArchitectureDirectionX(e) ? "horizontal" : "vertical";
55
+ }, "getArchitectureDirectionXYFactors"), getArchitectureDirectionAlignment = /* @__PURE__ */ __name(function(e, O) {
56
+ return isArchitectureDirectionXY(e, O) ? "bend" : isArchitectureDirectionX(e) ? "horizontal" : "vertical";
57
57
  }, "getArchitectureDirectionAlignment"), isArchitectureService = /* @__PURE__ */ __name(function(e) {
58
58
  return e.type === "service";
59
59
  }, "isArchitectureService"), isArchitectureJunction = /* @__PURE__ */ __name(function(e) {
@@ -72,38 +72,38 @@ var import_cytoscape_fcose = /* @__PURE__ */ __toESM(require_cytoscape_fcose(),
72
72
  clear() {
73
73
  this.nodes = {}, this.groups = {}, this.edges = [], this.registeredIds = {}, this.dataStructures = void 0, this.elements = {}, this.diagramId = "", clear();
74
74
  }
75
- addService({ id: e, icon: A, in: j, title: M, iconText: N }) {
75
+ addService({ id: e, icon: O, in: k, title: A, iconText: j }) {
76
76
  if (this.registeredIds[e] !== void 0) throw Error(`The service id [${e}] is already in use by another ${this.registeredIds[e]}`);
77
- if (j !== void 0) {
78
- if (e === j) throw Error(`The service [${e}] cannot be placed within itself`);
79
- if (this.registeredIds[j] === void 0) throw Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);
80
- if (this.registeredIds[j] === "node") throw Error(`The service [${e}]'s parent is not a group`);
77
+ if (k !== void 0) {
78
+ if (e === k) throw Error(`The service [${e}] cannot be placed within itself`);
79
+ if (this.registeredIds[k] === void 0) throw Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);
80
+ if (this.registeredIds[k] === "node") throw Error(`The service [${e}]'s parent is not a group`);
81
81
  }
82
82
  this.registeredIds[e] = "node", this.nodes[e] = {
83
83
  id: e,
84
84
  type: "service",
85
- icon: A,
86
- iconText: N,
87
- title: M,
85
+ icon: O,
86
+ iconText: j,
87
+ title: A,
88
88
  edges: [],
89
- in: j
89
+ in: k
90
90
  };
91
91
  }
92
92
  getServices() {
93
93
  return Object.values(this.nodes).filter(isArchitectureService);
94
94
  }
95
- addJunction({ id: e, in: A }) {
95
+ addJunction({ id: e, in: O }) {
96
96
  if (this.registeredIds[e] !== void 0) throw Error(`The junction id [${e}] is already in use by another ${this.registeredIds[e]}`);
97
- if (A !== void 0) {
98
- if (e === A) throw Error(`The junction [${e}] cannot be placed within itself`);
99
- if (this.registeredIds[A] === void 0) throw Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);
100
- if (this.registeredIds[A] === "node") throw Error(`The junction [${e}]'s parent is not a group`);
97
+ if (O !== void 0) {
98
+ if (e === O) throw Error(`The junction [${e}] cannot be placed within itself`);
99
+ if (this.registeredIds[O] === void 0) throw Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);
100
+ if (this.registeredIds[O] === "node") throw Error(`The junction [${e}]'s parent is not a group`);
101
101
  }
102
102
  this.registeredIds[e] = "node", this.nodes[e] = {
103
103
  id: e,
104
104
  type: "junction",
105
105
  edges: [],
106
- in: A
106
+ in: O
107
107
  };
108
108
  }
109
109
  getJunctions() {
@@ -115,91 +115,91 @@ var import_cytoscape_fcose = /* @__PURE__ */ __toESM(require_cytoscape_fcose(),
115
115
  getNode(e) {
116
116
  return this.nodes[e] ?? null;
117
117
  }
118
- addGroup({ id: e, icon: A, in: j, title: M }) {
118
+ addGroup({ id: e, icon: O, in: k, title: A }) {
119
119
  if (this.registeredIds?.[e] !== void 0) throw Error(`The group id [${e}] is already in use by another ${this.registeredIds[e]}`);
120
- if (j !== void 0) {
121
- if (e === j) throw Error(`The group [${e}] cannot be placed within itself`);
122
- if (this.registeredIds?.[j] === void 0) throw Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);
123
- if (this.registeredIds?.[j] === "node") throw Error(`The group [${e}]'s parent is not a group`);
120
+ if (k !== void 0) {
121
+ if (e === k) throw Error(`The group [${e}] cannot be placed within itself`);
122
+ if (this.registeredIds?.[k] === void 0) throw Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);
123
+ if (this.registeredIds?.[k] === "node") throw Error(`The group [${e}]'s parent is not a group`);
124
124
  }
125
125
  this.registeredIds[e] = "group", this.groups[e] = {
126
126
  id: e,
127
- icon: A,
128
- title: M,
129
- in: j
127
+ icon: O,
128
+ title: A,
129
+ in: k
130
130
  };
131
131
  }
132
132
  getGroups() {
133
133
  return Object.values(this.groups);
134
134
  }
135
- addEdge({ lhsId: e, rhsId: A, lhsDir: j, rhsDir: M, lhsInto: N, rhsInto: P, lhsGroup: F, rhsGroup: I, title: L }) {
136
- if (!isArchitectureDirection(j)) throw Error(`Invalid direction given for left hand side of edge ${e}--${A}. Expected (L,R,T,B) got ${String(j)}`);
137
- if (!isArchitectureDirection(M)) throw Error(`Invalid direction given for right hand side of edge ${e}--${A}. Expected (L,R,T,B) got ${String(M)}`);
135
+ addEdge({ lhsId: e, rhsId: O, lhsDir: k, rhsDir: A, lhsInto: j, rhsInto: M, lhsGroup: N, rhsGroup: P, title: F }) {
136
+ if (!isArchitectureDirection(k)) throw Error(`Invalid direction given for left hand side of edge ${e}--${O}. Expected (L,R,T,B) got ${String(k)}`);
137
+ if (!isArchitectureDirection(A)) throw Error(`Invalid direction given for right hand side of edge ${e}--${O}. Expected (L,R,T,B) got ${String(A)}`);
138
138
  if (this.nodes[e] === void 0 && this.groups[e] === void 0) throw Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);
139
- if (this.nodes[A] === void 0 && this.groups[A] === void 0) throw Error(`The right-hand id [${A}] does not yet exist. Please create the service/group before declaring an edge to it.`);
140
- let R = this.nodes[e].in, z = this.nodes[A].in;
141
- if (F && R && z && R == z) throw Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);
142
- if (I && R && z && R == z) throw Error(`The right-hand id [${A}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);
143
- let B = {
139
+ if (this.nodes[O] === void 0 && this.groups[O] === void 0) throw Error(`The right-hand id [${O}] does not yet exist. Please create the service/group before declaring an edge to it.`);
140
+ let I = this.nodes[e].in, L = this.nodes[O].in;
141
+ if (N && I && L && I == L) throw Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);
142
+ if (P && I && L && I == L) throw Error(`The right-hand id [${O}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);
143
+ let R = {
144
144
  lhsId: e,
145
- lhsDir: j,
146
- lhsInto: N,
147
- lhsGroup: F,
148
- rhsId: A,
149
- rhsDir: M,
150
- rhsInto: P,
151
- rhsGroup: I,
152
- title: L
145
+ lhsDir: k,
146
+ lhsInto: j,
147
+ lhsGroup: N,
148
+ rhsId: O,
149
+ rhsDir: A,
150
+ rhsInto: M,
151
+ rhsGroup: P,
152
+ title: F
153
153
  };
154
- this.edges.push(B), this.nodes[e] && this.nodes[A] && (this.nodes[e].edges.push(this.edges[this.edges.length - 1]), this.nodes[A].edges.push(this.edges[this.edges.length - 1]));
154
+ this.edges.push(R), this.nodes[e] && this.nodes[O] && (this.nodes[e].edges.push(this.edges[this.edges.length - 1]), this.nodes[O].edges.push(this.edges[this.edges.length - 1]));
155
155
  }
156
156
  getEdges() {
157
157
  return this.edges;
158
158
  }
159
159
  getDataStructures() {
160
160
  if (this.dataStructures === void 0) {
161
- let e = {}, j = Object.entries(this.nodes).reduce((A, [j, M]) => (A[j] = M.edges.reduce((A, M) => {
162
- let N = this.getNode(M.lhsId)?.in, P = this.getNode(M.rhsId)?.in;
163
- if (N && P && N !== P) {
164
- let A = getArchitectureDirectionAlignment(M.lhsDir, M.rhsDir);
165
- A !== "bend" && (e[N] ??= {}, e[N][P] = A, e[P] ??= {}, e[P][N] = A);
161
+ let e = {}, k = Object.entries(this.nodes).reduce((O, [k, A]) => (O[k] = A.edges.reduce((O, A) => {
162
+ let j = this.getNode(A.lhsId)?.in, M = this.getNode(A.rhsId)?.in;
163
+ if (j && M && j !== M) {
164
+ let O = getArchitectureDirectionAlignment(A.lhsDir, A.rhsDir);
165
+ O !== "bend" && (e[j] ??= {}, e[j][M] = O, e[M] ??= {}, e[M][j] = O);
166
166
  }
167
- if (M.lhsId === j) {
168
- let e = getArchitectureDirectionPair(M.lhsDir, M.rhsDir);
169
- e && (A[e] = M.rhsId);
167
+ if (A.lhsId === k) {
168
+ let e = getArchitectureDirectionPair(A.lhsDir, A.rhsDir);
169
+ e && (O[e] = A.rhsId);
170
170
  } else {
171
- let e = getArchitectureDirectionPair(M.rhsDir, M.lhsDir);
172
- e && (A[e] = M.lhsId);
171
+ let e = getArchitectureDirectionPair(A.rhsDir, A.lhsDir);
172
+ e && (O[e] = A.lhsId);
173
173
  }
174
- return A;
175
- }, {}), A), {}), M = Object.keys(j)[0], N = { [M]: 1 }, P = Object.keys(j).reduce((e, A) => A === M ? e : {
174
+ return O;
175
+ }, {}), O), {}), A = Object.keys(k)[0], j = { [A]: 1 }, M = Object.keys(k).reduce((e, O) => O === A ? e : {
176
176
  ...e,
177
- [A]: 1
178
- }, {}), F = /* @__PURE__ */ __name((e) => {
179
- let A = { [e]: [0, 0] }, M = [e];
180
- for (; M.length > 0;) {
181
- let e = M.shift();
177
+ [O]: 1
178
+ }, {}), N = /* @__PURE__ */ __name((e) => {
179
+ let O = { [e]: [0, 0] }, A = [e];
180
+ for (; A.length > 0;) {
181
+ let e = A.shift();
182
182
  if (e) {
183
- N[e] = 1, delete P[e];
184
- let F = j[e], [I, L] = A[e];
185
- Object.entries(F).forEach(([e, j]) => {
186
- N[j] || (A[j] = shiftPositionByArchitectureDirectionPair([I, L], e), M.push(j));
183
+ j[e] = 1, delete M[e];
184
+ let N = k[e], [P, F] = O[e];
185
+ Object.entries(N).forEach(([e, k]) => {
186
+ j[k] || (O[k] = shiftPositionByArchitectureDirectionPair([P, F], e), A.push(k));
187
187
  });
188
188
  }
189
189
  }
190
- return A;
191
- }, "BFS"), I = [F(M)];
192
- for (; Object.keys(P).length > 0;) I.push(F(Object.keys(P)[0]));
190
+ return O;
191
+ }, "BFS"), P = [N(A)];
192
+ for (; Object.keys(M).length > 0;) P.push(N(Object.keys(M)[0]));
193
193
  this.dataStructures = {
194
- adjList: j,
195
- spatialMaps: I,
194
+ adjList: k,
195
+ spatialMaps: P,
196
196
  groupAlignments: e
197
197
  };
198
198
  }
199
199
  return this.dataStructures;
200
200
  }
201
- setElementForId(e, A) {
202
- this.elements[e] = A;
201
+ setElementForId(e, O) {
202
+ this.elements[e] = O;
203
203
  }
204
204
  getElementById(e) {
205
205
  return this.elements[e];
@@ -213,22 +213,22 @@ var import_cytoscape_fcose = /* @__PURE__ */ __toESM(require_cytoscape_fcose(),
213
213
  getConfigField(e) {
214
214
  return this.getConfig()[e];
215
215
  }
216
- }, populateDb = /* @__PURE__ */ __name((e, A) => {
217
- populateCommonDb(e, A), e.groups.map((e) => A.addGroup(e)), e.services.map((e) => A.addService({
216
+ }, populateDb = /* @__PURE__ */ __name((e, O) => {
217
+ populateCommonDb(e, O), e.groups.map((e) => O.addGroup(e)), e.services.map((e) => O.addService({
218
218
  ...e,
219
219
  type: "service"
220
- })), e.junctions.map((e) => A.addJunction({
220
+ })), e.junctions.map((e) => O.addJunction({
221
221
  ...e,
222
222
  type: "junction"
223
- })), e.edges.map((e) => A.addEdge(e));
223
+ })), e.edges.map((e) => O.addEdge(e));
224
224
  }, "populateDb"), parser = {
225
225
  parser: { yy: void 0 },
226
226
  parse: /* @__PURE__ */ __name(async (e) => {
227
- let A = await parse("architecture", e);
228
- log.debug(A);
229
- let M = parser.parser?.yy;
230
- if (!(M instanceof ArchitectureDB)) throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");
231
- populateDb(A, M);
227
+ let O = await parse("architecture", e);
228
+ log.debug(O);
229
+ let A = parser.parser?.yy;
230
+ if (!(A instanceof ArchitectureDB)) throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");
231
+ populateDb(O, A);
232
232
  }, "parse")
233
233
  }, architectureStyles_default = /* @__PURE__ */ __name((e) => `
234
234
  .edge {
@@ -274,120 +274,120 @@ var import_cytoscape_fcose = /* @__PURE__ */ __toESM(require_cytoscape_fcose(),
274
274
  unknown: unknownIcon,
275
275
  blank: { body: wrapIcon("") }
276
276
  }
277
- }, drawEdges = /* @__PURE__ */ __name(async function(e, A, j, M) {
278
- let N = j.getConfigField("padding"), P = j.getConfigField("iconSize"), F = P / 2, I = P / 6, R = I / 2;
279
- await Promise.all(A.edges().map(async (A) => {
280
- let { source: P, sourceDir: z, sourceArrow: B, sourceGroup: V, target: H, targetDir: U, targetArrow: W, targetGroup: G, label: K } = edgeData(A), { x: q, y: J } = A[0].sourceEndpoint(), { x: Y, y: X } = A[0].midpoint(), { x: Z, y: Q } = A[0].targetEndpoint(), $ = N + 4;
281
- if (V && (isArchitectureDirectionX(z) ? q += z === "L" ? -$ : $ : J += z === "T" ? -$ : $ + 18), G && (isArchitectureDirectionX(U) ? Z += U === "L" ? -$ : $ : Q += U === "T" ? -$ : $ + 18), !V && j.getNode(P)?.type === "junction" && (isArchitectureDirectionX(z) ? q += z === "L" ? F : -F : J += z === "T" ? F : -F), !G && j.getNode(H)?.type === "junction" && (isArchitectureDirectionX(U) ? Z += U === "L" ? F : -F : Q += U === "T" ? F : -F), A[0]._private.rscratch) {
282
- let A = e.insert("g");
283
- if (A.insert("path").attr("d", `M ${q},${J} L ${Y},${X} L${Z},${Q} `).attr("class", "edge").attr("id", `${M}-${getEdgeId(P, H, { prefix: "L" })}`), B) {
284
- let e = isArchitectureDirectionX(z) ? ArchitectureDirectionArrowShift[z](q, I) : q - R, j = isArchitectureDirectionY(z) ? ArchitectureDirectionArrowShift[z](J, I) : J - R;
285
- A.insert("polygon").attr("points", ArchitectureDirectionArrow[z](I)).attr("transform", `translate(${e},${j})`).attr("class", "arrow");
277
+ }, drawEdges = /* @__PURE__ */ __name(async function(e, O, k, A) {
278
+ let j = k.getConfigField("padding"), M = k.getConfigField("iconSize"), N = M / 2, P = M / 6, I = P / 2;
279
+ await Promise.all(O.edges().map(async (O) => {
280
+ let { source: M, sourceDir: L, sourceArrow: R, sourceGroup: z, target: B, targetDir: V, targetArrow: H, targetGroup: U, label: W } = edgeData(O), { x: q, y: J } = O[0].sourceEndpoint(), { x: Y, y: X } = O[0].midpoint(), { x: Z, y: Q } = O[0].targetEndpoint(), $ = j + 4;
281
+ if (z && (isArchitectureDirectionX(L) ? q += L === "L" ? -$ : $ : J += L === "T" ? -$ : $ + 18), U && (isArchitectureDirectionX(V) ? Z += V === "L" ? -$ : $ : Q += V === "T" ? -$ : $ + 18), !z && k.getNode(M)?.type === "junction" && (isArchitectureDirectionX(L) ? q += L === "L" ? N : -N : J += L === "T" ? N : -N), !U && k.getNode(B)?.type === "junction" && (isArchitectureDirectionX(V) ? Z += V === "L" ? N : -N : Q += V === "T" ? N : -N), O[0]._private.rscratch) {
282
+ let O = e.insert("g");
283
+ if (O.insert("path").attr("d", `M ${q},${J} L ${Y},${X} L${Z},${Q} `).attr("class", "edge").attr("id", `${A}-${getEdgeId(M, B, { prefix: "L" })}`), R) {
284
+ let e = isArchitectureDirectionX(L) ? ArchitectureDirectionArrowShift[L](q, P) : q - I, k = isArchitectureDirectionY(L) ? ArchitectureDirectionArrowShift[L](J, P) : J - I;
285
+ O.insert("polygon").attr("points", ArchitectureDirectionArrow[L](P)).attr("transform", `translate(${e},${k})`).attr("class", "arrow");
286
286
  }
287
- if (W) {
288
- let e = isArchitectureDirectionX(U) ? ArchitectureDirectionArrowShift[U](Z, I) : Z - R, j = isArchitectureDirectionY(U) ? ArchitectureDirectionArrowShift[U](Q, I) : Q - R;
289
- A.insert("polygon").attr("points", ArchitectureDirectionArrow[U](I)).attr("transform", `translate(${e},${j})`).attr("class", "arrow");
287
+ if (H) {
288
+ let e = isArchitectureDirectionX(V) ? ArchitectureDirectionArrowShift[V](Z, P) : Z - I, k = isArchitectureDirectionY(V) ? ArchitectureDirectionArrowShift[V](Q, P) : Q - I;
289
+ O.insert("polygon").attr("points", ArchitectureDirectionArrow[V](P)).attr("transform", `translate(${e},${k})`).attr("class", "arrow");
290
290
  }
291
- if (K) {
292
- let e = isArchitectureDirectionXY(z, U) ? "XY" : isArchitectureDirectionX(z) ? "X" : "Y", j = 0;
293
- j = e === "X" ? Math.abs(q - Z) : e === "Y" ? Math.abs(J - Q) / 1.5 : Math.abs(q - Z) / 2;
294
- let M = A.append("g");
295
- if (await createText(M, K, {
291
+ if (W) {
292
+ let e = isArchitectureDirectionXY(L, V) ? "XY" : isArchitectureDirectionX(L) ? "X" : "Y", k = 0;
293
+ k = e === "X" ? Math.abs(q - Z) : e === "Y" ? Math.abs(J - Q) / 1.5 : Math.abs(q - Z) / 2;
294
+ let A = O.append("g");
295
+ if (await createText(A, W, {
296
296
  useHtmlLabels: !1,
297
- width: j,
297
+ width: k,
298
298
  classes: "architecture-service-label"
299
- }, getConfig2()), M.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"), e === "X") M.attr("transform", "translate(" + Y + ", " + X + ")");
300
- else if (e === "Y") M.attr("transform", "translate(" + Y + ", " + X + ") rotate(-90)");
299
+ }, getConfig2()), A.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"), e === "X") A.attr("transform", "translate(" + Y + ", " + X + ")");
300
+ else if (e === "Y") A.attr("transform", "translate(" + Y + ", " + X + ") rotate(-90)");
301
301
  else if (e === "XY") {
302
- let e = getArchitectureDirectionPair(z, U);
302
+ let e = getArchitectureDirectionPair(L, V);
303
303
  if (e && isArchitecturePairXY(e)) {
304
- let A = M.node().getBoundingClientRect(), [j, N] = getArchitectureDirectionXYFactors(e);
305
- M.attr("dominant-baseline", "auto").attr("transform", `rotate(${-1 * j * N * 45})`);
306
- let P = M.node().getBoundingClientRect();
307
- M.attr("transform", `
308
- translate(${Y}, ${X - A.height / 2})
309
- translate(${j * P.width / 2}, ${N * P.height / 2})
310
- rotate(${-1 * j * N * 45}, 0, ${A.height / 2})
304
+ let O = A.node().getBoundingClientRect(), [k, j] = getArchitectureDirectionXYFactors(e);
305
+ A.attr("dominant-baseline", "auto").attr("transform", `rotate(${-1 * k * j * 45})`);
306
+ let M = A.node().getBoundingClientRect();
307
+ A.attr("transform", `
308
+ translate(${Y}, ${X - O.height / 2})
309
+ translate(${k * M.width / 2}, ${j * M.height / 2})
310
+ rotate(${-1 * k * j * 45}, 0, ${O.height / 2})
311
311
  `);
312
312
  }
313
313
  }
314
314
  }
315
315
  }
316
316
  }));
317
- }, "drawEdges"), drawGroups = /* @__PURE__ */ __name(async function(e, A, j, M) {
318
- let N = j.getConfigField("padding") * .75, P = j.getConfigField("fontSize"), F = j.getConfigField("iconSize") / 2;
319
- await Promise.all(A.nodes().map(async (A) => {
320
- let I = nodeData(A);
321
- if (I.type === "group") {
322
- let { h: R, w: z, x1: B, y1: V } = A.boundingBox(), H = e.append("rect");
323
- H.attr("id", `${M}-group-${I.id}`).attr("x", B + F).attr("y", V + F).attr("width", z).attr("height", R).attr("class", "node-bkg");
324
- let U = e.append("g"), W = B, G = V;
325
- if (I.icon) {
326
- let e = U.append("g");
327
- e.html(`<g>${await getIconSVG(I.icon, {
328
- height: N,
329
- width: N,
317
+ }, "drawEdges"), drawGroups = /* @__PURE__ */ __name(async function(e, O, k, A) {
318
+ let j = k.getConfigField("padding") * .75, M = k.getConfigField("fontSize"), N = k.getConfigField("iconSize") / 2;
319
+ await Promise.all(O.nodes().map(async (O) => {
320
+ let P = nodeData(O);
321
+ if (P.type === "group") {
322
+ let { h: I, w: L, x1: R, y1: z } = O.boundingBox(), B = e.append("rect");
323
+ B.attr("id", `${A}-group-${P.id}`).attr("x", R + N).attr("y", z + N).attr("width", L).attr("height", I).attr("class", "node-bkg");
324
+ let V = e.append("g"), H = R, U = z;
325
+ if (P.icon) {
326
+ let e = V.append("g");
327
+ e.html(`<g>${await getIconSVG(P.icon, {
328
+ height: j,
329
+ width: j,
330
330
  fallbackPrefix: architectureIcons.prefix
331
- })}</g>`), e.attr("transform", "translate(" + (W + F + 1) + ", " + (G + F + 1) + ")"), W += N, G += P / 2 - 1 - 2;
331
+ })}</g>`), e.attr("transform", "translate(" + (H + N + 1) + ", " + (U + N + 1) + ")"), H += j, U += M / 2 - 1 - 2;
332
332
  }
333
- if (I.label) {
334
- let e = U.append("g");
335
- await createText(e, I.label, {
333
+ if (P.label) {
334
+ let e = V.append("g");
335
+ await createText(e, P.label, {
336
336
  useHtmlLabels: !1,
337
- width: z,
337
+ width: L,
338
338
  classes: "architecture-service-label"
339
- }, getConfig2()), e.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "start").attr("text-anchor", "start"), e.attr("transform", "translate(" + (W + F + 4) + ", " + (G + F + 2) + ")");
339
+ }, getConfig2()), e.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "start").attr("text-anchor", "start"), e.attr("transform", "translate(" + (H + N + 4) + ", " + (U + N + 2) + ")");
340
340
  }
341
- j.setElementForId(I.id, H);
341
+ k.setElementForId(P.id, B);
342
342
  }
343
343
  }));
344
- }, "drawGroups"), drawServices = /* @__PURE__ */ __name(async function(e, A, j, M) {
345
- let N = getConfig2();
346
- for (let P of j) {
347
- let j = A.append("g"), F = e.getConfigField("iconSize");
348
- if (P.title) {
349
- let e = j.append("g");
350
- await createText(e, P.title, {
344
+ }, "drawGroups"), drawServices = /* @__PURE__ */ __name(async function(e, O, k, A) {
345
+ let j = getConfig2();
346
+ for (let M of k) {
347
+ let k = O.append("g"), N = e.getConfigField("iconSize");
348
+ if (M.title) {
349
+ let e = k.append("g");
350
+ await createText(e, M.title, {
351
351
  useHtmlLabels: !1,
352
- width: F * 1.5,
352
+ width: N * 1.5,
353
353
  classes: "architecture-service-label"
354
- }, N), e.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"), e.attr("transform", "translate(" + F / 2 + ", " + F + ")");
354
+ }, j), e.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"), e.attr("transform", "translate(" + N / 2 + ", " + N + ")");
355
355
  }
356
- let I = j.append("g");
357
- if (P.icon) I.html(`<g>${await getIconSVG(P.icon, {
358
- height: F,
359
- width: F,
356
+ let P = k.append("g");
357
+ if (M.icon) P.html(`<g>${await getIconSVG(M.icon, {
358
+ height: N,
359
+ width: N,
360
360
  fallbackPrefix: architectureIcons.prefix
361
361
  })}</g>`);
362
- else if (P.iconText) {
363
- I.html(`<g>${await getIconSVG("blank", {
364
- height: F,
365
- width: F,
362
+ else if (M.iconText) {
363
+ P.html(`<g>${await getIconSVG("blank", {
364
+ height: N,
365
+ width: N,
366
366
  fallbackPrefix: architectureIcons.prefix
367
367
  })}</g>`);
368
- let e = I.append("g").append("foreignObject").attr("width", F).attr("height", F).append("div").attr("class", "node-icon-text").attr("style", `height: ${F}px;`).append("div").html(sanitizeText(P.iconText, N)), A = parseInt(window.getComputedStyle(e.node(), null).getPropertyValue("font-size").replace(/\D/g, "")) ?? 16;
369
- e.attr("style", `-webkit-line-clamp: ${Math.floor((F - 2) / A)};`);
370
- } else I.append("path").attr("class", "node-bkg").attr("id", `${M}-node-${P.id}`).attr("d", `M0,${F} V5 Q0,0 5,0 H${F - 5} Q${F},0 ${F},5 V${F} Z`);
371
- j.attr("id", `${M}-service-${P.id}`).attr("class", "architecture-service");
372
- let { width: L, height: R } = j.node().getBBox();
373
- P.width = L, P.height = R, e.setElementForId(P.id, j);
368
+ let e = P.append("g").append("foreignObject").attr("width", N).attr("height", N).append("div").attr("class", "node-icon-text").attr("style", `height: ${N}px;`).append("div").html(sanitizeText(M.iconText, j)), O = parseInt(window.getComputedStyle(e.node(), null).getPropertyValue("font-size").replace(/\D/g, "")) ?? 16;
369
+ e.attr("style", `-webkit-line-clamp: ${Math.floor((N - 2) / O)};`);
370
+ } else P.append("path").attr("class", "node-bkg").attr("id", `${A}-node-${M.id}`).attr("d", `M0,${N} V5 Q0,0 5,0 H${N - 5} Q${N},0 ${N},5 V${N} Z`);
371
+ k.attr("id", `${A}-service-${M.id}`).attr("class", "architecture-service");
372
+ let { width: F, height: I } = k.node().getBBox();
373
+ M.width = F, M.height = I, e.setElementForId(M.id, k);
374
374
  }
375
375
  return 0;
376
- }, "drawServices"), drawJunctions = /* @__PURE__ */ __name(function(e, A, j, M) {
377
- j.forEach((j) => {
378
- let N = A.append("g"), P = e.getConfigField("iconSize");
379
- N.append("g").append("rect").attr("id", `${M}-node-${j.id}`).attr("fill-opacity", "0").attr("width", P).attr("height", P), N.attr("class", "architecture-junction");
380
- let { width: F, height: I } = N._groups[0][0].getBBox();
381
- N.width = F, N.height = I, e.setElementForId(j.id, N);
376
+ }, "drawServices"), drawJunctions = /* @__PURE__ */ __name(function(e, O, k, A) {
377
+ k.forEach((k) => {
378
+ let j = O.append("g"), M = e.getConfigField("iconSize");
379
+ j.append("g").append("rect").attr("id", `${A}-node-${k.id}`).attr("fill-opacity", "0").attr("width", M).attr("height", M), j.attr("class", "architecture-junction");
380
+ let { width: N, height: P } = j._groups[0][0].getBBox();
381
+ j.width = N, j.height = P, e.setElementForId(k.id, j);
382
382
  });
383
383
  }, "drawJunctions");
384
384
  registerIconPacks([{
385
385
  name: architectureIcons.prefix,
386
386
  icons: architectureIcons
387
387
  }]), cytoscape.use(import_cytoscape_fcose.default);
388
- function addServices(e, A, j) {
388
+ function addServices(e, O, k) {
389
389
  e.forEach((e) => {
390
- A.add({
390
+ O.add({
391
391
  group: "nodes",
392
392
  data: {
393
393
  type: "service",
@@ -395,40 +395,40 @@ function addServices(e, A, j) {
395
395
  icon: e.icon,
396
396
  label: e.title,
397
397
  parent: e.in,
398
- width: j.getConfigField("iconSize"),
399
- height: j.getConfigField("iconSize")
398
+ width: k.getConfigField("iconSize"),
399
+ height: k.getConfigField("iconSize")
400
400
  },
401
401
  classes: "node-service"
402
402
  });
403
403
  });
404
404
  }
405
405
  __name(addServices, "addServices");
406
- function addJunctions(e, A, j) {
406
+ function addJunctions(e, O, k) {
407
407
  e.forEach((e) => {
408
- A.add({
408
+ O.add({
409
409
  group: "nodes",
410
410
  data: {
411
411
  type: "junction",
412
412
  id: e.id,
413
413
  parent: e.in,
414
- width: j.getConfigField("iconSize"),
415
- height: j.getConfigField("iconSize")
414
+ width: k.getConfigField("iconSize"),
415
+ height: k.getConfigField("iconSize")
416
416
  },
417
417
  classes: "node-junction"
418
418
  });
419
419
  });
420
420
  }
421
421
  __name(addJunctions, "addJunctions");
422
- function positionNodes(e, A) {
423
- A.nodes().map((A) => {
424
- let j = nodeData(A);
425
- j.type !== "group" && (j.x = A.position().x, j.y = A.position().y, e.getElementById(j.id).attr("transform", "translate(" + (j.x || 0) + "," + (j.y || 0) + ")"));
422
+ function positionNodes(e, O) {
423
+ O.nodes().map((O) => {
424
+ let k = nodeData(O);
425
+ k.type !== "group" && (k.x = O.position().x, k.y = O.position().y, e.getElementById(k.id).attr("transform", "translate(" + (k.x || 0) + "," + (k.y || 0) + ")"));
426
426
  });
427
427
  }
428
428
  __name(positionNodes, "positionNodes");
429
- function addGroups(e, A) {
429
+ function addGroups(e, O) {
430
430
  e.forEach((e) => {
431
- A.add({
431
+ O.add({
432
432
  group: "nodes",
433
433
  data: {
434
434
  type: "group",
@@ -442,103 +442,103 @@ function addGroups(e, A) {
442
442
  });
443
443
  }
444
444
  __name(addGroups, "addGroups");
445
- function addEdges(e, A) {
445
+ function addEdges(e, O) {
446
446
  e.forEach((e) => {
447
- let { lhsId: j, rhsId: M, lhsInto: N, lhsGroup: P, rhsInto: F, lhsDir: I, rhsDir: L, rhsGroup: R, title: z } = e, B = isArchitectureDirectionXY(e.lhsDir, e.rhsDir) ? "segments" : "straight", V = {
448
- id: `${j}-${M}`,
449
- label: z,
450
- source: j,
451
- sourceDir: I,
452
- sourceArrow: N,
453
- sourceGroup: P,
454
- sourceEndpoint: I === "L" ? "0 50%" : I === "R" ? "100% 50%" : I === "T" ? "50% 0" : "50% 100%",
455
- target: M,
456
- targetDir: L,
457
- targetArrow: F,
458
- targetGroup: R,
459
- targetEndpoint: L === "L" ? "0 50%" : L === "R" ? "100% 50%" : L === "T" ? "50% 0" : "50% 100%"
447
+ let { lhsId: k, rhsId: A, lhsInto: j, lhsGroup: M, rhsInto: N, lhsDir: P, rhsDir: F, rhsGroup: I, title: L } = e, R = isArchitectureDirectionXY(e.lhsDir, e.rhsDir) ? "segments" : "straight", z = {
448
+ id: `${k}-${A}`,
449
+ label: L,
450
+ source: k,
451
+ sourceDir: P,
452
+ sourceArrow: j,
453
+ sourceGroup: M,
454
+ sourceEndpoint: P === "L" ? "0 50%" : P === "R" ? "100% 50%" : P === "T" ? "50% 0" : "50% 100%",
455
+ target: A,
456
+ targetDir: F,
457
+ targetArrow: N,
458
+ targetGroup: I,
459
+ targetEndpoint: F === "L" ? "0 50%" : F === "R" ? "100% 50%" : F === "T" ? "50% 0" : "50% 100%"
460
460
  };
461
- A.add({
461
+ O.add({
462
462
  group: "edges",
463
- data: V,
464
- classes: B
463
+ data: z,
464
+ classes: R
465
465
  });
466
466
  });
467
467
  }
468
468
  __name(addEdges, "addEdges");
469
- function getAlignments(e, j, M) {
470
- let N = /* @__PURE__ */ __name((e, A) => Object.entries(e).reduce((e, [j, N]) => {
471
- let P = 0, F = Object.entries(N);
472
- if (F.length === 1) return e[j] = F[0][1], e;
473
- for (let N = 0; N < F.length - 1; N++) for (let I = N + 1; I < F.length; I++) {
474
- let [L, R] = F[N], [z, B] = F[I];
475
- if (M[L]?.[z] === A) e[j] ??= [], e[j] = [
476
- ...e[j],
477
- ...R,
478
- ...B
469
+ function getAlignments(e, k, A) {
470
+ let j = /* @__PURE__ */ __name((e, O) => Object.entries(e).reduce((e, [k, j]) => {
471
+ let M = 0, N = Object.entries(j);
472
+ if (N.length === 1) return e[k] = N[0][1], e;
473
+ for (let j = 0; j < N.length - 1; j++) for (let P = j + 1; P < N.length; P++) {
474
+ let [F, I] = N[j], [L, R] = N[P];
475
+ if (A[F]?.[L] === O) e[k] ??= [], e[k] = [
476
+ ...e[k],
477
+ ...I,
478
+ ...R
479
479
  ];
480
- else if (L === "default" || z === "default") e[j] ??= [], e[j] = [
481
- ...e[j],
482
- ...R,
483
- ...B
480
+ else if (F === "default" || L === "default") e[k] ??= [], e[k] = [
481
+ ...e[k],
482
+ ...I,
483
+ ...R
484
484
  ];
485
485
  else {
486
- let A = `${j}-${P++}`;
486
+ let O = `${k}-${M++}`;
487
+ e[O] = I;
488
+ let A = `${k}-${M++}`;
487
489
  e[A] = R;
488
- let M = `${j}-${P++}`;
489
- e[M] = B;
490
490
  }
491
491
  }
492
492
  return e;
493
- }, {}), "flattenAlignments"), [P, F] = j.map((A) => {
494
- let j = {}, M = {};
495
- return Object.entries(A).forEach(([A, [N, P]]) => {
496
- let F = e.getNode(A)?.in ?? "default";
497
- j[P] ??= {}, j[P][F] ??= [], j[P][F].push(A), M[N] ??= {}, M[N][F] ??= [], M[N][F].push(A);
493
+ }, {}), "flattenAlignments"), [M, N] = k.map((O) => {
494
+ let k = {}, A = {};
495
+ return Object.entries(O).forEach(([O, [j, M]]) => {
496
+ let N = e.getNode(O)?.in ?? "default";
497
+ k[M] ??= {}, k[M][N] ??= [], k[M][N].push(O), A[j] ??= {}, A[j][N] ??= [], A[j][N].push(O);
498
498
  }), {
499
- horiz: Object.values(N(j, "horizontal")).filter((e) => e.length > 1),
500
- vert: Object.values(N(M, "vertical")).filter((e) => e.length > 1)
499
+ horiz: Object.values(j(k, "horizontal")).filter((e) => e.length > 1),
500
+ vert: Object.values(j(A, "vertical")).filter((e) => e.length > 1)
501
501
  };
502
- }).reduce(([e, A], { horiz: j, vert: M }) => [[...e, ...j], [...A, ...M]], [[], []]);
502
+ }).reduce(([e, O], { horiz: k, vert: A }) => [[...e, ...k], [...O, ...A]], [[], []]);
503
503
  return {
504
- horizontal: P,
505
- vertical: F
504
+ horizontal: M,
505
+ vertical: N
506
506
  };
507
507
  }
508
508
  __name(getAlignments, "getAlignments");
509
- function getRelativeConstraints(e, j) {
510
- let M = [], N = /* @__PURE__ */ __name((e) => `${e[0]},${e[1]}`, "posToStr"), P = /* @__PURE__ */ __name((e) => e.split(",").map((e) => parseInt(e)), "strToPos");
509
+ function getRelativeConstraints(e, k) {
510
+ let A = [], j = /* @__PURE__ */ __name((e) => `${e[0]},${e[1]}`, "posToStr"), M = /* @__PURE__ */ __name((e) => e.split(",").map((e) => parseInt(e)), "strToPos");
511
511
  return e.forEach((e) => {
512
- let A = Object.fromEntries(Object.entries(e).map(([e, A]) => [N(A), e])), F = [N([0, 0])], I = {}, L = {
512
+ let O = Object.fromEntries(Object.entries(e).map(([e, O]) => [j(O), e])), N = [j([0, 0])], P = {}, F = {
513
513
  L: [-1, 0],
514
514
  R: [1, 0],
515
515
  T: [0, 1],
516
516
  B: [0, -1]
517
517
  };
518
- for (; F.length > 0;) {
519
- let e = F.shift();
518
+ for (; N.length > 0;) {
519
+ let e = N.shift();
520
520
  if (e) {
521
- I[e] = 1;
522
- let R = A[e];
523
- if (R) {
524
- let z = P(e);
525
- Object.entries(L).forEach(([e, P]) => {
526
- let L = N([z[0] + P[0], z[1] + P[1]]), B = A[L];
527
- B && !I[L] && (F.push(L), M.push({
528
- [ArchitectureDirectionName[e]]: B,
529
- [ArchitectureDirectionName[getOppositeArchitectureDirection(e)]]: R,
530
- gap: 1.5 * j.getConfigField("iconSize")
521
+ P[e] = 1;
522
+ let I = O[e];
523
+ if (I) {
524
+ let L = M(e);
525
+ Object.entries(F).forEach(([e, M]) => {
526
+ let F = j([L[0] + M[0], L[1] + M[1]]), R = O[F];
527
+ R && !P[F] && (N.push(F), A.push({
528
+ [ArchitectureDirectionName[e]]: R,
529
+ [ArchitectureDirectionName[getOppositeArchitectureDirection(e)]]: I,
530
+ gap: 1.5 * k.getConfigField("iconSize")
531
531
  }));
532
532
  });
533
533
  }
534
534
  }
535
535
  }
536
- }), M;
536
+ }), A;
537
537
  }
538
538
  __name(getRelativeConstraints, "getRelativeConstraints");
539
- function layoutArchitecture(e, M, N, P, F, { spatialMaps: I, groupAlignments: L }) {
540
- return new Promise((R) => {
541
- let z = select_default("body").append("div").attr("id", "cy").attr("style", "display:none"), B = cytoscape({
539
+ function layoutArchitecture(e, A, j, M, N, { spatialMaps: P, groupAlignments: F }) {
540
+ return new Promise((I) => {
541
+ let L = select_default("body").append("div").attr("id", "cy").attr("style", "display:none"), R = cytoscape({
542
542
  container: document.getElementById("cy"),
543
543
  style: [
544
544
  {
@@ -573,7 +573,7 @@ function layoutArchitecture(e, M, N, P, F, { spatialMaps: I, groupAlignments: L
573
573
  style: {
574
574
  "text-valign": "bottom",
575
575
  "text-halign": "center",
576
- "font-size": `${F.getConfigField("fontSize")}px`
576
+ "font-size": `${N.getConfigField("fontSize")}px`
577
577
  }
578
578
  },
579
579
  {
@@ -593,7 +593,7 @@ function layoutArchitecture(e, M, N, P, F, { spatialMaps: I, groupAlignments: L
593
593
  },
594
594
  {
595
595
  selector: ".node-group",
596
- style: { padding: `${F.getConfigField("padding")}px` }
596
+ style: { padding: `${N.getConfigField("padding")}px` }
597
597
  }
598
598
  ],
599
599
  layout: {
@@ -606,65 +606,67 @@ function layoutArchitecture(e, M, N, P, F, { spatialMaps: I, groupAlignments: L
606
606
  }
607
607
  }
608
608
  });
609
- z.remove(), addGroups(N, B), addServices(e, B, F), addJunctions(M, B, F), addEdges(P, B);
610
- let V = getAlignments(F, I, L), H = getRelativeConstraints(I, F), U = B.layout({
609
+ L.remove(), addGroups(j, R), addServices(e, R, N), addJunctions(A, R, N), addEdges(M, R);
610
+ let z = getAlignments(N, P, F), B = getRelativeConstraints(P, N), V = N.getConfigField("iconSize"), U = N.getConfigField("idealEdgeLengthMultiplier") * V, W = .5 * V, G = N.getConfigField("edgeElasticity"), K = R.layout({
611
611
  name: "fcose",
612
612
  quality: "proof",
613
- randomize: F.getConfigField("randomize"),
613
+ randomize: N.getConfigField("randomize"),
614
+ nodeSeparation: N.getConfigField("nodeSeparation"),
615
+ numIter: N.getConfigField("numIter"),
614
616
  styleEnabled: !1,
615
617
  animate: !1,
616
618
  nodeDimensionsIncludeLabels: !1,
617
619
  idealEdgeLength(e) {
618
- let [A, j] = e.connectedNodes(), { parent: M } = nodeData(A), { parent: N } = nodeData(j);
619
- return M === N ? 1.5 * F.getConfigField("iconSize") : .5 * F.getConfigField("iconSize");
620
+ let [O, k] = e.connectedNodes(), { parent: A } = nodeData(O), { parent: j } = nodeData(k);
621
+ return A === j ? U : W;
620
622
  },
621
623
  edgeElasticity(e) {
622
- let [A, j] = e.connectedNodes(), { parent: M } = nodeData(A), { parent: N } = nodeData(j);
623
- return M === N ? .45 : .001;
624
+ let [O, k] = e.connectedNodes(), { parent: A } = nodeData(O), { parent: j } = nodeData(k);
625
+ return A === j ? G : .001;
624
626
  },
625
- alignmentConstraint: V,
626
- relativePlacementConstraint: H
627
+ alignmentConstraint: z,
628
+ relativePlacementConstraint: B
627
629
  });
628
- U.one("layoutstop", () => {
629
- function e(e, A, j, M) {
630
- let N, P, { x: F, y: I } = e, { x: L, y: R } = A;
631
- P = (M - I + (F - j) * (I - R) / (F - L)) / Math.sqrt(1 + ((I - R) / (F - L)) ** 2), N = Math.sqrt((M - I) ** 2 + (j - F) ** 2 - P ** 2);
632
- let z = Math.sqrt((L - F) ** 2 + (R - I) ** 2);
633
- N /= z;
634
- let B = (L - F) * (M - I) - (R - I) * (j - F);
630
+ K.one("layoutstop", () => {
631
+ function e(e, O, k, A) {
632
+ let j, M, { x: N, y: P } = e, { x: F, y: I } = O;
633
+ M = (A - P + (N - k) * (P - I) / (N - F)) / Math.sqrt(1 + ((P - I) / (N - F)) ** 2), j = Math.sqrt((A - P) ** 2 + (k - N) ** 2 - M ** 2);
634
+ let L = Math.sqrt((F - N) ** 2 + (I - P) ** 2);
635
+ j /= L;
636
+ let R = (F - N) * (A - P) - (I - P) * (k - N);
635
637
  switch (!0) {
636
- case B >= 0:
637
- B = 1;
638
+ case R >= 0:
639
+ R = 1;
638
640
  break;
639
- case B < 0:
640
- B = -1;
641
+ case R < 0:
642
+ R = -1;
641
643
  break;
642
644
  }
643
- let V = (L - F) * (j - F) + (R - I) * (M - I);
645
+ let z = (F - N) * (k - N) + (I - P) * (A - P);
644
646
  switch (!0) {
645
- case V >= 0:
646
- V = 1;
647
+ case z >= 0:
648
+ z = 1;
647
649
  break;
648
- case V < 0:
649
- V = -1;
650
+ case z < 0:
651
+ z = -1;
650
652
  break;
651
653
  }
652
- return P = Math.abs(P) * B, N *= V, {
653
- distances: P,
654
- weights: N
654
+ return M = Math.abs(M) * R, j *= z, {
655
+ distances: M,
656
+ weights: j
655
657
  };
656
658
  }
657
- __name(e, "getSegmentWeights"), B.startBatch();
658
- for (let A of Object.values(B.edges())) if (A.data?.()) {
659
- let { x: j, y: M } = A.source().position(), { x: N, y: P } = A.target().position();
660
- if (j !== N && M !== P) {
661
- let j = A.sourceEndpoint(), M = A.targetEndpoint(), { sourceDir: N } = edgeData(A), [P, F] = isArchitectureDirectionY(N) ? [j.x, M.y] : [M.x, j.y], { weights: I, distances: L } = e(j, M, P, F);
662
- A.style("segment-distances", L), A.style("segment-weights", I);
659
+ __name(e, "getSegmentWeights"), R.startBatch();
660
+ for (let O of Object.values(R.edges())) if (O.data?.()) {
661
+ let { x: k, y: A } = O.source().position(), { x: j, y: M } = O.target().position();
662
+ if (k !== j && A !== M) {
663
+ let k = O.sourceEndpoint(), A = O.targetEndpoint(), { sourceDir: j } = edgeData(O), [M, N] = isArchitectureDirectionY(j) ? [k.x, A.y] : [A.x, k.y], { weights: P, distances: F } = e(k, A, M, N);
664
+ O.style("segment-distances", F), O.style("segment-weights", P);
663
665
  }
664
666
  }
665
- B.endBatch(), U.run();
666
- }), U.run(), B.ready((e) => {
667
- log.info("Ready", e), R(B);
667
+ R.endBatch(), K.run();
668
+ }), K.run(), R.ready((e) => {
669
+ log.info("Ready", e), I(R);
668
670
  });
669
671
  });
670
672
  }
@@ -674,17 +676,17 @@ var diagram = {
674
676
  get db() {
675
677
  return new ArchitectureDB();
676
678
  },
677
- renderer: { draw: /* @__PURE__ */ __name(async (e, A, j, M) => {
678
- let N = M.db;
679
- N.setDiagramId(A);
680
- let P = N.getServices(), F = N.getJunctions(), I = N.getGroups(), L = N.getEdges(), R = N.getDataStructures(), z = selectSvgElement(A), B = z.append("g");
681
- B.attr("class", "architecture-edges");
682
- let V = z.append("g");
683
- V.attr("class", "architecture-services");
684
- let H = z.append("g");
685
- H.attr("class", "architecture-groups"), await drawServices(N, V, P, A), drawJunctions(N, V, F, A);
686
- let W = await layoutArchitecture(P, F, I, L, N, R);
687
- await drawEdges(B, W, N, A), await drawGroups(H, W, N, A), positionNodes(N, W), setupGraphViewbox(void 0, z, N.getConfigField("padding"), N.getConfigField("useMaxWidth"));
679
+ renderer: { draw: /* @__PURE__ */ __name(async (e, O, k, A) => {
680
+ let j = A.db;
681
+ j.setDiagramId(O);
682
+ let M = j.getServices(), N = j.getJunctions(), P = j.getGroups(), F = j.getEdges(), I = j.getDataStructures(), L = selectSvgElement(O), R = L.append("g");
683
+ R.attr("class", "architecture-edges");
684
+ let z = L.append("g");
685
+ z.attr("class", "architecture-services");
686
+ let B = L.append("g");
687
+ B.attr("class", "architecture-groups"), await drawServices(j, z, M, O), drawJunctions(j, z, N, O);
688
+ let H = await layoutArchitecture(M, N, P, F, j, I);
689
+ await drawEdges(R, H, j, O), await drawGroups(B, H, j, O), positionNodes(j, H), setupGraphViewbox(void 0, L, j.getConfigField("padding"), j.getConfigField("useMaxWidth"));
688
690
  }, "draw") },
689
691
  styles: architectureStyles_default
690
692
  };