@countermeasure-platform/web-components 1.2.1 → 1.2.2-dev.7.1

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 (302) hide show
  1. package/dist/{arc-jVbrWVYZ.js → arc-DOJ9myHo.js} +21 -21
  2. package/dist/{arc-jVbrWVYZ.js.map → arc-DOJ9myHo.js.map} +1 -1
  3. package/dist/architecture-7EHR7CIX-RjIwnEbG.js +3 -0
  4. package/dist/{architectureDiagram-2XIMDMQ5-D5q0ma9h.js → architectureDiagram-3BPJPVTR-cYFnhp15.js} +165 -152
  5. package/dist/{architectureDiagram-2XIMDMQ5-D5q0ma9h.js.map → architectureDiagram-3BPJPVTR-cYFnhp15.js.map} +1 -1
  6. package/dist/{array-DXadUs1s.js → array-BLp0zq5K.js} +1 -1
  7. package/dist/{array-DXadUs1s.js.map → array-BLp0zq5K.js.map} +1 -1
  8. package/dist/{blockDiagram-WCTKOSBZ-BH3jwWeU.js → blockDiagram-GPEHLZMM-DNLPMFXL.js} +994 -864
  9. package/dist/blockDiagram-GPEHLZMM-DNLPMFXL.js.map +1 -0
  10. package/dist/{c4Diagram-IC4MRINW-OFLrunYI.js → c4Diagram-AAUBKEIU-G8g3OBBg.js} +232 -235
  11. package/dist/c4Diagram-AAUBKEIU-G8g3OBBg.js.map +1 -0
  12. package/dist/channel-MTYqUJFm.js +7 -0
  13. package/dist/{channel-LRbq43st.js.map → channel-MTYqUJFm.js.map} +1 -1
  14. package/dist/{chunk-KX2RTZJC-d9jFqUAY.js → chunk-2J33WTMH-BKsVIUnb.js} +4 -4
  15. package/dist/{chunk-KX2RTZJC-d9jFqUAY.js.map → chunk-2J33WTMH-BKsVIUnb.js.map} +1 -1
  16. package/dist/chunk-3OPIFGDE-CcNRL44h.js +3669 -0
  17. package/dist/chunk-3OPIFGDE-CcNRL44h.js.map +1 -0
  18. package/dist/{chunk-4BX2VUAB-BS9gpN-y.js → chunk-4BX2VUAB-BeLKo9Pn.js} +2 -2
  19. package/dist/{chunk-4BX2VUAB-BS9gpN-y.js.map → chunk-4BX2VUAB-BeLKo9Pn.js.map} +1 -1
  20. package/dist/{chunk-R5LLSJPH-c1IfaK5D.js → chunk-4EGX6M5U-Bh9as06l.js} +13 -13
  21. package/dist/chunk-4EGX6M5U-Bh9as06l.js.map +1 -0
  22. package/dist/{chunk-55IACEB6-DZ-UBhHX.js → chunk-55IACEB6-CuKbiO89.js} +3 -3
  23. package/dist/{chunk-55IACEB6-DZ-UBhHX.js.map → chunk-55IACEB6-CuKbiO89.js.map} +1 -1
  24. package/dist/chunk-5DO6E6H7-CAB8pWf5.js +25 -0
  25. package/dist/chunk-5DO6E6H7-CAB8pWf5.js.map +1 -0
  26. package/dist/{chunk-GEFDOKGD-DGJJEGSm.js → chunk-5ZQYHXKU-CjOcwRY6.js} +570 -326
  27. package/dist/chunk-5ZQYHXKU-CjOcwRY6.js.map +1 -0
  28. package/dist/{chunk-WL4C6EOR-BV-op7zg.js → chunk-727SXJPM-kowsFLrz.js} +724 -569
  29. package/dist/chunk-727SXJPM-kowsFLrz.js.map +1 -0
  30. package/dist/{chunk-NQ4KR5QH-C0nWShNk.js → chunk-AQP2D5EJ-Bc1gUIeA.js} +384 -362
  31. package/dist/chunk-AQP2D5EJ-Bc1gUIeA.js.map +1 -0
  32. package/dist/{chunk-OZEHJAEY-BsQ56PV-.js → chunk-BR22UD5L-BCFxmd5-.js} +16 -16
  33. package/dist/chunk-BR22UD5L-BCFxmd5-.js.map +1 -0
  34. package/dist/{chunk-MX3YWQON-D43mcq1f.js → chunk-BSJP7CBP-Bl94i3-1.js} +7 -5
  35. package/dist/chunk-BSJP7CBP-Bl94i3-1.js.map +1 -0
  36. package/dist/chunk-CSCIHK7Q-DyRIc27i.js +2868 -0
  37. package/dist/chunk-CSCIHK7Q-DyRIc27i.js.map +1 -0
  38. package/dist/chunk-FHYWG6QK-kLWdRarG.js +25 -0
  39. package/dist/chunk-FHYWG6QK-kLWdRarG.js.map +1 -0
  40. package/dist/{chunk-FMBD7UC4-1IxrpdPX.js → chunk-FMBD7UC4-IdpWVRCU.js} +2 -2
  41. package/dist/{chunk-FMBD7UC4-1IxrpdPX.js.map → chunk-FMBD7UC4-IdpWVRCU.js.map} +1 -1
  42. package/dist/chunk-KSCS5N6A-CVcDS9QV.js +563 -0
  43. package/dist/chunk-KSCS5N6A-CVcDS9QV.js.map +1 -0
  44. package/dist/{chunk-YBOYWFTD-DkjEOcgZ.js → chunk-L5ZTLDWV-Day0EgsR.js} +9 -9
  45. package/dist/{chunk-YBOYWFTD-DkjEOcgZ.js.map → chunk-L5ZTLDWV-Day0EgsR.js.map} +1 -1
  46. package/dist/chunk-LZXEDZCA-BO_GpQSR.js +51 -0
  47. package/dist/chunk-LZXEDZCA-BO_GpQSR.js.map +1 -0
  48. package/dist/chunk-MPE355IW-BkN6MrMO.js +25 -0
  49. package/dist/chunk-MPE355IW-BkN6MrMO.js.map +1 -0
  50. package/dist/chunk-MZUSXYTE-94iWO-dh.js +32 -0
  51. package/dist/chunk-MZUSXYTE-94iWO-dh.js.map +1 -0
  52. package/dist/chunk-N66VUXT2-QbIUkiJZ.js +56 -0
  53. package/dist/chunk-N66VUXT2-QbIUkiJZ.js.map +1 -0
  54. package/dist/{chunk-JSJVCQXG-Do17yYig.js → chunk-ND2GUHAM-Boh7GenS.js} +6 -6
  55. package/dist/{chunk-JSJVCQXG-Do17yYig.js.map → chunk-ND2GUHAM-Boh7GenS.js.map} +1 -1
  56. package/dist/chunk-NNHCCRGN-CNU0zvRn.js +20603 -0
  57. package/dist/chunk-NNHCCRGN-CNU0zvRn.js.map +1 -0
  58. package/dist/{chunk-PQ6SQG4A-Cpfc5F4u.js → chunk-NZK2D7GU-D4Ird7wv.js} +4 -4
  59. package/dist/{chunk-PQ6SQG4A-Cpfc5F4u.js.map → chunk-NZK2D7GU-D4Ird7wv.js.map} +1 -1
  60. package/dist/{chunk-PU5JKC2W-DNpn_Yik.js → chunk-O5CBEL6O-DThtyjPO.js} +85 -74
  61. package/dist/{chunk-PU5JKC2W-DNpn_Yik.js.map → chunk-O5CBEL6O-DThtyjPO.js.map} +1 -1
  62. package/dist/chunk-PUPMXCY4-DsO2K8st.js +25 -0
  63. package/dist/chunk-PUPMXCY4-DsO2K8st.js.map +1 -0
  64. package/dist/{chunk-QZHKN3VN-kDNdTVLo.js → chunk-QZHKN3VN-DC5aJQQT.js} +2 -2
  65. package/dist/{chunk-QZHKN3VN-kDNdTVLo.js.map → chunk-QZHKN3VN-DC5aJQQT.js.map} +1 -1
  66. package/dist/chunk-UIBZB4QT-Cu3IcTk1.js +25 -0
  67. package/dist/chunk-UIBZB4QT-Cu3IcTk1.js.map +1 -0
  68. package/dist/chunk-WCWK7LTN-DpMt57Ty.js +33 -0
  69. package/dist/chunk-WCWK7LTN-DpMt57Ty.js.map +1 -0
  70. package/dist/chunk-WU5MYG2G-mzocEmS2.js +12 -0
  71. package/dist/{chunk-HHEYEP7N-DJ1b-gA8.js.map → chunk-WU5MYG2G-mzocEmS2.js.map} +1 -1
  72. package/dist/{chunk-XPW4576I-BqiPnb3d.js → chunk-XPW4576I-BwxN5U1_.js} +2 -2
  73. package/dist/{chunk-XPW4576I-BqiPnb3d.js.map → chunk-XPW4576I-BwxN5U1_.js.map} +1 -1
  74. package/dist/classDiagram-4FO5ZUOK-CZv04EX-.js +31 -0
  75. package/dist/{classDiagram-VBA2DB6C-DZfC0xPM.js.map → classDiagram-4FO5ZUOK-CZv04EX-.js.map} +1 -1
  76. package/dist/classDiagram-v2-Q7XG4LA2-aOPSPoxt.js +31 -0
  77. package/dist/{classDiagram-v2-RAHNMMFH-CtWRD1ax.js.map → classDiagram-v2-Q7XG4LA2-aOPSPoxt.js.map} +1 -1
  78. package/dist/component-Dye0I6sO.js +145 -0
  79. package/dist/component-Dye0I6sO.js.map +1 -0
  80. package/dist/components/brand/index.d.ts +8 -2
  81. package/dist/components/brand/index.d.ts.map +1 -1
  82. package/dist/components/brand/index.js +58 -31
  83. package/dist/components/brand/index.js.map +1 -1
  84. package/dist/components/brand/types.d.ts +8 -0
  85. package/dist/components/brand/types.d.ts.map +1 -1
  86. package/dist/{cose-bilkent-S5V4N54A-DxM02fly.js → cose-bilkent-S5V4N54A-D_hwzCJc.js} +7 -8
  87. package/dist/{cose-bilkent-S5V4N54A-DxM02fly.js.map → cose-bilkent-S5V4N54A-D_hwzCJc.js.map} +1 -1
  88. package/dist/{cytoscape.esm-2vKMh7AJ.js → cytoscape.esm-C85eXBIz.js} +1 -1
  89. package/dist/{cytoscape.esm-2vKMh7AJ.js.map → cytoscape.esm-C85eXBIz.js.map} +1 -1
  90. package/dist/dagre-BM42HDAG-DBqY2dVf.js +299 -0
  91. package/dist/dagre-BM42HDAG-DBqY2dVf.js.map +1 -0
  92. package/dist/dagre-IxFkiJHF.js +1938 -0
  93. package/dist/dagre-IxFkiJHF.js.map +1 -0
  94. package/dist/{defaultLocale-PLHpRrsr.js → defaultLocale-DSDxELFN.js} +1 -1
  95. package/dist/{defaultLocale-PLHpRrsr.js.map → defaultLocale-DSDxELFN.js.map} +1 -1
  96. package/dist/{diagram-IFDJBPK2-D-Enf1mK.js → diagram-2AECGRRQ-BwC5Qbme.js} +39 -39
  97. package/dist/{diagram-IFDJBPK2-D-Enf1mK.js.map → diagram-2AECGRRQ-BwC5Qbme.js.map} +1 -1
  98. package/dist/diagram-5GNKFQAL-BpJ9oZ4s.js +103 -0
  99. package/dist/diagram-5GNKFQAL-BpJ9oZ4s.js.map +1 -0
  100. package/dist/diagram-KO2AKTUF-kSLn21uw.js +434 -0
  101. package/dist/diagram-KO2AKTUF-kSLn21uw.js.map +1 -0
  102. package/dist/{diagram-P4PSJMXO-O8g_RIkM.js → diagram-LMA3HP47-BRqyGMLP.js} +43 -43
  103. package/dist/{diagram-P4PSJMXO-O8g_RIkM.js.map → diagram-LMA3HP47-BRqyGMLP.js.map} +1 -1
  104. package/dist/{diagram-E7M64L7V-Co7O3gub.js → diagram-OG6HWLK6-BsskLXHm.js} +171 -174
  105. package/dist/diagram-OG6HWLK6-BsskLXHm.js.map +1 -0
  106. package/dist/{dist-BrNloUiz.js → dist-BScrlPBC.js} +32 -23
  107. package/dist/dist-BScrlPBC.js.map +1 -0
  108. package/dist/{erDiagram-INFDFZHY-C42JeR9I.js → erDiagram-TEJ5UH35-DzB7hnCi.js} +198 -164
  109. package/dist/erDiagram-TEJ5UH35-DzB7hnCi.js.map +1 -0
  110. package/dist/eventmodeling-FCH6USID-HcA67HMu.js +3 -0
  111. package/dist/{flowDiagram-PKNHOUZH-DInJjOz3.js → flowDiagram-I6XJVG4X-RYkPtPRG.js} +453 -469
  112. package/dist/flowDiagram-I6XJVG4X-RYkPtPRG.js.map +1 -0
  113. package/dist/{ganttDiagram-A5KZAMGK-Dgp-4Yss.js → ganttDiagram-6RSMTGT7-BfjlFVNd.js} +340 -333
  114. package/dist/ganttDiagram-6RSMTGT7-BfjlFVNd.js.map +1 -0
  115. package/dist/gitGraph-WXDBUCRP-D60yP8mT.js +3 -0
  116. package/dist/gitGraphDiagram-PVQCEYII-DbUp_ElG.js +731 -0
  117. package/dist/gitGraphDiagram-PVQCEYII-DbUp_ElG.js.map +1 -0
  118. package/dist/graphlib-k-wJtbbK.js +1268 -0
  119. package/dist/graphlib-k-wJtbbK.js.map +1 -0
  120. package/dist/info-J43DQDTF-DDmtkMBG.js +3 -0
  121. package/dist/{infoDiagram-LFFYTUFH-DajJJRvc.js → infoDiagram-5YYISTIA-C0TqWTrr.js} +7 -7
  122. package/dist/{infoDiagram-LFFYTUFH-DajJJRvc.js.map → infoDiagram-5YYISTIA-C0TqWTrr.js.map} +1 -1
  123. package/dist/{init-DcLTaNW1.js → init-CGzIZb6J.js} +1 -1
  124. package/dist/{init-DcLTaNW1.js.map → init-CGzIZb6J.js.map} +1 -1
  125. package/dist/{ishikawaDiagram-PHBUUO56-qHBJm2LT.js → ishikawaDiagram-YF4QCWOH-Cyk_Antz.js} +98 -97
  126. package/dist/ishikawaDiagram-YF4QCWOH-Cyk_Antz.js.map +1 -0
  127. package/dist/{journeyDiagram-4ABVD52K-PgfYdoDM.js → journeyDiagram-JHISSGLW-CTl8eDDe.js} +78 -78
  128. package/dist/journeyDiagram-JHISSGLW-CTl8eDDe.js.map +1 -0
  129. package/dist/{kanban-definition-K7BYSVSG-DFRT8j7A.js → kanban-definition-UN3LZRKU-homeDoHF.js} +46 -44
  130. package/dist/{kanban-definition-K7BYSVSG-DFRT8j7A.js.map → kanban-definition-UN3LZRKU-homeDoHF.js.map} +1 -1
  131. package/dist/{katex-BZdHnXin.js → katex-CgkxVokH.js} +1 -1
  132. package/dist/{katex-BZdHnXin.js.map → katex-CgkxVokH.js.map} +1 -1
  133. package/dist/line-k_aZSToM.js +36 -0
  134. package/dist/{line-Cq1AZT4f.js.map → line-k_aZSToM.js.map} +1 -1
  135. package/dist/{linear-BnJD01Xn.js → linear-Dpcbf4VP.js} +5 -5
  136. package/dist/{linear-BnJD01Xn.js.map → linear-Dpcbf4VP.js.map} +1 -1
  137. package/dist/{mermaid-parser.core-Dz5qv4CI.js → mermaid-parser.core-B_q76LYz.js} +32 -17
  138. package/dist/mermaid-parser.core-B_q76LYz.js.map +1 -0
  139. package/dist/mermaid.core-DAh-gNcn.js +997 -0
  140. package/dist/mermaid.core-DAh-gNcn.js.map +1 -0
  141. package/dist/{mindmap-definition-YRQLILUH-D95OPRMh.js → mindmap-definition-RKZ34NQL-Cjglmmr7.js} +153 -108
  142. package/dist/mindmap-definition-RKZ34NQL-Cjglmmr7.js.map +1 -0
  143. package/dist/{ordinal-CC9tfh_g.js → ordinal-DHGdAr1Y.js} +2 -2
  144. package/dist/{ordinal-CC9tfh_g.js.map → ordinal-DHGdAr1Y.js.map} +1 -1
  145. package/dist/packet-YPE3B663-Bo9N32Mb.js +3 -0
  146. package/dist/{path-y0uQCOMW.js → path-D-DDb3Wo.js} +1 -1
  147. package/dist/{path-y0uQCOMW.js.map → path-D-DDb3Wo.js.map} +1 -1
  148. package/dist/pie-LRSECV5Y-DndCyILX.js +3 -0
  149. package/dist/pieDiagram-4H26LBE5-Swbny_uk.js +167 -0
  150. package/dist/pieDiagram-4H26LBE5-Swbny_uk.js.map +1 -0
  151. package/dist/{quadrantDiagram-337W2JSQ-CcKc-h2o.js → quadrantDiagram-W4KKPZXB-kyt1iJkC.js} +359 -332
  152. package/dist/quadrantDiagram-W4KKPZXB-kyt1iJkC.js.map +1 -0
  153. package/dist/radar-GUYGQ44K-DpLG1fRN.js +3 -0
  154. package/dist/react/brand/index.d.ts +13 -1
  155. package/dist/react/brand/index.d.ts.map +1 -1
  156. package/dist/react/brand.js +28 -3
  157. package/dist/react/brand.js.map +1 -1
  158. package/dist/react/sidebar.d.ts +22 -1
  159. package/dist/react/sidebar.d.ts.map +1 -1
  160. package/dist/react/sidebar.js +26 -2
  161. package/dist/react/sidebar.js.map +1 -1
  162. package/dist/react/topology.js +1 -1
  163. package/dist/react.js +100 -100
  164. package/dist/{requirementDiagram-Z7DCOOCP-aPcaPduF.js → requirementDiagram-4Y6WPE33-DWRks7dz.js} +153 -133
  165. package/dist/requirementDiagram-4Y6WPE33-DWRks7dz.js.map +1 -0
  166. package/dist/{rough.esm-C9rQ9YkE.js → rough.esm-C7tiDdBn.js} +1 -1
  167. package/dist/{rough.esm-C9rQ9YkE.js.map → rough.esm-C7tiDdBn.js.map} +1 -1
  168. package/dist/{sankeyDiagram-WA2Y5GQK-CO_lUqQX.js → sankeyDiagram-5OEKKPKP-J_SVMd-0.js} +125 -76
  169. package/dist/{sankeyDiagram-WA2Y5GQK-CO_lUqQX.js.map → sankeyDiagram-5OEKKPKP-J_SVMd-0.js.map} +1 -1
  170. package/dist/sequenceDiagram-3UESZ5HK-BMhjbe8U.js +4167 -0
  171. package/dist/sequenceDiagram-3UESZ5HK-BMhjbe8U.js.map +1 -0
  172. package/dist/sidebar/component.d.ts +4 -0
  173. package/dist/sidebar/component.d.ts.map +1 -1
  174. package/dist/sidebar/index.d.ts +1 -1
  175. package/dist/sidebar/index.d.ts.map +1 -1
  176. package/dist/sidebar/index.js +1 -1
  177. package/dist/sidebar/index.js.map +1 -1
  178. package/dist/sidebar/types.d.ts +39 -0
  179. package/dist/sidebar/types.d.ts.map +1 -1
  180. package/dist/{src-D1EMXotX.js → src-CWnvxuyh.js} +603 -591
  181. package/dist/{src-D1EMXotX.js.map → src-CWnvxuyh.js.map} +1 -1
  182. package/dist/{src-BhNgmpel.js → src-DngnQkx_.js} +4 -5
  183. package/dist/{src-BhNgmpel.js.map → src-DngnQkx_.js.map} +1 -1
  184. package/dist/stateDiagram-AJRCARHV-x4JHehDk.js +220 -0
  185. package/dist/stateDiagram-AJRCARHV-x4JHehDk.js.map +1 -0
  186. package/dist/stateDiagram-v2-BHNVJYJU-CO93vpHl.js +29 -0
  187. package/dist/{stateDiagram-v2-FVOUBMTO-CAWy0Pkh.js.map → stateDiagram-v2-BHNVJYJU-CO93vpHl.js.map} +1 -1
  188. package/dist/styles/components/brand.css +30 -0
  189. package/dist/styles/sidebar.css +495 -0
  190. package/dist/{timeline-definition-YZTLITO2-CjxxCuOg.js → timeline-definition-PNZ67QCA-rsiMN1-p.js} +517 -279
  191. package/dist/timeline-definition-PNZ67QCA-rsiMN1-p.js.map +1 -0
  192. package/dist/{topology-C8cyIHlB.js → topology-B9Lv-y1-.js} +181 -182
  193. package/dist/{topology-C8cyIHlB.js.map → topology-B9Lv-y1-.js.map} +1 -1
  194. package/dist/treeView-BLDUP644-mJdM3Q6x.js +3 -0
  195. package/dist/treemap-LRROVOQU-BbNMhR6z.js +3 -0
  196. package/dist/{value-gSPnIECy.js → value-CnwEagIg.js} +2 -2
  197. package/dist/{value-gSPnIECy.js.map → value-CnwEagIg.js.map} +1 -1
  198. package/dist/{vennDiagram-LZ73GAT5-FqpGoq2s.js → vennDiagram-CIIHVFJN-JUCgWboO.js} +98 -98
  199. package/dist/{vennDiagram-LZ73GAT5-FqpGoq2s.js.map → vennDiagram-CIIHVFJN-JUCgWboO.js.map} +1 -1
  200. package/dist/visualization/mermaid-diagram/index.js +1 -1
  201. package/dist/wardley-L42UT6IY-DB53GwcN.js +3 -0
  202. package/dist/wardleyDiagram-YWT4CUSO-D9ZPcSHL.js +646 -0
  203. package/dist/wardleyDiagram-YWT4CUSO-D9ZPcSHL.js.map +1 -0
  204. package/dist/{xychartDiagram-JWTSCODW-BNEAK79X.js → xychartDiagram-2RQKCTM6-D3ufsY0S.js} +146 -143
  205. package/dist/{xychartDiagram-JWTSCODW-BNEAK79X.js.map → xychartDiagram-2RQKCTM6-D3ufsY0S.js.map} +1 -1
  206. package/package.json +1 -1
  207. package/src/components/brand/index.ts +63 -0
  208. package/src/components/brand/types.ts +9 -0
  209. package/src/react/brand/index.test.tsx +28 -0
  210. package/src/react/brand/index.tsx +38 -0
  211. package/src/react/sidebar.test.tsx +30 -0
  212. package/src/react/sidebar.tsx +52 -1
  213. package/src/sidebar/component.test.ts +109 -0
  214. package/src/sidebar/component.ts +136 -4
  215. package/src/sidebar/index.ts +1 -0
  216. package/src/sidebar/types.ts +40 -0
  217. package/src/styles/components/brand.css +30 -0
  218. package/src/styles/sidebar.css +495 -0
  219. package/dist/_basePickBy-BQMPE4-n.js +0 -168
  220. package/dist/_basePickBy-BQMPE4-n.js.map +0 -1
  221. package/dist/_baseUniq-Bdp_vFUv.js +0 -684
  222. package/dist/_baseUniq-Bdp_vFUv.js.map +0 -1
  223. package/dist/architecture-PBZL5I3N-Zk3GmKE8.js +0 -3
  224. package/dist/blockDiagram-WCTKOSBZ-BH3jwWeU.js.map +0 -1
  225. package/dist/c4Diagram-IC4MRINW-OFLrunYI.js.map +0 -1
  226. package/dist/channel-LRbq43st.js +0 -7
  227. package/dist/chunk-7E7YKBS2-BsywoVTt.js +0 -25
  228. package/dist/chunk-7E7YKBS2-BsywoVTt.js.map +0 -1
  229. package/dist/chunk-7R4GIKGN-DJmroLCH.js +0 -2054
  230. package/dist/chunk-7R4GIKGN-DJmroLCH.js.map +0 -1
  231. package/dist/chunk-C72U2L5F-BwPwVDcP.js +0 -25
  232. package/dist/chunk-C72U2L5F-BwPwVDcP.js.map +0 -1
  233. package/dist/chunk-EGIJ26TM-DKd5cEgn.js +0 -25
  234. package/dist/chunk-EGIJ26TM-DKd5cEgn.js.map +0 -1
  235. package/dist/chunk-GEFDOKGD-DGJJEGSm.js.map +0 -1
  236. package/dist/chunk-GLR3WWYH-BDwmgwCA.js +0 -43
  237. package/dist/chunk-GLR3WWYH-BDwmgwCA.js.map +0 -1
  238. package/dist/chunk-HHEYEP7N-DJ1b-gA8.js +0 -12
  239. package/dist/chunk-KYZI473N-BXYCe83A.js +0 -3437
  240. package/dist/chunk-KYZI473N-BXYCe83A.js.map +0 -1
  241. package/dist/chunk-L3YUKLVL-Y5k8UNMf.js +0 -25
  242. package/dist/chunk-L3YUKLVL-Y5k8UNMf.js.map +0 -1
  243. package/dist/chunk-MX3YWQON-D43mcq1f.js.map +0 -1
  244. package/dist/chunk-NBPlniwU.js +0 -23
  245. package/dist/chunk-NQ4KR5QH-C0nWShNk.js.map +0 -1
  246. package/dist/chunk-O4XLMI2P-DtGEm9QX.js +0 -514
  247. package/dist/chunk-O4XLMI2P-DtGEm9QX.js.map +0 -1
  248. package/dist/chunk-OZEHJAEY-BsQ56PV-.js.map +0 -1
  249. package/dist/chunk-R5LLSJPH-c1IfaK5D.js.map +0 -1
  250. package/dist/chunk-WL4C6EOR-BV-op7zg.js.map +0 -1
  251. package/dist/chunk-XIRO2GV7-Bv1hlNLi.js +0 -32
  252. package/dist/chunk-XIRO2GV7-Bv1hlNLi.js.map +0 -1
  253. package/dist/chunk-XZSTWKYB-C7maKWEr.js +0 -15799
  254. package/dist/chunk-XZSTWKYB-C7maKWEr.js.map +0 -1
  255. package/dist/classDiagram-VBA2DB6C-DZfC0xPM.js +0 -31
  256. package/dist/classDiagram-v2-RAHNMMFH-CtWRD1ax.js +0 -31
  257. package/dist/clone-CliVdNc8.js +0 -10
  258. package/dist/clone-CliVdNc8.js.map +0 -1
  259. package/dist/component-C1Jiz1Ki.js +0 -103
  260. package/dist/component-C1Jiz1Ki.js.map +0 -1
  261. package/dist/dagre-BqC9mhMk.js +0 -1485
  262. package/dist/dagre-BqC9mhMk.js.map +0 -1
  263. package/dist/dagre-KLK3FWXG-DTKcsol6.js +0 -296
  264. package/dist/dagre-KLK3FWXG-DTKcsol6.js.map +0 -1
  265. package/dist/diagram-E7M64L7V-Co7O3gub.js.map +0 -1
  266. package/dist/dist-BrNloUiz.js.map +0 -1
  267. package/dist/erDiagram-INFDFZHY-C42JeR9I.js.map +0 -1
  268. package/dist/flowDiagram-PKNHOUZH-DInJjOz3.js.map +0 -1
  269. package/dist/ganttDiagram-A5KZAMGK-Dgp-4Yss.js.map +0 -1
  270. package/dist/gitGraph-HDMCJU4V-D_QsK6Rt.js +0 -3
  271. package/dist/gitGraphDiagram-K3NZZRJ6-Dr_X0dND.js +0 -628
  272. package/dist/gitGraphDiagram-K3NZZRJ6-Dr_X0dND.js.map +0 -1
  273. package/dist/graphlib-ecencZTG.js +0 -227
  274. package/dist/graphlib-ecencZTG.js.map +0 -1
  275. package/dist/info-3K5VOQVL-BbLiZXwn.js +0 -3
  276. package/dist/isArrayLikeObject-Bjsxaqj7.js +0 -580
  277. package/dist/isArrayLikeObject-Bjsxaqj7.js.map +0 -1
  278. package/dist/isEmpty-CeZZUVts.js +0 -37
  279. package/dist/isEmpty-CeZZUVts.js.map +0 -1
  280. package/dist/ishikawaDiagram-PHBUUO56-qHBJm2LT.js.map +0 -1
  281. package/dist/journeyDiagram-4ABVD52K-PgfYdoDM.js.map +0 -1
  282. package/dist/line-Cq1AZT4f.js +0 -36
  283. package/dist/math-D4gdAuwG.js +0 -12
  284. package/dist/math-D4gdAuwG.js.map +0 -1
  285. package/dist/mermaid-parser.core-Dz5qv4CI.js.map +0 -1
  286. package/dist/mermaid.core-DTiIXVKa.js +0 -923
  287. package/dist/mermaid.core-DTiIXVKa.js.map +0 -1
  288. package/dist/mindmap-definition-YRQLILUH-D95OPRMh.js.map +0 -1
  289. package/dist/packet-RMMSAZCW-D72DRs1N.js +0 -3
  290. package/dist/pie-UPGHQEXC-C8RDLrEi.js +0 -3
  291. package/dist/pieDiagram-SKSYHLDU-BREEn_Sk.js +0 -167
  292. package/dist/pieDiagram-SKSYHLDU-BREEn_Sk.js.map +0 -1
  293. package/dist/quadrantDiagram-337W2JSQ-CcKc-h2o.js.map +0 -1
  294. package/dist/radar-KQ55EAFF-DhmvjiyN.js +0 -3
  295. package/dist/requirementDiagram-Z7DCOOCP-aPcaPduF.js.map +0 -1
  296. package/dist/sequenceDiagram-2WXFIKYE-D7Vh1Zld.js +0 -4112
  297. package/dist/sequenceDiagram-2WXFIKYE-D7Vh1Zld.js.map +0 -1
  298. package/dist/stateDiagram-RAJIS63D-DdiY5cf3.js +0 -220
  299. package/dist/stateDiagram-RAJIS63D-DdiY5cf3.js.map +0 -1
  300. package/dist/stateDiagram-v2-FVOUBMTO-CAWy0Pkh.js +0 -29
  301. package/dist/timeline-definition-YZTLITO2-CjxxCuOg.js.map +0 -1
  302. package/dist/treemap-KZPCXAKY-BvLvHb2t.js +0 -3
@@ -1,296 +0,0 @@
1
- import { r as e } from "./_baseUniq-Bdp_vFUv.js";
2
- import { s as t } from "./_basePickBy-BQMPE4-n.js";
3
- import { t as n } from "./dagre-BqC9mhMk.js";
4
- import "./chunk-GEFDOKGD-DGJJEGSm.js";
5
- import { t as r } from "./clone-CliVdNc8.js";
6
- import { t as i } from "./graphlib-ecencZTG.js";
7
- import { n as a, r as o } from "./src-BhNgmpel.js";
8
- import { b as s } from "./chunk-7R4GIKGN-DJmroLCH.js";
9
- import "./chunk-PU5JKC2W-DNpn_Yik.js";
10
- import "./chunk-MX3YWQON-D43mcq1f.js";
11
- import { n as c } from "./chunk-YBOYWFTD-DkjEOcgZ.js";
12
- import "./chunk-PQ6SQG4A-Cpfc5F4u.js";
13
- import { a as l, c as u, i as d, l as f, n as p, t as m, u as h } from "./chunk-KYZI473N-BXYCe83A.js";
14
- import { a as g, i as _, n as v, r as y, t as b } from "./chunk-O4XLMI2P-DtGEm9QX.js";
15
- //#region node_modules/dagre-d3-es/src/graphlib/json.js
16
- function x(t) {
17
- var n = {
18
- options: {
19
- directed: t.isDirected(),
20
- multigraph: t.isMultigraph(),
21
- compound: t.isCompound()
22
- },
23
- nodes: S(t),
24
- edges: C(t)
25
- };
26
- return e(t.graph()) || (n.value = r(t.graph())), n;
27
- }
28
- function S(n) {
29
- return t(n.nodes(), function(t) {
30
- var r = n.node(t), i = n.parent(t), a = { v: t };
31
- return e(r) || (a.value = r), e(i) || (a.parent = i), a;
32
- });
33
- }
34
- function C(n) {
35
- return t(n.edges(), function(t) {
36
- var r = n.edge(t), i = {
37
- v: t.v,
38
- w: t.w
39
- };
40
- return e(t.name) || (i.name = t.name), e(r) || (i.value = r), i;
41
- });
42
- }
43
- //#endregion
44
- //#region node_modules/mermaid/dist/chunks/mermaid.core/dagre-KLK3FWXG.mjs
45
- var w = /* @__PURE__ */ new Map(), T = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map(), D = /* @__PURE__ */ a(() => {
46
- T.clear(), E.clear(), w.clear();
47
- }, "clear"), O = /* @__PURE__ */ a((e, t) => {
48
- let n = T.get(t) || [];
49
- return o.trace("In isDescendant", t, " ", e, " = ", n.includes(e)), n.includes(e);
50
- }, "isDescendant"), k = /* @__PURE__ */ a((e, t) => {
51
- let n = T.get(t) || [];
52
- return o.info("Descendants of ", t, " is ", n), o.info("Edge is ", e), e.v === t || e.w === t ? !1 : n ? n.includes(e.v) || O(e.v, t) || O(e.w, t) || n.includes(e.w) : (o.debug("Tilt, ", t, ",not in descendants"), !1);
53
- }, "edgeInCluster"), A = /* @__PURE__ */ a((e, t, n, r) => {
54
- o.warn("Copying children of ", e, "root", r, "data", t.node(e), r);
55
- let i = t.children(e) || [];
56
- e !== r && i.push(e), o.warn("Copying (nodes) clusterId", e, "nodes", i), i.forEach((i) => {
57
- if (t.children(i).length > 0) A(i, t, n, r);
58
- else {
59
- let a = t.node(i);
60
- o.info("cp ", i, " to ", r, " with parent ", e), n.setNode(i, a), r !== t.parent(i) && (o.warn("Setting parent", i, t.parent(i)), n.setParent(i, t.parent(i))), e !== r && i !== e ? (o.debug("Setting parent", i, e), n.setParent(i, e)) : (o.info("In copy ", e, "root", r, "data", t.node(e), r), o.debug("Not Setting parent for node=", i, "cluster!==rootId", e !== r, "node!==clusterId", i !== e));
61
- let s = t.edges(i);
62
- o.debug("Copying Edges", s), s.forEach((i) => {
63
- o.info("Edge", i);
64
- let a = t.edge(i.v, i.w, i.name);
65
- o.info("Edge data", a, r);
66
- try {
67
- k(i, r) ? (o.info("Copying as ", i.v, i.w, a, i.name), n.setEdge(i.v, i.w, a, i.name), o.info("newGraph edges ", n.edges(), n.edge(n.edges()[0]))) : o.info("Skipping copy of edge ", i.v, "-->", i.w, " rootId: ", r, " clusterId:", e);
68
- } catch (e) {
69
- o.error(e);
70
- }
71
- });
72
- }
73
- o.debug("Removing node", i), t.removeNode(i);
74
- });
75
- }, "copy"), j = /* @__PURE__ */ a((e, t) => {
76
- let n = t.children(e), r = [...n];
77
- for (let i of n) E.set(i, e), r = [...r, ...j(i, t)];
78
- return r;
79
- }, "extractDescendants"), M = /* @__PURE__ */ a((e, t, n) => {
80
- let r = e.edges().filter((e) => e.v === t || e.w === t), i = e.edges().filter((e) => e.v === n || e.w === n), a = r.map((e) => ({
81
- v: e.v === t ? n : e.v,
82
- w: e.w === t ? t : e.w
83
- })), o = i.map((e) => ({
84
- v: e.v,
85
- w: e.w
86
- }));
87
- return a.filter((e) => o.some((t) => e.v === t.v && e.w === t.w));
88
- }, "findCommonEdges"), N = /* @__PURE__ */ a((e, t, n) => {
89
- let r = t.children(e);
90
- if (o.trace("Searching children of id ", e, r), r.length < 1) return e;
91
- let i;
92
- for (let e of r) {
93
- let r = N(e, t, n), a = M(t, n, r);
94
- if (r) if (a.length > 0) i = r;
95
- else return r;
96
- }
97
- return i;
98
- }, "findNonClusterChild"), P = /* @__PURE__ */ a((e) => !w.has(e) || !w.get(e).externalConnections ? e : w.has(e) ? w.get(e).id : e, "getAnchorId"), F = /* @__PURE__ */ a((e, t) => {
99
- if (!e || t > 10) {
100
- o.debug("Opting out, no graph ");
101
- return;
102
- } else o.debug("Opting in, graph ");
103
- e.nodes().forEach(function(t) {
104
- e.children(t).length > 0 && (o.warn("Cluster identified", t, " Replacement id in edges: ", N(t, e, t)), T.set(t, j(t, e)), w.set(t, {
105
- id: N(t, e, t),
106
- clusterData: e.node(t)
107
- }));
108
- }), e.nodes().forEach(function(t) {
109
- let n = e.children(t), r = e.edges();
110
- n.length > 0 ? (o.debug("Cluster identified", t, T), r.forEach((e) => {
111
- O(e.v, t) ^ O(e.w, t) && (o.warn("Edge: ", e, " leaves cluster ", t), o.warn("Descendants of XXX ", t, ": ", T.get(t)), w.get(t).externalConnections = !0);
112
- })) : o.debug("Not a cluster ", t, T);
113
- });
114
- for (let t of w.keys()) {
115
- let n = w.get(t).id, r = e.parent(n);
116
- r !== t && w.has(r) && !w.get(r).externalConnections && (w.get(t).id = r);
117
- }
118
- e.edges().forEach(function(t) {
119
- let n = e.edge(t);
120
- o.warn("Edge " + t.v + " -> " + t.w + ": " + JSON.stringify(t)), o.warn("Edge " + t.v + " -> " + t.w + ": " + JSON.stringify(e.edge(t)));
121
- let r = t.v, i = t.w;
122
- if (o.warn("Fix XXX", w, "ids:", t.v, t.w, "Translating: ", w.get(t.v), " --- ", w.get(t.w)), w.get(t.v) || w.get(t.w)) {
123
- if (o.warn("Fixing and trying - removing XXX", t.v, t.w, t.name), r = P(t.v), i = P(t.w), e.removeEdge(t.v, t.w, t.name), r !== t.v) {
124
- let i = e.parent(r);
125
- w.get(i).externalConnections = !0, n.fromCluster = t.v;
126
- }
127
- if (i !== t.w) {
128
- let r = e.parent(i);
129
- w.get(r).externalConnections = !0, n.toCluster = t.w;
130
- }
131
- o.warn("Fix Replacing with XXX", r, i, t.name), e.setEdge(r, i, n, t.name);
132
- }
133
- }), o.warn("Adjusted Graph", x(e)), I(e, 0), o.trace(w);
134
- }, "adjustClustersAndEdges"), I = /* @__PURE__ */ a((e, t) => {
135
- if (o.warn("extractor - ", t, x(e), e.children("D")), t > 10) {
136
- o.error("Bailing out");
137
- return;
138
- }
139
- let n = e.nodes(), r = !1;
140
- for (let t of n) {
141
- let n = e.children(t);
142
- r ||= n.length > 0;
143
- }
144
- if (!r) {
145
- o.debug("Done, no node has children", e.nodes());
146
- return;
147
- }
148
- o.debug("Nodes = ", n, t);
149
- for (let r of n) if (o.debug("Extracting node", r, w, w.has(r) && !w.get(r).externalConnections, !e.parent(r), e.node(r), e.children("D"), " Depth ", t), !w.has(r)) o.debug("Not a cluster", r, t);
150
- else if (!w.get(r).externalConnections && e.children(r) && e.children(r).length > 0) {
151
- o.warn("Cluster without external connections, without a parent and with children", r, t);
152
- let n = e.graph().rankdir === "TB" ? "LR" : "TB";
153
- w.get(r)?.clusterData?.dir && (n = w.get(r).clusterData.dir, o.warn("Fixing dir", w.get(r).clusterData.dir, n));
154
- let a = new i({
155
- multigraph: !0,
156
- compound: !0
157
- }).setGraph({
158
- rankdir: n,
159
- nodesep: 50,
160
- ranksep: 50,
161
- marginx: 8,
162
- marginy: 8
163
- }).setDefaultEdgeLabel(function() {
164
- return {};
165
- });
166
- o.warn("Old graph before copy", x(e)), A(r, e, a, r), e.setNode(r, {
167
- clusterNode: !0,
168
- id: r,
169
- clusterData: w.get(r).clusterData,
170
- label: w.get(r).label,
171
- graph: a
172
- }), o.warn("New graph after copy node: (", r, ")", x(a)), o.debug("Old graph after copy", x(e));
173
- } else o.warn("Cluster ** ", r, " **not meeting the criteria !externalConnections:", !w.get(r).externalConnections, " no parent: ", !e.parent(r), " children ", e.children(r) && e.children(r).length > 0, e.children("D"), t), o.debug(w);
174
- n = e.nodes(), o.warn("New list of nodes", n);
175
- for (let r of n) {
176
- let n = e.node(r);
177
- o.warn(" Now next level", r, n), n?.clusterNode && I(n.graph, t + 1);
178
- }
179
- }, "extractor"), L = /* @__PURE__ */ a((e, t) => {
180
- if (t.length === 0) return [];
181
- let n = Object.assign([], t);
182
- return t.forEach((t) => {
183
- let r = L(e, e.children(t));
184
- n = [...n, ...r];
185
- }), n;
186
- }, "sorter"), R = /* @__PURE__ */ a((e) => L(e, e.children()), "sortNodesByHierarchy"), z = /* @__PURE__ */ a(async (e, t, r, i, s, p) => {
187
- o.warn("Graph in recursive render:XAX", x(t), s);
188
- let m = t.graph().rankdir;
189
- o.trace("Dir in recursive render - dir:", m);
190
- let _ = e.insert("g").attr("class", "root");
191
- t.nodes() ? o.info("Recursive render XXX", t.nodes()) : o.info("No nodes found for", t), t.edges().length > 0 && o.info("Recursive edges", t.edge(t.edges()[0]));
192
- let b = _.insert("g").attr("class", "clusters"), S = _.insert("g").attr("class", "edgePaths"), C = _.insert("g").attr("class", "edgeLabels"), T = _.insert("g").attr("class", "nodes");
193
- await Promise.all(t.nodes().map(async function(e) {
194
- let n = t.node(e);
195
- if (s !== void 0) {
196
- let n = JSON.parse(JSON.stringify(s.clusterData));
197
- o.trace("Setting data for parent cluster XXX\n Node.id = ", e, "\n data=", n.height, "\nParent cluster", s.height), t.setNode(s.id, n), t.parent(e) || (o.trace("Setting parent", e, s.id), t.setParent(e, s.id, n));
198
- }
199
- if (o.info("(Insert) Node XXX" + e + ": " + JSON.stringify(t.node(e))), n?.clusterNode) {
200
- o.info("Cluster identified XBX", e, n.width, t.node(e));
201
- let { ranksep: a, nodesep: s } = t.graph();
202
- n.graph.setGraph({
203
- ...n.graph.graph(),
204
- ranksep: a + 25,
205
- nodesep: s
206
- });
207
- let c = await z(T, n.graph, r, i, t.node(e), p), l = c.elem;
208
- h(n, l), n.diff = c.diff || 0, o.info("New compound node after recursive render XAX", e, "width", n.width, "height", n.height), f(l, n);
209
- } else t.children(e).length > 0 ? (o.trace("Cluster - the non recursive path XBX", e, n.id, n, n.width, "Graph:", t), o.trace(N(n.id, t)), w.set(n.id, {
210
- id: N(n.id, t),
211
- node: n
212
- })) : (o.trace("Node - the non recursive path XAX", e, T, t.node(e), m), await l(T, t.node(e), {
213
- config: p,
214
- dir: m
215
- }));
216
- })), await (/* @__PURE__ */ a(async () => {
217
- let e = t.edges().map(async function(e) {
218
- let n = t.edge(e.v, e.w, e.name);
219
- o.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)), o.info("Edge " + e.v + " -> " + e.w + ": ", e, " ", JSON.stringify(t.edge(e))), o.info("Fix", w, "ids:", e.v, e.w, "Translating: ", w.get(e.v), w.get(e.w)), await y(C, n);
220
- });
221
- await Promise.all(e);
222
- }, "processEdges"))(), o.info("Graph before layout:", JSON.stringify(x(t))), o.info("############################################# XXX"), o.info("### Layout ### XXX"), o.info("############################################# XXX"), n(t), o.info("Graph after layout:", JSON.stringify(x(t)));
223
- let E = 0, { subGraphTitleTotalMargin: D } = c(p);
224
- return await Promise.all(R(t).map(async function(e) {
225
- let n = t.node(e);
226
- if (o.info("Position XBX => " + e + ": (" + n.x, "," + n.y, ") width: ", n.width, " height: ", n.height), n?.clusterNode) n.y += D, o.info("A tainted cluster node XBX1", e, n.id, n.width, n.height, n.x, n.y, t.parent(e)), w.get(n.id).node = n, u(n);
227
- else if (t.children(e).length > 0) {
228
- o.info("A pure cluster node XBX1", e, n.id, n.x, n.y, n.width, n.height, t.parent(e)), n.height += D, t.node(n.parentId);
229
- let r = n?.padding / 2 || 0, i = n?.labelBBox?.height || 0, a = i - r || 0;
230
- o.debug("OffsetY", a, "labelHeight", i, "halfPadding", r), await d(b, n), w.get(n.id).node = n;
231
- } else {
232
- let e = t.node(n.parentId);
233
- n.y += D / 2, o.info("A regular node XBX1 - using the padding", n.id, "parent", n.parentId, n.width, n.height, n.x, n.y, "offsetY", n.offsetY, "parent", e, e?.offsetY, n), u(n);
234
- }
235
- })), t.edges().forEach(function(e) {
236
- let n = t.edge(e);
237
- o.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(n), n), n.points.forEach((e) => e.y += D / 2), g(n, v(S, n, w, r, t.node(e.v), t.node(e.w), i));
238
- }), t.nodes().forEach(function(e) {
239
- let n = t.node(e);
240
- o.info(e, n.type, n.diff), n.isGroup && (E = n.diff);
241
- }), o.warn("Returning from recursive render XAX", _, E), {
242
- elem: _,
243
- diff: E
244
- };
245
- }, "recursiveRender"), B = /* @__PURE__ */ a(async (e, t) => {
246
- let n = new i({
247
- multigraph: !0,
248
- compound: !0
249
- }).setGraph({
250
- rankdir: e.direction,
251
- nodesep: e.config?.nodeSpacing || e.config?.flowchart?.nodeSpacing || e.nodeSpacing,
252
- ranksep: e.config?.rankSpacing || e.config?.flowchart?.rankSpacing || e.rankSpacing,
253
- marginx: 8,
254
- marginy: 8
255
- }).setDefaultEdgeLabel(function() {
256
- return {};
257
- }), r = t.select("g");
258
- _(r, e.markers, e.type, e.diagramId), p(), b(), m(), D(), e.nodes.forEach((e) => {
259
- n.setNode(e.id, { ...e }), e.parentId && n.setParent(e.id, e.parentId);
260
- }), o.debug("Edges:", e.edges), e.edges.forEach((e) => {
261
- if (e.start === e.end) {
262
- let t = e.start, r = t + "---" + t + "---1", i = t + "---" + t + "---2", a = n.node(t);
263
- n.setNode(r, {
264
- domId: r,
265
- id: r,
266
- parentId: a.parentId,
267
- labelStyle: "",
268
- label: "",
269
- padding: 0,
270
- shape: "labelRect",
271
- style: "",
272
- width: 10,
273
- height: 10
274
- }), n.setParent(r, a.parentId), n.setNode(i, {
275
- domId: i,
276
- id: i,
277
- parentId: a.parentId,
278
- labelStyle: "",
279
- padding: 0,
280
- shape: "labelRect",
281
- label: "",
282
- style: "",
283
- width: 10,
284
- height: 10
285
- }), n.setParent(i, a.parentId);
286
- let o = structuredClone(e), s = structuredClone(e), c = structuredClone(e);
287
- o.label = "", o.arrowTypeEnd = "none", o.id = t + "-cyclic-special-1", s.arrowTypeStart = "none", s.arrowTypeEnd = "none", s.id = t + "-cyclic-special-mid", c.label = "", a.isGroup && (o.fromCluster = t, c.toCluster = t), c.id = t + "-cyclic-special-2", c.arrowTypeStart = "none", n.setEdge(t, r, o, t + "-cyclic-special-0"), n.setEdge(r, i, s, t + "-cyclic-special-1"), n.setEdge(i, t, c, t + "-cyc<lic-special-2");
288
- } else n.setEdge(e.start, e.end, { ...e }, e.id);
289
- }), o.warn("Graph at first:", JSON.stringify(x(n))), F(n), o.warn("Graph after XAX:", JSON.stringify(x(n)));
290
- let a = s();
291
- await z(r, n, e.type, e.diagramId, void 0, a);
292
- }, "render");
293
- //#endregion
294
- export { B as render };
295
-
296
- //# sourceMappingURL=dagre-KLK3FWXG-DTKcsol6.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dagre-KLK3FWXG-DTKcsol6.js","names":["_.isUndefined","_.clone","_.map","graphlibJson.write","graphlib.Graph","graphlibJson2.write","graphlib2.Graph","getConfig"],"sources":["../node_modules/dagre-d3-es/src/graphlib/json.js","../node_modules/mermaid/dist/chunks/mermaid.core/dagre-KLK3FWXG.mjs"],"sourcesContent":["import * as _ from 'lodash-es';\nimport { Graph } from './graph.js';\n\n/**\n * @import { NodeID, EdgeObj, GraphOptions } from './graph.js';\n */\n\nexport { write, read };\n\n/**\n * @template [GraphLabel=any] - Label of the graph.\n * @template [NodeLabel=any] - Label of a node.\n * @template [EdgeLabel=any] - Label of an edge.\n *\n * @typedef {object} GraphJSON\n * @property {Required<GraphOptions>} options - The options used to create the graph.\n * @property {Array<{ v: NodeID; value?: NodeLabel; parent?: NodeID }>} nodes - The nodes in the graph.\n * @property {Array<EdgeObj & { value?: EdgeLabel }>} edges - The edges in the graph.\n * @property {GraphLabel} [value] - The graph's value, if any.\n */\n\n/**\n * Creates a JSON representation of the graph that can be serialized to a\n * string with\n * [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify).\n * The graph can later be restored using {@link read}.\n *\n * @example\n *\n * ```js\n * var g = new graphlib.Graph();\n * g.setNode(\"a\", { label: \"node a\" });\n * g.setNode(\"b\", { label: \"node b\" });\n * g.setEdge(\"a\", \"b\", { label: \"edge a->b\" });\n * graphlib.json.write(g);\n * // Returns the object:\n * //\n * // {\n * // \"options\": {\n * // \"directed\": true,\n * // \"multigraph\": false,\n * // \"compound\": false\n * // },\n * // \"nodes\": [\n * // { \"v\": \"a\", \"value\": { \"label\": \"node a\" } },\n * // { \"v\": \"b\", \"value\": { \"label\": \"node b\" } }\n * // ],\n * // \"edges\": [\n * // { \"v\": \"a\", \"w\": \"b\", \"value\": { \"label\": \"edge a->b\" } }\n * // ]\n * // }\n * ```\n *\n * @template [GraphLabel=any] - Label of the graph.\n * @template [NodeLabel=any] - Label of a node.\n * @template [EdgeLabel=any] - Label of an edge.\n * @param {Graph<GraphLabel, NodeLabel, EdgeLabel>} g - The graph to serialize.\n * @returns {GraphJSON<GraphLabel, NodeLabel, EdgeLabel>} The JSON representation of the graph.\n */\nfunction write(g) {\n /** @type {GraphJSON<GraphLabel, NodeLabel, EdgeLabel>} */\n var json = {\n options: {\n directed: g.isDirected(),\n multigraph: g.isMultigraph(),\n compound: g.isCompound(),\n },\n nodes: writeNodes(g),\n edges: writeEdges(g),\n };\n if (!_.isUndefined(g.graph())) {\n json.value = _.clone(g.graph());\n }\n return json;\n}\n\n/**\n * @template NodeLabel - Label of a node.\n *\n * @param {Graph<unknown, NodeLabel, unknown>} g - The graph to serialize.\n * @returns {Array<{ v: NodeID; value?: NodeLabel; parent?: NodeID }>} The nodes in the graph.\n */\nfunction writeNodes(g) {\n return _.map(g.nodes(), function (v) {\n var nodeValue = g.node(v);\n var parent = g.parent(v);\n /** @type {{ v: NodeID; value?: NodeLabel; parent?: NodeID }} */\n var node = { v: v };\n if (!_.isUndefined(nodeValue)) {\n node.value = nodeValue;\n }\n if (!_.isUndefined(parent)) {\n node.parent = parent;\n }\n return node;\n });\n}\n\n/**\n * @template EdgeLabel - Label of a node.\n *\n * @param {Graph<unknown, unknown, EdgeLabel>} g - The graph to serialize.\n * @returns {Array<EdgeObj & { value?: EdgeLabel }>} The edges in the graph.\n */\nfunction writeEdges(g) {\n return _.map(g.edges(), function (e) {\n var edgeValue = g.edge(e);\n /** @type {EdgeObj & { value?: EdgeLabel }} */\n var edge = { v: e.v, w: e.w };\n if (!_.isUndefined(e.name)) {\n edge.name = e.name;\n }\n if (!_.isUndefined(edgeValue)) {\n edge.value = edgeValue;\n }\n return edge;\n });\n}\n\n/**\n * Takes JSON as input and returns the graph representation.\n *\n * @example\n *\n * For example, if we have serialized the graph in {@link write}\n * to a string named `str`, we can restore it to a graph as follows:\n *\n * ```js\n * var g2 = graphlib.json.read(JSON.parse(str));\n * // or, in order to copy the graph\n * var g3 = graphlib.json.read(graphlib.json.write(g))\n *\n * g2.nodes();\n * // ['a', 'b']\n * g2.edges()\n * // [ { v: 'a', w: 'b' } ]\n * ```\n *\n * @template [GraphLabel=any] - Label of the graph.\n * @template [NodeLabel=any] - Label of a node.\n * @template [EdgeLabel=any] - Label of an edge.\n * @param {GraphJSON<GraphLabel, NodeLabel, EdgeLabel>} json - The JSON representation of the graph.\n * @returns {Graph<GraphLabel, NodeLabel, EdgeLabel>} The restored graph.\n */\nfunction read(json) {\n var g = new Graph(json.options).setGraph(json.value);\n _.each(json.nodes, function (entry) {\n g.setNode(entry.v, entry.value);\n if (entry.parent) {\n g.setParent(entry.v, entry.parent);\n }\n });\n _.each(json.edges, function (entry) {\n g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value);\n });\n return g;\n}\n","import {\n clear as clear2,\n insertEdge,\n insertEdgeLabel,\n markers_default,\n positionEdgeLabel\n} from \"./chunk-O4XLMI2P.mjs\";\nimport \"./chunk-MX3YWQON.mjs\";\nimport {\n clear,\n clear2 as clear3,\n insertCluster,\n insertNode,\n positionNode,\n setNodeElem,\n updateNodeBounds\n} from \"./chunk-KYZI473N.mjs\";\nimport {\n getSubGraphTitleMargins\n} from \"./chunk-YBOYWFTD.mjs\";\nimport \"./chunk-PQ6SQG4A.mjs\";\nimport \"./chunk-PU5JKC2W.mjs\";\nimport \"./chunk-GEFDOKGD.mjs\";\nimport {\n getConfig2 as getConfig\n} from \"./chunk-7R4GIKGN.mjs\";\nimport {\n __name,\n log\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/rendering-util/layout-algorithms/dagre/index.js\nimport { layout as dagreLayout } from \"dagre-d3-es/src/dagre/index.js\";\nimport * as graphlibJson2 from \"dagre-d3-es/src/graphlib/json.js\";\nimport * as graphlib2 from \"dagre-d3-es/src/graphlib/index.js\";\n\n// src/rendering-util/layout-algorithms/dagre/mermaid-graphlib.js\nimport * as graphlib from \"dagre-d3-es/src/graphlib/index.js\";\nimport * as graphlibJson from \"dagre-d3-es/src/graphlib/json.js\";\nvar clusterDb = /* @__PURE__ */ new Map();\nvar descendants = /* @__PURE__ */ new Map();\nvar parents = /* @__PURE__ */ new Map();\nvar clear4 = /* @__PURE__ */ __name(() => {\n descendants.clear();\n parents.clear();\n clusterDb.clear();\n}, \"clear\");\nvar isDescendant = /* @__PURE__ */ __name((id, ancestorId) => {\n const ancestorDescendants = descendants.get(ancestorId) || [];\n log.trace(\"In isDescendant\", ancestorId, \" \", id, \" = \", ancestorDescendants.includes(id));\n return ancestorDescendants.includes(id);\n}, \"isDescendant\");\nvar edgeInCluster = /* @__PURE__ */ __name((edge, clusterId) => {\n const clusterDescendants = descendants.get(clusterId) || [];\n log.info(\"Descendants of \", clusterId, \" is \", clusterDescendants);\n log.info(\"Edge is \", edge);\n if (edge.v === clusterId || edge.w === clusterId) {\n return false;\n }\n if (!clusterDescendants) {\n log.debug(\"Tilt, \", clusterId, \",not in descendants\");\n return false;\n }\n return clusterDescendants.includes(edge.v) || isDescendant(edge.v, clusterId) || isDescendant(edge.w, clusterId) || clusterDescendants.includes(edge.w);\n}, \"edgeInCluster\");\nvar copy = /* @__PURE__ */ __name((clusterId, graph, newGraph, rootId) => {\n log.warn(\n \"Copying children of \",\n clusterId,\n \"root\",\n rootId,\n \"data\",\n graph.node(clusterId),\n rootId\n );\n const nodes = graph.children(clusterId) || [];\n if (clusterId !== rootId) {\n nodes.push(clusterId);\n }\n log.warn(\"Copying (nodes) clusterId\", clusterId, \"nodes\", nodes);\n nodes.forEach((node) => {\n if (graph.children(node).length > 0) {\n copy(node, graph, newGraph, rootId);\n } else {\n const data = graph.node(node);\n log.info(\"cp \", node, \" to \", rootId, \" with parent \", clusterId);\n newGraph.setNode(node, data);\n if (rootId !== graph.parent(node)) {\n log.warn(\"Setting parent\", node, graph.parent(node));\n newGraph.setParent(node, graph.parent(node));\n }\n if (clusterId !== rootId && node !== clusterId) {\n log.debug(\"Setting parent\", node, clusterId);\n newGraph.setParent(node, clusterId);\n } else {\n log.info(\"In copy \", clusterId, \"root\", rootId, \"data\", graph.node(clusterId), rootId);\n log.debug(\n \"Not Setting parent for node=\",\n node,\n \"cluster!==rootId\",\n clusterId !== rootId,\n \"node!==clusterId\",\n node !== clusterId\n );\n }\n const edges = graph.edges(node);\n log.debug(\"Copying Edges\", edges);\n edges.forEach((edge) => {\n log.info(\"Edge\", edge);\n const data2 = graph.edge(edge.v, edge.w, edge.name);\n log.info(\"Edge data\", data2, rootId);\n try {\n if (edgeInCluster(edge, rootId)) {\n log.info(\"Copying as \", edge.v, edge.w, data2, edge.name);\n newGraph.setEdge(edge.v, edge.w, data2, edge.name);\n log.info(\"newGraph edges \", newGraph.edges(), newGraph.edge(newGraph.edges()[0]));\n } else {\n log.info(\n \"Skipping copy of edge \",\n edge.v,\n \"-->\",\n edge.w,\n \" rootId: \",\n rootId,\n \" clusterId:\",\n clusterId\n );\n }\n } catch (e) {\n log.error(e);\n }\n });\n }\n log.debug(\"Removing node\", node);\n graph.removeNode(node);\n });\n}, \"copy\");\nvar extractDescendants = /* @__PURE__ */ __name((id, graph) => {\n const children = graph.children(id);\n let res = [...children];\n for (const child of children) {\n parents.set(child, id);\n res = [...res, ...extractDescendants(child, graph)];\n }\n return res;\n}, \"extractDescendants\");\nvar findCommonEdges = /* @__PURE__ */ __name((graph, id1, id2) => {\n const edges1 = graph.edges().filter((edge) => edge.v === id1 || edge.w === id1);\n const edges2 = graph.edges().filter((edge) => edge.v === id2 || edge.w === id2);\n const edges1Prim = edges1.map((edge) => {\n return { v: edge.v === id1 ? id2 : edge.v, w: edge.w === id1 ? id1 : edge.w };\n });\n const edges2Prim = edges2.map((edge) => {\n return { v: edge.v, w: edge.w };\n });\n const result = edges1Prim.filter((edgeIn1) => {\n return edges2Prim.some((edge) => edgeIn1.v === edge.v && edgeIn1.w === edge.w);\n });\n return result;\n}, \"findCommonEdges\");\nvar findNonClusterChild = /* @__PURE__ */ __name((id, graph, clusterId) => {\n const children = graph.children(id);\n log.trace(\"Searching children of id \", id, children);\n if (children.length < 1) {\n return id;\n }\n let reserve;\n for (const child of children) {\n const _id = findNonClusterChild(child, graph, clusterId);\n const commonEdges = findCommonEdges(graph, clusterId, _id);\n if (_id) {\n if (commonEdges.length > 0) {\n reserve = _id;\n } else {\n return _id;\n }\n }\n }\n return reserve;\n}, \"findNonClusterChild\");\nvar getAnchorId = /* @__PURE__ */ __name((id) => {\n if (!clusterDb.has(id)) {\n return id;\n }\n if (!clusterDb.get(id).externalConnections) {\n return id;\n }\n if (clusterDb.has(id)) {\n return clusterDb.get(id).id;\n }\n return id;\n}, \"getAnchorId\");\nvar adjustClustersAndEdges = /* @__PURE__ */ __name((graph, depth) => {\n if (!graph || depth > 10) {\n log.debug(\"Opting out, no graph \");\n return;\n } else {\n log.debug(\"Opting in, graph \");\n }\n graph.nodes().forEach(function(id) {\n const children = graph.children(id);\n if (children.length > 0) {\n log.warn(\n \"Cluster identified\",\n id,\n \" Replacement id in edges: \",\n findNonClusterChild(id, graph, id)\n );\n descendants.set(id, extractDescendants(id, graph));\n clusterDb.set(id, { id: findNonClusterChild(id, graph, id), clusterData: graph.node(id) });\n }\n });\n graph.nodes().forEach(function(id) {\n const children = graph.children(id);\n const edges = graph.edges();\n if (children.length > 0) {\n log.debug(\"Cluster identified\", id, descendants);\n edges.forEach((edge) => {\n const d1 = isDescendant(edge.v, id);\n const d2 = isDescendant(edge.w, id);\n if (d1 ^ d2) {\n log.warn(\"Edge: \", edge, \" leaves cluster \", id);\n log.warn(\"Descendants of XXX \", id, \": \", descendants.get(id));\n clusterDb.get(id).externalConnections = true;\n }\n });\n } else {\n log.debug(\"Not a cluster \", id, descendants);\n }\n });\n for (let id of clusterDb.keys()) {\n const nonClusterChild = clusterDb.get(id).id;\n const parent = graph.parent(nonClusterChild);\n if (parent !== id && clusterDb.has(parent) && !clusterDb.get(parent).externalConnections) {\n clusterDb.get(id).id = parent;\n }\n }\n graph.edges().forEach(function(e) {\n const edge = graph.edge(e);\n log.warn(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(e));\n log.warn(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(graph.edge(e)));\n let v = e.v;\n let w = e.w;\n log.warn(\n \"Fix XXX\",\n clusterDb,\n \"ids:\",\n e.v,\n e.w,\n \"Translating: \",\n clusterDb.get(e.v),\n \" --- \",\n clusterDb.get(e.w)\n );\n if (clusterDb.get(e.v) || clusterDb.get(e.w)) {\n log.warn(\"Fixing and trying - removing XXX\", e.v, e.w, e.name);\n v = getAnchorId(e.v);\n w = getAnchorId(e.w);\n graph.removeEdge(e.v, e.w, e.name);\n if (v !== e.v) {\n const parent = graph.parent(v);\n clusterDb.get(parent).externalConnections = true;\n edge.fromCluster = e.v;\n }\n if (w !== e.w) {\n const parent = graph.parent(w);\n clusterDb.get(parent).externalConnections = true;\n edge.toCluster = e.w;\n }\n log.warn(\"Fix Replacing with XXX\", v, w, e.name);\n graph.setEdge(v, w, edge, e.name);\n }\n });\n log.warn(\"Adjusted Graph\", graphlibJson.write(graph));\n extractor(graph, 0);\n log.trace(clusterDb);\n}, \"adjustClustersAndEdges\");\nvar extractor = /* @__PURE__ */ __name((graph, depth) => {\n log.warn(\"extractor - \", depth, graphlibJson.write(graph), graph.children(\"D\"));\n if (depth > 10) {\n log.error(\"Bailing out\");\n return;\n }\n let nodes = graph.nodes();\n let hasChildren = false;\n for (const node of nodes) {\n const children = graph.children(node);\n hasChildren = hasChildren || children.length > 0;\n }\n if (!hasChildren) {\n log.debug(\"Done, no node has children\", graph.nodes());\n return;\n }\n log.debug(\"Nodes = \", nodes, depth);\n for (const node of nodes) {\n log.debug(\n \"Extracting node\",\n node,\n clusterDb,\n clusterDb.has(node) && !clusterDb.get(node).externalConnections,\n !graph.parent(node),\n graph.node(node),\n graph.children(\"D\"),\n \" Depth \",\n depth\n );\n if (!clusterDb.has(node)) {\n log.debug(\"Not a cluster\", node, depth);\n } else if (!clusterDb.get(node).externalConnections && graph.children(node) && graph.children(node).length > 0) {\n log.warn(\n \"Cluster without external connections, without a parent and with children\",\n node,\n depth\n );\n const graphSettings = graph.graph();\n let dir = graphSettings.rankdir === \"TB\" ? \"LR\" : \"TB\";\n if (clusterDb.get(node)?.clusterData?.dir) {\n dir = clusterDb.get(node).clusterData.dir;\n log.warn(\"Fixing dir\", clusterDb.get(node).clusterData.dir, dir);\n }\n const clusterGraph = new graphlib.Graph({\n multigraph: true,\n compound: true\n }).setGraph({\n rankdir: dir,\n nodesep: 50,\n ranksep: 50,\n marginx: 8,\n marginy: 8\n }).setDefaultEdgeLabel(function() {\n return {};\n });\n log.warn(\"Old graph before copy\", graphlibJson.write(graph));\n copy(node, graph, clusterGraph, node);\n graph.setNode(node, {\n clusterNode: true,\n id: node,\n clusterData: clusterDb.get(node).clusterData,\n label: clusterDb.get(node).label,\n graph: clusterGraph\n });\n log.warn(\"New graph after copy node: (\", node, \")\", graphlibJson.write(clusterGraph));\n log.debug(\"Old graph after copy\", graphlibJson.write(graph));\n } else {\n log.warn(\n \"Cluster ** \",\n node,\n \" **not meeting the criteria !externalConnections:\",\n !clusterDb.get(node).externalConnections,\n \" no parent: \",\n !graph.parent(node),\n \" children \",\n graph.children(node) && graph.children(node).length > 0,\n graph.children(\"D\"),\n depth\n );\n log.debug(clusterDb);\n }\n }\n nodes = graph.nodes();\n log.warn(\"New list of nodes\", nodes);\n for (const node of nodes) {\n const data = graph.node(node);\n log.warn(\" Now next level\", node, data);\n if (data?.clusterNode) {\n extractor(data.graph, depth + 1);\n }\n }\n}, \"extractor\");\nvar sorter = /* @__PURE__ */ __name((graph, nodes) => {\n if (nodes.length === 0) {\n return [];\n }\n let result = Object.assign([], nodes);\n nodes.forEach((node) => {\n const children = graph.children(node);\n const sorted = sorter(graph, children);\n result = [...result, ...sorted];\n });\n return result;\n}, \"sorter\");\nvar sortNodesByHierarchy = /* @__PURE__ */ __name((graph) => sorter(graph, graph.children()), \"sortNodesByHierarchy\");\n\n// src/rendering-util/layout-algorithms/dagre/index.js\nvar recursiveRender = /* @__PURE__ */ __name(async (_elem, graph, diagramType, id, parentCluster, siteConfig) => {\n log.warn(\"Graph in recursive render:XAX\", graphlibJson2.write(graph), parentCluster);\n const dir = graph.graph().rankdir;\n log.trace(\"Dir in recursive render - dir:\", dir);\n const elem = _elem.insert(\"g\").attr(\"class\", \"root\");\n if (!graph.nodes()) {\n log.info(\"No nodes found for\", graph);\n } else {\n log.info(\"Recursive render XXX\", graph.nodes());\n }\n if (graph.edges().length > 0) {\n log.info(\"Recursive edges\", graph.edge(graph.edges()[0]));\n }\n const clusters = elem.insert(\"g\").attr(\"class\", \"clusters\");\n const edgePaths = elem.insert(\"g\").attr(\"class\", \"edgePaths\");\n const edgeLabels = elem.insert(\"g\").attr(\"class\", \"edgeLabels\");\n const nodes = elem.insert(\"g\").attr(\"class\", \"nodes\");\n await Promise.all(\n graph.nodes().map(async function(v) {\n const node = graph.node(v);\n if (parentCluster !== void 0) {\n const data = JSON.parse(JSON.stringify(parentCluster.clusterData));\n log.trace(\n \"Setting data for parent cluster XXX\\n Node.id = \",\n v,\n \"\\n data=\",\n data.height,\n \"\\nParent cluster\",\n parentCluster.height\n );\n graph.setNode(parentCluster.id, data);\n if (!graph.parent(v)) {\n log.trace(\"Setting parent\", v, parentCluster.id);\n graph.setParent(v, parentCluster.id, data);\n }\n }\n log.info(\"(Insert) Node XXX\" + v + \": \" + JSON.stringify(graph.node(v)));\n if (node?.clusterNode) {\n log.info(\"Cluster identified XBX\", v, node.width, graph.node(v));\n const { ranksep, nodesep } = graph.graph();\n node.graph.setGraph({\n ...node.graph.graph(),\n ranksep: ranksep + 25,\n nodesep\n });\n const o = await recursiveRender(\n nodes,\n node.graph,\n diagramType,\n id,\n graph.node(v),\n siteConfig\n );\n const newEl = o.elem;\n updateNodeBounds(node, newEl);\n node.diff = o.diff || 0;\n log.info(\n \"New compound node after recursive render XAX\",\n v,\n \"width\",\n // node,\n node.width,\n \"height\",\n node.height\n // node.x,\n // node.y\n );\n setNodeElem(newEl, node);\n } else {\n if (graph.children(v).length > 0) {\n log.trace(\n \"Cluster - the non recursive path XBX\",\n v,\n node.id,\n node,\n node.width,\n \"Graph:\",\n graph\n );\n log.trace(findNonClusterChild(node.id, graph));\n clusterDb.set(node.id, { id: findNonClusterChild(node.id, graph), node });\n } else {\n log.trace(\"Node - the non recursive path XAX\", v, nodes, graph.node(v), dir);\n await insertNode(nodes, graph.node(v), { config: siteConfig, dir });\n }\n }\n })\n );\n const processEdges = /* @__PURE__ */ __name(async () => {\n const edgePromises = graph.edges().map(async function(e) {\n const edge = graph.edge(e.v, e.w, e.name);\n log.info(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(e));\n log.info(\"Edge \" + e.v + \" -> \" + e.w + \": \", e, \" \", JSON.stringify(graph.edge(e)));\n log.info(\n \"Fix\",\n clusterDb,\n \"ids:\",\n e.v,\n e.w,\n \"Translating: \",\n clusterDb.get(e.v),\n clusterDb.get(e.w)\n );\n await insertEdgeLabel(edgeLabels, edge);\n });\n await Promise.all(edgePromises);\n }, \"processEdges\");\n await processEdges();\n log.info(\"Graph before layout:\", JSON.stringify(graphlibJson2.write(graph)));\n log.info(\"############################################# XXX\");\n log.info(\"### Layout ### XXX\");\n log.info(\"############################################# XXX\");\n dagreLayout(graph);\n log.info(\"Graph after layout:\", JSON.stringify(graphlibJson2.write(graph)));\n let diff = 0;\n let { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig);\n await Promise.all(\n sortNodesByHierarchy(graph).map(async function(v) {\n const node = graph.node(v);\n log.info(\n \"Position XBX => \" + v + \": (\" + node.x,\n \",\" + node.y,\n \") width: \",\n node.width,\n \" height: \",\n node.height\n );\n if (node?.clusterNode) {\n node.y += subGraphTitleTotalMargin;\n log.info(\n \"A tainted cluster node XBX1\",\n v,\n node.id,\n node.width,\n node.height,\n node.x,\n node.y,\n graph.parent(v)\n );\n clusterDb.get(node.id).node = node;\n positionNode(node);\n } else {\n if (graph.children(v).length > 0) {\n log.info(\n \"A pure cluster node XBX1\",\n v,\n node.id,\n node.x,\n node.y,\n node.width,\n node.height,\n graph.parent(v)\n );\n node.height += subGraphTitleTotalMargin;\n graph.node(node.parentId);\n const halfPadding = node?.padding / 2 || 0;\n const labelHeight = node?.labelBBox?.height || 0;\n const offsetY = labelHeight - halfPadding || 0;\n log.debug(\"OffsetY\", offsetY, \"labelHeight\", labelHeight, \"halfPadding\", halfPadding);\n await insertCluster(clusters, node);\n clusterDb.get(node.id).node = node;\n } else {\n const parent = graph.node(node.parentId);\n node.y += subGraphTitleTotalMargin / 2;\n log.info(\n \"A regular node XBX1 - using the padding\",\n node.id,\n \"parent\",\n node.parentId,\n node.width,\n node.height,\n node.x,\n node.y,\n \"offsetY\",\n node.offsetY,\n \"parent\",\n parent,\n parent?.offsetY,\n node\n );\n positionNode(node);\n }\n }\n })\n );\n graph.edges().forEach(function(e) {\n const edge = graph.edge(e);\n log.info(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(edge), edge);\n edge.points.forEach((point) => point.y += subGraphTitleTotalMargin / 2);\n const startNode = graph.node(e.v);\n var endNode = graph.node(e.w);\n const paths = insertEdge(edgePaths, edge, clusterDb, diagramType, startNode, endNode, id);\n positionEdgeLabel(edge, paths);\n });\n graph.nodes().forEach(function(v) {\n const n = graph.node(v);\n log.info(v, n.type, n.diff);\n if (n.isGroup) {\n diff = n.diff;\n }\n });\n log.warn(\"Returning from recursive render XAX\", elem, diff);\n return { elem, diff };\n}, \"recursiveRender\");\nvar render = /* @__PURE__ */ __name(async (data4Layout, svg) => {\n const graph = new graphlib2.Graph({\n multigraph: true,\n compound: true\n }).setGraph({\n rankdir: data4Layout.direction,\n nodesep: data4Layout.config?.nodeSpacing || data4Layout.config?.flowchart?.nodeSpacing || data4Layout.nodeSpacing,\n ranksep: data4Layout.config?.rankSpacing || data4Layout.config?.flowchart?.rankSpacing || data4Layout.rankSpacing,\n marginx: 8,\n marginy: 8\n }).setDefaultEdgeLabel(function() {\n return {};\n });\n const element = svg.select(\"g\");\n markers_default(element, data4Layout.markers, data4Layout.type, data4Layout.diagramId);\n clear3();\n clear2();\n clear();\n clear4();\n data4Layout.nodes.forEach((node) => {\n graph.setNode(node.id, { ...node });\n if (node.parentId) {\n graph.setParent(node.id, node.parentId);\n }\n });\n log.debug(\"Edges:\", data4Layout.edges);\n data4Layout.edges.forEach((edge) => {\n if (edge.start === edge.end) {\n const nodeId = edge.start;\n const specialId1 = nodeId + \"---\" + nodeId + \"---1\";\n const specialId2 = nodeId + \"---\" + nodeId + \"---2\";\n const node = graph.node(nodeId);\n graph.setNode(specialId1, {\n domId: specialId1,\n id: specialId1,\n parentId: node.parentId,\n labelStyle: \"\",\n label: \"\",\n padding: 0,\n shape: \"labelRect\",\n // shape: 'rect',\n style: \"\",\n width: 10,\n height: 10\n });\n graph.setParent(specialId1, node.parentId);\n graph.setNode(specialId2, {\n domId: specialId2,\n id: specialId2,\n parentId: node.parentId,\n labelStyle: \"\",\n padding: 0,\n // shape: 'rect',\n shape: \"labelRect\",\n label: \"\",\n style: \"\",\n width: 10,\n height: 10\n });\n graph.setParent(specialId2, node.parentId);\n const edge1 = structuredClone(edge);\n const edgeMid = structuredClone(edge);\n const edge2 = structuredClone(edge);\n edge1.label = \"\";\n edge1.arrowTypeEnd = \"none\";\n edge1.id = nodeId + \"-cyclic-special-1\";\n edgeMid.arrowTypeStart = \"none\";\n edgeMid.arrowTypeEnd = \"none\";\n edgeMid.id = nodeId + \"-cyclic-special-mid\";\n edge2.label = \"\";\n if (node.isGroup) {\n edge1.fromCluster = nodeId;\n edge2.toCluster = nodeId;\n }\n edge2.id = nodeId + \"-cyclic-special-2\";\n edge2.arrowTypeStart = \"none\";\n graph.setEdge(nodeId, specialId1, edge1, nodeId + \"-cyclic-special-0\");\n graph.setEdge(specialId1, specialId2, edgeMid, nodeId + \"-cyclic-special-1\");\n graph.setEdge(specialId2, nodeId, edge2, nodeId + \"-cyc<lic-special-2\");\n } else {\n graph.setEdge(edge.start, edge.end, { ...edge }, edge.id);\n }\n });\n log.warn(\"Graph at first:\", JSON.stringify(graphlibJson2.write(graph)));\n adjustClustersAndEdges(graph);\n log.warn(\"Graph after XAX:\", JSON.stringify(graphlibJson2.write(graph)));\n const siteConfig = getConfig();\n await recursiveRender(\n element,\n graph,\n data4Layout.type,\n data4Layout.diagramId,\n void 0,\n siteConfig\n );\n}, \"render\");\nexport {\n render\n};\n"],"x_google_ignoreList":[0,1],"mappings":";;;;;;;;;;;;;;;AA2DA,SAAS,EAAM,GAAG;CAEhB,IAAI,IAAO;EACT,SAAS;GACP,UAAU,EAAE,YAAY;GACxB,YAAY,EAAE,cAAc;GAC5B,UAAU,EAAE,YAAY;GACzB;EACD,OAAO,EAAW,EAAE;EACpB,OAAO,EAAW,EAAE;EACrB;AAID,QAHKA,EAAc,EAAE,OAAO,CAAC,KAC3B,EAAK,QAAQC,EAAQ,EAAE,OAAO,CAAC,GAE1B;;AAST,SAAS,EAAW,GAAG;AACrB,QAAOC,EAAM,EAAE,OAAO,EAAE,SAAU,GAAG;EACnC,IAAI,IAAY,EAAE,KAAK,EAAE,EACrB,IAAS,EAAE,OAAO,EAAE,EAEpB,IAAO,EAAK,MAAG;AAOnB,SANKF,EAAc,EAAU,KAC3B,EAAK,QAAQ,IAEVA,EAAc,EAAO,KACxB,EAAK,SAAS,IAET;GACP;;A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AiB,QACvB,EAAM,QAAQ,GAAQ,GAAY,GAAO,IAAS,oBAAoB,EACtE,EAAM,QAAQ,GAAY,GAAY,GAAS,IAAS,oBAAoB,EAC5E,EAAM,QAAQ,GAAY,GAAQ,GAAO,IAAS,qBAAqB;QAEvE,GAAM,QAAQ,EAAK,OAAO,EAAK,KAAK,EAAE,GAAG,GAAM,EAAE,EAAK,GAAG;GAE3D,EACF,EAAI,KAAK,mBAAmB,KAAK,UAAUD,EAAoB,EAAM,CAAC,CAAC,EACvE,EAAuB,EAAM,EAC7B,EAAI,KAAK,oBAAoB,KAAK,UAAUA,EAAoB,EAAM,CAAC,CAAC;CACxE,IAAM,IAAaE,GAAW;AAC9B,OAAM,EACJ,GACA,GACA,EAAY,MACZ,EAAY,WACZ,KAAK,GACL,EACD;GACA,SAAS"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"diagram-E7M64L7V-Co7O3gub.js","names":["node_count","node_each","node_eachAfter","node_eachBefore","node_find","node_sum","node_sort","node_path","node_ancestors","node_descendants","node_leaves","node_links","node_iterator","squarify","roundNode","constant","scaleOrdinal","treemap","select"],"sources":["../node_modules/d3-hierarchy/src/hierarchy/count.js","../node_modules/d3-hierarchy/src/hierarchy/each.js","../node_modules/d3-hierarchy/src/hierarchy/eachBefore.js","../node_modules/d3-hierarchy/src/hierarchy/eachAfter.js","../node_modules/d3-hierarchy/src/hierarchy/find.js","../node_modules/d3-hierarchy/src/hierarchy/sum.js","../node_modules/d3-hierarchy/src/hierarchy/sort.js","../node_modules/d3-hierarchy/src/hierarchy/path.js","../node_modules/d3-hierarchy/src/hierarchy/ancestors.js","../node_modules/d3-hierarchy/src/hierarchy/descendants.js","../node_modules/d3-hierarchy/src/hierarchy/leaves.js","../node_modules/d3-hierarchy/src/hierarchy/links.js","../node_modules/d3-hierarchy/src/hierarchy/iterator.js","../node_modules/d3-hierarchy/src/hierarchy/index.js","../node_modules/d3-hierarchy/src/accessors.js","../node_modules/d3-hierarchy/src/constant.js","../node_modules/d3-hierarchy/src/treemap/round.js","../node_modules/d3-hierarchy/src/treemap/dice.js","../node_modules/d3-hierarchy/src/treemap/slice.js","../node_modules/d3-hierarchy/src/treemap/squarify.js","../node_modules/d3-hierarchy/src/treemap/index.js","../node_modules/mermaid/dist/chunks/mermaid.core/diagram-E7M64L7V.mjs"],"sourcesContent":["function count(node) {\n var sum = 0,\n children = node.children,\n i = children && children.length;\n if (!i) sum = 1;\n else while (--i >= 0) sum += children[i].value;\n node.value = sum;\n}\n\nexport default function() {\n return this.eachAfter(count);\n}\n","export default function(callback, that) {\n let index = -1;\n for (const node of this) {\n callback.call(that, node, ++index, this);\n }\n return this;\n}\n","export default function(callback, that) {\n var node = this, nodes = [node], children, i, index = -1;\n while (node = nodes.pop()) {\n callback.call(that, node, ++index, this);\n if (children = node.children) {\n for (i = children.length - 1; i >= 0; --i) {\n nodes.push(children[i]);\n }\n }\n }\n return this;\n}\n","export default function(callback, that) {\n var node = this, nodes = [node], next = [], children, i, n, index = -1;\n while (node = nodes.pop()) {\n next.push(node);\n if (children = node.children) {\n for (i = 0, n = children.length; i < n; ++i) {\n nodes.push(children[i]);\n }\n }\n }\n while (node = next.pop()) {\n callback.call(that, node, ++index, this);\n }\n return this;\n}\n","export default function(callback, that) {\n let index = -1;\n for (const node of this) {\n if (callback.call(that, node, ++index, this)) {\n return node;\n }\n }\n}\n","export default function(value) {\n return this.eachAfter(function(node) {\n var sum = +value(node.data) || 0,\n children = node.children,\n i = children && children.length;\n while (--i >= 0) sum += children[i].value;\n node.value = sum;\n });\n}\n","export default function(compare) {\n return this.eachBefore(function(node) {\n if (node.children) {\n node.children.sort(compare);\n }\n });\n}\n","export default function(end) {\n var start = this,\n ancestor = leastCommonAncestor(start, end),\n nodes = [start];\n while (start !== ancestor) {\n start = start.parent;\n nodes.push(start);\n }\n var k = nodes.length;\n while (end !== ancestor) {\n nodes.splice(k, 0, end);\n end = end.parent;\n }\n return nodes;\n}\n\nfunction leastCommonAncestor(a, b) {\n if (a === b) return a;\n var aNodes = a.ancestors(),\n bNodes = b.ancestors(),\n c = null;\n a = aNodes.pop();\n b = bNodes.pop();\n while (a === b) {\n c = a;\n a = aNodes.pop();\n b = bNodes.pop();\n }\n return c;\n}\n","export default function() {\n var node = this, nodes = [node];\n while (node = node.parent) {\n nodes.push(node);\n }\n return nodes;\n}\n","export default function() {\n return Array.from(this);\n}\n","export default function() {\n var leaves = [];\n this.eachBefore(function(node) {\n if (!node.children) {\n leaves.push(node);\n }\n });\n return leaves;\n}\n","export default function() {\n var root = this, links = [];\n root.each(function(node) {\n if (node !== root) { // Don’t include the root’s parent, if any.\n links.push({source: node.parent, target: node});\n }\n });\n return links;\n}\n","export default function*() {\n var node = this, current, next = [node], children, i, n;\n do {\n current = next.reverse(), next = [];\n while (node = current.pop()) {\n yield node;\n if (children = node.children) {\n for (i = 0, n = children.length; i < n; ++i) {\n next.push(children[i]);\n }\n }\n }\n } while (next.length);\n}\n","import node_count from \"./count.js\";\nimport node_each from \"./each.js\";\nimport node_eachBefore from \"./eachBefore.js\";\nimport node_eachAfter from \"./eachAfter.js\";\nimport node_find from \"./find.js\";\nimport node_sum from \"./sum.js\";\nimport node_sort from \"./sort.js\";\nimport node_path from \"./path.js\";\nimport node_ancestors from \"./ancestors.js\";\nimport node_descendants from \"./descendants.js\";\nimport node_leaves from \"./leaves.js\";\nimport node_links from \"./links.js\";\nimport node_iterator from \"./iterator.js\";\n\nexport default function hierarchy(data, children) {\n if (data instanceof Map) {\n data = [undefined, data];\n if (children === undefined) children = mapChildren;\n } else if (children === undefined) {\n children = objectChildren;\n }\n\n var root = new Node(data),\n node,\n nodes = [root],\n child,\n childs,\n i,\n n;\n\n while (node = nodes.pop()) {\n if ((childs = children(node.data)) && (n = (childs = Array.from(childs)).length)) {\n node.children = childs;\n for (i = n - 1; i >= 0; --i) {\n nodes.push(child = childs[i] = new Node(childs[i]));\n child.parent = node;\n child.depth = node.depth + 1;\n }\n }\n }\n\n return root.eachBefore(computeHeight);\n}\n\nfunction node_copy() {\n return hierarchy(this).eachBefore(copyData);\n}\n\nfunction objectChildren(d) {\n return d.children;\n}\n\nfunction mapChildren(d) {\n return Array.isArray(d) ? d[1] : null;\n}\n\nfunction copyData(node) {\n if (node.data.value !== undefined) node.value = node.data.value;\n node.data = node.data.data;\n}\n\nexport function computeHeight(node) {\n var height = 0;\n do node.height = height;\n while ((node = node.parent) && (node.height < ++height));\n}\n\nexport function Node(data) {\n this.data = data;\n this.depth =\n this.height = 0;\n this.parent = null;\n}\n\nNode.prototype = hierarchy.prototype = {\n constructor: Node,\n count: node_count,\n each: node_each,\n eachAfter: node_eachAfter,\n eachBefore: node_eachBefore,\n find: node_find,\n sum: node_sum,\n sort: node_sort,\n path: node_path,\n ancestors: node_ancestors,\n descendants: node_descendants,\n leaves: node_leaves,\n links: node_links,\n copy: node_copy,\n [Symbol.iterator]: node_iterator\n};\n","export function optional(f) {\n return f == null ? null : required(f);\n}\n\nexport function required(f) {\n if (typeof f !== \"function\") throw new Error;\n return f;\n}\n","export function constantZero() {\n return 0;\n}\n\nexport default function(x) {\n return function() {\n return x;\n };\n}\n","export default function(node) {\n node.x0 = Math.round(node.x0);\n node.y0 = Math.round(node.y0);\n node.x1 = Math.round(node.x1);\n node.y1 = Math.round(node.y1);\n}\n","export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (x1 - x0) / parent.value;\n\n while (++i < n) {\n node = nodes[i], node.y0 = y0, node.y1 = y1;\n node.x0 = x0, node.x1 = x0 += node.value * k;\n }\n}\n","export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (y1 - y0) / parent.value;\n\n while (++i < n) {\n node = nodes[i], node.x0 = x0, node.x1 = x1;\n node.y0 = y0, node.y1 = y0 += node.value * k;\n }\n}\n","import treemapDice from \"./dice.js\";\nimport treemapSlice from \"./slice.js\";\n\nexport var phi = (1 + Math.sqrt(5)) / 2;\n\nexport function squarifyRatio(ratio, parent, x0, y0, x1, y1) {\n var rows = [],\n nodes = parent.children,\n row,\n nodeValue,\n i0 = 0,\n i1 = 0,\n n = nodes.length,\n dx, dy,\n value = parent.value,\n sumValue,\n minValue,\n maxValue,\n newRatio,\n minRatio,\n alpha,\n beta;\n\n while (i0 < n) {\n dx = x1 - x0, dy = y1 - y0;\n\n // Find the next non-empty node.\n do sumValue = nodes[i1++].value; while (!sumValue && i1 < n);\n minValue = maxValue = sumValue;\n alpha = Math.max(dy / dx, dx / dy) / (value * ratio);\n beta = sumValue * sumValue * alpha;\n minRatio = Math.max(maxValue / beta, beta / minValue);\n\n // Keep adding nodes while the aspect ratio maintains or improves.\n for (; i1 < n; ++i1) {\n sumValue += nodeValue = nodes[i1].value;\n if (nodeValue < minValue) minValue = nodeValue;\n if (nodeValue > maxValue) maxValue = nodeValue;\n beta = sumValue * sumValue * alpha;\n newRatio = Math.max(maxValue / beta, beta / minValue);\n if (newRatio > minRatio) { sumValue -= nodeValue; break; }\n minRatio = newRatio;\n }\n\n // Position and record the row orientation.\n rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)});\n if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);\n else treemapSlice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);\n value -= sumValue, i0 = i1;\n }\n\n return rows;\n}\n\nexport default (function custom(ratio) {\n\n function squarify(parent, x0, y0, x1, y1) {\n squarifyRatio(ratio, parent, x0, y0, x1, y1);\n }\n\n squarify.ratio = function(x) {\n return custom((x = +x) > 1 ? x : 1);\n };\n\n return squarify;\n})(phi);\n","import roundNode from \"./round.js\";\nimport squarify from \"./squarify.js\";\nimport {required} from \"../accessors.js\";\nimport constant, {constantZero} from \"../constant.js\";\n\nexport default function() {\n var tile = squarify,\n round = false,\n dx = 1,\n dy = 1,\n paddingStack = [0],\n paddingInner = constantZero,\n paddingTop = constantZero,\n paddingRight = constantZero,\n paddingBottom = constantZero,\n paddingLeft = constantZero;\n\n function treemap(root) {\n root.x0 =\n root.y0 = 0;\n root.x1 = dx;\n root.y1 = dy;\n root.eachBefore(positionNode);\n paddingStack = [0];\n if (round) root.eachBefore(roundNode);\n return root;\n }\n\n function positionNode(node) {\n var p = paddingStack[node.depth],\n x0 = node.x0 + p,\n y0 = node.y0 + p,\n x1 = node.x1 - p,\n y1 = node.y1 - p;\n if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n node.x0 = x0;\n node.y0 = y0;\n node.x1 = x1;\n node.y1 = y1;\n if (node.children) {\n p = paddingStack[node.depth + 1] = paddingInner(node) / 2;\n x0 += paddingLeft(node) - p;\n y0 += paddingTop(node) - p;\n x1 -= paddingRight(node) - p;\n y1 -= paddingBottom(node) - p;\n if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n tile(node, x0, y0, x1, y1);\n }\n }\n\n treemap.round = function(x) {\n return arguments.length ? (round = !!x, treemap) : round;\n };\n\n treemap.size = function(x) {\n return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy];\n };\n\n treemap.tile = function(x) {\n return arguments.length ? (tile = required(x), treemap) : tile;\n };\n\n treemap.padding = function(x) {\n return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner();\n };\n\n treemap.paddingInner = function(x) {\n return arguments.length ? (paddingInner = typeof x === \"function\" ? x : constant(+x), treemap) : paddingInner;\n };\n\n treemap.paddingOuter = function(x) {\n return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop();\n };\n\n treemap.paddingTop = function(x) {\n return arguments.length ? (paddingTop = typeof x === \"function\" ? x : constant(+x), treemap) : paddingTop;\n };\n\n treemap.paddingRight = function(x) {\n return arguments.length ? (paddingRight = typeof x === \"function\" ? x : constant(+x), treemap) : paddingRight;\n };\n\n treemap.paddingBottom = function(x) {\n return arguments.length ? (paddingBottom = typeof x === \"function\" ? x : constant(+x), treemap) : paddingBottom;\n };\n\n treemap.paddingLeft = function(x) {\n return arguments.length ? (paddingLeft = typeof x === \"function\" ? x : constant(+x), treemap) : paddingLeft;\n };\n\n return treemap;\n}\n","import {\n selectSvgElement\n} from \"./chunk-HHEYEP7N.mjs\";\nimport {\n setupViewPortForSVG\n} from \"./chunk-KX2RTZJC.mjs\";\nimport {\n isLabelStyle,\n styles2String\n} from \"./chunk-PQ6SQG4A.mjs\";\nimport {\n populateCommonDb\n} from \"./chunk-4BX2VUAB.mjs\";\nimport {\n cleanAndMerge\n} from \"./chunk-GEFDOKGD.mjs\";\nimport {\n clear,\n configureSvgSize,\n defaultConfig_default,\n getAccDescription,\n getAccTitle,\n getConfig,\n getDiagramTitle,\n setAccDescription,\n setAccTitle,\n setDiagramTitle\n} from \"./chunk-7R4GIKGN.mjs\";\nimport {\n __name,\n log\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/diagrams/treemap/db.ts\nvar TreeMapDB = class {\n constructor() {\n this.nodes = [];\n this.levels = /* @__PURE__ */ new Map();\n this.outerNodes = [];\n this.classes = /* @__PURE__ */ new Map();\n this.setAccTitle = setAccTitle;\n this.getAccTitle = getAccTitle;\n this.setDiagramTitle = setDiagramTitle;\n this.getDiagramTitle = getDiagramTitle;\n this.getAccDescription = getAccDescription;\n this.setAccDescription = setAccDescription;\n }\n static {\n __name(this, \"TreeMapDB\");\n }\n getNodes() {\n return this.nodes;\n }\n getConfig() {\n const defaultConfig = defaultConfig_default;\n const userConfig = getConfig();\n return cleanAndMerge({\n ...defaultConfig.treemap,\n ...userConfig.treemap ?? {}\n });\n }\n addNode(node, level) {\n this.nodes.push(node);\n this.levels.set(node, level);\n if (level === 0) {\n this.outerNodes.push(node);\n this.root ??= node;\n }\n }\n getRoot() {\n return { name: \"\", children: this.outerNodes };\n }\n addClass(id, _style) {\n const styleClass = this.classes.get(id) ?? { id, styles: [], textStyles: [] };\n const styles = _style.replace(/\\\\,/g, \"\\xA7\\xA7\\xA7\").replace(/,/g, \";\").replace(/§§§/g, \",\").split(\";\");\n if (styles) {\n styles.forEach((s) => {\n if (isLabelStyle(s)) {\n if (styleClass?.textStyles) {\n styleClass.textStyles.push(s);\n } else {\n styleClass.textStyles = [s];\n }\n }\n if (styleClass?.styles) {\n styleClass.styles.push(s);\n } else {\n styleClass.styles = [s];\n }\n });\n }\n this.classes.set(id, styleClass);\n }\n getClasses() {\n return this.classes;\n }\n getStylesForClass(classSelector) {\n return this.classes.get(classSelector)?.styles ?? [];\n }\n clear() {\n clear();\n this.nodes = [];\n this.levels = /* @__PURE__ */ new Map();\n this.outerNodes = [];\n this.classes = /* @__PURE__ */ new Map();\n this.root = void 0;\n }\n};\n\n// src/diagrams/treemap/parser.ts\nimport { parse } from \"@mermaid-js/parser\";\n\n// src/diagrams/treemap/utils.ts\nfunction buildHierarchy(items) {\n if (!items.length) {\n return [];\n }\n const root = [];\n const stack = [];\n items.forEach((item) => {\n const node = {\n name: item.name,\n children: item.type === \"Leaf\" ? void 0 : []\n };\n node.classSelector = item?.classSelector;\n if (item?.cssCompiledStyles) {\n node.cssCompiledStyles = item.cssCompiledStyles;\n }\n if (item.type === \"Leaf\" && item.value !== void 0) {\n node.value = item.value;\n }\n while (stack.length > 0 && stack[stack.length - 1].level >= item.level) {\n stack.pop();\n }\n if (stack.length === 0) {\n root.push(node);\n } else {\n const parent = stack[stack.length - 1].node;\n if (parent.children) {\n parent.children.push(node);\n } else {\n parent.children = [node];\n }\n }\n if (item.type !== \"Leaf\") {\n stack.push({ node, level: item.level });\n }\n });\n return root;\n}\n__name(buildHierarchy, \"buildHierarchy\");\n\n// src/diagrams/treemap/parser.ts\nvar populate = /* @__PURE__ */ __name((ast, db) => {\n populateCommonDb(ast, db);\n const items = [];\n for (const row of ast.TreemapRows ?? []) {\n if (row.$type === \"ClassDefStatement\") {\n db.addClass(row.className ?? \"\", row.styleText ?? \"\");\n }\n }\n for (const row of ast.TreemapRows ?? []) {\n const item = row.item;\n if (!item) {\n continue;\n }\n const level = row.indent ? parseInt(row.indent) : 0;\n const name = getItemName(item);\n const styles = item.classSelector ? db.getStylesForClass(item.classSelector) : [];\n const cssCompiledStyles = styles.length > 0 ? styles : void 0;\n const itemData = {\n level,\n name,\n type: item.$type,\n value: item.value,\n classSelector: item.classSelector,\n cssCompiledStyles\n };\n items.push(itemData);\n }\n const hierarchyNodes = buildHierarchy(items);\n const addNodesRecursively = /* @__PURE__ */ __name((nodes, level) => {\n for (const node of nodes) {\n db.addNode(node, level);\n if (node.children && node.children.length > 0) {\n addNodesRecursively(node.children, level + 1);\n }\n }\n }, \"addNodesRecursively\");\n addNodesRecursively(hierarchyNodes, 0);\n}, \"populate\");\nvar getItemName = /* @__PURE__ */ __name((item) => {\n return item.name ? String(item.name) : \"\";\n}, \"getItemName\");\nvar parser = {\n // @ts-expect-error - TreeMapDB is not assignable to DiagramDB\n parser: { yy: void 0 },\n parse: /* @__PURE__ */ __name(async (text) => {\n try {\n const parseFunc = parse;\n const ast = await parseFunc(\"treemap\", text);\n log.debug(\"Treemap AST:\", ast);\n const db = parser.parser?.yy;\n if (!(db instanceof TreeMapDB)) {\n throw new Error(\n \"parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.\"\n );\n }\n populate(ast, db);\n } catch (error) {\n log.error(\"Error parsing treemap:\", error);\n throw error;\n }\n }, \"parse\")\n};\n\n// src/diagrams/treemap/renderer.ts\nimport { scaleOrdinal, treemap, hierarchy, format, select } from \"d3\";\nvar DEFAULT_INNER_PADDING = 10;\nvar SECTION_INNER_PADDING = 10;\nvar SECTION_HEADER_HEIGHT = 25;\nvar draw = /* @__PURE__ */ __name((_text, id, _version, diagram2) => {\n const treemapDb = diagram2.db;\n const config = treemapDb.getConfig();\n const treemapInnerPadding = config.padding ?? DEFAULT_INNER_PADDING;\n const title = treemapDb.getDiagramTitle();\n const root = treemapDb.getRoot();\n const { themeVariables } = getConfig();\n if (!root) {\n return;\n }\n const titleHeight = title ? 30 : 0;\n const svg = selectSvgElement(id);\n const width = config.nodeWidth ? config.nodeWidth * SECTION_INNER_PADDING : 960;\n const height = config.nodeHeight ? config.nodeHeight * SECTION_INNER_PADDING : 500;\n const svgWidth = width;\n const svgHeight = height + titleHeight;\n svg.attr(\"viewBox\", `0 0 ${svgWidth} ${svgHeight}`);\n configureSvgSize(svg, svgHeight, svgWidth, config.useMaxWidth);\n let valueFormat;\n try {\n const formatStr = config.valueFormat || \",\";\n if (formatStr === \"$0,0\") {\n valueFormat = /* @__PURE__ */ __name((value) => \"$\" + format(\",\")(value), \"valueFormat\");\n } else if (formatStr.startsWith(\"$\") && formatStr.includes(\",\")) {\n const precision = /\\.\\d+/.exec(formatStr);\n const precisionStr = precision ? precision[0] : \"\";\n valueFormat = /* @__PURE__ */ __name((value) => \"$\" + format(\",\" + precisionStr)(value), \"valueFormat\");\n } else if (formatStr.startsWith(\"$\")) {\n const restOfFormat = formatStr.substring(1);\n valueFormat = /* @__PURE__ */ __name((value) => \"$\" + format(restOfFormat || \"\")(value), \"valueFormat\");\n } else {\n valueFormat = format(formatStr);\n }\n } catch (error) {\n log.error(\"Error creating format function:\", error);\n valueFormat = format(\",\");\n }\n const colorScale = scaleOrdinal().range([\n \"transparent\",\n themeVariables.cScale0,\n themeVariables.cScale1,\n themeVariables.cScale2,\n themeVariables.cScale3,\n themeVariables.cScale4,\n themeVariables.cScale5,\n themeVariables.cScale6,\n themeVariables.cScale7,\n themeVariables.cScale8,\n themeVariables.cScale9,\n themeVariables.cScale10,\n themeVariables.cScale11\n ]);\n const colorScalePeer = scaleOrdinal().range([\n \"transparent\",\n themeVariables.cScalePeer0,\n themeVariables.cScalePeer1,\n themeVariables.cScalePeer2,\n themeVariables.cScalePeer3,\n themeVariables.cScalePeer4,\n themeVariables.cScalePeer5,\n themeVariables.cScalePeer6,\n themeVariables.cScalePeer7,\n themeVariables.cScalePeer8,\n themeVariables.cScalePeer9,\n themeVariables.cScalePeer10,\n themeVariables.cScalePeer11\n ]);\n const colorScaleLabel = scaleOrdinal().range([\n themeVariables.cScaleLabel0,\n themeVariables.cScaleLabel1,\n themeVariables.cScaleLabel2,\n themeVariables.cScaleLabel3,\n themeVariables.cScaleLabel4,\n themeVariables.cScaleLabel5,\n themeVariables.cScaleLabel6,\n themeVariables.cScaleLabel7,\n themeVariables.cScaleLabel8,\n themeVariables.cScaleLabel9,\n themeVariables.cScaleLabel10,\n themeVariables.cScaleLabel11\n ]);\n if (title) {\n svg.append(\"text\").attr(\"x\", svgWidth / 2).attr(\"y\", titleHeight / 2).attr(\"class\", \"treemapTitle\").attr(\"text-anchor\", \"middle\").attr(\"dominant-baseline\", \"middle\").text(title);\n }\n const g = svg.append(\"g\").attr(\"transform\", `translate(0, ${titleHeight})`).attr(\"class\", \"treemapContainer\");\n const hierarchyRoot = hierarchy(root).sum((d) => d.value ?? 0).sort((a, b) => (b.value ?? 0) - (a.value ?? 0));\n const treemapLayout = treemap().size([width, height]).paddingTop(\n (d) => d.children && d.children.length > 0 ? SECTION_HEADER_HEIGHT + SECTION_INNER_PADDING : 0\n ).paddingInner(treemapInnerPadding).paddingLeft((d) => d.children && d.children.length > 0 ? SECTION_INNER_PADDING : 0).paddingRight((d) => d.children && d.children.length > 0 ? SECTION_INNER_PADDING : 0).paddingBottom((d) => d.children && d.children.length > 0 ? SECTION_INNER_PADDING : 0).round(true);\n const treemapData = treemapLayout(hierarchyRoot);\n const branchNodes = treemapData.descendants().filter((d) => d.children && d.children.length > 0);\n const sections = g.selectAll(\".treemapSection\").data(branchNodes).enter().append(\"g\").attr(\"class\", \"treemapSection\").attr(\"transform\", (d) => `translate(${d.x0},${d.y0})`);\n sections.append(\"rect\").attr(\"width\", (d) => d.x1 - d.x0).attr(\"height\", SECTION_HEADER_HEIGHT).attr(\"class\", \"treemapSectionHeader\").attr(\"fill\", \"none\").attr(\"fill-opacity\", 0.6).attr(\"stroke-width\", 0.6).attr(\"style\", (d) => {\n if (d.depth === 0) {\n return \"display: none;\";\n }\n return \"\";\n });\n sections.append(\"clipPath\").attr(\"id\", (_d, i) => `clip-section-${id}-${i}`).append(\"rect\").attr(\"width\", (d) => Math.max(0, d.x1 - d.x0 - 12)).attr(\"height\", SECTION_HEADER_HEIGHT);\n sections.append(\"rect\").attr(\"width\", (d) => d.x1 - d.x0).attr(\"height\", (d) => d.y1 - d.y0).attr(\"class\", (_d, i) => {\n return `treemapSection section${i}`;\n }).attr(\"fill\", (d) => colorScale(d.data.name)).attr(\"fill-opacity\", 0.6).attr(\"stroke\", (d) => colorScalePeer(d.data.name)).attr(\"stroke-width\", 2).attr(\"stroke-opacity\", 0.4).attr(\"style\", (d) => {\n if (d.depth === 0) {\n return \"display: none;\";\n }\n const styles = styles2String({ cssCompiledStyles: d.data.cssCompiledStyles });\n return styles.nodeStyles + \";\" + styles.borderStyles.join(\";\");\n });\n sections.append(\"text\").attr(\"class\", \"treemapSectionLabel\").attr(\"x\", 6).attr(\"y\", SECTION_HEADER_HEIGHT / 2).attr(\"dominant-baseline\", \"middle\").text((d) => d.depth === 0 ? \"\" : d.data.name).attr(\"font-weight\", \"bold\").attr(\"style\", (d) => {\n if (d.depth === 0) {\n return \"display: none;\";\n }\n const labelStyles = \"dominant-baseline: middle; font-size: 12px; fill:\" + colorScaleLabel(d.data.name) + \"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;\";\n const styles = styles2String({ cssCompiledStyles: d.data.cssCompiledStyles });\n return labelStyles + styles.labelStyles.replace(\"color:\", \"fill:\");\n }).each(function(d) {\n if (d.depth === 0) {\n return;\n }\n const self = select(this);\n const originalText = d.data.name;\n self.text(originalText);\n const totalHeaderWidth = d.x1 - d.x0;\n const labelXPosition = 6;\n let spaceForTextContent;\n if (config.showValues !== false && d.value) {\n const valueEndsAtXRelative = totalHeaderWidth - 10;\n const estimatedValueTextActualWidth = 30;\n const gapBetweenLabelAndValue = 10;\n const labelMustEndBeforeX = valueEndsAtXRelative - estimatedValueTextActualWidth - gapBetweenLabelAndValue;\n spaceForTextContent = labelMustEndBeforeX - labelXPosition;\n } else {\n const labelOwnRightPadding = 6;\n spaceForTextContent = totalHeaderWidth - labelXPosition - labelOwnRightPadding;\n }\n const minimumWidthToDisplay = 15;\n const actualAvailableWidth = Math.max(minimumWidthToDisplay, spaceForTextContent);\n const textNode = self.node();\n const currentTextContentLength = textNode.getComputedTextLength();\n if (currentTextContentLength > actualAvailableWidth) {\n const ellipsis = \"...\";\n let currentTruncatedText = originalText;\n while (currentTruncatedText.length > 0) {\n currentTruncatedText = originalText.substring(0, currentTruncatedText.length - 1);\n if (currentTruncatedText.length === 0) {\n self.text(ellipsis);\n if (textNode.getComputedTextLength() > actualAvailableWidth) {\n self.text(\"\");\n }\n break;\n }\n self.text(currentTruncatedText + ellipsis);\n if (textNode.getComputedTextLength() <= actualAvailableWidth) {\n break;\n }\n }\n }\n });\n if (config.showValues !== false) {\n sections.append(\"text\").attr(\"class\", \"treemapSectionValue\").attr(\"x\", (d) => d.x1 - d.x0 - 10).attr(\"y\", SECTION_HEADER_HEIGHT / 2).attr(\"text-anchor\", \"end\").attr(\"dominant-baseline\", \"middle\").text((d) => d.value ? valueFormat(d.value) : \"\").attr(\"font-style\", \"italic\").attr(\"style\", (d) => {\n if (d.depth === 0) {\n return \"display: none;\";\n }\n const labelStyles = \"text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:\" + colorScaleLabel(d.data.name) + \"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;\";\n const styles = styles2String({ cssCompiledStyles: d.data.cssCompiledStyles });\n return labelStyles + styles.labelStyles.replace(\"color:\", \"fill:\");\n });\n }\n const leafNodes = treemapData.leaves();\n const cell = g.selectAll(\".treemapLeafGroup\").data(leafNodes).enter().append(\"g\").attr(\"class\", (d, i) => {\n return `treemapNode treemapLeafGroup leaf${i}${d.data.classSelector ? ` ${d.data.classSelector}` : \"\"}x`;\n }).attr(\"transform\", (d) => `translate(${d.x0},${d.y0})`);\n cell.append(\"rect\").attr(\"width\", (d) => d.x1 - d.x0).attr(\"height\", (d) => d.y1 - d.y0).attr(\"class\", \"treemapLeaf\").attr(\"fill\", (d) => {\n return d.parent ? colorScale(d.parent.data.name) : colorScale(d.data.name);\n }).attr(\"style\", (d) => {\n const styles = styles2String({ cssCompiledStyles: d.data.cssCompiledStyles });\n return styles.nodeStyles;\n }).attr(\"fill-opacity\", 0.3).attr(\"stroke\", (d) => {\n return d.parent ? colorScale(d.parent.data.name) : colorScale(d.data.name);\n }).attr(\"stroke-width\", 3);\n cell.append(\"clipPath\").attr(\"id\", (_d, i) => `clip-${id}-${i}`).append(\"rect\").attr(\"width\", (d) => Math.max(0, d.x1 - d.x0 - 4)).attr(\"height\", (d) => Math.max(0, d.y1 - d.y0 - 4));\n const leafLabels = cell.append(\"text\").attr(\"class\", \"treemapLabel\").attr(\"x\", (d) => (d.x1 - d.x0) / 2).attr(\"y\", (d) => (d.y1 - d.y0) / 2).attr(\"style\", (d) => {\n const labelStyles = \"text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:\" + colorScaleLabel(d.data.name) + \";\";\n const styles = styles2String({ cssCompiledStyles: d.data.cssCompiledStyles });\n return labelStyles + styles.labelStyles.replace(\"color:\", \"fill:\");\n }).attr(\"clip-path\", (_d, i) => `url(#clip-${id}-${i})`).text((d) => d.data.name);\n leafLabels.each(function(d) {\n const self = select(this);\n const nodeWidth = d.x1 - d.x0;\n const nodeHeight = d.y1 - d.y0;\n const textNode = self.node();\n const padding = 4;\n const availableWidth = nodeWidth - 2 * padding;\n const availableHeight = nodeHeight - 2 * padding;\n if (availableWidth < 10 || availableHeight < 10) {\n self.style(\"display\", \"none\");\n return;\n }\n let currentLabelFontSize = parseInt(self.style(\"font-size\"), 10);\n const minLabelFontSize = 8;\n const originalValueRelFontSize = 28;\n const valueScaleFactor = 0.6;\n const minValueFontSize = 6;\n const spacingBetweenLabelAndValue = 2;\n while (textNode.getComputedTextLength() > availableWidth && currentLabelFontSize > minLabelFontSize) {\n currentLabelFontSize--;\n self.style(\"font-size\", `${currentLabelFontSize}px`);\n }\n let prospectiveValueFontSize = Math.max(\n minValueFontSize,\n Math.min(originalValueRelFontSize, Math.round(currentLabelFontSize * valueScaleFactor))\n );\n let combinedHeight = currentLabelFontSize + spacingBetweenLabelAndValue + prospectiveValueFontSize;\n while (combinedHeight > availableHeight && currentLabelFontSize > minLabelFontSize) {\n currentLabelFontSize--;\n prospectiveValueFontSize = Math.max(\n minValueFontSize,\n Math.min(originalValueRelFontSize, Math.round(currentLabelFontSize * valueScaleFactor))\n );\n if (prospectiveValueFontSize < minValueFontSize && currentLabelFontSize === minLabelFontSize) {\n break;\n }\n self.style(\"font-size\", `${currentLabelFontSize}px`);\n combinedHeight = currentLabelFontSize + spacingBetweenLabelAndValue + prospectiveValueFontSize;\n if (prospectiveValueFontSize <= minValueFontSize && combinedHeight > availableHeight) {\n }\n }\n self.style(\"font-size\", `${currentLabelFontSize}px`);\n if (textNode.getComputedTextLength() > availableWidth || currentLabelFontSize < minLabelFontSize || availableHeight < currentLabelFontSize) {\n self.style(\"display\", \"none\");\n }\n });\n if (config.showValues !== false) {\n const leafValues = cell.append(\"text\").attr(\"class\", \"treemapValue\").attr(\"x\", (d) => (d.x1 - d.x0) / 2).attr(\"y\", function(d) {\n return (d.y1 - d.y0) / 2;\n }).attr(\"style\", (d) => {\n const labelStyles = \"text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:\" + colorScaleLabel(d.data.name) + \";\";\n const styles = styles2String({ cssCompiledStyles: d.data.cssCompiledStyles });\n return labelStyles + styles.labelStyles.replace(\"color:\", \"fill:\");\n }).attr(\"clip-path\", (_d, i) => `url(#clip-${id}-${i})`).text((d) => d.value ? valueFormat(d.value) : \"\");\n leafValues.each(function(d) {\n const valueTextElement = select(this);\n const parentCellNode = this.parentNode;\n if (!parentCellNode) {\n valueTextElement.style(\"display\", \"none\");\n return;\n }\n const labelElement = select(parentCellNode).select(\".treemapLabel\");\n if (labelElement.empty() || labelElement.style(\"display\") === \"none\") {\n valueTextElement.style(\"display\", \"none\");\n return;\n }\n const finalLabelFontSize = parseFloat(labelElement.style(\"font-size\"));\n const originalValueFontSize = 28;\n const valueScaleFactor = 0.6;\n const minValueFontSize = 6;\n const spacingBetweenLabelAndValue = 2;\n const actualValueFontSize = Math.max(\n minValueFontSize,\n Math.min(originalValueFontSize, Math.round(finalLabelFontSize * valueScaleFactor))\n );\n valueTextElement.style(\"font-size\", `${actualValueFontSize}px`);\n const labelCenterY = (d.y1 - d.y0) / 2;\n const valueTopActualY = labelCenterY + finalLabelFontSize / 2 + spacingBetweenLabelAndValue;\n valueTextElement.attr(\"y\", valueTopActualY);\n const nodeWidth = d.x1 - d.x0;\n const nodeTotalHeight = d.y1 - d.y0;\n const cellBottomPadding = 4;\n const maxValueBottomY = nodeTotalHeight - cellBottomPadding;\n const availableWidthForValue = nodeWidth - 2 * 4;\n if (valueTextElement.node().getComputedTextLength() > availableWidthForValue || valueTopActualY + actualValueFontSize > maxValueBottomY || actualValueFontSize < minValueFontSize) {\n valueTextElement.style(\"display\", \"none\");\n } else {\n valueTextElement.style(\"display\", null);\n }\n });\n }\n const diagramPadding = config.diagramPadding ?? 8;\n setupViewPortForSVG(svg, diagramPadding, \"flowchart\", config?.useMaxWidth || false);\n}, \"draw\");\nvar getClasses = /* @__PURE__ */ __name(function(_text, diagramObj) {\n return diagramObj.db.getClasses();\n}, \"getClasses\");\nvar renderer = { draw, getClasses };\n\n// src/diagrams/treemap/styles.ts\nvar defaultTreemapStyleOptions = {\n sectionStrokeColor: \"black\",\n sectionStrokeWidth: \"1\",\n sectionFillColor: \"#efefef\",\n leafStrokeColor: \"black\",\n leafStrokeWidth: \"1\",\n leafFillColor: \"#efefef\",\n labelColor: \"black\",\n labelFontSize: \"12px\",\n valueFontSize: \"10px\",\n valueColor: \"black\",\n titleColor: \"black\",\n titleFontSize: \"14px\"\n};\nvar getStyles = /* @__PURE__ */ __name(({\n treemap: treemap2\n} = {}) => {\n const options = cleanAndMerge(defaultTreemapStyleOptions, treemap2);\n return `\n .treemapNode.section {\n stroke: ${options.sectionStrokeColor};\n stroke-width: ${options.sectionStrokeWidth};\n fill: ${options.sectionFillColor};\n }\n .treemapNode.leaf {\n stroke: ${options.leafStrokeColor};\n stroke-width: ${options.leafStrokeWidth};\n fill: ${options.leafFillColor};\n }\n .treemapLabel {\n fill: ${options.labelColor};\n font-size: ${options.labelFontSize};\n }\n .treemapValue {\n fill: ${options.valueColor};\n font-size: ${options.valueFontSize};\n }\n .treemapTitle {\n fill: ${options.titleColor};\n font-size: ${options.titleFontSize};\n }\n `;\n}, \"getStyles\");\nvar styles_default = getStyles;\n\n// src/diagrams/treemap/diagram.ts\nvar diagram = {\n parser,\n get db() {\n return new TreeMapDB();\n },\n renderer,\n styles: styles_default\n};\nexport {\n diagram\n};\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21],"mappings":";;;;;;;;;;;;AAAA,SAAS,EAAM,GAAM;CACnB,IAAI,IAAM,GACN,IAAW,EAAK,UAChB,IAAI,KAAY,EAAS;AAC7B,KAAI,CAAC,EAAG,KAAM;KACT,QAAO,EAAE,KAAK,GAAG,MAAO,EAAS,GAAG;AACzC,GAAK,QAAQ;;AAGf,SAAA,IAA0B;AACxB,QAAO,KAAK,UAAU,EAAM;;;;ACV9B,SAAA,EAAwB,GAAU,GAAM;CACtC,IAAI,IAAQ;AACZ,MAAK,IAAM,KAAQ,KACjB,GAAS,KAAK,GAAM,GAAM,EAAE,GAAO,KAAK;AAE1C,QAAO;;;;ACLT,SAAA,EAAwB,GAAU,GAAM;AAEtC,MADA,IAAI,IAAO,MAAM,IAAQ,CAAC,EAAK,EAAE,GAAU,GAAG,IAAQ,IAC/C,IAAO,EAAM,KAAK,EAEvB,KADA,EAAS,KAAK,GAAM,GAAM,EAAE,GAAO,KAAK,EACpC,IAAW,EA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AK;AACP,SAAO,IAAI,GAAW;;CAExB;CACA,QAtC8B,mBAAQ,EACtC,SAAS,MACP,EAAE,KAAK;EACT,IAAM,IAAU,EAAc,IAA4B,EAAS;AACnE,SAAO;;cAEK,EAAQ,mBAAmB;oBACrB,EAAQ,mBAAmB;YACnC,EAAQ,iBAAiB;;;cAGvB,EAAQ,gBAAgB;oBAClB,EAAQ,gBAAgB;YAChC,EAAQ,cAAc;;;YAGtB,EAAQ,WAAW;iBACd,EAAQ,cAAc;;;YAG3B,EAAQ,WAAW;iBACd,EAAQ,cAAc;;;YAG3B,EAAQ,WAAW;iBACd,EAAQ,cAAc;;;IAGpC,YAAY;CAWd"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"dist-BrNloUiz.js","names":[],"sources":["../node_modules/@braintree/sanitize-url/dist/constants.js","../node_modules/@braintree/sanitize-url/dist/index.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BLANK_URL = exports.relativeFirstCharacters = exports.whitespaceEscapeCharsRegex = exports.urlSchemeRegex = exports.ctrlCharactersRegex = exports.htmlCtrlEntityRegex = exports.htmlEntitiesRegex = exports.invalidProtocolRegex = void 0;\nexports.invalidProtocolRegex = /^([^\\w]*)(javascript|data|vbscript)/im;\nexports.htmlEntitiesRegex = /&#(\\w+)(^\\w|;)?/g;\nexports.htmlCtrlEntityRegex = /&(newline|tab);/gi;\nexports.ctrlCharactersRegex = /[\\u0000-\\u001F\\u007F-\\u009F\\u2000-\\u200D\\uFEFF]/gim;\nexports.urlSchemeRegex = /^.+(:|&colon;)/gim;\nexports.whitespaceEscapeCharsRegex = /(\\\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;\nexports.relativeFirstCharacters = [\".\", \"/\"];\nexports.BLANK_URL = \"about:blank\";\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sanitizeUrl = sanitizeUrl;\nvar constants_1 = require(\"./constants\");\nfunction isRelativeUrlWithoutProtocol(url) {\n return constants_1.relativeFirstCharacters.indexOf(url[0]) > -1;\n}\nfunction decodeHtmlCharacters(str) {\n var removedNullByte = str.replace(constants_1.ctrlCharactersRegex, \"\");\n return removedNullByte.replace(constants_1.htmlEntitiesRegex, function (match, dec) {\n return String.fromCharCode(dec);\n });\n}\nfunction isValidUrl(url) {\n return URL.canParse(url);\n}\nfunction decodeURI(uri) {\n try {\n return decodeURIComponent(uri);\n }\n catch (e) {\n // Ignoring error\n // It is possible that the URI contains a `%` not associated\n // with URI/URL-encoding.\n return uri;\n }\n}\nfunction sanitizeUrl(url) {\n if (!url) {\n return constants_1.BLANK_URL;\n }\n var charsToDecode;\n var decodedUrl = decodeURI(url.trim());\n do {\n decodedUrl = decodeHtmlCharacters(decodedUrl)\n .replace(constants_1.htmlCtrlEntityRegex, \"\")\n .replace(constants_1.ctrlCharactersRegex, \"\")\n .replace(constants_1.whitespaceEscapeCharsRegex, \"\")\n .trim();\n decodedUrl = decodeURI(decodedUrl);\n charsToDecode =\n decodedUrl.match(constants_1.ctrlCharactersRegex) ||\n decodedUrl.match(constants_1.htmlEntitiesRegex) ||\n decodedUrl.match(constants_1.htmlCtrlEntityRegex) ||\n decodedUrl.match(constants_1.whitespaceEscapeCharsRegex);\n } while (charsToDecode && charsToDecode.length > 0);\n var sanitizedUrl = decodedUrl;\n if (!sanitizedUrl) {\n return constants_1.BLANK_URL;\n }\n if (isRelativeUrlWithoutProtocol(sanitizedUrl)) {\n return sanitizedUrl;\n }\n // Remove any leading whitespace before checking the URL scheme\n var trimmedUrl = sanitizedUrl.trimStart();\n var urlSchemeParseResults = trimmedUrl.match(constants_1.urlSchemeRegex);\n if (!urlSchemeParseResults) {\n return sanitizedUrl;\n }\n var urlScheme = urlSchemeParseResults[0].toLowerCase().trim();\n if (constants_1.invalidProtocolRegex.test(urlScheme)) {\n return constants_1.BLANK_URL;\n }\n var backSanitized = trimmedUrl.replace(/\\\\/g, \"/\");\n // Handle special cases for mailto: and custom deep-link protocols\n if (urlScheme === \"mailto:\" || urlScheme.includes(\"://\")) {\n return backSanitized;\n }\n // For http and https URLs, perform additional validation\n if (urlScheme === \"http:\" || urlScheme === \"https:\") {\n if (!isValidUrl(backSanitized)) {\n return constants_1.BLANK_URL;\n }\n var url_1 = new URL(backSanitized);\n url_1.protocol = url_1.protocol.toLowerCase();\n url_1.hostname = url_1.hostname.toLowerCase();\n return url_1.toString();\n }\n return backSanitized;\n}\n"],"x_google_ignoreList":[0,1],"mappings":";;;AAUA,CATA,OAAO,eAAe,GAAS,cAAc,EAAE,OAAO,IAAM,CAAC,EAC7D,EAAQ,YAAY,EAAQ,0BAA0B,EAAQ,6BAA6B,EAAQ,iBAAiB,EAAQ,sBAAsB,EAAQ,sBAAsB,EAAQ,oBAAoB,EAAQ,uBAAuB,KAAK,GAChP,EAAQ,uBAAuB,yCAC/B,EAAQ,oBAAoB,oBAC5B,EAAQ,sBAAsB,qBAC9B,EAAQ,sBAAsB,sDAC9B,EAAQ,iBAAiB,qBACzB,EAAQ,6BAA6B,wCACrC,EAAQ,0BAA0B,CAAC,KAAK,IAAI,EAC5C,EAAQ,YAAY;;ACRpB,CADA,OAAO,eAAe,GAAS,cAAc,EAAE,OAAO,IAAM,CAAC,EAC7D,EAAQ,cAAc;CACtB,IAAI,IAAA,GAAA;CACJ,SAAS,EAA6B,GAAK;AACvC,SAAO,EAAY,wBAAwB,QAAQ,EAAI,GAAG,GAAG;;CAEjE,SAAS,EAAqB,GAAK;AAE/B,SADsB,EAAI,QAAQ,EAAY,qBAAqB,GAAG,CAC/C,QAAQ,EAAY,mBAAmB,SAAU,GAAO,GAAK;AAChF,UAAO,OAAO,aAAa,EAAI;IACjC;;CAEN,SAAS,EAAW,GAAK;AACrB,SAAO,IAAI,SAAS,EAAI;;CAE5B,SAAS,EAAU,GAAK;AACpB,MAAI;AACA,UAAO,mBAAmB,EAAI;UAExB;AAIN,UAAO;;;CAGf,SAAS,EAAY,GAAK;AACtB,MAAI,CAAC,EACD,QAAO,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