lookatstudy-mobile 0.20.0 → 0.22.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 (202) hide show
  1. package/package.json +1 -1
  2. package/server.cjs +410 -309
  3. package/web/assets/Tableau10-Cz3F1amA.js +1 -0
  4. package/web/assets/_commonjs-dynamic-modules-TDtrdbi3.js +1 -0
  5. package/web/assets/abnfDiagram-N423BO3Z-BqeMquUh.js +1 -0
  6. package/web/assets/abnfDiagram-VCTEODGH-ODA7YWAP-BuesB7xR.js +1 -0
  7. package/web/assets/api-web-DeJFZI02.js +1 -0
  8. package/web/assets/arc-Bb-hQPAI.js +1 -0
  9. package/web/assets/architectureDiagram-5GKGNRK7-C4PU3XN7-0sZWP2Gt.js +36 -0
  10. package/web/assets/{architectureDiagram-T3A2C74G-djSyr1mz.js → architectureDiagram-T3A2C74G-BUX7eVzV.js} +3 -3
  11. package/web/assets/band-dPffDWoQ.js +1 -0
  12. package/web/assets/blockDiagram-NRAW4CY4-UMJ6PMQQ-DMEi53vA.js +129 -0
  13. package/web/assets/{blockDiagram-VBNYF7ZC-CMyKXBrP.js → blockDiagram-VBNYF7ZC-CquWGiud.js} +4 -4
  14. package/web/assets/c-BIGW1oBm.js +1 -0
  15. package/web/assets/{c4Diagram-5PPSVZJV-BIkHBEIX.js → c4Diagram-5PPSVZJV-DwhWxb7s.js} +2 -2
  16. package/web/assets/c4Diagram-UCG6FXSJ-75X3U2P3-Cw6KuLDN.js +38 -0
  17. package/web/assets/channel-BTMwuCXz.js +1 -0
  18. package/web/assets/chunk-2GRJ4B5K-CzGtEVrd.js +1 -0
  19. package/web/assets/{chunk-2Q5K7J3B-5KwfG7mC.js → chunk-2Q5K7J3B-svQDV2bG.js} +1 -1
  20. package/web/assets/{chunk-5RXB4S5H-BfjkbTOR.js → chunk-5RXB4S5H-CkBumCja.js} +3 -3
  21. package/web/assets/{chunk-5VM5RSS4-CknJ0UrM.js → chunk-5VM5RSS4-DmqVK3OP.js} +1 -1
  22. package/web/assets/{chunk-6Q2QTUOP-PEKlwd8q.js → chunk-6Q2QTUOP-j-yShG78.js} +3 -3
  23. package/web/assets/chunk-7XDTSPCN-BF54U_Qe.js +338 -0
  24. package/web/assets/chunk-CTNIYPP6-BLGT5nzg.js +1 -0
  25. package/web/assets/chunk-CXNFBKHE-CHtCVUVZ.js +15 -0
  26. package/web/assets/{chunk-GF5L2VYU-FwREiZq-.js → chunk-GF5L2VYU-HY4EUgWS.js} +4 -4
  27. package/web/assets/chunk-ISA7TJRJ-AUc9mrxX.js +1 -0
  28. package/web/assets/{chunk-JWPE2WC7-Df8WvQEt.js → chunk-JWPE2WC7-DmzvUH3q.js} +1 -1
  29. package/web/assets/chunk-KBJHAD2P-C3HnMhHX.js +1 -0
  30. package/web/assets/chunk-LV3HUYFY-D3kDosNp.js +1 -0
  31. package/web/assets/chunk-M3IUQBOH-CMBqYbjd.js +231 -0
  32. package/web/assets/chunk-NDIOYS4C-D4XcxlS5.js +1 -0
  33. package/web/assets/chunk-RE4WF27V-ANjTafEs.js +1 -0
  34. package/web/assets/{chunk-RYQCIY6F-w-ex678p.js → chunk-RYQCIY6F-CV9wg8xs.js} +1 -1
  35. package/web/assets/chunk-VII2H2IX-DK2MWM1y.js +1 -0
  36. package/web/assets/chunk-X5GNSKZ3-YRz76YFi.js +206 -0
  37. package/web/assets/chunk-XCWWM2C3-CSRjUbE8.js +88 -0
  38. package/web/assets/chunk-XXDRQBXY-j9X99vQo.js +1 -0
  39. package/web/assets/classDiagram-DTDB5LWJ-LWRDKZ5K-D00H1X9p.js +1 -0
  40. package/web/assets/classDiagram-JCYQIIEL-ClQHMNoR.js +1 -0
  41. package/web/assets/classDiagram-v2-JRS7N3AN-2BZHGRP2-D00H1X9p.js +1 -0
  42. package/web/assets/classDiagram-v2-OCEON4UE-ClQHMNoR.js +1 -0
  43. package/web/assets/colors-Cc3OSVma.js +1 -0
  44. package/web/assets/core-Drxo65nc.js +12 -0
  45. package/web/assets/{cose-bilkent-JH36ORCC-CuRVnite.js → cose-bilkent-JH36ORCC-CN6Mp4ds.js} +1 -1
  46. package/web/assets/cose-bilkent-JH36ORCC-OB24KH3T-Bvxs1RhI.js +1 -0
  47. package/web/assets/cpp-DddhVWhK.js +1 -0
  48. package/web/assets/csharp-DSvCPggb.js +1 -0
  49. package/web/assets/css-CLj8gQPS.js +1 -0
  50. package/web/assets/cynefin-OW5HDTMX-GVF3BKWE-BVXFZGhi.js +178 -0
  51. package/web/assets/{cynefin-VYW2F7L2-deqxDK2d.js → cynefin-VYW2F7L2-CBHvDLlv.js} +1 -1
  52. package/web/assets/cynefinDiagram-5FMLGOSQ-H3WIRU3N-CM4Mj-Vd.js +62 -0
  53. package/web/assets/cynefinDiagram-MW4NZA55-aMzbAFWs.js +62 -0
  54. package/web/assets/dagre-3AP2YEHR-DCERTXHT-BMVGWTPf.js +4 -0
  55. package/web/assets/{dagre-VZM6K2ZE-CGNHDakS.js → dagre-VZM6K2ZE-DhQcrBKB.js} +2 -2
  56. package/web/assets/{defaultLocale-DX6XiGOO.js → defaultLocale-5voVPcsN.js} +1 -1
  57. package/web/assets/{diagram-7IWD3JNH-D_gUTAQc.js → diagram-7IWD3JNH-neTaugq1.js} +4 -4
  58. package/web/assets/{diagram-B4RE2ZJO-YGyPH2BM.js → diagram-B4RE2ZJO-D9KmoYBV.js} +3 -3
  59. package/web/assets/diagram-LBJQPF4R-9J-F2MVE.js +24 -0
  60. package/web/assets/diagram-Q27KOJAE-Dz9KITJh.js +24 -0
  61. package/web/assets/diagram-S7CK7UJ4-MULGZGEL-r3BljA8e.js +30 -0
  62. package/web/assets/diagram-UB23O5K3-BA5gPgQ7.js +41 -0
  63. package/web/assets/diagram-UQ7AKVKN-YQBY353J-IIvT6Y42.js +41 -0
  64. package/web/assets/diagram-VSXAHHWV-WLNH2ELY-BMCz6ope.js +3 -0
  65. package/web/assets/diagram-VX7I27RA-XW6YQV5G-Z3lYjMVR.js +24 -0
  66. package/web/assets/diagram-Z3DM3KII-HG7RF65D-CsLqhzUJ.js +24 -0
  67. package/web/assets/diff-D97Zzqfu.js +1 -0
  68. package/web/assets/dockerfile-BcOcwvcX.js +1 -0
  69. package/web/assets/ebnfDiagram-BXEA7PRR-BoUlG0c_.js +1 -0
  70. package/web/assets/ebnfDiagram-PWID7BFC-OKY4VHYD-CgMcEf9P.js +1 -0
  71. package/web/assets/elk.bundled-DjGexDyy.js +24 -0
  72. package/web/assets/engine-javascript-DBd1bXLz.js +141 -0
  73. package/web/assets/{erDiagram-JOGREHBK-BuY7vR4r.js → erDiagram-JOGREHBK-DV_Tzdk0.js} +4 -4
  74. package/web/assets/erDiagram-SSCWMZ5O-PIPKOIK7-Ct9t5yN5.js +99 -0
  75. package/web/assets/flowDiagram-A5DVABFB-2Z4AVO5R-C4iDReFc.js +168 -0
  76. package/web/assets/{flowDiagram-UKHOOZJN-TxEOjs8K.js → flowDiagram-UKHOOZJN-DvQGnBrF.js} +10 -10
  77. package/web/assets/ganttDiagram-EL5Y4UJY-JZNG7GOG-BPWBTDqB.js +292 -0
  78. package/web/assets/ganttDiagram-PKOTCBZU-7gjvaw6I.js +292 -0
  79. package/web/assets/{gitGraphDiagram-DS77QQ5N-rZzK4UXV.js → gitGraphDiagram-DS77QQ5N-B54T3l5T.js} +7 -7
  80. package/web/assets/gitGraphDiagram-WWUBYQGX-DMWMLL3G-CmG0_dMg.js +106 -0
  81. package/web/assets/github-dark-DHJKELXO.js +1 -0
  82. package/web/assets/github-light-DAi9KRSo.js +1 -0
  83. package/web/assets/go-C27-OAKa.js +1 -0
  84. package/web/assets/graphql-ChdNCCLP.js +1 -0
  85. package/web/assets/html-pp8916En.js +1 -0
  86. package/web/assets/{index-DFfbtrtQ.js → index-B6q9ygFx.js} +9 -9
  87. package/web/assets/index-CU6ublfJ.js +1 -0
  88. package/web/assets/index-CvYzv8kf.js +1 -0
  89. package/web/assets/index-Cz8nGS3-.css +1 -0
  90. package/web/assets/index-H1bePBGl.js +3 -0
  91. package/web/assets/index-yzG6be5R.js +416 -0
  92. package/web/assets/infoDiagram-6WML65LV-BJSGxY2D.js +2 -0
  93. package/web/assets/infoDiagram-RXCK75RN-HANS5KVC-Cz3Y1Unl.js +2 -0
  94. package/web/assets/ini-BEwlwnbL.js +1 -0
  95. package/web/assets/ishikawaDiagram-5VMMS53U-7GCIT7WU-BT6MsYfb.js +70 -0
  96. package/web/assets/{ishikawaDiagram-WSZJBQD7-B4Ja0YPZ.js → ishikawaDiagram-WSZJBQD7-BsYCRLYP.js} +6 -6
  97. package/web/assets/java-CylS5w8V.js +1 -0
  98. package/web/assets/javascript-wDzz0qaB.js +1 -0
  99. package/web/assets/journeyDiagram-EYS64GPL-OAPELBT7-Bx1wxARt.js +139 -0
  100. package/web/assets/{journeyDiagram-NVQOT4AX-BmhpGG29.js → journeyDiagram-NVQOT4AX-DkJv2QF6.js} +2 -2
  101. package/web/assets/json-Cp-IABpG.js +1 -0
  102. package/web/assets/jsx-g9-lgVsj.js +1 -0
  103. package/web/assets/{kanban-definition-27J2QSJJ-CiuTLc9W.js → kanban-definition-27J2QSJJ-BCWiZznF.js} +8 -8
  104. package/web/assets/kanban-definition-3QL26DDD-I7RKWQQY-uHjeKCG_.js +89 -0
  105. package/web/assets/katex-N6JRN4PM-D4hrRJKq.js +257 -0
  106. package/web/assets/kotlin-BdnUsdx6.js +1 -0
  107. package/web/assets/latex-B2nUCzCX.js +1 -0
  108. package/web/assets/linear-BHfMepXe.js +1 -0
  109. package/web/assets/lua-BaeVxFsk.js +1 -0
  110. package/web/assets/main-B239_4z1.js +796 -0
  111. package/web/assets/makefile-CHLpvVh8.js +1 -0
  112. package/web/assets/markdown-Cvjx9yec.js +1 -0
  113. package/web/assets/mermaid-layout-elk.core-C4McJve2.js +2 -0
  114. package/web/assets/mermaid.core-CmjrekXI.js +314 -0
  115. package/web/assets/min-tv6RD-6E.js +1 -0
  116. package/web/assets/{mindmap-definition-FAOFIHXS-Bt-VPht2.js → mindmap-definition-FAOFIHXS-PIVNjK20.js} +4 -4
  117. package/web/assets/mindmap-definition-FBJOCRG2-KIYZG64Y-C8ko7Fkc.js +96 -0
  118. package/web/assets/pegDiagram-VL7TDLO6-D0oejFBc.js +1 -0
  119. package/web/assets/pegDiagram-XKGWAZYB-OIP57N6J-Cqs1jeYc.js +1 -0
  120. package/web/assets/{pet-a4xGZJ4o.js → pet-CZ36ImJS.js} +1 -1
  121. package/web/assets/php-Csjmro_R.js +1 -0
  122. package/web/assets/pie-xhYaZtwS.js +1 -0
  123. package/web/assets/pieDiagram-7S7Q4E2Y-CdvhM-aN.js +39 -0
  124. package/web/assets/pieDiagram-E7YTZNPT-2UOTW327-BMlCBlPI.js +39 -0
  125. package/web/assets/python-B6aJPvgy.js +1 -0
  126. package/web/assets/quadrantDiagram-AXDQQJYC-SN3ASJJK-CEEgxhrf.js +7 -0
  127. package/web/assets/{quadrantDiagram-CIZ2JOQS-B-1McWhJ.js → quadrantDiagram-CIZ2JOQS-BrKm5erH.js} +2 -2
  128. package/web/assets/r-Cf5RLm7j.js +1 -0
  129. package/web/assets/railroadDiagram-AXF67PYL-CJudf8AD.js +1 -0
  130. package/web/assets/railroadDiagram-O6MQD6OU-34742W6X-C8RacTGn.js +1 -0
  131. package/web/assets/render-O7CIS3YK-BtRzL6gS.js +354 -0
  132. package/web/assets/requirementDiagram-EFPCY7ZU-NGAFFSMB-CTXLwcL9.js +84 -0
  133. package/web/assets/{requirementDiagram-LRYGKXZP-BVqLmmFw.js → requirementDiagram-LRYGKXZP-mS__tKrf.js} +4 -4
  134. package/web/assets/ruby-B6QtyW_S.js +1 -0
  135. package/web/assets/rust-B1yitclQ.js +1 -0
  136. package/web/assets/sankeyDiagram-P5KCCOFB-3D3M4XPB-DyuDtBvQ.js +40 -0
  137. package/web/assets/sankeyDiagram-W5VNT64P-COKGPXfA.js +40 -0
  138. package/web/assets/scss-D5BDwBP9.js +1 -0
  139. package/web/assets/{sequenceDiagram-SI44F4Z6-7pBYtwXq.js → sequenceDiagram-SI44F4Z6-CNMY38eS.js} +3 -3
  140. package/web/assets/sequenceDiagram-WJ2MYXX4-Q2IOPB4R-_u4WjXk1.js +162 -0
  141. package/web/assets/shellscript-Yzrsuije.js +1 -0
  142. package/web/assets/sizeCapture-X5ZJPWSS-DWdLSp6i.js +1 -0
  143. package/web/assets/sizeCapture-X5ZJPWSS-PSGVOMYM-Cs-f36Xi.js +1 -0
  144. package/web/assets/sql-CRqJ_cUM.js +1 -0
  145. package/web/assets/stateDiagram-HBIQ2CUA-4M2S6MAN-D3Vb1Yoi.js +1 -0
  146. package/web/assets/stateDiagram-OKZ733FA-DWpXAgAW.js +1 -0
  147. package/web/assets/stateDiagram-v2-4QOOHH4V-LBBLA2WV-C6PXffxU.js +1 -0
  148. package/web/assets/stateDiagram-v2-UEYNNEHI-D3rCYZ7F.js +1 -0
  149. package/web/assets/step-SI6FXFD6.js +1 -0
  150. package/web/assets/swift-C2oV4EkX.js +1 -0
  151. package/web/assets/swimlanes-SLNWSIFB--qlM3PH1.js +2 -0
  152. package/web/assets/swimlanes-XN3QIQJK-N6N2CCQ6-Dq7F7g7w.js +1 -0
  153. package/web/assets/swimlanesDiagram-ULZ7WXOC-C2JzshU-.js +8 -0
  154. package/web/assets/swimlanesDiagram-VK2B7HYN-E6N4H5SY-C1mY3FR0.js +8 -0
  155. package/web/assets/time-CLfYygnx.js +1 -0
  156. package/web/assets/timeline-definition-24CTP7MA-KN7RSRVM-BRP9kk4o.js +120 -0
  157. package/web/assets/{timeline-definition-Z64GVDOM-CPyFZDbL.js → timeline-definition-Z64GVDOM-CGIURnLx.js} +4 -4
  158. package/web/assets/toml-vGWfd6FD.js +1 -0
  159. package/web/assets/transform-CzGDKG_M.js +1 -0
  160. package/web/assets/tsx-COt5Ahok.js +1 -0
  161. package/web/assets/typescript-BPQ3VLAy.js +1 -0
  162. package/web/assets/vennDiagram-4TSXK5OY-AKJ7LXAN-Row28BrM.js +34 -0
  163. package/web/assets/{vennDiagram-T6HMQDX7-CrYCZIBM.js → vennDiagram-T6HMQDX7-CCAqbOji.js} +5 -5
  164. package/web/assets/vue-CHlpWS_5.js +1 -0
  165. package/web/assets/{wardleyDiagram-T6FBY63Y-C-bOW3CV.js → wardleyDiagram-T6FBY63Y-BsHQ7eqA.js} +2 -2
  166. package/web/assets/wardleyDiagram-VM6X3IG4-3B6A3BN5-DBcNZZDs.js +78 -0
  167. package/web/assets/xml-sdJ4AIDG.js +1 -0
  168. package/web/assets/xychartDiagram-ELKLHX3M-Bdjq4REQ.js +7 -0
  169. package/web/assets/xychartDiagram-S5SC5T6Z-OBDNV6WG-ClGm8SGz.js +7 -0
  170. package/web/assets/yaml-Buea-lGh.js +1 -0
  171. package/web/index.html +3 -3
  172. package/web/pet.html +3 -3
  173. package/web/assets/abnfDiagram-N423BO3Z-BgfNjjBj.js +0 -1
  174. package/web/assets/api-web-DI50TDfG.js +0 -1
  175. package/web/assets/arc-RE7zZVS-.js +0 -1
  176. package/web/assets/channel-BhfjE8vu.js +0 -1
  177. package/web/assets/chunk-2GRJ4B5K-Cam0QBnt.js +0 -1
  178. package/web/assets/chunk-KBJHAD2P-BsrsrevO.js +0 -1
  179. package/web/assets/chunk-XXDRQBXY-BtPTE4dn.js +0 -1
  180. package/web/assets/classDiagram-JCYQIIEL-mL7PrSyJ.js +0 -1
  181. package/web/assets/classDiagram-v2-OCEON4UE-mL7PrSyJ.js +0 -1
  182. package/web/assets/cynefinDiagram-MW4NZA55-BVpP0nLh.js +0 -62
  183. package/web/assets/diagram-LBJQPF4R-B32aZsIz.js +0 -24
  184. package/web/assets/diagram-Q27KOJAE-DwwhihNN.js +0 -24
  185. package/web/assets/diagram-UB23O5K3-BdxB0b3R.js +0 -41
  186. package/web/assets/ebnfDiagram-BXEA7PRR-PAN05I_q.js +0 -1
  187. package/web/assets/ganttDiagram-PKOTCBZU-BqnBC4Aw.js +0 -292
  188. package/web/assets/index-D8iAKGNi.css +0 -1
  189. package/web/assets/infoDiagram-6WML65LV-B4sR-B3M.js +0 -2
  190. package/web/assets/linear-l0VVDmXM.js +0 -1
  191. package/web/assets/main-5hScumEl.js +0 -792
  192. package/web/assets/mermaid.core-DZ6Z8vWa.js +0 -314
  193. package/web/assets/pegDiagram-VL7TDLO6-CANPvqfq.js +0 -1
  194. package/web/assets/pieDiagram-7S7Q4E2Y-HpK8uEiY.js +0 -39
  195. package/web/assets/railroadDiagram-AXF67PYL-DA507-no.js +0 -1
  196. package/web/assets/sankeyDiagram-W5VNT64P-WV_Swfln.js +0 -40
  197. package/web/assets/sizeCapture-X5ZJPWSS-Ba9eWTxX.js +0 -1
  198. package/web/assets/stateDiagram-OKZ733FA-lonr0yA-.js +0 -1
  199. package/web/assets/stateDiagram-v2-UEYNNEHI-Dt1VC3TV.js +0 -1
  200. package/web/assets/swimlanes-SLNWSIFB-BSQT7r6F.js +0 -2
  201. package/web/assets/swimlanesDiagram-ULZ7WXOC-Dhdnb080.js +0 -8
  202. package/web/assets/xychartDiagram-ELKLHX3M-BB-TjDfD.js +0 -7
@@ -0,0 +1,78 @@
1
+ import{p as zt}from"./chunk-VII2H2IX-DK2MWM1y.js";import{p as Lt}from"./cynefin-OW5HDTMX-GVF3BKWE-BVXFZGhi.js";import{s as Tt,g as Xt,o as Et,n as Yt,a as It,b as Bt,_ as y,I as Ft,A as Rt,C as yt,l as wt,G as Ot,d as Wt,p as Dt,c as V}from"./render-O7CIS3YK-BtRzL6gS.js";import{_ as b}from"./mermaid-layout-elk.core-C4McJve2.js";import"./main-B239_4z1.js";import"./index-B6q9ygFx.js";import"./transform-CzGDKG_M.js";import"./step-SI6FXFD6.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";var q=y((a,o)=>{const e=a<=1?a*100:a;if(e<0||e>100)throw new Error(`${o} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return e},"toPercent"),Y=y((a,o,e)=>({x:q(o,`${e} evolution`),y:q(a,`${e} visibility`)}),"toCoordinates"),mt=y(a=>{if(a){if(a==="+<>")return"bidirectional";if(a==="+<")return"backward";if(a==="+>")return"forward"}},"getFlowFromPort"),Gt=y(a=>{if(!(a!=null&&a.startsWith("+")))return{};const o=/^\+'([^']*)'/.exec(a),e=o==null?void 0:o[1];return a.includes("<>")?{flow:"bidirectional",label:e}:a.includes("<")?{flow:"backward",label:e}:a.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),qt=y((a,o)=>{if(zt(a,o),a.size&&o.setSize(a.size.width,a.size.height),a.evolution){const e=a.evolution.stages.map(r=>r.secondName?`${r.name.trim()} / ${r.secondName.trim()}`:r.name.trim()),p=a.evolution.stages.filter(r=>r.boundary!==void 0).map(r=>r.boundary);o.updateAxes({stages:e,stageBoundaries:p})}if(a.anchors.forEach(e=>{const p=Y(e.visibility,e.evolution,`Anchor "${e.name}"`);o.addNode(e.name,e.name,p.x,p.y,"anchor")}),a.components.forEach(e=>{var P;const p=Y(e.visibility,e.evolution,`Component "${e.name}"`),r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,m=(P=e.decorator)==null?void 0:P.strategy;o.addNode(e.name,e.name,p.x,p.y,"component",r,d,e.inertia,m)}),a.notes.forEach(e=>{const p=Y(e.visibility,e.evolution,`Note "${e.text}"`);o.addNote(e.text,p.x,p.y)}),a.pipelines.forEach(e=>{const p=o.getNode(e.parent);if(!p||typeof p.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const r=p.y;o.startPipeline(e.parent),e.components.forEach(d=>{const m=`${e.parent}_${d.name}`,P=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,L=q(d.evolution,`Pipeline component "${d.name}" evolution`);o.addNode(m,d.name,L,r,"pipeline-component",P,g),o.addPipelineComponent(e.parent,m)})}),a.links.forEach(e=>{const p=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let r=mt(e.fromPort)??mt(e.toPort);const{flow:d,label:m}=Gt(e.arrow);!r&&d&&(r=d);const P=e.linkLabel,g=m??P;o.addLink(o.resolveNodeId(e.from),o.resolveNodeId(e.to),p,g,r)}),a.evolves.forEach(e=>{const p=o.getNode(e.component);if((p==null?void 0:p.y)!==void 0){const r=q(e.target,`Evolve target for "${e.component}"`);o.addTrend(e.component,r,p.y)}}),a.annotations.length>0){const e=a.annotations[0],p=Y(e.x,e.y,"Annotations box");o.setAnnotationsBox(p.x,p.y)}a.annotation.forEach(e=>{const p=Y(e.x,e.y,`Annotation ${e.number}`);o.addAnnotation(e.number,[{x:p.x,y:p.y}],e.text)}),a.accelerators.forEach(e=>{const p=Y(e.x,e.y,`Accelerator "${e.name}"`);o.addAccelerator(e.name,p.x,p.y)}),a.deaccelerators.forEach(e=>{const p=Y(e.x,e.y,`Deaccelerator "${e.name}"`);o.addDeaccelerator(e.name,p.x,p.y)})},"populateDb"),kt={parser:{yy:void 0},parse:y(async a=>{var p;const o=await Lt("wardley",a);wt.debug(o);const e=(p=kt.parser)==null?void 0:p.yy;if(!e||typeof e.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");qt(o,e)},"parse")},I,Ht=(I=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(o){const e=this.nodes.get(o.id)??{id:o.id,label:o.label},p={...e,...o,className:o.className??e.className,labelOffsetX:o.labelOffsetX??e.labelOffsetX,labelOffsetY:o.labelOffsetY??e.labelOffsetY};this.nodes.set(o.id,p)}addLink(o){this.links.push(o)}addTrend(o){this.trends.set(o.nodeId,o)}startPipeline(o){this.pipelines.set(o,{nodeId:o,componentIds:[]});const e=this.nodes.get(o);e&&(e.isPipelineParent=!0)}addPipelineComponent(o,e){const p=this.pipelines.get(o);p&&p.componentIds.push(e);const r=this.nodes.get(e);r&&(r.inPipeline=!0)}addAnnotation(o){this.annotations.push(o)}addNote(o){this.notes.push(o)}addAccelerator(o){this.accelerators.push(o)}addDeaccelerator(o){this.deaccelerators.push(o)}setAnnotationsBox(o,e){this.annotationsBox={x:o,y:e}}setAxes(o){this.axes={...this.axes,...o}}setSize(o,e){this.size={width:o,height:e}}getNode(o){return this.nodes.get(o)}resolveNodeId(o){if(this.nodes.has(o))return o;for(const[e,p]of this.nodes)if(p.label===o)return e;return o}build(){const o=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);o.push(e)}return{nodes:o,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},b(I,"WardleyBuilder"),y(I,"WardleyBuilder"),I),$=new Ht;function Z(){return V()["wardley-beta"]}b(Z,"getConfig3");y(Z,"getConfig");function U(a,o,e,p,r,d,m,P,g){$.addNode({id:a,label:o,x:e,y:p,className:r,labelOffsetX:d,labelOffsetY:m,inertia:P,sourceStrategy:g})}b(U,"addNode");y(U,"addNode");function J(a,o,e=!1,p,r){$.addLink({source:a,target:o,dashed:e,label:p,flow:r})}b(J,"addLink");y(J,"addLink");function K(a,o,e){$.addTrend({nodeId:a,targetX:o,targetY:e})}b(K,"addTrend");y(K,"addTrend");function Q(a,o,e){$.addAnnotation({number:a,coordinates:o,text:e})}b(Q,"addAnnotation");y(Q,"addAnnotation");function tt(a,o,e){$.addNote({text:a,x:o,y:e})}b(tt,"addNote");y(tt,"addNote");function et(a,o,e){$.addAccelerator({name:a,x:o,y:e})}b(et,"addAccelerator");y(et,"addAccelerator");function at(a,o,e){$.addDeaccelerator({name:a,x:o,y:e})}b(at,"addDeaccelerator");y(at,"addDeaccelerator");function rt(a,o){$.setAnnotationsBox(a,o)}b(rt,"setAnnotationsBox");y(rt,"setAnnotationsBox");function ot(a,o){$.setSize(a,o)}b(ot,"setSize");y(ot,"setSize");function st(a){$.startPipeline(a)}b(st,"startPipeline");y(st,"startPipeline");function nt(a,o){$.addPipelineComponent(a,o)}b(nt,"addPipelineComponent");y(nt,"addPipelineComponent");function it(a){$.setAxes(a)}b(it,"updateAxes");y(it,"updateAxes");function dt(a){return $.getNode(a)}b(dt,"getNode");y(dt,"getNode");function lt(a){return $.resolveNodeId(a)}b(lt,"resolveNodeId");y(lt,"resolveNodeId");function ct(){return $.build()}b(ct,"getWardleyData");y(ct,"getWardleyData");function pt(){$.clear(),Dt()}b(pt,"clear2");y(pt,"clear");var _t={getConfig:Z,addNode:U,addLink:J,addTrend:K,addAnnotation:Q,addNote:tt,addAccelerator:et,addDeaccelerator:at,setAnnotationsBox:rt,setSize:ot,startPipeline:st,addPipelineComponent:nt,updateAxes:it,getNode:dt,resolveNodeId:lt,getWardleyData:ct,clear:pt,setAccTitle:Bt,getAccTitle:It,setDiagramTitle:Yt,getDiagramTitle:Et,getAccDescription:Xt,setAccDescription:Tt},jt=["Genesis","Custom Built","Product","Commodity"],Vt=y(()=>{var o,e,p,r,d,m,P,g,L,N,k,C;const{themeVariables:a}=V();return{backgroundColor:((o=a.wardley)==null?void 0:o.backgroundColor)??a.background??"#fff",axisColor:((e=a.wardley)==null?void 0:e.axisColor)??"#000",axisTextColor:((p=a.wardley)==null?void 0:p.axisTextColor)??a.primaryTextColor??"#222",gridColor:((r=a.wardley)==null?void 0:r.gridColor)??"rgba(100, 100, 100, 0.2)",componentFill:((d=a.wardley)==null?void 0:d.componentFill)??"#fff",componentStroke:((m=a.wardley)==null?void 0:m.componentStroke)??"#000",componentLabelColor:((P=a.wardley)==null?void 0:P.componentLabelColor)??a.primaryTextColor??"#222",linkStroke:((g=a.wardley)==null?void 0:g.linkStroke)??"#000",evolutionStroke:((L=a.wardley)==null?void 0:L.evolutionStroke)??"#dc3545",annotationStroke:((N=a.wardley)==null?void 0:N.annotationStroke)??"#000",annotationTextColor:((k=a.wardley)==null?void 0:k.annotationTextColor)??a.primaryTextColor??"#222",annotationFill:((C=a.wardley)==null?void 0:C.annotationFill)??a.background??"#fff"}},"getTheme"),Zt=y(()=>{const a=V()["wardley-beta"];return{width:(a==null?void 0:a.width)??900,height:(a==null?void 0:a.height)??600,padding:(a==null?void 0:a.padding)??48,nodeRadius:(a==null?void 0:a.nodeRadius)??6,nodeLabelOffset:(a==null?void 0:a.nodeLabelOffset)??8,axisFontSize:(a==null?void 0:a.axisFontSize)??12,labelFontSize:(a==null?void 0:a.labelFontSize)??10,showGrid:(a==null?void 0:a.showGrid)??!1,useMaxWidth:(a==null?void 0:a.useMaxWidth)??!0}},"getConfigValues"),Ut=y((a,o,e,p)=>{var gt,ut;wt.debug(`Rendering Wardley map
2
+ `+a);const r=Zt(),d=Vt(),m=r.nodeRadius*1.6,P=p.db,g=P.getWardleyData(),L=P.getDiagramTitle(),N=((gt=g.size)==null?void 0:gt.width)??r.width,k=((ut=g.size)==null?void 0:ut.height)??r.height,C=Ot(o);C.selectAll("*").remove(),Wt(C,k,N,r.useMaxWidth),C.attr("viewBox",`0 0 ${N} ${k}`);const S=C.append("g").attr("class","wardley-map"),H=C.append("defs");H.append("marker").attr("id",`arrow-${o}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),H.append("marker").attr("id",`link-arrow-end-${o}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),H.append("marker").attr("id",`link-arrow-start-${o}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),S.append("rect").attr("class","wardley-background").attr("width",N).attr("height",k).attr("fill",d.backgroundColor);const F=N-r.padding*2,R=k-r.padding*2;L&&S.append("text").attr("class","wardley-title").attr("x",N/2).attr("y",r.padding/2).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(L);const T=y(t=>r.padding+t/100*F,"projectX"),X=y(t=>k-r.padding-t/100*R,"projectY"),W=S.append("g").attr("class","wardley-axes");W.append("line").attr("x1",r.padding).attr("x2",N-r.padding).attr("y1",k-r.padding).attr("y2",k-r.padding).attr("stroke",d.axisColor).attr("stroke-width",1),W.append("line").attr("x1",r.padding).attr("x2",r.padding).attr("y1",r.padding).attr("y2",k-r.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const bt=g.axes.xLabel??"Evolution",$t=g.axes.yLabel??"Visibility";W.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",r.padding+F/2).attr("y",k-r.padding/4).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(bt),W.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",r.padding/3).attr("y",r.padding+R/2).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${r.padding/3} ${r.padding+R/2})`).text($t);const O=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:jt;if(O.length>0){const t=S.append("g").attr("class","wardley-stages"),n=g.axes.stageBoundaries,s=[];if(n&&n.length===O.length){let i=0;n.forEach(x=>{s.push({start:i,end:x}),i=x})}else{const i=1/O.length;O.forEach((x,l)=>{s.push({start:l*i,end:(l+1)*i})})}O.forEach((i,x)=>{const l=s[x],h=r.padding+l.start*F,f=r.padding+l.end*F,u=(h+f)/2;x>0&&t.append("line").attr("x1",h).attr("x2",h).attr("y1",r.padding).attr("y2",k-r.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",u).attr("y",k-r.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(r.showGrid){const t=S.append("g").attr("class","wardley-grid");for(let n=1;n<4;n++){const s=n/4,i=r.padding+F*s;t.append("line").attr("x1",i).attr("x2",i).attr("y1",r.padding).attr("y2",k-r.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",r.padding).attr("x2",N-r.padding).attr("y1",k-r.padding-R*s).attr("y2",k-r.padding-R*s).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:T(t.x),y:X(t.y),node:t})}),g.pipelines.length>0){const t=S.append("g").attr("class","wardley-pipelines"),n=S.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(s=>{if(s.componentIds.length===0)return;const i=s.componentIds.map(f=>({id:f,pos:c.get(f),node:g.nodes.find(u=>u.id===f)})).filter(f=>f.pos&&f.node).sort((f,u)=>f.node.x-u.node.x);for(let f=0;f<i.length-1;f++){const u=i[f],w=i[f+1];n.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",u.pos.x).attr("y1",u.pos.y).attr("x2",w.pos.x).attr("y2",w.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let x=1/0,l=-1/0,h=0;if(s.componentIds.forEach(f=>{const u=c.get(f);u&&(x=Math.min(x,u.x),l=Math.max(l,u.x),h=u.y)}),x!==1/0&&l!==-1/0){const u=r.nodeRadius*4,w=h-u/2,M=c.get(s.nodeId);if(M){const z=(x+l)/2;M.x=z,M.y=w-m/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",x-15).attr("y",w).attr("width",l-x+30).attr("height",u).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const xt=S.append("g").attr("class","wardley-links"),ht=new Map;g.pipelines.forEach(t=>{ht.set(t.nodeId,new Set(t.componentIds))});const ft=g.links.filter(t=>{if(!c.has(t.source)||!c.has(t.target))return!1;const n=ht.get(t.target);return!(n!=null&&n.has(t.source))});xt.selectAll("line").data(ft).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const n=c.get(t.source),s=c.get(t.target),x=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=s.x-n.x,h=s.y-n.y,f=Math.sqrt(l*l+h*h);return n.x+l/f*x}).attr("y1",t=>{const n=c.get(t.source),s=c.get(t.target),x=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=s.x-n.x,h=s.y-n.y,f=Math.sqrt(l*l+h*h);return n.y+h/f*x}).attr("x2",t=>{const n=c.get(t.source),s=c.get(t.target),x=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=n.x-s.x,h=n.y-s.y,f=Math.sqrt(l*l+h*h);return s.x+l/f*x}).attr("y2",t=>{const n=c.get(t.source),s=c.get(t.target),x=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=n.x-s.x,h=n.y-s.y,f=Math.sqrt(l*l+h*h);return s.y+h/f*x}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${o})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${o})`:null),xt.selectAll("text").data(ft.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,x=s.y-n.y,l=s.x-n.x,h=Math.sqrt(l*l+x*x),f=8,u=x/h;return i+u*f}).attr("y",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.y+s.y)/2,x=s.x-n.x,l=s.y-n.y,h=Math.sqrt(x*x+l*l),f=8,u=-x/h;return i+u*f}).attr("fill",d.axisTextColor).attr("font-size",r.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,x=(n.y+s.y)/2,l=s.x-n.x,h=s.y-n.y,f=Math.sqrt(l*l+h*h),u=8,w=h/f,M=-l/f,z=i+w*u,D=x+M*u;let B=Math.atan2(h,l)*180/Math.PI;return(B>90||B<-90)&&(B+=180),`rotate(${B} ${z} ${D})`}).text(t=>t.label);const vt=S.append("g").attr("class","wardley-trends"),Pt=g.trends.map(t=>{const n=c.get(t.nodeId);if(!n)return null;const s=T(t.targetX),i=X(t.targetY),x=s-n.x,l=i-n.y,h=Math.sqrt(x*x+l*l),f=r.nodeRadius+2,u=h>f?s-x/h*f:s,w=h>f?i-l/h*f:i;return{origin:n,targetX:s,targetY:i,adjustedX2:u,adjustedY2:w}}).filter(t=>t!==null);vt.selectAll("line").data(Pt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${o})`);const A=S.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));A.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),A.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),A.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const E=A.filter(t=>t.sourceStrategy==="market");E.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),A.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const _=r.nodeRadius*.7,v=r.nodeRadius*1.2;if(E.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-v).attr("x2",t=>c.get(t.id).x-v*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+v*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),E.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-v*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+v*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+v*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+v*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),E.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+v*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+v*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-v).attr("stroke",d.componentStroke).attr("stroke-width",1),E.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-v).attr("r",_).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),E.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-v*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+v*Math.sin(Math.PI/6)).attr("r",_).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),E.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+v*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+v*Math.sin(Math.PI/6)).attr("r",_).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),A.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-m/2).attr("y",t=>c.get(t.id).y-m/2).attr("width",m).attr("height",m).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),A.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:r.nodeRadius+15;return t.sourceStrategy&&(s+=r.nodeRadius+10),n.x+s}).attr("y1",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:r.nodeRadius*2;return n.y-s/2}).attr("x2",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:r.nodeRadius+15;return t.sourceStrategy&&(s+=r.nodeRadius+10),n.x+s}).attr("y2",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:r.nodeRadius*2;return n.y+s/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),A.append("text").attr("x",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?n.x+t.labelOffsetX:n.x;let s=r.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(s+=10);const i=t.labelOffsetX??s;return n.x+i}).attr("y",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?n.y+t.labelOffsetY:n.y-3;let s=-r.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(s-=10);const i=t.labelOffsetY??s;return n.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",r.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),g.annotations.length>0){const t=S.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(n=>{const s=n.coordinates.map(i=>({x:T(i.x),y:X(i.y)}));if(s.length>1)for(let i=0;i<s.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",s[i].x).attr("y1",s[i].y).attr("x2",s[i+1].x).attr("y2",s[i+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");s.forEach(i=>{const x=t.append("g").attr("class","wardley-annotation");x.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),x.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.number)})}),g.annotationsBox){let n=T(g.annotationsBox.x),s=X(g.annotationsBox.y);const i=10,x=16,l=11,h=t.append("g").attr("class","wardley-annotations-box"),f=[...g.annotations].filter(w=>w.text).sort((w,M)=>w.number-M.number),u=[];if(f.forEach((w,M)=>{const z=h.append("text").attr("x",n+i).attr("y",s+i+(M+1)*x).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${w.number}. ${w.text}`);u.push(z)}),u.length>0){let w=0,M=0;u.forEach(j=>{const G=j.node(),Ct=G.getComputedTextLength();w=Math.max(w,Ct);const At=G.getBBox();M=Math.max(M,At.height)});const z=w+i*2+105,D=f.length*x+i*2+M/2,B=r.padding,St=N-r.padding-z,Mt=r.padding,Nt=k-r.padding-D;n=Math.max(B,Math.min(n,St)),s=Math.max(Mt,Math.min(s,Nt)),u.forEach((j,G)=>{j.attr("x",n+i).attr("y",s+i+(G+1)*x)}),h.insert("rect","text").attr("x",n).attr("y",s).attr("width",z).attr("height",D).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){const t=S.append("g").attr("class","wardley-notes");g.notes.forEach(n=>{const s=T(n.x),i=X(n.y);t.append("text").attr("x",s).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.text)})}if(g.accelerators.length>0){const t=S.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(n=>{const s=T(n.x),i=X(n.y),x=60,l=30,h=20,f=`
3
+ M ${s} ${i-l/2}
4
+ L ${s+x-h} ${i-l/2}
5
+ L ${s+x-h} ${i-l/2-8}
6
+ L ${s+x} ${i}
7
+ L ${s+x-h} ${i+l/2+8}
8
+ L ${s+x-h} ${i+l/2}
9
+ L ${s} ${i+l/2}
10
+ Z
11
+ `;t.append("path").attr("d",f).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),t.append("text").attr("x",s+x/2).attr("y",i+l/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.name)})}if(g.deaccelerators.length>0){const t=S.append("g").attr("class","wardley-deaccelerators");g.deaccelerators.forEach(n=>{const s=T(n.x),i=X(n.y),x=60,l=30,h=20,f=`
12
+ M ${s+x} ${i-l/2}
13
+ L ${s+h} ${i-l/2}
14
+ L ${s+h} ${i-l/2-8}
15
+ L ${s} ${i}
16
+ L ${s+h} ${i+l/2+8}
17
+ L ${s+h} ${i+l/2}
18
+ L ${s+x} ${i+l/2}
19
+ Z
20
+ `;t.append("path").attr("d",f).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),t.append("text").attr("x",s+x/2).attr("y",i+l/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.name)})}},"draw"),Jt={draw:Ut},Kt=y(({wardley:a}={})=>{const o=Ft(),e=Rt(),p=yt(o,e.themeVariables),r=yt(p.wardley,a);return`
21
+ .wardley-background {
22
+ fill: ${r.backgroundColor};
23
+ }
24
+ .wardley-axes line, .wardley-axes path {
25
+ stroke: ${r.axisColor};
26
+ }
27
+ .wardley-axis-label {
28
+ fill: ${r.axisTextColor};
29
+ }
30
+ .wardley-stage-label {
31
+ fill: ${r.axisTextColor};
32
+ }
33
+ .wardley-grid line {
34
+ stroke: ${r.gridColor};
35
+ }
36
+ .wardley-node circle {
37
+ fill: ${r.componentFill};
38
+ stroke: ${r.componentStroke};
39
+ }
40
+ .wardley-node-label {
41
+ fill: ${r.componentLabelColor};
42
+ }
43
+ .wardley-link {
44
+ stroke: ${r.linkStroke};
45
+ }
46
+ .wardley-link--dashed {
47
+ stroke-dasharray: 4 4;
48
+ }
49
+ .wardley-link-label {
50
+ fill: ${r.axisTextColor};
51
+ }
52
+ .wardley-trend line {
53
+ stroke: ${r.evolutionStroke};
54
+ }
55
+ .wardley-annotation-line {
56
+ stroke: ${r.annotationStroke};
57
+ }
58
+ .wardley-annotation circle {
59
+ fill: ${r.annotationFill};
60
+ stroke: ${r.annotationStroke};
61
+ }
62
+ .wardley-annotation text {
63
+ fill: ${r.annotationTextColor};
64
+ }
65
+ .wardley-annotations-box rect {
66
+ fill: ${r.annotationFill};
67
+ stroke: ${r.annotationStroke};
68
+ }
69
+ .wardley-annotations-box text {
70
+ fill: ${r.annotationTextColor};
71
+ }
72
+ .wardley-pipeline-box {
73
+ stroke: ${r.componentStroke};
74
+ }
75
+ .wardley-notes text {
76
+ fill: ${r.axisTextColor};
77
+ }
78
+ `},"styles"),le={parser:kt,db:_t,renderer:Jt,styles:Kt};export{le as diagram};
@@ -0,0 +1 @@
1
+ import e from"./java-CylS5w8V.js";const n=Object.freeze(JSON.parse(`{"displayName":"XML","name":"xml","patterns":[{"begin":"(<\\\\?)\\\\s*([-0-9A-Z_a-z]+)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.xml"}},"end":"(\\\\?>)","name":"meta.tag.preprocessor.xml","patterns":[{"match":" ([-A-Za-z]+)","name":"entity.other.attribute-name.xml"},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},{"begin":"(<!)(DOCTYPE)\\\\s+([:A-Z_a-z][-.0-:A-Z_a-z]*)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"keyword.other.doctype.xml"},"3":{"name":"variable.language.documentroot.xml"}},"end":"\\\\s*(>)","name":"meta.tag.sgml.doctype.xml","patterns":[{"include":"#internalSubset"}]},{"include":"#comments"},{"begin":"(<)((?:([-0-9A-Z_a-z]+)(:))?([-0-:A-Z_a-z]+))(?=(\\\\s[^>]*)?></\\\\2>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.xml"},"3":{"name":"entity.name.tag.namespace.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(>)(</)((?:([-0-9A-Z_a-z]+)(:))?([-0-:A-Z_a-z]+))(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"punctuation.definition.tag.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"entity.name.tag.namespace.xml"},"5":{"name":"punctuation.separator.namespace.xml"},"6":{"name":"entity.name.tag.localname.xml"},"7":{"name":"punctuation.definition.tag.xml"}},"name":"meta.tag.no-content.xml","patterns":[{"include":"#tagStuff"}]},{"begin":"(</?)(?:([-.\\\\w]+)((:)))?([-.:\\\\w]+)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.namespace.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(/?>)","name":"meta.tag.xml","patterns":[{"include":"#tagStuff"}]},{"include":"#entity"},{"include":"#bare-ampersand"},{"begin":"<%@","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.xml"}},"end":"%>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.xml"}},"name":"source.java-props.embedded.xml","patterns":[{"match":"page|include|taglib","name":"keyword.other.page-props.xml"}]},{"begin":"<%[!=]?(?!--)","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.xml"}},"end":"(?!--)%>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.xml"}},"name":"source.java.embedded.xml","patterns":[{"include":"source.java"}]},{"begin":"<!\\\\[CDATA\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"]]>","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.unquoted.cdata.xml"}],"repository":{"EntityDecl":{"begin":"(<!)(ENTITY)\\\\s+(%\\\\s+)?([:A-Z_a-z][-.0-:A-Z_a-z]*)(\\\\s+(?:SYSTEM|PUBLIC)\\\\s+)?","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"keyword.other.entity.xml"},"3":{"name":"punctuation.definition.entity.xml"},"4":{"name":"variable.language.entity.xml"},"5":{"name":"keyword.other.entitytype.xml"}},"end":"(>)","patterns":[{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},"bare-ampersand":{"match":"&","name":"invalid.illegal.bad-ampersand.xml"},"comments":{"patterns":[{"begin":"<%--","captures":{"0":{"name":"punctuation.definition.comment.xml"},"end":"--%>","name":"comment.block.xml"}},{"begin":"<!--","captures":{"0":{"name":"punctuation.definition.comment.xml"}},"end":"-->","name":"comment.block.xml","patterns":[{"begin":"--(?!>)","captures":{"0":{"name":"invalid.illegal.bad-comments-or-CDATA.xml"}}}]}]},"doublequotedString":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.double.xml","patterns":[{"include":"#entity"},{"include":"#bare-ampersand"}]},"entity":{"captures":{"1":{"name":"punctuation.definition.constant.xml"},"3":{"name":"punctuation.definition.constant.xml"}},"match":"(&)([:A-Z_a-z][-.0-:A-Z_a-z]*|#[0-9]+|#x\\\\h+)(;)","name":"constant.character.entity.xml"},"internalSubset":{"begin":"(\\\\[)","captures":{"1":{"name":"punctuation.definition.constant.xml"}},"end":"(])","name":"meta.internalsubset.xml","patterns":[{"include":"#EntityDecl"},{"include":"#parameterEntity"},{"include":"#comments"}]},"parameterEntity":{"captures":{"1":{"name":"punctuation.definition.constant.xml"},"3":{"name":"punctuation.definition.constant.xml"}},"match":"(%)([:A-Z_a-z][-.0-:A-Z_a-z]*)(;)","name":"constant.character.parameter-entity.xml"},"singlequotedString":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.single.xml","patterns":[{"include":"#entity"},{"include":"#bare-ampersand"}]},"tagStuff":{"patterns":[{"captures":{"1":{"name":"entity.other.attribute-name.namespace.xml"},"2":{"name":"entity.other.attribute-name.xml"},"3":{"name":"punctuation.separator.namespace.xml"},"4":{"name":"entity.other.attribute-name.localname.xml"}},"match":"(?:^|\\\\s+)(?:([-.\\\\w]+)((:)))?([-.:\\\\w]+)\\\\s*="},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]}},"scopeName":"text.xml","embeddedLangs":["java"]}`)),a=[...e,n];export{a as default};
@@ -0,0 +1,7 @@
1
+ import{s as xi,g as di,o as Yt,n as fi,a as pi,b as mi,_ as n,l as Nt,E as yi,d as bi,p as Ai,y as Rt,h as wi,A as Ht,B as Ci,G as Si,H as _i}from"./mermaid.core-CmjrekXI.js";import"./transform-CzGDKG_M.js";import{b as Vt}from"./band-dPffDWoQ.js";import{l as Ot}from"./linear-BHfMepXe.js";import{l as Wt}from"./step-SI6FXFD6.js";import"./main-B239_4z1.js";import"./index-B6q9ygFx.js";import"./init-Gi6I4Gst.js";import"./ordinal-Cboi1Yqb.js";import"./defaultLocale-5voVPcsN.js";var wt=(function(){var e=n(function(O,r,c,g){for(c=c||{},g=O.length;g--;c[O[g]]=r);return c},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],a=[1,5],h=[1,6],u=[1,7],A=[1,5,10,12,14,16,18,19,21,23,36,37,38],y=[1,25],k=[1,26],T=[1,28],L=[1,29],E=[1,30],W=[1,31],F=[1,32],P=[1,33],B=[1,34],p=[1,35],_=[1,36],l=[1,37],I=[1,43],V=[1,42],X=[1,47],Y=[1,50],C=[1,10,12,14,16,18,19,21,23,36,37,38],H=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],m=[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],b=[1,65],M=[26,28],S={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:n(function(r,c,g,x,w,o,rt){var d=o.length-1;switch(w){case 5:x.setOrientation(o[d]);break;case 9:x.setDiagramTitle(o[d].text.trim());break;case 12:x.setLineData({text:"",type:"text"},o[d]);break;case 13:x.setLineData(o[d-1],o[d]);break;case 14:x.setBarData({text:"",type:"text"},o[d]);break;case 15:x.setBarData(o[d-1],o[d]);break;case 16:this.$=o[d].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=o[d].trim(),x.setAccDescription(this.$);break;case 19:this.$=o[d-1];break;case 20:case 30:this.$=[o[d-2],...o[d]];break;case 21:case 31:this.$=[o[d]];break;case 22:this.$={value:Number(o[d-1]),label:o[d]};break;case 23:this.$={value:Number(o[d]),label:""};break;case 24:x.setXAxisTitle(o[d]);break;case 25:x.setXAxisTitle(o[d-1]);break;case 26:x.setXAxisTitle({type:"text",text:""});break;case 27:x.setXAxisBand(o[d]);break;case 28:x.setXAxisRangeData(Number(o[d-2]),Number(o[d]));break;case 29:this.$=o[d-1];break;case 32:x.setYAxisTitle(o[d]);break;case 33:x.setYAxisTitle(o[d-1]);break;case 34:x.setYAxisTitle({type:"text",text:""});break;case 35:x.setYAxisRangeData(Number(o[d-2]),Number(o[d]));break;case 39:this.$={text:o[d],type:"text"};break;case 40:this.$={text:o[d],type:"text"};break;case 41:this.$={text:o[d],type:"markdown"};break;case 42:this.$=o[d];break;case 43:this.$=o[d-1]+""+o[d];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,36:a,37:h,38:u}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,36:a,37:h,38:u}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:a,37:h,38:u}),{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(A,[2,36]),e(A,[2,37]),e(A,[2,38]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,36:a,37:h,38:u}),{1:[2,3]},e(A,[2,5]),e(t,[2,7],{4:22,36:a,37:h,38:u}),{11:23,30:y,39:24,40:k,41:27,42:T,43:L,44:E,45:W,46:F,47:P,48:B,49:p,50:_,51:l},{11:39,13:38,24:I,29:V,30:y,31:40,32:41,39:24,40:k,41:27,42:T,43:L,44:E,45:W,46:F,47:P,48:B,49:p,50:_,51:l},{11:45,15:44,29:X,30:y,35:46,39:24,40:k,41:27,42:T,43:L,44:E,45:W,46:F,47:P,48:B,49:p,50:_,51:l},{11:49,17:48,24:Y,30:y,39:24,40:k,41:27,42:T,43:L,44:E,45:W,46:F,47:P,48:B,49:p,50:_,51:l},{11:52,17:51,24:Y,30:y,39:24,40:k,41:27,42:T,43:L,44:E,45:W,46:F,47:P,48:B,49:p,50:_,51:l},{20:[1,53]},{22:[1,54]},e(C,[2,18]),{1:[2,2]},e(C,[2,8]),e(C,[2,9]),e(H,[2,39],{41:55,42:T,43:L,44:E,45:W,46:F,47:P,48:B,49:p,50:_,51:l}),e(H,[2,40]),e(H,[2,41]),e(m,[2,42]),e(m,[2,44]),e(m,[2,45]),e(m,[2,46]),e(m,[2,47]),e(m,[2,48]),e(m,[2,49]),e(m,[2,50]),e(m,[2,51]),e(m,[2,52]),e(m,[2,53]),e(C,[2,10]),e(C,[2,24],{32:41,31:56,24:I,29:V}),e(C,[2,26]),e(C,[2,27]),{33:[1,57]},{11:59,30:y,34:58,39:24,40:k,41:27,42:T,43:L,44:E,45:W,46:F,47:P,48:B,49:p,50:_,51:l},e(C,[2,11]),e(C,[2,32],{35:60,29:X}),e(C,[2,34]),{33:[1,61]},e(C,[2,12]),{17:62,24:Y},{25:63,27:64,29:b},e(C,[2,14]),{17:66,24:Y},e(C,[2,16]),e(C,[2,17]),e(m,[2,43]),e(C,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(C,[2,33]),{29:[1,70]},e(C,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(M,[2,23],{30:[1,73]}),e(C,[2,15]),e(C,[2,28]),e(C,[2,29]),{11:59,30:y,34:74,39:24,40:k,41:27,42:T,43:L,44:E,45:W,46:F,47:P,48:B,49:p,50:_,51:l},e(C,[2,35]),e(C,[2,19]),{25:75,27:64,29:b},e(M,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:n(function(r,c){if(c.recoverable)this.trace(r);else{var g=new Error(r);throw g.hash=c,g}},"parseError"),parse:n(function(r){var c=this,g=[0],x=[],w=[null],o=[],rt=this.table,d="",gt=0,It=0,li=2,Mt=1,ci=o.slice.call(arguments,1),R=Object.create(this.lexer),$={yy:{}};for(var mt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,mt)&&($.yy[mt]=this.yy[mt]);R.setInput(r,$.yy),$.yy.lexer=R,$.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var yt=R.yylloc;o.push(yt);var ui=R.options&&R.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function gi(v){g.length=g.length-2*v,w.length=w.length-v,o.length=o.length-v}n(gi,"popStack");function zt(){var v;return v=x.pop()||R.lex()||Mt,typeof v!="number"&&(v instanceof Array&&(x=v,v=x.pop()),v=c.symbols_[v]||v),v}n(zt,"lex");for(var D,U,z,bt,q={},xt,N,Bt,dt;;){if(U=g[g.length-1],this.defaultActions[U]?z=this.defaultActions[U]:((D===null||typeof D>"u")&&(D=zt()),z=rt[U]&&rt[U][D]),typeof z>"u"||!z.length||!z[0]){var At="";dt=[];for(xt in rt[U])this.terminals_[xt]&&xt>li&&dt.push("'"+this.terminals_[xt]+"'");R.showPosition?At="Parse error on line "+(gt+1)+`:
2
+ `+R.showPosition()+`
3
+ Expecting `+dt.join(", ")+", got '"+(this.terminals_[D]||D)+"'":At="Parse error on line "+(gt+1)+": Unexpected "+(D==Mt?"end of input":"'"+(this.terminals_[D]||D)+"'"),this.parseError(At,{text:R.match,token:this.terminals_[D]||D,line:R.yylineno,loc:yt,expected:dt})}if(z[0]instanceof Array&&z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+D);switch(z[0]){case 1:g.push(D),w.push(R.yytext),o.push(R.yylloc),g.push(z[1]),D=null,It=R.yyleng,d=R.yytext,gt=R.yylineno,yt=R.yylloc;break;case 2:if(N=this.productions_[z[1]][1],q.$=w[w.length-N],q._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},ui&&(q._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),bt=this.performAction.apply(q,[d,It,gt,$.yy,z[1],w,o].concat(ci)),typeof bt<"u")return bt;N&&(g=g.slice(0,-1*N*2),w=w.slice(0,-1*N),o=o.slice(0,-1*N)),g.push(this.productions_[z[1]][0]),w.push(q.$),o.push(q._$),Bt=rt[g[g.length-2]][g[g.length-1]],g.push(Bt);break;case 3:return!0}}return!0},"parse")},ot=(function(){var O={EOF:1,parseError:n(function(c,g){if(this.yy.parser)this.yy.parser.parseError(c,g);else throw new Error(c)},"parseError"),setInput:n(function(r,c){return this.yy=c||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]),this.offset=0,this},"setInput"),input:n(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var c=r.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:n(function(r){var c=r.length,g=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n(function(r){this.unput(this.match.slice(r))},"less"),pastInput:n(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:n(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var r=this.pastInput(),c=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
5
+ `+c+"^"},"showPosition"),test_match:n(function(r,c){var g,x,w;if(this.options.backtrack_lexer&&(w={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&&(w.yylloc.range=this.yylloc.range.slice(0))),x=r[0].match(/(?:\r\n?|\n).*/g),x&&(this.yylineno+=x.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.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]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(r[0].length),this.matched+=r[0],g=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var o in w)this[o]=w[o];return!1}return!1},"test_match"),next:n(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,c,g,x;this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),o=0;o<w.length;o++)if(g=this._input.match(this.rules[w[o]]),g&&(!c||g[0].length>c[0].length)){if(c=g,x=o,this.options.backtrack_lexer){if(r=this.test_match(g,w[o]),r!==!1)return r;if(this._backtrack){c=!1;continue}else return!1}else if(!this.options.flex)break}return c?(r=this.test_match(c,w[x]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:n(function(){var c=this.next();return c||this.lex()},"lex"),begin:n(function(c){this.conditionStack.push(c)},"begin"),popState:n(function(){var c=this.conditionStack.length-1;return c>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:n(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:n(function(c){return c=this.conditionStack.length-1-Math.abs(c||0),c>=0?this.conditionStack[c]:"INITIAL"},"topState"),pushState:n(function(c){this.begin(c)},"pushState"),stateStackSize:n(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:n(function(c,g,x,w){switch(x){case 0:break;case 1:break;case 2:return this.popState(),36;case 3:return this.popState(),36;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 33;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 29;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 44;case 33:return"COLON";case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return O})();S.lexer=ot;function G(){this.yy={}}return n(G,"Parser"),G.prototype=S,S.Parser=G,new G})();wt.parser=wt;var Ri=wt;function Ct(e){return e.type==="bar"}n(Ct,"isBarPlot");function ft(e){return e.type==="band"}n(ft,"isBandAxisData");function j(e){return e.type==="linear"}n(j,"isLinearAxisData");var Q,$t=(Q=class{constructor(t){this.parentGroup=t}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((h,u)=>Math.max(u.length,h),0)*i,height:i};const s={width:0,height:0},a=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const h of t){const u=_i(a,1,h),A=u?u.width:h.length*i,y=u?u.height:i;s.width=Math.max(s.width,A),s.height=Math.max(s.height,y)}return a.remove(),s}},n(Q,"TextDimensionCalculatorWithFont"),Q),Ft=.7,Xt=.2,K,Ut=(K=class{constructor(t,i,s,a){this.axisConfig=t,this.title=i,this.textDimensionCalculator=s,this.axisThemeConfig=a,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}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){Ft*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(Ft*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),a=Xt*t.width;this.outerPadding=Math.min(s.width/2,a);let h=s.height;this.axisPosition==="bottom"&&this.normalizedLabelRotationInRad!==0&&(h=Math.max(h,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*s.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*s.height))),h+=this.axisConfig.labelPadding*2,this.labelTextHeight=s.height,h<=i&&(i-=h,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,a<=i&&(i-=a,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),a=Xt*t.height;this.outerPadding=Math.min(s.height/2,a);const h=s.width+this.axisConfig.labelPadding*2;h<=i&&(i-=h,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,a<=i&&(i-=a,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateOffsetByRotation(t){const i=this.normalizedLabelRotationInRad;return i===0?0:Math.sin(i)*this.getLabelDimension()[t]/2}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.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&&t.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"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${i},${this.getScaleValue(s)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.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&&t.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"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.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"}))}),this.showTick){const i=this.boundingRect.y;t.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}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},n(K,"BaseAxis"),K),Z,ki=(Z=class extends Ut{constructor(t,i,s,a,h){super(t,a,h,i),this.categories=s,this.scale=Vt().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=Vt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),Nt.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},n(Z,"BandAxis"),Z),J,Ti=(J=class extends Ut{constructor(t,i,s,a,h){super(t,a,h,i),this.domain=s,this.scale=Ot().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=Ot().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}},n(J,"LinearAxis"),J);function St(e,t,i,s){const a=new $t(s);return ft(e)?new ki(t,i,e.categories,e.title,a):new Ti(t,i,[e.min,e.max],e.title,a)}n(St,"getAxis");var tt,Di=(tt=class{constructor(t,i,s,a){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=a,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,t.width),a=i.height+2*this.chartConfig.titlePadding;return i.width<=s&&i.height<=a&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=s,this.boundingRect.height=a,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}},n(tt,"ChartTitle"),tt);function Gt(e,t,i,s){const a=new $t(s);return new Di(a,e,t,i)}n(Gt,"getChartTitleComponent");var it,Li=(it=class{constructor(t,i,s,a,h){this.plotData=t,this.xAxis=i,this.yAxis=s,this.orientation=a,this.plotIndex=h}getDrawableElement(){const t=this.plotData.data.map(a=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]);let i;if(this.orientation==="horizontal"?i=Wt().y(a=>a[0]).x(a=>a[1])(t):i=Wt().x(a=>a[0]).y(a=>a[1])(t),!i)return[];const 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){const u=[];for(const[A,[y,k]]of t.entries()){const T=this.plotData.pointLabels[A];T&&(this.orientation==="horizontal"?u.push({x:k+10,y,text:T,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0}):u.push({x:y,y:k-10,text:T,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0}))}u.length>0&&s.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:u})}return s}},n(it,"LinePlot"),it),et,Pi=(et=class{constructor(t,i,s,a,h,u){this.barData=t,this.boundingRect=i,this.xAxis=s,this.yAxis=a,this.orientation=h,this.plotIndex=u}getDrawableElement(){const t=this.barData.data.map(h=>[this.xAxis.getScaleValue(h[0]),this.yAxis.getScaleValue(h[1])]),s=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),a=s/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(h=>({x:this.boundingRect.x,y:h[0]-a,height:s,width:h[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(h=>({x:h[0]-a,y:h[1],width:s,height:this.boundingRect.y+this.boundingRect.height-h[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},n(et,"BarPlot"),et),st,vi=(st=class{constructor(t,i,s){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");const t=[];for(const[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{const a=new Li(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...a.getDrawableElement())}break;case"bar":{const a=new Pi(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...a.getDrawableElement())}break}return t}},n(st,"BasePlot"),st);function qt(e,t,i){return new vi(e,t,i)}n(qt,"getPlotComponent");var at,Ei=(at=class{constructor(t,i,s,a){this.chartConfig=t,this.chartData=i,this.componentStore={title:Gt(t,i,s,a),plot:qt(t,i,s),xAxis:St(i.xAxis,t.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},a),yAxis:St(i.yAxis,t.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},a)}}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,a=0,h=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),u=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),A=this.componentStore.plot.calculateSpace({width:h,height:u});t-=A.width,i-=A.height,A=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),a=A.height,i-=A.height,this.componentStore.xAxis.setAxisPosition("bottom"),A=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=A.height,this.componentStore.yAxis.setAxisPosition("left"),A=this.componentStore.yAxis.calculateSpace({width:t,height:i}),s=A.width,t-=A.width,t>0&&(h+=t,t=0),i>0&&(u+=i,i=0),this.componentStore.plot.calculateSpace({width:h,height:u}),this.componentStore.plot.setBoundingBoxXY({x:s,y:a}),this.componentStore.xAxis.setRange([s,s+h]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:a+u}),this.componentStore.yAxis.setRange([a,a+u]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(y=>Ct(y))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,a=0,h=0,u=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),A=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),y=this.componentStore.plot.calculateSpace({width:u,height:A});t-=y.width,i-=y.height,y=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=y.height,i-=y.height,this.componentStore.xAxis.setAxisPosition("left"),y=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=y.width,a=y.width,this.componentStore.yAxis.setAxisPosition("top"),y=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=y.height,h=s+y.height,t>0&&(u+=t,t=0),i>0&&(A+=i,i=0),this.componentStore.plot.calculateSpace({width:u,height:A}),this.componentStore.plot.setBoundingBoxXY({x:a,y:h}),this.componentStore.yAxis.setRange([a,a+u]),this.componentStore.yAxis.setBoundingBoxXY({x:a,y:s}),this.componentStore.xAxis.setRange([h,h+A]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:h}),this.chartData.plots.some(k=>Ct(k))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},n(at,"Orchestrator"),at),nt,Ii=(nt=class{static build(t,i,s,a){return new Ei(t,i,s,a).getDrawableElement()}},n(nt,"XYChartBuilder"),nt),ht=0,jt,lt=Dt(),ct=Tt(),f=Lt(),_t=ct.plotColorPalette.split(",").map(e=>e.trim()),pt=!1,kt=!1;function Tt(){const e=Si(),t=Rt();return Ht(e.xyChart,t.themeVariables.xyChart)}n(Tt,"getChartDefaultThemeConfig");function Dt(){const e=Rt();return Ht(Ci.xyChart,e.xyChart)}n(Dt,"getChartDefaultConfig");function Lt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}n(Lt,"getChartDefaultData");function ut(e){const t=Rt();return wi(e.trim(),t)}n(ut,"textSanitizer");function Qt(e){jt=e}n(Qt,"setTmpSVGG");function Kt(e){e==="horizontal"?lt.chartOrientation="horizontal":lt.chartOrientation="vertical"}n(Kt,"setOrientation");function Zt(e){f.xAxis.title=ut(e.text)}n(Zt,"setXAxisTitle");function Pt(e,t){f.xAxis={type:"linear",title:f.xAxis.title,min:e,max:t},pt=!0}n(Pt,"setXAxisRangeData");function Jt(e){f.xAxis={type:"band",title:f.xAxis.title,categories:e.map(t=>ut(t.text))},pt=!0}n(Jt,"setXAxisBand");function ti(e){f.yAxis.title=ut(e.text)}n(ti,"setYAxisTitle");function ii(e,t){f.yAxis={type:"linear",title:f.yAxis.title,min:e,max:t},kt=!0}n(ii,"setYAxisRangeData");function ei(e){const t=Math.min(...e),i=Math.max(...e),s=j(f.yAxis)?f.yAxis.min:1/0,a=j(f.yAxis)?f.yAxis.max:-1/0;f.yAxis={type:"linear",title:f.yAxis.title,min:Math.min(s,t),max:Math.max(a,i)}}n(ei,"setYAxisRangeFromPlotData");function vt(e){let t=[];if(e.length===0)return t;if(!pt){const i=j(f.xAxis)?f.xAxis.min:1/0,s=j(f.xAxis)?f.xAxis.max:-1/0;Pt(Math.min(i,1),Math.max(s,e.length))}if(ft(f.xAxis)&&e.length>f.xAxis.categories.length&&(e=e.slice(0,f.xAxis.categories.length)),kt||ei(e),ft(f.xAxis)&&(t=f.xAxis.categories.map((i,s)=>[i,e[s]])),j(f.xAxis)){const i=f.xAxis.min,s=f.xAxis.max;if(e.length===1)t=[[`${i}`,e[0]]];else{const a=(s-i)/(e.length-1);t=e.map((h,u)=>[`${i+u*a}`,h])}}return t}n(vt,"transformDataWithoutCategory");function Et(e){return _t[e===0?0:e%_t.length]}n(Et,"getPlotColorFromPalette");function si(e,t){const i=t.map(u=>u.value),s=t.map(u=>u.label?ut(u.label):""),a=vt(i),h=s.some(u=>u!=="");f.plots.push({type:"line",strokeFill:Et(ht),strokeWidth:2,data:a,...h?{pointLabels:s}:{}}),ht++}n(si,"setLineData");function ai(e,t){const i=t.map(a=>a.value),s=vt(i);f.plots.push({type:"bar",fill:Et(ht),data:s}),ht++}n(ai,"setBarData");function ni(){if(f.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return f.title=Yt(),Ii.build(lt,f,ct,jt)}n(ni,"getDrawableElem");function oi(){return ct}n(oi,"getChartThemeConfig");function ri(){return lt}n(ri,"getChartConfig");function hi(){return f}n(hi,"getXYChartData");var Mi=n(function(){Ai(),ht=0,lt=Dt(),f=Lt(),ct=Tt(),_t=ct.plotColorPalette.split(",").map(e=>e.trim()),pt=!1,kt=!1},"clear"),zi={getDrawableElem:ni,clear:Mi,setAccTitle:mi,getAccTitle:pi,setDiagramTitle:fi,getDiagramTitle:Yt,getAccDescription:di,setAccDescription:xi,setOrientation:Kt,setXAxisTitle:Zt,setXAxisRangeData:Pt,setXAxisBand:Jt,setYAxisTitle:ti,setYAxisRangeData:ii,setLineData:si,setBarData:ai,setTmpSVGG:Qt,getChartThemeConfig:oi,getChartConfig:ri,getXYChartData:hi},Bi=n((e,t,i,s)=>{const a=s.db,h=a.getChartThemeConfig(),u=a.getChartConfig(),A=a.getXYChartData().plots[0].data.map(p=>p[1]);function y(p){return p==="top"?"text-before-edge":"middle"}n(y,"getDominantBaseLine");function k(p){return p==="left"?"start":p==="right"?"end":"middle"}n(k,"getTextAnchor");function T(p){return`translate(${p.x}, ${p.y}) rotate(${p.rotation||0})`}n(T,"getTextTransformation"),Nt.debug(`Rendering xychart chart
7
+ `+e);const L=yi(t),E=L.append("g").attr("class","main"),W=E.append("rect").attr("width",u.width).attr("height",u.height).attr("class","background");bi(L,u.height,u.width,!0),L.attr("viewBox",`0 0 ${u.width} ${u.height}`),W.attr("fill",h.backgroundColor),a.setTmpSVGG(L.append("g").attr("class","mermaid-tmp-group"));const F=a.getDrawableElem(),P={};function B(p){let _=E,l="";for(const[I]of p.entries()){let V=E;I>0&&P[l]&&(V=P[l]),l+=p[I],_=P[l],_||(_=P[l]=V.append("g").attr("class",p[I]))}return _}n(B,"getGroup");for(const p of F){if(p.data.length===0)continue;const _=B(p.groupTexts);switch(p.type){case"rect":if(_.selectAll("rect").data(p.data).enter().append("rect").attr("x",l=>l.x).attr("y",l=>l.y).attr("width",l=>l.width).attr("height",l=>l.height).attr("fill",l=>l.fill).attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth),u.showDataLabel){const l=u.showDataLabelOutsideBar;if(u.chartOrientation==="horizontal"){let I=function(b,M){const{data:S,label:ot}=b;return M*ot.length*V<=S.width-X};n(I,"fitsHorizontally");const V=.7,X=10,Y=p.data.map((b,M)=>({data:b,label:A[M].toString()})).filter(b=>b.data.width>0&&b.data.height>0),C=Y.map(b=>{const{data:M}=b;let S=M.height*.7;for(;!I(b,S)&&S>0;)S-=1;return S}),H=Math.floor(Math.min(...C)),m=n(b=>l?b.data.x+b.data.width+X:b.data.x+b.data.width-X,"determineLabelXPosition");_.selectAll("text").data(Y).enter().append("text").attr("x",m).attr("y",b=>b.data.y+b.data.height/2).attr("text-anchor",l?"start":"end").attr("dominant-baseline","middle").attr("fill",h.dataLabelColor).attr("font-size",`${H}px`).text(b=>b.label)}else{let I=function(m,b,M){const{data:S,label:ot}=m,O=b*ot.length*.7,r=S.x+S.width/2,c=r-O/2,g=r+O/2,x=c>=S.x&&g<=S.x+S.width,w=S.y+M+b<=S.y+S.height;return x&&w};n(I,"fitsInBar");const V=10,X=p.data.map((m,b)=>({data:m,label:A[b].toString()})).filter(m=>m.data.width>0&&m.data.height>0),Y=X.map(m=>{const{data:b,label:M}=m;let S=b.width/(M.length*.7);for(;!I(m,S,V)&&S>0;)S-=1;return S}),C=Math.floor(Math.min(...Y)),H=n(m=>l?m.data.y-V:m.data.y+V,"determineLabelYPosition");_.selectAll("text").data(X).enter().append("text").attr("x",m=>m.data.x+m.data.width/2).attr("y",H).attr("text-anchor","middle").attr("dominant-baseline",l?"auto":"hanging").attr("fill",h.dataLabelColor).attr("font-size",`${C}px`).text(m=>m.label)}}break;case"text":_.selectAll("text").data(p.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",l=>l.fill).attr("font-size",l=>l.fontSize).attr("dominant-baseline",l=>y(l.verticalPos)).attr("text-anchor",l=>k(l.horizontalPos)).attr("transform",l=>T(l)).text(l=>l.text);break;case"path":_.selectAll("path").data(p.data).enter().append("path").attr("d",l=>l.path).attr("fill",l=>l.fill?l.fill:"none").attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth);break}}},"draw"),Vi={draw:Bi},qi={parser:Ri,db:zi,renderer:Vi};export{qi as diagram};
@@ -0,0 +1,7 @@
1
+ import{s as mi,g as yi,o as li,n as bi,a as Ai,b as Ci,_ as n,l as ci,G as wi,d as Si,p as Ri,A as Mt,h as _i,C as gi,D as ki,I as Ti,J as Di}from"./render-O7CIS3YK-BtRzL6gS.js";import{_ as r}from"./mermaid-layout-elk.core-C4McJve2.js";import"./transform-CzGDKG_M.js";import{b as ai}from"./band-dPffDWoQ.js";import{l as ni}from"./linear-BHfMepXe.js";import{l as oi}from"./step-SI6FXFD6.js";import"./main-B239_4z1.js";import"./index-B6q9ygFx.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./init-Gi6I4Gst.js";import"./ordinal-Cboi1Yqb.js";import"./defaultLocale-5voVPcsN.js";var It=(function(){var e=n(function(F,l,u,x){for(u=u||{},x=F.length;x--;u[F[x]]=l);return u},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],a=[1,5],h=[1,6],c=[1,7],b=[1,5,10,12,14,16,18,19,21,23,36,37,38],p=[1,25],m=[1,26],k=[1,28],T=[1,29],L=[1,30],W=[1,31],X=[1,32],E=[1,33],B=[1,34],A=[1,35],D=[1,36],g=[1,37],M=[1,43],V=[1,42],Y=[1,47],N=[1,50],R=[1,10,12,14,16,18,19,21,23,36,37,38],U=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],C=[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],w=[1,65],z=[26,28],_={trace:n(r(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:n(r(function(l,u,x,d,S,o,ct){var f=o.length-1;switch(S){case 5:d.setOrientation(o[f]);break;case 9:d.setDiagramTitle(o[f].text.trim());break;case 12:d.setLineData({text:"",type:"text"},o[f]);break;case 13:d.setLineData(o[f-1],o[f]);break;case 14:d.setBarData({text:"",type:"text"},o[f]);break;case 15:d.setBarData(o[f-1],o[f]);break;case 16:this.$=o[f].trim(),d.setAccTitle(this.$);break;case 17:case 18:this.$=o[f].trim(),d.setAccDescription(this.$);break;case 19:this.$=o[f-1];break;case 20:case 30:this.$=[o[f-2],...o[f]];break;case 21:case 31:this.$=[o[f]];break;case 22:this.$={value:Number(o[f-1]),label:o[f]};break;case 23:this.$={value:Number(o[f]),label:""};break;case 24:d.setXAxisTitle(o[f]);break;case 25:d.setXAxisTitle(o[f-1]);break;case 26:d.setXAxisTitle({type:"text",text:""});break;case 27:d.setXAxisBand(o[f]);break;case 28:d.setXAxisRangeData(Number(o[f-2]),Number(o[f]));break;case 29:this.$=o[f-1];break;case 32:d.setYAxisTitle(o[f]);break;case 33:d.setYAxisTitle(o[f-1]);break;case 34:d.setYAxisTitle({type:"text",text:""});break;case 35:d.setYAxisRangeData(Number(o[f-2]),Number(o[f]));break;case 39:this.$={text:o[f],type:"text"};break;case 40:this.$={text:o[f],type:"text"};break;case 41:this.$={text:o[f],type:"markdown"};break;case 42:this.$=o[f];break;case 43:this.$=o[f-1]+""+o[f];break}},"anonymous"),"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,36:a,37:h,38:c}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,36:a,37:h,38:c}),e(t,i,{4:2,7:4,6:9,3:10,5:s,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(b,[2,36]),e(b,[2,37]),e(b,[2,38]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,36:a,37:h,38:c}),{1:[2,3]},e(b,[2,5]),e(t,[2,7],{4:22,36:a,37:h,38:c}),{11:23,30:p,39:24,40:m,41:27,42:k,43:T,44:L,45:W,46:X,47:E,48:B,49:A,50:D,51:g},{11:39,13:38,24:M,29:V,30:p,31:40,32:41,39:24,40:m,41:27,42:k,43:T,44:L,45:W,46:X,47:E,48:B,49:A,50:D,51:g},{11:45,15:44,29:Y,30:p,35:46,39:24,40:m,41:27,42:k,43:T,44:L,45:W,46:X,47:E,48:B,49:A,50:D,51:g},{11:49,17:48,24:N,30:p,39:24,40:m,41:27,42:k,43:T,44:L,45:W,46:X,47:E,48:B,49:A,50:D,51:g},{11:52,17:51,24:N,30:p,39:24,40:m,41:27,42:k,43:T,44:L,45:W,46:X,47:E,48:B,49:A,50:D,51:g},{20:[1,53]},{22:[1,54]},e(R,[2,18]),{1:[2,2]},e(R,[2,8]),e(R,[2,9]),e(U,[2,39],{41:55,42:k,43:T,44:L,45:W,46:X,47:E,48:B,49:A,50:D,51:g}),e(U,[2,40]),e(U,[2,41]),e(C,[2,42]),e(C,[2,44]),e(C,[2,45]),e(C,[2,46]),e(C,[2,47]),e(C,[2,48]),e(C,[2,49]),e(C,[2,50]),e(C,[2,51]),e(C,[2,52]),e(C,[2,53]),e(R,[2,10]),e(R,[2,24],{32:41,31:56,24:M,29:V}),e(R,[2,26]),e(R,[2,27]),{33:[1,57]},{11:59,30:p,34:58,39:24,40:m,41:27,42:k,43:T,44:L,45:W,46:X,47:E,48:B,49:A,50:D,51:g},e(R,[2,11]),e(R,[2,32],{35:60,29:Y}),e(R,[2,34]),{33:[1,61]},e(R,[2,12]),{17:62,24:N},{25:63,27:64,29:w},e(R,[2,14]),{17:66,24:N},e(R,[2,16]),e(R,[2,17]),e(C,[2,43]),e(R,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(R,[2,33]),{29:[1,70]},e(R,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(z,[2,23],{30:[1,73]}),e(R,[2,15]),e(R,[2,28]),e(R,[2,29]),{11:59,30:p,34:74,39:24,40:m,41:27,42:k,43:T,44:L,45:W,46:X,47:E,48:B,49:A,50:D,51:g},e(R,[2,35]),e(R,[2,19]),{25:75,27:64,29:w},e(z,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:n(r(function(l,u){if(u.recoverable)this.trace(l);else{var x=new Error(l);throw x.hash=u,x}},"parseError"),"parseError"),parse:n(r(function(l){var u=this,x=[0],d=[],S=[null],o=[],ct=this.table,f="",ft=0,ti=0,di=2,ii=1,pi=o.slice.call(arguments,1),P=Object.create(this.lexer),q={yy:{}};for(var Dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Dt)&&(q.yy[Dt]=this.yy[Dt]);P.setInput(l,q.yy),q.yy.lexer=P,q.yy.parser=this,typeof P.yylloc>"u"&&(P.yylloc={});var Pt=P.yylloc;o.push(Pt);var fi=P.options&&P.options.ranges;typeof q.yy.parseError=="function"?this.parseError=q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ei(I){x.length=x.length-2*I,S.length=S.length-I,o.length=o.length-I}r(ei,"popStack"),n(ei,"popStack");function Lt(){var I;return I=d.pop()||P.lex()||ii,typeof I!="number"&&(I instanceof Array&&(d=I,I=d.pop()),I=u.symbols_[I]||I),I}r(Lt,"lex"),n(Lt,"lex");for(var v,j,O,vt,rt={},mt,H,si,yt;;){if(j=x[x.length-1],this.defaultActions[j]?O=this.defaultActions[j]:((v===null||typeof v>"u")&&(v=Lt()),O=ct[j]&&ct[j][v]),typeof O>"u"||!O.length||!O[0]){var Et="";yt=[];for(mt in ct[j])this.terminals_[mt]&&mt>di&&yt.push("'"+this.terminals_[mt]+"'");P.showPosition?Et="Parse error on line "+(ft+1)+`:
2
+ `+P.showPosition()+`
3
+ Expecting `+yt.join(", ")+", got '"+(this.terminals_[v]||v)+"'":Et="Parse error on line "+(ft+1)+": Unexpected "+(v==ii?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(Et,{text:P.match,token:this.terminals_[v]||v,line:P.yylineno,loc:Pt,expected:yt})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+v);switch(O[0]){case 1:x.push(v),S.push(P.yytext),o.push(P.yylloc),x.push(O[1]),v=null,ti=P.yyleng,f=P.yytext,ft=P.yylineno,Pt=P.yylloc;break;case 2:if(H=this.productions_[O[1]][1],rt.$=S[S.length-H],rt._$={first_line:o[o.length-(H||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(H||1)].first_column,last_column:o[o.length-1].last_column},fi&&(rt._$.range=[o[o.length-(H||1)].range[0],o[o.length-1].range[1]]),vt=this.performAction.apply(rt,[f,ti,ft,q.yy,O[1],S,o].concat(pi)),typeof vt<"u")return vt;H&&(x=x.slice(0,-1*H*2),S=S.slice(0,-1*H),o=o.slice(0,-1*H)),x.push(this.productions_[O[1]][0]),S.push(rt.$),o.push(rt._$),si=ct[x[x.length-2]][x[x.length-1]],x.push(si);break;case 3:return!0}}return!0},"parse"),"parse")},lt=(function(){var F={EOF:1,parseError:n(r(function(u,x){if(this.yy.parser)this.yy.parser.parseError(u,x);else throw new Error(u)},"parseError"),"parseError"),setInput:n(function(l,u){return this.yy=u||this.yy||{},this._input=l,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n(function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var u=l.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),l},"input"),unput:n(function(l){var u=l.length,x=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),x.length-1&&(this.yylineno-=x.length-1);var S=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:x?(x.length===d.length?this.yylloc.first_column:0)+d[d.length-x.length].length-x[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n(function(l){this.unput(this.match.slice(l))},"less"),pastInput:n(function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var l=this.match;return l.length<20&&(l+=this._input.substr(0,20-l.length)),(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var l=this.pastInput(),u=new Array(l.length+1).join("-");return l+this.upcomingInput()+`
5
+ `+u+"^"},"showPosition"),test_match:n(function(l,u){var x,d,S;if(this.options.backtrack_lexer&&(S={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&&(S.yylloc.range=this.yylloc.range.slice(0))),d=l[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+l[0].length},this.yytext+=l[0],this.match+=l[0],this.matches=l,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(l[0].length),this.matched+=l[0],x=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),x)return x;if(this._backtrack){for(var o in S)this[o]=S[o];return!1}return!1},"test_match"),next:n(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var l,u,x,d;this._more||(this.yytext="",this.match="");for(var S=this._currentRules(),o=0;o<S.length;o++)if(x=this._input.match(this.rules[S[o]]),x&&(!u||x[0].length>u[0].length)){if(u=x,d=o,this.options.backtrack_lexer){if(l=this.test_match(x,S[o]),l!==!1)return l;if(this._backtrack){u=!1;continue}else return!1}else if(!this.options.flex)break}return u?(l=this.test_match(u,S[d]),l!==!1?l:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:n(r(function(){var u=this.next();return u||this.lex()},"lex"),"lex"),begin:n(r(function(u){this.conditionStack.push(u)},"begin"),"begin"),popState:n(r(function(){var u=this.conditionStack.length-1;return u>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),"popState"),_currentRules:n(r(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),"_currentRules"),topState:n(r(function(u){return u=this.conditionStack.length-1-Math.abs(u||0),u>=0?this.conditionStack[u]:"INITIAL"},"topState"),"topState"),pushState:n(r(function(u){this.begin(u)},"pushState"),"pushState"),stateStackSize:n(r(function(){return this.conditionStack.length},"stateStackSize"),"stateStackSize"),options:{"case-insensitive":!0},performAction:n(r(function(u,x,d,S){switch(d){case 0:break;case 1:break;case 2:return this.popState(),36;case 3:return this.popState(),36;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 33;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 29;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 44;case 33:return"COLON";case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},"anonymous"),"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 F})();_.lexer=lt;function G(){this.yy={}}return r(G,"Parser"),n(G,"Parser"),G.prototype=_,_.Parser=G,new G})();It.parser=It;var Pi=It;function gt(e){return e.type==="bar"}r(gt,"isBarPlot");n(gt,"isBarPlot");function ut(e){return e.type==="band"}r(ut,"isBandAxisData");n(ut,"isBandAxisData");function Q(e){return e.type==="linear"}r(Q,"isLinearAxisData");n(Q,"isLinearAxisData");var K,zt=(K=class{constructor(t){this.parentGroup=t}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((h,c)=>Math.max(c.length,h),0)*i,height:i};const s={width:0,height:0},a=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const h of t){const c=Di(a,1,h),b=c?c.width:h.length*i,p=c?c.height:i;s.width=Math.max(s.width,b),s.height=Math.max(s.height,p)}return a.remove(),s}},r(K,"TextDimensionCalculatorWithFont"),n(K,"TextDimensionCalculatorWithFont"),K),hi=.7,ri=.2,J,ui=(J=class{constructor(t,i,s,a){this.axisConfig=t,this.title=i,this.textDimensionCalculator=s,this.axisThemeConfig=a,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}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){hi*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(hi*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),a=ri*t.width;this.outerPadding=Math.min(s.width/2,a);let h=s.height;this.axisPosition==="bottom"&&this.normalizedLabelRotationInRad!==0&&(h=Math.max(h,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*s.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*s.height))),h+=this.axisConfig.labelPadding*2,this.labelTextHeight=s.height,h<=i&&(i-=h,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,a<=i&&(i-=a,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),a=ri*t.height;this.outerPadding=Math.min(s.height/2,a);const h=s.width+this.axisConfig.labelPadding*2;h<=i&&(i-=h,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,a<=i&&(i-=a,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateOffsetByRotation(t){const i=this.normalizedLabelRotationInRad;return i===0?0:Math.sin(i)*this.getLabelDimension()[t]/2}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.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&&t.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"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${i},${this.getScaleValue(s)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.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&&t.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"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.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"}))}),this.showTick){const i=this.boundingRect.y;t.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}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},r(J,"BaseAxis"),n(J,"BaseAxis"),J),Z,Li=(Z=class extends ui{constructor(t,i,s,a,h){super(t,a,h,i),this.categories=s,this.scale=ai().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=ai().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),ci.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},r(Z,"BandAxis"),n(Z,"BandAxis"),Z),tt,vi=(tt=class extends ui{constructor(t,i,s,a,h){super(t,a,h,i),this.domain=s,this.scale=ni().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=ni().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}},r(tt,"LinearAxis"),n(tt,"LinearAxis"),tt);function bt(e,t,i,s){const a=new zt(s);return ut(e)?new Li(t,i,e.categories,e.title,a):new vi(t,i,[e.min,e.max],e.title,a)}r(bt,"getAxis");n(bt,"getAxis");var it,Ei=(it=class{constructor(t,i,s,a){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=a,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,t.width),a=i.height+2*this.chartConfig.titlePadding;return i.width<=s&&i.height<=a&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=s,this.boundingRect.height=a,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}},r(it,"ChartTitle"),n(it,"ChartTitle"),it);function Ot(e,t,i,s){const a=new zt(s);return new Ei(a,e,t,i)}r(Ot,"getChartTitleComponent");n(Ot,"getChartTitleComponent");var Ii=.75,Bi=.5,Mi=.35;function At(e){return{fontSize:e,markerSize:e*Ii,markerSpacing:e*Mi,itemSpacing:e*Bi}}r(At,"getLegendLayout");n(At,"getLegendLayout");var et,zi=(et=class{constructor(t,i,s,a){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=a,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter(m=>m.title):[],this.visiblePlots.length===0)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};const{fontSize:i,markerSize:s,markerSpacing:a,itemSpacing:h}=At(this.chartConfig.legendFontSize),c=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map(m=>m.title),i),b=this.chartConfig.legendPadding*2+s+a+c.width,p=this.chartConfig.legendPadding*2+this.visiblePlots.length*i+(this.visiblePlots.length-1)*h;return b<=t.width&&p<=t.height?(this.boundingRect.width=b,this.boundingRect.height=p):(this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(this.visiblePlots.length===0)return[];const{fontSize:t,markerSize:i,markerSpacing:s,itemSpacing:a}=At(this.chartConfig.legendFontSize),h=t+a,c=this.boundingRect.x+this.chartConfig.legendPadding,b=this.boundingRect.y+this.chartConfig.legendPadding,p=[],m=[];for(const[k,T]of this.visiblePlots.entries())if(gt(T))p.push({x:c,y:b+k*h,width:i,height:i,fill:T.fill,strokeFill:T.fill,strokeWidth:0});else{const L=b+k*h+i/2;m.push({path:`M ${c},${L} L ${c+i},${L}`,strokeFill:T.strokeFill,strokeWidth:T.strokeWidth})}return[{groupTexts:["legend","markers"],type:"rect",data:p},{groupTexts:["legend","markers"],type:"path",data:m},{groupTexts:["legend","label"],type:"text",data:this.visiblePlots.map((k,T)=>({text:k.title,x:c+i+s,y:b+T*h+i/2,fill:this.chartThemeConfig.legendTextColor,fontSize:t,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}},r(et,"ChartLegend"),n(et,"ChartLegend"),et);function Vt(e,t,i,s){const a=new zt(s);return new zi(a,e,t,i)}r(Vt,"getChartLegendComponent");n(Vt,"getChartLegendComponent");var st,Oi=(st=class{constructor(t,i,s,a,h){this.plotData=t,this.xAxis=i,this.yAxis=s,this.orientation=a,this.plotIndex=h}getDrawableElement(){const t=this.plotData.data.map(a=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]);let i;if(this.orientation==="horizontal"?i=oi().y(a=>a[0]).x(a=>a[1])(t):i=oi().x(a=>a[0]).y(a=>a[1])(t),!i)return[];const 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){const c=[];for(const[b,[p,m]]of t.entries()){const k=this.plotData.pointLabels[b];k&&(this.orientation==="horizontal"?c.push({x:m+10,y:p,text:k,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0}):c.push({x:p,y:m-10,text:k,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0}))}c.length>0&&s.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:c})}return s}},r(st,"LinePlot"),n(st,"LinePlot"),st),at,Vi=(at=class{constructor(t,i,s,a,h,c){this.barData=t,this.boundingRect=i,this.xAxis=s,this.yAxis=a,this.orientation=h,this.plotIndex=c}getDrawableElement(){const t=this.barData.data.map(h=>[this.xAxis.getScaleValue(h[0]),this.yAxis.getScaleValue(h[1])]),s=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),a=s/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(h=>({x:this.boundingRect.x,y:h[0]-a,height:s,width:h[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(h=>({x:h[0]-a,y:h[1],width:s,height:this.boundingRect.y+this.boundingRect.height-h[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},r(at,"BarPlot"),n(at,"BarPlot"),at),nt,Fi=(nt=class{constructor(t,i,s){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");const t=[];for(const[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{const a=new Oi(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...a.getDrawableElement())}break;case"bar":{const a=new Vi(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...a.getDrawableElement())}break}return t}},r(nt,"BasePlot"),n(nt,"BasePlot"),nt);function Ft(e,t,i){return new Fi(e,t,i)}r(Ft,"getPlotComponent");n(Ft,"getPlotComponent");var ot,Wi=(ot=class{constructor(t,i,s,a){this.chartConfig=t,this.chartData=i,this.componentStore={title:Ot(t,i,s,a),plot:Ft(t,i,s),legend:Vt(t,i,s,a),xAxis:bt(i.xAxis,t.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},a),yAxis:bt(i.yAxis,t.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},a)}}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,a=0,h={width:0,height:0},c=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),b=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),p=this.componentStore.plot.calculateSpace({width:c,height:b});t-=p.width,i-=p.height,p=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),a=p.height,i-=p.height,this.componentStore.xAxis.setAxisPosition("bottom"),p=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=p.height,this.componentStore.yAxis.setAxisPosition("left"),p=this.componentStore.yAxis.calculateSpace({width:t,height:i}),s=p.width,t-=p.width,h=this.componentStore.legend.calculateSpace({width:t,height:b}),t-=h.width,t>0&&(c+=t,t=0),i>0&&(b+=i,i=0),this.componentStore.plot.calculateSpace({width:c,height:b}),this.componentStore.plot.setBoundingBoxXY({x:s,y:a}),this.componentStore.legend.setBoundingBoxXY({x:s+c,y:a+Math.max((b-h.height)/2,0)}),this.componentStore.xAxis.setRange([s,s+c]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:a+b}),this.componentStore.yAxis.setRange([a,a+b]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(m=>gt(m))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,a=0,h=0,c={width:0,height:0},b=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),p=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),m=this.componentStore.plot.calculateSpace({width:b,height:p});t-=m.width,i-=m.height,m=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=m.height,i-=m.height,this.componentStore.xAxis.setAxisPosition("left"),m=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=m.width,a=m.width,this.componentStore.yAxis.setAxisPosition("top"),m=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=m.height,h=s+m.height,c=this.componentStore.legend.calculateSpace({width:t,height:p}),t-=c.width,t>0&&(b+=t,t=0),i>0&&(p+=i,i=0),this.componentStore.plot.calculateSpace({width:b,height:p}),this.componentStore.plot.setBoundingBoxXY({x:a,y:h}),this.componentStore.legend.setBoundingBoxXY({x:a+b,y:h+Math.max((p-c.height)/2,0)}),this.componentStore.yAxis.setRange([a,a+b]),this.componentStore.yAxis.setBoundingBoxXY({x:a,y:s}),this.componentStore.xAxis.setRange([h,h+p]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:h}),this.chartData.plots.some(k=>gt(k))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},r(ot,"Orchestrator"),n(ot,"Orchestrator"),ot),ht,Xi=(ht=class{static build(t,i,s,a){return new Wi(t,i,s,a).getDrawableElement()}},r(ht,"XYChartBuilder"),n(ht,"XYChartBuilder"),ht),xt=0,xi,dt=St(),pt=wt(),y=Rt(),Bt=pt.plotColorPalette.split(",").map(e=>e.trim()),Ct=!1,Wt=!1;function wt(){const e=Ti(),t=Mt();return gi(e.xyChart,t.themeVariables.xyChart)}r(wt,"getChartDefaultThemeConfig");n(wt,"getChartDefaultThemeConfig");function St(){const e=Mt();return gi(ki.xyChart,e.xyChart)}r(St,"getChartDefaultConfig");n(St,"getChartDefaultConfig");function Rt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}r(Rt,"getChartDefaultData");n(Rt,"getChartDefaultData");function $(e){const t=Mt();return _i(e.trim(),t)}r($,"textSanitizer");n($,"textSanitizer");function Xt(e){xi=e}r(Xt,"setTmpSVGG");n(Xt,"setTmpSVGG");function Yt(e){e==="horizontal"?dt.chartOrientation="horizontal":dt.chartOrientation="vertical"}r(Yt,"setOrientation");n(Yt,"setOrientation");function Nt(e){y.xAxis.title=$(e.text)}r(Nt,"setXAxisTitle");n(Nt,"setXAxisTitle");function _t(e,t){y.xAxis={type:"linear",title:y.xAxis.title,min:e,max:t},Ct=!0}r(_t,"setXAxisRangeData");n(_t,"setXAxisRangeData");function Ht(e){y.xAxis={type:"band",title:y.xAxis.title,categories:e.map(t=>$(t.text))},Ct=!0}r(Ht,"setXAxisBand");n(Ht,"setXAxisBand");function $t(e){y.yAxis.title=$(e.text)}r($t,"setYAxisTitle");n($t,"setYAxisTitle");function Ut(e,t){y.yAxis={type:"linear",title:y.yAxis.title,min:e,max:t},Wt=!0}r(Ut,"setYAxisRangeData");n(Ut,"setYAxisRangeData");function Gt(e){const t=Math.min(...e),i=Math.max(...e),s=Q(y.yAxis)?y.yAxis.min:1/0,a=Q(y.yAxis)?y.yAxis.max:-1/0;y.yAxis={type:"linear",title:y.yAxis.title,min:Math.min(s,t),max:Math.max(a,i)}}r(Gt,"setYAxisRangeFromPlotData");n(Gt,"setYAxisRangeFromPlotData");function kt(e){let t=[];if(e.length===0)return t;if(!Ct){const i=Q(y.xAxis)?y.xAxis.min:1/0,s=Q(y.xAxis)?y.xAxis.max:-1/0;_t(Math.min(i,1),Math.max(s,e.length))}if(ut(y.xAxis)&&e.length>y.xAxis.categories.length&&(e=e.slice(0,y.xAxis.categories.length)),Wt||Gt(e),ut(y.xAxis)&&(t=y.xAxis.categories.map((i,s)=>[i,e[s]])),Q(y.xAxis)){const i=y.xAxis.min,s=y.xAxis.max;if(e.length===1)t=[[`${i}`,e[0]]];else{const a=(s-i)/(e.length-1);t=e.map((h,c)=>[`${i+c*a}`,h])}}return t}r(kt,"transformDataWithoutCategory");n(kt,"transformDataWithoutCategory");function Tt(e){return Bt[e===0?0:e%Bt.length]}r(Tt,"getPlotColorFromPalette");n(Tt,"getPlotColorFromPalette");function qt(e,t){const i=t.map(c=>c.value),s=t.map(c=>c.label?$(c.label):""),a=kt(i),h=s.some(c=>c!=="");y.plots.push({type:"line",title:$(e.text),strokeFill:Tt(xt),strokeWidth:2,data:a,...h?{pointLabels:s}:{}}),xt++}r(qt,"setLineData");n(qt,"setLineData");function jt(e,t){const i=t.map(a=>a.value),s=kt(i);y.plots.push({type:"bar",title:$(e.text),fill:Tt(xt),data:s}),xt++}r(jt,"setBarData");n(jt,"setBarData");function Qt(){if(y.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return y.title=li(),Xi.build(dt,y,pt,xi)}r(Qt,"getDrawableElem");n(Qt,"getDrawableElem");function Kt(){return pt}r(Kt,"getChartThemeConfig");n(Kt,"getChartThemeConfig");function Jt(){return dt}r(Jt,"getChartConfig");n(Jt,"getChartConfig");function Zt(){return y}r(Zt,"getXYChartData");n(Zt,"getXYChartData");var Yi=n(function(){Ri(),xt=0,dt=St(),y=Rt(),pt=wt(),Bt=pt.plotColorPalette.split(",").map(e=>e.trim()),Ct=!1,Wt=!1},"clear"),Ni={getDrawableElem:Qt,clear:Yi,setAccTitle:Ci,getAccTitle:Ai,setDiagramTitle:bi,getDiagramTitle:li,getAccDescription:yi,setAccDescription:mi,setOrientation:Yt,setXAxisTitle:Nt,setXAxisRangeData:_t,setXAxisBand:Ht,setYAxisTitle:$t,setYAxisRangeData:Ut,setLineData:qt,setBarData:jt,setTmpSVGG:Xt,getChartThemeConfig:Kt,getChartConfig:Jt,getXYChartData:Zt},Hi=n((e,t,i,s)=>{const a=s.db,h=a.getChartThemeConfig(),c=a.getChartConfig(),b=a.getXYChartData().plots[0].data.map(A=>A[1]);function p(A){return A==="top"?"text-before-edge":"middle"}r(p,"getDominantBaseLine"),n(p,"getDominantBaseLine");function m(A){return A==="left"?"start":A==="right"?"end":"middle"}r(m,"getTextAnchor"),n(m,"getTextAnchor");function k(A){return`translate(${A.x}, ${A.y}) rotate(${A.rotation||0})`}r(k,"getTextTransformation"),n(k,"getTextTransformation"),ci.debug(`Rendering xychart chart
7
+ `+e);const T=wi(t),L=T.append("g").attr("class","main"),W=L.append("rect").attr("width",c.width).attr("height",c.height).attr("class","background");Si(T,c.height,c.width,!0),T.attr("viewBox",`0 0 ${c.width} ${c.height}`),W.attr("fill",h.backgroundColor),a.setTmpSVGG(T.append("g").attr("class","mermaid-tmp-group"));const X=a.getDrawableElem(),E={};function B(A){let D=L,g="";for(const[M]of A.entries()){let V=L;M>0&&E[g]&&(V=E[g]),g+=A[M],D=E[g],D||(D=E[g]=V.append("g").attr("class",A[M]))}return D}r(B,"getGroup"),n(B,"getGroup");for(const A of X){if(A.data.length===0)continue;const D=B(A.groupTexts);switch(A.type){case"rect":if(D.selectAll("rect").data(A.data).enter().append("rect").attr("x",g=>g.x).attr("y",g=>g.y).attr("width",g=>g.width).attr("height",g=>g.height).attr("fill",g=>g.fill).attr("stroke",g=>g.strokeFill).attr("stroke-width",g=>g.strokeWidth),c.showDataLabel){const g=c.showDataLabelOutsideBar;if(c.chartOrientation==="horizontal"){let M=r(function(w,z){const{data:_,label:lt}=w;return z*lt.length*V<=_.width-Y},"fitsHorizontally2");n(M,"fitsHorizontally");const V=.7,Y=10,N=A.data.map((w,z)=>({data:w,label:b[z].toString()})).filter(w=>w.data.width>0&&w.data.height>0),R=N.map(w=>{const{data:z}=w;let _=z.height*.7;for(;!M(w,_)&&_>0;)_-=1;return _}),U=Math.floor(Math.min(...R)),C=n(w=>g?w.data.x+w.data.width+Y:w.data.x+w.data.width-Y,"determineLabelXPosition");D.selectAll("text").data(N).enter().append("text").attr("x",C).attr("y",w=>w.data.y+w.data.height/2).attr("text-anchor",g?"start":"end").attr("dominant-baseline","middle").attr("fill",h.dataLabelColor).attr("font-size",`${U}px`).text(w=>w.label)}else{let M=r(function(C,w,z){const{data:_,label:lt}=C,F=w*lt.length*.7,l=_.x+_.width/2,u=l-F/2,x=l+F/2,d=u>=_.x&&x<=_.x+_.width,S=_.y+z+w<=_.y+_.height;return d&&S},"fitsInBar2");n(M,"fitsInBar");const V=10,Y=A.data.map((C,w)=>({data:C,label:b[w].toString()})).filter(C=>C.data.width>0&&C.data.height>0),N=Y.map(C=>{const{data:w,label:z}=C;let _=w.width/(z.length*.7);for(;!M(C,_,V)&&_>0;)_-=1;return _}),R=Math.floor(Math.min(...N)),U=n(C=>g?C.data.y-V:C.data.y+V,"determineLabelYPosition");D.selectAll("text").data(Y).enter().append("text").attr("x",C=>C.data.x+C.data.width/2).attr("y",U).attr("text-anchor","middle").attr("dominant-baseline",g?"auto":"hanging").attr("fill",h.dataLabelColor).attr("font-size",`${R}px`).text(C=>C.label)}}break;case"text":D.selectAll("text").data(A.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",g=>g.fill).attr("font-size",g=>g.fontSize).attr("dominant-baseline",g=>p(g.verticalPos)).attr("text-anchor",g=>m(g.horizontalPos)).attr("transform",g=>k(g)).text(g=>g.text);break;case"path":D.selectAll("path").data(A.data).enter().append("path").attr("d",g=>g.path).attr("fill",g=>g.fill?g.fill:"none").attr("stroke",g=>g.strokeFill).attr("stroke-width",g=>g.strokeWidth);break}}},"draw"),$i={draw:Hi},ae={parser:Pi,db:Ni,renderer:$i};export{ae as diagram};
@@ -0,0 +1 @@
1
+ const e=Object.freeze(JSON.parse(`{"displayName":"YAML","fileTypes":["yaml","yml","rviz","reek","clang-format","yaml-tmlanguage","syntax","sublime-syntax"],"firstLineMatch":"^%YAML( ?1.\\\\d+)?","name":"yaml","patterns":[{"include":"#comment"},{"include":"#property"},{"include":"#directive"},{"match":"^---","name":"entity.other.document.begin.yaml"},{"match":"^\\\\.{3}","name":"entity.other.document.end.yaml"},{"include":"#node"}],"repository":{"block-collection":{"patterns":[{"include":"#block-sequence"},{"include":"#block-mapping"}]},"block-mapping":{"patterns":[{"include":"#block-pair"}]},"block-node":{"patterns":[{"include":"#prototype"},{"include":"#block-scalar"},{"include":"#block-collection"},{"include":"#flow-scalar-plain-out"},{"include":"#flow-node"}]},"block-pair":{"patterns":[{"begin":"\\\\?","beginCaptures":{"1":{"name":"punctuation.definition.key-value.begin.yaml"}},"end":"(?=\\\\?)|^ *(:)|(:)","endCaptures":{"1":{"name":"punctuation.separator.key-value.mapping.yaml"},"2":{"name":"invalid.illegal.expected-newline.yaml"}},"name":"meta.block-mapping.yaml","patterns":[{"include":"#block-node"}]},{"begin":"(?=(?:[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S)([^:\\\\s]|:\\\\S|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","patterns":[{"include":"#flow-scalar-plain-out-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S","beginCaptures":{"0":{"name":"entity.name.tag.yaml"}},"contentName":"entity.name.tag.yaml","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","name":"string.unquoted.plain.out.yaml"}]},{"match":":(?=\\\\s|$)","name":"punctuation.separator.key-value.mapping.yaml"}]},"block-scalar":{"begin":"(?:(\\\\|)|(>))([1-9])?([-+])?(.*\\\\n?)","beginCaptures":{"1":{"name":"keyword.control.flow.block-scalar.literal.yaml"},"2":{"name":"keyword.control.flow.block-scalar.folded.yaml"},"3":{"name":"constant.numeric.indentation-indicator.yaml"},"4":{"name":"storage.modifier.chomping-indicator.yaml"},"5":{"patterns":[{"include":"#comment"},{"match":".+","name":"invalid.illegal.expected-comment-or-newline.yaml"}]}},"end":"^(?=\\\\S)|(?!\\\\G)","patterns":[{"begin":"^( +)(?! )","end":"^(?!\\\\1|\\\\s*$)","name":"string.unquoted.block.yaml"}]},"block-sequence":{"match":"(-)(?!\\\\S)","name":"punctuation.definition.block.sequence.item.yaml"},"comment":{"begin":"(?:^([\\\\t ]*)|[\\\\t ]+)(?=#\\\\p{print}*$)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.yaml"}},"end":"(?!\\\\G)","patterns":[{"begin":"#","beginCaptures":{"0":{"name":"punctuation.definition.comment.yaml"}},"end":"\\\\n","name":"comment.line.number-sign.yaml"}]},"directive":{"begin":"^%","beginCaptures":{"0":{"name":"punctuation.definition.directive.begin.yaml"}},"end":"(?=$|[\\\\t ]+($|#))","name":"meta.directive.yaml","patterns":[{"captures":{"1":{"name":"keyword.other.directive.yaml.yaml"},"2":{"name":"constant.numeric.yaml-version.yaml"}},"match":"\\\\G(YAML)[\\\\t ]+(\\\\d+\\\\.\\\\d+)"},{"captures":{"1":{"name":"keyword.other.directive.tag.yaml"},"2":{"name":"storage.type.tag-handle.yaml"},"3":{"name":"support.type.tag-prefix.yaml"}},"match":"\\\\G(TAG)(?:[\\\\t ]+(!(?:[-0-9A-Za-z]*!)?)(?:[\\\\t ]+(!(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])*|(?![]!,\\\\[{}])(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])+))?)?"},{"captures":{"1":{"name":"support.other.directive.reserved.yaml"},"2":{"name":"string.unquoted.directive-name.yaml"},"3":{"name":"string.unquoted.directive-parameter.yaml"}},"match":"\\\\G(\\\\w+)(?:[\\\\t ]+(\\\\w+)(?:[\\\\t ]+(\\\\w+))?)?"},{"match":"\\\\S+","name":"invalid.illegal.unrecognized.yaml"}]},"flow-alias":{"captures":{"1":{"name":"keyword.control.flow.alias.yaml"},"2":{"name":"punctuation.definition.alias.yaml"},"3":{"name":"variable.other.alias.yaml"},"4":{"name":"invalid.illegal.character.anchor.yaml"}},"match":"((\\\\*))([^],/\\\\[{}\\\\s]+)([^],}\\\\s]\\\\S*)?"},"flow-collection":{"patterns":[{"include":"#flow-sequence"},{"include":"#flow-mapping"}]},"flow-mapping":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.mapping.begin.yaml"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.mapping.end.yaml"}},"name":"meta.flow-mapping.yaml","patterns":[{"include":"#prototype"},{"match":",","name":"punctuation.separator.mapping.yaml"},{"include":"#flow-pair"}]},"flow-node":{"patterns":[{"include":"#prototype"},{"include":"#flow-alias"},{"include":"#flow-collection"},{"include":"#flow-scalar"}]},"flow-pair":{"patterns":[{"begin":"\\\\?","beginCaptures":{"0":{"name":"punctuation.definition.key-value.begin.yaml"}},"end":"(?=[],}])","name":"meta.flow-pair.explicit.yaml","patterns":[{"include":"#prototype"},{"include":"#flow-pair"},{"include":"#flow-node"},{"begin":":(?=\\\\s|$|[],\\\\[{}])","beginCaptures":{"0":{"name":"punctuation.separator.key-value.mapping.yaml"}},"end":"(?=[],}])","patterns":[{"include":"#flow-value"}]}]},{"begin":"(?=(?:[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s])([^],:\\\\[{}\\\\s]|:[^],\\\\[{}\\\\s]|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"meta.flow-pair.key.yaml","patterns":[{"include":"#flow-scalar-plain-in-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s]","beginCaptures":{"0":{"name":"entity.name.tag.yaml"}},"contentName":"entity.name.tag.yaml","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"string.unquoted.plain.in.yaml"}]},{"include":"#flow-node"},{"begin":":(?=\\\\s|$|[],\\\\[{}])","captures":{"0":{"name":"punctuation.separator.key-value.mapping.yaml"}},"end":"(?=[],}])","name":"meta.flow-pair.yaml","patterns":[{"include":"#flow-value"}]}]},"flow-scalar":{"patterns":[{"include":"#flow-scalar-double-quoted"},{"include":"#flow-scalar-single-quoted"},{"include":"#flow-scalar-plain-in"}]},"flow-scalar-double-quoted":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.yaml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.yaml"}},"name":"string.quoted.double.yaml","patterns":[{"match":"\\\\\\\\([ \\"/0LN\\\\\\\\_abefnprtv]|x\\\\d\\\\d|u\\\\d{4}|U\\\\d{8})","name":"constant.character.escape.yaml"},{"match":"\\\\\\\\\\\\n","name":"constant.character.escape.double-quoted.newline.yaml"}]},"flow-scalar-plain-in":{"patterns":[{"include":"#flow-scalar-plain-in-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s]","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"string.unquoted.plain.in.yaml"}]},"flow-scalar-plain-in-implicit-type":{"patterns":[{"captures":{"1":{"name":"constant.language.null.yaml"},"2":{"name":"constant.language.boolean.yaml"},"3":{"name":"constant.numeric.integer.yaml"},"4":{"name":"constant.numeric.float.yaml"},"5":{"name":"constant.other.timestamp.yaml"},"6":{"name":"constant.language.value.yaml"},"7":{"name":"constant.language.merge.yaml"}},"match":"(?:(null|Null|NULL|~)|([Yy]|yes|Yes|YES|[Nn]|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|([-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[_\\\\h]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)|([-+]?(?:[0-9][0-9_]*)?\\\\.[.0-9]*(?:[Ee][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))|(\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[\\\\t ]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[\\\\t ]*Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?)|(=)|(<<))(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])"}]},"flow-scalar-plain-out":{"patterns":[{"include":"#flow-scalar-plain-out-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","name":"string.unquoted.plain.out.yaml"}]},"flow-scalar-plain-out-implicit-type":{"patterns":[{"captures":{"1":{"name":"constant.language.null.yaml"},"2":{"name":"constant.language.boolean.yaml"},"3":{"name":"constant.numeric.integer.yaml"},"4":{"name":"constant.numeric.float.yaml"},"5":{"name":"constant.other.timestamp.yaml"},"6":{"name":"constant.language.value.yaml"},"7":{"name":"constant.language.merge.yaml"}},"match":"(?:(null|Null|NULL|~)|([Yy]|yes|Yes|YES|[Nn]|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|([-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[_\\\\h]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)|([-+]?(?:[0-9][0-9_]*)?\\\\.[.0-9]*(?:[Ee][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))|(\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[\\\\t ]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[\\\\t ]*Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?)|(=)|(<<))(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))"}]},"flow-scalar-single-quoted":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.yaml"}},"end":"'(?!')","endCaptures":{"0":{"name":"punctuation.definition.string.end.yaml"}},"name":"string.quoted.single.yaml","patterns":[{"match":"''","name":"constant.character.escape.single-quoted.yaml"}]},"flow-sequence":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.sequence.begin.yaml"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.sequence.end.yaml"}},"name":"meta.flow-sequence.yaml","patterns":[{"include":"#prototype"},{"match":",","name":"punctuation.separator.sequence.yaml"},{"include":"#flow-pair"},{"include":"#flow-node"}]},"flow-value":{"patterns":[{"begin":"\\\\G(?![],}])","end":"(?=[],}])","name":"meta.flow-pair.value.yaml","patterns":[{"include":"#flow-node"}]}]},"node":{"patterns":[{"include":"#block-node"}]},"property":{"begin":"(?=[!\\\\&])","end":"(?!\\\\G)","name":"meta.property.yaml","patterns":[{"captures":{"1":{"name":"keyword.control.property.anchor.yaml"},"2":{"name":"punctuation.definition.anchor.yaml"},"3":{"name":"entity.name.type.anchor.yaml"},"4":{"name":"invalid.illegal.character.anchor.yaml"}},"match":"\\\\G((&))([^],/\\\\[{}\\\\s]+)(\\\\S+)?"},{"match":"\\\\G!(?:<(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])+>|(?:[-0-9A-Za-z]*!)?(?:%\\\\h{2}|[#$\\\\&-+\\\\--;=?-Z_a-z~])+|)(?=[\\\\t ]|$)","name":"storage.type.tag-handle.yaml"},{"match":"\\\\S+","name":"invalid.illegal.tag-handle.yaml"}]},"prototype":{"patterns":[{"include":"#comment"},{"include":"#property"}]}},"scopeName":"source.yaml","aliases":["yml"]}`)),n=[e];export{n as default};
package/web/index.html CHANGED
@@ -32,9 +32,9 @@
32
32
  }
33
33
  })();
34
34
  </script>
35
- <script type="module" crossorigin src="./assets/main-5hScumEl.js"></script>
36
- <link rel="modulepreload" crossorigin href="./assets/index-DFfbtrtQ.js">
37
- <link rel="stylesheet" crossorigin href="./assets/index-D8iAKGNi.css">
35
+ <script type="module" crossorigin src="./assets/main-B239_4z1.js"></script>
36
+ <link rel="modulepreload" crossorigin href="./assets/index-B6q9ygFx.js">
37
+ <link rel="stylesheet" crossorigin href="./assets/index-Cz8nGS3-.css">
38
38
  <link rel="stylesheet" crossorigin href="./assets/main-BXa7WYYr.css">
39
39
  </head>
40
40
  <body>
package/web/pet.html CHANGED
@@ -8,9 +8,9 @@
8
8
  content="default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; connect-src 'self' http://localhost:5173 ws://localhost:5173"
9
9
  />
10
10
  <title>LookatStudy Pet</title>
11
- <script type="module" crossorigin src="./assets/pet-a4xGZJ4o.js"></script>
12
- <link rel="modulepreload" crossorigin href="./assets/index-DFfbtrtQ.js">
13
- <link rel="stylesheet" crossorigin href="./assets/index-D8iAKGNi.css">
11
+ <script type="module" crossorigin src="./assets/pet-CZ36ImJS.js"></script>
12
+ <link rel="modulepreload" crossorigin href="./assets/index-B6q9ygFx.js">
13
+ <link rel="stylesheet" crossorigin href="./assets/index-Cz8nGS3-.css">
14
14
  <link rel="stylesheet" crossorigin href="./assets/pet-CTf4hJTR.css">
15
15
  </head>
16
16
  <body>
@@ -1 +0,0 @@
1
- import{g as p,r as u,d as a}from"./chunk-6Q2QTUOP-PEKlwd8q.js";import{p as f}from"./chunk-JWPE2WC7-Df8WvQEt.js";import{_ as n,l as o}from"./mermaid.core-DZ6Z8vWa.js";import{M as c,b as d}from"./cynefin-VYW2F7L2-deqxDK2d.js";import"./main-5hScumEl.js";import"./index-DFfbtrtQ.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},F={parser:R,db:a,renderer:u,styles:p};export{F as diagram};
@@ -1 +0,0 @@
1
- var f=Object.defineProperty;var P=(s,e,t)=>e in s?f(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var g=(s,e,t)=>P(s,typeof e!="symbol"?e+"":e,t);const S={listCourses:"course:list",getCourseTree:"course:getTree",importCourseFromRepo:"course:importFromRepo",detectLanguages:"course:detectLanguages",getCourseLanguages:"course:getLanguages",setCourseLanguage:"course:setLanguage",getCourseLanguage:"course:getLanguage",analyzeRepo:"course:analyzeRepo",importAnalyzed:"course:importAnalyzed",importLocalFolder:"import:localFolder",importGithub:"import:github",importUrl:"import:url",importText:"import:text",importEpub:"import:epub",importAudio:"import:audio",importCancel:"import:cancel",importResume:"import:resume",importPack:"import:importPack",exportPack:"import:exportPack",generateCourseFromMarkdown:"course:generateFromMarkdown",deleteCourse:"course:delete",restructureCourse:"course:restructure",generateSummaries:"course:generateSummaries",getStarterPrompts:"course:getStarterPrompts",getNodeContent:"course:getNodeContent",getNodeSummary:"course:getNodeSummary",getPracticeForLesson:"course:getPracticeForLesson",getLessonForPractice:"course:getLessonForPractice",listAssetsByNode:"asset:listByNode",listAssetsByCourse:"asset:listByCourse",getAssetDataUrl:"asset:getDataUrl",getProgress:"progress:get",updateProgress:"progress:update",markNodeAttempted:"progress:markAttempted",generateExercise:"exercise:generate",listExercises:"exercise:list",submitExerciseAnswer:"exercise:submit",examPrepare:"exam:prepare",examRegenerate:"exam:regenerate",examGetStatus:"exam:getStatus",examStartAttempt:"exam:startAttempt",examRecordAnswer:"exam:recordAnswer",examSubmitAttempt:"exam:submitAttempt",getDueReviews:"srs:getDue",getAllSrsItems:"srs:getAll",recordReview:"srs:record",getStreak:"streak:get",touchStreakToday:"streak:touchToday",listSouls:"soul:list",getSoul:"soul:get",createSoul:"soul:create",setActiveSoul:"soul:setActive",getActiveSoul:"soul:getActive",agentChat:"agent:chat",abortAgentChat:"agent:abort",getChatHistory:"agent:getHistory",clearChatHistory:"agent:clearHistory",agentChatThread:"agent:chatThread",abortAgentChatThread:"agent:abortThread",getContextUsage:"agent:getContextUsage",getSpeechModelStatus:"speech:getModelStatus",ensureSpeechModel:"speech:ensureModel",deleteSpeechModel:"speech:deleteModel",ttsSpeak:"speech:ttsSpeak",ttsStop:"speech:ttsStop",asrTranscribe:"speech:asrTranscribe",testCustomTts:"speech:testCustomTts",testCustomAsr:"speech:testCustomAsr",getAttachmentDataUrl:"attachment:getDataUrl",isAgentReady:"agent:isReady",getProviderPresets:"agent:getProviderPresets",testLlmConnection:"agent:testConnection",testCustomProvider:"agent:testCustomProvider",discoverModels:"agent:discoverModels",discoverProviderModels:"agent:discoverProviderModels",listCustomProviders:"customProvider:list",createCustomProvider:"customProvider:create",updateCustomProvider:"customProvider:update",deleteCustomProvider:"customProvider:delete",listPendingProposals:"proposal:listPending",applyProposal:"proposal:apply",rejectProposal:"proposal:reject",recordQuizAnswer:"quiz:recordAnswer",logFriction:"friction:log",getDashboard:"dashboard:get",searchContent:"search:content",updateMemory:"memory:update",getMemory:"memory:get",consolidateMemory:"consolidate:run",getSetting:"settings:get",setSetting:"settings:set",companionPetSetClickThrough:"companionPet:setClickThrough",getXpStatus:"xp:getStatus",exportCourse:"course:export",canvasList:"canvas:list",canvasSave:"canvas:save",canvasDelete:"canvas:delete",canvasTogglePin:"canvas:togglePin",canvasSaveUserNote:"canvas:saveUserNote",canvasRecordQuizResult:"canvas:recordQuizResult",canvasUpdateUserNoteComment:"canvas:updateUserNoteComment",threadList:"thread:list",threadCreate:"thread:create",threadUpdate:"thread:update",threadDelete:"thread:delete",threadGetMessages:"thread:getMessages",threadFindRecentByNode:"thread:findRecentByNode"},h=1,m="ls-serve-token";function y(){const s=new URLSearchParams(window.location.search).get("token");if(s){try{window.localStorage.setItem(m,s)}catch{}return s}try{return window.localStorage.getItem(m)??""}catch{return""}}class p{constructor(){g(this,"ws",null);g(this,"everOpened",!1);g(this,"pending",new Map);g(this,"listeners",new Map);g(this,"connectPromise",null)}connect(){return this.ws&&this.ws.readyState===WebSocket.OPEN?Promise.resolve(this.ws):this.connectPromise?this.connectPromise:(this.connectPromise=new Promise((e,t)=>{const c=window.location.protocol==="https:"?"wss:":"ws:",o=y(),a=`${c}//${window.location.host}/?token=${encodeURIComponent(o)}`;let i=!1;const d=new WebSocket(a);this.ws=d;const l=window.setTimeout(()=>{i||(i=!0,this.connectPromise=null,t(new Error("连接学习服务超时(serve 未启动?)")))},5e3);d.addEventListener("open",()=>{this.everOpened=!0,window.clearTimeout(l),i||(i=!0,this.connectPromise=null,e(d))}),d.addEventListener("message",u=>{let r=null;try{r=JSON.parse(String(u.data))}catch{return}if(!(!r||r.v!==h)){if(r.type==="res"){const n=this.pending.get(r.id);if(!n)return;this.pending.delete(r.id),window.clearTimeout(n.timer),r.ok?n.resolve(r.result):n.reject(new Error(r.error))}else if(r.type==="event"){const n=this.listeners.get(r.channel);if(n)for(const v of n)v(...r.args)}}}),d.addEventListener("close",u=>{if(this.connectPromise=null,this.ws===d&&(this.ws=null),!i){i=!0,window.clearTimeout(l),t(new Error(A(u)));return}const r=u.code===4001?"学习服务拒绝了连接(token 无效)——请用启动时打印的带 token 链接打开":"与服务端的连接已断开";for(const[,n]of this.pending)window.clearTimeout(n.timer),n.reject(new Error(r));if(u.code===4001&&(this.everOpened=!1),this.pending.clear(),u.code===4001){window.dispatchEvent(new CustomEvent(C));return}this.everOpened&&window.setTimeout(()=>void this.connect().catch(()=>{}),2e3)}),d.addEventListener("error",()=>{})}),this.connectPromise)}static bytesToB64(e){const t=new Uint8Array(e);let c="";const o=32768;for(let a=0;a<t.length;a+=o)c+=String.fromCharCode(...t.subarray(a,a+o));return btoa(c)}async invoke(e,...t){var a,i;const c=await this.connect(),o=((i=(a=globalThis.crypto)==null?void 0:a.randomUUID)==null?void 0:i.call(a))??String(Math.random()).slice(2);return new Promise((d,l)=>{const u=window.setTimeout(()=>{this.pending.delete(o),l(new Error(`调用 ${e} 超时`))},3e5);this.pending.set(o,{resolve:d,reject:l,timer:u});const r=e==="speech:asrTranscribe"&&t[0]instanceof ArrayBuffer?[p.bytesToB64(t[0]),...t.slice(1)]:t;c.send(JSON.stringify({v:h,type:"req",id:o,channel:e,args:r}))})}on(e,t){const c=e==="speech:ttsAudio"?(...a)=>{const i=a[0];if(i&&typeof i.wavBase64=="string"){const d=atob(i.wavBase64),l=new Uint8Array(d.length);for(let n=0;n<d.length;n++)l[n]=d.charCodeAt(n);const{wavBase64:u,...r}=i;t({...r,wavBytes:l.buffer})}else t(...a)}:t;let o=this.listeners.get(e);return o||(o=new Set,this.listeners.set(e,o)),o.add(c),this.connect().catch(()=>{}),()=>{o.delete(c)}}}function b(){if(typeof window>"u")return!1;if(new URLSearchParams(window.location.search).get("token"))return!0;try{return!!window.localStorage.getItem(m)}catch{return!1}}function k(s){try{window.localStorage.setItem(m,s)}catch{}const e=new URL(window.location.href);e.searchParams.set("token",s),window.location.replace(e.toString())}const C="ls-web-token-rejected";function A(s){return s.code===4001?"学习服务拒绝了连接(token 无效)——请用启动时打印的带 token 链接打开":"无法连接学习服务(serve 未启动?)"}let w=!1;async function x(){if(w||window.api)return;w=!0;const s=new p,e={};for(const[t,c]of Object.entries(S))e[t]=(...o)=>s.invoke(c,...o);e.on=(t,c)=>s.on(t,c),window.api=e,window.__lookatstudyWeb=!0}function E(){return new p}export{C as TOKEN_REJECTED_EVENT,E as createWebTransportForTest,b as hasWebToken,x as installWebApi,k as setWebToken};
@@ -1 +0,0 @@
1
- import{Y as ln,$ as an,a0 as F,a1 as q,a2 as j,a3 as un,a4 as y,a5 as tn,a6 as J,a7 as _,a8 as rn,a9 as o,aa as on,ab as sn,ac as fn}from"./mermaid.core-DZ6Z8vWa.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,I,D,v,A,z,a){var O=I-l,i=D-h,n=z-v,d=a-A,u=d*O-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*O,h+u*i]}function U(l,h,I,D,v,A,z){var a=l-I,O=h-D,i=(z?A:-A)/J(a*a+O*O),n=i*O,d=-i*a,u=l+n,s=h+d,f=I+n,c=D+d,B=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,S=(g<0?-1:1)*J(on(0,T*T*R-P*P)),Y=(P*g-m*S)/R,$=(-P*m-g*S)/R,w=(P*g+m*S)/R,p=(-P*m+g*S)/R,x=Y-B,e=$-t,r=w-B,C=p-t;return x*x+e*e>r*r+C*C&&(Y=w,$=p),{cx:Y,cy:$,x01:-n,y01:-d,x11:Y*(v/T-1),y11:$*(v/T-1)}}function hn(){var l=cn,h=yn,I=j(0),D=null,v=gn,A=dn,z=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,B=rn(c-f),t=c>f;if(a||(a=n=O()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(B>tn-y)a.moveTo(s*F(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*F(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=B,S=B,Y=z.apply(this,arguments)/2,$=Y>y&&(D?+D.apply(this,arguments):J(u*u+s*s)),w=_(rn(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if($>y){var C=sn($/u*q(Y)),K=sn($/s*q(Y));(P-=C*2)>y?(C*=t?1:-1,R+=C,T-=C):(P=0,R=T=(f+c)/2),(S-=K*2)>y?(K*=t?1:-1,m+=K,g-=K):(S=0,m=g=(f+c)/2)}var G=s*F(m),H=s*q(m),L=u*F(T),M=u*q(T);if(w>y){var N=s*F(g),Q=s*q(g),V=u*F(R),W=u*q(R),E;if(B<an)if(E=pn(G,H,V,W,N,Q,L,M)){var X=G-E[0],Z=H-E[1],b=N-E[0],k=Q-E[1],nn=1/q(fn((X*b+Z*k)/(J(X*X+Z*Z)*J(b*b+k*k)))/2),en=J(E[0]*E[0]+E[1]*E[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}S>y?x>y?(e=U(V,W,G,H,s,x,t),r=U(N,Q,L,M,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(G,H),a.arc(0,0,s,m,g,!t)):a.moveTo(G,H),!(u>y)||!(P>y)?a.lineTo(L,M):p>y?(e=U(L,M,N,Q,u,-p,t),r=U(G,H,V,W,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[F(d)*n,q(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:j(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:j(+n),i):h},i.cornerRadius=function(n){return arguments.length?(I=typeof n=="function"?n:j(+n),i):I},i.padRadius=function(n){return arguments.length?(D=n==null?null:typeof n=="function"?n:j(+n),i):D},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:j(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:j(+n),i):A},i.padAngle=function(n){return arguments.length?(z=typeof n=="function"?n:j(+n),i):z},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
@@ -1 +0,0 @@
1
- import{ag as o,ah as n}from"./mermaid.core-DZ6Z8vWa.js";const t=(a,r)=>o.lang.round(n.parse(a)[r]);export{t as c};
@@ -1 +0,0 @@
1
- import{_ as i,d as l,S as d,j as o}from"./mermaid.core-DZ6Z8vWa.js";var x=i((r,t)=>{const e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=i((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),h=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),f=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=i(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{p as a,f as b,g as c,x as d,m as e,w as f,h as g,y as h};
@@ -1 +0,0 @@
1
- import{_ as a,e as w,l as x}from"./mermaid.core-DZ6Z8vWa.js";var d=a((e,t,i,o)=>{e.attr("class",i);const{width:r,height:h,x:n,y:c}=u(e,t);w(e,h,r,o);const s=l(n,c,r,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{var o;const i=((o=e.node())==null?void 0:o.getBBox())||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),l=a((e,t,i,o,r)=>`${e-r} ${t-r} ${i} ${o}`,"createViewBox");export{d as s};
@@ -1 +0,0 @@
1
- import{_ as a,d as o}from"./mermaid.core-DZ6Z8vWa.js";var d=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{d as g};
@@ -1 +0,0 @@
1
- import{s as a,c as s,a as e,C as t}from"./chunk-GF5L2VYU-FwREiZq-.js";import{_ as i}from"./mermaid.core-DZ6Z8vWa.js";import"./chunk-5VM5RSS4-CknJ0UrM.js";import"./chunk-XXDRQBXY-BtPTE4dn.js";import"./chunk-KBJHAD2P-BsrsrevO.js";import"./chunk-2GRJ4B5K-Cam0QBnt.js";import"./main-5hScumEl.js";import"./index-DFfbtrtQ.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram};
@@ -1 +0,0 @@
1
- import{s as a,c as s,a as e,C as t}from"./chunk-GF5L2VYU-FwREiZq-.js";import{_ as i}from"./mermaid.core-DZ6Z8vWa.js";import"./chunk-5VM5RSS4-CknJ0UrM.js";import"./chunk-XXDRQBXY-BtPTE4dn.js";import"./chunk-KBJHAD2P-BsrsrevO.js";import"./chunk-2GRJ4B5K-Cam0QBnt.js";import"./main-5hScumEl.js";import"./index-DFfbtrtQ.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram};