@layers-app/editor 0.7.23 → 0.7.24

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 (234) hide show
  1. package/dist/index.cjs +2 -2
  2. package/dist/index.d.ts +7 -79
  3. package/dist/index.js +9 -15
  4. package/dist/{layers.DrEc52LK.js → layers.-58OrB2h.js} +1 -1
  5. package/dist/{layers.RWijwG9P.js → layers.-qmjZJBI.js} +1 -1
  6. package/dist/layers.1s4BbICk.js +1 -0
  7. package/dist/{layers.-cpLB214.js → layers.53hChJFF.js} +6 -6
  8. package/dist/{layers.DnEkqLVp.js → layers.5R_vfSOI.js} +1 -1
  9. package/dist/{layers.DJw2J7bw.js → layers.5U6DsNQ8.js} +6 -9
  10. package/dist/{layers.CMYe7bYN.js → layers.6Og6_hox.js} +1 -1
  11. package/dist/{layers.BazhlVmO.js → layers.8HXImnXe.js} +7 -7
  12. package/dist/{layers.B9UnUe7h.js → layers.90LiGxII.js} +5 -8
  13. package/dist/{layers.NrGhQL7i.js → layers.A6MvZ2Sd.js} +4 -4
  14. package/dist/{layers.DYzee1AM.js → layers.Aw65tqqV.js} +1 -1
  15. package/dist/{layers.gaS1bI-f.js → layers.B-Ftwt7z.js} +1 -1
  16. package/dist/{layers.DT2omWm7.js → layers.B0gBsd1G.js} +15 -18
  17. package/dist/{layers.DXJdiDQR.js → layers.B1l2IEoW.js} +1 -1
  18. package/dist/{layers.BOn89qn9.js → layers.B2SmhxzW.js} +1 -1
  19. package/dist/{layers.CM1N26Bn.js → layers.B2nS5rBS.js} +1 -1
  20. package/dist/{layers.CQ_qc_P4.js → layers.B4ZRP4dv.js} +1 -1
  21. package/dist/{layers.CE4cvR9M.js → layers.B5V9R6dS.js} +89 -92
  22. package/dist/{layers.D7NU7knG.js → layers.B6C5kDa3.js} +1 -1
  23. package/dist/{layers.Pdfj-rps.js → layers.B8qo87mf.js} +1 -1
  24. package/dist/{layers.DWi6TS6_.js → layers.BB-2khdc.js} +4 -4
  25. package/dist/{layers.CZhCCCF4.js → layers.BBgqB-dj.js} +1 -1
  26. package/dist/{layers.Dk79hkeN.js → layers.BCDRxkn5.js} +84 -86
  27. package/dist/{layers.D15hEfXi.js → layers.BDuP7QP1.js} +7 -7
  28. package/dist/{layers.Dlx8_WlO.js → layers.BE_-JA1T.js} +1 -1
  29. package/dist/{layers.D_ElsD-x.js → layers.BFDXAxa6.js} +1 -1
  30. package/dist/{layers.CJuRPa36.js → layers.BFclfxlH.js} +3 -3
  31. package/dist/{layers.DgSp_qNb.js → layers.BG9jBVsg.js} +1 -1
  32. package/dist/{layers.D60upjIB.js → layers.BGGuOo27.js} +1 -1
  33. package/dist/{layers.I6dVKb2e.js → layers.BI0TTMdG.js} +1 -1
  34. package/dist/{layers.D8mfmXuz.js → layers.BJOmz-8E.js} +1 -1
  35. package/dist/{layers.CNaC0uOJ.js → layers.BKOg8e2U.js} +1 -1
  36. package/dist/{layers.CD5MZRoU.js → layers.BKWiI_4a.js} +1 -1
  37. package/dist/{layers.CHgOkwRS.js → layers.BLERpK_S.js} +1 -1
  38. package/dist/layers.BLvWGmxZ.js +304 -0
  39. package/dist/{layers.CaaLILN3.js → layers.BNxa_eCc.js} +1 -1
  40. package/dist/{layers.Bk57FuHz.js → layers.BOWoLhye.js} +3 -3
  41. package/dist/layers.BPXa6Xko.js +8 -0
  42. package/dist/{layers.CY50u5GH.js → layers.BSwRsFvu.js} +7 -7
  43. package/dist/layers.BUT_cQlY.js +1 -0
  44. package/dist/{layers.YI-YTy5V.js → layers.BV2fpDYI.js} +1 -1
  45. package/dist/{layers.CiInvjHq.js → layers.BVHCv5uJ.js} +4 -7
  46. package/dist/{layers.BMiwXEvW.js → layers.BVSO7aWV.js} +1 -1
  47. package/dist/{layers.CPa8seQC.js → layers.BW593_YD.js} +1 -1
  48. package/dist/{layers.Bhsf0xTD.js → layers.BY9o3NTY.js} +1 -1
  49. package/dist/layers.BZMHF27f.js +6 -0
  50. package/dist/{layers.BUGfxwRr.js → layers.BZv7cxTR.js} +89 -92
  51. package/dist/{layers.BO79CD9P.js → layers.BbDBKF7d.js} +1 -1
  52. package/dist/{layers.DxlYXQXW.js → layers.BdiCSpJ4.js} +1 -1
  53. package/dist/{layers.BGdjq9k4.js → layers.Bdzg4UkM.js} +1 -1
  54. package/dist/{layers.CGjdGBZm.js → layers.BfK7Zksy.js} +1 -1
  55. package/dist/layers.Bfcc7TOH.js +1 -0
  56. package/dist/{layers.DK3yoXNH.js → layers.BhOCkx36.js} +1 -1
  57. package/dist/{layers.29-Qh75h.js → layers.Bi8uSmnl.js} +1 -1
  58. package/dist/{layers.COELVm2I.js → layers.BiD-9uwr.js} +1 -1
  59. package/dist/layers.BjtEPALX.js +19 -0
  60. package/dist/layers.BlT1aHiA.js +1 -0
  61. package/dist/{layers.D_LRJFEv.js → layers.Bq3WRO3x.js} +1 -1
  62. package/dist/{layers.bc_jaTfK.js → layers.BqikkqHY.js} +1 -1
  63. package/dist/{layers.uRZ4uGOB.js → layers.BqkB6bfG.js} +1 -1
  64. package/dist/{layers.Bm6lNIVW.js → layers.BqxiZwrm.js} +1 -1
  65. package/dist/layers.Br5DTynl.js +74 -0
  66. package/dist/{layers.Dv6WAMwH.js → layers.BrUMsy26.js} +1 -1
  67. package/dist/{layers.D1jHpzKw.js → layers.BsV8AKqE.js} +6 -9
  68. package/dist/{layers.BvzZuQYi.js → layers.BuGAznjj.js} +4 -4
  69. package/dist/{layers.BZETNwke.js → layers.Bv1xDmd0.js} +1 -1
  70. package/dist/{layers.B2KFTJGl.js → layers.Bvra5UGQ.js} +1 -1
  71. package/dist/{layers.73y0cSdc.js → layers.BwHEZWKu.js} +1 -1
  72. package/dist/{layers.BCqWj4Xz.js → layers.BwtMeyCj.js} +3 -3
  73. package/dist/{layers.DjfEK9cQ.js → layers.BxX_THjw.js} +1 -1
  74. package/dist/{layers.BiqSW2by.js → layers.Bzrkz_Q7.js} +1 -1
  75. package/dist/{layers.ij555eO_.js → layers.C-UCCxZT.js} +1 -1
  76. package/dist/{layers.DPnWbB6j.js → layers.C0BLZbdT.js} +1 -1
  77. package/dist/{layers.Cw-HPQf-.js → layers.C2-P7-v8.js} +1 -1
  78. package/dist/{layers.Z4nbVM_-.js → layers.C20Qi890.js} +1 -1
  79. package/dist/{layers.tfwszVHU.js → layers.C47JbXwl.js} +1 -1
  80. package/dist/{layers.BIG9YKzs.js → layers.C5JgdF76.js} +1 -1
  81. package/dist/{layers.BffDLyKk.js → layers.CA5feGxW.js} +1 -1
  82. package/dist/{layers.BDD1KfeR.js → layers.CCqe9zp9.js} +1 -1
  83. package/dist/{layers.TYxUe44n.js → layers.CDPIcOqa.js} +1 -1
  84. package/dist/{layers.BSfmVK7z.js → layers.CDexQZa_.js} +5 -8
  85. package/dist/{layers.C0OvS3X2.js → layers.CFSfvSsm.js} +1 -1
  86. package/dist/{layers.CcDkFL6P.js → layers.CH4plVEu.js} +3 -3
  87. package/dist/{layers.DBMV9sVv.js → layers.CHa9lFoT.js} +1 -1
  88. package/dist/{layers.CXDrUFaD.js → layers.CLT1Xhw2.js} +1 -1
  89. package/dist/{layers.2g3p410y.js → layers.CP3EufOe.js} +1 -1
  90. package/dist/{layers.Jso1Rtcd.js → layers.CPIxu6GO.js} +5 -8
  91. package/dist/{layers.D3HS9TbW.js → layers.CQMssu5A.js} +1 -1
  92. package/dist/layers.CQR0Nl7I.js +1 -0
  93. package/dist/{layers.35jlOcdS.js → layers.CR8SQeln.js} +224 -227
  94. package/dist/{layers.CJdUktnw.js → layers.CRKCl3-s.js} +1 -1
  95. package/dist/{layers.CHZLcfzW.js → layers.CSi2XRJ2.js} +1 -1
  96. package/dist/{layers.CxxIH2di.js → layers.CUV1fBKt.js} +12 -15
  97. package/dist/{layers.C2uP3dSX.js → layers.CV3PBAi0.js} +1 -1
  98. package/dist/{layers.BqRK5hcw.js → layers.CXPJGJnh.js} +1 -1
  99. package/dist/{layers.hgaybOo2.js → layers.CXp0yiA_.js} +1 -1
  100. package/dist/{layers.zxBrRE1P.js → layers.CYMmJIgK.js} +4 -7
  101. package/dist/{layers.D6MKuxHB.js → layers.Ca_hxCzh.js} +1 -1
  102. package/dist/{layers.CvQemHpn.js → layers.CadrukAB.js} +1 -1
  103. package/dist/{layers.Cz08SEjI.js → layers.Cc1VRWwn.js} +1 -1
  104. package/dist/{layers.pU2_Gt2w.js → layers.CeuPBpSS.js} +1 -1
  105. package/dist/{layers.DxJkl90c.js → layers.Cf85CE4j.js} +1 -1
  106. package/dist/{layers.CsMF9Mcc.js → layers.CfJUJqdv.js} +1 -1
  107. package/dist/layers.CgDb5aPr.js +2 -0
  108. package/dist/{layers.Bk6_Os8z.js → layers.CiFtNCp_.js} +1 -1
  109. package/dist/{layers.CA6t_Bjs.js → layers.CkEhuwys.js} +8 -11
  110. package/dist/{layers.BVKQ1q-V.js → layers.CmWWurhR.js} +1 -1
  111. package/dist/layers.CmxZ8EKk.js +1 -0
  112. package/dist/{layers.Q_PS-tRN.js → layers.Co1X8jDP.js} +1 -1
  113. package/dist/{layers.B2HAS3jD.js → layers.CoCdUjOH.js} +1 -1
  114. package/dist/layers.Cp63Ydn2.js +50707 -0
  115. package/dist/{layers.C4B4dvWx.js → layers.CqggRfmv.js} +1 -1
  116. package/dist/layers.CtCTIWni.js +1 -0
  117. package/dist/layers.Ctzw3Xb5.js +1 -0
  118. package/dist/{layers.DTuGifBE.js → layers.CvU_g0Ek.js} +1 -1
  119. package/dist/layers.Cw5bBQfp.js +118 -0
  120. package/dist/{layers.CP2XIdh_.js → layers.Cynva3D_.js} +1 -1
  121. package/dist/{layers.KlKmfsBA.js → layers.Czdt779o.js} +1 -1
  122. package/dist/{layers.-Tff0gbg.js → layers.D-iLQKYz.js} +1 -1
  123. package/dist/layers.D0GEGoV_.js +373 -0
  124. package/dist/{layers.uzQ-2V7t.js → layers.D0ptqEmo.js} +1 -1
  125. package/dist/{layers.CwqZ78CF.js → layers.D33lu-eC.js} +1 -1
  126. package/dist/{layers.CIBX4kN6.js → layers.D4VJ5B0e.js} +1 -1
  127. package/dist/layers.D5DNThwz.js +208 -0
  128. package/dist/{layers.Bu85fkOP.js → layers.D6XgZ8Az.js} +1 -1
  129. package/dist/layers.D71D_04V.js +1359 -0
  130. package/dist/{layers.D2f2ApIk.js → layers.D8vSQAh0.js} +8 -8
  131. package/dist/{layers.CnjADqOy.js → layers.D9yXBIuK.js} +1 -1
  132. package/dist/{layers.Cnqb7wKB.js → layers.DAF65Eyh.js} +1 -1
  133. package/dist/{layers.C4mOUFRJ.js → layers.DD5DttRP.js} +1 -1
  134. package/dist/{layers.C24-EacD.js → layers.DH-cj5fE.js} +2 -2
  135. package/dist/{layers.B-kCa5Od.js → layers.DJ7ZL_sW.js} +6 -9
  136. package/dist/layers.DJnnhy8m.js +96 -0
  137. package/dist/{layers.CMxdtuyk.js → layers.DM9hpazD.js} +1 -1
  138. package/dist/{layers.CSqoVmKS.js → layers.DNJEfwiQ.js} +1 -1
  139. package/dist/{layers.CupTWZsA.js → layers.DNOD_LF5.js} +1 -1
  140. package/dist/{layers.BLzus7b8.js → layers.DO1NcRAM.js} +1 -1
  141. package/dist/{layers.DbhnKU2H.js → layers.DPP6_cbD.js} +6 -9
  142. package/dist/{layers.C7SPnzuD.js → layers.DQIT2lCm.js} +1 -1
  143. package/dist/{layers.V47hYk_p.js → layers.DRZylWPP.js} +1 -1
  144. package/dist/{layers.uaIfPWsI.js → layers.DU7EZINs.js} +1 -1
  145. package/dist/{layers.4pgTRQX0.js → layers.DXyBsBF5.js} +1 -1
  146. package/dist/{layers.BJzTny2j.js → layers.D_XM1OQx.js} +3 -3
  147. package/dist/{layers.CJAH6bhp.js → layers.DcKjvxHE.js} +1 -1
  148. package/dist/{layers.BhTu7lKR.js → layers.DenZLHkn.js} +1 -1
  149. package/dist/{layers.BsHOozaJ.js → layers.Df79MJjN.js} +3 -3
  150. package/dist/{layers.DV77DVIT.js → layers.DfgtWeVl.js} +1 -1
  151. package/dist/layers.DgCaJXYg.js +257 -0
  152. package/dist/{layers.BOMJfSmk.js → layers.DjGdrDC1.js} +1 -1
  153. package/dist/{layers.Ba0U3m_a.js → layers.DmEW632Y.js} +2 -2
  154. package/dist/{layers.CG2UCtoJ.js → layers.DnvUnO-4.js} +1 -1
  155. package/dist/{layers.CfE7zjUC.js → layers.DpAWXloN.js} +7 -10
  156. package/dist/{layers.2nKKnihc.js → layers.Dq9b1xqh.js} +1 -1
  157. package/dist/{layers.CO_gtBDp.js → layers.DrZAE5o5.js} +1 -1
  158. package/dist/{layers.DDIAJqfF.js → layers.DrprvZC4.js} +1 -1
  159. package/dist/{layers.HUBCzsU0.js → layers.DvNvJZss.js} +1 -1
  160. package/dist/layers.Dvl1mlTI.js +1 -0
  161. package/dist/{layers.CbbuOQ3N.js → layers.DyvnTlHi.js} +1 -1
  162. package/dist/layers.DzDR_oG4.js +8 -0
  163. package/dist/{layers.Cf41PJM_.js → layers.DzghPRf3.js} +3813 -3230
  164. package/dist/{layers._pWN5IRm.js → layers.EXQpfQWq.js} +1 -1
  165. package/dist/{layers.y9K1nFwM.js → layers.FBzg3C04.js} +50 -50
  166. package/dist/{layers.DHXWA0Q_.js → layers.FlOgidCp.js} +1 -1
  167. package/dist/{layers.CyXyFV7h.js → layers.I85BW5o2.js} +1 -1
  168. package/dist/{layers.DYQ3Thdf.js → layers.IPxhkSfj.js} +1 -1
  169. package/dist/{layers.CPCRYtsi.js → layers.Lc29kAuz.js} +1 -1
  170. package/dist/{layers.DdfRdbPy.js → layers.MHEFRzDP.js} +5 -8
  171. package/dist/{layers.Cbgf19EI.js → layers.MNW-ShKu.js} +11 -14
  172. package/dist/{layers.CtKHNDRt.js → layers.Me9S-22r.js} +7 -10
  173. package/dist/{layers.u5kr3hHk.js → layers.Q-xFVVwC.js} +1 -1
  174. package/dist/layers.Qn6nodoY.js +2 -0
  175. package/dist/layers.R8mPlCA0.js +261 -0
  176. package/dist/{layers.BO4uJmfR.js → layers.RpoUh8kq.js} +1 -1
  177. package/dist/{layers.8ytQIYJn.js → layers.SsSYgMGG.js} +1 -1
  178. package/dist/{layers.BwTGqVnK.js → layers.V-9Fvifr.js} +1 -1
  179. package/dist/{layers.SlCB94vp.js → layers.W66NF2U9.js} +1 -1
  180. package/dist/{layers.CkH00BH2.js → layers.WwL-1p8w.js} +1 -1
  181. package/dist/{layers.CJc3FMhy.js → layers.X0J3BhYy.js} +4 -7
  182. package/dist/{layers.B9y931t5.js → layers.XS2AIvBG.js} +1 -1
  183. package/dist/{layers.CGId_znN.js → layers.XZft6Ook.js} +1 -1
  184. package/dist/{layers.BTZO4D1M.js → layers.adnwY8ML.js} +1 -1
  185. package/dist/layers.b9B2NY7n.js +11690 -0
  186. package/dist/{layers.7RM-Rgpr.js → layers.cf3uaysm.js} +1 -1
  187. package/dist/{layers.B2lIQaKn.js → layers.d9OooXQC.js} +1 -1
  188. package/dist/{layers.RDvNC_8V.js → layers.eNGl-u4H.js} +1 -1
  189. package/dist/{layers.SgNVpv0G.js → layers.eaKLR5Q2.js} +1 -1
  190. package/dist/{layers.BqssQgQi.js → layers.edPrT81i.js} +1 -1
  191. package/dist/{layers.C2gSNxMr.js → layers.ekCtLRbA.js} +1 -1
  192. package/dist/{layers.CiWApQBX.js → layers.fiMaf-_a.js} +3 -3
  193. package/dist/{layers.CnYkQAte.js → layers.gnAUWHV-.js} +1 -1
  194. package/dist/{layers.CnwMf9I0.js → layers.h4L4Mc41.js} +1 -1
  195. package/dist/{layers.C92eHUWa.js → layers.iyoop3cH.js} +3 -3
  196. package/dist/{layers.CrJ6Ln86.js → layers.jTaJiZzk.js} +1 -1
  197. package/dist/{layers.Dx6XWGBv.js → layers.jZvrWKJt.js} +1 -1
  198. package/dist/{layers.BNduWBRP.js → layers.l-ywSwa2.js} +1 -1
  199. package/dist/{layers.CuHedZYG.js → layers.lG7Mase1.js} +1 -1
  200. package/dist/{layers.B-9SWmBm.js → layers.mgh4Cwfx.js} +1 -1
  201. package/dist/{layers.ovBuAp5w.js → layers.mnoq184J.js} +1 -1
  202. package/dist/{layers.bHAHcDTt.js → layers.nFMauJSN.js} +1 -1
  203. package/dist/{layers.BuwjUr0U.js → layers.nNlLwZ_E.js} +1 -1
  204. package/dist/{layers.nVkvDfax.js → layers.oJ61CNkw.js} +1 -1
  205. package/dist/{layers.D3iO0BYj.js → layers.rzToPUAK.js} +1 -1
  206. package/dist/{layers.CdbUVvAx.js → layers.soJefnD3.js} +1 -1
  207. package/dist/{layers.mLGxc7Zs.js → layers.waYEJRmN.js} +1 -1
  208. package/dist/{layers.PUiCNtZG.js → layers.y0ia1Vp6.js} +1 -1
  209. package/dist/{layers.3URzBh7V.js → layers.zDfwTCmT.js} +1 -1
  210. package/package.json +1 -1
  211. package/dist/layers.BORw_DXM.js +0 -1
  212. package/dist/layers.BPXfA_Bi.js +0 -389
  213. package/dist/layers.Bn96IwAe.js +0 -96
  214. package/dist/layers.C5Ndiwef.js +0 -8
  215. package/dist/layers.C7XeME1v.js +0 -6
  216. package/dist/layers.C9iwVv2g.js +0 -1
  217. package/dist/layers.CCjwwvUf.js +0 -1
  218. package/dist/layers.CCsKL6P-.js +0 -1
  219. package/dist/layers.CTq-VHKd.js +0 -8
  220. package/dist/layers.D0BbR-kO.js +0 -76
  221. package/dist/layers.D1-NVvB4.js +0 -2
  222. package/dist/layers.D3ej58GE.js +0 -118
  223. package/dist/layers.D3kEalRl.js +0 -1
  224. package/dist/layers.DNR3bB9r.js +0 -2
  225. package/dist/layers.DVRVApG_.js +0 -22
  226. package/dist/layers.DzXJQPQT.js +0 -257
  227. package/dist/layers.GYLtRKCK.js +0 -1
  228. package/dist/layers.KJwFQi9T.js +0 -1
  229. package/dist/layers.RUMhBCMz.js +0 -1
  230. package/dist/layers.TF5UbhSz.js +0 -39287
  231. package/dist/layers.WIHPbs6I.js +0 -1225
  232. package/dist/layers.XvSvPUQo.js +0 -213
  233. package/dist/layers._fDrpnXx.js +0 -1
  234. package/dist/layers.fQ35NBL8.js +0 -271
@@ -1,8 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./layers.Bn96IwAe.js");require("./layers.BazhlVmO.js");require("lodash-es/memoize.js");require("lodash-es/merge.js");require("lodash-es/isEmpty.js");const pt=require("./layers.B19hGmey.js"),mt=require("./layers.BIeVwYKL.js");function rt(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s<a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s<u||s===void 0&&u>=u)&&(s=u)}return s}function ft(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s>a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function Z(t,n){let s=0;if(n===void 0)for(let a of t)(a=+a)&&(s+=a);else{let a=-1;for(let u of t)(u=+n(u,++a,t))&&(s+=u)}return s}function kt(t){return t.target.depth}function _t(t){return t.depth}function xt(t,n){return n-1-t.height}function yt(t,n){return t.sourceLinks.length?t.depth:n-1}function vt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?ft(t.sourceLinks,kt)-1:0}function G(t){return function(){return t}}function ot(t,n){return Y(t.source,n.source)||t.index-n.index}function lt(t,n){return Y(t.target,n.target)||t.index-n.index}function Y(t,n){return t.y0-n.y0}function J(t){return t.value}function bt(t){return t.index}function wt(t){return t.nodes}function St(t){return t.links}function at(t,n){const s=t.get(n);if(!s)throw new Error("missing: "+n);return s}function ct({nodes:t}){for(const n of t){let s=n.y0,a=s;for(const u of n.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of n.targetLinks)u.y1=a+u.width/2,a+=u.width}}function Lt(){let t=0,n=0,s=1,a=1,u=24,_=8,g,p=bt,i=yt,o,c,m=wt,b=St,y=6;function x(){const e={nodes:m.apply(null,arguments),links:b.apply(null,arguments)};return A(e),E(e),T(e),C(e),S(e),ct(e),e}x.update=function(e){return ct(e),e},x.nodeId=function(e){return arguments.length?(p=typeof e=="function"?e:G(e),x):p},x.nodeAlign=function(e){return arguments.length?(i=typeof e=="function"?e:G(e),x):i},x.nodeSort=function(e){return arguments.length?(o=e,x):o},x.nodeWidth=function(e){return arguments.length?(u=+e,x):u},x.nodePadding=function(e){return arguments.length?(_=g=+e,x):_},x.nodes=function(e){return arguments.length?(m=typeof e=="function"?e:G(e),x):m},x.links=function(e){return arguments.length?(b=typeof e=="function"?e:G(e),x):b},x.linkSort=function(e){return arguments.length?(c=e,x):c},x.size=function(e){return arguments.length?(t=n=0,s=+e[0],a=+e[1],x):[s-t,a-n]},x.extent=function(e){return arguments.length?(t=+e[0][0],s=+e[1][0],n=+e[0][1],a=+e[1][1],x):[[t,n],[s,a]]},x.iterations=function(e){return arguments.length?(y=+e,x):y};function A({nodes:e,links:f}){for(const[h,r]of e.entries())r.index=h,r.sourceLinks=[],r.targetLinks=[];const l=new Map(e.map((h,r)=>[p(h,r,e),h]));for(const[h,r]of f.entries()){r.index=h;let{source:k,target:v}=r;typeof k!="object"&&(k=r.source=at(l,k)),typeof v!="object"&&(v=r.target=at(l,v)),k.sourceLinks.push(r),v.targetLinks.push(r)}if(c!=null)for(const{sourceLinks:h,targetLinks:r}of e)h.sort(c),r.sort(c)}function E({nodes:e}){for(const f of e)f.value=f.fixedValue===void 0?Math.max(Z(f.sourceLinks,J),Z(f.targetLinks,J)):f.fixedValue}function T({nodes:e}){const f=e.length;let l=new Set(e),h=new Set,r=0;for(;l.size;){for(const k of l){k.depth=r;for(const{target:v}of k.sourceLinks)h.add(v)}if(++r>f)throw new Error("circular link");l=h,h=new Set}}function C({nodes:e}){const f=e.length;let l=new Set(e),h=new Set,r=0;for(;l.size;){for(const k of l){k.height=r;for(const{source:v}of k.targetLinks)h.add(v)}if(++r>f)throw new Error("circular link");l=h,h=new Set}}function O({nodes:e}){const f=rt(e,r=>r.depth)+1,l=(s-t-u)/(f-1),h=new Array(f);for(const r of e){const k=Math.max(0,Math.min(f-1,Math.floor(i.call(null,r,f))));r.layer=k,r.x0=t+k*l,r.x1=r.x0+u,h[k]?h[k].push(r):h[k]=[r]}if(o)for(const r of h)r.sort(o);return h}function j(e){const f=ft(e,l=>(a-n-(l.length-1)*g)/Z(l,J));for(const l of e){let h=n;for(const r of l){r.y0=h,r.y1=h+r.value*f,h=r.y1+g;for(const k of r.sourceLinks)k.width=k.value*f}h=(a-h+g)/(l.length+1);for(let r=0;r<l.length;++r){const k=l[r];k.y0+=h*(r+1),k.y1+=h*(r+1)}$(l)}}function S(e){const f=O(e);g=Math.min(_,(a-n)/(rt(f,l=>l.length)-1)),j(f);for(let l=0;l<y;++l){const h=Math.pow(.99,l),r=Math.max(1-h,(l+1)/y);D(f,h,r),N(f,h,r)}}function N(e,f,l){for(let h=1,r=e.length;h<r;++h){const k=e[h];for(const v of k){let R=0,z=0;for(const{source:W,value:K}of v.targetLinks){let F=K*(v.layer-W.layer);R+=M(W,v)*F,z+=F}if(!(z>0))continue;let U=(R/z-v.y0)*f;v.y0+=U,v.y1+=U,w(v)}o===void 0&&k.sort(Y),P(k,l)}}function D(e,f,l){for(let h=e.length,r=h-2;r>=0;--r){const k=e[r];for(const v of k){let R=0,z=0;for(const{target:W,value:K}of v.sourceLinks){let F=K*(W.layer-v.layer);R+=V(v,W)*F,z+=F}if(!(z>0))continue;let U=(R/z-v.y0)*f;v.y0+=U,v.y1+=U,w(v)}o===void 0&&k.sort(Y),P(k,l)}}function P(e,f){const l=e.length>>1,h=e[l];d(e,h.y0-g,l-1,f),I(e,h.y1+g,l+1,f),d(e,a,e.length-1,f),I(e,n,0,f)}function I(e,f,l,h){for(;l<e.length;++l){const r=e[l],k=(f-r.y0)*h;k>1e-6&&(r.y0+=k,r.y1+=k),f=r.y1+g}}function d(e,f,l,h){for(;l>=0;--l){const r=e[l],k=(r.y1-f)*h;k>1e-6&&(r.y0-=k,r.y1-=k),f=r.y0-g}}function w({sourceLinks:e,targetLinks:f}){if(c===void 0){for(const{source:{sourceLinks:l}}of f)l.sort(lt);for(const{target:{targetLinks:l}}of e)l.sort(ot)}}function $(e){if(c===void 0)for(const{sourceLinks:f,targetLinks:l}of e)f.sort(lt),l.sort(ot)}function M(e,f){let l=e.y0-(e.sourceLinks.length-1)*g/2;for(const{target:h,width:r}of e.sourceLinks){if(h===f)break;l+=r+g}for(const{source:h,width:r}of f.targetLinks){if(h===e)break;l-=r}return l}function V(e,f){let l=f.y0-(f.targetLinks.length-1)*g/2;for(const{source:h,width:r}of f.targetLinks){if(h===e)break;l+=r+g}for(const{target:h,width:r}of e.sourceLinks){if(h===f)break;l-=r}return l}return x}var tt=Math.PI,et=2*tt,B=1e-6,Et=et-B;function nt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function dt(){return new nt}nt.prototype=dt.prototype={constructor:nt,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,s,a){this._+="Q"+ +t+","+ +n+","+(this._x1=+s)+","+(this._y1=+a)},bezierCurveTo:function(t,n,s,a,u,_){this._+="C"+ +t+","+ +n+","+ +s+","+ +a+","+(this._x1=+u)+","+(this._y1=+_)},arcTo:function(t,n,s,a,u){t=+t,n=+n,s=+s,a=+a,u=+u;var _=this._x1,g=this._y1,p=s-t,i=a-n,o=_-t,c=g-n,m=o*o+c*c;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(m>B)if(!(Math.abs(c*p-i*o)>B)||!u)this._+="L"+(this._x1=t)+","+(this._y1=n);else{var b=s-_,y=a-g,x=p*p+i*i,A=b*b+y*y,E=Math.sqrt(x),T=Math.sqrt(m),C=u*Math.tan((tt-Math.acos((x+m-A)/(2*E*T)))/2),O=C/T,j=C/E;Math.abs(O-1)>B&&(this._+="L"+(t+O*o)+","+(n+O*c)),this._+="A"+u+","+u+",0,0,"+ +(c*b>o*y)+","+(this._x1=t+j*p)+","+(this._y1=n+j*i)}},arc:function(t,n,s,a,u,_){t=+t,n=+n,s=+s,_=!!_;var g=s*Math.cos(a),p=s*Math.sin(a),i=t+g,o=n+p,c=1^_,m=_?a-u:u-a;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+i+","+o:(Math.abs(this._x1-i)>B||Math.abs(this._y1-o)>B)&&(this._+="L"+i+","+o),s&&(m<0&&(m=m%et+et),m>Et?this._+="A"+s+","+s+",0,1,"+c+","+(t-g)+","+(n-p)+"A"+s+","+s+",0,1,"+c+","+(this._x1=i)+","+(this._y1=o):m>B&&(this._+="A"+s+","+s+",0,"+ +(m>=tt)+","+c+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=n+s*Math.sin(u))))},rect:function(t,n,s,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +s+"v"+ +a+"h"+-s+"Z"},toString:function(){return this._}};function ut(t){return function(){return t}}function At(t){return t[0]}function Tt(t){return t[1]}var Mt=Array.prototype.slice;function Nt(t){return t.source}function Ct(t){return t.target}function Pt(t){var n=Nt,s=Ct,a=At,u=Tt,_=null;function g(){var p,i=Mt.call(arguments),o=n.apply(this,i),c=s.apply(this,i);if(_||(_=p=dt()),t(_,+a.apply(this,(i[0]=o,i)),+u.apply(this,i),+a.apply(this,(i[0]=c,i)),+u.apply(this,i)),p)return _=null,p+""||null}return g.source=function(p){return arguments.length?(n=p,g):n},g.target=function(p){return arguments.length?(s=p,g):s},g.x=function(p){return arguments.length?(a=typeof p=="function"?p:ut(+p),g):a},g.y=function(p){return arguments.length?(u=typeof p=="function"?p:ut(+p),g):u},g.context=function(p){return arguments.length?(_=p??null,g):_},g}function It(t,n,s,a,u){t.moveTo(n,s),t.bezierCurveTo(n=(n+a)/2,s,n,u,a,u)}function Ot(){return Pt(It)}function $t(t){return[t.source.x1,t.y0]}function Dt(t){return[t.target.x0,t.y1]}function jt(){return Ot().source($t).target(Dt)}var it=(function(){var t=function(p,i,o,c){for(o=o||{},c=p.length;c--;o[p[c]]=i);return o},n=[1,9],s=[1,10],a=[1,5,10,12],u={trace:function(){},yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:function(i,o,c,m,b,y,x){var A=y.length-1;switch(b){case 7:const E=m.findOrCreateNode(y[A-4].trim().replaceAll('""','"')),T=m.findOrCreateNode(y[A-2].trim().replaceAll('""','"')),C=parseFloat(y[A].trim());m.addLink(E,T,C);break;case 8:case 9:case 11:this.$=y[A];break;case 10:this.$=y[A-1];break}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:s},{15:18,16:7,17:8,18:n,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:n,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:function(i,o){if(o.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=o,c}},parse:function(i){var o=this,c=[0],m=[],b=[null],y=[],x=this.table,A="",E=0,T=0,C=2,O=1,j=y.slice.call(arguments,1),S=Object.create(this.lexer),N={yy:{}};for(var D in this.yy)Object.prototype.hasOwnProperty.call(this.yy,D)&&(N.yy[D]=this.yy[D]);S.setInput(i,N.yy),N.yy.lexer=S,N.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var P=S.yylloc;y.push(P);var I=S.options&&S.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function d(){var v;return v=m.pop()||S.lex()||O,typeof v!="number"&&(v instanceof Array&&(m=v,v=m.pop()),v=o.symbols_[v]||v),v}for(var w,$,M,V,e={},f,l,h,r;;){if($=c[c.length-1],this.defaultActions[$]?M=this.defaultActions[$]:((w===null||typeof w>"u")&&(w=d()),M=x[$]&&x[$][w]),typeof M>"u"||!M.length||!M[0]){var k="";r=[];for(f in x[$])this.terminals_[f]&&f>C&&r.push("'"+this.terminals_[f]+"'");S.showPosition?k="Parse error on line "+(E+1)+`:
2
- `+S.showPosition()+`
3
- Expecting `+r.join(", ")+", got '"+(this.terminals_[w]||w)+"'":k="Parse error on line "+(E+1)+": Unexpected "+(w==O?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(k,{text:S.match,token:this.terminals_[w]||w,line:S.yylineno,loc:P,expected:r})}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+w);switch(M[0]){case 1:c.push(w),b.push(S.yytext),y.push(S.yylloc),c.push(M[1]),w=null,T=S.yyleng,A=S.yytext,E=S.yylineno,P=S.yylloc;break;case 2:if(l=this.productions_[M[1]][1],e.$=b[b.length-l],e._$={first_line:y[y.length-(l||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(l||1)].first_column,last_column:y[y.length-1].last_column},I&&(e._$.range=[y[y.length-(l||1)].range[0],y[y.length-1].range[1]]),V=this.performAction.apply(e,[A,T,E,N.yy,M[1],b,y].concat(j)),typeof V<"u")return V;l&&(c=c.slice(0,-1*l*2),b=b.slice(0,-1*l),y=y.slice(0,-1*l)),c.push(this.productions_[M[1]][0]),b.push(e.$),y.push(e._$),h=x[c[c.length-2]][c[c.length-1]],c.push(h);break;case 3:return!0}}return!0}},_=(function(){var p={EOF:1,parseError:function(o,c){if(this.yy.parser)this.yy.parser.parseError(o,c);else throw new Error(o)},setInput:function(i,o){return this.yy=o||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 o=i.match(/(?:\r\n?|\n).*/g);return o?(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 o=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var m=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 b=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===m.length?this.yylloc.first_column:0)+m[m.length-c.length].length-c[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-o]),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
- `+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(),o=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
5
- `+o+"^"},test_match:function(i,o){var c,m,b;if(this.options.backtrack_lexer&&(b={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(b.yylloc.range=this.yylloc.range.slice(0))),m=i[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],c=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var y in b)this[y]=b[y];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,o,c,m;this._more||(this.yytext="",this.match="");for(var b=this._currentRules(),y=0;y<b.length;y++)if(c=this._input.match(this.rules[b[y]]),c&&(!o||c[0].length>o[0].length)){if(o=c,m=y,this.options.backtrack_lexer){if(i=this.test_match(c,b[y]),i!==!1)return i;if(this._backtrack){o=!1;continue}else return!1}else if(!this.options.flex)break}return o?(i=this.test_match(o,b[m]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var o=this.next();return o||this.lex()},begin:function(o){this.conditionStack.push(o)},popState:function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},pushState:function(o){this.begin(o)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(o,c,m,b){switch(m){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}},rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return p})();u.lexer=_;function g(){this.yy={}}return g.prototype=u,u.Parser=g,new g})();it.parser=it;const H=it;let X=[],Q=[],q={};const zt=()=>{X=[],Q=[],q={},L.clear()};class Bt{constructor(n,s,a=0){this.source=n,this.target=s,this.value=a}}const qt=(t,n,s)=>{X.push(new Bt(t,n,s))};class Vt{constructor(n){this.ID=n}}const Rt=t=>(t=L.common$1.sanitizeText(t,L.getConfig()),q[t]||(q[t]=new Vt(t),Q.push(q[t])),q[t]),Ut=()=>Q,Wt=()=>X,Ft=()=>({nodes:Q.map(t=>({id:t.ID})),links:X.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),Gt={nodesMap:q,getConfig:()=>L.getConfig().sankey,getNodes:Ut,getLinks:Wt,getGraph:Ft,addLink:qt,findOrCreateNode:Rt,getAccTitle:L.getAccTitle,setAccTitle:L.setAccTitle,getAccDescription:L.getAccDescription,setAccDescription:L.setAccDescription,getDiagramTitle:L.getDiagramTitle,setDiagramTitle:L.setDiagramTitle,clear:zt},gt=class st{static next(n){return new st(n+ ++st.count)}constructor(n){this.id=n,this.href=`#${n}`}toString(){return"url("+this.href+")"}};gt.count=0;let ht=gt;const Yt={left:_t,right:xt,center:vt,justify:yt},Ht=function(t,n,s,a){const{securityLevel:u,sankey:_}=L.getConfig(),g=L.defaultConfig.sankey;let p;u==="sandbox"&&(p=L.select("#i"+n));const i=u==="sandbox"?L.select(p.nodes()[0].contentDocument.body):L.select("body"),o=u==="sandbox"?i.select(`[id="${n}"]`):L.select(`[id="${n}"]`),c=(_==null?void 0:_.width)??g.width,m=(_==null?void 0:_.height)??g.width,b=(_==null?void 0:_.useMaxWidth)??g.useMaxWidth,y=(_==null?void 0:_.nodeAlignment)??g.nodeAlignment,x=(_==null?void 0:_.prefix)??g.prefix,A=(_==null?void 0:_.suffix)??g.suffix,E=(_==null?void 0:_.showValues)??g.showValues,T=a.db.getGraph(),C=Yt[y];Lt().nodeId(d=>d.id).nodeWidth(10).nodePadding(10+(E?15:0)).nodeAlign(C).extent([[0,0],[c,m]])(T);const S=pt.ordinal(mt.schemeTableau10);o.append("g").attr("class","nodes").selectAll(".node").data(T.nodes).join("g").attr("class","node").attr("id",d=>(d.uid=ht.next("node-")).id).attr("transform",function(d){return"translate("+d.x0+","+d.y0+")"}).attr("x",d=>d.x0).attr("y",d=>d.y0).append("rect").attr("height",d=>d.y1-d.y0).attr("width",d=>d.x1-d.x0).attr("fill",d=>S(d.id));const N=({id:d,value:w})=>E?`${d}
7
- ${x}${Math.round(w*100)/100}${A}`:d;o.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(T.nodes).join("text").attr("x",d=>d.x0<c/2?d.x1+6:d.x0-6).attr("y",d=>(d.y1+d.y0)/2).attr("dy",`${E?"0":"0.35"}em`).attr("text-anchor",d=>d.x0<c/2?"start":"end").text(N);const D=o.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(T.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),P=(_==null?void 0:_.linkColor)||"gradient";if(P==="gradient"){const d=D.append("linearGradient").attr("id",w=>(w.uid=ht.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",w=>w.source.x1).attr("x2",w=>w.target.x0);d.append("stop").attr("offset","0%").attr("stop-color",w=>S(w.source.id)),d.append("stop").attr("offset","100%").attr("stop-color",w=>S(w.target.id))}let I;switch(P){case"gradient":I=d=>d.uid;break;case"source":I=d=>S(d.source.id);break;case"target":I=d=>S(d.target.id);break;default:I=P}D.append("path").attr("d",jt()).attr("stroke",I).attr("stroke-width",d=>Math.max(1,d.width)),L.setupGraphViewbox$1(void 0,o,0,b)},Xt={draw:Ht},Qt=t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
8
- `).trim(),Kt=H.parse.bind(H);H.parse=t=>Kt(Qt(t));const Zt={parser:H,db:Gt,renderer:Xt};exports.diagram=Zt;
@@ -1,6 +0,0 @@
1
- import { e as o, j as s, o as f } from "./layers.D2f2ApIk.js";
2
- export {
3
- o as default,
4
- s as en,
5
- f as kaa
6
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),t=require("react"),p=require("@lexical/react/LexicalComposerContext"),C=require("lexical"),l=require("./layers.BPXfA_Bi.js"),u=require("./layers.BDD1KfeR.js"),f=C.createCommand("INSERT_EXCALIDRAW_COMMAND");function A(){const[s]=p.useLexicalComposerContext(),[x,n]=t.useState(!1),[e,E]=t.useState(null),r=t.useRef(null),[M,i]=t.useState(!1);t.useEffect(()=>{if(!s.hasNodes([l.ExcalidrawNode]))throw new Error("ExcalidrawPlugin: ExcalidrawNode not registered on editor");return s.registerCommand(f,()=>{n(!0);const a=l.getCurrentElement();return E(a),!0},C.COMMAND_PRIORITY_EDITOR)},[s]);const c=()=>{n(!1),i(!1),r.current=!1},m=()=>{r.current?i(!0):c()},O=()=>{n(!1)},N=(a,S,R,g)=>{s.update(()=>{const d=l.$createExcalidrawNode();d.setData(JSON.stringify({appState:S,elements:a,files:R,previewSVG:g})),e&&e.getParent()&&(e==null||e.replace(d))}),n(!1)};return o.jsxs(o.Fragment,{children:[o.jsx(u.ConfirmModal,{isCloseModal:M,confirmClose:c,setCloseModalOpen:i}),o.jsx(u.ExcalidrawModal,{initialElements:[],initialAppState:{},initialFiles:{},isShown:x,onDelete:O,onClose:m,onSave:N,closeOnClickOutside:!1,isEdited:r})]})}exports.INSERT_EXCALIDRAW_COMMAND=f;exports.default=A;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),B=require("@lexical/react/LexicalComposerContext"),P=require("@lexical/react/useLexicalEditable"),Y=require("@lexical/react/useLexicalNodeSelection"),W=require("@lexical/utils"),a=require("lexical"),c=require("./layers.BPXfA_Bi.js"),v=require("./layers.BDD1KfeR.js"),F=require("react-i18next"),C=require("@mantine/core"),G=require("@tabler/icons-react");function H({imageContainerRef:n,editor:u,rootClassName:S=null,width:N="inherit",height:h="inherit",nodeKey:e,alignment:E,setModalOpen:d,previewSVG:M}){const O=i.useMemo(()=>M??"",[M]),[f,j]=i.useState(!1),{t:x}=F.useTranslation(),b=(r,m)=>{u.update(()=>{a.$setSelection(null);const g=a.$getNodeByKey(e);return c.$isExcalidrawNode(g)&&g.setWidthAndHeight(r,m),!0})},I=()=>{c.deleteNode(u,e)};return s.jsx(c.ResizableContainer,{editor:u,isIcon:!1,isEmbed:!0,width:c.parseContainerSize(N),height:c.parseContainerSize(h),onResizeEnd:b,alignment:E,children:s.jsxs(C.Box,{className:"media-wrapper excaildraw",children:[s.jsxs("div",{className:"media-actions",children:[s.jsx(C.Tooltip,{label:x("editor.link.edit"),children:s.jsx(C.ActionIcon,{color:"gray","aria-label":"Settings",className:"media-action",variant:"default",size:24,onClick:()=>{d(!0)},children:s.jsx(G.IconEdit,{size:14})})}),s.jsx(c.AlignmentImage,{opened:f,setOpened:j,t:x,editor:u,nodeKey:e}),s.jsx(C.Tooltip,{label:x("editor.actions.delete"),children:s.jsx(C.ActionIcon,{color:"gray","aria-label":"Settings",className:"media-action",variant:"default",size:24,onClick:I,children:s.jsx(c.Icon,{name:"trash",size:"14"})})})]}),s.jsx(C.Box,{w:"100%",ref:r=>{r&&n&&(n.current=r)},className:S??"",dangerouslySetInnerHTML:{__html:O}})]})})}function V({nodeKey:n,data:u,width:S,height:N,alignment:h}){var q;const[e]=B.useLexicalComposerContext(),E=P.useLexicalEditable(),d=i.useMemo(()=>v.parseExcalidrawData(u),[u]),M=((q=d==null?void 0:d.elements)==null?void 0:q.length)===0&&!d.previewSVG,[O,f]=i.useState(M&&e.isEditable()),[j,x]=i.useState(!1),b=i.useRef(null),I=i.useRef(null),r=i.useRef(null),[m,g,R]=Y.useLexicalNodeSelection(n),w=i.useCallback(t=>(m&&(t.preventDefault(),e.update(()=>{const o=a.$getNodeByKey(n);o&&o.remove()})),!1),[e,m,n]);i.useEffect(()=>{if(!E){m&&R();return}return W.mergeRegister(e.registerCommand(a.CLICK_COMMAND,t=>{const o=I.current,p=t.target;return o!==null&&o.contains(p)?(t.shiftKey||R(),g(!m),t.detail>1&&f(!0),!0):!1},a.COMMAND_PRIORITY_LOW),e.registerCommand(a.KEY_DELETE_COMMAND,w,a.COMMAND_PRIORITY_LOW),e.registerCommand(a.KEY_BACKSPACE_COMMAND,w,a.COMMAND_PRIORITY_LOW))},[R,e,m,w,g,E]);const y=i.useCallback(()=>(f(!1),e.update(()=>{const t=a.$getNodeByKey(n);t&&t.remove()})),[e,n]),L=(t,o,p,A)=>e.update(()=>{const D=a.$getNodeByKey(n);c.$isExcalidrawNode(D)&&(t&&t.length>0||Object.keys(p).length>0?D.setData(JSON.stringify({appState:o,elements:t,files:p,previewSVG:A})):D.remove())}),{elements:l=[],files:k={},appState:T={},previewSVG:$}=d,_=i.useCallback(()=>{f(!1),x(!1),r.current=!1,(l==null?void 0:l.length)===0&&e.update(()=>{const t=a.$getNodeByKey(n);t&&t.remove()})},[e,n,l==null?void 0:l.length]),z=i.useCallback(()=>{r.current?x(!0):_()},[]);return s.jsxs(s.Fragment,{children:[s.jsx(v.ConfirmModal,{isCloseModal:j,confirmClose:_,setCloseModalOpen:x}),s.jsx(v.ExcalidrawModal,{initialElements:l,isEdited:r,initialFiles:k,initialAppState:T,isShown:O,onDelete:y,onClose:z,onSave:(t,o,p,A)=>{L(t,o,p,A),f(!1)},closeOnClickOutside:!1}),(l==null?void 0:l.length)&&s.jsx("div",{style:{display:"flex",justifyContent:h},children:s.jsx(H,{imageContainerRef:b,className:"image",width:S,height:N,editor:e,nodeKey:n,alignment:h,setModalOpen:f,previewSVG:$})})]})}exports.default=V;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./layers.PUiCNtZG.js"),o=require("./layers.bHAHcDTt.js"),t=require("./layers.Bn96IwAe.js");require("lodash-es");require("./layers.BLd2spTm.js");require("./layers.Cyzu9PKQ.js");require("./layers.BazhlVmO.js");require("lodash-es/memoize.js");require("lodash-es/merge.js");require("lodash-es/isEmpty.js");const a={parser:e.parser$1,db:e.flowDb,renderer:o.flowRendererV2,styles:o.flowStyles,init:r=>{r.flowchart||(r.flowchart={}),r.flowchart.arrowMarkerAbsolute=r.arrowMarkerAbsolute,t.setConfig({flowchart:{arrowMarkerAbsolute:r.arrowMarkerAbsolute}}),o.flowRendererV2.setConf(r.flowchart),e.flowDb.clear(),e.flowDb.setGen("gen-2")}};exports.diagram=a;
@@ -1,8 +0,0 @@
1
- import { C as e, Q as t, N as m, A as r } from "./layers.2nKKnihc.js";
2
- import "./layers.D2f2ApIk.js";
3
- export {
4
- e as Commands,
5
- t as subsetToBase64,
6
- m as subsetToBinary,
7
- r as toBase64
8
- };
@@ -1,76 +0,0 @@
1
- import { jsxs as p, Fragment as M, jsx as c } from "react/jsx-runtime";
2
- import { useState as n, useRef as x, useEffect as O } from "react";
3
- import { useLexicalComposerContext as N } from "@lexical/react/LexicalComposerContext";
4
- import { createCommand as g, COMMAND_PRIORITY_EDITOR as w } from "lexical";
5
- import { c as D, g as S, d as A } from "./layers.TF5UbhSz.js";
6
- import { C as R, E as I } from "./layers.BJzTny2j.js";
7
- const _ = g(
8
- "INSERT_EXCALIDRAW_COMMAND"
9
- );
10
- function k() {
11
- const [o] = N(), [d, t] = n(!1), [e, f] = n(
12
- null
13
- ), s = x(null), [m, a] = n(!1);
14
- O(() => {
15
- if (!o.hasNodes([D]))
16
- throw new Error(
17
- "ExcalidrawPlugin: ExcalidrawNode not registered on editor"
18
- );
19
- return o.registerCommand(
20
- _,
21
- () => {
22
- t(!0);
23
- const r = S();
24
- return f(r), !0;
25
- },
26
- w
27
- );
28
- }, [o]);
29
- const l = () => {
30
- t(!1), a(!1), s.current = !1;
31
- };
32
- return /* @__PURE__ */ p(M, { children: [
33
- /* @__PURE__ */ c(
34
- R,
35
- {
36
- isCloseModal: m,
37
- confirmClose: l,
38
- setCloseModalOpen: a
39
- }
40
- ),
41
- /* @__PURE__ */ c(
42
- I,
43
- {
44
- initialElements: [],
45
- initialAppState: {},
46
- initialFiles: {},
47
- isShown: d,
48
- onDelete: () => {
49
- t(!1);
50
- },
51
- onClose: () => {
52
- s.current ? a(!0) : l();
53
- },
54
- onSave: (r, u, C, E) => {
55
- o.update(() => {
56
- const i = A();
57
- i.setData(
58
- JSON.stringify({
59
- appState: u,
60
- elements: r,
61
- files: C,
62
- previewSVG: E
63
- })
64
- ), e && e.getParent() && (e == null || e.replace(i));
65
- }), t(!1);
66
- },
67
- closeOnClickOutside: !1,
68
- isEdited: s
69
- }
70
- )
71
- ] });
72
- }
73
- export {
74
- _ as INSERT_EXCALIDRAW_COMMAND,
75
- k as default
76
- };
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./layers.C7SPnzuD.js"),t=require("./layers.Bn96IwAe.js"),_=require("./layers.BLd2spTm.js"),N=require("./layers.Cnqb7wKB.js");require("./layers.BazhlVmO.js");require("lodash-es/memoize.js");require("lodash-es/merge.js");require("lodash-es/isEmpty.js");require("lodash-es");require("./layers.Cyzu9PKQ.js");const k=s=>t.common$1.sanitizeText(s,t.getConfig());let w={dividerMargin:10,padding:5,textHeight:10,curve:void 0};const q=function(s,o,f,i){const e=Object.keys(s);t.log$1.info("keys:",e),t.log$1.info(s),e.forEach(function(r){var l,c;const n=s[r],d={shape:"rect",id:n.id,domId:n.domId,labelText:k(n.id),labelStyle:"",style:"fill: none; stroke: black",padding:((l=t.getConfig().flowchart)==null?void 0:l.padding)??((c=t.getConfig().class)==null?void 0:c.padding)};o.setNode(n.id,d),$(n.classes,o,f,i,n.id),t.log$1.info("setNode",d)})},$=function(s,o,f,i,e){const r=Object.keys(s);t.log$1.info("keys:",r),t.log$1.info(s),r.filter(l=>s[l].parent==e).forEach(function(l){var c,n;const a=s[l],d=a.cssClasses.join(" "),g=t.getStylesFromArray(a.styles),p=a.label??a.id,y=0,u={labelStyle:g.labelStyle,shape:"class_box",labelText:k(p),classData:a,rx:y,ry:y,class:d,style:g.style,id:a.id,domId:a.domId,tooltip:i.db.getTooltip(a.id,e)||"",haveCallback:a.haveCallback,link:a.link,width:a.type==="group"?500:void 0,type:a.type,padding:((c=t.getConfig().flowchart)==null?void 0:c.padding)??((n=t.getConfig().class)==null?void 0:n.padding)};o.setNode(a.id,u),e&&o.setParent(a.id,e),t.log$1.info("setNode",u)})},D=function(s,o,f,i){t.log$1.info(s),s.forEach(function(e,r){var l,c;const n=e,a="",d={labelStyle:"",style:""},g=n.text,p=0,b={labelStyle:d.labelStyle,shape:"note",labelText:k(g),noteData:n,rx:p,ry:p,class:a,style:d.style,id:n.id,domId:n.id,tooltip:"",type:"note",padding:((l=t.getConfig().flowchart)==null?void 0:l.padding)??((c=t.getConfig().class)==null?void 0:c.padding)};if(o.setNode(n.id,b),t.log$1.info("setNode",b),!n.class||!(n.class in i))return;const u=f+r,x={id:`edgeNote${u}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:t.interpolateToCurve(w.curve,t.curveLinear)};o.setEdge(n.id,n.class,x,u)})},E=function(s,o){const f=t.getConfig().flowchart;let i=0;s.forEach(function(e){var r;i++;const l={classes:"relation",pattern:e.relation.lineType==1?"dashed":"solid",id:`id_${e.id1}_${e.id2}_${i}`,arrowhead:e.type==="arrow_open"?"none":"normal",startLabelRight:e.relationTitle1==="none"?"":e.relationTitle1,endLabelLeft:e.relationTitle2==="none"?"":e.relationTitle2,arrowTypeStart:C(e.relation.type1),arrowTypeEnd:C(e.relation.type2),style:"fill:none",labelStyle:"",curve:t.interpolateToCurve(f==null?void 0:f.curve,t.curveLinear)};if(t.log$1.info(l,e),e.style!==void 0){const c=t.getStylesFromArray(e.style);l.style=c.style,l.labelStyle=c.labelStyle}e.text=e.title,e.text===void 0?e.style!==void 0&&(l.arrowheadStyle="fill: #333"):(l.arrowheadStyle="fill: #333",l.labelpos="c",((r=t.getConfig().flowchart)==null?void 0:r.htmlLabels)??t.getConfig().htmlLabels?(l.labelType="html",l.label='<span class="edgeLabel">'+e.text+"</span>"):(l.labelType="text",l.label=e.text.replace(t.common$1.lineBreakRegex,`
2
- `),e.style===void 0&&(l.style=l.style||"stroke: #333; stroke-width: 1.5px;fill:none"),l.labelStyle=l.labelStyle.replace("color:","fill:"))),o.setEdge(e.id1,e.id2,l,i)})},A=function(s){w={...w,...s}},M=async function(s,o,f,i){t.log$1.info("Drawing class - ",o);const e=t.getConfig().flowchart??t.getConfig().class,r=t.getConfig().securityLevel;t.log$1.info("config:",e);const l=(e==null?void 0:e.nodeSpacing)??50,c=(e==null?void 0:e.rankSpacing)??50,n=new _.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:i.db.getDirection(),nodesep:l,ranksep:c,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),a=i.db.getNamespaces(),d=i.db.getClasses(),g=i.db.getRelations(),p=i.db.getNotes();t.log$1.info(g),q(a,n,o,i),$(d,n,o,i),E(g,n),D(p,n,g.length+1,d);let y;r==="sandbox"&&(y=t.select("#i"+o));const b=r==="sandbox"?t.select(y.nodes()[0].contentDocument.body):t.select("body"),u=b.select(`[id="${o}"]`),x=b.select("#"+o+" g");if(await N.render(x,n,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",o),t.utils.insertTitle(u,"classTitleText",(e==null?void 0:e.titleTopMargin)??5,i.db.getDiagramTitle()),t.setupGraphViewbox$1(n,u,e==null?void 0:e.diagramPadding,e==null?void 0:e.useMaxWidth),!(e!=null&&e.htmlLabels)){const S=r==="sandbox"?y.nodes()[0].contentDocument:document,L=S.querySelectorAll('[id="'+o+'"] .edgeLabel .label');for(const m of L){const T=m.getBBox(),h=S.createElementNS("http://www.w3.org/2000/svg","rect");h.setAttribute("rx",0),h.setAttribute("ry",0),h.setAttribute("width",T.width),h.setAttribute("height",T.height),m.insertBefore(h,m.firstChild)}}};function C(s){let o;switch(s){case 0:o="aggregation";break;case 1:o="extension";break;case 2:o="composition";break;case 3:o="dependency";break;case 4:o="lollipop";break;default:o="none"}return o}const I={setConf:A,draw:M},B={parser:v.parser$1,db:v.db,renderer:I,styles:v.styles,init:s=>{s.class||(s.class={}),s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,v.db.clear()}};exports.diagram=B;
@@ -1,118 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./layers.Bn96IwAe.js"),Le=require("lodash-es/clone.js"),Y=require("./layers.8ytQIYJn.js"),_e=require("./layers.BLd2spTm.js");require("./layers.BazhlVmO.js");require("lodash-es/memoize.js");require("lodash-es/merge.js");require("lodash-es/isEmpty.js");const me=require("./layers.KJwFQi9T.js"),ye=require("./layers.B19hGmey.js"),Ee=require("./layers.BIeVwYKL.js");var ae,le,ee=(function(){var e=function(D,o,s,i){for(s=s||{},i=D.length;i--;s[D[i]]=o);return s},a=[1,7],d=[1,13],c=[1,14],n=[1,15],g=[1,19],l=[1,16],b=[1,17],x=[1,18],p=[8,30],S=[8,21,28,29,30,31,32,40,44,47],y=[1,23],O=[1,24],v=[8,15,16,21,28,29,30,31,32,40,44,47],N=[8,15,16,21,27,28,29,30,31,32,40,44,47],E=[1,49],L={trace:function(){},yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:function(o,s,i,u,h,t,_){var r=t.length-1;switch(h){case 4:u.getLogger().debug("Rule: separator (NL) ");break;case 5:u.getLogger().debug("Rule: separator (Space) ");break;case 6:u.getLogger().debug("Rule: separator (EOF) ");break;case 7:u.getLogger().debug("Rule: hierarchy: ",t[r-1]),u.setHierarchy(t[r-1]);break;case 8:u.getLogger().debug("Stop NL ");break;case 9:u.getLogger().debug("Stop EOF ");break;case 10:u.getLogger().debug("Stop NL2 ");break;case 11:u.getLogger().debug("Stop EOF2 ");break;case 12:u.getLogger().debug("Rule: statement: ",t[r]),typeof t[r].length=="number"?this.$=t[r]:this.$=[t[r]];break;case 13:u.getLogger().debug("Rule: statement #2: ",t[r-1]),this.$=[t[r-1]].concat(t[r]);break;case 14:u.getLogger().debug("Rule: link: ",t[r],o),this.$={edgeTypeStr:t[r],label:""};break;case 15:u.getLogger().debug("Rule: LABEL link: ",t[r-3],t[r-1],t[r]),this.$={edgeTypeStr:t[r],label:t[r-1]};break;case 18:const R=parseInt(t[r]),W=u.generateId();this.$={id:W,type:"space",label:"",width:R,children:[]};break;case 23:u.getLogger().debug("Rule: (nodeStatement link node) ",t[r-2],t[r-1],t[r]," typestr: ",t[r-1].edgeTypeStr);const F=u.edgeStrToEdgeData(t[r-1].edgeTypeStr);this.$=[{id:t[r-2].id,label:t[r-2].label,type:t[r-2].type,directions:t[r-2].directions},{id:t[r-2].id+"-"+t[r].id,start:t[r-2].id,end:t[r].id,label:t[r-1].label,type:"edge",directions:t[r].directions,arrowTypeEnd:F,arrowTypeStart:"arrow_open"},{id:t[r].id,label:t[r].label,type:u.typeStr2Type(t[r].typeStr),directions:t[r].directions}];break;case 24:u.getLogger().debug("Rule: nodeStatement (abc88 node size) ",t[r-1],t[r]),this.$={id:t[r-1].id,label:t[r-1].label,type:u.typeStr2Type(t[r-1].typeStr),directions:t[r-1].directions,widthInColumns:parseInt(t[r],10)};break;case 25:u.getLogger().debug("Rule: nodeStatement (node) ",t[r]),this.$={id:t[r].id,label:t[r].label,type:u.typeStr2Type(t[r].typeStr),directions:t[r].directions,widthInColumns:1};break;case 26:u.getLogger().debug("APA123",this?this:"na"),u.getLogger().debug("COLUMNS: ",t[r]),this.$={type:"column-setting",columns:t[r]==="auto"?-1:parseInt(t[r])};break;case 27:u.getLogger().debug("Rule: id-block statement : ",t[r-2],t[r-1]),u.generateId(),this.$={...t[r-2],type:"composite",children:t[r-1]};break;case 28:u.getLogger().debug("Rule: blockStatement : ",t[r-2],t[r-1],t[r]);const C=u.generateId();this.$={id:C,type:"composite",label:"",children:t[r-1]};break;case 29:u.getLogger().debug("Rule: node (NODE_ID separator): ",t[r]),this.$={id:t[r]};break;case 30:u.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",t[r-1],t[r]),this.$={id:t[r-1],label:t[r].label,typeStr:t[r].typeStr,directions:t[r].directions};break;case 31:u.getLogger().debug("Rule: dirList: ",t[r]),this.$=[t[r]];break;case 32:u.getLogger().debug("Rule: dirList: ",t[r-1],t[r]),this.$=[t[r-1]].concat(t[r]);break;case 33:u.getLogger().debug("Rule: nodeShapeNLabel: ",t[r-2],t[r-1],t[r]),this.$={typeStr:t[r-2]+t[r],label:t[r-1]};break;case 34:u.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",t[r-3],t[r-2]," #3:",t[r-1],t[r]),this.$={typeStr:t[r-3]+t[r],label:t[r-2],directions:t[r-1]};break;case 35:case 36:this.$={type:"classDef",id:t[r-1].trim(),css:t[r].trim()};break;case 37:this.$={type:"applyClass",id:t[r-1].trim(),styleClass:t[r].trim()};break;case 38:this.$={type:"applyStyles",id:t[r-1].trim(),stylesStr:t[r].trim()};break}},table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:d,29:c,31:n,32:g,40:l,44:b,47:x},{8:[1,20]},e(p,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:a,28:d,29:c,31:n,32:g,40:l,44:b,47:x}),e(S,[2,16],{14:22,15:y,16:O}),e(S,[2,17]),e(S,[2,18]),e(S,[2,19]),e(S,[2,20]),e(S,[2,21]),e(S,[2,22]),e(v,[2,25],{27:[1,25]}),e(S,[2,26]),{19:26,26:12,32:g},{11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:d,29:c,31:n,32:g,40:l,44:b,47:x},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(N,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(p,[2,13]),{26:35,32:g},{32:[2,14]},{17:[1,36]},e(v,[2,24]),{11:37,13:4,14:22,15:y,16:O,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:d,29:c,31:n,32:g,40:l,44:b,47:x},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},e(N,[2,30]),{18:[1,43]},{18:[1,44]},e(v,[2,23]),{18:[1,45]},{30:[1,46]},e(S,[2,28]),e(S,[2,35]),e(S,[2,36]),e(S,[2,37]),e(S,[2,38]),{37:[1,47]},{34:48,35:E},{15:[1,50]},e(S,[2,27]),e(N,[2,33]),{39:[1,51]},{34:52,35:E,39:[2,31]},{32:[2,15]},e(N,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:function(o,s){if(s.recoverable)this.trace(o);else{var i=new Error(o);throw i.hash=s,i}},parse:function(o){var s=this,i=[0],u=[],h=[null],t=[],_=this.table,r="",R=0,W=0,F=2,C=1,be=t.slice.call(arguments,1),w=Object.create(this.lexer),K={yy:{}};for(var Z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Z)&&(K.yy[Z]=this.yy[Z]);w.setInput(o,K.yy),K.yy.lexer=w,K.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var J=w.yylloc;t.push(J);var xe=w.options&&w.options.ranges;typeof K.yy.parseError=="function"?this.parseError=K.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Se(){var P;return P=u.pop()||w.lex()||C,typeof P!="number"&&(P instanceof Array&&(u=P,P=u.pop()),P=s.symbols_[P]||P),P}for(var T,M,z,Q,j={},X,B,ne,G;;){if(M=i[i.length-1],this.defaultActions[M]?z=this.defaultActions[M]:((T===null||typeof T>"u")&&(T=Se()),z=_[M]&&_[M][T]),typeof z>"u"||!z.length||!z[0]){var $="";G=[];for(X in _[M])this.terminals_[X]&&X>F&&G.push("'"+this.terminals_[X]+"'");w.showPosition?$="Parse error on line "+(R+1)+`:
2
- `+w.showPosition()+`
3
- Expecting `+G.join(", ")+", got '"+(this.terminals_[T]||T)+"'":$="Parse error on line "+(R+1)+": Unexpected "+(T==C?"end of input":"'"+(this.terminals_[T]||T)+"'"),this.parseError($,{text:w.match,token:this.terminals_[T]||T,line:w.yylineno,loc:J,expected:G})}if(z[0]instanceof Array&&z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+M+", token: "+T);switch(z[0]){case 1:i.push(T),h.push(w.yytext),t.push(w.yylloc),i.push(z[1]),T=null,W=w.yyleng,r=w.yytext,R=w.yylineno,J=w.yylloc;break;case 2:if(B=this.productions_[z[1]][1],j.$=h[h.length-B],j._$={first_line:t[t.length-(B||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(B||1)].first_column,last_column:t[t.length-1].last_column},xe&&(j._$.range=[t[t.length-(B||1)].range[0],t[t.length-1].range[1]]),Q=this.performAction.apply(j,[r,W,R,K.yy,z[1],h,t].concat(be)),typeof Q<"u")return Q;B&&(i=i.slice(0,-1*B*2),h=h.slice(0,-1*B),t=t.slice(0,-1*B)),i.push(this.productions_[z[1]][0]),h.push(j.$),t.push(j._$),ne=_[i[i.length-2]][i[i.length-1]],i.push(ne);break;case 3:return!0}}return!0}},A=(function(){var D={EOF:1,parseError:function(s,i){if(this.yy.parser)this.yy.parser.parseError(s,i);else throw new Error(s)},setInput:function(o,s){return this.yy=s||this.yy||{},this._input=o,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 o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var s=o.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},unput:function(o){var s=o.length,i=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var u=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),i.length-1&&(this.yylineno-=i.length-1);var h=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:i?(i.length===u.length?this.yylloc.first_column:0)+u[u.length-i.length].length-i[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[h[0],h[0]+this.yyleng-s]),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
- `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(o){this.unput(this.match.slice(o))},pastInput:function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var o=this.pastInput(),s=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
5
- `+s+"^"},test_match:function(o,s){var i,u,h;if(this.options.backtrack_lexer&&(h={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(h.yylloc.range=this.yylloc.range.slice(0))),u=o[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(o[0].length),this.matched+=o[0],i=this.performAction.call(this,this.yy,this,s,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var t in h)this[t]=h[t];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,s,i,u;this._more||(this.yytext="",this.match="");for(var h=this._currentRules(),t=0;t<h.length;t++)if(i=this._input.match(this.rules[h[t]]),i&&(!s||i[0].length>s[0].length)){if(s=i,u=t,this.options.backtrack_lexer){if(o=this.test_match(i,h[t]),o!==!1)return o;if(this._backtrack){s=!1;continue}else return!1}else if(!this.options.flex)break}return s?(o=this.test_match(s,h[u]),o!==!1?o:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var s=this.next();return s||this.lex()},begin:function(s){this.conditionStack.push(s)},popState:function(){var s=this.conditionStack.length-1;return s>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(s){return s=this.conditionStack.length-1-Math.abs(s||0),s>=0?this.conditionStack[s]:"INITIAL"},pushState:function(s){this.begin(s)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(s,i,u,h){switch(u){case 0:return 10;case 1:return s.getLogger().debug("Found space-block"),31;case 2:return s.getLogger().debug("Found nl-block"),31;case 3:return s.getLogger().debug("Found space-block"),29;case 4:s.getLogger().debug(".",i.yytext);break;case 5:s.getLogger().debug("_",i.yytext);break;case 6:return 5;case 7:return i.yytext=-1,28;case 8:return i.yytext=i.yytext.replace(/columns\s+/,""),s.getLogger().debug("COLUMNS (LEX)",i.yytext),28;case 9:this.pushState("md_string");break;case 10:return"MD_STR";case 11:this.popState();break;case 12:this.pushState("string");break;case 13:s.getLogger().debug("LEX: POPPING STR:",i.yytext),this.popState();break;case 14:return s.getLogger().debug("LEX: STR end:",i.yytext),"STR";case 15:return i.yytext=i.yytext.replace(/space\:/,""),s.getLogger().debug("SPACE NUM (LEX)",i.yytext),21;case 16:return i.yytext="1",s.getLogger().debug("COLUMNS (LEX)",i.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 35:this.popState();break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:return this.popState(),s.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),s.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),s.getLogger().debug("Lex: ))"),"NODE_DEND";case 41:return this.popState(),s.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),s.getLogger().debug("Lex: (("),"NODE_DEND";case 43:return this.popState(),s.getLogger().debug("Lex: (-"),"NODE_DEND";case 44:return this.popState(),s.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),s.getLogger().debug("Lex: (("),"NODE_DEND";case 46:return this.popState(),s.getLogger().debug("Lex: ]]"),"NODE_DEND";case 47:return this.popState(),s.getLogger().debug("Lex: ("),"NODE_DEND";case 48:return this.popState(),s.getLogger().debug("Lex: ])"),"NODE_DEND";case 49:return this.popState(),s.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),s.getLogger().debug("Lex: /]"),"NODE_DEND";case 51:return this.popState(),s.getLogger().debug("Lex: )]"),"NODE_DEND";case 52:return this.popState(),s.getLogger().debug("Lex: )"),"NODE_DEND";case 53:return this.popState(),s.getLogger().debug("Lex: ]>"),"NODE_DEND";case 54:return this.popState(),s.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return s.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return s.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return s.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:return s.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return s.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 60:return s.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 61:return s.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 62:return s.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 63:return s.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return s.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 65:return s.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 66:return this.pushState("NODE"),36;case 67:return this.pushState("NODE"),36;case 68:return this.pushState("NODE"),36;case 69:return this.pushState("NODE"),36;case 70:return this.pushState("NODE"),36;case 71:return this.pushState("NODE"),36;case 72:return this.pushState("NODE"),36;case 73:return s.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),s.getLogger().debug("LEX ARR START"),38;case 75:return s.getLogger().debug("Lex: NODE_ID",i.yytext),32;case 76:return s.getLogger().debug("Lex: EOF",i.yytext),8;case 77:this.pushState("md_string");break;case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:s.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:s.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return s.getLogger().debug("LEX: NODE_DESCR:",i.yytext),"NODE_DESCR";case 84:s.getLogger().debug("LEX POPPING"),this.popState();break;case 85:s.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return i.yytext=i.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (right): dir:",i.yytext),"DIR";case 87:return i.yytext=i.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (left):",i.yytext),"DIR";case 88:return i.yytext=i.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (x):",i.yytext),"DIR";case 89:return i.yytext=i.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (y):",i.yytext),"DIR";case 90:return i.yytext=i.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (up):",i.yytext),"DIR";case 91:return i.yytext=i.yytext.replace(/^,\s*/,""),s.getLogger().debug("Lex (down):",i.yytext),"DIR";case 92:return i.yytext="]>",s.getLogger().debug("Lex (ARROW_DIR end):",i.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return s.getLogger().debug("Lex: LINK","#"+i.yytext+"#"),15;case 94:return s.getLogger().debug("Lex: LINK",i.yytext),15;case 95:return s.getLogger().debug("Lex: LINK",i.yytext),15;case 96:return s.getLogger().debug("Lex: LINK",i.yytext),15;case 97:return s.getLogger().debug("Lex: START_LINK",i.yytext),this.pushState("LLABEL"),16;case 98:return s.getLogger().debug("Lex: START_LINK",i.yytext),this.pushState("LLABEL"),16;case 99:return s.getLogger().debug("Lex: START_LINK",i.yytext),this.pushState("LLABEL"),16;case 100:this.pushState("md_string");break;case 101:return s.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),s.getLogger().debug("Lex: LINK","#"+i.yytext+"#"),15;case 103:return this.popState(),s.getLogger().debug("Lex: LINK",i.yytext),15;case 104:return this.popState(),s.getLogger().debug("Lex: LINK",i.yytext),15;case 105:return s.getLogger().debug("Lex: COLON",i.yytext),i.yytext=i.yytext.slice(1),27}},rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};return D})();L.lexer=A;function k(){this.yy={}}return k.prototype=L,L.Parser=k,new k})();ee.parser=ee;const we=ee;let I={},se=[],q={};const oe="color",ce="fill",De="bgFill",de=",",ve=f.getConfig();let V={};const Ne=e=>f.common$1.sanitizeText(e,ve),ke=function(e,a=""){V[e]===void 0&&(V[e]={id:e,styles:[],textStyles:[]});const d=V[e];a!=null&&a.split(de).forEach(c=>{const n=c.replace(/([^;]*);/,"$1").trim();if(c.match(oe)){const l=n.replace(ce,De).replace(oe,ce);d.textStyles.push(l)}d.styles.push(n)})},Te=function(e,a=""){const d=I[e];a!=null&&(d.styles=a.split(de))},Ie=function(e,a){e.split(",").forEach(function(d){let c=I[d];if(c===void 0){const n=d.trim();I[n]={id:n,type:"na",children:[]},c=I[n]}c.classes||(c.classes=[]),c.classes.push(a)})},he=(e,a)=>{const d=e.flat(),c=[];for(const n of d){if(n.label&&(n.label=Ne(n.label)),n.type==="classDef"){ke(n.id,n.css);continue}if(n.type==="applyClass"){Ie(n.id,(n==null?void 0:n.styleClass)||"");continue}if(n.type==="applyStyles"){n!=null&&n.stylesStr&&Te(n.id,n==null?void 0:n.stylesStr);continue}if(n.type==="column-setting")a.columns=n.columns||-1;else if(n.type==="edge")q[n.id]?q[n.id]++:q[n.id]=1,n.id=q[n.id]+"-"+n.id,se.push(n);else{n.label||(n.type==="composite"?n.label="":n.label=n.id);const g=!I[n.id];if(g?I[n.id]=n:(n.type!=="na"&&(I[n.id].type=n.type),n.label!==n.id&&(I[n.id].label=n.label)),n.children&&he(n.children,n),n.type==="space"){const l=n.width||1;for(let b=0;b<l;b++){const x=Le(n);x.id=x.id+"-"+b,I[x.id]=x,c.push(x)}}else g&&c.push(n)}}a.children=c};let ie=[],U={id:"root",type:"composite",children:[],columns:-1};const Oe=()=>{f.log$1.debug("Clear called"),f.clear(),U={id:"root",type:"composite",children:[],columns:-1},I={root:U},ie=[],V={},se=[],q={}};function ze(e){switch(f.log$1.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return f.log$1.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function Ce(e){switch(f.log$1.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}function Ae(e){switch(e.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}let ue=0;const Re=()=>(ue++,"id-"+Math.random().toString(36).substr(2,12)+"-"+ue),Be=e=>{U.children=e,he(e,U),ie=U.children},Pe=e=>{const a=I[e];return a?a.columns?a.columns:a.children?a.children.length:-1:-1},Fe=()=>[...Object.values(I)],Ke=()=>ie||[],Me=()=>se,Ye=e=>I[e],We=e=>{I[e.id]=e},je=()=>console,qe=function(){return V},Ve={getConfig:()=>f.getConfig$1().block,typeStr2Type:ze,edgeTypeStr2Type:Ce,edgeStrToEdgeData:Ae,getLogger:je,getBlocksFlat:Fe,getBlocks:Ke,getEdges:Me,setHierarchy:Be,getBlock:Ye,setBlock:We,getColumns:Pe,getClasses:qe,clear:Oe,generateId:Re},Ue=Ve,H=(e,a)=>{const d=me.channel,c=d(e,"r"),n=d(e,"g"),g=d(e,"b");return f.rgba(c,n,g,a)},Xe=e=>`.label {
7
- font-family: ${e.fontFamily};
8
- color: ${e.nodeTextColor||e.textColor};
9
- }
10
- .cluster-label text {
11
- fill: ${e.titleColor};
12
- }
13
- .cluster-label span,p {
14
- color: ${e.titleColor};
15
- }
16
-
17
-
18
-
19
- .label text,span,p {
20
- fill: ${e.nodeTextColor||e.textColor};
21
- color: ${e.nodeTextColor||e.textColor};
22
- }
23
-
24
- .node rect,
25
- .node circle,
26
- .node ellipse,
27
- .node polygon,
28
- .node path {
29
- fill: ${e.mainBkg};
30
- stroke: ${e.nodeBorder};
31
- stroke-width: 1px;
32
- }
33
- .flowchart-label text {
34
- text-anchor: middle;
35
- }
36
- // .flowchart-label .text-outer-tspan {
37
- // text-anchor: middle;
38
- // }
39
- // .flowchart-label .text-inner-tspan {
40
- // text-anchor: start;
41
- // }
42
-
43
- .node .label {
44
- text-align: center;
45
- }
46
- .node.clickable {
47
- cursor: pointer;
48
- }
49
-
50
- .arrowheadPath {
51
- fill: ${e.arrowheadColor};
52
- }
53
-
54
- .edgePath .path {
55
- stroke: ${e.lineColor};
56
- stroke-width: 2.0px;
57
- }
58
-
59
- .flowchart-link {
60
- stroke: ${e.lineColor};
61
- fill: none;
62
- }
63
-
64
- .edgeLabel {
65
- background-color: ${e.edgeLabelBackground};
66
- rect {
67
- opacity: 0.5;
68
- background-color: ${e.edgeLabelBackground};
69
- fill: ${e.edgeLabelBackground};
70
- }
71
- text-align: center;
72
- }
73
-
74
- /* For html labels only */
75
- .labelBkg {
76
- background-color: ${H(e.edgeLabelBackground,.5)};
77
- // background-color:
78
- }
79
-
80
- .node .cluster {
81
- // fill: ${H(e.mainBkg,.5)};
82
- fill: ${H(e.clusterBkg,.5)};
83
- stroke: ${H(e.clusterBorder,.2)};
84
- box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
85
- stroke-width: 1px;
86
- }
87
-
88
- .cluster text {
89
- fill: ${e.titleColor};
90
- }
91
-
92
- .cluster span,p {
93
- color: ${e.titleColor};
94
- }
95
- /* .cluster div {
96
- color: ${e.titleColor};
97
- } */
98
-
99
- div.mermaidTooltip {
100
- position: absolute;
101
- text-align: center;
102
- max-width: 200px;
103
- padding: 2px;
104
- font-family: ${e.fontFamily};
105
- font-size: 12px;
106
- background: ${e.tertiaryColor};
107
- border: 1px solid ${e.border2};
108
- border-radius: 2px;
109
- pointer-events: none;
110
- z-index: 100;
111
- }
112
-
113
- .flowchartTitleText {
114
- text-anchor: middle;
115
- font-size: 18px;
116
- fill: ${e.textColor};
117
- }
118
- `,Ge=Xe;function ge(e,a,d=!1){var c,n,g;const l=e;let b="default";(((c=l==null?void 0:l.classes)==null?void 0:c.length)||0)>0&&(b=((l==null?void 0:l.classes)||[]).join(" ")),b=b+" flowchart-label";let x=0,p="",S;switch(l.type){case"round":x=5,p="rect";break;case"composite":x=0,p="composite",S=0;break;case"square":p="rect";break;case"diamond":p="question";break;case"hexagon":p="hexagon";break;case"block_arrow":p="block_arrow";break;case"odd":p="rect_left_inv_arrow";break;case"lean_right":p="lean_right";break;case"lean_left":p="lean_left";break;case"trapezoid":p="trapezoid";break;case"inv_trapezoid":p="inv_trapezoid";break;case"rect_left_inv_arrow":p="rect_left_inv_arrow";break;case"circle":p="circle";break;case"ellipse":p="ellipse";break;case"stadium":p="stadium";break;case"subroutine":p="subroutine";break;case"cylinder":p="cylinder";break;case"group":p="rect";break;case"doublecircle":p="doublecircle";break;default:p="rect"}const y=f.getStylesFromArray((l==null?void 0:l.styles)||[]),O=l.label,v=l.size||{width:0,height:0,x:0,y:0};return{labelStyle:y.labelStyle,shape:p,labelText:O,rx:x,ry:x,class:b,style:y.style,id:l.id,directions:l.directions,width:v.width,height:v.height,x:v.x,y:v.y,positioned:d,intersect:void 0,type:l.type,padding:S??(((g=(n=f.getConfig$1())==null?void 0:n.block)==null?void 0:g.padding)||0)}}async function He(e,a,d){const c=ge(a,d,!1);if(c.type==="group")return;const n=await Y.insertNode(e,c),g=n.node().getBBox(),l=d.getBlock(c.id);l.size={width:g.width,height:g.height,x:0,y:0,node:n},d.setBlock(l),n.remove()}async function Ze(e,a,d){const c=ge(a,d,!0);d.getBlock(c.id).type!=="space"&&(await Y.insertNode(e,c),a.intersect=c==null?void 0:c.intersect,Y.positionNode(c))}async function re(e,a,d,c){for(const n of a)await c(e,n,d),n.children&&await re(e,n.children,d,c)}async function Je(e,a,d){await re(e,a,d,He)}async function Qe(e,a,d){await re(e,a,d,Ze)}async function $e(e,a,d,c,n){const g=new _e.Graph({multigraph:!0,compound:!0});g.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const l of d)l.size&&g.setNode(l.id,{width:l.size.width,height:l.size.height,intersect:l.intersect});for(const l of a)if(l.start&&l.end){const b=c.getBlock(l.start),x=c.getBlock(l.end);if(b!=null&&b.size&&(x!=null&&x.size)){const p=b.size,S=x.size,y=[{x:p.x,y:p.y},{x:p.x+(S.x-p.x)/2,y:p.y+(S.y-p.y)/2},{x:S.x,y:S.y}];await Y.insertEdge(e,{v:l.start,w:l.end,name:l.id},{...l,arrowTypeEnd:l.arrowTypeEnd,arrowTypeStart:l.arrowTypeStart,points:y,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",g,n),l.label&&(await Y.insertEdgeLabel(e,{...l,label:l.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:l.arrowTypeEnd,arrowTypeStart:l.arrowTypeStart}),await Y.positionEdgeLabel({...l,x:y[1].x,y:y[1].y},{originalPath:y}))}}}const m=((le=(ae=f.getConfig())==null?void 0:ae.block)==null?void 0:le.padding)||8;function et(e,a){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(a<0||!Number.isInteger(a))throw new Error("Position must be a non-negative integer."+a);if(e<0)return{px:a,py:0};if(e===1)return{px:0,py:a};const d=a%e,c=Math.floor(a/e);return{px:d,py:c}}const tt=e=>{let a=0,d=0;for(const c of e.children){const{width:n,height:g,x:l,y:b}=c.size||{width:0,height:0,x:0,y:0};f.log$1.debug("getMaxChildSize abc95 child:",c.id,"width:",n,"height:",g,"x:",l,"y:",b,c.type),c.type!=="space"&&(n>a&&(a=n/(e.widthInColumns||1)),g>d&&(d=g))}return{width:a,height:d}};function te(e,a,d=0,c=0){var n,g,l,b,x,p,S,y,O,v,N;f.log$1.debug("setBlockSizes abc95 (start)",e.id,(n=e==null?void 0:e.size)==null?void 0:n.x,"block width =",e==null?void 0:e.size,"sieblingWidth",d),(g=e==null?void 0:e.size)!=null&&g.width||(e.size={width:d,height:c,x:0,y:0});let E=0,L=0;if(((l=e.children)==null?void 0:l.length)>0){for(const h of e.children)te(h,a);const A=tt(e);E=A.width,L=A.height,f.log$1.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",E,L);for(const h of e.children)h.size&&(f.log$1.debug(`abc95 Setting size of children of ${e.id} id=${h.id} ${E} ${L} ${h.size}`),h.size.width=E*(h.widthInColumns||1)+m*((h.widthInColumns||1)-1),h.size.height=L,h.size.x=0,h.size.y=0,f.log$1.debug(`abc95 updating size of ${e.id} children child:${h.id} maxWidth:${E} maxHeight:${L}`));for(const h of e.children)te(h,a,E,L);const k=e.columns||-1;let D=0;for(const h of e.children)D+=h.widthInColumns||1;let o=e.children.length;k>0&&k<D&&(o=k),e.widthInColumns;const s=Math.ceil(D/o);let i=o*(E+m)+m,u=s*(L+m)+m;if(i<d){f.log$1.debug(`Detected to small siebling: abc95 ${e.id} sieblingWidth ${d} sieblingHeight ${c} width ${i}`),i=d,u=c;const h=(d-o*m-m)/o,t=(c-s*m-m)/s;f.log$1.debug("Size indata abc88",e.id,"childWidth",h,"maxWidth",E),f.log$1.debug("Size indata abc88",e.id,"childHeight",t,"maxHeight",L),f.log$1.debug("Size indata abc88 xSize",o,"padding",m);for(const _ of e.children)_.size&&(_.size.width=h,_.size.height=t,_.size.x=0,_.size.y=0)}if(f.log$1.debug(`abc95 (finale calc) ${e.id} xSize ${o} ySize ${s} columns ${k}${e.children.length} width=${Math.max(i,((b=e.size)==null?void 0:b.width)||0)}`),i<(((x=e==null?void 0:e.size)==null?void 0:x.width)||0)){i=((p=e==null?void 0:e.size)==null?void 0:p.width)||0;const h=k>0?Math.min(e.children.length,k):e.children.length;if(h>0){const t=(i-h*m-m)/h;f.log$1.debug("abc95 (growing to fit) width",e.id,i,(S=e.size)==null?void 0:S.width,t);for(const _ of e.children)_.size&&(_.size.width=t)}}e.size={width:i,height:u,x:0,y:0}}f.log$1.debug("setBlockSizes abc94 (done)",e.id,(y=e==null?void 0:e.size)==null?void 0:y.x,(O=e==null?void 0:e.size)==null?void 0:O.width,(v=e==null?void 0:e.size)==null?void 0:v.y,(N=e==null?void 0:e.size)==null?void 0:N.height)}function pe(e,a){var d,c,n,g,l,b,x,p,S,y,O,v,N,E,L,A,k;f.log$1.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(d=e==null?void 0:e.size)==null?void 0:d.x} y: ${(c=e==null?void 0:e.size)==null?void 0:c.y} width: ${(n=e==null?void 0:e.size)==null?void 0:n.width}`);const D=e.columns||-1;if(f.log$1.debug("layoutBlocks columns abc95",e.id,"=>",D,e),e.children&&e.children.length>0){const o=((l=(g=e==null?void 0:e.children[0])==null?void 0:g.size)==null?void 0:l.width)||0,s=e.children.length*o+(e.children.length-1)*m;f.log$1.debug("widthOfChildren 88",s,"posX");let i=0;f.log$1.debug("abc91 block?.size?.x",e.id,(b=e==null?void 0:e.size)==null?void 0:b.x);let u=(x=e==null?void 0:e.size)!=null&&x.x?((p=e==null?void 0:e.size)==null?void 0:p.x)+(-((S=e==null?void 0:e.size)==null?void 0:S.width)/2||0):-m,h=0;for(const t of e.children){const _=e;if(!t.size)continue;const{width:r,height:R}=t.size,{px:W,py:F}=et(D,i);if(F!=h&&(h=F,u=(y=e==null?void 0:e.size)!=null&&y.x?((O=e==null?void 0:e.size)==null?void 0:O.x)+(-((v=e==null?void 0:e.size)==null?void 0:v.width)/2||0):-m,f.log$1.debug("New row in layout for block",e.id," and child ",t.id,h)),f.log$1.debug(`abc89 layout blocks (child) id: ${t.id} Pos: ${i} (px, py) ${W},${F} (${(N=_==null?void 0:_.size)==null?void 0:N.x},${(E=_==null?void 0:_.size)==null?void 0:E.y}) parent: ${_.id} width: ${r}${m}`),_.size){const C=r/2;t.size.x=u+m+C,f.log$1.debug(`abc91 layout blocks (calc) px, pyid:${t.id} startingPos=X${u} new startingPosX${t.size.x} ${C} padding=${m} width=${r} halfWidth=${C} => x:${t.size.x} y:${t.size.y} ${t.widthInColumns} (width * (child?.w || 1)) / 2 ${r*((t==null?void 0:t.widthInColumns)||1)/2}`),u=t.size.x+C,t.size.y=_.size.y-_.size.height/2+F*(R+m)+R/2+m,f.log$1.debug(`abc88 layout blocks (calc) px, pyid:${t.id}startingPosX${u}${m}${C}=>x:${t.size.x}y:${t.size.y}${t.widthInColumns}(width * (child?.w || 1)) / 2${r*((t==null?void 0:t.widthInColumns)||1)/2}`)}t.children&&pe(t),i+=(t==null?void 0:t.widthInColumns)||1,f.log$1.debug("abc88 columnsPos",t,i)}}f.log$1.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${(L=e==null?void 0:e.size)==null?void 0:L.x} y: ${(A=e==null?void 0:e.size)==null?void 0:A.y} width: ${(k=e==null?void 0:e.size)==null?void 0:k.width}`)}function fe(e,{minX:a,minY:d,maxX:c,maxY:n}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){const{x:g,y:l,width:b,height:x}=e.size;g-b/2<a&&(a=g-b/2),l-x/2<d&&(d=l-x/2),g+b/2>c&&(c=g+b/2),l+x/2>n&&(n=l+x/2)}if(e.children)for(const g of e.children)({minX:a,minY:d,maxX:c,maxY:n}=fe(g,{minX:a,minY:d,maxX:c,maxY:n}));return{minX:a,minY:d,maxX:c,maxY:n}}function st(e){const a=e.getBlock("root");if(!a)return;te(a,e,0,0),pe(a),f.log$1.debug("getBlocks",JSON.stringify(a,null,2));const{minX:d,minY:c,maxX:n,maxY:g}=fe(a),l=g-c,b=n-d;return{x:d,y:c,width:b,height:l}}const it=function(e,a){return a.db.getClasses()},rt=async function(e,a,d,c){const{securityLevel:n,block:g}=f.getConfig$1(),l=c.db;let b;n==="sandbox"&&(b=f.select("#i"+a));const x=n==="sandbox"?f.select(b.nodes()[0].contentDocument.body):f.select("body"),p=n==="sandbox"?x.select(`[id="${a}"]`):f.select(`[id="${a}"]`),S=["point","circle","cross"];Y.insertMarkers$1(p,S,c.type,a);const y=l.getBlocks(),O=l.getBlocksFlat(),v=l.getEdges(),N=p.insert("g").attr("class","block");await Je(N,y,l);const E=st(l);if(await Qe(N,y,l),await $e(N,v,O,l,a),E){const L=E,A=Math.max(1,Math.round(.125*(L.width/L.height))),k=L.height+A+10,D=L.width+10,{useMaxWidth:o}=g;f.configureSvgSize(p,k,D,!!o),f.log$1.debug("Here Bounds",E,L),p.attr("viewBox",`${L.x-5} ${L.y-5} ${L.width+10} ${L.height+10}`)}ye.ordinal(Ee.schemeTableau10)},nt={draw:rt,getClasses:it},at={parser:we,db:Ue,renderer:nt,styles:Ge};exports.diagram=at;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./layers.CbbuOQ3N.js"),z=require("./layers.BLd2spTm.js"),i=require("./layers.Bn96IwAe.js"),j=require("./layers.Cnqb7wKB.js");require("./layers.BazhlVmO.js");require("lodash-es/memoize.js");require("lodash-es/merge.js");require("lodash-es/isEmpty.js");require("lodash-es");require("./layers.Cyzu9PKQ.js");const h="rect",C="rectWithTitle",K="start",F="end",J="divider",Q="roundedWithTitle",X="note",Z="noteGroup",b="statediagram",m="state",I=`${b}-${m}`,k="transition",tt="note",et="note-edge",ot=`${k} ${et}`,st=`${b}-${tt}`,nt="cluster",ct=`${b}-${nt}`,it="cluster-alt",rt=`${b}-${it}`,M="parent",B="note",lt="state",w="----",at=`${w}${B}`,v=`${w}${M}`,q="fill:none",H="fill: #333",U="c",V="text",Y="normal";let y={},S=0;const dt=function(t){const n=Object.keys(t);for(const e of n)t[e]},Et=function(t,n){return n.db.extract(n.db.getRootDocV2()),n.db.getClasses()};function St(t){return t==null?"":t.classes?t.classes.join(" "):""}function x(t="",n=0,e="",c=w){const r=e!==null&&e.length>0?`${c}${e}`:"";return`${lt}-${t}${r}-${n}`}const p=(t,n,e,c,r,l)=>{const o=e.id,f=St(c[o]);if(o!=="root"){let u=h;e.start===!0&&(u=K),e.start===!1&&(u=F),e.type!==a.DEFAULT_STATE_TYPE&&(u=e.type),y[o]||(y[o]={id:o,shape:u,description:i.common$1.sanitizeText(o,i.getConfig()),classes:`${f} ${I}`});const s=y[o];e.description&&(Array.isArray(s.description)?(s.shape=C,s.description.push(e.description)):s.description.length>0?(s.shape=C,s.description===o?s.description=[e.description]:s.description=[s.description,e.description]):(s.shape=h,s.description=e.description),s.description=i.common$1.sanitizeTextOrArray(s.description,i.getConfig())),s.description.length===1&&s.shape===C&&(s.shape=h),!s.type&&e.doc&&(i.log$1.info("Setting cluster for ",o,R(e)),s.type="group",s.dir=R(e),s.shape=e.type===a.DIVIDER_TYPE?J:Q,s.classes=s.classes+" "+ct+" "+(l?rt:""));const _={labelStyle:"",shape:s.shape,labelText:s.description,classes:s.classes,style:"",id:o,dir:s.dir,domId:x(o,S),type:s.type,padding:15};if(_.centerLabel=!0,e.note){const d={labelStyle:"",shape:X,labelText:e.note.text,classes:st,style:"",id:o+at+"-"+S,domId:x(o,S,B),type:s.type,padding:15},E={labelStyle:"",shape:Z,labelText:e.note.text,classes:s.classes,style:"",id:o+v,domId:x(o,S,M),type:"group",padding:0};S++;const g=o+v;t.setNode(g,E),t.setNode(d.id,d),t.setNode(o,_),t.setParent(o,g),t.setParent(d.id,g);let T=o,A=d.id;e.note.position==="left of"&&(T=d.id,A=o),t.setEdge(T,A,{arrowhead:"none",arrowType:"",style:q,labelStyle:"",classes:ot,arrowheadStyle:H,labelpos:U,labelType:V,thickness:Y})}else t.setNode(o,_)}n&&n.id!=="root"&&(i.log$1.trace("Setting node ",o," to be child of its parent ",n.id),t.setParent(o,n.id)),e.doc&&(i.log$1.trace("Adding nodes children "),Tt(t,e,e.doc,c,r,!l))},Tt=(t,n,e,c,r,l)=>{i.log$1.trace("items",e),e.forEach(o=>{switch(o.stmt){case a.STMT_STATE:p(t,n,o,c,r,l);break;case a.DEFAULT_STATE_TYPE:p(t,n,o,c,r,l);break;case a.STMT_RELATION:{p(t,n,o.state1,c,r,l),p(t,n,o.state2,c,r,l);const f={id:"edge"+S,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:q,labelStyle:"",label:i.common$1.sanitizeText(o.description,i.getConfig()),arrowheadStyle:H,labelpos:U,labelType:V,thickness:Y,classes:k};t.setEdge(o.state1.id,o.state2.id,f,S),S++}break}})},R=(t,n=a.DEFAULT_NESTED_DOC_DIR)=>{let e=n;if(t.doc)for(let c=0;c<t.doc.length;c++){const r=t.doc[c];r.stmt==="dir"&&(e=r.value)}return e},ut=async function(t,n,e,c){i.log$1.info("Drawing state diagram (v2)",n),y={},c.db.getDirection();const{securityLevel:r,state:l}=i.getConfig(),o=l.nodeSpacing||50,f=l.rankSpacing||50;i.log$1.info(c.db.getRootDocV2()),c.db.extract(c.db.getRootDocV2()),i.log$1.info(c.db.getRootDocV2());const u=c.db.getStates(),s=new z.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:R(c.db.getRootDocV2()),nodesep:o,ranksep:f,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});p(s,void 0,c.db.getRootDocV2(),u,c.db,!0);let _;r==="sandbox"&&(_=i.select("#i"+n));const d=r==="sandbox"?i.select(_.nodes()[0].contentDocument.body):i.select("body"),E=d.select(`[id="${n}"]`),g=d.select("#"+n+" g");await j.render(g,s,["barb"],b,n);const T=8;i.utils.insertTitle(E,"statediagramTitleText",l.titleTopMargin,c.db.getDiagramTitle());const A=E.node().getBBox(),G=A.width+T*2,N=A.height+T*2;E.attr("class",b);const L=E.node().getBBox();i.configureSvgSize(E,N,G,l.useMaxWidth);const P=`${L.x-T} ${L.y-T} ${G} ${N}`;i.log$1.debug(`viewBox ${P}`),E.attr("viewBox",P);const W=document.querySelectorAll('[id="'+n+'"] .edgeLabel .label');for(const $ of W){const O=$.getBBox(),D=document.createElementNS("http://www.w3.org/2000/svg",h);D.setAttribute("rx",0),D.setAttribute("ry",0),D.setAttribute("width",O.width),D.setAttribute("height",O.height),$.insertBefore(D,$.firstChild)}},_t={setConf:dt,getClasses:Et,draw:ut},bt={parser:a.parser$1,db:a.db,renderer:_t,styles:a.styles,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,a.db.clear()}};exports.diagram=bt;
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("./layers.C7SPnzuD.js"),d=require("./layers.Bn96IwAe.js");require("lodash-es");const $=require("./layers.Cyzu9PKQ.js"),H=require("./layers.BLd2spTm.js");require("./layers.BazhlVmO.js");require("lodash-es/memoize.js");require("lodash-es/merge.js");require("lodash-es/isEmpty.js");const _=require("./layers.DBMV9sVv.js");let S=0;const C=function(i,r,t,l,p){const c=function(e){switch(e){case p.db.relationType.AGGREGATION:return"aggregation";case p.db.relationType.EXTENSION:return"extension";case p.db.relationType.COMPOSITION:return"composition";case p.db.relationType.DEPENDENCY:return"dependency";case p.db.relationType.LOLLIPOP:return"lollipop"}};r.points=r.points.filter(e=>!Number.isNaN(e.y));const o=r.points,h=_.line().x(function(e){return e.x}).y(function(e){return e.y}).curve(d.curveBasis),n=i.append("path").attr("d",h(o)).attr("id","edge"+S).attr("class","relation");let a="";l.arrowMarkerAbsolute&&(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)")),t.relation.lineType==1&&n.attr("class","relation dashed-line"),t.relation.lineType==10&&n.attr("class","relation dotted-line"),t.relation.type1!=="none"&&n.attr("marker-start","url("+a+"#"+c(t.relation.type1)+"Start)"),t.relation.type2!=="none"&&n.attr("marker-end","url("+a+"#"+c(t.relation.type2)+"End)");let f,u;const x=r.points.length;let w=d.utils.calcLabelPosition(r.points);f=w.x,u=w.y;let y,b,m,k;if(x%2!==0&&x>1){let e=d.utils.calcCardinalityPosition(t.relation.type1!=="none",r.points,r.points[0]),s=d.utils.calcCardinalityPosition(t.relation.type2!=="none",r.points,r.points[x-1]);d.log$1.debug("cardinality_1_point "+JSON.stringify(e)),d.log$1.debug("cardinality_2_point "+JSON.stringify(s)),y=e.x,b=e.y,m=s.x,k=s.y}if(t.title!==void 0){const e=i.append("g").attr("class","classLabel"),s=e.append("text").attr("class","label").attr("x",f).attr("y",u).attr("fill","red").attr("text-anchor","middle").text(t.title);window.label=s;const g=s.node().getBBox();e.insert("rect",":first-child").attr("class","box").attr("x",g.x-l.padding/2).attr("y",g.y-l.padding/2).attr("width",g.width+l.padding).attr("height",g.height+l.padding)}d.log$1.info("Rendering relation "+JSON.stringify(t)),t.relationTitle1!==void 0&&t.relationTitle1!=="none"&&i.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",y).attr("y",b).attr("fill","black").attr("font-size","6").text(t.relationTitle1),t.relationTitle2!==void 0&&t.relationTitle2!=="none"&&i.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",m).attr("y",k).attr("fill","black").attr("font-size","6").text(t.relationTitle2),S++},A=function(i,r,t,l){d.log$1.debug("Rendering class ",r,t);const p=r.id,c={id:p,label:r.id,width:0,height:0},o=i.append("g").attr("id",l.db.lookUpDomId(p)).attr("class","classGroup");let h;r.link?h=o.append("svg:a").attr("xlink:href",r.link).attr("target",r.linkTarget).append("text").attr("y",t.textHeight+t.padding).attr("x",0):h=o.append("text").attr("y",t.textHeight+t.padding).attr("x",0);let n=!0;r.annotations.forEach(function(s){const g=h.append("tspan").text("«"+s+"»");n||g.attr("dy",t.textHeight),n=!1});let a=v(r);const f=h.append("tspan").text(a).attr("class","title");n||f.attr("dy",t.textHeight);const u=h.node().getBBox().height;let x,w,y;if(r.members.length>0){x=o.append("line").attr("x1",0).attr("y1",t.padding+u+t.dividerMargin/2).attr("y2",t.padding+u+t.dividerMargin/2);const s=o.append("text").attr("x",t.padding).attr("y",u+t.dividerMargin+t.textHeight).attr("fill","white").attr("class","classText");n=!0,r.members.forEach(function(g){N(s,g,n,t),n=!1}),w=s.node().getBBox()}if(r.methods.length>0){y=o.append("line").attr("x1",0).attr("y1",t.padding+u+t.dividerMargin+w.height).attr("y2",t.padding+u+t.dividerMargin+w.height);const s=o.append("text").attr("x",t.padding).attr("y",u+2*t.dividerMargin+w.height+t.textHeight).attr("fill","white").attr("class","classText");n=!0,r.methods.forEach(function(g){N(s,g,n,t),n=!1})}const b=o.node().getBBox();var m=" ";r.cssClasses.length>0&&(m=m+r.cssClasses.join(" "));const e=o.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",b.width+2*t.padding).attr("height",b.height+t.padding+.5*t.dividerMargin).attr("class",m).node().getBBox().width;return h.node().childNodes.forEach(function(s){s.setAttribute("x",(e-s.getBBox().width)/2)}),r.tooltip&&h.insert("title").text(r.tooltip),x&&x.attr("x2",e),y&&y.attr("x2",e),c.width=e,c.height=b.height+t.padding+.5*t.dividerMargin,c},v=function(i){let r=i.id;return i.type&&(r+="<"+d.parseGenericTypes(i.type)+">"),r},W=function(i,r,t,l){d.log$1.debug("Rendering note ",r,t);const p=r.id,c={id:p,text:r.text,width:0,height:0},o=i.append("g").attr("id",p).attr("class","classGroup");let h=o.append("text").attr("y",t.textHeight+t.padding).attr("x",0);const n=JSON.parse(`"${r.text}"`).split(`
2
- `);n.forEach(function(x){d.log$1.debug(`Adding line: ${x}`),h.append("tspan").text(x).attr("class","title").attr("dy",t.textHeight)});const a=o.node().getBBox(),u=o.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",a.width+2*t.padding).attr("height",a.height+n.length*t.textHeight+t.padding+.5*t.dividerMargin).node().getBBox().width;return h.node().childNodes.forEach(function(x){x.setAttribute("x",(u-x.getBBox().width)/2)}),c.width=u,c.height=a.height+n.length*t.textHeight+t.padding+.5*t.dividerMargin,c},N=function(i,r,t,l){const{displayText:p,cssStyle:c}=r.getDisplayDetails(),o=i.append("tspan").attr("x",l.padding).text(p);c!==""&&o.attr("style",r.cssStyle),t||o.attr("dy",l.textHeight)},M={getClassTitleString:v,drawClass:A,drawEdge:C,drawNote:W};let B={};const E=20,L=function(i){const r=Object.entries(B).find(t=>t[1].label===i);if(r)return r[0]},q=function(i){i.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),i.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),i.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),i.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 18,7 L9,13 L14,7 L9,1 Z")},G=function(i,r,t,l){const p=d.getConfig().class;B={},d.log$1.info("Rendering diagram "+i);const c=d.getConfig().securityLevel;let o;c==="sandbox"&&(o=d.select("#i"+r));const h=c==="sandbox"?d.select(o.nodes()[0].contentDocument.body):d.select("body"),n=h.select(`[id='${r}']`);q(n);const a=new H.Graph({multigraph:!0});a.setGraph({isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const f=l.db.getClasses(),u=Object.keys(f);for(const e of u){const s=f[e],g=M.drawClass(n,s,p,l);B[g.id]=g,a.setNode(g.id,g),d.log$1.info("Org height: "+g.height)}l.db.getRelations().forEach(function(e){d.log$1.info("tjoho"+L(e.id1)+L(e.id2)+JSON.stringify(e)),a.setEdge(L(e.id1),L(e.id2),{relation:e},e.title||"DEFAULT")}),l.db.getNotes().forEach(function(e){d.log$1.debug(`Adding note: ${JSON.stringify(e)}`);const s=M.drawNote(n,e,p,l);B[s.id]=s,a.setNode(s.id,s),e.class&&e.class in f&&a.setEdge(e.id,L(e.class),{relation:{id1:e.id,id2:e.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),$.layout(a),a.nodes().forEach(function(e){e!==void 0&&a.node(e)!==void 0&&(d.log$1.debug("Node "+e+": "+JSON.stringify(a.node(e))),h.select("#"+(l.db.lookUpDomId(e)||e)).attr("transform","translate("+(a.node(e).x-a.node(e).width/2)+","+(a.node(e).y-a.node(e).height/2)+" )"))}),a.edges().forEach(function(e){e!==void 0&&a.edge(e)!==void 0&&(d.log$1.debug("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(a.edge(e))),M.drawEdge(n,a.edge(e),a.edge(e).relation,p,l))});const y=n.node().getBBox(),b=y.width+E*2,m=y.height+E*2;d.configureSvgSize(n,m,b,p.useMaxWidth);const k=`${y.x-E} ${y.y-E} ${b} ${m}`;d.log$1.debug(`viewBox ${k}`),n.attr("viewBox",k)},I={draw:G},O={parser:T.parser$1,db:T.db,renderer:I,styles:T.styles,init:i=>{i.class||(i.class={}),i.class.arrowMarkerAbsolute=i.arrowMarkerAbsolute,T.db.clear()}};exports.diagram=O;
@@ -1,22 +0,0 @@
1
- import { f as o, p as e } from "./layers.CvQemHpn.js";
2
- import { f as a, a as t } from "./layers.Bk57FuHz.js";
3
- import { x as s } from "./layers.Cf41PJM_.js";
4
- import "lodash-es";
5
- import "./layers.BJDrjORS.js";
6
- import "./layers.D4T8fTcj.js";
7
- import "./layers.D2f2ApIk.js";
8
- import "lodash-es/memoize.js";
9
- import "lodash-es/merge.js";
10
- import "lodash-es/isEmpty.js";
11
- const u = {
12
- parser: e,
13
- db: o,
14
- renderer: t,
15
- styles: a,
16
- init: (r) => {
17
- r.flowchart || (r.flowchart = {}), r.flowchart.arrowMarkerAbsolute = r.arrowMarkerAbsolute, s({ flowchart: { arrowMarkerAbsolute: r.arrowMarkerAbsolute } }), t.setConf(r.flowchart), o.clear(), o.setGen("gen-2");
18
- }
19
- };
20
- export {
21
- u as diagram
22
- };