@runfusion/fusion 0.44.0 → 0.45.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 (240) hide show
  1. package/README.md +2 -1
  2. package/dist/bin.js +6902 -2143
  3. package/dist/client/.vite/manifest.json +1115 -328
  4. package/dist/client/assets/AgentDetailView-CgbB51Iw.css +1 -0
  5. package/dist/client/assets/AgentDetailView-DJTi6hKC.js +18 -0
  6. package/dist/client/assets/{AgentPermissionPolicyEditor--YS4iMUY.js → AgentPermissionPolicyEditor-C5DR9dUS.js} +2 -2
  7. package/dist/client/assets/AgentsView-BNd90PSx.js +29 -0
  8. package/dist/client/assets/AgentsView-CzMa5Olf.css +1 -0
  9. package/dist/client/assets/ChatView-B7JaZCL_.js +19 -0
  10. package/dist/client/assets/ChatView-BtjkE0V7.css +1 -0
  11. package/dist/client/assets/CommandCenter-CHO21xEW.js +74 -0
  12. package/dist/client/assets/CommandCenter-Xs5Ftv8s.css +1 -0
  13. package/dist/client/assets/DevServerView-B_p91Mj_.css +1 -0
  14. package/dist/client/assets/DevServerView-H9OkT1ld.js +1 -0
  15. package/dist/client/assets/DirectoryPicker-DegxT8ia.js +1 -0
  16. package/dist/client/assets/DocumentsView-kVVQYISc.js +1 -0
  17. package/dist/client/assets/EvalsView-C9-iTSat.js +1 -0
  18. package/dist/client/assets/EvalsView-CTbgPUne.css +1 -0
  19. package/dist/client/assets/ExperimentalAgentOnboardingModal-3ZEFv8sr.css +1 -0
  20. package/dist/client/assets/ExperimentalAgentOnboardingModal-DjP_xNkc.js +1 -0
  21. package/dist/client/assets/GoalsView-CUh8JBnJ.css +1 -0
  22. package/dist/client/assets/GoalsView-VoIHJJ5l.js +2 -0
  23. package/dist/client/assets/InsightsView-BIZaUcpd.js +11 -0
  24. package/dist/client/assets/InsightsView-C7yRTMPn.css +1 -0
  25. package/dist/client/assets/MemoryView-7v7rv6ns.js +2 -0
  26. package/dist/client/assets/MemoryView-CBDUr2Jy.css +1 -0
  27. package/dist/client/assets/PiExtensionsManager-CB89rV4U.js +11 -0
  28. package/dist/client/assets/PluginManager-BNSuW_R4.js +1 -0
  29. package/dist/client/assets/PullRequestView-CI5jdKBL.js +6 -0
  30. package/dist/client/assets/PullRequestView-CpdE3Yo_.css +1 -0
  31. package/dist/client/assets/ResearchView-BT5dR_m8.js +1 -0
  32. package/dist/client/assets/ResearchView-DIVNQF4_.css +1 -0
  33. package/dist/client/assets/SecretsView-CvFioX7R.css +1 -0
  34. package/dist/client/assets/SecretsView-WPYI58Uo.js +1 -0
  35. package/dist/client/assets/SessionTerminal-C6gyOWLt.js +2 -0
  36. package/dist/client/assets/SessionTerminal-D4R3ScvQ.css +1 -0
  37. package/dist/client/assets/SettingsModal-BESN59Ao.css +1 -0
  38. package/dist/client/assets/SettingsModal-BZokaNyx.css +1 -0
  39. package/dist/client/assets/SettingsModal-Bq_3AbaB.js +1 -0
  40. package/dist/client/assets/SettingsModal-JHACoQJe.js +21 -0
  41. package/dist/client/assets/SetupWizardModal-CrgbnR_d.js +2 -0
  42. package/dist/client/assets/ShadcnColorPicker-1icHuwhC.js +11 -0
  43. package/dist/client/assets/ShadcnColorPicker-pqVWCC5-.css +1 -0
  44. package/dist/client/assets/SkillsView-CJ8snrma.css +1 -0
  45. package/dist/client/assets/SkillsView-byuSe3e0.js +1 -0
  46. package/dist/client/assets/TodoView-CIsL_uvQ.css +1 -0
  47. package/dist/client/assets/TodoView-CQ9GjYBg.js +6 -0
  48. package/dist/client/assets/WorkflowNodeEditor-DW7sJZUX.js +8 -0
  49. package/dist/client/assets/WorkflowNodeEditor-f_XPV5Jd.css +1 -0
  50. package/dist/client/assets/{addon-fit-SnYDEvGm.js → addon-fit-C1WQXRvu.js} +1 -1
  51. package/dist/client/assets/{addon-unicode11-s5GoZCpi.js → addon-unicode11-BVmNDUBM.js} +1 -1
  52. package/dist/client/assets/{addon-web-links-jjt2f_oV.js → addon-web-links-CkVew5xs.js} +1 -1
  53. package/dist/client/assets/{addon-webgl-Icn-RnEx.js → addon-webgl-uLc0RKcC.js} +1 -1
  54. package/dist/client/assets/agentSkills-CeytXLHF.js +1 -0
  55. package/dist/client/assets/{ExperimentalAgentOnboardingModal-CZ_jbgep.css → agentSkills-bQJ4X1gH.css} +1 -1
  56. package/dist/client/assets/agentsOrgChartLayout-BMvyuaLA.js +1 -0
  57. package/dist/client/assets/app-3wbZ08YC.js +13 -0
  58. package/dist/client/assets/app-7-5DWLtg.js +13 -0
  59. package/dist/client/assets/app-CSvE5Noc.js +13 -0
  60. package/dist/client/assets/app-CZ2LTFce.js +13 -0
  61. package/dist/client/assets/app-Cv9xEnll.js +13 -0
  62. package/dist/client/assets/app-x_yPcO5Y.js +13 -0
  63. package/dist/client/assets/arc-cxkkNsnK.js +1 -0
  64. package/dist/client/assets/architectureDiagram-3BPJPVTR-BRI0QwDf.js +36 -0
  65. package/dist/client/assets/band-CquvqAHh.js +1 -0
  66. package/dist/client/assets/blockDiagram-GPEHLZMM-BXkN8Hv_.js +132 -0
  67. package/dist/client/assets/c4Diagram-AAUBKEIU-C_Kcokep.js +10 -0
  68. package/dist/client/assets/channel-Clzpzu32.js +1 -0
  69. package/dist/client/assets/chunk-2J33WTMH-BGeuCz9C.js +1 -0
  70. package/dist/client/assets/chunk-4BX2VUAB-DcVdctr0.js +1 -0
  71. package/dist/client/assets/chunk-55IACEB6-Dg6gDigQ.js +1 -0
  72. package/dist/client/assets/chunk-727SXJPM-B9B-vlEb.js +206 -0
  73. package/dist/client/assets/chunk-AQP2D5EJ-LrWQ-2yi.js +231 -0
  74. package/dist/client/assets/chunk-FMBD7UC4-Bnd6hAED.js +15 -0
  75. package/dist/client/assets/chunk-ND2GUHAM-nAw93UB5.js +1 -0
  76. package/dist/client/assets/chunk-QZHKN3VN-CgprKcZo.js +1 -0
  77. package/dist/client/assets/classDiagram-4FO5ZUOK-CzYHP-af.js +1 -0
  78. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-CzYHP-af.js +1 -0
  79. package/dist/client/assets/common-BDp2y6CF.js +1 -0
  80. package/dist/client/assets/common-BnEo5fLN.js +1 -0
  81. package/dist/client/assets/common-Bzr_Y8h4.js +1 -0
  82. package/dist/client/assets/common-CvwyFzfv.js +1 -0
  83. package/dist/client/assets/common-CztCXRkz.js +1 -0
  84. package/dist/client/assets/common-DPe2mbb7.js +1 -0
  85. package/dist/client/assets/cose-bilkent-S5V4N54A-Bhn0g_iK.js +1 -0
  86. package/dist/client/assets/cytoscape.esm-OyMbaexL.js +331 -0
  87. package/dist/client/assets/dagre-BM42HDAG-CP4kfwqd.js +4 -0
  88. package/dist/client/assets/{dashboard-view-B4LXCv5H.js → dashboard-view-CM6Xin_H.js} +1680 -1620
  89. package/dist/client/assets/dashboard-view-DV1nEhh9.js +1 -0
  90. package/dist/client/assets/dashboard-view-D_zsA-kz.css +1 -0
  91. package/dist/client/assets/defaultLocale-DX6XiGOO.js +1 -0
  92. package/dist/client/assets/diagram-2AECGRRQ-DPhzVEUf.js +43 -0
  93. package/dist/client/assets/diagram-5GNKFQAL-8QOC3K_L.js +10 -0
  94. package/dist/client/assets/diagram-KO2AKTUF-C1twgEch.js +3 -0
  95. package/dist/client/assets/diagram-LMA3HP47-3bEegSuf.js +24 -0
  96. package/dist/client/assets/diagram-OG6HWLK6-BJ_x0rm6.js +24 -0
  97. package/dist/client/assets/erDiagram-TEJ5UH35-DNiiS5q6.js +85 -0
  98. package/dist/client/assets/flowDiagram-I6XJVG4X-DoouPklt.js +162 -0
  99. package/dist/client/assets/{folder-open-33WGVnbp.js → folder-open-CuUs2W7f.js} +1 -1
  100. package/dist/client/assets/ganttDiagram-6RSMTGT7-BrR6VnP5.js +292 -0
  101. package/dist/client/assets/gitGraphDiagram-PVQCEYII-BV8_J6Ee.js +106 -0
  102. package/dist/client/assets/graph--OzhPTMs.js +1 -0
  103. package/dist/client/assets/index-BZBQ_KsL.css +1 -0
  104. package/dist/client/assets/index-CZcWjLAb.js +1459 -0
  105. package/dist/client/assets/infoDiagram-5YYISTIA-DGwIIFkR.js +2 -0
  106. package/dist/client/assets/init-Dmth1JHB.js +1 -0
  107. package/dist/client/assets/ishikawaDiagram-YF4QCWOH-D5dEH4RE.js +70 -0
  108. package/dist/client/assets/journeyDiagram-JHISSGLW-BuuSWPw5.js +139 -0
  109. package/dist/client/assets/kanban-definition-UN3LZRKU-DA34uUla.js +89 -0
  110. package/dist/client/assets/katex-HP8lGamR.js +257 -0
  111. package/dist/client/assets/layout-SsrduOYp.js +1 -0
  112. package/dist/client/assets/linear-dXivciGL.js +1 -0
  113. package/dist/client/assets/mermaid.core-Ch4HatqA.js +309 -0
  114. package/dist/client/assets/mindmap-definition-RKZ34NQL-DUCG-qD3.js +96 -0
  115. package/dist/client/assets/ordinal-DILIJJjt.js +1 -0
  116. package/dist/client/assets/pieDiagram-4H26LBE5-DWvFGiLa.js +30 -0
  117. package/dist/client/assets/quadrantDiagram-W4KKPZXB-OPTVW3WT.js +7 -0
  118. package/dist/client/assets/requirementDiagram-4Y6WPE33-D7feZvlU.js +84 -0
  119. package/dist/client/assets/sankeyDiagram-5OEKKPKP-AtnSsEX1.js +40 -0
  120. package/dist/client/assets/sequenceDiagram-3UESZ5HK-BZjHUeI5.js +162 -0
  121. package/dist/client/assets/{shield-alert-CqeGWBUK.js → shield-alert-CzaF9ROV.js} +1 -1
  122. package/dist/client/assets/stateDiagram-AJRCARHV-C8j23Pvn.js +1 -0
  123. package/dist/client/assets/stateDiagram-v2-BHNVJYJU-CiZR_S5-.js +1 -0
  124. package/dist/client/assets/step-yuy0qJer.js +1 -0
  125. package/dist/client/assets/time-DoDTxsna.js +1 -0
  126. package/dist/client/assets/timeline-definition-PNZ67QCA-DvfNz25n.js +120 -0
  127. package/dist/client/assets/{upload-C11J2diI.js → upload-DTsYywhN.js} +1 -1
  128. package/dist/client/assets/{users-a-ELbyyZ.js → users-yAd09tKP.js} +1 -1
  129. package/dist/client/assets/{vendor-i18n-DYlSUfot.js → vendor-i18n-GF3RlKbq.js} +2 -2
  130. package/dist/client/assets/{vendor-react-BTgM5bbZ.js → vendor-react-SZ_qB27O.js} +1 -1
  131. package/dist/client/assets/vendor-reactflow-Bg-Qjzh8.js +15 -0
  132. package/dist/client/assets/{vendor-xterm-ea7-K05z.js → vendor-xterm-BNq00GSj.js} +1 -1
  133. package/dist/client/assets/vennDiagram-CIIHVFJN-CG2aMt3v.js +34 -0
  134. package/dist/client/assets/wardley-L42UT6IY-BnhBteen.js +173 -0
  135. package/dist/client/assets/wardleyDiagram-YWT4CUSO-DwqTzM3T.js +78 -0
  136. package/dist/client/assets/xychartDiagram-2RQKCTM6-5Cv2ZKMV.js +7 -0
  137. package/dist/client/assets/zoom-out-NWbVkreR.js +41 -0
  138. package/dist/client/index.html +30 -10
  139. package/dist/client/sw.js +1 -1
  140. package/dist/client/theme-data.css +3082 -206
  141. package/dist/client/version.json +1 -1
  142. package/dist/droid-cli/index.ts +56 -40
  143. package/dist/droid-cli/package.json +1 -1
  144. package/dist/droid-cli/src/__tests__/index.test.ts +47 -21
  145. package/dist/droid-cli/src/__tests__/process-manager.test.ts +50 -33
  146. package/dist/extension.js +4935 -827
  147. package/dist/pi-claude-cli/package.json +1 -1
  148. package/dist/pi-claude-cli/src/__tests__/process-manager.test.ts +25 -0
  149. package/dist/pi-claude-cli/src/process-manager.ts +11 -1
  150. package/dist/plugin-sdk/index.d.ts +126 -4
  151. package/dist/plugins/fusion-plugin-acp-runtime/package.json +1 -1
  152. package/dist/plugins/fusion-plugin-cli-printing-press/package.json +1 -1
  153. package/dist/plugins/fusion-plugin-compound-engineering/package.json +1 -1
  154. package/dist/plugins/fusion-plugin-cursor-runtime/package.json +1 -1
  155. package/dist/plugins/fusion-plugin-dependency-graph/package.json +1 -1
  156. package/dist/plugins/fusion-plugin-droid-runtime/bundled.js +68 -44
  157. package/dist/plugins/fusion-plugin-droid-runtime/package.json +1 -1
  158. package/dist/plugins/fusion-plugin-hermes-runtime/package.json +1 -1
  159. package/dist/plugins/fusion-plugin-openclaw-runtime/package.json +1 -1
  160. package/dist/plugins/fusion-plugin-paperclip-runtime/package.json +1 -1
  161. package/dist/plugins/fusion-plugin-reports/package.json +1 -1
  162. package/dist/plugins/fusion-plugin-roadmap/bundled.js +5 -11
  163. package/dist/plugins/fusion-plugin-roadmap/manifest.json +1 -11
  164. package/dist/plugins/fusion-plugin-roadmap/package.json +1 -1
  165. package/dist/plugins/fusion-plugin-whatsapp-chat/package.json +1 -1
  166. package/package.json +3 -3
  167. package/skill/fusion/SKILL.md +1 -1
  168. package/skill/fusion/references/cli-commands.md +2 -1
  169. package/skill/fusion/references/extension-tools.md +10 -0
  170. package/skill/fusion/references/fusion-capabilities.md +3 -1
  171. package/dist/client/assets/AgentDetailView-CanIeYHg.css +0 -1
  172. package/dist/client/assets/AgentDetailView-DxV8pFHX.js +0 -18
  173. package/dist/client/assets/AgentsView-BVILQjdS.css +0 -1
  174. package/dist/client/assets/AgentsView-CTzbcvhK.js +0 -29
  175. package/dist/client/assets/ChatView-COygcnyk.js +0 -6
  176. package/dist/client/assets/ChatView-DwJAd5G1.css +0 -1
  177. package/dist/client/assets/CommandCenter-CTaopaC0.css +0 -1
  178. package/dist/client/assets/CommandCenter-DoKX2HWm.js +0 -56
  179. package/dist/client/assets/DevServerView-Cyevyvqx.js +0 -1
  180. package/dist/client/assets/DevServerView-VTQY28P7.css +0 -1
  181. package/dist/client/assets/DirectoryPicker-DBdyXEhR.js +0 -1
  182. package/dist/client/assets/DocumentsView-BzSMyrns.js +0 -1
  183. package/dist/client/assets/DocumentsView-WfVoTZt8.css +0 -1
  184. package/dist/client/assets/EvalsView-CUNJ1TLc.css +0 -1
  185. package/dist/client/assets/EvalsView-ikz00o9g.js +0 -1
  186. package/dist/client/assets/ExperimentalAgentOnboardingModal-D-rzCCET.js +0 -499
  187. package/dist/client/assets/GoalsView-Bfu1Oy2-.js +0 -2
  188. package/dist/client/assets/GoalsView-rg9VSIza.css +0 -1
  189. package/dist/client/assets/InsightsView-Cgmf5nES.js +0 -11
  190. package/dist/client/assets/InsightsView-LMv1M1dU.css +0 -1
  191. package/dist/client/assets/MemoryView-DkEuDKQs.js +0 -2
  192. package/dist/client/assets/MemoryView-zaXewZzi.css +0 -1
  193. package/dist/client/assets/NodesView-7VInxyf_.css +0 -1
  194. package/dist/client/assets/NodesView-B_KYfS4o.js +0 -14
  195. package/dist/client/assets/PiExtensionsManager-Dz69kkKs.js +0 -11
  196. package/dist/client/assets/PluginManager-LHCVcduP.js +0 -1
  197. package/dist/client/assets/PullRequestView-3AdbS2a1.css +0 -1
  198. package/dist/client/assets/PullRequestView-DBJutLLl.js +0 -6
  199. package/dist/client/assets/ResearchView-DTh8FLUm.css +0 -1
  200. package/dist/client/assets/ResearchView-gpn1XcVy.js +0 -1
  201. package/dist/client/assets/SecretsView-B7YqIowt.js +0 -1
  202. package/dist/client/assets/SecretsView-Djo1rahi.css +0 -1
  203. package/dist/client/assets/SessionTerminal-9l4bdKcn.js +0 -2
  204. package/dist/client/assets/SessionTerminal-BNgtmXb3.css +0 -1
  205. package/dist/client/assets/SettingsModal-BGEK9_9A.js +0 -31
  206. package/dist/client/assets/SettingsModal-CKv0TJfM.css +0 -1
  207. package/dist/client/assets/SettingsModal-CXogw-Er.css +0 -1
  208. package/dist/client/assets/SettingsModal-DIIoHGUH.js +0 -1
  209. package/dist/client/assets/SetupWizardModal-BcVeMxeX.js +0 -1
  210. package/dist/client/assets/SetupWizardModal-CIqFbkrD.css +0 -1
  211. package/dist/client/assets/SkillsView-3bhGyWs1.css +0 -1
  212. package/dist/client/assets/SkillsView-BxSJ4PHL.js +0 -1
  213. package/dist/client/assets/StashRecoveryView-B_8WIQEo.css +0 -1
  214. package/dist/client/assets/StashRecoveryView-BhFQ2FsP.js +0 -1
  215. package/dist/client/assets/TodoView-7xIh-Fmi.css +0 -1
  216. package/dist/client/assets/TodoView-BZpewjy0.js +0 -6
  217. package/dist/client/assets/WorkflowNodeEditor-Yn1FRF2v.css +0 -1
  218. package/dist/client/assets/WorkflowNodeEditor-tWsgCdVt.js +0 -8
  219. package/dist/client/assets/app-BmGA0Hiz.js +0 -13
  220. package/dist/client/assets/app-CEVYlVuJ.js +0 -13
  221. package/dist/client/assets/app-CbBFax2C.js +0 -13
  222. package/dist/client/assets/app-DORKrGAz.js +0 -13
  223. package/dist/client/assets/app-DQibuQ9z.js +0 -13
  224. package/dist/client/assets/app-k76GrQP0.js +0 -13
  225. package/dist/client/assets/common-BRyX4VxB.js +0 -1
  226. package/dist/client/assets/common-CN9QPI2d.js +0 -1
  227. package/dist/client/assets/common-CNbjPELi.js +0 -1
  228. package/dist/client/assets/common-DFDqu_n0.js +0 -1
  229. package/dist/client/assets/common-DgWWKG8Z.js +0 -1
  230. package/dist/client/assets/common-X6PzBnVA.js +0 -1
  231. package/dist/client/assets/createLucideIcon-DmVITl5d.js +0 -21
  232. package/dist/client/assets/dashboard-view-BFoyhTYF.js +0 -3
  233. package/dist/client/assets/dashboard-view-Cxzm_eqc.js +0 -1
  234. package/dist/client/assets/dashboard-view-DdGlfuu-.css +0 -1
  235. package/dist/client/assets/dashboard-view-_8yfNwju.css +0 -1
  236. package/dist/client/assets/index-Bglw05rM.js +0 -791
  237. package/dist/client/assets/index-FYgnflWD.css +0 -1
  238. package/dist/client/assets/vendor-reactflow-ZasuEfF9.js +0 -15
  239. package/dist/client/assets/x-PItWc-wQ.js +0 -61
  240. package/dist/client/assets/zoom-out-CzlHv0Kj.js +0 -21
@@ -0,0 +1,78 @@
1
+ import{s as St,g as Mt,q as Nt,p as zt,a as Lt,b as Tt,_ as u,L as At,E as Xt,G as K,l as J,K as Et,d as Yt,z as It,c as j}from"./mermaid.core-Ch4HatqA.js";import{p as Bt}from"./chunk-4BX2VUAB-DcVdctr0.js";import{p as Ft}from"./wardley-L42UT6IY-BnhBteen.js";import"./index-CZcWjLAb.js";import"./vendor-react-SZ_qB27O.js";import"./vendor-i18n-GF3RlKbq.js";import"./vendor-reactflow-Bg-Qjzh8.js";import"./vendor-xterm-BNq00GSj.js";import"./vendor-codemirror-jBKmHyH0.js";import"./step-yuy0qJer.js";var D=u((e,n)=>{const r=e<=1?e*100:e;if(r<0||r>100)throw new Error(`${n} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return r},"toPercent"),A=u((e,n,r)=>({x:D(n,`${r} evolution`),y:D(e,`${r} visibility`)}),"toCoordinates"),U=u(e=>{if(e){if(e==="+<>")return"bidirectional";if(e==="+<")return"backward";if(e==="+>")return"forward"}},"getFlowFromPort"),Rt=u(e=>{if(!e?.startsWith("+"))return{};const r=/^\+'([^']*)'/.exec(e)?.[1];return e.includes("<>")?{flow:"bidirectional",label:r}:e.includes("<")?{flow:"backward",label:r}:e.includes(">")?{flow:"forward",label:r}:{label:r}},"extractFlowFromArrow"),Ot=u((e,n)=>{if(Bt(e,n),e.size&&n.setSize(e.size.width,e.size.height),e.evolution){const r=e.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),x=e.evolution.stages.filter(a=>a.boundary!==void 0).map(a=>a.boundary);n.updateAxes({stages:r,stageBoundaries:x})}if(e.anchors.forEach(r=>{const x=A(r.visibility,r.evolution,`Anchor "${r.name}"`);n.addNode(r.name,r.name,x.x,x.y,"anchor")}),e.components.forEach(r=>{const x=A(r.visibility,r.evolution,`Component "${r.name}"`),a=r.label?(r.label.negX?-1:1)*r.label.offsetX:void 0,d=r.label?(r.label.negY?-1:1)*r.label.offsetY:void 0,w=r.decorator?.strategy;n.addNode(r.name,r.name,x.x,x.y,"component",a,d,r.inertia,w)}),e.notes.forEach(r=>{const x=A(r.visibility,r.evolution,`Note "${r.text}"`);n.addNote(r.text,x.x,x.y)}),e.pipelines.forEach(r=>{const x=n.getNode(r.parent);if(!x||typeof x.y!="number")throw new Error(`Pipeline "${r.parent}" must reference an existing component with coordinates.`);const a=x.y;n.startPipeline(r.parent),r.components.forEach(d=>{const w=`${r.parent}_${d.name}`,C=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,F=D(d.evolution,`Pipeline component "${d.name}" evolution`);n.addNode(w,d.name,F,a,"pipeline-component",C,g),n.addPipelineComponent(r.parent,w)})}),e.links.forEach(r=>{const x=!!r.arrow&&(r.arrow.includes("-.->")||r.arrow.includes(".-."));let a=U(r.fromPort)??U(r.toPort);const{flow:d,label:w}=Rt(r.arrow);!a&&d&&(a=d);const C=r.linkLabel,g=w??C;n.addLink(n.resolveNodeId(r.from),n.resolveNodeId(r.to),x,g,a)}),e.evolves.forEach(r=>{const x=n.getNode(r.component);if(x?.y!==void 0){const a=D(r.target,`Evolve target for "${r.component}"`);n.addTrend(r.component,a,x.y)}}),e.annotations.length>0){const r=e.annotations[0],x=A(r.x,r.y,"Annotations box");n.setAnnotationsBox(x.x,x.y)}e.annotation.forEach(r=>{const x=A(r.x,r.y,`Annotation ${r.number}`);n.addAnnotation(r.number,[{x:x.x,y:x.y}],r.text)}),e.accelerators.forEach(r=>{const x=A(r.x,r.y,`Accelerator "${r.name}"`);n.addAccelerator(r.name,x.x,x.y)}),e.deaccelerators.forEach(r=>{const x=A(r.x,r.y,`Deaccelerator "${r.name}"`);n.addDeaccelerator(r.name,x.x,x.y)})},"populateDb"),Q={parser:{yy:void 0},parse:u(async e=>{const n=await Ft("wardley",e);J.debug(n);const r=Q.parser?.yy;if(!r||typeof r.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ot(n,r)},"parse")},Wt=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{u(this,"WardleyBuilder")}addNode(e){const n=this.nodes.get(e.id)??{id:e.id,label:e.label},r={...n,...e,className:e.className??n.className,labelOffsetX:e.labelOffsetX??n.labelOffsetX,labelOffsetY:e.labelOffsetY??n.labelOffsetY};this.nodes.set(e.id,r)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});const n=this.nodes.get(e);n&&(n.isPipelineParent=!0)}addPipelineComponent(e,n){const r=this.pipelines.get(e);r&&r.componentIds.push(n);const x=this.nodes.get(n);x&&(x.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,n){this.annotationsBox={x:e,y:n}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,n){this.size={width:e,height:n}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(const[n,r]of this.nodes)if(r.label===e)return n;return e}build(){const e=[];for(const n of this.nodes.values()){if(typeof n.x!="number"||typeof n.y!="number")throw new Error(`Node "${n.label}" is missing coordinates`);e.push(n)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},k=new Wt;function tt(){return j()["wardley-beta"]}u(tt,"getConfig");function et(e,n,r,x,a,d,w,C,g){k.addNode({id:e,label:n,x:r,y:x,className:a,labelOffsetX:d,labelOffsetY:w,inertia:C,sourceStrategy:g})}u(et,"addNode");function at(e,n,r=!1,x,a){k.addLink({source:e,target:n,dashed:r,label:x,flow:a})}u(at,"addLink");function rt(e,n,r){k.addTrend({nodeId:e,targetX:n,targetY:r})}u(rt,"addTrend");function ot(e,n,r){k.addAnnotation({number:e,coordinates:n,text:r})}u(ot,"addAnnotation");function nt(e,n,r){k.addNote({text:e,x:n,y:r})}u(nt,"addNote");function st(e,n,r){k.addAccelerator({name:e,x:n,y:r})}u(st,"addAccelerator");function it(e,n,r){k.addDeaccelerator({name:e,x:n,y:r})}u(it,"addDeaccelerator");function dt(e,n){k.setAnnotationsBox(e,n)}u(dt,"setAnnotationsBox");function lt(e,n){k.setSize(e,n)}u(lt,"setSize");function ct(e){k.startPipeline(e)}u(ct,"startPipeline");function pt(e,n){k.addPipelineComponent(e,n)}u(pt,"addPipelineComponent");function ft(e){k.setAxes(e)}u(ft,"updateAxes");function ht(e){return k.getNode(e)}u(ht,"getNode");function xt(e){return k.resolveNodeId(e)}u(xt,"resolveNodeId");function gt(){return k.build()}u(gt,"getWardleyData");function yt(){k.clear(),It()}u(yt,"clear");var Dt={getConfig:tt,addNode:et,addLink:at,addTrend:rt,addAnnotation:ot,addNote:nt,addAccelerator:st,addDeaccelerator:it,setAnnotationsBox:dt,setSize:lt,startPipeline:ct,addPipelineComponent:pt,updateAxes:ft,getNode:ht,resolveNodeId:xt,getWardleyData:gt,clear:yt,setAccTitle:Tt,getAccTitle:Lt,setDiagramTitle:zt,getDiagramTitle:Nt,getAccDescription:Mt,setAccDescription:St},Gt=["Genesis","Custom Built","Product","Commodity"],qt=u(()=>{const{themeVariables:e}=j();return{backgroundColor:e.wardley?.backgroundColor??e.background??"#fff",axisColor:e.wardley?.axisColor??"#000",axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??"#222",gridColor:e.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:e.wardley?.componentFill??"#fff",componentStroke:e.wardley?.componentStroke??"#000",componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??"#222",linkStroke:e.wardley?.linkStroke??"#000",evolutionStroke:e.wardley?.evolutionStroke??"#dc3545",annotationStroke:e.wardley?.annotationStroke??"#000",annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??"#222",annotationFill:e.wardley?.annotationFill??e.background??"#fff"}},"getTheme"),Ht=u(()=>{const e=j()["wardley-beta"];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},"getConfigValues"),jt=u((e,n,r,x)=>{J.debug(`Rendering Wardley map
2
+ `+e);const a=Ht(),d=qt(),w=a.nodeRadius*1.6,C=x.db,g=C.getWardleyData(),F=C.getDiagramTitle(),S=g.size?.width??a.width,b=g.size?.height??a.height,E=Et(n);E.selectAll("*").remove(),Yt(E,b,S,a.useMaxWidth),E.attr("viewBox",`0 0 ${S} ${b}`);const v=E.append("g").attr("class","wardley-map"),G=E.append("defs");G.append("marker").attr("id",`arrow-${n}`).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"),G.append("marker").attr("id",`link-arrow-end-${n}`).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"),G.append("marker").attr("id",`link-arrow-start-${n}`).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"),v.append("rect").attr("class","wardley-background").attr("width",S).attr("height",b).attr("fill",d.backgroundColor);const Y=S-a.padding*2,I=b-a.padding*2;F&&v.append("text").attr("class","wardley-title").attr("x",S/2).attr("y",a.padding/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(F);const z=u(t=>a.padding+t/100*Y,"projectX"),L=u(t=>b-a.padding-t/100*I,"projectY"),R=v.append("g").attr("class","wardley-axes");R.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1),R.append("line").attr("x1",a.padding).attr("x2",a.padding).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const ut=g.axes.xLabel??"Evolution",wt=g.axes.yLabel??"Visibility";R.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",a.padding+Y/2).attr("y",b-a.padding/4).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(ut),R.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",a.padding/3).attr("y",a.padding+I/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${a.padding/3} ${a.padding+I/2})`).text(wt);const B=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:Gt;if(B.length>0){const t=v.append("g").attr("class","wardley-stages"),s=g.axes.stageBoundaries,o=[];if(s&&s.length===B.length){let i=0;s.forEach(p=>{o.push({start:i,end:p}),i=p})}else{const i=1/B.length;B.forEach((p,l)=>{o.push({start:l*i,end:(l+1)*i})})}B.forEach((i,p)=>{const l=o[p],f=a.padding+l.start*Y,h=a.padding+l.end*Y,y=(f+h)/2;p>0&&t.append("line").attr("x1",f).attr("x2",f).attr("y1",a.padding).attr("y2",b-a.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",y).attr("y",b-a.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(a.showGrid){const t=v.append("g").attr("class","wardley-grid");for(let s=1;s<4;s++){const o=s/4,i=a.padding+Y*o;t.append("line").attr("x1",i).attr("x2",i).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding-I*o).attr("y2",b-a.padding-I*o).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:z(t.x),y:L(t.y),node:t})}),g.pipelines.length>0){const t=v.append("g").attr("class","wardley-pipelines"),s=v.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(o=>{if(o.componentIds.length===0)return;const i=o.componentIds.map(h=>({id:h,pos:c.get(h),node:g.nodes.find(y=>y.id===h)})).filter(h=>h.pos&&h.node).sort((h,y)=>h.node.x-y.node.x);for(let h=0;h<i.length-1;h++){const y=i[h],m=i[h+1];s.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",y.pos.x).attr("y1",y.pos.y).attr("x2",m.pos.x).attr("y2",m.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let p=1/0,l=-1/0,f=0;if(o.componentIds.forEach(h=>{const y=c.get(h);y&&(p=Math.min(p,y.x),l=Math.max(l,y.x),f=y.y)}),p!==1/0&&l!==-1/0){const y=a.nodeRadius*4,m=f-y/2,P=c.get(o.nodeId);if(P){const N=(p+l)/2;P.x=N,P.y=m-w/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",p-15).attr("y",m).attr("width",l-p+30).attr("height",y).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const V=v.append("g").attr("class","wardley-links"),_=new Map;g.pipelines.forEach(t=>{_.set(t.nodeId,new Set(t.componentIds))});const Z=g.links.filter(t=>!(!c.has(t.source)||!c.has(t.target)||_.get(t.target)?.has(t.source)));V.selectAll("line").data(Z).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.source).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=o.x-s.x,f=o.y-s.y,h=Math.sqrt(l*l+f*f);return s.x+l/h*p}).attr("y1",t=>{const s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.source).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=o.x-s.x,f=o.y-s.y,h=Math.sqrt(l*l+f*f);return s.y+f/h*p}).attr("x2",t=>{const s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.target).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=s.x-o.x,f=s.y-o.y,h=Math.sqrt(l*l+f*f);return o.x+l/h*p}).attr("y2",t=>{const s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.target).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=s.x-o.x,f=s.y-o.y,h=Math.sqrt(l*l+f*f);return o.y+f/h*p}).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-${n})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${n})`:null),V.selectAll("text").data(Z.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const s=c.get(t.source),o=c.get(t.target),i=(s.x+o.x)/2,p=o.y-s.y,l=o.x-s.x,f=Math.sqrt(l*l+p*p),h=8,y=p/f;return i+y*h}).attr("y",t=>{const s=c.get(t.source),o=c.get(t.target),i=(s.y+o.y)/2,p=o.x-s.x,l=o.y-s.y,f=Math.sqrt(p*p+l*l),h=8,y=-p/f;return i+y*h}).attr("fill",d.axisTextColor).attr("font-size",a.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const s=c.get(t.source),o=c.get(t.target),i=(s.x+o.x)/2,p=(s.y+o.y)/2,l=o.x-s.x,f=o.y-s.y,h=Math.sqrt(l*l+f*f),y=8,m=f/h,P=-l/h,N=i+m*y,O=p+P*y;let X=Math.atan2(f,l)*180/Math.PI;return(X>90||X<-90)&&(X+=180),`rotate(${X} ${N} ${O})`}).text(t=>t.label);const mt=v.append("g").attr("class","wardley-trends"),kt=g.trends.map(t=>{const s=c.get(t.nodeId);if(!s)return null;const o=z(t.targetX),i=L(t.targetY),p=o-s.x,l=i-s.y,f=Math.sqrt(p*p+l*l),h=a.nodeRadius+2,y=f>h?o-p/f*h:o,m=f>h?i-l/f*h:i;return{origin:s,targetX:o,targetY:i,adjustedX2:y,adjustedY2:m}}).filter(t=>t!==null);mt.selectAll("line").data(kt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${n})`);const M=v.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));M.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),M.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",a.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),M.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",a.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const T=M.filter(t=>t.sourceStrategy==="market");T.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),M.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",a.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const q=a.nodeRadius*.7,$=a.nodeRadius*1.2;if(T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-$).attr("x2",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-$).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-$).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),M.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-w/2).attr("y",t=>c.get(t.id).y-w/2).attr("width",w).attr("height",w).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const s=c.get(t.id);let o=t.isPipelineParent?w/2+15:a.nodeRadius+15;return t.sourceStrategy&&(o+=a.nodeRadius+10),s.x+o}).attr("y1",t=>{const s=c.get(t.id),o=t.isPipelineParent?w:a.nodeRadius*2;return s.y-o/2}).attr("x2",t=>{const s=c.get(t.id);let o=t.isPipelineParent?w/2+15:a.nodeRadius+15;return t.sourceStrategy&&(o+=a.nodeRadius+10),s.x+o}).attr("y2",t=>{const s=c.get(t.id),o=t.isPipelineParent?w:a.nodeRadius*2;return s.y+o/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),M.append("text").attr("x",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?s.x+t.labelOffsetX:s.x;let o=a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(o+=10);const i=t.labelOffsetX??o;return s.x+i}).attr("y",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?s.y+t.labelOffsetY:s.y-3;let o=-a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(o-=10);const i=t.labelOffsetY??o;return s.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",a.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=v.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(s=>{const o=s.coordinates.map(i=>({x:z(i.x),y:L(i.y)}));if(o.length>1)for(let i=0;i<o.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",o[i].x).attr("y1",o[i].y).attr("x2",o[i+1].x).attr("y2",o[i+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");o.forEach(i=>{const p=t.append("g").attr("class","wardley-annotation");p.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),p.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(s.number)})}),g.annotationsBox){let s=z(g.annotationsBox.x),o=L(g.annotationsBox.y);const i=10,p=16,l=11,f=t.append("g").attr("class","wardley-annotations-box"),h=[...g.annotations].filter(m=>m.text).sort((m,P)=>m.number-P.number),y=[];if(h.forEach((m,P)=>{const N=f.append("text").attr("x",s+i).attr("y",o+i+(P+1)*p).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${m.number}. ${m.text}`);y.push(N)}),y.length>0){let m=0,P=0;y.forEach(H=>{const W=H.node(),Pt=W.getComputedTextLength();m=Math.max(m,Pt);const Ct=W.getBBox();P=Math.max(P,Ct.height)});const N=m+i*2+105,O=h.length*p+i*2+P/2,X=a.padding,bt=S-a.padding-N,$t=a.padding,vt=b-a.padding-O;s=Math.max(X,Math.min(s,bt)),o=Math.max($t,Math.min(o,vt)),y.forEach((H,W)=>{H.attr("x",s+i).attr("y",o+i+(W+1)*p)}),f.insert("rect","text").attr("x",s).attr("y",o).attr("width",N).attr("height",O).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=v.append("g").attr("class","wardley-notes");g.notes.forEach(s=>{const o=z(s.x),i=L(s.y);t.append("text").attr("x",o).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.text)})}if(g.accelerators.length>0){const t=v.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(s=>{const o=z(s.x),i=L(s.y),p=60,l=30,f=20,h=`
3
+ M ${o} ${i-l/2}
4
+ L ${o+p-f} ${i-l/2}
5
+ L ${o+p-f} ${i-l/2-8}
6
+ L ${o+p} ${i}
7
+ L ${o+p-f} ${i+l/2+8}
8
+ L ${o+p-f} ${i+l/2}
9
+ L ${o} ${i+l/2}
10
+ Z
11
+ `;t.append("path").attr("d",h).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),t.append("text").attr("x",o+p/2).attr("y",i+l/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.name)})}if(g.deaccelerators.length>0){const t=v.append("g").attr("class","wardley-deaccelerators");g.deaccelerators.forEach(s=>{const o=z(s.x),i=L(s.y),p=60,l=30,f=20,h=`
12
+ M ${o+p} ${i-l/2}
13
+ L ${o+f} ${i-l/2}
14
+ L ${o+f} ${i-l/2-8}
15
+ L ${o} ${i}
16
+ L ${o+f} ${i+l/2+8}
17
+ L ${o+f} ${i+l/2}
18
+ L ${o+p} ${i+l/2}
19
+ Z
20
+ `;t.append("path").attr("d",h).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),t.append("text").attr("x",o+p/2).attr("y",i+l/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.name)})}},"draw"),Vt={draw:jt},_t=u(({wardley:e}={})=>{const n=At(),r=Xt(),x=K(n,r.themeVariables),a=K(x.wardley,e);return`
21
+ .wardley-background {
22
+ fill: ${a.backgroundColor};
23
+ }
24
+ .wardley-axes line, .wardley-axes path {
25
+ stroke: ${a.axisColor};
26
+ }
27
+ .wardley-axis-label {
28
+ fill: ${a.axisTextColor};
29
+ }
30
+ .wardley-stage-label {
31
+ fill: ${a.axisTextColor};
32
+ }
33
+ .wardley-grid line {
34
+ stroke: ${a.gridColor};
35
+ }
36
+ .wardley-node circle {
37
+ fill: ${a.componentFill};
38
+ stroke: ${a.componentStroke};
39
+ }
40
+ .wardley-node-label {
41
+ fill: ${a.componentLabelColor};
42
+ }
43
+ .wardley-link {
44
+ stroke: ${a.linkStroke};
45
+ }
46
+ .wardley-link--dashed {
47
+ stroke-dasharray: 4 4;
48
+ }
49
+ .wardley-link-label {
50
+ fill: ${a.axisTextColor};
51
+ }
52
+ .wardley-trend line {
53
+ stroke: ${a.evolutionStroke};
54
+ }
55
+ .wardley-annotation-line {
56
+ stroke: ${a.annotationStroke};
57
+ }
58
+ .wardley-annotation circle {
59
+ fill: ${a.annotationFill};
60
+ stroke: ${a.annotationStroke};
61
+ }
62
+ .wardley-annotation text {
63
+ fill: ${a.annotationTextColor};
64
+ }
65
+ .wardley-annotations-box rect {
66
+ fill: ${a.annotationFill};
67
+ stroke: ${a.annotationStroke};
68
+ }
69
+ .wardley-annotations-box text {
70
+ fill: ${a.annotationTextColor};
71
+ }
72
+ .wardley-pipeline-box {
73
+ stroke: ${a.componentStroke};
74
+ }
75
+ .wardley-notes text {
76
+ fill: ${a.axisTextColor};
77
+ }
78
+ `},"styles"),se={parser:Q,db:Dt,renderer:Vt,styles:_t};export{se as diagram};
@@ -0,0 +1,7 @@
1
+ import{s as ei,g as si,q as vt,p as ai,a as ni,b as oi,_ as s,l as Et,K as ri,d as hi,z as li,E as xt,h as ci,G as It,H as ui,L as gi,M as xi}from"./mermaid.core-Ch4HatqA.js";import"./vendor-reactflow-Bg-Qjzh8.js";import{b as Tt}from"./band-CquvqAHh.js";import{l as Rt}from"./linear-dXivciGL.js";import{l as Dt}from"./step-yuy0qJer.js";import"./index-CZcWjLAb.js";import"./vendor-react-SZ_qB27O.js";import"./vendor-i18n-GF3RlKbq.js";import"./vendor-xterm-BNq00GSj.js";import"./vendor-codemirror-jBKmHyH0.js";import"./init-Dmth1JHB.js";import"./ordinal-DILIJJjt.js";import"./defaultLocale-DX6XiGOO.js";var lt=(function(){var t=s(function(O,r,l,c){for(l=l||{},c=O.length;c--;l[O[c]]=r);return l},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],a=[1,3],o=[1,5],d=[1,6],g=[1,7],w=[1,5,10,12,14,16,18,19,21,23,34,35,36],L=[1,25],W=[1,26],M=[1,28],T=[1,29],v=[1,30],z=[1,31],F=[1,32],R=[1,33],V=[1,34],p=[1,35],S=[1,36],h=[1,37],E=[1,43],B=[1,42],X=[1,47],Y=[1,50],A=[1,10,12,14,16,18,19,21,23,34,35,36],U=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],f=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],y=[1,64],D={trace:s(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,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$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",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"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],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:s(function(r,l,c,u,b,n,Q){var x=n.length-1;switch(b){case 5:u.setOrientation(n[x]);break;case 9:u.setDiagramTitle(n[x].text.trim());break;case 12:u.setLineData({text:"",type:"text"},n[x]);break;case 13:u.setLineData(n[x-1],n[x]);break;case 14:u.setBarData({text:"",type:"text"},n[x]);break;case 15:u.setBarData(n[x-1],n[x]);break;case 16:this.$=n[x].trim(),u.setAccTitle(this.$);break;case 17:case 18:this.$=n[x].trim(),u.setAccDescription(this.$);break;case 19:this.$=n[x-1];break;case 20:this.$=[Number(n[x-2]),...n[x]];break;case 21:this.$=[Number(n[x])];break;case 22:u.setXAxisTitle(n[x]);break;case 23:u.setXAxisTitle(n[x-1]);break;case 24:u.setXAxisTitle({type:"text",text:""});break;case 25:u.setXAxisBand(n[x]);break;case 26:u.setXAxisRangeData(Number(n[x-2]),Number(n[x]));break;case 27:this.$=n[x-1];break;case 28:this.$=[n[x-2],...n[x]];break;case 29:this.$=[n[x]];break;case 30:u.setYAxisTitle(n[x]);break;case 31:u.setYAxisTitle(n[x-1]);break;case 32:u.setYAxisTitle({type:"text",text:""});break;case 33:u.setYAxisRangeData(Number(n[x-2]),Number(n[x]));break;case 37:this.$={text:n[x],type:"text"};break;case 38:this.$={text:n[x],type:"text"};break;case 39:this.$={text:n[x],type:"markdown"};break;case 40:this.$=n[x];break;case 41:this.$=n[x-1]+""+n[x];break}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:a,34:o,35:d,36:g}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:a,34:o,35:d,36:g}),t(i,e,{4:2,7:4,6:9,3:10,5:a,8:[1,11],34:o,35:d,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(w,[2,34]),t(w,[2,35]),t(w,[2,36]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:a,34:o,35:d,36:g}),{1:[2,3]},t(w,[2,5]),t(i,[2,7],{4:22,34:o,35:d,36:g}),{11:23,37:24,38:L,39:W,40:27,41:M,42:T,43:v,44:z,45:F,46:R,47:V,48:p,49:S,50:h},{11:39,13:38,24:E,27:B,29:40,30:41,37:24,38:L,39:W,40:27,41:M,42:T,43:v,44:z,45:F,46:R,47:V,48:p,49:S,50:h},{11:45,15:44,27:X,33:46,37:24,38:L,39:W,40:27,41:M,42:T,43:v,44:z,45:F,46:R,47:V,48:p,49:S,50:h},{11:49,17:48,24:Y,37:24,38:L,39:W,40:27,41:M,42:T,43:v,44:z,45:F,46:R,47:V,48:p,49:S,50:h},{11:52,17:51,24:Y,37:24,38:L,39:W,40:27,41:M,42:T,43:v,44:z,45:F,46:R,47:V,48:p,49:S,50:h},{20:[1,53]},{22:[1,54]},t(A,[2,18]),{1:[2,2]},t(A,[2,8]),t(A,[2,9]),t(U,[2,37],{40:55,41:M,42:T,43:v,44:z,45:F,46:R,47:V,48:p,49:S,50:h}),t(U,[2,38]),t(U,[2,39]),t(f,[2,40]),t(f,[2,42]),t(f,[2,43]),t(f,[2,44]),t(f,[2,45]),t(f,[2,46]),t(f,[2,47]),t(f,[2,48]),t(f,[2,49]),t(f,[2,50]),t(f,[2,51]),t(A,[2,10]),t(A,[2,22],{30:41,29:56,24:E,27:B}),t(A,[2,24]),t(A,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:L,39:W,40:27,41:M,42:T,43:v,44:z,45:F,46:R,47:V,48:p,49:S,50:h},t(A,[2,11]),t(A,[2,30],{33:60,27:X}),t(A,[2,32]),{31:[1,61]},t(A,[2,12]),{17:62,24:Y},{25:63,27:y},t(A,[2,14]),{17:65,24:Y},t(A,[2,16]),t(A,[2,17]),t(f,[2,41]),t(A,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(A,[2,31]),{27:[1,69]},t(A,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(A,[2,15]),t(A,[2,26]),t(A,[2,27]),{11:59,32:72,37:24,38:L,39:W,40:27,41:M,42:T,43:v,44:z,45:F,46:R,47:V,48:p,49:S,50:h},t(A,[2,33]),t(A,[2,19]),{25:73,27:y},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:s(function(r,l){if(l.recoverable)this.trace(r);else{var c=new Error(r);throw c.hash=l,c}},"parseError"),parse:s(function(r){var l=this,c=[0],u=[],b=[null],n=[],Q=this.table,x="",tt=0,Ct=0,Zt=2,St=1,Jt=n.slice.call(arguments,1),_=Object.create(this.lexer),$={yy:{}};for(var nt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,nt)&&($.yy[nt]=this.yy[nt]);_.setInput(r,$.yy),$.yy.lexer=_,$.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var ot=_.yylloc;n.push(ot);var ti=_.options&&_.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ii(P){c.length=c.length-2*P,b.length=b.length-P,n.length=n.length-P}s(ii,"popStack");function _t(){var P;return P=u.pop()||_.lex()||St,typeof P!="number"&&(P instanceof Array&&(u=P,P=u.pop()),P=l.symbols_[P]||P),P}s(_t,"lex");for(var k,q,I,rt,G={},it,N,kt,et;;){if(q=c[c.length-1],this.defaultActions[q]?I=this.defaultActions[q]:((k===null||typeof k>"u")&&(k=_t()),I=Q[q]&&Q[q][k]),typeof I>"u"||!I.length||!I[0]){var ht="";et=[];for(it in Q[q])this.terminals_[it]&&it>Zt&&et.push("'"+this.terminals_[it]+"'");_.showPosition?ht="Parse error on line "+(tt+1)+`:
2
+ `+_.showPosition()+`
3
+ Expecting `+et.join(", ")+", got '"+(this.terminals_[k]||k)+"'":ht="Parse error on line "+(tt+1)+": Unexpected "+(k==St?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(ht,{text:_.match,token:this.terminals_[k]||k,line:_.yylineno,loc:ot,expected:et})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+k);switch(I[0]){case 1:c.push(k),b.push(_.yytext),n.push(_.yylloc),c.push(I[1]),k=null,Ct=_.yyleng,x=_.yytext,tt=_.yylineno,ot=_.yylloc;break;case 2:if(N=this.productions_[I[1]][1],G.$=b[b.length-N],G._$={first_line:n[n.length-(N||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(N||1)].first_column,last_column:n[n.length-1].last_column},ti&&(G._$.range=[n[n.length-(N||1)].range[0],n[n.length-1].range[1]]),rt=this.performAction.apply(G,[x,Ct,tt,$.yy,I[1],b,n].concat(Jt)),typeof rt<"u")return rt;N&&(c=c.slice(0,-1*N*2),b=b.slice(0,-1*N),n=n.slice(0,-1*N)),c.push(this.productions_[I[1]][0]),b.push(G.$),n.push(G._$),kt=Q[c[c.length-2]][c[c.length-1]],c.push(kt);break;case 3:return!0}}return!0},"parse")},C=(function(){var O={EOF:1,parseError:s(function(l,c){if(this.yy.parser)this.yy.parser.parseError(l,c);else throw new Error(l)},"parseError"),setInput:s(function(r,l){return this.yy=l||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:s(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var l=r.match(/(?:\r\n?|\n).*/g);return l?(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:s(function(r){var l=r.length,c=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var u=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),c.length-1&&(this.yylineno-=c.length-1);var b=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:c?(c.length===u.length?this.yylloc.first_column:0)+u[u.length-c.length].length-c[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(r){this.unput(this.match.slice(r))},"less"),pastInput:s(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:s(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:s(function(){var r=this.pastInput(),l=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
5
+ `+l+"^"},"showPosition"),test_match:s(function(r,l){var c,u,b;if(this.options.backtrack_lexer&&(b={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&&(b.yylloc.range=this.yylloc.range.slice(0))),u=r[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.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],c=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var n in b)this[n]=b[n];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,l,c,u;this._more||(this.yytext="",this.match="");for(var b=this._currentRules(),n=0;n<b.length;n++)if(c=this._input.match(this.rules[b[n]]),c&&(!l||c[0].length>l[0].length)){if(l=c,u=n,this.options.backtrack_lexer){if(r=this.test_match(c,b[n]),r!==!1)return r;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(r=this.test_match(l,b[u]),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:s(function(){var l=this.next();return l||this.lex()},"lex"),begin:s(function(l){this.conditionStack.push(l)},"begin"),popState:s(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:s(function(l){this.begin(l)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(l,c,u,b){switch(u){case 0:break;case 1:break;case 2:return this.popState(),34;case 3:return this.popState(),34;case 4:return 34;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 31;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 27;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 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 44:break;case 45:return 35;case 46:return 36}},"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})();D.lexer=C;function H(){this.yy={}}return s(H,"Parser"),H.prototype=D,D.Parser=H,new H})();lt.parser=lt;var di=lt;function ct(t){return t.type==="bar"}s(ct,"isBarPlot");function dt(t){return t.type==="band"}s(dt,"isBandAxisData");function j(t){return t.type==="linear"}s(j,"isLinearAxisData");var Mt=class{constructor(t){this.parentGroup=t}static{s(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((o,d)=>Math.max(d.length,o),0)*i,height:i};const e={width:0,height:0},a=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const o of t){const d=xi(a,1,o),g=d?d.width:o.length*i,w=d?d.height:i;e.width=Math.max(e.width,g),e.height=Math.max(e.height,w)}return a.remove(),e}},Pt=.7,Lt=.2,Vt=class{constructor(t,i,e,a){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,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.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{s(this,"BaseAxis")}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){Pt*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(Pt*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 e=this.getLabelDimension(),a=Lt*t.width;this.outerPadding=Math.min(e.width/2,a);const o=e.height+this.axisConfig.labelPadding*2;this.labelTextHeight=e.height,o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.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 e=this.getLabelDimension(),a=Lt*t.height;this.outerPadding=Math.min(e.height/2,a);const o=e.width+this.axisConfig.labelPadding*2;o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.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}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(e=>({path:`M ${i},${this.getScaleValue(e)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(e)}`,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),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,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(e=>({path:`M ${this.getScaleValue(e)},${i} L ${this.getScaleValue(e)},${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(e=>({path:`M ${this.getScaleValue(e)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(e)},${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():[]}},pi=class extends Vt{static{s(this,"BandAxis")}constructor(t,i,e,a,o){super(t,a,o,i),this.categories=e,this.scale=Tt().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=Tt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),Et.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},fi=class extends Vt{static{s(this,"LinearAxis")}constructor(t,i,e,a,o){super(t,a,o,i),this.domain=e,this.scale=Rt().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=Rt().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function ut(t,i,e,a){const o=new Mt(a);return dt(t)?new pi(i,e,t.categories,t.title,o):new fi(i,e,[t.min,t.max],t.title,o)}s(ut,"getAxis");var mi=class{constructor(t,i,e,a){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=a,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{s(this,"ChartTitle")}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),e=Math.max(i.width,t.width),a=i.height+2*this.chartConfig.titlePadding;return i.width<=e&&i.height<=a&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,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}};function Bt(t,i,e,a){const o=new Mt(a);return new mi(o,t,i,e)}s(Bt,"getChartTitleComponent");var yi=class{constructor(t,i,e,a,o){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=a,this.plotIndex=o}static{s(this,"LinePlot")}getDrawableElement(){const t=this.plotData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]);let i;return this.orientation==="horizontal"?i=Dt().y(e=>e[0]).x(e=>e[1])(t):i=Dt().x(e=>e[0]).y(e=>e[1])(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},bi=class{constructor(t,i,e,a,o,d){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=a,this.orientation=o,this.plotIndex=d}static{s(this,"BarPlot")}getDrawableElement(){const t=this.barData.data.map(o=>[this.xAxis.getScaleValue(o[0]),this.yAxis.getScaleValue(o[1])]),e=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),a=e/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:this.boundingRect.x,y:o[0]-a,height:e,width:o[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(o=>({x:o[0]-a,y:o[1],width:e,height:this.boundingRect.y+this.boundingRect.height-o[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},Ai=class{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}static{s(this,"BasePlot")}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,e]of this.chartData.plots.entries())switch(e.type){case"line":{const a=new yi(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...a.getDrawableElement())}break;case"bar":{const a=new bi(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...a.getDrawableElement())}break}return t}};function Wt(t,i,e){return new Ai(t,i,e)}s(Wt,"getPlotComponent");var wi=class{constructor(t,i,e,a){this.chartConfig=t,this.chartData=i,this.componentStore={title:Bt(t,i,e,a),plot:Wt(t,i,e),xAxis:ut(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},a),yAxis:ut(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},a)}}static{s(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,a=0,o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),d=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),g=this.componentStore.plot.calculateSpace({width:o,height:d});t-=g.width,i-=g.height,g=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),a=g.height,i-=g.height,this.componentStore.xAxis.setAxisPosition("bottom"),g=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=g.height,this.componentStore.yAxis.setAxisPosition("left"),g=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=g.width,t-=g.width,t>0&&(o+=t,t=0),i>0&&(d+=i,i=0),this.componentStore.plot.calculateSpace({width:o,height:d}),this.componentStore.plot.setBoundingBoxXY({x:e,y:a}),this.componentStore.xAxis.setRange([e,e+o]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:a+d}),this.componentStore.yAxis.setRange([a,a+d]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(w=>ct(w))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,a=0,o=0,d=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),g=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),w=this.componentStore.plot.calculateSpace({width:d,height:g});t-=w.width,i-=w.height,w=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=w.height,i-=w.height,this.componentStore.xAxis.setAxisPosition("left"),w=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=w.width,a=w.width,this.componentStore.yAxis.setAxisPosition("top"),w=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=w.height,o=e+w.height,t>0&&(d+=t,t=0),i>0&&(g+=i,i=0),this.componentStore.plot.calculateSpace({width:d,height:g}),this.componentStore.plot.setBoundingBoxXY({x:a,y:o}),this.componentStore.yAxis.setRange([a,a+d]),this.componentStore.yAxis.setBoundingBoxXY({x:a,y:e}),this.componentStore.xAxis.setRange([o,o+g]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:o}),this.chartData.plots.some(L=>ct(L))&&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}},Ci=class{static{s(this,"XYChartBuilder")}static build(t,i,e,a){return new wi(t,i,e,a).getDrawableElement()}},K=0,zt,Z=mt(),J=ft(),m=yt(),gt=J.plotColorPalette.split(",").map(t=>t.trim()),st=!1,pt=!1;function ft(){const t=gi(),i=xt();return It(t.xyChart,i.themeVariables.xyChart)}s(ft,"getChartDefaultThemeConfig");function mt(){const t=xt();return It(ui.xyChart,t.xyChart)}s(mt,"getChartDefaultConfig");function yt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}s(yt,"getChartDefaultData");function at(t){const i=xt();return ci(t.trim(),i)}s(at,"textSanitizer");function Ft(t){zt=t}s(Ft,"setTmpSVGG");function Ot(t){t==="horizontal"?Z.chartOrientation="horizontal":Z.chartOrientation="vertical"}s(Ot,"setOrientation");function Xt(t){m.xAxis.title=at(t.text)}s(Xt,"setXAxisTitle");function bt(t,i){m.xAxis={type:"linear",title:m.xAxis.title,min:t,max:i},st=!0}s(bt,"setXAxisRangeData");function Yt(t){m.xAxis={type:"band",title:m.xAxis.title,categories:t.map(i=>at(i.text))},st=!0}s(Yt,"setXAxisBand");function Nt(t){m.yAxis.title=at(t.text)}s(Nt,"setYAxisTitle");function Ht(t,i){m.yAxis={type:"linear",title:m.yAxis.title,min:t,max:i},pt=!0}s(Ht,"setYAxisRangeData");function Ut(t){const i=Math.min(...t),e=Math.max(...t),a=j(m.yAxis)?m.yAxis.min:1/0,o=j(m.yAxis)?m.yAxis.max:-1/0;m.yAxis={type:"linear",title:m.yAxis.title,min:Math.min(a,i),max:Math.max(o,e)}}s(Ut,"setYAxisRangeFromPlotData");function At(t){let i=[];if(t.length===0)return i;if(!st){const e=j(m.xAxis)?m.xAxis.min:1/0,a=j(m.xAxis)?m.xAxis.max:-1/0;bt(Math.min(e,1),Math.max(a,t.length))}if(pt||Ut(t),dt(m.xAxis)&&(i=m.xAxis.categories.map((e,a)=>[e,t[a]])),j(m.xAxis)){const e=m.xAxis.min,a=m.xAxis.max,o=(a-e)/(t.length-1),d=[];for(let g=e;g<=a;g+=o)d.push(`${g}`);i=d.map((g,w)=>[g,t[w]])}return i}s(At,"transformDataWithoutCategory");function wt(t){return gt[t===0?0:t%gt.length]}s(wt,"getPlotColorFromPalette");function $t(t,i){const e=At(i);m.plots.push({type:"line",strokeFill:wt(K),strokeWidth:2,data:e}),K++}s($t,"setLineData");function qt(t,i){const e=At(i);m.plots.push({type:"bar",fill:wt(K),data:e}),K++}s(qt,"setBarData");function Gt(){if(m.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return m.title=vt(),Ci.build(Z,m,J,zt)}s(Gt,"getDrawableElem");function jt(){return J}s(jt,"getChartThemeConfig");function Qt(){return Z}s(Qt,"getChartConfig");function Kt(){return m}s(Kt,"getXYChartData");var Si=s(function(){li(),K=0,Z=mt(),m=yt(),J=ft(),gt=J.plotColorPalette.split(",").map(t=>t.trim()),st=!1,pt=!1},"clear"),_i={getDrawableElem:Gt,clear:Si,setAccTitle:oi,getAccTitle:ni,setDiagramTitle:ai,getDiagramTitle:vt,getAccDescription:si,setAccDescription:ei,setOrientation:Ot,setXAxisTitle:Xt,setXAxisRangeData:bt,setXAxisBand:Yt,setYAxisTitle:Nt,setYAxisRangeData:Ht,setLineData:$t,setBarData:qt,setTmpSVGG:Ft,getChartThemeConfig:jt,getChartConfig:Qt,getXYChartData:Kt},ki=s((t,i,e,a)=>{const o=a.db,d=o.getChartThemeConfig(),g=o.getChartConfig(),w=o.getXYChartData().plots[0].data.map(p=>p[1]);function L(p){return p==="top"?"text-before-edge":"middle"}s(L,"getDominantBaseLine");function W(p){return p==="left"?"start":p==="right"?"end":"middle"}s(W,"getTextAnchor");function M(p){return`translate(${p.x}, ${p.y}) rotate(${p.rotation||0})`}s(M,"getTextTransformation"),Et.debug(`Rendering xychart chart
7
+ `+t);const T=ri(i),v=T.append("g").attr("class","main"),z=v.append("rect").attr("width",g.width).attr("height",g.height).attr("class","background");hi(T,g.height,g.width,!0),T.attr("viewBox",`0 0 ${g.width} ${g.height}`),z.attr("fill",d.backgroundColor),o.setTmpSVGG(T.append("g").attr("class","mermaid-tmp-group"));const F=o.getDrawableElem(),R={};function V(p){let S=v,h="";for(const[E]of p.entries()){let B=v;E>0&&R[h]&&(B=R[h]),h+=p[E],S=R[h],S||(S=R[h]=B.append("g").attr("class",p[E]))}return S}s(V,"getGroup");for(const p of F){if(p.data.length===0)continue;const S=V(p.groupTexts);switch(p.type){case"rect":if(S.selectAll("rect").data(p.data).enter().append("rect").attr("x",h=>h.x).attr("y",h=>h.y).attr("width",h=>h.width).attr("height",h=>h.height).attr("fill",h=>h.fill).attr("stroke",h=>h.strokeFill).attr("stroke-width",h=>h.strokeWidth),g.showDataLabel){const h=g.showDataLabelOutsideBar;if(g.chartOrientation==="horizontal"){let E=function(y,D){const{data:C,label:H}=y;return D*H.length*B<=C.width-X};s(E,"fitsHorizontally");const B=.7,X=10,Y=p.data.map((y,D)=>({data:y,label:w[D].toString()})).filter(y=>y.data.width>0&&y.data.height>0),A=Y.map(y=>{const{data:D}=y;let C=D.height*.7;for(;!E(y,C)&&C>0;)C-=1;return C}),U=Math.floor(Math.min(...A)),f=s(y=>h?y.data.x+y.data.width+X:y.data.x+y.data.width-X,"determineLabelXPosition");S.selectAll("text").data(Y).enter().append("text").attr("x",f).attr("y",y=>y.data.y+y.data.height/2).attr("text-anchor",h?"start":"end").attr("dominant-baseline","middle").attr("fill",d.dataLabelColor).attr("font-size",`${U}px`).text(y=>y.label)}else{let E=function(f,y,D){const{data:C,label:H}=f,r=y*H.length*.7,l=C.x+C.width/2,c=l-r/2,u=l+r/2,b=c>=C.x&&u<=C.x+C.width,n=C.y+D+y<=C.y+C.height;return b&&n};s(E,"fitsInBar");const B=10,X=p.data.map((f,y)=>({data:f,label:w[y].toString()})).filter(f=>f.data.width>0&&f.data.height>0),Y=X.map(f=>{const{data:y,label:D}=f;let C=y.width/(D.length*.7);for(;!E(f,C,B)&&C>0;)C-=1;return C}),A=Math.floor(Math.min(...Y)),U=s(f=>h?f.data.y-B:f.data.y+B,"determineLabelYPosition");S.selectAll("text").data(X).enter().append("text").attr("x",f=>f.data.x+f.data.width/2).attr("y",U).attr("text-anchor","middle").attr("dominant-baseline",h?"auto":"hanging").attr("fill",d.dataLabelColor).attr("font-size",`${A}px`).text(f=>f.label)}}break;case"text":S.selectAll("text").data(p.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",h=>h.fill).attr("font-size",h=>h.fontSize).attr("dominant-baseline",h=>L(h.verticalPos)).attr("text-anchor",h=>W(h.horizontalPos)).attr("transform",h=>M(h)).text(h=>h.text);break;case"path":S.selectAll("path").data(p.data).enter().append("path").attr("d",h=>h.path).attr("fill",h=>h.fill?h.fill:"none").attr("stroke",h=>h.strokeFill).attr("stroke-width",h=>h.strokeWidth);break}}},"draw"),Ti={draw:ki},Oi={parser:di,db:_i,renderer:Ti};export{Oi as diagram};
@@ -0,0 +1,41 @@
1
+ import{r as c}from"./vendor-react-SZ_qB27O.js";/**
2
+ * @license lucide-react v0.542.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const h=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),k=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,o,r)=>r?r.toUpperCase():o.toLowerCase()),y=t=>{const e=k(t);return e.charAt(0).toUpperCase()+e.slice(1)},l=(...t)=>t.filter((e,o,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===o).join(" ").trim(),x=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};/**
7
+ * @license lucide-react v0.542.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */var w={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
12
+ * @license lucide-react v0.542.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const C=c.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:o=2,absoluteStrokeWidth:r,className:n="",children:a,iconNode:d,...i},m)=>c.createElement("svg",{ref:m,...w,width:e,height:e,stroke:t,strokeWidth:r?Number(o)*24/Number(e):o,className:l("lucide",n),...!a&&!x(i)&&{"aria-hidden":"true"},...i},[...d.map(([u,p])=>c.createElement(u,p)),...Array.isArray(a)?a:[a]]));/**
17
+ * @license lucide-react v0.542.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const s=(t,e)=>{const o=c.forwardRef(({className:r,...n},a)=>c.createElement(C,{ref:a,iconNode:e,className:l(`lucide-${h(y(t))}`,`lucide-${t}`,r),...n}));return o.displayName=y(t),o};/**
22
+ * @license lucide-react v0.542.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const f=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],A=s("maximize",f);/**
27
+ * @license lucide-react v0.542.0 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */const g=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],$=s("rotate-ccw",g);/**
32
+ * @license lucide-react v0.542.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */const v=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],j=s("zoom-in",v);/**
37
+ * @license lucide-react v0.542.0 - ISC
38
+ *
39
+ * This source code is licensed under the ISC license.
40
+ * See the LICENSE file in the root directory of this source tree.
41
+ */const _=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],L=s("zoom-out",_);export{C as I,A as M,$ as R,j as Z,L as a,s as c};
@@ -159,10 +159,13 @@
159
159
  (function() {
160
160
  try {
161
161
  var mode = localStorage.getItem('kb-dashboard-theme-mode') || 'dark';
162
- var colorTheme = localStorage.getItem('kb-dashboard-color-theme') || 'default';
163
- var validThemes = ['default', 'ocean', 'forest', 'sunset', 'zen', 'berry', 'high-contrast', 'industrial', 'monochrome', 'slate', 'ash', 'graphite', 'silver', 'solarized', 'factory', 'ayu', 'one-dark', 'nord', 'dracula', 'gruvbox', 'tokyo-night', 'catppuccin-mocha', 'github-dark', 'everforest', 'rose-pine', 'kanagawa', 'night-owl', 'palenight', 'monokai-pro', 'slime', 'brutalist', 'neon-city', 'parchment', 'terminal', 'glass', 'horizon', 'vitesse', 'outrun', 'snazzy', 'porple', 'espresso', 'mars', 'poimandres', 'ember', 'rust', 'copper', 'foundry', 'carbon', 'sandstone', 'lagoon', 'frost', 'lavender', 'neon-bloom', 'sepia'];
162
+ var colorTheme = localStorage.getItem('kb-dashboard-color-theme') || 'ocean';
163
+ var validThemes = ['default', 'ocean', 'forest', 'sunset', 'zen', 'berry', 'high-contrast', 'industrial', 'monochrome', 'slate', 'ash', 'air', 'graphite', 'silver', 'solarized', 'factory', 'factory-mono', 'ayu', 'one-dark', 'nord', 'dracula', 'gruvbox', 'tokyo-night', 'catppuccin-mocha', 'github-dark', 'everforest', 'rose-pine', 'kanagawa', 'night-owl', 'palenight', 'monokai-pro', 'slime', 'brutalist', 'neon-city', 'parchment', 'terminal', 'glass', 'horizon', 'vitesse', 'outrun', 'snazzy', 'porple', 'espresso', 'mars', 'poimandres', 'ember', 'rust', 'copper', 'foundry', 'carbon', 'sandstone', 'lagoon', 'frost', 'lavender', 'neon-bloom', 'sepia', 'shadcn', 'shadcn-custom', 'shadcn-blue', 'shadcn-green', 'shadcn-red', 'shadcn-purple', 'shadcn-pink', 'shadcn-orange', 'shadcn-yellow', 'shadcn-mono-red', 'shadcn-mono-blue', 'shadcn-mono-green', 'shadcn-mono-purple', 'shadcn-mono-pink', 'shadcn-mono-orange', 'shadcn-mono-yellow', 'shadcn-black', 'shadcn-gray', 'shadcn-gray-blue'];
164
+ // FNXC:DashboardTheming 2026-06-22-18:36: Unset startup theme is Ocean; an explicit stored "default" remains Fusion Legacy and must not be migrated.
165
+ // FNXC:DashboardTheming 2026-06-20-00:00: FN-6813 remaps the legacy mono id before pre-hydration validation so persisted users keep the red mono accent.
166
+ if (colorTheme === 'shadcn-mono') colorTheme = 'shadcn-mono-red';
164
167
  if (!validThemes.includes(colorTheme)) {
165
- colorTheme = 'default';
168
+ colorTheme = 'ocean';
166
169
  }
167
170
  var fontScale = Number(localStorage.getItem('kb-dashboard-font-scale-pct') || '100');
168
171
  if (!Number.isFinite(fontScale)) {
@@ -174,6 +177,23 @@
174
177
  document.documentElement.setAttribute('data-theme', effectiveMode);
175
178
  document.documentElement.setAttribute('data-color-theme', colorTheme);
176
179
  document.documentElement.style.fontSize = fontScale + '%';
180
+ var shadcnCustomColorTokens = ['--accent', '--bg', '--surface', '--card', '--border', '--text', '--text-muted', '--todo', '--in-progress', '--in-review', '--triage', '--done', '--color-success', '--color-warning', '--color-error'];
181
+ for (var cleanupIndex = 0; cleanupIndex < shadcnCustomColorTokens.length; cleanupIndex += 1) {
182
+ document.documentElement.style.removeProperty(shadcnCustomColorTokens[cleanupIndex]);
183
+ }
184
+ if (colorTheme === 'shadcn-custom') {
185
+ try {
186
+ var shadcnCustomColors = JSON.parse(localStorage.getItem('kb-dashboard-shadcn-custom-colors') || '{}');
187
+ var validHex = /^#(?:[\da-f]{3}|[\da-f]{6})$/i;
188
+ for (var colorIndex = 0; colorIndex < shadcnCustomColorTokens.length; colorIndex += 1) {
189
+ var cssVar = shadcnCustomColorTokens[colorIndex];
190
+ var value = shadcnCustomColors && shadcnCustomColors[cssVar];
191
+ if (typeof value === 'string' && validHex.test(value.trim())) {
192
+ document.documentElement.style.setProperty(cssVar, value.trim());
193
+ }
194
+ }
195
+ } catch (customColorError) {}
196
+ }
177
197
  if (colorTheme !== 'default') {
178
198
  var base = document.baseURI || (document.location && document.location.href) || '';
179
199
  var themeDataUrl;
@@ -200,22 +220,22 @@
200
220
  }
201
221
  } catch (e) {
202
222
  document.documentElement.setAttribute('data-theme', 'dark');
203
- document.documentElement.setAttribute('data-color-theme', 'default');
223
+ document.documentElement.setAttribute('data-color-theme', 'ocean');
204
224
  document.documentElement.style.fontSize = '100%';
205
225
  }
206
226
  })();
207
227
  </script>
208
228
  <!-- fusion:view-preload -->
209
229
 
210
- <script type="module" crossorigin src="/assets/index-Bglw05rM.js"></script>
211
- <link rel="modulepreload" crossorigin href="/assets/vendor-react-BTgM5bbZ.js">
212
- <link rel="modulepreload" crossorigin href="/assets/vendor-i18n-DYlSUfot.js">
213
- <link rel="modulepreload" crossorigin href="/assets/vendor-reactflow-ZasuEfF9.js">
214
- <link rel="modulepreload" crossorigin href="/assets/vendor-xterm-ea7-K05z.js">
230
+ <script type="module" crossorigin src="/assets/index-CZcWjLAb.js"></script>
231
+ <link rel="modulepreload" crossorigin href="/assets/vendor-react-SZ_qB27O.js">
232
+ <link rel="modulepreload" crossorigin href="/assets/vendor-i18n-GF3RlKbq.js">
233
+ <link rel="modulepreload" crossorigin href="/assets/vendor-reactflow-Bg-Qjzh8.js">
234
+ <link rel="modulepreload" crossorigin href="/assets/vendor-xterm-BNq00GSj.js">
215
235
  <link rel="modulepreload" crossorigin href="/assets/vendor-codemirror-jBKmHyH0.js">
216
236
  <link rel="stylesheet" crossorigin href="/assets/vendor-reactflow-C5ap-Sga.css">
217
237
  <link rel="stylesheet" crossorigin href="/assets/vendor-xterm-LZoznX6r.css">
218
- <link rel="stylesheet" crossorigin href="/assets/index-FYgnflWD.css">
238
+ <link rel="stylesheet" crossorigin href="/assets/index-BZBQ_KsL.css">
219
239
  <link rel="stylesheet" href="/theme-data.css" id="theme-data" />
220
240
  </head>
221
241
  <body>
package/dist/client/sw.js CHANGED
@@ -1,4 +1,4 @@
1
- const CACHE_NAME = "fusion-cache-v4";
1
+ const CACHE_NAME = "fusion-cache-v5";
2
2
  const APP_SHELL_URLS = [
3
3
  "/",
4
4
  "/index.html",