@copilotkitnext/react 0.0.22-alpha.7 → 0.0.22-alpha.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (236) hide show
  1. package/package.json +4 -4
  2. package/dist/KaTeX_AMS-Regular-CYEKBG2K.woff +0 -0
  3. package/dist/KaTeX_AMS-Regular-JKX5W2C4.ttf +0 -0
  4. package/dist/KaTeX_AMS-Regular-U6PRYMIZ.woff2 +0 -0
  5. package/dist/KaTeX_Caligraphic-Bold-5QL5CMTE.woff2 +0 -0
  6. package/dist/KaTeX_Caligraphic-Bold-WZ3QSGD3.woff +0 -0
  7. package/dist/KaTeX_Caligraphic-Bold-ZTS3R3HK.ttf +0 -0
  8. package/dist/KaTeX_Caligraphic-Regular-3LKEU76G.woff +0 -0
  9. package/dist/KaTeX_Caligraphic-Regular-A7XRTZ5Q.ttf +0 -0
  10. package/dist/KaTeX_Caligraphic-Regular-KX5MEWCF.woff2 +0 -0
  11. package/dist/KaTeX_Fraktur-Bold-2QVFK6NQ.woff2 +0 -0
  12. package/dist/KaTeX_Fraktur-Bold-T4SWXBMT.woff +0 -0
  13. package/dist/KaTeX_Fraktur-Bold-WGHVTYOR.ttf +0 -0
  14. package/dist/KaTeX_Fraktur-Regular-2PEIFJSJ.woff2 +0 -0
  15. package/dist/KaTeX_Fraktur-Regular-5U4OPH2X.ttf +0 -0
  16. package/dist/KaTeX_Fraktur-Regular-PQMHCIK6.woff +0 -0
  17. package/dist/KaTeX_Main-Bold-2GA4IZIN.woff +0 -0
  18. package/dist/KaTeX_Main-Bold-W5FBVCZM.ttf +0 -0
  19. package/dist/KaTeX_Main-Bold-YP5VVQRP.woff2 +0 -0
  20. package/dist/KaTeX_Main-BoldItalic-4P4C7HJH.woff +0 -0
  21. package/dist/KaTeX_Main-BoldItalic-N4V3DX7S.woff2 +0 -0
  22. package/dist/KaTeX_Main-BoldItalic-ODMLBJJQ.ttf +0 -0
  23. package/dist/KaTeX_Main-Italic-I43T2HSR.ttf +0 -0
  24. package/dist/KaTeX_Main-Italic-RELBIK7M.woff2 +0 -0
  25. package/dist/KaTeX_Main-Italic-SASNQFN2.woff +0 -0
  26. package/dist/KaTeX_Main-Regular-ARRPAO67.woff2 +0 -0
  27. package/dist/KaTeX_Main-Regular-P5I74A2A.woff +0 -0
  28. package/dist/KaTeX_Main-Regular-W74P5G27.ttf +0 -0
  29. package/dist/KaTeX_Math-BoldItalic-6EBV3DK5.woff +0 -0
  30. package/dist/KaTeX_Math-BoldItalic-K4WTGH3J.woff2 +0 -0
  31. package/dist/KaTeX_Math-BoldItalic-VB447A4D.ttf +0 -0
  32. package/dist/KaTeX_Math-Italic-6KGCHLFN.woff2 +0 -0
  33. package/dist/KaTeX_Math-Italic-KKK3USB2.woff +0 -0
  34. package/dist/KaTeX_Math-Italic-SON4MRCA.ttf +0 -0
  35. package/dist/KaTeX_SansSerif-Bold-RRNVJFFW.woff2 +0 -0
  36. package/dist/KaTeX_SansSerif-Bold-STQ6RXC7.ttf +0 -0
  37. package/dist/KaTeX_SansSerif-Bold-X5M5EMOD.woff +0 -0
  38. package/dist/KaTeX_SansSerif-Italic-HMPFTM52.woff2 +0 -0
  39. package/dist/KaTeX_SansSerif-Italic-PSN4QKYX.woff +0 -0
  40. package/dist/KaTeX_SansSerif-Italic-WTBAZBGY.ttf +0 -0
  41. package/dist/KaTeX_SansSerif-Regular-2TL3USAE.ttf +0 -0
  42. package/dist/KaTeX_SansSerif-Regular-OQCII6EP.woff +0 -0
  43. package/dist/KaTeX_SansSerif-Regular-XIQ62X4E.woff2 +0 -0
  44. package/dist/KaTeX_Script-Regular-72OLXYNA.ttf +0 -0
  45. package/dist/KaTeX_Script-Regular-A5IFOEBS.woff +0 -0
  46. package/dist/KaTeX_Script-Regular-APUWIHLP.woff2 +0 -0
  47. package/dist/KaTeX_Size1-Regular-4HRHTS65.woff +0 -0
  48. package/dist/KaTeX_Size1-Regular-5LRUTBFT.woff2 +0 -0
  49. package/dist/KaTeX_Size1-Regular-7K6AASVL.ttf +0 -0
  50. package/dist/KaTeX_Size2-Regular-222HN3GT.ttf +0 -0
  51. package/dist/KaTeX_Size2-Regular-K5ZHAIS6.woff +0 -0
  52. package/dist/KaTeX_Size2-Regular-LELKET5D.woff2 +0 -0
  53. package/dist/KaTeX_Size3-Regular-TLFPAHDE.woff +0 -0
  54. package/dist/KaTeX_Size3-Regular-UFCO6WCA.ttf +0 -0
  55. package/dist/KaTeX_Size3-Regular-WQRQ47UD.woff2 +0 -0
  56. package/dist/KaTeX_Size4-Regular-7PGNVPQK.ttf +0 -0
  57. package/dist/KaTeX_Size4-Regular-CDMV7U5C.woff2 +0 -0
  58. package/dist/KaTeX_Size4-Regular-PKMWZHNC.woff +0 -0
  59. package/dist/KaTeX_Typewriter-Regular-3F5K6SQ6.ttf +0 -0
  60. package/dist/KaTeX_Typewriter-Regular-MJMFSK64.woff +0 -0
  61. package/dist/KaTeX_Typewriter-Regular-VBYJ4NRC.woff2 +0 -0
  62. package/dist/angular-html-LD6QEAZE.mjs +0 -7
  63. package/dist/angular-html-LD6QEAZE.mjs.map +0 -1
  64. package/dist/angular-ts-FGK7I2F5.mjs +0 -37
  65. package/dist/angular-ts-FGK7I2F5.mjs.map +0 -1
  66. package/dist/angular-ts-XZTE5LQS.mjs +0 -37
  67. package/dist/angular-ts-XZTE5LQS.mjs.map +0 -1
  68. package/dist/apl-VB2EG5RZ.mjs +0 -22
  69. package/dist/apl-VB2EG5RZ.mjs.map +0 -1
  70. package/dist/architectureDiagram-VXUJARFQ-PPLKSFYC.mjs +0 -8712
  71. package/dist/architectureDiagram-VXUJARFQ-PPLKSFYC.mjs.map +0 -1
  72. package/dist/blade-EZDWULER.mjs +0 -26
  73. package/dist/blade-EZDWULER.mjs.map +0 -1
  74. package/dist/blade-HS4Z7O3Y.mjs +0 -26
  75. package/dist/blade-HS4Z7O3Y.mjs.map +0 -1
  76. package/dist/blockDiagram-VD42YOAC-7SIEWHYD.mjs +0 -3618
  77. package/dist/blockDiagram-VD42YOAC-7SIEWHYD.mjs.map +0 -1
  78. package/dist/c4Diagram-YG6GDRKO-G2UUBRHQ.mjs +0 -2495
  79. package/dist/c4Diagram-YG6GDRKO-G2UUBRHQ.mjs.map +0 -1
  80. package/dist/chunk-2BAFECUC.mjs +0 -28
  81. package/dist/chunk-2BAFECUC.mjs.map +0 -1
  82. package/dist/chunk-BF5LDW2L.mjs +0 -65
  83. package/dist/chunk-BF5LDW2L.mjs.map +0 -1
  84. package/dist/chunk-BUEC2HNL.mjs +0 -762
  85. package/dist/chunk-BUEC2HNL.mjs.map +0 -1
  86. package/dist/chunk-CRGJ2YCV.mjs +0 -109
  87. package/dist/chunk-CRGJ2YCV.mjs.map +0 -1
  88. package/dist/chunk-DKZXT4VQ.mjs +0 -19
  89. package/dist/chunk-DKZXT4VQ.mjs.map +0 -1
  90. package/dist/chunk-DYQXFOGA.mjs +0 -34
  91. package/dist/chunk-DYQXFOGA.mjs.map +0 -1
  92. package/dist/chunk-ENI667QL.mjs +0 -806
  93. package/dist/chunk-ENI667QL.mjs.map +0 -1
  94. package/dist/chunk-GEUZOPED.mjs +0 -1834
  95. package/dist/chunk-GEUZOPED.mjs.map +0 -1
  96. package/dist/chunk-GU7334FJ.mjs +0 -538
  97. package/dist/chunk-GU7334FJ.mjs.map +0 -1
  98. package/dist/chunk-HNKEYT4A.mjs +0 -4693
  99. package/dist/chunk-HNKEYT4A.mjs.map +0 -1
  100. package/dist/chunk-HTMHAYGC.mjs +0 -14
  101. package/dist/chunk-HTMHAYGC.mjs.map +0 -1
  102. package/dist/chunk-JRLFMJ6U.mjs +0 -1923
  103. package/dist/chunk-JRLFMJ6U.mjs.map +0 -1
  104. package/dist/chunk-JYRND4DC.mjs +0 -22
  105. package/dist/chunk-JYRND4DC.mjs.map +0 -1
  106. package/dist/chunk-KFEPUFID.mjs +0 -52
  107. package/dist/chunk-KFEPUFID.mjs.map +0 -1
  108. package/dist/chunk-M3UH7XZX.mjs +0 -6222
  109. package/dist/chunk-M3UH7XZX.mjs.map +0 -1
  110. package/dist/chunk-ND4RYWG7.mjs +0 -12
  111. package/dist/chunk-ND4RYWG7.mjs.map +0 -1
  112. package/dist/chunk-VLSLBZME.mjs +0 -51
  113. package/dist/chunk-VLSLBZME.mjs.map +0 -1
  114. package/dist/chunk-WJBV3P3K.mjs +0 -55
  115. package/dist/chunk-WJBV3P3K.mjs.map +0 -1
  116. package/dist/chunk-X2TQ2HDS.mjs +0 -44
  117. package/dist/chunk-X2TQ2HDS.mjs.map +0 -1
  118. package/dist/chunk-YIDZOZG3.mjs +0 -103
  119. package/dist/chunk-YIDZOZG3.mjs.map +0 -1
  120. package/dist/chunk-YLW7IP7V.mjs +0 -14525
  121. package/dist/chunk-YLW7IP7V.mjs.map +0 -1
  122. package/dist/classDiagram-2ON5EDUG-WUV4PTK5.mjs +0 -38
  123. package/dist/classDiagram-2ON5EDUG-WUV4PTK5.mjs.map +0 -1
  124. package/dist/classDiagram-v2-WZHVMYZB-J4QNVYPE.mjs +0 -38
  125. package/dist/classDiagram-v2-WZHVMYZB-J4QNVYPE.mjs.map +0 -1
  126. package/dist/cobol-PNTKRG5I.mjs +0 -17
  127. package/dist/cobol-PNTKRG5I.mjs.map +0 -1
  128. package/dist/crystal-BSMHK65A.mjs +0 -23
  129. package/dist/crystal-BSMHK65A.mjs.map +0 -1
  130. package/dist/dagre-6UL2VRFP-XN667C7N.mjs +0 -710
  131. package/dist/dagre-6UL2VRFP-XN667C7N.mjs.map +0 -1
  132. package/dist/diagram-PSM6KHXK-VA2CF5LZ.mjs +0 -538
  133. package/dist/diagram-PSM6KHXK-VA2CF5LZ.mjs.map +0 -1
  134. package/dist/diagram-QEK2KX5R-H3EHES33.mjs +0 -319
  135. package/dist/diagram-QEK2KX5R-H3EHES33.mjs.map +0 -1
  136. package/dist/diagram-S2PKOQOG-FOQYPB22.mjs +0 -231
  137. package/dist/diagram-S2PKOQOG-FOQYPB22.mjs.map +0 -1
  138. package/dist/edge-JOI74UJM.mjs +0 -19
  139. package/dist/edge-JOI74UJM.mjs.map +0 -1
  140. package/dist/elixir-FEL6DDPJ.mjs +0 -15
  141. package/dist/elixir-FEL6DDPJ.mjs.map +0 -1
  142. package/dist/erDiagram-Q2GNP2WA-IXNJSD2A.mjs +0 -1175
  143. package/dist/erDiagram-Q2GNP2WA-IXNJSD2A.mjs.map +0 -1
  144. package/dist/erb-Q2D6FWX3.mjs +0 -32
  145. package/dist/erb-Q2D6FWX3.mjs.map +0 -1
  146. package/dist/flowDiagram-NV44I4VS-ISKGEBMD.mjs +0 -2349
  147. package/dist/flowDiagram-NV44I4VS-ISKGEBMD.mjs.map +0 -1
  148. package/dist/ganttDiagram-LVOFAZNH-OAL7V7IR.mjs +0 -2344
  149. package/dist/ganttDiagram-LVOFAZNH-OAL7V7IR.mjs.map +0 -1
  150. package/dist/gitGraphDiagram-NY62KEGX-RKN2CCAZ.mjs +0 -1221
  151. package/dist/gitGraphDiagram-NY62KEGX-RKN2CCAZ.mjs.map +0 -1
  152. package/dist/glimmer-js-B32LCGFA.mjs +0 -19
  153. package/dist/glimmer-js-B32LCGFA.mjs.map +0 -1
  154. package/dist/glimmer-ts-4PHFAQCG.mjs +0 -19
  155. package/dist/glimmer-ts-4PHFAQCG.mjs.map +0 -1
  156. package/dist/hack-3ZNSL4KD.mjs +0 -17
  157. package/dist/hack-3ZNSL4KD.mjs.map +0 -1
  158. package/dist/handlebars-ICBC3AZK.mjs +0 -19
  159. package/dist/handlebars-ICBC3AZK.mjs.map +0 -1
  160. package/dist/html-BGY5P773.mjs +0 -6
  161. package/dist/html-BGY5P773.mjs.map +0 -1
  162. package/dist/html-derivative-3HGXHHFE.mjs +0 -7
  163. package/dist/html-derivative-3HGXHHFE.mjs.map +0 -1
  164. package/dist/index.css +0 -2385
  165. package/dist/index.css.map +0 -1
  166. package/dist/infoDiagram-F6ZHWCRC-Z7KMJJ45.mjs +0 -49
  167. package/dist/infoDiagram-F6ZHWCRC-Z7KMJJ45.mjs.map +0 -1
  168. package/dist/jinja-WL6HNMB5.mjs +0 -22
  169. package/dist/jinja-WL6HNMB5.mjs.map +0 -1
  170. package/dist/journeyDiagram-XKPGCS4Q-BMTOBHZ4.mjs +0 -1259
  171. package/dist/journeyDiagram-XKPGCS4Q-BMTOBHZ4.mjs.map +0 -1
  172. package/dist/kanban-definition-3W4ZIXB7-MVFRARF4.mjs +0 -1062
  173. package/dist/kanban-definition-3W4ZIXB7-MVFRARF4.mjs.map +0 -1
  174. package/dist/katex-4R42CMCB.mjs +0 -4
  175. package/dist/katex-4R42CMCB.mjs.map +0 -1
  176. package/dist/liquid-YS3YPW54.mjs +0 -19
  177. package/dist/liquid-YS3YPW54.mjs.map +0 -1
  178. package/dist/logo-mark-OHF64HAY.svg +0 -8
  179. package/dist/mdc-A66KLOT4.mjs +0 -20
  180. package/dist/mdc-A66KLOT4.mjs.map +0 -1
  181. package/dist/mermaid.core-4OWTNZSL.mjs +0 -1587
  182. package/dist/mermaid.core-4OWTNZSL.mjs.map +0 -1
  183. package/dist/mermaid.core-7AUE4M6E.mjs +0 -1587
  184. package/dist/mermaid.core-7AUE4M6E.mjs.map +0 -1
  185. package/dist/mindmap-definition-VGOIOE7T-7FMA2CPY.mjs +0 -1112
  186. package/dist/mindmap-definition-VGOIOE7T-7FMA2CPY.mjs.map +0 -1
  187. package/dist/mindmap-definition-VGOIOE7T-VNF7JZOY.mjs +0 -1112
  188. package/dist/mindmap-definition-VGOIOE7T-VNF7JZOY.mjs.map +0 -1
  189. package/dist/nim-HUBKBJHZ.mjs +0 -26
  190. package/dist/nim-HUBKBJHZ.mjs.map +0 -1
  191. package/dist/perl-QHAMWWQ5.mjs +0 -22
  192. package/dist/perl-QHAMWWQ5.mjs.map +0 -1
  193. package/dist/php-FS5GKSPN.mjs +0 -11
  194. package/dist/php-FS5GKSPN.mjs.map +0 -1
  195. package/dist/pieDiagram-ADFJNKIX-EER3WTCU.mjs +0 -200
  196. package/dist/pieDiagram-ADFJNKIX-EER3WTCU.mjs.map +0 -1
  197. package/dist/pug-WTY5FMEA.mjs +0 -17
  198. package/dist/pug-WTY5FMEA.mjs.map +0 -1
  199. package/dist/quadrantDiagram-AYHSOK5B-WQCIRJOK.mjs +0 -1344
  200. package/dist/quadrantDiagram-AYHSOK5B-WQCIRJOK.mjs.map +0 -1
  201. package/dist/razor-BAB7LFWZ.mjs +0 -17
  202. package/dist/razor-BAB7LFWZ.mjs.map +0 -1
  203. package/dist/requirementDiagram-UZGBJVZJ-RVM6Q2TT.mjs +0 -1179
  204. package/dist/requirementDiagram-UZGBJVZJ-RVM6Q2TT.mjs.map +0 -1
  205. package/dist/rst-AY7U27YM.mjs +0 -41
  206. package/dist/rst-AY7U27YM.mjs.map +0 -1
  207. package/dist/rst-Y2VLYMJI.mjs +0 -41
  208. package/dist/rst-Y2VLYMJI.mjs.map +0 -1
  209. package/dist/ruby-K4BNEYWG.mjs +0 -22
  210. package/dist/ruby-K4BNEYWG.mjs.map +0 -1
  211. package/dist/sankeyDiagram-TZEHDZUN-H7BVEXGO.mjs +0 -1230
  212. package/dist/sankeyDiagram-TZEHDZUN-H7BVEXGO.mjs.map +0 -1
  213. package/dist/sequenceDiagram-WL72ISMW-XBGZSOYI.mjs +0 -3885
  214. package/dist/sequenceDiagram-WL72ISMW-XBGZSOYI.mjs.map +0 -1
  215. package/dist/soy-5QMQV2KL.mjs +0 -15
  216. package/dist/soy-5QMQV2KL.mjs.map +0 -1
  217. package/dist/stateDiagram-FKZM4ZOC-WRIBVFSJ.mjs +0 -467
  218. package/dist/stateDiagram-FKZM4ZOC-WRIBVFSJ.mjs.map +0 -1
  219. package/dist/stateDiagram-v2-4FDKWEC3-SPDO7R6D.mjs +0 -37
  220. package/dist/stateDiagram-v2-4FDKWEC3-SPDO7R6D.mjs.map +0 -1
  221. package/dist/templ-VSARRSO2.mjs +0 -17
  222. package/dist/templ-VSARRSO2.mjs.map +0 -1
  223. package/dist/timeline-definition-IT6M3QCI-PX4A2RIH.mjs +0 -1226
  224. package/dist/timeline-definition-IT6M3QCI-PX4A2RIH.mjs.map +0 -1
  225. package/dist/ts-tags-YK3Q2LIW.mjs +0 -68
  226. package/dist/ts-tags-YK3Q2LIW.mjs.map +0 -1
  227. package/dist/twig-HNMWLN6H.mjs +0 -40
  228. package/dist/twig-HNMWLN6H.mjs.map +0 -1
  229. package/dist/vue-7OSX6ZY5.mjs +0 -10
  230. package/dist/vue-7OSX6ZY5.mjs.map +0 -1
  231. package/dist/vue-html-AQH2V2EU.mjs +0 -20
  232. package/dist/vue-html-AQH2V2EU.mjs.map +0 -1
  233. package/dist/vue-vine-GCYT2IGV.mjs +0 -29
  234. package/dist/vue-vine-GCYT2IGV.mjs.map +0 -1
  235. package/dist/xychartDiagram-PRI3JC2R-65KZQZDU.mjs +0 -1865
  236. package/dist/xychartDiagram-PRI3JC2R-65KZQZDU.mjs.map +0 -1
@@ -1,1175 +0,0 @@
1
- import { getDiagramElement } from './chunk-7EWC2ACY.mjs';
2
- import { setupViewPortForSVG } from './chunk-2BAFECUC.mjs';
3
- import { getRegisteredLayoutAlgorithm, render } from './chunk-BF5LDW2L.mjs';
4
- import './chunk-ENI667QL.mjs';
5
- import './chunk-KFMFHSJF.mjs';
6
- import './chunk-M3UH7XZX.mjs';
7
- import './chunk-6WA5F2SG.mjs';
8
- import './chunk-YIDZOZG3.mjs';
9
- import './chunk-BUEC2HNL.mjs';
10
- import { getEdgeId, utils_default } from './chunk-GU7334FJ.mjs';
11
- import './chunk-ZGPFSRJJ.mjs';
12
- import { setAccTitle, getAccTitle, setAccDescription, getAccDescription, setDiagramTitle, getDiagramTitle, getConfig2, clear, channel_default, rgba_default } from './chunk-HNKEYT4A.mjs';
13
- import './chunk-7O6EKIFY.mjs';
14
- import { __name, log, __export, select_default } from './chunk-WHXHCOFP.mjs';
15
- import './chunk-RAC6KEKF.mjs';
16
- import './chunk-SH6YXSHR.mjs';
17
-
18
- // ../../node_modules/.pnpm/mermaid@11.12.0/node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-Q2GNP2WA.mjs
19
- var parser = function() {
20
- var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
21
- for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
22
- return o2;
23
- }, "o"), $V0 = [6, 8, 10, 22, 24, 26, 28, 33, 34, 35, 36, 37, 40, 43, 44, 50], $V1 = [1, 10], $V2 = [1, 11], $V3 = [1, 12], $V4 = [1, 13], $V5 = [1, 20], $V6 = [1, 21], $V7 = [1, 22], $V8 = [1, 23], $V9 = [1, 24], $Va = [1, 19], $Vb = [1, 25], $Vc = [1, 26], $Vd = [1, 18], $Ve = [1, 33], $Vf = [1, 34], $Vg = [1, 35], $Vh = [1, 36], $Vi = [1, 37], $Vj = [6, 8, 10, 13, 15, 17, 20, 21, 22, 24, 26, 28, 33, 34, 35, 36, 37, 40, 43, 44, 50, 63, 64, 65, 66, 67], $Vk = [1, 42], $Vl = [1, 43], $Vm = [1, 52], $Vn = [40, 50, 68, 69], $Vo = [1, 63], $Vp = [1, 61], $Vq = [1, 58], $Vr = [1, 62], $Vs = [1, 64], $Vt = [6, 8, 10, 13, 17, 22, 24, 26, 28, 33, 34, 35, 36, 37, 40, 41, 42, 43, 44, 48, 49, 50, 63, 64, 65, 66, 67], $Vu = [63, 64, 65, 66, 67], $Vv = [1, 81], $Vw = [1, 80], $Vx = [1, 78], $Vy = [1, 79], $Vz = [6, 10, 42, 47], $VA = [6, 10, 13, 41, 42, 47, 48, 49], $VB = [1, 89], $VC = [1, 88], $VD = [1, 87], $VE = [19, 56], $VF = [1, 98], $VG = [1, 97], $VH = [19, 56, 58, 60];
24
- var parser2 = {
25
- trace: /* @__PURE__ */ __name(function trace() {
26
- }, "trace"),
27
- yy: {},
28
- symbols_: { "error": 2, "start": 3, "ER_DIAGRAM": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NEWLINE": 10, "entityName": 11, "relSpec": 12, "COLON": 13, "role": 14, "STYLE_SEPARATOR": 15, "idList": 16, "BLOCK_START": 17, "attributes": 18, "BLOCK_STOP": 19, "SQS": 20, "SQE": 21, "title": 22, "title_value": 23, "acc_title": 24, "acc_title_value": 25, "acc_descr": 26, "acc_descr_value": 27, "acc_descr_multiline_value": 28, "direction": 29, "classDefStatement": 30, "classStatement": 31, "styleStatement": 32, "direction_tb": 33, "direction_bt": 34, "direction_rl": 35, "direction_lr": 36, "CLASSDEF": 37, "stylesOpt": 38, "separator": 39, "UNICODE_TEXT": 40, "STYLE_TEXT": 41, "COMMA": 42, "CLASS": 43, "STYLE": 44, "style": 45, "styleComponent": 46, "SEMI": 47, "NUM": 48, "BRKT": 49, "ENTITY_NAME": 50, "attribute": 51, "attributeType": 52, "attributeName": 53, "attributeKeyTypeList": 54, "attributeComment": 55, "ATTRIBUTE_WORD": 56, "attributeKeyType": 57, ",": 58, "ATTRIBUTE_KEY": 59, "COMMENT": 60, "cardinality": 61, "relType": 62, "ZERO_OR_ONE": 63, "ZERO_OR_MORE": 64, "ONE_OR_MORE": 65, "ONLY_ONE": 66, "MD_PARENT": 67, "NON_IDENTIFYING": 68, "IDENTIFYING": 69, "WORD": 70, "$accept": 0, "$end": 1 },
29
- terminals_: { 2: "error", 4: "ER_DIAGRAM", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 13: "COLON", 15: "STYLE_SEPARATOR", 17: "BLOCK_START", 19: "BLOCK_STOP", 20: "SQS", 21: "SQE", 22: "title", 23: "title_value", 24: "acc_title", 25: "acc_title_value", 26: "acc_descr", 27: "acc_descr_value", 28: "acc_descr_multiline_value", 33: "direction_tb", 34: "direction_bt", 35: "direction_rl", 36: "direction_lr", 37: "CLASSDEF", 40: "UNICODE_TEXT", 41: "STYLE_TEXT", 42: "COMMA", 43: "CLASS", 44: "STYLE", 47: "SEMI", 48: "NUM", 49: "BRKT", 50: "ENTITY_NAME", 56: "ATTRIBUTE_WORD", 58: ",", 59: "ATTRIBUTE_KEY", 60: "COMMENT", 63: "ZERO_OR_ONE", 64: "ZERO_OR_MORE", 65: "ONE_OR_MORE", 66: "ONLY_ONE", 67: "MD_PARENT", 68: "NON_IDENTIFYING", 69: "IDENTIFYING", 70: "WORD" },
30
- productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 5], [9, 9], [9, 7], [9, 7], [9, 4], [9, 6], [9, 3], [9, 5], [9, 1], [9, 3], [9, 7], [9, 9], [9, 6], [9, 8], [9, 4], [9, 6], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [29, 1], [29, 1], [29, 1], [29, 1], [30, 4], [16, 1], [16, 1], [16, 3], [16, 3], [31, 3], [32, 4], [38, 1], [38, 3], [45, 1], [45, 2], [39, 1], [39, 1], [39, 1], [46, 1], [46, 1], [46, 1], [46, 1], [11, 1], [11, 1], [18, 1], [18, 2], [51, 2], [51, 3], [51, 3], [51, 4], [52, 1], [53, 1], [54, 1], [54, 3], [57, 1], [55, 1], [12, 3], [61, 1], [61, 1], [61, 1], [61, 1], [61, 1], [62, 1], [62, 1], [14, 1], [14, 1], [14, 1]],
31
- performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
32
- var $0 = $$.length - 1;
33
- switch (yystate) {
34
- case 1:
35
- break;
36
- case 2:
37
- this.$ = [];
38
- break;
39
- case 3:
40
- $$[$0 - 1].push($$[$0]);
41
- this.$ = $$[$0 - 1];
42
- break;
43
- case 4:
44
- case 5:
45
- this.$ = $$[$0];
46
- break;
47
- case 6:
48
- case 7:
49
- this.$ = [];
50
- break;
51
- case 8:
52
- yy.addEntity($$[$0 - 4]);
53
- yy.addEntity($$[$0 - 2]);
54
- yy.addRelationship($$[$0 - 4], $$[$0], $$[$0 - 2], $$[$0 - 3]);
55
- break;
56
- case 9:
57
- yy.addEntity($$[$0 - 8]);
58
- yy.addEntity($$[$0 - 4]);
59
- yy.addRelationship($$[$0 - 8], $$[$0], $$[$0 - 4], $$[$0 - 5]);
60
- yy.setClass([$$[$0 - 8]], $$[$0 - 6]);
61
- yy.setClass([$$[$0 - 4]], $$[$0 - 2]);
62
- break;
63
- case 10:
64
- yy.addEntity($$[$0 - 6]);
65
- yy.addEntity($$[$0 - 2]);
66
- yy.addRelationship($$[$0 - 6], $$[$0], $$[$0 - 2], $$[$0 - 3]);
67
- yy.setClass([$$[$0 - 6]], $$[$0 - 4]);
68
- break;
69
- case 11:
70
- yy.addEntity($$[$0 - 6]);
71
- yy.addEntity($$[$0 - 4]);
72
- yy.addRelationship($$[$0 - 6], $$[$0], $$[$0 - 4], $$[$0 - 5]);
73
- yy.setClass([$$[$0 - 4]], $$[$0 - 2]);
74
- break;
75
- case 12:
76
- yy.addEntity($$[$0 - 3]);
77
- yy.addAttributes($$[$0 - 3], $$[$0 - 1]);
78
- break;
79
- case 13:
80
- yy.addEntity($$[$0 - 5]);
81
- yy.addAttributes($$[$0 - 5], $$[$0 - 1]);
82
- yy.setClass([$$[$0 - 5]], $$[$0 - 3]);
83
- break;
84
- case 14:
85
- yy.addEntity($$[$0 - 2]);
86
- break;
87
- case 15:
88
- yy.addEntity($$[$0 - 4]);
89
- yy.setClass([$$[$0 - 4]], $$[$0 - 2]);
90
- break;
91
- case 16:
92
- yy.addEntity($$[$0]);
93
- break;
94
- case 17:
95
- yy.addEntity($$[$0 - 2]);
96
- yy.setClass([$$[$0 - 2]], $$[$0]);
97
- break;
98
- case 18:
99
- yy.addEntity($$[$0 - 6], $$[$0 - 4]);
100
- yy.addAttributes($$[$0 - 6], $$[$0 - 1]);
101
- break;
102
- case 19:
103
- yy.addEntity($$[$0 - 8], $$[$0 - 6]);
104
- yy.addAttributes($$[$0 - 8], $$[$0 - 1]);
105
- yy.setClass([$$[$0 - 8]], $$[$0 - 3]);
106
- break;
107
- case 20:
108
- yy.addEntity($$[$0 - 5], $$[$0 - 3]);
109
- break;
110
- case 21:
111
- yy.addEntity($$[$0 - 7], $$[$0 - 5]);
112
- yy.setClass([$$[$0 - 7]], $$[$0 - 2]);
113
- break;
114
- case 22:
115
- yy.addEntity($$[$0 - 3], $$[$0 - 1]);
116
- break;
117
- case 23:
118
- yy.addEntity($$[$0 - 5], $$[$0 - 3]);
119
- yy.setClass([$$[$0 - 5]], $$[$0]);
120
- break;
121
- case 24:
122
- case 25:
123
- this.$ = $$[$0].trim();
124
- yy.setAccTitle(this.$);
125
- break;
126
- case 26:
127
- case 27:
128
- this.$ = $$[$0].trim();
129
- yy.setAccDescription(this.$);
130
- break;
131
- case 32:
132
- yy.setDirection("TB");
133
- break;
134
- case 33:
135
- yy.setDirection("BT");
136
- break;
137
- case 34:
138
- yy.setDirection("RL");
139
- break;
140
- case 35:
141
- yy.setDirection("LR");
142
- break;
143
- case 36:
144
- this.$ = $$[$0 - 3];
145
- yy.addClass($$[$0 - 2], $$[$0 - 1]);
146
- break;
147
- case 37:
148
- case 38:
149
- case 56:
150
- case 64:
151
- this.$ = [$$[$0]];
152
- break;
153
- case 39:
154
- case 40:
155
- this.$ = $$[$0 - 2].concat([$$[$0]]);
156
- break;
157
- case 41:
158
- this.$ = $$[$0 - 2];
159
- yy.setClass($$[$0 - 1], $$[$0]);
160
- break;
161
- case 42:
162
- this.$ = $$[$0 - 3];
163
- yy.addCssStyles($$[$0 - 2], $$[$0 - 1]);
164
- break;
165
- case 43:
166
- this.$ = [$$[$0]];
167
- break;
168
- case 44:
169
- $$[$0 - 2].push($$[$0]);
170
- this.$ = $$[$0 - 2];
171
- break;
172
- case 46:
173
- this.$ = $$[$0 - 1] + $$[$0];
174
- break;
175
- case 54:
176
- case 76:
177
- case 77:
178
- this.$ = $$[$0].replace(/"/g, "");
179
- break;
180
- case 55:
181
- case 78:
182
- this.$ = $$[$0];
183
- break;
184
- case 57:
185
- $$[$0].push($$[$0 - 1]);
186
- this.$ = $$[$0];
187
- break;
188
- case 58:
189
- this.$ = { type: $$[$0 - 1], name: $$[$0] };
190
- break;
191
- case 59:
192
- this.$ = { type: $$[$0 - 2], name: $$[$0 - 1], keys: $$[$0] };
193
- break;
194
- case 60:
195
- this.$ = { type: $$[$0 - 2], name: $$[$0 - 1], comment: $$[$0] };
196
- break;
197
- case 61:
198
- this.$ = { type: $$[$0 - 3], name: $$[$0 - 2], keys: $$[$0 - 1], comment: $$[$0] };
199
- break;
200
- case 62:
201
- case 63:
202
- case 66:
203
- this.$ = $$[$0];
204
- break;
205
- case 65:
206
- $$[$0 - 2].push($$[$0]);
207
- this.$ = $$[$0 - 2];
208
- break;
209
- case 67:
210
- this.$ = $$[$0].replace(/"/g, "");
211
- break;
212
- case 68:
213
- this.$ = { cardA: $$[$0], relType: $$[$0 - 1], cardB: $$[$0 - 2] };
214
- break;
215
- case 69:
216
- this.$ = yy.Cardinality.ZERO_OR_ONE;
217
- break;
218
- case 70:
219
- this.$ = yy.Cardinality.ZERO_OR_MORE;
220
- break;
221
- case 71:
222
- this.$ = yy.Cardinality.ONE_OR_MORE;
223
- break;
224
- case 72:
225
- this.$ = yy.Cardinality.ONLY_ONE;
226
- break;
227
- case 73:
228
- this.$ = yy.Cardinality.MD_PARENT;
229
- break;
230
- case 74:
231
- this.$ = yy.Identification.NON_IDENTIFYING;
232
- break;
233
- case 75:
234
- this.$ = yy.Identification.IDENTIFYING;
235
- break;
236
- }
237
- }, "anonymous"),
238
- table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 9, 22: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 14, 30: 15, 31: 16, 32: 17, 33: $V5, 34: $V6, 35: $V7, 36: $V8, 37: $V9, 40: $Va, 43: $Vb, 44: $Vc, 50: $Vd }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 27, 11: 9, 22: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 14, 30: 15, 31: 16, 32: 17, 33: $V5, 34: $V6, 35: $V7, 36: $V8, 37: $V9, 40: $Va, 43: $Vb, 44: $Vc, 50: $Vd }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 16], { 12: 28, 61: 32, 15: [1, 29], 17: [1, 30], 20: [1, 31], 63: $Ve, 64: $Vf, 65: $Vg, 66: $Vh, 67: $Vi }), { 23: [1, 38] }, { 25: [1, 39] }, { 27: [1, 40] }, o($V0, [2, 27]), o($V0, [2, 28]), o($V0, [2, 29]), o($V0, [2, 30]), o($V0, [2, 31]), o($Vj, [2, 54]), o($Vj, [2, 55]), o($V0, [2, 32]), o($V0, [2, 33]), o($V0, [2, 34]), o($V0, [2, 35]), { 16: 41, 40: $Vk, 41: $Vl }, { 16: 44, 40: $Vk, 41: $Vl }, { 16: 45, 40: $Vk, 41: $Vl }, o($V0, [2, 4]), { 11: 46, 40: $Va, 50: $Vd }, { 16: 47, 40: $Vk, 41: $Vl }, { 18: 48, 19: [1, 49], 51: 50, 52: 51, 56: $Vm }, { 11: 53, 40: $Va, 50: $Vd }, { 62: 54, 68: [1, 55], 69: [1, 56] }, o($Vn, [2, 69]), o($Vn, [2, 70]), o($Vn, [2, 71]), o($Vn, [2, 72]), o($Vn, [2, 73]), o($V0, [2, 24]), o($V0, [2, 25]), o($V0, [2, 26]), { 13: $Vo, 38: 57, 41: $Vp, 42: $Vq, 45: 59, 46: 60, 48: $Vr, 49: $Vs }, o($Vt, [2, 37]), o($Vt, [2, 38]), { 16: 65, 40: $Vk, 41: $Vl, 42: $Vq }, { 13: $Vo, 38: 66, 41: $Vp, 42: $Vq, 45: 59, 46: 60, 48: $Vr, 49: $Vs }, { 13: [1, 67], 15: [1, 68] }, o($V0, [2, 17], { 61: 32, 12: 69, 17: [1, 70], 42: $Vq, 63: $Ve, 64: $Vf, 65: $Vg, 66: $Vh, 67: $Vi }), { 19: [1, 71] }, o($V0, [2, 14]), { 18: 72, 19: [2, 56], 51: 50, 52: 51, 56: $Vm }, { 53: 73, 56: [1, 74] }, { 56: [2, 62] }, { 21: [1, 75] }, { 61: 76, 63: $Ve, 64: $Vf, 65: $Vg, 66: $Vh, 67: $Vi }, o($Vu, [2, 74]), o($Vu, [2, 75]), { 6: $Vv, 10: $Vw, 39: 77, 42: $Vx, 47: $Vy }, { 40: [1, 82], 41: [1, 83] }, o($Vz, [2, 43], { 46: 84, 13: $Vo, 41: $Vp, 48: $Vr, 49: $Vs }), o($VA, [2, 45]), o($VA, [2, 50]), o($VA, [2, 51]), o($VA, [2, 52]), o($VA, [2, 53]), o($V0, [2, 41], { 42: $Vq }), { 6: $Vv, 10: $Vw, 39: 85, 42: $Vx, 47: $Vy }, { 14: 86, 40: $VB, 50: $VC, 70: $VD }, { 16: 90, 40: $Vk, 41: $Vl }, { 11: 91, 40: $Va, 50: $Vd }, { 18: 92, 19: [1, 93], 51: 50, 52: 51, 56: $Vm }, o($V0, [2, 12]), { 19: [2, 57] }, o($VE, [2, 58], { 54: 94, 55: 95, 57: 96, 59: $VF, 60: $VG }), o([19, 56, 59, 60], [2, 63]), o($V0, [2, 22], { 15: [1, 100], 17: [1, 99] }), o([40, 50], [2, 68]), o($V0, [2, 36]), { 13: $Vo, 41: $Vp, 45: 101, 46: 60, 48: $Vr, 49: $Vs }, o($V0, [2, 47]), o($V0, [2, 48]), o($V0, [2, 49]), o($Vt, [2, 39]), o($Vt, [2, 40]), o($VA, [2, 46]), o($V0, [2, 42]), o($V0, [2, 8]), o($V0, [2, 76]), o($V0, [2, 77]), o($V0, [2, 78]), { 13: [1, 102], 42: $Vq }, { 13: [1, 104], 15: [1, 103] }, { 19: [1, 105] }, o($V0, [2, 15]), o($VE, [2, 59], { 55: 106, 58: [1, 107], 60: $VG }), o($VE, [2, 60]), o($VH, [2, 64]), o($VE, [2, 67]), o($VH, [2, 66]), { 18: 108, 19: [1, 109], 51: 50, 52: 51, 56: $Vm }, { 16: 110, 40: $Vk, 41: $Vl }, o($Vz, [2, 44], { 46: 84, 13: $Vo, 41: $Vp, 48: $Vr, 49: $Vs }), { 14: 111, 40: $VB, 50: $VC, 70: $VD }, { 16: 112, 40: $Vk, 41: $Vl }, { 14: 113, 40: $VB, 50: $VC, 70: $VD }, o($V0, [2, 13]), o($VE, [2, 61]), { 57: 114, 59: $VF }, { 19: [1, 115] }, o($V0, [2, 20]), o($V0, [2, 23], { 17: [1, 116], 42: $Vq }), o($V0, [2, 11]), { 13: [1, 117], 42: $Vq }, o($V0, [2, 10]), o($VH, [2, 65]), o($V0, [2, 18]), { 18: 118, 19: [1, 119], 51: 50, 52: 51, 56: $Vm }, { 14: 120, 40: $VB, 50: $VC, 70: $VD }, { 19: [1, 121] }, o($V0, [2, 21]), o($V0, [2, 9]), o($V0, [2, 19])],
239
- defaultActions: { 52: [2, 62], 72: [2, 57] },
240
- parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
241
- if (hash.recoverable) {
242
- this.trace(str);
243
- } else {
244
- var error = new Error(str);
245
- error.hash = hash;
246
- throw error;
247
- }
248
- }, "parseError"),
249
- parse: /* @__PURE__ */ __name(function parse(input) {
250
- var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
251
- var args = lstack.slice.call(arguments, 1);
252
- var lexer2 = Object.create(this.lexer);
253
- var sharedState = { yy: {} };
254
- for (var k in this.yy) {
255
- if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
256
- sharedState.yy[k] = this.yy[k];
257
- }
258
- }
259
- lexer2.setInput(input, sharedState.yy);
260
- sharedState.yy.lexer = lexer2;
261
- sharedState.yy.parser = this;
262
- if (typeof lexer2.yylloc == "undefined") {
263
- lexer2.yylloc = {};
264
- }
265
- var yyloc = lexer2.yylloc;
266
- lstack.push(yyloc);
267
- var ranges = lexer2.options && lexer2.options.ranges;
268
- if (typeof sharedState.yy.parseError === "function") {
269
- this.parseError = sharedState.yy.parseError;
270
- } else {
271
- this.parseError = Object.getPrototypeOf(this).parseError;
272
- }
273
- function popStack(n) {
274
- stack.length = stack.length - 2 * n;
275
- vstack.length = vstack.length - n;
276
- lstack.length = lstack.length - n;
277
- }
278
- __name(popStack, "popStack");
279
- function lex() {
280
- var token;
281
- token = tstack.pop() || lexer2.lex() || EOF;
282
- if (typeof token !== "number") {
283
- if (token instanceof Array) {
284
- tstack = token;
285
- token = tstack.pop();
286
- }
287
- token = self.symbols_[token] || token;
288
- }
289
- return token;
290
- }
291
- __name(lex, "lex");
292
- var symbol, state, action, r, yyval = {}, p, len, newState, expected;
293
- while (true) {
294
- state = stack[stack.length - 1];
295
- if (this.defaultActions[state]) {
296
- action = this.defaultActions[state];
297
- } else {
298
- if (symbol === null || typeof symbol == "undefined") {
299
- symbol = lex();
300
- }
301
- action = table[state] && table[state][symbol];
302
- }
303
- if (typeof action === "undefined" || !action.length || !action[0]) {
304
- var errStr = "";
305
- expected = [];
306
- for (p in table[state]) {
307
- if (this.terminals_[p] && p > TERROR) {
308
- expected.push("'" + this.terminals_[p] + "'");
309
- }
310
- }
311
- if (lexer2.showPosition) {
312
- errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
313
- } else {
314
- errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
315
- }
316
- this.parseError(errStr, {
317
- text: lexer2.match,
318
- token: this.terminals_[symbol] || symbol,
319
- line: lexer2.yylineno,
320
- loc: yyloc,
321
- expected
322
- });
323
- }
324
- if (action[0] instanceof Array && action.length > 1) {
325
- throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
326
- }
327
- switch (action[0]) {
328
- case 1:
329
- stack.push(symbol);
330
- vstack.push(lexer2.yytext);
331
- lstack.push(lexer2.yylloc);
332
- stack.push(action[1]);
333
- symbol = null;
334
- {
335
- yyleng = lexer2.yyleng;
336
- yytext = lexer2.yytext;
337
- yylineno = lexer2.yylineno;
338
- yyloc = lexer2.yylloc;
339
- }
340
- break;
341
- case 2:
342
- len = this.productions_[action[1]][1];
343
- yyval.$ = vstack[vstack.length - len];
344
- yyval._$ = {
345
- first_line: lstack[lstack.length - (len || 1)].first_line,
346
- last_line: lstack[lstack.length - 1].last_line,
347
- first_column: lstack[lstack.length - (len || 1)].first_column,
348
- last_column: lstack[lstack.length - 1].last_column
349
- };
350
- if (ranges) {
351
- yyval._$.range = [
352
- lstack[lstack.length - (len || 1)].range[0],
353
- lstack[lstack.length - 1].range[1]
354
- ];
355
- }
356
- r = this.performAction.apply(yyval, [
357
- yytext,
358
- yyleng,
359
- yylineno,
360
- sharedState.yy,
361
- action[1],
362
- vstack,
363
- lstack
364
- ].concat(args));
365
- if (typeof r !== "undefined") {
366
- return r;
367
- }
368
- if (len) {
369
- stack = stack.slice(0, -1 * len * 2);
370
- vstack = vstack.slice(0, -1 * len);
371
- lstack = lstack.slice(0, -1 * len);
372
- }
373
- stack.push(this.productions_[action[1]][0]);
374
- vstack.push(yyval.$);
375
- lstack.push(yyval._$);
376
- newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
377
- stack.push(newState);
378
- break;
379
- case 3:
380
- return true;
381
- }
382
- }
383
- return true;
384
- }, "parse")
385
- };
386
- var lexer = /* @__PURE__ */ function() {
387
- var lexer2 = {
388
- EOF: 1,
389
- parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
390
- if (this.yy.parser) {
391
- this.yy.parser.parseError(str, hash);
392
- } else {
393
- throw new Error(str);
394
- }
395
- }, "parseError"),
396
- // resets the lexer, sets new input
397
- setInput: /* @__PURE__ */ __name(function(input, yy) {
398
- this.yy = yy || this.yy || {};
399
- this._input = input;
400
- this._more = this._backtrack = this.done = false;
401
- this.yylineno = this.yyleng = 0;
402
- this.yytext = this.matched = this.match = "";
403
- this.conditionStack = ["INITIAL"];
404
- this.yylloc = {
405
- first_line: 1,
406
- first_column: 0,
407
- last_line: 1,
408
- last_column: 0
409
- };
410
- if (this.options.ranges) {
411
- this.yylloc.range = [0, 0];
412
- }
413
- this.offset = 0;
414
- return this;
415
- }, "setInput"),
416
- // consumes and returns one char from the input
417
- input: /* @__PURE__ */ __name(function() {
418
- var ch = this._input[0];
419
- this.yytext += ch;
420
- this.yyleng++;
421
- this.offset++;
422
- this.match += ch;
423
- this.matched += ch;
424
- var lines = ch.match(/(?:\r\n?|\n).*/g);
425
- if (lines) {
426
- this.yylineno++;
427
- this.yylloc.last_line++;
428
- } else {
429
- this.yylloc.last_column++;
430
- }
431
- if (this.options.ranges) {
432
- this.yylloc.range[1]++;
433
- }
434
- this._input = this._input.slice(1);
435
- return ch;
436
- }, "input"),
437
- // unshifts one char (or a string) into the input
438
- unput: /* @__PURE__ */ __name(function(ch) {
439
- var len = ch.length;
440
- var lines = ch.split(/(?:\r\n?|\n)/g);
441
- this._input = ch + this._input;
442
- this.yytext = this.yytext.substr(0, this.yytext.length - len);
443
- this.offset -= len;
444
- var oldLines = this.match.split(/(?:\r\n?|\n)/g);
445
- this.match = this.match.substr(0, this.match.length - 1);
446
- this.matched = this.matched.substr(0, this.matched.length - 1);
447
- if (lines.length - 1) {
448
- this.yylineno -= lines.length - 1;
449
- }
450
- var r = this.yylloc.range;
451
- this.yylloc = {
452
- first_line: this.yylloc.first_line,
453
- last_line: this.yylineno + 1,
454
- first_column: this.yylloc.first_column,
455
- last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
456
- };
457
- if (this.options.ranges) {
458
- this.yylloc.range = [r[0], r[0] + this.yyleng - len];
459
- }
460
- this.yyleng = this.yytext.length;
461
- return this;
462
- }, "unput"),
463
- // When called from action, caches matched text and appends it on next action
464
- more: /* @__PURE__ */ __name(function() {
465
- this._more = true;
466
- return this;
467
- }, "more"),
468
- // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
469
- reject: /* @__PURE__ */ __name(function() {
470
- if (this.options.backtrack_lexer) {
471
- this._backtrack = true;
472
- } else {
473
- 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).\n" + this.showPosition(), {
474
- text: "",
475
- token: null,
476
- line: this.yylineno
477
- });
478
- }
479
- return this;
480
- }, "reject"),
481
- // retain first n characters of the match
482
- less: /* @__PURE__ */ __name(function(n) {
483
- this.unput(this.match.slice(n));
484
- }, "less"),
485
- // displays already matched input, i.e. for error messages
486
- pastInput: /* @__PURE__ */ __name(function() {
487
- var past = this.matched.substr(0, this.matched.length - this.match.length);
488
- return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
489
- }, "pastInput"),
490
- // displays upcoming input, i.e. for error messages
491
- upcomingInput: /* @__PURE__ */ __name(function() {
492
- var next = this.match;
493
- if (next.length < 20) {
494
- next += this._input.substr(0, 20 - next.length);
495
- }
496
- return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
497
- }, "upcomingInput"),
498
- // displays the character position where the lexing error occurred, i.e. for error messages
499
- showPosition: /* @__PURE__ */ __name(function() {
500
- var pre = this.pastInput();
501
- var c = new Array(pre.length + 1).join("-");
502
- return pre + this.upcomingInput() + "\n" + c + "^";
503
- }, "showPosition"),
504
- // test the lexed token: return FALSE when not a match, otherwise return token
505
- test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {
506
- var token, lines, backup;
507
- if (this.options.backtrack_lexer) {
508
- backup = {
509
- yylineno: this.yylineno,
510
- yylloc: {
511
- first_line: this.yylloc.first_line,
512
- last_line: this.last_line,
513
- first_column: this.yylloc.first_column,
514
- last_column: this.yylloc.last_column
515
- },
516
- yytext: this.yytext,
517
- match: this.match,
518
- matches: this.matches,
519
- matched: this.matched,
520
- yyleng: this.yyleng,
521
- offset: this.offset,
522
- _more: this._more,
523
- _input: this._input,
524
- yy: this.yy,
525
- conditionStack: this.conditionStack.slice(0),
526
- done: this.done
527
- };
528
- if (this.options.ranges) {
529
- backup.yylloc.range = this.yylloc.range.slice(0);
530
- }
531
- }
532
- lines = match[0].match(/(?:\r\n?|\n).*/g);
533
- if (lines) {
534
- this.yylineno += lines.length;
535
- }
536
- this.yylloc = {
537
- first_line: this.yylloc.last_line,
538
- last_line: this.yylineno + 1,
539
- first_column: this.yylloc.last_column,
540
- last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
541
- };
542
- this.yytext += match[0];
543
- this.match += match[0];
544
- this.matches = match;
545
- this.yyleng = this.yytext.length;
546
- if (this.options.ranges) {
547
- this.yylloc.range = [this.offset, this.offset += this.yyleng];
548
- }
549
- this._more = false;
550
- this._backtrack = false;
551
- this._input = this._input.slice(match[0].length);
552
- this.matched += match[0];
553
- token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
554
- if (this.done && this._input) {
555
- this.done = false;
556
- }
557
- if (token) {
558
- return token;
559
- } else if (this._backtrack) {
560
- for (var k in backup) {
561
- this[k] = backup[k];
562
- }
563
- return false;
564
- }
565
- return false;
566
- }, "test_match"),
567
- // return next match in input
568
- next: /* @__PURE__ */ __name(function() {
569
- if (this.done) {
570
- return this.EOF;
571
- }
572
- if (!this._input) {
573
- this.done = true;
574
- }
575
- var token, match, tempMatch, index;
576
- if (!this._more) {
577
- this.yytext = "";
578
- this.match = "";
579
- }
580
- var rules = this._currentRules();
581
- for (var i = 0; i < rules.length; i++) {
582
- tempMatch = this._input.match(this.rules[rules[i]]);
583
- if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
584
- match = tempMatch;
585
- index = i;
586
- if (this.options.backtrack_lexer) {
587
- token = this.test_match(tempMatch, rules[i]);
588
- if (token !== false) {
589
- return token;
590
- } else if (this._backtrack) {
591
- match = false;
592
- continue;
593
- } else {
594
- return false;
595
- }
596
- } else if (!this.options.flex) {
597
- break;
598
- }
599
- }
600
- }
601
- if (match) {
602
- token = this.test_match(match, rules[index]);
603
- if (token !== false) {
604
- return token;
605
- }
606
- return false;
607
- }
608
- if (this._input === "") {
609
- return this.EOF;
610
- } else {
611
- return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
612
- text: "",
613
- token: null,
614
- line: this.yylineno
615
- });
616
- }
617
- }, "next"),
618
- // return next match that has a token
619
- lex: /* @__PURE__ */ __name(function lex() {
620
- var r = this.next();
621
- if (r) {
622
- return r;
623
- } else {
624
- return this.lex();
625
- }
626
- }, "lex"),
627
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
628
- begin: /* @__PURE__ */ __name(function begin(condition) {
629
- this.conditionStack.push(condition);
630
- }, "begin"),
631
- // pop the previously active lexer condition state off the condition stack
632
- popState: /* @__PURE__ */ __name(function popState() {
633
- var n = this.conditionStack.length - 1;
634
- if (n > 0) {
635
- return this.conditionStack.pop();
636
- } else {
637
- return this.conditionStack[0];
638
- }
639
- }, "popState"),
640
- // produce the lexer rule set which is active for the currently active lexer condition state
641
- _currentRules: /* @__PURE__ */ __name(function _currentRules() {
642
- if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
643
- return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
644
- } else {
645
- return this.conditions["INITIAL"].rules;
646
- }
647
- }, "_currentRules"),
648
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
649
- topState: /* @__PURE__ */ __name(function topState(n) {
650
- n = this.conditionStack.length - 1 - Math.abs(n || 0);
651
- if (n >= 0) {
652
- return this.conditionStack[n];
653
- } else {
654
- return "INITIAL";
655
- }
656
- }, "topState"),
657
- // alias for begin(condition)
658
- pushState: /* @__PURE__ */ __name(function pushState(condition) {
659
- this.begin(condition);
660
- }, "pushState"),
661
- // return the number of states currently on the stack
662
- stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {
663
- return this.conditionStack.length;
664
- }, "stateStackSize"),
665
- options: { "case-insensitive": true },
666
- performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
667
- switch ($avoiding_name_collisions) {
668
- case 0:
669
- this.begin("acc_title");
670
- return 24;
671
- case 1:
672
- this.popState();
673
- return "acc_title_value";
674
- case 2:
675
- this.begin("acc_descr");
676
- return 26;
677
- case 3:
678
- this.popState();
679
- return "acc_descr_value";
680
- case 4:
681
- this.begin("acc_descr_multiline");
682
- break;
683
- case 5:
684
- this.popState();
685
- break;
686
- case 6:
687
- return "acc_descr_multiline_value";
688
- case 7:
689
- return 33;
690
- case 8:
691
- return 34;
692
- case 9:
693
- return 35;
694
- case 10:
695
- return 36;
696
- case 11:
697
- return 10;
698
- case 12:
699
- break;
700
- case 13:
701
- return 8;
702
- case 14:
703
- return 50;
704
- case 15:
705
- return 70;
706
- case 16:
707
- return 4;
708
- case 17:
709
- this.begin("block");
710
- return 17;
711
- case 18:
712
- return 49;
713
- case 19:
714
- return 49;
715
- case 20:
716
- return 42;
717
- case 21:
718
- return 15;
719
- case 22:
720
- return 13;
721
- case 23:
722
- break;
723
- case 24:
724
- return 59;
725
- case 25:
726
- return 56;
727
- case 26:
728
- return 56;
729
- case 27:
730
- return 60;
731
- case 28:
732
- break;
733
- case 29:
734
- this.popState();
735
- return 19;
736
- case 30:
737
- return yy_.yytext[0];
738
- case 31:
739
- return 20;
740
- case 32:
741
- return 21;
742
- case 33:
743
- this.begin("style");
744
- return 44;
745
- case 34:
746
- this.popState();
747
- return 10;
748
- case 35:
749
- break;
750
- case 36:
751
- return 13;
752
- case 37:
753
- return 42;
754
- case 38:
755
- return 49;
756
- case 39:
757
- this.begin("style");
758
- return 37;
759
- case 40:
760
- return 43;
761
- case 41:
762
- return 63;
763
- case 42:
764
- return 65;
765
- case 43:
766
- return 65;
767
- case 44:
768
- return 65;
769
- case 45:
770
- return 63;
771
- case 46:
772
- return 63;
773
- case 47:
774
- return 64;
775
- case 48:
776
- return 64;
777
- case 49:
778
- return 64;
779
- case 50:
780
- return 64;
781
- case 51:
782
- return 64;
783
- case 52:
784
- return 65;
785
- case 53:
786
- return 64;
787
- case 54:
788
- return 65;
789
- case 55:
790
- return 66;
791
- case 56:
792
- return 66;
793
- case 57:
794
- return 66;
795
- case 58:
796
- return 66;
797
- case 59:
798
- return 63;
799
- case 60:
800
- return 64;
801
- case 61:
802
- return 65;
803
- case 62:
804
- return 67;
805
- case 63:
806
- return 68;
807
- case 64:
808
- return 69;
809
- case 65:
810
- return 69;
811
- case 66:
812
- return 68;
813
- case 67:
814
- return 68;
815
- case 68:
816
- return 68;
817
- case 69:
818
- return 41;
819
- case 70:
820
- return 47;
821
- case 71:
822
- return 40;
823
- case 72:
824
- return 48;
825
- case 73:
826
- return yy_.yytext[0];
827
- case 74:
828
- return 6;
829
- }
830
- }, "anonymous"),
831
- rules: [/^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:[\s]+)/i, /^(?:"[^"%\r\n\v\b\\]+")/i, /^(?:"[^"]*")/i, /^(?:erDiagram\b)/i, /^(?:\{)/i, /^(?:#)/i, /^(?:#)/i, /^(?:,)/i, /^(?::::)/i, /^(?::)/i, /^(?:\s+)/i, /^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i, /^(?:([^\s]*)[~].*[~]([^\s]*))/i, /^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i, /^(?:"[^"]*")/i, /^(?:[\n]+)/i, /^(?:\})/i, /^(?:.)/i, /^(?:\[)/i, /^(?:\])/i, /^(?:style\b)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?::)/i, /^(?:,)/i, /^(?:#)/i, /^(?:classDef\b)/i, /^(?:class\b)/i, /^(?:one or zero\b)/i, /^(?:one or more\b)/i, /^(?:one or many\b)/i, /^(?:1\+)/i, /^(?:\|o\b)/i, /^(?:zero or one\b)/i, /^(?:zero or more\b)/i, /^(?:zero or many\b)/i, /^(?:0\+)/i, /^(?:\}o\b)/i, /^(?:many\(0\))/i, /^(?:many\(1\))/i, /^(?:many\b)/i, /^(?:\}\|)/i, /^(?:one\b)/i, /^(?:only one\b)/i, /^(?:1\b)/i, /^(?:\|\|)/i, /^(?:o\|)/i, /^(?:o\{)/i, /^(?:\|\{)/i, /^(?:\s*u\b)/i, /^(?:\.\.)/i, /^(?:--)/i, /^(?:to\b)/i, /^(?:optionally to\b)/i, /^(?:\.-)/i, /^(?:-\.)/i, /^(?:([^\x00-\x7F]|\w|-|\*)+)/i, /^(?:;)/i, /^(?:([^\x00-\x7F]|\w|-|\*)+)/i, /^(?:[0-9])/i, /^(?:.)/i, /^(?:$)/i],
832
- conditions: { "style": { "rules": [34, 35, 36, 37, 38, 69, 70], "inclusive": false }, "acc_descr_multiline": { "rules": [5, 6], "inclusive": false }, "acc_descr": { "rules": [3], "inclusive": false }, "acc_title": { "rules": [1], "inclusive": false }, "block": { "rules": [23, 24, 25, 26, 27, 28, 29, 30], "inclusive": false }, "INITIAL": { "rules": [0, 2, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 31, 32, 33, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 71, 72, 73, 74], "inclusive": true } }
833
- };
834
- return lexer2;
835
- }();
836
- parser2.lexer = lexer;
837
- function Parser() {
838
- this.yy = {};
839
- }
840
- __name(Parser, "Parser");
841
- Parser.prototype = parser2;
842
- parser2.Parser = Parser;
843
- return new Parser();
844
- }();
845
- parser.parser = parser;
846
- var erDiagram_default = parser;
847
- var ErDB = class {
848
- constructor() {
849
- this.entities = /* @__PURE__ */ new Map();
850
- this.relationships = [];
851
- this.classes = /* @__PURE__ */ new Map();
852
- this.direction = "TB";
853
- this.Cardinality = {
854
- ZERO_OR_ONE: "ZERO_OR_ONE",
855
- ZERO_OR_MORE: "ZERO_OR_MORE",
856
- ONE_OR_MORE: "ONE_OR_MORE",
857
- ONLY_ONE: "ONLY_ONE",
858
- MD_PARENT: "MD_PARENT"
859
- };
860
- this.Identification = {
861
- NON_IDENTIFYING: "NON_IDENTIFYING",
862
- IDENTIFYING: "IDENTIFYING"
863
- };
864
- this.setAccTitle = setAccTitle;
865
- this.getAccTitle = getAccTitle;
866
- this.setAccDescription = setAccDescription;
867
- this.getAccDescription = getAccDescription;
868
- this.setDiagramTitle = setDiagramTitle;
869
- this.getDiagramTitle = getDiagramTitle;
870
- this.getConfig = /* @__PURE__ */ __name(() => getConfig2().er, "getConfig");
871
- this.clear();
872
- this.addEntity = this.addEntity.bind(this);
873
- this.addAttributes = this.addAttributes.bind(this);
874
- this.addRelationship = this.addRelationship.bind(this);
875
- this.setDirection = this.setDirection.bind(this);
876
- this.addCssStyles = this.addCssStyles.bind(this);
877
- this.addClass = this.addClass.bind(this);
878
- this.setClass = this.setClass.bind(this);
879
- this.setAccTitle = this.setAccTitle.bind(this);
880
- this.setAccDescription = this.setAccDescription.bind(this);
881
- }
882
- static {
883
- __name(this, "ErDB");
884
- }
885
- /**
886
- * Add entity
887
- * @param name - The name of the entity
888
- * @param alias - The alias of the entity
889
- */
890
- addEntity(name, alias = "") {
891
- if (!this.entities.has(name)) {
892
- this.entities.set(name, {
893
- id: `entity-${name}-${this.entities.size}`,
894
- label: name,
895
- attributes: [],
896
- alias,
897
- shape: "erBox",
898
- look: getConfig2().look ?? "default",
899
- cssClasses: "default",
900
- cssStyles: []
901
- });
902
- log.info("Added new entity :", name);
903
- } else if (!this.entities.get(name)?.alias && alias) {
904
- this.entities.get(name).alias = alias;
905
- log.info(`Add alias '${alias}' to entity '${name}'`);
906
- }
907
- return this.entities.get(name);
908
- }
909
- getEntity(name) {
910
- return this.entities.get(name);
911
- }
912
- getEntities() {
913
- return this.entities;
914
- }
915
- getClasses() {
916
- return this.classes;
917
- }
918
- addAttributes(entityName, attribs) {
919
- const entity = this.addEntity(entityName);
920
- let i;
921
- for (i = attribs.length - 1; i >= 0; i--) {
922
- if (!attribs[i].keys) {
923
- attribs[i].keys = [];
924
- }
925
- if (!attribs[i].comment) {
926
- attribs[i].comment = "";
927
- }
928
- entity.attributes.push(attribs[i]);
929
- log.debug("Added attribute ", attribs[i].name);
930
- }
931
- }
932
- /**
933
- * Add a relationship
934
- *
935
- * @param entA - The first entity in the relationship
936
- * @param rolA - The role played by the first entity in relation to the second
937
- * @param entB - The second entity in the relationship
938
- * @param rSpec - The details of the relationship between the two entities
939
- */
940
- addRelationship(entA, rolA, entB, rSpec) {
941
- const entityA = this.entities.get(entA);
942
- const entityB = this.entities.get(entB);
943
- if (!entityA || !entityB) {
944
- return;
945
- }
946
- const rel = {
947
- entityA: entityA.id,
948
- roleA: rolA,
949
- entityB: entityB.id,
950
- relSpec: rSpec
951
- };
952
- this.relationships.push(rel);
953
- log.debug("Added new relationship :", rel);
954
- }
955
- getRelationships() {
956
- return this.relationships;
957
- }
958
- getDirection() {
959
- return this.direction;
960
- }
961
- setDirection(dir) {
962
- this.direction = dir;
963
- }
964
- getCompiledStyles(classDefs) {
965
- let compiledStyles = [];
966
- for (const customClass of classDefs) {
967
- const cssClass = this.classes.get(customClass);
968
- if (cssClass?.styles) {
969
- compiledStyles = [...compiledStyles, ...cssClass.styles ?? []].map((s) => s.trim());
970
- }
971
- if (cssClass?.textStyles) {
972
- compiledStyles = [...compiledStyles, ...cssClass.textStyles ?? []].map((s) => s.trim());
973
- }
974
- }
975
- return compiledStyles;
976
- }
977
- addCssStyles(ids, styles) {
978
- for (const id of ids) {
979
- const entity = this.entities.get(id);
980
- if (!styles || !entity) {
981
- return;
982
- }
983
- for (const style of styles) {
984
- entity.cssStyles.push(style);
985
- }
986
- }
987
- }
988
- addClass(ids, style) {
989
- ids.forEach((id) => {
990
- let classNode = this.classes.get(id);
991
- if (classNode === void 0) {
992
- classNode = { id, styles: [], textStyles: [] };
993
- this.classes.set(id, classNode);
994
- }
995
- if (style) {
996
- style.forEach(function(s) {
997
- if (/color/.exec(s)) {
998
- const newStyle = s.replace("fill", "bgFill");
999
- classNode.textStyles.push(newStyle);
1000
- }
1001
- classNode.styles.push(s);
1002
- });
1003
- }
1004
- });
1005
- }
1006
- setClass(ids, classNames) {
1007
- for (const id of ids) {
1008
- const entity = this.entities.get(id);
1009
- if (entity) {
1010
- for (const className of classNames) {
1011
- entity.cssClasses += " " + className;
1012
- }
1013
- }
1014
- }
1015
- }
1016
- clear() {
1017
- this.entities = /* @__PURE__ */ new Map();
1018
- this.classes = /* @__PURE__ */ new Map();
1019
- this.relationships = [];
1020
- clear();
1021
- }
1022
- getData() {
1023
- const nodes = [];
1024
- const edges = [];
1025
- const config = getConfig2();
1026
- for (const entityKey of this.entities.keys()) {
1027
- const entityNode = this.entities.get(entityKey);
1028
- if (entityNode) {
1029
- entityNode.cssCompiledStyles = this.getCompiledStyles(entityNode.cssClasses.split(" "));
1030
- nodes.push(entityNode);
1031
- }
1032
- }
1033
- let count = 0;
1034
- for (const relationship of this.relationships) {
1035
- const edge = {
1036
- id: getEdgeId(relationship.entityA, relationship.entityB, {
1037
- prefix: "id",
1038
- counter: count++
1039
- }),
1040
- type: "normal",
1041
- curve: "basis",
1042
- start: relationship.entityA,
1043
- end: relationship.entityB,
1044
- label: relationship.roleA,
1045
- labelpos: "c",
1046
- thickness: "normal",
1047
- classes: "relationshipLine",
1048
- arrowTypeStart: relationship.relSpec.cardB.toLowerCase(),
1049
- arrowTypeEnd: relationship.relSpec.cardA.toLowerCase(),
1050
- pattern: relationship.relSpec.relType == "IDENTIFYING" ? "solid" : "dashed",
1051
- look: config.look
1052
- };
1053
- edges.push(edge);
1054
- }
1055
- return { nodes, edges, other: {}, config, direction: "TB" };
1056
- }
1057
- };
1058
- var erRenderer_unified_exports = {};
1059
- __export(erRenderer_unified_exports, {
1060
- draw: () => draw
1061
- });
1062
- var draw = /* @__PURE__ */ __name(async function(text, id, _version, diag) {
1063
- log.info("REF0:");
1064
- log.info("Drawing er diagram (unified)", id);
1065
- const { securityLevel, er: conf, layout } = getConfig2();
1066
- const data4Layout = diag.db.getData();
1067
- const svg = getDiagramElement(id, securityLevel);
1068
- data4Layout.type = diag.type;
1069
- data4Layout.layoutAlgorithm = getRegisteredLayoutAlgorithm(layout);
1070
- data4Layout.config.flowchart.nodeSpacing = conf?.nodeSpacing || 140;
1071
- data4Layout.config.flowchart.rankSpacing = conf?.rankSpacing || 80;
1072
- data4Layout.direction = diag.db.getDirection();
1073
- data4Layout.markers = ["only_one", "zero_or_one", "one_or_more", "zero_or_more"];
1074
- data4Layout.diagramId = id;
1075
- await render(data4Layout, svg);
1076
- if (data4Layout.layoutAlgorithm === "elk") {
1077
- svg.select(".edges").lower();
1078
- }
1079
- const backgroundNodes = svg.selectAll('[id*="-background"]');
1080
- if (Array.from(backgroundNodes).length > 0) {
1081
- backgroundNodes.each(function() {
1082
- const backgroundNode = select_default(this);
1083
- const backgroundId = backgroundNode.attr("id");
1084
- const nonBackgroundId = backgroundId.replace("-background", "");
1085
- const nonBackgroundNode = svg.select(`#${CSS.escape(nonBackgroundId)}`);
1086
- if (!nonBackgroundNode.empty()) {
1087
- const transform = nonBackgroundNode.attr("transform");
1088
- backgroundNode.attr("transform", transform);
1089
- }
1090
- });
1091
- }
1092
- const padding = 8;
1093
- utils_default.insertTitle(
1094
- svg,
1095
- "erDiagramTitleText",
1096
- conf?.titleTopMargin ?? 25,
1097
- diag.db.getDiagramTitle()
1098
- );
1099
- setupViewPortForSVG(svg, padding, "erDiagram", conf?.useMaxWidth ?? true);
1100
- }, "draw");
1101
- var fade = /* @__PURE__ */ __name((color, opacity) => {
1102
- const channel2 = channel_default;
1103
- const r = channel2(color, "r");
1104
- const g = channel2(color, "g");
1105
- const b = channel2(color, "b");
1106
- return rgba_default(r, g, b, opacity);
1107
- }, "fade");
1108
- var getStyles = /* @__PURE__ */ __name((options) => `
1109
- .entityBox {
1110
- fill: ${options.mainBkg};
1111
- stroke: ${options.nodeBorder};
1112
- }
1113
-
1114
- .relationshipLabelBox {
1115
- fill: ${options.tertiaryColor};
1116
- opacity: 0.7;
1117
- background-color: ${options.tertiaryColor};
1118
- rect {
1119
- opacity: 0.5;
1120
- }
1121
- }
1122
-
1123
- .labelBkg {
1124
- background-color: ${fade(options.tertiaryColor, 0.5)};
1125
- }
1126
-
1127
- .edgeLabel .label {
1128
- fill: ${options.nodeBorder};
1129
- font-size: 14px;
1130
- }
1131
-
1132
- .label {
1133
- font-family: ${options.fontFamily};
1134
- color: ${options.nodeTextColor || options.textColor};
1135
- }
1136
-
1137
- .edge-pattern-dashed {
1138
- stroke-dasharray: 8,8;
1139
- }
1140
-
1141
- .node rect,
1142
- .node circle,
1143
- .node ellipse,
1144
- .node polygon
1145
- {
1146
- fill: ${options.mainBkg};
1147
- stroke: ${options.nodeBorder};
1148
- stroke-width: 1px;
1149
- }
1150
-
1151
- .relationshipLine {
1152
- stroke: ${options.lineColor};
1153
- stroke-width: 1;
1154
- fill: none;
1155
- }
1156
-
1157
- .marker {
1158
- fill: none !important;
1159
- stroke: ${options.lineColor} !important;
1160
- stroke-width: 1;
1161
- }
1162
- `, "getStyles");
1163
- var styles_default = getStyles;
1164
- var diagram = {
1165
- parser: erDiagram_default,
1166
- get db() {
1167
- return new ErDB();
1168
- },
1169
- renderer: erRenderer_unified_exports,
1170
- styles: styles_default
1171
- };
1172
-
1173
- export { diagram };
1174
- //# sourceMappingURL=erDiagram-Q2GNP2WA-IXNJSD2A.mjs.map
1175
- //# sourceMappingURL=erDiagram-Q2GNP2WA-IXNJSD2A.mjs.map