@vunk/plus 1.6.11 → 1.7.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 (321) hide show
  1. package/components/_baseUniq-BXtq6_NW.mjs +239 -0
  2. package/components/abap-B7h4dtBh.mjs +6 -0
  3. package/components/actionscript-3-Bmm7RA3Y.mjs +6 -0
  4. package/components/ada-BZS802Se.mjs +6 -0
  5. package/components/agent-chat-provider/index.d.ts +1 -0
  6. package/components/agent-chat-provider/index.mjs +74 -39
  7. package/components/agent-chat-provider/src/MessageView.d.ts +29 -0
  8. package/components/agent-chat-provider/src/types.d.ts +12 -6
  9. package/components/agent-chat-provider/src/use.d.ts +5 -4
  10. package/components/andromeeda-CrngpmZk.mjs +3 -0
  11. package/components/apache-D4roVlsU.mjs +6 -0
  12. package/components/apex-D6mfw0H5.mjs +6 -0
  13. package/components/apl-DDK-VObo.mjs +18 -0
  14. package/components/applescript-C43Knf0G.mjs +6 -0
  15. package/components/ara-DRBH84ND.mjs +6 -0
  16. package/components/arc-Js_tyW10.mjs +131 -0
  17. package/components/architecture-O4VJ6CD3-ZoZ2IAk2.mjs +13 -0
  18. package/components/architectureDiagram-SUXI7LT5-kyYGGrHN.mjs +8676 -0
  19. package/components/asm-3tg4MVib.mjs +6 -0
  20. package/components/astro-v4FYbRud.mjs +19 -0
  21. package/components/aurora-x-wJ4-eM2h.mjs +3 -0
  22. package/components/awk-ChreaG-G.mjs +6 -0
  23. package/components/ayu-dark-BEKp3oqs.mjs +3 -0
  24. package/components/ballerina-B0yt0TYU.mjs +6 -0
  25. package/components/batch-Ce_EX3Sx.mjs +14 -0
  26. package/components/beancount-BRIsdQEB.mjs +6 -0
  27. package/components/berry-Brv4WWdL.mjs +14 -0
  28. package/components/bibtex-BLeFwAes.mjs +6 -0
  29. package/components/bicep-BVrgfErX.mjs +6 -0
  30. package/components/blade-By3Sw_Ex.mjs +22 -0
  31. package/components/blockDiagram-6J76NXCF-IAr4zDV3.mjs +3608 -0
  32. package/components/broadcasting-markdown/src/howler-speech.vue.d.ts +1 -1
  33. package/components/broadcasting-markdown/src/index.vue.d.ts +3 -3
  34. package/components/bubble-list/index.css +22 -0
  35. package/components/bubble-list/index.mjs +7 -134
  36. package/components/bubble-list/src/ctx.d.ts +0 -4
  37. package/components/bubble-list/src/index.vue.d.ts +169 -525
  38. package/components/bubble-templates/index.d.ts +2 -1
  39. package/components/bubble-templates/index.mjs +11438 -101
  40. package/components/bubble-templates/src/core.d.ts +69 -0
  41. package/components/bubble-templates/src/index.vue.d.ts +133 -486
  42. package/components/bubble-templates/src/legacy.vue.d.ts +153 -0
  43. package/components/bubble-templates/src/types.d.ts +13 -8
  44. package/components/c-C4VtT7JA.mjs +6 -0
  45. package/components/c4Diagram-6F6E4RAY-Dv27rXcJ.mjs +2490 -0
  46. package/components/catppuccin-frappe-zLMNRRUx.mjs +3 -0
  47. package/components/catppuccin-latte-CdF5jC3c.mjs +3 -0
  48. package/components/catppuccin-macchiato-DyjXeyRt.mjs +3 -0
  49. package/components/catppuccin-mocha-66IdYxR8.mjs +3 -0
  50. package/components/cdc-30ktANo3.mjs +14 -0
  51. package/components/channel-BBZy6zOT.mjs +7 -0
  52. package/components/chat-independent/index.mjs +4 -4
  53. package/components/chat-independent/src/index.vue.d.ts +194 -550
  54. package/components/chunk-353BL4L5-Dn_Y_Yna.mjs +17 -0
  55. package/components/chunk-67H74DCK-Br5U8bfD.mjs +102 -0
  56. package/components/chunk-AACKK3MU-DH_MKxca.mjs +17 -0
  57. package/components/chunk-BFAMUDN2-DHLCoYMN.mjs +13 -0
  58. package/components/chunk-E2GYISFI-DQPHyyga.mjs +19 -0
  59. package/components/chunk-OW32GOEJ-CQOSE6Bn.mjs +1924 -0
  60. package/components/chunk-SKB7J2MH-BlwHRDiW.mjs +25 -0
  61. package/components/chunk-SZ463SBG-DEp8buKJ.mjs +1823 -0
  62. package/components/clarity-6uBl6Vpb.mjs +6 -0
  63. package/components/classDiagram-M3E45YP4-D0ySDe-v.mjs +30 -0
  64. package/components/classDiagram-v2-YAWTLIQI-D0ySDe-v.mjs +30 -0
  65. package/components/clojure-COBRmwo8.mjs +14 -0
  66. package/components/clone-CEJtuQzg.mjs +8 -0
  67. package/components/cmake-CDfQILeU.mjs +6 -0
  68. package/components/cobol-BOOIiISO.mjs +13 -0
  69. package/components/coffee-DO_RGoZp.mjs +9 -0
  70. package/components/cpp-DAK8ktHO.mjs +25 -0
  71. package/components/crystal-CBGbbyVp.mjs +19 -0
  72. package/components/cs-h3ksD6-P.mjs +14 -0
  73. package/components/css-BtVcDqlU.mjs +6 -0
  74. package/components/cue-BFSVLV6N.mjs +6 -0
  75. package/components/cypher-Dl2CXoXF.mjs +14 -0
  76. package/components/cytoscape.esm-BojS1z60.mjs +30216 -0
  77. package/components/d-9qSZPw74.mjs +6 -0
  78. package/components/dagre-JOIXM2OF-5zx0JY2T.mjs +705 -0
  79. package/components/dark-plus-DmZ1Dzd4.mjs +3 -0
  80. package/components/dart-CCSsOg9l.mjs +6 -0
  81. package/components/dax-CvsmLV-B.mjs +6 -0
  82. package/components/defaultLocale-DVr69WTU.mjs +202 -0
  83. package/components/diagram-5UYTHUR4-C19nyAKc.mjs +213 -0
  84. package/components/diagram-VMROVX33-DkGwo-hj.mjs +859 -0
  85. package/components/diagram-ZTM2IBQH-CBgHCu9L.mjs +315 -0
  86. package/components/diff-BEdzuHlE.mjs +6 -0
  87. package/components/dockerfile-B3DP334t.mjs +14 -0
  88. package/components/dracula-B8-AVrwI.mjs +3 -0
  89. package/components/dracula-soft-BHeefow7.mjs +3 -0
  90. package/components/dream-maker-CNLQpoF-.mjs +6 -0
  91. package/components/elixir-0rTCSSfp.mjs +11 -0
  92. package/components/elm-BhwiZPvf.mjs +10 -0
  93. package/components/erDiagram-3M52JZNH-cttdAJXW.mjs +1167 -0
  94. package/components/erb-Lra8TlYM.mjs +27 -0
  95. package/components/erlang-D2NNgvtR.mjs +17 -0
  96. package/components/everforest-dark-Cg1xdODP.mjs +3 -0
  97. package/components/everforest-light-BmTD3bxe.mjs +3 -0
  98. package/components/fish-BU5HSdZy.mjs +6 -0
  99. package/components/flowDiagram-KYDEHFYC-9HpsqDdB.mjs +2343 -0
  100. package/components/fs-CdBSddpF.mjs +17 -0
  101. package/components/ganttDiagram-EK5VF46D-8QB3ofs6.mjs +3495 -0
  102. package/components/gdresource-CAbkn6H_.mjs +11 -0
  103. package/components/gdscript-Be_cubqt.mjs +6 -0
  104. package/components/gdshader-BEzE4j_3.mjs +6 -0
  105. package/components/gherkin-xCNF9gh8.mjs +6 -0
  106. package/components/git-commit-PP9xCApN.mjs +9 -0
  107. package/components/git-rebase-DqdGofLo.mjs +9 -0
  108. package/components/gitGraph-ZV4HHKMB-BSmtVGRu.mjs +13 -0
  109. package/components/gitGraphDiagram-GW3U2K7C-DNzc0Vx_.mjs +1225 -0
  110. package/components/github-dark-O22yVQaY.mjs +3 -0
  111. package/components/github-dark-default-DB2Hkvqn.mjs +3 -0
  112. package/components/github-dark-dimmed-CMZ_OfqC.mjs +3 -0
  113. package/components/github-dark-high-contrast-DmxWVmCU.mjs +3 -0
  114. package/components/github-light-BTbR9xVK.mjs +3 -0
  115. package/components/github-light-default-DWEonwFe.mjs +3 -0
  116. package/components/github-light-high-contrast-WJ_cPDts.mjs +3 -0
  117. package/components/glimmer-js-BkPYTyD4.mjs +23 -0
  118. package/components/glsl-CGsiYPcu.mjs +9 -0
  119. package/components/gnuplot-tV8vezdE.mjs +6 -0
  120. package/components/go-CBmVHZBz.mjs +6 -0
  121. package/components/graph-3zJxsO-i.mjs +425 -0
  122. package/components/graphql-D4pgneW3.mjs +15 -0
  123. package/components/groovy-Bn4MhXgW.mjs +6 -0
  124. package/components/gruvbox-dark-hard-C89wZ4s3.mjs +3 -0
  125. package/components/gruvbox-dark-medium-swz85q_b.mjs +3 -0
  126. package/components/gruvbox-dark-soft-BYHBHQJW.mjs +3 -0
  127. package/components/gruvbox-light-hard-DEF_ZxYZ.mjs +3 -0
  128. package/components/gruvbox-light-medium-ziUMnHJx.mjs +3 -0
  129. package/components/gruvbox-light-soft-Cuwp0tsB.mjs +3 -0
  130. package/components/gts-d3WsqAZM.mjs +23 -0
  131. package/components/hack-CwaBuF5l.mjs +13 -0
  132. package/components/haml-gLijj4rW.mjs +11 -0
  133. package/components/hbs-CFi5SpI3.mjs +23 -0
  134. package/components/hcl-axoq0Ycu.mjs +6 -0
  135. package/components/hjson-I7LcauIB.mjs +6 -0
  136. package/components/hlsl-TRzjajlb.mjs +6 -0
  137. package/components/houston-CF_ws8Cq.mjs +3 -0
  138. package/components/hs-DXSGqUFF.mjs +14 -0
  139. package/components/html-CLq-n30c.mjs +11 -0
  140. package/components/html-derivative-C8POX8SL.mjs +9 -0
  141. package/components/http-BYUKZ6kX.mjs +20 -0
  142. package/components/imba-C4923lSV.mjs +6 -0
  143. package/components/index3.mjs +79526 -0
  144. package/components/info-63CPKGFF-C8sYWczU.mjs +13 -0
  145. package/components/infoDiagram-LHK5PUON-C-vFFPTf.mjs +42 -0
  146. package/components/init-ZxktEp_H.mjs +15 -0
  147. package/components/java-BfXh-0uJ.mjs +6 -0
  148. package/components/jinja-html-BmW4v_vu.mjs +11 -0
  149. package/components/jison-C9kAT_Oj.mjs +9 -0
  150. package/components/journeyDiagram-EWQZEKCU-BJrw4-AG.mjs +1262 -0
  151. package/components/js-CN_xSsjU.mjs +14 -0
  152. package/components/json-TjWBGEk1.mjs +6 -0
  153. package/components/json5-DCGCKrmX.mjs +6 -0
  154. package/components/jsonc-DLVLp8id.mjs +6 -0
  155. package/components/jsonl-B-R_pDGg.mjs +6 -0
  156. package/components/jsonnet-Cs8BnnC6.mjs +6 -0
  157. package/components/jssm-D_YBQ_cM.mjs +14 -0
  158. package/components/jsx-BPmvoin2.mjs +6 -0
  159. package/components/julia-C-JjBobP.mjs +19 -0
  160. package/components/kanagawa-dragon-DU8n2NNT.mjs +3 -0
  161. package/components/kanagawa-lotus-Byd0CDet.mjs +3 -0
  162. package/components/kanagawa-wave-DExoagcR.mjs +3 -0
  163. package/components/kanban-definition-ZSS6B67P-BptAnqU-.mjs +1057 -0
  164. package/components/kotlin-BM2ZNTMh.mjs +6 -0
  165. package/components/kusto-D9MF7CZf.mjs +14 -0
  166. package/components/laserwave-DF03wMlf.mjs +3 -0
  167. package/components/latex-BsqkLZB_.mjs +10 -0
  168. package/components/layout-sGZIJplX.mjs +2043 -0
  169. package/components/less-BAzLMJNR.mjs +6 -0
  170. package/components/light-plus-DS08Xg5J.mjs +3 -0
  171. package/components/linear-DqgVh5FN.mjs +336 -0
  172. package/components/liquid-f2VHt0dg.mjs +15 -0
  173. package/components/lisp-DAq1kaby.mjs +6 -0
  174. package/components/logo-D9l7oEJ8.mjs +6 -0
  175. package/components/lua-CH3ttzl_.mjs +9 -0
  176. package/components/makefile-D2qLe7q0.mjs +14 -0
  177. package/components/marko-DwRyI_--.mjs +15 -0
  178. package/components/material-theme-B8B2U48Q.mjs +3 -0
  179. package/components/material-theme-darker-BV0iY_T3.mjs +3 -0
  180. package/components/material-theme-lighter-DrzybSTF.mjs +3 -0
  181. package/components/material-theme-ocean-BRPLVReX.mjs +3 -0
  182. package/components/material-theme-palenight-DSJwsR_D.mjs +3 -0
  183. package/components/matlab-7XHduepk.mjs +6 -0
  184. package/components/md-BIvDPr-W.mjs +14 -0
  185. package/components/mdc-Rx6hWSHn.mjs +16 -0
  186. package/components/mdx-D5wExp-O.mjs +6 -0
  187. package/components/mermaid-CUjtoYEe.mjs +6 -0
  188. package/components/mermaid-parser.core-CH9ryA1K.mjs +16987 -0
  189. package/components/mermaid.core-CAqkCmS1.mjs +20975 -0
  190. package/components/metahuman-broadcasting/src/index.vue.d.ts +3 -3
  191. package/components/min-BngCxx8g.mjs +109 -0
  192. package/components/min-dark-BNaN9fWk.mjs +3 -0
  193. package/components/min-light-CMrjentn.mjs +3 -0
  194. package/components/mindmap-definition-6CBA2TL7-Cp_EeEsh.mjs +5854 -0
  195. package/components/mojo-CrbF881p.mjs +6 -0
  196. package/components/monokai-DelygWXa.mjs +3 -0
  197. package/components/narrat-DOwkIbBe.mjs +14 -0
  198. package/components/nf-DHfvJ2gH.mjs +14 -0
  199. package/components/nginx-B_jWsywZ.mjs +10 -0
  200. package/components/night-owl-DSS199ra.mjs +3 -0
  201. package/components/nim-yzbnZKJd.mjs +22 -0
  202. package/components/nix--3K2gyjg.mjs +6 -0
  203. package/components/nord-CvDbBq5M.mjs +3 -0
  204. package/components/objective-c-DkOBZg1J.mjs +14 -0
  205. package/components/objective-cpp-DEoN9Fe5.mjs +6 -0
  206. package/components/ocaml-B1kfGk9Y.mjs +6 -0
  207. package/components/one-dark-pro-CsMf0BoJ.mjs +3 -0
  208. package/components/one-light-BwwAsfsj.mjs +3 -0
  209. package/components/ordinal-DSZU4PqD.mjs +76 -0
  210. package/components/packet-HUATNLJX-bfFWFja0.mjs +13 -0
  211. package/components/pascal-CU8Kjkr_.mjs +6 -0
  212. package/components/perl-FH6su6vZ.mjs +18 -0
  213. package/components/php-Dnl1TfYH.mjs +20 -0
  214. package/components/pie-WTHONI2E-QPrWs3SR.mjs +13 -0
  215. package/components/pieDiagram-NIOCPIFQ-C46Y_4C6.mjs +248 -0
  216. package/components/plastic-BjwMpBc0.mjs +3 -0
  217. package/components/plsql-B3Na24V4.mjs +6 -0
  218. package/components/poimandres-ChWyhPrn.mjs +3 -0
  219. package/components/postcss-kj1IbjVd.mjs +6 -0
  220. package/components/powerquery-B-e1fO-k.mjs +6 -0
  221. package/components/prisma-bmxcSDxq.mjs +6 -0
  222. package/components/prolog-BT9GCzqD.mjs +6 -0
  223. package/components/properties-D6yKO1eW.mjs +14 -0
  224. package/components/proto-BIXM0k1a.mjs +6 -0
  225. package/components/ps1-aFyNx8UH.mjs +18 -0
  226. package/components/pug-BrOx0bSt.mjs +21 -0
  227. package/components/puppet-N15G4Usj.mjs +6 -0
  228. package/components/purescript-DrwsEYNH.mjs +6 -0
  229. package/components/python-D2s92fRP.mjs +14 -0
  230. package/components/ql-DTm-NCRo.mjs +14 -0
  231. package/components/quadrantDiagram-2OG54O6I-Dgf6d6F_.mjs +1347 -0
  232. package/components/r-oprfD2-9.mjs +6 -0
  233. package/components/radar-NJJJXTRR-BnUCJhQL.mjs +13 -0
  234. package/components/raku-xArQd_rF.mjs +14 -0
  235. package/components/razor-BoXCAbWQ.mjs +13 -0
  236. package/components/red-DByOl5N0.mjs +3 -0
  237. package/components/reg-CULnG2WX.mjs +6 -0
  238. package/components/rel-CHRwzjd4.mjs +6 -0
  239. package/components/requirementDiagram-QOLK2EJ7-CSF6N7HA.mjs +1171 -0
  240. package/components/riscv-BNQ9cVpw.mjs +6 -0
  241. package/components/rose-pine-LL9gXmP2.mjs +3 -0
  242. package/components/rose-pine-dawn-CH9zdisO.mjs +3 -0
  243. package/components/rose-pine-moon-B1oKSfEJ.mjs +3 -0
  244. package/components/rst-bEtD1v7N.mjs +36 -0
  245. package/components/ruby-BmfBy6EV.mjs +44 -0
  246. package/components/rust-Bf_fdNdL.mjs +14 -0
  247. package/components/sankeyDiagram-4UZDY2LN-BAHB7dMS.mjs +1199 -0
  248. package/components/sas-BLBgC3TA.mjs +9 -0
  249. package/components/sass-BheygBdF.mjs +6 -0
  250. package/components/scala-B-_7vFVn.mjs +6 -0
  251. package/components/scheme-BSHdPinv.mjs +6 -0
  252. package/components/scss-Dq-LbI_c.mjs +9 -0
  253. package/components/sender/src/index.vue.d.ts +3 -3
  254. package/components/sequenceDiagram-SKLFT4DO-10gLJ50N.mjs +3422 -0
  255. package/components/shaderlab-BOQRTiQi.mjs +17 -0
  256. package/components/shellsession-Cu3c0QAc.mjs +17 -0
  257. package/components/slack-dark-BEe10hxO.mjs +3 -0
  258. package/components/slack-ochin-BKmu9pBc.mjs +3 -0
  259. package/components/smalltalk-qxcGy4fT.mjs +6 -0
  260. package/components/snazzy-light-Dcvd-ZyI.mjs +3 -0
  261. package/components/solarized-dark-BBl5y5sR.mjs +3 -0
  262. package/components/solarized-light-DW9b_AY8.mjs +3 -0
  263. package/components/solidity-CewKZgp-.mjs +6 -0
  264. package/components/sparql-DswowMAp.mjs +9 -0
  265. package/components/splunk-gK6Iw_P9.mjs +14 -0
  266. package/components/sql-DzUuSofg.mjs +6 -0
  267. package/components/ssh-config-Bk_I5wDR.mjs +6 -0
  268. package/components/stata-Dl7wDdBE.mjs +9 -0
  269. package/components/stateDiagram-MI5ZYTHO-D6p6nCaj.mjs +459 -0
  270. package/components/stateDiagram-v2-5AN5P6BG-DaN5hC-t.mjs +29 -0
  271. package/components/stylus-qRNkxrFU.mjs +14 -0
  272. package/components/svelte-B9qv3vkS.mjs +15 -0
  273. package/components/swift-BRQRsam8.mjs +6 -0
  274. package/components/synthwave-84-CoUef9sh.mjs +3 -0
  275. package/components/system-verilog-BcESSvRn.mjs +6 -0
  276. package/components/table-columns/src/ctx.d.ts +2 -2
  277. package/components/table-columns/src/el-ctx.d.ts +2 -2
  278. package/components/table-columns/src/index.vue.d.ts +4 -4
  279. package/components/tables-v1/src/ctx.d.ts +3 -3
  280. package/components/tables-v1/src/index.vue.d.ts +9 -9
  281. package/components/tables-v1-checkbox/src/ctx.d.ts +3 -3
  282. package/components/tables-v1-checkbox/src/index.vue.d.ts +17 -17
  283. package/components/tasl-DfOr2qHi.mjs +6 -0
  284. package/components/tcl-CTsc4-t7.mjs +6 -0
  285. package/components/tex-CumJx1zu.mjs +9 -0
  286. package/components/text/src/ctx.d.ts +1 -1
  287. package/components/text/src/index.vue.d.ts +1 -1
  288. package/components/timeline-definition-MYPXXCX6-gLqnWxDu.mjs +1234 -0
  289. package/components/tokyo-night-DjtLpAEY.mjs +3 -0
  290. package/components/toml-vHPzWDj6.mjs +6 -0
  291. package/components/treemap-75Q7IDZK-B2atdfMH.mjs +13 -0
  292. package/components/tsx-CmGGo4Hm.mjs +6 -0
  293. package/components/turtle-BnC7StHY.mjs +6 -0
  294. package/components/twig-0XKNpXN1.mjs +35 -0
  295. package/components/typescript-CgxwwAuC.mjs +14 -0
  296. package/components/v-Bmdjo9cy.mjs +6 -0
  297. package/components/vb-DuF6ZenW.mjs +14 -0
  298. package/components/verilog-CCb_iTfF.mjs +6 -0
  299. package/components/vesper-4Q1cEwPL.mjs +3 -0
  300. package/components/vhdl-DMqk4T2s.mjs +6 -0
  301. package/components/vimscript-aKp9YbYm.mjs +18 -0
  302. package/components/vitesse-black-BqNLki8b.mjs +3 -0
  303. package/components/vitesse-dark-jJ32WhwH.mjs +3 -0
  304. package/components/vitesse-light-476zM4e6.mjs +3 -0
  305. package/components/vue-DVNNTw2l.mjs +40 -0
  306. package/components/vue-html-Cr5wciIP.mjs +16 -0
  307. package/components/vyper-DYedWgAE.mjs +14 -0
  308. package/components/wasm-BBh6f151.mjs +6 -0
  309. package/components/wasm-DDgzZJey.mjs +7 -0
  310. package/components/wenyan-BdqozpMZ.mjs +6 -0
  311. package/components/wgsl-Vo-hHVWH.mjs +6 -0
  312. package/components/wolfram-CRmjUoI4.mjs +6 -0
  313. package/components/xml-BMzZeaqs.mjs +9 -0
  314. package/components/xsl-CAhvzxWv.mjs +10 -0
  315. package/components/xychartDiagram-H2YORKM3-Whqa4ezL.mjs +1893 -0
  316. package/components/yml-BhSrWWMS.mjs +14 -0
  317. package/components/zenscript-DFINJL6j.mjs +6 -0
  318. package/components/zig-CS4FMAZp.mjs +6 -0
  319. package/components/zsh-hcK4TBd7.mjs +26 -0
  320. package/index.css +23 -0
  321. package/package.json +4 -1
@@ -0,0 +1,705 @@
1
+ import { _ as __name, au as markers_default, av as clear2, aw as clear, ax as clear$1, l as log, c as getConfig2, ay as updateNodeBounds, az as setNodeElem, ai as insertNode, an as getSubGraphTitleMargins, aj as positionNode, ah as insertCluster, aA as insertEdge, aB as positionEdgeLabel, aC as insertEdgeLabel } from './mermaid.core-CAqkCmS1.mjs';
2
+ import { G as Graph } from './graph-3zJxsO-i.mjs';
3
+ import { l as layout } from './layout-sGZIJplX.mjs';
4
+ import { B as isUndefined } from './index3.mjs';
5
+ import { c as clone } from './clone-CEJtuQzg.mjs';
6
+ import { m as map } from './min-BngCxx8g.mjs';
7
+ import 'vue';
8
+ import '@vunk/plus/components/bubble-templates';
9
+ import '@vunk/core/components/spread-to';
10
+ import 'element-plus';
11
+ import '@vunk/shared/function';
12
+ import './_plugin-vue_export-helper.mjs';
13
+ import '@vunk/plus/components/agent-chat-provider';
14
+ import './_baseUniq-BXtq6_NW.mjs';
15
+
16
+ function write(g) {
17
+ var json = {
18
+ options: {
19
+ directed: g.isDirected(),
20
+ multigraph: g.isMultigraph(),
21
+ compound: g.isCompound()
22
+ },
23
+ nodes: writeNodes(g),
24
+ edges: writeEdges(g)
25
+ };
26
+ if (!isUndefined(g.graph())) {
27
+ json.value = clone(g.graph());
28
+ }
29
+ return json;
30
+ }
31
+ function writeNodes(g) {
32
+ return map(g.nodes(), function(v) {
33
+ var nodeValue = g.node(v);
34
+ var parent = g.parent(v);
35
+ var node = { v };
36
+ if (!isUndefined(nodeValue)) {
37
+ node.value = nodeValue;
38
+ }
39
+ if (!isUndefined(parent)) {
40
+ node.parent = parent;
41
+ }
42
+ return node;
43
+ });
44
+ }
45
+ function writeEdges(g) {
46
+ return map(g.edges(), function(e) {
47
+ var edgeValue = g.edge(e);
48
+ var edge = { v: e.v, w: e.w };
49
+ if (!isUndefined(e.name)) {
50
+ edge.name = e.name;
51
+ }
52
+ if (!isUndefined(edgeValue)) {
53
+ edge.value = edgeValue;
54
+ }
55
+ return edge;
56
+ });
57
+ }
58
+ var clusterDb = /* @__PURE__ */ new Map();
59
+ var descendants = /* @__PURE__ */ new Map();
60
+ var parents = /* @__PURE__ */ new Map();
61
+ var clear4 = /* @__PURE__ */ __name(() => {
62
+ descendants.clear();
63
+ parents.clear();
64
+ clusterDb.clear();
65
+ }, "clear");
66
+ var isDescendant = /* @__PURE__ */ __name((id, ancestorId) => {
67
+ const ancestorDescendants = descendants.get(ancestorId) || [];
68
+ log.trace("In isDescendant", ancestorId, " ", id, " = ", ancestorDescendants.includes(id));
69
+ return ancestorDescendants.includes(id);
70
+ }, "isDescendant");
71
+ var edgeInCluster = /* @__PURE__ */ __name((edge, clusterId) => {
72
+ const clusterDescendants = descendants.get(clusterId) || [];
73
+ log.info("Descendants of ", clusterId, " is ", clusterDescendants);
74
+ log.info("Edge is ", edge);
75
+ if (edge.v === clusterId || edge.w === clusterId) {
76
+ return false;
77
+ }
78
+ if (!clusterDescendants) {
79
+ log.debug("Tilt, ", clusterId, ",not in descendants");
80
+ return false;
81
+ }
82
+ return clusterDescendants.includes(edge.v) || isDescendant(edge.v, clusterId) || isDescendant(edge.w, clusterId) || clusterDescendants.includes(edge.w);
83
+ }, "edgeInCluster");
84
+ var copy = /* @__PURE__ */ __name((clusterId, graph, newGraph, rootId) => {
85
+ log.warn(
86
+ "Copying children of ",
87
+ clusterId,
88
+ "root",
89
+ rootId,
90
+ "data",
91
+ graph.node(clusterId),
92
+ rootId
93
+ );
94
+ const nodes = graph.children(clusterId) || [];
95
+ if (clusterId !== rootId) {
96
+ nodes.push(clusterId);
97
+ }
98
+ log.warn("Copying (nodes) clusterId", clusterId, "nodes", nodes);
99
+ nodes.forEach((node) => {
100
+ if (graph.children(node).length > 0) {
101
+ copy(node, graph, newGraph, rootId);
102
+ } else {
103
+ const data = graph.node(node);
104
+ log.info("cp ", node, " to ", rootId, " with parent ", clusterId);
105
+ newGraph.setNode(node, data);
106
+ if (rootId !== graph.parent(node)) {
107
+ log.warn("Setting parent", node, graph.parent(node));
108
+ newGraph.setParent(node, graph.parent(node));
109
+ }
110
+ if (clusterId !== rootId && node !== clusterId) {
111
+ log.debug("Setting parent", node, clusterId);
112
+ newGraph.setParent(node, clusterId);
113
+ } else {
114
+ log.info("In copy ", clusterId, "root", rootId, "data", graph.node(clusterId), rootId);
115
+ log.debug(
116
+ "Not Setting parent for node=",
117
+ node,
118
+ "cluster!==rootId",
119
+ clusterId !== rootId,
120
+ "node!==clusterId",
121
+ node !== clusterId
122
+ );
123
+ }
124
+ const edges = graph.edges(node);
125
+ log.debug("Copying Edges", edges);
126
+ edges.forEach((edge) => {
127
+ log.info("Edge", edge);
128
+ const data2 = graph.edge(edge.v, edge.w, edge.name);
129
+ log.info("Edge data", data2, rootId);
130
+ try {
131
+ if (edgeInCluster(edge, rootId)) {
132
+ log.info("Copying as ", edge.v, edge.w, data2, edge.name);
133
+ newGraph.setEdge(edge.v, edge.w, data2, edge.name);
134
+ log.info("newGraph edges ", newGraph.edges(), newGraph.edge(newGraph.edges()[0]));
135
+ } else {
136
+ log.info(
137
+ "Skipping copy of edge ",
138
+ edge.v,
139
+ "-->",
140
+ edge.w,
141
+ " rootId: ",
142
+ rootId,
143
+ " clusterId:",
144
+ clusterId
145
+ );
146
+ }
147
+ } catch (e) {
148
+ log.error(e);
149
+ }
150
+ });
151
+ }
152
+ log.debug("Removing node", node);
153
+ graph.removeNode(node);
154
+ });
155
+ }, "copy");
156
+ var extractDescendants = /* @__PURE__ */ __name((id, graph) => {
157
+ const children = graph.children(id);
158
+ let res = [...children];
159
+ for (const child of children) {
160
+ parents.set(child, id);
161
+ res = [...res, ...extractDescendants(child, graph)];
162
+ }
163
+ return res;
164
+ }, "extractDescendants");
165
+ var findCommonEdges = /* @__PURE__ */ __name((graph, id1, id2) => {
166
+ const edges1 = graph.edges().filter((edge) => edge.v === id1 || edge.w === id1);
167
+ const edges2 = graph.edges().filter((edge) => edge.v === id2 || edge.w === id2);
168
+ const edges1Prim = edges1.map((edge) => {
169
+ return { v: edge.v === id1 ? id2 : edge.v, w: edge.w === id1 ? id1 : edge.w };
170
+ });
171
+ const edges2Prim = edges2.map((edge) => {
172
+ return { v: edge.v, w: edge.w };
173
+ });
174
+ const result = edges1Prim.filter((edgeIn1) => {
175
+ return edges2Prim.some((edge) => edgeIn1.v === edge.v && edgeIn1.w === edge.w);
176
+ });
177
+ return result;
178
+ }, "findCommonEdges");
179
+ var findNonClusterChild = /* @__PURE__ */ __name((id, graph, clusterId) => {
180
+ const children = graph.children(id);
181
+ log.trace("Searching children of id ", id, children);
182
+ if (children.length < 1) {
183
+ return id;
184
+ }
185
+ let reserve;
186
+ for (const child of children) {
187
+ const _id = findNonClusterChild(child, graph, clusterId);
188
+ const commonEdges = findCommonEdges(graph, clusterId, _id);
189
+ if (_id) {
190
+ if (commonEdges.length > 0) {
191
+ reserve = _id;
192
+ } else {
193
+ return _id;
194
+ }
195
+ }
196
+ }
197
+ return reserve;
198
+ }, "findNonClusterChild");
199
+ var getAnchorId = /* @__PURE__ */ __name((id) => {
200
+ if (!clusterDb.has(id)) {
201
+ return id;
202
+ }
203
+ if (!clusterDb.get(id).externalConnections) {
204
+ return id;
205
+ }
206
+ if (clusterDb.has(id)) {
207
+ return clusterDb.get(id).id;
208
+ }
209
+ return id;
210
+ }, "getAnchorId");
211
+ var adjustClustersAndEdges = /* @__PURE__ */ __name((graph, depth) => {
212
+ if (!graph || depth > 10) {
213
+ log.debug("Opting out, no graph ");
214
+ return;
215
+ } else {
216
+ log.debug("Opting in, graph ");
217
+ }
218
+ graph.nodes().forEach(function(id) {
219
+ const children = graph.children(id);
220
+ if (children.length > 0) {
221
+ log.warn(
222
+ "Cluster identified",
223
+ id,
224
+ " Replacement id in edges: ",
225
+ findNonClusterChild(id, graph, id)
226
+ );
227
+ descendants.set(id, extractDescendants(id, graph));
228
+ clusterDb.set(id, { id: findNonClusterChild(id, graph, id), clusterData: graph.node(id) });
229
+ }
230
+ });
231
+ graph.nodes().forEach(function(id) {
232
+ const children = graph.children(id);
233
+ const edges = graph.edges();
234
+ if (children.length > 0) {
235
+ log.debug("Cluster identified", id, descendants);
236
+ edges.forEach((edge) => {
237
+ const d1 = isDescendant(edge.v, id);
238
+ const d2 = isDescendant(edge.w, id);
239
+ if (d1 ^ d2) {
240
+ log.warn("Edge: ", edge, " leaves cluster ", id);
241
+ log.warn("Descendants of XXX ", id, ": ", descendants.get(id));
242
+ clusterDb.get(id).externalConnections = true;
243
+ }
244
+ });
245
+ } else {
246
+ log.debug("Not a cluster ", id, descendants);
247
+ }
248
+ });
249
+ for (let id of clusterDb.keys()) {
250
+ const nonClusterChild = clusterDb.get(id).id;
251
+ const parent = graph.parent(nonClusterChild);
252
+ if (parent !== id && clusterDb.has(parent) && !clusterDb.get(parent).externalConnections) {
253
+ clusterDb.get(id).id = parent;
254
+ }
255
+ }
256
+ graph.edges().forEach(function(e) {
257
+ const edge = graph.edge(e);
258
+ log.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e));
259
+ log.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(graph.edge(e)));
260
+ let v = e.v;
261
+ let w = e.w;
262
+ log.warn(
263
+ "Fix XXX",
264
+ clusterDb,
265
+ "ids:",
266
+ e.v,
267
+ e.w,
268
+ "Translating: ",
269
+ clusterDb.get(e.v),
270
+ " --- ",
271
+ clusterDb.get(e.w)
272
+ );
273
+ if (clusterDb.get(e.v) || clusterDb.get(e.w)) {
274
+ log.warn("Fixing and trying - removing XXX", e.v, e.w, e.name);
275
+ v = getAnchorId(e.v);
276
+ w = getAnchorId(e.w);
277
+ graph.removeEdge(e.v, e.w, e.name);
278
+ if (v !== e.v) {
279
+ const parent = graph.parent(v);
280
+ clusterDb.get(parent).externalConnections = true;
281
+ edge.fromCluster = e.v;
282
+ }
283
+ if (w !== e.w) {
284
+ const parent = graph.parent(w);
285
+ clusterDb.get(parent).externalConnections = true;
286
+ edge.toCluster = e.w;
287
+ }
288
+ log.warn("Fix Replacing with XXX", v, w, e.name);
289
+ graph.setEdge(v, w, edge, e.name);
290
+ }
291
+ });
292
+ log.warn("Adjusted Graph", write(graph));
293
+ extractor(graph, 0);
294
+ log.trace(clusterDb);
295
+ }, "adjustClustersAndEdges");
296
+ var extractor = /* @__PURE__ */ __name((graph, depth) => {
297
+ var _a, _b;
298
+ log.warn("extractor - ", depth, write(graph), graph.children("D"));
299
+ if (depth > 10) {
300
+ log.error("Bailing out");
301
+ return;
302
+ }
303
+ let nodes = graph.nodes();
304
+ let hasChildren = false;
305
+ for (const node of nodes) {
306
+ const children = graph.children(node);
307
+ hasChildren = hasChildren || children.length > 0;
308
+ }
309
+ if (!hasChildren) {
310
+ log.debug("Done, no node has children", graph.nodes());
311
+ return;
312
+ }
313
+ log.debug("Nodes = ", nodes, depth);
314
+ for (const node of nodes) {
315
+ log.debug(
316
+ "Extracting node",
317
+ node,
318
+ clusterDb,
319
+ clusterDb.has(node) && !clusterDb.get(node).externalConnections,
320
+ !graph.parent(node),
321
+ graph.node(node),
322
+ graph.children("D"),
323
+ " Depth ",
324
+ depth
325
+ );
326
+ if (!clusterDb.has(node)) {
327
+ log.debug("Not a cluster", node, depth);
328
+ } else if (!clusterDb.get(node).externalConnections && graph.children(node) && graph.children(node).length > 0) {
329
+ log.warn(
330
+ "Cluster without external connections, without a parent and with children",
331
+ node,
332
+ depth
333
+ );
334
+ const graphSettings = graph.graph();
335
+ let dir = graphSettings.rankdir === "TB" ? "LR" : "TB";
336
+ if ((_b = (_a = clusterDb.get(node)) == null ? void 0 : _a.clusterData) == null ? void 0 : _b.dir) {
337
+ dir = clusterDb.get(node).clusterData.dir;
338
+ log.warn("Fixing dir", clusterDb.get(node).clusterData.dir, dir);
339
+ }
340
+ const clusterGraph = new Graph({
341
+ multigraph: true,
342
+ compound: true
343
+ }).setGraph({
344
+ rankdir: dir,
345
+ nodesep: 50,
346
+ ranksep: 50,
347
+ marginx: 8,
348
+ marginy: 8
349
+ }).setDefaultEdgeLabel(function() {
350
+ return {};
351
+ });
352
+ log.warn("Old graph before copy", write(graph));
353
+ copy(node, graph, clusterGraph, node);
354
+ graph.setNode(node, {
355
+ clusterNode: true,
356
+ id: node,
357
+ clusterData: clusterDb.get(node).clusterData,
358
+ label: clusterDb.get(node).label,
359
+ graph: clusterGraph
360
+ });
361
+ log.warn("New graph after copy node: (", node, ")", write(clusterGraph));
362
+ log.debug("Old graph after copy", write(graph));
363
+ } else {
364
+ log.warn(
365
+ "Cluster ** ",
366
+ node,
367
+ " **not meeting the criteria !externalConnections:",
368
+ !clusterDb.get(node).externalConnections,
369
+ " no parent: ",
370
+ !graph.parent(node),
371
+ " children ",
372
+ graph.children(node) && graph.children(node).length > 0,
373
+ graph.children("D"),
374
+ depth
375
+ );
376
+ log.debug(clusterDb);
377
+ }
378
+ }
379
+ nodes = graph.nodes();
380
+ log.warn("New list of nodes", nodes);
381
+ for (const node of nodes) {
382
+ const data = graph.node(node);
383
+ log.warn(" Now next level", node, data);
384
+ if (data == null ? void 0 : data.clusterNode) {
385
+ extractor(data.graph, depth + 1);
386
+ }
387
+ }
388
+ }, "extractor");
389
+ var sorter = /* @__PURE__ */ __name((graph, nodes) => {
390
+ if (nodes.length === 0) {
391
+ return [];
392
+ }
393
+ let result = Object.assign([], nodes);
394
+ nodes.forEach((node) => {
395
+ const children = graph.children(node);
396
+ const sorted = sorter(graph, children);
397
+ result = [...result, ...sorted];
398
+ });
399
+ return result;
400
+ }, "sorter");
401
+ var sortNodesByHierarchy = /* @__PURE__ */ __name((graph) => sorter(graph, graph.children()), "sortNodesByHierarchy");
402
+ var recursiveRender = /* @__PURE__ */ __name(async (_elem, graph, diagramType, id, parentCluster, siteConfig) => {
403
+ log.warn("Graph in recursive render:XAX", write(graph), parentCluster);
404
+ const dir = graph.graph().rankdir;
405
+ log.trace("Dir in recursive render - dir:", dir);
406
+ const elem = _elem.insert("g").attr("class", "root");
407
+ if (!graph.nodes()) {
408
+ log.info("No nodes found for", graph);
409
+ } else {
410
+ log.info("Recursive render XXX", graph.nodes());
411
+ }
412
+ if (graph.edges().length > 0) {
413
+ log.info("Recursive edges", graph.edge(graph.edges()[0]));
414
+ }
415
+ const clusters = elem.insert("g").attr("class", "clusters");
416
+ const edgePaths = elem.insert("g").attr("class", "edgePaths");
417
+ const edgeLabels = elem.insert("g").attr("class", "edgeLabels");
418
+ const nodes = elem.insert("g").attr("class", "nodes");
419
+ await Promise.all(
420
+ graph.nodes().map(async function(v) {
421
+ const node = graph.node(v);
422
+ if (parentCluster !== void 0) {
423
+ const data = JSON.parse(JSON.stringify(parentCluster.clusterData));
424
+ log.trace(
425
+ "Setting data for parent cluster XXX\n Node.id = ",
426
+ v,
427
+ "\n data=",
428
+ data.height,
429
+ "\nParent cluster",
430
+ parentCluster.height
431
+ );
432
+ graph.setNode(parentCluster.id, data);
433
+ if (!graph.parent(v)) {
434
+ log.trace("Setting parent", v, parentCluster.id);
435
+ graph.setParent(v, parentCluster.id, data);
436
+ }
437
+ }
438
+ log.info("(Insert) Node XXX" + v + ": " + JSON.stringify(graph.node(v)));
439
+ if (node == null ? void 0 : node.clusterNode) {
440
+ log.info("Cluster identified XBX", v, node.width, graph.node(v));
441
+ const { ranksep, nodesep } = graph.graph();
442
+ node.graph.setGraph({
443
+ ...node.graph.graph(),
444
+ ranksep: ranksep + 25,
445
+ nodesep
446
+ });
447
+ const o = await recursiveRender(
448
+ nodes,
449
+ node.graph,
450
+ diagramType,
451
+ id,
452
+ graph.node(v),
453
+ siteConfig
454
+ );
455
+ const newEl = o.elem;
456
+ updateNodeBounds(node, newEl);
457
+ node.diff = o.diff || 0;
458
+ log.info(
459
+ "New compound node after recursive render XAX",
460
+ v,
461
+ "width",
462
+ // node,
463
+ node.width,
464
+ "height",
465
+ node.height
466
+ // node.x,
467
+ // node.y
468
+ );
469
+ setNodeElem(newEl, node);
470
+ } else {
471
+ if (graph.children(v).length > 0) {
472
+ log.trace(
473
+ "Cluster - the non recursive path XBX",
474
+ v,
475
+ node.id,
476
+ node,
477
+ node.width,
478
+ "Graph:",
479
+ graph
480
+ );
481
+ log.trace(findNonClusterChild(node.id, graph));
482
+ clusterDb.set(node.id, { id: findNonClusterChild(node.id, graph), node });
483
+ } else {
484
+ log.trace("Node - the non recursive path XAX", v, nodes, graph.node(v), dir);
485
+ await insertNode(nodes, graph.node(v), { config: siteConfig, dir });
486
+ }
487
+ }
488
+ })
489
+ );
490
+ const processEdges = /* @__PURE__ */ __name(async () => {
491
+ const edgePromises = graph.edges().map(async function(e) {
492
+ const edge = graph.edge(e.v, e.w, e.name);
493
+ log.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e));
494
+ log.info("Edge " + e.v + " -> " + e.w + ": ", e, " ", JSON.stringify(graph.edge(e)));
495
+ log.info(
496
+ "Fix",
497
+ clusterDb,
498
+ "ids:",
499
+ e.v,
500
+ e.w,
501
+ "Translating: ",
502
+ clusterDb.get(e.v),
503
+ clusterDb.get(e.w)
504
+ );
505
+ await insertEdgeLabel(edgeLabels, edge);
506
+ });
507
+ await Promise.all(edgePromises);
508
+ }, "processEdges");
509
+ await processEdges();
510
+ log.info("Graph before layout:", JSON.stringify(write(graph)));
511
+ log.info("############################################# XXX");
512
+ log.info("### Layout ### XXX");
513
+ log.info("############################################# XXX");
514
+ layout(graph);
515
+ log.info("Graph after layout:", JSON.stringify(write(graph)));
516
+ let diff = 0;
517
+ let { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig);
518
+ await Promise.all(
519
+ sortNodesByHierarchy(graph).map(async function(v) {
520
+ var _a;
521
+ const node = graph.node(v);
522
+ log.info(
523
+ "Position XBX => " + v + ": (" + node.x,
524
+ "," + node.y,
525
+ ") width: ",
526
+ node.width,
527
+ " height: ",
528
+ node.height
529
+ );
530
+ if (node == null ? void 0 : node.clusterNode) {
531
+ node.y += subGraphTitleTotalMargin;
532
+ log.info(
533
+ "A tainted cluster node XBX1",
534
+ v,
535
+ node.id,
536
+ node.width,
537
+ node.height,
538
+ node.x,
539
+ node.y,
540
+ graph.parent(v)
541
+ );
542
+ clusterDb.get(node.id).node = node;
543
+ positionNode(node);
544
+ } else {
545
+ if (graph.children(v).length > 0) {
546
+ log.info(
547
+ "A pure cluster node XBX1",
548
+ v,
549
+ node.id,
550
+ node.x,
551
+ node.y,
552
+ node.width,
553
+ node.height,
554
+ graph.parent(v)
555
+ );
556
+ node.height += subGraphTitleTotalMargin;
557
+ graph.node(node.parentId);
558
+ const halfPadding = (node == null ? void 0 : node.padding) / 2 || 0;
559
+ const labelHeight = ((_a = node == null ? void 0 : node.labelBBox) == null ? void 0 : _a.height) || 0;
560
+ const offsetY = labelHeight - halfPadding || 0;
561
+ log.debug("OffsetY", offsetY, "labelHeight", labelHeight, "halfPadding", halfPadding);
562
+ await insertCluster(clusters, node);
563
+ clusterDb.get(node.id).node = node;
564
+ } else {
565
+ const parent = graph.node(node.parentId);
566
+ node.y += subGraphTitleTotalMargin / 2;
567
+ log.info(
568
+ "A regular node XBX1 - using the padding",
569
+ node.id,
570
+ "parent",
571
+ node.parentId,
572
+ node.width,
573
+ node.height,
574
+ node.x,
575
+ node.y,
576
+ "offsetY",
577
+ node.offsetY,
578
+ "parent",
579
+ parent,
580
+ parent == null ? void 0 : parent.offsetY,
581
+ node
582
+ );
583
+ positionNode(node);
584
+ }
585
+ }
586
+ })
587
+ );
588
+ graph.edges().forEach(function(e) {
589
+ const edge = graph.edge(e);
590
+ log.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(edge), edge);
591
+ edge.points.forEach((point) => point.y += subGraphTitleTotalMargin / 2);
592
+ const startNode = graph.node(e.v);
593
+ var endNode = graph.node(e.w);
594
+ const paths = insertEdge(edgePaths, edge, clusterDb, diagramType, startNode, endNode, id);
595
+ positionEdgeLabel(edge, paths);
596
+ });
597
+ graph.nodes().forEach(function(v) {
598
+ const n = graph.node(v);
599
+ log.info(v, n.type, n.diff);
600
+ if (n.isGroup) {
601
+ diff = n.diff;
602
+ }
603
+ });
604
+ log.warn("Returning from recursive render XAX", elem, diff);
605
+ return { elem, diff };
606
+ }, "recursiveRender");
607
+ var render = /* @__PURE__ */ __name(async (data4Layout, svg) => {
608
+ var _a, _b, _c, _d, _e, _f;
609
+ const graph = new Graph({
610
+ multigraph: true,
611
+ compound: true
612
+ }).setGraph({
613
+ rankdir: data4Layout.direction,
614
+ nodesep: ((_a = data4Layout.config) == null ? void 0 : _a.nodeSpacing) || ((_c = (_b = data4Layout.config) == null ? void 0 : _b.flowchart) == null ? void 0 : _c.nodeSpacing) || data4Layout.nodeSpacing,
615
+ ranksep: ((_d = data4Layout.config) == null ? void 0 : _d.rankSpacing) || ((_f = (_e = data4Layout.config) == null ? void 0 : _e.flowchart) == null ? void 0 : _f.rankSpacing) || data4Layout.rankSpacing,
616
+ marginx: 8,
617
+ marginy: 8
618
+ }).setDefaultEdgeLabel(function() {
619
+ return {};
620
+ });
621
+ const element = svg.select("g");
622
+ markers_default(element, data4Layout.markers, data4Layout.type, data4Layout.diagramId);
623
+ clear2();
624
+ clear();
625
+ clear$1();
626
+ clear4();
627
+ data4Layout.nodes.forEach((node) => {
628
+ graph.setNode(node.id, { ...node });
629
+ if (node.parentId) {
630
+ graph.setParent(node.id, node.parentId);
631
+ }
632
+ });
633
+ log.debug("Edges:", data4Layout.edges);
634
+ data4Layout.edges.forEach((edge) => {
635
+ if (edge.start === edge.end) {
636
+ const nodeId = edge.start;
637
+ const specialId1 = nodeId + "---" + nodeId + "---1";
638
+ const specialId2 = nodeId + "---" + nodeId + "---2";
639
+ const node = graph.node(nodeId);
640
+ graph.setNode(specialId1, {
641
+ domId: specialId1,
642
+ id: specialId1,
643
+ parentId: node.parentId,
644
+ labelStyle: "",
645
+ label: "",
646
+ padding: 0,
647
+ shape: "labelRect",
648
+ // shape: 'rect',
649
+ style: "",
650
+ width: 10,
651
+ height: 10
652
+ });
653
+ graph.setParent(specialId1, node.parentId);
654
+ graph.setNode(specialId2, {
655
+ domId: specialId2,
656
+ id: specialId2,
657
+ parentId: node.parentId,
658
+ labelStyle: "",
659
+ padding: 0,
660
+ // shape: 'rect',
661
+ shape: "labelRect",
662
+ label: "",
663
+ style: "",
664
+ width: 10,
665
+ height: 10
666
+ });
667
+ graph.setParent(specialId2, node.parentId);
668
+ const edge1 = structuredClone(edge);
669
+ const edgeMid = structuredClone(edge);
670
+ const edge2 = structuredClone(edge);
671
+ edge1.label = "";
672
+ edge1.arrowTypeEnd = "none";
673
+ edge1.id = nodeId + "-cyclic-special-1";
674
+ edgeMid.arrowTypeStart = "none";
675
+ edgeMid.arrowTypeEnd = "none";
676
+ edgeMid.id = nodeId + "-cyclic-special-mid";
677
+ edge2.label = "";
678
+ if (node.isGroup) {
679
+ edge1.fromCluster = nodeId;
680
+ edge2.toCluster = nodeId;
681
+ }
682
+ edge2.id = nodeId + "-cyclic-special-2";
683
+ edge2.arrowTypeStart = "none";
684
+ graph.setEdge(nodeId, specialId1, edge1, nodeId + "-cyclic-special-0");
685
+ graph.setEdge(specialId1, specialId2, edgeMid, nodeId + "-cyclic-special-1");
686
+ graph.setEdge(specialId2, nodeId, edge2, nodeId + "-cyc<lic-special-2");
687
+ } else {
688
+ graph.setEdge(edge.start, edge.end, { ...edge }, edge.id);
689
+ }
690
+ });
691
+ log.warn("Graph at first:", JSON.stringify(write(graph)));
692
+ adjustClustersAndEdges(graph);
693
+ log.warn("Graph after XAX:", JSON.stringify(write(graph)));
694
+ const siteConfig = getConfig2();
695
+ await recursiveRender(
696
+ element,
697
+ graph,
698
+ data4Layout.type,
699
+ data4Layout.diagramId,
700
+ void 0,
701
+ siteConfig
702
+ );
703
+ }, "render");
704
+
705
+ export { render };