@pi-outpost/embed 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +63 -0
  3. package/dist/abnfDiagram-VRR7QNED-BPTALLb_.cjs +1 -0
  4. package/dist/abnfDiagram-VRR7QNED-DlAvVtuC.js +89 -0
  5. package/dist/arc-BBnpgwVQ.js +80 -0
  6. package/dist/arc-DcUn9_NX.cjs +1 -0
  7. package/dist/architecture-TIHT7OUA-D-35jO9Y.cjs +1 -0
  8. package/dist/architecture-TIHT7OUA-DDyMqjR1.js +3 -0
  9. package/dist/architectureDiagram-ZJ3FMSHR-Bh5-VPPg.cjs +36 -0
  10. package/dist/architectureDiagram-ZJ3FMSHR-D7UsY5ua.js +4120 -0
  11. package/dist/array-CApNbSU9.js +6 -0
  12. package/dist/array-DZSRzHA_.cjs +1 -0
  13. package/dist/bash-BLBHkRa_.js +169 -0
  14. package/dist/bash-DHJu-DNv.cjs +1 -0
  15. package/dist/blockDiagram-677ZJIJ3-BrXgigdO.cjs +132 -0
  16. package/dist/blockDiagram-677ZJIJ3-s-fanRPN.js +3160 -0
  17. package/dist/c-4QgYfi8K.cjs +1 -0
  18. package/dist/c-Cw4FsAeJ.js +176 -0
  19. package/dist/c4Diagram-LMCZKHZV-BbZFAi_K.js +2962 -0
  20. package/dist/c4Diagram-LMCZKHZV-DFBVQ9Uo.cjs +10 -0
  21. package/dist/channel-DV0ST12Z.js +5 -0
  22. package/dist/channel-DkMGzfUR.cjs +1 -0
  23. package/dist/chunk-2Q5K7J3B-B8v9mTdK.cjs +1 -0
  24. package/dist/chunk-2Q5K7J3B-DqJF2oYF.js +15 -0
  25. package/dist/chunk-32BRIVSS-Byu3FrKX.js +61 -0
  26. package/dist/chunk-32BRIVSS-oWSJWk-u.cjs +1 -0
  27. package/dist/chunk-52WLFC77-C9zQbcGs.js +590 -0
  28. package/dist/chunk-52WLFC77-D9PTsiCj.cjs +10 -0
  29. package/dist/chunk-5VM5RSS4-BMfgdMFU.js +5 -0
  30. package/dist/chunk-5VM5RSS4-CwDmQ9T_.cjs +15 -0
  31. package/dist/chunk-7BUUIJ7U-BFUeQBoS.js +82 -0
  32. package/dist/chunk-7BUUIJ7U-MzS1pW_S.cjs +1 -0
  33. package/dist/chunk-C7G6YPKG-CDjkH_UW.cjs +1 -0
  34. package/dist/chunk-C7G6YPKG-GTlyrFFt.js +67 -0
  35. package/dist/chunk-EX3LRPZG-BBldDxGh.js +2046 -0
  36. package/dist/chunk-EX3LRPZG-u-BKCEWO.cjs +231 -0
  37. package/dist/chunk-FWX5IMBZ-h3GfgkP2.js +57 -0
  38. package/dist/chunk-FWX5IMBZ-nqBth1J9.cjs +1 -0
  39. package/dist/chunk-HOUHSVGY-CgfXy94u.cjs +1 -0
  40. package/dist/chunk-HOUHSVGY-CtRCnz1G.js +277 -0
  41. package/dist/chunk-ICXQ74PX-BmEfYj-r.cjs +2 -0
  42. package/dist/chunk-ICXQ74PX-CC59NQmW.js +1366 -0
  43. package/dist/chunk-JWPE2WC7-B_J6qwQL.js +8 -0
  44. package/dist/chunk-JWPE2WC7-Cs1kjq8S.cjs +1 -0
  45. package/dist/chunk-KEIR6QF5-BVnxrdHo.js +21388 -0
  46. package/dist/chunk-KEIR6QF5-Cy_QBNG6.cjs +161 -0
  47. package/dist/chunk-MOJQB5TN-D6YxvkUY.js +490 -0
  48. package/dist/chunk-MOJQB5TN-H2vwz-oQ.cjs +88 -0
  49. package/dist/chunk-OGEWGWER-BGdqgMza.js +32 -0
  50. package/dist/chunk-OGEWGWER-BP4o8A-v.cjs +1 -0
  51. package/dist/chunk-PUDLZKDR-C8jMDFq6.js +4142 -0
  52. package/dist/chunk-PUDLZKDR-DtzwSdxX.cjs +156 -0
  53. package/dist/chunk-Q4XR5HBZ-Bk18cMuk.js +1628 -0
  54. package/dist/chunk-Q4XR5HBZ-COrrWZzi.cjs +70 -0
  55. package/dist/chunk-RYQCIY6F-27FDzaaE.cjs +1 -0
  56. package/dist/chunk-RYQCIY6F-C-YC3QS_.js +239 -0
  57. package/dist/chunk-V7JOEXUC-BROsdKzY.js +3357 -0
  58. package/dist/chunk-V7JOEXUC-Cfrm5GQn.cjs +206 -0
  59. package/dist/chunk-VAUOI2AC-05FwamOA.js +10 -0
  60. package/dist/chunk-VAUOI2AC-CBXi4Di2.cjs +1 -0
  61. package/dist/chunk-VR4S4FIN-CSU_1xTZ.cjs +1 -0
  62. package/dist/chunk-VR4S4FIN-Ci491c8N.js +26 -0
  63. package/dist/chunk-WYO6CB5R-BTvDzbWd.cjs +127 -0
  64. package/dist/chunk-WYO6CB5R-Y9HJHB3Q.js +3739 -0
  65. package/dist/chunk-XXDRQBXY-DsVp5qjg.js +9 -0
  66. package/dist/chunk-XXDRQBXY-gWcN0uCZ.cjs +1 -0
  67. package/dist/chunk-Y2CYZVJY-CnmLqFtv.cjs +1 -0
  68. package/dist/chunk-Y2CYZVJY-CwsV_8W4.js +12 -0
  69. package/dist/chunk-ZGVPDNZ5-CDTkXY1G.js +3736 -0
  70. package/dist/chunk-ZGVPDNZ5-COEQX4AZ.cjs +62 -0
  71. package/dist/chunk-ZIRB5QZD-BU6XQUGC.cjs +32 -0
  72. package/dist/chunk-ZIRB5QZD-Cj-y77rH.js +1146 -0
  73. package/dist/classDiagram-OUVF2IWQ-Avsu6OKn.cjs +1 -0
  74. package/dist/classDiagram-OUVF2IWQ-eC72Wwol.js +30 -0
  75. package/dist/classDiagram-v2-EOCWNBFH-Avsu6OKn.cjs +1 -0
  76. package/dist/classDiagram-v2-EOCWNBFH-DsRoQgCt.js +30 -0
  77. package/dist/core-2nR1zkKb.cjs +3 -0
  78. package/dist/core-BO2hTFeF.js +845 -0
  79. package/dist/cose-bilkent-JH36ORCC-AyWV1dUo.cjs +1 -0
  80. package/dist/cose-bilkent-JH36ORCC-BFo5zomD.js +2251 -0
  81. package/dist/cpp-BUtp-HE2.cjs +1 -0
  82. package/dist/cpp-CeyO6lBG.js +225 -0
  83. package/dist/csharp-BJu4kEpt.cjs +1 -0
  84. package/dist/csharp-Ck6Fet_o.js +260 -0
  85. package/dist/css-ClSGJRju.js +140 -0
  86. package/dist/css-DeFr0lev.cjs +1 -0
  87. package/dist/cynefin-VYW2F7L2-DHhUPDgc.cjs +1 -0
  88. package/dist/cynefin-VYW2F7L2-DwiVqvhg.js +3 -0
  89. package/dist/cynefinDiagram-TSTJHNR4-BRUl09PN.js +349 -0
  90. package/dist/cynefinDiagram-TSTJHNR4-rKPqxFde.cjs +62 -0
  91. package/dist/cytoscape.esm-ByjvpCPI.cjs +321 -0
  92. package/dist/cytoscape.esm-asYnbYTy.js +18148 -0
  93. package/dist/dagre-BBlCxSvR.cjs +1 -0
  94. package/dist/dagre-BpqwxFKp.js +1701 -0
  95. package/dist/dagre-VKFMJZFB-BsfMZfPu.cjs +4 -0
  96. package/dist/dagre-VKFMJZFB-ChTkS14y.js +328 -0
  97. package/dist/defaultLocale-u9yUoUmE.cjs +1 -0
  98. package/dist/defaultLocale-up9-vqhM.js +201 -0
  99. package/dist/diagram-FQU43EPY-BnAYoLDy.js +432 -0
  100. package/dist/diagram-FQU43EPY-CdbwLZpm.cjs +3 -0
  101. package/dist/diagram-G47NLZAW-C1ZiELQG.js +525 -0
  102. package/dist/diagram-G47NLZAW-CtWKuxkf.cjs +24 -0
  103. package/dist/diagram-NH7WQ7WH-Be0KXo6w.js +134 -0
  104. package/dist/diagram-NH7WQ7WH-CG6VWVza.cjs +24 -0
  105. package/dist/diagram-OA4YK3LP-B7avlqjG.js +300 -0
  106. package/dist/diagram-OA4YK3LP-Drq_GA6o.cjs +30 -0
  107. package/dist/diagram-WEI45ONY-CoPX6-sx.js +214 -0
  108. package/dist/diagram-WEI45ONY-SJmgVL59.cjs +41 -0
  109. package/dist/dist-D6LMt8nW.js +59 -0
  110. package/dist/dist-DNGlMOWd.cjs +1 -0
  111. package/dist/dockerfile-O4rAswfG.js +34 -0
  112. package/dist/dockerfile-YBgAWga3.cjs +1 -0
  113. package/dist/ebnfDiagram-CCIWWBDH-B-T4_JnX.js +100 -0
  114. package/dist/ebnfDiagram-CCIWWBDH-BY7L3HVQ.cjs +1 -0
  115. package/dist/erDiagram-Q63AITRT-DPgZpeaH.js +1727 -0
  116. package/dist/erDiagram-Q63AITRT-w4C1PxYd.cjs +85 -0
  117. package/dist/eventmodeling-45OFAUF4-COTtdYDJ.js +3 -0
  118. package/dist/eventmodeling-45OFAUF4-CPEyr9kU.cjs +1 -0
  119. package/dist/flowDiagram-23GEKE2U-CQxPdUX4.cjs +1 -0
  120. package/dist/flowDiagram-23GEKE2U-ClCSBl2p.js +17 -0
  121. package/dist/ganttDiagram-NO4QXBWP-BcBp028S.cjs +292 -0
  122. package/dist/ganttDiagram-NO4QXBWP-Cf12fLfa.js +3083 -0
  123. package/dist/gitGraph-TEB2WS4Q-C3qBT0GM.js +3 -0
  124. package/dist/gitGraph-TEB2WS4Q-a8KsoPmR.cjs +1 -0
  125. package/dist/gitGraphDiagram-IHSO6WYX-13ahKewT.js +729 -0
  126. package/dist/gitGraphDiagram-IHSO6WYX-BTtNkGkN.cjs +106 -0
  127. package/dist/go-D-pz-dmd.cjs +1 -0
  128. package/dist/go-rg7jg1mu.js +140 -0
  129. package/dist/graphlib-B0GbLif1.js +1267 -0
  130. package/dist/graphlib-CkkG5MuS.cjs +1 -0
  131. package/dist/info-DKCQHKI2-BEYhR6ip.cjs +1 -0
  132. package/dist/info-DKCQHKI2-BPF6-pOb.js +3 -0
  133. package/dist/infoDiagram-FWYZ7A6U-20rh0VNL.cjs +2 -0
  134. package/dist/infoDiagram-FWYZ7A6U-DcV-eSsb.js +20 -0
  135. package/dist/ini-C1q3_1-Q.js +88 -0
  136. package/dist/ini-nVcUEghj.cjs +1 -0
  137. package/dist/init-07zIhv_j.cjs +1 -0
  138. package/dist/init-CirqLVcp.js +15 -0
  139. package/dist/ishikawaDiagram-FXEZZL3T-BTaBCHIG.js +719 -0
  140. package/dist/ishikawaDiagram-FXEZZL3T-BUq5kcFI.cjs +70 -0
  141. package/dist/java-CUN_usaq.cjs +1 -0
  142. package/dist/java-HguKEfA2.js +169 -0
  143. package/dist/javascript-C8NCH8DE.js +436 -0
  144. package/dist/javascript-UZXSyUuu.cjs +1 -0
  145. package/dist/journeyDiagram-5HDEW3XC-Cl9Z4b58.js +884 -0
  146. package/dist/journeyDiagram-5HDEW3XC-XQa-rhY_.cjs +139 -0
  147. package/dist/json-Cp01TR_B.js +36 -0
  148. package/dist/json-usH_MUzR.cjs +1 -0
  149. package/dist/kanban-definition-HUTT4EX6-CtWnZ0nS.js +975 -0
  150. package/dist/kanban-definition-HUTT4EX6-DVHXUPOt.cjs +89 -0
  151. package/dist/line-Ca8dE_lT.cjs +1 -0
  152. package/dist/line-O2xx2vVQ.js +34 -0
  153. package/dist/linear-CVhyaVzf.js +289 -0
  154. package/dist/linear-Cl2-QuPP.cjs +1 -0
  155. package/dist/map-CwPlMWPw.cjs +1 -0
  156. package/dist/map-DU12fF3s.js +241 -0
  157. package/dist/markdown-CzgRofaE.js +181 -0
  158. package/dist/markdown-qeo95R0i.cjs +1 -0
  159. package/dist/mermaid-parser.core-B8DQcCaz.js +638 -0
  160. package/dist/mermaid-parser.core-Cgsz0CdK.cjs +6 -0
  161. package/dist/mermaid.core-BR-iKb2Q.js +1064 -0
  162. package/dist/mermaid.core-DQrbAA--.cjs +10 -0
  163. package/dist/mindmap-definition-LN4V7U3C-C0I9iWmq.cjs +96 -0
  164. package/dist/mindmap-definition-LN4V7U3C-lkSmRsIC.js +1008 -0
  165. package/dist/mount.d.ts +31 -0
  166. package/dist/ordinal-CCTD6_le.js +65 -0
  167. package/dist/ordinal-CUPR-p0T.cjs +1 -0
  168. package/dist/packet-7NZHBO7P-DqvBYJTR.js +3 -0
  169. package/dist/packet-7NZHBO7P-Dz0O2bgq.cjs +1 -0
  170. package/dist/path-Kklx0M1v.cjs +1 -0
  171. package/dist/path-mKa7UESy.js +85 -0
  172. package/dist/pegDiagram-2B236MQR-BgRCQTZd.js +94 -0
  173. package/dist/pegDiagram-2B236MQR-hlmRl_PA.cjs +1 -0
  174. package/dist/php-C9FOMGEA.js +294 -0
  175. package/dist/php-j6EhDZDE.cjs +2 -0
  176. package/dist/pi-outpost-embed.cjs +305 -0
  177. package/dist/pi-outpost-embed.js +40942 -0
  178. package/dist/pie-RZYD4A2V-Hi9UdoE3.cjs +1 -0
  179. package/dist/pie-RZYD4A2V-qnruo9sH.js +3 -0
  180. package/dist/pieDiagram-ENE6RG2P-BVi7ck2I.js +205 -0
  181. package/dist/pieDiagram-ENE6RG2P-Buuvrs-h.cjs +39 -0
  182. package/dist/plaintext-BYYAHR3Z.js +10 -0
  183. package/dist/plaintext-DmnjizxG.cjs +1 -0
  184. package/dist/python-BYJzTRkK.cjs +1 -0
  185. package/dist/python-DKAazMIE.js +238 -0
  186. package/dist/quadrantDiagram-ABIIQ3AL-DeU97c2B.js +2001 -0
  187. package/dist/quadrantDiagram-ABIIQ3AL-LCbC0LEt.cjs +7 -0
  188. package/dist/radar-I7S5WNFK-Dqdssa34.cjs +1 -0
  189. package/dist/radar-I7S5WNFK-np_pJCO-.js +3 -0
  190. package/dist/railroad-3IZDKUUU-NILjDQft.cjs +1 -0
  191. package/dist/railroad-3IZDKUUU-sjKBeXxB.js +3 -0
  192. package/dist/railroad-abnf-AHOZXSZD-BojH9sxV.cjs +1 -0
  193. package/dist/railroad-abnf-AHOZXSZD-x5cC_e_R.js +3 -0
  194. package/dist/railroad-ebnf-EBAXGLYW-2mlWpz38.js +3 -0
  195. package/dist/railroad-ebnf-EBAXGLYW-BKCSut1M.cjs +1 -0
  196. package/dist/railroad-peg-LSFZ7HO6-CsH-gnsp.cjs +1 -0
  197. package/dist/railroad-peg-LSFZ7HO6-D5vguo03.js +3 -0
  198. package/dist/railroadDiagram-RFXS5EU6-CMTDNjsw.cjs +1 -0
  199. package/dist/railroadDiagram-RFXS5EU6-DNSNpLmQ.js +76 -0
  200. package/dist/requirementDiagram-TGXJPOKE-CdspXMgv.js +2223 -0
  201. package/dist/requirementDiagram-TGXJPOKE-irImpO8w.cjs +84 -0
  202. package/dist/rolldown-runtime-Dqa2HsxW.js +20 -0
  203. package/dist/rolldown-runtime-mLOUI7ql.cjs +1 -0
  204. package/dist/rough.esm-C5XyeDCN.js +1352 -0
  205. package/dist/rough.esm-r0QOSzHM.cjs +1 -0
  206. package/dist/ruby-BAUeZQKZ.js +262 -0
  207. package/dist/ruby-ClR4zp-1.cjs +1 -0
  208. package/dist/rust-DiTjMjP5.js +169 -0
  209. package/dist/rust-ghVvEWhm.cjs +1 -0
  210. package/dist/sankeyDiagram-HTMAVEWB-B0ZJBVpN.cjs +40 -0
  211. package/dist/sankeyDiagram-HTMAVEWB-BQcvUCMA.js +970 -0
  212. package/dist/scss-CKxh5HRg.cjs +1 -0
  213. package/dist/scss-CckAvQOx.js +150 -0
  214. package/dist/sequenceDiagram-DBY2YBRQ-BQFP2DGs.js +4168 -0
  215. package/dist/sequenceDiagram-DBY2YBRQ-C5WukkcA.cjs +162 -0
  216. package/dist/sizeCapture-X5ZJPWSS-DKbHZNyz.js +46 -0
  217. package/dist/sizeCapture-X5ZJPWSS-bJ2ZX4Du.cjs +1 -0
  218. package/dist/sql-B-Rnc2C3.js +118 -0
  219. package/dist/sql-B7syKcd8.cjs +1 -0
  220. package/dist/src-CR--T_NF.cjs +1 -0
  221. package/dist/src-DJ4x3y2O.js +2142 -0
  222. package/dist/stateDiagram-2N3HPSRC-4aBQt5dk.js +220 -0
  223. package/dist/stateDiagram-2N3HPSRC-YbRd67eD.cjs +1 -0
  224. package/dist/stateDiagram-v2-6OUMAXLB-D-c6D5za.js +30 -0
  225. package/dist/stateDiagram-v2-6OUMAXLB-ciXN_270.cjs +1 -0
  226. package/dist/swimlanes-5IMT3BWC-C8zkS7yx.cjs +1 -0
  227. package/dist/swimlanes-5IMT3BWC-aKH3Xgob.js +5066 -0
  228. package/dist/swimlanesDiagram-G3AALYLV-BcgsG1in.js +31 -0
  229. package/dist/swimlanesDiagram-G3AALYLV-CBjVJdH0.cjs +8 -0
  230. package/dist/timeline-definition-FHXFAJF6-DS-X0FCl.cjs +120 -0
  231. package/dist/timeline-definition-FHXFAJF6-Lnag6wiw.js +1069 -0
  232. package/dist/treeView-QDETBFTQ-Cpg_YeQ4.cjs +1 -0
  233. package/dist/treeView-QDETBFTQ-DdpEhzZX.js +3 -0
  234. package/dist/treemap-6X3UGDF4-BeCuRpkA.js +3 -0
  235. package/dist/treemap-6X3UGDF4-CFAmnKaf.cjs +1 -0
  236. package/dist/typescript-clWeqIBY.cjs +1 -0
  237. package/dist/typescript-mdYq8uqf.js +521 -0
  238. package/dist/vennDiagram-L72KCM5P-CF7lC7jn.js +1880 -0
  239. package/dist/vennDiagram-L72KCM5P-DYZP8jT_.cjs +34 -0
  240. package/dist/wardley-OPB4EBWU-B0jnKd8x.cjs +1 -0
  241. package/dist/wardley-OPB4EBWU-DlIk2K0J.js +3 -0
  242. package/dist/wardleyDiagram-EHGQE667-CbtWlMOa.js +645 -0
  243. package/dist/wardleyDiagram-EHGQE667-Dxewrpeh.cjs +78 -0
  244. package/dist/xml-BamqaQOf.cjs +1 -0
  245. package/dist/xml-DVYfB8uY.js +166 -0
  246. package/dist/xychartDiagram-FW5EYKEG-BAnVfMdN.cjs +7 -0
  247. package/dist/xychartDiagram-FW5EYKEG-DmdGPSi6.js +2102 -0
  248. package/dist/yaml-_1BORZTQ.js +144 -0
  249. package/dist/yaml-bAgWofBg.cjs +1 -0
  250. package/package.json +72 -0
@@ -0,0 +1,2102 @@
1
+ import { n as e } from "./chunk-Y2CYZVJY-CwsV_8W4.js";
2
+ import { m as t } from "./src-DJ4x3y2O.js";
3
+ import { D as n, H as r, K as i, U as a, a as o, b as s, c, f as l, v as u, w as d, y as f, z as p } from "./chunk-WYO6CB5R-Y9HJHB3Q.js";
4
+ import { t as m } from "./linear-CVhyaVzf.js";
5
+ import { t as h } from "./ordinal-CCTD6_le.js";
6
+ import { t as g } from "./init-CirqLVcp.js";
7
+ import { i as _ } from "./chunk-ICXQ74PX-CC59NQmW.js";
8
+ import { t as v } from "./line-O2xx2vVQ.js";
9
+ import { t as y } from "./chunk-VAUOI2AC-05FwamOA.js";
10
+ import "./chunk-HOUHSVGY-CtRCnz1G.js";
11
+ import { t as b } from "./chunk-Q4XR5HBZ-Bk18cMuk.js";
12
+ //#region ../node_modules/d3-array/src/range.js
13
+ function x(e, t, n) {
14
+ e = +e, t = +t, n = (i = arguments.length) < 2 ? (t = e, e = 0, 1) : i < 3 ? 1 : +n;
15
+ for (var r = -1, i = Math.max(0, Math.ceil((t - e) / n)) | 0, a = Array(i); ++r < i;) a[r] = e + r * n;
16
+ return a;
17
+ }
18
+ //#endregion
19
+ //#region ../node_modules/d3-scale/src/band.js
20
+ function S() {
21
+ var e = h().unknown(void 0), t = e.domain, n = e.range, r = 0, i = 1, a, o, s = !1, c = 0, l = 0, u = .5;
22
+ delete e.unknown;
23
+ function d() {
24
+ var e = t().length, d = i < r, f = d ? i : r, p = d ? r : i;
25
+ a = (p - f) / Math.max(1, e - c + l * 2), s && (a = Math.floor(a)), f += (p - f - a * (e - c)) * u, o = a * (1 - c), s && (f = Math.round(f), o = Math.round(o));
26
+ var m = x(e).map(function(e) {
27
+ return f + a * e;
28
+ });
29
+ return n(d ? m.reverse() : m);
30
+ }
31
+ return e.domain = function(e) {
32
+ return arguments.length ? (t(e), d()) : t();
33
+ }, e.range = function(e) {
34
+ return arguments.length ? ([r, i] = e, r = +r, i = +i, d()) : [r, i];
35
+ }, e.rangeRound = function(e) {
36
+ return [r, i] = e, r = +r, i = +i, s = !0, d();
37
+ }, e.bandwidth = function() {
38
+ return o;
39
+ }, e.step = function() {
40
+ return a;
41
+ }, e.round = function(e) {
42
+ return arguments.length ? (s = !!e, d()) : s;
43
+ }, e.padding = function(e) {
44
+ return arguments.length ? (c = Math.min(1, l = +e), d()) : c;
45
+ }, e.paddingInner = function(e) {
46
+ return arguments.length ? (c = Math.min(1, e), d()) : c;
47
+ }, e.paddingOuter = function(e) {
48
+ return arguments.length ? (l = +e, d()) : l;
49
+ }, e.align = function(e) {
50
+ return arguments.length ? (u = Math.max(0, Math.min(1, e)), d()) : u;
51
+ }, e.copy = function() {
52
+ return S(t(), [r, i]).round(s).paddingInner(c).paddingOuter(l).align(u);
53
+ }, g.apply(d(), arguments);
54
+ }
55
+ //#endregion
56
+ //#region ../node_modules/mermaid/dist/chunks/mermaid.core/xychartDiagram-FW5EYKEG.mjs
57
+ var C = (function() {
58
+ var t = /* @__PURE__ */ e(function(e, t, n, r) {
59
+ for (n ||= {}, r = e.length; r--; n[e[r]] = t);
60
+ return n;
61
+ }, "o"), n = [
62
+ 1,
63
+ 10,
64
+ 12,
65
+ 14,
66
+ 16,
67
+ 18,
68
+ 19,
69
+ 21,
70
+ 23
71
+ ], r = [2, 6], i = [1, 3], a = [1, 5], o = [1, 6], s = [1, 7], c = [
72
+ 1,
73
+ 5,
74
+ 10,
75
+ 12,
76
+ 14,
77
+ 16,
78
+ 18,
79
+ 19,
80
+ 21,
81
+ 23,
82
+ 36,
83
+ 37,
84
+ 38
85
+ ], l = [1, 25], u = [1, 26], d = [1, 28], f = [1, 29], p = [1, 30], m = [1, 31], h = [1, 32], g = [1, 33], _ = [1, 34], v = [1, 35], y = [1, 36], b = [1, 37], x = [1, 43], S = [1, 42], C = [1, 47], w = [1, 50], T = [
86
+ 1,
87
+ 10,
88
+ 12,
89
+ 14,
90
+ 16,
91
+ 18,
92
+ 19,
93
+ 21,
94
+ 23,
95
+ 36,
96
+ 37,
97
+ 38
98
+ ], E = [
99
+ 1,
100
+ 10,
101
+ 12,
102
+ 14,
103
+ 16,
104
+ 18,
105
+ 19,
106
+ 21,
107
+ 23,
108
+ 24,
109
+ 26,
110
+ 28,
111
+ 29,
112
+ 36,
113
+ 37,
114
+ 38
115
+ ], D = [
116
+ 1,
117
+ 10,
118
+ 12,
119
+ 14,
120
+ 16,
121
+ 18,
122
+ 19,
123
+ 21,
124
+ 23,
125
+ 24,
126
+ 26,
127
+ 28,
128
+ 29,
129
+ 36,
130
+ 37,
131
+ 38,
132
+ 42,
133
+ 43,
134
+ 44,
135
+ 45,
136
+ 46,
137
+ 47,
138
+ 48,
139
+ 49,
140
+ 50,
141
+ 51
142
+ ], O = [1, 65], k = [26, 28], A = {
143
+ trace: /* @__PURE__ */ e(function() {}, "trace"),
144
+ yy: {},
145
+ symbols_: {
146
+ error: 2,
147
+ start: 3,
148
+ eol: 4,
149
+ XYCHART: 5,
150
+ chartConfig: 6,
151
+ document: 7,
152
+ CHART_ORIENTATION: 8,
153
+ statement: 9,
154
+ title: 10,
155
+ text: 11,
156
+ X_AXIS: 12,
157
+ parseXAxis: 13,
158
+ Y_AXIS: 14,
159
+ parseYAxis: 15,
160
+ LINE: 16,
161
+ plotData: 17,
162
+ BAR: 18,
163
+ acc_title: 19,
164
+ acc_title_value: 20,
165
+ acc_descr: 21,
166
+ acc_descr_value: 22,
167
+ acc_descr_multiline_value: 23,
168
+ SQUARE_BRACES_START: 24,
169
+ dataPoints: 25,
170
+ SQUARE_BRACES_END: 26,
171
+ dataPoint: 27,
172
+ COMMA: 28,
173
+ NUMBER_WITH_DECIMAL: 29,
174
+ STR: 30,
175
+ xAxisData: 31,
176
+ bandData: 32,
177
+ ARROW_DELIMITER: 33,
178
+ commaSeparatedTexts: 34,
179
+ yAxisData: 35,
180
+ NEWLINE: 36,
181
+ SEMI: 37,
182
+ EOF: 38,
183
+ alphaNum: 39,
184
+ MD_STR: 40,
185
+ alphaNumToken: 41,
186
+ AMP: 42,
187
+ NUM: 43,
188
+ ALPHA: 44,
189
+ PLUS: 45,
190
+ EQUALS: 46,
191
+ MULT: 47,
192
+ DOT: 48,
193
+ BRKT: 49,
194
+ MINUS: 50,
195
+ UNDERSCORE: 51,
196
+ $accept: 0,
197
+ $end: 1
198
+ },
199
+ terminals_: {
200
+ 2: "error",
201
+ 5: "XYCHART",
202
+ 8: "CHART_ORIENTATION",
203
+ 10: "title",
204
+ 12: "X_AXIS",
205
+ 14: "Y_AXIS",
206
+ 16: "LINE",
207
+ 18: "BAR",
208
+ 19: "acc_title",
209
+ 20: "acc_title_value",
210
+ 21: "acc_descr",
211
+ 22: "acc_descr_value",
212
+ 23: "acc_descr_multiline_value",
213
+ 24: "SQUARE_BRACES_START",
214
+ 26: "SQUARE_BRACES_END",
215
+ 28: "COMMA",
216
+ 29: "NUMBER_WITH_DECIMAL",
217
+ 30: "STR",
218
+ 33: "ARROW_DELIMITER",
219
+ 36: "NEWLINE",
220
+ 37: "SEMI",
221
+ 38: "EOF",
222
+ 40: "MD_STR",
223
+ 42: "AMP",
224
+ 43: "NUM",
225
+ 44: "ALPHA",
226
+ 45: "PLUS",
227
+ 46: "EQUALS",
228
+ 47: "MULT",
229
+ 48: "DOT",
230
+ 49: "BRKT",
231
+ 50: "MINUS",
232
+ 51: "UNDERSCORE"
233
+ },
234
+ productions_: [
235
+ 0,
236
+ [3, 2],
237
+ [3, 3],
238
+ [3, 2],
239
+ [3, 1],
240
+ [6, 1],
241
+ [7, 0],
242
+ [7, 2],
243
+ [9, 2],
244
+ [9, 2],
245
+ [9, 2],
246
+ [9, 2],
247
+ [9, 2],
248
+ [9, 3],
249
+ [9, 2],
250
+ [9, 3],
251
+ [9, 2],
252
+ [9, 2],
253
+ [9, 1],
254
+ [17, 3],
255
+ [25, 3],
256
+ [25, 1],
257
+ [27, 2],
258
+ [27, 1],
259
+ [13, 1],
260
+ [13, 2],
261
+ [13, 1],
262
+ [31, 1],
263
+ [31, 3],
264
+ [32, 3],
265
+ [34, 3],
266
+ [34, 1],
267
+ [15, 1],
268
+ [15, 2],
269
+ [15, 1],
270
+ [35, 3],
271
+ [4, 1],
272
+ [4, 1],
273
+ [4, 1],
274
+ [11, 1],
275
+ [11, 1],
276
+ [11, 1],
277
+ [39, 1],
278
+ [39, 2],
279
+ [41, 1],
280
+ [41, 1],
281
+ [41, 1],
282
+ [41, 1],
283
+ [41, 1],
284
+ [41, 1],
285
+ [41, 1],
286
+ [41, 1],
287
+ [41, 1],
288
+ [41, 1]
289
+ ],
290
+ performAction: /* @__PURE__ */ e(function(e, t, n, r, i, a, o) {
291
+ var s = a.length - 1;
292
+ switch (i) {
293
+ case 5:
294
+ r.setOrientation(a[s]);
295
+ break;
296
+ case 9:
297
+ r.setDiagramTitle(a[s].text.trim());
298
+ break;
299
+ case 12:
300
+ r.setLineData({
301
+ text: "",
302
+ type: "text"
303
+ }, a[s]);
304
+ break;
305
+ case 13:
306
+ r.setLineData(a[s - 1], a[s]);
307
+ break;
308
+ case 14:
309
+ r.setBarData({
310
+ text: "",
311
+ type: "text"
312
+ }, a[s]);
313
+ break;
314
+ case 15:
315
+ r.setBarData(a[s - 1], a[s]);
316
+ break;
317
+ case 16:
318
+ this.$ = a[s].trim(), r.setAccTitle(this.$);
319
+ break;
320
+ case 17:
321
+ case 18:
322
+ this.$ = a[s].trim(), r.setAccDescription(this.$);
323
+ break;
324
+ case 19:
325
+ this.$ = a[s - 1];
326
+ break;
327
+ case 20:
328
+ case 30:
329
+ this.$ = [a[s - 2], ...a[s]];
330
+ break;
331
+ case 21:
332
+ case 31:
333
+ this.$ = [a[s]];
334
+ break;
335
+ case 22:
336
+ this.$ = {
337
+ value: Number(a[s - 1]),
338
+ label: a[s]
339
+ };
340
+ break;
341
+ case 23:
342
+ this.$ = {
343
+ value: Number(a[s]),
344
+ label: ""
345
+ };
346
+ break;
347
+ case 24:
348
+ r.setXAxisTitle(a[s]);
349
+ break;
350
+ case 25:
351
+ r.setXAxisTitle(a[s - 1]);
352
+ break;
353
+ case 26:
354
+ r.setXAxisTitle({
355
+ type: "text",
356
+ text: ""
357
+ });
358
+ break;
359
+ case 27:
360
+ r.setXAxisBand(a[s]);
361
+ break;
362
+ case 28:
363
+ r.setXAxisRangeData(Number(a[s - 2]), Number(a[s]));
364
+ break;
365
+ case 29:
366
+ this.$ = a[s - 1];
367
+ break;
368
+ case 32:
369
+ r.setYAxisTitle(a[s]);
370
+ break;
371
+ case 33:
372
+ r.setYAxisTitle(a[s - 1]);
373
+ break;
374
+ case 34:
375
+ r.setYAxisTitle({
376
+ type: "text",
377
+ text: ""
378
+ });
379
+ break;
380
+ case 35:
381
+ r.setYAxisRangeData(Number(a[s - 2]), Number(a[s]));
382
+ break;
383
+ case 39:
384
+ this.$ = {
385
+ text: a[s],
386
+ type: "text"
387
+ };
388
+ break;
389
+ case 40:
390
+ this.$ = {
391
+ text: a[s],
392
+ type: "text"
393
+ };
394
+ break;
395
+ case 41:
396
+ this.$ = {
397
+ text: a[s],
398
+ type: "markdown"
399
+ };
400
+ break;
401
+ case 42:
402
+ this.$ = a[s];
403
+ break;
404
+ case 43:
405
+ this.$ = a[s - 1] + "" + a[s];
406
+ break;
407
+ }
408
+ }, "anonymous"),
409
+ table: [
410
+ t(n, r, {
411
+ 3: 1,
412
+ 4: 2,
413
+ 7: 4,
414
+ 5: i,
415
+ 36: a,
416
+ 37: o,
417
+ 38: s
418
+ }),
419
+ { 1: [3] },
420
+ t(n, r, {
421
+ 4: 2,
422
+ 7: 4,
423
+ 3: 8,
424
+ 5: i,
425
+ 36: a,
426
+ 37: o,
427
+ 38: s
428
+ }),
429
+ t(n, r, {
430
+ 4: 2,
431
+ 7: 4,
432
+ 6: 9,
433
+ 3: 10,
434
+ 5: i,
435
+ 8: [1, 11],
436
+ 36: a,
437
+ 37: o,
438
+ 38: s
439
+ }),
440
+ {
441
+ 1: [2, 4],
442
+ 9: 12,
443
+ 10: [1, 13],
444
+ 12: [1, 14],
445
+ 14: [1, 15],
446
+ 16: [1, 16],
447
+ 18: [1, 17],
448
+ 19: [1, 18],
449
+ 21: [1, 19],
450
+ 23: [1, 20]
451
+ },
452
+ t(c, [2, 36]),
453
+ t(c, [2, 37]),
454
+ t(c, [2, 38]),
455
+ { 1: [2, 1] },
456
+ t(n, r, {
457
+ 4: 2,
458
+ 7: 4,
459
+ 3: 21,
460
+ 5: i,
461
+ 36: a,
462
+ 37: o,
463
+ 38: s
464
+ }),
465
+ { 1: [2, 3] },
466
+ t(c, [2, 5]),
467
+ t(n, [2, 7], {
468
+ 4: 22,
469
+ 36: a,
470
+ 37: o,
471
+ 38: s
472
+ }),
473
+ {
474
+ 11: 23,
475
+ 30: l,
476
+ 39: 24,
477
+ 40: u,
478
+ 41: 27,
479
+ 42: d,
480
+ 43: f,
481
+ 44: p,
482
+ 45: m,
483
+ 46: h,
484
+ 47: g,
485
+ 48: _,
486
+ 49: v,
487
+ 50: y,
488
+ 51: b
489
+ },
490
+ {
491
+ 11: 39,
492
+ 13: 38,
493
+ 24: x,
494
+ 29: S,
495
+ 30: l,
496
+ 31: 40,
497
+ 32: 41,
498
+ 39: 24,
499
+ 40: u,
500
+ 41: 27,
501
+ 42: d,
502
+ 43: f,
503
+ 44: p,
504
+ 45: m,
505
+ 46: h,
506
+ 47: g,
507
+ 48: _,
508
+ 49: v,
509
+ 50: y,
510
+ 51: b
511
+ },
512
+ {
513
+ 11: 45,
514
+ 15: 44,
515
+ 29: C,
516
+ 30: l,
517
+ 35: 46,
518
+ 39: 24,
519
+ 40: u,
520
+ 41: 27,
521
+ 42: d,
522
+ 43: f,
523
+ 44: p,
524
+ 45: m,
525
+ 46: h,
526
+ 47: g,
527
+ 48: _,
528
+ 49: v,
529
+ 50: y,
530
+ 51: b
531
+ },
532
+ {
533
+ 11: 49,
534
+ 17: 48,
535
+ 24: w,
536
+ 30: l,
537
+ 39: 24,
538
+ 40: u,
539
+ 41: 27,
540
+ 42: d,
541
+ 43: f,
542
+ 44: p,
543
+ 45: m,
544
+ 46: h,
545
+ 47: g,
546
+ 48: _,
547
+ 49: v,
548
+ 50: y,
549
+ 51: b
550
+ },
551
+ {
552
+ 11: 52,
553
+ 17: 51,
554
+ 24: w,
555
+ 30: l,
556
+ 39: 24,
557
+ 40: u,
558
+ 41: 27,
559
+ 42: d,
560
+ 43: f,
561
+ 44: p,
562
+ 45: m,
563
+ 46: h,
564
+ 47: g,
565
+ 48: _,
566
+ 49: v,
567
+ 50: y,
568
+ 51: b
569
+ },
570
+ { 20: [1, 53] },
571
+ { 22: [1, 54] },
572
+ t(T, [2, 18]),
573
+ { 1: [2, 2] },
574
+ t(T, [2, 8]),
575
+ t(T, [2, 9]),
576
+ t(E, [2, 39], {
577
+ 41: 55,
578
+ 42: d,
579
+ 43: f,
580
+ 44: p,
581
+ 45: m,
582
+ 46: h,
583
+ 47: g,
584
+ 48: _,
585
+ 49: v,
586
+ 50: y,
587
+ 51: b
588
+ }),
589
+ t(E, [2, 40]),
590
+ t(E, [2, 41]),
591
+ t(D, [2, 42]),
592
+ t(D, [2, 44]),
593
+ t(D, [2, 45]),
594
+ t(D, [2, 46]),
595
+ t(D, [2, 47]),
596
+ t(D, [2, 48]),
597
+ t(D, [2, 49]),
598
+ t(D, [2, 50]),
599
+ t(D, [2, 51]),
600
+ t(D, [2, 52]),
601
+ t(D, [2, 53]),
602
+ t(T, [2, 10]),
603
+ t(T, [2, 24], {
604
+ 32: 41,
605
+ 31: 56,
606
+ 24: x,
607
+ 29: S
608
+ }),
609
+ t(T, [2, 26]),
610
+ t(T, [2, 27]),
611
+ { 33: [1, 57] },
612
+ {
613
+ 11: 59,
614
+ 30: l,
615
+ 34: 58,
616
+ 39: 24,
617
+ 40: u,
618
+ 41: 27,
619
+ 42: d,
620
+ 43: f,
621
+ 44: p,
622
+ 45: m,
623
+ 46: h,
624
+ 47: g,
625
+ 48: _,
626
+ 49: v,
627
+ 50: y,
628
+ 51: b
629
+ },
630
+ t(T, [2, 11]),
631
+ t(T, [2, 32], {
632
+ 35: 60,
633
+ 29: C
634
+ }),
635
+ t(T, [2, 34]),
636
+ { 33: [1, 61] },
637
+ t(T, [2, 12]),
638
+ {
639
+ 17: 62,
640
+ 24: w
641
+ },
642
+ {
643
+ 25: 63,
644
+ 27: 64,
645
+ 29: O
646
+ },
647
+ t(T, [2, 14]),
648
+ {
649
+ 17: 66,
650
+ 24: w
651
+ },
652
+ t(T, [2, 16]),
653
+ t(T, [2, 17]),
654
+ t(D, [2, 43]),
655
+ t(T, [2, 25]),
656
+ { 29: [1, 67] },
657
+ { 26: [1, 68] },
658
+ {
659
+ 26: [2, 31],
660
+ 28: [1, 69]
661
+ },
662
+ t(T, [2, 33]),
663
+ { 29: [1, 70] },
664
+ t(T, [2, 13]),
665
+ { 26: [1, 71] },
666
+ {
667
+ 26: [2, 21],
668
+ 28: [1, 72]
669
+ },
670
+ t(k, [2, 23], { 30: [1, 73] }),
671
+ t(T, [2, 15]),
672
+ t(T, [2, 28]),
673
+ t(T, [2, 29]),
674
+ {
675
+ 11: 59,
676
+ 30: l,
677
+ 34: 74,
678
+ 39: 24,
679
+ 40: u,
680
+ 41: 27,
681
+ 42: d,
682
+ 43: f,
683
+ 44: p,
684
+ 45: m,
685
+ 46: h,
686
+ 47: g,
687
+ 48: _,
688
+ 49: v,
689
+ 50: y,
690
+ 51: b
691
+ },
692
+ t(T, [2, 35]),
693
+ t(T, [2, 19]),
694
+ {
695
+ 25: 75,
696
+ 27: 64,
697
+ 29: O
698
+ },
699
+ t(k, [2, 22]),
700
+ { 26: [2, 30] },
701
+ { 26: [2, 20] }
702
+ ],
703
+ defaultActions: {
704
+ 8: [2, 1],
705
+ 10: [2, 3],
706
+ 21: [2, 2],
707
+ 74: [2, 30],
708
+ 75: [2, 20]
709
+ },
710
+ parseError: /* @__PURE__ */ e(function(e, t) {
711
+ if (t.recoverable) this.trace(e);
712
+ else {
713
+ var n = Error(e);
714
+ throw n.hash = t, n;
715
+ }
716
+ }, "parseError"),
717
+ parse: /* @__PURE__ */ e(function(t) {
718
+ var n = this, r = [0], i = [], a = [null], o = [], s = this.table, c = "", l = 0, u = 0, d = 0, f = 2, p = 1, m = o.slice.call(arguments, 1), h = Object.create(this.lexer), g = { yy: {} };
719
+ for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
720
+ h.setInput(t, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
721
+ var v = h.yylloc;
722
+ o.push(v);
723
+ var y = h.options && h.options.ranges;
724
+ typeof g.yy.parseError == "function" ? this.parseError = g.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
725
+ function b(e) {
726
+ r.length -= 2 * e, a.length -= e, o.length -= e;
727
+ }
728
+ e(b, "popStack");
729
+ function x() {
730
+ var e = i.pop() || h.lex() || p;
731
+ return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = n.symbols_[e] || e), e;
732
+ }
733
+ e(x, "lex");
734
+ for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
735
+ if (w = r[r.length - 1], this.defaultActions[w] ? T = this.defaultActions[w] : (S ??= x(), T = s[w] && s[w][S]), T === void 0 || !T.length || !T[0]) {
736
+ var M = "";
737
+ for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
738
+ M = h.showPosition ? "Parse error on line " + (l + 1) + ":\n" + h.showPosition() + "\nExpecting " + j.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : "Parse error on line " + (l + 1) + ": Unexpected " + (S == p ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(M, {
739
+ text: h.match,
740
+ token: this.terminals_[S] || S,
741
+ line: h.yylineno,
742
+ loc: v,
743
+ expected: j
744
+ });
745
+ }
746
+ if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
747
+ switch (T[0]) {
748
+ case 1:
749
+ r.push(S), a.push(h.yytext), o.push(h.yylloc), r.push(T[1]), S = null, C ? (S = C, C = null) : (u = h.yyleng, c = h.yytext, l = h.yylineno, v = h.yylloc, d > 0 && d--);
750
+ break;
751
+ case 2:
752
+ if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
753
+ first_line: o[o.length - (k || 1)].first_line,
754
+ last_line: o[o.length - 1].last_line,
755
+ first_column: o[o.length - (k || 1)].first_column,
756
+ last_column: o[o.length - 1].last_column
757
+ }, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
758
+ c,
759
+ u,
760
+ l,
761
+ g.yy,
762
+ T[1],
763
+ a,
764
+ o
765
+ ].concat(m)), E !== void 0) return E;
766
+ k && (r = r.slice(0, -1 * k * 2), a = a.slice(0, -1 * k), o = o.slice(0, -1 * k)), r.push(this.productions_[T[1]][0]), a.push(D.$), o.push(D._$), A = s[r[r.length - 2]][r[r.length - 1]], r.push(A);
767
+ break;
768
+ case 3: return !0;
769
+ }
770
+ }
771
+ return !0;
772
+ }, "parse")
773
+ };
774
+ A.lexer = /* @__PURE__ */ (function() {
775
+ return {
776
+ EOF: 1,
777
+ parseError: /* @__PURE__ */ e(function(e, t) {
778
+ if (this.yy.parser) this.yy.parser.parseError(e, t);
779
+ else throw Error(e);
780
+ }, "parseError"),
781
+ setInput: /* @__PURE__ */ e(function(e, t) {
782
+ return this.yy = t || this.yy || {}, this._input = e, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
783
+ first_line: 1,
784
+ first_column: 0,
785
+ last_line: 1,
786
+ last_column: 0
787
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
788
+ }, "setInput"),
789
+ input: /* @__PURE__ */ e(function() {
790
+ var e = this._input[0];
791
+ return this.yytext += e, this.yyleng++, this.offset++, this.match += e, this.matched += e, e.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), e;
792
+ }, "input"),
793
+ unput: /* @__PURE__ */ e(function(e) {
794
+ var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
795
+ this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
796
+ var r = this.match.split(/(?:\r\n?|\n)/g);
797
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
798
+ var i = this.yylloc.range;
799
+ return this.yylloc = {
800
+ first_line: this.yylloc.first_line,
801
+ last_line: this.yylineno + 1,
802
+ first_column: this.yylloc.first_column,
803
+ last_column: n ? (n.length === r.length ? this.yylloc.first_column : 0) + r[r.length - n.length].length - n[0].length : this.yylloc.first_column - t
804
+ }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
805
+ }, "unput"),
806
+ more: /* @__PURE__ */ e(function() {
807
+ return this._more = !0, this;
808
+ }, "more"),
809
+ reject: /* @__PURE__ */ e(function() {
810
+ if (this.options.backtrack_lexer) this._backtrack = !0;
811
+ 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).\n" + this.showPosition(), {
812
+ text: "",
813
+ token: null,
814
+ line: this.yylineno
815
+ });
816
+ return this;
817
+ }, "reject"),
818
+ less: /* @__PURE__ */ e(function(e) {
819
+ this.unput(this.match.slice(e));
820
+ }, "less"),
821
+ pastInput: /* @__PURE__ */ e(function() {
822
+ var e = this.matched.substr(0, this.matched.length - this.match.length);
823
+ return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
824
+ }, "pastInput"),
825
+ upcomingInput: /* @__PURE__ */ e(function() {
826
+ var e = this.match;
827
+ return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
828
+ }, "upcomingInput"),
829
+ showPosition: /* @__PURE__ */ e(function() {
830
+ var e = this.pastInput(), t = Array(e.length + 1).join("-");
831
+ return e + this.upcomingInput() + "\n" + t + "^";
832
+ }, "showPosition"),
833
+ test_match: /* @__PURE__ */ e(function(e, t) {
834
+ var n, r, i;
835
+ if (this.options.backtrack_lexer && (i = {
836
+ yylineno: this.yylineno,
837
+ yylloc: {
838
+ first_line: this.yylloc.first_line,
839
+ last_line: this.last_line,
840
+ first_column: this.yylloc.first_column,
841
+ last_column: this.yylloc.last_column
842
+ },
843
+ yytext: this.yytext,
844
+ match: this.match,
845
+ matches: this.matches,
846
+ matched: this.matched,
847
+ yyleng: this.yyleng,
848
+ offset: this.offset,
849
+ _more: this._more,
850
+ _input: this._input,
851
+ yy: this.yy,
852
+ conditionStack: this.conditionStack.slice(0),
853
+ done: this.done
854
+ }, this.options.ranges && (i.yylloc.range = this.yylloc.range.slice(0))), r = e[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
855
+ first_line: this.yylloc.last_line,
856
+ last_line: this.yylineno + 1,
857
+ first_column: this.yylloc.last_column,
858
+ last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
859
+ }, this.yytext += e[0], this.match += e[0], this.matches = e, 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(e[0].length), this.matched += e[0], n = this.performAction.call(this, this.yy, this, t, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n) return n;
860
+ if (this._backtrack) {
861
+ for (var a in i) this[a] = i[a];
862
+ return !1;
863
+ }
864
+ return !1;
865
+ }, "test_match"),
866
+ next: /* @__PURE__ */ e(function() {
867
+ if (this.done) return this.EOF;
868
+ this._input || (this.done = !0);
869
+ var e, t, n, r;
870
+ this._more || (this.yytext = "", this.match = "");
871
+ for (var i = this._currentRules(), a = 0; a < i.length; a++) if (n = this._input.match(this.rules[i[a]]), n && (!t || n[0].length > t[0].length)) {
872
+ if (t = n, r = a, this.options.backtrack_lexer) {
873
+ if (e = this.test_match(n, i[a]), e !== !1) return e;
874
+ if (this._backtrack) {
875
+ t = !1;
876
+ continue;
877
+ } else return !1;
878
+ } else if (!this.options.flex) break;
879
+ }
880
+ return t ? (e = this.test_match(t, i[r]), e === !1 ? !1 : e) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
881
+ text: "",
882
+ token: null,
883
+ line: this.yylineno
884
+ });
885
+ }, "next"),
886
+ lex: /* @__PURE__ */ e(function() {
887
+ return this.next() || this.lex();
888
+ }, "lex"),
889
+ begin: /* @__PURE__ */ e(function(e) {
890
+ this.conditionStack.push(e);
891
+ }, "begin"),
892
+ popState: /* @__PURE__ */ e(function() {
893
+ return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
894
+ }, "popState"),
895
+ _currentRules: /* @__PURE__ */ e(function() {
896
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
897
+ }, "_currentRules"),
898
+ topState: /* @__PURE__ */ e(function(e) {
899
+ return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
900
+ }, "topState"),
901
+ pushState: /* @__PURE__ */ e(function(e) {
902
+ this.begin(e);
903
+ }, "pushState"),
904
+ stateStackSize: /* @__PURE__ */ e(function() {
905
+ return this.conditionStack.length;
906
+ }, "stateStackSize"),
907
+ options: { "case-insensitive": !0 },
908
+ performAction: /* @__PURE__ */ e(function(e, t, n, r) {
909
+ switch (n) {
910
+ case 0: break;
911
+ case 1: break;
912
+ case 2: return this.popState(), 36;
913
+ case 3: return this.popState(), 36;
914
+ case 4: return 36;
915
+ case 5: break;
916
+ case 6: return 10;
917
+ case 7: return this.pushState("acc_title"), 19;
918
+ case 8: return this.popState(), "acc_title_value";
919
+ case 9: return this.pushState("acc_descr"), 21;
920
+ case 10: return this.popState(), "acc_descr_value";
921
+ case 11:
922
+ this.pushState("acc_descr_multiline");
923
+ break;
924
+ case 12:
925
+ this.popState();
926
+ break;
927
+ case 13: return "acc_descr_multiline_value";
928
+ case 14: return 5;
929
+ case 15: return 5;
930
+ case 16: return 8;
931
+ case 17: return this.pushState("axis_data"), "X_AXIS";
932
+ case 18: return this.pushState("axis_data"), "Y_AXIS";
933
+ case 19: return this.pushState("axis_band_data"), 24;
934
+ case 20: return 33;
935
+ case 21: return this.pushState("data"), 16;
936
+ case 22: return this.pushState("data"), 18;
937
+ case 23: return this.pushState("data_inner"), 24;
938
+ case 24: return 29;
939
+ case 25: return this.popState(), 26;
940
+ case 26:
941
+ this.popState();
942
+ break;
943
+ case 27:
944
+ this.pushState("string");
945
+ break;
946
+ case 28:
947
+ this.popState();
948
+ break;
949
+ case 29: return "STR";
950
+ case 30: return 24;
951
+ case 31: return 26;
952
+ case 32: return 44;
953
+ case 33: return "COLON";
954
+ case 34: return 45;
955
+ case 35: return 28;
956
+ case 36: return 46;
957
+ case 37: return 47;
958
+ case 38: return 49;
959
+ case 39: return 51;
960
+ case 40: return 48;
961
+ case 41: return 42;
962
+ case 42: return 50;
963
+ case 43: return 43;
964
+ case 44: break;
965
+ case 45: return 37;
966
+ case 46: return 38;
967
+ }
968
+ }, "anonymous"),
969
+ rules: [
970
+ /^(?:%%(?!\{)[^\n]*)/i,
971
+ /^(?:[^\}]%%[^\n]*)/i,
972
+ /^(?:(\r?\n))/i,
973
+ /^(?:(\r?\n))/i,
974
+ /^(?:[\n\r]+)/i,
975
+ /^(?:%%[^\n]*)/i,
976
+ /^(?:title\b)/i,
977
+ /^(?:accTitle\s*:\s*)/i,
978
+ /^(?:(?!\n||)*[^\n]*)/i,
979
+ /^(?:accDescr\s*:\s*)/i,
980
+ /^(?:(?!\n||)*[^\n]*)/i,
981
+ /^(?:accDescr\s*\{\s*)/i,
982
+ /^(?:\})/i,
983
+ /^(?:[^\}]*)/i,
984
+ /^(?:xychart-beta\b)/i,
985
+ /^(?:xychart\b)/i,
986
+ /^(?:(?:vertical|horizontal))/i,
987
+ /^(?:x-axis\b)/i,
988
+ /^(?:y-axis\b)/i,
989
+ /^(?:\[)/i,
990
+ /^(?:-->)/i,
991
+ /^(?:line\b)/i,
992
+ /^(?:bar\b)/i,
993
+ /^(?:\[)/i,
994
+ /^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,
995
+ /^(?:\])/i,
996
+ /^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,
997
+ /^(?:["])/i,
998
+ /^(?:["])/i,
999
+ /^(?:[^"]*)/i,
1000
+ /^(?:\[)/i,
1001
+ /^(?:\])/i,
1002
+ /^(?:[A-Za-z]+)/i,
1003
+ /^(?::)/i,
1004
+ /^(?:\+)/i,
1005
+ /^(?:,)/i,
1006
+ /^(?:=)/i,
1007
+ /^(?:\*)/i,
1008
+ /^(?:#)/i,
1009
+ /^(?:[\_])/i,
1010
+ /^(?:\.)/i,
1011
+ /^(?:&)/i,
1012
+ /^(?:-)/i,
1013
+ /^(?:[0-9]+)/i,
1014
+ /^(?:\s+)/i,
1015
+ /^(?:;)/i,
1016
+ /^(?:$)/i
1017
+ ],
1018
+ conditions: {
1019
+ data_inner: {
1020
+ rules: [
1021
+ 0,
1022
+ 1,
1023
+ 4,
1024
+ 5,
1025
+ 6,
1026
+ 7,
1027
+ 9,
1028
+ 11,
1029
+ 14,
1030
+ 15,
1031
+ 16,
1032
+ 17,
1033
+ 18,
1034
+ 21,
1035
+ 22,
1036
+ 24,
1037
+ 25,
1038
+ 26,
1039
+ 27,
1040
+ 30,
1041
+ 31,
1042
+ 32,
1043
+ 33,
1044
+ 34,
1045
+ 35,
1046
+ 36,
1047
+ 37,
1048
+ 38,
1049
+ 39,
1050
+ 40,
1051
+ 41,
1052
+ 42,
1053
+ 43,
1054
+ 44,
1055
+ 45,
1056
+ 46
1057
+ ],
1058
+ inclusive: !0
1059
+ },
1060
+ data: {
1061
+ rules: [
1062
+ 0,
1063
+ 1,
1064
+ 3,
1065
+ 4,
1066
+ 5,
1067
+ 6,
1068
+ 7,
1069
+ 9,
1070
+ 11,
1071
+ 14,
1072
+ 15,
1073
+ 16,
1074
+ 17,
1075
+ 18,
1076
+ 21,
1077
+ 22,
1078
+ 23,
1079
+ 26,
1080
+ 27,
1081
+ 30,
1082
+ 31,
1083
+ 32,
1084
+ 33,
1085
+ 34,
1086
+ 35,
1087
+ 36,
1088
+ 37,
1089
+ 38,
1090
+ 39,
1091
+ 40,
1092
+ 41,
1093
+ 42,
1094
+ 43,
1095
+ 44,
1096
+ 45,
1097
+ 46
1098
+ ],
1099
+ inclusive: !0
1100
+ },
1101
+ axis_band_data: {
1102
+ rules: [
1103
+ 0,
1104
+ 1,
1105
+ 4,
1106
+ 5,
1107
+ 6,
1108
+ 7,
1109
+ 9,
1110
+ 11,
1111
+ 14,
1112
+ 15,
1113
+ 16,
1114
+ 17,
1115
+ 18,
1116
+ 21,
1117
+ 22,
1118
+ 25,
1119
+ 26,
1120
+ 27,
1121
+ 30,
1122
+ 31,
1123
+ 32,
1124
+ 33,
1125
+ 34,
1126
+ 35,
1127
+ 36,
1128
+ 37,
1129
+ 38,
1130
+ 39,
1131
+ 40,
1132
+ 41,
1133
+ 42,
1134
+ 43,
1135
+ 44,
1136
+ 45,
1137
+ 46
1138
+ ],
1139
+ inclusive: !0
1140
+ },
1141
+ axis_data: {
1142
+ rules: [
1143
+ 0,
1144
+ 1,
1145
+ 2,
1146
+ 4,
1147
+ 5,
1148
+ 6,
1149
+ 7,
1150
+ 9,
1151
+ 11,
1152
+ 14,
1153
+ 15,
1154
+ 16,
1155
+ 17,
1156
+ 18,
1157
+ 19,
1158
+ 20,
1159
+ 21,
1160
+ 22,
1161
+ 24,
1162
+ 26,
1163
+ 27,
1164
+ 30,
1165
+ 31,
1166
+ 32,
1167
+ 33,
1168
+ 34,
1169
+ 35,
1170
+ 36,
1171
+ 37,
1172
+ 38,
1173
+ 39,
1174
+ 40,
1175
+ 41,
1176
+ 42,
1177
+ 43,
1178
+ 44,
1179
+ 45,
1180
+ 46
1181
+ ],
1182
+ inclusive: !0
1183
+ },
1184
+ acc_descr_multiline: {
1185
+ rules: [12, 13],
1186
+ inclusive: !1
1187
+ },
1188
+ acc_descr: {
1189
+ rules: [10],
1190
+ inclusive: !1
1191
+ },
1192
+ acc_title: {
1193
+ rules: [8],
1194
+ inclusive: !1
1195
+ },
1196
+ title: {
1197
+ rules: [],
1198
+ inclusive: !1
1199
+ },
1200
+ md_string: {
1201
+ rules: [],
1202
+ inclusive: !1
1203
+ },
1204
+ string: {
1205
+ rules: [28, 29],
1206
+ inclusive: !1
1207
+ },
1208
+ INITIAL: {
1209
+ rules: [
1210
+ 0,
1211
+ 1,
1212
+ 4,
1213
+ 5,
1214
+ 6,
1215
+ 7,
1216
+ 9,
1217
+ 11,
1218
+ 14,
1219
+ 15,
1220
+ 16,
1221
+ 17,
1222
+ 18,
1223
+ 21,
1224
+ 22,
1225
+ 26,
1226
+ 27,
1227
+ 30,
1228
+ 31,
1229
+ 32,
1230
+ 33,
1231
+ 34,
1232
+ 35,
1233
+ 36,
1234
+ 37,
1235
+ 38,
1236
+ 39,
1237
+ 40,
1238
+ 41,
1239
+ 42,
1240
+ 43,
1241
+ 44,
1242
+ 45,
1243
+ 46
1244
+ ],
1245
+ inclusive: !0
1246
+ }
1247
+ }
1248
+ };
1249
+ })();
1250
+ function j() {
1251
+ this.yy = {};
1252
+ }
1253
+ return e(j, "Parser"), j.prototype = A, A.Parser = j, new j();
1254
+ })();
1255
+ C.parser = C;
1256
+ var w = C;
1257
+ function T(e) {
1258
+ return e.type === "bar";
1259
+ }
1260
+ e(T, "isBarPlot");
1261
+ function E(e) {
1262
+ return e.type === "band";
1263
+ }
1264
+ e(E, "isBandAxisData");
1265
+ function D(e) {
1266
+ return e.type === "linear";
1267
+ }
1268
+ e(D, "isLinearAxisData");
1269
+ var O = class {
1270
+ constructor(e) {
1271
+ this.parentGroup = e;
1272
+ }
1273
+ static {
1274
+ e(this, "TextDimensionCalculatorWithFont");
1275
+ }
1276
+ getMaxDimension(e, t) {
1277
+ if (!this.parentGroup) return {
1278
+ width: e.reduce((e, t) => Math.max(t.length, e), 0) * t,
1279
+ height: t
1280
+ };
1281
+ let n = {
1282
+ width: 0,
1283
+ height: 0
1284
+ }, r = this.parentGroup.append("g").attr("visibility", "hidden").attr("font-size", t);
1285
+ for (let i of e) {
1286
+ let e = b(r, 1, i), a = e ? e.width : i.length * t, o = e ? e.height : t;
1287
+ n.width = Math.max(n.width, a), n.height = Math.max(n.height, o);
1288
+ }
1289
+ return r.remove(), n;
1290
+ }
1291
+ }, k = .7, A = .2, j = class {
1292
+ constructor(e, t, n, r) {
1293
+ this.axisConfig = e, this.title = t, this.textDimensionCalculator = n, this.axisThemeConfig = r, this.boundingRect = {
1294
+ x: 0,
1295
+ y: 0,
1296
+ width: 0,
1297
+ height: 0
1298
+ }, 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 = {
1299
+ x: 0,
1300
+ y: 0,
1301
+ width: 0,
1302
+ height: 0
1303
+ }, this.axisPosition = "left", this.normalizedLabelRotationInRad = this.axisConfig.labelRotation >= -90 && this.axisConfig.labelRotation <= 90 ? this.axisConfig.labelRotation * Math.PI / 180 : 0;
1304
+ }
1305
+ static {
1306
+ e(this, "BaseAxis");
1307
+ }
1308
+ setRange(e) {
1309
+ this.range = e, this.axisPosition === "left" || this.axisPosition === "right" ? this.boundingRect.height = e[1] - e[0] : this.boundingRect.width = e[1] - e[0], this.recalculateScale();
1310
+ }
1311
+ getRange() {
1312
+ return [this.range[0] + this.outerPadding, this.range[1] - this.outerPadding];
1313
+ }
1314
+ setAxisPosition(e) {
1315
+ this.axisPosition = e, this.setRange(this.range);
1316
+ }
1317
+ getTickDistance() {
1318
+ let e = this.getRange();
1319
+ return Math.abs(e[0] - e[1]) / this.getTickValues().length;
1320
+ }
1321
+ getAxisOuterPadding() {
1322
+ return this.outerPadding;
1323
+ }
1324
+ getLabelDimension() {
1325
+ return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map((e) => e.toString()), this.axisConfig.labelFontSize);
1326
+ }
1327
+ recalculateOuterPaddingToDrawBar() {
1328
+ k * this.getTickDistance() > this.outerPadding * 2 && (this.outerPadding = Math.floor(k * this.getTickDistance() / 2)), this.recalculateScale();
1329
+ }
1330
+ calculateSpaceIfDrawnHorizontally(e) {
1331
+ let t = e.height;
1332
+ if (this.axisConfig.showAxisLine && t > this.axisConfig.axisLineWidth && (t -= this.axisConfig.axisLineWidth, this.showAxisLine = !0), this.axisConfig.showLabel) {
1333
+ let n = this.getLabelDimension(), r = A * e.width;
1334
+ this.outerPadding = Math.min(n.width / 2, r);
1335
+ let i = n.height;
1336
+ this.axisPosition === "bottom" && this.normalizedLabelRotationInRad !== 0 && (i = Math.max(i, Math.abs(Math.sin(this.normalizedLabelRotationInRad) * n.width) + Math.abs(Math.cos(this.normalizedLabelRotationInRad) * n.height))), i += this.axisConfig.labelPadding * 2, this.labelTextHeight = n.height, i <= t && (t -= i, this.showLabel = !0);
1337
+ }
1338
+ if (this.axisConfig.showTick && t >= this.axisConfig.tickLength && (this.showTick = !0, t -= this.axisConfig.tickLength), this.axisConfig.showTitle && this.title) {
1339
+ let e = this.textDimensionCalculator.getMaxDimension([this.title], this.axisConfig.titleFontSize), n = e.height + this.axisConfig.titlePadding * 2;
1340
+ this.titleTextHeight = e.height, n <= t && (t -= n, this.showTitle = !0);
1341
+ }
1342
+ this.boundingRect.width = e.width, this.boundingRect.height = e.height - t;
1343
+ }
1344
+ calculateSpaceIfDrawnVertical(e) {
1345
+ let t = e.width;
1346
+ if (this.axisConfig.showAxisLine && t > this.axisConfig.axisLineWidth && (t -= this.axisConfig.axisLineWidth, this.showAxisLine = !0), this.axisConfig.showLabel) {
1347
+ let n = this.getLabelDimension(), r = A * e.height;
1348
+ this.outerPadding = Math.min(n.height / 2, r);
1349
+ let i = n.width + this.axisConfig.labelPadding * 2;
1350
+ i <= t && (t -= i, this.showLabel = !0);
1351
+ }
1352
+ if (this.axisConfig.showTick && t >= this.axisConfig.tickLength && (this.showTick = !0, t -= this.axisConfig.tickLength), this.axisConfig.showTitle && this.title) {
1353
+ let e = this.textDimensionCalculator.getMaxDimension([this.title], this.axisConfig.titleFontSize), n = e.height + this.axisConfig.titlePadding * 2;
1354
+ this.titleTextHeight = e.height, n <= t && (t -= n, this.showTitle = !0);
1355
+ }
1356
+ this.boundingRect.width = e.width - t, this.boundingRect.height = e.height;
1357
+ }
1358
+ calculateSpace(e) {
1359
+ return this.axisPosition === "left" || this.axisPosition === "right" ? this.calculateSpaceIfDrawnVertical(e) : this.calculateSpaceIfDrawnHorizontally(e), this.recalculateScale(), {
1360
+ width: this.boundingRect.width,
1361
+ height: this.boundingRect.height
1362
+ };
1363
+ }
1364
+ setBoundingBoxXY(e) {
1365
+ this.boundingRect.x = e.x, this.boundingRect.y = e.y;
1366
+ }
1367
+ calculateOffsetByRotation(e) {
1368
+ let t = this.normalizedLabelRotationInRad;
1369
+ return t === 0 ? 0 : Math.sin(t) * this.getLabelDimension()[e] / 2;
1370
+ }
1371
+ getDrawableElementsForLeftAxis() {
1372
+ let e = [];
1373
+ if (this.showAxisLine) {
1374
+ let t = this.boundingRect.x + this.boundingRect.width - this.axisConfig.axisLineWidth / 2;
1375
+ e.push({
1376
+ type: "path",
1377
+ groupTexts: ["left-axis", "axisl-line"],
1378
+ data: [{
1379
+ path: `M ${t},${this.boundingRect.y} L ${t},${this.boundingRect.y + this.boundingRect.height} `,
1380
+ strokeFill: this.axisThemeConfig.axisLineColor,
1381
+ strokeWidth: this.axisConfig.axisLineWidth
1382
+ }]
1383
+ });
1384
+ }
1385
+ if (this.showLabel && e.push({
1386
+ type: "text",
1387
+ groupTexts: ["left-axis", "label"],
1388
+ data: this.getTickValues().map((e) => ({
1389
+ text: e.toString(),
1390
+ 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),
1391
+ y: this.getScaleValue(e),
1392
+ fill: this.axisThemeConfig.labelColor,
1393
+ fontSize: this.axisConfig.labelFontSize,
1394
+ rotation: 0,
1395
+ verticalPos: "middle",
1396
+ horizontalPos: "right"
1397
+ }))
1398
+ }), this.showTick) {
1399
+ let t = this.boundingRect.x + this.boundingRect.width - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
1400
+ e.push({
1401
+ type: "path",
1402
+ groupTexts: ["left-axis", "ticks"],
1403
+ data: this.getTickValues().map((e) => ({
1404
+ path: `M ${t},${this.getScaleValue(e)} L ${t - this.axisConfig.tickLength},${this.getScaleValue(e)}`,
1405
+ strokeFill: this.axisThemeConfig.tickColor,
1406
+ strokeWidth: this.axisConfig.tickWidth
1407
+ }))
1408
+ });
1409
+ }
1410
+ return this.showTitle && e.push({
1411
+ type: "text",
1412
+ groupTexts: ["left-axis", "title"],
1413
+ data: [{
1414
+ text: this.title,
1415
+ x: this.boundingRect.x + this.axisConfig.titlePadding,
1416
+ y: this.boundingRect.y + this.boundingRect.height / 2,
1417
+ fill: this.axisThemeConfig.titleColor,
1418
+ fontSize: this.axisConfig.titleFontSize,
1419
+ rotation: 270,
1420
+ verticalPos: "top",
1421
+ horizontalPos: "center"
1422
+ }]
1423
+ }), e;
1424
+ }
1425
+ getDrawableElementsForBottomAxis() {
1426
+ let e = [];
1427
+ if (this.showAxisLine) {
1428
+ let t = this.boundingRect.y + this.axisConfig.axisLineWidth / 2;
1429
+ e.push({
1430
+ type: "path",
1431
+ groupTexts: ["bottom-axis", "axis-line"],
1432
+ data: [{
1433
+ path: `M ${this.boundingRect.x},${t} L ${this.boundingRect.x + this.boundingRect.width},${t}`,
1434
+ strokeFill: this.axisThemeConfig.axisLineColor,
1435
+ strokeWidth: this.axisConfig.axisLineWidth
1436
+ }]
1437
+ });
1438
+ }
1439
+ if (this.showLabel && e.push({
1440
+ type: "text",
1441
+ groupTexts: ["bottom-axis", "label"],
1442
+ data: this.getTickValues().map((e) => ({
1443
+ text: e.toString(),
1444
+ x: this.getScaleValue(e) + this.calculateOffsetByRotation("height"),
1445
+ y: this.boundingRect.y + this.axisConfig.labelPadding + (this.showTick ? this.axisConfig.tickLength : 0) + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0) + Math.abs(this.calculateOffsetByRotation("width")),
1446
+ fill: this.axisThemeConfig.labelColor,
1447
+ fontSize: this.axisConfig.labelFontSize,
1448
+ rotation: this.normalizedLabelRotationInRad * 180 / Math.PI,
1449
+ verticalPos: "top",
1450
+ horizontalPos: "center"
1451
+ }))
1452
+ }), this.showTick) {
1453
+ let t = this.boundingRect.y + (this.showAxisLine ? this.axisConfig.axisLineWidth : 0);
1454
+ e.push({
1455
+ type: "path",
1456
+ groupTexts: ["bottom-axis", "ticks"],
1457
+ data: this.getTickValues().map((e) => ({
1458
+ path: `M ${this.getScaleValue(e)},${t} L ${this.getScaleValue(e)},${t + this.axisConfig.tickLength}`,
1459
+ strokeFill: this.axisThemeConfig.tickColor,
1460
+ strokeWidth: this.axisConfig.tickWidth
1461
+ }))
1462
+ });
1463
+ }
1464
+ return this.showTitle && e.push({
1465
+ type: "text",
1466
+ groupTexts: ["bottom-axis", "title"],
1467
+ data: [{
1468
+ text: this.title,
1469
+ x: this.range[0] + (this.range[1] - this.range[0]) / 2,
1470
+ y: this.boundingRect.y + this.boundingRect.height - this.axisConfig.titlePadding - this.titleTextHeight,
1471
+ fill: this.axisThemeConfig.titleColor,
1472
+ fontSize: this.axisConfig.titleFontSize,
1473
+ rotation: 0,
1474
+ verticalPos: "top",
1475
+ horizontalPos: "center"
1476
+ }]
1477
+ }), e;
1478
+ }
1479
+ getDrawableElementsForTopAxis() {
1480
+ let e = [];
1481
+ if (this.showAxisLine) {
1482
+ let t = this.boundingRect.y + this.boundingRect.height - this.axisConfig.axisLineWidth / 2;
1483
+ e.push({
1484
+ type: "path",
1485
+ groupTexts: ["top-axis", "axis-line"],
1486
+ data: [{
1487
+ path: `M ${this.boundingRect.x},${t} L ${this.boundingRect.x + this.boundingRect.width},${t}`,
1488
+ strokeFill: this.axisThemeConfig.axisLineColor,
1489
+ strokeWidth: this.axisConfig.axisLineWidth
1490
+ }]
1491
+ });
1492
+ }
1493
+ if (this.showLabel && e.push({
1494
+ type: "text",
1495
+ groupTexts: ["top-axis", "label"],
1496
+ data: this.getTickValues().map((e) => ({
1497
+ text: e.toString(),
1498
+ x: this.getScaleValue(e),
1499
+ y: this.boundingRect.y + (this.showTitle ? this.titleTextHeight + this.axisConfig.titlePadding * 2 : 0) + this.axisConfig.labelPadding,
1500
+ fill: this.axisThemeConfig.labelColor,
1501
+ fontSize: this.axisConfig.labelFontSize,
1502
+ rotation: 0,
1503
+ verticalPos: "top",
1504
+ horizontalPos: "center"
1505
+ }))
1506
+ }), this.showTick) {
1507
+ let t = this.boundingRect.y;
1508
+ e.push({
1509
+ type: "path",
1510
+ groupTexts: ["top-axis", "ticks"],
1511
+ data: this.getTickValues().map((e) => ({
1512
+ path: `M ${this.getScaleValue(e)},${t + this.boundingRect.height - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)} L ${this.getScaleValue(e)},${t + this.boundingRect.height - this.axisConfig.tickLength - (this.showAxisLine ? this.axisConfig.axisLineWidth : 0)}`,
1513
+ strokeFill: this.axisThemeConfig.tickColor,
1514
+ strokeWidth: this.axisConfig.tickWidth
1515
+ }))
1516
+ });
1517
+ }
1518
+ return this.showTitle && e.push({
1519
+ type: "text",
1520
+ groupTexts: ["top-axis", "title"],
1521
+ data: [{
1522
+ text: this.title,
1523
+ x: this.boundingRect.x + this.boundingRect.width / 2,
1524
+ y: this.boundingRect.y + this.axisConfig.titlePadding,
1525
+ fill: this.axisThemeConfig.titleColor,
1526
+ fontSize: this.axisConfig.titleFontSize,
1527
+ rotation: 0,
1528
+ verticalPos: "top",
1529
+ horizontalPos: "center"
1530
+ }]
1531
+ }), e;
1532
+ }
1533
+ getDrawableElements() {
1534
+ if (this.axisPosition === "left") return this.getDrawableElementsForLeftAxis();
1535
+ if (this.axisPosition === "right") throw Error("Drawing of right axis is not implemented");
1536
+ return this.axisPosition === "bottom" ? this.getDrawableElementsForBottomAxis() : this.axisPosition === "top" ? this.getDrawableElementsForTopAxis() : [];
1537
+ }
1538
+ }, M = class extends j {
1539
+ static {
1540
+ e(this, "BandAxis");
1541
+ }
1542
+ constructor(e, t, n, r, i) {
1543
+ super(e, r, i, t), this.categories = n, this.scale = S().domain(this.categories).range(this.getRange());
1544
+ }
1545
+ setRange(e) {
1546
+ super.setRange(e);
1547
+ }
1548
+ recalculateScale() {
1549
+ this.scale = S().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5), t.trace("BandAxis axis final categories, range: ", this.categories, this.getRange());
1550
+ }
1551
+ getTickValues() {
1552
+ return this.categories;
1553
+ }
1554
+ getScaleValue(e) {
1555
+ return this.scale(e) ?? this.getRange()[0];
1556
+ }
1557
+ }, ee = class extends j {
1558
+ static {
1559
+ e(this, "LinearAxis");
1560
+ }
1561
+ constructor(e, t, n, r, i) {
1562
+ super(e, r, i, t), this.domain = n, this.scale = m().domain(this.domain).range(this.getRange());
1563
+ }
1564
+ getTickValues() {
1565
+ return this.scale.ticks();
1566
+ }
1567
+ recalculateScale() {
1568
+ let e = [...this.domain];
1569
+ this.axisPosition === "left" && e.reverse(), this.scale = m().domain(e).range(this.getRange());
1570
+ }
1571
+ getScaleValue(e) {
1572
+ return this.scale(e);
1573
+ }
1574
+ };
1575
+ function N(e, t, n, r) {
1576
+ let i = new O(r);
1577
+ return E(e) ? new M(t, n, e.categories, e.title, i) : new ee(t, n, [e.min, e.max], e.title, i);
1578
+ }
1579
+ e(N, "getAxis");
1580
+ var te = class {
1581
+ constructor(e, t, n, r) {
1582
+ this.textDimensionCalculator = e, this.chartConfig = t, this.chartData = n, this.chartThemeConfig = r, this.boundingRect = {
1583
+ x: 0,
1584
+ y: 0,
1585
+ width: 0,
1586
+ height: 0
1587
+ }, this.showChartTitle = !1;
1588
+ }
1589
+ static {
1590
+ e(this, "ChartTitle");
1591
+ }
1592
+ setBoundingBoxXY(e) {
1593
+ this.boundingRect.x = e.x, this.boundingRect.y = e.y;
1594
+ }
1595
+ calculateSpace(e) {
1596
+ let t = this.textDimensionCalculator.getMaxDimension([this.chartData.title], this.chartConfig.titleFontSize), n = Math.max(t.width, e.width), r = t.height + 2 * this.chartConfig.titlePadding;
1597
+ return t.width <= n && t.height <= r && this.chartConfig.showTitle && this.chartData.title && (this.boundingRect.width = n, this.boundingRect.height = r, this.showChartTitle = !0), {
1598
+ width: this.boundingRect.width,
1599
+ height: this.boundingRect.height
1600
+ };
1601
+ }
1602
+ getDrawableElements() {
1603
+ let e = [];
1604
+ return this.showChartTitle && e.push({
1605
+ groupTexts: ["chart-title"],
1606
+ type: "text",
1607
+ data: [{
1608
+ fontSize: this.chartConfig.titleFontSize,
1609
+ text: this.chartData.title,
1610
+ verticalPos: "middle",
1611
+ horizontalPos: "center",
1612
+ x: this.boundingRect.x + this.boundingRect.width / 2,
1613
+ y: this.boundingRect.y + this.boundingRect.height / 2,
1614
+ fill: this.chartThemeConfig.titleColor,
1615
+ rotation: 0
1616
+ }]
1617
+ }), e;
1618
+ }
1619
+ };
1620
+ function ne(e, t, n, r) {
1621
+ return new te(new O(r), e, t, n);
1622
+ }
1623
+ e(ne, "getChartTitleComponent");
1624
+ var re = class {
1625
+ constructor(e, t, n, r, i) {
1626
+ this.plotData = e, this.xAxis = t, this.yAxis = n, this.orientation = r, this.plotIndex = i;
1627
+ }
1628
+ static {
1629
+ e(this, "LinePlot");
1630
+ }
1631
+ getDrawableElement() {
1632
+ let e = this.plotData.data.map((e) => [this.xAxis.getScaleValue(e[0]), this.yAxis.getScaleValue(e[1])]), t;
1633
+ if (t = this.orientation === "horizontal" ? v().y((e) => e[0]).x((e) => e[1])(e) : v().x((e) => e[0]).y((e) => e[1])(e), !t) return [];
1634
+ let n = [{
1635
+ groupTexts: ["plot", `line-plot-${this.plotIndex}`],
1636
+ type: "path",
1637
+ data: [{
1638
+ path: t,
1639
+ strokeFill: this.plotData.strokeFill,
1640
+ strokeWidth: this.plotData.strokeWidth
1641
+ }]
1642
+ }];
1643
+ if (this.plotData.pointLabels && this.plotData.pointLabels.length > 0) {
1644
+ let t = [];
1645
+ for (let [n, [r, i]] of e.entries()) {
1646
+ let e = this.plotData.pointLabels[n];
1647
+ e && (this.orientation === "horizontal" ? t.push({
1648
+ x: i + 10,
1649
+ y: r,
1650
+ text: e,
1651
+ fill: this.plotData.strokeFill,
1652
+ verticalPos: "middle",
1653
+ horizontalPos: "left",
1654
+ fontSize: 12,
1655
+ rotation: 0
1656
+ }) : t.push({
1657
+ x: r,
1658
+ y: i - 10,
1659
+ text: e,
1660
+ fill: this.plotData.strokeFill,
1661
+ verticalPos: "middle",
1662
+ horizontalPos: "center",
1663
+ fontSize: 12,
1664
+ rotation: 0
1665
+ }));
1666
+ }
1667
+ t.length > 0 && n.push({
1668
+ groupTexts: [
1669
+ "plot",
1670
+ `line-plot-${this.plotIndex}`,
1671
+ "labels"
1672
+ ],
1673
+ type: "text",
1674
+ data: t
1675
+ });
1676
+ }
1677
+ return n;
1678
+ }
1679
+ }, ie = class {
1680
+ constructor(e, t, n, r, i, a) {
1681
+ this.barData = e, this.boundingRect = t, this.xAxis = n, this.yAxis = r, this.orientation = i, this.plotIndex = a;
1682
+ }
1683
+ static {
1684
+ e(this, "BarPlot");
1685
+ }
1686
+ getDrawableElement() {
1687
+ let e = this.barData.data.map((e) => [this.xAxis.getScaleValue(e[0]), this.yAxis.getScaleValue(e[1])]), t = Math.min(this.xAxis.getAxisOuterPadding() * 2, this.xAxis.getTickDistance()) * .95, n = t / 2;
1688
+ return this.orientation === "horizontal" ? [{
1689
+ groupTexts: ["plot", `bar-plot-${this.plotIndex}`],
1690
+ type: "rect",
1691
+ data: e.map((e) => ({
1692
+ x: this.boundingRect.x,
1693
+ y: e[0] - n,
1694
+ height: t,
1695
+ width: e[1] - this.boundingRect.x,
1696
+ fill: this.barData.fill,
1697
+ strokeWidth: 0,
1698
+ strokeFill: this.barData.fill
1699
+ }))
1700
+ }] : [{
1701
+ groupTexts: ["plot", `bar-plot-${this.plotIndex}`],
1702
+ type: "rect",
1703
+ data: e.map((e) => ({
1704
+ x: e[0] - n,
1705
+ y: e[1],
1706
+ width: t,
1707
+ height: this.boundingRect.y + this.boundingRect.height - e[1],
1708
+ fill: this.barData.fill,
1709
+ strokeWidth: 0,
1710
+ strokeFill: this.barData.fill
1711
+ }))
1712
+ }];
1713
+ }
1714
+ }, ae = class {
1715
+ constructor(e, t, n) {
1716
+ this.chartConfig = e, this.chartData = t, this.chartThemeConfig = n, this.boundingRect = {
1717
+ x: 0,
1718
+ y: 0,
1719
+ width: 0,
1720
+ height: 0
1721
+ };
1722
+ }
1723
+ static {
1724
+ e(this, "BasePlot");
1725
+ }
1726
+ setAxes(e, t) {
1727
+ this.xAxis = e, this.yAxis = t;
1728
+ }
1729
+ setBoundingBoxXY(e) {
1730
+ this.boundingRect.x = e.x, this.boundingRect.y = e.y;
1731
+ }
1732
+ calculateSpace(e) {
1733
+ return this.boundingRect.width = e.width, this.boundingRect.height = e.height, {
1734
+ width: this.boundingRect.width,
1735
+ height: this.boundingRect.height
1736
+ };
1737
+ }
1738
+ getDrawableElements() {
1739
+ if (!(this.xAxis && this.yAxis)) throw Error("Axes must be passed to render Plots");
1740
+ let e = [];
1741
+ for (let [t, n] of this.chartData.plots.entries()) switch (n.type) {
1742
+ case "line":
1743
+ {
1744
+ let r = new re(n, this.xAxis, this.yAxis, this.chartConfig.chartOrientation, t);
1745
+ e.push(...r.getDrawableElement());
1746
+ }
1747
+ break;
1748
+ case "bar":
1749
+ {
1750
+ let r = new ie(n, this.boundingRect, this.xAxis, this.yAxis, this.chartConfig.chartOrientation, t);
1751
+ e.push(...r.getDrawableElement());
1752
+ }
1753
+ break;
1754
+ }
1755
+ return e;
1756
+ }
1757
+ };
1758
+ function P(e, t, n) {
1759
+ return new ae(e, t, n);
1760
+ }
1761
+ e(P, "getPlotComponent");
1762
+ var oe = class {
1763
+ constructor(e, t, n, r) {
1764
+ this.chartConfig = e, this.chartData = t, this.componentStore = {
1765
+ title: ne(e, t, n, r),
1766
+ plot: P(e, t, n),
1767
+ xAxis: N(t.xAxis, e.xAxis, {
1768
+ titleColor: n.xAxisTitleColor,
1769
+ labelColor: n.xAxisLabelColor,
1770
+ tickColor: n.xAxisTickColor,
1771
+ axisLineColor: n.xAxisLineColor
1772
+ }, r),
1773
+ yAxis: N(t.yAxis, e.yAxis, {
1774
+ titleColor: n.yAxisTitleColor,
1775
+ labelColor: n.yAxisLabelColor,
1776
+ tickColor: n.yAxisTickColor,
1777
+ axisLineColor: n.yAxisLineColor
1778
+ }, r)
1779
+ };
1780
+ }
1781
+ static {
1782
+ e(this, "Orchestrator");
1783
+ }
1784
+ calculateVerticalSpace() {
1785
+ let e = this.chartConfig.width, t = this.chartConfig.height, n = 0, r = 0, i = Math.floor(e * this.chartConfig.plotReservedSpacePercent / 100), a = Math.floor(t * this.chartConfig.plotReservedSpacePercent / 100), o = this.componentStore.plot.calculateSpace({
1786
+ width: i,
1787
+ height: a
1788
+ });
1789
+ e -= o.width, t -= o.height, o = this.componentStore.title.calculateSpace({
1790
+ width: this.chartConfig.width,
1791
+ height: t
1792
+ }), r = o.height, t -= o.height, this.componentStore.xAxis.setAxisPosition("bottom"), o = this.componentStore.xAxis.calculateSpace({
1793
+ width: e,
1794
+ height: t
1795
+ }), t -= o.height, this.componentStore.yAxis.setAxisPosition("left"), o = this.componentStore.yAxis.calculateSpace({
1796
+ width: e,
1797
+ height: t
1798
+ }), n = o.width, e -= o.width, e > 0 && (i += e, e = 0), t > 0 && (a += t, t = 0), this.componentStore.plot.calculateSpace({
1799
+ width: i,
1800
+ height: a
1801
+ }), this.componentStore.plot.setBoundingBoxXY({
1802
+ x: n,
1803
+ y: r
1804
+ }), this.componentStore.xAxis.setRange([n, n + i]), this.componentStore.xAxis.setBoundingBoxXY({
1805
+ x: n,
1806
+ y: r + a
1807
+ }), this.componentStore.yAxis.setRange([r, r + a]), this.componentStore.yAxis.setBoundingBoxXY({
1808
+ x: 0,
1809
+ y: r
1810
+ }), this.chartData.plots.some((e) => T(e)) && this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
1811
+ }
1812
+ calculateHorizontalSpace() {
1813
+ let e = this.chartConfig.width, t = this.chartConfig.height, n = 0, r = 0, i = 0, a = Math.floor(e * this.chartConfig.plotReservedSpacePercent / 100), o = Math.floor(t * this.chartConfig.plotReservedSpacePercent / 100), s = this.componentStore.plot.calculateSpace({
1814
+ width: a,
1815
+ height: o
1816
+ });
1817
+ e -= s.width, t -= s.height, s = this.componentStore.title.calculateSpace({
1818
+ width: this.chartConfig.width,
1819
+ height: t
1820
+ }), n = s.height, t -= s.height, this.componentStore.xAxis.setAxisPosition("left"), s = this.componentStore.xAxis.calculateSpace({
1821
+ width: e,
1822
+ height: t
1823
+ }), e -= s.width, r = s.width, this.componentStore.yAxis.setAxisPosition("top"), s = this.componentStore.yAxis.calculateSpace({
1824
+ width: e,
1825
+ height: t
1826
+ }), t -= s.height, i = n + s.height, e > 0 && (a += e, e = 0), t > 0 && (o += t, t = 0), this.componentStore.plot.calculateSpace({
1827
+ width: a,
1828
+ height: o
1829
+ }), this.componentStore.plot.setBoundingBoxXY({
1830
+ x: r,
1831
+ y: i
1832
+ }), this.componentStore.yAxis.setRange([r, r + a]), this.componentStore.yAxis.setBoundingBoxXY({
1833
+ x: r,
1834
+ y: n
1835
+ }), this.componentStore.xAxis.setRange([i, i + o]), this.componentStore.xAxis.setBoundingBoxXY({
1836
+ x: 0,
1837
+ y: i
1838
+ }), this.chartData.plots.some((e) => T(e)) && this.componentStore.xAxis.recalculateOuterPaddingToDrawBar();
1839
+ }
1840
+ calculateSpace() {
1841
+ this.chartConfig.chartOrientation === "horizontal" ? this.calculateHorizontalSpace() : this.calculateVerticalSpace();
1842
+ }
1843
+ getDrawableElement() {
1844
+ this.calculateSpace();
1845
+ let e = [];
1846
+ this.componentStore.plot.setAxes(this.componentStore.xAxis, this.componentStore.yAxis);
1847
+ for (let t of Object.values(this.componentStore)) e.push(...t.getDrawableElements());
1848
+ return e;
1849
+ }
1850
+ }, se = class {
1851
+ static {
1852
+ e(this, "XYChartBuilder");
1853
+ }
1854
+ static build(e, t, n, r) {
1855
+ return new oe(e, t, n, r).getDrawableElement();
1856
+ }
1857
+ }, F = 0, I, L = W(), R = U(), z = G(), B = R.plotColorPalette.split(",").map((e) => e.trim()), V = !1, H = !1;
1858
+ function U() {
1859
+ let e = n(), t = s();
1860
+ return _(e.xyChart, t.themeVariables.xyChart);
1861
+ }
1862
+ e(U, "getChartDefaultThemeConfig");
1863
+ function W() {
1864
+ let e = s();
1865
+ return _(l.xyChart, e.xyChart);
1866
+ }
1867
+ e(W, "getChartDefaultConfig");
1868
+ function G() {
1869
+ return {
1870
+ yAxis: {
1871
+ type: "linear",
1872
+ title: "",
1873
+ min: Infinity,
1874
+ max: -Infinity
1875
+ },
1876
+ xAxis: {
1877
+ type: "band",
1878
+ title: "",
1879
+ categories: []
1880
+ },
1881
+ title: "",
1882
+ plots: []
1883
+ };
1884
+ }
1885
+ e(G, "getChartDefaultData");
1886
+ function K(e) {
1887
+ let t = s();
1888
+ return p(e.trim(), t);
1889
+ }
1890
+ e(K, "textSanitizer");
1891
+ function q(e) {
1892
+ I = e;
1893
+ }
1894
+ e(q, "setTmpSVGG");
1895
+ function J(e) {
1896
+ e === "horizontal" ? L.chartOrientation = "horizontal" : L.chartOrientation = "vertical";
1897
+ }
1898
+ e(J, "setOrientation");
1899
+ function Y(e) {
1900
+ z.xAxis.title = K(e.text);
1901
+ }
1902
+ e(Y, "setXAxisTitle");
1903
+ function X(e, t) {
1904
+ z.xAxis = {
1905
+ type: "linear",
1906
+ title: z.xAxis.title,
1907
+ min: e,
1908
+ max: t
1909
+ }, V = !0;
1910
+ }
1911
+ e(X, "setXAxisRangeData");
1912
+ function ce(e) {
1913
+ z.xAxis = {
1914
+ type: "band",
1915
+ title: z.xAxis.title,
1916
+ categories: e.map((e) => K(e.text))
1917
+ }, V = !0;
1918
+ }
1919
+ e(ce, "setXAxisBand");
1920
+ function le(e) {
1921
+ z.yAxis.title = K(e.text);
1922
+ }
1923
+ e(le, "setYAxisTitle");
1924
+ function ue(e, t) {
1925
+ z.yAxis = {
1926
+ type: "linear",
1927
+ title: z.yAxis.title,
1928
+ min: e,
1929
+ max: t
1930
+ }, H = !0;
1931
+ }
1932
+ e(ue, "setYAxisRangeData");
1933
+ function de(e) {
1934
+ let t = Math.min(...e), n = Math.max(...e), r = D(z.yAxis) ? z.yAxis.min : Infinity, i = D(z.yAxis) ? z.yAxis.max : -Infinity;
1935
+ z.yAxis = {
1936
+ type: "linear",
1937
+ title: z.yAxis.title,
1938
+ min: Math.min(r, t),
1939
+ max: Math.max(i, n)
1940
+ };
1941
+ }
1942
+ e(de, "setYAxisRangeFromPlotData");
1943
+ function Z(e) {
1944
+ let t = [];
1945
+ if (e.length === 0) return t;
1946
+ if (!V) {
1947
+ let t = D(z.xAxis) ? z.xAxis.min : Infinity, n = D(z.xAxis) ? z.xAxis.max : -Infinity;
1948
+ X(Math.min(t, 1), Math.max(n, e.length));
1949
+ }
1950
+ if (E(z.xAxis) && e.length > z.xAxis.categories.length && (e = e.slice(0, z.xAxis.categories.length)), H || de(e), E(z.xAxis) && (t = z.xAxis.categories.map((t, n) => [t, e[n]])), D(z.xAxis)) {
1951
+ let n = z.xAxis.min, r = z.xAxis.max, i = (r - n) / (e.length - 1), a = [];
1952
+ for (let e = n; e <= r; e += i) a.push(`${e}`);
1953
+ t = a.map((t, n) => [t, e[n]]);
1954
+ }
1955
+ return t;
1956
+ }
1957
+ e(Z, "transformDataWithoutCategory");
1958
+ function Q(e) {
1959
+ return B[e === 0 ? 0 : e % B.length];
1960
+ }
1961
+ e(Q, "getPlotColorFromPalette");
1962
+ function fe(e, t) {
1963
+ let n = t.map((e) => e.value), r = t.map((e) => e.label ? K(e.label) : ""), i = Z(n), a = r.some((e) => e !== "");
1964
+ z.plots.push({
1965
+ type: "line",
1966
+ strokeFill: Q(F),
1967
+ strokeWidth: 2,
1968
+ data: i,
1969
+ ...a ? { pointLabels: r } : {}
1970
+ }), F++;
1971
+ }
1972
+ e(fe, "setLineData");
1973
+ function pe(e, t) {
1974
+ let n = Z(t.map((e) => e.value));
1975
+ z.plots.push({
1976
+ type: "bar",
1977
+ fill: Q(F),
1978
+ data: n
1979
+ }), F++;
1980
+ }
1981
+ e(pe, "setBarData");
1982
+ function me() {
1983
+ if (z.plots.length === 0) throw Error("No Plot to render, please provide a plot with some data");
1984
+ return z.title = d(), se.build(L, z, R, I);
1985
+ }
1986
+ e(me, "getDrawableElem");
1987
+ function he() {
1988
+ return R;
1989
+ }
1990
+ e(he, "getChartThemeConfig");
1991
+ function ge() {
1992
+ return L;
1993
+ }
1994
+ e(ge, "getChartConfig");
1995
+ function $() {
1996
+ return z;
1997
+ }
1998
+ e($, "getXYChartData");
1999
+ var _e = {
2000
+ parser: w,
2001
+ db: {
2002
+ getDrawableElem: me,
2003
+ clear: /* @__PURE__ */ e(function() {
2004
+ o(), F = 0, L = W(), z = G(), R = U(), B = R.plotColorPalette.split(",").map((e) => e.trim()), V = !1, H = !1;
2005
+ }, "clear"),
2006
+ setAccTitle: a,
2007
+ getAccTitle: f,
2008
+ setDiagramTitle: i,
2009
+ getDiagramTitle: d,
2010
+ getAccDescription: u,
2011
+ setAccDescription: r,
2012
+ setOrientation: J,
2013
+ setXAxisTitle: Y,
2014
+ setXAxisRangeData: X,
2015
+ setXAxisBand: ce,
2016
+ setYAxisTitle: le,
2017
+ setYAxisRangeData: ue,
2018
+ setLineData: fe,
2019
+ setBarData: pe,
2020
+ setTmpSVGG: q,
2021
+ getChartThemeConfig: he,
2022
+ getChartConfig: ge,
2023
+ getXYChartData: $
2024
+ },
2025
+ renderer: { draw: /* @__PURE__ */ e((n, r, i, a) => {
2026
+ let o = a.db, s = o.getChartThemeConfig(), l = o.getChartConfig(), u = o.getXYChartData().plots[0].data.map((e) => e[1]);
2027
+ function d(e) {
2028
+ return e === "top" ? "text-before-edge" : "middle";
2029
+ }
2030
+ e(d, "getDominantBaseLine");
2031
+ function f(e) {
2032
+ return e === "left" ? "start" : e === "right" ? "end" : "middle";
2033
+ }
2034
+ e(f, "getTextAnchor");
2035
+ function p(e) {
2036
+ return `translate(${e.x}, ${e.y}) rotate(${e.rotation || 0})`;
2037
+ }
2038
+ e(p, "getTextTransformation"), t.debug("Rendering xychart chart\n" + n);
2039
+ let m = y(r), h = m.append("g").attr("class", "main"), g = h.append("rect").attr("width", l.width).attr("height", l.height).attr("class", "background");
2040
+ c(m, l.height, l.width, !0), m.attr("viewBox", `0 0 ${l.width} ${l.height}`), g.attr("fill", s.backgroundColor), o.setTmpSVGG(m.append("g").attr("class", "mermaid-tmp-group"));
2041
+ let _ = o.getDrawableElem(), v = {};
2042
+ function b(e) {
2043
+ let t = h, n = "";
2044
+ for (let [r] of e.entries()) {
2045
+ let i = h;
2046
+ r > 0 && v[n] && (i = v[n]), n += e[r], t = v[n], t ||= v[n] = i.append("g").attr("class", e[r]);
2047
+ }
2048
+ return t;
2049
+ }
2050
+ e(b, "getGroup");
2051
+ for (let t of _) {
2052
+ if (t.data.length === 0) continue;
2053
+ let n = b(t.groupTexts);
2054
+ switch (t.type) {
2055
+ case "rect":
2056
+ if (n.selectAll("rect").data(t.data).enter().append("rect").attr("x", (e) => e.x).attr("y", (e) => e.y).attr("width", (e) => e.width).attr("height", (e) => e.height).attr("fill", (e) => e.fill).attr("stroke", (e) => e.strokeFill).attr("stroke-width", (e) => e.strokeWidth), l.showDataLabel) {
2057
+ let r = l.showDataLabelOutsideBar;
2058
+ if (l.chartOrientation === "horizontal") {
2059
+ let i = function(e, t) {
2060
+ let { data: n, label: r } = e;
2061
+ return t * r.length * a <= n.width - o;
2062
+ };
2063
+ e(i, "fitsHorizontally");
2064
+ let a = .7, o = 10, c = t.data.map((e, t) => ({
2065
+ data: e,
2066
+ label: u[t].toString()
2067
+ })).filter((e) => e.data.width > 0 && e.data.height > 0), l = c.map((e) => {
2068
+ let { data: t } = e, n = t.height * .7;
2069
+ for (; !i(e, n) && n > 0;) --n;
2070
+ return n;
2071
+ }), d = Math.floor(Math.min(...l)), f = /* @__PURE__ */ e((e) => r ? e.data.x + e.data.width + 10 : e.data.x + e.data.width - 10, "determineLabelXPosition");
2072
+ n.selectAll("text").data(c).enter().append("text").attr("x", f).attr("y", (e) => e.data.y + e.data.height / 2).attr("text-anchor", r ? "start" : "end").attr("dominant-baseline", "middle").attr("fill", s.dataLabelColor).attr("font-size", `${d}px`).text((e) => e.label);
2073
+ } else {
2074
+ let i = function(e, t, n) {
2075
+ let { data: r, label: i } = e, a = t * i.length * .7, o = r.x + r.width / 2, s = o - a / 2, c = o + a / 2, l = s >= r.x && c <= r.x + r.width, u = r.y + n + t <= r.y + r.height;
2076
+ return l && u;
2077
+ };
2078
+ e(i, "fitsInBar");
2079
+ let a = t.data.map((e, t) => ({
2080
+ data: e,
2081
+ label: u[t].toString()
2082
+ })).filter((e) => e.data.width > 0 && e.data.height > 0), o = a.map((e) => {
2083
+ let { data: t, label: n } = e, r = t.width / (n.length * .7);
2084
+ for (; !i(e, r, 10) && r > 0;) --r;
2085
+ return r;
2086
+ }), c = Math.floor(Math.min(...o)), l = /* @__PURE__ */ e((e) => r ? e.data.y - 10 : e.data.y + 10, "determineLabelYPosition");
2087
+ n.selectAll("text").data(a).enter().append("text").attr("x", (e) => e.data.x + e.data.width / 2).attr("y", l).attr("text-anchor", "middle").attr("dominant-baseline", r ? "auto" : "hanging").attr("fill", s.dataLabelColor).attr("font-size", `${c}px`).text((e) => e.label);
2088
+ }
2089
+ }
2090
+ break;
2091
+ case "text":
2092
+ n.selectAll("text").data(t.data).enter().append("text").attr("x", 0).attr("y", 0).attr("fill", (e) => e.fill).attr("font-size", (e) => e.fontSize).attr("dominant-baseline", (e) => d(e.verticalPos)).attr("text-anchor", (e) => f(e.horizontalPos)).attr("transform", (e) => p(e)).text((e) => e.text);
2093
+ break;
2094
+ case "path":
2095
+ n.selectAll("path").data(t.data).enter().append("path").attr("d", (e) => e.path).attr("fill", (e) => e.fill ? e.fill : "none").attr("stroke", (e) => e.strokeFill).attr("stroke-width", (e) => e.strokeWidth);
2096
+ break;
2097
+ }
2098
+ }
2099
+ }, "draw") }
2100
+ };
2101
+ //#endregion
2102
+ export { _e as diagram };