@kabmo-labs/kabmo 0.58.1 → 0.59.1

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 (399) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +513 -495
  3. package/dist/client/static/js/{Body-ysmhxbvk.js → Body-5yedtmnk.js} +3 -3
  4. package/dist/client/static/js/{CsvGrid-w90pxyn2.js → CsvGrid-39m8pp1c.js} +2 -2
  5. package/dist/client/static/js/{DocxView-evxn6kaq.js → DocxView-vd99cv12.js} +3 -3
  6. package/dist/client/static/js/{DrawioView-tmdevwf4.js → DrawioView-6nq4412n.js} +2 -2
  7. package/dist/client/static/js/{HtmlPreview-bpsn2z9p.js → HtmlPreview-cs51gszy.js} +1 -1
  8. package/dist/client/static/js/ImageView-nc2n0w6s.js +1 -0
  9. package/dist/client/static/js/LayoutWrapper-j7786frq.js +2 -0
  10. package/dist/client/static/js/MergeDiffView-0rn5zsy5.js +1 -0
  11. package/dist/client/static/js/Modal-7ag7a9qq.js +60 -0
  12. package/dist/client/static/js/{PdfView-txxn6qff.js → PdfView-0zab721q.js} +1 -1
  13. package/dist/client/static/js/SessionsView-t9rhx472.js +1 -0
  14. package/dist/client/static/js/{SheetView-52b33e6f.js → SheetView-2wdn5hkd.js} +11 -11
  15. package/dist/client/static/js/{SvgPreview-hrk4pfm1.js → SvgPreview-fmrfxd7z.js} +1 -1
  16. package/dist/client/static/js/{abnfDiagram-O67JEVCF-at77sybc.js → abnfDiagram-O67JEVCF-41scfh9v.js} +1 -1
  17. package/dist/client/static/js/architecture-7GRP2DOG-bwn1drdz.js +1 -0
  18. package/dist/client/static/js/{architectureDiagram-NJMV4G6O-raw33jgg.js → architectureDiagram-NJMV4G6O-fp6etjvt.js} +3 -3
  19. package/dist/client/static/js/{astro-qha7sceh.js → astro-ryr2ajmg.js} +1 -1
  20. package/dist/client/static/js/bash-zknkkwkw.js +1 -0
  21. package/dist/client/static/js/{blockDiagram-BEXU5L5S-b6e90fbk.js → blockDiagram-BEXU5L5S-pespk9mt.js} +4 -4
  22. package/dist/client/static/js/c-0w02jkxb.js +1 -0
  23. package/dist/client/static/js/{c4Diagram-YGBWAQC7-msg9y1c6.js → c4Diagram-YGBWAQC7-rt4z91dx.js} +2 -2
  24. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-jmrd1h8r.js → classDiagram-v2-NBCMYWYE-6bzaq8sd.js} +4 -4
  25. package/dist/client/static/js/{cose-bilkent-JH36ORCC-na65ebq3.js → cose-bilkent-JH36ORCC-z3fhgcba.js} +1 -1
  26. package/dist/client/static/js/cpp-p5b4vean.js +1 -0
  27. package/dist/client/static/js/css-9jzbvdyz.js +1 -0
  28. package/dist/client/static/js/css-sn00sq6v.js +1 -0
  29. package/dist/client/static/js/cynefin-OW5HDTMX-jbc50ks8.js +1 -0
  30. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-9xkkw71m.js → cynefinDiagram-VND7K2PF-8endeh4p.js} +2 -2
  31. package/dist/client/static/js/{dagre-6A5THRUB-p59f19tv.js → dagre-6A5THRUB-2a2f32dv.js} +2 -2
  32. package/dist/client/static/js/{diagram-22UHCM2B-2e2rcvn7.js → diagram-22UHCM2B-wgbyr6b7.js} +9 -9
  33. package/dist/client/static/js/{diagram-3UASUU5V-r9ds8vgr.js → diagram-3UASUU5V-5122b41x.js} +1 -1
  34. package/dist/client/static/js/{diagram-ATOU4E4O-jgwxv7v8.js → diagram-ATOU4E4O-1gt9fr7e.js} +3 -3
  35. package/dist/client/static/js/{diagram-CDSNMT55-20m35eqq.js → diagram-CDSNMT55-v6hs59jb.js} +4 -4
  36. package/dist/client/static/js/{diagram-MLGK6HIB-vt3kxt2m.js → diagram-MLGK6HIB-yey2m5nm.js} +1 -1
  37. package/dist/client/static/js/{diagram-MPIPVDR6-c47rgxf1.js → diagram-MPIPVDR6-hg4f3q4d.js} +2 -2
  38. package/dist/client/static/js/{dockerfile-gtcyey0q.js → dockerfile-56tfnp5r.js} +1 -1
  39. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-aszw3xy3.js → ebnfDiagram-ZINNZB2B-2mhc9aar.js} +1 -1
  40. package/dist/client/static/js/{elixir-w92v180e.js → elixir-fyxw6d70.js} +1 -1
  41. package/dist/client/static/js/{elk-276RUBZZ-gbvr3gry.js → elk-276RUBZZ-wedtvz9y.js} +2 -2
  42. package/dist/client/static/js/{erDiagram-OPXOYQCR-1hqca8qe.js → erDiagram-OPXOYQCR-1kysnby9.js} +6 -6
  43. package/dist/client/static/js/{erlang-v7344938.js → erlang-97ayje6m.js} +1 -1
  44. package/dist/client/static/js/eventmodeling-NTZA5JFV-b37ey01t.js +1 -0
  45. package/dist/client/static/js/flowDiagram-KWPJA3E3-vd4z6bvy.js +1 -0
  46. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-07v22te5.js → ganttDiagram-FUAMR5RP-j4g65rpm.js} +3 -3
  47. package/dist/client/static/js/gitGraph-4MIJSDKK-mvqq7tcs.js +1 -0
  48. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-y068jtz9.js → gitGraphDiagram-X574FWY7-vcwmj4b3.js} +8 -8
  49. package/dist/client/static/js/graphql-xzykn0ba.js +1 -0
  50. package/dist/client/static/js/html-2zc3shky.js +1 -0
  51. package/dist/client/static/js/{index-r8d4bk86.js → index-10vzyga1.js} +2 -2
  52. package/dist/client/static/js/index-1mkn5fbf.js +481 -0
  53. package/dist/client/static/js/{index-medk4f18.js → index-2h7xh93h.js} +2 -2
  54. package/dist/client/static/js/{index-fhtnvqgf.js → index-3j2he86h.js} +2 -2
  55. package/dist/client/static/js/{index-zhgh7a31.js → index-3kedv94b.js} +2 -2
  56. package/dist/client/static/js/{index-374xq5a4.js → index-42k78whj.js} +1 -1
  57. package/dist/client/static/js/{index-c9aqx3ht.js → index-42q5gg7t.js} +1 -1
  58. package/dist/client/static/js/index-461ga40v.js +2 -0
  59. package/dist/client/static/js/{index-9qf2h9jb.js → index-51rbgeh9.js} +12 -12
  60. package/dist/client/static/js/{index-tdg7hz80.js → index-58z2hatp.js} +2 -2
  61. package/dist/client/static/js/{index-4tbdws4r.js → index-5e4e18tg.js} +2 -2
  62. package/dist/client/static/js/{index-th61y26d.js → index-69mnn71v.js} +2 -2
  63. package/dist/client/static/js/index-6vbra7p9.js +1 -0
  64. package/dist/client/static/js/{index-007sewcn.js → index-7enfdvh0.js} +2 -2
  65. package/dist/client/static/js/{index-gaa39w5q.js → index-8tzt0dek.js} +2 -2
  66. package/dist/client/static/js/{index-ewryzs4g.js → index-92h38pwg.js} +2 -2
  67. package/dist/client/static/js/{index-vw8b29ek.js → index-9mgpbwfr.js} +1 -1
  68. package/dist/client/static/js/{index-80kx6dm6.js → index-a3bpmw2r.js} +2 -2
  69. package/dist/client/static/js/{index-fv7nybnf.js → index-a70sk36c.js} +2 -2
  70. package/dist/client/static/js/index-c5401dqs.js +4 -0
  71. package/dist/client/static/js/{index-xmg1x6zv.js → index-csxnqgzw.js} +5 -5
  72. package/dist/client/static/js/{index-qefssj0m.js → index-d201jvs9.js} +1 -1
  73. package/dist/client/static/js/{index-y0f3wbc3.js → index-d9sfavx1.js} +2 -2
  74. package/dist/client/static/js/{index-5hvt233n.js → index-db6s66jr.js} +2 -2
  75. package/dist/client/static/js/index-dbsy29gn.js +2 -0
  76. package/dist/client/static/js/{index-j830qk07.js → index-dw9epydj.js} +2 -2
  77. package/dist/client/static/js/{index-s4dpkds5.js → index-e39m185a.js} +2 -2
  78. package/dist/client/static/js/{index-dxq1tbwm.js → index-fg0ne74z.js} +2 -2
  79. package/dist/client/static/js/{index-hb7a7m9m.js → index-fnaq8baz.js} +1 -1
  80. package/dist/client/static/js/{index-tq3t3qm4.js → index-fsa18ns9.js} +2 -2
  81. package/dist/client/static/js/{index-wxqcnsrq.js → index-fvphmwkf.js} +2 -2
  82. package/dist/client/static/js/{index-94d416ee.js → index-gajpd90b.js} +2 -2
  83. package/dist/client/static/js/{index-rxt8sf9a.js → index-h1xbx74w.js} +2 -2
  84. package/dist/client/static/js/{index-1e0rt7c6.js → index-hgzf4ask.js} +5 -5
  85. package/dist/client/static/js/{index-wn28m9h7.js → index-hrez92pw.js} +8 -8
  86. package/dist/client/static/js/{index-zs7kw0be.js → index-jaf968hx.js} +4 -4
  87. package/dist/client/static/js/{index-sxag9ptg.js → index-jct0jryd.js} +2 -2
  88. package/dist/client/static/js/{index-5xxbbzqa.js → index-kt77dwsg.js} +7 -7
  89. package/dist/client/static/js/{index-8d8ce00v.js → index-m62sf9wn.js} +2 -2
  90. package/dist/client/static/js/{index-6x0kn8pb.js → index-mhrkjbjq.js} +2 -2
  91. package/dist/client/static/js/index-mttx9327.css +1 -0
  92. package/dist/client/static/js/{index-1e710snk.js → index-n7bmqeqz.js} +1 -1
  93. package/dist/client/static/js/{index-3ymw778n.js → index-ndqtff48.js} +2 -2
  94. package/dist/client/static/js/{index-cmjyet7w.js → index-nf4hq5tg.js} +27 -27
  95. package/dist/client/static/js/{index-3p732mvs.js → index-np2rfq06.js} +2 -2
  96. package/dist/client/static/js/{index-2s17netq.js → index-nwbr15b3.js} +2 -2
  97. package/dist/client/static/js/{index-nptbz7sv.js → index-pn0ja904.js} +1 -1
  98. package/dist/client/static/js/{index-azz46nwc.js → index-pr8wsq24.js} +2 -2
  99. package/dist/client/static/js/{index-7sq6cjt1.js → index-q3k8r0ms.js} +11 -11
  100. package/dist/client/static/js/{index-an7fq7f6.js → index-qc3de995.js} +1 -1
  101. package/dist/client/static/js/{index-f61c25vn.js → index-r42f3r1p.js} +3 -3
  102. package/dist/client/static/js/{index-e4nge3f4.js → index-s7p2wdr1.js} +1 -1
  103. package/dist/client/static/js/{index-vny4ymjf.js → index-sg65xdey.js} +1 -1
  104. package/dist/client/static/js/index-skp6991n.js +2 -0
  105. package/dist/client/static/js/index-spnrx2c0.js +2 -0
  106. package/dist/client/static/js/{index-fe92hqmb.js → index-sqyvj03y.js} +4 -4
  107. package/dist/client/static/js/{index-cpp43af3.js → index-tz5ewsza.js} +9 -9
  108. package/dist/client/static/js/{index-v8xhgfeq.js → index-vs2y8gxr.js} +2 -2
  109. package/dist/client/static/js/{index-e0kahttb.js → index-vs3g6njv.js} +1 -1
  110. package/dist/client/static/js/index-wkxsypj1.js +2 -0
  111. package/dist/client/static/js/{index-gqrt766t.js → index-xqz7bqcn.js} +61 -61
  112. package/dist/client/static/js/{index-jxsha63v.js → index-y4cx8cqf.js} +2 -2
  113. package/dist/client/static/js/{index-kzzvrqnv.js → index-y5pkqrga.js} +2 -2
  114. package/dist/client/static/js/{index-3m1dksmy.js → index-yrwm437g.js} +2 -2
  115. package/dist/client/static/js/{index-7ynf3s2w.js → index-z82nd2bd.js} +2 -2
  116. package/dist/client/static/js/info-A6RAGUB7-zkv4crz7.js +1 -0
  117. package/dist/client/static/js/{infoDiagram-VRGFBTTK-1x83h4k4.js → infoDiagram-VRGFBTTK-7craq9x2.js} +2 -2
  118. package/dist/client/static/js/ini-62r3vxaf.js +1 -0
  119. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-et6z3c28.js → ishikawaDiagram-OU5B5YK6-ncjty2re.js} +2 -2
  120. package/dist/client/static/js/java-kacycary.js +1 -0
  121. package/dist/client/static/js/javascript-zc1qnyyp.js +1 -0
  122. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-sw669e7a.js → journeyDiagram-ZHPQQLJL-yx222bzt.js} +2 -2
  123. package/dist/client/static/js/json-yrwpn6bd.js +1 -0
  124. package/dist/client/static/js/jsx-b40ag8q1.js +1 -0
  125. package/dist/client/static/js/{julia-z14p8jsx.js → julia-agc5kfvg.js} +1 -1
  126. package/dist/client/static/js/{kanban-definition-PNTS6WVX-aqxg95kx.js → kanban-definition-PNTS6WVX-a2f84qmn.js} +6 -6
  127. package/dist/client/static/js/lua-bk961f37.js +1 -0
  128. package/dist/client/static/js/markdown-b7rgzgd6.js +1 -0
  129. package/dist/client/static/js/mermaid.core-9vfwthw3.js +12 -0
  130. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-530anpc4.js → mindmap-definition-NLK3R4M7-fsxysg6f.js} +4 -4
  131. package/dist/client/static/js/one-dark-pro-7v4by00h.js +1 -0
  132. package/dist/client/static/js/one-light-5rfzh8p4.js +1 -0
  133. package/dist/client/static/js/packet-AYTQ26CC-dgpge627.js +1 -0
  134. package/dist/client/static/js/{pegDiagram-GJSIUBJH-5zar6hvy.js → pegDiagram-GJSIUBJH-77wxmp9g.js} +1 -1
  135. package/dist/client/static/js/{perl-1na2x6yd.js → perl-v5vbtzgf.js} +1 -1
  136. package/dist/client/static/js/{php-x75tt7w3.js → php-83qwy98t.js} +1 -1
  137. package/dist/client/static/js/pie-WAS4IAKB-b8pgsqrd.js +1 -0
  138. package/dist/client/static/js/{pieDiagram-5QR66LMP-3bx8syvw.js → pieDiagram-5QR66LMP-gvgfhez0.js} +3 -3
  139. package/dist/client/static/js/properties-k8gbzggp.js +1 -0
  140. package/dist/client/static/js/python-343tspad.js +1 -0
  141. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-yaarpr2e.js → quadrantDiagram-O4NWA36T-9zkbt5h8.js} +2 -2
  142. package/dist/client/static/js/r-ycdwmv8g.js +1 -0
  143. package/dist/client/static/js/radar-RG4KPBEZ-fmfe5y27.js +1 -0
  144. package/dist/client/static/js/railroad-74A4TZTK-b5tks4ce.js +1 -0
  145. package/dist/client/static/js/railroad-abnf-HS5TGJTU-0sf4m0ze.js +1 -0
  146. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-pjfy3pt7.js +1 -0
  147. package/dist/client/static/js/railroad-peg-WCYAUIDC-nr8ngt42.js +1 -0
  148. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-ag41q4nt.js → railroadDiagram-XR7U4H2S-w55bsyw6.js} +1 -1
  149. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-g8sr48h4.js → requirementDiagram-PLB6GJNP-828s1e5g.js} +3 -3
  150. package/dist/client/static/js/{ruby-3h22qahv.js → ruby-994n5j6e.js} +1 -1
  151. package/dist/client/static/js/{rust-r27demr5.js → rust-csv5f258.js} +1 -1
  152. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-t1wbd1hh.js → sankeyDiagram-IPEJSGJF-34f3fyvg.js} +3 -3
  153. package/dist/client/static/js/{sass-8bq5r2tz.js → sass-p6g7qdv2.js} +1 -1
  154. package/dist/client/static/js/{scss-c04ezwnn.js → scss-4j4t3r6y.js} +1 -1
  155. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-407mjqty.js → sequenceDiagram-PO4LG4MO-nnta2hn0.js} +7 -7
  156. package/dist/client/static/js/{sizeCapture-INFHLROL-w38zb9ky.js → sizeCapture-INFHLROL-gpcramga.js} +1 -1
  157. package/dist/client/static/js/sql-kwpd5w07.js +1 -0
  158. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-4cvgymkc.js → stateDiagram-v2-GCMORJYK-3f2en220.js} +3 -3
  159. package/dist/client/static/js/{svelte-egg3x4tw.js → svelte-bek3h1sz.js} +1 -1
  160. package/dist/client/static/js/{swimlanes-2SLR337P-w7ts2rzw.js → swimlanes-2SLR337P-jgqt12z9.js} +1 -1
  161. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-xx1z57df.js +8 -0
  162. package/dist/client/static/js/{timeline-definition-EJHVYXUP-nq46nzy9.js → timeline-definition-EJHVYXUP-sgchcs11.js} +3 -3
  163. package/dist/client/static/js/treeView-Q6P3EWNA-23r9fa68.js +1 -0
  164. package/dist/client/static/js/treemap-WGGIJYW6-mxxzdrj6.js +1 -0
  165. package/dist/client/static/js/tsx-gjxfjnbk.js +1 -0
  166. package/dist/client/static/js/typescript-4dchbnya.js +1 -0
  167. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-q144snzb.js → usecaseDiagram-POWQR4AR-znkg9pkq.js} +15 -15
  168. package/dist/client/static/js/{vennDiagram-UO4OBE2U-2wemak2p.js → vennDiagram-UO4OBE2U-dncg96ej.js} +4 -4
  169. package/dist/client/static/js/{vue-d7p4wv35.js → vue-y44m889c.js} +1 -1
  170. package/dist/client/static/js/wardley-WFR3VGLG-cbqtax1x.js +1 -0
  171. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-bb2qvvgr.js → wardleyDiagram-VNRHLVJA-77xz2d49.js} +4 -4
  172. package/dist/client/static/js/xml-xs6qz3ya.js +1 -0
  173. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-9dr05fdq.js → xychartDiagram-PMCCYNJV-40j1aqyf.js} +4 -4
  174. package/dist/client/static/js/yaml-174nk5bn.js +1 -0
  175. package/package.json +7 -7
  176. package/src/client/borders.css +15 -3
  177. package/src/client/components/common/ComposerTextarea.test.tsx +13 -1
  178. package/src/client/components/common/ComposerTextarea.tsx +8 -2
  179. package/src/client/components/common/MarkdownRenderer.tsx +11 -2
  180. package/src/client/components/common/harness-glyph/harness-glyph.test.ts +0 -4
  181. package/src/client/components/common/harness-glyph/index.tsx +4 -5
  182. package/src/client/components/common/markdown-inline-file.test.tsx +90 -15
  183. package/src/client/components/common/session-actions-menu/index.test.tsx +45 -0
  184. package/src/client/components/common/session-actions-menu/index.tsx +6 -1
  185. package/src/client/components/common/session-row/TrailingSlot.tsx +8 -1
  186. package/src/client/components/common/session-row/index.tsx +4 -0
  187. package/src/client/components/common/session-row/session-row.test.tsx +5 -0
  188. package/src/client/components/layout/desktop-layout/RightColumn.tsx +4 -1
  189. package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +28 -35
  190. package/src/client/components/layout/desktop-layout/index.tsx +5 -3
  191. package/src/client/components/layout/desktop-layout/resizer/index.tsx +13 -3
  192. package/src/client/components/layout/desktop-layout/resizer/panel.test.ts +41 -0
  193. package/src/client/components/layout/session-sidebar/CategoryHeader.tsx +21 -1
  194. package/src/client/components/layout/session-sidebar/CategoryHeader.worktree.test.tsx +1 -0
  195. package/src/client/components/layout/session-sidebar/CategoryItem.tsx +8 -2
  196. package/src/client/components/layout/session-sidebar/ClassicView.tsx +2 -0
  197. package/src/client/components/layout/session-sidebar/SessionList.tsx +4 -0
  198. package/src/client/components/layout/session-sidebar/SessionsView.tsx +22 -1
  199. package/src/client/components/layout/session-sidebar/modern/RevealRow.tsx +36 -5
  200. package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +45 -28
  201. package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +10 -3
  202. package/src/client/components/layout/session-sidebar/modern/index.tsx +2 -0
  203. package/src/client/components/layout/session-sidebar/modern/reveal-row.test.tsx +28 -1
  204. package/src/client/components/layout/session-sidebar/modern/workspace-header.test.tsx +27 -11
  205. package/src/client/components/layout/session-sidebar/search-results.test.tsx +29 -16
  206. package/src/client/components/layout/session-sidebar/session-list-states.test.tsx +1 -0
  207. package/src/client/components/layout/session-sidebar/variant-props.ts +2 -0
  208. package/src/client/components/mobile/LayoutWrapper.tsx +9 -0
  209. package/src/client/components/mobile/SessionSidebar.tsx +4 -0
  210. package/src/client/components/mobile/left-drawer-nav.test.tsx +1 -1
  211. package/src/client/components/mobile/mobile-session-sidebar/Body.tsx +4 -0
  212. package/src/client/components/mobile/mobile-session-sidebar/ClassicDrawer.tsx +3 -0
  213. package/src/client/components/mobile/mobile-session-sidebar/Item.test.tsx +85 -0
  214. package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +30 -14
  215. package/src/client/components/mobile/mobile-session-sidebar/List.tsx +4 -0
  216. package/src/client/components/settings/apply-side-effects.test.ts +31 -0
  217. package/src/client/components/settings/apply-side-effects.ts +7 -0
  218. package/src/client/components/settings/categories/appearance-settings/BorderStyleSection.tsx +3 -2
  219. package/src/client/components/settings/categories/appearance-settings/SidebarStyleSection.test.tsx +95 -0
  220. package/src/client/components/settings/categories/appearance-settings/SidebarStyleSection.tsx +35 -0
  221. package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +1 -0
  222. package/src/client/components/workspace/chat-timeline/MessageItem.gutter.test.ts +26 -0
  223. package/src/client/components/workspace/chat-timeline/MessageItem.tsx +6 -3
  224. package/src/client/components/workspace/chat-timeline/ThinkingSection.test.tsx +17 -0
  225. package/src/client/components/workspace/chat-timeline/ThinkingSection.tsx +9 -3
  226. package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.test.ts +39 -2
  227. package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +19 -4
  228. package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.tsx +28 -21
  229. package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.wait.test.tsx +48 -0
  230. package/src/client/components/workspace/chat-timeline/chat-input/ComposerRows.tsx +44 -21
  231. package/src/client/components/workspace/chat-timeline/chat-input/GoalBanner.test.ts +24 -0
  232. package/src/client/components/workspace/chat-timeline/chat-input/GoalBanner.tsx +44 -18
  233. package/src/client/components/workspace/chat-timeline/chat-input/GoalSurfaces.tsx +2 -1
  234. package/src/client/components/workspace/chat-timeline/chat-input/ModeToggles.test.ts +35 -0
  235. package/src/client/components/workspace/chat-timeline/chat-input/ModeToggles.tsx +33 -12
  236. package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.test.tsx +24 -0
  237. package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.tsx +14 -3
  238. package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.test.ts +24 -1
  239. package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.tsx +78 -135
  240. package/src/client/components/workspace/chat-timeline/chat-input/VoiceButton.tsx +58 -0
  241. package/src/client/components/workspace/chat-timeline/chat-input/action-base.ts +42 -0
  242. package/src/client/components/workspace/chat-timeline/chat-input/index.tsx +1 -0
  243. package/src/client/components/workspace/chat-timeline/chat-input/mode-icons.test.ts +108 -0
  244. package/src/client/components/workspace/chat-timeline/chat-input/mode-icons.tsx +122 -0
  245. package/src/client/components/workspace/chat-timeline/chat-input/narrow.test.tsx +78 -20
  246. package/src/client/components/workspace/chat-timeline/chat-input/styles/index.tsx +11 -5
  247. package/src/client/components/workspace/chat-timeline/chat-input/styles.test.tsx +19 -0
  248. package/src/client/components/workspace/chat-timeline/composer-dock-frame.test.tsx +9 -0
  249. package/src/client/components/workspace/chat-timeline/index.tsx +1 -1
  250. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/OptionRow.test.tsx +125 -0
  251. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/OptionRow.tsx +84 -27
  252. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Mcp.test.tsx +18 -0
  253. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Mcp.tsx +14 -5
  254. package/src/client/components/workspace/model-dropdown/CloseButton.tsx +2 -2
  255. package/src/client/components/workspace/model-dropdown/Fullscreen.tsx +2 -2
  256. package/src/client/components/workspace/model-dropdown/HarnessTabs.tsx +40 -10
  257. package/src/client/components/workspace/model-dropdown/Header.tsx +33 -18
  258. package/src/client/components/workspace/model-dropdown/Panel.tsx +19 -1
  259. package/src/client/components/workspace/model-dropdown/ThinkingLevels.tsx +51 -0
  260. package/src/client/components/workspace/model-dropdown/Trigger.tsx +99 -0
  261. package/src/client/components/workspace/model-dropdown/bands.ts +51 -0
  262. package/src/client/components/workspace/model-dropdown/harness-tabs.test.tsx +39 -5
  263. package/src/client/components/workspace/model-dropdown/index.tsx +20 -47
  264. package/src/client/components/workspace/model-dropdown/picker-close.test.tsx +34 -4
  265. package/src/client/components/workspace/model-dropdown/thinking-levels.test.tsx +108 -0
  266. package/src/client/components/workspace/model-dropdown/trigger.test.ts +54 -8
  267. package/src/client/hooks/chat/composer/attachments.test.ts +12 -0
  268. package/src/client/hooks/chat/composer/attachments.ts +16 -4
  269. package/src/client/hooks/chat/composer/pipeline.test.ts +14 -0
  270. package/src/client/hooks/chat/composer/pipeline.ts +15 -6
  271. package/src/client/hooks/chat/omp/session-list.activity.test.ts +20 -0
  272. package/src/client/hooks/chat/omp/session-merges.ts +18 -6
  273. package/src/client/hooks/chat/omp/session-sidebar-controller.ts +4 -0
  274. package/src/client/hooks/chat/timeline/scope.test.ts +17 -0
  275. package/src/client/hooks/chat/timeline/scope.ts +6 -1
  276. package/src/client/hooks/chat/timeline/send-refusal.test.ts +19 -0
  277. package/src/client/hooks/chat/timeline/send-steer.test.ts +17 -0
  278. package/src/client/hooks/chat/timeline/send.ts +17 -0
  279. package/src/client/hooks/editor/quick-open.ts +41 -0
  280. package/src/client/hooks/ui/border-style.test.ts +13 -0
  281. package/src/client/hooks/ui/markdown-render.ts +11 -6
  282. package/src/client/hooks/ui/open-inline-file.test.ts +16 -0
  283. package/src/client/hooks/ui/open-inline-file.ts +4 -2
  284. package/src/client/hooks/ui/show-more.ts +11 -1
  285. package/src/client/hooks/ui/ui-feedback.test.ts +11 -0
  286. package/src/client/hooks/ui/verified-inline-files.test.tsx +143 -0
  287. package/src/client/hooks/ui/verified-inline-files.ts +165 -0
  288. package/src/client/hooks/workspace/mobile-workspace-panels.test.tsx +116 -0
  289. package/src/client/hooks/workspace/mobile-workspace-panels.ts +73 -0
  290. package/src/client/hooks/workspace/panel-resize.test.ts +127 -0
  291. package/src/client/hooks/workspace/panel-resize.ts +81 -0
  292. package/src/client/hooks/workspace/session-list-limit.test.ts +80 -0
  293. package/src/client/hooks/workspace/session-list-limit.ts +69 -0
  294. package/src/client/hooks/workspace/session-pin.ts +58 -0
  295. package/src/client/hooks/workspace/workspace-panels-mode.test.tsx +87 -0
  296. package/src/client/hooks/workspace/workspace-panels-mode.ts +76 -0
  297. package/src/client/lib/router/branch-params.test.ts +17 -1
  298. package/src/client/lib/router/branch-params.ts +18 -0
  299. package/src/client/lib/ui/pressed.ts +15 -0
  300. package/src/client/tailwind.css +30 -10
  301. package/src/server/lib/connect/cloudflared.lifecycle.test.ts +25 -9
  302. package/src/server/lib/db/schema.test.ts +1 -1
  303. package/src/server/lib/db/schema.ts +17 -0
  304. package/src/server/lib/harness/activity.server.test.ts +81 -0
  305. package/src/server/lib/harness/activity.server.ts +55 -0
  306. package/src/server/lib/harness/spawn.server.ts +9 -0
  307. package/src/server/lib/omp/session/delete.server.ts +4 -2
  308. package/src/server/lib/omp/session/sidebar-activity.server.test.ts +24 -2
  309. package/src/server/lib/omp/session/sidebar-data.canonical.test.ts +14 -0
  310. package/src/server/lib/sessions/last-opened.server.test.ts +17 -0
  311. package/src/server/lib/sessions/last-opened.server.ts +18 -1
  312. package/src/server/routes/sessions/index.ts +3 -2
  313. package/src/server/routes/sessions/routes.test.ts +29 -46
  314. package/src/server/routes/sessions/session.ts +40 -62
  315. package/src/server/routes/sessions/state.test.ts +89 -0
  316. package/src/server/routes/sessions/state.ts +86 -0
  317. package/src/shared/lib/chat/attachment-budget.test.ts +74 -0
  318. package/src/shared/lib/chat/attachment-budget.ts +111 -0
  319. package/src/shared/lib/chat/attachments.test.ts +0 -17
  320. package/src/shared/lib/chat/attachments.ts +0 -53
  321. package/src/shared/lib/chat/timeline/block-chrome.test.ts +35 -0
  322. package/src/shared/lib/chat/timeline/block-chrome.ts +21 -0
  323. package/src/shared/lib/markdown/degenerate-emphasis.test.ts +64 -0
  324. package/src/shared/lib/markdown/degenerate-emphasis.ts +90 -0
  325. package/src/shared/lib/markdown/inline-file.test.ts +79 -22
  326. package/src/shared/lib/markdown/inline-file.ts +57 -25
  327. package/src/shared/lib/markdown/marked.ts +5 -1
  328. package/src/shared/lib/settings/defaults.ts +2 -0
  329. package/src/shared/lib/theme/border-style.ts +1 -1
  330. package/src/shared/lib/workspace/active-project.test.ts +17 -1
  331. package/src/shared/lib/workspace/active-project.ts +9 -0
  332. package/src/shared/lib/workspace/project-settings-delete.test.ts +97 -0
  333. package/src/shared/lib/workspace/project-settings.test.ts +2 -34
  334. package/src/shared/lib/workspace/project-settings.ts +6 -0
  335. package/src/shared/lib/workspace/session-list-limit.test.ts +31 -0
  336. package/src/shared/lib/workspace/session-list-limit.ts +32 -0
  337. package/src/shared/lib/workspace/sidebar-sort.test.ts +21 -0
  338. package/src/shared/lib/workspace/workspace-panel-widths.ts +1 -1
  339. package/src/shared/lib/workspace/workspace-session.test.ts +34 -0
  340. package/src/shared/lib/workspace/workspace-session.ts +40 -0
  341. package/src/shared/types/settings/state.ts +10 -0
  342. package/dist/client/static/js/ImageView-ssazqckj.js +0 -1
  343. package/dist/client/static/js/LayoutWrapper-qwpfq4dq.js +0 -2
  344. package/dist/client/static/js/MergeDiffView-en6aazw8.js +0 -1
  345. package/dist/client/static/js/Modal-zjnhj9nb.js +0 -60
  346. package/dist/client/static/js/SessionsView-eryjtmb2.js +0 -1
  347. package/dist/client/static/js/architecture-7GRP2DOG-v05ap4e3.js +0 -1
  348. package/dist/client/static/js/bash-n5d0esqg.js +0 -1
  349. package/dist/client/static/js/c-pk766wx0.js +0 -1
  350. package/dist/client/static/js/cpp-3pt91jvm.js +0 -1
  351. package/dist/client/static/js/css-q2k6afe3.js +0 -1
  352. package/dist/client/static/js/css-sp1cgdbr.js +0 -1
  353. package/dist/client/static/js/cynefin-OW5HDTMX-sqv0ze38.js +0 -1
  354. package/dist/client/static/js/eventmodeling-NTZA5JFV-t4dzf5s7.js +0 -1
  355. package/dist/client/static/js/flowDiagram-KWPJA3E3-c16xmjyv.js +0 -1
  356. package/dist/client/static/js/gitGraph-4MIJSDKK-0jq8y0qd.js +0 -1
  357. package/dist/client/static/js/graphql-qx4tt6ze.js +0 -1
  358. package/dist/client/static/js/html-5e0g8664.js +0 -1
  359. package/dist/client/static/js/index-4ddgpqm0.css +0 -1
  360. package/dist/client/static/js/index-5g2j626a.js +0 -1
  361. package/dist/client/static/js/index-cc7qbfvn.js +0 -477
  362. package/dist/client/static/js/index-f27wvdky.js +0 -4
  363. package/dist/client/static/js/index-m5n0zsft.js +0 -2
  364. package/dist/client/static/js/index-rqt8mem9.js +0 -2
  365. package/dist/client/static/js/index-s9k82stc.js +0 -2
  366. package/dist/client/static/js/index-skwem10a.js +0 -2
  367. package/dist/client/static/js/index-tv9rn2nd.js +0 -2
  368. package/dist/client/static/js/info-A6RAGUB7-szttx3v5.js +0 -1
  369. package/dist/client/static/js/ini-bdk46a3d.js +0 -1
  370. package/dist/client/static/js/java-3g3925cf.js +0 -1
  371. package/dist/client/static/js/javascript-av46zx4c.js +0 -1
  372. package/dist/client/static/js/json-hdyzmffz.js +0 -1
  373. package/dist/client/static/js/jsx-y8r9mrdq.js +0 -1
  374. package/dist/client/static/js/lua-wf5k6p3r.js +0 -1
  375. package/dist/client/static/js/markdown-9bf16dx7.js +0 -1
  376. package/dist/client/static/js/mermaid.core-6cgqsgcf.js +0 -12
  377. package/dist/client/static/js/one-dark-pro-9hnhtkpr.js +0 -1
  378. package/dist/client/static/js/one-light-2n5y8592.js +0 -1
  379. package/dist/client/static/js/packet-AYTQ26CC-401149bv.js +0 -1
  380. package/dist/client/static/js/pie-WAS4IAKB-bgfv8tfz.js +0 -1
  381. package/dist/client/static/js/properties-xk4dn00p.js +0 -1
  382. package/dist/client/static/js/python-7sgz05n4.js +0 -1
  383. package/dist/client/static/js/r-w4qxm0pv.js +0 -1
  384. package/dist/client/static/js/radar-RG4KPBEZ-pw720590.js +0 -1
  385. package/dist/client/static/js/railroad-74A4TZTK-n2a30ngs.js +0 -1
  386. package/dist/client/static/js/railroad-abnf-HS5TGJTU-rn5rx9qt.js +0 -1
  387. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-t4yryhtd.js +0 -1
  388. package/dist/client/static/js/railroad-peg-WCYAUIDC-c4ebgvrr.js +0 -1
  389. package/dist/client/static/js/sql-sd00wgem.js +0 -1
  390. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-v82nym6b.js +0 -8
  391. package/dist/client/static/js/treeView-Q6P3EWNA-bxgt5yhm.js +0 -1
  392. package/dist/client/static/js/treemap-WGGIJYW6-hh3595m0.js +0 -1
  393. package/dist/client/static/js/tsx-h5yzg80q.js +0 -1
  394. package/dist/client/static/js/typescript-qy1sbhea.js +0 -1
  395. package/dist/client/static/js/wardley-WFR3VGLG-6bza7h1b.js +0 -1
  396. package/dist/client/static/js/xml-mrk4xakv.js +0 -1
  397. package/dist/client/static/js/yaml-xaza6dra.js +0 -1
  398. package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.test.tsx +0 -110
  399. package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +0 -86
@@ -1,7 +1,7 @@
1
- import{t,l,Jt,Y,E,te,ne,F,O,G,z,j,q,H,To,nr,ll,ge,ue,Vg}from"./index-gqrt766t.js";import{Aa}from"./index-dxq1tbwm.js";function Rt(e,i,s){e=+e,i=+i,s=(a=arguments.length)<2?(i=e,e=0,1):a<3?1:+s;var n=-1,a=Math.max(0,Math.ceil((i-e)/s))|0,h=Array(a);while(++n<a)h[n]=e+n*s;return h}function ct(){var e=nr().unknown(void 0),{domain:i,range:s}=e,n=0,a=1,h,c,x=!1,f=0,S=0,T=0.5;delete e.unknown;function R(){var y=i().length,B=a<n,P=B?a:n,L=B?n:a;if(h=(L-P)/Math.max(1,y-f+S*2),x)h=Math.floor(h);if(P+=(L-P-h*(y-f))*T,c=h*(1-f),x)P=Math.round(P),c=Math.round(c);var V=Rt(y).map(function(Z){return P+h*Z});return s(B?V.reverse():V)}return e.domain=function(y){return arguments.length?(i(y),R()):i()},e.range=function(y){return arguments.length?([n,a]=y,n=+n,a=+a,R()):[n,a]},e.rangeRound=function(y){return[n,a]=y,n=+n,a=+a,x=!0,R()},e.bandwidth=function(){return c},e.step=function(){return h},e.round=function(y){return arguments.length?(x=!!y,R()):x},e.padding=function(y){return arguments.length?(f=Math.min(1,S=+y),R()):f},e.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),R()):f},e.paddingOuter=function(y){return arguments.length?(S=+y,R()):S},e.align=function(y){return arguments.length?(T=Math.max(0,Math.min(1,y)),R()):T},e.copy=function(){return ct(i(),[n,a]).round(x).paddingInner(f).paddingOuter(S).align(T)},To.apply(R(),arguments)}var _t=function(){var e=t(function(U,r,g,d){for(g=g||{},d=U.length;d--;g[U[d]]=r);return g},"o"),i=[1,10,12,14,16,18,19,21,23],s=[2,6],n=[1,3],a=[1,5],h=[1,6],c=[1,7],x=[1,5,10,12,14,16,18,19,21,23,36,37,38],f=[1,25],S=[1,26],T=[1,28],R=[1,29],y=[1,30],B=[1,31],P=[1,32],L=[1,33],V=[1,34],Z=[1,35],tt=[1,36],w=[1,37],X=[1,43],u=[1,42],W=[1,47],N=[1,50],A=[1,10,12,14,16,18,19,21,23,36,37,38],it=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],I=[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],rt=[1,65],D=[26,28],k={trace:t(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:t(function(r,g,d,p,C,o,st){var m=o.length-1;switch(C){case 5:p.setOrientation(o[m]);break;case 9:p.setDiagramTitle(o[m].text.trim());break;case 12:p.setLineData({text:"",type:"text"},o[m]);break;case 13:p.setLineData(o[m-1],o[m]);break;case 14:p.setBarData({text:"",type:"text"},o[m]);break;case 15:p.setBarData(o[m-1],o[m]);break;case 16:this.$=o[m].trim(),p.setAccTitle(this.$);break;case 17:case 18:this.$=o[m].trim(),p.setAccDescription(this.$);break;case 19:this.$=o[m-1];break;case 20:case 30:this.$=[o[m-2],...o[m]];break;case 21:case 31:this.$=[o[m]];break;case 22:this.$={value:Number(o[m-1]),label:o[m]};break;case 23:this.$={value:Number(o[m]),label:""};break;case 24:p.setXAxisTitle(o[m]);break;case 25:p.setXAxisTitle(o[m-1]);break;case 26:p.setXAxisTitle({type:"text",text:""});break;case 27:p.setXAxisBand(o[m]);break;case 28:p.setXAxisRangeData(Number(o[m-2]),Number(o[m]));break;case 29:this.$=o[m-1];break;case 32:p.setYAxisTitle(o[m]);break;case 33:p.setYAxisTitle(o[m-1]);break;case 34:p.setYAxisTitle({type:"text",text:""});break;case 35:p.setYAxisRangeData(Number(o[m-2]),Number(o[m]));break;case 39:this.$={text:o[m],type:"text"};break;case 40:this.$={text:o[m],type:"text"};break;case 41:this.$={text:o[m],type:"markdown"};break;case 42:this.$=o[m];break;case 43:this.$=o[m-1]+""+o[m];break}},"anonymous"),table:[e(i,s,{3:1,4:2,7:4,5:n,36:a,37:h,38:c}),{1:[3]},e(i,s,{4:2,7:4,3:8,5:n,36:a,37:h,38:c}),e(i,s,{4:2,7:4,6:9,3:10,5:n,8:[1,11],36:a,37:h,38:c}),{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]},e(x,[2,36]),e(x,[2,37]),e(x,[2,38]),{1:[2,1]},e(i,s,{4:2,7:4,3:21,5:n,36:a,37:h,38:c}),{1:[2,3]},e(x,[2,5]),e(i,[2,7],{4:22,36:a,37:h,38:c}),{11:23,30:f,39:24,40:S,41:27,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w},{11:39,13:38,24:X,29:u,30:f,31:40,32:41,39:24,40:S,41:27,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w},{11:45,15:44,29:W,30:f,35:46,39:24,40:S,41:27,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w},{11:49,17:48,24:N,30:f,39:24,40:S,41:27,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w},{11:52,17:51,24:N,30:f,39:24,40:S,41:27,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w},{20:[1,53]},{22:[1,54]},e(A,[2,18]),{1:[2,2]},e(A,[2,8]),e(A,[2,9]),e(it,[2,39],{41:55,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w}),e(it,[2,40]),e(it,[2,41]),e(I,[2,42]),e(I,[2,44]),e(I,[2,45]),e(I,[2,46]),e(I,[2,47]),e(I,[2,48]),e(I,[2,49]),e(I,[2,50]),e(I,[2,51]),e(I,[2,52]),e(I,[2,53]),e(A,[2,10]),e(A,[2,24],{32:41,31:56,24:X,29:u}),e(A,[2,26]),e(A,[2,27]),{33:[1,57]},{11:59,30:f,34:58,39:24,40:S,41:27,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w},e(A,[2,11]),e(A,[2,32],{35:60,29:W}),e(A,[2,34]),{33:[1,61]},e(A,[2,12]),{17:62,24:N},{25:63,27:64,29:rt},e(A,[2,14]),{17:66,24:N},e(A,[2,16]),e(A,[2,17]),e(I,[2,43]),e(A,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(A,[2,33]),{29:[1,70]},e(A,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(D,[2,23],{30:[1,73]}),e(A,[2,15]),e(A,[2,28]),e(A,[2,29]),{11:59,30:f,34:74,39:24,40:S,41:27,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w},e(A,[2,35]),e(A,[2,19]),{25:75,27:64,29:rt},e(D,[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:t(function(r,g){if(g.recoverable)this.trace(r);else{var d=Error(r);throw d.hash=g,d}},"parseError"),parse:t(function(r){var g=this,d=[0],p=[],C=[null],o=[],st=this.table,m="",xt=0,Vt=0,Ft=0,xe=2,Wt=1,fe=o.slice.call(arguments,1),v=Object.create(this.lexer),nt={yy:{}};for(var wt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,wt))nt.yy[wt]=this.yy[wt];if(v.setInput(r,nt.yy),nt.yy.lexer=v,nt.yy.parser=this,typeof v.yylloc>"u")v.yylloc={};var kt=v.yylloc;o.push(kt);var pe=v.options&&v.options.ranges;if(typeof nt.yy.parseError==="function")this.parseError=nt.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function me(K){d.length=d.length-2*K,C.length=C.length-K,o.length=o.length-K}t(me,"popStack");function Xt(){var K=p.pop()||v.lex()||Wt;if(typeof K!=="number"){if(K instanceof Array)p=K,K=p.pop();K=g.symbols_[K]||K}return K}t(Xt,"lex");var M,At,at,Q,Be,Ct,ht={},ft,et,Nt,pt;while(!0){if(at=d[d.length-1],this.defaultActions[at])Q=this.defaultActions[at];else{if(M===null||typeof M>"u")M=Xt();Q=st[at]&&st[at][M]}if(typeof Q>"u"||!Q.length||!Q[0]){var St="";pt=[];for(ft in st[at])if(this.terminals_[ft]&&ft>xe)pt.push("'"+this.terminals_[ft]+"'");if(v.showPosition)St="Parse error on line "+(xt+1)+`:
1
+ import{t,l,Xt,Y,E,te,ne,F,O,G,z,j,q,H,Qo,nr,ml,Ae,ue,rA}from"./index-xqz7bqcn.js";import{ya}from"./index-fg0ne74z.js";function Rt(e,i,s){e=+e,i=+i,s=(a=arguments.length)<2?(i=e,e=0,1):a<3?1:+s;var n=-1,a=Math.max(0,Math.ceil((i-e)/s))|0,h=Array(a);while(++n<a)h[n]=e+n*s;return h}function ct(){var e=nr().unknown(void 0),{domain:i,range:s}=e,n=0,a=1,h,c,x=!1,f=0,S=0,T=0.5;delete e.unknown;function R(){var y=i().length,B=a<n,P=B?a:n,L=B?n:a;if(h=(L-P)/Math.max(1,y-f+S*2),x)h=Math.floor(h);if(P+=(L-P-h*(y-f))*T,c=h*(1-f),x)P=Math.round(P),c=Math.round(c);var V=Rt(y).map(function(Z){return P+h*Z});return s(B?V.reverse():V)}return e.domain=function(y){return arguments.length?(i(y),R()):i()},e.range=function(y){return arguments.length?([n,a]=y,n=+n,a=+a,R()):[n,a]},e.rangeRound=function(y){return[n,a]=y,n=+n,a=+a,x=!0,R()},e.bandwidth=function(){return c},e.step=function(){return h},e.round=function(y){return arguments.length?(x=!!y,R()):x},e.padding=function(y){return arguments.length?(f=Math.min(1,S=+y),R()):f},e.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),R()):f},e.paddingOuter=function(y){return arguments.length?(S=+y,R()):S},e.align=function(y){return arguments.length?(T=Math.max(0,Math.min(1,y)),R()):T},e.copy=function(){return ct(i(),[n,a]).round(x).paddingInner(f).paddingOuter(S).align(T)},Qo.apply(R(),arguments)}var _t=function(){var e=t(function(U,r,g,d){for(g=g||{},d=U.length;d--;g[U[d]]=r);return g},"o"),i=[1,10,12,14,16,18,19,21,23],s=[2,6],n=[1,3],a=[1,5],h=[1,6],c=[1,7],x=[1,5,10,12,14,16,18,19,21,23,36,37,38],f=[1,25],S=[1,26],T=[1,28],R=[1,29],y=[1,30],B=[1,31],P=[1,32],L=[1,33],V=[1,34],Z=[1,35],tt=[1,36],w=[1,37],X=[1,43],u=[1,42],W=[1,47],N=[1,50],A=[1,10,12,14,16,18,19,21,23,36,37,38],it=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],I=[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],rt=[1,65],D=[26,28],k={trace:t(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:t(function(r,g,d,p,C,o,st){var m=o.length-1;switch(C){case 5:p.setOrientation(o[m]);break;case 9:p.setDiagramTitle(o[m].text.trim());break;case 12:p.setLineData({text:"",type:"text"},o[m]);break;case 13:p.setLineData(o[m-1],o[m]);break;case 14:p.setBarData({text:"",type:"text"},o[m]);break;case 15:p.setBarData(o[m-1],o[m]);break;case 16:this.$=o[m].trim(),p.setAccTitle(this.$);break;case 17:case 18:this.$=o[m].trim(),p.setAccDescription(this.$);break;case 19:this.$=o[m-1];break;case 20:case 30:this.$=[o[m-2],...o[m]];break;case 21:case 31:this.$=[o[m]];break;case 22:this.$={value:Number(o[m-1]),label:o[m]};break;case 23:this.$={value:Number(o[m]),label:""};break;case 24:p.setXAxisTitle(o[m]);break;case 25:p.setXAxisTitle(o[m-1]);break;case 26:p.setXAxisTitle({type:"text",text:""});break;case 27:p.setXAxisBand(o[m]);break;case 28:p.setXAxisRangeData(Number(o[m-2]),Number(o[m]));break;case 29:this.$=o[m-1];break;case 32:p.setYAxisTitle(o[m]);break;case 33:p.setYAxisTitle(o[m-1]);break;case 34:p.setYAxisTitle({type:"text",text:""});break;case 35:p.setYAxisRangeData(Number(o[m-2]),Number(o[m]));break;case 39:this.$={text:o[m],type:"text"};break;case 40:this.$={text:o[m],type:"text"};break;case 41:this.$={text:o[m],type:"markdown"};break;case 42:this.$=o[m];break;case 43:this.$=o[m-1]+""+o[m];break}},"anonymous"),table:[e(i,s,{3:1,4:2,7:4,5:n,36:a,37:h,38:c}),{1:[3]},e(i,s,{4:2,7:4,3:8,5:n,36:a,37:h,38:c}),e(i,s,{4:2,7:4,6:9,3:10,5:n,8:[1,11],36:a,37:h,38:c}),{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]},e(x,[2,36]),e(x,[2,37]),e(x,[2,38]),{1:[2,1]},e(i,s,{4:2,7:4,3:21,5:n,36:a,37:h,38:c}),{1:[2,3]},e(x,[2,5]),e(i,[2,7],{4:22,36:a,37:h,38:c}),{11:23,30:f,39:24,40:S,41:27,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w},{11:39,13:38,24:X,29:u,30:f,31:40,32:41,39:24,40:S,41:27,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w},{11:45,15:44,29:W,30:f,35:46,39:24,40:S,41:27,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w},{11:49,17:48,24:N,30:f,39:24,40:S,41:27,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w},{11:52,17:51,24:N,30:f,39:24,40:S,41:27,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w},{20:[1,53]},{22:[1,54]},e(A,[2,18]),{1:[2,2]},e(A,[2,8]),e(A,[2,9]),e(it,[2,39],{41:55,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w}),e(it,[2,40]),e(it,[2,41]),e(I,[2,42]),e(I,[2,44]),e(I,[2,45]),e(I,[2,46]),e(I,[2,47]),e(I,[2,48]),e(I,[2,49]),e(I,[2,50]),e(I,[2,51]),e(I,[2,52]),e(I,[2,53]),e(A,[2,10]),e(A,[2,24],{32:41,31:56,24:X,29:u}),e(A,[2,26]),e(A,[2,27]),{33:[1,57]},{11:59,30:f,34:58,39:24,40:S,41:27,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w},e(A,[2,11]),e(A,[2,32],{35:60,29:W}),e(A,[2,34]),{33:[1,61]},e(A,[2,12]),{17:62,24:N},{25:63,27:64,29:rt},e(A,[2,14]),{17:66,24:N},e(A,[2,16]),e(A,[2,17]),e(I,[2,43]),e(A,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(A,[2,33]),{29:[1,70]},e(A,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(D,[2,23],{30:[1,73]}),e(A,[2,15]),e(A,[2,28]),e(A,[2,29]),{11:59,30:f,34:74,39:24,40:S,41:27,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w},e(A,[2,35]),e(A,[2,19]),{25:75,27:64,29:rt},e(D,[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:t(function(r,g){if(g.recoverable)this.trace(r);else{var d=Error(r);throw d.hash=g,d}},"parseError"),parse:t(function(r){var g=this,d=[0],p=[],C=[null],o=[],st=this.table,m="",xt=0,Vt=0,Ft=0,de=2,Wt=1,xe=o.slice.call(arguments,1),v=Object.create(this.lexer),nt={yy:{}};for(var wt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,wt))nt.yy[wt]=this.yy[wt];if(v.setInput(r,nt.yy),nt.yy.lexer=v,nt.yy.parser=this,typeof v.yylloc>"u")v.yylloc={};var kt=v.yylloc;o.push(kt);var fe=v.options&&v.options.ranges;if(typeof nt.yy.parseError==="function")this.parseError=nt.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function pe(K){d.length=d.length-2*K,C.length=C.length-K,o.length=o.length-K}t(pe,"popStack");function Nt(){var K=p.pop()||v.lex()||Wt;if(typeof K!=="number"){if(K instanceof Array)p=K,K=p.pop();K=g.symbols_[K]||K}return K}t(Nt,"lex");var M,At,at,Q,Be,Ct,ht={},ft,et,Yt,pt;while(!0){if(at=d[d.length-1],this.defaultActions[at])Q=this.defaultActions[at];else{if(M===null||typeof M>"u")M=Nt();Q=st[at]&&st[at][M]}if(typeof Q>"u"||!Q.length||!Q[0]){var St="";pt=[];for(ft in st[at])if(this.terminals_[ft]&&ft>de)pt.push("'"+this.terminals_[ft]+"'");if(v.showPosition)St="Parse error on line "+(xt+1)+`:
2
2
  `+v.showPosition()+`
3
- Expecting `+pt.join(", ")+", got '"+(this.terminals_[M]||M)+"'";else St="Parse error on line "+(xt+1)+": Unexpected "+(M==Wt?"end of input":"'"+(this.terminals_[M]||M)+"'");this.parseError(St,{text:v.match,token:this.terminals_[M]||M,line:v.yylineno,loc:kt,expected:pt})}if(Q[0]instanceof Array&&Q.length>1)throw Error("Parse Error: multiple actions possible at state: "+at+", token: "+M);switch(Q[0]){case 1:if(d.push(M),C.push(v.yytext),o.push(v.yylloc),d.push(Q[1]),M=null,!At){if(Vt=v.yyleng,m=v.yytext,xt=v.yylineno,kt=v.yylloc,Ft>0)Ft--}else M=At,At=null;break;case 2:if(et=this.productions_[Q[1]][1],ht.$=C[C.length-et],ht._$={first_line:o[o.length-(et||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(et||1)].first_column,last_column:o[o.length-1].last_column},pe)ht._$.range=[o[o.length-(et||1)].range[0],o[o.length-1].range[1]];if(Ct=this.performAction.apply(ht,[m,Vt,xt,nt.yy,Q[1],C,o].concat(fe)),typeof Ct<"u")return Ct;if(et)d=d.slice(0,-1*et*2),C=C.slice(0,-1*et),o=o.slice(0,-1*et);d.push(this.productions_[Q[1]][0]),C.push(ht.$),o.push(ht._$),Nt=st[d[d.length-2]][d[d.length-1]],d.push(Nt);break;case 3:return!0}}return!0},"parse")},J=function(){var U={EOF:1,parseError:t(function(g,d){if(this.yy.parser)this.yy.parser.parseError(g,d);else throw Error(g)},"parseError"),setInput:t(function(r,g){if(this.yy=g||this.yy||{},this._input=r,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];return this.offset=0,this},"setInput"),input:t(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var g=r.match(/(?:\r\n?|\n).*/g);if(g)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),r},"input"),unput:t(function(r){var g=r.length,d=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var p=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),d.length-1)this.yylineno-=d.length-1;var C=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:d?(d.length===p.length?this.yylloc.first_column:0)+p[p.length-d.length].length-d[0].length:this.yylloc.first_column-g},this.options.ranges)this.yylloc.range=[C[0],C[0]+this.yyleng-g];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(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).
3
+ Expecting `+pt.join(", ")+", got '"+(this.terminals_[M]||M)+"'";else St="Parse error on line "+(xt+1)+": Unexpected "+(M==Wt?"end of input":"'"+(this.terminals_[M]||M)+"'");this.parseError(St,{text:v.match,token:this.terminals_[M]||M,line:v.yylineno,loc:kt,expected:pt})}if(Q[0]instanceof Array&&Q.length>1)throw Error("Parse Error: multiple actions possible at state: "+at+", token: "+M);switch(Q[0]){case 1:if(d.push(M),C.push(v.yytext),o.push(v.yylloc),d.push(Q[1]),M=null,!At){if(Vt=v.yyleng,m=v.yytext,xt=v.yylineno,kt=v.yylloc,Ft>0)Ft--}else M=At,At=null;break;case 2:if(et=this.productions_[Q[1]][1],ht.$=C[C.length-et],ht._$={first_line:o[o.length-(et||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(et||1)].first_column,last_column:o[o.length-1].last_column},fe)ht._$.range=[o[o.length-(et||1)].range[0],o[o.length-1].range[1]];if(Ct=this.performAction.apply(ht,[m,Vt,xt,nt.yy,Q[1],C,o].concat(xe)),typeof Ct<"u")return Ct;if(et)d=d.slice(0,-1*et*2),C=C.slice(0,-1*et),o=o.slice(0,-1*et);d.push(this.productions_[Q[1]][0]),C.push(ht.$),o.push(ht._$),Yt=st[d[d.length-2]][d[d.length-1]],d.push(Yt);break;case 3:return!0}}return!0},"parse")},J=function(){var U={EOF:1,parseError:t(function(g,d){if(this.yy.parser)this.yy.parser.parseError(g,d);else throw Error(g)},"parseError"),setInput:t(function(r,g){if(this.yy=g||this.yy||{},this._input=r,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];return this.offset=0,this},"setInput"),input:t(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var g=r.match(/(?:\r\n?|\n).*/g);if(g)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),r},"input"),unput:t(function(r){var g=r.length,d=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var p=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),d.length-1)this.yylineno-=d.length-1;var C=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:d?(d.length===p.length?this.yylloc.first_column:0)+p[p.length-d.length].length-d[0].length:this.yylloc.first_column-g},this.options.ranges)this.yylloc.range=[C[0],C[0]+this.yyleng-g];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:t(function(r){this.unput(this.match.slice(r))},"less"),pastInput:t(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var r=this.match;if(r.length<20)r+=this._input.substr(0,20-r.length);return(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var r=this.pastInput(),g=Array(r.length+1).join("-");return r+this.upcomingInput()+`
5
5
  `+g+"^"},"showPosition"),test_match:t(function(r,g){var d,p,C;if(this.options.backtrack_lexer){if(C={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)C.yylloc.range=this.yylloc.range.slice(0)}if(p=r[0].match(/(?:\r\n?|\n).*/g),p)this.yylineno+=p.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(r[0].length),this.matched+=r[0],d=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(d)return d;else if(this._backtrack){for(var o in C)this[o]=C[o];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var r,g,d,p;if(!this._more)this.yytext="",this.match="";var C=this._currentRules();for(var o=0;o<C.length;o++)if(d=this._input.match(this.rules[C[o]]),d&&(!g||d[0].length>g[0].length)){if(g=d,p=o,this.options.backtrack_lexer)if(r=this.test_match(d,C[o]),r!==!1)return r;else if(this._backtrack){g=!1;continue}else return!1;else if(!this.options.flex)break}if(g){if(r=this.test_match(g,C[p]),r!==!1)return r;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var g=this.next();if(g)return g;else return this.lex()},"lex"),begin:t(function(g){this.conditionStack.push(g)},"begin"),popState:t(function(){var g=this.conditionStack.length-1;if(g>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(g){if(g=this.conditionStack.length-1-Math.abs(g||0),g>=0)return this.conditionStack[g];else return"INITIAL"},"topState"),pushState:t(function(g){this.begin(g)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(g,d,p,C){var o=C;switch(p){case 0:break;case 1:break;case 2:return this.popState(),36;break;case 3:return this.popState(),36;break;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;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";break;case 18:return this.pushState("axis_data"),"Y_AXIS";break;case 19:return this.pushState("axis_band_data"),24;break;case 20:return 33;case 21:return this.pushState("data"),16;break;case 22:return this.pushState("data"),18;break;case 23:return this.pushState("data_inner"),24;break;case 24:return 29;case 25:return this.popState(),26;break;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}}};return U}();k.lexer=J;function _(){this.yy={}}return t(_,"Parser"),_.prototype=k,k.Parser=_,new _}();_t.parser=_t;var be=_t;function mt(e){return e.type==="bar"}t(mt,"isBarPlot");function bt(e){return e.type==="band"}t(bt,"isBandAxisData");function lt(e){return e.type==="linear"}t(lt,"isLinearAxisData");var Pt=class{constructor(e){this.parentGroup=e}static{t(this,"TextDimensionCalculatorWithFont")}getMaxDimension(e,i){if(!this.parentGroup)return{width:e.reduce((a,h)=>Math.max(h.length,a),0)*i,height:i};let s={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(let a of e){let h=Vg(n,1,a),c=h?h.width:a.length*i,x=h?h.height:i;s.width=Math.max(s.width,c),s.height=Math.max(s.height,x)}return n.remove(),s}},Yt=0.7,Ht=0.2,$t=class{constructor(e,i,s,n){this.axisConfig=e,this.title=i,this.textDimensionCalculator=s,this.axisThemeConfig=n,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{t(this,"BaseAxis")}setRange(e){if(this.range=e,this.axisPosition==="left"||this.axisPosition==="right")this.boundingRect.height=e[1]-e[0];else this.boundingRect.width=e[1]-e[0];this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map((e)=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){if(Yt*this.getTickDistance()>this.outerPadding*2)this.outerPadding=Math.floor(Yt*this.getTickDistance()/2);this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let i=e.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth)i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0;if(this.axisConfig.showLabel){let s=this.getLabelDimension(),n=Ht*e.width;this.outerPadding=Math.min(s.width/2,n);let a=s.height;if(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));if(a+=this.axisConfig.labelPadding*2,this.labelTextHeight=s.height,a<=i)i-=a,this.showLabel=!0}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength)this.showTick=!0,i-=this.axisConfig.tickLength;if(this.axisConfig.showTitle&&this.title){let s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;if(this.titleTextHeight=s.height,n<=i)i-=n,this.showTitle=!0}this.boundingRect.width=e.width,this.boundingRect.height=e.height-i}calculateSpaceIfDrawnVertical(e){let i=e.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth)i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0;if(this.axisConfig.showLabel){let s=this.getLabelDimension(),n=Ht*e.height;this.outerPadding=Math.min(s.height/2,n);let a=s.width+this.axisConfig.labelPadding*2;if(a<=i)i-=a,this.showLabel=!0}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength)this.showTick=!0,i-=this.axisConfig.tickLength;if(this.axisConfig.showTitle&&this.title){let s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;if(this.titleTextHeight=s.height,n<=i)i-=n,this.showTitle=!0}this.boundingRect.width=e.width-i,this.boundingRect.height=e.height}calculateSpace(e){if(this.axisPosition==="left"||this.axisPosition==="right")this.calculateSpaceIfDrawnVertical(e);else this.calculateSpaceIfDrawnHorizontally(e);return this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateOffsetByRotation(e){let i=this.normalizedLabelRotationInRad;if(i===0)return 0;return Math.sin(i)*this.getLabelDimension()[e]/2}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map((i)=>({text:i.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(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))});if(this.showTick){let i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${i},${this.getScaleValue(s)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)e.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"}]});return e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.getScaleValue(i)+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"}))});if(this.showTick){let i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)e.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"}]});return e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.getScaleValue(i),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"}))});if(this.showTick){let i=this.boundingRect.y;e.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${this.getScaleValue(s)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)e.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"}]});return e}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");if(this.axisPosition==="bottom")return this.getDrawableElementsForBottomAxis();if(this.axisPosition==="top")return this.getDrawableElementsForTopAxis();return[]}},ye=class extends $t{static{t(this,"BandAxis")}constructor(e,i,s,n,a){super(e,n,a,i);this.categories=s,this.scale=ct().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=ct().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5),l.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},we=class extends $t{static{t(this,"LinearAxis")}constructor(e,i,s,n,a){super(e,n,a,i);this.domain=s,this.scale=Aa().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];if(this.axisPosition==="left")e.reverse();this.scale=Aa().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};function Tt(e,i,s,n){let a=new Pt(n);if(bt(e))return new ye(i,s,e.categories,e.title,a);return new we(i,s,[e.min,e.max],e.title,a)}t(Tt,"getAxis");var ke=class{constructor(e,i,s,n){this.textDimensionCalculator=e,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{t(this,"ChartTitle")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,e.width),n=i.height+2*this.chartConfig.titlePadding;if(i.width<=s&&i.height<=n&&this.chartConfig.showTitle&&this.chartData.title)this.boundingRect.width=s,this.boundingRect.height=n,this.showChartTitle=!0;return{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];if(this.showChartTitle)e.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}]});return e}};function Ut(e,i,s,n){let a=new Pt(n);return new ke(a,e,i,s)}t(Ut,"getChartTitleComponent");var Ae=0.75,Ce=0.5,Se=0.35;function Dt(e){return{fontSize:e,markerSize:e*Ae,markerSpacing:e*Se,itemSpacing:e*Ce}}t(Dt,"getLegendLayout");var Re=class{constructor(e,i,s,n){this.textDimensionCalculator=e,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}static{t(this,"ChartLegend")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter((f)=>f.title):[],this.visiblePlots.length===0)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};let{fontSize:i,markerSize:s,markerSpacing:n,itemSpacing:a}=Dt(this.chartConfig.legendFontSize),h=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map((f)=>f.title),i),c=this.chartConfig.legendPadding*2+s+n+h.width,x=this.chartConfig.legendPadding*2+this.visiblePlots.length*i+(this.visiblePlots.length-1)*a;if(c<=e.width&&x<=e.height)this.boundingRect.width=c,this.boundingRect.height=x;else this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0;return{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(this.visiblePlots.length===0)return[];let{fontSize:e,markerSize:i,markerSpacing:s,itemSpacing:n}=Dt(this.chartConfig.legendFontSize),a=e+n,h=this.boundingRect.x+this.chartConfig.legendPadding,c=this.boundingRect.y+this.chartConfig.legendPadding,x=[],f=[];for(let[S,T]of this.visiblePlots.entries())if(mt(T))x.push({x:h,y:c+S*a,width:i,height:i,fill:T.fill,strokeFill:T.fill,strokeWidth:0});else{let R=c+S*a+i/2;f.push({path:`M ${h},${R} L ${h+i},${R}`,strokeFill:T.strokeFill,strokeWidth:T.strokeWidth})}return[{groupTexts:["legend","markers"],type:"rect",data:x},{groupTexts:["legend","markers"],type:"path",data:f},{groupTexts:["legend","label"],type:"text",data:this.visiblePlots.map((S,T)=>({text:S.title,x:h+i+s,y:c+T*a+i/2,fill:this.chartThemeConfig.legendTextColor,fontSize:e,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}};function qt(e,i,s,n){let a=new Pt(n);return new Re(a,e,i,s)}t(qt,"getChartLegendComponent");var _e=class{constructor(e,i,s,n,a){this.plotData=e,this.xAxis=i,this.yAxis=s,this.orientation=n,this.plotIndex=a}static{t(this,"LinePlot")}getDrawableElement(){let e=this.plotData.data.map((n)=>[this.xAxis.getScaleValue(n[0]),this.yAxis.getScaleValue(n[1])]),i;if(this.orientation==="horizontal")i=ll().y((n)=>n[0]).x((n)=>n[1])(e);else i=ll().x((n)=>n[0]).y((n)=>n[1])(e);if(!i)return[];let s=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let h=[];for(let[c,[x,f]]of e.entries()){let S=this.plotData.pointLabels[c];if(!S)continue;if(this.orientation==="horizontal")h.push({x:f+10,y:x,text:S,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0});else h.push({x,y:f-10,text:S,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0})}if(h.length>0)s.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:h})}return s}},Te=class{constructor(e,i,s,n,a,h){this.barData=e,this.boundingRect=i,this.xAxis=s,this.yAxis=n,this.orientation=a,this.plotIndex=h}static{t(this,"BarPlot")}getDrawableElement(){let e=this.barData.data.map((a)=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),i=0.05,s=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*0.95,n=s/2;if(this.orientation==="horizontal")return[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map((a)=>({x:this.boundingRect.x,y:a[0]-n,height:s,width:a[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}];return[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map((a)=>({x:a[0]-n,y:a[1],width:s,height:this.boundingRect.y+this.boundingRect.height-a[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},De=class{constructor(e,i,s){this.chartConfig=e,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}static{t(this,"BasePlot")}setAxes(e,i){this.xAxis=e,this.yAxis=i}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let e=[];for(let[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{let n=new _e(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);e.push(...n.getDrawableElement())}break;case"bar":{let n=new Te(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);e.push(...n.getDrawableElement())}break}return e}};function Gt(e,i,s){return new De(e,i,s)}t(Gt,"getPlotComponent");var ve=class{constructor(e,i,s,n){this.chartConfig=e,this.chartData=i,this.componentStore={title:Ut(e,i,s,n),plot:Gt(e,i,s),legend:qt(e,i,s,n),xAxis:Tt(i.xAxis,e.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},n),yAxis:Tt(i.yAxis,e.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},n)}}static{t(this,"Orchestrator")}calculateVerticalSpace(){let e=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,a={width:0,height:0},h=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),c=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),x=this.componentStore.plot.calculateSpace({width:h,height:c});if(e-=x.width,i-=x.height,x=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),n=x.height,i-=x.height,this.componentStore.xAxis.setAxisPosition("bottom"),x=this.componentStore.xAxis.calculateSpace({width:e,height:i}),i-=x.height,this.componentStore.yAxis.setAxisPosition("left"),x=this.componentStore.yAxis.calculateSpace({width:e,height:i}),s=x.width,e-=x.width,a=this.componentStore.legend.calculateSpace({width:e,height:c}),e-=a.width,e>0)h+=e,e=0;if(i>0)c+=i,i=0;if(this.componentStore.plot.calculateSpace({width:h,height:c}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.legend.setBoundingBoxXY({x:s+h,y:n+Math.max((c-a.height)/2,0)}),this.componentStore.xAxis.setRange([s,s+h]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:n+c}),this.componentStore.yAxis.setRange([n,n+c]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some((f)=>mt(f)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,a=0,h={width:0,height:0},c=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),x=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:c,height:x});if(e-=f.width,i-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=f.height,i-=f.height,this.componentStore.xAxis.setAxisPosition("left"),f=this.componentStore.xAxis.calculateSpace({width:e,height:i}),e-=f.width,n=f.width,this.componentStore.yAxis.setAxisPosition("top"),f=this.componentStore.yAxis.calculateSpace({width:e,height:i}),i-=f.height,a=s+f.height,h=this.componentStore.legend.calculateSpace({width:e,height:x}),e-=h.width,e>0)c+=e,e=0;if(i>0)x+=i,i=0;if(this.componentStore.plot.calculateSpace({width:c,height:x}),this.componentStore.plot.setBoundingBoxXY({x:n,y:a}),this.componentStore.legend.setBoundingBoxXY({x:n+c,y:a+Math.max((x-h.height)/2,0)}),this.componentStore.yAxis.setRange([n,n+c]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:s}),this.componentStore.xAxis.setRange([a,a+x]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some((S)=>mt(S)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){if(this.chartConfig.chartOrientation==="horizontal")this.calculateHorizontalSpace();else this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let i of Object.values(this.componentStore))e.push(...i.getDrawableElements());return e}},Pe=class{static{t(this,"XYChartBuilder")}static build(e,i,s,n){return new ve(e,i,s,n).getDrawableElement()}},gt=0,jt,ut=It(),dt=Et(),b=Mt(),vt=dt.plotColorPalette.split(",").map((e)=>e.trim()),yt=!1,Lt=!1;function Et(){let e=Jt(),i=E();return ue(e.xyChart,i.themeVariables.xyChart)}t(Et,"getChartDefaultThemeConfig");function It(){let e=E();return ue(Y.xyChart,e.xyChart)}t(It,"getChartDefaultConfig");function Mt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}t(Mt,"getChartDefaultData");function ot(e){let i=E();return te(e.trim(),i)}t(ot,"textSanitizer");function Qt(e){jt=e}t(Qt,"setTmpSVGG");function Kt(e){if(e==="horizontal")ut.chartOrientation="horizontal";else ut.chartOrientation="vertical"}t(Kt,"setOrientation");function Zt(e){b.xAxis.title=ot(e.text)}t(Zt,"setXAxisTitle");function Bt(e,i){b.xAxis={type:"linear",title:b.xAxis.title,min:e,max:i},yt=!0}t(Bt,"setXAxisRangeData");function ee(e){b.xAxis={type:"band",title:b.xAxis.title,categories:e.map((i)=>ot(i.text))},yt=!0}t(ee,"setXAxisBand");function ie(e){b.yAxis.title=ot(e.text)}t(ie,"setYAxisTitle");function se(e,i){b.yAxis={type:"linear",title:b.yAxis.title,min:e,max:i},Lt=!0}t(se,"setYAxisRangeData");function ae(e){let i=Math.min(...e),s=Math.max(...e),n=lt(b.yAxis)?b.yAxis.min:1/0,a=lt(b.yAxis)?b.yAxis.max:-1/0;b.yAxis={type:"linear",title:b.yAxis.title,min:Math.min(n,i),max:Math.max(a,s)}}t(ae,"setYAxisRangeFromPlotData");function zt(e){let i=[];if(e.length===0)return i;if(!yt){let s=lt(b.xAxis)?b.xAxis.min:1/0,n=lt(b.xAxis)?b.xAxis.max:-1/0;Bt(Math.min(s,1),Math.max(n,e.length))}if(bt(b.xAxis)&&e.length>b.xAxis.categories.length)e=e.slice(0,b.xAxis.categories.length);if(!Lt)ae(e);if(bt(b.xAxis))i=b.xAxis.categories.map((s,n)=>[s,e[n]]);if(lt(b.xAxis)){let s=b.xAxis.min,n=b.xAxis.max;if(e.length===1)i=[[`${s}`,e[0]]];else{let a=(n-s)/(e.length-1);i=e.map((h,c)=>[`${s+c*a}`,h])}}return i}t(zt,"transformDataWithoutCategory");function Ot(e){return vt[e===0?0:e%vt.length]}t(Ot,"getPlotColorFromPalette");function oe(e,i){let s=i.map((c)=>c.value),n=i.map((c)=>c.label?ot(c.label):""),a=zt(s),h=n.some((c)=>c!=="");b.plots.push({type:"line",title:ot(e.text),strokeFill:Ot(gt),strokeWidth:2,data:a,...h?{pointLabels:n}:{}}),gt++}t(oe,"setLineData");function re(e,i){let s=i.map((a)=>a.value),n=zt(s);b.plots.push({type:"bar",title:ot(e.text),fill:Ot(gt),data:n}),gt++}t(re,"setBarData");function he(){if(b.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return b.title=H(),Pe.build(ut,b,dt,jt)}t(he,"getDrawableElem");function le(){return dt}t(le,"getChartThemeConfig");function ce(){return ut}t(ce,"getChartConfig");function de(){return b}t(de,"getXYChartData");var Le=t(function(){F(),gt=0,ut=It(),b=Mt(),dt=Et(),vt=dt.plotColorPalette.split(",").map((e)=>e.trim()),yt=!1,Lt=!1},"clear"),Ee={getDrawableElem:he,clear:Le,setAccTitle:O,getAccTitle:G,setDiagramTitle:q,getDiagramTitle:H,getAccDescription:j,setAccDescription:z,setOrientation:Kt,setXAxisTitle:Zt,setXAxisRangeData:Bt,setXAxisBand:ee,setYAxisTitle:ie,setYAxisRangeData:se,setLineData:oe,setBarData:re,setTmpSVGG:Qt,getChartThemeConfig:le,getChartConfig:ce,getXYChartData:de},Ie=t((e,i,s,n)=>{let a=n.db,h=a.getChartThemeConfig(),c=a.getChartConfig(),x=a.getXYChartData().plots[0].data.map((w)=>w[1]);function f(w){return w==="top"?"text-before-edge":"middle"}t(f,"getDominantBaseLine");function S(w){return w==="left"?"start":w==="right"?"end":"middle"}t(S,"getTextAnchor");function T(w){return`translate(${w.x}, ${w.y}) rotate(${w.rotation||0})`}t(T,"getTextTransformation"),l.debug(`Rendering xychart chart
7
- `+e);let R=ge(i),y=R.append("g").attr("class","main"),B=y.append("rect").attr("width",c.width).attr("height",c.height).attr("class","background");ne(R,c.height,c.width,!0),R.attr("viewBox",`0 0 ${c.width} ${c.height}`),B.attr("fill",h.backgroundColor),a.setTmpSVGG(R.append("g").attr("class","mermaid-tmp-group"));let P=a.getDrawableElem(),L={};function V(w){let X=y,u="";for(let[W]of w.entries()){let N=y;if(W>0&&L[u])N=L[u];if(u+=w[W],X=L[u],!X)X=L[u]=N.append("g").attr("class",w[W])}return X}t(V,"getGroup");for(let w of P){if(w.data.length===0)continue;let X=V(w.groupTexts);switch(w.type){case"rect":if(X.selectAll("rect").data(w.data).enter().append("rect").attr("x",(u)=>u.x).attr("y",(u)=>u.y).attr("width",(u)=>u.width).attr("height",(u)=>u.height).attr("fill",(u)=>u.fill).attr("stroke",(u)=>u.strokeFill).attr("stroke-width",(u)=>u.strokeWidth),c.showDataLabel){let u=c.showDataLabelOutsideBar;if(c.chartOrientation==="horizontal"){let W=function(k,J){let{data:_,label:U}=k;return J*U.length*N<=_.width-A};var Z=W;t(W,"fitsHorizontally");let N=0.7,A=10,it=w.data.map((k,J)=>({data:k,label:x[J].toString()})).filter((k)=>k.data.width>0&&k.data.height>0),I=it.map((k)=>{let{data:J}=k,_=J.height*0.7;while(!W(k,_)&&_>0)_-=1;return _}),rt=Math.floor(Math.min(...I)),D=t((k)=>{if(u)return k.data.x+k.data.width+A;else return k.data.x+k.data.width-A},"determineLabelXPosition");X.selectAll("text").data(it).enter().append("text").attr("x",D).attr("y",(k)=>k.data.y+k.data.height/2).attr("text-anchor",u?"start":"end").attr("dominant-baseline","middle").attr("fill",h.dataLabelColor).attr("font-size",`${rt}px`).text((k)=>k.label)}else{let W=function(D,k,J){let{data:_,label:U}=D,r=0.7,g=k*U.length*0.7,d=_.x+_.width/2,p=d-g/2,C=d+g/2,o=p>=_.x&&C<=_.x+_.width,st=_.y+J+k<=_.y+_.height;return o&&st};var tt=W;t(W,"fitsInBar");let N=10,A=w.data.map((D,k)=>({data:D,label:x[k].toString()})).filter((D)=>D.data.width>0&&D.data.height>0),it=A.map((D)=>{let{data:k,label:J}=D,_=k.width/(J.length*0.7);while(!W(D,_,N)&&_>0)_-=1;return _}),I=Math.floor(Math.min(...it)),rt=t((D)=>{if(u)return D.data.y-N;else return D.data.y+N},"determineLabelYPosition");X.selectAll("text").data(A).enter().append("text").attr("x",(D)=>D.data.x+D.data.width/2).attr("y",rt).attr("text-anchor","middle").attr("dominant-baseline",u?"auto":"hanging").attr("fill",h.dataLabelColor).attr("font-size",`${I}px`).text((D)=>D.label)}}break;case"text":X.selectAll("text").data(w.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",(u)=>u.fill).attr("font-size",(u)=>u.fontSize).attr("dominant-baseline",(u)=>f(u.verticalPos)).attr("text-anchor",(u)=>S(u.horizontalPos)).attr("transform",(u)=>T(u)).text((u)=>u.text);break;case"path":X.selectAll("path").data(w.data).enter().append("path").attr("d",(u)=>u.path).attr("fill",(u)=>u.fill?u.fill:"none").attr("stroke",(u)=>u.strokeFill).attr("stroke-width",(u)=>u.strokeWidth);break}}},"draw"),Me={draw:Ie},Ke={parser:be,db:Ee,renderer:Me};export{Ke as diagram};
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var g=this.next();if(g)return g;else return this.lex()},"lex"),begin:t(function(g){this.conditionStack.push(g)},"begin"),popState:t(function(){var g=this.conditionStack.length-1;if(g>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(g){if(g=this.conditionStack.length-1-Math.abs(g||0),g>=0)return this.conditionStack[g];else return"INITIAL"},"topState"),pushState:t(function(g){this.begin(g)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(g,d,p,C){var o=C;switch(p){case 0:break;case 1:break;case 2:return this.popState(),36;break;case 3:return this.popState(),36;break;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;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";break;case 18:return this.pushState("axis_data"),"Y_AXIS";break;case 19:return this.pushState("axis_band_data"),24;break;case 20:return 33;case 21:return this.pushState("data"),16;break;case 22:return this.pushState("data"),18;break;case 23:return this.pushState("data_inner"),24;break;case 24:return 29;case 25:return this.popState(),26;break;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}}};return U}();k.lexer=J;function _(){this.yy={}}return t(_,"Parser"),_.prototype=k,k.Parser=_,new _}();_t.parser=_t;var me=_t;function mt(e){return e.type==="bar"}t(mt,"isBarPlot");function bt(e){return e.type==="band"}t(bt,"isBandAxisData");function lt(e){return e.type==="linear"}t(lt,"isLinearAxisData");var Pt=class{constructor(e){this.parentGroup=e}static{t(this,"TextDimensionCalculatorWithFont")}getMaxDimension(e,i){if(!this.parentGroup)return{width:e.reduce((a,h)=>Math.max(h.length,a),0)*i,height:i};let s={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(let a of e){let h=rA(n,1,a),c=h?h.width:a.length*i,x=h?h.height:i;s.width=Math.max(s.width,c),s.height=Math.max(s.height,x)}return n.remove(),s}},Ht=0.7,$t=0.2,Ut=class{constructor(e,i,s,n){this.axisConfig=e,this.title=i,this.textDimensionCalculator=s,this.axisThemeConfig=n,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{t(this,"BaseAxis")}setRange(e){if(this.range=e,this.axisPosition==="left"||this.axisPosition==="right")this.boundingRect.height=e[1]-e[0];else this.boundingRect.width=e[1]-e[0];this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map((e)=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){if(Ht*this.getTickDistance()>this.outerPadding*2)this.outerPadding=Math.floor(Ht*this.getTickDistance()/2);this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let i=e.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth)i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0;if(this.axisConfig.showLabel){let s=this.getLabelDimension(),n=$t*e.width;this.outerPadding=Math.min(s.width/2,n);let a=s.height;if(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));if(a+=this.axisConfig.labelPadding*2,this.labelTextHeight=s.height,a<=i)i-=a,this.showLabel=!0}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength)this.showTick=!0,i-=this.axisConfig.tickLength;if(this.axisConfig.showTitle&&this.title){let s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;if(this.titleTextHeight=s.height,n<=i)i-=n,this.showTitle=!0}this.boundingRect.width=e.width,this.boundingRect.height=e.height-i}calculateSpaceIfDrawnVertical(e){let i=e.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth)i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0;if(this.axisConfig.showLabel){let s=this.getLabelDimension(),n=$t*e.height;this.outerPadding=Math.min(s.height/2,n);let a=s.width+this.axisConfig.labelPadding*2;if(a<=i)i-=a,this.showLabel=!0}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength)this.showTick=!0,i-=this.axisConfig.tickLength;if(this.axisConfig.showTitle&&this.title){let s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;if(this.titleTextHeight=s.height,n<=i)i-=n,this.showTitle=!0}this.boundingRect.width=e.width-i,this.boundingRect.height=e.height}calculateSpace(e){if(this.axisPosition==="left"||this.axisPosition==="right")this.calculateSpaceIfDrawnVertical(e);else this.calculateSpaceIfDrawnHorizontally(e);return this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateOffsetByRotation(e){let i=this.normalizedLabelRotationInRad;if(i===0)return 0;return Math.sin(i)*this.getLabelDimension()[e]/2}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map((i)=>({text:i.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(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))});if(this.showTick){let i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${i},${this.getScaleValue(s)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)e.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"}]});return e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.getScaleValue(i)+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"}))});if(this.showTick){let i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)e.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"}]});return e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.getScaleValue(i),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"}))});if(this.showTick){let i=this.boundingRect.y;e.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${this.getScaleValue(s)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(this.showTitle)e.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"}]});return e}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");if(this.axisPosition==="bottom")return this.getDrawableElementsForBottomAxis();if(this.axisPosition==="top")return this.getDrawableElementsForTopAxis();return[]}},be=class extends Ut{static{t(this,"BandAxis")}constructor(e,i,s,n,a){super(e,n,a,i);this.categories=s,this.scale=ct().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=ct().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5),l.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},ye=class extends Ut{static{t(this,"LinearAxis")}constructor(e,i,s,n,a){super(e,n,a,i);this.domain=s,this.scale=ya().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];if(this.axisPosition==="left")e.reverse();this.scale=ya().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};function Tt(e,i,s,n){let a=new Pt(n);if(bt(e))return new be(i,s,e.categories,e.title,a);return new ye(i,s,[e.min,e.max],e.title,a)}t(Tt,"getAxis");var we=class{constructor(e,i,s,n){this.textDimensionCalculator=e,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{t(this,"ChartTitle")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,e.width),n=i.height+2*this.chartConfig.titlePadding;if(i.width<=s&&i.height<=n&&this.chartConfig.showTitle&&this.chartData.title)this.boundingRect.width=s,this.boundingRect.height=n,this.showChartTitle=!0;return{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];if(this.showChartTitle)e.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}]});return e}};function qt(e,i,s,n){let a=new Pt(n);return new we(a,e,i,s)}t(qt,"getChartTitleComponent");var ke=0.75,Ce=0.5,Se=0.35;function Dt(e){return{fontSize:e,markerSize:e*ke,markerSpacing:e*Se,itemSpacing:e*Ce}}t(Dt,"getLegendLayout");var Re=class{constructor(e,i,s,n){this.textDimensionCalculator=e,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}static{t(this,"ChartLegend")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter((f)=>f.title):[],this.visiblePlots.length===0)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};let{fontSize:i,markerSize:s,markerSpacing:n,itemSpacing:a}=Dt(this.chartConfig.legendFontSize),h=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map((f)=>f.title),i),c=this.chartConfig.legendPadding*2+s+n+h.width,x=this.chartConfig.legendPadding*2+this.visiblePlots.length*i+(this.visiblePlots.length-1)*a;if(c<=e.width&&x<=e.height)this.boundingRect.width=c,this.boundingRect.height=x;else this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0;return{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(this.visiblePlots.length===0)return[];let{fontSize:e,markerSize:i,markerSpacing:s,itemSpacing:n}=Dt(this.chartConfig.legendFontSize),a=e+n,h=this.boundingRect.x+this.chartConfig.legendPadding,c=this.boundingRect.y+this.chartConfig.legendPadding,x=[],f=[];for(let[S,T]of this.visiblePlots.entries())if(mt(T))x.push({x:h,y:c+S*a,width:i,height:i,fill:T.fill,strokeFill:T.fill,strokeWidth:0});else{let R=c+S*a+i/2;f.push({path:`M ${h},${R} L ${h+i},${R}`,strokeFill:T.strokeFill,strokeWidth:T.strokeWidth})}return[{groupTexts:["legend","markers"],type:"rect",data:x},{groupTexts:["legend","markers"],type:"path",data:f},{groupTexts:["legend","label"],type:"text",data:this.visiblePlots.map((S,T)=>({text:S.title,x:h+i+s,y:c+T*a+i/2,fill:this.chartThemeConfig.legendTextColor,fontSize:e,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}};function Gt(e,i,s,n){let a=new Pt(n);return new Re(a,e,i,s)}t(Gt,"getChartLegendComponent");var _e=class{constructor(e,i,s,n,a){this.plotData=e,this.xAxis=i,this.yAxis=s,this.orientation=n,this.plotIndex=a}static{t(this,"LinePlot")}getDrawableElement(){let e=this.plotData.data.map((n)=>[this.xAxis.getScaleValue(n[0]),this.yAxis.getScaleValue(n[1])]),i;if(this.orientation==="horizontal")i=ml().y((n)=>n[0]).x((n)=>n[1])(e);else i=ml().x((n)=>n[0]).y((n)=>n[1])(e);if(!i)return[];let s=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let h=[];for(let[c,[x,f]]of e.entries()){let S=this.plotData.pointLabels[c];if(!S)continue;if(this.orientation==="horizontal")h.push({x:f+10,y:x,text:S,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0});else h.push({x,y:f-10,text:S,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0})}if(h.length>0)s.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:h})}return s}},Te=class{constructor(e,i,s,n,a,h){this.barData=e,this.boundingRect=i,this.xAxis=s,this.yAxis=n,this.orientation=a,this.plotIndex=h}static{t(this,"BarPlot")}getDrawableElement(){let e=this.barData.data.map((a)=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),i=0.05,s=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*0.95,n=s/2;if(this.orientation==="horizontal")return[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map((a)=>({x:this.boundingRect.x,y:a[0]-n,height:s,width:a[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}];return[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map((a)=>({x:a[0]-n,y:a[1],width:s,height:this.boundingRect.y+this.boundingRect.height-a[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},De=class{constructor(e,i,s){this.chartConfig=e,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}static{t(this,"BasePlot")}setAxes(e,i){this.xAxis=e,this.yAxis=i}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let e=[];for(let[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{let n=new _e(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);e.push(...n.getDrawableElement())}break;case"bar":{let n=new Te(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);e.push(...n.getDrawableElement())}break}return e}};function jt(e,i,s){return new De(e,i,s)}t(jt,"getPlotComponent");var ve=class{constructor(e,i,s,n){this.chartConfig=e,this.chartData=i,this.componentStore={title:qt(e,i,s,n),plot:jt(e,i,s),legend:Gt(e,i,s,n),xAxis:Tt(i.xAxis,e.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},n),yAxis:Tt(i.yAxis,e.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},n)}}static{t(this,"Orchestrator")}calculateVerticalSpace(){let e=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,a={width:0,height:0},h=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),c=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),x=this.componentStore.plot.calculateSpace({width:h,height:c});if(e-=x.width,i-=x.height,x=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),n=x.height,i-=x.height,this.componentStore.xAxis.setAxisPosition("bottom"),x=this.componentStore.xAxis.calculateSpace({width:e,height:i}),i-=x.height,this.componentStore.yAxis.setAxisPosition("left"),x=this.componentStore.yAxis.calculateSpace({width:e,height:i}),s=x.width,e-=x.width,a=this.componentStore.legend.calculateSpace({width:e,height:c}),e-=a.width,e>0)h+=e,e=0;if(i>0)c+=i,i=0;if(this.componentStore.plot.calculateSpace({width:h,height:c}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.legend.setBoundingBoxXY({x:s+h,y:n+Math.max((c-a.height)/2,0)}),this.componentStore.xAxis.setRange([s,s+h]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:n+c}),this.componentStore.yAxis.setRange([n,n+c]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some((f)=>mt(f)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,a=0,h={width:0,height:0},c=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),x=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:c,height:x});if(e-=f.width,i-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=f.height,i-=f.height,this.componentStore.xAxis.setAxisPosition("left"),f=this.componentStore.xAxis.calculateSpace({width:e,height:i}),e-=f.width,n=f.width,this.componentStore.yAxis.setAxisPosition("top"),f=this.componentStore.yAxis.calculateSpace({width:e,height:i}),i-=f.height,a=s+f.height,h=this.componentStore.legend.calculateSpace({width:e,height:x}),e-=h.width,e>0)c+=e,e=0;if(i>0)x+=i,i=0;if(this.componentStore.plot.calculateSpace({width:c,height:x}),this.componentStore.plot.setBoundingBoxXY({x:n,y:a}),this.componentStore.legend.setBoundingBoxXY({x:n+c,y:a+Math.max((x-h.height)/2,0)}),this.componentStore.yAxis.setRange([n,n+c]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:s}),this.componentStore.xAxis.setRange([a,a+x]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some((S)=>mt(S)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){if(this.chartConfig.chartOrientation==="horizontal")this.calculateHorizontalSpace();else this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let i of Object.values(this.componentStore))e.push(...i.getDrawableElements());return e}},Pe=class{static{t(this,"XYChartBuilder")}static build(e,i,s,n){return new ve(e,i,s,n).getDrawableElement()}},gt=0,Qt,ut=It(),dt=Et(),b=Mt(),vt=dt.plotColorPalette.split(",").map((e)=>e.trim()),yt=!1,Lt=!1;function Et(){let e=Xt(),i=E();return ue(e.xyChart,i.themeVariables.xyChart)}t(Et,"getChartDefaultThemeConfig");function It(){let e=E();return ue(Y.xyChart,e.xyChart)}t(It,"getChartDefaultConfig");function Mt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}t(Mt,"getChartDefaultData");function ot(e){let i=E();return te(e.trim(),i)}t(ot,"textSanitizer");function Kt(e){Qt=e}t(Kt,"setTmpSVGG");function Zt(e){if(e==="horizontal")ut.chartOrientation="horizontal";else ut.chartOrientation="vertical"}t(Zt,"setOrientation");function Jt(e){b.xAxis.title=ot(e.text)}t(Jt,"setXAxisTitle");function Bt(e,i){b.xAxis={type:"linear",title:b.xAxis.title,min:e,max:i},yt=!0}t(Bt,"setXAxisRangeData");function ee(e){b.xAxis={type:"band",title:b.xAxis.title,categories:e.map((i)=>ot(i.text))},yt=!0}t(ee,"setXAxisBand");function ie(e){b.yAxis.title=ot(e.text)}t(ie,"setYAxisTitle");function se(e,i){b.yAxis={type:"linear",title:b.yAxis.title,min:e,max:i},Lt=!0}t(se,"setYAxisRangeData");function ae(e){let i=Math.min(...e),s=Math.max(...e),n=lt(b.yAxis)?b.yAxis.min:1/0,a=lt(b.yAxis)?b.yAxis.max:-1/0;b.yAxis={type:"linear",title:b.yAxis.title,min:Math.min(n,i),max:Math.max(a,s)}}t(ae,"setYAxisRangeFromPlotData");function zt(e){let i=[];if(e.length===0)return i;if(!yt){let s=lt(b.xAxis)?b.xAxis.min:1/0,n=lt(b.xAxis)?b.xAxis.max:-1/0;Bt(Math.min(s,1),Math.max(n,e.length))}if(bt(b.xAxis)&&e.length>b.xAxis.categories.length)e=e.slice(0,b.xAxis.categories.length);if(!Lt)ae(e);if(bt(b.xAxis))i=b.xAxis.categories.map((s,n)=>[s,e[n]]);if(lt(b.xAxis)){let s=b.xAxis.min,n=b.xAxis.max;if(e.length===1)i=[[`${s}`,e[0]]];else{let a=(n-s)/(e.length-1);i=e.map((h,c)=>[`${s+c*a}`,h])}}return i}t(zt,"transformDataWithoutCategory");function Ot(e){return vt[e===0?0:e%vt.length]}t(Ot,"getPlotColorFromPalette");function oe(e,i){let s=i.map((c)=>c.value),n=i.map((c)=>c.label?ot(c.label):""),a=zt(s),h=n.some((c)=>c!=="");b.plots.push({type:"line",title:ot(e.text),strokeFill:Ot(gt),strokeWidth:2,data:a,...h?{pointLabels:n}:{}}),gt++}t(oe,"setLineData");function re(e,i){let s=i.map((a)=>a.value),n=zt(s);b.plots.push({type:"bar",title:ot(e.text),fill:Ot(gt),data:n}),gt++}t(re,"setBarData");function he(){if(b.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return b.title=H(),Pe.build(ut,b,dt,Qt)}t(he,"getDrawableElem");function le(){return dt}t(le,"getChartThemeConfig");function ce(){return ut}t(ce,"getChartConfig");function ge(){return b}t(ge,"getXYChartData");var Le=t(function(){F(),gt=0,ut=It(),b=Mt(),dt=Et(),vt=dt.plotColorPalette.split(",").map((e)=>e.trim()),yt=!1,Lt=!1},"clear"),Ee={getDrawableElem:he,clear:Le,setAccTitle:O,getAccTitle:G,setDiagramTitle:q,getDiagramTitle:H,getAccDescription:j,setAccDescription:z,setOrientation:Zt,setXAxisTitle:Jt,setXAxisRangeData:Bt,setXAxisBand:ee,setYAxisTitle:ie,setYAxisRangeData:se,setLineData:oe,setBarData:re,setTmpSVGG:Kt,getChartThemeConfig:le,getChartConfig:ce,getXYChartData:ge},Ie=t((e,i,s,n)=>{let a=n.db,h=a.getChartThemeConfig(),c=a.getChartConfig(),x=a.getXYChartData().plots[0].data.map((w)=>w[1]);function f(w){return w==="top"?"text-before-edge":"middle"}t(f,"getDominantBaseLine");function S(w){return w==="left"?"start":w==="right"?"end":"middle"}t(S,"getTextAnchor");function T(w){return`translate(${w.x}, ${w.y}) rotate(${w.rotation||0})`}t(T,"getTextTransformation"),l.debug(`Rendering xychart chart
7
+ `+e);let R=Ae(i),y=R.append("g").attr("class","main"),B=y.append("rect").attr("width",c.width).attr("height",c.height).attr("class","background");ne(R,c.height,c.width,!0),R.attr("viewBox",`0 0 ${c.width} ${c.height}`),B.attr("fill",h.backgroundColor),a.setTmpSVGG(R.append("g").attr("class","mermaid-tmp-group"));let P=a.getDrawableElem(),L={};function V(w){let X=y,u="";for(let[W]of w.entries()){let N=y;if(W>0&&L[u])N=L[u];if(u+=w[W],X=L[u],!X)X=L[u]=N.append("g").attr("class",w[W])}return X}t(V,"getGroup");for(let w of P){if(w.data.length===0)continue;let X=V(w.groupTexts);switch(w.type){case"rect":if(X.selectAll("rect").data(w.data).enter().append("rect").attr("x",(u)=>u.x).attr("y",(u)=>u.y).attr("width",(u)=>u.width).attr("height",(u)=>u.height).attr("fill",(u)=>u.fill).attr("stroke",(u)=>u.strokeFill).attr("stroke-width",(u)=>u.strokeWidth),c.showDataLabel){let u=c.showDataLabelOutsideBar;if(c.chartOrientation==="horizontal"){let W=function(k,J){let{data:_,label:U}=k;return J*U.length*N<=_.width-A};var Z=W;t(W,"fitsHorizontally");let N=0.7,A=10,it=w.data.map((k,J)=>({data:k,label:x[J].toString()})).filter((k)=>k.data.width>0&&k.data.height>0),I=it.map((k)=>{let{data:J}=k,_=J.height*0.7;while(!W(k,_)&&_>0)_-=1;return _}),rt=Math.floor(Math.min(...I)),D=t((k)=>{if(u)return k.data.x+k.data.width+A;else return k.data.x+k.data.width-A},"determineLabelXPosition");X.selectAll("text").data(it).enter().append("text").attr("x",D).attr("y",(k)=>k.data.y+k.data.height/2).attr("text-anchor",u?"start":"end").attr("dominant-baseline","middle").attr("fill",h.dataLabelColor).attr("font-size",`${rt}px`).text((k)=>k.label)}else{let W=function(D,k,J){let{data:_,label:U}=D,r=0.7,g=k*U.length*0.7,d=_.x+_.width/2,p=d-g/2,C=d+g/2,o=p>=_.x&&C<=_.x+_.width,st=_.y+J+k<=_.y+_.height;return o&&st};var tt=W;t(W,"fitsInBar");let N=10,A=w.data.map((D,k)=>({data:D,label:x[k].toString()})).filter((D)=>D.data.width>0&&D.data.height>0),it=A.map((D)=>{let{data:k,label:J}=D,_=k.width/(J.length*0.7);while(!W(D,_,N)&&_>0)_-=1;return _}),I=Math.floor(Math.min(...it)),rt=t((D)=>{if(u)return D.data.y-N;else return D.data.y+N},"determineLabelYPosition");X.selectAll("text").data(A).enter().append("text").attr("x",(D)=>D.data.x+D.data.width/2).attr("y",rt).attr("text-anchor","middle").attr("dominant-baseline",u?"auto":"hanging").attr("fill",h.dataLabelColor).attr("font-size",`${I}px`).text((D)=>D.label)}}break;case"text":X.selectAll("text").data(w.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",(u)=>u.fill).attr("font-size",(u)=>u.fontSize).attr("dominant-baseline",(u)=>f(u.verticalPos)).attr("text-anchor",(u)=>S(u.horizontalPos)).attr("transform",(u)=>T(u)).text((u)=>u.text);break;case"path":X.selectAll("path").data(w.data).enter().append("path").attr("d",(u)=>u.path).attr("fill",(u)=>u.fill?u.fill:"none").attr("stroke",(u)=>u.strokeFill).attr("stroke-width",(u)=>u.strokeWidth);break}}},"draw"),Me={draw:Ie},Ke={parser:me,db:Ee,renderer:Me};export{Ke as diagram};
@@ -0,0 +1 @@
1
+ import{mA}from"./index-fsa18ns9.js";export{mA as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kabmo-labs/kabmo",
3
- "version": "0.58.1",
3
+ "version": "0.59.1",
4
4
  "description": "Web console and diagnostic workbench for AI coding agents: Elysia + Preact on Bun.",
5
5
  "license": "MIT",
6
6
  "author": "Wijanarko Putra Rajeb <wijanarko.rajeb@gmail.com>",
@@ -104,23 +104,23 @@
104
104
  "tailwindcss": "^4.1.14",
105
105
  "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz",
106
106
  "yaml": "^2.9.1",
107
- "@kabmo-labs/kabmo-acp": "1.2.1",
108
- "@kabmo-labs/kabmo-app-contracts": "1.1.0",
107
+ "@kabmo-labs/kabmo-acp": "1.2.2",
108
+ "@kabmo-labs/kabmo-app-contracts": "1.2.0",
109
109
  "@kabmo-labs/kabmo-auth": "1.0.0",
110
110
  "@kabmo-labs/kabmo-bytes": "1.0.0",
111
- "@kabmo-labs/kabmo-chat": "1.3.1",
111
+ "@kabmo-labs/kabmo-chat": "1.3.2",
112
112
  "@kabmo-labs/kabmo-db": "1.0.0",
113
113
  "@kabmo-labs/kabmo-format": "1.0.0",
114
114
  "@kabmo-labs/kabmo-fs": "1.0.0",
115
115
  "@kabmo-labs/kabmo-git": "1.0.0",
116
116
  "@kabmo-labs/kabmo-guards": "1.0.0",
117
- "@kabmo-labs/kabmo-harness": "1.1.1",
117
+ "@kabmo-labs/kabmo-harness": "1.1.2",
118
118
  "@kabmo-labs/kabmo-http": "1.0.0",
119
119
  "@kabmo-labs/kabmo-idle-reaper": "1.0.0",
120
120
  "@kabmo-labs/kabmo-live-sessions": "1.0.0",
121
121
  "@kabmo-labs/kabmo-mcp-contracts": "1.0.0",
122
122
  "@kabmo-labs/kabmo-model-contracts": "1.0.0",
123
- "@kabmo-labs/kabmo-omp": "1.2.0",
123
+ "@kabmo-labs/kabmo-omp": "1.3.0",
124
124
  "@kabmo-labs/kabmo-paths": "1.0.0",
125
125
  "@kabmo-labs/kabmo-platform": "1.0.0",
126
126
  "@kabmo-labs/kabmo-process": "1.0.0",
@@ -133,7 +133,7 @@
133
133
  "@kabmo-labs/kabmo-session": "1.0.0",
134
134
  "@kabmo-labs/kabmo-settings": "1.0.0",
135
135
  "@kabmo-labs/kabmo-ui": "0.0.5",
136
- "@kabmo-labs/kabmo-workspace": "1.0.0",
136
+ "@kabmo-labs/kabmo-workspace": "1.1.0",
137
137
  "@kabmo-labs/kabmo-worktree": "1.0.0"
138
138
  },
139
139
  "devDependencies": {
@@ -45,7 +45,7 @@
45
45
  * status), `ring-*` (a focus or drop-target ring is not a border), and
46
46
  * `border-dashed` (a drop zone's 1px box IS its affordance).
47
47
  *
48
- * **Form controls are exempt, and only form controls.** A field with no edge is
48
+ * **Form controls are exempt by tag.** A field with no edge is
49
49
  * not a calmer field: measured on the running app, the settings search box and
50
50
  * every `border-ink/20` input composite to the paper behind them, and the
51
51
  * control disappears. `input`, `textarea`, `select`, `kbd` and the switch knob
@@ -54,6 +54,18 @@
54
54
  * `glass.css` already learned with the switch knob, where the restore rule lost
55
55
  * a specificity race and every knob painted nothing.
56
56
  *
57
+ * **The chat transcript keeps its rules too.** In the timeline the rung IS the
58
+ * content's structure rather than the chrome's: a thinking block and a tool
59
+ * call are cards, their bodies are separated by a `border-t`, and a `trace` /
60
+ * `tui` body hangs off a `border-l` rail. Cleared, those blocks merge into one
61
+ * text wall and a collapsed run stops reading as a sequence of steps — the
62
+ * reported "border thinking/tool ikut hilang, baris juga". So every clearing
63
+ * rule excludes the `[data-chat-timeline]` subtree (`ChatTimeline`,
64
+ * `EmptyWorkspacePrompt`), and the transcript is the one surface the setting
65
+ * does not reach. That is also why the exclusion is a SUBTREE and not a list of
66
+ * block classes: tool renderers are ~70 files and plugins add more, so a list
67
+ * would leave the next renderer in the borderless shell.
68
+ *
57
69
  * **Specificity and order are load-bearing.** These rules are UNLAYERED, so they
58
70
  * beat Tailwind's `@layer utilities`; they are imported AFTER `glass.css`, so
59
71
  * they also win the (0,2,0) tie with `[data-surface="glass"] .glass-chrome` and
@@ -92,7 +104,7 @@
92
104
  [role="switch"],
93
105
  [contenteditable="true"],
94
106
  .border-dashed
95
- ) {
107
+ ):not([data-chat-timeline], [data-chat-timeline] *) {
96
108
  border-color: transparent;
97
109
  }
98
110
 
@@ -109,7 +121,7 @@
109
121
  .divide-ink\/12,
110
122
  .divide-ink\/15,
111
123
  .divide-ink\/20
112
- ) > :not(:last-child) {
124
+ ):not([data-chat-timeline], [data-chat-timeline] *) > :not(:last-child) {
113
125
  border-color: transparent;
114
126
  }
115
127
 
@@ -62,7 +62,7 @@ afterAll(() => {
62
62
  restoreDomGlobals();
63
63
  });
64
64
 
65
- function mount(): HTMLTextAreaElement {
65
+ function mount(options: { placeholder?: string } = {}): HTMLTextAreaElement {
66
66
  function Probe() {
67
67
  const [value, setValue] = useState('');
68
68
  draft.value = value;
@@ -72,6 +72,7 @@ function mount(): HTMLTextAreaElement {
72
72
  onSend: () => {},
73
73
  sessionId: 'session-1',
74
74
  enablePicker: false,
75
+ placeholder: options.placeholder,
75
76
  });
76
77
  }
77
78
  container = document.body.appendChild(document.createElement('div'));
@@ -107,3 +108,14 @@ describe('ComposerTextarea prompt recall', () => {
107
108
  expect(textarea.value).toBe('recalled prompt');
108
109
  });
109
110
  });
111
+
112
+ describe('ComposerTextarea placeholder', () => {
113
+ test('is dropped once the caret is in the box and restored on blur', () => {
114
+ const textarea = mount({ placeholder: 'Ask anything' });
115
+ expect(textarea.getAttribute('placeholder')).toBe('Ask anything');
116
+ act(() => textarea.focus());
117
+ expect(textarea.getAttribute('placeholder')).toBe('');
118
+ act(() => textarea.blur());
119
+ expect(textarea.getAttribute('placeholder')).toBe('Ask anything');
120
+ });
121
+ });
@@ -1,4 +1,4 @@
1
- import { useRef } from 'preact/hooks';
1
+ import { useRef, useState } from 'preact/hooks';
2
2
  import type { ClipboardEvent, KeyboardEvent, ReactElement, RefObject } from 'preact/compat';
3
3
  import { useComposerTrigger } from '@/client/hooks/chat/composer';
4
4
  import { useComposerHistory } from '@/client/hooks/chat/composer/history';
@@ -92,6 +92,10 @@ export function ComposerTextarea({
92
92
  const isMobile = variant === 'mobile';
93
93
  const textareaRef = useRef<HTMLTextAreaElement>(null);
94
94
  const wrapperRef = useRef<HTMLDivElement>(null);
95
+ // The hint belongs to the resting box. A native placeholder survives focus
96
+ // and then sits under the caret, reading as draft text; it is dropped the
97
+ // moment the box is focused and comes back on blur while the draft is empty.
98
+ const [focused, setFocused] = useState(false);
95
99
  // Two owners, one node: the picker needs the element to place the caret after
96
100
  // a completion, and a caller may need it to measure the box.
97
101
  const setTextareaRef = (node: HTMLTextAreaElement | null) => {
@@ -159,8 +163,10 @@ export function ComposerTextarea({
159
163
  onCompositionEnd={composer.handleCompositionEnd}
160
164
  onKeyDown={handleKeyDown}
161
165
  onPaste={onPaste}
166
+ onFocus={() => setFocused(true)}
167
+ onBlur={() => setFocused(false)}
162
168
  disabled={disabled}
163
- placeholder={placeholder}
169
+ placeholder={focused ? '' : placeholder}
164
170
  enterkeyhint={isMobile ? 'enter' : undefined}
165
171
  className={className}
166
172
  aria-autocomplete="list"
@@ -36,6 +36,8 @@ import { DIRECTIVE_BLOCK_CLASS } from '@/shared/lib/markdown/directives';
36
36
  import { hydrateDirectiveBlocks, unmountDirectiveBlocks } from '@/client/lib/plugins/directives';
37
37
  import { useLocalImageSources, useMathHydration, useMermaidHydration } from '@/client/hooks/ui/markdown-hydration';
38
38
  import { useRenderedMarkdown } from '@/client/hooks/ui/markdown-render';
39
+ import { markInlineFileChips } from '@/shared/lib/markdown/inline-file';
40
+ import { useVerifiedInlineFiles } from '@/client/hooks/ui/verified-inline-files';
39
41
  import { useDirectiveContext, useDirectiveRenderer } from '@/client/hooks/workspace/directives';
40
42
  import { copyFromButton } from '@/client/hooks/ui/clipboard';
41
43
  import { activateInlineFileChip } from '@/client/hooks/ui/open-inline-file';
@@ -154,7 +156,14 @@ export function MarkdownRenderer({
154
156
  sessionId,
155
157
  });
156
158
 
157
- const { html, blocks } = rendered;
159
+ const { html, blocks, references } = rendered;
160
+ const verifiedFiles = useVerifiedInlineFiles(references);
161
+ // Attributes on the existing nodes, never a second `innerHTML`: replacing it
162
+ // after hydration would discard KaTeX, mermaid SVGs and directive trees.
163
+ useIsomorphicLayoutEffect(() => {
164
+ const container = containerRef.current;
165
+ if (container) markInlineFileChips(container, verifiedFiles);
166
+ }, [html, verifiedFiles]);
158
167
 
159
168
  // The caller stores judgements against these, so it has to know what the
160
169
  // render actually produced — never what the file contains (a healed or
@@ -283,7 +292,7 @@ export function MarkdownRenderer({
283
292
  return;
284
293
  }
285
294
 
286
- // Inline code that names a file. The marker (`markInlineFilePaths`) put
295
+ // Inline code that names a file. The marker (`markInlineFileChips`) put
287
296
  // `data-file-path` on the span; a drag that ends on a chip is a selection
288
297
  // being finished, not a click, and opening a tab then would destroy it.
289
298
  const chip = (e.target as HTMLElement).closest<HTMLElement>('code[data-file-path]');
@@ -96,10 +96,6 @@ describe('harness glyph', () => {
96
96
  const svg = el.querySelector('svg');
97
97
  expect(svg?.getAttribute('width')).toBe(String(HARNESS_GLYPH_SIZE.touch));
98
98
  expect(HARNESS_GLYPH_SIZE.compact).toBeLessThan(HARNESS_GLYPH_SIZE.touch);
99
- // The composer's tab strip is a PRIMARY control: its mark is larger than a
100
- // session row's, and its own size rather than a reuse of `touch`, so growing
101
- // the sidebar can never silently shrink the tabs.
102
- expect(HARNESS_GLYPH_SIZE.tab).toBeGreaterThan(HARNESS_GLYPH_SIZE.touch);
103
99
  });
104
100
  });
105
101
 
@@ -138,10 +138,9 @@ export function HarnessGlyph({ harness, size = 12, className = '', inherit = fal
138
138
  *
139
139
  * - `compact` — a desktop session row, where the mark sits in a 12px slot
140
140
  * beside a 12px name and the row's height is already fixed by its density.
141
+ * The composer's harness tabs use this SAME size: a tab's mark sits in the
142
+ * model list it selects, so a larger tab mark read as a different glyph
143
+ * between two surfaces.
141
144
  * - `touch` — a phone session row, one pixel larger for a finger.
142
- * - `tab` — the composer's harness tab strip. Deliberately its OWN size: the
143
- * strip is a primary control with three to five visible tabs, and the tab is
144
- * the mark ALONE — no label beside it to carry the identity — so the mark is
145
- * sized as a standalone control glyph rather than as a supplement to text.
146
145
  */
147
- export const HARNESS_GLYPH_SIZE = { compact: 12, touch: 13, tab: 18 } as const;
146
+ export const HARNESS_GLYPH_SIZE = { compact: 12, touch: 13 } as const;