@myagentroam/server 0.14.13 → 0.14.14

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 (355) hide show
  1. package/node_modules/@myagentroam/protocol/package.json +1 -1
  2. package/node_modules/@myagentroam/server-core/package.json +2 -2
  3. package/node_modules/@myagentroam-enterprise/server-implementation/package.json +3 -3
  4. package/package.json +5 -5
  5. package/web/assets/AuditManagementPage-DdSFvSrU.css +1 -0
  6. package/web/assets/AuditManagementPage-xkz11y0T.js +1 -0
  7. package/web/assets/AuthEntryPanel-2RmEvgPK.js +45 -0
  8. package/web/assets/AuthEntryPanel-DRCYZXlp.css +1 -0
  9. package/web/assets/{BusyIndicator-BJHbXq72.js → BusyIndicator-ioUVqyOU.js} +1 -1
  10. package/web/assets/{CodeFileEditor-DuD7Q4mq.js → CodeFileEditor-CfOJ0R9I.js} +3 -3
  11. package/web/assets/{ConversationTemplateManagementPage-UWiSWTX8.js → ConversationTemplateManagementPage-D7KwZltL.js} +1 -1
  12. package/web/assets/{ConversationTemplateManagementPage-CfZ2Ul2v.js → ConversationTemplateManagementPage-DzPF9J7i.js} +1 -1
  13. package/web/assets/{EnterpriseUserManagementPage-DsO542HL.js → EnterpriseUserManagementPage-CEH37Fgt.js} +1 -1
  14. package/web/assets/EnvironmentSecretManager-BR4WUysp.css +1 -0
  15. package/web/assets/EnvironmentSecretManager-TN7goLG1.js +1 -0
  16. package/web/assets/FilePreviewLoading-DBHsOXhV.css +1 -0
  17. package/web/assets/{FilePreviewLoading-D6s3o2bu.js → FilePreviewLoading-es8YT3AE.js} +1 -1
  18. package/web/assets/{HtmlPreviewFrame-fKFJ8kxw.js → HtmlPreviewFrame-C-UQP5Kx.js} +3 -3
  19. package/web/assets/{LicenseManagementPage-BtQdmqgE.js → LicenseManagementPage-BI4IslV7.js} +1 -1
  20. package/web/assets/{ManagementPagination-B6Pmmb2K.js → ManagementPagination-BYt4qkTV.js} +1 -1
  21. package/web/assets/{MarAgentModelManagementPage-DgIYAL72.js → MarAgentModelManagementPage-C5KQRwZF.js} +1 -1
  22. package/web/assets/{MarAgentModelManagementPage-jLtdmQI8.js → MarAgentModelManagementPage-COeAewpl.js} +1 -1
  23. package/web/assets/{MarAlert-Dsrb10N-.js → MarAlert-Cd9UQ3Nb.js} +1 -1
  24. package/web/assets/MarCascader-BtOyCcnf.css +1 -0
  25. package/web/assets/{MarCascader-BKG_pCU9.js → MarCascader-CkPUKKSU.js} +1 -1
  26. package/web/assets/{MarCheckboxGroup-CeaJ5pd8.js → MarCheckboxGroup-BeoAUtAX.js} +1 -1
  27. package/web/assets/{MarCheckboxGroup.vue_vue_type_style_index_0_scoped_3769668f_lang-oSUSoUdm.js → MarCheckboxGroup.vue_vue_type_style_index_0_scoped_3769668f_lang-DkLInv-o.js} +1 -1
  28. package/web/assets/MarDatePicker-C4dn1W94.js +1 -0
  29. package/web/assets/MarDatePicker-CPheHWyo.css +1 -0
  30. package/web/assets/MarDescriptionsItem-DZlA06Bs.js +1 -0
  31. package/web/assets/MarDescriptionsItem-Dv4h1Q7h.css +1 -0
  32. package/web/assets/{MarFormItem.vue_vue_type_script_setup_true_lang-DNgXEgAb.js → MarFormItem.vue_vue_type_script_setup_true_lang-DR9vLmUF.js} +1 -1
  33. package/web/assets/{MarInputNumber-CcpviHTx.js → MarInputNumber-Cj9eIAOI.js} +1 -1
  34. package/web/assets/MarOptionGroup-kPGjsCsv.css +1 -0
  35. package/web/assets/MarOptionGroup.vue_vue_type_style_index_0_scoped_0cdd846e_lang-toYIflmN.js +1 -0
  36. package/web/assets/{MarSwitch-Nht5u3dc.js → MarSwitch-CnzyH7nM.js} +1 -1
  37. package/web/assets/MarSwitch-D1d-qHkV.css +1 -0
  38. package/web/assets/MarTableColumn-9hG09SCW.css +1 -0
  39. package/web/assets/MarTableColumn.vue_vue_type_script_setup_true_lang-R6PlEya3.js +1 -0
  40. package/web/assets/MarTabs-C9xSpZpp.js +1 -0
  41. package/web/assets/MarTabs-DAlqb7in.css +1 -0
  42. package/web/assets/{MarTag-CU69nmi0.js → MarTag-DJs119DS.js} +1 -1
  43. package/web/assets/{MarkdownFilePreview-eHfaSvqk.js → MarkdownFilePreview-DbAE_2gM.js} +2 -2
  44. package/web/assets/{McpDetailsDialog-CeN-XR0C.js → McpDetailsDialog-DulmlCuF.js} +1 -1
  45. package/web/assets/{McpSourceManagementPage-CQ02Cxhp.js → McpSourceManagementPage-2-l-gwmY.js} +1 -1
  46. package/web/assets/{McpSourceManagementPage-D7TISzgb.js → McpSourceManagementPage-BoE5DUTk.js} +1 -1
  47. package/web/assets/McpSourceManagementPage-DtlKXyoi.css +1 -0
  48. package/web/assets/{NodeDetailsDialogs-CunI5Y3P.js → NodeDetailsDialogs-D18Hc9Si.js} +1 -1
  49. package/web/assets/NodeManagementPage-DXpkxBRT.js +1 -0
  50. package/web/assets/NodeManagementPage-ygBG-C-u.js +1 -0
  51. package/web/assets/{OAuthManagementPage-DiVu7-4g.js → OAuthManagementPage-BX1BaUso.js} +1 -1
  52. package/web/assets/{OrganizationManagementPage-KYRf5SG3.js → OrganizationManagementPage-BdKOJAyQ.js} +1 -1
  53. package/web/assets/{RemoteDesktopPage-CXb_A40m.js → RemoteDesktopPage-mtDu_xfs.js} +1 -1
  54. package/web/assets/{ResourceManagementPanel-C8sK8pZt.js → ResourceManagementPanel-cSwgfMaN.js} +1 -1
  55. package/web/assets/{ResourceManagementPanel.vue_vue_type_script_setup_true_lang-B0BiJsYP.js → ResourceManagementPanel.vue_vue_type_script_setup_true_lang-OE3mC4EM.js} +1 -1
  56. package/web/assets/SecretManagementPage-BUNy_q8f.js +1 -0
  57. package/web/assets/SecretManagementPage-CWM35C17.js +1 -0
  58. package/web/assets/{SecretManagementPage.vue_vue_type_script_setup_true_lang-Cj-i8iWa.js → SecretManagementPage.vue_vue_type_script_setup_true_lang-wdkxGSpN.js} +1 -1
  59. package/web/assets/{SessionSharePage-3pOC7zRL.js → SessionSharePage-C-jdxuqs.js} +2 -2
  60. package/web/assets/{SessionSharePage-DGGHczdP.css → SessionSharePage-D_egrbL-.css} +1 -1
  61. package/web/assets/{SettingsContent-_7yaCY3w.js → SettingsContent-1cXlLDfp.js} +1 -1
  62. package/web/assets/{SettingsContent-DNa5A1_N.js → SettingsContent-BtSX-IJ7.js} +1 -1
  63. package/web/assets/SkillCenterPage-BWZ1Kuwk.js +1 -0
  64. package/web/assets/{SkillCenterPage-C-RhgoXR.js → SkillCenterPage-CCisqDWN.js} +1 -1
  65. package/web/assets/SkillCenterPage-CyQmlEB4.css +1 -0
  66. package/web/assets/{SkillDetailsDialog-DtVFRPBy.js → SkillDetailsDialog-C0_4_KU4.js} +1 -1
  67. package/web/assets/{SkillSourceManagementPage-D4z1Gg5N.js → SkillSourceManagementPage-ToB4Wi7G.js} +1 -1
  68. package/web/assets/{SkillSourceManagementPage-ChDzfGdm.js → SkillSourceManagementPage-pUo-KVhP.js} +1 -1
  69. package/web/assets/{StandaloneFilePreviewPage-MXCtMW26.js → StandaloneFilePreviewPage-DES3Vief.js} +1 -1
  70. package/web/assets/{SystemConfigurationPage-ChSNj8MT.js → SystemConfigurationPage-BVl0Q1mw.js} +1 -1
  71. package/web/assets/{SystemConfigurationPage-DB37Nbbr.js → SystemConfigurationPage-CQ6u7UgX.js} +1 -1
  72. package/web/assets/{SystemInformationPage-2Q4V-iJ4.js → SystemInformationPage-DdPjIXMo.js} +1 -1
  73. package/web/assets/{TerminalTabView-De_0nedS.js → TerminalTabView-CnuEt3ND.js} +1 -1
  74. package/web/assets/{WorkbenchPage-DlnYvv_a.css → WorkbenchPage-CorQjhSF.css} +1 -1
  75. package/web/assets/WorkbenchPage-CyEI3Yln.js +22 -0
  76. package/web/assets/WorkspaceManagementPage-Cdk7zUmV.js +1 -0
  77. package/web/assets/WorkspaceManagementPage-CgLA0Tb-.js +1 -0
  78. package/web/assets/{abnfDiagram-VCTEODGH-DBu0yas5.js → abnfDiagram-VCTEODGH-DktdKdMP.js} +1 -1
  79. package/web/assets/{arc-C8OREc8-.js → arc-DYfzA9yu.js} +1 -1
  80. package/web/assets/{architectureDiagram-5GKGNRK7-DW-uxKX_.js → architectureDiagram-5GKGNRK7-CskxB0k3.js} +1 -1
  81. package/web/assets/{blockDiagram-OSKFZWR5-BdpowaJF.js → blockDiagram-OSKFZWR5-Xpyuk_R_.js} +1 -1
  82. package/web/assets/{c4Diagram-7LVT6UL2-CIj5XN7-.js → c4Diagram-7LVT6UL2-BdBrdIh7.js} +1 -1
  83. package/web/assets/{catalog-ownership-service-Om-CO2AO.js → catalog-ownership-service-DQLCHjkb.js} +1 -1
  84. package/web/assets/{catalog-page-service-C7a95mKM.js → catalog-page-service-DfBXj8UO.js} +1 -1
  85. package/web/assets/channel-SICih3KJ.js +1 -0
  86. package/web/assets/{chunk-2Q5K7J3B-qTv1HCpA.js → chunk-2Q5K7J3B-DMWOmjwT.js} +1 -1
  87. package/web/assets/{chunk-5VM5RSS4-Z_81Yg9R.js → chunk-5VM5RSS4-RNe_7tdZ.js} +1 -1
  88. package/web/assets/{chunk-F27PBJKO-ByXYNCQX.js → chunk-F27PBJKO-DBTemRQp.js} +1 -1
  89. package/web/assets/{chunk-HLEWEB6X-Db0t6b8M.js → chunk-HLEWEB6X-Bvz-ooi6.js} +1 -1
  90. package/web/assets/{chunk-JWPE2WC7-mtd3itJH.js → chunk-JWPE2WC7-BLZTbN2h.js} +1 -1
  91. package/web/assets/{chunk-POPQ4Y6H-DjNpwfJ_.js → chunk-POPQ4Y6H-BX4VA4e8.js} +1 -1
  92. package/web/assets/{chunk-SVP7TREG-BJDr9WEi.js → chunk-SVP7TREG-xT5KSFIv.js} +1 -1
  93. package/web/assets/{chunk-XXDRQBXY-B6pSX6oT.js → chunk-XXDRQBXY-d6EOJo4n.js} +1 -1
  94. package/web/assets/{chunk-ZLD2IHE6-QUzKTKo1.js → chunk-ZLD2IHE6-NM2ziQWG.js} +1 -1
  95. package/web/assets/classDiagram-CYGNFDIV-BJhEPuc7.js +1 -0
  96. package/web/assets/classDiagram-v2-TLXNO2FR-BJhEPuc7.js +1 -0
  97. package/web/assets/{conversation-history-CWG_l_s7.js → conversation-history-Cfjf31Eh.js} +1 -1
  98. package/web/assets/{cose-bilkent-JH36ORCC-DsiB67gb.js → cose-bilkent-JH36ORCC-D7vpaSiq.js} +1 -1
  99. package/web/assets/{cynefin-OW5HDTMX-ByAQTEbY.js → cynefin-OW5HDTMX-CRlsUX-V.js} +1 -1
  100. package/web/assets/{cynefinDiagram-5FMLGOSQ-CLvR8C8K.js → cynefinDiagram-5FMLGOSQ-C0zvJdmJ.js} +1 -1
  101. package/web/assets/{dagre-OS7QT2EB-BZY4XKaO.js → dagre-OS7QT2EB-llnyjObi.js} +1 -1
  102. package/web/assets/{diagram-S7CK7UJ4-DZhsMLHj.js → diagram-S7CK7UJ4-2JgAYCu_.js} +1 -1
  103. package/web/assets/{diagram-UQ7AKVKN-gKeE9VCW.js → diagram-UQ7AKVKN-Cecsm_uW.js} +1 -1
  104. package/web/assets/{diagram-VSXAHHWV-DGcOJLzF.js → diagram-VSXAHHWV-C3VSImZi.js} +1 -1
  105. package/web/assets/{diagram-VX7I27RA-YNftovCx.js → diagram-VX7I27RA-B_-1XPN_.js} +1 -1
  106. package/web/assets/{diagram-Z3DM3KII-CYs_A5LR.js → diagram-Z3DM3KII-Dad6nlKG.js} +1 -1
  107. package/web/assets/{ebnfDiagram-PWID7BFC-CfAgj9SA.js → ebnfDiagram-PWID7BFC-C7uocL5X.js} +1 -1
  108. package/web/assets/{enterprise-management-service-DoxF9G8J.js → enterprise-management-service-D6TGnQqg.js} +1 -1
  109. package/web/assets/{erDiagram-2YWLMYGG-D68c5ay0.js → erDiagram-2YWLMYGG-sYj25Lh-.js} +1 -1
  110. package/web/assets/{error-presentation-UGQTkLY-.js → error-presentation-zku4f4Na.js} +1 -1
  111. package/web/assets/{flowDiagram-T62WH6J4-SueK2EIr.js → flowDiagram-T62WH6J4-BYrJI8qA.js} +1 -1
  112. package/web/assets/{ganttDiagram-EL5Y4UJY-DqUpBKVe.js → ganttDiagram-EL5Y4UJY-CbbM1HWv.js} +1 -1
  113. package/web/assets/{gitGraphDiagram-WWUBYQGX-25lcZzew.js → gitGraphDiagram-WWUBYQGX-CmMsWWvP.js} +1 -1
  114. package/web/assets/{hosted-conversation-template-client-j8BSmb6C.js → hosted-conversation-template-client-JIui_x4a.js} +1 -1
  115. package/web/assets/{index-ntE_ZhRt.js → index-9AFvDAsj.js} +1 -1
  116. package/web/assets/{index-1GTIQQ8z.js → index-9xW5hIzI.js} +1 -1
  117. package/web/assets/{index-DwErmPk6.js → index-BAp4jQ2P.js} +1 -1
  118. package/web/assets/{index-C64qxIt_.js → index-BAy8GZSy.js} +1 -1
  119. package/web/assets/{index-D6z2G5Kn.js → index-BQBtWzmd.js} +1 -1
  120. package/web/assets/{index-B1tseZ0y.js → index-B_C8LZPz.js} +1 -1
  121. package/web/assets/{index-Cq0gQdNu.js → index-BcTFR7dB.js} +1 -1
  122. package/web/assets/{index-DRH1HX2S.js → index-BsynB1QZ.js} +1 -1
  123. package/web/assets/{index-WlaKUfsp.js → index-C2gk6wUR.js} +1 -1
  124. package/web/assets/{index-BCIlc_yx.js → index-C34cxK_p.js} +1 -1
  125. package/web/assets/{index-6kwQzDJ5.js → index-CC2XNQF9.js} +1 -1
  126. package/web/assets/index-COk3Og3A.css +1 -0
  127. package/web/assets/{index-L8P4MfkD.js → index-CW9KiHI3.js} +1 -1
  128. package/web/assets/{index-BFbW15q7.js → index-CXYo0aZg.js} +15 -15
  129. package/web/assets/{index-Be5d1p6m.js → index-CY5_MaD9.js} +1 -1
  130. package/web/assets/{index-ZU_3sogz.js → index-CbndX7Cm.js} +1 -1
  131. package/web/assets/{index-DKQH5cxU.js → index-Cqwwldhn.js} +1 -1
  132. package/web/assets/{index-BeFqmV-S.js → index-CxINOeGi.js} +1 -1
  133. package/web/assets/{index-cXt12mWt.js → index-D2CBJtpC.js} +1 -1
  134. package/web/assets/{index-DZiLssjQ.js → index-DCjNcqOd.js} +1 -1
  135. package/web/assets/{index-5c57yBxX.js → index-DH2DgA88.js} +1 -1
  136. package/web/assets/{index-DnnQL2J0.js → index-DO-vPiJ-.js} +1 -1
  137. package/web/assets/{index-C5fDP7hM.js → index-DOdM1hrk.js} +1 -1
  138. package/web/assets/{index-3hGH8X4w.js → index-DOwk78qo.js} +1 -1
  139. package/web/assets/{index-D0BAg9Vm.js → index-EfVODvAX.js} +1 -1
  140. package/web/assets/{index-C3LQg-du.js → index-WVUYMZGr.js} +1 -1
  141. package/web/assets/{index-DXjLMl3l.js → index-rmLuGZaC.js} +1 -1
  142. package/web/assets/{index-D0W2JUwi.js → index-ycWuqeba.js} +1 -1
  143. package/web/assets/{infoDiagram-FKFFQAWI-BBwjh-6f.js → infoDiagram-FKFFQAWI-CMUxwVCy.js} +1 -1
  144. package/web/assets/{ishikawaDiagram-5VMMS53U-CQS9pAgH.js → ishikawaDiagram-5VMMS53U-CgePNWLO.js} +1 -1
  145. package/web/assets/{journeyDiagram-EYS64GPL-Wf3zND8h.js → journeyDiagram-EYS64GPL-cgUNryqu.js} +1 -1
  146. package/web/assets/{kanban-definition-UXKFOSKX-B0s2KfqD.js → kanban-definition-UXKFOSKX-D4aobA2-.js} +1 -1
  147. package/web/assets/{layout-C8Uv0gkT.js → layout-BjqRkOqP.js} +1 -1
  148. package/web/assets/{linear-cvnW3wz3.js → linear-BB8qFJdD.js} +1 -1
  149. package/web/assets/{management-url-service-DZ88REB_.js → management-url-service-BgjJY2L9.js} +1 -1
  150. package/web/assets/{mcp-center-service-BxLSeP6x.js → mcp-center-service-CzwAD1yH.js} +1 -1
  151. package/web/assets/{mermaid.core-tIk1Nhel.js → mermaid.core-CQKmvtuY.js} +5 -5
  152. package/web/assets/{mindmap-definition-THT77NOG-umweN-cI.js → mindmap-definition-THT77NOG-0gbaRj3X.js} +1 -1
  153. package/web/assets/{mobile-dialog-return-service-C1n1IVHV.js → mobile-dialog-return-service-B9Umx6Ja.js} +1 -1
  154. package/web/assets/{oauth-callback-BcjCk3xN.js → oauth-callback-0bvLvnZ5.js} +1 -1
  155. package/web/assets/{pegDiagram-XKGWAZYB-DKJc7Ez9.js → pegDiagram-XKGWAZYB-6IaijsHn.js} +1 -1
  156. package/web/assets/{pieDiagram-E7YTZNPT-BsxpOU9E.js → pieDiagram-E7YTZNPT-BDwpnpAN.js} +1 -1
  157. package/web/assets/{quadrantDiagram-AXDQQJYC-Dy0JSXEc.js → quadrantDiagram-AXDQQJYC-DTHbaV_E.js} +1 -1
  158. package/web/assets/{railroadDiagram-O6MQD6OU-DuWjaEVr.js → railroadDiagram-O6MQD6OU-Bu9b0Olt.js} +1 -1
  159. package/web/assets/{requirementDiagram-IS5BZ75X-CcDa2f9z.js → requirementDiagram-IS5BZ75X-DAklrryn.js} +1 -1
  160. package/web/assets/{runner-presentation-hTBi5beq.js → runner-presentation-C-cTPbeM.js} +1 -1
  161. package/web/assets/{sankeyDiagram-P5KCCOFB-zXSrhCHx.js → sankeyDiagram-P5KCCOFB-DgNah1hF.js} +1 -1
  162. package/web/assets/{sequenceDiagram-WJ2MYXX4-D_zXYQwI.js → sequenceDiagram-WJ2MYXX4-DDsyMCfI.js} +1 -1
  163. package/web/assets/{session-share-client-service-iqg5n2jT.js → session-share-client-service-bdoizmjD.js} +1 -1
  164. package/web/assets/{sizeCapture-INFHLROL-DQHaspbL.js → sizeCapture-INFHLROL-B1euY0bk.js} +1 -1
  165. package/web/assets/{stateDiagram-XQSTLZYL-CZuAC9yx.js → stateDiagram-XQSTLZYL-CwjTbB_i.js} +1 -1
  166. package/web/assets/stateDiagram-v2-IH3M54BS-CAAuya7O.js +1 -0
  167. package/web/assets/{swimlanes-V6O3JKXN-DPLARPKF.js → swimlanes-V6O3JKXN-VuD7hpBC.js} +1 -1
  168. package/web/assets/swimlanesDiagram-JKAHXJPX-CNf6ouPi.js +8 -0
  169. package/web/assets/{time-presentation-D0SLW-7Y.js → time-presentation-BZYgfA5o.js} +1 -1
  170. package/web/assets/{timeline-definition-24CTP7MA-DOCrHy_B.js → timeline-definition-24CTP7MA-D_V_tYRM.js} +1 -1
  171. package/web/assets/{vennDiagram-4TSXK5OY-bxqgw5V-.js → vennDiagram-4TSXK5OY-jshUno_M.js} +1 -1
  172. package/web/assets/{wardleyDiagram-VM6X3IG4-DnYBE0Fi.js → wardleyDiagram-VM6X3IG4-DZHVP425.js} +1 -1
  173. package/web/assets/{workbench-live-service-CQiYAsuU.js → workbench-live-service-O2xlmfOF.js} +1 -1
  174. package/web/assets/{workbench-presentation-DRF1_KCI.js → workbench-presentation-CV7WEE4p.js} +1 -1
  175. package/web/assets/{xychartDiagram-S5SC5T6Z-dEwC3KCd.js → xychartDiagram-S5SC5T6Z-C7Rgv3Ly.js} +1 -1
  176. package/web/docs/404.html +1 -1
  177. package/web/docs/administration/account.html +2 -2
  178. package/web/docs/administration/audit.html +2 -2
  179. package/web/docs/administration/conversation-templates.html +2 -2
  180. package/web/docs/administration/email-notifications.html +2 -2
  181. package/web/docs/administration/license.html +2 -2
  182. package/web/docs/administration/nodes-workspaces.html +2 -2
  183. package/web/docs/administration/oauth.html +2 -2
  184. package/web/docs/administration/secrets.html +2 -2
  185. package/web/docs/administration/template-workspace-maintenance.html +2 -2
  186. package/web/docs/administration/users-organizations.html +2 -2
  187. package/web/docs/assets/{app.DtD1evI0.js → app.D6T8f4Xi.js} +1 -1
  188. package/web/docs/assets/chunks/@localSearchIndexen-US.C3JXCVRL.js +1 -0
  189. package/web/docs/assets/chunks/@localSearchIndexroot.B5rZAuDE.js +1 -0
  190. package/web/docs/assets/chunks/{VPLocalSearchBox.BfQVfx68.js → VPLocalSearchBox.BY8dAd2K.js} +1 -1
  191. package/web/docs/assets/chunks/{theme.JpsRm0j7.js → theme.CwBg9EXL.js} +2 -2
  192. package/web/docs/concepts/architecture.html +2 -2
  193. package/web/docs/concepts/data-and-security.html +2 -2
  194. package/web/docs/concepts/files-git-terminal.html +2 -2
  195. package/web/docs/concepts/node-and-workspace.html +2 -2
  196. package/web/docs/concepts/permissions-and-sharing.html +2 -2
  197. package/web/docs/concepts/runner-control.html +2 -2
  198. package/web/docs/concepts/secrets.html +2 -2
  199. package/web/docs/concepts/session-run-turn.html +2 -2
  200. package/web/docs/deployment/backup-restore.html +2 -2
  201. package/web/docs/deployment/network.html +2 -2
  202. package/web/docs/deployment/node-installation.html +2 -2
  203. package/web/docs/deployment/node-linux.html +2 -2
  204. package/web/docs/deployment/node-macos.html +2 -2
  205. package/web/docs/deployment/node-windows.html +2 -2
  206. package/web/docs/deployment/production.html +2 -2
  207. package/web/docs/deployment/security-checklist.html +2 -2
  208. package/web/docs/deployment/upgrade.html +2 -2
  209. package/web/docs/en-US/administration/account.html +2 -2
  210. package/web/docs/en-US/administration/audit.html +2 -2
  211. package/web/docs/en-US/administration/conversation-templates.html +2 -2
  212. package/web/docs/en-US/administration/email-notifications.html +2 -2
  213. package/web/docs/en-US/administration/license.html +2 -2
  214. package/web/docs/en-US/administration/nodes-workspaces.html +2 -2
  215. package/web/docs/en-US/administration/oauth.html +2 -2
  216. package/web/docs/en-US/administration/secrets.html +2 -2
  217. package/web/docs/en-US/administration/template-workspace-maintenance.html +2 -2
  218. package/web/docs/en-US/administration/users-organizations.html +2 -2
  219. package/web/docs/en-US/concepts/architecture.html +2 -2
  220. package/web/docs/en-US/concepts/data-and-security.html +2 -2
  221. package/web/docs/en-US/concepts/files-git-terminal.html +2 -2
  222. package/web/docs/en-US/concepts/node-and-workspace.html +2 -2
  223. package/web/docs/en-US/concepts/permissions-and-sharing.html +2 -2
  224. package/web/docs/en-US/concepts/runner-control.html +2 -2
  225. package/web/docs/en-US/concepts/secrets.html +2 -2
  226. package/web/docs/en-US/concepts/session-run-turn.html +2 -2
  227. package/web/docs/en-US/deployment/backup-restore.html +2 -2
  228. package/web/docs/en-US/deployment/network.html +2 -2
  229. package/web/docs/en-US/deployment/node-installation.html +2 -2
  230. package/web/docs/en-US/deployment/node-linux.html +2 -2
  231. package/web/docs/en-US/deployment/node-macos.html +2 -2
  232. package/web/docs/en-US/deployment/node-windows.html +2 -2
  233. package/web/docs/en-US/deployment/production.html +2 -2
  234. package/web/docs/en-US/deployment/security-checklist.html +2 -2
  235. package/web/docs/en-US/deployment/upgrade.html +2 -2
  236. package/web/docs/en-US/getting-started/connect-node.html +2 -2
  237. package/web/docs/en-US/getting-started/first-agent-session.html +2 -2
  238. package/web/docs/en-US/getting-started/first-login.html +2 -2
  239. package/web/docs/en-US/getting-started/next-steps.html +2 -2
  240. package/web/docs/en-US/getting-started/npm-quick-start.html +2 -2
  241. package/web/docs/en-US/getting-started/overview.html +2 -2
  242. package/web/docs/en-US/getting-started/prerequisites.html +2 -2
  243. package/web/docs/en-US/getting-started/register-workspace.html +2 -2
  244. package/web/docs/en-US/getting-started/server-installation.html +2 -2
  245. package/web/docs/en-US/operations/marctl.html +2 -2
  246. package/web/docs/en-US/reference/configuration.html +2 -2
  247. package/web/docs/en-US/reference/keyboard-shortcuts.html +2 -2
  248. package/web/docs/en-US/reference/limits.html +2 -2
  249. package/web/docs/en-US/reference/ports-paths-data.html +2 -2
  250. package/web/docs/en-US/reference/status-and-errors.html +2 -2
  251. package/web/docs/en-US/runners/claude-code.html +2 -2
  252. package/web/docs/en-US/runners/codex.html +2 -2
  253. package/web/docs/en-US/runners/mar-agent.html +2 -2
  254. package/web/docs/en-US/runners/opencode.html +2 -2
  255. package/web/docs/en-US/runners/overview.html +2 -2
  256. package/web/docs/en-US/runners/runner-troubleshooting.html +2 -2
  257. package/web/docs/en-US/troubleshooting/node-offline.html +2 -2
  258. package/web/docs/en-US/troubleshooting/quick-diagnosis.html +2 -2
  259. package/web/docs/en-US/troubleshooting/session-run.html +2 -2
  260. package/web/docs/en-US/troubleshooting/terminal.html +2 -2
  261. package/web/docs/en-US/troubleshooting/workspace-files.html +2 -2
  262. package/web/docs/en-US/workbench/composer.html +2 -2
  263. package/web/docs/en-US/workbench/context-and-plan.html +2 -2
  264. package/web/docs/en-US/workbench/conversation.html +2 -2
  265. package/web/docs/en-US/workbench/file-reference-and-attachment.html +2 -2
  266. package/web/docs/en-US/workbench/files.html +2 -2
  267. package/web/docs/en-US/workbench/git-changes.html +2 -2
  268. package/web/docs/en-US/workbench/git-history.html +2 -2
  269. package/web/docs/en-US/workbench/hosted-conversations.html +2 -2
  270. package/web/docs/en-US/workbench/mobile.html +2 -2
  271. package/web/docs/en-US/workbench/navigation.html +2 -2
  272. package/web/docs/en-US/workbench/remote-desktop.html +2 -2
  273. package/web/docs/en-US/workbench/sessions.html +2 -2
  274. package/web/docs/en-US/workbench/skills.html +2 -2
  275. package/web/docs/en-US/workbench/terminal.html +2 -2
  276. package/web/docs/getting-started/connect-node.html +2 -2
  277. package/web/docs/getting-started/first-agent-session.html +2 -2
  278. package/web/docs/getting-started/first-login.html +2 -2
  279. package/web/docs/getting-started/next-steps.html +2 -2
  280. package/web/docs/getting-started/npm-quick-start.html +2 -2
  281. package/web/docs/getting-started/overview.html +2 -2
  282. package/web/docs/getting-started/prerequisites.html +2 -2
  283. package/web/docs/getting-started/register-workspace.html +2 -2
  284. package/web/docs/getting-started/server-installation.html +2 -2
  285. package/web/docs/operations/marctl.html +2 -2
  286. package/web/docs/reference/configuration.html +2 -2
  287. package/web/docs/reference/keyboard-shortcuts.html +2 -2
  288. package/web/docs/reference/limits.html +2 -2
  289. package/web/docs/reference/ports-paths-data.html +2 -2
  290. package/web/docs/reference/status-and-errors.html +2 -2
  291. package/web/docs/runners/claude-code.html +2 -2
  292. package/web/docs/runners/codex.html +2 -2
  293. package/web/docs/runners/mar-agent.html +2 -2
  294. package/web/docs/runners/opencode.html +2 -2
  295. package/web/docs/runners/overview.html +2 -2
  296. package/web/docs/runners/runner-troubleshooting.html +2 -2
  297. package/web/docs/troubleshooting/node-offline.html +2 -2
  298. package/web/docs/troubleshooting/quick-diagnosis.html +2 -2
  299. package/web/docs/troubleshooting/session-run.html +2 -2
  300. package/web/docs/troubleshooting/terminal.html +2 -2
  301. package/web/docs/troubleshooting/workspace-files.html +2 -2
  302. package/web/docs/workbench/composer.html +2 -2
  303. package/web/docs/workbench/context-and-plan.html +2 -2
  304. package/web/docs/workbench/conversation.html +2 -2
  305. package/web/docs/workbench/file-reference-and-attachment.html +2 -2
  306. package/web/docs/workbench/files.html +2 -2
  307. package/web/docs/workbench/git-changes.html +2 -2
  308. package/web/docs/workbench/git-history.html +2 -2
  309. package/web/docs/workbench/hosted-conversations.html +2 -2
  310. package/web/docs/workbench/mobile.html +2 -2
  311. package/web/docs/workbench/navigation.html +2 -2
  312. package/web/docs/workbench/remote-desktop.html +2 -2
  313. package/web/docs/workbench/sessions.html +2 -2
  314. package/web/docs/workbench/skills.html +2 -2
  315. package/web/docs/workbench/terminal.html +2 -2
  316. package/web/index.html +3 -3
  317. package/web/service-worker.js +1 -1
  318. package/web/web-version.json +1 -1
  319. package/web/assets/AuditManagementPage-BGwiwkWO.js +0 -1
  320. package/web/assets/AuditManagementPage-DsqAkiGi.css +0 -1
  321. package/web/assets/AuthEntryPanel-CFtw_f_Y.js +0 -45
  322. package/web/assets/AuthEntryPanel-d8KztXAR.css +0 -1
  323. package/web/assets/EnvironmentSecretManager-C-5fdfXQ.css +0 -1
  324. package/web/assets/EnvironmentSecretManager-rbFx9YED.js +0 -1
  325. package/web/assets/FilePreviewLoading-B58or4ra.css +0 -1
  326. package/web/assets/MarCascader-Cc9hefbo.css +0 -1
  327. package/web/assets/MarDatePicker-Bv6kzLiu.js +0 -1
  328. package/web/assets/MarDatePicker-T5E6eRQy.css +0 -1
  329. package/web/assets/MarDescriptionsItem-D06qWo6K.css +0 -1
  330. package/web/assets/MarDescriptionsItem-Ddl4rEoo.js +0 -1
  331. package/web/assets/MarOptionGroup-BVR0qlAA.css +0 -1
  332. package/web/assets/MarOptionGroup.vue_vue_type_style_index_0_scoped_cacd24eb_lang-BQD1pghB.js +0 -1
  333. package/web/assets/MarSwitch-DSMHC1ur.css +0 -1
  334. package/web/assets/MarTableColumn-DtHETYNc.css +0 -1
  335. package/web/assets/MarTableColumn.vue_vue_type_script_setup_true_lang-9WwypTkY.js +0 -1
  336. package/web/assets/MarTabs-D28b5Cm_.js +0 -1
  337. package/web/assets/MarTabs-hvIwX-j4.css +0 -1
  338. package/web/assets/McpSourceManagementPage-C2XYcsBZ.css +0 -1
  339. package/web/assets/NodeManagementPage-5A5wEaf7.js +0 -1
  340. package/web/assets/NodeManagementPage-D8xNnpz-.js +0 -1
  341. package/web/assets/SecretManagementPage-BQLBf9JN.js +0 -1
  342. package/web/assets/SecretManagementPage-CdG81hZg.js +0 -1
  343. package/web/assets/SkillCenterPage--fuP-slY.css +0 -1
  344. package/web/assets/SkillCenterPage-H2QFeB7_.js +0 -1
  345. package/web/assets/WorkbenchPage-Dlmd8LuY.js +0 -22
  346. package/web/assets/WorkspaceManagementPage-B90eAGf0.js +0 -1
  347. package/web/assets/WorkspaceManagementPage-Dt54G8Zh.js +0 -1
  348. package/web/assets/channel-h8T8Sf1f.js +0 -1
  349. package/web/assets/classDiagram-CYGNFDIV-DmCMc5em.js +0 -1
  350. package/web/assets/classDiagram-v2-TLXNO2FR-DmCMc5em.js +0 -1
  351. package/web/assets/index-CGbMb0Lv.css +0 -1
  352. package/web/assets/stateDiagram-v2-IH3M54BS-BVCGzcEg.js +0 -1
  353. package/web/assets/swimlanesDiagram-JKAHXJPX-0AG7MKMH.js +0 -8
  354. package/web/docs/assets/chunks/@localSearchIndexen-US.DHrLf7lS.js +0 -1
  355. package/web/docs/assets/chunks/@localSearchIndexroot.C6ZO4-Cz.js +0 -1
@@ -1 +1 @@
1
- import{B as Xe,m as Ze,ax as et,f as P,K as tt,ad as nt,Y as at,o as m,n as S,E as u,C as B,P as X,ay as ot,G as x,Q as M,a6 as ue,N as Te,S as Re,t as Z,q as _e,a1 as rt,D as it,k as ee,X as st,F as lt,_ as dt}from"./index-BFbW15q7.js";import{d as ct,r as ut,a as ft,b as vt,m as wt,c as fe,e as Ne,f as Fe,g as gt,h as mt,i as pt,H as ht,W as yt,j as kt,k as It,l as bt,w as Pt,n as St,t as Et,o as Tt}from"./HtmlPreviewFrame-fKFJ8kxw.js";import{c as Rt}from"./session-share-client-service-iqg5n2jT.js";import{a as _t,i as De,s as ve,u as Nt,f as Ce,d as Le,F as Ft,b as we}from"./FilePreviewLoading-D6s3o2bu.js";import{f as Dt}from"./error-presentation-UGQTkLY-.js";import Ct from"./MarkdownFilePreview-eHfaSvqk.js";import{c as Lt}from"./workbench-live-service-CQiYAsuU.js";import{c as Ot}from"./workspace-direct-transfer-service-H0f55kLn.js";import{f as Ut}from"./file-presentation-Cm7tx53N.js";import"./uuid-BmNSYLtZ.js";import"./MarFormItem.vue_vue_type_script_setup_true_lang-DNgXEgAb.js";import"./MarSwitch-Nht5u3dc.js";import"./mobile-dialog-return-service-C1n1IVHV.js";import"./BusyIndicator-BJHbXq72.js";const At="/assets/github-markdown-light-DWnTz46N.css",xt=800;function Wt(p){function te(){return{...p.repositoryPath===void 0?{}:{repositoryPath:p.repositoryPath},...p.worktreePath===void 0?{}:{worktreePath:p.worktreePath}}}let _=!0,k,L=0,n;const w=new Promise(l=>{n=l}),D=setTimeout(()=>n?.(!1),xt),y=Ot({send:l=>W.sendDirect(l),shouldRetryProbe:(l,v)=>_&&l===p.nodeId&&v===k}),W=Lt({canConnect:()=>_,onEvent:()=>{},onResyncRequired:()=>{},onNodeConnection:(l,v)=>{l===p.nodeId&&!v&&y.invalidateNode(l)},onNodeReplaced:l=>y.invalidateNode(l),onReconnect:()=>{},onDisconnected:()=>y.invalidateControlConnection(),onReady:(l,v)=>{v||y.invalidateNetwork(),V()},onDirectMessage:l=>y.handle(l),onUnauthenticated:()=>F(!1),onInvalidMessage:()=>{}});async function V(){const l=++L;try{const v=await fetch(`/api/nodes/${encodeURIComponent(p.nodeId)}/workbench-capabilities`,{credentials:"same-origin"});if(!v.ok)throw new Error("DIRECT_UNAVAILABLE");const o=(await v.json()).manifest;if(!_||l!==L)return;if(o?.directTransfer?.apiVersion!==3||o.directTransfer.transport!==!0||o.directTransfer.download!==!0||typeof o.nodeGeneration!="string"){F(!1);return}k=o.nodeGeneration;const C=await y.ensureTransport(p.nodeId,k);_&&l===L&&F(C==="DIRECT_AVAILABLE")}catch{_&&l===L&&F(!1)}}function F(l){clearTimeout(D),n?.(l),n=void 0}async function N(l,v=!0){if(Xe(l)||v&&!await w)return;const h=k;if(!_||h===void 0||!y.isConnected(p.nodeId,h))return;const o={kind:"WORKSPACE_FILE",workspaceId:p.workspaceId,path:l,...te()};return{direct:y,nodeId:p.nodeId,nodeGeneration:h,resource:o,metadata:async()=>{const C=await vt({nodeId:p.nodeId,resource:o,request:async E=>{const T=await fetch(E,{credentials:"same-origin"});return T.ok?T.json():{}}});return _?C:void 0}}}async function $(l,v,h,o){const C=await N(l);if(C!==void 0)return ut({...C,fileName:l.split("/").at(-1)??"file",offset:v,length:h,...o===void 0?{}:{identity:o}}).catch(()=>{})}async function K(l){const v=await N(l);return v===void 0?void 0:ft(v)}async function q(l){const v=await N(l,!1);return v===void 0||p.activeDownloadWorker===void 0?"UNAVAILABLE":ct({...v,activeWorker:p.activeDownloadWorker})}function z(){y.invalidateNetwork()}function I(){_=!1,L+=1,F(!1),y.invalidateNetwork(),W.close()}return W.connect(),{objectUrl:K,readRange:$,download:q,networkChanged:z,close:I}}const $t=["href"],zt={key:0,class:"standalone-error"},jt={class:"standalone-markdown-header html-preview-header"},Mt={key:0},Vt={class:"standalone-markdown-header"},Bt={key:0},Kt={class:"standalone-preview-body"},qt={key:1,class:"markdown-preview-page"},Ht={key:0,class:"standalone-error"},Jt=Ze({__name:"StandaloneFilePreviewPage",props:{quoteTarget:{},share:{}},emits:["close"],setup(p,{emit:te}){const _=et(),k=p,L=te,n=new URLSearchParams(k.share?.intent??location.search),w=k.share?.access;if(w!==void 0){const t=w.session.value.share;n.set("nodeId",t.nodeId),n.set("workspaceId",t.workspaceId),n.delete("write"),n.delete("source"),n.delete("worktreePath"),n.delete("repositoryPath")}const D={...n.has("repositoryPath")?{repositoryPath:n.get("repositoryPath")}:{},...n.has("worktreePath")?{worktreePath:n.get("worktreePath")}:{}},y=w===void 0?void 0:Rt(w,w.session.value.share),W=_t(void 0,w===void 0?"workbench":`share:${w.session.value.share.id}`),V=!n.has("repositoryPath")&&n.get("markdownPreview")==="1",F=!n.has("repositoryPath")&&n.get("htmlPreview")==="1",N=V||F,$=n.get("source")==="hosted",K=w===void 0?"":`:share:${w.session.value.share.id}`,q="mar.standalone-file-tabs.v1"+K,z="mar.standalone-file-drafts.v1"+K,I=P([]),l=P(),v=P(),h=P(ze()),o=P(),C=P(),E=P(""),T=P(),b=P(),R=P(!0),H=P(!1),ge=P(w===void 0?sessionStorage.getItem("mar.user.csrf-token")??"":""),Oe=w===void 0&&n.get("write")==="1"&&Object.keys(D).length===0,me=y??Tt({csrfToken:()=>ge.value,renewCsrfToken:He}),ne=bt(me),O=ne.state,J=ee(()=>O.value.error!==void 0?Dt(O.value.error,n.get("path")??""):E.value===""?"":Z(E.value)),Ue=ee(()=>O.value.url!==void 0&&new URL(O.value.url).hostname===location.hostname),ae=wt().preference,Ae=ee(()=>({backgroundImage:`url("data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" width="360" height="240"><defs><pattern id="watermark" width="360" height="240" patternUnits="userSpaceOnUse" patternTransform="rotate(-30)"><text x="0" y="120" fill="#000" fill-opacity=".12" font-family="serif" font-size="22">${Qe(ae.value.watermarkText)}</text></pattern></defs><rect width="100%" height="100%" fill="url(#watermark)"/></svg>`)}")`})),xe=Number(n.get("line"))||void 0,We=Number(n.get("column"))||void 0,oe=ee(()=>o.value===void 0?"unsupported":Ce(o.value.path,o.value.encoding));let U,re,Q=!1;function $e(){if(N)return;const t=n.get("nodeId"),e=n.get("workspaceId"),a=n.get("path");if(t===null||e===null||a===null)return;let r=[];try{const c=k.share?.embedded?[]:JSON.parse(sessionStorage.getItem(q)??"[]");Array.isArray(c)&&(r=c.filter(je))}catch{r=[]}const i={kind:ve(a,n.get("mimeType")??"")?"WORKTREE_TEXT":"WORKTREE_PREVIEW",nodeId:t,workspaceId:e,path:a,repositoryPath:n.get("repositoryPath")??"",worktreePath:n.get("worktreePath")??"",...n.has("repositoryPath")?{gitFile:!0}:{},...Number(n.get("line"))>0?{targetLine:Number(n.get("line"))}:{},...Number(n.get("column"))>0?{targetColumn:Number(n.get("column"))}:{}},s=Pt(i),g=r.find(c=>c.identity===s),f=g===void 0?{...i,id:Math.max(0,...r.map(c=>c.id))+1,identity:s,fileName:St(a),url:location.href}:{...g,...i,url:location.href};I.value=[...r.filter(c=>c.identity!==s),f].slice(-20),l.value=f.id,ie()}function ze(){try{const t=JSON.parse(sessionStorage.getItem(z)??"[]");return Array.isArray(t)?t.filter(pe):[]}catch{return[]}}function je(t){if(typeof t!="object"||t===null)return!1;const e=t;if(!Number.isSafeInteger(e.id)||e.kind!=="WORKTREE_TEXT"&&e.kind!=="WORKTREE_PREVIEW"||typeof e.identity!="string"||typeof e.nodeId!="string"||typeof e.workspaceId!="string"||typeof e.path!="string"||typeof e.fileName!="string"||typeof e.url!="string")return!1;try{const a=new URL(e.url,location.href);return a.origin===location.origin&&a.pathname===location.pathname&&a.searchParams.get("standaloneFile")==="1"&&a.searchParams.get("markdownPreview")!=="1"}catch{return!1}}function pe(t){if(typeof t!="object"||t===null)return!1;const e=t;return typeof e.tabIdentity=="string"&&typeof e.path=="string"&&typeof e.content=="string"&&typeof e.expectedRevision=="string"}function ie(){!N&&!k.share?.embedded&&sessionStorage.setItem(q,JSON.stringify(I.value))}function Me(t){const e=I.value.find(a=>a.id===t);e===void 0||t===l.value||(se(),location.replace(e.url))}function Ve(t){const e=I.value.findIndex(i=>i.id===t);if(e<0)return;const a=I.value.filter(i=>i.id!==t),r=I.value[e];if(I.value=a,he(r.identity),ie(),a.length===0){le();return}if(t!==l.value)return;const d=a[Math.min(e,a.length-1)];d!==void 0&&location.replace(d.url)}function se(){const t=v.value?.captureDirtyDrafts().filter(pe)??[];if(t.length===0)return;const e=new Set(t.map(a=>a.tabIdentity));h.value=[...h.value.filter(a=>!e.has(a.tabIdentity)),...t],sessionStorage.setItem(z,JSON.stringify(h.value))}async function Be(t){const e=I.value.find(a=>a.id===t);if(e===void 0||!h.value.some(a=>a.tabIdentity===e.identity))return!0;try{return await st.confirm(Z("fileEditor.unsavedMessage"),Z("fileEditor.unsavedTitle"),{icon:lt("warning"),type:"warning"}),!0}catch{return!1}}function Ke(){I.value=[],h.value=[],ie(),sessionStorage.removeItem(z),le()}function he(t){h.value=h.value.filter(e=>e.tabIdentity!==t),sessionStorage.setItem(z,JSON.stringify(h.value))}$e(),tt(async()=>{N?de.mount():window.addEventListener("mar-before-standalone-navigation",se),window.addEventListener("online",Y),window.addEventListener("offline",Y);const t=n.get("nodeId"),e=n.get("workspaceId"),a=n.get("path");if(t===null||e===null||a===null){E.value="generated.standaloneFilePreviewPage.theFilePreviewURLIsInvalid";return}if(!$&&w===void 0&&(U=Wt({nodeId:t,workspaceId:e,activeDownloadWorker:_.activeWorker,...D})),F){R.value=!0,!$&&De(a)&&Object.keys(D).length===0?await ne.open({nodeId:t,workspaceId:e,path:a}):E.value="htmlPreview.unavailable",R.value=!1;return}await ye()});async function ye(t=!1){const e=n.get("nodeId"),a=n.get("workspaceId"),r=n.get("path");if(e===null||a===null||r===null)return;R.value=!0,E.value="",re=void 0,Q=!1,b.value!==void 0&&fe(b.value),b.value=void 0;const d=ve(r);if(o.value={path:r,encoding:d?"utf-8":"base64",content:"",truncated:!1,nextOffset:null},T.value=void 0,$){await qe(e,r);return}try{if(Nt(r)&&n.get("rawContent")==="1"){const s=t?void 0:await Ne(r,async()=>U?.objectUrl(r));if(s!==void 0){b.value=s.url,o.value={path:r,size:s.size,encoding:"base64",content:"",truncated:!1,nextOffset:null,revision:s.revision},T.value=s.url;return}const g=await Ie(e,a,r,0,!1,1);o.value={path:r,...g.size===void 0?{}:{size:g.size},encoding:"base64",content:"",truncated:!1,nextOffset:null},T.value=G(e,a,r);return}const i=await Fe(s=>Ie(e,a,r,0,!t,s));if(i.encoding==="base64"){if(b.value!==void 0&&fe(b.value),o.value={...i,content:"",truncated:!1,nextOffset:null},Ce(r,"base64")==="unsupported")return;const s=t?void 0:await Ne(r,async()=>U?.objectUrl(r));if(b.value=s?.url,s!==void 0){T.value=b.value;return}T.value=G(e,a,r)}else o.value={...i,truncated:i.nextOffset!==null,nextOffset:i.nextOffset}}catch{if(!t&&Q){await ye(!0);return}E.value="generated.standaloneFilePreviewPage.unableToReadTheFileCheckYour"}finally{R.value=!1}}async function qe(t,e){const a=n.get("conversationId"),r=n.get("fileId"),d=n.get("mimeType")??"";let i=Number(n.get("size"));if(a===null||n.get("workspaceId")!==a||r===null||!Number.isSafeInteger(i)||i<0){E.value="generated.standaloneFilePreviewPage.theFilePreviewURLIsInvalid",R.value=!1;return}const s=`/api/nodes/${encodeURIComponent(t)}/hosted-conversations/${encodeURIComponent(a)}/files/${encodeURIComponent(r)}/content`,g=ve(e,d);if(o.value={path:e,size:i,encoding:g?"utf-8":"base64",content:"",truncated:!1,nextOffset:null},!g){T.value=s,R.value=!1;return}try{if(i===0){const f=await fetch(s,{credentials:"same-origin",method:"HEAD"});if(!f.ok)throw new Error(`REQUEST_FAILED_${f.status}`);const c=f.headers.get("content-length");if(c===null||!Number.isSafeInteger(Number(c))||Number(c)<0)throw new Error("NODE_RESPONSE_INVALID");if(i=Number(c),i===0){o.value={path:e,size:i,encoding:"utf-8",content:"",truncated:!1,nextOffset:null};return}}o.value=await Fe(async f=>{const c=await fetch(s,{credentials:"same-origin",headers:{Range:`bytes=0-${f-1}`}});if(!c.ok)throw new Error(`REQUEST_FAILED_${c.status}`);const A=new Uint8Array(await c.arrayBuffer()),Ee=c.headers.get("content-range")?.match(/\/(\d+)$/u)?.[1],j=Ee===void 0?i:Number(Ee);if(!Number.isSafeInteger(j)||j<0)throw new Error("NODE_RESPONSE_INVALID");const ce=Le(A,e,A.byteLength>=j,d);return{path:e,size:j,...ce,truncated:ce.encoding==="utf-8"&&A.byteLength<j,nextOffset:ce.encoding==="utf-8"&&A.byteLength<j?A.byteLength:null}}),o.value.encoding==="base64"&&(T.value=s)}catch{E.value="generated.standaloneFilePreviewPage.unableToReadTheFileCheckYour"}finally{R.value=!1}}async function He(){const t=await fetch("/api/auth/csrf",{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json"},body:"{}"});if(!t.ok)throw new Error("CSRF_INVALID");const e=await t.json();if(typeof e.csrfToken!="string")throw new Error("CSRF_TOKEN_INVALID");return ge.value=e.csrfToken,sessionStorage.setItem("mar.user.csrf-token",e.csrfToken),e.csrfToken}async function Je(t,e){const a=n.get("nodeId"),r=n.get("workspaceId"),d=n.get("path");if(a===null||r===null||d===null||o.value?.previewEncoding!==void 0)throw new Error("FILE_WRITE_INVALID");const i=await me.request(`/api/workspaces/${encodeURIComponent(r)}/files/write`,{method:"PUT",body:JSON.stringify({nodeId:a,path:d,content:t,expectedRevision:e})});if(typeof i.file?.revision!="string"||typeof i.file.size!="number"||!Number.isSafeInteger(i.file.size)||i.file.size<0)throw new Error("NODE_RESPONSE_INVALID");return o.value!==void 0&&(o.value={...o.value,content:t,revision:i.file.revision,size:i.file.size}),i.file.revision}nt(()=>{ne.release(),N?de.dispose():window.removeEventListener("mar-before-standalone-navigation",se),window.removeEventListener("online",Y),window.removeEventListener("offline",Y),U?.close(),b.value!==void 0&&fe(b.value)});async function ke(){if(o.value!==void 0){H.value=!0;try{const t=n.get("nodeId"),e=n.get("workspaceId"),a=n.get("path");if(t===null||e===null||a===null)return;if($){const i=n.get("conversationId"),s=n.get("fileId");if(i===null||s===null)return;const g=document.createElement("a");g.href=`/api/nodes/${encodeURIComponent(t)}/hosted-conversations/${encodeURIComponent(i)}/files/${encodeURIComponent(s)}/content?download=1`,g.download=a.split("/").at(-1)??"download",g.click();return}if(b.value?.startsWith("blob:")){Et(b.value,a.split("/").at(-1)??"download");return}const r=await U?.download(a);if(r!==void 0&&r!=="UNAVAILABLE")return;const d=document.createElement("a");d.href=G(t,e,a,!0),d.download=o.value.path.split("/").at(-1)??"download",d.click()}finally{H.value=!1}}}function Y(){U?.networkChanged()}async function Ie(t,e,a,r,d=!0,i=512*1024){const s=d?await U?.readRange(a,r,i,re):void 0;if(s!==void 0){Q=!0,re={revision:s.revision,size:s.size};const c=await gt(s),A=Le(s.bytes,a,s.nextOffset===null);return{path:a,size:s.size,...A,truncated:s.nextOffset!==null,nextOffset:s.nextOffset,...c===void 0?{}:{revision:c}}}if(d&&Q)throw new Error("DIRECT_FILE_READ_FAILED");const g=new URLSearchParams({nodeId:t,path:a,offset:String(r),limit:String(i),...D});let f;if(y!==void 0)f=await y.request(`/api/workspaces/${encodeURIComponent(e)}/files/read?${g.toString()}`);else{const c=await fetch(`/api/workspaces/${encodeURIComponent(e)}/files/read?${g.toString()}`,{credentials:"same-origin"});if(!c.ok)throw new Error(`REQUEST_FAILED_${c.status}`);f=await c.json()}if(f.file===void 0||f.file.encoding!=="utf-8"&&f.file.encoding!=="base64"||f.file.nextOffset!==null&&!Number.isSafeInteger(f.file.nextOffset))throw new Error("NODE_RESPONSE_INVALID");return mt(f.file,a)}function Qe(t){return t.replace(/[&<>]/g,e=>e==="&"?"&amp;":e==="<"?"&lt;":"&gt;")}function le(){if(k.share?.embedded){L("close");return}window.close()}function be(){return le(),!0}const de=pt({isOpen:()=>N,closeWindow:be,closeTab:be});function Ye(t){de.bindFrame(t)}function Pe(t){const e=n.get("nodeId"),a=n.get("workspaceId");return e===null||a===null?"":G(e,a,t)}function Se(t){const e=n.get("nodeId"),a=n.get("workspaceId");if(e===null||a===null)return;const r=new URLSearchParams({standaloneFile:"1",...we(t)?{markdownPreview:"1"}:{rawContent:"1"},nodeId:e,workspaceId:a,path:t}),d=`${w===void 0?"/console":"/share/"+encodeURIComponent(w.session.value.share.id)}?${r.toString()}`;w!==void 0?W.open(d):location.assign(d)}function Ge(t){const e=n.get("nodeId"),a=n.get("workspaceId");if(e===null||a===null)return;const r=new URLSearchParams({standaloneFile:"1",htmlPreview:"1",nodeId:e,workspaceId:a,path:t});W.open(`${w===void 0?"/console":"/share/"+encodeURIComponent(w.session.value.share.id)}?${r.toString()}`)===void 0&&(E.value="htmlPreview.unavailable")}function G(t,e,a,r=!1){const d=new URLSearchParams({nodeId:t,path:a,...r?{download:"1"}:{},...D}),i=`/api/workspaces/${encodeURIComponent(e)}/files/content?${d.toString()}`;return y?.resourceUrl(i)??i}return(t,e)=>{const a=at("tooltip");return m(),S(ue,null,[u(V)?(m(),B(ot,{key:0,to:"head"},[X("link",{rel:"stylesheet",href:u(At)},null,8,$t)])):x("",!0),u(N)?(m(),S("main",{key:1,ref_key:"standaloneRoot",ref:C,class:"standalone-file-preview"},[J.value?(m(),S("p",zt,M(J.value),1)):u(F)?(m(),S(ue,{key:1},[X("header",jt,[Te((m(),S("code",null,[Re(M(u(n).get("path")),1)])),[[a,u(n).get("path")??""]]),u(O).url?(m(),S("small",Mt,M(u(Z)(Ue.value?"htmlPreview.trustedWarning":"htmlPreview.isolatedWarning")),1)):x("",!0)]),_e(ht,{url:u(O).url,loading:R.value||u(O).loading,title:u(n).get("path")??"",onLoad:Ye},null,8,["url","loading","title"])],64)):u(V)?(m(),S(ue,{key:2},[X("header",Vt,[Te((m(),S("code",null,[Re(M(u(n).get("path")??o.value?.path),1)])),[[a,u(n).get("path")??o.value?.path??""]]),o.value?.size!==void 0?(m(),S("small",Bt,M(u(Ut)(o.value.size??0)),1)):x("",!0)]),X("div",Kt,[R.value?(m(),B(Ft,{key:0,variant:"page",overlay:""})):o.value&&u(we)(o.value.path)?(m(),S("main",qt,[_e(Ct,{content:o.value.content,path:o.value.path,"resource-url":Pe,"standard-style":"",onOpenFile:Se},null,8,["content","path"]),u(ae).watermarkEnabled&&u(ae).watermarkText?(m(),S("div",{key:0,class:"markdown-watermark",style:rt(Ae.value),"aria-hidden":"true"},null,4)):x("",!0)])):x("",!0)])],64)):x("",!0)],512)):(m(),B(It,{key:2,ref_key:"standaloneFileTabs",ref:v,presentation:k.share?.embedded?"overlay":"window",tabs:I.value,"active-tab-id":l.value,"can-close-unmounted-tab":Be,onActivate:Me,onClose:Ve,onCloseAll:Ke},{default:it(({tab:r,active:d,registerPageHandle:i,requestClose:s,requestCloseAll:g})=>[d&&J.value?(m(),S("p",Ht,M(J.value),1)):d&&o.value&&oe.value==="text"?(m(),B(yt,{key:1,"quote-target":k.quoteTarget,ref:i,active:d,file:o.value,kind:oe.value,loading:R.value,downloading:H.value,"target-line":u(xe),"target-column":u(We),"write-enabled":u(Oe),html:u(De)(o.value.path)&&Object.keys(D).length===0,markdown:!u(n).has("repositoryPath")&&u(we)(o.value.path),"markdown-resource-url":Pe,"save-file":Je,"tab-identity":r.identity,"initial-dirty-draft":h.value.find(f=>f.tabIdentity===r.identity&&f.path===r.path),onClose:s,onQuoted:g,onDownload:ke,onOpenHtmlPreview:e[0]||(e[0]=f=>Ge(o.value.path)),onOpenMarkdownPreview:e[1]||(e[1]=f=>Se(o.value.path)),onDirtyDraftApplied:he},null,8,["quote-target","active","file","kind","loading","downloading","target-line","target-column","write-enabled","html","markdown","tab-identity","initial-dirty-draft","onClose","onQuoted"])):d&&o.value?(m(),B(kt,{key:2,ref:i,active:d,file:o.value,"content-url":T.value,kind:oe.value,loading:R.value,downloading:H.value,onClose:s,onDownload:ke},null,8,["active","file","content-url","kind","loading","downloading","onClose"])):x("",!0)]),_:1},8,["presentation","tabs","active-tab-id"]))],64)}}}),cn=dt(Jt,[["__scopeId","data-v-618c2c49"]]);export{cn as default};
1
+ import{B as Xe,m as Ze,aw as et,f as P,K as tt,ad as nt,Y as at,o as m,n as S,E as u,C as B,P as X,ax as ot,G as x,Q as M,a6 as ue,N as Te,S as Re,t as Z,q as _e,a1 as rt,D as it,k as ee,X as st,F as lt,_ as dt}from"./index-CXYo0aZg.js";import{d as ct,r as ut,a as ft,b as vt,m as wt,c as fe,e as Ne,f as Fe,g as gt,h as mt,i as pt,H as ht,W as yt,j as kt,k as It,l as bt,w as Pt,n as St,t as Et,o as Tt}from"./HtmlPreviewFrame-C-UQP5Kx.js";import{c as Rt}from"./session-share-client-service-bdoizmjD.js";import{a as _t,i as De,s as ve,u as Nt,f as Ce,d as Le,F as Ft,b as we}from"./FilePreviewLoading-es8YT3AE.js";import{f as Dt}from"./error-presentation-zku4f4Na.js";import Ct from"./MarkdownFilePreview-DbAE_2gM.js";import{c as Lt}from"./workbench-live-service-O2xlmfOF.js";import{c as Ot}from"./workspace-direct-transfer-service-H0f55kLn.js";import{f as Ut}from"./file-presentation-Cm7tx53N.js";import"./uuid-BmNSYLtZ.js";import"./MarFormItem.vue_vue_type_script_setup_true_lang-DR9vLmUF.js";import"./MarSwitch-CnzyH7nM.js";import"./mobile-dialog-return-service-B9Umx6Ja.js";import"./BusyIndicator-ioUVqyOU.js";const At="/assets/github-markdown-light-DWnTz46N.css",xt=800;function Wt(p){function te(){return{...p.repositoryPath===void 0?{}:{repositoryPath:p.repositoryPath},...p.worktreePath===void 0?{}:{worktreePath:p.worktreePath}}}let _=!0,k,L=0,n;const w=new Promise(l=>{n=l}),D=setTimeout(()=>n?.(!1),xt),y=Ot({send:l=>W.sendDirect(l),shouldRetryProbe:(l,v)=>_&&l===p.nodeId&&v===k}),W=Lt({canConnect:()=>_,onEvent:()=>{},onResyncRequired:()=>{},onNodeConnection:(l,v)=>{l===p.nodeId&&!v&&y.invalidateNode(l)},onNodeReplaced:l=>y.invalidateNode(l),onReconnect:()=>{},onDisconnected:()=>y.invalidateControlConnection(),onReady:(l,v)=>{v||y.invalidateNetwork(),V()},onDirectMessage:l=>y.handle(l),onUnauthenticated:()=>F(!1),onInvalidMessage:()=>{}});async function V(){const l=++L;try{const v=await fetch(`/api/nodes/${encodeURIComponent(p.nodeId)}/workbench-capabilities`,{credentials:"same-origin"});if(!v.ok)throw new Error("DIRECT_UNAVAILABLE");const o=(await v.json()).manifest;if(!_||l!==L)return;if(o?.directTransfer?.apiVersion!==3||o.directTransfer.transport!==!0||o.directTransfer.download!==!0||typeof o.nodeGeneration!="string"){F(!1);return}k=o.nodeGeneration;const C=await y.ensureTransport(p.nodeId,k);_&&l===L&&F(C==="DIRECT_AVAILABLE")}catch{_&&l===L&&F(!1)}}function F(l){clearTimeout(D),n?.(l),n=void 0}async function N(l,v=!0){if(Xe(l)||v&&!await w)return;const h=k;if(!_||h===void 0||!y.isConnected(p.nodeId,h))return;const o={kind:"WORKSPACE_FILE",workspaceId:p.workspaceId,path:l,...te()};return{direct:y,nodeId:p.nodeId,nodeGeneration:h,resource:o,metadata:async()=>{const C=await vt({nodeId:p.nodeId,resource:o,request:async E=>{const T=await fetch(E,{credentials:"same-origin"});return T.ok?T.json():{}}});return _?C:void 0}}}async function $(l,v,h,o){const C=await N(l);if(C!==void 0)return ut({...C,fileName:l.split("/").at(-1)??"file",offset:v,length:h,...o===void 0?{}:{identity:o}}).catch(()=>{})}async function K(l){const v=await N(l);return v===void 0?void 0:ft(v)}async function q(l){const v=await N(l,!1);return v===void 0||p.activeDownloadWorker===void 0?"UNAVAILABLE":ct({...v,activeWorker:p.activeDownloadWorker})}function z(){y.invalidateNetwork()}function I(){_=!1,L+=1,F(!1),y.invalidateNetwork(),W.close()}return W.connect(),{objectUrl:K,readRange:$,download:q,networkChanged:z,close:I}}const $t=["href"],zt={key:0,class:"standalone-error"},jt={class:"standalone-markdown-header html-preview-header"},Mt={key:0},Vt={class:"standalone-markdown-header"},Bt={key:0},Kt={class:"standalone-preview-body"},qt={key:1,class:"markdown-preview-page"},Ht={key:0,class:"standalone-error"},Jt=Ze({__name:"StandaloneFilePreviewPage",props:{quoteTarget:{},share:{}},emits:["close"],setup(p,{emit:te}){const _=et(),k=p,L=te,n=new URLSearchParams(k.share?.intent??location.search),w=k.share?.access;if(w!==void 0){const t=w.session.value.share;n.set("nodeId",t.nodeId),n.set("workspaceId",t.workspaceId),n.delete("write"),n.delete("source"),n.delete("worktreePath"),n.delete("repositoryPath")}const D={...n.has("repositoryPath")?{repositoryPath:n.get("repositoryPath")}:{},...n.has("worktreePath")?{worktreePath:n.get("worktreePath")}:{}},y=w===void 0?void 0:Rt(w,w.session.value.share),W=_t(void 0,w===void 0?"workbench":`share:${w.session.value.share.id}`),V=!n.has("repositoryPath")&&n.get("markdownPreview")==="1",F=!n.has("repositoryPath")&&n.get("htmlPreview")==="1",N=V||F,$=n.get("source")==="hosted",K=w===void 0?"":`:share:${w.session.value.share.id}`,q="mar.standalone-file-tabs.v1"+K,z="mar.standalone-file-drafts.v1"+K,I=P([]),l=P(),v=P(),h=P(ze()),o=P(),C=P(),E=P(""),T=P(),b=P(),R=P(!0),H=P(!1),ge=P(w===void 0?sessionStorage.getItem("mar.user.csrf-token")??"":""),Oe=w===void 0&&n.get("write")==="1"&&Object.keys(D).length===0,me=y??Tt({csrfToken:()=>ge.value,renewCsrfToken:He}),ne=bt(me),O=ne.state,J=ee(()=>O.value.error!==void 0?Dt(O.value.error,n.get("path")??""):E.value===""?"":Z(E.value)),Ue=ee(()=>O.value.url!==void 0&&new URL(O.value.url).hostname===location.hostname),ae=wt().preference,Ae=ee(()=>({backgroundImage:`url("data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" width="360" height="240"><defs><pattern id="watermark" width="360" height="240" patternUnits="userSpaceOnUse" patternTransform="rotate(-30)"><text x="0" y="120" fill="#000" fill-opacity=".12" font-family="serif" font-size="22">${Qe(ae.value.watermarkText)}</text></pattern></defs><rect width="100%" height="100%" fill="url(#watermark)"/></svg>`)}")`})),xe=Number(n.get("line"))||void 0,We=Number(n.get("column"))||void 0,oe=ee(()=>o.value===void 0?"unsupported":Ce(o.value.path,o.value.encoding));let U,re,Q=!1;function $e(){if(N)return;const t=n.get("nodeId"),e=n.get("workspaceId"),a=n.get("path");if(t===null||e===null||a===null)return;let r=[];try{const c=k.share?.embedded?[]:JSON.parse(sessionStorage.getItem(q)??"[]");Array.isArray(c)&&(r=c.filter(je))}catch{r=[]}const i={kind:ve(a,n.get("mimeType")??"")?"WORKTREE_TEXT":"WORKTREE_PREVIEW",nodeId:t,workspaceId:e,path:a,repositoryPath:n.get("repositoryPath")??"",worktreePath:n.get("worktreePath")??"",...n.has("repositoryPath")?{gitFile:!0}:{},...Number(n.get("line"))>0?{targetLine:Number(n.get("line"))}:{},...Number(n.get("column"))>0?{targetColumn:Number(n.get("column"))}:{}},s=Pt(i),g=r.find(c=>c.identity===s),f=g===void 0?{...i,id:Math.max(0,...r.map(c=>c.id))+1,identity:s,fileName:St(a),url:location.href}:{...g,...i,url:location.href};I.value=[...r.filter(c=>c.identity!==s),f].slice(-20),l.value=f.id,ie()}function ze(){try{const t=JSON.parse(sessionStorage.getItem(z)??"[]");return Array.isArray(t)?t.filter(pe):[]}catch{return[]}}function je(t){if(typeof t!="object"||t===null)return!1;const e=t;if(!Number.isSafeInteger(e.id)||e.kind!=="WORKTREE_TEXT"&&e.kind!=="WORKTREE_PREVIEW"||typeof e.identity!="string"||typeof e.nodeId!="string"||typeof e.workspaceId!="string"||typeof e.path!="string"||typeof e.fileName!="string"||typeof e.url!="string")return!1;try{const a=new URL(e.url,location.href);return a.origin===location.origin&&a.pathname===location.pathname&&a.searchParams.get("standaloneFile")==="1"&&a.searchParams.get("markdownPreview")!=="1"}catch{return!1}}function pe(t){if(typeof t!="object"||t===null)return!1;const e=t;return typeof e.tabIdentity=="string"&&typeof e.path=="string"&&typeof e.content=="string"&&typeof e.expectedRevision=="string"}function ie(){!N&&!k.share?.embedded&&sessionStorage.setItem(q,JSON.stringify(I.value))}function Me(t){const e=I.value.find(a=>a.id===t);e===void 0||t===l.value||(se(),location.replace(e.url))}function Ve(t){const e=I.value.findIndex(i=>i.id===t);if(e<0)return;const a=I.value.filter(i=>i.id!==t),r=I.value[e];if(I.value=a,he(r.identity),ie(),a.length===0){le();return}if(t!==l.value)return;const d=a[Math.min(e,a.length-1)];d!==void 0&&location.replace(d.url)}function se(){const t=v.value?.captureDirtyDrafts().filter(pe)??[];if(t.length===0)return;const e=new Set(t.map(a=>a.tabIdentity));h.value=[...h.value.filter(a=>!e.has(a.tabIdentity)),...t],sessionStorage.setItem(z,JSON.stringify(h.value))}async function Be(t){const e=I.value.find(a=>a.id===t);if(e===void 0||!h.value.some(a=>a.tabIdentity===e.identity))return!0;try{return await st.confirm(Z("fileEditor.unsavedMessage"),Z("fileEditor.unsavedTitle"),{icon:lt("warning"),type:"warning"}),!0}catch{return!1}}function Ke(){I.value=[],h.value=[],ie(),sessionStorage.removeItem(z),le()}function he(t){h.value=h.value.filter(e=>e.tabIdentity!==t),sessionStorage.setItem(z,JSON.stringify(h.value))}$e(),tt(async()=>{N?de.mount():window.addEventListener("mar-before-standalone-navigation",se),window.addEventListener("online",Y),window.addEventListener("offline",Y);const t=n.get("nodeId"),e=n.get("workspaceId"),a=n.get("path");if(t===null||e===null||a===null){E.value="generated.standaloneFilePreviewPage.theFilePreviewURLIsInvalid";return}if(!$&&w===void 0&&(U=Wt({nodeId:t,workspaceId:e,activeDownloadWorker:_.activeWorker,...D})),F){R.value=!0,!$&&De(a)&&Object.keys(D).length===0?await ne.open({nodeId:t,workspaceId:e,path:a}):E.value="htmlPreview.unavailable",R.value=!1;return}await ye()});async function ye(t=!1){const e=n.get("nodeId"),a=n.get("workspaceId"),r=n.get("path");if(e===null||a===null||r===null)return;R.value=!0,E.value="",re=void 0,Q=!1,b.value!==void 0&&fe(b.value),b.value=void 0;const d=ve(r);if(o.value={path:r,encoding:d?"utf-8":"base64",content:"",truncated:!1,nextOffset:null},T.value=void 0,$){await qe(e,r);return}try{if(Nt(r)&&n.get("rawContent")==="1"){const s=t?void 0:await Ne(r,async()=>U?.objectUrl(r));if(s!==void 0){b.value=s.url,o.value={path:r,size:s.size,encoding:"base64",content:"",truncated:!1,nextOffset:null,revision:s.revision},T.value=s.url;return}const g=await Ie(e,a,r,0,!1,1);o.value={path:r,...g.size===void 0?{}:{size:g.size},encoding:"base64",content:"",truncated:!1,nextOffset:null},T.value=G(e,a,r);return}const i=await Fe(s=>Ie(e,a,r,0,!t,s));if(i.encoding==="base64"){if(b.value!==void 0&&fe(b.value),o.value={...i,content:"",truncated:!1,nextOffset:null},Ce(r,"base64")==="unsupported")return;const s=t?void 0:await Ne(r,async()=>U?.objectUrl(r));if(b.value=s?.url,s!==void 0){T.value=b.value;return}T.value=G(e,a,r)}else o.value={...i,truncated:i.nextOffset!==null,nextOffset:i.nextOffset}}catch{if(!t&&Q){await ye(!0);return}E.value="generated.standaloneFilePreviewPage.unableToReadTheFileCheckYour"}finally{R.value=!1}}async function qe(t,e){const a=n.get("conversationId"),r=n.get("fileId"),d=n.get("mimeType")??"";let i=Number(n.get("size"));if(a===null||n.get("workspaceId")!==a||r===null||!Number.isSafeInteger(i)||i<0){E.value="generated.standaloneFilePreviewPage.theFilePreviewURLIsInvalid",R.value=!1;return}const s=`/api/nodes/${encodeURIComponent(t)}/hosted-conversations/${encodeURIComponent(a)}/files/${encodeURIComponent(r)}/content`,g=ve(e,d);if(o.value={path:e,size:i,encoding:g?"utf-8":"base64",content:"",truncated:!1,nextOffset:null},!g){T.value=s,R.value=!1;return}try{if(i===0){const f=await fetch(s,{credentials:"same-origin",method:"HEAD"});if(!f.ok)throw new Error(`REQUEST_FAILED_${f.status}`);const c=f.headers.get("content-length");if(c===null||!Number.isSafeInteger(Number(c))||Number(c)<0)throw new Error("NODE_RESPONSE_INVALID");if(i=Number(c),i===0){o.value={path:e,size:i,encoding:"utf-8",content:"",truncated:!1,nextOffset:null};return}}o.value=await Fe(async f=>{const c=await fetch(s,{credentials:"same-origin",headers:{Range:`bytes=0-${f-1}`}});if(!c.ok)throw new Error(`REQUEST_FAILED_${c.status}`);const A=new Uint8Array(await c.arrayBuffer()),Ee=c.headers.get("content-range")?.match(/\/(\d+)$/u)?.[1],j=Ee===void 0?i:Number(Ee);if(!Number.isSafeInteger(j)||j<0)throw new Error("NODE_RESPONSE_INVALID");const ce=Le(A,e,A.byteLength>=j,d);return{path:e,size:j,...ce,truncated:ce.encoding==="utf-8"&&A.byteLength<j,nextOffset:ce.encoding==="utf-8"&&A.byteLength<j?A.byteLength:null}}),o.value.encoding==="base64"&&(T.value=s)}catch{E.value="generated.standaloneFilePreviewPage.unableToReadTheFileCheckYour"}finally{R.value=!1}}async function He(){const t=await fetch("/api/auth/csrf",{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json"},body:"{}"});if(!t.ok)throw new Error("CSRF_INVALID");const e=await t.json();if(typeof e.csrfToken!="string")throw new Error("CSRF_TOKEN_INVALID");return ge.value=e.csrfToken,sessionStorage.setItem("mar.user.csrf-token",e.csrfToken),e.csrfToken}async function Je(t,e){const a=n.get("nodeId"),r=n.get("workspaceId"),d=n.get("path");if(a===null||r===null||d===null||o.value?.previewEncoding!==void 0)throw new Error("FILE_WRITE_INVALID");const i=await me.request(`/api/workspaces/${encodeURIComponent(r)}/files/write`,{method:"PUT",body:JSON.stringify({nodeId:a,path:d,content:t,expectedRevision:e})});if(typeof i.file?.revision!="string"||typeof i.file.size!="number"||!Number.isSafeInteger(i.file.size)||i.file.size<0)throw new Error("NODE_RESPONSE_INVALID");return o.value!==void 0&&(o.value={...o.value,content:t,revision:i.file.revision,size:i.file.size}),i.file.revision}nt(()=>{ne.release(),N?de.dispose():window.removeEventListener("mar-before-standalone-navigation",se),window.removeEventListener("online",Y),window.removeEventListener("offline",Y),U?.close(),b.value!==void 0&&fe(b.value)});async function ke(){if(o.value!==void 0){H.value=!0;try{const t=n.get("nodeId"),e=n.get("workspaceId"),a=n.get("path");if(t===null||e===null||a===null)return;if($){const i=n.get("conversationId"),s=n.get("fileId");if(i===null||s===null)return;const g=document.createElement("a");g.href=`/api/nodes/${encodeURIComponent(t)}/hosted-conversations/${encodeURIComponent(i)}/files/${encodeURIComponent(s)}/content?download=1`,g.download=a.split("/").at(-1)??"download",g.click();return}if(b.value?.startsWith("blob:")){Et(b.value,a.split("/").at(-1)??"download");return}const r=await U?.download(a);if(r!==void 0&&r!=="UNAVAILABLE")return;const d=document.createElement("a");d.href=G(t,e,a,!0),d.download=o.value.path.split("/").at(-1)??"download",d.click()}finally{H.value=!1}}}function Y(){U?.networkChanged()}async function Ie(t,e,a,r,d=!0,i=512*1024){const s=d?await U?.readRange(a,r,i,re):void 0;if(s!==void 0){Q=!0,re={revision:s.revision,size:s.size};const c=await gt(s),A=Le(s.bytes,a,s.nextOffset===null);return{path:a,size:s.size,...A,truncated:s.nextOffset!==null,nextOffset:s.nextOffset,...c===void 0?{}:{revision:c}}}if(d&&Q)throw new Error("DIRECT_FILE_READ_FAILED");const g=new URLSearchParams({nodeId:t,path:a,offset:String(r),limit:String(i),...D});let f;if(y!==void 0)f=await y.request(`/api/workspaces/${encodeURIComponent(e)}/files/read?${g.toString()}`);else{const c=await fetch(`/api/workspaces/${encodeURIComponent(e)}/files/read?${g.toString()}`,{credentials:"same-origin"});if(!c.ok)throw new Error(`REQUEST_FAILED_${c.status}`);f=await c.json()}if(f.file===void 0||f.file.encoding!=="utf-8"&&f.file.encoding!=="base64"||f.file.nextOffset!==null&&!Number.isSafeInteger(f.file.nextOffset))throw new Error("NODE_RESPONSE_INVALID");return mt(f.file,a)}function Qe(t){return t.replace(/[&<>]/g,e=>e==="&"?"&amp;":e==="<"?"&lt;":"&gt;")}function le(){if(k.share?.embedded){L("close");return}window.close()}function be(){return le(),!0}const de=pt({isOpen:()=>N,closeWindow:be,closeTab:be});function Ye(t){de.bindFrame(t)}function Pe(t){const e=n.get("nodeId"),a=n.get("workspaceId");return e===null||a===null?"":G(e,a,t)}function Se(t){const e=n.get("nodeId"),a=n.get("workspaceId");if(e===null||a===null)return;const r=new URLSearchParams({standaloneFile:"1",...we(t)?{markdownPreview:"1"}:{rawContent:"1"},nodeId:e,workspaceId:a,path:t}),d=`${w===void 0?"/console":"/share/"+encodeURIComponent(w.session.value.share.id)}?${r.toString()}`;w!==void 0?W.open(d):location.assign(d)}function Ge(t){const e=n.get("nodeId"),a=n.get("workspaceId");if(e===null||a===null)return;const r=new URLSearchParams({standaloneFile:"1",htmlPreview:"1",nodeId:e,workspaceId:a,path:t});W.open(`${w===void 0?"/console":"/share/"+encodeURIComponent(w.session.value.share.id)}?${r.toString()}`)===void 0&&(E.value="htmlPreview.unavailable")}function G(t,e,a,r=!1){const d=new URLSearchParams({nodeId:t,path:a,...r?{download:"1"}:{},...D}),i=`/api/workspaces/${encodeURIComponent(e)}/files/content?${d.toString()}`;return y?.resourceUrl(i)??i}return(t,e)=>{const a=at("tooltip");return m(),S(ue,null,[u(V)?(m(),B(ot,{key:0,to:"head"},[X("link",{rel:"stylesheet",href:u(At)},null,8,$t)])):x("",!0),u(N)?(m(),S("main",{key:1,ref_key:"standaloneRoot",ref:C,class:"standalone-file-preview"},[J.value?(m(),S("p",zt,M(J.value),1)):u(F)?(m(),S(ue,{key:1},[X("header",jt,[Te((m(),S("code",null,[Re(M(u(n).get("path")),1)])),[[a,u(n).get("path")??""]]),u(O).url?(m(),S("small",Mt,M(u(Z)(Ue.value?"htmlPreview.trustedWarning":"htmlPreview.isolatedWarning")),1)):x("",!0)]),_e(ht,{url:u(O).url,loading:R.value||u(O).loading,title:u(n).get("path")??"",onLoad:Ye},null,8,["url","loading","title"])],64)):u(V)?(m(),S(ue,{key:2},[X("header",Vt,[Te((m(),S("code",null,[Re(M(u(n).get("path")??o.value?.path),1)])),[[a,u(n).get("path")??o.value?.path??""]]),o.value?.size!==void 0?(m(),S("small",Bt,M(u(Ut)(o.value.size??0)),1)):x("",!0)]),X("div",Kt,[R.value?(m(),B(Ft,{key:0,variant:"page",overlay:""})):o.value&&u(we)(o.value.path)?(m(),S("main",qt,[_e(Ct,{content:o.value.content,path:o.value.path,"resource-url":Pe,"standard-style":"",onOpenFile:Se},null,8,["content","path"]),u(ae).watermarkEnabled&&u(ae).watermarkText?(m(),S("div",{key:0,class:"markdown-watermark",style:rt(Ae.value),"aria-hidden":"true"},null,4)):x("",!0)])):x("",!0)])],64)):x("",!0)],512)):(m(),B(It,{key:2,ref_key:"standaloneFileTabs",ref:v,presentation:k.share?.embedded?"overlay":"window",tabs:I.value,"active-tab-id":l.value,"can-close-unmounted-tab":Be,onActivate:Me,onClose:Ve,onCloseAll:Ke},{default:it(({tab:r,active:d,registerPageHandle:i,requestClose:s,requestCloseAll:g})=>[d&&J.value?(m(),S("p",Ht,M(J.value),1)):d&&o.value&&oe.value==="text"?(m(),B(yt,{key:1,"quote-target":k.quoteTarget,ref:i,active:d,file:o.value,kind:oe.value,loading:R.value,downloading:H.value,"target-line":u(xe),"target-column":u(We),"write-enabled":u(Oe),html:u(De)(o.value.path)&&Object.keys(D).length===0,markdown:!u(n).has("repositoryPath")&&u(we)(o.value.path),"markdown-resource-url":Pe,"save-file":Je,"tab-identity":r.identity,"initial-dirty-draft":h.value.find(f=>f.tabIdentity===r.identity&&f.path===r.path),onClose:s,onQuoted:g,onDownload:ke,onOpenHtmlPreview:e[0]||(e[0]=f=>Ge(o.value.path)),onOpenMarkdownPreview:e[1]||(e[1]=f=>Se(o.value.path)),onDirtyDraftApplied:he},null,8,["quote-target","active","file","kind","loading","downloading","target-line","target-column","write-enabled","html","markdown","tab-identity","initial-dirty-draft","onClose","onQuoted"])):d&&o.value?(m(),B(kt,{key:2,ref:i,active:d,file:o.value,"content-url":T.value,kind:oe.value,loading:R.value,downloading:H.value,onClose:s,onDownload:ke},null,8,["active","file","content-url","kind","loading","downloading","onClose"])):x("",!0)]),_:1},8,["presentation","tabs","active-tab-id"]))],64)}}}),cn=dt(Jt,[["__scopeId","data-v-618c2c49"]]);export{cn as default};
@@ -1 +1 @@
1
- import{f as C,m as de,t as a,o as f,n as T,a6 as Z,q as o,D as r,S,Q as p,E as e,F as $,T as U,C as D,V as W,N as Q,P,a7 as ie,a2 as fe,O as X,G as R,R as j,k as z,W as A,_ as me,w as ce,K as ye,a5 as se,l as ve,X as be}from"./index-BFbW15q7.js";import{M as Ce}from"./MarAlert-Dsrb10N-.js";import{M as re}from"./MarInputNumber-CcpviHTx.js";import{_ as H,M as he}from"./MarTableColumn.vue_vue_type_script_setup_true_lang-9WwypTkY.js";import{_ as E,a as Y}from"./MarFormItem.vue_vue_type_script_setup_true_lang-DNgXEgAb.js";import{M as ge,a as ee}from"./MarOptionGroup.vue_vue_type_style_index_0_scoped_cacd24eb_lang-BQD1pghB.js";import{M as ue}from"./MarSwitch-Nht5u3dc.js";import{u as ae,m as te}from"./mobile-dialog-return-service-C1n1IVHV.js";import"./conversation-history-CWG_l_s7.js";import{e as G}from"./error-presentation-UGQTkLY-.js";const Pe={key:"skill-tls",field:"skillTlsVerificationDisabled",payloadField:"verificationDisabled",nameKey:"generated.systemConfigurationPage.disableSkillSourceTLSVerification",descriptionKey:"generated.systemConfigurationPage.keepThisOffByDefaultUseIt",type:"boolean",initialValue:!1},_e={key:"html-preview-origin",field:"htmlPreviewOrigin",payloadField:"origin",nameKey:"generated.systemConfigurationPage.htmlPreviewOrigin",descriptionKey:"generated.systemConfigurationPage.htmlPreviewOriginDescription",placeholderKey:"generated.systemConfigurationPage.htmlPreviewOriginPlaceholder",type:"origin",initialValue:""},we={key:"mail-smtp",field:"smtpConfiguration",payloadField:"config",nameKey:"generated.systemConfigurationPage.smtp",descriptionKey:"generated.systemConfigurationPage.smtpDescription",placeholderKey:"generated.systemConfigurationPage.smtpPlaceholder",type:"json",initialValue:"{}"},Ve={key:"web-push",field:"webPushEnabled",payloadField:"enabled",nameKey:"workbenchNotificationCenter.webPushConfiguration.title",descriptionKey:"workbenchNotificationCenter.webPushConfiguration.description",type:"boolean",initialValue:!1};function ke(k,M=[]){const u=[...M,{key:"mar-agent-resource-input",field:"useResourceUrl",payloadField:"useResourceUrl",nameKey:"marAgentModels.useResourceUrl",descriptionKey:"marAgentModels.globalResourceUrlDescription",type:"boolean",initialValue:!0},we,Ve,_e,Pe],_=new Map(u.map(i=>[i.key,i]));if(_.size!==u.length)throw new Error("WEB_SYSTEM_SETTING_DUPLICATE");const w=C(Object.fromEntries(u.map(i=>[i.field,i.initialValue]))),c=C({...w.value}),g=C(null),V=C(null),y=C(!1);function d(i){w.value=i,c.value={...i}}async function x(){if(!(y.value||V.value!==null)){y.value=!0;try{d(await k("/api/system-settings")),g.value=null}finally{y.value=!1}}}function I(i){!_.has(i)||y.value||V.value!==null||g.value!==null||(c.value={...w.value},g.value=i)}function K(i){g.value!==i||V.value!==null||(c.value={...w.value},g.value=null)}function N(i,n){if(i.type==="json"){if(typeof n!="string"||n.length>4096)return!1;try{const v=JSON.parse(n);return v!==null&&typeof v=="object"&&!Array.isArray(v)}catch{return!1}}if(i.type==="origin"){if(n==="")return!0;if(typeof n!="string"||n.length>253)return!1;try{const v=new URL(n);return v.origin===n&&(v.protocol==="https:"||v.protocol==="http:")}catch{return!1}}return i.type==="boolean"?typeof n=="boolean":typeof n=="number"&&Number.isFinite(n)&&n>=i.min&&n<=i.max}function O(i,n){const v=_.get(i);v===void 0||g.value!==i||V.value!==null||!(v.type==="origin"||v.type==="json"?typeof n=="string"&&n.length<=(v.type==="json"?4096:253):N(v,n))||(c.value[v.field]=n)}async function F(i){const n=_.get(i);if(n===void 0||g.value!==i||V.value!==null||y.value)return!1;const v=c.value[n.field];if(!N(n,v))return!1;V.value=i;try{return d(await k(`/api/system-settings/${encodeURIComponent(i)}`,{method:"PATCH",body:JSON.stringify({[n.payloadField]:v})})),g.value=null,!0}finally{V.value=null}}return{settings:u,snapshot:w,drafts:c,editingKey:g,savingKey:V,loading:y,load:x,beginEdit:I,cancelEdit:K,validValue:N,setDraft:O,save:F}}function Te(k){const M=C([]),u=C(!1),_=C(!1);async function w(){if(!u.value){u.value=!0;try{M.value=await k("/api/mail/templates")}finally{u.value=!1}}}async function c(V,y){return k("/api/mail/templates/preview",{method:"POST",body:JSON.stringify({templateId:V.id,message:y})})}async function g(V,y){_.value=!0;try{await k("/api/mail/test",{method:"POST",body:JSON.stringify({email:V,templateId:y})})}finally{_.value=!1}}return{templates:M,loading:u,busy:_,load:w,preview:c,test:g}}const Se={class:"template-viewer"},Me={class:"template-description"},Ue={key:0,class:"template-layout"},xe=["aria-label"],Ee=["aria-pressed","onClick"],$e={class:"template-choice__meta"},De={class:"template-choice__name"},Ie={class:"template-choice__subject"},Ke={key:0,class:"template-preview"},Ne={class:"template-preview__header"},Oe={class:"template-preview__locale"},Fe=["srcdoc","title"],Be={key:1,class:"template-preview__fallback"},Ae={key:1,class:"template-empty"},je=de({__name:"MailTemplateManagement",props:{request:{type:Function},writable:{type:Boolean}},setup(k){const M=k,u=Te(M.request),_=C(!1),w=C(""),c=z(()=>u.templates.value.find(b=>b.id===w.value)),g=C(),V=C(!1);let y=0;const d=C(!1),x=C(),I=C(""),K=C(""),N=z(()=>u.templates.value.filter(b=>b.kind==="TEST")),O=z(()=>({email:I.value,templateId:K.value})),F={email:[{required:!0,pattern:/^[^\s@]+@[^\s@]+\.[^\s@]+$/u,message:a("generated.systemConfigurationPage.mailAddressInvalid"),trigger:"blur"}],templateId:[{required:!0,trigger:"change"}]};function i(b){return b instanceof Error?G(b):a("generated.systemConfigurationPage.mailOperationFailed")}async function n(){_.value=!0,y+=1,w.value="",g.value=void 0;try{await u.load(),w.value=u.templates.value[0]?.id??"",w.value!==""&&await q()}catch(b){A(i(b),"error",b)}}function v(b){w.value=b.id,g.value=void 0,q()}async function q(){const b=c.value;if(b===void 0||!_.value)return;const h=++y;V.value=!0;try{const m=await u.preview(b,a("generated.systemConfigurationPage.mailPreviewMessage"));_.value&&h===y&&w.value===b.id&&(g.value=m)}catch(m){h===y&&A(i(m),"error",m)}finally{h===y&&(V.value=!1)}}function J(){I.value="",K.value=(c.value?.kind==="TEST"?c.value.id:N.value[0]?.id)??"",d.value=!0}async function L(){if(M.writable)try{await x.value?.validate(),await u.test(I.value,K.value),d.value=!1,A(a("generated.systemConfigurationPage.mailTestAccepted"),"success")}catch(b){b instanceof Error&&A(i(b),"error",b)}}return(b,h)=>(f(),T(Z,null,[o(e(U),{icon:e($)("mail"),onClick:n},{default:r(()=>[S(p(e(a)("generated.systemConfigurationPage.mailTemplateView")),1)]),_:1},8,["icon"]),_.value?(f(),D(e(W),{key:0,onVnodeMounted:e(te),onVnodeBeforeUnmount:e(ae),modelValue:_.value,"onUpdate:modelValue":h[1]||(h[1]=m=>_.value=m),"append-to-body":"",title:e(a)("generated.systemConfigurationPage.mailTemplates"),width:"min(780px, calc(100vw - 32px))"},{footer:r(()=>[o(e(U),{disabled:!k.writable||N.value.length===0||e(u).busy.value,onClick:J},{default:r(()=>[S(p(e(a)("generated.systemConfigurationPage.mailTest")),1)]),_:1},8,["disabled"]),o(e(U),{onClick:h[0]||(h[0]=m=>_.value=!1)},{default:r(()=>[S(p(e(a)("common.close")),1)]),_:1})]),default:r(()=>[Q((f(),T("div",Se,[P("p",Me,p(e(a)("generated.systemConfigurationPage.mailTemplateBuiltIn")),1),e(u).templates.value.length>0?(f(),T("div",Ue,[P("div",{class:"template-choices",role:"group","aria-label":e(a)("generated.systemConfigurationPage.mailTemplates")},[(f(!0),T(Z,null,ie(e(u).templates.value,m=>(f(),T("button",{key:m.id,type:"button",class:fe(["template-choice",{"is-selected":w.value===m.id}]),"aria-pressed":w.value===m.id,onClick:le=>v(m)},[P("span",$e,[S(p(e(a)(m.kind==="TEST"?"generated.systemConfigurationPage.mailKindTest":"generated.systemConfigurationPage.mailKindNotification"))+" ",1),h[6]||(h[6]=P("span",{"aria-hidden":"true"},"·",-1)),S(" "+p(m.locale),1)]),P("span",De,p(m.name),1),P("span",Ie,p(m.subject),1)],10,Ee))),128))],8,xe),c.value?Q((f(),T("div",Ke,[P("div",Ne,[P("span",null,p(e(a)("generated.systemConfigurationPage.mailPreviewSample")),1),P("span",Oe,p(c.value.locale),1)]),g.value?.html?(f(),T("iframe",{key:0,class:"template-preview__document",srcdoc:g.value.html,sandbox:"",referrerpolicy:"no-referrer",title:e(a)("generated.systemConfigurationPage.mailPreviewSample")},null,8,Fe)):(f(),T("div",Be,[P("span",null,p(e(a)("generated.systemConfigurationPage.mailSubject")),1),P("strong",null,p(g.value?.subject??c.value.subject),1),P("span",null,p(e(a)("generated.systemConfigurationPage.mailBody")),1),P("p",null,p(g.value?.text??c.value.body),1)]))])),[[e(X),V.value,"region"]]):R("",!0)])):e(u).loading.value?R("",!0):(f(),T("p",Ae,p(e(a)("generated.systemConfigurationPage.mailTemplateEmpty")),1))])),[[e(X),e(u).loading.value,"region"]])]),_:1},8,["onVnodeMounted","onVnodeBeforeUnmount","modelValue","title"])):R("",!0),d.value?(f(),D(e(W),{key:1,onVnodeMounted:e(te),onVnodeBeforeUnmount:e(ae),modelValue:d.value,"onUpdate:modelValue":h[5]||(h[5]=m=>d.value=m),"append-to-body":"",title:e(a)("generated.systemConfigurationPage.mailTest"),width:"min(480px, calc(100vw - 32px))"},{footer:r(()=>[o(e(U),{onClick:h[4]||(h[4]=m=>d.value=!1)},{default:r(()=>[S(p(e(a)("common.cancel")),1)]),_:1}),o(e(U),{type:"primary",loading:e(u).busy.value,onClick:L},{default:r(()=>[S(p(e(a)("generated.systemConfigurationPage.mailTestSend")),1)]),_:1},8,["loading"])]),default:r(()=>[o(e(Y),{ref_key:"testForm",ref:x,model:O.value,rules:F,"label-position":"top"},{default:r(()=>[o(e(E),{label:e(a)("generated.systemConfigurationPage.mailAddress"),prop:"email"},{default:r(()=>[o(e(j),{modelValue:I.value,"onUpdate:modelValue":h[2]||(h[2]=m=>I.value=m),type:"email"},null,8,["modelValue"])]),_:1},8,["label"]),o(e(E),{label:e(a)("generated.systemConfigurationPage.mailTemplate"),prop:"templateId"},{default:r(()=>[o(e(ge),{modelValue:K.value,"onUpdate:modelValue":h[3]||(h[3]=m=>K.value=m),class:"template-test-select","clear-icon":e($)("clear-input"),"suffix-icon":e($)("chevron-down")},{default:r(()=>[(f(!0),T(Z,null,ie(N.value,m=>(f(),D(e(ee),{key:m.id,value:m.id,label:m.name},null,8,["value","label"]))),128))]),_:1},8,["modelValue","clear-icon","suffix-icon"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["onVnodeMounted","onVnodeBeforeUnmount","modelValue","title"])):R("",!0)],64))}}),Re=me(je,[["__scopeId","data-v-f6468a3d"]]),qe={class:"mar-management-page"},Le={class:"mar-table-actions"},ze={key:1},Je={key:3},He={key:4},Ze={class:"smtp-toggle"},Ge={class:"smtp-form__pair"},We={class:"smtp-template-row"},Qe={class:"smtp-dialog-hint"},Xe={class:"smtp-dialog-footer"},Ye=de({__name:"SystemConfigurationPage",props:{request:{type:Function},writable:{type:Boolean},settings:{}},setup(k){const M=k,u=ke(M.request,M.settings),_=C(),w=C(),c=C(""),g=C(!1),V=u.settings.find(s=>s.key==="mail-smtp"),y=C(!1),d=ve({host:"",port:587,tls:"STARTTLS",from:"",fromName:"",username:"",password:""});let x="";const I={host:[{required:!0,pattern:/^[A-Za-z0-9](?:[A-Za-z0-9.-]{0,251}[A-Za-z0-9])?$/u,message:a("generated.systemConfigurationPage.smtpHostInvalid"),trigger:"blur"}],port:[{type:"integer",min:1,max:65535,required:!0,message:a("generated.systemConfigurationPage.smtpPortInvalid"),trigger:"change"}],tls:[{required:!0,trigger:"change"}],from:[{required:!0,pattern:/^[^\s@]+@[^\s@]+\.[^\s@]+$/u,message:a("generated.systemConfigurationPage.smtpFromInvalid"),trigger:"blur"}],fromName:[{max:128,pattern:/^[^\r\n]*$/u,message:a("generated.systemConfigurationPage.smtpFromNameInvalid"),trigger:"blur"}],username:[{max:320,pattern:/^[^\r\n]*$/u,message:a("generated.systemConfigurationPage.smtpUsernameInvalid"),trigger:"blur"}],password:[{validator:(s,l,t)=>t(typeof l=="string"&&l.length<=1024&&(d.username===""?l==="":l!==""||d.username===x)?void 0:new Error(a("generated.systemConfigurationPage.smtpPasswordInvalid"))),trigger:"blur"}]},K=u.settings.find(s=>s.key==="html-preview-origin"),N={origin:[{validator:(s,l,t)=>t(u.validValue(K,l)?void 0:new Error(a("generated.systemConfigurationPage.htmlPreviewOriginInvalid"))),trigger:"change"}]},{snapshot:O,drafts:F,editingKey:i,savingKey:n,loading:v,beginEdit:q,cancelEdit:J}=u,L=C(!1),b=z(()=>({origin:F.value.htmlPreviewOrigin})),h=z(()=>u.settings.map(s=>({...s,name:a(s.nameKey),description:a(s.descriptionKey)})));ce(g,s=>{c.value="",s||(d.password="",x="",J("mail-smtp"))});function m(s){const l=F.value[s];return typeof l=="number"?l:void 0}function le(s){const l=F.value[s];return typeof l=="string"?l:""}function pe(){if(!M.writable||(q("mail-smtp"),i.value!=="mail-smtp"))return;const s=JSON.parse(String(O.value.smtpConfiguration));y.value=Object.keys(s).length>0,Object.assign(d,{host:s.host??"",port:s.port??587,tls:s.tls??"STARTTLS",from:s.from??"",fromName:s.fromName??"",username:s.username??"",password:""}),x=s.username??"",g.value=i.value==="mail-smtp"}async function ne(){try{await u.load(),L.value=!0}catch(s){A(s instanceof Error?G(s):a("generated.systemConfigurationPage.unableToLoadSystemConfiguration"),"error",s)}}async function oe(s){if(M.writable){if(c.value="",s==="html-preview-origin")try{await _.value?.validate()}catch{return}if(s==="mail-smtp")if(y.value){try{await w.value?.validate()}catch{return}const l=JSON.stringify({...d});if(!u.validValue(V,l)){c.value=a("generated.systemConfigurationPage.smtpInvalid");return}u.setDraft(s,l)}else{if(O.value.smtpConfiguration!=="{}")try{await be.confirm(a("generated.systemConfigurationPage.smtpDisableConfirmation"),a("generated.systemConfigurationPage.smtpDisableTitle"),{icon:$("warning"),type:"warning",confirmButtonText:a("generated.systemConfigurationPage.smtpDisableTitle"),cancelButtonText:a("common.cancel")})}catch(l){if(l==="cancel"||l==="close")return;A(l instanceof Error?G(l):a("generated.systemConfigurationPage.unableToSaveSystemConfiguration"),"error",l);return}if(!g.value||i.value!==s)return;u.setDraft(s,"{}")}try{await u.save(s)&&(s==="mail-smtp"&&(g.value=!1),A(a("generated.systemConfigurationPage.systemConfigurationSaved"),"success"))}catch(l){A(l instanceof Error?G(l):a("generated.systemConfigurationPage.unableToSaveSystemConfiguration"),"error",l)}}}return ye(()=>{ne()}),(s,l)=>Q((f(),T("section",qe,[P("div",Le,[o(e(U),{icon:e($)("refresh"),loading:e(v)&&L.value,onClick:ne},{default:r(()=>[S(p(e(a)("generated.systemConfigurationPage.refresh")),1)]),_:1},8,["icon","loading"])]),o(e(he),{data:h.value,"row-key":"key"},{default:r(()=>[o(e(H),{prop:"name",label:e(a)("generated.systemConfigurationPage.setting"),"min-width":"180"},null,8,["label"]),o(e(H),{prop:"description",label:e(a)("generated.systemConfigurationPage.description"),"min-width":"320"},null,8,["label"]),o(e(H),{label:e(a)("generated.systemConfigurationPage.value"),"min-width":"180"},{default:r(({row:t})=>[t.type==="number"&&e(i)===t.key?(f(),D(e(re),{key:0,"model-value":m(t.field),placeholder:t.placeholderKey===void 0?void 0:e(a)(t.placeholderKey),min:t.min,max:t.max,disabled:e(n)!==null,"onUpdate:modelValue":B=>e(u).setDraft(t.key,B)},{"decrease-icon":r(()=>[o(se,{name:"subtract"})]),"increase-icon":r(()=>[o(se,{name:"plus"})]),_:1},8,["model-value","placeholder","min","max","disabled","onUpdate:modelValue"])):t.type==="number"?(f(),T("span",ze,p(e(O)[t.field]),1)):t.type==="origin"&&e(i)===t.key?(f(),D(e(Y),{key:2,ref_key:"originForm",ref:_,model:b.value,rules:N},{default:r(()=>[o(e(E),{prop:"origin",class:"origin-setting-form"},{default:r(()=>[o(e(j),{"model-value":le(t.field),placeholder:e(a)(t.placeholderKey),disabled:e(n)!==null,"onUpdate:modelValue":B=>e(u).setDraft(t.key,B)},null,8,["model-value","placeholder","disabled","onUpdate:modelValue"])]),_:2},1024)]),_:2},1032,["model"])):t.type==="origin"?(f(),T("span",Je,p(e(O)[t.field]||e(a)("generated.systemConfigurationPage.htmlPreviewCurrentOrigin")),1)):t.type==="json"?(f(),T("span",He,"-")):(f(),D(e(ue),{key:5,"model-value":e(F)[t.field]===!0,disabled:e(i)!==t.key||!k.writable||e(n)!==null,"onUpdate:modelValue":B=>e(u).setDraft(t.key,B)},null,8,["model-value","disabled","onUpdate:modelValue"]))]),_:1},8,["label"]),o(e(H),{label:e(a)("generated.systemConfigurationPage.actions"),"min-width":"220"},{default:r(({row:t})=>[e(i)!==t.key||t.type==="json"?(f(),D(e(U),{key:0,link:"",icon:e($)("edit"),disabled:!k.writable||e(i)!==null,onClick:B=>t.type==="json"?pe():e(q)(t.key)},{default:r(()=>[S(p(e(a)("generated.systemConfigurationPage.edit")),1)]),_:1},8,["icon","disabled","onClick"])):(f(),T(Z,{key:1},[o(e(U),{link:"",type:"primary",icon:e($)("check"),loading:e(n)===t.key,disabled:!k.writable||e(n)!==null,onClick:B=>oe(t.key)},{default:r(()=>[S(p(e(a)("generated.systemConfigurationPage.save")),1)]),_:1},8,["icon","loading","disabled","onClick"]),o(e(U),{link:"",icon:e($)("close"),disabled:e(n)!==null,onClick:B=>e(J)(t.key)},{default:r(()=>[S(p(e(a)("common.cancel")),1)]),_:1},8,["icon","disabled","onClick"])],64))]),_:1},8,["label"])]),_:1},8,["data"]),g.value?(f(),D(e(W),{key:0,onVnodeMounted:e(te),onVnodeBeforeUnmount:e(ae),modelValue:g.value,"onUpdate:modelValue":l[10]||(l[10]=t=>g.value=t),title:e(a)("generated.systemConfigurationPage.smtp"),width:"min(620px, calc(100vw - 32px))","close-on-click-modal":e(n)===null,"close-on-press-escape":e(n)===null,"show-close":e(n)===null,"append-to-body":""},{footer:r(()=>[P("div",Xe,[o(e(U),{disabled:e(n)!==null,onClick:l[8]||(l[8]=t=>g.value=!1)},{default:r(()=>[S(p(e(a)("common.cancel")),1)]),_:1},8,["disabled"]),o(e(U),{type:"primary",loading:e(n)==="mail-smtp",onClick:l[9]||(l[9]=t=>oe("mail-smtp"))},{default:r(()=>[S(p(e(a)("generated.systemConfigurationPage.save")),1)]),_:1},8,["loading"])])]),default:r(()=>[P("div",Ze,[P("span",null,p(e(a)("generated.systemConfigurationPage.smtpEnable")),1),o(e(ue),{modelValue:y.value,"onUpdate:modelValue":l[0]||(l[0]=t=>y.value=t),disabled:e(n)!==null,"aria-label":e(a)("generated.systemConfigurationPage.smtpEnable")},null,8,["modelValue","disabled","aria-label"])]),y.value?(f(),D(e(Y),{key:0,ref_key:"smtpForm",ref:w,model:d,rules:I,"label-position":"top",class:"smtp-form"},{default:r(()=>[c.value?(f(),D(e(Ce),{key:0,title:c.value,type:"error",closable:!1},null,8,["title"])):R("",!0),o(e(E),{label:e(a)("generated.systemConfigurationPage.smtpHost"),prop:"host"},{default:r(()=>[o(e(j),{modelValue:d.host,"onUpdate:modelValue":l[1]||(l[1]=t=>d.host=t),maxlength:"253",autocomplete:"off",disabled:e(n)!==null},null,8,["modelValue","disabled"])]),_:1},8,["label"]),P("div",Ge,[o(e(E),{label:e(a)("generated.systemConfigurationPage.smtpPort"),prop:"port"},{default:r(()=>[o(e(re),{modelValue:d.port,"onUpdate:modelValue":l[2]||(l[2]=t=>d.port=t),"aria-label":e(a)("generated.systemConfigurationPage.smtpPort"),min:1,max:65535,controls:!1,disabled:e(n)!==null},null,8,["modelValue","aria-label","disabled"])]),_:1},8,["label"]),o(e(E),{label:e(a)("generated.systemConfigurationPage.smtpTls"),prop:"tls"},{default:r(()=>[o(e(ge),{modelValue:d.tls,"onUpdate:modelValue":l[3]||(l[3]=t=>d.tls=t),disabled:e(n)!==null,"clear-icon":e($)("clear-input"),"suffix-icon":e($)("chevron-down")},{default:r(()=>[o(e(ee),{label:"STARTTLS",value:"STARTTLS"}),o(e(ee),{label:"TLS",value:"TLS"})]),_:1},8,["modelValue","disabled","clear-icon","suffix-icon"])]),_:1},8,["label"])]),o(e(E),{label:e(a)("generated.systemConfigurationPage.smtpFrom"),prop:"from"},{default:r(()=>[o(e(j),{modelValue:d.from,"onUpdate:modelValue":l[4]||(l[4]=t=>d.from=t),maxlength:"320",autocomplete:"off",disabled:e(n)!==null},null,8,["modelValue","disabled"])]),_:1},8,["label"]),o(e(E),{label:e(a)("generated.systemConfigurationPage.smtpFromName"),prop:"fromName"},{default:r(()=>[o(e(j),{modelValue:d.fromName,"onUpdate:modelValue":l[5]||(l[5]=t=>d.fromName=t),maxlength:"128",autocomplete:"off",disabled:e(n)!==null},null,8,["modelValue","disabled"])]),_:1},8,["label"]),o(e(E),{label:e(a)("generated.systemConfigurationPage.smtpUsername"),prop:"username"},{default:r(()=>[o(e(j),{modelValue:d.username,"onUpdate:modelValue":l[6]||(l[6]=t=>d.username=t),maxlength:"320",autocomplete:"off",disabled:e(n)!==null},null,8,["modelValue","disabled"])]),_:1},8,["label"]),o(e(E),{label:e(a)("generated.systemConfigurationPage.smtpPassword"),prop:"password"},{default:r(()=>[o(e(j),{modelValue:d.password,"onUpdate:modelValue":l[7]||(l[7]=t=>d.password=t),type:"password",maxlength:"1024",autocomplete:"new-password",placeholder:e(x)===d.username&&e(x)?e(a)("generated.systemConfigurationPage.smtpPasswordKeep"):void 0,disabled:e(n)!==null},null,8,["modelValue","placeholder","disabled"])]),_:1},8,["label"])]),_:1},8,["model"])):R("",!0),P("div",We,[o(Re,{request:k.request,writable:k.writable},null,8,["request","writable"])]),P("p",Qe,p(e(a)("generated.systemConfigurationPage.smtpDialogHint")),1)]),_:1},8,["onVnodeMounted","onVnodeBeforeUnmount","modelValue","title","close-on-click-modal","close-on-press-escape","show-close"])):R("",!0)])),[[e(X),e(v)&&!L.value,"page"]])}}),da=me(Ye,[["__scopeId","data-v-58c8d259"]]);export{da as default};
1
+ import{f as C,m as de,t as a,o as f,n as T,a6 as Z,q as o,D as r,S,Q as p,E as e,F as $,T as U,C as D,V as W,N as Q,P,a7 as ie,a2 as fe,O as X,G as R,R as j,k as z,W as A,_ as me,w as ce,K as ye,a5 as se,l as ve,X as be}from"./index-CXYo0aZg.js";import{M as Ce}from"./MarAlert-Cd9UQ3Nb.js";import{M as re}from"./MarInputNumber-Cj9eIAOI.js";import{_ as H,M as he}from"./MarTableColumn.vue_vue_type_script_setup_true_lang-R6PlEya3.js";import{_ as E,a as Y}from"./MarFormItem.vue_vue_type_script_setup_true_lang-DR9vLmUF.js";import{M as ge,a as ee}from"./MarOptionGroup.vue_vue_type_style_index_0_scoped_0cdd846e_lang-toYIflmN.js";import{M as ue}from"./MarSwitch-CnzyH7nM.js";import{u as ae,m as te}from"./mobile-dialog-return-service-B9Umx6Ja.js";import"./conversation-history-Cfjf31Eh.js";import{e as G}from"./error-presentation-zku4f4Na.js";const Pe={key:"skill-tls",field:"skillTlsVerificationDisabled",payloadField:"verificationDisabled",nameKey:"generated.systemConfigurationPage.disableSkillSourceTLSVerification",descriptionKey:"generated.systemConfigurationPage.keepThisOffByDefaultUseIt",type:"boolean",initialValue:!1},_e={key:"html-preview-origin",field:"htmlPreviewOrigin",payloadField:"origin",nameKey:"generated.systemConfigurationPage.htmlPreviewOrigin",descriptionKey:"generated.systemConfigurationPage.htmlPreviewOriginDescription",placeholderKey:"generated.systemConfigurationPage.htmlPreviewOriginPlaceholder",type:"origin",initialValue:""},we={key:"mail-smtp",field:"smtpConfiguration",payloadField:"config",nameKey:"generated.systemConfigurationPage.smtp",descriptionKey:"generated.systemConfigurationPage.smtpDescription",placeholderKey:"generated.systemConfigurationPage.smtpPlaceholder",type:"json",initialValue:"{}"},Ve={key:"web-push",field:"webPushEnabled",payloadField:"enabled",nameKey:"workbenchNotificationCenter.webPushConfiguration.title",descriptionKey:"workbenchNotificationCenter.webPushConfiguration.description",type:"boolean",initialValue:!1};function ke(k,M=[]){const u=[...M,{key:"mar-agent-resource-input",field:"useResourceUrl",payloadField:"useResourceUrl",nameKey:"marAgentModels.useResourceUrl",descriptionKey:"marAgentModels.globalResourceUrlDescription",type:"boolean",initialValue:!0},we,Ve,_e,Pe],_=new Map(u.map(i=>[i.key,i]));if(_.size!==u.length)throw new Error("WEB_SYSTEM_SETTING_DUPLICATE");const w=C(Object.fromEntries(u.map(i=>[i.field,i.initialValue]))),c=C({...w.value}),g=C(null),V=C(null),y=C(!1);function d(i){w.value=i,c.value={...i}}async function x(){if(!(y.value||V.value!==null)){y.value=!0;try{d(await k("/api/system-settings")),g.value=null}finally{y.value=!1}}}function I(i){!_.has(i)||y.value||V.value!==null||g.value!==null||(c.value={...w.value},g.value=i)}function K(i){g.value!==i||V.value!==null||(c.value={...w.value},g.value=null)}function N(i,n){if(i.type==="json"){if(typeof n!="string"||n.length>4096)return!1;try{const v=JSON.parse(n);return v!==null&&typeof v=="object"&&!Array.isArray(v)}catch{return!1}}if(i.type==="origin"){if(n==="")return!0;if(typeof n!="string"||n.length>253)return!1;try{const v=new URL(n);return v.origin===n&&(v.protocol==="https:"||v.protocol==="http:")}catch{return!1}}return i.type==="boolean"?typeof n=="boolean":typeof n=="number"&&Number.isFinite(n)&&n>=i.min&&n<=i.max}function O(i,n){const v=_.get(i);v===void 0||g.value!==i||V.value!==null||!(v.type==="origin"||v.type==="json"?typeof n=="string"&&n.length<=(v.type==="json"?4096:253):N(v,n))||(c.value[v.field]=n)}async function F(i){const n=_.get(i);if(n===void 0||g.value!==i||V.value!==null||y.value)return!1;const v=c.value[n.field];if(!N(n,v))return!1;V.value=i;try{return d(await k(`/api/system-settings/${encodeURIComponent(i)}`,{method:"PATCH",body:JSON.stringify({[n.payloadField]:v})})),g.value=null,!0}finally{V.value=null}}return{settings:u,snapshot:w,drafts:c,editingKey:g,savingKey:V,loading:y,load:x,beginEdit:I,cancelEdit:K,validValue:N,setDraft:O,save:F}}function Te(k){const M=C([]),u=C(!1),_=C(!1);async function w(){if(!u.value){u.value=!0;try{M.value=await k("/api/mail/templates")}finally{u.value=!1}}}async function c(V,y){return k("/api/mail/templates/preview",{method:"POST",body:JSON.stringify({templateId:V.id,message:y})})}async function g(V,y){_.value=!0;try{await k("/api/mail/test",{method:"POST",body:JSON.stringify({email:V,templateId:y})})}finally{_.value=!1}}return{templates:M,loading:u,busy:_,load:w,preview:c,test:g}}const Se={class:"template-viewer"},Me={class:"template-description"},Ue={key:0,class:"template-layout"},xe=["aria-label"],Ee=["aria-pressed","onClick"],$e={class:"template-choice__meta"},De={class:"template-choice__name"},Ie={class:"template-choice__subject"},Ke={key:0,class:"template-preview"},Ne={class:"template-preview__header"},Oe={class:"template-preview__locale"},Fe=["srcdoc","title"],Be={key:1,class:"template-preview__fallback"},Ae={key:1,class:"template-empty"},je=de({__name:"MailTemplateManagement",props:{request:{type:Function},writable:{type:Boolean}},setup(k){const M=k,u=Te(M.request),_=C(!1),w=C(""),c=z(()=>u.templates.value.find(b=>b.id===w.value)),g=C(),V=C(!1);let y=0;const d=C(!1),x=C(),I=C(""),K=C(""),N=z(()=>u.templates.value.filter(b=>b.kind==="TEST")),O=z(()=>({email:I.value,templateId:K.value})),F={email:[{required:!0,pattern:/^[^\s@]+@[^\s@]+\.[^\s@]+$/u,message:a("generated.systemConfigurationPage.mailAddressInvalid"),trigger:"blur"}],templateId:[{required:!0,trigger:"change"}]};function i(b){return b instanceof Error?G(b):a("generated.systemConfigurationPage.mailOperationFailed")}async function n(){_.value=!0,y+=1,w.value="",g.value=void 0;try{await u.load(),w.value=u.templates.value[0]?.id??"",w.value!==""&&await q()}catch(b){A(i(b),"error",b)}}function v(b){w.value=b.id,g.value=void 0,q()}async function q(){const b=c.value;if(b===void 0||!_.value)return;const h=++y;V.value=!0;try{const m=await u.preview(b,a("generated.systemConfigurationPage.mailPreviewMessage"));_.value&&h===y&&w.value===b.id&&(g.value=m)}catch(m){h===y&&A(i(m),"error",m)}finally{h===y&&(V.value=!1)}}function J(){I.value="",K.value=(c.value?.kind==="TEST"?c.value.id:N.value[0]?.id)??"",d.value=!0}async function L(){if(M.writable)try{await x.value?.validate(),await u.test(I.value,K.value),d.value=!1,A(a("generated.systemConfigurationPage.mailTestAccepted"),"success")}catch(b){b instanceof Error&&A(i(b),"error",b)}}return(b,h)=>(f(),T(Z,null,[o(e(U),{icon:e($)("mail"),onClick:n},{default:r(()=>[S(p(e(a)("generated.systemConfigurationPage.mailTemplateView")),1)]),_:1},8,["icon"]),_.value?(f(),D(e(W),{key:0,onVnodeMounted:e(te),onVnodeBeforeUnmount:e(ae),modelValue:_.value,"onUpdate:modelValue":h[1]||(h[1]=m=>_.value=m),"append-to-body":"",title:e(a)("generated.systemConfigurationPage.mailTemplates"),width:"min(780px, calc(100vw - 32px))"},{footer:r(()=>[o(e(U),{disabled:!k.writable||N.value.length===0||e(u).busy.value,onClick:J},{default:r(()=>[S(p(e(a)("generated.systemConfigurationPage.mailTest")),1)]),_:1},8,["disabled"]),o(e(U),{onClick:h[0]||(h[0]=m=>_.value=!1)},{default:r(()=>[S(p(e(a)("common.close")),1)]),_:1})]),default:r(()=>[Q((f(),T("div",Se,[P("p",Me,p(e(a)("generated.systemConfigurationPage.mailTemplateBuiltIn")),1),e(u).templates.value.length>0?(f(),T("div",Ue,[P("div",{class:"template-choices",role:"group","aria-label":e(a)("generated.systemConfigurationPage.mailTemplates")},[(f(!0),T(Z,null,ie(e(u).templates.value,m=>(f(),T("button",{key:m.id,type:"button",class:fe(["template-choice",{"is-selected":w.value===m.id}]),"aria-pressed":w.value===m.id,onClick:le=>v(m)},[P("span",$e,[S(p(e(a)(m.kind==="TEST"?"generated.systemConfigurationPage.mailKindTest":"generated.systemConfigurationPage.mailKindNotification"))+" ",1),h[6]||(h[6]=P("span",{"aria-hidden":"true"},"·",-1)),S(" "+p(m.locale),1)]),P("span",De,p(m.name),1),P("span",Ie,p(m.subject),1)],10,Ee))),128))],8,xe),c.value?Q((f(),T("div",Ke,[P("div",Ne,[P("span",null,p(e(a)("generated.systemConfigurationPage.mailPreviewSample")),1),P("span",Oe,p(c.value.locale),1)]),g.value?.html?(f(),T("iframe",{key:0,class:"template-preview__document",srcdoc:g.value.html,sandbox:"",referrerpolicy:"no-referrer",title:e(a)("generated.systemConfigurationPage.mailPreviewSample")},null,8,Fe)):(f(),T("div",Be,[P("span",null,p(e(a)("generated.systemConfigurationPage.mailSubject")),1),P("strong",null,p(g.value?.subject??c.value.subject),1),P("span",null,p(e(a)("generated.systemConfigurationPage.mailBody")),1),P("p",null,p(g.value?.text??c.value.body),1)]))])),[[e(X),V.value,"region"]]):R("",!0)])):e(u).loading.value?R("",!0):(f(),T("p",Ae,p(e(a)("generated.systemConfigurationPage.mailTemplateEmpty")),1))])),[[e(X),e(u).loading.value,"region"]])]),_:1},8,["onVnodeMounted","onVnodeBeforeUnmount","modelValue","title"])):R("",!0),d.value?(f(),D(e(W),{key:1,onVnodeMounted:e(te),onVnodeBeforeUnmount:e(ae),modelValue:d.value,"onUpdate:modelValue":h[5]||(h[5]=m=>d.value=m),"append-to-body":"",title:e(a)("generated.systemConfigurationPage.mailTest"),width:"min(480px, calc(100vw - 32px))"},{footer:r(()=>[o(e(U),{onClick:h[4]||(h[4]=m=>d.value=!1)},{default:r(()=>[S(p(e(a)("common.cancel")),1)]),_:1}),o(e(U),{type:"primary",loading:e(u).busy.value,onClick:L},{default:r(()=>[S(p(e(a)("generated.systemConfigurationPage.mailTestSend")),1)]),_:1},8,["loading"])]),default:r(()=>[o(e(Y),{ref_key:"testForm",ref:x,model:O.value,rules:F,"label-position":"top"},{default:r(()=>[o(e(E),{label:e(a)("generated.systemConfigurationPage.mailAddress"),prop:"email"},{default:r(()=>[o(e(j),{modelValue:I.value,"onUpdate:modelValue":h[2]||(h[2]=m=>I.value=m),type:"email"},null,8,["modelValue"])]),_:1},8,["label"]),o(e(E),{label:e(a)("generated.systemConfigurationPage.mailTemplate"),prop:"templateId"},{default:r(()=>[o(e(ge),{modelValue:K.value,"onUpdate:modelValue":h[3]||(h[3]=m=>K.value=m),class:"template-test-select","clear-icon":e($)("clear-input"),"suffix-icon":e($)("chevron-down")},{default:r(()=>[(f(!0),T(Z,null,ie(N.value,m=>(f(),D(e(ee),{key:m.id,value:m.id,label:m.name},null,8,["value","label"]))),128))]),_:1},8,["modelValue","clear-icon","suffix-icon"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["onVnodeMounted","onVnodeBeforeUnmount","modelValue","title"])):R("",!0)],64))}}),Re=me(je,[["__scopeId","data-v-f6468a3d"]]),qe={class:"mar-management-page"},Le={class:"mar-table-actions"},ze={key:1},Je={key:3},He={key:4},Ze={class:"smtp-toggle"},Ge={class:"smtp-form__pair"},We={class:"smtp-template-row"},Qe={class:"smtp-dialog-hint"},Xe={class:"smtp-dialog-footer"},Ye=de({__name:"SystemConfigurationPage",props:{request:{type:Function},writable:{type:Boolean},settings:{}},setup(k){const M=k,u=ke(M.request,M.settings),_=C(),w=C(),c=C(""),g=C(!1),V=u.settings.find(s=>s.key==="mail-smtp"),y=C(!1),d=ve({host:"",port:587,tls:"STARTTLS",from:"",fromName:"",username:"",password:""});let x="";const I={host:[{required:!0,pattern:/^[A-Za-z0-9](?:[A-Za-z0-9.-]{0,251}[A-Za-z0-9])?$/u,message:a("generated.systemConfigurationPage.smtpHostInvalid"),trigger:"blur"}],port:[{type:"integer",min:1,max:65535,required:!0,message:a("generated.systemConfigurationPage.smtpPortInvalid"),trigger:"change"}],tls:[{required:!0,trigger:"change"}],from:[{required:!0,pattern:/^[^\s@]+@[^\s@]+\.[^\s@]+$/u,message:a("generated.systemConfigurationPage.smtpFromInvalid"),trigger:"blur"}],fromName:[{max:128,pattern:/^[^\r\n]*$/u,message:a("generated.systemConfigurationPage.smtpFromNameInvalid"),trigger:"blur"}],username:[{max:320,pattern:/^[^\r\n]*$/u,message:a("generated.systemConfigurationPage.smtpUsernameInvalid"),trigger:"blur"}],password:[{validator:(s,l,t)=>t(typeof l=="string"&&l.length<=1024&&(d.username===""?l==="":l!==""||d.username===x)?void 0:new Error(a("generated.systemConfigurationPage.smtpPasswordInvalid"))),trigger:"blur"}]},K=u.settings.find(s=>s.key==="html-preview-origin"),N={origin:[{validator:(s,l,t)=>t(u.validValue(K,l)?void 0:new Error(a("generated.systemConfigurationPage.htmlPreviewOriginInvalid"))),trigger:"change"}]},{snapshot:O,drafts:F,editingKey:i,savingKey:n,loading:v,beginEdit:q,cancelEdit:J}=u,L=C(!1),b=z(()=>({origin:F.value.htmlPreviewOrigin})),h=z(()=>u.settings.map(s=>({...s,name:a(s.nameKey),description:a(s.descriptionKey)})));ce(g,s=>{c.value="",s||(d.password="",x="",J("mail-smtp"))});function m(s){const l=F.value[s];return typeof l=="number"?l:void 0}function le(s){const l=F.value[s];return typeof l=="string"?l:""}function pe(){if(!M.writable||(q("mail-smtp"),i.value!=="mail-smtp"))return;const s=JSON.parse(String(O.value.smtpConfiguration));y.value=Object.keys(s).length>0,Object.assign(d,{host:s.host??"",port:s.port??587,tls:s.tls??"STARTTLS",from:s.from??"",fromName:s.fromName??"",username:s.username??"",password:""}),x=s.username??"",g.value=i.value==="mail-smtp"}async function ne(){try{await u.load(),L.value=!0}catch(s){A(s instanceof Error?G(s):a("generated.systemConfigurationPage.unableToLoadSystemConfiguration"),"error",s)}}async function oe(s){if(M.writable){if(c.value="",s==="html-preview-origin")try{await _.value?.validate()}catch{return}if(s==="mail-smtp")if(y.value){try{await w.value?.validate()}catch{return}const l=JSON.stringify({...d});if(!u.validValue(V,l)){c.value=a("generated.systemConfigurationPage.smtpInvalid");return}u.setDraft(s,l)}else{if(O.value.smtpConfiguration!=="{}")try{await be.confirm(a("generated.systemConfigurationPage.smtpDisableConfirmation"),a("generated.systemConfigurationPage.smtpDisableTitle"),{icon:$("warning"),type:"warning",confirmButtonText:a("generated.systemConfigurationPage.smtpDisableTitle"),cancelButtonText:a("common.cancel")})}catch(l){if(l==="cancel"||l==="close")return;A(l instanceof Error?G(l):a("generated.systemConfigurationPage.unableToSaveSystemConfiguration"),"error",l);return}if(!g.value||i.value!==s)return;u.setDraft(s,"{}")}try{await u.save(s)&&(s==="mail-smtp"&&(g.value=!1),A(a("generated.systemConfigurationPage.systemConfigurationSaved"),"success"))}catch(l){A(l instanceof Error?G(l):a("generated.systemConfigurationPage.unableToSaveSystemConfiguration"),"error",l)}}}return ye(()=>{ne()}),(s,l)=>Q((f(),T("section",qe,[P("div",Le,[o(e(U),{icon:e($)("refresh"),loading:e(v)&&L.value,onClick:ne},{default:r(()=>[S(p(e(a)("generated.systemConfigurationPage.refresh")),1)]),_:1},8,["icon","loading"])]),o(e(he),{data:h.value,"row-key":"key"},{default:r(()=>[o(e(H),{prop:"name",label:e(a)("generated.systemConfigurationPage.setting"),"min-width":"180"},null,8,["label"]),o(e(H),{prop:"description",label:e(a)("generated.systemConfigurationPage.description"),"min-width":"320"},null,8,["label"]),o(e(H),{label:e(a)("generated.systemConfigurationPage.value"),"min-width":"180"},{default:r(({row:t})=>[t.type==="number"&&e(i)===t.key?(f(),D(e(re),{key:0,"model-value":m(t.field),placeholder:t.placeholderKey===void 0?void 0:e(a)(t.placeholderKey),min:t.min,max:t.max,disabled:e(n)!==null,"onUpdate:modelValue":B=>e(u).setDraft(t.key,B)},{"decrease-icon":r(()=>[o(se,{name:"subtract"})]),"increase-icon":r(()=>[o(se,{name:"plus"})]),_:1},8,["model-value","placeholder","min","max","disabled","onUpdate:modelValue"])):t.type==="number"?(f(),T("span",ze,p(e(O)[t.field]),1)):t.type==="origin"&&e(i)===t.key?(f(),D(e(Y),{key:2,ref_key:"originForm",ref:_,model:b.value,rules:N},{default:r(()=>[o(e(E),{prop:"origin",class:"origin-setting-form"},{default:r(()=>[o(e(j),{"model-value":le(t.field),placeholder:e(a)(t.placeholderKey),disabled:e(n)!==null,"onUpdate:modelValue":B=>e(u).setDraft(t.key,B)},null,8,["model-value","placeholder","disabled","onUpdate:modelValue"])]),_:2},1024)]),_:2},1032,["model"])):t.type==="origin"?(f(),T("span",Je,p(e(O)[t.field]||e(a)("generated.systemConfigurationPage.htmlPreviewCurrentOrigin")),1)):t.type==="json"?(f(),T("span",He,"-")):(f(),D(e(ue),{key:5,"model-value":e(F)[t.field]===!0,disabled:e(i)!==t.key||!k.writable||e(n)!==null,"onUpdate:modelValue":B=>e(u).setDraft(t.key,B)},null,8,["model-value","disabled","onUpdate:modelValue"]))]),_:1},8,["label"]),o(e(H),{label:e(a)("generated.systemConfigurationPage.actions"),"min-width":"220"},{default:r(({row:t})=>[e(i)!==t.key||t.type==="json"?(f(),D(e(U),{key:0,link:"",icon:e($)("edit"),disabled:!k.writable||e(i)!==null,onClick:B=>t.type==="json"?pe():e(q)(t.key)},{default:r(()=>[S(p(e(a)("generated.systemConfigurationPage.edit")),1)]),_:1},8,["icon","disabled","onClick"])):(f(),T(Z,{key:1},[o(e(U),{link:"",type:"primary",icon:e($)("check"),loading:e(n)===t.key,disabled:!k.writable||e(n)!==null,onClick:B=>oe(t.key)},{default:r(()=>[S(p(e(a)("generated.systemConfigurationPage.save")),1)]),_:1},8,["icon","loading","disabled","onClick"]),o(e(U),{link:"",icon:e($)("close"),disabled:e(n)!==null,onClick:B=>e(J)(t.key)},{default:r(()=>[S(p(e(a)("common.cancel")),1)]),_:1},8,["icon","disabled","onClick"])],64))]),_:1},8,["label"])]),_:1},8,["data"]),g.value?(f(),D(e(W),{key:0,onVnodeMounted:e(te),onVnodeBeforeUnmount:e(ae),modelValue:g.value,"onUpdate:modelValue":l[10]||(l[10]=t=>g.value=t),title:e(a)("generated.systemConfigurationPage.smtp"),width:"min(620px, calc(100vw - 32px))","close-on-click-modal":e(n)===null,"close-on-press-escape":e(n)===null,"show-close":e(n)===null,"append-to-body":""},{footer:r(()=>[P("div",Xe,[o(e(U),{disabled:e(n)!==null,onClick:l[8]||(l[8]=t=>g.value=!1)},{default:r(()=>[S(p(e(a)("common.cancel")),1)]),_:1},8,["disabled"]),o(e(U),{type:"primary",loading:e(n)==="mail-smtp",onClick:l[9]||(l[9]=t=>oe("mail-smtp"))},{default:r(()=>[S(p(e(a)("generated.systemConfigurationPage.save")),1)]),_:1},8,["loading"])])]),default:r(()=>[P("div",Ze,[P("span",null,p(e(a)("generated.systemConfigurationPage.smtpEnable")),1),o(e(ue),{modelValue:y.value,"onUpdate:modelValue":l[0]||(l[0]=t=>y.value=t),disabled:e(n)!==null,"aria-label":e(a)("generated.systemConfigurationPage.smtpEnable")},null,8,["modelValue","disabled","aria-label"])]),y.value?(f(),D(e(Y),{key:0,ref_key:"smtpForm",ref:w,model:d,rules:I,"label-position":"top",class:"smtp-form"},{default:r(()=>[c.value?(f(),D(e(Ce),{key:0,title:c.value,type:"error",closable:!1},null,8,["title"])):R("",!0),o(e(E),{label:e(a)("generated.systemConfigurationPage.smtpHost"),prop:"host"},{default:r(()=>[o(e(j),{modelValue:d.host,"onUpdate:modelValue":l[1]||(l[1]=t=>d.host=t),maxlength:"253",autocomplete:"off",disabled:e(n)!==null},null,8,["modelValue","disabled"])]),_:1},8,["label"]),P("div",Ge,[o(e(E),{label:e(a)("generated.systemConfigurationPage.smtpPort"),prop:"port"},{default:r(()=>[o(e(re),{modelValue:d.port,"onUpdate:modelValue":l[2]||(l[2]=t=>d.port=t),"aria-label":e(a)("generated.systemConfigurationPage.smtpPort"),min:1,max:65535,controls:!1,disabled:e(n)!==null},null,8,["modelValue","aria-label","disabled"])]),_:1},8,["label"]),o(e(E),{label:e(a)("generated.systemConfigurationPage.smtpTls"),prop:"tls"},{default:r(()=>[o(e(ge),{modelValue:d.tls,"onUpdate:modelValue":l[3]||(l[3]=t=>d.tls=t),disabled:e(n)!==null,"clear-icon":e($)("clear-input"),"suffix-icon":e($)("chevron-down")},{default:r(()=>[o(e(ee),{label:"STARTTLS",value:"STARTTLS"}),o(e(ee),{label:"TLS",value:"TLS"})]),_:1},8,["modelValue","disabled","clear-icon","suffix-icon"])]),_:1},8,["label"])]),o(e(E),{label:e(a)("generated.systemConfigurationPage.smtpFrom"),prop:"from"},{default:r(()=>[o(e(j),{modelValue:d.from,"onUpdate:modelValue":l[4]||(l[4]=t=>d.from=t),maxlength:"320",autocomplete:"off",disabled:e(n)!==null},null,8,["modelValue","disabled"])]),_:1},8,["label"]),o(e(E),{label:e(a)("generated.systemConfigurationPage.smtpFromName"),prop:"fromName"},{default:r(()=>[o(e(j),{modelValue:d.fromName,"onUpdate:modelValue":l[5]||(l[5]=t=>d.fromName=t),maxlength:"128",autocomplete:"off",disabled:e(n)!==null},null,8,["modelValue","disabled"])]),_:1},8,["label"]),o(e(E),{label:e(a)("generated.systemConfigurationPage.smtpUsername"),prop:"username"},{default:r(()=>[o(e(j),{modelValue:d.username,"onUpdate:modelValue":l[6]||(l[6]=t=>d.username=t),maxlength:"320",autocomplete:"off",disabled:e(n)!==null},null,8,["modelValue","disabled"])]),_:1},8,["label"]),o(e(E),{label:e(a)("generated.systemConfigurationPage.smtpPassword"),prop:"password"},{default:r(()=>[o(e(j),{modelValue:d.password,"onUpdate:modelValue":l[7]||(l[7]=t=>d.password=t),type:"password",maxlength:"1024",autocomplete:"new-password",placeholder:e(x)===d.username&&e(x)?e(a)("generated.systemConfigurationPage.smtpPasswordKeep"):void 0,disabled:e(n)!==null},null,8,["modelValue","placeholder","disabled"])]),_:1},8,["label"])]),_:1},8,["model"])):R("",!0),P("div",We,[o(Re,{request:k.request,writable:k.writable},null,8,["request","writable"])]),P("p",Qe,p(e(a)("generated.systemConfigurationPage.smtpDialogHint")),1)]),_:1},8,["onVnodeMounted","onVnodeBeforeUnmount","modelValue","title","close-on-click-modal","close-on-press-escape","show-close"])):R("",!0)])),[[e(X),e(v)&&!L.value,"page"]])}}),da=me(Ye,[["__scopeId","data-v-58c8d259"]]);export{da as default};
@@ -1 +1 @@
1
- import i from"./SystemConfigurationPage-ChSNj8MT.js";import{m as r,o as n,C as o}from"./index-BFbW15q7.js";import"./MarAlert-Dsrb10N-.js";import"./MarInputNumber-CcpviHTx.js";import"./MarTableColumn.vue_vue_type_script_setup_true_lang-9WwypTkY.js";import"./MarFormItem.vue_vue_type_script_setup_true_lang-DNgXEgAb.js";import"./MarOptionGroup.vue_vue_type_style_index_0_scoped_cacd24eb_lang-BQD1pghB.js";import"./MarSwitch-Nht5u3dc.js";import"./mobile-dialog-return-service-C1n1IVHV.js";import"./conversation-history-CWG_l_s7.js";import"./error-presentation-UGQTkLY-.js";const P=r({__name:"SystemConfigurationPage",props:{request:{type:Function},writable:{type:Boolean}},setup(e){const t=[{key:"audit-retention",field:"auditRetentionDays",payloadField:"days",initialValue:180,nameKey:"generated.systemConfigurationPage.auditRetentionDays",descriptionKey:"generated.systemConfigurationPage.theServerRemovesExpiredEventsInBatches",type:"number",min:1,max:3650,placeholderKey:"generated.systemConfigurationPage.enterRetentionDays"}];return(a,s)=>(n(),o(i,{request:e.request,writable:e.writable,settings:t},null,8,["request","writable"]))}});export{P as default};
1
+ import i from"./SystemConfigurationPage-BVl0Q1mw.js";import{m as r,o as n,C as o}from"./index-CXYo0aZg.js";import"./MarAlert-Cd9UQ3Nb.js";import"./MarInputNumber-Cj9eIAOI.js";import"./MarTableColumn.vue_vue_type_script_setup_true_lang-R6PlEya3.js";import"./MarFormItem.vue_vue_type_script_setup_true_lang-DR9vLmUF.js";import"./MarOptionGroup.vue_vue_type_style_index_0_scoped_0cdd846e_lang-toYIflmN.js";import"./MarSwitch-CnzyH7nM.js";import"./mobile-dialog-return-service-B9Umx6Ja.js";import"./conversation-history-Cfjf31Eh.js";import"./error-presentation-zku4f4Na.js";const P=r({__name:"SystemConfigurationPage",props:{request:{type:Function},writable:{type:Boolean}},setup(e){const t=[{key:"audit-retention",field:"auditRetentionDays",payloadField:"days",initialValue:180,nameKey:"generated.systemConfigurationPage.auditRetentionDays",descriptionKey:"generated.systemConfigurationPage.theServerRemovesExpiredEventsInBatches",type:"number",min:1,max:3650,placeholderKey:"generated.systemConfigurationPage.enterRetentionDays"}];return(a,s)=>(n(),o(i,{request:e.request,writable:e.writable,settings:t},null,8,["request","writable"]))}});export{P as default};
@@ -1 +1 @@
1
- import{M as a}from"./MarTag-CU69nmi0.js";import{m as g,o as c,n as C,P as e,Q as o,E as t,t as s,q as l,D as i,S as d,C as f,a4 as y,G as h,_ as v}from"./index-BFbW15q7.js";const x={class:"system-information"},b=["aria-label"],N=["src"],V=["aria-label"],B=g({__name:"SystemInformationPage",props:{authenticated:{type:Boolean},logoUrl:{},onlineNodeCount:{},nodeCount:{},request:{type:Function},isAdmin:{type:Boolean},serverVersion:{},extension:{}},emits:["extensionChanged"],setup(n,{emit:u}){const m=u;return(S,r)=>(c(),C("section",x,[e("div",{class:"system-brand","aria-label":t(s)("generated.settingsContent.myAgentRoamVersion")},[e("img",{src:n.logoUrl,alt:""},null,8,N),e("div",null,[e("strong",null,o(t(s)("common.productName")),1),e("code",null,o(n.serverVersion??t(s)("generated.settingsContent.unknown")),1)])],8,b),e("section",{class:"system-status","aria-label":t(s)("generated.settingsContent.systemStatus")},[e("h2",null,o(t(s)("generated.settingsContent.systemStatus2")),1),e("dl",null,[e("div",null,[e("dt",null,o(t(s)("common.webConsole")),1),e("dd",null,[l(t(a),{effect:"light",type:"success"},{default:i(()=>[d(o(t(s)("generated.settingsContent.running")),1)]),_:1})])]),e("div",null,[e("dt",null,o(t(s)("generated.settingsContent.serverConnection")),1),e("dd",null,[l(t(a),{type:n.authenticated?"success":"info",effect:"light"},{default:i(()=>[d(o(n.authenticated?t(s)("generated.settingsContent.connected"):t(s)("generated.settingsContent.disconnected")),1)]),_:1},8,["type"])])]),e("div",null,[e("dt",null,o(t(s)("generated.settingsContent.nodeConnections")),1),e("dd",null,[l(t(a),{type:n.onlineNodeCount>0?"success":"info",effect:"light"},{default:i(()=>[d(o(n.onlineNodeCount)+"/"+o(n.nodeCount),1)]),_:1},8,["type"])])])])],8,V),n.isAdmin&&n.extension?(c(),f(y(n.extension),{key:0,embedded:"",request:n.request,onImported:r[0]||(r[0]=k=>m("extensionChanged"))},null,40,["request"])):h("",!0)]))}}),w=v(B,[["__scopeId","data-v-c554b4ed"]]);export{w as default};
1
+ import{M as a}from"./MarTag-DJs119DS.js";import{m as g,o as c,n as C,P as e,Q as o,E as t,t as s,q as l,D as i,S as d,C as f,a4 as y,G as h,_ as v}from"./index-CXYo0aZg.js";const x={class:"system-information"},b=["aria-label"],N=["src"],V=["aria-label"],B=g({__name:"SystemInformationPage",props:{authenticated:{type:Boolean},logoUrl:{},onlineNodeCount:{},nodeCount:{},request:{type:Function},isAdmin:{type:Boolean},serverVersion:{},extension:{}},emits:["extensionChanged"],setup(n,{emit:u}){const m=u;return(S,r)=>(c(),C("section",x,[e("div",{class:"system-brand","aria-label":t(s)("generated.settingsContent.myAgentRoamVersion")},[e("img",{src:n.logoUrl,alt:""},null,8,N),e("div",null,[e("strong",null,o(t(s)("common.productName")),1),e("code",null,o(n.serverVersion??t(s)("generated.settingsContent.unknown")),1)])],8,b),e("section",{class:"system-status","aria-label":t(s)("generated.settingsContent.systemStatus")},[e("h2",null,o(t(s)("generated.settingsContent.systemStatus2")),1),e("dl",null,[e("div",null,[e("dt",null,o(t(s)("common.webConsole")),1),e("dd",null,[l(t(a),{effect:"light",type:"success"},{default:i(()=>[d(o(t(s)("generated.settingsContent.running")),1)]),_:1})])]),e("div",null,[e("dt",null,o(t(s)("generated.settingsContent.serverConnection")),1),e("dd",null,[l(t(a),{type:n.authenticated?"success":"info",effect:"light"},{default:i(()=>[d(o(n.authenticated?t(s)("generated.settingsContent.connected"):t(s)("generated.settingsContent.disconnected")),1)]),_:1},8,["type"])])]),e("div",null,[e("dt",null,o(t(s)("generated.settingsContent.nodeConnections")),1),e("dd",null,[l(t(a),{type:n.onlineNodeCount>0?"success":"info",effect:"light"},{default:i(()=>[d(o(n.onlineNodeCount)+"/"+o(n.nodeCount),1)]),_:1},8,["type"])])])])],8,V),n.isAdmin&&n.extension?(c(),f(y(n.extension),{key:0,embedded:"",request:n.request,onImported:r[0]||(r[0]=k=>m("extensionChanged"))},null,40,["request"])):h("",!0)]))}}),w=v(B,[["__scopeId","data-v-c554b4ed"]]);export{w as default};
@@ -1,4 +1,4 @@
1
- import{t as ke,m as Mn,aq as Tn,aQ as Pn,K as An,w as On,ab as di,ad as In,N as Nn,aR as Hn,o as ui,n as Ms,P as Wn,E as Be,Q as At,G as Ts,C as zn,D as _t,q as Ot,S as _i,a2 as Fn,f as It,aS as $n,_ as Kn}from"./index-BFbW15q7.js";import{h as Un,j as fi,k as qn}from"./FilePreviewLoading-D6s3o2bu.js";import{o as Vn}from"./HtmlPreviewFrame-fKFJ8kxw.js";import{T as Yn}from"./WorkbenchPage-Dlmd8LuY.js";import"./BusyIndicator-BJHbXq72.js";import"./uuid-BmNSYLtZ.js";import"./MarFormItem.vue_vue_type_script_setup_true_lang-DNgXEgAb.js";import"./MarSwitch-Nht5u3dc.js";import"./mobile-dialog-return-service-C1n1IVHV.js";import"./error-presentation-UGQTkLY-.js";import"./file-presentation-Cm7tx53N.js";import"./time-presentation-D0SLW-7Y.js";import"./conversation-history-CWG_l_s7.js";import"./workbench-presentation-DRF1_KCI.js";import"./AuthEntryPanel-CFtw_f_Y.js";import"./MarCheckboxGroup.vue_vue_type_style_index_0_scoped_3769668f_lang-oSUSoUdm.js";import"./MarCheckboxGroup-CeaJ5pd8.js";/* empty css */import"./MarOptionGroup.vue_vue_type_style_index_0_scoped_cacd24eb_lang-BQD1pghB.js";import"./runner-presentation-hTBi5beq.js";import"./workbench-live-service-CQiYAsuU.js";import"./workspace-direct-transfer-service-H0f55kLn.js";import"./hosted-conversation-template-client-j8BSmb6C.js";import"./oauth-callback-BcjCk3xN.js";import"./MarAlert-Dsrb10N-.js";import"./code-navigation-target-BlnRe0-a.js";import"./MarTag-CU69nmi0.js";import"./mcp-center-service-BxLSeP6x.js";import"./catalog-page-service-C7a95mKM.js";import"./ManagementPagination-B6Pmmb2K.js";import"./MarDatePicker-Bv6kzLiu.js";import"./MarTableColumn.vue_vue_type_script_setup_true_lang-9WwypTkY.js";import"./MarInputNumber-CcpviHTx.js";import"./MarCascader-BKG_pCU9.js";import"./enterprise-management-service-DoxF9G8J.js";import"./NodeDetailsDialogs-CunI5Y3P.js";import"./MarDescriptionsItem-Ddl4rEoo.js";import"./EnvironmentSecretManager-rbFx9YED.js";import"./management-url-service-DZ88REB_.js";var Xn=2,jn=1,Gn=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,i=window.getComputedStyle(this._terminal.element.parentElement),s=parseInt(i.getPropertyValue("height")),r=Math.max(0,parseInt(i.getPropertyValue("width"))),n=window.getComputedStyle(this._terminal.element),o={top:parseInt(n.getPropertyValue("padding-top")),bottom:parseInt(n.getPropertyValue("padding-bottom")),right:parseInt(n.getPropertyValue("padding-right")),left:parseInt(n.getPropertyValue("padding-left"))},l=o.top+o.bottom,h=o.right+o.left,a=s-l,d=r-h-t;return{cols:Math.max(Xn,Math.floor(d/e.css.cell.width)),rows:Math.max(jn,Math.floor(a/e.css.cell.height))}}};var pi=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],Jn=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],Q;function Zn(e,t){let i=0,s=t.length-1,r;if(e<t[0][0]||e>t[s][1])return!1;for(;s>=i;)if(r=i+s>>1,e>t[r][1])i=r+1;else if(e<t[r][0])s=r-1;else return!0;return!1}var Qn=class{constructor(){if(this.version="6",!Q){Q=new Uint8Array(65536),Q.fill(1),Q[0]=0,Q.fill(0,1,32),Q.fill(0,127,160),Q.fill(2,4352,4448),Q[9001]=2,Q[9002]=2,Q.fill(2,11904,42192),Q[12351]=1,Q.fill(2,44032,55204),Q.fill(2,63744,64256),Q.fill(2,65040,65050),Q.fill(2,65072,65136),Q.fill(2,65280,65377),Q.fill(2,65504,65511);for(let t=0;t<pi.length;++t)Q.fill(0,pi[t][0],pi[t][1]+1)}}wcwidth(t){return t<32?0:t<127?1:t<65536?Q[t]:Zn(t,Jn)?0:t>=131072&&t<=196605||t>=196608&&t<=262141?2:1}charProperties(t,i){let s=this.wcwidth(t),r=s===0&&i!==0;if(r){let n=Zt.extractWidth(i);n===0?r=!1:n>s&&(s=n)}return Zt.createPropertyValue(0,s,r)}},eo=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?Ps.isErrorNoTelemetry(t)?new Ps(t.message+`
1
+ import{t as ke,m as Mn,aq as Tn,aQ as Pn,K as An,w as On,ab as di,ad as In,N as Nn,aR as Hn,o as ui,n as Ms,P as Wn,E as Be,Q as At,G as Ts,C as zn,D as _t,q as Ot,S as _i,a2 as Fn,f as It,aS as $n,_ as Kn}from"./index-CXYo0aZg.js";import{h as Un,j as fi,k as qn}from"./FilePreviewLoading-es8YT3AE.js";import{o as Vn}from"./HtmlPreviewFrame-C-UQP5Kx.js";import{T as Yn}from"./WorkbenchPage-CyEI3Yln.js";import"./BusyIndicator-ioUVqyOU.js";import"./uuid-BmNSYLtZ.js";import"./MarFormItem.vue_vue_type_script_setup_true_lang-DR9vLmUF.js";import"./MarSwitch-CnzyH7nM.js";import"./mobile-dialog-return-service-B9Umx6Ja.js";import"./error-presentation-zku4f4Na.js";import"./file-presentation-Cm7tx53N.js";import"./time-presentation-BZYgfA5o.js";import"./conversation-history-Cfjf31Eh.js";import"./workbench-presentation-CV7WEE4p.js";import"./AuthEntryPanel-2RmEvgPK.js";import"./MarCheckboxGroup.vue_vue_type_style_index_0_scoped_3769668f_lang-DkLInv-o.js";import"./MarCheckboxGroup-BeoAUtAX.js";/* empty css */import"./MarOptionGroup.vue_vue_type_style_index_0_scoped_0cdd846e_lang-toYIflmN.js";import"./runner-presentation-C-cTPbeM.js";import"./workbench-live-service-O2xlmfOF.js";import"./workspace-direct-transfer-service-H0f55kLn.js";import"./hosted-conversation-template-client-JIui_x4a.js";import"./oauth-callback-0bvLvnZ5.js";import"./MarAlert-Cd9UQ3Nb.js";import"./code-navigation-target-BlnRe0-a.js";import"./MarTag-DJs119DS.js";import"./mcp-center-service-CzwAD1yH.js";import"./catalog-page-service-DfBXj8UO.js";import"./ManagementPagination-BYt4qkTV.js";import"./MarDatePicker-C4dn1W94.js";import"./MarTableColumn.vue_vue_type_script_setup_true_lang-R6PlEya3.js";import"./MarInputNumber-Cj9eIAOI.js";import"./MarCascader-CkPUKKSU.js";import"./enterprise-management-service-D6TGnQqg.js";import"./NodeDetailsDialogs-D18Hc9Si.js";import"./MarDescriptionsItem-DZlA06Bs.js";import"./EnvironmentSecretManager-TN7goLG1.js";import"./management-url-service-BgjJY2L9.js";var Xn=2,jn=1,Gn=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,i=window.getComputedStyle(this._terminal.element.parentElement),s=parseInt(i.getPropertyValue("height")),r=Math.max(0,parseInt(i.getPropertyValue("width"))),n=window.getComputedStyle(this._terminal.element),o={top:parseInt(n.getPropertyValue("padding-top")),bottom:parseInt(n.getPropertyValue("padding-bottom")),right:parseInt(n.getPropertyValue("padding-right")),left:parseInt(n.getPropertyValue("padding-left"))},l=o.top+o.bottom,h=o.right+o.left,a=s-l,d=r-h-t;return{cols:Math.max(Xn,Math.floor(d/e.css.cell.width)),rows:Math.max(jn,Math.floor(a/e.css.cell.height))}}};var pi=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],Jn=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],Q;function Zn(e,t){let i=0,s=t.length-1,r;if(e<t[0][0]||e>t[s][1])return!1;for(;s>=i;)if(r=i+s>>1,e>t[r][1])i=r+1;else if(e<t[r][0])s=r-1;else return!0;return!1}var Qn=class{constructor(){if(this.version="6",!Q){Q=new Uint8Array(65536),Q.fill(1),Q[0]=0,Q.fill(0,1,32),Q.fill(0,127,160),Q.fill(2,4352,4448),Q[9001]=2,Q[9002]=2,Q.fill(2,11904,42192),Q[12351]=1,Q.fill(2,44032,55204),Q.fill(2,63744,64256),Q.fill(2,65040,65050),Q.fill(2,65072,65136),Q.fill(2,65280,65377),Q.fill(2,65504,65511);for(let t=0;t<pi.length;++t)Q.fill(0,pi[t][0],pi[t][1]+1)}}wcwidth(t){return t<32?0:t<127?1:t<65536?Q[t]:Zn(t,Jn)?0:t>=131072&&t<=196605||t>=196608&&t<=262141?2:1}charProperties(t,i){let s=this.wcwidth(t),r=s===0&&i!==0;if(r){let n=Zt.extractWidth(i);n===0?r=!1:n>s&&(s=n)}return Zt.createPropertyValue(0,s,r)}},eo=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?Ps.isErrorNoTelemetry(t)?new Ps(t.message+`
2
2
 
3
3
  `+t.stack):new Error(t.message+`
4
4