ranui 0.2.1-alpha.1 → 0.2.1-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (310) hide show
  1. package/dist/abnfDiagram-VRR7QNED-CH_pIv_l.cjs +1 -0
  2. package/dist/abnfDiagram-VRR7QNED-CTsqwzwi.js +95 -0
  3. package/dist/arc-D25LhgTs.cjs +1 -0
  4. package/dist/arc-DRPGof21.js +82 -0
  5. package/dist/architecture-TIHT7OUA-BbBd15_y.cjs +1 -0
  6. package/dist/architecture-TIHT7OUA-pbFO1xSx.js +5 -0
  7. package/dist/architectureDiagram-ZJ3FMSHR-8mjyXr-w.js +4279 -0
  8. package/dist/architectureDiagram-ZJ3FMSHR-D_jWFFZx.cjs +36 -0
  9. package/dist/array-By5736M5.js +7 -0
  10. package/dist/array-C3cbN3GY.cjs +1 -0
  11. package/dist/blockDiagram-677ZJIJ3-3F79MOSt.js +3321 -0
  12. package/dist/blockDiagram-677ZJIJ3-Cx35khWe.cjs +132 -0
  13. package/dist/builder.d.ts +2 -2
  14. package/dist/builder.js +39 -34
  15. package/dist/{builtin-D9djWkCE.js → builtin-BkM0LLof.js} +83 -76
  16. package/dist/button-D0zcnKnG.js +117 -0
  17. package/dist/button.js +1 -1
  18. package/dist/c4Diagram-LMCZKHZV-Cxn_gqu_.js +3064 -0
  19. package/dist/c4Diagram-LMCZKHZV-TRNb3Gvl.cjs +10 -0
  20. package/dist/{card-CqJa4Q_v.js → card-CygMndQS.js} +2 -2
  21. package/dist/card.js +1 -1
  22. package/dist/channel-C9WSNwcS.cjs +1 -0
  23. package/dist/channel-k5-UxdcV.js +5 -0
  24. package/dist/{checkbox-CThC9-vy.js → checkbox-D5om9aJO.js} +10 -10
  25. package/dist/checkbox.js +1 -1
  26. package/dist/chunk-2Q5K7J3B-CTMy5FII.cjs +1 -0
  27. package/dist/chunk-2Q5K7J3B-DlFVJRAn.js +15 -0
  28. package/dist/chunk-32BRIVSS-BXVdG_nV.cjs +1 -0
  29. package/dist/chunk-32BRIVSS-jAuAwMVV.js +68 -0
  30. package/dist/chunk-52WLFC77-BChUrU24.cjs +10 -0
  31. package/dist/chunk-52WLFC77-wpL7en7e.js +630 -0
  32. package/dist/chunk-5VM5RSS4-Cni2Ogq2.js +19 -0
  33. package/dist/chunk-5VM5RSS4-DudUFQ_Z.cjs +15 -0
  34. package/dist/chunk-7BUUIJ7U-9hiBbc7O.js +87 -0
  35. package/dist/chunk-7BUUIJ7U-DMv_UkjI.cjs +1 -0
  36. package/dist/chunk-C7G6YPKG-CA-DNpvI.js +71 -0
  37. package/dist/chunk-C7G6YPKG-CKEeW9TM.cjs +1 -0
  38. package/dist/chunk-EX3LRPZG-BCmf0iDq.js +2137 -0
  39. package/dist/chunk-EX3LRPZG-DbfbNdXo.cjs +231 -0
  40. package/dist/chunk-FWX5IMBZ-D11-gbhc.cjs +1 -0
  41. package/dist/chunk-FWX5IMBZ-DZ5VYvm5.js +60 -0
  42. package/dist/chunk-HOUHSVGY-BGB3dOvI.cjs +1 -0
  43. package/dist/chunk-HOUHSVGY-DRQcQeMT.js +268 -0
  44. package/dist/chunk-ICXQ74PX-BbT9JaEW.cjs +2 -0
  45. package/dist/chunk-ICXQ74PX-DR8rL-xF.js +1377 -0
  46. package/dist/chunk-JWPE2WC7-CGEmUMMZ.js +8 -0
  47. package/dist/chunk-JWPE2WC7-D8EnWK1B.cjs +1 -0
  48. package/dist/chunk-KEIR6QF5-B2Op7cFH.js +22155 -0
  49. package/dist/chunk-KEIR6QF5-C4fcHpY0.cjs +161 -0
  50. package/dist/chunk-MOJQB5TN-BC46HDyu.js +516 -0
  51. package/dist/chunk-MOJQB5TN-oOeq982_.cjs +88 -0
  52. package/dist/chunk-OGEWGWER-BV51ll2w.js +33 -0
  53. package/dist/chunk-OGEWGWER-DX8sW1dT.cjs +1 -0
  54. package/dist/chunk-PUDLZKDR-48YaqVoF.cjs +156 -0
  55. package/dist/chunk-PUDLZKDR-NdMR0Ft5.js +4282 -0
  56. package/dist/chunk-Q4XR5HBZ-3BHjjc9u.js +1709 -0
  57. package/dist/chunk-Q4XR5HBZ-aBnPq509.cjs +70 -0
  58. package/dist/chunk-RYQCIY6F-BER2T9t0.js +246 -0
  59. package/dist/chunk-RYQCIY6F-DVRzSnsI.cjs +1 -0
  60. package/dist/chunk-V7JOEXUC-Cr_hr02u.js +3467 -0
  61. package/dist/chunk-V7JOEXUC-DHizzTla.cjs +206 -0
  62. package/dist/chunk-VAUOI2AC-DfQf5L2_.cjs +1 -0
  63. package/dist/chunk-VAUOI2AC-izt0o4id.js +11 -0
  64. package/dist/chunk-VR4S4FIN-CJi5okl4.js +26 -0
  65. package/dist/chunk-VR4S4FIN-KiwnPF31.cjs +1 -0
  66. package/dist/chunk-WYO6CB5R-DDHkKowO.js +4535 -0
  67. package/dist/chunk-WYO6CB5R-u4mJNOcO.cjs +127 -0
  68. package/dist/chunk-XXDRQBXY-BB1i_53q.js +9 -0
  69. package/dist/chunk-XXDRQBXY-C8VGLZmt.cjs +1 -0
  70. package/dist/chunk-Y2CYZVJY-0JxdZxki.js +13 -0
  71. package/dist/chunk-Y2CYZVJY-DPaYLFFP.cjs +1 -0
  72. package/dist/chunk-ZGVPDNZ5-6uMbTJXy.js +3841 -0
  73. package/dist/chunk-ZGVPDNZ5-Cw5_HJba.cjs +62 -0
  74. package/dist/chunk-ZIRB5QZD-C7OH2FI2.js +1280 -0
  75. package/dist/chunk-ZIRB5QZD-aLu-4ITN.cjs +32 -0
  76. package/dist/classDiagram-OUVF2IWQ-D6rqYIh0.cjs +1 -0
  77. package/dist/classDiagram-OUVF2IWQ-Df0ghim9.js +30 -0
  78. package/dist/classDiagram-v2-EOCWNBFH-D6rqYIh0.cjs +1 -0
  79. package/dist/classDiagram-v2-EOCWNBFH-Df0ghim9.js +30 -0
  80. package/dist/{colorpicker-XNxDRcQ-.js → colorpicker-qWnaTlYX.js} +8 -8
  81. package/dist/colorpicker.js +1 -1
  82. package/dist/components/glass/index.d.ts +52 -0
  83. package/dist/components/icon/core-icons.d.ts +13 -0
  84. package/dist/components/icon/index.d.ts +1 -1
  85. package/dist/components/mermaid/index.d.ts +52 -0
  86. package/dist/components/modal/index.d.ts +9 -0
  87. package/dist/content-Rry-U6ir.js +39 -0
  88. package/dist/content.js +5 -0
  89. package/dist/cose-bilkent-JH36ORCC-BUxFTdey.cjs +1 -0
  90. package/dist/cose-bilkent-JH36ORCC-DTwvJlGw.js +2353 -0
  91. package/dist/cynefin-VYW2F7L2-6c1GOGXW.cjs +1 -0
  92. package/dist/cynefin-VYW2F7L2-ALQKF7N6.js +5 -0
  93. package/dist/cynefinDiagram-TSTJHNR4-Bjt4QTVh.js +355 -0
  94. package/dist/cynefinDiagram-TSTJHNR4-ISDORSxO.cjs +62 -0
  95. package/dist/cytoscape.esm-CFq1_DTa.js +18906 -0
  96. package/dist/cytoscape.esm-pygMw4dR.cjs +321 -0
  97. package/dist/dagre-D1-W1tt6.cjs +1 -0
  98. package/dist/dagre-D8GLTwuf.js +1578 -0
  99. package/dist/dagre-VKFMJZFB-DXI69qAN.cjs +4 -0
  100. package/dist/dagre-VKFMJZFB-Dfku86Az.js +341 -0
  101. package/dist/defaultLocale-0M_kMcEH.js +184 -0
  102. package/dist/defaultLocale-DSqtvhxg.cjs +1 -0
  103. package/dist/diagram-FQU43EPY-BAiRt5eL.cjs +3 -0
  104. package/dist/diagram-FQU43EPY-BvQ5jmVn.js +452 -0
  105. package/dist/diagram-G47NLZAW-DGnmEa8u.cjs +24 -0
  106. package/dist/diagram-G47NLZAW-DT2BBA0T.js +498 -0
  107. package/dist/diagram-NH7WQ7WH-DxgkStA3.cjs +24 -0
  108. package/dist/diagram-NH7WQ7WH-W7jg4Vh8.js +135 -0
  109. package/dist/diagram-OA4YK3LP-DkvFII73.cjs +30 -0
  110. package/dist/diagram-OA4YK3LP-jU--aqQl.js +317 -0
  111. package/dist/diagram-WEI45ONY-C_Qhf4ny.js +215 -0
  112. package/dist/diagram-WEI45ONY-XvzRFmmY.cjs +41 -0
  113. package/dist/dist-C0Fwsvsq.js +70 -0
  114. package/dist/dist-C20XxSsP.cjs +1 -0
  115. package/dist/{dropdown-CCvsambb.js → dropdown-DzdAR1nI.js} +4 -4
  116. package/dist/dropdown.js +1 -1
  117. package/dist/ebnfDiagram-CCIWWBDH-Cu8bAlhC.cjs +1 -0
  118. package/dist/ebnfDiagram-CCIWWBDH-Gnr20Oc1.js +112 -0
  119. package/dist/erDiagram-Q63AITRT-CxLSa9Yv.cjs +85 -0
  120. package/dist/erDiagram-Q63AITRT-D0Hh9b-W.js +1822 -0
  121. package/dist/eventmodeling-45OFAUF4-C6VXxUn1.cjs +1 -0
  122. package/dist/eventmodeling-45OFAUF4-DMpGs2yI.js +5 -0
  123. package/dist/factory-BkvRcCOx.js +482 -0
  124. package/dist/flowDiagram-23GEKE2U-B6gASEYG.cjs +1 -0
  125. package/dist/flowDiagram-23GEKE2U-BY4wE2vw.js +19 -0
  126. package/dist/{form-Ceq3uJzz.js → form-CUJpeQ7Q.js} +5 -5
  127. package/dist/form.js +1 -1
  128. package/dist/ganttDiagram-NO4QXBWP-B40Eabk0.js +3125 -0
  129. package/dist/ganttDiagram-NO4QXBWP-DZT79qJr.cjs +292 -0
  130. package/dist/gitGraph-TEB2WS4Q-BbtF3MDr.cjs +1 -0
  131. package/dist/gitGraph-TEB2WS4Q-D6Ru11Cs.js +5 -0
  132. package/dist/gitGraphDiagram-IHSO6WYX-BUJNSssA.js +754 -0
  133. package/dist/gitGraphDiagram-IHSO6WYX-DW06165m.cjs +106 -0
  134. package/dist/glass-Bj1Zf8Hy.js +115 -0
  135. package/dist/glass.js +5 -0
  136. package/dist/graphlib-CCKThIKP.js +1104 -0
  137. package/dist/graphlib-Du-578Js.cjs +1 -0
  138. package/dist/{icon-C_ENrJ3F.js → icon-CtlZJISZ.js} +77 -25
  139. package/dist/icon.js +1 -1
  140. package/dist/icons.js +1 -1
  141. package/dist/iife/button.iife.js +1 -1
  142. package/dist/iife/card.iife.js +1 -1
  143. package/dist/iife/checkbox.iife.js +1 -1
  144. package/dist/iife/colorpicker.iife.js +2 -2
  145. package/dist/iife/content.iife.js +1 -0
  146. package/dist/iife/dropdown.iife.js +1 -1
  147. package/dist/iife/form.iife.js +1 -1
  148. package/dist/iife/glass.iife.js +1 -0
  149. package/dist/iife/icon.iife.js +1 -1
  150. package/dist/iife/image.iife.js +1 -1
  151. package/dist/iife/input.iife.js +1 -1
  152. package/dist/iife/loading.iife.js +1 -1
  153. package/dist/iife/math.iife.js +14 -14
  154. package/dist/iife/mermaid.iife.js +3535 -0
  155. package/dist/iife/message.iife.js +1 -1
  156. package/dist/iife/modal.iife.js +1 -1
  157. package/dist/iife/player.iife.js +8 -8
  158. package/dist/iife/popover.iife.js +1 -1
  159. package/dist/iife/progress.iife.js +1 -1
  160. package/dist/iife/radar.iife.js +1 -1
  161. package/dist/iife/route.iife.js +1 -1
  162. package/dist/iife/router.iife.js +1 -1
  163. package/dist/iife/scratch.iife.js +1 -1
  164. package/dist/iife/section.iife.js +1 -1
  165. package/dist/iife/select.iife.js +1 -1
  166. package/dist/iife/skeleton.iife.js +1 -1
  167. package/dist/iife/tab.iife.js +1 -1
  168. package/dist/iife/tabpane.iife.js +1 -1
  169. package/dist/{image-B7MBI5n_.js → image-ILZNlaGc.js} +4 -4
  170. package/dist/image.js +1 -1
  171. package/dist/index.cjs +38 -37
  172. package/dist/index.d.ts +8 -0
  173. package/dist/index.iife.js +3623 -88
  174. package/dist/index.js +88 -84
  175. package/dist/info-DKCQHKI2-DNOtUIin.cjs +1 -0
  176. package/dist/info-DKCQHKI2-Df7h9MSE.js +5 -0
  177. package/dist/infoDiagram-FWYZ7A6U-C8dZc-Ki.cjs +2 -0
  178. package/dist/infoDiagram-FWYZ7A6U-Dc0m9qAx.js +21 -0
  179. package/dist/init-1VpIn1S3.js +16 -0
  180. package/dist/init-CbDwVtpO.cjs +1 -0
  181. package/dist/{input-RNqdEHPf.js → input-CDH6zY9I.js} +6 -6
  182. package/dist/input.js +1 -1
  183. package/dist/ishikawaDiagram-FXEZZL3T-BugNyysB.cjs +70 -0
  184. package/dist/ishikawaDiagram-FXEZZL3T-DuFtHOmf.js +742 -0
  185. package/dist/journeyDiagram-5HDEW3XC-Bshelnhq.js +928 -0
  186. package/dist/journeyDiagram-5HDEW3XC-ItmURvA2.cjs +139 -0
  187. package/dist/kanban-definition-HUTT4EX6-BL512R2A.cjs +89 -0
  188. package/dist/kanban-definition-HUTT4EX6-Dogv2paU.js +1050 -0
  189. package/dist/katex-Cq3Y8cmK.cjs +257 -0
  190. package/dist/katex-Pg2EqTH0.js +23485 -0
  191. package/dist/line-BIPmUVxO.js +33 -0
  192. package/dist/line-CAB5QHC6.cjs +1 -0
  193. package/dist/linear-B2AM4ZBe.js +259 -0
  194. package/dist/linear-CSAfNEpl.cjs +1 -0
  195. package/dist/{link-DURZzd7u.js → link-BCrmHvXP.js} +3 -3
  196. package/dist/link.js +1 -1
  197. package/dist/{loading-B9MFI03l.js → loading-DJWGih1g.js} +4 -4
  198. package/dist/loading.js +1 -1
  199. package/dist/map-BC2bk_rV.cjs +1 -0
  200. package/dist/map-DMSWkcq6.js +208 -0
  201. package/dist/{math-CudIwEXZ.js → math-DRmkEDSQ.js} +4 -4
  202. package/dist/math.js +1 -1
  203. package/dist/mermaid-CMhm7npE.js +261 -0
  204. package/dist/mermaid-parser.core-DYumW1vq.cjs +6 -0
  205. package/dist/mermaid-parser.core-uIDZYuBu.js +654 -0
  206. package/dist/mermaid.core-B2d5lQW2.js +1085 -0
  207. package/dist/mermaid.core-a1hgpWfs.cjs +10 -0
  208. package/dist/mermaid.js +5 -0
  209. package/dist/{message-DW7qWpEm.js → message-BpYJBvYn.js} +6 -6
  210. package/dist/message.js +1 -1
  211. package/dist/mindmap-definition-LN4V7U3C-DYZgIZym.cjs +96 -0
  212. package/dist/mindmap-definition-LN4V7U3C-f7s5ZePP.js +1070 -0
  213. package/dist/{modal-CrvGKL2B.js → modal-BeQlDYDP.js} +40 -24
  214. package/dist/modal.js +1 -1
  215. package/dist/ordinal-BMN81JG2.js +64 -0
  216. package/dist/ordinal-BplLHIij.cjs +1 -0
  217. package/dist/packet-7NZHBO7P-4PLslLZJ.js +5 -0
  218. package/dist/packet-7NZHBO7P-DeyLCrSn.cjs +1 -0
  219. package/dist/path-Bja5PoYn.js +82 -0
  220. package/dist/path-DmfWsuKi.cjs +1 -0
  221. package/dist/pegDiagram-2B236MQR-B-Xeh55J.js +107 -0
  222. package/dist/pegDiagram-2B236MQR-Bo5Nj40u.cjs +1 -0
  223. package/dist/pie-RZYD4A2V-DBE9a8Kz.js +5 -0
  224. package/dist/pie-RZYD4A2V-pDNZ2ZyB.cjs +1 -0
  225. package/dist/pieDiagram-ENE6RG2P-BkSiP4iu.cjs +39 -0
  226. package/dist/pieDiagram-ENE6RG2P-CVSE95zc.js +207 -0
  227. package/dist/{player-BKQaaT7o.js → player-CQ4e3Yeo.js} +196 -195
  228. package/dist/player.js +1 -1
  229. package/dist/{popover-CvYIVgUS.js → popover-eZMnL1F3.js} +22 -54
  230. package/dist/popover.js +1 -1
  231. package/dist/{progress-C6jctsFH.js → progress-DyHgW4Ep.js} +5 -5
  232. package/dist/progress.js +1 -1
  233. package/dist/quadrantDiagram-ABIIQ3AL-BDmdDGsh.cjs +7 -0
  234. package/dist/quadrantDiagram-ABIIQ3AL-TJ8FmqES.js +2058 -0
  235. package/dist/{radar-BUb4EzmG.js → radar-D21Rccap.js} +5 -5
  236. package/dist/radar-I7S5WNFK-CY5ycn2a.cjs +1 -0
  237. package/dist/radar-I7S5WNFK-DFTxtd_t.js +5 -0
  238. package/dist/radar.js +1 -1
  239. package/dist/railroad-3IZDKUUU-DALJwv16.js +5 -0
  240. package/dist/railroad-3IZDKUUU-DGzXHqt7.cjs +1 -0
  241. package/dist/railroad-abnf-AHOZXSZD-BCIHdSw6.cjs +1 -0
  242. package/dist/railroad-abnf-AHOZXSZD-CntW2udQ.js +5 -0
  243. package/dist/railroad-ebnf-EBAXGLYW-4vFZrfHF.cjs +1 -0
  244. package/dist/railroad-ebnf-EBAXGLYW-s_1ZOb_9.js +5 -0
  245. package/dist/railroad-peg-LSFZ7HO6-CaM5A0Ml.js +5 -0
  246. package/dist/railroad-peg-LSFZ7HO6-D_oFW1Bo.cjs +1 -0
  247. package/dist/railroadDiagram-RFXS5EU6-0lS5wYI7.js +83 -0
  248. package/dist/railroadDiagram-RFXS5EU6-DJKAtnQk.cjs +1 -0
  249. package/dist/ranui.css +1 -1
  250. package/dist/requirementDiagram-TGXJPOKE-Bg701bNl.cjs +84 -0
  251. package/dist/requirementDiagram-TGXJPOKE-viCQLyJd.js +2301 -0
  252. package/dist/rolldown-runtime-9ZSF5uba.js +16 -0
  253. package/dist/rolldown-runtime-CAnuVJ4g.cjs +1 -0
  254. package/dist/rough.esm-BWe9E0Nz.js +1387 -0
  255. package/dist/rough.esm-BfSi6CZE.cjs +1 -0
  256. package/dist/{route-Djrf9UR_.js → route-pR5P4ann.js} +10 -10
  257. package/dist/route.js +1 -1
  258. package/dist/{router-BU2KhtxV.js → router-CewzSH7O.js} +5 -5
  259. package/dist/router.js +1 -1
  260. package/dist/sankeyDiagram-HTMAVEWB-CV6_AuMF.js +974 -0
  261. package/dist/sankeyDiagram-HTMAVEWB-K-nGMsuS.cjs +40 -0
  262. package/dist/{scratch-CO4I2dIa.js → scratch-BFVsgl-7.js} +2 -2
  263. package/dist/scratch.js +1 -1
  264. package/dist/{section-CsUkp8bv.js → section-DSPCsIxv.js} +2 -2
  265. package/dist/section.js +1 -1
  266. package/dist/{select-Dn26ajJZ.js → select-B58nMfB1.js} +13 -13
  267. package/dist/select.js +1 -1
  268. package/dist/sequenceDiagram-DBY2YBRQ-4GdkLnUr.cjs +162 -0
  269. package/dist/sequenceDiagram-DBY2YBRQ-B9WNesh2.js +4326 -0
  270. package/dist/sizeCapture-X5ZJPWSS-BUY3-n09.cjs +1 -0
  271. package/dist/sizeCapture-X5ZJPWSS-D7rGsqTl.js +48 -0
  272. package/dist/{skeleton-BuMLhvzQ.js → skeleton-DoHYMsTn.js} +5 -5
  273. package/dist/skeleton.js +1 -1
  274. package/dist/src-C9EhKhbk.cjs +1 -0
  275. package/dist/src-DtRLxcYO.js +2104 -0
  276. package/dist/stateDiagram-2N3HPSRC-B7VpgjJu.cjs +1 -0
  277. package/dist/stateDiagram-2N3HPSRC-DxH4BMSh.js +237 -0
  278. package/dist/stateDiagram-v2-6OUMAXLB-CQv7GIaO.cjs +1 -0
  279. package/dist/stateDiagram-v2-6OUMAXLB-CWfn6e7n.js +30 -0
  280. package/dist/swimlanes-5IMT3BWC-DcADNGpg.js +5258 -0
  281. package/dist/swimlanes-5IMT3BWC-o-MjdPlw.cjs +1 -0
  282. package/dist/swimlanesDiagram-G3AALYLV-D-rmAGky.cjs +8 -0
  283. package/dist/swimlanesDiagram-G3AALYLV-DDtDtl1L.js +31 -0
  284. package/dist/{tab-40fDkuox.js → tab-BRPdZ9Ws.js} +5 -5
  285. package/dist/tab.js +1 -1
  286. package/dist/{tabpane-F4Pd7JtC.js → tabpane-Owf72hw_.js} +5 -5
  287. package/dist/tabpane.js +1 -1
  288. package/dist/{theme-switch-B09egc6h.js → theme-switch-CZDIIonc.js} +4 -4
  289. package/dist/theme-switch.js +1 -1
  290. package/dist/timeline-definition-FHXFAJF6-C80VjPLh.js +1119 -0
  291. package/dist/timeline-definition-FHXFAJF6-DOwvOb3S.cjs +120 -0
  292. package/dist/treeView-QDETBFTQ-B1Ejxfpg.cjs +1 -0
  293. package/dist/treeView-QDETBFTQ-vTKOZls1.js +5 -0
  294. package/dist/treemap-6X3UGDF4-D0FeO_NX.cjs +1 -0
  295. package/dist/treemap-6X3UGDF4-Ddzv6Gqd.js +5 -0
  296. package/dist/utils/builder/core.d.ts +133 -3
  297. package/dist/utils/builder/index.d.ts +1 -1
  298. package/dist/{utils-DBfrRFoE.js → utils-D1iZnChu.js} +38 -31
  299. package/dist/vennDiagram-L72KCM5P-BYHB7OW8.js +1955 -0
  300. package/dist/vennDiagram-L72KCM5P-CidVJK6y.cjs +34 -0
  301. package/dist/wardley-OPB4EBWU-C1hXbbD4.cjs +1 -0
  302. package/dist/wardley-OPB4EBWU-DBgFLc64.js +5 -0
  303. package/dist/wardleyDiagram-EHGQE667--ubmCaWM.js +652 -0
  304. package/dist/wardleyDiagram-EHGQE667-K6ckkRZS.cjs +78 -0
  305. package/dist/xychartDiagram-FW5EYKEG-CzdokxrM.cjs +7 -0
  306. package/dist/xychartDiagram-FW5EYKEG-DLqWcTPt.js +2154 -0
  307. package/docs/BUILDER.md +155 -2
  308. package/package.json +7 -1
  309. package/dist/button-BfYw0fes.js +0 -117
  310. package/dist/factory-DCrO37si.js +0 -334
@@ -0,0 +1,78 @@
1
+ const vt=require("./mermaid-parser.core-DYumW1vq.cjs"),u=require("./chunk-Y2CYZVJY-DPaYLFFP.cjs"),Q=require("./src-C9EhKhbk.cjs"),C=require("./chunk-WYO6CB5R-u4mJNOcO.cjs"),J=require("./chunk-ICXQ74PX-BbT9JaEW.cjs"),St=require("./chunk-VAUOI2AC-DfQf5L2_.cjs"),Mt=require("./chunk-JWPE2WC7-D8EnWK1B.cjs");var W=u.__name((e,a)=>{const r=e<=1?e*100:e;if(r<0||r>100)throw new Error(`${a} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return r},"toPercent"),z=u.__name((e,a,r)=>({x:W(a,`${r} evolution`),y:W(e,`${r} visibility`)}),"toCoordinates"),U=u.__name(e=>{if(e){if(e==="+<>")return"bidirectional";if(e==="+<")return"backward";if(e==="+>")return"forward"}},"getFlowFromPort"),At=u.__name(e=>{if(!e?.startsWith("+"))return{};const a=/^\+'([^']*)'/.exec(e)?.[1];return e.includes("<>")?{flow:"bidirectional",label:a}:e.includes("<")?{flow:"backward",label:a}:e.includes(">")?{flow:"forward",label:a}:{label:a}},"extractFlowFromArrow"),Nt=u.__name((e,a)=>{if(Mt.populateCommonDb(e,a),e.size&&a.setSize(e.size.width,e.size.height),e.evolution){const r=e.evolution.stages.map(n=>n.secondName?`${n.name.trim()} / ${n.secondName.trim()}`:n.name.trim()),x=e.evolution.stages.filter(n=>n.boundary!==void 0).map(n=>n.boundary);a.updateAxes({stages:r,stageBoundaries:x})}if(e.anchors.forEach(r=>{const x=z(r.visibility,r.evolution,`Anchor "${r.name}"`);a.addNode(r.name,r.name,x.x,x.y,"anchor")}),e.components.forEach(r=>{const x=z(r.visibility,r.evolution,`Component "${r.name}"`),n=r.label?(r.label.negX?-1:1)*r.label.offsetX:void 0,l=r.label?(r.label.negY?-1:1)*r.label.offsetY:void 0,y=r.decorator?.strategy;a.addNode(r.name,r.name,x.x,x.y,"component",n,l,r.inertia,y)}),e.notes.forEach(r=>{const x=z(r.visibility,r.evolution,`Note "${r.text}"`);a.addNote(r.text,x.x,x.y)}),e.pipelines.forEach(r=>{const x=a.getNode(r.parent);if(!x||typeof x.y!="number")throw new Error(`Pipeline "${r.parent}" must reference an existing component with coordinates.`);const n=x.y;a.startPipeline(r.parent),r.components.forEach(l=>{const y=`${r.parent}_${l.name}`,v=l.label?(l.label.negX?-1:1)*l.label.offsetX:void 0,g=l.label?(l.label.negY?-1:1)*l.label.offsetY:void 0,F=W(l.evolution,`Pipeline component "${l.name}" evolution`);a.addNode(y,l.name,F,n,"pipeline-component",v,g),a.addPipelineComponent(r.parent,y)})}),e.links.forEach(r=>{const x=!!r.arrow&&(r.arrow.includes("-.->")||r.arrow.includes(".-."));let n=U(r.fromPort)??U(r.toPort);const{flow:l,label:y}=At(r.arrow);!n&&l&&(n=l);const v=r.linkLabel,g=y??v;a.addLink(a.resolveNodeId(r.from),a.resolveNodeId(r.to),x,g,n)}),e.evolves.forEach(r=>{const x=a.getNode(r.component);if(x?.y!==void 0){const n=W(r.target,`Evolve target for "${r.component}"`);a.addTrend(r.component,n,x.y)}}),e.annotations.length>0){const r=e.annotations[0],x=z(r.x,r.y,"Annotations box");a.setAnnotationsBox(x.x,x.y)}e.annotation.forEach(r=>{const x=z(r.x,r.y,`Annotation ${r.number}`);a.addAnnotation(r.number,[{x:x.x,y:x.y}],r.text)}),e.accelerators.forEach(r=>{const x=z(r.x,r.y,`Accelerator "${r.name}"`);a.addAccelerator(r.name,x.x,x.y)}),e.deaccelerators.forEach(r=>{const x=z(r.x,r.y,`Deaccelerator "${r.name}"`);a.addDeaccelerator(r.name,x.x,x.y)})},"populateDb"),K={parser:{yy:void 0},parse:u.__name(async e=>{const a=await vt.parse("wardley",e);Q.log.debug(a);const r=K.parser?.yy;if(!r||typeof r.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Nt(a,r)},"parse")},Tt=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{u.__name(this,"WardleyBuilder")}addNode(e){const a=this.nodes.get(e.id)??{id:e.id,label:e.label},r={...a,...e,className:e.className??a.className,labelOffsetX:e.labelOffsetX??a.labelOffsetX,labelOffsetY:e.labelOffsetY??a.labelOffsetY};this.nodes.set(e.id,r)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});const a=this.nodes.get(e);a&&(a.isPipelineParent=!0)}addPipelineComponent(e,a){const r=this.pipelines.get(e);r&&r.componentIds.push(a);const x=this.nodes.get(a);x&&(x.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,a){this.annotationsBox={x:e,y:a}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,a){this.size={width:e,height:a}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(const[a,r]of this.nodes)if(r.label===e)return a;return e}build(){const e=[];for(const a of this.nodes.values()){if(typeof a.x!="number"||typeof a.y!="number")throw new Error(`Node "${a.label}" is missing coordinates`);e.push(a)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},k=new Tt;function tt(){return C.getConfig2()["wardley-beta"]}u.__name(tt,"getConfig");function et(e,a,r,x,n,l,y,v,g){k.addNode({id:e,label:a,x:r,y:x,className:n,labelOffsetX:l,labelOffsetY:y,inertia:v,sourceStrategy:g})}u.__name(et,"addNode");function at(e,a,r=!1,x,n){k.addLink({source:e,target:a,dashed:r,label:x,flow:n})}u.__name(at,"addLink");function rt(e,a,r){k.addTrend({nodeId:e,targetX:a,targetY:r})}u.__name(rt,"addTrend");function ot(e,a,r){k.addAnnotation({number:e,coordinates:a,text:r})}u.__name(ot,"addAnnotation");function nt(e,a,r){k.addNote({text:e,x:a,y:r})}u.__name(nt,"addNote");function st(e,a,r){k.addAccelerator({name:e,x:a,y:r})}u.__name(st,"addAccelerator");function it(e,a,r){k.addDeaccelerator({name:e,x:a,y:r})}u.__name(it,"addDeaccelerator");function lt(e,a){k.setAnnotationsBox(e,a)}u.__name(lt,"setAnnotationsBox");function dt(e,a){k.setSize(e,a)}u.__name(dt,"setSize");function ct(e){k.startPipeline(e)}u.__name(ct,"startPipeline");function pt(e,a){k.addPipelineComponent(e,a)}u.__name(pt,"addPipelineComponent");function ht(e){k.setAxes(e)}u.__name(ht,"updateAxes");function xt(e){return k.getNode(e)}u.__name(xt,"getNode");function ft(e){return k.resolveNodeId(e)}u.__name(ft,"resolveNodeId");function gt(){return k.build()}u.__name(gt,"getWardleyData");function ut(){k.clear(),C.clear()}u.__name(ut,"clear");var zt={getConfig:tt,addNode:et,addLink:at,addTrend:rt,addAnnotation:ot,addNote:nt,addAccelerator:st,addDeaccelerator:it,setAnnotationsBox:lt,setSize:dt,startPipeline:ct,addPipelineComponent:pt,updateAxes:ht,getNode:xt,resolveNodeId:ft,getWardleyData:gt,clear:ut,setAccTitle:C.setAccTitle,getAccTitle:C.getAccTitle,setDiagramTitle:C.setDiagramTitle,getDiagramTitle:C.getDiagramTitle,getAccDescription:C.getAccDescription,setAccDescription:C.setAccDescription},Lt=["Genesis","Custom Built","Product","Commodity"],Xt=u.__name(()=>{const{themeVariables:e}=C.getConfig2();return{backgroundColor:e.wardley?.backgroundColor??e.background??"#fff",axisColor:e.wardley?.axisColor??"#000",axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??"#222",gridColor:e.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:e.wardley?.componentFill??"#fff",componentStroke:e.wardley?.componentStroke??"#000",componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??"#222",linkStroke:e.wardley?.linkStroke??"#000",evolutionStroke:e.wardley?.evolutionStroke??"#dc3545",annotationStroke:e.wardley?.annotationStroke??"#000",annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??"#222",annotationFill:e.wardley?.annotationFill??e.background??"#fff"}},"getTheme"),Et=u.__name(()=>{const e=C.getConfig2()["wardley-beta"];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},"getConfigValues"),Yt={parser:K,db:zt,renderer:{draw:u.__name((e,a,r,x)=>{Q.log.debug(`Rendering Wardley map
2
+ `+e);const n=Et(),l=Xt(),y=n.nodeRadius*1.6,v=x.db,g=v.getWardleyData(),F=v.getDiagramTitle(),S=g.size?.width??n.width,b=g.size?.height??n.height,E=St.selectSvgElement(a);E.selectAll("*").remove(),C.configureSvgSize(E,b,S,n.useMaxWidth),E.attr("viewBox",`0 0 ${S} ${b}`);const _=E.append("g").attr("class","wardley-map"),D=E.append("defs");D.append("marker").attr("id",`arrow-${a}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",l.evolutionStroke).attr("stroke","none"),D.append("marker").attr("id",`link-arrow-end-${a}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",l.linkStroke).attr("stroke","none"),D.append("marker").attr("id",`link-arrow-start-${a}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",l.linkStroke).attr("stroke","none"),_.append("rect").attr("class","wardley-background").attr("width",S).attr("height",b).attr("fill",l.backgroundColor);const Y=S-n.padding*2,I=b-n.padding*2;F&&_.append("text").attr("class","wardley-title").attr("x",S/2).attr("y",n.padding/2).attr("fill",l.axisTextColor).attr("font-size",n.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(F);const A=u.__name(t=>n.padding+t/100*Y,"projectX"),N=u.__name(t=>b-n.padding-t/100*I,"projectY"),O=_.append("g").attr("class","wardley-axes");O.append("line").attr("x1",n.padding).attr("x2",S-n.padding).attr("y1",b-n.padding).attr("y2",b-n.padding).attr("stroke",l.axisColor).attr("stroke-width",1),O.append("line").attr("x1",n.padding).attr("x2",n.padding).attr("y1",n.padding).attr("y2",b-n.padding).attr("stroke",l.axisColor).attr("stroke-width",1);const yt=g.axes.xLabel??"Evolution",mt=g.axes.yLabel??"Visibility";O.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",n.padding+Y/2).attr("y",b-n.padding/4).attr("fill",l.axisTextColor).attr("font-size",n.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(yt),O.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",n.padding/3).attr("y",n.padding+I/2).attr("fill",l.axisTextColor).attr("font-size",n.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${n.padding/3} ${n.padding+I/2})`).text(mt);const B=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:Lt;if(B.length>0){const t=_.append("g").attr("class","wardley-stages"),i=g.axes.stageBoundaries,o=[];if(i&&i.length===B.length){let s=0;i.forEach(d=>{o.push({start:s,end:d}),s=d})}else{const s=1/B.length;B.forEach((d,c)=>{o.push({start:c*s,end:(c+1)*s})})}B.forEach((s,d)=>{const c=o[d],f=n.padding+c.start*Y,h=(f+(n.padding+c.end*Y))/2;d>0&&t.append("line").attr("x1",f).attr("x2",f).attr("y1",n.padding).attr("y2",b-n.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",h).attr("y",b-n.padding/1.5).attr("fill",l.axisTextColor).attr("font-size",n.axisFontSize-2).attr("text-anchor","middle").text(s)})}if(n.showGrid){const t=_.append("g").attr("class","wardley-grid");for(let i=1;i<4;i++){const o=i/4,s=n.padding+Y*o;t.append("line").attr("x1",s).attr("x2",s).attr("y1",n.padding).attr("y2",b-n.padding).attr("stroke",l.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",n.padding).attr("x2",S-n.padding).attr("y1",b-n.padding-I*o).attr("y2",b-n.padding-I*o).attr("stroke",l.gridColor).attr("stroke-dasharray","2 6")}}const p=new Map;if(g.nodes.forEach(t=>{p.set(t.id,{x:A(t.x),y:N(t.y),node:t})}),g.pipelines.length>0){const t=_.append("g").attr("class","wardley-pipelines"),i=_.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(o=>{if(o.componentIds.length===0)return;const s=o.componentIds.map(h=>({id:h,pos:p.get(h),node:g.nodes.find(m=>m.id===h)})).filter(h=>h.pos&&h.node).sort((h,m)=>h.node.x-m.node.x);for(let h=0;h<s.length-1;h++){const m=s[h],w=s[h+1];i.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",m.pos.x).attr("y1",m.pos.y).attr("x2",w.pos.x).attr("y2",w.pos.y).attr("stroke",l.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let d=1/0,c=-1/0,f=0;if(o.componentIds.forEach(h=>{const m=p.get(h);m&&(d=Math.min(d,m.x),c=Math.max(c,m.x),f=m.y)}),d!==1/0&&c!==-1/0){const m=n.nodeRadius*4,w=f-m/2,P=p.get(o.nodeId);P&&(P.x=(d+c)/2,P.y=w-y/6),t.append("rect").attr("class","wardley-pipeline-box").attr("x",d-15).attr("y",w).attr("width",c-d+30).attr("height",m).attr("fill","none").attr("stroke",l.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const j=_.append("g").attr("class","wardley-links"),V=new Map;g.pipelines.forEach(t=>{V.set(t.nodeId,new Set(t.componentIds))});const Z=g.links.filter(t=>!(!p.has(t.source)||!p.has(t.target)||V.get(t.target)?.has(t.source)));j.selectAll("line").data(Z).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const i=p.get(t.source),o=p.get(t.target),s=g.nodes.find(h=>h.id===t.source).isPipelineParent?y/Math.sqrt(2):n.nodeRadius,d=o.x-i.x,c=o.y-i.y,f=Math.sqrt(d*d+c*c);return i.x+d/f*s}).attr("y1",t=>{const i=p.get(t.source),o=p.get(t.target),s=g.nodes.find(h=>h.id===t.source).isPipelineParent?y/Math.sqrt(2):n.nodeRadius,d=o.x-i.x,c=o.y-i.y,f=Math.sqrt(d*d+c*c);return i.y+c/f*s}).attr("x2",t=>{const i=p.get(t.source),o=p.get(t.target),s=g.nodes.find(h=>h.id===t.target).isPipelineParent?y/Math.sqrt(2):n.nodeRadius,d=i.x-o.x,c=i.y-o.y,f=Math.sqrt(d*d+c*c);return o.x+d/f*s}).attr("y2",t=>{const i=p.get(t.source),o=p.get(t.target),s=g.nodes.find(h=>h.id===t.target).isPipelineParent?y/Math.sqrt(2):n.nodeRadius,d=i.x-o.x,c=i.y-o.y,f=Math.sqrt(d*d+c*c);return o.y+c/f*s}).attr("stroke",l.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${a})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${a})`:null),j.selectAll("text").data(Z.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const i=p.get(t.source),o=p.get(t.target),s=(i.x+o.x)/2,d=o.y-i.y,c=o.x-i.x;return s+d/Math.sqrt(c*c+d*d)*8}).attr("y",t=>{const i=p.get(t.source),o=p.get(t.target),s=(i.y+o.y)/2,d=o.x-i.x,c=o.y-i.y,f=Math.sqrt(d*d+c*c);return s+-d/f*8}).attr("fill",l.axisTextColor).attr("font-size",n.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const i=p.get(t.source),o=p.get(t.target),s=(i.x+o.x)/2,d=(i.y+o.y)/2,c=o.x-i.x,f=o.y-i.y,h=Math.sqrt(c*c+f*f),m=8,w=f/h,P=-c/h,L=s+w*m,q=d+P*m;let X=Math.atan2(f,c)*180/Math.PI;return(X>90||X<-90)&&(X+=180),`rotate(${X} ${L} ${q})`}).text(t=>t.label);const wt=_.append("g").attr("class","wardley-trends"),kt=g.trends.map(t=>{const i=p.get(t.nodeId);if(!i)return null;const o=A(t.targetX),s=N(t.targetY),d=o-i.x,c=s-i.y,f=Math.sqrt(d*d+c*c),h=n.nodeRadius+2;return{origin:i,targetX:o,targetY:s,adjustedX2:f>h?o-d/f*h:o,adjustedY2:f>h?s-c/f*h:s}}).filter(t=>t!==null);wt.selectAll("line").data(kt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",l.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${a})`);const M=_.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));M.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>p.get(t.id).x).attr("cy",t=>p.get(t.id).y).attr("r",n.nodeRadius*2).attr("fill","#666").attr("stroke",l.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>p.get(t.id).x).attr("cy",t=>p.get(t.id).y).attr("r",n.nodeRadius*2).attr("fill","#ccc").attr("stroke",l.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>p.get(t.id).x).attr("cy",t=>p.get(t.id).y).attr("r",n.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const T=M.filter(t=>t.sourceStrategy==="market");T.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>p.get(t.id).x).attr("cy",t=>p.get(t.id).y).attr("r",n.nodeRadius*2).attr("fill","white").attr("stroke",l.componentStroke).attr("stroke-width",1),M.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>p.get(t.id).x).attr("cy",t=>p.get(t.id).y).attr("r",n.nodeRadius).attr("fill",l.componentFill).attr("stroke",l.componentStroke).attr("stroke-width",1);const G=n.nodeRadius*.7,$=n.nodeRadius*1.2;if(T.append("line").attr("class","wardley-market-line").attr("x1",t=>p.get(t.id).x).attr("y1",t=>p.get(t.id).y-$).attr("x2",t=>p.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y2",t=>p.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",l.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>p.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y1",t=>p.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>p.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y2",t=>p.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",l.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>p.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y1",t=>p.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>p.get(t.id).x).attr("y2",t=>p.get(t.id).y-$).attr("stroke",l.componentStroke).attr("stroke-width",1),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>p.get(t.id).x).attr("cy",t=>p.get(t.id).y-$).attr("r",G).attr("fill","white").attr("stroke",l.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>p.get(t.id).x-$*Math.cos(Math.PI/6)).attr("cy",t=>p.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",G).attr("fill","white").attr("stroke",l.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>p.get(t.id).x+$*Math.cos(Math.PI/6)).attr("cy",t=>p.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",G).attr("fill","white").attr("stroke",l.componentStroke).attr("stroke-width",2),M.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>p.get(t.id).x-y/2).attr("y",t=>p.get(t.id).y-y/2).attr("width",y).attr("height",y).attr("fill",l.componentFill).attr("stroke",l.componentStroke).attr("stroke-width",1),M.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const i=p.get(t.id);let o=t.isPipelineParent?y/2+15:n.nodeRadius+15;return t.sourceStrategy&&(o+=n.nodeRadius+10),i.x+o}).attr("y1",t=>{const i=p.get(t.id),o=t.isPipelineParent?y:n.nodeRadius*2;return i.y-o/2}).attr("x2",t=>{const i=p.get(t.id);let o=t.isPipelineParent?y/2+15:n.nodeRadius+15;return t.sourceStrategy&&(o+=n.nodeRadius+10),i.x+o}).attr("y2",t=>{const i=p.get(t.id),o=t.isPipelineParent?y:n.nodeRadius*2;return i.y+o/2}).attr("stroke",l.componentStroke).attr("stroke-width",6),M.append("text").attr("x",t=>{const i=p.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?i.x+t.labelOffsetX:i.x;let o=n.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(o+=10);const s=t.labelOffsetX??o;return i.x+s}).attr("y",t=>{const i=p.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?i.y+t.labelOffsetY:i.y-3;let o=-n.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(o-=10);const s=t.labelOffsetY??o;return i.y+s}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?l.evolutionStroke:t.className==="anchor"?"#000":l.componentLabelColor).attr("font-size",n.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),g.annotations.length>0){const t=_.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(i=>{const o=i.coordinates.map(s=>({x:A(s.x),y:N(s.y)}));if(o.length>1)for(let s=0;s<o.length-1;s++)t.append("line").attr("class","wardley-annotation-line").attr("x1",o[s].x).attr("y1",o[s].y).attr("x2",o[s+1].x).attr("y2",o[s+1].y).attr("stroke",l.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");o.forEach(s=>{const d=t.append("g").attr("class","wardley-annotation");d.append("circle").attr("cx",s.x).attr("cy",s.y).attr("r",10).attr("fill","white").attr("stroke",l.axisColor).attr("stroke-width",1.5),d.append("text").attr("x",s.x).attr("y",s.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",l.axisTextColor).attr("font-weight","bold").text(i.number)})}),g.annotationsBox){let i=A(g.annotationsBox.x),o=N(g.annotationsBox.y);const s=10,d=16,c=11,f=t.append("g").attr("class","wardley-annotations-box"),h=[...g.annotations].filter(w=>w.text).sort((w,P)=>w.number-P.number),m=[];if(h.forEach((w,P)=>{const L=f.append("text").attr("x",i+s).attr("y",o+s+(P+1)*d).attr("font-size",c).attr("fill",l.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${w.number}. ${w.text}`);m.push(L)}),m.length>0){let w=0,P=0;m.forEach(H=>{const R=H.node(),Pt=R.getComputedTextLength();w=Math.max(w,Pt);const Ct=R.getBBox();P=Math.max(P,Ct.height)});const L=w+s*2+105,q=h.length*d+s*2+P/2,X=n.padding,bt=S-n.padding-L,$t=n.padding,_t=b-n.padding-q;i=Math.max(X,Math.min(i,bt)),o=Math.max($t,Math.min(o,_t)),m.forEach((H,R)=>{H.attr("x",i+s).attr("y",o+s+(R+1)*d)}),f.insert("rect","text").attr("x",i).attr("y",o).attr("width",L).attr("height",q).attr("fill","white").attr("stroke",l.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){const t=_.append("g").attr("class","wardley-notes");g.notes.forEach(i=>{const o=A(i.x),s=N(i.y);t.append("text").attr("x",o).attr("y",s).attr("text-anchor","start").attr("font-size",11).attr("fill",l.axisTextColor).attr("font-weight","bold").text(i.text)})}if(g.accelerators.length>0){const t=_.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(i=>{const o=A(i.x),s=N(i.y),d=60,c=30,f=20,h=`
3
+ M ${o} ${s-c/2}
4
+ L ${o+d-f} ${s-c/2}
5
+ L ${o+d-f} ${s-c/2-8}
6
+ L ${o+d} ${s}
7
+ L ${o+d-f} ${s+c/2+8}
8
+ L ${o+d-f} ${s+c/2}
9
+ L ${o} ${s+c/2}
10
+ Z
11
+ `;t.append("path").attr("d",h).attr("fill","white").attr("stroke",l.componentStroke).attr("stroke-width",1),t.append("text").attr("x",o+d/2).attr("y",s+c/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",l.axisTextColor).attr("font-weight","bold").text(i.name)})}if(g.deaccelerators.length>0){const t=_.append("g").attr("class","wardley-deaccelerators");g.deaccelerators.forEach(i=>{const o=A(i.x),s=N(i.y),d=60,c=30,f=20,h=`
12
+ M ${o+d} ${s-c/2}
13
+ L ${o+f} ${s-c/2}
14
+ L ${o+f} ${s-c/2-8}
15
+ L ${o} ${s}
16
+ L ${o+f} ${s+c/2+8}
17
+ L ${o+f} ${s+c/2}
18
+ L ${o+d} ${s+c/2}
19
+ Z
20
+ `;t.append("path").attr("d",h).attr("fill","white").attr("stroke",l.componentStroke).attr("stroke-width",1),t.append("text").attr("x",o+d/2).attr("y",s+c/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",l.axisTextColor).attr("font-weight","bold").text(i.name)})}},"draw")},styles:u.__name(({wardley:e}={})=>{const a=J.cleanAndMerge(J.cleanAndMerge(C.getThemeVariables3(),C.getConfig().themeVariables).wardley,e);return`
21
+ .wardley-background {
22
+ fill: ${a.backgroundColor};
23
+ }
24
+ .wardley-axes line, .wardley-axes path {
25
+ stroke: ${a.axisColor};
26
+ }
27
+ .wardley-axis-label {
28
+ fill: ${a.axisTextColor};
29
+ }
30
+ .wardley-stage-label {
31
+ fill: ${a.axisTextColor};
32
+ }
33
+ .wardley-grid line {
34
+ stroke: ${a.gridColor};
35
+ }
36
+ .wardley-node circle {
37
+ fill: ${a.componentFill};
38
+ stroke: ${a.componentStroke};
39
+ }
40
+ .wardley-node-label {
41
+ fill: ${a.componentLabelColor};
42
+ }
43
+ .wardley-link {
44
+ stroke: ${a.linkStroke};
45
+ }
46
+ .wardley-link--dashed {
47
+ stroke-dasharray: 4 4;
48
+ }
49
+ .wardley-link-label {
50
+ fill: ${a.axisTextColor};
51
+ }
52
+ .wardley-trend line {
53
+ stroke: ${a.evolutionStroke};
54
+ }
55
+ .wardley-annotation-line {
56
+ stroke: ${a.annotationStroke};
57
+ }
58
+ .wardley-annotation circle {
59
+ fill: ${a.annotationFill};
60
+ stroke: ${a.annotationStroke};
61
+ }
62
+ .wardley-annotation text {
63
+ fill: ${a.annotationTextColor};
64
+ }
65
+ .wardley-annotations-box rect {
66
+ fill: ${a.annotationFill};
67
+ stroke: ${a.annotationStroke};
68
+ }
69
+ .wardley-annotations-box text {
70
+ fill: ${a.annotationTextColor};
71
+ }
72
+ .wardley-pipeline-box {
73
+ stroke: ${a.componentStroke};
74
+ }
75
+ .wardley-notes text {
76
+ fill: ${a.axisTextColor};
77
+ }
78
+ `},"styles")};exports.diagram=Yt;
@@ -0,0 +1,7 @@
1
+ const n=require("./chunk-Y2CYZVJY-DPaYLFFP.cjs"),It=require("./src-C9EhKhbk.cjs"),M=require("./chunk-WYO6CB5R-u4mJNOcO.cjs"),Lt=require("./linear-CSAfNEpl.cjs"),se=require("./ordinal-BplLHIij.cjs"),ne=require("./init-CbDwVtpO.cjs"),Mt=require("./chunk-ICXQ74PX-BbT9JaEW.cjs"),Pt=require("./line-CAB5QHC6.cjs"),ae=require("./chunk-VAUOI2AC-DfQf5L2_.cjs");require("./chunk-HOUHSVGY-BGB3dOvI.cjs");const oe=require("./chunk-Q4XR5HBZ-aBnPq509.cjs");function re(t,e,s){t=+t,e=+e,s=(a=arguments.length)<2?(e=t,t=0,1):a<3?1:+s;for(var i=-1,a=Math.max(0,Math.ceil((e-t)/s))|0,c=new Array(a);++i<a;)c[i]=t+i*s;return c}function gt(){var t=se.ordinal().unknown(void 0),e=t.domain,s=t.range,i=0,a=1,c,l,f=!1,C=0,T=0,v=.5;delete t.unknown;function R(){var _=e().length,V=a<i,P=V?a:i,E=V?i:a;c=(E-P)/Math.max(1,_-C+T*2),f&&(c=Math.floor(c)),P+=(E-P-c*(_-C))*v,l=c*(1-C),f&&(P=Math.round(P),l=Math.round(l));var B=re(_).map(function(p){return P+c*p});return s(V?B.reverse():B)}return t.domain=function(_){return arguments.length?(e(_),R()):e()},t.range=function(_){return arguments.length?([i,a]=_,i=+i,a=+a,R()):[i,a]},t.rangeRound=function(_){return[i,a]=_,i=+i,a=+a,f=!0,R()},t.bandwidth=function(){return l},t.step=function(){return c},t.round=function(_){return arguments.length?(f=!!_,R()):f},t.padding=function(_){return arguments.length?(C=Math.min(1,T=+_),R()):C},t.paddingInner=function(_){return arguments.length?(C=Math.min(1,_),R()):C},t.paddingOuter=function(_){return arguments.length?(T=+_,R()):T},t.align=function(_){return arguments.length?(v=Math.max(0,Math.min(1,_)),R()):v},t.copy=function(){return gt(e(),[i,a]).round(f).paddingInner(C).paddingOuter(T).align(v)},ne.initRange.apply(R(),arguments)}var xt=(function(){var t=n.__name(function(o,u,b,g){for(b=b||{},g=o.length;g--;b[o[g]]=u);return b},"o"),e=[1,10,12,14,16,18,19,21,23],s=[2,6],i=[1,3],a=[1,5],c=[1,6],l=[1,7],f=[1,5,10,12,14,16,18,19,21,23,36,37,38],C=[1,25],T=[1,26],v=[1,28],R=[1,29],_=[1,30],V=[1,31],P=[1,32],E=[1,33],B=[1,34],p=[1,35],D=[1,36],h=[1,37],z=[1,43],X=[1,42],Y=[1,47],N=[1,50],w=[1,10,12,14,16,18,19,21,23,36,37,38],U=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],y=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],A=[1,65],O=[26,28],S={trace:n.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:n.__name(function(u,b,g,x,k,r,K){var d=r.length-1;switch(k){case 5:x.setOrientation(r[d]);break;case 9:x.setDiagramTitle(r[d].text.trim());break;case 12:x.setLineData({text:"",type:"text"},r[d]);break;case 13:x.setLineData(r[d-1],r[d]);break;case 14:x.setBarData({text:"",type:"text"},r[d]);break;case 15:x.setBarData(r[d-1],r[d]);break;case 16:this.$=r[d].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=r[d].trim(),x.setAccDescription(this.$);break;case 19:this.$=r[d-1];break;case 20:case 30:this.$=[r[d-2],...r[d]];break;case 21:case 31:this.$=[r[d]];break;case 22:this.$={value:Number(r[d-1]),label:r[d]};break;case 23:this.$={value:Number(r[d]),label:""};break;case 24:x.setXAxisTitle(r[d]);break;case 25:x.setXAxisTitle(r[d-1]);break;case 26:x.setXAxisTitle({type:"text",text:""});break;case 27:x.setXAxisBand(r[d]);break;case 28:x.setXAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 29:this.$=r[d-1];break;case 32:x.setYAxisTitle(r[d]);break;case 33:x.setYAxisTitle(r[d-1]);break;case 34:x.setYAxisTitle({type:"text",text:""});break;case 35:x.setYAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 39:this.$={text:r[d],type:"text"};break;case 40:this.$={text:r[d],type:"text"};break;case 41:this.$={text:r[d],type:"markdown"};break;case 42:this.$=r[d];break;case 43:this.$=r[d-1]+""+r[d];break}},"anonymous"),table:[t(e,s,{3:1,4:2,7:4,5:i,36:a,37:c,38:l}),{1:[3]},t(e,s,{4:2,7:4,3:8,5:i,36:a,37:c,38:l}),t(e,s,{4:2,7:4,6:9,3:10,5:i,8:[1,11],36:a,37:c,38:l}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(f,[2,36]),t(f,[2,37]),t(f,[2,38]),{1:[2,1]},t(e,s,{4:2,7:4,3:21,5:i,36:a,37:c,38:l}),{1:[2,3]},t(f,[2,5]),t(e,[2,7],{4:22,36:a,37:c,38:l}),{11:23,30:C,39:24,40:T,41:27,42:v,43:R,44:_,45:V,46:P,47:E,48:B,49:p,50:D,51:h},{11:39,13:38,24:z,29:X,30:C,31:40,32:41,39:24,40:T,41:27,42:v,43:R,44:_,45:V,46:P,47:E,48:B,49:p,50:D,51:h},{11:45,15:44,29:Y,30:C,35:46,39:24,40:T,41:27,42:v,43:R,44:_,45:V,46:P,47:E,48:B,49:p,50:D,51:h},{11:49,17:48,24:N,30:C,39:24,40:T,41:27,42:v,43:R,44:_,45:V,46:P,47:E,48:B,49:p,50:D,51:h},{11:52,17:51,24:N,30:C,39:24,40:T,41:27,42:v,43:R,44:_,45:V,46:P,47:E,48:B,49:p,50:D,51:h},{20:[1,53]},{22:[1,54]},t(w,[2,18]),{1:[2,2]},t(w,[2,8]),t(w,[2,9]),t(U,[2,39],{41:55,42:v,43:R,44:_,45:V,46:P,47:E,48:B,49:p,50:D,51:h}),t(U,[2,40]),t(U,[2,41]),t(y,[2,42]),t(y,[2,44]),t(y,[2,45]),t(y,[2,46]),t(y,[2,47]),t(y,[2,48]),t(y,[2,49]),t(y,[2,50]),t(y,[2,51]),t(y,[2,52]),t(y,[2,53]),t(w,[2,10]),t(w,[2,24],{32:41,31:56,24:z,29:X}),t(w,[2,26]),t(w,[2,27]),{33:[1,57]},{11:59,30:C,34:58,39:24,40:T,41:27,42:v,43:R,44:_,45:V,46:P,47:E,48:B,49:p,50:D,51:h},t(w,[2,11]),t(w,[2,32],{35:60,29:Y}),t(w,[2,34]),{33:[1,61]},t(w,[2,12]),{17:62,24:N},{25:63,27:64,29:A},t(w,[2,14]),{17:66,24:N},t(w,[2,16]),t(w,[2,17]),t(y,[2,43]),t(w,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},t(w,[2,33]),{29:[1,70]},t(w,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},t(O,[2,23],{30:[1,73]}),t(w,[2,15]),t(w,[2,28]),t(w,[2,29]),{11:59,30:C,34:74,39:24,40:T,41:27,42:v,43:R,44:_,45:V,46:P,47:E,48:B,49:p,50:D,51:h},t(w,[2,35]),t(w,[2,19]),{25:75,27:64,29:A},t(O,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:n.__name(function(u,b){if(b.recoverable)this.trace(u);else{var g=new Error(u);throw g.hash=b,g}},"parseError"),parse:n.__name(function(u){var b=this,g=[0],x=[],k=[null],r=[],K=this.table,d="",it=0,St=0,Rt=0,Jt=2,kt=1,te=r.slice.call(arguments,1),L=Object.create(this.lexer),$={yy:{}};for(var rt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,rt)&&($.yy[rt]=this.yy[rt]);L.setInput(u,$.yy),$.yy.lexer=L,$.yy.parser=this,typeof L.yylloc>"u"&&(L.yylloc={});var ht=L.yylloc;r.push(ht);var ee=L.options&&L.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ie(F){g.length=g.length-2*F,k.length=k.length-F,r.length=r.length-F}n.__name(ie,"popStack");function Tt(){var F=x.pop()||L.lex()||kt;return typeof F!="number"&&(F instanceof Array&&(x=F,F=x.pop()),F=b.symbols_[F]||F),F}n.__name(Tt,"lex");for(var I,lt,G,W,ct,j={},st,q,Dt,nt;;){if(G=g[g.length-1],this.defaultActions[G]?W=this.defaultActions[G]:((I===null||typeof I>"u")&&(I=Tt()),W=K[G]&&K[G][I]),typeof W>"u"||!W.length||!W[0]){var ut="";nt=[];for(st in K[G])this.terminals_[st]&&st>Jt&&nt.push("'"+this.terminals_[st]+"'");L.showPosition?ut="Parse error on line "+(it+1)+`:
2
+ `+L.showPosition()+`
3
+ Expecting `+nt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":ut="Parse error on line "+(it+1)+": Unexpected "+(I==kt?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(ut,{text:L.match,token:this.terminals_[I]||I,line:L.yylineno,loc:ht,expected:nt})}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+I);switch(W[0]){case 1:g.push(I),k.push(L.yytext),r.push(L.yylloc),g.push(W[1]),I=null,lt?(I=lt,lt=null):(St=L.yyleng,d=L.yytext,it=L.yylineno,ht=L.yylloc,Rt>0&&Rt--);break;case 2:if(q=this.productions_[W[1]][1],j.$=k[k.length-q],j._$={first_line:r[r.length-(q||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(q||1)].first_column,last_column:r[r.length-1].last_column},ee&&(j._$.range=[r[r.length-(q||1)].range[0],r[r.length-1].range[1]]),ct=this.performAction.apply(j,[d,St,it,$.yy,W[1],k,r].concat(te)),typeof ct<"u")return ct;q&&(g=g.slice(0,-1*q*2),k=k.slice(0,-1*q),r=r.slice(0,-1*q)),g.push(this.productions_[W[1]][0]),k.push(j.$),r.push(j._$),Dt=K[g[g.length-2]][g[g.length-1]],g.push(Dt);break;case 3:return!0}}return!0},"parse")};S.lexer=(function(){return{EOF:1,parseError:n.__name(function(u,b){if(this.yy.parser)this.yy.parser.parseError(u,b);else throw new Error(u)},"parseError"),setInput:n.__name(function(o,u){return this.yy=u||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},"setInput"),input:n.__name(function(){var o=this._input[0];return this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o,o.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:n.__name(function(o){var u=o.length,b=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var g=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),b.length-1&&(this.yylineno-=b.length-1);var x=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:b?(b.length===g.length?this.yylloc.first_column:0)+g[g.length-b.length].length-b[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:n.__name(function(){return this._more=!0,this},"more"),reject:n.__name(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},"reject"),less:n.__name(function(o){this.unput(this.match.slice(o))},"less"),pastInput:n.__name(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n.__name(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,"")},"upcomingInput"),showPosition:n.__name(function(){var o=this.pastInput(),u=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
5
+ `+u+"^"},"showPosition"),test_match:n.__name(function(o,u){var b,g,x;if(this.options.backtrack_lexer&&(x={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&&(x.yylloc.range=this.yylloc.range.slice(0))),g=o[0].match(/(?:\r\n?|\n).*/g),g&&(this.yylineno+=g.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:g?g[g.length-1].length-g[g.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],b=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),b)return b;if(this._backtrack){for(var k in x)this[k]=x[k];return!1}return!1},"test_match"),next:n.__name(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,u,b,g;this._more||(this.yytext="",this.match="");for(var x=this._currentRules(),k=0;k<x.length;k++)if(b=this._input.match(this.rules[x[k]]),b&&(!u||b[0].length>u[0].length)){if(u=b,g=k,this.options.backtrack_lexer){if(o=this.test_match(b,x[k]),o!==!1)return o;if(this._backtrack){u=!1;continue}else return!1}else if(!this.options.flex)break}return u?(o=this.test_match(u,x[g]),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})},"next"),lex:n.__name(function(){var u=this.next();return u||this.lex()},"lex"),begin:n.__name(function(u){this.conditionStack.push(u)},"begin"),popState:n.__name(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:n.__name(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:n.__name(function(u){return u=this.conditionStack.length-1-Math.abs(u||0),u>=0?this.conditionStack[u]:"INITIAL"},"topState"),pushState:n.__name(function(u){this.begin(u)},"pushState"),stateStackSize:n.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:n.__name(function(u,b,g,x){switch(g){case 0:break;case 1:break;case 2:return this.popState(),36;case 3:return this.popState(),36;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 33;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 29;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 44;case 33:return"COLON";case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}}})();function H(){this.yy={}}return n.__name(H,"Parser"),H.prototype=S,S.Parser=H,new H})();xt.parser=xt;var he=xt;function dt(t){return t.type==="bar"}n.__name(dt,"isBarPlot");function at(t){return t.type==="band"}n.__name(at,"isBandAxisData");function Q(t){return t.type==="linear"}n.__name(Q,"isLinearAxisData");var Vt=class{constructor(t){this.parentGroup=t}static{n.__name(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,e){if(!this.parentGroup)return{width:t.reduce((a,c)=>Math.max(c.length,a),0)*e,height:e};const s={width:0,height:0},i=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",e);for(const a of t){const c=oe.computeDimensionOfText(i,1,a),l=c?c.width:a.length*e,f=c?c.height:e;s.width=Math.max(s.width,l),s.height=Math.max(s.height,f)}return i.remove(),s}},vt=.7,Et=.2,Bt=class{constructor(t,e,s,i){this.axisConfig=t,this.title=e,this.textDimensionCalculator=s,this.axisThemeConfig=i,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{n.__name(this,"BaseAxis")}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){vt*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(vt*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let e=t.height;if(this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),i=Et*t.width;this.outerPadding=Math.min(s.width/2,i);let a=s.height;this.axisPosition==="bottom"&&this.normalizedLabelRotationInRad!==0&&(a=Math.max(a,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*s.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*s.height))),a+=this.axisConfig.labelPadding*2,this.labelTextHeight=s.height,a<=e&&(e-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),i=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,i<=e&&(e-=i,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-e}calculateSpaceIfDrawnVertical(t){let e=t.width;if(this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),i=Et*t.height;this.outerPadding=Math.min(s.height/2,i);const a=s.width+this.axisConfig.labelPadding*2;a<=e&&(e-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),i=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,i<=e&&(e-=i,this.showTitle=!0)}this.boundingRect.width=t.width-e,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateOffsetByRotation(t){const e=this.normalizedLabelRotationInRad;return e===0?0:Math.sin(e)*this.getLabelDimension()[t]/2}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const e=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${e},${this.boundingRect.y} L ${e},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(e),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const e=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${e},${this.getScaleValue(s)} L ${e-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const e=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},${e}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e)+this.calculateOffsetByRotation("height"),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation("width")),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:this.normalizedLabelRotationInRad*180/Math.PI,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const e=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${e} L ${this.getScaleValue(s)},${e+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const e=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},${e}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const e=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${e+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${e+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},le=class extends Bt{static{n.__name(this,"BandAxis")}constructor(t,e,s,i,a){super(t,i,a,e),this.categories=s,this.scale=gt().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=gt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),It.log.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},ce=class extends Bt{static{n.__name(this,"LinearAxis")}constructor(t,e,s,i,a){super(t,i,a,e),this.domain=s,this.scale=Lt.linear().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=Lt.linear().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function ft(t,e,s,i){const a=new Vt(i);return at(t)?new le(e,s,t.categories,t.title,a):new ce(e,s,[t.min,t.max],t.title,a)}n.__name(ft,"getAxis");var ue=class{constructor(t,e,s,i){this.textDimensionCalculator=t,this.chartConfig=e,this.chartData=s,this.chartThemeConfig=i,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{n.__name(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const e=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(e.width,t.width),i=e.height+2*this.chartConfig.titlePadding;return e.width<=s&&e.height<=i&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=s,this.boundingRect.height=i,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}};function zt(t,e,s,i){return new ue(new Vt(i),t,e,s)}n.__name(zt,"getChartTitleComponent");var ge=class{constructor(t,e,s,i,a){this.plotData=t,this.xAxis=e,this.yAxis=s,this.orientation=i,this.plotIndex=a}static{n.__name(this,"LinePlot")}getDrawableElement(){const t=this.plotData.data.map(i=>[this.xAxis.getScaleValue(i[0]),this.yAxis.getScaleValue(i[1])]);let e;if(this.orientation==="horizontal"?e=Pt.line_default().y(i=>i[0]).x(i=>i[1])(t):e=Pt.line_default().x(i=>i[0]).y(i=>i[1])(t),!e)return[];const s=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:e,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){const c=[];for(const[l,[f,C]]of t.entries()){const T=this.plotData.pointLabels[l];T&&(this.orientation==="horizontal"?c.push({x:C+10,y:f,text:T,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0}):c.push({x:f,y:C-10,text:T,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0}))}c.length>0&&s.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:c})}return s}},xe=class{constructor(t,e,s,i,a,c){this.barData=t,this.boundingRect=e,this.xAxis=s,this.yAxis=i,this.orientation=a,this.plotIndex=c}static{n.__name(this,"BarPlot")}getDrawableElement(){const t=this.barData.data.map(i=>[this.xAxis.getScaleValue(i[0]),this.yAxis.getScaleValue(i[1])]),e=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*.95,s=e/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(i=>({x:this.boundingRect.x,y:i[0]-s,height:e,width:i[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(i=>({x:i[0]-s,y:i[1],width:e,height:this.boundingRect.y+this.boundingRect.height-i[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},de=class{constructor(t,e,s){this.chartConfig=t,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}static{n.__name(this,"BasePlot")}setAxes(t,e){this.xAxis=t,this.yAxis=e}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");const t=[];for(const[e,s]of this.chartData.plots.entries())switch(s.type){case"line":{const i=new ge(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);t.push(...i.getDrawableElement())}break;case"bar":{const i=new xe(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);t.push(...i.getDrawableElement())}break}return t}};function Ot(t,e,s){return new de(t,e,s)}n.__name(Ot,"getPlotComponent");var fe=class{constructor(t,e,s,i){this.chartConfig=t,this.chartData=e,this.componentStore={title:zt(t,e,s,i),plot:Ot(t,e,s),xAxis:ft(e.xAxis,t.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},i),yAxis:ft(e.yAxis,t.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},i)}}static{n.__name(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,s=0,i=0,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),c=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),l=this.componentStore.plot.calculateSpace({width:a,height:c});t-=l.width,e-=l.height,l=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e}),i=l.height,e-=l.height,this.componentStore.xAxis.setAxisPosition("bottom"),l=this.componentStore.xAxis.calculateSpace({width:t,height:e}),e-=l.height,this.componentStore.yAxis.setAxisPosition("left"),l=this.componentStore.yAxis.calculateSpace({width:t,height:e}),s=l.width,t-=l.width,t>0&&(a+=t,t=0),e>0&&(c+=e,e=0),this.componentStore.plot.calculateSpace({width:a,height:c}),this.componentStore.plot.setBoundingBoxXY({x:s,y:i}),this.componentStore.xAxis.setRange([s,s+a]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:i+c}),this.componentStore.yAxis.setRange([i,i+c]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(f=>dt(f))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,s=0,i=0,a=0,c=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),l=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:c,height:l});t-=f.width,e-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e}),s=f.height,e-=f.height,this.componentStore.xAxis.setAxisPosition("left"),f=this.componentStore.xAxis.calculateSpace({width:t,height:e}),t-=f.width,i=f.width,this.componentStore.yAxis.setAxisPosition("top"),f=this.componentStore.yAxis.calculateSpace({width:t,height:e}),e-=f.height,a=s+f.height,t>0&&(c+=t,t=0),e>0&&(l+=e,e=0),this.componentStore.plot.calculateSpace({width:c,height:l}),this.componentStore.plot.setBoundingBoxXY({x:i,y:a}),this.componentStore.yAxis.setRange([i,i+c]),this.componentStore.yAxis.setBoundingBoxXY({x:i,y:s}),this.componentStore.xAxis.setRange([a,a+l]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(C=>dt(C))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const e of Object.values(this.componentStore))t.push(...e.getDrawableElements());return t}},pe=class{static{n.__name(this,"XYChartBuilder")}static build(t,e,s,i){return new fe(t,e,s,i).getDrawableElement()}},Z=0,Wt,J=yt(),tt=_t(),m=bt(),pt=tt.plotColorPalette.split(",").map(t=>t.trim()),ot=!1,mt=!1;function _t(){const t=M.getThemeVariables3(),e=M.getConfig();return Mt.cleanAndMerge(t.xyChart,e.themeVariables.xyChart)}n.__name(_t,"getChartDefaultThemeConfig");function yt(){const t=M.getConfig();return Mt.cleanAndMerge(M.defaultConfig_default.xyChart,t.xyChart)}n.__name(yt,"getChartDefaultConfig");function bt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}n.__name(bt,"getChartDefaultData");function et(t){const e=M.getConfig();return M.sanitizeText(t.trim(),e)}n.__name(et,"textSanitizer");function Ft(t){Wt=t}n.__name(Ft,"setTmpSVGG");function Xt(t){t==="horizontal"?J.chartOrientation="horizontal":J.chartOrientation="vertical"}n.__name(Xt,"setOrientation");function Yt(t){m.xAxis.title=et(t.text)}n.__name(Yt,"setXAxisTitle");function At(t,e){m.xAxis={type:"linear",title:m.xAxis.title,min:t,max:e},ot=!0}n.__name(At,"setXAxisRangeData");function Nt(t){m.xAxis={type:"band",title:m.xAxis.title,categories:t.map(e=>et(e.text))},ot=!0}n.__name(Nt,"setXAxisBand");function qt(t){m.yAxis.title=et(t.text)}n.__name(qt,"setYAxisTitle");function Ht(t,e){m.yAxis={type:"linear",title:m.yAxis.title,min:t,max:e},mt=!0}n.__name(Ht,"setYAxisRangeData");function Ut(t){const e=Math.min(...t),s=Math.max(...t),i=Q(m.yAxis)?m.yAxis.min:1/0,a=Q(m.yAxis)?m.yAxis.max:-1/0;m.yAxis={type:"linear",title:m.yAxis.title,min:Math.min(i,e),max:Math.max(a,s)}}n.__name(Ut,"setYAxisRangeFromPlotData");function wt(t){let e=[];if(t.length===0)return e;if(!ot){const s=Q(m.xAxis)?m.xAxis.min:1/0,i=Q(m.xAxis)?m.xAxis.max:-1/0;At(Math.min(s,1),Math.max(i,t.length))}if(at(m.xAxis)&&t.length>m.xAxis.categories.length&&(t=t.slice(0,m.xAxis.categories.length)),mt||Ut(t),at(m.xAxis)&&(e=m.xAxis.categories.map((s,i)=>[s,t[i]])),Q(m.xAxis)){const s=m.xAxis.min,i=m.xAxis.max,a=(i-s)/(t.length-1),c=[];for(let l=s;l<=i;l+=a)c.push(`${l}`);e=c.map((l,f)=>[l,t[f]])}return e}n.__name(wt,"transformDataWithoutCategory");function Ct(t){return pt[t===0?0:t%pt.length]}n.__name(Ct,"getPlotColorFromPalette");function $t(t,e){const s=e.map(l=>l.value),i=e.map(l=>l.label?et(l.label):""),a=wt(s),c=i.some(l=>l!=="");m.plots.push({type:"line",strokeFill:Ct(Z),strokeWidth:2,data:a,...c?{pointLabels:i}:{}}),Z++}n.__name($t,"setLineData");function Gt(t,e){const s=wt(e.map(i=>i.value));m.plots.push({type:"bar",fill:Ct(Z),data:s}),Z++}n.__name(Gt,"setBarData");function jt(){if(m.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return m.title=M.getDiagramTitle(),pe.build(J,m,tt,Wt)}n.__name(jt,"getDrawableElem");function Qt(){return tt}n.__name(Qt,"getChartThemeConfig");function Kt(){return J}n.__name(Kt,"getChartConfig");function Zt(){return m}n.__name(Zt,"getXYChartData");var me={parser:he,db:{getDrawableElem:jt,clear:n.__name(function(){M.clear(),Z=0,J=yt(),m=bt(),tt=_t(),pt=tt.plotColorPalette.split(",").map(t=>t.trim()),ot=!1,mt=!1},"clear"),setAccTitle:M.setAccTitle,getAccTitle:M.getAccTitle,setDiagramTitle:M.setDiagramTitle,getDiagramTitle:M.getDiagramTitle,getAccDescription:M.getAccDescription,setAccDescription:M.setAccDescription,setOrientation:Xt,setXAxisTitle:Yt,setXAxisRangeData:At,setXAxisBand:Nt,setYAxisTitle:qt,setYAxisRangeData:Ht,setLineData:$t,setBarData:Gt,setTmpSVGG:Ft,getChartThemeConfig:Qt,getChartConfig:Kt,getXYChartData:Zt},renderer:{draw:n.__name((t,e,s,i)=>{const a=i.db,c=a.getChartThemeConfig(),l=a.getChartConfig(),f=a.getXYChartData().plots[0].data.map(p=>p[1]);function C(p){return p==="top"?"text-before-edge":"middle"}n.__name(C,"getDominantBaseLine");function T(p){return p==="left"?"start":p==="right"?"end":"middle"}n.__name(T,"getTextAnchor");function v(p){return`translate(${p.x}, ${p.y}) rotate(${p.rotation||0})`}n.__name(v,"getTextTransformation"),It.log.debug(`Rendering xychart chart
7
+ `+t);const R=ae.selectSvgElement(e),_=R.append("g").attr("class","main"),V=_.append("rect").attr("width",l.width).attr("height",l.height).attr("class","background");M.configureSvgSize(R,l.height,l.width,!0),R.attr("viewBox",`0 0 ${l.width} ${l.height}`),V.attr("fill",c.backgroundColor),a.setTmpSVGG(R.append("g").attr("class","mermaid-tmp-group"));const P=a.getDrawableElem(),E={};function B(p){let D=_,h="";for(const[z]of p.entries()){let X=_;z>0&&E[h]&&(X=E[h]),h+=p[z],D=E[h],D||(D=E[h]=X.append("g").attr("class",p[z]))}return D}n.__name(B,"getGroup");for(const p of P){if(p.data.length===0)continue;const D=B(p.groupTexts);switch(p.type){case"rect":if(D.selectAll("rect").data(p.data).enter().append("rect").attr("x",h=>h.x).attr("y",h=>h.y).attr("width",h=>h.width).attr("height",h=>h.height).attr("fill",h=>h.fill).attr("stroke",h=>h.strokeFill).attr("stroke-width",h=>h.strokeWidth),l.showDataLabel){const h=l.showDataLabelOutsideBar;if(l.chartOrientation==="horizontal"){let z=function(A,O){const{data:S,label:H}=A;return O*H.length*X<=S.width-Y};n.__name(z,"fitsHorizontally");const X=.7,Y=10,N=p.data.map((A,O)=>({data:A,label:f[O].toString()})).filter(A=>A.data.width>0&&A.data.height>0),w=N.map(A=>{const{data:O}=A;let S=O.height*.7;for(;!z(A,S)&&S>0;)S-=1;return S}),U=Math.floor(Math.min(...w)),y=n.__name(A=>h?A.data.x+A.data.width+Y:A.data.x+A.data.width-Y,"determineLabelXPosition");D.selectAll("text").data(N).enter().append("text").attr("x",y).attr("y",A=>A.data.y+A.data.height/2).attr("text-anchor",h?"start":"end").attr("dominant-baseline","middle").attr("fill",c.dataLabelColor).attr("font-size",`${U}px`).text(A=>A.label)}else{let z=function(y,A,O){const{data:S,label:H}=y,o=A*H.length*.7,u=S.x+S.width/2,b=u-o/2,g=u+o/2,x=b>=S.x&&g<=S.x+S.width,k=S.y+O+A<=S.y+S.height;return x&&k};n.__name(z,"fitsInBar");const X=10,Y=p.data.map((y,A)=>({data:y,label:f[A].toString()})).filter(y=>y.data.width>0&&y.data.height>0),N=Y.map(y=>{const{data:A,label:O}=y;let S=A.width/(O.length*.7);for(;!z(y,S,X)&&S>0;)S-=1;return S}),w=Math.floor(Math.min(...N)),U=n.__name(y=>h?y.data.y-X:y.data.y+X,"determineLabelYPosition");D.selectAll("text").data(Y).enter().append("text").attr("x",y=>y.data.x+y.data.width/2).attr("y",U).attr("text-anchor","middle").attr("dominant-baseline",h?"auto":"hanging").attr("fill",c.dataLabelColor).attr("font-size",`${w}px`).text(y=>y.label)}}break;case"text":D.selectAll("text").data(p.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",h=>h.fill).attr("font-size",h=>h.fontSize).attr("dominant-baseline",h=>C(h.verticalPos)).attr("text-anchor",h=>T(h.horizontalPos)).attr("transform",h=>v(h)).text(h=>h.text);break;case"path":D.selectAll("path").data(p.data).enter().append("path").attr("d",h=>h.path).attr("fill",h=>h.fill?h.fill:"none").attr("stroke",h=>h.strokeFill).attr("stroke-width",h=>h.strokeWidth);break}}},"draw")}};exports.diagram=me;