ryugi-artifacts 1.12.2 → 1.12.3

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 (176) hide show
  1. package/dist/cli.cjs +1 -1
  2. package/dist/viewer/{CloudDocument-B2OX6t3e.js → CloudDocument-ErXoT2-W.js} +1 -1
  3. package/dist/viewer/{DocumentLayout-CcZ5K5eC.js → DocumentLayout-DDpywJ9Z.js} +157 -180
  4. package/dist/viewer/DocumentPage-DhlV9CLM.js +1 -0
  5. package/dist/viewer/{abnfDiagram-VCTEODGH-BwyorJKp.js → abnfDiagram-VCTEODGH-DZe1eaHo.js} +1 -1
  6. package/dist/viewer/{ar-SA-G6X2FPQ2-DhkEZphc.js → ar-SA-G6X2FPQ2-sn0h9JH2.js} +1 -1
  7. package/dist/viewer/{architecture-7GRP2DOG-Bl5CPsMS.js → architecture-7GRP2DOG-BvGJ2bde.js} +1 -1
  8. package/dist/viewer/{architectureDiagram-5GKGNRK7-BaHSeQgR.js → architectureDiagram-5GKGNRK7-B8ai_ZM2.js} +1 -1
  9. package/dist/viewer/{az-AZ-76LH7QW2-Dq_pf-jP.js → az-AZ-76LH7QW2-BBrxaZZ_.js} +1 -1
  10. package/dist/viewer/{bg-BG-XCXSNQG7-gBZ_kZ5X.js → bg-BG-XCXSNQG7-CATTDTZ5.js} +1 -1
  11. package/dist/viewer/{blockDiagram-I7D4REHJ-CEJ7CnVM.js → blockDiagram-I7D4REHJ-BV9daaky.js} +3 -3
  12. package/dist/viewer/{bn-BD-2XOGV67Q-mB4IlJ7X.js → bn-BD-2XOGV67Q-aiUGGar3.js} +1 -1
  13. package/dist/viewer/{c4Diagram-7LVT6UL2-DpzymfkJ.js → c4Diagram-7LVT6UL2-dDZFl2Ln.js} +1 -1
  14. package/dist/viewer/{ca-ES-6MX7JW3Y-CHkPol9h.js → ca-ES-6MX7JW3Y-D59FYVdN.js} +1 -1
  15. package/dist/viewer/channel-DNz5iSBO.js +1 -0
  16. package/dist/viewer/{chunk-4HAMMTFA-B9_yq81j.js → chunk-4HAMMTFA-Dm4OCu0o.js} +1 -1
  17. package/dist/viewer/chunk-75Z2AOVW-CkyZ2k2Y.js +2 -0
  18. package/dist/viewer/{chunk-DU6HZSFF-CDWc5UBY.js → chunk-DU6HZSFF-BWpgeLJJ.js} +1 -1
  19. package/dist/viewer/{chunk-EIO257PC-zMzCMW_Z.js → chunk-EIO257PC-AAgAMmgb.js} +1 -1
  20. package/dist/viewer/{chunk-F27PBJKO-qGDpbSI2.js → chunk-F27PBJKO-Zk52-grf.js} +1 -1
  21. package/dist/viewer/{chunk-GMAD6QVW-CgQkPOxU.js → chunk-GMAD6QVW-BTTT9Emi.js} +1 -1
  22. package/dist/viewer/{chunk-GVQU2GXP-DnQ_zZPe.js → chunk-GVQU2GXP-_G-RI5XM.js} +1 -1
  23. package/dist/viewer/{chunk-IMKFNOWR-CyF3KB4j.js → chunk-IMKFNOWR-xWlXXPiQ.js} +1 -1
  24. package/dist/viewer/{chunk-L3NEJ4N5-CkqFBTrv.js → chunk-L3NEJ4N5-BSZxGYQa.js} +1 -1
  25. package/dist/viewer/{chunk-OSK3NFVY-B5r6bIZy.js → chunk-OSK3NFVY-X_LAH-wP.js} +1 -1
  26. package/dist/viewer/{chunk-P2QGCYS3-DJOHCBv0.js → chunk-P2QGCYS3-iklY7skC.js} +1 -1
  27. package/dist/viewer/{chunk-POPQ4Y6H-at1Afs_1.js → chunk-POPQ4Y6H-B0smFSPK.js} +1 -1
  28. package/dist/viewer/{chunk-PWAF6VOD-BXwjNm2i.js → chunk-PWAF6VOD-CF11-un1.js} +1 -1
  29. package/dist/viewer/{chunk-SHT3W25Y-_XyeIwHN.js → chunk-SHT3W25Y-CjETVWE-.js} +1 -1
  30. package/dist/viewer/{chunk-SVP7TREG-4u1H3mwA.js → chunk-SVP7TREG-DxMa9nrz.js} +1 -1
  31. package/dist/viewer/{chunk-TICWLB2K-BBSUNz_c.js → chunk-TICWLB2K-C-nBraMU.js} +1 -1
  32. package/dist/viewer/classDiagram-ZZMXUADV-CqLH7hgX.js +1 -0
  33. package/dist/viewer/classDiagram-v2-VYDZK3BY-CqLH7hgX.js +1 -0
  34. package/dist/viewer/{cs-CZ-2BRQDIVT-WV9McUKD.js → cs-CZ-2BRQDIVT-CARh_hx1.js} +1 -1
  35. package/dist/viewer/{cynefin-OW5HDTMX-B-FRYmfA.js → cynefin-OW5HDTMX-BXlWMzIh.js} +1 -1
  36. package/dist/viewer/{cynefinDiagram-5FMLGOSQ-BA3QpMlg.js → cynefinDiagram-5FMLGOSQ-pkLzuMHF.js} +1 -1
  37. package/dist/viewer/{da-DK-5WZEPLOC-BrOMeG39.js → da-DK-5WZEPLOC-CYFlSn5U.js} +1 -1
  38. package/dist/viewer/{dagre-GXQ25YYZ-CmlnwCJt.js → dagre-GXQ25YYZ-Bxxfxlkb.js} +1 -1
  39. package/dist/viewer/{de-DE-XR44H4JA-CgbNVmyI.js → de-DE-XR44H4JA-D1uj5Qpl.js} +1 -1
  40. package/dist/viewer/{diagram-S7CK7UJ4-Dg_jqdtw.js → diagram-S7CK7UJ4-BLWyjitR.js} +1 -1
  41. package/dist/viewer/{diagram-UQ7AKVKN-CWaIKMB0.js → diagram-UQ7AKVKN-BYwUR3Mc.js} +1 -1
  42. package/dist/viewer/{diagram-VSXAHHWV-MzIJiSe8.js → diagram-VSXAHHWV-DiLlG6yw.js} +1 -1
  43. package/dist/viewer/{diagram-VX7I27RA-DUhQ4i7u.js → diagram-VX7I27RA-BwbUgxKJ.js} +1 -1
  44. package/dist/viewer/{diagram-Z3DM3KII-BS6ObAUC.js → diagram-Z3DM3KII-zG6u60bF.js} +1 -1
  45. package/dist/viewer/{dist-DdzGOsi2.js → dist-2nQYHckl.js} +4 -4
  46. package/dist/viewer/{dist-BzJQwmvX.js → dist-B3PKJlCS.js} +1 -1
  47. package/dist/viewer/{dist-B8Lv2vMq.js → dist-B9-Kw9nq.js} +1 -1
  48. package/dist/viewer/{dist-Ct5lEZ0N.js → dist-BRkE2bhd.js} +1 -1
  49. package/dist/viewer/{dist-BS7l2kYN.js → dist-BZtzUt76.js} +1 -1
  50. package/dist/viewer/{dist-SM0J-pDO.js → dist-BiQoxjeb.js} +1 -1
  51. package/dist/viewer/{dist-_uxaiDmU.js → dist-BltcbJoX.js} +1 -1
  52. package/dist/viewer/{dist-ZWKcMFTj.js → dist-BryVba88.js} +1 -1
  53. package/dist/viewer/{dist-WBFAlCBt.js → dist-C3EPhkS3.js} +1 -1
  54. package/dist/viewer/{dist-DcuqbkdR.js → dist-CKgRhgtx.js} +1 -1
  55. package/dist/viewer/{dist-CikCUJ2t.js → dist-CafkAkQ9.js} +1 -1
  56. package/dist/viewer/{dist-Dk4q8Mo3.js → dist-Cg1SE3Te.js} +1 -1
  57. package/dist/viewer/{dist-Ca3ufzBu.js → dist-D0PtMtMv.js} +1 -1
  58. package/dist/viewer/{dist-B1eEUuu0.js → dist-D4H3qpSC.js} +1 -1
  59. package/dist/viewer/{dist-BHR2FX7Y.js → dist-DCACTl3W.js} +1 -1
  60. package/dist/viewer/{dist-D2BzUUmp.js → dist-DGbyfORn.js} +1 -1
  61. package/dist/viewer/{dist-DpPbcj1p.js → dist-DGxGKj7q.js} +1 -1
  62. package/dist/viewer/{dist-CyPmYQaJ.js → dist-D_U33aIH.js} +1 -1
  63. package/dist/viewer/{dist-9H4K5ix0.js → dist-Dbz8-8jq.js} +1 -1
  64. package/dist/viewer/{dist-BorQwBNI.js → dist-DiNrp7EN.js} +1 -1
  65. package/dist/viewer/{dist-C6yK3pAM.js → dist-J1EQvRhW.js} +1 -1
  66. package/dist/viewer/{dist-DFvgmf_n.js → dist-Wj_cSHwe.js} +1 -1
  67. package/dist/viewer/{dist-CMIAphY9.js → dist-gEU723A9.js} +1 -1
  68. package/dist/viewer/{dist-yJDNdV0A.js → dist-kkT_NMQP.js} +1 -1
  69. package/dist/viewer/{ebnfDiagram-PWID7BFC-CCSNYB4L.js → ebnfDiagram-PWID7BFC-BRp2UKsq.js} +1 -1
  70. package/dist/viewer/{el-GR-BZB4AONW-C_pXDFW7.js → el-GR-BZB4AONW-dC7kVwXv.js} +1 -1
  71. package/dist/viewer/{en-B4ZKOASM-C4mmKH41.js → en-B4ZKOASM-CrQRxRuf.js} +1 -1
  72. package/dist/viewer/{erDiagram-RLTQ6QDP-PDGWfqA7.js → erDiagram-RLTQ6QDP-B-U8hQGQ.js} +1 -1
  73. package/dist/viewer/{es-ES-U4NZUMDT-CIBbeSjd.js → es-ES-U4NZUMDT-ChAQ8bg8.js} +1 -1
  74. package/dist/viewer/{eu-ES-A7QVB2H4-BVJBmDMo.js → eu-ES-A7QVB2H4-DA9ArloB.js} +1 -1
  75. package/dist/viewer/{eventmodeling-NTZA5JFV-CUPY4M1x.js → eventmodeling-NTZA5JFV-CATeUuOQ.js} +1 -1
  76. package/dist/viewer/{fa-IR-HGAKTJCU-BhmiDKan.js → fa-IR-HGAKTJCU-VUzc-ygi.js} +1 -1
  77. package/dist/viewer/{fi-FI-Z5N7JZ37-CURbgYPC.js → fi-FI-Z5N7JZ37-DjTsUpuE.js} +1 -1
  78. package/dist/viewer/floating-ui.react-dom-CCnwLChu.js +1 -0
  79. package/dist/viewer/flowDiagram-HODETNUW-DCxUPH99.js +1 -0
  80. package/dist/viewer/{fr-FR-RHASNOE6-ux_eRdgy.js → fr-FR-RHASNOE6-Ci3LPGFj.js} +1 -1
  81. package/dist/viewer/{ganttDiagram-EL5Y4UJY-BUm55-xG.js → ganttDiagram-EL5Y4UJY-Bant6Uhh.js} +1 -1
  82. package/dist/viewer/{gitGraph-4MIJSDKK-C3CdCDb5.js → gitGraph-4MIJSDKK-BYZnsBO9.js} +1 -1
  83. package/dist/viewer/{gitGraphDiagram-WWUBYQGX-BaOtu-F2.js → gitGraphDiagram-WWUBYQGX--dMedsqU.js} +1 -1
  84. package/dist/viewer/{gl-ES-HMX3MZ6V-Cihuelm2.js → gl-ES-HMX3MZ6V-B2Tu2K8l.js} +1 -1
  85. package/dist/viewer/{he-IL-6SHJWFNN-Bs35uNZ3.js → he-IL-6SHJWFNN-CUed3IcZ.js} +1 -1
  86. package/dist/viewer/{hi-IN-IWLTKZ5I-Bkks6B5Q.js → hi-IN-IWLTKZ5I-ZWPfIHI4.js} +1 -1
  87. package/dist/viewer/{hu-HU-A5ZG7DT2-BnODKUjs.js → hu-HU-A5ZG7DT2-DUBovOWD.js} +1 -1
  88. package/dist/viewer/{id-ID-SAP4L64H-BYIP832p.js → id-ID-SAP4L64H-BLZCGM3L.js} +1 -1
  89. package/dist/viewer/{image-GAAHSSAO-CAc-N7rt.js → image-GAAHSSAO-DYsENtM3.js} +1 -1
  90. package/dist/viewer/index.css +1 -1
  91. package/dist/viewer/index.html +3 -0
  92. package/dist/viewer/index.js +8 -57
  93. package/dist/viewer/index2.css +90 -0
  94. package/dist/viewer/{info-A6RAGUB7-BfTkwG6X.js → info-A6RAGUB7-w-CNJ77m.js} +1 -1
  95. package/dist/viewer/{infoDiagram-27XIBGKW-DLRYUeUy.js → infoDiagram-27XIBGKW-b-xaLTtH.js} +1 -1
  96. package/dist/viewer/isObjectLike-DnuJWahO.js +1 -0
  97. package/dist/viewer/{ishikawaDiagram-5VMMS53U-Bs0ln1Mk.js → ishikawaDiagram-5VMMS53U-KM3sgH18.js} +1 -1
  98. package/dist/viewer/{it-IT-JPQ66NNP-7rCwp765.js → it-IT-JPQ66NNP-CPO8Rrg9.js} +1 -1
  99. package/dist/viewer/{ja-JP-DBVTYXUO-B86xwKuA.js → ja-JP-DBVTYXUO-Bqh2sg-e.js} +1 -1
  100. package/dist/viewer/{journeyDiagram-3NMN7TZE-DIAOPmBd.js → journeyDiagram-3NMN7TZE-GDq-b_qY.js} +1 -1
  101. package/dist/viewer/{kaa-6HZHGXH3-BTtaFW15.js → kaa-6HZHGXH3-BHK6hqsW.js} +1 -1
  102. package/dist/viewer/{kab-KAB-ZGHBKWFO-YwLYv-FV.js → kab-KAB-ZGHBKWFO-CXaP0I50.js} +1 -1
  103. package/dist/viewer/{kanban-definition-UXKFOSKX-DngKNwm_.js → kanban-definition-UXKFOSKX-wraCvgkD.js} +1 -1
  104. package/dist/viewer/{kk-KZ-P5N5QNE5-BKU0B0Y3.js → kk-KZ-P5N5QNE5-D7H5979m.js} +1 -1
  105. package/dist/viewer/{km-KH-HSX4SM5Z-CL5_mtQe.js → km-KH-HSX4SM5Z-CtDVxce4.js} +1 -1
  106. package/dist/viewer/{ko-KR-MTYHY66A-BQSh_Zrz.js → ko-KR-MTYHY66A-CdJ0FrmO.js} +1 -1
  107. package/dist/viewer/{ku-TR-6OUDTVRD-BGZnZD-p.js → ku-TR-6OUDTVRD-CB9MDqXw.js} +1 -1
  108. package/dist/viewer/{lt-LT-XHIRWOB4-CUr6tXWJ.js → lt-LT-XHIRWOB4-J3mKD9Yt.js} +1 -1
  109. package/dist/viewer/{lv-LV-5QDEKY6T-Cvmn527v.js → lv-LV-5QDEKY6T-DJib9A78.js} +1 -1
  110. package/dist/viewer/{mermaid-parser.core-Cd74p1Qw.js → mermaid-parser.core-eTBicIMn.js} +3 -3
  111. package/dist/viewer/{mindmap-definition-YA3MSWOX-Bc1SjpoY.js → mindmap-definition-YA3MSWOX-C8SO9o65.js} +1 -1
  112. package/dist/viewer/{mr-IN-CRQNXWMA-Bplsagq2.js → mr-IN-CRQNXWMA-_BBrbbUD.js} +1 -1
  113. package/dist/viewer/{my-MM-5M5IBNSE-Do1Qj59Y.js → my-MM-5M5IBNSE-CuVJj81j.js} +1 -1
  114. package/dist/viewer/{nb-NO-T6EIAALU-Bie5rHOp.js → nb-NO-T6EIAALU-BAekv9I_.js} +1 -1
  115. package/dist/viewer/{nl-NL-IS3SIHDZ-Dc4FJPqi.js → nl-NL-IS3SIHDZ-BouF0GPZ.js} +1 -1
  116. package/dist/viewer/{nn-NO-6E72VCQL-DCW6lwYm.js → nn-NO-6E72VCQL-D-ZLT9aD.js} +1 -1
  117. package/dist/viewer/{oc-FR-POXYY2M6-DMIzMK4T.js → oc-FR-POXYY2M6-BJzdk79f.js} +1 -1
  118. package/dist/viewer/{pa-IN-N4M65BXN-41DD7OQe.js → pa-IN-N4M65BXN-B6GvFwaE.js} +1 -1
  119. package/dist/viewer/{packet-AYTQ26CC-Bu-WAKTD.js → packet-AYTQ26CC-Nm-7d4T7.js} +1 -1
  120. package/dist/viewer/{pegDiagram-XKGWAZYB-uVPAabVE.js → pegDiagram-XKGWAZYB-7sFK4xlW.js} +1 -1
  121. package/dist/viewer/percentages-BXMCSKIN-DHf8nVFi.js +1 -0
  122. package/dist/viewer/{pie-WAS4IAKB-DQReqHvw.js → pie-WAS4IAKB-DUW05HU3.js} +1 -1
  123. package/dist/viewer/{pieDiagram-E7YTZNPT-C3oXg-0M.js → pieDiagram-E7YTZNPT-1LfELp8G.js} +1 -1
  124. package/dist/viewer/{pl-PL-T2D74RX3-Alwp-N8q.js → pl-PL-T2D74RX3-B-hXZixo.js} +1 -1
  125. package/dist/viewer/{prod-ySJSNXbS.js → prod-Cv5Ho3H4.js} +12 -12
  126. package/dist/viewer/{pt-BR-5N22H2LF-B5hujQ7a.js → pt-BR-5N22H2LF-DUp6NEHT.js} +1 -1
  127. package/dist/viewer/{pt-PT-UZXXM6DQ-2SfaLzgV.js → pt-PT-UZXXM6DQ-BfglvMcg.js} +1 -1
  128. package/dist/viewer/{quadrantDiagram-AXDQQJYC-Dq6DcHSL.js → quadrantDiagram-AXDQQJYC-BnwsLLeU.js} +1 -1
  129. package/dist/viewer/{radar-RG4KPBEZ-D_r12v0L.js → radar-RG4KPBEZ-C-qb8AwS.js} +1 -1
  130. package/dist/viewer/{railroad-74A4TZTK-JLrx94cB.js → railroad-74A4TZTK-CN-vYYIp.js} +1 -1
  131. package/dist/viewer/{railroad-abnf-HS5TGJTU-zGEQrPX3.js → railroad-abnf-HS5TGJTU-CIbwPEoO.js} +1 -1
  132. package/dist/viewer/{railroad-ebnf-LZEXJU2U-CwEVA1VE.js → railroad-ebnf-LZEXJU2U-BiGh6OTy.js} +1 -1
  133. package/dist/viewer/{railroad-peg-WCYAUIDC-aKEE6HSg.js → railroad-peg-WCYAUIDC-Ch799Qw2.js} +1 -1
  134. package/dist/viewer/{railroadDiagram-O6MQD6OU-DrnlOatY.js → railroadDiagram-O6MQD6OU-BxlqXGDG.js} +1 -1
  135. package/dist/viewer/{requirementDiagram-BXWQKSXE-DKxY-NWP.js → requirementDiagram-BXWQKSXE-XVRYI7OR.js} +1 -1
  136. package/dist/viewer/{ro-RO-JPDTUUEW-JOyBW8W2.js → ro-RO-JPDTUUEW-Y812-puk.js} +1 -1
  137. package/dist/viewer/{ru-RU-B4JR7IUQ-BLbtgTqp.js → ru-RU-B4JR7IUQ-BndPTXfo.js} +1 -1
  138. package/dist/viewer/{sankeyDiagram-P5KCCOFB-DO2JtEMk.js → sankeyDiagram-P5KCCOFB-B1FoUvnF.js} +1 -1
  139. package/dist/viewer/{sequenceDiagram-WJ2MYXX4-C1sYn_3k.js → sequenceDiagram-WJ2MYXX4-CHGkJ-74.js} +1 -1
  140. package/dist/viewer/{si-LK-N5RQ5JYF-ESFevx_w.js → si-LK-N5RQ5JYF-DYWr8xIl.js} +1 -1
  141. package/dist/viewer/{sk-SK-C5VTKIMK-eDBREo_B.js → sk-SK-C5VTKIMK-B1HdCVri.js} +1 -1
  142. package/dist/viewer/{sl-SI-NN7IZMDC-BqXM_BeS.js → sl-SI-NN7IZMDC-C6cApXCo.js} +1 -1
  143. package/dist/viewer/{stateDiagram-D77RDMKH-CJvvpxuS.js → stateDiagram-D77RDMKH-Dd2piKTM.js} +1 -1
  144. package/dist/viewer/stateDiagram-v2-MP3YSRHH-CMzZ28HG.js +1 -0
  145. package/dist/viewer/subset-shared.chunk-DqyiCz6a.js +1 -0
  146. package/dist/viewer/{subset-worker.chunk-DiOJqdEr.js → subset-worker.chunk-Nz3omXrD.js} +1 -1
  147. package/dist/viewer/{sv-SE-XGPEYMSR-DpsnI9cb.js → sv-SE-XGPEYMSR-m7n_gaEP.js} +1 -1
  148. package/dist/viewer/{swimlanes-42K2YHIH-BlmcmFmq.js → swimlanes-42K2YHIH-C1xn4kn-.js} +1 -1
  149. package/dist/viewer/swimlanesDiagram-VR7AAH4N-B0Cefwg_.js +8 -0
  150. package/dist/viewer/{ta-IN-2NMHFXQM-C_0XjBYF.js → ta-IN-2NMHFXQM-Dwv0JTaB.js} +1 -1
  151. package/dist/viewer/{th-TH-HPSO5L25-OjEhQMpS.js → th-TH-HPSO5L25-NCvMwu7T.js} +1 -1
  152. package/dist/viewer/{timeline-definition-24CTP7MA-pst6amGk.js → timeline-definition-24CTP7MA-BrMhbaT0.js} +1 -1
  153. package/dist/viewer/{tr-TR-DEFEU3FU-Dm4e1xKH.js → tr-TR-DEFEU3FU-C-6gKtI3.js} +1 -1
  154. package/dist/viewer/{treeView-Q6P3EWNA-DaAtai94.js → treeView-Q6P3EWNA-BUR1hhrC.js} +1 -1
  155. package/dist/viewer/{treemap-WGGIJYW6-BrSC50io.js → treemap-WGGIJYW6-DoZbg1PH.js} +1 -1
  156. package/dist/viewer/{uk-UA-QMV73CPH-CfLwpRAs.js → uk-UA-QMV73CPH-DeteT8VE.js} +1 -1
  157. package/dist/viewer/useSandboxFrame-CqqcCy4p.js +58 -0
  158. package/dist/viewer/{vennDiagram-4TSXK5OY-BSoX8DTP.js → vennDiagram-4TSXK5OY-pDrxrb7z.js} +1 -1
  159. package/dist/viewer/{vi-VN-M7AON7JQ-mIsW2M_F.js → vi-VN-M7AON7JQ-DHlBIApx.js} +1 -1
  160. package/dist/viewer/{wardley-WFR3VGLG-CtJjyNRB.js → wardley-WFR3VGLG-QixpmoDn.js} +1 -1
  161. package/dist/viewer/{wardleyDiagram-VM6X3IG4-B5IWg9e7.js → wardleyDiagram-VM6X3IG4-WkBzz7ti.js} +1 -1
  162. package/dist/viewer/{xychartDiagram-S5SC5T6Z-DbWncZlG.js → xychartDiagram-S5SC5T6Z-CVl73WG8.js} +1 -1
  163. package/dist/viewer/{zh-CN-LNUGB5OW-BHKxQHPI.js → zh-CN-LNUGB5OW-r9nH3Oxj.js} +1 -1
  164. package/dist/viewer/{zh-HK-E62DVLB3-C7ow-qQq.js → zh-HK-E62DVLB3-DtQ01J51.js} +1 -1
  165. package/dist/viewer/{zh-TW-RAJ6MFWO-cMHXP31O.js → zh-TW-RAJ6MFWO-DBGFFfGm.js} +1 -1
  166. package/package.json +2 -1
  167. package/dist/viewer/DocumentPage-BIWUFGFf.js +0 -1
  168. package/dist/viewer/channel-CoY9xRKf.js +0 -1
  169. package/dist/viewer/chunk-75Z2AOVW-CdsddFLa.js +0 -2
  170. package/dist/viewer/classDiagram-ZZMXUADV-CWZttORQ.js +0 -1
  171. package/dist/viewer/classDiagram-v2-VYDZK3BY-CWZttORQ.js +0 -1
  172. package/dist/viewer/flowDiagram-HODETNUW-MvatQiHP.js +0 -1
  173. package/dist/viewer/percentages-BXMCSKIN-J4WEidxJ.js +0 -1
  174. package/dist/viewer/stateDiagram-v2-MP3YSRHH-dDB6H_u-.js +0 -1
  175. package/dist/viewer/subset-shared.chunk-ByjcYtUv.js +0 -1
  176. package/dist/viewer/swimlanesDiagram-VR7AAH4N-BjBtRBuJ.js +0 -8
@@ -1,4 +1,4 @@
1
- import{a as e,p as t,r as n,u as r}from"./chunk-75Z2AOVW-CdsddFLa.js";import{n as i,t as a}from"./src-Caqqw6Gw.js";import{n as o}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{A as s,B as c,M as l,T as u,b as d,f,g as p,x as m,z as h}from"./chunk-DU6HZSFF-CDWc5UBY.js";import{a as g,i as _,r as v,t as y}from"./chunk-P2QGCYS3-DJOHCBv0.js";import{t as b}from"./chunk-PWAF6VOD-BXwjNm2i.js";import{n as x,r as S}from"./chunk-GMAD6QVW-CgQkPOxU.js";import{t as C}from"./rough.esm-Dy-Kn_BL.js";var w=1,T=3;async function E(e){let n=e.getElementsByTagName(`img`);if(!n||n.length===0)return;let r=!D(e);await Promise.all([...n].map(e=>new Promise(n=>{function i(){if(e.style.display=`flex`,e.style.flexDirection=`column`,r){let n=m().fontSize?m().fontSize:window.getComputedStyle(document.body).fontSize,[r=f.fontSize]=t(n),i=r*5+`px`;e.style.minWidth=i,e.style.maxWidth=i}else e.style.width=`100%`;n(e)}o(i,`setupImage`),setTimeout(()=>{e.complete&&i()}),e.addEventListener(`error`,i),e.addEventListener(`load`,i)})))}o(E,`configureLabelImages`);function D(e){return e.nodeType===T?e.textContent?.trim()!==``:e.nodeType!==w||e.tagName.toLowerCase()===`img`?!1:[...e.childNodes].some(D)}o(D,`hasTextBesidesImages`);var O=3,k=32,A=o(async(t,n,i)=>{let o=m(),s=t.insert(`g`).attr(`class`,i??`node default`).attr(`id`,n.domId||n.id),c=s.insert(`g`).attr(`class`,`label`).attr(`style`,r(n.labelStyle)),l=[{text:typeof n.label==`string`?n.label:n.label?.[0]??``,cssClass:`c4-name`},{text:n.stereotype,cssClass:`c4-type`},...(n.description??[]).map(e=>({text:e,cssClass:`c4-descr`}))].filter(e=>e.text),u=n.width?Math.max(n.width-2*(n.padding??0),k):m().flowchart?.wrappingWidth??200,d=o.c4?.wrap??!0?u:1/0,f=await Promise.all(l.map(async t=>{let r=c.append(`g`).attr(`class`,t.cssClass),i=await x(r,h(e(t.text??``),o),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:d,style:n.labelStyle},o);return a(i).selectAll(`tspan.text-outer-tspan`).attr(`text-anchor`,`middle`),a(i).selectAll(`tspan.text-inner-tspan`).attr(`font-weight`,null).attr(`font-style`,null),{el:r,box:r.node().getBBox()}})),p=Math.max(...f.map(({box:e})=>e.width),0),g=0;for(let{el:e,box:t}of f)e.attr(`transform`,`translate(${p/2-t.x-t.width/2}, ${g-t.y})`),g+=t.height+O;let _=f.length>0?g-O:0;return c.insert(`rect`,`:first-child`),c.attr(`transform`,`translate(${-p/2}, ${-_/2})`),{shapeSvg:s,bbox:c.node().getBBox(),halfPadding:(n.padding??0)/2,label:c}},`c4LabelHelper`),j=o(async(t,n,i)=>{if(n.stereotype!==void 0)return A(t,n,i);let o,s=n.useHtmlLabels||p(m()?.htmlLabels);o=i||`node default`;let c=t.insert(`g`).attr(`class`,o).attr(`id`,n.domId||n.id),l=c.insert(`g`).attr(`class`,`label`).attr(`style`,r(n.labelStyle)),u;u=n.label===void 0?``:typeof n.label==`string`?n.label:n.label[0];let d=!!n.icon||!!n.img,f=n.labelType===`markdown`,g=await x(l,h(e(u),m()),{useHtmlLabels:s,width:n.width||n.wrappingWidth||m().flowchart?.wrappingWidth,classes:f?`markdown-node-label`:``,style:n.labelStyle,addSvgBackground:d,markdown:f},m()),_=(n?.padding??0)/2,v;if(s){let e=g.children[0],t=a(g);await E(e),v=await S.measure(()=>e.getBoundingClientRect()),t.attr(`width`,v.width),t.attr(`height`,v.height)}else v=await S.measure(()=>g.getBBox());return s?l.attr(`transform`,`translate(`+-v.width/2+`, `+-v.height/2+`)`):l.attr(`transform`,`translate(0, `+-v.height/2+`)`),n.centerLabel&&l.attr(`transform`,`translate(`+-v.width/2+`, `+-v.height/2+`)`),l.insert(`rect`,`:first-child`),{shapeSvg:c,bbox:v,halfPadding:_,label:l}},`labelHelper`),M=o(async(t,n,r)=>{let i=r.useHtmlLabels??u(m()),o=t.insert(`g`).attr(`class`,`label`).attr(`style`,r.labelStyle||``),s=await x(o,h(e(n),m()),{useHtmlLabels:i,width:r.width||m()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),c=r.padding/2,l;if(u(m())){let e=s.children[0],t=a(s);l=await S.measure(()=>e.getBoundingClientRect()),t.attr(`width`,l.width),t.attr(`height`,l.height)}else l=await S.measure(()=>s.getBBox());return i?o.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`):o.attr(`transform`,`translate(0, `+-l.height/2+`)`),r.centerLabel&&o.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`),o.insert(`rect`,`:first-child`),{shapeSvg:t,bbox:l,halfPadding:c,label:o}},`insertLabel`),N=o((e,t,n)=>{if(n){e.width=n.width,e.height=n.height;return}let r=t.node().getBBox();e.width=r.width,e.height=r.height},`updateNodeBounds`),P=o((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function F(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}o(F,`createPathFromPoints`);function I(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}o(I,`generateFullSineWavePoints`);function L(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}o(L,`generateCirclePoints`);function ee(e){let t=Array.from(e.childNodes).filter(e=>e.tagName===`path`),n=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),r=t.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);n.setAttribute(`d`,r);let i=t.find(e=>e.getAttribute(`fill`)!==`none`),a=t.find(e=>e.getAttribute(`stroke`)!==`none`),s=o((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(i){let e={fill:s(i,`fill`),"fill-opacity":s(i,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}if(a){let e={stroke:s(a,`stroke`),"stroke-width":s(a,`stroke-width`)??`1`,"stroke-opacity":s(a,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(n),c}o(ee,`mergePaths`);var R=o((e,t)=>{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;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),{x:n+c,y:r+l}},`intersectRect`),z=o((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),te=o(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let o=m(),s=u(o);return await x(e,a,{style:n,isTitle:r,useHtmlLabels:s,markdown:!1,isNode:i,width:1/0},o)},`createLabel`);function B(e,t){return e.intersect(t)}o(B,`intersectNode`);var ne=B;function V(e,t,n,r){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);r.x<i&&(l=-l);var u=Math.abs(t*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}o(V,`intersectEllipse`);var H=V;function re(e,t,n){return H(e,t,t,n)}o(re,`intersectCircle`);var ie=re;function U(e,t,n,r){{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;if(s!==0&&c!==0&&W(s,c))return;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;if(Math.abs(p)<l&&Math.abs(m)<l&&W(p,m))return;let h=i*d-u*a;if(h===0)return;let g=Math.abs(h/2),_=a*f-d*o,v=_<0?(_-g)/h:(_+g)/h;return _=u*o-i*f,{x:v,y:_<0?(_-g)/h:(_+g)/h}}}o(U,`intersectLine`);function W(e,t){return e*t>0}o(W,`sameSign`);var G=U;function ae(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r<t.length;r++){let i=t[r],o=t[r<t.length-1?r+1:0],s=G(e,n,{x:c+i.x,y:l+i.y},{x:c+o.x,y:l+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(e,t){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);return a<c?-1:a===c?0:1}),a[0]):e}o(ae,`intersectPolygon`);var K={node:ne,circle:ie,ellipse:H,polygon:ae,rect:R};function oe(e,t){let{labelStyles:n}=_(t);t.labelStyle=n;let a=P(t),o=a;a||(o=`anchor`);let s=e.insert(`g`).attr(`class`,o).attr(`id`,t.domId||t.id),{cssStyles:c}=t,l=C.svg(s),u=g(t,{fill:`black`,stroke:`none`,fillStyle:`solid`});t.look!==`handDrawn`&&(u.roughness=0);let d=l.circle(0,0,2,u),f=s.insert(()=>d,`:first-child`);return f.attr(`class`,`anchor`).attr(`style`,r(c)),N(t,f),t.intersect=function(e){return i.info(`Circle intersect`,t,1,e),K.circle(t,1,e)},s}o(oe,`anchor`);function se(e,t,n,r,i,a,o){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);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);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;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}o(se,`generateArcPoints`);function ce(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}o(ce,`calculateArcSagitta`);async function le(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,s=t.look===`neo`?12:i,c=o(e=>e+s,`calcTotalHeight`),l=o(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await j(e,t,P(t)),f=c(t?.height?t?.height:d.height),[p,m]=l(f),h=ce(f,p,m),v=(t?.width?t?.width:d.width)+a*2+h-h,y=f,{cssStyles:b}=t,x=[{x:v/2,y:-y/2},{x:-v/2,y:-y/2},...se(-v/2,-y/2,-v/2,y/2,p,m,!1),{x:v/2,y:y/2},...se(v/2,y/2,v/2,-y/2,p,m,!0)],S=C.svg(u),w=g(t,{});t.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`);let T=F(x),E=S.path(T,w),D=u.insert(()=>E,`:first-child`);return D.attr(`class`,`basic label-container outer-path`),b&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,b),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),D.attr(`transform`,`translate(${p/2}, 0)`),N(t,D),t.intersect=function(e){return K.polygon(t,x,e)},u}o(le,`bowTieRect`);async function ue(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r;let{shapeSvg:a,bbox:s,label:c}=await j(e,t,P(t)),l=n?.nodeBorder??n?.lineColor??`currentColor`,u=t.padding??12,d=Math.max(s.width+u*2,t.width??0,80),f=Math.max(Math.min(d*.08,12),5),p=Math.max(s.height+u*2+f,t.height??0),m=-p/2+f,h=p/2,v=d*.72,y=[`M${-d/2},${m}`,`L${-v/2},${h}`,`A${v/2},${f} 0 0 0 ${v/2},${h}`,`L${d/2},${m}`,`A${d/2},${f} 0 0 0 ${-d/2},${m}`,`Z`].join(` `),{cssStyles:b}=t,x=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=C.svg(a).path(y,g(t,{}));x.node()?.appendChild(e),b&&x.attr(`style`,b)}else x.append(`path`).attr(`d`,y).attr(`style`,i);x.append(`ellipse`).attr(`cx`,0).attr(`cy`,m).attr(`rx`,d/2).attr(`ry`,f).attr(`style`,`fill:none;stroke:${l};stroke-width:1px`),N(t,x);let S=m+(h-m)/2;c.attr(`transform`,`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${S-s.height/2-(s.y-(s.top??0))})`);let w=o((e,t,n)=>Array.from({length:13},(r,i)=>{let a=Math.PI-i*Math.PI/12;return{x:e*Math.cos(a),y:t+n*f*Math.sin(a)}}),`arc`),T=[...w(d/2,m,-1),...w(v/2,h,1).reverse()];return t.intersect=function(e){return K.polygon(t,T,e)},a}o(ue,`bucket`);var de=20,fe=8,pe=80,me=8;async function he(e,t){let{themeVariables:n}=m(),i=n.clusterBkg,a=n.clusterBorder,{nodeStyles:o}=_(t),{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=t.padding??8,d=c.height,f=Math.max(c.width+l*2,pe,t?.width??0),p=Math.max(d+fe+de+l*2,t?.height??0),h=-f/2,v=-p/2,y=-(fe+de)/2,b=s.select(`.label`);b&&(t.useHtmlLabels??u(m())?b.attr(`transform`,`translate(${-c.width/2}, ${-c.height/2+y})`):b.attr(`transform`,`translate(0, ${-c.height/2+y})`));let x;if(t.look===`handDrawn`){let e=C.svg(s),n=g(t,{fill:i,stroke:a,fillStyle:`solid`}),o=e.path(z(h,v,f,p,me),n);x=s.insert(()=>o,`:first-child`),x.attr(`class`,`basic label-container collapsed-group`).attr(`style`,r(t.cssStyles))}else x=s.insert(`rect`,`:first-child`),x.attr(`class`,`basic label-container collapsed-group`).attr(`style`,o).attr(`rx`,me).attr(`ry`,me).attr(`x`,h).attr(`y`,v).attr(`width`,f).attr(`height`,p).attr(`fill`,i).attr(`stroke`,a);let S=v+l+d+fe;s.append(`line`).attr(`class`,`collapsed-separator`).attr(`x1`,h+8).attr(`y1`,S).attr(`x2`,h+f-8).attr(`y2`,S).attr(`stroke`,a).attr(`stroke-dasharray`,`3, 3`);let w=S+de/2;for(let e=-1;e<=1;e++)s.append(`circle`).attr(`class`,`collapsed-indicator`).attr(`cx`,e*10).attr(`cy`,w).attr(`r`,2.5).attr(`fill`,a);return N(t,x),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},s}o(he,`collapsedGroup`);function q(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}o(q,`insertPolygonShape`);var ge=[`right`,`left`,`up`,`down`],_e=`point`,ve=o(e=>{let t=new Set;for(let n of e)switch(n){case`x`:t.add(`right`),t.add(`left`);break;case`y`:t.add(`up`),t.add(`down`);break;default:t.add(n)}return t},`expandAndDeduplicateDirections`),ye=o(e=>ge.filter(t=>e.has(t)).join(`|`)||_e,`getDirectionKey`),be={"right|left|up|down":o(({height:e,midpoint:t,padding:n,width:r})=>[{x:0,y:0},{x:t,y:0},{x:r/2,y:2*n},{x:r-t,y:0},{x:r,y:0},{x:r,y:-e/3},{x:r+2*n,y:-e/2},{x:r,y:-2*e/3},{x:r,y:-e},{x:r-t,y:-e},{x:r/2,y:-e-2*n},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*n,y:-e/2},{x:0,y:-e/3}],`right|left|up|down`),"right|left|up":o(({height:e,midpoint:t,width:n})=>[{x:t,y:0},{x:n-t,y:0},{x:n,y:-e/2},{x:n-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],`right|left|up`),"right|left|down":o(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:t,y:-e},{x:n-t,y:-e},{x:n,y:0}],`right|left|down`),"right|up|down":o(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:n,y:-e+t},{x:0,y:-e}],`right|up|down`),"left|up|down":o(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:n,y:-e}],`left|up|down`),"right|left":o(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`right|left`),"up|down":o(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`up|down`),"right|up":o(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:0,y:-e}],`right|up`),"right|down":o(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],`right|down`),"left|up":o(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:n,y:-e}],`left|up`),"left|down":o(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],`left|down`),right:o(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e+n}],`right`),left:o(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`left`),up:o(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n}],`up`),down:o(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`down`),[_e]:()=>[{x:0,y:0}]},xe=o((e,t,n,r)=>{let i=ve(e),a=(n.padding??0)/2,o=t.height+4*a,s=o/2,c=r??t.width+2*s+2*a;return(be[ye(i)]??be[_e])({height:o,midpoint:s,padding:a,width:c})},`getArrowPoints`);async function Se(e,t){let n=t,{shapeSvg:r,bbox:i}=await j(e,n,P(n)),a=n.padding??0,o=i.height+2*a,s=o/2,c=i.width+2*s+a,l=n.width??0,u=n.positioned&&(n.widthInColumns??1)>1&&l>c?l:c,d=xe(n.directions??[],i,n,u),f=q(r,u,o,d);return f.attr(`style`,n.style??null),N(n,f),n.intersect=function(e){return K.polygon(n,d,e)},r}o(Se,`block_arrow`);async function Ce(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await j(e,t,P(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+18,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=C.svg(a).path(z(-u/2,f,u,d,12),g(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`line`).attr(`x1`,-u/2).attr(`y1`,f+18).attr(`x2`,u/2).attr(`y2`,f+18).attr(`style`,`stroke:${c};stroke-width:1px`);for(let e=0;e<3;e++)m.append(`circle`).attr(`cx`,-u/2+12+e*9).attr(`cy`,f+9).attr(`r`,2.5).attr(`style`,`fill:${c};stroke:none`);m.append(`rect`).attr(`class`,`browser-address-bar`).attr(`x`,-u/2+44).attr(`y`,f+4).attr(`width`,Math.max(u-56,10)).attr(`height`,10).attr(`rx`,3).attr(`ry`,3).attr(`style`,`fill:none;stroke:${c};stroke-width:1px;opacity:0.6`),N(t,m);let h=f+18+(d-18)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}o(Ce,`browser`);var we=12;async function Te(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+we),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+we,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+we},{x:0+we,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=g(t,{}),r=F(p),i=e.path(r,n);m=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(s,l,u,p);return r&&m.attr(`style`,r),N(t,m),t.intersect=function(e){return K.polygon(t,p,e)},s}o(Te,`card`);function Ee(e,t){let{nodeStyles:n}=_(t);t.label=``;let r=e.insert(`g`).attr(`class`,P(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=C.svg(r),c=g(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=F(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return K.polygon(t,o,e)},r}o(Ee,`choice`);async function De(e,t,n){let{labelStyles:a,nodeStyles:o}=_(t);t.labelStyle=a;let{shapeSvg:s,bbox:c,halfPadding:l}=await j(e,t,P(t)),u=n?.padding??l,d=t.look===`neo`?c.width/2+32:c.width/2+u,f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=g(t,{}),i=e.circle(0,0,d*2,n);f=s.insert(()=>i,`:first-child`),f.attr(`class`,`basic label-container`).attr(`style`,r(p))}else f=s.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,o).attr(`r`,d).attr(`cx`,0).attr(`cy`,0);return N(t,f),t.calcIntersect=function(e,t){let n=e.width/2;return K.circle(e,n,t)},t.intersect=function(e){return i.info(`Circle intersect`,t,d,e),K.circle(t,d,e)},s}o(De,`circle`);async function Oe(e,t){let n=t,{shapeSvg:r,bbox:i,halfPadding:a}=await j(e,n,[`node`,n.cssClasses,n.class].filter(Boolean).join(` `)),o=r.insert(`rect`,`:first-child`),s=n.padding??0,c=n.positioned?n.width??0:i.width+s,l=n.positioned?n.height??0:i.height+s,u=n.positioned?-c/2:-i.width/2-a,d=n.positioned?-l/2:-i.height/2-a;return o.attr(`class`,`basic cluster composite label-container`).attr(`style`,n.style??null).attr(`rx`,n.rx??null).attr(`ry`,n.ry??null).attr(`x`,u).attr(`y`,d).attr(`width`,c).attr(`height`,l),N(n,o),n.intersect=function(e){return K.rect(n,e)},r}o(Oe,`composite`);async function ke(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await j(e,t,P(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+20,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=C.svg(a).path(z(-u/2,f,u,d,12),g(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`text`).attr(`x`,-u/2+12).attr(`y`,f+16).attr(`class`,`console-glyph`).attr(`style`,`font-family:monospace;font-weight:bold;font-size:14px;fill:${c}`).text(`>_`),N(t,m);let h=f+20+(d-20)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}o(ke,`consoleWindow`);function Ae(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y}
1
+ import{a as e,p as t,r as n,u as r}from"./chunk-75Z2AOVW-CkyZ2k2Y.js";import{n as i,t as a}from"./src-Caqqw6Gw.js";import{n as o}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{A as s,B as c,M as l,T as u,b as d,f,g as p,x as m,z as h}from"./chunk-DU6HZSFF-BWpgeLJJ.js";import{a as g,i as _,r as v,t as y}from"./chunk-P2QGCYS3-iklY7skC.js";import{t as b}from"./chunk-PWAF6VOD-CF11-un1.js";import{n as x,r as S}from"./chunk-GMAD6QVW-BTTT9Emi.js";import{t as C}from"./rough.esm-Dy-Kn_BL.js";var w=1,T=3;async function E(e){let n=e.getElementsByTagName(`img`);if(!n||n.length===0)return;let r=!D(e);await Promise.all([...n].map(e=>new Promise(n=>{function i(){if(e.style.display=`flex`,e.style.flexDirection=`column`,r){let n=m().fontSize?m().fontSize:window.getComputedStyle(document.body).fontSize,[r=f.fontSize]=t(n),i=r*5+`px`;e.style.minWidth=i,e.style.maxWidth=i}else e.style.width=`100%`;n(e)}o(i,`setupImage`),setTimeout(()=>{e.complete&&i()}),e.addEventListener(`error`,i),e.addEventListener(`load`,i)})))}o(E,`configureLabelImages`);function D(e){return e.nodeType===T?e.textContent?.trim()!==``:e.nodeType!==w||e.tagName.toLowerCase()===`img`?!1:[...e.childNodes].some(D)}o(D,`hasTextBesidesImages`);var O=3,k=32,A=o(async(t,n,i)=>{let o=m(),s=t.insert(`g`).attr(`class`,i??`node default`).attr(`id`,n.domId||n.id),c=s.insert(`g`).attr(`class`,`label`).attr(`style`,r(n.labelStyle)),l=[{text:typeof n.label==`string`?n.label:n.label?.[0]??``,cssClass:`c4-name`},{text:n.stereotype,cssClass:`c4-type`},...(n.description??[]).map(e=>({text:e,cssClass:`c4-descr`}))].filter(e=>e.text),u=n.width?Math.max(n.width-2*(n.padding??0),k):m().flowchart?.wrappingWidth??200,d=o.c4?.wrap??!0?u:1/0,f=await Promise.all(l.map(async t=>{let r=c.append(`g`).attr(`class`,t.cssClass),i=await x(r,h(e(t.text??``),o),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:d,style:n.labelStyle},o);return a(i).selectAll(`tspan.text-outer-tspan`).attr(`text-anchor`,`middle`),a(i).selectAll(`tspan.text-inner-tspan`).attr(`font-weight`,null).attr(`font-style`,null),{el:r,box:r.node().getBBox()}})),p=Math.max(...f.map(({box:e})=>e.width),0),g=0;for(let{el:e,box:t}of f)e.attr(`transform`,`translate(${p/2-t.x-t.width/2}, ${g-t.y})`),g+=t.height+O;let _=f.length>0?g-O:0;return c.insert(`rect`,`:first-child`),c.attr(`transform`,`translate(${-p/2}, ${-_/2})`),{shapeSvg:s,bbox:c.node().getBBox(),halfPadding:(n.padding??0)/2,label:c}},`c4LabelHelper`),j=o(async(t,n,i)=>{if(n.stereotype!==void 0)return A(t,n,i);let o,s=n.useHtmlLabels||p(m()?.htmlLabels);o=i||`node default`;let c=t.insert(`g`).attr(`class`,o).attr(`id`,n.domId||n.id),l=c.insert(`g`).attr(`class`,`label`).attr(`style`,r(n.labelStyle)),u;u=n.label===void 0?``:typeof n.label==`string`?n.label:n.label[0];let d=!!n.icon||!!n.img,f=n.labelType===`markdown`,g=await x(l,h(e(u),m()),{useHtmlLabels:s,width:n.width||n.wrappingWidth||m().flowchart?.wrappingWidth,classes:f?`markdown-node-label`:``,style:n.labelStyle,addSvgBackground:d,markdown:f},m()),_=(n?.padding??0)/2,v;if(s){let e=g.children[0],t=a(g);await E(e),v=await S.measure(()=>e.getBoundingClientRect()),t.attr(`width`,v.width),t.attr(`height`,v.height)}else v=await S.measure(()=>g.getBBox());return s?l.attr(`transform`,`translate(`+-v.width/2+`, `+-v.height/2+`)`):l.attr(`transform`,`translate(0, `+-v.height/2+`)`),n.centerLabel&&l.attr(`transform`,`translate(`+-v.width/2+`, `+-v.height/2+`)`),l.insert(`rect`,`:first-child`),{shapeSvg:c,bbox:v,halfPadding:_,label:l}},`labelHelper`),M=o(async(t,n,r)=>{let i=r.useHtmlLabels??u(m()),o=t.insert(`g`).attr(`class`,`label`).attr(`style`,r.labelStyle||``),s=await x(o,h(e(n),m()),{useHtmlLabels:i,width:r.width||m()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),c=r.padding/2,l;if(u(m())){let e=s.children[0],t=a(s);l=await S.measure(()=>e.getBoundingClientRect()),t.attr(`width`,l.width),t.attr(`height`,l.height)}else l=await S.measure(()=>s.getBBox());return i?o.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`):o.attr(`transform`,`translate(0, `+-l.height/2+`)`),r.centerLabel&&o.attr(`transform`,`translate(`+-l.width/2+`, `+-l.height/2+`)`),o.insert(`rect`,`:first-child`),{shapeSvg:t,bbox:l,halfPadding:c,label:o}},`insertLabel`),N=o((e,t,n)=>{if(n){e.width=n.width,e.height=n.height;return}let r=t.node().getBBox();e.width=r.width,e.height=r.height},`updateNodeBounds`),P=o((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function F(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}o(F,`createPathFromPoints`);function I(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}o(I,`generateFullSineWavePoints`);function L(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}o(L,`generateCirclePoints`);function ee(e){let t=Array.from(e.childNodes).filter(e=>e.tagName===`path`),n=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),r=t.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);n.setAttribute(`d`,r);let i=t.find(e=>e.getAttribute(`fill`)!==`none`),a=t.find(e=>e.getAttribute(`stroke`)!==`none`),s=o((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(i){let e={fill:s(i,`fill`),"fill-opacity":s(i,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}if(a){let e={stroke:s(a,`stroke`),"stroke-width":s(a,`stroke-width`)??`1`,"stroke-opacity":s(a,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(n),c}o(ee,`mergePaths`);var R=o((e,t)=>{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;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),{x:n+c,y:r+l}},`intersectRect`),z=o((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),te=o(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let o=m(),s=u(o);return await x(e,a,{style:n,isTitle:r,useHtmlLabels:s,markdown:!1,isNode:i,width:1/0},o)},`createLabel`);function B(e,t){return e.intersect(t)}o(B,`intersectNode`);var ne=B;function V(e,t,n,r){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);r.x<i&&(l=-l);var u=Math.abs(t*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}o(V,`intersectEllipse`);var H=V;function re(e,t,n){return H(e,t,t,n)}o(re,`intersectCircle`);var ie=re;function U(e,t,n,r){{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;if(s!==0&&c!==0&&W(s,c))return;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;if(Math.abs(p)<l&&Math.abs(m)<l&&W(p,m))return;let h=i*d-u*a;if(h===0)return;let g=Math.abs(h/2),_=a*f-d*o,v=_<0?(_-g)/h:(_+g)/h;return _=u*o-i*f,{x:v,y:_<0?(_-g)/h:(_+g)/h}}}o(U,`intersectLine`);function W(e,t){return e*t>0}o(W,`sameSign`);var G=U;function ae(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r<t.length;r++){let i=t[r],o=t[r<t.length-1?r+1:0],s=G(e,n,{x:c+i.x,y:l+i.y},{x:c+o.x,y:l+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(e,t){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);return a<c?-1:a===c?0:1}),a[0]):e}o(ae,`intersectPolygon`);var K={node:ne,circle:ie,ellipse:H,polygon:ae,rect:R};function oe(e,t){let{labelStyles:n}=_(t);t.labelStyle=n;let a=P(t),o=a;a||(o=`anchor`);let s=e.insert(`g`).attr(`class`,o).attr(`id`,t.domId||t.id),{cssStyles:c}=t,l=C.svg(s),u=g(t,{fill:`black`,stroke:`none`,fillStyle:`solid`});t.look!==`handDrawn`&&(u.roughness=0);let d=l.circle(0,0,2,u),f=s.insert(()=>d,`:first-child`);return f.attr(`class`,`anchor`).attr(`style`,r(c)),N(t,f),t.intersect=function(e){return i.info(`Circle intersect`,t,1,e),K.circle(t,1,e)},s}o(oe,`anchor`);function se(e,t,n,r,i,a,o){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);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);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;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}o(se,`generateArcPoints`);function ce(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}o(ce,`calculateArcSagitta`);async function le(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,s=t.look===`neo`?12:i,c=o(e=>e+s,`calcTotalHeight`),l=o(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await j(e,t,P(t)),f=c(t?.height?t?.height:d.height),[p,m]=l(f),h=ce(f,p,m),v=(t?.width?t?.width:d.width)+a*2+h-h,y=f,{cssStyles:b}=t,x=[{x:v/2,y:-y/2},{x:-v/2,y:-y/2},...se(-v/2,-y/2,-v/2,y/2,p,m,!1),{x:v/2,y:y/2},...se(v/2,y/2,v/2,-y/2,p,m,!0)],S=C.svg(u),w=g(t,{});t.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`);let T=F(x),E=S.path(T,w),D=u.insert(()=>E,`:first-child`);return D.attr(`class`,`basic label-container outer-path`),b&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,b),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),D.attr(`transform`,`translate(${p/2}, 0)`),N(t,D),t.intersect=function(e){return K.polygon(t,x,e)},u}o(le,`bowTieRect`);async function ue(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r;let{shapeSvg:a,bbox:s,label:c}=await j(e,t,P(t)),l=n?.nodeBorder??n?.lineColor??`currentColor`,u=t.padding??12,d=Math.max(s.width+u*2,t.width??0,80),f=Math.max(Math.min(d*.08,12),5),p=Math.max(s.height+u*2+f,t.height??0),m=-p/2+f,h=p/2,v=d*.72,y=[`M${-d/2},${m}`,`L${-v/2},${h}`,`A${v/2},${f} 0 0 0 ${v/2},${h}`,`L${d/2},${m}`,`A${d/2},${f} 0 0 0 ${-d/2},${m}`,`Z`].join(` `),{cssStyles:b}=t,x=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=C.svg(a).path(y,g(t,{}));x.node()?.appendChild(e),b&&x.attr(`style`,b)}else x.append(`path`).attr(`d`,y).attr(`style`,i);x.append(`ellipse`).attr(`cx`,0).attr(`cy`,m).attr(`rx`,d/2).attr(`ry`,f).attr(`style`,`fill:none;stroke:${l};stroke-width:1px`),N(t,x);let S=m+(h-m)/2;c.attr(`transform`,`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${S-s.height/2-(s.y-(s.top??0))})`);let w=o((e,t,n)=>Array.from({length:13},(r,i)=>{let a=Math.PI-i*Math.PI/12;return{x:e*Math.cos(a),y:t+n*f*Math.sin(a)}}),`arc`),T=[...w(d/2,m,-1),...w(v/2,h,1).reverse()];return t.intersect=function(e){return K.polygon(t,T,e)},a}o(ue,`bucket`);var de=20,fe=8,pe=80,me=8;async function he(e,t){let{themeVariables:n}=m(),i=n.clusterBkg,a=n.clusterBorder,{nodeStyles:o}=_(t),{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=t.padding??8,d=c.height,f=Math.max(c.width+l*2,pe,t?.width??0),p=Math.max(d+fe+de+l*2,t?.height??0),h=-f/2,v=-p/2,y=-(fe+de)/2,b=s.select(`.label`);b&&(t.useHtmlLabels??u(m())?b.attr(`transform`,`translate(${-c.width/2}, ${-c.height/2+y})`):b.attr(`transform`,`translate(0, ${-c.height/2+y})`));let x;if(t.look===`handDrawn`){let e=C.svg(s),n=g(t,{fill:i,stroke:a,fillStyle:`solid`}),o=e.path(z(h,v,f,p,me),n);x=s.insert(()=>o,`:first-child`),x.attr(`class`,`basic label-container collapsed-group`).attr(`style`,r(t.cssStyles))}else x=s.insert(`rect`,`:first-child`),x.attr(`class`,`basic label-container collapsed-group`).attr(`style`,o).attr(`rx`,me).attr(`ry`,me).attr(`x`,h).attr(`y`,v).attr(`width`,f).attr(`height`,p).attr(`fill`,i).attr(`stroke`,a);let S=v+l+d+fe;s.append(`line`).attr(`class`,`collapsed-separator`).attr(`x1`,h+8).attr(`y1`,S).attr(`x2`,h+f-8).attr(`y2`,S).attr(`stroke`,a).attr(`stroke-dasharray`,`3, 3`);let w=S+de/2;for(let e=-1;e<=1;e++)s.append(`circle`).attr(`class`,`collapsed-indicator`).attr(`cx`,e*10).attr(`cy`,w).attr(`r`,2.5).attr(`fill`,a);return N(t,x),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},s}o(he,`collapsedGroup`);function q(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}o(q,`insertPolygonShape`);var ge=[`right`,`left`,`up`,`down`],_e=`point`,ve=o(e=>{let t=new Set;for(let n of e)switch(n){case`x`:t.add(`right`),t.add(`left`);break;case`y`:t.add(`up`),t.add(`down`);break;default:t.add(n)}return t},`expandAndDeduplicateDirections`),ye=o(e=>ge.filter(t=>e.has(t)).join(`|`)||_e,`getDirectionKey`),be={"right|left|up|down":o(({height:e,midpoint:t,padding:n,width:r})=>[{x:0,y:0},{x:t,y:0},{x:r/2,y:2*n},{x:r-t,y:0},{x:r,y:0},{x:r,y:-e/3},{x:r+2*n,y:-e/2},{x:r,y:-2*e/3},{x:r,y:-e},{x:r-t,y:-e},{x:r/2,y:-e-2*n},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*n,y:-e/2},{x:0,y:-e/3}],`right|left|up|down`),"right|left|up":o(({height:e,midpoint:t,width:n})=>[{x:t,y:0},{x:n-t,y:0},{x:n,y:-e/2},{x:n-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],`right|left|up`),"right|left|down":o(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:t,y:-e},{x:n-t,y:-e},{x:n,y:0}],`right|left|down`),"right|up|down":o(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:n,y:-e+t},{x:0,y:-e}],`right|up|down`),"left|up|down":o(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:n,y:-e}],`left|up|down`),"right|left":o(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`right|left`),"up|down":o(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`up|down`),"right|up":o(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:0,y:-e}],`right|up`),"right|down":o(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],`right|down`),"left|up":o(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:n,y:-e}],`left|up`),"left|down":o(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],`left|down`),right:o(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e+n}],`right`),left:o(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`left`),up:o(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n}],`up`),down:o(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`down`),[_e]:()=>[{x:0,y:0}]},xe=o((e,t,n,r)=>{let i=ve(e),a=(n.padding??0)/2,o=t.height+4*a,s=o/2,c=r??t.width+2*s+2*a;return(be[ye(i)]??be[_e])({height:o,midpoint:s,padding:a,width:c})},`getArrowPoints`);async function Se(e,t){let n=t,{shapeSvg:r,bbox:i}=await j(e,n,P(n)),a=n.padding??0,o=i.height+2*a,s=o/2,c=i.width+2*s+a,l=n.width??0,u=n.positioned&&(n.widthInColumns??1)>1&&l>c?l:c,d=xe(n.directions??[],i,n,u),f=q(r,u,o,d);return f.attr(`style`,n.style??null),N(n,f),n.intersect=function(e){return K.polygon(n,d,e)},r}o(Se,`block_arrow`);async function Ce(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await j(e,t,P(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+18,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=C.svg(a).path(z(-u/2,f,u,d,12),g(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`line`).attr(`x1`,-u/2).attr(`y1`,f+18).attr(`x2`,u/2).attr(`y2`,f+18).attr(`style`,`stroke:${c};stroke-width:1px`);for(let e=0;e<3;e++)m.append(`circle`).attr(`cx`,-u/2+12+e*9).attr(`cy`,f+9).attr(`r`,2.5).attr(`style`,`fill:${c};stroke:none`);m.append(`rect`).attr(`class`,`browser-address-bar`).attr(`x`,-u/2+44).attr(`y`,f+4).attr(`width`,Math.max(u-56,10)).attr(`height`,10).attr(`rx`,3).attr(`ry`,3).attr(`style`,`fill:none;stroke:${c};stroke-width:1px;opacity:0.6`),N(t,m);let h=f+18+(d-18)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}o(Ce,`browser`);var we=12;async function Te(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+we),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+we,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+we},{x:0+we,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=g(t,{}),r=F(p),i=e.path(r,n);m=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(s,l,u,p);return r&&m.attr(`style`,r),N(t,m),t.intersect=function(e){return K.polygon(t,p,e)},s}o(Te,`card`);function Ee(e,t){let{nodeStyles:n}=_(t);t.label=``;let r=e.insert(`g`).attr(`class`,P(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=C.svg(r),c=g(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=F(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return K.polygon(t,o,e)},r}o(Ee,`choice`);async function De(e,t,n){let{labelStyles:a,nodeStyles:o}=_(t);t.labelStyle=a;let{shapeSvg:s,bbox:c,halfPadding:l}=await j(e,t,P(t)),u=n?.padding??l,d=t.look===`neo`?c.width/2+32:c.width/2+u,f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=g(t,{}),i=e.circle(0,0,d*2,n);f=s.insert(()=>i,`:first-child`),f.attr(`class`,`basic label-container`).attr(`style`,r(p))}else f=s.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,o).attr(`r`,d).attr(`cx`,0).attr(`cy`,0);return N(t,f),t.calcIntersect=function(e,t){let n=e.width/2;return K.circle(e,n,t)},t.intersect=function(e){return i.info(`Circle intersect`,t,d,e),K.circle(t,d,e)},s}o(De,`circle`);async function Oe(e,t){let n=t,{shapeSvg:r,bbox:i,halfPadding:a}=await j(e,n,[`node`,n.cssClasses,n.class].filter(Boolean).join(` `)),o=r.insert(`rect`,`:first-child`),s=n.padding??0,c=n.positioned?n.width??0:i.width+s,l=n.positioned?n.height??0:i.height+s,u=n.positioned?-c/2:-i.width/2-a,d=n.positioned?-l/2:-i.height/2-a;return o.attr(`class`,`basic cluster composite label-container`).attr(`style`,n.style??null).attr(`rx`,n.rx??null).attr(`ry`,n.ry??null).attr(`x`,u).attr(`y`,d).attr(`width`,c).attr(`height`,l),N(n,o),n.intersect=function(e){return K.rect(n,e)},r}o(Oe,`composite`);async function ke(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await j(e,t,P(t)),c=n?.nodeBorder??n?.lineColor??`currentColor`,l=t.padding??12,u=Math.max(o.width+l*2,t.width??0,90),d=Math.max(o.height+l*2+20,t.height??0),f=-d/2,{cssStyles:p}=t,m=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=C.svg(a).path(z(-u/2,f,u,d,12),g(t,{}));m.node()?.appendChild(e),p&&m.attr(`style`,p)}else m.append(`rect`).attr(`x`,-u/2).attr(`y`,f).attr(`width`,u).attr(`height`,d).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);m.append(`text`).attr(`x`,-u/2+12).attr(`y`,f+16).attr(`class`,`console-glyph`).attr(`style`,`font-family:monospace;font-weight:bold;font-size:14px;fill:${c}`).text(`>_`),N(t,m);let h=f+20+(d-20)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${h-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return K.rect(t,e)},a}o(ke,`consoleWindow`);function Ae(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y}
2
2
  M ${i.x},${i.y} L ${o.x},${o.y}`}o(Ae,`createLine`);function je(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n,t.label=``;let a=e.insert(`g`).attr(`class`,P(t)).attr(`id`,t.domId??t.id),o=Math.max(30,t?.width??0),{cssStyles:s}=t,c=C.svg(a),l=g(t,{});t.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let u=c.circle(0,0,o*2,l),d=Ae(o),f=c.path(d,l),p=a.insert(()=>u,`:first-child`);return p.insert(()=>f),p.attr(`class`,`outer-path`),s&&t.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,s),r&&t.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,r),N(t,p),t.intersect=function(e){return i.info(`crossedCircle intersect`,t,{radius:o,point:e}),K.circle(t,o,e)},a}o(je,`crossedCircle`);function J(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}o(J,`generateCirclePoints`);async function Me(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+s,u=a.height+c,d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...J(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...J(l/2+d*2,-d,d,20,-180,-270),...J(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...J(l/2,u/2,d,20,0,90)],m=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},...J(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...J(l/2+l*.1,-d,d,20,-180,-270),...J(l/2+l*.1,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...J(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2,y:u/2+d}],h=C.svg(i),v=g(t,{fill:`none`});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=F(p).replace(`Z`,``),b=h.path(y,v),x=F(m),S=h.path(x,{...v}),w=i.insert(`g`,`:first-child`);return w.insert(()=>S,`:first-child`).attr(`stroke-opacity`,0),w.insert(()=>b,`:first-child`),w.attr(`class`,`text`),f&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(${d}, 0)`),o.attr(`transform`,`translate(${-l/2+d-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),N(t,w),t.intersect=function(e){return K.polygon(t,m,e)},i}o(Me,`curlyBraceLeft`);function Y(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:a,y:l})}return o}o(Y,`generateCirclePoints`);async function Ne(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...Y(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...Y(l/2+d*2,-d,d,20,-180,-270),...Y(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...Y(l/2,u/2,d,20,0,90)],m=[{x:-l/2,y:-u/2-d},{x:l/2,y:-u/2-d},...Y(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...Y(l/2+d*2,-d,d,20,-180,-270),...Y(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...Y(l/2,u/2,d,20,0,90),{x:l/2,y:u/2+d},{x:-l/2,y:u/2+d}],h=C.svg(i),v=g(t,{fill:`none`});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=F(p).replace(`Z`,``),b=h.path(y,v),x=F(m),S=h.path(x,{...v}),w=i.insert(`g`,`:first-child`);return w.insert(()=>S,`:first-child`).attr(`stroke-opacity`,0),w.insert(()=>b,`:first-child`),w.attr(`class`,`text`),f&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(${-d}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),N(t,w),t.intersect=function(e){return K.polygon(t,m,e)},i}o(Ne,`curlyBraceRight`);function X(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}o(X,`generateCirclePoints`);async function Pe(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...X(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...X(l/2+d*2,-d,d,20,-180,-270),...X(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...X(l/2,u/2,d,20,0,90)],m=[...X(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...X(-l/2-d/2,-d,d,20,0,90),...X(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...X(-l/2+d+d/2,u/2,d,30,-180,-270)],h=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},...X(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...X(l/2+d*2,-d,d,20,-180,-270),...X(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...X(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2-d-d/2,y:u/2+d},...X(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...X(-l/2-d/2,-d,d,20,0,90),...X(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...X(-l/2+d+d/2,u/2,d,30,-180,-270)],v=C.svg(i),y=g(t,{fill:`none`});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let b=F(p).replace(`Z`,``),x=v.path(b,y),S=F(m).replace(`Z`,``),w=v.path(S,y),T=F(h),E=v.path(T,{...y}),D=i.insert(`g`,`:first-child`);return D.insert(()=>E,`:first-child`).attr(`stroke-opacity`,0),D.insert(()=>x,`:first-child`),D.insert(()=>w,`:first-child`),D.attr(`class`,`text`),f&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),D.attr(`transform`,`translate(${d-d/4}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),N(t,D),t.intersect=function(e){return K.polygon(t,h,e)},i}o(Pe,`curlyBraces`);async function Fe(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=Math.max(20,(c.width+a*2)*1.25,t?.width??0),u=Math.max(5,c.height+o*2,t?.height??0),d=u/2,{cssStyles:f}=t,p=C.svg(s),m=g(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=l,v=u,y=h-d,b=v/4,x=[{x:y,y:0},{x:b,y:0},{x:0,y:v/2},{x:b,y:v},{x:y,y:v},...L(-y,-v/2,d,50,270,90)],S=F(x),w=p.path(S,m),T=s.insert(()=>w,`:first-child`);return T.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&T.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&T.selectChildren(`path`).attr(`style`,r),T.attr(`transform`,`translate(${-l/2}, ${-u/2})`),N(t,T),t.intersect=function(e){return K.polygon(t,x,e)},s}o(Fe,`curvedTrapezoid`);async function Ie(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=t.padding??20,c=Math.max(a.width+s*2,t.width??0,100),l=Math.min(Math.max(c*.23,16),56),u=l*.27,d=Math.max(a.height+s*2,t.height?t.height-(2*l-u):0),f=Math.min(c*.177,d*.45),p=d+2*l-u,m=-p/2,h=m+2*l-u,v=i.insert(`g`,`:first-child`).attr(`class`,`basic label-container`),{cssStyles:y}=t;if(t.look===`handDrawn`){let e=C.svg(i),n=g(t,{}),r=e.path(z(-c/2,h,c,d,f),n),a=e.circle(0,m+l,l*2,n);v.insert(()=>a,`:first-child`),v.insert(()=>r,`:first-child`),y&&v.attr(`style`,y)}else v.append(`rect`).attr(`x`,-c/2).attr(`y`,h).attr(`width`,c).attr(`height`,d).attr(`rx`,f).attr(`ry`,f).attr(`style`,r),v.append(`circle`).attr(`cx`,0).attr(`cy`,m+l).attr(`r`,l).attr(`style`,r);N(t,v);let b=h+d/2;o.attr(`transform`,`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${b-a.height/2-(a.y-(a.top??0))})`);let x=m+l,S=Math.asin(Math.min(1,(h-x)/l))*180/Math.PI,w=[...L(0,-x,l,24,180+S,-S),...L(-(-c/2+f),-(h+f),f,12,90,0),...L(-(-c/2+f),-(p/2-f),f,12,360,270),...L(-(c/2-f),-(p/2-f),f,12,270,180),...L(-(c/2-f),-(h+f),f,12,180,90)];return t.intersect=function(e){return K.polygon(t,w,e)},i}o(Ie,`person`);var Le=o((e,t,n,r,i,a)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createCylinderPathD`),Re=o((e,t,n,r,i,a)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createOuterCylinderPathD`),ze=o((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),Be=8,Ve=8;async function He(e,t){let{labelStyles:n,nodeStyles:i}=_(t);t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?24:a,s=t.look===`neo`?24:a,c=t.width??0;if(t.width&&(t.width-=s,t.width<Ve&&(t.width=Ve)),t.height){let e=c/2/(2.5+c/50);t.height=t.height-o-e*3,t.height<Be&&(t.height=Be)}let{shapeSvg:l,bbox:u,label:d}=await j(e,t,P(t)),f=Math.max(t.width??0,u.width)+s,p=f/2,m=p/(2.5+f/50),h=Math.max(t.height??0,u.height)+o+m,v,{cssStyles:y}=t;if(t.look===`handDrawn`){let e=C.svg(l),n=Re(0,0,f,h,p,m),r=ze(0,m,f,h,p,m),i=g(t,{}),a=e.path(n,i),o=e.path(r,g(t,{fill:`none`}));v=l.insert(()=>o,`:first-child`),v=l.insert(()=>a,`:first-child`),v.attr(`class`,`basic label-container`),y&&v.attr(`style`,y)}else{let e=Le(0,0,f,h,p,m);v=l.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,r(y)).attr(`style`,i)}return v.attr(`label-offset-y`,m),v.attr(`transform`,`translate(${-f/2}, ${-(h/2+m)})`),N(t,v),d.attr(`transform`,`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+(t.padding??0)/1.5-(u.y-(u.top??0))})`),t.intersect=function(e){let n=K.rect(t,e),r=n.x-(t.x??0);if(p!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-m)){let i=m*m*(1-r*r/(p*p));i>0&&(i=Math.sqrt(i)),i=m-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},l}o(He,`cylinder`);async function Ue(e,t,n){let{labelStyles:i,nodeStyles:a}=_(t);t.labelStyle=i;let{shapeSvg:o,bbox:s}=await j(e,t,P(t)),c=Math.max(s.width+n.labelPaddingX*2,t?.width||0),l=Math.max(s.height+n.labelPaddingY*2,t?.height||0),u=-c/2,d=-l/2,f,{rx:p,ry:m}=t,{cssStyles:h}=t;if(n?.rx&&n.ry&&(p=n.rx,m=n.ry),t.look===`handDrawn`){let e=C.svg(o),n=g(t,{}),i=p||m?e.path(z(u,d,c,l,p||0),n):e.rectangle(u,d,c,l,n);f=o.insert(()=>i,`:first-child`),f.attr(`class`,`basic label-container`).attr(`style`,r(h))}else f=o.insert(`rect`,`:first-child`),f.attr(`class`,`basic label-container`).attr(`style`,a).attr(`rx`,r(p)).attr(`ry`,r(m)).attr(`x`,u).attr(`y`,d).attr(`width`,c).attr(`height`,l);return N(t,f,t.look===`handDrawn`?void 0:{width:c,height:l}),t.calcIntersect=function(e,t){return K.rect(e,t)},t.intersect=function(e){return K.rect(t,e)},o}o(Ue,`drawRect`);async function We(e,t){let{cssClasses:n,labelPaddingX:r,labelPaddingY:i,padding:a,width:o,height:s}=t,c=await Ue(e,t,{rx:0,ry:0,classes:n??``,labelPaddingX:r??(a??0)*2,labelPaddingY:i??a??0});if(t.look===`handDrawn`){let e=C.svg(c),n=g(t,{}),r=c.select(`.basic.label-container > path:nth-child(2)`),i=r.node();if(!i)return c;let a=null;if(i instanceof SVGGraphicsElement)a=i.getBBox();else return c;return c.insert(()=>e.line(a.x,a.y,a.x+a.width,a.y,n),`.basic.label-container g.label`),c.insert(()=>e.line(a.x,a.y+a.height,a.x+a.width,a.y+a.height,n),`.basic.label-container g.label`),r.remove(),c}let l=c.select(`.basic.label-container`),u=(Number(l.attr(`width`))||o)??0,d=(Number(l.attr(`height`))||s)??0;return u>0&&d>0&&l.attr(`stroke-dasharray`,`${u} ${d}`),c}o(We,`datastore`);async function Ge(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?16:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await j(e,t,P(t)),l=s.width+i,u=s.height+a,d=u*.2,f=-l/2,p=-u/2-d/2,{cssStyles:m}=t,h=C.svg(o),v=g(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=[{x:f,y:p+d},{x:-f,y:p+d},{x:-f,y:-p},{x:f,y:-p},{x:f,y:p},{x:-f,y:p},{x:-f,y:p+d}],b=h.polygon(y.map(e=>[e.x,e.y]),v),x=o.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${f+(t.padding??0)/2-(s.x-(s.left??0))}, ${p+d+(t.padding??0)/2-(s.y-(s.top??0))})`),N(t,x),t.intersect=function(e){return K.rect(t,e)},o}o(Ge,`dividedRectangle`);async function Ke(e,t){let{labelStyles:n,nodeStyles:a}=_(t),o=t.look===`neo`?12:5;t.labelStyle=n;let s=t.padding??0,c=t.look===`neo`?16:s,{shapeSvg:l,bbox:u}=await j(e,t,P(t)),d=(t?.width?t?.width/2:u.width/2)+(c??0),f=d-o,p,{cssStyles:m}=t;if(t.look===`handDrawn`){let e=C.svg(l),n=g(t,{roughness:.2,strokeWidth:2.5}),i=g(t,{roughness:.2,strokeWidth:1.5}),a=e.circle(0,0,d*2,n),o=e.circle(0,0,f*2,i);p=l.insert(`g`,`:first-child`),p.attr(`class`,r(t.cssClasses)).attr(`style`,r(m)),p.node()?.appendChild(a),p.node()?.appendChild(o)}else{p=l.insert(`g`,`:first-child`);let e=p.insert(`circle`,`:first-child`),t=p.insert(`circle`);p.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)}return N(t,p),t.intersect=function(e){return i.info(`DoubleCircle intersect`,t,d,e),K.circle(t,d,e)},l}o(Ke,`doublecircle`);function qe(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:a}=_(t);t.label=``,t.labelStyle=r;let o=e.insert(`g`).attr(`class`,P(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=C.svg(o),{nodeBorder:l}=n,u=g(t,{fillStyle:`solid`});t.look!==`handDrawn`&&(u.roughness=0);let d=c.circle(0,0,14,u),f=o.insert(()=>d,`:first-child`);return f.selectAll(`path`).attr(`style`,`fill: ${l} !important;`),s&&s.length>0&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,a),N(t,f),t.intersect=function(e){return i.info(`filledCircle intersect`,t,{radius:7,point:e}),K.circle(t,7,e)},o}o(qe,`filledCircle`);var Je=10,Ye=10;async function Xe(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?a*2:a;(t.width||t.height)&&(t.height=t?.height??0,t.height<Je&&(t.height=Je),t.width=(t?.width??0)-o-o/2,t.width<Ye&&(t.width=Ye));let{shapeSvg:s,bbox:c,label:l}=await j(e,t,P(t)),u=(t?.width?t?.width:c.width)+(o??0),d=t?.height?t?.height:u+c.height,f=d,p=[{x:0,y:-d},{x:f,y:-d},{x:f/2,y:0}],{cssStyles:m}=t,h=C.svg(s),v=g(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=F(p),b=h.path(y,v),x=s.insert(()=>b,`:first-child`).attr(`transform`,`translate(${-d/2}, ${d/2})`).attr(`class`,`outer-path`);return m&&t.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,r),t.width=u,t.height=d,N(t,x),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${-d/2+(t.padding??0)/2+(c.y-(c.top??0))})`),t.intersect=function(e){return i.info(`Triangle intersect`,t,p,e),K.polygon(t,p,e)},s}o(Xe,`flippedTriangle`);async function Ze(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=t.padding??12,c=Math.max(a.width+s*2,t.width??0,90),l=a.height+s*2,u=Math.max(Math.min(l*.16,14),8),d=Math.max(l+u,t.height??0),f=d-u,p=Math.max(c*.38,28),m=-d/2,h=[{x:-c/2,y:m},{x:-c/2+p,y:m},{x:-c/2+p,y:m+u},{x:c/2,y:m+u},{x:c/2,y:d/2},{x:-c/2,y:d/2}],v=[`M${h[0].x},${h[0].y}`,...h.slice(1).map(e=>`L${e.x},${e.y}`),`Z`].join(` `),{cssStyles:y}=t,b;if(t.look===`handDrawn`){let e=C.svg(i).path(v,g(t,{}));b=i.insert(()=>e,`:first-child`).attr(`class`,`basic label-container`),y&&b.attr(`style`,y)}else b=i.insert(`path`,`:first-child`).attr(`d`,v).attr(`class`,`basic label-container`).attr(`style`,r);t.look===`handDrawn`?N(t,b):N(t,b,{width:c,height:d});let x=m+u+f/2;return o.attr(`transform`,`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${x-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(e){return K.polygon(t,h,e)},i}o(Ze,`folder`);function Qe(e,t,{dir:n,config:{state:r,themeVariables:i}}){let{nodeStyles:a}=_(t);t.label=``;let o=e.insert(`g`).attr(`class`,P(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=Math.max(70,t?.width??0),l=Math.max(10,t?.height??0);n===`LR`&&(c=Math.max(10,t?.width??0),l=Math.max(70,t?.height??0));let u=-1*c/2,d=-1*l/2,f=C.svg(o),p=g(t,{stroke:i.lineColor,fill:i.lineColor});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=f.rectangle(u,d,c,l,p),h=o.insert(()=>m,`:first-child`);s&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,a),N(t,h);let v=r?.padding??0;return t.width&&t.height&&(t.width+=v/2||0,t.height+=v/2||0),t.intersect=function(e){return K.rect(t,e)},o}o(Qe,`forkJoin`);async function $e(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let a=t.look===`neo`?16:t.padding??0,o=t.look===`neo`?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10),t.width=(t?.width??0)-a*2,t.width<15&&(t.width=15));let{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=(t?.width?t?.width:Math.max(15,c.width))+a*2,u=(t?.height?t?.height:Math.max(10,c.height))+o*2,d=u/2,{cssStyles:f}=t,p=C.svg(s),m=g(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-l/2,y:-u/2},{x:l/2-d,y:-u/2},...L(-l/2+d,0,d,50,90,270),{x:l/2-d,y:u/2},{x:-l/2,y:u/2}],v=F(h),y=p.path(v,m),b=s.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,r),N(t,b),t.intersect=function(e){return i.info(`Pill intersect`,t,{radius:d,point:e}),K.polygon(t,h,e)},s}o($e,`halfRoundedRectangle`);var et=o((e,t,n,r,i)=>[`M${e+i},${t}`,`L${e+n-i},${t}`,`L${e+n},${t-r/2}`,`L${e+n-i},${t-r}`,`L${e+i},${t-r}`,`L${e},${t-r/2}`,`Z`].join(` `),`createHexagonPathD`);async function tt(e,t){let{labelStyles:n,nodeStyles:r}=_(t),i=t.look===`neo`?3.5:4;t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?70:a,s=t.look===`neo`?32:a;if(t.width||t.height){let e=(t.height??0)/i;t.width=(t?.width??0)-2*e-s,t.height=(t.height??0)-o}let{shapeSvg:c,bbox:l}=await j(e,t,P(t)),u=(t?.height?t?.height:l.height)+o,d=u/i,f=(t?.width?t?.width:l.width)+2*d+s,p=[{x:d,y:0},{x:f-d,y:0},{x:f,y:-u/2},{x:f-d,y:-u},{x:d,y:-u},{x:0,y:-u/2}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=C.svg(c),n=g(t,{}),r=et(0,0,f,u,d),i=e.path(r,n);m=c.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-f/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(c,f,u,p);return r&&m.attr(`style`,r),t.width=f,t.height=u,N(t,m),t.intersect=function(e){return K.polygon(t,p,e)},c}o(tt,`hexagon`);async function nt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.label=``,t.labelStyle=n;let{shapeSvg:a}=await j(e,t,P(t)),o=Math.max(30,t?.width??0),s=Math.max(30,t?.height??0),{cssStyles:c}=t,l=C.svg(a),u=g(t,{});t.look!==`handDrawn`&&(u.roughness=0,u.fillStyle=`solid`);let d=[{x:0,y:0},{x:o,y:0},{x:0,y:s},{x:o,y:s}],f=F(d),p=l.path(f,u),m=a.insert(()=>p,`:first-child`);return m.attr(`class`,`basic label-container outer-path`),c&&t.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,c),r&&t.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,r),m.attr(`transform`,`translate(${-o/2}, ${-s/2})`),N(t,m),t.intersect=function(e){return i.info(`Pill intersect`,t,{points:d}),K.polygon(t,d,e)},a}o(nt,`hourglass`);async function rt(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:a}=_(t);t.labelStyle=a;let o=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(o,s),l=r?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await j(e,t,`icon-shape default`),p=t.pos===`t`,m=c,h=c,{nodeBorder:v}=n,{stylesMap:x}=y(t),S=-h/2,w=-m/2,T=t.label?8:0,E=C.svg(u),D=g(t,{stroke:`none`,fill:`none`});t.look!==`handDrawn`&&(D.roughness=0,D.fillStyle=`solid`);let O=E.rectangle(S,w,h,m,D),k=Math.max(h,d.width),A=m+d.height+T,M=E.rectangle(-k/2,-A/2,k,A,{...D,fill:`transparent`,stroke:`none`}),P=u.insert(()=>O,`:first-child`),F=u.insert(()=>M);if(t.icon){let e=u.append(`g`);e.html(`<g>${await b(t.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${p?d.height/2+T/2-i/2-o:-d.height/2-T/2-i/2-o})`),e.attr(`style`,`color: ${x.get(`stroke`)??v};`)}return f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${p?-A/2:A/2-d.height})`),P.attr(`transform`,`translate(0,${p?d.height/2+T/2:-d.height/2-T/2})`),N(t,F),t.intersect=function(e){if(i.info(`iconSquare intersect`,t,e),!t.label)return K.rect(t,e);let n=t.x??0,r=t.y??0,a=t.height??0,o=[];return o=p?[{x:n-d.width/2,y:r-a/2},{x:n+d.width/2,y:r-a/2},{x:n+d.width/2,y:r-a/2+d.height+T},{x:n+h/2,y:r-a/2+d.height+T},{x:n+h/2,y:r+a/2},{x:n-h/2,y:r+a/2},{x:n-h/2,y:r-a/2+d.height+T},{x:n-d.width/2,y:r-a/2+d.height+T}]:[{x:n-h/2,y:r-a/2},{x:n+h/2,y:r-a/2},{x:n+h/2,y:r-a/2+m},{x:n+d.width/2,y:r-a/2+m},{x:n+d.width/2/2,y:r+a/2},{x:n-d.width/2,y:r+a/2},{x:n-d.width/2,y:r-a/2+m},{x:n-h/2,y:r-a/2+m}],K.polygon(t,o,e)},u}o(rt,`icon`);async function it(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:a}=_(t);t.labelStyle=a;let o=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(o,s),l=r?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await j(e,t,`icon-shape default`),p=t.label?8:0,m=t.pos===`t`,{nodeBorder:h,mainBkg:v}=n,{stylesMap:x}=y(t),S=C.svg(u),w=g(t,{});t.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`),w.stroke=x.get(`fill`)??v;let T=u.append(`g`);t.icon&&T.html(`<g>${await b(t.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let E=T.node().getBBox(),D=E.width,O=E.height,k=E.x,A=E.y,M=Math.max(D,O)*Math.SQRT2+40,P=S.circle(0,0,M,w),F=Math.max(M,d.width),I=M+d.height+p,L=S.rectangle(-F/2,-I/2,F,I,{...w,fill:`transparent`,stroke:`none`}),ee=u.insert(()=>P,`:first-child`),R=u.insert(()=>L);return T.attr(`transform`,`translate(${-D/2-k},${m?d.height/2+p/2-O/2-A:-d.height/2-p/2-O/2-A})`),T.attr(`style`,`color: ${x.get(`stroke`)??h};`),f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-I/2:I/2-d.height})`),ee.attr(`transform`,`translate(0,${m?d.height/2+p/2:-d.height/2-p/2})`),N(t,R),t.intersect=function(e){return i.info(`iconSquare intersect`,t,e),K.rect(t,e)},u}o(it,`iconCircle`);async function at(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:a}=_(t);t.labelStyle=a;let o=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(o,s),l=r?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await j(e,t,`icon-shape default`),m=t.pos===`t`,h=c+f*2,v=c+f*2,{nodeBorder:x,mainBkg:S}=n,{stylesMap:w}=y(t),T=-v/2,E=-h/2,D=t.label?8:0,O=C.svg(u),k=g(t,{});t.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`),k.stroke=w.get(`fill`)??S;let A=O.path(z(T,E,v,h,5),k),M=Math.max(v,d.width),P=h+d.height+D,F=O.rectangle(-M/2,-P/2,M,P,{...k,fill:`transparent`,stroke:`none`}),I=u.insert(()=>A,`:first-child`).attr(`class`,`icon-shape2`),L=u.insert(()=>F);if(t.icon){let e=u.append(`g`);e.html(`<g>${await b(t.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+D/2-i/2-o:-d.height/2-D/2-i/2-o})`),e.attr(`style`,`color: ${w.get(`stroke`)??x};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-P/2:P/2-d.height})`),I.attr(`transform`,`translate(0,${m?d.height/2+D/2:-d.height/2-D/2})`),N(t,L),t.intersect=function(e){if(i.info(`iconSquare intersect`,t,e),!t.label)return K.rect(t,e);let n=t.x??0,r=t.y??0,a=t.height??0,o=[];return o=m?[{x:n-d.width/2,y:r-a/2},{x:n+d.width/2,y:r-a/2},{x:n+d.width/2,y:r-a/2+d.height+D},{x:n+v/2,y:r-a/2+d.height+D},{x:n+v/2,y:r+a/2},{x:n-v/2,y:r+a/2},{x:n-v/2,y:r-a/2+d.height+D},{x:n-d.width/2,y:r-a/2+d.height+D}]:[{x:n-v/2,y:r-a/2},{x:n+v/2,y:r-a/2},{x:n+v/2,y:r-a/2+h},{x:n+d.width/2,y:r-a/2+h},{x:n+d.width/2/2,y:r+a/2},{x:n-d.width/2,y:r+a/2},{x:n-d.width/2,y:r-a/2+h},{x:n-v/2,y:r-a/2+h}],K.polygon(t,o,e)},u}o(at,`iconRounded`);async function ot(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:a}=_(t);t.labelStyle=a;let o=t.assetHeight??48,s=t.assetWidth??48,c=Math.max(o,s),l=r?.wrappingWidth;t.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await j(e,t,`icon-shape default`),m=t.pos===`t`,h=c+f*2,v=c+f*2,{nodeBorder:x,mainBkg:S}=n,{stylesMap:w}=y(t),T=-v/2,E=-h/2,D=t.label?8:0,O=C.svg(u),k=g(t,{});t.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`),k.stroke=w.get(`fill`)??S;let A=O.path(z(T,E,v,h,.1),k),M=Math.max(v,d.width),P=h+d.height+D,F=O.rectangle(-M/2,-P/2,M,P,{...k,fill:`transparent`,stroke:`none`}),I=u.insert(()=>A,`:first-child`),L=u.insert(()=>F);if(t.icon){let e=u.append(`g`);e.html(`<g>${await b(t.icon,{height:c,width:c,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+D/2-i/2-o:-d.height/2-D/2-i/2-o})`),e.attr(`style`,`color: ${w.get(`stroke`)??x};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-P/2:P/2-d.height})`),I.attr(`transform`,`translate(0,${m?d.height/2+D/2:-d.height/2-D/2})`),N(t,L),t.intersect=function(e){if(i.info(`iconSquare intersect`,t,e),!t.label)return K.rect(t,e);let n=t.x??0,r=t.y??0,a=t.height??0,o=[];return o=m?[{x:n-d.width/2,y:r-a/2},{x:n+d.width/2,y:r-a/2},{x:n+d.width/2,y:r-a/2+d.height+D},{x:n+v/2,y:r-a/2+d.height+D},{x:n+v/2,y:r+a/2},{x:n-v/2,y:r+a/2},{x:n-v/2,y:r-a/2+d.height+D},{x:n-d.width/2,y:r-a/2+d.height+D}]:[{x:n-v/2,y:r-a/2},{x:n+v/2,y:r-a/2},{x:n+v/2,y:r-a/2+h},{x:n+d.width/2,y:r-a/2+h},{x:n+d.width/2/2,y:r+a/2},{x:n-d.width/2,y:r+a/2},{x:n-d.width/2,y:r-a/2+h},{x:n-v/2,y:r-a/2+h}],K.polygon(t,o,e)},u}o(ot,`iconSquare`);async function st(e,t,{config:{flowchart:n}}){let r=new Image;r.src=t?.img??``,await r.decode();let a=Number(r.naturalWidth.toString().replace(`px`,``)),o=Number(r.naturalHeight.toString().replace(`px`,``));t.imageAspectRatio=a/o;let{labelStyles:s}=_(t);t.labelStyle=s;let c=n?.wrappingWidth;t.defaultWidth=n?.wrappingWidth;let l=Math.max(t.label?c??0:0,t?.assetWidth??a),u=t.constraint===`on`&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,d=t.constraint===`on`?u/t.imageAspectRatio:t?.assetHeight??o;t.width=Math.max(u,c??0);let{shapeSvg:f,bbox:p,label:m}=await j(e,t,`image-shape default`),h=t.pos===`t`,v=-u/2,y=-d/2,b=t.label?8:0,x=C.svg(f),S=g(t,{});t.look!==`handDrawn`&&(S.roughness=0,S.fillStyle=`solid`);let w=x.rectangle(v,y,u,d,S),T=Math.max(u,p.width),E=d+p.height+b,D=x.rectangle(-T/2,-E/2,T,E,{...S,fill:`none`,stroke:`none`}),O=f.insert(()=>w,`:first-child`),k=f.insert(()=>D);if(t.img){let e=f.append(`image`);e.attr(`href`,t.img),e.attr(`width`,u),e.attr(`height`,d),e.attr(`preserveAspectRatio`,`none`),e.attr(`transform`,`translate(${-u/2},${h?E/2-d:-E/2})`)}return m.attr(`transform`,`translate(${-p.width/2-(p.x-(p.left??0))},${h?-d/2-p.height/2-b/2:d/2-p.height/2+b/2})`),O.attr(`transform`,`translate(0,${h?p.height/2+b/2:-p.height/2-b/2})`),N(t,k),t.intersect=function(e){if(i.info(`iconSquare intersect`,t,e),!t.label)return K.rect(t,e);let n=t.x??0,r=t.y??0,a=t.height??0,o=[];return o=h?[{x:n-p.width/2,y:r-a/2},{x:n+p.width/2,y:r-a/2},{x:n+p.width/2,y:r-a/2+p.height+b},{x:n+u/2,y:r-a/2+p.height+b},{x:n+u/2,y:r+a/2},{x:n-u/2,y:r+a/2},{x:n-u/2,y:r-a/2+p.height+b},{x:n-p.width/2,y:r-a/2+p.height+b}]:[{x:n-u/2,y:r-a/2},{x:n+u/2,y:r-a/2},{x:n+u/2,y:r-a/2+d},{x:n+p.width/2,y:r-a/2+d},{x:n+p.width/2/2,y:r+a/2},{x:n-p.width/2,y:r+a/2},{x:n-p.width/2,y:r-a/2+d},{x:n-u/2,y:r-a/2+d}],K.polygon(t,o,e)},f}o(st,`imageSquare`);async function ct(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=Math.max(c.height+a*2,t.height??0),u=Math.max(c.width+o*2,(t.width??0)-l),d=[{x:0,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:-3*l/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=g(t,{}),r=F(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,N(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}o(ct,`inv_trapezoid`);async function lt(e,t){let{shapeSvg:n,bbox:r,label:i}=await j(e,t,`label`),a=n.insert(`rect`,`:first-child`);return a.attr(`width`,.1).attr(`height`,.1),n.attr(`class`,`label edgeLabel`),i.attr(`transform`,`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${-(r.height/2)-(r.y-(r.top??0))})`),N(t,a),t.intersect=function(e){return K.rect(t,e)},n}o(lt,`labelRect`);async function ut(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=Math.max(c.height+a,t.height??0),u=Math.max(c.width+o,(t.width??0)-l),d=[{x:0,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:-(3*l)/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=g(t,{}),r=F(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,N(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}o(ut,`lean_left`);async function dt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=Math.max(c.height+a,t.height??0),u=Math.max(c.width+o,(t.width??0)-l),d=[{x:-3*l/6,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:0,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=C.svg(s),n=g(t,{}),r=F(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,N(t,f),t.intersect=function(e){return K.polygon(t,d,e)},s}o(dt,`lean_right`);function ft(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.label=``,t.labelStyle=n;let a=e.insert(`g`).attr(`class`,P(t)).attr(`id`,t.domId??t.id),{cssStyles:o}=t,s=Math.max(35,t?.width??0),c=Math.max(35,t?.height??0),l=[{x:s,y:0},{x:0,y:c+7/2},{x:s-14,y:c+7/2},{x:0,y:2*c},{x:s,y:c-7/2},{x:14,y:c-7/2}],u=C.svg(a),d=g(t,{});t.look!==`handDrawn`&&(d.roughness=0,d.fillStyle=`solid`);let f=F(l),p=u.path(f,d),m=a.insert(()=>p,`:first-child`);return m.attr(`class`,`outer-path`),o&&t.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,o),r&&t.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,r),m.attr(`transform`,`translate(-${s/2},${-c})`),N(t,m),t.intersect=function(e){return i.info(`lightningBolt intersect`,t,e),K.polygon(t,l,e)},a}o(ft,`lightningBolt`);var pt=o((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createCylinderPathD`),mt=o((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createOuterCylinderPathD`),ht=o((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),gt=10,_t=10;async function vt(e,t){let{labelStyles:n,nodeStyles:i}=_(t);t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?16:a,s=t.look===`neo`?24:a;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-o,t.width<_t&&(t.width=_t);let n=e/2/(2.5+e/50);t.height=(t.height??0)-s-n*3,t.height<gt&&(t.height=gt)}let{shapeSvg:c,bbox:l,label:u}=await j(e,t,P(t)),d=(t?.width?t?.width:l.width)+o*2,f=d/2,p=f/(2.5+d/50),m=(t?.height?t?.height:l.height)+p+s*2,h=m*.1,v,{cssStyles:y}=t;if(t.look===`handDrawn`){let e=C.svg(c),n=mt(0,0,d,m,f,p,h),r=ht(0,p,d,m,f,p),i=g(t,{}),a=e.path(n,i),o=e.path(r,i);c.insert(()=>o,`:first-child`).attr(`class`,`line`),v=c.insert(()=>a,`:first-child`),v.attr(`class`,`basic label-container`),y&&v.attr(`style`,y)}else{let e=pt(0,0,d,m,f,p,h);v=c.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,r(y)).attr(`style`,i)}return v.attr(`label-offset-y`,p),v.attr(`transform`,`translate(${-d/2}, ${-(m/2+p)})`),N(t,v),u.attr(`transform`,`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+p-(l.y-(l.top??0))})`),t.intersect=function(e){let n=K.rect(t,e),r=n.x-(t.x??0);if(f!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-p)){let i=p*p*(1-r*r/(f*f));i>0&&(i=Math.sqrt(i)),i=p-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},c}o(vt,`linedCylinder`);async function yt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=(t.width??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:s,bbox:c,label:l}=await j(e,t,P(t)),u=(t?.width?t?.width:c.width)+(a??0)*2,d=(t?.height?t?.height:c.height)+(o??0)*2,f=t.look===`neo`?d/4:d/8,p=d+f,{cssStyles:m}=t,h=C.svg(s),v=g(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=[{x:-u/2-u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:p/2},...I(-u/2-u/2*.1,p/2,u/2+u/2*.1,p/2,f,.8),{x:u/2+u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:-p/2},{x:-u/2,y:-p/2},{x:-u/2,y:p/2*1.1},{x:-u/2,y:-p/2}],b=h.polygon(y.map(e=>[e.x,e.y]),v),x=s.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.attr(`transform`,`translate(0,${-f/2})`),l.attr(`transform`,`translate(${-u/2+(t.padding??0)+u/2*.1/2-(c.x-(c.left??0))},${-d/2+(t.padding??0)-f/2-(c.y-(c.top??0))})`),N(t,x),t.intersect=function(e){return K.polygon(t,y,e)},s}o(yt,`linedWaveEdgedRect`);async function bt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=t.look===`neo`?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2-2*s,10),t.height=Math.max((t?.height??0)-o*2-2*s,10));let{shapeSvg:c,bbox:l,label:u}=await j(e,t,P(t)),d=(t?.width?t?.width:l.width)+a*2+2*s,f=(t?.height?t?.height:l.height)+o*2+2*s,p=d-2*s,m=f-2*s,h=-p/2,v=-m/2,{cssStyles:y}=t,b=C.svg(c),x=g(t,{}),S=[{x:h-s,y:v+s},{x:h-s,y:v+m+s},{x:h+p-s,y:v+m+s},{x:h+p-s,y:v+m},{x:h+p,y:v+m},{x:h+p,y:v+m-s},{x:h+p+s,y:v+m-s},{x:h+p+s,y:v-s},{x:h+s,y:v-s},{x:h+s,y:v},{x:h,y:v},{x:h,y:v+s}],w=[{x:h,y:v+s},{x:h+p-s,y:v+s},{x:h+p-s,y:v+m},{x:h+p,y:v+m},{x:h+p,y:v},{x:h,y:v}];t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let T=F(S),E=b.path(T,x),D=F(w),O=b.path(D,x);t.look!==`handDrawn`&&(E=ee(E),O=ee(O));let k=c.insert(`g`,`:first-child`);return k.insert(()=>E),k.insert(()=>O),k.attr(`class`,`basic label-container outer-path`),y&&t.look!==`handDrawn`&&k.selectAll(`path`).attr(`style`,y),r&&t.look!==`handDrawn`&&k.selectAll(`path`).attr(`style`,r),u.attr(`transform`,`translate(${-(l.width/2)-s-(l.x-(l.left??0))}, ${-(l.height/2)+s-(l.y-(l.top??0))})`),N(t,k),t.intersect=function(e){return K.polygon(t,S,e)},c}o(bt,`multiRect`);async function xt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=t.padding??0,c=t.look===`neo`?16:s,l=t.look===`neo`?12:s,u=!0;(t.width||t.height)&&(u=!1,t.width=(t?.width??0)-c*2,t.height=(t?.height??0)-l*3);let d=Math.max(a.width,t?.width??0)+c*2,f=Math.max(a.height,t?.height??0)+l*3,p=t.look===`neo`?f/4:f/8,m=f+(u?p/2:-p/2),h=-d/2,v=-m/2,{cssStyles:y}=t,b=I(h-10,v+m+10,h+d-10,v+m+10,p,.8),x=b?.[b.length-1],S=[{x:h-10,y:v+10},{x:h-10,y:v+m+10},...b,{x:h+d-10,y:x.y-10},{x:h+d,y:x.y-10},{x:h+d,y:x.y-20},{x:h+d+10,y:x.y-20},{x:h+d+10,y:v-10},{x:h+10,y:v-10},{x:h+10,y:v},{x:h,y:v},{x:h,y:v+10}],w=[{x:h,y:v+10},{x:h+d-10,y:v+10},{x:h+d-10,y:x.y-10},{x:h+d,y:x.y-10},{x:h+d,y:v},{x:h,y:v}],T=C.svg(i),E=g(t,{});t.look!==`handDrawn`&&(E.roughness=0,E.fillStyle=`solid`);let D=F(S),O=T.path(D,E),k=F(w),A=T.path(k,E),M=i.insert(()=>O,`:first-child`);return M.insert(()=>A),M.attr(`class`,`basic label-container outer-path`),y&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,y),r&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,r),M.attr(`transform`,`translate(0,${-p/2})`),o.attr(`transform`,`translate(${-(a.width/2)-10-(a.x-(a.left??0))}, ${-(a.height/2)+10-p/2-(a.y-(a.top??0))})`),N(t,M),t.intersect=function(e){return K.polygon(t,S,e)},i}o(xt,`multiWaveEdgedRectangle`);async function St(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r,t.useHtmlLabels||u(d())||(t.centerLabel=!0);let{shapeSvg:a,bbox:o,label:s}=await j(e,t,P(t)),c=Math.max(o.width+(t.padding??0)*2,t?.width??0),l=Math.max(o.height+(t.padding??0)*2,t?.height??0),f=-c/2,p=-l/2,{cssStyles:m}=t,h=C.svg(a),v=g(t,{fill:n.noteBkgColor,stroke:n.noteBorderColor});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=h.rectangle(f,p,c,l,v),b=a.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container outer-path`),s.attr(`class`,`label noteLabel`),m&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,m),i&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,i),s.attr(`transform`,`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),N(t,b),t.intersect=function(e){return K.rect(t,e)},a}o(St,`note`);var Ct=o((e,t,n)=>[`M${e+n/2},${t}`,`L${e+n},${t-n/2}`,`L${e+n/2},${t-n}`,`L${e},${t-n/2}`,`Z`].join(` `),`createDecisionBoxPathD`);async function wt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await j(e,t,P(t)),o=a.width+(t.padding??0)+(a.height+(t.padding??0)),s=.5,c=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}],l,{cssStyles:u}=t;if(t.look===`handDrawn`){let e=C.svg(i),n=g(t,{}),r=Ct(0,0,o),a=e.path(r,n);l=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-o/2+s}, ${o/2})`),u&&l.attr(`style`,u)}else l=q(i,o,o,c),l.attr(`transform`,`translate(${-o/2+s}, ${o/2})`);return r&&l.attr(`style`,r),N(t,l),t.calcIntersect=function(e,t){let n=e.width,r=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],i=K.polygon(e,r,t);return{x:i.x-.5,y:i.y-.5}},t.intersect=function(e){return this.calcIntersect(t,e)},i}o(wt,`question`);async function Tt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?21:i??0,o=t.look===`neo`?12:i??0,{shapeSvg:s,bbox:c,label:l}=await j(e,t,P(t)),u=c.width+(t.look===`neo`?a*2:a),d=Math.max(c.height+(t.look===`neo`?o*2:o),t.height??0),f=d/4,p=-Math.max(u,(t.width??0)-f)/2,m=-d/2,h=m/2,v=[{x:p+h,y:m},{x:p,y:0},{x:p+h,y:-m},{x:-p,y:-m},{x:-p,y:m}],{cssStyles:y}=t,b=C.svg(s),x=g(t,{});t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let S=F(v),w=b.path(S,x),T=s.insert(()=>w,`:first-child`);return T.attr(`class`,`basic label-container outer-path`),y&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,y),r&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,r),T.attr(`transform`,`translate(${-h/2},0)`),l.attr(`transform`,`translate(${-h/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),N(t,T),t.intersect=function(e){return K.polygon(t,v,e)},s}o(Tt,`rect_left_inv_arrow`);async function Et(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let o;o=t.cssClasses?`node `+t.cssClasses:`node default`;let s=e.insert(`g`).attr(`class`,o).attr(`id`,t.domId||t.id),c=s.insert(`g`),l=s.insert(`g`).attr(`class`,`label`).attr(`style`,r),d=t.description,f=t.label,p=await te(l,f,t.labelStyle,!0,!0),h={width:0,height:0};if(u(m())){let e=p.children[0],t=a(p);h=e.getBoundingClientRect(),t.attr(`width`,h.width),t.attr(`height`,h.height)}i.info(`Text 2`,d);let v=d||[],y=p.getBBox(),b=await te(l,Array.isArray(v)?v.join(`<br/>`):v,t.labelStyle,!0,!0),x=b.children[0],S=a(b);h=x.getBoundingClientRect(),S.attr(`width`,h.width),S.attr(`height`,h.height);let w=(t.padding||0)/2;a(b).attr(`transform`,`translate( `+(h.width>y.width?0:(y.width-h.width)/2)+`, `+(y.height+w+5)+`)`),a(p).attr(`transform`,`translate( `+(h.width<y.width?0:-(y.width-h.width)/2)+`, 0)`),h=l.node().getBBox(),l.attr(`transform`,`translate(`+-h.width/2+`, `+(-h.height/2-w+3)+`)`);let T=h.width+(t.padding||0),E=h.height+(t.padding||0),D=-h.width/2-w,O=-h.height/2-w,k,A;if(t.look===`handDrawn`){let e=C.svg(s),n=g(t,{}),r=e.path(z(D,O,T,E,t.rx||0),n),a=e.line(-h.width/2-w,-h.height/2-w+y.height+w,h.width/2+w,-h.height/2-w+y.height+w,n);A=s.insert(()=>(i.debug(`Rough node insert CXC`,r),a),`:first-child`),k=s.insert(()=>(i.debug(`Rough node insert CXC`,r),r),`:first-child`)}else k=c.insert(`rect`,`:first-child`),A=c.insert(`line`),k.attr(`class`,`outer title-state`).attr(`style`,r).attr(`x`,-h.width/2-w).attr(`y`,-h.height/2-w).attr(`width`,h.width+(t.padding||0)).attr(`height`,h.height+(t.padding||0)),A.attr(`class`,`divider`).attr(`x1`,-h.width/2-w).attr(`x2`,h.width/2+w).attr(`y1`,-h.height/2-w+y.height+w).attr(`y2`,-h.height/2-w+y.height+w);return N(t,k),t.intersect=function(e){return K.rect(t,e)},s}o(Et,`rectWithTitle`);async function Dt(e,t,{config:{themeVariables:n}}){let r=n?.radius??5;return Ue(e,t,{rx:r,ry:r,classes:``,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1})}o(Dt,`roundedRect`);var Z=8;async function Ot(e,t){let{labelStyles:n,nodeStyles:i}=_(t);t.labelStyle=n;let a=t.look===`neo`?16:t.padding??0,o=t.look===`neo`?12:t.padding??0,{shapeSvg:s,bbox:c,label:l}=await j(e,t,P(t)),u=(t?.width??c.width)+a*2+(t.look===`neo`?Z:Z*2),d=(t?.height??c.height)+o*2,f=u-Z,p=d,m=Z-u/2,h=-d/2,{cssStyles:v}=t,y=C.svg(s),b=g(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=[{x:m,y:h},{x:m+f,y:h},{x:m+f,y:h+p},{x:m-Z,y:h+p},{x:m-Z,y:h},{x:m,y:h},{x:m,y:h+p}],S=y.polygon(x.map(e=>[e.x,e.y]),b),w=s.insert(()=>S,`:first-child`);return w.attr(`class`,`basic label-container outer-path`).attr(`style`,r(v)),i&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,i),v&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,i),l.attr(`transform`,`translate(${Z/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),N(t,w),t.intersect=function(e){return K.rect(t,e)},s}o(Ot,`shadedProcess`);async function kt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2,10),t.height=Math.max((t?.height??0)/1.5-o*2,10));let{shapeSvg:s,bbox:c,label:l}=await j(e,t,P(t)),u=(t?.width?t?.width:c.width)+a*2,d=((t?.height?t?.height:c.height)+o*2)*1.5,f=u,p=d/1.5,m=-f/2,h=-p/2,{cssStyles:v}=t,y=C.svg(s),b=g(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=[{x:m,y:h},{x:m,y:h+p},{x:m+f,y:h+p},{x:m+f,y:h-p/2}],S=F(x),w=y.path(S,b),T=s.insert(()=>w,`:first-child`);return T.attr(`class`,`basic label-container outer-path`),v&&t.look!==`handDrawn`&&T.selectChildren(`path`).attr(`style`,v),r&&t.look!==`handDrawn`&&T.selectChildren(`path`).attr(`style`,r),T.attr(`transform`,`translate(0, ${p/4})`),l.attr(`transform`,`translate(${-f/2+(t.padding??0)-(c.x-(c.left??0))}, ${-p/4+(t.padding??0)-(c.y-(c.top??0))})`),N(t,T),t.intersect=function(e){return K.polygon(t,x,e)},s}o(kt,`slopedRect`);async function At(e,t){let n=t.padding??0,r=t.look===`neo`?16:n*2,i=t.look===`neo`?12:n;return Ue(e,t,{rx:0,ry:0,classes:``,labelPaddingX:t.labelPaddingX??r,labelPaddingY:i})}o(At,`squareRect`);async function jt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?20:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=c.height+(t.look===`neo`?o*2:o),u=c.width+l/4+(t.look===`neo`?a*2:a),d=l/2,{cssStyles:f}=t,p=C.svg(s),m=g(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-u/2+d,y:-l/2},{x:u/2-d,y:-l/2},...L(-u/2+d,0,d,50,90,270),{x:u/2-d,y:l/2},...L(u/2-d,0,d,50,270,450)],v=F(h),y=p.path(v,m),b=s.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,r),N(t,b),t.intersect=function(e){return K.polygon(t,h,e)},s}o(jt,`stadium`);async function Mt(e,t){return Ue(e,t,{rx:t.look===`neo`?3:5,ry:t.look===`neo`?3:5,classes:`flowchart-node`})}o(Mt,`state`);function Nt(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=_(t);t.labelStyle=r;let{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:c,nodeShadow:l}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let u=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId??t.id),d=C.svg(u),f=g(t,{});t.look!==`handDrawn`&&(f.roughness=0,f.fillStyle=`solid`);let p=d.circle(0,0,t.width,{...f,stroke:o,strokeWidth:2}),m=s??c,h=(t.width??0)*5/14,v=d.circle(0,0,h,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:`solid`}),y=u.insert(()=>p,`:first-child`);if(y.insert(()=>v),t.look!==`handDrawn`&&y.attr(`class`,`outer-path`),a&&y.selectAll(`path`).attr(`style`,a),i&&y.selectAll(`path`).attr(`style`,i),t.width<25&&l&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;y.attr(`style`,`filter:url(#${n})`)}return N(t,y),t.intersect=function(e){return K.circle(t,(t.width??0)/2,e)},u}o(Nt,`stateEnd`);function Pt(e,t,{config:{themeVariables:n}}){let{lineColor:r,nodeShadow:i}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let a=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),o;if(t.look===`handDrawn`){let e=C.svg(a).circle(0,0,t.width,v(r));o=a.insert(()=>e),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14)}else o=a.insert(`circle`,`:first-child`),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14);if(t.width<25&&i&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;o.attr(`style`,`filter:url(#${n})`)}return N(t,o),t.intersect=function(e){return K.circle(t,(t.width??7)/2,e)},a}o(Pt,`stateStart`);var Ft=8;async function It(e,t){let{labelStyles:n,nodeStyles:i}=_(t);t.labelStyle=n;let a=t?.padding??8,o=t.look===`neo`?28:a,s=t.look===`neo`?12:a,{shapeSvg:c,bbox:l}=await j(e,t,P(t)),u=Math.max(l.width+2*Ft+o,t.width??0),d=Math.max(l.height+s,t.height??0),f=u-2*Ft,p=d,m=-u/2,h=-d/2,v=[{x:0,y:0},{x:f,y:0},{x:f,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:f+8,y:0},{x:f+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(t.look===`handDrawn`){let e=C.svg(c),n=g(t,{}),i=e.rectangle(m,h,f+16,p,n),a=e.line(m+Ft,h,m+Ft,h+p,n),o=e.line(m+Ft+f,h,m+Ft+f,h+p,n);c.insert(()=>a,`:first-child`),c.insert(()=>o,`:first-child`);let s=c.insert(()=>i,`:first-child`),{cssStyles:l}=t;s.attr(`class`,`basic label-container`).attr(`style`,r(l)),N(t,s)}else{let e=q(c,f,p,v);i&&e.attr(`style`,i),N(t,e)}return t.intersect=function(e){return K.polygon(t,v,e)},c}o(It,`subroutine`);var Lt=.2;async function Rt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-o*2,10),t.width=Math.max((t?.width??0)-a*2-Lt*(t.height+o*2),10));let{shapeSvg:s,bbox:c}=await j(e,t,P(t)),l=(t?.height?t?.height:c.height)+o*2,u=Lt*l,d=Lt*l,f=(t?.width?t?.width:c.width)+a*2+u-u,p=l,m=-f/2,h=-p/2,{cssStyles:v}=t,y=C.svg(s),b=g(t,{}),x=[{x:m-u/2,y:h},{x:m+f+u/2,y:h},{x:m+f+u/2,y:h+p},{x:m-u/2,y:h+p}],S=[{x:m+f-u/2,y:h+p},{x:m+f+u/2,y:h+p},{x:m+f+u/2,y:h+p-d}];t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let w=F(x),T=y.path(w,b),E=F(S),D=y.path(E,{...b,fillStyle:`solid`}),O=s.insert(()=>D,`:first-child`);return O.insert(()=>T,`:first-child`),O.attr(`class`,`basic label-container outer-path`),v&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,v),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),N(t,O),t.intersect=function(e){return K.polygon(t,x,e)},s}o(Rt,`taggedRect`);async function zt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await j(e,t,P(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=c/8,u=.2*s,d=.2*c,f=c+l,{cssStyles:p}=t,m=C.svg(i),h=g(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let v=[{x:-s/2-s/2*.1,y:f/2},...I(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,l,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],y=-s/2+s/2*.1,b=-f/2-d*.4,x=[{x:y+s-u,y:(b+c)*1.3},{x:y+s,y:b+c-d},{x:y+s,y:(b+c)*.9},...I(y+s,(b+c)*1.25,y+s-u,(b+c)*1.3,-c*.02,.5)],S=F(v),w=m.path(S,h),T=F(x),E=m.path(T,{...h,fillStyle:`solid`}),D=i.insert(()=>E,`:first-child`);return D.insert(()=>w,`:first-child`),D.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),D.attr(`transform`,`translate(0,${-l/2})`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),N(t,D),t.intersect=function(e){return K.polygon(t,v,e)},i}o(zt,`taggedWaveEdgedRectangle`);async function Bt(e,t){let{labelStyles:n,nodeStyles:r}=_(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await j(e,t,P(t)),o=Math.max(a.width+(t.padding??0),t?.width||0),s=Math.max(a.height+(t.padding??0),t?.height||0),c=-o/2,l=-s/2,u=i.insert(`rect`,`:first-child`);return u.attr(`class`,`text`).attr(`style`,r).attr(`rx`,0).attr(`ry`,0).attr(`x`,c).attr(`y`,l).attr(`width`,o).attr(`height`,s),N(t,u),t.intersect=function(e){return K.rect(t,e)},i}o(Bt,`text`);var Vt=o((e,t,n,r,i,a)=>`M${e},${t}
3
3
  a${i},${a} 0,0,1 0,${-r}
4
4
  l${n},0
@@ -0,0 +1,2 @@
1
+ import{n as e,t}from"./isObjectLike-DnuJWahO.js";import{n,t as r}from"./src-Caqqw6Gw.js";import{n as i}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{R as a,h as o,p as s,r as c,s as l}from"./chunk-DU6HZSFF-BWpgeLJJ.js";import"./math-Bi_r_ZWc.js";import{t as u}from"./linear-CNEal4Ob.js";import{t as d}from"./dist-CN30VTUJ.js";function f(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ee(){}function te(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}var ne=`[object RegExp]`,p=`[object String]`,m=`[object Number]`,h=`[object Boolean]`,g=`[object Arguments]`,re=`[object Symbol]`,ie=`[object Date]`,_=`[object Map]`,v=`[object Set]`,y=`[object Array]`,b=`[object ArrayBuffer]`,ae=`[object Object]`,oe=`[object DataView]`,se=`[object Uint8Array]`,ce=`[object Uint8ClampedArray]`,le=`[object Uint16Array]`,ue=`[object Uint32Array]`,de=`[object Int8Array]`,fe=`[object Int16Array]`,pe=`[object Int32Array]`,me=`[object Float32Array]`,he=`[object Float64Array]`,ge=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function x(e){return ge.Buffer!==void 0&&ge.Buffer.isBuffer(e)}function _e(e){return Number.isSafeInteger(e)&&e>=0}function ve(e){return e!=null&&typeof e!=`function`&&_e(e.length)}function ye(e){return e===`__proto__`}function S(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function C(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function be(e,t){return w(e,void 0,e,new Map,t)}function w(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(S(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=w(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,w(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(w(a,void 0,n,r,i));return t}if(x(e))return e.subarray();if(C(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=w(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),T(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),T(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),T(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,T(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),T(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),T(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),T(t,e,n,r,i),t}if(typeof e==`object`&&xe(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),T(t,e,n,r,i),t}return e}function T(e,t,n=e,r,i){let a=[...Object.keys(t),...te(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=w(t[s],s,n,r,i))}}function xe(t){switch(e(t)){case g:case y:case b:case oe:case h:case ie:case me:case he:case de:case fe:case pe:case _:case m:case ae:case ne:case v:case p:case re:case se:case ce:case le:case ue:return!0;default:return!1}}function Se(t,n){return be(t,(r,i,a,o)=>{let s=n?.(r,i,a,o);if(s!==void 0)return s;if(typeof t==`object`){if(e(t)===`[object Object]`&&typeof t.constructor!=`function`){let e={};return o.set(t,e),T(e,t,a,o),e}switch(Object.prototype.toString.call(t)){case m:case p:case h:{let e=new t.constructor(t?.valueOf());return T(e,t),e}case g:{let e={};return T(e,t),e.length=t.length,e[Symbol.iterator]=t[Symbol.iterator],e}default:return}}})}function Ce(e){return Se(e)}function E(t){return typeof t==`object`&&!!t&&e(t)===`[object Arguments]`}function we(e){return t(e)&&ve(e)}function D(e){return C(e)}function O(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(`Expected a function`);let n=function(...r){let i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);let o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(O.Cache||Map),n}O.Cache=Map;function Te(e){if(S(e))return e;if(Array.isArray(e)||C(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}function Ee(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;e<n.length;e++){let t=n[e];i=k(i,t,r,new Map)}return i}function k(e,n,r,i){if(S(e)&&(e=Object(e)),typeof n!=`object`||!n)return e;if(i.has(n))return Te(i.get(n));if(i.set(n,e),Array.isArray(n)){n=n.slice();for(let e=0;e<n.length;e++)e in n||(n[e]=void 0)}let a=[...Object.keys(n),...te(n)];for(let o=0;o<a.length;o++){let s=a[o];if(ye(s))continue;let c=n[s],l=e[s];if(E(c)&&(c={...c}),E(l)&&(l={...l}),x(c)&&(c=Ce(c)),Array.isArray(c)){if(Array.isArray(l)){let e=[],t=Reflect.ownKeys(l);for(let n=0;n<t.length;n++){let r=t[n];e[r]=l[r]}l=e}else if(we(l)){let e=[];for(let t=0;t<l.length;t++)e[t]=l[t];l=e}else l=[]}let u=r(l,c,s,e,n,i);u===void 0?Array.isArray(c)||t(l)&&t(c)&&(f(l)||f(c)||D(l)||D(c))?e[s]=k(l,c,r,i):l==null&&f(c)?e[s]=k({},c,r,i):l==null&&D(c)?e[s]=Ce(c):(l===void 0||c!==void 0)&&(e[s]=c):e[s]=u}return e}function De(e,...t){return Ee(e,...t,ee)}var A=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}};function j(e){return new A(e,!0)}function Oe(e){return new A(e,!1)}function M(){}function N(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function P(e){this._context=e}P.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:N(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:N(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ke(e){return new P(e)}function Ae(e){this._context=e}Ae.prototype={areaStart:M,areaEnd:M,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:N(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function je(e){return new Ae(e)}function Me(e){this._context=e}Me.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:N(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ne(e){return new Me(e)}function Pe(e,t){this._basis=new P(e),this._beta=t}Pe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var Fe=(function e(t){function n(e){return t===1?new P(e):new Pe(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function F(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function I(e,t){this._context=e,this._k=(1-t)/6}I.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:F(this,this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:F(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Ie=(function e(t){function n(e){return new I(e,t)}return n.tension=function(t){return e(+t)},n})(0);function L(e,t){this._context=e,this._k=(1-t)/6}L.prototype={areaStart:M,areaEnd:M,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:F(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Le=(function e(t){function n(e){return new L(e,t)}return n.tension=function(t){return e(+t)},n})(0);function R(e,t){this._context=e,this._k=(1-t)/6}R.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:F(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Re=(function e(t){function n(e){return new R(e,t)}return n.tension=function(t){return e(+t)},n})(0);function z(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function ze(e,t){this._context=e,this._alpha=t}ze.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:z(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var B=(function e(t){function n(e){return t?new ze(e,t):new I(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Be(e,t){this._context=e,this._alpha=t}Be.prototype={areaStart:M,areaEnd:M,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:z(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Ve=(function e(t){function n(e){return t?new Be(e,t):new L(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function He(e,t){this._context=e,this._alpha=t}He.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:z(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Ue=(function e(t){function n(e){return t?new He(e,t):new R(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function We(e){this._context=e}We.prototype={areaStart:M,areaEnd:M,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Ge(e){return new We(e)}function Ke(e){return e<0?-1:1}function qe(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Ke(a)+Ke(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Je(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function V(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function H(e){this._context=e}H.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:V(this,this._t0,Je(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,V(this,Je(this,n=qe(this,e,t)),n);break;default:V(this,this._t0,n=qe(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Ye(e){this._context=new Xe(e)}(Ye.prototype=Object.create(H.prototype)).point=function(e,t){H.prototype.point.call(this,t,e)};function Xe(e){this._context=e}Xe.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function Ze(e){return new H(e)}function Qe(e){return new Ye(e)}function $e(e){this._context=e}$e.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n){if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=et(e),i=et(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o])}(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function et(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function tt(e){return new $e(e)}function U(e,t){this._context=e,this._t=t}U.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};function nt(e){return new U(e,.5)}function rt(e){return new U(e,0)}function it(e){return new U(e,1)}var at=d(),ot={curveBasis:ke,curveBasisClosed:je,curveBasisOpen:Ne,curveBumpX:j,curveBumpY:Oe,curveBundle:Fe,curveCardinalClosed:Le,curveCardinalOpen:Re,curveCardinal:Ie,curveCatmullRomClosed:Ve,curveCatmullRomOpen:Ue,curveCatmullRom:B,curveLinear:u,curveLinearClosed:Ge,curveMonotoneX:Ze,curveMonotoneY:Qe,curveNatural:tt,curveStep:nt,curveStepAfter:it,curveStepBefore:rt},st=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ct=i(function(e,t){let n=lt(e,/(?:init\b)|(?:initialize\b)/),r={};if(Array.isArray(n)){let e=n.map(e=>e.args);a(e),r=c(r,[...e])}else r=n.args;if(!r)return;let i=s(e,t),o=`config`;return r[o]!==void 0&&(i===`flowchart-v2`&&(i=`flowchart`),r[i]=r[o],delete r[o]),r},`detectInit`),lt=i(function(e,t=null){try{let r=RegExp(`[%]{2}(?![{]${st.source})(?=[}][%]{2}).*
2
+ `,`ig`);e=e.trim().replace(r,``).replace(/'/gm,`"`),n.debug(`Detecting diagram directive${t===null?``:` type:`+t} based on the text:${e}`);let i,a=[];for(;(i=o.exec(e))!==null;)if(i.index===o.lastIndex&&o.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){let e=i[1]?i[1]:i[2],t=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;a.push({type:e,args:t})}return a.length===0?{type:e,args:null}:a.length===1?a[0]:a}catch(r){return n.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},`detectDirective`),ut=i(function(e){return e.replace(o,``)},`removeDirectives`),dt=i(function(e,t){for(let[n,r]of t.entries())if(r.match(e))return n;return-1},`isSubstringInArray`);function W(e,t){return e?ot[`curve${e.charAt(0).toUpperCase()+e.slice(1)}`]??t:t}i(W,`interpolateToCurve`);function ft(e,t){let n=e.trim();if(n)return t.securityLevel===`loose`?n:(0,at.sanitizeUrl)(n)}i(ft,`formatUrl`);var pt=i((e,...t)=>{let r=e.split(`.`),i=r.length-1,a=r[i],o=window;for(let t=0;t<i;t++)if(o=o[r[t]],!o){n.error(`Function name: ${e} not found in window`);return}o[a](...t)},`runFunc`);function G(e,t){return!e||!t?0:Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}i(G,`distance`);function mt(e){let t,n=0;return e.forEach(e=>{n+=G(e,t),t=e}),K(e,n/2)}i(mt,`traverseEdge`);function ht(e){return e.length===1?e[0]:mt(e)}i(ht,`calcLabelPosition`);var gt=i((e,t=2)=>{let n=10**t;return Math.round(e*n)/n},`roundNumber`),K=i((e,t)=>{let n,r=t;for(let t of e){if(n){let e=G(t,n);if(e===0)return n;if(e<r)r-=e;else{let i=r/e;if(i<=0)return n;if(i>=1)return{x:t.x,y:t.y};if(i>0&&i<1)return{x:gt((1-i)*n.x+i*t.x,5),y:gt((1-i)*n.y+i*t.y,5)}}}n=t}throw Error(`Could not find a suitable point for the given distance`)},`calculatePoint`),_t=i((e,t,r)=>{n.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());let i=K(t,25),a=e?10:5,o=Math.atan2(t[0].y-i.y,t[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(t[0].x+i.x)/2,s.y=-Math.cos(o)*a+(t[0].y+i.y)/2,s},`calcCardinalityPosition`);function vt(e,t,r){let i=structuredClone(r);n.info(`our points`,i),t!==`start_left`&&t!==`start_right`&&i.reverse();let a=K(i,25+e),o=10+e*.5,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),c={x:0,y:0};return t===`start_left`?(c.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,c.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):t===`end_right`?(c.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,c.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):t===`end_left`?(c.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,c.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(c.x=Math.sin(s)*o+(i[0].x+a.x)/2,c.y=-Math.cos(s)*o+(i[0].y+a.y)/2),c}i(vt,`calcTerminalLabelPosition`);function q(e){let t=``,n=``;for(let r of e)r!==void 0&&(r.startsWith(`color:`)||r.startsWith(`text-align:`)?n=n+r+`;`:t=t+r+`;`);return{style:t,labelStyle:n}}i(q,`getStylesFromArray`);var yt=0,bt=i(()=>(yt++,`id-`+Math.random().toString(36).substr(2,12)+`-`+yt),`generateId`);function xt(e){let t=``;for(let n=0;n<e;n++)t+=`0123456789abcdef`.charAt(Math.floor(Math.random()*16));return t}i(xt,`makeRandomHex`);var St=i(e=>xt(e.length),`random`),Ct=i(function(){return{x:0,y:0,fill:void 0,anchor:`start`,style:`#666`,width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:``}},`getTextObj`),wt=i(function(e,t){let n=t.text.replace(l.lineBreakRegex,` `),[,r]=Q(t.fontSize),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.style(`text-anchor`,t.anchor),i.style(`font-family`,t.fontFamily),i.style(`font-size`,r),i.style(`font-weight`,t.fontWeight),i.attr(`fill`,t.fill),t.class!==void 0&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.attr(`fill`,t.fill),a.text(n),i},`drawSimpleText`),Tt=O((e,t,n)=>{if(!e||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,joinWith:`<br/>`},n),l.lineBreakRegex.test(e)))return e;let r=e.split(` `).filter(Boolean),i=[],a=``;return r.forEach((e,o)=>{let s=Y(`${e} `,n),c=Y(a,n);if(s>t){let{hyphenatedStrings:r,remainingWord:o}=Et(e,t,`-`,n);i.push(a,...r),a=o}else c+s>=t?(i.push(a),a=e):a=[a,e].filter(Boolean).join(` `);o+1===r.length&&i.push(a)}),i.filter(e=>e!==``).join(n.joinWith)},(e,t,n)=>`${e}${t}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),Et=O((e,t,n=`-`,r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,margin:0},r);let i=[...e],a=[],o=``;return i.forEach((e,s)=>{let c=`${o}${e}`;if(Y(c,r)>=t){let e=s+1,t=i.length===e,r=`${c}${n}`;a.push(t?c:r),o=``}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,n=`-`,r)=>`${e}${t}${n}${r.fontSize}${r.fontWeight}${r.fontFamily}`);function J(e,t){return X(e,t).height}i(J,`calculateTextHeight`);function Y(e,t){return X(e,t).width}i(Y,`calculateTextWidth`);var X=O((e,t)=>{let{fontSize:n=12,fontFamily:i=`Arial`,fontWeight:a=400}=t;if(!e)return{width:0,height:0};let[,o]=Q(n),s=[`sans-serif`,i],c=e.split(l.lineBreakRegex),u=[],d=r(`body`);if(!d.remove)return{width:0,height:0,lineHeight:0};let f=d.append(`svg`);for(let e of s){let t=0,n={width:0,height:0,lineHeight:0};for(let r of c){let i=Ct();i.text=r||`​`;let s=wt(f,i).style(`font-size`,o).style(`font-weight`,a).style(`font-family`,e),c=(s._groups||s)[0][0].getBBox();if(c.width===0&&c.height===0)throw Error(`svg element not in render tree`);n.width=Math.round(Math.max(n.width,c.width)),t=Math.round(c.height),n.height+=t,n.lineHeight=Math.round(Math.max(n.lineHeight,t))}u.push(n)}return f.remove(),u[isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Dt=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{i(this,`InitIDGenerator`)}},Z,Ot=i(function(e){return Z||=document.createElement(`div`),e=escape(e).replace(/%26/g,`&`).replace(/%23/g,`#`).replace(/%3B/g,`;`),Z.innerHTML=e,unescape(Z.textContent)},`entityDecode`);function kt(e){return`str`in e}i(kt,`isDetailedError`);var At=i((e,t,n,r)=>{if(!r)return;let i=e.node()?.getBBox();i&&e.append(`text`).text(r).attr(`text-anchor`,`middle`).attr(`x`,i.x+i.width/2).attr(`y`,-n).attr(`class`,t)},`insertTitle`),Q=i(e=>{if(typeof e==`number`)return[e,e+`px`];let t=parseInt(e??``,10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+`px`]:[t,e]},`parseFontSize`);function $(e,t){return De({},e,t)}i($,`cleanAndMerge`);var jt={assignWithDepth:c,wrapLabel:Tt,calculateTextHeight:J,calculateTextWidth:Y,calculateTextDimensions:X,cleanAndMerge:$,detectInit:ct,detectDirective:lt,isSubstringInArray:dt,interpolateToCurve:W,calcLabelPosition:ht,calcCardinalityPosition:_t,calcTerminalLabelPosition:vt,formatUrl:ft,getStylesFromArray:q,generateId:bt,random:St,runFunc:pt,entityDecode:Ot,insertTitle:At,isLabelCoordinateInPath:It,parseFontSize:Q,InitIDGenerator:Dt},Mt=i(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/#\w+;/g,function(e){let t=e.substring(1,e.length-1);return/^\+?\d+$/.test(t)?`fl°°`+t+`¶ß`:`fl°`+t+`¶ß`}),t},`encodeEntities`),Nt=i(function(e){return e.replace(/fl°°/g,`&#`).replace(/fl°/g,`&`).replace(/¶ß/g,`;`)},`decodeEntities`),Pt=i((e,t,{counter:n=0,prefix:r,suffix:i},a)=>a||`${r?`${r}_`:``}${e}_${t}_${n}${i?`_${i}`:``}`,`getEdgeId`);function Ft(e){return e??null}i(Ft,`handleUndefinedAttr`);function It(e,t){let n=Math.round(e.x),r=Math.round(e.y),i=t.replace(/(\d+\.\d+)/g,e=>Math.round(parseFloat(e)).toString());return i.includes(n.toString())||i.includes(r.toString())}i(It,`isLabelCoordinateInPath`);export{ue as $,E as A,me as B,Qe as C,j as D,ke as E,b as F,_ as G,fe as H,y as I,ne as J,m as K,h as L,ve as M,x as N,Oe as O,g as P,le as Q,oe as R,Ze as S,Ie as T,pe as U,he as V,de as W,p as X,v as Y,re as Z,Tt as _,Nt as a,nt as b,Pt as c,W as d,se as et,kt as f,jt as g,ut as h,$ as i,S as j,D as k,q as l,St as m,J as n,Mt as o,Q as p,ae as q,Y as r,bt as s,X as t,ce as tt,Ft as u,it as v,B as w,tt as x,rt as y,ie as z};