@layers-app/editor 0.1.9 → 0.1.11

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 (216) hide show
  1. package/dist/index.cjs +2 -2
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.js +2 -2
  4. package/dist/{layers.LgVabAS6.js → layers.10F_oxAf.js} +1 -1
  5. package/dist/{layers.CDisTQiM.js → layers.26VR4Gbd.js} +1 -1
  6. package/dist/{layers.YaKWzTJP.js → layers.2DJ5j1xt.js} +1 -1
  7. package/dist/{layers.ZAQZCJT-.js → layers.2HrKU-hM.js} +1 -1
  8. package/dist/layers.4Ou4t228.js +8 -0
  9. package/dist/{layers.BCjKdfem.js → layers.4t5rhpJ0.js} +2 -2
  10. package/dist/{layers.DNwyjiyL.js → layers.7aCWrxKl.js} +1 -1
  11. package/dist/{layers.Dz9F1T6e.js → layers.8g6Kqwfa.js} +1 -1
  12. package/dist/{layers.DpiW5S4c.js → layers.8j7Npo3a.js} +1 -1
  13. package/dist/{layers.rzTIQoRk.js → layers.Aqp_35v2.js} +4 -4
  14. package/dist/{layers.CP4s08XX.js → layers.B1lZsgvd.js} +1 -1
  15. package/dist/{layers.DjoB0UzO.js → layers.B1yraU7a.js} +1 -1
  16. package/dist/{layers.CqbtkAVf.js → layers.B25iYPwD.js} +6 -6
  17. package/dist/{layers.BtR28hWm.js → layers.B3pznQk7.js} +1 -1
  18. package/dist/{layers.BJi58KQa.js → layers.B3txrJII.js} +1 -1
  19. package/dist/layers.B4x6UszA.js +164 -0
  20. package/dist/layers.B5IwVcRk.js +1 -0
  21. package/dist/{layers.DQu1u4NJ.js → layers.B6ji94ox.js} +1 -1
  22. package/dist/{layers.CT7hKUwf.js → layers.B6tmdjkM.js} +4 -4
  23. package/dist/{layers.DG2s39lU.js → layers.B7pXZzgW.js} +1 -1
  24. package/dist/{layers.BW8brrqK.js → layers.B8R08xw7.js} +1 -1
  25. package/dist/{layers.Bsbs4uJU.js → layers.BAcfMt55.js} +1 -1
  26. package/dist/{layers.BwwDUuPd.js → layers.BAn3qv9N.js} +1 -1
  27. package/dist/{layers.DRgbEhHC.js → layers.BCM28r0r.js} +1 -1
  28. package/dist/{layers.Dh-3VjhL.js → layers.BCg7lYRl.js} +1 -1
  29. package/dist/{layers.xhwt5L_9.js → layers.BE9TGI-L.js} +2 -2
  30. package/dist/{layers.DTEK1Wsu.js → layers.BFYeTGRT.js} +1 -1
  31. package/dist/{layers.CXs84HR5.js → layers.BJ2WiPcj.js} +3 -3
  32. package/dist/{layers.HPAO0bY5.js → layers.BJ8k7AyC.js} +1 -1
  33. package/dist/{layers.DhfIuSW6.js → layers.BM2iqC3D.js} +1 -1
  34. package/dist/{layers.DrDximly.js → layers.BO6aUG3u.js} +1 -1
  35. package/dist/{layers.CnEAvxI0.js → layers.BOZav8Ee.js} +1 -1
  36. package/dist/{layers.irYyEj3I.js → layers.BPTbxnNH.js} +4 -4
  37. package/dist/{layers.FQU_DxQO.js → layers.BRsg6mUH.js} +1 -1
  38. package/dist/{layers.2y4fsFgW.js → layers.BT6uZx8w.js} +1 -1
  39. package/dist/{layers.BY_Yf7tp.js → layers.BV3nprpw.js} +1 -1
  40. package/dist/{layers.Fcqv4N0r.js → layers.BVFNBedb.js} +1 -1
  41. package/dist/{layers.Ddv1x5bx.js → layers.BVwtMJKt.js} +1 -1
  42. package/dist/{layers.B-TqCQJa.js → layers.BW6TnEFQ.js} +24 -24
  43. package/dist/{layers.lUvHNo0q.js → layers.BWXAkrS4.js} +3 -3
  44. package/dist/{layers.Bb1QQeht.js → layers.BX-jvRLZ.js} +1 -1
  45. package/dist/{layers.Bg0vliFJ.js → layers.BX11mVrJ.js} +1 -1
  46. package/dist/{layers.CB8ySLhT.js → layers.BY0AH8Im.js} +1 -1
  47. package/dist/{layers.DMlyJ_b2.js → layers.BY2tHTl3.js} +1 -1
  48. package/dist/{layers.DtL6fOGh.js → layers.BabOqhGt.js} +5 -5
  49. package/dist/{layers.BAOJ7S4d.js → layers.BadciSzU.js} +2 -2
  50. package/dist/{layers.JmuAH4CQ.js → layers.BbASP6pP.js} +3 -3
  51. package/dist/{layers.CB0yyYRW.js → layers.BcdwOAR3.js} +1 -1
  52. package/dist/{layers.DQRLjoLc.js → layers.Bd_DWzOy.js} +1 -1
  53. package/dist/{layers.DC_46tMm.js → layers.Be2AKMmM.js} +1 -1
  54. package/dist/{layers.DoWRESyq.js → layers.BeiHIEID.js} +1 -1
  55. package/dist/{layers.B3EStNZi.js → layers.BeohZwmQ.js} +1 -1
  56. package/dist/{layers.DjSc2h3n.js → layers.Bf7f2hyY.js} +1 -1
  57. package/dist/{layers.DnaKZaiy.js → layers.Bft664mj.js} +1 -1
  58. package/dist/{layers.GM2OjQrj.js → layers.BgcdZoox.js} +1 -1
  59. package/dist/{layers.DpgRKxI_.js → layers.BiLaL9uQ.js} +1 -1
  60. package/dist/{layers.BahqCgxj.js → layers.BiuuR2en.js} +1 -1
  61. package/dist/{layers.D6Xeu3pG.js → layers.BjfMSqyC.js} +3 -3
  62. package/dist/{layers.pIRe6CtW.js → layers.BnbE7PKF.js} +1 -1
  63. package/dist/{layers.BE89gjsZ.js → layers.BoZ_x5iL.js} +1 -1
  64. package/dist/{layers.Bc5ps0oe.js → layers.BqIanFBL.js} +1 -1
  65. package/dist/{layers.BGDrgy8e.js → layers.Bt5dcICQ.js} +1 -1
  66. package/dist/{layers.Wo7un-cE.js → layers.Bv8PgUvl.js} +1 -1
  67. package/dist/{layers.CschWcx8.js → layers.BvD97osC.js} +1 -1
  68. package/dist/{layers.CD24Bi41.js → layers.Bwu-dJIK.js} +1 -1
  69. package/dist/{layers.DpJq1Vrh.js → layers.BzFZ1b3G.js} +3 -3
  70. package/dist/{layers.DOL5iEU-.js → layers.C-VHvleA.js} +4 -4
  71. package/dist/{layers.DMCqDEul.js → layers.C0DrZrH6.js} +1 -1
  72. package/dist/{layers.D6hUbBDu.js → layers.C1WSGdIk.js} +1 -1
  73. package/dist/{layers.CsALATt0.js → layers.C4joqDIO.js} +1 -1
  74. package/dist/{layers.Bl2AQ8VP.js → layers.C58RhTDf.js} +1 -1
  75. package/dist/{layers.JK74Xzoz.js → layers.C62MRl2i.js} +1 -1
  76. package/dist/{layers.CcTfLEwa.js → layers.C6UXPvUH.js} +1 -1
  77. package/dist/{layers.CnNXuwi1.js → layers.C7iDslXH.js} +3 -3
  78. package/dist/layers.CBNU2UPM.js +1 -0
  79. package/dist/{layers.BUOu3J8E.js → layers.CCsX9iwc.js} +1 -1
  80. package/dist/{layers.BBJZkqpk.js → layers.CDiIhl-h.js} +1 -1
  81. package/dist/{layers.B9pd-x7m.js → layers.CElJ93cL.js} +1 -1
  82. package/dist/{layers.DWoqCZc3.js → layers.CIDERcAo.js} +1 -1
  83. package/dist/{layers.Crz3kyy4.js → layers.CIG2V-vs.js} +1 -1
  84. package/dist/{layers.BsYaP9Eh.js → layers.CIQmEwPP.js} +1 -1
  85. package/dist/{layers.CTvLmWLl.js → layers.CKWWKy9e.js} +1 -1
  86. package/dist/{layers.B3S2e5f6.js → layers.CLHMrRrZ.js} +1 -1
  87. package/dist/{layers.D4U4J9Nw.js → layers.CMav5kBa.js} +18 -18
  88. package/dist/{layers.B6SSZwu-.js → layers.CMvRSnGp.js} +1 -1
  89. package/dist/layers.CN-0qe5z.js +321 -0
  90. package/dist/{layers.o_KWgPNq.js → layers.CPCeLvyw.js} +1 -1
  91. package/dist/{layers.-u0TX5CR.js → layers.CQ5QBV_q.js} +1 -1
  92. package/dist/{layers.BiQwa2Ob.js → layers.CQswU7al.js} +4 -4
  93. package/dist/{layers.VEN3h2fT.js → layers.CRfv5enU.js} +1 -1
  94. package/dist/{layers.CD-uglJ6.js → layers.CRjyczwR.js} +1 -1
  95. package/dist/{layers.X-mH14zN.js → layers.CS0W9dm2.js} +1 -1
  96. package/dist/{layers.AaANvrmx.js → layers.CTHqshyo.js} +1 -1
  97. package/dist/layers.CUSgDm7_.js +6 -0
  98. package/dist/{layers.DL_e0jpP.js → layers.CW7inPW_.js} +1 -1
  99. package/dist/{layers.Pnknc8Em.js → layers.CWyc8Rtf.js} +1 -1
  100. package/dist/{layers.BJmLyVz3.js → layers.C_NNePuA.js} +4 -4
  101. package/dist/{layers.7-1Ry-OK.js → layers.CdclGZk-.js} +1 -1
  102. package/dist/{layers.C-dcJg-6.js → layers.CfBKDlcY.js} +1 -1
  103. package/dist/{layers.zg7k3VnS.js → layers.CgCrHj4-.js} +3 -3
  104. package/dist/{layers.CZ-WHovw.js → layers.ChWfy8U3.js} +1 -1
  105. package/dist/{layers.vK3VWlcN.js → layers.CiZjcR7F.js} +1 -1
  106. package/dist/{layers.BU-sbVDq.js → layers.ClTvcL7f.js} +1 -1
  107. package/dist/{layers.BhD-Stcw.js → layers.Cm7fmQ-1.js} +1 -1
  108. package/dist/{layers.D_o5DDOm.js → layers.CmsVMWSA.js} +3 -3
  109. package/dist/{layers.CDthHbUZ.js → layers.Cne6uHv9.js} +1 -1
  110. package/dist/{layers.CkvnXk-6.js → layers.Cnebch-O.js} +22 -22
  111. package/dist/{layers.DUg2epMu.js → layers.CpXMQ5O7.js} +1 -1
  112. package/dist/{layers.dKAXs0VS.js → layers.Cptaq_FS.js} +1 -1
  113. package/dist/{layers.Dtg6bwqY.js → layers.Cq2AIO9L.js} +1 -1
  114. package/dist/{layers.CFwmx4Kl.js → layers.Cq7VoON6.js} +1 -1
  115. package/dist/{layers.D2-2aaAJ.js → layers.Cr_oOTvP.js} +1 -1
  116. package/dist/{layers.do6IWnQw.js → layers.CsFfsk1Q.js} +1 -1
  117. package/dist/{layers.BSKrIy6v.js → layers.CtApbTrT.js} +1 -1
  118. package/dist/{layers.Be_zQsEl.js → layers.CtCzuj2a.js} +1 -1
  119. package/dist/{layers.hUgHykbv.js → layers.CtXjzm50.js} +1 -1
  120. package/dist/{layers.Czt8IZIY.js → layers.Ctkn9SrN.js} +3 -3
  121. package/dist/{layers.CWtf1CXr.js → layers.Cx2VSIis.js} +1 -1
  122. package/dist/{layers.kq5SBKxU.js → layers.CxTWR6s7.js} +1 -1
  123. package/dist/{layers.vCxMCnKg.js → layers.CyDysPZ-.js} +1 -1
  124. package/dist/{layers.BodLEMBB.js → layers.CyY0oMag.js} +1 -1
  125. package/dist/{layers.Cj_8GFzT.js → layers.CydtYlEQ.js} +1 -1
  126. package/dist/{layers.CDVKSLpn.js → layers.D-YZJopV.js} +1 -1
  127. package/dist/{layers.DYRl1Xg3.js → layers.D0CB3GeV.js} +1 -1
  128. package/dist/{layers.g7CIsrqS.js → layers.D0F_qdEq.js} +1 -1
  129. package/dist/{layers.dK0PEf7v.js → layers.D2t7NAQT.js} +1 -1
  130. package/dist/{layers.DI56Z0cc.js → layers.D3K8sreg.js} +1 -1
  131. package/dist/{layers.CUySNtAg.js → layers.D4ztS4Ks.js} +1 -1
  132. package/dist/{layers.DeTsLz1p.js → layers.D5yAW6We.js} +1 -1
  133. package/dist/{layers.ChJT6EaK.js → layers.D6GLOuFK.js} +1 -1
  134. package/dist/{layers.CvDRW4Ta.js → layers.D8nRWjsV.js} +1 -1
  135. package/dist/layers.D9S1ELkZ.js +1 -0
  136. package/dist/{layers.BXdee8YY.js → layers.DAFrfr3n.js} +1 -1
  137. package/dist/{layers.CxL9YVcp.js → layers.DAgpP0Ul.js} +1 -1
  138. package/dist/layers.DBsW3ZT0.js +58 -0
  139. package/dist/{layers.B6NMUIBO.js → layers.DDgP6ojv.js} +6399 -6311
  140. package/dist/{layers.Blczbm3H.js → layers.DEhPZdbE.js} +4 -4
  141. package/dist/{layers.Ct0ClmLU.js → layers.DH7rIFPy.js} +1 -1
  142. package/dist/{layers.Bx1ZH-AK.js → layers.DHO9hL3t.js} +1 -1
  143. package/dist/{layers.C6AzY-Rq.js → layers.DHzNZtQQ.js} +40 -42
  144. package/dist/{layers.DaJ7tVKo.js → layers.DIxnpL0q.js} +1 -1
  145. package/dist/layers.DJCLWdyK.js +1 -0
  146. package/dist/{layers.oxccZlGm.js → layers.DMmW6aAr.js} +1 -1
  147. package/dist/{layers.BOgNblbb.js → layers.DN6lh7hF.js} +1 -1
  148. package/dist/{layers.4bG7KPbV.js → layers.DNV1CxGK.js} +1 -1
  149. package/dist/{layers.BvOcf8Za.js → layers.DPQgyGOh.js} +4 -4
  150. package/dist/{layers.D-MT0Pua.js → layers.DPpOVmU6.js} +1 -1
  151. package/dist/{layers.wkDhZSpo.js → layers.DQFt4WDH.js} +1 -1
  152. package/dist/{layers.CeC1ByRt.js → layers.DTsNCXQ8.js} +1 -1
  153. package/dist/{layers.k8of8jss.js → layers.DUVUkAkU.js} +1 -1
  154. package/dist/{layers.ZcJaTH1L.js → layers.DVJU-V0K.js} +3 -3
  155. package/dist/{layers.BKRZ4pDk.js → layers.DVdH5YXo.js} +3 -3
  156. package/dist/{layers.dk0EZHjd.js → layers.DW7Oe1Rt.js} +1 -1
  157. package/dist/{layers.DeMnDiPY.js → layers.DXNebwb9.js} +2 -2
  158. package/dist/{layers.XgvjTPPf.js → layers.DXbrYoKf.js} +1 -1
  159. package/dist/{layers.WkGUEoYY.js → layers.DZlZYNc5.js} +1 -1
  160. package/dist/{layers.Da8EDaun.js → layers.Dbbm6JQn.js} +1 -1
  161. package/dist/{layers.CZLxLBcK.js → layers.DhXq_hUR.js} +1 -1
  162. package/dist/{layers.BW3K08Q6.js → layers.Dj3vc-Rc.js} +1 -1
  163. package/dist/{layers.NgwZQdoG.js → layers.DjLT9gNd.js} +1 -1
  164. package/dist/{layers.q0cTGZam.js → layers.DnCjx6fa.js} +2 -2
  165. package/dist/{layers.Bmcfu8Ir.js → layers.DpnPaE73.js} +1 -1
  166. package/dist/{layers.w6uiBueD.js → layers.DqYPzNjy.js} +1 -1
  167. package/dist/{layers.BUYv-pHK.js → layers.DtpFVUms.js} +1 -1
  168. package/dist/{layers.DPzOXgB9.js → layers.DvQgacQ9.js} +1 -1
  169. package/dist/{layers.Dp_k90hg.js → layers.DxojS2Rt.js} +1 -1
  170. package/dist/{layers.CJhtoDtW.js → layers.DyOM1kr0.js} +1 -1
  171. package/dist/{layers.BKas1KSr.js → layers.EHmFDP16.js} +1 -1
  172. package/dist/{layers.Clx94sZs.js → layers.EfQVyHc2.js} +1 -1
  173. package/dist/{layers.C6OWwF1n.js → layers.FL9cf-5M.js} +1 -1
  174. package/dist/{layers.CWMkwn-B.js → layers.FM3hewj5.js} +1 -1
  175. package/dist/{layers.044nxajN.js → layers.FYRIbDRm.js} +940 -940
  176. package/dist/{layers.BWN4DPin.js → layers.GSdc57m_.js} +4 -4
  177. package/dist/{layers.rEKa3oCe.js → layers.G_s2yieT.js} +1 -1
  178. package/dist/{layers.mz-xewmn.js → layers.IFtcuNRN.js} +1 -1
  179. package/dist/{layers.D6375Czm.js → layers.JSzy8Tos.js} +1 -1
  180. package/dist/{layers.BHhoLe0-.js → layers.M274OnPA.js} +5 -5
  181. package/dist/{layers.cC4cH0xX.js → layers.MR4abf2z.js} +1 -1
  182. package/dist/{layers.Bh0rosje.js → layers.VDHfh2n9.js} +1 -1
  183. package/dist/{layers.Dq6aJlE7.js → layers.VySV8qzP.js} +1 -1
  184. package/dist/{layers.BkSfczfh.js → layers.XA3f2CUH.js} +1 -1
  185. package/dist/{layers.CpQWSERY.js → layers.Z89EgVpd.js} +1 -1
  186. package/dist/{layers.BktD44Ly.js → layers._MujkFgx.js} +1 -1
  187. package/dist/{layers.C345QUTt.js → layers.axAvQEZX.js} +1 -1
  188. package/dist/{layers.DXXuKhsG.js → layers.cu7tzfiR.js} +1 -1
  189. package/dist/{layers.HuMipGc2.js → layers.fdaMdtSQ.js} +1 -1
  190. package/dist/{layers.BouSJOaZ.js → layers.fjSmgsuM.js} +1 -1
  191. package/dist/{layers.DJTHHH1C.js → layers.ggDmYLox.js} +1 -1
  192. package/dist/layers.iSb4r16K.js +1 -0
  193. package/dist/{layers.DJdbw1GS.js → layers.mTDMnfbs.js} +1 -1
  194. package/dist/{layers.DPyUd-vw.js → layers.s3G_Xyqi.js} +1 -1
  195. package/dist/{layers.CEaGskCX.js → layers.tEgdd6ZZ.js} +1 -1
  196. package/dist/{layers.Bvkv6TGw.js → layers.tFg1IVA5.js} +1 -1
  197. package/dist/{layers.BKdrm1Ka.js → layers.vWZBnGXh.js} +1 -1
  198. package/dist/{layers.DswmcMJk.js → layers.w66I5muL.js} +1 -1
  199. package/dist/{layers.CNwWrzKp.js → layers.xHm-EgHr.js} +1 -1
  200. package/dist/{layers.NQVCtegd.js → layers.xLErh_Sx.js} +1 -1
  201. package/dist/{layers.BoXdtpU5.js → layers.xuSvFeb8.js} +1 -1
  202. package/dist/{layers.Diq5EcHq.js → layers.yGCxN51j.js} +1 -1
  203. package/dist/{layers.B9vGmEpv.js → layers.yPVlmVx-.js} +1 -1
  204. package/dist/{layers.BSGk6DOR.js → layers.zG2gTG-H.js} +1 -1
  205. package/dist/{layers.BHAZoL9t.js → layers.zhfs4Rjx.js} +1 -1
  206. package/package.json +1 -1
  207. package/dist/layers.28Ob73Zc.js +0 -164
  208. package/dist/layers.BplA5isO.js +0 -1
  209. package/dist/layers.CQoSfF7m.js +0 -1
  210. package/dist/layers.Cn3BN_ex.js +0 -287
  211. package/dist/layers.CxybklbN.js +0 -1
  212. package/dist/layers.DnofVcFc.js +0 -52
  213. package/dist/layers.MoiI9Ny0.js +0 -1
  214. package/dist/layers.Vd4FEmlT.js +0 -1
  215. package/dist/layers.oyXzk2iv.js +0 -6
  216. package/dist/layers.sHNcVyFF.js +0 -8
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./layers.B6SSZwu-.js"),t=require("./layers.BKRZ4pDk.js");require("lodash-es");const z=require("./layers.COAF7f8g.js"),T=require("./layers.9QK1wiQj.js");require("./layers.CkvnXk-6.js");const L=require("./layers.BtR28hWm.js"),P=e=>e.append("circle").attr("class","start-state").attr("r",t.getConfig().state.sizeUnit).attr("cx",t.getConfig().state.padding+t.getConfig().state.sizeUnit).attr("cy",t.getConfig().state.padding+t.getConfig().state.sizeUnit),A=e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t.getConfig().state.textHeight).attr("class","divider").attr("x2",t.getConfig().state.textHeight*2).attr("y1",0).attr("y2",0),G=(e,n)=>{const r=e.append("text").attr("x",2*t.getConfig().state.padding).attr("y",t.getConfig().state.textHeight+2*t.getConfig().state.padding).attr("font-size",t.getConfig().state.fontSize).attr("class","state-title").text(n.id),d=r.node().getBBox();return e.insert("rect",":first-child").attr("x",t.getConfig().state.padding).attr("y",t.getConfig().state.padding).attr("width",d.width+2*t.getConfig().state.padding).attr("height",d.height+2*t.getConfig().state.padding).attr("rx",t.getConfig().state.radius),r},W=(e,n)=>{const r=function(c,w,y){const S=c.append("tspan").attr("x",2*t.getConfig().state.padding).text(w);y||S.attr("dy",t.getConfig().state.textHeight)},a=e.append("text").attr("x",2*t.getConfig().state.padding).attr("y",t.getConfig().state.textHeight+1.3*t.getConfig().state.padding).attr("font-size",t.getConfig().state.fontSize).attr("class","state-title").text(n.descriptions[0]).node().getBBox(),l=a.height,f=e.append("text").attr("x",t.getConfig().state.padding).attr("y",l+t.getConfig().state.padding*.4+t.getConfig().state.dividerMargin+t.getConfig().state.textHeight).attr("class","state-description");let i=!0,s=!0;n.descriptions.forEach(function(c){i||(r(f,c,s),s=!1),i=!1});const C=e.append("line").attr("x1",t.getConfig().state.padding).attr("y1",t.getConfig().state.padding+l+t.getConfig().state.dividerMargin/2).attr("y2",t.getConfig().state.padding+l+t.getConfig().state.dividerMargin/2).attr("class","descr-divider"),p=f.node().getBBox(),g=Math.max(p.width,a.width);return C.attr("x2",g+3*t.getConfig().state.padding),e.insert("rect",":first-child").attr("x",t.getConfig().state.padding).attr("y",t.getConfig().state.padding).attr("width",g+2*t.getConfig().state.padding).attr("height",p.height+l+2*t.getConfig().state.padding).attr("rx",t.getConfig().state.radius),e},v=(e,n,r)=>{const d=t.getConfig().state.padding,a=2*t.getConfig().state.padding,l=e.node().getBBox(),f=l.width,i=l.x,s=e.append("text").attr("x",0).attr("y",t.getConfig().state.titleShift).attr("font-size",t.getConfig().state.fontSize).attr("class","state-title").text(n.id),p=s.node().getBBox().width+a;let g=Math.max(p,f);g===f&&(g=g+a);let c;const w=e.node().getBBox();n.doc,c=i-d,p>f&&(c=(f-g)/2+d),Math.abs(i-w.x)<d&&p>f&&(c=i-(p-f)/2);const y=1-t.getConfig().state.textHeight;return e.insert("rect",":first-child").attr("x",c).attr("y",y).attr("class",r?"alt-composit":"composit").attr("width",g).attr("height",w.height+t.getConfig().state.textHeight+t.getConfig().state.titleShift+1).attr("rx","0"),s.attr("x",c+d),p<=f&&s.attr("x",i+(g-a)/2-p/2+d),e.insert("rect",":first-child").attr("x",c).attr("y",t.getConfig().state.titleShift-t.getConfig().state.textHeight-t.getConfig().state.padding).attr("width",g).attr("height",t.getConfig().state.textHeight*3).attr("rx",t.getConfig().state.radius),e.insert("rect",":first-child").attr("x",c).attr("y",t.getConfig().state.titleShift-t.getConfig().state.textHeight-t.getConfig().state.padding).attr("width",g).attr("height",w.height+3+2*t.getConfig().state.textHeight).attr("rx",t.getConfig().state.radius),e},R=e=>(e.append("circle").attr("class","end-state-outer").attr("r",t.getConfig().state.sizeUnit+t.getConfig().state.miniPadding).attr("cx",t.getConfig().state.padding+t.getConfig().state.sizeUnit+t.getConfig().state.miniPadding).attr("cy",t.getConfig().state.padding+t.getConfig().state.sizeUnit+t.getConfig().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t.getConfig().state.sizeUnit).attr("cx",t.getConfig().state.padding+t.getConfig().state.sizeUnit+2).attr("cy",t.getConfig().state.padding+t.getConfig().state.sizeUnit+2)),U=(e,n)=>{let r=t.getConfig().state.forkWidth,d=t.getConfig().state.forkHeight;if(n.parentId){let a=r;r=d,d=a}return e.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",d).attr("x",t.getConfig().state.padding).attr("y",t.getConfig().state.padding)},q=(e,n,r,d)=>{let a=0;const l=d.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let f=e.replace(/\r\n/g,"<br/>");f=f.replace(/\n/g,"<br/>");const i=f.split(t.common$1.lineBreakRegex);let s=1.25*t.getConfig().state.noteMargin;for(const C of i){const p=C.trim();if(p.length>0){const g=l.append("tspan");if(g.text(p),s===0){const c=g.node().getBBox();s+=c.height}a+=s,g.attr("x",n+t.getConfig().state.noteMargin),g.attr("y",r+a+1.25*t.getConfig().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:a}},F=(e,n)=>{n.attr("class","state-note");const r=n.append("rect").attr("x",0).attr("y",t.getConfig().state.padding),d=n.append("g"),{textWidth:a,textHeight:l}=q(e,0,0,d);return r.attr("height",l+2*t.getConfig().state.noteMargin),r.attr("width",a+t.getConfig().state.noteMargin*2),r},M=function(e,n){const r=n.id,d={id:r,label:n.id,width:0,height:0},a=e.append("g").attr("id",r).attr("class","stateGroup");n.type==="start"&&P(a),n.type==="end"&&R(a),(n.type==="fork"||n.type==="join")&&U(a,n),n.type==="note"&&F(n.note.text,a),n.type==="divider"&&A(a),n.type==="default"&&n.descriptions.length===0&&G(a,n),n.type==="default"&&n.descriptions.length>0&&W(a,n);const l=a.node().getBBox();return d.width=l.width+2*t.getConfig().state.padding,d.height=l.height+2*t.getConfig().state.padding,d};let H=0;const O=function(e,n,r){const d=function(s){switch(s){case m.db.relationType.AGGREGATION:return"aggregation";case m.db.relationType.EXTENSION:return"extension";case m.db.relationType.COMPOSITION:return"composition";case m.db.relationType.DEPENDENCY:return"dependency"}};n.points=n.points.filter(s=>!Number.isNaN(s.y));const a=n.points,l=L.line().x(function(s){return s.x}).y(function(s){return s.y}).curve(t.curveBasis),f=e.append("path").attr("d",l(a)).attr("id","edge"+H).attr("class","transition");let i="";if(t.getConfig().state.arrowMarkerAbsolute&&(i=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,i=i.replace(/\(/g,"\\("),i=i.replace(/\)/g,"\\)")),f.attr("marker-end","url("+i+"#"+d(m.db.relationType.DEPENDENCY)+"End)"),r.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:C,y:p}=t.utils.calcLabelPosition(n.points),g=t.common$1.getRows(r.title);let c=0;const w=[];let y=0,S=0;for(let x=0;x<=g.length;x++){const h=s.append("text").attr("text-anchor","middle").text(g[x]).attr("x",C).attr("y",p+c),u=h.node().getBBox();y=Math.max(y,u.width),S=Math.min(S,u.x),t.log$1.info(u.x,C,p+c),c===0&&(c=h.node().getBBox().height,t.log$1.info("Title height",c,p)),w.push(h)}let E=c*g.length;if(g.length>1){const x=(g.length-1)*c*.5;w.forEach((h,u)=>h.attr("y",p+u*c-x)),E=c*g.length}const o=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",C-y/2-t.getConfig().state.padding/2).attr("y",p-E/2-t.getConfig().state.padding/2-3.5).attr("width",y+t.getConfig().state.padding).attr("height",E+t.getConfig().state.padding),t.log$1.info(o)}H++};let b;const N={},X=function(){},J=function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},Y=function(e,n,r,d){b=t.getConfig().state;const a=t.getConfig().securityLevel;let l;a==="sandbox"&&(l=t.select("#i"+n));const f=a==="sandbox"?t.select(l.nodes()[0].contentDocument.body):t.select("body"),i=a==="sandbox"?l.nodes()[0].contentDocument:document;t.log$1.debug("Rendering diagram "+e);const s=f.select(`[id='${n}']`);J(s);const C=d.db.getRootDoc();$(C,s,void 0,!1,f,i,d);const p=b.padding,g=s.node().getBBox(),c=g.width+p*2,w=g.height+p*2,y=c*1.75;t.configureSvgSize(s,w,y,b.useMaxWidth),s.attr("viewBox",`${g.x-b.padding} ${g.y-b.padding} `+c+" "+w)},I=e=>e?e.length*b.fontSizeFactor:1,$=(e,n,r,d,a,l,f)=>{const i=new T.Graph({compound:!0,multigraph:!0});let s,C=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){C=!1;break}r?i.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:C?1:b.edgeLengthFactor,nodeSep:C?1:50,isMultiGraph:!0}):i.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:C?1:b.edgeLengthFactor,nodeSep:C?1:50,ranker:"tight-tree",isMultiGraph:!0}),i.setDefaultEdgeLabel(function(){return{}}),f.db.extract(e);const p=f.db.getStates(),g=f.db.getRelations(),c=Object.keys(p);for(const o of c){const x=p[o];r&&(x.parentId=r);let h;if(x.doc){let u=n.append("g").attr("id",x.id).attr("class","stateGroup");h=$(x.doc,u,x.id,!d,a,l,f);{u=v(u,x,d);let B=u.node().getBBox();h.width=B.width,h.height=B.height+b.padding/2,N[x.id]={y:b.compositTitleSize}}}else h=M(n,x);if(x.note){const u={descriptions:[],id:x.id+"-note",note:x.note,type:"note"},B=M(n,u);x.note.position==="left of"?(i.setNode(h.id+"-note",B),i.setNode(h.id,h)):(i.setNode(h.id,h),i.setNode(h.id+"-note",B)),i.setParent(h.id,h.id+"-group"),i.setParent(h.id+"-note",h.id+"-group")}else i.setNode(h.id,h)}t.log$1.debug("Count=",i.nodeCount(),i);let w=0;g.forEach(function(o){w++,t.log$1.debug("Setting edge",o),i.setEdge(o.id1,o.id2,{relation:o,width:I(o.title),height:b.labelHeight*t.common$1.getRows(o.title).length,labelpos:"c"},"id"+w)}),z.layout(i),t.log$1.debug("Graph after layout",i.nodes());const y=n.node();i.nodes().forEach(function(o){o!==void 0&&i.node(o)!==void 0?(t.log$1.warn("Node "+o+": "+JSON.stringify(i.node(o))),a.select("#"+y.id+" #"+o).attr("transform","translate("+(i.node(o).x-i.node(o).width/2)+","+(i.node(o).y+(N[o]?N[o].y:0)-i.node(o).height/2)+" )"),a.select("#"+y.id+" #"+o).attr("data-x-shift",i.node(o).x-i.node(o).width/2),l.querySelectorAll("#"+y.id+" #"+o+" .divider").forEach(h=>{const u=h.parentElement;let B=0,k=0;u&&(u.parentElement&&(B=u.parentElement.getBBox().width),k=parseInt(u.getAttribute("data-x-shift"),10),Number.isNaN(k)&&(k=0)),h.setAttribute("x1",0-k+8),h.setAttribute("x2",B-k-8)})):t.log$1.debug("No Node "+o+": "+JSON.stringify(i.node(o)))});let S=y.getBBox();i.edges().forEach(function(o){o!==void 0&&i.edge(o)!==void 0&&(t.log$1.debug("Edge "+o.v+" -> "+o.w+": "+JSON.stringify(i.edge(o))),O(n,i.edge(o),i.edge(o).relation))}),S=y.getBBox();const E={id:r||"root",label:r||"root",width:0,height:0};return E.width=S.width+2*b.padding,E.height=S.height+2*b.padding,t.log$1.debug("Doc rendered",E,i),E},_={setConf:X,draw:Y},Z={parser:m.parser$1,db:m.db,renderer:_,styles:m.styles,init:e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute,m.db.clear()}};exports.diagram=Z;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./layers.CMvRSnGp.js"),t=require("./layers.DVdH5YXo.js");require("lodash-es");const z=require("./layers.COAF7f8g.js"),T=require("./layers.9QK1wiQj.js");require("./layers.Cnebch-O.js");const L=require("./layers.B3pznQk7.js"),P=e=>e.append("circle").attr("class","start-state").attr("r",t.getConfig().state.sizeUnit).attr("cx",t.getConfig().state.padding+t.getConfig().state.sizeUnit).attr("cy",t.getConfig().state.padding+t.getConfig().state.sizeUnit),A=e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t.getConfig().state.textHeight).attr("class","divider").attr("x2",t.getConfig().state.textHeight*2).attr("y1",0).attr("y2",0),G=(e,n)=>{const r=e.append("text").attr("x",2*t.getConfig().state.padding).attr("y",t.getConfig().state.textHeight+2*t.getConfig().state.padding).attr("font-size",t.getConfig().state.fontSize).attr("class","state-title").text(n.id),d=r.node().getBBox();return e.insert("rect",":first-child").attr("x",t.getConfig().state.padding).attr("y",t.getConfig().state.padding).attr("width",d.width+2*t.getConfig().state.padding).attr("height",d.height+2*t.getConfig().state.padding).attr("rx",t.getConfig().state.radius),r},W=(e,n)=>{const r=function(c,w,y){const S=c.append("tspan").attr("x",2*t.getConfig().state.padding).text(w);y||S.attr("dy",t.getConfig().state.textHeight)},a=e.append("text").attr("x",2*t.getConfig().state.padding).attr("y",t.getConfig().state.textHeight+1.3*t.getConfig().state.padding).attr("font-size",t.getConfig().state.fontSize).attr("class","state-title").text(n.descriptions[0]).node().getBBox(),l=a.height,f=e.append("text").attr("x",t.getConfig().state.padding).attr("y",l+t.getConfig().state.padding*.4+t.getConfig().state.dividerMargin+t.getConfig().state.textHeight).attr("class","state-description");let i=!0,s=!0;n.descriptions.forEach(function(c){i||(r(f,c,s),s=!1),i=!1});const C=e.append("line").attr("x1",t.getConfig().state.padding).attr("y1",t.getConfig().state.padding+l+t.getConfig().state.dividerMargin/2).attr("y2",t.getConfig().state.padding+l+t.getConfig().state.dividerMargin/2).attr("class","descr-divider"),p=f.node().getBBox(),g=Math.max(p.width,a.width);return C.attr("x2",g+3*t.getConfig().state.padding),e.insert("rect",":first-child").attr("x",t.getConfig().state.padding).attr("y",t.getConfig().state.padding).attr("width",g+2*t.getConfig().state.padding).attr("height",p.height+l+2*t.getConfig().state.padding).attr("rx",t.getConfig().state.radius),e},v=(e,n,r)=>{const d=t.getConfig().state.padding,a=2*t.getConfig().state.padding,l=e.node().getBBox(),f=l.width,i=l.x,s=e.append("text").attr("x",0).attr("y",t.getConfig().state.titleShift).attr("font-size",t.getConfig().state.fontSize).attr("class","state-title").text(n.id),p=s.node().getBBox().width+a;let g=Math.max(p,f);g===f&&(g=g+a);let c;const w=e.node().getBBox();n.doc,c=i-d,p>f&&(c=(f-g)/2+d),Math.abs(i-w.x)<d&&p>f&&(c=i-(p-f)/2);const y=1-t.getConfig().state.textHeight;return e.insert("rect",":first-child").attr("x",c).attr("y",y).attr("class",r?"alt-composit":"composit").attr("width",g).attr("height",w.height+t.getConfig().state.textHeight+t.getConfig().state.titleShift+1).attr("rx","0"),s.attr("x",c+d),p<=f&&s.attr("x",i+(g-a)/2-p/2+d),e.insert("rect",":first-child").attr("x",c).attr("y",t.getConfig().state.titleShift-t.getConfig().state.textHeight-t.getConfig().state.padding).attr("width",g).attr("height",t.getConfig().state.textHeight*3).attr("rx",t.getConfig().state.radius),e.insert("rect",":first-child").attr("x",c).attr("y",t.getConfig().state.titleShift-t.getConfig().state.textHeight-t.getConfig().state.padding).attr("width",g).attr("height",w.height+3+2*t.getConfig().state.textHeight).attr("rx",t.getConfig().state.radius),e},R=e=>(e.append("circle").attr("class","end-state-outer").attr("r",t.getConfig().state.sizeUnit+t.getConfig().state.miniPadding).attr("cx",t.getConfig().state.padding+t.getConfig().state.sizeUnit+t.getConfig().state.miniPadding).attr("cy",t.getConfig().state.padding+t.getConfig().state.sizeUnit+t.getConfig().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t.getConfig().state.sizeUnit).attr("cx",t.getConfig().state.padding+t.getConfig().state.sizeUnit+2).attr("cy",t.getConfig().state.padding+t.getConfig().state.sizeUnit+2)),U=(e,n)=>{let r=t.getConfig().state.forkWidth,d=t.getConfig().state.forkHeight;if(n.parentId){let a=r;r=d,d=a}return e.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",d).attr("x",t.getConfig().state.padding).attr("y",t.getConfig().state.padding)},q=(e,n,r,d)=>{let a=0;const l=d.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let f=e.replace(/\r\n/g,"<br/>");f=f.replace(/\n/g,"<br/>");const i=f.split(t.common$1.lineBreakRegex);let s=1.25*t.getConfig().state.noteMargin;for(const C of i){const p=C.trim();if(p.length>0){const g=l.append("tspan");if(g.text(p),s===0){const c=g.node().getBBox();s+=c.height}a+=s,g.attr("x",n+t.getConfig().state.noteMargin),g.attr("y",r+a+1.25*t.getConfig().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:a}},F=(e,n)=>{n.attr("class","state-note");const r=n.append("rect").attr("x",0).attr("y",t.getConfig().state.padding),d=n.append("g"),{textWidth:a,textHeight:l}=q(e,0,0,d);return r.attr("height",l+2*t.getConfig().state.noteMargin),r.attr("width",a+t.getConfig().state.noteMargin*2),r},M=function(e,n){const r=n.id,d={id:r,label:n.id,width:0,height:0},a=e.append("g").attr("id",r).attr("class","stateGroup");n.type==="start"&&P(a),n.type==="end"&&R(a),(n.type==="fork"||n.type==="join")&&U(a,n),n.type==="note"&&F(n.note.text,a),n.type==="divider"&&A(a),n.type==="default"&&n.descriptions.length===0&&G(a,n),n.type==="default"&&n.descriptions.length>0&&W(a,n);const l=a.node().getBBox();return d.width=l.width+2*t.getConfig().state.padding,d.height=l.height+2*t.getConfig().state.padding,d};let H=0;const O=function(e,n,r){const d=function(s){switch(s){case m.db.relationType.AGGREGATION:return"aggregation";case m.db.relationType.EXTENSION:return"extension";case m.db.relationType.COMPOSITION:return"composition";case m.db.relationType.DEPENDENCY:return"dependency"}};n.points=n.points.filter(s=>!Number.isNaN(s.y));const a=n.points,l=L.line().x(function(s){return s.x}).y(function(s){return s.y}).curve(t.curveBasis),f=e.append("path").attr("d",l(a)).attr("id","edge"+H).attr("class","transition");let i="";if(t.getConfig().state.arrowMarkerAbsolute&&(i=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,i=i.replace(/\(/g,"\\("),i=i.replace(/\)/g,"\\)")),f.attr("marker-end","url("+i+"#"+d(m.db.relationType.DEPENDENCY)+"End)"),r.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:C,y:p}=t.utils.calcLabelPosition(n.points),g=t.common$1.getRows(r.title);let c=0;const w=[];let y=0,S=0;for(let x=0;x<=g.length;x++){const h=s.append("text").attr("text-anchor","middle").text(g[x]).attr("x",C).attr("y",p+c),u=h.node().getBBox();y=Math.max(y,u.width),S=Math.min(S,u.x),t.log$1.info(u.x,C,p+c),c===0&&(c=h.node().getBBox().height,t.log$1.info("Title height",c,p)),w.push(h)}let E=c*g.length;if(g.length>1){const x=(g.length-1)*c*.5;w.forEach((h,u)=>h.attr("y",p+u*c-x)),E=c*g.length}const o=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",C-y/2-t.getConfig().state.padding/2).attr("y",p-E/2-t.getConfig().state.padding/2-3.5).attr("width",y+t.getConfig().state.padding).attr("height",E+t.getConfig().state.padding),t.log$1.info(o)}H++};let b;const N={},X=function(){},J=function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},Y=function(e,n,r,d){b=t.getConfig().state;const a=t.getConfig().securityLevel;let l;a==="sandbox"&&(l=t.select("#i"+n));const f=a==="sandbox"?t.select(l.nodes()[0].contentDocument.body):t.select("body"),i=a==="sandbox"?l.nodes()[0].contentDocument:document;t.log$1.debug("Rendering diagram "+e);const s=f.select(`[id='${n}']`);J(s);const C=d.db.getRootDoc();$(C,s,void 0,!1,f,i,d);const p=b.padding,g=s.node().getBBox(),c=g.width+p*2,w=g.height+p*2,y=c*1.75;t.configureSvgSize(s,w,y,b.useMaxWidth),s.attr("viewBox",`${g.x-b.padding} ${g.y-b.padding} `+c+" "+w)},I=e=>e?e.length*b.fontSizeFactor:1,$=(e,n,r,d,a,l,f)=>{const i=new T.Graph({compound:!0,multigraph:!0});let s,C=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){C=!1;break}r?i.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:C?1:b.edgeLengthFactor,nodeSep:C?1:50,isMultiGraph:!0}):i.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:C?1:b.edgeLengthFactor,nodeSep:C?1:50,ranker:"tight-tree",isMultiGraph:!0}),i.setDefaultEdgeLabel(function(){return{}}),f.db.extract(e);const p=f.db.getStates(),g=f.db.getRelations(),c=Object.keys(p);for(const o of c){const x=p[o];r&&(x.parentId=r);let h;if(x.doc){let u=n.append("g").attr("id",x.id).attr("class","stateGroup");h=$(x.doc,u,x.id,!d,a,l,f);{u=v(u,x,d);let B=u.node().getBBox();h.width=B.width,h.height=B.height+b.padding/2,N[x.id]={y:b.compositTitleSize}}}else h=M(n,x);if(x.note){const u={descriptions:[],id:x.id+"-note",note:x.note,type:"note"},B=M(n,u);x.note.position==="left of"?(i.setNode(h.id+"-note",B),i.setNode(h.id,h)):(i.setNode(h.id,h),i.setNode(h.id+"-note",B)),i.setParent(h.id,h.id+"-group"),i.setParent(h.id+"-note",h.id+"-group")}else i.setNode(h.id,h)}t.log$1.debug("Count=",i.nodeCount(),i);let w=0;g.forEach(function(o){w++,t.log$1.debug("Setting edge",o),i.setEdge(o.id1,o.id2,{relation:o,width:I(o.title),height:b.labelHeight*t.common$1.getRows(o.title).length,labelpos:"c"},"id"+w)}),z.layout(i),t.log$1.debug("Graph after layout",i.nodes());const y=n.node();i.nodes().forEach(function(o){o!==void 0&&i.node(o)!==void 0?(t.log$1.warn("Node "+o+": "+JSON.stringify(i.node(o))),a.select("#"+y.id+" #"+o).attr("transform","translate("+(i.node(o).x-i.node(o).width/2)+","+(i.node(o).y+(N[o]?N[o].y:0)-i.node(o).height/2)+" )"),a.select("#"+y.id+" #"+o).attr("data-x-shift",i.node(o).x-i.node(o).width/2),l.querySelectorAll("#"+y.id+" #"+o+" .divider").forEach(h=>{const u=h.parentElement;let B=0,k=0;u&&(u.parentElement&&(B=u.parentElement.getBBox().width),k=parseInt(u.getAttribute("data-x-shift"),10),Number.isNaN(k)&&(k=0)),h.setAttribute("x1",0-k+8),h.setAttribute("x2",B-k-8)})):t.log$1.debug("No Node "+o+": "+JSON.stringify(i.node(o)))});let S=y.getBBox();i.edges().forEach(function(o){o!==void 0&&i.edge(o)!==void 0&&(t.log$1.debug("Edge "+o.v+" -> "+o.w+": "+JSON.stringify(i.edge(o))),O(n,i.edge(o),i.edge(o).relation))}),S=y.getBBox();const E={id:r||"root",label:r||"root",width:0,height:0};return E.width=S.width+2*b.padding,E.height=S.height+2*b.padding,t.log$1.debug("Doc rendered",E,i),E},_={setConf:X,draw:Y},Z={parser:m.parser$1,db:m.db,renderer:_,styles:m.styles,init:e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute,m.db.clear()}};exports.diagram=Z;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./layers.BKRZ4pDk.js");require("./layers.CkvnXk-6.js");const Y=require("./layers.dK0PEf7v.js");var J=function(){var n=function(f,i,r,c){for(r=r||{},c=f.length;c--;r[f[c]]=i);return r},t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],a=[1,10],s=[1,11],h=[1,12],l=[1,13],p=[1,16],y=[1,17],g={trace:function(){},yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:function(i,r,c,d,u,o,I){var b=o.length-1;switch(u){case 1:return o[b-1];case 2:this.$=[];break;case 3:o[b-1].push(o[b]),this.$=o[b-1];break;case 4:case 5:this.$=o[b];break;case 6:case 7:this.$=[];break;case 8:d.getCommonDb().setDiagramTitle(o[b].substr(6)),this.$=o[b].substr(6);break;case 9:this.$=o[b].trim(),d.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[b].trim(),d.getCommonDb().setAccDescription(this.$);break;case 12:d.addSection(o[b].substr(8)),this.$=o[b].substr(8);break;case 15:d.addTask(o[b],0,""),this.$=o[b];break;case 16:d.addEvent(o[b].substr(2)),this.$=o[b];break}},table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:a,14:s,16:h,17:l,18:14,19:15,20:p,21:y},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:a,14:s,16:h,17:l,18:14,19:15,20:p,21:y},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:function(i,r){if(r.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=r,c}},parse:function(i){var r=this,c=[0],d=[],u=[null],o=[],I=this.table,b="",$=0,W=0,C=2,P=1,B=o.slice.call(arguments,1),v=Object.create(this.lexer),S={yy:{}};for(var w in this.yy)Object.prototype.hasOwnProperty.call(this.yy,w)&&(S.yy[w]=this.yy[w]);v.setInput(i,S.yy),S.yy.lexer=v,S.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var T=v.yylloc;o.push(T);var A=v.options&&v.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function z(){var M;return M=d.pop()||v.lex()||P,typeof M!="number"&&(M instanceof Array&&(d=M,M=d.pop()),M=r.symbols_[M]||M),M}for(var k,L,E,U,R={},O,N,X,j;;){if(L=c[c.length-1],this.defaultActions[L]?E=this.defaultActions[L]:((k===null||typeof k>"u")&&(k=z()),E=I[L]&&I[L][k]),typeof E>"u"||!E.length||!E[0]){var Z="";j=[];for(O in I[L])this.terminals_[O]&&O>C&&j.push("'"+this.terminals_[O]+"'");v.showPosition?Z="Parse error on line "+($+1)+`:
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./layers.DVdH5YXo.js");require("./layers.Cnebch-O.js");const Y=require("./layers.D2t7NAQT.js");var J=function(){var n=function(f,i,r,c){for(r=r||{},c=f.length;c--;r[f[c]]=i);return r},t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],a=[1,10],s=[1,11],h=[1,12],l=[1,13],p=[1,16],y=[1,17],g={trace:function(){},yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:function(i,r,c,d,u,o,I){var b=o.length-1;switch(u){case 1:return o[b-1];case 2:this.$=[];break;case 3:o[b-1].push(o[b]),this.$=o[b-1];break;case 4:case 5:this.$=o[b];break;case 6:case 7:this.$=[];break;case 8:d.getCommonDb().setDiagramTitle(o[b].substr(6)),this.$=o[b].substr(6);break;case 9:this.$=o[b].trim(),d.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[b].trim(),d.getCommonDb().setAccDescription(this.$);break;case 12:d.addSection(o[b].substr(8)),this.$=o[b].substr(8);break;case 15:d.addTask(o[b],0,""),this.$=o[b];break;case 16:d.addEvent(o[b].substr(2)),this.$=o[b];break}},table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:a,14:s,16:h,17:l,18:14,19:15,20:p,21:y},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:a,14:s,16:h,17:l,18:14,19:15,20:p,21:y},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:function(i,r){if(r.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=r,c}},parse:function(i){var r=this,c=[0],d=[],u=[null],o=[],I=this.table,b="",$=0,W=0,C=2,P=1,B=o.slice.call(arguments,1),v=Object.create(this.lexer),S={yy:{}};for(var w in this.yy)Object.prototype.hasOwnProperty.call(this.yy,w)&&(S.yy[w]=this.yy[w]);v.setInput(i,S.yy),S.yy.lexer=v,S.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var T=v.yylloc;o.push(T);var A=v.options&&v.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function z(){var M;return M=d.pop()||v.lex()||P,typeof M!="number"&&(M instanceof Array&&(d=M,M=d.pop()),M=r.symbols_[M]||M),M}for(var k,L,E,U,R={},O,N,X,j;;){if(L=c[c.length-1],this.defaultActions[L]?E=this.defaultActions[L]:((k===null||typeof k>"u")&&(k=z()),E=I[L]&&I[L][k]),typeof E>"u"||!E.length||!E[0]){var Z="";j=[];for(O in I[L])this.terminals_[O]&&O>C&&j.push("'"+this.terminals_[O]+"'");v.showPosition?Z="Parse error on line "+($+1)+`:
2
2
  `+v.showPosition()+`
3
3
  Expecting `+j.join(", ")+", got '"+(this.terminals_[k]||k)+"'":Z="Parse error on line "+($+1)+": Unexpected "+(k==P?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(Z,{text:v.match,token:this.terminals_[k]||k,line:v.yylineno,loc:T,expected:j})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+L+", token: "+k);switch(E[0]){case 1:c.push(k),u.push(v.yytext),o.push(v.yylloc),c.push(E[1]),k=null,W=v.yyleng,b=v.yytext,$=v.yylineno,T=v.yylloc;break;case 2:if(N=this.productions_[E[1]][1],R.$=u[u.length-N],R._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},A&&(R._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),U=this.performAction.apply(R,[b,W,$,S.yy,E[1],u,o].concat(B)),typeof U<"u")return U;N&&(c=c.slice(0,-1*N*2),u=u.slice(0,-1*N),o=o.slice(0,-1*N)),c.push(this.productions_[E[1]][0]),u.push(R.$),o.push(R._$),X=I[c[c.length-2]][c[c.length-1]],c.push(X);break;case 3:return!0}}return!0}},_=function(){var f={EOF:1,parseError:function(r,c){if(this.yy.parser)this.yy.parser.parseError(r,c);else throw new Error(r)},setInput:function(i,r){return this.yy=r||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var r=i.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var r=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),r=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
@@ -0,0 +1,58 @@
1
+ import { jsx as E } from "react/jsx-runtime";
2
+ import { useState as n, useEffect as f } from "react";
3
+ import { o as u, a as m, E as p, g as w, L as C, $ as N } from "./layers.DDgP6ojv.js";
4
+ import { H as x } from "./layers.FYRIbDRm.js";
5
+ const g = u(
6
+ "INSERT_EXCALIDRAW_COMMAND"
7
+ );
8
+ function R() {
9
+ const [t] = m(), [s, o] = n(!1), [i, l] = n();
10
+ return f(() => {
11
+ if (!t.hasNodes([p]))
12
+ throw new Error(
13
+ "ExcalidrawPlugin: ExcalidrawNode not registered on editor"
14
+ );
15
+ return t.registerCommand(
16
+ g,
17
+ () => {
18
+ o(!0);
19
+ const a = w();
20
+ return l(a), !0;
21
+ },
22
+ C
23
+ );
24
+ }, [t]), /* @__PURE__ */ E(
25
+ x,
26
+ {
27
+ initialElements: [],
28
+ initialAppState: {},
29
+ initialFiles: {},
30
+ isShown: s,
31
+ onDelete: () => {
32
+ o(!1);
33
+ },
34
+ onClose: () => {
35
+ o(!1);
36
+ },
37
+ onSave: (a, c, d) => {
38
+ t.update(() => {
39
+ const r = N();
40
+ r.setData(
41
+ JSON.stringify({
42
+ appState: c,
43
+ elements: a,
44
+ files: d
45
+ })
46
+ );
47
+ const e = i;
48
+ e && e.getParent() && (e == null || e.replace(r));
49
+ }), o(!1);
50
+ },
51
+ closeOnClickOutside: !1
52
+ }
53
+ );
54
+ }
55
+ export {
56
+ g as INSERT_EXCALIDRAW_COMMAND,
57
+ R as default
58
+ };