@jackuait/blok 0.10.0-beta.6 → 0.10.0-beta.8

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 (448) hide show
  1. package/codemod/migrate-editorjs-to-blok.js +0 -2
  2. package/codemod/test.js +0 -6
  3. package/dist/blok.mjs +2 -2
  4. package/dist/chunks/_basePickBy-DISiGhsr.mjs +410 -0
  5. package/dist/chunks/_baseUniq-gAuHRtRF.mjs +1045 -0
  6. package/dist/chunks/_getTag-Aj56Wgor.mjs +26 -0
  7. package/dist/chunks/arc-D-pL2Ftf.mjs +80 -0
  8. package/dist/chunks/architecture-YZFGNWBL-CuqTb_ae.mjs +3 -0
  9. package/dist/chunks/architectureDiagram-Q4EWVU46-DS7mqjL2.mjs +4066 -0
  10. package/dist/chunks/array-BsrkCVSZ.mjs +6 -0
  11. package/dist/chunks/blockDiagram-DXYQGD6D-BTtcn4NG.mjs +3259 -0
  12. package/dist/chunks/{blok-BdlR_lX6.mjs → blok-CRvF-xVm.mjs} +2142 -2171
  13. package/dist/chunks/c-C6JXJf5K.mjs +5 -0
  14. package/dist/chunks/c4Diagram-AHTNJAMY-Y4Dcwcoo.mjs +2956 -0
  15. package/dist/chunks/ccount-C9Y7nqDe.mjs +10 -0
  16. package/dist/chunks/channel-Cln-eWE0.mjs +5 -0
  17. package/dist/chunks/chunk-2KRD3SAO-DkM7qh-k.mjs +20 -0
  18. package/dist/chunks/chunk-336JU56O-B17AtzlK.mjs +49 -0
  19. package/dist/chunks/chunk-426QAEUC-D6UAVUog.mjs +13 -0
  20. package/dist/chunks/chunk-4BX2VUAB-CgIkjF7Z.mjs +19 -0
  21. package/dist/chunks/chunk-4TB4RGXK-BUP4eON3.mjs +3250 -0
  22. package/dist/chunks/chunk-55IACEB6-zZ-IgaSt.mjs +8 -0
  23. package/dist/chunks/chunk-5FUZZQ4R-DsZnJYxM.mjs +3786 -0
  24. package/dist/chunks/chunk-5PVQY5BW-CORl9dnu.mjs +1692 -0
  25. package/dist/chunks/chunk-67CJDMHE-m0UKdcSH.mjs +20 -0
  26. package/dist/chunks/chunk-7N4EOEYR-DKNajFZd.mjs +29 -0
  27. package/dist/chunks/chunk-AA7GKIK3-BeLhNzKa.mjs +24 -0
  28. package/dist/chunks/chunk-BSJP7CBP-CJExmx8a.mjs +83 -0
  29. package/dist/chunks/chunk-CIAEETIT-CTikoJ19.mjs +20 -0
  30. package/dist/chunks/{chunk-Byubey_H.mjs → chunk-D6kmoKXy.mjs} +5 -5
  31. package/dist/chunks/chunk-EDXVE4YY-DjInnnwb.mjs +26 -0
  32. package/dist/chunks/chunk-ENJZ2VHE-CIl5FRDA.mjs +566 -0
  33. package/dist/chunks/chunk-FMBD7UC4-DjV0W7UE.mjs +5 -0
  34. package/dist/chunks/chunk-FOC6F5B3-LmHCCWYY.mjs +20 -0
  35. package/dist/chunks/chunk-ICPOFSXX-BHZIN46A.mjs +3290 -0
  36. package/dist/chunks/chunk-K5T4RW27-BPZ6fFnW.mjs +16370 -0
  37. package/dist/chunks/chunk-KGLVRYIC-S1OQdW76.mjs +20 -0
  38. package/dist/chunks/chunk-LIHQZDEY-CjtyJlI6.mjs +55 -0
  39. package/dist/chunks/chunk-ORNJ4GCN-CdO0hAge.mjs +25 -0
  40. package/dist/chunks/chunk-OYMX7WX6-ApX8eV4o.mjs +2038 -0
  41. package/dist/chunks/chunk-QZHKN3VN-BGFuA6-k.mjs +12 -0
  42. package/dist/chunks/chunk-U2HBQHQK-B88ZUOTL.mjs +1875 -0
  43. package/dist/chunks/chunk-X2U36JSP-1VS5TyCr.mjs +68 -0
  44. package/dist/chunks/chunk-XPW4576I-BMupdrvo.mjs +1146 -0
  45. package/dist/chunks/chunk-YZCP3GAM-BQ7eEsm2.mjs +60 -0
  46. package/dist/chunks/chunk-ZZ45TVLE-D1xks9zd.mjs +33 -0
  47. package/dist/chunks/classDiagram-6PBFFD2Q-C59BZJxp.mjs +30 -0
  48. package/dist/chunks/classDiagram-v2-HSJHXN6E-7a0qeMsE.mjs +30 -0
  49. package/dist/chunks/clone-Ckjt1LtE.mjs +8 -0
  50. package/dist/chunks/{constants-Cp8O0UfP.mjs → constants-BOZ5plBi.mjs} +49 -50
  51. package/dist/chunks/core-Bm6DWt7D.mjs +4501 -0
  52. package/dist/chunks/cose-bilkent-S5V4N54A-Bpcs2jA_.mjs +2246 -0
  53. package/dist/chunks/cpp-BdjvAny0.mjs +16 -0
  54. package/dist/chunks/csharp-YHxeHpeH.mjs +3 -0
  55. package/dist/chunks/css-DdLevFaX.mjs +3 -0
  56. package/dist/chunks/cytoscape.esm-BvD8wo00.mjs +18108 -0
  57. package/dist/chunks/dagre-CGNbYTKq.mjs +1536 -0
  58. package/dist/chunks/dagre-KV5264BT-DUD9ikgN.mjs +298 -0
  59. package/dist/chunks/dart-DrPWqfcC.mjs +3 -0
  60. package/dist/chunks/defaultLocale-ChuSeAxU.mjs +201 -0
  61. package/dist/chunks/diagram-5BDNPKRD-CZGfTYEe.mjs +112 -0
  62. package/dist/chunks/diagram-G4DWMVQ6-CuS0-h95.mjs +546 -0
  63. package/dist/chunks/diagram-MMDJMWI5-C-AEApYz.mjs +234 -0
  64. package/dist/chunks/diagram-TYMM5635-CiwAJVMq.mjs +144 -0
  65. package/dist/chunks/dist-Ctq-pyfb.mjs +59 -0
  66. package/dist/chunks/dockerfile-C68ALcaN.mjs +3 -0
  67. package/dist/chunks/engine-javascript-CJpnSvzf.mjs +2373 -0
  68. package/dist/chunks/erDiagram-SMLLAGMA-DeH5yck2.mjs +1712 -0
  69. package/dist/chunks/flowDiagram-DWJPFMVM-Cr6dwmQ5.mjs +4175 -0
  70. package/dist/chunks/ganttDiagram-T4ZO3ILL-K-divBg_.mjs +3083 -0
  71. package/dist/chunks/gitGraph-7Q5UKJZL-Dl-vQzrq.mjs +3 -0
  72. package/dist/chunks/gitGraphDiagram-UUTBAWPF-UytPZv72.mjs +792 -0
  73. package/dist/chunks/go-Fm5N96DN.mjs +3 -0
  74. package/dist/chunks/graphlib-Cye9EPNq.mjs +223 -0
  75. package/dist/chunks/graphql-BSnqmqgO.mjs +11 -0
  76. package/dist/chunks/html-BLNeZvnp.mjs +10 -0
  77. package/dist/chunks/{i18next-loader-oDO9ZKUV.mjs → i18next-loader-CwsYu0n6.mjs} +2 -2
  78. package/dist/chunks/info-OMHHGYJF-BOejJvJR.mjs +3 -0
  79. package/dist/chunks/infoDiagram-42DDH7IO-DuYnDbF3.mjs +29 -0
  80. package/dist/chunks/init-C6T-mugb.mjs +15 -0
  81. package/dist/chunks/ishikawaDiagram-UXIWVN3A-CHc59dLn.mjs +719 -0
  82. package/dist/chunks/java-83DWBpzu.mjs +5 -0
  83. package/dist/chunks/javascript-CBgeF1Xx.mjs +3 -0
  84. package/dist/chunks/journeyDiagram-VCZTEJTY-CD25C4_n.mjs +885 -0
  85. package/dist/chunks/json-BI17y-1H.mjs +3 -0
  86. package/dist/chunks/kanban-definition-6JOO6SKY-CTCT6N_p.mjs +980 -0
  87. package/dist/chunks/{katex-NjLaA6AJ.mjs → katex-CmTPfM0f.mjs} +1 -1
  88. package/dist/chunks/kotlin-DjnvsrfO.mjs +3 -0
  89. package/dist/chunks/latex-24n3TcOR.mjs +5 -0
  90. package/dist/chunks/{lightweight-i18n-DTySD6f6.mjs → lightweight-i18n-Cvv8CWh4.mjs} +13 -0
  91. package/dist/chunks/line-Dct5pMmw.mjs +34 -0
  92. package/dist/chunks/linear-BRCpMvtr.mjs +289 -0
  93. package/dist/chunks/lua-DV0fuZWx.mjs +5 -0
  94. package/dist/chunks/markdown-BqQYT45f.mjs +3 -0
  95. package/dist/chunks/{mdast-util-math-yS0EygZV.mjs → mdast-util-math-BlK2Zu-1.mjs} +1 -1
  96. package/dist/chunks/mermaid-parser.core-CA3DKkuk.mjs +57 -0
  97. package/dist/chunks/mermaid-vF0cEnZ0.mjs +3 -0
  98. package/dist/chunks/mermaid.core-CA8nc1sZ.mjs +989 -0
  99. package/dist/{messages-BYQ769S5.mjs → chunks/messages-8IHf7ZP3.mjs} +26 -1
  100. package/dist/chunks/{messages-DRv4g-IA.mjs → messages-A_MkXDlG.mjs} +26 -1
  101. package/dist/chunks/{messages-vN4T4r67.mjs → messages-B0vPBsWq.mjs} +26 -1
  102. package/dist/chunks/{messages-BDXl53cy2.mjs → messages-B2N4fUi72.mjs} +26 -1
  103. package/dist/chunks/{messages-DopbvJlg.mjs → messages-B4UMuyjT.mjs} +31 -6
  104. package/dist/{messages-uCsQjz7M.mjs → chunks/messages-B9kmbUWV.mjs} +26 -1
  105. package/dist/{messages-JK9Okzsy2.mjs → chunks/messages-BA8Iv99Y2.mjs} +26 -1
  106. package/dist/chunks/{messages-yszqJukE.mjs → messages-BAsb5CgZ.mjs} +26 -1
  107. package/dist/{messages-CEEzfqMO2.mjs → chunks/messages-BDZA10kl2.mjs} +29 -4
  108. package/dist/{messages-BeI2HORe2.mjs → chunks/messages-BE6lHKwf.mjs} +26 -1
  109. package/dist/{messages--cUQf9JX.mjs → chunks/messages-BQYvBqm2.mjs} +27 -2
  110. package/dist/{messages-CsiGzUSP2.mjs → chunks/messages-BSghd0ez.mjs} +26 -1
  111. package/dist/chunks/{messages-BXn9Vzbx2.mjs → messages-BUVhHx0q2.mjs} +26 -1
  112. package/dist/chunks/{messages-5ArOv8cj.mjs → messages-BVjoM7P0.mjs} +26 -1
  113. package/dist/chunks/{messages-CvlMT1e62.mjs → messages-BXM80fdr2.mjs} +26 -1
  114. package/dist/chunks/{messages-BlcRm2I3.mjs → messages-BYlSMRkd.mjs} +26 -1
  115. package/dist/chunks/{messages-bmwto4UV.mjs → messages-BYxLFj7y.mjs} +26 -1
  116. package/dist/chunks/{messages-SSDr5fGF2.mjs → messages-BeFqtIrc2.mjs} +26 -1
  117. package/dist/{messages-CD8K1g_t2.mjs → chunks/messages-Bfnq1xv4.mjs} +26 -1
  118. package/dist/chunks/{messages-B5fKJXd6.mjs → messages-BhzzNkN-.mjs} +26 -1
  119. package/dist/{messages-Dq_v7slw2.mjs → chunks/messages-BjadX8jR2.mjs} +26 -1
  120. package/dist/{messages-x353UCBI.mjs → chunks/messages-Bp8qin1R.mjs} +26 -1
  121. package/dist/{messages-hrSlVSHp.mjs → chunks/messages-Bphq_Bt3.mjs} +33 -8
  122. package/dist/chunks/{messages-CF_PfacZ.mjs → messages-Bxvi1ebN.mjs} +26 -1
  123. package/dist/chunks/{messages-DdmWzF5M.mjs → messages-C0HvoMPb.mjs} +27 -2
  124. package/dist/chunks/{messages-C5aCWL7B.mjs → messages-C3aX3q0H.mjs} +26 -1
  125. package/dist/{messages-DbZsJAff.mjs → chunks/messages-C6Mpiacw.mjs} +26 -1
  126. package/dist/{messages-PvMdmlxI.mjs → chunks/messages-C7VGpihw.mjs} +28 -3
  127. package/dist/chunks/{messages-DGD6BiGd.mjs → messages-CKBhDGI3.mjs} +28 -3
  128. package/dist/chunks/{messages-BaoJwsEZ.mjs → messages-COO5xmcA.mjs} +26 -1
  129. package/dist/chunks/{messages-Dz3UhEco2.mjs → messages-CSJ_zb3a2.mjs} +26 -1
  130. package/dist/chunks/{messages-CjVPwkVy.mjs → messages-CSL-6xfb2.mjs} +26 -1
  131. package/dist/{messages-B4lhNMKm2.mjs → chunks/messages-CVdpweyf2.mjs} +28 -3
  132. package/dist/chunks/{messages-DQ5ng0_t2.mjs → messages-Cdf0W9H02.mjs} +26 -1
  133. package/dist/{messages-Bug6Du35.mjs → chunks/messages-Ck81cQkn2.mjs} +26 -1
  134. package/dist/chunks/{messages-DUGEqDEG.mjs → messages-Cmf6NhSC.mjs} +26 -1
  135. package/dist/chunks/{messages-BMq9k_lI.mjs → messages-Cs81Z_Bh.mjs} +26 -1
  136. package/dist/{messages-B3Yhiycb2.mjs → chunks/messages-Cu-Wevxs2.mjs} +27 -2
  137. package/dist/{messages-DIKCwGog.mjs → chunks/messages-D3zojZ94.mjs} +30 -5
  138. package/dist/{messages-Bdk4ocMI.mjs → chunks/messages-D55HRx5O2.mjs} +26 -1
  139. package/dist/{messages-CvvbLyTy2.mjs → chunks/messages-D9N2MvQx2.mjs} +26 -1
  140. package/dist/{messages-C5Uufygq.mjs → chunks/messages-DG-4DPmP.mjs} +26 -1
  141. package/dist/{messages-C8f1I5EQ2.mjs → chunks/messages-DGL1ySqb2.mjs} +27 -2
  142. package/dist/chunks/{messages-D8-N0FmU.mjs → messages-DJoNVjqP.mjs} +27 -2
  143. package/dist/chunks/{messages-CcyIKgGU.mjs → messages-DMVXnAYj.mjs} +30 -5
  144. package/dist/chunks/{messages-CZ5Sbf8U.mjs → messages-DOuS1Qge.mjs} +26 -1
  145. package/dist/chunks/{messages-BXSXk3oS2.mjs → messages-DWu1r4gc2.mjs} +28 -3
  146. package/dist/{messages-KqWQKmIu2.mjs → chunks/messages-DlLXpgWM2.mjs} +27 -2
  147. package/dist/{messages-DQN1y6E9.mjs → chunks/messages-DlonA3wa.mjs} +28 -3
  148. package/dist/chunks/{messages-DVKifYlq.mjs → messages-Dr0Ekmbz.mjs} +49 -24
  149. package/dist/{messages-DACg1XAu.mjs → chunks/messages-DzTk8bJ5.mjs} +26 -1
  150. package/dist/{messages-BOE2mzCj2.mjs → chunks/messages-FWfsxpBz.mjs} +26 -1
  151. package/dist/{messages-CBPiFbEf2.mjs → chunks/messages-G416eyjY.mjs} +26 -1
  152. package/dist/chunks/{messages-DZwCufSb.mjs → messages-Je5YvxiY.mjs} +26 -1
  153. package/dist/chunks/{messages-DN-194c32.mjs → messages-JyvWu4rf2.mjs} +26 -1
  154. package/dist/chunks/{messages-CqgEz7C5.mjs → messages-KdawW5Na.mjs} +26 -1
  155. package/dist/{messages-X80Nh0ib.mjs → chunks/messages-MxpWO1db.mjs} +27 -2
  156. package/dist/chunks/{messages-CnQydQJd2.mjs → messages-NEqrrYvE2.mjs} +26 -1
  157. package/dist/{messages-DkvQ-6HC2.mjs → chunks/messages-RInp1ytX.mjs} +28 -3
  158. package/dist/chunks/{messages-DSO2U-ul.mjs → messages-TRUuyiFB.mjs} +26 -1
  159. package/dist/chunks/{messages-BhcYsC_M2.mjs → messages-aZcy0JQq2.mjs} +26 -1
  160. package/dist/chunks/{messages-ByAqzAhB.mjs → messages-iS34FHFB.mjs} +26 -1
  161. package/dist/{messages-12_eyAo-.mjs → chunks/messages-ihCjSFJI2.mjs} +26 -1
  162. package/dist/{messages-mipkPgwQ2.mjs → chunks/messages-jfVpL9c-2.mjs} +26 -1
  163. package/dist/{messages-Cb3wXGnc.mjs → chunks/messages-p1mbe__S.mjs} +27 -2
  164. package/dist/chunks/{messages-Dgng6KN8.mjs → messages-rCd0Rrw6.mjs} +28 -3
  165. package/dist/{messages-Dj79y02X.mjs → chunks/messages-xuqyb6Ff2.mjs} +26 -1
  166. package/dist/chunks/{micromark-extension-math-CCEGWpdz.mjs → micromark-extension-math-BbkUb36G.mjs} +2 -2
  167. package/dist/chunks/mindmap-definition-QFDTVHPH-hNnyBkEP.mjs +1013 -0
  168. package/dist/chunks/objectWithoutProperties-D0XxKB4n.mjs +23 -0
  169. package/dist/chunks/one-light-DmNO_Y4X.mjs +4 -0
  170. package/dist/chunks/ordinal-B-kolV-i.mjs +65 -0
  171. package/dist/chunks/packet-4T2RLAQJ-B5ZMgwzZ.mjs +3 -0
  172. package/dist/chunks/path-rIMjg_tH.mjs +85 -0
  173. package/dist/chunks/php-DmXKyPwJ.mjs +18 -0
  174. package/dist/chunks/pie-ZZUOXDRM-B9l6y0XJ.mjs +3 -0
  175. package/dist/chunks/pieDiagram-DEJITSTG-Gw-fsc6U.mjs +179 -0
  176. package/dist/chunks/python-DfwfY9t5.mjs +3 -0
  177. package/dist/chunks/quadrantDiagram-34T5L4WZ-CQ5fGYI5.mjs +1960 -0
  178. package/dist/chunks/r-BD2D7qEW.mjs +5 -0
  179. package/dist/chunks/radar-PYXPWWZC-D5kYmUaB.mjs +3 -0
  180. package/dist/chunks/requirementDiagram-MS252O5E-DjWKB42c.mjs +2224 -0
  181. package/dist/chunks/rough.esm-cmMIcj7N.mjs +1353 -0
  182. package/dist/chunks/ruby-DdOo03Kg.mjs +33 -0
  183. package/dist/chunks/rust-DEDueB5R.mjs +3 -0
  184. package/dist/chunks/sankeyDiagram-XADWPNL6-BIN2evSB.mjs +909 -0
  185. package/dist/chunks/scala-CsjqvxE4.mjs +3 -0
  186. package/dist/chunks/sequenceDiagram-FGHM5R23-CQz2lMoS.mjs +4181 -0
  187. package/dist/chunks/shellscript-Bh5zEpnQ.mjs +3 -0
  188. package/dist/chunks/sql-D9CrOi1i.mjs +3 -0
  189. package/dist/chunks/src-DVJl6f6s.mjs +2149 -0
  190. package/dist/chunks/stateDiagram-FHFEXIEX-BIBFsF65.mjs +218 -0
  191. package/dist/chunks/stateDiagram-v2-QKLJ7IA2-BZUmAVw7.mjs +28 -0
  192. package/dist/chunks/swift-Dpyt0s2c.mjs +3 -0
  193. package/dist/chunks/timeline-definition-GMOUNBTQ-CzvQ7Lav.mjs +1084 -0
  194. package/dist/chunks/{tools-DGOsJbHH.mjs → tools-CnqCfv2L.mjs} +2116 -1268
  195. package/dist/chunks/treeView-SZITEDCU-BNtnNxpI.mjs +3 -0
  196. package/dist/chunks/treemap-W4RFUUIX-DYENULz2.mjs +3 -0
  197. package/dist/chunks/typescript-DO5cd4m8.mjs +5 -0
  198. package/dist/chunks/vennDiagram-DHZGUBPP-B0DmLQqe.mjs +1876 -0
  199. package/dist/chunks/vitesse-dark-CcorSKT2.mjs +4 -0
  200. package/dist/chunks/wardley-RL74JXVD-ByNHVBTb.mjs +3 -0
  201. package/dist/chunks/wardleyDiagram-NUSXRM2D-CzoKesUw.mjs +594 -0
  202. package/dist/chunks/xml-g8kXXALs.mjs +5 -0
  203. package/dist/chunks/xychartDiagram-5P7HB3ND-CixwR8r2.mjs +2017 -0
  204. package/dist/chunks/yaml-CrNNZyLb.mjs +3 -0
  205. package/dist/cli.mjs +1 -1
  206. package/dist/full.mjs +3 -3
  207. package/dist/locales.mjs +80 -67
  208. package/dist/markdown.mjs +385 -393
  209. package/dist/{chunks/messages-9l49jauY.mjs → messages-5jvKxQNu2.mjs} +26 -1
  210. package/dist/{messages-CkySRhtd2.mjs → messages-7QD-X6XT2.mjs} +26 -1
  211. package/dist/{chunks/messages-Btr121zI2.mjs → messages-96iaAUds2.mjs} +27 -2
  212. package/dist/{chunks/messages-BAP2OAQk.mjs → messages-B19o-Teb.mjs} +28 -3
  213. package/dist/{messages-DJU4YLij.mjs → messages-B1ZUQagA.mjs} +26 -1
  214. package/dist/{messages-Dg2CDXZi2.mjs → messages-B7ieAJBd2.mjs} +26 -1
  215. package/dist/{messages-CByBLxWk.mjs → messages-BECMxmfX.mjs} +26 -1
  216. package/dist/{messages-CwCEcbWG.mjs → messages-BIHc0KHY.mjs} +27 -2
  217. package/dist/{messages-D8WvwU42.mjs → messages-BIoeoik5.mjs} +26 -1
  218. package/dist/{messages-D38h5XlF.mjs → messages-BJeGJksD.mjs} +26 -1
  219. package/dist/{messages-Cd23UgLV2.mjs → messages-BRZX964b2.mjs} +27 -2
  220. package/dist/{chunks/messages-B9N__q552.mjs → messages-BTQPpoM42.mjs} +29 -4
  221. package/dist/{messages-CUzBNjnc.mjs → messages-BYNcD6uR.mjs} +26 -1
  222. package/dist/{messages-DjWfVYHS2.mjs → messages-BYmmMDrN2.mjs} +26 -1
  223. package/dist/{chunks/messages-DkTxBa1V.mjs → messages-BbYq1pk-.mjs} +26 -1
  224. package/dist/{chunks/messages-BHhbHLoq.mjs → messages-BiUGXvYr2.mjs} +26 -1
  225. package/dist/{messages-So3SHdIc2.mjs → messages-BiiongNz2.mjs} +26 -1
  226. package/dist/{chunks/messages-BxBID_0B.mjs → messages-Bm0Feca1.mjs} +30 -5
  227. package/dist/{messages-C2veeQpU.mjs → messages-BmAn22OX.mjs} +26 -1
  228. package/dist/{messages-KbYSpNrE.mjs → messages-Bq3F2Tp_.mjs} +26 -1
  229. package/dist/{chunks/messages-Dux1S0-D2.mjs → messages-BsycN_JI2.mjs} +26 -1
  230. package/dist/{messages-DRU_IgoW.mjs → messages-BwHs4cm1.mjs} +30 -5
  231. package/dist/{messages-Cv-DKlZd.mjs → messages-CJTy6JZt.mjs} +26 -1
  232. package/dist/{chunks/messages-D7n_wJK7.mjs → messages-CR_L_UtK.mjs} +26 -1
  233. package/dist/{messages-DnhEzmXJ2.mjs → messages-CSUHBs4c2.mjs} +26 -1
  234. package/dist/{messages-C_HmWyXc2.mjs → messages-CWIXvnDf2.mjs} +26 -1
  235. package/dist/{messages-KSxF8eib.mjs → messages-CcF4y-E4.mjs} +26 -1
  236. package/dist/{chunks/messages-CL3mCbi6.mjs → messages-Ce6KVEbT.mjs} +27 -2
  237. package/dist/{chunks/messages-C-jA6Rf7.mjs → messages-Ci0KqX-J.mjs} +33 -8
  238. package/dist/{chunks/messages-DMyRdafk2.mjs → messages-CjbnogEC.mjs} +26 -1
  239. package/dist/{chunks/messages-BlO_37l_.mjs → messages-CmB406HW.mjs} +28 -3
  240. package/dist/{messages-Cho2VTAX.mjs → messages-CqXtJTpU.mjs} +26 -1
  241. package/dist/{messages-CWEL1WDy2.mjs → messages-D0aw5_0k2.mjs} +28 -3
  242. package/dist/{messages-CgEDVri-2.mjs → messages-D8FQWulF2.mjs} +26 -1
  243. package/dist/{chunks/messages-B5aAzExz.mjs → messages-DBiVgUs2.mjs} +27 -2
  244. package/dist/{chunks/messages-DYizZHT2.mjs → messages-DIJlIqlQ2.mjs} +26 -1
  245. package/dist/{messages-BPL7riv-.mjs → messages-DLX_iBDJ.mjs} +26 -1
  246. package/dist/{messages-vptt-pVF.mjs → messages-DLlc9QPw.mjs} +26 -1
  247. package/dist/{chunks/messages-876bKyUj2.mjs → messages-DMr62KiO2.mjs} +26 -1
  248. package/dist/{chunks/messages-CgedvWCf.mjs → messages-DPA-mMWC2.mjs} +27 -2
  249. package/dist/{messages-vcoib5Ga.mjs → messages-DTh9a8mR.mjs} +26 -1
  250. package/dist/{chunks/messages-DgEGJECT.mjs → messages-DY4IqlhY.mjs} +26 -1
  251. package/dist/{chunks/messages-CdzF0Hvl.mjs → messages-DYTTu0O12.mjs} +26 -1
  252. package/dist/{messages-rbox5gSb2.mjs → messages-DbySKTKt2.mjs} +28 -3
  253. package/dist/{chunks/messages-BGCQCeWd.mjs → messages-Ddnj2iTG2.mjs} +26 -1
  254. package/dist/{chunks/messages-CNEJxD8q2.mjs → messages-DkLU_rWm.mjs} +26 -1
  255. package/dist/{chunks/messages-FYl9woii2.mjs → messages-Dl3Sv6Rq2.mjs} +27 -2
  256. package/dist/{messages-Clsh86WQ.mjs → messages-Dl5Y2-Ia.mjs} +49 -24
  257. package/dist/{chunks/messages-CKRJDX0K2.mjs → messages-DnG0ef8t2.mjs} +28 -3
  258. package/dist/{chunks/messages-CyxDkx8a.mjs → messages-DnGJD4TL.mjs} +26 -1
  259. package/dist/{chunks/messages-DnJHflSh.mjs → messages-Dnp9N6RU2.mjs} +26 -1
  260. package/dist/{chunks/messages-Jps5Tc77.mjs → messages-Dvn35ksS.mjs} +26 -1
  261. package/dist/{messages-ChTWmxS8.mjs → messages-Dw__BcTj.mjs} +26 -1
  262. package/dist/{messages-D7juvhHp.mjs → messages-Dy-Y_nEI.mjs} +26 -1
  263. package/dist/{messages-CNNcKuGH.mjs → messages-E_ZuzGDt.mjs} +26 -1
  264. package/dist/{chunks/messages-DJO0ERQT.mjs → messages-F2xRoY1w.mjs} +26 -1
  265. package/dist/{messages-DqJTZbwt.mjs → messages-Smt4GBbj.mjs} +31 -6
  266. package/dist/{chunks/messages-D8dKkyII2.mjs → messages-aMXpHt5X2.mjs} +26 -1
  267. package/dist/{chunks/messages-DWD0ry9x.mjs → messages-aWZH50vu2.mjs} +28 -3
  268. package/dist/{chunks/messages-BbfLRqLh2.mjs → messages-dv19AkyJ.mjs} +26 -1
  269. package/dist/{chunks/messages-Dw2rmKMi2.mjs → messages-hWwSRF-2.mjs} +26 -1
  270. package/dist/{messages-En8LDjUB.mjs → messages-j7o5rT9s.mjs} +26 -1
  271. package/dist/{chunks/messages-NJsvFwJj.mjs → messages-nUVjeh7K.mjs} +27 -2
  272. package/dist/{messages-Cg1CF4pw.mjs → messages-nlhESX9t.mjs} +26 -1
  273. package/dist/{messages-CSl0Wla62.mjs → messages-rk-A1Wa42.mjs} +28 -3
  274. package/dist/{messages-nOe1gJYu.mjs → messages-xh2eOLvs.mjs} +26 -1
  275. package/dist/{messages-B_sKqaeK.mjs → messages-ynAe7ewZ.mjs} +26 -1
  276. package/dist/react.mjs +26 -25
  277. package/dist/tools.mjs +2 -2
  278. package/dist/vendor.LICENSE.txt +4065 -316
  279. package/package.json +2 -1
  280. package/src/components/constants/data-attributes.ts +0 -2
  281. package/src/components/i18n/locales/am/messages.json +26 -1
  282. package/src/components/i18n/locales/ar/messages.json +26 -1
  283. package/src/components/i18n/locales/az/messages.json +26 -1
  284. package/src/components/i18n/locales/bg/messages.json +26 -1
  285. package/src/components/i18n/locales/bn/messages.json +26 -1
  286. package/src/components/i18n/locales/bs/messages.json +28 -3
  287. package/src/components/i18n/locales/cs/messages.json +30 -5
  288. package/src/components/i18n/locales/da/messages.json +33 -8
  289. package/src/components/i18n/locales/de/messages.json +31 -6
  290. package/src/components/i18n/locales/dv/messages.json +26 -1
  291. package/src/components/i18n/locales/el/messages.json +26 -1
  292. package/src/components/i18n/locales/en/messages.json +13 -0
  293. package/src/components/i18n/locales/es/messages.json +27 -2
  294. package/src/components/i18n/locales/et/messages.json +30 -5
  295. package/src/components/i18n/locales/fa/messages.json +26 -1
  296. package/src/components/i18n/locales/fi/messages.json +26 -1
  297. package/src/components/i18n/locales/fil/messages.json +49 -24
  298. package/src/components/i18n/locales/fr/messages.json +27 -2
  299. package/src/components/i18n/locales/gu/messages.json +26 -1
  300. package/src/components/i18n/locales/he/messages.json +26 -1
  301. package/src/components/i18n/locales/hi/messages.json +26 -1
  302. package/src/components/i18n/locales/hr/messages.json +28 -3
  303. package/src/components/i18n/locales/hu/messages.json +27 -2
  304. package/src/components/i18n/locales/hy/messages.json +26 -1
  305. package/src/components/i18n/locales/id/messages.json +26 -1
  306. package/src/components/i18n/locales/it/messages.json +27 -2
  307. package/src/components/i18n/locales/ja/messages.json +26 -1
  308. package/src/components/i18n/locales/ka/messages.json +26 -1
  309. package/src/components/i18n/locales/km/messages.json +26 -1
  310. package/src/components/i18n/locales/kn/messages.json +26 -1
  311. package/src/components/i18n/locales/ko/messages.json +26 -1
  312. package/src/components/i18n/locales/ku/messages.json +26 -1
  313. package/src/components/i18n/locales/lo/messages.json +26 -1
  314. package/src/components/i18n/locales/lt/messages.json +26 -1
  315. package/src/components/i18n/locales/lv/messages.json +26 -1
  316. package/src/components/i18n/locales/mk/messages.json +26 -1
  317. package/src/components/i18n/locales/ml/messages.json +26 -1
  318. package/src/components/i18n/locales/mn/messages.json +26 -1
  319. package/src/components/i18n/locales/mr/messages.json +26 -1
  320. package/src/components/i18n/locales/ms/messages.json +28 -3
  321. package/src/components/i18n/locales/my/messages.json +26 -1
  322. package/src/components/i18n/locales/ne/messages.json +26 -1
  323. package/src/components/i18n/locales/nl/messages.json +28 -3
  324. package/src/components/i18n/locales/no/messages.json +29 -4
  325. package/src/components/i18n/locales/pa/messages.json +26 -1
  326. package/src/components/i18n/locales/pl/messages.json +27 -2
  327. package/src/components/i18n/locales/ps/messages.json +26 -1
  328. package/src/components/i18n/locales/pt/messages.json +27 -2
  329. package/src/components/i18n/locales/ro/messages.json +27 -2
  330. package/src/components/i18n/locales/ru/messages.json +26 -1
  331. package/src/components/i18n/locales/sd/messages.json +26 -1
  332. package/src/components/i18n/locales/si/messages.json +26 -1
  333. package/src/components/i18n/locales/sk/messages.json +28 -3
  334. package/src/components/i18n/locales/sl/messages.json +28 -3
  335. package/src/components/i18n/locales/sq/messages.json +27 -2
  336. package/src/components/i18n/locales/sr/messages.json +26 -1
  337. package/src/components/i18n/locales/sv/messages.json +28 -3
  338. package/src/components/i18n/locales/sw/messages.json +26 -1
  339. package/src/components/i18n/locales/ta/messages.json +26 -1
  340. package/src/components/i18n/locales/te/messages.json +26 -1
  341. package/src/components/i18n/locales/th/messages.json +26 -1
  342. package/src/components/i18n/locales/tr/messages.json +26 -1
  343. package/src/components/i18n/locales/ug/messages.json +26 -1
  344. package/src/components/i18n/locales/uk/messages.json +26 -1
  345. package/src/components/i18n/locales/ur/messages.json +26 -1
  346. package/src/components/i18n/locales/vi/messages.json +26 -1
  347. package/src/components/i18n/locales/yi/messages.json +26 -1
  348. package/src/components/i18n/locales/zh/messages.json +26 -1
  349. package/src/components/icons/index.ts +38 -0
  350. package/src/components/modules/api/ui.ts +0 -3
  351. package/src/components/modules/ui.ts +0 -13
  352. package/src/stories/EditorModes.stories.ts +0 -60
  353. package/src/styles/main.css +44 -2
  354. package/src/tools/callout/emoji-picker/index.ts +3 -2
  355. package/src/tools/code/code-keyboard.ts +16 -9
  356. package/src/tools/code/constants.ts +26 -3
  357. package/src/tools/code/dom-builder.ts +40 -5
  358. package/src/tools/code/highlight-applier.ts +229 -0
  359. package/src/tools/code/index.ts +141 -1
  360. package/src/tools/code/mermaid-loader.ts +45 -0
  361. package/src/tools/code/shiki-loader.ts +135 -0
  362. package/src/tools/table/core/table-commands.ts +16 -0
  363. package/src/tools/table/core/table-controller.ts +29 -0
  364. package/src/tools/table/core/table-events.ts +17 -0
  365. package/src/tools/table/index.ts +194 -11
  366. package/src/tools/table/table-cell-blocks.ts +9 -6
  367. package/src/tools/table/table-cell-clipboard.ts +6 -1
  368. package/src/tools/table/table-cell-placement-picker.ts +133 -0
  369. package/src/tools/table/table-cell-selection.ts +174 -19
  370. package/src/tools/table/table-core.ts +321 -113
  371. package/src/tools/table/table-map.ts +279 -0
  372. package/src/tools/table/table-model.ts +901 -1
  373. package/src/tools/table/table-operations.ts +78 -44
  374. package/src/tools/table/table-resize.ts +19 -17
  375. package/src/tools/table/table-row-col-drag.ts +24 -10
  376. package/src/tools/table/types.ts +24 -2
  377. package/types/data-attributes.d.ts +0 -1
  378. package/types/tools/code.d.ts +2 -0
  379. /package/dist/chunks/{am-CS-JjQ0N.mjs → am-BxlkYGsI.mjs} +0 -0
  380. /package/dist/chunks/{ar-Dt4XzR5U.mjs → ar-9vlpr9V8.mjs} +0 -0
  381. /package/dist/chunks/{az-CaDTXby8.mjs → az-ON63W_FP.mjs} +0 -0
  382. /package/dist/chunks/{bg-D1pLog-R.mjs → bg-CtXWTP5w.mjs} +0 -0
  383. /package/dist/chunks/{bn-Db_ae60m.mjs → bn-BERvhXM4.mjs} +0 -0
  384. /package/dist/chunks/{bs-DJTg1R9e.mjs → bs-CBg8NVPG.mjs} +0 -0
  385. /package/dist/chunks/{cs-_Gc21gSL.mjs → cs-DeQddxS7.mjs} +0 -0
  386. /package/dist/chunks/{da-xDB8uhCd.mjs → da-DyTo-ec_.mjs} +0 -0
  387. /package/dist/chunks/{de-B6gVjh1Z.mjs → de-Cu7545m1.mjs} +0 -0
  388. /package/dist/chunks/{default-DIfXCS2E.mjs → default-qigT1Xpq.mjs} +0 -0
  389. /package/dist/chunks/{el-ClbRSnOs.mjs → el-oiubLRBq.mjs} +0 -0
  390. /package/dist/chunks/{es-CuY9rnLK.mjs → es-DZUC6Klv.mjs} +0 -0
  391. /package/dist/chunks/{et-BLu5lDVc.mjs → et-CDeklAog.mjs} +0 -0
  392. /package/dist/chunks/{fa-P3gnrZH8.mjs → fa-Cafp7_Li.mjs} +0 -0
  393. /package/dist/chunks/{fi-B8PVHLjq.mjs → fi-BD_V_aVW.mjs} +0 -0
  394. /package/dist/chunks/{fil-B9JII5iF.mjs → fil-Crsfbtx4.mjs} +0 -0
  395. /package/dist/chunks/{fr-BWLDZdcc.mjs → fr-BGGc04Zv.mjs} +0 -0
  396. /package/dist/chunks/{gu-BH3R_s4c.mjs → gu-Vg_BgCTp.mjs} +0 -0
  397. /package/dist/chunks/{he-CCmeCVR_.mjs → he-DTY9chlZ.mjs} +0 -0
  398. /package/dist/chunks/{hi-BBav00DN.mjs → hi-DChMXk0x.mjs} +0 -0
  399. /package/dist/chunks/{hr-B5ZX0r9G.mjs → hr-BWVgNU8k.mjs} +0 -0
  400. /package/dist/chunks/{hu-1jgDa3YU.mjs → hu-B37awHXA.mjs} +0 -0
  401. /package/dist/chunks/{hy-LX4Kp2PE.mjs → hy-DGC_GDHh.mjs} +0 -0
  402. /package/dist/chunks/{i18next-KNC_XV5x.mjs → i18next-CXx5niYF.mjs} +0 -0
  403. /package/dist/chunks/{id-CcG40D1H.mjs → id-V7cw6La2.mjs} +0 -0
  404. /package/dist/chunks/{it-Cb8_K72W.mjs → it-DrTGP8Rn.mjs} +0 -0
  405. /package/dist/chunks/{ja-ipCH91mv.mjs → ja-DS4pbJEG.mjs} +0 -0
  406. /package/dist/chunks/{ka-BRvREIgq.mjs → ka-BueyosRh.mjs} +0 -0
  407. /package/dist/chunks/{km-BJwVw7Fg.mjs → km-B0K891yW.mjs} +0 -0
  408. /package/dist/chunks/{kn-BPgUazCC.mjs → kn-BQ__skg8.mjs} +0 -0
  409. /package/dist/chunks/{ko-CQLzxe7k.mjs → ko-BuPxi_7e.mjs} +0 -0
  410. /package/dist/chunks/{ku-BHhHu8Iz.mjs → ku-nQjwPRw2.mjs} +0 -0
  411. /package/dist/chunks/{lo-DsTgYblY.mjs → lo-K5NVFoq1.mjs} +0 -0
  412. /package/dist/chunks/{lt-CDzHJm71.mjs → lt-D3xD6Eb2.mjs} +0 -0
  413. /package/dist/chunks/{lv-MLLIAnIX.mjs → lv-DH13mzZj.mjs} +0 -0
  414. /package/dist/chunks/{micromark-factory-space-WwmyBO_J.mjs → micromark-factory-space-y4SDWQKm.mjs} +0 -0
  415. /package/dist/chunks/{mk-DQdmUquZ.mjs → mk-Bb48BcDA.mjs} +0 -0
  416. /package/dist/chunks/{ml-DqehZnra.mjs → ml-BHPEj1kD.mjs} +0 -0
  417. /package/dist/chunks/{mn-4cFkKFjW.mjs → mn-BNGzpdI6.mjs} +0 -0
  418. /package/dist/chunks/{mr-DWiztOP4.mjs → mr-D5PgU-cH.mjs} +0 -0
  419. /package/dist/chunks/{ms-BSz-iSnc.mjs → ms-DPkxqKz5.mjs} +0 -0
  420. /package/dist/chunks/{my-DbtbM1MW.mjs → my-DZGcyfxy.mjs} +0 -0
  421. /package/dist/chunks/{native-CzYG0YgY.mjs → native-D0cfLXsM.mjs} +0 -0
  422. /package/dist/chunks/{ne-CqALWw_f.mjs → ne-BU_Wh4Wv.mjs} +0 -0
  423. /package/dist/chunks/{nl-D_ra6RvH.mjs → nl-DtAPk1mK.mjs} +0 -0
  424. /package/dist/chunks/{no-Cg_kz_jl.mjs → no-CdW3n3BY.mjs} +0 -0
  425. /package/dist/chunks/{notifier-BOwxj_Ok.mjs → notifier-CuvTt9pe.mjs} +0 -0
  426. /package/dist/chunks/{pa-NLAsNqwY.mjs → pa-BacCHz87.mjs} +0 -0
  427. /package/dist/chunks/{pl-NHKp4YDg.mjs → pl-8zBJbmhZ.mjs} +0 -0
  428. /package/dist/chunks/{ps-D1zEqNeg.mjs → ps-c6nGXD-W.mjs} +0 -0
  429. /package/dist/chunks/{pt-DBtqbUEB.mjs → pt-B5yR8Qhr.mjs} +0 -0
  430. /package/dist/chunks/{ro-lqr63ai5.mjs → ro-Nscylsqb.mjs} +0 -0
  431. /package/dist/chunks/{ru-BycNnDyN.mjs → ru-DxERQkVJ.mjs} +0 -0
  432. /package/dist/chunks/{sd-DpHpIN9Z.mjs → sd-5z-QY3q9.mjs} +0 -0
  433. /package/dist/chunks/{si-BwiwaC7N.mjs → si-DTL0mzrx.mjs} +0 -0
  434. /package/dist/chunks/{sk-CqRHT2Gp.mjs → sk-DrGczTvY.mjs} +0 -0
  435. /package/dist/chunks/{sl-DA348uQ_.mjs → sl-D8nJjig4.mjs} +0 -0
  436. /package/dist/chunks/{sq-D7JNgve1.mjs → sq-C74Hm3YL.mjs} +0 -0
  437. /package/dist/chunks/{sr-D8RK6Kwp.mjs → sr-DAwB05Gj.mjs} +0 -0
  438. /package/dist/chunks/{sv-dwgT67ZG.mjs → sv-BkHBsN4y.mjs} +0 -0
  439. /package/dist/chunks/{sw-ZRRJnkem.mjs → sw-BBQLTq_z.mjs} +0 -0
  440. /package/dist/chunks/{ta-5x4L5Krl.mjs → ta-DRRzdKky.mjs} +0 -0
  441. /package/dist/chunks/{te-BZpEimwA.mjs → te-CedXLsKM.mjs} +0 -0
  442. /package/dist/chunks/{th-Bhr-33kv.mjs → th-DDOlGA0W.mjs} +0 -0
  443. /package/dist/chunks/{tr-6tSNKGNB.mjs → tr-ClgvwOlL.mjs} +0 -0
  444. /package/dist/chunks/{ug-_e-jvr2b.mjs → ug-bXxwiinM.mjs} +0 -0
  445. /package/dist/chunks/{uk-DooSc2Ja.mjs → uk-Dp46o_VT.mjs} +0 -0
  446. /package/dist/chunks/{ur-rb-krkIO.mjs → ur-MfEEhdFq.mjs} +0 -0
  447. /package/dist/chunks/{vi-CQkLn2AQ.mjs → vi-bt-3LPGO.mjs} +0 -0
  448. /package/dist/chunks/{zh-CXQ40Q2_.mjs → zh-Dgyb5Ly8.mjs} +0 -0
@@ -0,0 +1,3786 @@
1
+ import { t as e } from "./objectSpread2-CWwMYL_U.mjs";
2
+ import { g as t, h as n, p as r } from "./src-DVJl6f6s.mjs";
3
+ import { L as i, R as a, b as o, h as s, j as c, k as l, w as u, y as d } from "./chunk-ICPOFSXX-BHZIN46A.mjs";
4
+ import { i as f, l as p, n as m } from "./chunk-5PVQY5BW-CORl9dnu.mjs";
5
+ import { n as h, r as g } from "./chunk-U2HBQHQK-B88ZUOTL.mjs";
6
+ import { n as _, t as v } from "./chunk-ZZ45TVLE-D1xks9zd.mjs";
7
+ import { a as y, i as b, r as x, t as S } from "./chunk-X2U36JSP-1VS5TyCr.mjs";
8
+ import { t as C } from "./rough.esm-cmMIcj7N.mjs";
9
+ //#region node_modules/mermaid/dist/chunks/mermaid.core/chunk-5FUZZQ4R.mjs
10
+ var w = /* @__PURE__ */ n(async (e, t, n) => {
11
+ var a, c, l;
12
+ let u, d = t.useHtmlLabels || s((a = o()) == null ? void 0 : a.htmlLabels);
13
+ u = n || "node default";
14
+ let m = e.insert("g").attr("class", u).attr("id", t.domId || t.id), g = m.insert("g").attr("class", "label").attr("style", p(t.labelStyle)), _;
15
+ _ = t.label === void 0 ? "" : typeof t.label == "string" ? t.label : t.label[0];
16
+ let y = !!t.icon || !!t.img, b = t.labelType === "markdown", x = await h(g, i(f(_), o()), {
17
+ useHtmlLabels: d,
18
+ width: t.width || ((c = o().flowchart) == null ? void 0 : c.wrappingWidth),
19
+ classes: b ? "markdown-node-label" : "",
20
+ style: t.labelStyle,
21
+ addSvgBackground: y,
22
+ markdown: b
23
+ }, o()), S = x.getBBox(), C = ((l = t == null ? void 0 : t.padding) == null ? 0 : l) / 2;
24
+ if (d) {
25
+ let e = x.children[0], t = r(x);
26
+ await v(e, _), S = e.getBoundingClientRect(), t.attr("width", S.width), t.attr("height", S.height);
27
+ }
28
+ return d ? g.attr("transform", "translate(" + -S.width / 2 + ", " + -S.height / 2 + ")") : g.attr("transform", "translate(0, " + -S.height / 2 + ")"), t.centerLabel && g.attr("transform", "translate(" + -S.width / 2 + ", " + -S.height / 2 + ")"), g.insert("rect", ":first-child"), {
29
+ shapeSvg: m,
30
+ bbox: S,
31
+ halfPadding: C,
32
+ label: g
33
+ };
34
+ }, "labelHelper"), T = /* @__PURE__ */ n(async (e, t, n) => {
35
+ var a, s;
36
+ let c = (a = n.useHtmlLabels) == null ? u(o()) : a, l = e.insert("g").attr("class", "label").attr("style", n.labelStyle || ""), d = await h(l, i(f(t), o()), {
37
+ useHtmlLabels: c,
38
+ width: n.width || ((s = o()) == null || (s = s.flowchart) == null ? void 0 : s.wrappingWidth),
39
+ style: n.labelStyle,
40
+ addSvgBackground: !!n.icon || !!n.img
41
+ }), p = d.getBBox(), m = n.padding / 2;
42
+ if (u(o())) {
43
+ let e = d.children[0], t = r(d);
44
+ p = e.getBoundingClientRect(), t.attr("width", p.width), t.attr("height", p.height);
45
+ }
46
+ return c ? l.attr("transform", "translate(" + -p.width / 2 + ", " + -p.height / 2 + ")") : l.attr("transform", "translate(0, " + -p.height / 2 + ")"), n.centerLabel && l.attr("transform", "translate(" + -p.width / 2 + ", " + -p.height / 2 + ")"), l.insert("rect", ":first-child"), {
47
+ shapeSvg: e,
48
+ bbox: p,
49
+ halfPadding: m,
50
+ label: l
51
+ };
52
+ }, "insertLabel"), E = /* @__PURE__ */ n((e, t) => {
53
+ let n = t.node().getBBox();
54
+ e.width = n.width, e.height = n.height;
55
+ }, "updateNodeBounds"), D = /* @__PURE__ */ n((e, t) => (e.look === "handDrawn" ? "rough-node" : "node") + " " + e.cssClasses + " " + (t || ""), "getNodeClasses");
56
+ function O(e) {
57
+ let t = e.map((e, t) => `${t === 0 ? "M" : "L"}${e.x},${e.y}`);
58
+ return t.push("Z"), t.join(" ");
59
+ }
60
+ n(O, "createPathFromPoints");
61
+ function k(e, t, n, r, i, a) {
62
+ let o = [], s = n - e, c = r - t, l = s / a, u = 2 * Math.PI / l, d = t + c / 2;
63
+ for (let t = 0; t <= 50; t++) {
64
+ let n = e + t / 50 * s, r = d + i * Math.sin(u * (n - e));
65
+ o.push({
66
+ x: n,
67
+ y: r
68
+ });
69
+ }
70
+ return o;
71
+ }
72
+ n(k, "generateFullSineWavePoints");
73
+ function A(e, t, n, r, i, a) {
74
+ let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
75
+ for (let i = 0; i < r; i++) {
76
+ let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
77
+ o.push({
78
+ x: -a,
79
+ y: -l
80
+ });
81
+ }
82
+ return o;
83
+ }
84
+ n(A, "generateCirclePoints");
85
+ function j(e) {
86
+ let t = Array.from(e.childNodes).filter((e) => e.tagName === "path"), r = document.createElementNS("http://www.w3.org/2000/svg", "path"), i = t.map((e) => e.getAttribute("d")).filter((e) => e !== null).join(" ");
87
+ r.setAttribute("d", i);
88
+ let a = t.find((e) => e.getAttribute("fill") !== "none"), o = t.find((e) => e.getAttribute("stroke") !== "none"), s = /* @__PURE__ */ n((e, t) => {
89
+ var n;
90
+ return (n = e == null ? void 0 : e.getAttribute(t)) == null ? void 0 : n;
91
+ }, "getAttr");
92
+ if (a) {
93
+ var c;
94
+ let e = {
95
+ fill: s(a, "fill"),
96
+ "fill-opacity": (c = s(a, "fill-opacity")) == null ? "1" : c
97
+ };
98
+ Object.entries(e).forEach(([e, t]) => {
99
+ t && r.setAttribute(e, t);
100
+ });
101
+ }
102
+ if (o) {
103
+ var l, u;
104
+ let e = {
105
+ stroke: s(o, "stroke"),
106
+ "stroke-width": (l = s(o, "stroke-width")) == null ? "1" : l,
107
+ "stroke-opacity": (u = s(o, "stroke-opacity")) == null ? "1" : u
108
+ };
109
+ Object.entries(e).forEach(([e, t]) => {
110
+ t && r.setAttribute(e, t);
111
+ });
112
+ }
113
+ let d = document.createElementNS("http://www.w3.org/2000/svg", "g");
114
+ return d.appendChild(r), d;
115
+ }
116
+ n(j, "mergePaths");
117
+ var M = /* @__PURE__ */ n((e, t) => {
118
+ 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;
119
+ 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), {
120
+ x: n + c,
121
+ y: r + l
122
+ };
123
+ }, "intersectRect"), N = /* @__PURE__ */ n(async (e, t, n, r = !1, i = !1) => {
124
+ let a = t || "";
125
+ typeof a == "object" && (a = a[0]);
126
+ let s = o(), c = u(s);
127
+ return await h(e, a, {
128
+ style: n,
129
+ isTitle: r,
130
+ useHtmlLabels: c,
131
+ markdown: !1,
132
+ isNode: i,
133
+ width: Infinity
134
+ }, s);
135
+ }, "createLabel"), P = /* @__PURE__ */ n((e, t, n, r, i) => [
136
+ "M",
137
+ e + i,
138
+ t,
139
+ "H",
140
+ e + n - i,
141
+ "A",
142
+ i,
143
+ i,
144
+ 0,
145
+ 0,
146
+ 1,
147
+ e + n,
148
+ t + i,
149
+ "V",
150
+ t + r - i,
151
+ "A",
152
+ i,
153
+ i,
154
+ 0,
155
+ 0,
156
+ 1,
157
+ e + n - i,
158
+ t + r,
159
+ "H",
160
+ e + i,
161
+ "A",
162
+ i,
163
+ i,
164
+ 0,
165
+ 0,
166
+ 1,
167
+ e,
168
+ t + r - i,
169
+ "V",
170
+ t + i,
171
+ "A",
172
+ i,
173
+ i,
174
+ 0,
175
+ 0,
176
+ 1,
177
+ e + i,
178
+ t,
179
+ "Z"
180
+ ].join(" "), "createRoundedRectPathD"), F = /* @__PURE__ */ n(async (e, n) => {
181
+ t.info("Creating subgraph rect for ", n.id, n);
182
+ let i = o(), { themeVariables: a, handDrawnSeed: s } = i, { clusterBkg: c, clusterBorder: l } = a, { labelStyles: d, nodeStyles: f, borderStyles: p, backgroundStyles: m } = b(n), g = e.insert("g").attr("class", "cluster " + n.cssClasses).attr("id", n.domId).attr("data-look", n.look), v = u(i), x = g.insert("g").attr("class", "cluster-label "), S;
183
+ S = n.labelType === "markdown" ? await h(x, n.label, {
184
+ style: n.labelStyle,
185
+ useHtmlLabels: v,
186
+ isNode: !0,
187
+ width: n.width
188
+ }) : await N(x, n.label, n.labelStyle || "", !1, !0);
189
+ let w = S.getBBox();
190
+ if (u(i)) {
191
+ let e = S.children[0], t = r(S);
192
+ w = e.getBoundingClientRect(), t.attr("width", w.width), t.attr("height", w.height);
193
+ }
194
+ let T = n.width <= w.width + n.padding ? w.width + n.padding : n.width;
195
+ n.width <= w.width + n.padding ? n.diff = (T - n.width) / 2 - n.padding : n.diff = -n.padding;
196
+ let E = n.height, D = n.x - T / 2, O = n.y - E / 2;
197
+ t.trace("Data ", n, JSON.stringify(n));
198
+ let k;
199
+ if (n.look === "handDrawn") {
200
+ let e = C.svg(g), r = y(n, {
201
+ roughness: .7,
202
+ fill: c,
203
+ stroke: l,
204
+ fillWeight: 3,
205
+ seed: s
206
+ }), i = e.path(P(D, O, T, E, 0), r);
207
+ k = g.insert(() => (t.debug("Rough node insert CXC", i), i), ":first-child"), k.select("path:nth-child(2)").attr("style", p.join(";")), k.select("path").attr("style", m.join(";").replace("fill", "stroke"));
208
+ } else k = g.insert("rect", ":first-child"), k.attr("style", f).attr("rx", n.rx).attr("ry", n.ry).attr("x", D).attr("y", O).attr("width", T).attr("height", E);
209
+ let { subGraphTitleTopMargin: A } = _(i);
210
+ if (x.attr("transform", `translate(${n.x - w.width / 2}, ${n.y - n.height / 2 + A})`), d) {
211
+ let e = x.select("span");
212
+ e && e.attr("style", d);
213
+ }
214
+ let j = k.node().getBBox();
215
+ return n.offsetX = 0, n.width = j.width, n.height = j.height, n.offsetY = w.height - n.padding / 2, n.intersect = function(e) {
216
+ return M(n, e);
217
+ }, {
218
+ cluster: g,
219
+ labelBBox: w
220
+ };
221
+ }, "rect"), I = {
222
+ rect: F,
223
+ squareRect: F,
224
+ roundedWithTitle: /* @__PURE__ */ n(async (e, t) => {
225
+ let n = o(), { themeVariables: i, handDrawnSeed: a } = n, { altBackground: s, compositeBackground: c, compositeTitleBackground: l, nodeBorder: d } = i, f = e.insert("g").attr("class", t.cssClasses).attr("id", t.domId).attr("data-id", t.id).attr("data-look", t.look), p = f.insert("g", ":first-child"), m = f.insert("g").attr("class", "cluster-label"), h = f.append("rect"), g = await N(m, t.label, t.labelStyle, void 0, !0), _ = g.getBBox();
226
+ if (u(n)) {
227
+ let e = g.children[0], t = r(g);
228
+ _ = e.getBoundingClientRect(), t.attr("width", _.width), t.attr("height", _.height);
229
+ }
230
+ let v = 0 * t.padding, y = v / 2, b = (t.width <= _.width + t.padding ? _.width + t.padding : t.width) + v;
231
+ t.width <= _.width + t.padding ? t.diff = (b - t.width) / 2 - t.padding : t.diff = -t.padding;
232
+ let x = t.height + v, S = t.height + v - _.height - 6, w = t.x - b / 2, T = t.y - x / 2;
233
+ t.width = b;
234
+ let E = t.y - t.height / 2 - y + _.height + 2, D;
235
+ if (t.look === "handDrawn") {
236
+ let e = t.cssClasses.includes("statediagram-cluster-alt"), n = C.svg(f), r = t.rx || t.ry ? n.path(P(w, T, b, x, 10), {
237
+ roughness: .7,
238
+ fill: l,
239
+ fillStyle: "solid",
240
+ stroke: d,
241
+ seed: a
242
+ }) : n.rectangle(w, T, b, x, { seed: a });
243
+ D = f.insert(() => r, ":first-child");
244
+ let i = n.rectangle(w, E, b, S, {
245
+ fill: e ? s : c,
246
+ fillStyle: e ? "hachure" : "solid",
247
+ stroke: d,
248
+ seed: a
249
+ });
250
+ D = f.insert(() => r, ":first-child"), h = f.insert(() => i);
251
+ } 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", t.look), h.attr("class", "inner").attr("x", w).attr("y", E).attr("width", b).attr("height", S);
252
+ return m.attr("transform", `translate(${t.x - _.width / 2}, ${T + 1 - (u(n) ? 0 : 3)})`), t.height = D.node().getBBox().height, t.offsetX = 0, t.offsetY = _.height - t.padding / 2, t.labelBBox = _, t.intersect = function(e) {
253
+ return M(t, e);
254
+ }, {
255
+ cluster: f,
256
+ labelBBox: _
257
+ };
258
+ }, "roundedWithTitle"),
259
+ noteGroup: /* @__PURE__ */ n((e, t) => {
260
+ 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;
261
+ 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");
262
+ let o = r.node().getBBox();
263
+ return t.width = o.width, t.height = o.height, t.intersect = function(e) {
264
+ return M(t, e);
265
+ }, {
266
+ cluster: n,
267
+ labelBBox: {
268
+ width: 0,
269
+ height: 0
270
+ }
271
+ };
272
+ }, "noteGroup"),
273
+ divider: /* @__PURE__ */ n((e, t) => {
274
+ let { themeVariables: n, handDrawnSeed: r } = o(), { nodeBorder: i } = n, a = e.insert("g").attr("class", t.cssClasses).attr("id", t.domId).attr("data-look", t.look), s = a.insert("g", ":first-child"), c = 0 * t.padding, l = t.width + c;
275
+ t.diff = -t.padding;
276
+ let u = t.height + c, d = t.x - l / 2, f = t.y - u / 2;
277
+ t.width = l;
278
+ let p;
279
+ if (t.look === "handDrawn") {
280
+ let e = C.svg(a).rectangle(d, f, l, u, {
281
+ fill: "lightgrey",
282
+ roughness: .5,
283
+ strokeLineDash: [5],
284
+ stroke: i,
285
+ seed: r
286
+ });
287
+ p = a.insert(() => e, ":first-child");
288
+ } else {
289
+ p = s.insert("rect", ":first-child");
290
+ let e = "outer";
291
+ e = (t.look, "divider"), p.attr("class", e).attr("x", d).attr("y", f).attr("width", l).attr("height", u).attr("data-look", t.look);
292
+ }
293
+ return t.height = p.node().getBBox().height, t.offsetX = 0, t.offsetY = 0, t.intersect = function(e) {
294
+ return M(t, e);
295
+ }, {
296
+ cluster: a,
297
+ labelBBox: {}
298
+ };
299
+ }, "divider"),
300
+ kanbanSection: /* @__PURE__ */ n(async (e, n) => {
301
+ t.info("Creating subgraph rect for ", n.id, n);
302
+ let i = o(), { themeVariables: a, handDrawnSeed: s } = i, { clusterBkg: c, clusterBorder: l } = a, { labelStyles: d, nodeStyles: f, borderStyles: p, backgroundStyles: m } = b(n), g = e.insert("g").attr("class", "cluster " + n.cssClasses).attr("id", n.domId).attr("data-look", n.look), v = u(i), x = g.insert("g").attr("class", "cluster-label "), S = await h(x, n.label, {
303
+ style: n.labelStyle,
304
+ useHtmlLabels: v,
305
+ isNode: !0,
306
+ width: n.width
307
+ }), w = S.getBBox();
308
+ if (u(i)) {
309
+ let e = S.children[0], t = r(S);
310
+ w = e.getBoundingClientRect(), t.attr("width", w.width), t.attr("height", w.height);
311
+ }
312
+ let T = n.width <= w.width + n.padding ? w.width + n.padding : n.width;
313
+ n.width <= w.width + n.padding ? n.diff = (T - n.width) / 2 - n.padding : n.diff = -n.padding;
314
+ let E = n.height, D = n.x - T / 2, O = n.y - E / 2;
315
+ t.trace("Data ", n, JSON.stringify(n));
316
+ let k;
317
+ if (n.look === "handDrawn") {
318
+ let e = C.svg(g), r = y(n, {
319
+ roughness: .7,
320
+ fill: c,
321
+ stroke: l,
322
+ fillWeight: 4,
323
+ seed: s
324
+ }), i = e.path(P(D, O, T, E, n.rx), r);
325
+ k = g.insert(() => (t.debug("Rough node insert CXC", i), i), ":first-child"), k.select("path:nth-child(2)").attr("style", p.join(";")), k.select("path").attr("style", m.join(";").replace("fill", "stroke"));
326
+ } else k = g.insert("rect", ":first-child"), k.attr("style", f).attr("rx", n.rx).attr("ry", n.ry).attr("x", D).attr("y", O).attr("width", T).attr("height", E);
327
+ let { subGraphTitleTopMargin: A } = _(i);
328
+ if (x.attr("transform", `translate(${n.x - w.width / 2}, ${n.y - n.height / 2 + A})`), d) {
329
+ let e = x.select("span");
330
+ e && e.attr("style", d);
331
+ }
332
+ let j = k.node().getBBox();
333
+ return n.offsetX = 0, n.width = j.width, n.height = j.height, n.offsetY = w.height - n.padding / 2, n.intersect = function(e) {
334
+ return M(n, e);
335
+ }, {
336
+ cluster: g,
337
+ labelBBox: w
338
+ };
339
+ }, "kanbanSection")
340
+ }, L = /* @__PURE__ */ new Map(), R = /* @__PURE__ */ n(async (e, t) => {
341
+ let n = await I[t.shape || "rect"](e, t);
342
+ return L.set(t.id, n), n;
343
+ }, "insertCluster"), z = /* @__PURE__ */ n(() => {
344
+ L = /* @__PURE__ */ new Map();
345
+ }, "clear");
346
+ function B(e, t) {
347
+ return e.intersect(t);
348
+ }
349
+ n(B, "intersectNode");
350
+ var V = B;
351
+ function H(e, t, n, r) {
352
+ 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);
353
+ r.x < i && (l = -l);
354
+ var u = Math.abs(t * n * s / c);
355
+ return r.y < a && (u = -u), {
356
+ x: i + l,
357
+ y: a + u
358
+ };
359
+ }
360
+ n(H, "intersectEllipse");
361
+ var U = H;
362
+ function W(e, t, n) {
363
+ return U(e, t, t, n);
364
+ }
365
+ n(W, "intersectCircle");
366
+ var G = W;
367
+ function ee(e, t, n, r) {
368
+ {
369
+ 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;
370
+ if (s !== 0 && c !== 0 && te(s, c)) return;
371
+ 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;
372
+ if (Math.abs(p) < l && Math.abs(m) < l && te(p, m)) return;
373
+ let h = i * d - u * a;
374
+ if (h === 0) return;
375
+ let g = Math.abs(h / 2), _ = a * f - d * o, v = _ < 0 ? (_ - g) / h : (_ + g) / h;
376
+ return _ = u * o - i * f, {
377
+ x: v,
378
+ y: _ < 0 ? (_ - g) / h : (_ + g) / h
379
+ };
380
+ }
381
+ }
382
+ n(ee, "intersectLine");
383
+ function te(e, t) {
384
+ return e * t > 0;
385
+ }
386
+ n(te, "sameSign");
387
+ var ne = ee;
388
+ function K(e, t, n) {
389
+ let r = e.x, i = e.y, a = [], o = Infinity, s = Infinity;
390
+ typeof t.forEach == "function" ? t.forEach(function(e) {
391
+ o = Math.min(o, e.x), s = Math.min(s, e.y);
392
+ }) : (o = Math.min(o, t.x), s = Math.min(s, t.y));
393
+ let c = r - e.width / 2 - o, l = i - e.height / 2 - s;
394
+ for (let r = 0; r < t.length; r++) {
395
+ let i = t[r], o = t[r < t.length - 1 ? r + 1 : 0], s = ne(e, n, {
396
+ x: c + i.x,
397
+ y: l + i.y
398
+ }, {
399
+ x: c + o.x,
400
+ y: l + o.y
401
+ });
402
+ s && a.push(s);
403
+ }
404
+ return a.length ? (a.length > 1 && a.sort(function(e, t) {
405
+ 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);
406
+ return a < c ? -1 : a === c ? 0 : 1;
407
+ }), a[0]) : e;
408
+ }
409
+ n(K, "intersectPolygon");
410
+ var q = {
411
+ node: V,
412
+ circle: G,
413
+ ellipse: U,
414
+ polygon: K,
415
+ rect: M
416
+ };
417
+ function re(e, n) {
418
+ let { labelStyles: r } = b(n);
419
+ n.labelStyle = r;
420
+ let i = D(n), a = i;
421
+ i || (a = "anchor");
422
+ let o = e.insert("g").attr("class", a).attr("id", n.domId || n.id), { cssStyles: s } = n, c = C.svg(o), l = y(n, {
423
+ fill: "black",
424
+ stroke: "none",
425
+ fillStyle: "solid"
426
+ });
427
+ n.look !== "handDrawn" && (l.roughness = 0);
428
+ let u = c.circle(0, 0, 2, l), d = o.insert(() => u, ":first-child");
429
+ return d.attr("class", "anchor").attr("style", p(s)), E(n, d), n.intersect = function(e) {
430
+ return t.info("Circle intersect", n, 1, e), q.circle(n, 1, e);
431
+ }, o;
432
+ }
433
+ n(re, "anchor");
434
+ function ie(e, t, n, r, i, a, o) {
435
+ 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);
436
+ if (m > 1) throw Error("The given radii are too small to create an arc between the points.");
437
+ 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;
438
+ o && y < 0 && (y += 2 * Math.PI), !o && y > 0 && (y -= 2 * Math.PI);
439
+ let b = [];
440
+ for (let e = 0; e < 20; e++) {
441
+ let t = v + e / 19 * y, n = g + i * Math.cos(t), r = _ + a * Math.sin(t);
442
+ b.push({
443
+ x: n,
444
+ y: r
445
+ });
446
+ }
447
+ return b;
448
+ }
449
+ n(ie, "generateArcPoints");
450
+ function ae(e, t, n) {
451
+ let [r, i] = [t, n].sort((e, t) => t - e);
452
+ return i * (1 - Math.sqrt(1 - (e / r / 2) ** 2));
453
+ }
454
+ n(ae, "calculateArcSagitta");
455
+ async function J(e, t) {
456
+ var r;
457
+ let { labelStyles: i, nodeStyles: a } = b(t);
458
+ t.labelStyle = i;
459
+ let o = (r = t.padding) == null ? 0 : r, s = t.look === "neo" ? 16 : o, c = t.look === "neo" ? 12 : o, l = /* @__PURE__ */ n((e) => e + c, "calcTotalHeight"), u = /* @__PURE__ */ n((e) => {
460
+ let t = e / 2;
461
+ return [t / (2.5 + e / 50), t];
462
+ }, "calcEllipseRadius"), { shapeSvg: d, bbox: f } = await w(e, t, D(t)), p = l(t != null && t.height ? t == null ? void 0 : t.height : f.height), [m, h] = u(p), g = ae(p, m, h), _ = (t != null && t.width ? t == null ? void 0 : t.width : f.width) + s * 2 + g - g, v = p, { cssStyles: x } = t, S = [
463
+ {
464
+ x: _ / 2,
465
+ y: -v / 2
466
+ },
467
+ {
468
+ x: -_ / 2,
469
+ y: -v / 2
470
+ },
471
+ ...ie(-_ / 2, -v / 2, -_ / 2, v / 2, m, h, !1),
472
+ {
473
+ x: _ / 2,
474
+ y: v / 2
475
+ },
476
+ ...ie(_ / 2, v / 2, _ / 2, -v / 2, m, h, !0)
477
+ ], T = C.svg(d), k = y(t, {});
478
+ t.look !== "handDrawn" && (k.roughness = 0, k.fillStyle = "solid");
479
+ let A = O(S), j = T.path(A, k), M = d.insert(() => j, ":first-child");
480
+ return M.attr("class", "basic label-container outer-path"), x && t.look !== "handDrawn" && M.selectAll("path").attr("style", x), a && t.look !== "handDrawn" && M.selectAll("path").attr("style", a), M.attr("transform", `translate(${m / 2}, 0)`), E(t, M), t.intersect = function(e) {
481
+ return q.polygon(t, S, e);
482
+ }, d;
483
+ }
484
+ n(J, "bowTieRect");
485
+ function Y(e, t, n, r) {
486
+ return e.insert("polygon", ":first-child").attr("points", r.map(function(e) {
487
+ return e.x + "," + e.y;
488
+ }).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + n / 2 + ")");
489
+ }
490
+ n(Y, "insertPolygonShape");
491
+ var oe = 12;
492
+ async function se(e, t) {
493
+ var n, r, i;
494
+ let { labelStyles: a, nodeStyles: o } = b(t);
495
+ t.labelStyle = a;
496
+ let s = (n = t.padding) == null ? 0 : n, c = t.look === "neo" ? 28 : s, l = t.look === "neo" ? 24 : s, { shapeSvg: u, bbox: d } = await w(e, t, D(t)), f = ((r = t == null ? void 0 : t.width) == null ? d.width : r) + (t.look === "neo" ? c * 2 : c + oe), p = ((i = t == null ? void 0 : t.height) == null ? d.height : i) + (t.look === "neo" ? l * 2 : l), m = f, h = -p, g = [
497
+ {
498
+ x: 0 + oe,
499
+ y: h
500
+ },
501
+ {
502
+ x: m,
503
+ y: h
504
+ },
505
+ {
506
+ x: m,
507
+ y: 0
508
+ },
509
+ {
510
+ x: 0,
511
+ y: 0
512
+ },
513
+ {
514
+ x: 0,
515
+ y: h + oe
516
+ },
517
+ {
518
+ x: 0 + oe,
519
+ y: h
520
+ }
521
+ ], _, { cssStyles: v } = t;
522
+ if (t.look === "handDrawn") {
523
+ let e = C.svg(u), n = y(t, {}), r = O(g), i = e.path(r, n);
524
+ _ = u.insert(() => i, ":first-child").attr("transform", `translate(${-f / 2}, ${p / 2})`), v && _.attr("style", v);
525
+ } else _ = Y(u, f, p, g);
526
+ return o && _.attr("style", o), E(t, _), t.intersect = function(e) {
527
+ return q.polygon(t, g, e);
528
+ }, u;
529
+ }
530
+ n(se, "card");
531
+ function ce(e, t) {
532
+ var n, r;
533
+ let { nodeStyles: i } = b(t);
534
+ t.label = "";
535
+ let a = e.insert("g").attr("class", D(t)).attr("id", (n = t.domId) == null ? t.id : n), { cssStyles: o } = t, s = Math.max(28, (r = t.width) == null ? 0 : r), c = [
536
+ {
537
+ x: 0,
538
+ y: s / 2
539
+ },
540
+ {
541
+ x: s / 2,
542
+ y: 0
543
+ },
544
+ {
545
+ x: 0,
546
+ y: -s / 2
547
+ },
548
+ {
549
+ x: -s / 2,
550
+ y: 0
551
+ }
552
+ ], l = C.svg(a), u = y(t, {});
553
+ t.look !== "handDrawn" && (u.roughness = 0, u.fillStyle = "solid");
554
+ let d = O(c), f = l.path(d, u), p = a.insert(() => f, ":first-child");
555
+ return o && t.look !== "handDrawn" && p.selectAll("path").attr("style", o), i && t.look !== "handDrawn" && p.selectAll("path").attr("style", i), t.width = 28, t.height = 28, t.intersect = function(e) {
556
+ return q.polygon(t, c, e);
557
+ }, a;
558
+ }
559
+ n(ce, "choice");
560
+ async function le(e, n, r) {
561
+ var i;
562
+ let { labelStyles: a, nodeStyles: o } = b(n);
563
+ n.labelStyle = a;
564
+ let { shapeSvg: s, bbox: c, halfPadding: l } = await w(e, n, D(n)), u = (i = r == null ? void 0 : r.padding) == null ? l : i, d = n.look === "neo" ? c.width / 2 + 32 : c.width / 2 + u, f, { cssStyles: m } = n;
565
+ if (n.look === "handDrawn") {
566
+ let e = C.svg(s), t = y(n, {}), r = e.circle(0, 0, d * 2, t);
567
+ f = s.insert(() => r, ":first-child"), f.attr("class", "basic label-container").attr("style", p(m));
568
+ } else f = s.insert("circle", ":first-child").attr("class", "basic label-container").attr("style", o).attr("r", d).attr("cx", 0).attr("cy", 0);
569
+ return E(n, f), n.calcIntersect = function(e, t) {
570
+ let n = e.width / 2;
571
+ return q.circle(e, n, t);
572
+ }, n.intersect = function(e) {
573
+ return t.info("Circle intersect", n, d, e), q.circle(n, d, e);
574
+ }, s;
575
+ }
576
+ n(le, "circle");
577
+ function X(e) {
578
+ let t = Math.cos(Math.PI / 4), n = Math.sin(Math.PI / 4), r = e * 2, i = {
579
+ x: r / 2 * t,
580
+ y: r / 2 * n
581
+ }, a = {
582
+ x: -(r / 2) * t,
583
+ y: r / 2 * n
584
+ }, o = {
585
+ x: -(r / 2) * t,
586
+ y: -(r / 2) * n
587
+ }, s = {
588
+ x: r / 2 * t,
589
+ y: -(r / 2) * n
590
+ };
591
+ return `M ${a.x},${a.y} L ${s.x},${s.y}
592
+ M ${i.x},${i.y} L ${o.x},${o.y}`;
593
+ }
594
+ n(X, "createLine");
595
+ function Z(e, n) {
596
+ var r, i;
597
+ let { labelStyles: a, nodeStyles: o } = b(n);
598
+ n.labelStyle = a, n.label = "";
599
+ let s = e.insert("g").attr("class", D(n)).attr("id", (r = n.domId) == null ? n.id : r), c = Math.max(30, (i = n == null ? void 0 : n.width) == null ? 0 : i), { cssStyles: l } = n, u = C.svg(s), d = y(n, {});
600
+ n.look !== "handDrawn" && (d.roughness = 0, d.fillStyle = "solid");
601
+ let f = u.circle(0, 0, c * 2, d), p = X(c), m = u.path(p, d), h = s.insert(() => f, ":first-child");
602
+ return h.insert(() => m), h.attr("class", "outer-path"), l && n.look !== "handDrawn" && h.selectAll("path").attr("style", l), o && n.look !== "handDrawn" && h.selectAll("path").attr("style", o), E(n, h), n.intersect = function(e) {
603
+ return t.info("crossedCircle intersect", n, {
604
+ radius: c,
605
+ point: e
606
+ }), q.circle(n, c, e);
607
+ }, s;
608
+ }
609
+ n(Z, "crossedCircle");
610
+ function ue(e, t, n, r = 100, i = 0, a = 180) {
611
+ let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
612
+ for (let i = 0; i < r; i++) {
613
+ let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
614
+ o.push({
615
+ x: -a,
616
+ y: -l
617
+ });
618
+ }
619
+ return o;
620
+ }
621
+ n(ue, "generateCirclePoints");
622
+ async function de(t, n) {
623
+ var r, i, a, o, s;
624
+ let { labelStyles: c, nodeStyles: l } = b(n);
625
+ n.labelStyle = c;
626
+ let { shapeSvg: u, bbox: d, label: f } = await w(t, n, D(n)), p = n.look === "neo" ? 18 : (r = n.padding) == null ? 0 : r, m = n.look === "neo" ? 12 : (i = n.padding) == null ? 0 : i, h = d.width + p, g = d.height + m, _ = Math.max(5, g * .1), { cssStyles: v } = n, x = [
627
+ ...ue(h / 2, -g / 2, _, 30, -90, 0),
628
+ {
629
+ x: -h / 2 - _,
630
+ y: _
631
+ },
632
+ ...ue(h / 2 + _ * 2, -_, _, 20, -180, -270),
633
+ ...ue(h / 2 + _ * 2, _, _, 20, -90, -180),
634
+ {
635
+ x: -h / 2 - _,
636
+ y: -g / 2
637
+ },
638
+ ...ue(h / 2, g / 2, _, 20, 0, 90)
639
+ ], S = [
640
+ {
641
+ x: h / 2,
642
+ y: -g / 2 - _
643
+ },
644
+ {
645
+ x: -h / 2,
646
+ y: -g / 2 - _
647
+ },
648
+ ...ue(h / 2, -g / 2, _, 20, -90, 0),
649
+ {
650
+ x: -h / 2 - _,
651
+ y: -_
652
+ },
653
+ ...ue(h / 2 + h * .1, -_, _, 20, -180, -270),
654
+ ...ue(h / 2 + h * .1, _, _, 20, -90, -180),
655
+ {
656
+ x: -h / 2 - _,
657
+ y: g / 2
658
+ },
659
+ ...ue(h / 2, g / 2, _, 20, 0, 90),
660
+ {
661
+ x: -h / 2,
662
+ y: g / 2 + _
663
+ },
664
+ {
665
+ x: h / 2,
666
+ y: g / 2 + _
667
+ }
668
+ ], T = C.svg(u), k = y(n, { fill: "none" });
669
+ n.look !== "handDrawn" && (k.roughness = 0, k.fillStyle = "solid");
670
+ let A = O(x).replace("Z", ""), j = T.path(A, k), M = O(S), N = T.path(M, e({}, k)), P = u.insert("g", ":first-child");
671
+ return P.insert(() => N, ":first-child").attr("stroke-opacity", 0), P.insert(() => j, ":first-child"), P.attr("class", "text"), v && n.look !== "handDrawn" && P.selectAll("path").attr("style", v), l && n.look !== "handDrawn" && P.selectAll("path").attr("style", l), P.attr("transform", `translate(${_}, 0)`), f.attr("transform", `translate(${-h / 2 + _ - (d.x - ((a = d.left) == null ? 0 : a))},${-g / 2 + ((o = n.padding) == null ? 0 : o) / 2 - (d.y - ((s = d.top) == null ? 0 : s))})`), E(n, P), n.intersect = function(e) {
672
+ return q.polygon(n, S, e);
673
+ }, u;
674
+ }
675
+ n(de, "curlyBraceLeft");
676
+ function fe(e, t, n, r = 100, i = 0, a = 180) {
677
+ let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
678
+ for (let i = 0; i < r; i++) {
679
+ let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
680
+ o.push({
681
+ x: a,
682
+ y: l
683
+ });
684
+ }
685
+ return o;
686
+ }
687
+ n(fe, "generateCirclePoints");
688
+ async function pe(t, n) {
689
+ var r, i, a, o, s, c;
690
+ let { labelStyles: l, nodeStyles: u } = b(n);
691
+ n.labelStyle = l;
692
+ let { shapeSvg: d, bbox: f, label: p } = await w(t, n, D(n)), m = n.look === "neo" ? 18 : (r = n.padding) == null ? 0 : r, h = n.look === "neo" ? 12 : (i = n.padding) == null ? 0 : i, g = f.width + (n.look === "neo" ? m * 2 : m), _ = f.height + (n.look === "neo" ? h * 2 : h), v = Math.max(5, _ * .1), { cssStyles: x } = n, S = [
693
+ ...fe(g / 2, -_ / 2, v, 20, -90, 0),
694
+ {
695
+ x: g / 2 + v,
696
+ y: -v
697
+ },
698
+ ...fe(g / 2 + v * 2, -v, v, 20, -180, -270),
699
+ ...fe(g / 2 + v * 2, v, v, 20, -90, -180),
700
+ {
701
+ x: g / 2 + v,
702
+ y: _ / 2
703
+ },
704
+ ...fe(g / 2, _ / 2, v, 20, 0, 90)
705
+ ], T = [
706
+ {
707
+ x: -g / 2,
708
+ y: -_ / 2 - v
709
+ },
710
+ {
711
+ x: g / 2,
712
+ y: -_ / 2 - v
713
+ },
714
+ ...fe(g / 2, -_ / 2, v, 20, -90, 0),
715
+ {
716
+ x: g / 2 + v,
717
+ y: -v
718
+ },
719
+ ...fe(g / 2 + v * 2, -v, v, 20, -180, -270),
720
+ ...fe(g / 2 + v * 2, v, v, 20, -90, -180),
721
+ {
722
+ x: g / 2 + v,
723
+ y: _ / 2
724
+ },
725
+ ...fe(g / 2, _ / 2, v, 20, 0, 90),
726
+ {
727
+ x: g / 2,
728
+ y: _ / 2 + v
729
+ },
730
+ {
731
+ x: -g / 2,
732
+ y: _ / 2 + v
733
+ }
734
+ ], k = C.svg(d), A = y(n, { fill: "none" });
735
+ n.look !== "handDrawn" && (A.roughness = 0, A.fillStyle = "solid");
736
+ let j = O(S).replace("Z", ""), M = k.path(j, A), N = O(T), P = k.path(N, e({}, A)), F = d.insert("g", ":first-child");
737
+ return F.insert(() => P, ":first-child").attr("stroke-opacity", 0), F.insert(() => M, ":first-child"), F.attr("class", "text"), x && n.look !== "handDrawn" && F.selectAll("path").attr("style", x), u && n.look !== "handDrawn" && F.selectAll("path").attr("style", u), F.attr("transform", `translate(${-v}, 0)`), p.attr("transform", `translate(${-g / 2 + ((a = n.padding) == null ? 0 : a) / 2 - (f.x - ((o = f.left) == null ? 0 : o))},${-_ / 2 + ((s = n.padding) == null ? 0 : s) / 2 - (f.y - ((c = f.top) == null ? 0 : c))})`), E(n, F), n.intersect = function(e) {
738
+ return q.polygon(n, T, e);
739
+ }, d;
740
+ }
741
+ n(pe, "curlyBraceRight");
742
+ function Q(e, t, n, r = 100, i = 0, a = 180) {
743
+ let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
744
+ for (let i = 0; i < r; i++) {
745
+ let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
746
+ o.push({
747
+ x: -a,
748
+ y: -l
749
+ });
750
+ }
751
+ return o;
752
+ }
753
+ n(Q, "generateCirclePoints");
754
+ async function me(t, n) {
755
+ var r, i, a, o, s, c;
756
+ let { labelStyles: l, nodeStyles: u } = b(n);
757
+ n.labelStyle = l;
758
+ let { shapeSvg: d, bbox: f, label: p } = await w(t, n, D(n)), m = n.look === "neo" ? 18 : (r = n.padding) == null ? 0 : r, h = n.look === "neo" ? 12 : (i = n.padding) == null ? 0 : i, g = f.width + (n.look === "neo" ? m * 2 : m), _ = f.height + (n.look === "neo" ? h * 2 : h), v = Math.max(5, _ * .1), { cssStyles: x } = n, S = [
759
+ ...Q(g / 2, -_ / 2, v, 30, -90, 0),
760
+ {
761
+ x: -g / 2 - v,
762
+ y: v
763
+ },
764
+ ...Q(g / 2 + v * 2, -v, v, 20, -180, -270),
765
+ ...Q(g / 2 + v * 2, v, v, 20, -90, -180),
766
+ {
767
+ x: -g / 2 - v,
768
+ y: -_ / 2
769
+ },
770
+ ...Q(g / 2, _ / 2, v, 20, 0, 90)
771
+ ], T = [
772
+ ...Q(-g / 2 + v + v / 2, -_ / 2, v, 20, -90, -180),
773
+ {
774
+ x: g / 2 - v / 2,
775
+ y: v
776
+ },
777
+ ...Q(-g / 2 - v / 2, -v, v, 20, 0, 90),
778
+ ...Q(-g / 2 - v / 2, v, v, 20, -90, 0),
779
+ {
780
+ x: g / 2 - v / 2,
781
+ y: -v
782
+ },
783
+ ...Q(-g / 2 + v + v / 2, _ / 2, v, 30, -180, -270)
784
+ ], k = [
785
+ {
786
+ x: g / 2,
787
+ y: -_ / 2 - v
788
+ },
789
+ {
790
+ x: -g / 2,
791
+ y: -_ / 2 - v
792
+ },
793
+ ...Q(g / 2, -_ / 2, v, 20, -90, 0),
794
+ {
795
+ x: -g / 2 - v,
796
+ y: -v
797
+ },
798
+ ...Q(g / 2 + v * 2, -v, v, 20, -180, -270),
799
+ ...Q(g / 2 + v * 2, v, v, 20, -90, -180),
800
+ {
801
+ x: -g / 2 - v,
802
+ y: _ / 2
803
+ },
804
+ ...Q(g / 2, _ / 2, v, 20, 0, 90),
805
+ {
806
+ x: -g / 2,
807
+ y: _ / 2 + v
808
+ },
809
+ {
810
+ x: g / 2 - v - v / 2,
811
+ y: _ / 2 + v
812
+ },
813
+ ...Q(-g / 2 + v + v / 2, -_ / 2, v, 20, -90, -180),
814
+ {
815
+ x: g / 2 - v / 2,
816
+ y: v
817
+ },
818
+ ...Q(-g / 2 - v / 2, -v, v, 20, 0, 90),
819
+ ...Q(-g / 2 - v / 2, v, v, 20, -90, 0),
820
+ {
821
+ x: g / 2 - v / 2,
822
+ y: -v
823
+ },
824
+ ...Q(-g / 2 + v + v / 2, _ / 2, v, 30, -180, -270)
825
+ ], A = C.svg(d), j = y(n, { fill: "none" });
826
+ n.look !== "handDrawn" && (j.roughness = 0, j.fillStyle = "solid");
827
+ let M = O(S).replace("Z", ""), N = A.path(M, j), P = O(T).replace("Z", ""), F = A.path(P, j), I = O(k), L = A.path(I, e({}, j)), R = d.insert("g", ":first-child");
828
+ return R.insert(() => L, ":first-child").attr("stroke-opacity", 0), R.insert(() => N, ":first-child"), R.insert(() => F, ":first-child"), R.attr("class", "text"), x && n.look !== "handDrawn" && R.selectAll("path").attr("style", x), u && n.look !== "handDrawn" && R.selectAll("path").attr("style", u), R.attr("transform", `translate(${v - v / 4}, 0)`), p.attr("transform", `translate(${-g / 2 + ((a = n.padding) == null ? 0 : a) / 2 - (f.x - ((o = f.left) == null ? 0 : o))},${-_ / 2 + ((s = n.padding) == null ? 0 : s) / 2 - (f.y - ((c = f.top) == null ? 0 : c))})`), E(n, R), n.intersect = function(e) {
829
+ return q.polygon(n, k, e);
830
+ }, d;
831
+ }
832
+ n(me, "curlyBraces");
833
+ async function he(e, t) {
834
+ var n, r, i;
835
+ let { labelStyles: a, nodeStyles: o } = b(t);
836
+ t.labelStyle = a;
837
+ let s = (n = t.padding) == null ? 0 : n, c = t.look === "neo" ? 16 : s, l = t.look === "neo" ? 12 : s, { shapeSvg: u, bbox: d } = await w(e, t, D(t)), f = Math.max(20, (d.width + c * 2) * 1.25, (r = t == null ? void 0 : t.width) == null ? 0 : r), p = Math.max(5, d.height + l * 2, (i = t == null ? void 0 : t.height) == null ? 0 : i), m = p / 2, { cssStyles: h } = t, g = C.svg(u), _ = y(t, {});
838
+ t.look !== "handDrawn" && (_.roughness = 0, _.fillStyle = "solid");
839
+ let v = f, x = p, S = v - m, T = x / 4, k = [
840
+ {
841
+ x: S,
842
+ y: 0
843
+ },
844
+ {
845
+ x: T,
846
+ y: 0
847
+ },
848
+ {
849
+ x: 0,
850
+ y: x / 2
851
+ },
852
+ {
853
+ x: T,
854
+ y: x
855
+ },
856
+ {
857
+ x: S,
858
+ y: x
859
+ },
860
+ ...A(-S, -x / 2, m, 50, 270, 90)
861
+ ], j = O(k), M = g.path(j, _), N = u.insert(() => M, ":first-child");
862
+ return N.attr("class", "basic label-container outer-path"), h && t.look !== "handDrawn" && N.selectChildren("path").attr("style", h), o && t.look !== "handDrawn" && N.selectChildren("path").attr("style", o), N.attr("transform", `translate(${-f / 2}, ${-p / 2})`), E(t, N), t.intersect = function(e) {
863
+ return q.polygon(t, k, e);
864
+ }, u;
865
+ }
866
+ n(he, "curvedTrapezoid");
867
+ var ge = /* @__PURE__ */ n((e, t, n, r, i, a) => [
868
+ `M${e},${t + a}`,
869
+ `a${i},${a} 0,0,0 ${n},0`,
870
+ `a${i},${a} 0,0,0 ${-n},0`,
871
+ `l0,${r}`,
872
+ `a${i},${a} 0,0,0 ${n},0`,
873
+ `l0,${-r}`
874
+ ].join(" "), "createCylinderPathD"), _e = /* @__PURE__ */ n((e, t, n, r, i, a) => [
875
+ `M${e},${t + a}`,
876
+ `M${e + n},${t + a}`,
877
+ `a${i},${a} 0,0,0 ${-n},0`,
878
+ `l0,${r}`,
879
+ `a${i},${a} 0,0,0 ${n},0`,
880
+ `l0,${-r}`
881
+ ].join(" "), "createOuterCylinderPathD"), ve = /* @__PURE__ */ n((e, t, n, r, i, a) => [`M${e - n / 2},${-r / 2}`, `a${i},${a} 0,0,0 ${n},0`].join(" "), "createInnerCylinderPathD"), ye = 8, be = 8;
882
+ async function xe(e, t) {
883
+ var n, r, i, a;
884
+ let { labelStyles: o, nodeStyles: s } = b(t);
885
+ t.labelStyle = o;
886
+ let c = (n = t.padding) == null ? 0 : n, l = t.look === "neo" ? 24 : c, u = t.look === "neo" ? 24 : c;
887
+ if (t.width || t.height) {
888
+ var d, f, m;
889
+ let e = (d = t.width) == null ? 0 : d;
890
+ t.width = ((f = t.width) == null ? 0 : f) - u, t.width < be && (t.width = be);
891
+ let n = e / 2 / (2.5 + e / 50);
892
+ t.height = ((m = t.height) == null ? 0 : m) - l - n * 3, t.height < ye && (t.height = ye);
893
+ }
894
+ let { shapeSvg: h, bbox: g, label: _ } = await w(e, t, D(t)), v = (t.width ? t.width : g.width) + u, x = v / 2, S = x / (2.5 + v / 50), T = (t.height ? t.height : g.height) + l + S, O, { cssStyles: k } = t;
895
+ if (t.look === "handDrawn") {
896
+ let e = C.svg(h), n = _e(0, 0, v, T, x, S), r = ve(0, S, v, T, x, S), i = y(t, {}), a = e.path(n, i), o = e.path(r, y(t, { fill: "none" }));
897
+ O = h.insert(() => o, ":first-child"), O = h.insert(() => a, ":first-child"), O.attr("class", "basic label-container"), k && O.attr("style", k);
898
+ } else {
899
+ let e = ge(0, 0, v, T, x, S);
900
+ O = h.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container outer-path").attr("style", p(k)).attr("style", s);
901
+ }
902
+ return O.attr("label-offset-y", S), O.attr("transform", `translate(${-v / 2}, ${-(T / 2 + S)})`), E(t, O), _.attr("transform", `translate(${-(g.width / 2) - (g.x - ((r = g.left) == null ? 0 : r))}, ${-(g.height / 2) + ((i = t.padding) == null ? 0 : i) / 1.5 - (g.y - ((a = g.top) == null ? 0 : a))})`), t.intersect = function(e) {
903
+ var n, r, i, a, o;
904
+ let s = q.rect(t, e), c = s.x - ((n = t.x) == null ? 0 : n);
905
+ if (x != 0 && (Math.abs(c) < ((r = t.width) == null ? 0 : r) / 2 || Math.abs(c) == ((i = t.width) == null ? 0 : i) / 2 && Math.abs(s.y - ((a = t.y) == null ? 0 : a)) > ((o = t.height) == null ? 0 : o) / 2 - S)) {
906
+ var l;
907
+ let n = S * S * (1 - c * c / (x * x));
908
+ n > 0 && (n = Math.sqrt(n)), n = S - n, e.y - ((l = t.y) == null ? 0 : l) > 0 && (n = -n), s.y += n;
909
+ }
910
+ return s;
911
+ }, h;
912
+ }
913
+ n(xe, "cylinder");
914
+ async function Se(e, t) {
915
+ var n, r, i, a, o, s;
916
+ let { labelStyles: c, nodeStyles: l } = b(t);
917
+ t.labelStyle = c;
918
+ let u = t.look === "neo" ? 16 : (n = t.padding) == null ? 0 : n, d = t.look === "neo" ? 16 : (r = t.padding) == null ? 0 : r, { shapeSvg: f, bbox: p, label: m } = await w(e, t, D(t)), h = p.width + u, g = p.height + d, _ = g * .2, v = -h / 2, x = -g / 2 - _ / 2, { cssStyles: S } = t, T = C.svg(f), O = y(t, {});
919
+ t.look !== "handDrawn" && (O.roughness = 0, O.fillStyle = "solid");
920
+ let k = [
921
+ {
922
+ x: v,
923
+ y: x + _
924
+ },
925
+ {
926
+ x: -v,
927
+ y: x + _
928
+ },
929
+ {
930
+ x: -v,
931
+ y: -x
932
+ },
933
+ {
934
+ x: v,
935
+ y: -x
936
+ },
937
+ {
938
+ x: v,
939
+ y: x
940
+ },
941
+ {
942
+ x: -v,
943
+ y: x
944
+ },
945
+ {
946
+ x: -v,
947
+ y: x + _
948
+ }
949
+ ], A = T.polygon(k.map((e) => [e.x, e.y]), O), j = f.insert(() => A, ":first-child");
950
+ return j.attr("class", "basic label-container outer-path"), S && t.look !== "handDrawn" && j.selectAll("path").attr("style", S), l && t.look !== "handDrawn" && j.selectAll("path").attr("style", l), m.attr("transform", `translate(${v + ((i = t.padding) == null ? 0 : i) / 2 - (p.x - ((a = p.left) == null ? 0 : a))}, ${x + _ + ((o = t.padding) == null ? 0 : o) / 2 - (p.y - ((s = p.top) == null ? 0 : s))})`), E(t, j), t.intersect = function(e) {
951
+ return q.rect(t, e);
952
+ }, f;
953
+ }
954
+ n(Se, "dividedRectangle");
955
+ async function Ce(e, n) {
956
+ var r;
957
+ let { labelStyles: i, nodeStyles: a } = b(n), o = n.look === "neo" ? 12 : 5;
958
+ n.labelStyle = i;
959
+ let s = (r = n.padding) == null ? 0 : r, c = n.look === "neo" ? 16 : s, { shapeSvg: l, bbox: u } = await w(e, n, D(n)), d = (n != null && n.width ? (n == null ? void 0 : n.width) / 2 : u.width / 2) + (c == null ? 0 : c), f = d - o, m, { cssStyles: h } = n;
960
+ if (n.look === "handDrawn") {
961
+ var g, _;
962
+ let e = C.svg(l), t = y(n, {
963
+ roughness: .2,
964
+ strokeWidth: 2.5
965
+ }), r = y(n, {
966
+ roughness: .2,
967
+ strokeWidth: 1.5
968
+ }), i = e.circle(0, 0, d * 2, t), a = e.circle(0, 0, f * 2, r);
969
+ m = l.insert("g", ":first-child"), m.attr("class", p(n.cssClasses)).attr("style", p(h)), (g = m.node()) == null || g.appendChild(i), (_ = m.node()) == null || _.appendChild(a);
970
+ } else {
971
+ m = l.insert("g", ":first-child");
972
+ let e = m.insert("circle", ":first-child"), t = m.insert("circle");
973
+ m.attr("class", "basic label-container").attr("style", a), e.attr("class", "outer-circle").attr("style", a).attr("r", d).attr("cx", 0).attr("cy", 0), t.attr("class", "inner-circle").attr("style", a).attr("r", f).attr("cx", 0).attr("cy", 0);
974
+ }
975
+ return E(n, m), n.intersect = function(e) {
976
+ return t.info("DoubleCircle intersect", n, d, e), q.circle(n, d, e);
977
+ }, l;
978
+ }
979
+ n(Ce, "doublecircle");
980
+ function we(e, n, { config: { themeVariables: r } }) {
981
+ var i;
982
+ let { labelStyles: a, nodeStyles: o } = b(n);
983
+ n.label = "", n.labelStyle = a;
984
+ let s = e.insert("g").attr("class", D(n)).attr("id", (i = n.domId) == null ? n.id : i), { cssStyles: c } = n, l = C.svg(s), { nodeBorder: u } = r, d = y(n, { fillStyle: "solid" });
985
+ n.look !== "handDrawn" && (d.roughness = 0);
986
+ let f = l.circle(0, 0, 14, d), p = s.insert(() => f, ":first-child");
987
+ return p.selectAll("path").attr("style", `fill: ${u} !important;`), c && c.length > 0 && n.look !== "handDrawn" && p.selectAll("path").attr("style", c), o && n.look !== "handDrawn" && p.selectAll("path").attr("style", o), E(n, p), n.intersect = function(e) {
988
+ return t.info("filledCircle intersect", n, {
989
+ radius: 7,
990
+ point: e
991
+ }), q.circle(n, 7, e);
992
+ }, s;
993
+ }
994
+ n(we, "filledCircle");
995
+ var Te = 10, Ee = 10;
996
+ async function De(e, n) {
997
+ var r, i, a, o;
998
+ let { labelStyles: s, nodeStyles: c } = b(n);
999
+ n.labelStyle = s;
1000
+ let l = (r = n.padding) == null ? 0 : r, u = n.look === "neo" ? l * 2 : l;
1001
+ if (n.width || n.height) {
1002
+ var d, f;
1003
+ n.height = (d = n == null ? void 0 : n.height) == null ? 0 : d, n.height < Te && (n.height = Te), n.width = ((f = n == null ? void 0 : n.width) == null ? 0 : f) - u - u / 2, n.width < Ee && (n.width = Ee);
1004
+ }
1005
+ let { shapeSvg: p, bbox: m, label: h } = await w(e, n, D(n)), g = (n != null && n.width ? n == null ? void 0 : n.width : m.width) + (u == null ? 0 : u), _ = n != null && n.height ? n == null ? void 0 : n.height : g + m.height, v = _, x = [
1006
+ {
1007
+ x: 0,
1008
+ y: -_
1009
+ },
1010
+ {
1011
+ x: v,
1012
+ y: -_
1013
+ },
1014
+ {
1015
+ x: v / 2,
1016
+ y: 0
1017
+ }
1018
+ ], { cssStyles: S } = n, T = C.svg(p), k = y(n, {});
1019
+ n.look !== "handDrawn" && (k.roughness = 0, k.fillStyle = "solid");
1020
+ let A = O(x), j = T.path(A, k), M = p.insert(() => j, ":first-child").attr("transform", `translate(${-_ / 2}, ${_ / 2})`).attr("class", "outer-path");
1021
+ return S && n.look !== "handDrawn" && M.selectChildren("path").attr("style", S), c && n.look !== "handDrawn" && M.selectChildren("path").attr("style", c), n.width = g, n.height = _, E(n, M), h.attr("transform", `translate(${-m.width / 2 - (m.x - ((i = m.left) == null ? 0 : i))}, ${-_ / 2 + ((a = n.padding) == null ? 0 : a) / 2 + (m.y - ((o = m.top) == null ? 0 : o))})`), n.intersect = function(e) {
1022
+ return t.info("Triangle intersect", n, x, e), q.polygon(n, x, e);
1023
+ }, p;
1024
+ }
1025
+ n(De, "flippedTriangle");
1026
+ function Oe(e, t, { dir: n, config: { state: r, themeVariables: i } }) {
1027
+ var a, o, s, c;
1028
+ let { nodeStyles: l } = b(t);
1029
+ t.label = "";
1030
+ let u = e.insert("g").attr("class", D(t)).attr("id", (a = t.domId) == null ? t.id : a), { cssStyles: d } = t, f = Math.max(70, (o = t == null ? void 0 : t.width) == null ? 0 : o), p = Math.max(10, (s = t == null ? void 0 : t.height) == null ? 0 : s);
1031
+ if (n === "LR") {
1032
+ var m, h;
1033
+ f = Math.max(10, (m = t == null ? void 0 : t.width) == null ? 0 : m), p = Math.max(70, (h = t == null ? void 0 : t.height) == null ? 0 : h);
1034
+ }
1035
+ let g = -1 * f / 2, _ = -1 * p / 2, v = C.svg(u), x = y(t, {
1036
+ stroke: i.lineColor,
1037
+ fill: i.lineColor
1038
+ });
1039
+ t.look !== "handDrawn" && (x.roughness = 0, x.fillStyle = "solid");
1040
+ let S = v.rectangle(g, _, f, p, x), w = u.insert(() => S, ":first-child");
1041
+ d && t.look !== "handDrawn" && w.selectAll("path").attr("style", d), l && t.look !== "handDrawn" && w.selectAll("path").attr("style", l), E(t, w);
1042
+ let T = (c = r == null ? void 0 : r.padding) == null ? 0 : c;
1043
+ return t.width && t.height && (t.width += T / 2 || 0, t.height += T / 2 || 0), t.intersect = function(e) {
1044
+ return q.rect(t, e);
1045
+ }, u;
1046
+ }
1047
+ n(Oe, "forkJoin");
1048
+ async function ke(e, n) {
1049
+ var r, i;
1050
+ let { labelStyles: a, nodeStyles: o } = b(n);
1051
+ n.labelStyle = a;
1052
+ let s = n.look === "neo" ? 16 : (r = n.padding) == null ? 0 : r, c = n.look === "neo" ? 12 : (i = n.padding) == null ? 0 : i;
1053
+ if (n.width || n.height) {
1054
+ var l, u;
1055
+ n.height = ((l = n == null ? void 0 : n.height) == null ? 0 : l) - c * 2, n.height < 10 && (n.height = 10), n.width = ((u = n == null ? void 0 : n.width) == null ? 0 : u) - s * 2, n.width < 15 && (n.width = 15);
1056
+ }
1057
+ let { shapeSvg: d, bbox: f } = await w(e, n, D(n)), p = (n != null && n.width ? n == null ? void 0 : n.width : Math.max(15, f.width)) + s * 2, m = (n != null && n.height ? n == null ? void 0 : n.height : Math.max(10, f.height)) + c * 2, h = m / 2, { cssStyles: g } = n, _ = C.svg(d), v = y(n, {});
1058
+ n.look !== "handDrawn" && (v.roughness = 0, v.fillStyle = "solid");
1059
+ let x = [
1060
+ {
1061
+ x: -p / 2,
1062
+ y: -m / 2
1063
+ },
1064
+ {
1065
+ x: p / 2 - h,
1066
+ y: -m / 2
1067
+ },
1068
+ ...A(-p / 2 + h, 0, h, 50, 90, 270),
1069
+ {
1070
+ x: p / 2 - h,
1071
+ y: m / 2
1072
+ },
1073
+ {
1074
+ x: -p / 2,
1075
+ y: m / 2
1076
+ }
1077
+ ], S = O(x), T = _.path(S, v), k = d.insert(() => T, ":first-child");
1078
+ return k.attr("class", "basic label-container outer-path"), g && n.look !== "handDrawn" && k.selectChildren("path").attr("style", g), o && n.look !== "handDrawn" && k.selectChildren("path").attr("style", o), E(n, k), n.intersect = function(e) {
1079
+ return t.info("Pill intersect", n, {
1080
+ radius: h,
1081
+ point: e
1082
+ }), q.polygon(n, x, e);
1083
+ }, d;
1084
+ }
1085
+ n(ke, "halfRoundedRectangle");
1086
+ var Ae = /* @__PURE__ */ n((e, t, n, r, i) => [
1087
+ `M${e + i},${t}`,
1088
+ `L${e + n - i},${t}`,
1089
+ `L${e + n},${t - r / 2}`,
1090
+ `L${e + n - i},${t - r}`,
1091
+ `L${e + i},${t - r}`,
1092
+ `L${e},${t - r / 2}`,
1093
+ "Z"
1094
+ ].join(" "), "createHexagonPathD");
1095
+ async function je(e, t) {
1096
+ var n;
1097
+ let { labelStyles: r, nodeStyles: i } = b(t), a = t.look === "neo" ? 3.5 : 4;
1098
+ t.labelStyle = r;
1099
+ let o = (n = t.padding) == null ? 0 : n, s = t.look === "neo" ? 70 : o, c = t.look === "neo" ? 32 : o;
1100
+ if (t.width || t.height) {
1101
+ var l, u, d;
1102
+ let e = ((l = t.height) == null ? 0 : l) / a;
1103
+ t.width = ((u = t == null ? void 0 : t.width) == null ? 0 : u) - 2 * e - c, t.height = ((d = t.height) == null ? 0 : d) - s;
1104
+ }
1105
+ let { shapeSvg: f, bbox: p } = await w(e, t, D(t)), m = (t != null && t.height ? t == null ? void 0 : t.height : p.height) + s, h = m / a, g = (t != null && t.width ? t == null ? void 0 : t.width : p.width) + 2 * h + c, _ = [
1106
+ {
1107
+ x: h,
1108
+ y: 0
1109
+ },
1110
+ {
1111
+ x: g - h,
1112
+ y: 0
1113
+ },
1114
+ {
1115
+ x: g,
1116
+ y: -m / 2
1117
+ },
1118
+ {
1119
+ x: g - h,
1120
+ y: -m
1121
+ },
1122
+ {
1123
+ x: h,
1124
+ y: -m
1125
+ },
1126
+ {
1127
+ x: 0,
1128
+ y: -m / 2
1129
+ }
1130
+ ], v, { cssStyles: x } = t;
1131
+ if (t.look === "handDrawn") {
1132
+ let e = C.svg(f), n = y(t, {}), r = Ae(0, 0, g, m, h), i = e.path(r, n);
1133
+ v = f.insert(() => i, ":first-child").attr("transform", `translate(${-g / 2}, ${m / 2})`), x && v.attr("style", x);
1134
+ } else v = Y(f, g, m, _);
1135
+ return i && v.attr("style", i), t.width = g, t.height = m, E(t, v), t.intersect = function(e) {
1136
+ return q.polygon(t, _, e);
1137
+ }, f;
1138
+ }
1139
+ n(je, "hexagon");
1140
+ async function Me(e, n) {
1141
+ var r, i;
1142
+ let { labelStyles: a, nodeStyles: o } = b(n);
1143
+ n.label = "", n.labelStyle = a;
1144
+ let { shapeSvg: s } = await w(e, n, D(n)), c = Math.max(30, (r = n == null ? void 0 : n.width) == null ? 0 : r), l = Math.max(30, (i = n == null ? void 0 : n.height) == null ? 0 : i), { cssStyles: u } = n, d = C.svg(s), f = y(n, {});
1145
+ n.look !== "handDrawn" && (f.roughness = 0, f.fillStyle = "solid");
1146
+ let p = [
1147
+ {
1148
+ x: 0,
1149
+ y: 0
1150
+ },
1151
+ {
1152
+ x: c,
1153
+ y: 0
1154
+ },
1155
+ {
1156
+ x: 0,
1157
+ y: l
1158
+ },
1159
+ {
1160
+ x: c,
1161
+ y: l
1162
+ }
1163
+ ], m = O(p), h = d.path(m, f), g = s.insert(() => h, ":first-child");
1164
+ return g.attr("class", "basic label-container outer-path"), u && n.look !== "handDrawn" && g.selectChildren("path").attr("style", u), o && n.look !== "handDrawn" && g.selectChildren("path").attr("style", o), g.attr("transform", `translate(${-c / 2}, ${-l / 2})`), E(n, g), n.intersect = function(e) {
1165
+ return t.info("Pill intersect", n, { points: p }), q.polygon(n, p, e);
1166
+ }, s;
1167
+ }
1168
+ n(Me, "hourglass");
1169
+ async function Ne(n, r, { config: { themeVariables: i, flowchart: a } }) {
1170
+ var o, s, c;
1171
+ let { labelStyles: l } = b(r);
1172
+ r.labelStyle = l;
1173
+ let u = (o = r.assetHeight) == null ? 48 : o, d = (s = r.assetWidth) == null ? 48 : s, f = Math.max(u, d), p = a == null ? void 0 : a.wrappingWidth;
1174
+ r.width = Math.max(f, p == null ? 0 : p);
1175
+ let { shapeSvg: m, bbox: h, label: _ } = await w(n, r, "icon-shape default"), v = r.pos === "t", x = f, T = f, { nodeBorder: D } = i, { stylesMap: O } = S(r), k = -T / 2, A = -x / 2, j = r.label ? 8 : 0, M = C.svg(m), N = y(r, {
1176
+ stroke: "none",
1177
+ fill: "none"
1178
+ });
1179
+ r.look !== "handDrawn" && (N.roughness = 0, N.fillStyle = "solid");
1180
+ let P = M.rectangle(k, A, T, x, N), F = Math.max(T, h.width), I = x + h.height + j, L = M.rectangle(-F / 2, -I / 2, F, I, e(e({}, N), {}, {
1181
+ fill: "transparent",
1182
+ stroke: "none"
1183
+ })), R = m.insert(() => P, ":first-child"), z = m.insert(() => L);
1184
+ if (r.icon) {
1185
+ var B;
1186
+ let e = m.append("g");
1187
+ e.html(`<g>${await g(r.icon, {
1188
+ height: f,
1189
+ width: f,
1190
+ fallbackPrefix: ""
1191
+ })}</g>`);
1192
+ let t = e.node().getBBox(), n = t.width, i = t.height, a = t.x, o = t.y;
1193
+ e.attr("transform", `translate(${-n / 2 - a},${v ? h.height / 2 + j / 2 - i / 2 - o : -h.height / 2 - j / 2 - i / 2 - o})`), e.attr("style", `color: ${(B = O.get("stroke")) == null ? D : B};`);
1194
+ }
1195
+ return _.attr("transform", `translate(${-h.width / 2 - (h.x - ((c = h.left) == null ? 0 : c))},${v ? -I / 2 : I / 2 - h.height})`), R.attr("transform", `translate(0,${v ? h.height / 2 + j / 2 : -h.height / 2 - j / 2})`), E(r, z), r.intersect = function(e) {
1196
+ var n, i, a;
1197
+ if (t.info("iconSquare intersect", r, e), !r.label) return q.rect(r, e);
1198
+ let o = (n = r.x) == null ? 0 : n, s = (i = r.y) == null ? 0 : i, c = (a = r.height) == null ? 0 : a, l = [];
1199
+ return l = v ? [
1200
+ {
1201
+ x: o - h.width / 2,
1202
+ y: s - c / 2
1203
+ },
1204
+ {
1205
+ x: o + h.width / 2,
1206
+ y: s - c / 2
1207
+ },
1208
+ {
1209
+ x: o + h.width / 2,
1210
+ y: s - c / 2 + h.height + j
1211
+ },
1212
+ {
1213
+ x: o + T / 2,
1214
+ y: s - c / 2 + h.height + j
1215
+ },
1216
+ {
1217
+ x: o + T / 2,
1218
+ y: s + c / 2
1219
+ },
1220
+ {
1221
+ x: o - T / 2,
1222
+ y: s + c / 2
1223
+ },
1224
+ {
1225
+ x: o - T / 2,
1226
+ y: s - c / 2 + h.height + j
1227
+ },
1228
+ {
1229
+ x: o - h.width / 2,
1230
+ y: s - c / 2 + h.height + j
1231
+ }
1232
+ ] : [
1233
+ {
1234
+ x: o - T / 2,
1235
+ y: s - c / 2
1236
+ },
1237
+ {
1238
+ x: o + T / 2,
1239
+ y: s - c / 2
1240
+ },
1241
+ {
1242
+ x: o + T / 2,
1243
+ y: s - c / 2 + x
1244
+ },
1245
+ {
1246
+ x: o + h.width / 2,
1247
+ y: s - c / 2 + x
1248
+ },
1249
+ {
1250
+ x: o + h.width / 2 / 2,
1251
+ y: s + c / 2
1252
+ },
1253
+ {
1254
+ x: o - h.width / 2,
1255
+ y: s + c / 2
1256
+ },
1257
+ {
1258
+ x: o - h.width / 2,
1259
+ y: s - c / 2 + x
1260
+ },
1261
+ {
1262
+ x: o - T / 2,
1263
+ y: s - c / 2 + x
1264
+ }
1265
+ ], q.polygon(r, l, e);
1266
+ }, m;
1267
+ }
1268
+ n(Ne, "icon");
1269
+ async function Pe(n, r, { config: { themeVariables: i, flowchart: a } }) {
1270
+ var o, s, c, l;
1271
+ let { labelStyles: u } = b(r);
1272
+ r.labelStyle = u;
1273
+ let d = (o = r.assetHeight) == null ? 48 : o, f = (s = r.assetWidth) == null ? 48 : s, p = Math.max(d, f), m = a == null ? void 0 : a.wrappingWidth;
1274
+ r.width = Math.max(p, m == null ? 0 : m);
1275
+ let { shapeSvg: h, bbox: _, label: v } = await w(n, r, "icon-shape default"), x = r.label ? 8 : 0, T = r.pos === "t", { nodeBorder: D, mainBkg: O } = i, { stylesMap: k } = S(r), A = C.svg(h), j = y(r, {});
1276
+ r.look !== "handDrawn" && (j.roughness = 0, j.fillStyle = "solid");
1277
+ let M = k.get("fill");
1278
+ j.stroke = M == null ? O : M;
1279
+ let N = h.append("g");
1280
+ r.icon && N.html(`<g>${await g(r.icon, {
1281
+ height: p,
1282
+ width: p,
1283
+ fallbackPrefix: ""
1284
+ })}</g>`);
1285
+ let P = N.node().getBBox(), F = P.width, I = P.height, L = P.x, R = P.y, z = Math.max(F, I) * Math.SQRT2 + 40, B = A.circle(0, 0, z, j), V = Math.max(z, _.width), H = z + _.height + x, U = A.rectangle(-V / 2, -H / 2, V, H, e(e({}, j), {}, {
1286
+ fill: "transparent",
1287
+ stroke: "none"
1288
+ })), W = h.insert(() => B, ":first-child"), G = h.insert(() => U);
1289
+ return N.attr("transform", `translate(${-F / 2 - L},${T ? _.height / 2 + x / 2 - I / 2 - R : -_.height / 2 - x / 2 - I / 2 - R})`), N.attr("style", `color: ${(c = k.get("stroke")) == null ? D : c};`), v.attr("transform", `translate(${-_.width / 2 - (_.x - ((l = _.left) == null ? 0 : l))},${T ? -H / 2 : H / 2 - _.height})`), W.attr("transform", `translate(0,${T ? _.height / 2 + x / 2 : -_.height / 2 - x / 2})`), E(r, G), r.intersect = function(e) {
1290
+ return t.info("iconSquare intersect", r, e), q.rect(r, e);
1291
+ }, h;
1292
+ }
1293
+ n(Pe, "iconCircle");
1294
+ async function Fe(n, r, { config: { themeVariables: i, flowchart: a } }) {
1295
+ var o, s, c;
1296
+ let { labelStyles: l } = b(r);
1297
+ r.labelStyle = l;
1298
+ let u = (o = r.assetHeight) == null ? 48 : o, d = (s = r.assetWidth) == null ? 48 : s, f = Math.max(u, d), p = a == null ? void 0 : a.wrappingWidth;
1299
+ r.width = Math.max(f, p == null ? 0 : p);
1300
+ let { shapeSvg: m, bbox: h, halfPadding: _, label: v } = await w(n, r, "icon-shape default"), x = r.pos === "t", T = f + _ * 2, D = f + _ * 2, { nodeBorder: O, mainBkg: k } = i, { stylesMap: A } = S(r), j = -D / 2, M = -T / 2, N = r.label ? 8 : 0, F = C.svg(m), I = y(r, {});
1301
+ r.look !== "handDrawn" && (I.roughness = 0, I.fillStyle = "solid");
1302
+ let L = A.get("fill");
1303
+ I.stroke = L == null ? k : L;
1304
+ let R = F.path(P(j, M, D, T, 5), I), z = Math.max(D, h.width), B = T + h.height + N, V = F.rectangle(-z / 2, -B / 2, z, B, e(e({}, I), {}, {
1305
+ fill: "transparent",
1306
+ stroke: "none"
1307
+ })), H = m.insert(() => R, ":first-child").attr("class", "icon-shape2"), U = m.insert(() => V);
1308
+ if (r.icon) {
1309
+ var W;
1310
+ let e = m.append("g");
1311
+ e.html(`<g>${await g(r.icon, {
1312
+ height: f,
1313
+ width: f,
1314
+ fallbackPrefix: ""
1315
+ })}</g>`);
1316
+ let t = e.node().getBBox(), n = t.width, i = t.height, a = t.x, o = t.y;
1317
+ e.attr("transform", `translate(${-n / 2 - a},${x ? h.height / 2 + N / 2 - i / 2 - o : -h.height / 2 - N / 2 - i / 2 - o})`), e.attr("style", `color: ${(W = A.get("stroke")) == null ? O : W};`);
1318
+ }
1319
+ return v.attr("transform", `translate(${-h.width / 2 - (h.x - ((c = h.left) == null ? 0 : c))},${x ? -B / 2 : B / 2 - h.height})`), H.attr("transform", `translate(0,${x ? h.height / 2 + N / 2 : -h.height / 2 - N / 2})`), E(r, U), r.intersect = function(e) {
1320
+ var n, i, a;
1321
+ if (t.info("iconSquare intersect", r, e), !r.label) return q.rect(r, e);
1322
+ let o = (n = r.x) == null ? 0 : n, s = (i = r.y) == null ? 0 : i, c = (a = r.height) == null ? 0 : a, l = [];
1323
+ return l = x ? [
1324
+ {
1325
+ x: o - h.width / 2,
1326
+ y: s - c / 2
1327
+ },
1328
+ {
1329
+ x: o + h.width / 2,
1330
+ y: s - c / 2
1331
+ },
1332
+ {
1333
+ x: o + h.width / 2,
1334
+ y: s - c / 2 + h.height + N
1335
+ },
1336
+ {
1337
+ x: o + D / 2,
1338
+ y: s - c / 2 + h.height + N
1339
+ },
1340
+ {
1341
+ x: o + D / 2,
1342
+ y: s + c / 2
1343
+ },
1344
+ {
1345
+ x: o - D / 2,
1346
+ y: s + c / 2
1347
+ },
1348
+ {
1349
+ x: o - D / 2,
1350
+ y: s - c / 2 + h.height + N
1351
+ },
1352
+ {
1353
+ x: o - h.width / 2,
1354
+ y: s - c / 2 + h.height + N
1355
+ }
1356
+ ] : [
1357
+ {
1358
+ x: o - D / 2,
1359
+ y: s - c / 2
1360
+ },
1361
+ {
1362
+ x: o + D / 2,
1363
+ y: s - c / 2
1364
+ },
1365
+ {
1366
+ x: o + D / 2,
1367
+ y: s - c / 2 + T
1368
+ },
1369
+ {
1370
+ x: o + h.width / 2,
1371
+ y: s - c / 2 + T
1372
+ },
1373
+ {
1374
+ x: o + h.width / 2 / 2,
1375
+ y: s + c / 2
1376
+ },
1377
+ {
1378
+ x: o - h.width / 2,
1379
+ y: s + c / 2
1380
+ },
1381
+ {
1382
+ x: o - h.width / 2,
1383
+ y: s - c / 2 + T
1384
+ },
1385
+ {
1386
+ x: o - D / 2,
1387
+ y: s - c / 2 + T
1388
+ }
1389
+ ], q.polygon(r, l, e);
1390
+ }, m;
1391
+ }
1392
+ n(Fe, "iconRounded");
1393
+ async function Ie(n, r, { config: { themeVariables: i, flowchart: a } }) {
1394
+ var o, s, c;
1395
+ let { labelStyles: l } = b(r);
1396
+ r.labelStyle = l;
1397
+ let u = (o = r.assetHeight) == null ? 48 : o, d = (s = r.assetWidth) == null ? 48 : s, f = Math.max(u, d), p = a == null ? void 0 : a.wrappingWidth;
1398
+ r.width = Math.max(f, p == null ? 0 : p);
1399
+ let { shapeSvg: m, bbox: h, halfPadding: _, label: v } = await w(n, r, "icon-shape default"), x = r.pos === "t", T = f + _ * 2, D = f + _ * 2, { nodeBorder: O, mainBkg: k } = i, { stylesMap: A } = S(r), j = -D / 2, M = -T / 2, N = r.label ? 8 : 0, F = C.svg(m), I = y(r, {});
1400
+ r.look !== "handDrawn" && (I.roughness = 0, I.fillStyle = "solid");
1401
+ let L = A.get("fill");
1402
+ I.stroke = L == null ? k : L;
1403
+ let R = F.path(P(j, M, D, T, .1), I), z = Math.max(D, h.width), B = T + h.height + N, V = F.rectangle(-z / 2, -B / 2, z, B, e(e({}, I), {}, {
1404
+ fill: "transparent",
1405
+ stroke: "none"
1406
+ })), H = m.insert(() => R, ":first-child"), U = m.insert(() => V);
1407
+ if (r.icon) {
1408
+ var W;
1409
+ let e = m.append("g");
1410
+ e.html(`<g>${await g(r.icon, {
1411
+ height: f,
1412
+ width: f,
1413
+ fallbackPrefix: ""
1414
+ })}</g>`);
1415
+ let t = e.node().getBBox(), n = t.width, i = t.height, a = t.x, o = t.y;
1416
+ e.attr("transform", `translate(${-n / 2 - a},${x ? h.height / 2 + N / 2 - i / 2 - o : -h.height / 2 - N / 2 - i / 2 - o})`), e.attr("style", `color: ${(W = A.get("stroke")) == null ? O : W};`);
1417
+ }
1418
+ return v.attr("transform", `translate(${-h.width / 2 - (h.x - ((c = h.left) == null ? 0 : c))},${x ? -B / 2 : B / 2 - h.height})`), H.attr("transform", `translate(0,${x ? h.height / 2 + N / 2 : -h.height / 2 - N / 2})`), E(r, U), r.intersect = function(e) {
1419
+ var n, i, a;
1420
+ if (t.info("iconSquare intersect", r, e), !r.label) return q.rect(r, e);
1421
+ let o = (n = r.x) == null ? 0 : n, s = (i = r.y) == null ? 0 : i, c = (a = r.height) == null ? 0 : a, l = [];
1422
+ return l = x ? [
1423
+ {
1424
+ x: o - h.width / 2,
1425
+ y: s - c / 2
1426
+ },
1427
+ {
1428
+ x: o + h.width / 2,
1429
+ y: s - c / 2
1430
+ },
1431
+ {
1432
+ x: o + h.width / 2,
1433
+ y: s - c / 2 + h.height + N
1434
+ },
1435
+ {
1436
+ x: o + D / 2,
1437
+ y: s - c / 2 + h.height + N
1438
+ },
1439
+ {
1440
+ x: o + D / 2,
1441
+ y: s + c / 2
1442
+ },
1443
+ {
1444
+ x: o - D / 2,
1445
+ y: s + c / 2
1446
+ },
1447
+ {
1448
+ x: o - D / 2,
1449
+ y: s - c / 2 + h.height + N
1450
+ },
1451
+ {
1452
+ x: o - h.width / 2,
1453
+ y: s - c / 2 + h.height + N
1454
+ }
1455
+ ] : [
1456
+ {
1457
+ x: o - D / 2,
1458
+ y: s - c / 2
1459
+ },
1460
+ {
1461
+ x: o + D / 2,
1462
+ y: s - c / 2
1463
+ },
1464
+ {
1465
+ x: o + D / 2,
1466
+ y: s - c / 2 + T
1467
+ },
1468
+ {
1469
+ x: o + h.width / 2,
1470
+ y: s - c / 2 + T
1471
+ },
1472
+ {
1473
+ x: o + h.width / 2 / 2,
1474
+ y: s + c / 2
1475
+ },
1476
+ {
1477
+ x: o - h.width / 2,
1478
+ y: s + c / 2
1479
+ },
1480
+ {
1481
+ x: o - h.width / 2,
1482
+ y: s - c / 2 + T
1483
+ },
1484
+ {
1485
+ x: o - D / 2,
1486
+ y: s - c / 2 + T
1487
+ }
1488
+ ], q.polygon(r, l, e);
1489
+ }, m;
1490
+ }
1491
+ n(Ie, "iconSquare");
1492
+ async function Le(n, r, { config: { flowchart: i } }) {
1493
+ var a, o, s, c;
1494
+ let l = new Image();
1495
+ l.src = (a = r == null ? void 0 : r.img) == null ? "" : a, await l.decode();
1496
+ let u = Number(l.naturalWidth.toString().replace("px", "")), d = Number(l.naturalHeight.toString().replace("px", ""));
1497
+ r.imageAspectRatio = u / d;
1498
+ let { labelStyles: f } = b(r);
1499
+ r.labelStyle = f;
1500
+ let p = i == null ? void 0 : i.wrappingWidth;
1501
+ r.defaultWidth = i == null ? void 0 : i.wrappingWidth;
1502
+ let m = Math.max(r.label ? p == null ? 0 : p : 0, (o = r == null ? void 0 : r.assetWidth) == null ? u : o), h = r.constraint === "on" && r != null && r.assetHeight ? r.assetHeight * r.imageAspectRatio : m, g = r.constraint === "on" ? h / r.imageAspectRatio : (s = r == null ? void 0 : r.assetHeight) == null ? d : s;
1503
+ r.width = Math.max(h, p == null ? 0 : p);
1504
+ let { shapeSvg: _, bbox: v, label: x } = await w(n, r, "image-shape default"), S = r.pos === "t", T = -h / 2, D = -g / 2, O = r.label ? 8 : 0, k = C.svg(_), A = y(r, {});
1505
+ r.look !== "handDrawn" && (A.roughness = 0, A.fillStyle = "solid");
1506
+ let j = k.rectangle(T, D, h, g, A), M = Math.max(h, v.width), N = g + v.height + O, P = k.rectangle(-M / 2, -N / 2, M, N, e(e({}, A), {}, {
1507
+ fill: "none",
1508
+ stroke: "none"
1509
+ })), F = _.insert(() => j, ":first-child"), I = _.insert(() => P);
1510
+ if (r.img) {
1511
+ let e = _.append("image");
1512
+ e.attr("href", r.img), e.attr("width", h), e.attr("height", g), e.attr("preserveAspectRatio", "none"), e.attr("transform", `translate(${-h / 2},${S ? N / 2 - g : -N / 2})`);
1513
+ }
1514
+ return x.attr("transform", `translate(${-v.width / 2 - (v.x - ((c = v.left) == null ? 0 : c))},${S ? -g / 2 - v.height / 2 - O / 2 : g / 2 - v.height / 2 + O / 2})`), F.attr("transform", `translate(0,${S ? v.height / 2 + O / 2 : -v.height / 2 - O / 2})`), E(r, I), r.intersect = function(e) {
1515
+ var n, i, a;
1516
+ if (t.info("iconSquare intersect", r, e), !r.label) return q.rect(r, e);
1517
+ let o = (n = r.x) == null ? 0 : n, s = (i = r.y) == null ? 0 : i, c = (a = r.height) == null ? 0 : a, l = [];
1518
+ return l = S ? [
1519
+ {
1520
+ x: o - v.width / 2,
1521
+ y: s - c / 2
1522
+ },
1523
+ {
1524
+ x: o + v.width / 2,
1525
+ y: s - c / 2
1526
+ },
1527
+ {
1528
+ x: o + v.width / 2,
1529
+ y: s - c / 2 + v.height + O
1530
+ },
1531
+ {
1532
+ x: o + h / 2,
1533
+ y: s - c / 2 + v.height + O
1534
+ },
1535
+ {
1536
+ x: o + h / 2,
1537
+ y: s + c / 2
1538
+ },
1539
+ {
1540
+ x: o - h / 2,
1541
+ y: s + c / 2
1542
+ },
1543
+ {
1544
+ x: o - h / 2,
1545
+ y: s - c / 2 + v.height + O
1546
+ },
1547
+ {
1548
+ x: o - v.width / 2,
1549
+ y: s - c / 2 + v.height + O
1550
+ }
1551
+ ] : [
1552
+ {
1553
+ x: o - h / 2,
1554
+ y: s - c / 2
1555
+ },
1556
+ {
1557
+ x: o + h / 2,
1558
+ y: s - c / 2
1559
+ },
1560
+ {
1561
+ x: o + h / 2,
1562
+ y: s - c / 2 + g
1563
+ },
1564
+ {
1565
+ x: o + v.width / 2,
1566
+ y: s - c / 2 + g
1567
+ },
1568
+ {
1569
+ x: o + v.width / 2 / 2,
1570
+ y: s + c / 2
1571
+ },
1572
+ {
1573
+ x: o - v.width / 2,
1574
+ y: s + c / 2
1575
+ },
1576
+ {
1577
+ x: o - v.width / 2,
1578
+ y: s - c / 2 + g
1579
+ },
1580
+ {
1581
+ x: o - h / 2,
1582
+ y: s - c / 2 + g
1583
+ }
1584
+ ], q.polygon(r, l, e);
1585
+ }, _;
1586
+ }
1587
+ n(Le, "imageSquare");
1588
+ async function Re(e, t) {
1589
+ var n, r, i;
1590
+ let { labelStyles: a, nodeStyles: o } = b(t);
1591
+ t.labelStyle = a;
1592
+ let s = (n = t.padding) == null ? 0 : n, c = s, l = t.look === "neo" ? s * 2 : s, { shapeSvg: u, bbox: d } = await w(e, t, D(t)), f = Math.max(d.width + (l == null ? 0 : l) * 2, (r = t == null ? void 0 : t.width) == null ? 0 : r), p = Math.max(d.height + (c == null ? 0 : c) * 2, (i = t == null ? void 0 : t.height) == null ? 0 : i), m = [
1593
+ {
1594
+ x: 0,
1595
+ y: 0
1596
+ },
1597
+ {
1598
+ x: f,
1599
+ y: 0
1600
+ },
1601
+ {
1602
+ x: f + 3 * p / 6,
1603
+ y: -p
1604
+ },
1605
+ {
1606
+ x: -3 * p / 6,
1607
+ y: -p
1608
+ }
1609
+ ], h, { cssStyles: g } = t;
1610
+ if (t.look === "handDrawn") {
1611
+ let e = C.svg(u), n = y(t, {}), r = O(m), i = e.path(r, n);
1612
+ h = u.insert(() => i, ":first-child").attr("transform", `translate(${-f / 2}, ${p / 2})`), g && h.attr("style", g);
1613
+ } else h = Y(u, f, p, m);
1614
+ return o && h.attr("style", o), t.width = f, t.height = p, E(t, h), t.intersect = function(e) {
1615
+ return q.polygon(t, m, e);
1616
+ }, u;
1617
+ }
1618
+ n(Re, "inv_trapezoid");
1619
+ async function ze(e, t, n) {
1620
+ let { labelStyles: r, nodeStyles: i } = b(t);
1621
+ t.labelStyle = r;
1622
+ let { shapeSvg: a, bbox: o } = await w(e, t, D(t)), s = Math.max(o.width + n.labelPaddingX * 2, (t == null ? void 0 : t.width) || 0), c = Math.max(o.height + n.labelPaddingY * 2, (t == null ? void 0 : t.height) || 0), l = -s / 2, u = -c / 2, d, { rx: f, ry: m } = t, { cssStyles: h } = t;
1623
+ if (n != null && n.rx && n.ry && (f = n.rx, m = n.ry), t.look === "handDrawn") {
1624
+ let e = C.svg(a), n = y(t, {}), r = f || m ? e.path(P(l, u, s, c, f || 0), n) : e.rectangle(l, u, s, c, n);
1625
+ d = a.insert(() => r, ":first-child"), d.attr("class", "basic label-container").attr("style", p(h));
1626
+ } 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);
1627
+ return E(t, d), t.calcIntersect = function(e, t) {
1628
+ return q.rect(e, t);
1629
+ }, t.intersect = function(e) {
1630
+ return q.rect(t, e);
1631
+ }, a;
1632
+ }
1633
+ n(ze, "drawRect");
1634
+ async function Be(e, t) {
1635
+ var n, r;
1636
+ let { shapeSvg: i, bbox: a, label: o } = await w(e, t, "label"), s = i.insert("rect", ":first-child");
1637
+ return s.attr("width", .1).attr("height", .1), i.attr("class", "label edgeLabel"), o.attr("transform", `translate(${-(a.width / 2) - (a.x - ((n = a.left) == null ? 0 : n))}, ${-(a.height / 2) - (a.y - ((r = a.top) == null ? 0 : r))})`), E(t, s), t.intersect = function(e) {
1638
+ return q.rect(t, e);
1639
+ }, i;
1640
+ }
1641
+ n(Be, "labelRect");
1642
+ async function Ve(e, t) {
1643
+ var n, r, i;
1644
+ let { labelStyles: a, nodeStyles: o } = b(t);
1645
+ t.labelStyle = a;
1646
+ let s = (n = t.padding) == null ? 0 : n, c = s, l = t.look === "neo" ? s * 2 : s, { shapeSvg: u, bbox: d } = await w(e, t, D(t)), f = ((r = t == null ? void 0 : t.height) == null ? d.height : r) + c, p = ((i = t == null ? void 0 : t.width) == null ? d.width : i) + l, m = [
1647
+ {
1648
+ x: 0,
1649
+ y: 0
1650
+ },
1651
+ {
1652
+ x: p + 3 * f / 6,
1653
+ y: 0
1654
+ },
1655
+ {
1656
+ x: p,
1657
+ y: -f
1658
+ },
1659
+ {
1660
+ x: -(3 * f) / 6,
1661
+ y: -f
1662
+ }
1663
+ ], h, { cssStyles: g } = t;
1664
+ if (t.look === "handDrawn") {
1665
+ let e = C.svg(u), n = y(t, {}), r = O(m), i = e.path(r, n);
1666
+ h = u.insert(() => i, ":first-child").attr("transform", `translate(${-p / 2}, ${f / 2})`), g && h.attr("style", g);
1667
+ } else h = Y(u, p, f, m);
1668
+ return o && h.attr("style", o), t.width = p, t.height = f, E(t, h), t.intersect = function(e) {
1669
+ return q.polygon(t, m, e);
1670
+ }, u;
1671
+ }
1672
+ n(Ve, "lean_left");
1673
+ async function He(e, t) {
1674
+ var n, r, i;
1675
+ let { labelStyles: a, nodeStyles: o } = b(t);
1676
+ t.labelStyle = a;
1677
+ let s = (n = t.padding) == null ? 0 : n, c = s, l = t.look === "neo" ? s * 2 : s, { shapeSvg: u, bbox: d } = await w(e, t, D(t)), f = ((r = t == null ? void 0 : t.height) == null ? d.height : r) + c, p = ((i = t == null ? void 0 : t.width) == null ? d.width : i) + l, m = [
1678
+ {
1679
+ x: -3 * f / 6,
1680
+ y: 0
1681
+ },
1682
+ {
1683
+ x: p,
1684
+ y: 0
1685
+ },
1686
+ {
1687
+ x: p + 3 * f / 6,
1688
+ y: -f
1689
+ },
1690
+ {
1691
+ x: 0,
1692
+ y: -f
1693
+ }
1694
+ ], h, { cssStyles: g } = t;
1695
+ if (t.look === "handDrawn") {
1696
+ let e = C.svg(u), n = y(t, {}), r = O(m), i = e.path(r, n);
1697
+ h = u.insert(() => i, ":first-child").attr("transform", `translate(${-p / 2}, ${f / 2})`), g && h.attr("style", g);
1698
+ } else h = Y(u, p, f, m);
1699
+ return o && h.attr("style", o), t.width = p, t.height = f, E(t, h), t.intersect = function(e) {
1700
+ return q.polygon(t, m, e);
1701
+ }, u;
1702
+ }
1703
+ n(He, "lean_right");
1704
+ function Ue(e, n) {
1705
+ var r, i, a;
1706
+ let { labelStyles: o, nodeStyles: s } = b(n);
1707
+ n.label = "", n.labelStyle = o;
1708
+ let c = e.insert("g").attr("class", D(n)).attr("id", (r = n.domId) == null ? n.id : r), { cssStyles: l } = n, u = Math.max(35, (i = n == null ? void 0 : n.width) == null ? 0 : i), d = Math.max(35, (a = n == null ? void 0 : n.height) == null ? 0 : a), f = [
1709
+ {
1710
+ x: u,
1711
+ y: 0
1712
+ },
1713
+ {
1714
+ x: 0,
1715
+ y: d + 7 / 2
1716
+ },
1717
+ {
1718
+ x: u - 14,
1719
+ y: d + 7 / 2
1720
+ },
1721
+ {
1722
+ x: 0,
1723
+ y: 2 * d
1724
+ },
1725
+ {
1726
+ x: u,
1727
+ y: d - 7 / 2
1728
+ },
1729
+ {
1730
+ x: 14,
1731
+ y: d - 7 / 2
1732
+ }
1733
+ ], p = C.svg(c), m = y(n, {});
1734
+ n.look !== "handDrawn" && (m.roughness = 0, m.fillStyle = "solid");
1735
+ let h = O(f), g = p.path(h, m), _ = c.insert(() => g, ":first-child");
1736
+ return _.attr("class", "outer-path"), l && n.look !== "handDrawn" && _.selectAll("path").attr("style", l), s && n.look !== "handDrawn" && _.selectAll("path").attr("style", s), _.attr("transform", `translate(-${u / 2},${-d})`), E(n, _), n.intersect = function(e) {
1737
+ return t.info("lightningBolt intersect", n, e), q.polygon(n, f, e);
1738
+ }, c;
1739
+ }
1740
+ n(Ue, "lightningBolt");
1741
+ var We = /* @__PURE__ */ n((e, t, n, r, i, a, o) => [
1742
+ `M${e},${t + a}`,
1743
+ `a${i},${a} 0,0,0 ${n},0`,
1744
+ `a${i},${a} 0,0,0 ${-n},0`,
1745
+ `l0,${r}`,
1746
+ `a${i},${a} 0,0,0 ${n},0`,
1747
+ `l0,${-r}`,
1748
+ `M${e},${t + a + o}`,
1749
+ `a${i},${a} 0,0,0 ${n},0`
1750
+ ].join(" "), "createCylinderPathD"), Ge = /* @__PURE__ */ n((e, t, n, r, i, a, o) => [
1751
+ `M${e},${t + a}`,
1752
+ `M${e + n},${t + a}`,
1753
+ `a${i},${a} 0,0,0 ${-n},0`,
1754
+ `l0,${r}`,
1755
+ `a${i},${a} 0,0,0 ${n},0`,
1756
+ `l0,${-r}`,
1757
+ `M${e},${t + a + o}`,
1758
+ `a${i},${a} 0,0,0 ${n},0`
1759
+ ].join(" "), "createOuterCylinderPathD"), Ke = /* @__PURE__ */ n((e, t, n, r, i, a) => [`M${e - n / 2},${-r / 2}`, `a${i},${a} 0,0,0 ${n},0`].join(" "), "createInnerCylinderPathD"), qe = 10, Je = 10;
1760
+ async function Ye(e, t) {
1761
+ var n, r, i;
1762
+ let { labelStyles: a, nodeStyles: o } = b(t);
1763
+ t.labelStyle = a;
1764
+ let s = (n = t.padding) == null ? 0 : n, c = t.look === "neo" ? 16 : s, l = t.look === "neo" ? 24 : s;
1765
+ if (t.width || t.height) {
1766
+ var u, d, f;
1767
+ let e = (u = t.width) == null ? 0 : u;
1768
+ t.width = ((d = t.width) == null ? 0 : d) - c, t.width < Je && (t.width = Je);
1769
+ let n = e / 2 / (2.5 + e / 50);
1770
+ t.height = ((f = t.height) == null ? 0 : f) - l - n * 3, t.height < qe && (t.height = qe);
1771
+ }
1772
+ let { shapeSvg: m, bbox: h, label: g } = await w(e, t, D(t)), _ = (t != null && t.width ? t == null ? void 0 : t.width : h.width) + c * 2, v = _ / 2, x = v / (2.5 + _ / 50), S = (t != null && t.height ? t == null ? void 0 : t.height : h.height) + x + l * 2, T = S * .1, O, { cssStyles: k } = t;
1773
+ if (t.look === "handDrawn") {
1774
+ let e = C.svg(m), n = Ge(0, 0, _, S, v, x, T), r = Ke(0, x, _, S, v, x), i = y(t, {}), a = e.path(n, i), o = e.path(r, i);
1775
+ m.insert(() => o, ":first-child").attr("class", "line"), O = m.insert(() => a, ":first-child"), O.attr("class", "basic label-container"), k && O.attr("style", k);
1776
+ } else {
1777
+ let e = We(0, 0, _, S, v, x, T);
1778
+ O = m.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container outer-path").attr("style", p(k)).attr("style", o);
1779
+ }
1780
+ return O.attr("label-offset-y", x), O.attr("transform", `translate(${-_ / 2}, ${-(S / 2 + x)})`), E(t, O), g.attr("transform", `translate(${-(h.width / 2) - (h.x - ((r = h.left) == null ? 0 : r))}, ${-(h.height / 2) + x - (h.y - ((i = h.top) == null ? 0 : i))})`), t.intersect = function(e) {
1781
+ var n, r, i, a, o;
1782
+ let s = q.rect(t, e), c = s.x - ((n = t.x) == null ? 0 : n);
1783
+ if (v != 0 && (Math.abs(c) < ((r = t.width) == null ? 0 : r) / 2 || Math.abs(c) == ((i = t.width) == null ? 0 : i) / 2 && Math.abs(s.y - ((a = t.y) == null ? 0 : a)) > ((o = t.height) == null ? 0 : o) / 2 - x)) {
1784
+ var l;
1785
+ let n = x * x * (1 - c * c / (v * v));
1786
+ n > 0 && (n = Math.sqrt(n)), n = x - n, e.y - ((l = t.y) == null ? 0 : l) > 0 && (n = -n), s.y += n;
1787
+ }
1788
+ return s;
1789
+ }, m;
1790
+ }
1791
+ n(Ye, "linedCylinder");
1792
+ async function Xe(e, t) {
1793
+ var n, r, i, a, o;
1794
+ let { labelStyles: s, nodeStyles: c } = b(t);
1795
+ t.labelStyle = s;
1796
+ let l = (n = t.padding) == null ? 0 : n, u = t.look === "neo" ? 16 : l, d = t.look === "neo" ? 12 : l;
1797
+ if (t.width || t.height) {
1798
+ var f;
1799
+ let e = t.width;
1800
+ t.width = (e == null ? 0 : e) * 10 / 11 - u * 2, t.width < 10 && (t.width = 10), t.height = ((f = t == null ? void 0 : t.height) == null ? 0 : f) - d * 2, t.height < 10 && (t.height = 10);
1801
+ }
1802
+ let { shapeSvg: p, bbox: m, label: h } = await w(e, t, D(t)), g = (t != null && t.width ? t == null ? void 0 : t.width : m.width) + (u == null ? 0 : u) * 2, _ = (t != null && t.height ? t == null ? void 0 : t.height : m.height) + (d == null ? 0 : d) * 2, v = t.look === "neo" ? _ / 4 : _ / 8, x = _ + v, { cssStyles: S } = t, T = C.svg(p), O = y(t, {});
1803
+ t.look !== "handDrawn" && (O.roughness = 0, O.fillStyle = "solid");
1804
+ let A = [
1805
+ {
1806
+ x: -g / 2 - g / 2 * .1,
1807
+ y: -x / 2
1808
+ },
1809
+ {
1810
+ x: -g / 2 - g / 2 * .1,
1811
+ y: x / 2
1812
+ },
1813
+ ...k(-g / 2 - g / 2 * .1, x / 2, g / 2 + g / 2 * .1, x / 2, v, .8),
1814
+ {
1815
+ x: g / 2 + g / 2 * .1,
1816
+ y: -x / 2
1817
+ },
1818
+ {
1819
+ x: -g / 2 - g / 2 * .1,
1820
+ y: -x / 2
1821
+ },
1822
+ {
1823
+ x: -g / 2,
1824
+ y: -x / 2
1825
+ },
1826
+ {
1827
+ x: -g / 2,
1828
+ y: x / 2 * 1.1
1829
+ },
1830
+ {
1831
+ x: -g / 2,
1832
+ y: -x / 2
1833
+ }
1834
+ ], j = T.polygon(A.map((e) => [e.x, e.y]), O), M = p.insert(() => j, ":first-child");
1835
+ return M.attr("class", "basic label-container outer-path"), S && t.look !== "handDrawn" && M.selectAll("path").attr("style", S), c && t.look !== "handDrawn" && M.selectAll("path").attr("style", c), M.attr("transform", `translate(0,${-v / 2})`), h.attr("transform", `translate(${-g / 2 + ((r = t.padding) == null ? 0 : r) + g / 2 * .1 / 2 - (m.x - ((i = m.left) == null ? 0 : i))},${-_ / 2 + ((a = t.padding) == null ? 0 : a) - v / 2 - (m.y - ((o = m.top) == null ? 0 : o))})`), E(t, M), t.intersect = function(e) {
1836
+ return q.polygon(t, A, e);
1837
+ }, p;
1838
+ }
1839
+ n(Xe, "linedWaveEdgedRect");
1840
+ async function Ze(e, t) {
1841
+ var n, r, i;
1842
+ let { labelStyles: a, nodeStyles: o } = b(t);
1843
+ t.labelStyle = a;
1844
+ let s = (n = t.padding) == null ? 0 : n, c = t.look === "neo" ? 16 : s, l = t.look === "neo" ? 12 : s, u = t.look === "neo" ? 10 : 5;
1845
+ if (t.width || t.height) {
1846
+ var d, f;
1847
+ t.width = Math.max(((d = t == null ? void 0 : t.width) == null ? 0 : d) - c * 2 - 2 * u, 10), t.height = Math.max(((f = t == null ? void 0 : t.height) == null ? 0 : f) - l * 2 - 2 * u, 10);
1848
+ }
1849
+ let { shapeSvg: p, bbox: m, label: h } = await w(e, t, D(t)), g = (t != null && t.width ? t == null ? void 0 : t.width : m.width) + c * 2 + 2 * u, _ = (t != null && t.height ? t == null ? void 0 : t.height : m.height) + l * 2 + 2 * u, v = g - 2 * u, x = _ - 2 * u, S = -v / 2, T = -x / 2, { cssStyles: k } = t, A = C.svg(p), M = y(t, {}), N = [
1850
+ {
1851
+ x: S - u,
1852
+ y: T + u
1853
+ },
1854
+ {
1855
+ x: S - u,
1856
+ y: T + x + u
1857
+ },
1858
+ {
1859
+ x: S + v - u,
1860
+ y: T + x + u
1861
+ },
1862
+ {
1863
+ x: S + v - u,
1864
+ y: T + x
1865
+ },
1866
+ {
1867
+ x: S + v,
1868
+ y: T + x
1869
+ },
1870
+ {
1871
+ x: S + v,
1872
+ y: T + x - u
1873
+ },
1874
+ {
1875
+ x: S + v + u,
1876
+ y: T + x - u
1877
+ },
1878
+ {
1879
+ x: S + v + u,
1880
+ y: T - u
1881
+ },
1882
+ {
1883
+ x: S + u,
1884
+ y: T - u
1885
+ },
1886
+ {
1887
+ x: S + u,
1888
+ y: T
1889
+ },
1890
+ {
1891
+ x: S,
1892
+ y: T
1893
+ },
1894
+ {
1895
+ x: S,
1896
+ y: T + u
1897
+ }
1898
+ ], P = [
1899
+ {
1900
+ x: S,
1901
+ y: T + u
1902
+ },
1903
+ {
1904
+ x: S + v - u,
1905
+ y: T + u
1906
+ },
1907
+ {
1908
+ x: S + v - u,
1909
+ y: T + x
1910
+ },
1911
+ {
1912
+ x: S + v,
1913
+ y: T + x
1914
+ },
1915
+ {
1916
+ x: S + v,
1917
+ y: T
1918
+ },
1919
+ {
1920
+ x: S,
1921
+ y: T
1922
+ }
1923
+ ];
1924
+ t.look !== "handDrawn" && (M.roughness = 0, M.fillStyle = "solid");
1925
+ let F = O(N), I = A.path(F, M), L = O(P), R = A.path(L, M);
1926
+ t.look !== "handDrawn" && (I = j(I), R = j(R));
1927
+ let z = p.insert("g", ":first-child");
1928
+ return z.insert(() => I), z.insert(() => R), z.attr("class", "basic label-container outer-path"), k && t.look !== "handDrawn" && z.selectAll("path").attr("style", k), o && t.look !== "handDrawn" && z.selectAll("path").attr("style", o), h.attr("transform", `translate(${-(m.width / 2) - u - (m.x - ((r = m.left) == null ? 0 : r))}, ${-(m.height / 2) + u - (m.y - ((i = m.top) == null ? 0 : i))})`), E(t, z), t.intersect = function(e) {
1929
+ return q.polygon(t, N, e);
1930
+ }, p;
1931
+ }
1932
+ n(Ze, "multiRect");
1933
+ async function Qe(e, t) {
1934
+ var n, r, i, a, o;
1935
+ let { labelStyles: s, nodeStyles: c } = b(t);
1936
+ t.labelStyle = s;
1937
+ let { shapeSvg: l, bbox: u, label: d } = await w(e, t, D(t)), f = (n = t.padding) == null ? 0 : n, p = t.look === "neo" ? 16 : f, m = t.look === "neo" ? 12 : f, h = !0;
1938
+ if (t.width || t.height) {
1939
+ var g, _;
1940
+ h = !1, t.width = ((g = t == null ? void 0 : t.width) == null ? 0 : g) - p * 2, t.height = ((_ = t == null ? void 0 : t.height) == null ? 0 : _) - m * 3;
1941
+ }
1942
+ let v = Math.max(u.width, (r = t == null ? void 0 : t.width) == null ? 0 : r) + p * 2, x = Math.max(u.height, (i = t == null ? void 0 : t.height) == null ? 0 : i) + m * 3, S = t.look === "neo" ? x / 4 : x / 8, T = x + (h ? S / 2 : -S / 2), A = -v / 2, j = -T / 2, { cssStyles: M } = t, N = k(A - 10, j + T + 10, A + v - 10, j + T + 10, S, .8), P = N == null ? void 0 : N[N.length - 1], F = [
1943
+ {
1944
+ x: A - 10,
1945
+ y: j + 10
1946
+ },
1947
+ {
1948
+ x: A - 10,
1949
+ y: j + T + 10
1950
+ },
1951
+ ...N,
1952
+ {
1953
+ x: A + v - 10,
1954
+ y: P.y - 10
1955
+ },
1956
+ {
1957
+ x: A + v,
1958
+ y: P.y - 10
1959
+ },
1960
+ {
1961
+ x: A + v,
1962
+ y: P.y - 20
1963
+ },
1964
+ {
1965
+ x: A + v + 10,
1966
+ y: P.y - 20
1967
+ },
1968
+ {
1969
+ x: A + v + 10,
1970
+ y: j - 10
1971
+ },
1972
+ {
1973
+ x: A + 10,
1974
+ y: j - 10
1975
+ },
1976
+ {
1977
+ x: A + 10,
1978
+ y: j
1979
+ },
1980
+ {
1981
+ x: A,
1982
+ y: j
1983
+ },
1984
+ {
1985
+ x: A,
1986
+ y: j + 10
1987
+ }
1988
+ ], I = [
1989
+ {
1990
+ x: A,
1991
+ y: j + 10
1992
+ },
1993
+ {
1994
+ x: A + v - 10,
1995
+ y: j + 10
1996
+ },
1997
+ {
1998
+ x: A + v - 10,
1999
+ y: P.y - 10
2000
+ },
2001
+ {
2002
+ x: A + v,
2003
+ y: P.y - 10
2004
+ },
2005
+ {
2006
+ x: A + v,
2007
+ y: j
2008
+ },
2009
+ {
2010
+ x: A,
2011
+ y: j
2012
+ }
2013
+ ], L = C.svg(l), R = y(t, {});
2014
+ t.look !== "handDrawn" && (R.roughness = 0, R.fillStyle = "solid");
2015
+ let z = O(F), B = L.path(z, R), V = O(I), H = L.path(V, R), U = l.insert(() => B, ":first-child");
2016
+ return U.insert(() => H), U.attr("class", "basic label-container outer-path"), M && t.look !== "handDrawn" && U.selectAll("path").attr("style", M), c && t.look !== "handDrawn" && U.selectAll("path").attr("style", c), U.attr("transform", `translate(0,${-S / 2})`), d.attr("transform", `translate(${-(u.width / 2) - 10 - (u.x - ((a = u.left) == null ? 0 : a))}, ${-(u.height / 2) + 10 - S / 2 - (u.y - ((o = u.top) == null ? 0 : o))})`), E(t, U), t.intersect = function(e) {
2017
+ return q.polygon(t, F, e);
2018
+ }, l;
2019
+ }
2020
+ n(Qe, "multiWaveEdgedRectangle");
2021
+ async function $e(e, t, { config: { themeVariables: n } }) {
2022
+ var r, i, a, o, s, c;
2023
+ let { labelStyles: l, nodeStyles: f } = b(t);
2024
+ t.labelStyle = l, t.useHtmlLabels || u(d()) || (t.centerLabel = !0);
2025
+ let { shapeSvg: p, bbox: m, label: h } = await w(e, t, D(t)), g = Math.max(m.width + ((r = t.padding) == null ? 0 : r) * 2, (i = t == null ? void 0 : t.width) == null ? 0 : i), _ = Math.max(m.height + ((a = t.padding) == null ? 0 : a) * 2, (o = t == null ? void 0 : t.height) == null ? 0 : o), v = -g / 2, x = -_ / 2, { cssStyles: S } = t, T = C.svg(p), O = y(t, {
2026
+ fill: n.noteBkgColor,
2027
+ stroke: n.noteBorderColor
2028
+ });
2029
+ t.look !== "handDrawn" && (O.roughness = 0, O.fillStyle = "solid");
2030
+ let k = T.rectangle(v, x, g, _, O), A = p.insert(() => k, ":first-child");
2031
+ return A.attr("class", "basic label-container outer-path"), h.attr("class", "label noteLabel"), S && t.look !== "handDrawn" && A.selectAll("path").attr("style", S), f && t.look !== "handDrawn" && A.selectAll("path").attr("style", f), h.attr("transform", `translate(${-m.width / 2 - (m.x - ((s = m.left) == null ? 0 : s))}, ${-(m.height / 2) - (m.y - ((c = m.top) == null ? 0 : c))})`), E(t, A), t.intersect = function(e) {
2032
+ return q.rect(t, e);
2033
+ }, p;
2034
+ }
2035
+ n($e, "note");
2036
+ var et = /* @__PURE__ */ n((e, t, n) => [
2037
+ `M${e + n / 2},${t}`,
2038
+ `L${e + n},${t - n / 2}`,
2039
+ `L${e + n / 2},${t - n}`,
2040
+ `L${e},${t - n / 2}`,
2041
+ "Z"
2042
+ ].join(" "), "createDecisionBoxPathD");
2043
+ async function tt(e, t) {
2044
+ var n, r;
2045
+ let { labelStyles: i, nodeStyles: a } = b(t);
2046
+ t.labelStyle = i;
2047
+ let { shapeSvg: o, bbox: s } = await w(e, t, D(t)), c = s.width + ((n = t.padding) == null ? 0 : n) + (s.height + ((r = t.padding) == null ? 0 : r)), l = .5, u = [
2048
+ {
2049
+ x: c / 2,
2050
+ y: 0
2051
+ },
2052
+ {
2053
+ x: c,
2054
+ y: -c / 2
2055
+ },
2056
+ {
2057
+ x: c / 2,
2058
+ y: -c
2059
+ },
2060
+ {
2061
+ x: 0,
2062
+ y: -c / 2
2063
+ }
2064
+ ], d, { cssStyles: f } = t;
2065
+ if (t.look === "handDrawn") {
2066
+ let e = C.svg(o), n = y(t, {}), r = et(0, 0, c), i = e.path(r, n);
2067
+ d = o.insert(() => i, ":first-child").attr("transform", `translate(${-c / 2 + l}, ${c / 2})`), f && d.attr("style", f);
2068
+ } else d = Y(o, c, c, u), d.attr("transform", `translate(${-c / 2 + l}, ${c / 2})`);
2069
+ return a && d.attr("style", a), E(t, d), t.calcIntersect = function(e, t) {
2070
+ let n = e.width, r = [
2071
+ {
2072
+ x: n / 2,
2073
+ y: 0
2074
+ },
2075
+ {
2076
+ x: n,
2077
+ y: -n / 2
2078
+ },
2079
+ {
2080
+ x: n / 2,
2081
+ y: -n
2082
+ },
2083
+ {
2084
+ x: 0,
2085
+ y: -n / 2
2086
+ }
2087
+ ], i = q.polygon(e, r, t);
2088
+ return {
2089
+ x: i.x - .5,
2090
+ y: i.y - .5
2091
+ };
2092
+ }, t.intersect = function(e) {
2093
+ return this.calcIntersect(t, e);
2094
+ }, o;
2095
+ }
2096
+ n(tt, "question");
2097
+ async function nt(e, t) {
2098
+ var n, r, i, a, o;
2099
+ let { labelStyles: s, nodeStyles: c } = b(t);
2100
+ t.labelStyle = s;
2101
+ let l = (n = t.padding) == null ? 0 : n, u = t.look === "neo" ? 21 : l == null ? 0 : l, d = t.look === "neo" ? 12 : l == null ? 0 : l, { shapeSvg: f, bbox: p, label: m } = await w(e, t, D(t)), h = ((r = t == null ? void 0 : t.width) == null ? p.width : r) + (t.look === "neo" ? u * 2 : u), g = ((i = t == null ? void 0 : t.height) == null ? p.height : i) + (t.look === "neo" ? d * 2 : d), _ = -h / 2, v = -g / 2, x = v / 2, S = [
2102
+ {
2103
+ x: _ + x,
2104
+ y: v
2105
+ },
2106
+ {
2107
+ x: _,
2108
+ y: 0
2109
+ },
2110
+ {
2111
+ x: _ + x,
2112
+ y: -v
2113
+ },
2114
+ {
2115
+ x: -_,
2116
+ y: -v
2117
+ },
2118
+ {
2119
+ x: -_,
2120
+ y: v
2121
+ }
2122
+ ], { cssStyles: T } = t, k = C.svg(f), A = y(t, {});
2123
+ t.look !== "handDrawn" && (A.roughness = 0, A.fillStyle = "solid");
2124
+ let j = O(S), M = k.path(j, A), N = f.insert(() => M, ":first-child");
2125
+ return N.attr("class", "basic label-container outer-path"), T && t.look !== "handDrawn" && N.selectAll("path").attr("style", T), c && t.look !== "handDrawn" && N.selectAll("path").attr("style", c), N.attr("transform", `translate(${-x / 2},0)`), m.attr("transform", `translate(${-x / 2 - p.width / 2 - (p.x - ((a = p.left) == null ? 0 : a))}, ${-(p.height / 2) - (p.y - ((o = p.top) == null ? 0 : o))})`), E(t, N), t.intersect = function(e) {
2126
+ return q.polygon(t, S, e);
2127
+ }, f;
2128
+ }
2129
+ n(nt, "rect_left_inv_arrow");
2130
+ async function rt(e, n) {
2131
+ let { labelStyles: i, nodeStyles: a } = b(n);
2132
+ n.labelStyle = i;
2133
+ let s;
2134
+ s = n.cssClasses ? "node " + n.cssClasses : "node default";
2135
+ let c = e.insert("g").attr("class", s).attr("id", n.domId || n.id), l = c.insert("g"), d = c.insert("g").attr("class", "label").attr("style", a), f = n.description, p = n.label, m = await N(d, p, n.labelStyle, !0, !0), h = {
2136
+ width: 0,
2137
+ height: 0
2138
+ };
2139
+ if (u(o())) {
2140
+ let e = m.children[0], t = r(m);
2141
+ h = e.getBoundingClientRect(), t.attr("width", h.width), t.attr("height", h.height);
2142
+ }
2143
+ t.info("Text 2", f);
2144
+ let g = f || [], _ = m.getBBox(), v = await N(d, Array.isArray(g) ? g.join("<br/>") : g, n.labelStyle, !0, !0), x = v.children[0], S = r(v);
2145
+ h = x.getBoundingClientRect(), S.attr("width", h.width), S.attr("height", h.height);
2146
+ let w = (n.padding || 0) / 2;
2147
+ r(v).attr("transform", "translate( " + (h.width > _.width ? 0 : (_.width - h.width) / 2) + ", " + (_.height + w + 5) + ")"), r(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) + ")");
2148
+ let T = h.width + (n.padding || 0), D = h.height + (n.padding || 0), O = -h.width / 2 - w, k = -h.height / 2 - w, A, j;
2149
+ if (n.look === "handDrawn") {
2150
+ let e = C.svg(c), r = y(n, {}), i = e.path(P(O, k, T, D, n.rx || 0), r), a = e.line(-h.width / 2 - w, -h.height / 2 - w + _.height + w, h.width / 2 + w, -h.height / 2 - w + _.height + w, r);
2151
+ j = c.insert(() => (t.debug("Rough node insert CXC", i), a), ":first-child"), A = c.insert(() => (t.debug("Rough node insert CXC", i), i), ":first-child");
2152
+ } else A = l.insert("rect", ":first-child"), j = l.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 + (n.padding || 0)).attr("height", h.height + (n.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);
2153
+ return E(n, A), n.intersect = function(e) {
2154
+ return q.rect(n, e);
2155
+ }, c;
2156
+ }
2157
+ n(rt, "rectWithTitle");
2158
+ async function it(e, t, { config: { themeVariables: n } }) {
2159
+ var r, i, a;
2160
+ let o = (r = n == null ? void 0 : n.radius) == null ? 5 : r;
2161
+ return ze(e, t, {
2162
+ rx: o,
2163
+ ry: o,
2164
+ classes: "",
2165
+ labelPaddingX: ((i = t == null ? void 0 : t.padding) == null ? 0 : i) * 1,
2166
+ labelPaddingY: ((a = t == null ? void 0 : t.padding) == null ? 0 : a) * 1
2167
+ });
2168
+ }
2169
+ n(it, "roundedRect");
2170
+ var at = 8;
2171
+ async function ot(e, t) {
2172
+ var n, r, i, a, o, s;
2173
+ let { labelStyles: c, nodeStyles: l } = b(t);
2174
+ t.labelStyle = c;
2175
+ let u = t.look === "neo" ? 16 : (n = t.padding) == null ? 0 : n, d = t.look === "neo" ? 12 : (r = t.padding) == null ? 0 : r, { shapeSvg: f, bbox: m, label: h } = await w(e, t, D(t)), g = ((i = t == null ? void 0 : t.width) == null ? m.width : i) + u * 2 + (t.look === "neo" ? at : at * 2), _ = ((a = t == null ? void 0 : t.height) == null ? m.height : a) + d * 2, v = g - at, x = _, S = at - g / 2, T = -_ / 2, { cssStyles: O } = t, k = C.svg(f), A = y(t, {});
2176
+ t.look !== "handDrawn" && (A.roughness = 0, A.fillStyle = "solid");
2177
+ let j = [
2178
+ {
2179
+ x: S,
2180
+ y: T
2181
+ },
2182
+ {
2183
+ x: S + v,
2184
+ y: T
2185
+ },
2186
+ {
2187
+ x: S + v,
2188
+ y: T + x
2189
+ },
2190
+ {
2191
+ x: S - at,
2192
+ y: T + x
2193
+ },
2194
+ {
2195
+ x: S - at,
2196
+ y: T
2197
+ },
2198
+ {
2199
+ x: S,
2200
+ y: T
2201
+ },
2202
+ {
2203
+ x: S,
2204
+ y: T + x
2205
+ }
2206
+ ], M = k.polygon(j.map((e) => [e.x, e.y]), A), N = f.insert(() => M, ":first-child");
2207
+ return N.attr("class", "basic label-container outer-path").attr("style", p(O)), l && t.look !== "handDrawn" && N.selectAll("path").attr("style", l), O && t.look !== "handDrawn" && N.selectAll("path").attr("style", l), h.attr("transform", `translate(${at / 2 - m.width / 2 - (m.x - ((o = m.left) == null ? 0 : o))}, ${-(m.height / 2) - (m.y - ((s = m.top) == null ? 0 : s))})`), E(t, N), t.intersect = function(e) {
2208
+ return q.rect(t, e);
2209
+ }, f;
2210
+ }
2211
+ n(ot, "shadedProcess");
2212
+ async function st(e, t) {
2213
+ var n, r, i, a, o;
2214
+ let { labelStyles: s, nodeStyles: c } = b(t);
2215
+ t.labelStyle = s;
2216
+ let l = (n = t.padding) == null ? 0 : n, u = t.look === "neo" ? 16 : l, d = t.look === "neo" ? 12 : l;
2217
+ if (t.width || t.height) {
2218
+ var f, p;
2219
+ t.width = Math.max(((f = t == null ? void 0 : t.width) == null ? 0 : f) - u * 2, 10), t.height = Math.max(((p = t == null ? void 0 : t.height) == null ? 0 : p) / 1.5 - d * 2, 10);
2220
+ }
2221
+ let { shapeSvg: m, bbox: h, label: g } = await w(e, t, D(t)), _ = (t != null && t.width ? t == null ? void 0 : t.width : h.width) + u * 2, v = ((t != null && t.height ? t == null ? void 0 : t.height : h.height) + d * 2) * 1.5, x = _, S = v / 1.5, T = -x / 2, k = -S / 2, { cssStyles: A } = t, j = C.svg(m), M = y(t, {});
2222
+ t.look !== "handDrawn" && (M.roughness = 0, M.fillStyle = "solid");
2223
+ let N = [
2224
+ {
2225
+ x: T,
2226
+ y: k
2227
+ },
2228
+ {
2229
+ x: T,
2230
+ y: k + S
2231
+ },
2232
+ {
2233
+ x: T + x,
2234
+ y: k + S
2235
+ },
2236
+ {
2237
+ x: T + x,
2238
+ y: k - S / 2
2239
+ }
2240
+ ], P = O(N), F = j.path(P, M), I = m.insert(() => F, ":first-child");
2241
+ return I.attr("class", "basic label-container outer-path"), A && t.look !== "handDrawn" && I.selectChildren("path").attr("style", A), c && t.look !== "handDrawn" && I.selectChildren("path").attr("style", c), I.attr("transform", `translate(0, ${S / 4})`), g.attr("transform", `translate(${-x / 2 + ((r = t.padding) == null ? 0 : r) - (h.x - ((i = h.left) == null ? 0 : i))}, ${-S / 4 + ((a = t.padding) == null ? 0 : a) - (h.y - ((o = h.top) == null ? 0 : o))})`), E(t, I), t.intersect = function(e) {
2242
+ return q.polygon(t, N, e);
2243
+ }, m;
2244
+ }
2245
+ n(st, "slopedRect");
2246
+ async function ct(e, t) {
2247
+ var n, r;
2248
+ let i = (n = t.padding) == null ? 0 : n, a = t.look === "neo" ? 16 : i * 2, o = t.look === "neo" ? 12 : i;
2249
+ return ze(e, t, {
2250
+ rx: 0,
2251
+ ry: 0,
2252
+ classes: "",
2253
+ labelPaddingX: (r = t.labelPaddingX) == null ? a : r,
2254
+ labelPaddingY: o
2255
+ });
2256
+ }
2257
+ n(ct, "squareRect");
2258
+ async function lt(e, t) {
2259
+ var n;
2260
+ let { labelStyles: r, nodeStyles: i } = b(t);
2261
+ t.labelStyle = r;
2262
+ let a = (n = t.padding) == null ? 0 : n, o = t.look === "neo" ? 20 : a, s = t.look === "neo" ? 12 : a, { shapeSvg: c, bbox: l } = await w(e, t, D(t)), u = l.height + (t.look === "neo" ? s * 2 : s), d = l.width + u / 4 + (t.look === "neo" ? o * 2 : o), f = u / 2, { cssStyles: p } = t, m = C.svg(c), h = y(t, {});
2263
+ t.look !== "handDrawn" && (h.roughness = 0, h.fillStyle = "solid");
2264
+ let g = [
2265
+ {
2266
+ x: -d / 2 + f,
2267
+ y: -u / 2
2268
+ },
2269
+ {
2270
+ x: d / 2 - f,
2271
+ y: -u / 2
2272
+ },
2273
+ ...A(-d / 2 + f, 0, f, 50, 90, 270),
2274
+ {
2275
+ x: d / 2 - f,
2276
+ y: u / 2
2277
+ },
2278
+ ...A(d / 2 - f, 0, f, 50, 270, 450)
2279
+ ], _ = O(g), v = m.path(_, h), x = c.insert(() => v, ":first-child");
2280
+ return x.attr("class", "basic label-container outer-path"), p && t.look !== "handDrawn" && x.selectChildren("path").attr("style", p), i && t.look !== "handDrawn" && x.selectChildren("path").attr("style", i), E(t, x), t.intersect = function(e) {
2281
+ return q.polygon(t, g, e);
2282
+ }, c;
2283
+ }
2284
+ n(lt, "stadium");
2285
+ async function ut(e, t) {
2286
+ return ze(e, t, {
2287
+ rx: t.look === "neo" ? 3 : 5,
2288
+ ry: t.look === "neo" ? 3 : 5,
2289
+ classes: "flowchart-node"
2290
+ });
2291
+ }
2292
+ n(ut, "state");
2293
+ function dt(t, n, { config: { themeVariables: r } }) {
2294
+ var i, a;
2295
+ let { labelStyles: o, nodeStyles: s } = b(n);
2296
+ n.labelStyle = o;
2297
+ let { cssStyles: c } = n, { lineColor: l, stateBorder: u, nodeBorder: d, nodeShadow: f } = r;
2298
+ if (n.width || n.height) {
2299
+ var p, m;
2300
+ ((p = n.width) == null ? 0 : p) < 14 && (n.width = 14), ((m = n.height) == null ? 0 : m) < 14 && (n.height = 14);
2301
+ }
2302
+ n.width || (n.width = 14), n.height || (n.height = 14);
2303
+ let h = t.insert("g").attr("class", "node default").attr("id", (i = n.domId) == null ? n.id : i), g = C.svg(h), _ = y(n, {});
2304
+ n.look !== "handDrawn" && (_.roughness = 0, _.fillStyle = "solid");
2305
+ let v = g.circle(0, 0, n.width, e(e({}, _), {}, {
2306
+ stroke: l,
2307
+ strokeWidth: 2
2308
+ })), x = u == null ? d : u, S = ((a = n.width) == null ? 0 : a) * 5 / 14, w = g.circle(0, 0, S, e(e({}, _), {}, {
2309
+ fill: x,
2310
+ stroke: x,
2311
+ strokeWidth: 2,
2312
+ fillStyle: "solid"
2313
+ })), T = h.insert(() => v, ":first-child");
2314
+ if (T.insert(() => w), n.look !== "handDrawn" && T.attr("class", "outer-path"), c && T.selectAll("path").attr("style", c), s && T.selectAll("path").attr("style", s), n.width < 25 && f && n.look !== "handDrawn") {
2315
+ var D, O;
2316
+ let e = (D = (O = t.node()) == null || (O = O.ownerSVGElement) == null ? void 0 : O.id) == null ? "" : D, n = e ? `${e}-drop-shadow-small` : "drop-shadow-small";
2317
+ T.attr("style", `filter:url(#${n})`);
2318
+ }
2319
+ return E(n, T), n.intersect = function(e) {
2320
+ var t;
2321
+ return q.circle(n, ((t = n.width) == null ? 0 : t) / 2, e);
2322
+ }, h;
2323
+ }
2324
+ n(dt, "stateEnd");
2325
+ function ft(e, t, { config: { themeVariables: n } }) {
2326
+ let { lineColor: r, nodeShadow: i } = n;
2327
+ if (t.width || t.height) {
2328
+ var a, o;
2329
+ ((a = t.width) == null ? 0 : a) < 14 && (t.width = 14), ((o = t.height) == null ? 0 : o) < 14 && (t.height = 14);
2330
+ }
2331
+ t.width || (t.width = 14), t.height || (t.height = 14);
2332
+ let s = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), c;
2333
+ if (t.look === "handDrawn") {
2334
+ var l, u, d;
2335
+ let e = C.svg(s).circle(0, 0, t.width, x(r));
2336
+ c = s.insert(() => e), c.attr("class", "state-start").attr("r", ((l = t.width) == null ? 7 : l) / 2).attr("width", (u = t.width) == null ? 14 : u).attr("height", (d = t.height) == null ? 14 : d);
2337
+ } else {
2338
+ var f, p, m;
2339
+ c = s.insert("circle", ":first-child"), c.attr("class", "state-start").attr("r", ((f = t.width) == null ? 7 : f) / 2).attr("width", (p = t.width) == null ? 14 : p).attr("height", (m = t.height) == null ? 14 : m);
2340
+ }
2341
+ if (t.width < 25 && i && t.look !== "handDrawn") {
2342
+ var h, g;
2343
+ let t = (h = (g = e.node()) == null || (g = g.ownerSVGElement) == null ? void 0 : g.id) == null ? "" : h, n = t ? `${t}-drop-shadow-small` : "drop-shadow-small";
2344
+ c.attr("style", `filter:url(#${n})`);
2345
+ }
2346
+ return E(t, c), t.intersect = function(e) {
2347
+ var n;
2348
+ return q.circle(t, ((n = t.width) == null ? 7 : n) / 2, e);
2349
+ }, s;
2350
+ }
2351
+ n(ft, "stateStart");
2352
+ var pt = 8;
2353
+ async function mt(e, t) {
2354
+ var n, r, i;
2355
+ let { labelStyles: a, nodeStyles: o } = b(t);
2356
+ t.labelStyle = a;
2357
+ let s = (n = t == null ? void 0 : t.padding) == null ? 8 : n, c = t.look === "neo" ? 28 : s, l = t.look === "neo" ? 12 : s, { shapeSvg: u, bbox: d } = await w(e, t, D(t)), f = ((r = t == null ? void 0 : t.width) == null ? d.width : r) + 2 * pt + c, m = ((i = t == null ? void 0 : t.height) == null ? d.height : i) + l, h = f - 2 * pt, g = m, _ = -f / 2, v = -m / 2, x = [
2358
+ {
2359
+ x: 0,
2360
+ y: 0
2361
+ },
2362
+ {
2363
+ x: h,
2364
+ y: 0
2365
+ },
2366
+ {
2367
+ x: h,
2368
+ y: -g
2369
+ },
2370
+ {
2371
+ x: 0,
2372
+ y: -g
2373
+ },
2374
+ {
2375
+ x: 0,
2376
+ y: 0
2377
+ },
2378
+ {
2379
+ x: -8,
2380
+ y: 0
2381
+ },
2382
+ {
2383
+ x: h + 8,
2384
+ y: 0
2385
+ },
2386
+ {
2387
+ x: h + 8,
2388
+ y: -g
2389
+ },
2390
+ {
2391
+ x: -8,
2392
+ y: -g
2393
+ },
2394
+ {
2395
+ x: -8,
2396
+ y: 0
2397
+ }
2398
+ ];
2399
+ if (t.look === "handDrawn") {
2400
+ let e = C.svg(u), n = y(t, {}), r = e.rectangle(_, v, h + 16, g, n), i = e.line(_ + pt, v, _ + pt, v + g, n), a = e.line(_ + pt + h, v, _ + pt + h, v + g, n);
2401
+ u.insert(() => i, ":first-child"), u.insert(() => a, ":first-child");
2402
+ let o = u.insert(() => r, ":first-child"), { cssStyles: s } = t;
2403
+ o.attr("class", "basic label-container").attr("style", p(s)), E(t, o);
2404
+ } else {
2405
+ let e = Y(u, h, g, x);
2406
+ o && e.attr("style", o), E(t, e);
2407
+ }
2408
+ return t.intersect = function(e) {
2409
+ return q.polygon(t, x, e);
2410
+ }, u;
2411
+ }
2412
+ n(mt, "subroutine");
2413
+ var ht = .2;
2414
+ async function gt(t, n) {
2415
+ var r;
2416
+ let { labelStyles: i, nodeStyles: a } = b(n);
2417
+ n.labelStyle = i;
2418
+ let o = (r = n.padding) == null ? 0 : r, s = n.look === "neo" ? 16 : o, c = n.look === "neo" ? 12 : o;
2419
+ if (n.width || n.height) {
2420
+ var l, u;
2421
+ n.height = Math.max(((l = n == null ? void 0 : n.height) == null ? 0 : l) - c * 2, 10), n.width = Math.max(((u = n == null ? void 0 : n.width) == null ? 0 : u) - s * 2 - ht * (n.height + c * 2), 10);
2422
+ }
2423
+ let { shapeSvg: d, bbox: f } = await w(t, n, D(n)), p = (n != null && n.height ? n == null ? void 0 : n.height : f.height) + c * 2, m = ht * p, h = ht * p, g = (n != null && n.width ? n == null ? void 0 : n.width : f.width) + s * 2 + m - m, _ = p, v = -g / 2, x = -_ / 2, { cssStyles: S } = n, T = C.svg(d), k = y(n, {}), A = [
2424
+ {
2425
+ x: v - m / 2,
2426
+ y: x
2427
+ },
2428
+ {
2429
+ x: v + g + m / 2,
2430
+ y: x
2431
+ },
2432
+ {
2433
+ x: v + g + m / 2,
2434
+ y: x + _
2435
+ },
2436
+ {
2437
+ x: v - m / 2,
2438
+ y: x + _
2439
+ }
2440
+ ], j = [
2441
+ {
2442
+ x: v + g - m / 2,
2443
+ y: x + _
2444
+ },
2445
+ {
2446
+ x: v + g + m / 2,
2447
+ y: x + _
2448
+ },
2449
+ {
2450
+ x: v + g + m / 2,
2451
+ y: x + _ - h
2452
+ }
2453
+ ];
2454
+ n.look !== "handDrawn" && (k.roughness = 0, k.fillStyle = "solid");
2455
+ let M = O(A), N = T.path(M, k), P = O(j), F = T.path(P, e(e({}, k), {}, { fillStyle: "solid" })), I = d.insert(() => F, ":first-child");
2456
+ return I.insert(() => N, ":first-child"), I.attr("class", "basic label-container outer-path"), S && n.look !== "handDrawn" && I.selectAll("path").attr("style", S), a && n.look !== "handDrawn" && I.selectAll("path").attr("style", a), E(n, I), n.intersect = function(e) {
2457
+ return q.polygon(n, A, e);
2458
+ }, d;
2459
+ }
2460
+ n(gt, "taggedRect");
2461
+ async function _t(t, n) {
2462
+ var r, i, a, o, s, c, l, u;
2463
+ let { labelStyles: d, nodeStyles: f } = b(n);
2464
+ n.labelStyle = d;
2465
+ let { shapeSvg: p, bbox: m, label: h } = await w(t, n, D(n)), g = Math.max(m.width + ((r = n.padding) == null ? 0 : r) * 2, (i = n == null ? void 0 : n.width) == null ? 0 : i), _ = Math.max(m.height + ((a = n.padding) == null ? 0 : a) * 2, (o = n == null ? void 0 : n.height) == null ? 0 : o), v = _ / 8, x = .2 * g, S = .2 * _, T = _ + v, { cssStyles: A } = n, j = C.svg(p), M = y(n, {});
2466
+ n.look !== "handDrawn" && (M.roughness = 0, M.fillStyle = "solid");
2467
+ let N = [
2468
+ {
2469
+ x: -g / 2 - g / 2 * .1,
2470
+ y: T / 2
2471
+ },
2472
+ ...k(-g / 2 - g / 2 * .1, T / 2, g / 2 + g / 2 * .1, T / 2, v, .8),
2473
+ {
2474
+ x: g / 2 + g / 2 * .1,
2475
+ y: -T / 2
2476
+ },
2477
+ {
2478
+ x: -g / 2 - g / 2 * .1,
2479
+ y: -T / 2
2480
+ }
2481
+ ], P = -g / 2 + g / 2 * .1, F = -T / 2 - S * .4, I = [
2482
+ {
2483
+ x: P + g - x,
2484
+ y: (F + _) * 1.3
2485
+ },
2486
+ {
2487
+ x: P + g,
2488
+ y: F + _ - S
2489
+ },
2490
+ {
2491
+ x: P + g,
2492
+ y: (F + _) * .9
2493
+ },
2494
+ ...k(P + g, (F + _) * 1.25, P + g - x, (F + _) * 1.3, -_ * .02, .5)
2495
+ ], L = O(N), R = j.path(L, M), z = O(I), B = j.path(z, e(e({}, M), {}, { fillStyle: "solid" })), V = p.insert(() => B, ":first-child");
2496
+ return V.insert(() => R, ":first-child"), V.attr("class", "basic label-container outer-path"), A && n.look !== "handDrawn" && V.selectAll("path").attr("style", A), f && n.look !== "handDrawn" && V.selectAll("path").attr("style", f), V.attr("transform", `translate(0,${-v / 2})`), h.attr("transform", `translate(${-g / 2 + ((s = n.padding) == null ? 0 : s) - (m.x - ((c = m.left) == null ? 0 : c))},${-_ / 2 + ((l = n.padding) == null ? 0 : l) - v / 2 - (m.y - ((u = m.top) == null ? 0 : u))})`), E(n, V), n.intersect = function(e) {
2497
+ return q.polygon(n, N, e);
2498
+ }, p;
2499
+ }
2500
+ n(_t, "taggedWaveEdgedRectangle");
2501
+ async function vt(e, t) {
2502
+ var n, r;
2503
+ let { labelStyles: i, nodeStyles: a } = b(t);
2504
+ t.labelStyle = i;
2505
+ let { shapeSvg: o, bbox: s } = await w(e, t, D(t)), c = Math.max(s.width + ((n = t.padding) == null ? 0 : n), (t == null ? void 0 : t.width) || 0), l = Math.max(s.height + ((r = t.padding) == null ? 0 : r), (t == null ? void 0 : t.height) || 0), u = -c / 2, d = -l / 2, f = o.insert("rect", ":first-child");
2506
+ return f.attr("class", "text").attr("style", a).attr("rx", 0).attr("ry", 0).attr("x", u).attr("y", d).attr("width", c).attr("height", l), E(t, f), t.intersect = function(e) {
2507
+ return q.rect(t, e);
2508
+ }, o;
2509
+ }
2510
+ n(vt, "text");
2511
+ var yt = /* @__PURE__ */ n((e, t, n, r, i, a) => `M${e},${t}
2512
+ a${i},${a} 0,0,1 0,${-r}
2513
+ l${n},0
2514
+ a${i},${a} 0,0,1 0,${r}
2515
+ M${n},${-r}
2516
+ a${i},${a} 0,0,0 0,${r}
2517
+ l${-n},0`, "createCylinderPathD"), bt = /* @__PURE__ */ n((e, t, n, r, i, a) => [
2518
+ `M${e},${t}`,
2519
+ `M${e + n},${t}`,
2520
+ `a${i},${a} 0,0,0 0,${-r}`,
2521
+ `l${-n},0`,
2522
+ `a${i},${a} 0,0,0 0,${r}`,
2523
+ `l${n},0`
2524
+ ].join(" "), "createOuterCylinderPathD"), xt = /* @__PURE__ */ n((e, t, n, r, i, a) => [`M${e + n / 2},${-r / 2}`, `a${i},${a} 0,0,0 0,${r}`].join(" "), "createInnerCylinderPathD"), St = 5, Ct = 10;
2525
+ async function wt(e, t) {
2526
+ var n, r, i;
2527
+ let { labelStyles: a, nodeStyles: o } = b(t);
2528
+ t.labelStyle = a;
2529
+ let s = (n = t.padding) == null ? 0 : n, c = t.look === "neo" ? 12 : s / 2;
2530
+ if (t.width || t.height) {
2531
+ var l, u, d;
2532
+ let e = (l = t.height) == null ? 0 : l;
2533
+ t.height = ((u = t.height) == null ? 0 : u) - c, t.height < St && (t.height = St);
2534
+ let n = e / 2 / (2.5 + e / 50);
2535
+ t.width = ((d = t.width) == null ? 0 : d) - c - n * 3, t.width < Ct && (t.width = Ct);
2536
+ }
2537
+ let { shapeSvg: f, bbox: m, label: h } = await w(e, t, D(t)), g = (t.height ? t.height : m.height) + c, _ = g / 2, v = _ / (2.5 + g / 50), x = (t.width ? t.width : m.width) + v + c, { cssStyles: S } = t, T;
2538
+ if (t.look === "handDrawn") {
2539
+ let e = C.svg(f), n = bt(0, 0, x, g, v, _), r = xt(0, 0, x, g, v, _), i = e.path(n, y(t, {})), a = e.path(r, y(t, { fill: "none" }));
2540
+ T = f.insert(() => a, ":first-child"), T = f.insert(() => i, ":first-child"), T.attr("class", "basic label-container"), S && T.attr("style", S);
2541
+ } else {
2542
+ let e = yt(0, 0, x, g, v, _);
2543
+ T = f.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container").attr("style", p(S)).attr("style", o), T.attr("class", "basic label-container outer-path"), S && T.selectAll("path").attr("style", S), o && T.selectAll("path").attr("style", o);
2544
+ }
2545
+ return T.attr("label-offset-x", v), T.attr("transform", `translate(${-x / 2}, ${g / 2} )`), h.attr("transform", `translate(${-(m.width / 2) - v - (m.x - ((r = m.left) == null ? 0 : r))}, ${-(m.height / 2) - (m.y - ((i = m.top) == null ? 0 : i))})`), E(t, T), t.intersect = function(e) {
2546
+ var n, r, i, a, o;
2547
+ let s = q.rect(t, e), c = s.y - ((n = t.y) == null ? 0 : n);
2548
+ if (_ != 0 && (Math.abs(c) < ((r = t.height) == null ? 0 : r) / 2 || Math.abs(c) == ((i = t.height) == null ? 0 : i) / 2 && Math.abs(s.x - ((a = t.x) == null ? 0 : a)) > ((o = t.width) == null ? 0 : o) / 2 - v)) {
2549
+ var l;
2550
+ let n = v * v * (1 - c * c / (_ * _));
2551
+ n != 0 && (n = Math.sqrt(Math.abs(n))), n = v - n, e.x - ((l = t.x) == null ? 0 : l) > 0 && (n = -n), s.x += n;
2552
+ }
2553
+ return s;
2554
+ }, f;
2555
+ }
2556
+ n(wt, "tiltedCylinder");
2557
+ async function Tt(e, t) {
2558
+ var n, r, i;
2559
+ let { labelStyles: a, nodeStyles: o } = b(t);
2560
+ t.labelStyle = a;
2561
+ let s = (n = t.padding) == null ? 0 : n, c = (t.look, s), l = t.look === "neo" ? s * 2 : s, { shapeSvg: u, bbox: d } = await w(e, t, D(t)), f = ((r = t == null ? void 0 : t.height) == null ? d.height : r) + c, p = ((i = t == null ? void 0 : t.width) == null ? d.width : i) + l, m = [
2562
+ {
2563
+ x: -3 * f / 6,
2564
+ y: 0
2565
+ },
2566
+ {
2567
+ x: p + 3 * f / 6,
2568
+ y: 0
2569
+ },
2570
+ {
2571
+ x: p,
2572
+ y: -f
2573
+ },
2574
+ {
2575
+ x: 0,
2576
+ y: -f
2577
+ }
2578
+ ], h, { cssStyles: g } = t;
2579
+ if (t.look === "handDrawn") {
2580
+ let e = C.svg(u), n = y(t, {}), r = O(m), i = e.path(r, n);
2581
+ h = u.insert(() => i, ":first-child").attr("transform", `translate(${-p / 2}, ${f / 2})`), g && h.attr("style", g);
2582
+ } else h = Y(u, p, f, m);
2583
+ return o && h.attr("style", o), t.width = p, t.height = f, E(t, h), t.intersect = function(e) {
2584
+ return q.polygon(t, m, e);
2585
+ }, u;
2586
+ }
2587
+ n(Tt, "trapezoid");
2588
+ async function Et(e, t) {
2589
+ var n;
2590
+ let { labelStyles: r, nodeStyles: i } = b(t);
2591
+ t.labelStyle = r;
2592
+ let a = (n = t.padding) == null ? 0 : n, o = t.look === "neo" ? 16 : a, s = t.look === "neo" ? 12 : a;
2593
+ if (t.width || t.height) {
2594
+ var c, l;
2595
+ t.height = ((c = t.height) == null ? 0 : c) - s * 2, t.height < 5 && (t.height = 5), t.width = ((l = t.width) == null ? 0 : l) - o * 2, t.width < 15 && (t.width = 15);
2596
+ }
2597
+ let { shapeSvg: u, bbox: d } = await w(e, t, D(t)), f = (t != null && t.width ? t == null ? void 0 : t.width : d.width) + o * 2, p = (t != null && t.height ? t == null ? void 0 : t.height : d.height) + s * 2, { cssStyles: m } = t, h = C.svg(u), g = y(t, {});
2598
+ t.look !== "handDrawn" && (g.roughness = 0, g.fillStyle = "solid");
2599
+ let _ = [
2600
+ {
2601
+ x: -f / 2 * .8,
2602
+ y: -p / 2
2603
+ },
2604
+ {
2605
+ x: f / 2 * .8,
2606
+ y: -p / 2
2607
+ },
2608
+ {
2609
+ x: f / 2,
2610
+ y: -p / 2 * .6
2611
+ },
2612
+ {
2613
+ x: f / 2,
2614
+ y: p / 2
2615
+ },
2616
+ {
2617
+ x: -f / 2,
2618
+ y: p / 2
2619
+ },
2620
+ {
2621
+ x: -f / 2,
2622
+ y: -p / 2 * .6
2623
+ }
2624
+ ], v = O(_), x = h.path(v, g), S = u.insert(() => x, ":first-child");
2625
+ return S.attr("class", "basic label-container outer-path"), m && t.look !== "handDrawn" && S.selectChildren("path").attr("style", m), i && t.look !== "handDrawn" && S.selectChildren("path").attr("style", i), E(t, S), t.intersect = function(e) {
2626
+ return q.polygon(t, _, e);
2627
+ }, u;
2628
+ }
2629
+ n(Et, "trapezoidalPentagon");
2630
+ var Dt = 10, Ot = 10;
2631
+ async function kt(e, n) {
2632
+ var r, i, a, c, l;
2633
+ let { labelStyles: u, nodeStyles: d } = b(n);
2634
+ n.labelStyle = u;
2635
+ let f = (r = n.padding) == null ? 0 : r, p = n.look === "neo" ? f * 2 : f;
2636
+ if (n.width || n.height) {
2637
+ var m, h;
2638
+ n.width = (((m = n == null ? void 0 : n.width) == null ? 0 : m) - p) / 2, n.width < Ot && (n.width = Ot), n.height = (h = n == null ? void 0 : n.height) == null ? 0 : h, n.height < Dt && (n.height = Dt);
2639
+ }
2640
+ let { shapeSvg: g, bbox: _, label: v } = await w(e, n, D(n)), x = s((i = o().flowchart) == null ? void 0 : i.htmlLabels), S = (n != null && n.width ? n == null ? void 0 : n.width : _.width) + p, T = n != null && n.height ? n == null ? void 0 : n.height : S + _.height, k = T, A = [
2641
+ {
2642
+ x: 0,
2643
+ y: 0
2644
+ },
2645
+ {
2646
+ x: k,
2647
+ y: 0
2648
+ },
2649
+ {
2650
+ x: k / 2,
2651
+ y: -T
2652
+ }
2653
+ ], { cssStyles: j } = n, M = C.svg(g), N = y(n, {});
2654
+ n.look !== "handDrawn" && (N.roughness = 0, N.fillStyle = "solid");
2655
+ let P = O(A), F = M.path(P, N), I = g.insert(() => F, ":first-child").attr("transform", `translate(${-T / 2}, ${T / 2})`).attr("class", "outer-path");
2656
+ return j && n.look !== "handDrawn" && I.selectChildren("path").attr("style", j), d && n.look !== "handDrawn" && I.selectChildren("path").attr("style", d), n.width = S, n.height = T, E(n, I), v.attr("transform", `translate(${-_.width / 2 - (_.x - ((a = _.left) == null ? 0 : a))}, ${T / 2 - (_.height + ((c = n.padding) == null ? 0 : c) / (x ? 2 : 1) - (_.y - ((l = _.top) == null ? 0 : l)))})`), n.intersect = function(e) {
2657
+ return t.info("Triangle intersect", n, A, e), q.polygon(n, A, e);
2658
+ }, g;
2659
+ }
2660
+ n(kt, "triangle");
2661
+ async function At(e, t) {
2662
+ var n, r, i, a, o;
2663
+ let { labelStyles: s, nodeStyles: c } = b(t);
2664
+ t.labelStyle = s;
2665
+ let l = (n = t.padding) == null ? 0 : n, u = t.look === "neo" ? 16 : l, d = t.look === "neo" ? 12 : l, f = !0;
2666
+ if (t.width || t.height) {
2667
+ var p, m;
2668
+ f = !1, t.width = ((p = t == null ? void 0 : t.width) == null ? 0 : p) - u * 2, t.width < 10 && (t.width = 10), t.height = ((m = t == null ? void 0 : t.height) == null ? 0 : m) - d * 2, t.height < 10 && (t.height = 10);
2669
+ }
2670
+ let { shapeSvg: h, bbox: g, label: _ } = await w(e, t, D(t)), v = (t != null && t.width ? t == null ? void 0 : t.width : g.width) + (u == null ? 0 : u) * 2, x = (t != null && t.height ? t == null ? void 0 : t.height : g.height) + (d == null ? 0 : d) * 2, S = t.look === "neo" ? x / 4 : x / 8, T = x + (f ? S : -S), { cssStyles: A } = t, j = 14 - v, M = j > 0 ? j / 2 : 0, N = C.svg(h), P = y(t, {});
2671
+ t.look !== "handDrawn" && (P.roughness = 0, P.fillStyle = "solid");
2672
+ let F = [
2673
+ {
2674
+ x: -v / 2 - M,
2675
+ y: T / 2
2676
+ },
2677
+ ...k(-v / 2 - M, T / 2, v / 2 + M, T / 2, S, .8),
2678
+ {
2679
+ x: v / 2 + M,
2680
+ y: -T / 2
2681
+ },
2682
+ {
2683
+ x: -v / 2 - M,
2684
+ y: -T / 2
2685
+ }
2686
+ ], I = O(F), L = N.path(I, P), R = h.insert(() => L, ":first-child");
2687
+ return R.attr("class", "basic label-container outer-path"), A && t.look !== "handDrawn" && R.selectAll("path").attr("style", A), c && t.look !== "handDrawn" && R.selectAll("path").attr("style", c), R.attr("transform", `translate(0,${-S / 2})`), _.attr("transform", `translate(${-v / 2 + ((r = t.padding) == null ? 0 : r) - (g.x - ((i = g.left) == null ? 0 : i))},${-x / 2 + ((a = t.padding) == null ? 0 : a) - S - (g.y - ((o = g.top) == null ? 0 : o))})`), E(t, R), t.intersect = function(e) {
2688
+ return q.polygon(t, F, e);
2689
+ }, h;
2690
+ }
2691
+ n(At, "waveEdgedRectangle");
2692
+ async function jt(e, t) {
2693
+ var n;
2694
+ let { labelStyles: r, nodeStyles: i } = b(t);
2695
+ t.labelStyle = r;
2696
+ let a = (n = t.padding) == null ? 0 : n, o = t.look === "neo" ? 16 : a, s = t.look === "neo" ? 20 : a;
2697
+ if (t.width || t.height) {
2698
+ var c, l;
2699
+ t.width = (c = t == null ? void 0 : t.width) == null ? 0 : c, t.width < 20 && (t.width = 20), t.height = (l = t == null ? void 0 : t.height) == null ? 0 : l, t.height < 10 && (t.height = 10);
2700
+ let e = Math.min(t.height * .2, t.height / 4);
2701
+ t.height = Math.ceil(t.height - s - 20 / 9 * e), t.width -= o * 2;
2702
+ }
2703
+ let { shapeSvg: u, bbox: d } = await w(e, t, D(t)), f = (t != null && t.width ? t == null ? void 0 : t.width : d.width) + o * 2, p = (t != null && t.height ? t == null ? void 0 : t.height : d.height) + s, m = p / 8, h = p + m * 2, { cssStyles: g } = t, _ = C.svg(u), v = y(t, {});
2704
+ t.look !== "handDrawn" && (v.roughness = 0, v.fillStyle = "solid");
2705
+ let x = [
2706
+ {
2707
+ x: -f / 2,
2708
+ y: h / 2
2709
+ },
2710
+ ...k(-f / 2, h / 2, f / 2, h / 2, m, 1),
2711
+ {
2712
+ x: f / 2,
2713
+ y: -h / 2
2714
+ },
2715
+ ...k(f / 2, -h / 2, -f / 2, -h / 2, m, -1)
2716
+ ], S = O(x), T = _.path(S, v), A = u.insert(() => T, ":first-child");
2717
+ return A.attr("class", "basic label-container"), g && t.look !== "handDrawn" && A.selectAll("path").attr("style", g), i && t.look !== "handDrawn" && A.selectAll("path").attr("style", i), E(t, A), t.intersect = function(e) {
2718
+ return q.polygon(t, x, e);
2719
+ }, u;
2720
+ }
2721
+ n(jt, "waveRectangle");
2722
+ var $ = 10;
2723
+ async function Mt(e, t) {
2724
+ var n, r, i, a;
2725
+ let { labelStyles: o, nodeStyles: s } = b(t);
2726
+ t.labelStyle = o;
2727
+ let c = t.look === "neo" ? 16 : (n = t.padding) == null ? 0 : n, l = t.look === "neo" ? 12 : (r = t.padding) == null ? 0 : r;
2728
+ if (t.width || t.height) {
2729
+ var u, d;
2730
+ t.width = Math.max(((u = t == null ? void 0 : t.width) == null ? 0 : u) - c * 2 - $, 10), t.height = Math.max(((d = t == null ? void 0 : t.height) == null ? 0 : d) - l * 2 - $, 10);
2731
+ }
2732
+ let { shapeSvg: f, bbox: p, label: m } = await w(e, t, D(t)), h = (t != null && t.width ? t == null ? void 0 : t.width : p.width) + c * 2 + $, g = (t != null && t.height ? t == null ? void 0 : t.height : p.height) + l * 2 + $, _ = h - $, v = g - $, x = -_ / 2, S = -v / 2, { cssStyles: T } = t, O = C.svg(f), k = y(t, {}), A = [
2733
+ {
2734
+ x: x - $,
2735
+ y: S - $
2736
+ },
2737
+ {
2738
+ x: x - $,
2739
+ y: S + v
2740
+ },
2741
+ {
2742
+ x: x + _,
2743
+ y: S + v
2744
+ },
2745
+ {
2746
+ x: x + _,
2747
+ y: S - $
2748
+ }
2749
+ ], j = `M${x - $},${S - $} L${x + _},${S - $} L${x + _},${S + v} L${x - $},${S + v} L${x - $},${S - $}
2750
+ M${x - $},${S} L${x + _},${S}
2751
+ M${x},${S - $} L${x},${S + v}`;
2752
+ t.look !== "handDrawn" && (k.roughness = 0, k.fillStyle = "solid");
2753
+ let M = O.path(j, k), N = f.insert(() => M, ":first-child");
2754
+ return N.attr("transform", `translate(${$ / 2}, ${$ / 2})`), N.attr("class", "basic label-container outer-path"), T && t.look !== "handDrawn" && N.selectAll("path").attr("style", T), s && t.look !== "handDrawn" && N.selectAll("path").attr("style", s), m.attr("transform", `translate(${-(p.width / 2) + $ / 2 - (p.x - ((i = p.left) == null ? 0 : i))}, ${-(p.height / 2) + $ / 2 - (p.y - ((a = p.top) == null ? 0 : a))})`), E(t, N), t.intersect = function(e) {
2755
+ return q.polygon(t, A, e);
2756
+ }, f;
2757
+ }
2758
+ n(Mt, "windowPane");
2759
+ var Nt = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), Pt = /* @__PURE__ */ new Set([
2760
+ "redux",
2761
+ "redux-dark",
2762
+ "redux-color",
2763
+ "redux-dark-color"
2764
+ ]);
2765
+ async function Ft(t, n) {
2766
+ var i, a, o, c, l, u;
2767
+ let f = n;
2768
+ f.alias && (n.label = f.alias);
2769
+ let { theme: p, themeVariables: h } = d(), { rowEven: g, rowOdd: _, nodeBorder: v, borderColorArray: x } = h;
2770
+ if (n.look === "handDrawn") {
2771
+ let { themeVariables: r } = d(), { background: i } = r;
2772
+ await Ft(t, e(e({}, n), {}, {
2773
+ id: n.id + "-background",
2774
+ domId: (n.domId || n.id) + "-background",
2775
+ look: "default",
2776
+ cssStyles: ["stroke: none", `fill: ${i}`]
2777
+ }));
2778
+ }
2779
+ let S = d();
2780
+ n.useHtmlLabels = S.htmlLabels;
2781
+ let w = (i = (a = S.er) == null ? void 0 : a.diagramPadding) == null ? 10 : i, T = (o = (c = S.er) == null ? void 0 : c.entityPadding) == null ? 6 : o, { cssStyles: O } = n, { labelStyles: k, nodeStyles: A } = b(n);
2782
+ if (f.attributes.length === 0 && n.label) {
2783
+ let e = {
2784
+ rx: 0,
2785
+ ry: 0,
2786
+ labelPaddingX: w,
2787
+ labelPaddingY: w * 1.5,
2788
+ classes: ""
2789
+ };
2790
+ m(n.label, S) + e.labelPaddingX * 2 < S.er.minEntityWidth && (n.width = S.er.minEntityWidth);
2791
+ let r = await ze(t, n, e);
2792
+ if (p != null && Nt.has(p)) {
2793
+ var j;
2794
+ let e = (j = f.colorIndex) == null ? 0 : j;
2795
+ r.attr("data-color-id", `color-${e % x.length}`);
2796
+ }
2797
+ if (!s(S.htmlLabels)) {
2798
+ var M;
2799
+ let e = r.select("text"), t = (M = e.node()) == null ? void 0 : M.getBBox();
2800
+ e.attr("transform", `translate(${-t.width / 2}, 0)`);
2801
+ }
2802
+ return r;
2803
+ }
2804
+ S.htmlLabels || (w *= 1.25, T *= 1.25);
2805
+ let N = D(n);
2806
+ N || (N = "node default");
2807
+ let P = t.insert("g").attr("class", N).attr("id", n.domId || n.id), F = await It(P, (l = n.label) == null ? "" : l, S, 0, 0, ["name"], k);
2808
+ F.height += T;
2809
+ let I = 0, L = [], R = [], z = 0, B = 0, V = 0, H = 0, U = !0, W = !0;
2810
+ for (let e of f.attributes) {
2811
+ let t = await It(P, e.type, S, 0, I, ["attribute-type"], k);
2812
+ z = Math.max(z, t.width + w);
2813
+ let n = await It(P, e.name, S, 0, I, ["attribute-name"], k);
2814
+ B = Math.max(B, n.width + w);
2815
+ let r = await It(P, e.keys.join(), S, 0, I, ["attribute-keys"], k);
2816
+ V = Math.max(V, r.width + w);
2817
+ let i = await It(P, e.comment, S, 0, I, ["attribute-comment"], k);
2818
+ H = Math.max(H, i.width + w);
2819
+ let a = Math.max(t.height, n.height, r.height, i.height) + T;
2820
+ R.push({
2821
+ yOffset: I,
2822
+ rowHeight: a
2823
+ }), I += a;
2824
+ }
2825
+ let G = 4;
2826
+ V <= w && (U = !1, V = 0, G--), H <= w && (W = !1, H = 0, G--);
2827
+ let ee = P.node().getBBox();
2828
+ if (F.width + w * 2 - (z + B + V + H) > 0) {
2829
+ let e = F.width + w * 2 - (z + B + V + H);
2830
+ z += e / G, B += e / G, V > 0 && (V += e / G), H > 0 && (H += e / G);
2831
+ }
2832
+ let te = z + B + V + H, ne = C.svg(P), K = y(n, {});
2833
+ n.look !== "handDrawn" && (K.roughness = 0, K.fillStyle = "solid");
2834
+ let re = 0;
2835
+ R.length > 0 && (re = R.reduce((e, t) => {
2836
+ var n;
2837
+ return e + ((n = t == null ? void 0 : t.rowHeight) == null ? 0 : n);
2838
+ }, 0));
2839
+ let ie = Math.max(ee.width + w * 2, (n == null ? void 0 : n.width) || 0, te), ae = Math.max(((u = re) == null ? 0 : u) + F.height, (n == null ? void 0 : n.height) || 0), J = -ie / 2, Y = -ae / 2;
2840
+ if (P.selectAll("g:not(:first-child)").each((e, t, n) => {
2841
+ let i = r(n[t]), a = i.attr("transform"), o = 0, s = 0;
2842
+ if (a) {
2843
+ let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);
2844
+ e && (o = parseFloat(e[1]), s = parseFloat(e[2]), i.attr("class").includes("attribute-name") ? o += z : i.attr("class").includes("attribute-keys") ? o += z + B : i.attr("class").includes("attribute-comment") && (o += z + B + V));
2845
+ }
2846
+ i.attr("transform", `translate(${J + w / 2 + o}, ${s + Y + F.height + T / 2})`);
2847
+ }), P.select(".name").attr("transform", "translate(" + -F.width / 2 + ", " + (Y + T / 2) + ")"), p != null && Nt.has(p)) {
2848
+ var oe;
2849
+ let e = (oe = f.colorIndex) == null ? 0 : oe;
2850
+ P.attr("data-color-id", `color-${e % x.length}`);
2851
+ }
2852
+ let se = ne.rectangle(J, Y, ie, ae, K), ce = P.insert(() => se, ":first-child").attr("class", "outer-path").attr("style", O.join(""));
2853
+ L.push(0);
2854
+ for (let [t, n] of R.entries()) {
2855
+ let r = (t + 1) % 2 == 0 && n.yOffset !== 0, i = ne.rectangle(J, F.height + Y + (n == null ? void 0 : n.yOffset), ie, n == null ? void 0 : n.rowHeight, e(e({}, K), {}, {
2856
+ fill: r ? g : _,
2857
+ stroke: v
2858
+ }));
2859
+ P.insert(() => i, "g.label").attr("style", O.join("")).attr("class", `row-rect-${r ? "even" : "odd"}`);
2860
+ }
2861
+ let le = 1e-4, X = Lt(J, F.height + Y, ie + J, F.height + Y, le), Z = ne.polygon(X.map((e) => [e.x, e.y]), K);
2862
+ if (P.insert(() => Z).attr("class", "divider"), X = Lt(z + J, F.height + Y, z + J, ae + Y, le), Z = ne.polygon(X.map((e) => [e.x, e.y]), K), P.insert(() => Z).attr("class", "divider"), U) {
2863
+ let e = z + B + J;
2864
+ X = Lt(e, F.height + Y, e, ae + Y, le), Z = ne.polygon(X.map((e) => [e.x, e.y]), K), P.insert(() => Z).attr("class", "divider");
2865
+ }
2866
+ if (W) {
2867
+ let e = z + B + V + J;
2868
+ X = Lt(e, F.height + Y, e, ae + Y, le), Z = ne.polygon(X.map((e) => [e.x, e.y]), K), P.insert(() => Z).attr("class", "divider");
2869
+ }
2870
+ for (let e of L) {
2871
+ let t = F.height + Y + e;
2872
+ X = Lt(J, t, ie + J, t, le), Z = ne.polygon(X.map((e) => [e.x, e.y]), K), P.insert(() => Z).attr("class", "divider");
2873
+ }
2874
+ if (E(n, ce), A && n.look !== "handDrawn") if (p != null && Pt.has(p)) P.selectAll("path").attr("style", A);
2875
+ else {
2876
+ var ue;
2877
+ let e = A.split(";"), t = e == null || (ue = e.filter((e) => e.includes("stroke"))) == null ? void 0 : ue.map((e) => `${e}`).join("; ");
2878
+ P.selectAll("path").attr("style", t == null ? "" : t), P.selectAll(".row-rect-even path").attr("style", A);
2879
+ }
2880
+ return n.intersect = function(e) {
2881
+ return q.rect(n, e);
2882
+ }, P;
2883
+ }
2884
+ n(Ft, "erBox");
2885
+ async function It(e, t, n, i = 0, a = 0, o = [], l = "") {
2886
+ let u = e.insert("g").attr("class", `label ${o.join(" ")}`).attr("transform", `translate(${i}, ${a})`).attr("style", l);
2887
+ t !== c(t) && (t = c(t), t = t.replaceAll("<", "&lt;").replaceAll(">", "&gt;"));
2888
+ let d = u.node().appendChild(await h(u, t, {
2889
+ width: m(t, n) + 100,
2890
+ style: l,
2891
+ useHtmlLabels: n.htmlLabels
2892
+ }, n));
2893
+ if (t.includes("&lt;") || t.includes("&gt;")) {
2894
+ let e = d.children[0];
2895
+ for (e.textContent = e.textContent.replaceAll("&lt;", "<").replaceAll("&gt;", ">"); e.childNodes[0];) e = e.childNodes[0], e.textContent = e.textContent.replaceAll("&lt;", "<").replaceAll("&gt;", ">");
2896
+ }
2897
+ let f = d.getBBox();
2898
+ if (s(n.htmlLabels)) {
2899
+ let e = d.children[0];
2900
+ e.style.textAlign = "start";
2901
+ let t = r(d);
2902
+ f = e.getBoundingClientRect(), t.attr("width", f.width), t.attr("height", f.height);
2903
+ }
2904
+ return f;
2905
+ }
2906
+ n(It, "addText");
2907
+ function Lt(e, t, n, r, i) {
2908
+ return e === n ? [
2909
+ {
2910
+ x: e - i / 2,
2911
+ y: t
2912
+ },
2913
+ {
2914
+ x: e + i / 2,
2915
+ y: t
2916
+ },
2917
+ {
2918
+ x: n + i / 2,
2919
+ y: r
2920
+ },
2921
+ {
2922
+ x: n - i / 2,
2923
+ y: r
2924
+ }
2925
+ ] : [
2926
+ {
2927
+ x: e,
2928
+ y: t - i / 2
2929
+ },
2930
+ {
2931
+ x: e,
2932
+ y: t + i / 2
2933
+ },
2934
+ {
2935
+ x: n,
2936
+ y: r + i / 2
2937
+ },
2938
+ {
2939
+ x: n,
2940
+ y: r - i / 2
2941
+ }
2942
+ ];
2943
+ }
2944
+ n(Lt, "lineToPolygon");
2945
+ async function Rt(e, t, n, r, i = ((e) => (e = n.class.padding) == null ? 12 : e)()) {
2946
+ let a = r ? 0 : 3, o = e.insert("g").attr("class", D(t)).attr("id", t.domId || t.id), s = null, c = null, l = null, u = null, d = 0, f = 0, p = 0;
2947
+ if (s = o.insert("g").attr("class", "annotation-group text"), t.annotations.length > 0) {
2948
+ let e = t.annotations[0];
2949
+ await zt(s, { text: `\xAB${e}\xBB` }, 0), d = s.node().getBBox().height;
2950
+ }
2951
+ c = o.insert("g").attr("class", "label-group text"), await zt(c, t, 0, ["font-weight: bolder"]);
2952
+ let m = c.node().getBBox();
2953
+ f = m.height, l = o.insert("g").attr("class", "members-group text");
2954
+ let h = 0;
2955
+ for (let e of t.members) {
2956
+ let t = await zt(l, e, h, [e.parseClassifier()]);
2957
+ h += t + a;
2958
+ }
2959
+ p = l.node().getBBox().height, p <= 0 && (p = i / 2), u = o.insert("g").attr("class", "methods-group text");
2960
+ let g = 0;
2961
+ for (let e of t.methods) {
2962
+ let t = await zt(u, e, g, [e.parseClassifier()]);
2963
+ g += t + a;
2964
+ }
2965
+ let _ = o.node().getBBox();
2966
+ if (s !== null) {
2967
+ let e = s.node().getBBox();
2968
+ s.attr("transform", `translate(${-e.width / 2})`);
2969
+ }
2970
+ 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(), {
2971
+ shapeSvg: o,
2972
+ bbox: _
2973
+ };
2974
+ }
2975
+ n(Rt, "textHelper");
2976
+ async function zt(e, t, i, o = []) {
2977
+ var c;
2978
+ let u = e.insert("g").attr("class", "label").attr("style", o.join("; ")), p = d(), g = "useHtmlLabels" in t ? t.useHtmlLabels : (c = s(p.htmlLabels)) == null ? !0 : c, _ = "";
2979
+ _ = "text" in t ? t.text : t.label, !g && _.startsWith("\\") && (_ = _.substring(1)), l(_) && (g = !0);
2980
+ let v = await h(u, a(f(_)), {
2981
+ width: m(_, p) + 50,
2982
+ classes: "markdown-node-label",
2983
+ useHtmlLabels: g
2984
+ }, p), y, b = 1;
2985
+ if (g) {
2986
+ let e = v.children[0], t = r(v);
2987
+ b = e.innerHTML.split("<br>").length, e.innerHTML.includes("</math>") && (b += e.innerHTML.split("<mrow>").length - 1);
2988
+ let i = e.getElementsByTagName("img");
2989
+ if (i) {
2990
+ let e = _.replace(/<img[^>]*>/g, "").trim() === "";
2991
+ await Promise.all([...i].map((t) => new Promise((r) => {
2992
+ function i() {
2993
+ if (t.style.display = "flex", t.style.flexDirection = "column", e) {
2994
+ var n, i;
2995
+ let e = (n = (i = p.fontSize) == null ? void 0 : i.toString()) == null ? window.getComputedStyle(document.body).fontSize : n, r = parseInt(e, 10) * 5 + "px";
2996
+ t.style.minWidth = r, t.style.maxWidth = r;
2997
+ } else t.style.width = "100%";
2998
+ r(t);
2999
+ }
3000
+ n(i, "setupImage"), setTimeout(() => {
3001
+ t.complete && i();
3002
+ }), t.addEventListener("error", i), t.addEventListener("load", i);
3003
+ })));
3004
+ }
3005
+ y = e.getBoundingClientRect(), t.attr("width", y.width), t.attr("height", y.height);
3006
+ } else {
3007
+ o.includes("font-weight: bolder") && r(v).selectAll("tspan").attr("font-weight", ""), b = v.children.length;
3008
+ let e = v.children[0];
3009
+ (v.textContent === "" || v.textContent.includes("&gt")) && (e.textContent = _[0] + _.substring(1).replaceAll("&gt;", ">").replaceAll("&lt;", "<").trim(), _[1] === " " && (e.textContent = e.textContent[0] + " " + e.textContent.substring(1))), e.textContent === "undefined" && (e.textContent = ""), y = v.getBBox();
3010
+ }
3011
+ return u.attr("transform", "translate(0," + (-y.height / (2 * b) + i) + ")"), y.height;
3012
+ }
3013
+ n(zt, "addText");
3014
+ async function Bt(e, t) {
3015
+ var n, i, a, c, l, u, d, f, p, m, h;
3016
+ let g = o(), { themeVariables: _ } = g, { useGradient: v } = _, x = (n = g.class.padding) == null ? 12 : n, S = x, w = (i = (a = t.useHtmlLabels) == null ? s(g.htmlLabels) : a) == null ? !0 : i, T = t;
3017
+ T.annotations = (c = T.annotations) == null ? [] : c, T.members = (l = T.members) == null ? [] : l, T.methods = (u = T.methods) == null ? [] : u;
3018
+ let { shapeSvg: D, bbox: O } = await Rt(e, t, g, w, S), { labelStyles: k, nodeStyles: A } = b(t);
3019
+ t.labelStyle = k, t.cssStyles = T.styles || "";
3020
+ let j = ((d = T.styles) == null ? void 0 : d.join(";")) || A || "";
3021
+ t.cssStyles || (t.cssStyles = j.replaceAll("!important", "").split(";"));
3022
+ let M = T.members.length === 0 && T.methods.length === 0 && !((f = g.class) != null && f.hideEmptyMembersBox), N = C.svg(D), P = y(t, {});
3023
+ t.look !== "handDrawn" && (P.roughness = 0, P.fillStyle = "solid");
3024
+ let F = Math.max((p = t.width) == null ? 0 : p, O.width), I = Math.max((m = t.height) == null ? 0 : m, O.height), L = ((h = t.height) == null ? 0 : h) > O.height;
3025
+ T.members.length === 0 && T.methods.length === 0 ? I += S : T.members.length > 0 && T.methods.length === 0 && (I += S * 2);
3026
+ let R = -F / 2, z = -I / 2, B = M ? x * 2 : T.members.length === 0 && T.methods.length === 0 ? -x : 0;
3027
+ L && (B = x * 2);
3028
+ let V = N.rectangle(R - x, z - x - (M ? x : T.members.length === 0 && T.methods.length === 0 ? -x / 2 : 0), F + 2 * x, I + 2 * x + B, P), H = D.insert(() => V, ":first-child");
3029
+ H.attr("class", "basic label-container outer-path");
3030
+ let U = H.node().getBBox(), W = D.select(".annotation-group").node().getBBox().height - (M ? x / 2 : 0) || 0, G = D.select(".label-group").node().getBBox().height - (M ? x / 2 : 0) || 0, ee = D.select(".members-group").node().getBBox().height - (M ? x / 2 : 0) || 0, te = (W + G + z + x - (z - x - (M ? x : T.members.length === 0 && T.methods.length === 0 ? -x / 2 : 0))) / 2;
3031
+ if (D.selectAll(".text").each((e, t, n) => {
3032
+ var i;
3033
+ let a = r(n[t]), o = a.attr("transform"), s = 0;
3034
+ if (o) {
3035
+ let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);
3036
+ e && (s = parseFloat(e[2]));
3037
+ }
3038
+ let c = s + z + x - (M ? x : T.members.length === 0 && T.methods.length === 0 ? -x / 2 : 0);
3039
+ if (a.attr("class").includes("methods-group")) {
3040
+ let e = Math.max(ee, S / 2);
3041
+ c = L ? Math.max(te, W + G + e + z + S * 2 + x) + S * 2 : W + G + e + z + S * 4 + x;
3042
+ }
3043
+ T.members.length === 0 && T.methods.length === 0 && (i = g.class) != null && i.hideEmptyMembersBox && (c = T.annotations.length > 0 ? s - S : s), w || (c -= 4);
3044
+ let l = R;
3045
+ if (a.attr("class").includes("label-group") || a.attr("class").includes("annotation-group")) {
3046
+ var u;
3047
+ l = -((u = a.node()) == null ? void 0 : u.getBBox().width) / 2 || 0, D.selectAll("text").each(function(e, t, n) {
3048
+ window.getComputedStyle(n[t]).textAnchor === "middle" && (l = 0);
3049
+ });
3050
+ }
3051
+ a.attr("transform", `translate(${l}, ${c})`);
3052
+ }), T.members.length > 0 || T.methods.length > 0 || M) {
3053
+ let e = W + G + z + x, n = N.line(U.x, e, U.x + U.width, e + .001, P);
3054
+ D.insert(() => n).attr("class", `divider${t.look === "neo" && !v ? " neo-line" : ""}`).attr("style", j);
3055
+ }
3056
+ if (M || T.members.length > 0 || T.methods.length > 0) {
3057
+ let e = W + G + ee + z + S * 2 + x, n = N.line(U.x, L ? Math.max(te, e) : e, U.x + U.width, (L ? Math.max(te, e) : e) + .001, P);
3058
+ D.insert(() => n).attr("class", `divider${t.look === "neo" && !v ? " neo-line" : ""}`).attr("style", j);
3059
+ }
3060
+ if (T.look !== "handDrawn" && D.selectAll("path").attr("style", j), H.select(":nth-child(2)").attr("style", j), D.selectAll(".divider").select("path").attr("style", j), t.labelStyle ? D.selectAll("span").attr("style", t.labelStyle) : D.selectAll("span").attr("style", j), !w) {
3061
+ let e = RegExp(/color\s*:\s*([^;]*)/), t = e.exec(j);
3062
+ if (t) {
3063
+ let e = t[0].replace("color", "fill");
3064
+ D.selectAll("tspan").attr("style", e);
3065
+ } else if (k) {
3066
+ let t = e.exec(k);
3067
+ if (t) {
3068
+ let e = t[0].replace("color", "fill");
3069
+ D.selectAll("tspan").attr("style", e);
3070
+ }
3071
+ }
3072
+ }
3073
+ return E(t, H), t.intersect = function(e) {
3074
+ return q.rect(t, e);
3075
+ }, D;
3076
+ }
3077
+ n(Bt, "classBox");
3078
+ async function Vt(e, t) {
3079
+ var n, i, a, s, c;
3080
+ let { labelStyles: l, nodeStyles: u } = b(t);
3081
+ t.labelStyle = l;
3082
+ let d = t, f = t, p = "verifyMethod" in t, m = D(t), { themeVariables: h } = o(), { borderColorArray: g, requirementEdgeLabelBackground: _ } = h, v = e.insert("g").attr("class", m).attr("id", (n = t.domId) == null ? t.id : n), x;
3083
+ x = p ? await Ht(v, `&lt;&lt;${d.type}&gt;&gt;`, 0, t.labelStyle) : await Ht(v, "&lt;&lt;Element&gt;&gt;", 0, t.labelStyle);
3084
+ let S = x, w = await Ht(v, d.name, S, t.labelStyle + "; font-weight: bold;");
3085
+ if (S += w + 20, p) {
3086
+ let e = await Ht(v, `${d.requirementId ? `ID: ${d.requirementId}` : ""}`, S, t.labelStyle);
3087
+ S += e;
3088
+ let n = await Ht(v, `${d.text ? `Text: ${d.text}` : ""}`, S, t.labelStyle);
3089
+ S += n;
3090
+ let r = await Ht(v, `${d.risk ? `Risk: ${d.risk}` : ""}`, S, t.labelStyle);
3091
+ S += r, await Ht(v, `${d.verifyMethod ? `Verification: ${d.verifyMethod}` : ""}`, S, t.labelStyle);
3092
+ } else {
3093
+ let e = await Ht(v, `${f.type ? `Type: ${f.type}` : ""}`, S, t.labelStyle);
3094
+ S += e, await Ht(v, `${f.docRef ? `Doc Ref: ${f.docRef}` : ""}`, S, t.labelStyle);
3095
+ }
3096
+ let T = ((i = (a = v.node()) == null ? void 0 : a.getBBox().width) == null ? 200 : i) + 20, O = ((s = (c = v.node()) == null ? void 0 : c.getBBox().height) == null ? 200 : s) + 20, k = -T / 2, A = -O / 2, j = C.svg(v), M = y(t, {});
3097
+ t.look !== "handDrawn" && (M.roughness = 0, M.fillStyle = "solid");
3098
+ let N = j.rectangle(k, A, T, O, M), P = v.insert(() => N, ":first-child");
3099
+ if (P.attr("class", "basic label-container outer-path").attr("style", u), g != null && g.length) {
3100
+ var F;
3101
+ let e = (F = t.colorIndex) == null ? 0 : F;
3102
+ v.attr("data-color-id", `color-${e % g.length}`);
3103
+ }
3104
+ if (v.selectAll(".label").each((e, t, n) => {
3105
+ let i = r(n[t]), a = i.attr("transform"), o = 0, s = 0;
3106
+ if (a) {
3107
+ let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);
3108
+ e && (o = parseFloat(e[1]), s = parseFloat(e[2]));
3109
+ }
3110
+ let c = s - O / 2, l = k + 20 / 2;
3111
+ (t === 0 || t === 1) && (l = o), i.attr("transform", `translate(${l}, ${c + 20})`);
3112
+ }), S > x + w + 20) {
3113
+ let e = A + x + w + 20, n;
3114
+ if (t.look === "neo") {
3115
+ let t = .001, r = [
3116
+ [k, e],
3117
+ [k + T, e],
3118
+ [k + T, e + t],
3119
+ [k, e + t]
3120
+ ];
3121
+ n = j.polygon(r, M);
3122
+ } else n = j.line(k, e, k + T, e, M);
3123
+ v.insert(() => n).attr("class", "divider");
3124
+ }
3125
+ return E(t, P), t.intersect = function(e) {
3126
+ return q.rect(t, e);
3127
+ }, u && t.look !== "handDrawn" && (_ || g != null && g.length) && v.selectAll("path").attr("style", u), v;
3128
+ }
3129
+ n(Vt, "requirementBox");
3130
+ async function Ht(e, t, n, i = "") {
3131
+ var s;
3132
+ if (t === "") return 0;
3133
+ let c = e.insert("g").attr("class", "label").attr("style", i), l = o(), u = (s = l.htmlLabels) == null ? !0 : s, d = await h(c, a(f(t)), {
3134
+ width: m(t, l) + 50,
3135
+ classes: "markdown-node-label",
3136
+ useHtmlLabels: u,
3137
+ style: i
3138
+ }, l), p;
3139
+ if (u) {
3140
+ let e = d.children[0], t = r(d);
3141
+ p = e.getBoundingClientRect(), t.attr("width", p.width), t.attr("height", p.height);
3142
+ } else {
3143
+ let e = d.children[0];
3144
+ for (let t of e.children) i && t.setAttribute("style", i);
3145
+ p = d.getBBox(), p.height += 6;
3146
+ }
3147
+ return c.attr("transform", `translate(${-p.width / 2},${-p.height / 2 + n})`), p.height;
3148
+ }
3149
+ n(Ht, "addText");
3150
+ var Ut = /* @__PURE__ */ n((e) => {
3151
+ switch (e) {
3152
+ case "Very High": return "red";
3153
+ case "High": return "orange";
3154
+ case "Medium": return null;
3155
+ case "Low": return "blue";
3156
+ case "Very Low": return "lightblue";
3157
+ }
3158
+ }, "colorFromPriority");
3159
+ async function Wt(e, t, { config: n }) {
3160
+ var r, i;
3161
+ let { labelStyles: a, nodeStyles: o } = b(t);
3162
+ t.labelStyle = a || "";
3163
+ let s = t.width;
3164
+ t.width = ((r = t.width) == null ? 200 : r) - 10;
3165
+ let { shapeSvg: c, bbox: l, label: u } = await w(e, t, D(t)), d = t.padding || 10, f = "", p;
3166
+ if ("ticket" in t && t.ticket && !(n == null || (i = n.kanban) == null) && i.ticketBaseUrl) {
3167
+ var m;
3168
+ f = n == null || (m = n.kanban) == null ? void 0 : m.ticketBaseUrl.replace("#TICKET#", t.ticket), p = c.insert("svg:a", ":first-child").attr("class", "kanban-ticket-link").attr("xlink:href", f).attr("target", "_blank");
3169
+ }
3170
+ let h = {
3171
+ useHtmlLabels: t.useHtmlLabels,
3172
+ labelStyle: t.labelStyle || "",
3173
+ width: t.width,
3174
+ img: t.img,
3175
+ padding: t.padding || 8,
3176
+ centerLabel: !1
3177
+ }, g, _;
3178
+ p ? {label: g, bbox: _} = await T(p, "ticket" in t && t.ticket || "", h) : {label: g, bbox: _} = await T(c, "ticket" in t && t.ticket || "", h);
3179
+ let { label: v, bbox: x } = await T(c, "assigned" in t && t.assigned || "", h);
3180
+ t.width = s;
3181
+ let S = (t == null ? void 0 : t.width) || 0, O = Math.max(_.height, x.height) / 2, k = Math.max(l.height + 20, (t == null ? void 0 : t.height) || 0) + O, A = -S / 2, j = -k / 2;
3182
+ u.attr("transform", "translate(" + (d - S / 2) + ", " + (-O - l.height / 2) + ")"), g.attr("transform", "translate(" + (d - S / 2) + ", " + (-O + l.height / 2) + ")"), v.attr("transform", "translate(" + (d + S / 2 - x.width - 20) + ", " + (-O + l.height / 2) + ")");
3183
+ let M, { rx: N, ry: F } = t, { cssStyles: I } = t;
3184
+ if (t.look === "handDrawn") {
3185
+ let e = C.svg(c), n = y(t, {}), r = N || F ? e.path(P(A, j, S, k, N || 0), n) : e.rectangle(A, j, S, k, n);
3186
+ M = c.insert(() => r, ":first-child"), M.attr("class", "basic label-container").attr("style", I || null);
3187
+ } else {
3188
+ M = c.insert("rect", ":first-child"), M.attr("class", "basic label-container __APA__").attr("style", o).attr("rx", N == null ? 5 : N).attr("ry", F == null ? 5 : F).attr("x", A).attr("y", j).attr("width", S).attr("height", k);
3189
+ let e = "priority" in t && t.priority;
3190
+ if (e) {
3191
+ let t = c.append("line"), n = A + 2, r = j + Math.floor((N == null ? 0 : N) / 2), i = j + k - Math.floor((N == null ? 0 : N) / 2);
3192
+ t.attr("x1", n).attr("y1", r).attr("x2", n).attr("y2", i).attr("stroke-width", "4").attr("stroke", Ut(e));
3193
+ }
3194
+ }
3195
+ return E(t, M), t.height = k, t.intersect = function(e) {
3196
+ return q.rect(t, e);
3197
+ }, c;
3198
+ }
3199
+ n(Wt, "kanbanItem");
3200
+ async function Gt(e, n) {
3201
+ let { labelStyles: r, nodeStyles: i } = b(n);
3202
+ n.labelStyle = r;
3203
+ let { shapeSvg: a, bbox: o, halfPadding: s, label: c } = await w(e, n, D(n)), l = o.width + 10 * s, u = o.height + 8 * s, d = .15 * l, { cssStyles: f } = n, m = o.width + 20, h = o.height + 20, g = Math.max(l, m), _ = Math.max(u, h);
3204
+ c.attr("transform", `translate(${-o.width / 2}, ${-o.height / 2})`);
3205
+ let v, x = `M0 0
3206
+ a${d},${d} 1 0,0 ${g * .25},${-1 * _ * .1}
3207
+ a${d},${d} 1 0,0 ${g * .25},0
3208
+ a${d},${d} 1 0,0 ${g * .25},0
3209
+ a${d},${d} 1 0,0 ${g * .25},${_ * .1}
3210
+
3211
+ a${d},${d} 1 0,0 ${g * .15},${_ * .33}
3212
+ a${d * .8},${d * .8} 1 0,0 0,${_ * .34}
3213
+ a${d},${d} 1 0,0 ${-1 * g * .15},${_ * .33}
3214
+
3215
+ a${d},${d} 1 0,0 ${-1 * g * .25},${_ * .15}
3216
+ a${d},${d} 1 0,0 ${-1 * g * .25},0
3217
+ a${d},${d} 1 0,0 ${-1 * g * .25},0
3218
+ a${d},${d} 1 0,0 ${-1 * g * .25},${-1 * _ * .15}
3219
+
3220
+ a${d},${d} 1 0,0 ${-1 * g * .1},${-1 * _ * .33}
3221
+ a${d * .8},${d * .8} 1 0,0 0,${-1 * _ * .34}
3222
+ a${d},${d} 1 0,0 ${g * .1},${-1 * _ * .33}
3223
+ H0 V0 Z`;
3224
+ if (n.look === "handDrawn") {
3225
+ let e = C.svg(a), t = y(n, {}), r = e.path(x, t);
3226
+ v = a.insert(() => r, ":first-child"), v.attr("class", "basic label-container").attr("style", p(f));
3227
+ } else v = a.insert("path", ":first-child").attr("class", "basic label-container").attr("style", i).attr("d", x);
3228
+ return v.attr("transform", `translate(${-g / 2}, ${-_ / 2})`), E(n, v), n.calcIntersect = function(e, t) {
3229
+ return q.rect(e, t);
3230
+ }, n.intersect = function(e) {
3231
+ return t.info("Bang intersect", n, e), q.rect(n, e);
3232
+ }, a;
3233
+ }
3234
+ n(Gt, "bang");
3235
+ async function Kt(e, n) {
3236
+ let { labelStyles: r, nodeStyles: i } = b(n);
3237
+ n.labelStyle = r;
3238
+ let { shapeSvg: a, bbox: o, halfPadding: s, label: c } = await w(e, n, D(n)), l = o.width + 2 * s, u = o.height + 2 * s, d = .15 * l, f = .25 * l, m = .35 * l, h = .2 * l, { cssStyles: g } = n, _, v = `M0 0
3239
+ a${d},${d} 0 0,1 ${l * .25},${-1 * l * .1}
3240
+ a${m},${m} 1 0,1 ${l * .4},${-1 * l * .1}
3241
+ a${f},${f} 1 0,1 ${l * .35},${l * .2}
3242
+
3243
+ a${d},${d} 1 0,1 ${l * .15},${u * .35}
3244
+ a${h},${h} 1 0,1 ${-1 * l * .15},${u * .65}
3245
+
3246
+ a${f},${d} 1 0,1 ${-1 * l * .25},${l * .15}
3247
+ a${m},${m} 1 0,1 ${-1 * l * .5},0
3248
+ a${d},${d} 1 0,1 ${-1 * l * .25},${-1 * l * .15}
3249
+
3250
+ a${d},${d} 1 0,1 ${-1 * l * .1},${-1 * u * .35}
3251
+ a${h},${h} 1 0,1 ${l * .1},${-1 * u * .65}
3252
+ H0 V0 Z`;
3253
+ if (n.look === "handDrawn") {
3254
+ let e = C.svg(a), t = y(n, {}), r = e.path(v, t);
3255
+ _ = a.insert(() => r, ":first-child"), _.attr("class", "basic label-container").attr("style", p(g));
3256
+ } else _ = a.insert("path", ":first-child").attr("class", "basic label-container").attr("style", i).attr("d", v);
3257
+ return c.attr("transform", `translate(${-o.width / 2}, ${-o.height / 2})`), _.attr("transform", `translate(${-l / 2}, ${-u / 2})`), E(n, _), n.calcIntersect = function(e, t) {
3258
+ return q.rect(e, t);
3259
+ }, n.intersect = function(e) {
3260
+ return t.info("Cloud intersect", n, e), q.rect(n, e);
3261
+ }, a;
3262
+ }
3263
+ n(Kt, "cloud");
3264
+ async function qt(e, t) {
3265
+ let { labelStyles: n, nodeStyles: r } = b(t);
3266
+ t.labelStyle = n;
3267
+ let { shapeSvg: i, bbox: a, halfPadding: o, label: s } = await w(e, t, D(t)), c = a.width + 8 * o, l = a.height + 2 * o, u = t.look === "neo" ? `
3268
+ M${-c / 2} ${l / 2 - 5}
3269
+ v${-l + 10}
3270
+ q0,-5 5,-5
3271
+ h${c - 10}
3272
+ q5,0 5,5
3273
+ v${l - 5}
3274
+ H${-c / 2}
3275
+ Z
3276
+ ` : `
3277
+ M${-c / 2} ${l / 2 - 5}
3278
+ v${-l + 10}
3279
+ q0,-5 5,-5
3280
+ h${c - 10}
3281
+ q5,0 5,5
3282
+ v${l - 10}
3283
+ q0,5 -5,5
3284
+ h${-(c - 10)}
3285
+ q-5,0 -5,-5
3286
+ Z
3287
+ `;
3288
+ if (!t.domId) throw Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);
3289
+ let d = i.append("path").attr("id", t.domId).attr("class", "node-bkg node-" + t.type).attr("style", r).attr("d", u);
3290
+ 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()), E(t, d), t.calcIntersect = function(e, t) {
3291
+ return q.rect(e, t);
3292
+ }, t.intersect = function(e) {
3293
+ return q.rect(t, e);
3294
+ }, i;
3295
+ }
3296
+ n(qt, "defaultMindmapNode");
3297
+ async function Jt(e, t) {
3298
+ var n;
3299
+ return le(e, t, { padding: (n = t.padding) == null ? 0 : n });
3300
+ }
3301
+ n(Jt, "mindmapCircle");
3302
+ var Yt = [
3303
+ {
3304
+ semanticName: "Process",
3305
+ name: "Rectangle",
3306
+ shortName: "rect",
3307
+ description: "Standard process shape",
3308
+ aliases: [
3309
+ "proc",
3310
+ "process",
3311
+ "rectangle"
3312
+ ],
3313
+ internalAliases: ["squareRect"],
3314
+ handler: ct
3315
+ },
3316
+ {
3317
+ semanticName: "Event",
3318
+ name: "Rounded Rectangle",
3319
+ shortName: "rounded",
3320
+ description: "Represents an event",
3321
+ aliases: ["event"],
3322
+ internalAliases: ["roundedRect"],
3323
+ handler: it
3324
+ },
3325
+ {
3326
+ semanticName: "Terminal Point",
3327
+ name: "Stadium",
3328
+ shortName: "stadium",
3329
+ description: "Terminal point",
3330
+ aliases: ["terminal", "pill"],
3331
+ handler: lt
3332
+ },
3333
+ {
3334
+ semanticName: "Subprocess",
3335
+ name: "Framed Rectangle",
3336
+ shortName: "fr-rect",
3337
+ description: "Subprocess",
3338
+ aliases: [
3339
+ "subprocess",
3340
+ "subproc",
3341
+ "framed-rectangle",
3342
+ "subroutine"
3343
+ ],
3344
+ handler: mt
3345
+ },
3346
+ {
3347
+ semanticName: "Database",
3348
+ name: "Cylinder",
3349
+ shortName: "cyl",
3350
+ description: "Database storage",
3351
+ aliases: [
3352
+ "db",
3353
+ "database",
3354
+ "cylinder"
3355
+ ],
3356
+ handler: xe
3357
+ },
3358
+ {
3359
+ semanticName: "Start",
3360
+ name: "Circle",
3361
+ shortName: "circle",
3362
+ description: "Starting point",
3363
+ aliases: ["circ"],
3364
+ handler: le
3365
+ },
3366
+ {
3367
+ semanticName: "Bang",
3368
+ name: "Bang",
3369
+ shortName: "bang",
3370
+ description: "Bang",
3371
+ aliases: ["bang"],
3372
+ handler: Gt
3373
+ },
3374
+ {
3375
+ semanticName: "Cloud",
3376
+ name: "Cloud",
3377
+ shortName: "cloud",
3378
+ description: "cloud",
3379
+ aliases: ["cloud"],
3380
+ handler: Kt
3381
+ },
3382
+ {
3383
+ semanticName: "Decision",
3384
+ name: "Diamond",
3385
+ shortName: "diam",
3386
+ description: "Decision-making step",
3387
+ aliases: [
3388
+ "decision",
3389
+ "diamond",
3390
+ "question"
3391
+ ],
3392
+ handler: tt
3393
+ },
3394
+ {
3395
+ semanticName: "Prepare Conditional",
3396
+ name: "Hexagon",
3397
+ shortName: "hex",
3398
+ description: "Preparation or condition step",
3399
+ aliases: ["hexagon", "prepare"],
3400
+ handler: je
3401
+ },
3402
+ {
3403
+ semanticName: "Data Input/Output",
3404
+ name: "Lean Right",
3405
+ shortName: "lean-r",
3406
+ description: "Represents input or output",
3407
+ aliases: ["lean-right", "in-out"],
3408
+ internalAliases: ["lean_right"],
3409
+ handler: He
3410
+ },
3411
+ {
3412
+ semanticName: "Data Input/Output",
3413
+ name: "Lean Left",
3414
+ shortName: "lean-l",
3415
+ description: "Represents output or input",
3416
+ aliases: ["lean-left", "out-in"],
3417
+ internalAliases: ["lean_left"],
3418
+ handler: Ve
3419
+ },
3420
+ {
3421
+ semanticName: "Priority Action",
3422
+ name: "Trapezoid Base Bottom",
3423
+ shortName: "trap-b",
3424
+ description: "Priority action",
3425
+ aliases: [
3426
+ "priority",
3427
+ "trapezoid-bottom",
3428
+ "trapezoid"
3429
+ ],
3430
+ handler: Tt
3431
+ },
3432
+ {
3433
+ semanticName: "Manual Operation",
3434
+ name: "Trapezoid Base Top",
3435
+ shortName: "trap-t",
3436
+ description: "Represents a manual task",
3437
+ aliases: [
3438
+ "manual",
3439
+ "trapezoid-top",
3440
+ "inv-trapezoid"
3441
+ ],
3442
+ internalAliases: ["inv_trapezoid"],
3443
+ handler: Re
3444
+ },
3445
+ {
3446
+ semanticName: "Stop",
3447
+ name: "Double Circle",
3448
+ shortName: "dbl-circ",
3449
+ description: "Represents a stop point",
3450
+ aliases: ["double-circle"],
3451
+ internalAliases: ["doublecircle"],
3452
+ handler: Ce
3453
+ },
3454
+ {
3455
+ semanticName: "Text Block",
3456
+ name: "Text Block",
3457
+ shortName: "text",
3458
+ description: "Text block",
3459
+ handler: vt
3460
+ },
3461
+ {
3462
+ semanticName: "Card",
3463
+ name: "Notched Rectangle",
3464
+ shortName: "notch-rect",
3465
+ description: "Represents a card",
3466
+ aliases: ["card", "notched-rectangle"],
3467
+ handler: se
3468
+ },
3469
+ {
3470
+ semanticName: "Lined/Shaded Process",
3471
+ name: "Lined Rectangle",
3472
+ shortName: "lin-rect",
3473
+ description: "Lined process shape",
3474
+ aliases: [
3475
+ "lined-rectangle",
3476
+ "lined-process",
3477
+ "lin-proc",
3478
+ "shaded-process"
3479
+ ],
3480
+ handler: ot
3481
+ },
3482
+ {
3483
+ semanticName: "Start",
3484
+ name: "Small Circle",
3485
+ shortName: "sm-circ",
3486
+ description: "Small starting point",
3487
+ aliases: ["start", "small-circle"],
3488
+ internalAliases: ["stateStart"],
3489
+ handler: ft
3490
+ },
3491
+ {
3492
+ semanticName: "Stop",
3493
+ name: "Framed Circle",
3494
+ shortName: "fr-circ",
3495
+ description: "Stop point",
3496
+ aliases: ["stop", "framed-circle"],
3497
+ internalAliases: ["stateEnd"],
3498
+ handler: dt
3499
+ },
3500
+ {
3501
+ semanticName: "Fork/Join",
3502
+ name: "Filled Rectangle",
3503
+ shortName: "fork",
3504
+ description: "Fork or join in process flow",
3505
+ aliases: ["join"],
3506
+ internalAliases: ["forkJoin"],
3507
+ handler: Oe
3508
+ },
3509
+ {
3510
+ semanticName: "Collate",
3511
+ name: "Hourglass",
3512
+ shortName: "hourglass",
3513
+ description: "Represents a collate operation",
3514
+ aliases: ["hourglass", "collate"],
3515
+ handler: Me
3516
+ },
3517
+ {
3518
+ semanticName: "Comment",
3519
+ name: "Curly Brace",
3520
+ shortName: "brace",
3521
+ description: "Adds a comment",
3522
+ aliases: ["comment", "brace-l"],
3523
+ handler: de
3524
+ },
3525
+ {
3526
+ semanticName: "Comment Right",
3527
+ name: "Curly Brace",
3528
+ shortName: "brace-r",
3529
+ description: "Adds a comment",
3530
+ handler: pe
3531
+ },
3532
+ {
3533
+ semanticName: "Comment with braces on both sides",
3534
+ name: "Curly Braces",
3535
+ shortName: "braces",
3536
+ description: "Adds a comment",
3537
+ handler: me
3538
+ },
3539
+ {
3540
+ semanticName: "Com Link",
3541
+ name: "Lightning Bolt",
3542
+ shortName: "bolt",
3543
+ description: "Communication link",
3544
+ aliases: ["com-link", "lightning-bolt"],
3545
+ handler: Ue
3546
+ },
3547
+ {
3548
+ semanticName: "Document",
3549
+ name: "Document",
3550
+ shortName: "doc",
3551
+ description: "Represents a document",
3552
+ aliases: ["doc", "document"],
3553
+ handler: At
3554
+ },
3555
+ {
3556
+ semanticName: "Delay",
3557
+ name: "Half-Rounded Rectangle",
3558
+ shortName: "delay",
3559
+ description: "Represents a delay",
3560
+ aliases: ["half-rounded-rectangle"],
3561
+ handler: ke
3562
+ },
3563
+ {
3564
+ semanticName: "Direct Access Storage",
3565
+ name: "Horizontal Cylinder",
3566
+ shortName: "h-cyl",
3567
+ description: "Direct access storage",
3568
+ aliases: ["das", "horizontal-cylinder"],
3569
+ handler: wt
3570
+ },
3571
+ {
3572
+ semanticName: "Disk Storage",
3573
+ name: "Lined Cylinder",
3574
+ shortName: "lin-cyl",
3575
+ description: "Disk storage",
3576
+ aliases: ["disk", "lined-cylinder"],
3577
+ handler: Ye
3578
+ },
3579
+ {
3580
+ semanticName: "Display",
3581
+ name: "Curved Trapezoid",
3582
+ shortName: "curv-trap",
3583
+ description: "Represents a display",
3584
+ aliases: ["curved-trapezoid", "display"],
3585
+ handler: he
3586
+ },
3587
+ {
3588
+ semanticName: "Divided Process",
3589
+ name: "Divided Rectangle",
3590
+ shortName: "div-rect",
3591
+ description: "Divided process shape",
3592
+ aliases: [
3593
+ "div-proc",
3594
+ "divided-rectangle",
3595
+ "divided-process"
3596
+ ],
3597
+ handler: Se
3598
+ },
3599
+ {
3600
+ semanticName: "Extract",
3601
+ name: "Triangle",
3602
+ shortName: "tri",
3603
+ description: "Extraction process",
3604
+ aliases: ["extract", "triangle"],
3605
+ handler: kt
3606
+ },
3607
+ {
3608
+ semanticName: "Internal Storage",
3609
+ name: "Window Pane",
3610
+ shortName: "win-pane",
3611
+ description: "Internal storage",
3612
+ aliases: ["internal-storage", "window-pane"],
3613
+ handler: Mt
3614
+ },
3615
+ {
3616
+ semanticName: "Junction",
3617
+ name: "Filled Circle",
3618
+ shortName: "f-circ",
3619
+ description: "Junction point",
3620
+ aliases: ["junction", "filled-circle"],
3621
+ handler: we
3622
+ },
3623
+ {
3624
+ semanticName: "Loop Limit",
3625
+ name: "Trapezoidal Pentagon",
3626
+ shortName: "notch-pent",
3627
+ description: "Loop limit step",
3628
+ aliases: ["loop-limit", "notched-pentagon"],
3629
+ handler: Et
3630
+ },
3631
+ {
3632
+ semanticName: "Manual File",
3633
+ name: "Flipped Triangle",
3634
+ shortName: "flip-tri",
3635
+ description: "Manual file operation",
3636
+ aliases: ["manual-file", "flipped-triangle"],
3637
+ handler: De
3638
+ },
3639
+ {
3640
+ semanticName: "Manual Input",
3641
+ name: "Sloped Rectangle",
3642
+ shortName: "sl-rect",
3643
+ description: "Manual input step",
3644
+ aliases: ["manual-input", "sloped-rectangle"],
3645
+ handler: st
3646
+ },
3647
+ {
3648
+ semanticName: "Multi-Document",
3649
+ name: "Stacked Document",
3650
+ shortName: "docs",
3651
+ description: "Multiple documents",
3652
+ aliases: [
3653
+ "documents",
3654
+ "st-doc",
3655
+ "stacked-document"
3656
+ ],
3657
+ handler: Qe
3658
+ },
3659
+ {
3660
+ semanticName: "Multi-Process",
3661
+ name: "Stacked Rectangle",
3662
+ shortName: "st-rect",
3663
+ description: "Multiple processes",
3664
+ aliases: [
3665
+ "procs",
3666
+ "processes",
3667
+ "stacked-rectangle"
3668
+ ],
3669
+ handler: Ze
3670
+ },
3671
+ {
3672
+ semanticName: "Stored Data",
3673
+ name: "Bow Tie Rectangle",
3674
+ shortName: "bow-rect",
3675
+ description: "Stored data",
3676
+ aliases: ["stored-data", "bow-tie-rectangle"],
3677
+ handler: J
3678
+ },
3679
+ {
3680
+ semanticName: "Summary",
3681
+ name: "Crossed Circle",
3682
+ shortName: "cross-circ",
3683
+ description: "Summary",
3684
+ aliases: ["summary", "crossed-circle"],
3685
+ handler: Z
3686
+ },
3687
+ {
3688
+ semanticName: "Tagged Document",
3689
+ name: "Tagged Document",
3690
+ shortName: "tag-doc",
3691
+ description: "Tagged document",
3692
+ aliases: ["tag-doc", "tagged-document"],
3693
+ handler: _t
3694
+ },
3695
+ {
3696
+ semanticName: "Tagged Process",
3697
+ name: "Tagged Rectangle",
3698
+ shortName: "tag-rect",
3699
+ description: "Tagged process",
3700
+ aliases: [
3701
+ "tagged-rectangle",
3702
+ "tag-proc",
3703
+ "tagged-process"
3704
+ ],
3705
+ handler: gt
3706
+ },
3707
+ {
3708
+ semanticName: "Paper Tape",
3709
+ name: "Flag",
3710
+ shortName: "flag",
3711
+ description: "Paper tape",
3712
+ aliases: ["paper-tape"],
3713
+ handler: jt
3714
+ },
3715
+ {
3716
+ semanticName: "Odd",
3717
+ name: "Odd",
3718
+ shortName: "odd",
3719
+ description: "Odd shape",
3720
+ internalAliases: ["rect_left_inv_arrow"],
3721
+ handler: nt
3722
+ },
3723
+ {
3724
+ semanticName: "Lined Document",
3725
+ name: "Lined Document",
3726
+ shortName: "lin-doc",
3727
+ description: "Lined document",
3728
+ aliases: ["lined-document"],
3729
+ handler: Xe
3730
+ }
3731
+ ], Xt = (/* @__PURE__ */ n(() => {
3732
+ let e = {
3733
+ state: ut,
3734
+ choice: ce,
3735
+ note: $e,
3736
+ rectWithTitle: rt,
3737
+ labelRect: Be,
3738
+ iconSquare: Ie,
3739
+ iconCircle: Pe,
3740
+ icon: Ne,
3741
+ iconRounded: Fe,
3742
+ imageSquare: Le,
3743
+ anchor: re,
3744
+ kanbanItem: Wt,
3745
+ mindmapCircle: Jt,
3746
+ defaultMindmapNode: qt,
3747
+ classBox: Bt,
3748
+ erBox: Ft,
3749
+ requirementBox: Vt
3750
+ }, t = [...Object.entries(e), ...Yt.flatMap((e) => [
3751
+ e.shortName,
3752
+ ..."aliases" in e ? e.aliases : [],
3753
+ ..."internalAliases" in e ? e.internalAliases : []
3754
+ ].map((t) => [t, e.handler]))];
3755
+ return Object.fromEntries(t);
3756
+ }, "generateShapeMap"))();
3757
+ function Zt(e) {
3758
+ return e in Xt;
3759
+ }
3760
+ n(Zt, "isValidShape");
3761
+ var Qt = /* @__PURE__ */ new Map();
3762
+ async function $t(e, t, n) {
3763
+ let r, i;
3764
+ t.shape === "rect" && (t.rx && t.ry ? t.shape = "roundedRect" : t.shape = "squareRect");
3765
+ let a = t.shape ? Xt[t.shape] : void 0;
3766
+ if (!a) throw Error(`No such shape: ${t.shape}. Please check your syntax.`);
3767
+ if (t.link) {
3768
+ var o;
3769
+ let s;
3770
+ n.config.securityLevel === "sandbox" ? s = "_top" : t.linkTarget && (s = t.linkTarget || "_blank"), r = e.insert("svg:a").attr("xlink:href", t.link).attr("target", (o = s) == null ? null : o), i = await a(r, t, n);
3771
+ } else i = await a(e, t, n), r = i;
3772
+ 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;
3773
+ }
3774
+ n($t, "insertNode");
3775
+ var en = /* @__PURE__ */ n((e, t) => {
3776
+ Qt.set(t.id, e);
3777
+ }, "setNodeElem"), tn = /* @__PURE__ */ n(() => {
3778
+ Qt.clear();
3779
+ }, "clear"), nn = /* @__PURE__ */ n((e) => {
3780
+ let n = Qt.get(e.id);
3781
+ t.trace("Transforming node", e.diff, e, "translate(" + (e.x - e.width / 2 - 5) + ", " + e.width / 2 + ")");
3782
+ let r = e.diff || 0;
3783
+ return e.clusterNode ? n.attr("transform", "translate(" + (e.x + r - e.width / 2) + ", " + (e.y - e.height / 2 - 8) + ")") : n.attr("transform", "translate(" + e.x + ", " + e.y + ")"), r;
3784
+ }, "positionNode");
3785
+ //#endregion
3786
+ export { $t as a, nn as c, R as i, en as l, tn as n, Zt as o, N as r, w as s, z as t, E as u };