@countermeasure-platform/web-components 1.2.1 → 1.2.2-dev.8.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 (313) 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-CBXhVCNE.js +163 -0
  79. package/dist/component-CBXhVCNE.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/icons/lucide.d.ts +1 -2
  121. package/dist/icons/lucide.d.ts.map +1 -1
  122. package/dist/icons/lucide.js.map +1 -1
  123. package/dist/info-J43DQDTF-DDmtkMBG.js +3 -0
  124. package/dist/{infoDiagram-LFFYTUFH-DajJJRvc.js → infoDiagram-5YYISTIA-C0TqWTrr.js} +7 -7
  125. package/dist/{infoDiagram-LFFYTUFH-DajJJRvc.js.map → infoDiagram-5YYISTIA-C0TqWTrr.js.map} +1 -1
  126. package/dist/{init-DcLTaNW1.js → init-CGzIZb6J.js} +1 -1
  127. package/dist/{init-DcLTaNW1.js.map → init-CGzIZb6J.js.map} +1 -1
  128. package/dist/{ishikawaDiagram-PHBUUO56-qHBJm2LT.js → ishikawaDiagram-YF4QCWOH-Cyk_Antz.js} +98 -97
  129. package/dist/ishikawaDiagram-YF4QCWOH-Cyk_Antz.js.map +1 -0
  130. package/dist/{journeyDiagram-4ABVD52K-PgfYdoDM.js → journeyDiagram-JHISSGLW-CTl8eDDe.js} +78 -78
  131. package/dist/journeyDiagram-JHISSGLW-CTl8eDDe.js.map +1 -0
  132. package/dist/{kanban-definition-K7BYSVSG-DFRT8j7A.js → kanban-definition-UN3LZRKU-homeDoHF.js} +46 -44
  133. package/dist/{kanban-definition-K7BYSVSG-DFRT8j7A.js.map → kanban-definition-UN3LZRKU-homeDoHF.js.map} +1 -1
  134. package/dist/{katex-BZdHnXin.js → katex-CgkxVokH.js} +1 -1
  135. package/dist/{katex-BZdHnXin.js.map → katex-CgkxVokH.js.map} +1 -1
  136. package/dist/line-k_aZSToM.js +36 -0
  137. package/dist/{line-Cq1AZT4f.js.map → line-k_aZSToM.js.map} +1 -1
  138. package/dist/{linear-BnJD01Xn.js → linear-Dpcbf4VP.js} +5 -5
  139. package/dist/{linear-BnJD01Xn.js.map → linear-Dpcbf4VP.js.map} +1 -1
  140. package/dist/{mermaid-parser.core-Dz5qv4CI.js → mermaid-parser.core-B_q76LYz.js} +32 -17
  141. package/dist/mermaid-parser.core-B_q76LYz.js.map +1 -0
  142. package/dist/mermaid.core-DAh-gNcn.js +997 -0
  143. package/dist/mermaid.core-DAh-gNcn.js.map +1 -0
  144. package/dist/{mindmap-definition-YRQLILUH-D95OPRMh.js → mindmap-definition-RKZ34NQL-Cjglmmr7.js} +153 -108
  145. package/dist/mindmap-definition-RKZ34NQL-Cjglmmr7.js.map +1 -0
  146. package/dist/{ordinal-CC9tfh_g.js → ordinal-DHGdAr1Y.js} +2 -2
  147. package/dist/{ordinal-CC9tfh_g.js.map → ordinal-DHGdAr1Y.js.map} +1 -1
  148. package/dist/packet-YPE3B663-Bo9N32Mb.js +3 -0
  149. package/dist/{path-y0uQCOMW.js → path-D-DDb3Wo.js} +1 -1
  150. package/dist/{path-y0uQCOMW.js.map → path-D-DDb3Wo.js.map} +1 -1
  151. package/dist/pie-LRSECV5Y-DndCyILX.js +3 -0
  152. package/dist/pieDiagram-4H26LBE5-Swbny_uk.js +167 -0
  153. package/dist/pieDiagram-4H26LBE5-Swbny_uk.js.map +1 -0
  154. package/dist/{quadrantDiagram-337W2JSQ-CcKc-h2o.js → quadrantDiagram-W4KKPZXB-kyt1iJkC.js} +359 -332
  155. package/dist/quadrantDiagram-W4KKPZXB-kyt1iJkC.js.map +1 -0
  156. package/dist/radar-GUYGQ44K-DpLG1fRN.js +3 -0
  157. package/dist/react/brand/index.d.ts +13 -1
  158. package/dist/react/brand/index.d.ts.map +1 -1
  159. package/dist/react/brand.js +28 -3
  160. package/dist/react/brand.js.map +1 -1
  161. package/dist/react/sidebar.d.ts +22 -1
  162. package/dist/react/sidebar.d.ts.map +1 -1
  163. package/dist/react/sidebar.js +26 -2
  164. package/dist/react/sidebar.js.map +1 -1
  165. package/dist/react/topology.js +1 -1
  166. package/dist/react.js +100 -100
  167. package/dist/{requirementDiagram-Z7DCOOCP-aPcaPduF.js → requirementDiagram-4Y6WPE33-DWRks7dz.js} +153 -133
  168. package/dist/requirementDiagram-4Y6WPE33-DWRks7dz.js.map +1 -0
  169. package/dist/{rough.esm-C9rQ9YkE.js → rough.esm-C7tiDdBn.js} +1 -1
  170. package/dist/{rough.esm-C9rQ9YkE.js.map → rough.esm-C7tiDdBn.js.map} +1 -1
  171. package/dist/{sankeyDiagram-WA2Y5GQK-CO_lUqQX.js → sankeyDiagram-5OEKKPKP-J_SVMd-0.js} +125 -76
  172. package/dist/{sankeyDiagram-WA2Y5GQK-CO_lUqQX.js.map → sankeyDiagram-5OEKKPKP-J_SVMd-0.js.map} +1 -1
  173. package/dist/sequenceDiagram-3UESZ5HK-BMhjbe8U.js +4167 -0
  174. package/dist/sequenceDiagram-3UESZ5HK-BMhjbe8U.js.map +1 -0
  175. package/dist/sidebar/component.d.ts +5 -0
  176. package/dist/sidebar/component.d.ts.map +1 -1
  177. package/dist/sidebar/index.d.ts +1 -1
  178. package/dist/sidebar/index.d.ts.map +1 -1
  179. package/dist/sidebar/index.js +1 -1
  180. package/dist/sidebar/index.js.map +1 -1
  181. package/dist/sidebar/types.d.ts +59 -0
  182. package/dist/sidebar/types.d.ts.map +1 -1
  183. package/dist/{src-D1EMXotX.js → src-CWnvxuyh.js} +603 -591
  184. package/dist/{src-D1EMXotX.js.map → src-CWnvxuyh.js.map} +1 -1
  185. package/dist/{src-BhNgmpel.js → src-DngnQkx_.js} +4 -5
  186. package/dist/{src-BhNgmpel.js.map → src-DngnQkx_.js.map} +1 -1
  187. package/dist/stateDiagram-AJRCARHV-x4JHehDk.js +220 -0
  188. package/dist/stateDiagram-AJRCARHV-x4JHehDk.js.map +1 -0
  189. package/dist/stateDiagram-v2-BHNVJYJU-CO93vpHl.js +29 -0
  190. package/dist/{stateDiagram-v2-FVOUBMTO-CAWy0Pkh.js.map → stateDiagram-v2-BHNVJYJU-CO93vpHl.js.map} +1 -1
  191. package/dist/styles/components/brand.css +30 -0
  192. package/dist/styles/sidebar.css +568 -0
  193. package/dist/styles/tenant-ui.css +3 -4
  194. package/dist/styles/threat-library.css +0 -1
  195. package/dist/styles/tokens.css +0 -1
  196. package/dist/{timeline-definition-YZTLITO2-CjxxCuOg.js → timeline-definition-PNZ67QCA-rsiMN1-p.js} +517 -279
  197. package/dist/timeline-definition-PNZ67QCA-rsiMN1-p.js.map +1 -0
  198. package/dist/{topology-C8cyIHlB.js → topology-B9Lv-y1-.js} +181 -182
  199. package/dist/{topology-C8cyIHlB.js.map → topology-B9Lv-y1-.js.map} +1 -1
  200. package/dist/treeView-BLDUP644-mJdM3Q6x.js +3 -0
  201. package/dist/treemap-LRROVOQU-BbNMhR6z.js +3 -0
  202. package/dist/{value-gSPnIECy.js → value-CnwEagIg.js} +2 -2
  203. package/dist/{value-gSPnIECy.js.map → value-CnwEagIg.js.map} +1 -1
  204. package/dist/{vennDiagram-LZ73GAT5-FqpGoq2s.js → vennDiagram-CIIHVFJN-JUCgWboO.js} +98 -98
  205. package/dist/{vennDiagram-LZ73GAT5-FqpGoq2s.js.map → vennDiagram-CIIHVFJN-JUCgWboO.js.map} +1 -1
  206. package/dist/visualization/mermaid-diagram/index.js +1 -1
  207. package/dist/wardley-L42UT6IY-DB53GwcN.js +3 -0
  208. package/dist/wardleyDiagram-YWT4CUSO-D9ZPcSHL.js +646 -0
  209. package/dist/wardleyDiagram-YWT4CUSO-D9ZPcSHL.js.map +1 -0
  210. package/dist/{xychartDiagram-JWTSCODW-BNEAK79X.js → xychartDiagram-2RQKCTM6-D3ufsY0S.js} +146 -143
  211. package/dist/{xychartDiagram-JWTSCODW-BNEAK79X.js.map → xychartDiagram-2RQKCTM6-D3ufsY0S.js.map} +1 -1
  212. package/package.json +1 -1
  213. package/src/components/brand/index.ts +63 -0
  214. package/src/components/brand/types.ts +9 -0
  215. package/src/components/theme/theme-studio-review.test.ts +34 -0
  216. package/src/icons/lucide.ts +1 -2
  217. package/src/react/brand/index.test.tsx +28 -0
  218. package/src/react/brand/index.tsx +38 -0
  219. package/src/react/sidebar.test.tsx +30 -0
  220. package/src/react/sidebar.tsx +52 -1
  221. package/src/sidebar/component.test.ts +109 -0
  222. package/src/sidebar/component.ts +231 -42
  223. package/src/sidebar/index.ts +1 -0
  224. package/src/sidebar/types.ts +60 -0
  225. package/src/styles/components/brand.css +30 -0
  226. package/src/styles/sidebar.css +568 -0
  227. package/src/styles/tenant-ui.css +3 -4
  228. package/src/styles/threat-library.css +0 -1
  229. package/src/styles/tokens.css +0 -1
  230. package/dist/_basePickBy-BQMPE4-n.js +0 -168
  231. package/dist/_basePickBy-BQMPE4-n.js.map +0 -1
  232. package/dist/_baseUniq-Bdp_vFUv.js +0 -684
  233. package/dist/_baseUniq-Bdp_vFUv.js.map +0 -1
  234. package/dist/architecture-PBZL5I3N-Zk3GmKE8.js +0 -3
  235. package/dist/blockDiagram-WCTKOSBZ-BH3jwWeU.js.map +0 -1
  236. package/dist/c4Diagram-IC4MRINW-OFLrunYI.js.map +0 -1
  237. package/dist/channel-LRbq43st.js +0 -7
  238. package/dist/chunk-7E7YKBS2-BsywoVTt.js +0 -25
  239. package/dist/chunk-7E7YKBS2-BsywoVTt.js.map +0 -1
  240. package/dist/chunk-7R4GIKGN-DJmroLCH.js +0 -2054
  241. package/dist/chunk-7R4GIKGN-DJmroLCH.js.map +0 -1
  242. package/dist/chunk-C72U2L5F-BwPwVDcP.js +0 -25
  243. package/dist/chunk-C72U2L5F-BwPwVDcP.js.map +0 -1
  244. package/dist/chunk-EGIJ26TM-DKd5cEgn.js +0 -25
  245. package/dist/chunk-EGIJ26TM-DKd5cEgn.js.map +0 -1
  246. package/dist/chunk-GEFDOKGD-DGJJEGSm.js.map +0 -1
  247. package/dist/chunk-GLR3WWYH-BDwmgwCA.js +0 -43
  248. package/dist/chunk-GLR3WWYH-BDwmgwCA.js.map +0 -1
  249. package/dist/chunk-HHEYEP7N-DJ1b-gA8.js +0 -12
  250. package/dist/chunk-KYZI473N-BXYCe83A.js +0 -3437
  251. package/dist/chunk-KYZI473N-BXYCe83A.js.map +0 -1
  252. package/dist/chunk-L3YUKLVL-Y5k8UNMf.js +0 -25
  253. package/dist/chunk-L3YUKLVL-Y5k8UNMf.js.map +0 -1
  254. package/dist/chunk-MX3YWQON-D43mcq1f.js.map +0 -1
  255. package/dist/chunk-NBPlniwU.js +0 -23
  256. package/dist/chunk-NQ4KR5QH-C0nWShNk.js.map +0 -1
  257. package/dist/chunk-O4XLMI2P-DtGEm9QX.js +0 -514
  258. package/dist/chunk-O4XLMI2P-DtGEm9QX.js.map +0 -1
  259. package/dist/chunk-OZEHJAEY-BsQ56PV-.js.map +0 -1
  260. package/dist/chunk-R5LLSJPH-c1IfaK5D.js.map +0 -1
  261. package/dist/chunk-WL4C6EOR-BV-op7zg.js.map +0 -1
  262. package/dist/chunk-XIRO2GV7-Bv1hlNLi.js +0 -32
  263. package/dist/chunk-XIRO2GV7-Bv1hlNLi.js.map +0 -1
  264. package/dist/chunk-XZSTWKYB-C7maKWEr.js +0 -15799
  265. package/dist/chunk-XZSTWKYB-C7maKWEr.js.map +0 -1
  266. package/dist/classDiagram-VBA2DB6C-DZfC0xPM.js +0 -31
  267. package/dist/classDiagram-v2-RAHNMMFH-CtWRD1ax.js +0 -31
  268. package/dist/clone-CliVdNc8.js +0 -10
  269. package/dist/clone-CliVdNc8.js.map +0 -1
  270. package/dist/component-C1Jiz1Ki.js +0 -103
  271. package/dist/component-C1Jiz1Ki.js.map +0 -1
  272. package/dist/dagre-BqC9mhMk.js +0 -1485
  273. package/dist/dagre-BqC9mhMk.js.map +0 -1
  274. package/dist/dagre-KLK3FWXG-DTKcsol6.js +0 -296
  275. package/dist/dagre-KLK3FWXG-DTKcsol6.js.map +0 -1
  276. package/dist/diagram-E7M64L7V-Co7O3gub.js.map +0 -1
  277. package/dist/dist-BrNloUiz.js.map +0 -1
  278. package/dist/erDiagram-INFDFZHY-C42JeR9I.js.map +0 -1
  279. package/dist/flowDiagram-PKNHOUZH-DInJjOz3.js.map +0 -1
  280. package/dist/ganttDiagram-A5KZAMGK-Dgp-4Yss.js.map +0 -1
  281. package/dist/gitGraph-HDMCJU4V-D_QsK6Rt.js +0 -3
  282. package/dist/gitGraphDiagram-K3NZZRJ6-Dr_X0dND.js +0 -628
  283. package/dist/gitGraphDiagram-K3NZZRJ6-Dr_X0dND.js.map +0 -1
  284. package/dist/graphlib-ecencZTG.js +0 -227
  285. package/dist/graphlib-ecencZTG.js.map +0 -1
  286. package/dist/info-3K5VOQVL-BbLiZXwn.js +0 -3
  287. package/dist/isArrayLikeObject-Bjsxaqj7.js +0 -580
  288. package/dist/isArrayLikeObject-Bjsxaqj7.js.map +0 -1
  289. package/dist/isEmpty-CeZZUVts.js +0 -37
  290. package/dist/isEmpty-CeZZUVts.js.map +0 -1
  291. package/dist/ishikawaDiagram-PHBUUO56-qHBJm2LT.js.map +0 -1
  292. package/dist/journeyDiagram-4ABVD52K-PgfYdoDM.js.map +0 -1
  293. package/dist/line-Cq1AZT4f.js +0 -36
  294. package/dist/math-D4gdAuwG.js +0 -12
  295. package/dist/math-D4gdAuwG.js.map +0 -1
  296. package/dist/mermaid-parser.core-Dz5qv4CI.js.map +0 -1
  297. package/dist/mermaid.core-DTiIXVKa.js +0 -923
  298. package/dist/mermaid.core-DTiIXVKa.js.map +0 -1
  299. package/dist/mindmap-definition-YRQLILUH-D95OPRMh.js.map +0 -1
  300. package/dist/packet-RMMSAZCW-D72DRs1N.js +0 -3
  301. package/dist/pie-UPGHQEXC-C8RDLrEi.js +0 -3
  302. package/dist/pieDiagram-SKSYHLDU-BREEn_Sk.js +0 -167
  303. package/dist/pieDiagram-SKSYHLDU-BREEn_Sk.js.map +0 -1
  304. package/dist/quadrantDiagram-337W2JSQ-CcKc-h2o.js.map +0 -1
  305. package/dist/radar-KQ55EAFF-DhmvjiyN.js +0 -3
  306. package/dist/requirementDiagram-Z7DCOOCP-aPcaPduF.js.map +0 -1
  307. package/dist/sequenceDiagram-2WXFIKYE-D7Vh1Zld.js +0 -4112
  308. package/dist/sequenceDiagram-2WXFIKYE-D7Vh1Zld.js.map +0 -1
  309. package/dist/stateDiagram-RAJIS63D-DdiY5cf3.js +0 -220
  310. package/dist/stateDiagram-RAJIS63D-DdiY5cf3.js.map +0 -1
  311. package/dist/stateDiagram-v2-FVOUBMTO-CAWy0Pkh.js +0 -29
  312. package/dist/timeline-definition-YZTLITO2-CjxxCuOg.js.map +0 -1
  313. package/dist/treemap-KZPCXAKY-BvLvHb2t.js +0 -3
@@ -0,0 +1,3669 @@
1
+ import { w as e } from "./src-CWnvxuyh.js";
2
+ import { n as t, r as n } from "./src-DngnQkx_.js";
3
+ import { A as r, B as i, M as a, T as o, b as s, g as c, x as l, z as u } from "./chunk-CSCIHK7Q-DyRIc27i.js";
4
+ import { a as d, r as f, u as p } from "./chunk-5ZQYHXKU-CjOcwRY6.js";
5
+ import { n as m, r as h } from "./chunk-O5CBEL6O-DThtyjPO.js";
6
+ import { n as g, t as _ } from "./chunk-L5ZTLDWV-Day0EgsR.js";
7
+ import { a as v, i as y, r as b, t as x } from "./chunk-NZK2D7GU-D4Ird7wv.js";
8
+ import { t as S } from "./rough.esm-C7tiDdBn.js";
9
+ //#region node_modules/mermaid/dist/chunks/mermaid.core/chunk-3OPIFGDE.mjs
10
+ var C = /* @__PURE__ */ t(async (t, n, r) => {
11
+ let i, a = n.useHtmlLabels || c(l()?.htmlLabels);
12
+ i = r || "node default";
13
+ let o = t.insert("g").attr("class", i).attr("id", n.domId || n.id), s = o.insert("g").attr("class", "label").attr("style", p(n.labelStyle)), f;
14
+ f = n.label === void 0 ? "" : typeof n.label == "string" ? n.label : n.label[0];
15
+ let h = !!n.icon || !!n.img, g = n.labelType === "markdown", v = await m(s, u(d(f), l()), {
16
+ useHtmlLabels: a,
17
+ width: n.width || l().flowchart?.wrappingWidth,
18
+ classes: g ? "markdown-node-label" : "",
19
+ style: n.labelStyle,
20
+ addSvgBackground: h,
21
+ markdown: g
22
+ }, l()), y = v.getBBox(), b = (n?.padding ?? 0) / 2;
23
+ if (a) {
24
+ let t = v.children[0], n = e(v);
25
+ await _(t, f), y = t.getBoundingClientRect(), n.attr("width", y.width), n.attr("height", y.height);
26
+ }
27
+ return a ? s.attr("transform", "translate(" + -y.width / 2 + ", " + -y.height / 2 + ")") : s.attr("transform", "translate(0, " + -y.height / 2 + ")"), n.centerLabel && s.attr("transform", "translate(" + -y.width / 2 + ", " + -y.height / 2 + ")"), s.insert("rect", ":first-child"), {
28
+ shapeSvg: o,
29
+ bbox: y,
30
+ halfPadding: b,
31
+ label: s
32
+ };
33
+ }, "labelHelper"), w = /* @__PURE__ */ t(async (t, n, r) => {
34
+ let i = r.useHtmlLabels ?? o(l()), a = t.insert("g").attr("class", "label").attr("style", r.labelStyle || ""), s = await m(a, u(d(n), l()), {
35
+ useHtmlLabels: i,
36
+ width: r.width || l()?.flowchart?.wrappingWidth,
37
+ style: r.labelStyle,
38
+ addSvgBackground: !!r.icon || !!r.img
39
+ }), c = s.getBBox(), f = r.padding / 2;
40
+ if (o(l())) {
41
+ let t = s.children[0], n = e(s);
42
+ c = t.getBoundingClientRect(), n.attr("width", c.width), n.attr("height", c.height);
43
+ }
44
+ return i ? a.attr("transform", "translate(" + -c.width / 2 + ", " + -c.height / 2 + ")") : a.attr("transform", "translate(0, " + -c.height / 2 + ")"), r.centerLabel && a.attr("transform", "translate(" + -c.width / 2 + ", " + -c.height / 2 + ")"), a.insert("rect", ":first-child"), {
45
+ shapeSvg: t,
46
+ bbox: c,
47
+ halfPadding: f,
48
+ label: a
49
+ };
50
+ }, "insertLabel"), T = /* @__PURE__ */ t((e, t) => {
51
+ let n = t.node().getBBox();
52
+ e.width = n.width, e.height = n.height;
53
+ }, "updateNodeBounds"), E = /* @__PURE__ */ t((e, t) => (e.look === "handDrawn" ? "rough-node" : "node") + " " + e.cssClasses + " " + (t || ""), "getNodeClasses");
54
+ function D(e) {
55
+ let t = e.map((e, t) => `${t === 0 ? "M" : "L"}${e.x},${e.y}`);
56
+ return t.push("Z"), t.join(" ");
57
+ }
58
+ t(D, "createPathFromPoints");
59
+ function O(e, t, n, r, i, a) {
60
+ let o = [], s = n - e, c = r - t, l = s / a, u = 2 * Math.PI / l, d = t + c / 2;
61
+ for (let t = 0; t <= 50; t++) {
62
+ let n = e + t / 50 * s, r = d + i * Math.sin(u * (n - e));
63
+ o.push({
64
+ x: n,
65
+ y: r
66
+ });
67
+ }
68
+ return o;
69
+ }
70
+ t(O, "generateFullSineWavePoints");
71
+ function k(e, t, n, r, i, a) {
72
+ let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
73
+ for (let i = 0; i < r; i++) {
74
+ let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
75
+ o.push({
76
+ x: -a,
77
+ y: -l
78
+ });
79
+ }
80
+ return o;
81
+ }
82
+ t(k, "generateCirclePoints");
83
+ function A(e) {
84
+ let n = Array.from(e.childNodes).filter((e) => e.tagName === "path"), r = document.createElementNS("http://www.w3.org/2000/svg", "path"), i = n.map((e) => e.getAttribute("d")).filter((e) => e !== null).join(" ");
85
+ r.setAttribute("d", i);
86
+ let a = n.find((e) => e.getAttribute("fill") !== "none"), o = n.find((e) => e.getAttribute("stroke") !== "none"), s = /* @__PURE__ */ t((e, t) => e?.getAttribute(t) ?? void 0, "getAttr");
87
+ if (a) {
88
+ let e = {
89
+ fill: s(a, "fill"),
90
+ "fill-opacity": s(a, "fill-opacity") ?? "1"
91
+ };
92
+ Object.entries(e).forEach(([e, t]) => {
93
+ t && r.setAttribute(e, t);
94
+ });
95
+ }
96
+ if (o) {
97
+ let e = {
98
+ stroke: s(o, "stroke"),
99
+ "stroke-width": s(o, "stroke-width") ?? "1",
100
+ "stroke-opacity": s(o, "stroke-opacity") ?? "1"
101
+ };
102
+ Object.entries(e).forEach(([e, t]) => {
103
+ t && r.setAttribute(e, t);
104
+ });
105
+ }
106
+ let c = document.createElementNS("http://www.w3.org/2000/svg", "g");
107
+ return c.appendChild(r), c;
108
+ }
109
+ t(A, "mergePaths");
110
+ var j = /* @__PURE__ */ t((e, t) => {
111
+ var n = e.x, r = e.y, i = t.x - n, a = t.y - r, o = e.width / 2, s = e.height / 2, c, l;
112
+ return Math.abs(a) * o > Math.abs(i) * s ? (a < 0 && (s = -s), c = a === 0 ? 0 : s * i / a, l = s) : (i < 0 && (o = -o), c = o, l = i === 0 ? 0 : o * a / i), {
113
+ x: n + c,
114
+ y: r + l
115
+ };
116
+ }, "intersectRect"), M = /* @__PURE__ */ t(async (e, t, n, r = !1, i = !1) => {
117
+ let a = t || "";
118
+ typeof a == "object" && (a = a[0]);
119
+ let s = l(), c = o(s);
120
+ return await m(e, a, {
121
+ style: n,
122
+ isTitle: r,
123
+ useHtmlLabels: c,
124
+ markdown: !1,
125
+ isNode: i,
126
+ width: Infinity
127
+ }, s);
128
+ }, "createLabel"), N = /* @__PURE__ */ t((e, t, n, r, i) => [
129
+ "M",
130
+ e + i,
131
+ t,
132
+ "H",
133
+ e + n - i,
134
+ "A",
135
+ i,
136
+ i,
137
+ 0,
138
+ 0,
139
+ 1,
140
+ e + n,
141
+ t + i,
142
+ "V",
143
+ t + r - i,
144
+ "A",
145
+ i,
146
+ i,
147
+ 0,
148
+ 0,
149
+ 1,
150
+ e + n - i,
151
+ t + r,
152
+ "H",
153
+ e + i,
154
+ "A",
155
+ i,
156
+ i,
157
+ 0,
158
+ 0,
159
+ 1,
160
+ e,
161
+ t + r - i,
162
+ "V",
163
+ t + i,
164
+ "A",
165
+ i,
166
+ i,
167
+ 0,
168
+ 0,
169
+ 1,
170
+ e + i,
171
+ t,
172
+ "Z"
173
+ ].join(" "), "createRoundedRectPathD"), P = /* @__PURE__ */ t(async (t, r) => {
174
+ n.info("Creating subgraph rect for ", r.id, r);
175
+ let i = l(), { themeVariables: a, handDrawnSeed: s } = i, { clusterBkg: c, clusterBorder: u } = a, { labelStyles: d, nodeStyles: f, borderStyles: p, backgroundStyles: h } = y(r), _ = t.insert("g").attr("class", "cluster " + r.cssClasses).attr("id", r.domId).attr("data-look", r.look), b = o(i), x = _.insert("g").attr("class", "cluster-label "), C;
176
+ C = r.labelType === "markdown" ? await m(x, r.label, {
177
+ style: r.labelStyle,
178
+ useHtmlLabels: b,
179
+ isNode: !0,
180
+ width: r.width
181
+ }) : await M(x, r.label, r.labelStyle || "", !1, !0);
182
+ let w = C.getBBox();
183
+ if (o(i)) {
184
+ let t = C.children[0], n = e(C);
185
+ w = t.getBoundingClientRect(), n.attr("width", w.width), n.attr("height", w.height);
186
+ }
187
+ let T = r.width <= w.width + r.padding ? w.width + r.padding : r.width;
188
+ r.width <= w.width + r.padding ? r.diff = (T - r.width) / 2 - r.padding : r.diff = -r.padding;
189
+ let E = r.height, D = r.x - T / 2, O = r.y - E / 2;
190
+ n.trace("Data ", r, JSON.stringify(r));
191
+ let k;
192
+ if (r.look === "handDrawn") {
193
+ let e = S.svg(_), t = v(r, {
194
+ roughness: .7,
195
+ fill: c,
196
+ stroke: u,
197
+ fillWeight: 3,
198
+ seed: s
199
+ }), i = e.path(N(D, O, T, E, 0), t);
200
+ k = _.insert(() => (n.debug("Rough node insert CXC", i), i), ":first-child"), k.select("path:nth-child(2)").attr("style", p.join(";")), k.select("path").attr("style", h.join(";").replace("fill", "stroke"));
201
+ } else k = _.insert("rect", ":first-child"), k.attr("style", f).attr("rx", r.rx).attr("ry", r.ry).attr("x", D).attr("y", O).attr("width", T).attr("height", E);
202
+ let { subGraphTitleTopMargin: A } = g(i);
203
+ if (x.attr("transform", `translate(${r.x - w.width / 2}, ${r.y - r.height / 2 + A})`), d) {
204
+ let e = x.select("span");
205
+ e && e.attr("style", d);
206
+ }
207
+ let P = k.node().getBBox();
208
+ return r.offsetX = 0, r.width = P.width, r.height = P.height, r.offsetY = w.height - r.padding / 2, r.intersect = function(e) {
209
+ return j(r, e);
210
+ }, {
211
+ cluster: _,
212
+ labelBBox: w
213
+ };
214
+ }, "rect"), F = {
215
+ rect: P,
216
+ squareRect: P,
217
+ roundedWithTitle: /* @__PURE__ */ t(async (t, n) => {
218
+ let r = l(), { themeVariables: i, handDrawnSeed: a } = r, { altBackground: s, compositeBackground: c, compositeTitleBackground: u, nodeBorder: d } = i, f = t.insert("g").attr("class", n.cssClasses).attr("id", n.domId).attr("data-id", n.id).attr("data-look", n.look), p = f.insert("g", ":first-child"), m = f.insert("g").attr("class", "cluster-label"), h = f.append("rect"), g = await M(m, n.label, n.labelStyle, void 0, !0), _ = g.getBBox();
219
+ if (o(r)) {
220
+ let t = g.children[0], n = e(g);
221
+ _ = t.getBoundingClientRect(), n.attr("width", _.width), n.attr("height", _.height);
222
+ }
223
+ let v = 0 * n.padding, y = v / 2, b = (n.width <= _.width + n.padding ? _.width + n.padding : n.width) + v;
224
+ n.width <= _.width + n.padding ? n.diff = (b - n.width) / 2 - n.padding : n.diff = -n.padding;
225
+ let x = n.height + v, C = n.height + v - _.height - 6, w = n.x - b / 2, T = n.y - x / 2;
226
+ n.width = b;
227
+ let E = n.y - n.height / 2 - y + _.height + 2, D;
228
+ if (n.look === "handDrawn") {
229
+ let e = n.cssClasses.includes("statediagram-cluster-alt"), t = S.svg(f), r = n.rx || n.ry ? t.path(N(w, T, b, x, 10), {
230
+ roughness: .7,
231
+ fill: u,
232
+ fillStyle: "solid",
233
+ stroke: d,
234
+ seed: a
235
+ }) : t.rectangle(w, T, b, x, { seed: a });
236
+ D = f.insert(() => r, ":first-child");
237
+ let i = t.rectangle(w, E, b, C, {
238
+ fill: e ? s : c,
239
+ fillStyle: e ? "hachure" : "solid",
240
+ stroke: d,
241
+ seed: a
242
+ });
243
+ D = f.insert(() => r, ":first-child"), h = f.insert(() => i);
244
+ } else D = p.insert("rect", ":first-child"), D.attr("class", "outer").attr("x", w).attr("y", T).attr("width", b).attr("height", x).attr("data-look", n.look), h.attr("class", "inner").attr("x", w).attr("y", E).attr("width", b).attr("height", C);
245
+ return m.attr("transform", `translate(${n.x - _.width / 2}, ${T + 1 - (o(r) ? 0 : 3)})`), n.height = D.node().getBBox().height, n.offsetX = 0, n.offsetY = _.height - n.padding / 2, n.labelBBox = _, n.intersect = function(e) {
246
+ return j(n, e);
247
+ }, {
248
+ cluster: f,
249
+ labelBBox: _
250
+ };
251
+ }, "roundedWithTitle"),
252
+ noteGroup: /* @__PURE__ */ t((e, t) => {
253
+ let n = e.insert("g").attr("class", "note-cluster").attr("id", t.domId), r = n.insert("rect", ":first-child"), i = 0 * t.padding, a = i / 2;
254
+ r.attr("rx", t.rx).attr("ry", t.ry).attr("x", t.x - t.width / 2 - a).attr("y", t.y - t.height / 2 - a).attr("width", t.width + i).attr("height", t.height + i).attr("fill", "none");
255
+ let o = r.node().getBBox();
256
+ return t.width = o.width, t.height = o.height, t.intersect = function(e) {
257
+ return j(t, e);
258
+ }, {
259
+ cluster: n,
260
+ labelBBox: {
261
+ width: 0,
262
+ height: 0
263
+ }
264
+ };
265
+ }, "noteGroup"),
266
+ divider: /* @__PURE__ */ t((e, t) => {
267
+ let { themeVariables: n, handDrawnSeed: r } = l(), { nodeBorder: i } = n, a = e.insert("g").attr("class", t.cssClasses).attr("id", t.domId).attr("data-look", t.look), o = a.insert("g", ":first-child"), s = 0 * t.padding, c = t.width + s;
268
+ t.diff = -t.padding;
269
+ let u = t.height + s, d = t.x - c / 2, f = t.y - u / 2;
270
+ t.width = c;
271
+ let p;
272
+ if (t.look === "handDrawn") {
273
+ let e = S.svg(a).rectangle(d, f, c, u, {
274
+ fill: "lightgrey",
275
+ roughness: .5,
276
+ strokeLineDash: [5],
277
+ stroke: i,
278
+ seed: r
279
+ });
280
+ p = a.insert(() => e, ":first-child");
281
+ } else {
282
+ p = o.insert("rect", ":first-child");
283
+ let e = "outer";
284
+ e = (t.look, "divider"), p.attr("class", e).attr("x", d).attr("y", f).attr("width", c).attr("height", u).attr("data-look", t.look);
285
+ }
286
+ return t.height = p.node().getBBox().height, t.offsetX = 0, t.offsetY = 0, t.intersect = function(e) {
287
+ return j(t, e);
288
+ }, {
289
+ cluster: a,
290
+ labelBBox: {}
291
+ };
292
+ }, "divider"),
293
+ kanbanSection: /* @__PURE__ */ t(async (t, r) => {
294
+ n.info("Creating subgraph rect for ", r.id, r);
295
+ let i = l(), { themeVariables: a, handDrawnSeed: s } = i, { clusterBkg: c, clusterBorder: u } = a, { labelStyles: d, nodeStyles: f, borderStyles: p, backgroundStyles: h } = y(r), _ = t.insert("g").attr("class", "cluster " + r.cssClasses).attr("id", r.domId).attr("data-look", r.look), b = o(i), x = _.insert("g").attr("class", "cluster-label "), C = await m(x, r.label, {
296
+ style: r.labelStyle,
297
+ useHtmlLabels: b,
298
+ isNode: !0,
299
+ width: r.width
300
+ }), w = C.getBBox();
301
+ if (o(i)) {
302
+ let t = C.children[0], n = e(C);
303
+ w = t.getBoundingClientRect(), n.attr("width", w.width), n.attr("height", w.height);
304
+ }
305
+ let T = r.width <= w.width + r.padding ? w.width + r.padding : r.width;
306
+ r.width <= w.width + r.padding ? r.diff = (T - r.width) / 2 - r.padding : r.diff = -r.padding;
307
+ let E = r.height, D = r.x - T / 2, O = r.y - E / 2;
308
+ n.trace("Data ", r, JSON.stringify(r));
309
+ let k;
310
+ if (r.look === "handDrawn") {
311
+ let e = S.svg(_), t = v(r, {
312
+ roughness: .7,
313
+ fill: c,
314
+ stroke: u,
315
+ fillWeight: 4,
316
+ seed: s
317
+ }), i = e.path(N(D, O, T, E, r.rx), t);
318
+ k = _.insert(() => (n.debug("Rough node insert CXC", i), i), ":first-child"), k.select("path:nth-child(2)").attr("style", p.join(";")), k.select("path").attr("style", h.join(";").replace("fill", "stroke"));
319
+ } else k = _.insert("rect", ":first-child"), k.attr("style", f).attr("rx", r.rx).attr("ry", r.ry).attr("x", D).attr("y", O).attr("width", T).attr("height", E);
320
+ let { subGraphTitleTopMargin: A } = g(i);
321
+ if (x.attr("transform", `translate(${r.x - w.width / 2}, ${r.y - r.height / 2 + A})`), d) {
322
+ let e = x.select("span");
323
+ e && e.attr("style", d);
324
+ }
325
+ let M = k.node().getBBox();
326
+ return r.offsetX = 0, r.width = M.width, r.height = M.height, r.offsetY = w.height - r.padding / 2, r.intersect = function(e) {
327
+ return j(r, e);
328
+ }, {
329
+ cluster: _,
330
+ labelBBox: w
331
+ };
332
+ }, "kanbanSection")
333
+ }, I = /* @__PURE__ */ new Map(), ee = /* @__PURE__ */ t(async (e, t) => {
334
+ let n = await F[t.shape || "rect"](e, t);
335
+ return I.set(t.id, n), n;
336
+ }, "insertCluster"), te = /* @__PURE__ */ t(() => {
337
+ I = /* @__PURE__ */ new Map();
338
+ }, "clear");
339
+ function L(e, t) {
340
+ return e.intersect(t);
341
+ }
342
+ t(L, "intersectNode");
343
+ var R = L;
344
+ function ne(e, t, n, r) {
345
+ var i = e.x, a = e.y, o = i - r.x, s = a - r.y, c = Math.sqrt(t * t * s * s + n * n * o * o), l = Math.abs(t * n * o / c);
346
+ r.x < i && (l = -l);
347
+ var u = Math.abs(t * n * s / c);
348
+ return r.y < a && (u = -u), {
349
+ x: i + l,
350
+ y: a + u
351
+ };
352
+ }
353
+ t(ne, "intersectEllipse");
354
+ var z = ne;
355
+ function B(e, t, n) {
356
+ return z(e, t, t, n);
357
+ }
358
+ t(B, "intersectCircle");
359
+ var V = B;
360
+ function H(e, t, n, r) {
361
+ {
362
+ let i = t.y - e.y, a = e.x - t.x, o = t.x * e.y - e.x * t.y, s = i * n.x + a * n.y + o, c = i * r.x + a * r.y + o, l = 1e-6;
363
+ if (s !== 0 && c !== 0 && re(s, c)) return;
364
+ let u = r.y - n.y, d = n.x - r.x, f = r.x * n.y - n.x * r.y, p = u * e.x + d * e.y + f, m = u * t.x + d * t.y + f;
365
+ if (Math.abs(p) < l && Math.abs(m) < l && re(p, m)) return;
366
+ let h = i * d - u * a;
367
+ if (h === 0) return;
368
+ let g = Math.abs(h / 2), _ = a * f - d * o, v = _ < 0 ? (_ - g) / h : (_ + g) / h;
369
+ return _ = u * o - i * f, {
370
+ x: v,
371
+ y: _ < 0 ? (_ - g) / h : (_ + g) / h
372
+ };
373
+ }
374
+ }
375
+ t(H, "intersectLine");
376
+ function re(e, t) {
377
+ return e * t > 0;
378
+ }
379
+ t(re, "sameSign");
380
+ var ie = H;
381
+ function U(e, t, n) {
382
+ let r = e.x, i = e.y, a = [], o = Infinity, s = Infinity;
383
+ typeof t.forEach == "function" ? t.forEach(function(e) {
384
+ o = Math.min(o, e.x), s = Math.min(s, e.y);
385
+ }) : (o = Math.min(o, t.x), s = Math.min(s, t.y));
386
+ let c = r - e.width / 2 - o, l = i - e.height / 2 - s;
387
+ for (let r = 0; r < t.length; r++) {
388
+ let i = t[r], o = t[r < t.length - 1 ? r + 1 : 0], s = ie(e, n, {
389
+ x: c + i.x,
390
+ y: l + i.y
391
+ }, {
392
+ x: c + o.x,
393
+ y: l + o.y
394
+ });
395
+ s && a.push(s);
396
+ }
397
+ return a.length ? (a.length > 1 && a.sort(function(e, t) {
398
+ let r = e.x - n.x, i = e.y - n.y, a = Math.sqrt(r * r + i * i), o = t.x - n.x, s = t.y - n.y, c = Math.sqrt(o * o + s * s);
399
+ return a < c ? -1 : a === c ? 0 : 1;
400
+ }), a[0]) : e;
401
+ }
402
+ t(U, "intersectPolygon");
403
+ var W = {
404
+ node: R,
405
+ circle: V,
406
+ ellipse: z,
407
+ polygon: U,
408
+ rect: j
409
+ };
410
+ function G(e, t) {
411
+ let { labelStyles: r } = y(t);
412
+ t.labelStyle = r;
413
+ let i = E(t), a = i;
414
+ i || (a = "anchor");
415
+ let o = e.insert("g").attr("class", a).attr("id", t.domId || t.id), { cssStyles: s } = t, c = S.svg(o), l = v(t, {
416
+ fill: "black",
417
+ stroke: "none",
418
+ fillStyle: "solid"
419
+ });
420
+ t.look !== "handDrawn" && (l.roughness = 0);
421
+ let u = c.circle(0, 0, 2, l), d = o.insert(() => u, ":first-child");
422
+ return d.attr("class", "anchor").attr("style", p(s)), T(t, d), t.intersect = function(e) {
423
+ return n.info("Circle intersect", t, 1, e), W.circle(t, 1, e);
424
+ }, o;
425
+ }
426
+ t(G, "anchor");
427
+ function K(e, t, n, r, i, a, o) {
428
+ let s = (e + n) / 2, c = (t + r) / 2, l = Math.atan2(r - t, n - e), u = (n - e) / 2, d = (r - t) / 2, f = u / i, p = d / a, m = Math.sqrt(f ** 2 + p ** 2);
429
+ if (m > 1) throw Error("The given radii are too small to create an arc between the points.");
430
+ let h = Math.sqrt(1 - m ** 2), g = s + h * a * Math.sin(l) * (o ? -1 : 1), _ = c - h * i * Math.cos(l) * (o ? -1 : 1), v = Math.atan2((t - _) / a, (e - g) / i), y = Math.atan2((r - _) / a, (n - g) / i) - v;
431
+ o && y < 0 && (y += 2 * Math.PI), !o && y > 0 && (y -= 2 * Math.PI);
432
+ let b = [];
433
+ for (let e = 0; e < 20; e++) {
434
+ let t = v + e / 19 * y, n = g + i * Math.cos(t), r = _ + a * Math.sin(t);
435
+ b.push({
436
+ x: n,
437
+ y: r
438
+ });
439
+ }
440
+ return b;
441
+ }
442
+ t(K, "generateArcPoints");
443
+ function ae(e, t, n) {
444
+ let [r, i] = [t, n].sort((e, t) => t - e);
445
+ return i * (1 - Math.sqrt(1 - (e / r / 2) ** 2));
446
+ }
447
+ t(ae, "calculateArcSagitta");
448
+ async function oe(e, n) {
449
+ let { labelStyles: r, nodeStyles: i } = y(n);
450
+ n.labelStyle = r;
451
+ let a = n.padding ?? 0, o = n.look === "neo" ? 16 : a, s = n.look === "neo" ? 12 : a, c = /* @__PURE__ */ t((e) => e + s, "calcTotalHeight"), l = /* @__PURE__ */ t((e) => {
452
+ let t = e / 2;
453
+ return [t / (2.5 + e / 50), t];
454
+ }, "calcEllipseRadius"), { shapeSvg: u, bbox: d } = await C(e, n, E(n)), f = c(n?.height ? n?.height : d.height), [p, m] = l(f), h = ae(f, p, m), g = (n?.width ? n?.width : d.width) + o * 2 + h - h, _ = f, { cssStyles: b } = n, x = [
455
+ {
456
+ x: g / 2,
457
+ y: -_ / 2
458
+ },
459
+ {
460
+ x: -g / 2,
461
+ y: -_ / 2
462
+ },
463
+ ...K(-g / 2, -_ / 2, -g / 2, _ / 2, p, m, !1),
464
+ {
465
+ x: g / 2,
466
+ y: _ / 2
467
+ },
468
+ ...K(g / 2, _ / 2, g / 2, -_ / 2, p, m, !0)
469
+ ], w = S.svg(u), O = v(n, {});
470
+ n.look !== "handDrawn" && (O.roughness = 0, O.fillStyle = "solid");
471
+ let k = D(x), A = w.path(k, O), j = u.insert(() => A, ":first-child");
472
+ return j.attr("class", "basic label-container outer-path"), b && n.look !== "handDrawn" && j.selectAll("path").attr("style", b), i && n.look !== "handDrawn" && j.selectAll("path").attr("style", i), j.attr("transform", `translate(${p / 2}, 0)`), T(n, j), n.intersect = function(e) {
473
+ return W.polygon(n, x, e);
474
+ }, u;
475
+ }
476
+ t(oe, "bowTieRect");
477
+ function q(e, t, n, r) {
478
+ return e.insert("polygon", ":first-child").attr("points", r.map(function(e) {
479
+ return e.x + "," + e.y;
480
+ }).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + n / 2 + ")");
481
+ }
482
+ t(q, "insertPolygonShape");
483
+ var se = 12;
484
+ async function ce(e, t) {
485
+ let { labelStyles: n, nodeStyles: r } = y(t);
486
+ t.labelStyle = n;
487
+ let i = t.padding ?? 0, a = t.look === "neo" ? 28 : i, o = t.look === "neo" ? 24 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.width ?? c.width) + (t.look === "neo" ? a * 2 : a + se), u = (t?.height ?? c.height) + (t.look === "neo" ? o * 2 : o), d = l, f = -u, p = [
488
+ {
489
+ x: 0 + se,
490
+ y: f
491
+ },
492
+ {
493
+ x: d,
494
+ y: f
495
+ },
496
+ {
497
+ x: d,
498
+ y: 0
499
+ },
500
+ {
501
+ x: 0,
502
+ y: 0
503
+ },
504
+ {
505
+ x: 0,
506
+ y: f + se
507
+ },
508
+ {
509
+ x: 0 + se,
510
+ y: f
511
+ }
512
+ ], m, { cssStyles: h } = t;
513
+ if (t.look === "handDrawn") {
514
+ let e = S.svg(s), n = v(t, {}), r = D(p), i = e.path(r, n);
515
+ m = s.insert(() => i, ":first-child").attr("transform", `translate(${-l / 2}, ${u / 2})`), h && m.attr("style", h);
516
+ } else m = q(s, l, u, p);
517
+ return r && m.attr("style", r), T(t, m), t.intersect = function(e) {
518
+ return W.polygon(t, p, e);
519
+ }, s;
520
+ }
521
+ t(ce, "card");
522
+ function le(e, t) {
523
+ let { nodeStyles: n } = y(t);
524
+ t.label = "";
525
+ let r = e.insert("g").attr("class", E(t)).attr("id", t.domId ?? t.id), { cssStyles: i } = t, a = Math.max(28, t.width ?? 0), o = [
526
+ {
527
+ x: 0,
528
+ y: a / 2
529
+ },
530
+ {
531
+ x: a / 2,
532
+ y: 0
533
+ },
534
+ {
535
+ x: 0,
536
+ y: -a / 2
537
+ },
538
+ {
539
+ x: -a / 2,
540
+ y: 0
541
+ }
542
+ ], s = S.svg(r), c = v(t, {});
543
+ t.look !== "handDrawn" && (c.roughness = 0, c.fillStyle = "solid");
544
+ let l = D(o), u = s.path(l, c), d = r.insert(() => u, ":first-child");
545
+ return i && t.look !== "handDrawn" && d.selectAll("path").attr("style", i), n && t.look !== "handDrawn" && d.selectAll("path").attr("style", n), t.width = 28, t.height = 28, t.intersect = function(e) {
546
+ return W.polygon(t, o, e);
547
+ }, r;
548
+ }
549
+ t(le, "choice");
550
+ async function ue(e, t, r) {
551
+ let { labelStyles: i, nodeStyles: a } = y(t);
552
+ t.labelStyle = i;
553
+ let { shapeSvg: o, bbox: s, halfPadding: c } = await C(e, t, E(t)), l = r?.padding ?? c, u = t.look === "neo" ? s.width / 2 + 32 : s.width / 2 + l, d, { cssStyles: f } = t;
554
+ if (t.look === "handDrawn") {
555
+ let e = S.svg(o), n = v(t, {}), r = e.circle(0, 0, u * 2, n);
556
+ d = o.insert(() => r, ":first-child"), d.attr("class", "basic label-container").attr("style", p(f));
557
+ } else d = o.insert("circle", ":first-child").attr("class", "basic label-container").attr("style", a).attr("r", u).attr("cx", 0).attr("cy", 0);
558
+ return T(t, d), t.calcIntersect = function(e, t) {
559
+ let n = e.width / 2;
560
+ return W.circle(e, n, t);
561
+ }, t.intersect = function(e) {
562
+ return n.info("Circle intersect", t, u, e), W.circle(t, u, e);
563
+ }, o;
564
+ }
565
+ t(ue, "circle");
566
+ function de(e) {
567
+ let t = Math.cos(Math.PI / 4), n = Math.sin(Math.PI / 4), r = e * 2, i = {
568
+ x: r / 2 * t,
569
+ y: r / 2 * n
570
+ }, a = {
571
+ x: -(r / 2) * t,
572
+ y: r / 2 * n
573
+ }, o = {
574
+ x: -(r / 2) * t,
575
+ y: -(r / 2) * n
576
+ }, s = {
577
+ x: r / 2 * t,
578
+ y: -(r / 2) * n
579
+ };
580
+ return `M ${a.x},${a.y} L ${s.x},${s.y}
581
+ M ${i.x},${i.y} L ${o.x},${o.y}`;
582
+ }
583
+ t(de, "createLine");
584
+ function fe(e, t) {
585
+ let { labelStyles: r, nodeStyles: i } = y(t);
586
+ t.labelStyle = r, t.label = "";
587
+ let a = e.insert("g").attr("class", E(t)).attr("id", t.domId ?? t.id), o = Math.max(30, t?.width ?? 0), { cssStyles: s } = t, c = S.svg(a), l = v(t, {});
588
+ t.look !== "handDrawn" && (l.roughness = 0, l.fillStyle = "solid");
589
+ let u = c.circle(0, 0, o * 2, l), d = de(o), f = c.path(d, l), p = a.insert(() => u, ":first-child");
590
+ return p.insert(() => f), p.attr("class", "outer-path"), s && t.look !== "handDrawn" && p.selectAll("path").attr("style", s), i && t.look !== "handDrawn" && p.selectAll("path").attr("style", i), T(t, p), t.intersect = function(e) {
591
+ return n.info("crossedCircle intersect", t, {
592
+ radius: o,
593
+ point: e
594
+ }), W.circle(t, o, e);
595
+ }, a;
596
+ }
597
+ t(fe, "crossedCircle");
598
+ function J(e, t, n, r = 100, i = 0, a = 180) {
599
+ let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
600
+ for (let i = 0; i < r; i++) {
601
+ let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
602
+ o.push({
603
+ x: -a,
604
+ y: -l
605
+ });
606
+ }
607
+ return o;
608
+ }
609
+ t(J, "generateCirclePoints");
610
+ async function pe(e, t) {
611
+ let { labelStyles: n, nodeStyles: r } = y(t);
612
+ t.labelStyle = n;
613
+ let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = t.look === "neo" ? 18 : t.padding ?? 0, c = t.look === "neo" ? 12 : t.padding ?? 0, l = a.width + s, u = a.height + c, d = Math.max(5, u * .1), { cssStyles: f } = t, p = [
614
+ ...J(l / 2, -u / 2, d, 30, -90, 0),
615
+ {
616
+ x: -l / 2 - d,
617
+ y: d
618
+ },
619
+ ...J(l / 2 + d * 2, -d, d, 20, -180, -270),
620
+ ...J(l / 2 + d * 2, d, d, 20, -90, -180),
621
+ {
622
+ x: -l / 2 - d,
623
+ y: -u / 2
624
+ },
625
+ ...J(l / 2, u / 2, d, 20, 0, 90)
626
+ ], m = [
627
+ {
628
+ x: l / 2,
629
+ y: -u / 2 - d
630
+ },
631
+ {
632
+ x: -l / 2,
633
+ y: -u / 2 - d
634
+ },
635
+ ...J(l / 2, -u / 2, d, 20, -90, 0),
636
+ {
637
+ x: -l / 2 - d,
638
+ y: -d
639
+ },
640
+ ...J(l / 2 + l * .1, -d, d, 20, -180, -270),
641
+ ...J(l / 2 + l * .1, d, d, 20, -90, -180),
642
+ {
643
+ x: -l / 2 - d,
644
+ y: u / 2
645
+ },
646
+ ...J(l / 2, u / 2, d, 20, 0, 90),
647
+ {
648
+ x: -l / 2,
649
+ y: u / 2 + d
650
+ },
651
+ {
652
+ x: l / 2,
653
+ y: u / 2 + d
654
+ }
655
+ ], h = S.svg(i), g = v(t, { fill: "none" });
656
+ t.look !== "handDrawn" && (g.roughness = 0, g.fillStyle = "solid");
657
+ let _ = D(p).replace("Z", ""), b = h.path(_, g), x = D(m), w = h.path(x, { ...g }), O = i.insert("g", ":first-child");
658
+ return O.insert(() => w, ":first-child").attr("stroke-opacity", 0), O.insert(() => b, ":first-child"), O.attr("class", "text"), f && t.look !== "handDrawn" && O.selectAll("path").attr("style", f), r && t.look !== "handDrawn" && O.selectAll("path").attr("style", r), O.attr("transform", `translate(${d}, 0)`), o.attr("transform", `translate(${-l / 2 + d - (a.x - (a.left ?? 0))},${-u / 2 + (t.padding ?? 0) / 2 - (a.y - (a.top ?? 0))})`), T(t, O), t.intersect = function(e) {
659
+ return W.polygon(t, m, e);
660
+ }, i;
661
+ }
662
+ t(pe, "curlyBraceLeft");
663
+ function Y(e, t, n, r = 100, i = 0, a = 180) {
664
+ let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
665
+ for (let i = 0; i < r; i++) {
666
+ let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
667
+ o.push({
668
+ x: a,
669
+ y: l
670
+ });
671
+ }
672
+ return o;
673
+ }
674
+ t(Y, "generateCirclePoints");
675
+ async function me(e, t) {
676
+ let { labelStyles: n, nodeStyles: r } = y(t);
677
+ t.labelStyle = n;
678
+ let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = t.look === "neo" ? 18 : t.padding ?? 0, c = t.look === "neo" ? 12 : t.padding ?? 0, l = a.width + (t.look === "neo" ? s * 2 : s), u = a.height + (t.look === "neo" ? c * 2 : c), d = Math.max(5, u * .1), { cssStyles: f } = t, p = [
679
+ ...Y(l / 2, -u / 2, d, 20, -90, 0),
680
+ {
681
+ x: l / 2 + d,
682
+ y: -d
683
+ },
684
+ ...Y(l / 2 + d * 2, -d, d, 20, -180, -270),
685
+ ...Y(l / 2 + d * 2, d, d, 20, -90, -180),
686
+ {
687
+ x: l / 2 + d,
688
+ y: u / 2
689
+ },
690
+ ...Y(l / 2, u / 2, d, 20, 0, 90)
691
+ ], m = [
692
+ {
693
+ x: -l / 2,
694
+ y: -u / 2 - d
695
+ },
696
+ {
697
+ x: l / 2,
698
+ y: -u / 2 - d
699
+ },
700
+ ...Y(l / 2, -u / 2, d, 20, -90, 0),
701
+ {
702
+ x: l / 2 + d,
703
+ y: -d
704
+ },
705
+ ...Y(l / 2 + d * 2, -d, d, 20, -180, -270),
706
+ ...Y(l / 2 + d * 2, d, d, 20, -90, -180),
707
+ {
708
+ x: l / 2 + d,
709
+ y: u / 2
710
+ },
711
+ ...Y(l / 2, u / 2, d, 20, 0, 90),
712
+ {
713
+ x: l / 2,
714
+ y: u / 2 + d
715
+ },
716
+ {
717
+ x: -l / 2,
718
+ y: u / 2 + d
719
+ }
720
+ ], h = S.svg(i), g = v(t, { fill: "none" });
721
+ t.look !== "handDrawn" && (g.roughness = 0, g.fillStyle = "solid");
722
+ let _ = D(p).replace("Z", ""), b = h.path(_, g), x = D(m), w = h.path(x, { ...g }), O = i.insert("g", ":first-child");
723
+ return O.insert(() => w, ":first-child").attr("stroke-opacity", 0), O.insert(() => b, ":first-child"), O.attr("class", "text"), f && t.look !== "handDrawn" && O.selectAll("path").attr("style", f), r && t.look !== "handDrawn" && O.selectAll("path").attr("style", r), O.attr("transform", `translate(${-d}, 0)`), o.attr("transform", `translate(${-l / 2 + (t.padding ?? 0) / 2 - (a.x - (a.left ?? 0))},${-u / 2 + (t.padding ?? 0) / 2 - (a.y - (a.top ?? 0))})`), T(t, O), t.intersect = function(e) {
724
+ return W.polygon(t, m, e);
725
+ }, i;
726
+ }
727
+ t(me, "curlyBraceRight");
728
+ function X(e, t, n, r = 100, i = 0, a = 180) {
729
+ let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
730
+ for (let i = 0; i < r; i++) {
731
+ let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
732
+ o.push({
733
+ x: -a,
734
+ y: -l
735
+ });
736
+ }
737
+ return o;
738
+ }
739
+ t(X, "generateCirclePoints");
740
+ async function he(e, t) {
741
+ let { labelStyles: n, nodeStyles: r } = y(t);
742
+ t.labelStyle = n;
743
+ let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = t.look === "neo" ? 18 : t.padding ?? 0, c = t.look === "neo" ? 12 : t.padding ?? 0, l = a.width + (t.look === "neo" ? s * 2 : s), u = a.height + (t.look === "neo" ? c * 2 : c), d = Math.max(5, u * .1), { cssStyles: f } = t, p = [
744
+ ...X(l / 2, -u / 2, d, 30, -90, 0),
745
+ {
746
+ x: -l / 2 - d,
747
+ y: d
748
+ },
749
+ ...X(l / 2 + d * 2, -d, d, 20, -180, -270),
750
+ ...X(l / 2 + d * 2, d, d, 20, -90, -180),
751
+ {
752
+ x: -l / 2 - d,
753
+ y: -u / 2
754
+ },
755
+ ...X(l / 2, u / 2, d, 20, 0, 90)
756
+ ], m = [
757
+ ...X(-l / 2 + d + d / 2, -u / 2, d, 20, -90, -180),
758
+ {
759
+ x: l / 2 - d / 2,
760
+ y: d
761
+ },
762
+ ...X(-l / 2 - d / 2, -d, d, 20, 0, 90),
763
+ ...X(-l / 2 - d / 2, d, d, 20, -90, 0),
764
+ {
765
+ x: l / 2 - d / 2,
766
+ y: -d
767
+ },
768
+ ...X(-l / 2 + d + d / 2, u / 2, d, 30, -180, -270)
769
+ ], h = [
770
+ {
771
+ x: l / 2,
772
+ y: -u / 2 - d
773
+ },
774
+ {
775
+ x: -l / 2,
776
+ y: -u / 2 - d
777
+ },
778
+ ...X(l / 2, -u / 2, d, 20, -90, 0),
779
+ {
780
+ x: -l / 2 - d,
781
+ y: -d
782
+ },
783
+ ...X(l / 2 + d * 2, -d, d, 20, -180, -270),
784
+ ...X(l / 2 + d * 2, d, d, 20, -90, -180),
785
+ {
786
+ x: -l / 2 - d,
787
+ y: u / 2
788
+ },
789
+ ...X(l / 2, u / 2, d, 20, 0, 90),
790
+ {
791
+ x: -l / 2,
792
+ y: u / 2 + d
793
+ },
794
+ {
795
+ x: l / 2 - d - d / 2,
796
+ y: u / 2 + d
797
+ },
798
+ ...X(-l / 2 + d + d / 2, -u / 2, d, 20, -90, -180),
799
+ {
800
+ x: l / 2 - d / 2,
801
+ y: d
802
+ },
803
+ ...X(-l / 2 - d / 2, -d, d, 20, 0, 90),
804
+ ...X(-l / 2 - d / 2, d, d, 20, -90, 0),
805
+ {
806
+ x: l / 2 - d / 2,
807
+ y: -d
808
+ },
809
+ ...X(-l / 2 + d + d / 2, u / 2, d, 30, -180, -270)
810
+ ], g = S.svg(i), _ = v(t, { fill: "none" });
811
+ t.look !== "handDrawn" && (_.roughness = 0, _.fillStyle = "solid");
812
+ let b = D(p).replace("Z", ""), x = g.path(b, _), w = D(m).replace("Z", ""), O = g.path(w, _), k = D(h), A = g.path(k, { ..._ }), j = i.insert("g", ":first-child");
813
+ return j.insert(() => A, ":first-child").attr("stroke-opacity", 0), j.insert(() => x, ":first-child"), j.insert(() => O, ":first-child"), j.attr("class", "text"), f && t.look !== "handDrawn" && j.selectAll("path").attr("style", f), r && t.look !== "handDrawn" && j.selectAll("path").attr("style", r), j.attr("transform", `translate(${d - d / 4}, 0)`), o.attr("transform", `translate(${-l / 2 + (t.padding ?? 0) / 2 - (a.x - (a.left ?? 0))},${-u / 2 + (t.padding ?? 0) / 2 - (a.y - (a.top ?? 0))})`), T(t, j), t.intersect = function(e) {
814
+ return W.polygon(t, h, e);
815
+ }, i;
816
+ }
817
+ t(he, "curlyBraces");
818
+ async function ge(e, t) {
819
+ let { labelStyles: n, nodeStyles: r } = y(t);
820
+ t.labelStyle = n;
821
+ let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = Math.max(20, (c.width + a * 2) * 1.25, t?.width ?? 0), u = Math.max(5, c.height + o * 2, t?.height ?? 0), d = u / 2, { cssStyles: f } = t, p = S.svg(s), m = v(t, {});
822
+ t.look !== "handDrawn" && (m.roughness = 0, m.fillStyle = "solid");
823
+ let h = l, g = u, _ = h - d, b = g / 4, x = [
824
+ {
825
+ x: _,
826
+ y: 0
827
+ },
828
+ {
829
+ x: b,
830
+ y: 0
831
+ },
832
+ {
833
+ x: 0,
834
+ y: g / 2
835
+ },
836
+ {
837
+ x: b,
838
+ y: g
839
+ },
840
+ {
841
+ x: _,
842
+ y: g
843
+ },
844
+ ...k(-_, -g / 2, d, 50, 270, 90)
845
+ ], w = D(x), O = p.path(w, m), A = s.insert(() => O, ":first-child");
846
+ return A.attr("class", "basic label-container outer-path"), f && t.look !== "handDrawn" && A.selectChildren("path").attr("style", f), r && t.look !== "handDrawn" && A.selectChildren("path").attr("style", r), A.attr("transform", `translate(${-l / 2}, ${-u / 2})`), T(t, A), t.intersect = function(e) {
847
+ return W.polygon(t, x, e);
848
+ }, s;
849
+ }
850
+ t(ge, "curvedTrapezoid");
851
+ var _e = /* @__PURE__ */ t((e, t, n, r, i, a) => [
852
+ `M${e},${t + a}`,
853
+ `a${i},${a} 0,0,0 ${n},0`,
854
+ `a${i},${a} 0,0,0 ${-n},0`,
855
+ `l0,${r}`,
856
+ `a${i},${a} 0,0,0 ${n},0`,
857
+ `l0,${-r}`
858
+ ].join(" "), "createCylinderPathD"), ve = /* @__PURE__ */ t((e, t, n, r, i, a) => [
859
+ `M${e},${t + a}`,
860
+ `M${e + n},${t + a}`,
861
+ `a${i},${a} 0,0,0 ${-n},0`,
862
+ `l0,${r}`,
863
+ `a${i},${a} 0,0,0 ${n},0`,
864
+ `l0,${-r}`
865
+ ].join(" "), "createOuterCylinderPathD"), ye = /* @__PURE__ */ t((e, t, n, r, i, a) => [`M${e - n / 2},${-r / 2}`, `a${i},${a} 0,0,0 ${n},0`].join(" "), "createInnerCylinderPathD"), be = 8, xe = 8;
866
+ async function Se(e, t) {
867
+ let { labelStyles: n, nodeStyles: r } = y(t);
868
+ t.labelStyle = n;
869
+ let i = t.padding ?? 0, a = t.look === "neo" ? 24 : i, o = t.look === "neo" ? 24 : i;
870
+ if (t.width || t.height) {
871
+ let e = t.width ?? 0;
872
+ t.width = (t.width ?? 0) - o, t.width < xe && (t.width = xe);
873
+ let n = e / 2 / (2.5 + e / 50);
874
+ t.height = (t.height ?? 0) - a - n * 3, t.height < be && (t.height = be);
875
+ }
876
+ let { shapeSvg: s, bbox: c, label: l } = await C(e, t, E(t)), u = (t.width ? t.width : c.width) + o, d = u / 2, f = d / (2.5 + u / 50), m = (t.height ? t.height : c.height) + a + f, h, { cssStyles: g } = t;
877
+ if (t.look === "handDrawn") {
878
+ let e = S.svg(s), n = ve(0, 0, u, m, d, f), r = ye(0, f, u, m, d, f), i = v(t, {}), a = e.path(n, i), o = e.path(r, v(t, { fill: "none" }));
879
+ h = s.insert(() => o, ":first-child"), h = s.insert(() => a, ":first-child"), h.attr("class", "basic label-container"), g && h.attr("style", g);
880
+ } else {
881
+ let e = _e(0, 0, u, m, d, f);
882
+ h = s.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container outer-path").attr("style", p(g)).attr("style", r);
883
+ }
884
+ return h.attr("label-offset-y", f), h.attr("transform", `translate(${-u / 2}, ${-(m / 2 + f)})`), T(t, h), l.attr("transform", `translate(${-(c.width / 2) - (c.x - (c.left ?? 0))}, ${-(c.height / 2) + (t.padding ?? 0) / 1.5 - (c.y - (c.top ?? 0))})`), t.intersect = function(e) {
885
+ let n = W.rect(t, e), r = n.x - (t.x ?? 0);
886
+ if (d != 0 && (Math.abs(r) < (t.width ?? 0) / 2 || Math.abs(r) == (t.width ?? 0) / 2 && Math.abs(n.y - (t.y ?? 0)) > (t.height ?? 0) / 2 - f)) {
887
+ let i = f * f * (1 - r * r / (d * d));
888
+ i > 0 && (i = Math.sqrt(i)), i = f - i, e.y - (t.y ?? 0) > 0 && (i = -i), n.y += i;
889
+ }
890
+ return n;
891
+ }, s;
892
+ }
893
+ t(Se, "cylinder");
894
+ async function Ce(e, t, n) {
895
+ let { labelStyles: r, nodeStyles: i } = y(t);
896
+ t.labelStyle = r;
897
+ let { shapeSvg: a, bbox: o } = await C(e, t, E(t)), s = Math.max(o.width + n.labelPaddingX * 2, t?.width || 0), c = Math.max(o.height + n.labelPaddingY * 2, t?.height || 0), l = -s / 2, u = -c / 2, d, { rx: f, ry: m } = t, { cssStyles: h } = t;
898
+ if (n?.rx && n.ry && (f = n.rx, m = n.ry), t.look === "handDrawn") {
899
+ let e = S.svg(a), n = v(t, {}), r = f || m ? e.path(N(l, u, s, c, f || 0), n) : e.rectangle(l, u, s, c, n);
900
+ d = a.insert(() => r, ":first-child"), d.attr("class", "basic label-container").attr("style", p(h));
901
+ } else d = a.insert("rect", ":first-child"), d.attr("class", "basic label-container").attr("style", i).attr("rx", p(f)).attr("ry", p(m)).attr("x", l).attr("y", u).attr("width", s).attr("height", c);
902
+ return T(t, d), t.calcIntersect = function(e, t) {
903
+ return W.rect(e, t);
904
+ }, t.intersect = function(e) {
905
+ return W.rect(t, e);
906
+ }, a;
907
+ }
908
+ t(Ce, "drawRect");
909
+ async function we(e, t) {
910
+ let { cssClasses: n, labelPaddingX: r, labelPaddingY: i, padding: a, width: o, height: s } = t, c = await Ce(e, t, {
911
+ rx: 0,
912
+ ry: 0,
913
+ classes: n ?? "",
914
+ labelPaddingX: r ?? (a ?? 0) * 2,
915
+ labelPaddingY: i ?? a ?? 0
916
+ });
917
+ if (t.look === "handDrawn") {
918
+ let e = S.svg(c), n = v(t, {}), r = c.select(".basic.label-container > path:nth-child(2)"), i = r.node();
919
+ if (!i) return c;
920
+ let a = null;
921
+ if (i instanceof SVGGraphicsElement) a = i.getBBox();
922
+ else return c;
923
+ return c.insert(() => e.line(a.x, a.y, a.x + a.width, a.y, n), ".basic.label-container g.label"), c.insert(() => e.line(a.x, a.y + a.height, a.x + a.width, a.y + a.height, n), ".basic.label-container g.label"), r.remove(), c;
924
+ }
925
+ let l = c.select(".basic.label-container"), u = (Number(l.attr("width")) || o) ?? 0, d = (Number(l.attr("height")) || s) ?? 0;
926
+ return u > 0 && d > 0 && l.attr("stroke-dasharray", `${u} ${d}`), c;
927
+ }
928
+ t(we, "datastore");
929
+ async function Te(e, t) {
930
+ let { labelStyles: n, nodeStyles: r } = y(t);
931
+ t.labelStyle = n;
932
+ let i = t.look === "neo" ? 16 : t.padding ?? 0, a = t.look === "neo" ? 16 : t.padding ?? 0, { shapeSvg: o, bbox: s, label: c } = await C(e, t, E(t)), l = s.width + i, u = s.height + a, d = u * .2, f = -l / 2, p = -u / 2 - d / 2, { cssStyles: m } = t, h = S.svg(o), g = v(t, {});
933
+ t.look !== "handDrawn" && (g.roughness = 0, g.fillStyle = "solid");
934
+ let _ = [
935
+ {
936
+ x: f,
937
+ y: p + d
938
+ },
939
+ {
940
+ x: -f,
941
+ y: p + d
942
+ },
943
+ {
944
+ x: -f,
945
+ y: -p
946
+ },
947
+ {
948
+ x: f,
949
+ y: -p
950
+ },
951
+ {
952
+ x: f,
953
+ y: p
954
+ },
955
+ {
956
+ x: -f,
957
+ y: p
958
+ },
959
+ {
960
+ x: -f,
961
+ y: p + d
962
+ }
963
+ ], b = h.polygon(_.map((e) => [e.x, e.y]), g), x = o.insert(() => b, ":first-child");
964
+ return x.attr("class", "basic label-container outer-path"), m && t.look !== "handDrawn" && x.selectAll("path").attr("style", m), r && t.look !== "handDrawn" && x.selectAll("path").attr("style", r), c.attr("transform", `translate(${f + (t.padding ?? 0) / 2 - (s.x - (s.left ?? 0))}, ${p + d + (t.padding ?? 0) / 2 - (s.y - (s.top ?? 0))})`), T(t, x), t.intersect = function(e) {
965
+ return W.rect(t, e);
966
+ }, o;
967
+ }
968
+ t(Te, "dividedRectangle");
969
+ async function Ee(e, t) {
970
+ let { labelStyles: r, nodeStyles: i } = y(t), a = t.look === "neo" ? 12 : 5;
971
+ t.labelStyle = r;
972
+ let o = t.padding ?? 0, s = t.look === "neo" ? 16 : o, { shapeSvg: c, bbox: l } = await C(e, t, E(t)), u = (t?.width ? t?.width / 2 : l.width / 2) + (s ?? 0), d = u - a, f, { cssStyles: m } = t;
973
+ if (t.look === "handDrawn") {
974
+ let e = S.svg(c), n = v(t, {
975
+ roughness: .2,
976
+ strokeWidth: 2.5
977
+ }), r = v(t, {
978
+ roughness: .2,
979
+ strokeWidth: 1.5
980
+ }), i = e.circle(0, 0, u * 2, n), a = e.circle(0, 0, d * 2, r);
981
+ f = c.insert("g", ":first-child"), f.attr("class", p(t.cssClasses)).attr("style", p(m)), f.node()?.appendChild(i), f.node()?.appendChild(a);
982
+ } else {
983
+ f = c.insert("g", ":first-child");
984
+ let e = f.insert("circle", ":first-child"), t = f.insert("circle");
985
+ f.attr("class", "basic label-container").attr("style", i), e.attr("class", "outer-circle").attr("style", i).attr("r", u).attr("cx", 0).attr("cy", 0), t.attr("class", "inner-circle").attr("style", i).attr("r", d).attr("cx", 0).attr("cy", 0);
986
+ }
987
+ return T(t, f), t.intersect = function(e) {
988
+ return n.info("DoubleCircle intersect", t, u, e), W.circle(t, u, e);
989
+ }, c;
990
+ }
991
+ t(Ee, "doublecircle");
992
+ function De(e, t, { config: { themeVariables: r } }) {
993
+ let { labelStyles: i, nodeStyles: a } = y(t);
994
+ t.label = "", t.labelStyle = i;
995
+ let o = e.insert("g").attr("class", E(t)).attr("id", t.domId ?? t.id), { cssStyles: s } = t, c = S.svg(o), { nodeBorder: l } = r, u = v(t, { fillStyle: "solid" });
996
+ t.look !== "handDrawn" && (u.roughness = 0);
997
+ let d = c.circle(0, 0, 14, u), f = o.insert(() => d, ":first-child");
998
+ return f.selectAll("path").attr("style", `fill: ${l} !important;`), s && s.length > 0 && t.look !== "handDrawn" && f.selectAll("path").attr("style", s), a && t.look !== "handDrawn" && f.selectAll("path").attr("style", a), T(t, f), t.intersect = function(e) {
999
+ return n.info("filledCircle intersect", t, {
1000
+ radius: 7,
1001
+ point: e
1002
+ }), W.circle(t, 7, e);
1003
+ }, o;
1004
+ }
1005
+ t(De, "filledCircle");
1006
+ var Oe = 10, ke = 10;
1007
+ async function Ae(e, t) {
1008
+ let { labelStyles: r, nodeStyles: i } = y(t);
1009
+ t.labelStyle = r;
1010
+ let a = t.padding ?? 0, o = t.look === "neo" ? a * 2 : a;
1011
+ (t.width || t.height) && (t.height = t?.height ?? 0, t.height < Oe && (t.height = Oe), t.width = (t?.width ?? 0) - o - o / 2, t.width < ke && (t.width = ke));
1012
+ let { shapeSvg: s, bbox: c, label: l } = await C(e, t, E(t)), u = (t?.width ? t?.width : c.width) + (o ?? 0), d = t?.height ? t?.height : u + c.height, f = d, p = [
1013
+ {
1014
+ x: 0,
1015
+ y: -d
1016
+ },
1017
+ {
1018
+ x: f,
1019
+ y: -d
1020
+ },
1021
+ {
1022
+ x: f / 2,
1023
+ y: 0
1024
+ }
1025
+ ], { cssStyles: m } = t, h = S.svg(s), g = v(t, {});
1026
+ t.look !== "handDrawn" && (g.roughness = 0, g.fillStyle = "solid");
1027
+ let _ = D(p), b = h.path(_, g), x = s.insert(() => b, ":first-child").attr("transform", `translate(${-d / 2}, ${d / 2})`).attr("class", "outer-path");
1028
+ return m && t.look !== "handDrawn" && x.selectChildren("path").attr("style", m), i && t.look !== "handDrawn" && x.selectChildren("path").attr("style", i), t.width = u, t.height = d, T(t, x), l.attr("transform", `translate(${-c.width / 2 - (c.x - (c.left ?? 0))}, ${-d / 2 + (t.padding ?? 0) / 2 + (c.y - (c.top ?? 0))})`), t.intersect = function(e) {
1029
+ return n.info("Triangle intersect", t, p, e), W.polygon(t, p, e);
1030
+ }, s;
1031
+ }
1032
+ t(Ae, "flippedTriangle");
1033
+ function je(e, t, { dir: n, config: { state: r, themeVariables: i } }) {
1034
+ let { nodeStyles: a } = y(t);
1035
+ t.label = "";
1036
+ let o = e.insert("g").attr("class", E(t)).attr("id", t.domId ?? t.id), { cssStyles: s } = t, c = Math.max(70, t?.width ?? 0), l = Math.max(10, t?.height ?? 0);
1037
+ n === "LR" && (c = Math.max(10, t?.width ?? 0), l = Math.max(70, t?.height ?? 0));
1038
+ let u = -1 * c / 2, d = -1 * l / 2, f = S.svg(o), p = v(t, {
1039
+ stroke: i.lineColor,
1040
+ fill: i.lineColor
1041
+ });
1042
+ t.look !== "handDrawn" && (p.roughness = 0, p.fillStyle = "solid");
1043
+ let m = f.rectangle(u, d, c, l, p), h = o.insert(() => m, ":first-child");
1044
+ s && t.look !== "handDrawn" && h.selectAll("path").attr("style", s), a && t.look !== "handDrawn" && h.selectAll("path").attr("style", a), T(t, h);
1045
+ let g = r?.padding ?? 0;
1046
+ return t.width && t.height && (t.width += g / 2 || 0, t.height += g / 2 || 0), t.intersect = function(e) {
1047
+ return W.rect(t, e);
1048
+ }, o;
1049
+ }
1050
+ t(je, "forkJoin");
1051
+ async function Me(e, t) {
1052
+ let { labelStyles: r, nodeStyles: i } = y(t);
1053
+ t.labelStyle = r;
1054
+ let a = t.look === "neo" ? 16 : t.padding ?? 0, o = t.look === "neo" ? 12 : t.padding ?? 0;
1055
+ (t.width || t.height) && (t.height = (t?.height ?? 0) - o * 2, t.height < 10 && (t.height = 10), t.width = (t?.width ?? 0) - a * 2, t.width < 15 && (t.width = 15));
1056
+ let { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.width ? t?.width : Math.max(15, c.width)) + a * 2, u = (t?.height ? t?.height : Math.max(10, c.height)) + o * 2, d = u / 2, { cssStyles: f } = t, p = S.svg(s), m = v(t, {});
1057
+ t.look !== "handDrawn" && (m.roughness = 0, m.fillStyle = "solid");
1058
+ let h = [
1059
+ {
1060
+ x: -l / 2,
1061
+ y: -u / 2
1062
+ },
1063
+ {
1064
+ x: l / 2 - d,
1065
+ y: -u / 2
1066
+ },
1067
+ ...k(-l / 2 + d, 0, d, 50, 90, 270),
1068
+ {
1069
+ x: l / 2 - d,
1070
+ y: u / 2
1071
+ },
1072
+ {
1073
+ x: -l / 2,
1074
+ y: u / 2
1075
+ }
1076
+ ], g = D(h), _ = p.path(g, m), b = s.insert(() => _, ":first-child");
1077
+ return b.attr("class", "basic label-container outer-path"), f && t.look !== "handDrawn" && b.selectChildren("path").attr("style", f), i && t.look !== "handDrawn" && b.selectChildren("path").attr("style", i), T(t, b), t.intersect = function(e) {
1078
+ return n.info("Pill intersect", t, {
1079
+ radius: d,
1080
+ point: e
1081
+ }), W.polygon(t, h, e);
1082
+ }, s;
1083
+ }
1084
+ t(Me, "halfRoundedRectangle");
1085
+ var Ne = /* @__PURE__ */ t((e, t, n, r, i) => [
1086
+ `M${e + i},${t}`,
1087
+ `L${e + n - i},${t}`,
1088
+ `L${e + n},${t - r / 2}`,
1089
+ `L${e + n - i},${t - r}`,
1090
+ `L${e + i},${t - r}`,
1091
+ `L${e},${t - r / 2}`,
1092
+ "Z"
1093
+ ].join(" "), "createHexagonPathD");
1094
+ async function Pe(e, t) {
1095
+ let { labelStyles: n, nodeStyles: r } = y(t), i = t.look === "neo" ? 3.5 : 4;
1096
+ t.labelStyle = n;
1097
+ let a = t.padding ?? 0, o = t.look === "neo" ? 70 : a, s = t.look === "neo" ? 32 : a;
1098
+ if (t.width || t.height) {
1099
+ let e = (t.height ?? 0) / i;
1100
+ t.width = (t?.width ?? 0) - 2 * e - s, t.height = (t.height ?? 0) - o;
1101
+ }
1102
+ let { shapeSvg: c, bbox: l } = await C(e, t, E(t)), u = (t?.height ? t?.height : l.height) + o, d = u / i, f = (t?.width ? t?.width : l.width) + 2 * d + s, p = [
1103
+ {
1104
+ x: d,
1105
+ y: 0
1106
+ },
1107
+ {
1108
+ x: f - d,
1109
+ y: 0
1110
+ },
1111
+ {
1112
+ x: f,
1113
+ y: -u / 2
1114
+ },
1115
+ {
1116
+ x: f - d,
1117
+ y: -u
1118
+ },
1119
+ {
1120
+ x: d,
1121
+ y: -u
1122
+ },
1123
+ {
1124
+ x: 0,
1125
+ y: -u / 2
1126
+ }
1127
+ ], m, { cssStyles: h } = t;
1128
+ if (t.look === "handDrawn") {
1129
+ let e = S.svg(c), n = v(t, {}), r = Ne(0, 0, f, u, d), i = e.path(r, n);
1130
+ m = c.insert(() => i, ":first-child").attr("transform", `translate(${-f / 2}, ${u / 2})`), h && m.attr("style", h);
1131
+ } else m = q(c, f, u, p);
1132
+ return r && m.attr("style", r), t.width = f, t.height = u, T(t, m), t.intersect = function(e) {
1133
+ return W.polygon(t, p, e);
1134
+ }, c;
1135
+ }
1136
+ t(Pe, "hexagon");
1137
+ async function Fe(e, t) {
1138
+ let { labelStyles: r, nodeStyles: i } = y(t);
1139
+ t.label = "", t.labelStyle = r;
1140
+ let { shapeSvg: a } = await C(e, t, E(t)), o = Math.max(30, t?.width ?? 0), s = Math.max(30, t?.height ?? 0), { cssStyles: c } = t, l = S.svg(a), u = v(t, {});
1141
+ t.look !== "handDrawn" && (u.roughness = 0, u.fillStyle = "solid");
1142
+ let d = [
1143
+ {
1144
+ x: 0,
1145
+ y: 0
1146
+ },
1147
+ {
1148
+ x: o,
1149
+ y: 0
1150
+ },
1151
+ {
1152
+ x: 0,
1153
+ y: s
1154
+ },
1155
+ {
1156
+ x: o,
1157
+ y: s
1158
+ }
1159
+ ], f = D(d), p = l.path(f, u), m = a.insert(() => p, ":first-child");
1160
+ return m.attr("class", "basic label-container outer-path"), c && t.look !== "handDrawn" && m.selectChildren("path").attr("style", c), i && t.look !== "handDrawn" && m.selectChildren("path").attr("style", i), m.attr("transform", `translate(${-o / 2}, ${-s / 2})`), T(t, m), t.intersect = function(e) {
1161
+ return n.info("Pill intersect", t, { points: d }), W.polygon(t, d, e);
1162
+ }, a;
1163
+ }
1164
+ t(Fe, "hourglass");
1165
+ async function Ie(e, t, { config: { themeVariables: r, flowchart: i } }) {
1166
+ let { labelStyles: a } = y(t);
1167
+ t.labelStyle = a;
1168
+ let o = t.assetHeight ?? 48, s = t.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
1169
+ t.width = Math.max(c, l ?? 0);
1170
+ let { shapeSvg: u, bbox: d, label: f } = await C(e, t, "icon-shape default"), p = t.pos === "t", m = c, g = c, { nodeBorder: _ } = r, { stylesMap: b } = x(t), w = -g / 2, E = -m / 2, D = t.label ? 8 : 0, O = S.svg(u), k = v(t, {
1171
+ stroke: "none",
1172
+ fill: "none"
1173
+ });
1174
+ t.look !== "handDrawn" && (k.roughness = 0, k.fillStyle = "solid");
1175
+ let A = O.rectangle(w, E, g, m, k), j = Math.max(g, d.width), M = m + d.height + D, N = O.rectangle(-j / 2, -M / 2, j, M, {
1176
+ ...k,
1177
+ fill: "transparent",
1178
+ stroke: "none"
1179
+ }), P = u.insert(() => A, ":first-child"), F = u.insert(() => N);
1180
+ if (t.icon) {
1181
+ let e = u.append("g");
1182
+ e.html(`<g>${await h(t.icon, {
1183
+ height: c,
1184
+ width: c,
1185
+ fallbackPrefix: ""
1186
+ })}</g>`);
1187
+ let n = e.node().getBBox(), r = n.width, i = n.height, a = n.x, o = n.y;
1188
+ e.attr("transform", `translate(${-r / 2 - a},${p ? d.height / 2 + D / 2 - i / 2 - o : -d.height / 2 - D / 2 - i / 2 - o})`), e.attr("style", `color: ${b.get("stroke") ?? _};`);
1189
+ }
1190
+ return f.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${p ? -M / 2 : M / 2 - d.height})`), P.attr("transform", `translate(0,${p ? d.height / 2 + D / 2 : -d.height / 2 - D / 2})`), T(t, F), t.intersect = function(e) {
1191
+ if (n.info("iconSquare intersect", t, e), !t.label) return W.rect(t, e);
1192
+ let r = t.x ?? 0, i = t.y ?? 0, a = t.height ?? 0, o = [];
1193
+ return o = p ? [
1194
+ {
1195
+ x: r - d.width / 2,
1196
+ y: i - a / 2
1197
+ },
1198
+ {
1199
+ x: r + d.width / 2,
1200
+ y: i - a / 2
1201
+ },
1202
+ {
1203
+ x: r + d.width / 2,
1204
+ y: i - a / 2 + d.height + D
1205
+ },
1206
+ {
1207
+ x: r + g / 2,
1208
+ y: i - a / 2 + d.height + D
1209
+ },
1210
+ {
1211
+ x: r + g / 2,
1212
+ y: i + a / 2
1213
+ },
1214
+ {
1215
+ x: r - g / 2,
1216
+ y: i + a / 2
1217
+ },
1218
+ {
1219
+ x: r - g / 2,
1220
+ y: i - a / 2 + d.height + D
1221
+ },
1222
+ {
1223
+ x: r - d.width / 2,
1224
+ y: i - a / 2 + d.height + D
1225
+ }
1226
+ ] : [
1227
+ {
1228
+ x: r - g / 2,
1229
+ y: i - a / 2
1230
+ },
1231
+ {
1232
+ x: r + g / 2,
1233
+ y: i - a / 2
1234
+ },
1235
+ {
1236
+ x: r + g / 2,
1237
+ y: i - a / 2 + m
1238
+ },
1239
+ {
1240
+ x: r + d.width / 2,
1241
+ y: i - a / 2 + m
1242
+ },
1243
+ {
1244
+ x: r + d.width / 2 / 2,
1245
+ y: i + a / 2
1246
+ },
1247
+ {
1248
+ x: r - d.width / 2,
1249
+ y: i + a / 2
1250
+ },
1251
+ {
1252
+ x: r - d.width / 2,
1253
+ y: i - a / 2 + m
1254
+ },
1255
+ {
1256
+ x: r - g / 2,
1257
+ y: i - a / 2 + m
1258
+ }
1259
+ ], W.polygon(t, o, e);
1260
+ }, u;
1261
+ }
1262
+ t(Ie, "icon");
1263
+ async function Le(e, t, { config: { themeVariables: r, flowchart: i } }) {
1264
+ let { labelStyles: a } = y(t);
1265
+ t.labelStyle = a;
1266
+ let o = t.assetHeight ?? 48, s = t.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
1267
+ t.width = Math.max(c, l ?? 0);
1268
+ let { shapeSvg: u, bbox: d, label: f } = await C(e, t, "icon-shape default"), p = t.label ? 8 : 0, m = t.pos === "t", { nodeBorder: g, mainBkg: _ } = r, { stylesMap: b } = x(t), w = S.svg(u), E = v(t, {});
1269
+ t.look !== "handDrawn" && (E.roughness = 0, E.fillStyle = "solid"), E.stroke = b.get("fill") ?? _;
1270
+ let D = u.append("g");
1271
+ t.icon && D.html(`<g>${await h(t.icon, {
1272
+ height: c,
1273
+ width: c,
1274
+ fallbackPrefix: ""
1275
+ })}</g>`);
1276
+ let O = D.node().getBBox(), k = O.width, A = O.height, j = O.x, M = O.y, N = Math.max(k, A) * Math.SQRT2 + 40, P = w.circle(0, 0, N, E), F = Math.max(N, d.width), I = N + d.height + p, ee = w.rectangle(-F / 2, -I / 2, F, I, {
1277
+ ...E,
1278
+ fill: "transparent",
1279
+ stroke: "none"
1280
+ }), te = u.insert(() => P, ":first-child"), L = u.insert(() => ee);
1281
+ return D.attr("transform", `translate(${-k / 2 - j},${m ? d.height / 2 + p / 2 - A / 2 - M : -d.height / 2 - p / 2 - A / 2 - M})`), D.attr("style", `color: ${b.get("stroke") ?? g};`), f.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -I / 2 : I / 2 - d.height})`), te.attr("transform", `translate(0,${m ? d.height / 2 + p / 2 : -d.height / 2 - p / 2})`), T(t, L), t.intersect = function(e) {
1282
+ return n.info("iconSquare intersect", t, e), W.rect(t, e);
1283
+ }, u;
1284
+ }
1285
+ t(Le, "iconCircle");
1286
+ async function Re(e, t, { config: { themeVariables: r, flowchart: i } }) {
1287
+ let { labelStyles: a } = y(t);
1288
+ t.labelStyle = a;
1289
+ let o = t.assetHeight ?? 48, s = t.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
1290
+ t.width = Math.max(c, l ?? 0);
1291
+ let { shapeSvg: u, bbox: d, halfPadding: f, label: p } = await C(e, t, "icon-shape default"), m = t.pos === "t", g = c + f * 2, _ = c + f * 2, { nodeBorder: b, mainBkg: w } = r, { stylesMap: E } = x(t), D = -_ / 2, O = -g / 2, k = t.label ? 8 : 0, A = S.svg(u), j = v(t, {});
1292
+ t.look !== "handDrawn" && (j.roughness = 0, j.fillStyle = "solid"), j.stroke = E.get("fill") ?? w;
1293
+ let M = A.path(N(D, O, _, g, 5), j), P = Math.max(_, d.width), F = g + d.height + k, I = A.rectangle(-P / 2, -F / 2, P, F, {
1294
+ ...j,
1295
+ fill: "transparent",
1296
+ stroke: "none"
1297
+ }), ee = u.insert(() => M, ":first-child").attr("class", "icon-shape2"), te = u.insert(() => I);
1298
+ if (t.icon) {
1299
+ let e = u.append("g");
1300
+ e.html(`<g>${await h(t.icon, {
1301
+ height: c,
1302
+ width: c,
1303
+ fallbackPrefix: ""
1304
+ })}</g>`);
1305
+ let n = e.node().getBBox(), r = n.width, i = n.height, a = n.x, o = n.y;
1306
+ e.attr("transform", `translate(${-r / 2 - a},${m ? d.height / 2 + k / 2 - i / 2 - o : -d.height / 2 - k / 2 - i / 2 - o})`), e.attr("style", `color: ${E.get("stroke") ?? b};`);
1307
+ }
1308
+ return p.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -F / 2 : F / 2 - d.height})`), ee.attr("transform", `translate(0,${m ? d.height / 2 + k / 2 : -d.height / 2 - k / 2})`), T(t, te), t.intersect = function(e) {
1309
+ if (n.info("iconSquare intersect", t, e), !t.label) return W.rect(t, e);
1310
+ let r = t.x ?? 0, i = t.y ?? 0, a = t.height ?? 0, o = [];
1311
+ return o = m ? [
1312
+ {
1313
+ x: r - d.width / 2,
1314
+ y: i - a / 2
1315
+ },
1316
+ {
1317
+ x: r + d.width / 2,
1318
+ y: i - a / 2
1319
+ },
1320
+ {
1321
+ x: r + d.width / 2,
1322
+ y: i - a / 2 + d.height + k
1323
+ },
1324
+ {
1325
+ x: r + _ / 2,
1326
+ y: i - a / 2 + d.height + k
1327
+ },
1328
+ {
1329
+ x: r + _ / 2,
1330
+ y: i + a / 2
1331
+ },
1332
+ {
1333
+ x: r - _ / 2,
1334
+ y: i + a / 2
1335
+ },
1336
+ {
1337
+ x: r - _ / 2,
1338
+ y: i - a / 2 + d.height + k
1339
+ },
1340
+ {
1341
+ x: r - d.width / 2,
1342
+ y: i - a / 2 + d.height + k
1343
+ }
1344
+ ] : [
1345
+ {
1346
+ x: r - _ / 2,
1347
+ y: i - a / 2
1348
+ },
1349
+ {
1350
+ x: r + _ / 2,
1351
+ y: i - a / 2
1352
+ },
1353
+ {
1354
+ x: r + _ / 2,
1355
+ y: i - a / 2 + g
1356
+ },
1357
+ {
1358
+ x: r + d.width / 2,
1359
+ y: i - a / 2 + g
1360
+ },
1361
+ {
1362
+ x: r + d.width / 2 / 2,
1363
+ y: i + a / 2
1364
+ },
1365
+ {
1366
+ x: r - d.width / 2,
1367
+ y: i + a / 2
1368
+ },
1369
+ {
1370
+ x: r - d.width / 2,
1371
+ y: i - a / 2 + g
1372
+ },
1373
+ {
1374
+ x: r - _ / 2,
1375
+ y: i - a / 2 + g
1376
+ }
1377
+ ], W.polygon(t, o, e);
1378
+ }, u;
1379
+ }
1380
+ t(Re, "iconRounded");
1381
+ async function ze(e, t, { config: { themeVariables: r, flowchart: i } }) {
1382
+ let { labelStyles: a } = y(t);
1383
+ t.labelStyle = a;
1384
+ let o = t.assetHeight ?? 48, s = t.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
1385
+ t.width = Math.max(c, l ?? 0);
1386
+ let { shapeSvg: u, bbox: d, halfPadding: f, label: p } = await C(e, t, "icon-shape default"), m = t.pos === "t", g = c + f * 2, _ = c + f * 2, { nodeBorder: b, mainBkg: w } = r, { stylesMap: E } = x(t), D = -_ / 2, O = -g / 2, k = t.label ? 8 : 0, A = S.svg(u), j = v(t, {});
1387
+ t.look !== "handDrawn" && (j.roughness = 0, j.fillStyle = "solid"), j.stroke = E.get("fill") ?? w;
1388
+ let M = A.path(N(D, O, _, g, .1), j), P = Math.max(_, d.width), F = g + d.height + k, I = A.rectangle(-P / 2, -F / 2, P, F, {
1389
+ ...j,
1390
+ fill: "transparent",
1391
+ stroke: "none"
1392
+ }), ee = u.insert(() => M, ":first-child"), te = u.insert(() => I);
1393
+ if (t.icon) {
1394
+ let e = u.append("g");
1395
+ e.html(`<g>${await h(t.icon, {
1396
+ height: c,
1397
+ width: c,
1398
+ fallbackPrefix: ""
1399
+ })}</g>`);
1400
+ let n = e.node().getBBox(), r = n.width, i = n.height, a = n.x, o = n.y;
1401
+ e.attr("transform", `translate(${-r / 2 - a},${m ? d.height / 2 + k / 2 - i / 2 - o : -d.height / 2 - k / 2 - i / 2 - o})`), e.attr("style", `color: ${E.get("stroke") ?? b};`);
1402
+ }
1403
+ return p.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -F / 2 : F / 2 - d.height})`), ee.attr("transform", `translate(0,${m ? d.height / 2 + k / 2 : -d.height / 2 - k / 2})`), T(t, te), t.intersect = function(e) {
1404
+ if (n.info("iconSquare intersect", t, e), !t.label) return W.rect(t, e);
1405
+ let r = t.x ?? 0, i = t.y ?? 0, a = t.height ?? 0, o = [];
1406
+ return o = m ? [
1407
+ {
1408
+ x: r - d.width / 2,
1409
+ y: i - a / 2
1410
+ },
1411
+ {
1412
+ x: r + d.width / 2,
1413
+ y: i - a / 2
1414
+ },
1415
+ {
1416
+ x: r + d.width / 2,
1417
+ y: i - a / 2 + d.height + k
1418
+ },
1419
+ {
1420
+ x: r + _ / 2,
1421
+ y: i - a / 2 + d.height + k
1422
+ },
1423
+ {
1424
+ x: r + _ / 2,
1425
+ y: i + a / 2
1426
+ },
1427
+ {
1428
+ x: r - _ / 2,
1429
+ y: i + a / 2
1430
+ },
1431
+ {
1432
+ x: r - _ / 2,
1433
+ y: i - a / 2 + d.height + k
1434
+ },
1435
+ {
1436
+ x: r - d.width / 2,
1437
+ y: i - a / 2 + d.height + k
1438
+ }
1439
+ ] : [
1440
+ {
1441
+ x: r - _ / 2,
1442
+ y: i - a / 2
1443
+ },
1444
+ {
1445
+ x: r + _ / 2,
1446
+ y: i - a / 2
1447
+ },
1448
+ {
1449
+ x: r + _ / 2,
1450
+ y: i - a / 2 + g
1451
+ },
1452
+ {
1453
+ x: r + d.width / 2,
1454
+ y: i - a / 2 + g
1455
+ },
1456
+ {
1457
+ x: r + d.width / 2 / 2,
1458
+ y: i + a / 2
1459
+ },
1460
+ {
1461
+ x: r - d.width / 2,
1462
+ y: i + a / 2
1463
+ },
1464
+ {
1465
+ x: r - d.width / 2,
1466
+ y: i - a / 2 + g
1467
+ },
1468
+ {
1469
+ x: r - _ / 2,
1470
+ y: i - a / 2 + g
1471
+ }
1472
+ ], W.polygon(t, o, e);
1473
+ }, u;
1474
+ }
1475
+ t(ze, "iconSquare");
1476
+ async function Be(e, t, { config: { flowchart: r } }) {
1477
+ let i = new Image();
1478
+ i.src = t?.img ?? "", await i.decode();
1479
+ let a = Number(i.naturalWidth.toString().replace("px", "")), o = Number(i.naturalHeight.toString().replace("px", ""));
1480
+ t.imageAspectRatio = a / o;
1481
+ let { labelStyles: s } = y(t);
1482
+ t.labelStyle = s;
1483
+ let c = r?.wrappingWidth;
1484
+ t.defaultWidth = r?.wrappingWidth;
1485
+ let l = Math.max(t.label ? c ?? 0 : 0, t?.assetWidth ?? a), u = t.constraint === "on" && t?.assetHeight ? t.assetHeight * t.imageAspectRatio : l, d = t.constraint === "on" ? u / t.imageAspectRatio : t?.assetHeight ?? o;
1486
+ t.width = Math.max(u, c ?? 0);
1487
+ let { shapeSvg: f, bbox: p, label: m } = await C(e, t, "image-shape default"), h = t.pos === "t", g = -u / 2, _ = -d / 2, b = t.label ? 8 : 0, x = S.svg(f), w = v(t, {});
1488
+ t.look !== "handDrawn" && (w.roughness = 0, w.fillStyle = "solid");
1489
+ let E = x.rectangle(g, _, u, d, w), D = Math.max(u, p.width), O = d + p.height + b, k = x.rectangle(-D / 2, -O / 2, D, O, {
1490
+ ...w,
1491
+ fill: "none",
1492
+ stroke: "none"
1493
+ }), A = f.insert(() => E, ":first-child"), j = f.insert(() => k);
1494
+ if (t.img) {
1495
+ let e = f.append("image");
1496
+ e.attr("href", t.img), e.attr("width", u), e.attr("height", d), e.attr("preserveAspectRatio", "none"), e.attr("transform", `translate(${-u / 2},${h ? O / 2 - d : -O / 2})`);
1497
+ }
1498
+ return m.attr("transform", `translate(${-p.width / 2 - (p.x - (p.left ?? 0))},${h ? -d / 2 - p.height / 2 - b / 2 : d / 2 - p.height / 2 + b / 2})`), A.attr("transform", `translate(0,${h ? p.height / 2 + b / 2 : -p.height / 2 - b / 2})`), T(t, j), t.intersect = function(e) {
1499
+ if (n.info("iconSquare intersect", t, e), !t.label) return W.rect(t, e);
1500
+ let r = t.x ?? 0, i = t.y ?? 0, a = t.height ?? 0, o = [];
1501
+ return o = h ? [
1502
+ {
1503
+ x: r - p.width / 2,
1504
+ y: i - a / 2
1505
+ },
1506
+ {
1507
+ x: r + p.width / 2,
1508
+ y: i - a / 2
1509
+ },
1510
+ {
1511
+ x: r + p.width / 2,
1512
+ y: i - a / 2 + p.height + b
1513
+ },
1514
+ {
1515
+ x: r + u / 2,
1516
+ y: i - a / 2 + p.height + b
1517
+ },
1518
+ {
1519
+ x: r + u / 2,
1520
+ y: i + a / 2
1521
+ },
1522
+ {
1523
+ x: r - u / 2,
1524
+ y: i + a / 2
1525
+ },
1526
+ {
1527
+ x: r - u / 2,
1528
+ y: i - a / 2 + p.height + b
1529
+ },
1530
+ {
1531
+ x: r - p.width / 2,
1532
+ y: i - a / 2 + p.height + b
1533
+ }
1534
+ ] : [
1535
+ {
1536
+ x: r - u / 2,
1537
+ y: i - a / 2
1538
+ },
1539
+ {
1540
+ x: r + u / 2,
1541
+ y: i - a / 2
1542
+ },
1543
+ {
1544
+ x: r + u / 2,
1545
+ y: i - a / 2 + d
1546
+ },
1547
+ {
1548
+ x: r + p.width / 2,
1549
+ y: i - a / 2 + d
1550
+ },
1551
+ {
1552
+ x: r + p.width / 2 / 2,
1553
+ y: i + a / 2
1554
+ },
1555
+ {
1556
+ x: r - p.width / 2,
1557
+ y: i + a / 2
1558
+ },
1559
+ {
1560
+ x: r - p.width / 2,
1561
+ y: i - a / 2 + d
1562
+ },
1563
+ {
1564
+ x: r - u / 2,
1565
+ y: i - a / 2 + d
1566
+ }
1567
+ ], W.polygon(t, o, e);
1568
+ }, f;
1569
+ }
1570
+ t(Be, "imageSquare");
1571
+ async function Ve(e, t) {
1572
+ let { labelStyles: n, nodeStyles: r } = y(t);
1573
+ t.labelStyle = n;
1574
+ let i = t.padding ?? 0, a = i, o = t.look === "neo" ? i * 2 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = Math.max(c.width + (o ?? 0) * 2, t?.width ?? 0), u = Math.max(c.height + (a ?? 0) * 2, t?.height ?? 0), d = [
1575
+ {
1576
+ x: 0,
1577
+ y: 0
1578
+ },
1579
+ {
1580
+ x: l,
1581
+ y: 0
1582
+ },
1583
+ {
1584
+ x: l + 3 * u / 6,
1585
+ y: -u
1586
+ },
1587
+ {
1588
+ x: -3 * u / 6,
1589
+ y: -u
1590
+ }
1591
+ ], f, { cssStyles: p } = t;
1592
+ if (t.look === "handDrawn") {
1593
+ let e = S.svg(s), n = v(t, {}), r = D(d), i = e.path(r, n);
1594
+ f = s.insert(() => i, ":first-child").attr("transform", `translate(${-l / 2}, ${u / 2})`), p && f.attr("style", p);
1595
+ } else f = q(s, l, u, d);
1596
+ return r && f.attr("style", r), t.width = l, t.height = u, T(t, f), t.intersect = function(e) {
1597
+ return W.polygon(t, d, e);
1598
+ }, s;
1599
+ }
1600
+ t(Ve, "inv_trapezoid");
1601
+ async function He(e, t) {
1602
+ let { shapeSvg: n, bbox: r, label: i } = await C(e, t, "label"), a = n.insert("rect", ":first-child");
1603
+ return a.attr("width", .1).attr("height", .1), n.attr("class", "label edgeLabel"), i.attr("transform", `translate(${-(r.width / 2) - (r.x - (r.left ?? 0))}, ${-(r.height / 2) - (r.y - (r.top ?? 0))})`), T(t, a), t.intersect = function(e) {
1604
+ return W.rect(t, e);
1605
+ }, n;
1606
+ }
1607
+ t(He, "labelRect");
1608
+ async function Ue(e, t) {
1609
+ let { labelStyles: n, nodeStyles: r } = y(t);
1610
+ t.labelStyle = n;
1611
+ let i = t.padding ?? 0, a = i, o = t.look === "neo" ? i * 2 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.height ?? c.height) + a, u = (t?.width ?? c.width) + o, d = [
1612
+ {
1613
+ x: 0,
1614
+ y: 0
1615
+ },
1616
+ {
1617
+ x: u + 3 * l / 6,
1618
+ y: 0
1619
+ },
1620
+ {
1621
+ x: u,
1622
+ y: -l
1623
+ },
1624
+ {
1625
+ x: -(3 * l) / 6,
1626
+ y: -l
1627
+ }
1628
+ ], f, { cssStyles: p } = t;
1629
+ if (t.look === "handDrawn") {
1630
+ let e = S.svg(s), n = v(t, {}), r = D(d), i = e.path(r, n);
1631
+ f = s.insert(() => i, ":first-child").attr("transform", `translate(${-u / 2}, ${l / 2})`), p && f.attr("style", p);
1632
+ } else f = q(s, u, l, d);
1633
+ return r && f.attr("style", r), t.width = u, t.height = l, T(t, f), t.intersect = function(e) {
1634
+ return W.polygon(t, d, e);
1635
+ }, s;
1636
+ }
1637
+ t(Ue, "lean_left");
1638
+ async function We(e, t) {
1639
+ let { labelStyles: n, nodeStyles: r } = y(t);
1640
+ t.labelStyle = n;
1641
+ let i = t.padding ?? 0, a = i, o = t.look === "neo" ? i * 2 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.height ?? c.height) + a, u = (t?.width ?? c.width) + o, d = [
1642
+ {
1643
+ x: -3 * l / 6,
1644
+ y: 0
1645
+ },
1646
+ {
1647
+ x: u,
1648
+ y: 0
1649
+ },
1650
+ {
1651
+ x: u + 3 * l / 6,
1652
+ y: -l
1653
+ },
1654
+ {
1655
+ x: 0,
1656
+ y: -l
1657
+ }
1658
+ ], f, { cssStyles: p } = t;
1659
+ if (t.look === "handDrawn") {
1660
+ let e = S.svg(s), n = v(t, {}), r = D(d), i = e.path(r, n);
1661
+ f = s.insert(() => i, ":first-child").attr("transform", `translate(${-u / 2}, ${l / 2})`), p && f.attr("style", p);
1662
+ } else f = q(s, u, l, d);
1663
+ return r && f.attr("style", r), t.width = u, t.height = l, T(t, f), t.intersect = function(e) {
1664
+ return W.polygon(t, d, e);
1665
+ }, s;
1666
+ }
1667
+ t(We, "lean_right");
1668
+ function Ge(e, t) {
1669
+ let { labelStyles: r, nodeStyles: i } = y(t);
1670
+ t.label = "", t.labelStyle = r;
1671
+ let a = e.insert("g").attr("class", E(t)).attr("id", t.domId ?? t.id), { cssStyles: o } = t, s = Math.max(35, t?.width ?? 0), c = Math.max(35, t?.height ?? 0), l = [
1672
+ {
1673
+ x: s,
1674
+ y: 0
1675
+ },
1676
+ {
1677
+ x: 0,
1678
+ y: c + 7 / 2
1679
+ },
1680
+ {
1681
+ x: s - 14,
1682
+ y: c + 7 / 2
1683
+ },
1684
+ {
1685
+ x: 0,
1686
+ y: 2 * c
1687
+ },
1688
+ {
1689
+ x: s,
1690
+ y: c - 7 / 2
1691
+ },
1692
+ {
1693
+ x: 14,
1694
+ y: c - 7 / 2
1695
+ }
1696
+ ], u = S.svg(a), d = v(t, {});
1697
+ t.look !== "handDrawn" && (d.roughness = 0, d.fillStyle = "solid");
1698
+ let f = D(l), p = u.path(f, d), m = a.insert(() => p, ":first-child");
1699
+ return m.attr("class", "outer-path"), o && t.look !== "handDrawn" && m.selectAll("path").attr("style", o), i && t.look !== "handDrawn" && m.selectAll("path").attr("style", i), m.attr("transform", `translate(-${s / 2},${-c})`), T(t, m), t.intersect = function(e) {
1700
+ return n.info("lightningBolt intersect", t, e), W.polygon(t, l, e);
1701
+ }, a;
1702
+ }
1703
+ t(Ge, "lightningBolt");
1704
+ var Ke = /* @__PURE__ */ t((e, t, n, r, i, a, o) => [
1705
+ `M${e},${t + a}`,
1706
+ `a${i},${a} 0,0,0 ${n},0`,
1707
+ `a${i},${a} 0,0,0 ${-n},0`,
1708
+ `l0,${r}`,
1709
+ `a${i},${a} 0,0,0 ${n},0`,
1710
+ `l0,${-r}`,
1711
+ `M${e},${t + a + o}`,
1712
+ `a${i},${a} 0,0,0 ${n},0`
1713
+ ].join(" "), "createCylinderPathD"), qe = /* @__PURE__ */ t((e, t, n, r, i, a, o) => [
1714
+ `M${e},${t + a}`,
1715
+ `M${e + n},${t + a}`,
1716
+ `a${i},${a} 0,0,0 ${-n},0`,
1717
+ `l0,${r}`,
1718
+ `a${i},${a} 0,0,0 ${n},0`,
1719
+ `l0,${-r}`,
1720
+ `M${e},${t + a + o}`,
1721
+ `a${i},${a} 0,0,0 ${n},0`
1722
+ ].join(" "), "createOuterCylinderPathD"), Je = /* @__PURE__ */ t((e, t, n, r, i, a) => [`M${e - n / 2},${-r / 2}`, `a${i},${a} 0,0,0 ${n},0`].join(" "), "createInnerCylinderPathD"), Ye = 10, Xe = 10;
1723
+ async function Ze(e, t) {
1724
+ let { labelStyles: n, nodeStyles: r } = y(t);
1725
+ t.labelStyle = n;
1726
+ let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 24 : i;
1727
+ if (t.width || t.height) {
1728
+ let e = t.width ?? 0;
1729
+ t.width = (t.width ?? 0) - a, t.width < Xe && (t.width = Xe);
1730
+ let n = e / 2 / (2.5 + e / 50);
1731
+ t.height = (t.height ?? 0) - o - n * 3, t.height < Ye && (t.height = Ye);
1732
+ }
1733
+ let { shapeSvg: s, bbox: c, label: l } = await C(e, t, E(t)), u = (t?.width ? t?.width : c.width) + a * 2, d = u / 2, f = d / (2.5 + u / 50), m = (t?.height ? t?.height : c.height) + f + o * 2, h = m * .1, g, { cssStyles: _ } = t;
1734
+ if (t.look === "handDrawn") {
1735
+ let e = S.svg(s), n = qe(0, 0, u, m, d, f, h), r = Je(0, f, u, m, d, f), i = v(t, {}), a = e.path(n, i), o = e.path(r, i);
1736
+ s.insert(() => o, ":first-child").attr("class", "line"), g = s.insert(() => a, ":first-child"), g.attr("class", "basic label-container"), _ && g.attr("style", _);
1737
+ } else {
1738
+ let e = Ke(0, 0, u, m, d, f, h);
1739
+ g = s.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container outer-path").attr("style", p(_)).attr("style", r);
1740
+ }
1741
+ return g.attr("label-offset-y", f), g.attr("transform", `translate(${-u / 2}, ${-(m / 2 + f)})`), T(t, g), l.attr("transform", `translate(${-(c.width / 2) - (c.x - (c.left ?? 0))}, ${-(c.height / 2) + f - (c.y - (c.top ?? 0))})`), t.intersect = function(e) {
1742
+ let n = W.rect(t, e), r = n.x - (t.x ?? 0);
1743
+ if (d != 0 && (Math.abs(r) < (t.width ?? 0) / 2 || Math.abs(r) == (t.width ?? 0) / 2 && Math.abs(n.y - (t.y ?? 0)) > (t.height ?? 0) / 2 - f)) {
1744
+ let i = f * f * (1 - r * r / (d * d));
1745
+ i > 0 && (i = Math.sqrt(i)), i = f - i, e.y - (t.y ?? 0) > 0 && (i = -i), n.y += i;
1746
+ }
1747
+ return n;
1748
+ }, s;
1749
+ }
1750
+ t(Ze, "linedCylinder");
1751
+ async function Qe(e, t) {
1752
+ let { labelStyles: n, nodeStyles: r } = y(t);
1753
+ t.labelStyle = n;
1754
+ let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i;
1755
+ (t.width || t.height) && (t.width = (t.width ?? 0) * 10 / 11 - a * 2, t.width < 10 && (t.width = 10), t.height = (t?.height ?? 0) - o * 2, t.height < 10 && (t.height = 10));
1756
+ let { shapeSvg: s, bbox: c, label: l } = await C(e, t, E(t)), u = (t?.width ? t?.width : c.width) + (a ?? 0) * 2, d = (t?.height ? t?.height : c.height) + (o ?? 0) * 2, f = t.look === "neo" ? d / 4 : d / 8, p = d + f, { cssStyles: m } = t, h = S.svg(s), g = v(t, {});
1757
+ t.look !== "handDrawn" && (g.roughness = 0, g.fillStyle = "solid");
1758
+ let _ = [
1759
+ {
1760
+ x: -u / 2 - u / 2 * .1,
1761
+ y: -p / 2
1762
+ },
1763
+ {
1764
+ x: -u / 2 - u / 2 * .1,
1765
+ y: p / 2
1766
+ },
1767
+ ...O(-u / 2 - u / 2 * .1, p / 2, u / 2 + u / 2 * .1, p / 2, f, .8),
1768
+ {
1769
+ x: u / 2 + u / 2 * .1,
1770
+ y: -p / 2
1771
+ },
1772
+ {
1773
+ x: -u / 2 - u / 2 * .1,
1774
+ y: -p / 2
1775
+ },
1776
+ {
1777
+ x: -u / 2,
1778
+ y: -p / 2
1779
+ },
1780
+ {
1781
+ x: -u / 2,
1782
+ y: p / 2 * 1.1
1783
+ },
1784
+ {
1785
+ x: -u / 2,
1786
+ y: -p / 2
1787
+ }
1788
+ ], b = h.polygon(_.map((e) => [e.x, e.y]), g), x = s.insert(() => b, ":first-child");
1789
+ return x.attr("class", "basic label-container outer-path"), m && t.look !== "handDrawn" && x.selectAll("path").attr("style", m), r && t.look !== "handDrawn" && x.selectAll("path").attr("style", r), x.attr("transform", `translate(0,${-f / 2})`), l.attr("transform", `translate(${-u / 2 + (t.padding ?? 0) + u / 2 * .1 / 2 - (c.x - (c.left ?? 0))},${-d / 2 + (t.padding ?? 0) - f / 2 - (c.y - (c.top ?? 0))})`), T(t, x), t.intersect = function(e) {
1790
+ return W.polygon(t, _, e);
1791
+ }, s;
1792
+ }
1793
+ t(Qe, "linedWaveEdgedRect");
1794
+ async function $e(e, t) {
1795
+ let { labelStyles: n, nodeStyles: r } = y(t);
1796
+ t.labelStyle = n;
1797
+ let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i, s = t.look === "neo" ? 10 : 5;
1798
+ (t.width || t.height) && (t.width = Math.max((t?.width ?? 0) - a * 2 - 2 * s, 10), t.height = Math.max((t?.height ?? 0) - o * 2 - 2 * s, 10));
1799
+ let { shapeSvg: c, bbox: l, label: u } = await C(e, t, E(t)), d = (t?.width ? t?.width : l.width) + a * 2 + 2 * s, f = (t?.height ? t?.height : l.height) + o * 2 + 2 * s, p = d - 2 * s, m = f - 2 * s, h = -p / 2, g = -m / 2, { cssStyles: _ } = t, b = S.svg(c), x = v(t, {}), w = [
1800
+ {
1801
+ x: h - s,
1802
+ y: g + s
1803
+ },
1804
+ {
1805
+ x: h - s,
1806
+ y: g + m + s
1807
+ },
1808
+ {
1809
+ x: h + p - s,
1810
+ y: g + m + s
1811
+ },
1812
+ {
1813
+ x: h + p - s,
1814
+ y: g + m
1815
+ },
1816
+ {
1817
+ x: h + p,
1818
+ y: g + m
1819
+ },
1820
+ {
1821
+ x: h + p,
1822
+ y: g + m - s
1823
+ },
1824
+ {
1825
+ x: h + p + s,
1826
+ y: g + m - s
1827
+ },
1828
+ {
1829
+ x: h + p + s,
1830
+ y: g - s
1831
+ },
1832
+ {
1833
+ x: h + s,
1834
+ y: g - s
1835
+ },
1836
+ {
1837
+ x: h + s,
1838
+ y: g
1839
+ },
1840
+ {
1841
+ x: h,
1842
+ y: g
1843
+ },
1844
+ {
1845
+ x: h,
1846
+ y: g + s
1847
+ }
1848
+ ], O = [
1849
+ {
1850
+ x: h,
1851
+ y: g + s
1852
+ },
1853
+ {
1854
+ x: h + p - s,
1855
+ y: g + s
1856
+ },
1857
+ {
1858
+ x: h + p - s,
1859
+ y: g + m
1860
+ },
1861
+ {
1862
+ x: h + p,
1863
+ y: g + m
1864
+ },
1865
+ {
1866
+ x: h + p,
1867
+ y: g
1868
+ },
1869
+ {
1870
+ x: h,
1871
+ y: g
1872
+ }
1873
+ ];
1874
+ t.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
1875
+ let k = D(w), j = b.path(k, x), M = D(O), N = b.path(M, x);
1876
+ t.look !== "handDrawn" && (j = A(j), N = A(N));
1877
+ let P = c.insert("g", ":first-child");
1878
+ return P.insert(() => j), P.insert(() => N), P.attr("class", "basic label-container outer-path"), _ && t.look !== "handDrawn" && P.selectAll("path").attr("style", _), r && t.look !== "handDrawn" && P.selectAll("path").attr("style", r), u.attr("transform", `translate(${-(l.width / 2) - s - (l.x - (l.left ?? 0))}, ${-(l.height / 2) + s - (l.y - (l.top ?? 0))})`), T(t, P), t.intersect = function(e) {
1879
+ return W.polygon(t, w, e);
1880
+ }, c;
1881
+ }
1882
+ t($e, "multiRect");
1883
+ async function et(e, t) {
1884
+ let { labelStyles: n, nodeStyles: r } = y(t);
1885
+ t.labelStyle = n;
1886
+ let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = t.padding ?? 0, c = t.look === "neo" ? 16 : s, l = t.look === "neo" ? 12 : s, u = !0;
1887
+ (t.width || t.height) && (u = !1, t.width = (t?.width ?? 0) - c * 2, t.height = (t?.height ?? 0) - l * 3);
1888
+ let d = Math.max(a.width, t?.width ?? 0) + c * 2, f = Math.max(a.height, t?.height ?? 0) + l * 3, p = t.look === "neo" ? f / 4 : f / 8, m = f + (u ? p / 2 : -p / 2), h = -d / 2, g = -m / 2, { cssStyles: _ } = t, b = O(h - 10, g + m + 10, h + d - 10, g + m + 10, p, .8), x = b?.[b.length - 1], w = [
1889
+ {
1890
+ x: h - 10,
1891
+ y: g + 10
1892
+ },
1893
+ {
1894
+ x: h - 10,
1895
+ y: g + m + 10
1896
+ },
1897
+ ...b,
1898
+ {
1899
+ x: h + d - 10,
1900
+ y: x.y - 10
1901
+ },
1902
+ {
1903
+ x: h + d,
1904
+ y: x.y - 10
1905
+ },
1906
+ {
1907
+ x: h + d,
1908
+ y: x.y - 20
1909
+ },
1910
+ {
1911
+ x: h + d + 10,
1912
+ y: x.y - 20
1913
+ },
1914
+ {
1915
+ x: h + d + 10,
1916
+ y: g - 10
1917
+ },
1918
+ {
1919
+ x: h + 10,
1920
+ y: g - 10
1921
+ },
1922
+ {
1923
+ x: h + 10,
1924
+ y: g
1925
+ },
1926
+ {
1927
+ x: h,
1928
+ y: g
1929
+ },
1930
+ {
1931
+ x: h,
1932
+ y: g + 10
1933
+ }
1934
+ ], k = [
1935
+ {
1936
+ x: h,
1937
+ y: g + 10
1938
+ },
1939
+ {
1940
+ x: h + d - 10,
1941
+ y: g + 10
1942
+ },
1943
+ {
1944
+ x: h + d - 10,
1945
+ y: x.y - 10
1946
+ },
1947
+ {
1948
+ x: h + d,
1949
+ y: x.y - 10
1950
+ },
1951
+ {
1952
+ x: h + d,
1953
+ y: g
1954
+ },
1955
+ {
1956
+ x: h,
1957
+ y: g
1958
+ }
1959
+ ], A = S.svg(i), j = v(t, {});
1960
+ t.look !== "handDrawn" && (j.roughness = 0, j.fillStyle = "solid");
1961
+ let M = D(w), N = A.path(M, j), P = D(k), F = A.path(P, j), I = i.insert(() => N, ":first-child");
1962
+ return I.insert(() => F), I.attr("class", "basic label-container outer-path"), _ && t.look !== "handDrawn" && I.selectAll("path").attr("style", _), r && t.look !== "handDrawn" && I.selectAll("path").attr("style", r), I.attr("transform", `translate(0,${-p / 2})`), o.attr("transform", `translate(${-(a.width / 2) - 10 - (a.x - (a.left ?? 0))}, ${-(a.height / 2) + 10 - p / 2 - (a.y - (a.top ?? 0))})`), T(t, I), t.intersect = function(e) {
1963
+ return W.polygon(t, w, e);
1964
+ }, i;
1965
+ }
1966
+ t(et, "multiWaveEdgedRectangle");
1967
+ async function tt(e, t, { config: { themeVariables: n } }) {
1968
+ let { labelStyles: r, nodeStyles: i } = y(t);
1969
+ t.labelStyle = r, t.useHtmlLabels || o(s()) || (t.centerLabel = !0);
1970
+ let { shapeSvg: a, bbox: c, label: l } = await C(e, t, E(t)), u = Math.max(c.width + (t.padding ?? 0) * 2, t?.width ?? 0), d = Math.max(c.height + (t.padding ?? 0) * 2, t?.height ?? 0), f = -u / 2, p = -d / 2, { cssStyles: m } = t, h = S.svg(a), g = v(t, {
1971
+ fill: n.noteBkgColor,
1972
+ stroke: n.noteBorderColor
1973
+ });
1974
+ t.look !== "handDrawn" && (g.roughness = 0, g.fillStyle = "solid");
1975
+ let _ = h.rectangle(f, p, u, d, g), b = a.insert(() => _, ":first-child");
1976
+ return b.attr("class", "basic label-container outer-path"), l.attr("class", "label noteLabel"), m && t.look !== "handDrawn" && b.selectAll("path").attr("style", m), i && t.look !== "handDrawn" && b.selectAll("path").attr("style", i), l.attr("transform", `translate(${-c.width / 2 - (c.x - (c.left ?? 0))}, ${-(c.height / 2) - (c.y - (c.top ?? 0))})`), T(t, b), t.intersect = function(e) {
1977
+ return W.rect(t, e);
1978
+ }, a;
1979
+ }
1980
+ t(tt, "note");
1981
+ var nt = /* @__PURE__ */ t((e, t, n) => [
1982
+ `M${e + n / 2},${t}`,
1983
+ `L${e + n},${t - n / 2}`,
1984
+ `L${e + n / 2},${t - n}`,
1985
+ `L${e},${t - n / 2}`,
1986
+ "Z"
1987
+ ].join(" "), "createDecisionBoxPathD");
1988
+ async function rt(e, t) {
1989
+ let { labelStyles: n, nodeStyles: r } = y(t);
1990
+ t.labelStyle = n;
1991
+ let { shapeSvg: i, bbox: a } = await C(e, t, E(t)), o = a.width + (t.padding ?? 0) + (a.height + (t.padding ?? 0)), s = .5, c = [
1992
+ {
1993
+ x: o / 2,
1994
+ y: 0
1995
+ },
1996
+ {
1997
+ x: o,
1998
+ y: -o / 2
1999
+ },
2000
+ {
2001
+ x: o / 2,
2002
+ y: -o
2003
+ },
2004
+ {
2005
+ x: 0,
2006
+ y: -o / 2
2007
+ }
2008
+ ], l, { cssStyles: u } = t;
2009
+ if (t.look === "handDrawn") {
2010
+ let e = S.svg(i), n = v(t, {}), r = nt(0, 0, o), a = e.path(r, n);
2011
+ l = i.insert(() => a, ":first-child").attr("transform", `translate(${-o / 2 + s}, ${o / 2})`), u && l.attr("style", u);
2012
+ } else l = q(i, o, o, c), l.attr("transform", `translate(${-o / 2 + s}, ${o / 2})`);
2013
+ return r && l.attr("style", r), T(t, l), t.calcIntersect = function(e, t) {
2014
+ let n = e.width, r = [
2015
+ {
2016
+ x: n / 2,
2017
+ y: 0
2018
+ },
2019
+ {
2020
+ x: n,
2021
+ y: -n / 2
2022
+ },
2023
+ {
2024
+ x: n / 2,
2025
+ y: -n
2026
+ },
2027
+ {
2028
+ x: 0,
2029
+ y: -n / 2
2030
+ }
2031
+ ], i = W.polygon(e, r, t);
2032
+ return {
2033
+ x: i.x - .5,
2034
+ y: i.y - .5
2035
+ };
2036
+ }, t.intersect = function(e) {
2037
+ return this.calcIntersect(t, e);
2038
+ }, i;
2039
+ }
2040
+ t(rt, "question");
2041
+ async function it(e, t) {
2042
+ let { labelStyles: n, nodeStyles: r } = y(t);
2043
+ t.labelStyle = n;
2044
+ let i = t.padding ?? 0, a = t.look === "neo" ? 21 : i ?? 0, o = t.look === "neo" ? 12 : i ?? 0, { shapeSvg: s, bbox: c, label: l } = await C(e, t, E(t)), u = (t?.width ?? c.width) + (t.look === "neo" ? a * 2 : a), d = (t?.height ?? c.height) + (t.look === "neo" ? o * 2 : o), f = -u / 2, p = -d / 2, m = p / 2, h = [
2045
+ {
2046
+ x: f + m,
2047
+ y: p
2048
+ },
2049
+ {
2050
+ x: f,
2051
+ y: 0
2052
+ },
2053
+ {
2054
+ x: f + m,
2055
+ y: -p
2056
+ },
2057
+ {
2058
+ x: -f,
2059
+ y: -p
2060
+ },
2061
+ {
2062
+ x: -f,
2063
+ y: p
2064
+ }
2065
+ ], { cssStyles: g } = t, _ = S.svg(s), b = v(t, {});
2066
+ t.look !== "handDrawn" && (b.roughness = 0, b.fillStyle = "solid");
2067
+ let x = D(h), w = _.path(x, b), O = s.insert(() => w, ":first-child");
2068
+ return O.attr("class", "basic label-container outer-path"), g && t.look !== "handDrawn" && O.selectAll("path").attr("style", g), r && t.look !== "handDrawn" && O.selectAll("path").attr("style", r), O.attr("transform", `translate(${-m / 2},0)`), l.attr("transform", `translate(${-m / 2 - c.width / 2 - (c.x - (c.left ?? 0))}, ${-(c.height / 2) - (c.y - (c.top ?? 0))})`), T(t, O), t.intersect = function(e) {
2069
+ return W.polygon(t, h, e);
2070
+ }, s;
2071
+ }
2072
+ t(it, "rect_left_inv_arrow");
2073
+ async function at(t, r) {
2074
+ let { labelStyles: i, nodeStyles: a } = y(r);
2075
+ r.labelStyle = i;
2076
+ let s;
2077
+ s = r.cssClasses ? "node " + r.cssClasses : "node default";
2078
+ let c = t.insert("g").attr("class", s).attr("id", r.domId || r.id), u = c.insert("g"), d = c.insert("g").attr("class", "label").attr("style", a), f = r.description, p = r.label, m = await M(d, p, r.labelStyle, !0, !0), h = {
2079
+ width: 0,
2080
+ height: 0
2081
+ };
2082
+ if (o(l())) {
2083
+ let t = m.children[0], n = e(m);
2084
+ h = t.getBoundingClientRect(), n.attr("width", h.width), n.attr("height", h.height);
2085
+ }
2086
+ n.info("Text 2", f);
2087
+ let g = f || [], _ = m.getBBox(), b = await M(d, Array.isArray(g) ? g.join("<br/>") : g, r.labelStyle, !0, !0), x = b.children[0], C = e(b);
2088
+ h = x.getBoundingClientRect(), C.attr("width", h.width), C.attr("height", h.height);
2089
+ let w = (r.padding || 0) / 2;
2090
+ e(b).attr("transform", "translate( " + (h.width > _.width ? 0 : (_.width - h.width) / 2) + ", " + (_.height + w + 5) + ")"), e(m).attr("transform", "translate( " + (h.width < _.width ? 0 : -(_.width - h.width) / 2) + ", 0)"), h = d.node().getBBox(), d.attr("transform", "translate(" + -h.width / 2 + ", " + (-h.height / 2 - w + 3) + ")");
2091
+ let E = h.width + (r.padding || 0), D = h.height + (r.padding || 0), O = -h.width / 2 - w, k = -h.height / 2 - w, A, j;
2092
+ if (r.look === "handDrawn") {
2093
+ let e = S.svg(c), t = v(r, {}), i = e.path(N(O, k, E, D, r.rx || 0), t), a = e.line(-h.width / 2 - w, -h.height / 2 - w + _.height + w, h.width / 2 + w, -h.height / 2 - w + _.height + w, t);
2094
+ j = c.insert(() => (n.debug("Rough node insert CXC", i), a), ":first-child"), A = c.insert(() => (n.debug("Rough node insert CXC", i), i), ":first-child");
2095
+ } else A = u.insert("rect", ":first-child"), j = u.insert("line"), A.attr("class", "outer title-state").attr("style", a).attr("x", -h.width / 2 - w).attr("y", -h.height / 2 - w).attr("width", h.width + (r.padding || 0)).attr("height", h.height + (r.padding || 0)), j.attr("class", "divider").attr("x1", -h.width / 2 - w).attr("x2", h.width / 2 + w).attr("y1", -h.height / 2 - w + _.height + w).attr("y2", -h.height / 2 - w + _.height + w);
2096
+ return T(r, A), r.intersect = function(e) {
2097
+ return W.rect(r, e);
2098
+ }, c;
2099
+ }
2100
+ t(at, "rectWithTitle");
2101
+ async function ot(e, t, { config: { themeVariables: n } }) {
2102
+ let r = n?.radius ?? 5;
2103
+ return Ce(e, t, {
2104
+ rx: r,
2105
+ ry: r,
2106
+ classes: "",
2107
+ labelPaddingX: (t?.padding ?? 0) * 1,
2108
+ labelPaddingY: (t?.padding ?? 0) * 1
2109
+ });
2110
+ }
2111
+ t(ot, "roundedRect");
2112
+ var Z = 8;
2113
+ async function st(e, t) {
2114
+ let { labelStyles: n, nodeStyles: r } = y(t);
2115
+ t.labelStyle = n;
2116
+ let i = t.look === "neo" ? 16 : t.padding ?? 0, a = t.look === "neo" ? 12 : t.padding ?? 0, { shapeSvg: o, bbox: s, label: c } = await C(e, t, E(t)), l = (t?.width ?? s.width) + i * 2 + (t.look === "neo" ? Z : Z * 2), u = (t?.height ?? s.height) + a * 2, d = l - Z, f = u, m = Z - l / 2, h = -u / 2, { cssStyles: g } = t, _ = S.svg(o), b = v(t, {});
2117
+ t.look !== "handDrawn" && (b.roughness = 0, b.fillStyle = "solid");
2118
+ let x = [
2119
+ {
2120
+ x: m,
2121
+ y: h
2122
+ },
2123
+ {
2124
+ x: m + d,
2125
+ y: h
2126
+ },
2127
+ {
2128
+ x: m + d,
2129
+ y: h + f
2130
+ },
2131
+ {
2132
+ x: m - Z,
2133
+ y: h + f
2134
+ },
2135
+ {
2136
+ x: m - Z,
2137
+ y: h
2138
+ },
2139
+ {
2140
+ x: m,
2141
+ y: h
2142
+ },
2143
+ {
2144
+ x: m,
2145
+ y: h + f
2146
+ }
2147
+ ], w = _.polygon(x.map((e) => [e.x, e.y]), b), D = o.insert(() => w, ":first-child");
2148
+ return D.attr("class", "basic label-container outer-path").attr("style", p(g)), r && t.look !== "handDrawn" && D.selectAll("path").attr("style", r), g && t.look !== "handDrawn" && D.selectAll("path").attr("style", r), c.attr("transform", `translate(${Z / 2 - s.width / 2 - (s.x - (s.left ?? 0))}, ${-(s.height / 2) - (s.y - (s.top ?? 0))})`), T(t, D), t.intersect = function(e) {
2149
+ return W.rect(t, e);
2150
+ }, o;
2151
+ }
2152
+ t(st, "shadedProcess");
2153
+ async function ct(e, t) {
2154
+ let { labelStyles: n, nodeStyles: r } = y(t);
2155
+ t.labelStyle = n;
2156
+ let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i;
2157
+ (t.width || t.height) && (t.width = Math.max((t?.width ?? 0) - a * 2, 10), t.height = Math.max((t?.height ?? 0) / 1.5 - o * 2, 10));
2158
+ let { shapeSvg: s, bbox: c, label: l } = await C(e, t, E(t)), u = (t?.width ? t?.width : c.width) + a * 2, d = ((t?.height ? t?.height : c.height) + o * 2) * 1.5, f = u, p = d / 1.5, m = -f / 2, h = -p / 2, { cssStyles: g } = t, _ = S.svg(s), b = v(t, {});
2159
+ t.look !== "handDrawn" && (b.roughness = 0, b.fillStyle = "solid");
2160
+ let x = [
2161
+ {
2162
+ x: m,
2163
+ y: h
2164
+ },
2165
+ {
2166
+ x: m,
2167
+ y: h + p
2168
+ },
2169
+ {
2170
+ x: m + f,
2171
+ y: h + p
2172
+ },
2173
+ {
2174
+ x: m + f,
2175
+ y: h - p / 2
2176
+ }
2177
+ ], w = D(x), O = _.path(w, b), k = s.insert(() => O, ":first-child");
2178
+ return k.attr("class", "basic label-container outer-path"), g && t.look !== "handDrawn" && k.selectChildren("path").attr("style", g), r && t.look !== "handDrawn" && k.selectChildren("path").attr("style", r), k.attr("transform", `translate(0, ${p / 4})`), l.attr("transform", `translate(${-f / 2 + (t.padding ?? 0) - (c.x - (c.left ?? 0))}, ${-p / 4 + (t.padding ?? 0) - (c.y - (c.top ?? 0))})`), T(t, k), t.intersect = function(e) {
2179
+ return W.polygon(t, x, e);
2180
+ }, s;
2181
+ }
2182
+ t(ct, "slopedRect");
2183
+ async function lt(e, t) {
2184
+ let n = t.padding ?? 0, r = t.look === "neo" ? 16 : n * 2, i = t.look === "neo" ? 12 : n;
2185
+ return Ce(e, t, {
2186
+ rx: 0,
2187
+ ry: 0,
2188
+ classes: "",
2189
+ labelPaddingX: t.labelPaddingX ?? r,
2190
+ labelPaddingY: i
2191
+ });
2192
+ }
2193
+ t(lt, "squareRect");
2194
+ async function ut(e, t) {
2195
+ let { labelStyles: n, nodeStyles: r } = y(t);
2196
+ t.labelStyle = n;
2197
+ let i = t.padding ?? 0, a = t.look === "neo" ? 20 : i, o = t.look === "neo" ? 12 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = c.height + (t.look === "neo" ? o * 2 : o), u = c.width + l / 4 + (t.look === "neo" ? a * 2 : a), d = l / 2, { cssStyles: f } = t, p = S.svg(s), m = v(t, {});
2198
+ t.look !== "handDrawn" && (m.roughness = 0, m.fillStyle = "solid");
2199
+ let h = [
2200
+ {
2201
+ x: -u / 2 + d,
2202
+ y: -l / 2
2203
+ },
2204
+ {
2205
+ x: u / 2 - d,
2206
+ y: -l / 2
2207
+ },
2208
+ ...k(-u / 2 + d, 0, d, 50, 90, 270),
2209
+ {
2210
+ x: u / 2 - d,
2211
+ y: l / 2
2212
+ },
2213
+ ...k(u / 2 - d, 0, d, 50, 270, 450)
2214
+ ], g = D(h), _ = p.path(g, m), b = s.insert(() => _, ":first-child");
2215
+ return b.attr("class", "basic label-container outer-path"), f && t.look !== "handDrawn" && b.selectChildren("path").attr("style", f), r && t.look !== "handDrawn" && b.selectChildren("path").attr("style", r), T(t, b), t.intersect = function(e) {
2216
+ return W.polygon(t, h, e);
2217
+ }, s;
2218
+ }
2219
+ t(ut, "stadium");
2220
+ async function dt(e, t) {
2221
+ return Ce(e, t, {
2222
+ rx: t.look === "neo" ? 3 : 5,
2223
+ ry: t.look === "neo" ? 3 : 5,
2224
+ classes: "flowchart-node"
2225
+ });
2226
+ }
2227
+ t(dt, "state");
2228
+ function ft(e, t, { config: { themeVariables: n } }) {
2229
+ let { labelStyles: r, nodeStyles: i } = y(t);
2230
+ t.labelStyle = r;
2231
+ let { cssStyles: a } = t, { lineColor: o, stateBorder: s, nodeBorder: c, nodeShadow: l } = n;
2232
+ (t.width || t.height) && ((t.width ?? 0) < 14 && (t.width = 14), (t.height ?? 0) < 14 && (t.height = 14)), t.width ||= 14, t.height ||= 14;
2233
+ let u = e.insert("g").attr("class", "node default").attr("id", t.domId ?? t.id), d = S.svg(u), f = v(t, {});
2234
+ t.look !== "handDrawn" && (f.roughness = 0, f.fillStyle = "solid");
2235
+ let p = d.circle(0, 0, t.width, {
2236
+ ...f,
2237
+ stroke: o,
2238
+ strokeWidth: 2
2239
+ }), m = s ?? c, h = (t.width ?? 0) * 5 / 14, g = d.circle(0, 0, h, {
2240
+ ...f,
2241
+ fill: m,
2242
+ stroke: m,
2243
+ strokeWidth: 2,
2244
+ fillStyle: "solid"
2245
+ }), _ = u.insert(() => p, ":first-child");
2246
+ if (_.insert(() => g), t.look !== "handDrawn" && _.attr("class", "outer-path"), a && _.selectAll("path").attr("style", a), i && _.selectAll("path").attr("style", i), t.width < 25 && l && t.look !== "handDrawn") {
2247
+ let t = e.node()?.ownerSVGElement?.id ?? "", n = t ? `${t}-drop-shadow-small` : "drop-shadow-small";
2248
+ _.attr("style", `filter:url(#${n})`);
2249
+ }
2250
+ return T(t, _), t.intersect = function(e) {
2251
+ return W.circle(t, (t.width ?? 0) / 2, e);
2252
+ }, u;
2253
+ }
2254
+ t(ft, "stateEnd");
2255
+ function pt(e, t, { config: { themeVariables: n } }) {
2256
+ let { lineColor: r, nodeShadow: i } = n;
2257
+ (t.width || t.height) && ((t.width ?? 0) < 14 && (t.width = 14), (t.height ?? 0) < 14 && (t.height = 14)), t.width ||= 14, t.height ||= 14;
2258
+ let a = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), o;
2259
+ if (t.look === "handDrawn") {
2260
+ let e = S.svg(a).circle(0, 0, t.width, b(r));
2261
+ o = a.insert(() => e), o.attr("class", "state-start").attr("r", (t.width ?? 7) / 2).attr("width", t.width ?? 14).attr("height", t.height ?? 14);
2262
+ } else o = a.insert("circle", ":first-child"), o.attr("class", "state-start").attr("r", (t.width ?? 7) / 2).attr("width", t.width ?? 14).attr("height", t.height ?? 14);
2263
+ if (t.width < 25 && i && t.look !== "handDrawn") {
2264
+ let t = e.node()?.ownerSVGElement?.id ?? "", n = t ? `${t}-drop-shadow-small` : "drop-shadow-small";
2265
+ o.attr("style", `filter:url(#${n})`);
2266
+ }
2267
+ return T(t, o), t.intersect = function(e) {
2268
+ return W.circle(t, (t.width ?? 7) / 2, e);
2269
+ }, a;
2270
+ }
2271
+ t(pt, "stateStart");
2272
+ var mt = 8;
2273
+ async function ht(e, t) {
2274
+ let { labelStyles: n, nodeStyles: r } = y(t);
2275
+ t.labelStyle = n;
2276
+ let i = t?.padding ?? 8, a = t.look === "neo" ? 28 : i, o = t.look === "neo" ? 12 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.width ?? c.width) + 2 * mt + a, u = (t?.height ?? c.height) + o, d = l - 2 * mt, f = u, m = -l / 2, h = -u / 2, g = [
2277
+ {
2278
+ x: 0,
2279
+ y: 0
2280
+ },
2281
+ {
2282
+ x: d,
2283
+ y: 0
2284
+ },
2285
+ {
2286
+ x: d,
2287
+ y: -f
2288
+ },
2289
+ {
2290
+ x: 0,
2291
+ y: -f
2292
+ },
2293
+ {
2294
+ x: 0,
2295
+ y: 0
2296
+ },
2297
+ {
2298
+ x: -8,
2299
+ y: 0
2300
+ },
2301
+ {
2302
+ x: d + 8,
2303
+ y: 0
2304
+ },
2305
+ {
2306
+ x: d + 8,
2307
+ y: -f
2308
+ },
2309
+ {
2310
+ x: -8,
2311
+ y: -f
2312
+ },
2313
+ {
2314
+ x: -8,
2315
+ y: 0
2316
+ }
2317
+ ];
2318
+ if (t.look === "handDrawn") {
2319
+ let e = S.svg(s), n = v(t, {}), r = e.rectangle(m, h, d + 16, f, n), i = e.line(m + mt, h, m + mt, h + f, n), a = e.line(m + mt + d, h, m + mt + d, h + f, n);
2320
+ s.insert(() => i, ":first-child"), s.insert(() => a, ":first-child");
2321
+ let o = s.insert(() => r, ":first-child"), { cssStyles: c } = t;
2322
+ o.attr("class", "basic label-container").attr("style", p(c)), T(t, o);
2323
+ } else {
2324
+ let e = q(s, d, f, g);
2325
+ r && e.attr("style", r), T(t, e);
2326
+ }
2327
+ return t.intersect = function(e) {
2328
+ return W.polygon(t, g, e);
2329
+ }, s;
2330
+ }
2331
+ t(ht, "subroutine");
2332
+ var gt = .2;
2333
+ async function _t(e, t) {
2334
+ let { labelStyles: n, nodeStyles: r } = y(t);
2335
+ t.labelStyle = n;
2336
+ let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i;
2337
+ (t.width || t.height) && (t.height = Math.max((t?.height ?? 0) - o * 2, 10), t.width = Math.max((t?.width ?? 0) - a * 2 - gt * (t.height + o * 2), 10));
2338
+ let { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.height ? t?.height : c.height) + o * 2, u = gt * l, d = gt * l, f = (t?.width ? t?.width : c.width) + a * 2 + u - u, p = l, m = -f / 2, h = -p / 2, { cssStyles: g } = t, _ = S.svg(s), b = v(t, {}), x = [
2339
+ {
2340
+ x: m - u / 2,
2341
+ y: h
2342
+ },
2343
+ {
2344
+ x: m + f + u / 2,
2345
+ y: h
2346
+ },
2347
+ {
2348
+ x: m + f + u / 2,
2349
+ y: h + p
2350
+ },
2351
+ {
2352
+ x: m - u / 2,
2353
+ y: h + p
2354
+ }
2355
+ ], w = [
2356
+ {
2357
+ x: m + f - u / 2,
2358
+ y: h + p
2359
+ },
2360
+ {
2361
+ x: m + f + u / 2,
2362
+ y: h + p
2363
+ },
2364
+ {
2365
+ x: m + f + u / 2,
2366
+ y: h + p - d
2367
+ }
2368
+ ];
2369
+ t.look !== "handDrawn" && (b.roughness = 0, b.fillStyle = "solid");
2370
+ let O = D(x), k = _.path(O, b), A = D(w), j = _.path(A, {
2371
+ ...b,
2372
+ fillStyle: "solid"
2373
+ }), M = s.insert(() => j, ":first-child");
2374
+ return M.insert(() => k, ":first-child"), M.attr("class", "basic label-container outer-path"), g && t.look !== "handDrawn" && M.selectAll("path").attr("style", g), r && t.look !== "handDrawn" && M.selectAll("path").attr("style", r), T(t, M), t.intersect = function(e) {
2375
+ return W.polygon(t, x, e);
2376
+ }, s;
2377
+ }
2378
+ t(_t, "taggedRect");
2379
+ async function vt(e, t) {
2380
+ let { labelStyles: n, nodeStyles: r } = y(t);
2381
+ t.labelStyle = n;
2382
+ let { shapeSvg: i, bbox: a, label: o } = await C(e, t, E(t)), s = Math.max(a.width + (t.padding ?? 0) * 2, t?.width ?? 0), c = Math.max(a.height + (t.padding ?? 0) * 2, t?.height ?? 0), l = c / 8, u = .2 * s, d = .2 * c, f = c + l, { cssStyles: p } = t, m = S.svg(i), h = v(t, {});
2383
+ t.look !== "handDrawn" && (h.roughness = 0, h.fillStyle = "solid");
2384
+ let g = [
2385
+ {
2386
+ x: -s / 2 - s / 2 * .1,
2387
+ y: f / 2
2388
+ },
2389
+ ...O(-s / 2 - s / 2 * .1, f / 2, s / 2 + s / 2 * .1, f / 2, l, .8),
2390
+ {
2391
+ x: s / 2 + s / 2 * .1,
2392
+ y: -f / 2
2393
+ },
2394
+ {
2395
+ x: -s / 2 - s / 2 * .1,
2396
+ y: -f / 2
2397
+ }
2398
+ ], _ = -s / 2 + s / 2 * .1, b = -f / 2 - d * .4, x = [
2399
+ {
2400
+ x: _ + s - u,
2401
+ y: (b + c) * 1.3
2402
+ },
2403
+ {
2404
+ x: _ + s,
2405
+ y: b + c - d
2406
+ },
2407
+ {
2408
+ x: _ + s,
2409
+ y: (b + c) * .9
2410
+ },
2411
+ ...O(_ + s, (b + c) * 1.25, _ + s - u, (b + c) * 1.3, -c * .02, .5)
2412
+ ], w = D(g), k = m.path(w, h), A = D(x), j = m.path(A, {
2413
+ ...h,
2414
+ fillStyle: "solid"
2415
+ }), M = i.insert(() => j, ":first-child");
2416
+ return M.insert(() => k, ":first-child"), M.attr("class", "basic label-container outer-path"), p && t.look !== "handDrawn" && M.selectAll("path").attr("style", p), r && t.look !== "handDrawn" && M.selectAll("path").attr("style", r), M.attr("transform", `translate(0,${-l / 2})`), o.attr("transform", `translate(${-s / 2 + (t.padding ?? 0) - (a.x - (a.left ?? 0))},${-c / 2 + (t.padding ?? 0) - l / 2 - (a.y - (a.top ?? 0))})`), T(t, M), t.intersect = function(e) {
2417
+ return W.polygon(t, g, e);
2418
+ }, i;
2419
+ }
2420
+ t(vt, "taggedWaveEdgedRectangle");
2421
+ async function yt(e, t) {
2422
+ let { labelStyles: n, nodeStyles: r } = y(t);
2423
+ t.labelStyle = n;
2424
+ let { shapeSvg: i, bbox: a } = await C(e, t, E(t)), o = Math.max(a.width + (t.padding ?? 0), t?.width || 0), s = Math.max(a.height + (t.padding ?? 0), t?.height || 0), c = -o / 2, l = -s / 2, u = i.insert("rect", ":first-child");
2425
+ return u.attr("class", "text").attr("style", r).attr("rx", 0).attr("ry", 0).attr("x", c).attr("y", l).attr("width", o).attr("height", s), T(t, u), t.intersect = function(e) {
2426
+ return W.rect(t, e);
2427
+ }, i;
2428
+ }
2429
+ t(yt, "text");
2430
+ var bt = /* @__PURE__ */ t((e, t, n, r, i, a) => `M${e},${t}
2431
+ a${i},${a} 0,0,1 0,${-r}
2432
+ l${n},0
2433
+ a${i},${a} 0,0,1 0,${r}
2434
+ M${n},${-r}
2435
+ a${i},${a} 0,0,0 0,${r}
2436
+ l${-n},0`, "createCylinderPathD"), xt = /* @__PURE__ */ t((e, t, n, r, i, a) => [
2437
+ `M${e},${t}`,
2438
+ `M${e + n},${t}`,
2439
+ `a${i},${a} 0,0,0 0,${-r}`,
2440
+ `l${-n},0`,
2441
+ `a${i},${a} 0,0,0 0,${r}`,
2442
+ `l${n},0`
2443
+ ].join(" "), "createOuterCylinderPathD"), St = /* @__PURE__ */ t((e, t, n, r, i, a) => [`M${e + n / 2},${-r / 2}`, `a${i},${a} 0,0,0 0,${r}`].join(" "), "createInnerCylinderPathD"), Ct = 5, wt = 10;
2444
+ async function Tt(e, t) {
2445
+ let { labelStyles: n, nodeStyles: r } = y(t);
2446
+ t.labelStyle = n;
2447
+ let i = t.padding ?? 0, a = t.look === "neo" ? 12 : i / 2;
2448
+ if (t.width || t.height) {
2449
+ let e = t.height ?? 0;
2450
+ t.height = (t.height ?? 0) - a, t.height < Ct && (t.height = Ct);
2451
+ let n = e / 2 / (2.5 + e / 50);
2452
+ t.width = (t.width ?? 0) - a - n * 3, t.width < wt && (t.width = wt);
2453
+ }
2454
+ let { shapeSvg: o, bbox: s, label: c } = await C(e, t, E(t)), l = (t.height ? t.height : s.height) + a, u = l / 2, d = u / (2.5 + l / 50), f = (t.width ? t.width : s.width) + d + a, { cssStyles: m } = t, h;
2455
+ if (t.look === "handDrawn") {
2456
+ let e = S.svg(o), n = xt(0, 0, f, l, d, u), r = St(0, 0, f, l, d, u), i = e.path(n, v(t, {})), a = e.path(r, v(t, { fill: "none" }));
2457
+ h = o.insert(() => a, ":first-child"), h = o.insert(() => i, ":first-child"), h.attr("class", "basic label-container"), m && h.attr("style", m);
2458
+ } else {
2459
+ let e = bt(0, 0, f, l, d, u);
2460
+ h = o.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container").attr("style", p(m)).attr("style", r), h.attr("class", "basic label-container outer-path"), m && h.selectAll("path").attr("style", m), r && h.selectAll("path").attr("style", r);
2461
+ }
2462
+ return h.attr("label-offset-x", d), h.attr("transform", `translate(${-f / 2}, ${l / 2} )`), c.attr("transform", `translate(${-(s.width / 2) - d - (s.x - (s.left ?? 0))}, ${-(s.height / 2) - (s.y - (s.top ?? 0))})`), T(t, h), t.intersect = function(e) {
2463
+ let n = W.rect(t, e), r = n.y - (t.y ?? 0);
2464
+ if (u != 0 && (Math.abs(r) < (t.height ?? 0) / 2 || Math.abs(r) == (t.height ?? 0) / 2 && Math.abs(n.x - (t.x ?? 0)) > (t.width ?? 0) / 2 - d)) {
2465
+ let i = d * d * (1 - r * r / (u * u));
2466
+ i != 0 && (i = Math.sqrt(Math.abs(i))), i = d - i, e.x - (t.x ?? 0) > 0 && (i = -i), n.x += i;
2467
+ }
2468
+ return n;
2469
+ }, o;
2470
+ }
2471
+ t(Tt, "tiltedCylinder");
2472
+ async function Et(e, t) {
2473
+ let { labelStyles: n, nodeStyles: r } = y(t);
2474
+ t.labelStyle = n;
2475
+ let i = t.padding ?? 0, a = (t.look, i), o = t.look === "neo" ? i * 2 : i, { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.height ?? c.height) + a, u = (t?.width ?? c.width) + o, d = [
2476
+ {
2477
+ x: -3 * l / 6,
2478
+ y: 0
2479
+ },
2480
+ {
2481
+ x: u + 3 * l / 6,
2482
+ y: 0
2483
+ },
2484
+ {
2485
+ x: u,
2486
+ y: -l
2487
+ },
2488
+ {
2489
+ x: 0,
2490
+ y: -l
2491
+ }
2492
+ ], f, { cssStyles: p } = t;
2493
+ if (t.look === "handDrawn") {
2494
+ let e = S.svg(s), n = v(t, {}), r = D(d), i = e.path(r, n);
2495
+ f = s.insert(() => i, ":first-child").attr("transform", `translate(${-u / 2}, ${l / 2})`), p && f.attr("style", p);
2496
+ } else f = q(s, u, l, d);
2497
+ return r && f.attr("style", r), t.width = u, t.height = l, T(t, f), t.intersect = function(e) {
2498
+ return W.polygon(t, d, e);
2499
+ }, s;
2500
+ }
2501
+ t(Et, "trapezoid");
2502
+ async function Dt(e, t) {
2503
+ let { labelStyles: n, nodeStyles: r } = y(t);
2504
+ t.labelStyle = n;
2505
+ let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i;
2506
+ (t.width || t.height) && (t.height = (t.height ?? 0) - o * 2, t.height < 5 && (t.height = 5), t.width = (t.width ?? 0) - a * 2, t.width < 15 && (t.width = 15));
2507
+ let { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.width ? t?.width : c.width) + a * 2, u = (t?.height ? t?.height : c.height) + o * 2, { cssStyles: d } = t, f = S.svg(s), p = v(t, {});
2508
+ t.look !== "handDrawn" && (p.roughness = 0, p.fillStyle = "solid");
2509
+ let m = [
2510
+ {
2511
+ x: -l / 2 * .8,
2512
+ y: -u / 2
2513
+ },
2514
+ {
2515
+ x: l / 2 * .8,
2516
+ y: -u / 2
2517
+ },
2518
+ {
2519
+ x: l / 2,
2520
+ y: -u / 2 * .6
2521
+ },
2522
+ {
2523
+ x: l / 2,
2524
+ y: u / 2
2525
+ },
2526
+ {
2527
+ x: -l / 2,
2528
+ y: u / 2
2529
+ },
2530
+ {
2531
+ x: -l / 2,
2532
+ y: -u / 2 * .6
2533
+ }
2534
+ ], h = D(m), g = f.path(h, p), _ = s.insert(() => g, ":first-child");
2535
+ return _.attr("class", "basic label-container outer-path"), d && t.look !== "handDrawn" && _.selectChildren("path").attr("style", d), r && t.look !== "handDrawn" && _.selectChildren("path").attr("style", r), T(t, _), t.intersect = function(e) {
2536
+ return W.polygon(t, m, e);
2537
+ }, s;
2538
+ }
2539
+ t(Dt, "trapezoidalPentagon");
2540
+ var Ot = 10, kt = 10;
2541
+ async function At(e, t) {
2542
+ let { labelStyles: r, nodeStyles: i } = y(t);
2543
+ t.labelStyle = r;
2544
+ let a = t.padding ?? 0, o = t.look === "neo" ? a * 2 : a;
2545
+ (t.width || t.height) && (t.width = ((t?.width ?? 0) - o) / 2, t.width < kt && (t.width = kt), t.height = t?.height ?? 0, t.height < Ot && (t.height = Ot));
2546
+ let { shapeSvg: s, bbox: u, label: d } = await C(e, t, E(t)), f = c(l().flowchart?.htmlLabels), p = (t?.width ? t?.width : u.width) + o, m = t?.height ? t?.height : p + u.height, h = m, g = [
2547
+ {
2548
+ x: 0,
2549
+ y: 0
2550
+ },
2551
+ {
2552
+ x: h,
2553
+ y: 0
2554
+ },
2555
+ {
2556
+ x: h / 2,
2557
+ y: -m
2558
+ }
2559
+ ], { cssStyles: _ } = t, b = S.svg(s), x = v(t, {});
2560
+ t.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
2561
+ let w = D(g), O = b.path(w, x), k = s.insert(() => O, ":first-child").attr("transform", `translate(${-m / 2}, ${m / 2})`).attr("class", "outer-path");
2562
+ return _ && t.look !== "handDrawn" && k.selectChildren("path").attr("style", _), i && t.look !== "handDrawn" && k.selectChildren("path").attr("style", i), t.width = p, t.height = m, T(t, k), d.attr("transform", `translate(${-u.width / 2 - (u.x - (u.left ?? 0))}, ${m / 2 - (u.height + (t.padding ?? 0) / (f ? 2 : 1) - (u.y - (u.top ?? 0)))})`), t.intersect = function(e) {
2563
+ return n.info("Triangle intersect", t, g, e), W.polygon(t, g, e);
2564
+ }, s;
2565
+ }
2566
+ t(At, "triangle");
2567
+ async function jt(e, t) {
2568
+ let { labelStyles: n, nodeStyles: r } = y(t);
2569
+ t.labelStyle = n;
2570
+ let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 12 : i, s = !0;
2571
+ (t.width || t.height) && (s = !1, t.width = (t?.width ?? 0) - a * 2, t.width < 10 && (t.width = 10), t.height = (t?.height ?? 0) - o * 2, t.height < 10 && (t.height = 10));
2572
+ let { shapeSvg: c, bbox: l, label: u } = await C(e, t, E(t)), d = (t?.width ? t?.width : l.width) + (a ?? 0) * 2, f = (t?.height ? t?.height : l.height) + (o ?? 0) * 2, p = t.look === "neo" ? f / 4 : f / 8, m = f + (s ? p : -p), { cssStyles: h } = t, g = 14 - d, _ = g > 0 ? g / 2 : 0, b = S.svg(c), x = v(t, {});
2573
+ t.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
2574
+ let w = [
2575
+ {
2576
+ x: -d / 2 - _,
2577
+ y: m / 2
2578
+ },
2579
+ ...O(-d / 2 - _, m / 2, d / 2 + _, m / 2, p, .8),
2580
+ {
2581
+ x: d / 2 + _,
2582
+ y: -m / 2
2583
+ },
2584
+ {
2585
+ x: -d / 2 - _,
2586
+ y: -m / 2
2587
+ }
2588
+ ], k = D(w), A = b.path(k, x), j = c.insert(() => A, ":first-child");
2589
+ return j.attr("class", "basic label-container outer-path"), h && t.look !== "handDrawn" && j.selectAll("path").attr("style", h), r && t.look !== "handDrawn" && j.selectAll("path").attr("style", r), j.attr("transform", `translate(0,${-p / 2})`), u.attr("transform", `translate(${-d / 2 + (t.padding ?? 0) - (l.x - (l.left ?? 0))},${-f / 2 + (t.padding ?? 0) - p - (l.y - (l.top ?? 0))})`), T(t, j), t.intersect = function(e) {
2590
+ return W.polygon(t, w, e);
2591
+ }, c;
2592
+ }
2593
+ t(jt, "waveEdgedRectangle");
2594
+ async function Mt(e, t) {
2595
+ let { labelStyles: n, nodeStyles: r } = y(t);
2596
+ t.labelStyle = n;
2597
+ let i = t.padding ?? 0, a = t.look === "neo" ? 16 : i, o = t.look === "neo" ? 20 : i;
2598
+ if (t.width || t.height) {
2599
+ t.width = t?.width ?? 0, t.width < 20 && (t.width = 20), t.height = t?.height ?? 0, t.height < 10 && (t.height = 10);
2600
+ let e = Math.min(t.height * .2, t.height / 4);
2601
+ t.height = Math.ceil(t.height - o - 20 / 9 * e), t.width -= a * 2;
2602
+ }
2603
+ let { shapeSvg: s, bbox: c } = await C(e, t, E(t)), l = (t?.width ? t?.width : c.width) + a * 2, u = (t?.height ? t?.height : c.height) + o, d = u / 8, f = u + d * 2, { cssStyles: p } = t, m = S.svg(s), h = v(t, {});
2604
+ t.look !== "handDrawn" && (h.roughness = 0, h.fillStyle = "solid");
2605
+ let g = [
2606
+ {
2607
+ x: -l / 2,
2608
+ y: f / 2
2609
+ },
2610
+ ...O(-l / 2, f / 2, l / 2, f / 2, d, 1),
2611
+ {
2612
+ x: l / 2,
2613
+ y: -f / 2
2614
+ },
2615
+ ...O(l / 2, -f / 2, -l / 2, -f / 2, d, -1)
2616
+ ], _ = D(g), b = m.path(_, h), x = s.insert(() => b, ":first-child");
2617
+ return x.attr("class", "basic label-container"), p && t.look !== "handDrawn" && x.selectAll("path").attr("style", p), r && t.look !== "handDrawn" && x.selectAll("path").attr("style", r), T(t, x), t.intersect = function(e) {
2618
+ return W.polygon(t, g, e);
2619
+ }, s;
2620
+ }
2621
+ t(Mt, "waveRectangle");
2622
+ var Q = 10;
2623
+ async function Nt(e, t) {
2624
+ let { labelStyles: n, nodeStyles: r } = y(t);
2625
+ t.labelStyle = n;
2626
+ let i = t.look === "neo" ? 16 : t.padding ?? 0, a = t.look === "neo" ? 12 : t.padding ?? 0;
2627
+ (t.width || t.height) && (t.width = Math.max((t?.width ?? 0) - i * 2 - Q, 10), t.height = Math.max((t?.height ?? 0) - a * 2 - Q, 10));
2628
+ let { shapeSvg: o, bbox: s, label: c } = await C(e, t, E(t)), l = (t?.width ? t?.width : s.width) + i * 2 + Q, u = (t?.height ? t?.height : s.height) + a * 2 + Q, d = l - Q, f = u - Q, p = -d / 2, m = -f / 2, { cssStyles: h } = t, g = S.svg(o), _ = v(t, {}), b = [
2629
+ {
2630
+ x: p - Q,
2631
+ y: m - Q
2632
+ },
2633
+ {
2634
+ x: p - Q,
2635
+ y: m + f
2636
+ },
2637
+ {
2638
+ x: p + d,
2639
+ y: m + f
2640
+ },
2641
+ {
2642
+ x: p + d,
2643
+ y: m - Q
2644
+ }
2645
+ ], x = `M${p - Q},${m - Q} L${p + d},${m - Q} L${p + d},${m + f} L${p - Q},${m + f} L${p - Q},${m - Q}
2646
+ M${p - Q},${m} L${p + d},${m}
2647
+ M${p},${m - Q} L${p},${m + f}`;
2648
+ t.look !== "handDrawn" && (_.roughness = 0, _.fillStyle = "solid");
2649
+ let w = g.path(x, _), D = o.insert(() => w, ":first-child");
2650
+ return D.attr("transform", `translate(${Q / 2}, ${Q / 2})`), D.attr("class", "basic label-container outer-path"), h && t.look !== "handDrawn" && D.selectAll("path").attr("style", h), r && t.look !== "handDrawn" && D.selectAll("path").attr("style", r), c.attr("transform", `translate(${-(s.width / 2) + Q / 2 - (s.x - (s.left ?? 0))}, ${-(s.height / 2) + Q / 2 - (s.y - (s.top ?? 0))})`), T(t, D), t.intersect = function(e) {
2651
+ return W.polygon(t, b, e);
2652
+ }, o;
2653
+ }
2654
+ t(Nt, "windowPane");
2655
+ var Pt = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), Ft = /* @__PURE__ */ new Set([
2656
+ "redux",
2657
+ "redux-dark",
2658
+ "redux-color",
2659
+ "redux-dark-color"
2660
+ ]);
2661
+ async function It(t, n) {
2662
+ let r = n;
2663
+ r.alias && (n.label = r.alias);
2664
+ let { theme: i, themeVariables: a } = s(), { rowEven: o, rowOdd: l, nodeBorder: u, borderColorArray: d } = a;
2665
+ if (n.look === "handDrawn") {
2666
+ let { themeVariables: e } = s(), { background: r } = e;
2667
+ await It(t, {
2668
+ ...n,
2669
+ id: n.id + "-background",
2670
+ domId: (n.domId || n.id) + "-background",
2671
+ look: "default",
2672
+ cssStyles: ["stroke: none", `fill: ${r}`]
2673
+ });
2674
+ }
2675
+ let p = s();
2676
+ n.useHtmlLabels = p.htmlLabels;
2677
+ let m = p.er?.diagramPadding ?? 10, h = p.er?.entityPadding ?? 6, { cssStyles: g } = n, { labelStyles: _, nodeStyles: b } = y(n);
2678
+ if (r.attributes.length === 0 && n.label) {
2679
+ let e = {
2680
+ rx: 0,
2681
+ ry: 0,
2682
+ labelPaddingX: m,
2683
+ labelPaddingY: m * 1.5,
2684
+ classes: ""
2685
+ };
2686
+ f(n.label, p) + e.labelPaddingX * 2 < p.er.minEntityWidth && (n.width = p.er.minEntityWidth);
2687
+ let a = await Ce(t, n, e);
2688
+ if (i != null && Pt.has(i)) {
2689
+ let e = r.colorIndex ?? 0;
2690
+ a.attr("data-color-id", `color-${e % d.length}`);
2691
+ }
2692
+ if (!c(p.htmlLabels)) {
2693
+ let e = a.select("text"), t = e.node()?.getBBox();
2694
+ e.attr("transform", `translate(${-t.width / 2}, 0)`);
2695
+ }
2696
+ return a;
2697
+ }
2698
+ p.htmlLabels || (m *= 1.25, h *= 1.25);
2699
+ let x = E(n);
2700
+ x ||= "node default";
2701
+ let C = t.insert("g").attr("class", x).attr("id", n.domId || n.id), w = await Lt(C, n.label ?? "", p, 0, 0, ["name"], _);
2702
+ w.height += h;
2703
+ let D = 0, O = [], k = [], A = 0, j = 0, M = 0, N = 0, P = !0, F = !0;
2704
+ for (let e of r.attributes) {
2705
+ let t = await Lt(C, e.type, p, 0, D, ["attribute-type"], _);
2706
+ A = Math.max(A, t.width + m);
2707
+ let n = await Lt(C, e.name, p, 0, D, ["attribute-name"], _);
2708
+ j = Math.max(j, n.width + m);
2709
+ let r = await Lt(C, e.keys.join(), p, 0, D, ["attribute-keys"], _);
2710
+ M = Math.max(M, r.width + m);
2711
+ let i = await Lt(C, e.comment, p, 0, D, ["attribute-comment"], _);
2712
+ N = Math.max(N, i.width + m);
2713
+ let a = Math.max(t.height, n.height, r.height, i.height) + h;
2714
+ k.push({
2715
+ yOffset: D,
2716
+ rowHeight: a
2717
+ }), D += a;
2718
+ }
2719
+ let I = 4;
2720
+ M <= m && (P = !1, M = 0, I--), N <= m && (F = !1, N = 0, I--);
2721
+ let ee = C.node().getBBox();
2722
+ if (w.width + m * 2 - (A + j + M + N) > 0) {
2723
+ let e = w.width + m * 2 - (A + j + M + N);
2724
+ A += e / I, j += e / I, M > 0 && (M += e / I), N > 0 && (N += e / I);
2725
+ }
2726
+ let te = A + j + M + N, L = S.svg(C), R = v(n, {});
2727
+ n.look !== "handDrawn" && (R.roughness = 0, R.fillStyle = "solid");
2728
+ let ne = 0;
2729
+ k.length > 0 && (ne = k.reduce((e, t) => e + (t?.rowHeight ?? 0), 0));
2730
+ let z = Math.max(ee.width + m * 2, n?.width || 0, te), B = Math.max((ne ?? 0) + w.height, n?.height || 0), V = -z / 2, H = -B / 2;
2731
+ if (C.selectAll("g:not(:first-child)").each((t, n, r) => {
2732
+ let i = e(r[n]), a = i.attr("transform"), o = 0, s = 0;
2733
+ if (a) {
2734
+ let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);
2735
+ e && (o = parseFloat(e[1]), s = parseFloat(e[2]), i.attr("class").includes("attribute-name") ? o += A : i.attr("class").includes("attribute-keys") ? o += A + j : i.attr("class").includes("attribute-comment") && (o += A + j + M));
2736
+ }
2737
+ i.attr("transform", `translate(${V + m / 2 + o}, ${s + H + w.height + h / 2})`);
2738
+ }), C.select(".name").attr("transform", "translate(" + -w.width / 2 + ", " + (H + h / 2) + ")"), i != null && Pt.has(i)) {
2739
+ let e = r.colorIndex ?? 0;
2740
+ C.attr("data-color-id", `color-${e % d.length}`);
2741
+ }
2742
+ let re = L.rectangle(V, H, z, B, R), ie = C.insert(() => re, ":first-child").attr("class", "outer-path").attr("style", g.join(""));
2743
+ O.push(0);
2744
+ for (let [e, t] of k.entries()) {
2745
+ let n = (e + 1) % 2 == 0 && t.yOffset !== 0, r = L.rectangle(V, w.height + H + t?.yOffset, z, t?.rowHeight, {
2746
+ ...R,
2747
+ fill: n ? o : l,
2748
+ stroke: u
2749
+ });
2750
+ C.insert(() => r, "g.label").attr("style", g.join("")).attr("class", `row-rect-${n ? "even" : "odd"}`);
2751
+ }
2752
+ let U = 1e-4, G = Rt(V, w.height + H, z + V, w.height + H, U), K = L.polygon(G.map((e) => [e.x, e.y]), R);
2753
+ if (C.insert(() => K).attr("class", "divider"), G = Rt(A + V, w.height + H, A + V, B + H, U), K = L.polygon(G.map((e) => [e.x, e.y]), R), C.insert(() => K).attr("class", "divider"), P) {
2754
+ let e = A + j + V;
2755
+ G = Rt(e, w.height + H, e, B + H, U), K = L.polygon(G.map((e) => [e.x, e.y]), R), C.insert(() => K).attr("class", "divider");
2756
+ }
2757
+ if (F) {
2758
+ let e = A + j + M + V;
2759
+ G = Rt(e, w.height + H, e, B + H, U), K = L.polygon(G.map((e) => [e.x, e.y]), R), C.insert(() => K).attr("class", "divider");
2760
+ }
2761
+ for (let e of O) {
2762
+ let t = w.height + H + e;
2763
+ G = Rt(V, t, z + V, t, U), K = L.polygon(G.map((e) => [e.x, e.y]), R), C.insert(() => K).attr("class", "divider");
2764
+ }
2765
+ if (T(n, ie), b && n.look !== "handDrawn") if (i != null && Ft.has(i)) C.selectAll("path").attr("style", b);
2766
+ else {
2767
+ let e = b.split(";")?.filter((e) => e.includes("stroke"))?.map((e) => `${e}`).join("; ");
2768
+ C.selectAll("path").attr("style", e ?? ""), C.selectAll(".row-rect-even path").attr("style", b);
2769
+ }
2770
+ return n.intersect = function(e) {
2771
+ return W.rect(n, e);
2772
+ }, C;
2773
+ }
2774
+ t(It, "erBox");
2775
+ async function Lt(t, n, r, i = 0, o = 0, s = [], l = "") {
2776
+ let u = t.insert("g").attr("class", `label ${s.join(" ")}`).attr("transform", `translate(${i}, ${o})`).attr("style", l);
2777
+ n !== a(n) && (n = a(n), n = n.replaceAll("<", "&lt;").replaceAll(">", "&gt;"));
2778
+ let d = u.node().appendChild(await m(u, n, {
2779
+ width: f(n, r) + 100,
2780
+ style: l,
2781
+ useHtmlLabels: r.htmlLabels
2782
+ }, r));
2783
+ if (n.includes("&lt;") || n.includes("&gt;")) {
2784
+ let e = d.children[0];
2785
+ for (e.textContent = e.textContent.replaceAll("&lt;", "<").replaceAll("&gt;", ">"); e.childNodes[0];) e = e.childNodes[0], e.textContent = e.textContent.replaceAll("&lt;", "<").replaceAll("&gt;", ">");
2786
+ }
2787
+ let p = d.getBBox();
2788
+ if (c(r.htmlLabels)) {
2789
+ let t = d.children[0];
2790
+ t.style.textAlign = "start";
2791
+ let n = e(d);
2792
+ p = t.getBoundingClientRect(), n.attr("width", p.width), n.attr("height", p.height);
2793
+ }
2794
+ return p;
2795
+ }
2796
+ t(Lt, "addText");
2797
+ function Rt(e, t, n, r, i) {
2798
+ return e === n ? [
2799
+ {
2800
+ x: e - i / 2,
2801
+ y: t
2802
+ },
2803
+ {
2804
+ x: e + i / 2,
2805
+ y: t
2806
+ },
2807
+ {
2808
+ x: n + i / 2,
2809
+ y: r
2810
+ },
2811
+ {
2812
+ x: n - i / 2,
2813
+ y: r
2814
+ }
2815
+ ] : [
2816
+ {
2817
+ x: e,
2818
+ y: t - i / 2
2819
+ },
2820
+ {
2821
+ x: e,
2822
+ y: t + i / 2
2823
+ },
2824
+ {
2825
+ x: n,
2826
+ y: r + i / 2
2827
+ },
2828
+ {
2829
+ x: n,
2830
+ y: r - i / 2
2831
+ }
2832
+ ];
2833
+ }
2834
+ t(Rt, "lineToPolygon");
2835
+ async function zt(e, t, n, r, i = n.class.padding ?? 12) {
2836
+ let a = r ? 0 : 3, o = e.insert("g").attr("class", E(t)).attr("id", t.domId || t.id), s = null, c = null, l = null, u = null, d = 0, f = 0, p = 0;
2837
+ if (s = o.insert("g").attr("class", "annotation-group text"), t.annotations.length > 0) {
2838
+ let e = t.annotations[0];
2839
+ await Bt(s, { text: `\xAB${e}\xBB` }, 0), d = s.node().getBBox().height;
2840
+ }
2841
+ c = o.insert("g").attr("class", "label-group text"), await Bt(c, t, 0, ["font-weight: bolder"]);
2842
+ let m = c.node().getBBox();
2843
+ f = m.height, l = o.insert("g").attr("class", "members-group text");
2844
+ let h = 0;
2845
+ for (let e of t.members) {
2846
+ let t = await Bt(l, e, h, [e.parseClassifier()]);
2847
+ h += t + a;
2848
+ }
2849
+ p = l.node().getBBox().height, p <= 0 && (p = i / 2), u = o.insert("g").attr("class", "methods-group text");
2850
+ let g = 0;
2851
+ for (let e of t.methods) {
2852
+ let t = await Bt(u, e, g, [e.parseClassifier()]);
2853
+ g += t + a;
2854
+ }
2855
+ let _ = o.node().getBBox();
2856
+ if (s !== null) {
2857
+ let e = s.node().getBBox();
2858
+ s.attr("transform", `translate(${-e.width / 2})`);
2859
+ }
2860
+ return c.attr("transform", `translate(${-m.width / 2}, ${d})`), _ = o.node().getBBox(), l.attr("transform", `translate(0, ${d + f + i * 2})`), _ = o.node().getBBox(), u.attr("transform", `translate(0, ${d + f + (p ? p + i * 4 : i * 2)})`), _ = o.node().getBBox(), {
2861
+ shapeSvg: o,
2862
+ bbox: _
2863
+ };
2864
+ }
2865
+ t(zt, "textHelper");
2866
+ async function Bt(n, a, o, l = []) {
2867
+ let u = n.insert("g").attr("class", "label").attr("style", l.join("; ")), p = s(), h = "useHtmlLabels" in a ? a.useHtmlLabels : c(p.htmlLabels) ?? !0, g = "";
2868
+ g = "text" in a ? a.text : a.label, !h && g.startsWith("\\") && (g = g.substring(1)), r(g) && (h = !0);
2869
+ let _ = await m(u, i(d(g)), {
2870
+ width: f(g, p) + 50,
2871
+ classes: "markdown-node-label",
2872
+ useHtmlLabels: h
2873
+ }, p), v, y = 1;
2874
+ if (h) {
2875
+ let n = _.children[0], r = e(_);
2876
+ y = n.innerHTML.split("<br>").length, n.innerHTML.includes("</math>") && (y += n.innerHTML.split("<mrow>").length - 1);
2877
+ let i = n.getElementsByTagName("img");
2878
+ if (i) {
2879
+ let e = g.replace(/<img[^>]*>/g, "").trim() === "";
2880
+ await Promise.all([...i].map((n) => new Promise((r) => {
2881
+ function i() {
2882
+ if (n.style.display = "flex", n.style.flexDirection = "column", e) {
2883
+ let e = p.fontSize?.toString() ?? window.getComputedStyle(document.body).fontSize, t = parseInt(e, 10) * 5 + "px";
2884
+ n.style.minWidth = t, n.style.maxWidth = t;
2885
+ } else n.style.width = "100%";
2886
+ r(n);
2887
+ }
2888
+ t(i, "setupImage"), setTimeout(() => {
2889
+ n.complete && i();
2890
+ }), n.addEventListener("error", i), n.addEventListener("load", i);
2891
+ })));
2892
+ }
2893
+ v = n.getBoundingClientRect(), r.attr("width", v.width), r.attr("height", v.height);
2894
+ } else {
2895
+ l.includes("font-weight: bolder") && e(_).selectAll("tspan").attr("font-weight", ""), y = _.children.length;
2896
+ let t = _.children[0];
2897
+ (_.textContent === "" || _.textContent.includes("&gt")) && (t.textContent = g[0] + g.substring(1).replaceAll("&gt;", ">").replaceAll("&lt;", "<").trim(), g[1] === " " && (t.textContent = t.textContent[0] + " " + t.textContent.substring(1))), t.textContent === "undefined" && (t.textContent = ""), v = _.getBBox();
2898
+ }
2899
+ return u.attr("transform", "translate(0," + (-v.height / (2 * y) + o) + ")"), v.height;
2900
+ }
2901
+ t(Bt, "addText");
2902
+ async function Vt(t, n) {
2903
+ let r = l(), { themeVariables: i } = r, { useGradient: a } = i, o = r.class.padding ?? 12, s = o, u = n.useHtmlLabels ?? c(r.htmlLabels) ?? !0, d = n;
2904
+ d.annotations = d.annotations ?? [], d.members = d.members ?? [], d.methods = d.methods ?? [];
2905
+ let { shapeSvg: f, bbox: p } = await zt(t, n, r, u, s), { labelStyles: m, nodeStyles: h } = y(n);
2906
+ n.labelStyle = m, n.cssStyles = d.styles || "";
2907
+ let g = d.styles?.join(";") || h || "";
2908
+ n.cssStyles ||= g.replaceAll("!important", "").split(";");
2909
+ let _ = d.members.length === 0 && d.methods.length === 0 && !r.class?.hideEmptyMembersBox, b = S.svg(f), x = v(n, {});
2910
+ n.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
2911
+ let C = Math.max(n.width ?? 0, p.width), w = Math.max(n.height ?? 0, p.height), E = (n.height ?? 0) > p.height;
2912
+ d.members.length === 0 && d.methods.length === 0 ? w += s : d.members.length > 0 && d.methods.length === 0 && (w += s * 2);
2913
+ let D = -C / 2, O = -w / 2, k = _ ? o * 2 : d.members.length === 0 && d.methods.length === 0 ? -o : 0;
2914
+ E && (k = o * 2);
2915
+ let A = b.rectangle(D - o, O - o - (_ ? o : d.members.length === 0 && d.methods.length === 0 ? -o / 2 : 0), C + 2 * o, w + 2 * o + k, x), j = f.insert(() => A, ":first-child");
2916
+ j.attr("class", "basic label-container outer-path");
2917
+ let M = j.node().getBBox(), N = f.select(".annotation-group").node().getBBox().height - (_ ? o / 2 : 0) || 0, P = f.select(".label-group").node().getBBox().height - (_ ? o / 2 : 0) || 0, F = f.select(".members-group").node().getBBox().height - (_ ? o / 2 : 0) || 0, I = (N + P + O + o - (O - o - (_ ? o : d.members.length === 0 && d.methods.length === 0 ? -o / 2 : 0))) / 2;
2918
+ if (f.selectAll(".text").each((t, n, i) => {
2919
+ let a = e(i[n]), c = a.attr("transform"), l = 0;
2920
+ if (c) {
2921
+ let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(c);
2922
+ e && (l = parseFloat(e[2]));
2923
+ }
2924
+ let p = l + O + o - (_ ? o : d.members.length === 0 && d.methods.length === 0 ? -o / 2 : 0);
2925
+ if (a.attr("class").includes("methods-group")) {
2926
+ let e = Math.max(F, s / 2);
2927
+ p = E ? Math.max(I, N + P + e + O + s * 2 + o) + s * 2 : N + P + e + O + s * 4 + o;
2928
+ }
2929
+ d.members.length === 0 && d.methods.length === 0 && r.class?.hideEmptyMembersBox && (p = d.annotations.length > 0 ? l - s : l), u || (p -= 4);
2930
+ let m = D;
2931
+ (a.attr("class").includes("label-group") || a.attr("class").includes("annotation-group")) && (m = -a.node()?.getBBox().width / 2 || 0, f.selectAll("text").each(function(e, t, n) {
2932
+ window.getComputedStyle(n[t]).textAnchor === "middle" && (m = 0);
2933
+ })), a.attr("transform", `translate(${m}, ${p})`);
2934
+ }), d.members.length > 0 || d.methods.length > 0 || _) {
2935
+ let e = N + P + O + o, t = b.line(M.x, e, M.x + M.width, e + .001, x);
2936
+ f.insert(() => t).attr("class", `divider${n.look === "neo" && !a ? " neo-line" : ""}`).attr("style", g);
2937
+ }
2938
+ if (_ || d.members.length > 0 || d.methods.length > 0) {
2939
+ let e = N + P + F + O + s * 2 + o, t = b.line(M.x, E ? Math.max(I, e) : e, M.x + M.width, (E ? Math.max(I, e) : e) + .001, x);
2940
+ f.insert(() => t).attr("class", `divider${n.look === "neo" && !a ? " neo-line" : ""}`).attr("style", g);
2941
+ }
2942
+ if (d.look !== "handDrawn" && f.selectAll("path").attr("style", g), j.select(":nth-child(2)").attr("style", g), f.selectAll(".divider").select("path").attr("style", g), n.labelStyle ? f.selectAll("span").attr("style", n.labelStyle) : f.selectAll("span").attr("style", g), !u) {
2943
+ let e = RegExp(/color\s*:\s*([^;]*)/), t = e.exec(g);
2944
+ if (t) {
2945
+ let e = t[0].replace("color", "fill");
2946
+ f.selectAll("tspan").attr("style", e);
2947
+ } else if (m) {
2948
+ let t = e.exec(m);
2949
+ if (t) {
2950
+ let e = t[0].replace("color", "fill");
2951
+ f.selectAll("tspan").attr("style", e);
2952
+ }
2953
+ }
2954
+ }
2955
+ return T(n, j), n.intersect = function(e) {
2956
+ return W.rect(n, e);
2957
+ }, f;
2958
+ }
2959
+ t(Vt, "classBox");
2960
+ async function Ht(t, n) {
2961
+ let { labelStyles: r, nodeStyles: i } = y(n);
2962
+ n.labelStyle = r;
2963
+ let a = n, o = n, s = "verifyMethod" in n, c = E(n), { themeVariables: u } = l(), { borderColorArray: d, requirementEdgeLabelBackground: f } = u, p = t.insert("g").attr("class", c).attr("id", n.domId ?? n.id), m;
2964
+ m = s ? await $(p, `&lt;&lt;${a.type}&gt;&gt;`, 0, n.labelStyle) : await $(p, "&lt;&lt;Element&gt;&gt;", 0, n.labelStyle);
2965
+ let h = m, g = await $(p, a.name, h, n.labelStyle + "; font-weight: bold;");
2966
+ if (h += g + 20, s) {
2967
+ let e = await $(p, `${a.requirementId ? `ID: ${a.requirementId}` : ""}`, h, n.labelStyle);
2968
+ h += e;
2969
+ let t = await $(p, `${a.text ? `Text: ${a.text}` : ""}`, h, n.labelStyle);
2970
+ h += t;
2971
+ let r = await $(p, `${a.risk ? `Risk: ${a.risk}` : ""}`, h, n.labelStyle);
2972
+ h += r, await $(p, `${a.verifyMethod ? `Verification: ${a.verifyMethod}` : ""}`, h, n.labelStyle);
2973
+ } else {
2974
+ let e = await $(p, `${o.type ? `Type: ${o.type}` : ""}`, h, n.labelStyle);
2975
+ h += e, await $(p, `${o.docRef ? `Doc Ref: ${o.docRef}` : ""}`, h, n.labelStyle);
2976
+ }
2977
+ let _ = (p.node()?.getBBox().width ?? 200) + 20, b = (p.node()?.getBBox().height ?? 200) + 20, x = -_ / 2, C = -b / 2, w = S.svg(p), D = v(n, {});
2978
+ n.look !== "handDrawn" && (D.roughness = 0, D.fillStyle = "solid");
2979
+ let O = w.rectangle(x, C, _, b, D), k = p.insert(() => O, ":first-child");
2980
+ if (k.attr("class", "basic label-container outer-path").attr("style", i), d?.length) {
2981
+ let e = n.colorIndex ?? 0;
2982
+ p.attr("data-color-id", `color-${e % d.length}`);
2983
+ }
2984
+ if (p.selectAll(".label").each((t, n, r) => {
2985
+ let i = e(r[n]), a = i.attr("transform"), o = 0, s = 0;
2986
+ if (a) {
2987
+ let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);
2988
+ e && (o = parseFloat(e[1]), s = parseFloat(e[2]));
2989
+ }
2990
+ let c = s - b / 2, l = x + 20 / 2;
2991
+ (n === 0 || n === 1) && (l = o), i.attr("transform", `translate(${l}, ${c + 20})`);
2992
+ }), h > m + g + 20) {
2993
+ let e = C + m + g + 20, t;
2994
+ if (n.look === "neo") {
2995
+ let n = .001, r = [
2996
+ [x, e],
2997
+ [x + _, e],
2998
+ [x + _, e + n],
2999
+ [x, e + n]
3000
+ ];
3001
+ t = w.polygon(r, D);
3002
+ } else t = w.line(x, e, x + _, e, D);
3003
+ p.insert(() => t).attr("class", "divider");
3004
+ }
3005
+ return T(n, k), n.intersect = function(e) {
3006
+ return W.rect(n, e);
3007
+ }, i && n.look !== "handDrawn" && (f || d?.length) && p.selectAll("path").attr("style", i), p;
3008
+ }
3009
+ t(Ht, "requirementBox");
3010
+ async function $(t, n, r, a = "") {
3011
+ if (n === "") return 0;
3012
+ let o = t.insert("g").attr("class", "label").attr("style", a), s = l(), c = s.htmlLabels ?? !0, u = await m(o, i(d(n)), {
3013
+ width: f(n, s) + 50,
3014
+ classes: "markdown-node-label",
3015
+ useHtmlLabels: c,
3016
+ style: a
3017
+ }, s), p;
3018
+ if (c) {
3019
+ let t = u.children[0], n = e(u);
3020
+ p = t.getBoundingClientRect(), n.attr("width", p.width), n.attr("height", p.height);
3021
+ } else {
3022
+ let e = u.children[0];
3023
+ for (let t of e.children) a && t.setAttribute("style", a);
3024
+ p = u.getBBox(), p.height += 6;
3025
+ }
3026
+ return o.attr("transform", `translate(${-p.width / 2},${-p.height / 2 + r})`), p.height;
3027
+ }
3028
+ t($, "addText");
3029
+ var Ut = /* @__PURE__ */ t((e) => {
3030
+ switch (e) {
3031
+ case "Very High": return "red";
3032
+ case "High": return "orange";
3033
+ case "Medium": return null;
3034
+ case "Low": return "blue";
3035
+ case "Very Low": return "lightblue";
3036
+ }
3037
+ }, "colorFromPriority");
3038
+ async function Wt(e, t, { config: n }) {
3039
+ let { labelStyles: r, nodeStyles: i } = y(t);
3040
+ t.labelStyle = r || "";
3041
+ let a = t.width;
3042
+ t.width = (t.width ?? 200) - 10;
3043
+ let { shapeSvg: o, bbox: s, label: c } = await C(e, t, E(t)), l = t.padding || 10, u = "", d;
3044
+ "ticket" in t && t.ticket && n?.kanban?.ticketBaseUrl && (u = n?.kanban?.ticketBaseUrl.replace("#TICKET#", t.ticket), d = o.insert("svg:a", ":first-child").attr("class", "kanban-ticket-link").attr("xlink:href", u).attr("target", "_blank"));
3045
+ let f = {
3046
+ useHtmlLabels: t.useHtmlLabels,
3047
+ labelStyle: t.labelStyle || "",
3048
+ width: t.width,
3049
+ img: t.img,
3050
+ padding: t.padding || 8,
3051
+ centerLabel: !1
3052
+ }, p, m;
3053
+ d ? {label: p, bbox: m} = await w(d, "ticket" in t && t.ticket || "", f) : {label: p, bbox: m} = await w(o, "ticket" in t && t.ticket || "", f);
3054
+ let { label: h, bbox: g } = await w(o, "assigned" in t && t.assigned || "", f);
3055
+ t.width = a;
3056
+ let _ = t?.width || 0, b = Math.max(m.height, g.height) / 2, x = Math.max(s.height + 20, t?.height || 0) + b, D = -_ / 2, O = -x / 2;
3057
+ c.attr("transform", "translate(" + (l - _ / 2) + ", " + (-b - s.height / 2) + ")"), p.attr("transform", "translate(" + (l - _ / 2) + ", " + (-b + s.height / 2) + ")"), h.attr("transform", "translate(" + (l + _ / 2 - g.width - 20) + ", " + (-b + s.height / 2) + ")");
3058
+ let k, { rx: A, ry: j } = t, { cssStyles: M } = t;
3059
+ if (t.look === "handDrawn") {
3060
+ let e = S.svg(o), n = v(t, {}), r = A || j ? e.path(N(D, O, _, x, A || 0), n) : e.rectangle(D, O, _, x, n);
3061
+ k = o.insert(() => r, ":first-child"), k.attr("class", "basic label-container").attr("style", M || null);
3062
+ } else {
3063
+ k = o.insert("rect", ":first-child"), k.attr("class", "basic label-container __APA__").attr("style", i).attr("rx", A ?? 5).attr("ry", j ?? 5).attr("x", D).attr("y", O).attr("width", _).attr("height", x);
3064
+ let e = "priority" in t && t.priority;
3065
+ if (e) {
3066
+ let t = o.append("line"), n = D + 2, r = O + Math.floor((A ?? 0) / 2), i = O + x - Math.floor((A ?? 0) / 2);
3067
+ t.attr("x1", n).attr("y1", r).attr("x2", n).attr("y2", i).attr("stroke-width", "4").attr("stroke", Ut(e));
3068
+ }
3069
+ }
3070
+ return T(t, k), t.height = x, t.intersect = function(e) {
3071
+ return W.rect(t, e);
3072
+ }, o;
3073
+ }
3074
+ t(Wt, "kanbanItem");
3075
+ async function Gt(e, t) {
3076
+ let { labelStyles: r, nodeStyles: i } = y(t);
3077
+ t.labelStyle = r;
3078
+ let { shapeSvg: a, bbox: o, halfPadding: s, label: c } = await C(e, t, E(t)), l = o.width + 10 * s, u = o.height + 8 * s, d = .15 * l, { cssStyles: f } = t, m = o.width + 20, h = o.height + 20, g = Math.max(l, m), _ = Math.max(u, h);
3079
+ c.attr("transform", `translate(${-o.width / 2}, ${-o.height / 2})`);
3080
+ let b, x = `M0 0
3081
+ a${d},${d} 1 0,0 ${g * .25},${-1 * _ * .1}
3082
+ a${d},${d} 1 0,0 ${g * .25},0
3083
+ a${d},${d} 1 0,0 ${g * .25},0
3084
+ a${d},${d} 1 0,0 ${g * .25},${_ * .1}
3085
+
3086
+ a${d},${d} 1 0,0 ${g * .15},${_ * .33}
3087
+ a${d * .8},${d * .8} 1 0,0 0,${_ * .34}
3088
+ a${d},${d} 1 0,0 ${-1 * g * .15},${_ * .33}
3089
+
3090
+ a${d},${d} 1 0,0 ${-1 * g * .25},${_ * .15}
3091
+ a${d},${d} 1 0,0 ${-1 * g * .25},0
3092
+ a${d},${d} 1 0,0 ${-1 * g * .25},0
3093
+ a${d},${d} 1 0,0 ${-1 * g * .25},${-1 * _ * .15}
3094
+
3095
+ a${d},${d} 1 0,0 ${-1 * g * .1},${-1 * _ * .33}
3096
+ a${d * .8},${d * .8} 1 0,0 0,${-1 * _ * .34}
3097
+ a${d},${d} 1 0,0 ${g * .1},${-1 * _ * .33}
3098
+ H0 V0 Z`;
3099
+ if (t.look === "handDrawn") {
3100
+ let e = S.svg(a), n = v(t, {}), r = e.path(x, n);
3101
+ b = a.insert(() => r, ":first-child"), b.attr("class", "basic label-container").attr("style", p(f));
3102
+ } else b = a.insert("path", ":first-child").attr("class", "basic label-container").attr("style", i).attr("d", x);
3103
+ return b.attr("transform", `translate(${-g / 2}, ${-_ / 2})`), T(t, b), t.calcIntersect = function(e, t) {
3104
+ return W.rect(e, t);
3105
+ }, t.intersect = function(e) {
3106
+ return n.info("Bang intersect", t, e), W.rect(t, e);
3107
+ }, a;
3108
+ }
3109
+ t(Gt, "bang");
3110
+ async function Kt(e, t) {
3111
+ let { labelStyles: r, nodeStyles: i } = y(t);
3112
+ t.labelStyle = r;
3113
+ let { shapeSvg: a, bbox: o, halfPadding: s, label: c } = await C(e, t, E(t)), l = o.width + 2 * s, u = o.height + 2 * s, d = .15 * l, f = .25 * l, m = .35 * l, h = .2 * l, { cssStyles: g } = t, _, b = `M0 0
3114
+ a${d},${d} 0 0,1 ${l * .25},${-1 * l * .1}
3115
+ a${m},${m} 1 0,1 ${l * .4},${-1 * l * .1}
3116
+ a${f},${f} 1 0,1 ${l * .35},${l * .2}
3117
+
3118
+ a${d},${d} 1 0,1 ${l * .15},${u * .35}
3119
+ a${h},${h} 1 0,1 ${-1 * l * .15},${u * .65}
3120
+
3121
+ a${f},${d} 1 0,1 ${-1 * l * .25},${l * .15}
3122
+ a${m},${m} 1 0,1 ${-1 * l * .5},0
3123
+ a${d},${d} 1 0,1 ${-1 * l * .25},${-1 * l * .15}
3124
+
3125
+ a${d},${d} 1 0,1 ${-1 * l * .1},${-1 * u * .35}
3126
+ a${h},${h} 1 0,1 ${l * .1},${-1 * u * .65}
3127
+ H0 V0 Z`;
3128
+ if (t.look === "handDrawn") {
3129
+ let e = S.svg(a), n = v(t, {}), r = e.path(b, n);
3130
+ _ = a.insert(() => r, ":first-child"), _.attr("class", "basic label-container").attr("style", p(g));
3131
+ } else _ = a.insert("path", ":first-child").attr("class", "basic label-container").attr("style", i).attr("d", b);
3132
+ return c.attr("transform", `translate(${-o.width / 2}, ${-o.height / 2})`), _.attr("transform", `translate(${-l / 2}, ${-u / 2})`), T(t, _), t.calcIntersect = function(e, t) {
3133
+ return W.rect(e, t);
3134
+ }, t.intersect = function(e) {
3135
+ return n.info("Cloud intersect", t, e), W.rect(t, e);
3136
+ }, a;
3137
+ }
3138
+ t(Kt, "cloud");
3139
+ async function qt(e, t) {
3140
+ let { labelStyles: n, nodeStyles: r } = y(t);
3141
+ t.labelStyle = n;
3142
+ let { shapeSvg: i, bbox: a, halfPadding: o, label: s } = await C(e, t, E(t)), c = a.width + 8 * o, l = a.height + 2 * o, u = t.look === "neo" ? `
3143
+ M${-c / 2} ${l / 2 - 5}
3144
+ v${-l + 10}
3145
+ q0,-5 5,-5
3146
+ h${c - 10}
3147
+ q5,0 5,5
3148
+ v${l - 5}
3149
+ H${-c / 2}
3150
+ Z
3151
+ ` : `
3152
+ M${-c / 2} ${l / 2 - 5}
3153
+ v${-l + 10}
3154
+ q0,-5 5,-5
3155
+ h${c - 10}
3156
+ q5,0 5,5
3157
+ v${l - 10}
3158
+ q0,5 -5,5
3159
+ h${-(c - 10)}
3160
+ q-5,0 -5,-5
3161
+ Z
3162
+ `;
3163
+ if (!t.domId) throw Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);
3164
+ let d = i.append("path").attr("id", t.domId).attr("class", "node-bkg node-" + t.type).attr("style", r).attr("d", u);
3165
+ return i.append("line").attr("class", "node-line-").attr("x1", -c / 2).attr("y1", l / 2).attr("x2", c / 2).attr("y2", l / 2), s.attr("transform", `translate(${-a.width / 2}, ${-a.height / 2})`), i.append(() => s.node()), T(t, d), t.calcIntersect = function(e, t) {
3166
+ return W.rect(e, t);
3167
+ }, t.intersect = function(e) {
3168
+ return W.rect(t, e);
3169
+ }, i;
3170
+ }
3171
+ t(qt, "defaultMindmapNode");
3172
+ async function Jt(e, t) {
3173
+ return ue(e, t, { padding: t.padding ?? 0 });
3174
+ }
3175
+ t(Jt, "mindmapCircle");
3176
+ var Yt = [
3177
+ {
3178
+ semanticName: "Process",
3179
+ name: "Rectangle",
3180
+ shortName: "rect",
3181
+ description: "Standard process shape",
3182
+ aliases: [
3183
+ "proc",
3184
+ "process",
3185
+ "rectangle"
3186
+ ],
3187
+ internalAliases: ["squareRect"],
3188
+ handler: lt
3189
+ },
3190
+ {
3191
+ semanticName: "Event",
3192
+ name: "Rounded Rectangle",
3193
+ shortName: "rounded",
3194
+ description: "Represents an event",
3195
+ aliases: ["event"],
3196
+ internalAliases: ["roundedRect"],
3197
+ handler: ot
3198
+ },
3199
+ {
3200
+ semanticName: "Terminal Point",
3201
+ name: "Stadium",
3202
+ shortName: "stadium",
3203
+ description: "Terminal point",
3204
+ aliases: ["terminal", "pill"],
3205
+ handler: ut
3206
+ },
3207
+ {
3208
+ semanticName: "Subprocess",
3209
+ name: "Framed Rectangle",
3210
+ shortName: "fr-rect",
3211
+ description: "Subprocess",
3212
+ aliases: [
3213
+ "subprocess",
3214
+ "subproc",
3215
+ "framed-rectangle",
3216
+ "subroutine"
3217
+ ],
3218
+ handler: ht
3219
+ },
3220
+ {
3221
+ semanticName: "Database",
3222
+ name: "Cylinder",
3223
+ shortName: "cyl",
3224
+ description: "Database storage",
3225
+ aliases: [
3226
+ "db",
3227
+ "database",
3228
+ "cylinder"
3229
+ ],
3230
+ handler: Se
3231
+ },
3232
+ {
3233
+ semanticName: "Data Store",
3234
+ name: "Data Store",
3235
+ shortName: "datastore",
3236
+ description: "Data flow diagram data store",
3237
+ aliases: ["data-store"],
3238
+ handler: we
3239
+ },
3240
+ {
3241
+ semanticName: "Start",
3242
+ name: "Circle",
3243
+ shortName: "circle",
3244
+ description: "Starting point",
3245
+ aliases: ["circ"],
3246
+ handler: ue
3247
+ },
3248
+ {
3249
+ semanticName: "Bang",
3250
+ name: "Bang",
3251
+ shortName: "bang",
3252
+ description: "Bang",
3253
+ aliases: ["bang"],
3254
+ handler: Gt
3255
+ },
3256
+ {
3257
+ semanticName: "Cloud",
3258
+ name: "Cloud",
3259
+ shortName: "cloud",
3260
+ description: "cloud",
3261
+ aliases: ["cloud"],
3262
+ handler: Kt
3263
+ },
3264
+ {
3265
+ semanticName: "Decision",
3266
+ name: "Diamond",
3267
+ shortName: "diam",
3268
+ description: "Decision-making step",
3269
+ aliases: [
3270
+ "decision",
3271
+ "diamond",
3272
+ "question"
3273
+ ],
3274
+ handler: rt
3275
+ },
3276
+ {
3277
+ semanticName: "Prepare Conditional",
3278
+ name: "Hexagon",
3279
+ shortName: "hex",
3280
+ description: "Preparation or condition step",
3281
+ aliases: ["hexagon", "prepare"],
3282
+ handler: Pe
3283
+ },
3284
+ {
3285
+ semanticName: "Data Input/Output",
3286
+ name: "Lean Right",
3287
+ shortName: "lean-r",
3288
+ description: "Represents input or output",
3289
+ aliases: ["lean-right", "in-out"],
3290
+ internalAliases: ["lean_right"],
3291
+ handler: We
3292
+ },
3293
+ {
3294
+ semanticName: "Data Input/Output",
3295
+ name: "Lean Left",
3296
+ shortName: "lean-l",
3297
+ description: "Represents output or input",
3298
+ aliases: ["lean-left", "out-in"],
3299
+ internalAliases: ["lean_left"],
3300
+ handler: Ue
3301
+ },
3302
+ {
3303
+ semanticName: "Priority Action",
3304
+ name: "Trapezoid Base Bottom",
3305
+ shortName: "trap-b",
3306
+ description: "Priority action",
3307
+ aliases: [
3308
+ "priority",
3309
+ "trapezoid-bottom",
3310
+ "trapezoid"
3311
+ ],
3312
+ handler: Et
3313
+ },
3314
+ {
3315
+ semanticName: "Manual Operation",
3316
+ name: "Trapezoid Base Top",
3317
+ shortName: "trap-t",
3318
+ description: "Represents a manual task",
3319
+ aliases: [
3320
+ "manual",
3321
+ "trapezoid-top",
3322
+ "inv-trapezoid"
3323
+ ],
3324
+ internalAliases: ["inv_trapezoid"],
3325
+ handler: Ve
3326
+ },
3327
+ {
3328
+ semanticName: "Stop",
3329
+ name: "Double Circle",
3330
+ shortName: "dbl-circ",
3331
+ description: "Represents a stop point",
3332
+ aliases: ["double-circle"],
3333
+ internalAliases: ["doublecircle"],
3334
+ handler: Ee
3335
+ },
3336
+ {
3337
+ semanticName: "Text Block",
3338
+ name: "Text Block",
3339
+ shortName: "text",
3340
+ description: "Text block",
3341
+ handler: yt
3342
+ },
3343
+ {
3344
+ semanticName: "Card",
3345
+ name: "Notched Rectangle",
3346
+ shortName: "notch-rect",
3347
+ description: "Represents a card",
3348
+ aliases: ["card", "notched-rectangle"],
3349
+ handler: ce
3350
+ },
3351
+ {
3352
+ semanticName: "Lined/Shaded Process",
3353
+ name: "Lined Rectangle",
3354
+ shortName: "lin-rect",
3355
+ description: "Lined process shape",
3356
+ aliases: [
3357
+ "lined-rectangle",
3358
+ "lined-process",
3359
+ "lin-proc",
3360
+ "shaded-process"
3361
+ ],
3362
+ handler: st
3363
+ },
3364
+ {
3365
+ semanticName: "Start",
3366
+ name: "Small Circle",
3367
+ shortName: "sm-circ",
3368
+ description: "Small starting point",
3369
+ aliases: ["start", "small-circle"],
3370
+ internalAliases: ["stateStart"],
3371
+ handler: pt
3372
+ },
3373
+ {
3374
+ semanticName: "Stop",
3375
+ name: "Framed Circle",
3376
+ shortName: "fr-circ",
3377
+ description: "Stop point",
3378
+ aliases: ["stop", "framed-circle"],
3379
+ internalAliases: ["stateEnd"],
3380
+ handler: ft
3381
+ },
3382
+ {
3383
+ semanticName: "Fork/Join",
3384
+ name: "Filled Rectangle",
3385
+ shortName: "fork",
3386
+ description: "Fork or join in process flow",
3387
+ aliases: ["join"],
3388
+ internalAliases: ["forkJoin"],
3389
+ handler: je
3390
+ },
3391
+ {
3392
+ semanticName: "Collate",
3393
+ name: "Hourglass",
3394
+ shortName: "hourglass",
3395
+ description: "Represents a collate operation",
3396
+ aliases: ["hourglass", "collate"],
3397
+ handler: Fe
3398
+ },
3399
+ {
3400
+ semanticName: "Comment",
3401
+ name: "Curly Brace",
3402
+ shortName: "brace",
3403
+ description: "Adds a comment",
3404
+ aliases: ["comment", "brace-l"],
3405
+ handler: pe
3406
+ },
3407
+ {
3408
+ semanticName: "Comment Right",
3409
+ name: "Curly Brace",
3410
+ shortName: "brace-r",
3411
+ description: "Adds a comment",
3412
+ handler: me
3413
+ },
3414
+ {
3415
+ semanticName: "Comment with braces on both sides",
3416
+ name: "Curly Braces",
3417
+ shortName: "braces",
3418
+ description: "Adds a comment",
3419
+ handler: he
3420
+ },
3421
+ {
3422
+ semanticName: "Com Link",
3423
+ name: "Lightning Bolt",
3424
+ shortName: "bolt",
3425
+ description: "Communication link",
3426
+ aliases: ["com-link", "lightning-bolt"],
3427
+ handler: Ge
3428
+ },
3429
+ {
3430
+ semanticName: "Document",
3431
+ name: "Document",
3432
+ shortName: "doc",
3433
+ description: "Represents a document",
3434
+ aliases: ["doc", "document"],
3435
+ handler: jt
3436
+ },
3437
+ {
3438
+ semanticName: "Delay",
3439
+ name: "Half-Rounded Rectangle",
3440
+ shortName: "delay",
3441
+ description: "Represents a delay",
3442
+ aliases: ["half-rounded-rectangle"],
3443
+ handler: Me
3444
+ },
3445
+ {
3446
+ semanticName: "Direct Access Storage",
3447
+ name: "Horizontal Cylinder",
3448
+ shortName: "h-cyl",
3449
+ description: "Direct access storage",
3450
+ aliases: ["das", "horizontal-cylinder"],
3451
+ handler: Tt
3452
+ },
3453
+ {
3454
+ semanticName: "Disk Storage",
3455
+ name: "Lined Cylinder",
3456
+ shortName: "lin-cyl",
3457
+ description: "Disk storage",
3458
+ aliases: ["disk", "lined-cylinder"],
3459
+ handler: Ze
3460
+ },
3461
+ {
3462
+ semanticName: "Display",
3463
+ name: "Curved Trapezoid",
3464
+ shortName: "curv-trap",
3465
+ description: "Represents a display",
3466
+ aliases: ["curved-trapezoid", "display"],
3467
+ handler: ge
3468
+ },
3469
+ {
3470
+ semanticName: "Divided Process",
3471
+ name: "Divided Rectangle",
3472
+ shortName: "div-rect",
3473
+ description: "Divided process shape",
3474
+ aliases: [
3475
+ "div-proc",
3476
+ "divided-rectangle",
3477
+ "divided-process"
3478
+ ],
3479
+ handler: Te
3480
+ },
3481
+ {
3482
+ semanticName: "Extract",
3483
+ name: "Triangle",
3484
+ shortName: "tri",
3485
+ description: "Extraction process",
3486
+ aliases: ["extract", "triangle"],
3487
+ handler: At
3488
+ },
3489
+ {
3490
+ semanticName: "Internal Storage",
3491
+ name: "Window Pane",
3492
+ shortName: "win-pane",
3493
+ description: "Internal storage",
3494
+ aliases: ["internal-storage", "window-pane"],
3495
+ handler: Nt
3496
+ },
3497
+ {
3498
+ semanticName: "Junction",
3499
+ name: "Filled Circle",
3500
+ shortName: "f-circ",
3501
+ description: "Junction point",
3502
+ aliases: ["junction", "filled-circle"],
3503
+ handler: De
3504
+ },
3505
+ {
3506
+ semanticName: "Loop Limit",
3507
+ name: "Trapezoidal Pentagon",
3508
+ shortName: "notch-pent",
3509
+ description: "Loop limit step",
3510
+ aliases: ["loop-limit", "notched-pentagon"],
3511
+ handler: Dt
3512
+ },
3513
+ {
3514
+ semanticName: "Manual File",
3515
+ name: "Flipped Triangle",
3516
+ shortName: "flip-tri",
3517
+ description: "Manual file operation",
3518
+ aliases: ["manual-file", "flipped-triangle"],
3519
+ handler: Ae
3520
+ },
3521
+ {
3522
+ semanticName: "Manual Input",
3523
+ name: "Sloped Rectangle",
3524
+ shortName: "sl-rect",
3525
+ description: "Manual input step",
3526
+ aliases: ["manual-input", "sloped-rectangle"],
3527
+ handler: ct
3528
+ },
3529
+ {
3530
+ semanticName: "Multi-Document",
3531
+ name: "Stacked Document",
3532
+ shortName: "docs",
3533
+ description: "Multiple documents",
3534
+ aliases: [
3535
+ "documents",
3536
+ "st-doc",
3537
+ "stacked-document"
3538
+ ],
3539
+ handler: et
3540
+ },
3541
+ {
3542
+ semanticName: "Multi-Process",
3543
+ name: "Stacked Rectangle",
3544
+ shortName: "st-rect",
3545
+ description: "Multiple processes",
3546
+ aliases: [
3547
+ "procs",
3548
+ "processes",
3549
+ "stacked-rectangle"
3550
+ ],
3551
+ handler: $e
3552
+ },
3553
+ {
3554
+ semanticName: "Stored Data",
3555
+ name: "Bow Tie Rectangle",
3556
+ shortName: "bow-rect",
3557
+ description: "Stored data",
3558
+ aliases: ["stored-data", "bow-tie-rectangle"],
3559
+ handler: oe
3560
+ },
3561
+ {
3562
+ semanticName: "Summary",
3563
+ name: "Crossed Circle",
3564
+ shortName: "cross-circ",
3565
+ description: "Summary",
3566
+ aliases: ["summary", "crossed-circle"],
3567
+ handler: fe
3568
+ },
3569
+ {
3570
+ semanticName: "Tagged Document",
3571
+ name: "Tagged Document",
3572
+ shortName: "tag-doc",
3573
+ description: "Tagged document",
3574
+ aliases: ["tag-doc", "tagged-document"],
3575
+ handler: vt
3576
+ },
3577
+ {
3578
+ semanticName: "Tagged Process",
3579
+ name: "Tagged Rectangle",
3580
+ shortName: "tag-rect",
3581
+ description: "Tagged process",
3582
+ aliases: [
3583
+ "tagged-rectangle",
3584
+ "tag-proc",
3585
+ "tagged-process"
3586
+ ],
3587
+ handler: _t
3588
+ },
3589
+ {
3590
+ semanticName: "Paper Tape",
3591
+ name: "Flag",
3592
+ shortName: "flag",
3593
+ description: "Paper tape",
3594
+ aliases: ["paper-tape"],
3595
+ handler: Mt
3596
+ },
3597
+ {
3598
+ semanticName: "Odd",
3599
+ name: "Odd",
3600
+ shortName: "odd",
3601
+ description: "Odd shape",
3602
+ internalAliases: ["rect_left_inv_arrow"],
3603
+ handler: it
3604
+ },
3605
+ {
3606
+ semanticName: "Lined Document",
3607
+ name: "Lined Document",
3608
+ shortName: "lin-doc",
3609
+ description: "Lined document",
3610
+ aliases: ["lined-document"],
3611
+ handler: Qe
3612
+ }
3613
+ ], Xt = (/* @__PURE__ */ t(() => {
3614
+ let e = [...Object.entries({
3615
+ state: dt,
3616
+ choice: le,
3617
+ note: tt,
3618
+ rectWithTitle: at,
3619
+ labelRect: He,
3620
+ iconSquare: ze,
3621
+ iconCircle: Le,
3622
+ icon: Ie,
3623
+ iconRounded: Re,
3624
+ imageSquare: Be,
3625
+ anchor: G,
3626
+ kanbanItem: Wt,
3627
+ mindmapCircle: Jt,
3628
+ defaultMindmapNode: qt,
3629
+ classBox: Vt,
3630
+ erBox: It,
3631
+ requirementBox: Ht
3632
+ }), ...Yt.flatMap((e) => [
3633
+ e.shortName,
3634
+ ..."aliases" in e ? e.aliases : [],
3635
+ ..."internalAliases" in e ? e.internalAliases : []
3636
+ ].map((t) => [t, e.handler]))];
3637
+ return Object.fromEntries(e);
3638
+ }, "generateShapeMap"))();
3639
+ function Zt(e) {
3640
+ return e in Xt;
3641
+ }
3642
+ t(Zt, "isValidShape");
3643
+ var Qt = /* @__PURE__ */ new Map();
3644
+ async function $t(e, t, n) {
3645
+ let r, i;
3646
+ t.shape === "rect" && (t.rx && t.ry ? t.shape = "roundedRect" : t.shape = "squareRect");
3647
+ let a = t.shape ? Xt[t.shape] : void 0;
3648
+ if (!a) throw Error(`No such shape: ${t.shape}. Please check your syntax.`);
3649
+ if (t.link) {
3650
+ let o;
3651
+ n.config.securityLevel === "sandbox" ? o = "_top" : t.linkTarget && (o = t.linkTarget || "_blank"), r = e.insert("svg:a").attr("xlink:href", t.link).attr("target", o ?? null), i = await a(r, t, n);
3652
+ } else i = await a(e, t, n), r = i;
3653
+ return r.attr("data-look", p(t.look)), t.tooltip && i.attr("title", t.tooltip), Qt.set(t.id, r), t.haveCallback && r.attr("class", r.attr("class") + " clickable"), r;
3654
+ }
3655
+ t($t, "insertNode");
3656
+ var en = /* @__PURE__ */ t((e, t) => {
3657
+ Qt.set(t.id, e);
3658
+ }, "setNodeElem"), tn = /* @__PURE__ */ t(() => {
3659
+ Qt.clear();
3660
+ }, "clear"), nn = /* @__PURE__ */ t((e) => {
3661
+ let t = Qt.get(e.id);
3662
+ n.trace("Transforming node", e.diff, e, "translate(" + (e.x - e.width / 2 - 5) + ", " + e.width / 2 + ")");
3663
+ let r = e.diff || 0;
3664
+ return e.clusterNode ? t.attr("transform", "translate(" + (e.x + r - e.width / 2) + ", " + (e.y - e.height / 2 - 8) + ")") : t.attr("transform", "translate(" + e.x + ", " + e.y + ")"), r;
3665
+ }, "positionNode");
3666
+ //#endregion
3667
+ export { $t as a, nn as c, ee as i, en as l, tn as n, Zt as o, M as r, C as s, te as t, T as u };
3668
+
3669
+ //# sourceMappingURL=chunk-3OPIFGDE-CcNRL44h.js.map