@inkeep/open-knowledge 0.46.0-beta.3 → 0.46.0-beta.4

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 (367) hide show
  1. package/dist/{acp-harness-probe-BfAZQjw4.mjs → acp-harness-probe-BQ3_wze1.mjs} +2 -2
  2. package/dist/assets/skills/discovery/SKILL.md +1 -1
  3. package/dist/assets/skills/project/SKILL.md +1 -1
  4. package/dist/cli.mjs +20 -20
  5. package/dist/constants-7P_R76Oj.mjs +2 -0
  6. package/dist/{fs-traced-DDm-belY.mjs → fs-traced-B-x7hAhD.mjs} +2 -2
  7. package/dist/fs-traced-Bi88qem0.mjs +1 -0
  8. package/dist/{git-handle-CZzO__rr.mjs → git-handle-BnrTPYj_.mjs} +2 -2
  9. package/dist/git-handle-CHFcUjId.mjs +1 -0
  10. package/dist/index.mjs +1 -1
  11. package/dist/init-C9mmgvW-.mjs +1 -0
  12. package/dist/{init-BbpX_tfM.mjs → init-D0wKKFay.mjs} +4 -4
  13. package/dist/{launch-json-removal-BJBj0U4b.mjs → launch-json-removal-CmpnCINi.mjs} +2 -2
  14. package/dist/loader-D297fMOD.mjs +1 -0
  15. package/dist/{loader-B21NAhXF.mjs → loader-Sk1Z2HXI.mjs} +2 -2
  16. package/dist/md-manager-B9dAVpPF.mjs +2 -0
  17. package/dist/{open-browser-B9YVDd4n.mjs → open-browser-DZWA0mkS.mjs} +2 -2
  18. package/dist/parse-worker.mjs +1 -1
  19. package/dist/{preview-CIemkVcT.mjs → preview-B4nElYVr.mjs} +2 -2
  20. package/dist/preview-DacomZcF.mjs +1 -0
  21. package/dist/public/assets/{ActivityModeContent-CUdU1LSM.js → ActivityModeContent-DKkJMuA9.js} +1 -1
  22. package/dist/public/assets/{AgentDiffPane-C406On9h.js → AgentDiffPane-DkzTKjWa.js} +2 -2
  23. package/dist/public/assets/{AgentThreadClientBinder-B69qnNWb.js → AgentThreadClientBinder-BqONUtGD.js} +1 -1
  24. package/dist/public/assets/{BugReportHistory-DrMLEEP8.js → BugReportHistory-D_60pb7r.js} +1 -1
  25. package/dist/public/assets/{BugReportHistoryDialog-Cf_ZrCjH.js → BugReportHistoryDialog-BzJsPoev.js} +1 -1
  26. package/dist/public/assets/CodeMirrorPropInput-CyIlgGaP.js +3 -0
  27. package/dist/public/assets/{ConsentDialogBody-CiXNBNFL.js → ConsentDialogBody-DWXqUhzJ.js} +1 -1
  28. package/dist/public/assets/{DocumentContext-Bwk1Rcb4.js → DocumentContext-QeD0oigI.js} +11 -11
  29. package/dist/public/assets/{EditorModeToggle-Cc_1CSwt.js → EditorModeToggle-12SdK7ya.js} +2 -2
  30. package/dist/public/assets/{EnableSyncConfirmDialog-CUbRSvVb.js → EnableSyncConfirmDialog-GUnrwfa0.js} +1 -1
  31. package/dist/public/assets/FeedbackForm-B34f3kZF.js +1 -0
  32. package/dist/public/assets/GraphPanel-DE5iijrO.js +44 -0
  33. package/dist/public/assets/{LintConfigEditor-CQvHNEOM.js → LintConfigEditor-BNN0UkHw.js} +1 -1
  34. package/dist/public/assets/{ManagedArtifactProperties-t_bI4fe1.js → ManagedArtifactProperties-Bab8809-.js} +1 -1
  35. package/dist/public/assets/{McpConsentDialogBody-CajikYp7.js → McpConsentDialogBody-xnaSaj_X.js} +1 -1
  36. package/dist/public/assets/{MermaidDocEditor-CftPmzt6.js → MermaidDocEditor-Bw26glK9.js} +1 -1
  37. package/dist/public/assets/PropertyPanel-ANMzlUf0.js +2 -0
  38. package/dist/public/assets/{RegisteredAgentIcon-DplzDEhh.js → RegisteredAgentIcon-CyQDojW_.js} +1 -1
  39. package/dist/public/assets/{ReportBugDialogBody-CYyFn3-x.js → ReportBugDialogBody-SYqc1dep.js} +2 -2
  40. package/dist/public/assets/{SchemaConfigEditor-BpLYvsCk.js → SchemaConfigEditor-RgV92dU4.js} +1 -1
  41. package/dist/public/assets/{SettingsDialogBody-C_wnfFY5.js → SettingsDialogBody-Bhk4NQJN.js} +4 -4
  42. package/dist/public/assets/{ShareBranchSwitchDialog-5gKA4BCe.js → ShareBranchSwitchDialog-BXjj8rUu.js} +1 -1
  43. package/dist/public/assets/{ShareReceiveDialog-DCFP2qk5.js → ShareReceiveDialog-CXqdzDYu.js} +1 -1
  44. package/dist/public/assets/{ShareReceiveMissDialog-CcEXE75K.js → ShareReceiveMissDialog-BaHsueef.js} +1 -1
  45. package/dist/public/assets/{SkillEditorActions-BUn81ISW.js → SkillEditorActions-CDWxVAy1.js} +1 -1
  46. package/dist/public/assets/{SourceEditor-DF-FFwuv.js → SourceEditor-CZhPtXfy.js} +1 -1
  47. package/dist/public/assets/{TerminalPanel-CEIHsphK.js → TerminalPanel-DiVhC52x.js} +3 -3
  48. package/dist/public/assets/TerminalSessionsHost-8wTgxl0R.js +2 -0
  49. package/dist/public/assets/{TerminalWindowApp-B1hXJvlw.js → TerminalWindowApp-CQunMofw.js} +1 -1
  50. package/dist/public/assets/ThreadView-BI4embLm.js +6 -0
  51. package/dist/public/assets/{TimelineDiffPane-D-69ryad.js → TimelineDiffPane-Dd-khPXZ.js} +2 -2
  52. package/dist/public/assets/{abnfDiagram-VRR7QNED-BA0sca5y.js → abnfDiagram-VRR7QNED-Cyah47m9.js} +1 -1
  53. package/dist/public/assets/{agent-diff-store-qaTtNJLp.js → agent-diff-store-CcwDxQK9.js} +1 -1
  54. package/dist/public/assets/{agent-visibility-CANQ951p.js → agent-visibility-mwTztYpe.js} +1 -1
  55. package/dist/public/assets/{arc-DIcYIkPb.js → arc-B3aheyNj.js} +1 -1
  56. package/dist/public/assets/architecture-TIHT7OUA-BfFQVb2N.js +1 -0
  57. package/dist/public/assets/{architectureDiagram-ZJ3FMSHR-CyZsfJqr.js → architectureDiagram-ZJ3FMSHR-lZYHIfAt.js} +1 -1
  58. package/dist/public/assets/auth-state-cache-Bkm-5pQl.js +11 -0
  59. package/dist/public/assets/{blockDiagram-677ZJIJ3-BL4J4ddi.js → blockDiagram-677ZJIJ3-mULu-3uH.js} +1 -1
  60. package/dist/public/assets/{c4Diagram-LMCZKHZV-DtpyWL_l.js → c4Diagram-LMCZKHZV-DN4YpCzk.js} +1 -1
  61. package/dist/public/assets/{calendar-2iQWonjM.js → calendar-DqGTQwGe.js} +1 -1
  62. package/dist/public/assets/channel-D04u7HkE.js +1 -0
  63. package/dist/public/assets/{checkbox-DY-vIhnZ.js → checkbox-BkZH9Oy1.js} +1 -1
  64. package/dist/public/assets/chunk-2Q5K7J3B-Cczs20mb.js +1 -0
  65. package/dist/public/assets/{chunk-32BRIVSS-J_rdnOiy.js → chunk-32BRIVSS-DqkgLIEw.js} +1 -1
  66. package/dist/public/assets/{chunk-52WLFC77-BOMCKXNP.js → chunk-52WLFC77-9s8UsQXp.js} +1 -1
  67. package/dist/public/assets/{chunk-5FCAYU7R-8Y9BJKC-.js → chunk-5FCAYU7R-CkSFjjQr.js} +1 -1
  68. package/dist/public/assets/{chunk-5HE753X5-CQEApaqU.js → chunk-5HE753X5-C1Ig4mMr.js} +1 -1
  69. package/dist/public/assets/{chunk-5JV3BV7I-Wp4ieThX.js → chunk-5JV3BV7I-CIggZV0d.js} +1 -1
  70. package/dist/public/assets/{chunk-5TONJI2A-Dht2oB5p.js → chunk-5TONJI2A-BklATmUd.js} +1 -1
  71. package/dist/public/assets/{chunk-5VM5RSS4-BtUIXst7.js → chunk-5VM5RSS4-g5HeYq-z.js} +1 -1
  72. package/dist/public/assets/{chunk-7BUUIJ7U-B7ItXXvn.js → chunk-7BUUIJ7U-Dw__VSpN.js} +1 -1
  73. package/dist/public/assets/{chunk-BIQX33UG-B4CjyNhu.js → chunk-BIQX33UG-CRLx_yn0.js} +1 -1
  74. package/dist/public/assets/{chunk-BO2N2NFS-DMgXoikU.js → chunk-BO2N2NFS-BptiXfus.js} +3 -3
  75. package/dist/public/assets/{chunk-C7G6YPKG-Bhzd4FsL.js → chunk-C7G6YPKG-CmP7ozUj.js} +1 -1
  76. package/dist/public/assets/{chunk-CQNSW5MT-CVrDoms_.js → chunk-CQNSW5MT-BZUHEMrz.js} +1 -1
  77. package/dist/public/assets/{chunk-CYSBUYHQ-N9puYKAt.js → chunk-CYSBUYHQ-BRTRwmYZ.js} +1 -1
  78. package/dist/public/assets/{chunk-EMLP6XTP-ACA6yW7o.js → chunk-EMLP6XTP-DHUO1B6Q.js} +1 -1
  79. package/dist/public/assets/{chunk-EX3LRPZG-BIvLDOrf.js → chunk-EX3LRPZG-aq_XJzX2.js} +1 -1
  80. package/dist/public/assets/{chunk-FWX5IMBZ-1CESfm5O.js → chunk-FWX5IMBZ-rnR9hrS_.js} +2 -2
  81. package/dist/public/assets/{chunk-HOUHSVGY-DTcG17JD.js → chunk-HOUHSVGY-D0096-9K.js} +1 -1
  82. package/dist/public/assets/{chunk-ICXQ74PX-CDyWyZCQ.js → chunk-ICXQ74PX-BUnmDgqa.js} +1 -1
  83. package/dist/public/assets/{chunk-JG7HCLWE-gt52jYPR.js → chunk-JG7HCLWE-BwRUs0j6.js} +1 -1
  84. package/dist/public/assets/{chunk-JWPE2WC7-BIGkO1cG.js → chunk-JWPE2WC7-BOwE-mq8.js} +1 -1
  85. package/dist/public/assets/{chunk-MOJQB5TN-dX_Ns_6-.js → chunk-MOJQB5TN-CYyw3U64.js} +1 -1
  86. package/dist/public/assets/{chunk-MOZMSUNE-DtIvb1II.js → chunk-MOZMSUNE-_aAOLW1j.js} +1 -1
  87. package/dist/public/assets/{chunk-OGEWGWER-BgCGYbch.js → chunk-OGEWGWER-DLH_3q-Z.js} +1 -1
  88. package/dist/public/assets/{chunk-OSBZ3O6U-BjU8eaT1.js → chunk-OSBZ3O6U-BOkYzK-N.js} +1 -1
  89. package/dist/public/assets/{chunk-PUDLZKDR-BtLyPGmD.js → chunk-PUDLZKDR-Co9OjZVi.js} +1 -1
  90. package/dist/public/assets/{chunk-Q4XR5HBZ-B32WTAPs.js → chunk-Q4XR5HBZ-CjNiHUWo.js} +1 -1
  91. package/dist/public/assets/{chunk-QBLGF6JB-CprENtRb.js → chunk-QBLGF6JB-Cf-f1lin.js} +1 -1
  92. package/dist/public/assets/{chunk-R7FJI6CG-DCV9Dvbs.js → chunk-R7FJI6CG-C_nyMdyL.js} +1 -1
  93. package/dist/public/assets/{chunk-RYQCIY6F-DAyLri1b.js → chunk-RYQCIY6F-DXXN4Rzo.js} +1 -1
  94. package/dist/public/assets/{chunk-U6XO7XAA-DSdpZQB7.js → chunk-U6XO7XAA-Hw5M1kkd.js} +1 -1
  95. package/dist/public/assets/{chunk-V7JOEXUC-9lX7N0EN.js → chunk-V7JOEXUC-CLdet7qK.js} +1 -1
  96. package/dist/public/assets/chunk-VAUOI2AC-D9H5NlkH.js +1 -0
  97. package/dist/public/assets/{chunk-VR4S4FIN-CcTJJ1HA.js → chunk-VR4S4FIN-CnZ3Jw81.js} +1 -1
  98. package/dist/public/assets/{chunk-WYO6CB5R-9yPqK9ib.js → chunk-WYO6CB5R-C-c-Ja6D.js} +1 -1
  99. package/dist/public/assets/chunk-XXDRQBXY-BjAUTr8E.js +1 -0
  100. package/dist/public/assets/{chunk-YOTPTUD7-DBti7bK5.js → chunk-YOTPTUD7-CBowI675.js} +1 -1
  101. package/dist/public/assets/{chunk-ZGVPDNZ5-5ruaVNfo.js → chunk-ZGVPDNZ5-DfBSa8vW.js} +1 -1
  102. package/dist/public/assets/{chunk-ZIRB5QZD-DmY1977n.js → chunk-ZIRB5QZD-Cas2Em51.js} +1 -1
  103. package/dist/public/assets/classDiagram-OUVF2IWQ-BCgYs9Pk.js +1 -0
  104. package/dist/public/assets/classDiagram-v2-EOCWNBFH-BpVLL4-U.js +1 -0
  105. package/dist/public/assets/{client-version-BCgL1GiY.js → client-version-g_nEG2h2.js} +1 -1
  106. package/dist/public/assets/comment-chips--aitTdum.js +7 -0
  107. package/dist/public/assets/{config-provider-CJmVSUcR.js → config-provider-CedEU5Ch.js} +2 -2
  108. package/dist/public/assets/{cose-bilkent-JH36ORCC-D8nyC_t4.js → cose-bilkent-JH36ORCC-CzZaHQ2l.js} +1 -1
  109. package/dist/public/assets/cynefin-VYW2F7L2-BVFEANjh.js +1 -0
  110. package/dist/public/assets/{cynefinDiagram-TSTJHNR4-B4B58YEO.js → cynefinDiagram-TSTJHNR4-7PYslCmH.js} +1 -1
  111. package/dist/public/assets/{dagre-DjTdhlGF.js → dagre-BeM31D08.js} +1 -1
  112. package/dist/public/assets/{dagre-VKFMJZFB-DQHmtQOE.js → dagre-VKFMJZFB-DsY-o9S9.js} +1 -1
  113. package/dist/public/assets/{diagram-FQU43EPY-B28ABQG6.js → diagram-FQU43EPY-Cc40Oq-m.js} +1 -1
  114. package/dist/public/assets/{diagram-G47NLZAW-1MthGQcj.js → diagram-G47NLZAW-DdbiGkJk.js} +1 -1
  115. package/dist/public/assets/{diagram-NH7WQ7WH-B_Fhjw29.js → diagram-NH7WQ7WH-BoEA_7qN.js} +1 -1
  116. package/dist/public/assets/{diagram-OA4YK3LP-1B7_yz5p.js → diagram-OA4YK3LP-ChsGI8c4.js} +1 -1
  117. package/dist/public/assets/{diagram-WEI45ONY-DzfuKRxf.js → diagram-WEI45ONY-znZ94tAq.js} +1 -1
  118. package/dist/public/assets/{dialog-TkFkuYVg.js → dialog-6-bc7qPg.js} +1 -1
  119. package/dist/public/assets/{dist-BObw0jPE.js → dist-B25wDFyk.js} +1 -1
  120. package/dist/public/assets/{dist-C7rVxfRB.js → dist-BMMI5Kdg.js} +1 -1
  121. package/dist/public/assets/{dist-DGzvBIzr.js → dist-C4Kl8QaT.js} +1 -1
  122. package/dist/public/assets/{dist-D1zECWv_.js → dist-C7VIqwIG.js} +1 -1
  123. package/dist/public/assets/{dist-BR00oFrA2.js → dist-CsRIthsw2.js} +1 -1
  124. package/dist/public/assets/{dist-Dhbvx6Ut.js → dist-Cv2LF2DL.js} +178 -176
  125. package/dist/public/assets/{dist-CP0xcBf_.js → dist-CxGvJvCN.js} +1 -1
  126. package/dist/public/assets/{dist-DifRwKW-.js → dist-DPWWCZ4h.js} +1 -1
  127. package/dist/public/assets/{dist-Cqbn6bM9.js → dist-Dcu3hl7e.js} +1 -1
  128. package/dist/public/assets/{dist-CiPafPDy.js → dist-DdFyq-YY.js} +1 -1
  129. package/dist/public/assets/{dist-ChSSPf9y.js → dist-DlSSwTCj.js} +1 -1
  130. package/dist/public/assets/{dist-CslAqn54.js → dist-DmIoqGC0.js} +1 -1
  131. package/dist/public/assets/{dist-DL8cni8v.js → dist-Dolq1sN0.js} +1 -1
  132. package/dist/public/assets/{dist-ioWbCXab.js → dist-P9LB04An.js} +1 -1
  133. package/dist/public/assets/{doc-hash-BzYXjFJp.js → doc-hash-unBeSU8C.js} +1 -1
  134. package/dist/public/assets/{documents-events-NL4RG6fU.js → documents-events-DJXnk07Z.js} +1 -1
  135. package/dist/public/assets/{ebnfDiagram-CCIWWBDH-BjazoYYO.js → ebnfDiagram-CCIWWBDH-DX6whEUG.js} +1 -1
  136. package/dist/public/assets/{erDiagram-Q63AITRT-DvgiLWl5.js → erDiagram-Q63AITRT-CgloxApp.js} +1 -1
  137. package/dist/public/assets/{esm-HV7Pxfbn.js → esm-QF0-_nlB.js} +1 -1
  138. package/dist/public/assets/eventmodeling-45OFAUF4-usNuB_rF.js +1 -0
  139. package/dist/public/assets/{file-tree-adapter-C3r5x-03.js → file-tree-adapter-C9l0Uy9t.js} +1 -1
  140. package/dist/public/assets/{file-tree-utils-DnNGot8D.js → file-tree-utils-Cy6smqXE.js} +1 -1
  141. package/dist/public/assets/flowDiagram-23GEKE2U-CDs0Vlps.js +1 -0
  142. package/dist/public/assets/{follow-file-BghdVu5J.js → follow-file-BVJ6G9Hs.js} +1 -1
  143. package/dist/public/assets/{ganttDiagram-NO4QXBWP-CJgOU-j1.js → ganttDiagram-NO4QXBWP-BZQXYXPf.js} +1 -1
  144. package/dist/public/assets/gitGraph-TEB2WS4Q-DXc_YvuI.js +1 -0
  145. package/dist/public/assets/{gitGraphDiagram-IHSO6WYX-DYP87cJL.js → gitGraphDiagram-IHSO6WYX-DnT15zfc.js} +1 -1
  146. package/dist/public/assets/{globals-C7y6kfQ9.js → globals-CdX3jOLC.js} +2 -2
  147. package/dist/public/assets/globals-Cf_md-qZ.css +1 -0
  148. package/dist/public/assets/{graphlib-DYCc0Y9o.js → graphlib-CIYGRnfF.js} +1 -1
  149. package/dist/public/assets/{highlighted-body-OFNGDK62-C9GzQB8c.js → highlighted-body-OFNGDK62-DN5QVB2g.js} +1 -1
  150. package/dist/public/assets/index-BnCzVIZM.js +2014 -0
  151. package/dist/public/assets/info-DKCQHKI2-C0DL9Ht0.js +1 -0
  152. package/dist/public/assets/{infoDiagram-FWYZ7A6U-CbZOQ254.js → infoDiagram-FWYZ7A6U-CPJF9vn1.js} +1 -1
  153. package/dist/public/assets/{ishikawaDiagram-FXEZZL3T-CUWPHUOP.js → ishikawaDiagram-FXEZZL3T-CPmyb7Oh.js} +1 -1
  154. package/dist/public/assets/{journeyDiagram-5HDEW3XC-RLUp44OU.js → journeyDiagram-5HDEW3XC-DHsl5S9z.js} +1 -1
  155. package/dist/public/assets/{kanban-definition-HUTT4EX6-D4TPhDQW.js → kanban-definition-HUTT4EX6-BS2xX-qh.js} +1 -1
  156. package/dist/public/assets/{line-KTG0S8eM.js → line-PfwSO0Y4.js} +1 -1
  157. package/dist/public/assets/{linear-D6fTctUn.js → linear-DY7zcaob.js} +1 -1
  158. package/dist/public/assets/{lint-config-client-CrVQnAJl.js → lint-config-client-SBOLqEAH.js} +1 -1
  159. package/dist/public/assets/{map-Rw6uJqFR.js → map-B5g_BAkn.js} +1 -1
  160. package/dist/public/assets/{markdownlint-rule-browser-Cb6F_hct.js → markdownlint-rule-browser-u-niNZkQ.js} +1 -1
  161. package/dist/public/assets/mermaid-GHXKKRXX-C9klxgAS.js +1 -0
  162. package/dist/public/assets/{mermaid-parser.core-CusxBOjy.js → mermaid-parser.core-DtiAO5KW.js} +2 -2
  163. package/dist/public/assets/{mermaid.core-okCkIUps.js → mermaid.core-2-fa7F6R.js} +3 -3
  164. package/dist/public/assets/{mindmap-definition-LN4V7U3C-D-eGlMvq.js → mindmap-definition-LN4V7U3C-CTVrQgzc.js} +1 -1
  165. package/dist/public/assets/{navigation-targets-CILnJhFW.js → navigation-targets-CRrgSRY3.js} +1 -1
  166. package/dist/public/assets/{now-DRL8tqfF.js → now-bAD2ZsK-.js} +1 -1
  167. package/dist/public/assets/{open-managed-artifact-tab-CoiXLY4g.js → open-managed-artifact-tab-DKpdEiZk.js} +1 -1
  168. package/dist/public/assets/{ordinal-DnmHW-WD.js → ordinal-Dj8tTCMd.js} +1 -1
  169. package/dist/public/assets/packet-7NZHBO7P-BpFruX6n.js +1 -0
  170. package/dist/public/assets/{panel-C8ZhM4q-.js → panel-BbxjQP3-.js} +1 -1
  171. package/dist/public/assets/{pegDiagram-2B236MQR-Bjnm3xCN.js → pegDiagram-2B236MQR-DVy6JL4F.js} +1 -1
  172. package/dist/public/assets/{pending-receive-nav-store-BYGxrnRS.js → pending-receive-nav-store-EO01lM9G.js} +1 -1
  173. package/dist/public/assets/pie-RZYD4A2V-lVpCCOkJ.js +1 -0
  174. package/dist/public/assets/{pieDiagram-ENE6RG2P-BkLpbnFN.js → pieDiagram-ENE6RG2P-Kxbx45IP.js} +1 -1
  175. package/dist/public/assets/{project-paths-Dwo4Of8C.js → project-paths-DdZAF_-I.js} +1 -1
  176. package/dist/public/assets/{prop-types-BX5rHy8u.js → prop-types-DDnDOUmp.js} +1 -1
  177. package/dist/public/assets/{quadrantDiagram-ABIIQ3AL-eMGNkhp-.js → quadrantDiagram-ABIIQ3AL-BbCFEjhq.js} +1 -1
  178. package/dist/public/assets/radar-I7S5WNFK-Bd-i9axl.js +1 -0
  179. package/dist/public/assets/railroad-3IZDKUUU-D6ewe_eA.js +1 -0
  180. package/dist/public/assets/railroad-abnf-AHOZXSZD-DKqyYXL-.js +1 -0
  181. package/dist/public/assets/railroad-ebnf-EBAXGLYW-CtMezBX2.js +1 -0
  182. package/dist/public/assets/railroad-peg-LSFZ7HO6-DJ-63J6n.js +1 -0
  183. package/dist/public/assets/{railroadDiagram-RFXS5EU6-Cs70gdc4.js → railroadDiagram-RFXS5EU6-6SEpaCgo.js} +1 -1
  184. package/dist/public/assets/{receive-store-Cuer2-MQ.js → receive-store-CCj5OCl8.js} +1 -1
  185. package/dist/public/assets/{requirementDiagram-TGXJPOKE-yQhnovOU.js → requirementDiagram-TGXJPOKE-brbJ6VUS.js} +1 -1
  186. package/dist/public/assets/{sankeyDiagram-HTMAVEWB-C7R3anws.js → sankeyDiagram-HTMAVEWB-DT0MK3ep.js} +1 -1
  187. package/dist/public/assets/{schema-fields-view-intent-D_s-Cynn.js → schema-fields-view-intent-CDu72Aty.js} +1 -1
  188. package/dist/public/assets/{selection-context-BLRRQXPM.js → selection-context-CsoqdVq1.js} +1 -1
  189. package/dist/public/assets/{sequenceDiagram-DBY2YBRQ-CEdbVotz.js → sequenceDiagram-DBY2YBRQ-BPJt9blB.js} +1 -1
  190. package/dist/public/assets/{sizeCapture-X5ZJPWSS-DAh96RVo.js → sizeCapture-X5ZJPWSS-1l7G4SwD.js} +1 -1
  191. package/dist/public/assets/skill-actions-4cV_4pjw.js +1 -0
  192. package/dist/public/assets/{skills-api-By8un6BC.js → skills-api-141pFhWO.js} +1 -1
  193. package/dist/public/assets/{src-oESxEYNL.js → src-0hFiTIuh.js} +1 -1
  194. package/dist/public/assets/{src--OxBHrEw.js → src-CaBa9Z1L.js} +1 -1
  195. package/dist/public/assets/{stateDiagram-2N3HPSRC-q96Dmt4i.js → stateDiagram-2N3HPSRC-QGlUFt6h.js} +1 -1
  196. package/dist/public/assets/stateDiagram-v2-6OUMAXLB-D_6D-nLI.js +1 -0
  197. package/dist/public/assets/{swimlanes-5IMT3BWC--g7Ac5Wk.js → swimlanes-5IMT3BWC-BHsr6MBF.js} +2 -2
  198. package/dist/public/assets/swimlanesDiagram-G3AALYLV-cqXTLbrM.js +8 -0
  199. package/dist/public/assets/{tag-pill-input-BIioVLJo.js → tag-pill-input-C4VKdytg.js} +1 -1
  200. package/dist/public/assets/{target-navigation-intent-YwxjtaLV.js → target-navigation-intent-BzJodEAL.js} +1 -1
  201. package/dist/public/assets/{telemetry-impl-BFTBY40l.js → telemetry-impl-DV07MMfz.js} +2 -2
  202. package/dist/public/assets/{telemetry-startup-DI3YRseI.js → telemetry-startup-Cy1VVosp.js} +1 -1
  203. package/dist/public/assets/terminal-launch-events-Bz4DL9DZ.js +1 -0
  204. package/dist/public/assets/{terminal-telemetry-BLN1ghOs.js → terminal-telemetry-CXqhqIkk.js} +1 -1
  205. package/dist/public/assets/{thread-client-C0O75Kza.js → thread-client-CSOJeVWW.js} +1 -1
  206. package/dist/public/assets/{timeline-definition-FHXFAJF6-DqrkK_6w.js → timeline-definition-FHXFAJF6-DitS4FqW.js} +1 -1
  207. package/dist/public/assets/treeView-QDETBFTQ-CuznZlQn.js +1 -0
  208. package/dist/public/assets/treemap-6X3UGDF4-DCd6umeO.js +1 -0
  209. package/dist/public/assets/typing-burst-detector-DuRvcTVz.js +8 -0
  210. package/dist/public/assets/{uninstall-ousBF288.js → uninstall-9ZXPO59t.js} +1 -1
  211. package/dist/public/assets/use-activity-panel-BBGq_DFB.js +1 -0
  212. package/dist/public/assets/{use-apply-config-color-theme-VdlJaZ0G.js → use-apply-config-color-theme-zM7Oux5u.js} +2 -2
  213. package/dist/public/assets/{use-collab-url-DU2XMK58.js → use-collab-url-81TC8Fvz.js} +1 -1
  214. package/dist/public/assets/{use-live-xterm-theme-DVzY8LXJ.js → use-live-xterm-theme-DeW6SO6V.js} +1 -1
  215. package/dist/public/assets/use-settings-route-KYTTaHV0.js +1 -0
  216. package/dist/public/assets/{use-terminal-enabled-BoKa-wLe.js → use-terminal-enabled-qjUlZ0f0.js} +1 -1
  217. package/dist/public/assets/use-timeline-entry-diff-svkep662.js +6 -0
  218. package/dist/public/assets/{use-workspace-DwK7HqI3.js → use-workspace-CNU53RmX.js} +1 -1
  219. package/dist/public/assets/{vennDiagram-L72KCM5P-DFSXk11G.js → vennDiagram-L72KCM5P-D7jabRjK.js} +1 -1
  220. package/dist/public/assets/wardley-OPB4EBWU-DH0Qf9r4.js +1 -0
  221. package/dist/public/assets/{wardleyDiagram-EHGQE667-Bw65HviB.js → wardleyDiagram-EHGQE667-C3olh_ef.js} +1 -1
  222. package/dist/public/assets/{workspace-paths-DSoqUSNl.js → workspace-paths-DGKkpMQ9.js} +1 -1
  223. package/dist/public/assets/{xychartDiagram-FW5EYKEG-CEVfZ0d5.js → xychartDiagram-FW5EYKEG-WqIWQJdh.js} +1 -1
  224. package/dist/public/index.html +93 -92
  225. package/dist/public/uninstall.html +10 -10
  226. package/dist/{repair-launch-json-DcxpqtPk.mjs → repair-launch-json-B-4hsfw8.mjs} +2 -2
  227. package/dist/{repair-mcp-configs-CR0w_9a_.mjs → repair-mcp-configs--yGPDCBl.mjs} +2 -2
  228. package/dist/repair-skills-C40390Fl.mjs +1 -0
  229. package/dist/{repair-skills-SFM8UbHd.mjs → repair-skills-CH8FwF78.mjs} +2 -2
  230. package/dist/{server-lock-DKdlkhpB.mjs → server-lock-D6rSSnhg.mjs} +2 -2
  231. package/dist/server-lock-RCr-Pegf.mjs +1 -0
  232. package/dist/{sleep-DDnWCWup.mjs → sleep-IcuyYCzq.mjs} +24 -24
  233. package/dist/{src-BK8Vvk9Y.mjs → src-2StQCkyf.mjs} +123 -121
  234. package/dist/{src-D5b5YKY3.mjs → src-CwNOE4ri.mjs} +1 -1
  235. package/dist/src-DV_Dbu6a.mjs +3275 -0
  236. package/dist/{src-CBz1zxch.mjs → src-y0VSl78g.mjs} +6 -6
  237. package/dist/start-Bc5XMp-q.mjs +1 -0
  238. package/dist/{start-BgSe0IWK.mjs → start-D-Yu2Dgc.mjs} +3 -3
  239. package/dist/{write-project-skill-IitZHJK2.mjs → write-project-skill-W6wm8WGO.mjs} +4 -4
  240. package/package.json +5 -5
  241. package/dist/constants-CrnIZ43q.mjs +0 -2
  242. package/dist/fs-traced-CeWo_16n.mjs +0 -1
  243. package/dist/git-handle-CEBr8e47.mjs +0 -1
  244. package/dist/init-DUJ-mhxU.mjs +0 -1
  245. package/dist/loader-D4TBMIRP.mjs +0 -1
  246. package/dist/md-manager-R-9E_3qL.mjs +0 -2
  247. package/dist/preview-EXWt03kG.mjs +0 -1
  248. package/dist/public/assets/CodeMirrorPropInput-BQX8xzkZ.js +0 -3
  249. package/dist/public/assets/FeedbackForm-DyWcK0_u.js +0 -1
  250. package/dist/public/assets/GraphPanel-C0b5lyLq.js +0 -44
  251. package/dist/public/assets/PropertyPanel-DjnXiFVP.js +0 -2
  252. package/dist/public/assets/TerminalSessionsHost-fGKRakWG.js +0 -2
  253. package/dist/public/assets/ThreadView-CQui3mRB.js +0 -6
  254. package/dist/public/assets/architecture-TIHT7OUA-DhKVyAdC.js +0 -1
  255. package/dist/public/assets/auth-state-cache-WFzLfVsU.js +0 -11
  256. package/dist/public/assets/channel-D7XYjy4a.js +0 -1
  257. package/dist/public/assets/chunk-2Q5K7J3B-BpVQiBsM.js +0 -1
  258. package/dist/public/assets/chunk-VAUOI2AC-buA1NS7h.js +0 -1
  259. package/dist/public/assets/chunk-XXDRQBXY-Dpdm1nrz.js +0 -1
  260. package/dist/public/assets/classDiagram-OUVF2IWQ-BdRcUr99.js +0 -1
  261. package/dist/public/assets/classDiagram-v2-EOCWNBFH-4fffeoHu.js +0 -1
  262. package/dist/public/assets/cynefin-VYW2F7L2-BlrdxSfe.js +0 -1
  263. package/dist/public/assets/eventmodeling-45OFAUF4-D8s6Yevv.js +0 -1
  264. package/dist/public/assets/flowDiagram-23GEKE2U-hlKdkNzZ.js +0 -1
  265. package/dist/public/assets/gitGraph-TEB2WS4Q-B-5iqxxO.js +0 -1
  266. package/dist/public/assets/globals-BtCTpjIr.css +0 -1
  267. package/dist/public/assets/index-DuOqh37t.js +0 -2013
  268. package/dist/public/assets/info-DKCQHKI2-CkzkGEPY.js +0 -1
  269. package/dist/public/assets/mermaid-GHXKKRXX-WtDC9WMV.js +0 -1
  270. package/dist/public/assets/packet-7NZHBO7P-DDIvLOTX.js +0 -1
  271. package/dist/public/assets/pie-RZYD4A2V-DnssmCEa.js +0 -1
  272. package/dist/public/assets/radar-I7S5WNFK-0J5y2_MO.js +0 -1
  273. package/dist/public/assets/railroad-3IZDKUUU-BgsONsxl.js +0 -1
  274. package/dist/public/assets/railroad-abnf-AHOZXSZD-BhBo_9j9.js +0 -1
  275. package/dist/public/assets/railroad-ebnf-EBAXGLYW-B5mHA2IL.js +0 -1
  276. package/dist/public/assets/railroad-peg-LSFZ7HO6-BV4uZ4WL.js +0 -1
  277. package/dist/public/assets/skill-actions-DEa7Mqcd.js +0 -1
  278. package/dist/public/assets/stateDiagram-v2-6OUMAXLB-BCNHhMpC.js +0 -1
  279. package/dist/public/assets/swimlanesDiagram-G3AALYLV-hRuoLGg3.js +0 -8
  280. package/dist/public/assets/terminal-launch-events-7D-deCwp.js +0 -1
  281. package/dist/public/assets/treeView-QDETBFTQ-N2YNex2I.js +0 -1
  282. package/dist/public/assets/treemap-6X3UGDF4-DkzYKeau.js +0 -1
  283. package/dist/public/assets/typing-burst-detector-CaC_du54.js +0 -8
  284. package/dist/public/assets/use-activity-panel-CVU0EVdO.js +0 -1
  285. package/dist/public/assets/use-settings-route-FnSIe1ir.js +0 -1
  286. package/dist/public/assets/use-timeline-entry-diff-CF4QQ4Me.js +0 -6
  287. package/dist/public/assets/wardley-OPB4EBWU-OOiOMSoP.js +0 -1
  288. package/dist/repair-skills-Zy_JOsHR.mjs +0 -1
  289. package/dist/server-lock-Dp1Aw6AQ.mjs +0 -1
  290. package/dist/src-BIJtc8LA.mjs +0 -3275
  291. package/dist/start-D2rWspqr.mjs +0 -1
  292. /package/dist/public/assets/{ActivityPanelDiffView-B03Wzvap.js → ActivityPanelDiffView-DYFlG61N.js} +0 -0
  293. /package/dist/public/assets/{AppMenubar-Bisp0k8X.js → AppMenubar-DHWqgWXl.js} +0 -0
  294. /package/dist/public/assets/{ConfigSharingInfoTooltip-DMbsfWD9.js → ConfigSharingInfoTooltip-BMJ7SIjf.js} +0 -0
  295. /package/dist/public/assets/{__vite-browser-external-BckCY-VI.js → __vite-browser-external-z7jTWlYs.js} +0 -0
  296. /package/dist/public/assets/{agent-presence-CEfNcJUY.js → agent-presence-BdWbAeV-.js} +0 -0
  297. /package/dist/public/assets/{array-D9gZmznT.js → array-CC6md2n_.js} +0 -0
  298. /package/dist/public/assets/{badge-Dba4cvJR.js → badge-DXHoKHez.js} +0 -0
  299. /package/dist/public/assets/{chunk-KEIR6QF5-zkgbDrf9.js → chunk-KEIR6QF5-BppCe61B.js} +0 -0
  300. /package/dist/public/assets/{chunk-Y2CYZVJY-BAUBUeAF.js → chunk-Y2CYZVJY-CP7lNZai.js} +0 -0
  301. /package/dist/public/assets/{clike-ccBqxK3t.js → clike-BAopx-wt.js} +0 -0
  302. /package/dist/public/assets/{clipboard-adapter-Cxzkvc1d.js → clipboard-adapter-ZCy01ehf.js} +0 -0
  303. /package/dist/public/assets/{colors-BZ7r12jC.js → colors-QyrgP4ww.js} +0 -0
  304. /package/dist/public/assets/{config-context-gd3BC-iY.js → config-context-D3FvmHZm.js} +0 -0
  305. /package/dist/public/assets/{copilot-CjOGWDvv.js → copilot-BiqH8PgI.js} +0 -0
  306. /package/dist/public/assets/{cursor-B8rehP9c.js → cursor-BDHSyD-9.js} +0 -0
  307. /package/dist/public/assets/{cytoscape.esm-GtliGICm.js → cytoscape.esm-Ci36Fm6r.js} +0 -0
  308. /package/dist/public/assets/{defaultLocale-CqKPYlUZ.js → defaultLocale-ByXO85kN.js} +0 -0
  309. /package/dist/public/assets/{desktop-bridge-types--ZPzhkC9.js → desktop-bridge-types-DHaZbwZ0.js} +0 -0
  310. /package/dist/public/assets/{diff-oW0nWZgn.js → diff-KHO8LkSI.js} +0 -0
  311. /package/dist/public/assets/{dist-BLAMau9Z.js → dist-B8I5m7M1.js} +0 -0
  312. /package/dist/public/assets/{dist-q14fBS3T.js → dist-BCZq3DKc.js} +0 -0
  313. /package/dist/public/assets/{dist-zCmaEyrL.js → dist-Bpk5HQQh.js} +0 -0
  314. /package/dist/public/assets/{dist-B1Jbz0yl.js → dist-Cljnhi3D.js} +0 -0
  315. /package/dist/public/assets/{dist-DNwOaDhC.js → dist-D7mv9smG.js} +0 -0
  316. /package/dist/public/assets/{documents-fetch-CLL0O1of.js → documents-fetch-Db-Ikele.js} +0 -0
  317. /package/dist/public/assets/{external-link-T4Nj1gcG.js → external-link-Ct0_ujyY.js} +0 -0
  318. /package/dist/public/assets/{field-DVIFAnvR.js → field-BNyAQHKf.js} +0 -0
  319. /package/dist/public/assets/{file-tree-rename-validation-wADtjYEi.js → file-tree-rename-validation-DDA1ck2Y.js} +0 -0
  320. /package/dist/public/assets/{form-coxG-8Qw.js → form-gDsa08Xi.js} +0 -0
  321. /package/dist/public/assets/{format-CejNFduS.js → format-4tjAvLkN.js} +0 -0
  322. /package/dist/public/assets/{go-CCS4kWKN.js → go-7c8IMl4m.js} +0 -0
  323. /package/dist/public/assets/{init-CMTNTj66.js → init-CL1Yxhhi.js} +0 -0
  324. /package/dist/public/assets/{input-D0ZW0Opq.js → input-D4OPkja2.js} +0 -0
  325. /package/dist/public/assets/{isObject-Ho9jn-6g.js → isObject-5PVyZ800.js} +0 -0
  326. /package/dist/public/assets/{libesm-Db-3Gx3Z.js → libesm-WVpTb_tB.js} +0 -0
  327. /package/dist/public/assets/{lint-plugin-meta-DKTiO7RO.js → lint-plugin-meta-BoxMoaxR.js} +0 -0
  328. /package/dist/public/assets/{lru-string-cache-BZxOuxTi.js → lru-string-cache-7Y9kMeow.js} +0 -0
  329. /package/dist/public/assets/{lua-DgAwqJ0D.js → lua-DnREcbBQ.js} +0 -0
  330. /package/dist/public/assets/{mcp-consent-store-wvrClpLC.js → mcp-consent-store-CDAQY6Np.js} +0 -0
  331. /package/dist/public/assets/{min-BQPeeNfF.js → min-DVq-2erP.js} +0 -0
  332. /package/dist/public/assets/{minus-SecfYzeQ.js → minus-CI_HyT1V.js} +0 -0
  333. /package/dist/public/assets/{overlay-layers-y-dNUWSd.js → overlay-layers-Dhz8IqAf.js} +0 -0
  334. /package/dist/public/assets/{panel-right-open-B7ziq39V.js → panel-right-open-CWgBRlZa.js} +0 -0
  335. /package/dist/public/assets/{panzoom.es-CxTS7ZPP.js → panzoom.es-D0o6IaL6.js} +0 -0
  336. /package/dist/public/assets/{paperclip-CX7J_G-w.js → paperclip-FiPqbd6f.js} +0 -0
  337. /package/dist/public/assets/{parse-api-error-C_gwkKmG.js → parse-api-error-BtEL2kxi.js} +0 -0
  338. /package/dist/public/assets/{path-DoEWlp6O.js → path-BGTOauh6.js} +0 -0
  339. /package/dist/public/assets/{pdf-Da_O_GF5.js → pdf-DLVdEoR9.js} +0 -0
  340. /package/dist/public/assets/{pdf.worker-Pbs_-93C.js → pdf.worker-Cuhr1SjJ.js} +0 -0
  341. /package/dist/public/assets/{perl-DMwerdcj.js → perl-D6YK7dbe.js} +0 -0
  342. /package/dist/public/assets/{properties-Du1Kuwqc.js → properties-BPzWpIa7.js} +0 -0
  343. /package/dist/public/assets/{r-wSvpRg5h.js → r-tzVlUzeq.js} +0 -0
  344. /package/dist/public/assets/{refresh-cw-BfeWGCsv.js → refresh-cw-DClG_qgN.js} +0 -0
  345. /package/dist/public/assets/{rough.esm-esi5HKC4.js → rough.esm-kQd3CdGR.js} +0 -0
  346. /package/dist/public/assets/{ruby-DuM6hMQW.js → ruby-_eAC-08N.js} +0 -0
  347. /package/dist/public/assets/{share-metadata-rows-CbXHISQ4.js → share-metadata-rows-Ds3RIKZ4.js} +0 -0
  348. /package/dist/public/assets/{shell-BZ7mgeL0.js → shell-CRkrz4LQ.js} +0 -0
  349. /package/dist/public/assets/{skeleton-BG12Hmzn.js → skeleton-Mo1oLtEu.js} +0 -0
  350. /package/dist/public/assets/{sliders-horizontal-34K0eDW2.js → sliders-horizontal-BNv-Koqw.js} +0 -0
  351. /package/dist/public/assets/{sortable.esm-C565D25d.js → sortable.esm-_jt9EfAF.js} +0 -0
  352. /package/dist/public/assets/{sql-BXdRuz6d.js → sql-BtxU5QDI.js} +0 -0
  353. /package/dist/public/assets/{src-DNE52RZP.js → src-BJaEWo8x.js} +0 -0
  354. /package/dist/public/assets/{startup-marks-CqVzdU1y.js → startup-marks-CyxDWRgR.js} +0 -0
  355. /package/dist/public/assets/{stex-CniH6-Mv.js → stex-EWGki41Z.js} +0 -0
  356. /package/dist/public/assets/{swift-DZwxTp-L.js → swift-BmtuXdIg.js} +0 -0
  357. /package/dist/public/assets/{textarea-tdCJViKf.js → textarea-bScbzsdX.js} +0 -0
  358. /package/dist/public/assets/{thread-draft-staging-BuvCYJwg.js → thread-draft-staging-CKJIG41d.js} +0 -0
  359. /package/dist/public/assets/{timeline-diff-store-CYckprSS.js → timeline-diff-store-BwCud4Ug.js} +0 -0
  360. /package/dist/public/assets/{toml-C5KR4pi6.js → toml-yD0H4nkp.js} +0 -0
  361. /package/dist/public/assets/{trash-2-BUuL4OCw.js → trash-2-DE3a7L75.js} +0 -0
  362. /package/dist/public/assets/{triangle-alert-Clgvyc7B.js → triangle-alert-Bcc1P5yx.js} +0 -0
  363. /package/dist/public/assets/{use-installed-clis-UlK7P1aH.js → use-installed-clis-8r2iSkgN.js} +0 -0
  364. /package/dist/public/assets/{useLintConfigViewMode-DKPENttR.js → useLintConfigViewMode-CyzSEZ5z.js} +0 -0
  365. /package/dist/public/assets/{worktree-store-LSx9q9Ga.js → worktree-store-B-NxI13K.js} +0 -0
  366. /package/dist/public/assets/{wrench-BfoTvqT9.js → wrench-4e3jxe5l.js} +0 -0
  367. /package/dist/public/assets/{x-DVkpYo5d.js → x-Du5jsNHa.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-BAUBUeAF.js";import{t}from"./src--OxBHrEw.js";import{A as n,F as r,G as i,H as a,K as o,O as s,U as c,a as l,b as u,c as d,i as f,r as p,s as m,v as h,w as g,x as _,y as v,z as y}from"./chunk-WYO6CB5R-9yPqK9ib.js";import{C as b}from"./src-DNE52RZP.js";import{t as x}from"./dist-zCmaEyrL.js";import{g as S,p as C}from"./chunk-ICXQ74PX-CDyWyZCQ.js";import{a as w,c as T,i as E,n as D,r as O,s as k}from"./chunk-32BRIVSS-J_rdnOiy.js";import{t as A}from"./chunk-2Q5K7J3B-BpVQiBsM.js";import{n as j,t as M}from"./chunk-ZIRB5QZD-DmY1977n.js";var N=x(),P=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,12],l=[1,14],u=[1,15],d=[1,17],f=[1,18],p=[1,19],m=[1,25],h=[1,26],g=[1,27],_=[1,28],v=[1,29],y=[1,30],b=[1,31],x=[1,32],S=[1,33],C=[1,34],w=[1,35],T=[1,36],E=[1,37],D=[1,38],O=[1,39],k=[1,40],A=[1,42],j=[1,43],M=[1,44],N=[1,45],P=[1,46],F=[1,47],I=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],ee=[1,74],L=[1,80],R=[1,81],te=[1,82],ne=[1,83],z=[1,84],B=[1,85],V=[1,86],re=[1,87],H=[1,88],U=[1,89],W=[1,90],ie=[1,91],ae=[1,92],oe=[1,93],G=[1,94],se=[1,95],K=[1,96],ce=[1,97],le=[1,98],ue=[1,99],de=[1,100],fe=[1,101],pe=[1,102],me=[1,103],he=[1,104],ge=[1,105],_e=[2,78],ve=[4,5,17,51,53,54],ye=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],be=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],xe=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Se=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Ce=[5,52],q=[70,71,72,73],J=[1,151],we={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NEWLINE`,6:`SD`,10:`INVALID`,14:`create`,15:`box`,16:`restOfLine`,17:`end`,19:`autonumber`,20:`NUM`,21:`off`,22:`activate`,24:`deactivate`,30:`title`,31:`legacy_title`,32:`acc_title`,33:`acc_title_value`,34:`acc_descr`,35:`acc_descr_value`,36:`acc_descr_multiline_value`,37:`loop`,38:`rect`,39:`opt`,40:`alt`,42:`par`,44:`par_over`,45:`critical`,47:`break`,48:`option`,49:`and`,50:`else`,51:`participant`,52:`AS`,53:`participant_actor`,54:`destroy`,56:`note`,59:`over`,61:`links`,62:`link`,63:`properties`,64:`details`,66:`,`,67:`left_of`,68:`right_of`,70:`+`,71:`-`,72:`()`,73:`ACTOR`,75:`CONFIG_START`,76:`CONFIG_CONTENT`,77:`CONFIG_END`,78:`SOLID_OPEN_ARROW`,79:`DOTTED_OPEN_ARROW`,80:`SOLID_ARROW`,81:`SOLID_ARROW_TOP`,82:`SOLID_ARROW_BOTTOM`,83:`STICK_ARROW_TOP`,84:`STICK_ARROW_BOTTOM`,85:`SOLID_ARROW_TOP_DOTTED`,86:`SOLID_ARROW_BOTTOM_DOTTED`,87:`STICK_ARROW_TOP_DOTTED`,88:`STICK_ARROW_BOTTOM_DOTTED`,89:`SOLID_ARROW_TOP_REVERSE`,90:`SOLID_ARROW_BOTTOM_REVERSE`,91:`STICK_ARROW_TOP_REVERSE`,92:`STICK_ARROW_BOTTOM_REVERSE`,93:`SOLID_ARROW_TOP_REVERSE_DOTTED`,94:`SOLID_ARROW_BOTTOM_REVERSE_DOTTED`,95:`STICK_ARROW_TOP_REVERSE_DOTTED`,96:`STICK_ARROW_BOTTOM_REVERSE_DOTTED`,97:`BIDIRECTIONAL_SOLID_ARROW`,98:`DOTTED_ARROW`,99:`BIDIRECTIONAL_DOTTED_ARROW`,100:`SOLID_CROSS`,101:`DOTTED_CROSS`,102:`SOLID_POINT`,103:`DOTTED_POINT`,104:`TXT`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.apply(a[s]),a[s];case 4:case 10:this.$=[];break;case 5:case 11:a[s-1].push(a[s]),this.$=a[s-1];break;case 6:case 7:case 12:case 13:this.$=a[s];break;case 8:case 9:case 14:this.$=[];break;case 16:a[s].type=`createParticipant`,this.$=a[s];break;case 17:a[s-1].unshift({type:`boxStart`,boxData:r.parseBoxData(a[s-2])}),a[s-1].push({type:`boxEnd`,boxText:a[s-2]}),this.$=a[s-1];break;case 19:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-2]),sequenceIndexStep:Number(a[s-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:`sequenceIndex`,sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:`sequenceIndex`,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 23:this.$={type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor};break;case 24:this.$={type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1].actor};break;case 30:r.setDiagramTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 31:r.setDiagramTitle(a[s].substring(7)),this.$=a[s].substring(7);break;case 32:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 33:case 34:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 35:a[s-1].unshift({type:`loopStart`,loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:`loopEnd`,loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 36:a[s-1].unshift({type:`rectStart`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:`rectEnd`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 37:a[s-1].unshift({type:`optStart`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:`optEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 38:a[s-1].unshift({type:`altStart`,altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:`altEnd`,signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 39:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 40:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_OVER_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 41:a[s-1].unshift({type:`criticalStart`,criticalText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.CRITICAL_START}),a[s-1].push({type:`criticalEnd`,signalType:r.LINETYPE.CRITICAL_END}),this.$=a[s-1];break;case 42:a[s-1].unshift({type:`breakStart`,breakText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_START}),a[s-1].push({type:`breakEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_END}),this.$=a[s-1];break;case 44:this.$=a[s-3].concat([{type:`option`,optionText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.CRITICAL_OPTION},a[s]]);break;case 46:this.$=a[s-3].concat([{type:`and`,parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 48:this.$=a[s-3].concat([{type:`else`,altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 49:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 50:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 51:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 52:case 57:a[s-1].draw=`actor`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 53:a[s-1].type=`destroyParticipant`,this.$=a[s-1];break;case 54:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 55:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 56:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 58:this.$=[a[s-1],{type:`addNote`,placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 59:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:`addNote`,placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 60:this.$=[a[s-1],{type:`addLinks`,actor:a[s-1].actor,text:a[s]}];break;case 61:this.$=[a[s-1],{type:`addALink`,actor:a[s-1].actor,text:a[s]}];break;case 62:this.$=[a[s-1],{type:`addProperties`,actor:a[s-1].actor,text:a[s]}];break;case 63:this.$=[a[s-1],{type:`addDetails`,actor:a[s-1].actor,text:a[s]}];break;case 66:this.$=[a[s-2],a[s]];break;case 67:this.$=a[s];break;case 68:this.$=r.PLACEMENT.LEFTOF;break;case 69:this.$=r.PLACEMENT.RIGHTOF;break;case 70:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0},{type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor}];break;case 71:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4].actor}];break;case 72:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor}];break;case 73:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s],activate:!1,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-4].actor}];break;case 74:this.$=[a[s-5],a[s-1],{type:`addMessage`,from:a[s-5].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-5].actor}];break;case 75:this.$=[a[s-3],a[s-1],{type:`addMessage`,from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 76:this.$={type:`addParticipant`,actor:a[s-1],config:a[s]};break;case 77:this.$=a[s-1].trim();break;case 78:this.$={type:`addParticipant`,actor:a[s]};break;case 79:this.$=r.LINETYPE.SOLID_OPEN;break;case 80:this.$=r.LINETYPE.DOTTED_OPEN;break;case 81:this.$=r.LINETYPE.SOLID;break;case 82:this.$=r.LINETYPE.SOLID_TOP;break;case 83:this.$=r.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=r.LINETYPE.STICK_TOP;break;case 85:this.$=r.LINETYPE.STICK_BOTTOM;break;case 86:this.$=r.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=r.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=r.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=r.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=r.LINETYPE.DOTTED;break;case 100:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=r.LINETYPE.SOLID_CROSS;break;case 102:this.$=r.LINETYPE.DOTTED_CROSS;break;case 103:this.$=r.LINETYPE.SOLID_POINT;break;case 104:this.$=r.LINETYPE.DOTTED_POINT;break;case 105:this.$=r.parseMessage(a[s].trim().substring(1));break}},`anonymous`),table:[{3:1,4:n,5:r,6:i},{1:[3]},{3:5,4:n,5:r,6:i},{3:6,4:n,5:r,6:i},t([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},t(I,[2,5]),{9:48,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},t(I,[2,7]),t(I,[2,8]),t(I,[2,9]),t(I,[2,15]),{13:49,51:D,53:O,54:k},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:F},{23:56,73:F},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},t(I,[2,30]),t(I,[2,31]),{33:[1,62]},{35:[1,63]},t(I,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:ee},{23:75,55:76,73:ee},{23:77,73:F},{69:78,72:[1,79],78:L,79:R,80:te,81:ne,82:z,83:B,84:V,85:re,86:H,87:U,88:W,89:ie,90:ae,91:oe,92:G,93:se,94:K,95:ce,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:F},{23:111,73:F},{23:112,73:F},{23:113,73:F},t([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],_e),t(I,[2,6]),t(I,[2,16]),t(ve,[2,10],{11:114}),t(I,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},t(I,[2,22]),{5:[1,118]},{5:[1,119]},t(I,[2,25]),t(I,[2,26]),t(I,[2,27]),t(I,[2,28]),t(I,[2,29]),t(I,[2,32]),t(I,[2,33]),t(ye,a,{7:120}),t(ye,a,{7:121}),t(ye,a,{7:122}),t(be,a,{41:123,7:124}),t(xe,a,{43:125,7:126}),t(xe,a,{7:126,43:127}),t(Se,a,{46:128,7:129}),t(ye,a,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},t(Ce,_e,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:F},{69:146,78:L,79:R,80:te,81:ne,82:z,83:B,84:V,85:re,86:H,87:U,88:W,89:ie,90:ae,91:oe,92:G,93:se,94:K,95:ce,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},t(q,[2,79]),t(q,[2,80]),t(q,[2,81]),t(q,[2,82]),t(q,[2,83]),t(q,[2,84]),t(q,[2,85]),t(q,[2,86]),t(q,[2,87]),t(q,[2,88]),t(q,[2,89]),t(q,[2,90]),t(q,[2,91]),t(q,[2,92]),t(q,[2,93]),t(q,[2,94]),t(q,[2,95]),t(q,[2,96]),t(q,[2,97]),t(q,[2,98]),t(q,[2,99]),t(q,[2,100]),t(q,[2,101]),t(q,[2,102]),t(q,[2,103]),t(q,[2,104]),{23:147,73:F},{23:149,60:148,73:F},{73:[2,68]},{73:[2,69]},{58:150,104:J},{58:152,104:J},{58:153,104:J},{58:154,104:J},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:D,53:O,54:k},{5:[1,160]},t(I,[2,20]),t(I,[2,21]),t(I,[2,23]),t(I,[2,24]),{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,161],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,162],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,163],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,164]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,47],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,50:[1,165],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,166]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,45],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,49:[1,167],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,168]},{17:[1,169]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,43],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,48:[1,170],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,171],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{16:[1,172]},t(I,[2,50]),{16:[1,173]},t(I,[2,55]),t(Ce,[2,76]),{76:[1,174]},{16:[1,175]},t(I,[2,52]),{16:[1,176]},t(I,[2,57]),t(I,[2,53]),{23:177,73:F},{23:178,73:F},{23:179,73:F},{58:180,104:J},{23:181,72:[1,182],73:F},{58:183,104:J},{58:184,104:J},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},t(I,[2,17]),t(ve,[2,11]),{13:186,51:D,53:O,54:k},t(ve,[2,13]),t(ve,[2,14]),t(I,[2,19]),t(I,[2,35]),t(I,[2,36]),t(I,[2,37]),t(I,[2,38]),{16:[1,187]},t(I,[2,39]),{16:[1,188]},t(I,[2,40]),t(I,[2,41]),{16:[1,189]},t(I,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:J},{58:196,104:J},{58:197,104:J},{5:[2,75]},{58:198,104:J},{23:199,73:F},{5:[2,58]},{5:[2,59]},{23:200,73:F},t(ve,[2,12]),t(be,a,{7:124,41:201}),t(xe,a,{7:126,43:202}),t(Se,a,{7:129,46:203}),t(I,[2,49]),t(I,[2,54]),t(Ce,[2,77]),t(I,[2,51]),t(I,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:J},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[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(t,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){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.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)+`:
1
+ import{n as e}from"./chunk-Y2CYZVJY-CP7lNZai.js";import{t}from"./src-CaBa9Z1L.js";import{A as n,F as r,G as i,H as a,K as o,O as s,U as c,a as l,b as u,c as d,i as f,r as p,s as m,v as h,w as g,x as _,y as v,z as y}from"./chunk-WYO6CB5R-C-c-Ja6D.js";import{C as b}from"./src-BJaEWo8x.js";import{t as x}from"./dist-Bpk5HQQh.js";import{g as S,p as C}from"./chunk-ICXQ74PX-BUnmDgqa.js";import{a as w,c as T,i as E,n as D,r as O,s as k}from"./chunk-32BRIVSS-DqkgLIEw.js";import{t as A}from"./chunk-2Q5K7J3B-Cczs20mb.js";import{n as j,t as M}from"./chunk-ZIRB5QZD-Cas2Em51.js";var N=x(),P=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,12],l=[1,14],u=[1,15],d=[1,17],f=[1,18],p=[1,19],m=[1,25],h=[1,26],g=[1,27],_=[1,28],v=[1,29],y=[1,30],b=[1,31],x=[1,32],S=[1,33],C=[1,34],w=[1,35],T=[1,36],E=[1,37],D=[1,38],O=[1,39],k=[1,40],A=[1,42],j=[1,43],M=[1,44],N=[1,45],P=[1,46],F=[1,47],I=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],ee=[1,74],L=[1,80],R=[1,81],te=[1,82],ne=[1,83],z=[1,84],B=[1,85],V=[1,86],re=[1,87],H=[1,88],U=[1,89],W=[1,90],ie=[1,91],ae=[1,92],oe=[1,93],G=[1,94],se=[1,95],K=[1,96],ce=[1,97],le=[1,98],ue=[1,99],de=[1,100],fe=[1,101],pe=[1,102],me=[1,103],he=[1,104],ge=[1,105],_e=[2,78],ve=[4,5,17,51,53,54],ye=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],be=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],xe=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Se=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Ce=[5,52],q=[70,71,72,73],J=[1,151],we={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NEWLINE`,6:`SD`,10:`INVALID`,14:`create`,15:`box`,16:`restOfLine`,17:`end`,19:`autonumber`,20:`NUM`,21:`off`,22:`activate`,24:`deactivate`,30:`title`,31:`legacy_title`,32:`acc_title`,33:`acc_title_value`,34:`acc_descr`,35:`acc_descr_value`,36:`acc_descr_multiline_value`,37:`loop`,38:`rect`,39:`opt`,40:`alt`,42:`par`,44:`par_over`,45:`critical`,47:`break`,48:`option`,49:`and`,50:`else`,51:`participant`,52:`AS`,53:`participant_actor`,54:`destroy`,56:`note`,59:`over`,61:`links`,62:`link`,63:`properties`,64:`details`,66:`,`,67:`left_of`,68:`right_of`,70:`+`,71:`-`,72:`()`,73:`ACTOR`,75:`CONFIG_START`,76:`CONFIG_CONTENT`,77:`CONFIG_END`,78:`SOLID_OPEN_ARROW`,79:`DOTTED_OPEN_ARROW`,80:`SOLID_ARROW`,81:`SOLID_ARROW_TOP`,82:`SOLID_ARROW_BOTTOM`,83:`STICK_ARROW_TOP`,84:`STICK_ARROW_BOTTOM`,85:`SOLID_ARROW_TOP_DOTTED`,86:`SOLID_ARROW_BOTTOM_DOTTED`,87:`STICK_ARROW_TOP_DOTTED`,88:`STICK_ARROW_BOTTOM_DOTTED`,89:`SOLID_ARROW_TOP_REVERSE`,90:`SOLID_ARROW_BOTTOM_REVERSE`,91:`STICK_ARROW_TOP_REVERSE`,92:`STICK_ARROW_BOTTOM_REVERSE`,93:`SOLID_ARROW_TOP_REVERSE_DOTTED`,94:`SOLID_ARROW_BOTTOM_REVERSE_DOTTED`,95:`STICK_ARROW_TOP_REVERSE_DOTTED`,96:`STICK_ARROW_BOTTOM_REVERSE_DOTTED`,97:`BIDIRECTIONAL_SOLID_ARROW`,98:`DOTTED_ARROW`,99:`BIDIRECTIONAL_DOTTED_ARROW`,100:`SOLID_CROSS`,101:`DOTTED_CROSS`,102:`SOLID_POINT`,103:`DOTTED_POINT`,104:`TXT`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.apply(a[s]),a[s];case 4:case 10:this.$=[];break;case 5:case 11:a[s-1].push(a[s]),this.$=a[s-1];break;case 6:case 7:case 12:case 13:this.$=a[s];break;case 8:case 9:case 14:this.$=[];break;case 16:a[s].type=`createParticipant`,this.$=a[s];break;case 17:a[s-1].unshift({type:`boxStart`,boxData:r.parseBoxData(a[s-2])}),a[s-1].push({type:`boxEnd`,boxText:a[s-2]}),this.$=a[s-1];break;case 19:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-2]),sequenceIndexStep:Number(a[s-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:`sequenceIndex`,sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:`sequenceIndex`,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 23:this.$={type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor};break;case 24:this.$={type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1].actor};break;case 30:r.setDiagramTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 31:r.setDiagramTitle(a[s].substring(7)),this.$=a[s].substring(7);break;case 32:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 33:case 34:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 35:a[s-1].unshift({type:`loopStart`,loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:`loopEnd`,loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 36:a[s-1].unshift({type:`rectStart`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:`rectEnd`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 37:a[s-1].unshift({type:`optStart`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:`optEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 38:a[s-1].unshift({type:`altStart`,altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:`altEnd`,signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 39:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 40:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_OVER_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 41:a[s-1].unshift({type:`criticalStart`,criticalText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.CRITICAL_START}),a[s-1].push({type:`criticalEnd`,signalType:r.LINETYPE.CRITICAL_END}),this.$=a[s-1];break;case 42:a[s-1].unshift({type:`breakStart`,breakText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_START}),a[s-1].push({type:`breakEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_END}),this.$=a[s-1];break;case 44:this.$=a[s-3].concat([{type:`option`,optionText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.CRITICAL_OPTION},a[s]]);break;case 46:this.$=a[s-3].concat([{type:`and`,parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 48:this.$=a[s-3].concat([{type:`else`,altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 49:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 50:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 51:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 52:case 57:a[s-1].draw=`actor`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 53:a[s-1].type=`destroyParticipant`,this.$=a[s-1];break;case 54:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 55:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 56:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 58:this.$=[a[s-1],{type:`addNote`,placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 59:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:`addNote`,placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 60:this.$=[a[s-1],{type:`addLinks`,actor:a[s-1].actor,text:a[s]}];break;case 61:this.$=[a[s-1],{type:`addALink`,actor:a[s-1].actor,text:a[s]}];break;case 62:this.$=[a[s-1],{type:`addProperties`,actor:a[s-1].actor,text:a[s]}];break;case 63:this.$=[a[s-1],{type:`addDetails`,actor:a[s-1].actor,text:a[s]}];break;case 66:this.$=[a[s-2],a[s]];break;case 67:this.$=a[s];break;case 68:this.$=r.PLACEMENT.LEFTOF;break;case 69:this.$=r.PLACEMENT.RIGHTOF;break;case 70:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0},{type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor}];break;case 71:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4].actor}];break;case 72:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor}];break;case 73:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s],activate:!1,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-4].actor}];break;case 74:this.$=[a[s-5],a[s-1],{type:`addMessage`,from:a[s-5].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-5].actor}];break;case 75:this.$=[a[s-3],a[s-1],{type:`addMessage`,from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 76:this.$={type:`addParticipant`,actor:a[s-1],config:a[s]};break;case 77:this.$=a[s-1].trim();break;case 78:this.$={type:`addParticipant`,actor:a[s]};break;case 79:this.$=r.LINETYPE.SOLID_OPEN;break;case 80:this.$=r.LINETYPE.DOTTED_OPEN;break;case 81:this.$=r.LINETYPE.SOLID;break;case 82:this.$=r.LINETYPE.SOLID_TOP;break;case 83:this.$=r.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=r.LINETYPE.STICK_TOP;break;case 85:this.$=r.LINETYPE.STICK_BOTTOM;break;case 86:this.$=r.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=r.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=r.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=r.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=r.LINETYPE.DOTTED;break;case 100:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=r.LINETYPE.SOLID_CROSS;break;case 102:this.$=r.LINETYPE.DOTTED_CROSS;break;case 103:this.$=r.LINETYPE.SOLID_POINT;break;case 104:this.$=r.LINETYPE.DOTTED_POINT;break;case 105:this.$=r.parseMessage(a[s].trim().substring(1));break}},`anonymous`),table:[{3:1,4:n,5:r,6:i},{1:[3]},{3:5,4:n,5:r,6:i},{3:6,4:n,5:r,6:i},t([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},t(I,[2,5]),{9:48,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},t(I,[2,7]),t(I,[2,8]),t(I,[2,9]),t(I,[2,15]),{13:49,51:D,53:O,54:k},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:F},{23:56,73:F},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},t(I,[2,30]),t(I,[2,31]),{33:[1,62]},{35:[1,63]},t(I,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:ee},{23:75,55:76,73:ee},{23:77,73:F},{69:78,72:[1,79],78:L,79:R,80:te,81:ne,82:z,83:B,84:V,85:re,86:H,87:U,88:W,89:ie,90:ae,91:oe,92:G,93:se,94:K,95:ce,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:F},{23:111,73:F},{23:112,73:F},{23:113,73:F},t([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],_e),t(I,[2,6]),t(I,[2,16]),t(ve,[2,10],{11:114}),t(I,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},t(I,[2,22]),{5:[1,118]},{5:[1,119]},t(I,[2,25]),t(I,[2,26]),t(I,[2,27]),t(I,[2,28]),t(I,[2,29]),t(I,[2,32]),t(I,[2,33]),t(ye,a,{7:120}),t(ye,a,{7:121}),t(ye,a,{7:122}),t(be,a,{41:123,7:124}),t(xe,a,{43:125,7:126}),t(xe,a,{7:126,43:127}),t(Se,a,{46:128,7:129}),t(ye,a,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},t(Ce,_e,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:F},{69:146,78:L,79:R,80:te,81:ne,82:z,83:B,84:V,85:re,86:H,87:U,88:W,89:ie,90:ae,91:oe,92:G,93:se,94:K,95:ce,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},t(q,[2,79]),t(q,[2,80]),t(q,[2,81]),t(q,[2,82]),t(q,[2,83]),t(q,[2,84]),t(q,[2,85]),t(q,[2,86]),t(q,[2,87]),t(q,[2,88]),t(q,[2,89]),t(q,[2,90]),t(q,[2,91]),t(q,[2,92]),t(q,[2,93]),t(q,[2,94]),t(q,[2,95]),t(q,[2,96]),t(q,[2,97]),t(q,[2,98]),t(q,[2,99]),t(q,[2,100]),t(q,[2,101]),t(q,[2,102]),t(q,[2,103]),t(q,[2,104]),{23:147,73:F},{23:149,60:148,73:F},{73:[2,68]},{73:[2,69]},{58:150,104:J},{58:152,104:J},{58:153,104:J},{58:154,104:J},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:D,53:O,54:k},{5:[1,160]},t(I,[2,20]),t(I,[2,21]),t(I,[2,23]),t(I,[2,24]),{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,161],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,162],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,163],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,164]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,47],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,50:[1,165],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,166]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,45],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,49:[1,167],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,168]},{17:[1,169]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,43],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,48:[1,170],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,171],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{16:[1,172]},t(I,[2,50]),{16:[1,173]},t(I,[2,55]),t(Ce,[2,76]),{76:[1,174]},{16:[1,175]},t(I,[2,52]),{16:[1,176]},t(I,[2,57]),t(I,[2,53]),{23:177,73:F},{23:178,73:F},{23:179,73:F},{58:180,104:J},{23:181,72:[1,182],73:F},{58:183,104:J},{58:184,104:J},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},t(I,[2,17]),t(ve,[2,11]),{13:186,51:D,53:O,54:k},t(ve,[2,13]),t(ve,[2,14]),t(I,[2,19]),t(I,[2,35]),t(I,[2,36]),t(I,[2,37]),t(I,[2,38]),{16:[1,187]},t(I,[2,39]),{16:[1,188]},t(I,[2,40]),t(I,[2,41]),{16:[1,189]},t(I,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:J},{58:196,104:J},{58:197,104:J},{5:[2,75]},{58:198,104:J},{23:199,73:F},{5:[2,58]},{5:[2,59]},{23:200,73:F},t(ve,[2,12]),t(be,a,{7:124,41:201}),t(xe,a,{7:126,43:202}),t(Se,a,{7:129,46:203}),t(I,[2,49]),t(I,[2,54]),t(Ce,[2,77]),t(I,[2,51]),t(I,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:J},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[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(t,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){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.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
2
  `+h.showPosition()+`
3
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:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.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&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};we.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(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:e(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:e(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:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(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:e(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:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -1 +1 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-BAUBUeAF.js";var t=1;function n(){if(!(typeof globalThis>`u`))return globalThis}e(n,`getCaptureGlobal`);function r(){return!!n()?.mermaidCaptureSizes}e(r,`shouldCaptureSizes`);function i(){return typeof location>`u`?`browser-dev`:`${location.pathname}${location.search}`}e(i,`capturedFromLocation`);function a(e,t){let r=n();if(!r)return;let i=t.node(),a=((i&&`ownerSVGElement`in i?i.ownerSVGElement:null)??i)?.id??`(unknown)`;r.mermaidCapturedSizes??=[];let o={svgId:a,sizes:e};r.mermaidCapturedSizes.push(o),r.mermaidLastCapturedSizes=o}e(a,`emitCapturedSizes`);function o(e,n){let r=[];for(let e of n.nodes)e.isGroup||r.push({id:e.id,width:e.width??0,height:e.height??0});r.length!==0&&a({metadata:{captureVersion:t,capturedAt:new Date().toISOString(),capturedFrom:i()},nodes:r},e)}e(o,`captureNodeSizes`);export{o as captureNodeSizes};
1
+ import{n as e}from"./chunk-Y2CYZVJY-CP7lNZai.js";var t=1;function n(){if(!(typeof globalThis>`u`))return globalThis}e(n,`getCaptureGlobal`);function r(){return!!n()?.mermaidCaptureSizes}e(r,`shouldCaptureSizes`);function i(){return typeof location>`u`?`browser-dev`:`${location.pathname}${location.search}`}e(i,`capturedFromLocation`);function a(e,t){let r=n();if(!r)return;let i=t.node(),a=((i&&`ownerSVGElement`in i?i.ownerSVGElement:null)??i)?.id??`(unknown)`;r.mermaidCapturedSizes??=[];let o={svgId:a,sizes:e};r.mermaidCapturedSizes.push(o),r.mermaidLastCapturedSizes=o}e(a,`emitCapturedSizes`);function o(e,n){let r=[];for(let e of n.nodes)e.isGroup||r.push({id:e.id,width:e.width??0,height:e.height??0});r.length!==0&&a({metadata:{captureVersion:t,capturedAt:new Date().toISOString(),capturedFrom:i()},nodes:r},e)}e(o,`captureNodeSizes`);export{o as captureNodeSizes};
@@ -0,0 +1 @@
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./createLucideIcon-DAkhoPjT.js";import{t as s}from"./button-Gol9BgNB.js";import{a as c,c as l,i as u,n as d,o as f,r as p,s as m,t as h}from"./dialog-6-bc7qPg.js";import{a as g,d as _,f as v,i as y,o as b,p as x,u as S}from"./dropdown-menu-xw8WTdb-.js";import{t as C}from"./label-DyipnO5I.js";import{C as w,a as T,f as E,h as D,m as O,n as k,o as A,p as j,r as M,s as N,t as P}from"./agent-visibility-mwTztYpe.js";import{An as F,Dn as I,Ei as L,En as R,Fn as z,Gt as B,Kt as V,Mn as H,Nn as U,On as W,Pn as G,Pt as K,Tn as q,Ut as J,an as ee,dt as te,fn as ne,ft as re,pn as ie,un as Y,z as ae}from"./dist-Cv2LF2DL.js";import{t as oe}from"./RegisteredAgentIcon-CyQDojW_.js";import{a as se,d as ce,l as le,n as ue,r as de,t as fe,u as pe}from"./workspace-paths-DGKkpMQ9.js";import{t as me}from"./copy-9EDFYcyR.js";import{t as he}from"./folder-open-wLd69QUc.js";import{t as ge}from"./loader-circle-Cg5SU7AZ.js";import{t as _e}from"./refresh-cw-DClG_qgN.js";import{t as ve}from"./sliders-horizontal-BNv-Koqw.js";import{t as ye}from"./trash-2-DE3a7L75.js";import{n as X}from"./dist-B8I5m7M1.js";import{t as be}from"./input-D4OPkja2.js";import{t as xe}from"./dist-BCZq3DKc.js";import{i as Se}from"./use-settings-route-KYTTaHV0.js";import{t as Ce}from"./parse-api-error-BtEL2kxi.js";import{c as we,l as Te}from"./documents-events-DJXnk07Z.js";import{n as Ee}from"./config-context-D3FvmHZm.js";import{t as De}from"./use-workspace-CNU53RmX.js";import{n as Oe}from"./clipboard-adapter-ZCy01ehf.js";import{a as ke,d as Ae,f as je,n as Me,s as Ne,t as Pe}from"./skills-api-141pFhWO.js";var Fe=o(`cloud-download`,[[`path`,{d:`M12 13v8l-4-4`,key:`1f5nwf`}],[`path`,{d:`m12 21 4-4`,key:`1lfcce`}],[`path`,{d:`M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284`,key:`ui1hmy`}]]),Ie=o(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),Le=o(`pencil-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),Re=o(`power-off`,[[`path`,{d:`M18.36 6.64A9 9 0 0 1 20.77 15`,key:`dxknvb`}],[`path`,{d:`M6.16 6.16a9 9 0 1 0 12.68 12.68`,key:`1x7qb5`}],[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Z=t(),Q=e(n(),1),$=a();function ze(e){return{async install(t){let n;try{n=await e.buildAndOpen(t?.force?{force:!0}:void 0)}catch(e){return{ok:!1,reason:`bridge-error`,message:e instanceof Error?e.message:String(e)}}return n.ok?{ok:!0,path:n.path}:{ok:!1,reason:n.reason,message:n.message}}}}function Be(e={}){let t=e.fetch??globalThis.fetch,n=`${e.apiOrigin??``}/api/install-skill`;return{async install(e){let r;try{r=await t(n,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e?.force?{force:!0}:{})})}catch(e){return{ok:!1,reason:`network-error`,message:e instanceof Error?e.message:String(e)}}if(!r.ok){let e=`HTTP ${r.status}`;try{let t=Ce(await r.json());t&&(e=t)}catch{}return{ok:!1,reason:`http-error`,message:e}}let i;try{i=await r.json()}catch(e){return{ok:!1,reason:`parse-error`,message:e instanceof Error?e.message:`Invalid server response`}}return!i||typeof i.status!=`string`?{ok:!1,reason:`parse-error`,message:`Invalid server response shape`}:i.status===`failed`?{ok:!1,reason:`build-failed`,message:i.buildError??`unknown build failure`}:{ok:!0,path:i.outputPath,handoffWarning:i.handoffError?.message}}}}function Ve(){if(typeof window>`u`)return null;let e=window.okDesktop?.skill;return e?ze(e):Be()}var He=`ok:skill:cowork:installed`,Ue=`1`,We=250,Ge=`/api/skill/install-state`;function Ke(e){return`${He}:v${e}`}var qe=new Map;async function Je(e={},t={}){let n=t.force?`__force__`:`__default__`,r=qe.get(n);if(r)return r;let i=Ye(e,t);return qe.set(n,i),i.finally(()=>{qe.get(n)===i&&qe.delete(n)}),i}async function Ye(e,t){let n=e.installer===void 0?Ve():e.installer,r=Xe(e.storage),i=e.fetchSnapshot??Qe,a=e.serverTimeoutMs??We,o=null;if(!t.force){try{o=await $e(i(),a)}catch(e){console.warn(`[cowork-skill] server install-state check failed; falling through:`,e)}if(o){let e=o.targets[`claude-cowork`]??null;if(e&&e.version===o.currentVersion)return{kind:`already-installed`,source:`server`}}}let s=Ke(o?.currentVersion??e.fallbackSkillVersion??Ze());if(!t.force&&r?.getItem(s)===Ue)return{kind:`already-installed`,source:`local`};if(!n)return{kind:`host-unsupported`};let c=await n.install({force:t.force??!1});if(!c.ok)return{kind:`install-failed`,reason:c.reason,message:c.message};try{r?.setItem(s,Ue)}catch(e){console.warn(`[cowork-skill] storage.setItem failed (guard will not persist):`,e)}return{kind:`installed-now`,path:c.path,handoffWarning:c.handoffWarning}}function Xe(e){if(e!==void 0)return e;if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function Ze(){return typeof window>`u`?`unknown`:window.okDesktop?.appVersion??`unknown`}async function Qe(){let e;try{e=await fetch(Ge,{method:`GET`,cache:`no-store`})}catch{return null}if(!e.ok)return null;try{let t=await e.json();return typeof t?.currentVersion==`string`?t:null}catch{return null}}async function $e(e,t){return Promise.race([e,new Promise(e=>{setTimeout(()=>e(null),t)})])}function et(e){return Je({},e)}function tt(){return Je({},{force:!0})}async function nt(e,t){let n;try{n=await t(`/api/handoff`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})}catch(e){return{ok:!1,reason:`dispatch-error`,detail:e instanceof Error?e.message:String(e)}}return n.status===200?{ok:!0}:n.status===404?{ok:!1,reason:`not-installed`,detail:`POST /api/handoff returned 404`}:n.status===422?{ok:!1,reason:`not-installed`,detail:`POST /api/handoff returned ${n.status}`}:{ok:!1,reason:`dispatch-error`,detail:`POST /api/handoff returned ${n.status}`}}async function rt(e,t={}){let n=t.fetch??globalThis.fetch.bind(globalThis);switch(e.target){case`claude-cowork`:return nt({target:`claude-cowork`,url:Y({mode:`cowork`},e)},n);case`claude-code`:return nt({target:`claude-code`,url:Y({mode:`code`},e)},n);case`codex`:return nt({target:`codex`,url:ne(e)},n);case`cursor`:return nt({target:`cursor`,url:ie(e),workspacePath:e.projectDir},n);case`copilot`:return{ok:!1,reason:`invalid-payload`,detail:`copilot is terminal-only; launch via requestTerminalLaunch`};case`opencode`:return{ok:!1,reason:`invalid-payload`,detail:`opencode is terminal-only; launch via requestTerminalLaunch`};case`pi`:return{ok:!1,reason:`invalid-payload`,detail:`pi is terminal-only; launch via requestTerminalLaunch`};case`antigravity`:return{ok:!1,reason:`invalid-payload`,detail:`antigravity is terminal-only; launch via requestTerminalLaunch`};case`openclaw`:return{ok:!1,reason:`invalid-payload`,detail:`openclaw is terminal-only; launch via requestTerminalLaunch`};case`hermes`:return{ok:!1,reason:`invalid-payload`,detail:`hermes is terminal-only; launch via requestTerminalLaunch`};default:{let t=e.target;return{ok:!1,reason:`invalid-payload`,detail:`unknown target: ${String(t)}`}}}}async function it(e,t={}){let n=t.okDesktop??(typeof window<`u`?window.okDesktop:void 0);if(n?.shell?.recordHandoff)try{await n.shell.recordHandoff(e)}catch(e){(t.warn??(e=>console.warn(e)))(`[handoff] recordHandoff IPC rejected (telemetry skipped): ${e instanceof Error?e.message:String(e)}`)}}var at=`open-knowledge:agent-thread-launch`;function ot(e,t=typeof window>`u`?new EventTarget:window){t.dispatchEvent(new CustomEvent(at,{detail:e}))}function st(e,t=typeof window>`u`?new EventTarget:window){let n=t=>{let n=t instanceof CustomEvent?t.detail:void 0;n&&typeof n.agentId==`string`&&e(n)};return t.addEventListener(at,n),()=>t.removeEventListener(at,n)}function ct(e){if(!e.docName||!e.workspace)return null;let t=fe(e.docName),{contentDir:n,pathSeparator:r}=e.workspace;return{docContext:{relativePath:t},projectDir:n,docPath:ue(n,t,r)}}function lt(e){return e.workspace?.contentDir?{docContext:null,projectDir:e.workspace.contentDir,docPath:``}:null}function ut(e){return e.workspace?.contentDir?{docContext:null,createDescription:e.description,createScenario:e.scenario,createMentions:e.mentions,projectDir:e.workspace.contentDir,docPath:``}:null}function dt(e){return j(e.installUrl).then(()=>void 0)}function ft(e){return!e.workspace?.contentDir||!e.folderRelativePath?null:{docContext:null,folderRelativePath:e.folderRelativePath,projectDir:e.workspace.contentDir,docPath:``}}function pt(e){return!e.workspace?.contentDir||!e.skillName?null:{docContext:null,skill:{name:e.skillName,scope:e.scope},projectDir:e.workspace.contentDir,docPath:``}}function mt(e){if(!e.workspace?.contentDir)return null;let{contentDir:t,pathSeparator:n}=e.workspace;if(e.docName){let r=e.docRelativePath??fe(e.docName),i={scope:`doc`,docRelativePath:r,instruction:e.instruction,mentions:e.mentions};return{docContext:null,compose:e.selection===void 0?i:{...i,selection:e.selection},projectDir:t,docPath:ue(t,r,n)}}return e.folderRelativePath?{docContext:null,compose:{scope:`folder`,folderRelativePath:e.folderRelativePath,instruction:e.instruction,mentions:e.mentions},projectDir:t,docPath:``}:{docContext:null,compose:{scope:`project`,instruction:e.instruction,mentions:e.mentions},projectDir:t,docPath:``}}function ht(e){return`Opened in ${e}.`}function gt(e,t=1){return t>=3?`Couldn't reach ${e} — please try again later.`:t===2?`Still couldn't reach ${e} — try one more time?`:`Couldn't reach ${e} — try again?`}function _t(e){return e>=3?null:e===2?`Try one more time`:`Retry`}function vt(e,t,n,r,i){let a=i===void 0?{}:{scope:i};return t.ok?{target:e,host:n,outcome:`ok`,ts:r,...a}:{target:e,host:n,outcome:`error`,ts:r,reason:t.reason,...a}}function yt(e,t,n,r){if(e.scope===`doc`){let i={scope:`doc`,docRelativePath:e.docRelativePath,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n,transport:r};return e.selection===void 0?i:{...i,selection:e.selection}}return e.scope===`folder`?{scope:`folder`,folderRelativePath:e.folderRelativePath,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n,transport:r}:{scope:`project`,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n,transport:r}}function bt(e,t,n,r){return e.compose?ee(yt(e.compose,t,n,r)):e.selection?H({...e.selection,target:t,transport:r}):e.skill?U(e.skill.name,e.skill.scope,n):e.ask?q(e.ask.relativePath,e.ask.instruction,n,t,r):L(e.docContext===null?e.folderRelativePath?F(e.folderRelativePath,n,e.instruction,r):e.createDescription===void 0?I(n,e.instruction,r):R(e.createDescription,n,e.createScenario??`new-project`,e.createMentions??[],r):W(e.docContext.relativePath,n,e.instruction,r))}function xt(e,t){let n=typeof e.instruction==`string`&&e.instruction.trim()!==``;return e.compose!==void 0||e.createDescription!==void 0||n?`${te} ${bt(e,B[t].handoffTarget,!1,`terminal`)}`:G(e.docContext?.relativePath??null)}function St(e){let t=typeof e.instruction==`string`&&e.instruction.trim()!==``;return e.compose!==void 0||e.createDescription!==void 0||t?`${re} ${bt(e,`claude-code`,!1,`terminal`)}`:z(e.docContext?.relativePath??null)}function Ct(e){let t=e.docContext?.relativePath;return typeof t!=`string`||t===``?null:t.replace(/\.(md|mdx)$/,``)}function wt(e){let t=[e.compose?.instruction,e.selection?.instruction,e.ask?.instruction,e.createDescription,e.instruction];for(let e of t)if(typeof e==`string`&&e.trim()!==``)return e;return null}function Tt(e,t){ot({agentSource:t?.agent?.source??`registry`,agentId:t?.agent?.id??``,prompt:St(e),docName:Ct(e),titleHint:wt(e)})}async function Et(e,t,n,r=1){if(e===`claude-cowork`&&r===1){let e;try{e=await n.ensureCoworkSkillInstalled()}catch(e){let t=e instanceof Error?e.message:String(e);return n.toast.error(`Couldn't install OpenKnowledge skill — ${t}`),{ok:!1,reason:`dispatch-error`,detail:`install-error: ${t}`}}if(e.kind===`installed-now`)return n.toast.success(`OpenKnowledge skill saved. Upload it in Claude Desktop, then click Cowork again.`),{ok:!0};if(e.kind===`install-failed`){let t=e.message??e.reason;return n.toast.error(`Couldn't install OpenKnowledge skill — ${t}`),{ok:!1,reason:`dispatch-error`,detail:`install-failed: ${t}`}}}let i={target:e,projectDir:t.projectDir,docPath:t.docPath,prompt:bt(t,e,n.autoOpen,`url`)},a=await n.dispatchHandoff(i),o=n.isElectronHost()?`electron`:`web`,s=n.now().toISOString(),c=t.compose,l=vt(e,a,o,s,t.selection!=null||c?.scope===`doc`&&c.selection!==void 0?`selection`:void 0);await n.recordHandoff(l);let u=n.getDisplayName(e);if(a.ok)n.toast.success(ht(u));else{let i=_t(r),a=gt(u,r);i===null?n.toast.error(a):n.toast.error(a,{action:{label:i,onClick:()=>{Et(e,t,n,r+1)}}})}return a}function Dt(e){return O.find(t=>t.id===e)?.displayName??e}function Ot(e=typeof window<`u`?window:void 0){return e?.okDesktop!=null}function kt(){return{dispatchHandoff:rt,recordHandoff:it,toast:{success:e=>{X.success(e)},error:(e,t)=>{X.error(e,t?{action:t.action}:void 0)}},now:()=>new Date,isElectronHost:()=>Ot(),getDisplayName:Dt,ensureCoworkSkillInstalled:et,autoOpen:!0}}function At(){let e=(0,$.c)(2),{merged:t}=Ee(),n=t?.appearance?.preview?.autoOpen??!0,r;return e[0]===n?r=e[1]:(r={dispatch:(e,t)=>Et(e,t,{...kt(),autoOpen:n}),reinstallCoworkSkill:tt},e[0]=n,e[1]=r),r}var jt=[...new Set(O.flatMap(e=>e.schemes))];function Mt(e,t){let n=t.now?.()??Date.now(),r={};for(let t of O){let i=t.schemes[0],a=i===void 0?void 0:e[i];if(!a){r[t.id]={installed:null};continue}r[t.id]={installed:a.installed,...a.displayName===void 0?{}:{displayName:a.displayName},lastChecked:n}}return r}function Nt(e){return Mt({},e)}async function Pt(e){let t=e.schemes??jt,n=await Promise.all(t.map(async t=>{let n=t.replace(/:$/,``);try{return[t,await e.detectProtocol(n)]}catch{return[t,{installed:!1}]}}));return Object.fromEntries(n)}var Ft=Object.fromEntries(jt.map(e=>[e,{installed:!1}]));async function It(e){let t;try{t=await e.fetch(`/api/installed-agents`,{signal:e.signal,headers:{Accept:`application/json`}})}catch(e){if(e.name===`AbortError`)throw e;return Ft}if(!t.ok)return Ft;let n;try{n=await t.json()}catch{return Ft}if(typeof n!=`object`||!n||Array.isArray(n))return Ft;let r=n,i={};for(let e of jt)i[e]={installed:r[e.replace(/:$/,``)]===!0};return i}function Lt(e,t){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n){let n=e[r],i=t[r];if(!n||!i||n.installed!==i.installed||n.displayName!==i.displayName)return!1}return!0}function Rt(e){let t=e.throttleMs??1e4,n=!1,r=null,i=null,a={},o=Nt({isElectronHost:e.isElectronHost(),now:e.now}),s=new Set,c=()=>{if(!n)for(let e of s)e(o)},l=()=>{o=Mt(a,{isElectronHost:e.isElectronHost(),now:e.now})};return{probe:async()=>{if(n)return;if(i)return i;if(r!==null&&e.now()-r<t)return;let o=(async()=>{try{let t=await e.probe();if(n)return;let i=!Lt(a,t);a=t,i&&(l(),c()),r=e.now()}catch{}finally{i=null}})();return i=o,o},getTargetStates:()=>o,subscribe:e=>(s.add(e),()=>{s.delete(e)}),cancel:()=>{n=!0,s.clear()}}}function zt(e=typeof window<`u`?window:void 0){return e?.okDesktop!=null}function Bt(){let e=typeof window<`u`?window.okDesktop:void 0;if(e){let t=t=>e.shell.detectProtocol(t);return{probe:()=>Pt({detectProtocol:t}),isElectronHost:()=>!0,now:Date.now}}let t=globalThis.fetch.bind(globalThis);return{probe:()=>It({fetch:t}),isElectronHost:()=>!1,now:Date.now}}function Vt(){let e=(0,$.c)(5),[t,n]=(0,Q.useState)(Ht),r=(0,Q.useRef)(null),i,a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=()=>{let e=Rt(Bt());r.current=e;let t=e.subscribe(n);e.probe();let i=()=>{e.probe()};return window.addEventListener(`focus`,i),()=>{window.removeEventListener(`focus`,i),t(),e.cancel(),r.current=null}},a=[],e[0]=i,e[1]=a):(i=e[0],a=e[1]),(0,Q.useEffect)(i,a);let o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>r.current?.probe()??Promise.resolve(),e[2]=o):o=e[2];let s;return e[3]===t?s=e[4]:(s={states:t,refresh:o},e[3]=t,e[4]=s),s}function Ht(){return Nt({isElectronHost:zt(),now:Date.now})}var Ut=(0,Q.createContext)(null);function Wt(e){let t=(0,$.c)(3),{value:n,children:r}=e,i;return t[0]!==r||t[1]!==n?(i=(0,Z.jsx)(Ut,{value:n,children:r}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i}function Gt(){return(0,Q.use)(Ut)}function Kt(e){let t=(0,$.c)(48),{itemName:n,isSubmitting:a,onDelete:o,customTitle:h,customDescription:g,customDetail:_,customConfirmLabel:v,customConfirmLabelBusy:y,children:b}=e,{_:x}=i(),S;t[0]!==x||t[1]!==n?(S=n??x({id:`L3CEC1`}),t[0]=x,t[1]=n,t[2]=S):S=t[2];let C=S,w;t[3]!==x||t[4]!==v?(w=v??x({id:`cnGeoo`}),t[3]=x,t[4]=v,t[5]=w):w=t[5];let T=w,E;t[6]!==x||t[7]!==v||t[8]!==y?(E=y??v??x({id:`s3caR3`}),t[6]=x,t[7]=v,t[8]=y,t[9]=E):E=t[9];let D=E,O;t[10]!==x||t[11]!==h||t[12]!==C?(O=h??x({id:`77SdEP`,values:{itemName:C}}),t[10]=x,t[11]=h,t[12]=C,t[13]=O):O=t[13];let k;t[14]===O?k=t[15]:(k=(0,Z.jsx)(l,{children:O}),t[14]=O,t[15]=k);let A;t[16]!==x||t[17]!==g||t[18]!==C?(A=g??x({id:`16D5Zj`,values:{itemName:C}}),t[16]=x,t[17]=g,t[18]=C,t[19]=A):A=t[19];let j;t[20]===A?j=t[21]:(j=(0,Z.jsx)(c,{className:`whitespace-pre-wrap`,children:A}),t[20]=A,t[21]=j);let M;t[22]===_?M=t[23]:(M=_?(0,Z.jsx)(`p`,{className:`text-muted-foreground text-sm`,"data-testid":`delete-confirmation-detail`,children:_}):null,t[22]=_,t[23]=M);let N;t[24]!==k||t[25]!==j||t[26]!==M?(N=(0,Z.jsxs)(m,{children:[k,j,M]}),t[24]=k,t[25]=j,t[26]=M,t[27]=N):N=t[27];let P;t[28]===b?P=t[29]:(P=b?(0,Z.jsx)(d,{children:b}):null,t[28]=b,t[29]=P);let F;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Z.jsx)(r,{id:`dEgA5A`}),t[30]=F):F=t[30];let I;t[31]===a?I=t[32]:(I=(0,Z.jsx)(p,{asChild:!0,children:(0,Z.jsx)(s,{variant:`outline`,disabled:a,children:F})}),t[31]=a,t[32]=I);let L;t[33]!==T||t[34]!==D||t[35]!==a?(L=a?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(ge,{className:`size-4 animate-spin`}),` `,D]}):T,t[33]=T,t[34]=D,t[35]=a,t[36]=L):L=t[36];let R;t[37]!==a||t[38]!==o||t[39]!==L?(R=(0,Z.jsx)(s,{variant:`destructive`,onClick:o,disabled:a,children:L}),t[37]=a,t[38]=o,t[39]=L,t[40]=R):R=t[40];let z;t[41]!==I||t[42]!==R?(z=(0,Z.jsxs)(f,{children:[I,R]}),t[41]=I,t[42]=R,t[43]=z):z=t[43];let B;return t[44]!==P||t[45]!==z||t[46]!==N?(B=(0,Z.jsxs)(u,{children:[N,P,z]}),t[44]=P,t[45]=z,t[46]=N,t[47]=B):B=t[47],B}function qt(e){return e?xe._({id:`wTcjov`}):null}function Jt(e){let t=(0,$.c)(47),{_:n}=i(),a=de(),o=Gt(),s=w(),c=E();if(a)return null;let{input:l,installStates:u,dispatch:d,onBeforeLaunch:f}=e,p=l===null,m,h,C,O,j,F,I,L,R,z,H;if(t[0]!==n||t[1]!==d||t[2]!==l||t[3]!==p||t[4]!==u||t[5]!==f||t[6]!==c||t[7]!==s||t[8]!==o){let e=qt(p),i;t[20]===c?i=t[21]:(i=e=>P(c,e.id),t[20]=c,t[21]=i);let a=D.filter(i),w;t[22]===c?w=t[23]:(w=e=>k(c,e.source,e.id,!0,e.supported),t[22]=c,t[23]=w);let E=s.filter(w),U=o?V.filter(e=>M(c,e,o.installedClis)):[];C=a.length>0,O=o!==null&&U.length>0,j=E.length>0,h=_,t[24]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,Z.jsxs)(x,{children:[(0,Z.jsx)(le,{"aria-hidden":`true`}),(0,Z.jsx)(r,{id:`O7_W_a`})]}),t[24]=H):H=t[24],m=v,F=`max-h-80`,I=j?(0,Z.jsxs)(y,{"aria-label":n({id:`vPKX2i`}),children:[(0,Z.jsxs)(b,{className:`flex items-center gap-1.5`,children:[(0,Z.jsx)(r,{id:`RXEbZy`}),(0,Z.jsx)(N,{})]}),E.map(t=>{let i=t.name;return(0,Z.jsxs)(g,{onSelect:()=>{l!==null&&(f?.(),Tt(l,{agent:{source:t.source,id:t.id}}))},disabled:p,"data-testid":`file-tree-open-in-thread-${t.id}`,"aria-label":e?n({id:`gtGQ9S`,values:{agentName:i,hint:e}}):void 0,children:[(0,Z.jsx)(oe,{agentId:t.id,iconUrl:t.iconUrl,className:`size-4`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(r,{id:`5PrrYw`,values:{agentName:i}})}),e?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},`${t.source}:${t.id}`)})]}):null,t[25]!==C||t[26]!==O||t[27]!==j?(L=j&&(O||C)?(0,Z.jsx)(S,{}):null,t[25]=C,t[26]=O,t[27]=j,t[28]=L):L=t[28],R=O?(0,Z.jsxs)(y,{"aria-label":n({id:`ALhMYW`}),children:[(0,Z.jsx)(b,{children:(0,Z.jsx)(r,{id:`ALhMYW`})}),U.map(t=>{let{displayName:r}=B[t];return(0,Z.jsxs)(g,{onSelect:()=>{l!==null&&(f?.(),o.launchInTerminal(l,t))},disabled:p,"data-testid":`file-tree-open-in-terminal-${t}`,"aria-label":n(e?{id:`AIn2Yv`,values:{displayName:r,hint:e}}:{id:`QYfQdv`,values:{displayName:r}}),children:[(0,Z.jsx)(A,{id:T(t),"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:r}),e?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t)})]}):null,z=C?(0,Z.jsxs)(Z.Fragment,{children:[O?(0,Z.jsx)(S,{}):null,(0,Z.jsxs)(y,{"aria-label":n({id:`BBqGS9`}),children:[(0,Z.jsx)(b,{children:(0,Z.jsx)(r,{id:`BBqGS9`})}),a.map(t=>{let r=!p,{displayName:i}=t,a=n(e?{id:`1ZpfyB`,values:{displayName:i,hint:e}}:{id:`WqLq6M`,values:{displayName:i}});return(0,Z.jsxs)(g,{disabled:!r,onSelect:()=>{if(l){if(f?.(),u[t.id]?.installed!==!0){dt(t);return}d(t.id,l)}},"data-testid":`file-tree-open-in-${t.id}`,"aria-label":a,children:[(0,Z.jsx)(A,{id:t.id,"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:t.displayName}),e?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t.id)})]})]}):null,t[0]=n,t[1]=d,t[2]=l,t[3]=p,t[4]=u,t[5]=f,t[6]=c,t[7]=s,t[8]=o,t[9]=m,t[10]=h,t[11]=C,t[12]=O,t[13]=j,t[14]=F,t[15]=I,t[16]=L,t[17]=R,t[18]=z,t[19]=H}else m=t[9],h=t[10],C=t[11],O=t[12],j=t[13],F=t[14],I=t[15],L=t[16],R=t[17],z=t[18],H=t[19];let U;t[29]!==C||t[30]!==O||t[31]!==j?(U=j||O||C?(0,Z.jsx)(S,{}):null,t[29]=C,t[30]=O,t[31]=j,t[32]=U):U=t[32];let W;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,Z.jsx)(ve,{"aria-hidden":`true`}),t[33]=W):W=t[33];let G;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,Z.jsxs)(g,{onSelect:Se,"data-testid":`file-tree-open-in-settings`,children:[W,(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(r,{id:`jRAGrQ`})})]}),t[34]=G):G=t[34];let K;t[35]!==m||t[36]!==F||t[37]!==I||t[38]!==L||t[39]!==R||t[40]!==z||t[41]!==U?(K=(0,Z.jsxs)(m,{className:F,children:[I,L,R,z,U,G]}),t[35]=m,t[36]=F,t[37]=I,t[38]=L,t[39]=R,t[40]=z,t[41]=U,t[42]=K):K=t[42];let q;return t[43]!==h||t[44]!==H||t[45]!==K?(q=(0,Z.jsxs)(h,{children:[H,K]}),t[43]=h,t[44]=H,t[45]=K,t[46]=q):q=t[46],q}function Yt(e){let t=(0,$.c)(8),n=e?.enabled??!0,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={status:`idle`},t[0]=r):r=t[0];let[i,a]=(0,Q.useState)(r),[o,s]=(0,Q.useState)(0),c,l;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>{let e=()=>s($t),t=Te(e),n=we(t=>{t.includes(`files`)&&e()});return()=>{t(),n()}},l=[],t[1]=c,t[2]=l):(c=t[1],l=t[2]),(0,Q.useEffect)(c,l);let u;t[3]===n?u=t[4]:(u=()=>{if(!n)return;let e=!1;return a(Qt),fetch(`/api/skills`).then(Xt).then(t=>{if(e)return;let n=J.safeParse(t);if(!n.success){console.error(`[ok-skills] /api/skills response failed schema validation:`,n.error.issues),a({status:`error`,message:`Server returned an incomplete skills response.`});return}a({status:`ready`,data:n.data.skills})}).catch(t=>{e||a({status:`error`,message:t instanceof Error?t.message:String(t)})}),()=>{e=!0}},t[3]=n,t[4]=u);let d;return t[5]!==n||t[6]!==o?(d=[o,n],t[5]=n,t[6]=o,t[7]=d):d=t[7],(0,Q.useEffect)(u,d),i}async function Xt(e){if(!e.ok){let t=await e.json().catch(Zt);throw Error(Ce(t)??`HTTP ${e.status}`)}return e.json()}function Zt(){return null}function Qt(e){return e.status===`ready`?e:{status:`loading`}}function $t(e){return e+1}function en(e){let t=(0,$.c)(16),{skill:n,onOpenChange:r,onDeleted:a}=e,{_:o}=i(),[s,c]=(0,Q.useState)(!1),l;t[0]!==o||t[1]!==a||t[2]!==r?(l=async function(e){c(!0);let t=await Pe(e.scope,e.name);if(c(!1),!t.ok){let{error:e}=t;X.error(o({id:`AtBdnD`,values:{error:e}}));return}X.success(o({id:`h9QFb9`,values:{0:e.name}})),a(),r(!1)},t[0]=o,t[1]=a,t[2]=r,t[3]=l):l=t[3];let u=l,d=n!==null,f;t[4]!==s||t[5]!==r?(f=e=>{!e&&!s&&r(!1)},t[4]=s,t[5]=r,t[6]=f):f=t[6];let p;t[7]!==o||t[8]!==s||t[9]!==u||t[10]!==n?(p=n?(0,Z.jsx)(Kt,{itemName:o({id:`ExUzM4`,values:{0:n.name}}),isSubmitting:s,onDelete:()=>u(n),customDescription:o({id:`E1Da_b`,values:{0:n.path}})}):null,t[7]=o,t[8]=s,t[9]=u,t[10]=n,t[11]=p):p=t[11];let m;return t[12]!==d||t[13]!==f||t[14]!==p?(m=(0,Z.jsx)(h,{open:d,onOpenChange:f,children:p}),t[12]=d,t[13]=f,t[14]=p,t[15]=m):m=t[15],m}function tn(e){let t=(0,$.c)(68),{skill:n,existingNames:a,onOpenChange:o,onRenamed:d}=e,{_:p}=i(),g=n!==null,_=(0,Q.useId)(),[v,y]=(0,Q.useState)(``),[b,x]=(0,Q.useState)(!1),S;t[0]===n?S=t[1]:(S=()=>{n&&y(n.name)},t[0]=n,t[1]=S);let w=n?.scope,T=n?.name,E;if(t[2]!==w||t[3]!==T?(E=[w,T],t[2]=w,t[3]=T,t[4]=E):E=t[4],(0,Q.useEffect)(S,E),!n)return null;let D,O,k,A;t[5]!==a||t[6]!==v||t[7]!==n.name?(k=v.trim(),A=k===n.name,D=k===``||!K.test(k),O=!D&&!A&&a.has(k),t[5]=a,t[6]=v,t[7]=n.name,t[8]=D,t[9]=O,t[10]=k,t[11]=A):(D=t[8],O=t[9],k=t[10],A=t[11]);let j=O,M=!D&&!j&&!A&&!b,N;t[12]!==p||t[13]!==M||t[14]!==o||t[15]!==d||t[16]!==n||t[17]!==k?(N=async function(){if(!n||!M)return;x(!0);let e=await Ne({scope:n.scope,fromName:n.name,toName:k});if(x(!1),!e.ok){X.error(p({id:`zKxoPm`,values:{0:n.name,1:e.error}}));return}X.success(p({id:`dUCQo4`,values:{trimmed:k}})),d?.(k),o(!1)},t[12]=p,t[13]=M,t[14]=o,t[15]=d,t[16]=n,t[17]=k,t[18]=N):N=t[18];let P=N,F;t[19]===o?F=t[20]:(F=e=>e?null:o(!1),t[19]=o,t[20]=F);let I;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,Z.jsx)(l,{children:(0,Z.jsx)(r,{id:`dw_3cv`})}),t[21]=I):I=t[21];let L;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,Z.jsxs)(m,{children:[I,(0,Z.jsx)(c,{children:(0,Z.jsx)(r,{id:`R9IDFz`})})]}),t[22]=L):L=t[22];let R;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,Z.jsx)(r,{id:`6YtxFj`}),t[23]=R):R=t[23];let z;t[24]===_?z=t[25]:(z=(0,Z.jsx)(C,{htmlFor:_,children:R}),t[24]=_,t[25]=z);let B;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(B=e=>y(e.target.value),t[26]=B):B=t[26];let V;t[27]===P?V=t[28]:(V=e=>{e.key===`Enter`&&P()},t[27]=P,t[28]=V);let H=D||j,U=D&&k!==``||j?`${_}-error`:void 0,W;t[29]!==_||t[30]!==v||t[31]!==V||t[32]!==H||t[33]!==U?(W=(0,Z.jsx)(be,{id:_,value:v,onChange:B,onKeyDown:V,spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,"aria-invalid":H,"aria-describedby":U,className:`font-mono`}),t[29]=_,t[30]=v,t[31]=V,t[32]=H,t[33]=U,t[34]=W):W=t[34];let G;t[35]!==j||t[36]!==_||t[37]!==D||t[38]!==k?(G=D&&k!==``?(0,Z.jsx)(`p`,{id:`${_}-error`,className:`text-xs text-destructive`,children:(0,Z.jsx)(r,{id:`A50vr3`,components:{0:(0,Z.jsx)(`code`,{className:`font-mono`})}})}):j?(0,Z.jsx)(`p`,{id:`${_}-error`,className:`text-xs text-destructive`,children:(0,Z.jsx)(r,{id:`YJ1BTp`})}):null,t[35]=j,t[36]=_,t[37]=D,t[38]=k,t[39]=G):G=t[39];let q;t[40]!==z||t[41]!==W||t[42]!==G?(q=(0,Z.jsxs)(`div`,{className:`space-y-1.5`,children:[z,W,G]}),t[40]=z,t[41]=W,t[42]=G,t[43]=q):q=t[43];let J;t[44]===o?J=t[45]:(J=()=>o(!1),t[44]=o,t[45]=J);let ee;t[46]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,Z.jsx)(r,{id:`dEgA5A`}),t[46]=ee):ee=t[46];let te;t[47]!==b||t[48]!==J?(te=(0,Z.jsx)(s,{variant:`ghost`,onClick:J,disabled:b,children:ee}),t[47]=b,t[48]=J,t[49]=te):te=t[49];let ne;t[50]===P?ne=t[51]:(ne=()=>void P(),t[50]=P,t[51]=ne);let re=!M,ie;t[52]===b?ie=t[53]:(ie=b?(0,Z.jsx)(r,{id:`tHKQ6j`}):(0,Z.jsx)(r,{id:`2wxgft`}),t[52]=b,t[53]=ie);let Y;t[54]!==ne||t[55]!==re||t[56]!==ie?(Y=(0,Z.jsx)(s,{onClick:ne,disabled:re,children:ie}),t[54]=ne,t[55]=re,t[56]=ie,t[57]=Y):Y=t[57];let ae;t[58]!==te||t[59]!==Y?(ae=(0,Z.jsxs)(f,{children:[te,Y]}),t[58]=te,t[59]=Y,t[60]=ae):ae=t[60];let oe;t[61]!==q||t[62]!==ae?(oe=(0,Z.jsxs)(u,{children:[L,q,ae]}),t[61]=q,t[62]=ae,t[63]=oe):oe=t[63];let se;return t[64]!==g||t[65]!==oe||t[66]!==F?(se=(0,Z.jsx)(h,{open:g,onOpenChange:F,children:oe}),t[64]=g,t[65]=oe,t[66]=F,t[67]=se):se=t[67],se}function nn(e){let t=(0,$.c)(15),{skill:n,onOpenChange:a,onUpdated:o}=e,{_:g}=i(),[_,v]=(0,Q.useState)(!1),y;t[0]!==g||t[1]!==a||t[2]!==o?(y=async function(e){v(!0);let t=await je({scope:e.scope,name:e.name});v(!1);let n=se(e.name);if(!t.ok){X.error(g({id:`FRqZ9v`,values:{0:t.error}}));return}X.success(t.checkpointRef?g({id:`My9uXI`,values:{0:t.version,display:n}}):g({id:`mPneVR`,values:{0:t.version,display:n}})),o(),a(!1)},t[0]=g,t[1]=a,t[2]=o,t[3]=y):y=t[3];let b=y,x=n!==null,S;t[4]!==a||t[5]!==_?(S=e=>{!e&&!_&&a(!1)},t[4]=a,t[5]=_,t[6]=S):S=t[6];let C;t[7]!==b||t[8]!==n||t[9]!==_?(C=n?(0,Z.jsxs)(u,{className:`sm:max-w-lg`,children:[(0,Z.jsxs)(m,{children:[(0,Z.jsx)(l,{children:(0,Z.jsx)(r,{id:`iAoh55`,values:{0:se(n.name)}})}),(0,Z.jsx)(c,{children:n.installedVersion?(0,Z.jsx)(r,{id:`47EXvY`,values:{0:n.bundledVersion??``,1:n.installedVersion}}):(0,Z.jsx)(r,{id:`nD7Fx9`,values:{0:n.bundledVersion??``}})})]}),(0,Z.jsx)(d,{}),(0,Z.jsxs)(f,{children:[(0,Z.jsx)(p,{asChild:!0,children:(0,Z.jsx)(s,{variant:`outline`,disabled:_,children:(0,Z.jsx)(r,{id:`dEgA5A`})})}),(0,Z.jsx)(s,{onClick:()=>void b(n),disabled:_,children:_?(0,Z.jsx)(r,{id:`JL3si7`}):(0,Z.jsx)(r,{id:`EkH9pt`})})]})]}):null,t[7]=b,t[8]=n,t[9]=_,t[10]=C):C=t[10];let w;return t[11]!==x||t[12]!==S||t[13]!==C?(w=(0,Z.jsx)(h,{open:x,onOpenChange:S,children:C}),t[11]=x,t[12]=S,t[13]=C,t[14]=w):w=t[14],w}function rn(){let e=(0,$.c)(30),{_:t}=i(),[n,r]=(0,Q.useState)(null),[a,o]=(0,Q.useState)(null),[s,c]=(0,Q.useState)(null),[l,u]=(0,Q.useState)(null),d;e[0]===t?d=e[1]:(d=async function(e,n){u(e.name);let r=await ke({scope:e.scope,name:e.name,...n?{targets:[...n]}:{}});if(u(null),!r.ok)return X.error(t({id:`Mj8R8K`,values:{0:r.error}})),r;let i=an,a=new Set(r.hosts),o=r.hosts.filter(t=>!e.hosts.includes(t)),s=e.hosts.filter(e=>!a.has(e)),c=e=>{let t=r.warningCodes.indexOf(e);return t>=0?r.warnings[t]:void 0},l=c(`no-targets`);if(l)return X.warning(l),r;if(o.length>0){let e=c(`scripts-present`);e&&X.warning(e)}return r.hosts.length===0?X.success(t({id:`0LBDjY`,values:{0:e.name}})):o.length>0&&s.length===0?X.success(t({id:`PPFQ3o`,values:{0:e.name,1:i(o)}})):s.length>0&&o.length===0?X.success(t({id:`OOIVJo`,values:{0:e.name,1:i(s)}})):o.length>0&&s.length>0?X.success(t({id:`OxplNM`,values:{0:e.name,1:i(o),2:i(s)}})):X.success(t({id:`wDgmsr`,values:{0:e.name,1:i(r.hosts)}})),r},e[0]=t,e[1]=d);let f=d,p;e[2]===t?p=e[3]:(p=async function(e){u(e.name);let n=await Ae({scope:e.scope,name:e.name});return u(null),n.ok?X.success(t({id:`0LBDjY`,values:{0:e.name}})):X.error(t({id:`nJq7et`,values:{0:n.error}})),n},e[2]=t,e[3]=p);let m=p,h;e[4]===t?h=e[5]:(h=async function(e,n){let r=await Me({scope:e.scope,name:e.name,existingNames:n});if(!r.ok){X.error(t({id:`UPjaXD`,values:{0:e.name,1:r.error}}));return}X.success(t({id:`0g7rCZ`,values:{0:r.name}}))},e[4]=t,e[5]=h);let g=h,_,v;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>{e||r(null)},v=()=>r(null),e[6]=_,e[7]=v):(_=e[6],v=e[7]);let y;e[8]===n?y=e[9]:(y=(0,Z.jsx)(en,{skill:n,onOpenChange:_,onDeleted:v}),e[8]=n,e[9]=y);let b=a?.skill??null,x=a?.existingNames??sn,S,C;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(S=e=>{e||o(null)},C=()=>o(null),e[10]=S,e[11]=C):(S=e[10],C=e[11]);let w;e[12]!==b||e[13]!==x?(w=(0,Z.jsx)(tn,{skill:b,existingNames:x,onOpenChange:S,onRenamed:C}),e[12]=b,e[13]=x,e[14]=w):w=e[14];let T,E;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(T=e=>{e||c(null)},E=()=>c(null),e[15]=T,e[16]=E):(T=e[15],E=e[16]);let D;e[17]===s?D=e[18]:(D=(0,Z.jsx)(nn,{skill:s,onOpenChange:T,onUpdated:E}),e[17]=s,e[18]=D);let O;e[19]!==w||e[20]!==D||e[21]!==y?(O=(0,Z.jsxs)(Z.Fragment,{children:[y,w,D]}),e[19]=w,e[20]=D,e[21]=y,e[22]=O):O=e[22];let k=O,A;e[23]===Symbol.for(`react.memo_cache_sentinel`)?(A=(e,t)=>o({skill:e,existingNames:t}),e[23]=A):A=e[23];let j;return e[24]!==k||e[25]!==g||e[26]!==f||e[27]!==l||e[28]!==m?(j={installingName:l,install:f,uninstall:m,duplicate:g,requestDelete:r,requestRename:A,requestUpdate:c,dialogs:k},e[24]=k,e[25]=g,e[26]=f,e[27]=l,e[28]=m,e[29]=j):j=e[29],j}function an(e){return e.map(on).join(`, `)}function on(e){return ae[e]??e}var sn=new Set;function cn(e){let t=(0,$.c)(19),{skill:n,onEdit:i,onInstall:a,onUninstall:o,onDelete:s}=e,c,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(pe,{"aria-hidden":!0}),l=(0,Z.jsx)(r,{id:`ePK91l`}),t[0]=c,t[1]=l):(c=t[0],l=t[1]);let u;t[2]===i?u=t[3]:(u=(0,Z.jsxs)(g,{onSelect:i,children:[c,l]}),t[2]=i,t[3]=u);let d;t[4]!==a||t[5]!==n.installed?(d=a&&!n.installed?(0,Z.jsxs)(g,{onSelect:a,children:[(0,Z.jsx)(Fe,{"aria-hidden":!0}),(0,Z.jsx)(r,{id:`TKQ7K-`})]}):null,t[4]=a,t[5]=n.installed,t[6]=d):d=t[6];let f;t[7]!==o||t[8]!==n.installed?(f=n.installed?(0,Z.jsxs)(g,{onSelect:o,children:[(0,Z.jsx)(Re,{"aria-hidden":!0}),(0,Z.jsx)(r,{id:`fo0VXg`})]}):null,t[7]=o,t[8]=n.installed,t[9]=f):f=t[9];let p,m;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(ye,{"aria-hidden":!0}),m=(0,Z.jsx)(r,{id:`cnGeoo`}),t[10]=p,t[11]=m):(p=t[10],m=t[11]);let h;t[12]===s?h=t[13]:(h=(0,Z.jsxs)(g,{variant:`destructive`,onSelect:s,children:[p,m]}),t[12]=s,t[13]=h);let _;return t[14]!==u||t[15]!==d||t[16]!==f||t[17]!==h?(_=(0,Z.jsxs)(Z.Fragment,{children:[u,d,f,h]}),t[14]=u,t[15]=d,t[16]=f,t[17]=h,t[18]=_):_=t[18],_}function ln(e){let t=(0,$.c)(94),{skill:n,actions:a,existingNames:o}=e,{_:s}=i(),c=De(),l=Vt().states,{dispatch:u}=At(),d=typeof window<`u`?window.okDesktop:void 0,f=n.absolutePath,p;t[0]===s?p=t[1]:(p=async function(e){try{await Oe(e),X.success(s({id:`SXCSQd`}))}catch{X.error(s({id:`cRHuuI`}))}},t[0]=s,t[1]=p);let m=p;if(n.managed){let e,i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsxs)(b,{className:`flex items-center gap-1.5 text-muted-foreground`,children:[(0,Z.jsx)(Ie,{className:`size-3`,"aria-hidden":!0}),(0,Z.jsx)(r,{id:`VITWk5`})]}),i=(0,Z.jsx)(S,{}),t[2]=e,t[3]=i):(e=t[2],i=t[3]);let a;t[4]===f?a=t[5]:(a=d&&f?(0,Z.jsxs)(g,{onSelect:()=>void d.shell.showItemInFolder(f),children:[(0,Z.jsx)(he,{"aria-hidden":!0}),(0,Z.jsx)(r,{id:`LtSYdi`})]}):null,t[4]=f,t[5]=a);let o;t[6]!==n.name||t[7]!==n.scope||t[8]!==c?(o=pt({skillName:n.name,scope:n.scope,workspace:c}),t[6]=n.name,t[7]=n.scope,t[8]=c,t[9]=o):o=t[9];let s;t[10]!==u||t[11]!==l||t[12]!==o?(s=(0,Z.jsx)(Jt,{input:o,installStates:l,isElectronHost:d!=null,dispatch:u}),t[10]=u,t[11]=l,t[12]=o,t[13]=s):s=t[13];let p;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsxs)(x,{children:[(0,Z.jsx)(me,{"aria-hidden":!0}),(0,Z.jsx)(r,{id:`zd00pH`})]}),t[14]=p):p=t[14];let h;t[15]!==f||t[16]!==m?(h=f?(0,Z.jsx)(g,{onSelect:()=>void m(f),children:(0,Z.jsx)(r,{id:`z2funE`})}):null,t[15]=f,t[16]=m,t[17]=h):h=t[17];let y;t[18]!==m||t[19]!==n.path?(y=()=>void m(n.path),t[18]=m,t[19]=n.path,t[20]=y):y=t[20];let C;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Z.jsx)(r,{id:`xloBjn`}),t[21]=C):C=t[21];let w;t[22]===y?w=t[23]:(w=(0,Z.jsx)(g,{onSelect:y,children:C}),t[22]=y,t[23]=w);let T;t[24]!==w||t[25]!==h?(T=(0,Z.jsxs)(_,{children:[p,(0,Z.jsxs)(v,{children:[h,w]})]}),t[24]=w,t[25]=h,t[26]=T):T=t[26];let E;return t[27]!==T||t[28]!==a||t[29]!==s?(E=(0,Z.jsxs)(Z.Fragment,{children:[e,i,a,s,T]}),t[27]=T,t[28]=a,t[29]=s,t[30]=E):E=t[30],E}let h;t[31]===f?h=t[32]:(h=d&&f?(0,Z.jsxs)(g,{onSelect:()=>void d.shell.showItemInFolder(f),children:[(0,Z.jsx)(he,{"aria-hidden":!0}),(0,Z.jsx)(r,{id:`LtSYdi`})]}):null,t[31]=f,t[32]=h);let y;t[33]!==n.name||t[34]!==n.scope||t[35]!==c?(y=pt({skillName:n.name,scope:n.scope,workspace:c}),t[33]=n.name,t[34]=n.scope,t[35]=c,t[36]=y):y=t[36];let C;t[37]!==u||t[38]!==l||t[39]!==y?(C=(0,Z.jsx)(Jt,{input:y,installStates:l,isElectronHost:d!=null,dispatch:u}),t[37]=u,t[38]=l,t[39]=y,t[40]=C):C=t[40];let w;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,Z.jsxs)(x,{children:[(0,Z.jsx)(me,{"aria-hidden":!0}),(0,Z.jsx)(r,{id:`zd00pH`})]}),t[41]=w):w=t[41];let T;t[42]!==f||t[43]!==m?(T=f?(0,Z.jsx)(g,{onSelect:()=>void m(f),children:(0,Z.jsx)(r,{id:`z2funE`})}):null,t[42]=f,t[43]=m,t[44]=T):T=t[44];let E;t[45]!==m||t[46]!==n.path?(E=()=>void m(n.path),t[45]=m,t[46]=n.path,t[47]=E):E=t[47];let D;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,Z.jsx)(r,{id:`xloBjn`}),t[48]=D):D=t[48];let O;t[49]===E?O=t[50]:(O=(0,Z.jsx)(g,{onSelect:E,children:D}),t[49]=E,t[50]=O);let k;t[51]!==T||t[52]!==O?(k=(0,Z.jsxs)(_,{children:[w,(0,Z.jsxs)(v,{children:[T,O]})]}),t[51]=T,t[52]=O,t[53]=k):k=t[53];let A;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,Z.jsx)(S,{}),t[54]=A):A=t[54];let j;t[55]!==a||t[56]!==o||t[57]!==n?(j=()=>void a.duplicate(n,o),t[55]=a,t[56]=o,t[57]=n,t[58]=j):j=t[58];let M,N;t[59]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,Z.jsx)(ce,{"aria-hidden":!0}),N=(0,Z.jsx)(r,{id:`euc6Ns`}),t[59]=M,t[60]=N):(M=t[59],N=t[60]);let P;t[61]===j?P=t[62]:(P=(0,Z.jsxs)(g,{onSelect:j,children:[M,N]}),t[61]=j,t[62]=P);let F;t[63]!==a||t[64]!==o||t[65]!==n?(F=()=>a.requestRename(n,o),t[63]=a,t[64]=o,t[65]=n,t[66]=F):F=t[66];let I,L;t[67]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,Z.jsx)(Le,{"aria-hidden":!0}),L=(0,Z.jsx)(r,{id:`2wxgft`}),t[67]=I,t[68]=L):(I=t[67],L=t[68]);let R;t[69]===F?R=t[70]:(R=(0,Z.jsxs)(g,{onSelect:F,children:[I,L]}),t[69]=F,t[70]=R);let z;t[71]!==a||t[72]!==n?(z=n.updateAvailable?(0,Z.jsxs)(g,{onSelect:()=>a.requestUpdate(n),children:[(0,Z.jsx)(_e,{"aria-hidden":!0}),(0,Z.jsx)(r,{id:`6g2jsp`})]}):null,t[71]=a,t[72]=n,t[73]=z):z=t[73];let B;t[74]!==a||t[75]!==n?(B=n.installed?(0,Z.jsxs)(g,{onSelect:()=>void a.uninstall(n),children:[(0,Z.jsx)(Re,{"aria-hidden":!0}),(0,Z.jsx)(r,{id:`fo0VXg`})]}):(0,Z.jsxs)(g,{onSelect:()=>void a.install(n),children:[(0,Z.jsx)(Fe,{"aria-hidden":!0}),(0,Z.jsx)(r,{id:`TKQ7K-`})]}),t[74]=a,t[75]=n,t[76]=B):B=t[76];let V;t[77]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,Z.jsx)(S,{}),t[77]=V):V=t[77];let H;t[78]!==a||t[79]!==n?(H=()=>a.requestDelete(n),t[78]=a,t[79]=n,t[80]=H):H=t[80];let U,W;t[81]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,Z.jsx)(ye,{"aria-hidden":!0}),W=(0,Z.jsx)(r,{id:`cnGeoo`}),t[81]=U,t[82]=W):(U=t[81],W=t[82]);let G;t[83]===H?G=t[84]:(G=(0,Z.jsxs)(g,{variant:`destructive`,onSelect:H,children:[U,W]}),t[83]=H,t[84]=G);let K;return t[85]!==k||t[86]!==P||t[87]!==R||t[88]!==h||t[89]!==z||t[90]!==B||t[91]!==G||t[92]!==C?(K=(0,Z.jsxs)(Z.Fragment,{children:[h,C,k,A,P,R,z,B,V,G]}),t[85]=k,t[86]=P,t[87]=R,t[88]=h,t[89]=z,t[90]=B,t[91]=G,t[92]=C,t[93]=K):K=t[93],K}export{Fe as C,Ie as S,Dt as _,Jt as a,At as b,Gt as c,ut as d,ft as f,xt as g,pt as h,Yt as i,Vt as l,lt as m,ln as n,Kt as o,ct as p,rn as r,Wt as s,cn as t,mt as u,dt as v,st as x,Tt as y};
@@ -1 +1 @@
1
- import{t as e}from"./parse-api-error-C_gwkKmG.js";import{i as t}from"./documents-events-NL4RG6fU.js";async function n(t){return e(await t.json().catch(()=>null))??`HTTP ${t.status}`}async function r(e){try{let r=await fetch(`/api/skill`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!r.ok)return{ok:!1,error:await n(r)};let i=await r.json().catch(()=>null);return t(),{ok:!0,created:i?.created??!1,warnings:i?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function i(e){try{let r=await fetch(`/api/skill-file`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!r.ok)return{ok:!1,error:await n(r)};let i=await r.json().catch(()=>null);return t(),{ok:!0,created:i?.created??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function a(){try{let e=await fetch(`/api/skills/management`);return e.ok?await e.json():null}catch{return null}}async function o(e){try{return(await fetch(`/api/skills/management`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({manageEditorSkills:e})})).ok?(t(),!0):!1}catch{return!1}}function s(e,t){let n=`${e}-copy`;if(!t.has(n))return n;for(let n=2;n<1e3;n+=1){let r=`${e}-copy-${n}`;if(!t.has(r))return r}return`${e}-copy-${t.size+1}`}async function c(e){try{let t=new URLSearchParams({name:e.name,scope:e.scope}),i=await fetch(`/api/skill?${t.toString()}`);if(!i.ok)return{ok:!1,error:await n(i)};let a=await i.json().catch(()=>null),o=typeof a?.skill?.frontmatter?.description==`string`?a.skill.frontmatter.description:``,c=typeof a?.skill?.body==`string`?a.skill.body:``,l=s(e.name,e.existingNames),u=await r({scope:e.scope,name:l,frontmatter:{name:l,description:o},body:c});return u.ok?{ok:!0,name:l}:{ok:!1,error:u.error}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function l(e){let{name:a,fromScope:o,toScope:s}=e;if(o===s)return{ok:!0,scope:s};try{let e=await fetch(`/api/skill?name=${encodeURIComponent(a)}&scope=${o}`);if(!e.ok)return{ok:!1,error:await n(e)};let c=await e.json().catch(()=>null),l=typeof c?.skill?.frontmatter?.description==`string`?c.skill.frontmatter.description:``,u=typeof c?.skill?.body==`string`?c.skill.body:``,p=await fetch(`/api/skill?name=${encodeURIComponent(a)}&scope=${s}`);if(p.ok)return{ok:!1,error:`A ${s} skill named "${a}" already exists.`};if(p.status!==404)return{ok:!1,error:`Couldn't verify the ${s} destination "${a}" is free (HTTP ${p.status}); aborting before any write so an existing skill can't be overwritten. Retry in a moment.`};let m=await r({scope:s,name:a,frontmatter:{name:a,description:l},body:u});if(!m.ok)return m;let h=await f(o,a);if(!h.ok)return{ok:!1,error:`Copied "${a}" to ${s}, but reading its bundle files failed (${h.error}); the ${o} original is intact. Delete the partial ${s} copy and retry.`};let g=[];for(let e of h.files){if(e.text===null){g.push(e.path);continue}let t=await i({scope:s,name:a,path:e.path,content:e.text});if(!t.ok)return{ok:!1,error:`Copied "${a}" to ${s}, but copying its bundle file "${e.path}" failed (${t.error}); the ${o} original is intact. Delete the partial ${s} copy and retry.`}}let _=await d(o,a);return _.ok?(t(),{ok:!0,scope:s,...g.length>0?{skippedBinaryFiles:g}:{}}):{ok:!1,error:`Copied to ${s}, but couldn't remove the ${o} copy: ${_.error}`}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function u(e){try{let r=await fetch(`/api/skill`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!r.ok)return{ok:!1,error:await n(r)};let i=await r.json().catch(()=>null);return t(),{ok:!0,committed:i?.committed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function d(e,r){try{let i=`?name=${encodeURIComponent(r)}&scope=${encodeURIComponent(e)}`,a=await fetch(`/api/skill${i}`,{method:`DELETE`});if(!a.ok)return{ok:!1,error:await n(a)};let o=await a.json().catch(()=>null);return t(),{ok:!0,existed:o?.existed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function f(e,t){try{let r=new URLSearchParams({name:t,scope:e}),i=await fetch(`/api/skill?${r.toString()}`);return i.ok?{ok:!0,files:(await i.json().catch(()=>null))?.skill?.files??[]}:{ok:!1,error:await n(i)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function p(e){try{let t=new URLSearchParams({name:e.name,scope:e.scope,path:e.path}),r=await fetch(`/api/skill-file?${t.toString()}`,{signal:e.signal});if(!r.ok)return{ok:!1,status:r.status,error:await n(r)};let i=await r.json().catch(()=>null);return typeof i?.text==`string`?{ok:!0,text:i.text}:{ok:!1,status:r.status,error:`HTTP ${r.status}`}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}function m(e,t){return p({...e,signal:t}).then(e=>e.ok?{ok:!0,text:e.text}:{ok:!1,status:e.status})}async function h(e){try{let r=await fetch(`/api/skill/install`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!r.ok)return{ok:!1,error:await n(r)};let i=await r.json().catch(()=>null);return t(),{ok:!0,hosts:i?.hosts??[],scripts:i?.scripts??!1,warnings:i?.warnings??[],warningCodes:i?.warningCodes??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function g(e){try{let r=await fetch(`/api/skill/uninstall`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!r.ok)return{ok:!1,error:await n(r)};let i=await r.json().catch(()=>null);return t(),{ok:!0,uninstalled:i?.uninstalled??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function _(e){try{let r=await fetch(`/api/skill/update`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!r.ok)return{ok:!1,error:await n(r)};let i=await r.json().catch(()=>null);return t(),{ok:!0,version:i?.version??``,previousVersion:i?.previousVersion,checkpointRef:i?.checkpointRef}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}export{h as a,l as c,g as d,_ as f,a as i,r as l,c as n,m as o,f as r,u as s,d as t,o as u};
1
+ import{t as e}from"./parse-api-error-BtEL2kxi.js";import{i as t}from"./documents-events-DJXnk07Z.js";async function n(t){return e(await t.json().catch(()=>null))??`HTTP ${t.status}`}async function r(e){try{let r=await fetch(`/api/skill`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!r.ok)return{ok:!1,error:await n(r)};let i=await r.json().catch(()=>null);return t(),{ok:!0,created:i?.created??!1,warnings:i?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function i(e){try{let r=await fetch(`/api/skill-file`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!r.ok)return{ok:!1,error:await n(r)};let i=await r.json().catch(()=>null);return t(),{ok:!0,created:i?.created??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function a(){try{let e=await fetch(`/api/skills/management`);return e.ok?await e.json():null}catch{return null}}async function o(e){try{return(await fetch(`/api/skills/management`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({manageEditorSkills:e})})).ok?(t(),!0):!1}catch{return!1}}function s(e,t){let n=`${e}-copy`;if(!t.has(n))return n;for(let n=2;n<1e3;n+=1){let r=`${e}-copy-${n}`;if(!t.has(r))return r}return`${e}-copy-${t.size+1}`}async function c(e){try{let t=new URLSearchParams({name:e.name,scope:e.scope}),i=await fetch(`/api/skill?${t.toString()}`);if(!i.ok)return{ok:!1,error:await n(i)};let a=await i.json().catch(()=>null),o=typeof a?.skill?.frontmatter?.description==`string`?a.skill.frontmatter.description:``,c=typeof a?.skill?.body==`string`?a.skill.body:``,l=s(e.name,e.existingNames),u=await r({scope:e.scope,name:l,frontmatter:{name:l,description:o},body:c});return u.ok?{ok:!0,name:l}:{ok:!1,error:u.error}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function l(e){let{name:a,fromScope:o,toScope:s}=e;if(o===s)return{ok:!0,scope:s};try{let e=await fetch(`/api/skill?name=${encodeURIComponent(a)}&scope=${o}`);if(!e.ok)return{ok:!1,error:await n(e)};let c=await e.json().catch(()=>null),l=typeof c?.skill?.frontmatter?.description==`string`?c.skill.frontmatter.description:``,u=typeof c?.skill?.body==`string`?c.skill.body:``,p=await fetch(`/api/skill?name=${encodeURIComponent(a)}&scope=${s}`);if(p.ok)return{ok:!1,error:`A ${s} skill named "${a}" already exists.`};if(p.status!==404)return{ok:!1,error:`Couldn't verify the ${s} destination "${a}" is free (HTTP ${p.status}); aborting before any write so an existing skill can't be overwritten. Retry in a moment.`};let m=await r({scope:s,name:a,frontmatter:{name:a,description:l},body:u});if(!m.ok)return m;let h=await f(o,a);if(!h.ok)return{ok:!1,error:`Copied "${a}" to ${s}, but reading its bundle files failed (${h.error}); the ${o} original is intact. Delete the partial ${s} copy and retry.`};let g=[];for(let e of h.files){if(e.text===null){g.push(e.path);continue}let t=await i({scope:s,name:a,path:e.path,content:e.text});if(!t.ok)return{ok:!1,error:`Copied "${a}" to ${s}, but copying its bundle file "${e.path}" failed (${t.error}); the ${o} original is intact. Delete the partial ${s} copy and retry.`}}let _=await d(o,a);return _.ok?(t(),{ok:!0,scope:s,...g.length>0?{skippedBinaryFiles:g}:{}}):{ok:!1,error:`Copied to ${s}, but couldn't remove the ${o} copy: ${_.error}`}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function u(e){try{let r=await fetch(`/api/skill`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!r.ok)return{ok:!1,error:await n(r)};let i=await r.json().catch(()=>null);return t(),{ok:!0,committed:i?.committed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function d(e,r){try{let i=`?name=${encodeURIComponent(r)}&scope=${encodeURIComponent(e)}`,a=await fetch(`/api/skill${i}`,{method:`DELETE`});if(!a.ok)return{ok:!1,error:await n(a)};let o=await a.json().catch(()=>null);return t(),{ok:!0,existed:o?.existed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function f(e,t){try{let r=new URLSearchParams({name:t,scope:e}),i=await fetch(`/api/skill?${r.toString()}`);return i.ok?{ok:!0,files:(await i.json().catch(()=>null))?.skill?.files??[]}:{ok:!1,error:await n(i)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function p(e){try{let t=new URLSearchParams({name:e.name,scope:e.scope,path:e.path}),r=await fetch(`/api/skill-file?${t.toString()}`,{signal:e.signal});if(!r.ok)return{ok:!1,status:r.status,error:await n(r)};let i=await r.json().catch(()=>null);return typeof i?.text==`string`?{ok:!0,text:i.text}:{ok:!1,status:r.status,error:`HTTP ${r.status}`}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}function m(e,t){return p({...e,signal:t}).then(e=>e.ok?{ok:!0,text:e.text}:{ok:!1,status:e.status})}async function h(e){try{let r=await fetch(`/api/skill/install`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!r.ok)return{ok:!1,error:await n(r)};let i=await r.json().catch(()=>null);return t(),{ok:!0,hosts:i?.hosts??[],scripts:i?.scripts??!1,warnings:i?.warnings??[],warningCodes:i?.warningCodes??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function g(e){try{let r=await fetch(`/api/skill/uninstall`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!r.ok)return{ok:!1,error:await n(r)};let i=await r.json().catch(()=>null);return t(),{ok:!0,uninstalled:i?.uninstalled??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function _(e){try{let r=await fetch(`/api/skill/update`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!r.ok)return{ok:!1,error:await n(r)};let i=await r.json().catch(()=>null);return t(),{ok:!0,version:i?.version??``,previousVersion:i?.previousVersion,checkpointRef:i?.checkpointRef}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}export{h as a,l as c,g as d,_ as f,a as i,r as l,c as n,m as o,f as r,u as s,d as t,o as u};
@@ -1,2 +1,2 @@
1
- import{H as e}from"./CodeMirrorPropInput-BQX8xzkZ.js";import{$ as t,B as n,C as r,N as i,S as a,V as o,et as s,f as c,v as l,y as u,z as d}from"./config-provider-CJmVSUcR.js";import{$ as f,Dt as p,J as m,Mt as h,Q as g,St as _,X as v,kt as y}from"./dist-DNwOaDhC.js";var b=class e{constructor(e,t){this.yanchor=e,this.yhead=t}toJSON(){return{yanchor:i(this.yanchor),yhead:i(this.yhead)}}static fromJSON(t){return new e(a(t.yanchor),a(t.yhead))}},x=class{constructor(e,t){this.ytext=e,this.awareness=t,this.undoManager=new c(e)}toYPos(e,t=0){return r(this.ytext,e,t)}fromYPos(e){let t=u(a(e),this.ytext.doc);if(t==null||t.type!==this.ytext)throw Error(`[y-codemirror] The position you want to retrieve was created by a different document`);return{pos:t.index,assoc:t.assoc}}toYRange(e){let t=e.assoc;return new b(this.toYPos(e.anchor,t),this.toYPos(e.head,t))}fromYRange(e){let t=this.fromYPos(e.yanchor),n=this.fromYPos(e.yhead);return t.pos===n.pos?p.cursor(n.pos,n.assoc):p.range(t.pos,n.pos)}},S=y.define({combine(e){return e[e.length-1]}}),C=_.define(),w=class{constructor(e){this.view=e,this.conf=e.state.facet(S),this._observer=(t,n)=>{if(n.origin!==this.conf){let n=t.delta,r=[],i=0;for(let e=0;e<n.length;e++){let t=n[e];t.insert==null?t.delete==null?i+=t.retain:(r.push({from:i,to:i+t.delete,insert:``}),i+=t.delete):r.push({from:i,to:i,insert:t.insert})}e.dispatch({changes:r,annotations:[C.of(this.conf)]})}},this._ytext=this.conf.ytext,this._ytext.observe(this._observer)}update(e){if(!e.docChanged||e.transactions.length>0&&e.transactions[0].annotation(C)===this.conf)return;let t=this.conf.ytext;t.doc.transact(()=>{let n=0;e.changes.iterChanges((e,r,i,a,o)=>{let s=o.sliceString(0,o.length,`
1
+ import{H as e}from"./CodeMirrorPropInput-CyIlgGaP.js";import{$ as t,B as n,C as r,N as i,S as a,V as o,et as s,f as c,v as l,y as u,z as d}from"./config-provider-CedEU5Ch.js";import{$ as f,Dt as p,J as m,Mt as h,Q as g,St as _,X as v,kt as y}from"./dist-D7mv9smG.js";var b=class e{constructor(e,t){this.yanchor=e,this.yhead=t}toJSON(){return{yanchor:i(this.yanchor),yhead:i(this.yhead)}}static fromJSON(t){return new e(a(t.yanchor),a(t.yhead))}},x=class{constructor(e,t){this.ytext=e,this.awareness=t,this.undoManager=new c(e)}toYPos(e,t=0){return r(this.ytext,e,t)}fromYPos(e){let t=u(a(e),this.ytext.doc);if(t==null||t.type!==this.ytext)throw Error(`[y-codemirror] The position you want to retrieve was created by a different document`);return{pos:t.index,assoc:t.assoc}}toYRange(e){let t=e.assoc;return new b(this.toYPos(e.anchor,t),this.toYPos(e.head,t))}fromYRange(e){let t=this.fromYPos(e.yanchor),n=this.fromYPos(e.yhead);return t.pos===n.pos?p.cursor(n.pos,n.assoc):p.range(t.pos,n.pos)}},S=y.define({combine(e){return e[e.length-1]}}),C=_.define(),w=class{constructor(e){this.view=e,this.conf=e.state.facet(S),this._observer=(t,n)=>{if(n.origin!==this.conf){let n=t.delta,r=[],i=0;for(let e=0;e<n.length;e++){let t=n[e];t.insert==null?t.delete==null?i+=t.retain:(r.push({from:i,to:i+t.delete,insert:``}),i+=t.delete):r.push({from:i,to:i,insert:t.insert})}e.dispatch({changes:r,annotations:[C.of(this.conf)]})}},this._ytext=this.conf.ytext,this._ytext.observe(this._observer)}update(e){if(!e.docChanged||e.transactions.length>0&&e.transactions[0].annotation(C)===this.conf)return;let t=this.conf.ytext;t.doc.transact(()=>{let n=0;e.changes.iterChanges((e,r,i,a,o)=>{let s=o.sliceString(0,o.length,`
2
2
  `);e!==r&&t.delete(e+n,r-e),s.length>0&&t.insert(e+n,s),n+=s.length-(r-e)})},this.conf)}destroy(){this._ytext.unobserve(this._observer)}},T=g.fromClass(w),E=v.baseTheme({".cm-ySelection":{},".cm-yLineSelection":{padding:0,margin:`0px 2px 0px 4px`},".cm-ySelectionCaret":{position:`relative`,borderLeft:`1px solid black`,borderRight:`1px solid black`,marginLeft:`-1px`,marginRight:`-1px`,boxSizing:`border-box`,display:`inline`},".cm-ySelectionCaretDot":{borderRadius:`50%`,position:`absolute`,width:`.4em`,height:`.4em`,top:`-.2em`,left:`-.2em`,backgroundColor:`inherit`,transition:`transform .3s ease-in-out`,boxSizing:`border-box`},".cm-ySelectionCaret:hover > .cm-ySelectionCaretDot":{transformOrigin:`bottom center`,transform:`scale(0)`},".cm-ySelectionInfo":{position:`absolute`,top:`-1.05em`,left:`-1px`,fontSize:`.75em`,fontFamily:`serif`,fontStyle:`normal`,fontWeight:`normal`,lineHeight:`normal`,userSelect:`none`,color:`white`,paddingLeft:`2px`,paddingRight:`2px`,zIndex:101,transition:`opacity .3s ease-in-out`,backgroundColor:`inherit`,opacity:0,transitionDelay:`0s`,whiteSpace:`nowrap`},".cm-ySelectionCaret:hover > .cm-ySelectionInfo":{opacity:1,transitionDelay:`0s`}}),D=_.define(),O=class extends f{constructor(e,t){super(),this.color=e,this.name=t}toDOM(){return d(`span`,[o(`class`,`cm-ySelectionCaret`),o(`style`,`background-color: ${this.color}; border-color: ${this.color}`)],[n(`⁠`),d(`div`,[o(`class`,`cm-ySelectionCaretDot`)]),n(`⁠`),d(`div`,[o(`class`,`cm-ySelectionInfo`)],[n(this.name)]),n(`⁠`)])}eq(e){return e.color===this.color}compare(e){return e.color===this.color}updateDOM(){return!1}get estimatedHeight(){return-1}ignoreEvent(){return!0}},k=class{constructor(e){this.conf=e.state.facet(S),this._listener=({added:t,updated:n,removed:r},i,a)=>{t.concat(n).concat(r).findIndex(e=>e!==this.conf.awareness.doc.clientID)>=0&&e.dispatch({annotations:[D.of([])]})},this._awareness=this.conf.awareness,this._awareness.on(`change`,this._listener),this.decorations=h.of([])}destroy(){this._awareness.off(`change`,this._listener)}update(e){let n=this.conf.ytext,i=n.doc,o=this.conf.awareness,c=[],d=this.conf.awareness.getLocalState();if(d!=null){let t=e.view.hasFocus&&e.view.dom.ownerDocument.hasFocus(),i=t?e.state.selection.main:null,s=d.cursor==null?null:a(d.cursor.anchor),c=d.cursor==null?null:a(d.cursor.head);if(i!=null){let e=r(n,i.anchor),t=r(n,i.head);(d.cursor==null||!l(s,e)||!l(c,t))&&o.setLocalStateField(`cursor`,{anchor:e,head:t})}else d.cursor!=null&&t&&o.setLocalStateField(`cursor`,null)}o.getStates().forEach((r,a)=>{if(a===o.doc.clientID)return;let l=r.cursor;if(l==null||l.anchor==null||l.head==null)return;let d=u(l.anchor,i),f=u(l.head,i);if(d==null||f==null||d.type!==n||f.type!==n)return;let{color:p=`#30bced`,name:h=`Anonymous`}=r.user||{},g=r.user&&r.user.colorLight||p+`33`,_=s(d.index,f.index),v=t(d.index,f.index),y=e.view.state.doc.lineAt(_),b=e.view.state.doc.lineAt(v);if(y.number===b.number)c.push({from:_,to:v,value:m.mark({attributes:{style:`background-color: ${g}`},class:`cm-ySelection`})});else{c.push({from:_,to:y.from+y.length,value:m.mark({attributes:{style:`background-color: ${g}`},class:`cm-ySelection`})}),c.push({from:b.from,to:v,value:m.mark({attributes:{style:`background-color: ${g}`},class:`cm-ySelection`})});for(let t=y.number+1;t<b.number;t++){let n=e.view.state.doc.line(t).from;c.push({from:n,to:n,value:m.line({attributes:{style:`background-color: ${g}`,class:`cm-yLineSelection`}})})}}c.push({from:f.index,to:f.index,value:m.widget({side:f.index-d.index>0?-1:1,block:!1,widget:new O(p,h)})})}),this.decorations=m.set(c,!0)}},A=g.fromClass(k,{decorations:e=>e.decorations}),j=class{constructor(e){this.undoManager=e}addTrackedOrigin(e){this.undoManager.addTrackedOrigin(e)}removeTrackedOrigin(e){this.undoManager.removeTrackedOrigin(e)}undo(){return this.undoManager.undo()!=null}redo(){return this.undoManager.redo()!=null}},M=y.define({combine(e){return e[e.length-1]}});_.define();var N=class{constructor(t){this.view=t,this.conf=t.state.facet(M),this._undoManager=this.conf.undoManager,this.syncConf=t.state.facet(S),this._beforeChangeSelection=null,this._mux=e(),this._onStackItemAdded=({stackItem:e,changedParentTypes:t})=>{t.has(this.syncConf.ytext)&&this._beforeChangeSelection&&!e.meta.has(this)&&e.meta.set(this,this._beforeChangeSelection)},this._onStackItemPopped=({stackItem:e})=>{let n=e.meta.get(this);if(n){let e=this.syncConf.fromYRange(n);t.dispatch(t.state.update({selection:e,effects:[v.scrollIntoView(e)]})),this._storeSelection()}},this._storeSelection=()=>{this._beforeChangeSelection=this.syncConf.toYRange(this.view.state.selection.main)},this._undoManager.on(`stack-item-added`,this._onStackItemAdded),this._undoManager.on(`stack-item-popped`,this._onStackItemPopped),this._undoManager.addTrackedOrigin(this.syncConf)}update(e){e.selectionSet&&(e.transactions.length===0||e.transactions[0].annotation(C)!==this.syncConf)&&this._storeSelection()}destroy(){this._undoManager.off(`stack-item-added`,this._onStackItemAdded),this._undoManager.off(`stack-item-popped`,this._onStackItemPopped),this._undoManager.removeTrackedOrigin(this.syncConf)}},P=g.fromClass(N),F=({state:e,dispatch:t})=>e.facet(M).undo()||!0,I=({state:e,dispatch:t})=>e.facet(M).redo()||!0,L=[{key:`Mod-z`,run:F,preventDefault:!0},{key:`Mod-y`,mac:`Mod-Shift-z`,run:I,preventDefault:!0},{key:`Mod-Shift-z`,run:I,preventDefault:!0}],R=(e,t,{undoManager:n=new c(e)}={})=>{let r=new x(e,t),i=[S.of(r),T];return t&&i.push(E,A),n!==!1&&i.push(M.of(new j(n)),P,v.domEventHandlers({beforeinput(e,t){return e.inputType===`historyUndo`?F(t):e.inputType===`historyRedo`?I(t):!1}})),i};export{L as n,R as t};
@@ -1 +1 @@
1
- import{o as e,t}from"./chunk-CYidjpOJ.js";import{n}from"./chunk-Y2CYZVJY-BAUBUeAF.js";import"./src-DNE52RZP.js";var r=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||=(e(t,E,w),!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))})),i=e(r(),1),a={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},o={trace:n((...e)=>{},`trace`),debug:n((...e)=>{},`debug`),info:n((...e)=>{},`info`),warn:n((...e)=>{},`warn`),error:n((...e)=>{},`error`),fatal:n((...e)=>{},`fatal`)},s=n(function(e=`fatal`){let t=a.fatal;typeof e==`string`?e.toLowerCase()in a&&(t=a[e]):typeof e==`number`&&(t=e),o.trace=()=>{},o.debug=()=>{},o.info=()=>{},o.warn=()=>{},o.error=()=>{},o.fatal=()=>{},t<=a.fatal&&(o.fatal=console.error?console.error.bind(console,c(`FATAL`),`color: orange`):console.log.bind(console,`\x1B[35m`,c(`FATAL`))),t<=a.error&&(o.error=console.error?console.error.bind(console,c(`ERROR`),`color: orange`):console.log.bind(console,`\x1B[31m`,c(`ERROR`))),t<=a.warn&&(o.warn=console.warn?console.warn.bind(console,c(`WARN`),`color: orange`):console.log.bind(console,`\x1B[33m`,c(`WARN`))),t<=a.info&&(o.info=console.info?console.info.bind(console,c(`INFO`),`color: lightblue`):console.log.bind(console,`\x1B[34m`,c(`INFO`))),t<=a.debug&&(o.debug=console.debug?console.debug.bind(console,c(`DEBUG`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,c(`DEBUG`))),t<=a.trace&&(o.trace=console.debug?console.debug.bind(console,c(`TRACE`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,c(`TRACE`)))},`setLogLevel`),c=n(e=>`%c${(0,i.default)().format(`ss.SSS`)} : ${e} : `,`format`),{abs:l,max:u,min:d}=Math;[`w`,`e`].map(f),[`n`,`s`].map(f),[`n`,`w`,`e`,`s`,`nw`,`ne`,`sw`,`se`].map(f);function f(e){return{type:e}}export{s as n,r,o as t};
1
+ import{o as e,t}from"./chunk-CYidjpOJ.js";import{n}from"./chunk-Y2CYZVJY-CP7lNZai.js";import"./src-BJaEWo8x.js";var r=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||=(e(t,E,w),!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))})),i=e(r(),1),a={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},o={trace:n((...e)=>{},`trace`),debug:n((...e)=>{},`debug`),info:n((...e)=>{},`info`),warn:n((...e)=>{},`warn`),error:n((...e)=>{},`error`),fatal:n((...e)=>{},`fatal`)},s=n(function(e=`fatal`){let t=a.fatal;typeof e==`string`?e.toLowerCase()in a&&(t=a[e]):typeof e==`number`&&(t=e),o.trace=()=>{},o.debug=()=>{},o.info=()=>{},o.warn=()=>{},o.error=()=>{},o.fatal=()=>{},t<=a.fatal&&(o.fatal=console.error?console.error.bind(console,c(`FATAL`),`color: orange`):console.log.bind(console,`\x1B[35m`,c(`FATAL`))),t<=a.error&&(o.error=console.error?console.error.bind(console,c(`ERROR`),`color: orange`):console.log.bind(console,`\x1B[31m`,c(`ERROR`))),t<=a.warn&&(o.warn=console.warn?console.warn.bind(console,c(`WARN`),`color: orange`):console.log.bind(console,`\x1B[33m`,c(`WARN`))),t<=a.info&&(o.info=console.info?console.info.bind(console,c(`INFO`),`color: lightblue`):console.log.bind(console,`\x1B[34m`,c(`INFO`))),t<=a.debug&&(o.debug=console.debug?console.debug.bind(console,c(`DEBUG`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,c(`DEBUG`))),t<=a.trace&&(o.trace=console.debug?console.debug.bind(console,c(`TRACE`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,c(`TRACE`)))},`setLogLevel`),c=n(e=>`%c${(0,i.default)().format(`ss.SSS`)} : ${e} : `,`format`),{abs:l,max:u,min:d}=Math;[`w`,`e`].map(f),[`n`,`s`].map(f),[`n`,`w`,`e`,`s`,`nw`,`ne`,`sw`,`se`].map(f);function f(e){return{type:e}}export{s as n,r,o as t};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-BAUBUeAF.js";import{t}from"./src--OxBHrEw.js";import{O as n,c as r,s as i,x as a}from"./chunk-WYO6CB5R-9yPqK9ib.js";import{C as o}from"./src-DNE52RZP.js";import{et as s,g as c}from"./chunk-ICXQ74PX-CDyWyZCQ.js";import{t as l}from"./line-KTG0S8eM.js";import"./chunk-HOUHSVGY-DTcG17JD.js";import"./chunk-Q4XR5HBZ-B32WTAPs.js";import"./chunk-7BUUIJ7U-B7ItXXvn.js";import"./chunk-OGEWGWER-BgCGYbch.js";import{t as u}from"./graphlib-DYCc0Y9o.js";import{t as d}from"./dagre-DjTdhlGF.js";import"./chunk-32BRIVSS-J_rdnOiy.js";import"./chunk-XXDRQBXY-Dpdm1nrz.js";import"./chunk-VR4S4FIN-CcTJJ1HA.js";import"./chunk-C7G6YPKG-Bhzd4FsL.js";import"./chunk-ZGVPDNZ5-5ruaVNfo.js";import"./chunk-52WLFC77-BOMCKXNP.js";import"./chunk-FWX5IMBZ-1CESfm5O.js";import{i as f,n as p,t as m}from"./chunk-EX3LRPZG-BIvLDOrf.js";var h=e(e=>e.append(`circle`).attr(`class`,`start-state`).attr(`r`,a().state.sizeUnit).attr(`cx`,a().state.padding+a().state.sizeUnit).attr(`cy`,a().state.padding+a().state.sizeUnit),`drawStartState`),g=e(e=>e.append(`line`).style(`stroke`,`grey`).style(`stroke-dasharray`,`3`).attr(`x1`,a().state.textHeight).attr(`class`,`divider`).attr(`x2`,a().state.textHeight*2).attr(`y1`,0).attr(`y2`,0),`drawDivider`),_=e((e,t)=>{let n=e.append(`text`).attr(`x`,2*a().state.padding).attr(`y`,a().state.textHeight+2*a().state.padding).attr(`font-size`,a().state.fontSize).attr(`class`,`state-title`).text(t.id),r=n.node().getBBox();return e.insert(`rect`,`:first-child`).attr(`x`,a().state.padding).attr(`y`,a().state.padding).attr(`width`,r.width+2*a().state.padding).attr(`height`,r.height+2*a().state.padding).attr(`rx`,a().state.radius),n},`drawSimpleState`),v=e((t,n)=>{let r=e(function(e,t,n){let r=e.append(`tspan`).attr(`x`,2*a().state.padding).text(t);n||r.attr(`dy`,a().state.textHeight)},`addTspan`),i=t.append(`text`).attr(`x`,2*a().state.padding).attr(`y`,a().state.textHeight+1.3*a().state.padding).attr(`font-size`,a().state.fontSize).attr(`class`,`state-title`).text(n.descriptions[0]).node().getBBox(),o=i.height,s=t.append(`text`).attr(`x`,a().state.padding).attr(`y`,o+a().state.padding*.4+a().state.dividerMargin+a().state.textHeight).attr(`class`,`state-description`),c=!0,l=!0;n.descriptions.forEach(function(e){c||(r(s,e,l),l=!1),c=!1});let u=t.append(`line`).attr(`x1`,a().state.padding).attr(`y1`,a().state.padding+o+a().state.dividerMargin/2).attr(`y2`,a().state.padding+o+a().state.dividerMargin/2).attr(`class`,`descr-divider`),d=s.node().getBBox(),f=Math.max(d.width,i.width);return u.attr(`x2`,f+3*a().state.padding),t.insert(`rect`,`:first-child`).attr(`x`,a().state.padding).attr(`y`,a().state.padding).attr(`width`,f+2*a().state.padding).attr(`height`,d.height+o+2*a().state.padding).attr(`rx`,a().state.radius),t},`drawDescrState`),y=e((e,t,n)=>{let r=a().state.padding,i=2*a().state.padding,o=e.node().getBBox(),s=o.width,c=o.x,l=e.append(`text`).attr(`x`,0).attr(`y`,a().state.titleShift).attr(`font-size`,a().state.fontSize).attr(`class`,`state-title`).text(t.id),u=l.node().getBBox().width+i,d=Math.max(u,s);d===s&&(d+=i);let f,p=e.node().getBBox();t.doc,f=c-r,u>s&&(f=(s-d)/2+r),Math.abs(c-p.x)<r&&u>s&&(f=c-(u-s)/2);let m=1-a().state.textHeight;return e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,m).attr(`class`,n?`alt-composit`:`composit`).attr(`width`,d).attr(`height`,p.height+a().state.textHeight+a().state.titleShift+1).attr(`rx`,`0`),l.attr(`x`,f+r),u<=s&&l.attr(`x`,c+(d-i)/2-u/2+r),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,a().state.titleShift-a().state.textHeight-a().state.padding).attr(`width`,d).attr(`height`,a().state.textHeight*3).attr(`rx`,a().state.radius),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,a().state.titleShift-a().state.textHeight-a().state.padding).attr(`width`,d).attr(`height`,p.height+3+2*a().state.textHeight).attr(`rx`,a().state.radius),e},`addTitleAndBox`),b=e(e=>(e.append(`circle`).attr(`class`,`end-state-outer`).attr(`r`,a().state.sizeUnit+a().state.miniPadding).attr(`cx`,a().state.padding+a().state.sizeUnit+a().state.miniPadding).attr(`cy`,a().state.padding+a().state.sizeUnit+a().state.miniPadding),e.append(`circle`).attr(`class`,`end-state-inner`).attr(`r`,a().state.sizeUnit).attr(`cx`,a().state.padding+a().state.sizeUnit+2).attr(`cy`,a().state.padding+a().state.sizeUnit+2)),`drawEndState`),x=e((e,t)=>{let n=a().state.forkWidth,r=a().state.forkHeight;if(t.parentId){let e=n;n=r,r=e}return e.append(`rect`).style(`stroke`,`black`).style(`fill`,`black`).attr(`width`,n).attr(`height`,r).attr(`x`,a().state.padding).attr(`y`,a().state.padding)},`drawForkJoinState`),S=e((e,t,n,r)=>{let o=0,s=r.append(`text`);s.style(`text-anchor`,`start`),s.attr(`class`,`noteText`);let c=e.replace(/\r\n/g,`<br/>`);c=c.replace(/\n/g,`<br/>`);let l=c.split(i.lineBreakRegex),u=1.25*a().state.noteMargin;for(let e of l){let r=e.trim();if(r.length>0){let e=s.append(`tspan`);if(e.text(r),u===0){let t=e.node().getBBox();u+=t.height}o+=u,e.attr(`x`,t+a().state.noteMargin),e.attr(`y`,n+o+1.25*a().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:o}},`_drawLongText`),C=e((e,t)=>{t.attr(`class`,`state-note`);let n=t.append(`rect`).attr(`x`,0).attr(`y`,a().state.padding),{textWidth:r,textHeight:i}=S(e,0,0,t.append(`g`));return n.attr(`height`,i+2*a().state.noteMargin),n.attr(`width`,r+a().state.noteMargin*2),n},`drawNote`),w=e(function(e,t){let n=t.id,r={id:n,label:t.id,width:0,height:0},i=e.append(`g`).attr(`id`,n).attr(`class`,`stateGroup`);t.type===`start`&&h(i),t.type===`end`&&b(i),(t.type===`fork`||t.type===`join`)&&x(i,t),t.type===`note`&&C(t.note.text,i),t.type===`divider`&&g(i),t.type===`default`&&t.descriptions.length===0&&_(i,t),t.type===`default`&&t.descriptions.length>0&&v(i,t);let o=i.node().getBBox();return r.width=o.width+2*a().state.padding,r.height=o.height+2*a().state.padding,r},`drawState`),T=0,E=e(function(r,o,u){let d=e(function(e){switch(e){case m.relationType.AGGREGATION:return`aggregation`;case m.relationType.EXTENSION:return`extension`;case m.relationType.COMPOSITION:return`composition`;case m.relationType.DEPENDENCY:return`dependency`}},`getRelationType`);o.points=o.points.filter(e=>!Number.isNaN(e.y));let f=o.points,p=l().x(function(e){return e.x}).y(function(e){return e.y}).curve(s),h=r.append(`path`).attr(`d`,p(f)).attr(`id`,`edge`+T).attr(`class`,`transition`),g=``;if(a().state.arrowMarkerAbsolute&&(g=n(!0)),h.attr(`marker-end`,`url(`+g+`#`+d(m.relationType.DEPENDENCY)+`End)`),u.title!==void 0){let e=r.append(`g`).attr(`class`,`stateLabel`),{x:n,y:s}=c.calcLabelPosition(o.points),l=i.getRows(u.title),d=0,f=[],p=0,m=0;for(let r=0;r<=l.length;r++){let i=e.append(`text`).attr(`text-anchor`,`middle`).text(l[r]).attr(`x`,n).attr(`y`,s+d),a=i.node().getBBox();p=Math.max(p,a.width),m=Math.min(m,a.x),t.info(a.x,n,s+d),d===0&&(d=i.node().getBBox().height,t.info(`Title height`,d,s)),f.push(i)}let h=d*l.length;if(l.length>1){let e=(l.length-1)*d*.5;f.forEach((t,n)=>t.attr(`y`,s+n*d-e)),h=d*l.length}let g=e.node().getBBox();e.insert(`rect`,`:first-child`).attr(`class`,`box`).attr(`x`,n-p/2-a().state.padding/2).attr(`y`,s-h/2-a().state.padding/2-3.5).attr(`width`,p+a().state.padding).attr(`height`,h+a().state.padding),t.info(g)}T++},`drawEdge`),D,O={},k=e(function(){},`setConf`),A=e(function(e){e.append(`defs`).append(`marker`).attr(`id`,`dependencyEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`insertMarkers`),j=e(function(e,n,i,s){D=a().state;let c=a().securityLevel,l;c===`sandbox`&&(l=o(`#i`+n));let u=o(c===`sandbox`?l.nodes()[0].contentDocument.body:`body`),d=c===`sandbox`?l.nodes()[0].contentDocument:document;t.debug(`Rendering diagram `+e);let f=u.select(`[id='${n}']`);A(f),N(s.db.getRootDoc(),f.append(`g`).attr(`id`,n+`-root`),void 0,!1,u,d,s);let p=D.padding,m=f.node().getBBox(),h=m.width+p*2,g=m.height+p*2;r(f,g,h*1.75,D.useMaxWidth),f.attr(`viewBox`,`${m.x-D.padding} ${m.y-D.padding} `+h+` `+g)},`draw`),M=e(e=>e?e.length*D.fontSizeFactor:1,`getLabelWidth`),N=e((e,n,r,a,o,s,c)=>{let l=new u({compound:!0,multigraph:!0}),f,p=!0;for(f=0;f<e.length;f++)if(e[f].stmt===`relation`){p=!1;break}r?l.setGraph({rankdir:`LR`,multigraph:!0,compound:!0,ranker:`tight-tree`,ranksep:p?1:D.edgeLengthFactor,nodeSep:p?1:50,isMultiGraph:!0}):l.setGraph({rankdir:`TB`,multigraph:!0,compound:!0,ranksep:p?1:D.edgeLengthFactor,nodeSep:p?1:50,ranker:`tight-tree`,isMultiGraph:!0}),l.setDefaultEdgeLabel(function(){return{}});let m=c.db.getStates(),h=c.db.getRelations(),g=Object.keys(m);for(let e of g){let t=m[e];r&&(t.parentId=r);let i;if(t.doc){let e=n.append(`g`).attr(`id`,t.id).attr(`class`,`stateGroup`);i=N(t.doc,e,t.id,!a,o,s,c);{e=y(e,t,a);let n=e.node().getBBox();i.width=n.width,i.height=n.height+D.padding/2,O[t.id]={y:D.compositTitleSize}}}else i=w(n,t,l);if(t.note){let e=w(n,{descriptions:[],id:t.id+`-note`,note:t.note,type:`note`},l);t.note.position===`left of`?(l.setNode(i.id+`-note`,e),l.setNode(i.id,i)):(l.setNode(i.id,i),l.setNode(i.id+`-note`,e)),l.setParent(i.id,i.id+`-group`),l.setParent(i.id+`-note`,i.id+`-group`)}else l.setNode(i.id,i)}t.debug(`Count=`,l.nodeCount(),l);let _=0;h.forEach(function(e){_++,t.debug(`Setting edge`,e),l.setEdge(e.id1,e.id2,{relation:e,width:M(e.title),height:D.labelHeight*i.getRows(e.title).length,labelpos:`c`},`id`+_)}),d(l),t.debug(`Graph after layout`,l.nodes());let v=n.node();l.nodes().forEach(function(e){e!==void 0&&l.node(e)!==void 0?(t.warn(`Node `+e+`: `+JSON.stringify(l.node(e))),o.select(`#`+v.id+` #`+e).attr(`transform`,`translate(`+(l.node(e).x-l.node(e).width/2)+`,`+(l.node(e).y+(O[e]?O[e].y:0)-l.node(e).height/2)+` )`),o.select(`#`+v.id+` #`+e).attr(`data-x-shift`,l.node(e).x-l.node(e).width/2),s.querySelectorAll(`#`+v.id+` #`+e+` .divider`).forEach(e=>{let t=e.parentElement,n=0,r=0;t&&(t.parentElement&&(n=t.parentElement.getBBox().width),r=parseInt(t.getAttribute(`data-x-shift`),10),Number.isNaN(r)&&(r=0)),e.setAttribute(`x1`,0-r+8),e.setAttribute(`x2`,n-r-8)})):t.debug(`No Node `+e+`: `+JSON.stringify(l.node(e)))});let b=v.getBBox();l.edges().forEach(function(e){e!==void 0&&l.edge(e)!==void 0&&(t.debug(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(l.edge(e))),E(n,l.edge(e),l.edge(e).relation))}),b=v.getBBox();let x={id:r||`root`,label:r||`root`,width:0,height:0};return x.width=b.width+2*D.padding,x.height=b.height+2*D.padding,t.debug(`Doc rendered`,x,l),x},`renderDoc`),P={parser:p,get db(){return new m(1)},renderer:{setConf:k,draw:j},styles:f,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{P as diagram};
1
+ import{n as e}from"./chunk-Y2CYZVJY-CP7lNZai.js";import{t}from"./src-CaBa9Z1L.js";import{O as n,c as r,s as i,x as a}from"./chunk-WYO6CB5R-C-c-Ja6D.js";import{C as o}from"./src-BJaEWo8x.js";import{et as s,g as c}from"./chunk-ICXQ74PX-BUnmDgqa.js";import{t as l}from"./line-PfwSO0Y4.js";import"./chunk-HOUHSVGY-D0096-9K.js";import"./chunk-Q4XR5HBZ-CjNiHUWo.js";import"./chunk-7BUUIJ7U-Dw__VSpN.js";import"./chunk-OGEWGWER-DLH_3q-Z.js";import{t as u}from"./graphlib-CIYGRnfF.js";import{t as d}from"./dagre-BeM31D08.js";import"./chunk-32BRIVSS-DqkgLIEw.js";import"./chunk-XXDRQBXY-BjAUTr8E.js";import"./chunk-VR4S4FIN-CnZ3Jw81.js";import"./chunk-C7G6YPKG-CmP7ozUj.js";import"./chunk-ZGVPDNZ5-DfBSa8vW.js";import"./chunk-52WLFC77-9s8UsQXp.js";import"./chunk-FWX5IMBZ-rnR9hrS_.js";import{i as f,n as p,t as m}from"./chunk-EX3LRPZG-aq_XJzX2.js";var h=e(e=>e.append(`circle`).attr(`class`,`start-state`).attr(`r`,a().state.sizeUnit).attr(`cx`,a().state.padding+a().state.sizeUnit).attr(`cy`,a().state.padding+a().state.sizeUnit),`drawStartState`),g=e(e=>e.append(`line`).style(`stroke`,`grey`).style(`stroke-dasharray`,`3`).attr(`x1`,a().state.textHeight).attr(`class`,`divider`).attr(`x2`,a().state.textHeight*2).attr(`y1`,0).attr(`y2`,0),`drawDivider`),_=e((e,t)=>{let n=e.append(`text`).attr(`x`,2*a().state.padding).attr(`y`,a().state.textHeight+2*a().state.padding).attr(`font-size`,a().state.fontSize).attr(`class`,`state-title`).text(t.id),r=n.node().getBBox();return e.insert(`rect`,`:first-child`).attr(`x`,a().state.padding).attr(`y`,a().state.padding).attr(`width`,r.width+2*a().state.padding).attr(`height`,r.height+2*a().state.padding).attr(`rx`,a().state.radius),n},`drawSimpleState`),v=e((t,n)=>{let r=e(function(e,t,n){let r=e.append(`tspan`).attr(`x`,2*a().state.padding).text(t);n||r.attr(`dy`,a().state.textHeight)},`addTspan`),i=t.append(`text`).attr(`x`,2*a().state.padding).attr(`y`,a().state.textHeight+1.3*a().state.padding).attr(`font-size`,a().state.fontSize).attr(`class`,`state-title`).text(n.descriptions[0]).node().getBBox(),o=i.height,s=t.append(`text`).attr(`x`,a().state.padding).attr(`y`,o+a().state.padding*.4+a().state.dividerMargin+a().state.textHeight).attr(`class`,`state-description`),c=!0,l=!0;n.descriptions.forEach(function(e){c||(r(s,e,l),l=!1),c=!1});let u=t.append(`line`).attr(`x1`,a().state.padding).attr(`y1`,a().state.padding+o+a().state.dividerMargin/2).attr(`y2`,a().state.padding+o+a().state.dividerMargin/2).attr(`class`,`descr-divider`),d=s.node().getBBox(),f=Math.max(d.width,i.width);return u.attr(`x2`,f+3*a().state.padding),t.insert(`rect`,`:first-child`).attr(`x`,a().state.padding).attr(`y`,a().state.padding).attr(`width`,f+2*a().state.padding).attr(`height`,d.height+o+2*a().state.padding).attr(`rx`,a().state.radius),t},`drawDescrState`),y=e((e,t,n)=>{let r=a().state.padding,i=2*a().state.padding,o=e.node().getBBox(),s=o.width,c=o.x,l=e.append(`text`).attr(`x`,0).attr(`y`,a().state.titleShift).attr(`font-size`,a().state.fontSize).attr(`class`,`state-title`).text(t.id),u=l.node().getBBox().width+i,d=Math.max(u,s);d===s&&(d+=i);let f,p=e.node().getBBox();t.doc,f=c-r,u>s&&(f=(s-d)/2+r),Math.abs(c-p.x)<r&&u>s&&(f=c-(u-s)/2);let m=1-a().state.textHeight;return e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,m).attr(`class`,n?`alt-composit`:`composit`).attr(`width`,d).attr(`height`,p.height+a().state.textHeight+a().state.titleShift+1).attr(`rx`,`0`),l.attr(`x`,f+r),u<=s&&l.attr(`x`,c+(d-i)/2-u/2+r),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,a().state.titleShift-a().state.textHeight-a().state.padding).attr(`width`,d).attr(`height`,a().state.textHeight*3).attr(`rx`,a().state.radius),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,a().state.titleShift-a().state.textHeight-a().state.padding).attr(`width`,d).attr(`height`,p.height+3+2*a().state.textHeight).attr(`rx`,a().state.radius),e},`addTitleAndBox`),b=e(e=>(e.append(`circle`).attr(`class`,`end-state-outer`).attr(`r`,a().state.sizeUnit+a().state.miniPadding).attr(`cx`,a().state.padding+a().state.sizeUnit+a().state.miniPadding).attr(`cy`,a().state.padding+a().state.sizeUnit+a().state.miniPadding),e.append(`circle`).attr(`class`,`end-state-inner`).attr(`r`,a().state.sizeUnit).attr(`cx`,a().state.padding+a().state.sizeUnit+2).attr(`cy`,a().state.padding+a().state.sizeUnit+2)),`drawEndState`),x=e((e,t)=>{let n=a().state.forkWidth,r=a().state.forkHeight;if(t.parentId){let e=n;n=r,r=e}return e.append(`rect`).style(`stroke`,`black`).style(`fill`,`black`).attr(`width`,n).attr(`height`,r).attr(`x`,a().state.padding).attr(`y`,a().state.padding)},`drawForkJoinState`),S=e((e,t,n,r)=>{let o=0,s=r.append(`text`);s.style(`text-anchor`,`start`),s.attr(`class`,`noteText`);let c=e.replace(/\r\n/g,`<br/>`);c=c.replace(/\n/g,`<br/>`);let l=c.split(i.lineBreakRegex),u=1.25*a().state.noteMargin;for(let e of l){let r=e.trim();if(r.length>0){let e=s.append(`tspan`);if(e.text(r),u===0){let t=e.node().getBBox();u+=t.height}o+=u,e.attr(`x`,t+a().state.noteMargin),e.attr(`y`,n+o+1.25*a().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:o}},`_drawLongText`),C=e((e,t)=>{t.attr(`class`,`state-note`);let n=t.append(`rect`).attr(`x`,0).attr(`y`,a().state.padding),{textWidth:r,textHeight:i}=S(e,0,0,t.append(`g`));return n.attr(`height`,i+2*a().state.noteMargin),n.attr(`width`,r+a().state.noteMargin*2),n},`drawNote`),w=e(function(e,t){let n=t.id,r={id:n,label:t.id,width:0,height:0},i=e.append(`g`).attr(`id`,n).attr(`class`,`stateGroup`);t.type===`start`&&h(i),t.type===`end`&&b(i),(t.type===`fork`||t.type===`join`)&&x(i,t),t.type===`note`&&C(t.note.text,i),t.type===`divider`&&g(i),t.type===`default`&&t.descriptions.length===0&&_(i,t),t.type===`default`&&t.descriptions.length>0&&v(i,t);let o=i.node().getBBox();return r.width=o.width+2*a().state.padding,r.height=o.height+2*a().state.padding,r},`drawState`),T=0,E=e(function(r,o,u){let d=e(function(e){switch(e){case m.relationType.AGGREGATION:return`aggregation`;case m.relationType.EXTENSION:return`extension`;case m.relationType.COMPOSITION:return`composition`;case m.relationType.DEPENDENCY:return`dependency`}},`getRelationType`);o.points=o.points.filter(e=>!Number.isNaN(e.y));let f=o.points,p=l().x(function(e){return e.x}).y(function(e){return e.y}).curve(s),h=r.append(`path`).attr(`d`,p(f)).attr(`id`,`edge`+T).attr(`class`,`transition`),g=``;if(a().state.arrowMarkerAbsolute&&(g=n(!0)),h.attr(`marker-end`,`url(`+g+`#`+d(m.relationType.DEPENDENCY)+`End)`),u.title!==void 0){let e=r.append(`g`).attr(`class`,`stateLabel`),{x:n,y:s}=c.calcLabelPosition(o.points),l=i.getRows(u.title),d=0,f=[],p=0,m=0;for(let r=0;r<=l.length;r++){let i=e.append(`text`).attr(`text-anchor`,`middle`).text(l[r]).attr(`x`,n).attr(`y`,s+d),a=i.node().getBBox();p=Math.max(p,a.width),m=Math.min(m,a.x),t.info(a.x,n,s+d),d===0&&(d=i.node().getBBox().height,t.info(`Title height`,d,s)),f.push(i)}let h=d*l.length;if(l.length>1){let e=(l.length-1)*d*.5;f.forEach((t,n)=>t.attr(`y`,s+n*d-e)),h=d*l.length}let g=e.node().getBBox();e.insert(`rect`,`:first-child`).attr(`class`,`box`).attr(`x`,n-p/2-a().state.padding/2).attr(`y`,s-h/2-a().state.padding/2-3.5).attr(`width`,p+a().state.padding).attr(`height`,h+a().state.padding),t.info(g)}T++},`drawEdge`),D,O={},k=e(function(){},`setConf`),A=e(function(e){e.append(`defs`).append(`marker`).attr(`id`,`dependencyEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`insertMarkers`),j=e(function(e,n,i,s){D=a().state;let c=a().securityLevel,l;c===`sandbox`&&(l=o(`#i`+n));let u=o(c===`sandbox`?l.nodes()[0].contentDocument.body:`body`),d=c===`sandbox`?l.nodes()[0].contentDocument:document;t.debug(`Rendering diagram `+e);let f=u.select(`[id='${n}']`);A(f),N(s.db.getRootDoc(),f.append(`g`).attr(`id`,n+`-root`),void 0,!1,u,d,s);let p=D.padding,m=f.node().getBBox(),h=m.width+p*2,g=m.height+p*2;r(f,g,h*1.75,D.useMaxWidth),f.attr(`viewBox`,`${m.x-D.padding} ${m.y-D.padding} `+h+` `+g)},`draw`),M=e(e=>e?e.length*D.fontSizeFactor:1,`getLabelWidth`),N=e((e,n,r,a,o,s,c)=>{let l=new u({compound:!0,multigraph:!0}),f,p=!0;for(f=0;f<e.length;f++)if(e[f].stmt===`relation`){p=!1;break}r?l.setGraph({rankdir:`LR`,multigraph:!0,compound:!0,ranker:`tight-tree`,ranksep:p?1:D.edgeLengthFactor,nodeSep:p?1:50,isMultiGraph:!0}):l.setGraph({rankdir:`TB`,multigraph:!0,compound:!0,ranksep:p?1:D.edgeLengthFactor,nodeSep:p?1:50,ranker:`tight-tree`,isMultiGraph:!0}),l.setDefaultEdgeLabel(function(){return{}});let m=c.db.getStates(),h=c.db.getRelations(),g=Object.keys(m);for(let e of g){let t=m[e];r&&(t.parentId=r);let i;if(t.doc){let e=n.append(`g`).attr(`id`,t.id).attr(`class`,`stateGroup`);i=N(t.doc,e,t.id,!a,o,s,c);{e=y(e,t,a);let n=e.node().getBBox();i.width=n.width,i.height=n.height+D.padding/2,O[t.id]={y:D.compositTitleSize}}}else i=w(n,t,l);if(t.note){let e=w(n,{descriptions:[],id:t.id+`-note`,note:t.note,type:`note`},l);t.note.position===`left of`?(l.setNode(i.id+`-note`,e),l.setNode(i.id,i)):(l.setNode(i.id,i),l.setNode(i.id+`-note`,e)),l.setParent(i.id,i.id+`-group`),l.setParent(i.id+`-note`,i.id+`-group`)}else l.setNode(i.id,i)}t.debug(`Count=`,l.nodeCount(),l);let _=0;h.forEach(function(e){_++,t.debug(`Setting edge`,e),l.setEdge(e.id1,e.id2,{relation:e,width:M(e.title),height:D.labelHeight*i.getRows(e.title).length,labelpos:`c`},`id`+_)}),d(l),t.debug(`Graph after layout`,l.nodes());let v=n.node();l.nodes().forEach(function(e){e!==void 0&&l.node(e)!==void 0?(t.warn(`Node `+e+`: `+JSON.stringify(l.node(e))),o.select(`#`+v.id+` #`+e).attr(`transform`,`translate(`+(l.node(e).x-l.node(e).width/2)+`,`+(l.node(e).y+(O[e]?O[e].y:0)-l.node(e).height/2)+` )`),o.select(`#`+v.id+` #`+e).attr(`data-x-shift`,l.node(e).x-l.node(e).width/2),s.querySelectorAll(`#`+v.id+` #`+e+` .divider`).forEach(e=>{let t=e.parentElement,n=0,r=0;t&&(t.parentElement&&(n=t.parentElement.getBBox().width),r=parseInt(t.getAttribute(`data-x-shift`),10),Number.isNaN(r)&&(r=0)),e.setAttribute(`x1`,0-r+8),e.setAttribute(`x2`,n-r-8)})):t.debug(`No Node `+e+`: `+JSON.stringify(l.node(e)))});let b=v.getBBox();l.edges().forEach(function(e){e!==void 0&&l.edge(e)!==void 0&&(t.debug(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(l.edge(e))),E(n,l.edge(e),l.edge(e).relation))}),b=v.getBBox();let x={id:r||`root`,label:r||`root`,width:0,height:0};return x.width=b.width+2*D.padding,x.height=b.height+2*D.padding,t.debug(`Doc rendered`,x,l),x},`renderDoc`),P={parser:p,get db(){return new m(1)},renderer:{setConf:k,draw:j},styles:f,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{P as diagram};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-Y2CYZVJY-CP7lNZai.js";import"./src-CaBa9Z1L.js";import"./chunk-WYO6CB5R-C-c-Ja6D.js";import"./chunk-ICXQ74PX-BUnmDgqa.js";import"./chunk-HOUHSVGY-D0096-9K.js";import"./chunk-Q4XR5HBZ-CjNiHUWo.js";import"./chunk-7BUUIJ7U-Dw__VSpN.js";import"./chunk-OGEWGWER-DLH_3q-Z.js";import"./chunk-32BRIVSS-DqkgLIEw.js";import"./chunk-XXDRQBXY-BjAUTr8E.js";import"./chunk-VR4S4FIN-CnZ3Jw81.js";import"./chunk-C7G6YPKG-CmP7ozUj.js";import"./chunk-ZGVPDNZ5-DfBSa8vW.js";import"./chunk-52WLFC77-9s8UsQXp.js";import"./chunk-FWX5IMBZ-rnR9hrS_.js";import{i as t,n,r,t as i}from"./chunk-EX3LRPZG-aq_XJzX2.js";var a={parser:n,get db(){return new i(2)},renderer:r,styles:t,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};