@layers-app/editor 2.2.43 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. package/dist/index.cjs +2 -2
  2. package/dist/index.d.ts +16 -1
  3. package/dist/index.js +12 -12
  4. package/dist/{layers.DMD2Uy-b.js → layers.-2KfQ6RG.js} +1 -1
  5. package/dist/{layers.D_fmVaW-.js → layers.2VLsd23I.js} +1 -1
  6. package/dist/layers.3t60RULo.js +1314 -0
  7. package/dist/layers.5g-d1lPI.js +1019 -0
  8. package/dist/{layers.DB3g0uv9.js → layers.6fNZWRMy.js} +1 -1
  9. package/dist/{layers.9fzhTnHG.js → layers.6nxhuUZS.js} +1 -1
  10. package/dist/{layers.Dv5cum-u.js → layers.77ToS0vJ.js} +1 -1
  11. package/dist/{layers.UgwPqXW8.js → layers.7oPXw6se.js} +1 -1
  12. package/dist/{layers.DquK_j31.js → layers.8aC_7H6s.js} +1 -1
  13. package/dist/{layers.DVH0bxj2.js → layers.9_5gtlo0.js} +1 -1
  14. package/dist/{layers.D9NG4hfd.js → layers.A2b0zfpv.js} +1 -1
  15. package/dist/{layers.CtmFs842.js → layers.AHmwp-MB.js} +1 -1
  16. package/dist/{layers.Q2dvyyyS.js → layers.B-EeOsPN.js} +1 -1
  17. package/dist/{layers.BaSqDCUi.js → layers.B-knJAmg.js} +1 -1
  18. package/dist/{layers.L0lr9_dy.js → layers.B0YPk_J2.js} +1 -1
  19. package/dist/layers.B0aoB6yM.js +1 -0
  20. package/dist/{layers.BcrIK8qs.js → layers.B0c5OY_G.js} +1 -1
  21. package/dist/{layers.DqkcR9Cj.js → layers.B1Asn8n_.js} +3 -3
  22. package/dist/{layers.BvTr3OqB.js → layers.B1QlqLSe.js} +1 -1
  23. package/dist/{layers.CIjbcwec.js → layers.B1YHDbg8.js} +1 -1
  24. package/dist/{layers.t9ki07H9.js → layers.B4dgRxLi.js} +8 -8
  25. package/dist/{layers.BzLOwAv9.js → layers.B4n7r8Ul.js} +1 -1
  26. package/dist/{layers.CzcULpYV.js → layers.B5AMuW0E.js} +1 -1
  27. package/dist/{layers.CW1tyuRJ.js → layers.B5R_HMQi.js} +33 -33
  28. package/dist/{layers.BHmZJxfg.js → layers.B7fR53su.js} +1 -1
  29. package/dist/{layers.DMrcq2Gr.js → layers.B8XK-8I-.js} +1 -1
  30. package/dist/{layers.T7eDGkWl.js → layers.B9Xz7B4H.js} +1 -1
  31. package/dist/{layers.CKVfFH8C.js → layers.BBT4Tvg5.js} +1 -1
  32. package/dist/{layers.C_qUkVxS.js → layers.BC_YpOSp.js} +1 -1
  33. package/dist/{layers.ENr5T7WS.js → layers.BD7kYiWS.js} +1 -1
  34. package/dist/{layers.BHu_YyDc.js → layers.BDQtN1aD.js} +1 -1
  35. package/dist/{layers.-wUVh76U.js → layers.BExC2g6w.js} +1 -1
  36. package/dist/{layers.C9Sr1U5-.js → layers.BFreQdwW.js} +13 -13
  37. package/dist/{layers.I-tHkE95.js → layers.BJkqxsDC.js} +1 -1
  38. package/dist/{layers.Con-Dh2E.js → layers.BKvhj3Jc.js} +3 -3
  39. package/dist/{layers.C4I6DUMy.js → layers.BKyKCEyP.js} +24 -24
  40. package/dist/{layers.BPiBAWd5.js → layers.BPdavEfb.js} +1 -1
  41. package/dist/{layers.D78A28yU.js → layers.BQjo-s-b.js} +4104 -4138
  42. package/dist/{layers.DoHU4UID.js → layers.BQy5VO07.js} +6 -6
  43. package/dist/{layers.CxOau-hs.js → layers.BSWJm3U8.js} +1 -1
  44. package/dist/{layers.DH3ePdsz.js → layers.BWD2tONt.js} +2 -2
  45. package/dist/{layers.hGNauRnS.js → layers.BaZ9oGNz.js} +4 -4
  46. package/dist/{layers.Cglb20ve.js → layers.BatQCiGf.js} +11 -11
  47. package/dist/{layers.DbbksUuA.js → layers.BccLIbKe.js} +1 -1
  48. package/dist/{layers.D1YO6sUx.js → layers.BfWe9IcW.js} +1 -1
  49. package/dist/layers.Bg7BQcmt.js +31 -0
  50. package/dist/{layers.0cO0ixPk.js → layers.Bgd7myyy.js} +1 -1
  51. package/dist/{layers.CcY8SYVh.js → layers.BhvmN99n.js} +1 -1
  52. package/dist/{layers.CjPHxy5F.js → layers.Bi4--lcT.js} +1 -1
  53. package/dist/{layers.B5iDAMC-.js → layers.Bj2_ntq3.js} +3 -3
  54. package/dist/{layers.D2uJTLQD.js → layers.Blhb8ubC.js} +1 -1
  55. package/dist/{layers.DXwUwZdz.js → layers.Bnjo7X5G.js} +31 -31
  56. package/dist/{layers.B3Z00oIe.js → layers.Bnozyuub.js} +1 -1
  57. package/dist/{layers.w5M_mTV4.js → layers.Bptrc7aE.js} +27 -27
  58. package/dist/{layers.BJCeJUWZ.js → layers.BrPGpTKD.js} +14568 -14351
  59. package/dist/{layers.BaFHpWlD.js → layers.Brsx_95a.js} +1 -1
  60. package/dist/{layers.B2oAQIVT.js → layers.Bs8dWBby.js} +1 -1
  61. package/dist/{layers.BU3693bQ.js → layers.Bsr7C4ON.js} +1 -1
  62. package/dist/{layers.FKGuICkq.js → layers.BtXZCoH_.js} +39 -39
  63. package/dist/{layers.DsxjlRxg.js → layers.BtXqThYa.js} +1 -1
  64. package/dist/layers.Bwc-8Isq.js +6 -0
  65. package/dist/{layers.DMmvRDDM.js → layers.Bx77WE5O.js} +1 -1
  66. package/dist/{layers.CF_7ZzFo.js → layers.C-78wB0V.js} +3 -3
  67. package/dist/{layers.C3I87c35.js → layers.C1rqQip5.js} +1 -1
  68. package/dist/{layers.B4oJOgaL.js → layers.C3_GElaJ.js} +1 -1
  69. package/dist/{layers.joa0U6F3.js → layers.C53iq2Ma.js} +1 -1
  70. package/dist/{layers.DKbpSRnS.js → layers.C6LbKv-M.js} +2 -2
  71. package/dist/{layers.Da0nsXuF.js → layers.C6ueC3Z0.js} +1 -1
  72. package/dist/{layers.DbYK2pEp.js → layers.C71O9vAp.js} +1 -1
  73. package/dist/{layers.BhBT87wa.js → layers.C7b_RmTv.js} +1 -1
  74. package/dist/{layers.BnPxqyuX.js → layers.C8Tfd7sP.js} +1 -1
  75. package/dist/{layers.DTvOLDFJ.js → layers.C8WbGo3j.js} +1 -1
  76. package/dist/{layers.Co188iOY.js → layers.C9Lko7YH.js} +1 -1
  77. package/dist/{layers.BjPDJ-Kw.js → layers.CAFSzILX.js} +21 -21
  78. package/dist/layers.CCHvuvhF.js +8 -0
  79. package/dist/{layers.nTJYG5Fr.js → layers.CFAdy1gb.js} +1 -1
  80. package/dist/{layers.D3fr8EC0.js → layers.CFL3W3X8.js} +2 -2
  81. package/dist/{layers.CUHCWsr6.js → layers.CFcETIOb.js} +1 -1
  82. package/dist/{layers.Dbri2FL3.js → layers.CIvcS__9.js} +1 -1
  83. package/dist/{layers.mOqn0HZL.js → layers.COTQMo6A.js} +1 -1
  84. package/dist/{layers.rnn88Z_F.js → layers.CQ7hsV-G.js} +1 -1
  85. package/dist/{layers.skYBIGuA.js → layers.CRRnsu0U.js} +1 -1
  86. package/dist/layers.CSJKF8Yc.js +1 -0
  87. package/dist/{layers.0mM7kmYM.js → layers.CT2g1VRg.js} +1 -1
  88. package/dist/{layers.e5-5q9GW.js → layers.CUGBlmw8.js} +1 -1
  89. package/dist/{layers.BN7XA9Mz.js → layers.CUV2M_pU.js} +1 -1
  90. package/dist/{layers.qZ_fMp-N.js → layers.CWkQixNL.js} +1 -1
  91. package/dist/{layers.Dwfq9cNX.js → layers.CXsKBYuP.js} +1 -1
  92. package/dist/{layers.DWCTsdNx.js → layers.CZVAUi9T.js} +1 -1
  93. package/dist/{layers.Dp9QA0Dz.js → layers.CZWgMRsn.js} +1 -1
  94. package/dist/layers.Ca29Mcjy.js +1 -0
  95. package/dist/{layers.CxfeVqFB.js → layers.CacnnrTU.js} +1 -1
  96. package/dist/{layers.5e-XI3nh.js → layers.CbuDjZaw.js} +1 -1
  97. package/dist/{layers.DFiSzcgX.js → layers.CcwJpgwT.js} +4 -4
  98. package/dist/{layers.CUGnkSgl.js → layers.CfUup9qJ.js} +1 -1
  99. package/dist/{layers.R2p30D-p.js → layers.CgjZSo5b.js} +1 -1
  100. package/dist/{layers.BLtR2kcw.js → layers.ChRuHm3l.js} +1 -1
  101. package/dist/{layers.phLsmtCV.js → layers.Chpc9546.js} +1 -1
  102. package/dist/{layers.B07DqX4u.js → layers.Ciq1sahM.js} +1 -1
  103. package/dist/{layers.DW5NMC_Y.js → layers.CkpDbJMJ.js} +1 -1
  104. package/dist/{layers.CqOEfQFk.js → layers.ClDrIPRU.js} +1 -1
  105. package/dist/{layers.Dib9h9Y9.js → layers.CmupXZHN.js} +1 -1
  106. package/dist/{layers.ByPB1YI0.js → layers.Cn8CWsBB.js} +2 -2
  107. package/dist/{layers.CyJwHXzH.js → layers.Cr0gsM_j.js} +6 -6
  108. package/dist/{layers.DXvR0Ic3.js → layers.CrRPE221.js} +1 -1
  109. package/dist/{layers.BRzmQpbn.js → layers.CsN1TpE_.js} +1 -1
  110. package/dist/{layers.03AG_Ahp.js → layers.CvePRtuZ.js} +1 -1
  111. package/dist/{layers.BfM6qako.js → layers.CwAI9EMJ.js} +95 -95
  112. package/dist/{layers.BcB0Nlwg.js → layers.CwLijGjy.js} +5 -5
  113. package/dist/{layers.CMJ7A9ld.js → layers.CxcPHDlk.js} +1 -1
  114. package/dist/layers.CyJLYOzo.js +1 -0
  115. package/dist/{layers.Btm6c1FD.js → layers.CyqBb3la.js} +1 -1
  116. package/dist/layers.CzQlolTW.js +1 -0
  117. package/dist/{layers.Cim2gy1q.js → layers.CzSHWBJE.js} +1 -1
  118. package/dist/{layers.Bx4TPdVb.js → layers.CztSiz59.js} +1 -1
  119. package/dist/{layers.BZ-_wuxN.js → layers.D1ALzL8l.js} +1 -1
  120. package/dist/{layers.CFWmVRYf.js → layers.D1q9XEqC.js} +1 -1
  121. package/dist/{layers.DGA33SjL.js → layers.D2P7q6AR.js} +2 -2
  122. package/dist/{layers.Cu4zCXaq.js → layers.D37qejd1.js} +4 -4
  123. package/dist/{layers.DO67bAdi.js → layers.D53pVbAt.js} +1 -1
  124. package/dist/layers.D5gltjTL.js +1163 -0
  125. package/dist/{layers.OZMdOIeE.js → layers.D8s5zGyA.js} +4 -4
  126. package/dist/{layers.o99xgyrj.js → layers.DBQznnML.js} +1 -1
  127. package/dist/layers.DGptlsw9.js +8 -0
  128. package/dist/{layers.Cb8w7m3T.js → layers.DIDIuUgi.js} +1 -1
  129. package/dist/{layers.DXGbCu9s.js → layers.DIk_oySe.js} +1 -1
  130. package/dist/layers.DLBYO9Pf.js +7 -0
  131. package/dist/{layers.DS2xWw5u.js → layers.DLaija6u.js} +1 -1
  132. package/dist/{layers.CLGJqlQC.js → layers.DLsrdKEz.js} +1 -1
  133. package/dist/{layers.DHLBQn4i.js → layers.DLyk5obs.js} +3 -3
  134. package/dist/{layers.D7IERGZB.js → layers.DNSrh1pA.js} +1 -1
  135. package/dist/{layers.B0xERJEP.js → layers.DO1gXiNA.js} +1 -1
  136. package/dist/layers.DOK4tUdd.js +90 -0
  137. package/dist/{layers.GSbMAxhC.js → layers.DP7UYubA.js} +1 -1
  138. package/dist/{layers.4Bvndpod.js → layers.DPlTEtvi.js} +1 -1
  139. package/dist/{layers.Dl_n_LxZ.js → layers.DQUdAZyr.js} +25 -25
  140. package/dist/{layers.sZWWruWl.js → layers.DRN4BpGT.js} +1 -1
  141. package/dist/{layers.CnLvIdDn.js → layers.DRoyt9-1.js} +4 -4
  142. package/dist/{layers.C4lKVCKG.js → layers.DUrkRJKo.js} +1 -1
  143. package/dist/{layers.Xh-WVbYL.js → layers.DX9VTWiX.js} +1 -1
  144. package/dist/{layers.6IPXZlHV.js → layers.DY8_UsFK.js} +137 -137
  145. package/dist/{layers.DZNF4hVk.js → layers.DZ-JaYP3.js} +7 -7
  146. package/dist/{layers.pp1C1Tmj.js → layers.DZDZ3CuA.js} +1 -1
  147. package/dist/{layers.DtaKuCjp.js → layers.DZZUeo4N.js} +1 -1
  148. package/dist/{layers.hUNsvmkE.js → layers.DZqU-iL6.js} +40 -40
  149. package/dist/{layers.Cm4ScAcA.js → layers.DaHHbgHM.js} +1 -1
  150. package/dist/{layers.BbMtfvwE.js → layers.DaLjgos9.js} +1 -1
  151. package/dist/{layers.D4WHc1zo.js → layers.DbcVW57C.js} +1 -1
  152. package/dist/{layers.Dc7NnfUG.js → layers.DbdtbmtQ.js} +1 -1
  153. package/dist/{layers.DMbmaXEp.js → layers.DcxJ1-U9.js} +1 -1
  154. package/dist/layers.DeT0xAwz.js +84 -0
  155. package/dist/{layers.DzZcev45.js → layers.Df3tBKAI.js} +1 -1
  156. package/dist/{layers.hkL7RA_5.js → layers.DhUwAghN.js} +1 -1
  157. package/dist/{layers.CJO8izOl.js → layers.Dj860md7.js} +1 -1
  158. package/dist/{layers.CwQebQGo.js → layers.DkYYvaOJ.js} +2 -2
  159. package/dist/{layers.B_bY10SW.js → layers.Dn4qgJFc.js} +2 -2
  160. package/dist/{layers.C_48WisB.js → layers.Dodjwwv6.js} +3 -3
  161. package/dist/{layers.zw0Kaz0i.js → layers.DohiIE20.js} +1 -1
  162. package/dist/{layers.Bdo184oK.js → layers.DpKYGJRZ.js} +2 -2
  163. package/dist/{layers.6hbGirUz.js → layers.DsWcmm1l.js} +1 -1
  164. package/dist/{layers.D9ajcZP1.js → layers.DvSTgxkV.js} +1 -1
  165. package/dist/{layers.CnHlffpI.js → layers.Dvv8fKKk.js} +1 -1
  166. package/dist/{layers.v9an1lHW.js → layers.DwPIhine.js} +1 -1
  167. package/dist/{layers.DmM2jU0O.js → layers.DwS8V2Or.js} +1 -1
  168. package/dist/{layers.Bk5Uaw8R.js → layers.DxABmn5O.js} +1 -1
  169. package/dist/layers.Dxr2o7ON.js +1 -0
  170. package/dist/{layers.CWyLzhzU.js → layers.DyciwgGK.js} +1 -1
  171. package/dist/{layers.BxBOl4Dl.js → layers.F57MyVA9.js} +1 -1
  172. package/dist/{layers.zzb4BOcI.js → layers.FzqiVsy_.js} +1 -1
  173. package/dist/{layers.BudxiKeS.js → layers.HEL5QDoC.js} +1 -1
  174. package/dist/{layers.BSzAtyQb.js → layers.HhdqZtv5.js} +1 -1
  175. package/dist/{layers.D2pb9Wvr.js → layers.IutlLti9.js} +1 -1
  176. package/dist/{layers.CKtCjDB5.js → layers.JZ7AxwMh.js} +1 -1
  177. package/dist/{layers.D_dNQ2RW.js → layers.LGDbkgsv.js} +42 -42
  178. package/dist/{layers.BdpJh8Oo.js → layers.LtQ1yaSI.js} +1 -1
  179. package/dist/{layers.C2WnW5up.js → layers.SM9QTuDI.js} +16 -16
  180. package/dist/{layers.D3UpXEwL.js → layers.U7NY32uM.js} +1 -1
  181. package/dist/{layers.BM0IeEyx.js → layers.U8mTjpv_.js} +1 -1
  182. package/dist/{layers.CS7HWB4X.js → layers.WQRYkQdm.js} +15 -15
  183. package/dist/{layers.C5-WLmjg.js → layers.XCBehSH1.js} +1 -1
  184. package/dist/{layers.pQg8FbPj.js → layers.ZbGNGWJD.js} +12 -12
  185. package/dist/{layers.B5iuTZ1t.js → layers.Zmw0un-f.js} +1 -1
  186. package/dist/{layers.Bdnbq1Fc.js → layers.aLsmNBld.js} +3 -3
  187. package/dist/{layers.Dm1yBfDi.js → layers.avpB9JpP.js} +1 -1
  188. package/dist/{layers.CPHBPK8k.js → layers.cnMJlmUn.js} +1 -1
  189. package/dist/{layers.Bxvsg8Mb.js → layers.dL8A7U4Q.js} +1 -1
  190. package/dist/{layers.STJilcsA.js → layers.eYOpCcnf.js} +1 -1
  191. package/dist/{layers.CemDejcL.js → layers.ehSnv8t3.js} +1 -1
  192. package/dist/{layers.Bo56cnSy.js → layers.fpcqoFdd.js} +1 -1
  193. package/dist/{layers.D_KUnC5f.js → layers.gG-4BCod.js} +1 -1
  194. package/dist/{layers.CIebvJty.js → layers.iJv3YGd2.js} +1 -1
  195. package/dist/{layers.n-WUmPth.js → layers.iT9k4umn.js} +1 -1
  196. package/dist/{layers.BswN_MdX.js → layers.iXNkI0ZC.js} +1 -1
  197. package/dist/{layers.BjkFiCls.js → layers.mlObVGIf.js} +5 -5
  198. package/dist/{layers.B7XHIy_4.js → layers.oaAarQby.js} +1 -1
  199. package/dist/{layers.BSDW_YyL.js → layers.oeHgntpN.js} +1 -1
  200. package/dist/{layers.DC3-RC1l.js → layers.pRgndjxw.js} +1 -1
  201. package/dist/{layers.DRtT_PXy.js → layers.tZA_LmJa.js} +1 -1
  202. package/dist/{layers.CnPbRZ5g.js → layers.teIuFApS.js} +1 -1
  203. package/dist/{layers.DiAn5oCP.js → layers.trRvrSLF.js} +1 -1
  204. package/dist/{layers.BnUlk4VQ.js → layers.visFusIB.js} +2982 -4133
  205. package/dist/{layers.CxqZJUKb.js → layers.wOUIpHWS.js} +1 -1
  206. package/dist/{layers.CjwpDgRI.js → layers.xFbuP3DI.js} +1 -1
  207. package/dist/{layers.BzQjss-Y.js → layers.xI6XwkCk.js} +1 -1
  208. package/dist/{layers.CQ-YrAtS.js → layers.xLIBX5yr.js} +1 -1
  209. package/dist/{layers.0PDCLAB9.js → layers.y9CU_epE.js} +1 -1
  210. package/dist/{layers.BRYVeXtX.js → layers.ywa822S7.js} +1 -1
  211. package/dist/layers.z2kEcNVH.js +5 -0
  212. package/package.json +2 -1
  213. package/dist/layers.BGELWsp6.js +0 -6
  214. package/dist/layers.BbPiDwK6.js +0 -8
  215. package/dist/layers.Bn8ENbPC.js +0 -1
  216. package/dist/layers.By6Y9awO.js +0 -1313
  217. package/dist/layers.CPNJ-TZg.js +0 -5
  218. package/dist/layers.CasHcfAK.js +0 -84
  219. package/dist/layers.DQGVM1KB.js +0 -1
  220. package/dist/layers.DRRyMIft.js +0 -1
  221. package/dist/layers.Ddrl9HG1.js +0 -96
  222. package/dist/layers.Dl5fPqLs.js +0 -1
  223. package/dist/layers.Dsw7pDbX.js +0 -748
@@ -0,0 +1,1163 @@
1
+ import { m as U } from "./layers.visFusIB.js";
2
+ import "./layers.Bg7BQcmt.js";
3
+ import "lodash-es/memoize.js";
4
+ import "lodash-es/merge.js";
5
+ import "lodash-es/isEmpty.js";
6
+ const G = 20, ct = {
7
+ rect: "rectangle",
8
+ circle: "ellipse"
9
+ }, Z = {
10
+ startOnLoad: !1,
11
+ flowchart: { curve: "linear" },
12
+ themeVariables: {
13
+ // Multiplying by 1.25 to increase the font size by 25% and render correctly in Excalidraw
14
+ fontSize: `${G * 1.25}px`
15
+ },
16
+ maxEdges: 500,
17
+ maxTextSize: 5e4
18
+ };
19
+ class F {
20
+ constructor({ converter: e }) {
21
+ this.convert = (s, r) => this.converter(s, {
22
+ ...r,
23
+ fontSize: r.fontSize || G
24
+ }), this.converter = e;
25
+ }
26
+ }
27
+ var v;
28
+ (function(t) {
29
+ t.ROUND = "round", t.STADIUM = "stadium", t.DOUBLECIRCLE = "doublecircle", t.CIRCLE = "circle", t.DIAMOND = "diamond";
30
+ })(v || (v = {}));
31
+ var W;
32
+ (function(t) {
33
+ t.COLOR = "color";
34
+ })(W || (W = {}));
35
+ var X;
36
+ (function(t) {
37
+ t.FILL = "fill", t.STROKE = "stroke", t.STROKE_WIDTH = "stroke-width", t.STROKE_DASHARRAY = "stroke-dasharray";
38
+ })(X || (X = {}));
39
+ var $ = {}, Q;
40
+ function it() {
41
+ if (Q) return $;
42
+ Q = 1, Object.defineProperty($, "__esModule", { value: !0 }), $.removeMarkdown = void 0;
43
+ var t = function(e, s) {
44
+ s === void 0 && (s = {
45
+ listUnicodeChar: ""
46
+ }), s = s || {}, s.listUnicodeChar = s.hasOwnProperty("listUnicodeChar") ? s.listUnicodeChar : !1, s.stripListLeaders = s.hasOwnProperty("stripListLeaders") ? s.stripListLeaders : !0, s.gfm = s.hasOwnProperty("gfm") ? s.gfm : !0, s.useImgAltText = s.hasOwnProperty("useImgAltText") ? s.useImgAltText : !0, s.preserveLinks = s.hasOwnProperty("preserveLinks") ? s.preserveLinks : !1;
47
+ var r = e || "";
48
+ r = r.replace(/^(-\s*?|\*\s*?|_\s*?){3,}\s*$/gm, "");
49
+ try {
50
+ s.stripListLeaders && (s.listUnicodeChar ? r = r.replace(/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm, s.listUnicodeChar + " $1") : r = r.replace(/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm, "$1")), s.gfm && (r = r.replace(/\n={2,}/g, `
51
+ `).replace(/~{3}.*\n/g, "").replace(/~~/g, "").replace(/`{3}.*\n/g, "")), s.preserveLinks && (r = r.replace(/\[(.*?)\][\[\(](.*?)[\]\)]/g, "$1 ($2)")), r = r.replace(/<[^>]*>/g, "").replace(/^[=\-]{2,}\s*$/g, "").replace(/\[\^.+?\](\: .*?$)?/g, "").replace(/\s{0,2}\[.*?\]: .*?$/g, "").replace(/\!\[(.*?)\][\[\(].*?[\]\)]/g, s.useImgAltText ? "$1" : "").replace(/\[(.*?)\][\[\(].*?[\]\)]/g, "$1").replace(/^\s{0,3}>\s?/g, "").replace(/(^|\n)\s{0,3}>\s?/g, `
52
+
53
+ `).replace(/^\s{1,2}\[(.*?)\]: (\S+)( ".*?")?\s*$/g, "").replace(/^(\n)?\s{0,}#{1,6}\s+| {0,}(\n)?\s{0,}#{0,} {0,}(\n)?\s{0,}$/gm, "$1$2$3").replace(/([\*_]{1,3})(\S.*?\S{0,1})\1/g, "$2").replace(/([\*_]{1,3})(\S.*?\S{0,1})\1/g, "$2").replace(/(`{3,})(.*?)\1/gm, "$2").replace(/`(.+?)`/g, "$1").replace(/\n{2,}/g, `
54
+
55
+ `);
56
+ } catch (o) {
57
+ return console.error(o), e;
58
+ }
59
+ return r;
60
+ };
61
+ return $.removeMarkdown = t, $;
62
+ }
63
+ var dt = it();
64
+ const lt = {
65
+ arrow_circle: {
66
+ endArrowhead: "dot"
67
+ },
68
+ arrow_cross: {
69
+ endArrowhead: "bar"
70
+ },
71
+ arrow_open: {
72
+ endArrowhead: null,
73
+ startArrowhead: null
74
+ },
75
+ double_arrow_circle: {
76
+ endArrowhead: "dot",
77
+ startArrowhead: "dot"
78
+ },
79
+ double_arrow_cross: {
80
+ endArrowhead: "bar",
81
+ startArrowhead: "bar"
82
+ },
83
+ double_arrow_point: {
84
+ endArrowhead: "arrow",
85
+ startArrowhead: "arrow"
86
+ }
87
+ }, ut = (t) => lt[t], B = (t) => {
88
+ let e = t.text;
89
+ return t.labelType === "markdown" && (e = dt.removeMarkdown(t.text)), ht(e);
90
+ }, ht = (t) => {
91
+ const e = /\s?(fa|fab):[a-zA-Z0-9-]+/g;
92
+ return t.replace(e, "");
93
+ }, ft = (t) => {
94
+ const e = {};
95
+ return Object.keys(t).forEach((s) => {
96
+ var r;
97
+ switch (s) {
98
+ case X.FILL: {
99
+ e.backgroundColor = t[s], e.fillStyle = "solid";
100
+ break;
101
+ }
102
+ case X.STROKE: {
103
+ e.strokeColor = t[s];
104
+ break;
105
+ }
106
+ case X.STROKE_WIDTH: {
107
+ e.strokeWidth = Number((r = t[s]) == null ? void 0 : r.split("px")[0]);
108
+ break;
109
+ }
110
+ case X.STROKE_DASHARRAY: {
111
+ e.strokeStyle = "dashed";
112
+ break;
113
+ }
114
+ }
115
+ }), e;
116
+ }, gt = (t) => {
117
+ const e = {};
118
+ return Object.keys(t).forEach((s) => {
119
+ switch (s) {
120
+ case W.COLOR: {
121
+ e.strokeColor = t[s];
122
+ break;
123
+ }
124
+ }
125
+ }), e;
126
+ }, bt = (t) => {
127
+ const e = {};
128
+ t.subGraphs.map((r) => {
129
+ r.nodeIds.forEach((o) => {
130
+ e[r.id] = {
131
+ id: r.id,
132
+ parent: null,
133
+ isLeaf: !1
134
+ }, e[o] = {
135
+ id: o,
136
+ parent: r.id,
137
+ isLeaf: t.vertices[o] !== void 0
138
+ };
139
+ });
140
+ });
141
+ const s = {};
142
+ return [...Object.keys(t.vertices), ...t.subGraphs.map((r) => r.id)].forEach((r) => {
143
+ if (!e[r])
144
+ return;
145
+ let o = e[r];
146
+ const a = [];
147
+ for (o.isLeaf || a.push(`subgraph_group_${o.id}`); o.parent; )
148
+ a.push(`subgraph_group_${o.parent}`), o = e[o.parent];
149
+ s[r] = a;
150
+ }), {
151
+ getGroupIds: (r) => s[r] || [],
152
+ getParentId: (r) => e[r] ? e[r].parent : null
153
+ };
154
+ }, pt = new F({
155
+ converter: (t, e) => {
156
+ const s = [], r = e.fontSize, { getGroupIds: o, getParentId: a } = bt(t);
157
+ return t.subGraphs.reverse().forEach((n) => {
158
+ const c = o(n.id), i = {
159
+ id: n.id,
160
+ type: "rectangle",
161
+ groupIds: c,
162
+ x: n.x,
163
+ y: n.y,
164
+ width: n.width,
165
+ height: n.height,
166
+ label: {
167
+ groupIds: c,
168
+ text: B(n),
169
+ fontSize: r,
170
+ verticalAlign: "top"
171
+ }
172
+ };
173
+ s.push(i);
174
+ }), Object.values(t.vertices).forEach((n) => {
175
+ if (!n)
176
+ return;
177
+ const c = o(n.id), i = ft(n.containerStyle), d = gt(n.labelStyle);
178
+ let l = {
179
+ id: n.id,
180
+ type: "rectangle",
181
+ groupIds: c,
182
+ x: n.x,
183
+ y: n.y,
184
+ width: n.width,
185
+ height: n.height,
186
+ strokeWidth: 2,
187
+ label: {
188
+ groupIds: c,
189
+ text: B(n),
190
+ fontSize: r,
191
+ ...d
192
+ },
193
+ link: n.link || null,
194
+ ...i
195
+ };
196
+ switch (n.type) {
197
+ case v.STADIUM: {
198
+ l = { ...l, roundness: { type: 3 } };
199
+ break;
200
+ }
201
+ case v.ROUND: {
202
+ l = { ...l, roundness: { type: 3 } };
203
+ break;
204
+ }
205
+ case v.DOUBLECIRCLE: {
206
+ c.push(`doublecircle_${n.id}}`);
207
+ const u = {
208
+ type: "ellipse",
209
+ groupIds: c,
210
+ x: n.x + 5,
211
+ y: n.y + 5,
212
+ width: n.width - 10,
213
+ height: n.height - 10,
214
+ strokeWidth: 2,
215
+ roundness: { type: 3 },
216
+ label: {
217
+ groupIds: c,
218
+ text: B(n),
219
+ fontSize: r
220
+ }
221
+ };
222
+ l = { ...l, groupIds: c, type: "ellipse" }, s.push(u);
223
+ break;
224
+ }
225
+ case v.CIRCLE: {
226
+ l.type = "ellipse";
227
+ break;
228
+ }
229
+ case v.DIAMOND: {
230
+ l.type = "diamond";
231
+ break;
232
+ }
233
+ }
234
+ s.push(l);
235
+ }), t.edges.forEach((n) => {
236
+ let c = [];
237
+ const i = a(n.start), d = a(n.end);
238
+ i && i === d && (c = o(i));
239
+ const { startX: l, startY: b, reflectionPoints: u } = n, p = u.map((x) => [
240
+ x.x - u[0].x,
241
+ x.y - u[0].y
242
+ ]), g = ut(n.type), y = {
243
+ id: `${n.start}_${n.end}`,
244
+ type: "arrow",
245
+ groupIds: c,
246
+ x: l,
247
+ y: b,
248
+ // 4 and 2 are the Excalidraw's stroke width of thick and thin respectively
249
+ // TODO: use constant exported from Excalidraw package
250
+ strokeWidth: n.stroke === "thick" ? 4 : 2,
251
+ strokeStyle: n.stroke === "dotted" ? "dashed" : void 0,
252
+ points: p,
253
+ ...n.text ? { label: { text: B(n), fontSize: r, groupIds: c } } : {},
254
+ roundness: {
255
+ type: 2
256
+ },
257
+ ...g
258
+ }, w = s.find((x) => x.id === n.start), E = s.find((x) => x.id === n.end);
259
+ !w || !E || (y.start = {
260
+ id: w.id || ""
261
+ }, y.end = {
262
+ id: E.id || ""
263
+ }, s.push(y));
264
+ }), {
265
+ elements: s
266
+ };
267
+ }
268
+ }), mt = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
269
+ let N = (t = 21) => {
270
+ let e = "", s = crypto.getRandomValues(new Uint8Array(t |= 0));
271
+ for (; t--; )
272
+ e += mt[s[t] & 63];
273
+ return e;
274
+ };
275
+ const yt = new F({
276
+ converter: (t) => {
277
+ const e = N(), { width: s, height: r } = t, o = {
278
+ type: "image",
279
+ x: 0,
280
+ y: 0,
281
+ width: s,
282
+ height: r,
283
+ status: "saved",
284
+ fileId: e
285
+ };
286
+ return { files: {
287
+ [e]: {
288
+ id: e,
289
+ mimeType: t.mimeType,
290
+ dataURL: t.dataURL
291
+ }
292
+ }, elements: [o] };
293
+ }
294
+ }), V = (t) => t.replace(/\\n/g, `
295
+ `), M = (t) => {
296
+ const e = {
297
+ type: "line",
298
+ x: t.startX,
299
+ y: t.startY,
300
+ points: [
301
+ [0, 0],
302
+ [t.endX - t.startX, t.endY - t.startY]
303
+ ],
304
+ width: t.endX - t.startX,
305
+ height: t.endY - t.startY,
306
+ strokeStyle: t.strokeStyle || "solid",
307
+ strokeColor: t.strokeColor || "#000",
308
+ strokeWidth: t.strokeWidth || 1
309
+ };
310
+ return t.groupId && Object.assign(e, { groupIds: [t.groupId] }), t.id && Object.assign(e, { id: t.id }), e;
311
+ }, z = (t) => {
312
+ const e = {
313
+ type: "text",
314
+ x: t.x,
315
+ y: t.y,
316
+ width: t.width,
317
+ height: t.height,
318
+ text: V(t.text) || "",
319
+ fontSize: t.fontSize,
320
+ verticalAlign: "middle"
321
+ };
322
+ return t.groupId && Object.assign(e, { groupIds: [t.groupId] }), t.id && Object.assign(e, { id: t.id }), e;
323
+ }, P = (t) => {
324
+ var r, o, a, n;
325
+ let e = {};
326
+ t.type === "rectangle" && t.subtype === "activation" && (e = {
327
+ backgroundColor: "#e9ecef",
328
+ fillStyle: "solid"
329
+ });
330
+ const s = {
331
+ id: t.id,
332
+ type: t.type,
333
+ x: t.x,
334
+ y: t.y,
335
+ width: t.width,
336
+ height: t.height,
337
+ label: {
338
+ text: V(((r = t == null ? void 0 : t.label) == null ? void 0 : r.text) || ""),
339
+ fontSize: (o = t == null ? void 0 : t.label) == null ? void 0 : o.fontSize,
340
+ verticalAlign: ((a = t.label) == null ? void 0 : a.verticalAlign) || "middle",
341
+ strokeColor: ((n = t.label) == null ? void 0 : n.color) || "#000",
342
+ groupIds: t.groupId ? [t.groupId] : []
343
+ },
344
+ strokeStyle: t == null ? void 0 : t.strokeStyle,
345
+ strokeWidth: t == null ? void 0 : t.strokeWidth,
346
+ strokeColor: t == null ? void 0 : t.strokeColor,
347
+ backgroundColor: t == null ? void 0 : t.bgColor,
348
+ fillStyle: "solid",
349
+ ...e
350
+ };
351
+ return t.groupId && Object.assign(s, { groupIds: [t.groupId] }), s;
352
+ }, st = (t) => {
353
+ var s;
354
+ const e = {
355
+ type: "arrow",
356
+ x: t.startX,
357
+ y: t.startY,
358
+ points: t.points || [
359
+ [0, 0],
360
+ [t.endX - t.startX, t.endY - t.startY]
361
+ ],
362
+ width: t.endX - t.startX,
363
+ height: t.endY - t.startY,
364
+ strokeStyle: (t == null ? void 0 : t.strokeStyle) || "solid",
365
+ endArrowhead: (t == null ? void 0 : t.endArrowhead) || null,
366
+ startArrowhead: (t == null ? void 0 : t.startArrowhead) || null,
367
+ label: {
368
+ text: V(((s = t == null ? void 0 : t.label) == null ? void 0 : s.text) || ""),
369
+ fontSize: 16
370
+ },
371
+ roundness: {
372
+ type: 2
373
+ },
374
+ start: t.start,
375
+ end: t.end
376
+ };
377
+ return t.groupId && Object.assign(e, { groupIds: [t.groupId] }), e;
378
+ }, xt = new F({
379
+ converter: (t) => {
380
+ const e = [], s = [];
381
+ if (Object.values(t.nodes).forEach((r) => {
382
+ !r || !r.length || r.forEach((o) => {
383
+ let a;
384
+ switch (o.type) {
385
+ case "line":
386
+ a = M(o);
387
+ break;
388
+ case "rectangle":
389
+ case "ellipse":
390
+ a = P(o);
391
+ break;
392
+ case "text":
393
+ a = z(o);
394
+ break;
395
+ default:
396
+ throw `unknown type ${o.type}`;
397
+ }
398
+ o.type === "rectangle" && (o == null ? void 0 : o.subtype) === "activation" ? s.push(a) : e.push(a);
399
+ });
400
+ }), Object.values(t.lines).forEach((r) => {
401
+ r && e.push(M(r));
402
+ }), Object.values(t.arrows).forEach((r) => {
403
+ r && (e.push(st(r)), r.sequenceNumber && e.push(P(r.sequenceNumber)));
404
+ }), e.push(...s), t.loops) {
405
+ const { lines: r, texts: o, nodes: a } = t.loops;
406
+ r.forEach((n) => {
407
+ e.push(M(n));
408
+ }), o.forEach((n) => {
409
+ e.push(z(n));
410
+ }), a.forEach((n) => {
411
+ e.push(P(n));
412
+ });
413
+ }
414
+ return t.groups && t.groups.forEach((r) => {
415
+ const { actorKeys: o, name: a } = r;
416
+ let n = 1 / 0, c = 1 / 0, i = 0, d = 0;
417
+ if (!o.length)
418
+ return;
419
+ e.filter((f) => {
420
+ if (f.id) {
421
+ const C = f.id.indexOf("-"), I = f.id.substring(0, C);
422
+ return o.includes(I);
423
+ }
424
+ }).forEach((f) => {
425
+ if (f.x === void 0 || f.y === void 0 || f.width === void 0 || f.height === void 0)
426
+ throw new Error(`Actor attributes missing ${f}`);
427
+ n = Math.min(n, f.x), c = Math.min(c, f.y), i = Math.max(i, f.x + f.width), d = Math.max(d, f.y + f.height);
428
+ });
429
+ const b = 10, u = n - b, p = c - b, g = i - n + b * 2, m = d - c + b * 2, y = N(), w = P({
430
+ type: "rectangle",
431
+ x: u,
432
+ y: p,
433
+ width: g,
434
+ height: m,
435
+ bgColor: r.fill,
436
+ id: y
437
+ });
438
+ e.unshift(w);
439
+ const E = N(), x = [y];
440
+ e.forEach((f) => {
441
+ if (f.type !== "frame") {
442
+ if (f.x === void 0 || f.y === void 0 || f.width === void 0 || f.height === void 0)
443
+ throw new Error(`Element attributes missing ${f}`);
444
+ if (f.x >= n && f.x + f.width <= i && f.y >= c && f.y + f.height <= d) {
445
+ const C = f.id || N();
446
+ f.id || Object.assign(f, { id: C }), x.push(C);
447
+ }
448
+ }
449
+ });
450
+ const h = {
451
+ type: "frame",
452
+ id: E,
453
+ name: a,
454
+ children: x
455
+ };
456
+ e.push(h);
457
+ }), { elements: e };
458
+ }
459
+ }), Et = new F({
460
+ converter: (t) => {
461
+ const e = [];
462
+ return Object.values(t.nodes).forEach((s) => {
463
+ !s || !s.length || s.forEach((r) => {
464
+ let o;
465
+ switch (r.type) {
466
+ case "line":
467
+ o = M(r);
468
+ break;
469
+ case "rectangle":
470
+ case "ellipse":
471
+ o = P(r);
472
+ break;
473
+ case "text":
474
+ o = z(r);
475
+ break;
476
+ default:
477
+ throw `unknown type ${r.type}`;
478
+ }
479
+ e.push(o);
480
+ });
481
+ }), Object.values(t.lines).forEach((s) => {
482
+ s && e.push(M(s));
483
+ }), Object.values(t.arrows).forEach((s) => {
484
+ if (!s)
485
+ return;
486
+ const r = st(s);
487
+ e.push(r);
488
+ }), Object.values(t.text).forEach((s) => {
489
+ const r = z(s);
490
+ e.push(r);
491
+ }), Object.values(t.namespaces).forEach((s) => {
492
+ const r = Object.keys(s.classes), o = [...r], a = [...t.lines, ...t.arrows, ...t.text];
493
+ r.forEach((c) => {
494
+ const i = a.filter((d) => d.metadata && d.metadata.classId === c).map((d) => d.id);
495
+ i.length && o.push(...i);
496
+ });
497
+ const n = {
498
+ type: "frame",
499
+ id: N(),
500
+ name: s.id,
501
+ children: o
502
+ };
503
+ e.push(n);
504
+ }), { elements: e };
505
+ }
506
+ }), wt = (t, e = {}) => {
507
+ switch (t.type) {
508
+ case "graphImage":
509
+ return yt.convert(t, e);
510
+ case "flowchart":
511
+ return pt.convert(t, e);
512
+ case "sequence":
513
+ return xt.convert(t, e);
514
+ case "class":
515
+ return Et.convert(t, e);
516
+ default:
517
+ throw new Error(`graphToExcalidraw: unknown graph type "${t.type}, only flowcharts are supported!"`);
518
+ }
519
+ }, R = (t) => {
520
+ t = At(t);
521
+ const e = t.replace(/#(\d+);/g, "&#$1;").replace(/#([a-z]+);/g, "&$1;"), s = document.createElement("textarea");
522
+ return s.innerHTML = e, s.value;
523
+ }, _ = (t) => {
524
+ const e = t.getAttribute("transform"), s = e == null ? void 0 : e.match(/translate\(([ \d.-]+),\s*([\d.-]+)\)/);
525
+ let r = 0, o = 0;
526
+ return s && (r = Number(s[1]), o = Number(s[2])), { transformX: r, transformY: o };
527
+ }, St = (t) => {
528
+ let e = t;
529
+ return e = e.replace(/style.*:\S*#.*;/g, (s) => s.substring(0, s.length - 1)), e = e.replace(/classDef.*:\S*#.*;/g, (s) => s.substring(0, s.length - 1)), e = e.replace(/#\w+;/g, (s) => {
530
+ const r = s.substring(1, s.length - 1);
531
+ return /^\+?\d+$/.test(r) ? `fl°°${r}¶ß` : `fl°${r}¶ß`;
532
+ }), e;
533
+ }, At = function(t) {
534
+ return t.replace(/fl°°/g, "#").replace(/fl°/g, "&").replace(/¶ß/g, ";");
535
+ }, nt = (t, e = { x: 0, y: 0 }) => {
536
+ if (t.tagName.toLowerCase() !== "path")
537
+ throw new Error(`Invalid input: Expected an HTMLElement of tag "path", got ${t.tagName}`);
538
+ const s = t.getAttribute("d");
539
+ if (!s)
540
+ throw new Error('Path element does not contain a "d" attribute');
541
+ const r = s.split(/(?=[LM])/), o = r[0].substring(1).split(",").map((c) => parseFloat(c)), a = r[r.length - 1].substring(1).split(",").map((c) => parseFloat(c)), n = r.map((c) => {
542
+ const i = c.substring(1).split(",").map((d) => parseFloat(d));
543
+ return { x: i[0], y: i[1] };
544
+ }).filter((c, i, d) => {
545
+ if (i === 0 || i === d.length - 1)
546
+ return !0;
547
+ if (c.x === d[i - 1].x && c.y === d[i - 1].y)
548
+ return !1;
549
+ if (i === d.length - 2 && (d[i - 1].x === c.x || d[i - 1].y === c.y)) {
550
+ const l = d[d.length - 1];
551
+ return Math.hypot(l.x - c.x, l.y - c.y) > 20;
552
+ }
553
+ return c.x !== d[i - 1].x || c.y !== d[i - 1].y;
554
+ }).map((c) => ({
555
+ x: c.x + e.x,
556
+ y: c.y + e.y
557
+ }));
558
+ return {
559
+ startX: o[0] + e.x,
560
+ startY: o[1] + e.y,
561
+ endX: a[0] + e.x,
562
+ endY: a[1] + e.y,
563
+ reflectionPoints: n
564
+ };
565
+ }, It = (t, e) => {
566
+ const s = t.nodes.map((c) => c.startsWith("flowchart-") ? c.split("-")[1] : c), r = e.querySelector(`[id='${t.id}']`);
567
+ if (!r)
568
+ throw new Error("SubGraph element not found");
569
+ const o = K(r, e), a = r.getBBox(), n = {
570
+ width: a.width,
571
+ height: a.height
572
+ };
573
+ return t.classes = void 0, t.dir = void 0, {
574
+ ...t,
575
+ nodeIds: s,
576
+ ...o,
577
+ ...n,
578
+ text: R(t.title)
579
+ };
580
+ }, kt = (t, e) => {
581
+ var b, u, p;
582
+ const s = e.querySelector(`[id*="flowchart-${t.id}-"]`);
583
+ if (!s)
584
+ return;
585
+ let r;
586
+ ((b = s.parentElement) == null ? void 0 : b.tagName.toLowerCase()) === "a" && (r = s.parentElement.getAttribute("xlink:href"));
587
+ const o = K(r ? s.parentElement : s, e), a = s.getBBox(), n = {
588
+ width: a.width,
589
+ height: a.height
590
+ }, c = (u = s.querySelector(".label-container")) == null ? void 0 : u.getAttribute("style"), i = (p = s.querySelector(".label")) == null ? void 0 : p.getAttribute("style"), d = {};
591
+ c == null || c.split(";").forEach((g) => {
592
+ if (!g)
593
+ return;
594
+ const m = g.split(":")[0].trim(), y = g.split(":")[1].trim();
595
+ d[m] = y;
596
+ });
597
+ const l = {};
598
+ return i == null || i.split(";").forEach((g) => {
599
+ if (!g)
600
+ return;
601
+ const m = g.split(":")[0].trim(), y = g.split(":")[1].trim();
602
+ l[m] = y;
603
+ }), {
604
+ id: t.id,
605
+ labelType: t.labelType,
606
+ text: R(t.text),
607
+ type: t.type,
608
+ link: r || void 0,
609
+ ...o,
610
+ ...n,
611
+ containerStyle: d,
612
+ labelStyle: l
613
+ };
614
+ }, Tt = (t, e, s) => {
615
+ const r = s.querySelector(`[id*="L-${t.start}-${t.end}-${e}"]`);
616
+ if (!r)
617
+ throw new Error("Edge element not found");
618
+ const o = K(r, s), a = nt(r, o);
619
+ return t.length = void 0, {
620
+ ...t,
621
+ ...a,
622
+ text: R(t.text)
623
+ };
624
+ }, K = (t, e) => {
625
+ var i;
626
+ if (!t)
627
+ throw new Error("Element not found");
628
+ let s = (i = t.parentElement) == null ? void 0 : i.parentElement;
629
+ const r = t.childNodes[0];
630
+ let o = { x: 0, y: 0 };
631
+ if (r) {
632
+ const { transformX: d, transformY: l } = _(r), b = r.getBBox();
633
+ o = {
634
+ x: Number(r.getAttribute("x")) || d + b.x || 0,
635
+ y: Number(r.getAttribute("y")) || l + b.y || 0
636
+ };
637
+ }
638
+ const { transformX: a, transformY: n } = _(t), c = {
639
+ x: a + o.x,
640
+ y: n + o.y
641
+ };
642
+ for (; s && s.id !== e.id; ) {
643
+ if (s.classList.value === "root" && s.hasAttribute("transform")) {
644
+ const { transformX: d, transformY: l } = _(s);
645
+ c.x += d, c.y += l;
646
+ }
647
+ s = s.parentElement;
648
+ }
649
+ return c;
650
+ }, Ot = (t, e) => {
651
+ t.parse();
652
+ const s = t.parser.yy, r = s.getVertices();
653
+ Object.keys(r).forEach((c) => {
654
+ r[c] = kt(r[c], e);
655
+ });
656
+ const o = /* @__PURE__ */ new Map(), a = s.getEdges().filter((c) => e.querySelector(`[id*="L-${c.start}-${c.end}"]`)).map((c) => {
657
+ const i = `${c.start}-${c.end}`, d = o.get(i) || 0;
658
+ return o.set(i, d + 1), Tt(c, d, e);
659
+ });
660
+ return {
661
+ type: "flowchart",
662
+ subGraphs: s.getSubGraphs().map((c) => It(c, e)),
663
+ vertices: r,
664
+ edges: a
665
+ };
666
+ }, Ct = (t, e) => {
667
+ const s = {};
668
+ e != null && e.label && (s.label = { text: R(e.label), fontSize: 16 });
669
+ const r = t.tagName;
670
+ if (r === "line")
671
+ s.startX = Number(t.getAttribute("x1")), s.startY = Number(t.getAttribute("y1")), s.endX = Number(t.getAttribute("x2")), s.endY = Number(t.getAttribute("y2"));
672
+ else if (r === "path") {
673
+ const o = t.getAttribute("d");
674
+ if (!o)
675
+ throw new Error('Path element does not contain a "d" attribute');
676
+ const a = o.split(/(?=[LC])/), n = a[0].substring(1).split(",").map((d) => parseFloat(d)), c = [];
677
+ a.forEach((d) => {
678
+ const l = d.substring(1).trim().split(" ").map((b) => {
679
+ const [u, p] = b.split(",");
680
+ return [
681
+ parseFloat(u) - n[0],
682
+ parseFloat(p) - n[1]
683
+ ];
684
+ });
685
+ c.push(...l);
686
+ });
687
+ const i = c[c.length - 1];
688
+ s.startX = n[0], s.startY = n[1], s.endX = i[0], s.endY = i[1], s.points = c;
689
+ }
690
+ return e != null && e.label && (s.startY = s.startY - 10, s.endY = s.endY - 10), s.strokeColor = t.getAttribute("stroke"), s.strokeWidth = Number(t.getAttribute("stroke-width")), s.type = "arrow", s.strokeStyle = (e == null ? void 0 : e.strokeStyle) || "solid", s.startArrowhead = (e == null ? void 0 : e.startArrowhead) || null, s.endArrowhead = (e == null ? void 0 : e.endArrowhead) || null, s;
691
+ }, ot = (t, e, s, r, o) => {
692
+ const a = {};
693
+ return a.type = "arrow", a.startX = t, a.startY = e, a.endX = s, a.endY = r, Object.assign(a, { ...o }), a;
694
+ }, H = (t, e, s, r) => ({
695
+ type: "text",
696
+ x: t,
697
+ y: e,
698
+ text: s,
699
+ width: (r == null ? void 0 : r.width) || 20,
700
+ height: (r == null ? void 0 : r.height) || 20,
701
+ fontSize: (r == null ? void 0 : r.fontSize) || G,
702
+ id: r == null ? void 0 : r.id,
703
+ groupId: r == null ? void 0 : r.groupId,
704
+ metadata: r == null ? void 0 : r.metadata
705
+ }), at = (t, e, s) => {
706
+ const r = {}, o = Number(t.getAttribute("x")), a = Number(t.getAttribute("y"));
707
+ r.type = "text", r.text = R(e), s != null && s.id && (r.id = s.id), s != null && s.groupId && (r.groupId = s.groupId);
708
+ const n = t.getBBox();
709
+ r.width = n.width, r.height = n.height, r.x = o - n.width / 2, r.y = a;
710
+ const c = parseInt(getComputedStyle(t).fontSize);
711
+ return r.fontSize = c, r;
712
+ }, O = (t, e, s = {}) => {
713
+ const r = {};
714
+ r.type = e;
715
+ const { label: o, subtype: a, id: n, groupId: c } = s;
716
+ r.id = n, c && (r.groupId = c), o && (r.label = {
717
+ text: R(o.text),
718
+ fontSize: 16,
719
+ verticalAlign: o == null ? void 0 : o.verticalAlign
720
+ });
721
+ const i = t.getBBox();
722
+ switch (r.x = i.x, r.y = i.y, r.width = i.width, r.height = i.height, r.subtype = a, a) {
723
+ case "highlight":
724
+ const d = t.getAttribute("fill");
725
+ d && (r.bgColor = d);
726
+ break;
727
+ case "note":
728
+ r.strokeStyle = "dashed";
729
+ break;
730
+ }
731
+ return r;
732
+ }, q = (t, e, s, r, o, a) => {
733
+ const n = {};
734
+ return n.startX = e, n.startY = s, n.endX = r, a != null && a.groupId && (n.groupId = a.groupId), a != null && a.id && (n.id = a.id), n.endY = o, n.strokeColor = t.getAttribute("stroke"), n.strokeWidth = Number(t.getAttribute("stroke-width")), n.type = "line", n;
735
+ }, J = {
736
+ 0: "SOLID",
737
+ 1: "DOTTED",
738
+ 3: "SOLID_CROSS",
739
+ 4: "DOTTED_CROSS",
740
+ 5: "SOLID_OPEN",
741
+ 6: "DOTTED_OPEN",
742
+ 24: "SOLID_POINT",
743
+ 25: "DOTTED_POINT"
744
+ }, T = {
745
+ SOLID: 0,
746
+ DOTTED: 1,
747
+ NOTE: 2,
748
+ SOLID_CROSS: 3,
749
+ DOTTED_CROSS: 4,
750
+ SOLID_OPEN: 5,
751
+ DOTTED_OPEN: 6,
752
+ SOLID_POINT: 24,
753
+ DOTTED_POINT: 25,
754
+ CRITICAL_START: 27
755
+ }, Nt = (t) => {
756
+ let e;
757
+ switch (t) {
758
+ case T.SOLID:
759
+ case T.SOLID_CROSS:
760
+ case T.SOLID_OPEN:
761
+ case T.SOLID_POINT:
762
+ e = "solid";
763
+ break;
764
+ case T.DOTTED:
765
+ case T.DOTTED_CROSS:
766
+ case T.DOTTED_OPEN:
767
+ case T.DOTTED_POINT:
768
+ e = "dotted";
769
+ break;
770
+ default:
771
+ e = "solid";
772
+ break;
773
+ }
774
+ return e;
775
+ }, Lt = (t, e) => {
776
+ var r, o;
777
+ if (!!((r = t.nextElementSibling) != null && r.classList.contains("sequenceNumber"))) {
778
+ const a = (o = t.nextElementSibling) == null ? void 0 : o.textContent;
779
+ if (!a)
780
+ throw new Error("sequence number not present");
781
+ const n = 30, c = n / 2, d = {
782
+ type: "rectangle",
783
+ x: e.startX - 10,
784
+ y: e.startY - c,
785
+ label: { text: a, fontSize: 14 },
786
+ bgColor: "#e9ecef",
787
+ height: n,
788
+ subtype: "sequence"
789
+ };
790
+ Object.assign(e, { sequenceNumber: d });
791
+ }
792
+ }, tt = (t, e, s) => {
793
+ if (!t)
794
+ throw "root node not found";
795
+ const r = N(), o = Array.from(t.children), a = [];
796
+ return o.forEach((n, c) => {
797
+ const i = `${s == null ? void 0 : s.id}-${c}`;
798
+ let d;
799
+ switch (n.tagName) {
800
+ case "line":
801
+ const l = Number(n.getAttribute("x1")), b = Number(n.getAttribute("y1")), u = Number(n.getAttribute("x2")), p = Number(n.getAttribute("y2"));
802
+ d = q(n, l, b, u, p, { groupId: r, id: i });
803
+ break;
804
+ case "text":
805
+ d = at(n, e, {
806
+ groupId: r,
807
+ id: i
808
+ });
809
+ break;
810
+ case "circle":
811
+ d = O(n, "ellipse", {
812
+ label: n.textContent ? { text: n.textContent } : void 0,
813
+ groupId: r,
814
+ id: i
815
+ });
816
+ default:
817
+ d = O(n, ct[n.tagName], {
818
+ label: n.textContent ? { text: n.textContent } : void 0,
819
+ groupId: r,
820
+ id: i
821
+ });
822
+ }
823
+ a.push(d);
824
+ }), a;
825
+ }, Dt = (t, e) => {
826
+ const s = Array.from(e.querySelectorAll(".actor-top")), r = Array.from(e.querySelectorAll(".actor-bottom")), o = [], a = [];
827
+ return Object.values(t).forEach((n, c) => {
828
+ var b;
829
+ const i = s.find((u) => u.getAttribute("name") === n.name), d = r.find((u) => u.getAttribute("name") === n.name);
830
+ if (!i || !d)
831
+ throw "root not found";
832
+ const l = n.description;
833
+ if (n.type === "participant") {
834
+ const u = O(i, "rectangle", { id: `${n.name}-top`, label: { text: l }, subtype: "actor" });
835
+ if (!u)
836
+ throw "Top Node element not found!";
837
+ o.push([u]);
838
+ const p = O(d, "rectangle", { id: `${n.name}-bottom`, label: { text: l }, subtype: "actor" });
839
+ o.push([p]);
840
+ const g = (b = i == null ? void 0 : i.parentElement) == null ? void 0 : b.previousElementSibling;
841
+ if ((g == null ? void 0 : g.tagName) !== "line")
842
+ throw "Line not found";
843
+ const m = Number(g.getAttribute("x1"));
844
+ if (!u.height)
845
+ throw "Top node element height is null";
846
+ const y = u.y + u.height, w = p.y, E = Number(g.getAttribute("x2")), x = q(g, m, y, E, w);
847
+ a.push(x);
848
+ } else if (n.type === "actor") {
849
+ const u = tt(i, l, {
850
+ id: `${n.name}-top`
851
+ });
852
+ o.push(u);
853
+ const p = tt(d, l, {
854
+ id: `${n.name}-bottom`
855
+ });
856
+ o.push(p);
857
+ const g = i.previousElementSibling;
858
+ if ((g == null ? void 0 : g.tagName) !== "line")
859
+ throw "Line not found";
860
+ const m = Number(g.getAttribute("x1")), y = Number(g.getAttribute("y1")), w = Number(g.getAttribute("x2")), E = p.find((x) => x.type === "ellipse");
861
+ if (E) {
862
+ const x = E.y, h = q(g, m, y, w, x);
863
+ a.push(h);
864
+ }
865
+ }
866
+ }), { nodes: o, lines: a };
867
+ }, Yt = (t, e) => {
868
+ const s = [], r = Array.from(e.querySelectorAll('[class*="messageLine"]')), o = Object.keys(J), a = t.filter((n) => o.includes(n.type.toString()));
869
+ return r.forEach((n, c) => {
870
+ const i = a[c], d = J[i.type], l = Ct(n, {
871
+ label: i == null ? void 0 : i.message,
872
+ strokeStyle: Nt(i.type),
873
+ endArrowhead: d === "SOLID_OPEN" || d === "DOTTED_OPEN" ? null : "arrow"
874
+ });
875
+ Lt(n, l), s.push(l);
876
+ }), s;
877
+ }, vt = (t, e) => {
878
+ const s = Array.from(e.querySelectorAll(".note")).map((a) => a.parentElement), r = t.filter((a) => a.type === T.NOTE), o = [];
879
+ return s.forEach((a, n) => {
880
+ if (!a)
881
+ return;
882
+ const c = a.firstChild, i = r[n].message, d = O(c, "rectangle", {
883
+ label: { text: i },
884
+ subtype: "note"
885
+ });
886
+ o.push(d);
887
+ }), o;
888
+ }, Xt = (t) => {
889
+ const e = Array.from(t.querySelectorAll("[class*=activation]")), s = [];
890
+ return e.forEach((r) => {
891
+ const o = O(r, "rectangle", {
892
+ label: { text: "" },
893
+ subtype: "activation"
894
+ });
895
+ s.push(o);
896
+ }), s;
897
+ }, _t = (t, e) => {
898
+ const s = Array.from(e.querySelectorAll(".loopLine")), r = [], o = [], a = [];
899
+ s.forEach((l) => {
900
+ const b = Number(l.getAttribute("x1")), u = Number(l.getAttribute("y1")), p = Number(l.getAttribute("x2")), g = Number(l.getAttribute("y2")), m = q(l, b, u, p, g);
901
+ m.strokeStyle = "dotted", m.strokeColor = "#adb5bd", m.strokeWidth = 2, r.push(m);
902
+ });
903
+ const n = Array.from(e.querySelectorAll(".loopText")), c = t.filter((l) => l.type === T.CRITICAL_START).map((l) => l.message);
904
+ n.forEach((l) => {
905
+ var m;
906
+ const b = l.textContent || "", u = at(l, b), p = ((m = b.match(/\[(.*?)\]/)) == null ? void 0 : m[1]) || "";
907
+ c.includes(p) && (u.x += 16), o.push(u);
908
+ });
909
+ const i = Array.from(e == null ? void 0 : e.querySelectorAll(".labelBox")), d = Array.from(e == null ? void 0 : e.querySelectorAll(".labelText"));
910
+ return i.forEach((l, b) => {
911
+ var g;
912
+ const u = ((g = d[b]) == null ? void 0 : g.textContent) || "", p = O(l, "rectangle", {
913
+ label: { text: u }
914
+ });
915
+ p.strokeColor = "#adb5bd", p.bgColor = "#e9ecef", p.width = void 0, a.push(p);
916
+ }), { lines: r, texts: o, nodes: a };
917
+ }, Rt = (t) => {
918
+ const e = Array.from(t.querySelectorAll(".rect")).filter((r) => {
919
+ var o;
920
+ return ((o = r.parentElement) == null ? void 0 : o.tagName) !== "g";
921
+ }), s = [];
922
+ return e.forEach((r) => {
923
+ const o = O(r, "rectangle", {
924
+ label: { text: "" },
925
+ subtype: "highlight"
926
+ });
927
+ s.push(o);
928
+ }), s;
929
+ }, $t = (t, e) => {
930
+ t.parse();
931
+ const s = t.parser.yy, r = [], o = s.getBoxes(), a = Rt(e), n = s.getActors(), { nodes: c, lines: i } = Dt(n, e), d = s.getMessages(), l = Yt(d, e), b = vt(d, e), u = Xt(e), p = _t(d, e);
932
+ return r.push(a), r.push(...c), r.push(b), r.push(u), { type: "sequence", lines: i, arrows: l, nodes: r, loops: p, groups: o };
933
+ }, j = {
934
+ AGGREGATION: 0,
935
+ EXTENSION: 1,
936
+ COMPOSITION: 2,
937
+ DEPENDENCY: 3
938
+ }, et = {
939
+ LINE: 0,
940
+ DOTTED_LINE: 1
941
+ }, D = 16, Pt = (t) => {
942
+ let e;
943
+ switch (t) {
944
+ case et.LINE:
945
+ e = "solid";
946
+ break;
947
+ case et.DOTTED_LINE:
948
+ e = "dotted";
949
+ break;
950
+ default:
951
+ e = "solid";
952
+ }
953
+ return e;
954
+ }, rt = (t) => {
955
+ let e;
956
+ switch (t) {
957
+ case j.AGGREGATION:
958
+ e = "diamond_outline";
959
+ break;
960
+ case j.COMPOSITION:
961
+ e = "diamond";
962
+ break;
963
+ case j.EXTENSION:
964
+ e = "triangle_outline";
965
+ break;
966
+ case "none":
967
+ e = null;
968
+ break;
969
+ case j.DEPENDENCY:
970
+ default:
971
+ e = "arrow";
972
+ break;
973
+ }
974
+ return e;
975
+ }, Mt = (t, e) => {
976
+ const s = [], r = [], o = [];
977
+ return Object.values(t).forEach((a) => {
978
+ var m;
979
+ const { domId: n, id: c } = a, i = N(), d = e.querySelector(`[data-id=${c}]`);
980
+ if (!d)
981
+ throw Error(`DOM Node with id ${n} not found`);
982
+ const { transformX: l, transformY: b } = _(d), u = O(d.firstChild, "rectangle", { id: c, groupId: i });
983
+ u.x += l, u.y += b, u.metadata = { classId: c }, s.push(u), Array.from(d.querySelectorAll(".divider")).forEach((y) => {
984
+ const w = Number(y.getAttribute("x1")), E = Number(y.getAttribute("y1")), x = Number(y.getAttribute("x2")), h = Number(y.getAttribute("y2")), f = q(y, w, E, x, h, {
985
+ groupId: i,
986
+ id: N()
987
+ });
988
+ f.startX += l, f.startY += b, f.endX += l, f.endY += b, f.metadata = { classId: c }, r.push(f);
989
+ });
990
+ const g = (m = d.querySelector(".label")) == null ? void 0 : m.children;
991
+ if (!g)
992
+ throw "label nodes not found";
993
+ Array.from(g).forEach((y) => {
994
+ const w = y.textContent;
995
+ if (!w)
996
+ return;
997
+ const E = N(), { transformX: x, transformY: h } = _(y), f = y.getBBox(), I = H(l + x, b + h + 10, w, {
998
+ width: f.width,
999
+ height: f.height,
1000
+ id: E,
1001
+ groupId: i,
1002
+ metadata: { classId: c }
1003
+ });
1004
+ o.push(I);
1005
+ });
1006
+ }), { nodes: s, lines: r, text: o };
1007
+ }, qt = (t, e) => {
1008
+ const s = ["triangle_outline", "diamond", "diamond_outline"], r = e.startArrowhead && s.includes(e.startArrowhead), o = e.endArrowhead && s.includes(e.endArrowhead);
1009
+ return !o && !r || (r && (t === "LR" ? e.startX -= D : t === "RL" ? e.startX += D : t === "TB" ? e.startY -= D : t === "BT" && (e.startY += D)), o && (t === "LR" ? e.endX += D : t === "RL" ? e.endX -= D : t === "TB" ? e.endY += D : t === "BT" && (e.endY -= D))), e;
1010
+ }, Bt = (t, e, s, r) => {
1011
+ var c;
1012
+ const o = (c = s.querySelector(".edgePaths")) == null ? void 0 : c.children;
1013
+ if (!o)
1014
+ throw new Error("No Edges found!");
1015
+ const a = [], n = [];
1016
+ return t.forEach((i, d) => {
1017
+ const { id1: l, id2: b, relation: u } = i, p = e.find((Y) => Y.id === l), g = e.find((Y) => Y.id === b), m = Pt(u.lineType), y = rt(u.type1), w = rt(u.type2), E = nt(o[d]), x = ot(E.startX, E.startY, E.endX, E.endY, {
1018
+ strokeStyle: m,
1019
+ startArrowhead: y,
1020
+ endArrowhead: w,
1021
+ label: i.title ? { text: i.title } : void 0,
1022
+ start: { type: "rectangle", id: p.id },
1023
+ end: { type: "rectangle", id: g.id }
1024
+ }), h = qt(r, x);
1025
+ a.push(h);
1026
+ const { relationTitle1: f, relationTitle2: C } = i, I = 20, k = 15, L = 15;
1027
+ let S, A;
1028
+ if (f && f !== "none") {
1029
+ switch (r) {
1030
+ case "TB":
1031
+ S = h.startX - I, h.endX < h.startX && (S -= L), A = h.startY + k;
1032
+ break;
1033
+ case "BT":
1034
+ S = h.startX + I, h.endX > h.startX && (S += L), A = h.startY - k;
1035
+ break;
1036
+ case "LR":
1037
+ S = h.startX + I, A = h.startY + k, h.endY > h.startY && (A += L);
1038
+ break;
1039
+ case "RL":
1040
+ S = h.startX - I, A = h.startY - k, h.startY > h.endY && (A -= L);
1041
+ break;
1042
+ default:
1043
+ S = h.startX - I, A = h.startY + k;
1044
+ }
1045
+ const Y = H(S, A, f, {
1046
+ fontSize: 16
1047
+ });
1048
+ n.push(Y);
1049
+ }
1050
+ if (C && C !== "none") {
1051
+ switch (r) {
1052
+ case "TB":
1053
+ S = h.endX + I, h.endX < h.startX && (S += L), A = h.endY - k;
1054
+ break;
1055
+ case "BT":
1056
+ S = h.endX - I, h.endX > h.startX && (S -= L), A = h.endY + k;
1057
+ break;
1058
+ case "LR":
1059
+ S = h.endX - I, A = h.endY - k, h.endY > h.startY && (A -= L);
1060
+ break;
1061
+ case "RL":
1062
+ S = h.endX + I, A = h.endY + k, h.startY > h.endY && (A += L);
1063
+ break;
1064
+ default:
1065
+ S = h.endX + I, A = h.endY - k;
1066
+ }
1067
+ const Y = H(S, A, C, {
1068
+ fontSize: 16
1069
+ });
1070
+ n.push(Y);
1071
+ }
1072
+ }), { arrows: a, text: n };
1073
+ }, jt = (t, e, s) => {
1074
+ const r = [], o = [];
1075
+ return t.forEach((a) => {
1076
+ const { id: n, text: c, class: i } = a, d = e.querySelector(`#${n}`);
1077
+ if (!d)
1078
+ throw new Error(`Node with id ${n} not found!`);
1079
+ const { transformX: l, transformY: b } = _(d), u = d.firstChild, p = O(u, "rectangle", {
1080
+ id: n,
1081
+ subtype: "note",
1082
+ label: { text: c }
1083
+ });
1084
+ if (Object.assign(p, {
1085
+ x: p.x + l,
1086
+ y: p.y + b
1087
+ }), r.push(p), i) {
1088
+ const g = s.find((h) => h.id === i);
1089
+ if (!g)
1090
+ throw new Error(`class node with id ${i} not found!`);
1091
+ const m = p.x + (p.width || 0) / 2, y = p.y + (p.height || 0), w = m, E = g.y, x = ot(m, y, w, E, {
1092
+ strokeStyle: "dotted",
1093
+ startArrowhead: null,
1094
+ endArrowhead: null,
1095
+ start: { id: p.id, type: "rectangle" },
1096
+ end: { id: g.id, type: "rectangle" }
1097
+ });
1098
+ o.push(x);
1099
+ }
1100
+ }), { notes: r, connectors: o };
1101
+ }, zt = (t, e) => {
1102
+ t.parse();
1103
+ const s = t.parser.yy, r = s.getDirection(), o = [], a = [], n = [], c = [], i = s.getNamespaces(), d = s.getClasses();
1104
+ if (Object.keys(d).length) {
1105
+ const m = Mt(d, e);
1106
+ o.push(m.nodes), a.push(...m.lines), n.push(...m.text), c.push(...m.nodes);
1107
+ }
1108
+ const l = s.getRelations(), { arrows: b, text: u } = Bt(l, c, e, r), { notes: p, connectors: g } = jt(s.getNotes(), e, c);
1109
+ return o.push(p), b.push(...g), n.push(...u), { type: "class", nodes: o, lines: a, arrows: b, text: n, namespaces: i };
1110
+ }, Gt = (t) => {
1111
+ const e = t.querySelector("svg");
1112
+ if (!e)
1113
+ throw new Error("SVG element not found");
1114
+ const s = e.getBoundingClientRect(), r = s.width, o = s.height;
1115
+ e.setAttribute("width", `${r}`), e.setAttribute("height", `${o}`);
1116
+ const a = "image/svg+xml", n = unescape(encodeURIComponent(e.outerHTML)), i = `data:image/svg+xml;base64,${btoa(n)}`;
1117
+ return {
1118
+ type: "graphImage",
1119
+ mimeType: a,
1120
+ dataURL: i,
1121
+ width: r,
1122
+ height: o
1123
+ };
1124
+ }, Ft = async (t, e = Z) => {
1125
+ U.initialize({ ...Z, ...e });
1126
+ const s = await U.mermaidAPI.getDiagramFromText(St(t)), { svg: r } = await U.render("mermaid-to-excalidraw", t), o = document.createElement("div");
1127
+ o.setAttribute("style", "opacity: 0; position: relative; z-index: -1;"), o.innerHTML = r, o.id = "mermaid-diagram", document.body.appendChild(o);
1128
+ let a;
1129
+ switch (s.type) {
1130
+ case "flowchart-v2": {
1131
+ a = Ot(s, o);
1132
+ break;
1133
+ }
1134
+ case "sequence": {
1135
+ a = $t(s, o);
1136
+ break;
1137
+ }
1138
+ case "classDiagram": {
1139
+ a = zt(s, o);
1140
+ break;
1141
+ }
1142
+ // fallback to image if diagram type not-supported
1143
+ default:
1144
+ a = Gt(o);
1145
+ }
1146
+ return o.remove(), a;
1147
+ }, Zt = async (t, e) => {
1148
+ var n;
1149
+ const s = e || {}, r = parseInt(((n = s.themeVariables) == null ? void 0 : n.fontSize) ?? "") || G, o = await Ft(t, {
1150
+ ...s,
1151
+ themeVariables: {
1152
+ ...s.themeVariables,
1153
+ // Multiplying by 1.25 to increase the font size by 25% and render correctly in Excalidraw
1154
+ fontSize: `${r * 1.25}px`
1155
+ }
1156
+ });
1157
+ return wt(o, {
1158
+ fontSize: r
1159
+ });
1160
+ };
1161
+ export {
1162
+ Zt as parseMermaidToExcalidraw
1163
+ };