@kabmo-labs/kabmo 0.36.0 → 0.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +2 -2
  3. package/dist/client/static/js/{CsvGrid-1h3bcak7.js → CsvGrid-xb429wvb.js} +2 -2
  4. package/dist/client/static/js/{DocxView-ndca8jch.js → DocxView-g58e0bs7.js} +1 -1
  5. package/dist/client/static/js/{DrawioView-kpzd6y0b.js → DrawioView-1j66avvy.js} +2 -2
  6. package/dist/client/static/js/{ImageView-79prn3dg.js → ImageView-kraqkypn.js} +1 -1
  7. package/dist/client/static/js/{LayoutWrapper-v2wn2sb2.js → LayoutWrapper-85dhbn62.js} +2 -2
  8. package/dist/client/static/js/{Modal-99j0zz3z.js → Modal-f0nfya07.js} +4 -4
  9. package/dist/client/static/js/{PdfView-2rjd87ay.js → PdfView-nddkrky9.js} +1 -1
  10. package/dist/client/static/js/{SessionsView-t7f3s71b.js → SessionsView-a595m6g1.js} +1 -1
  11. package/dist/client/static/js/{SheetView-ehb976st.js → SheetView-s2p4sk6b.js} +4 -4
  12. package/dist/client/static/js/{SvgPreview-de2bbba6.js → SvgPreview-ppdx4yb9.js} +1 -1
  13. package/dist/client/static/js/{abnfDiagram-O67JEVCF-nx9jzn7m.js → abnfDiagram-O67JEVCF-5cjzxcaq.js} +1 -1
  14. package/dist/client/static/js/architecture-7GRP2DOG-7ewrw5vc.js +1 -0
  15. package/dist/client/static/js/{architectureDiagram-NJMV4G6O-170v67rr.js → architectureDiagram-NJMV4G6O-62mygavm.js} +2 -2
  16. package/dist/client/static/js/{blockDiagram-BEXU5L5S-16q285n1.js → blockDiagram-BEXU5L5S-s5yz9hcd.js} +1 -1
  17. package/dist/client/static/js/{c4Diagram-YGBWAQC7-rn3qt45h.js → c4Diagram-YGBWAQC7-rf9xkmrm.js} +1 -1
  18. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-r26wg74e.js → classDiagram-v2-NBCMYWYE-zfm2cj2a.js} +1 -1
  19. package/dist/client/static/js/{cose-bilkent-JH36ORCC-82kwe7ha.js → cose-bilkent-JH36ORCC-fmgpv55e.js} +1 -1
  20. package/dist/client/static/js/cynefin-OW5HDTMX-yyyx3px0.js +1 -0
  21. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-tcxdn6pa.js → cynefinDiagram-VND7K2PF-468r5xc2.js} +1 -1
  22. package/dist/client/static/js/{dagre-6A5THRUB-g833ata3.js → dagre-6A5THRUB-w370qmgj.js} +2 -2
  23. package/dist/client/static/js/{diagram-22UHCM2B-f1fq8xec.js → diagram-22UHCM2B-sfvfjjsy.js} +1 -1
  24. package/dist/client/static/js/{diagram-3UASUU5V-6j2w016f.js → diagram-3UASUU5V-3r2c8s14.js} +1 -1
  25. package/dist/client/static/js/{diagram-ATOU4E4O-6t2qxsk4.js → diagram-ATOU4E4O-yathy97a.js} +1 -1
  26. package/dist/client/static/js/{diagram-CDSNMT55-7abar8s7.js → diagram-CDSNMT55-kk437kxq.js} +1 -1
  27. package/dist/client/static/js/{diagram-MLGK6HIB-s68rgy16.js → diagram-MLGK6HIB-qdxfjjhf.js} +1 -1
  28. package/dist/client/static/js/{diagram-MPIPVDR6-azgkm6w8.js → diagram-MPIPVDR6-dfqeqa1d.js} +1 -1
  29. package/dist/client/static/js/{dockerfile-47e33kqa.js → dockerfile-yxrt509r.js} +1 -1
  30. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-esrjz750.js → ebnfDiagram-ZINNZB2B-s0b0vv4k.js} +1 -1
  31. package/dist/client/static/js/{elk-276RUBZZ-fhr4b4jj.js → elk-276RUBZZ-mtpw0spa.js} +1 -1
  32. package/dist/client/static/js/{erDiagram-OPXOYQCR-5r3fmdnz.js → erDiagram-OPXOYQCR-agjdsm1b.js} +1 -1
  33. package/dist/client/static/js/{erlang-bh5cbm8m.js → erlang-6m6tpt72.js} +1 -1
  34. package/dist/client/static/js/eventmodeling-NTZA5JFV-cx3ztxfz.js +1 -0
  35. package/dist/client/static/js/flowDiagram-KWPJA3E3-267mw6sv.js +1 -0
  36. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-j4pf6rdn.js → ganttDiagram-FUAMR5RP-z6ywqqc1.js} +1 -1
  37. package/dist/client/static/js/gitGraph-4MIJSDKK-eg9r85ak.js +1 -0
  38. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-x5epk0gr.js → gitGraphDiagram-X574FWY7-bvbmfw6h.js} +1 -1
  39. package/dist/client/static/js/graphql-skw5krjr.js +1 -0
  40. package/dist/client/static/js/{index-k1xt92h4.js → index-059qyaj0.js} +1 -1
  41. package/dist/client/static/js/{index-6xzfta4b.js → index-09gx6edj.js} +1 -1
  42. package/dist/client/static/js/{index-c09a5s1n.js → index-0mvcbbmy.js} +7 -7
  43. package/dist/client/static/js/{index-sar2ggde.js → index-0sqa91wb.js} +1 -1
  44. package/dist/client/static/js/{index-v8qd8ypc.js → index-15zn3sns.js} +2 -2
  45. package/dist/client/static/js/{index-7r1hw2gd.js → index-1tyvk778.js} +1 -1
  46. package/dist/client/static/js/{index-3vdmwpbh.js → index-21b3zyrd.js} +2 -2
  47. package/dist/client/static/js/{index-ctgefatv.js → index-302d35e5.js} +10 -10
  48. package/dist/client/static/js/{index-5rzk1226.js → index-49dhv8ry.js} +1 -1
  49. package/dist/client/static/js/{index-44qrckd2.js → index-5fn0agag.js} +1 -1
  50. package/dist/client/static/js/{index-zdtsvnpq.js → index-64mb65wx.js} +1 -1
  51. package/dist/client/static/js/{index-mm1rf116.js → index-6q80csr0.js} +1 -1
  52. package/dist/client/static/js/{index-zp73zexp.js → index-72t6kqjx.js} +2 -2
  53. package/dist/client/static/js/{index-8cy3x2y8.js → index-7fdp9c7m.js} +2 -2
  54. package/dist/client/static/js/{index-9gf8b73w.js → index-7sa2e8mn.js} +1 -1
  55. package/dist/client/static/js/{index-c1j0xb0w.js → index-83ts8zmk.js} +1 -1
  56. package/dist/client/static/js/{index-ye450a7z.js → index-8e0s9p45.js} +1 -1
  57. package/dist/client/static/js/{index-982jyfsb.js → index-a0bdavdr.js} +2 -2
  58. package/dist/client/static/js/{index-8e15fzax.js → index-actppd4z.js} +1 -1
  59. package/dist/client/static/js/{index-h1e1abpt.js → index-cx89yk15.js} +2 -2
  60. package/dist/client/static/js/{index-w3n97x4b.js → index-dt7e1328.js} +2 -2
  61. package/dist/client/static/js/{index-be6gevq8.js → index-es3pt29g.js} +1 -1
  62. package/dist/client/static/js/{index-af24nes6.js → index-gbfg0anm.js} +2 -2
  63. package/dist/client/static/js/{index-55pqvh82.js → index-h7pn9qw6.js} +2 -2
  64. package/dist/client/static/js/{index-5kjpacvd.js → index-hbtk0c12.js} +1 -1
  65. package/dist/client/static/js/{index-nws03exw.js → index-j7r414hf.js} +1 -1
  66. package/dist/client/static/js/{index-40ve7zzv.js → index-jpkj6vqp.js} +1 -1
  67. package/dist/client/static/js/{index-0b1kwsam.js → index-k06med7d.js} +28 -28
  68. package/dist/client/static/js/{index-3kgrcaq1.js → index-kzhtmrh0.js} +1 -1
  69. package/dist/client/static/js/{index-q5t4sy22.js → index-m3j5yx5f.js} +2 -2
  70. package/dist/client/static/js/{index-skm6k5w2.js → index-m87yykre.js} +2 -2
  71. package/dist/client/static/js/{index-63c6t75t.js → index-nmc30xaz.js} +1 -1
  72. package/dist/client/static/js/{index-ktvbsj6w.js → index-ntxm8pw3.js} +1 -1
  73. package/dist/client/static/js/{index-htt8qxm3.js → index-pd0140dx.js} +1 -1
  74. package/dist/client/static/js/{index-dmgawfhw.js → index-qkscve6n.js} +2 -2
  75. package/dist/client/static/js/{index-v5t761a1.js → index-qz8mbxm9.js} +1 -1
  76. package/dist/client/static/js/{index-75haaj8g.js → index-qznwd6g8.js} +157 -157
  77. package/dist/client/static/js/{index-63jbb4kf.js → index-sa9cp6km.js} +2 -2
  78. package/dist/client/static/js/{index-60ceydzn.js → index-sezz011q.js} +1 -1
  79. package/dist/client/static/js/{index-pyx8n25s.js → index-t07b31ny.js} +2 -2
  80. package/dist/client/static/js/index-tcegdd2t.js +1 -0
  81. package/dist/client/static/js/{index-d2km9egp.js → index-w9zxmev3.js} +4 -4
  82. package/dist/client/static/js/{index-b48p8d1j.js → index-we1rpftn.js} +2 -2
  83. package/dist/client/static/js/{index-ky0prc71.js → index-xearvz2z.js} +3 -3
  84. package/dist/client/static/js/{index-r8pckaqe.js → index-xya34x4v.js} +2 -2
  85. package/dist/client/static/js/{index-ydvfc9td.js → index-z0frtyje.js} +1 -1
  86. package/dist/client/static/js/{index-97t3mv1v.js → index-z7qnffwj.js} +1 -1
  87. package/dist/client/static/js/info-A6RAGUB7-7qhah7fs.js +1 -0
  88. package/dist/client/static/js/{infoDiagram-VRGFBTTK-ktc8nb8g.js → infoDiagram-VRGFBTTK-58bv28d4.js} +1 -1
  89. package/dist/client/static/js/ini-cg0a5wm3.js +1 -0
  90. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-n3dk6227.js → ishikawaDiagram-OU5B5YK6-tz6b0caw.js} +1 -1
  91. package/dist/client/static/js/java-vcck089n.js +1 -0
  92. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-f0p1h8qn.js → journeyDiagram-ZHPQQLJL-ydamm17a.js} +2 -2
  93. package/dist/client/static/js/jsx-ht9zyzwa.js +1 -0
  94. package/dist/client/static/js/{julia-73zjh2w6.js → julia-v7j460gw.js} +1 -1
  95. package/dist/client/static/js/{kanban-definition-PNTS6WVX-7jdt7dv1.js → kanban-definition-PNTS6WVX-7jxfsf17.js} +1 -1
  96. package/dist/client/static/js/lua-ke895s2q.js +1 -0
  97. package/dist/client/static/js/markdown-gwmsh53r.js +1 -0
  98. package/dist/client/static/js/{mermaid.core-e8rzrjt9.js → mermaid.core-vty0aq6f.js} +6 -6
  99. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-7shv6ge0.js → mindmap-definition-NLK3R4M7-ra4wrts4.js} +2 -2
  100. package/dist/client/static/js/one-dark-pro-2pywnqrh.js +1 -0
  101. package/dist/client/static/js/one-light-vfgdt4wf.js +1 -0
  102. package/dist/client/static/js/packet-AYTQ26CC-ag2g7tbk.js +1 -0
  103. package/dist/client/static/js/{pegDiagram-GJSIUBJH-17ak2zx3.js → pegDiagram-GJSIUBJH-ydjcfea9.js} +1 -1
  104. package/dist/client/static/js/{perl-8z46dmze.js → perl-gg4jdkcr.js} +1 -1
  105. package/dist/client/static/js/{php-6qvnp2t6.js → php-2q8fm6k8.js} +1 -1
  106. package/dist/client/static/js/pie-WAS4IAKB-nqcyj3x1.js +1 -0
  107. package/dist/client/static/js/{pieDiagram-5QR66LMP-at4x1g4q.js → pieDiagram-5QR66LMP-wh04y7wp.js} +1 -1
  108. package/dist/client/static/js/properties-mzvvbqg5.js +1 -0
  109. package/dist/client/static/js/python-3w64wsyd.js +1 -0
  110. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-apzhwrn4.js → quadrantDiagram-O4NWA36T-4mhbag8n.js} +1 -1
  111. package/dist/client/static/js/r-32re2zwb.js +1 -0
  112. package/dist/client/static/js/radar-RG4KPBEZ-60gby7be.js +1 -0
  113. package/dist/client/static/js/railroad-74A4TZTK-cnkmcjse.js +1 -0
  114. package/dist/client/static/js/railroad-abnf-HS5TGJTU-qgfdnazd.js +1 -0
  115. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-609h6cpx.js +1 -0
  116. package/dist/client/static/js/railroad-peg-WCYAUIDC-xqnytjhg.js +1 -0
  117. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-rw8cj5f3.js → railroadDiagram-XR7U4H2S-pagmr4hc.js} +1 -1
  118. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-qyrse7mb.js → requirementDiagram-PLB6GJNP-jhfhp4eq.js} +1 -1
  119. package/dist/client/static/js/{ruby-qy8mhstq.js → ruby-vag6a82m.js} +1 -1
  120. package/dist/client/static/js/{rust-fpshqnk0.js → rust-yntkm6hw.js} +1 -1
  121. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-254qr59q.js → sankeyDiagram-IPEJSGJF-qrfxzvp3.js} +1 -1
  122. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-y9xjxfc5.js → sequenceDiagram-PO4LG4MO-fpznwnva.js} +3 -3
  123. package/dist/client/static/js/{sizeCapture-INFHLROL-sc5e60t3.js → sizeCapture-INFHLROL-3hz930jg.js} +1 -1
  124. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-r134s4xr.js → stateDiagram-v2-GCMORJYK-2m99syxm.js} +2 -2
  125. package/dist/client/static/js/{swimlanes-2SLR337P-xc7rbawt.js → swimlanes-2SLR337P-hmhd360r.js} +1 -1
  126. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-a8b7z74e.js +8 -0
  127. package/dist/client/static/js/{timeline-definition-EJHVYXUP-cgjd8shk.js → timeline-definition-EJHVYXUP-765y3ssa.js} +1 -1
  128. package/dist/client/static/js/treeView-Q6P3EWNA-8djqab8k.js +1 -0
  129. package/dist/client/static/js/treemap-WGGIJYW6-hdztnffk.js +1 -0
  130. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-9qsmjhm6.js → usecaseDiagram-POWQR4AR-rex2j507.js} +1 -1
  131. package/dist/client/static/js/{vennDiagram-UO4OBE2U-4grw9awx.js → vennDiagram-UO4OBE2U-wd51qq26.js} +1 -1
  132. package/dist/client/static/js/wardley-WFR3VGLG-avby77vv.js +1 -0
  133. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-8gxy0wat.js → wardleyDiagram-VNRHLVJA-6jdqn8f7.js} +1 -1
  134. package/dist/client/static/js/xml-81hxjjt4.js +1 -0
  135. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-5sh7tdrx.js → xychartDiagram-PMCCYNJV-kcz8y04e.js} +2 -2
  136. package/dist/client/static/js/yaml-yssayv8a.js +1 -0
  137. package/package.json +1 -1
  138. package/src/client/components/settings/apply-side-effects.test.ts +5 -4
  139. package/src/client/hooks/ui/icon-style.ts +7 -4
  140. package/src/client/hooks/ui/style-attributes.test.ts +11 -11
  141. package/src/client/hooks/ui/surface-style.ts +8 -5
  142. package/src/server/lib/assets/shell-attributes.server.ts +12 -9
  143. package/src/server/lib/assets/shell-attributes.test.ts +18 -13
  144. package/src/shared/lib/icons/icon-paint-authority.ts +5 -3
  145. package/src/shared/lib/theme/icon-style.test.ts +8 -5
  146. package/src/shared/lib/theme/icon-style.ts +15 -7
  147. package/src/shared/lib/theme/surface-style.test.ts +8 -5
  148. package/src/shared/lib/theme/surface-style.ts +17 -7
  149. package/src/shared/lib/workspace/sidebar-style.test.ts +7 -8
  150. package/src/shared/lib/workspace/sidebar-style.ts +7 -8
  151. package/dist/client/static/js/architecture-7GRP2DOG-aqft2erp.js +0 -1
  152. package/dist/client/static/js/cynefin-OW5HDTMX-v2sz60t6.js +0 -1
  153. package/dist/client/static/js/eventmodeling-NTZA5JFV-8qbefe4m.js +0 -1
  154. package/dist/client/static/js/flowDiagram-KWPJA3E3-krsvgcq7.js +0 -1
  155. package/dist/client/static/js/gitGraph-4MIJSDKK-9bx1a38k.js +0 -1
  156. package/dist/client/static/js/graphql-xnpp5gn9.js +0 -1
  157. package/dist/client/static/js/index-dh1vd0d9.js +0 -1
  158. package/dist/client/static/js/info-A6RAGUB7-j51t7jhh.js +0 -1
  159. package/dist/client/static/js/ini-ygfyhprj.js +0 -1
  160. package/dist/client/static/js/java-gm49vw59.js +0 -1
  161. package/dist/client/static/js/jsx-ksxw1byz.js +0 -1
  162. package/dist/client/static/js/lua-53gzb9bx.js +0 -1
  163. package/dist/client/static/js/markdown-tk3cd3vs.js +0 -1
  164. package/dist/client/static/js/one-dark-pro-39bt34v9.js +0 -1
  165. package/dist/client/static/js/one-light-xec0sehr.js +0 -1
  166. package/dist/client/static/js/packet-AYTQ26CC-n83gfj2g.js +0 -1
  167. package/dist/client/static/js/pie-WAS4IAKB-5c5pctwz.js +0 -1
  168. package/dist/client/static/js/properties-2tcybqjk.js +0 -1
  169. package/dist/client/static/js/python-qph3dntq.js +0 -1
  170. package/dist/client/static/js/r-gd26x93y.js +0 -1
  171. package/dist/client/static/js/radar-RG4KPBEZ-52e5n99a.js +0 -1
  172. package/dist/client/static/js/railroad-74A4TZTK-44nqxxpy.js +0 -1
  173. package/dist/client/static/js/railroad-abnf-HS5TGJTU-25jxgwg7.js +0 -1
  174. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-64pqpf2y.js +0 -1
  175. package/dist/client/static/js/railroad-peg-WCYAUIDC-0p5sxzpx.js +0 -1
  176. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-kdcdamkj.js +0 -8
  177. package/dist/client/static/js/treeView-Q6P3EWNA-8j14nnd1.js +0 -1
  178. package/dist/client/static/js/treemap-WGGIJYW6-esf993kk.js +0 -1
  179. package/dist/client/static/js/wardley-WFR3VGLG-v4dxm2sb.js +0 -1
  180. package/dist/client/static/js/xml-0py2vkw7.js +0 -1
  181. package/dist/client/static/js/yaml-vghdz0f0.js +0 -1
@@ -1,7 +1,7 @@
1
- import{t,l,Mt,K,E,X,te,R,L,z,O,U,j,G,ai,On,Cs,de,oe,Ef}from"./index-ctgefatv.js";import{na}from"./index-9gf8b73w.js";function _t(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 gt(){var e=On().unknown(void 0),{domain:i,range:s}=e,n=0,a=1,h,c,x=!1,f=0,S=0,D=0.5;delete e.unknown;function _(){var y=i().length,F=a<n,I=F?a:n,M=F?n:a;if(h=(M-I)/Math.max(1,y-f+S*2),x)h=Math.floor(h);if(I+=(M-I-h*(y-f))*D,c=h*(1-f),x)I=Math.round(I),c=Math.round(c);var W=_t(y).map(function(J){return I+h*J});return s(F?W.reverse():W)}return e.domain=function(y){return arguments.length?(i(y),_()):i()},e.range=function(y){return arguments.length?([n,a]=y,n=+n,a=+a,_()):[n,a]},e.rangeRound=function(y){return[n,a]=y,n=+n,a=+a,x=!0,_()},e.bandwidth=function(){return c},e.step=function(){return h},e.round=function(y){return arguments.length?(x=!!y,_()):x},e.padding=function(y){return arguments.length?(f=Math.min(1,S=+y),_()):f},e.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),_()):f},e.paddingOuter=function(y){return arguments.length?(S=+y,_()):S},e.align=function(y){return arguments.length?(D=Math.max(0,Math.min(1,y)),_()):D},e.copy=function(){return gt(i(),[n,a]).round(x).paddingInner(f).paddingOuter(S).align(D)},ai.apply(_(),arguments)}var Tt=function(){var e=t(function(q,r,g,d){for(g=g||{},d=q.length;d--;g[q[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],D=[1,28],_=[1,29],y=[1,30],F=[1,31],I=[1,32],M=[1,33],W=[1,34],J=[1,35],et=[1,36],w=[1,37],Y=[1,43],u=[1,42],N=[1,47],H=[1,50],A=[1,10,12,14,16,18,19,21,23,36,37,38],st=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],B=[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],ht=[1,65],v=[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,nt){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:D,43:_,44:y,45:F,46:I,47:M,48:W,49:J,50:et,51:w},{11:39,13:38,24:Y,29:u,30:f,31:40,32:41,39:24,40:S,41:27,42:D,43:_,44:y,45:F,46:I,47:M,48:W,49:J,50:et,51:w},{11:45,15:44,29:N,30:f,35:46,39:24,40:S,41:27,42:D,43:_,44:y,45:F,46:I,47:M,48:W,49:J,50:et,51:w},{11:49,17:48,24:H,30:f,39:24,40:S,41:27,42:D,43:_,44:y,45:F,46:I,47:M,48:W,49:J,50:et,51:w},{11:52,17:51,24:H,30:f,39:24,40:S,41:27,42:D,43:_,44:y,45:F,46:I,47:M,48:W,49:J,50:et,51:w},{20:[1,53]},{22:[1,54]},e(A,[2,18]),{1:[2,2]},e(A,[2,8]),e(A,[2,9]),e(st,[2,39],{41:55,42:D,43:_,44:y,45:F,46:I,47:M,48:W,49:J,50:et,51:w}),e(st,[2,40]),e(st,[2,41]),e(B,[2,42]),e(B,[2,44]),e(B,[2,45]),e(B,[2,46]),e(B,[2,47]),e(B,[2,48]),e(B,[2,49]),e(B,[2,50]),e(B,[2,51]),e(B,[2,52]),e(B,[2,53]),e(A,[2,10]),e(A,[2,24],{32:41,31:56,24:Y,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:D,43:_,44:y,45:F,46:I,47:M,48:W,49:J,50:et,51:w},e(A,[2,11]),e(A,[2,32],{35:60,29:N}),e(A,[2,34]),{33:[1,61]},e(A,[2,12]),{17:62,24:H},{25:63,27:64,29:ht},e(A,[2,14]),{17:66,24:H},e(A,[2,16]),e(A,[2,17]),e(B,[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(v,[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:D,43:_,44:y,45:F,46:I,47:M,48:W,49:J,50:et,51:w},e(A,[2,35]),e(A,[2,19]),{25:75,27:64,29:ht},e(v,[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=[],nt=this.table,m="",ft=0,Wt=0,Xt=0,xe=2,Nt=1,fe=o.slice.call(arguments,1),P=Object.create(this.lexer),at={yy:{}};for(var kt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,kt))at.yy[kt]=this.yy[kt];if(P.setInput(r,at.yy),at.yy.lexer=P,at.yy.parser=this,typeof P.yylloc>"u")P.yylloc={};var At=P.yylloc;o.push(At);var pe=P.options&&P.options.ranges;if(typeof at.yy.parseError==="function")this.parseError=at.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function me(Z){d.length=d.length-2*Z,C.length=C.length-Z,o.length=o.length-Z}t(me,"popStack");function Yt(){var Z=p.pop()||P.lex()||Nt;if(typeof Z!=="number"){if(Z instanceof Array)p=Z,Z=p.pop();Z=g.symbols_[Z]||Z}return Z}t(Yt,"lex");var V,Ct,ot,Q,Be,St,lt={},pt,it,Ht,mt;while(!0){if(ot=d[d.length-1],this.defaultActions[ot])Q=this.defaultActions[ot];else{if(V===null||typeof V>"u")V=Yt();Q=nt[ot]&&nt[ot][V]}if(typeof Q>"u"||!Q.length||!Q[0]){var Rt="";mt=[];for(pt in nt[ot])if(this.terminals_[pt]&&pt>xe)mt.push("'"+this.terminals_[pt]+"'");if(P.showPosition)Rt="Parse error on line "+(ft+1)+`:
1
+ import{t,l,Mt,K,E,X,te,R,L,z,O,U,j,G,ai,On,Cs,de,oe,wf}from"./index-302d35e5.js";import{na}from"./index-7sa2e8mn.js";function _t(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 gt(){var e=On().unknown(void 0),{domain:i,range:s}=e,n=0,a=1,h,c,x=!1,f=0,S=0,D=0.5;delete e.unknown;function _(){var y=i().length,F=a<n,I=F?a:n,M=F?n:a;if(h=(M-I)/Math.max(1,y-f+S*2),x)h=Math.floor(h);if(I+=(M-I-h*(y-f))*D,c=h*(1-f),x)I=Math.round(I),c=Math.round(c);var W=_t(y).map(function(J){return I+h*J});return s(F?W.reverse():W)}return e.domain=function(y){return arguments.length?(i(y),_()):i()},e.range=function(y){return arguments.length?([n,a]=y,n=+n,a=+a,_()):[n,a]},e.rangeRound=function(y){return[n,a]=y,n=+n,a=+a,x=!0,_()},e.bandwidth=function(){return c},e.step=function(){return h},e.round=function(y){return arguments.length?(x=!!y,_()):x},e.padding=function(y){return arguments.length?(f=Math.min(1,S=+y),_()):f},e.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),_()):f},e.paddingOuter=function(y){return arguments.length?(S=+y,_()):S},e.align=function(y){return arguments.length?(D=Math.max(0,Math.min(1,y)),_()):D},e.copy=function(){return gt(i(),[n,a]).round(x).paddingInner(f).paddingOuter(S).align(D)},ai.apply(_(),arguments)}var Tt=function(){var e=t(function(q,r,g,d){for(g=g||{},d=q.length;d--;g[q[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],D=[1,28],_=[1,29],y=[1,30],F=[1,31],I=[1,32],M=[1,33],W=[1,34],J=[1,35],et=[1,36],w=[1,37],Y=[1,43],u=[1,42],N=[1,47],H=[1,50],A=[1,10,12,14,16,18,19,21,23,36,37,38],st=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],B=[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],ht=[1,65],v=[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,nt){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:D,43:_,44:y,45:F,46:I,47:M,48:W,49:J,50:et,51:w},{11:39,13:38,24:Y,29:u,30:f,31:40,32:41,39:24,40:S,41:27,42:D,43:_,44:y,45:F,46:I,47:M,48:W,49:J,50:et,51:w},{11:45,15:44,29:N,30:f,35:46,39:24,40:S,41:27,42:D,43:_,44:y,45:F,46:I,47:M,48:W,49:J,50:et,51:w},{11:49,17:48,24:H,30:f,39:24,40:S,41:27,42:D,43:_,44:y,45:F,46:I,47:M,48:W,49:J,50:et,51:w},{11:52,17:51,24:H,30:f,39:24,40:S,41:27,42:D,43:_,44:y,45:F,46:I,47:M,48:W,49:J,50:et,51:w},{20:[1,53]},{22:[1,54]},e(A,[2,18]),{1:[2,2]},e(A,[2,8]),e(A,[2,9]),e(st,[2,39],{41:55,42:D,43:_,44:y,45:F,46:I,47:M,48:W,49:J,50:et,51:w}),e(st,[2,40]),e(st,[2,41]),e(B,[2,42]),e(B,[2,44]),e(B,[2,45]),e(B,[2,46]),e(B,[2,47]),e(B,[2,48]),e(B,[2,49]),e(B,[2,50]),e(B,[2,51]),e(B,[2,52]),e(B,[2,53]),e(A,[2,10]),e(A,[2,24],{32:41,31:56,24:Y,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:D,43:_,44:y,45:F,46:I,47:M,48:W,49:J,50:et,51:w},e(A,[2,11]),e(A,[2,32],{35:60,29:N}),e(A,[2,34]),{33:[1,61]},e(A,[2,12]),{17:62,24:H},{25:63,27:64,29:ht},e(A,[2,14]),{17:66,24:H},e(A,[2,16]),e(A,[2,17]),e(B,[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(v,[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:D,43:_,44:y,45:F,46:I,47:M,48:W,49:J,50:et,51:w},e(A,[2,35]),e(A,[2,19]),{25:75,27:64,29:ht},e(v,[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=[],nt=this.table,m="",ft=0,Wt=0,Xt=0,xe=2,Nt=1,fe=o.slice.call(arguments,1),P=Object.create(this.lexer),at={yy:{}};for(var kt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,kt))at.yy[kt]=this.yy[kt];if(P.setInput(r,at.yy),at.yy.lexer=P,at.yy.parser=this,typeof P.yylloc>"u")P.yylloc={};var At=P.yylloc;o.push(At);var pe=P.options&&P.options.ranges;if(typeof at.yy.parseError==="function")this.parseError=at.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function me(Z){d.length=d.length-2*Z,C.length=C.length-Z,o.length=o.length-Z}t(me,"popStack");function Yt(){var Z=p.pop()||P.lex()||Nt;if(typeof Z!=="number"){if(Z instanceof Array)p=Z,Z=p.pop();Z=g.symbols_[Z]||Z}return Z}t(Yt,"lex");var V,Ct,ot,Q,Be,St,lt={},pt,it,Ht,mt;while(!0){if(ot=d[d.length-1],this.defaultActions[ot])Q=this.defaultActions[ot];else{if(V===null||typeof V>"u")V=Yt();Q=nt[ot]&&nt[ot][V]}if(typeof Q>"u"||!Q.length||!Q[0]){var Rt="";mt=[];for(pt in nt[ot])if(this.terminals_[pt]&&pt>xe)mt.push("'"+this.terminals_[pt]+"'");if(P.showPosition)Rt="Parse error on line "+(ft+1)+`:
2
2
  `+P.showPosition()+`
3
3
  Expecting `+mt.join(", ")+", got '"+(this.terminals_[V]||V)+"'";else Rt="Parse error on line "+(ft+1)+": Unexpected "+(V==Nt?"end of input":"'"+(this.terminals_[V]||V)+"'");this.parseError(Rt,{text:P.match,token:this.terminals_[V]||V,line:P.yylineno,loc:At,expected:mt})}if(Q[0]instanceof Array&&Q.length>1)throw Error("Parse Error: multiple actions possible at state: "+ot+", token: "+V);switch(Q[0]){case 1:if(d.push(V),C.push(P.yytext),o.push(P.yylloc),d.push(Q[1]),V=null,!Ct){if(Wt=P.yyleng,m=P.yytext,ft=P.yylineno,At=P.yylloc,Xt>0)Xt--}else V=Ct,Ct=null;break;case 2:if(it=this.productions_[Q[1]][1],lt.$=C[C.length-it],lt._$={first_line:o[o.length-(it||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(it||1)].first_column,last_column:o[o.length-1].last_column},pe)lt._$.range=[o[o.length-(it||1)].range[0],o[o.length-1].range[1]];if(St=this.performAction.apply(lt,[m,Wt,ft,at.yy,Q[1],C,o].concat(fe)),typeof St<"u")return St;if(it)d=d.slice(0,-1*it*2),C=C.slice(0,-1*it),o=o.slice(0,-1*it);d.push(this.productions_[Q[1]][0]),C.push(lt.$),o.push(lt._$),Ht=nt[d[d.length-2]][d[d.length-1]],d.push(Ht);break;case 3:return!0}}return!0},"parse")},tt=function(){var q={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 q}();k.lexer=tt;function T(){this.yy={}}return t(T,"Parser"),T.prototype=k,k.Parser=T,new T}();Tt.parser=Tt;var be=Tt;function bt(e){return e.type==="bar"}t(bt,"isBarPlot");function yt(e){return e.type==="band"}t(yt,"isBandAxisData");function ct(e){return e.type==="linear"}t(ct,"isLinearAxisData");var Lt=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=Ef(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}},$t=0.7,Ut=0.2,qt=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($t*this.getTickDistance()>this.outerPadding*2)this.outerPadding=Math.floor($t*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=Ut*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=Ut*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 qt{static{t(this,"BandAxis")}constructor(e,i,s,n,a){super(e,n,a,i);this.categories=s,this.scale=gt().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=gt().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 qt{static{t(this,"LinearAxis")}constructor(e,i,s,n,a){super(e,n,a,i);this.domain=s,this.scale=na().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];if(this.axisPosition==="left")e.reverse();this.scale=na().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};function Dt(e,i,s,n){let a=new Lt(n);if(yt(e))return new ye(i,s,e.categories,e.title,a);return new we(i,s,[e.min,e.max],e.title,a)}t(Dt,"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 Gt(e,i,s,n){let a=new Lt(n);return new ke(a,e,i,s)}t(Gt,"getChartTitleComponent");var Ae=0.75,Ce=0.5,Se=0.35;function vt(e){return{fontSize:e,markerSize:e*Ae,markerSpacing:e*Se,itemSpacing:e*Ce}}t(vt,"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}=vt(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}=vt(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,D]of this.visiblePlots.entries())if(bt(D))x.push({x:h,y:c+S*a,width:i,height:i,fill:D.fill,strokeFill:D.fill,strokeWidth:0});else{let _=c+S*a+i/2;f.push({path:`M ${h},${_} L ${h+i},${_}`,strokeFill:D.strokeFill,strokeWidth:D.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,D)=>({text:S.title,x:h+i+s,y:c+D*a+i/2,fill:this.chartThemeConfig.legendTextColor,fontSize:e,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}};function jt(e,i,s,n){let a=new Lt(n);return new Re(a,e,i,s)}t(jt,"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=Cs().y((n)=>n[0]).x((n)=>n[1])(e);else i=Cs().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 Qt(e,i,s){return new De(e,i,s)}t(Qt,"getPlotComponent");var ve=class{constructor(e,i,s,n){this.chartConfig=e,this.chartData=i,this.componentStore={title:Gt(e,i,s,n),plot:Qt(e,i,s),legend:jt(e,i,s,n),xAxis:Dt(i.xAxis,e.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},n),yAxis:Dt(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)=>bt(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)=>bt(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()}},ut=0,Kt,dt=Bt(),xt=It(),b=zt(),Pt=xt.plotColorPalette.split(",").map((e)=>e.trim()),wt=!1,Et=!1;function It(){let e=Mt(),i=E();return oe(e.xyChart,i.themeVariables.xyChart)}t(It,"getChartDefaultThemeConfig");function Bt(){let e=E();return oe(K.xyChart,e.xyChart)}t(Bt,"getChartDefaultConfig");function zt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}t(zt,"getChartDefaultData");function rt(e){let i=E();return X(e.trim(),i)}t(rt,"textSanitizer");function Zt(e){Kt=e}t(Zt,"setTmpSVGG");function Jt(e){if(e==="horizontal")dt.chartOrientation="horizontal";else dt.chartOrientation="vertical"}t(Jt,"setOrientation");function ee(e){b.xAxis.title=rt(e.text)}t(ee,"setXAxisTitle");function Ot(e,i){b.xAxis={type:"linear",title:b.xAxis.title,min:e,max:i},wt=!0}t(Ot,"setXAxisRangeData");function ie(e){b.xAxis={type:"band",title:b.xAxis.title,categories:e.map((i)=>rt(i.text))},wt=!0}t(ie,"setXAxisBand");function se(e){b.yAxis.title=rt(e.text)}t(se,"setYAxisTitle");function ne(e,i){b.yAxis={type:"linear",title:b.yAxis.title,min:e,max:i},Et=!0}t(ne,"setYAxisRangeData");function ae(e){let i=Math.min(...e),s=Math.max(...e),n=ct(b.yAxis)?b.yAxis.min:1/0,a=ct(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 Vt(e){let i=[];if(e.length===0)return i;if(!wt){let s=ct(b.xAxis)?b.xAxis.min:1/0,n=ct(b.xAxis)?b.xAxis.max:-1/0;Ot(Math.min(s,1),Math.max(n,e.length))}if(yt(b.xAxis)&&e.length>b.xAxis.categories.length)e=e.slice(0,b.xAxis.categories.length);if(!Et)ae(e);if(yt(b.xAxis))i=b.xAxis.categories.map((s,n)=>[s,e[n]]);if(ct(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(Vt,"transformDataWithoutCategory");function Ft(e){return Pt[e===0?0:e%Pt.length]}t(Ft,"getPlotColorFromPalette");function re(e,i){let s=i.map((c)=>c.value),n=i.map((c)=>c.label?rt(c.label):""),a=Vt(s),h=n.some((c)=>c!=="");b.plots.push({type:"line",title:rt(e.text),strokeFill:Ft(ut),strokeWidth:2,data:a,...h?{pointLabels:n}:{}}),ut++}t(re,"setLineData");function he(e,i){let s=i.map((a)=>a.value),n=Vt(s);b.plots.push({type:"bar",title:rt(e.text),fill:Ft(ut),data:n}),ut++}t(he,"setBarData");function le(){if(b.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return b.title=G(),Pe.build(dt,b,xt,Kt)}t(le,"getDrawableElem");function ce(){return xt}t(ce,"getChartThemeConfig");function ge(){return dt}t(ge,"getChartConfig");function ue(){return b}t(ue,"getXYChartData");var Le=t(function(){R(),ut=0,dt=Bt(),b=zt(),xt=It(),Pt=xt.plotColorPalette.split(",").map((e)=>e.trim()),wt=!1,Et=!1},"clear"),Ee={getDrawableElem:le,clear:Le,setAccTitle:L,getAccTitle:z,setDiagramTitle:j,getDiagramTitle:G,getAccDescription:U,setAccDescription:O,setOrientation:Jt,setXAxisTitle:ee,setXAxisRangeData:Ot,setXAxisBand:ie,setYAxisTitle:se,setYAxisRangeData:ne,setLineData:re,setBarData:he,setTmpSVGG:Zt,getChartThemeConfig:ce,getChartConfig:ge,getXYChartData:ue},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 D(w){return`translate(${w.x}, ${w.y}) rotate(${w.rotation||0})`}t(D,"getTextTransformation"),l.debug(`Rendering xychart chart
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 q}();k.lexer=tt;function T(){this.yy={}}return t(T,"Parser"),T.prototype=k,k.Parser=T,new T}();Tt.parser=Tt;var be=Tt;function bt(e){return e.type==="bar"}t(bt,"isBarPlot");function yt(e){return e.type==="band"}t(yt,"isBandAxisData");function ct(e){return e.type==="linear"}t(ct,"isLinearAxisData");var Lt=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=wf(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}},$t=0.7,Ut=0.2,qt=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($t*this.getTickDistance()>this.outerPadding*2)this.outerPadding=Math.floor($t*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=Ut*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=Ut*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 qt{static{t(this,"BandAxis")}constructor(e,i,s,n,a){super(e,n,a,i);this.categories=s,this.scale=gt().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=gt().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 qt{static{t(this,"LinearAxis")}constructor(e,i,s,n,a){super(e,n,a,i);this.domain=s,this.scale=na().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];if(this.axisPosition==="left")e.reverse();this.scale=na().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};function Dt(e,i,s,n){let a=new Lt(n);if(yt(e))return new ye(i,s,e.categories,e.title,a);return new we(i,s,[e.min,e.max],e.title,a)}t(Dt,"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 Gt(e,i,s,n){let a=new Lt(n);return new ke(a,e,i,s)}t(Gt,"getChartTitleComponent");var Ae=0.75,Ce=0.5,Se=0.35;function vt(e){return{fontSize:e,markerSize:e*Ae,markerSpacing:e*Se,itemSpacing:e*Ce}}t(vt,"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}=vt(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}=vt(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,D]of this.visiblePlots.entries())if(bt(D))x.push({x:h,y:c+S*a,width:i,height:i,fill:D.fill,strokeFill:D.fill,strokeWidth:0});else{let _=c+S*a+i/2;f.push({path:`M ${h},${_} L ${h+i},${_}`,strokeFill:D.strokeFill,strokeWidth:D.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,D)=>({text:S.title,x:h+i+s,y:c+D*a+i/2,fill:this.chartThemeConfig.legendTextColor,fontSize:e,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}};function jt(e,i,s,n){let a=new Lt(n);return new Re(a,e,i,s)}t(jt,"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=Cs().y((n)=>n[0]).x((n)=>n[1])(e);else i=Cs().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 Qt(e,i,s){return new De(e,i,s)}t(Qt,"getPlotComponent");var ve=class{constructor(e,i,s,n){this.chartConfig=e,this.chartData=i,this.componentStore={title:Gt(e,i,s,n),plot:Qt(e,i,s),legend:jt(e,i,s,n),xAxis:Dt(i.xAxis,e.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},n),yAxis:Dt(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)=>bt(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)=>bt(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()}},ut=0,Kt,dt=Bt(),xt=It(),b=zt(),Pt=xt.plotColorPalette.split(",").map((e)=>e.trim()),wt=!1,Et=!1;function It(){let e=Mt(),i=E();return oe(e.xyChart,i.themeVariables.xyChart)}t(It,"getChartDefaultThemeConfig");function Bt(){let e=E();return oe(K.xyChart,e.xyChart)}t(Bt,"getChartDefaultConfig");function zt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}t(zt,"getChartDefaultData");function rt(e){let i=E();return X(e.trim(),i)}t(rt,"textSanitizer");function Zt(e){Kt=e}t(Zt,"setTmpSVGG");function Jt(e){if(e==="horizontal")dt.chartOrientation="horizontal";else dt.chartOrientation="vertical"}t(Jt,"setOrientation");function ee(e){b.xAxis.title=rt(e.text)}t(ee,"setXAxisTitle");function Ot(e,i){b.xAxis={type:"linear",title:b.xAxis.title,min:e,max:i},wt=!0}t(Ot,"setXAxisRangeData");function ie(e){b.xAxis={type:"band",title:b.xAxis.title,categories:e.map((i)=>rt(i.text))},wt=!0}t(ie,"setXAxisBand");function se(e){b.yAxis.title=rt(e.text)}t(se,"setYAxisTitle");function ne(e,i){b.yAxis={type:"linear",title:b.yAxis.title,min:e,max:i},Et=!0}t(ne,"setYAxisRangeData");function ae(e){let i=Math.min(...e),s=Math.max(...e),n=ct(b.yAxis)?b.yAxis.min:1/0,a=ct(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 Vt(e){let i=[];if(e.length===0)return i;if(!wt){let s=ct(b.xAxis)?b.xAxis.min:1/0,n=ct(b.xAxis)?b.xAxis.max:-1/0;Ot(Math.min(s,1),Math.max(n,e.length))}if(yt(b.xAxis)&&e.length>b.xAxis.categories.length)e=e.slice(0,b.xAxis.categories.length);if(!Et)ae(e);if(yt(b.xAxis))i=b.xAxis.categories.map((s,n)=>[s,e[n]]);if(ct(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(Vt,"transformDataWithoutCategory");function Ft(e){return Pt[e===0?0:e%Pt.length]}t(Ft,"getPlotColorFromPalette");function re(e,i){let s=i.map((c)=>c.value),n=i.map((c)=>c.label?rt(c.label):""),a=Vt(s),h=n.some((c)=>c!=="");b.plots.push({type:"line",title:rt(e.text),strokeFill:Ft(ut),strokeWidth:2,data:a,...h?{pointLabels:n}:{}}),ut++}t(re,"setLineData");function he(e,i){let s=i.map((a)=>a.value),n=Vt(s);b.plots.push({type:"bar",title:rt(e.text),fill:Ft(ut),data:n}),ut++}t(he,"setBarData");function le(){if(b.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return b.title=G(),Pe.build(dt,b,xt,Kt)}t(le,"getDrawableElem");function ce(){return xt}t(ce,"getChartThemeConfig");function ge(){return dt}t(ge,"getChartConfig");function ue(){return b}t(ue,"getXYChartData");var Le=t(function(){R(),ut=0,dt=Bt(),b=zt(),xt=It(),Pt=xt.plotColorPalette.split(",").map((e)=>e.trim()),wt=!1,Et=!1},"clear"),Ee={getDrawableElem:le,clear:Le,setAccTitle:L,getAccTitle:z,setDiagramTitle:j,getDiagramTitle:G,getAccDescription:U,setAccDescription:O,setOrientation:Jt,setXAxisTitle:ee,setXAxisRangeData:Ot,setXAxisBand:ie,setYAxisTitle:se,setYAxisRangeData:ne,setLineData:re,setBarData:he,setTmpSVGG:Zt,getChartThemeConfig:ce,getChartConfig:ge,getXYChartData:ue},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 D(w){return`translate(${w.x}, ${w.y}) rotate(${w.rotation||0})`}t(D,"getTextTransformation"),l.debug(`Rendering xychart chart
7
7
  `+e);let _=de(i),y=_.append("g").attr("class","main"),F=y.append("rect").attr("width",c.width).attr("height",c.height).attr("class","background");te(_,c.height,c.width,!0),_.attr("viewBox",`0 0 ${c.width} ${c.height}`),F.attr("fill",h.backgroundColor),a.setTmpSVGG(_.append("g").attr("class","mermaid-tmp-group"));let I=a.getDrawableElem(),M={};function W(w){let Y=y,u="";for(let[N]of w.entries()){let H=y;if(N>0&&M[u])H=M[u];if(u+=w[N],Y=M[u],!Y)Y=M[u]=H.append("g").attr("class",w[N])}return Y}t(W,"getGroup");for(let w of I){if(w.data.length===0)continue;let Y=W(w.groupTexts);switch(w.type){case"rect":if(Y.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 N=function(k,tt){let{data:T,label:q}=k;return tt*q.length*H<=T.width-A};var J=N;t(N,"fitsHorizontally");let H=0.7,A=10,st=w.data.map((k,tt)=>({data:k,label:x[tt].toString()})).filter((k)=>k.data.width>0&&k.data.height>0),B=st.map((k)=>{let{data:tt}=k,T=tt.height*0.7;while(!N(k,T)&&T>0)T-=1;return T}),ht=Math.floor(Math.min(...B)),v=t((k)=>{if(u)return k.data.x+k.data.width+A;else return k.data.x+k.data.width-A},"determineLabelXPosition");Y.selectAll("text").data(st).enter().append("text").attr("x",v).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",`${ht}px`).text((k)=>k.label)}else{let N=function(v,k,tt){let{data:T,label:q}=v,r=0.7,g=k*q.length*0.7,d=T.x+T.width/2,p=d-g/2,C=d+g/2,o=p>=T.x&&C<=T.x+T.width,nt=T.y+tt+k<=T.y+T.height;return o&&nt};var et=N;t(N,"fitsInBar");let H=10,A=w.data.map((v,k)=>({data:v,label:x[k].toString()})).filter((v)=>v.data.width>0&&v.data.height>0),st=A.map((v)=>{let{data:k,label:tt}=v,T=k.width/(tt.length*0.7);while(!N(v,T,H)&&T>0)T-=1;return T}),B=Math.floor(Math.min(...st)),ht=t((v)=>{if(u)return v.data.y-H;else return v.data.y+H},"determineLabelYPosition");Y.selectAll("text").data(A).enter().append("text").attr("x",(v)=>v.data.x+v.data.width/2).attr("y",ht).attr("text-anchor","middle").attr("dominant-baseline",u?"auto":"hanging").attr("fill",h.dataLabelColor).attr("font-size",`${B}px`).text((v)=>v.label)}}break;case"text":Y.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)=>D(u)).text((u)=>u.text);break;case"path":Y.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};
@@ -0,0 +1 @@
1
+ import{Df}from"./index-dt7e1328.js";export{Df as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kabmo-labs/kabmo",
3
- "version": "0.36.0",
3
+ "version": "0.37.0",
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>",
@@ -62,7 +62,7 @@ describe('applySettingsSideEffects', () => {
62
62
  const seen: unknown[] = [];
63
63
  win.addEventListener(SIDEBAR_STYLE_CHANGED_EVENT, (event) => seen.push((event as unknown as CustomEvent).detail));
64
64
 
65
- applySettingsSideEffects(state(), state({ sidebarStyle: 'modern' }));
65
+ applySettingsSideEffects(state({ sidebarStyle: 'classic' }), state({ sidebarStyle: 'modern' }));
66
66
 
67
67
  expect(seen).toEqual(['modern']);
68
68
  });
@@ -103,11 +103,12 @@ describe('applySettingsSideEffects', () => {
103
103
  installDom();
104
104
  const root = globalThis.document.documentElement;
105
105
 
106
- applySettingsSideEffects(state(), state({ surfaceStyle: 'glass' }));
106
+ applySettingsSideEffects(state({ surfaceStyle: 'classic' }), state({ surfaceStyle: 'glass' }));
107
107
  expect(root.getAttribute('data-surface')).toBe('glass');
108
108
 
109
109
  // Same value again: the attribute must survive an unrelated re-render
110
- // untouched (the writer removes the default, so a stray call would clear it).
110
+ // untouched (classic is written as the attribute's absence, so a stray
111
+ // call would clear it).
111
112
  applySettingsSideEffects(state({ surfaceStyle: 'glass' }), state({ surfaceStyle: 'glass', goalDefaultBudget: 1 }));
112
113
  expect(root.getAttribute('data-surface')).toBe('glass');
113
114
 
@@ -119,7 +120,7 @@ describe('applySettingsSideEffects', () => {
119
120
  installDom();
120
121
  const root = globalThis.document.documentElement;
121
122
 
122
- applySettingsSideEffects(state(), state({ iconStyle: 'color' }));
123
+ applySettingsSideEffects(state({ iconStyle: 'monochrome' }), state({ iconStyle: 'color' }));
123
124
  expect(root.getAttribute('data-icon-style')).toBe('color');
124
125
 
125
126
  applySettingsSideEffects(state({ iconStyle: 'color' }), state({ iconStyle: 'color', goalDefaultBudget: 1 }));
@@ -15,9 +15,9 @@
15
15
 
16
16
  import { readKabmoSetting } from '@/shared/lib/settings/client';
17
17
  import {
18
- DEFAULT_ICON_STYLE,
19
18
  ICON_STYLE_ATTRIBUTE,
20
19
  ICON_STYLE_SETTING_KEY,
20
+ ICON_STYLE_WITHOUT_ATTRIBUTE,
21
21
  resolveIconStyle,
22
22
  } from '@/shared/lib/theme/icon-style';
23
23
  import {
@@ -54,14 +54,17 @@ export function applyIconPaper(theme?: string): void {
54
54
  /**
55
55
  * Point the document at `style`.
56
56
  *
57
- * The default is REMOVED rather than written, so the ink rule in CSS is the
58
- * single statement of what "no attribute" means.
57
+ * `monochrome` is REMOVED rather than written, because the ink pass in CSS is
58
+ * stated as the absence of the attribute (`:root:not([data-icon-style="color"])`).
59
+ * The comparison is against that ABSENT state, not against `DEFAULT_ICON_STYLE`:
60
+ * the default is `color`, and omitting the attribute for it would paint every
61
+ * mark ink while the setting says full colour.
59
62
  */
60
63
  export function applyIconStyle(style: unknown): void {
61
64
  if (typeof document === 'undefined') return;
62
65
  const root = document.documentElement;
63
66
  const resolved = resolveIconStyle(style);
64
- if (resolved === DEFAULT_ICON_STYLE) root.removeAttribute(ICON_STYLE_ATTRIBUTE);
67
+ if (resolved === ICON_STYLE_WITHOUT_ATTRIBUTE) root.removeAttribute(ICON_STYLE_ATTRIBUTE);
65
68
  else root.setAttribute(ICON_STYLE_ATTRIBUTE, resolved);
66
69
  // The bucket belongs to the same writer: a document that states one style
67
70
  // without the other paints a `mid` palette with the `deep` table.
@@ -8,10 +8,10 @@
8
8
  *
9
9
  * Both writers exist because the value reaches CSS through the document, not a
10
10
  * prop — so the facts worth pinning are the ones a wrong implementation breaks
11
- * silently: the default must CLEAR the attribute (a document carrying it and a
12
- * document not carrying it have to be the same state), an unknown stored value
13
- * must not produce an attribute no rule matches, and the boot path must read
14
- * the primed settings snapshot rather than hardcode the default.
11
+ * silently: the style CSS paints with no attribute (`classic` / `monochrome`)
12
+ * must CLEAR it, an unknown stored value must resolve to the shipped default
13
+ * (`glass` / `color`) and write THAT, and the boot path must read the primed
14
+ * settings snapshot rather than hardcode the default.
15
15
  *
16
16
  * The settings client keeps a module-level snapshot, so each case primes it
17
17
  * explicitly instead of relying on file order.
@@ -59,23 +59,23 @@ describe('the stored keys', () => {
59
59
  });
60
60
 
61
61
  describe('applySurfaceStyle', () => {
62
- test('writes the non-default style as the attribute CSS keys on', () => {
62
+ test('writes glass as the attribute CSS keys on', () => {
63
63
  applySurfaceStyle('glass');
64
64
 
65
65
  expect(document.documentElement.getAttribute('data-surface')).toBe('glass');
66
66
  });
67
67
 
68
- test('the default CLEARS the attribute instead of writing it', () => {
68
+ test('classic CLEARS the attribute instead of writing it', () => {
69
69
  applySurfaceStyle('glass');
70
70
  applySurfaceStyle('classic');
71
71
 
72
72
  expect(document.documentElement.hasAttribute('data-surface')).toBe(false);
73
73
  });
74
74
 
75
- test('an unknown value resolves to the default rather than an unmatched rule', () => {
75
+ test('an unknown value resolves to the glass default and writes it', () => {
76
76
  applySurfaceStyle('liquid');
77
77
 
78
- expect(document.documentElement.hasAttribute('data-surface')).toBe(false);
78
+ expect(document.documentElement.getAttribute('data-surface')).toBe('glass');
79
79
  });
80
80
  });
81
81
 
@@ -109,12 +109,12 @@ describe('the boot path', () => {
109
109
  expect(document.documentElement.getAttribute('data-icon-style')).toBe('color');
110
110
  });
111
111
 
112
- test('an install with no stored preference boots opaque and monochrome', () => {
112
+ test('an install with no stored preference boots glass and full colour', () => {
113
113
  primeKabmoSettings({});
114
114
  initSurfaceStyle();
115
115
  initIconStyle();
116
116
 
117
- expect(document.documentElement.hasAttribute('data-surface')).toBe(false);
118
- expect(document.documentElement.hasAttribute('data-icon-style')).toBe(false);
117
+ expect(document.documentElement.getAttribute('data-surface')).toBe('glass');
118
+ expect(document.documentElement.getAttribute('data-icon-style')).toBe('color');
119
119
  });
120
120
  });
@@ -23,24 +23,27 @@
23
23
 
24
24
  import { readKabmoSetting } from '@/shared/lib/settings/client';
25
25
  import {
26
- DEFAULT_SURFACE_STYLE,
27
26
  SURFACE_ATTRIBUTE,
28
27
  SURFACE_STYLE_SETTING_KEY,
28
+ SURFACE_STYLE_WITHOUT_ATTRIBUTE,
29
29
  resolveSurfaceStyle,
30
30
  } from '@/shared/lib/theme/surface-style';
31
31
 
32
32
  /**
33
33
  * Point the document at `style`.
34
34
  *
35
- * The default is REMOVED rather than written, so a document carrying `classic`
36
- * and a document carrying nothing are the same state — which is what makes the
37
- * `:root` fallback in CSS the single statement of the opaque default.
35
+ * The style CSS paints with no attribute is REMOVED rather than written, so a
36
+ * document carrying `classic` and a document carrying nothing are the same
37
+ * state — which is what makes the `:root` fallback in CSS the single statement
38
+ * of the opaque look. The comparison is against that ABSENT state, not against
39
+ * `DEFAULT_SURFACE_STYLE`: the default is `glass`, and omitting the attribute
40
+ * for it would paint the opaque shell while the setting says glass.
38
41
  */
39
42
  export function applySurfaceStyle(style: unknown): void {
40
43
  if (typeof document === 'undefined') return;
41
44
  const root = document.documentElement;
42
45
  const resolved = resolveSurfaceStyle(style);
43
- if (resolved === DEFAULT_SURFACE_STYLE) root.removeAttribute(SURFACE_ATTRIBUTE);
46
+ if (resolved === SURFACE_STYLE_WITHOUT_ATTRIBUTE) root.removeAttribute(SURFACE_ATTRIBUTE);
44
47
  else root.setAttribute(SURFACE_ATTRIBUTE, resolved);
45
48
  }
46
49
 
@@ -18,24 +18,27 @@
18
18
  * - **`data-theme` and `data-theme-variant` are ALWAYS written.** They are the
19
19
  * palette; `applyDocumentTheme` owns them after hydration, and a document
20
20
  * served without them keeps `:root`'s shipped palette.
21
- * - **The two style attributes are written only when they are not the default.**
22
- * `applySurfaceStyle` / `applyIconStyle` remove the attribute for the default,
23
- * so emitting `data-surface="classic"` here would make the server and the
24
- * client disagree about the document's own state — and every CSS rule keys on
25
- * the value, not on its absence.
21
+ * - **The two style attributes are written only when the style is not the one
22
+ * CSS paints with no attribute** (`classic` / `monochrome`). The client's
23
+ * `applySurfaceStyle` / `applyIconStyle` remove the attribute for exactly
24
+ * those values, so emitting `data-surface="classic"` here would make the
25
+ * server and the client disagree about the document's own state — and every
26
+ * CSS rule keys on the value, not on its absence. This is NOT the same test
27
+ * as `DEFAULT_*`: the defaults are now `glass` / `color`, and those must be
28
+ * emitted so the first frame is already frosted and coloured.
26
29
  */
27
30
 
28
31
  import type { ThemePalette } from '@/shared/types/theme';
29
32
  import {
30
- DEFAULT_ICON_STYLE,
31
33
  ICON_STYLE_ATTRIBUTE,
34
+ ICON_STYLE_WITHOUT_ATTRIBUTE,
32
35
  resolveIconStyle,
33
36
  } from '@/shared/lib/theme/icon-style';
34
37
  import { ICON_PAPER_ATTRIBUTE } from '@/shared/lib/icons/tint';
35
38
  import { paperBucketOf } from '@/shared/lib/icons/icon-tone';
36
39
  import {
37
- DEFAULT_SURFACE_STYLE,
38
40
  SURFACE_ATTRIBUTE,
41
+ SURFACE_STYLE_WITHOUT_ATTRIBUTE,
39
42
  resolveSurfaceStyle,
40
43
  } from '@/shared/lib/theme/surface-style';
41
44
 
@@ -59,8 +62,8 @@ export function styleAttributes(surfaceStyle: unknown, iconStyle: unknown, palet
59
62
  const surface = resolveSurfaceStyle(surfaceStyle);
60
63
  const icon = resolveIconStyle(iconStyle);
61
64
  const parts: string[] = [];
62
- if (surface !== DEFAULT_SURFACE_STYLE) parts.push(`${SURFACE_ATTRIBUTE}="${surface}"`);
63
- if (icon !== DEFAULT_ICON_STYLE) parts.push(`${ICON_STYLE_ATTRIBUTE}="${icon}"`);
65
+ if (surface !== SURFACE_STYLE_WITHOUT_ATTRIBUTE) parts.push(`${SURFACE_ATTRIBUTE}="${surface}"`);
66
+ if (icon !== ICON_STYLE_WITHOUT_ATTRIBUTE) parts.push(`${ICON_STYLE_ATTRIBUTE}="${icon}"`);
64
67
  // The paper bucket is written for EVERY light palette, including the default
65
68
  // one, because it is not a preference: without it the first frame paints the
66
69
  // `deep` icon table on a `mid` paper — one step darker than the palette allows,
@@ -7,11 +7,13 @@
7
7
  * The first frame's `<html>` attributes.
8
8
  *
9
9
  * The rule worth pinning is the ASYMMETRY: the palette is always written, and
10
- * the two presentation styles are written only when they are not the default —
11
- * because the client's writers REMOVE the attribute for the default, and a
12
- * server that emitted `data-surface="classic"` would leave a document the
13
- * client thinks is "explicitly classic" and a reload flipping between two
14
- * spellings of the same state.
10
+ * the two presentation styles are written only when they are not the style CSS
11
+ * paints with no attribute (`classic` / `monochrome`) — because the client's
12
+ * writers REMOVE the attribute for exactly those values, and a server that
13
+ * emitted `data-surface="classic"` would leave a document the client thinks is
14
+ * "explicitly classic" and a reload flipping between two spellings of the same
15
+ * state. The shipped DEFAULTS (`glass` / `color`) are therefore emitted, so the
16
+ * first frame is already frosted and coloured.
15
17
  */
16
18
 
17
19
  import { describe, expect, test } from 'bun:test';
@@ -35,13 +37,18 @@ const light = KABMO_PALETTES[0];
35
37
  const dark = THEMES.find((theme) => theme.variant === 'dark')!;
36
38
 
37
39
  describe('styleAttributes', () => {
38
- test('the defaults add nothing at all', () => {
40
+ test('the styles CSS paints with no attribute add nothing', () => {
39
41
  expect(styleAttributes('classic', 'monochrome')).toBe('');
40
- expect(styleAttributes(undefined, undefined)).toBe('');
41
- expect(styleAttributes('nonsense', 'nonsense')).toBe('');
42
42
  });
43
43
 
44
- test('each non-default style contributes its own attribute', () => {
44
+ test('the shipped defaults are emitted so the first frame is frosted and coloured', () => {
45
+ const defaults = ' data-surface="glass" data-icon-style="color"';
46
+ expect(styleAttributes(undefined, undefined)).toBe(defaults);
47
+ expect(styleAttributes('nonsense', 'nonsense')).toBe(defaults);
48
+ expect(styleAttributes('glass', 'color')).toBe(defaults);
49
+ });
50
+
51
+ test('each style contributes its own attribute independently', () => {
45
52
  expect(styleAttributes('glass', 'monochrome')).toBe(' data-surface="glass"');
46
53
  expect(styleAttributes('classic', 'color')).toBe(' data-icon-style="color"');
47
54
  expect(styleAttributes('glass', 'color')).toBe(' data-surface="glass" data-icon-style="color"');
@@ -58,7 +65,7 @@ describe('styleAttributes', () => {
58
65
  });
59
66
 
60
67
  describe('applyShellDocumentFacts', () => {
61
- test('writes the palette and the chrome colour, and nothing else by default', () => {
68
+ test('writes the palette, the shipped styles and the chrome colour', () => {
62
69
  const html = applyShellDocumentFacts(TEMPLATE, {
63
70
  palette: light,
64
71
  surfaceStyle: undefined,
@@ -67,11 +74,9 @@ describe('applyShellDocumentFacts', () => {
67
74
  });
68
75
 
69
76
  expect(html).toContain(
70
- `<html lang="en" data-theme="${light.id}" data-icon-paper="mid" data-theme-variant="${light.variant}">`,
77
+ `<html lang="en" data-theme="${light.id}" data-surface="glass" data-icon-style="color" data-icon-paper="mid" data-theme-variant="${light.variant}">`,
71
78
  );
72
79
  expect(html).toContain('<meta name="theme-color" content="#123456" />');
73
- expect(html).not.toContain('data-surface');
74
- expect(html).not.toContain('data-icon-style');
75
80
  });
76
81
 
77
82
  test('a stored glass style lands on the FIRST frame, not after hydration', () => {
@@ -133,9 +133,11 @@ export function solidSignalFillRules(): string[] {
133
133
  /**
134
134
  * The same fill, in MONOCHROME — and there it was a blank button.
135
135
  *
136
- * The rule above is gated on the colour mode, but `monochrome` is the DEFAULT
137
- * (`DEFAULT_ICON_STYLE`), and its rule paints every glyph without a `text-ink`
138
- * class in `var(--theme-ink)`. On a solid signal fill that ink is the fill:
136
+ * The rule above is gated on the colour mode, but `monochrome` is the style CSS
137
+ * paints with NO `data-icon-style` attribute (`ICON_STYLE_WITHOUT_ATTRIBUTE`,
138
+ * not the default — that is `color`), and its rule paints every glyph without a
139
+ * `text-ink` class in `var(--theme-ink)`. On a solid signal fill that ink is
140
+ * the fill:
139
141
  * measured across the 63 palettes, `Square` on `bg-error` computes **1.04:1**
140
142
  * on `osaka-jade-light` and 44 of 63 sit under the 3:1 graphic floor. So the
141
143
  * fill has to be excluded from the ink pass and take the surface's foreground
@@ -6,9 +6,10 @@
6
6
  /**
7
7
  * The icon style's contract.
8
8
  *
9
- * Two facts are pinned here: the default must be what shipped (monochrome ink),
10
- * and an unreadable stored value must land on it rather than leaving every mark
11
- * with no rule to paint it.
9
+ * Two facts are pinned here: the default is full colour, and an unreadable
10
+ * stored value must land on it rather than leaving every mark with no rule to
11
+ * paint it. The style CSS paints with no attribute (`monochrome`) is a separate
12
+ * constant, because the ink pass is written as the absence of the attribute.
12
13
  */
13
14
 
14
15
  import { describe, expect, test } from 'bun:test';
@@ -17,6 +18,7 @@ import {
17
18
  ICON_STYLE_ATTRIBUTE,
18
19
  ICON_STYLES,
19
20
  ICON_STYLE_COPY,
21
+ ICON_STYLE_WITHOUT_ATTRIBUTE,
20
22
  isIconStyle,
21
23
  resolveIconStyle,
22
24
  } from '@/shared/lib/theme/icon-style';
@@ -47,8 +49,9 @@ describe('resolveIconStyle', () => {
47
49
  });
48
50
 
49
51
  describe('the style table', () => {
50
- test('the default is monochrome, which is what every mark shipped as', () => {
51
- expect(DEFAULT_ICON_STYLE).toBe('monochrome');
52
+ test('a fresh install resolves to full colour, while the absent attribute stays ink', () => {
53
+ expect(DEFAULT_ICON_STYLE).toBe('color');
54
+ expect(ICON_STYLE_WITHOUT_ATTRIBUTE).toBe('monochrome');
52
55
  expect(ICON_STYLES).toContain(DEFAULT_ICON_STYLE);
53
56
  });
54
57
 
@@ -19,14 +19,14 @@
19
19
  * 3. **File-type marks** (`file-icon/`) — the language and tool logos a file
20
20
  * list is read by.
21
21
  *
22
- * - `monochrome` — every icon in the surrounding ink. The DEFAULT, because it
23
- * is what Kabmo ships today: an upgrade must not repaint a window the user
24
- * did not ask to change.
22
+ * - `monochrome` — every icon in the surrounding ink. Rendered when the
23
+ * attribute is ABSENT, which is why `ICON_STYLE_WITHOUT_ATTRIBUTE` is
24
+ * `monochrome` and not the default: the ink pass is stated once, in CSS.
25
25
  * - `color` — each icon in its own colour. A brand colour that would
26
26
  * vanish on the active variant (a black logo on a dark theme) keeps the ink
27
27
  * instead, and the generated hues are stated at a lightness that clears the
28
28
  * 3:1 non-text floor on every palette of that variant, so this never trades a
29
- * legible row for a literal hex.
29
+ * legible row for a literal hex. The DEFAULT a fresh install resolves to.
30
30
  *
31
31
  * Every rule is `:where()`-wrapped, so this is a DEFAULT paint and never an
32
32
  * override: a caller's own `text-error` on a missing file, or `text-ink/40` on a
@@ -41,10 +41,18 @@
41
41
  export type IconStyle = 'monochrome' | 'color';
42
42
 
43
43
  /**
44
- * The style a document with no stored preference renders at. Every provider
45
- * mark was ink before this setting existed, so this is the no-change default.
44
+ * The style a fresh install — or any stored value this build cannot draw —
45
+ * resolves to.
46
46
  */
47
- export const DEFAULT_ICON_STYLE: IconStyle = 'monochrome';
47
+ export const DEFAULT_ICON_STYLE: IconStyle = 'color';
48
+
49
+ /**
50
+ * The style CSS paints when `data-icon-style` is absent. Separate from the
51
+ * default for the same reason as `SURFACE_STYLE_WITHOUT_ATTRIBUTE`: the ink
52
+ * pass is written as `:root:not([data-icon-style="color"])`, so only this value
53
+ * may omit the attribute.
54
+ */
55
+ export const ICON_STYLE_WITHOUT_ATTRIBUTE: IconStyle = 'monochrome';
48
56
 
49
57
  /** Document attribute carrying the style. Read by CSS only. */
50
58
  export const ICON_STYLE_ATTRIBUTE = 'data-icon-style';