@objectstack/console 11.1.0 → 11.3.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 (337) hide show
  1. package/dist/assets/{AdapterProvider-BTAMdG2T.js → AdapterProvider-BiTdGDAR.js} +1 -1
  2. package/dist/assets/{AiPendingActionsPage-BtiQFQw8.js → AiPendingActionsPage-pA6WQiJs.js} +1 -1
  3. package/dist/assets/ApiConsolePage-C2RUq2a1.js +1 -0
  4. package/dist/assets/{AppDocsIndex-CbHC6KGX.js → AppDocsIndex-4jDRVpod.js} +1 -1
  5. package/dist/assets/{AppManagementPage-DOoQrTPO.js → AppManagementPage-D4Qdfc-k.js} +1 -1
  6. package/dist/assets/ApprovalsInboxPage-97ofFRyB.js +1 -0
  7. package/dist/assets/AuditLogPage-CE9VainX.js +1 -0
  8. package/dist/assets/{ComponentNavView-g9qw3mhW.js → ComponentNavView-HWYwp2J3.js} +1 -1
  9. package/dist/assets/ConsoleFloatingChatbot-CYQ0DGQS.js +1 -0
  10. package/dist/assets/DashboardView-_v1xyHY7.js +1 -0
  11. package/dist/assets/DashboardWidgetInspector-CagpzDS6.js +1 -0
  12. package/dist/assets/{DeveloperHubPage-Ci0wA8GZ.js → DeveloperHubPage-BSqHoM6g.js} +1 -1
  13. package/dist/assets/{ExpressionProvider-NqLS0ljf.js → ExpressionProvider-BeRnSjp4.js} +1 -1
  14. package/dist/assets/FlowRunsPage-dzQVp59a.js +1 -0
  15. package/dist/assets/{IntegrationsPage-CAZ3nsKJ.js → IntegrationsPage-COUMVn63.js} +2 -2
  16. package/dist/assets/{InterfaceListPage-D1BbH0Iy.js → InterfaceListPage-DyRkCp_l.js} +1 -1
  17. package/dist/assets/{ManagedByBadge-6DwSVsdr.js → ManagedByBadge-CorAI3gR.js} +1 -1
  18. package/dist/assets/{MarketplaceAccessDenied-Cyx7lSjy.js → MarketplaceAccessDenied-BQ6-NcgV.js} +1 -1
  19. package/dist/assets/{MarketplaceInstalledPage-C41H1YlB.js → MarketplaceInstalledPage-CUPRsl4f.js} +1 -1
  20. package/dist/assets/MarketplacePackagePage-CiSZE5lH.js +4 -0
  21. package/dist/assets/MarketplacePage-CzTXmemx.js +1 -0
  22. package/dist/assets/{MetadataInspector-COEBMw6y.js → MetadataInspector-Ci4IEXl6.js} +1 -1
  23. package/dist/assets/{MetadataProvider-D234gTjV.js → MetadataProvider-CkIT9awy.js} +1 -1
  24. package/dist/assets/{MonacoImpl-VsaaS7Wx.js → MonacoImpl-DFmzedsv.js} +1 -1
  25. package/dist/assets/PageView-B82BdAMg.js +1 -0
  26. package/dist/assets/ProfilePage-BbTxTg63.js +1 -0
  27. package/dist/assets/PublicFormsPage-CHmoVuOC.js +1 -0
  28. package/dist/assets/RecordDetailView-Bo53OY-a.js +9 -0
  29. package/dist/assets/{RecordFormPage-CpKMoOCj.js → RecordFormPage-BXLWOLOE.js} +1 -1
  30. package/dist/assets/{ReportDefaultInspector-DxP-Ac7I.js → ReportDefaultInspector-BxP74HM2.js} +4 -4
  31. package/dist/assets/ReportView-BWv6u_ys.js +2 -0
  32. package/dist/assets/{SearchResultsPage-CZ038ncU.js → SearchResultsPage-DvvT6E4h.js} +1 -1
  33. package/dist/assets/{SettingsHub-BXe-fVlJ.js → SettingsHub-CDaz4A8F.js} +1 -1
  34. package/dist/assets/{SettingsView-DxPgTnlF.js → SettingsView-CkL3YJNr.js} +1 -1
  35. package/dist/assets/{SystemHubPage-CJq_1ITt.js → SystemHubPage-DRMrwvla.js} +1 -1
  36. package/dist/assets/abnfDiagram-VRR7QNED-DWrainSQ.js +1 -0
  37. package/dist/assets/{angular-html-B9s24XBK.js → angular-html-r4nzjlvl.js} +1 -1
  38. package/dist/assets/{angular-ts-C7DCn4N7.js → angular-ts-BxqKd0Zc.js} +1 -1
  39. package/dist/assets/{apl-BFSpAsVe.js → apl-C04b0OjT.js} +1 -1
  40. package/dist/assets/architecture-TIHT7OUA-D3WxD8aQ.js +1 -0
  41. package/dist/assets/architectureDiagram-ZJ3FMSHR-BqIfH_cZ.js +36 -0
  42. package/dist/assets/{assistantBus-BMrg1uLy.js → assistantBus-DosfPCbN.js} +1 -1
  43. package/dist/assets/{astro-By5nmri_.js → astro-AQ_iZfq_.js} +1 -1
  44. package/dist/assets/{blade-BEsyb4Es.js → blade-DH22iKQU.js} +1 -1
  45. package/dist/assets/{blockDiagram-GPEHLZMM-Bv7ki00F.js → blockDiagram-677ZJIJ3-BDhRO3KX.js} +7 -7
  46. package/dist/assets/{c-CwKsiqWD.js → c-Bp9SPJXV.js} +1 -1
  47. package/dist/assets/{c4Diagram-AAUBKEIU-BRUAUvfZ.js → c4Diagram-LMCZKHZV-DBmvkEa3.js} +1 -1
  48. package/dist/assets/channel-MM6d7ooS.js +1 -0
  49. package/dist/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
  50. package/dist/assets/chunk-32BRIVSS-1_aHOdgh.js +1 -0
  51. package/dist/assets/chunk-52WLFC77-C-mFgIG6.js +10 -0
  52. package/dist/assets/{chunk-FMBD7UC4-DZ7XVMi3.js → chunk-5VM5RSS4-ZNzvKenW.js} +1 -1
  53. package/dist/assets/chunk-7BUUIJ7U-Bb538aSH.js +1 -0
  54. package/dist/assets/chunk-C7G6YPKG-DvvI9WqY.js +1 -0
  55. package/dist/assets/chunk-EX3LRPZG-BaKE258M.js +231 -0
  56. package/dist/assets/chunk-FWX5IMBZ-BZ1KYToN.js +1 -0
  57. package/dist/assets/chunk-HOUHSVGY-BjQmUg1D.js +1 -0
  58. package/dist/assets/{chunk-5ZQYHXKU-NIbfS0Mi.js → chunk-ICXQ74PX-DGFLQjwm.js} +1 -1
  59. package/dist/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
  60. package/dist/assets/chunk-KEIR6QF5-MVybfwhZ.js +161 -0
  61. package/dist/assets/chunk-MOJQB5TN-aPZk6pC8.js +88 -0
  62. package/dist/assets/chunk-OGEWGWER-C_9e4OS0.js +1 -0
  63. package/dist/assets/chunk-PUDLZKDR-c0kZKR-G.js +156 -0
  64. package/dist/assets/{chunk-O5CBEL6O-B7H8dfmV.js → chunk-Q4XR5HBZ-o24M5lkF.js} +17 -17
  65. package/dist/assets/chunk-RYQCIY6F-DUMnfbFk.js +1 -0
  66. package/dist/assets/{chunk-727SXJPM-C9Y2Btvf.js → chunk-V7JOEXUC-BP0RE3_V.js} +2 -2
  67. package/dist/assets/chunk-VAUOI2AC-Bgyec1On.js +1 -0
  68. package/dist/assets/chunk-VR4S4FIN-DykLEeqy.js +1 -0
  69. package/dist/assets/chunk-WYO6CB5R-BBbafnWJ.js +127 -0
  70. package/dist/assets/chunk-XXDRQBXY-V26l8fww.js +1 -0
  71. package/dist/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
  72. package/dist/assets/chunk-ZGVPDNZ5-DQH9cJwj.js +62 -0
  73. package/dist/assets/{chunk-XPW4576I-BnrxXe1_.js → chunk-ZIRB5QZD-C6fEPe3t.js} +2 -2
  74. package/dist/assets/classDiagram-OUVF2IWQ-BOtUpfWB.js +1 -0
  75. package/dist/assets/classDiagram-v2-EOCWNBFH-BOtUpfWB.js +1 -0
  76. package/dist/assets/{cobol-AtgRrYrD.js → cobol-j5M6C8cE.js} +1 -1
  77. package/dist/assets/{coffee-Dx9BrBX9.js → coffee-68oYHmZj.js} +1 -1
  78. package/dist/assets/cose-bilkent-JH36ORCC-CDWwyRUu.js +1 -0
  79. package/dist/assets/{cpp-DNQ-Fj9i.js → cpp-dOwNr0lq.js} +1 -1
  80. package/dist/assets/{crystal-BFAqiLnY.js → crystal-BQKjzQ6q.js} +1 -1
  81. package/dist/assets/{css-76WQuunA.js → css-BCANWTts.js} +1 -1
  82. package/dist/assets/cynefin-VYW2F7L2-v0nc1IZv.js +1 -0
  83. package/dist/assets/cynefinDiagram-TSTJHNR4-Dn83Cn2D.js +62 -0
  84. package/dist/assets/{cytoscape.esm-h6BdjjI9.js → cytoscape.esm-Djp6vQyU.js} +2 -2
  85. package/dist/assets/dagre-CXRCoUWR.js +1 -0
  86. package/dist/assets/dagre-VKFMJZFB-DYKhgtL2.js +4 -0
  87. package/dist/assets/{data-adapter-02g96tfY.js → data-adapter-B9YoyoUW.js} +1 -1
  88. package/dist/assets/{diagram-KO2AKTUF-DG_jPd_S.js → diagram-FQU43EPY-84kGXmcJ.js} +2 -2
  89. package/dist/assets/diagram-G47NLZAW-FzYRzXJF.js +24 -0
  90. package/dist/assets/diagram-NH7WQ7WH-D2_7Upma.js +24 -0
  91. package/dist/assets/diagram-OA4YK3LP-uqOHgtNB.js +30 -0
  92. package/dist/assets/diagram-WEI45ONY-BoLpoJXF.js +41 -0
  93. package/dist/assets/{dist-D80kLFC3.js → dist-BrXdcuve.js} +1 -1
  94. package/dist/assets/{dist-Cna34lZe.js → dist-Dr6qRSPx.js} +1 -1
  95. package/dist/assets/ebnfDiagram-CCIWWBDH-DLYgN3Ab.js +1 -0
  96. package/dist/assets/{edge-BEfBxc5h.js → edge-D8ZvGBZ4.js} +1 -1
  97. package/dist/assets/{elixir-Bi1LyDCo.js → elixir-8PeAFHYj.js} +1 -1
  98. package/dist/assets/{elm-BMPZeG5i.js → elm-Aa2ys7L1.js} +1 -1
  99. package/dist/assets/erDiagram-Q63AITRT-BmagGyFR.js +85 -0
  100. package/dist/assets/{erb-Pmcx6TTx.js → erb-e24MnpOC.js} +1 -1
  101. package/dist/assets/eventmodeling-45OFAUF4-CHsG6T7D.js +1 -0
  102. package/dist/assets/{exceljs.min-HZhgX9lC.js → exceljs.min-DIyttv_G.js} +5 -5
  103. package/dist/assets/flowDiagram-23GEKE2U-BZtO2Jjx.js +1 -0
  104. package/dist/assets/{framework-h98DIM1k.js → framework-BGQ7DoWM.js} +7 -7
  105. package/dist/assets/ganttDiagram-NO4QXBWP-DdGzwLRB.js +292 -0
  106. package/dist/assets/{git-rebase-Dj7t0bix.js → git-rebase-gx2II6xm.js} +1 -1
  107. package/dist/assets/gitGraph-TEB2WS4Q-DEB3Nljf.js +1 -0
  108. package/dist/assets/gitGraphDiagram-IHSO6WYX-Dv8qb0qh.js +106 -0
  109. package/dist/assets/{glimmer-js-DTpMHWUo.js → glimmer-js-BAhz69_J.js} +1 -1
  110. package/dist/assets/{glimmer-ts-BKOVQU61.js → glimmer-ts-DceI_LA7.js} +1 -1
  111. package/dist/assets/{glsl-DDNdYp2B.js → glsl-fbNNN2Bp.js} +1 -1
  112. package/dist/assets/{graphql-C-akFyqE.js → graphql-BVCjFJgP.js} +1 -1
  113. package/dist/assets/{hack-Z382E4IB.js → hack-DxPgm4F4.js} +1 -1
  114. package/dist/assets/{haml-DCWQJgln.js → haml-BsIdCvCS.js} +1 -1
  115. package/dist/assets/{handlebars-D_RRtkV5.js → handlebars-DdTlUnCd.js} +1 -1
  116. package/dist/assets/{highlighted-body-OFNGDK62-DO9p_wSr.js → highlighted-body-OFNGDK62-D9Y-fWz-.js} +1 -1
  117. package/dist/assets/{html-BqDo3pKb.js → html-BwPosJq7.js} +1 -1
  118. package/dist/assets/{html-derivative-DncxUXSH.js → html-derivative-tMv-aKGZ.js} +1 -1
  119. package/dist/assets/{http-CrTHj6_t.js → http-B1LJ0uJF.js} +1 -1
  120. package/dist/assets/{hurl-BdeVL_ga.js → hurl-GKc7yueO.js} +1 -1
  121. package/dist/assets/index-0xh0t0SY.css +2 -0
  122. package/dist/assets/index-BzqR5LGR.js +2 -0
  123. package/dist/assets/info-DKCQHKI2-BMNzABlv.js +1 -0
  124. package/dist/assets/infoDiagram-FWYZ7A6U-BnI8Gbdt.js +2 -0
  125. package/dist/assets/infrastructure-BySW-NB0.js +3 -0
  126. package/dist/assets/{ishikawaDiagram-YF4QCWOH-B2te-ZRn.js → ishikawaDiagram-FXEZZL3T-BfpmvVA0.js} +1 -1
  127. package/dist/assets/{java-DKFHmTAg.js → java-DJul3uN_.js} +1 -1
  128. package/dist/assets/{javascript-Jx16aUBb.js → javascript-DC7Y13dy.js} +1 -1
  129. package/dist/assets/{jinja-CQEVrK23.js → jinja-DHXIPVIS.js} +1 -1
  130. package/dist/assets/{jison-BJRgvE0A.js → jison-Bb-bjV_r.js} +1 -1
  131. package/dist/assets/{journeyDiagram-JHISSGLW-lZExleN9.js → journeyDiagram-5HDEW3XC-8UQvh7pY.js} +1 -1
  132. package/dist/assets/{json-DlFP2GYa.js → json-DaZn6kP4.js} +1 -1
  133. package/dist/assets/{jsx-CIwpwN-u.js → jsx-C97fCUqH.js} +1 -1
  134. package/dist/assets/{julia-D4zLZb0D.js → julia-DjbOEOq7.js} +1 -1
  135. package/dist/assets/{just-BbmgE3ZP.js → just-e17iqfha.js} +1 -1
  136. package/dist/assets/{kanban-definition-UN3LZRKU-C9AtY5D5.js → kanban-definition-HUTT4EX6-CFX7QbbK.js} +3 -3
  137. package/dist/assets/{katex-Vhh-h91d.js → katex-CddkPoXu.js} +1 -1
  138. package/dist/assets/{latex-BUDs7Dcl.js → latex-C_WFP2fs.js} +1 -1
  139. package/dist/assets/{liquid-Bc0s0G9S.js → liquid-9ZAw5ESd.js} +1 -1
  140. package/dist/assets/{lua-dQaszIi_.js → lua-BF4pD4PQ.js} +1 -1
  141. package/dist/assets/map-DsCK-0Cs.js +1 -0
  142. package/dist/assets/{maplibre-gl-C3Ve5bV1.js → maplibre-gl-DGbvC0OV.js} +2 -2
  143. package/dist/assets/{marketplaceApi-B_Gmytip.js → marketplaceApi-2fWjbQI7.js} +1 -1
  144. package/dist/assets/{marko-B5Uea28G.js → marko-BaTlCnew.js} +1 -1
  145. package/dist/assets/{mdc-CwQcy7BI.js → mdc-V7J1bLNm.js} +1 -1
  146. package/dist/assets/mermaid-GHXKKRXX-DfINr0ix.js +1 -0
  147. package/dist/assets/mermaid-parser.core-qFqgm_H6.js +6 -0
  148. package/dist/assets/mermaid.core-T8rJXbMH.js +10 -0
  149. package/dist/assets/metadata-admin-CWGl9yQd.js +22 -0
  150. package/dist/assets/{mindmap-definition-RKZ34NQL-BLNposyO.js → mindmap-definition-LN4V7U3C-BmcygCh7.js} +1 -1
  151. package/dist/assets/{nginx-SzmDaWuK.js → nginx-YcT3QO7G.js} +1 -1
  152. package/dist/assets/{nim-CO_A6I25.js → nim-BLaoQEWH.js} +1 -1
  153. package/dist/assets/packet-7NZHBO7P-CVEX3X_K.js +1 -0
  154. package/dist/assets/pegDiagram-2B236MQR-D3IbyQE9.js +1 -0
  155. package/dist/assets/{perl-DXgLsVg8.js → perl-CZJdECIs.js} +1 -1
  156. package/dist/assets/{php-C4KCWpl8.js → php-DIy4CEY0.js} +1 -1
  157. package/dist/assets/pie-RZYD4A2V-VzBvughO.js +1 -0
  158. package/dist/assets/pieDiagram-ENE6RG2P-BZteOl-k.js +39 -0
  159. package/dist/assets/plugin-calendar-Bvz5MlbF.js +1 -0
  160. package/dist/assets/plugin-charts-BQs_--tP.js +7 -0
  161. package/dist/assets/plugin-chatbot-C7dKmmA6.js +120 -0
  162. package/dist/assets/plugin-dashboard-CWaZph1r.js +6 -0
  163. package/dist/assets/plugin-form-B73E4Mbd.js +1 -0
  164. package/dist/assets/plugin-gantt-Bf38rZLK.js +93 -0
  165. package/dist/assets/plugin-grid-a4T-OeTY.js +6 -0
  166. package/dist/assets/plugin-kanban-Co4jnw0I.js +1 -0
  167. package/dist/assets/plugin-map-Cr2T-pjl.js +1 -0
  168. package/dist/assets/{plugin-markdown-BgV76qm3.js → plugin-markdown-PeIRJlRw.js} +1 -1
  169. package/dist/assets/plugin-report-DacHRf4i.js +59 -0
  170. package/dist/assets/plugin-timeline-ueCjCHSY.js +1 -0
  171. package/dist/assets/{plugin-tree-D2QWz1x1.js → plugin-tree-KBPNkKuR.js} +1 -1
  172. package/dist/assets/plugin-view-CbNN954o.js +1 -0
  173. package/dist/assets/plugins-views-C-R-Gk81.js +4 -0
  174. package/dist/assets/{pug-bpEG1CVZ.js → pug-r52_xqX8.js} +1 -1
  175. package/dist/assets/{qml-DGJzHzg9.js → qml-Be35LeVE.js} +1 -1
  176. package/dist/assets/{quadrantDiagram-W4KKPZXB-DuQbsXa3.js → quadrantDiagram-ABIIQ3AL-DPVvulM5.js} +3 -3
  177. package/dist/assets/{r-CZt9UGEb.js → r-D9B56oy7.js} +1 -1
  178. package/dist/assets/radar-I7S5WNFK-BvMfKOT_.js +1 -0
  179. package/dist/assets/railroad-3IZDKUUU-DfKQD3PJ.js +1 -0
  180. package/dist/assets/railroad-abnf-AHOZXSZD-DVyrJPzV.js +1 -0
  181. package/dist/assets/railroad-ebnf-EBAXGLYW-Cri8VQ5d.js +1 -0
  182. package/dist/assets/railroad-peg-LSFZ7HO6-Bmvxxxt6.js +1 -0
  183. package/dist/assets/railroadDiagram-RFXS5EU6-CgLSy8wn.js +1 -0
  184. package/dist/assets/{razor-mTLK-dma.js → razor-uUSeMB08.js} +1 -1
  185. package/dist/assets/{regexp-DX5QhPdx.js → regexp-D77ZphON.js} +1 -1
  186. package/dist/assets/{requirementDiagram-4Y6WPE33-BS1D5lNA.js → requirementDiagram-TGXJPOKE-DYX2pMfn.js} +3 -3
  187. package/dist/assets/rolldown-runtime-DAXXjFlN.js +1 -0
  188. package/dist/assets/{rst-t-F-oATV.js → rst-DZtY-B3E.js} +1 -1
  189. package/dist/assets/{ruby-D9DDGNv3.js → ruby-CuVu4KOG.js} +1 -1
  190. package/dist/assets/{sankeyDiagram-5OEKKPKP-DGvgs5mF.js → sankeyDiagram-HTMAVEWB-amvhkMhz.js} +1 -1
  191. package/dist/assets/{sas-BAEs8TsV.js → sas-BRgKo67P.js} +1 -1
  192. package/dist/assets/{scss-B6B5DSWC.js → scss-CGgB8MuJ.js} +1 -1
  193. package/dist/assets/{sequenceDiagram-3UESZ5HK-CoXT3Sa8.js → sequenceDiagram-DBY2YBRQ-CPxWMCbb.js} +3 -3
  194. package/dist/assets/{shellscript-DXt7nqYk.js → shellscript-xyv2Ai2R.js} +1 -1
  195. package/dist/assets/{shellsession-DQ4guRhR.js → shellsession-BEUInF7X.js} +1 -1
  196. package/dist/assets/sizeCapture-X5ZJPWSS-B0uUizjq.js +1 -0
  197. package/dist/assets/{skeletons-BQ5aRDUn.js → skeletons-CZdepTdC.js} +1 -1
  198. package/dist/assets/{soy-DtwGS8Y2.js → soy-DWSlVwxw.js} +1 -1
  199. package/dist/assets/{sql-ArzG0FT1.js → sql-DvBUnkQP.js} +1 -1
  200. package/dist/assets/src-6rOMKMLU.js +1 -0
  201. package/dist/assets/src-DRWgP_lu.js +2 -0
  202. package/dist/assets/{src-C4OnKiir.js → src-DzNV76wU.js} +1 -1
  203. package/dist/assets/{stata-CdQ318yb.js → stata-DK4xd-1U.js} +1 -1
  204. package/dist/assets/stateDiagram-2N3HPSRC-DkFPpTq2.js +1 -0
  205. package/dist/assets/stateDiagram-v2-6OUMAXLB-C_tQckF_.js +1 -0
  206. package/dist/assets/{surrealql-RyXJ8VfM.js → surrealql-BQstUV05.js} +1 -1
  207. package/dist/assets/{svelte-CXkGIk7i.js → svelte-COt-aqLJ.js} +1 -1
  208. package/dist/assets/swimlanes-5IMT3BWC-DMPnpahc.js +1 -0
  209. package/dist/assets/swimlanesDiagram-G3AALYLV-BLVdl7Q4.js +8 -0
  210. package/dist/assets/{templ-CJz86NIj.js → templ-DUVqjRh3.js} +1 -1
  211. package/dist/assets/{tex-C71esTKh.js → tex-we3ORCro.js} +1 -1
  212. package/dist/assets/{timeline-definition-PNZ67QCA-C3SxX0_p.js → timeline-definition-FHXFAJF6-DMhg5ZmV.js} +2 -2
  213. package/dist/assets/treeView-QDETBFTQ-Cz0fwXom.js +1 -0
  214. package/dist/assets/treemap-6X3UGDF4-BlqJD81v.js +1 -0
  215. package/dist/assets/{ts-tags-Qszjvpax.js → ts-tags-BBqvRvIx.js} +1 -1
  216. package/dist/assets/{tsx-BEhriTf8.js → tsx-Db8p8m2t.js} +1 -1
  217. package/dist/assets/{twig-CbaWuFm3.js → twig-BHAJLapx.js} +1 -1
  218. package/dist/assets/{types-BUZu4QOP.js → types-CoZkCf64.js} +1 -1
  219. package/dist/assets/{typescript-CBu4i5lG.js → typescript-DToX5D_l.js} +1 -1
  220. package/dist/assets/ui-components-J75dr3Ae.js +42 -0
  221. package/dist/assets/{ui-layout-BwokMuBv.js → ui-layout-DQDnaREz.js} +1 -1
  222. package/dist/assets/{useActionModal-ChUaxcEW.js → useActionModal-DI7oaRiK.js} +1 -1
  223. package/dist/assets/{useOpenRecordList-BkSEs2q6.js → useOpenRecordList-pMYhKC_q.js} +1 -1
  224. package/dist/assets/{usePackageL10n-DIEe85Ot.js → usePackageL10n-CasuagU5.js} +1 -1
  225. package/dist/assets/{useReconcileOnError-FPUCNTHc.js → useReconcileOnError-p9SZCLMb.js} +1 -1
  226. package/dist/assets/utils-CFXe_XCU.js +1 -0
  227. package/dist/assets/vendor-charts-DVOdzzh2.js +67 -0
  228. package/dist/assets/{vendor-dndkit-CJ-mJJuO.js → vendor-dndkit-DoPtQigN.js} +1 -1
  229. package/dist/assets/vendor-i18n-sU23bKX1.js +1 -0
  230. package/dist/assets/{vendor-icons-core-y1IwBwLD.js → vendor-icons-core-CPQTXONm.js} +1 -1
  231. package/dist/assets/{vendor-markdown-BhPWU2N7.js → vendor-markdown-Cbritblm.js} +15 -15
  232. package/dist/assets/vendor-objectstack-AFc_0VfZ.js +96 -0
  233. package/dist/assets/{vendor-radix-90T7eS-d.js → vendor-radix-DniuRzL-.js} +1 -1
  234. package/dist/assets/{vendor-react-ClIa1CJA.js → vendor-react-slxo-5GC.js} +2 -2
  235. package/dist/assets/vendor-sentry-BnfuR4xu.js +501 -0
  236. package/dist/assets/{vendor-ui-utils-C92Fl7BT.js → vendor-ui-utils-C1OpMExs.js} +1 -1
  237. package/dist/assets/vennDiagram-L72KCM5P-BCn9MNWT.js +34 -0
  238. package/dist/assets/{vue-Bruwzb-A.js → vue-CDP3wwGh.js} +1 -1
  239. package/dist/assets/{vue-html-C-3Ma2tD.js → vue-html-Cj0ctcUy.js} +1 -1
  240. package/dist/assets/{vue-vine-DQAt9DTg.js → vue-vine-O34tJq4k.js} +1 -1
  241. package/dist/assets/wardley-OPB4EBWU-DdYQ8RHK.js +1 -0
  242. package/dist/assets/{wardleyDiagram-YWT4CUSO-Ck_J2TTN.js → wardleyDiagram-EHGQE667-ShqmBgOZ.js} +2 -2
  243. package/dist/assets/{xml-BS2GSQw_.js → xml-DzUK0Pry.js} +1 -1
  244. package/dist/assets/{xsl-CCmfIdf4.js → xsl-B-eulOKn.js} +1 -1
  245. package/dist/assets/xychartDiagram-FW5EYKEG-D1hShMP_.js +7 -0
  246. package/dist/assets/{yaml-C1LY7x4K.js → yaml-uB2nBBeV.js} +1 -1
  247. package/dist/index.html +6 -6
  248. package/package.json +1 -1
  249. package/dist/assets/ApiConsolePage-CQJbzAsw.js +0 -1
  250. package/dist/assets/ApprovalsInboxPage-D6eWYxCu.js +0 -1
  251. package/dist/assets/AuditLogPage-F85cQBBY.js +0 -1
  252. package/dist/assets/ConsoleFloatingChatbot-Cy-Ny_TS.js +0 -1
  253. package/dist/assets/DashboardView-mIWO-jW_.js +0 -1
  254. package/dist/assets/DashboardWidgetInspector-DOnyBhGN.js +0 -1
  255. package/dist/assets/FlowRunsPage-CNz2_VFK.js +0 -1
  256. package/dist/assets/MarketplacePackagePage-Bihb2q1b.js +0 -4
  257. package/dist/assets/MarketplacePage-C2B6TMNM.js +0 -1
  258. package/dist/assets/PageView-DuiaqvzN.js +0 -1
  259. package/dist/assets/ProfilePage-B1oCou0F.js +0 -1
  260. package/dist/assets/PublicFormsPage-C2prdsH6.js +0 -1
  261. package/dist/assets/RecordDetailView-B-AuOKPI.js +0 -9
  262. package/dist/assets/ReportView-Cw9Ompki.js +0 -2
  263. package/dist/assets/architecture-7EHR7CIX-X1S5OWmc.js +0 -1
  264. package/dist/assets/architectureDiagram-3BPJPVTR-MvRuEgzs.js +0 -36
  265. package/dist/assets/channel-BqPJ7J2_.js +0 -1
  266. package/dist/assets/chunk-2J33WTMH-DTuZqhEo.js +0 -1
  267. package/dist/assets/chunk-3OPIFGDE-C_qRhnNp.js +0 -62
  268. package/dist/assets/chunk-4BX2VUAB-Curilu76.js +0 -1
  269. package/dist/assets/chunk-55IACEB6-ClqERWh2.js +0 -1
  270. package/dist/assets/chunk-AQP2D5EJ-CtIyrl6v.js +0 -231
  271. package/dist/assets/chunk-BSJP7CBP-DjJyEH0K.js +0 -1
  272. package/dist/assets/chunk-CSCIHK7Q-DbAqhmGo.js +0 -124
  273. package/dist/assets/chunk-KSCS5N6A-DHHPqSRu.js +0 -10
  274. package/dist/assets/chunk-L5ZTLDWV-Cm-9mVS5.js +0 -1
  275. package/dist/assets/chunk-LZXEDZCA-DNmRzWTq.js +0 -1
  276. package/dist/assets/chunk-ND2GUHAM-D-GBTiNx.js +0 -1
  277. package/dist/assets/chunk-NNHCCRGN-Ud6GGuM7.js +0 -159
  278. package/dist/assets/chunk-NZK2D7GU-CtXqakqk.js +0 -1
  279. package/dist/assets/chunk-QZHKN3VN-WFr5OVn5.js +0 -1
  280. package/dist/assets/chunk-WU5MYG2G-DKJgGIni.js +0 -1
  281. package/dist/assets/classDiagram-4FO5ZUOK-WH7-26qH.js +0 -1
  282. package/dist/assets/classDiagram-v2-Q7XG4LA2-WH7-26qH.js +0 -1
  283. package/dist/assets/cose-bilkent-S5V4N54A-DhuYtQPb.js +0 -1
  284. package/dist/assets/dagre-BM42HDAG-Dnyz2UIF.js +0 -4
  285. package/dist/assets/dagre-Bx709z4p.js +0 -1
  286. package/dist/assets/diagram-2AECGRRQ-sHfykK_1.js +0 -43
  287. package/dist/assets/diagram-5GNKFQAL-CQPF5SyR.js +0 -10
  288. package/dist/assets/diagram-LMA3HP47-eeIrBazE.js +0 -24
  289. package/dist/assets/diagram-OG6HWLK6-aTF20BV0.js +0 -24
  290. package/dist/assets/erDiagram-TEJ5UH35-CZG8EC14.js +0 -85
  291. package/dist/assets/eventmodeling-FCH6USID-y9LH0zSr.js +0 -1
  292. package/dist/assets/flowDiagram-I6XJVG4X-Dy6yH4qt.js +0 -162
  293. package/dist/assets/ganttDiagram-6RSMTGT7-BbnAVyeg.js +0 -292
  294. package/dist/assets/gitGraph-WXDBUCRP-CWBdNpUZ.js +0 -1
  295. package/dist/assets/gitGraphDiagram-PVQCEYII-DQzVZDx1.js +0 -106
  296. package/dist/assets/index-BQhiWf8_.js +0 -2
  297. package/dist/assets/index-WhD62Q-7.css +0 -2
  298. package/dist/assets/info-J43DQDTF-BT1tFy_c.js +0 -1
  299. package/dist/assets/infoDiagram-5YYISTIA-CL6j94aA.js +0 -2
  300. package/dist/assets/infrastructure-B1z73d-r.js +0 -3
  301. package/dist/assets/mermaid-GHXKKRXX-DEmtnxCC.js +0 -1
  302. package/dist/assets/mermaid-parser.core-Fbhy6q19.js +0 -3
  303. package/dist/assets/mermaid.core-X9A0zXAG.js +0 -8
  304. package/dist/assets/metadata-admin-DStYGsRM.js +0 -22
  305. package/dist/assets/packet-YPE3B663-2eu0wHWY.js +0 -1
  306. package/dist/assets/pie-LRSECV5Y-BA_jHDuN.js +0 -1
  307. package/dist/assets/pieDiagram-4H26LBE5-B_jWIggY.js +0 -30
  308. package/dist/assets/plugin-calendar-BYmYEyQk.js +0 -1
  309. package/dist/assets/plugin-charts-BDFf0TCn.js +0 -7
  310. package/dist/assets/plugin-chatbot-CnuZn8AC.js +0 -120
  311. package/dist/assets/plugin-dashboard-CuwYQhsg.js +0 -6
  312. package/dist/assets/plugin-form-CH8ruD9E.js +0 -1
  313. package/dist/assets/plugin-gantt-BB8ZeREv.js +0 -93
  314. package/dist/assets/plugin-grid-D414NLNP.js +0 -6
  315. package/dist/assets/plugin-kanban-BRFJEEAA.js +0 -1
  316. package/dist/assets/plugin-map-rEWoyyKa.js +0 -1
  317. package/dist/assets/plugin-report-C-YPOtvZ.js +0 -59
  318. package/dist/assets/plugin-timeline-CC91-fmI.js +0 -1
  319. package/dist/assets/plugin-view-C6iEzx93.js +0 -1
  320. package/dist/assets/plugins-views-CcoNygsH.js +0 -4
  321. package/dist/assets/radar-GUYGQ44K-BdSwem6Q.js +0 -1
  322. package/dist/assets/rolldown-runtime-CMxvf4Kt.js +0 -1
  323. package/dist/assets/src-B_91OByQ.js +0 -1
  324. package/dist/assets/src-CKHT6scJ.js +0 -2
  325. package/dist/assets/stateDiagram-AJRCARHV-CGBlOS6N.js +0 -1
  326. package/dist/assets/stateDiagram-v2-BHNVJYJU-B7qRtpsa.js +0 -1
  327. package/dist/assets/treeView-BLDUP644-LYooC8jV.js +0 -1
  328. package/dist/assets/treemap-LRROVOQU-DRMY684K.js +0 -1
  329. package/dist/assets/ui-components-C9egdVxV.js +0 -42
  330. package/dist/assets/utils-6HhVlFkm.js +0 -1
  331. package/dist/assets/vendor-charts-BMpO4zwC.js +0 -39
  332. package/dist/assets/vendor-i18n-DA5MKfC_.js +0 -1
  333. package/dist/assets/vendor-objectstack-BTQLr7T3.js +0 -96
  334. package/dist/assets/vendor-sentry-DUcsR3Vf.js +0 -501
  335. package/dist/assets/vennDiagram-CIIHVFJN-BWIbAw03.js +0 -34
  336. package/dist/assets/wardley-L42UT6IY-zPLhQ1bd.js +0 -1
  337. package/dist/assets/xychartDiagram-2RQKCTM6-CDqp4wV0.js +0 -7
@@ -0,0 +1 @@
1
+ import"./chunk-KEIR6QF5-MVybfwhZ.js";import{i as e}from"./mermaid-parser.core-qFqgm_H6.js";export{e as createWardleyServices};
@@ -1,4 +1,4 @@
1
- import{t as e}from"./mermaid-parser.core-Fbhy6q19.js";import{n as t,r as n}from"./src-B_91OByQ.js";import{D as r,H as i,K as a,U as o,a as s,b as c,c as l,v as u,w as d,x as f,y as p}from"./chunk-CSCIHK7Q-DbAqhmGo.js";import{t as m}from"./chunk-WU5MYG2G-DKJgGIni.js";import{i as h}from"./chunk-5ZQYHXKU-NIbfS0Mi.js";import{t as g}from"./chunk-4BX2VUAB-Curilu76.js";var _=t((e,t)=>{let n=e<=1?e*100:e;if(n<0||n>100)throw Error(`${t} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return n},`toPercent`),v=t((e,t,n)=>({x:_(t,`${n} evolution`),y:_(e,`${n} visibility`)}),`toCoordinates`),y=t(e=>{if(e){if(e===`+<>`)return`bidirectional`;if(e===`+<`)return`backward`;if(e===`+>`)return`forward`}},`getFlowFromPort`),b=t(e=>{if(!e?.startsWith(`+`))return{};let t=/^\+'([^']*)'/.exec(e)?.[1];return e.includes(`<>`)?{flow:`bidirectional`,label:t}:e.includes(`<`)?{flow:`backward`,label:t}:e.includes(`>`)?{flow:`forward`,label:t}:{label:t}},`extractFlowFromArrow`),x=t((e,t)=>{if(g(e,t),e.size&&t.setSize(e.size.width,e.size.height),e.evolution){let n=e.evolution.stages.map(e=>e.secondName?`${e.name.trim()} / ${e.secondName.trim()}`:e.name.trim()),r=e.evolution.stages.filter(e=>e.boundary!==void 0).map(e=>e.boundary);t.updateAxes({stages:n,stageBoundaries:r})}if(e.anchors.forEach(e=>{let n=v(e.visibility,e.evolution,`Anchor "${e.name}"`);t.addNode(e.name,e.name,n.x,n.y,`anchor`)}),e.components.forEach(e=>{let n=v(e.visibility,e.evolution,`Component "${e.name}"`),r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,i=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,a=e.decorator?.strategy;t.addNode(e.name,e.name,n.x,n.y,`component`,r,i,e.inertia,a)}),e.notes.forEach(e=>{let n=v(e.visibility,e.evolution,`Note "${e.text}"`);t.addNote(e.text,n.x,n.y)}),e.pipelines.forEach(e=>{let n=t.getNode(e.parent);if(!n||typeof n.y!=`number`)throw Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);let r=n.y;t.startPipeline(e.parent),e.components.forEach(n=>{let i=`${e.parent}_${n.name}`,a=n.label?(n.label.negX?-1:1)*n.label.offsetX:void 0,o=n.label?(n.label.negY?-1:1)*n.label.offsetY:void 0,s=_(n.evolution,`Pipeline component "${n.name}" evolution`);t.addNode(i,n.name,s,r,`pipeline-component`,a,o),t.addPipelineComponent(e.parent,i)})}),e.links.forEach(e=>{let n=!!e.arrow&&(e.arrow.includes(`-.->`)||e.arrow.includes(`.-.`)),r=y(e.fromPort)??y(e.toPort),{flow:i,label:a}=b(e.arrow);!r&&i&&(r=i);let o=e.linkLabel,s=a??o;t.addLink(t.resolveNodeId(e.from),t.resolveNodeId(e.to),n,s,r)}),e.evolves.forEach(e=>{let n=t.getNode(e.component);if(n?.y!==void 0){let r=_(e.target,`Evolve target for "${e.component}"`);t.addTrend(e.component,r,n.y)}}),e.annotations.length>0){let n=e.annotations[0],r=v(n.x,n.y,`Annotations box`);t.setAnnotationsBox(r.x,r.y)}e.annotation.forEach(e=>{let n=v(e.x,e.y,`Annotation ${e.number}`);t.addAnnotation(e.number,[{x:n.x,y:n.y}],e.text)}),e.accelerators.forEach(e=>{let n=v(e.x,e.y,`Accelerator "${e.name}"`);t.addAccelerator(e.name,n.x,n.y)}),e.deaccelerators.forEach(e=>{let n=v(e.x,e.y,`Deaccelerator "${e.name}"`);t.addDeaccelerator(e.name,n.x,n.y)})},`populateDb`),S={parser:{yy:void 0},parse:t(async t=>{let r=await e(`wardley`,t);n.debug(r);let i=S.parser?.yy;if(!i||typeof i.addNode!=`function`)throw 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.`);x(r,i)},`parse`)},C=new 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{t(this,`WardleyBuilder`)}addNode(e){let t=this.nodes.get(e.id)??{id:e.id,label:e.label},n={...t,...e,className:e.className??t.className,labelOffsetX:e.labelOffsetX??t.labelOffsetX,labelOffsetY:e.labelOffsetY??t.labelOffsetY};this.nodes.set(e.id,n)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});let t=this.nodes.get(e);t&&(t.isPipelineParent=!0)}addPipelineComponent(e,t){let n=this.pipelines.get(e);n&&n.componentIds.push(t);let r=this.nodes.get(t);r&&(r.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,t){this.annotationsBox={x:e,y:t}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,t){this.size={width:e,height:t}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(let[t,n]of this.nodes)if(n.label===e)return t;return e}build(){let e=[];for(let t of this.nodes.values()){if(typeof t.x!=`number`||typeof t.y!=`number`)throw Error(`Node "${t.label}" is missing coordinates`);e.push(t)}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}};function w(){return f()[`wardley-beta`]}t(w,`getConfig`);function T(e,t,n,r,i,a,o,s,c){C.addNode({id:e,label:t,x:n,y:r,className:i,labelOffsetX:a,labelOffsetY:o,inertia:s,sourceStrategy:c})}t(T,`addNode`);function E(e,t,n=!1,r,i){C.addLink({source:e,target:t,dashed:n,label:r,flow:i})}t(E,`addLink`);function D(e,t,n){C.addTrend({nodeId:e,targetX:t,targetY:n})}t(D,`addTrend`);function O(e,t,n){C.addAnnotation({number:e,coordinates:t,text:n})}t(O,`addAnnotation`);function k(e,t,n){C.addNote({text:e,x:t,y:n})}t(k,`addNote`);function A(e,t,n){C.addAccelerator({name:e,x:t,y:n})}t(A,`addAccelerator`);function j(e,t,n){C.addDeaccelerator({name:e,x:t,y:n})}t(j,`addDeaccelerator`);function M(e,t){C.setAnnotationsBox(e,t)}t(M,`setAnnotationsBox`);function N(e,t){C.setSize(e,t)}t(N,`setSize`);function P(e){C.startPipeline(e)}t(P,`startPipeline`);function F(e,t){C.addPipelineComponent(e,t)}t(F,`addPipelineComponent`);function I(e){C.setAxes(e)}t(I,`updateAxes`);function L(e){return C.getNode(e)}t(L,`getNode`);function R(e){return C.resolveNodeId(e)}t(R,`resolveNodeId`);function z(){return C.build()}t(z,`getWardleyData`);function B(){C.clear(),s()}t(B,`clear`);var V={getConfig:w,addNode:T,addLink:E,addTrend:D,addAnnotation:O,addNote:k,addAccelerator:A,addDeaccelerator:j,setAnnotationsBox:M,setSize:N,startPipeline:P,addPipelineComponent:F,updateAxes:I,getNode:L,resolveNodeId:R,getWardleyData:z,clear:B,setAccTitle:o,getAccTitle:p,setDiagramTitle:a,getDiagramTitle:d,getAccDescription:u,setAccDescription:i},H=[`Genesis`,`Custom Built`,`Product`,`Commodity`],U=t(()=>{let{themeVariables:e}=f();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`),W=t(()=>{let e=f()[`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`),G={parser:S,db:V,renderer:{draw:t((e,r,i,a)=>{n.debug(`Rendering Wardley map
1
+ import{n as e}from"./mermaid-parser.core-qFqgm_H6.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as n}from"./src-6rOMKMLU.js";import{D as r,H as i,K as a,U as o,a as s,b as c,c as l,v as u,w as d,x as f,y as p}from"./chunk-WYO6CB5R-BBbafnWJ.js";import{t as m}from"./chunk-VAUOI2AC-Bgyec1On.js";import{t as h}from"./chunk-JWPE2WC7-DVXcaiue.js";import{i as g}from"./chunk-ICXQ74PX-DGFLQjwm.js";var _=t((e,t)=>{let n=e<=1?e*100:e;if(n<0||n>100)throw Error(`${t} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return n},`toPercent`),v=t((e,t,n)=>({x:_(t,`${n} evolution`),y:_(e,`${n} visibility`)}),`toCoordinates`),y=t(e=>{if(e){if(e===`+<>`)return`bidirectional`;if(e===`+<`)return`backward`;if(e===`+>`)return`forward`}},`getFlowFromPort`),b=t(e=>{if(!e?.startsWith(`+`))return{};let t=/^\+'([^']*)'/.exec(e)?.[1];return e.includes(`<>`)?{flow:`bidirectional`,label:t}:e.includes(`<`)?{flow:`backward`,label:t}:e.includes(`>`)?{flow:`forward`,label:t}:{label:t}},`extractFlowFromArrow`),x=t((e,t)=>{if(h(e,t),e.size&&t.setSize(e.size.width,e.size.height),e.evolution){let n=e.evolution.stages.map(e=>e.secondName?`${e.name.trim()} / ${e.secondName.trim()}`:e.name.trim()),r=e.evolution.stages.filter(e=>e.boundary!==void 0).map(e=>e.boundary);t.updateAxes({stages:n,stageBoundaries:r})}if(e.anchors.forEach(e=>{let n=v(e.visibility,e.evolution,`Anchor "${e.name}"`);t.addNode(e.name,e.name,n.x,n.y,`anchor`)}),e.components.forEach(e=>{let n=v(e.visibility,e.evolution,`Component "${e.name}"`),r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,i=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,a=e.decorator?.strategy;t.addNode(e.name,e.name,n.x,n.y,`component`,r,i,e.inertia,a)}),e.notes.forEach(e=>{let n=v(e.visibility,e.evolution,`Note "${e.text}"`);t.addNote(e.text,n.x,n.y)}),e.pipelines.forEach(e=>{let n=t.getNode(e.parent);if(!n||typeof n.y!=`number`)throw Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);let r=n.y;t.startPipeline(e.parent),e.components.forEach(n=>{let i=`${e.parent}_${n.name}`,a=n.label?(n.label.negX?-1:1)*n.label.offsetX:void 0,o=n.label?(n.label.negY?-1:1)*n.label.offsetY:void 0,s=_(n.evolution,`Pipeline component "${n.name}" evolution`);t.addNode(i,n.name,s,r,`pipeline-component`,a,o),t.addPipelineComponent(e.parent,i)})}),e.links.forEach(e=>{let n=!!e.arrow&&(e.arrow.includes(`-.->`)||e.arrow.includes(`.-.`)),r=y(e.fromPort)??y(e.toPort),{flow:i,label:a}=b(e.arrow);!r&&i&&(r=i);let o=e.linkLabel,s=a??o;t.addLink(t.resolveNodeId(e.from),t.resolveNodeId(e.to),n,s,r)}),e.evolves.forEach(e=>{let n=t.getNode(e.component);if(n?.y!==void 0){let r=_(e.target,`Evolve target for "${e.component}"`);t.addTrend(e.component,r,n.y)}}),e.annotations.length>0){let n=e.annotations[0],r=v(n.x,n.y,`Annotations box`);t.setAnnotationsBox(r.x,r.y)}e.annotation.forEach(e=>{let n=v(e.x,e.y,`Annotation ${e.number}`);t.addAnnotation(e.number,[{x:n.x,y:n.y}],e.text)}),e.accelerators.forEach(e=>{let n=v(e.x,e.y,`Accelerator "${e.name}"`);t.addAccelerator(e.name,n.x,n.y)}),e.deaccelerators.forEach(e=>{let n=v(e.x,e.y,`Deaccelerator "${e.name}"`);t.addDeaccelerator(e.name,n.x,n.y)})},`populateDb`),S={parser:{yy:void 0},parse:t(async t=>{let r=await e(`wardley`,t);n.debug(r);let i=S.parser?.yy;if(!i||typeof i.addNode!=`function`)throw 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.`);x(r,i)},`parse`)},C=new 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{t(this,`WardleyBuilder`)}addNode(e){let t=this.nodes.get(e.id)??{id:e.id,label:e.label},n={...t,...e,className:e.className??t.className,labelOffsetX:e.labelOffsetX??t.labelOffsetX,labelOffsetY:e.labelOffsetY??t.labelOffsetY};this.nodes.set(e.id,n)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});let t=this.nodes.get(e);t&&(t.isPipelineParent=!0)}addPipelineComponent(e,t){let n=this.pipelines.get(e);n&&n.componentIds.push(t);let r=this.nodes.get(t);r&&(r.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,t){this.annotationsBox={x:e,y:t}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,t){this.size={width:e,height:t}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(let[t,n]of this.nodes)if(n.label===e)return t;return e}build(){let e=[];for(let t of this.nodes.values()){if(typeof t.x!=`number`||typeof t.y!=`number`)throw Error(`Node "${t.label}" is missing coordinates`);e.push(t)}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}};function w(){return f()[`wardley-beta`]}t(w,`getConfig`);function T(e,t,n,r,i,a,o,s,c){C.addNode({id:e,label:t,x:n,y:r,className:i,labelOffsetX:a,labelOffsetY:o,inertia:s,sourceStrategy:c})}t(T,`addNode`);function E(e,t,n=!1,r,i){C.addLink({source:e,target:t,dashed:n,label:r,flow:i})}t(E,`addLink`);function D(e,t,n){C.addTrend({nodeId:e,targetX:t,targetY:n})}t(D,`addTrend`);function O(e,t,n){C.addAnnotation({number:e,coordinates:t,text:n})}t(O,`addAnnotation`);function k(e,t,n){C.addNote({text:e,x:t,y:n})}t(k,`addNote`);function A(e,t,n){C.addAccelerator({name:e,x:t,y:n})}t(A,`addAccelerator`);function j(e,t,n){C.addDeaccelerator({name:e,x:t,y:n})}t(j,`addDeaccelerator`);function M(e,t){C.setAnnotationsBox(e,t)}t(M,`setAnnotationsBox`);function N(e,t){C.setSize(e,t)}t(N,`setSize`);function P(e){C.startPipeline(e)}t(P,`startPipeline`);function F(e,t){C.addPipelineComponent(e,t)}t(F,`addPipelineComponent`);function I(e){C.setAxes(e)}t(I,`updateAxes`);function L(e){return C.getNode(e)}t(L,`getNode`);function R(e){return C.resolveNodeId(e)}t(R,`resolveNodeId`);function z(){return C.build()}t(z,`getWardleyData`);function B(){C.clear(),s()}t(B,`clear`);var V={getConfig:w,addNode:T,addLink:E,addTrend:D,addAnnotation:O,addNote:k,addAccelerator:A,addDeaccelerator:j,setAnnotationsBox:M,setSize:N,startPipeline:P,addPipelineComponent:F,updateAxes:I,getNode:L,resolveNodeId:R,getWardleyData:z,clear:B,setAccTitle:o,getAccTitle:p,setDiagramTitle:a,getDiagramTitle:d,getAccDescription:u,setAccDescription:i},H=[`Genesis`,`Custom Built`,`Product`,`Commodity`],U=t(()=>{let{themeVariables:e}=f();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`),W=t(()=>{let e=f()[`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`),G={parser:S,db:V,renderer:{draw:t((e,r,i,a)=>{n.debug(`Rendering Wardley map
2
2
  `+e);let o=W(),s=U(),c=o.nodeRadius*1.6,u=a.db,d=u.getWardleyData(),f=u.getDiagramTitle(),p=d.size?.width??o.width,h=d.size?.height??o.height,g=m(r);g.selectAll(`*`).remove(),l(g,h,p,o.useMaxWidth),g.attr(`viewBox`,`0 0 ${p} ${h}`);let _=g.append(`g`).attr(`class`,`wardley-map`),v=g.append(`defs`);v.append(`marker`).attr(`id`,`arrow-${r}`).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`,s.evolutionStroke).attr(`stroke`,`none`),v.append(`marker`).attr(`id`,`link-arrow-end-${r}`).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`,s.linkStroke).attr(`stroke`,`none`),v.append(`marker`).attr(`id`,`link-arrow-start-${r}`).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`,s.linkStroke).attr(`stroke`,`none`),_.append(`rect`).attr(`class`,`wardley-background`).attr(`width`,p).attr(`height`,h).attr(`fill`,s.backgroundColor);let y=p-o.padding*2,b=h-o.padding*2;f&&_.append(`text`).attr(`class`,`wardley-title`).attr(`x`,p/2).attr(`y`,o.padding/2).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize*1.05).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(f);let x=t(e=>o.padding+e/100*y,`projectX`),S=t(e=>h-o.padding-e/100*b,`projectY`),C=_.append(`g`).attr(`class`,`wardley-axes`);C.append(`line`).attr(`x1`,o.padding).attr(`x2`,p-o.padding).attr(`y1`,h-o.padding).attr(`y2`,h-o.padding).attr(`stroke`,s.axisColor).attr(`stroke-width`,1),C.append(`line`).attr(`x1`,o.padding).attr(`x2`,o.padding).attr(`y1`,o.padding).attr(`y2`,h-o.padding).attr(`stroke`,s.axisColor).attr(`stroke-width`,1);let w=d.axes.xLabel??`Evolution`,T=d.axes.yLabel??`Visibility`;C.append(`text`).attr(`class`,`wardley-axis-label wardley-axis-label-x`).attr(`x`,o.padding+y/2).attr(`y`,h-o.padding/4).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).text(w),C.append(`text`).attr(`class`,`wardley-axis-label wardley-axis-label-y`).attr(`x`,o.padding/3).attr(`y`,o.padding+b/2).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`transform`,`rotate(-90 ${o.padding/3} ${o.padding+b/2})`).text(T);let E=d.axes.stages&&d.axes.stages.length>0?d.axes.stages:H;if(E.length>0){let e=_.append(`g`).attr(`class`,`wardley-stages`),t=d.axes.stageBoundaries,n=[];if(t&&t.length===E.length){let e=0;t.forEach(t=>{n.push({start:e,end:t}),e=t})}else{let e=1/E.length;E.forEach((t,r)=>{n.push({start:r*e,end:(r+1)*e})})}E.forEach((t,r)=>{let i=n[r],a=o.padding+i.start*y,c=(a+(o.padding+i.end*y))/2;r>0&&e.append(`line`).attr(`x1`,a).attr(`x2`,a).attr(`y1`,o.padding).attr(`y2`,h-o.padding).attr(`stroke`,`#000`).attr(`stroke-width`,1).attr(`stroke-dasharray`,`5 5`).attr(`opacity`,.8),e.append(`text`).attr(`class`,`wardley-stage-label`).attr(`x`,c).attr(`y`,h-o.padding/1.5).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize-2).attr(`text-anchor`,`middle`).text(t)})}if(o.showGrid){let e=_.append(`g`).attr(`class`,`wardley-grid`);for(let t=1;t<4;t++){let n=t/4,r=o.padding+y*n;e.append(`line`).attr(`x1`,r).attr(`x2`,r).attr(`y1`,o.padding).attr(`y2`,h-o.padding).attr(`stroke`,s.gridColor).attr(`stroke-dasharray`,`2 6`),e.append(`line`).attr(`x1`,o.padding).attr(`x2`,p-o.padding).attr(`y1`,h-o.padding-b*n).attr(`y2`,h-o.padding-b*n).attr(`stroke`,s.gridColor).attr(`stroke-dasharray`,`2 6`)}}let D=new Map;if(d.nodes.forEach(e=>{D.set(e.id,{x:x(e.x),y:S(e.y),node:e})}),d.pipelines.length>0){let e=_.append(`g`).attr(`class`,`wardley-pipelines`),t=_.append(`g`).attr(`class`,`wardley-pipeline-links`);d.pipelines.forEach(n=>{if(n.componentIds.length===0)return;let r=n.componentIds.map(e=>({id:e,pos:D.get(e),node:d.nodes.find(t=>t.id===e)})).filter(e=>e.pos&&e.node).sort((e,t)=>e.node.x-t.node.x);for(let e=0;e<r.length-1;e++){let n=r[e],i=r[e+1];t.append(`line`).attr(`class`,`wardley-pipeline-evolution-link`).attr(`x1`,n.pos.x).attr(`y1`,n.pos.y).attr(`x2`,i.pos.x).attr(`y2`,i.pos.y).attr(`stroke`,s.linkStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,`4 4`)}let i=1/0,a=-1/0,l=0;if(n.componentIds.forEach(e=>{let t=D.get(e);t&&(i=Math.min(i,t.x),a=Math.max(a,t.x),l=t.y)}),i!==1/0&&a!==-1/0){let t=o.nodeRadius*4,r=l-t/2,u=D.get(n.nodeId);u&&(u.x=(i+a)/2,u.y=r-c/6),e.append(`rect`).attr(`class`,`wardley-pipeline-box`).attr(`x`,i-15).attr(`y`,r).attr(`width`,a-i+30).attr(`height`,t).attr(`fill`,`none`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}})}let O=_.append(`g`).attr(`class`,`wardley-links`),k=new Map;d.pipelines.forEach(e=>{k.set(e.nodeId,new Set(e.componentIds))});let A=d.links.filter(e=>!(!D.has(e.source)||!D.has(e.target)||k.get(e.target)?.has(e.source)));O.selectAll(`line`).data(A).enter().append(`line`).attr(`class`,e=>`wardley-link${e.dashed?` wardley-link--dashed`:``}`).attr(`x1`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.source).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,i=n.x-t.x,a=n.y-t.y,s=Math.sqrt(i*i+a*a);return t.x+i/s*r}).attr(`y1`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.source).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,i=n.x-t.x,a=n.y-t.y,s=Math.sqrt(i*i+a*a);return t.y+a/s*r}).attr(`x2`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.target).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,i=t.x-n.x,a=t.y-n.y,s=Math.sqrt(i*i+a*a);return n.x+i/s*r}).attr(`y2`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.target).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,i=t.x-n.x,a=t.y-n.y,s=Math.sqrt(i*i+a*a);return n.y+a/s*r}).attr(`stroke`,s.linkStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,e=>e.dashed?`6 6`:null).attr(`marker-end`,e=>e.flow===`forward`||e.flow===`bidirectional`?`url(#link-arrow-end-${r})`:null).attr(`marker-start`,e=>e.flow===`backward`||e.flow===`bidirectional`?`url(#link-arrow-start-${r})`:null),O.selectAll(`text`).data(A.filter(e=>e.label)).enter().append(`text`).attr(`class`,`wardley-link-label`).attr(`x`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.x+n.x)/2,i=n.y-t.y,a=n.x-t.x;return r+i/Math.sqrt(a*a+i*i)*8}).attr(`y`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.y+n.y)/2,i=n.x-t.x,a=n.y-t.y,o=Math.sqrt(i*i+a*a);return r+-i/o*8}).attr(`fill`,s.axisTextColor).attr(`font-size`,o.labelFontSize).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).attr(`transform`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.x+n.x)/2,i=(t.y+n.y)/2,a=n.x-t.x,o=n.y-t.y,s=Math.sqrt(a*a+o*o),c=o/s,l=-a/s,u=r+c*8,d=i+l*8,f=Math.atan2(o,a)*180/Math.PI;return(f>90||f<-90)&&(f+=180),`rotate(${f} ${u} ${d})`}).text(e=>e.label);let j=_.append(`g`).attr(`class`,`wardley-trends`),M=d.trends.map(e=>{let t=D.get(e.nodeId);if(!t)return null;let n=x(e.targetX),r=S(e.targetY),i=n-t.x,a=r-t.y,s=Math.sqrt(i*i+a*a),c=o.nodeRadius+2;return{origin:t,targetX:n,targetY:r,adjustedX2:s>c?n-i/s*c:n,adjustedY2:s>c?r-a/s*c:r}}).filter(e=>e!==null);j.selectAll(`line`).data(M).enter().append(`line`).attr(`class`,`wardley-trend`).attr(`x1`,e=>e.origin.x).attr(`y1`,e=>e.origin.y).attr(`x2`,e=>e.adjustedX2).attr(`y2`,e=>e.adjustedY2).attr(`stroke`,s.evolutionStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,`4 4`).attr(`marker-end`,`url(#arrow-${r})`);let N=_.append(`g`).attr(`class`,`wardley-nodes`).selectAll(`g`).data(d.nodes).enter().append(`g`).attr(`class`,e=>[`wardley-node`,e.className?`wardley-node--${e.className}`:``].filter(Boolean).join(` `));N.filter(e=>e.sourceStrategy===`outsource`).append(`circle`).attr(`class`,`wardley-outsource-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#666`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.sourceStrategy===`buy`).append(`circle`).attr(`class`,`wardley-buy-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#ccc`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.sourceStrategy===`build`).append(`circle`).attr(`class`,`wardley-build-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#eee`).attr(`stroke`,`#000`).attr(`stroke-width`,1);let P=N.filter(e=>e.sourceStrategy===`market`);P.append(`circle`).attr(`class`,`wardley-market-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>!e.isPipelineParent&&e.sourceStrategy!==`market`&&e.className!==`anchor`).append(`circle`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius).attr(`fill`,s.componentFill).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1);let F=o.nodeRadius*.7,I=o.nodeRadius*1.2;if(P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x).attr(`y1`,e=>D.get(e.id).y-I).attr(`x2`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`y2`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`y1`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`x2`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`y2`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`y1`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`x2`,e=>D.get(e.id).x).attr(`y2`,e=>D.get(e.id).y-I).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y-I).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`cy`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`cy`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),N.filter(e=>e.isPipelineParent===!0).append(`rect`).attr(`x`,e=>D.get(e.id).x-c/2).attr(`y`,e=>D.get(e.id).y-c/2).attr(`width`,c).attr(`height`,c).attr(`fill`,s.componentFill).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.inertia===!0).append(`line`).attr(`class`,`wardley-inertia`).attr(`x1`,e=>{let t=D.get(e.id),n=e.isPipelineParent?c/2+15:o.nodeRadius+15;return e.sourceStrategy&&(n+=o.nodeRadius+10),t.x+n}).attr(`y1`,e=>{let t=D.get(e.id),n=e.isPipelineParent?c:o.nodeRadius*2;return t.y-n/2}).attr(`x2`,e=>{let t=D.get(e.id),n=e.isPipelineParent?c/2+15:o.nodeRadius+15;return e.sourceStrategy&&(n+=o.nodeRadius+10),t.x+n}).attr(`y2`,e=>{let t=D.get(e.id),n=e.isPipelineParent?c:o.nodeRadius*2;return t.y+n/2}).attr(`stroke`,s.componentStroke).attr(`stroke-width`,6),N.append(`text`).attr(`x`,e=>{let t=D.get(e.id);if(e.className===`anchor`)return e.labelOffsetX===void 0?t.x:t.x+e.labelOffsetX;let n=o.nodeLabelOffset;e.sourceStrategy&&e.labelOffsetX===void 0&&(n+=10);let r=e.labelOffsetX??n;return t.x+r}).attr(`y`,e=>{let t=D.get(e.id);if(e.className===`anchor`)return e.labelOffsetY===void 0?t.y-3:t.y+e.labelOffsetY;let n=-o.nodeLabelOffset;e.sourceStrategy&&e.labelOffsetY===void 0&&(n-=10);let r=e.labelOffsetY??n;return t.y+r}).attr(`class`,`wardley-node-label`).attr(`fill`,e=>e.className===`evolved`?s.evolutionStroke:e.className===`anchor`?`#000`:s.componentLabelColor).attr(`font-size`,o.labelFontSize).attr(`font-weight`,e=>e.className===`anchor`?`bold`:`normal`).attr(`text-anchor`,e=>e.className===`anchor`?`middle`:`start`).attr(`dominant-baseline`,e=>e.className===`anchor`?`middle`:`auto`).text(e=>e.label),d.annotations.length>0){let e=_.append(`g`).attr(`class`,`wardley-annotations`);if(d.annotations.forEach(t=>{let n=t.coordinates.map(e=>({x:x(e.x),y:S(e.y)}));if(n.length>1)for(let t=0;t<n.length-1;t++)e.append(`line`).attr(`class`,`wardley-annotation-line`).attr(`x1`,n[t].x).attr(`y1`,n[t].y).attr(`x2`,n[t+1].x).attr(`y2`,n[t+1].y).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5).attr(`stroke-dasharray`,`4 4`);n.forEach(n=>{let r=e.append(`g`).attr(`class`,`wardley-annotation`);r.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,10).attr(`fill`,`white`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5),r.append(`text`).attr(`x`,n.x).attr(`y`,n.y).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`central`).attr(`font-size`,10).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.number)})}),d.annotationsBox){let t=x(d.annotationsBox.x),n=S(d.annotationsBox.y),r=e.append(`g`).attr(`class`,`wardley-annotations-box`),i=[...d.annotations].filter(e=>e.text).sort((e,t)=>e.number-t.number),a=[];if(i.forEach((e,i)=>{let o=r.append(`text`).attr(`x`,t+10).attr(`y`,n+10+(i+1)*16).attr(`font-size`,11).attr(`fill`,s.axisTextColor).attr(`text-anchor`,`start`).attr(`dominant-baseline`,`middle`).text(`${e.number}. ${e.text}`);a.push(o)}),a.length>0){let e=0,c=0;a.forEach(t=>{let n=t.node(),r=n.getComputedTextLength();e=Math.max(e,r);let i=n.getBBox();c=Math.max(c,i.height)});let l=e+20+105,u=i.length*16+20+c/2,d=o.padding,f=p-o.padding-l,m=o.padding,g=h-o.padding-u;t=Math.max(d,Math.min(t,f)),n=Math.max(m,Math.min(n,g)),a.forEach((e,r)=>{e.attr(`x`,t+10).attr(`y`,n+10+(r+1)*16)}),r.insert(`rect`,`text`).attr(`x`,t).attr(`y`,n).attr(`width`,l).attr(`height`,u).attr(`fill`,`white`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}}}if(d.notes.length>0){let e=_.append(`g`).attr(`class`,`wardley-notes`);d.notes.forEach(t=>{let n=x(t.x),r=S(t.y);e.append(`text`).attr(`x`,n).attr(`y`,r).attr(`text-anchor`,`start`).attr(`font-size`,11).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.text)})}if(d.accelerators.length>0){let e=_.append(`g`).attr(`class`,`wardley-accelerators`);d.accelerators.forEach(t=>{let n=x(t.x),r=S(t.y),i=`
3
3
  M ${n} ${r-30/2}
4
4
  L ${n+60-20} ${r-30/2}
@@ -17,7 +17,7 @@ import{t as e}from"./mermaid-parser.core-Fbhy6q19.js";import{n as t,r as n}from"
17
17
  L ${n+20} ${r+30/2}
18
18
  L ${n+60} ${r+30/2}
19
19
  Z
20
- `;e.append(`path`).attr(`d`,i).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),e.append(`text`).attr(`x`,n+60/2).attr(`y`,r+30/2+15).attr(`text-anchor`,`middle`).attr(`font-size`,10).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.name)})}},`draw`)},styles:t(({wardley:e}={})=>{let t=h(h(r(),c().themeVariables).wardley,e);return`
20
+ `;e.append(`path`).attr(`d`,i).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),e.append(`text`).attr(`x`,n+60/2).attr(`y`,r+30/2+15).attr(`text-anchor`,`middle`).attr(`font-size`,10).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.name)})}},`draw`)},styles:t(({wardley:e}={})=>{let t=g(g(r(),c().themeVariables).wardley,e);return`
21
21
  .wardley-background {
22
22
  fill: ${t.backgroundColor};
23
23
  }
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-CMxvf4Kt.js";import{t}from"./java-DKFHmTAg.js";var n=e({default:()=>i}),r=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"]}`)),i=[...t,r];export{n,i as t};
1
+ import{r as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./java-DJul3uN_.js";var n=e({default:()=>i}),r=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"]}`)),i=[...t,r];export{n,i as t};
@@ -1 +1 @@
1
- import{t as e}from"./xml-BS2GSQw_.js";var t=Object.freeze(JSON.parse(`{"displayName":"XSL","name":"xsl","patterns":[{"begin":"(<)(xsl)((:))(template)","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.template","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":" (?:([-0-9A-Z_a-z]+)((:)))?([-A-Za-z]+)"},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},{"include":"text.xml"}],"repository":{"doublequotedString":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.double.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"}},"scopeName":"text.xml.xsl","embeddedLangs":["xml"]}`)),n=[...e,t];export{n as default};
1
+ import{t as e}from"./xml-DzUK0Pry.js";var t=Object.freeze(JSON.parse(`{"displayName":"XSL","name":"xsl","patterns":[{"begin":"(<)(xsl)((:))(template)","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.template","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":" (?:([-0-9A-Z_a-z]+)((:)))?([-A-Za-z]+)"},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},{"include":"text.xml"}],"repository":{"doublequotedString":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.double.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"}},"scopeName":"text.xml.xsl","embeddedLangs":["xml"]}`)),n=[...e,t];export{n as default};
@@ -0,0 +1,7 @@
1
+ import{dn as e,ot as t,rt as n}from"./vendor-charts-DVOdzzh2.js";import{n as r}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as i}from"./src-6rOMKMLU.js";import{D as a,H as o,K as s,U as c,a as l,b as u,c as d,f,v as p,w as m,y as h,z as g}from"./chunk-WYO6CB5R-BBbafnWJ.js";import{t as _}from"./chunk-VAUOI2AC-Bgyec1On.js";import"./chunk-HOUHSVGY-BjQmUg1D.js";import{i as v}from"./chunk-ICXQ74PX-DGFLQjwm.js";import{t as y}from"./chunk-Q4XR5HBZ-o24M5lkF.js";var b=(function(){var e=r(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,10,12,14,16,18,19,21,23],n=[2,6],i=[1,3],a=[1,5],o=[1,6],s=[1,7],c=[1,5,10,12,14,16,18,19,21,23,36,37,38],l=[1,25],u=[1,26],d=[1,28],f=[1,29],p=[1,30],m=[1,31],h=[1,32],g=[1,33],_=[1,34],v=[1,35],y=[1,36],b=[1,37],x=[1,43],S=[1,42],C=[1,47],w=[1,50],T=[1,10,12,14,16,18,19,21,23,36,37,38],E=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],D=[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],O=[1,65],k=[26,28],A={trace:r(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:r(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.setOrientation(a[s]);break;case 9:r.setDiagramTitle(a[s].text.trim());break;case 12:r.setLineData({text:``,type:`text`},a[s]);break;case 13:r.setLineData(a[s-1],a[s]);break;case 14:r.setBarData({text:``,type:`text`},a[s]);break;case 15:r.setBarData(a[s-1],a[s]);break;case 16:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 19:this.$=a[s-1];break;case 20:case 30:this.$=[a[s-2],...a[s]];break;case 21:case 31:this.$=[a[s]];break;case 22:this.$={value:Number(a[s-1]),label:a[s]};break;case 23:this.$={value:Number(a[s]),label:``};break;case 24:r.setXAxisTitle(a[s]);break;case 25:r.setXAxisTitle(a[s-1]);break;case 26:r.setXAxisTitle({type:`text`,text:``});break;case 27:r.setXAxisBand(a[s]);break;case 28:r.setXAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 29:this.$=a[s-1];break;case 32:r.setYAxisTitle(a[s]);break;case 33:r.setYAxisTitle(a[s-1]);break;case 34:r.setYAxisTitle({type:`text`,text:``});break;case 35:r.setYAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 39:this.$={text:a[s],type:`text`};break;case 40:this.$={text:a[s],type:`text`};break;case 41:this.$={text:a[s],type:`markdown`};break;case 42:this.$=a[s];break;case 43:this.$=a[s-1]+``+a[s];break}},`anonymous`),table:[e(t,n,{3:1,4:2,7:4,5:i,36:a,37:o,38:s}),{1:[3]},e(t,n,{4:2,7:4,3:8,5:i,36:a,37:o,38:s}),e(t,n,{4:2,7:4,6:9,3:10,5:i,8:[1,11],36:a,37:o,38:s}),{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(c,[2,36]),e(c,[2,37]),e(c,[2,38]),{1:[2,1]},e(t,n,{4:2,7:4,3:21,5:i,36:a,37:o,38:s}),{1:[2,3]},e(c,[2,5]),e(t,[2,7],{4:22,36:a,37:o,38:s}),{11:23,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:39,13:38,24:x,29:S,30:l,31:40,32:41,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:45,15:44,29:C,30:l,35:46,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:49,17:48,24:w,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{11:52,17:51,24:w,30:l,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},{20:[1,53]},{22:[1,54]},e(T,[2,18]),{1:[2,2]},e(T,[2,8]),e(T,[2,9]),e(E,[2,39],{41:55,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b}),e(E,[2,40]),e(E,[2,41]),e(D,[2,42]),e(D,[2,44]),e(D,[2,45]),e(D,[2,46]),e(D,[2,47]),e(D,[2,48]),e(D,[2,49]),e(D,[2,50]),e(D,[2,51]),e(D,[2,52]),e(D,[2,53]),e(T,[2,10]),e(T,[2,24],{32:41,31:56,24:x,29:S}),e(T,[2,26]),e(T,[2,27]),{33:[1,57]},{11:59,30:l,34:58,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},e(T,[2,11]),e(T,[2,32],{35:60,29:C}),e(T,[2,34]),{33:[1,61]},e(T,[2,12]),{17:62,24:w},{25:63,27:64,29:O},e(T,[2,14]),{17:66,24:w},e(T,[2,16]),e(T,[2,17]),e(D,[2,43]),e(T,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(T,[2,33]),{29:[1,70]},e(T,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(k,[2,23],{30:[1,73]}),e(T,[2,15]),e(T,[2,28]),e(T,[2,29]),{11:59,30:l,34:74,39:24,40:u,41:27,42:d,43:f,44:p,45:m,46:h,47:g,48:_,49:v,50:y,51:b},e(T,[2,35]),e(T,[2,19]),{25:75,27:64,29:O},e(k,[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:r(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:r(function(e){var t=this,n=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,a.length-=e,o.length-=e}r(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}r(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
+ `+h.showPosition()+`
3
+ Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),a.push(h.yytext),o.push(h.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};A.lexer=(function(){return{EOF:1,parseError:r(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:r(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={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:r(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:r(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=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),n.length-1&&(this.yylineno-=n.length-1);var i=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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:r(function(){return this._more=!0,this},`more`),reject:r(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:r(function(e){this.unput(this.match.slice(e))},`less`),pastInput:r(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:r(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:r(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
5
+ `+t+`^`},`showPosition`),test_match:r(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:r(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!1:e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:r(function(){return this.next()||this.lex()},`lex`),begin:r(function(e){this.conditionStack.push(e)},`begin`),popState:r(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules: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`),topState:r(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:r(function(e){this.begin(e)},`pushState`),stateStackSize:r(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:r(function(e,t,n,r){switch(n){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}}}})();function j(){this.yy={}}return r(j,`Parser`),j.prototype=A,A.Parser=j,new j})();b.parser=b;var x=b;function S(e){return e.type===`bar`}r(S,`isBarPlot`);function C(e){return e.type===`band`}r(C,`isBandAxisData`);function w(e){return e.type===`linear`}r(w,`isLinearAxisData`);var T=class{constructor(e){this.parentGroup=e}static{r(this,`TextDimensionCalculatorWithFont`)}getMaxDimension(e,t){if(!this.parentGroup)return{width:e.reduce((e,t)=>Math.max(t.length,e),0)*t,height:t};let n={width:0,height:0},r=this.parentGroup.append(`g`).attr(`visibility`,`hidden`).attr(`font-size`,t);for(let i of e){let e=y(r,1,i),a=e?e.width:i.length*t,o=e?e.height:t;n.width=Math.max(n.width,a),n.height=Math.max(n.height,o)}return r.remove(),n}},E=.7,D=.2,O=class{constructor(e,t,n,r){this.axisConfig=e,this.title=t,this.textDimensionCalculator=n,this.axisThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition=`left`,this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition=`left`,this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{r(this,`BaseAxis`)}setRange(e){this.range=e,this.axisPosition===`left`||this.axisPosition===`right`?this.boundingRect.height=e[1]-e[0]:this.boundingRect.width=e[1]-e[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(e=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){E*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(E*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let t=e.height;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),r=D*e.width;this.outerPadding=Math.min(n.width/2,r);let i=n.height;this.axisPosition===`bottom`&&this.normalizedLabelRotationInRad!==0&&(i=Math.max(i,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*n.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*n.height))),i+=this.axisConfig.labelPadding*2,this.labelTextHeight=n.height,i<=t&&(t-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,n<=t&&(t-=n,this.showTitle=!0)}this.boundingRect.width=e.width,this.boundingRect.height=e.height-t}calculateSpaceIfDrawnVertical(e){let t=e.width;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),r=D*e.height;this.outerPadding=Math.min(n.height/2,r);let i=n.width+this.axisConfig.labelPadding*2;i<=t&&(t-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,n<=t&&(t-=n,this.showTitle=!0)}this.boundingRect.width=e.width-t,this.boundingRect.height=e.height}calculateSpace(e){return this.axisPosition===`left`||this.axisPosition===`right`?this.calculateSpaceIfDrawnVertical(e):this.calculateSpaceIfDrawnHorizontally(e),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateOffsetByRotation(e){let t=this.normalizedLabelRotationInRad;return t===0?0:Math.sin(t)*this.getLabelDimension()[e]/2}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`left-axis`,`axisl-line`],data:[{path:`M ${t},${this.boundingRect.y} L ${t},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`left-axis`,`label`],data:this.getTickValues().map(e=>({text:e.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(e),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:`middle`,horizontalPos:`right`}))}),this.showTick){let t=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:`path`,groupTexts:[`left-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${t},${this.getScaleValue(e)} L ${t-this.axisConfig.tickLength},${this.getScaleValue(e)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`left-axis`,`title`],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`bottom-axis`,`axis-line`],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`bottom-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e)+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){let t=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:`path`,groupTexts:[`bottom-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t} L ${this.getScaleValue(e)},${t+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`bottom-axis`,`title`],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`top-axis`,`axis-line`],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`top-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),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){let t=this.boundingRect.y;e.push({type:`path`,groupTexts:[`top-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(e)},${t+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`top-axis`,`title`],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}]}),e}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():[]}},k=class extends O{static{r(this,`BandAxis`)}constructor(e,n,r,i,a){super(e,i,a,n),this.categories=r,this.scale=t().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=t().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),i.trace(`BandAxis axis final categories, range: `,this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},A=class extends O{static{r(this,`LinearAxis`)}constructor(e,t,r,i,a){super(e,i,a,t),this.domain=r,this.scale=n().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];this.axisPosition===`left`&&e.reverse(),this.scale=n().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};function j(e,t,n,r){let i=new T(r);return C(e)?new k(t,n,e.categories,e.title,i):new A(t,n,[e.min,e.max],e.title,i)}r(j,`getAxis`);var M=class{constructor(e,t,n,r){this.textDimensionCalculator=e,this.chartConfig=t,this.chartData=n,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{r(this,`ChartTitle`)}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let t=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),n=Math.max(t.width,e.width),r=t.height+2*this.chartConfig.titlePadding;return t.width<=n&&t.height<=r&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=n,this.boundingRect.height=r,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];return this.showChartTitle&&e.push({groupTexts:[`chart-title`],type:`text`,data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:`middle`,horizontalPos:`center`,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),e}};function N(e,t,n,r){return new M(new T(r),e,t,n)}r(N,`getChartTitleComponent`);var ee=class{constructor(e,t,n,r,i){this.plotData=e,this.xAxis=t,this.yAxis=n,this.orientation=r,this.plotIndex=i}static{r(this,`LinePlot`)}getDrawableElement(){let t=this.plotData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),n;if(n=this.orientation===`horizontal`?e().y(e=>e[0]).x(e=>e[1])(t):e().x(e=>e[0]).y(e=>e[1])(t),!n)return[];let r=[{groupTexts:[`plot`,`line-plot-${this.plotIndex}`],type:`path`,data:[{path:n,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let e=[];for(let[n,[r,i]]of t.entries()){let t=this.plotData.pointLabels[n];t&&(this.orientation===`horizontal`?e.push({x:i+10,y:r,text:t,fill:this.plotData.strokeFill,verticalPos:`middle`,horizontalPos:`left`,fontSize:12,rotation:0}):e.push({x:r,y:i-10,text:t,fill:this.plotData.strokeFill,verticalPos:`middle`,horizontalPos:`center`,fontSize:12,rotation:0}))}e.length>0&&r.push({groupTexts:[`plot`,`line-plot-${this.plotIndex}`,`labels`],type:`text`,data:e})}return r}},te=class{constructor(e,t,n,r,i,a){this.barData=e,this.boundingRect=t,this.xAxis=n,this.yAxis=r,this.orientation=i,this.plotIndex=a}static{r(this,`BarPlot`)}getDrawableElement(){let e=this.barData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),t=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*.95,n=t/2;return this.orientation===`horizontal`?[{groupTexts:[`plot`,`bar-plot-${this.plotIndex}`],type:`rect`,data:e.map(e=>({x:this.boundingRect.x,y:e[0]-n,height:t,width:e[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:[`plot`,`bar-plot-${this.plotIndex}`],type:`rect`,data:e.map(e=>({x:e[0]-n,y:e[1],width:t,height:this.boundingRect.y+this.boundingRect.height-e[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},ne=class{constructor(e,t,n){this.chartConfig=e,this.chartData=t,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0}}static{r(this,`BasePlot`)}setAxes(e,t){this.xAxis=e,this.yAxis=t}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error(`Axes must be passed to render Plots`);let e=[];for(let[t,n]of this.chartData.plots.entries())switch(n.type){case`line`:{let r=new ee(n,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...r.getDrawableElement())}break;case`bar`:{let r=new te(n,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...r.getDrawableElement())}break}return e}};function re(e,t,n){return new ne(e,t,n)}r(re,`getPlotComponent`);var ie=class{constructor(e,t,n,r){this.chartConfig=e,this.chartData=t,this.componentStore={title:N(e,t,n,r),plot:re(e,t,n),xAxis:j(t.xAxis,e.xAxis,{titleColor:n.xAxisTitleColor,labelColor:n.xAxisLabelColor,tickColor:n.xAxisTickColor,axisLineColor:n.xAxisLineColor},r),yAxis:j(t.yAxis,e.yAxis,{titleColor:n.yAxisTitleColor,labelColor:n.yAxisLabelColor,tickColor:n.yAxisTickColor,axisLineColor:n.yAxisLineColor},r)}}static{r(this,`Orchestrator`)}calculateVerticalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,n=0,r=0,i=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:i,height:a});e-=o.width,t-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),r=o.height,t-=o.height,this.componentStore.xAxis.setAxisPosition(`bottom`),o=this.componentStore.xAxis.calculateSpace({width:e,height:t}),t-=o.height,this.componentStore.yAxis.setAxisPosition(`left`),o=this.componentStore.yAxis.calculateSpace({width:e,height:t}),n=o.width,e-=o.width,e>0&&(i+=e,e=0),t>0&&(a+=t,t=0),this.componentStore.plot.calculateSpace({width:i,height:a}),this.componentStore.plot.setBoundingBoxXY({x:n,y:r}),this.componentStore.xAxis.setRange([n,n+i]),this.componentStore.xAxis.setBoundingBoxXY({x:n,y:r+a}),this.componentStore.yAxis.setRange([r,r+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:r}),this.chartData.plots.some(e=>S(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,n=0,r=0,i=0,a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:a,height:o});e-=s.width,t-=s.height,s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),n=s.height,t-=s.height,this.componentStore.xAxis.setAxisPosition(`left`),s=this.componentStore.xAxis.calculateSpace({width:e,height:t}),e-=s.width,r=s.width,this.componentStore.yAxis.setAxisPosition(`top`),s=this.componentStore.yAxis.calculateSpace({width:e,height:t}),t-=s.height,i=n+s.height,e>0&&(a+=e,e=0),t>0&&(o+=t,t=0),this.componentStore.plot.calculateSpace({width:a,height:o}),this.componentStore.plot.setBoundingBoxXY({x:r,y:i}),this.componentStore.yAxis.setRange([r,r+a]),this.componentStore.yAxis.setBoundingBoxXY({x:r,y:n}),this.componentStore.xAxis.setRange([i,i+o]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(e=>S(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation===`horizontal`?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let t of Object.values(this.componentStore))e.push(...t.getDrawableElements());return e}},ae=class{static{r(this,`XYChartBuilder`)}static build(e,t,n,r){return new ie(e,t,n,r).getDrawableElement()}},P=0,F,I=U(),L=H(),R=W(),z=L.plotColorPalette.split(`,`).map(e=>e.trim()),B=!1,V=!1;function H(){let e=a(),t=u();return v(e.xyChart,t.themeVariables.xyChart)}r(H,`getChartDefaultThemeConfig`);function U(){let e=u();return v(f.xyChart,e.xyChart)}r(U,`getChartDefaultConfig`);function W(){return{yAxis:{type:`linear`,title:``,min:1/0,max:-1/0},xAxis:{type:`band`,title:``,categories:[]},title:``,plots:[]}}r(W,`getChartDefaultData`);function G(e){let t=u();return g(e.trim(),t)}r(G,`textSanitizer`);function K(e){F=e}r(K,`setTmpSVGG`);function q(e){e===`horizontal`?I.chartOrientation=`horizontal`:I.chartOrientation=`vertical`}r(q,`setOrientation`);function J(e){R.xAxis.title=G(e.text)}r(J,`setXAxisTitle`);function Y(e,t){R.xAxis={type:`linear`,title:R.xAxis.title,min:e,max:t},B=!0}r(Y,`setXAxisRangeData`);function X(e){R.xAxis={type:`band`,title:R.xAxis.title,categories:e.map(e=>G(e.text))},B=!0}r(X,`setXAxisBand`);function oe(e){R.yAxis.title=G(e.text)}r(oe,`setYAxisTitle`);function se(e,t){R.yAxis={type:`linear`,title:R.yAxis.title,min:e,max:t},V=!0}r(se,`setYAxisRangeData`);function ce(e){let t=Math.min(...e),n=Math.max(...e),r=w(R.yAxis)?R.yAxis.min:1/0,i=w(R.yAxis)?R.yAxis.max:-1/0;R.yAxis={type:`linear`,title:R.yAxis.title,min:Math.min(r,t),max:Math.max(i,n)}}r(ce,`setYAxisRangeFromPlotData`);function Z(e){let t=[];if(e.length===0)return t;if(!B){let t=w(R.xAxis)?R.xAxis.min:1/0,n=w(R.xAxis)?R.xAxis.max:-1/0;Y(Math.min(t,1),Math.max(n,e.length))}if(C(R.xAxis)&&e.length>R.xAxis.categories.length&&(e=e.slice(0,R.xAxis.categories.length)),V||ce(e),C(R.xAxis)&&(t=R.xAxis.categories.map((t,n)=>[t,e[n]])),w(R.xAxis)){let n=R.xAxis.min,r=R.xAxis.max,i=(r-n)/(e.length-1),a=[];for(let e=n;e<=r;e+=i)a.push(`${e}`);t=a.map((t,n)=>[t,e[n]])}return t}r(Z,`transformDataWithoutCategory`);function Q(e){return z[e===0?0:e%z.length]}r(Q,`getPlotColorFromPalette`);function le(e,t){let n=t.map(e=>e.value),r=t.map(e=>e.label?G(e.label):``),i=Z(n),a=r.some(e=>e!==``);R.plots.push({type:`line`,strokeFill:Q(P),strokeWidth:2,data:i,...a?{pointLabels:r}:{}}),P++}r(le,`setLineData`);function $(e,t){let n=Z(t.map(e=>e.value));R.plots.push({type:`bar`,fill:Q(P),data:n}),P++}r($,`setBarData`);function ue(){if(R.plots.length===0)throw Error(`No Plot to render, please provide a plot with some data`);return R.title=m(),ae.build(I,R,L,F)}r(ue,`getDrawableElem`);function de(){return L}r(de,`getChartThemeConfig`);function fe(){return I}r(fe,`getChartConfig`);function pe(){return R}r(pe,`getXYChartData`);var me={parser:x,db:{getDrawableElem:ue,clear:r(function(){l(),P=0,I=U(),R=W(),L=H(),z=L.plotColorPalette.split(`,`).map(e=>e.trim()),B=!1,V=!1},`clear`),setAccTitle:c,getAccTitle:h,setDiagramTitle:s,getDiagramTitle:m,getAccDescription:p,setAccDescription:o,setOrientation:q,setXAxisTitle:J,setXAxisRangeData:Y,setXAxisBand:X,setYAxisTitle:oe,setYAxisRangeData:se,setLineData:le,setBarData:$,setTmpSVGG:K,getChartThemeConfig:de,getChartConfig:fe,getXYChartData:pe},renderer:{draw:r((e,t,n,a)=>{let o=a.db,s=o.getChartThemeConfig(),c=o.getChartConfig(),l=o.getXYChartData().plots[0].data.map(e=>e[1]);function u(e){return e===`top`?`text-before-edge`:`middle`}r(u,`getDominantBaseLine`);function f(e){return e===`left`?`start`:e===`right`?`end`:`middle`}r(f,`getTextAnchor`);function p(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}r(p,`getTextTransformation`),i.debug(`Rendering xychart chart
7
+ `+e);let m=_(t),h=m.append(`g`).attr(`class`,`main`),g=h.append(`rect`).attr(`width`,c.width).attr(`height`,c.height).attr(`class`,`background`);d(m,c.height,c.width,!0),m.attr(`viewBox`,`0 0 ${c.width} ${c.height}`),g.attr(`fill`,s.backgroundColor),o.setTmpSVGG(m.append(`g`).attr(`class`,`mermaid-tmp-group`));let v=o.getDrawableElem(),y={};function b(e){let t=h,n=``;for(let[r]of e.entries()){let i=h;r>0&&y[n]&&(i=y[n]),n+=e[r],t=y[n],t||=y[n]=i.append(`g`).attr(`class`,e[r])}return t}r(b,`getGroup`);for(let e of v){if(e.data.length===0)continue;let t=b(e.groupTexts);switch(e.type){case`rect`:if(t.selectAll(`rect`).data(e.data).enter().append(`rect`).attr(`x`,e=>e.x).attr(`y`,e=>e.y).attr(`width`,e=>e.width).attr(`height`,e=>e.height).attr(`fill`,e=>e.fill).attr(`stroke`,e=>e.strokeFill).attr(`stroke-width`,e=>e.strokeWidth),c.showDataLabel){let n=c.showDataLabelOutsideBar;if(c.chartOrientation===`horizontal`){let i=function(e,t){let{data:n,label:r}=e;return t*r.length*a<=n.width-o};r(i,`fitsHorizontally`);let a=.7,o=10,c=e.data.map((e,t)=>({data:e,label:l[t].toString()})).filter(e=>e.data.width>0&&e.data.height>0),u=c.map(e=>{let{data:t}=e,n=t.height*.7;for(;!i(e,n)&&n>0;)--n;return n}),d=Math.floor(Math.min(...u)),f=r(e=>n?e.data.x+e.data.width+10:e.data.x+e.data.width-10,`determineLabelXPosition`);t.selectAll(`text`).data(c).enter().append(`text`).attr(`x`,f).attr(`y`,e=>e.data.y+e.data.height/2).attr(`text-anchor`,n?`start`:`end`).attr(`dominant-baseline`,`middle`).attr(`fill`,s.dataLabelColor).attr(`font-size`,`${d}px`).text(e=>e.label)}else{let i=function(e,t,n){let{data:r,label:i}=e,a=t*i.length*.7,o=r.x+r.width/2,s=o-a/2,c=o+a/2,l=s>=r.x&&c<=r.x+r.width,u=r.y+n+t<=r.y+r.height;return l&&u};r(i,`fitsInBar`);let a=e.data.map((e,t)=>({data:e,label:l[t].toString()})).filter(e=>e.data.width>0&&e.data.height>0),o=a.map(e=>{let{data:t,label:n}=e,r=t.width/(n.length*.7);for(;!i(e,r,10)&&r>0;)--r;return r}),c=Math.floor(Math.min(...o)),u=r(e=>n?e.data.y-10:e.data.y+10,`determineLabelYPosition`);t.selectAll(`text`).data(a).enter().append(`text`).attr(`x`,e=>e.data.x+e.data.width/2).attr(`y`,u).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,n?`auto`:`hanging`).attr(`fill`,s.dataLabelColor).attr(`font-size`,`${c}px`).text(e=>e.label)}}break;case`text`:t.selectAll(`text`).data(e.data).enter().append(`text`).attr(`x`,0).attr(`y`,0).attr(`fill`,e=>e.fill).attr(`font-size`,e=>e.fontSize).attr(`dominant-baseline`,e=>u(e.verticalPos)).attr(`text-anchor`,e=>f(e.horizontalPos)).attr(`transform`,e=>p(e)).text(e=>e.text);break;case`path`:t.selectAll(`path`).data(e.data).enter().append(`path`).attr(`d`,e=>e.path).attr(`fill`,e=>e.fill?e.fill:`none`).attr(`stroke`,e=>e.strokeFill).attr(`stroke-width`,e=>e.strokeWidth);break}}},`draw`)}};export{me as diagram};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-CMxvf4Kt.js";var t=e({default:()=>n}),n=[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"]}`))];export{t as n,n as t};
1
+ import{r as e}from"./rolldown-runtime-DAXXjFlN.js";var t=e({default:()=>n}),n=[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"]}`))];export{t as n,n as t};
package/dist/index.html CHANGED
@@ -18,14 +18,14 @@
18
18
  <script>
19
19
  window.process = window.process || { env: { NODE_ENV: 'development' }, version: '', platform: 'browser' };
20
20
  </script>
21
- <script type="module" crossorigin src="./assets/index-BQhiWf8_.js"></script>
21
+ <script type="module" crossorigin src="./assets/index-BzqR5LGR.js"></script>
22
22
  <link rel="stylesheet" crossorigin href="./assets/ui-components-BL3SEdAz.css">
23
23
  <link rel="stylesheet" crossorigin href="./assets/plugin-dashboard-DnNKJB60.css">
24
- <link rel="stylesheet" crossorigin href="./assets/index-WhD62Q-7.css">
25
- <link rel="modulepreload" href="./assets/framework-h98DIM1k.js" />
26
- <link rel="modulepreload" href="./assets/ui-components-C9egdVxV.js" />
27
- <link rel="modulepreload" href="./assets/vendor-radix-90T7eS-d.js" />
28
- <link rel="modulepreload" href="./assets/vendor-react-ClIa1CJA.js" />
24
+ <link rel="stylesheet" crossorigin href="./assets/index-0xh0t0SY.css">
25
+ <link rel="modulepreload" href="./assets/framework-BGQ7DoWM.js" />
26
+ <link rel="modulepreload" href="./assets/ui-components-J75dr3Ae.js" />
27
+ <link rel="modulepreload" href="./assets/vendor-radix-DniuRzL-.js" />
28
+ <link rel="modulepreload" href="./assets/vendor-react-slxo-5GC.js" />
29
29
  </head>
30
30
  <body>
31
31
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@objectstack/console",
3
- "version": "11.1.0",
3
+ "version": "11.3.0",
4
4
  "description": "Prebuilt Console SPA pinned to this @objectstack/framework release. Source of truth: @object-ui/console (https://github.com/objectstack-ai/objectui).",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/objectstack-ai/framework/tree/main/packages/console",
@@ -1 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-CMxvf4Kt.js";import{_ as t,t as n}from"./vendor-react-ClIa1CJA.js";import{A as r}from"./framework-h98DIM1k.js";import{Hs as i,Oi as a,Or as o,Vi as s,Vs as c,Xn as l,Yi as u,Yn as d,Zi as f,Zn as p,_o as m,ar as h,hs as g,qr as _,ss as v,za as y,zs as b}from"./ui-components-C9egdVxV.js";import"./src-CKHT6scJ.js";var x=e(t(),1),S=[`plugin`,`plugins`,`kind`,`package`];function C(e){return[{method:`POST`,path:`${e}/sign-in/email`,desc:`Sign in (email)`,group:`Auth`,bodyTemplate:{email:`user@example.com`,password:``}},{method:`POST`,path:`${e}/sign-up/email`,desc:`Sign up (email)`,group:`Auth`,bodyTemplate:{email:``,password:``,name:``}},{method:`POST`,path:`${e}/sign-out`,desc:`Sign out`,group:`Auth`},{method:`GET`,path:`${e}/get-session`,desc:`Get session`,group:`Auth`}]}var w={ai:{group:`AI`,defaultRoute:`/api/v1/ai`,endpoints:[{method:`POST`,path:`/chat`,desc:`Chat completion`,bodyTemplate:{messages:[{role:`user`,content:``}]}},{method:`POST`,path:`/chat/stream`,desc:`Streaming chat (SSE)`,bodyTemplate:{messages:[{role:`user`,content:``}]}},{method:`POST`,path:`/complete`,desc:`Text completion`,bodyTemplate:{prompt:``}},{method:`GET`,path:`/models`,desc:`List available models`},{method:`POST`,path:`/nlq`,desc:`Natural language query`,bodyTemplate:{query:``}},{method:`POST`,path:`/suggest`,desc:`AI-powered suggestions`,bodyTemplate:{object:``,field:``,context:{}}},{method:`POST`,path:`/insights`,desc:`AI-generated insights`,bodyTemplate:{object:``,recordIds:[]}},{method:`POST`,path:`/conversations`,desc:`Create conversation`,bodyTemplate:{}},{method:`GET`,path:`/conversations`,desc:`List conversations`},{method:`POST`,path:`/conversations/:id/messages`,desc:`Add message to conversation`,bodyTemplate:{role:`user`,content:``}},{method:`DELETE`,path:`/conversations/:id`,desc:`Delete conversation`}]},workflow:{group:`Workflow`,defaultRoute:`/api/v1/workflow`,endpoints:[{method:`GET`,path:`/:object/config`,desc:`Get workflow configuration`},{method:`GET`,path:`/:object/:recordId/state`,desc:`Get workflow state`},{method:`POST`,path:`/:object/:recordId/transition`,desc:`Execute workflow transition`,bodyTemplate:{targetState:``}},{method:`POST`,path:`/:object/:recordId/approve`,desc:`Approve workflow step`,bodyTemplate:{comment:``}},{method:`POST`,path:`/:object/:recordId/reject`,desc:`Reject workflow step`,bodyTemplate:{comment:``}}]},realtime:{group:`Realtime`,defaultRoute:`/api/v1/realtime`,endpoints:[{method:`POST`,path:`/connect`,desc:`Establish realtime connection`,bodyTemplate:{transport:`websocket`}},{method:`POST`,path:`/disconnect`,desc:`Close realtime connection`,bodyTemplate:{connectionId:``}},{method:`POST`,path:`/subscribe`,desc:`Subscribe to channel`,bodyTemplate:{channel:``}},{method:`POST`,path:`/unsubscribe`,desc:`Unsubscribe from channel`,bodyTemplate:{channel:``}},{method:`PUT`,path:`/presence/:channel`,desc:`Set presence state`,bodyTemplate:{status:`online`}},{method:`GET`,path:`/presence/:channel`,desc:`Get channel presence`}]},notification:{group:`Notifications`,defaultRoute:`/api/v1/notifications`,endpoints:[{method:`GET`,path:``,desc:`List notifications`},{method:`POST`,path:`/devices`,desc:`Register device for push`,bodyTemplate:{token:``,platform:`web`}},{method:`DELETE`,path:`/devices/:deviceId`,desc:`Unregister device`},{method:`GET`,path:`/preferences`,desc:`Get notification preferences`},{method:`PATCH`,path:`/preferences`,desc:`Update notification preferences`,bodyTemplate:{email:!0,push:!0}},{method:`POST`,path:`/read`,desc:`Mark notifications as read`,bodyTemplate:{ids:[]}},{method:`POST`,path:`/read/all`,desc:`Mark all as read`}]},analytics:{group:`Analytics`,defaultRoute:`/api/v1/analytics`,endpoints:[{method:`POST`,path:`/query`,desc:`Execute analytics query`,bodyTemplate:{measures:[],dimensions:[]}},{method:`GET`,path:`/meta`,desc:`Get analytics metadata`}]},automation:{group:`Automation`,defaultRoute:`/api/v1/automation`,endpoints:[{method:`POST`,path:`/trigger`,desc:`Trigger automation`,bodyTemplate:{name:``,params:{}}}]},i18n:{group:`i18n`,defaultRoute:`/api/v1/i18n`,endpoints:[{method:`GET`,path:`/locales`,desc:`Get available locales`},{method:`GET`,path:`/translations/:locale`,desc:`Get translations for locale`},{method:`GET`,path:`/labels/:object/:locale`,desc:`Get translated field labels`}]},ui:{group:`UI`,defaultRoute:`/api/v1/ui`,endpoints:[{method:`GET`,path:`/views`,desc:`List views`},{method:`GET`,path:`/views/:id`,desc:`Get view by ID`},{method:`POST`,path:`/views`,desc:`Create view`,bodyTemplate:{name:``,object:``,type:`list`}},{method:`PATCH`,path:`/views/:id`,desc:`Update view`,bodyTemplate:{name:``}},{method:`DELETE`,path:`/views/:id`,desc:`Delete view`}]},feed:{group:`Feed`,defaultRoute:`/api/v1/feed`,endpoints:[{method:`GET`,path:`/:object/:recordId`,desc:`Get feed items`},{method:`POST`,path:`/:object/:recordId`,desc:`Post feed item`,bodyTemplate:{body:``}}]},storage:{group:`Storage`,defaultRoute:`/api/v1/storage`,endpoints:[{method:`POST`,path:`/upload`,desc:`Upload file (multipart/form-data)`},{method:`GET`,path:`/:fileId`,desc:`Download file`},{method:`DELETE`,path:`/:fileId`,desc:`Delete file`}]}};function T(e,t){let n=w[e];return n?n.endpoints.map(e=>({method:e.method,path:`${t}${e.path}`,desc:e.desc,group:n.group,...e.bodyTemplate?{bodyTemplate:e.bodyTemplate}:{}})):[]}function ee(){let e=r(),[t,n]=(0,x.useState)([]),[i,a]=(0,x.useState)([]),[o,s]=(0,x.useState)(!0),[c,l]=(0,x.useState)(null),u=(0,x.useCallback)(async()=>{s(!0),l(null);let t=`/api/v1`,r=`${t}/discovery`,i=[{method:`GET`,path:r,desc:`API Discovery`,group:`System`},{method:`GET`,path:`${t}/meta/types`,desc:`List metadata types`,group:`Metadata`},{method:`GET`,path:`${t}/packages`,desc:`List packages`,group:`System`},{method:`GET`,path:`/api/v1/health`,desc:`Health check`,group:`System`}];try{let o=`/api/v1/auth`,s={},c={};try{let e=await fetch(r);if(e.ok){let t=await e.json(),n=t?.data??t;c=n?.routes??{},s=n?.services??{},c.auth&&(o=c.auth)}}catch{}let l=[];for(let[e,t]of Object.entries(w)){let n=s[e],r=n?.enabled??!1,i=n?.handlerReady??(n?.status===`available`||n?.status===`degraded`),a=n?.route??c[e]??t.defaultRoute;r&&i&&l.push(...T(e,a))}let u=e?.getClient?.(),d=[];try{let e=await u?.meta?.getTypes?.();e&&Array.isArray(e.types)?d=e.types:Array.isArray(e)&&(d=e)}catch{}let f=[];try{let e=d.includes(`object`)?`object`:null;if(e&&u?.meta?.getItems){let t=await u.meta.getItems(e),n=[];Array.isArray(t)?n=t:t&&Array.isArray(t.items)?n=t.items:t&&Array.isArray(t.value)&&(n=t.value),f=n.map(e=>e.name||e.id).filter(Boolean)}}catch{}let p=f.flatMap(e=>{let n=e.startsWith(`sys_`)?`Data: system tables`:`Data: ${e}`;return[{method:`GET`,path:`${t}/data/${e}`,desc:`List ${e}`,group:n},{method:`POST`,path:`${t}/data/${e}`,desc:`Create ${e}`,group:n,bodyTemplate:{name:`example`}},{method:`GET`,path:`${t}/data/${e}/:id`,desc:`Get ${e} by ID`,group:n},{method:`PATCH`,path:`${t}/data/${e}/:id`,desc:`Update ${e}`,group:n,bodyTemplate:{name:`updated`}},{method:`DELETE`,path:`${t}/data/${e}/:id`,desc:`Delete ${e}`,group:n}]}),m=d.filter(e=>!S.includes(e)).map(e=>({method:`GET`,path:`${t}/meta/${e}`,desc:`List ${e} metadata`,group:`Metadata`})),h=f.map(e=>({method:`GET`,path:`${t}/meta/object/${e}`,desc:`${e} schema`,group:`Metadata`})),g=[...i,...C(o),...l,...m,...h,...p],_=new Map;for(let e of g){let t=_.get(e.group)||[];t.push(e),_.set(e.group,t)}let v=[`System`,`Auth`,`AI`,`Workflow`,`Realtime`,`Notifications`,`Analytics`,`Automation`,`i18n`,`UI`,`Feed`,`Storage`,`Metadata`];n(Array.from(_.entries()).sort(([e],[t])=>{let n=v.indexOf(e),r=v.indexOf(t);return n!==-1&&r!==-1?n-r:n===-1?r===-1?e.localeCompare(t):1:-1}).map(([e,t])=>({key:e,label:e,endpoints:t}))),a(g)}catch(e){l(e.message||`Failed to discover APIs`)}finally{s(!1)}},[e]);return(0,x.useEffect)(()=>{u()},[u]),{groups:t,allEndpoints:i,loading:o,error:c,refresh:u}}var E=n(),D={GET:`text-emerald-600 bg-emerald-50 border-emerald-200 dark:text-emerald-400 dark:bg-emerald-950/50`,POST:`text-blue-600 bg-blue-50 border-blue-200 dark:text-blue-400 dark:bg-blue-950/50`,PATCH:`text-amber-600 bg-amber-50 border-amber-200 dark:text-amber-400 dark:bg-amber-950/50`,PUT:`text-amber-600 bg-amber-50 border-amber-200 dark:text-amber-400 dark:bg-amber-950/50`,DELETE:`text-red-600 bg-red-50 border-red-200 dark:text-red-400 dark:bg-red-950/50`},te={2:`text-emerald-600 dark:text-emerald-400`,3:`text-blue-600 dark:text-blue-400`,4:`text-amber-600 dark:text-amber-400`,5:`text-red-600 dark:text-red-400`},ne=[{key:`$top`,placeholder:`10`,hint:`limit`},{key:`$skip`,placeholder:`0`,hint:`offset`},{key:`$sort`,placeholder:`name`,hint:`sort field`},{key:`$select`,placeholder:`name,email`,hint:`fields`},{key:`$count`,placeholder:`true`,hint:`total count`},{key:`$filter`,placeholder:`status eq 'active'`,hint:`OData filter`}],O=1;function k(){let e=r()?.getClient?.(),{groups:t,loading:n,refresh:S}=ee(),[C,w]=(0,x.useState)(``),[T,k]=(0,x.useState)(new Set),[A,j]=(0,x.useState)(null),[re,M]=(0,x.useState)(``),[ie,N]=(0,x.useState)(``),[P,F]=(0,x.useState)(``),[I,L]=(0,x.useState)([]),[R,z]=(0,x.useState)(!1),[B,V]=(0,x.useState)(null),[H,U]=(0,x.useState)([]),[W,ae]=(0,x.useState)(null),[G,K]=(0,x.useState)(!1),q=(0,x.useMemo)(()=>{if(!C)return t;let e=C.toLowerCase();return t.map(t=>({...t,endpoints:t.endpoints.filter(t=>t.desc.toLowerCase().includes(e)||t.path.toLowerCase().includes(e)||t.method.toLowerCase().includes(e))})).filter(e=>e.endpoints.length>0)},[t,C]),oe=(0,x.useCallback)(e=>{k(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),se=(0,x.useCallback)(e=>{j(e),M(e.method),N(e.path),F(e.bodyTemplate?JSON.stringify(e.bodyTemplate,null,2):``),L([]),V(null)},[]),J=re||A?.method||`GET`,Y=ie||A?.path||``,X=(0,x.useMemo)(()=>{let e=I.filter(e=>e.enabled&&e.key.trim());return e.length===0?Y:`${Y}?${e.map(e=>`${encodeURIComponent(e.key)}=${encodeURIComponent(e.value)}`).join(`&`)}`},[Y,I]),Z=(0,x.useCallback)((e=``,t=``)=>{L(n=>[...n,{id:O++,key:e,value:t,enabled:!0}])},[]),ce=(0,x.useCallback)(e=>{L(t=>t.filter(t=>t.id!==e))},[]),Q=(0,x.useCallback)((e,t,n)=>{L(r=>r.map(r=>r.id===e?{...r,[t]:n}:r))},[]),le=(0,x.useCallback)(e=>{L(t=>t.map(t=>t.id===e?{...t,enabled:!t.enabled}:t))},[]),$=(0,x.useCallback)(async()=>{if(R||!X)return;let t=`${e?.baseUrl??``}${X}`;z(!0);let n=performance.now();try{let e={method:J,headers:{"Content-Type":`application/json`}};[`POST`,`PATCH`,`PUT`].includes(J)&&P.trim()&&(e.body=P);let r=await fetch(t,e),i=Math.round(performance.now()-n),a;if((r.headers.get(`content-type`)??``).includes(`json`)){let e=await r.json();a=JSON.stringify(e,null,2)}else a=await r.text();V({status:r.status,body:a,duration:i}),U(e=>[{id:Date.now(),method:J,url:X,body:P||void 0,status:r.status,duration:i,response:a,timestamp:new Date},...e].slice(0,50))}catch(e){let t=Math.round(performance.now()-n);V({status:0,body:`Network Error: ${e.message}`,duration:t})}finally{z(!1)}},[e,X,J,P,R]),ue=(0,x.useCallback)(e=>{M(e.method);let[t,n]=e.url.split(`?`);if(N(t),F(e.body||``),n){let e=new URLSearchParams(n),t=[];e.forEach((e,n)=>{t.push({id:O++,key:n,value:e,enabled:!0})}),L(t)}else L([]);V(null),j(null)},[]),de=(0,x.useCallback)(()=>{B?.body&&(navigator.clipboard.writeText(B.body),K(!0),setTimeout(()=>K(!1),1500))},[B]),fe=e=>te[String(e)[0]]??`text-muted-foreground`;return(0,E.jsxs)(`div`,{className:`flex flex-1 min-h-0 overflow-hidden`,children:[(0,E.jsxs)(`div`,{className:`w-72 shrink-0 border-r flex flex-col overflow-hidden`,children:[(0,E.jsxs)(`div`,{className:`p-3 border-b space-y-2`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,E.jsx)(`h3`,{className:`text-sm font-semibold text-foreground flex-1`,children:`API Endpoints`}),(0,E.jsx)(`button`,{onClick:S,disabled:n,className:`p-1 rounded hover:bg-muted transition-colors text-muted-foreground hover:text-foreground`,title:`Refresh endpoints`,children:(0,E.jsx)(s,{className:`h-3.5 w-3.5 ${n?`animate-spin`:``}`})})]}),(0,E.jsxs)(`div`,{className:`relative`,children:[(0,E.jsx)(a,{className:`absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground`}),(0,E.jsx)(`input`,{type:`text`,value:C,onChange:e=>w(e.target.value),placeholder:`Search endpoints...`,className:`w-full rounded-md border bg-background pl-8 pr-3 py-1.5 text-sm focus:outline-none focus:ring-1 focus:ring-ring`})]})]}),(0,E.jsx)(`div`,{className:`flex-1 overflow-auto p-2 space-y-1`,children:n?(0,E.jsxs)(`div`,{className:`flex items-center justify-center py-8 text-muted-foreground text-sm`,children:[(0,E.jsx)(y,{className:`h-4 w-4 animate-spin mr-2`}),`Discovering APIs...`]}):q.length===0?(0,E.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-8 text-muted-foreground text-sm`,children:[(0,E.jsx)(m,{className:`h-6 w-6 opacity-30 mb-2`}),(0,E.jsx)(`span`,{children:C?`No matching endpoints`:`No endpoints found`})]}):q.map(e=>{let t=T.has(e.key)||!!C;return(0,E.jsxs)(d,{open:t,onOpenChange:()=>oe(e.key),children:[(0,E.jsx)(p,{asChild:!0,children:(0,E.jsxs)(`button`,{className:`w-full flex items-center gap-1.5 px-2 py-1.5 rounded-md text-xs font-medium text-muted-foreground hover:bg-muted/50 hover:text-foreground transition-colors`,children:[(0,E.jsx)(b,{className:`h-3 w-3 shrink-0 transition-transform duration-200 ${t?`rotate-90`:``}`}),(0,E.jsx)(`span`,{className:`flex-1 text-left truncate`,children:e.label}),(0,E.jsx)(`span`,{className:`shrink-0 text-[10px] tabular-nums opacity-60`,children:e.endpoints.length})]})}),(0,E.jsx)(l,{children:(0,E.jsx)(`div`,{className:`ml-3 space-y-0.5 mt-0.5`,children:e.endpoints.map((e,t)=>(0,E.jsxs)(`button`,{onClick:()=>se(e),className:`w-full text-left flex items-center gap-1.5 px-2 py-1 rounded text-xs transition-colors ${A===e?`bg-accent text-accent-foreground`:`hover:bg-muted/50 text-muted-foreground hover:text-foreground`}`,children:[(0,E.jsx)(h,{variant:`outline`,className:`font-mono text-[9px] shrink-0 px-1 py-0 ${D[e.method]||``}`,children:e.method}),(0,E.jsx)(`span`,{className:`truncate`,children:e.desc})]},`${e.method}-${e.path}-${t}`))})})]},e.key)})}),(0,E.jsxs)(`div`,{className:`p-3 border-t space-y-2`,children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,E.jsx)(`h4`,{className:`text-[10px] font-medium text-muted-foreground uppercase tracking-wider`,children:`Query Parameters`}),(0,E.jsxs)(`button`,{onClick:()=>Z(),className:`inline-flex items-center gap-0.5 text-[10px] text-muted-foreground hover:text-foreground transition-colors`,children:[(0,E.jsx)(u,{className:`h-3 w-3`}),`Add`]})]}),(0,E.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:ne.map(e=>(0,E.jsx)(`button`,{onClick:()=>Z(e.key,``),className:`text-[10px] px-1.5 py-0.5 rounded border bg-muted/30 text-muted-foreground hover:text-foreground hover:bg-muted/60 transition-colors font-mono`,title:e.hint,children:e.key},e.key))}),I.length>0&&(0,E.jsx)(`div`,{className:`space-y-1`,children:I.map(e=>(0,E.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:e.enabled,onChange:()=>le(e.id),className:`h-3 w-3 shrink-0 rounded border accent-primary`}),(0,E.jsx)(`input`,{type:`text`,value:e.key,onChange:t=>Q(e.id,`key`,t.target.value),placeholder:`key`,className:`flex-1 min-w-0 rounded border bg-background px-1.5 py-0.5 text-[10px] font-mono focus:outline-none focus:ring-1 focus:ring-ring`}),(0,E.jsx)(`input`,{type:`text`,value:e.value,onChange:t=>Q(e.id,`value`,t.target.value),placeholder:`value`,className:`flex-1 min-w-0 rounded border bg-background px-1.5 py-0.5 text-[10px] font-mono focus:outline-none focus:ring-1 focus:ring-ring`}),(0,E.jsx)(`button`,{onClick:()=>ce(e.id),className:`shrink-0 p-0.5 rounded text-muted-foreground hover:text-destructive transition-colors`,children:(0,E.jsx)(o,{className:`h-3 w-3`})})]},e.id))})]})]}),(0,E.jsxs)(`div`,{className:`flex-1 flex flex-col min-w-0 overflow-hidden`,children:[(0,E.jsxs)(`div`,{className:`p-3 border-b space-y-1`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,E.jsx)(`select`,{value:J,onChange:e=>M(e.target.value),className:`rounded-md border bg-background px-2 py-1.5 font-mono text-xs font-semibold focus:outline-none focus:ring-1 focus:ring-ring ${D[J]||``}`,children:[`GET`,`POST`,`PATCH`,`PUT`,`DELETE`].map(e=>(0,E.jsx)(`option`,{value:e,children:e},e))}),(0,E.jsx)(`input`,{type:`text`,value:Y,onChange:e=>N(e.target.value),className:`flex-1 rounded-md border bg-background px-3 py-1.5 font-mono text-sm focus:outline-none focus:ring-1 focus:ring-ring`,placeholder:`/api/v1/...`,onKeyDown:e=>{e.key===`Enter`&&$()}}),(0,E.jsxs)(`button`,{onClick:$,disabled:R||!X,className:`inline-flex items-center gap-1.5 rounded-md bg-primary px-4 py-1.5 text-sm font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50 transition-colors`,children:[R?(0,E.jsx)(y,{className:`h-3.5 w-3.5 animate-spin`}):(0,E.jsx)(f,{className:`h-3.5 w-3.5`}),`Send`]})]}),I.some(e=>e.enabled&&e.key.trim())&&(0,E.jsxs)(`div`,{className:`text-[10px] font-mono text-muted-foreground truncate pl-1`,children:[`→ `,X]})]}),(0,E.jsxs)(`div`,{className:`flex-1 flex flex-col min-h-0 overflow-auto`,children:[[`POST`,`PATCH`,`PUT`].includes(J)&&(0,E.jsxs)(`div`,{className:`p-3 border-b space-y-1`,children:[(0,E.jsx)(`label`,{className:`text-xs font-medium text-muted-foreground`,children:`Request Body (JSON)`}),(0,E.jsx)(`textarea`,{value:P,onChange:e=>F(e.target.value),rows:5,className:`w-full rounded-md border bg-background px-3 py-2 font-mono text-xs focus:outline-none focus:ring-1 focus:ring-ring resize-y`,placeholder:`{ "key": "value" }`})]}),R&&(0,E.jsxs)(`div`,{className:`flex items-center justify-center py-8 text-muted-foreground text-sm`,children:[(0,E.jsx)(y,{className:`h-4 w-4 animate-spin mr-2`}),`Sending request...`]}),B&&!R&&(0,E.jsxs)(`div`,{className:`flex-1 min-h-0 flex flex-col overflow-hidden`,children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2 bg-muted/30 border-b`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-3 text-sm`,children:[(0,E.jsx)(`span`,{className:`font-mono font-semibold ${fe(B.status)}`,children:B.status||`ERR`}),(0,E.jsxs)(`span`,{className:`text-muted-foreground flex items-center gap-1`,children:[(0,E.jsx)(g,{className:`h-3 w-3`}),B.duration,`ms`]})]}),(0,E.jsxs)(`button`,{onClick:de,className:`inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors`,children:[G?(0,E.jsx)(i,{className:`h-3 w-3`}):(0,E.jsx)(v,{className:`h-3 w-3`}),G?`Copied`:`Copy`]})]}),(0,E.jsx)(`pre`,{className:`flex-1 overflow-auto p-3 text-xs font-mono bg-muted/10 whitespace-pre-wrap break-all`,children:B.body})]}),!B&&!R&&(0,E.jsx)(`div`,{className:`flex-1 flex items-center justify-center text-muted-foreground text-sm`,children:(0,E.jsxs)(`div`,{className:`text-center space-y-2`,children:[(0,E.jsx)(m,{className:`h-10 w-10 mx-auto opacity-20`}),(0,E.jsxs)(`p`,{children:[`Select an endpoint or type a URL and click `,(0,E.jsx)(`strong`,{children:`Send`})]}),(0,E.jsx)(`p`,{className:`text-xs opacity-60`,children:`All registered APIs are auto-discovered from the platform`})]})}),H.length>0&&(0,E.jsxs)(`div`,{className:`border-t`,children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2`,children:[(0,E.jsxs)(`h4`,{className:`text-xs font-medium text-muted-foreground uppercase tracking-wider`,children:[`History (`,H.length,`)`]}),(0,E.jsxs)(`button`,{onClick:()=>U([]),className:`inline-flex items-center gap-1 text-[10px] text-muted-foreground hover:text-foreground transition-colors`,children:[(0,E.jsx)(_,{className:`h-3 w-3`}),`Clear`]})]}),(0,E.jsx)(`div`,{className:`space-y-0.5 px-2 pb-2 max-h-60 overflow-auto`,children:H.map(e=>(0,E.jsxs)(`div`,{className:`rounded border`,children:[(0,E.jsxs)(`button`,{onClick:()=>ae(W===e.id?null:e.id),className:`w-full flex items-center gap-2 px-2 py-1.5 text-xs hover:bg-muted/30 transition-colors`,children:[W===e.id?(0,E.jsx)(c,{className:`h-3 w-3 shrink-0`}):(0,E.jsx)(b,{className:`h-3 w-3 shrink-0`}),(0,E.jsx)(h,{variant:`outline`,className:`font-mono text-[9px] shrink-0 ${D[e.method]||``}`,children:e.method}),(0,E.jsx)(`span`,{className:`font-mono truncate text-left flex-1`,children:e.url}),(0,E.jsx)(`span`,{className:`ml-auto shrink-0 font-mono ${fe(e.status)}`,children:e.status}),(0,E.jsxs)(`span`,{className:`shrink-0 text-muted-foreground`,children:[e.duration,`ms`]}),(0,E.jsx)(`button`,{onClick:t=>{t.stopPropagation(),ue(e)},className:`shrink-0 p-0.5 rounded hover:bg-muted text-muted-foreground hover:text-foreground transition-colors`,title:`Replay request`,children:(0,E.jsx)(f,{className:`h-2.5 w-2.5`})})]}),W===e.id&&(0,E.jsx)(`pre`,{className:`px-3 py-2 text-xs font-mono bg-muted/10 border-t overflow-auto max-h-40 whitespace-pre-wrap break-all`,children:e.response})]},e.id))})]})]})]})]})}export{k as ApiConsolePage};
@@ -1 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-CMxvf4Kt.js";import{_ as t,f as n,r,t as i}from"./vendor-react-ClIa1CJA.js";import{d as a,f as ee}from"./infrastructure-B1z73d-r.js";import{i as te}from"./framework-h98DIM1k.js";import{$n as ne,As as re,Bs as ie,Bt as ae,Di as oe,Gt as se,Hr as ce,Hs as le,Ht as ue,Jt as de,Kt as fe,Lr as pe,Lt as me,Ns as he,Oc as o,Oi as ge,Or as _e,Qn as ve,Ts as ye,U as be,Ut as xe,Vi as Se,Vt as Ce,W as we,Wt as Te,Yt as Ee,_r as s,ar as De,br as Oe,ct as ke,dn as Ae,dt as je,er as Me,fc as Ne,fr as c,ft as Pe,gr as l,gt as Fe,hr as u,hs as Ie,ht as Le,is as Re,lr as ze,lt as Be,mi as Ve,mr as d,mt as f,ot as He,pr as p,pt as m,q as Ue,qo as We,qt as h,sn as Ge,ss as Ke,st as qe,ur as Je,ut as Ye,vr as g,xc as Xe,xr as _,xs as Ze,yr as v,zs as Qe,zt as $e}from"./ui-components-C9egdVxV.js";import{r as y}from"./vendor-ui-utils-C92Fl7BT.js";var b=e(t(),1),et=`${``.replace(/\/$/,``)}/api/v1`;async function x(e,t){let n=await fetch(`${et}${e}`,{credentials:`include`,headers:{"Content-Type":`application/json`,...t?.headers||{}},...t}),r=null;try{r=await n.json()}catch{}if(!n.ok){let e=r?.code??`HTTP_${n.status}`,t=r?.message??r?.error??n.statusText,i=Error(`${e}: ${t}`);throw i.code=e,i.status=n.status,i.details=r,i}return r}var S={listProcesses(e={}){let t=new URLSearchParams;e.object&&t.set(`object`,e.object),e.activeOnly&&t.set(`activeOnly`,`true`);let n=t.toString();return x(`/approvals/processes${n?`?${n}`:``}`)},listRequests(e={}){let t=new URLSearchParams;e.status&&t.set(`status`,e.status),e.object&&t.set(`object`,e.object),e.recordId&&t.set(`recordId`,e.recordId);let n=Array.isArray(e.approverId)?e.approverId.filter(Boolean).join(`,`):e.approverId;n&&t.set(`approverId`,n),e.submitterId&&t.set(`submitterId`,e.submitterId),e.q?.trim()&&t.set(`q`,e.q.trim()),e.limit!=null&&t.set(`limit`,String(e.limit)),e.offset!=null&&t.set(`offset`,String(e.offset));let r=t.toString();return x(`/approvals/requests${r?`?${r}`:``}`)},async getRequest(e){return{data:await x(`/approvals/requests/${encodeURIComponent(e)}`)}},listActions(e){return x(`/approvals/requests/${encodeURIComponent(e)}/actions`)},async approve(e,t){let n=await x(`/approvals/requests/${encodeURIComponent(e)}/approve`,{method:`POST`,body:JSON.stringify(t)});return{data:n.request,finalized:n.finalized}},async reject(e,t){let n=await x(`/approvals/requests/${encodeURIComponent(e)}/reject`,{method:`POST`,body:JSON.stringify(t)});return{data:n.request,finalized:n.finalized}},async recall(e,t){return{data:(await x(`/approvals/requests/${encodeURIComponent(e)}/recall`,{method:`POST`,body:JSON.stringify(t)})).request,finalized:!0}},async reassign(e,t){return{data:(await x(`/approvals/requests/${encodeURIComponent(e)}/reassign`,{method:`POST`,body:JSON.stringify(t)})).request}},async remind(e,t={}){let n=await x(`/approvals/requests/${encodeURIComponent(e)}/remind`,{method:`POST`,body:JSON.stringify(t)});return{data:n.request,notified:n.notified}},async requestInfo(e,t){return{data:(await x(`/approvals/requests/${encodeURIComponent(e)}/request-info`,{method:`POST`,body:JSON.stringify(t)})).request}},async sendBack(e,t){let n=await x(`/approvals/requests/${encodeURIComponent(e)}/revise`,{method:`POST`,body:JSON.stringify(t)});return{data:n.request,autoRejected:n.autoRejected===!0}},async resubmit(e,t={}){let n=await x(`/approvals/requests/${encodeURIComponent(e)}/resubmit`,{method:`POST`,body:JSON.stringify(t)});return{data:n.request,resumed:n.resumed===!0}},async comment(e,t){return{data:(await x(`/approvals/requests/${encodeURIComponent(e)}/comment`,{method:`POST`,body:JSON.stringify(t)})).request}},async submit(e){return x(`/approvals/requests`,{method:`POST`,body:JSON.stringify(e)})}};function tt(e){if(!e)return[];let t=new Set;e.id&&t.add(e.id),e.email&&t.add(e.email);let n=[...e.roles||[],...typeof e.role==`string`?e.role.split(`,`):[]];for(let e of n){let n=String(e).trim();n&&t.add(`role:${n}`)}return Array.from(t)}var C=i(),nt=50,rt={pending:`border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-500/30 dark:bg-amber-500/10 dark:text-amber-400`,approved:`border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-500/30 dark:bg-emerald-500/10 dark:text-emerald-400`,rejected:`border-red-200 bg-red-50 text-red-700 dark:border-red-500/30 dark:bg-red-500/10 dark:text-red-400`,recalled:`border-border bg-muted text-muted-foreground`,returned:`border-violet-200 bg-violet-50 text-violet-700 dark:border-violet-500/30 dark:bg-violet-500/10 dark:text-violet-400`};function it(e){if(!e)return`—`;try{return new Date(e).toLocaleString()}catch{return e}}function w(e){return e?e.includes(`@`)?e:e.startsWith(`role:`)?`Role: ${e.slice(5)}`:e.length>14?`${e.slice(0,6)}…${e.slice(-4)}`:e:`—`}function T(e){return e&&String(e).replace(/^flow:/,``).trim().split(/[_\-\s]+/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)||`—`}function at(e){return e.process_label||T(e.process_name)}function ot(e){return e.step_label?e.step_label:e.current_step?T(e.current_step):null}function st(e){return e.submitter_name||w(e.submitter_id)}function ct(e,t){return t.pending_approver_names?.[e]||w(e)}function lt(e){return e.object_label||e.object_name}function E(e){return e.submitted_at||e.created_at||void 0}function D(e){let t=E(e);if(!t)return null;let n=Date.parse(t);return Number.isNaN(n)?null:(Date.now()-n)/36e5}function ut(e){if(e.status!==`pending`)return`text-muted-foreground`;let t=D(e);return t==null?`text-muted-foreground`:t>72?`text-red-600 dark:text-red-400 font-medium`:t>24?`text-amber-600 dark:text-amber-400`:`text-muted-foreground`}function dt(e){let t=Math.max(1,Math.round(Math.abs(e)/36e5));return t<48?`${t}h`:`${Math.round(t/24)}d`}var ft=new Set([`id`,`created_at`,`updated_at`,`created_by`,`updated_by`,`organization_id`]);function O(e){return e.split(`_`).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function k(e,t){if(typeof t==`boolean`)return t?`✓`:`—`;if(typeof t==`number`){if(t>0xe8d4a51000&&/(_at$|_date$|^date_|_time$)/.test(e))try{return new Date(t).toLocaleDateString()}catch{}return t.toLocaleString()}let n=String(t);if(/^\d{4}-\d{2}-\d{2}T\d{2}/.test(n))try{return new Date(n).toLocaleString()}catch{}return n}var pt=/^[A-Za-z0-9_-]{15,}$/;function mt(e,t,n=6){if(!e||typeof e!=`object`||Array.isArray(e))return[];let r=[];for(let[i,a]of Object.entries(e)){if(ft.has(i)||a==null||typeof a==`object`||String(a).trim()===``)continue;let e=t?.[i];if(!(!e&&typeof a==`string`&&pt.test(a.trim())&&!/^\d+$/.test(a.trim()))&&(r.push([O(i),e??k(i,a)]),r.length>=n))break}return r}function ht(){let{t:e,language:t}=te(),{user:i}=ee(),et=a(),{appName:x}=n(),T=(0,b.useMemo)(()=>tt(i),[i]),D=(0,b.useCallback)((t,n,r)=>String(e(`approvalsInbox.${t}`,{defaultValue:n,...r})),[e]),ft=(0,b.useCallback)(e=>{if(!e)return`—`;let n=Date.parse(e);if(Number.isNaN(n))return e;let r=Math.round((Date.now()-n)/1e3);if(r<45)return D(`justNow`,`just now`);let i=Math.round(r/60);if(i<60)return D(`minutesAgo`,`{{count}}m ago`,{count:i});let a=Math.round(i/60);if(a<24)return D(`hoursAgo`,`{{count}}h ago`,{count:a});let ee=Math.round(a/24);if(ee<30)return D(`daysAgo`,`{{count}}d ago`,{count:ee});try{return new Date(e).toLocaleDateString(t)}catch{return e}},[D,t]),O=(0,b.useCallback)(e=>{switch(e){case`pending`:return D(`statusPending`,`Pending`);case`approved`:return D(`statusApproved`,`Approved`);case`rejected`:return D(`statusRejected`,`Rejected`);case`recalled`:return D(`statusRecalled`,`Recalled`);case`returned`:return D(`statusReturned`,`Returned for revision`);default:return e}},[D]),k=(0,b.useCallback)((e,t)=>{let n=e?.code??``,r=e?.status??0;return n===`NOT_IMPLEMENTED`||r===501?D(`recallUnavailable`,`Recall is not available on this deployment.`):n===`THROTTLED`||r===429?D(`remindThrottled`,`A reminder was sent recently — try again later.`):r===404?D(`requestGone`,`This request no longer exists. Refresh the list.`):n===`FORBIDDEN`||r===403?D(`notAllowed`,`You are not allowed to perform this action.`):n===`INVALID_STATE`||r===409?D(`alreadyDecided`,`This request was already decided. Refresh the list.`):e?.message||t},[D]);function pt({status:e}){return(0,C.jsx)(De,{variant:`outline`,className:o(`font-medium`,rt[e]??``),children:O(e)})}let ht=(0,b.useCallback)(e=>`/apps/${x||`setup`}/${encodeURIComponent(e.object_name)}/record/${encodeURIComponent(e.record_id)}`,[x]),[A,gt]=(0,b.useState)(`pending`),[j,_t]=(0,b.useState)([]),[vt,yt]=(0,b.useState)(!1),[bt,xt]=(0,b.useState)(!1),[St,Ct]=(0,b.useState)(null),[wt,Tt]=(0,b.useState)(null),[Et,Dt]=(0,b.useState)(0),[M,Ot]=(0,b.useState)(null),[N,kt]=(0,b.useState)(null),[At,jt]=(0,b.useState)([]),[Mt,Nt]=(0,b.useState)(!1),[P,F]=(0,b.useState)(``),[I,Pt]=(0,b.useState)(``),[L,Ft]=(0,b.useState)(null),[R,It]=(0,b.useState)(``),[Lt,Rt]=(0,b.useState)(``),[zt,Bt]=(0,b.useState)(`all`),[Vt,Ht]=(0,b.useState)(`all`),[z,Ut]=(0,b.useState)(`all`),[B,Wt]=(0,b.useState)(new Set),[Gt,Kt]=(0,b.useState)(!1),[V,qt]=(0,b.useState)(null),[Jt,Yt]=(0,b.useState)(null),[Xt,Zt]=(0,b.useState)(!1),[H,Qt]=(0,b.useState)(``),[$t,en]=(0,b.useState)(!1),[tn,nn]=(0,b.useState)(``),[rn,an]=(0,b.useState)(!1),[on,sn]=(0,b.useState)(``),[cn,ln]=(0,b.useState)(!1),[un,dn]=(0,b.useState)(``),[U,W]=(0,b.useState)(!1),[fn,pn]=(0,b.useState)([]),[mn,hn]=(0,b.useState)(-1);(0,b.useEffect)(()=>{if(A===`pending`)return;let e=window.setTimeout(()=>Rt(R),350);return()=>window.clearTimeout(e)},[R,A]);let G=(0,b.useCallback)(async()=>{yt(!0),Tt(null);try{let e=[];if(A===`pending`)e=T.length?(await S.listRequests({status:`pending`,approverId:T})).data:[],Dt(e.length),Ct(null);else{let t={q:Lt||void 0,status:z===`all`?void 0:z,limit:nt,offset:0};if(A===`submitted`){let n=i?.id;if(n){let r=await S.listRequests({submitterId:n,...t});e=r.data,Ct(r.total??r.data.length)}else e=[],Ct(0)}else{let n=await S.listRequests(t);e=n.data,Ct(n.total??n.data.length)}T.length&&S.listRequests({status:`pending`,approverId:T}).then(e=>Dt(e.data.length)).catch(()=>{})}e.sort((e,t)=>(E(t)||``).localeCompare(E(e)||``)),_t(e)}catch(e){Tt(e?.message||String(e)),_t([])}finally{yt(!1)}},[A,T,i?.id,Lt,z]);(0,b.useEffect)(()=>{G()},[G]);let gn=(0,b.useCallback)(async()=>{if(!(A===`pending`||bt)){xt(!0);try{let e=await S.listRequests({submitterId:A===`submitted`?i?.id??void 0:void 0,q:Lt||void 0,status:z===`all`?void 0:z,limit:nt,offset:j.length});_t(t=>{let n=new Set(t.map(e=>e.id));return[...t,...e.data.filter(e=>!n.has(e.id))]}),e.total!=null&&Ct(e.total)}catch(e){y.error(k(e,D(`loadFailed`,`Failed to load request`)))}finally{xt(!1)}}},[A,bt,i?.id,Lt,z,j.length,k,D]),K=(0,b.useCallback)(async e=>{Ot(e),Nt(!0),F(``),Pt(``);try{let[t,n]=await Promise.all([S.getRequest(e),S.listActions(e)]);kt(t.data),jt(n.data)}catch(e){y.error(k(e,D(`loadFailed`,`Failed to load request`))),kt(null),jt([])}finally{Nt(!1)}},[k,D]),_n=()=>{Ot(null),kt(null),jt([]),F(``),Pt(``)},q=(0,b.useCallback)(e=>{if(I.trim())return I.trim();if(!e)return i?.id||``;let t=new Set(e.pending_approvers||[]);for(let e of T)if(t.has(e))return e;return i?.id||``},[I,T,i?.id]),J=(0,b.useCallback)(()=>{T.length&&S.listRequests({status:`pending`,approverId:T}).then(e=>Dt(e.data.length)).catch(()=>{})},[T]),vn=(0,b.useCallback)(async e=>{if(!N)return;let t=e===`recall`&&i?.id||q(N);if(!t){y.error(D(`noActor`,`Cannot determine the acting identity`));return}Ft(e);try{let n={actor_id:t,comment:P.trim()||void 0},r=await(e===`approve`?S.approve:e===`reject`?S.reject:S.recall)(N.id,n);if(y.success(e===`approve`?r.finalized?D(`approvedFinal`,`Approved`):D(`approvedWaiting`,`Approved — waiting on the remaining approvers`):e===`reject`?D(`rejectedToast`,`Rejected`):D(`recalledToast`,`Request recalled`)),F(``),e!==`recall`&&A===`pending`){let e=Rn.current,t=e.findIndex(e=>e.id===N.id),n=e[t+1]??e[t-1];G(),n&&n.id!==N.id?K(n.id):_n();return}let[i,a]=await Promise.all([S.getRequest(N.id),S.listActions(N.id)]);kt(i.data),jt(a.data),G()}catch(e){y.error(k(e,D(`actionFailed`,`Action failed`)))}finally{Ft(null)}},[N,q,P,G,i?.id,k,D,A,K]),Y=(0,b.useCallback)(async e=>{let[t,n]=await Promise.all([S.getRequest(e),S.listActions(e)]);kt(t.data),jt(n.data),G()},[G]),yn=(0,b.useCallback)(async()=>{if(!(!N||!H.trim())){W(!0);try{await S.reassign(N.id,{actor_id:q(N),to:H.trim(),comment:P.trim()||void 0}),y.success(D(`reassignSuccess`,`Handed to {{to}}`,{to:H.trim()})),Zt(!1),Qt(``),F(``),await Y(N.id),J()}catch(e){y.error(k(e,D(`actionFailed`,`Action failed`)))}finally{W(!1)}}},[N,H,P,q,Y,J,k,D]),bn=(0,b.useCallback)(async()=>{if(N){W(!0);try{let e=await S.remind(N.id,{actor_id:i?.id});y.success(D(`remindSuccess`,`Reminder sent to {{count}} approver(s)`,{count:e.notified})),await Y(N.id)}catch(e){y.error(k(e,D(`actionFailed`,`Action failed`)))}finally{W(!1)}}},[N,i?.id,Y,k,D]),xn=(0,b.useCallback)(async()=>{if(!(!N||!tn.trim())){W(!0);try{await S.requestInfo(N.id,{actor_id:q(N),comment:tn.trim()}),y.success(D(`requestInfoSent`,`Sent back to the requester for more information`)),en(!1),nn(``),await Y(N.id)}catch(e){y.error(k(e,D(`actionFailed`,`Action failed`)))}finally{W(!1)}}},[N,tn,q,Y,k,D]),Sn=(0,b.useCallback)(async()=>{if(N){W(!0);try{let e=await S.sendBack(N.id,{actor_id:q(N),comment:on.trim()||void 0});y.success(e.autoRejected?D(`sendBackAutoRejected`,`Revision limit reached — the request was auto-rejected`):D(`sendBackSuccess`,`Sent back for revision — the requester can now edit and resubmit`)),an(!1),sn(``),await Y(N.id),J()}catch(e){y.error(k(e,D(`actionFailed`,`Action failed`)))}finally{W(!1)}}},[N,on,q,Y,J,k,D]),Cn=(0,b.useCallback)(async()=>{if(N){ln(!0);try{await S.resubmit(N.id,{actor_id:i?.id,comment:P.trim()||void 0}),y.success(D(`resubmitSuccess`,`Resubmitted — a new approval round has opened`)),F(``),await Y(N.id),J()}catch(e){y.error(k(e,D(`actionFailed`,`Action failed`)))}finally{ln(!1)}}},[N,P,i?.id,Y,J,k,D]),wn=(0,b.useCallback)(async()=>{if(!(!N||!un.trim())){W(!0);try{await S.comment(N.id,{actor_id:i?.id,comment:un.trim()}),dn(``),await Y(N.id)}catch(e){y.error(k(e,D(`actionFailed`,`Action failed`)))}finally{W(!1)}}},[N,un,i?.id,Y,k,D]),Tn=(0,b.useCallback)(async()=>{if(!fn.length)try{let e=``.replace(/\/$/,``);pn(((await(await fetch(`${e}/api/v1/data/sys_user?limit=100`,{credentials:`include`})).json()).records||[]).filter(e=>e.email&&e.name&&e.id!==i?.id).map(e=>({name:String(e.name),email:String(e.email)})))}catch{}},[fn.length,i?.id]),En=(0,b.useMemo)(()=>{if(!N||N.status!==`pending`)return!1;let e=new Set(N.pending_approvers||[]);return T.some(t=>e.has(t))||I.trim().length>0},[N,T,I]),Dn=(0,b.useMemo)(()=>!N||N.status!==`pending`?!1:N.submitter_id===i?.id||I.trim().length>0,[N,i?.id,I]),On=(0,b.useMemo)(()=>!N||N.status!==`returned`?!1:N.submitter_id===i?.id||I.trim().length>0,[N,i?.id,I]),kn=(0,b.useMemo)(()=>{let e=new Set;for(let t of j)e.add(at(t));return Array.from(e).sort()},[j]),An=(0,b.useMemo)(()=>{let e=new Set;for(let t of j)t.object_name&&e.add(t.object_name);return Array.from(e).sort()},[j]),X=(0,b.useMemo)(()=>{let e=R.trim().toLowerCase();return j.filter(t=>zt!==`all`&&at(t)!==zt||Vt!==`all`&&t.object_name!==Vt||z!==`all`&&t.status!==z?!1:A!==`pending`||!e?!0:[t.process_name,t.process_label,t.step_label,t.object_name,t.record_id,t.record_title,t.submitter_id,t.submitter_name,...t.pending_approvers||[]].filter(Boolean).join(` `).toLowerCase().includes(e))},[j,R,zt,Vt,z,A]),Z=(0,b.useMemo)(()=>M?X.findIndex(e=>e.id===M):-1,[X,M]);(0,b.useEffect)(()=>{if(B.size===0)return;let e=new Set(X.map(e=>e.id)),t=!1,n=new Set;for(let r of B)e.has(r)?n.add(r):t=!0;t&&Wt(n)},[X,B]),(0,b.useEffect)(()=>{mn>=X.length&&hn(X.length-1)},[X.length,mn]);let Q=(0,b.useCallback)(e=>{if(e.status!==`pending`)return!1;let t=new Set(T);return(e.pending_approvers||[]).some(e=>t.has(e))},[T]),$=(0,b.useMemo)(()=>X.filter(e=>B.has(e.id)&&Q(e)),[X,B,Q]),jn=X.filter(e=>e.status===`pending`),Mn=jn.length>0&&jn.every(e=>B.has(e.id)),Nn=(0,b.useCallback)(()=>{Wt(e=>{if(Mn)return new Set;let t=new Set(e);for(let e of jn)t.add(e.id);return t})},[Mn,jn]),Pn=(0,b.useCallback)(e=>{Wt(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),Fn=(0,b.useCallback)(async e=>{let t=$;if(t.length===0)return;Kt(!0);let n=0,r=[];for(let a of t){let t=new Set(a.pending_approvers||[]),ee=T.find(e=>t.has(e))||i?.id||``;try{await(e===`approve`?S.approve:S.reject)(a.id,{actor_id:ee}),n++}catch{r.push(a.record_title||w(a.record_id))}}if(Kt(!1),Wt(new Set),r.length===0)y.success(e===`approve`?D(`bulkApproved`,`Approved {{count}} requests`,{count:n}):D(`bulkRejected`,`Rejected {{count}} requests`,{count:n}));else{let e=r.slice(0,3).join(`, `);y.error(D(`bulkPartial`,`{{ok}} succeeded, {{fail}} failed: {{which}}`,{ok:n,fail:r.length,which:e+(r.length>3?`…`:``)}))}G(),J()},[$,T,i?.id,G,J,D]),In=(0,b.useCallback)(async e=>{if(!Q(e)||Jt)return;let t=new Set(e.pending_approvers||[]),n=T.find(e=>t.has(e))||i?.id||``;Yt(e.id);try{let t=await S.approve(e.id,{actor_id:n});y.success(t.finalized?D(`inlineApproved`,`Approved "{{title}}"`,{title:e.record_title||w(e.record_id)}):D(`approvedWaiting`,`Approved — waiting on the remaining approvers`)),G(),J()}catch(e){y.error(k(e,D(`actionFailed`,`Action failed`)))}finally{Yt(null)}},[Q,Jt,T,i?.id,G,J,k,D]),Ln=(0,b.useCallback)(async()=>{let e=V;if(!e)return;let t=new Set(e.pending_approvers||[]),n=T.find(e=>t.has(e))||i?.id||``;Yt(e.id),qt(null);try{await S.reject(e.id,{actor_id:n}),y.success(D(`inlineRejected`,`Rejected "{{title}}"`,{title:e.record_title||w(e.record_id)})),G(),J()}catch(e){y.error(k(e,D(`actionFailed`,`Action failed`)))}finally{Yt(null)}},[V,T,i?.id,G,J,k,D]),Rn=(0,b.useRef)(X);Rn.current=X;let zn=(0,b.useRef)(mn);zn.current=mn,(0,b.useEffect)(()=>{let e=e=>{if(M||V)return;let t=e.target,n=t?.tagName;if(n===`INPUT`||n===`TEXTAREA`||n===`SELECT`||t?.isContentEditable||document.querySelector(`[role="alertdialog"]`))return;let r=Rn.current;if(!r.length)return;let i=zn.current;e.key===`j`||e.key===`ArrowDown`?(e.preventDefault(),hn(Math.min(i+1,r.length-1))):e.key===`k`||e.key===`ArrowUp`?(e.preventDefault(),hn(Math.max(i-1,0))):e.key===`Enter`&&i>=0&&r[i]?(e.preventDefault(),K(r[i].id)):(e.key===`x`||e.key===` `)&&i>=0&&r[i]&&A===`pending`?(e.preventDefault(),Pn(r[i].id)):e.key===`a`&&i>=0&&r[i]?(e.preventDefault(),In(r[i])):e.key===`r`&&i>=0&&r[i]&&Q(r[i])&&(e.preventDefault(),qt(r[i]))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[M,V,A,K,Pn,In,Q]),(0,b.useEffect)(()=>{if(!M)return;let e=e=>{if(e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)return;let t=e.target,n=t?.tagName;if(n===`INPUT`||n===`TEXTAREA`||n===`SELECT`||t?.isContentEditable||document.querySelector(`[role="alertdialog"]`))return;let r=Rn.current,i=r.findIndex(e=>e.id===M);if(i<0)return;let a=e.key===`ArrowLeft`?r[i-1]:r[i+1];a&&(e.preventDefault(),K(a.id))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[M,K]);let Bn=!!R||zt!==`all`||Vt!==`all`||z!==`all`,Vn=e=>{gt(e),Ut(`all`),Bt(`all`),Ht(`all`),It(``),hn(-1)};function Hn({r:e}){return(0,C.jsxs)(`div`,{className:`min-w-0`,children:[(0,C.jsx)(`div`,{className:`font-medium truncate`,children:at(e)}),(0,C.jsxs)(`div`,{className:`text-xs text-muted-foreground truncate`,children:[ot(e)||`—`,(e.round??1)>1&&(0,C.jsx)(`span`,{className:`ml-1.5 text-violet-600 dark:text-violet-400`,children:D(`roundChip`,`Round {{n}}`,{n:e.round})})]})]})}function Un({r:e}){return(0,C.jsxs)(`div`,{className:`min-w-0`,children:[(0,C.jsxs)(r,{to:ht(e),onClick:e=>e.stopPropagation(),className:`inline-flex items-center gap-1 text-sm hover:underline truncate max-w-full`,title:e.record_id,children:[(0,C.jsx)(`span`,{className:`truncate`,children:e.record_title||w(e.record_id)}),(0,C.jsx)(We,{className:`h-3 w-3 shrink-0 text-muted-foreground`})]}),(0,C.jsx)(`div`,{className:`text-xs text-muted-foreground truncate`,children:lt(e)})]})}function Wn({r:e}){if(!Q(e))return null;let t=Jt===e.id;return(0,C.jsxs)(`div`,{className:`flex items-center gap-1 opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity`,onClick:e=>e.stopPropagation(),children:[(0,C.jsx)(_,{size:`sm`,variant:`ghost`,className:`h-7 px-2 text-emerald-700 hover:text-emerald-800 hover:bg-emerald-50 dark:text-emerald-400`,disabled:t,onClick:()=>void In(e),"aria-label":D(`approve`,`Approve`),children:(0,C.jsx)(re,{className:`h-4 w-4`})}),(0,C.jsx)(_,{size:`sm`,variant:`ghost`,className:`h-7 px-2 text-red-600 hover:text-red-700 hover:bg-red-50 dark:text-red-400`,disabled:t,onClick:()=>qt(e),"aria-label":D(`reject`,`Reject`),children:(0,C.jsx)(Ze,{className:`h-4 w-4`})})]})}return(0,C.jsxs)(`div`,{className:`flex flex-col gap-4 sm:gap-6 p-4 sm:p-6 max-w-6xl`,children:[(0,C.jsxs)(`header`,{className:`flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2`,children:[(0,C.jsxs)(`div`,{children:[(0,C.jsxs)(`h1`,{className:`text-2xl font-semibold flex items-center gap-2`,children:[(0,C.jsx)(Ve,{className:`h-6 w-6`}),D(`title`,`Approvals Inbox`)]}),(0,C.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:D(`subtitle`,`Review and act on approval requests.`)})]}),(0,C.jsxs)(_,{variant:`outline`,size:`sm`,onClick:G,disabled:vt,className:`self-start sm:self-auto`,children:[(0,C.jsx)(Se,{className:`h-4 w-4 mr-2 ${vt?`animate-spin`:``}`}),D(`refresh`,`Refresh`)]})]}),wt&&(0,C.jsxs)(ze,{variant:`destructive`,children:[(0,C.jsx)(he,{className:`h-4 w-4`}),(0,C.jsx)(Je,{children:wt})]}),(0,C.jsxs)(qe,{value:A,onValueChange:Vn,children:[(0,C.jsxs)(Be,{children:[(0,C.jsxs)(Ye,{value:`pending`,children:[D(`tabMyPending`,`My Pending`),Et>0&&(0,C.jsx)(De,{variant:`secondary`,className:`ml-2`,children:Et})]}),(0,C.jsx)(Ye,{value:`submitted`,children:D(`tabSubmitted`,`Submitted by me`)}),(0,C.jsx)(Ye,{value:`all`,children:D(`tabAll`,`All`)})]}),(0,C.jsxs)(ke,{value:A,className:`mt-4 space-y-3`,children:[!vt&&(j.length>0||A!==`pending`&&(Lt||z!==`all`))&&(0,C.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,C.jsxs)(`div`,{className:`relative flex-1 min-w-[200px] max-w-sm`,children:[(0,C.jsx)(ge,{className:`absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground`}),(0,C.jsx)(Ge,{value:R,onChange:e=>It(e.target.value),placeholder:D(`searchPlaceholder`,`Search record, process, requester…`),className:`pl-8 h-8 text-sm`}),R&&(0,C.jsx)(`button`,{type:`button`,onClick:()=>It(``),className:`absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground`,"aria-label":D(`clearSearch`,`Clear search`),children:(0,C.jsx)(_e,{className:`h-3.5 w-3.5`})})]}),A!==`pending`&&(0,C.jsxs)(se,{value:z,onValueChange:Ut,children:[(0,C.jsx)(de,{className:`h-8 w-auto min-w-[130px] text-sm`,children:(0,C.jsx)(Ee,{placeholder:D(`statusFilter`,`Status`)})}),(0,C.jsxs)(fe,{children:[(0,C.jsx)(h,{value:`all`,children:D(`allStatuses`,`All statuses`)}),(0,C.jsx)(h,{value:`pending`,children:O(`pending`)}),(0,C.jsx)(h,{value:`approved`,children:O(`approved`)}),(0,C.jsx)(h,{value:`rejected`,children:O(`rejected`)}),(0,C.jsx)(h,{value:`recalled`,children:O(`recalled`)}),(0,C.jsx)(h,{value:`returned`,children:O(`returned`)})]})]}),kn.length>1&&(0,C.jsxs)(se,{value:zt,onValueChange:Bt,children:[(0,C.jsx)(de,{className:`h-8 w-auto min-w-[140px] text-sm`,children:(0,C.jsx)(Ee,{placeholder:D(`processFilter`,`Process`)})}),(0,C.jsxs)(fe,{children:[(0,C.jsx)(h,{value:`all`,children:D(`allProcesses`,`All processes`)}),kn.map(e=>(0,C.jsx)(h,{value:e,children:e},e))]})]}),An.length>1&&(0,C.jsxs)(se,{value:Vt,onValueChange:Ht,children:[(0,C.jsx)(de,{className:`h-8 w-auto min-w-[140px] text-sm`,children:(0,C.jsx)(Ee,{placeholder:D(`objectFilter`,`Object`)})}),(0,C.jsxs)(fe,{children:[(0,C.jsx)(h,{value:`all`,children:D(`allObjects`,`All objects`)}),An.map(e=>(0,C.jsx)(h,{value:e,children:e},e))]})]}),Bn&&(0,C.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:D(`filterCount`,`{{shown}} of {{total}}`,{shown:X.length,total:j.length})})]}),A===`pending`&&B.size>0&&(0,C.jsxs)(`div`,{className:`flex items-center justify-between gap-2 px-3 py-2 rounded-md border bg-accent/30 text-sm`,children:[(0,C.jsxs)(`span`,{children:[(0,C.jsx)(`strong`,{children:B.size}),` `,D(`selected`,`selected`),$.length!==B.size&&(0,C.jsx)(`span`,{className:`text-muted-foreground ml-1`,children:D(`actionableCount`,`({{count}} actionable)`,{count:$.length})})]}),(0,C.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,C.jsxs)(c,{children:[(0,C.jsx)(Oe,{asChild:!0,children:(0,C.jsxs)(_,{size:`sm`,disabled:Gt||$.length===0,children:[(0,C.jsx)(re,{className:`h-3.5 w-3.5 mr-1`}),D(`approveN`,`Approve {{count}}`,{count:$.length||``})]})}),(0,C.jsxs)(u,{children:[(0,C.jsxs)(g,{children:[(0,C.jsx)(v,{children:D(`bulkApproveTitle`,`Approve {{count}} requests?`,{count:$.length})}),(0,C.jsx)(l,{children:D(`bulkApproveBody`,`Each request is approved with your identity and its flow continues down the approve branch.`)})]}),(0,C.jsxs)(s,{children:[(0,C.jsx)(d,{children:D(`cancel`,`Cancel`)}),(0,C.jsx)(p,{onClick:()=>Fn(`approve`),children:D(`approveN`,`Approve {{count}}`,{count:$.length})})]})]})]}),(0,C.jsxs)(c,{children:[(0,C.jsx)(Oe,{asChild:!0,children:(0,C.jsxs)(_,{size:`sm`,variant:`outline`,disabled:Gt||$.length===0,className:`border-destructive text-destructive hover:bg-destructive hover:text-destructive-foreground`,children:[(0,C.jsx)(Ze,{className:`h-3.5 w-3.5 mr-1`}),D(`rejectN`,`Reject {{count}}`,{count:$.length||``})]})}),(0,C.jsxs)(u,{children:[(0,C.jsxs)(g,{children:[(0,C.jsx)(v,{children:D(`bulkRejectTitle`,`Reject {{count}} requests?`,{count:$.length})}),(0,C.jsx)(l,{children:D(`bulkRejectBody`,`This rejects the selected requests and notifies their submitters.`)})]}),(0,C.jsxs)(s,{children:[(0,C.jsx)(d,{children:D(`cancel`,`Cancel`)}),(0,C.jsx)(p,{onClick:()=>Fn(`reject`),className:`bg-destructive text-destructive-foreground hover:bg-destructive/90`,children:D(`rejectN`,`Reject {{count}}`,{count:$.length})})]})]})]}),(0,C.jsx)(_,{size:`sm`,variant:`ghost`,onClick:()=>Wt(new Set),disabled:Gt,children:D(`clear`,`Clear`)})]})]}),vt?(0,C.jsxs)(`div`,{className:`space-y-2`,children:[(0,C.jsx)(me,{className:`h-10 w-full`}),(0,C.jsx)(me,{className:`h-10 w-full`}),(0,C.jsx)(me,{className:`h-10 w-full`})]}):j.length===0?(0,C.jsx)(`div`,{className:`flex items-center justify-center min-h-[240px] rounded-md border border-dashed`,children:(0,C.jsxs)(be,{children:[(0,C.jsx)(Ue,{children:D(`emptyTitle`,`No requests`)}),(0,C.jsx)(we,{children:A===`pending`?D(`emptyPending`,`You're all caught up — nothing is waiting on you.`):D(`emptyOther`,`Nothing here yet.`)}),A===`pending`&&(0,C.jsx)(_,{variant:`link`,size:`sm`,className:`mt-1`,onClick:()=>Vn(`all`),children:D(`emptyViewAll`,`Browse all requests`)})]})}):X.length===0?(0,C.jsx)(`div`,{className:`flex items-center justify-center min-h-[160px] rounded-md border border-dashed text-sm text-muted-foreground`,children:D(`noMatches`,`No matches for current filters.`)}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(ne,{className:`hidden md:block`,children:(0,C.jsx)(Me,{className:`p-0`,children:(0,C.jsxs)(je,{children:[(0,C.jsx)(Le,{children:(0,C.jsxs)(Fe,{children:[A===`pending`&&(0,C.jsx)(f,{className:`w-10`,children:(0,C.jsx)(ve,{checked:Mn,onCheckedChange:Nn,"aria-label":D(`selectAll`,`Select all`),disabled:jn.length===0})}),(0,C.jsx)(f,{children:D(`colRequest`,`Request`)}),(0,C.jsx)(f,{children:D(`colRecord`,`Record`)}),(0,C.jsx)(f,{children:D(`colRequester`,`Requester`)}),(0,C.jsx)(f,{children:D(`colStatus`,`Status`)}),(0,C.jsx)(f,{children:D(`colWaiting`,`Submitted`)}),(0,C.jsx)(f,{className:`w-20`,"aria-label":D(`colActions`,`Actions`)})]})}),(0,C.jsx)(Pe,{children:X.map((e,t)=>(0,C.jsxs)(Fe,{className:o(`group cursor-pointer hover:bg-accent/50`,mn===t&&`ring-2 ring-inset ring-ring bg-accent/30`),onClick:()=>{hn(t),K(e.id)},children:[A===`pending`&&(0,C.jsx)(m,{className:`w-10`,onClick:e=>e.stopPropagation(),children:(0,C.jsx)(ve,{checked:B.has(e.id),onCheckedChange:()=>Pn(e.id),disabled:e.status!==`pending`,"aria-label":D(`selectRow`,`Select request`)})}),(0,C.jsx)(m,{children:(0,C.jsx)(Hn,{r:e})}),(0,C.jsx)(m,{children:(0,C.jsx)(Un,{r:e})}),(0,C.jsx)(m,{children:(0,C.jsxs)(`div`,{className:`flex items-center gap-1.5 text-sm`,children:[(0,C.jsx)(pe,{className:`h-3.5 w-3.5 text-muted-foreground shrink-0`}),(0,C.jsx)(`span`,{className:`truncate`,title:e.submitter_id||``,children:st(e)})]})}),(0,C.jsx)(m,{children:(0,C.jsx)(pt,{status:e.status})}),(0,C.jsxs)(m,{className:o(`text-xs whitespace-nowrap`,ut(e)),title:it(E(e)),children:[(0,C.jsx)(Ie,{className:`h-3 w-3 inline mr-1`}),ft(E(e)),e.status===`pending`&&e.sla_due_at&&(0,C.jsx)(`div`,{className:o(`mt-0.5 text-[10px] font-medium`,Date.parse(e.sla_due_at)<Date.now()?`text-red-600 dark:text-red-400`:`text-muted-foreground`),children:Date.parse(e.sla_due_at)<Date.now()?D(`slaOverdue`,`SLA overdue {{dur}}`,{dur:dt(Date.now()-Date.parse(e.sla_due_at))}):D(`slaRemaining`,`SLA {{dur}} left`,{dur:dt(Date.parse(e.sla_due_at)-Date.now())})})]}),(0,C.jsx)(m,{className:`w-20`,children:(0,C.jsx)(Wn,{r:e})})]},e.id))})]})})}),(0,C.jsx)(`div`,{className:`md:hidden space-y-2`,children:X.map(e=>(0,C.jsx)(ne,{className:`cursor-pointer active:bg-accent/50`,onClick:()=>void K(e.id),children:(0,C.jsxs)(Me,{className:`p-3 space-y-1.5`,children:[(0,C.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,C.jsx)(`div`,{className:`font-medium text-sm truncate`,children:at(e)}),(0,C.jsx)(pt,{status:e.status})]}),(0,C.jsxs)(`div`,{className:`text-sm truncate`,children:[e.record_title||w(e.record_id),(0,C.jsx)(`span`,{className:`text-muted-foreground text-xs ml-1.5`,children:lt(e)})]}),(0,C.jsxs)(`div`,{className:`flex items-center justify-between text-xs text-muted-foreground`,children:[(0,C.jsxs)(`span`,{className:`inline-flex items-center gap-1 truncate`,children:[(0,C.jsx)(pe,{className:`h-3 w-3`}),st(e)]}),(0,C.jsxs)(`span`,{className:o(`inline-flex items-center gap-1 whitespace-nowrap`,ut(e)),children:[(0,C.jsx)(Ie,{className:`h-3 w-3`}),ft(E(e))]})]}),Q(e)&&(0,C.jsxs)(`div`,{className:`flex gap-2 pt-1`,onClick:e=>e.stopPropagation(),children:[(0,C.jsxs)(_,{size:`sm`,className:`h-7 flex-1`,disabled:Jt===e.id,onClick:()=>void In(e),children:[(0,C.jsx)(re,{className:`h-3.5 w-3.5 mr-1`}),D(`approve`,`Approve`)]}),(0,C.jsxs)(_,{size:`sm`,variant:`outline`,className:`h-7 flex-1 border-destructive text-destructive`,disabled:Jt===e.id,onClick:()=>qt(e),children:[(0,C.jsx)(Ze,{className:`h-3.5 w-3.5 mr-1`}),D(`reject`,`Reject`)]})]})]})},e.id))}),A!==`pending`&&St!=null&&(0,C.jsxs)(`div`,{className:`flex items-center justify-center gap-3 py-1`,children:[(0,C.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:D(`loadedOf`,`Loaded {{loaded}} of {{total}}`,{loaded:j.length,total:St})}),j.length<St&&(0,C.jsx)(_,{size:`sm`,variant:`outline`,disabled:bt,onClick:()=>void gn(),children:bt?D(`loadingMore`,`Loading…`):D(`loadMore`,`Load more`)})]}),(0,C.jsx)(`div`,{className:`hidden md:block text-[11px] text-muted-foreground`,children:D(`keyboardHint`,`Keyboard: j/k move · Enter open · x select · a approve · r reject`)})]})]})]}),(0,C.jsx)(c,{open:Xt,onOpenChange:e=>{e||(Zt(!1),Qt(``))},children:(0,C.jsxs)(u,{children:[(0,C.jsxs)(g,{children:[(0,C.jsx)(v,{children:D(`reassignTitle`,`Hand this approval to someone else?`)}),(0,C.jsx)(l,{children:D(`reassignBody`,`Your approver slot moves to the person you pick — they are notified and can act immediately.`)})]}),(0,C.jsxs)(`div`,{children:[(0,C.jsx)(Ae,{htmlFor:`reassign-to`,className:`text-xs`,children:D(`reassignTo`,`New approver`)}),(0,C.jsx)(Ge,{id:`reassign-to`,list:`reassign-user-options`,value:H,onChange:e=>Qt(e.target.value),placeholder:D(`reassignToPlaceholder`,`Pick a user or type an email / role:<name>`),className:`mt-1`}),(0,C.jsx)(`datalist`,{id:`reassign-user-options`,children:fn.map(e=>(0,C.jsx)(`option`,{value:e.email,children:e.name},e.email))})]}),(0,C.jsxs)(s,{children:[(0,C.jsx)(d,{children:D(`cancel`,`Cancel`)}),(0,C.jsx)(p,{disabled:!H.trim()||U,onClick:()=>void yn(),children:D(`reassignBtn`,`Reassign`)})]})]})}),(0,C.jsx)(c,{open:$t,onOpenChange:e=>{e||(en(!1),nn(``))},children:(0,C.jsxs)(u,{children:[(0,C.jsxs)(g,{children:[(0,C.jsx)(v,{children:D(`requestInfoTitle`,`Ask the requester for more information?`)}),(0,C.jsx)(l,{children:D(`requestInfoBody`,`The request stays pending; the requester is notified and can reply on the thread.`)})]}),(0,C.jsx)(He,{value:tn,onChange:e=>nn(e.target.value),rows:3,placeholder:D(`requestInfoPlaceholder`,`What do you need from the requester?`)}),(0,C.jsxs)(s,{children:[(0,C.jsx)(d,{children:D(`cancel`,`Cancel`)}),(0,C.jsx)(p,{disabled:!tn.trim()||U,onClick:()=>void xn(),children:D(`requestInfoBtn`,`Request info`)})]})]})}),(0,C.jsx)(c,{open:rn,onOpenChange:e=>{e||(an(!1),sn(``))},children:(0,C.jsxs)(u,{children:[(0,C.jsxs)(g,{children:[(0,C.jsx)(v,{children:D(`sendBackTitle`,`Send this request back for revision?`)}),(0,C.jsx)(l,{children:D(`sendBackBody`,`This round ends and the record unlocks so the requester can fix the data. When they resubmit, a fresh approval round opens for all approvers.`)})]}),(0,C.jsx)(He,{value:on,onChange:e=>sn(e.target.value),rows:3,placeholder:D(`sendBackPlaceholder`,`What needs to be fixed before this can be approved?`)}),(0,C.jsxs)(s,{children:[(0,C.jsx)(d,{children:D(`cancel`,`Cancel`)}),(0,C.jsx)(p,{disabled:U,onClick:()=>void Sn(),children:D(`sendBackBtn`,`Send back`)})]})]})}),(0,C.jsx)(c,{open:!!V,onOpenChange:e=>!e&&qt(null),children:(0,C.jsxs)(u,{children:[(0,C.jsxs)(g,{children:[(0,C.jsx)(v,{children:D(`rejectOneTitle`,`Reject "{{title}}"?`,{title:V?V.record_title||w(V.record_id):``})}),(0,C.jsx)(l,{children:D(`rejectOneBody`,`This rejects the request and notifies the submitter.`)})]}),(0,C.jsxs)(s,{children:[(0,C.jsx)(d,{children:D(`cancel`,`Cancel`)}),(0,C.jsx)(p,{onClick:()=>void Ln(),className:`bg-destructive text-destructive-foreground hover:bg-destructive/90`,children:D(`reject`,`Reject`)})]})]})}),(0,C.jsx)($e,{open:!!M,onOpenChange:e=>!e&&_n(),children:(0,C.jsxs)(ae,{className:`w-full sm:max-w-xl overflow-y-auto`,children:[(0,C.jsxs)(ue,{children:[(0,C.jsx)(xe,{children:N?at(N):D(`drawerTitle`,`Approval Request`)}),(0,C.jsx)(Ce,{children:N?ot(N)||lt(N):``})]}),N&&Z>=0&&X.length>1&&(0,C.jsxs)(`div`,{className:`flex items-center justify-between mt-2 text-xs text-muted-foreground`,children:[(0,C.jsxs)(_,{variant:`ghost`,size:`sm`,className:`h-7 px-2`,disabled:Z<=0,onClick:()=>{let e=X[Z-1];e&&K(e.id)},children:[(0,C.jsx)(ie,{className:`h-4 w-4 mr-0.5`}),D(`prevRequest`,`Previous`)]}),(0,C.jsx)(`span`,{children:D(`positionOf`,`{{index}} of {{total}}`,{index:Z+1,total:X.length})}),(0,C.jsxs)(_,{variant:`ghost`,size:`sm`,className:`h-7 px-2`,disabled:Z>=X.length-1,onClick:()=>{let e=X[Z+1];e&&K(e.id)},children:[D(`nextRequest`,`Next`),(0,C.jsx)(Qe,{className:`h-4 w-4 ml-0.5`})]})]}),Mt?(0,C.jsxs)(`div`,{className:`space-y-2 mt-6`,children:[(0,C.jsx)(me,{className:`h-6 w-3/4`}),(0,C.jsx)(me,{className:`h-6 w-1/2`}),(0,C.jsx)(me,{className:`h-20 w-full`})]}):N?(0,C.jsxs)(`div`,{className:`space-y-4 mt-6`,children:[(0,C.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs text-muted-foreground`,children:[(0,C.jsx)(pt,{status:N.status}),(N.round??1)>1&&(0,C.jsx)(De,{variant:`outline`,className:`text-[10px] border-violet-200 text-violet-700 dark:border-violet-500/30 dark:text-violet-400`,children:D(`roundChip`,`Round {{n}}`,{n:N.round})}),(0,C.jsxs)(`span`,{className:`inline-flex items-center gap-1`,title:it(E(N)),children:[(0,C.jsx)(Ie,{className:`h-3 w-3`}),D(`submittedAgo`,`Submitted {{when}}`,{when:ft(E(N))})]}),N.completed_at&&(0,C.jsxs)(`span`,{children:[`· `,D(`completedAt`,`Completed {{when}}`,{when:ft(N.completed_at)})]}),N.status===`pending`&&N.sla_due_at&&(0,C.jsx)(De,{variant:`outline`,className:o(`text-[10px]`,Date.parse(N.sla_due_at)<Date.now()?`border-red-200 bg-red-50 text-red-700 dark:border-red-500/30 dark:bg-red-500/10 dark:text-red-400`:`border-border text-muted-foreground`),children:Date.parse(N.sla_due_at)<Date.now()?D(`slaOverdue`,`SLA overdue {{dur}}`,{dur:dt(Date.now()-Date.parse(N.sla_due_at))}):D(`slaRemaining`,`SLA {{dur}} left`,{dur:dt(Date.parse(N.sla_due_at)-Date.now())})})]}),(0,C.jsx)(ne,{children:(0,C.jsxs)(Me,{className:`p-4 space-y-3`,children:[(0,C.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,C.jsxs)(`div`,{className:`min-w-0`,children:[(0,C.jsxs)(r,{to:ht(N),className:`text-base font-semibold hover:underline inline-flex items-center gap-1.5`,children:[(0,C.jsx)(`span`,{className:`truncate`,children:N.record_title||w(N.record_id)}),(0,C.jsx)(We,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground`})]}),(0,C.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:lt(N)})]}),(0,C.jsx)(`div`,{className:`text-right text-xs text-muted-foreground shrink-0`,children:(0,C.jsxs)(`div`,{className:`inline-flex items-center gap-1`,children:[(0,C.jsx)(pe,{className:`h-3 w-3`}),(0,C.jsx)(`span`,{title:N.submitter_id||``,children:st(N)})]})})]}),mt(N.payload,N.payload_display).length>0&&(0,C.jsx)(`div`,{className:`grid grid-cols-2 gap-x-4 gap-y-2 text-sm border-t pt-3`,children:mt(N.payload,N.payload_display).map(([e,t])=>(0,C.jsxs)(`div`,{className:`min-w-0`,children:[(0,C.jsx)(`div`,{className:`text-[11px] text-muted-foreground`,children:e}),(0,C.jsx)(`div`,{className:`truncate`,title:t,children:t})]},e))}),N.status===`pending`&&(N.pending_approvers||[]).length>0&&(0,C.jsxs)(`div`,{className:`border-t pt-3`,children:[(0,C.jsx)(`div`,{className:`text-[11px] text-muted-foreground mb-1`,children:D(`waitingOn`,`Waiting on`)}),(0,C.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:(N.pending_approvers||[]).map((e,t)=>(0,C.jsx)(De,{variant:`outline`,className:`text-[11px]`,title:e,children:ct(e,N)},t))})]})]})}),(N.flow_steps?.length??0)>1&&(0,C.jsx)(`div`,{className:`flex items-center px-1`,"aria-label":D(`stepProgress`,`Approval steps`),children:N.flow_steps.map((e,t)=>(0,C.jsxs)(b.Fragment,{children:[t>0&&(0,C.jsx)(`div`,{className:o(`h-px flex-1 mx-2`,e.state===`done`||e.state===`current`?`bg-emerald-300 dark:bg-emerald-700`:`bg-border`)}),(0,C.jsxs)(`div`,{className:`flex items-center gap-1.5 shrink-0`,children:[(0,C.jsx)(`span`,{className:o(`flex items-center justify-center h-5 w-5 rounded-full text-[10px] font-semibold`,e.state===`done`&&`bg-emerald-500 text-white`,e.state===`current`&&`bg-amber-500 text-white ring-2 ring-amber-200 dark:ring-amber-500/30`,e.state===`upcoming`&&`bg-muted text-muted-foreground border`),children:e.state===`done`?(0,C.jsx)(le,{className:`h-3 w-3`}):t+1}),(0,C.jsx)(`span`,{className:o(`text-xs`,e.state===`current`?`font-medium`:`text-muted-foreground`),children:e.label})]})]},e.id))}),(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`h3`,{className:`text-sm font-semibold mb-3`,children:D(`history`,`Activity`)}),At.length===0?(0,C.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:D(`noActions`,`No actions yet.`)}):(0,C.jsx)(`ol`,{className:`relative space-y-3 pl-5 before:absolute before:left-[7px] before:top-1 before:bottom-1 before:w-px before:bg-border`,children:At.map(e=>{let t=e.action===`approve`?`bg-emerald-500`:e.action===`reject`?`bg-destructive`:e.action===`submit`?`bg-blue-500`:e.action===`reassign`?`bg-indigo-500`:e.action===`remind`||e.action===`request_info`?`bg-amber-500`:e.action===`comment`?`bg-slate-400`:e.action===`escalate`?`bg-red-500`:e.action===`revise`?`bg-violet-500`:e.action===`resubmit`?`bg-blue-500`:`bg-muted-foreground`,n=e.actor_id===`system:sla`?D(`systemSlaActor`,`System (SLA)`):e.actor_name??(e.actor_id&&e.actor_id===N.submitter_id?st(N):w(e.actor_id)),r=e.action===`submit`?D(`actSubmit`,`Submitted`):e.action===`approve`?D(`actApprove`,`Approved`):e.action===`reject`?D(`actReject`,`Rejected`):e.action===`recall`?D(`actRecall`,`Recalled`):e.action===`reassign`?D(`actReassign`,`Reassigned`):e.action===`remind`?D(`actRemind`,`Reminder sent`):e.action===`request_info`?D(`actRequestInfo`,`Requested more info`):e.action===`comment`?D(`actComment`,`Commented`):e.action===`escalate`?D(`actEscalate`,`SLA escalated`):e.action===`revise`?D(`actRevise`,`Sent back for revision`):e.action===`resubmit`?D(`actResubmit`,`Resubmitted`):e.action;return(0,C.jsxs)(`li`,{className:`relative text-xs`,children:[(0,C.jsx)(`span`,{className:`absolute -left-[18px] top-1 h-3 w-3 rounded-full ring-2 ring-background ${t}`,"aria-hidden":!0}),(0,C.jsxs)(`div`,{className:`flex items-baseline gap-1.5 flex-wrap`,children:[(0,C.jsx)(`span`,{className:`font-medium`,children:r}),(0,C.jsx)(`span`,{className:`text-muted-foreground`,children:`·`}),(0,C.jsx)(`span`,{title:e.actor_id||``,children:n}),(0,C.jsx)(`span`,{className:`ml-auto text-muted-foreground text-[10px]`,title:it(e.created_at),children:ft(e.created_at)})]}),e.comment&&(0,C.jsxs)(`div`,{className:`text-muted-foreground italic mt-0.5`,children:[`"`,e.comment,`"`]})]},e.id)})}),N.status===`pending`&&(En||Dn)&&(0,C.jsxs)(`div`,{className:`flex items-center gap-2 mt-3`,children:[(0,C.jsx)(Ge,{value:un,onChange:e=>dn(e.target.value),onKeyDown:e=>{e.key===`Enter`&&un.trim()&&(e.preventDefault(),wn())},placeholder:D(`replyPlaceholder`,`Reply on this request…`),className:`h-8 text-sm`}),(0,C.jsx)(_,{size:`sm`,variant:`outline`,className:`h-8 px-2 shrink-0`,disabled:!un.trim()||U,onClick:()=>void wn(),children:(0,C.jsx)(oe,{className:`h-3.5 w-3.5`})})]})]}),N.payload!=null&&(0,C.jsxs)(`details`,{className:`group`,children:[(0,C.jsx)(`summary`,{className:`cursor-pointer text-xs text-muted-foreground hover:text-foreground select-none`,children:D(`rawData`,`Raw data (JSON)`)}),(0,C.jsxs)(`div`,{className:`mt-2`,children:[(0,C.jsx)(`div`,{className:`flex justify-end`,children:(0,C.jsxs)(`button`,{type:`button`,onClick:async()=>{try{await navigator.clipboard.writeText(JSON.stringify(N.payload,null,2)),y.success(D(`copied`,`Copied`))}catch{y.error(D(`copyFailed`,`Copy failed`))}},className:`text-[10px] text-muted-foreground hover:text-foreground inline-flex items-center gap-1`,children:[(0,C.jsx)(Ke,{className:`h-3 w-3`}),D(`copy`,`Copy`)]})}),(0,C.jsx)(`pre`,{className:`text-[11px] bg-muted/50 rounded p-2 overflow-auto max-h-48 mt-1`,children:JSON.stringify(N.payload,null,2)})]})]}),N.status===`pending`&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(Te,{}),(0,C.jsxs)(`div`,{className:`space-y-3`,children:[et&&(0,C.jsxs)(`details`,{className:`group`,children:[(0,C.jsx)(`summary`,{className:`cursor-pointer text-xs text-muted-foreground hover:text-foreground select-none`,children:D(`overrideActor`,`Act as another identity (admin)`)}),(0,C.jsxs)(`div`,{className:`mt-2`,children:[(0,C.jsx)(Ae,{htmlFor:`actor-override`,className:`text-xs`,children:D(`actor`,`Actor`)}),(0,C.jsx)(`input`,{id:`actor-override`,type:`text`,value:I,onChange:e=>Pt(e.target.value),placeholder:`${D(`auto`,`Auto`)}: ${q(N)||`—`}`,className:`w-full mt-1 px-3 py-2 text-sm border rounded-md bg-background`}),(0,C.jsx)(`div`,{className:`text-[10px] text-muted-foreground mt-1`,children:D(`overrideHint`,`e.g. role:sales_manager. Leave blank to use the auto-detected identity.`)})]})]}),(0,C.jsxs)(`div`,{children:[(0,C.jsx)(Ae,{htmlFor:`comment`,className:`text-xs`,children:D(`comment`,`Comment (optional)`)}),(0,C.jsx)(`div`,{className:`flex flex-wrap gap-1.5 mt-1.5`,children:[D(`quickPhrase1`,`Approved — meets requirements.`),D(`quickPhrase2`,`Approved with conditions — please monitor execution.`),D(`quickPhrase3`,`Please add supporting material and resubmit.`)].map(e=>(0,C.jsx)(`button`,{type:`button`,onClick:()=>F(e),className:`text-[11px] px-2 py-0.5 rounded-full border text-muted-foreground hover:text-foreground hover:bg-accent transition-colors`,children:e},e))}),(0,C.jsx)(He,{id:`comment`,value:P,onChange:e=>F(e.target.value),rows:2,className:`mt-1`})]}),(0,C.jsxs)(`div`,{className:`flex gap-2 flex-wrap`,children:[(0,C.jsxs)(_,{size:`sm`,onClick:()=>vn(`approve`),disabled:!En||L!==null,children:[(0,C.jsx)(re,{className:`h-4 w-4 mr-1`}),L===`approve`?D(`approving`,`Approving…`):D(`approve`,`Approve`)]}),(0,C.jsxs)(c,{children:[(0,C.jsx)(Oe,{asChild:!0,children:(0,C.jsxs)(_,{size:`sm`,variant:`outline`,disabled:!En||L!==null,className:`border-destructive text-destructive hover:bg-destructive hover:text-destructive-foreground`,children:[(0,C.jsx)(Ze,{className:`h-4 w-4 mr-1`}),L===`reject`?D(`rejecting`,`Rejecting…`):D(`reject`,`Reject`)]})}),(0,C.jsxs)(u,{children:[(0,C.jsxs)(g,{children:[(0,C.jsx)(v,{children:D(`rejectTitle`,`Reject this request?`)}),(0,C.jsx)(l,{children:D(`rejectBody`,`This marks the request as rejected and notifies the submitter.`)})]}),(0,C.jsxs)(s,{children:[(0,C.jsx)(d,{children:D(`cancel`,`Cancel`)}),(0,C.jsx)(p,{onClick:()=>vn(`reject`),className:`bg-destructive text-destructive-foreground hover:bg-destructive/90`,children:D(`reject`,`Reject`)})]})]})]}),En&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(_,{size:`sm`,variant:`outline`,disabled:L!==null||U,className:`border-violet-300 text-violet-700 hover:bg-violet-50 dark:text-violet-400`,onClick:()=>an(!0),children:[(0,C.jsx)(Re,{className:`h-4 w-4 mr-1`}),D(`sendBackBtn`,`Send back`)]}),(0,C.jsxs)(_,{size:`sm`,variant:`outline`,disabled:L!==null||U,className:`border-amber-300 text-amber-700 hover:bg-amber-50 dark:text-amber-400`,onClick:()=>en(!0),children:[(0,C.jsx)(ye,{className:`h-4 w-4 mr-1`}),D(`requestInfoBtn`,`Request info`)]}),(0,C.jsxs)(_,{size:`sm`,variant:`outline`,disabled:L!==null||U,onClick:()=>{Tn(),Zt(!0)},children:[(0,C.jsx)(Xe,{className:`h-4 w-4 mr-1`}),D(`reassignBtn`,`Reassign`)]})]}),Dn&&(0,C.jsxs)(_,{size:`sm`,variant:`outline`,disabled:U,onClick:()=>void bn(),children:[(0,C.jsx)(Ne,{className:`h-4 w-4 mr-1`}),D(`remindBtn`,`Send reminder`)]}),Dn&&(0,C.jsxs)(c,{children:[(0,C.jsx)(Oe,{asChild:!0,children:(0,C.jsxs)(_,{size:`sm`,variant:`outline`,disabled:L!==null,children:[(0,C.jsx)(ce,{className:`h-4 w-4 mr-1`}),L===`recall`?D(`recalling`,`Recalling…`):D(`recall`,`Recall`)]})}),(0,C.jsxs)(u,{children:[(0,C.jsxs)(g,{children:[(0,C.jsx)(v,{children:D(`recallTitle`,`Recall this request?`)}),(0,C.jsx)(l,{children:D(`recallBody`,`This withdraws your request. Approvers can no longer act on it, and the record is unlocked.`)})]}),(0,C.jsxs)(s,{children:[(0,C.jsx)(d,{children:D(`cancel`,`Cancel`)}),(0,C.jsx)(p,{onClick:()=>vn(`recall`),children:D(`recall`,`Recall`)})]})]})]})]}),!En&&(0,C.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:Dn?D(`whyDisabledSubmitter`,`You submitted this request, so you can recall it — but only the assigned approvers can approve or reject.`):D(`whyDisabled`,`Only the assigned approvers can act on this request. It is waiting on: {{who}}.`,{who:(N.pending_approvers||[]).map(e=>ct(e,N)).join(`, `)||`—`})})]})]}),On&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(Te,{}),(0,C.jsxs)(`div`,{className:`space-y-3`,children:[(0,C.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:D(`returnedHint`,`An approver sent this back to you. The record is unlocked — fix the data, then resubmit to start a new approval round.`)}),(0,C.jsxs)(`div`,{children:[(0,C.jsx)(Ae,{htmlFor:`resubmit-comment`,className:`text-xs`,children:D(`comment`,`Comment (optional)`)}),(0,C.jsx)(He,{id:`resubmit-comment`,value:P,onChange:e=>F(e.target.value),rows:2,className:`mt-1`,placeholder:D(`resubmitPlaceholder`,`What did you change?`)})]}),(0,C.jsxs)(`div`,{className:`flex gap-2 flex-wrap`,children:[(0,C.jsx)(_,{asChild:!0,size:`sm`,variant:`outline`,children:(0,C.jsxs)(r,{to:ht(N),children:[(0,C.jsx)(We,{className:`h-4 w-4 mr-1`}),D(`editRecordBtn`,`Edit record`)]})}),(0,C.jsxs)(_,{size:`sm`,disabled:cn,onClick:()=>void Cn(),children:[(0,C.jsx)(Se,{className:o(`h-4 w-4 mr-1`,cn&&`animate-spin`)}),cn?D(`resubmitting`,`Resubmitting…`):D(`resubmitBtn`,`Resubmit`)]}),(0,C.jsxs)(c,{children:[(0,C.jsx)(Oe,{asChild:!0,children:(0,C.jsxs)(_,{size:`sm`,variant:`outline`,disabled:cn,children:[(0,C.jsx)(ce,{className:`h-4 w-4 mr-1`}),D(`recall`,`Recall`)]})}),(0,C.jsxs)(u,{children:[(0,C.jsxs)(g,{children:[(0,C.jsx)(v,{children:D(`abandonTitle`,`Abandon this revision?`)}),(0,C.jsx)(l,{children:D(`abandonBody`,`This withdraws the request instead of resubmitting it. The approval ends here.`)})]}),(0,C.jsxs)(s,{children:[(0,C.jsx)(d,{children:D(`cancel`,`Cancel`)}),(0,C.jsx)(p,{onClick:()=>vn(`recall`),children:D(`recall`,`Recall`)})]})]})]})]})]})]})]}):null]})})]})}export{ht as ApprovalsInboxPage};
@@ -1 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-CMxvf4Kt.js";import{_ as t,t as n}from"./vendor-react-ClIa1CJA.js";import{$n as r,Bt as i,Gt as a,Ht as ee,Jt as te,Kt as ne,Lt as o,Ns as re,Oi as ie,Or as s,U as c,Ut as l,Vi as u,Vt as d,W as ae,Wt as f,Yt as oe,ar as p,dn as m,dt as se,er as h,ft as g,gt as _,ht as ce,ki as le,lr as v,mt as y,pt as b,q as ue,qt as x,sn as S,ur as C,xr as w,zt as T}from"./ui-components-C9egdVxV.js";var E=e(t(),1),D=n(),de=`${``.replace(/\/$/,``)}/api/v1`,fe=[`create`,`update`,`delete`,`restore`,`login`,`logout`,`permission_change`,`config_change`,`export`,`import`],O={create:`default`,update:`secondary`,delete:`destructive`,restore:`outline`,login:`outline`,logout:`outline`,permission_change:`secondary`,config_change:`secondary`,export:`outline`,import:`outline`},k=50;function A(e){if(!e)return`—`;try{return new Date(e).toLocaleString()}catch{return e}}function j(e,t=24){return e?e.length>t?`${e.slice(0,t-1)}…`:e:`—`}function M(e){if(!e)return``;try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function N(){let[e,t]=(0,E.useState)([]),[n,N]=(0,E.useState)(!1),[P,F]=(0,E.useState)(null),[I,L]=(0,E.useState)(`all`),[R,z]=(0,E.useState)(``),[B,V]=(0,E.useState)(``),[H,U]=(0,E.useState)(``),[W,G]=(0,E.useState)(``),[K,q]=(0,E.useState)(0),[J,Y]=(0,E.useState)(!1),[X,Z]=(0,E.useState)(null),Q=(0,E.useCallback)(async()=>{N(!0),F(null);try{let e={};I&&I!==`all`&&(e.action=I),R.trim()&&(e.object_name=R.trim()),B.trim()&&(e.user_id=B.trim()),H&&(e.created_at={...e.created_at||{},$gte:H}),W&&(e.created_at={...e.created_at||{},$lte:`${W}T23:59:59`});let n=new URLSearchParams;Object.keys(e).length>0&&n.set(`$filter`,JSON.stringify(e)),n.set(`$orderby`,`created_at desc`),n.set(`$top`,`51`),n.set(`$skip`,String(K*k));let r=await fetch(`${de}/data/sys_audit_log?${n.toString()}`,{credentials:`include`});if(!r.ok){let e=await r.text().catch(()=>``);throw Error(`HTTP ${r.status}: ${e.slice(0,200)||r.statusText}`)}let i=await r.json(),a=Array.isArray(i)?i:Array.isArray(i?.records)?i.records:Array.isArray(i?.data)?i.data:[];Y(a.length>k),t(a.slice(0,k))}catch(e){console.warn(`[AuditLogPage] load failed:`,e),F(e?.message||`Failed to load audit log`),t([]),Y(!1)}finally{N(!1)}},[I,R,B,H,W,K]);(0,E.useEffect)(()=>{Q()},[Q]);let pe=(0,E.useCallback)(()=>{L(`all`),z(``),V(``),U(``),G(``),q(0)},[]),$=(0,E.useMemo)(()=>{let e=0;return I!==`all`&&(e+=1),R.trim()&&(e+=1),B.trim()&&(e+=1),H&&(e+=1),W&&(e+=1),e},[I,R,B,H,W]);return(0,D.jsxs)(`div`,{className:`p-6 space-y-4 max-w-screen-2xl mx-auto`,children:[(0,D.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,D.jsx)(le,{className:`h-6 w-6 text-muted-foreground`}),(0,D.jsxs)(`div`,{className:`flex-1`,children:[(0,D.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:`Audit Log`}),(0,D.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Read-only system activity and record changes. Newest first.`})]}),(0,D.jsxs)(w,{variant:`outline`,size:`sm`,onClick:Q,disabled:n,children:[(0,D.jsx)(u,{className:`h-4 w-4 mr-1 ${n?`animate-spin`:``}`}),`Refresh`]})]}),(0,D.jsx)(r,{children:(0,D.jsxs)(h,{className:`p-4 grid grid-cols-1 md:grid-cols-5 gap-3`,children:[(0,D.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,D.jsx)(m,{className:`text-xs`,children:`Action`}),(0,D.jsxs)(a,{value:I,onValueChange:e=>{L(e),q(0)},children:[(0,D.jsx)(te,{className:`h-9`,children:(0,D.jsx)(oe,{})}),(0,D.jsxs)(ne,{children:[(0,D.jsx)(x,{value:`all`,children:`All actions`}),fe.map(e=>(0,D.jsx)(x,{value:e,children:e},e))]})]})]}),(0,D.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,D.jsx)(m,{className:`text-xs`,children:`Object`}),(0,D.jsx)(S,{placeholder:`e.g. account`,value:R,onChange:e=>{z(e.target.value),q(0)},className:`h-9`})]}),(0,D.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,D.jsx)(m,{className:`text-xs`,children:`Actor (user id)`}),(0,D.jsx)(S,{placeholder:`user id`,value:B,onChange:e=>{V(e.target.value),q(0)},className:`h-9`})]}),(0,D.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,D.jsx)(m,{className:`text-xs`,children:`From`}),(0,D.jsx)(S,{type:`date`,value:H,onChange:e=>{U(e.target.value),q(0)},className:`h-9`})]}),(0,D.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,D.jsx)(m,{className:`text-xs`,children:`To`}),(0,D.jsx)(S,{type:`date`,value:W,onChange:e=>{G(e.target.value),q(0)},className:`h-9`})]}),$>0&&(0,D.jsx)(`div`,{className:`md:col-span-5 flex justify-end`,children:(0,D.jsxs)(w,{variant:`ghost`,size:`sm`,onClick:pe,children:[(0,D.jsx)(s,{className:`h-4 w-4 mr-1`}),`Clear filters (`,$,`)`]})})]})}),P&&(0,D.jsxs)(v,{variant:`destructive`,children:[(0,D.jsx)(re,{className:`h-4 w-4`}),(0,D.jsx)(C,{children:P})]}),(0,D.jsx)(r,{children:(0,D.jsx)(h,{className:`p-0`,children:n&&e.length===0?(0,D.jsx)(`div`,{className:`p-6 space-y-2`,children:Array.from({length:6}).map((e,t)=>(0,D.jsx)(o,{className:`h-9 w-full`},t))}):e.length===0?(0,D.jsx)(`div`,{className:`p-12`,children:(0,D.jsxs)(c,{children:[(0,D.jsx)(ie,{className:`h-8 w-8 text-muted-foreground mb-3`}),(0,D.jsx)(ue,{children:`No audit entries`}),(0,D.jsx)(ae,{children:$>0?`Try clearing filters or widening the date range.`:`Events will appear here once tracked objects are modified.`})]})}):(0,D.jsxs)(se,{children:[(0,D.jsx)(ce,{children:(0,D.jsxs)(_,{children:[(0,D.jsx)(y,{className:`w-[180px]`,children:`Timestamp`}),(0,D.jsx)(y,{className:`w-[130px]`,children:`Action`}),(0,D.jsx)(y,{children:`Object`}),(0,D.jsx)(y,{children:`Record`}),(0,D.jsx)(y,{children:`Actor`}),(0,D.jsx)(y,{className:`w-[130px]`,children:`IP`})]})}),(0,D.jsx)(g,{children:e.map(e=>{let t=O[e.action||``]||`outline`;return(0,D.jsxs)(_,{className:`cursor-pointer`,onClick:()=>Z(e),children:[(0,D.jsx)(b,{className:`font-mono text-xs`,children:A(e.created_at)}),(0,D.jsx)(b,{children:(0,D.jsx)(p,{variant:t,children:e.action||`—`})}),(0,D.jsx)(b,{children:e.object_name||`—`}),(0,D.jsx)(b,{className:`font-mono text-xs`,children:j(e.record_id,18)}),(0,D.jsx)(b,{className:`font-mono text-xs`,children:j(e.user_id,18)}),(0,D.jsx)(b,{className:`font-mono text-xs`,children:e.ip_address||`—`})]},e.id)})})]})})}),(e.length>0||K>0)&&(0,D.jsxs)(`div`,{className:`flex items-center justify-between text-sm text-muted-foreground`,children:[(0,D.jsxs)(`span`,{children:[`Page `,K+1,J?``:` · end`]}),(0,D.jsxs)(`div`,{className:`flex gap-2`,children:[(0,D.jsx)(w,{variant:`outline`,size:`sm`,disabled:K===0||n,onClick:()=>q(e=>Math.max(0,e-1)),children:`Previous`}),(0,D.jsx)(w,{variant:`outline`,size:`sm`,disabled:!J||n,onClick:()=>q(e=>e+1),children:`Next`})]})]}),(0,D.jsx)(T,{open:!!X,onOpenChange:e=>!e&&Z(null),children:(0,D.jsxs)(i,{side:`right`,className:`sm:max-w-2xl w-full overflow-y-auto`,children:[(0,D.jsxs)(ee,{children:[(0,D.jsxs)(l,{className:`flex items-center gap-2`,children:[(0,D.jsx)(p,{variant:X&&O[X.action||``]||`outline`,children:X?.action||`—`}),X?.object_name||`Audit Event`]}),(0,D.jsx)(d,{children:X?.id?(0,D.jsx)(`span`,{className:`font-mono text-xs`,children:X.id}):null})]}),X&&(0,D.jsxs)(`div`,{className:`mt-6 space-y-5`,children:[(0,D.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 text-sm`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Timestamp`}),(0,D.jsx)(`div`,{className:`font-mono`,children:A(X.created_at)})]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`IP Address`}),(0,D.jsx)(`div`,{className:`font-mono`,children:X.ip_address||`—`})]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Actor (user_id)`}),(0,D.jsx)(`div`,{className:`font-mono break-all`,children:X.user_id||`—`})]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Tenant`}),(0,D.jsx)(`div`,{className:`font-mono break-all`,children:X.tenant_id||`—`})]}),(0,D.jsxs)(`div`,{className:`col-span-2`,children:[(0,D.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Target record`}),(0,D.jsxs)(`div`,{className:`font-mono text-sm break-all`,children:[X.object_name||`—`,` / `,X.record_id||`—`]})]}),X.user_agent&&(0,D.jsxs)(`div`,{className:`col-span-2`,children:[(0,D.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`User Agent`}),(0,D.jsx)(`div`,{className:`font-mono text-xs break-all`,children:X.user_agent})]})]}),(X.old_value||X.new_value)&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(f,{}),(0,D.jsxs)(`div`,{className:`space-y-3`,children:[(0,D.jsx)(`div`,{className:`text-sm font-medium`,children:`Change payload`}),X.old_value&&(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`div`,{className:`text-xs text-muted-foreground mb-1`,children:`Before`}),(0,D.jsx)(`pre`,{className:`rounded-md bg-muted p-3 text-xs font-mono whitespace-pre-wrap max-h-64 overflow-auto`,children:M(X.old_value)})]}),X.new_value&&(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`div`,{className:`text-xs text-muted-foreground mb-1`,children:`After`}),(0,D.jsx)(`pre`,{className:`rounded-md bg-muted p-3 text-xs font-mono whitespace-pre-wrap max-h-64 overflow-auto`,children:M(X.new_value)})]})]})]}),X.metadata&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(f,{}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`div`,{className:`text-sm font-medium mb-2`,children:`Metadata`}),(0,D.jsx)(`pre`,{className:`rounded-md bg-muted p-3 text-xs font-mono whitespace-pre-wrap max-h-48 overflow-auto`,children:M(X.metadata)})]})]})]})]})})]})}export{N as AuditLogPage};